diff --git a/docs/Deprecating-a-Package.md b/docs/Deprecating-a-Package.md index 616b4de499..ae62947aa3 100644 --- a/docs/Deprecating-a-Package.md +++ b/docs/Deprecating-a-Package.md @@ -14,7 +14,7 @@ The Psammead repository contains packages that are actively being maintained. Ho - Create a pull request from this branch. ### 2. Deprecate the package on NPM -Tell your NPM Admin to run the command below, supplying a message argument which will be used as a deprecation warning to those why try to install the package. +Tell your NPM Admin to run the command below, supplying a message argument which will be used as a deprecation warning to those who try to install the package. ```sh npm deprecate @bbc/ "This package is no longer maintained." ``` diff --git a/package.json b/package.json index e604a68be7..ccd657a007 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,6 @@ "@bbc/psammead-navigation": "9.2.2", "@bbc/psammead-paragraph": "4.0.18", "@bbc/psammead-play-button": "3.0.22", - "@bbc/psammead-radio-schedule": "5.1.35", "@bbc/psammead-rich-text-transforms": "2.0.6", "@bbc/psammead-script-link": "3.0.20", "@bbc/psammead-section-label": "7.0.20", diff --git a/packages/components/psammead-radio-schedule/CHANGELOG.md b/packages/components/psammead-radio-schedule/CHANGELOG.md deleted file mode 100644 index 84c66feafe..0000000000 --- a/packages/components/psammead-radio-schedule/CHANGELOG.md +++ /dev/null @@ -1,135 +0,0 @@ -# Radio Schedule Changelog - - -| Version | Description | -|---------|-------------| -| 5.1.35 | [PR#4497](https://github.com/bbc/psammead/pull/4497) Bump psammead-styles | -| 5.1.34 | [PR#4486](https://github.com/bbc/psammead/pull/4486) upgrade minor/patch dependencies | -| 5.1.33 | [PR#4484](https://github.com/bbc/psammead/pull/4484) Bump psammead-grid to 3.1.0 | -| 5.1.32 | [PR#4428](https://github.com/bbc/psammead/pull/4428) Break schedule item header into own component | -| 5.1.30 | [PR#4420](https://github.com/bbc/psammead/pull/4420) bumps 3rd-party dependencies | -| 5.1.29 | [PR#4376](https://github.com/bbc/psammead/pull/4376) Improve screenreader behaviour | -| 5.1.28 | [PR#4368](https://github.com/bbc/psammead/pull/4368) use Yarn Workspaces | -| 5.1.27 | [PR#4335](https://github.com/bbc/psammead/pull/4335) switch to yarn for package management | -| 5.1.26 | [PR#4306](https://github.com/bbc/psammead/pull/4306) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 5.1.25 | [PR#4305](https://github.com/bbc/psammead/pull/4305) Talos - Bump Dependencies - @bbc/psammead-grid, @bbc/psammead-live-label, @bbc/psammead-timestamp-container | -| 5.1.24 | [PR#4304](https://github.com/bbc/psammead/pull/4304) Talos - Bump Dependencies - @bbc/gel-foundations, @bbc/psammead-assets, @bbc/psammead-grid, @bbc/psammead-live-label, @bbc/psammead-styles, @bbc/psammead-timestamp-container, @bbc/psammead-detokeniser | -| 5.1.23 | [PR#4303](https://github.com/bbc/psammead/pull/4303) Trigger rebuild following babel config update for emotion 11 | -| 5.1.22 | [PR#4273](https://github.com/bbc/psammead/pull/4273) Talos - Bump Dependencies - @bbc/psammead-live-label | -| 5.1.21 | [PR#4271](https://github.com/bbc/psammead/pull/4271) change react peer dep to >=16.9.0 | -| 5.1.20 | [PR#4268](https://github.com/bbc/psammead/pull/4268) Talos - Bump Dependencies - @bbc/psammead-live-label, @bbc/psammead-timestamp-container | -| 5.1.19 | [PR#4266](https://github.com/bbc/psammead/pull/4266) Talos - Bump Dependencies - @bbc/psammead-assets | -| 5.1.18 | [PR#4263](https://github.com/bbc/psammead/pull/4263) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 5.1.17 | [PR#4261](https://github.com/bbc/psammead/pull/4261) Talos - Bump Dependencies - @bbc/psammead-grid, @bbc/psammead-live-label, @bbc/psammead-timestamp-container | -| 5.1.16 | [PR#4259](https://github.com/bbc/psammead/pull/4259) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 5.1.15 | [PR#4260](https://github.com/bbc/psammead/pull/4260) Talos - Bump Dependencies - @bbc/gel-foundations | -| 5.1.14 | [PR#4258](https://github.com/bbc/psammead/pull/4258) Talos - Bump Dependencies - @bbc/psammead-grid, @bbc/psammead-live-label | -| 5.1.13 | [PR#4256](https://github.com/bbc/psammead/pull/4256) Talos - Bump Dependencies - @bbc/psammead-styles | -| 5.1.12 | [PR#4255](https://github.com/bbc/psammead/pull/4255) Fix package-lock.json issue causing npm install error | -| 5.1.11 | [PR#4193](https://github.com/bbc/psammead/pull/4193) Upgrade Emotion to v11 | -| 5.1.10 | [PR#4228](https://github.com/bbc/psammead/pull/4228) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 5.1.9 | [PR#4227](https://github.com/bbc/psammead/pull/4227) Talos - Bump Dependencies - @bbc/psammead-grid, @bbc/psammead-live-label | -| 5.1.8 | [PR#4226](https://github.com/bbc/psammead/pull/4226) Talos - Bump Dependencies - @bbc/psammead-styles | -| 5.1.7 | [PR#4198](https://github.com/bbc/psammead/pull/4198) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 5.1.6 | [PR#4197](https://github.com/bbc/psammead/pull/4197) Talos - Bump Dependencies - @bbc/psammead-grid, @bbc/psammead-live-label | -| 5.1.5 | [PR#4189](https://github.com/bbc/psammead/pull/4189) Talos - Bump Dependencies - @bbc/psammead-assets, @bbc/psammead-styles | -| 5.1.4 | [PR#4184](https://github.com/bbc/psammead/pull/4184) Talos - Bump Dependencies - @bbc/psammead-grid | -| 5.1.3 | [PR#4113](https://github.com/bbc/psammead/pull/4113) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 5.1.2 | [PR#4091](https://github.com/bbc/psammead/pull/4091) Set correct propTypes for radio schedules link component | -| 5.1.1 | [PR#4087](https://github.com/bbc/psammead/pull/4087) Talos - Bump Dependencies - @bbc/psammead-assets | -| 5.1.0 | [PR#4075](https://github.com/bbc/psammead/pull/4075) Update RadioSchedules to be able to use client side routing | -| 5.0.16 | [PR#4074](https://github.com/bbc/psammead/pull/4074) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 5.0.15 | [PR#4073](https://github.com/bbc/psammead/pull/4073) Talos - Bump Dependencies - @bbc/psammead-live-label | -| 5.0.14 | [PR#4072](https://github.com/bbc/psammead/pull/4072) Talos - Bump Dependencies - @bbc/psammead-styles | -| 5.0.13 | [PR#4054](https://github.com/bbc/psammead/pull/4054) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 5.0.12 | [PR#4053](https://github.com/bbc/psammead/pull/4053) Talos - Bump Dependencies - @bbc/psammead-live-label, @bbc/psammead-timestamp-container | -| 5.0.11 | [PR#4052](https://github.com/bbc/psammead/pull/4052) Talos - Bump Dependencies - @bbc/gel-foundations | -| 5.0.10 | [PR#4032](https://github.com/bbc/psammead/pull/4032) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 5.0.9 | [PR#4030](https://github.com/bbc/psammead/pull/4030) Talos - Bump Dependencies - @bbc/psammead-live-label | -| 5.0.8 | [PR#4029](https://github.com/bbc/psammead/pull/4029) Talos - Bump Dependencies - @bbc/psammead-styles | -| 5.0.7 | [PR#4010](https://github.com/bbc/psammead/pull/4010) Talos - Bump Dependencies - @bbc/psammead-assets | -| 5.0.6 | [PR#3991](https://github.com/bbc/psammead/pull/3991) Remove L/R Padding below 600px| -| 5.0.5 | [PR#3945](https://github.com/bbc/psammead/pull/3945) Talos - Bump Dependencies - @bbc/psammead-live-label | -| 5.0.4 | [PR#3944](https://github.com/bbc/psammead/pull/3944) Talos - Bump Dependencies - @bbc/psammead-styles | -| 5.0.3 | [PR#3936](https://github.com/bbc/psammead/pull/3936) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 5.0.2 | [PR#3928](https://github.com/bbc/psammead/pull/3928) Talos - Bump Dependencies - @bbc/psammead-live-label | -| 5.0.1 | [PR#3925](https://github.com/bbc/psammead/pull/3925) Talos - Bump Dependencies - @bbc/psammead-assets, @bbc/psammead-live-label, @bbc/psammead-styles | -| 5.0.0 | [PR#3921](https://github.com/bbc/psammead/pull/3921) Migrate to emotion. | -| 4.0.5 | [PR#3891](https://github.com/bbc/psammead/pull/3894) Update snapshots. | -| 4.0.4 | [PR#3885](https://github.com/bbc/psammead/pull/3885) Talos - Bump Dependencies - @bbc/psammead-live-label | -| 4.0.3 | [PR#3883](https://github.com/bbc/psammead/pull/3883) Talos - Bump Dependencies - @bbc/psammead-assets, @bbc/psammead-styles | -| 4.0.2 | [PR#3855](https://github.com/bbc/psammead/pull/3855) Talos - Bump Dependencies - @bbc/gel-foundations | -| 4.0.1 | [PR#3854](https://github.com/bbc/psammead/pull/3854) Talos - Bump Dependencies - @bbc/psammead-styles | -| 4.0.0-alpha.0 | [PR#3843](https://github.com/bbc/psammead/pull/3843) Bump Dependencies - @bbc/psammead-styles alpha version | -| 3.0.26 | [PR#3836](https://github.com/bbc/psammead/pull/3836) Talos - Bump Dependencies - @bbc/psammead-styles | -| 3.0.25 | [PR#3831](https://github.com/bbc/psammead/pull/3831) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 3.0.24 | [PR#3829](https://github.com/bbc/psammead/pull/3829) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 3.0.23 | [PR#3816](https://github.com/bbc/psammead/pull/3816) Talos - Bump Dependencies | -| 3.0.22 | [PR#3728](https://github.com/bbc/psammead/pull/3728) Tweaks following Storybook v5.3.19 to v6.0.22 update | -| 3.0.21 | [PR#3811](https://github.com/bbc/psammead/pull/3811) Talos - Bump Dependencies - @bbc/psammead-styles | -| 3.0.20 | [PR#3799](https://github.com/bbc/psammead/pull/3799) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 3.0.19 | [PR#3798](https://github.com/bbc/psammead/pull/3798) Talos - Bump Dependencies -| 3.0.18 | [PR#3785](https://github.com/bbc/psammead/pull/3785) Talos - Bump Dependencies - @bbc/gel-foundations | -| 3.0.17 | [PR#3713](https://github.com/bbc/psammead/pull/3713) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 3.0.16 | [PR#3712](https://github.com/bbc/psammead/pull/3712) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 3.0.15 | [PR#3710](https://github.com/bbc/psammead/pull/3710) Talos - Bump Dependencies - @bbc/psammead-styles | -| 3.0.14 | [PR#3707](https://github.com/bbc/psammead/pull/3707) Talos - Bump Dependencies - @bbc/psammead-styles, @bbc/psammead-timestamp-container | -| 3.0.13 | [PR#3626](https://github.com/bbc/psammead/pull/3626) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 3.0.12 | [PR#3623](https://github.com/bbc/psammead/pull/3623) Talos - Bump Dependencies - @bbc/gel-foundations | -| 3.0.11 | [PR#3613](https://github.com/bbc/psammead/pull/3613) Talos - Bump Dependencies - @bbc/psammead-assets | -| 3.0.10 | [PR#3608](https://github.com/bbc/psammead/pull/3608) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 3.0.9 | [PR#3605](https://github.com/bbc/psammead/pull/3605) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 3.0.8 | [PR#3604](https://github.com/bbc/psammead/pull/3604) Talos - Bump Dependencies - @bbc/gel-foundations | -| 3.0.7 | [PR#3598](https://github.com/bbc/psammead/pull/3598) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 3.0.6 | [PR#3525](https://github.com/bbc/psammead/pull/3525) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 3.0.5 | [PR#3485](https://github.com/bbc/psammead/pull/3485) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 3.0.4 | [PR#3475](https://github.com/bbc/psammead/pull/3475) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 3.0.3 | [PR#3467](https://github.com/bbc/psammead/pull/3467) Talos - Bump Dependencies - @bbc/psammead-styles | -| 3.0.2 | [PR#3459](https://github.com/bbc/psammead/pull/3459) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 3.0.1 | [PR#3454](https://github.com/bbc/psammead/pull/3454) Update radio schedule props | -| 3.0.0 | [PR#3408](https://github.com/bbc/psammead/pull/3408) Use detokenizer to construct duration label | -| 2.0.2 | [PR#3427](https://github.com/bbc/psammead/pull/3427) Updating tests with dependency bump | -| 2.0.1 | [PR#3414](https://github.com/bbc/psammead/pull/3414) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 2.0.0 | [PR#3377](https://github.com/bbc/psammead/pull/3377) Remove episodeTitle prop. In ProgramCard, generate episodeTitle with moment using startTime | -| 1.0.8 | [PR#3400](https://github.com/bbc/psammead/pull/3400) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 1.0.7 | [PR#3398](https://github.com/bbc/psammead/pull/3398) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 1.0.6 | [PR#3397](https://github.com/bbc/psammead/pull/3397) Talos - Bump Dependencies - @bbc/psammead-styles, @bbc/psammead-timestamp-container | -| 1.0.5 | [PR#3390](https://github.com/bbc/psammead/pull/3390) Bump prettier major version and disable rule for brackets around a single prop | -| 1.0.4 | [PR#3387](https://github.com/bbc/psammead/pull/3387) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 1.0.3 | [PR#3381](https://github.com/bbc/psammead/pull/3381) Talos - Bump Dependencies - @bbc/psammead-assets | -| 1.0.2 | [PR#3379](https://github.com/bbc/psammead/pull/3379) Talos - Bump Dependencies - @bbc/psammead-storybook-helpers adding timezone | -| 1.0.1 | [PR#3354](https://github.com/bbc/psammead/pull/3354) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 1.0.0 | [PR#3350](https://github.com/BBC/psammead/pull/3350) Remove alpha tag | -| 0.1.0-alpha.33 | [PR#3348](https://github.com/bbc/psammead/pull/3348) Add wrapping span with role `text` around the headline | -| 0.1.0-alpha.32 | [PR#3345](https://github.com/bbc/psammead/pull/3345) Remove border from Program Card | -| 0.1.0-alpha.31 | [PR#3326](https://github.com/bbc/psammead/pull/3326) Update Program Card Heading markup and CSS to fix issue with AT | -| 0.1.0-alpha.30 | [PR#3324](https://github.com/bbc/psammead/pull/3324) Fix Duration border on FireFox High Contrast Mode | -| 0.1.0-alpha.29 | [PR#3318](https://github.com/bbc/psammead/pull/3318) Fix `StartTime` clock icon styling in Safari | -| 0.1.0-alpha.28 | [PR#3321](https://github.com/bbc/psammead/pull/3321) Fix radio schedules duration markup | -| 0.1.0-alpha.27 | [PR#3309](https://github.com/bbc/psammead/pull/3309) Fix Program Card styling | -| 0.1.0-alpha.26 | [PR#3312](https://github.com/bbc/psammead/pull/3312) Fix `ProgramCard` border on Windows High Contrast Mode | -| 0.1.0-alpha.25 | [PR#3302](https://github.com/bbc/psammead/pull/3302) Fix radio schedules duration formatting | -| 0.1.0-alpha.24 | [PR#3291](https://github.com/bbc/psammead/pull/3291) Use withServicesKnob `selectedService` prop | -| 0.1.0-alpha.23 | [PR#3297](https://github.com/bbc/psammead/pull/3297) Use LiveLabel, and pass in translations for next and live | -| 0.1.0-alpha.22 | [PR#3274](https://github.com/bbc/psammead/pull/3274) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 0.1.0-alpha.21 | [PR#3272](https://github.com/bbc/psammead/pull/3272) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 0.1.0-alpha.20 | [PR#3242](https://github.com/bbc/psammead/pull/3242) Add padding bottom to program cards | -| 0.1.0-alpha.19 | [PR#3197](https://github.com/bbc/psammead/pull/3197) Add data-e2e attribute to program card element to contain the state of the program | -| 0.1.0-alpha.18 | [PR#3184](https://github.com/bbc/psammead/pull/3184) Change display of program cards in group3 & update stories to include 4 cards | -| 0.1.0-alpha.17 | [PR#3160](https://github.com/bbc/psammead/pull/3160) Uniformise visually-hidden state label | -| 0.1.0-alpha.16 | [PR#3179](https://github.com/bbc/psammead/pull/3179) Make summary not required for Program Card | -| 0.1.0-alpha.15 | [PR#3181](https://github.com/bbc/psammead/pull/3181) Alias radio schedule parent grid to be a `ul` with grid items aliased as `li` | -| 0.1.0-alpha.14 | [PR#3164](https://github.com/bbc/psammead/pull/3164) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 0.1.0-alpha.13 | [PR#3153](https://github.com/bbc/psammead/pull/3153) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 0.1.0-alpha.12 | [PR#3132](https://github.com/bbc/psammead/pull/3132) Render correct hidden `startTime` in RadioSchedule component | -| 0.1.0-alpha.11 | [PR#3151](https://github.com/bbc/psammead/pull/3151) Talos - Bump Dependencies - @bbc/psammead-timestamp-container | -| 0.1.0-alpha.10 | [PR#3079](https://github.com/bbc/psammead/pull/3079) Format duration time for the ProgramCard | -| 0.1.0-alpha.9 | [PR#3135](https://github.com/bbc/psammead/pull/3135) Talos - Bump Dependencies - @bbc/gel-foundations | -| 0.1.0-alpha.8 | [PR#3130](https://github.com/bbc/psammead/pull/3130) Apply program-card's link to start-time component | -| 0.1.0-alpha.7 | [PR#3129](https://github.com/bbc/psammead/pull/3129) Talos - Bump Dependencies - @bbc/gel-foundations | -| 0.1.0-alpha.6 | [PR#3050](https://github.com/BBC-News/psammead/pull/3050) Create a wrapper around start-time and program-card. | -| 0.1.0-alpha.5 | [PR#3074](https://github.com/BBC-News/psammead/pull/3074) Format hidden start time in program card component. | -| 0.1.0-alpha.4 | [PR#3082](https://github.com/bbc/psammead/pull/3082) Talos - Bump Dependencies - @bbc/psammead-styles, @bbc/psammead-assets, @bbc/psammead-timestamp-container | -| 0.1.0-alpha.3 | [PR#2988](https://github.com/BBC-News/psammead/pull/2988) Add start time of the radio program. | -| 0.1.0-alpha.2 | [PR#2938](https://github.com/BBC-News/psammead/pull/2938) Add radio program card component. | -| 0.1.0-alpha.1 | [PR#2979](https://github.com/BBC-News/psammead/pull/2979) Initial creation of package. | diff --git a/packages/components/psammead-radio-schedule/README.md b/packages/components/psammead-radio-schedule/README.md deleted file mode 100644 index 44cfcb72d3..0000000000 --- a/packages/components/psammead-radio-schedule/README.md +++ /dev/null @@ -1,214 +0,0 @@ -# psammead-radio-schedule - [![Known Vulnerabilities](https://snyk.io/test/github/bbc/psammead/badge.svg?targetFile=packages%2Fcomponents%2Fpsammead-radio-schedule%2Fpackage.json)](https://snyk.io/test/github/bbc/psammead?targetFile=packages%2Fcomponents%2Fpsammead-radio-schedule%2Fpackage.json) [![Dependency Status](https://david-dm.org/bbc/psammead.svg?path=packages/components/psammead-radio-schedule)](https://david-dm.org/bbc/psammead?path=packages/components/psammead-radio-schedule) [![peerDependencies Status](https://david-dm.org/bbc/psammead/peer-status.svg?path=packages/components/psammead-radio-schedule)](https://david-dm.org/bbc/psammead?path=packages/components/psammead-radio-schedule&type=peer) [![Storybook](https://raw.githubusercontent.com/storybooks/brand/master/badge/badge-storybook.svg?sanitize=true)](https://bbc.github.io/psammead/?path=/story/radio-schedule--containing-image) [![GitHub license](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/bbc/psammead/blob/latest/LICENSE) [![npm version](https://img.shields.io/npm/v/@bbc/psammead-radio-schedule.svg)](https://www.npmjs.com/package/@bbc/psammead-radio-schedule) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/bbc/psammead/blob/latest/CONTRIBUTING.md) - -## Description - -The `RadioSchedule` component is designed to display radio schedule programs in their different states. Currently, the component comprises of a `ProgramCard` which is comprised of a link to the radio-schedule, a state label, brand and episode titles, a summary, and a duration. - -## Exports - -`/startTime` - Adds a starting time of the program with a clock icon, timestamp and horizontal line. - -## Installation - -```jsx -npm install @bbc/psammead-radio-schedule --save -``` - -## Components (WIP) - -## RadioSchedule - -### Props - - -| Argument | Type | Required | Default | Example | -| -------- | ---- | -------- | ------- | ------- | -| schedules | array | yes | N/A | `[{ id: '1', state: 'live', stateLabel: 'Live', startTime: '1566914061212', link: 'www.bbc.co.uk', brandTitle: 'This is a brand title', episodeTitle: 'This is an episode title', summary: 'This is a summary', duration: '45:00'}]` | -| service | string | yes | N/A | `'news'` | -| script | object | yes | N/A | `{ canon: { groupA: { fontSize: '28', lineHeight: '32',}, groupB: { fontSize: '32', lineHeight: '36', }, groupD: { fontSize: '44', lineHeight: '48', }, }, trafalgar: { groupA: { fontSize: '20', lineHeight: '24', }, groupB: { fontSize: '24', lineHeight: '28', }, groupD: { fontSize: '32', lineHeight: '36', }, }, }` | -| locale | string | no | N/A | `'en-gb'` | -| timezone | string | no | N/A | `'Europe/London'` | -| durationLabel | string | yes | N/A | `'Duration %duration%'` | -| liveLabel | string | yes | N/A | `'LIVE'` | -| nextLabel | string | yes | N/A | `'NEXT'` | -| dir | string | no | `"ltr"` | `"rtl"` | -| linkComponent | elementType | string | no | `"a"` | `ReactRouterLink` | -| linkComponentAttr | string | no | `"href"` | `"to"` | - -### Usage - -This component displays radio schedule program-card and start-time component for all schedules passed in. - -```jsx -import React from 'react'; -import { latin } from '@bbc/gel-foundations/scripts'; -import RadioSchedule from '@bbc/psammead-radio-schedule'; - -const schedules = [ - { - id: 1, - state: 'live', - startTime: 1566914061212, - link: 'www.bbc.co.uk', - brandTitle: 'This is a brand title', - summary: 'This is a summary', - duration: '45:00', - }, -]; - -; -``` - -While the default link component is an `a` tag, it can be replaced with a [react-router-dom](https://www.npmjs.com/package/react-router-dom) `Link` component - -```jsx -import React from 'react'; -import { Link } from 'react-router-dom'; -import { latin } from '@bbc/gel-foundations/scripts'; -import RadioSchedule from '@bbc/psammead-radio-schedule'; - -const schedules = [ - { - id: 1, - state: 'test', - startTime: 1566914061212, - link: 'www.bbc.co.uk', - brandTitle: 'This is another brand title', - summary: 'This is a longer summary', - duration: '30:00', - }, -]; - -; -``` - -## ProgramCard - -### Props - - -| Argument | Type | Required | Default | Example | -| -------- | ---- | -------- | ------- | ------- | -| brandTitle | string | yes | N/A | `'This is a brand title'` | -| summary | string | no | null | `'This is a summary'` | -| duration | string | yes | N/A | `'PT30M'` | -| durationLabel | string | yes | N/A | `'Duration %duration%'` | -| state | string | yes | N/A | `'live'` | -| liveLabel | string | yes | N/A | `'LIVE'` | -| nextLabel | string | yes | N/A | `'NEXT'` | -| link | string | yes | N/A | `'https://bbc.com/arabic/articles/c1er5mjnznzo'` | -| startTime | number | yes | N/A | `1566914061212` | -| service | string | yes | N/A | `'news'` | -| script | object | yes | N/A | `{ canon: { groupA: { fontSize: '28', lineHeight: '32',}, groupB: { fontSize: '32', lineHeight: '36', }, groupD: { fontSize: '44', lineHeight: '48', }, }, trafalgar: { groupA: { fontSize: '20', lineHeight: '24', }, groupB: { fontSize: '24', lineHeight: '28', }, groupD: { fontSize: '32', lineHeight: '36', }, }, }` | -| dir | string | no | `"ltr"` | `"rtl"` | -| timezone | string | no | `'GMT'` | `'Europe/London'` | -| locale | string | no | `'en-gb'` | `'fa'` | -| linkComponent | elementType | string | no | `"a"` | `ReactRouterLink` | -| linkComponentAttr | string | no | `"href"` | `"to"` | - -### Usage - -This component displays a single link as program card with a brand title, an episode title, a summary and a duration. It also allows for an override of the link component in a manner similar to the `RadioSchedule` component above. - -```jsx -import React from 'react'; -import { latin } from '@bbc/gel-foundations/scripts'; -import ProgramCard from '@bbc/psammead-radio-schedule/ProgramCard'; - -; -``` - -## StartTime - -### Props - - -| Argument | Type | Required | Default | Example | -| --------- | ---- | -------- | ------- | ------- | -| timestamp | number | yes | N/A | `1530947227000` | -| timezone | string | no | `'Europe/London'` | `'Europe/Vienna'` | -| locale | string | no | `'en-gb'` | `'fa'` | -| script | object | yes | N/A | `{ canon: { groupA: { fontSize: '28', lineHeight: '32',}, groupB: { fontSize: '32', lineHeight: '36', }, groupD: { fontSize: '44', lineHeight: '48', }, }, trafalgar: { groupA: { fontSize: '20', lineHeight: '24', }, groupB: { fontSize: '24', lineHeight: '28', }, groupD: { fontSize: '32', lineHeight: '36', }, }, }` | -| service | string | yes | N/A | `news` | -| dir | string | no | `'ltr'` | `'rtl'` | - -### Usage - -```jsx -import React from 'react'; -import StartTime from '@bbc/psammead-radio-schedule/startTime'; -import { latin } from '@bbc/gel-foundations/scripts'; - -; -``` - -### When to use this component - -This component is to be used initially on the `front pages`, and media pages. - -### When not to use this component - - - -### Accessibility notes - - - -### Roadmap - - - -## Contributing - -Psammead is completely open source. We are grateful for any contributions, whether they be new components, bug fixes or general improvements. Please see our primary contributing guide which can be found at [the root of the Psammead repository](https://github.com/bbc/psammead/blob/latest/CONTRIBUTING.md). - -### [Code of Conduct](https://github.com/bbc/psammead/blob/latest/CODE_OF_CONDUCT.md) - -We welcome feedback and help on this work. By participating in this project, you agree to abide by the [code of conduct](https://github.com/bbc/psammead/blob/latest/CODE_OF_CONDUCT.md). Please take a moment to read it. - -### License - -Psammead is [Apache 2.0 licensed](https://github.com/bbc/psammead/blob/latest/LICENSE). diff --git a/packages/components/psammead-radio-schedule/package.json b/packages/components/psammead-radio-schedule/package.json deleted file mode 100644 index 7189a759d4..0000000000 --- a/packages/components/psammead-radio-schedule/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "@bbc/psammead-radio-schedule", - "version": "5.1.35", - "main": "dist/index.js", - "module": "esm/index.js", - "sideEffects": false, - "description": "Component package for radio schedule components", - "repository": { - "type": "git", - "url": "https://github.com/BBC-News/psammead/tree/latest/packages/components/psammead-radio-schedule" - }, - "author": { - "name": "Psammead Maintainers", - "email": "PsammeadMaintainers@bbc.co.uk" - }, - "license": "Apache-2.0", - "bugs": { - "url": "https://github.com/bbc/psammead/issues" - }, - "homepage": "https://github.com/BBC-News/psammead/blob/latest/packages/components/psammead-radio-schedule/README.md", - "dependencies": { - "@bbc/gel-foundations": "6.1.3", - "@bbc/psammead-assets": "3.1.9", - "@bbc/psammead-detokeniser": "1.0.6", - "@bbc/psammead-grid": "3.1.2", - "@bbc/psammead-live-label": "2.0.21", - "@bbc/psammead-styles": "7.3.0", - "@bbc/psammead-timestamp-container": "5.0.30" - }, - "peerDependencies": { - "@emotion/styled": "^11.0.0", - "react": ">=16.9.0" - }, - "keywords": [ - "bbc", - "radio", - "schedule" - ], - "devDependencies": { - "@emotion/styled": "^11.3.0", - "react": "^17.0.2" - } -} diff --git a/packages/components/psammead-radio-schedule/programCard/package.json b/packages/components/psammead-radio-schedule/programCard/package.json deleted file mode 100644 index 4ef74d6e07..0000000000 --- a/packages/components/psammead-radio-schedule/programCard/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@bbc/psammead-radio-schedule/programCard", - "private": true, - "main": "../dist/ProgramCard", - "module": "../esm/ProgramCard", - "sideEffects": false - } diff --git a/packages/components/psammead-radio-schedule/src/ProgramCard/__snapshots__/index.test.jsx.snap b/packages/components/psammead-radio-schedule/src/ProgramCard/__snapshots__/index.test.jsx.snap deleted file mode 100644 index efd7813da3..0000000000 --- a/packages/components/psammead-radio-schedule/src/ProgramCard/__snapshots__/index.test.jsx.snap +++ /dev/null @@ -1,1448 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`ProgramCard should render correctly for live 1`] = ` -.emotion-0 { - padding-top: 0.5rem; - background-color: #FFFFFF; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - outline: 0.0625rem solid transparent; - height: 100%; -} - -.emotion-2 { - padding: 0 0.5rem; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} - -.emotion-4 { - font-family: ReithSerif,Helvetica,Arial,sans-serif; - font-weight: 500; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.25rem; - color: #222222; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-4 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-4 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -.emotion-6 { - position: static; - color: #222222; - -webkit-text-decoration: none; - text-decoration: none; - overflow-wrap: break-word; -} - -.emotion-6:before { - bottom: 0; - content: ''; - left: 0; - overflow: hidden; - position: absolute; - right: 0; - top: 0; - white-space: nowrap; - z-index: 1; -} - -.emotion-6:hover, -.emotion-6:focus { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-6:visited { - color: #6E6E73; -} - -.emotion-6:hover .emotion-15 { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-6:focus .emotion-15 { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-8 { - -webkit-clip-path: inset(100%); - clip-path: inset(100%); - clip: rect(1px, 1px, 1px, 1px); - height: 1px; - overflow: hidden; - position: absolute; - width: 1px; - margin: 0; -} - -.emotion-10 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 700; - font-style: normal; - color: #B80000; - display: inline-block; - margin-right: 0.5rem; -} - -.emotion-14 { - color: #3F3F42; - padding: 0.5rem 0; - display: inline-block; - width: 100%; - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.25rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-14 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-14 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -.emotion-18 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.875rem; - line-height: 1.125rem; - color: #6E6E73; - padding-bottom: 1rem; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-18 { - font-size: 0.875rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-18 { - font-size: 0.8125rem; - line-height: 1rem; - } -} - -.emotion-20 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.75rem; - line-height: 1rem; - padding: 0.5rem; - background-color: #B80000; - outline: 0.0625rem solid transparent; - color: #FFFFFF; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-20 { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-20 { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media screen and (-ms-high-contrast: active) { - .emotion-20 { - background-color: transparent; - outline: none; - } -} - -.emotion-22>svg { - color: #FFFFFF; - fill: currentColor; - width: 1.0625rem; - height: 0.75rem; - margin: 0; -} - -.emotion-24 { - vertical-align: middle; - margin: 0 0.25rem; - color: #222222; - fill: currentColor; - width: 0.8125rem; - height: 0.75rem; -} - -.emotion-26 { - padding-left: 0.5rem; -} - -
-
-
-

