@royaloperahouse/harmonic 1.0.1-e → 1.0.1-g

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.
@@ -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
  }
@@ -438,6 +438,14 @@ export declare type IHotFilterProps = {
438
438
  onSelect?: (index: number) => void;
439
439
  };
440
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;
441
449
  /**
442
450
  * Name of the cast member shown below the image circle. Required.
443
451
  */
@@ -465,8 +473,14 @@ export declare type ICastFiltersProps = {
465
473
  cast: ICastFilterItem[];
466
474
  /**
467
475
  * Indices of currently selected cast in the `cast` array.
476
+ * Legacy API kept for backwards compatibility.
468
477
  */
469
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>;
470
484
  /**
471
485
  * Text shown at the top of the component, e.g. 'Filter by cast'. If this is not provided
472
486
  * the component will render without any.
@@ -496,12 +510,22 @@ export declare type ICastFiltersProps = {
496
510
  listRoleDescription?: string;
497
511
  /**
498
512
  * Handle selecting individual cast filters.
513
+ * Legacy API kept for backwards compatibility.
499
514
  */
500
515
  onSelect?: (index: number) => void;
516
+ /**
517
+ * Handle selecting individual cast filters using stable item ID/slug.
518
+ */
519
+ onSelectId?: (id: string) => void;
501
520
  /**
502
521
  * Handle clicking the primary CTA.
522
+ * Legacy API kept for backwards compatibility.
503
523
  */
504
524
  onApply?: (indices: number[]) => void;
525
+ /**
526
+ * Handle clicking the primary CTA using stable selected IDs/slugs.
527
+ */
528
+ onApplyIds?: (ids: string[]) => void;
505
529
  /**
506
530
  * Handle clicking the text link.
507
531
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royaloperahouse/harmonic",
3
- "version": "1.0.1-e",
3
+ "version": "1.0.1-g",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",