@royaloperahouse/chord 0.1.0 → 0.3.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.
Files changed (272) hide show
  1. package/README.md +9 -0
  2. package/dist/chord.cjs.development.js +567 -278
  3. package/dist/chord.cjs.development.js.map +1 -1
  4. package/dist/chord.cjs.production.min.js +1 -1
  5. package/dist/chord.cjs.production.min.js.map +1 -1
  6. package/dist/chord.esm.js +567 -279
  7. package/dist/chord.esm.js.map +1 -1
  8. package/dist/components/atoms/Account/Account.d.ts +1 -1
  9. package/dist/components/atoms/Basket/Basket.d.ts +1 -1
  10. package/dist/components/atoms/Dropdown/Dropdown.d.ts +1 -1
  11. package/dist/components/atoms/Dropdown/Dropdown.style.d.ts +1 -1
  12. package/dist/components/atoms/Icons/SvgIcons/index.d.ts +0 -1
  13. package/dist/components/atoms/Logo/Logo.d.ts +1 -1
  14. package/dist/components/atoms/Search/Search.d.ts +1 -1
  15. package/dist/components/atoms/SponsorLogo/SponsorLogo.d.ts +4 -0
  16. package/dist/components/atoms/SponsorLogo/SponsorLogo.style.d.ts +1 -0
  17. package/dist/components/atoms/SponsorLogo/index.d.ts +2 -0
  18. package/dist/components/atoms/Tab/Tab.d.ts +1 -1
  19. package/dist/components/atoms/index.d.ts +2 -1
  20. package/dist/components/molecules/NavTop/NavTop.d.ts +1 -1
  21. package/dist/components/molecules/Tabs/Tabs.d.ts +1 -1
  22. package/dist/components/molecules/Tabs/Tabs.style.d.ts +1 -1
  23. package/dist/components/organisms/Navigation/Navigation.d.ts +1 -1
  24. package/dist/index.d.ts +2 -2
  25. package/dist/styles/themes.d.ts +6 -0
  26. package/dist/types/navigation.d.ts +24 -0
  27. package/dist/types/types.d.ts +24 -2
  28. package/package.json +10 -6
  29. package/dist/components/atoms/Icons/SvgIcons/Logos/Sponsors/Sponsor.svg.d.ts +0 -4
  30. package/dist/components/atoms/Image/Image.d.ts +0 -38
  31. package/src/components/atoms/Account/Account.stories.tsx +0 -93
  32. package/src/components/atoms/Account/Account.test.tsx +0 -54
  33. package/src/components/atoms/Account/Account.tsx +0 -25
  34. package/src/components/atoms/Account/index.tsx +0 -3
  35. package/src/components/atoms/Basket/Basket.stories.tsx +0 -79
  36. package/src/components/atoms/Basket/Basket.style.tsx +0 -74
  37. package/src/components/atoms/Basket/Basket.test.tsx +0 -35
  38. package/src/components/atoms/Basket/Basket.tsx +0 -34
  39. package/src/components/atoms/Basket/index.tsx +0 -3
  40. package/src/components/atoms/Buttons/Button.style.tsx +0 -31
  41. package/src/components/atoms/Buttons/Button.tsx +0 -21
  42. package/src/components/atoms/Buttons/ButtonIconWrapper.style.tsx +0 -10
  43. package/src/components/atoms/Buttons/Buttons.stories.tsx +0 -77
  44. package/src/components/atoms/Buttons/Primary/PrimaryButton.stories.tsx +0 -94
  45. package/src/components/atoms/Buttons/Primary/PrimaryButton.test.tsx +0 -39
  46. package/src/components/atoms/Buttons/Primary/PrimaryButton.tsx +0 -14
  47. package/src/components/atoms/Buttons/Primary/PrimaryButtonWrapper.style.tsx +0 -11
  48. package/src/components/atoms/Buttons/Secondary/SecondaryButton.stories.tsx +0 -84
  49. package/src/components/atoms/Buttons/Secondary/SecondaryButton.test.tsx +0 -39
  50. package/src/components/atoms/Buttons/Secondary/SecondaryButton.tsx +0 -14
  51. package/src/components/atoms/Buttons/Secondary/SecondaryButtonWrapper.style.tsx +0 -11
  52. package/src/components/atoms/Buttons/Tertiary/TertiaryButton.stories.tsx +0 -73
  53. package/src/components/atoms/Buttons/Tertiary/TertiaryButton.style.tsx +0 -29
  54. package/src/components/atoms/Buttons/Tertiary/TertiaryButton.test.tsx +0 -29
  55. package/src/components/atoms/Buttons/Tertiary/TertiaryButton.tsx +0 -18
  56. package/src/components/atoms/Buttons/index.tsx +0 -5
  57. package/src/components/atoms/Dropdown/Dropdown.stories.tsx +0 -153
  58. package/src/components/atoms/Dropdown/Dropdown.style.tsx +0 -64
  59. package/src/components/atoms/Dropdown/Dropdown.test.tsx +0 -67
  60. package/src/components/atoms/Dropdown/Dropdown.tsx +0 -131
  61. package/src/components/atoms/Dropdown/index.tsx +0 -3
  62. package/src/components/atoms/Grid/Grid.stories.tsx +0 -127
  63. package/src/components/atoms/Grid/Grid.test.tsx +0 -17
  64. package/src/components/atoms/Grid/Grid.tsx +0 -11
  65. package/src/components/atoms/Grid/GridItem.test.tsx +0 -25
  66. package/src/components/atoms/Grid/GridItem.tsx +0 -24
  67. package/src/components/atoms/Grid/index.tsx +0 -3
  68. package/src/components/atoms/Heading/Heading.stories.tsx +0 -44
  69. package/src/components/atoms/Heading/Heading.style.tsx +0 -14
  70. package/src/components/atoms/Heading/Heading.test.tsx +0 -13
  71. package/src/components/atoms/Heading/Heading.tsx +0 -15
  72. package/src/components/atoms/Heading/index.tsx +0 -3
  73. package/src/components/atoms/Icons/Icons.stories.tsx +0 -190
  74. package/src/components/atoms/Icons/Icons.style.tsx +0 -24
  75. package/src/components/atoms/Icons/Icons.test.tsx +0 -31
  76. package/src/components/atoms/Icons/Icons.tsx +0 -20
  77. package/src/components/atoms/Icons/StorybookSupport/Iconography.tsx +0 -27
  78. package/src/components/atoms/Icons/StorybookSupport/IconsDiv.style.tsx +0 -49
  79. package/src/components/atoms/Icons/SvgIcons/12px/Remove.svg.tsx +0 -11
  80. package/src/components/atoms/Icons/SvgIcons/12px/Tick.svg.tsx +0 -11
  81. package/src/components/atoms/Icons/SvgIcons/Actions/AddToMyList.svg.tsx +0 -13
  82. package/src/components/atoms/Icons/SvgIcons/Actions/BookTickets.svg.tsx +0 -20
  83. package/src/components/atoms/Icons/SvgIcons/Actions/ChooseDates.svg.tsx +0 -11
  84. package/src/components/atoms/Icons/SvgIcons/Actions/EditMyList.svg.tsx +0 -16
  85. package/src/components/atoms/Icons/SvgIcons/Actions/Filter.svg.tsx +0 -19
  86. package/src/components/atoms/Icons/SvgIcons/Actions/FindAScreening.svg.tsx +0 -31
  87. package/src/components/atoms/Icons/SvgIcons/Actions/OnMyList.svg.tsx +0 -16
  88. package/src/components/atoms/Icons/SvgIcons/Actions/Reminder.svg.tsx +0 -11
  89. package/src/components/atoms/Icons/SvgIcons/Actions/Subscribe.svg.tsx +0 -9
  90. package/src/components/atoms/Icons/SvgIcons/Actions/Watch.svg.tsx +0 -9
  91. package/src/components/atoms/Icons/SvgIcons/Arrows/Arrow.svg.tsx +0 -11
  92. package/src/components/atoms/Icons/SvgIcons/Arrows/CarouselArrow.svg.tsx +0 -11
  93. package/src/components/atoms/Icons/SvgIcons/Arrows/DropdownArrow.svg.tsx +0 -8
  94. package/src/components/atoms/Icons/SvgIcons/Descriptors/Cinema.svg.tsx +0 -31
  95. package/src/components/atoms/Icons/SvgIcons/Descriptors/Clock.svg.tsx +0 -15
  96. package/src/components/atoms/Icons/SvgIcons/Descriptors/CreditCard.svg.tsx +0 -19
  97. package/src/components/atoms/Icons/SvgIcons/Descriptors/Email.svg.tsx +0 -11
  98. package/src/components/atoms/Icons/SvgIcons/Descriptors/Info.svg.tsx +0 -13
  99. package/src/components/atoms/Icons/SvgIcons/Descriptors/List.svg.tsx +0 -22
  100. package/src/components/atoms/Icons/SvgIcons/Descriptors/Location.svg.tsx +0 -15
  101. package/src/components/atoms/Icons/SvgIcons/Descriptors/PDF.svg.tsx +0 -20
  102. package/src/components/atoms/Icons/SvgIcons/Descriptors/Phone.svg.tsx +0 -11
  103. package/src/components/atoms/Icons/SvgIcons/Descriptors/Print.svg.tsx +0 -11
  104. package/src/components/atoms/Icons/SvgIcons/Descriptors/Secure.svg.tsx +0 -15
  105. package/src/components/atoms/Icons/SvgIcons/Descriptors/Tickets.svg.tsx +0 -13
  106. package/src/components/atoms/Icons/SvgIcons/Logos/Social/Facebook.svg.tsx +0 -11
  107. package/src/components/atoms/Icons/SvgIcons/Logos/Social/Instagram.svg.tsx +0 -19
  108. package/src/components/atoms/Icons/SvgIcons/Logos/Social/Tiktok.svg.tsx +0 -11
  109. package/src/components/atoms/Icons/SvgIcons/Logos/Social/Twitter.svg.tsx +0 -11
  110. package/src/components/atoms/Icons/SvgIcons/Logos/Social/Youtube.svg.tsx +0 -11
  111. package/src/components/atoms/Icons/SvgIcons/Logos/Sponsors/Sponsor.svg.tsx +0 -26
  112. package/src/components/atoms/Icons/SvgIcons/Navigation/BalletAndDance.svg.tsx +0 -11
  113. package/src/components/atoms/Icons/SvgIcons/Navigation/Basket.svg.tsx +0 -11
  114. package/src/components/atoms/Icons/SvgIcons/Navigation/BasketFull.svg.tsx +0 -11
  115. package/src/components/atoms/Icons/SvgIcons/Navigation/Home.svg.tsx +0 -11
  116. package/src/components/atoms/Icons/SvgIcons/Navigation/LiveStream.svg.tsx +0 -24
  117. package/src/components/atoms/Icons/SvgIcons/Navigation/Menu.svg.tsx +0 -10
  118. package/src/components/atoms/Icons/SvgIcons/Navigation/OperaAndMusic.svg.tsx +0 -17
  119. package/src/components/atoms/Icons/SvgIcons/Navigation/Search.svg.tsx +0 -11
  120. package/src/components/atoms/Icons/SvgIcons/Navigation/Settings.svg.tsx +0 -15
  121. package/src/components/atoms/Icons/SvgIcons/Navigation/User.svg.tsx +0 -15
  122. package/src/components/atoms/Icons/SvgIcons/Navigation/UserSignedIn.svg.tsx +0 -12
  123. package/src/components/atoms/Icons/SvgIcons/Text/Delete.svg.tsx +0 -12
  124. package/src/components/atoms/Icons/SvgIcons/Text/Shift.svg.tsx +0 -8
  125. package/src/components/atoms/Icons/SvgIcons/Text/Space.svg.tsx +0 -8
  126. package/src/components/atoms/Icons/SvgIcons/Utility/Close.svg.tsx +0 -11
  127. package/src/components/atoms/Icons/SvgIcons/Utility/Confirm.svg.tsx +0 -8
  128. package/src/components/atoms/Icons/SvgIcons/Utility/Detract.svg.tsx +0 -8
  129. package/src/components/atoms/Icons/SvgIcons/Utility/Expand.svg.tsx +0 -8
  130. package/src/components/atoms/Icons/SvgIcons/Utility/ExternalLink.svg.tsx +0 -12
  131. package/src/components/atoms/Icons/SvgIcons/Utility/GridView.svg.tsx +0 -11
  132. package/src/components/atoms/Icons/SvgIcons/Utility/ListView.svg.tsx +0 -10
  133. package/src/components/atoms/Icons/SvgIcons/Utility/Refresh.svg.tsx +0 -15
  134. package/src/components/atoms/Icons/SvgIcons/Video/AudioDescription.svg.tsx +0 -16
  135. package/src/components/atoms/Icons/SvgIcons/Video/Back10.svg.tsx +0 -16
  136. package/src/components/atoms/Icons/SvgIcons/Video/Clips.svg.tsx +0 -10
  137. package/src/components/atoms/Icons/SvgIcons/Video/Forward10.svg.tsx +0 -16
  138. package/src/components/atoms/Icons/SvgIcons/Video/FullScreen.svg.tsx +0 -11
  139. package/src/components/atoms/Icons/SvgIcons/Video/Minimise.svg.tsx +0 -11
  140. package/src/components/atoms/Icons/SvgIcons/Video/Muted.svg.tsx +0 -15
  141. package/src/components/atoms/Icons/SvgIcons/Video/Pause.svg.tsx +0 -9
  142. package/src/components/atoms/Icons/SvgIcons/Video/Play.svg.tsx +0 -9
  143. package/src/components/atoms/Icons/SvgIcons/Video/Restart.svg.tsx +0 -11
  144. package/src/components/atoms/Icons/SvgIcons/Video/Subtitles.svg.tsx +0 -17
  145. package/src/components/atoms/Icons/SvgIcons/Video/Trailer.svg.tsx +0 -12
  146. package/src/components/atoms/Icons/SvgIcons/Video/Volume.svg.tsx +0 -19
  147. package/src/components/atoms/Icons/SvgIcons/index.tsx +0 -149
  148. package/src/components/atoms/Icons/__snapshots__/Icons.test.tsx.snap +0 -1954
  149. package/src/components/atoms/Icons/index.tsx +0 -2
  150. package/src/components/atoms/Image/Image.tsx +0 -72
  151. package/src/components/atoms/ImageAspectRatioWrapper/ImageAspectRatio.test.tsx +0 -23
  152. package/src/components/atoms/ImageAspectRatioWrapper/ImageAspectRatioWrapper.stories.tsx +0 -71
  153. package/src/components/atoms/ImageAspectRatioWrapper/ImageAspectRatioWrapper.tsx +0 -15
  154. package/src/components/atoms/ImageAspectRatioWrapper/index.tsx +0 -3
  155. package/src/components/atoms/IndividualListing/IndividualListing.stories.tsx +0 -51
  156. package/src/components/atoms/IndividualListing/IndividualListing.style.tsx +0 -33
  157. package/src/components/atoms/IndividualListing/IndividualListing.test.tsx +0 -30
  158. package/src/components/atoms/IndividualListing/IndividualListing.tsx +0 -22
  159. package/src/components/atoms/IndividualListing/index.tsx +0 -3
  160. package/src/components/atoms/Logo/Logo.stories.tsx +0 -48
  161. package/src/components/atoms/Logo/Logo.style.tsx +0 -18
  162. package/src/components/atoms/Logo/Logo.tsx +0 -30
  163. package/src/components/atoms/Logo/index.tsx +0 -3
  164. package/src/components/atoms/Search/Search.stories.tsx +0 -63
  165. package/src/components/atoms/Search/Search.style.tsx +0 -36
  166. package/src/components/atoms/Search/Search.test.tsx +0 -24
  167. package/src/components/atoms/Search/Search.tsx +0 -16
  168. package/src/components/atoms/Search/index.tsx +0 -3
  169. package/src/components/atoms/SectionSplitter/SectionSplitter.stories.tsx +0 -47
  170. package/src/components/atoms/SectionSplitter/SectionSplitter.style.tsx +0 -11
  171. package/src/components/atoms/SectionSplitter/SectionSplitter.tsx +0 -22
  172. package/src/components/atoms/SectionSplitter/index.tsx +0 -3
  173. package/src/components/atoms/Sponsorship/Sponsorship.stories.tsx +0 -38
  174. package/src/components/atoms/Sponsorship/Sponsorship.test.tsx +0 -36
  175. package/src/components/atoms/Sponsorship/Sponsorship.tsx +0 -53
  176. package/src/components/atoms/Sponsorship/index.tsx +0 -3
  177. package/src/components/atoms/Tab/Tab.stories.tsx +0 -67
  178. package/src/components/atoms/Tab/Tab.style.tsx +0 -105
  179. package/src/components/atoms/Tab/Tab.test.tsx +0 -28
  180. package/src/components/atoms/Tab/Tab.tsx +0 -34
  181. package/src/components/atoms/Tab/index.tsx +0 -3
  182. package/src/components/atoms/TextLink/TextLink.stories.tsx +0 -81
  183. package/src/components/atoms/TextLink/TextLink.style.tsx +0 -26
  184. package/src/components/atoms/TextLink/TextLink.test.tsx +0 -39
  185. package/src/components/atoms/TextLink/TextLink.tsx +0 -20
  186. package/src/components/atoms/TextLink/index.tsx +0 -3
  187. package/src/components/atoms/TypeTags/TypeTags.stories.tsx +0 -57
  188. package/src/components/atoms/TypeTags/TypeTags.style.tsx +0 -28
  189. package/src/components/atoms/TypeTags/TypeTags.test.tsx +0 -21
  190. package/src/components/atoms/TypeTags/TypeTags.tsx +0 -15
  191. package/src/components/atoms/TypeTags/index.tsx +0 -3
  192. package/src/components/atoms/index.tsx +0 -22
  193. package/src/components/index.tsx +0 -38
  194. package/src/components/molecules/ContactNewsletter/ContactNewsletter.style.tsx +0 -116
  195. package/src/components/molecules/ContactNewsletter/ContactNewsletter.test.tsx +0 -85
  196. package/src/components/molecules/ContactNewsletter/ContactNewsletter.tsx +0 -51
  197. package/src/components/molecules/ContactNewsletter/index.tsx +0 -3
  198. package/src/components/molecules/Editorial/Editorial.stories.tsx +0 -78
  199. package/src/components/molecules/Editorial/Editorial.style.tsx +0 -73
  200. package/src/components/molecules/Editorial/Editorial.test.tsx +0 -73
  201. package/src/components/molecules/Editorial/Editorial.tsx +0 -32
  202. package/src/components/molecules/Editorial/index.tsx +0 -3
  203. package/src/components/molecules/NavTop/NavTop.stories.tsx +0 -95
  204. package/src/components/molecules/NavTop/NavTop.style.tsx +0 -14
  205. package/src/components/molecules/NavTop/NavTop.test.tsx +0 -113
  206. package/src/components/molecules/NavTop/NavTop.tsx +0 -27
  207. package/src/components/molecules/NavTop/index.tsx +0 -3
  208. package/src/components/molecules/PeopleListing/PeopleListing.stories.tsx +0 -185
  209. package/src/components/molecules/PeopleListing/PeopleListing.style.tsx +0 -8
  210. package/src/components/molecules/PeopleListing/PeopleListing.test.tsx +0 -24
  211. package/src/components/molecules/PeopleListing/PeopleListing.tsx +0 -27
  212. package/src/components/molecules/PeopleListing/index.tsx +0 -3
  213. package/src/components/molecules/PolicyLinks/PolicyLinks.style.tsx +0 -41
  214. package/src/components/molecules/PolicyLinks/PolicyLinks.test.tsx +0 -28
  215. package/src/components/molecules/PolicyLinks/PolicyLinks.tsx +0 -19
  216. package/src/components/molecules/PolicyLinks/index.tsx +0 -3
  217. package/src/components/molecules/PromoWithTitle/PromoWithTitle.stories.tsx +0 -119
  218. package/src/components/molecules/PromoWithTitle/PromoWithTitle.style.tsx +0 -108
  219. package/src/components/molecules/PromoWithTitle/PromoWithTitle.test.tsx +0 -75
  220. package/src/components/molecules/PromoWithTitle/PromoWithTitle.tsx +0 -53
  221. package/src/components/molecules/PromoWithTitle/index.tsx +0 -3
  222. package/src/components/molecules/SearchBar/SearchBar.stories.tsx +0 -35
  223. package/src/components/molecules/SearchBar/SearchBar.style.tsx +0 -66
  224. package/src/components/molecules/SearchBar/SearchBar.test.tsx +0 -63
  225. package/src/components/molecules/SearchBar/SearchBar.tsx +0 -69
  226. package/src/components/molecules/SearchBar/index.tsx +0 -3
  227. package/src/components/molecules/SectionTitle/SectionTitle.stories.tsx +0 -68
  228. package/src/components/molecules/SectionTitle/SectionTitle.style.tsx +0 -34
  229. package/src/components/molecules/SectionTitle/SectionTitle.test.tsx +0 -35
  230. package/src/components/molecules/SectionTitle/SectionTitle.tsx +0 -25
  231. package/src/components/molecules/SectionTitle/index.tsx +0 -3
  232. package/src/components/molecules/Tabs/Tabs.stories.tsx +0 -101
  233. package/src/components/molecules/Tabs/Tabs.style.tsx +0 -74
  234. package/src/components/molecules/Tabs/Tabs.test.tsx +0 -149
  235. package/src/components/molecules/Tabs/Tabs.tsx +0 -67
  236. package/src/components/molecules/Tabs/index.tsx +0 -3
  237. package/src/components/molecules/TextOnly/TextOnly.stories.tsx +0 -74
  238. package/src/components/molecules/TextOnly/TextOnly.style.tsx +0 -56
  239. package/src/components/molecules/TextOnly/TextOnly.test.tsx +0 -79
  240. package/src/components/molecules/TextOnly/TextOnly.tsx +0 -16
  241. package/src/components/molecules/TextOnly/index.tsx +0 -3
  242. package/src/components/molecules/index.tsx +0 -7
  243. package/src/components/organisms/Footer/Footer.stories.tsx +0 -54
  244. package/src/components/organisms/Footer/Footer.style.tsx +0 -72
  245. package/src/components/organisms/Footer/Footer.test.tsx +0 -31
  246. package/src/components/organisms/Footer/Footer.tsx +0 -53
  247. package/src/components/organisms/Footer/exampleData.json +0 -78
  248. package/src/components/organisms/Footer/index.tsx +0 -3
  249. package/src/components/organisms/Navigation/Navigation.stories.tsx +0 -110
  250. package/src/components/organisms/Navigation/Navigation.style.tsx +0 -87
  251. package/src/components/organisms/Navigation/Navigation.test.tsx +0 -115
  252. package/src/components/organisms/Navigation/Navigation.tsx +0 -109
  253. package/src/components/organisms/Navigation/index.tsx +0 -3
  254. package/src/components/organisms/Navigation/menuData.json +0 -104
  255. package/src/components/organisms/index.tsx +0 -4
  256. package/src/index.tsx +0 -44
  257. package/src/jest.setup.ts +0 -1
  258. package/src/styles/GlobalStyles.tsx +0 -205
  259. package/src/styles/StorybookSupport/Colours/Colours.stories.mdx +0 -101
  260. package/src/styles/StorybookSupport/Colours/StorybookColourBox.tsx +0 -32
  261. package/src/styles/ThemeProvider.tsx +0 -11
  262. package/src/styles/themes.ts +0 -398
  263. package/src/styles/viewports.ts +0 -14
  264. package/src/types/buttonTypes.ts +0 -42
  265. package/src/types/editorial.ts +0 -84
  266. package/src/types/footer.ts +0 -49
  267. package/src/types/iconTypes.ts +0 -38
  268. package/src/types/image.ts +0 -13
  269. package/src/types/images.d.ts +0 -1
  270. package/src/types/index.tsx +0 -5
  271. package/src/types/navigation.ts +0 -149
  272. package/src/types/types.ts +0 -276
