@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
package/dist/button.d.ts CHANGED
@@ -20,8 +20,8 @@ interface CommonProps {
20
20
  'aria-expanded'?: 'true' | 'false' | boolean;
21
21
  'aria-haspopup'?: 'true' | 'false' | 'menu' | 'dialog' | boolean;
22
22
  tabIndex?: number;
23
- StartIcon?: React.FC<IconProps>;
24
- EndIcon?: React.FC<IconProps>;
23
+ StartIcon?: (props: IconProps) => JSX.Element;
24
+ EndIcon?: (props: IconProps) => JSX.Element;
25
25
  /** IMPORTANT: try to avoid using role="link" with onPress and first consider other alternatives like to/href + onNavigate */
26
26
  role?: string;
27
27
  }
package/dist/callout.d.ts CHANGED
@@ -16,5 +16,5 @@ type Props = {
16
16
  dataAttributes?: DataAttributes;
17
17
  role?: string;
18
18
  };
19
- declare const Callout: React.FC<Props>;
19
+ declare const Callout: ({ title, titleAs, description, icon, onClose, closeButtonLabel, button, secondaryButton, buttonLink, "aria-label": ariaLabel, dataAttributes, role, }: Props) => JSX.Element;
20
20
  export default Callout;
package/dist/card.d.ts CHANGED
@@ -9,7 +9,7 @@ import type { ButtonLink, ButtonPrimary, ButtonSecondary } from './button';
9
9
  import type { ExclusifyUnion } from './utils/utility-types';
10
10
  import type { DataAttributes, HeadingType, IconProps, RendersElement, RendersNullableElement, TrackingEvent } from './utils/types';
11
11
  type BaseIconButtonAction = {
12
- Icon: React.FC<IconProps>;
12
+ Icon: (props: IconProps) => JSX.Element;
13
13
  label: string;
14
14
  };
15
15
  type IconButtonAction = BaseIconButtonAction & ExclusifyUnion<{
@@ -11,7 +11,7 @@ type RenderProps = {
11
11
  labelId: string;
12
12
  disabled: boolean;
13
13
  checked: boolean;
14
- }) => React.ReactElement<any, any>;
14
+ }) => React.ReactElement;
15
15
  children?: undefined;
16
16
  disabled?: boolean;
17
17
  'aria-labelledby'?: string;
package/dist/chip.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { TouchableComponentProps } from './touchable';
3
3
  import type { ExclusifyUnion } from './utils/utility-types';
4
4
  import type { DataAttributes, IconProps } from './utils/types';
