@telefonica/mistica 14.41.0 → 14.42.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/boxed.css-mistica.js +14 -5
- package/dist/boxed.css.d.ts +1 -0
- package/dist/boxed.d.ts +1 -0
- package/dist/boxed.js +11 -9
- package/dist/button-fixed-footer-layout.d.ts +1 -0
- package/dist/button-fixed-footer-layout.js +19 -14
- package/dist/button-layout.css-mistica.js +16 -13
- package/dist/button-layout.css.d.ts +1 -0
- package/dist/button-layout.js +15 -15
- package/dist/button.js +43 -35
- package/dist/carousel.d.ts +13 -0
- package/dist/carousel.js +325 -223
- package/dist/credit-card-expiration-field.js +30 -26
- package/dist/credit-card-number-field.css-mistica.js +7 -7
- package/dist/credit-card-number-field.js +59 -45
- package/dist/cvv-field.js +46 -41
- package/dist/date-field.css-mistica.js +14 -0
- package/dist/date-field.css.d.ts +1 -0
- package/dist/date-field.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/date-field.js +41 -35
- package/dist/date-time-field.js +40 -34
- package/dist/date-time-picker.js +43 -45
- package/dist/decimal-field.js +26 -22
- package/dist/dialog-context.d.ts +24 -0
- package/dist/dialog-context.js +192 -0
- package/dist/dialog.css-mistica.js +15 -12
- package/dist/dialog.css.d.ts +1 -0
- package/dist/dialog.d.ts +14 -44
- package/dist/dialog.js +163 -246
- package/dist/double-field.css-mistica.js +3 -2
- package/dist/email-field.js +15 -11
- package/dist/feedback.css-mistica.js +23 -14
- package/dist/feedback.css.d.ts +7 -4
- package/dist/feedback.js +157 -143
- package/dist/fixed-footer-layout.css-mistica.js +1 -1
- package/dist/fixed-footer-layout.js +9 -8
- package/dist/iban-field.js +31 -27
- package/dist/icons/icon-amex.d.ts +1 -1
- package/dist/icons/icon-cvv-amex.d.ts +1 -1
- package/dist/icons/icon-cvv-visa-mc.d.ts +1 -1
- package/dist/icons/icon-mastercard.d.ts +1 -1
- package/dist/icons/icon-visa.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +16 -4
- package/dist/inline.css-mistica.js +9 -6
- package/dist/inline.css.d.ts +1 -1
- package/dist/inline.js +9 -9
- package/dist/integer-field.js +17 -13
- package/dist/loading-bar.css-mistica.js +4 -7
- package/dist/loading-bar.css.d.ts +0 -2
- package/dist/loading-bar.js +3 -6
- package/dist/month-field.js +39 -33
- package/dist/package-version.js +1 -1
- package/dist/password-field.js +46 -44
- package/dist/phone-number-field.js +50 -46
- package/dist/pin-field.css-mistica.js +12 -6
- package/dist/pin-field.css.d.ts +2 -0
- package/dist/pin-field.d.ts +3 -1
- package/dist/pin-field.js +129 -95
- package/dist/responsive-layout.css-mistica.js +10 -7
- package/dist/responsive-layout.css.d.ts +2 -1
- package/dist/responsive-layout.d.ts +1 -1
- package/dist/responsive-layout.js +20 -17
- package/dist/search-field.js +36 -35
- package/dist/select.css-mistica.js +16 -15
- package/dist/select.css.d.ts +1 -0
- package/dist/select.js +138 -143
- package/dist/text-field-base.css-mistica.js +45 -21
- package/dist/text-field-base.css.d.ts +30 -7
- package/dist/text-field-base.d.ts +11 -0
- package/dist/text-field-base.js +175 -140
- package/dist/text-field-components.css-mistica.js +13 -21
- package/dist/text-field-components.css.d.ts +0 -3
- package/dist/text-field-components.d.ts +3 -0
- package/dist/text-field-components.js +38 -35
- package/dist/text-field.js +26 -22
- package/dist/text.css-mistica.js +7 -7
- package/dist/text.css.d.ts +0 -1
- package/dist/text.js +24 -24
- package/dist/theme-context-provider.js +2 -2
- package/dist/utils/platform.js +8 -11
- package/dist-es/boxed.css-mistica.js +3 -2
- package/dist-es/boxed.js +17 -15
- package/dist-es/button-fixed-footer-layout.js +29 -24
- package/dist-es/button-layout.css-mistica.js +7 -7
- package/dist-es/button-layout.js +23 -23
- package/dist-es/button.js +65 -57
- package/dist-es/carousel.js +373 -280
- package/dist-es/credit-card-expiration-field.js +34 -30
- package/dist-es/credit-card-number-field.css-mistica.js +4 -4
- package/dist-es/credit-card-number-field.js +84 -70
- package/dist-es/cvv-field.js +68 -63
- package/dist-es/date-field.css-mistica.js +5 -0
- package/dist-es/date-field.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/date-field.js +46 -40
- package/dist-es/date-time-field.js +47 -41
- package/dist-es/date-time-picker.js +55 -57
- package/dist-es/decimal-field.js +31 -27
- package/dist-es/dialog-context.js +125 -0
- package/dist-es/dialog.css-mistica.js +3 -3
- package/dist-es/dialog.js +193 -262
- package/dist-es/double-field.css-mistica.js +3 -2
- package/dist-es/email-field.js +16 -12
- package/dist-es/feedback.css-mistica.js +2 -2
- package/dist-es/feedback.js +196 -182
- package/dist-es/fixed-footer-layout.css-mistica.js +1 -1
- package/dist-es/fixed-footer-layout.js +21 -20
- package/dist-es/iban-field.js +42 -38
- package/dist-es/index.js +1778 -1778
- package/dist-es/inline.css-mistica.js +3 -3
- package/dist-es/inline.js +18 -18
- package/dist-es/integer-field.js +21 -17
- package/dist-es/loading-bar.css-mistica.js +2 -2
- package/dist-es/loading-bar.js +10 -13
- package/dist-es/month-field.js +47 -41
- package/dist-es/package-version.js +1 -1
- package/dist-es/password-field.js +54 -52
- package/dist-es/phone-number-field.js +53 -49
- package/dist-es/pin-field.css-mistica.js +2 -2
- package/dist-es/pin-field.js +145 -111
- package/dist-es/responsive-layout.css-mistica.js +3 -3
- package/dist-es/responsive-layout.js +27 -24
- package/dist-es/search-field.js +45 -44
- package/dist-es/select.css-mistica.js +8 -7
- package/dist-es/select.js +167 -172
- package/dist-es/style.css +1 -1
- package/dist-es/text-field-base.css-mistica.js +2 -2
- package/dist-es/text-field-base.js +189 -157
- package/dist-es/text-field-components.css-mistica.js +3 -2
- package/dist-es/text-field-components.js +52 -49
- package/dist-es/text-field.js +31 -27
- package/dist-es/text.css-mistica.js +3 -3
- package/dist-es/text.js +32 -32
- package/dist-es/theme-context-provider.js +1 -1
- package/dist-es/utils/platform.js +6 -6
- package/package.json +1 -1
- package/dist/password-field.css-mistica.js +0 -13
- package/dist/password-field.css.d.ts +0 -1
- package/dist-es/password-field.css-mistica.js +0 -4
- /package/dist/{password-field.css.ts.vanilla.css-mistica.js → boxed.css.ts.vanilla.css-mistica.js} +0 -0
- /package/dist-es/{password-field.css.ts.vanilla.css-mistica.js → boxed.css.ts.vanilla.css-mistica.js} +0 -0
package/dist-es/boxed.js
CHANGED
|
@@ -53,19 +53,19 @@ function _object_spread_props(target, source) {
|
|
|
53
53
|
}
|
|
54
54
|
import { jsx as a } from "react/jsx-runtime";
|
|
55
55
|
import * as i from "react";
|
|
56
|
-
import
|
|
57
|
-
import { useIsInverseVariant as
|
|
58
|
-
import { getPrefixedDataAttributes as
|
|
56
|
+
import k from "classnames";
|
|
57
|
+
import { useIsInverseVariant as y, ThemeVariant as B } from "./theme-variant-context.js";
|
|
58
|
+
import { getPrefixedDataAttributes as O } from "./utils/dom.js";
|
|
59
59
|
import { vars as o } from "./skins/skin-contract.css-mistica.js";
|
|
60
|
-
import {
|
|
60
|
+
import { desktopOnly as R, boxBorder as h } from "./boxed.css-mistica.js";
|
|
61
61
|
import { sprinkles as s } from "./sprinkles.css-mistica.js";
|
|
62
|
-
const
|
|
62
|
+
const w = (e, r)=>e || r ? s({
|
|
63
63
|
border: "none"
|
|
64
|
-
}) :
|
|
65
|
-
let { children: e, isInverse: r = !1, className: l, role: d, dataAttributes: m, "aria-label": b, "aria-labelledby": f, width: c, height: p, minHeight: u, borderRadius: x = o.borderRadii.container, background: t } = param;
|
|
66
|
-
const n =
|
|
64
|
+
}) : h, C = /*#__PURE__*/ i.forwardRef((param, g)=>{
|
|
65
|
+
let { children: e, isInverse: r = !1, className: l, role: d, dataAttributes: m, "aria-label": b, "aria-labelledby": f, width: c, height: p, minHeight: u, borderRadius: x = o.borderRadii.container, background: t, desktopOnly: v } = param;
|
|
66
|
+
const n = y();
|
|
67
67
|
return /* @__PURE__ */ a("div", _object_spread_props(_object_spread({
|
|
68
|
-
ref:
|
|
68
|
+
ref: g,
|
|
69
69
|
style: {
|
|
70
70
|
width: c,
|
|
71
71
|
height: p,
|
|
@@ -73,21 +73,23 @@ const h = (e, r)=>e || r ? s({
|
|
|
73
73
|
boxSizing: "border-box",
|
|
74
74
|
background: t
|
|
75
75
|
},
|
|
76
|
-
className:
|
|
76
|
+
className: k(l, w(n, r), s({
|
|
77
77
|
borderRadius: x,
|
|
78
78
|
overflow: "hidden",
|
|
79
79
|
background: (t !== null && t !== void 0 ? t : r) ? n ? o.colors.backgroundContainerBrandOverInverse : o.colors.backgroundContainerBrand : o.colors.backgroundContainer
|
|
80
|
-
})
|
|
80
|
+
}), {
|
|
81
|
+
[R]: v
|
|
82
|
+
}),
|
|
81
83
|
role: d,
|
|
82
84
|
"aria-label": b,
|
|
83
85
|
"aria-labelledby": f
|
|
84
|
-
},
|
|
85
|
-
children: /* @__PURE__ */ a(
|
|
86
|
+
}, O(m)), {
|
|
87
|
+
children: /* @__PURE__ */ a(B, {
|
|
86
88
|
isInverse: r,
|
|
87
89
|
children: e
|
|
88
90
|
})
|
|
89
91
|
}));
|
|
90
|
-
}),
|
|
92
|
+
}), N = /*#__PURE__*/ i.forwardRef((e, r)=>/* @__PURE__ */ a(C, _object_spread_props(_object_spread({}, e), {
|
|
91
93
|
ref: r
|
|
92
94
|
})));
|
|
93
|
-
export {
|
|
95
|
+
export { N as Boxed, C as InternalBoxed };
|
|
@@ -1,32 +1,37 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as o, jsxs as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { useScreenSize as
|
|
6
|
-
import { InternalResponsiveLayout as
|
|
7
|
-
import
|
|
8
|
-
const
|
|
9
|
-
let { isFooterVisible: i = !0, button: t, secondaryButton:
|
|
10
|
-
const {
|
|
11
|
-
return /* @__PURE__ */ o(
|
|
12
|
-
onChangeFooterHeight:
|
|
13
|
-
isFooterVisible: (!!t || !!
|
|
14
|
-
footerBgColor:
|
|
15
|
-
containerBgColor:
|
|
16
|
-
footer: /* @__PURE__ */ o(
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
2
|
+
import { jsx as o, jsxs as p } from "react/jsx-runtime";
|
|
3
|
+
import l from "./fixed-footer-layout.js";
|
|
4
|
+
import f from "./button-layout.js";
|
|
5
|
+
import { useScreenSize as h } from "./hooks.js";
|
|
6
|
+
import { InternalResponsiveLayout as x } from "./responsive-layout.js";
|
|
7
|
+
import c from "./box.js";
|
|
8
|
+
const F = (param)=>{
|
|
9
|
+
let { isFooterVisible: i = !0, button: t, secondaryButton: e, link: s, children: n, desktopButtonAlign: r, footerBgColor: a, containerBgColor: d, onChangeFooterHeight: m } = param;
|
|
10
|
+
const { isDesktopOrBigger: u } = h();
|
|
11
|
+
return /* @__PURE__ */ o(l, {
|
|
12
|
+
onChangeFooterHeight: m,
|
|
13
|
+
isFooterVisible: (!!t || !!e) && i,
|
|
14
|
+
footerBgColor: a,
|
|
15
|
+
containerBgColor: d,
|
|
16
|
+
footer: /* @__PURE__ */ o(x, {
|
|
17
|
+
shouldExpandWhenNested: "desktop",
|
|
18
|
+
children: /* @__PURE__ */ o(c, {
|
|
19
|
+
paddingY: {
|
|
20
|
+
mobile: 16,
|
|
21
|
+
tablet: 32,
|
|
22
|
+
desktop: 0
|
|
23
|
+
},
|
|
24
|
+
children: /* @__PURE__ */ p(f, {
|
|
25
|
+
align: u && r ? r : "full-width",
|
|
26
|
+
link: s,
|
|
22
27
|
children: [
|
|
23
28
|
t,
|
|
24
|
-
|
|
29
|
+
e
|
|
25
30
|
]
|
|
26
31
|
})
|
|
27
32
|
})
|
|
28
33
|
}),
|
|
29
|
-
children:
|
|
34
|
+
children: n
|
|
30
35
|
});
|
|
31
|
-
},
|
|
32
|
-
export {
|
|
36
|
+
}, S = F;
|
|
37
|
+
export { S as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "./button.css.ts.vanilla.css-mistica.js";
|
|
3
3
|
import "./button-layout.css.ts.vanilla.css-mistica.js";
|
|
4
|
-
var
|
|
5
|
-
right: "_1y2v1nfgs",
|
|
6
|
-
left: "_1y2v1nfgq",
|
|
7
|
-
center: "_1y2v1nfgr",
|
|
8
|
-
"full-width": "
|
|
9
|
-
},
|
|
10
|
-
export {
|
|
4
|
+
var r = "kfxylhh", y = {
|
|
5
|
+
right: "kfxylhd _1y2v1nfgs",
|
|
6
|
+
left: "kfxylhe _1y2v1nfgq",
|
|
7
|
+
center: "kfxylhf _1y2v1nfgr",
|
|
8
|
+
"full-width": "kfxylhg _1y2v1nfgr"
|
|
9
|
+
}, h = "kfxylh6 _1y2v1nfgi _1y2v1nfgx", i = "kfxylh7", a = "kfxylh8", v = "kfxylh3 kfxylh2 _1y2v1nfgi _1y2v1nfh5", t = "kfxylh4", k = "kfxylh2 _1y2v1nfgi _1y2v1nfh5", x = "kfxylh0";
|
|
10
|
+
export { r as alignMoreThanOneChildren, y as alignVariant, h as baseContainer, i as container, a as fullWidthContainer, v as link, t as linkAlignment, k as linkWithTwoButtons, x as margins };
|
package/dist-es/button-layout.js
CHANGED
|
@@ -51,40 +51,40 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
}
|
|
52
52
|
return target;
|
|
53
53
|
}
|
|
54
|
-
import { jsxs as
|
|
55
|
-
import * as
|
|
56
|
-
import { ButtonSecondary as
|
|
57
|
-
import
|
|
54
|
+
import { jsxs as g, jsx as a } from "react/jsx-runtime";
|
|
55
|
+
import * as i from "react";
|
|
56
|
+
import { ButtonSecondary as y, ButtonDanger as B, ButtonPrimary as x } from "./button.js";
|
|
57
|
+
import s from "classnames";
|
|
58
58
|
import { getPrefixedDataAttributes as C } from "./utils/dom.js";
|
|
59
|
-
import { baseContainer as
|
|
60
|
-
const
|
|
61
|
-
|
|
59
|
+
import { baseContainer as k, alignVariant as w, fullWidthContainer as b, container as v, alignMoreThanOneChildren as A, linkWithTwoButtons as L, link as N, linkAlignment as O, margins as j } from "./button-layout.css-mistica.js";
|
|
60
|
+
const l = [
|
|
61
|
+
y,
|
|
62
62
|
B,
|
|
63
63
|
x
|
|
64
|
-
],
|
|
65
|
-
let { children:
|
|
66
|
-
const
|
|
67
|
-
const h =
|
|
64
|
+
], D = (param)=>{
|
|
65
|
+
let { children: o, align: t = "full-width", link: e, withMargins: u = !1, dataAttributes: c } = param;
|
|
66
|
+
const d = i.Children.count(o), n = i.Children.toArray(o).sort((m, f)=>{
|
|
67
|
+
const h = l.indexOf(m.type), p = l.indexOf(f.type);
|
|
68
68
|
return h - p;
|
|
69
|
-
}), r = /* @__PURE__ */
|
|
70
|
-
className:
|
|
71
|
-
[
|
|
69
|
+
}), r = /* @__PURE__ */ g("div", _object_spread_props(_object_spread({
|
|
70
|
+
className: s(k, w[t], t === "full-width" ? b : v, {
|
|
71
|
+
[A]: d > 1
|
|
72
72
|
})
|
|
73
|
-
}, C(
|
|
73
|
+
}, C(c, "ButtonLayout")), {
|
|
74
74
|
children: [
|
|
75
|
-
|
|
76
|
-
className:
|
|
77
|
-
[O]: t === "left"
|
|
75
|
+
e ? /* @__PURE__ */ a("div", {
|
|
76
|
+
className: s(n.length > 1 ? L : N, {
|
|
77
|
+
[O]: (t === "left" || t === "full-width") && n.length > 1
|
|
78
78
|
}),
|
|
79
79
|
"data-link": "true",
|
|
80
|
-
children:
|
|
80
|
+
children: e
|
|
81
81
|
}) : null,
|
|
82
|
-
|
|
82
|
+
n
|
|
83
83
|
]
|
|
84
84
|
}));
|
|
85
|
-
return
|
|
85
|
+
return u ? /* @__PURE__ */ a("div", {
|
|
86
86
|
className: j,
|
|
87
87
|
children: r
|
|
88
88
|
}) : r;
|
|
89
|
-
},
|
|
90
|
-
export {
|
|
89
|
+
}, S = D;
|
|
90
|
+
export { S as default };
|
package/dist-es/button.js
CHANGED
|
@@ -78,22 +78,22 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
78
78
|
}
|
|
79
79
|
return target;
|
|
80
80
|
}
|
|
81
|
-
import { jsx as n, jsxs as
|
|
81
|
+
import { jsx as n, jsxs as S, Fragment as W } from "react/jsx-runtime";
|
|
82
82
|
import * as a from "react";
|
|
83
|
-
import
|
|
83
|
+
import D from "classnames";
|
|
84
84
|
import K from "./spinner.js";
|
|
85
85
|
import { BaseTouchable as g } from "./touchable.js";
|
|
86
|
-
import { useIsInverseVariant as
|
|
87
|
-
import { useForm as
|
|
88
|
-
import { pxToRem as
|
|
86
|
+
import { useIsInverseVariant as O } from "./theme-variant-context.js";
|
|
87
|
+
import { useForm as V } from "./form-context.js";
|
|
88
|
+
import { pxToRem as C } from "./utils/css.js";
|
|
89
89
|
import { Text as j, Text3 as H, Text2 as Y } from "./text.js";
|
|
90
90
|
import $ from "./box.js";
|
|
91
|
-
import { getTextFromChildren as
|
|
91
|
+
import { getTextFromChildren as w } from "./utils/common.js";
|
|
92
92
|
import { useTrackingConfig as F, eventNames as z, eventCategories as M, eventActions as q } from "./utils/analytics.js";
|
|
93
93
|
import { useTheme as R } from "./hooks.js";
|
|
94
94
|
import { flattenChildren as J } from "./skins/utils.js";
|
|
95
|
-
import { inverseButtonVariants as Q, buttonVariants as U, small as p, isLoading as G, textContent as ee, inverseLinkVariants as te, linkVariants as ne, PADDING_X_LINK as
|
|
96
|
-
const
|
|
95
|
+
import { inverseButtonVariants as Q, buttonVariants as U, small as p, isLoading as G, textContent as ee, inverseLinkVariants as te, linkVariants as ne, PADDING_X_LINK as A, PADDING_Y_LINK as T, textContentLink as re, SMALL_SPINNER_SIZE as ie, SPINNER_SIZE as ae, ICON_MARGIN_PX as E, CHEVRON_MARGIN_LEFT_LINK as oe, loadingFiller as se, X_SMALL_PADDING_PX as le, X_PADDING_PX as ce, loadingContent as de, SMALL_ICON_SIZE as ue, ICON_SIZE as me } from "./button.css-mistica.js";
|
|
96
|
+
const x = (param)=>{
|
|
97
97
|
let { content: e, defaultIconSize: t, renderText: r } = param;
|
|
98
98
|
const s = J(e), u = s.length, c = [];
|
|
99
99
|
let l = [];
|
|
@@ -116,25 +116,25 @@ const _ = (param)=>{
|
|
|
116
116
|
marginRight: o ? 0 : E
|
|
117
117
|
},
|
|
118
118
|
children: /*#__PURE__*/ a.cloneElement(d, {
|
|
119
|
-
size:
|
|
119
|
+
size: C(v)
|
|
120
120
|
})
|
|
121
121
|
}, c.length));
|
|
122
122
|
} else l.push(d), o && f();
|
|
123
123
|
}), c;
|
|
124
124
|
}, fe = ()=>/* @__PURE__ */ n("svg", {
|
|
125
125
|
width: "0.5em",
|
|
126
|
-
height: "
|
|
127
|
-
viewBox: "0 0 8
|
|
126
|
+
height: "0.5em",
|
|
127
|
+
viewBox: "0 0 8 8",
|
|
128
128
|
children: /* @__PURE__ */ n("path", {
|
|
129
|
-
d: "M6.32595
|
|
129
|
+
d: "M6.32595 3.46071L3.03801 0.158595L3.03292 0.153747L3.032 0.152903L3.02931 0.150463L3.02848 0.149738L3.02248 0.144353C2.88533 0.021206 2.71386 -0.0126731 2.56343 0.00394249C2.41648 0.0201739 2.27272 0.0856702 2.16886 0.18711C2.06893 0.281844 2.01209 0.42816 2.00175 0.567065C1.99083 0.71377 2.02925 0.889583 2.16869 1.02392L5.24446 4.00145L2.15859 6.96199L2.15375 6.96708L2.1529 6.968L2.15046 6.97069L2.14974 6.97152L2.14435 6.97752C2.02121 7.11467 1.98733 7.28614 2.00394 7.43657C2.02017 7.58352 2.08567 7.72728 2.18711 7.83114C2.28184 7.93107 2.42816 7.98791 2.56706 7.99825C2.71377 8.00917 2.88958 7.97075 3.02392 7.83132L6.32595 4.5422V4.5422C6.6246 4.24355 6.6246 3.75935 6.32595 3.46071V3.46071Z",
|
|
130
130
|
fill: "currentColor"
|
|
131
131
|
})
|
|
132
132
|
}), X = (param)=>{
|
|
133
133
|
let { showSpinner: e, children: t, small: r, loadingText: s, shouldRenderSpinner: u, setShouldRenderSpinner: c, renderText: l, textContentStyle: f, StartIcon: d, EndIcon: m, withChevron: h } = param;
|
|
134
|
-
const o = r ? ue : me, i =
|
|
135
|
-
return /* @__PURE__ */
|
|
134
|
+
const o = r ? ue : me, i = C(r ? ie : ae);
|
|
135
|
+
return /* @__PURE__ */ S(W, {
|
|
136
136
|
children: [
|
|
137
|
-
/* @__PURE__ */
|
|
137
|
+
/* @__PURE__ */ S("div", {
|
|
138
138
|
"aria-hidden": e ? !0 : void 0,
|
|
139
139
|
className: f,
|
|
140
140
|
children: [
|
|
@@ -145,14 +145,30 @@ const _ = (param)=>{
|
|
|
145
145
|
marginRight: E
|
|
146
146
|
},
|
|
147
147
|
children: /* @__PURE__ */ n(d, {
|
|
148
|
-
size: o,
|
|
148
|
+
size: C(o),
|
|
149
149
|
color: "currentColor"
|
|
150
150
|
})
|
|
151
151
|
}),
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
152
|
+
/* @__PURE__ */ S("div", {
|
|
153
|
+
style: {
|
|
154
|
+
display: "flex",
|
|
155
|
+
alignItems: "baseline"
|
|
156
|
+
},
|
|
157
|
+
children: [
|
|
158
|
+
x({
|
|
159
|
+
content: t,
|
|
160
|
+
defaultIconSize: o,
|
|
161
|
+
renderText: l
|
|
162
|
+
}),
|
|
163
|
+
h && /* @__PURE__ */ n("div", {
|
|
164
|
+
style: {
|
|
165
|
+
display: "flex",
|
|
166
|
+
alignItems: "center",
|
|
167
|
+
marginLeft: oe
|
|
168
|
+
},
|
|
169
|
+
children: /* @__PURE__ */ n(fe, {})
|
|
170
|
+
})
|
|
171
|
+
]
|
|
156
172
|
}),
|
|
157
173
|
m && !h && /* @__PURE__ */ n("div", {
|
|
158
174
|
style: {
|
|
@@ -161,17 +177,9 @@ const _ = (param)=>{
|
|
|
161
177
|
marginLeft: E
|
|
162
178
|
},
|
|
163
179
|
children: /* @__PURE__ */ n(m, {
|
|
164
|
-
size: o,
|
|
180
|
+
size: C(o),
|
|
165
181
|
color: "currentColor"
|
|
166
182
|
})
|
|
167
|
-
}),
|
|
168
|
-
h && /* @__PURE__ */ n("div", {
|
|
169
|
-
style: {
|
|
170
|
-
display: "flex",
|
|
171
|
-
alignItems: "center",
|
|
172
|
-
marginLeft: oe
|
|
173
|
-
},
|
|
174
|
-
children: /* @__PURE__ */ n(fe, {})
|
|
175
183
|
})
|
|
176
184
|
]
|
|
177
185
|
}),
|
|
@@ -182,13 +190,13 @@ const _ = (param)=>{
|
|
|
182
190
|
paddingLeft: i,
|
|
183
191
|
paddingRight: E + 2 * (r ? le : ce)
|
|
184
192
|
} : void 0,
|
|
185
|
-
children:
|
|
193
|
+
children: x({
|
|
186
194
|
content: s,
|
|
187
195
|
defaultIconSize: o,
|
|
188
196
|
renderText: l
|
|
189
197
|
})
|
|
190
198
|
}),
|
|
191
|
-
/* @__PURE__ */
|
|
199
|
+
/* @__PURE__ */ S("div", {
|
|
192
200
|
"aria-hidden": e ? void 0 : !0,
|
|
193
201
|
className: de,
|
|
194
202
|
onTransitionEnd: ()=>{
|
|
@@ -209,7 +217,7 @@ const _ = (param)=>{
|
|
|
209
217
|
}),
|
|
210
218
|
s ? /* @__PURE__ */ n($, {
|
|
211
219
|
paddingLeft: 8,
|
|
212
|
-
children:
|
|
220
|
+
children: x({
|
|
213
221
|
content: s,
|
|
214
222
|
defaultIconSize: o,
|
|
215
223
|
renderText: l
|
|
@@ -220,7 +228,7 @@ const _ = (param)=>{
|
|
|
220
228
|
]
|
|
221
229
|
});
|
|
222
230
|
}, k = /*#__PURE__*/ a.forwardRef((e, t)=>{
|
|
223
|
-
const { textPresets: r } = R(), { eventFormat: s } = F(), { formStatus: u, formId: c } =
|
|
231
|
+
const { textPresets: r } = R(), { eventFormat: s } = F(), { formStatus: u, formId: c } = V(), l = O(), { loadingText: f } = e, d = !!e.submit, m = u === "sending", [h, o] = a.useState(!1), i = e.showSpinner || m && d || h, [v, I] = a.useState(!!i);
|
|
224
232
|
a.useEffect(()=>{
|
|
225
233
|
i && !v && I(!0);
|
|
226
234
|
}, [
|
|
@@ -232,12 +240,12 @@ const _ = (param)=>{
|
|
|
232
240
|
const P = ()=>s === "google-analytics-4" ? {
|
|
233
241
|
name: z.userInteraction,
|
|
234
242
|
component_type: `${e.type}_button`,
|
|
235
|
-
component_copy:
|
|
243
|
+
component_copy: w(e.children)
|
|
236
244
|
} : {
|
|
237
245
|
category: M.userInteraction,
|
|
238
246
|
action: `${e.type}_button_tapped`,
|
|
239
|
-
label:
|
|
240
|
-
},
|
|
247
|
+
label: w(e.children)
|
|
248
|
+
}, N = (y)=>e.small ? /* @__PURE__ */ n(j, {
|
|
241
249
|
size: 14,
|
|
242
250
|
lineHeight: 20,
|
|
243
251
|
weight: r.button.weight,
|
|
@@ -253,7 +261,7 @@ const _ = (param)=>{
|
|
|
253
261
|
children: y
|
|
254
262
|
}), b = {
|
|
255
263
|
ref: t,
|
|
256
|
-
className:
|
|
264
|
+
className: D(l ? Q[e.type] : U[e.type], e.className, {
|
|
257
265
|
[p]: e.small,
|
|
258
266
|
[G]: i
|
|
259
267
|
}),
|
|
@@ -274,7 +282,7 @@ const _ = (param)=>{
|
|
|
274
282
|
children: e.children,
|
|
275
283
|
loadingText: f,
|
|
276
284
|
small: e.small,
|
|
277
|
-
renderText:
|
|
285
|
+
renderText: N,
|
|
278
286
|
textContentStyle: ee,
|
|
279
287
|
StartIcon: e.StartIcon,
|
|
280
288
|
EndIcon: e.EndIcon
|
|
@@ -316,7 +324,7 @@ const _ = (param)=>{
|
|
|
316
324
|
"type"
|
|
317
325
|
]);
|
|
318
326
|
var _t_withChevron;
|
|
319
|
-
const { formStatus: s } =
|
|
327
|
+
const { formStatus: s } = V(), u = O(), { textPresets: c } = R(), { eventFormat: l } = F(), { isDarkMode: f } = R(), { loadingText: d } = t, m = s === "sending", [h, o] = a.useState(!1), i = t.showSpinner || h, v = (_t_withChevron = t.withChevron) !== null && _t_withChevron !== void 0 ? _t_withChevron : !!t.href || !!t.to, [I, P] = a.useState(!!i);
|
|
320
328
|
a.useEffect(()=>{
|
|
321
329
|
i && !I && P(!0);
|
|
322
330
|
}, [
|
|
@@ -325,35 +333,35 @@ const _ = (param)=>{
|
|
|
325
333
|
s
|
|
326
334
|
]);
|
|
327
335
|
var _t_trackingEvent;
|
|
328
|
-
const
|
|
336
|
+
const N = ()=>l === "google-analytics-4" ? {
|
|
329
337
|
name: z.userInteraction,
|
|
330
338
|
component_type: e === "danger" ? "danger_link" : "link",
|
|
331
|
-
component_copy:
|
|
339
|
+
component_copy: w(t.children)
|
|
332
340
|
} : {
|
|
333
341
|
category: M.userInteraction,
|
|
334
342
|
action: q.linkTapped,
|
|
335
|
-
label:
|
|
336
|
-
}, b = (
|
|
343
|
+
label: w(t.children)
|
|
344
|
+
}, b = (_)=>/* @__PURE__ */ n(Y, {
|
|
337
345
|
weight: c.button.weight,
|
|
338
346
|
truncate: 1,
|
|
339
347
|
color: "inherit",
|
|
340
|
-
children:
|
|
348
|
+
children: _
|
|
341
349
|
}), y = e === "danger" && f && u ? "dangerDark" : e, L = {
|
|
342
|
-
className:
|
|
350
|
+
className: D(u ? te[y] : ne[y], {
|
|
343
351
|
[G]: i
|
|
344
352
|
}),
|
|
345
353
|
/**
|
|
346
354
|
* Setting bleed classes with style to override the margin:0 set by the Touchable component.
|
|
347
355
|
* If we set it using className, it may not work depending on the order in which the styles are applied.
|
|
348
356
|
*/ style: _object_spread({}, t.bleedLeft || t.aligned ? {
|
|
349
|
-
marginLeft: -
|
|
357
|
+
marginLeft: -A
|
|
350
358
|
} : void 0, t.bleedRight ? {
|
|
351
|
-
marginRight: -
|
|
359
|
+
marginRight: -A
|
|
352
360
|
} : void 0, t.bleedY ? {
|
|
353
|
-
marginTop: -
|
|
354
|
-
marginBottom: -
|
|
361
|
+
marginTop: -T,
|
|
362
|
+
marginBottom: -T
|
|
355
363
|
} : void 0),
|
|
356
|
-
trackingEvent: (_t_trackingEvent = t.trackingEvent) !== null && _t_trackingEvent !== void 0 ? _t_trackingEvent : t.trackEvent ?
|
|
364
|
+
trackingEvent: (_t_trackingEvent = t.trackingEvent) !== null && _t_trackingEvent !== void 0 ? _t_trackingEvent : t.trackEvent ? N() : void 0,
|
|
357
365
|
dataAttributes: t.dataAttributes,
|
|
358
366
|
"aria-label": t["aria-label"],
|
|
359
367
|
"aria-controls": t["aria-controls"],
|
|
@@ -378,9 +386,9 @@ const _ = (param)=>{
|
|
|
378
386
|
if (t.onPress) return /* @__PURE__ */ n(g, _object_spread_props(_object_spread({
|
|
379
387
|
ref: r
|
|
380
388
|
}, L), {
|
|
381
|
-
onPress: (
|
|
382
|
-
const
|
|
383
|
-
|
|
389
|
+
onPress: (_)=>{
|
|
390
|
+
const B = t.onPress(_);
|
|
391
|
+
B && (o(!0), B.finally(()=>o(!1)));
|
|
384
392
|
}
|
|
385
393
|
}));
|
|
386
394
|
if (t.to || t.to === "") return /* @__PURE__ */ n(g, _object_spread_props(_object_spread({
|
|
@@ -397,7 +405,7 @@ const _ = (param)=>{
|
|
|
397
405
|
}));
|
|
398
406
|
if (process.env.NODE_ENV !== "production") throw Error("Bad button props");
|
|
399
407
|
return null;
|
|
400
|
-
}),
|
|
408
|
+
}), xe = /*#__PURE__*/ a.forwardRef((_param, r)=>{
|
|
401
409
|
var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
|
|
402
410
|
"dataAttributes"
|
|
403
411
|
]);
|
|
@@ -409,7 +417,7 @@ const _ = (param)=>{
|
|
|
409
417
|
ref: r,
|
|
410
418
|
type: "default"
|
|
411
419
|
}));
|
|
412
|
-
}),
|
|
420
|
+
}), Re = /*#__PURE__*/ a.forwardRef((_param, r)=>{
|
|
413
421
|
var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
|
|
414
422
|
"dataAttributes"
|
|
415
423
|
]);
|
|
@@ -422,7 +430,7 @@ const _ = (param)=>{
|
|
|
422
430
|
ref: r,
|
|
423
431
|
type: "danger"
|
|
424
432
|
}));
|
|
425
|
-
}),
|
|
433
|
+
}), ke = /*#__PURE__*/ a.forwardRef((_param, r)=>{
|
|
426
434
|
var { dataAttributes: e } = _param, t = _object_without_properties(_param, [
|
|
427
435
|
"dataAttributes"
|
|
428
436
|
]);
|
|
@@ -459,4 +467,4 @@ const _ = (param)=>{
|
|
|
459
467
|
type: "danger"
|
|
460
468
|
}));
|
|
461
469
|
});
|
|
462
|
-
export { Ae as ButtonDanger,
|
|
470
|
+
export { Ae as ButtonDanger, xe as ButtonLink, Re as ButtonLinkDanger, ke as ButtonPrimary, Be as ButtonSecondary };
|