@royaloperahouse/chord 1.1.0 → 1.2.10

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 (132) hide show
  1. package/CHANGELOG.md +196 -4
  2. package/README.GIT +211 -56
  3. package/README.md +2 -2
  4. package/dist/chord.cjs.development.js +4009 -1673
  5. package/dist/chord.cjs.development.js.map +1 -1
  6. package/dist/chord.cjs.production.min.js +1 -1
  7. package/dist/chord.cjs.production.min.js.map +1 -1
  8. package/dist/chord.esm.js +4109 -1787
  9. package/dist/chord.esm.js.map +1 -1
  10. package/dist/components/atoms/Icons/SvgIcons/Logos/Social/X.svg.d.ts +4 -0
  11. package/dist/components/atoms/Icons/SvgIcons/index.d.ts +1 -0
  12. package/dist/components/atoms/Progress/Progress.d.ts +1 -1
  13. package/dist/components/atoms/Progress/Progress.styles.d.ts +10 -3
  14. package/dist/components/atoms/Radio/Radio.d.ts +3 -0
  15. package/dist/components/atoms/Radio/Radio.style.d.ts +4 -0
  16. package/dist/components/atoms/Radio/index.d.ts +2 -0
  17. package/dist/components/atoms/Sponsorship/Sponsorship.style.d.ts +2 -0
  18. package/dist/components/atoms/Stepper/Stepper.d.ts +58 -0
  19. package/dist/components/atoms/Stepper/Stepper.style.d.ts +6 -0
  20. package/dist/components/atoms/Stepper/index.d.ts +2 -0
  21. package/dist/components/atoms/TextArea/TextArea.d.ts +44 -0
  22. package/dist/components/atoms/TextArea/TextArea.style.d.ts +5 -0
  23. package/dist/components/atoms/TextArea/index.d.ts +2 -0
  24. package/dist/components/atoms/TextField/TextField.d.ts +41 -0
  25. package/dist/components/atoms/TextField/TextField.style.d.ts +5 -0
  26. package/dist/components/atoms/TextField/index.d.ts +2 -0
  27. package/dist/components/atoms/TextLogo/TextLogo.d.ts +13 -0
  28. package/dist/components/atoms/TextLogo/index.d.ts +2 -0
  29. package/dist/components/atoms/TextLogo/styled.d.ts +12 -0
  30. package/dist/components/atoms/Tickbox/Tickbox.style.d.ts +5 -0
  31. package/dist/components/atoms/Timer/Timer.d.ts +4 -0
  32. package/dist/components/atoms/Timer/Timer.style.d.ts +9 -0
  33. package/dist/components/atoms/Timer/index.d.ts +2 -0
  34. package/dist/components/atoms/Typography/Typography.d.ts +1 -1
  35. package/dist/components/atoms/VideoControls/VideoControls.d.ts +9 -0
  36. package/dist/components/atoms/VideoControls/VideoControls.style.d.ts +10 -0
  37. package/dist/components/atoms/VideoControls/index.d.ts +2 -0
  38. package/dist/components/atoms/index.d.ts +14 -6
  39. package/dist/components/index.d.ts +4 -4
  40. package/dist/components/molecules/Basket/Basket.d.ts +3 -0
  41. package/dist/components/molecules/Basket/helpers.d.ts +3 -0
  42. package/dist/components/molecules/Basket/hooks.d.ts +8 -0
  43. package/dist/components/molecules/Card/Card.style.d.ts +13 -1
  44. package/dist/components/molecules/ContentSummary/ContentSummary.d.ts +3 -0
  45. package/dist/components/molecules/ContentSummary/ContentSummary.style.d.ts +17 -0
  46. package/dist/components/molecules/ContentSummary/ContentSummaryData.d.ts +25 -0
  47. package/dist/components/molecules/ContentSummary/index.d.ts +2 -0
  48. package/dist/components/molecules/MiniCard/MiniCard.d.ts +4 -0
  49. package/dist/components/molecules/MiniCard/MiniCard.style.d.ts +6 -0
  50. package/dist/components/molecules/MiniCard/index.d.ts +2 -0
  51. package/dist/components/molecules/NavTop/NavTop.d.ts +1 -1
  52. package/dist/components/molecules/PageHeading/Compact/Compact.d.ts +4 -0
  53. package/dist/components/molecules/PageHeading/Compact/Compact.style.d.ts +24 -0
  54. package/dist/components/molecules/PageHeading/Compact/components/CompactHeaderBranding.d.ts +10 -0
  55. package/dist/components/molecules/PageHeading/Compact/index.d.ts +2 -0
  56. package/dist/components/molecules/PageHeading/Impact/Impact.d.ts +1 -1
  57. package/dist/components/molecules/PageHeading/Impact/Impact.style.d.ts +1 -0
  58. package/dist/components/molecules/PageHeading/PageHeading.style.d.ts +6 -3
  59. package/dist/components/molecules/PageHeading/Panel/Panel.d.ts +4 -0
  60. package/dist/components/molecules/PageHeading/Panel/Panel.style.d.ts +9 -0
  61. package/dist/components/molecules/PageHeading/Panel/index.d.ts +2 -0
  62. package/dist/components/molecules/PageHeading/index.d.ts +3 -1
  63. package/dist/components/molecules/Pagination/Pagination.d.ts +9 -0
  64. package/dist/components/molecules/Pagination/Pagination.style.d.ts +8 -0
  65. package/dist/components/molecules/Pagination/index.d.ts +2 -0
  66. package/dist/components/molecules/PeopleListing/CreditListing/CreditListing.d.ts +3 -0
  67. package/dist/components/molecules/PeopleListing/CreditListing/CreditListing.style.d.ts +5 -0
  68. package/dist/components/molecules/PeopleListing/CreditListing/index.d.ts +2 -0
  69. package/dist/components/molecules/PeopleListing/index.d.ts +2 -1
  70. package/dist/components/molecules/PromoWithTags/PromoWithTags.d.ts +1 -1
  71. package/dist/components/molecules/PromoWithTags/PromoWithTags.style.d.ts +11 -4
  72. package/dist/components/molecules/RadioGroup/RadioGroup.d.ts +3 -0
  73. package/dist/components/molecules/RadioGroup/RadioGroup.style.d.ts +1 -0
  74. package/dist/components/molecules/RadioGroup/index.d.ts +2 -0
  75. package/dist/components/molecules/SearchBar/SearchBar.style.d.ts +1 -0
  76. package/dist/components/molecules/Select/Select.d.ts +99 -0
  77. package/dist/components/molecules/Select/Select.style.d.ts +14 -0
  78. package/dist/components/molecules/Select/index.d.ts +2 -0
  79. package/dist/components/molecules/UpsellCard/OfferText.d.ts +2 -0
  80. package/dist/components/molecules/UpsellCard/UpsellCard.d.ts +4 -0
  81. package/dist/components/molecules/UpsellCard/UpsellCard.style.d.ts +15 -0
  82. package/dist/components/molecules/UpsellCard/index.d.ts +2 -0
  83. package/dist/components/molecules/UpsellCards/UpsellCards.d.ts +4 -0
  84. package/dist/components/molecules/UpsellCards/UpsellCards.style.d.ts +1 -0
  85. package/dist/components/molecules/UpsellCards/index.d.ts +2 -0
  86. package/dist/components/molecules/index.d.ts +10 -3
  87. package/dist/components/organisms/AnchorTabBar/AnchorTabBar.style.d.ts +4 -3
  88. package/dist/components/organisms/Navigation/Navigation.style.d.ts +6 -2
  89. package/dist/components/organisms/StickyBar/StickyBar.style.d.ts +5 -1
  90. package/dist/components/organisms/UpsellSection/UpsellSection.d.ts +4 -0
  91. package/dist/components/organisms/UpsellSection/UpsellSection.style.d.ts +3 -0
  92. package/dist/components/organisms/UpsellSection/index.d.ts +2 -0
  93. package/dist/components/organisms/index.d.ts +2 -3
  94. package/dist/helpers/arrays.d.ts +6 -0
  95. package/dist/helpers/defaultValues.d.ts +7 -0
  96. package/dist/helpers/devices.d.ts +3 -0
  97. package/dist/helpers/formatStrings.d.ts +2 -0
  98. package/dist/helpers/htmlStrings.d.ts +2 -0
  99. package/dist/helpers/urls.d.ts +2 -0
  100. package/dist/index.d.ts +6 -4
  101. package/dist/styles/themes.d.ts +1172 -96
  102. package/dist/styles/viewports.d.ts +3 -0
  103. package/dist/types/card.d.ts +40 -0
  104. package/dist/types/carousel.d.ts +22 -1
  105. package/dist/types/creditListing.d.ts +12 -0
  106. package/dist/types/editorial.d.ts +59 -55
  107. package/dist/types/formTypes.d.ts +170 -0
  108. package/dist/types/impactHeader.d.ts +122 -0
  109. package/dist/types/index.d.ts +4 -1
  110. package/dist/types/miniCard.d.ts +27 -0
  111. package/dist/types/navigation.d.ts +68 -4
  112. package/dist/types/progress.d.ts +33 -0
  113. package/dist/types/promoWithTags.d.ts +81 -0
  114. package/dist/types/tickbox.d.ts +35 -0
  115. package/dist/types/timer.d.ts +37 -0
  116. package/dist/types/types.d.ts +38 -9
  117. package/dist/types/typography.d.ts +18 -2
  118. package/dist/types/upsell.d.ts +78 -0
  119. package/dist/types/utility.d.ts +4 -0
  120. package/package.json +9 -4
  121. package/dist/components/atoms/Basket/Basket.d.ts +0 -3
  122. package/dist/components/organisms/Carousel/Carousel.d.ts +0 -5
  123. package/dist/components/organisms/Carousel/Carousel.style.d.ts +0 -6
  124. package/dist/components/organisms/Carousel/index.d.ts +0 -2
  125. package/dist/components/organisms/HighlightsCarousel/HighlightsCarousel.d.ts +0 -5
  126. package/dist/components/organisms/HighlightsCarousel/HighlightsCarousel.style.d.ts +0 -12
  127. package/dist/components/organisms/HighlightsCarousel/HighlightsCinema.d.ts +0 -4
  128. package/dist/components/organisms/HighlightsCarousel/HighlightsCore.d.ts +0 -4
  129. package/dist/components/organisms/HighlightsCarousel/HighlightsStream.d.ts +0 -4
  130. package/dist/components/organisms/HighlightsCarousel/index.d.ts +0 -5
  131. /package/dist/components/{atoms → molecules}/Basket/Basket.style.d.ts +0 -0
  132. /package/dist/components/{atoms → molecules}/Basket/index.d.ts +0 -0
