@royaloperahouse/chord 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +82 -0
- package/dist/chord.cjs.development.js +3611 -0
- package/dist/chord.cjs.development.js.map +1 -0
- package/dist/chord.cjs.production.min.js +2 -0
- package/dist/chord.cjs.production.min.js.map +1 -0
- package/dist/chord.esm.js +3588 -0
- package/dist/chord.esm.js.map +1 -0
- package/dist/components/atoms/Account/Account.d.ts +3 -0
- package/dist/components/atoms/Account/index.d.ts +2 -0
- package/dist/components/atoms/Basket/Basket.d.ts +3 -0
- package/dist/components/atoms/Basket/Basket.style.d.ts +5 -0
- package/dist/components/atoms/Basket/index.d.ts +2 -0
- package/dist/components/atoms/Buttons/Button.d.ts +4 -0
- package/dist/components/atoms/Buttons/Button.style.d.ts +3 -0
- package/dist/components/atoms/Buttons/ButtonIconWrapper.style.d.ts +2 -0
- package/dist/components/atoms/Buttons/Primary/PrimaryButton.d.ts +4 -0
- package/dist/components/atoms/Buttons/Primary/PrimaryButtonWrapper.style.d.ts +4 -0
- package/dist/components/atoms/Buttons/Secondary/SecondaryButton.d.ts +4 -0
- package/dist/components/atoms/Buttons/Secondary/SecondaryButtonWrapper.style.d.ts +4 -0
- package/dist/components/atoms/Buttons/Tertiary/TertiaryButton.d.ts +4 -0
- package/dist/components/atoms/Buttons/Tertiary/TertiaryButton.style.d.ts +4 -0
- package/dist/components/atoms/Buttons/index.d.ts +4 -0
- package/dist/components/atoms/Dropdown/Dropdown.d.ts +3 -0
- package/dist/components/atoms/Dropdown/Dropdown.style.d.ts +4 -0
- package/dist/components/atoms/Dropdown/index.d.ts +2 -0
- package/dist/components/atoms/Grid/Grid.d.ts +2 -0
- package/dist/components/atoms/Grid/GridItem.d.ts +3 -0
- package/dist/components/atoms/Grid/index.d.ts +3 -0
- package/dist/components/atoms/Heading/Heading.d.ts +3 -0
- package/dist/components/atoms/Heading/Heading.style.d.ts +3 -0
- package/dist/components/atoms/Heading/index.d.ts +2 -0
- package/dist/components/atoms/Icons/Icons.d.ts +4 -0
- package/dist/components/atoms/Icons/Icons.style.d.ts +9 -0
- package/dist/components/atoms/Icons/StorybookSupport/Iconography.d.ts +10 -0
- package/dist/components/atoms/Icons/StorybookSupport/IconsDiv.style.d.ts +2 -0
- package/dist/components/atoms/Icons/SvgIcons/12px/Remove.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/12px/Tick.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Actions/AddToMyList.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Actions/BookTickets.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Actions/ChooseDates.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Actions/EditMyList.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Actions/Filter.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Actions/FindAScreening.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Actions/OnMyList.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Actions/Reminder.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Actions/Subscribe.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Actions/Watch.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Arrows/Arrow.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Arrows/CarouselArrow.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Arrows/DropdownArrow.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Descriptors/Cinema.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Descriptors/Clock.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Descriptors/CreditCard.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Descriptors/Email.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Descriptors/Info.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Descriptors/List.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Descriptors/Location.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Descriptors/PDF.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Descriptors/Phone.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Descriptors/Print.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Descriptors/Secure.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Descriptors/Tickets.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Logos/Social/Facebook.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Logos/Social/Instagram.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Logos/Social/Tiktok.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Logos/Social/Twitter.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Logos/Social/Youtube.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Logos/Sponsors/Sponsor.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Navigation/BalletAndDance.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Navigation/Basket.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Navigation/BasketFull.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Navigation/Home.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Navigation/LiveStream.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Navigation/Menu.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Navigation/OperaAndMusic.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Navigation/Search.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Navigation/Settings.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Navigation/User.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Navigation/UserSignedIn.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Text/Delete.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Text/Shift.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Text/Space.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Utility/Close.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Utility/Confirm.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Utility/Detract.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Utility/Expand.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Utility/ExternalLink.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Utility/GridView.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Utility/ListView.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Utility/Refresh.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Video/AudioDescription.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Video/Back10.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Video/Clips.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Video/Forward10.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Video/FullScreen.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Video/Minimise.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Video/Muted.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Video/Pause.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Video/Play.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Video/Restart.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Video/Subtitles.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Video/Trailer.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Video/Volume.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/index.d.ts +71 -0
- package/dist/components/atoms/Icons/index.d.ts +2 -0
- package/dist/components/atoms/Image/Image.d.ts +38 -0
- package/dist/components/atoms/ImageAspectRatioWrapper/ImageAspectRatioWrapper.d.ts +3 -0
- package/dist/components/atoms/ImageAspectRatioWrapper/index.d.ts +2 -0
- package/dist/components/atoms/IndividualListing/IndividualListing.d.ts +3 -0
- package/dist/components/atoms/IndividualListing/IndividualListing.style.d.ts +2 -0
- package/dist/components/atoms/IndividualListing/index.d.ts +2 -0
- package/dist/components/atoms/Logo/Logo.d.ts +3 -0
- package/dist/components/atoms/Logo/Logo.style.d.ts +6 -0
- package/dist/components/atoms/Logo/index.d.ts +2 -0
- package/dist/components/atoms/Search/Search.d.ts +3 -0
- package/dist/components/atoms/Search/Search.style.d.ts +3 -0
- package/dist/components/atoms/Search/index.d.ts +2 -0
- package/dist/components/atoms/SectionSplitter/SectionSplitter.d.ts +3 -0
- package/dist/components/atoms/SectionSplitter/SectionSplitter.style.d.ts +2 -0
- package/dist/components/atoms/SectionSplitter/index.d.ts +2 -0
- package/dist/components/atoms/Sponsorship/Sponsorship.d.ts +4 -0
- package/dist/components/atoms/Sponsorship/index.d.ts +2 -0
- package/dist/components/atoms/Tab/Tab.d.ts +3 -0
- package/dist/components/atoms/Tab/Tab.style.d.ts +3 -0
- package/dist/components/atoms/Tab/index.d.ts +2 -0
- package/dist/components/atoms/TextLink/TextLink.d.ts +4 -0
- package/dist/components/atoms/TextLink/TextLink.style.d.ts +3 -0
- package/dist/components/atoms/TextLink/index.d.ts +2 -0
- package/dist/components/atoms/TypeTags/TypeTags.d.ts +3 -0
- package/dist/components/atoms/TypeTags/TypeTags.style.d.ts +2 -0
- package/dist/components/atoms/TypeTags/index.d.ts +2 -0
- package/dist/components/atoms/index.d.ts +9 -0
- package/dist/components/index.d.ts +6 -0
- package/dist/components/molecules/ContactNewsletter/ContactNewsletter.d.ts +4 -0
- package/dist/components/molecules/ContactNewsletter/ContactNewsletter.style.d.ts +8 -0
- package/dist/components/molecules/ContactNewsletter/index.d.ts +2 -0
- package/dist/components/molecules/Editorial/Editorial.d.ts +4 -0
- package/dist/components/molecules/Editorial/Editorial.style.d.ts +6 -0
- package/dist/components/molecules/Editorial/index.d.ts +2 -0
- package/dist/components/molecules/NavTop/NavTop.d.ts +3 -0
- package/dist/components/molecules/NavTop/NavTop.style.d.ts +1 -0
- package/dist/components/molecules/NavTop/index.d.ts +2 -0
- package/dist/components/molecules/PeopleListing/PeopleListing.d.ts +3 -0
- package/dist/components/molecules/PeopleListing/PeopleListing.style.d.ts +2 -0
- package/dist/components/molecules/PeopleListing/index.d.ts +2 -0
- package/dist/components/molecules/PolicyLinks/PolicyLinks.d.ts +4 -0
- package/dist/components/molecules/PolicyLinks/PolicyLinks.style.d.ts +3 -0
- package/dist/components/molecules/PolicyLinks/index.d.ts +2 -0
- package/dist/components/molecules/PromoWithTitle/PromoWithTitle.d.ts +4 -0
- package/dist/components/molecules/PromoWithTitle/PromoWithTitle.style.d.ts +8 -0
- package/dist/components/molecules/PromoWithTitle/index.d.ts +2 -0
- package/dist/components/molecules/SearchBar/SearchBar.d.ts +3 -0
- package/dist/components/molecules/SearchBar/SearchBar.style.d.ts +5 -0
- package/dist/components/molecules/SearchBar/index.d.ts +2 -0
- package/dist/components/molecules/SectionTitle/SectionTitle.d.ts +3 -0
- package/dist/components/molecules/SectionTitle/SectionTitle.style.d.ts +2 -0
- package/dist/components/molecules/SectionTitle/index.d.ts +2 -0
- package/dist/components/molecules/Tabs/Tabs.d.ts +3 -0
- package/dist/components/molecules/Tabs/Tabs.style.d.ts +5 -0
- package/dist/components/molecules/Tabs/index.d.ts +2 -0
- package/dist/components/molecules/TextOnly/TextOnly.d.ts +4 -0
- package/dist/components/molecules/TextOnly/TextOnly.style.d.ts +1 -0
- package/dist/components/molecules/TextOnly/index.d.ts +2 -0
- package/dist/components/molecules/index.d.ts +6 -0
- package/dist/components/organisms/Footer/Footer.d.ts +4 -0
- package/dist/components/organisms/Footer/Footer.style.d.ts +6 -0
- package/dist/components/organisms/Footer/index.d.ts +2 -0
- package/dist/components/organisms/Navigation/Navigation.d.ts +3 -0
- package/dist/components/organisms/Navigation/Navigation.style.d.ts +7 -0
- package/dist/components/organisms/Navigation/index.d.ts +2 -0
- package/dist/components/organisms/index.d.ts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +8 -0
- package/dist/jest.setup.d.ts +1 -0
- package/dist/styles/GlobalStyles.d.ts +3 -0
- package/dist/styles/StorybookSupport/Colours/StorybookColourBox.d.ts +5 -0
- package/dist/styles/ThemeProvider.d.ts +3 -0
- package/dist/styles/themes.d.ts +2120 -0
- package/dist/styles/viewports.d.ts +13 -0
- package/dist/types/buttonTypes.d.ts +39 -0
- package/dist/types/editorial.d.ts +80 -0
- package/dist/types/footer.d.ts +41 -0
- package/dist/types/iconTypes.d.ts +33 -0
- package/dist/types/image.d.ts +12 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/navigation.d.ts +141 -0
- package/dist/types/types.d.ts +256 -0
- package/package.json +93 -0
- package/src/components/atoms/Account/Account.stories.tsx +93 -0
- package/src/components/atoms/Account/Account.test.tsx +54 -0
- package/src/components/atoms/Account/Account.tsx +25 -0
- package/src/components/atoms/Account/index.tsx +3 -0
- package/src/components/atoms/Basket/Basket.stories.tsx +79 -0
- package/src/components/atoms/Basket/Basket.style.tsx +74 -0
- package/src/components/atoms/Basket/Basket.test.tsx +35 -0
- package/src/components/atoms/Basket/Basket.tsx +34 -0
- package/src/components/atoms/Basket/index.tsx +3 -0
- package/src/components/atoms/Buttons/Button.style.tsx +31 -0
- package/src/components/atoms/Buttons/Button.tsx +21 -0
- package/src/components/atoms/Buttons/ButtonIconWrapper.style.tsx +10 -0
- package/src/components/atoms/Buttons/Buttons.stories.tsx +77 -0
- package/src/components/atoms/Buttons/Primary/PrimaryButton.stories.tsx +94 -0
- package/src/components/atoms/Buttons/Primary/PrimaryButton.test.tsx +39 -0
- package/src/components/atoms/Buttons/Primary/PrimaryButton.tsx +14 -0
- package/src/components/atoms/Buttons/Primary/PrimaryButtonWrapper.style.tsx +11 -0
- package/src/components/atoms/Buttons/Secondary/SecondaryButton.stories.tsx +84 -0
- package/src/components/atoms/Buttons/Secondary/SecondaryButton.test.tsx +39 -0
- package/src/components/atoms/Buttons/Secondary/SecondaryButton.tsx +14 -0
- package/src/components/atoms/Buttons/Secondary/SecondaryButtonWrapper.style.tsx +11 -0
- package/src/components/atoms/Buttons/Tertiary/TertiaryButton.stories.tsx +73 -0
- package/src/components/atoms/Buttons/Tertiary/TertiaryButton.style.tsx +29 -0
- package/src/components/atoms/Buttons/Tertiary/TertiaryButton.test.tsx +29 -0
- package/src/components/atoms/Buttons/Tertiary/TertiaryButton.tsx +18 -0
- package/src/components/atoms/Buttons/index.tsx +5 -0
- package/src/components/atoms/Dropdown/Dropdown.stories.tsx +153 -0
- package/src/components/atoms/Dropdown/Dropdown.style.tsx +64 -0
- package/src/components/atoms/Dropdown/Dropdown.test.tsx +67 -0
- package/src/components/atoms/Dropdown/Dropdown.tsx +131 -0
- package/src/components/atoms/Dropdown/index.tsx +3 -0
- package/src/components/atoms/Grid/Grid.stories.tsx +127 -0
- package/src/components/atoms/Grid/Grid.test.tsx +17 -0
- package/src/components/atoms/Grid/Grid.tsx +11 -0
- package/src/components/atoms/Grid/GridItem.test.tsx +25 -0
- package/src/components/atoms/Grid/GridItem.tsx +24 -0
- package/src/components/atoms/Grid/index.tsx +3 -0
- package/src/components/atoms/Heading/Heading.stories.tsx +44 -0
- package/src/components/atoms/Heading/Heading.style.tsx +14 -0
- package/src/components/atoms/Heading/Heading.test.tsx +13 -0
- package/src/components/atoms/Heading/Heading.tsx +15 -0
- package/src/components/atoms/Heading/index.tsx +3 -0
- package/src/components/atoms/Icons/Icons.stories.tsx +190 -0
- package/src/components/atoms/Icons/Icons.style.tsx +24 -0
- package/src/components/atoms/Icons/Icons.test.tsx +31 -0
- package/src/components/atoms/Icons/Icons.tsx +20 -0
- package/src/components/atoms/Icons/StorybookSupport/Iconography.tsx +27 -0
- package/src/components/atoms/Icons/StorybookSupport/IconsDiv.style.tsx +49 -0
- package/src/components/atoms/Icons/SvgIcons/12px/Remove.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/12px/Tick.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Actions/AddToMyList.svg.tsx +13 -0
- package/src/components/atoms/Icons/SvgIcons/Actions/BookTickets.svg.tsx +20 -0
- package/src/components/atoms/Icons/SvgIcons/Actions/ChooseDates.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Actions/EditMyList.svg.tsx +16 -0
- package/src/components/atoms/Icons/SvgIcons/Actions/Filter.svg.tsx +19 -0
- package/src/components/atoms/Icons/SvgIcons/Actions/FindAScreening.svg.tsx +31 -0
- package/src/components/atoms/Icons/SvgIcons/Actions/OnMyList.svg.tsx +16 -0
- package/src/components/atoms/Icons/SvgIcons/Actions/Reminder.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Actions/Subscribe.svg.tsx +9 -0
- package/src/components/atoms/Icons/SvgIcons/Actions/Watch.svg.tsx +9 -0
- package/src/components/atoms/Icons/SvgIcons/Arrows/Arrow.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Arrows/CarouselArrow.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Arrows/DropdownArrow.svg.tsx +8 -0
- package/src/components/atoms/Icons/SvgIcons/Descriptors/Cinema.svg.tsx +31 -0
- package/src/components/atoms/Icons/SvgIcons/Descriptors/Clock.svg.tsx +15 -0
- package/src/components/atoms/Icons/SvgIcons/Descriptors/CreditCard.svg.tsx +19 -0
- package/src/components/atoms/Icons/SvgIcons/Descriptors/Email.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Descriptors/Info.svg.tsx +13 -0
- package/src/components/atoms/Icons/SvgIcons/Descriptors/List.svg.tsx +22 -0
- package/src/components/atoms/Icons/SvgIcons/Descriptors/Location.svg.tsx +15 -0
- package/src/components/atoms/Icons/SvgIcons/Descriptors/PDF.svg.tsx +20 -0
- package/src/components/atoms/Icons/SvgIcons/Descriptors/Phone.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Descriptors/Print.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Descriptors/Secure.svg.tsx +15 -0
- package/src/components/atoms/Icons/SvgIcons/Descriptors/Tickets.svg.tsx +13 -0
- package/src/components/atoms/Icons/SvgIcons/Logos/Social/Facebook.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Logos/Social/Instagram.svg.tsx +19 -0
- package/src/components/atoms/Icons/SvgIcons/Logos/Social/Tiktok.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Logos/Social/Twitter.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Logos/Social/Youtube.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Logos/Sponsors/Sponsor.svg.tsx +26 -0
- package/src/components/atoms/Icons/SvgIcons/Navigation/BalletAndDance.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Navigation/Basket.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Navigation/BasketFull.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Navigation/Home.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Navigation/LiveStream.svg.tsx +24 -0
- package/src/components/atoms/Icons/SvgIcons/Navigation/Menu.svg.tsx +10 -0
- package/src/components/atoms/Icons/SvgIcons/Navigation/OperaAndMusic.svg.tsx +17 -0
- package/src/components/atoms/Icons/SvgIcons/Navigation/Search.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Navigation/Settings.svg.tsx +15 -0
- package/src/components/atoms/Icons/SvgIcons/Navigation/User.svg.tsx +15 -0
- package/src/components/atoms/Icons/SvgIcons/Navigation/UserSignedIn.svg.tsx +12 -0
- package/src/components/atoms/Icons/SvgIcons/Text/Delete.svg.tsx +12 -0
- package/src/components/atoms/Icons/SvgIcons/Text/Shift.svg.tsx +8 -0
- package/src/components/atoms/Icons/SvgIcons/Text/Space.svg.tsx +8 -0
- package/src/components/atoms/Icons/SvgIcons/Utility/Close.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Utility/Confirm.svg.tsx +8 -0
- package/src/components/atoms/Icons/SvgIcons/Utility/Detract.svg.tsx +8 -0
- package/src/components/atoms/Icons/SvgIcons/Utility/Expand.svg.tsx +8 -0
- package/src/components/atoms/Icons/SvgIcons/Utility/ExternalLink.svg.tsx +12 -0
- package/src/components/atoms/Icons/SvgIcons/Utility/GridView.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Utility/ListView.svg.tsx +10 -0
- package/src/components/atoms/Icons/SvgIcons/Utility/Refresh.svg.tsx +15 -0
- package/src/components/atoms/Icons/SvgIcons/Video/AudioDescription.svg.tsx +16 -0
- package/src/components/atoms/Icons/SvgIcons/Video/Back10.svg.tsx +16 -0
- package/src/components/atoms/Icons/SvgIcons/Video/Clips.svg.tsx +10 -0
- package/src/components/atoms/Icons/SvgIcons/Video/Forward10.svg.tsx +16 -0
- package/src/components/atoms/Icons/SvgIcons/Video/FullScreen.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Video/Minimise.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Video/Muted.svg.tsx +15 -0
- package/src/components/atoms/Icons/SvgIcons/Video/Pause.svg.tsx +9 -0
- package/src/components/atoms/Icons/SvgIcons/Video/Play.svg.tsx +9 -0
- package/src/components/atoms/Icons/SvgIcons/Video/Restart.svg.tsx +11 -0
- package/src/components/atoms/Icons/SvgIcons/Video/Subtitles.svg.tsx +17 -0
- package/src/components/atoms/Icons/SvgIcons/Video/Trailer.svg.tsx +12 -0
- package/src/components/atoms/Icons/SvgIcons/Video/Volume.svg.tsx +19 -0
- package/src/components/atoms/Icons/SvgIcons/index.tsx +149 -0
- package/src/components/atoms/Icons/__snapshots__/Icons.test.tsx.snap +1954 -0
- package/src/components/atoms/Icons/index.tsx +2 -0
- package/src/components/atoms/Image/Image.tsx +72 -0
- package/src/components/atoms/ImageAspectRatioWrapper/ImageAspectRatio.test.tsx +23 -0
- package/src/components/atoms/ImageAspectRatioWrapper/ImageAspectRatioWrapper.stories.tsx +71 -0
- package/src/components/atoms/ImageAspectRatioWrapper/ImageAspectRatioWrapper.tsx +15 -0
- package/src/components/atoms/ImageAspectRatioWrapper/index.tsx +3 -0
- package/src/components/atoms/IndividualListing/IndividualListing.stories.tsx +51 -0
- package/src/components/atoms/IndividualListing/IndividualListing.style.tsx +33 -0
- package/src/components/atoms/IndividualListing/IndividualListing.test.tsx +30 -0
- package/src/components/atoms/IndividualListing/IndividualListing.tsx +22 -0
- package/src/components/atoms/IndividualListing/index.tsx +3 -0
- package/src/components/atoms/Logo/Logo.stories.tsx +48 -0
- package/src/components/atoms/Logo/Logo.style.tsx +18 -0
- package/src/components/atoms/Logo/Logo.tsx +30 -0
- package/src/components/atoms/Logo/index.tsx +3 -0
- package/src/components/atoms/Search/Search.stories.tsx +63 -0
- package/src/components/atoms/Search/Search.style.tsx +36 -0
- package/src/components/atoms/Search/Search.test.tsx +24 -0
- package/src/components/atoms/Search/Search.tsx +16 -0
- package/src/components/atoms/Search/index.tsx +3 -0
- package/src/components/atoms/SectionSplitter/SectionSplitter.stories.tsx +47 -0
- package/src/components/atoms/SectionSplitter/SectionSplitter.style.tsx +11 -0
- package/src/components/atoms/SectionSplitter/SectionSplitter.tsx +22 -0
- package/src/components/atoms/SectionSplitter/index.tsx +3 -0
- package/src/components/atoms/Sponsorship/Sponsorship.stories.tsx +38 -0
- package/src/components/atoms/Sponsorship/Sponsorship.test.tsx +36 -0
- package/src/components/atoms/Sponsorship/Sponsorship.tsx +53 -0
- package/src/components/atoms/Sponsorship/index.tsx +3 -0
- package/src/components/atoms/Tab/Tab.stories.tsx +67 -0
- package/src/components/atoms/Tab/Tab.style.tsx +105 -0
- package/src/components/atoms/Tab/Tab.test.tsx +28 -0
- package/src/components/atoms/Tab/Tab.tsx +34 -0
- package/src/components/atoms/Tab/index.tsx +3 -0
- package/src/components/atoms/TextLink/TextLink.stories.tsx +81 -0
- package/src/components/atoms/TextLink/TextLink.style.tsx +26 -0
- package/src/components/atoms/TextLink/TextLink.test.tsx +39 -0
- package/src/components/atoms/TextLink/TextLink.tsx +20 -0
- package/src/components/atoms/TextLink/index.tsx +3 -0
- package/src/components/atoms/TypeTags/TypeTags.stories.tsx +57 -0
- package/src/components/atoms/TypeTags/TypeTags.style.tsx +28 -0
- package/src/components/atoms/TypeTags/TypeTags.test.tsx +21 -0
- package/src/components/atoms/TypeTags/TypeTags.tsx +15 -0
- package/src/components/atoms/TypeTags/index.tsx +3 -0
- package/src/components/atoms/index.tsx +22 -0
- package/src/components/index.tsx +38 -0
- package/src/components/molecules/ContactNewsletter/ContactNewsletter.style.tsx +116 -0
- package/src/components/molecules/ContactNewsletter/ContactNewsletter.test.tsx +85 -0
- package/src/components/molecules/ContactNewsletter/ContactNewsletter.tsx +51 -0
- package/src/components/molecules/ContactNewsletter/index.tsx +3 -0
- package/src/components/molecules/Editorial/Editorial.stories.tsx +78 -0
- package/src/components/molecules/Editorial/Editorial.style.tsx +73 -0
- package/src/components/molecules/Editorial/Editorial.test.tsx +73 -0
- package/src/components/molecules/Editorial/Editorial.tsx +32 -0
- package/src/components/molecules/Editorial/index.tsx +3 -0
- package/src/components/molecules/NavTop/NavTop.stories.tsx +95 -0
- package/src/components/molecules/NavTop/NavTop.style.tsx +14 -0
- package/src/components/molecules/NavTop/NavTop.test.tsx +113 -0
- package/src/components/molecules/NavTop/NavTop.tsx +27 -0
- package/src/components/molecules/NavTop/index.tsx +3 -0
- package/src/components/molecules/PeopleListing/PeopleListing.stories.tsx +185 -0
- package/src/components/molecules/PeopleListing/PeopleListing.style.tsx +8 -0
- package/src/components/molecules/PeopleListing/PeopleListing.test.tsx +24 -0
- package/src/components/molecules/PeopleListing/PeopleListing.tsx +27 -0
- package/src/components/molecules/PeopleListing/index.tsx +3 -0
- package/src/components/molecules/PolicyLinks/PolicyLinks.style.tsx +41 -0
- package/src/components/molecules/PolicyLinks/PolicyLinks.test.tsx +28 -0
- package/src/components/molecules/PolicyLinks/PolicyLinks.tsx +19 -0
- package/src/components/molecules/PolicyLinks/index.tsx +3 -0
- package/src/components/molecules/PromoWithTitle/PromoWithTitle.stories.tsx +119 -0
- package/src/components/molecules/PromoWithTitle/PromoWithTitle.style.tsx +108 -0
- package/src/components/molecules/PromoWithTitle/PromoWithTitle.test.tsx +75 -0
- package/src/components/molecules/PromoWithTitle/PromoWithTitle.tsx +53 -0
- package/src/components/molecules/PromoWithTitle/index.tsx +3 -0
- package/src/components/molecules/SearchBar/SearchBar.stories.tsx +35 -0
- package/src/components/molecules/SearchBar/SearchBar.style.tsx +66 -0
- package/src/components/molecules/SearchBar/SearchBar.test.tsx +63 -0
- package/src/components/molecules/SearchBar/SearchBar.tsx +69 -0
- package/src/components/molecules/SearchBar/index.tsx +3 -0
- package/src/components/molecules/SectionTitle/SectionTitle.stories.tsx +68 -0
- package/src/components/molecules/SectionTitle/SectionTitle.style.tsx +34 -0
- package/src/components/molecules/SectionTitle/SectionTitle.test.tsx +35 -0
- package/src/components/molecules/SectionTitle/SectionTitle.tsx +25 -0
- package/src/components/molecules/SectionTitle/index.tsx +3 -0
- package/src/components/molecules/Tabs/Tabs.stories.tsx +101 -0
- package/src/components/molecules/Tabs/Tabs.style.tsx +74 -0
- package/src/components/molecules/Tabs/Tabs.test.tsx +149 -0
- package/src/components/molecules/Tabs/Tabs.tsx +67 -0
- package/src/components/molecules/Tabs/index.tsx +3 -0
- package/src/components/molecules/TextOnly/TextOnly.stories.tsx +74 -0
- package/src/components/molecules/TextOnly/TextOnly.style.tsx +56 -0
- package/src/components/molecules/TextOnly/TextOnly.test.tsx +79 -0
- package/src/components/molecules/TextOnly/TextOnly.tsx +16 -0
- package/src/components/molecules/TextOnly/index.tsx +3 -0
- package/src/components/molecules/index.tsx +7 -0
- package/src/components/organisms/Footer/Footer.stories.tsx +54 -0
- package/src/components/organisms/Footer/Footer.style.tsx +72 -0
- package/src/components/organisms/Footer/Footer.test.tsx +31 -0
- package/src/components/organisms/Footer/Footer.tsx +53 -0
- package/src/components/organisms/Footer/exampleData.json +78 -0
- package/src/components/organisms/Footer/index.tsx +3 -0
- package/src/components/organisms/Navigation/Navigation.stories.tsx +110 -0
- package/src/components/organisms/Navigation/Navigation.style.tsx +87 -0
- package/src/components/organisms/Navigation/Navigation.test.tsx +115 -0
- package/src/components/organisms/Navigation/Navigation.tsx +109 -0
- package/src/components/organisms/Navigation/index.tsx +3 -0
- package/src/components/organisms/Navigation/menuData.json +104 -0
- package/src/components/organisms/index.tsx +4 -0
- package/src/index.tsx +44 -0
- package/src/jest.setup.ts +1 -0
- package/src/styles/GlobalStyles.tsx +205 -0
- package/src/styles/StorybookSupport/Colours/Colours.stories.mdx +101 -0
- package/src/styles/StorybookSupport/Colours/StorybookColourBox.tsx +32 -0
- package/src/styles/ThemeProvider.tsx +11 -0
- package/src/styles/themes.ts +398 -0
- package/src/styles/viewports.ts +14 -0
- package/src/types/buttonTypes.ts +42 -0
- package/src/types/editorial.ts +84 -0
- package/src/types/footer.ts +49 -0
- package/src/types/iconTypes.ts +38 -0
- package/src/types/image.ts +13 -0
- package/src/types/images.d.ts +1 -0
- package/src/types/index.tsx +5 -0
- package/src/types/navigation.ts +149 -0
- package/src/types/types.ts +276 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, fireEvent } from '@testing-library/react';
|
|
3
|
+
import Tabs from './Tabs';
|
|
4
|
+
import { IDropdownProps } from '../../../types/types';
|
|
5
|
+
|
|
6
|
+
describe('Tabs component', () => {
|
|
7
|
+
const onChangeHandler = jest.fn();
|
|
8
|
+
const onShowMenuHandler = jest.fn();
|
|
9
|
+
|
|
10
|
+
it('renders text with specific text', () => {
|
|
11
|
+
const items: IDropdownProps[] = [
|
|
12
|
+
{
|
|
13
|
+
title: 'TEXT LINK 1',
|
|
14
|
+
options: [
|
|
15
|
+
{
|
|
16
|
+
option: 'OPTION 1 OPTION 1OPTION 1',
|
|
17
|
+
optionLink: 'link 1',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
option: 'OPTION 2',
|
|
21
|
+
optionLink: 'link 2',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
option: 'OPTION 3',
|
|
25
|
+
optionLink: 'link 3',
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
title: 'TEXT LINK 2',
|
|
31
|
+
titleLink: 'textlink',
|
|
32
|
+
options: [],
|
|
33
|
+
},
|
|
34
|
+
];
|
|
35
|
+
const onChange = onChangeHandler;
|
|
36
|
+
const onShowMenu = onShowMenuHandler;
|
|
37
|
+
|
|
38
|
+
const { getByText } = render(<Tabs items={items} onChange={onChange} onShowMenu={onShowMenu}></Tabs>);
|
|
39
|
+
|
|
40
|
+
expect(getByText('TEXT LINK 1')).toBeInTheDocument();
|
|
41
|
+
expect(getByText('TEXT LINK 2')).toBeInTheDocument();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('renders options when click text', () => {
|
|
45
|
+
const items: IDropdownProps[] = [
|
|
46
|
+
{
|
|
47
|
+
title: 'TEXT LINK 1',
|
|
48
|
+
options: [
|
|
49
|
+
{
|
|
50
|
+
option: 'OPTION 1 OPTION 1OPTION 1',
|
|
51
|
+
optionLink: 'link 1',
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
option: 'OPTION 2',
|
|
55
|
+
optionLink: 'link 2',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
option: 'OPTION 3',
|
|
59
|
+
optionLink: 'link 3',
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
title: 'TEXT LINK 2',
|
|
65
|
+
titleLink: 'textlink',
|
|
66
|
+
options: [],
|
|
67
|
+
},
|
|
68
|
+
];
|
|
69
|
+
const onChange = onChangeHandler;
|
|
70
|
+
const onShowMenu = onShowMenuHandler;
|
|
71
|
+
|
|
72
|
+
const { getByText } = render(<Tabs items={items} onChange={onChange} onShowMenu={onShowMenu}></Tabs>);
|
|
73
|
+
|
|
74
|
+
fireEvent.click(getByText('TEXT LINK 1'));
|
|
75
|
+
|
|
76
|
+
expect(getByText('OPTION 2')).toBeInTheDocument();
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
it('calls onChangeHandler callback when text is clicked', () => {
|
|
80
|
+
const items: IDropdownProps[] = [
|
|
81
|
+
{
|
|
82
|
+
title: 'TEXT LINK 1',
|
|
83
|
+
options: [
|
|
84
|
+
{
|
|
85
|
+
option: 'OPTION 1 OPTION 1OPTION 1',
|
|
86
|
+
optionLink: 'link 1',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
option: 'OPTION 2',
|
|
90
|
+
optionLink: 'link 2',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
option: 'OPTION 3',
|
|
94
|
+
optionLink: 'link 3',
|
|
95
|
+
},
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
title: 'TEXT LINK 2',
|
|
100
|
+
titleLink: 'textlink',
|
|
101
|
+
options: [],
|
|
102
|
+
},
|
|
103
|
+
];
|
|
104
|
+
const onChange = onChangeHandler;
|
|
105
|
+
const onShowMenu = onShowMenuHandler;
|
|
106
|
+
|
|
107
|
+
const { getByText } = render(<Tabs items={items} onChange={onChange} onShowMenu={onShowMenu}></Tabs>);
|
|
108
|
+
|
|
109
|
+
fireEvent.click(getByText('TEXT LINK 2'));
|
|
110
|
+
|
|
111
|
+
expect(onChange).toBeCalled();
|
|
112
|
+
});
|
|
113
|
+
|
|
114
|
+
it('calls onChangeHandler callback when text option is clicked', () => {
|
|
115
|
+
const items: IDropdownProps[] = [
|
|
116
|
+
{
|
|
117
|
+
title: 'TEXT LINK 1',
|
|
118
|
+
options: [
|
|
119
|
+
{
|
|
120
|
+
option: 'OPTION 1 OPTION 1OPTION 1',
|
|
121
|
+
optionLink: 'link 1',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
option: 'OPTION 2',
|
|
125
|
+
optionLink: 'link 2',
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
option: 'OPTION 3',
|
|
129
|
+
optionLink: 'link 3',
|
|
130
|
+
},
|
|
131
|
+
],
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
title: 'TEXT LINK 2',
|
|
135
|
+
titleLink: 'textlink',
|
|
136
|
+
options: [],
|
|
137
|
+
},
|
|
138
|
+
];
|
|
139
|
+
const onChange = onChangeHandler;
|
|
140
|
+
const onShowMenu = onShowMenuHandler;
|
|
141
|
+
|
|
142
|
+
const { getByText } = render(<Tabs items={items} onChange={onChange} onShowMenu={onShowMenu}></Tabs>);
|
|
143
|
+
|
|
144
|
+
fireEvent.click(getByText('TEXT LINK 1'));
|
|
145
|
+
fireEvent.click(getByText('OPTION 2'));
|
|
146
|
+
|
|
147
|
+
expect(onChange).toBeCalled();
|
|
148
|
+
});
|
|
149
|
+
});
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import { TabsContainer, MenuContainer, ItemsContainer, MenuItem } from './Tabs.style';
|
|
3
|
+
import { ITabsProps } from '../../../types/types';
|
|
4
|
+
import Dropdown from '../../atoms/Dropdown';
|
|
5
|
+
import SvgIcon from '../../atoms/Icons/Icons';
|
|
6
|
+
|
|
7
|
+
const Tabs = ({ items = [], onChange, onShowMenu, showMenu = false }: ITabsProps) => {
|
|
8
|
+
const [openMenu, setOpenMenu] = useState(false);
|
|
9
|
+
|
|
10
|
+
const onChangeHandler = (link: string) => {
|
|
11
|
+
if (onChange) {
|
|
12
|
+
onChange(link);
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const onClickHandler = (value: boolean) => {
|
|
17
|
+
setOpenMenu(value);
|
|
18
|
+
if (onShowMenu) {
|
|
19
|
+
onShowMenu(value);
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<TabsContainer>
|
|
25
|
+
<ItemsContainer showMenu={showMenu}>
|
|
26
|
+
{items.map((item) => (
|
|
27
|
+
<Dropdown
|
|
28
|
+
key={`key-${Math.random()}`}
|
|
29
|
+
title={item.title}
|
|
30
|
+
titleLink={item.titleLink}
|
|
31
|
+
options={item.options}
|
|
32
|
+
onChange={(link) => onChangeHandler(link)}
|
|
33
|
+
isMobileBehaviour={showMenu}
|
|
34
|
+
withIcon={item.options && item.options.length > 0 ? 'right' : 'none'}
|
|
35
|
+
/>
|
|
36
|
+
))}
|
|
37
|
+
</ItemsContainer>
|
|
38
|
+
{!showMenu && (
|
|
39
|
+
<MenuContainer>
|
|
40
|
+
{openMenu ? (
|
|
41
|
+
<a
|
|
42
|
+
onClick={(e) => {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
onClickHandler(false);
|
|
45
|
+
}}
|
|
46
|
+
>
|
|
47
|
+
<SvgIcon className={`close-img`} iconName="Close" />
|
|
48
|
+
</a>
|
|
49
|
+
) : (
|
|
50
|
+
<MenuItem>
|
|
51
|
+
<a
|
|
52
|
+
onClick={(e) => {
|
|
53
|
+
e.preventDefault();
|
|
54
|
+
onClickHandler(true);
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
MENU
|
|
58
|
+
</a>
|
|
59
|
+
</MenuItem>
|
|
60
|
+
)}
|
|
61
|
+
</MenuContainer>
|
|
62
|
+
)}
|
|
63
|
+
</TabsContainer>
|
|
64
|
+
);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
export default Tabs;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import TextOnly from './TextOnly';
|
|
4
|
+
import GlobalStyles from '../../../styles/GlobalStyles';
|
|
5
|
+
import ThemeProvider from '../../../styles/ThemeProvider';
|
|
6
|
+
import { ThemeType } from '../../../types/types';
|
|
7
|
+
|
|
8
|
+
const meta: Meta = {
|
|
9
|
+
title: 'Components/Editorial/TextOnly',
|
|
10
|
+
component: TextOnly,
|
|
11
|
+
argTypes: {
|
|
12
|
+
text: {
|
|
13
|
+
description: 'Body text inside the component',
|
|
14
|
+
},
|
|
15
|
+
ref: {
|
|
16
|
+
table: { disable: true },
|
|
17
|
+
},
|
|
18
|
+
theme: {
|
|
19
|
+
table: { disable: true },
|
|
20
|
+
},
|
|
21
|
+
as: {
|
|
22
|
+
table: { disable: true },
|
|
23
|
+
},
|
|
24
|
+
forwardedAs: {
|
|
25
|
+
table: { disable: true },
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
decorators: [
|
|
29
|
+
(Story) => (
|
|
30
|
+
<ThemeProvider theme={ThemeType.Core}>
|
|
31
|
+
<GlobalStyles />
|
|
32
|
+
{Story()}
|
|
33
|
+
</ThemeProvider>
|
|
34
|
+
),
|
|
35
|
+
],
|
|
36
|
+
parameters: {
|
|
37
|
+
docs: {
|
|
38
|
+
description: {
|
|
39
|
+
component: 'This component is essentially a rich text editor',
|
|
40
|
+
withSource: 'none',
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
design: {
|
|
44
|
+
type: 'figma',
|
|
45
|
+
url:
|
|
46
|
+
'https://www.figma.com/file/PtlqtJAjr87djTyD0x40m9/ROH%3A-Design-System-%26-Documentation?node-id=1614%3A28007',
|
|
47
|
+
},
|
|
48
|
+
jest: ['TextOnly'],
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default meta;
|
|
53
|
+
|
|
54
|
+
interface IStorybookTextOnlyProps {
|
|
55
|
+
text: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const TextOnlyTemplate: Story<IStorybookTextOnlyProps> = (args) => <TextOnly {...args} />;
|
|
59
|
+
|
|
60
|
+
export const TextOnlyDefault = TextOnlyTemplate.bind({});
|
|
61
|
+
TextOnlyDefault.args = {
|
|
62
|
+
text: `Rich Text Editor. <em>Body 1 Italicised</em>. <u>Body 1 Underlined.</u> Pellentesque laoreet est et facilisis aliquet. Proin sit amet tincidunt massa, at lacinia odio. Maecenas eget interdum arcu. Etiam sed ullamcorper leo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Nunc in volutpat tellus, id feugiat magna. Duis bibendum dignissim metus. Fusce et elit sed justo sollicitudin egestas.
|
|
63
|
+
<h1>Header 4. Lorem ipsum dolor sit amet, consectetur.</h1>
|
|
64
|
+
Vivamus id laoreet ex. Cras tincidunt risus ligula, nec consequat justo commodo et. Integer facilisis porttitor elit vestibulum gravida. Curabitur nec massa ac odio sollicitudin aliquam at a lacus. Donec congue blandit dui.
|
|
65
|
+
<h2>Subtitle 1. Donec porta libero non ante iaculis faucibus.</h2>
|
|
66
|
+
<ul>
|
|
67
|
+
<li>Body 1 Listing. Quisque aliquam faucibus pretium.</li>
|
|
68
|
+
<li>Etiam varius nec felis nec ullamcorper. Curabitur in ante lacus.</li>
|
|
69
|
+
<li>Pellentesque ac pharetra lorem. Pellentesque dictum dolor sit amet scelerisque facilisis.</li>
|
|
70
|
+
<li>Vestibulum molestie, lacus vel iaculis pharetra, libero neque mattis leovitae. </li>
|
|
71
|
+
<li>Ut sodales, erat ut fringilla maximus, dolor risus lobortis justo, eu lobortis lacus.</li>
|
|
72
|
+
</ul>
|
|
73
|
+
`,
|
|
74
|
+
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const TextContainer = styled.div`
|
|
4
|
+
font-size: var(--font-size-body-1);
|
|
5
|
+
font-family: var(--font-family-body-1);
|
|
6
|
+
font-weight: var(--font-weight-body-1);
|
|
7
|
+
letter-spacing: var(--letter-spacing-body-1);
|
|
8
|
+
line-height: var(--line-height-body-1);
|
|
9
|
+
text-transform: var(--text-transform-body-1);
|
|
10
|
+
|
|
11
|
+
& h1 {
|
|
12
|
+
font-size: var(--font-size-header-4);
|
|
13
|
+
font-family: var(--font-family-header);
|
|
14
|
+
font-weight: var(--font-weight-header-4);
|
|
15
|
+
letter-spacing: var(--letter-spacing-header-4);
|
|
16
|
+
line-height: var(--line-height-header-4);
|
|
17
|
+
text-transform: uppercase;
|
|
18
|
+
white-space: break-spaces;
|
|
19
|
+
overflow-wrap: break-word;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
& h2 {
|
|
23
|
+
font-size: var(--font-size-subtitles-1);
|
|
24
|
+
font-family: var(--font-family-subtitles);
|
|
25
|
+
font-weight: var(--font-weight-subtitles-1);
|
|
26
|
+
letter-spacing: var(--letter-spacing-subtitles-1);
|
|
27
|
+
line-height: var(--line-height-subtitles-1);
|
|
28
|
+
text-transform: uppercase;
|
|
29
|
+
white-space: break-spaces;
|
|
30
|
+
overflow-wrap: break-word;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
& em {
|
|
34
|
+
font-family: var(--font-family-body-italics);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
& u {
|
|
38
|
+
font-size: var(--font-size-body-1);
|
|
39
|
+
font-family: var(--font-family-body-1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
& ul {
|
|
43
|
+
padding: 0;
|
|
44
|
+
list-style: none;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
& ul > li:before {
|
|
48
|
+
display: inline-block;
|
|
49
|
+
content: '—';
|
|
50
|
+
width: 20px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
& li {
|
|
54
|
+
line-height: var(--line-height-listing);
|
|
55
|
+
}
|
|
56
|
+
`;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import TextOnly from './TextOnly';
|
|
4
|
+
|
|
5
|
+
describe('TextOnly component', () => {
|
|
6
|
+
const text = `Rich Text Editor. <em>Body 1 Italicised</em>. <u>Body 1 Underlined.</u> Pellentesque laoreet est et facilisis aliquet. Proin sit amet tincidunt massa, at lacinia odio. Maecenas eget interdum arcu. Etiam sed ullamcorper leo. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Nunc in volutpat tellus, id feugiat magna. Duis bibendum dignissim metus. Fusce et elit sed justo sollicitudin egestas.
|
|
7
|
+
<h1>Header 4. Lorem ipsum dolor sit amet, consectetur.</h1>
|
|
8
|
+
Vivamus id laoreet ex. Cras tincidunt risus ligula, nec consequat justo commodo et. Integer facilisis porttitor elit vestibulum gravida. Curabitur nec massa ac odio sollicitudin aliquam at a lacus. Donec congue blandit dui.
|
|
9
|
+
<h2>Subtitle 1. Donec porta libero non ante iaculis faucibus.</h2>
|
|
10
|
+
<ul>
|
|
11
|
+
<li>Body 1 Listing. Quisque aliquam faucibus pretium.</li>
|
|
12
|
+
<li>Etiam varius nec felis nec ullamcorper. Curabitur in ante lacus.</li>
|
|
13
|
+
<li>Pellentesque ac pharetra lorem. Pellentesque dictum dolor sit amet scelerisque facilisis.</li>
|
|
14
|
+
<li>Vestibulum molestie, lacus vel iaculis pharetra, libero neque mattis leovitae. </li>
|
|
15
|
+
<li>Ut sodales, erat ut fringilla maximus, dolor risus lobortis justo, eu lobortis lacus.</li>
|
|
16
|
+
</ul>
|
|
17
|
+
`;
|
|
18
|
+
|
|
19
|
+
it('renders properly text italicised', () => {
|
|
20
|
+
const { getByText } = render(<TextOnly text={text} />);
|
|
21
|
+
|
|
22
|
+
const italicisedItem = getByText('Body 1 Italicised');
|
|
23
|
+
|
|
24
|
+
expect(italicisedItem).toBeInTheDocument();
|
|
25
|
+
expect(italicisedItem).toHaveStyle({ 'font-family': 'var(--font-family-body-italics)' });
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it('renders properly text body 1', () => {
|
|
29
|
+
const { getByText } = render(<TextOnly text={text} />);
|
|
30
|
+
|
|
31
|
+
const bodyItem = getByText('Rich Text Editor', { exact: false });
|
|
32
|
+
|
|
33
|
+
expect(bodyItem).toBeInTheDocument();
|
|
34
|
+
expect(bodyItem).toHaveStyle({ 'font-family': 'var(--font-family-body-1)' });
|
|
35
|
+
expect(bodyItem).toHaveStyle({ 'line-height': 'var(--line-height-body-1)' });
|
|
36
|
+
expect(bodyItem).toHaveStyle({ 'font-size': 'var(--font-size-body-1)' });
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
it('renders properly text underlined', () => {
|
|
40
|
+
const { getByText } = render(<TextOnly text={text} />);
|
|
41
|
+
|
|
42
|
+
const underlinedItem = getByText('Body 1 Underlined.');
|
|
43
|
+
|
|
44
|
+
expect(underlinedItem).toBeInTheDocument();
|
|
45
|
+
expect(underlinedItem).toHaveStyle({ 'font-family': 'var(--font-family-body-1)' });
|
|
46
|
+
expect(underlinedItem).toHaveStyle({ 'font-size': 'var(--font-size-body-1)' });
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
it('renders properly text header', () => {
|
|
50
|
+
const { getByText } = render(<TextOnly text={text} />);
|
|
51
|
+
|
|
52
|
+
const headerItem = getByText('Header 4. Lorem ipsum dolor sit amet, consectetur.');
|
|
53
|
+
|
|
54
|
+
expect(headerItem).toBeInTheDocument();
|
|
55
|
+
expect(headerItem).toHaveStyle({ 'font-family': 'var(--font-family-header)' });
|
|
56
|
+
expect(headerItem).toHaveStyle({ 'line-height': 'var(--line-height-header-4)' });
|
|
57
|
+
expect(headerItem).toHaveStyle({ 'font-size': 'var(--font-size-header-4)' });
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
it('renders properly text subtitle', () => {
|
|
61
|
+
const { getByText } = render(<TextOnly text={text} />);
|
|
62
|
+
|
|
63
|
+
const headerItem = getByText('Subtitle 1. Donec porta libero non ante iaculis faucibus.');
|
|
64
|
+
|
|
65
|
+
expect(headerItem).toBeInTheDocument();
|
|
66
|
+
expect(headerItem).toHaveStyle({ 'font-family': 'var(--font-family-subtitles)' });
|
|
67
|
+
expect(headerItem).toHaveStyle({ 'line-height': 'var(--line-height-subtitles-1)' });
|
|
68
|
+
expect(headerItem).toHaveStyle({ 'font-size': 'var(--font-size-subtitles-1)' });
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
it('renders properly text listing', () => {
|
|
72
|
+
const { getByText } = render(<TextOnly text={text} />);
|
|
73
|
+
|
|
74
|
+
const headerItem = getByText('Body 1 Listing. Quisque aliquam faucibus pretium.');
|
|
75
|
+
|
|
76
|
+
expect(headerItem).toBeInTheDocument();
|
|
77
|
+
expect(headerItem).toHaveStyle({ 'line-height': 'var(--line-height-listing)' });
|
|
78
|
+
});
|
|
79
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { TextContainer } from './TextOnly.style';
|
|
3
|
+
import { Grid, GridItem } from '../../atoms';
|
|
4
|
+
import { ITextOnlyProps } from '../../../types/types';
|
|
5
|
+
|
|
6
|
+
const TextOnly: FunctionComponent<ITextOnlyProps> = ({ text = '' }) => {
|
|
7
|
+
return (
|
|
8
|
+
<Grid>
|
|
9
|
+
<GridItem columnStartDesktop={3} columnSpanDesktop={8} columnStartDevice={1} columnSpanDevice={14}>
|
|
10
|
+
<TextContainer dangerouslySetInnerHTML={{ __html: text }} />
|
|
11
|
+
</GridItem>
|
|
12
|
+
</Grid>
|
|
13
|
+
);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export default TextOnly;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import Editorial from './Editorial';
|
|
2
|
+
import PeopleListing from './PeopleListing';
|
|
3
|
+
import PromoWithTitle from './PromoWithTitle';
|
|
4
|
+
import SectionTitle from './SectionTitle';
|
|
5
|
+
import TextOnly from './TextOnly';
|
|
6
|
+
|
|
7
|
+
export { Editorial, PeopleListing, PromoWithTitle, SectionTitle, TextOnly };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import FooterComponent from './Footer';
|
|
4
|
+
import GlobalStyles from '../../../styles/GlobalStyles';
|
|
5
|
+
import ThemeProvider from '../../../styles/ThemeProvider';
|
|
6
|
+
import { ThemeType } from '../../../types/types';
|
|
7
|
+
import data from './exampleData.json';
|
|
8
|
+
import { FooterData } from '../../../types/footer';
|
|
9
|
+
|
|
10
|
+
const meta: Meta = {
|
|
11
|
+
title: 'Components/Navigation/Footer',
|
|
12
|
+
component: FooterComponent,
|
|
13
|
+
argTypes: {
|
|
14
|
+
ref: {
|
|
15
|
+
table: { disable: true },
|
|
16
|
+
},
|
|
17
|
+
theme: {
|
|
18
|
+
table: { disable: true },
|
|
19
|
+
},
|
|
20
|
+
as: {
|
|
21
|
+
table: { disable: true },
|
|
22
|
+
},
|
|
23
|
+
forwardedAs: {
|
|
24
|
+
table: { disable: true },
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
decorators: [
|
|
28
|
+
(Story) => (
|
|
29
|
+
<ThemeProvider theme={ThemeType.Core}>
|
|
30
|
+
<GlobalStyles />
|
|
31
|
+
{Story()}
|
|
32
|
+
</ThemeProvider>
|
|
33
|
+
),
|
|
34
|
+
],
|
|
35
|
+
parameters: {
|
|
36
|
+
docs: {
|
|
37
|
+
description: {
|
|
38
|
+
component: 'Navigation footer that will be present in every page',
|
|
39
|
+
withSource: 'none',
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
design: {
|
|
43
|
+
type: 'figma',
|
|
44
|
+
url: 'https://www.figma.com/file/PtlqtJAjr87djTyD0x40m9/ROH:-Design-System-and-Documentation?node-id=3%3A1497',
|
|
45
|
+
},
|
|
46
|
+
jest: ['Footer'],
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export default meta;
|
|
51
|
+
|
|
52
|
+
const FooterTemplate: Story = () => <FooterComponent data={data as FooterData} />;
|
|
53
|
+
|
|
54
|
+
export const Footer = FooterTemplate.bind({});
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { devices } from '../../../styles/viewports';
|
|
3
|
+
|
|
4
|
+
export const FooterSection = styled.section`
|
|
5
|
+
background-color: var(--base-color-black);
|
|
6
|
+
color: var(--base-color-white);
|
|
7
|
+
`;
|
|
8
|
+
|
|
9
|
+
export const FooterContainer = styled.div`
|
|
10
|
+
height: var(--footer-height);
|
|
11
|
+
padding-top: var(--footer-padding-top);
|
|
12
|
+
padding-bottom: var(--footer-padding-bottom);
|
|
13
|
+
display: grid;
|
|
14
|
+
grid-template-rows:
|
|
15
|
+
min-content var(--footer-vertical-spacing-lg) min-content var(--footer-vertical-spacing-lg) min-content var(
|
|
16
|
+
--footer-vertical-spacing-sm
|
|
17
|
+
)
|
|
18
|
+
min-content;
|
|
19
|
+
grid-template-areas:
|
|
20
|
+
'row1'
|
|
21
|
+
'.'
|
|
22
|
+
'row2'
|
|
23
|
+
'.'
|
|
24
|
+
'row3'
|
|
25
|
+
'.'
|
|
26
|
+
'row4';
|
|
27
|
+
`;
|
|
28
|
+
|
|
29
|
+
export const PolicyLinksRow = styled.div`
|
|
30
|
+
grid-area: row1;
|
|
31
|
+
justify-self: center;
|
|
32
|
+
|
|
33
|
+
@media ${devices.mobile} {
|
|
34
|
+
& {
|
|
35
|
+
justify-self: start;
|
|
36
|
+
grid-area: row2;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
`;
|
|
40
|
+
|
|
41
|
+
export const ContactNewsletterRow = styled.div`
|
|
42
|
+
grid-area: row2;
|
|
43
|
+
|
|
44
|
+
@media ${devices.mobile} {
|
|
45
|
+
& {
|
|
46
|
+
grid-area: row1;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
`;
|
|
50
|
+
|
|
51
|
+
export const ArtsLogoRow = styled.div`
|
|
52
|
+
grid-area: row3;
|
|
53
|
+
justify-self: center;
|
|
54
|
+
|
|
55
|
+
@media ${devices.mobile} {
|
|
56
|
+
justify-self: start;
|
|
57
|
+
}
|
|
58
|
+
`;
|
|
59
|
+
|
|
60
|
+
export const AdditionalInfo = styled.p`
|
|
61
|
+
grid-area: row4;
|
|
62
|
+
font-family: var(--font-family-body);
|
|
63
|
+
font-size: var(--font-size-body-3);
|
|
64
|
+
line-height: var(--line-height-body-3);
|
|
65
|
+
text-align: center;
|
|
66
|
+
margin: 0;
|
|
67
|
+
padding: 0;
|
|
68
|
+
|
|
69
|
+
@media ${devices.mobile} {
|
|
70
|
+
text-align: left;
|
|
71
|
+
}
|
|
72
|
+
`;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import data from './exampleData.json';
|
|
4
|
+
import Footer from './Footer';
|
|
5
|
+
import { FooterData } from '../../../types/footer';
|
|
6
|
+
|
|
7
|
+
describe('PolicyLinks component', () => {
|
|
8
|
+
it('renders a policy links section', () => {
|
|
9
|
+
const { getByTestId } = render(<Footer data={data as FooterData} />);
|
|
10
|
+
|
|
11
|
+
expect(getByTestId('policy-links')).toBeInTheDocument();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('renders a contact & newsletter section', () => {
|
|
15
|
+
const { getByTestId } = render(<Footer data={data as FooterData} />);
|
|
16
|
+
|
|
17
|
+
expect(getByTestId('contact-newsletter')).toBeInTheDocument();
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
it('renders an arts logo section', () => {
|
|
21
|
+
const { getByTestId } = render(<Footer data={data as FooterData} />);
|
|
22
|
+
|
|
23
|
+
expect(getByTestId('arts-logo')).toBeInTheDocument();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
it('renders an additional info section', () => {
|
|
27
|
+
const { getByTestId } = render(<Footer data={data as FooterData} />);
|
|
28
|
+
|
|
29
|
+
expect(getByTestId('additional-info')).toBeInTheDocument();
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
FooterSection,
|
|
4
|
+
FooterContainer,
|
|
5
|
+
AdditionalInfo,
|
|
6
|
+
PolicyLinksRow,
|
|
7
|
+
ContactNewsletterRow,
|
|
8
|
+
ArtsLogoRow,
|
|
9
|
+
} from './Footer.style';
|
|
10
|
+
import { Grid, GridItem } from '../../atoms/Grid';
|
|
11
|
+
import PolicyLinks from '../../molecules/PolicyLinks';
|
|
12
|
+
import ContactNewsletter from '../../molecules/ContactNewsletter';
|
|
13
|
+
import { Icon } from '../../atoms/Icons';
|
|
14
|
+
import { CommonLink, PolicyLink, SocialMediaLink, Newsletter, IFooterProps, ExternalLink } from '../../../types/footer';
|
|
15
|
+
|
|
16
|
+
const Footer: FunctionComponent<IFooterProps> = ({ data }) => {
|
|
17
|
+
const policyLinks: PolicyLink[] = data.policyLinks;
|
|
18
|
+
const newsletter: Newsletter = data.newsletter;
|
|
19
|
+
const socialMediaLinks: SocialMediaLink[] = data.socialMediaLinks as SocialMediaLink[];
|
|
20
|
+
const contact: CommonLink = data.contact;
|
|
21
|
+
const { dataRoh: artsDataRoh, ...artsLogo }: ExternalLink = data.artsLogo;
|
|
22
|
+
const additionalInfo: string = data.additionalInfo;
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<FooterSection>
|
|
26
|
+
<Grid>
|
|
27
|
+
<GridItem columnStartDesktop={4} columnSpanDesktop={10} columnStartDevice={2} columnSpanDevice={12}>
|
|
28
|
+
<FooterContainer>
|
|
29
|
+
<PolicyLinksRow data-testid="policy-links">
|
|
30
|
+
<PolicyLinks items={policyLinks} />
|
|
31
|
+
</PolicyLinksRow>
|
|
32
|
+
<ContactNewsletterRow data-testid="contact-newsletter">
|
|
33
|
+
<ContactNewsletter
|
|
34
|
+
signUpText={newsletter.text}
|
|
35
|
+
signUpLink={newsletter.link}
|
|
36
|
+
socialMediaLinks={socialMediaLinks}
|
|
37
|
+
contact={contact}
|
|
38
|
+
/>
|
|
39
|
+
</ContactNewsletterRow>
|
|
40
|
+
<ArtsLogoRow data-testid="arts-logo">
|
|
41
|
+
<a data-roh={artsDataRoh} target="_blank" rel="noopener noreferrer" {...artsLogo}>
|
|
42
|
+
<Icon iconName="Sponsor" color="white" />
|
|
43
|
+
</a>
|
|
44
|
+
</ArtsLogoRow>
|
|
45
|
+
<AdditionalInfo data-testid="additional-info">{additionalInfo}</AdditionalInfo>
|
|
46
|
+
</FooterContainer>
|
|
47
|
+
</GridItem>
|
|
48
|
+
</Grid>
|
|
49
|
+
</FooterSection>
|
|
50
|
+
);
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
export default Footer;
|