@telefonica/mistica 15.2.0 → 15.3.0
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/box.js +3 -3
- package/dist/boxed.js +2 -2
- package/dist/button-group.js +2 -2
- package/dist/button.js +5 -5
- package/dist/carousel.js +29 -29
- package/dist/chip.js +2 -2
- package/dist/community/advanced-data-card.d.ts +6 -2
- package/dist/community/advanced-data-card.js +4 -4
- package/dist/counter.js +7 -7
- package/dist/feedback.js +2 -2
- package/dist/fixed-footer-layout.css-mistica.js +5 -5
- package/dist/fixed-footer-layout.js +19 -17
- package/dist/form.js +6 -6
- package/dist/hero.css-mistica.js +12 -6
- package/dist/hero.css.d.ts +2 -0
- package/dist/hero.d.ts +2 -1
- package/dist/hero.js +80 -69
- package/dist/horizontal-scroll.js +2 -2
- package/dist/image.js +9 -7
- package/dist/list.js +19 -15
- package/dist/loading-bar.js +2 -2
- package/dist/loading-screen.js +3 -3
- package/dist/package-version.js +1 -1
- package/dist/pin-field.js +2 -2
- package/dist/progress-bar.js +4 -4
- package/dist/radio-button.js +3 -3
- package/dist/responsive-layout.css-mistica.js +18 -9
- package/dist/responsive-layout.d.ts +1 -0
- package/dist/responsive-layout.js +15 -15
- package/dist/select.js +16 -16
- package/dist/sheet.js +82 -81
- package/dist/slider.js +8 -8
- package/dist/tag.js +2 -2
- package/dist/text-field-base.js +3 -3
- package/dist/text-field-components.js +2 -2
- package/dist/text.js +105 -84
- package/dist/utils/aspect-ratio-support.js +8 -8
- package/dist/utils/browser.js +1 -1
- package/dist/video.js +2 -2
- package/dist-es/box.js +7 -7
- package/dist-es/boxed.js +2 -2
- package/dist-es/button-group.js +4 -4
- package/dist-es/button-layout.js +5 -5
- package/dist-es/button.js +11 -11
- package/dist-es/callout.js +8 -8
- package/dist-es/carousel.js +29 -29
- package/dist-es/checkbox.js +7 -7
- package/dist-es/chip.js +4 -4
- package/dist-es/community/advanced-data-card.js +14 -14
- package/dist-es/counter.js +21 -21
- package/dist-es/empty-state.js +12 -12
- package/dist-es/feedback.js +5 -5
- package/dist-es/fixed-footer-layout.css-mistica.js +2 -2
- package/dist-es/fixed-footer-layout.js +33 -31
- package/dist-es/form.js +9 -9
- package/dist-es/grid.js +3 -3
- package/dist-es/hero.css-mistica.js +2 -2
- package/dist-es/hero.js +119 -108
- package/dist-es/horizontal-scroll.js +2 -2
- package/dist-es/image.js +15 -13
- package/dist-es/list.js +15 -11
- package/dist-es/loading-bar.js +6 -6
- package/dist-es/loading-screen.js +8 -8
- package/dist-es/package-version.js +1 -1
- package/dist-es/pin-field.js +10 -10
- package/dist-es/progress-bar.js +9 -9
- package/dist-es/radio-button.js +9 -9
- package/dist-es/responsive-layout.css-mistica.js +3 -3
- package/dist-es/responsive-layout.js +21 -21
- package/dist-es/select.js +22 -22
- package/dist-es/sheet.js +124 -123
- package/dist-es/slider.js +8 -8
- package/dist-es/style.css +1 -1
- package/dist-es/tag.js +4 -4
- package/dist-es/text-field-base.js +11 -11
- package/dist-es/text-field-components.js +9 -9
- package/dist-es/text-link.js +5 -5
- package/dist-es/text.js +103 -82
- package/dist-es/utils/aspect-ratio-support.js +14 -14
- package/dist-es/utils/browser.js +1 -1
- package/dist-es/video.js +5 -5
- package/package.json +1 -1
package/dist-es/select.js
CHANGED
|
@@ -64,7 +64,7 @@ import $e from "./overlay.js";
|
|
|
64
64
|
import { isAndroid as Be, isIos as qe } from "./utils/platform.js";
|
|
65
65
|
import { cancelEvent as m } from "./utils/dom.js";
|
|
66
66
|
import { Text3 as ze } from "./text.js";
|
|
67
|
-
import { selectVariants as je, arrowDown as Ke, iconContainer as oe, selectContainerVariants as Ue, selectTextVariants as Xe, vars as
|
|
67
|
+
import { selectVariants as je, arrowDown as Ke, iconContainer as oe, selectContainerVariants as Ue, selectTextVariants as Xe, vars as y, optionsContainer as Je, optionsAnimationsVariants as ie, menuItem as Qe, menuItemSelected as Ye } from "./select.css-mistica.js";
|
|
68
68
|
import { inputWithLabel as ce, inputWithoutLabel as ae } from "./text-field-base.css-mistica.js";
|
|
69
69
|
import { Portal as et } from "./portal.js";
|
|
70
70
|
import { pxToRem as tt, applyCssVars as nt } from "./utils/css.js";
|
|
@@ -72,7 +72,7 @@ import { ThemeVariant as rt } from "./theme-variant-context.js";
|
|
|
72
72
|
const st = (param)=>{
|
|
73
73
|
let { id: le, label: w, helperText: ue, value: fe, defaultValue: de, onChangeValue: V, name: i, fullWidth: P, options: f, optional: D, disabled: pe, error: me, onBlur: M, autoFocus: z = !1, native: he } = param;
|
|
74
74
|
var te;
|
|
75
|
-
const h = n.useRef(null), d = n.useRef(null), S = n.useRef(null), v = n.useRef(null),
|
|
75
|
+
const h = n.useRef(null), d = n.useRef(null), S = n.useRef(null), v = n.useRef(null), N = n.useRef(/* @__PURE__ */ new Map()), [Se, ve] = n.useState(!0), [l, ge] = n.useState(de), [H, j] = n.useState(!1), [K, U] = n.useState(!1), [X, x] = n.useState(!1), [u, F] = n.useState({}), [g, W] = n.useState(), G = n.useRef(null), L = Ve(le), { rawValues: Te, setRawValue: Z, setValue: $, formStatus: Ie, formErrors: J, setFormError: Ee, register: B } = Ce(), { platformOverrides: Q } = Pe(), we = he || process.env.NODE_ENV === "test" && !process.env.SSR_TEST || Be(Q) || qe(Q), T = pe || Ie === "sending", R = me || !!J[i], Y = J[i] || ue, a = fe !== null && fe !== void 0 ? fe : Te[i], A = (e)=>{
|
|
76
76
|
V == null || V(e), Ee({
|
|
77
77
|
name: i,
|
|
78
78
|
error: ""
|
|
@@ -86,9 +86,9 @@ const st = (param)=>{
|
|
|
86
86
|
}, I = (e)=>{
|
|
87
87
|
if (e) {
|
|
88
88
|
if (S != null && S.current) {
|
|
89
|
-
const o = S.current.getBoundingClientRect(), p = o.top, E = o.width, O = o.left, Re = o.height,
|
|
90
|
-
if (
|
|
91
|
-
const Ae = window.innerHeight -
|
|
89
|
+
const o = S.current.getBoundingClientRect(), p = o.top, E = o.width, O = o.left, Re = o.height, b = p + Re, _ = Math.min(f.length, 8) * 48 + 16;
|
|
90
|
+
if (b + _ + 12 > window.innerHeight) {
|
|
91
|
+
const Ae = window.innerHeight - b;
|
|
92
92
|
if (p > Ae) {
|
|
93
93
|
const _e = p - _;
|
|
94
94
|
F({
|
|
@@ -100,14 +100,14 @@ const st = (param)=>{
|
|
|
100
100
|
});
|
|
101
101
|
} else F({
|
|
102
102
|
minWidth: E,
|
|
103
|
-
top:
|
|
103
|
+
top: b,
|
|
104
104
|
left: O,
|
|
105
|
-
maxHeight: window.innerHeight -
|
|
105
|
+
maxHeight: window.innerHeight - b - 12,
|
|
106
106
|
transformOrigin: "center top"
|
|
107
107
|
});
|
|
108
108
|
} else F({
|
|
109
109
|
minWidth: E,
|
|
110
|
-
top:
|
|
110
|
+
top: b,
|
|
111
111
|
left: O,
|
|
112
112
|
maxHeight: _,
|
|
113
113
|
transformOrigin: "center top"
|
|
@@ -123,15 +123,15 @@ const st = (param)=>{
|
|
|
123
123
|
}, xe = (e)=>{
|
|
124
124
|
var s;
|
|
125
125
|
const t = (s = v.current) == null ? void 0 : s.getBoundingClientRect();
|
|
126
|
-
if (t && e &&
|
|
127
|
-
const c =
|
|
126
|
+
if (t && e && N.current.has(e)) {
|
|
127
|
+
const c = N.current.get(e), o = c == null ? void 0 : c.getBoundingClientRect();
|
|
128
128
|
if (o && o.top + o.height / 2 >= t.top + t.height) {
|
|
129
129
|
c == null || c.scrollIntoView();
|
|
130
130
|
return;
|
|
131
131
|
}
|
|
132
132
|
o && o.top + o.height / 2 <= t.top && (c == null || c.scrollIntoView(!1));
|
|
133
133
|
}
|
|
134
|
-
}, Oe = d.current,
|
|
134
|
+
}, Oe = d.current, be = h.current;
|
|
135
135
|
n.useEffect(()=>{
|
|
136
136
|
Z({
|
|
137
137
|
name: i,
|
|
@@ -159,7 +159,7 @@ const st = (param)=>{
|
|
|
159
159
|
d,
|
|
160
160
|
h,
|
|
161
161
|
Oe,
|
|
162
|
-
|
|
162
|
+
be
|
|
163
163
|
]), n.useEffect(()=>{
|
|
164
164
|
const e = (s)=>{
|
|
165
165
|
var p;
|
|
@@ -204,13 +204,13 @@ const st = (param)=>{
|
|
|
204
204
|
]), n.useEffect(()=>{
|
|
205
205
|
ve(!1);
|
|
206
206
|
}, []);
|
|
207
|
-
const
|
|
207
|
+
const ye = (e)=>{
|
|
208
208
|
var t;
|
|
209
209
|
return e ? (t = f.find((param)=>{
|
|
210
210
|
let { value: s } = param;
|
|
211
211
|
return s === e;
|
|
212
212
|
})) == null ? void 0 : t.text : "";
|
|
213
|
-
},
|
|
213
|
+
}, Ne = {
|
|
214
214
|
tabIndex: 0,
|
|
215
215
|
onFocus: ()=>x(!0),
|
|
216
216
|
onBlur: ()=>x(!1),
|
|
@@ -306,7 +306,7 @@ const st = (param)=>{
|
|
|
306
306
|
role: "button",
|
|
307
307
|
"aria-haspopup": "listbox",
|
|
308
308
|
ref: d
|
|
309
|
-
}, !T &&
|
|
309
|
+
}, !T && Ne), {
|
|
310
310
|
children: [
|
|
311
311
|
/* @__PURE__ */ r(Ze, {
|
|
312
312
|
style: {
|
|
@@ -334,7 +334,7 @@ const st = (param)=>{
|
|
|
334
334
|
}),
|
|
335
335
|
/* @__PURE__ */ r("div", {
|
|
336
336
|
className: C(Xe[T ? "disabled" : "default"], w ? ce : ae),
|
|
337
|
-
children:
|
|
337
|
+
children: ye(a !== null && a !== void 0 ? a : l)
|
|
338
338
|
})
|
|
339
339
|
]
|
|
340
340
|
})),
|
|
@@ -346,11 +346,11 @@ const st = (param)=>{
|
|
|
346
346
|
children: /* @__PURE__ */ r(et, {
|
|
347
347
|
children: /* @__PURE__ */ r("ul", {
|
|
348
348
|
style: nt({
|
|
349
|
-
[
|
|
350
|
-
[
|
|
351
|
-
[
|
|
352
|
-
[
|
|
353
|
-
[
|
|
349
|
+
[y.top]: u.top ? `${u.top}px` : "",
|
|
350
|
+
[y.left]: u.left ? `${u.left}px` : "",
|
|
351
|
+
[y.maxHeight]: u.maxHeight ? `${u.maxHeight}px` : "",
|
|
352
|
+
[y.minWidth]: u.minWidth ? `${u.minWidth}px` : "",
|
|
353
|
+
[y.transformOrigin]: (_u_transformOrigin = u.transformOrigin) !== null && _u_transformOrigin !== void 0 ? _u_transformOrigin : ""
|
|
354
354
|
}),
|
|
355
355
|
onPointerDown: m,
|
|
356
356
|
className: C(Je, K ? ie.show : ie.hide),
|
|
@@ -368,7 +368,7 @@ const st = (param)=>{
|
|
|
368
368
|
onPointerDown: m,
|
|
369
369
|
onClick: ()=>q(e),
|
|
370
370
|
ref: (s)=>{
|
|
371
|
-
s ?
|
|
371
|
+
s ? N.current.set(e, s) : N.current.delete(e);
|
|
372
372
|
},
|
|
373
373
|
children: /* @__PURE__ */ r(ze, {
|
|
374
374
|
regular: !0,
|
package/dist-es/sheet.js
CHANGED
|
@@ -78,34 +78,34 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
78
78
|
}
|
|
79
79
|
return target;
|
|
80
80
|
}
|
|
81
|
-
import { jsx as e, jsxs as v, Fragment as
|
|
82
|
-
import
|
|
81
|
+
import { jsx as e, jsxs as v, Fragment as O } from "react/jsx-runtime";
|
|
82
|
+
import B from "classnames";
|
|
83
83
|
import * as i from "react";
|
|
84
|
-
import { transitionDuration as
|
|
84
|
+
import { transitionDuration as z, overlay as G, closingOverlay as H, SheetContainer as j, closingSheet as F, Sheet as K, SheetContent as V, handleContainer as X, handle as $, children as q, modalCloseButton as J, stickyTitle as Q, bodyContent as U, stickyButtons as W, sheetActionRow as Z, infoItemIcon as ee } from "./sheet.css-mistica.js";
|
|
85
85
|
import re from "./focus-trap.js";
|
|
86
|
-
import { useTheme as
|
|
86
|
+
import { useTheme as b, useAriaId as te, useDisableBodyScroll as ne, useIsInViewport as x, useScreenSize as C } from "./hooks.js";
|
|
87
87
|
import { useSetModalStateEffect as oe } from "./modal-context-provider.js";
|
|
88
88
|
import { Portal as ie } from "./portal.js";
|
|
89
|
-
import { Text5 as se, Text3 as
|
|
89
|
+
import { Text5 as se, Text3 as L, Text2 as A } from "./text.js";
|
|
90
90
|
import { vars as S } from "./skins/skin-contract.css-mistica.js";
|
|
91
91
|
import { RadioGroup as ce } from "./radio-button.js";
|
|
92
92
|
import { RowList as ae, Row as le } from "./list.js";
|
|
93
|
-
import
|
|
94
|
-
import
|
|
95
|
-
import
|
|
93
|
+
import M from "./negative-box.js";
|
|
94
|
+
import E from "./stack.js";
|
|
95
|
+
import I from "./box.js";
|
|
96
96
|
import de from "./touchable.js";
|
|
97
97
|
import ue from "./inline.js";
|
|
98
98
|
import me from "./circle.js";
|
|
99
99
|
import N from "./divider.js";
|
|
100
100
|
import { getPrefixedDataAttributes as he, getScrollableParentElement as fe } from "./utils/dom.js";
|
|
101
|
-
import { ButtonPrimary as
|
|
101
|
+
import { ButtonPrimary as Y, ButtonSecondary as pe, ButtonLink as ge } from "./button.js";
|
|
102
102
|
import ve from "./generated/mistica-icons/icon-close-regular.js";
|
|
103
103
|
import { InternalIconButton as Re } from "./icon-button.js";
|
|
104
104
|
import Se from "./button-layout.js";
|
|
105
|
-
import
|
|
106
|
-
import { InternalResponsiveLayout as T } from "./responsive-layout.js";
|
|
105
|
+
import _ from "./image.js";
|
|
107
106
|
import { safeAreaInsetBottom as ye } from "./utils/css.js";
|
|
108
|
-
|
|
107
|
+
import { MOBILE_SIDE_MARGIN as Ie, TABLET_SIDE_MARGIN as De, SMALL_DESKTOP_SIDE_MARGIN as Ee } from "./responsive-layout.css-mistica.js";
|
|
108
|
+
const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, be = (param)=>{
|
|
109
109
|
let { closeModal: n } = param;
|
|
110
110
|
const [s, l] = i.useState(0), p = i.useRef(!1), g = i.useRef(0), t = i.useRef(0), o = i.useRef(0), u = i.useRef(0), { isDesktopOrBigger: m } = C(), r = i.useCallback((h)=>{
|
|
111
111
|
p.current = !0, g.current = 0, t.current = Date.now(), o.current = P(h);
|
|
@@ -147,7 +147,7 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
147
147
|
transition: "none"
|
|
148
148
|
} : void 0
|
|
149
149
|
};
|
|
150
|
-
},
|
|
150
|
+
}, Te = {
|
|
151
151
|
closed: {
|
|
152
152
|
open: "opening"
|
|
153
153
|
},
|
|
@@ -161,9 +161,9 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
161
161
|
closing: {
|
|
162
162
|
transitionEnd: "closed"
|
|
163
163
|
}
|
|
164
|
-
},
|
|
164
|
+
}, ke = (n, s)=>Te[n][s] || n, D = /*#__PURE__*/ i.forwardRef((param, p)=>{
|
|
165
165
|
let { onClose: n, children: s, dataAttributes: l } = param;
|
|
166
|
-
const { texts: g } =
|
|
166
|
+
const { texts: g } = b(), [t, o] = i.useReducer(ke, "closed"), u = i.useRef(!1), m = te(), r = i.useCallback((f)=>{
|
|
167
167
|
f.target === f.currentTarget && o("transitionEnd");
|
|
168
168
|
}, []), c = ()=>{
|
|
169
169
|
t === "open" && o("close");
|
|
@@ -172,7 +172,7 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
172
172
|
if (t === "opening" || t === "closing") {
|
|
173
173
|
const f = setTimeout(()=>{
|
|
174
174
|
o("transitionEnd");
|
|
175
|
-
},
|
|
175
|
+
}, z);
|
|
176
176
|
return ()=>clearTimeout(f);
|
|
177
177
|
}
|
|
178
178
|
}, [
|
|
@@ -183,9 +183,9 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
183
183
|
t,
|
|
184
184
|
n
|
|
185
185
|
]);
|
|
186
|
-
const
|
|
186
|
+
const _be = be({
|
|
187
187
|
closeModal: c
|
|
188
|
-
}), { onScroll: h, overlayStyle: d } =
|
|
188
|
+
}), { onScroll: h, overlayStyle: d } = _be, a = _object_without_properties(_be, [
|
|
189
189
|
"onScroll",
|
|
190
190
|
"overlayStyle"
|
|
191
191
|
]);
|
|
@@ -193,15 +193,15 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
193
193
|
children: /* @__PURE__ */ v(re, {
|
|
194
194
|
children: [
|
|
195
195
|
/* @__PURE__ */ e("div", {
|
|
196
|
-
className:
|
|
197
|
-
[
|
|
196
|
+
className: B(G, {
|
|
197
|
+
[H]: t === "closing"
|
|
198
198
|
}),
|
|
199
199
|
style: d,
|
|
200
200
|
onClick: c
|
|
201
201
|
}),
|
|
202
202
|
/* @__PURE__ */ e("div", _object_spread_props(_object_spread({
|
|
203
|
-
className:
|
|
204
|
-
[
|
|
203
|
+
className: B(j, {
|
|
204
|
+
[F]: t === "closing"
|
|
205
205
|
}),
|
|
206
206
|
onTransitionEnd: r,
|
|
207
207
|
onAnimationEnd: r
|
|
@@ -211,12 +211,12 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
211
211
|
className: K,
|
|
212
212
|
children: [
|
|
213
213
|
/* @__PURE__ */ v("div", {
|
|
214
|
-
className:
|
|
214
|
+
className: V,
|
|
215
215
|
children: [
|
|
216
216
|
/* @__PURE__ */ e("div", {
|
|
217
|
-
className:
|
|
217
|
+
className: X,
|
|
218
218
|
children: /* @__PURE__ */ e("div", {
|
|
219
|
-
className:
|
|
219
|
+
className: $
|
|
220
220
|
})
|
|
221
221
|
}),
|
|
222
222
|
/* @__PURE__ */ e("section", {
|
|
@@ -224,7 +224,7 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
224
224
|
"aria-modal": "true",
|
|
225
225
|
"aria-labelledby": m,
|
|
226
226
|
onScroll: h,
|
|
227
|
-
className:
|
|
227
|
+
className: q,
|
|
228
228
|
style: {
|
|
229
229
|
paddingBottom: ye
|
|
230
230
|
},
|
|
@@ -236,7 +236,7 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
236
236
|
]
|
|
237
237
|
}),
|
|
238
238
|
/* @__PURE__ */ e("div", {
|
|
239
|
-
className:
|
|
239
|
+
className: J,
|
|
240
240
|
children: /* @__PURE__ */ e(Re, {
|
|
241
241
|
onPress: c,
|
|
242
242
|
"aria-label": g.modalClose,
|
|
@@ -252,42 +252,45 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
252
252
|
]
|
|
253
253
|
})
|
|
254
254
|
});
|
|
255
|
-
}), k =
|
|
255
|
+
}), k = {
|
|
256
|
+
mobile: Ie,
|
|
257
|
+
tablet: De,
|
|
258
|
+
desktop: Ee
|
|
259
|
+
}, T = (param)=>{
|
|
256
260
|
let { title: n, subtitle: s, description: l, modalTitleId: p, button: g, secondaryButton: t, link: o, children: u } = param;
|
|
257
261
|
const m = i.useRef(null), r = i.useRef(null), c = i.useRef(null);
|
|
258
262
|
i.useEffect(()=>{
|
|
259
263
|
r.current && (c.current = fe(r.current));
|
|
260
264
|
}, []);
|
|
261
|
-
const h = !
|
|
265
|
+
const h = !x(m, !0, {
|
|
262
266
|
root: c.current
|
|
263
|
-
}), d = !
|
|
267
|
+
}), d = !x(r, !0, {
|
|
264
268
|
rootMargin: "1px",
|
|
265
269
|
// bottomScrollSignal div has 0px height so we need a 1px margin to trigger the intersection observer
|
|
266
270
|
root: c.current
|
|
267
271
|
}), a = !!g || !!t || !!o;
|
|
268
|
-
return /* @__PURE__ */ v(
|
|
272
|
+
return /* @__PURE__ */ v(O, {
|
|
269
273
|
children: [
|
|
270
274
|
/* @__PURE__ */ e("div", {
|
|
271
275
|
ref: m
|
|
272
276
|
}),
|
|
273
277
|
/* @__PURE__ */ v("div", {
|
|
274
|
-
className:
|
|
278
|
+
className: Q,
|
|
275
279
|
children: [
|
|
276
|
-
n ? /* @__PURE__ */ e(
|
|
280
|
+
n ? /* @__PURE__ */ e(I, {
|
|
277
281
|
paddingBottom: 8,
|
|
278
282
|
paddingTop: {
|
|
279
283
|
mobile: 0,
|
|
280
284
|
desktop: 40
|
|
281
285
|
},
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
})
|
|
286
|
+
paddingX: k,
|
|
287
|
+
children: /* @__PURE__ */ e(se, {
|
|
288
|
+
as: "h2",
|
|
289
|
+
id: p,
|
|
290
|
+
truncate: !0,
|
|
291
|
+
children: n
|
|
289
292
|
})
|
|
290
|
-
}) : /* @__PURE__ */ e(
|
|
293
|
+
}) : /* @__PURE__ */ e(I, {
|
|
291
294
|
paddingTop: {
|
|
292
295
|
mobile: 0,
|
|
293
296
|
desktop: 40
|
|
@@ -297,68 +300,66 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
297
300
|
]
|
|
298
301
|
}),
|
|
299
302
|
/* @__PURE__ */ e("div", {
|
|
300
|
-
className:
|
|
301
|
-
children: /* @__PURE__ */ e(
|
|
303
|
+
className: U,
|
|
304
|
+
children: /* @__PURE__ */ e(I, {
|
|
302
305
|
paddingBottom: a ? 0 : {
|
|
303
306
|
desktop: 40,
|
|
304
307
|
mobile: 0
|
|
305
308
|
},
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
})
|
|
309
|
+
paddingX: k,
|
|
310
|
+
children: /* @__PURE__ */ v(E, {
|
|
311
|
+
space: 8,
|
|
312
|
+
children: [
|
|
313
|
+
s || l ? /* @__PURE__ */ v(E, {
|
|
314
|
+
space: {
|
|
315
|
+
mobile: 8,
|
|
316
|
+
desktop: 16
|
|
317
|
+
},
|
|
318
|
+
children: [
|
|
319
|
+
s && /* @__PURE__ */ e(L, {
|
|
320
|
+
as: "p",
|
|
321
|
+
regular: !0,
|
|
322
|
+
children: s
|
|
323
|
+
}),
|
|
324
|
+
l && (Array.isArray(l) ? /* @__PURE__ */ e(A, {
|
|
325
|
+
as: "div",
|
|
326
|
+
regular: !0,
|
|
327
|
+
color: S.colors.textSecondary,
|
|
328
|
+
children: l.map((f, y)=>/* @__PURE__ */ e("p", {
|
|
329
|
+
style: {
|
|
330
|
+
margin: 0,
|
|
331
|
+
marginBottom: y < l.length - 1 ? "1em" : void 0
|
|
332
|
+
},
|
|
333
|
+
children: f
|
|
334
|
+
}, y))
|
|
335
|
+
}) : /* @__PURE__ */ e(A, {
|
|
336
|
+
as: "p",
|
|
337
|
+
regular: !0,
|
|
338
|
+
color: S.colors.textSecondary,
|
|
339
|
+
children: l
|
|
340
|
+
}))
|
|
341
|
+
]
|
|
342
|
+
}) : null,
|
|
343
|
+
u
|
|
344
|
+
]
|
|
343
345
|
})
|
|
344
346
|
})
|
|
345
347
|
}),
|
|
346
348
|
a && /* @__PURE__ */ v("div", {
|
|
347
|
-
className:
|
|
349
|
+
className: W,
|
|
348
350
|
children: [
|
|
349
351
|
d && /* @__PURE__ */ e(N, {}),
|
|
350
|
-
/* @__PURE__ */ e(
|
|
352
|
+
/* @__PURE__ */ e(I, {
|
|
351
353
|
paddingY: {
|
|
352
354
|
mobile: 16,
|
|
353
355
|
desktop: 40
|
|
354
356
|
},
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
})
|
|
357
|
+
paddingX: k,
|
|
358
|
+
children: /* @__PURE__ */ e(Se, {
|
|
359
|
+
align: "full-width",
|
|
360
|
+
link: o,
|
|
361
|
+
primaryButton: g,
|
|
362
|
+
secondaryButton: t
|
|
362
363
|
})
|
|
363
364
|
})
|
|
364
365
|
]
|
|
@@ -368,32 +369,32 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
368
369
|
})
|
|
369
370
|
]
|
|
370
371
|
});
|
|
371
|
-
},
|
|
372
|
+
}, Ze = /*#__PURE__*/ i.forwardRef((param, r)=>{
|
|
372
373
|
let { title: n, subtitle: s, description: l, items: p, selectedId: g, onClose: t, onSelect: o, button: u, dataAttributes: m } = param;
|
|
373
|
-
const [c, h] = i.useState(g), d = i.useRef(!1), { isDesktopOrBigger: a } = C(), { texts: f } =
|
|
374
|
-
return /* @__PURE__ */ e(
|
|
374
|
+
const [c, h] = i.useState(g), d = i.useRef(!1), { isDesktopOrBigger: a } = C(), { texts: f } = b();
|
|
375
|
+
return /* @__PURE__ */ e(D, {
|
|
375
376
|
onClose: t,
|
|
376
377
|
ref: r,
|
|
377
378
|
dataAttributes: _object_spread({
|
|
378
379
|
"component-name": "RadioListSheet"
|
|
379
380
|
}, m),
|
|
380
381
|
children: (param)=>/* @__PURE__ */ {
|
|
381
|
-
let { closeModal: y, modalTitleId:
|
|
382
|
+
let { closeModal: y, modalTitleId: w } = param;
|
|
382
383
|
var _ref;
|
|
383
|
-
return e(
|
|
384
|
+
return e(T, {
|
|
384
385
|
title: n,
|
|
385
386
|
subtitle: s,
|
|
386
387
|
description: l,
|
|
387
|
-
modalTitleId:
|
|
388
|
-
button: a ? /* @__PURE__ */ e(
|
|
388
|
+
modalTitleId: w,
|
|
389
|
+
button: a ? /* @__PURE__ */ e(Y, {
|
|
389
390
|
onPress: ()=>{
|
|
390
391
|
d.current && (o == null || o(c !== null && c !== void 0 ? c : "")), y();
|
|
391
392
|
},
|
|
392
393
|
children: (_ref = u == null ? void 0 : u.text) !== null && _ref !== void 0 ? _ref : f.sheetConfirmButton
|
|
393
394
|
}) : void 0,
|
|
394
|
-
children: /* @__PURE__ */ e(
|
|
395
|
+
children: /* @__PURE__ */ e(M, {
|
|
395
396
|
children: /* @__PURE__ */ e(ce, {
|
|
396
|
-
"aria-labelledby":
|
|
397
|
+
"aria-labelledby": w,
|
|
397
398
|
name: "sheetselection",
|
|
398
399
|
value: c,
|
|
399
400
|
onChange: (R)=>{
|
|
@@ -417,10 +418,10 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
417
418
|
});
|
|
418
419
|
}
|
|
419
420
|
});
|
|
420
|
-
}),
|
|
421
|
+
}), er = /*#__PURE__*/ i.forwardRef((param, u)=>{
|
|
421
422
|
let { title: n, subtitle: s, description: l, items: p, onClose: g, onSelect: t, dataAttributes: o } = param;
|
|
422
|
-
const { isDarkMode: m } =
|
|
423
|
-
return /* @__PURE__ */ e(
|
|
423
|
+
const { isDarkMode: m } = b();
|
|
424
|
+
return /* @__PURE__ */ e(D, {
|
|
424
425
|
onClose: g,
|
|
425
426
|
ref: u,
|
|
426
427
|
dataAttributes: _object_spread({
|
|
@@ -428,12 +429,12 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
428
429
|
}, o),
|
|
429
430
|
children: (param)=>{
|
|
430
431
|
let { closeModal: r, modalTitleId: c } = param;
|
|
431
|
-
return /* @__PURE__ */ e(
|
|
432
|
+
return /* @__PURE__ */ e(T, {
|
|
432
433
|
title: n,
|
|
433
434
|
subtitle: s,
|
|
434
435
|
description: l,
|
|
435
436
|
modalTitleId: c,
|
|
436
|
-
children: /* @__PURE__ */ e(
|
|
437
|
+
children: /* @__PURE__ */ e(M, {
|
|
437
438
|
children: p.map((param)=>{
|
|
438
439
|
let { id: h, style: d, title: a, icon: f } = param;
|
|
439
440
|
return /* @__PURE__ */ e(de, {
|
|
@@ -441,20 +442,20 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
441
442
|
t == null || t(h), r();
|
|
442
443
|
},
|
|
443
444
|
children: /* @__PURE__ */ v("div", {
|
|
444
|
-
className:
|
|
445
|
+
className: Z,
|
|
445
446
|
children: [
|
|
446
|
-
f && /* @__PURE__ */ e(
|
|
447
|
+
f && /* @__PURE__ */ e(I, {
|
|
447
448
|
paddingRight: 16,
|
|
448
449
|
children: f.Icon ? /* @__PURE__ */ e(f.Icon, {
|
|
449
450
|
size: 24,
|
|
450
451
|
color: d === "destructive" ? S.colors.textLinkDanger : S.colors.neutralHigh
|
|
451
|
-
}) : /* @__PURE__ */ e(
|
|
452
|
+
}) : /* @__PURE__ */ e(_, {
|
|
452
453
|
circular: !0,
|
|
453
454
|
src: m && f.urlDark ? f.urlDark : f.url,
|
|
454
455
|
width: 40
|
|
455
456
|
})
|
|
456
457
|
}),
|
|
457
|
-
/* @__PURE__ */ e(
|
|
458
|
+
/* @__PURE__ */ e(L, {
|
|
458
459
|
regular: !0,
|
|
459
460
|
color: d === "destructive" ? S.colors.textLinkDanger : S.colors.textPrimary,
|
|
460
461
|
children: a
|
|
@@ -467,10 +468,10 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
467
468
|
});
|
|
468
469
|
}
|
|
469
470
|
});
|
|
470
|
-
}),
|
|
471
|
+
}), rr = /*#__PURE__*/ i.forwardRef((param, o)=>{
|
|
471
472
|
let { title: n, subtitle: s, description: l, items: p, onClose: g, dataAttributes: t } = param;
|
|
472
|
-
const { isDarkMode: u } =
|
|
473
|
-
return /* @__PURE__ */ e(
|
|
473
|
+
const { isDarkMode: u } = b();
|
|
474
|
+
return /* @__PURE__ */ e(D, {
|
|
474
475
|
onClose: g,
|
|
475
476
|
ref: o,
|
|
476
477
|
dataAttributes: _object_spread({
|
|
@@ -478,14 +479,14 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
478
479
|
}, t),
|
|
479
480
|
children: (param)=>{
|
|
480
481
|
let { modalTitleId: m } = param;
|
|
481
|
-
return /* @__PURE__ */ e(
|
|
482
|
+
return /* @__PURE__ */ e(T, {
|
|
482
483
|
title: n,
|
|
483
484
|
subtitle: s,
|
|
484
485
|
description: l,
|
|
485
486
|
modalTitleId: m,
|
|
486
|
-
children: /* @__PURE__ */ e(
|
|
487
|
+
children: /* @__PURE__ */ e(I, {
|
|
487
488
|
paddingBottom: 16,
|
|
488
|
-
children: /* @__PURE__ */ e(
|
|
489
|
+
children: /* @__PURE__ */ e(E, {
|
|
489
490
|
space: 16,
|
|
490
491
|
role: "list",
|
|
491
492
|
children: p.map((r, c)=>/* @__PURE__ */ v(ue, {
|
|
@@ -498,20 +499,20 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
498
499
|
backgroundColor: S.colors.textPrimary
|
|
499
500
|
}) : r.icon.Icon ? /* @__PURE__ */ e(r.icon.Icon, {
|
|
500
501
|
size: r.icon.type === "small" ? 16 : 24
|
|
501
|
-
}) : /* @__PURE__ */ e(
|
|
502
|
+
}) : /* @__PURE__ */ e(_, {
|
|
502
503
|
src: u && r.icon.urlDark ? r.icon.urlDark : r.icon.url,
|
|
503
504
|
width: r.icon.type === "small" ? 16 : 24,
|
|
504
505
|
height: r.icon.type === "small" ? 16 : 24
|
|
505
506
|
})
|
|
506
507
|
}),
|
|
507
|
-
/* @__PURE__ */ v(
|
|
508
|
+
/* @__PURE__ */ v(E, {
|
|
508
509
|
space: 2,
|
|
509
510
|
children: [
|
|
510
|
-
/* @__PURE__ */ e(
|
|
511
|
+
/* @__PURE__ */ e(L, {
|
|
511
512
|
regular: !0,
|
|
512
513
|
children: r.title
|
|
513
514
|
}),
|
|
514
|
-
r.description && /* @__PURE__ */ e(
|
|
515
|
+
r.description && /* @__PURE__ */ e(A, {
|
|
515
516
|
regular: !0,
|
|
516
517
|
color: S.colors.textSecondary,
|
|
517
518
|
children: r.description
|
|
@@ -525,7 +526,7 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
525
526
|
});
|
|
526
527
|
}
|
|
527
528
|
});
|
|
528
|
-
}),
|
|
529
|
+
}), tr = /*#__PURE__*/ i.forwardRef((param, r)=>{
|
|
529
530
|
let { title: n, subtitle: s, description: l, button: p, secondaryButton: g, buttonLink: t, onClose: o, dataAttributes: u, onPressButton: m } = param;
|
|
530
531
|
const c = (d, a)=>()=>{
|
|
531
532
|
m == null || m(a), d();
|
|
@@ -537,7 +538,7 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
537
538
|
children: d
|
|
538
539
|
}, a);
|
|
539
540
|
};
|
|
540
|
-
return /* @__PURE__ */ e(
|
|
541
|
+
return /* @__PURE__ */ e(D, {
|
|
541
542
|
onClose: o,
|
|
542
543
|
ref: r,
|
|
543
544
|
dataAttributes: _object_spread({
|
|
@@ -545,12 +546,12 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
545
546
|
}, u),
|
|
546
547
|
children: (param)=>{
|
|
547
548
|
let { modalTitleId: d, closeModal: a } = param;
|
|
548
|
-
return /* @__PURE__ */ e(
|
|
549
|
+
return /* @__PURE__ */ e(T, {
|
|
549
550
|
title: n,
|
|
550
551
|
subtitle: s,
|
|
551
552
|
description: l,
|
|
552
553
|
modalTitleId: d,
|
|
553
|
-
button: /* @__PURE__ */ e(
|
|
554
|
+
button: /* @__PURE__ */ e(Y, _object_spread_props(_object_spread({}, h(p)), {
|
|
554
555
|
onPress: c(a, "PRIMARY")
|
|
555
556
|
})),
|
|
556
557
|
secondaryButton: g ? /* @__PURE__ */ e(pe, _object_spread_props(_object_spread({}, h(g)), {
|
|
@@ -562,5 +563,5 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
562
563
|
});
|
|
563
564
|
}
|
|
564
565
|
});
|
|
565
|
-
}),
|
|
566
|
-
export {
|
|
566
|
+
}), nr = D;
|
|
567
|
+
export { er as ActionsListSheet, tr as ActionsSheet, rr as InfoSheet, Ze as RadioListSheet, T as SheetBody, nr as default };
|