@telefonica/mistica 14.24.1 → 14.26.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/accordion.css-mistica.js +41 -0
- package/dist/accordion.css.d.ts +12 -0
- package/dist/accordion.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/accordion.d.ts +47 -0
- package/dist/accordion.js +350 -0
- package/dist/boxed.d.ts +1 -0
- package/dist/boxed.js +17 -16
- package/dist/card.js +345 -345
- package/dist/carousel.js +58 -52
- package/dist/checkbox.css.d.ts +1 -1
- package/dist/checkbox.d.ts +3 -1
- package/dist/checkbox.js +23 -22
- package/dist/community/blocks.js +3 -2
- package/dist/form-context.d.ts +9 -9
- package/dist/generated/mistica-icons/icons-keywords.d.ts +4 -0
- package/dist/icons/icon-chevron.d.ts +1 -0
- package/dist/icons/icon-chevron.js +21 -18
- package/dist/index.d.ts +5 -2
- package/dist/index.js +34 -4
- package/dist/integer-field.d.ts +5 -1
- package/dist/integer-field.js +12 -11
- package/dist/list.d.ts +8 -0
- package/dist/list.js +3 -0
- package/dist/menu.css-mistica.js +30 -6
- package/dist/menu.css.d.ts +14 -2
- package/dist/menu.d.ts +25 -3
- package/dist/menu.js +264 -84
- package/dist/overlay.js +11 -52
- package/dist/overscroll-color-context.js +23 -11
- package/dist/package-version.js +1 -1
- package/dist/pin-field.css-mistica.js +37 -0
- package/dist/pin-field.css.d.ts +7 -0
- package/dist/pin-field.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/pin-field.d.ts +25 -0
- package/dist/pin-field.js +269 -0
- package/dist/progress-bar.css-mistica.js +7 -4
- package/dist/progress-bar.css.d.ts +1 -0
- package/dist/progress-bar.d.ts +12 -3
- package/dist/progress-bar.js +109 -13
- package/dist/skins/telefonica.js +2 -2
- package/dist/skins/vivo-new.js +1 -1
- package/dist/slider.css-mistica.js +42 -0
- package/dist/slider.css.d.ts +9 -0
- package/dist/slider.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/slider.d.ts +14 -0
- package/dist/slider.js +170 -0
- package/dist/stepper.js +34 -27
- package/dist/text-field-base.css.d.ts +2 -0
- package/dist/text-field-base.d.ts +1 -0
- package/dist/text-field-components.js +28 -26
- package/dist/text-field.d.ts +1 -0
- package/dist/theme.d.ts +3 -0
- package/dist/theme.js +24 -12
- package/dist/tooltip.css-mistica.js +10 -7
- package/dist/tooltip.css.d.ts +1 -0
- package/dist/tooltip.d.ts +2 -1
- package/dist/tooltip.js +37 -36
- package/dist/touchable.js +5 -4
- package/dist/utils/locale.d.ts +1 -1
- package/dist/video.js +8 -9
- package/dist-es/accordion.css-mistica.js +9 -0
- package/dist-es/accordion.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/accordion.js +280 -0
- package/dist-es/boxed.js +25 -24
- package/dist-es/card.js +475 -475
- package/dist-es/carousel.js +95 -89
- package/dist-es/checkbox.js +42 -41
- package/dist-es/community/blocks.js +2 -1
- package/dist-es/icons/icon-chevron.js +25 -22
- package/dist-es/index.js +1768 -1765
- package/dist-es/integer-field.js +14 -13
- package/dist-es/list.js +9 -9
- package/dist-es/menu.css-mistica.js +10 -4
- package/dist-es/menu.js +262 -93
- package/dist-es/overlay.js +18 -20
- package/dist-es/overscroll-color-context.js +30 -18
- package/dist-es/package-version.js +1 -1
- package/dist-es/pin-field.css-mistica.js +5 -0
- package/dist-es/pin-field.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/pin-field.js +217 -0
- package/dist-es/progress-bar.css-mistica.js +2 -2
- package/dist-es/progress-bar.js +67 -18
- package/dist-es/skins/telefonica.js +2 -2
- package/dist-es/skins/vivo-new.js +1 -1
- package/dist-es/slider.css-mistica.js +10 -0
- package/dist-es/slider.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/slider.js +117 -0
- package/dist-es/stepper.js +61 -54
- package/dist-es/style.css +1 -1
- package/dist-es/text-field-components.js +38 -36
- package/dist-es/theme.js +24 -12
- package/dist-es/tooltip.css-mistica.js +3 -3
- package/dist-es/tooltip.js +65 -64
- package/dist-es/touchable.js +9 -8
- package/dist-es/video.js +16 -17
- package/package.json +1 -1
package/dist/tooltip.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
Object.defineProperty(exports, "default", {
|
|
6
6
|
enumerable: true,
|
|
7
7
|
get: function() {
|
|
8
|
-
return
|
|
8
|
+
return ae;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _jsxruntime = require("react/jsx-runtime");
|
|
@@ -145,8 +145,8 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
145
145
|
}
|
|
146
146
|
return target;
|
|
147
147
|
}
|
|
148
|
-
const
|
|
149
|
-
var { children: r , extra: N , description: S , target: k , title: Y , targetLabel: L , delay: V = !0 , dataAttributes: j , targetStyle: K , unstable_offsetX: f } = _param,
|
|
148
|
+
const $t = "bottom", Bt = "top", Et = 12, m = 4 + Et, It = 500, v = 12, Mt = 500, M = ()=>{}, Nt = (r)=>r === "bottom" ? `translateY(${v}px)` : r === "top" ? `translateY(calc(-100% - ${v}px))` : r === "right" ? `translateX(${v}px) translateY(-50%)` : r === "left" ? `translateX(-${v}px) translateY(-50%)` : `translateY(-${v}px)`, kt = (r)=>r === "top" ? "translateY(-100%)" : r === "bottom" ? "translateY(0)" : "translateY(-50%)", Lt = (r)=>r === "bottom" ? "translateY(0)" : r === "top" ? "translateY(-100%)" : r === "right" || r === "left" ? "translateX(0px) translateY(-50%)" : "translateY(0px)", Vt = (r)=>r === "top" ? _tooltipcssmistica.fadeInTopKeyframes : r === "bottom" ? _tooltipcssmistica.fadeInBottomKeyframes : _tooltipcssmistica.fadeInXKeyframes, jt = (r)=>r ? "1" : "0.2", Kt = (r)=>r === "top" ? `2px 2px 4px 0 rgba(0, 0, 0, ${_tooltipcssmistica.vars.shadowAlpha})` : r === "right" ? `0 0 4px 0 rgba(0, 0, 0, ${_tooltipcssmistica.vars.shadowAlpha})` : r === "left" ? `0 0 4px 0 rgba(0, 0, 0, ${_tooltipcssmistica.vars.shadowAlpha})` : r === "bottom" ? `-1px -1px 4px 0 rgba(0, 0, 0, ${_tooltipcssmistica.vars.shadowAlpha})` : "", zt = (_param)=>{
|
|
149
|
+
var { children: r , extra: N , description: S , target: k , title: Y , targetLabel: L , delay: V = !0 , dataAttributes: j , targetStyle: K , unstable_offsetX: f , textCenter: z } = _param, y = _object_without_properties(_param, [
|
|
150
150
|
"children",
|
|
151
151
|
"extra",
|
|
152
152
|
"description",
|
|
@@ -156,16 +156,17 @@ const Dt = "bottom", Wt = "top", $t = 12, m = 4 + $t, Bt = 500, v = 12, Et = 500
|
|
|
156
156
|
"delay",
|
|
157
157
|
"dataAttributes",
|
|
158
158
|
"targetStyle",
|
|
159
|
-
"unstable_offsetX"
|
|
159
|
+
"unstable_offsetX",
|
|
160
|
+
"textCenter"
|
|
160
161
|
]);
|
|
161
|
-
const { isDarkMode:
|
|
162
|
+
const { isDarkMode: F } = (0, _hooks.useTheme)(), [a, C] = _react.useState(!1), { isTabletOrSmaller: H } = (0, _hooks.useScreenSize)(), D = (0, _hooks.useAriaId)(), h = _react.useRef(!1), c = _react.useRef(null), g = _react.useRef(null), O = _react.useRef(null), x = _react.useRef(null), t = _react.useRef({
|
|
162
163
|
top: 0,
|
|
163
164
|
right: 0,
|
|
164
165
|
left: 0,
|
|
165
166
|
bottom: 0,
|
|
166
167
|
width: 0,
|
|
167
168
|
height: 0
|
|
168
|
-
}), [
|
|
169
|
+
}), [X, q] = _react.useState({}), G = (n)=>H ? n || Bt : n || $t, [e, J] = _react.useState(void 0), i = ((n)=>{
|
|
169
170
|
if (!e) return n;
|
|
170
171
|
const u = (d)=>{
|
|
171
172
|
const p = t.current.top > e.height;
|
|
@@ -177,21 +178,21 @@ const Dt = "bottom", Wt = "top", $t = 12, m = 4 + $t, Bt = 500, v = 12, Et = 500
|
|
|
177
178
|
left: t.current.left < e.width ? t.current.right + e.width > window.innerWidth ? t.current.top < e.height ? "bottom" : "top" : "right" : n,
|
|
178
179
|
bottom: t.current.bottom + e.height > window.innerHeight ? l("top") : l(n)
|
|
179
180
|
})[n];
|
|
180
|
-
})(
|
|
181
|
-
a &&
|
|
181
|
+
})(G(y.position)), R = (0, _environment.isClientSide)() ? window.matchMedia("(pointer: coarse)").matches : !1, W = ()=>{
|
|
182
|
+
a && C(!1);
|
|
182
183
|
};
|
|
183
184
|
_react.useEffect(()=>(window.addEventListener("resize", W), ()=>{
|
|
184
185
|
window.removeEventListener("resize", W);
|
|
185
186
|
}));
|
|
186
187
|
const $ = ()=>{
|
|
187
|
-
|
|
188
|
+
C(!1);
|
|
188
189
|
}, T = ()=>{
|
|
189
|
-
|
|
190
|
-
},
|
|
190
|
+
O.current && (t.current = O.current.getBoundingClientRect(), C(!a));
|
|
191
|
+
}, Q = ()=>{
|
|
191
192
|
a || T();
|
|
192
|
-
}, Q = (n)=>{
|
|
193
|
-
n.keyCode === _keycodes.TAB && $();
|
|
194
193
|
}, U = (n)=>{
|
|
194
|
+
n.keyCode === _keycodes.TAB && $();
|
|
195
|
+
}, Z = (n)=>{
|
|
195
196
|
if (!e) return {};
|
|
196
197
|
const u = e.width > t.current.width && t.current.left + t.current.width / 2 < e.width / 2 + 16 ? t.current.width / 2 : "50%";
|
|
197
198
|
return n === "bottom" || n === "top" ? {
|
|
@@ -221,42 +222,42 @@ const Dt = "bottom", Wt = "top", $t = 12, m = 4 + $t, Bt = 500, v = 12, Et = 500
|
|
|
221
222
|
}, [
|
|
222
223
|
f,
|
|
223
224
|
e
|
|
224
|
-
]), b = (()=>
|
|
225
|
+
]), b = (()=>y.width)(), _ = {
|
|
225
226
|
top: _tooltipcssmistica.arrowTop,
|
|
226
227
|
bottom: _tooltipcssmistica.arrowBottom,
|
|
227
228
|
left: _tooltipcssmistica.arrowLeft,
|
|
228
229
|
right: _tooltipcssmistica.arrowRight
|
|
229
|
-
},
|
|
230
|
-
[_tooltipcssmistica.vars.enterTransform]:
|
|
231
|
-
[_tooltipcssmistica.vars.exitTransform]:
|
|
232
|
-
[_tooltipcssmistica.vars.enterActiveAnimationName]:
|
|
233
|
-
[_tooltipcssmistica.vars.enterDoneTransform]:
|
|
234
|
-
[_tooltipcssmistica.vars.shadowAlpha]:
|
|
235
|
-
[_tooltipcssmistica.vars.arrowBoxShadow]:
|
|
230
|
+
}, tt = i && (0, _dynamic.assignInlineVars)({
|
|
231
|
+
[_tooltipcssmistica.vars.enterTransform]: Nt(i),
|
|
232
|
+
[_tooltipcssmistica.vars.exitTransform]: Lt(i),
|
|
233
|
+
[_tooltipcssmistica.vars.enterActiveAnimationName]: Vt(i),
|
|
234
|
+
[_tooltipcssmistica.vars.enterDoneTransform]: kt(i),
|
|
235
|
+
[_tooltipcssmistica.vars.shadowAlpha]: jt(F),
|
|
236
|
+
[_tooltipcssmistica.vars.arrowBoxShadow]: Kt(i)
|
|
236
237
|
});
|
|
237
238
|
return _react.useEffect(()=>{
|
|
238
|
-
i && x.current && a &&
|
|
239
|
+
i && x.current && a && q(B(i, b || 0));
|
|
239
240
|
}, [
|
|
240
241
|
a,
|
|
241
242
|
B,
|
|
242
243
|
i,
|
|
243
244
|
b
|
|
244
245
|
]), _react.useEffect(()=>{
|
|
245
|
-
x.current && (x.current.getBoundingClientRect(), a &&
|
|
246
|
+
x.current && (x.current.getBoundingClientRect(), a && J(x.current.getBoundingClientRect()));
|
|
246
247
|
}, [
|
|
247
248
|
a
|
|
248
249
|
]), /* @__PURE__ */ (0, _jsxruntime.jsxs)(_jsxruntime.Fragment, {
|
|
249
250
|
children: [
|
|
250
251
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
251
|
-
ref:
|
|
252
|
+
ref: O,
|
|
252
253
|
style: K,
|
|
253
254
|
className: _tooltipcssmistica.wrapper,
|
|
254
255
|
onPointerOver: ()=>{
|
|
255
256
|
c.current && (clearTimeout(c.current), c.current = null), !h.current && (h.current = !0, V ? g.current = setTimeout(()=>{
|
|
256
257
|
g.current = null, T();
|
|
257
|
-
},
|
|
258
|
+
}, Mt) : T());
|
|
258
259
|
},
|
|
259
|
-
onPointerLeave:
|
|
260
|
+
onPointerLeave: R ? M : ()=>{
|
|
260
261
|
if (g.current) {
|
|
261
262
|
clearTimeout(g.current), g.current = null, h.current = !1;
|
|
262
263
|
return;
|
|
@@ -265,8 +266,8 @@ const Dt = "bottom", Wt = "top", $t = 12, m = 4 + $t, Bt = 500, v = 12, Et = 500
|
|
|
265
266
|
h.current && (c.current = null, h.current = !1, T());
|
|
266
267
|
}, 100);
|
|
267
268
|
},
|
|
268
|
-
onFocus:
|
|
269
|
-
onKeyDown:
|
|
269
|
+
onFocus: Q,
|
|
270
|
+
onKeyDown: U,
|
|
270
271
|
"touch-action": "auto",
|
|
271
272
|
role: "button",
|
|
272
273
|
tabIndex: 0,
|
|
@@ -277,12 +278,12 @@ const Dt = "bottom", Wt = "top", $t = 12, m = 4 + $t, Bt = 500, v = 12, Et = 500
|
|
|
277
278
|
}),
|
|
278
279
|
/* @__PURE__ */ (0, _jsxruntime.jsxs)(_portal.Portal, {
|
|
279
280
|
children: [
|
|
280
|
-
a &&
|
|
281
|
+
a && R && /* @__PURE__ */ (0, _jsxruntime.jsx)(_overlay.default, {
|
|
281
282
|
onPress: $
|
|
282
283
|
}),
|
|
283
284
|
/* @__PURE__ */ (0, _jsxruntime.jsx)(_reacttransitiongroup.CSSTransition, {
|
|
284
285
|
in: a,
|
|
285
|
-
timeout:
|
|
286
|
+
timeout: It,
|
|
286
287
|
classNames: {
|
|
287
288
|
enter: _tooltipcssmistica.enter,
|
|
288
289
|
enterActive: _tooltipcssmistica.enterActive,
|
|
@@ -296,22 +297,22 @@ const Dt = "bottom", Wt = "top", $t = 12, m = 4 + $t, Bt = 500, v = 12, Et = 500
|
|
|
296
297
|
}, (0, _dom.getPrefixedDataAttributes)(j, "Tooltip")), {
|
|
297
298
|
role: "tooltip",
|
|
298
299
|
id: D,
|
|
299
|
-
className: (0, _classnames.default)(_tooltipcssmistica.container, _tooltipcssmistica.textAlign),
|
|
300
|
+
className: (0, _classnames.default)(_tooltipcssmistica.container, _tooltipcssmistica.textAlign, z ? _tooltipcssmistica.textCenter : ""),
|
|
300
301
|
style: _object_spread({
|
|
301
302
|
width: b
|
|
302
|
-
},
|
|
303
|
+
}, X, tt),
|
|
303
304
|
onPointerOver: ()=>{
|
|
304
305
|
c.current && (clearTimeout(c.current), c.current = null);
|
|
305
306
|
},
|
|
306
|
-
onPointerLeave:
|
|
307
|
+
onPointerLeave: R ? M : ()=>{
|
|
307
308
|
c.current = setTimeout(()=>{
|
|
308
309
|
h.current && (c.current = null, h.current = !1, T());
|
|
309
310
|
}, 100);
|
|
310
311
|
},
|
|
311
312
|
children: [
|
|
312
313
|
/* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
313
|
-
style:
|
|
314
|
-
className: (0, _classnames.default)(_tooltipcssmistica.arrowWrapper,
|
|
314
|
+
style: Z(i),
|
|
315
|
+
className: (0, _classnames.default)(_tooltipcssmistica.arrowWrapper, _[i]),
|
|
315
316
|
children: /* @__PURE__ */ (0, _jsxruntime.jsx)("div", {
|
|
316
317
|
className: _tooltipcssmistica.arrow
|
|
317
318
|
})
|
|
@@ -337,4 +338,4 @@ const Dt = "bottom", Wt = "top", $t = 12, m = 4 + $t, Bt = 500, v = 12, Et = 500
|
|
|
337
338
|
})
|
|
338
339
|
]
|
|
339
340
|
});
|
|
340
|
-
},
|
|
341
|
+
}, ae = zt;
|
package/dist/touchable.js
CHANGED
|
@@ -137,13 +137,14 @@ const L = function(e) {
|
|
|
137
137
|
style: e.style,
|
|
138
138
|
role: e.role,
|
|
139
139
|
"aria-checked": e["aria-checked"],
|
|
140
|
+
"aria-disabled": e.disabled ? !0 : void 0,
|
|
140
141
|
"aria-controls": e["aria-controls"],
|
|
141
142
|
"aria-expanded": e["aria-expanded"],
|
|
142
143
|
"aria-hidden": e["aria-hidden"],
|
|
143
144
|
"aria-selected": e["aria-selected"],
|
|
144
145
|
"aria-live": e["aria-live"],
|
|
145
146
|
tabIndex: e.tabIndex
|
|
146
|
-
}, (0, _dom.getPrefixedDataAttributes)(e.dataAttributes, "Touchable")), u = e.type ? e.type : "button", r = !!e.href && !!e.newTab, m = !r && !!e.href && !!e.loadOnTop,
|
|
147
|
+
}, (0, _dom.getPrefixedDataAttributes)(e.dataAttributes, "Touchable")), u = e.type ? e.type : "button", r = !!e.href && !!e.newTab, m = !r && !!e.href && !!e.loadOnTop, b = (a)=>{
|
|
147
148
|
e.stopPropagation && a.stopPropagation();
|
|
148
149
|
}, h = (a)=>{
|
|
149
150
|
e.onPress && e.onPress(a);
|
|
@@ -152,15 +153,15 @@ const L = function(e) {
|
|
|
152
153
|
f.current = !1, a();
|
|
153
154
|
}));
|
|
154
155
|
}, x = (a)=>{
|
|
155
|
-
if (
|
|
156
|
+
if (b(a), !i.length) {
|
|
156
157
|
h(a);
|
|
157
158
|
return;
|
|
158
159
|
}
|
|
159
160
|
g(()=>h(a));
|
|
160
161
|
}, R = (a)=>{
|
|
161
|
-
|
|
162
|
+
b(a), i.length && (a.preventDefault(), g(()=>L(k(), r, m)));
|
|
162
163
|
}, D = (a)=>{
|
|
163
|
-
|
|
164
|
+
b(a), y();
|
|
164
165
|
}, w = (a)=>{
|
|
165
166
|
(a.keyCode === _keycodes.ENTER || a.keyCode === _keycodes.SPACE) && (a.preventDefault(), a.currentTarget.click());
|
|
166
167
|
};
|
package/dist/utils/locale.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export type Locale = 'ca-ES' | 'en-US' | 'de-DE' | 'es-AR' | 'es-CO' | 'es-EC' | 'es-ES' | 'es-MX' | 'es-PE' | 'es-UY' | 'eu-ES' | 'gl-ES' | 'pt-BR';
|
|
1
|
+
export type Locale = 'ca-ES' | 'en-US' | 'en-GB' | 'de-DE' | 'es-AR' | 'es-CO' | 'es-EC' | 'es-ES' | 'es-MX' | 'es-PE' | 'es-UY' | 'eu-ES' | 'gl-ES' | 'pt-BR';
|
package/dist/video.js
CHANGED
|
@@ -137,8 +137,8 @@ const q = {
|
|
|
137
137
|
"aspectRatio",
|
|
138
138
|
"dataAttributes"
|
|
139
139
|
]);
|
|
140
|
-
const [a,
|
|
141
|
-
a === "loading" && (
|
|
140
|
+
const [a, d] = _react.useReducer(D, "loading"), s = _react.useRef(null), C = _react.useRef(), f = _react.useRef(null), w = (0, _image.useMediaBorderRadius)(), g = typeof c == "number" ? c : K[c], v = _react.useCallback(()=>{
|
|
141
|
+
a === "loading" && (d("fail"), h == null || h());
|
|
142
142
|
}, [
|
|
143
143
|
h,
|
|
144
144
|
a
|
|
@@ -146,9 +146,8 @@ const q = {
|
|
|
146
146
|
_react.useEffect(()=>{
|
|
147
147
|
var e;
|
|
148
148
|
if (C.current !== r) {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
return l("reset"), (e = s.current) == null || e.load(), ()=>{
|
|
149
|
+
let t;
|
|
150
|
+
return C.current = r, d("reset"), r ? (t = setTimeout(v, T), (e = s.current) == null || e.load()) : d("fail"), ()=>{
|
|
152
151
|
clearTimeout(t);
|
|
153
152
|
};
|
|
154
153
|
}
|
|
@@ -160,7 +159,7 @@ const q = {
|
|
|
160
159
|
const I = ()=>{
|
|
161
160
|
y == null || y();
|
|
162
161
|
const e = s.current, t = p && !(0, _platform.isRunningAcceptanceTest)();
|
|
163
|
-
|
|
162
|
+
d("finishLoad"), e && t && e.paused && e.play();
|
|
164
163
|
}, U = (Array.isArray(r) ? r : [
|
|
165
164
|
r
|
|
166
165
|
]).map((e)=>typeof e == "string" ? {
|
|
@@ -176,11 +175,11 @@ const q = {
|
|
|
176
175
|
preload: k,
|
|
177
176
|
onError: v,
|
|
178
177
|
onPause: ()=>{
|
|
179
|
-
R == null || R(),
|
|
178
|
+
R == null || R(), d("pause");
|
|
180
179
|
},
|
|
181
180
|
onTimeUpdate: ()=>{
|
|
182
181
|
var e;
|
|
183
|
-
a !== "playing" && ((e = s.current) == null ? void 0 : e.currentTime) !== 0 && (b == null || b(),
|
|
182
|
+
a !== "playing" && ((e = s.current) == null ? void 0 : e.currentTime) !== 0 && (b == null || b(), d("play"));
|
|
184
183
|
},
|
|
185
184
|
onCanPlay: ()=>{
|
|
186
185
|
p === "streaming" && I();
|
|
@@ -255,7 +254,7 @@ const q = {
|
|
|
255
254
|
var i;
|
|
256
255
|
(i = f.current) != null && i.style && (f.current.style.width = "100%", f.current.style.height = "100%"), setTimeout(()=>{
|
|
257
256
|
var S;
|
|
258
|
-
|
|
257
|
+
d("reset"), (S = s.current) == null || S.load();
|
|
259
258
|
}, 100);
|
|
260
259
|
}, t.setCurrentTime = (i)=>{
|
|
261
260
|
s.current && (s.current.currentTime = i);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
|
+
import "./accordion.css.ts.vanilla.css-mistica.js";
|
|
3
|
+
var e = "_8s3szx3", v = "_1y2v1nf5z _1y2v1nf78 _1y2v1nf8h _1y2v1nf9q _1y2v1nfbt _1y2v1nfdo _1y2v1nf5y _1y2v1nfb8 _1y2v1nfca", a = "_8s3szx9", r = "_8s3szx4", t = {
|
|
4
|
+
enter: "_8s3szx5",
|
|
5
|
+
enterActive: "_8s3szx6",
|
|
6
|
+
exit: "_8s3szx7",
|
|
7
|
+
exitActive: "_8s3szx8"
|
|
8
|
+
}, _ = "_8s3szx1", o = "_8s3szx2";
|
|
9
|
+
export { e as chevronContainer, v as itemContent, a as panel, r as panelContainer, t as panelTransitionClasses, _ as touchableBackground, o as touchableBackgroundInverse };
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
function _define_property(obj, key, value) {
|
|
2
|
+
if (key in obj) {
|
|
3
|
+
Object.defineProperty(obj, key, {
|
|
4
|
+
value: value,
|
|
5
|
+
enumerable: true,
|
|
6
|
+
configurable: true,
|
|
7
|
+
writable: true
|
|
8
|
+
});
|
|
9
|
+
} else {
|
|
10
|
+
obj[key] = value;
|
|
11
|
+
}
|
|
12
|
+
return obj;
|
|
13
|
+
}
|
|
14
|
+
function _object_spread(target) {
|
|
15
|
+
for(var i = 1; i < arguments.length; i++){
|
|
16
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
17
|
+
var ownKeys = Object.keys(source);
|
|
18
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
19
|
+
ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
20
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
21
|
+
}));
|
|
22
|
+
}
|
|
23
|
+
ownKeys.forEach(function(key) {
|
|
24
|
+
_define_property(target, key, source[key]);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
}
|
|
29
|
+
function ownKeys(object, enumerableOnly) {
|
|
30
|
+
var keys = Object.keys(object);
|
|
31
|
+
if (Object.getOwnPropertySymbols) {
|
|
32
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
33
|
+
if (enumerableOnly) {
|
|
34
|
+
symbols = symbols.filter(function(sym) {
|
|
35
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
keys.push.apply(keys, symbols);
|
|
39
|
+
}
|
|
40
|
+
return keys;
|
|
41
|
+
}
|
|
42
|
+
function _object_spread_props(target, source) {
|
|
43
|
+
source = source != null ? source : {};
|
|
44
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
45
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
46
|
+
} else {
|
|
47
|
+
ownKeys(Object(source)).forEach(function(key) {
|
|
48
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
return target;
|
|
52
|
+
}
|
|
53
|
+
function _object_without_properties(source, excluded) {
|
|
54
|
+
if (source == null) return {};
|
|
55
|
+
var target = _object_without_properties_loose(source, excluded);
|
|
56
|
+
var key, i;
|
|
57
|
+
if (Object.getOwnPropertySymbols) {
|
|
58
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
59
|
+
for(i = 0; i < sourceSymbolKeys.length; i++){
|
|
60
|
+
key = sourceSymbolKeys[i];
|
|
61
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
62
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
63
|
+
target[key] = source[key];
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return target;
|
|
67
|
+
}
|
|
68
|
+
function _object_without_properties_loose(source, excluded) {
|
|
69
|
+
if (source == null) return {};
|
|
70
|
+
var target = {};
|
|
71
|
+
var sourceKeys = Object.keys(source);
|
|
72
|
+
var key, i;
|
|
73
|
+
for(i = 0; i < sourceKeys.length; i++){
|
|
74
|
+
key = sourceKeys[i];
|
|
75
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
76
|
+
target[key] = source[key];
|
|
77
|
+
}
|
|
78
|
+
return target;
|
|
79
|
+
}
|
|
80
|
+
import { jsxs as g, jsx as t } from "react/jsx-runtime";
|
|
81
|
+
import * as c from "react";
|
|
82
|
+
import { Content as N } from "./list.js";
|
|
83
|
+
import S from "./icons/icon-chevron.js";
|
|
84
|
+
import h from "./box.js";
|
|
85
|
+
import { itemContent as y, touchableBackgroundInverse as O, touchableBackground as T, chevronContainer as D, panelTransitionClasses as w, panelContainer as E, panel as P } from "./accordion.css-mistica.js";
|
|
86
|
+
import L from "./stack.js";
|
|
87
|
+
import { BaseTouchable as _ } from "./touchable.js";
|
|
88
|
+
import k from "classnames";
|
|
89
|
+
import { vars as A } from "./skins/skin-contract.css-mistica.js";
|
|
90
|
+
import { getPrefixedDataAttributes as C } from "./utils/dom.js";
|
|
91
|
+
import V from "./divider.js";
|
|
92
|
+
import { Boxed as X } from "./boxed.js";
|
|
93
|
+
import { useIsInverseVariant as j } from "./theme-variant-context.js";
|
|
94
|
+
import { useAriaId as v } from "./hooks.js";
|
|
95
|
+
import { CSSTransition as M } from "react-transition-group";
|
|
96
|
+
const q = 400, x = /*#__PURE__*/ c.createContext({
|
|
97
|
+
index: [],
|
|
98
|
+
toogle: ()=>{}
|
|
99
|
+
}), z = ()=>c.useContext(x), B = (param)=>{
|
|
100
|
+
let { value: o , defaultValue: r , onChange: n , singleOpen: d } = param;
|
|
101
|
+
const m = o !== void 0, a = (e)=>e === void 0 ? [] : typeof e == "number" ? [
|
|
102
|
+
e
|
|
103
|
+
] : e, [i, l] = c.useState(a(r));
|
|
104
|
+
c.useEffect(()=>l(a(r)), [
|
|
105
|
+
r
|
|
106
|
+
]), c.useEffect(()=>{
|
|
107
|
+
i.length > 1 && d && (i.splice(1), l([
|
|
108
|
+
...i
|
|
109
|
+
]));
|
|
110
|
+
}, [
|
|
111
|
+
d,
|
|
112
|
+
i
|
|
113
|
+
]);
|
|
114
|
+
const p = (e, s)=>{
|
|
115
|
+
if (!s) return [
|
|
116
|
+
e
|
|
117
|
+
];
|
|
118
|
+
const u = s.indexOf(e);
|
|
119
|
+
return u === -1 ? d ? s = [
|
|
120
|
+
e
|
|
121
|
+
] : s.push(e) : s.splice(u, 1), [
|
|
122
|
+
...s
|
|
123
|
+
];
|
|
124
|
+
}, f = (e)=>{
|
|
125
|
+
if (m || l(p(e, i)), n) {
|
|
126
|
+
const s = (m ? a(o) : i).includes(e);
|
|
127
|
+
n(e, !s);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
return m ? [
|
|
131
|
+
a(o),
|
|
132
|
+
f
|
|
133
|
+
] : [
|
|
134
|
+
i,
|
|
135
|
+
f
|
|
136
|
+
];
|
|
137
|
+
}, F = (o)=>{
|
|
138
|
+
const r = o == null ? void 0 : o.closest("[data-accordion]");
|
|
139
|
+
if (r) return Array.from(r.querySelectorAll("[data-accordion-item]")).filter((n)=>n.closest("[data-accordion]") === r).findIndex((n)=>n === o);
|
|
140
|
+
}, R = /*#__PURE__*/ c.forwardRef((_param, m)=>{
|
|
141
|
+
var { content: o , dataAttributes: r , trackingEvent: n } = _param, d = _object_without_properties(_param, [
|
|
142
|
+
"content",
|
|
143
|
+
"dataAttributes",
|
|
144
|
+
"trackingEvent"
|
|
145
|
+
]);
|
|
146
|
+
const a = c.useRef(null), i = c.useRef(null), { index: l , toogle: p } = z(), f = j(), e = v(), s = v(), [u, b] = c.useState(), I = u !== void 0 && (l == null ? void 0 : l.includes(u));
|
|
147
|
+
return c.useEffect(()=>{
|
|
148
|
+
b(F(i.current));
|
|
149
|
+
}, []), /* @__PURE__ */ g("div", _object_spread_props(_object_spread({
|
|
150
|
+
ref: i
|
|
151
|
+
}, C(_object_spread_props(_object_spread({}, r), {
|
|
152
|
+
"accordion-item": !0
|
|
153
|
+
}))), {
|
|
154
|
+
children: [
|
|
155
|
+
/* @__PURE__ */ t(_, {
|
|
156
|
+
ref: m,
|
|
157
|
+
className: k(y, f ? O : T),
|
|
158
|
+
onPress: ()=>{
|
|
159
|
+
u !== void 0 && p(u);
|
|
160
|
+
},
|
|
161
|
+
trackingEvent: n,
|
|
162
|
+
"aria-expanded": I,
|
|
163
|
+
"aria-controls": s,
|
|
164
|
+
children: /* @__PURE__ */ t(h, {
|
|
165
|
+
paddingX: 16,
|
|
166
|
+
children: /* @__PURE__ */ t(N, _object_spread_props(_object_spread({
|
|
167
|
+
labelId: e,
|
|
168
|
+
type: "custom"
|
|
169
|
+
}, d), {
|
|
170
|
+
right: /* @__PURE__ */ t("div", {
|
|
171
|
+
className: D,
|
|
172
|
+
children: /* @__PURE__ */ t(S, {
|
|
173
|
+
size: 24,
|
|
174
|
+
transitionDuration: 400,
|
|
175
|
+
direction: I ? "up" : "down",
|
|
176
|
+
color: f ? A.colors.inverse : I ? A.colors.neutralHigh : A.colors.neutralMedium
|
|
177
|
+
})
|
|
178
|
+
})
|
|
179
|
+
}))
|
|
180
|
+
})
|
|
181
|
+
}),
|
|
182
|
+
/* @__PURE__ */ t(M, {
|
|
183
|
+
in: I,
|
|
184
|
+
timeout: q,
|
|
185
|
+
nodeRef: a,
|
|
186
|
+
classNames: w,
|
|
187
|
+
mountOnEnter: !0,
|
|
188
|
+
unmountOnExit: !0,
|
|
189
|
+
children: /* @__PURE__ */ t("div", {
|
|
190
|
+
className: E,
|
|
191
|
+
ref: a,
|
|
192
|
+
children: /* @__PURE__ */ t("div", {
|
|
193
|
+
className: P,
|
|
194
|
+
role: "region",
|
|
195
|
+
"aria-labelledby": e,
|
|
196
|
+
id: s,
|
|
197
|
+
children: /* @__PURE__ */ t(h, {
|
|
198
|
+
paddingX: 16,
|
|
199
|
+
paddingBottom: 16,
|
|
200
|
+
children: o
|
|
201
|
+
})
|
|
202
|
+
})
|
|
203
|
+
})
|
|
204
|
+
})
|
|
205
|
+
]
|
|
206
|
+
}));
|
|
207
|
+
}), co = /*#__PURE__*/ c.forwardRef((_param, n)=>/* @__PURE__ */ {
|
|
208
|
+
var { dataAttributes: o } = _param, r = _object_without_properties(_param, [
|
|
209
|
+
"dataAttributes"
|
|
210
|
+
]);
|
|
211
|
+
return t(R, _object_spread_props(_object_spread({}, r), {
|
|
212
|
+
ref: n,
|
|
213
|
+
dataAttributes: _object_spread({
|
|
214
|
+
"component-name": "AccordionItem"
|
|
215
|
+
}, o)
|
|
216
|
+
}));
|
|
217
|
+
}), io = (param)=>{
|
|
218
|
+
let { children: o , dataAttributes: r , noLastDivider: n , index: d , defaultIndex: m , onChange: a , singleOpen: i } = param;
|
|
219
|
+
const [l, p] = B({
|
|
220
|
+
value: d,
|
|
221
|
+
defaultValue: m,
|
|
222
|
+
onChange: a,
|
|
223
|
+
singleOpen: i
|
|
224
|
+
}), f = c.Children.count(o) - 1, e = !n;
|
|
225
|
+
return /* @__PURE__ */ t(x.Provider, {
|
|
226
|
+
value: {
|
|
227
|
+
index: l,
|
|
228
|
+
toogle: p
|
|
229
|
+
},
|
|
230
|
+
children: /* @__PURE__ */ t("div", _object_spread_props(_object_spread({}, C(_object_spread_props(_object_spread({}, r), {
|
|
231
|
+
accordion: !0
|
|
232
|
+
}), "Accordion")), {
|
|
233
|
+
children: c.Children.toArray(o).filter(Boolean).map((s, u)=>/* @__PURE__ */ g(c.Fragment, {
|
|
234
|
+
children: [
|
|
235
|
+
s,
|
|
236
|
+
(u < f || e) && /* @__PURE__ */ t(h, {
|
|
237
|
+
paddingX: 16,
|
|
238
|
+
children: /* @__PURE__ */ t(V, {})
|
|
239
|
+
})
|
|
240
|
+
]
|
|
241
|
+
}, u))
|
|
242
|
+
}))
|
|
243
|
+
});
|
|
244
|
+
}, so = /*#__PURE__*/ c.forwardRef((_param, d)=>/* @__PURE__ */ {
|
|
245
|
+
var { dataAttributes: o , isInverse: r } = _param, n = _object_without_properties(_param, [
|
|
246
|
+
"dataAttributes",
|
|
247
|
+
"isInverse"
|
|
248
|
+
]);
|
|
249
|
+
return t(X, {
|
|
250
|
+
isInverse: r,
|
|
251
|
+
ref: d,
|
|
252
|
+
dataAttributes: _object_spread({
|
|
253
|
+
"component-name": "BoxedAccordionItem"
|
|
254
|
+
}, o),
|
|
255
|
+
children: /* @__PURE__ */ t(R, _object_spread({}, n))
|
|
256
|
+
});
|
|
257
|
+
}), ao = (param)=>{
|
|
258
|
+
let { children: o , dataAttributes: r , index: n , defaultIndex: d , onChange: m , singleOpen: a } = param;
|
|
259
|
+
const [i, l] = B({
|
|
260
|
+
value: n,
|
|
261
|
+
defaultValue: d,
|
|
262
|
+
onChange: m,
|
|
263
|
+
singleOpen: a
|
|
264
|
+
});
|
|
265
|
+
return /* @__PURE__ */ t(x.Provider, {
|
|
266
|
+
value: {
|
|
267
|
+
index: i,
|
|
268
|
+
toogle: l
|
|
269
|
+
},
|
|
270
|
+
children: /* @__PURE__ */ t(L, {
|
|
271
|
+
space: 16,
|
|
272
|
+
dataAttributes: _object_spread({
|
|
273
|
+
"component-name": "BoxedAccordion",
|
|
274
|
+
accordion: !0
|
|
275
|
+
}, r),
|
|
276
|
+
children: o
|
|
277
|
+
})
|
|
278
|
+
});
|
|
279
|
+
};
|
|
280
|
+
export { io as Accordion, co as AccordionItem, ao as BoxedAccordion, so as BoxedAccordionItem, z as useAccordionContext };
|
package/dist-es/boxed.js
CHANGED
|
@@ -50,42 +50,43 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import { jsx as
|
|
53
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
54
54
|
import * as i from "react";
|
|
55
|
-
import
|
|
56
|
-
import { useIsInverseVariant as
|
|
57
|
-
import { getPrefixedDataAttributes as
|
|
58
|
-
import { vars as
|
|
55
|
+
import g from "classnames";
|
|
56
|
+
import { useIsInverseVariant as B, ThemeVariant as k } from "./theme-variant-context.js";
|
|
57
|
+
import { getPrefixedDataAttributes as y } from "./utils/dom.js";
|
|
58
|
+
import { vars as o } from "./skins/skin-contract.css-mistica.js";
|
|
59
59
|
import { boxBorder as R } from "./boxed.css-mistica.js";
|
|
60
60
|
import { sprinkles as s } from "./sprinkles.css-mistica.js";
|
|
61
|
-
const h = (
|
|
61
|
+
const h = (e, r)=>e || r ? s({
|
|
62
62
|
border: "none"
|
|
63
|
-
}) : R, w = /*#__PURE__*/ i.forwardRef((param,
|
|
64
|
-
let { children:
|
|
65
|
-
const n =
|
|
66
|
-
return /* @__PURE__ */
|
|
67
|
-
ref:
|
|
63
|
+
}) : R, w = /*#__PURE__*/ i.forwardRef((param, v)=>{
|
|
64
|
+
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;
|
|
65
|
+
const n = B();
|
|
66
|
+
return /* @__PURE__ */ a("div", _object_spread_props(_object_spread({
|
|
67
|
+
ref: v,
|
|
68
68
|
style: {
|
|
69
69
|
width: c,
|
|
70
|
-
height:
|
|
71
|
-
minHeight:
|
|
70
|
+
height: p,
|
|
71
|
+
minHeight: u,
|
|
72
72
|
boxSizing: "border-box",
|
|
73
|
-
background:
|
|
73
|
+
background: t
|
|
74
74
|
},
|
|
75
|
-
className:
|
|
76
|
-
borderRadius:
|
|
75
|
+
className: g(l, h(n, r), s({
|
|
76
|
+
borderRadius: x,
|
|
77
77
|
overflow: "hidden",
|
|
78
|
-
background: (
|
|
78
|
+
background: (t !== null && t !== void 0 ? t : r) ? n ? o.colors.backgroundContainerBrandOverInverse : o.colors.backgroundContainerBrand : o.colors.backgroundContainer
|
|
79
79
|
})),
|
|
80
|
-
role:
|
|
81
|
-
"aria-label":
|
|
82
|
-
|
|
83
|
-
|
|
80
|
+
role: d,
|
|
81
|
+
"aria-label": b,
|
|
82
|
+
"aria-labelledby": f
|
|
83
|
+
}, y(m)), {
|
|
84
|
+
children: /* @__PURE__ */ a(k, {
|
|
84
85
|
isInverse: r,
|
|
85
|
-
children:
|
|
86
|
+
children: e
|
|
86
87
|
})
|
|
87
88
|
}));
|
|
88
|
-
}),
|
|
89
|
+
}), A = /*#__PURE__*/ i.forwardRef((e, r)=>/* @__PURE__ */ a(w, _object_spread_props(_object_spread({}, e), {
|
|
89
90
|
ref: r
|
|
90
91
|
})));
|
|
91
|
-
export {
|
|
92
|
+
export { A as Boxed, w as InternalBoxed };
|