@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
|
@@ -11,10 +11,10 @@ function _export(target, all) {
|
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
13
|
InternalResponsiveLayout: function() {
|
|
14
|
-
return
|
|
14
|
+
return C;
|
|
15
15
|
},
|
|
16
16
|
default: function() {
|
|
17
|
-
return
|
|
17
|
+
return w;
|
|
18
18
|
}
|
|
19
19
|
});
|
|
20
20
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -106,32 +106,32 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
106
106
|
}
|
|
107
107
|
return target;
|
|
108
108
|
}
|
|
109
|
-
const
|
|
110
|
-
let { children:
|
|
111
|
-
const
|
|
109
|
+
const C = (param)=>{
|
|
110
|
+
let { children: n, isInverse: o = !1, variant: p, backgroundColor: s, className: u, fullWidth: e, dataAttributes: d, shouldExpandWhenNested: i = !1, innerDivClassName: m } = param;
|
|
111
|
+
const v = (0, _themevariantcontext.useThemeVariant)(), t = p || o && "inverse" || void 0;
|
|
112
112
|
return /* @__PURE__ */ (0, _jsxruntime.jsx)(_themevariantcontext.ThemeVariant, {
|
|
113
|
-
variant: t !== null && t !== void 0 ? t :
|
|
113
|
+
variant: t !== null && t !== void 0 ? t : v,
|
|
114
114
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", _object_spread_props(_object_spread({
|
|
115
|
-
className: (0, _classnames.default)(e ? _responsivelayoutcssmistica.fullwidthContainer : _responsivelayoutcssmistica.responsiveLayoutContainer,
|
|
115
|
+
className: (0, _classnames.default)(e ? _responsivelayoutcssmistica.fullwidthContainer : _responsivelayoutcssmistica.responsiveLayoutContainer, u, t && t !== "default" && _responsivelayoutcssmistica.backgroundVariant[t], {
|
|
116
116
|
[_responsivelayoutcssmistica.expandedResponsiveLayoutContainerMobile]: i === !0 && !e,
|
|
117
117
|
[_responsivelayoutcssmistica.expandedResponsiveLayoutContainerDesktop]: i && !e
|
|
118
118
|
}),
|
|
119
119
|
style: s ? {
|
|
120
120
|
background: s
|
|
121
121
|
} : void 0
|
|
122
|
-
}, (0, _dom.getPrefixedDataAttributes)(
|
|
122
|
+
}, (0, _dom.getPrefixedDataAttributes)(d)), {
|
|
123
123
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
124
|
-
className: e ? _responsivelayoutcssmistica.fullWidth : _responsivelayoutcssmistica.responsiveLayout,
|
|
125
|
-
children:
|
|
124
|
+
className: (0, _classnames.default)(e ? _responsivelayoutcssmistica.fullWidth : _responsivelayoutcssmistica.responsiveLayout, m),
|
|
125
|
+
children: n
|
|
126
126
|
})
|
|
127
127
|
}))
|
|
128
128
|
});
|
|
129
|
-
},
|
|
130
|
-
var { children:
|
|
129
|
+
}, g = (_param)=>{
|
|
130
|
+
var { children: n } = _param, o = _object_without_properties(_param, [
|
|
131
131
|
"children"
|
|
132
132
|
]);
|
|
133
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
133
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(C, _object_spread_props(_object_spread({}, o), {
|
|
134
134
|
shouldExpandWhenNested: !0,
|
|
135
|
-
children:
|
|
135
|
+
children: n
|
|
136
136
|
}));
|
|
137
|
-
},
|
|
137
|
+
}, w = g;
|
package/dist/select.js
CHANGED
|
@@ -128,7 +128,7 @@ function _object_spread_props(target, source) {
|
|
|
128
128
|
const st = (param)=>{
|
|
129
129
|
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;
|
|
130
130
|
var te;
|
|
131
|
-
const h = _react.useRef(null), d = _react.useRef(null), S = _react.useRef(null), v = _react.useRef(null),
|
|
131
|
+
const h = _react.useRef(null), d = _react.useRef(null), S = _react.useRef(null), v = _react.useRef(null), N = _react.useRef(/* @__PURE__ */ new Map()), [Se, ve] = _react.useState(!0), [l, ge] = _react.useState(de), [H, j] = _react.useState(!1), [K, U] = _react.useState(!1), [X, x] = _react.useState(!1), [u, F] = _react.useState({}), [g, W] = _react.useState(), G = _react.useRef(null), L = (0, _hooks.useAriaId)(le), { rawValues: Te, setRawValue: Z, setValue: $, formStatus: Ie, formErrors: J, setFormError: Ee, register: B } = (0, _formcontext.useForm)(), { platformOverrides: Q } = (0, _hooks.useTheme)(), we = he || process.env.NODE_ENV === "test" && !process.env.SSR_TEST || (0, _platform.isAndroid)(Q) || (0, _platform.isIos)(Q), T = pe || Ie === "sending", R = me || !!J[i], Y = J[i] || ue, a = fe !== null && fe !== void 0 ? fe : Te[i], A = (e)=>{
|
|
132
132
|
V == null || V(e), Ee({
|
|
133
133
|
name: i,
|
|
134
134
|
error: ""
|
|
@@ -142,9 +142,9 @@ const st = (param)=>{
|
|
|
142
142
|
}, I = (e)=>{
|
|
143
143
|
if (e) {
|
|
144
144
|
if (S != null && S.current) {
|
|
145
|
-
const o = S.current.getBoundingClientRect(), p = o.top, E = o.width, O = o.left, Re = o.height,
|
|
146
|
-
if (
|
|
147
|
-
const Ae = window.innerHeight -
|
|
145
|
+
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;
|
|
146
|
+
if (b + _ + 12 > window.innerHeight) {
|
|
147
|
+
const Ae = window.innerHeight - b;
|
|
148
148
|
if (p > Ae) {
|
|
149
149
|
const _e = p - _;
|
|
150
150
|
F({
|
|
@@ -156,14 +156,14 @@ const st = (param)=>{
|
|
|
156
156
|
});
|
|
157
157
|
} else F({
|
|
158
158
|
minWidth: E,
|
|
159
|
-
top:
|
|
159
|
+
top: b,
|
|
160
160
|
left: O,
|
|
161
|
-
maxHeight: window.innerHeight -
|
|
161
|
+
maxHeight: window.innerHeight - b - 12,
|
|
162
162
|
transformOrigin: "center top"
|
|
163
163
|
});
|
|
164
164
|
} else F({
|
|
165
165
|
minWidth: E,
|
|
166
|
-
top:
|
|
166
|
+
top: b,
|
|
167
167
|
left: O,
|
|
168
168
|
maxHeight: _,
|
|
169
169
|
transformOrigin: "center top"
|
|
@@ -179,15 +179,15 @@ const st = (param)=>{
|
|
|
179
179
|
}, xe = (e)=>{
|
|
180
180
|
var s;
|
|
181
181
|
const t = (s = v.current) == null ? void 0 : s.getBoundingClientRect();
|
|
182
|
-
if (t && e &&
|
|
183
|
-
const c =
|
|
182
|
+
if (t && e && N.current.has(e)) {
|
|
183
|
+
const c = N.current.get(e), o = c == null ? void 0 : c.getBoundingClientRect();
|
|
184
184
|
if (o && o.top + o.height / 2 >= t.top + t.height) {
|
|
185
185
|
c == null || c.scrollIntoView();
|
|
186
186
|
return;
|
|
187
187
|
}
|
|
188
188
|
o && o.top + o.height / 2 <= t.top && (c == null || c.scrollIntoView(!1));
|
|
189
189
|
}
|
|
190
|
-
}, Oe = d.current,
|
|
190
|
+
}, Oe = d.current, be = h.current;
|
|
191
191
|
_react.useEffect(()=>{
|
|
192
192
|
Z({
|
|
193
193
|
name: i,
|
|
@@ -215,7 +215,7 @@ const st = (param)=>{
|
|
|
215
215
|
d,
|
|
216
216
|
h,
|
|
217
217
|
Oe,
|
|
218
|
-
|
|
218
|
+
be
|
|
219
219
|
]), _react.useEffect(()=>{
|
|
220
220
|
const e = (s)=>{
|
|
221
221
|
var p;
|
|
@@ -260,13 +260,13 @@ const st = (param)=>{
|
|
|
260
260
|
]), _react.useEffect(()=>{
|
|
261
261
|
ve(!1);
|
|
262
262
|
}, []);
|
|
263
|
-
const
|
|
263
|
+
const ye = (e)=>{
|
|
264
264
|
var t;
|
|
265
265
|
return e ? (t = f.find((param)=>{
|
|
266
266
|
let { value: s } = param;
|
|
267
267
|
return s === e;
|
|
268
268
|
})) == null ? void 0 : t.text : "";
|
|
269
|
-
},
|
|
269
|
+
}, Ne = {
|
|
270
270
|
tabIndex: 0,
|
|
271
271
|
onFocus: ()=>x(!0),
|
|
272
272
|
onBlur: ()=>x(!1),
|
|
@@ -362,7 +362,7 @@ const st = (param)=>{
|
|
|
362
362
|
role: "button",
|
|
363
363
|
"aria-haspopup": "listbox",
|
|
364
364
|
ref: d
|
|
365
|
-
}, !T &&
|
|
365
|
+
}, !T && Ne), {
|
|
366
366
|
children: [
|
|
367
367
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_textfieldbase.TextFieldBaseAutosuggest, {
|
|
368
368
|
style: {
|
|
@@ -390,7 +390,7 @@ const st = (param)=>{
|
|
|
390
390
|
}),
|
|
391
391
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
392
392
|
className: (0, _classnames.default)(_selectcssmistica.selectTextVariants[T ? "disabled" : "default"], w ? _textfieldbasecssmistica.inputWithLabel : _textfieldbasecssmistica.inputWithoutLabel),
|
|
393
|
-
children:
|
|
393
|
+
children: ye(a !== null && a !== void 0 ? a : l)
|
|
394
394
|
})
|
|
395
395
|
]
|
|
396
396
|
})),
|
|
@@ -424,7 +424,7 @@ const st = (param)=>{
|
|
|
424
424
|
onPointerDown: _dom.cancelEvent,
|
|
425
425
|
onClick: ()=>q(e),
|
|
426
426
|
ref: (s)=>{
|
|
427
|
-
s ?
|
|
427
|
+
s ? N.current.set(e, s) : N.current.delete(e);
|
|
428
428
|
},
|
|
429
429
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
|
|
430
430
|
regular: !0,
|
package/dist/sheet.js
CHANGED
|
@@ -11,22 +11,22 @@ function _export(target, all) {
|
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
13
|
ActionsListSheet: function() {
|
|
14
|
-
return
|
|
14
|
+
return er;
|
|
15
15
|
},
|
|
16
16
|
ActionsSheet: function() {
|
|
17
|
-
return
|
|
17
|
+
return tr;
|
|
18
18
|
},
|
|
19
19
|
InfoSheet: function() {
|
|
20
|
-
return
|
|
20
|
+
return rr;
|
|
21
21
|
},
|
|
22
22
|
RadioListSheet: function() {
|
|
23
|
-
return
|
|
23
|
+
return Ze;
|
|
24
24
|
},
|
|
25
25
|
SheetBody: function() {
|
|
26
|
-
return
|
|
26
|
+
return T;
|
|
27
27
|
},
|
|
28
28
|
default: function() {
|
|
29
|
-
return
|
|
29
|
+
return nr;
|
|
30
30
|
}
|
|
31
31
|
});
|
|
32
32
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -54,8 +54,8 @@ const _iconcloseregular = /*#__PURE__*/ _interop_require_default(require("./gene
|
|
|
54
54
|
const _iconbutton = require("./icon-button.js");
|
|
55
55
|
const _buttonlayout = /*#__PURE__*/ _interop_require_default(require("./button-layout.js"));
|
|
56
56
|
const _image = /*#__PURE__*/ _interop_require_default(require("./image.js"));
|
|
57
|
-
const _responsivelayout = require("./responsive-layout.js");
|
|
58
57
|
const _css = require("./utils/css.js");
|
|
58
|
+
const _responsivelayoutcssmistica = require("./responsive-layout.css-mistica.js");
|
|
59
59
|
function _interop_require_default(obj) {
|
|
60
60
|
return obj && obj.__esModule ? obj : {
|
|
61
61
|
default: obj
|
|
@@ -181,7 +181,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
181
181
|
}
|
|
182
182
|
return target;
|
|
183
183
|
}
|
|
184
|
-
const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY,
|
|
184
|
+
const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, be = (param)=>{
|
|
185
185
|
let { closeModal: n } = param;
|
|
186
186
|
const [s, l] = _react.useState(0), p = _react.useRef(!1), g = _react.useRef(0), t = _react.useRef(0), o = _react.useRef(0), u = _react.useRef(0), { isDesktopOrBigger: m } = (0, _hooks.useScreenSize)(), r = _react.useCallback((h)=>{
|
|
187
187
|
p.current = !0, g.current = 0, t.current = Date.now(), o.current = P(h);
|
|
@@ -223,7 +223,7 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
223
223
|
transition: "none"
|
|
224
224
|
} : void 0
|
|
225
225
|
};
|
|
226
|
-
},
|
|
226
|
+
}, Te = {
|
|
227
227
|
closed: {
|
|
228
228
|
open: "opening"
|
|
229
229
|
},
|
|
@@ -237,9 +237,9 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
237
237
|
closing: {
|
|
238
238
|
transitionEnd: "closed"
|
|
239
239
|
}
|
|
240
|
-
},
|
|
240
|
+
}, ke = (n, s)=>Te[n][s] || n, D = /*#__PURE__*/ _react.forwardRef((param, p)=>{
|
|
241
241
|
let { onClose: n, children: s, dataAttributes: l } = param;
|
|
242
|
-
const { texts: g } = (0, _hooks.useTheme)(), [t, o] = _react.useReducer(
|
|
242
|
+
const { texts: g } = (0, _hooks.useTheme)(), [t, o] = _react.useReducer(ke, "closed"), u = _react.useRef(!1), m = (0, _hooks.useAriaId)(), r = _react.useCallback((f)=>{
|
|
243
243
|
f.target === f.currentTarget && o("transitionEnd");
|
|
244
244
|
}, []), c = ()=>{
|
|
245
245
|
t === "open" && o("close");
|
|
@@ -259,9 +259,9 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
259
259
|
t,
|
|
260
260
|
n
|
|
261
261
|
]);
|
|
262
|
-
const
|
|
262
|
+
const _be = be({
|
|
263
263
|
closeModal: c
|
|
264
|
-
}), { onScroll: h, overlayStyle: d } =
|
|
264
|
+
}), { onScroll: h, overlayStyle: d } = _be, a = _object_without_properties(_be, [
|
|
265
265
|
"onScroll",
|
|
266
266
|
"overlayStyle"
|
|
267
267
|
]);
|
|
@@ -328,7 +328,11 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
328
328
|
]
|
|
329
329
|
})
|
|
330
330
|
});
|
|
331
|
-
}), k =
|
|
331
|
+
}), k = {
|
|
332
|
+
mobile: _responsivelayoutcssmistica.MOBILE_SIDE_MARGIN,
|
|
333
|
+
tablet: _responsivelayoutcssmistica.TABLET_SIDE_MARGIN,
|
|
334
|
+
desktop: _responsivelayoutcssmistica.SMALL_DESKTOP_SIDE_MARGIN
|
|
335
|
+
}, T = (param)=>{
|
|
332
336
|
let { title: n, subtitle: s, description: l, modalTitleId: p, button: g, secondaryButton: t, link: o, children: u } = param;
|
|
333
337
|
const m = _react.useRef(null), r = _react.useRef(null), c = _react.useRef(null);
|
|
334
338
|
_react.useEffect(()=>{
|
|
@@ -355,13 +359,12 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
355
359
|
mobile: 0,
|
|
356
360
|
desktop: 40
|
|
357
361
|
},
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
})
|
|
362
|
+
paddingX: k,
|
|
363
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text5, {
|
|
364
|
+
as: "h2",
|
|
365
|
+
id: p,
|
|
366
|
+
truncate: !0,
|
|
367
|
+
children: n
|
|
365
368
|
})
|
|
366
369
|
}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_box.default, {
|
|
367
370
|
paddingTop: {
|
|
@@ -379,43 +382,42 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
379
382
|
desktop: 40,
|
|
380
383
|
mobile: 0
|
|
381
384
|
},
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
})
|
|
385
|
+
paddingX: k,
|
|
386
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
|
|
387
|
+
space: 8,
|
|
388
|
+
children: [
|
|
389
|
+
s || l ? /* @__PURE__ */ (0, _jsxruntime.jsxs)(_stack.default, {
|
|
390
|
+
space: {
|
|
391
|
+
mobile: 8,
|
|
392
|
+
desktop: 16
|
|
393
|
+
},
|
|
394
|
+
children: [
|
|
395
|
+
s && /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text3, {
|
|
396
|
+
as: "p",
|
|
397
|
+
regular: !0,
|
|
398
|
+
children: s
|
|
399
|
+
}),
|
|
400
|
+
l && (Array.isArray(l) ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
401
|
+
as: "div",
|
|
402
|
+
regular: !0,
|
|
403
|
+
color: _skincontractcssmistica.vars.colors.textSecondary,
|
|
404
|
+
children: l.map((f, y)=>/* @__PURE__ */ (0, _jsxruntime.jsx)("p", {
|
|
405
|
+
style: {
|
|
406
|
+
margin: 0,
|
|
407
|
+
marginBottom: y < l.length - 1 ? "1em" : void 0
|
|
408
|
+
},
|
|
409
|
+
children: f
|
|
410
|
+
}, y))
|
|
411
|
+
}) : /* @__PURE__ */ (0, _jsxruntime.jsx)(_text.Text2, {
|
|
412
|
+
as: "p",
|
|
413
|
+
regular: !0,
|
|
414
|
+
color: _skincontractcssmistica.vars.colors.textSecondary,
|
|
415
|
+
children: l
|
|
416
|
+
}))
|
|
417
|
+
]
|
|
418
|
+
}) : null,
|
|
419
|
+
u
|
|
420
|
+
]
|
|
419
421
|
})
|
|
420
422
|
})
|
|
421
423
|
}),
|
|
@@ -428,13 +430,12 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
428
430
|
mobile: 16,
|
|
429
431
|
desktop: 40
|
|
430
432
|
},
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
})
|
|
433
|
+
paddingX: k,
|
|
434
|
+
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_buttonlayout.default, {
|
|
435
|
+
align: "full-width",
|
|
436
|
+
link: o,
|
|
437
|
+
primaryButton: g,
|
|
438
|
+
secondaryButton: t
|
|
438
439
|
})
|
|
439
440
|
})
|
|
440
441
|
]
|
|
@@ -444,23 +445,23 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
444
445
|
})
|
|
445
446
|
]
|
|
446
447
|
});
|
|
447
|
-
},
|
|
448
|
+
}, Ze = /*#__PURE__*/ _react.forwardRef((param, r)=>{
|
|
448
449
|
let { title: n, subtitle: s, description: l, items: p, selectedId: g, onClose: t, onSelect: o, button: u, dataAttributes: m } = param;
|
|
449
450
|
const [c, h] = _react.useState(g), d = _react.useRef(!1), { isDesktopOrBigger: a } = (0, _hooks.useScreenSize)(), { texts: f } = (0, _hooks.useTheme)();
|
|
450
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
451
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(D, {
|
|
451
452
|
onClose: t,
|
|
452
453
|
ref: r,
|
|
453
454
|
dataAttributes: _object_spread({
|
|
454
455
|
"component-name": "RadioListSheet"
|
|
455
456
|
}, m),
|
|
456
457
|
children: (param)=>/* @__PURE__ */ {
|
|
457
|
-
let { closeModal: y, modalTitleId:
|
|
458
|
+
let { closeModal: y, modalTitleId: w } = param;
|
|
458
459
|
var _ref;
|
|
459
|
-
return (0, _jsxruntime.jsx)(
|
|
460
|
+
return (0, _jsxruntime.jsx)(T, {
|
|
460
461
|
title: n,
|
|
461
462
|
subtitle: s,
|
|
462
463
|
description: l,
|
|
463
|
-
modalTitleId:
|
|
464
|
+
modalTitleId: w,
|
|
464
465
|
button: a ? /* @__PURE__ */ (0, _jsxruntime.jsx)(_button.ButtonPrimary, {
|
|
465
466
|
onPress: ()=>{
|
|
466
467
|
d.current && (o == null || o(c !== null && c !== void 0 ? c : "")), y();
|
|
@@ -469,7 +470,7 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
469
470
|
}) : void 0,
|
|
470
471
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_negativebox.default, {
|
|
471
472
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)(_radiobutton.RadioGroup, {
|
|
472
|
-
"aria-labelledby":
|
|
473
|
+
"aria-labelledby": w,
|
|
473
474
|
name: "sheetselection",
|
|
474
475
|
value: c,
|
|
475
476
|
onChange: (R)=>{
|
|
@@ -493,10 +494,10 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
493
494
|
});
|
|
494
495
|
}
|
|
495
496
|
});
|
|
496
|
-
}),
|
|
497
|
+
}), er = /*#__PURE__*/ _react.forwardRef((param, u)=>{
|
|
497
498
|
let { title: n, subtitle: s, description: l, items: p, onClose: g, onSelect: t, dataAttributes: o } = param;
|
|
498
499
|
const { isDarkMode: m } = (0, _hooks.useTheme)();
|
|
499
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
500
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(D, {
|
|
500
501
|
onClose: g,
|
|
501
502
|
ref: u,
|
|
502
503
|
dataAttributes: _object_spread({
|
|
@@ -504,7 +505,7 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
504
505
|
}, o),
|
|
505
506
|
children: (param)=>{
|
|
506
507
|
let { closeModal: r, modalTitleId: c } = param;
|
|
507
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
508
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(T, {
|
|
508
509
|
title: n,
|
|
509
510
|
subtitle: s,
|
|
510
511
|
description: l,
|
|
@@ -543,10 +544,10 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
543
544
|
});
|
|
544
545
|
}
|
|
545
546
|
});
|
|
546
|
-
}),
|
|
547
|
+
}), rr = /*#__PURE__*/ _react.forwardRef((param, o)=>{
|
|
547
548
|
let { title: n, subtitle: s, description: l, items: p, onClose: g, dataAttributes: t } = param;
|
|
548
549
|
const { isDarkMode: u } = (0, _hooks.useTheme)();
|
|
549
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
550
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(D, {
|
|
550
551
|
onClose: g,
|
|
551
552
|
ref: o,
|
|
552
553
|
dataAttributes: _object_spread({
|
|
@@ -554,7 +555,7 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
554
555
|
}, t),
|
|
555
556
|
children: (param)=>{
|
|
556
557
|
let { modalTitleId: m } = param;
|
|
557
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
558
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(T, {
|
|
558
559
|
title: n,
|
|
559
560
|
subtitle: s,
|
|
560
561
|
description: l,
|
|
@@ -601,7 +602,7 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
601
602
|
});
|
|
602
603
|
}
|
|
603
604
|
});
|
|
604
|
-
}),
|
|
605
|
+
}), tr = /*#__PURE__*/ _react.forwardRef((param, r)=>{
|
|
605
606
|
let { title: n, subtitle: s, description: l, button: p, secondaryButton: g, buttonLink: t, onClose: o, dataAttributes: u, onPressButton: m } = param;
|
|
606
607
|
const c = (d, a)=>()=>{
|
|
607
608
|
m == null || m(a), d();
|
|
@@ -613,7 +614,7 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
613
614
|
children: d
|
|
614
615
|
}, a);
|
|
615
616
|
};
|
|
616
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
617
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(D, {
|
|
617
618
|
onClose: o,
|
|
618
619
|
ref: r,
|
|
619
620
|
dataAttributes: _object_spread({
|
|
@@ -621,7 +622,7 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
621
622
|
}, u),
|
|
622
623
|
children: (param)=>{
|
|
623
624
|
let { modalTitleId: d, closeModal: a } = param;
|
|
624
|
-
return /* @__PURE__ */ (0, _jsxruntime.jsx)(
|
|
625
|
+
return /* @__PURE__ */ (0, _jsxruntime.jsx)(T, {
|
|
625
626
|
title: n,
|
|
626
627
|
subtitle: s,
|
|
627
628
|
description: l,
|
|
@@ -638,4 +639,4 @@ const P = (n)=>"touches" in n ? n.touches[0].clientY : n.clientY, De = (param)=>
|
|
|
638
639
|
});
|
|
639
640
|
}
|
|
640
641
|
});
|
|
641
|
-
}),
|
|
642
|
+
}), nr = D;
|
package/dist/slider.js
CHANGED
|
@@ -151,7 +151,7 @@ const Re = 48, me = 20, Ce = 28, Ve = (n, t, o)=>t >= o ? 0 : (n - t) / (o - t),
|
|
|
151
151
|
"tooltip"
|
|
152
152
|
]);
|
|
153
153
|
n && (n.length === 0 ? n = void 0 : a = n.length - 1), t = t | 0, t = t <= 0 ? 1 : t;
|
|
154
|
-
const { defaultValue: Z, value: D, onChange: H, focusableRef: x, disabled:
|
|
154
|
+
const { defaultValue: Z, value: D, onChange: H, focusableRef: x, disabled: U, name: z } = (0, _formcontext.useControlProps)({
|
|
155
155
|
name: i.name,
|
|
156
156
|
value: i.value !== void 0 ? I(!1, o, a, t, w(o, i.value, n)) : void 0,
|
|
157
157
|
defaultValue: i.defaultValue !== void 0 ? I(!1, o, a, t, w(o, i.defaultValue, n)) : void 0,
|
|
@@ -172,11 +172,11 @@ const Re = 48, me = 20, Ce = 28, Ve = (n, t, o)=>t >= o ? 0 : (n - t) / (o - t),
|
|
|
172
172
|
}, [
|
|
173
173
|
T
|
|
174
174
|
]);
|
|
175
|
-
const
|
|
175
|
+
const _ = _react.useRef(null), m = _react.useRef(null), N = _react.useRef(null), J = _react.useRef(null), [p, E] = _react.useState(!1), [y, F] = _react.useState(!1), [K, L] = _react.useState(!1), { isIos: S } = (0, _hooks.useTheme)(), A = (e, r, c)=>{
|
|
176
176
|
const d = e == null ? void 0 : e.getBoundingClientRect();
|
|
177
177
|
return !!d && d.left <= r && r <= d.right && d.top <= c && c <= d.bottom;
|
|
178
178
|
}, l = (0, _environment.isTouchableDevice)(), C = S ? Ce : me, f = l ? Re : C, M = (e)=>{
|
|
179
|
-
const r =
|
|
179
|
+
const r = _.current;
|
|
180
180
|
if (r) {
|
|
181
181
|
const c = r.getBoundingClientRect().left + C / 2, d = r.getBoundingClientRect().right - C / 2;
|
|
182
182
|
T((e - c) / (d - c), !0);
|
|
@@ -202,15 +202,15 @@ const Re = 48, me = 20, Ce = 28, Ve = (n, t, o)=>t >= o ? 0 : (n - t) / (o - t),
|
|
|
202
202
|
}, P),
|
|
203
203
|
children: /* @__PURE__ */ (0, _jsxruntime.jsxs)("div", {
|
|
204
204
|
className: (0, _classnames.default)(_slidercssmistica.container, {
|
|
205
|
-
[_slidercssmistica.disabled]:
|
|
205
|
+
[_slidercssmistica.disabled]: U
|
|
206
206
|
}),
|
|
207
207
|
style: {
|
|
208
208
|
height: f
|
|
209
209
|
},
|
|
210
|
-
ref:
|
|
210
|
+
ref: N,
|
|
211
211
|
onPointerDown: (e)=>{
|
|
212
212
|
const r = e.clientX, c = e.clientY;
|
|
213
|
-
!l && A(
|
|
213
|
+
!l && A(N.current, r, c) ? (A(m.current, r, c) || M(r), E(!0), W(e)) : (0, _dom.cancelEvent)(e);
|
|
214
214
|
},
|
|
215
215
|
onPointerUp: (e)=>{
|
|
216
216
|
l || (E(!1), ee(e));
|
|
@@ -230,7 +230,7 @@ const Re = 48, me = 20, Ce = 28, Ve = (n, t, o)=>t >= o ? 0 : (n - t) / (o - t),
|
|
|
230
230
|
children: [
|
|
231
231
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
232
232
|
className: _slidercssmistica.track,
|
|
233
|
-
ref:
|
|
233
|
+
ref: _,
|
|
234
234
|
style: {
|
|
235
235
|
background: `linear-gradient(to right, ${_skincontractcssmistica.vars.colors.controlActivated} ${O}, ${_skincontractcssmistica.vars.colors.barTrack} ${O}`
|
|
236
236
|
}
|
|
@@ -276,7 +276,7 @@ const Re = 48, me = 20, Ce = 28, Ve = (n, t, o)=>t >= o ? 0 : (n - t) / (o - t),
|
|
|
276
276
|
},
|
|
277
277
|
name: z,
|
|
278
278
|
value: u,
|
|
279
|
-
disabled:
|
|
279
|
+
disabled: U,
|
|
280
280
|
onChange: (e)=>T(+e.target.value, !1),
|
|
281
281
|
onFocus: ()=>{
|
|
282
282
|
L(!0);
|
package/dist/tag.js
CHANGED
|
@@ -78,7 +78,7 @@ function _object_spread_props(target, source) {
|
|
|
78
78
|
}
|
|
79
79
|
return target;
|
|
80
80
|
}
|
|
81
|
-
const { colors: t } = _skincontractcssmistica.vars,
|
|
81
|
+
const { colors: t } = _skincontractcssmistica.vars, V = (param)=>{
|
|
82
82
|
let { Icon: e, children: i, dataAttributes: m, type: l = "promo", badge: n } = param;
|
|
83
83
|
const { textPresets: d } = (0, _hooks.useTheme)(), p = (0, _themevariantcontext.useThemeVariant)(), o = n === !0 ? void 0 : n || 0;
|
|
84
84
|
if (!i) return null;
|
|
@@ -151,4 +151,4 @@ const { colors: t } = _skincontractcssmistica.vars, P = (param)=>{
|
|
|
151
151
|
})
|
|
152
152
|
]
|
|
153
153
|
}));
|
|
154
|
-
}, I =
|
|
154
|
+
}, I = V;
|
package/dist/text-field-base.js
CHANGED
|
@@ -186,7 +186,7 @@ const Be = (o, f)=>{
|
|
|
186
186
|
})
|
|
187
187
|
});
|
|
188
188
|
}, W = /*#__PURE__*/ _react.forwardRef((_param, U)=>{
|
|
189
|
-
var { error: o, helperText: f, label: i, inputProps: m, inputRef: g, defaultValue: r, value: a, onFocus: h, onBlur: x, inputComponent: p, prefix: b, startIcon: t, endIcon: u, endIconOverlay: S, shrinkLabel:
|
|
189
|
+
var { error: o, helperText: f, label: i, inputProps: m, inputRef: g, defaultValue: r, value: a, onFocus: h, onBlur: x, inputComponent: p, prefix: b, startIcon: t, endIcon: u, endIconOverlay: S, shrinkLabel: N, multiline: R = !1, focus: y, fieldRef: H, maxLength: C, id: K, autoComplete: M, fullWidth: J, dataAttributes: Q } = _param, l = _object_without_properties(_param, [
|
|
190
190
|
"error",
|
|
191
191
|
"helperText",
|
|
192
192
|
"label",
|
|
@@ -234,7 +234,7 @@ const Be = (o, f)=>{
|
|
|
234
234
|
}, I = _object_spread(_object_spread_props(_object_spread({}, l), {
|
|
235
235
|
maxLength: C,
|
|
236
236
|
autoComplete: M
|
|
237
|
-
}), m), $ = `calc(${_iconbuttoncssmistica.iconSize.default} + ${_textfieldbasecssmistica.fieldElementsGap}px)`, q = `calc(${_textfieldbasecssmistica.iconButtonSize} + ${_textfieldbasecssmistica.fieldEndIconGap}px)`, V =
|
|
237
|
+
}), m), $ = `calc(${_iconbuttoncssmistica.iconSize.default} + ${_textfieldbasecssmistica.fieldElementsGap}px)`, q = `calc(${_textfieldbasecssmistica.iconButtonSize} + ${_textfieldbasecssmistica.fieldEndIconGap}px)`, V = N || s === "focused" || s === "filled" ? X ? _textfieldcomponentscssmistica.LABEL_SCALE_MOBILE : _textfieldcomponentscssmistica.LABEL_SCALE_DESKTOP : 1, ee = {
|
|
238
238
|
left: `calc(${_textfieldbasecssmistica.fieldLeftPadding}px + ${t ? $ : "0px"})`,
|
|
239
239
|
// shrinking means applying a scale transformation, so width will be proportionally reduced.
|
|
240
240
|
// Let's keep the original width.
|
|
@@ -316,7 +316,7 @@ const Be = (o, f)=>{
|
|
|
316
316
|
error: o,
|
|
317
317
|
forId: w,
|
|
318
318
|
inputState: s,
|
|
319
|
-
shrinkLabel:
|
|
319
|
+
shrinkLabel: N,
|
|
320
320
|
optional: !l.required,
|
|
321
321
|
children: i
|
|
322
322
|
}),
|
|
@@ -132,11 +132,11 @@ const J = (param)=>{
|
|
|
132
132
|
let { shrinkLabel: t, forId: s, inputState: r, error: l, children: i, style: n, optional: a } = param;
|
|
133
133
|
const f = t || r === "focused" || r === "filled", [u, h] = _react.useState("initial"), { texts: d } = (0, _hooks.useTheme)();
|
|
134
134
|
_react.useEffect(()=>{
|
|
135
|
-
const
|
|
135
|
+
const g = setTimeout(()=>{
|
|
136
136
|
process.env.NODE_ENV !== "test" && h("transform 150ms, width 150ms");
|
|
137
137
|
});
|
|
138
138
|
return ()=>{
|
|
139
|
-
clearTimeout(
|
|
139
|
+
clearTimeout(g);
|
|
140
140
|
};
|
|
141
141
|
}, []);
|
|
142
142
|
let p = _skincontractcssmistica.vars.colors.textSecondary;
|