@royaloperahouse/harmonic 1.0.6-a → 1.0.6-c

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 (28) hide show
  1. package/CHANGELOG.md +27 -3
  2. package/dist/components/atoms/Dropdown/Dropdown.d.ts +1 -1
  3. package/dist/components/atoms/Tab/Tab.d.ts +1 -1
  4. package/dist/components/index.d.ts +2 -2
  5. package/dist/components/molecules/CustomStrategyTabsFilter/CustomStrategyTabsFilter.d.ts +70 -0
  6. package/dist/components/molecules/CustomStrategyTabsFilter/index.d.ts +2 -0
  7. package/dist/components/molecules/CustomStrategyTabsFilter/styled.d.ts +18 -0
  8. package/dist/components/molecules/PageHeading/PageHeading.style.d.ts +3 -2
  9. package/dist/components/molecules/PeopleListing/CreditListing/CreditListing.d.ts +1 -1
  10. package/dist/components/molecules/SkipToMain/SkipToMain.style.d.ts +1 -1
  11. package/dist/components/molecules/index.d.ts +2 -1
  12. package/dist/components/organisms/Carousels/Carousel/Carousel.d.ts +1 -3
  13. package/dist/components/organisms/Carousels/HighlightsCarousel/HighlightsCarousel.d.ts +1 -3
  14. package/dist/harmonic.cjs.development.css +319 -0
  15. package/dist/harmonic.cjs.development.js +497 -292
  16. package/dist/harmonic.cjs.development.js.map +1 -1
  17. package/dist/harmonic.cjs.production.min.js +1 -1
  18. package/dist/harmonic.cjs.production.min.js.map +1 -1
  19. package/dist/harmonic.esm.js +508 -301
  20. package/dist/harmonic.esm.js.map +1 -1
  21. package/dist/index.d.ts +3 -3
  22. package/dist/styles/HarmonicThemeProvider/HarmonicThemeProvider.d.ts +1 -0
  23. package/dist/types/carousel.d.ts +24 -1
  24. package/dist/types/creditListing.d.ts +7 -6
  25. package/dist/types/index.d.ts +2 -2
  26. package/dist/types/modalWindow.d.ts +4 -0
  27. package/dist/types/types.d.ts +93 -2
  28. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { Account, Accordion, Accordions, AnchorBar, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryNav, Basket, BodyText, Card, Cards, Carousel, CastFilter, CinemaBadge, ContactCard, ContactNewsletter, ContentSummary, ControlledDropdown, Dropdown, CreditListing, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, HotFilters, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information, Logo, Navigation, NavTop, MinimalCarousel, Overline, PageHeading, PageHeadingCompact, PageHeadingImpact, PageHeadingPanel, PageHeadingHighlight, PageHeadingPromo, PageHeadingHighlightCarousel, Pagination, PasswordStrength, Person, Paywall, PersonDetails, PeopleListing, PolicyLinks, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio2, RadioGroup2, ReadMore, RotatorButtons, Search, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SocialLinks, SectionSplitter, SectionTitle, Select2, Select2Async, SignUpForm, Swipe, SwipeRef, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, TertiaryButton, ThemeProvider, TitleWithCTA, Tab, Table, TabLink, Tabs, TextArea, TextField, TextFieldLegacy, TextLink, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellCards, UpsellSection, VideoControls, VideoWithControls } from './components';
1
+ import { Account, Accordion, Accordions, AnchorBar, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryNav, Basket, BodyText, Card, Cards, Carousel, CastFilter, CinemaBadge, ContactCard, ContactNewsletter, ContentSummary, ControlledDropdown, Dropdown, CreditListing, Editorial, Footer, GlobalStyles, Grid, GridItem, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, HotFilters, Icon, ImageAspectRatioWrapper, ImageWithCaption, Information, Logo, Navigation, NavTop, MinimalCarousel, CustomStrategyTabsFilter, Overline, PageHeading, PageHeadingCompact, PageHeadingImpact, PageHeadingPanel, PageHeadingHighlight, PageHeadingPromo, PageHeadingHighlightCarousel, Pagination, PasswordStrength, Person, Paywall, PersonDetails, PeopleListing, PolicyLinks, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio2, RadioGroup2, ReadMore, RotatorButtons, Search, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SocialLinks, SectionSplitter, SectionTitle, Select2, Select2Async, SignUpForm, Swipe, SwipeRef, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, TertiaryButton, ThemeProvider, TitleWithCTA, Tab, Table, TabLink, Tabs, TextArea, TextField, TextFieldLegacy, TextLink, Tickbox, Tickbox2, Timer, TypeTags, UpsellCard, UpsellCards, UpsellSection, VideoControls, VideoWithControls } from './components';
2
2
  import BodyContent from './components/molecules/BodyContent';