- - - - Listen Live, - - - - - Could a computer ever create better art than a human? - - , - 14:54 - , - - - August 27, 2019 - - - , Duration 30,00 - - - -

-

- The critic, author, poet and TV host was known for his witty commentary on international television. -

-
-
- - - - -
-
-
-`; - -exports[`ProgramCard should render correctly for next 1`] = ` -.emotion-0 { - padding-top: 0.5rem; - background-color: #FFFFFF; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - outline: 0.0625rem solid transparent; - height: 100%; -} - -.emotion-2 { - padding: 0 0.5rem; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} - -.emotion-4 { - font-family: ReithSerif,Helvetica,Arial,sans-serif; - font-weight: 500; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.25rem; - color: #6E6E73; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-4 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-4 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -.emotion-6 { - -webkit-clip-path: inset(100%); - clip-path: inset(100%); - clip: rect(1px, 1px, 1px, 1px); - height: 1px; - overflow: hidden; - position: absolute; - width: 1px; - margin: 0; -} - -.emotion-8 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 700; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.25rem; - color: #11708C; - display: inline-block; - margin-right: 0.5rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-8 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-8 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -.emotion-12 { - color: #6E6E73; - padding: 0.5rem 0; - display: inline-block; - width: 100%; - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.25rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-12 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-12 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -.emotion-16 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.875rem; - line-height: 1.125rem; - color: #6E6E73; - padding-bottom: 1rem; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-16 { - font-size: 0.875rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-16 { - font-size: 0.8125rem; - line-height: 1rem; - } -} - -.emotion-18 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.75rem; - line-height: 1rem; - padding: 0.5rem; - background-color: #FFFFFF; - outline: 0.0625rem solid transparent; - color: #11708C; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-18 { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-18 { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media screen and (-ms-high-contrast: active) { - .emotion-18 { - background-color: transparent; - outline: none; - } -} - -.emotion-20>svg { - color: #11708C; - fill: currentColor; - width: 1.0625rem; - height: 0.75rem; - margin: 0; -} - -.emotion-22 { - vertical-align: middle; - margin: 0 0.25rem; - color: #222222; - fill: currentColor; - width: 0.8125rem; - height: 0.75rem; -} - -.emotion-24 { - padding-left: 0.5rem; -} - -
-
-
-

- - - Listen Next, - - - Could a computer ever create better art than a human? - - , - 14:54 - , - - - August 27, 2019 - - - , Duration 30,00 - - -

-

- The critic, author, poet and TV host was known for his witty commentary on international television. -

-
-
- - - - -
-
-
-`; - -exports[`ProgramCard should render correctly for onDemand 1`] = ` -.emotion-0 { - padding-top: 0.5rem; - background-color: #FFFFFF; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - outline: 0.0625rem solid transparent; - height: 100%; -} - -.emotion-2 { - padding: 0 0.5rem; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} - -.emotion-4 { - font-family: ReithSerif,Helvetica,Arial,sans-serif; - font-weight: 500; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.25rem; - color: #222222; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-4 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-4 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -.emotion-6 { - position: static; - color: #222222; - -webkit-text-decoration: none; - text-decoration: none; - overflow-wrap: break-word; -} - -.emotion-6:before { - bottom: 0; - content: ''; - left: 0; - overflow: hidden; - position: absolute; - right: 0; - top: 0; - white-space: nowrap; - z-index: 1; -} - -.emotion-6:hover, -.emotion-6:focus { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-6:visited { - color: #6E6E73; -} - -.emotion-6:hover .emotion-13 { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-6:focus .emotion-13 { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-8 { - -webkit-clip-path: inset(100%); - clip-path: inset(100%); - clip: rect(1px, 1px, 1px, 1px); - height: 1px; - overflow: hidden; - position: absolute; - width: 1px; - margin: 0; -} - -.emotion-12 { - color: #3F3F42; - padding: 0.5rem 0; - display: inline-block; - width: 100%; - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.25rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-12 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-12 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -.emotion-16 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.875rem; - line-height: 1.125rem; - color: #6E6E73; - padding-bottom: 1rem; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-16 { - font-size: 0.875rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-16 { - font-size: 0.8125rem; - line-height: 1rem; - } -} - -.emotion-18 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.75rem; - line-height: 1rem; - padding: 0.5rem; - background-color: #222222; - outline: 0.0625rem solid transparent; - color: #FFFFFF; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-18 { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-18 { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media screen and (-ms-high-contrast: active) { - .emotion-18 { - background-color: transparent; - outline: none; - } -} - -.emotion-20>svg { - color: #FFFFFF; - fill: currentColor; - width: 1.0625rem; - height: 0.75rem; - margin: 0; -} - -.emotion-22 { - vertical-align: middle; - margin: 0 0.25rem; - color: #222222; - fill: currentColor; - width: 0.8125rem; - height: 0.75rem; -} - -.emotion-24 { - padding-left: 0.5rem; -} - -
-
-
-

- - - - Listen, - - Could a computer ever create better art than a human? - - , - 14:54 - , - - - August 27, 2019 - - - , Duration 30,00 - - - -

-

- The critic, author, poet and TV host was known for his witty commentary on international television. -

-
-
- - - - -
-
-
-`; - -exports[`ProgramCard should render correctly in RTL 1`] = ` -.emotion-0 { - padding-top: 0.5rem; - background-color: #FFFFFF; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - outline: 0.0625rem solid transparent; - height: 100%; -} - -.emotion-2 { - padding: 0 0.5rem; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} - -.emotion-4 { - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 700; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.5rem; - color: #222222; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-4 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-4 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -.emotion-6 { - position: static; - color: #222222; - -webkit-text-decoration: none; - text-decoration: none; - overflow-wrap: break-word; -} - -.emotion-6:before { - bottom: 0; - content: ''; - left: 0; - overflow: hidden; - position: absolute; - right: 0; - top: 0; - white-space: nowrap; - z-index: 1; -} - -.emotion-6:hover, -.emotion-6:focus { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-6:visited { - color: #6E6E73; -} - -.emotion-6:hover .emotion-13 { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-6:focus .emotion-13 { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-8 { - -webkit-clip-path: inset(100%); - clip-path: inset(100%); - clip: rect(1px, 1px, 1px, 1px); - height: 1px; - overflow: hidden; - position: absolute; - width: 1px; - margin: 0; -} - -.emotion-12 { - color: #3F3F42; - padding: 0.5rem 0; - display: inline-block; - width: 100%; - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.5rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-12 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-12 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -.emotion-16 { - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.875rem; - line-height: 1.25rem; - color: #6E6E73; - padding-bottom: 1rem; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-16 { - font-size: 0.875rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-16 { - font-size: 0.8125rem; - line-height: 1.25rem; - } -} - -.emotion-18 { - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.75rem; - line-height: 1.125rem; - padding: 0.5rem; - background-color: #222222; - outline: 0.0625rem solid transparent; - color: #FFFFFF; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-18 { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-18 { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media screen and (-ms-high-contrast: active) { - .emotion-18 { - background-color: transparent; - outline: none; - } -} - -.emotion-20>svg { - color: #FFFFFF; - fill: currentColor; - width: 1.0625rem; - height: 0.75rem; - margin: 0; -} - -.emotion-22 { - vertical-align: middle; - margin: 0 0.25rem; - color: #222222; - fill: currentColor; - width: 0.8125rem; - height: 0.75rem; -} - -.emotion-24 { - padding-right: 0.5rem; -} - -
-
-
-

- - - - Listen, - - لماذا يخجل البعض من اسم قريته في مصر؟ - - , - ١٣:٥٤ - , - - - ٢٧ أغسطس ٢٠١٩ - - - , المدة الزمنية ٣٠،٠٠ - - - -

-

- هناك وقائع عدة تتسم بالسخرية والجدل والتنمر، ضد أهل القرية الذين أصابهم الغضب والسخط مما دفعهم إلى تقديم طلب لتغيير اسم قريتهم. -

-
-
- - - - -
-
-
-`; - -exports[`ProgramCard should render correctly without summary 1`] = ` -.emotion-0 { - padding-top: 0.5rem; - background-color: #FFFFFF; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - outline: 0.0625rem solid transparent; - height: 100%; -} - -.emotion-2 { - padding: 0 0.5rem; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} - -.emotion-4 { - font-family: ReithSerif,Helvetica,Arial,sans-serif; - font-weight: 500; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.25rem; - color: #222222; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-4 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-4 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -.emotion-6 { - position: static; - color: #222222; - -webkit-text-decoration: none; - text-decoration: none; - overflow-wrap: break-word; -} - -.emotion-6:before { - bottom: 0; - content: ''; - left: 0; - overflow: hidden; - position: absolute; - right: 0; - top: 0; - white-space: nowrap; - z-index: 1; -} - -.emotion-6:hover, -.emotion-6:focus { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-6:visited { - color: #6E6E73; -} - -.emotion-6:hover .emotion-15 { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-6:focus .emotion-15 { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-8 { - -webkit-clip-path: inset(100%); - clip-path: inset(100%); - clip: rect(1px, 1px, 1px, 1px); - height: 1px; - overflow: hidden; - position: absolute; - width: 1px; - margin: 0; -} - -.emotion-10 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 700; - font-style: normal; - color: #B80000; - display: inline-block; - margin-right: 0.5rem; -} - -.emotion-14 { - color: #3F3F42; - padding: 0.5rem 0; - display: inline-block; - width: 100%; - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.25rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-14 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-14 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -.emotion-18 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.75rem; - line-height: 1rem; - padding: 0.5rem; - background-color: #B80000; - outline: 0.0625rem solid transparent; - color: #FFFFFF; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-18 { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-18 { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media screen and (-ms-high-contrast: active) { - .emotion-18 { - background-color: transparent; - outline: none; - } -} - -.emotion-20>svg { - color: #FFFFFF; - fill: currentColor; - width: 1.0625rem; - height: 0.75rem; - margin: 0; -} - -.emotion-22 { - vertical-align: middle; - margin: 0 0.25rem; - color: #222222; - fill: currentColor; - width: 0.8125rem; - height: 0.75rem; -} - -.emotion-24 { - padding-left: 0.5rem; -} - - -`; diff --git a/packages/components/psammead-radio-schedule/src/ProgramCard/index.jsx b/packages/components/psammead-radio-schedule/src/ProgramCard/index.jsx deleted file mode 100644 index cf310dcd23..0000000000 --- a/packages/components/psammead-radio-schedule/src/ProgramCard/index.jsx +++ /dev/null @@ -1,143 +0,0 @@ -import React from 'react'; -import styled from '@emotion/styled'; -import { mediaIcons } from '@bbc/psammead-assets/svgs'; -import { GEL_SPACING, GEL_SPACING_DBL } from '@bbc/gel-foundations/spacings'; -import { C_METAL, C_WHITE } from '@bbc/psammead-styles/colours'; -import { - getSansRegular, - getSerifMedium, -} from '@bbc/psammead-styles/font-styles'; -import { - getBrevier, - getMinion, - getPica, -} from '@bbc/gel-foundations/typography'; -import { oneOf, shape, string, number } from 'prop-types'; -import { scriptPropType } from '@bbc/gel-foundations/prop-types'; -import { formatDuration } from '@bbc/psammead-timestamp-container/utilities'; -import ScheduleItemHeader from '../ScheduleItemHeader'; -import { programStateConfig } from '../utilities'; - -const CardWrapper = styled.div` - padding-top: ${GEL_SPACING}; - background-color: ${C_WHITE}; - display: flex; - flex-direction: column; - outline: 0.0625rem solid transparent; - height: 100%; -`; - -const TextWrapper = styled.div` - padding: 0 ${GEL_SPACING}; - flex-grow: 1; -`; - -const StyledH3 = styled.h3` - ${({ service }) => service && getSerifMedium(service)}; - ${({ script }) => script && getPica(script)}; - color: ${({ headerTextColor }) => headerTextColor}; - margin: 0; /* Reset */ -`; - -const SummaryWrapper = styled.p` - ${({ service }) => service && getSansRegular(service)}; - ${({ script }) => script && getBrevier(script)}; - color: ${C_METAL}; - padding-bottom: ${GEL_SPACING_DBL}; - margin: 0; /* Reset */ -`; - -const ButtonWrapper = styled.div` - ${({ service }) => service && getSansRegular(service)}; - ${({ script }) => script && getMinion(script)}; - padding: ${GEL_SPACING}; - background-color: ${({ backgroundColor }) => backgroundColor}; - outline: 0.0625rem solid transparent; - color: ${({ durationColor }) => durationColor}; - @media screen and (-ms-high-contrast: active) { - background-color: transparent; - outline: none; - } -`; - -const IconWrapper = styled.span` - > svg { - color: ${({ durationColor }) => durationColor}; - fill: currentColor; - width: 1.0625rem; - height: 0.75rem; - margin: 0; - } -`; - -const DurationWrapper = styled.time` - ${({ dir }) => - dir === 'ltr' - ? `padding-left: ${GEL_SPACING};` - : `padding-right: ${GEL_SPACING};`} -`; - -const ProgramCard = ({ dir, program, ...props }) => { - const { service, script, locale } = props; - const { state, startTime, link, brandTitle, summary, duration } = program; - return ( - - - - - - {summary && ( - - {summary} - - )} - - - - {mediaIcons.audio} - - - - - - - ); -}; - -ProgramCard.propTypes = { - dir: oneOf(['rtl', 'ltr']), - program: shape({ - state: string.isRequired, - duration: string.isRequired, - startTime: number.isRequired, - summary: string.isRequired, - link: string.isRequired, - brandTitle: string.isRequired, - }).isRequired, - service: string.isRequired, - script: shape(scriptPropType).isRequired, - locale: string, -}; - -ProgramCard.defaultProps = { - dir: 'ltr', - locale: 'en-gb', -}; - -export default ProgramCard; diff --git a/packages/components/psammead-radio-schedule/src/ProgramCard/index.test.jsx b/packages/components/psammead-radio-schedule/src/ProgramCard/index.test.jsx deleted file mode 100644 index e62056bf2a..0000000000 --- a/packages/components/psammead-radio-schedule/src/ProgramCard/index.test.jsx +++ /dev/null @@ -1,43 +0,0 @@ -import { shouldMatchSnapshot } from '@bbc/psammead-test-helpers'; -import { render } from '@testing-library/react'; -import { renderProgramCard, uniqueStates } from '../testHelpers/helper'; - -describe('ProgramCard', () => { - uniqueStates.forEach(state => { - shouldMatchSnapshot( - `should render correctly for ${state}`, - renderProgramCard({ state, nextLabel: 'NEXT', liveLabel: 'LIVE' }), - ); - }); - - shouldMatchSnapshot( - `should render correctly in RTL`, - renderProgramCard({ - state: uniqueStates[1], - duration: 'PT30M', - durationLabel: 'المدة الزمنية', - service: 'arabic', - }), - ); - - shouldMatchSnapshot( - `should render correctly without summary`, - renderProgramCard({ - state: uniqueStates[0], - displaySummary: false, - }), - ); - - it('should render with passed component', () => { - const { container } = render( - renderProgramCard({ - state: uniqueStates[0], - linkComponent: 'aside', - linkComponentAttr: 'to', - }), - ); - expect( - container.getElementsByTagName('aside')[0].getAttribute('to'), - ).toEqual('/news/articles/cn7k01xp8kxo'); - }); -}); diff --git a/packages/components/psammead-radio-schedule/src/ScheduleItemHeader/index.jsx b/packages/components/psammead-radio-schedule/src/ScheduleItemHeader/index.jsx deleted file mode 100644 index 7fae16cf1c..0000000000 --- a/packages/components/psammead-radio-schedule/src/ScheduleItemHeader/index.jsx +++ /dev/null @@ -1,169 +0,0 @@ -import React from 'react'; -import styled from '@emotion/styled'; -import { oneOfType, elementType, shape, string, number } from 'prop-types'; -import VisuallyHiddenText from '@bbc/psammead-visually-hidden-text'; -import { formatUnixTimestamp } from '@bbc/psammead-timestamp-container/utilities'; -import detokenise from '@bbc/psammead-detokeniser'; -import LiveLabel from '@bbc/psammead-live-label'; -import { scriptPropType } from '@bbc/gel-foundations/prop-types'; -import { Link } from '@bbc/psammead-story-promo'; -import { getSansBold, getSansRegular } from '@bbc/psammead-styles/font-styles'; -import { getPica } from '@bbc/gel-foundations/typography'; -import { C_KINGFISHER } from '@bbc/psammead-styles/colours'; -import { GEL_SPACING } from '@bbc/gel-foundations/spacings'; -import durationDictionary, { programStateConfig } from '../utilities'; - -const TitleWrapper = styled.span` - color: ${({ titleColor }) => titleColor}; - padding: ${GEL_SPACING} 0; - display: inline-block; - width: 100%; - ${({ service }) => service && getSansRegular(service)}; - ${({ script }) => script && getPica(script)}; -`; - -const StyledLink = styled(Link)` - &:hover ${TitleWrapper} { - text-decoration: underline; - } - - &:focus ${TitleWrapper} { - text-decoration: underline; - } -`; - -const NextLabel = styled.span` - ${({ service }) => service && getSansBold(service)}; - ${({ script }) => script && getPica(script)}; - color: ${C_KINGFISHER}; - display: inline-block; - - ${({ dir }) => - dir === 'rtl' - ? `margin-left: ${GEL_SPACING};` - : `margin-right: ${GEL_SPACING};`} -`; - -const ScheduleItemHeader = ({ - dir, - state, - link, - brandTitle, - startTime, - duration, - ...props -}) => { - const { - nextLabel, - liveLabel, - listenLabelTranslations, - service, - script, - timezone, - locale, - linkComponent, - linkComponentAttr, - durationLabel, - } = props; - - const isLive = state === 'live'; - const isNext = state === 'next'; - - const formattedStartTime = formatUnixTimestamp({ - timestamp: startTime, - format: 'HH:mm', - timezone, - locale, - isRelative: false, - }); - - const formattedDuration = detokenise( - durationLabel, - durationDictionary({ duration, locale }), - ); - - const episodeTitle = formatUnixTimestamp({ - timestamp: startTime, - format: 'LL', - timezone, - locale, - isRelative: false, - }); - - const content = ( - // eslint-disable-next-line jsx-a11y/aria-role - - {`${listenLabelTranslations[state]}, `} - {isLive && ( - - )} - {isNext && ( - - )} - {brandTitle} - , {formattedStartTime}, - - {episodeTitle} - - {`, ${formattedDuration} `} - - ); - - const linkProps = { [linkComponentAttr]: link }; - - return state === 'next' ? ( - content - ) : ( - - {content} - - ); -}; - -ScheduleItemHeader.propTypes = { - service: string.isRequired, - dir: string.isRequired, - script: shape(scriptPropType).isRequired, - brandTitle: string.isRequired, - link: string.isRequired, - state: string.isRequired, - nextLabel: string.isRequired, - liveLabel: string.isRequired, - listenLabelTranslations: shape({ - live: string.isRequired, - next: string.isRequired, - onDemand: string.isRequired, - }).isRequired, - startTime: number.isRequired, - durationLabel: string.isRequired, - duration: string.isRequired, - timezone: string, - locale: string, - linkComponent: oneOfType([elementType, string]), - linkComponentAttr: string, -}; - -ScheduleItemHeader.defaultProps = { - timezone: 'Europe/London', - locale: 'en-gb', - linkComponent: 'a', - linkComponentAttr: 'href', -}; - -export default ScheduleItemHeader; diff --git a/packages/components/psammead-radio-schedule/src/ScheduleItemHeader/index.test.jsx b/packages/components/psammead-radio-schedule/src/ScheduleItemHeader/index.test.jsx deleted file mode 100644 index 7574433448..0000000000 --- a/packages/components/psammead-radio-schedule/src/ScheduleItemHeader/index.test.jsx +++ /dev/null @@ -1,92 +0,0 @@ -import React from 'react'; -import { render } from '@testing-library/react'; -import * as scripts from '@bbc/gel-foundations/scripts'; -import ScheduleItemHeader from '.'; -import '@testing-library/jest-dom/extend-expect'; - -const listenLabelTranslations = { - live: 'Listen Live', - next: 'Listen Next', - onDemand: 'Listen', -}; - -const props = { - nextLabel: 'NEXT', - liveLabel: 'LIVE', - listenLabelTranslations, - service: 'arabic', - script: scripts.arabic, - durationLabel: 'المدة %duration%', -}; - -const dir = 'rtl'; -const state = 'live'; -const link = 'www.bbc.co.uk'; -const brandTitle = 'BBC Xtra'; -const startTime = 1566914061212; -const duration = 'PT30M'; - -it('should render the title', () => { - const { getByText } = render( - , - ); - - expect(getByText('BBC Xtra')).toBeInTheDocument(); -}); - -it('should render the formatted duration for screenreaders', () => { - const { getByText } = render( - , - ); - - expect(getByText(', المدة 30,00')).toBeInTheDocument(); -}); - -it('should aria-hide the Live label', () => { - const { container } = render( - , - ); - - const hiddenDuration = container.querySelector('span[aria-hidden=true]'); - expect(hiddenDuration).toContainHTML('LIVE'); -}); - -it('should render a span with role=text so content is read out in single swipe', () => { - const { container } = render( - , - ); - - expect(container.querySelector('span[role=text]')).toBeInTheDocument(); -}); diff --git a/packages/components/psammead-radio-schedule/src/StartTime/__snapshots__/index.test.jsx.snap b/packages/components/psammead-radio-schedule/src/StartTime/__snapshots__/index.test.jsx.snap deleted file mode 100644 index 60d252f8fd..0000000000 --- a/packages/components/psammead-radio-schedule/src/StartTime/__snapshots__/index.test.jsx.snap +++ /dev/null @@ -1,299 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`StartTime should render LTR correctly 1`] = ` -.emotion-0 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.emotion-2 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - padding-right: 0.25rem; -} - -.emotion-2>svg { - color: #5A5A5A; - margin: 0; - overflow: visible; -} - -.emotion-4 { - vertical-align: middle; - margin: 0 0.25rem; - color: #222222; - fill: currentColor; - width: 0.725rem; - height: 0.725rem; -} - -.emotion-6 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - width: 100%; -} - -.emotion-6>time { - color: #5A5A5A; - font-size: 0.75rem; - line-height: 1rem; - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-6>time { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-6>time { - font-size: 0.75rem; - line-height: 1rem; - } -} - -.emotion-6::after { - content: ''; - border-top: 0.0625rem solid #AEAEB5; - top: 1rem; - margin-left: 0.625rem; - width: 100%; -} - -.emotion-8 { - font-size: 0.875rem; - line-height: 1.125rem; - color: #6E6E73; - display: block; - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-8 { - font-size: 0.875rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-8 { - font-size: 0.8125rem; - line-height: 1rem; - } -} - -
-
- - - - -
-
-`; - -exports[`StartTime should render RTL correctly 1`] = ` -.emotion-0 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.emotion-2 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - padding-left: 0.25rem; -} - -.emotion-2>svg { - color: #5A5A5A; - margin: 0; - overflow: visible; -} - -.emotion-4 { - vertical-align: middle; - margin: 0 0.25rem; - color: #222222; - fill: currentColor; - width: 0.725rem; - height: 0.725rem; -} - -.emotion-6 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - width: 100%; -} - -.emotion-6>time { - color: #5A5A5A; - font-size: 0.75rem; - line-height: 1.125rem; - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-6>time { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-6>time { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -.emotion-6::after { - content: ''; - border-top: 0.0625rem solid #AEAEB5; - top: 1.0625rem; - margin-right: 0.625rem; - width: 100%; -} - -.emotion-8 { - font-size: 0.875rem; - line-height: 1.25rem; - color: #6E6E73; - display: block; - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-8 { - font-size: 0.875rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-8 { - font-size: 0.8125rem; - line-height: 1.25rem; - } -} - -
-
- - - - -
-
-`; diff --git a/packages/components/psammead-radio-schedule/src/StartTime/index.jsx b/packages/components/psammead-radio-schedule/src/StartTime/index.jsx deleted file mode 100644 index 93a80f29d1..0000000000 --- a/packages/components/psammead-radio-schedule/src/StartTime/index.jsx +++ /dev/null @@ -1,141 +0,0 @@ -import React from 'react'; -import styled from '@emotion/styled'; -import { number, string, shape, oneOf } from 'prop-types'; -import { GEL_SPACING_HLF } from '@bbc/gel-foundations/spacings'; -import { scriptPropType } from '@bbc/gel-foundations/prop-types'; -import { C_RHINO, C_PEBBLE } from '@bbc/psammead-styles/colours'; -import { getMinion } from '@bbc/gel-foundations/typography'; -import { getSansRegular } from '@bbc/psammead-styles/font-styles'; -import { coreIcons } from '@bbc/psammead-assets/svgs'; -import TimestampContainer from '@bbc/psammead-timestamp-container'; - -const Wrapper = styled.div` - display: flex; - align-items: center; -`; - -const StyledClock = styled.span` - display: flex; - align-items: center; - ${({ dir }) => - dir === 'ltr' - ? `padding-right: ${GEL_SPACING_HLF};` - : `padding-left: ${GEL_SPACING_HLF};`} - > svg { - color: ${C_RHINO}; - margin: 0; - overflow: visible; - } -`; - -const ClockIcon = ({ dir }) => { - return {coreIcons.clock}; -}; - -ClockIcon.propTypes = { - dir: oneOf(['ltr', 'rtl']), -}; - -ClockIcon.defaultProps = { - dir: 'ltr', -}; - -const StyledTimestamp = styled.span` - display: flex; - align-items: center; - flex-direction: row; - width: 100%; - - > time { - color: ${C_RHINO}; - ${({ script }) => script && getMinion(script)} - ${({ service }) => service && getSansRegular(service)} - } - - &::after { - content: ''; - border-top: 0.0625rem solid ${C_PEBBLE}; - top: ${({ script }) => 0.5 + script.minion.groupA.lineHeight / 2 / 16}rem; - ${({ dir }) => - dir === 'ltr' ? `margin-left: 0.625rem;` : `margin-right: 0.625rem;`} - width: 100%; - } -`; - -export const StartTimestamp = ({ - timestamp, - timezone, - locale, - script, - service, - dir, -}) => { - return ( - - ); -}; - -StartTimestamp.propTypes = { - timestamp: number.isRequired, - timezone: string, - locale: string, - script: shape(scriptPropType).isRequired, - service: string.isRequired, - dir: oneOf(['ltr', 'rtl']), -}; - -StartTimestamp.defaultProps = { - timezone: 'Europe/London', - locale: 'en-gb', - dir: 'ltr', -}; - -const StartTime = ({ timestamp, timezone, locale, script, service, dir }) => { - return ( - - - - - ); -}; - -StartTime.propTypes = { - timestamp: number.isRequired, - timezone: string, - locale: string, - script: shape(scriptPropType).isRequired, - service: string.isRequired, - dir: oneOf(['ltr', 'rtl']), -}; - -StartTime.defaultProps = { - timezone: 'Europe/London', - locale: 'en-gb', - dir: 'ltr', -}; - -export default StartTime; diff --git a/packages/components/psammead-radio-schedule/src/StartTime/index.test.jsx b/packages/components/psammead-radio-schedule/src/StartTime/index.test.jsx deleted file mode 100644 index a5929cb51c..0000000000 --- a/packages/components/psammead-radio-schedule/src/StartTime/index.test.jsx +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react'; -import { shouldMatchSnapshot } from '@bbc/psammead-test-helpers'; -import { latin, arabic } from '@bbc/gel-foundations/scripts'; -import StartTime from './index'; - -const testUnixTimestamp = 1566914061212; - -describe('StartTime', () => { - shouldMatchSnapshot( - 'should render LTR correctly', - , - ); - - shouldMatchSnapshot( - 'should render RTL correctly', - , - ); -}); diff --git a/packages/components/psammead-radio-schedule/src/__snapshots__/index.test.jsx.snap b/packages/components/psammead-radio-schedule/src/__snapshots__/index.test.jsx.snap deleted file mode 100644 index 24bae4a033..0000000000 --- a/packages/components/psammead-radio-schedule/src/__snapshots__/index.test.jsx.snap +++ /dev/null @@ -1,2453 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`RadioSchedule should render ltr radio schedules correctly 1`] = ` -.emotion-1 { - padding: 0; - margin: 0; -} - -@media (max-width: 14.9375rem) { - .emotion-1 { - padding: 0 0.5rem; - } -} - -@media (min-width: 15rem) and (max-width: 24.9375rem) { - .emotion-1 { - padding: 0 0.5rem; - } -} - -@media (min-width: 25rem) and (max-width: 37.4375rem) { - .emotion-1 { - padding: 0 1rem; - } -} - -@supports (display: grid) { - .emotion-1 { - display: grid; - position: initial; - width: initial; - margin: 0; - } - - @media (max-width: 14.9375rem) { - .emotion-1 { - grid-template-columns: repeat(4, 1fr); - grid-column-end: span 4; - grid-column-gap: 0.5rem; - padding: 0 0.5rem; - } - } - - @media (min-width: 15rem) and (max-width: 24.9375rem) { - .emotion-1 { - grid-template-columns: repeat(4, 1fr); - grid-column-end: span 4; - grid-column-gap: 0.5rem; - padding: 0 0.5rem; - } - } - - @media (min-width: 25rem) and (max-width: 37.4375rem) { - .emotion-1 { - grid-template-columns: repeat(6, 1fr); - grid-column-end: span 6; - grid-column-gap: 0.5rem; - padding: 0 1rem; - } - } - - @media (min-width: 37.5rem) and (max-width: 62.9375rem) { - .emotion-1 { - grid-template-columns: repeat(6, 1fr); - grid-column-end: span 6; - grid-column-gap: 1rem; - } - } - - @media (min-width: 63rem) and (max-width: 79.9375rem) { - .emotion-1 { - grid-template-columns: repeat(8, 1fr); - grid-column-end: span 8; - grid-column-gap: 1rem; - } - } - - @media (min-width: 80rem) { - .emotion-1 { - grid-template-columns: repeat(8, 1fr); - grid-column-end: span 8; - grid-column-gap: 1rem; - } - } -} - -@media (max-width: 37.5rem) { - .emotion-1 { - padding: 0; - } -} - -.emotion-4 { - position: relative; - padding-bottom: 1rem; -} - -@media (max-width: 14.9375rem) { - .emotion-4 { - width: calc(4/4*(100% - 4 * 0.5rem) + 3 * 0.5rem ); - margin: 0 0.25rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 15rem) and (max-width: 24.9375rem) { - .emotion-4 { - width: calc(4/4*(100% - 4 * 0.5rem) + 3 * 0.5rem ); - margin: 0 0.25rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 25rem) and (max-width: 37.4375rem) { - .emotion-4 { - width: calc(6/6*(100% - 6 * 0.5rem) + 5 * 0.5rem ); - margin: 0 0.25rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 37.5rem) and (max-width: 62.9375rem) { - .emotion-4 { - width: calc(3/6*(100% - 6 * 1rem) + 2 * 1rem ); - margin: 0 0.5rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 63rem) and (max-width: 79.9375rem) { - .emotion-4 { - width: calc(2/8*(100% - 8 * 1rem) + 1 * 1rem ); - margin: 0 0.5rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 80rem) { - .emotion-4 { - width: calc(2/8*(100% - 8 * 1rem) + 1 * 1rem ); - margin: 0 0.5rem; - display: inline-block; - vertical-align: top; - } -} - -@supports (display: grid) { - .emotion-4 { - display: block; - width: initial; - margin: 0; - } - - @media (max-width: 14.9375rem) { - .emotion-4 { - grid-template-columns: repeat(4, 1fr); - grid-column-end: span 4; - } - } - - @media (min-width: 15rem) and (max-width: 24.9375rem) { - .emotion-4 { - grid-template-columns: repeat(4, 1fr); - grid-column-end: span 4; - } - } - - @media (min-width: 25rem) and (max-width: 37.4375rem) { - .emotion-4 { - grid-template-columns: repeat(6, 1fr); - grid-column-end: span 6; - } - } - - @media (min-width: 37.5rem) and (max-width: 62.9375rem) { - .emotion-4 { - grid-template-columns: repeat(3, 1fr); - grid-column-end: span 3; - } - } - - @media (min-width: 63rem) and (max-width: 79.9375rem) { - .emotion-4 { - grid-template-columns: repeat(2, 1fr); - grid-column-end: span 2; - } - } - - @media (min-width: 80rem) { - .emotion-4 { - grid-template-columns: repeat(2, 1fr); - grid-column-end: span 2; - } - } -} - -@supports (grid-template-columns: fit-content(200px)) { - .emotion-4 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - } -} - -.emotion-6 { - padding-bottom: 0.5rem; -} - -.emotion-8 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.emotion-10 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - padding-right: 0.25rem; -} - -.emotion-10>svg { - color: #5A5A5A; - margin: 0; - overflow: visible; -} - -.emotion-12 { - vertical-align: middle; - margin: 0 0.25rem; - color: #222222; - fill: currentColor; - width: 0.725rem; - height: 0.725rem; -} - -.emotion-14 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - width: 100%; -} - -.emotion-14>time { - color: #5A5A5A; - font-size: 0.75rem; - line-height: 1rem; - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-14>time { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-14>time { - font-size: 0.75rem; - line-height: 1rem; - } -} - -.emotion-14::after { - content: ''; - border-top: 0.0625rem solid #AEAEB5; - top: 1rem; - margin-left: 0.625rem; - width: 100%; -} - -.emotion-16 { - font-size: 0.875rem; - line-height: 1.125rem; - color: #6E6E73; - display: block; - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-16 { - font-size: 0.875rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-16 { - font-size: 0.8125rem; - line-height: 1rem; - } -} - -.emotion-18 { - padding-top: 0.5rem; - background-color: #FFFFFF; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - outline: 0.0625rem solid transparent; - height: 100%; -} - -.emotion-20 { - padding: 0 0.5rem; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} - -.emotion-22 { - font-family: ReithSerif,Helvetica,Arial,sans-serif; - font-weight: 500; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.25rem; - color: #222222; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-22 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-22 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -.emotion-24 { - position: static; - color: #222222; - -webkit-text-decoration: none; - text-decoration: none; - overflow-wrap: break-word; -} - -.emotion-24:before { - bottom: 0; - content: ''; - left: 0; - overflow: hidden; - position: absolute; - right: 0; - top: 0; - white-space: nowrap; - z-index: 1; -} - -.emotion-24:hover, -.emotion-24:focus { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-24:visited { - color: #6E6E73; -} - -.emotion-24:hover .emotion-33 { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-24:focus .emotion-33 { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-26 { - -webkit-clip-path: inset(100%); - clip-path: inset(100%); - clip: rect(1px, 1px, 1px, 1px); - height: 1px; - overflow: hidden; - position: absolute; - width: 1px; - margin: 0; -} - -.emotion-28 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 700; - font-style: normal; - color: #B80000; - display: inline-block; - margin-right: 0.5rem; -} - -.emotion-32 { - color: #3F3F42; - padding: 0.5rem 0; - display: inline-block; - width: 100%; - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.25rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-32 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-32 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -.emotion-36 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.875rem; - line-height: 1.125rem; - color: #6E6E73; - padding-bottom: 1rem; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-36 { - font-size: 0.875rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-36 { - font-size: 0.8125rem; - line-height: 1rem; - } -} - -.emotion-38 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.75rem; - line-height: 1rem; - padding: 0.5rem; - background-color: #B80000; - outline: 0.0625rem solid transparent; - color: #FFFFFF; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-38 { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-38 { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media screen and (-ms-high-contrast: active) { - .emotion-38 { - background-color: transparent; - outline: none; - } -} - -.emotion-40>svg { - color: #FFFFFF; - fill: currentColor; - width: 1.0625rem; - height: 0.75rem; - margin: 0; -} - -.emotion-42 { - vertical-align: middle; - margin: 0 0.25rem; - color: #222222; - fill: currentColor; - width: 0.8125rem; - height: 0.75rem; -} - -.emotion-44 { - padding-left: 0.5rem; -} - -.emotion-79 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.75rem; - line-height: 1rem; - padding: 0.5rem; - background-color: #222222; - outline: 0.0625rem solid transparent; - color: #FFFFFF; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-79 { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-79 { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media screen and (-ms-high-contrast: active) { - .emotion-79 { - background-color: transparent; - outline: none; - } -} - -.emotion-147 { - font-family: ReithSerif,Helvetica,Arial,sans-serif; - font-weight: 500; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.25rem; - color: #6E6E73; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-147 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-147 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -.emotion-151 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 700; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.25rem; - color: #11708C; - display: inline-block; - margin-right: 0.5rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-151 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-151 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -.emotion-155 { - color: #6E6E73; - padding: 0.5rem 0; - display: inline-block; - width: 100%; - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.25rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-155 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-155 { - font-size: 1rem; - line-height: 1.25rem; - } -} - -.emotion-161 { - font-family: ReithSans,Helvetica,Arial,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.75rem; - line-height: 1rem; - padding: 0.5rem; - background-color: #FFFFFF; - outline: 0.0625rem solid transparent; - color: #11708C; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-161 { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-161 { - font-size: 0.75rem; - line-height: 1rem; - } -} - -@media screen and (-ms-high-contrast: active) { - .emotion-161 { - background-color: transparent; - outline: none; - } -} - -.emotion-163>svg { - color: #11708C; - fill: currentColor; - width: 1.0625rem; - height: 0.75rem; - margin: 0; -} - -
-
-
  • -
    -
    - - - - -
    -
    -
    -
    -

    - - - - Listen Live, - - - - - Could a computer ever create better art than a human? - - , - 14:54 - , - - - 27 August 2019 - - - , Duration 1,00,00 - - - -

    -

    - The critic, author, poet and TV host was known for his witty commentary on international television. -

    -
    -
    - - - - -
    -
    -
  • -
  • -
    -
    - - - - -
    -
    -
    -
    -

    - - - - Listen, - - Could a computer ever create better art than a human? - - , - 14:54 - , - - - 27 August 2019 - - - , Duration 1,00,00 - - - -

    -

    - The critic, author, poet and TV host was known for his witty commentary on international television. -

    -
    -
    - - - - -
    -
    -
  • -
  • -
    -
    - - - - -
    -
    -
    -
    -

    - - - - Listen, - - Could a computer ever create better art than a human? - - , - 14:54 - , - - - 27 August 2019 - - - , Duration 1,00,00 - - - -

    -

    - The critic, author, poet and TV host was known for his witty commentary on international television. -

    -
    -
    - - - - -
    -
    -
  • -
  • -
    -
    - - - - -
    -
    -
    -
    -

    - - - Listen Next, - - - Could a computer ever create better art than a human? - - , - 14:54 - , - - - 27 August 2019 - - - , Duration 1,00,00 - - -

    -

    - The critic, author, poet and TV host was known for his witty commentary on international television. -

    -
    -
    - - - - -
    -
    -
  • -
    -
    -`; - -exports[`RadioSchedule should render rtl radio schedules correctly 1`] = ` -.emotion-1 { - padding: 0; - margin: 0; -} - -@media (max-width: 14.9375rem) { - .emotion-1 { - padding: 0 0.5rem; - } -} - -@media (min-width: 15rem) and (max-width: 24.9375rem) { - .emotion-1 { - padding: 0 0.5rem; - } -} - -@media (min-width: 25rem) and (max-width: 37.4375rem) { - .emotion-1 { - padding: 0 1rem; - } -} - -@supports (display: grid) { - .emotion-1 { - display: grid; - position: initial; - width: initial; - margin: 0; - } - - @media (max-width: 14.9375rem) { - .emotion-1 { - grid-template-columns: repeat(4, 1fr); - grid-column-end: span 4; - grid-column-gap: 0.5rem; - padding: 0 0.5rem; - } - } - - @media (min-width: 15rem) and (max-width: 24.9375rem) { - .emotion-1 { - grid-template-columns: repeat(4, 1fr); - grid-column-end: span 4; - grid-column-gap: 0.5rem; - padding: 0 0.5rem; - } - } - - @media (min-width: 25rem) and (max-width: 37.4375rem) { - .emotion-1 { - grid-template-columns: repeat(6, 1fr); - grid-column-end: span 6; - grid-column-gap: 0.5rem; - padding: 0 1rem; - } - } - - @media (min-width: 37.5rem) and (max-width: 62.9375rem) { - .emotion-1 { - grid-template-columns: repeat(6, 1fr); - grid-column-end: span 6; - grid-column-gap: 1rem; - } - } - - @media (min-width: 63rem) and (max-width: 79.9375rem) { - .emotion-1 { - grid-template-columns: repeat(8, 1fr); - grid-column-end: span 8; - grid-column-gap: 1rem; - } - } - - @media (min-width: 80rem) { - .emotion-1 { - grid-template-columns: repeat(8, 1fr); - grid-column-end: span 8; - grid-column-gap: 1rem; - } - } -} - -@media (max-width: 37.5rem) { - .emotion-1 { - padding: 0; - } -} - -.emotion-4 { - position: relative; - padding-bottom: 1rem; -} - -@media (max-width: 14.9375rem) { - .emotion-4 { - width: calc(4/4*(100% - 4 * 0.5rem) + 3 * 0.5rem ); - margin: 0 0.25rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 15rem) and (max-width: 24.9375rem) { - .emotion-4 { - width: calc(4/4*(100% - 4 * 0.5rem) + 3 * 0.5rem ); - margin: 0 0.25rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 25rem) and (max-width: 37.4375rem) { - .emotion-4 { - width: calc(6/6*(100% - 6 * 0.5rem) + 5 * 0.5rem ); - margin: 0 0.25rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 37.5rem) and (max-width: 62.9375rem) { - .emotion-4 { - width: calc(3/6*(100% - 6 * 1rem) + 2 * 1rem ); - margin: 0 0.5rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 63rem) and (max-width: 79.9375rem) { - .emotion-4 { - width: calc(2/8*(100% - 8 * 1rem) + 1 * 1rem ); - margin: 0 0.5rem; - display: inline-block; - vertical-align: top; - } -} - -@media (min-width: 80rem) { - .emotion-4 { - width: calc(2/8*(100% - 8 * 1rem) + 1 * 1rem ); - margin: 0 0.5rem; - display: inline-block; - vertical-align: top; - } -} - -@supports (display: grid) { - .emotion-4 { - display: block; - width: initial; - margin: 0; - } - - @media (max-width: 14.9375rem) { - .emotion-4 { - grid-template-columns: repeat(4, 1fr); - grid-column-end: span 4; - } - } - - @media (min-width: 15rem) and (max-width: 24.9375rem) { - .emotion-4 { - grid-template-columns: repeat(4, 1fr); - grid-column-end: span 4; - } - } - - @media (min-width: 25rem) and (max-width: 37.4375rem) { - .emotion-4 { - grid-template-columns: repeat(6, 1fr); - grid-column-end: span 6; - } - } - - @media (min-width: 37.5rem) and (max-width: 62.9375rem) { - .emotion-4 { - grid-template-columns: repeat(3, 1fr); - grid-column-end: span 3; - } - } - - @media (min-width: 63rem) and (max-width: 79.9375rem) { - .emotion-4 { - grid-template-columns: repeat(2, 1fr); - grid-column-end: span 2; - } - } - - @media (min-width: 80rem) { - .emotion-4 { - grid-template-columns: repeat(2, 1fr); - grid-column-end: span 2; - } - } -} - -@supports (grid-template-columns: fit-content(200px)) { - .emotion-4 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - } -} - -.emotion-6 { - padding-bottom: 0.5rem; -} - -.emotion-8 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; -} - -.emotion-10 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - padding-left: 0.25rem; -} - -.emotion-10>svg { - color: #5A5A5A; - margin: 0; - overflow: visible; -} - -.emotion-12 { - vertical-align: middle; - margin: 0 0.25rem; - color: #222222; - fill: currentColor; - width: 0.725rem; - height: 0.725rem; -} - -.emotion-14 { - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-align-items: center; - -webkit-box-align: center; - -ms-flex-align: center; - align-items: center; - -webkit-flex-direction: row; - -ms-flex-direction: row; - flex-direction: row; - width: 100%; -} - -.emotion-14>time { - color: #5A5A5A; - font-size: 0.75rem; - line-height: 1.125rem; - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-14>time { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-14>time { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -.emotion-14::after { - content: ''; - border-top: 0.0625rem solid #AEAEB5; - top: 1.0625rem; - margin-right: 0.625rem; - width: 100%; -} - -.emotion-16 { - font-size: 0.875rem; - line-height: 1.25rem; - color: #6E6E73; - display: block; - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-16 { - font-size: 0.875rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-16 { - font-size: 0.8125rem; - line-height: 1.25rem; - } -} - -.emotion-18 { - padding-top: 0.5rem; - background-color: #FFFFFF; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; - -webkit-flex-direction: column; - -ms-flex-direction: column; - flex-direction: column; - outline: 0.0625rem solid transparent; - height: 100%; -} - -.emotion-20 { - padding: 0 0.5rem; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; - -ms-flex-positive: 1; - flex-grow: 1; -} - -.emotion-22 { - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 700; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.5rem; - color: #222222; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-22 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-22 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -.emotion-24 { - position: static; - color: #222222; - -webkit-text-decoration: none; - text-decoration: none; - overflow-wrap: break-word; -} - -.emotion-24:before { - bottom: 0; - content: ''; - left: 0; - overflow: hidden; - position: absolute; - right: 0; - top: 0; - white-space: nowrap; - z-index: 1; -} - -.emotion-24:hover, -.emotion-24:focus { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-24:visited { - color: #6E6E73; -} - -.emotion-24:hover .emotion-33 { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-24:focus .emotion-33 { - -webkit-text-decoration: underline; - text-decoration: underline; -} - -.emotion-26 { - -webkit-clip-path: inset(100%); - clip-path: inset(100%); - clip: rect(1px, 1px, 1px, 1px); - height: 1px; - overflow: hidden; - position: absolute; - width: 1px; - margin: 0; -} - -.emotion-28 { - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 700; - font-style: normal; - color: #B80000; - display: inline-block; - margin-left: 0.5rem; -} - -.emotion-32 { - color: #3F3F42; - padding: 0.5rem 0; - display: inline-block; - width: 100%; - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.5rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-32 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-32 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -.emotion-36 { - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.875rem; - line-height: 1.25rem; - color: #6E6E73; - padding-bottom: 1rem; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-36 { - font-size: 0.875rem; - line-height: 1.25rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-36 { - font-size: 0.8125rem; - line-height: 1.25rem; - } -} - -.emotion-38 { - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.75rem; - line-height: 1.125rem; - padding: 0.5rem; - background-color: #B80000; - outline: 0.0625rem solid transparent; - color: #FFFFFF; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-38 { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-38 { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media screen and (-ms-high-contrast: active) { - .emotion-38 { - background-color: transparent; - outline: none; - } -} - -.emotion-40>svg { - color: #FFFFFF; - fill: currentColor; - width: 1.0625rem; - height: 0.75rem; - margin: 0; -} - -.emotion-42 { - vertical-align: middle; - margin: 0 0.25rem; - color: #222222; - fill: currentColor; - width: 0.8125rem; - height: 0.75rem; -} - -.emotion-44 { - padding-right: 0.5rem; -} - -.emotion-79 { - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.75rem; - line-height: 1.125rem; - padding: 0.5rem; - background-color: #222222; - outline: 0.0625rem solid transparent; - color: #FFFFFF; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-79 { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-79 { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media screen and (-ms-high-contrast: active) { - .emotion-79 { - background-color: transparent; - outline: none; - } -} - -.emotion-147 { - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 700; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.5rem; - color: #6E6E73; - margin: 0; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-147 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-147 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -.emotion-151 { - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 700; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.5rem; - color: #11708C; - display: inline-block; - margin-left: 0.5rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-151 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-151 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -.emotion-155 { - color: #6E6E73; - padding: 0.5rem 0; - display: inline-block; - width: 100%; - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.9375rem; - line-height: 1.5rem; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-155 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-155 { - font-size: 1rem; - line-height: 1.5rem; - } -} - -.emotion-161 { - font-family: "BBC Reith Qalam",Arial,Verdana,Geneva,Helvetica,sans-serif; - font-weight: 400; - font-style: normal; - font-size: 0.75rem; - line-height: 1.125rem; - padding: 0.5rem; - background-color: #FFFFFF; - outline: 0.0625rem solid transparent; - color: #11708C; -} - -@media (min-width: 20rem) and (max-width: 37.4375rem) { - .emotion-161 { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media (min-width: 37.5rem) { - .emotion-161 { - font-size: 0.75rem; - line-height: 1.125rem; - } -} - -@media screen and (-ms-high-contrast: active) { - .emotion-161 { - background-color: transparent; - outline: none; - } -} - -.emotion-163>svg { - color: #11708C; - fill: currentColor; - width: 1.0625rem; - height: 0.75rem; - margin: 0; -} - -
    -
    -
  • -
    -
    - - - - -
    -
    -
    -
    -

    - - - - Listen Live, - - - - - لماذا يخجل البعض من اسم قريته في مصر؟ - - , - ١٤:٥٤ - , - - - ٢٧ أغسطس ٢٠١٩ - - - , المدة الزمنية ١،٠٠،٠٠ - - - -

    -

    - هناك وقائع عدة تتسم بالسخرية والجدل والتنمر، ضد أهل القرية الذين أصابهم الغضب والسخط مما دفعهم إلى تقديم طلب لتغيير اسم قريتهم. -

    -
    -
    - - - - -
    -
    -
  • -
  • -
    -
    - - - - -
    -
    -
    -
    -

    - - - - Listen, - - لماذا يخجل البعض من اسم قريته في مصر؟ - - , - ١٤:٥٤ - , - - - ٢٧ أغسطس ٢٠١٩ - - - , المدة الزمنية ١،٠٠،٠٠ - - - -

    -

    - هناك وقائع عدة تتسم بالسخرية والجدل والتنمر، ضد أهل القرية الذين أصابهم الغضب والسخط مما دفعهم إلى تقديم طلب لتغيير اسم قريتهم. -

    -
    -
    - - - - -
    -
    -
  • -
  • -
    -
    - - - - -
    -
    -
    -
    -

    - - - - Listen, - - لماذا يخجل البعض من اسم قريته في مصر؟ - - , - ١٤:٥٤ - , - - - ٢٧ أغسطس ٢٠١٩ - - - , المدة الزمنية ١،٠٠،٠٠ - - - -

    -

    - هناك وقائع عدة تتسم بالسخرية والجدل والتنمر، ضد أهل القرية الذين أصابهم الغضب والسخط مما دفعهم إلى تقديم طلب لتغيير اسم قريتهم. -

    -
    -
    - - - - -
    -
    -
  • -
  • -
    -
    - - - - -
    -
    -
    -
    -

    - - - Listen Next, - - - لماذا يخجل البعض من اسم قريته في مصر؟ - - , - ١٤:٥٤ - , - - - ٢٧ أغسطس ٢٠١٩ - - - , المدة الزمنية ١،٠٠،٠٠ - - -

    -

    - هناك وقائع عدة تتسم بالسخرية والجدل والتنمر، ضد أهل القرية الذين أصابهم الغضب والسخط مما دفعهم إلى تقديم طلب لتغيير اسم قريتهم. -

    -
    -
    - - - - -
    -
    -
  • -
    -
    -`; diff --git a/packages/components/psammead-radio-schedule/src/index.jsx b/packages/components/psammead-radio-schedule/src/index.jsx deleted file mode 100644 index 034bb8d1f0..0000000000 --- a/packages/components/psammead-radio-schedule/src/index.jsx +++ /dev/null @@ -1,164 +0,0 @@ -import React from 'react'; -import styled from '@emotion/styled'; -import { GEL_GROUP_3_SCREEN_WIDTH_MIN } from '@bbc/gel-foundations/breakpoints'; -import { GEL_SPACING, GEL_SPACING_DBL } from '@bbc/gel-foundations/spacings'; -import { grid } from '@bbc/psammead-styles/detection'; -import Grid from '@bbc/psammead-grid'; -import { - arrayOf, - elementType, - number, - oneOf, - shape, - string, - oneOfType, -} from 'prop-types'; -import { scriptPropType } from '@bbc/gel-foundations/prop-types'; -import ProgramCard from './ProgramCard'; -import StartTime from './StartTime'; - -const StartTimeWrapper = styled.div` - padding-bottom: ${GEL_SPACING}; -`; - -// Reset default of
      style -const StyledGrid = styled(Grid)` - padding: 0; - margin: 0; - @media (max-width: ${GEL_GROUP_3_SCREEN_WIDTH_MIN}) { - padding: 0; - } -`; - -// Using flex-box on browsers that do not support grid will break grid fallback defined in psammead-grid -const StyledFlexGrid = styled(Grid)` - @supports (${grid}) { - display: flex; - flex-direction: column; - } - position: relative; - padding-bottom: ${GEL_SPACING_DBL}; -`; - -const renderScheduleItem = ({ dir, program, ...props }) => { - const { startTime } = program; - const { service, script, locale, timezone } = props; - return ( - <> - - - - - - ); -}; - -const schedulesGridProps = { - enableGelGutters: true, - columns: { - group0: 4, - group1: 4, - group2: 6, - group3: 6, - group4: 8, - group5: 8, - }, - margins: { - group0: true, - group1: true, - group2: true, - }, -}; - -const programGridProps = { - item: true, - columns: { - group0: 4, - group1: 4, - group2: 6, - group3: 3, - group4: 2, - group5: 2, - }, -}; - -/* -Currently, we are passing a list of schedules to this component and mapping -through the list to render a star-time and program-card, inside a gird. -We intend to move the map functionality out of psammead in a future iteration. -*/ -const RadioSchedule = ({ schedules, dir, ...props }) => ( - - {schedules.map(({ id, ...program }) => ( - - {renderScheduleItem({ ...props, dir, program })} - - ))} - -); - -const programPropTypes = shape({ - state: string.isRequired, - startTime: number.isRequired, - link: string.isRequired, - brandTitle: string.isRequired, - summary: string, - duration: string.isRequired, -}); - -const sharedProps = { - timezone: string, - locale: string, - service: string.isRequired, - script: shape(scriptPropType).isRequired, - nextLabel: string.isRequired, - liveLabel: string.isRequired, - durationLabel: string.isRequired, - dir: oneOf(['rtl', 'ltr']), -}; - -renderScheduleItem.propTypes = { - program: programPropTypes.isRequired, - ...sharedProps, - linkComponent: oneOfType([elementType, string]), - linkComponentAttr: string, -}; - -renderScheduleItem.defaultProps = { - linkComponent: 'a', - linkComponentAttr: 'href', -}; - -RadioSchedule.propTypes = { - schedules: arrayOf(programPropTypes).isRequired, - ...sharedProps, - linkComponent: oneOfType([elementType, string]), - linkComponentAttr: string, -}; - -/* eslint-disable react/default-props-match-prop-types */ -RadioSchedule.defaultProps = { - dir: 'ltr', - timezone: 'Europe/London', - locale: 'en-gb', - linkComponent: 'a', - linkComponentAttr: 'href', -}; - -export default RadioSchedule; diff --git a/packages/components/psammead-radio-schedule/src/index.stories.jsx b/packages/components/psammead-radio-schedule/src/index.stories.jsx deleted file mode 100644 index 93d0e796b8..0000000000 --- a/packages/components/psammead-radio-schedule/src/index.stories.jsx +++ /dev/null @@ -1,76 +0,0 @@ -import React from 'react'; -import { storiesOf } from '@storybook/react'; -import { withKnobs } from '@storybook/addon-knobs'; -import { - withServicesKnob, - buildRTLSubstories, -} from '@bbc/psammead-storybook-helpers'; -import { - renderProgramCard, - renderRadioSchedule, - uniqueStates, -} from './testHelpers/helper'; -import notes from '../README.md'; -import StartTime from './StartTime'; - -const storiesUnixTimestamp = 1566914061212; - -const RADIO_SCHEDULE_STORIES = 'Components/RadioSchedule'; -const radioScheduleStories = storiesOf(RADIO_SCHEDULE_STORIES, module) - .addDecorator(withKnobs) - .addDecorator(withServicesKnob()); - -radioScheduleStories.add('default', props => renderRadioSchedule(props), { - notes, -}); - -radioScheduleStories.add( - 'Schedule with different heights', - props => renderRadioSchedule({ ...props, withLongSummary: true }), - { notes }, -); - -buildRTLSubstories(RADIO_SCHEDULE_STORIES, { - include: ['default'], -}); - -const PROGRAM_CARD_STORIES = 'Components/RadioSchedule/ProgramCard'; -const programCardStories = storiesOf(PROGRAM_CARD_STORIES, module).addDecorator( - withKnobs, -); - -uniqueStates.forEach(state => { - programCardStories.add( - `${state}`, - ({ service }) => - renderProgramCard({ - service, - state, - }), - { notes }, - ); -}); - -buildRTLSubstories(PROGRAM_CARD_STORIES, { - include: [...uniqueStates], -}); - -storiesOf('Components/RadioSchedule/StartTime', module) - .addDecorator(withKnobs) - .addDecorator(withServicesKnob()) - .add( - 'default', - ({ locale, script, service, dir, timezone = 'GMT' }) => { - return ( - - ); - }, - { notes }, - ); diff --git a/packages/components/psammead-radio-schedule/src/index.test.jsx b/packages/components/psammead-radio-schedule/src/index.test.jsx deleted file mode 100644 index 437fd0166c..0000000000 --- a/packages/components/psammead-radio-schedule/src/index.test.jsx +++ /dev/null @@ -1,34 +0,0 @@ -import { render } from '@testing-library/react'; -import { shouldMatchSnapshot } from '@bbc/psammead-test-helpers'; -import { arabic } from '@bbc/gel-foundations/scripts'; -import { renderRadioSchedule } from './testHelpers/helper'; - -describe('RadioSchedule', () => { - shouldMatchSnapshot( - 'should render ltr radio schedules correctly', - renderRadioSchedule({}), - ); - - shouldMatchSnapshot( - 'should render rtl radio schedules correctly', - renderRadioSchedule({ - service: 'arabic', - script: arabic, - dir: 'rtl', - locale: 'ar', - selectedService: 'arabic', - }), - ); - - it('should render with passed component', () => { - const { container } = render( - renderRadioSchedule({ - linkComponent: 'aside', - linkComponentAttr: 'to', - }), - ); - expect( - container.getElementsByTagName('aside')[0].getAttribute('to'), - ).toEqual('/news/articles/cn7k01xp8kxo'); - }); -}); diff --git a/packages/components/psammead-radio-schedule/src/testHelpers/helper.jsx b/packages/components/psammead-radio-schedule/src/testHelpers/helper.jsx deleted file mode 100644 index a6b0c50a62..0000000000 --- a/packages/components/psammead-radio-schedule/src/testHelpers/helper.jsx +++ /dev/null @@ -1,111 +0,0 @@ -/* eslint-disable react/prop-types */ -import { TEXT_VARIANTS } from '@bbc/psammead-storybook-helpers'; -import { arabic, latin } from '@bbc/gel-foundations/scripts'; -import { boolean } from '@storybook/addon-knobs'; -import React from 'react'; -import ProgramCard from '../ProgramCard'; -import RadioSchedule from '../index'; - -// Will remove and clean up in future PRs -export const stateTypes = ['live', 'onDemand', 'onDemand', 'next']; -export const uniqueStates = ['live', 'onDemand', 'next']; - -const listenLabelTranslations = { - live: 'Listen Live', - next: 'Listen Next', - onDemand: 'Listen', -}; - -const getSchedule = (service, withLongSummary) => { - const { text, articlePath, longText, timezone } = TEXT_VARIANTS[service]; - const programDurationLabel = - service === 'arabic' ? 'المدة الزمنية %duration%' : 'Duration %duration%'; - - return stateTypes.map((state, index) => ({ - id: index, - state, - startTime: 1566914061212, - link: articlePath, - brandTitle: text, - summary: - withLongSummary && state === 'live' - ? `${longText} ${longText}` - : longText, - duration: 'PT1H', - durationLabel: programDurationLabel, - timezone, - })); -}; - -export const renderProgramCard = ({ - state, - service = 'news', - duration = 'PT30M', - durationLabel = 'Duration %duration%', - startTime = 1566914061212, - displaySummary = boolean('show summary', true), - linkComponent = 'a', - linkComponentAttr = 'href', -}) => { - const { text, articlePath, longText, dir, locale, timezone } = TEXT_VARIANTS[ - service - ]; - - const props = { - service, - script: dir === 'rtl' ? arabic : latin, - durationLabel: dir === 'rtl' ? 'المدة الزمنية %duration%' : durationLabel, - nextLabel: dir === 'rtl' ? 'مباشر' : 'NEXT', - liveLabel: dir === 'rtl' ? 'مباشر' : 'LIVE', - listenLabelTranslations, - timezone, - locale, - linkComponent, - linkComponentAttr, - }; - - const program = { - state, - link: articlePath, - startTime, - brandTitle: text, - summary: displaySummary ? longText : null, - duration, - }; - - return ; -}; - -export const renderRadioSchedule = ({ - service = 'news', - locale = 'en-gb', - timezone = 'Europe/London', - script = latin, - dir = 'ltr', - withLongSummary = false, - selectedService = 'news', - linkComponent = 'a', - linkComponentAttr = 'href', -}) => { - const nextLabel = dir === 'rtl' ? 'مباشر' : 'NEXT'; - const liveLabel = dir === 'rtl' ? 'مباشر' : 'LIVE'; - const durationLabel = - dir === 'rtl' ? 'المدة الزمنية %duration%' : 'Duration %duration%'; - - return ( - - ); -}; diff --git a/packages/components/psammead-radio-schedule/src/utilities/index.js b/packages/components/psammead-radio-schedule/src/utilities/index.js deleted file mode 100644 index ab0e366ff9..0000000000 --- a/packages/components/psammead-radio-schedule/src/utilities/index.js +++ /dev/null @@ -1,48 +0,0 @@ -import { formatDuration } from '@bbc/psammead-timestamp-container/utilities'; -import { - C_KINGFISHER, - C_POSTBOX, - C_EBON, - C_SHADOW, - C_WHITE, - C_METAL, -} from '@bbc/psammead-styles/colours'; - -export const programStateConfig = { - live: { - backgroundColor: C_POSTBOX, - headerTextColor: C_EBON, - titleColor: C_SHADOW, - durationColor: C_WHITE, - }, - next: { - backgroundColor: C_WHITE, - headerTextColor: C_METAL, - titleColor: C_METAL, - durationColor: C_KINGFISHER, - }, - onDemand: { - backgroundColor: C_EBON, - headerTextColor: C_EBON, - titleColor: C_SHADOW, - durationColor: C_WHITE, - }, -}; - -const getDurationFormat = (duration, separator) => { - const timeSections = ['mm', 'ss']; - if (duration.includes('H')) { - timeSections.unshift('h'); - } - return timeSections.join(separator); -}; - -const durationDictionary = ({ duration = '', separator = ',', locale }) => ({ - '%duration%': formatDuration({ - duration, - format: getDurationFormat(duration, separator), - locale, - }), -}); - -export default durationDictionary; diff --git a/packages/components/psammead-radio-schedule/src/utilities/index.test.js b/packages/components/psammead-radio-schedule/src/utilities/index.test.js deleted file mode 100644 index e9849a5ff3..0000000000 --- a/packages/components/psammead-radio-schedule/src/utilities/index.test.js +++ /dev/null @@ -1,50 +0,0 @@ -import detokenise from '@bbc/psammead-detokeniser'; -import durationDictionary from '.'; - -describe('durationDictionary', () => { - describe('creates a valid duration dictionary', () => { - it('when duration and locale are valid', () => { - expect( - durationDictionary({ duration: 'PT1H30M', locale: 'en-gb' }), - ).toEqual({ - '%duration%': '1,30,00', - }); - }); - it('and maps token to key correctly when detokenised', () => { - expect( - detokenise( - 'Duration %duration%', - durationDictionary({ duration: 'PT1H30M', locale: 'en-gb' }), - ), - ).toEqual('Duration 1,30,00'); - }); - it('and displays duration with a specified separator', () => { - expect( - detokenise( - 'Duration %duration%', - durationDictionary({ - duration: 'PT1H30M', - separator: ':', - locale: 'en-gb', - }), - ), - ).toEqual('Duration 1:30:00'); - }); - it('but sets duration as 00,00 when a duration string is invalid', () => { - expect( - detokenise( - 'Duration %duration%', - durationDictionary({ duration: '3minutes', locale: 'en-gb' }), - ), - ).toEqual('Duration 00,00'); - }); - it('but uses an empty string as duration fallback', () => { - expect( - detokenise( - 'Duration %duration%', - durationDictionary({ locale: 'en-gb' }), - ), - ).toEqual('Duration 00,00'); - }); - }); -}); diff --git a/packages/components/psammead-radio-schedule/startTime/package.json b/packages/components/psammead-radio-schedule/startTime/package.json deleted file mode 100644 index 9b56629b7c..0000000000 --- a/packages/components/psammead-radio-schedule/startTime/package.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "name": "@bbc/psammead-radio-schedule/startTime", - "private": true, - "main": "../dist/StartTime", - "module": "../esm/StartTime", - "sideEffects": false - }