@telefonica/mistica 14.4.1 → 14.6.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/avatar.d.ts +1 -0
- package/dist/avatar.js +20 -18
- package/dist/button.css-mistica.js +1 -1
- package/dist/button.css.d.ts +1 -1
- package/dist/card.d.ts +19 -0
- package/dist/card.js +268 -158
- package/dist/carousel.js +116 -115
- package/dist/highlighted-card.js +2 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -0
- package/dist/list.css-mistica.js +9 -8
- package/dist/list.css.d.ts +1 -0
- package/dist/list.d.ts +1 -0
- package/dist/list.js +126 -89
- package/dist/package-version.js +1 -1
- package/dist/progress-bar.css-mistica.js +5 -3
- package/dist/progress-bar.css.d.ts +2 -0
- package/dist/progress-bar.d.ts +1 -0
- package/dist/progress-bar.js +12 -6
- package/dist-es/avatar.js +28 -26
- package/dist-es/button.css-mistica.js +1 -1
- package/dist-es/card.js +322 -213
- package/dist-es/carousel.js +164 -163
- package/dist-es/highlighted-card.js +9 -7
- package/dist-es/index.js +1703 -1703
- package/dist-es/list.css-mistica.js +2 -2
- package/dist-es/list.js +191 -154
- package/dist-es/package-version.js +1 -1
- package/dist-es/progress-bar.css-mistica.js +2 -2
- package/dist-es/progress-bar.js +13 -12
- package/dist-es/style.css +1 -1
- package/package.json +2 -2
package/dist/carousel.js
CHANGED
|
@@ -9,12 +9,12 @@ function _export(target, all) {
|
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
Carousel: ()=>
|
|
13
|
-
CenteredCarousel: ()=>
|
|
14
|
-
IsInsideSlideshowProvider: ()=>
|
|
15
|
-
PageBullets: ()=>
|
|
16
|
-
Slideshow: ()=>
|
|
17
|
-
useIsInsideSlideshowContext: ()=>
|
|
12
|
+
Carousel: ()=>dt,
|
|
13
|
+
CenteredCarousel: ()=>ht,
|
|
14
|
+
IsInsideSlideshowProvider: ()=>Je,
|
|
15
|
+
PageBullets: ()=>ne,
|
|
16
|
+
Slideshow: ()=>pt,
|
|
17
|
+
useIsInsideSlideshowContext: ()=>mt
|
|
18
18
|
});
|
|
19
19
|
const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
|
|
20
20
|
const _iconChevronLeftRegularJs = /*#__PURE__*/ _interopRequireDefault(require("./generated/mistica-icons/icon-chevron-left-regular.js"));
|
|
@@ -130,14 +130,14 @@ function _objectSpreadProps(target, source) {
|
|
|
130
130
|
}
|
|
131
131
|
return target;
|
|
132
132
|
}
|
|
133
|
-
const
|
|
133
|
+
const le = (e, r)=>{
|
|
134
134
|
const t = (0, _documentVisibilityJs.useDocumentVisibility)();
|
|
135
135
|
return (0, _hooksJs.useIsInViewport)(r, !1) && t && !!e;
|
|
136
|
-
},
|
|
136
|
+
}, ne = (param)=>{
|
|
137
137
|
let { currentIndex: e , numPages: r , onPress: t } = param;
|
|
138
|
-
const o = (0, _themeVariantContextJs.useIsInverseVariant)(), { isDesktopOrBigger: u } = (0, _hooksJs.useScreenSize)(),
|
|
139
|
-
const
|
|
140
|
-
return o ?
|
|
138
|
+
const o = (0, _themeVariantContextJs.useIsInverseVariant)(), { isDesktopOrBigger: u } = (0, _hooksJs.useScreenSize)(), m = (P)=>{
|
|
139
|
+
const f = P === e;
|
|
140
|
+
return o ? f ? _carouselCssMisticaJs.bulletActiveInverse : _carouselCssMisticaJs.bulletInverse : f ? _carouselCssMisticaJs.bulletActive : _carouselCssMisticaJs.bullet;
|
|
141
141
|
};
|
|
142
142
|
return /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_inlineJs.default, {
|
|
143
143
|
space: u ? 16 : 8,
|
|
@@ -147,7 +147,7 @@ const oe = (e, r)=>{
|
|
|
147
147
|
},
|
|
148
148
|
children: Array.from({
|
|
149
149
|
length: r
|
|
150
|
-
}, (P,
|
|
150
|
+
}, (P, f)=>/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, {
|
|
151
151
|
className: (0, _sprinklesCssMisticaJs.sprinkles)({
|
|
152
152
|
display: "block",
|
|
153
153
|
padding: 0,
|
|
@@ -155,13 +155,13 @@ const oe = (e, r)=>{
|
|
|
155
155
|
background: "transparent"
|
|
156
156
|
}),
|
|
157
157
|
maybe: !0,
|
|
158
|
-
onPress: u && t ? ()=>t(
|
|
158
|
+
onPress: u && t ? ()=>t(f) : void 0,
|
|
159
159
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
160
|
-
className:
|
|
160
|
+
className: m(f)
|
|
161
161
|
})
|
|
162
|
-
},
|
|
162
|
+
}, f))
|
|
163
163
|
});
|
|
164
|
-
},
|
|
164
|
+
}, X = (e, r, t)=>t ? typeof t == "number" ? t : t[e] || r[e] : r[e], Ge = (e, r)=>{
|
|
165
165
|
const t = {
|
|
166
166
|
mobile: 1,
|
|
167
167
|
tablet: 2,
|
|
@@ -172,50 +172,50 @@ const oe = (e, r)=>{
|
|
|
172
172
|
}
|
|
173
173
|
};
|
|
174
174
|
if (!r) return _objectSpreadProps(_objectSpread({}, t), {
|
|
175
|
-
desktop:
|
|
175
|
+
desktop: X(e, t.desktop)
|
|
176
176
|
});
|
|
177
177
|
if (typeof r == "number") return {
|
|
178
178
|
mobile: r,
|
|
179
179
|
tablet: r,
|
|
180
180
|
desktop: r
|
|
181
181
|
};
|
|
182
|
-
const o =
|
|
182
|
+
const o = X(e, t.desktop, r.desktop);
|
|
183
183
|
return _objectSpreadProps(_objectSpread({}, t, r), {
|
|
184
184
|
desktop: o
|
|
185
185
|
});
|
|
186
|
-
},
|
|
186
|
+
}, Z = (e, r)=>{
|
|
187
187
|
if (e.length === 0) return [];
|
|
188
188
|
const t = Math.ceil(e.length / r), o = [];
|
|
189
189
|
for(let u = 0; u < e.length; u += t)o.push(e[u]);
|
|
190
190
|
return o[o.length - 1] = e[e.length - t], o;
|
|
191
|
-
},
|
|
191
|
+
}, He = (e, r)=>{
|
|
192
192
|
const t = [];
|
|
193
193
|
for(let o = 0; o < r.length; o++)o === 0 ? t.push(r[0]) : t.push((r[o] + r[o - 1]) / 2);
|
|
194
194
|
for(let o1 = t.length - 1; o1 >= 0; o1--)if (e - t[o1] >= -1) return o1;
|
|
195
195
|
return 0;
|
|
196
|
-
},
|
|
197
|
-
let { items: e , itemStyle: r , itemClassName: t , withBullets: o , renderBullets: u , initialActiveItem:
|
|
198
|
-
const { texts: E , platformOverrides: F } = (0, _hooksJs.useTheme)(),
|
|
196
|
+
}, ce = 5e3, ie = (param)=>{
|
|
197
|
+
let { items: e , itemStyle: r , itemClassName: t , withBullets: o , renderBullets: u , initialActiveItem: m , itemsPerPage: P , itemsToScroll: f , gap: d , free: B , centered: w , autoplay: x , onPageChange: k , dataAttributes: L } = param;
|
|
198
|
+
const { texts: E , platformOverrides: F } = (0, _hooksJs.useTheme)(), C = (0, _desktopContainerTypeContextJs.useDesktopContainerType)(), p = Ge(C || "large", P), { isDesktopOrBigger: n , isTablet: b } = (0, _hooksJs.useScreenSize)(), N = b ? p.tablet : p.mobile, g = Math.max(Math.floor(n ? p.desktop : N), 1), v = _react.useRef(null), I = Math.ceil(e.length / g), [{ scrollLeft: T , scrollRight: U }, ue] = _react.useState({
|
|
199
199
|
scrollLeft: 0,
|
|
200
200
|
scrollRight: 0
|
|
201
|
-
}), [q,
|
|
201
|
+
}), [q, fe] = _react.useState([]), y = _react.useMemo(()=>Z(q, I), [
|
|
202
202
|
q,
|
|
203
|
-
|
|
204
|
-
]), W =
|
|
203
|
+
I
|
|
204
|
+
]), W = f ? Z(q, Math.ceil(e.length / f)) : y, de = U !== 0, he = T !== 0;
|
|
205
205
|
(0, _hooksJs.useIsomorphicLayoutEffect)(()=>{
|
|
206
206
|
if (v.current) {
|
|
207
207
|
const l = v.current, i = ()=>{
|
|
208
|
-
const { scrollWidth:
|
|
209
|
-
|
|
210
|
-
scrollLeft:
|
|
208
|
+
const { scrollWidth: z , clientWidth: R } = l, O = Math.round(l.scrollLeft), j = Math.round(z - (O + R));
|
|
209
|
+
ue({
|
|
210
|
+
scrollLeft: O,
|
|
211
211
|
scrollRight: j
|
|
212
212
|
});
|
|
213
213
|
}, a = ()=>{
|
|
214
|
-
const
|
|
215
|
-
|
|
216
|
-
if (
|
|
217
|
-
const j =
|
|
218
|
-
return Math.min(
|
|
214
|
+
const z = l.scrollWidth - l.clientWidth;
|
|
215
|
+
fe(Array.from(l.querySelectorAll("[data-item]")).map((R, O)=>{
|
|
216
|
+
if (O === e.length - 1) return z;
|
|
217
|
+
const j = R.offsetLeft, pe = parseInt(getComputedStyle(R).scrollMargin), ge = w && !n ? j - R.clientWidth / 2 : j;
|
|
218
|
+
return Math.min(ge - pe - l.offsetLeft, z);
|
|
219
219
|
}));
|
|
220
220
|
};
|
|
221
221
|
i(), a(), l.addEventListener("scroll", i);
|
|
@@ -228,11 +228,11 @@ const oe = (e, r)=>{
|
|
|
228
228
|
}
|
|
229
229
|
return ()=>{};
|
|
230
230
|
}, [
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
231
|
+
p.desktop,
|
|
232
|
+
p.tablet,
|
|
233
|
+
p.mobile,
|
|
234
|
+
I,
|
|
235
|
+
d,
|
|
236
236
|
w,
|
|
237
237
|
n,
|
|
238
238
|
e.length
|
|
@@ -241,15 +241,15 @@ const oe = (e, r)=>{
|
|
|
241
241
|
let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
242
242
|
const a = v.current;
|
|
243
243
|
if (a) {
|
|
244
|
-
const h =
|
|
244
|
+
const h = y[l];
|
|
245
245
|
a.scrollTo({
|
|
246
246
|
left: h,
|
|
247
247
|
behavior: i ? "smooth" : "auto"
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
250
|
}, [
|
|
251
|
-
|
|
252
|
-
]),
|
|
251
|
+
y
|
|
252
|
+
]), me = _react.useCallback(()=>{
|
|
253
253
|
const l = v.current;
|
|
254
254
|
if (l) {
|
|
255
255
|
const { scrollLeft: i } = l, a = [
|
|
@@ -273,16 +273,16 @@ const oe = (e, r)=>{
|
|
|
273
273
|
}
|
|
274
274
|
}, [
|
|
275
275
|
W
|
|
276
|
-
]), H =
|
|
276
|
+
]), H = le(!!x, v);
|
|
277
277
|
_react.useEffect(()=>{
|
|
278
|
-
|
|
278
|
+
m !== void 0 && D(Math.floor(m / g), !1);
|
|
279
279
|
}, [
|
|
280
|
-
|
|
280
|
+
m,
|
|
281
281
|
D,
|
|
282
|
-
|
|
282
|
+
g
|
|
283
283
|
]), _react.useEffect(()=>{
|
|
284
284
|
if (H && x) {
|
|
285
|
-
const l = typeof x == "boolean" ?
|
|
285
|
+
const l = typeof x == "boolean" ? ce : x.time, i = typeof x == "object" && x.loop, a = setInterval(()=>{
|
|
286
286
|
var h;
|
|
287
287
|
U !== 0 ? Y() : i && ((h = v.current) == null || h.scrollTo({
|
|
288
288
|
left: 0,
|
|
@@ -297,39 +297,40 @@ const oe = (e, r)=>{
|
|
|
297
297
|
U,
|
|
298
298
|
H
|
|
299
299
|
]);
|
|
300
|
-
const
|
|
300
|
+
const S = He(T, y), J = _react.useRef(!m), K = _react.useRef(0);
|
|
301
301
|
_react.useEffect(()=>{
|
|
302
|
-
if (
|
|
303
|
-
const l = Math.min((
|
|
304
|
-
for(let a = 0; a <
|
|
302
|
+
if (k) {
|
|
303
|
+
const l = Math.min((S + 1) * g - 1, e.length - 1), i = [];
|
|
304
|
+
for(let a = 0; a < g; a++){
|
|
305
305
|
const h = l - a;
|
|
306
306
|
h >= 0 && i.unshift(h);
|
|
307
307
|
}
|
|
308
|
-
S({
|
|
309
|
-
pageIndex:
|
|
308
|
+
J.current ? K.current !== S && k({
|
|
309
|
+
pageIndex: S,
|
|
310
310
|
shownItemIndexes: i
|
|
311
|
-
});
|
|
311
|
+
}) : J.current = i.includes(m || 0), K.current = S;
|
|
312
312
|
}
|
|
313
313
|
}, [
|
|
314
|
-
|
|
314
|
+
S,
|
|
315
315
|
e.length,
|
|
316
|
-
|
|
317
|
-
|
|
316
|
+
g,
|
|
317
|
+
m,
|
|
318
|
+
k
|
|
318
319
|
]);
|
|
319
320
|
let V = null;
|
|
320
321
|
return u ? V = u({
|
|
321
|
-
numPages:
|
|
322
|
-
currentIndex:
|
|
322
|
+
numPages: I,
|
|
323
|
+
currentIndex: S,
|
|
323
324
|
onPress: D
|
|
324
|
-
}) : o && (V =
|
|
325
|
-
numPages:
|
|
326
|
-
currentIndex:
|
|
325
|
+
}) : o && (V = I > 1 && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(ne, {
|
|
326
|
+
numPages: I,
|
|
327
|
+
currentIndex: S,
|
|
327
328
|
onPress: D
|
|
328
329
|
})), /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)(_stackJs.default, {
|
|
329
330
|
space: 24,
|
|
330
331
|
dataAttributes: _objectSpread({
|
|
331
332
|
"component-name": "Carousel"
|
|
332
|
-
},
|
|
333
|
+
}, L),
|
|
333
334
|
children: [
|
|
334
335
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)("div", {
|
|
335
336
|
className: _carouselCssMisticaJs.carouselContainer,
|
|
@@ -339,22 +340,22 @@ const oe = (e, r)=>{
|
|
|
339
340
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, {
|
|
340
341
|
className: _carouselCssMisticaJs.carouselPrevArrowButton,
|
|
341
342
|
"aria-label": E.carouselPrevButton,
|
|
342
|
-
onPress:
|
|
343
|
-
disabled: !
|
|
343
|
+
onPress: me,
|
|
344
|
+
disabled: !he,
|
|
344
345
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_iconChevronLeftRegularJs.default, {})
|
|
345
346
|
})
|
|
346
347
|
}),
|
|
347
348
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
348
349
|
className: (0, _classnames.default)(_carouselCssMisticaJs.carousel, {
|
|
349
350
|
[_carouselCssMisticaJs.centeredCarousel]: w,
|
|
350
|
-
[_carouselCssMisticaJs.carouselWithScroll]:
|
|
351
|
+
[_carouselCssMisticaJs.carouselWithScroll]: I > 1
|
|
351
352
|
}),
|
|
352
353
|
style: _objectSpreadProps(_objectSpread({}, (0, _dynamic.assignInlineVars)(_objectSpread({
|
|
353
|
-
[_carouselCssMisticaJs.vars.itemsPerPageDesktop]: String(
|
|
354
|
-
[_carouselCssMisticaJs.vars.itemsPerPageTablet]: String(
|
|
355
|
-
[_carouselCssMisticaJs.vars.itemsPerPageMobile]: String(
|
|
356
|
-
},
|
|
357
|
-
[_carouselCssMisticaJs.vars.gap]: String(
|
|
354
|
+
[_carouselCssMisticaJs.vars.itemsPerPageDesktop]: String(p.desktop),
|
|
355
|
+
[_carouselCssMisticaJs.vars.itemsPerPageTablet]: String(p.tablet),
|
|
356
|
+
[_carouselCssMisticaJs.vars.itemsPerPageMobile]: String(p.mobile)
|
|
357
|
+
}, d !== void 0 ? {
|
|
358
|
+
[_carouselCssMisticaJs.vars.gap]: String(d)
|
|
358
359
|
} : {}))), {
|
|
359
360
|
scrollSnapType: B ? "initial" : "x mandatory"
|
|
360
361
|
}),
|
|
@@ -374,7 +375,7 @@ const oe = (e, r)=>{
|
|
|
374
375
|
className: _carouselCssMisticaJs.carouselNextArrowButton,
|
|
375
376
|
"aria-label": E.carouselNextButton,
|
|
376
377
|
onPress: Y,
|
|
377
|
-
disabled: !
|
|
378
|
+
disabled: !de,
|
|
378
379
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_iconChevronRightRegularJs.default, {})
|
|
379
380
|
})
|
|
380
381
|
})
|
|
@@ -386,9 +387,9 @@ const oe = (e, r)=>{
|
|
|
386
387
|
})
|
|
387
388
|
]
|
|
388
389
|
});
|
|
389
|
-
},
|
|
390
|
-
let { items: e , itemStyle: r , itemClassName: t , withBullets: o , renderBullets: u , initialActiveItem:
|
|
391
|
-
return (0, _jsxRuntimeJs.jsx)(
|
|
390
|
+
}, dt = (e)=>/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(ie, _objectSpread({}, e)), ht = (param)=>/* @__PURE__ */ {
|
|
391
|
+
let { items: e , itemStyle: r , itemClassName: t , withBullets: o , renderBullets: u , initialActiveItem: m , onPageChange: P , dataAttributes: f } = param;
|
|
392
|
+
return (0, _jsxRuntimeJs.jsx)(ie, {
|
|
392
393
|
items: e,
|
|
393
394
|
itemStyle: r,
|
|
394
395
|
itemClassName: t,
|
|
@@ -402,76 +403,76 @@ const oe = (e, r)=>{
|
|
|
402
403
|
gap: 0,
|
|
403
404
|
withBullets: o,
|
|
404
405
|
renderBullets: u,
|
|
405
|
-
initialActiveItem:
|
|
406
|
+
initialActiveItem: m,
|
|
406
407
|
onPageChange: P,
|
|
407
|
-
dataAttributes:
|
|
408
|
+
dataAttributes: f
|
|
408
409
|
});
|
|
409
|
-
},
|
|
410
|
+
}, ae = /*#__PURE__*/ _react.createContext(!1), mt = ()=>_react.useContext(ae), Je = (param)=>/* @__PURE__ */ {
|
|
410
411
|
let { children: e } = param;
|
|
411
|
-
return (0, _jsxRuntimeJs.jsx)(
|
|
412
|
+
return (0, _jsxRuntimeJs.jsx)(ae.Provider, {
|
|
412
413
|
value: !0,
|
|
413
414
|
children: e
|
|
414
415
|
});
|
|
415
|
-
},
|
|
416
|
-
let { items: e , withBullets: r , autoplay: t , onPageChange: o , dataAttributes: u , inverseBullets:
|
|
417
|
-
const { texts: P , platformOverrides:
|
|
416
|
+
}, pt = (param)=>{
|
|
417
|
+
let { items: e , withBullets: r , autoplay: t , onPageChange: o , dataAttributes: u , inverseBullets: m = !0 } = param;
|
|
418
|
+
const { texts: P , platformOverrides: f } = (0, _hooksJs.useTheme)(), d = _react.useRef(null), [{ scrollLeft: B , scrollRight: w }, x] = _react.useState({
|
|
418
419
|
scrollLeft: 0,
|
|
419
420
|
scrollRight: 0
|
|
420
|
-
}),
|
|
421
|
-
const n =
|
|
421
|
+
}), k = _react.useCallback(()=>{
|
|
422
|
+
const n = d.current;
|
|
422
423
|
n && n.scrollBy({
|
|
423
424
|
left: -n.clientWidth,
|
|
424
425
|
behavior: "smooth"
|
|
425
426
|
});
|
|
426
|
-
}, []),
|
|
427
|
-
const n =
|
|
427
|
+
}, []), L = _react.useCallback(()=>{
|
|
428
|
+
const n = d.current;
|
|
428
429
|
n && n.scrollBy({
|
|
429
430
|
left: n.clientWidth,
|
|
430
431
|
behavior: "smooth"
|
|
431
432
|
});
|
|
432
|
-
}, []), E = w !== 0, F = B !== 0,
|
|
433
|
+
}, []), E = w !== 0, F = B !== 0, C = d.current ? Math.floor((B + d.current.clientWidth / 2) / d.current.clientWidth) : 0;
|
|
433
434
|
_react.useLayoutEffect(()=>{
|
|
434
|
-
const n =
|
|
435
|
+
const n = d.current;
|
|
435
436
|
if (n) {
|
|
436
|
-
const
|
|
437
|
-
const { scrollWidth:
|
|
437
|
+
const b = ()=>{
|
|
438
|
+
const { scrollWidth: g , clientWidth: v } = n, I = Math.round(n.scrollLeft), T = Math.round(g - (I + v));
|
|
438
439
|
x({
|
|
439
|
-
scrollLeft:
|
|
440
|
-
scrollRight:
|
|
440
|
+
scrollLeft: I,
|
|
441
|
+
scrollRight: T
|
|
441
442
|
});
|
|
442
443
|
};
|
|
443
|
-
|
|
444
|
-
const
|
|
444
|
+
b(), n.addEventListener("scroll", b);
|
|
445
|
+
const N = (0, _domJs.listenResize)(n, b);
|
|
445
446
|
return ()=>{
|
|
446
|
-
n.removeEventListener("scroll",
|
|
447
|
+
n.removeEventListener("scroll", b), N();
|
|
447
448
|
};
|
|
448
449
|
}
|
|
449
450
|
}, [
|
|
450
451
|
e.length
|
|
451
452
|
]);
|
|
452
|
-
const
|
|
453
|
+
const p = le(!!t, d);
|
|
453
454
|
return _react.useEffect(()=>{
|
|
454
|
-
if (
|
|
455
|
-
const n = typeof t == "boolean" ?
|
|
456
|
-
var
|
|
457
|
-
w !== 0 ?
|
|
455
|
+
if (p && t) {
|
|
456
|
+
const n = typeof t == "boolean" ? ce : t.time, b = typeof t == "object" && t.loop, N = setInterval(()=>{
|
|
457
|
+
var g;
|
|
458
|
+
w !== 0 ? L() : b && ((g = d.current) == null || g.scrollTo({
|
|
458
459
|
left: 0,
|
|
459
460
|
behavior: "smooth"
|
|
460
461
|
}));
|
|
461
462
|
}, n);
|
|
462
|
-
return ()=>clearInterval(
|
|
463
|
+
return ()=>clearInterval(N);
|
|
463
464
|
}
|
|
464
465
|
}, [
|
|
465
466
|
t,
|
|
466
|
-
|
|
467
|
+
L,
|
|
467
468
|
w,
|
|
468
|
-
|
|
469
|
+
p
|
|
469
470
|
]), _react.useEffect(()=>{
|
|
470
|
-
o && o(
|
|
471
|
+
o && o(C);
|
|
471
472
|
}, [
|
|
472
|
-
|
|
473
|
+
C,
|
|
473
474
|
o
|
|
474
|
-
]), /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(
|
|
475
|
+
]), /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(Je, {
|
|
475
476
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsxs)("div", _objectSpreadProps(_objectSpread({
|
|
476
477
|
className: _carouselCssMisticaJs.slideshowContainer
|
|
477
478
|
}, (0, _domJs.getPrefixedDataAttributes)(u, "SlideShow")), {
|
|
@@ -481,7 +482,7 @@ const oe = (e, r)=>{
|
|
|
481
482
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, {
|
|
482
483
|
className: _carouselCssMisticaJs.slideshowPrevArrowButton,
|
|
483
484
|
"aria-label": P.carouselPrevButton,
|
|
484
|
-
onPress:
|
|
485
|
+
onPress: k,
|
|
485
486
|
disabled: !F,
|
|
486
487
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_iconChevronLeftRegularJs.default, {})
|
|
487
488
|
})
|
|
@@ -490,14 +491,14 @@ const oe = (e, r)=>{
|
|
|
490
491
|
value: !1,
|
|
491
492
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
492
493
|
className: _carouselCssMisticaJs.slideshow,
|
|
493
|
-
ref:
|
|
494
|
-
children: e.map((n,
|
|
494
|
+
ref: d,
|
|
495
|
+
children: e.map((n, b)=>/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
495
496
|
className: _carouselCssMisticaJs.slideshowItem,
|
|
496
497
|
style: {
|
|
497
|
-
scrollSnapStop: (0, _platformJs.isAndroid)(
|
|
498
|
+
scrollSnapStop: (0, _platformJs.isAndroid)(f) ? "always" : "normal"
|
|
498
499
|
},
|
|
499
500
|
children: n
|
|
500
|
-
},
|
|
501
|
+
}, b))
|
|
501
502
|
})
|
|
502
503
|
}),
|
|
503
504
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_themeVariantContextJs.ThemeVariant, {
|
|
@@ -505,18 +506,18 @@ const oe = (e, r)=>{
|
|
|
505
506
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_touchableJs.BaseTouchable, {
|
|
506
507
|
className: _carouselCssMisticaJs.slideshowNextArrowButton,
|
|
507
508
|
"aria-label": P.carouselNextButton,
|
|
508
|
-
onPress:
|
|
509
|
+
onPress: L,
|
|
509
510
|
disabled: !E,
|
|
510
511
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_iconChevronRightRegularJs.default, {})
|
|
511
512
|
})
|
|
512
513
|
}),
|
|
513
514
|
r && e.length > 1 && /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_themeVariantContextJs.ThemeVariant, {
|
|
514
|
-
isInverse:
|
|
515
|
+
isInverse: m,
|
|
515
516
|
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)("div", {
|
|
516
517
|
className: _carouselCssMisticaJs.slideshowBullets,
|
|
517
|
-
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(
|
|
518
|
+
children: /* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(ne, {
|
|
518
519
|
numPages: e.length,
|
|
519
|
-
currentIndex:
|
|
520
|
+
currentIndex: C
|
|
520
521
|
})
|
|
521
522
|
})
|
|
522
523
|
})
|
package/dist/highlighted-card.js
CHANGED
|
@@ -164,6 +164,7 @@ const S = /*#__PURE__*/ _react.forwardRef((e, i)=>{
|
|
|
164
164
|
truncate: e.titleLinesMax,
|
|
165
165
|
weight: b.cardTitle.weight,
|
|
166
166
|
as: "h3",
|
|
167
|
+
hyphens: "auto",
|
|
167
168
|
children: a
|
|
168
169
|
}),
|
|
169
170
|
/* @__PURE__ */ (0, _jsxRuntimeJs.jsx)(_boxJs.default, {
|
|
@@ -173,6 +174,7 @@ const S = /*#__PURE__*/ _react.forwardRef((e, i)=>{
|
|
|
173
174
|
color: _skinContractCssMisticaJs.vars.colors.textSecondary,
|
|
174
175
|
truncate: e.descriptionLinesMax,
|
|
175
176
|
as: "p",
|
|
177
|
+
hyphens: "auto",
|
|
176
178
|
children: r
|
|
177
179
|
})
|
|
178
180
|
}),
|
package/dist/index.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export { default as Inline } from './inline';
|
|
|
50
50
|
export { default as HighlightedCard } from './highlighted-card';
|
|
51
51
|
export { default as Stepper } from './stepper';
|
|
52
52
|
export { default as ProgressBar } from './progress-bar';
|
|
53
|
-
export { MediaCard, DataCard, SnapCard, DisplayDataCard, DisplayMediaCard } from './card';
|
|
53
|
+
export { MediaCard, DataCard, SnapCard, DisplayDataCard, DisplayMediaCard, PosterCard } from './card';
|
|
54
54
|
export { default as Hero } from './hero';
|
|
55
55
|
export { default as Divider } from './divider';
|
|
56
56
|
export { default as Menu } from './menu';
|
package/dist/index.js
CHANGED
|
@@ -1739,6 +1739,7 @@ _export(exports, {
|
|
|
1739
1739
|
Placeholder: ()=>_placeholderJs.Placeholder,
|
|
1740
1740
|
Popover: ()=>_popoverJs.default,
|
|
1741
1741
|
Portal: ()=>_portalJs.Portal,
|
|
1742
|
+
PosterCard: ()=>_cardJs.PosterCard,
|
|
1742
1743
|
ProgressBar: ()=>_progressBarJs.default,
|
|
1743
1744
|
RadioButton: ()=>_radioButtonJs.default,
|
|
1744
1745
|
RadioGroup: ()=>_radioButtonJs.RadioGroup,
|
package/dist/list.css-mistica.js
CHANGED
|
@@ -15,14 +15,15 @@ _export(exports, {
|
|
|
15
15
|
content: ()=>r,
|
|
16
16
|
disabled: ()=>a,
|
|
17
17
|
dualActionContainer: ()=>i,
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
18
|
+
dualActionDivider: ()=>t,
|
|
19
|
+
dualActionLeft: ()=>o,
|
|
20
|
+
dualActionRight: ()=>g,
|
|
21
|
+
hoverBackground: ()=>e,
|
|
22
|
+
pointer: ()=>b,
|
|
23
|
+
right: ()=>c,
|
|
24
|
+
rowBody: ()=>d,
|
|
25
|
+
rowContent: ()=>u
|
|
25
26
|
});
|
|
26
27
|
require("./sprinkles.css.ts.vanilla.js");
|
|
27
28
|
require("./list.css.ts.vanilla.js");
|
|
28
|
-
var _ = "_1y2v1nf5i _1y2v1nf60 _1y2v1nf62", f = "_1y2v1nf5r _1y2v1nf8q _1y2v1nf85 _1y2v1nf60", y = "_1y2v1nf5i _1y2v1nf5x", r = "_1y2v1nf5i _1y2v1nf7p _1y2v1nf9b", a = "_2buj9g0", i = "_1y2v1nf5i _1y2v1nf5n", t = "_1y2v1nf65 _1y2v1nf6j _1y2v1nf6x _1y2v1nf7b _1y2v1nf5k _1y2v1nf9g _1y2v1nf5c _1y2v1nf72 _1y2v1nf7g _1y2v1nf63",
|
|
29
|
+
var _ = "_1y2v1nf5i _1y2v1nf60 _1y2v1nf62", f = "_1y2v1nf5r _1y2v1nf8q _1y2v1nf85 _1y2v1nf60", y = "_1y2v1nf5i _1y2v1nf5x", r = "_1y2v1nf5i _1y2v1nf7p _1y2v1nf9b", a = "_2buj9g0", i = "_1y2v1nf5i _1y2v1nf5n", t = "_2buj9gi _1y2v1nf5i", o = "_1y2v1nf65 _1y2v1nf6j _1y2v1nf6x _1y2v1nf7b _1y2v1nf5k _1y2v1nf9g _1y2v1nf5c _1y2v1nf72 _1y2v1nf7g _1y2v1nf63", g = "_2buj9gk _1y2v1nf65 _1y2v1nf6j _1y2v1nf6x _1y2v1nf7b _1y2v1nf5k _1y2v1nf9g _1y2v1nf5c _1y2v1nf72 _1y2v1nf7g _1y2v1nf5i _1y2v1nf5x _1y2v1nf62 _1y2v1nf7q", e = "_2buj9g1", b = "_1y2v1nf9n", c = "_2buj9gb", d = "_1y2v1nf5i _1y2v1nf5o _1y2v1nf64", u = "_1y2v1nf65 _1y2v1nf6j _1y2v1nf6x _1y2v1nf7b _1y2v1nf7p _1y2v1nf9g _1y2v1nf5c";
|
package/dist/list.css.d.ts
CHANGED
|
@@ -12,4 +12,5 @@ export declare const right: string;
|
|
|
12
12
|
export declare const centeredControl: string;
|
|
13
13
|
export declare const dualActionContainer: string;
|
|
14
14
|
export declare const dualActionLeft: string;
|
|
15
|
+
export declare const dualActionDivider: string;
|
|
15
16
|
export declare const dualActionRight: string;
|
package/dist/list.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ interface CheckboxRowContentProps extends CommonProps {
|
|
|
40
40
|
checkbox: ControlProps | undefined;
|
|
41
41
|
}
|
|
42
42
|
interface RadioRowContentProps extends CommonProps {
|
|
43
|
+
onPress?: () => void;
|
|
43
44
|
radioValue: string;
|
|
44
45
|
}
|
|
45
46
|
interface HrefRowContentProps extends CommonProps {
|