3
3
  import Quote from './components/molecules/Quote';
4
4
  import { devices, breakpoints } from './styles/viewports';
5
5
  import zIndexes from './styles/zIndexes';
6
- import { AspectRatio, ButtonType, CarouselType, Colors, IconNameType, IntegratedTimerProps, ITimerProps, TickboxMode, ThemeColor, ThemeType, EditorialLink, IInformationTitleProps, IInformationCTAProps } from './types';
6
+ import { AspectRatio, ButtonType, CarouselType, Colors, IconNameType, IntegratedTimerProps, ITimerProps, TickboxMode, ThemeColor, ThemeType, EditorialLink, IInformationTitleProps, IInformationCTAProps, TCustomStrategyTabsFilterProps, TCustomStrategyTabsFilterItem } from './types';
7
7
  import { MiniCard } from './components/molecules';
8
8
  import { ModalWindow } from './components/organisms';
9
9
  import AuxiliaryButton from './components/atoms/Buttons/Auxiliary/AuxiliaryButton';
@@ -12,4 +12,4 @@ import HarmonicThemeProvider, { useHarmonicTheme } from './styles/HarmonicThemeP
12
12
  import { HarmonicSize } from './types/typography';
13
13
  import { DisplayHeader, HarmonicHeader, HarmonicSubtitle, BodyCopyHarmonic, HarmonicOverline, ButtonText, Caption, NavigationText } from './components/Typography';
14
14
  export { useHarmonicTheme };
15
- export { Account, Accordion, Accordions, AnchorBar, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryButton, AuxiliaryNav, AspectRatio, Basket, BodyContent, BodyText, breakpoints, ButtonType, Card, Cards, CarouselType, Carousel, CastFilter, CinemaBadge, Colors, ContactCard, ContactNewsletter, ContentSummary, ControlledDropdown, DisplayHeader, Dropdown, CreditListing, devices, Editorial, EditorialLink, Footer, GlobalStyles, Grid, GridItem, HarmonicSize, HarmonicThemeProvider, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, HotFilters, Icon, IconNameType, ImageAspectRatioWrapper, ImageWithCaption, Information, Logo, IInformationCTAProps, IInformationTitleProps, ITimerProps, IntegratedTimerProps, MinimalCarousel, MiniCard, ModalWindow, Navigation, NavTop, Overline, PageHeading, PageHeadingCompact, PageHeadingImpact, PageHeadingPanel, PageHeadingHighlight, PageHeadingPromo, PageHeadingHighlightCarousel, Pagination, PasswordStrength, Person, PersonCard, PersonDetails, Paywall, PeopleListing, PolicyLinks, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio2, RadioGroup2, ReadMore, RotatorButtons, Search, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SocialLinks, SectionSplitter, SectionTitle, Select2, Select2Async, SignUpForm, Swipe, SwipeRef, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, Tab, Table, TabLink, Tabs, TertiaryButton, TextArea, TextField, TextFieldLegacy, TextLink, ThemeColor, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, Tickbox2, TickboxMode, Timer, TypeTags, UpsellCard, UpsellCards, UpsellSection, Quote, VideoControls, VideoWithControls, zIndexes, HarmonicHeader, HarmonicSubtitle, BodyCopyHarmonic, HarmonicOverline, ButtonText, Caption, NavigationText, };
15
+ export { Account, Accordion, Accordions, AnchorBar, AnnouncementBanner, AltHeader, AnchorTabBar, AuxiliaryButton, AuxiliaryNav, AspectRatio, Basket, BodyContent, BodyText, breakpoints, ButtonType, Card, Cards, CarouselType, Carousel, CastFilter, CinemaBadge, Colors, ContactCard, ContactNewsletter, ContentSummary, ControlledDropdown, DisplayHeader, Dropdown, CreditListing, devices, Editorial, EditorialLink, Footer, GlobalStyles, Grid, GridItem, HarmonicSize, HarmonicThemeProvider, Header, HighlightsCarousel, HighlightsCarouselCinema, HighlightsCarouselCore, HighlightsCarouselStream, HotFilters, Icon, IconNameType, ImageAspectRatioWrapper, ImageWithCaption, Information, Logo, IInformationCTAProps, IInformationTitleProps, ITimerProps, IntegratedTimerProps, MinimalCarousel, MiniCard, CustomStrategyTabsFilter, ModalWindow, Navigation, NavTop, Overline, PageHeading, PageHeadingCompact, PageHeadingImpact, PageHeadingPanel, PageHeadingHighlight, PageHeadingPromo, PageHeadingHighlightCarousel, Pagination, PasswordStrength, Person, PersonCard, PersonDetails, Paywall, PeopleListing, PolicyLinks, PrimaryButton, Progress, PromoWithTags, PromoWithTitle, Radio2, RadioGroup2, ReadMore, RotatorButtons, Search, StatusBanner, SearchBar, SecondaryButton, SecondaryLogo, SocialLinks, SectionSplitter, SectionTitle, Select2, Select2Async, SignUpForm, Swipe, SwipeRef, Sponsorship, StickyBar, Stepper, StreamBadge, Subtitle, Tab, Table, TabLink, Tabs, TCustomStrategyTabsFilterProps, TCustomStrategyTabsFilterItem, TertiaryButton, TextArea, TextField, TextFieldLegacy, TextLink, ThemeColor, ThemeProvider, ThemeType, TitleWithCTA, Tickbox, Tickbox2, TickboxMode, Timer, TypeTags, UpsellCard, UpsellCards, UpsellSection, Quote, VideoControls, VideoWithControls, zIndexes, HarmonicHeader, HarmonicSubtitle, BodyCopyHarmonic, HarmonicOverline, ButtonText, Caption, NavigationText, };
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { ThemeType } from '../../types';
3
3
  import './theme/fonts.css';
