@telefonica/mistica 15.9.0 → 15.11.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/boxed.css-mistica.js +35 -2
- package/dist/boxed.css.d.ts +29 -0
- package/dist/boxed.d.ts +6 -4
- package/dist/boxed.js +30 -24
- package/dist/button-group.css-mistica.js +14 -5
- package/dist/button-group.css.d.ts +3 -0
- package/dist/button-group.d.ts +2 -1
- package/dist/button-group.js +29 -16
- package/dist/button-layout.css-mistica.js +7 -7
- package/dist/button-layout.css.d.ts +1 -1
- package/dist/button-layout.js +9 -9
- package/dist/button.d.ts +4 -24
- package/dist/button.js +6 -4
- package/dist/card.d.ts +8 -1
- package/dist/card.js +567 -501
- package/dist/carousel.css-mistica.js +19 -16
- package/dist/carousel.css.d.ts +1 -0
- package/dist/carousel.js +41 -39
- package/dist/chip.js +37 -44
- package/dist/circle.d.ts +11 -4
- package/dist/circle.js +10 -11
- package/dist/community/advanced-data-card.css-mistica.js +24 -21
- package/dist/community/advanced-data-card.css.d.ts +1 -0
- package/dist/community/advanced-data-card.d.ts +1 -0
- package/dist/community/advanced-data-card.js +20 -17
- package/dist/counter.js +26 -22
- package/dist/cover-hero-media.d.ts +12 -0
- package/dist/cover-hero-media.js +44 -0
- package/dist/cover-hero.css-mistica.js +56 -0
- package/dist/cover-hero.css.d.ts +14 -0
- package/dist/cover-hero.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/cover-hero.d.ts +38 -0
- package/dist/cover-hero.js +296 -0
- package/dist/empty-state.js +6 -6
- package/dist/grid-layout.css-mistica.js +11 -8
- package/dist/grid-layout.css.d.ts +1 -0
- package/dist/grid-layout.d.ts +12 -22
- package/dist/grid-layout.js +63 -49
- package/dist/header.js +18 -18
- package/dist/highlighted-card.d.ts +1 -0
- package/dist/highlighted-card.js +22 -18
- package/dist/icon-button.d.ts +7 -6
- package/dist/image.js +69 -48
- package/dist/index.d.ts +4 -1
- package/dist/index.js +15 -0
- package/dist/list.d.ts +1 -0
- package/dist/navigation-bar.d.ts +1 -1
- package/dist/navigation-bar.js +1 -1
- package/dist/package-version.js +1 -1
- package/dist/select.js +16 -12
- package/dist/skins/movistar.d.ts +13 -0
- package/dist/skins/movistar.js +112 -99
- package/dist/spinner.js +19 -18
- package/dist/table.css-mistica.js +58 -0
- package/dist/table.css.d.ts +13 -0
- package/dist/table.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/table.d.ts +39 -0
- package/dist/table.js +269 -0
- package/dist/text.d.ts +1 -1
- package/dist/theme.d.ts +20 -0
- package/dist/theme.js +80 -20
- package/dist/timer.css-mistica.js +39 -0
- package/dist/timer.css.d.ts +8 -0
- package/dist/timer.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/timer.d.ts +27 -0
- package/dist/timer.js +370 -0
- package/dist/tooltip.js +13 -13
- package/dist/touchable.d.ts +2 -0
- package/dist/touchable.js +35 -31
- package/dist/utils/helpers.js +32 -32
- package/dist-es/boxed.css-mistica.js +29 -2
- package/dist-es/boxed.js +37 -31
- package/dist-es/button-group.css-mistica.js +2 -2
- package/dist-es/button-group.js +37 -24
- package/dist-es/button-layout.css-mistica.js +2 -2
- package/dist-es/button-layout.js +16 -16
- package/dist-es/button.js +24 -22
- package/dist-es/card.js +681 -618
- package/dist-es/carousel.css-mistica.js +7 -7
- package/dist-es/carousel.js +75 -73
- package/dist-es/chip.js +57 -64
- package/dist-es/circle.js +15 -16
- package/dist-es/community/advanced-data-card.css-mistica.js +4 -4
- package/dist-es/community/advanced-data-card.js +59 -56
- package/dist-es/counter.js +62 -58
- package/dist-es/cover-hero-media.js +30 -0
- package/dist-es/cover-hero.css-mistica.js +9 -0
- package/dist-es/cover-hero.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/cover-hero.js +241 -0
- package/dist-es/empty-state.js +13 -13
- package/dist-es/grid-layout.css-mistica.js +3 -3
- package/dist-es/grid-layout.js +80 -66
- package/dist-es/header.js +37 -37
- package/dist-es/highlighted-card.js +35 -31
- package/dist-es/image.js +88 -67
- package/dist-es/index.js +1817 -1814
- package/dist-es/navigation-bar.js +1 -1
- package/dist-es/package-version.js +1 -1
- package/dist-es/select.js +23 -18
- package/dist-es/skins/movistar.js +112 -99
- package/dist-es/spinner.js +38 -37
- package/dist-es/style.css +1 -1
- package/dist-es/table.css-mistica.js +14 -0
- package/dist-es/table.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/table.js +214 -0
- package/dist-es/theme.js +77 -17
- package/dist-es/timer.css-mistica.js +4 -0
- package/dist-es/timer.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/timer.js +307 -0
- package/dist-es/tooltip.js +16 -16
- package/dist-es/touchable.js +47 -43
- package/dist-es/utils/helpers.js +31 -31
- package/package.json +1 -1
|
@@ -2,11 +2,11 @@ import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
|
2
2
|
import "./responsive-layout.css.ts.vanilla.css-mistica.js";
|
|
3
3
|
import "./grid-layout.css.ts.vanilla.css-mistica.js";
|
|
4
4
|
import "./carousel.css.ts.vanilla.css-mistica.js";
|
|
5
|
-
var
|
|
6
|
-
itemsPerPageMobile: "var(--
|
|
7
|
-
itemsPerPageTablet: "var(--
|
|
8
|
-
itemsPerPageDesktop: "var(--
|
|
9
|
-
gap: "var(--
|
|
10
|
-
mobilePageOffset: "var(--
|
|
5
|
+
var f = "_1abcu71 _1y2v1nfic _1y2v1nfis _1y2v1nfk3 _1y2v1nf4y", y = "_1abcu72 _1abcu71 _1y2v1nfic _1y2v1nfis _1y2v1nfk3 _1y2v1nf4z", u = "_1abcu72 _1abcu71 _1y2v1nfic _1y2v1nfis _1y2v1nfk3 _1y2v1nf5i", e = "_1abcu74 _1y2v1nf7d _1y2v1nf8m _1y2v1nfaa _1y2v1nfb4 _1y2v1nfhm _1y2v1nfk2 _1y2v1nf7c", b = "_1abcu78 _1abcu75 _1abcu74 _1y2v1nf7d _1y2v1nf8m _1y2v1nfaa _1y2v1nfb4 _1y2v1nfhm _1y2v1nfk2 _1y2v1nf7c", r = "_1abcu76 _1abcu75 _1abcu74 _1y2v1nf7d _1y2v1nf8m _1y2v1nfaa _1y2v1nfb4 _1y2v1nfhm _1y2v1nfk2 _1y2v1nf7c", c = "_1abcu77 _1abcu75 _1abcu74 _1y2v1nf7d _1y2v1nf8m _1y2v1nfaa _1y2v1nfb4 _1y2v1nfhm _1y2v1nfk2 _1y2v1nf7c", l = "_1abcu7b _1abcu71 _1y2v1nfic _1y2v1nfis _1y2v1nfk3", t = "_1abcu7u _1abcu7j _1y2v1nfhk _1y2v1nfj4", o = "_1abcu714 _1y2v1nfhk _1y2v1nfht _1y2v1nf7y", i = "_1y2v1nfhd _1y2v1nfjh _1y2v1nfhe", s = "_1abcu7y", h = "_1abcu712 _1abcu710 _1abcu7l _1y2v1nfhk _1y2v1nfhz _1y2v1nfht _1y2v1nfk3 _1y2v1nf3q _1y2v1nfii _1y2v1nfiy _1y2v1nfk1 _1y2v1nfhf", k = "_1abcu711 _1abcu710 _1abcu7l _1y2v1nfhk _1y2v1nfhz _1y2v1nfht _1y2v1nfk3 _1y2v1nf3q _1y2v1nfii _1y2v1nfiy _1y2v1nfk1 _1y2v1nfhf", m = "_1abcu7v", d = "_1abcu7w", B = "_1abcu7x", w = "_1abcu715", p = "_1abcu717", P = "_1abcu716", A = "_1abcu719 _1abcu7j _1y2v1nfhk _1y2v1nfj4", C = "_1abcu71h _1y2v1nfhf _1y2v1nfm7 _1y2v1nfhk _1y2v1nfht _1y2v1nfi7", g = "_1abcu7h _1y2v1nfhe", j = "_1abcu71b _1y2v1nfi7 _1y2v1nfi2", q = "_1abcu71f _1abcu710 _1abcu7l _1y2v1nfhk _1y2v1nfhz _1y2v1nfht _1y2v1nfk3 _1y2v1nf3q _1y2v1nfii _1y2v1nfiy _1y2v1nfk1 _1y2v1nfhf _1y2v1nfls", z = "_1abcu71d _1abcu710 _1abcu7l _1y2v1nfhk _1y2v1nfhz _1y2v1nfht _1y2v1nfk3 _1y2v1nf3q _1y2v1nfii _1y2v1nfiy _1y2v1nfk1 _1y2v1nfhf _1y2v1nfld", x = "_1abcu7i", I = {
|
|
6
|
+
itemsPerPageMobile: "var(--_1abcu7o)",
|
|
7
|
+
itemsPerPageTablet: "var(--_1abcu7p)",
|
|
8
|
+
itemsPerPageDesktop: "var(--_1abcu7q)",
|
|
9
|
+
gap: "var(--_1abcu7r)",
|
|
10
|
+
mobilePageOffset: "var(--_1abcu7s)"
|
|
11
11
|
};
|
|
12
|
-
export {
|
|
12
|
+
export { f as bullet, y as bulletActive, u as bulletActiveInverse, e as bulletButton, b as bulletButtonDesktop, r as bulletButtonMobile, c as bulletButtonTablet, l as bulletInverse, t as carousel, o as carouselBullets, i as carouselContainer, s as carouselItem, h as carouselNextArrowButton, k as carouselPrevArrowButton, m as carouselWithScrollMobile, d as carouselWithScrollTablet, B as centeredCarousel, w as noCarouselBulletsDesktop, p as noCarouselBulletsMobile, P as noCarouselBulletsTablet, A as slideshow, C as slideshowBullets, g as slideshowContainer, j as slideshowItem, q as slideshowNextArrowButton, z as slideshowPrevArrowButton, x as slideshowWithBullets, I as vars };
|
package/dist-es/carousel.js
CHANGED
|
@@ -58,18 +58,18 @@ import ue from "./generated/mistica-icons/icon-chevron-left-regular.js";
|
|
|
58
58
|
import fe from "./generated/mistica-icons/icon-chevron-right-regular.js";
|
|
59
59
|
import { useScreenSize as de, useTheme as he, useIsInViewport as Ge } from "./hooks.js";
|
|
60
60
|
import Oe from "./inline.js";
|
|
61
|
-
import { BaseTouchable as
|
|
62
|
-
import
|
|
63
|
-
import { useIsInverseVariant as Ve, ThemeVariant as
|
|
61
|
+
import { BaseTouchable as j } from "./touchable.js";
|
|
62
|
+
import z from "classnames";
|
|
63
|
+
import { useIsInverseVariant as Ve, ThemeVariant as _ } from "./theme-variant-context.js";
|
|
64
64
|
import { listenResize as me, getPrefixedDataAttributes as pe } from "./utils/dom.js";
|
|
65
65
|
import { isAndroid as be, isIos as ze, isRunningAcceptanceTest as _e } from "./utils/platform.js";
|
|
66
66
|
import { useDocumentVisibility as je } from "./utils/document-visibility.js";
|
|
67
|
-
import { bulletButton as Fe, bulletButtonMobile as Ke, bulletButtonTablet as Ue, bulletButtonDesktop as Ye, slideshowContainer as qe,
|
|
68
|
-
import { vars as
|
|
69
|
-
import { useDesktopContainerType as
|
|
70
|
-
import { VIVO_NEW_SKIN as
|
|
67
|
+
import { bulletButton as Fe, bulletButtonMobile as Ke, bulletButtonTablet as Ue, bulletButtonDesktop as Ye, slideshowContainer as qe, slideshowWithBullets as Ze, slideshowPrevArrowButton as $e, slideshow as He, slideshowItem as Je, slideshowNextArrowButton as Qe, slideshowBullets as Xe, bulletActiveInverse as et, bulletInverse as tt, bulletActive as ot, bullet as st, carouselContainer as rt, carouselPrevArrowButton as lt, carousel as nt, centeredCarousel as ct, carouselWithScrollMobile as at, carouselWithScrollTablet as it, vars as T, carouselItem as ut, carouselNextArrowButton as ft, carouselBullets as dt, noCarouselBulletsDesktop as ht, noCarouselBulletsTablet as mt, noCarouselBulletsMobile as pt } from "./carousel.css-mistica.js";
|
|
68
|
+
import { vars as bt } from "./image.css-mistica.js";
|
|
69
|
+
import { useDesktopContainerType as gt } from "./desktop-container-type-context.js";
|
|
70
|
+
import { VIVO_NEW_SKIN as vt } from "./skins/constants.js";
|
|
71
71
|
import { applyCssVars as ge } from "./utils/css.js";
|
|
72
|
-
import { ResetResponsiveLayout as
|
|
72
|
+
import { ResetResponsiveLayout as xt } from "./responsive-layout.js";
|
|
73
73
|
const ve = (t, e)=>{
|
|
74
74
|
const s = je();
|
|
75
75
|
return Ge(e, !1) && s && !!t;
|
|
@@ -78,7 +78,7 @@ const ve = (t, e)=>{
|
|
|
78
78
|
var _e_tablet;
|
|
79
79
|
const r = Ve(), { isDesktopOrBigger: d } = de(), h = (i)=>{
|
|
80
80
|
const u = i === t;
|
|
81
|
-
return r ? u ?
|
|
81
|
+
return r ? u ? et : tt : u ? ot : st;
|
|
82
82
|
}, w = typeof e == "number" ? e : Math.max(e.mobile, (_e_tablet = e.tablet) !== null && _e_tablet !== void 0 ? _e_tablet : e.mobile, e.desktop);
|
|
83
83
|
return /* @__PURE__ */ n(Oe, {
|
|
84
84
|
space: 0,
|
|
@@ -90,8 +90,8 @@ const ve = (t, e)=>{
|
|
|
90
90
|
length: w
|
|
91
91
|
}, (i, u)=>/* @__PURE__ */ {
|
|
92
92
|
var _e_tablet;
|
|
93
|
-
return n(
|
|
94
|
-
className:
|
|
93
|
+
return n(j, {
|
|
94
|
+
className: z(typeof e == "number" ? Fe : {
|
|
95
95
|
[Ke]: u < e.mobile,
|
|
96
96
|
[Ue]: u < ((_e_tablet = e.tablet) !== null && _e_tablet !== void 0 ? _e_tablet : e.mobile),
|
|
97
97
|
[Ye]: u < e.desktop
|
|
@@ -117,7 +117,7 @@ const ve = (t, e)=>{
|
|
|
117
117
|
goNext: Pe,
|
|
118
118
|
goToPage: we,
|
|
119
119
|
bulletsProps: Ie
|
|
120
|
-
}), re = /*#__PURE__*/ o.createContext(null),
|
|
120
|
+
}), re = /*#__PURE__*/ o.createContext(null), zt = (param)=>{
|
|
121
121
|
let { children: t } = param;
|
|
122
122
|
const [e, s] = o.useState(Ie), r = o.useRef(Ce), d = o.useRef(Pe), h = o.useRef(we), w = o.useMemo(()=>({
|
|
123
123
|
goPrev: ()=>{
|
|
@@ -152,7 +152,7 @@ const ve = (t, e)=>{
|
|
|
152
152
|
children: t
|
|
153
153
|
})
|
|
154
154
|
});
|
|
155
|
-
},
|
|
155
|
+
}, _t = ()=>o.useContext(se), jt = se.Consumer, ae = (t, e, s)=>s ? typeof s == "number" ? s : s[t] || e[t] : e[t], Ct = (t, e)=>{
|
|
156
156
|
const s = {
|
|
157
157
|
mobile: 1,
|
|
158
158
|
tablet: 2,
|
|
@@ -179,34 +179,34 @@ const ve = (t, e)=>{
|
|
|
179
179
|
const s = Math.ceil(t.length / e), r = [];
|
|
180
180
|
for(let d = 0; d < t.length; d += s)r.push(t[d]);
|
|
181
181
|
return r[r.length - 1] = t[t.length - s], r;
|
|
182
|
-
},
|
|
182
|
+
}, Pt = (t, e)=>{
|
|
183
183
|
const s = [];
|
|
184
184
|
for(let r = 0; r < e.length; r++)r === 0 ? s.push(e[0]) : s.push((e[r] + e[r - 1]) / 2);
|
|
185
185
|
for(let r = s.length - 1; r >= 0; r--)if (t - s[r] >= -1) return r;
|
|
186
186
|
return 0;
|
|
187
187
|
}, ke = 5e3, Me = (param)=>{
|
|
188
188
|
let { items: t, itemStyle: e, itemClassName: s, withBullets: r, renderBullets: d, initialActiveItem: h, itemsPerPage: w, itemsToScroll: i, mobilePageOffset: u, gap: C, free: b, centered: N, autoplay: x, onPageChange: y, dataAttributes: W } = param;
|
|
189
|
-
const { texts: I, platformOverrides: S, skinName: H } = he(), J =
|
|
189
|
+
const { texts: I, platformOverrides: S, skinName: H } = he(), J = gt(), a = Ct(J || "large", w), { isDesktopOrBigger: R, isTablet: A } = de(), F = A ? a.tablet : a.mobile, P = Math.max(Math.floor(R ? a.desktop : F), 1), l = o.useRef(null), m = Math.ceil(t.length / Math.max(Math.floor(a.mobile), 1)), v = Math.ceil(t.length / Math.max(Math.floor(a.tablet), 1)), k = Math.ceil(t.length / Math.max(Math.floor(a.desktop), 1)), E = Math.ceil(t.length / P), [{ scrollLeft: D, scrollRight: G }, Re] = o.useState({
|
|
190
190
|
scrollLeft: 0,
|
|
191
191
|
scrollRight: 0
|
|
192
|
-
}), [Q, Ee] = o.useState([]),
|
|
192
|
+
}), [Q, Ee] = o.useState([]), K = o.useMemo(()=>ie(Q, E), [
|
|
193
193
|
Q,
|
|
194
194
|
E
|
|
195
|
-
]),
|
|
195
|
+
]), U = i ? ie(Q, Math.ceil(t.length / i)) : K, Be = G !== 0, Le = D !== 0;
|
|
196
196
|
o.useEffect(()=>{
|
|
197
197
|
if (l.current) {
|
|
198
198
|
const c = l.current, f = ()=>{
|
|
199
|
-
const { scrollWidth:
|
|
199
|
+
const { scrollWidth: q, clientWidth: V } = c, Z = Math.round(c.scrollLeft), $ = Math.round(q - (Z + V));
|
|
200
200
|
Re({
|
|
201
|
-
scrollLeft:
|
|
202
|
-
scrollRight:
|
|
201
|
+
scrollLeft: Z,
|
|
202
|
+
scrollRight: $
|
|
203
203
|
});
|
|
204
204
|
}, p = ()=>{
|
|
205
|
-
const
|
|
206
|
-
Ee(Array.from(c.querySelectorAll("[data-item]")).map((V,
|
|
207
|
-
if (
|
|
208
|
-
const
|
|
209
|
-
return Math.min(Ae - We - c.offsetLeft,
|
|
205
|
+
const q = c.scrollWidth - c.clientWidth;
|
|
206
|
+
Ee(Array.from(c.querySelectorAll("[data-item]")).map((V, Z)=>{
|
|
207
|
+
if (Z === t.length - 1) return q;
|
|
208
|
+
const $ = V.offsetLeft, We = parseInt(getComputedStyle(V).scrollMargin), Ae = N && !R ? $ - V.clientWidth / 2 : $;
|
|
209
|
+
return Math.min(Ae - We - c.offsetLeft, q);
|
|
210
210
|
}));
|
|
211
211
|
};
|
|
212
212
|
f(), p(), c.addEventListener("scroll", f);
|
|
@@ -232,19 +232,19 @@ const ve = (t, e)=>{
|
|
|
232
232
|
let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
233
233
|
const p = l.current;
|
|
234
234
|
if (p) {
|
|
235
|
-
const g =
|
|
235
|
+
const g = K[c];
|
|
236
236
|
p.scrollTo({
|
|
237
237
|
left: g,
|
|
238
238
|
behavior: f ? "smooth" : "auto"
|
|
239
239
|
});
|
|
240
240
|
}
|
|
241
241
|
}, [
|
|
242
|
-
|
|
242
|
+
K
|
|
243
243
|
]), X = o.useCallback(()=>{
|
|
244
244
|
const c = l.current;
|
|
245
245
|
if (c) {
|
|
246
246
|
const { scrollLeft: f } = c, p = [
|
|
247
|
-
...
|
|
247
|
+
...U
|
|
248
248
|
].reverse().find((g)=>g - f < -1);
|
|
249
249
|
c.scrollTo({
|
|
250
250
|
left: p,
|
|
@@ -252,18 +252,18 @@ const ve = (t, e)=>{
|
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
254
|
}, [
|
|
255
|
-
|
|
255
|
+
U
|
|
256
256
|
]), O = o.useCallback(()=>{
|
|
257
257
|
const c = l.current;
|
|
258
258
|
if (c) {
|
|
259
|
-
const { scrollLeft: f } = c, p =
|
|
259
|
+
const { scrollLeft: f } = c, p = U.find((g)=>g - f > 1);
|
|
260
260
|
c.scrollTo({
|
|
261
261
|
left: p,
|
|
262
262
|
behavior: "smooth"
|
|
263
263
|
});
|
|
264
264
|
}
|
|
265
265
|
}, [
|
|
266
|
-
|
|
266
|
+
U
|
|
267
267
|
]), le = ve(!!x, l);
|
|
268
268
|
o.useEffect(()=>{
|
|
269
269
|
h !== void 0 && B(Math.floor(h / P), !1);
|
|
@@ -288,7 +288,7 @@ const ve = (t, e)=>{
|
|
|
288
288
|
G,
|
|
289
289
|
le
|
|
290
290
|
]);
|
|
291
|
-
const M =
|
|
291
|
+
const M = Pt(D, K), ne = o.useRef(!h), ce = o.useRef(0);
|
|
292
292
|
o.useEffect(()=>{
|
|
293
293
|
if (y) {
|
|
294
294
|
const c = Math.min((M + 1) * P - 1, t.length - 1), f = [];
|
|
@@ -330,12 +330,12 @@ const ve = (t, e)=>{
|
|
|
330
330
|
ee,
|
|
331
331
|
B
|
|
332
332
|
]);
|
|
333
|
-
let
|
|
334
|
-
d ?
|
|
333
|
+
let Y = null;
|
|
334
|
+
d ? Y = d({
|
|
335
335
|
numPages: E,
|
|
336
336
|
currentIndex: M,
|
|
337
337
|
onPress: B
|
|
338
|
-
}) : r && (
|
|
338
|
+
}) : r && (Y = /* @__PURE__ */ n(xe, _object_spread_props(_object_spread({}, ee), {
|
|
339
339
|
onPress: B
|
|
340
340
|
})));
|
|
341
341
|
const Te = "64px", ye = "36px";
|
|
@@ -344,12 +344,12 @@ const ve = (t, e)=>{
|
|
|
344
344
|
}, W))), {
|
|
345
345
|
children: [
|
|
346
346
|
/* @__PURE__ */ te("div", {
|
|
347
|
-
className:
|
|
347
|
+
className: rt,
|
|
348
348
|
children: [
|
|
349
|
-
/* @__PURE__ */ n(
|
|
349
|
+
/* @__PURE__ */ n(_, {
|
|
350
350
|
isInverse: !1,
|
|
351
|
-
children: /* @__PURE__ */ n(
|
|
352
|
-
className:
|
|
351
|
+
children: /* @__PURE__ */ n(j, {
|
|
352
|
+
className: lt,
|
|
353
353
|
"aria-label": I.carouselPrevButton,
|
|
354
354
|
onPress: X,
|
|
355
355
|
disabled: !Le,
|
|
@@ -357,10 +357,10 @@ const ve = (t, e)=>{
|
|
|
357
357
|
})
|
|
358
358
|
}),
|
|
359
359
|
/* @__PURE__ */ n("div", {
|
|
360
|
-
className:
|
|
361
|
-
[
|
|
362
|
-
[
|
|
363
|
-
[
|
|
360
|
+
className: z(nt, {
|
|
361
|
+
[ct]: N,
|
|
362
|
+
[at]: m > 1,
|
|
363
|
+
[it]: v > 1
|
|
364
364
|
}),
|
|
365
365
|
style: _object_spread_props(_object_spread({}, ge(_object_spread({
|
|
366
366
|
[T.itemsPerPageDesktop]: String(a.desktop),
|
|
@@ -368,7 +368,7 @@ const ve = (t, e)=>{
|
|
|
368
368
|
[T.itemsPerPageMobile]: String(a.mobile)
|
|
369
369
|
}, u === "large" ? {
|
|
370
370
|
[T.mobilePageOffset]: Te
|
|
371
|
-
} : H ===
|
|
371
|
+
} : H === vt ? {
|
|
372
372
|
[T.mobilePageOffset]: ye
|
|
373
373
|
} : {}, C !== void 0 ? {
|
|
374
374
|
[T.gap]: String(C)
|
|
@@ -383,7 +383,7 @@ const ve = (t, e)=>{
|
|
|
383
383
|
}),
|
|
384
384
|
ref: l,
|
|
385
385
|
children: t.map((c, f)=>/* @__PURE__ */ n("div", {
|
|
386
|
-
className:
|
|
386
|
+
className: z(ut, s),
|
|
387
387
|
style: _object_spread_props(_object_spread({}, e), {
|
|
388
388
|
scrollSnapStop: be(S) ? "always" : "normal"
|
|
389
389
|
}),
|
|
@@ -391,10 +391,10 @@ const ve = (t, e)=>{
|
|
|
391
391
|
children: c
|
|
392
392
|
}, f))
|
|
393
393
|
}),
|
|
394
|
-
/* @__PURE__ */ n(
|
|
394
|
+
/* @__PURE__ */ n(_, {
|
|
395
395
|
isInverse: !1,
|
|
396
|
-
children: /* @__PURE__ */ n(
|
|
397
|
-
className:
|
|
396
|
+
children: /* @__PURE__ */ n(j, {
|
|
397
|
+
className: ft,
|
|
398
398
|
"aria-label": I.carouselNextButton,
|
|
399
399
|
onPress: O,
|
|
400
400
|
disabled: !Be,
|
|
@@ -403,13 +403,13 @@ const ve = (t, e)=>{
|
|
|
403
403
|
})
|
|
404
404
|
]
|
|
405
405
|
}),
|
|
406
|
-
|
|
407
|
-
className:
|
|
408
|
-
[
|
|
409
|
-
[
|
|
410
|
-
[
|
|
406
|
+
Y && /* @__PURE__ */ n("div", {
|
|
407
|
+
className: z(dt, {
|
|
408
|
+
[ht]: k <= 1,
|
|
409
|
+
[mt]: v <= 1,
|
|
410
|
+
[pt]: m <= 1
|
|
411
411
|
}),
|
|
412
|
-
children:
|
|
412
|
+
children: Y
|
|
413
413
|
})
|
|
414
414
|
]
|
|
415
415
|
}));
|
|
@@ -423,12 +423,12 @@ const ve = (t, e)=>{
|
|
|
423
423
|
window.removeEventListener("resize", s);
|
|
424
424
|
};
|
|
425
425
|
}, []), t;
|
|
426
|
-
},
|
|
426
|
+
}, Ft = (t)=>{
|
|
427
427
|
const e = Ne();
|
|
428
428
|
return /* @__PURE__ */ /*#__PURE__*/ De(Me, _object_spread_props(_object_spread({}, t), {
|
|
429
429
|
key: e
|
|
430
430
|
}));
|
|
431
|
-
},
|
|
431
|
+
}, Kt = (param)=>{
|
|
432
432
|
let { items: t, itemStyle: e, itemClassName: s, withBullets: r, renderBullets: d, initialActiveItem: h, onPageChange: w, dataAttributes: i } = param;
|
|
433
433
|
const u = Ne();
|
|
434
434
|
return /* @__PURE__ */ n(Me, {
|
|
@@ -449,7 +449,7 @@ const ve = (t, e)=>{
|
|
|
449
449
|
onPageChange: w,
|
|
450
450
|
dataAttributes: i
|
|
451
451
|
}, u);
|
|
452
|
-
}, Se = /*#__PURE__*/ o.createContext(void 0),
|
|
452
|
+
}, Se = /*#__PURE__*/ o.createContext(void 0), Ut = ()=>o.useContext(Se), Yt = (param)=>{
|
|
453
453
|
let { items: t, withBullets: e, autoplay: s, initialPageIndex: r = 0, onPageChange: d, dataAttributes: h, inverseBullets: w = !0 } = param;
|
|
454
454
|
const { texts: i, platformOverrides: u } = he(), C = o.useContext(re), b = o.useRef(null), [{ scrollLeft: N, scrollRight: x }, y] = o.useState({
|
|
455
455
|
scrollLeft: 0,
|
|
@@ -513,9 +513,9 @@ const ve = (t, e)=>{
|
|
|
513
513
|
x,
|
|
514
514
|
R
|
|
515
515
|
]);
|
|
516
|
-
const A = o.useRef(!1),
|
|
516
|
+
const A = o.useRef(!1), F = o.useRef(0);
|
|
517
517
|
o.useEffect(()=>{
|
|
518
|
-
d && (A.current ?
|
|
518
|
+
d && (A.current ? F.current !== a && d(a) : A.current = r === a), F.current = a;
|
|
519
519
|
}, [
|
|
520
520
|
a,
|
|
521
521
|
r,
|
|
@@ -547,16 +547,18 @@ const ve = (t, e)=>{
|
|
|
547
547
|
value: {
|
|
548
548
|
withBullets: !!e
|
|
549
549
|
},
|
|
550
|
-
children: /* @__PURE__ */ n(
|
|
550
|
+
children: /* @__PURE__ */ n(xt, {
|
|
551
551
|
skipDesktop: !0,
|
|
552
552
|
children: /* @__PURE__ */ te("div", _object_spread_props(_object_spread({
|
|
553
|
-
className: qe
|
|
553
|
+
className: z(qe, {
|
|
554
|
+
[Ze]: !!e
|
|
555
|
+
})
|
|
554
556
|
}, pe(h, "SlideShow")), {
|
|
555
557
|
children: [
|
|
556
|
-
/* @__PURE__ */ n(
|
|
558
|
+
/* @__PURE__ */ n(_, {
|
|
557
559
|
isInverse: !1,
|
|
558
|
-
children: /* @__PURE__ */ n(
|
|
559
|
-
className:
|
|
560
|
+
children: /* @__PURE__ */ n(j, {
|
|
561
|
+
className: $e,
|
|
560
562
|
"aria-label": i.carouselPrevButton,
|
|
561
563
|
onPress: W,
|
|
562
564
|
disabled: !J,
|
|
@@ -565,13 +567,13 @@ const ve = (t, e)=>{
|
|
|
565
567
|
}),
|
|
566
568
|
/* @__PURE__ */ n("div", {
|
|
567
569
|
style: ge({
|
|
568
|
-
[
|
|
570
|
+
[bt.mediaBorderRadius]: "0px"
|
|
569
571
|
}),
|
|
570
572
|
children: /* @__PURE__ */ n("div", {
|
|
571
|
-
className:
|
|
573
|
+
className: He,
|
|
572
574
|
ref: b,
|
|
573
575
|
children: t.map((l, m)=>/* @__PURE__ */ n("div", {
|
|
574
|
-
className:
|
|
576
|
+
className: Je,
|
|
575
577
|
style: {
|
|
576
578
|
scrollSnapStop: be(u) ? "always" : "normal"
|
|
577
579
|
},
|
|
@@ -579,20 +581,20 @@ const ve = (t, e)=>{
|
|
|
579
581
|
}, m))
|
|
580
582
|
})
|
|
581
583
|
}),
|
|
582
|
-
/* @__PURE__ */ n(
|
|
584
|
+
/* @__PURE__ */ n(_, {
|
|
583
585
|
isInverse: !1,
|
|
584
|
-
children: /* @__PURE__ */ n(
|
|
585
|
-
className:
|
|
586
|
+
children: /* @__PURE__ */ n(j, {
|
|
587
|
+
className: Qe,
|
|
586
588
|
"aria-label": i.carouselNextButton,
|
|
587
589
|
onPress: I,
|
|
588
590
|
disabled: !H,
|
|
589
591
|
children: /* @__PURE__ */ n(fe, {})
|
|
590
592
|
})
|
|
591
593
|
}),
|
|
592
|
-
e && t.length > 1 && /* @__PURE__ */ n(
|
|
594
|
+
e && t.length > 1 && /* @__PURE__ */ n(_, {
|
|
593
595
|
isInverse: w,
|
|
594
596
|
children: /* @__PURE__ */ n("div", {
|
|
595
|
-
className:
|
|
597
|
+
className: Xe,
|
|
596
598
|
children: /* @__PURE__ */ n(xe, _object_spread({}, P))
|
|
597
599
|
})
|
|
598
600
|
})
|
|
@@ -601,4 +603,4 @@ const ve = (t, e)=>{
|
|
|
601
603
|
})
|
|
602
604
|
});
|
|
603
605
|
};
|
|
604
|
-
export {
|
|
606
|
+
export { Ft as Carousel, jt as CarouselContextConsumer, zt as CarouselContextProvider, Kt as CenteredCarousel, xe as PageBullets, Yt as Slideshow, _t as useCarouselContext, Ut as useSlideshowContext };
|
package/dist-es/chip.js
CHANGED
|
@@ -51,21 +51,21 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
}
|
|
52
52
|
return target;
|
|
53
53
|
}
|
|
54
|
-
import { jsxs as
|
|
55
|
-
import
|
|
56
|
-
import { useTheme as
|
|
54
|
+
import { jsxs as l, Fragment as x, jsx as t } from "react/jsx-runtime";
|
|
55
|
+
import d from "classnames";
|
|
56
|
+
import { useTheme as j } from "./hooks.js";
|
|
57
57
|
import A from "./badge.js";
|
|
58
58
|
import i from "./box.js";
|
|
59
|
-
import { Text2 as
|
|
60
|
-
import
|
|
61
|
-
import { pxToRem as
|
|
62
|
-
import { iconActive as
|
|
63
|
-
import { vars as
|
|
64
|
-
import { getPrefixedDataAttributes as
|
|
59
|
+
import { Text2 as D } from "./text.js";
|
|
60
|
+
import V from "./generated/mistica-icons/icon-close-regular.js";
|
|
61
|
+
import { pxToRem as o } from "./utils/css.js";
|
|
62
|
+
import { iconActive as z, icon as L, chipVariants as m, chipWrapper as h, button as M, wrappedContent as F, chipInteractiveVariants as W } from "./chip.css-mistica.js";
|
|
63
|
+
import { vars as $ } from "./skins/skin-contract.css-mistica.js";
|
|
64
|
+
import { getPrefixedDataAttributes as q } from "./utils/dom.js";
|
|
65
65
|
import { useThemeVariant as E } from "./theme-variant-context.js";
|
|
66
66
|
import G, { BaseTouchable as H } from "./touchable.js";
|
|
67
|
-
const J = (
|
|
68
|
-
const { Icon:
|
|
67
|
+
const J = (e)=>{
|
|
68
|
+
const { Icon: n, children: R, id: T, dataAttributes: p, active: a, badge: r, onClose: s } = e, { texts: k, isDarkMode: I, textPresets: B } = j(), u = E() === "alternative", f = n ? {
|
|
69
69
|
mobile: 16,
|
|
70
70
|
desktop: 8
|
|
71
71
|
} : {
|
|
@@ -74,85 +74,78 @@ const J = (t)=>{
|
|
|
74
74
|
}, w = {
|
|
75
75
|
mobile: 20,
|
|
76
76
|
desktop: 12
|
|
77
|
-
},
|
|
77
|
+
}, g = {
|
|
78
78
|
mobile: 16,
|
|
79
79
|
desktop: 8
|
|
80
|
-
},
|
|
81
|
-
children: r === !0 ? /* @__PURE__ */ e(A, {}) : /* @__PURE__ */ e(A, {
|
|
82
|
-
value: r
|
|
83
|
-
})
|
|
84
|
-
}) : null, u = /* @__PURE__ */ g(x, {
|
|
80
|
+
}, b = /* @__PURE__ */ l(x, {
|
|
85
81
|
children: [
|
|
86
|
-
|
|
82
|
+
n && /* @__PURE__ */ t(i, {
|
|
87
83
|
paddingRight: 4,
|
|
88
|
-
className:
|
|
89
|
-
children: /* @__PURE__ */
|
|
84
|
+
className: a ? z : L,
|
|
85
|
+
children: /* @__PURE__ */ t(n, {
|
|
90
86
|
color: "currentColor",
|
|
91
|
-
size:
|
|
87
|
+
size: o(16)
|
|
92
88
|
})
|
|
93
89
|
}),
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
paddingRight: r ? 8 :
|
|
96
|
-
children: /* @__PURE__ */
|
|
97
|
-
id:
|
|
98
|
-
weight:
|
|
90
|
+
/* @__PURE__ */ t(i, {
|
|
91
|
+
paddingRight: r ? 8 : s ? 4 : 0,
|
|
92
|
+
children: /* @__PURE__ */ t(D, {
|
|
93
|
+
id: T,
|
|
94
|
+
weight: B.indicator.weight,
|
|
99
95
|
truncate: 1,
|
|
100
96
|
color: "currentColor",
|
|
101
|
-
children:
|
|
97
|
+
children: R
|
|
102
98
|
})
|
|
103
99
|
})
|
|
104
100
|
]
|
|
105
101
|
});
|
|
106
|
-
if (
|
|
107
|
-
className:
|
|
108
|
-
paddingLeft:
|
|
109
|
-
paddingRight:
|
|
110
|
-
},
|
|
102
|
+
if (s) return /* @__PURE__ */ l(i, _object_spread_props(_object_spread({
|
|
103
|
+
className: d(u ? m.overAlternative : m.default, h),
|
|
104
|
+
paddingLeft: f,
|
|
105
|
+
paddingRight: g
|
|
106
|
+
}, q(p, "Chip")), {
|
|
111
107
|
children: [
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
]
|
|
115
|
-
}));
|
|
116
|
-
if (m) return /* @__PURE__ */ g(i, _object_spread_props(_object_spread({
|
|
117
|
-
className: n(h ? o.overAlternative : o.default, s),
|
|
118
|
-
paddingLeft: p,
|
|
119
|
-
paddingRight: b
|
|
120
|
-
}, R(l, "Chip")), {
|
|
121
|
-
children: [
|
|
122
|
-
u,
|
|
123
|
-
/* @__PURE__ */ e(G, {
|
|
108
|
+
b,
|
|
109
|
+
/* @__PURE__ */ t(G, {
|
|
124
110
|
style: {
|
|
125
111
|
display: "flex",
|
|
126
112
|
justifyContent: "center",
|
|
127
113
|
alignItems: "center",
|
|
128
|
-
width:
|
|
129
|
-
height:
|
|
114
|
+
width: o(24),
|
|
115
|
+
height: o(24)
|
|
130
116
|
},
|
|
131
|
-
"aria-label":
|
|
132
|
-
onPress: ()=>
|
|
133
|
-
children: /* @__PURE__ */
|
|
134
|
-
size:
|
|
135
|
-
color:
|
|
117
|
+
"aria-label": k.closeButtonLabel,
|
|
118
|
+
onPress: ()=>s(),
|
|
119
|
+
children: /* @__PURE__ */ t(V, {
|
|
120
|
+
size: o(16),
|
|
121
|
+
color: $.colors.neutralMedium
|
|
136
122
|
})
|
|
137
123
|
})
|
|
138
124
|
]
|
|
139
125
|
}));
|
|
140
|
-
const
|
|
126
|
+
const c = e.href || e.onPress || e.to, y = a !== void 0 || c, v = _object_spread({
|
|
141
127
|
"component-name": "Chip"
|
|
142
|
-
},
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
128
|
+
}, p), N = ()=>r ? /* @__PURE__ */ t(x, {
|
|
129
|
+
children: r === !0 ? /* @__PURE__ */ t(A, {}) : /* @__PURE__ */ t(A, {
|
|
130
|
+
value: r
|
|
131
|
+
})
|
|
132
|
+
}) : null, C = (P)=>/* @__PURE__ */ l(i, {
|
|
133
|
+
className: d(m[a ? "active" : u ? "overAlternative" : "default"], // If the chip is wrapped inside a BaseTouchable, we set inline-flex to the Touchable instead
|
|
134
|
+
c ? F : h, {
|
|
135
|
+
[W[I ? "dark" : "light"]]: y
|
|
146
136
|
}),
|
|
147
|
-
paddingLeft:
|
|
148
|
-
paddingRight: w,
|
|
149
|
-
dataAttributes:
|
|
150
|
-
children:
|
|
137
|
+
paddingLeft: f,
|
|
138
|
+
paddingRight: r ? g : w,
|
|
139
|
+
dataAttributes: P,
|
|
140
|
+
children: [
|
|
141
|
+
b,
|
|
142
|
+
N()
|
|
143
|
+
]
|
|
151
144
|
});
|
|
152
|
-
return
|
|
153
|
-
className:
|
|
145
|
+
return c ? /* @__PURE__ */ t(H, _object_spread_props(_object_spread({}, e), {
|
|
146
|
+
className: d(h, M),
|
|
154
147
|
dataAttributes: v,
|
|
155
148
|
children: C()
|
|
156
149
|
})) : C(v);
|
|
157
|
-
},
|
|
158
|
-
export {
|
|
150
|
+
}, ot = J;
|
|
151
|
+
export { ot as default };
|
package/dist-es/circle.js
CHANGED
|
@@ -50,24 +50,23 @@ function _object_spread_props(target, source) {
|
|
|
50
50
|
}
|
|
51
51
|
return target;
|
|
52
52
|
}
|
|
53
|
-
import { jsx as
|
|
54
|
-
import { circle as
|
|
55
|
-
import { vars as
|
|
53
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
54
|
+
import { circle as d } from "./circle.css-mistica.js";
|
|
55
|
+
import { vars as n } from "./skins/skin-contract.css-mistica.js";
|
|
56
56
|
import { getPrefixedDataAttributes as f } from "./utils/dom.js";
|
|
57
|
-
const
|
|
58
|
-
let { children:
|
|
59
|
-
const l = r === !0 ?
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
className:
|
|
57
|
+
const $ = (param)=>{
|
|
58
|
+
let { children: i, background: o, backgroundColor: c, backgroundImage: t, size: e, border: r, dataAttributes: s } = param;
|
|
59
|
+
const l = r === !0 ? n.colors.border : r, m = r ? `1px solid ${l}` : void 0, p = t ? `url(${t})` : "";
|
|
60
|
+
return /* @__PURE__ */ a("div", _object_spread_props(_object_spread({
|
|
61
|
+
className: d,
|
|
62
62
|
style: {
|
|
63
|
-
width:
|
|
64
|
-
height:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
border: c
|
|
63
|
+
width: e,
|
|
64
|
+
height: e,
|
|
65
|
+
background: o || `center / cover no-repeat ${p} ${c || ""}`,
|
|
66
|
+
border: m
|
|
68
67
|
}
|
|
69
68
|
}, f(s, "Circle")), {
|
|
70
|
-
children:
|
|
69
|
+
children: i
|
|
71
70
|
}));
|
|
72
|
-
},
|
|
73
|
-
export {
|
|
71
|
+
}, h = $;
|
|
72
|
+
export { h as default };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import "../sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "../icon-button.css.ts.vanilla.css-mistica.js";
|
|
3
3
|
import "./advanced-data-card.css.ts.vanilla.css-mistica.js";
|
|
4
|
-
var n = "_1x00fru3 _1x00fru1 _1y2v1nfaa _1y2v1nfbj _1y2v1nfhk _1y2v1nfhw _1y2v1nf97",
|
|
4
|
+
var v = 216, n = "_1x00fru3 _1x00fru1 _1y2v1nfaa _1y2v1nfbj _1y2v1nfhk _1y2v1nfhw _1y2v1nf97", _ = {
|
|
5
5
|
default: "_1x00fruk",
|
|
6
6
|
mobile: "_1x00frul"
|
|
7
|
-
},
|
|
7
|
+
}, t = "_1x00frur", u = "_1x00frun", o = "_1x00fruo _1x00frun", i = "_1x00fru9 _1x00fru1 _1y2v1nfaa _1y2v1nfbj _1y2v1nf7m _1y2v1nf97", x = "_1x00frud _1y2v1nfhe _1y2v1nfhk _1y2v1nfi6 _1y2v1nfhq", y = "_1x00frui", e = "_1x00fruq _1y2v1nfhk _1y2v1nfhp", h = "_1y2v1nfhk _1y2v1nfi6 _1y2v1nfhz _1y2v1nfjt", d = "_1x00frum", b = "_1x00frus", c = "_1x00frub", l = "_1x00fru1 _1y2v1nfaa _1y2v1nfbj", m = "_1x00fruu", p = "_1x00fru4", s = "_1x00fru7", g = "_1x00fru5", k = {
|
|
8
8
|
topActionsCount: "var(--_1x00frut)"
|
|
9
|
-
},
|
|
10
|
-
export { n as actions,
|
|
9
|
+
}, j = "_1x00frua";
|
|
10
|
+
export { v as MIN_HEIGHT, n as actions, _ as actionsVariants, t as adjustButtonLink, u as button, o as buttonMobile, i as cardContentStyle, x as dataCard, y as divider, e as footerDirection, h as footerText, d as marginRightAuto, b as marginRightButton, c as minHeight, l as paddingX, m as topActionsWithoutIcon, p as touchableArea, s as touchableCardOverlay, g as touchableContainer, k as vars, j as zindex };
|