@royaloperahouse/harmonic 0.7.1-g → 0.7.1-h

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.
@@ -1 +1 @@
1
- export declare function useFocusTrap(containerRef: React.RefObject<HTMLElement>, onEscape?: () => void): void;
1
+ export declare function useFocusTrap(containerRef: React.RefObject<HTMLElement>, onEscape?: () => void, enabled?: boolean): void;
@@ -13,6 +13,8 @@ declare type BaseProps = {
13
13
  onClick?: MouseEventHandler<HTMLAnchorElement>;
14
14
  /** Custom CSS classes */
15
15
  className?: string;
16
+ /** Styled Components theme */
17
+ theme?: unknown;
16
18
  };
17
19
  declare type IconProps = {
18
20
  /** Icon identifier */
@@ -213,6 +213,11 @@ export interface ISearchBarProps {
213
213
  * Function to be called when is closed
214
214
  */
215
215
  onClose?: (e?: React.MouseEvent) => void;
216
+ /**
217
+ * If true, traps keyboard focus inside the search bar.
218
+ * Set to false when used inline on a page.
219
+ */
220
+ trapFocus?: boolean;
216
221
  /**
217
222
  * Reference to the input element for focusing
218
223
  */
@@ -39,9 +39,23 @@ export interface IUpsellCardProps {
39
39
  */
40
40
  link?: EditorialLink;
41
41
  /**
42
- * Theme: Core, Stream, or Cinema
42
+ * Optional link for secondary CTA
43
+ */
44
+ secondaryLink?: EditorialLink;
45
+ /**
46
+ * If true, switch to stacked CTAs earlier than usual to avoid button text spanning
47
+ * two lines. Useful when this component is rendered within in a narrow parent
48
+ * such as as an item in the Upsell Section.
49
+ */
50
+ stackCtasEarly?: boolean;
51
+ /**
52
+ * Theme for primary CTA: Core, Stream, or Cinema
43
53
  */
44
54
  theme?: ThemeType;
55
+ /**
56
+ * Theme for secondary CTA: Core, Stream, or Cinema
57
+ */
58
+ secondaryTheme?: ThemeType;
45
59
  }
46
60
  export interface IUpsellCardsProps {
47
61
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@royaloperahouse/harmonic",
3
- "version": "0.7.1-g",
3
+ "version": "0.7.1-h",
4
4
  "author": "Royal Opera House",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",