@royaloperahouse/harmonic 0.11.0-q → 0.12.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.
@@ -426,6 +426,62 @@ export declare type IHotFilterProps = {
426
426
  selectedIndex?: number;
427
427
  onSelect?: (index: number) => void;
428
428
  };
429
+ export declare type ICastFilterItem = Pick<AnchorHTMLAttributes<HTMLAnchorElement>, 'aria-label' | 'role'> & {
430
+ /**
431
+ * Name of the cast member shown below the image circle. Required.
432
+ */
433
+ name: string;
434
+ /**
435
+ * Image source for the image to be shown. Optional but if not included an unaesthetic placeholder will show.
436
+ */
437
+ image?: string;
438
+ onClick?: () => void;
439
+ };
440
+ export declare type ICastFiltersProps = {
441
+ /**
442
+ * Array of cast to filter by.
443
+ */
444
+ cast: ICastFilterItem[];
445
+ /**
446
+ * A classname is required for the HarmonicThemeProvider to provide styles properly.
447
+ * If it is not provided here it will default to 'cast-filters'.
448
+ */
449
+ className?: string;
450
+ /**
451
+ * Indices of currently selected cast in the `cast` array.
452
+ */
453
+ selectedIndices?: number[];
454
+ /**
455
+ * Text shown at the top of the component, e.g. 'Filter by cast'. If this is not provided
456
+ * the component will render without any.
457
+ */
458
+ headingText?: string;
459
+ /**
460
+ * Override the text of the primary CTA. Default is 'Apply'.
461
+ */
462
+ ctaText?: string;
463
+ /**
464
+ * Override the text of the text link. Default is 'Clear'.
465
+ */
466
+ textLinkText?: string;
467
+ /**
468
+ * Default image to show in cases where a cast member image prop is missing.
469
+ * If this is undefined then a light grey background will be displayed instead.
470
+ */
471
+ placeholderImage?: string;
472
+ /**
473
+ * Handle selecting individual cast filters.
474
+ */
475
+ onSelect?: (index: number) => void;
476
+ /**
477
+ * Handle clicking the primary CTA.
478
+ */
479
+ onApply?: (indices: number[]) => void;
480
+ /**
481
+ * Handle clicking the text link.
482
+ */
483
+ onClear?: () => void;
484
+ };
429
485
  export interface ISponsorshipProps {
430
486
  /**
431
487
  * Source URL for Sponsorship IFRAME.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royaloperahouse/harmonic",
3
- "version": "0.11.0-q",
3
+ "version": "0.12.0-a",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",