5
5
  interface SimpleChipProps {
6
6
  children: string;
7
- Icon?: React.FC<IconProps>;
7
+ Icon?: (props: IconProps) => JSX.Element;
8
8
  id?: string;
9
9
  dataAttributes?: DataAttributes;
10
10
  badge?: boolean | number;
@@ -20,5 +20,5 @@ type ClickableChipProps = TouchableComponentProps<SimpleChipProps & {
20
20
  active?: boolean;
21
21
  }>;
22
22
  type ChipProps = ExclusifyUnion<ClosableChipProps | ToggleChipProps | ClickableChipProps>;
23
- declare const Chip: React.FC<ChipProps>;
23
+ declare const Chip: (props: ChipProps) => JSX.Element;
24
24
  export default Chip;
package/dist/circle.d.ts CHANGED
@@ -15,5 +15,5 @@ type BackgroundShorthandProps = {
15
15
  backgroundImage?: string;
16
16
  };
17
17
  type Props = CommonProps & ExclusifyUnion<BackgroundProps | BackgroundShorthandProps>;
18
- declare const Circle: React.FC<Props>;
18
+ declare const Circle: ({ children, background, backgroundColor, backgroundImage, size, border, dataAttributes, }: Props) => JSX.Element;
19
19
  export default Circle;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import type StackingGroup from '../stacking-group';
3
3
  import type Image from '../image';
4
4
  import type Tag from '../tag';
@@ -15,13 +15,13 @@ interface RowBlockWithStackingGroup extends RowBlockBaseProps {
15
15
  stackingGroup?: RendersNullableElement<typeof StackingGroup>;
16
16
  }
17
17
  type RowBlockProps = ExclusifyUnion<RowBlockWithDescription | RowBlockWithStackingGroup>;
18
- export declare const RowBlock: React.FC<RowBlockProps>;
18
+ export declare const RowBlock: ({ title, stackingGroup, description, "aria-label": ariaLabel, }: RowBlockProps) => JSX.Element;
19
19
  interface SimpleBlockProps {
20
20
  image?: RendersNullableElement<typeof Image>;
21
21
  description?: string;
22
22
  'aria-label'?: string;
23
23
  }
24
- export declare const SimpleBlock: React.FC<SimpleBlockProps>;
24
+ export declare const SimpleBlock: ({ image, description, "aria-label": ariaLabel }: SimpleBlockProps) => JSX.Element;
25
25
  interface InformationBlockProps {
26
26
  title?: string;
27
27
  description?: ReadonlyArray<string> | string;
@@ -30,7 +30,7 @@ interface InformationBlockProps {
30
30
  valueColor?: string;
31
31
  'aria-label'?: string;
32
32
  }
33
- export declare const InformationBlock: React.FC<InformationBlockProps>;
33
+ export declare const InformationBlock: ({ title, description, secondaryValue, value, valueColor, "aria-label": ariaLabel, }: InformationBlockProps) => JSX.Element;
34
34
  interface Heading {
35
35
  value: string;
36
36
  text?: string;
@@ -57,7 +57,7 @@ interface HighlightedValueBlockProps {
57
57
  valueColor?: string;
58
58
  'aria-label'?: string;
59
59
  }
60
- export declare const HighlightedValueBlock: React.FC<HighlightedValueBlockProps>;
60
+ export declare const HighlightedValueBlock: ({ headline, headings, mainHeading, secondHeading, secondaryValue, title, description, valueColor, "aria-label": ariaLabel, }: HighlightedValueBlockProps) => JSX.Element;
61
61
  interface ValueBlockProps {
62
62
  title?: string;
63
63
  value?: string;
@@ -65,7 +65,7 @@ interface ValueBlockProps {
65
65
  valueColor?: string;
66
66
  'aria-label'?: string;
67
67
  }
68
- export declare const ValueBlock: React.FC<ValueBlockProps>;
68
+ export declare const ValueBlock: ({ title, value, description, valueColor, "aria-label": ariaLabel, }: ValueBlockProps) => JSX.Element;
69
69
  interface ProgressBlockProps {
70
70
  title?: string;
71
71
  stackingGroup?: RendersNullableElement<typeof StackingGroup>;
@@ -79,5 +79,5 @@ interface ProgressBlockProps {
79
79
  description?: string;
80
80
  'aria-label'?: string;
81
81
  }
82
- export declare const ProgressBlock: React.FC<ProgressBlockProps>;
82
+ export declare const ProgressBlock: ({ title, stackingGroup, progressPercent, reverse, heading, description, "aria-label": ariaLabel, }: ProgressBlockProps) => JSX.Element;
83
83
  export {};
package/dist/counter.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 Props = {
4
4
  value?: number;
@@ -15,5 +15,5 @@ type Props = {
15
15
  decreaseLabel?: string;
16
16
  valueLabel?: string;
17
17
  };
18
- declare const Counter: React.FC<Props>;
18
+ declare const Counter: ({ value, defaultValue, onChangeValue, onRemove, min, max, dataAttributes, disabled, removeLabel, increaseLabel, decreaseLabel, valueLabel, }: Props) => JSX.Element;
19
19
  export default Counter;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { CommonFormFieldProps } from './text-field-base';
3
3
  type ExpirationDateValue = {
4
4
  month: number | null;
@@ -9,5 +9,5 @@ export interface CreditCardExpirationFieldProps extends CommonFormFieldProps {
9
9
  validate?: (value: ExpirationDateValue | undefined, rawValue: string) => string | undefined;
10
10
  onChangeValue?: (value: ExpirationDateValue) => void;
11
11
  }
12
- declare const CreditCardExpirationField: React.FC<CreditCardExpirationFieldProps>;
12
+ declare const CreditCardExpirationField: ({ disabled, error, helperText, name, optional, validate: validateProp, onChange, onChangeValue, onBlur, value, autoComplete, defaultValue, dataAttributes, ...rest }: CreditCardExpirationFieldProps) => JSX.Element;
13
13
  export default CreditCardExpirationField;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { CardOptions } from './utils/credit-card';
3
3
  type CreditCardFieldsProps = {
4
4
  numberFieldName?: string;
@@ -7,5 +7,5 @@ type CreditCardFieldsProps = {
7
7
  acceptedCards?: CardOptions;
8
8
  children?: void;
9
9
  };
10
- declare const CreditCardFields: React.FC<CreditCardFieldsProps>;
10
+ declare const CreditCardFields: ({ numberFieldName, expirationFieldName, cvvFieldName, acceptedCards, }: CreditCardFieldsProps) => JSX.Element;
11
11
  export default CreditCardFields;
@@ -1,9 +1,9 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { CardOptions } from './utils/credit-card';
3
3
  import type { CommonFormFieldProps } from './text-field-base';
4
4
  interface CreditCardNumberFieldProps extends CommonFormFieldProps {
5
5
  acceptedCards?: CardOptions;
6
6
  onChangeValue?: (value: string, rawValue: string) => void;
7
7
  }
8
- declare const CreditCardNumberField: React.FC<CreditCardNumberFieldProps>;
8
+ declare const CreditCardNumberField: ({ disabled, error, helperText, name, optional, validate: validateProp, onChange, onChangeValue, onBlur, acceptedCards, value, autoComplete, defaultValue, dataAttributes, ...rest }: CreditCardNumberFieldProps) => JSX.Element;
9
9
  export default CreditCardNumberField;
@@ -1,9 +1,9 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { CommonFormFieldProps } from './text-field-base';
3
3
  import type { CardOptions } from './utils/credit-card';
4
4
  export interface CvvFieldProps extends CommonFormFieldProps {
5
5
  acceptedCards?: CardOptions;
6
6
  onChangeValue?: (value: string, rawValue: string) => void;
7
7
  }
8
- declare const CvvField: React.FC<CvvFieldProps>;
8
+ declare const CvvField: ({ disabled, error, helperText, name, optional, validate: validateProp, onChange, onChangeValue, onBlur, acceptedCards, maxLength, value, autoComplete, defaultValue, dataAttributes, ...rest }: CvvFieldProps) => JSX.Element;
9
9
  export default CvvField;
@@ -1,9 +1,9 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { CommonFormFieldProps } from './text-field-base';
3
3
  export interface DateFieldProps extends CommonFormFieldProps {
4
4
  onChangeValue?: (value: string, rawValue: string) => void;
5
5
  min?: Date;
6
6
  max?: Date;
7
7
  }
8
- declare const DateField: React.FC<DateFieldProps>;
8
+ declare const DateField: ({ disabled, error, helperText, name, optional, validate: validateProp, onChange, onChangeValue: onChangeValueProp, onBlur, value, defaultValue, min, max, dataAttributes, ...rest }: DateFieldProps) => JSX.Element;
9
9
  export default DateField;
@@ -1,9 +1,9 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { CommonFormFieldProps } from './text-field-base';
3
3
  export interface DateFieldProps extends CommonFormFieldProps {
4
4
  onChangeValue?: (value: string, rawValue: string) => void;
5
5
  min?: Date;
6
6
  max?: Date;
7
7
  }
8
- declare const FormDateField: React.FC<DateFieldProps>;
8
+ declare const FormDateField: ({ disabled, error, helperText, name, optional, validate: validateProp, onChange, onChangeValue: onChangeValueProp, onBlur, value, defaultValue, min, max, dataAttributes, ...rest }: DateFieldProps) => JSX.Element;
9
9
  export default FormDateField;
@@ -4,7 +4,7 @@
4
4
  *
5
5
  * This component is a fallback for browsers that don't support datetime-local or date inputs
6
6
  */
7
- import * as React from 'react';
7
+ /// <reference types="react" />
8
8
  import 'moment/locale/es';
9
9
  import 'moment/locale/de';
10
10
  import 'moment/locale/pt-br';
@@ -17,5 +17,5 @@ export interface DateTimePickerProps extends CommonFormFieldProps {
17
17
  withTime?: boolean;
18
18
  mode?: 'year-month';
19
19
  }
20
- declare const DateTimePicker: React.FC<DateTimePickerProps>;
20
+ declare const DateTimePicker: ({ withTime, mode, isValidDate, optional, ...rest }: DateTimePickerProps) => JSX.Element;
21
21
  export default DateTimePicker;
@@ -9,12 +9,12 @@ import type { CommonFormFieldProps } from './text-field-base';
9
9
  * type DecimalInputProps = React.HTMLProps<HTMLInputElement> & {inputRef: React.Ref<HTMLInputElement>}
10
10
  */
11
11
  type DecimalInputProps = any;
12
- export declare const DecimalInput: React.FC<DecimalInputProps>;
12
+ export declare const DecimalInput: ({ inputRef, value, defaultValue, onChange, maxDecimals, ...rest }: DecimalInputProps) => JSX.Element;
13
13
  export interface DecimalFieldProps extends CommonFormFieldProps {
14
14
  onChangeValue?: (value: string, rawValue: string) => void;
15
15
  prefix?: React.ReactNode;
16
16
  /** defaults to Infinity */
17
17
  maxDecimals?: number;
18
18
  }
19
- declare const DecimalField: React.FC<DecimalFieldProps>;
19
+ declare const DecimalField: ({ disabled, error, helperText, name, optional, validate: validateProp, onChange, onChangeValue, onBlur, value, defaultValue, maxDecimals, dataAttributes, ...rest }: DecimalFieldProps) => JSX.Element;
20
20
  export default DecimalField;
package/dist/dialog.js CHANGED
@@ -154,35 +154,35 @@ function _object_without_properties_loose(source, excluded) {
154
154
  return target;
155
155
  }
156
156
  const ce = ()=>process.env.NODE_ENV !== "test" && !(0, _platform.isRunningAcceptanceTest)(), ue = (t)=>{
157
- const { texts: i } = (0, _hooks.useTheme)(), { 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 = {
157
+ const { texts: l } = (0, _hooks.useTheme)(), { 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 = {
158
158
  onPress: C || (()=>{}),
159
- children: m,
159
+ children: h,
160
160
  // @deprecated - testid should be removed but many webapp tests depend on this
161
161
  dataAttributes: {
162
162
  testid: "dialog-accept-button"
163
163
  }
164
164
  };
165
165
  return /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
166
- className: (0, _classnames.default)(_dialogcssmistica.variants[d ? "dialog" : "default"], u),
166
+ className: (0, _classnames.default)(_dialogcssmistica.variants[f ? "dialog" : "default"], m),
167
167
  children: [
168
- o && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
168
+ a && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
169
169
  paddingBottom: 24,
170
170
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
171
171
  className: _dialogcssmistica.iconContainer,
172
- children: /*#__PURE__*/ _react.cloneElement(o, {
172
+ children: /*#__PURE__*/ _react.cloneElement(a, {
173
173
  size: "100%"
174
174
  })
175
175
  })
176
176
  }),
177
- r && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
177
+ i && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
178
178
  paddingBottom: 16,
179
- children: d ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text5, {
179
+ children: f ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text5, {
180
180
  as: "h2",
181
- children: r
181
+ children: i
182
182
  }) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text4, {
183
183
  regular: !0,
184
184
  as: "h2",
185
- children: r
185
+ children: i
186
186
  })
187
187
  }),
188
188
  t.subtitle && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
@@ -201,167 +201,169 @@ const ce = ()=>process.env.NODE_ENV !== "test" && !(0, _platform.isRunningAccept
201
201
  /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
202
202
  color: _skincontractcssmistica.vars.colors.textSecondary,
203
203
  regular: !0,
204
- children: f
204
+ children: g
205
205
  }),
206
- c
206
+ r
207
207
  ]
208
208
  })
209
209
  }),
210
210
  p && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
211
211
  className: _dialogcssmistica.dialogActions,
212
212
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_buttonlayout.default, {
213
- link: d ? t.link : void 0,
214
- primaryButton: l ? B ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_button.ButtonDanger, _object_spread({
213
+ link: f ? t.link : void 0,
214
+ primaryButton: c ? B ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_button.ButtonDanger, _object_spread({
215
215
  tabIndex: 1
216
216
  }, y)) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_button.ButtonPrimary, _object_spread({
217
217
  tabIndex: 1
218
218
  }, y)) : void 0,
219
219
  secondaryButton: s ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_button.ButtonSecondary, {
220
220
  tabIndex: 2,
221
- onPress: h || (()=>{}),
221
+ onPress: u || (()=>{}),
222
222
  dataAttributes: {
223
223
  testid: "dialog-cancel-button"
224
224
  },
225
- children: g
225
+ children: d
226
226
  }) : void 0
227
227
  })