@@ -1,4 +1,4 @@
1
- import { AnchorHTMLAttributes, MouseEvent, MouseEventHandler } from 'react';
1
+ import React, { AnchorHTMLAttributes, MouseEvent, MouseEventHandler } from 'react';
2
2
  import { DirectionType, IconNameType } from './iconTypes';
3
3
  import { Colors, IOptionItem } from './types';
4
4
  import { ReactNode } from 'react';
@@ -20,7 +20,7 @@ export interface IAccountProps {
20
20
  */
21
21
  iconName?: IconNameType;
22
22
  /**
23
- * The linknk of the title
23
+ * The link of the title
24
24
  */
25
25
  titleLink?: string;
26
26
  /**
@@ -33,6 +33,10 @@ export interface IBasketProps {
33
33
  * The value of the text
34
34
  */
35
35
  text?: string;
36
+ /**
37
+ * The unix timestamp when basket items will be released.
38
+ */
39
+ expiryTime?: number;
36
40
  /**
37
41
  * The value of the link
38
42
  */
@@ -42,9 +46,14 @@ export interface IBasketProps {
42
46
  */
43
47
  selected?: boolean;
44
48
  /**
45
- * The number of items of the Basket
49
+ * The number of items of the Basket (eg. Tickets)
46
50
  */
47
51
  numItems?: number;
52
+ /**
53
+ * The number of 'virtual' items of the Basket (eg. Stream subscription)
54
+ * These items remain in the basket after expiryTime is reached
55
+ */
56
+ numVirtualItems?: number;
48
57
  /**
49
58
  * Function to be called when is clicked
50
59
  */
@@ -53,6 +62,10 @@ export interface IBasketProps {
53
62
  * The primary color
54
63
  */
55
64
  colorPrimary?: string;
65
+ /**
66
+ * For changing the color of the basket icon & text (when not in hover state)
67
+ */
68
+ isActive?: boolean;
56
69
  }
57
70
  export interface ISearchProps {
58
71
  /**
@@ -96,6 +109,10 @@ export interface INavTopProps {
96
109
  * The text of Basket component
97
110
  */
98
111
  basketText?: string;
112
+ /**
113
+ * The unix timestamp when basket items will be released.
114
+ */
115
+ basketExpiryUnixTimestamp?: number;
99
116
  /**
100
117
  * The link of Basket component
101
118
  */
@@ -104,6 +121,15 @@ export interface INavTopProps {
104
121
  * The number of items of Basket component
105
122
  */
106
123
  basketNumItems?: number;
124
+ /**
125
+ * The number of 'virtual' items of the Basket (eg. Stream subscription)
126
+ * These items remain in the basket after expiryTime is reached
127
+ */
128
+ basketNumVirtualItems?: number;
129
+ /**
130
+ * For changing the color of the basket icon & text (when not in hover state)
131
+ */
132
+ basketIsActive?: boolean;
107
133
  /**
108
134
  * To know if search component is showed or not
109
135
  */
@@ -179,7 +205,7 @@ export interface ISearchBarProps {
179
205
  /**
180
206
  * Function to be called when is closed
181
207
  */
182
- onClose: () => void;
208
+ onClose?: (e?: React.MouseEvent) => void;
183
209
  }
184
210
  export declare type TitleCTALink = AnchorHTMLAttributes<HTMLAnchorElement> & {
185
211
  /**
@@ -218,6 +244,16 @@ export declare type AnchorBarTab = AnchorHTMLAttributes<HTMLAnchorElement> & {
218
244
  */
219
245
  color?: Colors;
220
246
  };
247
+ export interface IAnchorBarAbsolutePositionParams {
248
+ /**
249
+ * Navigation height that we need to calculate AnchorTabBar position properly
250
+ */
251
+ navigationHeight: number;
252
+ /**
253
+ * Height of the content that is located in place before AnchorTabBar
254
+ */
255
+ topOffset: number;
256
+ }
221
257
  export interface IAnchorBarProps {
222
258
  /**
223
259
  * Tabs displayed in the anchor bar
@@ -231,6 +267,14 @@ export interface IAnchorBarProps {
231
267
  * Set the id of the tab actived
232
268
  */
233
269
  activeTab?: string;
270
+ /**
271
+ * Only for IOS devices that do not fully support sticky position, in case a keyboard is opened on the device
272
+ */
273
+ absolutePositionParams?: IAnchorBarAbsolutePositionParams;
274
+ /**
275
+ * Boolean to set bottom border
276
+ */
277
+ bottomBorder?: boolean;
234
278
  }
235
279
  export interface ITitleCTAProps {
236
280
  /**
@@ -261,6 +305,22 @@ export interface IAnchorTabsListProps {
261
305
  * Boolean to determine that the list tab is overflowed
262
306
  */
263
307
  tabsOverflow: boolean;
308
+ /**
309
+ * Boolean to determine if there are two arrows displayed
310
+ */
311
+ hasTwoArrows: boolean;
312
+ }
313
+ export interface IAnchorTabBarBorderProps {
314
+ /**
315
+ * Boolean to set bottom border
316
+ */
317
+ bottomBorder: boolean;
318
+ }
319
+ export interface IAnchorTabArrowsBoxProps {
320
+ /**
321
+ * Boolean to determine width of the arrows container
322
+ */
323
+ fullWidth: boolean;
264
324
  }
265
325
  export interface ITabLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
266
326
  children: ReactNode;
@@ -307,4 +367,8 @@ export interface IStickyBarProps {
307
367
  * Set columnSpam in Device
308
368
  */
309
369
  columnSpanDevice?: number;
370
+ /**
371
+ * Hide bottom border line
372
+ */
373
+ hideBottomBorder?: boolean;
310
374
  }
@@ -0,0 +1,33 @@
1
+ import { Colors } from './types';
2
+ export interface IProgressSteps {
3
+ /**
4
+ * Number of the steps
5
+ */
6
+ quantity: number;
7
+ /**
8
+ * Current step
9
+ */
10
+ current: number;
11
+ }
12
+ export interface IProgressProps {
13
+ /**
14
+ * The progress percentage
15
+ */
16
+ progress?: number;
17
+ /**
18
+ * The progress bar height
19
+ */
20
+ height?: number;
21
+ /**
22
+ * Color of the elapsed line
23
+ */
24
+ elapsedLineColor?: Colors;
25
+ /**
26
+ * Color of the pending line
27
+ */
28
+ pendingLineColor?: Colors;
29
+ /**
30
+ * Number of the steps
31
+ */
32
+ steps?: IProgressSteps;
33
+ }
@@ -0,0 +1,81 @@
1
+ import { ReactElement } from 'react';
2
+ import { EditorialLink, PromoLinks } from './editorial';
3
+ import { IntegratedTimerProps } from './timer';
4
+ import { Image } from './types';
5
+ export interface IPromoWithTagsProps {
6
+ /**
7
+ * Text placed in the editorial component
8
+ */
9
+ text?: string;
10
+ /**
11
+ * Title placed in the editorial component
12
+ */
13
+ title: string;
14
+ /**
15
+ * Title size
16
+ */
17
+ titleSize?: 'small' | 'large';
18
+ /**
19
+ * Subtitle placed in the editorial component
20
+ */
21
+ subtitle?: string;
22
+ /**
23
+ * Position of the image in the editorial component
24
+ */
25
+ imagePosition?: 'left' | 'right';
26
+ /**
27
+ * Image to be displayed in the editorial component with aspect ratio 4:3
28
+ */
29
+ image?: Image;
30
+ /**
31
+ * Component to be displayed instead of the image after clicking on the button
32
+ */
33
+ children?: ReactElement<HTMLElement>;
34
+ /**
35
+ * Array of buttons props. First one should have PrimaryButton attributes, second one Tertiary button attributes
36
+ */
37
+ links?: PromoLinks;
38
+ /**
39
+ * Array of buttons props that will be displayed above the main buttons
40
+ */
41
+ textLinks?: EditorialLink[];
42
+ /**
43
+ /**
44
+ * Array of tags in the editorial component
45
+ */
46
+ aboveTitleTags?: string[];
47
+ /**
48
+ * Array of tags in the editorial component
49
+ */
50
+ belowTitleTags?: string[];
51
+ /**
52
+ * Text in the middle
53
+ */
54
+ middleText?: string;
55
+ /**
56
+ * Text in the bottom
57
+ */
58
+ bottomText?: string;
59
+ /**
60
+ * Display with reduced height & font size for use as card
61
+ */
62
+ asCard?: boolean;
63
+ /**
64
+ * Make CTA appear disabled
65
+ */
66
+ disableCTA?: boolean;
67
+ /**
68
+ * Copy to show on disabled CTA
69
+ */
70
+ disabledCTACopy?: string;
71
+ /**
72
+ * Params for Timer component
73
+ */
74
+ timerParams?: IntegratedTimerProps;
75
+ }
76
+ export interface IPromoWithTagsStyledProps {
77
+ /**
78
+ * Sets margin for the tags container
79
+ */
80
+ marginBottom?: number;
81
+ }
@@ -15,6 +15,12 @@ export interface ITickboxProps {
15
15
  * Mode to determine colors of text and checkmark
16
16
  */
17
17
  mode?: TickboxMode;
18
+ /**
19
+ * Use a white background and black checkmark for the tickbox,
20
+ * regardless of mode?
21
+ * PREFERRED in new components, but not default
22
+ */
23
+ whiteBox?: boolean;
18
24
  /**
19
25
  * Callback called when tickbox change
20
26
  */
@@ -23,22 +29,51 @@ export interface ITickboxProps {
23
29
  * Data label for tickbox
24
30
  */
25
31
  dataLabel?: string;
32
+ /**
33
+ * Element is disabled
34
+ */
35
+ disabled?: boolean;
36
+ /**
37
+ * Error message, default is undefined. To show the tickbox
38
+ * in an error state without any text, pass in an empty string.
39
+ */
40
+ error?: string;
26
41
  }
27
42
  export interface TickboxLabelProps {
28
43
  /**
29
44
  * Dark mode or not
30
45
  */
31
46
  dark: boolean;
47
+ /**
48
+ * Element is disabled
49
+ */
50
+ disabled?: boolean;
32
51
  }
33
52
  export interface TickboxInputProps {
34
53
  /**
35
54
  * Dark mode or not
36
55
  */
37
56
  dark: boolean;
57
+ /**
58
+ * Use a white background for the tickbox (regardless of mode)
59
+ */
60
+ whiteBox?: boolean;
61
+ /**
62
+ * Element is disabled
63
+ */
64
+ disabled?: boolean;
38
65
  }
39
66
  export interface TickboxCheckmarkProps {
40
67
  /**
41
68
  * Dark mode or not
42
69
  */
43
70
  dark: boolean;
71
+ /**
72
+ * Element is disabled
73
+ */
74
+ disabled?: boolean;
75
+ /**
76
+ * Display the border of the tickbox in errorstate style
77
+ */
78
+ error?: boolean;
44
79
  }
@@ -0,0 +1,37 @@
1
+ import { Colors } from './types';
2
+ export interface IntegratedTimerProps {
3
+ /**
4
+ * End date
5
+ */
6
+ endDate: string;
7
+ /**
8
+ * Text that appears once end date is reached
9
+ */
10
+ endDateText?: string;
11
+ /**
12
+ * Title that is diplayed when timer is active
13
+ */
14
+ title?: string;
15
+ }
16
+ export interface ITimerProps {
17
+ /**
18
+ * Timer title
19
+ */
20
+ title?: string;
21
+ /**
22
+ * Timer bottom border
23
+ */
24
+ bottomLine?: boolean;
25
+ /**
26
+ * End date
27
+ */
28
+ endDate: string;
29
+ /**
30
+ * Timer color theme
31
+ */
32
+ color?: Colors;
33
+ /**
34
+ * Function to fire once end date is reached
35
+ */
36
+ endDateHandler?: VoidFunction;
37
+ }
@@ -19,7 +19,8 @@ export declare enum Colors {
19
19
  export declare enum ThemeType {
20
20
  Core = "core",
21
21
  Stream = "stream",
22
- Cinema = "cinema"
22
+ Cinema = "cinema",
23
+ Schools = "schools"
23
24
  }
24
25
  export interface IThemeProviderProps {
25
26
  /**
@@ -279,6 +280,20 @@ export interface IPeopleListing {
279
280
  */
280
281
  roles: ListingRole[];
281
282
  }
283
+ export interface IPagination {
284
+ /**
285
+ * The total number of pages
286
+ */
287
+ pageCount: 10;
288
+ /**
289
+ * The current page
290
+ */
291
+ currentPage: 1;
292
+ /**
293
+ * The url to base page links on
294
+ */
295
+ baseUrl: '/';
296
+ }
282
297
  export interface INodeProps {
283
298
  /**
284
299
  * The current object of Node
@@ -295,13 +310,21 @@ export interface IGridItemProps extends StyledProps<any> {
295
310
  */
296
311
  columnSpanDesktop?: number;
297
312
  /**
298
- * The column in which to place the child elements in mobile devices
313
+ * The column in which to place the child elements in tablet devices
299
314
  */
300
315
  columnStartDevice: number;
301
316
  /**
302
- * The number of columns over which the child elements will span in mobile devices
317
+ * The number of columns over which the child elements will span in tablet devices
303
318
  */
304
319
  columnSpanDevice?: number;
320
+ /**
321
+ * The column in which to place the child elements in small mobile devices
322
+ */
323
+ columnStartSmallDevice?: number;
324
+ /**
325
+ * The number of columns over which the child elements will span in small mobile devices
326
+ */
327
+ columnSpanSmallDevice?: number;
305
328
  }
306
329
  export interface ISponsorLogoProps {
307
330
  /**
@@ -318,6 +341,10 @@ export interface ISponsorshipProps {
318
341
  * Source URL for Sponsorship IFRAME.
319
342
  */
320
343
  src?: string;
344
+ /**
345
+ * Alt Text for image.
346
+ */
347
+ altText?: string;
321
348
  /**
322
349
  * Used for Analytics.
323
350
  */
@@ -326,6 +353,10 @@ export interface ISponsorshipProps {
326
353
  * Used for Accessibility.
327
354
  */
328
355
  title?: string;
356
+ /**
357
+ * Used to determine that there is custom data for Sponsorship
358
+ */
359
+ isCustomImage?: boolean;
329
360
  }
330
361
  export interface ITextLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
331
362
  children: ReactNode;
@@ -416,6 +447,10 @@ export interface IAccordionProps {
416
447
  * The component to be wrapped into the accordion
417
448
  */
418
449
  children?: ReactNode;
450
+ /**
451
+ * Components wrapped into the accordion that are always visible
452
+ */
453
+ visibleStandfirst?: ReactNode;
419
454
  /**
420
455
  * Set if accordions are stacked
421
456
  */
@@ -431,12 +466,6 @@ export interface IAccordionsProps {
431
466
  */
432
467
  items: IAccordionProps[];
433
468
  }
434
- export interface IProgressProps {
435
- /**
436
- * The progress percentage
437
- */
438
- progress?: number;
439
- }
440
469
  export interface IAnnouncementBannerProps {
441
470
  /**
442
471
  * Announcement banner title
@@ -4,7 +4,7 @@ export declare type TypographyLevel = 1 | 2 | 3 | 4 | 5 | 6;
4
4
  export declare type AltHeaderLevel = 3 | 4 | 5 | 6;
5
5
  export declare type BodyLevel = 1 | 2 | 3;
6
6
  export declare type SubtitleLevel = 1 | 2;
7
- export declare type OverlineLevel = 1 | 2;
7
+ export declare type OverlineLevel = 1 | 2 | 3 | 4;
8
8
  export declare type TypographyType = 'header' | 'altHeader' | 'body' | 'subtitle' | 'overline';
9
9
  export interface ITypographyWrapperProps extends StyledProps<any> {
10
10
  /**
@@ -30,15 +30,23 @@ export interface IStyledTag extends ITypographyWrapperProps, IGenericTypography
30
30
  }
31
31
  export interface IHeaderProps extends IGenericTypography {
32
32
  /**
33
- * Header level, 1, 2, 3, 4, 5 or 6.
33
+ * Display Header level, 1, 2, 3, 4, 5 or 6.
34
34
  */
35
35
  level: TypographyLevel;
36
+ /**
37
+ * Semantic Header level, 1, 2, 3, 4, 5 or 6. - Not to be used for aeshetics.
38
+ */
39
+ semanticLevel?: TypographyLevel;
36
40
  }
37
41
  export interface IAltHeaderProps extends IGenericTypography {
38
42
  /**
39
43
  * AltHeader level, 3, 4, 5 or 6.
40
44
  */
41
45
  level: AltHeaderLevel;
46
+ /**
47
+ * Semantic Header level, 1, 2, 3, 4, 5 or 6. - Not to be used for aeshetics.
48
+ */
49
+ semanticLevel?: TypographyLevel;
42
50
  }
43
51
  export interface IBodyTextProps extends IGenericTypography {
44
52
  /**
@@ -55,6 +63,10 @@ export interface ISubtitleProps extends IGenericTypography {
55
63
  * Subtitle level, 1 or 2.
56
64
  */
57
65
  level: SubtitleLevel;
66
+ /**
67
+ * Semantic Header level, 1, 2, 3, 4, 5 or 6. - Not to be used for aeshetics.
68
+ */
69
+ semanticLevel?: TypographyLevel;
58
70
  /**
59
71
  * HTML tag to use to render Subtitle, by default div.
60
72
  */
@@ -65,6 +77,10 @@ export interface IOverlineProps extends IGenericTypography {
65
77
  * Overline level, 1 or 2.
66
78
  */
67
79
  level: OverlineLevel;
80
+ /**
81
+ * Semantic Header level, 1, 2, 3, 4, 5 or 6. - Not to be used for aeshetics.
82
+ */
83
+ semanticLevel?: TypographyLevel;
68
84
  /**
69
85
  * HTML tag to use to render Overline, by default div.
70
86
  */
@@ -0,0 +1,78 @@
1
+ import { EditorialLink } from '.';
2
+ import { ThemeType } from '.';
3
+ export interface IOfferTextProps {
4
+ /**
5
+ * Repeatable element title
6
+ */
7
+ title?: string;
8
+ /**
9
+ * Repeatable element description
10
+ */
11
+ description?: string;
12
+ }
13
+ export interface IUpsellCardProps {
14
+ /**
15
+ * Card title
16
+ */
17
+ title?: string;
18
+ /**
19
+ * Card subtitle
20
+ */
21
+ subTitle?: string;
22
+ /**
23
+ * Card price
24
+ */
25
+ price?: string;
26
+ /**
27
+ * Promo price
28
+ */
29
+ promoPrice?: string;
30
+ /**
31
+ * Flag for featurette (e.g. "best offer")
32
+ */
33
+ flag?: string;
34
+ /**
35
+ * Offer texts repeatable elements
36
+ */
37
+ offerTexts?: IOfferTextProps[];
38
+ /**
39
+ *
40
+ */
41
+ link?: EditorialLink;
42
+ /**
43
+ * Theme: Core, Stream, or Cinema
44
+ */
45
+ theme?: ThemeType;
46
+ }
47
+ export interface IUpsellCardsProps {
48
+ /**
49
+ * Array of upsellCards
50
+ */
51
+ upsellCards?: IUpsellCardProps[];
52
+ /**
53
+ * Theme options
54
+ */
55
+ theme?: ThemeType;
56
+ }
57
+ export interface IUpsellSectionProps {
58
+ /**
59
+ * Upsell Section title
60
+ */
61
+ title?: string;
62
+ /**
63
+ * Richtext section
64
+ */
65
+ richText?: string;
66
+ /**
67
+ * CTA link. Eg. for sign in.
68
+ */
69
+ link?: EditorialLink;
70
+ /**
71
+ * Array of upsellCards
72
+ */
73
+ upsellCards?: IUpsellCardProps[];
74
+ /**
75
+ * Theme options
76
+ */
77
+ theme?: ThemeType;
78
+ }
@@ -0,0 +1,4 @@
1
+ import { themes } from '../styles/themes';
2
+ declare type Themes = typeof themes;
3
+ export declare type Theme = Themes[keyof Omit<Themes, 'fontFamilies'>];
4
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royaloperahouse/chord",
3
- "version": "1.1.0",
3
+ "version": "1.2.10",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -21,7 +21,9 @@
21
21
  "size": "size-limit",
22
22
  "analyze": "size-limit --why",
23
23
  "storybook": "start-storybook -s ./external -p 6006",
24
+ "build-storybook-dev": "build-storybook",
24
25
  "build-storybook": "rm -rf ./storybook-static; build-storybook -s ./src -o ./storybook-static; cp -r ./external/ ./storybook-static/",
26
+ "deploy-storybook-dev": "chromatic --build-script-name build-storybook-dev",
25
27
  "deploy-storybook": "storybook-to-aws-s3 --bucket-path=chord.roh.org.uk --aws-profile=parent --existing-output-dir=storybook-static --s3-sync-options=--acl=public-read",
26
28
  "test-storybook": "tsdx test --json --passWithNoTests --outputFile=./test/jest-test-results.json",
27
29
  "publish-release": "make prepare-release-candidate; make publish-release",
@@ -63,7 +65,8 @@
63
65
  "<rootDir>/src/jest.setup.ts"
64
66
  ],
65
67
  "moduleNameMapper": {
66
- "^react$": "<rootDir>/node_modules/react"
68
+ "^react$": "<rootDir>/node_modules/react",
69
+ "\\.(png|jpg|jpeg)$": "<rootDir>/external/images/mock-image.js"
67
70
  },
68
71
  "modulePathIgnorePatterns": [
69
72
  "<rootDir>/storybook-static"
@@ -84,14 +87,15 @@
84
87
  "@testing-library/jest-dom": "^5.15.0",
85
88
  "@testing-library/react": "^12.1.2",
86
89
  "@testing-library/user-event": "^13.5.0",
90
+ "@types/dompurify": "^2.4.0",
87
91
  "@types/jest": "^27.0.2",
88
92
  "@types/react": "^17.0.34",
89
93
  "@types/react-dom": "^17.0.11",
90
94
  "@types/react-test-renderer": "^17.0.1",
91
95
  "@types/styled-components": "^5.1.15",
92
- "@types/swiper": "^5.4.3",
93
96
  "@types/testing-library__jest-dom": "^5.14.1",
94
97
  "babel-loader": "^8.2.3",
98
+ "chromatic": "^6.11.4",
95
99
  "husky": "^7.0.4",
96
100
  "react": "^17.0.2",
97
101
  "react-dom": "^17.0.2",
@@ -99,12 +103,13 @@
99
103
  "size-limit": "^6.0.4",
100
104
  "storybook-addon-designs": "^6.2.0",
101
105
  "storybook-addon-pseudo-states": "^1.0.0",
106
+ "styled-components": "^5.3.9",
102
107
  "ts-jest": "^27.0.7",
103
108
  "tsdx": "^0.14.1",
104
109
  "tslib": "^2.3.1",
105
110
  "typescript": "^4.4.4"
106
111
  },
107
112
  "dependencies": {
108
- "swiper": "^7.3.3"
113
+ "moment": "^2.29.4"
109
114
  }
110
115
  }
@@ -1,3 +0,0 @@
1
- import { IBasketProps } from '../../../types/navigation';
2
- declare const Basket: ({ text, link, selected, numItems, onClick, colorPrimary }: IBasketProps) => JSX.Element;
3
- export default Basket;
@@ -1,5 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import 'swiper/swiper-bundle.css';
3
- import { ICarouselProps } from '../../../types/carousel';
4
- declare const Carousel: FunctionComponent<ICarouselProps>;
5
- export default Carousel;
@@ -1,6 +0,0 @@
1
- import { ICarouselWrapperProps } from '../../../types/carousel';
2
- export declare const CarouselWrapper: import("styled-components").StyledComponent<"div", any, ICarouselWrapperProps, never>;
3
- export declare const TitleButtonsGrid: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const TitleWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export declare const ButtonsWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export declare const TitleGridItem: import("styled-components").StyledComponent<"div", any, import("../../../types/types").IGridItemProps, never>;
@@ -1,2 +0,0 @@
1
- import Carousel from './Carousel';
2
- export default Carousel;
@@ -1,5 +0,0 @@
1
- import { FunctionComponent } from 'react';
2
- import 'swiper/swiper-bundle.css';
3
- import { IHighlightsCarouselProps } from '../../../types/carousel';
4
- declare const HighlightsCarousel: FunctionComponent<IHighlightsCarouselProps>;
5
- export default HighlightsCarousel;