@royaloperahouse/harmonic 1.0.5-a → 1.0.5-b

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
@@ -10,6 +10,6 @@ import AuxiliaryButton from './components/atoms/Buttons/Auxiliary/AuxiliaryButto
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, 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, };
@@ -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;
@@ -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,15 @@ 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 ICastFilterItem = {
441
+ /**
442
+ * Stable identifier for selection mapping and rendering keys.
443
+ */
444
+ id?: string | number;
445
+ /**
446
+ * Alternative stable identifier for selection mapping and rendering keys.
447
+ */
448
+ slug?: string;
433
449
  /**
434
450
  * Name of the cast member shown below the image circle. Required.
435
451
  */
@@ -438,6 +454,15 @@ export declare type ICastFilterItem = Pick<AnchorHTMLAttributes<HTMLAnchorElemen
438
454
  * Image source for the image to be shown. Optional but if not included an unaesthetic placeholder will show.
439
455
  */
440
456
  image?: string;
457
+ /**
458
+ * Optional accessible name for the option. If omitted, `name` is used.
459
+ */
460
+ 'aria-label'?: string;
461
+ /**
462
+ * Kept for backwards compatibility with existing integrations.
463
+ * CastFilter always renders option semantics and ignores this value at runtime.
464
+ */
465
+ role?: string;
441
466
  onClick?: () => void;
442
467
  };
443
468
  export declare type ICastFiltersProps = {
@@ -448,8 +473,14 @@ export declare type ICastFiltersProps = {
448
473
  cast: ICastFilterItem[];
449
474
  /**
450
475
  * Indices of currently selected cast in the `cast` array.
476
+ * Legacy API kept for backwards compatibility.
451
477
  */
452
478
  selectedIndices?: number[];
479
+ /**
480
+ * Stable IDs/slugs of currently selected cast items.
481
+ * Prefer this over `selectedIndices` for stable selection across reordering.
482
+ */
483
+ selectedIds?: Array<string | number>;
453
484
  /**
454
485
  * Text shown at the top of the component, e.g. 'Filter by cast'. If this is not provided
455
486
  * the component will render without any.
@@ -479,12 +510,22 @@ export declare type ICastFiltersProps = {
479
510
  listRoleDescription?: string;
480
511
  /**
481
512
  * Handle selecting individual cast filters.
513
+ * Legacy API kept for backwards compatibility.
482
514
  */
483
515
  onSelect?: (index: number) => void;
516
+ /**
517
+ * Handle selecting individual cast filters using stable item ID/slug.
518
+ */
519
+ onSelectId?: (id: string) => void;
484
520
  /**
485
521
  * Handle clicking the primary CTA.
522
+ * Legacy API kept for backwards compatibility.
486
523
  */
487
524
  onApply?: (indices: number[]) => void;
525
+ /**
526
+ * Handle clicking the primary CTA using stable selected IDs/slugs.
527
+ */
528
+ onApplyIds?: (ids: string[]) => void;
488
529
  /**
489
530
  * Handle clicking the text link.
490
531
  */
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-b",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",