4
+ import './theme/typography.css';
4
5
  export declare const DEFAULT_THEME = ThemeType.Core;
5
6
  interface HarmonicThemeProviderProps {
6
7
  theme: ThemeType;
@@ -4,7 +4,7 @@ import { IImageWithCaptionProps } from './image';
4
4
  import { IntegratedTimerProps } from './timer';
5
5
  import { ILogosProps } from './types';
6
6
  import { EditorialLink } from './editorial';
7
- import { TypographyLevel } from './typography';
7
+ import { HarmonicSize, TypographyLevel } from './typography';
8
8
  export declare enum CarouselType {
9
9
  Image = "image",
10
10
  SmallCard = "SmallCard",
@@ -52,6 +52,20 @@ export interface ICarouselProps {
52
52
  * CSS class name
53
53
  */
54
54
  className?: string;
55
+ /**
56
+ * Enables infinite scroll once user interacts with buttons
57
+ */
58
+ enableInfiniteOnInteraction?: boolean;
59
+ /**
60
+ * Custom Title grid position
61
+ */
62
+ titleGrid?: {
63
+ columnStartDesktop: number;
64
+ columnSpanDesktop: number;
65
+ columnStartDevice: number;
66
+ columnSpanDevice: number;
67
+ };
68
+ titleFontFamily?: 'Victor' | 'Grey' | undefined;
55
69
  }
56
70
  export interface ICarouselWrapperProps {
57
71
  /**
@@ -177,6 +191,15 @@ export interface IHighlightsCarouselProps {
177
191
  * Additional CSS class names to apply to the navigation component.
178
192
  */
179
193
  className?: string;
194
+ /**
195
+ * Title size to be applied no title.
196
+ */
197
+ titleSize?: HarmonicSize;
198
+ /**
199
+ * Additional CSS class names to apply to the title component.
200
+ */
201
+ titleClassName?: string;
202
+ titleFontFamily?: 'Victor' | 'Grey' | undefined;
180
203
  }
181
204
  export declare type IHighlightsCoreCarouselProps = Omit<IHighlightsCarouselProps, 'logo'>;
182
205
  export interface IHighlightsCinemaCarouselProps extends Omit<IHighlightsCarouselProps, 'logo'> {
@@ -1,16 +1,17 @@
1
1
  import { ListingPerson } from './types';
2
2
  export interface ICreditListing {
3
3
  roles: {
4
- name: string;
4
+ name?: string;
5
5
  people: ListingPerson[] | ListingPerson[][];
6
- description: string;
7
- musicTitle: string[];
8
- replacement: string;
9
- additionalInfo: string;
10
- dataROH: string;
6
+ description?: string;
7
+ musicTitle?: string[];
8
+ replacement?: string;
9
+ additionalInfo?: string;
10
+ dataROH?: string;
11
11
  }[];
12
12
  columnCount?: number;
13
13
  expandLargeEntries?: boolean;
14
14
  largeColumnSpan?: number;
15
15
  characterThreshold?: number;
16
+ className?: string;
16
17
  }
@@ -1,5 +1,5 @@
1
1
  import type { FooterData } from './footer';
2
- import { Colors, ThemeType, ThemeColor } from './types';
2
+ import { Colors, ThemeType, ThemeColor, TCustomStrategyTabsFilterProps, TCustomStrategyTabsFilterItem } from './types';
3
3
  import { INavigationProps, INavTopProps } from './navigation';
4
4
  import { CarouselType } from './carousel';
5
5
  import { IconNameType } from './iconTypes';
@@ -12,5 +12,5 @@ import { IntegratedTimerProps, ITimerProps } from './timer';
12
12
  import { ICreditListing } from './creditListing';
13
13
  import { ModalWindowProps } from './modalWindow';
14
14
  import { IInformationTitleProps, IInformationCTAProps } from './information';
15
- export { AspectRatio, ButtonType, CarouselType, Colors, EditorialLink, IconNameType, ICreditListing, IPageHeadingCompactProps, INavigationProps, INavTopProps, IntegratedTimerProps, ITimerProps, ModalWindowProps, TickboxMode, ThemeColor, ThemeType, IInformationTitleProps, IInformationCTAProps, };
15
+ export { AspectRatio, ButtonType, CarouselType, Colors, EditorialLink, IconNameType, ICreditListing, IPageHeadingCompactProps, INavigationProps, INavTopProps, IntegratedTimerProps, ITimerProps, ModalWindowProps, TickboxMode, ThemeColor, ThemeType, IInformationTitleProps, IInformationCTAProps, TCustomStrategyTabsFilterProps, TCustomStrategyTabsFilterItem, };
16
16
  export type { FooterData };
@@ -17,4 +17,8 @@ export interface ModalWindowProps extends Modal.Props {
17
17
  * ID of the app element to assist with accessibility.
18
18
  */
19
19
  appElementId?: string;
20
+ /**
21
+ * Accessible label for the close button.
22
+ */
23
+ closeButtonAriaLabel?: string;
20
24
  }
@@ -147,6 +147,10 @@ export interface ITabProps {
147
147
  * Additional CSS class names to apply to the navigation component.
148
148
  */
149
149
  className?: string;
150
+ /**
151
+ * The unique ID to assign to the link element.
152
+ */
153
+ tabLinkId?: string;
150
154
  /**
151
155
  * Defines the ARIA role of the element for accessibility purposes.
152
156
  */
@@ -222,7 +226,11 @@ export interface IDropdownProps {
222
226
  */
223
227
  ariaLabel?: string;
224
228
  /**
225
- * Defines if it is needed to trim the text of the Tab and add 3 dots in the end
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
226
234
  */
227
235
  trimTabText?: boolean;
228
236
  }
@@ -429,7 +437,65 @@ export declare type IHotFilterProps = {
429
437
  selectedIndex?: number;
430
438
  onSelect?: (index: number) => void;
431
439
  };
432
- export declare type ICastFilterItem = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'aria-label' | 'role'> & {
440
+ /**
441
+ * Represents a single tab item rendered by the
442
+ * {@link CustomStrategyTabsFilter} component.
443
+ */
444
+ export declare type TCustomStrategyTabsFilterItem = Omit<IHotFilterItem, 'onClick'> & {
445
+ /**
446
+ * Indicates whether the tab is currently selected.
447
+ */
448
+ isSelected: boolean;
449
+ /**
450
+ * Unique identifier for the tab.
451
+ */
452
+ id: string;
453
+ /**
454
+ * Optional list of tab IDs that are allowed to be selected
455
+ * simultaneously with this tab.
456
+ *
457
+ * Useful for implementing multi-select filter behavior.
458
+ */
459
+ allowedSelectedWith?: string[];
460
+ };
461
+ /**
462
+ * Props for the {@link CustomStrategyTabsFilter} component.
463
+ */
464
+ export declare type TCustomStrategyTabsFilterProps = Omit<IHotFilterProps, 'items' | 'selectedIndex' | 'onSelect'> & {
465
+ /**
466
+ * Collection of tabs to display.
467
+ */
468
+ items: TCustomStrategyTabsFilterItem[];
469
+ /**
470
+ * Callback invoked when a tab is clicked.
471
+ *
472
+ * @param item The selected tab item.
473
+ * @returns Any value required by the consuming implementation.
474
+ */
475
+ onClick: <T>(item: TCustomStrategyTabsFilterItem) => T;
476
+ customViewConfig?: Partial<{
477
+ selectIcon: IconNameType;
478
+ backgroundColor: {
479
+ select: ThemeColor;
480
+ unselect: ThemeColor;
481
+ };
482
+ textColor: {
483
+ select: ThemeColor;
484
+ unselect: ThemeColor;
485
+ };
486
+ hoveredColor: ThemeColor;
487
+ pressedColor: ThemeColor;
488
+ }>;
489
+ };
490
+ export declare type ICastFilterItem = {
491
+ /**
492
+ * Stable identifier for selection mapping and rendering keys.
493
+ */
494
+ id?: string | number;
495
+ /**
496
+ * Alternative stable identifier for selection mapping and rendering keys.
497
+ */
498
+ slug?: string;
433
499
  /**
434
500
  * Name of the cast member shown below the image circle. Required.
435
501
  */
@@ -438,6 +504,15 @@ export declare type ICastFilterItem = Pick<AnchorHTMLAttributes<HTMLAnchorElemen
438
504
  * Image source for the image to be shown. Optional but if not included an unaesthetic placeholder will show.
439
505
  */
440
506
  image?: string;
507
+ /**
508
+ * Optional accessible name for the option. If omitted, `name` is used.
509
+ */
510
+ 'aria-label'?: string;
511
+ /**
512
+ * Kept for backwards compatibility with existing integrations.
513
+ * CastFilter always renders option semantics and ignores this value at runtime.
514
+ */
515
+ role?: string;
441
516
  onClick?: () => void;
442
517
  };
443
518
  export declare type ICastFiltersProps = {
@@ -448,8 +523,14 @@ export declare type ICastFiltersProps = {
448
523
  cast: ICastFilterItem[];
449
524
  /**
450
525
  * Indices of currently selected cast in the `cast` array.
526
+ * Legacy API kept for backwards compatibility.
451
527
  */
452
528
  selectedIndices?: number[];
529
+ /**
530
+ * Stable IDs/slugs of currently selected cast items.
531
+ * Prefer this over `selectedIndices` for stable selection across reordering.
532
+ */
533
+ selectedIds?: Array<string | number>;
453
534
  /**
454
535
  * Text shown at the top of the component, e.g. 'Filter by cast'. If this is not provided
455
536
  * the component will render without any.
@@ -479,12 +560,22 @@ export declare type ICastFiltersProps = {
479
560
  listRoleDescription?: string;
480
561
  /**
481
562
  * Handle selecting individual cast filters.
563
+ * Legacy API kept for backwards compatibility.
482
564
  */
483
565
  onSelect?: (index: number) => void;
566
+ /**
567
+ * Handle selecting individual cast filters using stable item ID/slug.
568
+ */
569
+ onSelectId?: (id: string) => void;
484
570
  /**
485
571
  * Handle clicking the primary CTA.
572
+ * Legacy API kept for backwards compatibility.
486
573
  */
487
574
  onApply?: (indices: number[]) => void;
575
+ /**
576
+ * Handle clicking the primary CTA using stable selected IDs/slugs.
577
+ */
578
+ onApplyIds?: (ids: string[]) => void;
488
579
  /**
489
580
  * Handle clicking the text link.
490
581
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royaloperahouse/harmonic",
3
- "version": "1.0.6-a",
3
+ "version": "1.0.6-c",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",