@telefonica/mistica 15.20.0 → 15.20.1

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.
Files changed (93) hide show
  1. package/css/mistica.css +1 -1
  2. package/dist/accordion.d.ts +2 -2
  3. package/dist/avatar.d.ts +2 -2
  4. package/dist/badge.d.ts +1 -1
  5. package/dist/button-fixed-footer-layout.d.ts +1 -1
  6. package/dist/button-group.d.ts +2 -2
  7. package/dist/button-layout.d.ts +2 -2
  8. package/dist/button.d.ts +2 -2
  9. package/dist/callout.d.ts +1 -1
  10. package/dist/card.d.ts +1 -1
  11. package/dist/checkbox.d.ts +1 -1
  12. package/dist/chip.d.ts +3 -3
  13. package/dist/circle.d.ts +1 -1
  14. package/dist/community/blocks.d.ts +7 -7
  15. package/dist/counter.d.ts +2 -2
  16. package/dist/credit-card-expiration-field.d.ts +2 -2
  17. package/dist/credit-card-fields.d.ts +2 -2
  18. package/dist/credit-card-number-field.d.ts +2 -2
  19. package/dist/cvv-field.d.ts +2 -2
  20. package/dist/date-field.d.ts +2 -2
  21. package/dist/date-time-field.d.ts +2 -2
  22. package/dist/date-time-picker.d.ts +2 -2
  23. package/dist/decimal-field.d.ts +2 -2
  24. package/dist/dialog.js +72 -70
  25. package/dist/divider.d.ts +2 -4
  26. package/dist/double-field.d.ts +2 -2
  27. package/dist/email-field.d.ts +2 -2
  28. package/dist/empty-state-card.d.ts +1 -1
  29. package/dist/empty-state.d.ts +1 -1
  30. package/dist/fade-in.d.ts +1 -1
  31. package/dist/feedback.d.ts +6 -6
  32. package/dist/fixed-to-top.d.ts +1 -1
  33. package/dist/focus-trap.d.ts +1 -1
  34. package/dist/form.d.ts +1 -1
  35. package/dist/grid-layout.d.ts +1 -1
  36. package/dist/header.d.ts +4 -4
  37. package/dist/iban-field.d.ts +2 -2
  38. package/dist/icon-button.d.ts +2 -2
  39. package/dist/icons/icon-amex.d.ts +2 -2
  40. package/dist/icons/icon-chevron.d.ts +1 -1
  41. package/dist/icons/icon-cvv-amex.d.ts +2 -2
  42. package/dist/icons/icon-cvv-visa-mc.d.ts +2 -2
  43. package/dist/icons/icon-mastercard.d.ts +2 -2
  44. package/dist/icons/icon-visa.d.ts +2 -2
  45. package/dist/inline.d.ts +1 -1
  46. package/dist/integer-field.d.ts +1 -1
  47. package/dist/list.d.ts +3 -3
  48. package/dist/loading-bar.d.ts +2 -2
  49. package/dist/master-detail-layout.d.ts +1 -1
  50. package/dist/menu.d.ts +4 -4
  51. package/dist/month-field.d.ts +2 -2
  52. package/dist/mosaic.d.ts +3 -3
  53. package/dist/navigation-bar.d.ts +5 -5
  54. package/dist/navigation-breadcrumbs.d.ts +2 -2
  55. package/dist/negative-box.d.ts +1 -1
  56. package/dist/nestable-context.d.ts +5 -5
  57. package/dist/overlay.d.ts +1 -1
  58. package/dist/package-version.js +1 -1
  59. package/dist/password-field.d.ts +2 -2
  60. package/dist/phone-number-field.d.ts +2 -2
  61. package/dist/placeholder.d.ts +2 -2
  62. package/dist/popover.d.ts +1 -1
  63. package/dist/portal.d.ts +1 -1
  64. package/dist/progress-bar.d.ts +2 -2
  65. package/dist/radio-button.d.ts +2 -2
  66. package/dist/responsive-layout.d.ts +5 -5
  67. package/dist/screen-reader-only.d.ts +1 -1
  68. package/dist/screen-size-context-provider.d.ts +1 -1
  69. package/dist/select.d.ts +1 -1
  70. package/dist/snackbar.js +18 -20
  71. package/dist/spinner.d.ts +1 -1
  72. package/dist/stack.d.ts +1 -1
  73. package/dist/stacking-group.d.ts +1 -1
  74. package/dist/stepper.d.ts +2 -2
  75. package/dist/switch-component.d.ts +1 -1
  76. package/dist/tab-focus.d.ts +1 -1
  77. package/dist/tabs.d.ts +1 -1
  78. package/dist/tag.d.ts +3 -3
  79. package/dist/text-field-base.d.ts +4 -4
  80. package/dist/text-field-components.d.ts +3 -3
  81. package/dist/text-link.d.ts +1 -1
  82. package/dist/text.d.ts +11 -11
  83. package/dist/theme-context-provider.d.ts +1 -1
  84. package/dist/theme-variant-context.d.ts +1 -1
  85. package/dist/timer.d.ts +3 -3
  86. package/dist/tooltip.d.ts +2 -2
  87. package/dist/utils/aspect-ratio-support.d.ts +1 -1
  88. package/dist/utils/document-visibility.d.ts +1 -1
  89. package/dist-es/dialog.js +72 -70
  90. package/dist-es/package-version.js +1 -1
  91. package/dist-es/snackbar.js +21 -23
  92. package/dist-es/style.css +1 -1
  93. package/package.json +3 -3
