@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,81 @@
|
|
|
1
|
+
import React, { MouseEventHandler } from 'react';
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
import TextLink from './TextLink';
|
|
4
|
+
import GlobalStyles from '../../../styles/GlobalStyles';
|
|
5
|
+
import ThemeProvider from '../../../styles/ThemeProvider';
|
|
6
|
+
import { ThemeType, Colors } from '../../../types/types';
|
|
7
|
+
import { DirectionType, IconNameType } from '../../../types/iconTypes';
|
|
8
|
+
|
|
9
|
+
const meta: Meta = {
|
|
10
|
+
title: 'Components/Foundations/Buttons/TextLink',
|
|
11
|
+
component: TextLink,
|
|
12
|
+
argTypes: {
|
|
13
|
+
color: {
|
|
14
|
+
description: 'Text and icon color',
|
|
15
|
+
},
|
|
16
|
+
ref: {
|
|
17
|
+
table: { disable: true },
|
|
18
|
+
},
|
|
19
|
+
theme: {
|
|
20
|
+
table: { disable: true },
|
|
21
|
+
},
|
|
22
|
+
as: {
|
|
23
|
+
table: { disable: true },
|
|
24
|
+
},
|
|
25
|
+
forwardedAs: {
|
|
26
|
+
table: { disable: true },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
decorators: [
|
|
30
|
+
(Story) => (
|
|
31
|
+
<ThemeProvider theme={ThemeType.Core}>
|
|
32
|
+
<GlobalStyles />
|
|
33
|
+
{Story()}
|
|
34
|
+
</ThemeProvider>
|
|
35
|
+
),
|
|
36
|
+
],
|
|
37
|
+
parameters: {
|
|
38
|
+
docs: {
|
|
39
|
+
description: {
|
|
40
|
+
component: 'Text Link',
|
|
41
|
+
withSource: 'none',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
design: {
|
|
45
|
+
type: 'figma',
|
|
46
|
+
url: 'https://www.figma.com/file/PtlqtJAjr87djTyD0x40m9/ROH:-Design-System-and-Documentation?node-id=3%3A1497',
|
|
47
|
+
},
|
|
48
|
+
jest: ['TextLink'],
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
export default meta;
|
|
53
|
+
|
|
54
|
+
interface IStorybookTextLinkProps {
|
|
55
|
+
text: string;
|
|
56
|
+
color?: Colors;
|
|
57
|
+
iconName?: IconNameType;
|
|
58
|
+
iconDirection?: DirectionType;
|
|
59
|
+
onClick: MouseEventHandler<any>;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const TextLinkTemplate: Story<IStorybookTextLinkProps> = ({ text, ...rest }) => <TextLink {...rest}>{text}</TextLink>;
|
|
63
|
+
|
|
64
|
+
export const WithoutIcon = TextLinkTemplate.bind({});
|
|
65
|
+
WithoutIcon.args = {
|
|
66
|
+
onClick: () => console.log('click!'),
|
|
67
|
+
text: 'Button Text',
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const WithIcon = TextLinkTemplate.bind({});
|
|
71
|
+
WithIcon.args = {
|
|
72
|
+
onClick: () => console.log('click!'),
|
|
73
|
+
text: 'Button Text',
|
|
74
|
+
iconName: 'DropdownArrow',
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
export const WithLongText = TextLinkTemplate.bind({});
|
|
78
|
+
WithLongText.args = {
|
|
79
|
+
onClick: () => console.log('click!'),
|
|
80
|
+
text: 'Very Very Very Long Link Truncated Text',
|
|
81
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { ITextLinkProps } from '../../../types/types';
|
|
3
|
+
|
|
4
|
+
export const TextLinkWrapper = styled.a<ITextLinkProps>`
|
|
5
|
+
border-bottom: 1px solid;
|
|
6
|
+
padding-bottom: ${({ iconName }) =>
|
|
7
|
+
iconName ? 'calc(var(--text-link-underline-offset) - 4px)' : 'var(--text-link-underline-offset)'};
|
|
8
|
+
font-family: var(--font-family-overline);
|
|
9
|
+
font-size: var(--font-size-overline-1);
|
|
10
|
+
font-weight: var(--font-weigth-overline-1);
|
|
11
|
+
line-height: var(--line-height-overline-1);
|
|
12
|
+
letter-spacing: var(--letter-spacing-overline-1);
|
|
13
|
+
text-transform: var(--text-transform-overline-1);
|
|
14
|
+
color: var(--base-color-${({ color }) => color});
|
|
15
|
+
width: fit-content;
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
text-decoration: none;
|
|
20
|
+
`;
|
|
21
|
+
|
|
22
|
+
export const TextLinkIconWrapper = styled.span`
|
|
23
|
+
width: var(--button-icon-width);
|
|
24
|
+
height: var(--button-icon-height);
|
|
25
|
+
margin-left: var(--button-icon-margin);
|
|
26
|
+
`;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, within, fireEvent } from '@testing-library/react';
|
|
3
|
+
import TextLink from './TextLink';
|
|
4
|
+
|
|
5
|
+
describe('TextLink component', () => {
|
|
6
|
+
const onClick = jest.fn();
|
|
7
|
+
it('renders text link with specific text', () => {
|
|
8
|
+
const { getByText } = render(<TextLink onClick={onClick}>Text link text</TextLink>);
|
|
9
|
+
|
|
10
|
+
expect(getByText('Text link text')).toBeInTheDocument();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it('truncates text if its length is greater than 30 characters', () => {
|
|
14
|
+
const { getByText, queryAllByText } = render(
|
|
15
|
+
<TextLink onClick={onClick}>Very Very Very Very Long Text Link</TextLink>
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
expect(queryAllByText('Very Very Very Very Long Text Link')).toHaveLength(0);
|
|
19
|
+
expect(getByText('Very Very Very Very Long Text')).toBeInTheDocument();
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
it('renders icon inside the text link', () => {
|
|
23
|
+
const { getByText } = render(
|
|
24
|
+
<TextLink iconName="Arrow" onClick={onClick}>
|
|
25
|
+
Text link text
|
|
26
|
+
</TextLink>
|
|
27
|
+
);
|
|
28
|
+
const textLink = getByText('Text link text');
|
|
29
|
+
|
|
30
|
+
expect(within(textLink).getByTestId('text-link-icon')).toBeInTheDocument();
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
it('calls onClick callback when text link is clicked', () => {
|
|
34
|
+
const { getByText } = render(<TextLink onClick={onClick}>Text link text</TextLink>);
|
|
35
|
+
|
|
36
|
+
fireEvent.click(getByText('Text link text'));
|
|
37
|
+
expect(onClick).toBeCalled();
|
|
38
|
+
});
|
|
39
|
+
});
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import { TextLinkWrapper, TextLinkIconWrapper } from './TextLink.style';
|
|
3
|
+
import { Icon } from '../Icons';
|
|
4
|
+
import { ITextLinkProps } from '../../../types/types';
|
|
5
|
+
|
|
6
|
+
const TextLink: FunctionComponent<ITextLinkProps> = ({ children, iconName, iconDirection, color, ...rest }) => {
|
|
7
|
+
const truncatedString = (children as string).substring(0, 30);
|
|
8
|
+
return (
|
|
9
|
+
<TextLinkWrapper color={color} iconName={iconName} {...rest}>
|
|
10
|
+
{truncatedString}
|
|
11
|
+
{iconName ? (
|
|
12
|
+
<TextLinkIconWrapper data-testid="text-link-icon">
|
|
13
|
+
<Icon iconName={iconName} direction={iconDirection} color={color} />
|
|
14
|
+
</TextLinkIconWrapper>
|
|
15
|
+
) : null}
|
|
16
|
+
</TextLinkWrapper>
|
|
17
|
+
);
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export default TextLink;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Story, Meta } from '@storybook/react';
|
|
3
|
+
import GlobalStyles from '../../../styles/GlobalStyles';
|
|
4
|
+
import ThemeProvider from '../../../styles/ThemeProvider';
|
|
5
|
+
import TypeTags from './index';
|
|
6
|
+
import { ThemeType } from '../../../types/types';
|
|
7
|
+
import { ITypeTagsProps } from '../../../types/types';
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
title: 'Components/Event Core/Type Tags',
|
|
11
|
+
component: TypeTags,
|
|
12
|
+
parameters: {
|
|
13
|
+
docs: {
|
|
14
|
+
description: {
|
|
15
|
+
component:
|
|
16
|
+
'Type Tags are used on event components when it is key to show users a single, or number of, pieces of information related to the event, such as genre or location. The component uses the ‘Overline 1’ typography style. It is flexible in width so it works to the component it sits within.',
|
|
17
|
+
withSource: 'none',
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
design: {
|
|
21
|
+
type: 'figma',
|
|
22
|
+
url: 'https://www.figma.com/file/PtlqtJAjr87djTyD0x40m9/ROH%3A-Design-System-%26-Documentation?node-id=1%3A17',
|
|
23
|
+
},
|
|
24
|
+
jest: ['TypeTags'],
|
|
25
|
+
},
|
|
26
|
+
decorators: [
|
|
27
|
+
(Story) => (
|
|
28
|
+
<ThemeProvider theme={ThemeType.Core}>
|
|
29
|
+
<GlobalStyles />
|
|
30
|
+
{Story()}
|
|
31
|
+
</ThemeProvider>
|
|
32
|
+
),
|
|
33
|
+
],
|
|
34
|
+
} as Meta;
|
|
35
|
+
|
|
36
|
+
const Template: Story<ITypeTagsProps> = (args) => <TypeTags {...args} />;
|
|
37
|
+
|
|
38
|
+
export const SingleTag = Template.bind({});
|
|
39
|
+
|
|
40
|
+
SingleTag.args = {
|
|
41
|
+
list: ['This is a tag'],
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
export const MultipleTags = Template.bind({});
|
|
45
|
+
|
|
46
|
+
MultipleTags.args = {
|
|
47
|
+
list: ['Ballet and Opera', 'Main Stage', 'Some other tag'],
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
MultipleTags.parameters = {
|
|
51
|
+
docs: {
|
|
52
|
+
description: {
|
|
53
|
+
story:
|
|
54
|
+
'A Type Tag component can hold multiple tags. When this happens, they should be spaced using an Em Dash (—) with a single space on either side of it.',
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
|
|
3
|
+
export const TypeTag = styled.li`
|
|
4
|
+
color: var(--base-color-black);
|
|
5
|
+
display: inline-block;
|
|
6
|
+
font-size: var(--font-size-overline-1);
|
|
7
|
+
font-family: var(--font-family-overline);
|
|
8
|
+
font-weight: var(--font-weigth-overline-1);
|
|
9
|
+
letter-spacing: var(--letter-spacing-overline-1);
|
|
10
|
+
line-height: var(--line-height-overline-1);
|
|
11
|
+
margin: 0;
|
|
12
|
+
text-transform: var(--text-transform-overline-1);
|
|
13
|
+
|
|
14
|
+
&:before {
|
|
15
|
+
content: '—';
|
|
16
|
+
margin: 0 0.5em;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&:first-child:before {
|
|
20
|
+
display: none;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
|
|
24
|
+
export const TypeTagsContainer = styled.ul`
|
|
25
|
+
list-style-type: none;
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding: 0;
|
|
28
|
+
`;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import TypeTags from './TypeTags';
|
|
4
|
+
|
|
5
|
+
describe('TypeTags component', () => {
|
|
6
|
+
it('renders tag with specific text for a single item', () => {
|
|
7
|
+
const list = ['tag1'];
|
|
8
|
+
|
|
9
|
+
const { getByText } = render(<TypeTags list={list} />);
|
|
10
|
+
|
|
11
|
+
expect(getByText(list[0])).toBeInTheDocument();
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
it('renders multiple tags for multiple items', () => {
|
|
15
|
+
const list = ['First tag', 'second tag', 'another tag'];
|
|
16
|
+
|
|
17
|
+
const { getByText } = render(<TypeTags list={list} />);
|
|
18
|
+
|
|
19
|
+
list.forEach((t) => expect(getByText(t)).toBeInTheDocument());
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TypeTag, TypeTagsContainer } from './TypeTags.style';
|
|
3
|
+
import { ITypeTagsProps } from '../../../types/types';
|
|
4
|
+
|
|
5
|
+
const TypeTags = ({ list }: ITypeTagsProps) => {
|
|
6
|
+
return (
|
|
7
|
+
<TypeTagsContainer>
|
|
8
|
+
{list.map((t) => (
|
|
9
|
+
<TypeTag key={t}>{t}</TypeTag>
|
|
10
|
+
))}
|
|
11
|
+
</TypeTagsContainer>
|
|
12
|
+
);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default TypeTags;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { PrimaryButton, SecondaryButton, TertiaryButton } from './Buttons';
|
|
2
|
+
import { Grid, GridItem } from './Grid';
|
|
3
|
+
import { Icon } from './Icons';
|
|
4
|
+
import Heading from './Heading';
|
|
5
|
+
import Sponsorship from './Sponsorship';
|
|
6
|
+
import SectionSplitter from './SectionSplitter';
|
|
7
|
+
import ImageAspectRatioWrapper from './ImageAspectRatioWrapper';
|
|
8
|
+
import TypeTags from './TypeTags';
|
|
9
|
+
|
|
10
|
+
export {
|
|
11
|
+
Grid,
|
|
12
|
+
GridItem,
|
|
13
|
+
Heading,
|
|
14
|
+
Icon,
|
|
15
|
+
ImageAspectRatioWrapper,
|
|
16
|
+
PrimaryButton,
|
|
17
|
+
SecondaryButton,
|
|
18
|
+
SectionSplitter,
|
|
19
|
+
Sponsorship,
|
|
20
|
+
TertiaryButton,
|
|
21
|
+
TypeTags,
|
|
22
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Grid,
|
|
3
|
+
GridItem,
|
|
4
|
+
Heading,
|
|
5
|
+
Icon,
|
|
6
|
+
Sponsorship,
|
|
7
|
+
PrimaryButton,
|
|
8
|
+
SecondaryButton,
|
|
9
|
+
TertiaryButton,
|
|
10
|
+
SectionSplitter,
|
|
11
|
+
TypeTags,
|
|
12
|
+
} from './atoms';
|
|
13
|
+
import { Footer, Navigation } from './organisms';
|
|
14
|
+
import { Editorial, PeopleListing, PromoWithTitle, SectionTitle, TextOnly } from './molecules';
|
|
15
|
+
import ThemeProvider from '../styles/ThemeProvider';
|
|
16
|
+
import GlobalStyles from '../styles/GlobalStyles';
|
|
17
|
+
|
|
18
|
+
export {
|
|
19
|
+
Editorial,
|
|
20
|
+
Footer,
|
|
21
|
+
GlobalStyles,
|
|
22
|
+
Grid,
|
|
23
|
+
GridItem,
|
|
24
|
+
Heading,
|
|
25
|
+
Icon,
|
|
26
|
+
Navigation,
|
|
27
|
+
PeopleListing,
|
|
28
|
+
PrimaryButton,
|
|
29
|
+
PromoWithTitle,
|
|
30
|
+
SecondaryButton,
|
|
31
|
+
SectionTitle,
|
|
32
|
+
Sponsorship,
|
|
33
|
+
TertiaryButton,
|
|
34
|
+
TextOnly,
|
|
35
|
+
ThemeProvider,
|
|
36
|
+
SectionSplitter,
|
|
37
|
+
TypeTags,
|
|
38
|
+
};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import styled from 'styled-components';
|
|
2
|
+
import { devices } from '../../../styles/viewports';
|
|
3
|
+
|
|
4
|
+
export const ContactNewsletterWrapper = styled.div`
|
|
5
|
+
display: grid;
|
|
6
|
+
grid-template-columns: calc(50% - 1px) 2px calc(50% - 1px);
|
|
7
|
+
grid-template-rows: 100px;
|
|
8
|
+
gap: 0;
|
|
9
|
+
|
|
10
|
+
@media ${devices.mobile} {
|
|
11
|
+
& {
|
|
12
|
+
display: grid;
|
|
13
|
+
grid-template-columns: 100%;
|
|
14
|
+
grid-template-rows: min-content min-content;
|
|
15
|
+
gap: var(--footer-vertical-spacing-lg);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
`;
|
|
19
|
+
|
|
20
|
+
export const ContactNewsletterSeparator = styled.div`
|
|
21
|
+
grid-column: 2;
|
|
22
|
+
justify-self: center;
|
|
23
|
+
height: 100%;
|
|
24
|
+
border: 1px solid var(--base-color-white);
|
|
25
|
+
|
|
26
|
+
@media ${devices.mobile} {
|
|
27
|
+
& {
|
|
28
|
+
grid-column: auto;
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
`;
|
|
33
|
+
|
|
34
|
+
export const SignUpWrapper = styled.div`
|
|
35
|
+
grid-column: 1;
|
|
36
|
+
padding-top: 9px;
|
|
37
|
+
justify-self: center;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
align-items: center;
|
|
41
|
+
|
|
42
|
+
@media ${devices.mobile} {
|
|
43
|
+
& {
|
|
44
|
+
grid-column: auto;
|
|
45
|
+
align-items: start;
|
|
46
|
+
justify-self: start;
|
|
47
|
+
padding-top: 0;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
export const SignUpText = styled.p`
|
|
53
|
+
font-family: var(--font-family-body);
|
|
54
|
+
font-size: var(--font-size-body-2);
|
|
55
|
+
line-height: var(--line-height-body-2);
|
|
56
|
+
width: 60%;
|
|
57
|
+
margin: 0 auto;
|
|
58
|
+
height: 60px;
|
|
59
|
+
text-align: center;
|
|
60
|
+
|
|
61
|
+
@media ${devices.mobile} {
|
|
62
|
+
& {
|
|
63
|
+
width: 100%;
|
|
64
|
+
height: auto;
|
|
65
|
+
text-align: left;
|
|
66
|
+
margin-bottom: var(--footer-vertical-spacing-lg);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
70
|
+
|
|
71
|
+
export const ContactWrapper = styled.div`
|
|
72
|
+
grid-column: 3;
|
|
73
|
+
justify-self: center;
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: column;
|
|
76
|
+
align-items: center;
|
|
77
|
+
padding-top: 9px;
|
|
78
|
+
|
|
79
|
+
@media ${devices.mobile} {
|
|
80
|
+
& {
|
|
81
|
+
grid-column: auto;
|
|
82
|
+
align-items: start;
|
|
83
|
+
justify-self: start;
|
|
84
|
+
padding-top: 0;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`;
|
|
88
|
+
|
|
89
|
+
export const MediaLinksWrapper = styled.div`
|
|
90
|
+
display: flex;
|
|
91
|
+
gap: var(--footer-media-gap);
|
|
92
|
+
height: 60px;
|
|
93
|
+
|
|
94
|
+
@media ${devices.mobile} {
|
|
95
|
+
& {
|
|
96
|
+
height: auto;
|
|
97
|
+
margin-bottom: var(--footer-vertical-spacing-lg);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
`;
|
|
101
|
+
|
|
102
|
+
export const MediaIconWrapper = styled.a`
|
|
103
|
+
height: var(--footer-media-icon-height);
|
|
104
|
+
width: var(--footer-media-icon-width);
|
|
105
|
+
`;
|
|
106
|
+
|
|
107
|
+
export const TextLinkWrapper = styled.div`
|
|
108
|
+
&&& {
|
|
109
|
+
font-family: var(--font-family-overline);
|
|
110
|
+
font-size: var(--font-size-overline-1);
|
|
111
|
+
font-weight: var(--font-weigth-overline-1);
|
|
112
|
+
line-height: var(--line-height-overline-1);
|
|
113
|
+
letter-spacing: var(--letter-spacing-overline-1);
|
|
114
|
+
text-transform: var(--text-transform-overline-1);
|
|
115
|
+
}
|
|
116
|
+
`;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render } from '@testing-library/react';
|
|
3
|
+
import ContactNewsletter from './ContactNewsletter';
|
|
4
|
+
import { SocialMediaLink } from '../../../types/footer';
|
|
5
|
+
|
|
6
|
+
describe('ContactNewsletter component', () => {
|
|
7
|
+
const signUpText = 'Foo text signup';
|
|
8
|
+
const signUpLink = {
|
|
9
|
+
title: 'SignUp Link',
|
|
10
|
+
href: '/test-signup',
|
|
11
|
+
dataRoh: 'foo',
|
|
12
|
+
};
|
|
13
|
+
const contact = {
|
|
14
|
+
title: 'Contact Link',
|
|
15
|
+
href: '/test-contact',
|
|
16
|
+
dataRoh: 'bar',
|
|
17
|
+
};
|
|
18
|
+
const socialMediaLinks = [
|
|
19
|
+
{
|
|
20
|
+
dataRoh: 'test-data2',
|
|
21
|
+
href: '/test',
|
|
22
|
+
name: 'Facebook',
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
dataRoh: 'test-data2',
|
|
26
|
+
href: '/test2',
|
|
27
|
+
name: 'Twitter',
|
|
28
|
+
},
|
|
29
|
+
] as SocialMediaLink[];
|
|
30
|
+
|
|
31
|
+
it('renders signup text', () => {
|
|
32
|
+
const { getByText } = render(
|
|
33
|
+
<ContactNewsletter
|
|
34
|
+
signUpText={signUpText}
|
|
35
|
+
signUpLink={signUpLink}
|
|
36
|
+
contact={contact}
|
|
37
|
+
socialMediaLinks={socialMediaLinks}
|
|
38
|
+
/>
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
expect(getByText(signUpText)).toBeInTheDocument();
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
it('renders signup link', () => {
|
|
45
|
+
const { getByText, getByTitle } = render(
|
|
46
|
+
<ContactNewsletter
|
|
47
|
+
signUpText={signUpText}
|
|
48
|
+
signUpLink={signUpLink}
|
|
49
|
+
contact={contact}
|
|
50
|
+
socialMediaLinks={socialMediaLinks}
|
|
51
|
+
/>
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
expect(getByText(signUpLink.title)).toBeInTheDocument();
|
|
55
|
+
expect(getByTitle(signUpLink.title)).toBeInTheDocument();
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
it('renders a list of social media links', () => {
|
|
59
|
+
const { getByTitle } = render(
|
|
60
|
+
<ContactNewsletter
|
|
61
|
+
signUpText={signUpText}
|
|
62
|
+
signUpLink={signUpLink}
|
|
63
|
+
contact={contact}
|
|
64
|
+
socialMediaLinks={socialMediaLinks}
|
|
65
|
+
/>
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
expect(getByTitle(socialMediaLinks[0].name)).toBeInTheDocument();
|
|
69
|
+
expect(getByTitle(socialMediaLinks[1].name)).toBeInTheDocument();
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
it('renders contact link', () => {
|
|
73
|
+
const { getByText, getByTitle } = render(
|
|
74
|
+
<ContactNewsletter
|
|
75
|
+
signUpText={signUpText}
|
|
76
|
+
signUpLink={signUpLink}
|
|
77
|
+
contact={contact}
|
|
78
|
+
socialMediaLinks={socialMediaLinks}
|
|
79
|
+
/>
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
expect(getByText(contact.title)).toBeInTheDocument();
|
|
83
|
+
expect(getByTitle(contact.title)).toBeInTheDocument();
|
|
84
|
+
});
|
|
85
|
+
});
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import React, { FunctionComponent } from 'react';
|
|
2
|
+
import TextLink from '../../atoms/TextLink';
|
|
3
|
+
import { Icon } from '../../atoms/Icons';
|
|
4
|
+
import {
|
|
5
|
+
ContactNewsletterWrapper,
|
|
6
|
+
ContactNewsletterSeparator,
|
|
7
|
+
SignUpWrapper,
|
|
8
|
+
ContactWrapper,
|
|
9
|
+
SignUpText,
|
|
10
|
+
MediaLinksWrapper,
|
|
11
|
+
MediaIconWrapper,
|
|
12
|
+
TextLinkWrapper,
|
|
13
|
+
} from './ContactNewsletter.style';
|
|
14
|
+
import { IContactNewsletterProps } from '../../../types/footer';
|
|
15
|
+
|
|
16
|
+
const ContactNewsletter: FunctionComponent<IContactNewsletterProps> = ({
|
|
17
|
+
signUpText,
|
|
18
|
+
signUpLink,
|
|
19
|
+
socialMediaLinks,
|
|
20
|
+
contact,
|
|
21
|
+
}) => {
|
|
22
|
+
return (
|
|
23
|
+
<ContactNewsletterWrapper>
|
|
24
|
+
<SignUpWrapper>
|
|
25
|
+
<SignUpText>{signUpText}</SignUpText>
|
|
26
|
+
<TextLinkWrapper>
|
|
27
|
+
<TextLink href={signUpLink.href} title={signUpLink.title}>
|
|
28
|
+
{signUpLink.title}
|
|
29
|
+
</TextLink>
|
|
30
|
+
</TextLinkWrapper>
|
|
31
|
+
</SignUpWrapper>
|
|
32
|
+
<ContactNewsletterSeparator />
|
|
33
|
+
<ContactWrapper>
|
|
34
|
+
<MediaLinksWrapper>
|
|
35
|
+
{socialMediaLinks.map((mediaLink) => (
|
|
36
|
+
<MediaIconWrapper key={mediaLink.name} href={mediaLink.href} title={mediaLink.name}>
|
|
37
|
+
<Icon iconName={mediaLink.name} color="white" />
|
|
38
|
+
</MediaIconWrapper>
|
|
39
|
+
))}
|
|
40
|
+
</MediaLinksWrapper>
|
|
41
|
+
<TextLinkWrapper>
|
|
42
|
+
<TextLink href={contact.href} title={contact.title}>
|
|
43
|
+
{contact.title}
|
|
44
|
+
</TextLink>
|
|
45
|
+
</TextLinkWrapper>
|
|
46
|
+
</ContactWrapper>
|
|
47
|
+
</ContactNewsletterWrapper>
|
|
48
|
+
);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export default ContactNewsletter;
|