@royaloperahouse/harmonic 1.0.5-a → 1.0.5-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.
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
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';
10
10
  import PersonCard from './components/molecules/PersonCard';
11
11
  import HarmonicThemeProvider, { useHarmonicTheme } from './styles/HarmonicThemeProvider';
12
12
  import { HarmonicSize } from './types/typography';
13
- import { DisplayHeader, HarmonicHeader, HarmonicSubtitle, BodyCopyHarmonic, HarmonicOverline, ButtonText, Caption, NavigationText } from './components/Typography';
13
+ import { 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, 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;
@@ -52,6 +52,19 @@ 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
+ };
55
68
  }
56
69
  export interface ICarouselWrapperProps {
57
70
  /**
@@ -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,24 @@ 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
+ export declare type TCustomStrategyTabsFilterItem = Omit<IHotFilterItem, 'onClick'> & {
441
+ isSelected: boolean;
442
+ id: string;
443
+ allowedChoice?: string[];
444
+ };
445
+ export declare type TCustomStrategyTabsFilterProps = Omit<IHotFilterProps, 'items' | 'selectedIndex' | 'onSelect'> & {
446
+ items: TCustomStrategyTabsFilterItem[];
447
+ onClick: (item: TCustomStrategyTabsFilterItem) => void;
448
+ };
449
+ export declare type ICastFilterItem = {
450
+ /**
451
+ * Stable identifier for selection mapping and rendering keys.
452
+ */
453
+ id?: string | number;
454
+ /**
455
+ * Alternative stable identifier for selection mapping and rendering keys.
456
+ */
457
+ slug?: string;
433
458
  /**
434
459
  * Name of the cast member shown below the image circle. Required.
435
460
  */
@@ -438,6 +463,15 @@ export declare type ICastFilterItem = Pick<AnchorHTMLAttributes<HTMLAnchorElemen
438
463
  * Image source for the image to be shown. Optional but if not included an unaesthetic placeholder will show.
439
464
  */
440
465
  image?: string;
466
+ /**
467
+ * Optional accessible name for the option. If omitted, `name` is used.
468
+ */
469
+ 'aria-label'?: string;
470
+ /**
471
+ * Kept for backwards compatibility with existing integrations.
472
+ * CastFilter always renders option semantics and ignores this value at runtime.
473
+ */
474
+ role?: string;
441
475
  onClick?: () => void;
442
476
  };
443
477
  export declare type ICastFiltersProps = {
@@ -448,8 +482,14 @@ export declare type ICastFiltersProps = {
448
482
  cast: ICastFilterItem[];
449
483
  /**
450
484
  * Indices of currently selected cast in the `cast` array.
485
+ * Legacy API kept for backwards compatibility.
451
486
  */
452
487
  selectedIndices?: number[];
488
+ /**
489
+ * Stable IDs/slugs of currently selected cast items.
490
+ * Prefer this over `selectedIndices` for stable selection across reordering.
491
+ */
492
+ selectedIds?: Array<string | number>;
453
493
  /**
454
494
  * Text shown at the top of the component, e.g. 'Filter by cast'. If this is not provided
455
495
  * the component will render without any.
@@ -479,12 +519,22 @@ export declare type ICastFiltersProps = {
479
519
  listRoleDescription?: string;
480
520
  /**
481
521
  * Handle selecting individual cast filters.
522
+ * Legacy API kept for backwards compatibility.
482
523
  */
483
524
  onSelect?: (index: number) => void;
525
+ /**
526
+ * Handle selecting individual cast filters using stable item ID/slug.
527
+ */
528
+ onSelectId?: (id: string) => void;
484
529
  /**
485
530
  * Handle clicking the primary CTA.
531
+ * Legacy API kept for backwards compatibility.
486
532
  */
487
533
  onApply?: (indices: number[]) => void;
534
+ /**
535
+ * Handle clicking the primary CTA using stable selected IDs/slugs.
536
+ */
537
+ onApplyIds?: (ids: string[]) => void;
488
538
  /**
489
539
  * Handle clicking the text link.
490
540
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royaloperahouse/harmonic",
3
- "version": "1.0.5-a",
3
+ "version": "1.0.5-c",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",