228
228
  })
229
229
  ]
230
230
  });
231
231
  }, de = (param)=>{
232
- let { type: t, message: i, title: u, acceptText: r, cancelText: f, onAccept: o, onCancel: c, onDestroy: s } = param;
232
+ let { type: t, message: l, title: m, acceptText: i, cancelText: g, destructive: a, onAccept: r, onCancel: s, onDestroy: c } = param;
233
233
  return t === "confirm" ? (0, _webviewbridge.nativeConfirm)({
234
- message: i,
235
- title: u,
236
- cancelText: f,
237
- acceptText: r
238
- }).then((l)=>{
239
- l ? o == null || o() : c == null || c(), s();
234
+ message: l,
235
+ title: m,
236
+ cancelText: g,
237
+ acceptText: i,
238
+ destructive: a
239
+ }).then((d)=>{
240
+ d ? r == null || r() : s == null || s(), c();
240
241
  }) : (0, _webviewbridge.nativeAlert)({
241
- message: i,
242
- title: u,
243
- buttonText: r
242
+ message: l,
243
+ title: m,
244
+ buttonText: i
244
245
  }).then(()=>{
245
- o == null || o(), s();
246
+ r == null || r(), c();
246
247
  });
247
248
  }, me = (param)=>{
248
- let { type: t, onAccept: i, onCancel: u, onDestroy: r, acceptText: f, cancelText: o, message: c, title: s } = param;
249
- const { texts: l } = (0, _hooks.useTheme)(), g = _react.useRef({
249
+ let { type: t, onAccept: l, onCancel: m, onDestroy: i, acceptText: g, cancelText: a, message: r, title: s, destructive: c } = param;
250
+ const { texts: d } = (0, _hooks.useTheme)(), h = _react.useRef({
250
251
  type: t,
251
- onAccept: i,
252
- onCancel: u,
253
- onDestroy: r,
254
- acceptText: f || l.dialogAcceptButton,
255
- cancelText: o || l.dialogCancelButton,
256
- message: c,
257
- title: s
258
- }), m = _react.useRef(!1);
252
+ onAccept: l,
253
+ onCancel: m,
254
+ onDestroy: i,
255
+ acceptText: g || d.dialogAcceptButton,
256
+ cancelText: a || d.dialogCancelButton,
257
+ message: r,
258
+ title: s,
259
+ destructive: c
260
+ }), u = _react.useRef(!1);
259
261
  return _react.useEffect(()=>{
260
- m.current || (m.current = !0, de(g.current).finally(()=>{
261
- m.current = !1;
262
+ u.current || (u.current = !0, de(h.current).finally(()=>{
263
+ u.current = !1;
262
264
  }));
263
265
  }, []), /* @__PURE__ */ (0, _jsxruntime.jsx)(_jsxruntime.Fragment, {});
264
266
  }, Ie = (t)=>{
265
267
  (0, _modalcontextprovider.useSetModalStateEffect)();
266
- const i = _react.useRef(null), { texts: u } = (0, _hooks.useTheme)(), [r, f] = _react.useState(!1), o = _react.useRef(!1), c = _react.useRef(!1), [s, l] = _react.useState(!1), g = _react.useRef(!1), m = _react.useRef(ce() ? _dialogcssmistica.ANIMATION_DURATION_MS : 0), h = t.type !== "dialog" && (0, _webviewbridge.isWebViewBridgeAvailable)(), C = t.type === "dialog", B = t.type === "alert", { onAccept: d, onCancel: p, onDestroy: y } = t, I = _object_without_properties(t, [
268
+ const l = _react.useRef(null), { texts: m } = (0, _hooks.useTheme)(), [i, g] = _react.useState(!1), a = _react.useRef(!1), r = _react.useRef(!1), [s, c] = _react.useState(!1), d = _react.useRef(!1), h = _react.useRef(ce() ? _dialogcssmistica.ANIMATION_DURATION_MS : 0), u = t.type !== "dialog" && (0, _webviewbridge.isWebViewBridgeAvailable)(), C = t.type === "dialog", B = t.type === "alert", { onAccept: f, onCancel: p, onDestroy: y } = t, I = _object_without_properties(t, [
267
269
  "onAccept",
268
270
  "onCancel",
269
271
  "onDestroy"
270
272
  ]);
271
273
  _react.useEffect(()=>{
272
- const a = setTimeout(()=>{
273
- o.current || l(!0);
274
- }, m.current);
274
+ const o = setTimeout(()=>{
275
+ a.current || c(!0);
276
+ }, h.current);
275
277
  return ()=>{
276
- clearTimeout(a);
278
+ clearTimeout(o);
277
279
  };
278
280
  }, []);
279
281
  const x = _react.useCallback(()=>{
280
- c.current || (c.current = !0, g.current ? d == null || d() : p == null || p(), y());
282
+ r.current || (r.current = !0, d.current ? f == null || f() : p == null || p(), y());
281
283
  }, [
282
- d,
284
+ f,
283
285
  p,
284
286
  y
285
287
  ]), R = _react.useCallback(()=>{
286
- let a;
287
- return !o.current && s && (o.current = !0, l(!1), f(!0), a = setTimeout(x, m.current)), ()=>{
288
- a && clearTimeout(a);
288
+ let o;
289
+ return !a.current && s && (a.current = !0, c(!1), g(!0), o = setTimeout(x, h.current)), ()=>{
290
+ o && clearTimeout(o);
289
291
  };
290
292
  }, [
291
293
  x,
292
294
  s
293
295
  ]), N = _react.useCallback(()=>{
294
- g.current = !0, R();
296
+ d.current = !0, R();
295
297
  }, [
296
298
  R
297
299
  ]), b = _react.useCallback(()=>{
298
- g.current = !1, R();
300
+ d.current = !1, R();
299
301
  }, [
300
302
  R
301
303
  ]), v = _react.useCallback(()=>{
302
- o.current || (B ? N() : b());
304
+ a.current || (B ? N() : b());
303
305
  }, [
304
306
  N,
305
307
  b,
306
308
  B
307
- ]), T = _react.useCallback((a)=>{
308
- a.key === _keys.ESC && (a.stopPropagation(), a.preventDefault(), v());
309
+ ]), T = _react.useCallback((o)=>{
310
+ o.key === _keys.ESC && (o.stopPropagation(), o.preventDefault(), v());
309
311
  }, [
310
312
  v
311
313
  ]);
312
314
  _react.useEffect(()=>{
313
- if (!h) return document.addEventListener("keydown", T), ()=>{
315
+ if (!u) return document.addEventListener("keydown", T), ()=>{
314
316
  document.removeEventListener("keydown", T);
315
317
  };
316
318
  }, [
317
319
  T,
318
- h
320
+ u
319
321
  ]), _react.useEffect(()=>{
320
- if (!h) return window.addEventListener("popstate", v), ()=>{
322
+ if (!u) return window.addEventListener("popstate", v), ()=>{
321
323
  window.removeEventListener("popstate", v);
322
324
  };
323
325
  }, [
324
326
  v,
325
- h
327
+ u
326
328
  ]);
327
- const P = _react.useCallback((a)=>{
328
- a.stopPropagation(), C && b();
329
+ const P = _react.useCallback((o)=>{
330
+ o.stopPropagation(), C && b();
329
331
  }, [
330
332
  C,
331
333
  b
332
334
  ]);
333
335
  var _t_closeButtonLabel;
334
- return h ? /* @__PURE__ */ (0, _jsxruntime.jsx)(me, _object_spread({}, t)) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_portal.Portal, {
336
+ return u ? /* @__PURE__ */ (0, _jsxruntime.jsx)(me, _object_spread({}, t)) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_portal.Portal, {
335
337
  className: _dialogcssmistica.wrapper,
336
338
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_focustrap.default, {
337
339
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
338
340
  onClick: P,
339
341
  className: (0, _classnames.default)(_dialogcssmistica.modalOpacityLayer, {
340
- [_dialogcssmistica.closedOpactityLayer]: r
342
+ [_dialogcssmistica.closedOpactityLayer]: i
341
343
  }),
342
344
  "data-testid": "dialog-overlay",
343
- "aria-hidden": r || !s,
345
+ "aria-hidden": i || !s,
344
346
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
345
347
  role: "dialog",
346
- onClick: (a)=>a.stopPropagation(),
348
+ onClick: (o)=>o.stopPropagation(),
347
349
  "data-component-name": "Dialog",
348
350
  children: /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
349
- ref: i,
350
- onAnimationEnd: (a)=>{
351
- a.target === i.current && (o.current || l(!0));
351
+ ref: l,
352
+ onAnimationEnd: (o)=>{
353
+ o.target === l.current && (a.current || c(!0));
352
354
  },
353
- onTransitionEnd: (a)=>{
354
- a.target === i.current && o.current && x();
355
+ onTransitionEnd: (o)=>{
356
+ o.target === l.current && a.current && x();
355
357
  },
356
358
  className: (0, _classnames.default)(_dialogcssmistica.modalContent, {
357
- [_dialogcssmistica.closedModalContent]: r
359
+ [_dialogcssmistica.closedModalContent]: i
358
360
  }),
359
361
  children: [
360
362
  C && /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
361
363
  className: _dialogcssmistica.modalCloseButtonContainer,
362
364
  children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_iconbutton.InternalIconButton, {
363
365
  onPress: v,
364
- "aria-label": (_t_closeButtonLabel = t.closeButtonLabel) !== null && _t_closeButtonLabel !== void 0 ? _t_closeButtonLabel : u.modalClose || u.closeButtonLabel,
366
+ "aria-label": (_t_closeButtonLabel = t.closeButtonLabel) !== null && _t_closeButtonLabel !== void 0 ? _t_closeButtonLabel : m.modalClose || m.closeButtonLabel,
365
367
  bleedLeft: !0,
366
368
  bleedRight: !0,
367
369
  bleedY: !0,
package/dist/divider.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- import * as React from 'react';
2
- declare const Divider: React.FC<{
3
- children?: void;
4
- }>;
1
+ /// <reference types="react" />
2
+ declare const Divider: () => JSX.Element;
5
3
  export default Divider;
@@ -1,4 +1,4 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import type CreditCardExpirationField from './credit-card-expiration-field';
3
3
  import type CvvField from './cvv-field';
4
4
  import type DateField from './date-field';
@@ -16,5 +16,5 @@ type Props = {
16
16
  children: Field | [Field, Field];
17
17
  layout?: '50/50' | '40/60' | '60/40';
18
18
  };
19
- declare const DoubleField: React.FC<Props>;
19
+ declare const DoubleField: ({ children, fullWidth, layout }: Props) => JSX.Element;
20
20
  export default DoubleField;
@@ -1,8 +1,8 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  import type { CommonFormFieldProps } from './text-field-base';
3
3
  export interface EmailFieldProps extends CommonFormFieldProps {
4
4
  onChangeValue?: (value: string, rawValue: string) => void;
5
5
  getSuggestions?: (value: string) => Array<string>;
6
6
  }
7
- declare const EmailField: React.FC<EmailFieldProps>;
7
+ declare const EmailField: ({ disabled, error, helperText, name, optional, validate: validateProp, onChange, onChangeValue, onBlur, value, autoComplete, defaultValue, dataAttributes, ...rest }: EmailFieldProps) => JSX.Element;
8
8
  export default EmailField;
@@ -22,5 +22,5 @@ interface ImageProps extends CommonProps {
22
22
  icon?: undefined;
23
23
  }
24
24
  type Props = IconProps | ImageProps;
25
- declare const EmptyStateCard: React.FC<Props>;
25
+ declare const EmptyStateCard: ({ title, titleAs, description, button, secondaryButton, buttonLink, icon, imageUrl, "aria-label": ariaLabel, dataAttributes, }: Props) => JSX.Element;
26
26
  export default EmptyStateCard;
@@ -28,5 +28,5 @@ interface IconProps extends BaseProps {
28
28
  largeImageUrl?: undefined;
29
29
  }
30
30
  type Props = IconProps | ImageProps | LargeImageProps;
31
- declare const EmptyState: React.FC<Props>;
31
+ declare const EmptyState: ({ title, titleAs, description, button, buttonLink, largeImageUrl, imageUrl, icon, "aria-label": ariaLabel, dataAttributes, }: Props) => JSX.Element;
32
32
  export default EmptyState;
package/dist/fade-in.d.ts CHANGED
@@ -7,5 +7,5 @@ type Props = {
7
7
  duration?: string;
8
8
  dataAttributes?: DataAttributes;
9
9
  };
10
- declare const FadeIn: React.FC<Props>;
10
+ declare const FadeIn: ({ children, className, duration, delay, dataAttributes, }: Props) => JSX.Element;
11
11
  export default FadeIn;
@@ -24,15 +24,15 @@ interface FeedbackScreenProps extends AssetFeedbackProps {
24
24
  animateText?: boolean;
25
25
  isInverse?: boolean;
26
26
  }
27
- export declare const FeedbackScreen: React.FC<FeedbackScreenProps>;
28
- export declare const SuccessFeedbackScreen: React.FC<AssetFeedbackProps>;
27
+ export declare const FeedbackScreen: ({ title, description, children, extra, primaryButton, secondaryButton, link, hapticFeedback, icon, animateText, isInverse, unstable_inlineInDesktop, imageUrl, imageFit, dataAttributes, }: FeedbackScreenProps) => JSX.Element;
28
+ export declare const SuccessFeedbackScreen: ({ dataAttributes, ...props }: AssetFeedbackProps) => JSX.Element;
29
29
  interface ErrorFeedbackScreenProps extends Omit<FeedbackProps, 'extra'> {
30
30
  errorReference?: string;
31
31
  }
32
- export declare const ErrorFeedbackScreen: React.FC<ErrorFeedbackScreenProps>;
32
+ export declare const ErrorFeedbackScreen: ({ children, errorReference, dataAttributes, ...otherProps }: ErrorFeedbackScreenProps) => JSX.Element;
33
33
  interface InfoFeedbackScreenProps extends FeedbackProps {
34
- Icon?: React.FC<IconProps>;
34
+ Icon?: (props: IconProps) => JSX.Element;
35
35
  }
36
- export declare const InfoFeedbackScreen: React.FC<InfoFeedbackScreenProps>;
37
- export declare const SuccessFeedback: React.FC<AssetFeedbackProps>;
36
+ export declare const InfoFeedbackScreen: ({ dataAttributes, Icon, ...props }: InfoFeedbackScreenProps) => JSX.Element;
37
+ export declare const SuccessFeedback: ({ title, description, children, extra, primaryButton, secondaryButton, link, imageUrl, imageFit, dataAttributes, }: AssetFeedbackProps) => JSX.Element;
38
38
  export {};
@@ -4,6 +4,6 @@ type Props = {
4
4
  children: (topDistance: number) => React.ReactNode;
5
5
  height: number;
6
6
  };
7
- declare const FixedToTop: React.FC<Props>;
7
+ declare const FixedToTop: ({ children, height }: Props) => JSX.Element;
8
8
  export declare const useFixedToTopHeight: () => number;
9
9
  export default FixedToTop;
@@ -5,5 +5,5 @@ type Props = {
5
5
  disabled?: boolean;
6
6
  group?: string;
7
7
  };
8
- declare const FocusTrap: React.FC<Props>;
8
+ declare const FocusTrap: ({ children, disabled, className, group }: Props) => JSX.Element;
9
9
  export default FocusTrap;