@@ -8,5 +8,5 @@ type Props = {
8
8
  maxItems?: number;
9
9
  children: React.ReactNode;
10
10
  };
11
- declare const StackingGroup: React.FC<Props>;
11
+ declare const StackingGroup: ({ moreItemsStyle, stacked, maxItems, children, }: Props) => JSX.Element;
12
12
  export default StackingGroup;
package/dist/stepper.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { DataAttributes } from './utils/types';
3
3
  type StepperProps = {
4
4
  steps: ReadonlyArray<string>;
@@ -7,5 +7,5 @@ type StepperProps = {
7
7
  children?: void;
8
8
  dataAttributes?: DataAttributes;
9
9
  };
10
- declare const Stepper: React.FC<StepperProps>;
10
+ declare const Stepper: ({ steps, currentIndex, "aria-label": ariaLabel, dataAttributes, }: StepperProps) => JSX.Element;
11
11
  export default Stepper;
@@ -30,5 +30,5 @@ type PropsChildren = {
30
30
  'aria-label'?: string;
31
31
  dataAttributes?: DataAttributes;
32
32
  };
33
- declare const Switch: React.FC<PropsRender | PropsChildren>;
33
+ declare const Switch: (props: PropsRender | PropsChildren) => JSX.Element;
34
34
  export default Switch;
@@ -3,5 +3,5 @@ type Props = {
3
3
  children: React.ReactNode;
4
4
  disabled: boolean;
5
5
  };
6
- declare const TabFocus: React.FC<Props>;
6
+ declare const TabFocus: ({ children, disabled }: Props) => JSX.Element;
7
7
  export default TabFocus;
package/dist/tabs.d.ts CHANGED
@@ -12,5 +12,5 @@ export type TabsProps = {
12
12
  children?: void;
13
13
  dataAttributes?: DataAttributes;
14
14
  };
15
- declare const Tabs: React.FC<TabsProps>;
15
+ declare const Tabs: ({ selectedIndex, onChange, tabs, dataAttributes }: TabsProps) => JSX.Element;
16
16
  export default Tabs;
package/dist/tag.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { DataAttributes, IconProps } from './utils/types';
3
3
  export type TagType = 'promo' | 'active' | 'inactive' | 'success' | 'warning' | 'error';
4
4
  export type TagProps = {
5
5
  type?: 'promo' | 'active' | 'inactive' | 'success' | 'warning' | 'error';
6
6
  children: string;
7
- Icon?: React.FC<IconProps>;
7
+ Icon?: (props: IconProps) => JSX.Element;
8
8
  dataAttributes?: DataAttributes;
9
9
  badge?: boolean | number;
10
10
  };
11
- declare const Tag: React.FC<TagProps>;
11
+ declare const Tag: ({ Icon, children, dataAttributes, type, badge }: TagProps) => JSX.Element | null;
12
12
  export default Tag;
@@ -7,22 +7,22 @@ type FieldEndIconProps = {
7
7
  hasBackgroundColor?: boolean;
8
8
  disabled?: boolean;
9
9
  } & ExclusifyUnion<{
10
- Icon: React.FC<IconProps>;
10
+ Icon: (props: IconProps) => JSX.Element;
11
11
  'aria-label'?: string;
12
12
  onPress: (event: React.MouseEvent<HTMLElement>) => void;
13
13
  } | {
14
14
  checkedProps: {
15
- Icon: React.FC<IconProps>;
15
+ Icon: (props: IconProps) => JSX.Element;
16
16
  'aria-label'?: string;
17
17
  };
18
18
  uncheckedProps: {
19
- Icon: React.FC<IconProps>;
19
+ Icon: (props: IconProps) => JSX.Element;
20
20
  'aria-label'?: string;
21
21
  };
22
22
  onChange?: (checked: boolean) => void | undefined | Promise<void>;
23
23
  checked?: boolean;
24
24
  }>;
25
- export declare const FieldEndIcon: React.FC<FieldEndIconProps>;
25
+ export declare const FieldEndIcon: ({ hasBackgroundColor, onPress, onChange, disabled, Icon, checkedProps, uncheckedProps, "aria-label": ariaLabel, }: FieldEndIconProps) => JSX.Element;
26
26
  /**
27
27
  * Incomplete list, add more if needed
28
28
  * https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/autocomplete
@@ -10,7 +10,7 @@ type LabelProps = {
10
10
  style?: React.CSSProperties;
11
11
  optional?: boolean;
12
12
  };
13
- export declare const Label: React.FC<LabelProps>;
13
+ export declare const Label: ({ shrinkLabel, forId, inputState, error, children, style, optional, }: LabelProps) => JSX.Element;
14
14
  type HelperTextProps = {
15
15
  leftText?: string;
16
16
  rightText?: string;
@@ -18,7 +18,7 @@ type HelperTextProps = {
18
18
  id?: string;
19
19
  children?: void;
20
20
  };
21
- export declare const HelperText: React.FC<HelperTextProps>;
21
+ export declare const HelperText: ({ leftText, rightText, error, id }: HelperTextProps) => JSX.Element;
22
22
  type FieldContainerProps = {
23
23
  multiline?: boolean;
24
24
  disabled?: boolean;
@@ -30,5 +30,5 @@ type FieldContainerProps = {
30
30
  readOnly?: boolean;
31
31
  dataAttributes?: DataAttributes;
32
32
  };
33
- export declare const FieldContainer: React.FC<FieldContainerProps>;
33
+ export declare const FieldContainer: ({ multiline, disabled, children, helperText, className, fieldRef, fullWidth, readOnly, dataAttributes, }: FieldContainerProps) => JSX.Element;
34
34
  export {};
@@ -18,5 +18,5 @@ interface CommonProps {
18
18
  role?: string;
19
19
  }
20
20
  export type TextLinkProps = AlwaysTouchableComponentProps & CommonProps;
21
- declare const TextLink: React.FC<TextLinkProps>;
21
+ declare const TextLink: ({ children, className, disabled, style, trackEvent, ...props }: TextLinkProps) => JSX.Element;
22
22
  export default TextLink;
package/dist/text.d.ts CHANGED
@@ -43,7 +43,7 @@ interface TextProps extends TextPresetProps {
43
43
  letterSpacing?: number;
44
44
  forzeMobileSize?: never;
45
45
  }
46
- export declare const Text: React.FC<TextProps>;
46
+ export declare const Text: ({ weight, color, decoration, truncate, transform, wordBreak, hyphens, as, children, size, mobileSize, desktopSize, lineHeight, mobileLineHeight, desktopLineHeight, letterSpacing, textAlign, textShadow, id, role, "aria-level": ariaLevel, "aria-label": ariaLabel, dataAttributes, }: TextProps) => JSX.Element | null;
47
47
  interface LightProps extends TextPresetProps {
48
48
  light: boolean;
49
49
  }
@@ -120,14 +120,14 @@ export declare const textProps: {
120
120
  desktopLineHeight: string;
121
121
  };
122
122
  };
123
- export declare const Text10: React.FC<TextPresetProps>;
124
- export declare const Text9: React.FC<TextPresetProps>;
125
- export declare const Text8: React.FC<TextPresetProps>;
126
- export declare const Text7: React.FC<TextPresetProps>;
127
- export declare const Text6: React.FC<TextPresetProps>;
128
- export declare const Text5: React.FC<TextPresetProps>;
129
- export declare const Text4: React.FC<LightRegularMediumProps>;
130
- export declare const Text3: React.FC<LightRegularMediumProps>;
131
- export declare const Text2: React.FC<RegularMediumProps>;
132
- export declare const Text1: React.FC<RegularMediumProps>;
123
+ export declare const Text10: ({ dataAttributes, forceMobileSizes, ...props }: TextPresetProps) => JSX.Element;
124
+ export declare const Text9: ({ dataAttributes, forceMobileSizes, ...props }: TextPresetProps) => JSX.Element;
125
+ export declare const Text8: ({ dataAttributes, forceMobileSizes, ...props }: TextPresetProps) => JSX.Element;
126
+ export declare const Text7: ({ dataAttributes, forceMobileSizes, ...props }: TextPresetProps) => JSX.Element;
127
+ export declare const Text6: ({ dataAttributes, forceMobileSizes, ...props }: TextPresetProps) => JSX.Element;
128
+ export declare const Text5: ({ dataAttributes, forceMobileSizes, ...props }: TextPresetProps) => JSX.Element;
129
+ export declare const Text4: ({ dataAttributes, forceMobileSizes, ...props }: LightRegularMediumProps) => JSX.Element;
130
+ export declare const Text3: ({ dataAttributes, forceMobileSizes, ...props }: LightRegularMediumProps) => JSX.Element;
131
+ export declare const Text2: ({ dataAttributes, forceMobileSizes, ...props }: RegularMediumProps) => JSX.Element;
132
+ export declare const Text1: ({ dataAttributes, forceMobileSizes, ...props }: RegularMediumProps) => JSX.Element;
133
133
  export default Text;
@@ -7,5 +7,5 @@ type Props = {
7
7
  withoutStyles?: boolean;
8
8
  children?: React.ReactNode;
9
9
  };
10
- declare const ThemeContextProvider: React.FC<Props>;
10
+ declare const ThemeContextProvider: ({ theme, children, as, withoutStyles }: Props) => JSX.Element;
11
11
  export default ThemeContextProvider;
@@ -5,7 +5,7 @@ type ThemeVariantProps = {
5
5
  variant?: Variant;
6
6
  children: React.ReactNode;
7
7
  };
8
- export declare const ThemeVariant: React.FC<ThemeVariantProps>;
8
+ export declare const ThemeVariant: ({ isInverse, variant, children }: ThemeVariantProps) => JSX.Element;
9
9
  export declare const useThemeVariant: () => Variant;
10
10
  export declare const useIsInverseVariant: () => boolean;
11
11
  export {};
package/dist/timer.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { DataAttributes } from './utils/types';
3
3
  export type TimeUnit = 'days' | 'hours' | 'minutes' | 'seconds';
4
4
  type Label = 'none' | 'short' | 'long';
@@ -22,6 +22,6 @@ interface TextTimerProps extends BaseProps {
22
22
  interface TimerProps extends BaseProps {
23
23
  boxed?: boolean;
24
24
  }
25
- export declare const TextTimer: React.FC<TextTimerProps>;
26
- export declare const Timer: React.FC<TimerProps>;
25
+ export declare const TextTimer: ({ endTimestamp, labelType, minTimeUnit, maxTimeUnit, onProgress, dataAttributes, "aria-label": ariaLabel, }: TextTimerProps) => JSX.Element;
26
+ export declare const Timer: ({ boxed, endTimestamp, minTimeUnit, maxTimeUnit, onProgress, dataAttributes, "aria-label": ariaLabel, }: TimerProps) => JSX.Element;
27
27
  export {};
package/dist/tooltip.d.ts CHANGED
@@ -28,6 +28,6 @@ type BaseTooltipProps = {
28
28
  closeButtonLabel?: string;
29
29
  trackingEvent?: TrackingEvent | ReadonlyArray<TrackingEvent>;
30
30
  };
31
- export declare const BaseTooltip: React.FC<BaseTooltipProps>;
32
- declare const Tooltip: React.FC<Props>;
31
+ export declare const BaseTooltip: ({ content, target, width, position, dataAttributes, delay, centerContent, open, onClose, closeButtonLabel, hasPointerInteractionOnly, trackingEvent, }: BaseTooltipProps) => JSX.Element;
32
+ declare const Tooltip: ({ centerContent, extra, children, dataAttributes, title, description, ...props }: Props) => JSX.Element;
33
33
  export default Tooltip;
@@ -3,7 +3,7 @@ import type { DataAttributes } from './types';
3
3
  type Props = {
4
4
  children: React.ReactNode;
5
5
  };
6
- export declare const AspectRatioSupportProvider: React.FC<Props>;
6
+ export declare const AspectRatioSupportProvider: ({ children }: Props) => JSX.Element;
7
7
  export declare const useSupportsAspectRatio: () => boolean;
8
8
  type AspectRatioContainerProps = {
9
9
  width?: number | string;
@@ -3,6 +3,6 @@ type Props = {
3
3
  hidden?: boolean;
4
4
  children: React.ReactNode;
5
5
  };
6
- export declare const DocumentVisibilityProvider: React.FC<Props>;
6
+ export declare const DocumentVisibilityProvider: ({ hidden, children }: Props) => JSX.Element;
7
7
  export declare const useDocumentVisibility: () => boolean;
8
8
  export {};
package/dist-es/dialog.js CHANGED
@@ -98,35 +98,35 @@ import Q from "./stack.js";
98
98
  import { ANIMATION_DURATION_MS as X, wrapper as Z, modalOpacityLayer as $, closedOpactityLayer as ee, modalContent as te, closedModalContent as ne, modalCloseButtonContainer as oe, variants as ae, iconContainer as re, dialogContent as ie, dialogActions as se } from "./dialog.css-mistica.js";
99
99
  import { vars as le } from "./skins/skin-contract.css-mistica.js";
100
100
  const ce = ()=>process.env.NODE_ENV !== "test" && !H(), ue = (t)=>{
101
- const { texts: i } = D(), { className: u, title: r, message: f, icon: o, extra: c, showCancelButton: s, showAcceptButton: l, cancelText: g = i.dialogCancelButton, acceptText: m = i.dialogAcceptButton, onCancel: h, onAccept: C, destructive: B = !1 } = t, d = t.type === "dialog", p = d && !!t.link || l || s, y = {
101
+ const { texts: l } = D(), { className: m, title: i, message: g, icon: a, extra: r, showCancelButton: s, showAcceptButton: c, cancelText: d = l.dialogCancelButton, acceptText: h = l.dialogAcceptButton, onCancel: u, onAccept: C, destructive: B = !1 } = t, f = t.type === "dialog", p = f && !!t.link || c || s, y = {
102
102
  onPress: C || (()=>{}),
103
- children: m,
103
+ children: h,
104
104
  // @deprecated - testid should be removed but many webapp tests depend on this
105
105
  dataAttributes: {
106
106
  testid: "dialog-accept-button"
107
107
  }
108
108
  };
109
109
  return /* @__PURE__ */ w("div", {
110
- className: E(ae[d ? "dialog" : "default"], u),
110
+ className: E(ae[f ? "dialog" : "default"], m),
111
111
  children: [
112
- o && /* @__PURE__ */ e(k, {
112
+ a && /* @__PURE__ */ e(k, {
113
113
  paddingBottom: 24,
114
114
  children: /* @__PURE__ */ e("div", {
115
115
  className: re,
116
- children: /*#__PURE__*/ n.cloneElement(o, {
116
+ children: /*#__PURE__*/ n.cloneElement(a, {
117
117
  size: "100%"
118
118
  })
119
119
  })
120
120
  }),
121
- r && /* @__PURE__ */ e(k, {
121
+ i && /* @__PURE__ */ e(k, {
122
122
  paddingBottom: 16,
123
- children: d ? /* @__PURE__ */ e(Y, {
123
+ children: f ? /* @__PURE__ */ e(Y, {
124
124
  as: "h2",
125
- children: r
125
+ children: i
126
126
  }) : /* @__PURE__ */ e(A, {
127
127
  regular: !0,
128
128
  as: "h2",
129
- children: r
129
+ children: i
130
130
  })
131
131
  }),
132
132
  t.subtitle && /* @__PURE__ */ e(k, {
@@ -145,167 +145,169 @@ const ce = ()=>process.env.NODE_ENV !== "test" && !H(), ue = (t)=>{
145
145
  /* @__PURE__ */ e(q, {
146
146
  color: le.colors.textSecondary,
147
147
  regular: !0,
148
- children: f
148
+ children: g
149
149
  }),
150
- c
150
+ r
151
151
  ]
152
152
  })
153
153
  }),
154
154
  p && /* @__PURE__ */ e("div", {
155
155
  className: se,
156
156
  children: /* @__PURE__ */ e(U, {
157
- link: d ? t.link : void 0,
158
- primaryButton: l ? B ? /* @__PURE__ */ e(O, _object_spread({
157
+ link: f ? t.link : void 0,
158
+ primaryButton: c ? B ? /* @__PURE__ */ e(O, _object_spread({
159
159
  tabIndex: 1
160
160
  }, y)) : /* @__PURE__ */ e(S, _object_spread({
161
161
  tabIndex: 1
162
162
  }, y)) : void 0,
163
163
  secondaryButton: s ? /* @__PURE__ */ e(M, {
164
164
  tabIndex: 2,
165
- onPress: h || (()=>{}),
165
+ onPress: u || (()=>{}),
166
166
  dataAttributes: {
167
167
  testid: "dialog-cancel-button"
168
168
  },
169
- children: g
169
+ children: d
170
170
  }) : void 0
171
171
  })
172
172
  })
173
173
  ]
174
174
  });
175
175
  }, de = (param)=>{
176
- let { type: t, message: i, title: u, acceptText: r, cancelText: f, onAccept: o, onCancel: c, onDestroy: s } = param;
176
+ let { type: t, message: l, title: m, acceptText: i, cancelText: g, destructive: a, onAccept: r, onCancel: s, onDestroy: c } = param;
177
177
  return t === "confirm" ? z({
178
- message: i,
179
- title: u,
180
- cancelText: f,
181
- acceptText: r
182
- }).then((l)=>{
183
- l ? o == null || o() : c == null || c(), s();
178
+ message: l,
179
+ title: m,
180
+ cancelText: g,
181
+ acceptText: i,
182
+ destructive: a
183
+ }).then((d)=>{
184
+ d ? r == null || r() : s == null || s(), c();
184
185
  }) : K({
185
- message: i,
186
- title: u,
187
- buttonText: r
186
+ message: l,
187
+ title: m,
188
+ buttonText: i
188
189
  }).then(()=>{
189
- o == null || o(), s();
190
+ r == null || r(), c();
190
191
  });
191
192
  }, me = (param)=>{
192
- let { type: t, onAccept: i, onCancel: u, onDestroy: r, acceptText: f, cancelText: o, message: c, title: s } = param;
193
- const { texts: l } = D(), g = n.useRef({
193
+ let { type: t, onAccept: l, onCancel: m, onDestroy: i, acceptText: g, cancelText: a, message: r, title: s, destructive: c } = param;
194
+ const { texts: d } = D(), h = n.useRef({
194
195
  type: t,
195
- onAccept: i,
196
- onCancel: u,
197
- onDestroy: r,
198
- acceptText: f || l.dialogAcceptButton,
199
- cancelText: o || l.dialogCancelButton,
200
- message: c,
201
- title: s
202
- }), m = n.useRef(!1);
196
+ onAccept: l,
197
+ onCancel: m,
198
+ onDestroy: i,
199
+ acceptText: g || d.dialogAcceptButton,
200
+ cancelText: a || d.dialogCancelButton,
201
+ message: r,
202
+ title: s,
203
+ destructive: c
204
+ }), u = n.useRef(!1);
203
205
  return n.useEffect(()=>{
204
- m.current || (m.current = !0, de(g.current).finally(()=>{
205
- m.current = !1;
206
+ u.current || (u.current = !0, de(h.current).finally(()=>{
207
+ u.current = !1;
206
208
  }));
207
209
  }, []), /* @__PURE__ */ e(L, {});
208
210
  }, Ie = (t)=>{
209
211
  J();
210
- const i = n.useRef(null), { texts: u } = D(), [r, f] = n.useState(!1), o = n.useRef(!1), c = n.useRef(!1), [s, l] = n.useState(!1), g = n.useRef(!1), m = n.useRef(ce() ? X : 0), h = t.type !== "dialog" && W(), C = t.type === "dialog", B = t.type === "alert", { onAccept: d, onCancel: p, onDestroy: y } = t, I = _object_without_properties(t, [
212
+ const l = n.useRef(null), { texts: m } = D(), [i, g] = n.useState(!1), a = n.useRef(!1), r = n.useRef(!1), [s, c] = n.useState(!1), d = n.useRef(!1), h = n.useRef(ce() ? X : 0), u = t.type !== "dialog" && W(), C = t.type === "dialog", B = t.type === "alert", { onAccept: f, onCancel: p, onDestroy: y } = t, I = _object_without_properties(t, [
211
213
  "onAccept",
212
214
  "onCancel",
213
215
  "onDestroy"
214
216
  ]);
215
217
  n.useEffect(()=>{
216
- const a = setTimeout(()=>{
217
- o.current || l(!0);
218
- }, m.current);
218
+ const o = setTimeout(()=>{
219
+ a.current || c(!0);
220
+ }, h.current);
219
221
  return ()=>{
220
- clearTimeout(a);
222
+ clearTimeout(o);
221
223
  };
222
224
  }, []);
223
225
  const x = n.useCallback(()=>{
224
- c.current || (c.current = !0, g.current ? d == null || d() : p == null || p(), y());
226
+ r.current || (r.current = !0, d.current ? f == null || f() : p == null || p(), y());
225
227
  }, [
226
- d,
228
+ f,
227
229
  p,
228
230
  y
229
231
  ]), R = n.useCallback(()=>{
230
- let a;
231
- return !o.current && s && (o.current = !0, l(!1), f(!0), a = setTimeout(x, m.current)), ()=>{
232
- a && clearTimeout(a);
232
+ let o;
233
+ return !a.current && s && (a.current = !0, c(!1), g(!0), o = setTimeout(x, h.current)), ()=>{
234
+ o && clearTimeout(o);
233
235
  };
234
236
  }, [
235
237
  x,
236
238
  s
237
239
  ]), N = n.useCallback(()=>{
238
- g.current = !0, R();
240
+ d.current = !0, R();
239
241
  }, [
240
242
  R
241
243
  ]), b = n.useCallback(()=>{
242
- g.current = !1, R();
244
+ d.current = !1, R();
243
245
  }, [
244
246
  R
245
247
  ]), v = n.useCallback(()=>{
246
- o.current || (B ? N() : b());
248
+ a.current || (B ? N() : b());
247
249
  }, [
248
250
  N,
249
251
  b,
250
252
  B
251
- ]), T = n.useCallback((a)=>{
252
- a.key === G && (a.stopPropagation(), a.preventDefault(), v());
253
+ ]), T = n.useCallback((o)=>{
254
+ o.key === G && (o.stopPropagation(), o.preventDefault(), v());
253
255
  }, [
254
256
  v
255
257
  ]);
256
258
  n.useEffect(()=>{
257
- if (!h) return document.addEventListener("keydown", T), ()=>{
259
+ if (!u) return document.addEventListener("keydown", T), ()=>{
258
260
  document.removeEventListener("keydown", T);
259
261
  };
260
262
  }, [
261
263
  T,
262
- h
264
+ u
263
265
  ]), n.useEffect(()=>{
264
- if (!h) return window.addEventListener("popstate", v), ()=>{
266
+ if (!u) return window.addEventListener("popstate", v), ()=>{
265
267
  window.removeEventListener("popstate", v);
266
268
  };
267
269
  }, [
268
270
  v,
269
- h
271
+ u
270
272
  ]);
271
- const P = n.useCallback((a)=>{
272
- a.stopPropagation(), C && b();
273
+ const P = n.useCallback((o)=>{
274
+ o.stopPropagation(), C && b();
273
275
  }, [
274
276
  C,
275
277
  b
276
278
  ]);
277
279
  var _t_closeButtonLabel;
278
- return h ? /* @__PURE__ */ e(me, _object_spread({}, t)) : /* @__PURE__ */ e(_, {
280
+ return u ? /* @__PURE__ */ e(me, _object_spread({}, t)) : /* @__PURE__ */ e(_, {
279
281
  className: Z,
280
282
  children: /* @__PURE__ */ e(j, {
281
283
  children: /* @__PURE__ */ e("div", {
282
284
  onClick: P,
283
285
  className: E($, {
284
- [ee]: r
286
+ [ee]: i
285
287
  }),
286
288
  "data-testid": "dialog-overlay",
287
- "aria-hidden": r || !s,
289
+ "aria-hidden": i || !s,
288
290
  children: /* @__PURE__ */ e("div", {
289
291
  role: "dialog",
290
- onClick: (a)=>a.stopPropagation(),
292
+ onClick: (o)=>o.stopPropagation(),
291
293
  "data-component-name": "Dialog",
292
294
  children: /* @__PURE__ */ w("div", {
293
- ref: i,
294
- onAnimationEnd: (a)=>{
295
- a.target === i.current && (o.current || l(!0));
295
+ ref: l,
296
+ onAnimationEnd: (o)=>{
297
+ o.target === l.current && (a.current || c(!0));
296
298
  },
297
- onTransitionEnd: (a)=>{
298
- a.target === i.current && o.current && x();
299
+ onTransitionEnd: (o)=>{
300
+ o.target === l.current && a.current && x();
299
301
  },
300
302
  className: E(te, {
301
- [ne]: r
303
+ [ne]: i
302
304
  }),
303
305
  children: [
304
306
  C && /* @__PURE__ */ e("div", {
305
307
  className: oe,
306
308
  children: /* @__PURE__ */ e(V, {
307
309
  onPress: v,
308
- "aria-label": (_t_closeButtonLabel = t.closeButtonLabel) !== null && _t_closeButtonLabel !== void 0 ? _t_closeButtonLabel : u.modalClose || u.closeButtonLabel,
310
+ "aria-label": (_t_closeButtonLabel = t.closeButtonLabel) !== null && _t_closeButtonLabel !== void 0 ? _t_closeButtonLabel : m.modalClose || m.closeButtonLabel,
309
311
  bleedLeft: !0,
310
312
  bleedRight: !0,
311
313
  bleedY: !0,
@@ -1,2 +1,2 @@
1
- const o = "15.20.0";
1
+ const o = "15.20.1";
2
2
  export { o as PACKAGE_VERSION };
@@ -58,7 +58,7 @@ import N from "classnames";
58
58
  import { isWebViewBridgeAvailable as _, nativeMessage as b } from "@tef-novum/webview-bridge";
59
59
  import { useTheme as w, useElementDimensions as A, useScreenSize as x } from "./hooks.js";
60
60
  import { Text2 as W, Text3 as y } from "./text.js";
61
- import { TRANSITION_TIME_IN_MS as P, snackbarContainer as L, snackbar as V, snackbarOpen as z, wrapper as F, wrapperCritical as H, wrapperInfo as j, wrapperOpen as X, content as Y, button as $, longButton as q, dismissButton as G, dismissIcon as J } from "./snackbar.css-mistica.js";
61
+ import { TRANSITION_TIME_IN_MS as L, snackbarContainer as P, snackbar as V, snackbarOpen as z, wrapper as F, wrapperCritical as H, wrapperInfo as j, wrapperOpen as X, content as Y, button as $, longButton as q, dismissButton as G, dismissIcon as J } from "./snackbar.css-mistica.js";
62
62
  import { sprinkles as U } from "./sprinkles.css-mistica.js";
63
63
  import { vars as O } from "./skins/skin-contract.css-mistica.js";
64
64
  import { getPrefixedDataAttributes as K } from "./utils/dom.js";
@@ -70,39 +70,39 @@ const ee = [
70
70
  "CONSECUTIVE",
71
71
  "BUTTON"
72
72
  ], re = 5e3, te = 1e4, ne = /*#__PURE__*/ e.forwardRef((param, g)=>{
73
- let { message: m, buttonText: n, buttonAccessibilityLabel: u, closeButtonLabel: d, duration: t, onClose: o, type: c, withDismiss: p = !1, dataAttributes: R } = param;
74
- const { texts: T } = w(), [a, s] = e.useState(!1), { width: I, ref: v } = A(), { isDesktopOrBigger: i } = x(), l = I > (i ? 160 : 128), B = e.useRef(null), E = t === 1 / 0 && !n || p, h = e.useRef(o);
73
+ let { message: m, buttonText: n, buttonAccessibilityLabel: u, closeButtonLabel: I, duration: t, onClose: o, type: c, withDismiss: d = !1, dataAttributes: R } = param;
74
+ const { texts: T } = w(), [a, s] = e.useState(!1), { width: p, ref: v } = A(), { isDesktopOrBigger: i } = x(), l = p > (i ? 160 : 128), k = e.useRef(null), E = t === 1 / 0 && !n || d, h = e.useRef(o);
75
75
  e.useEffect(()=>{
76
76
  h.current = o;
77
77
  }, [
78
78
  o
79
79
  ]);
80
- const f = e.useCallback((k)=>{
80
+ const f = e.useCallback((B)=>{
81
81
  s(!1), setTimeout(()=>{
82
82
  var S;
83
- (S = h.current) == null || S.call(h, k);
84
- }, process.env.NODE_ENV === "test" ? 0 : P);
83
+ (S = h.current) == null || S.call(h, B);
84
+ }, process.env.NODE_ENV === "test" ? 0 : L);
85
85
  }, []);
86
- return e.useImperativeHandle(g, ()=>_object_spread_props(_object_spread({}, B), {
86
+ return e.useImperativeHandle(g, ()=>_object_spread_props(_object_spread({}, k), {
87
87
  close: f
88
88
  }), [
89
89
  f
90
90
  ]), e.useEffect(()=>{
91
- const k = setTimeout(()=>{
91
+ const B = setTimeout(()=>{
92
92
  s(!0);
93
93
  }, 50), S = t !== 1 / 0 ? setTimeout(()=>f({
94
94
  action: "TIMEOUT"
95
95
  }), t) : void 0;
96
96
  return ()=>{
97
- clearTimeout(k), clearTimeout(S);
97
+ clearTimeout(B), clearTimeout(S);
98
98
  };
99
99
  }, [
100
100
  f,
101
101
  t
102
102
  ]), /* @__PURE__ */ r(Q, {
103
- className: L,
103
+ className: P,
104
104
  children: /* @__PURE__ */ r("div", {
105
- ref: B,
105
+ ref: k,
106
106
  className: N(V, {
107
107
  [z]: a
108
108
  }),
@@ -168,7 +168,7 @@ const ee = [
168
168
  action: "DISMISS"
169
169
  });
170
170
  },
171
- "aria-label": d !== null && d !== void 0 ? d : T.closeButtonLabel,
171
+ "aria-label": I !== null && I !== void 0 ? I : T.closeButtonLabel,
172
172
  className: G[l ? "topRight" : "centered"],
173
173
  style: {
174
174
  display: "flex",
@@ -188,24 +188,22 @@ const ee = [
188
188
  })
189
189
  });
190
190
  }), oe = /*#__PURE__*/ e.forwardRef((param, g)=>{
191
- let { message: m, buttonText: n, buttonAccessibilityLabel: u, closeButtonLabel: d, duration: t, onClose: o = ()=>{}, type: c = "INFORMATIVE", withDismiss: p, dataAttributes: R } = param;
191
+ let { message: m, buttonText: n, buttonAccessibilityLabel: u, closeButtonLabel: I, duration: t, onClose: o = ()=>{}, type: c = "INFORMATIVE", withDismiss: d, dataAttributes: R } = param;
192
192
  const T = n ? te : re;
193
193
  t = Math.max(t !== null && t !== void 0 ? t : T, T);
194
- const a = _(), s = e.useRef(o), I = e.useRef(!1);
194
+ const a = _(), s = e.useRef(o), p = e.useRef(!1);
195
195
  return e.useEffect(()=>{
196
196
  s.current = o;
197
197
  }, [
198
198
  o
199
199
  ]), e.useEffect(()=>{
200
- a && !I.current && (I.current = !0, b({
200
+ a && !p.current && (p.current = !0, b({
201
201
  message: m,
202
- // @ts-expect-error duration can be 'PERSISTENT' in new webview-bridge lib versions, and old apps will ignore it
203
202
  duration: t === 1 / 0 ? "PERSISTENT" : void 0,
204
203
  buttonText: n,
205
204
  buttonAccessibilityLabel: u,
206
- closeButtonLabel: d,
207
205
  type: c,
208
- withDismiss: p
206
+ withDismiss: d
209
207
  }).then((v)=>{
210
208
  const i = v;
211
209
  i != null && i.action && ee.includes(i.action) ? s.current({
@@ -214,27 +212,27 @@ const ee = [
214
212
  action: "DISMISS"
215
213
  });
216
214
  }).finally(()=>{
217
- I.current = !1;
215
+ p.current = !1;
218
216
  }));
219
217
  }, [
220
218
  u,
221
- d,
219
+ I,
222
220
  n,
223
221
  t,
224
222
  m,
225
223
  a,
226
224
  c,
227
- p
225
+ d
228
226
  ]), a ? null : /* @__PURE__ */ r(ne, {
229
227
  ref: g,
230
228
  message: m,
231
229
  duration: t,
232
230
  buttonText: n,
233
231
  buttonAccessibilityLabel: u,
234
- closeButtonLabel: d,
232
+ closeButtonLabel: I,
235
233
  type: c,
236
234
  onClose: s.current,
237
- withDismiss: p,
235
+ withDismiss: d,
238
236
  dataAttributes: R
239
237
  });
240
238
  }), Se = oe;