@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.
- package/css/mistica.css +1 -1
- package/dist/accordion.d.ts +2 -2
- package/dist/avatar.d.ts +2 -2
- package/dist/badge.d.ts +1 -1
- package/dist/button-fixed-footer-layout.d.ts +1 -1
- package/dist/button-group.d.ts +2 -2
- package/dist/button-layout.d.ts +2 -2
- package/dist/button.d.ts +2 -2
- package/dist/callout.d.ts +1 -1
- package/dist/card.d.ts +1 -1
- package/dist/checkbox.d.ts +1 -1
- package/dist/chip.d.ts +3 -3
- package/dist/circle.d.ts +1 -1
- package/dist/community/blocks.d.ts +7 -7
- package/dist/counter.d.ts +2 -2
- package/dist/credit-card-expiration-field.d.ts +2 -2
- package/dist/credit-card-fields.d.ts +2 -2
- package/dist/credit-card-number-field.d.ts +2 -2
- package/dist/cvv-field.d.ts +2 -2
- package/dist/date-field.d.ts +2 -2
- package/dist/date-time-field.d.ts +2 -2
- package/dist/date-time-picker.d.ts +2 -2
- package/dist/decimal-field.d.ts +2 -2
- package/dist/dialog.js +72 -70
- package/dist/divider.d.ts +2 -4
- package/dist/double-field.d.ts +2 -2
- package/dist/email-field.d.ts +2 -2
- package/dist/empty-state-card.d.ts +1 -1
- package/dist/empty-state.d.ts +1 -1
- package/dist/fade-in.d.ts +1 -1
- package/dist/feedback.d.ts +6 -6
- package/dist/fixed-to-top.d.ts +1 -1
- package/dist/focus-trap.d.ts +1 -1
- package/dist/form.d.ts +1 -1
- package/dist/grid-layout.d.ts +1 -1
- package/dist/header.d.ts +4 -4
- package/dist/iban-field.d.ts +2 -2
- package/dist/icon-button.d.ts +2 -2
- package/dist/icons/icon-amex.d.ts +2 -2
- package/dist/icons/icon-chevron.d.ts +1 -1
- package/dist/icons/icon-cvv-amex.d.ts +2 -2
- package/dist/icons/icon-cvv-visa-mc.d.ts +2 -2
- package/dist/icons/icon-mastercard.d.ts +2 -2
- package/dist/icons/icon-visa.d.ts +2 -2
- package/dist/inline.d.ts +1 -1
- package/dist/integer-field.d.ts +1 -1
- package/dist/list.d.ts +3 -3
- package/dist/loading-bar.d.ts +2 -2
- package/dist/master-detail-layout.d.ts +1 -1
- package/dist/menu.d.ts +4 -4
- package/dist/month-field.d.ts +2 -2
- package/dist/mosaic.d.ts +3 -3
- package/dist/navigation-bar.d.ts +5 -5
- package/dist/navigation-breadcrumbs.d.ts +2 -2
- package/dist/negative-box.d.ts +1 -1
- package/dist/nestable-context.d.ts +5 -5
- package/dist/overlay.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/dist/password-field.d.ts +2 -2
- package/dist/phone-number-field.d.ts +2 -2
- package/dist/placeholder.d.ts +2 -2
- package/dist/popover.d.ts +1 -1
- package/dist/portal.d.ts +1 -1
- package/dist/progress-bar.d.ts +2 -2
- package/dist/radio-button.d.ts +2 -2
- package/dist/responsive-layout.d.ts +5 -5
- package/dist/screen-reader-only.d.ts +1 -1
- package/dist/screen-size-context-provider.d.ts +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/snackbar.js +18 -20
- package/dist/spinner.d.ts +1 -1
- package/dist/stack.d.ts +1 -1
- package/dist/stacking-group.d.ts +1 -1
- package/dist/stepper.d.ts +2 -2
- package/dist/switch-component.d.ts +1 -1
- package/dist/tab-focus.d.ts +1 -1
- package/dist/tabs.d.ts +1 -1
- package/dist/tag.d.ts +3 -3
- package/dist/text-field-base.d.ts +4 -4
- package/dist/text-field-components.d.ts +3 -3
- package/dist/text-link.d.ts +1 -1
- package/dist/text.d.ts +11 -11
- package/dist/theme-context-provider.d.ts +1 -1
- package/dist/theme-variant-context.d.ts +1 -1
- package/dist/timer.d.ts +3 -3
- package/dist/tooltip.d.ts +2 -2
- package/dist/utils/aspect-ratio-support.d.ts +1 -1
- package/dist/utils/document-visibility.d.ts +1 -1
- package/dist-es/dialog.js +72 -70
- package/dist-es/package-version.js +1 -1
- package/dist-es/snackbar.js +21 -23
- package/dist-es/style.css +1 -1
- 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?:
|
|
24
|
-
EndIcon?:
|
|
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:
|
|
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:
|
|
12
|
+
Icon: (props: IconProps) => JSX.Element;
|
|
13
13
|
label: string;
|
|
14
14
|
};
|
|
15
15
|
type IconButtonAction = BaseIconButtonAction & ExclusifyUnion<{
|
package/dist/checkbox.d.ts
CHANGED
package/dist/chip.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
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?:
|
|
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:
|
|
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:
|
|
18
|
+
declare const Circle: ({ children, background, backgroundColor, backgroundImage, size, border, dataAttributes, }: Props) => JSX.Element;
|
|
19
19
|
export default Circle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
10
|
+
declare const CreditCardFields: ({ numberFieldName, expirationFieldName, cvvFieldName, acceptedCards, }: CreditCardFieldsProps) => JSX.Element;
|
|
11
11
|
export default CreditCardFields;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
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:
|
|
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;
|
package/dist/cvv-field.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
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:
|
|
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;
|
package/dist/date-field.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
20
|
+
declare const DateTimePicker: ({ withTime, mode, isValidDate, optional, ...rest }: DateTimePickerProps) => JSX.Element;
|
|
21
21
|
export default DateTimePicker;
|
package/dist/decimal-field.d.ts
CHANGED
|
@@ -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:
|
|
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:
|
|
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:
|
|
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:
|
|
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[
|
|
166
|
+
className: (0, _classnames.default)(_dialogcssmistica.variants[f ? "dialog" : "default"], m),
|
|
167
167
|
children: [
|
|
168
|
-
|
|
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(
|
|
172
|
+
children: /*#__PURE__*/ _react.cloneElement(a, {
|
|
173
173
|
size: "100%"
|
|
174
174
|
})
|
|
175
175
|
})
|
|
176
176
|
}),
|
|
177
|
-
|
|
177
|
+
i && /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
178
178
|
paddingBottom: 16,
|
|
179
|
-
children:
|
|
179
|
+
children: f ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text5, {
|
|
180
180
|
as: "h2",
|
|
181
|
-
children:
|
|
181
|
+
children: i
|
|
182
182
|
}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text4, {
|
|
183
183
|
regular: !0,
|
|
184
184
|
as: "h2",
|
|
185
|
-
children:
|
|
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:
|
|
204
|
+
children: g
|
|
205
205
|
}),
|
|
206
|
-
|
|
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:
|
|
214
|
-
primaryButton:
|
|
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:
|
|
221
|
+
onPress: u || (()=>{}),
|
|
222
222
|
dataAttributes: {
|
|
223
223
|
testid: "dialog-cancel-button"
|
|
224
224
|
},
|
|
225
|
-
children:
|
|
225
|
+
children: d
|
|
226
226
|
}) : void 0
|
|
227
227
|
})
|
|
228
228
|
})
|
|
229
229
|
]
|
|
230
230
|
});
|
|
231
231
|
}, de = (param)=>{
|
|
232
|
-
let { type: t, message:
|
|
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:
|
|
235
|
-
title:
|
|
236
|
-
cancelText:
|
|
237
|
-
acceptText:
|
|
238
|
-
|
|
239
|
-
|
|
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:
|
|
242
|
-
title:
|
|
243
|
-
buttonText:
|
|
242
|
+
message: l,
|
|
243
|
+
title: m,
|
|
244
|
+
buttonText: i
|
|
244
245
|
}).then(()=>{
|
|
245
|
-
|
|
246
|
+
r == null || r(), c();
|
|
246
247
|
});
|
|
247
248
|
}, me = (param)=>{
|
|
248
|
-
let { type: t, onAccept:
|
|
249
|
-
const { texts:
|
|
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:
|
|
252
|
-
onCancel:
|
|
253
|
-
onDestroy:
|
|
254
|
-
acceptText:
|
|
255
|
-
cancelText:
|
|
256
|
-
message:
|
|
257
|
-
title: s
|
|
258
|
-
|
|
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
|
-
|
|
261
|
-
|
|
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
|
|
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
|
|
273
|
-
|
|
274
|
-
},
|
|
274
|
+
const o = setTimeout(()=>{
|
|
275
|
+
a.current || c(!0);
|
|
276
|
+
}, h.current);
|
|
275
277
|
return ()=>{
|
|
276
|
-
clearTimeout(
|
|
278
|
+
clearTimeout(o);
|
|
277
279
|
};
|
|
278
280
|
}, []);
|
|
279
281
|
const x = _react.useCallback(()=>{
|
|
280
|
-
|
|
282
|
+
r.current || (r.current = !0, d.current ? f == null || f() : p == null || p(), y());
|
|
281
283
|
}, [
|
|
282
|
-
|
|
284
|
+
f,
|
|
283
285
|
p,
|
|
284
286
|
y
|
|
285
287
|
]), R = _react.useCallback(()=>{
|
|
286
|
-
let
|
|
287
|
-
return !
|
|
288
|
-
|
|
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
|
-
|
|
296
|
+
d.current = !0, R();
|
|
295
297
|
}, [
|
|
296
298
|
R
|
|
297
299
|
]), b = _react.useCallback(()=>{
|
|
298
|
-
|
|
300
|
+
d.current = !1, R();
|
|
299
301
|
}, [
|
|
300
302
|
R
|
|
301
303
|
]), v = _react.useCallback(()=>{
|
|
302
|
-
|
|
304
|
+
a.current || (B ? N() : b());
|
|
303
305
|
}, [
|
|
304
306
|
N,
|
|
305
307
|
b,
|
|
306
308
|
B
|
|
307
|
-
]), T = _react.useCallback((
|
|
308
|
-
|
|
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 (!
|
|
315
|
+
if (!u) return document.addEventListener("keydown", T), ()=>{
|
|
314
316
|
document.removeEventListener("keydown", T);
|
|
315
317
|
};
|
|
316
318
|
}, [
|
|
317
319
|
T,
|
|
318
|
-
|
|
320
|
+
u
|
|
319
321
|
]), _react.useEffect(()=>{
|
|
320
|
-
if (!
|
|
322
|
+
if (!u) return window.addEventListener("popstate", v), ()=>{
|
|
321
323
|
window.removeEventListener("popstate", v);
|
|
322
324
|
};
|
|
323
325
|
}, [
|
|
324
326
|
v,
|
|
325
|
-
|
|
327
|
+
u
|
|
326
328
|
]);
|
|
327
|
-
const P = _react.useCallback((
|
|
328
|
-
|
|
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
|
|
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]:
|
|
342
|
+
[_dialogcssmistica.closedOpactityLayer]: i
|
|
341
343
|
}),
|
|
342
344
|
"data-testid": "dialog-overlay",
|
|
343
|
-
"aria-hidden":
|
|
345
|
+
"aria-hidden": i || !s,
|
|
344
346
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
345
347
|
role: "dialog",
|
|
346
|
-
onClick: (
|
|
348
|
+
onClick: (o)=>o.stopPropagation(),
|
|
347
349
|
"data-component-name": "Dialog",
|
|
348
350
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
349
|
-
ref:
|
|
350
|
-
onAnimationEnd: (
|
|
351
|
-
|
|
351
|
+
ref: l,
|
|
352
|
+
onAnimationEnd: (o)=>{
|
|
353
|
+
o.target === l.current && (a.current || c(!0));
|
|
352
354
|
},
|
|
353
|
-
onTransitionEnd: (
|
|
354
|
-
|
|
355
|
+
onTransitionEnd: (o)=>{
|
|
356
|
+
o.target === l.current && a.current && x();
|
|
355
357
|
},
|
|
356
358
|
className: (0, _classnames.default)(_dialogcssmistica.modalContent, {
|
|
357
|
-
[_dialogcssmistica.closedModalContent]:
|
|
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 :
|
|
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
package/dist/double-field.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
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:
|
|
19
|
+
declare const DoubleField: ({ children, fullWidth, layout }: Props) => JSX.Element;
|
|
20
20
|
export default DoubleField;
|
package/dist/email-field.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
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:
|
|
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:
|
|
25
|
+
declare const EmptyStateCard: ({ title, titleAs, description, button, secondaryButton, buttonLink, icon, imageUrl, "aria-label": ariaLabel, dataAttributes, }: Props) => JSX.Element;
|
|
26
26
|
export default EmptyStateCard;
|
package/dist/empty-state.d.ts
CHANGED
|
@@ -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:
|
|
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
package/dist/feedback.d.ts
CHANGED
|
@@ -24,15 +24,15 @@ interface FeedbackScreenProps extends AssetFeedbackProps {
|
|
|
24
24
|
animateText?: boolean;
|
|
25
25
|
isInverse?: boolean;
|
|
26
26
|
}
|
|
27
|
-
export declare const FeedbackScreen:
|
|
28
|
-
export declare const SuccessFeedbackScreen:
|
|
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:
|
|
32
|
+
export declare const ErrorFeedbackScreen: ({ children, errorReference, dataAttributes, ...otherProps }: ErrorFeedbackScreenProps) => JSX.Element;
|
|
33
33
|
interface InfoFeedbackScreenProps extends FeedbackProps {
|
|
34
|
-
Icon?:
|
|
34
|
+
Icon?: (props: IconProps) => JSX.Element;
|
|
35
35
|
}
|
|
36
|
-
export declare const InfoFeedbackScreen:
|
|
37
|
-
export declare const SuccessFeedback:
|
|
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 {};
|
package/dist/fixed-to-top.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ type Props = {
|
|
|
4
4
|
children: (topDistance: number) => React.ReactNode;
|
|
5
5
|
height: number;
|
|
6
6
|
};
|
|
7
|
-
declare const FixedToTop:
|
|
7
|
+
declare const FixedToTop: ({ children, height }: Props) => JSX.Element;
|
|
8
8
|
export declare const useFixedToTopHeight: () => number;
|
|
9
9
|
export default FixedToTop;
|
package/dist/focus-trap.d.ts
CHANGED