@@ -1,3 +0,0 @@
1
- import Logo from './Logo';
2
-
3
- export default Logo;
@@ -1,63 +0,0 @@
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 Search from './index';
6
- import { ThemeType } from '../../../types/types';
7
- import { ISearchProps } from '../../../types/navigation';
8
-
9
- export default {
10
- title: 'Components/Navigation/Search',
11
- component: Search,
12
- argTypes: {
13
- ref: {
14
- table: { disable: true },
15
- },
16
- theme: {
17
- table: { disable: true },
18
- },
19
- as: {
20
- table: { disable: true },
21
- },
22
- forwardedAs: {
23
- table: { disable: true },
24
- },
25
- },
26
- parameters: {
27
- docs: {
28
- description: {
29
- component: 'Search button',
30
- withSource: 'none',
31
- },
32
- },
33
- design: {
34
- type: 'figma',
35
- url: 'https://www.figma.com/file/PtlqtJAjr87djTyD0x40m9/Royal-Opera-House-UI-Guide-and-Spec?node-id=166%3A0',
36
- },
37
- jest: ['Search'],
38
- },
39
- decorators: [
40
- (Story) => (
41
- <ThemeProvider theme={ThemeType.Core}>
42
- <GlobalStyles />
43
- {Story()}
44
- </ThemeProvider>
45
- ),
46
- ],
47
- } as Meta;
48
-
49
- const Template: Story<ISearchProps> = (args) => <Search {...args} />;
50
-
51
- export const SearchNotSelected = Template.bind({});
52
-
53
- SearchNotSelected.args = {
54
- selected: false,
55
- onClick: () => {},
56
- };
57
-
58
- export const SearchSelected = Template.bind({});
59
-
60
- SearchSelected.args = {
61
- selected: true,
62
- onClick: () => {},
63
- };
@@ -1,36 +0,0 @@
1
- import styled from 'styled-components';
2
- import { ISearchProps } from '../../../types/navigation';
3
-
4
- export const SearchContainer = styled.div<ISearchProps>`
5
- display: inline-flex;
6
- flex-direction: row;
7
- justify-content: flex-start;
8
- align-items: center;
9
- cursor: pointer;
10
- border-bottom: 1px solid var(--base-color-transparent);
11
- ${(props) => {
12
- if (props.selected) {
13
- return `
14
- border-bottom: 1px solid var(--base-color-primary);
15
- && svg path {
16
- fill: var(--base-color-primary);
17
- }
18
- `;
19
- }
20
- return '';
21
- }}
22
-
23
- :hover {
24
- border-bottom: 1px solid var(--base-color-primary);
25
- && svg path {
26
- fill: var(--base-color-primary);
27
- }
28
- }
29
- `;
30
-
31
- export const SvgContainer = styled.div`
32
- svg {
33
- width: var(--navigation-large-gap);
34
- height: var(--navigation-large-gap);
35
- }
36
- `;
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import { render, fireEvent } from '@testing-library/react';
3
- import Search from './Search';
4
-
5
- describe('Search component', () => {
6
- const onSearchHandler = jest.fn();
7
-
8
- it('renders text with specific text', () => {
9
- const selected = false;
10
-
11
- const { getByTestId } = render(<Search selected={selected} onClick={onSearchHandler}></Search>);
12
-
13
- expect(getByTestId('search-icon')).toBeInTheDocument();
14
- });
15
-
16
- it('calls onSearch callback when icon is clicked', () => {
17
- const selected = false;
18
-
19
- const { getByTestId } = render(<Search selected={selected} onClick={onSearchHandler}></Search>);
20
- fireEvent.click(getByTestId('search-icon'));
21
-
22
- expect(onSearchHandler).toBeCalled();
23
- });
24
- });
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { SearchContainer, SvgContainer } from './Search.style';
3
- import { ISearchProps } from '../../../types/navigation';
4
- import SvgIcon from '../Icons/Icons';
5
-
6
- const Search = ({ selected = false, onClick }: ISearchProps) => {
7
- return (
8
- <SearchContainer selected={selected} onClick={onClick} data-testid="search-icon">
9
- <SvgContainer>
10
- <SvgIcon iconName="Search" />
11
- </SvgContainer>
12
- </SearchContainer>
13
- );
14
- };
15
-
16
- export default Search;
@@ -1,3 +0,0 @@
1
- import Search from './Search';
2
-
3
- export default Search;
@@ -1,47 +0,0 @@
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 SectionSplitter from './index';
6
- import { ThemeType } from '../../../types/types';
7
- import { ISectionSplitterProps } from '../../../types/types';
8
-
9
- export default {
10
- title: 'Components/SectionSplitter',
11
- component: SectionSplitter,
12
- parameters: {
13
- docs: {
14
- description: {
15
- component: 'SectionSplitter',
16
- withSource: 'none',
17
- },
18
- },
19
- design: {
20
- type: 'figma',
21
- url:
22
- 'https://www.figma.com/file/PtlqtJAjr87djTyD0x40m9/ROH%3A-Design-System-%26-Documentation?node-id=2186%3A8597',
23
- },
24
- },
25
- decorators: [
26
- (Story) => (
27
- <ThemeProvider theme={ThemeType.Core}>
28
- <GlobalStyles />
29
- {Story()}
30
- </ThemeProvider>
31
- ),
32
- ],
33
- } as Meta;
34
-
35
- const Template: Story<ISectionSplitterProps> = (args) => <SectionSplitter {...args} />;
36
-
37
- export const SectionSplitterFullwidth = Template.bind({});
38
-
39
- SectionSplitterFullwidth.args = {
40
- fullWidth: true,
41
- };
42
-
43
- export const SectionSplitterTogrid = Template.bind({});
44
-
45
- SectionSplitterTogrid.args = {
46
- fullWidth: false,
47
- };
@@ -1,11 +0,0 @@
1
- import styled from 'styled-components';
2
- import { Grid } from '../../atoms/Grid';
3
-
4
- export const SectionSplitterContainer = styled(Grid)`
5
- height: 4px;
6
- `;
7
- export const Splitter = styled.div`
8
- width: 100%;
9
- height: 4px;
10
- background: var(--base-color-lightgrey);
11
- `;
@@ -1,22 +0,0 @@
1
- import React from 'react';
2
- import { SectionSplitterContainer, Splitter } from './SectionSplitter.style';
3
- import { GridItem } from '../../atoms/Grid';
4
- import { ISectionSplitterProps } from '../../../types/types';
5
-
6
- const SectionSplitter = ({ fullWidth = true }: ISectionSplitterProps) => {
7
- return (
8
- <SectionSplitterContainer>
9
- {fullWidth ? (
10
- <GridItem columnStartDesktop={1} columnSpanDesktop={16} columnStartDevice={1} columnSpanDevice={14}>
11
- <Splitter />
12
- </GridItem>
13
- ) : (
14
- <GridItem columnStartDesktop={3} columnSpanDesktop={12} columnStartDevice={2} columnSpanDevice={12}>
15
- <Splitter />
16
- </GridItem>
17
- )}
18
- </SectionSplitterContainer>
19
- );
20
- };
21
-
22
- export default SectionSplitter;
@@ -1,3 +0,0 @@
1
- import SectionSplitter from './SectionSplitter';
2
-
3
- export default SectionSplitter;
@@ -1,38 +0,0 @@
1
- import React from 'react';
2
- import { Meta, Story } from '@storybook/react';
3
- import Sponsorship from '.';
4
-
5
- const meta: Meta = {
6
- title: 'Foundations/Sponsorship',
7
- component: Sponsorship,
8
- parameters: {
9
- controls: { expanded: true },
10
- docs: {
11
- description: {
12
- component:
13
- 'The Rolex ticking clock is the primary sponsorship for the site. It only appears on certain pages, but must always sit in the same place. It must never appear at the same level as the ROH logo. On desktop, the clock sits at 60x60px in size and always sits beneath the navigation. It sits 20px below the navigation and on the outer margin (50px from the edge of the screen). It may go over images and colour blocks.',
14
- },
15
- },
16
- design: {
17
- type: 'figma',
18
- url: 'https://www.figma.com/file/PtlqtJAjr87djTyD0x40m9/ROH%3A-Design-System-%26-Documentation?node-id=16%3A2899',
19
- },
20
- },
21
- };
22
-
23
- export default meta;
24
-
25
- const Template: Story = (args) => <Sponsorship {...args} />;
26
-
27
- export const Default = Template.bind({});
28
- Default.storyName = 'Sponsorship';
29
- Default.parameters = {
30
- previewTabs: {
31
- canvas: { hidden: false },
32
- },
33
- design: {
34
- type: 'figma',
35
- url: 'https://www.figma.com/file/PtlqtJAjr87djTyD0x40m9/ROH:-Design-System-and-Documentation?node-id=16%3A2899',
36
- },
37
- jest: ['Sponsorship'],
38
- };
@@ -1,36 +0,0 @@
1
- import React from 'react';
2
- import { render } from '@testing-library/react';
3
- import Sponsorship from './Sponsorship';
4
-
5
- describe('Sponsorship component', () => {
6
- it('renders as an iframe', () => {
7
- const { container } = render(<Sponsorship />);
8
-
9
- const renderedNode = container.firstChild;
10
- const iframeNode = container.firstChild?.firstChild;
11
- expect(renderedNode?.nodeName).toBe('DIV');
12
- expect(iframeNode?.nodeName).toBe('IFRAME');
13
- });
14
-
15
- it('renders with default attributes', () => {
16
- const { container } = render(<Sponsorship />);
17
-
18
- const iframeNode = container.firstChild?.firstChild;
19
- expect(iframeNode).toHaveAttribute('src', 'https://static.roh.org.uk/rolex/rolex.html?size=80');
20
- expect(iframeNode).toHaveAttribute('data-roh', 'ImgAdvert');
21
- expect(iframeNode).toHaveAttribute('title', 'rolex');
22
- });
23
-
24
- it('renders with set attributes', () => {
25
- const src = 'my.url';
26
- const title = 'My title override';
27
- const dataRoh = 'dataRoh override';
28
-
29
- const { container } = render(<Sponsorship src={src} title={title} dataRoh={dataRoh} />);
30
-
31
- const iframeNode = container.firstChild?.firstChild;
32
- expect(iframeNode).toHaveAttribute('src', src);
33
- expect(iframeNode).toHaveAttribute('data-roh', dataRoh);
34
- expect(iframeNode).toHaveAttribute('title', title);
35
- });
36
- });
@@ -1,53 +0,0 @@
1
- import React, { FunctionComponent } from 'react';
2
- import styled from 'styled-components';
3
- import { devices } from '../../../styles/viewports';
4
- import { ISponsorshipProps } from '../../../types/types';
5
-
6
- const DEFAULT_SPONSORSHIP_IFRAME = 'https://static.roh.org.uk/rolex/rolex.html?size=80';
7
- const DEFAULT_SPONSORSHIP_TITLE = 'rolex';
8
- const DEFAULT_DATA_ROH = 'ImgAdvert';
9
-
10
- const SponsorshipStyled = styled.div`
11
- background-color: transparent;
12
- height: 80px;
13
- margin: 0px;
14
- overflow: hidden;
15
- padding: 0;
16
- width: 80px;
17
-
18
- & > iframe {
19
- border: 0;
20
- display: block;
21
- margin: 0px;
22
- padding: 0px;
23
- overflow: hidden;
24
- width: 100%;
25
- height: 100%;
26
- }
27
-
28
- @media ${devices.mobile} {
29
- & {
30
- height: 60px;
31
- width: 60px;
32
- }
33
- & iframe {
34
- height: 107px;
35
- transform: scale(0.75) translate(-26px, -19px);
36
- width: 107px;
37
- }
38
- }
39
- `;
40
-
41
- const Sponsorship: FunctionComponent<ISponsorshipProps> = ({
42
- src = DEFAULT_SPONSORSHIP_IFRAME,
43
- dataRoh = DEFAULT_DATA_ROH,
44
- title = DEFAULT_SPONSORSHIP_TITLE,
45
- }) => {
46
- return (
47
- <SponsorshipStyled>
48
- <iframe src={src} scrolling="no" data-roh={dataRoh} title={title} className="desktopIframe"></iframe>
49
- </SponsorshipStyled>
50
- );
51
- };
52
-
53
- export default Sponsorship;
@@ -1,3 +0,0 @@
1
- import Sponsorship from './Sponsorship';
2
-
3
- export default Sponsorship;
@@ -1,67 +0,0 @@
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 Tab from './index';
6
- import { ITabProps, ThemeType } from '../../../types/types';
7
-
8
- export default {
9
- title: 'Components/Tab',
10
- component: Tab,
11
- argTypes: {
12
- ref: {
13
- table: { disable: true },
14
- },
15
- theme: {
16
- table: { disable: true },
17
- },
18
- as: {
19
- table: { disable: true },
20
- },
21
- forwardedAs: {
22
- table: { disable: true },
23
- },
24
- },
25
- parameters: {
26
- docs: {
27
- description: {
28
- component: 'Tab component',
29
- withSource: 'none',
30
- },
31
- },
32
- design: {
33
- type: 'figma',
34
- url: 'https://www.figma.com/file/PtlqtJAjr87djTyD0x40m9/Royal-Opera-House-UI-Guide-and-Spec?node-id=166%3A0',
35
- },
36
- jest: ['Tab'],
37
- },
38
- decorators: [
39
- (Story) => (
40
- <ThemeProvider theme={ThemeType.Core}>
41
- <GlobalStyles />
42
- {Story()}
43
- </ThemeProvider>
44
- ),
45
- ],
46
- } as Meta;
47
-
48
- const Template: Story<ITabProps> = (args) => <Tab {...args} />;
49
-
50
- export const TabDefault = Template.bind({});
51
-
52
- TabDefault.args = {
53
- title: 'LINK TEXT',
54
- titleLink: 'link',
55
- selected: false,
56
- onClick: () => {},
57
- };
58
-
59
- export const TabWithProperIcon = Template.bind({});
60
-
61
- TabWithProperIcon.args = {
62
- title: 'LINK TEXT',
63
- titleLink: 'link 4',
64
- selected: true,
65
- iconName: 'User',
66
- onClick: () => {},
67
- };
@@ -1,105 +0,0 @@
1
- import styled from 'styled-components';
2
- import { ITabProps } from '../../../types/types';
3
- import { devices } from '../../../styles/viewports';
4
-
5
- export const TabText = styled.a<ITabProps>`
6
- font-size: var(--font-size-navigation);
7
- font-family: var(--font-family-navigation);
8
- color: var(--base-color-black);
9
- margin-right: 0px;
10
- margin-top: 5px;
11
- text-decoration: none;
12
- text-transform: uppercase;
13
-
14
- ${(props) => {
15
- if (props.withIcon === 'left') {
16
- return `margin-left: 5px;`;
17
- }
18
-
19
- return ``;
20
- }}
21
-
22
- @media ${devices.mobileAndTablet} {
23
- ${(props) => {
24
- if (!props.withTextInMobile) {
25
- return `
26
- display: none;
27
- `;
28
- }
29
-
30
- return ``;
31
- }}
32
- }
33
- `;
34
-
35
- export const TitleContainer = styled.div<ITabProps>`
36
- display: flex;
37
- flex-direction: row;
38
- width: fit-content;
39
- border-bottom: 1px solid transparent;
40
-
41
- ${(props) => {
42
- if (props.withIcon === 'left') {
43
- return `
44
- flex-direction: row-reverse;
45
- svg {
46
- margin-right: 6px;
47
- }`;
48
- }
49
-
50
- return `
51
- svg {
52
- margin-left: 6px;
53
- }`;
54
- }}
55
-
56
- svg {
57
- width: var(--navigation-large-gap);
58
- height: var(--navigation-large-gap);
59
- }
60
-
61
- ${(props) => {
62
- if (props.selected) {
63
- return `
64
- cursor: pointer;
65
- border-bottom: 1px solid var(--base-color-primary);
66
- && a {
67
- color: var(--base-color-primary);
68
- }
69
- && svg path {
70
- fill: var(--base-color-primary);
71
- }
72
- `;
73
- }
74
-
75
- return '';
76
- }}
77
-
78
- ${(props) => {
79
- if (!props.withTextInMobile) {
80
- return `
81
- svg {
82
- margin-right: 6px;
83
- }
84
- `;
85
- }
86
- return ``;
87
- }}
88
-
89
- @media ${devices.mobileAndTablet} {
90
- svg {
91
- margin-right: 0px;
92
- }
93
- }
94
-
95
- :hover {
96
- cursor: pointer;
97
- border-bottom: 1px solid var(--base-color-primary);
98
- && a {
99
- color: var(--base-color-primary);
100
- }
101
- && svg path {
102
- fill: var(--base-color-primary);
103
- }
104
- }
105
- `;
@@ -1,28 +0,0 @@
1
- import React from 'react';
2
- import { render, fireEvent } from '@testing-library/react';
3
- import Tab from './Tab';
4
-
5
- describe('Tab component', () => {
6
- const onClickHandler = jest.fn();
7
-
8
- it('renders text with specific text', () => {
9
- const title = 'TAB1';
10
- const titleLink = 'foo2';
11
- const onClick = onClickHandler;
12
-
13
- const { getByText } = render(<Tab title={title} onClick={onClick} titleLink={titleLink}></Tab>);
14
-
15
- expect(getByText(title)).toBeInTheDocument();
16
- });
17
-
18
- it('calls onClick callback when text is clicked', () => {
19
- const title = 'TAB2';
20
- const titleLink = 'foo1';
21
- const onClick = onClickHandler;
22
-
23
- const { getByText } = render(<Tab title={title} onClick={onClick} titleLink={titleLink}></Tab>);
24
- fireEvent.click(getByText('TAB2'));
25
-
26
- expect(onClickHandler).toBeCalled();
27
- });
28
- });
@@ -1,34 +0,0 @@
1
- import React from 'react';
2
- import { TabText, TitleContainer } from './Tab.style';
3
- import { ITabProps } from '../../../types/types';
4
- import { Icon } from '../Icons';
5
-
6
- const Tab = ({
7
- title,
8
- titleLink = '',
9
- onClick,
10
- selected = false,
11
- iconName = 'DropdownArrow',
12
- withIcon = 'right',
13
- withTextInMobile = true,
14
- }: ITabProps) => {
15
- const clickHandler = () => {
16
- if (onClick) {
17
- onClick(titleLink);
18
- }
19
- };
20
-
21
- return (
22
- <TitleContainer
23
- withTextInMobile={withTextInMobile}
24
- withIcon={withIcon}
25
- selected={selected}
26
- onClick={() => clickHandler()}
27
- >
28
- <TabText withTextInMobile={withTextInMobile}>{title}</TabText>
29
- {withIcon !== 'none' && <Icon iconName={iconName} />}
30
- </TitleContainer>
31
- );
32
- };
33
-
34
- export default Tab;
@@ -1,3 +0,0 @@
1
- import Tab from './Tab';
2
-
3
- export default Tab;