@royaloperahouse/harmonic 0.4.1 → 0.5.0-a
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/CHANGELOG.md +46 -0
- package/README.md +268 -43
- package/dist/components/Typography/Typography.d.ts +277 -6
- package/dist/components/atoms/ControlledDropdown/ControlledDropdown.d.ts +2 -2
- package/dist/components/atoms/ControlledDropdown/ControlledDropdown.style.d.ts +2 -2
- package/dist/components/atoms/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/atoms/Icons/SvgIcons/Arrows/ArrowPagination.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/Arrows/LastPageArrow.svg.d.ts +4 -0
- package/dist/components/atoms/Icons/SvgIcons/index.d.ts +2 -0
- package/dist/components/atoms/RotatorButtons/RotatorButtons.d.ts +1 -1
- package/dist/components/atoms/RotatorButtons/RotatorButtons.style.d.ts +1 -0
- package/dist/components/atoms/Search/Search.d.ts +1 -1
- package/dist/components/atoms/Search/Search.style.d.ts +1 -1
- package/dist/components/atoms/SectionSplitter/SectionSplitter.d.ts +1 -1
- package/dist/components/atoms/SponsorLogo/SponsorLogo.d.ts +1 -1
- package/dist/components/atoms/Sponsorship/Sponsorship.d.ts +2 -2
- package/dist/components/atoms/Sponsorship/Sponsorship.style.d.ts +4 -2
- package/dist/components/atoms/Sponsorship/constants.d.ts +3 -0
- package/dist/components/atoms/Tab/Tab.d.ts +1 -1
- package/dist/components/atoms/TextField/TextField.style.d.ts +1 -1
- package/dist/components/index.d.ts +4 -4
- package/dist/components/molecules/Accordion/Accordion.style.d.ts +8 -4
- package/dist/components/molecules/AnchorBar/AnchorBar.style.d.ts +5 -1
- package/dist/components/molecules/BodyContent/BodyContent.d.ts +9 -0
- package/dist/components/molecules/BodyContent/BodyContent.style.d.ts +1 -0
- package/dist/components/molecules/BodyContent/index.d.ts +2 -0
- package/dist/components/molecules/Card/Card.style.d.ts +1 -1
- package/dist/components/molecules/CastFilter/CastFilters.d.ts +4 -0
- package/dist/components/molecules/CastFilter/CastFilters.style.d.ts +16 -0
- package/dist/components/molecules/CastFilter/index.d.ts +2 -0
- package/dist/components/molecules/ContactCard/ContactCard.style.d.ts +5 -4
- package/dist/components/molecules/ContentSummary/ContentSummary.d.ts +1 -1
- package/dist/components/molecules/ContentSummary/ContentSummary.style.d.ts +1 -2
- package/dist/components/molecules/Editorial/Editorial.style.d.ts +2 -2
- package/dist/components/molecules/HotFilters/HotFilters.d.ts +4 -0
- package/dist/components/molecules/HotFilters/HotFilters.style.d.ts +3 -0
- package/dist/components/molecules/HotFilters/index.d.ts +2 -0
- package/dist/components/molecules/ImageWithCaption/ImageWithCaption.style.d.ts +1 -1
- package/dist/components/molecules/Information/Information.style.d.ts +3 -2
- package/dist/components/molecules/NavTop/NavTop.d.ts +1 -1
- package/dist/components/molecules/PageHeading/Highlight/Highlight.d.ts +4 -0
- package/dist/components/molecules/PageHeading/Highlight/Highlight.style.d.ts +9 -0
- package/dist/components/molecules/PageHeading/Highlight/index.d.ts +2 -0
- package/dist/components/molecules/PageHeading/HighlightCarousel/HighlightCarousel.d.ts +4 -0
- package/dist/components/molecules/PageHeading/HighlightCarousel/HighlightCarousel.style.d.ts +14 -0
- package/dist/components/molecules/PageHeading/HighlightCarousel/index.d.ts +2 -0
- package/dist/components/molecules/PageHeading/PageHeading.style.d.ts +2 -2
- package/dist/components/molecules/PageHeading/Promo/Promo.d.ts +1 -2
- package/dist/components/molecules/PageHeading/index.d.ts +4 -4
- package/dist/components/molecules/Pagination/Pagination.d.ts +11 -3
- package/dist/components/molecules/Pagination/Pagination.style.d.ts +6 -5
- package/dist/components/molecules/Pagination/components/NavButtonOrLink.d.ts +4 -0
- package/dist/components/molecules/Pagination/components/PageLinkOrButton.d.ts +4 -0
- package/dist/components/molecules/Pagination/components/index.d.ts +2 -0
- package/dist/components/molecules/Paywall/Paywall.d.ts +4 -0
- package/dist/components/molecules/Paywall/Paywall.styles.d.ts +288 -0
- package/dist/components/molecules/Paywall/index.d.ts +2 -0
- package/dist/components/molecules/PeopleListing/PeopleListing.d.ts +1 -1
- package/dist/components/molecules/PeopleListing/PeopleListing.style.d.ts +2 -2
- package/dist/components/molecules/PromoWithTags/PromoWithTags.style.d.ts +273 -6
- package/dist/components/molecules/PromoWithTitle/PromoWithTitle.style.d.ts +273 -3
- package/dist/components/molecules/Quote/Quote.style.d.ts +3 -4
- package/dist/components/molecules/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/molecules/SearchBar/SearchBar.style.d.ts +1 -1
- package/dist/components/molecules/SectionTitle/SectionTitle.d.ts +1 -1
- package/dist/components/molecules/SkipToMain/SkipToMain.d.ts +20 -0
- package/dist/components/molecules/SkipToMain/SkipToMain.style.d.ts +6 -0
- package/dist/components/molecules/SkipToMain/index.d.ts +2 -0
- package/dist/components/molecules/Table/Table.style.d.ts +1 -8
- package/dist/components/molecules/Table/components/DataCells.d.ts +7 -0
- package/dist/components/molecules/Table/components/HeaderCells.d.ts +7 -0
- package/dist/components/molecules/UpsellCard/UpsellCard.style.d.ts +279 -12
- package/dist/components/molecules/index.d.ts +5 -4
- package/dist/components/organisms/AnchorTabBar/AnchorTabBar.style.d.ts +8 -3
- package/dist/components/organisms/Carousels/Carousel/Carousel.style.d.ts +271 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/HighlightsCarousel.d.ts +0 -1
- package/dist/components/organisms/Carousels/HighlightsCarousel/constants.d.ts +1 -0
- package/dist/components/organisms/Carousels/HighlightsCarousel/helper.d.ts +2 -2
- package/dist/components/organisms/Footer/Footer.style.d.ts +6 -5
- package/dist/components/organisms/Navigation/Navigation.d.ts +1 -1
- package/dist/components/organisms/Navigation/Navigation.style.d.ts +1 -1
- package/dist/components/organisms/StickyBar/StickyBar.style.d.ts +1 -1
- package/dist/components/organisms/UpsellSection/UpsellSection.style.d.ts +272 -1
- package/dist/harmonic.cjs.development.css +371 -24
- package/dist/harmonic.cjs.development.js +7721 -7270
- package/dist/harmonic.cjs.development.js.map +1 -1
- package/dist/harmonic.cjs.production.min.js +1 -1
- package/dist/harmonic.cjs.production.min.js.map +1 -1
- package/dist/harmonic.esm.js +7735 -7284
- package/dist/harmonic.esm.js.map +1 -1
- package/dist/helpers/accessibility.d.ts +1 -0
- package/dist/helpers/devices.d.ts +1 -0
- package/dist/index.d.ts +6 -3
- package/dist/styles/HarmonicThemeProvider/HarmonicThemeProvider.d.ts +4 -0
- package/dist/styles/HarmonicThemeProvider/index.d.ts +2 -1
- package/dist/types/anchorBar.d.ts +5 -0
- package/dist/types/buttonTypes.d.ts +6 -0
- package/dist/types/contactCard.d.ts +8 -22
- package/dist/types/creditListing.d.ts +1 -1
- package/dist/types/editorial.d.ts +25 -23
- package/dist/types/footer.d.ts +2 -17
- package/dist/types/image.d.ts +5 -9
- package/dist/types/impactHeader.d.ts +22 -2
- package/dist/types/information.d.ts +23 -43
- package/dist/types/links.d.ts +17 -0
- package/dist/types/navigation.d.ts +56 -65
- package/dist/types/pagination.d.ts +9 -0
- package/dist/types/promoWithTags.d.ts +9 -1
- package/dist/types/quote.d.ts +4 -15
- package/dist/types/tableTypes.d.ts +8 -25
- package/dist/types/types.d.ts +176 -89
- package/dist/types/typography.d.ts +9 -1
- package/dist/types/upsell.d.ts +22 -16
- package/package.json +3 -2
- package/README.GIT +0 -278
- package/dist/components/molecules/PageHeading/Cinema/Cinema.d.ts +0 -4
- package/dist/components/molecules/PageHeading/Cinema/index.d.ts +0 -2
- package/dist/components/molecules/PageHeading/Core/Core.d.ts +0 -4
- package/dist/components/molecules/PageHeading/Core/index.d.ts +0 -2
- package/dist/components/molecules/PageHeading/Stream/Stream.d.ts +0 -4
- package/dist/components/molecules/PageHeading/Stream/Stream.style.d.ts +0 -1
- package/dist/components/molecules/PageHeading/Stream/index.d.ts +0 -2
- package/dist/components/molecules/TextOnly/TextOnly.d.ts +0 -4
- package/dist/components/molecules/TextOnly/TextOnly.style.d.ts +0 -1
- package/dist/components/molecules/TextOnly/index.d.ts +0 -2
package/dist/types/quote.d.ts
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import { StyledProps } from 'styled-components';
|
|
2
1
|
export interface IQuoteProps {
|
|
3
|
-
/**
|
|
4
|
-
* Text placed in the Quote component
|
|
5
|
-
*/
|
|
2
|
+
/** Text placed in the Quote component */
|
|
6
3
|
text: string;
|
|
7
|
-
/**
|
|
8
|
-
* Attribution under the main text
|
|
9
|
-
*/
|
|
4
|
+
/** Attribution under the main text */
|
|
10
5
|
attribution?: string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
displayAttribution: boolean;
|
|
14
|
-
}> {
|
|
15
|
-
/**
|
|
16
|
-
* Set visibility of the attribution block
|
|
17
|
-
*/
|
|
18
|
-
displayAttribution: boolean;
|
|
6
|
+
/** Custom CSS classes */
|
|
7
|
+
className?: string;
|
|
19
8
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { Colors } from './types';
|
|
3
2
|
export interface ContentProps {
|
|
4
3
|
content: string | ReactNode;
|
|
5
4
|
}
|
|
@@ -7,42 +6,26 @@ export interface CellProps {
|
|
|
7
6
|
cell: ReactNode;
|
|
8
7
|
cellIndex: number;
|
|
9
8
|
columns: number;
|
|
10
|
-
lineColor: Colors;
|
|
11
9
|
}
|
|
12
10
|
export declare type TableRowData = Array<Record<string, unknown>>;
|
|
13
11
|
export interface RowProps {
|
|
14
12
|
row: TableRowData;
|
|
15
13
|
rowIndex: number;
|
|
16
14
|
columns: number;
|
|
17
|
-
lineColor: Colors;
|
|
18
15
|
}
|
|
19
16
|
export interface ITableProps {
|
|
20
|
-
/**
|
|
21
|
-
* Number of columns in table
|
|
22
|
-
*/
|
|
17
|
+
/** Number of columns in table */
|
|
23
18
|
columns: number;
|
|
24
|
-
/**
|
|
25
|
-
* Headings array
|
|
26
|
-
*/
|
|
19
|
+
/** Headings array */
|
|
27
20
|
headings?: string[];
|
|
28
|
-
/**
|
|
29
|
-
* Table content
|
|
30
|
-
*/
|
|
21
|
+
/** Table content */
|
|
31
22
|
children: ReactNode;
|
|
32
|
-
/**
|
|
33
|
-
* Line divider color
|
|
34
|
-
*/
|
|
35
|
-
lineColors?: Colors;
|
|
36
|
-
/**
|
|
37
|
-
* Rows in table per page for pagination
|
|
38
|
-
*/
|
|
23
|
+
/** Rows in table per page for pagination */
|
|
39
24
|
rowsPerPage: number;
|
|
40
|
-
/**
|
|
41
|
-
* Pagination
|
|
42
|
-
*/
|
|
25
|
+
/** Enable pagination */
|
|
43
26
|
pagination?: boolean;
|
|
44
|
-
/**
|
|
45
|
-
* Description - for Accessibility, aria-describedby prop
|
|
46
|
-
*/
|
|
27
|
+
/** Description for accessibility (aria-describedby) */
|
|
47
28
|
description?: string;
|
|
29
|
+
/** Custom CSS classes */
|
|
30
|
+
className?: string;
|
|
48
31
|
}
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode, AnchorHTMLAttributes, MouseEventHandler, ReactElement } from 'react';
|
|
2
2
|
import { StyledProps } from 'styled-components';
|
|
3
3
|
import { IconNameType, DirectionType } from './iconTypes';
|
|
4
|
-
import {
|
|
4
|
+
import type { ExternalLink } from './links';
|
|
5
5
|
export declare enum Colors {
|
|
6
6
|
White = "white",
|
|
7
7
|
Black = "black",
|
|
@@ -52,14 +52,8 @@ export declare enum ThemeType {
|
|
|
52
52
|
Cinema = "cinema",
|
|
53
53
|
Schools = "schools"
|
|
54
54
|
}
|
|
55
|
-
export declare type ThemeChildProps = {
|
|
56
|
-
className?: string;
|
|
57
|
-
theme?: ThemeType;
|
|
58
|
-
};
|
|
59
55
|
export interface IThemeProviderProps {
|
|
60
|
-
/**
|
|
61
|
-
* The theme to use for the child elements
|
|
62
|
-
*/
|
|
56
|
+
/** The theme to use for the child elements */
|
|
63
57
|
theme: ThemeType;
|
|
64
58
|
children: ReactNode;
|
|
65
59
|
}
|
|
@@ -117,6 +111,10 @@ export interface ITabProps {
|
|
|
117
111
|
* To keep selected the title of the Tab
|
|
118
112
|
*/
|
|
119
113
|
selected?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Icon direction
|
|
116
|
+
*/
|
|
117
|
+
iconDirection?: DirectionType;
|
|
120
118
|
/**
|
|
121
119
|
* The name of the icon
|
|
122
120
|
*/
|
|
@@ -149,6 +147,10 @@ export interface ITabProps {
|
|
|
149
147
|
* Additional CSS class names to apply to the navigation component.
|
|
150
148
|
*/
|
|
151
149
|
className?: string;
|
|
150
|
+
/**
|
|
151
|
+
* The unique ID to assign to the link element.
|
|
152
|
+
*/
|
|
153
|
+
tabLinkId?: string;
|
|
152
154
|
/**
|
|
153
155
|
* Defines the ARIA role of the element for accessibility purposes.
|
|
154
156
|
*/
|
|
@@ -157,6 +159,22 @@ export interface ITabProps {
|
|
|
157
159
|
* Provides an accessible label for screen readers to describe the element's purpose.
|
|
158
160
|
*/
|
|
159
161
|
ariaLabel?: string;
|
|
162
|
+
/**
|
|
163
|
+
* Text color
|
|
164
|
+
*/
|
|
165
|
+
color?: ThemeColor;
|
|
166
|
+
/**
|
|
167
|
+
* Defines if it is needed to trim the text of the Tab and add 3 dots in the end
|
|
168
|
+
*/
|
|
169
|
+
trimText?: boolean;
|
|
170
|
+
/**
|
|
171
|
+
* data-testid string for easier testing
|
|
172
|
+
*/
|
|
173
|
+
dataTestId?: string;
|
|
174
|
+
/**
|
|
175
|
+
* Boolean indicating if the Tab is open.
|
|
176
|
+
*/
|
|
177
|
+
isOpen?: boolean;
|
|
160
178
|
}
|
|
161
179
|
export interface IDropdownProps {
|
|
162
180
|
/**
|
|
@@ -207,6 +225,14 @@ export interface IDropdownProps {
|
|
|
207
225
|
* Provides an accessible label for screen readers to describe the element's purpose.
|
|
208
226
|
*/
|
|
209
227
|
ariaLabel?: string;
|
|
228
|
+
/**
|
|
229
|
+
* The unique ID to assign to the link element inside the tab.
|
|
230
|
+
*/
|
|
231
|
+
tabLinkId?: string;
|
|
232
|
+
/**
|
|
233
|
+
* Defines if it is needed to trim the text of the Tab and add 3 dots in the end
|
|
234
|
+
*/
|
|
235
|
+
trimTabText?: boolean;
|
|
210
236
|
}
|
|
211
237
|
export interface ITabsProps {
|
|
212
238
|
/**
|
|
@@ -268,6 +294,10 @@ export interface IControlledDropdownProps {
|
|
|
268
294
|
* Callback called when main link or option are focused
|
|
269
295
|
*/
|
|
270
296
|
onFocus?: () => void;
|
|
297
|
+
/**
|
|
298
|
+
* Callback called when focus leaves element
|
|
299
|
+
*/
|
|
300
|
+
onFocusLeave?: () => void;
|
|
271
301
|
/**
|
|
272
302
|
* Callback called when main link or last option lose focus
|
|
273
303
|
*/
|
|
@@ -324,10 +354,10 @@ export declare type ListingRole = {
|
|
|
324
354
|
dataROH?: string;
|
|
325
355
|
};
|
|
326
356
|
export interface IPeopleListing {
|
|
327
|
-
/**
|
|
328
|
-
* List of roles to be displayed
|
|
329
|
-
*/
|
|
357
|
+
/** List of roles to be displayed */
|
|
330
358
|
roles: ListingRole[];
|
|
359
|
+
/** Custom CSS classes */
|
|
360
|
+
className?: string;
|
|
331
361
|
}
|
|
332
362
|
export interface IPagination {
|
|
333
363
|
/**
|
|
@@ -375,29 +405,100 @@ export interface IGridItemProps extends StyledProps<any> {
|
|
|
375
405
|
*/
|
|
376
406
|
columnSpanSmallDevice?: number;
|
|
377
407
|
}
|
|
378
|
-
export interface ISponsorLogoProps {
|
|
379
|
-
/**
|
|
380
|
-
* Color for the logo
|
|
381
|
-
*/
|
|
382
|
-
colorLogo?: string;
|
|
408
|
+
export interface ISponsorLogoProps extends ExternalLink {
|
|
383
409
|
/**
|
|
384
|
-
*
|
|
410
|
+
* S3 Image source
|
|
385
411
|
*/
|
|
386
|
-
|
|
412
|
+
imageSource?: string;
|
|
387
413
|
/**
|
|
388
414
|
* Alternative text for the logo (used for accessibility)
|
|
389
415
|
*/
|
|
390
416
|
alt?: string;
|
|
417
|
+
/**
|
|
418
|
+
* Content to be displayed within the component.
|
|
419
|
+
*/
|
|
420
|
+
children?: ReactNode;
|
|
421
|
+
/**
|
|
422
|
+
* Additional CSS class names to apply to the navigation component.
|
|
423
|
+
*/
|
|
424
|
+
className?: string;
|
|
391
425
|
}
|
|
426
|
+
export declare type IHotFilterItem = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'aria-label' | 'role'> & {
|
|
427
|
+
text: string;
|
|
428
|
+
onClick?: () => void;
|
|
429
|
+
};
|
|
430
|
+
export declare type IHotFilterProps = {
|
|
431
|
+
items: IHotFilterItem[];
|
|
432
|
+
className?: string;
|
|
433
|
+
selectedIndex?: number;
|
|
434
|
+
onSelect?: (index: number) => void;
|
|
435
|
+
};
|
|
436
|
+
export declare type ICastFilterItem = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'aria-label' | 'role'> & {
|
|
437
|
+
/**
|
|
438
|
+
* Name of the cast member shown below the image circle. Required.
|
|
439
|
+
*/
|
|
440
|
+
name: string;
|
|
441
|
+
/**
|
|
442
|
+
* Image source for the image to be shown. Optional but if not included an unaesthetic placeholder will show.
|
|
443
|
+
*/
|
|
444
|
+
image?: string;
|
|
445
|
+
onClick?: () => void;
|
|
446
|
+
};
|
|
447
|
+
export declare type ICastFiltersProps = {
|
|
448
|
+
className?: string;
|
|
449
|
+
/**
|
|
450
|
+
* Array of cast to filter by.
|
|
451
|
+
*/
|
|
452
|
+
cast: ICastFilterItem[];
|
|
453
|
+
/**
|
|
454
|
+
* Indices of currently selected cast in the `cast` array.
|
|
455
|
+
*/
|
|
456
|
+
selectedIndices?: number[];
|
|
457
|
+
/**
|
|
458
|
+
* Text shown at the top of the component, e.g. 'Filter by cast'. If this is not provided
|
|
459
|
+
* the component will render without any.
|
|
460
|
+
*/
|
|
461
|
+
headingText?: string;
|
|
462
|
+
/**
|
|
463
|
+
* Override the text of the primary CTA. Default is 'Apply'.
|
|
464
|
+
*/
|
|
465
|
+
ctaText?: string;
|
|
466
|
+
/**
|
|
467
|
+
* Override the text of the text link. Default is 'Clear'.
|
|
468
|
+
*/
|
|
469
|
+
textLinkText?: string;
|
|
470
|
+
/**
|
|
471
|
+
* Text to show if no selection is made.
|
|
472
|
+
*/
|
|
473
|
+
emptySelectionText?: string;
|
|
474
|
+
/**
|
|
475
|
+
* Default image to show in cases where a cast member image prop is missing.
|
|
476
|
+
* If this is undefined then a light grey background will be displayed instead.
|
|
477
|
+
*/
|
|
478
|
+
placeholderImage?: string;
|
|
479
|
+
/**
|
|
480
|
+
* Description to be used as aria-roledescription of the cast filter listbox.
|
|
481
|
+
* Read out by screen readers to describe the contents of the list.
|
|
482
|
+
*/
|
|
483
|
+
listRoleDescription?: string;
|
|
484
|
+
/**
|
|
485
|
+
* Handle selecting individual cast filters.
|
|
486
|
+
*/
|
|
487
|
+
onSelect?: (index: number) => void;
|
|
488
|
+
/**
|
|
489
|
+
* Handle clicking the primary CTA.
|
|
490
|
+
*/
|
|
491
|
+
onApply?: (indices: number[]) => void;
|
|
492
|
+
/**
|
|
493
|
+
* Handle clicking the text link.
|
|
494
|
+
*/
|
|
495
|
+
onClear?: () => void;
|
|
496
|
+
};
|
|
392
497
|
export interface ISponsorshipProps {
|
|
393
498
|
/**
|
|
394
499
|
* Source URL for Sponsorship IFRAME.
|
|
395
500
|
*/
|
|
396
501
|
src?: string;
|
|
397
|
-
/**
|
|
398
|
-
* Alt Text for image.
|
|
399
|
-
*/
|
|
400
|
-
altText?: string;
|
|
401
502
|
/**
|
|
402
503
|
* Used for Analytics.
|
|
403
504
|
*/
|
|
@@ -406,10 +507,6 @@ export interface ISponsorshipProps {
|
|
|
406
507
|
* Used for Accessibility.
|
|
407
508
|
*/
|
|
408
509
|
title?: string;
|
|
409
|
-
/**
|
|
410
|
-
* Used to determine that there is custom data for Sponsorship
|
|
411
|
-
*/
|
|
412
|
-
isCustomImage?: boolean;
|
|
413
510
|
}
|
|
414
511
|
export interface ITextLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
415
512
|
children: ReactNode;
|
|
@@ -431,10 +528,10 @@ export interface ITextLinkProps extends AnchorHTMLAttributes<HTMLAnchorElement>
|
|
|
431
528
|
textColor?: ThemeColor;
|
|
432
529
|
}
|
|
433
530
|
export interface ISectionSplitterProps {
|
|
434
|
-
/**
|
|
435
|
-
* Set the width of the Section to full
|
|
436
|
-
*/
|
|
531
|
+
/** Set the width of the Section to full */
|
|
437
532
|
fullWidth?: boolean;
|
|
533
|
+
/** Custom CSS classes */
|
|
534
|
+
className?: string;
|
|
438
535
|
}
|
|
439
536
|
export interface ITypeTagsProps {
|
|
440
537
|
/**
|
|
@@ -442,46 +539,34 @@ export interface ITypeTagsProps {
|
|
|
442
539
|
*/
|
|
443
540
|
list: string[];
|
|
444
541
|
}
|
|
445
|
-
export interface
|
|
446
|
-
/**
|
|
447
|
-
* Text placed in the TextOnly component
|
|
448
|
-
*/
|
|
542
|
+
export interface IBodyContentProps {
|
|
543
|
+
/** Text placed in the BodyContent component */
|
|
449
544
|
text: string;
|
|
450
|
-
/**
|
|
451
|
-
* Set columnstart in Desktop
|
|
452
|
-
*/
|
|
545
|
+
/** Set columnStart in Desktop */
|
|
453
546
|
columnStartDesktop?: number;
|
|
454
|
-
/**
|
|
455
|
-
* Set columnSpan in Desktop
|
|
456
|
-
*/
|
|
547
|
+
/** Set columnSpan in Desktop */
|
|
457
548
|
columnSpanDesktop?: number;
|
|
458
|
-
/**
|
|
459
|
-
* Set columnstart in Device
|
|
460
|
-
*/
|
|
549
|
+
/** Set columnStart in Device */
|
|
461
550
|
columnStartDevice?: number;
|
|
462
|
-
/**
|
|
463
|
-
* Set columnSpam in Device
|
|
464
|
-
*/
|
|
551
|
+
/** Set columnSpan in Device */
|
|
465
552
|
columnSpanDevice?: number;
|
|
553
|
+
/** Custom CSS classes */
|
|
554
|
+
className?: string;
|
|
555
|
+
/** Set to true to wrap the content in a Grid component */
|
|
556
|
+
renderGrid?: boolean;
|
|
557
|
+
/** Set to true to render the GridItem component */
|
|
558
|
+
renderGridItem?: boolean;
|
|
466
559
|
}
|
|
467
560
|
export declare type SectionTitleSize = 'small' | 'large';
|
|
468
561
|
export interface ISectionTitleProps {
|
|
469
|
-
/**
|
|
470
|
-
* Title to display.
|
|
471
|
-
*/
|
|
562
|
+
/** Title to display. */
|
|
472
563
|
title: string;
|
|
473
|
-
/**
|
|
474
|
-
* Size of title to display - by default small, which renders as an H2 (and large is an H1).
|
|
475
|
-
*/
|
|
564
|
+
/** Size of title to display - by default small, which renders as an H2 (and large is an H1). */
|
|
476
565
|
size?: SectionTitleSize;
|
|
477
|
-
/**
|
|
478
|
-
* Optional description that can be rendered below the title.
|
|
479
|
-
*/
|
|
566
|
+
/** Optional description that can be rendered below the title. */
|
|
480
567
|
description?: string;
|
|
481
|
-
/**
|
|
482
|
-
|
|
483
|
-
*/
|
|
484
|
-
semanticLevel?: TypographyLevel;
|
|
568
|
+
/** Custom CSS classes */
|
|
569
|
+
className?: string;
|
|
485
570
|
}
|
|
486
571
|
export interface ILogosProps {
|
|
487
572
|
/**
|
|
@@ -504,44 +589,22 @@ export interface ILogosStyledProps extends StyledProps<any> {
|
|
|
504
589
|
fillColor?: Colors.White | Colors.Black;
|
|
505
590
|
}
|
|
506
591
|
export interface IAccordionProps {
|
|
507
|
-
/**
|
|
508
|
-
* Title to display.
|
|
509
|
-
*/
|
|
592
|
+
/** Title to display. */
|
|
510
593
|
title?: string;
|
|
511
|
-
/**
|
|
512
|
-
* The component to be wrapped into the accordion
|
|
513
|
-
*/
|
|
594
|
+
/** The component to be wrapped into the accordion */
|
|
514
595
|
children?: ReactNode;
|
|
515
|
-
/**
|
|
516
|
-
* Components wrapped into the accordion that are always visible
|
|
517
|
-
*/
|
|
518
|
-
visibleStandfirst?: ReactNode;
|
|
519
|
-
/**
|
|
520
|
-
* Set if accordions are stacked
|
|
521
|
-
*/
|
|
596
|
+
/** Set if accordions are stacked */
|
|
522
597
|
showLine?: boolean;
|
|
523
|
-
/**
|
|
524
|
-
* Set init open
|
|
525
|
-
*/
|
|
598
|
+
/** Set init open */
|
|
526
599
|
initOpen?: boolean;
|
|
527
|
-
/**
|
|
528
|
-
|
|
529
|
-
*/
|
|
530
|
-
contentType?: TypographyType;
|
|
531
|
-
/**
|
|
532
|
-
* Set display level - aesthetic
|
|
533
|
-
*/
|
|
534
|
-
displayLevel?: TypographyLevel;
|
|
535
|
-
/**
|
|
536
|
-
* Set semantic level - not to be used for aesthetic
|
|
537
|
-
*/
|
|
538
|
-
semanticLevel?: TypographyLevel;
|
|
600
|
+
/** Custom CSS classes */
|
|
601
|
+
className?: string;
|
|
539
602
|
}
|
|
540
603
|
export interface IAccordionsProps {
|
|
541
|
-
/**
|
|
542
|
-
* Array of Accordion component
|
|
543
|
-
*/
|
|
604
|
+
/** Array of Accordion component */
|
|
544
605
|
items: IAccordionProps[];
|
|
606
|
+
/** Custom CSS classes */
|
|
607
|
+
className?: string;
|
|
545
608
|
}
|
|
546
609
|
export declare const BannerVariants: {
|
|
547
610
|
readonly 'service-persistent': "service-persistent";
|
|
@@ -676,3 +739,27 @@ export declare enum LinkTarget {
|
|
|
676
739
|
*/
|
|
677
740
|
Blank = "_blank"
|
|
678
741
|
}
|
|
742
|
+
export interface ISkipToMainProps {
|
|
743
|
+
/**
|
|
744
|
+
* Defines which tag the button should skip to.
|
|
745
|
+
*/
|
|
746
|
+
skipToId?: string;
|
|
747
|
+
}
|
|
748
|
+
export declare type PaywallProps = {
|
|
749
|
+
/** Custom CSS classes */
|
|
750
|
+
className?: string;
|
|
751
|
+
/** Heading text */
|
|
752
|
+
title: string;
|
|
753
|
+
/** Introduction text */
|
|
754
|
+
intro?: string;
|
|
755
|
+
/** Body HTML */
|
|
756
|
+
description: string;
|
|
757
|
+
/** CTA text */
|
|
758
|
+
buttonText: string;
|
|
759
|
+
/** CTA URL */
|
|
760
|
+
buttonUrl: string;
|
|
761
|
+
/** Text before sign-in link (required to show sign-in link) */
|
|
762
|
+
signInPromptText?: string;
|
|
763
|
+
/** Sign-in link URL (required to show sign-in link) */
|
|
764
|
+
signInLinkUrl?: string;
|
|
765
|
+
};
|
|
@@ -22,8 +22,16 @@ export interface IGenericTypographyProps<T extends HTMLElement = HTMLParagraphEl
|
|
|
22
22
|
bold?: boolean;
|
|
23
23
|
className?: string;
|
|
24
24
|
}
|
|
25
|
-
export
|
|
25
|
+
export declare type HarmonicHeaderProps = (IGenericTypographyProps<HTMLHeadingElement> & {
|
|
26
26
|
hierarchy: HeaderHierarchy;
|
|
27
|
+
tag?: never;
|
|
28
|
+
}) | (IGenericTypographyProps<HTMLHeadingElement> & {
|
|
29
|
+
tag?: React.ElementType;
|
|
30
|
+
hierarchy?: never;
|
|
31
|
+
});
|
|
32
|
+
export interface ITaggedTypographyProps extends IGenericTypographyProps {
|
|
33
|
+
/** Specifies the HTML tag for rendering typography. The default is 'p'. */
|
|
34
|
+
tag?: React.ElementType;
|
|
27
35
|
}
|
|
28
36
|
export declare type TypographyLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
29
37
|
export declare type AltHeaderLevel = 3 | 4 | 5 | 6;
|
package/dist/types/upsell.d.ts
CHANGED
|
@@ -39,9 +39,23 @@ export interface IUpsellCardProps {
|
|
|
39
39
|
*/
|
|
40
40
|
link?: EditorialLink;
|
|
41
41
|
/**
|
|
42
|
-
*
|
|
42
|
+
* Optional link for secondary CTA
|
|
43
|
+
*/
|
|
44
|
+
secondaryLink?: EditorialLink;
|
|
45
|
+
/**
|
|
46
|
+
* If true, switch to stacked CTAs earlier than usual to avoid button text spanning
|
|
47
|
+
* two lines. Useful when this component is rendered within in a narrow parent
|
|
48
|
+
* such as as an item in the Upsell Section.
|
|
49
|
+
*/
|
|
50
|
+
stackCtasEarly?: boolean;
|
|
51
|
+
/**
|
|
52
|
+
* Theme for primary CTA: Core, Stream, or Cinema
|
|
43
53
|
*/
|
|
44
54
|
theme?: ThemeType;
|
|
55
|
+
/**
|
|
56
|
+
* Theme for secondary CTA: Core, Stream, or Cinema
|
|
57
|
+
*/
|
|
58
|
+
secondaryTheme?: ThemeType;
|
|
45
59
|
}
|
|
46
60
|
export interface IUpsellCardsProps {
|
|
47
61
|
/**
|
|
@@ -54,24 +68,16 @@ export interface IUpsellCardsProps {
|
|
|
54
68
|
theme?: ThemeType;
|
|
55
69
|
}
|
|
56
70
|
export interface IUpsellSectionProps {
|
|
57
|
-
/**
|
|
58
|
-
* Upsell Section title
|
|
59
|
-
*/
|
|
71
|
+
/** Upsell Section title */
|
|
60
72
|
title?: string;
|
|
61
|
-
/**
|
|
62
|
-
* Richtext section
|
|
63
|
-
*/
|
|
73
|
+
/** Richtext section */
|
|
64
74
|
richText?: string;
|
|
65
|
-
/**
|
|
66
|
-
* CTA link. Eg. for sign in.
|
|
67
|
-
*/
|
|
75
|
+
/** CTA link. Eg. for sign in. */
|
|
68
76
|
link?: EditorialLink;
|
|
69
|
-
/**
|
|
70
|
-
* Array of upsellCards
|
|
71
|
-
*/
|
|
77
|
+
/** Array of upsellCards */
|
|
72
78
|
upsellCards?: IUpsellCardProps[];
|
|
73
|
-
/**
|
|
74
|
-
* Theme options
|
|
75
|
-
*/
|
|
79
|
+
/** Theme options */
|
|
76
80
|
theme?: ThemeType;
|
|
81
|
+
/** Custom CSS classes */
|
|
82
|
+
className?: string;
|
|
77
83
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@royaloperahouse/harmonic",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0-a",
|
|
4
4
|
"author": "Royal Opera House",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -142,5 +142,6 @@
|
|
|
142
142
|
"npx eslint src --fix ",
|
|
143
143
|
"npx prettier src --write --uncommitted"
|
|
144
144
|
]
|
|
145
|
-
}
|
|
145
|
+
},
|
|
146
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
146
147
|
}
|