@telefonica/mistica 14.37.0 → 14.39.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/carousel.js +46 -43
- package/dist/chip.js +51 -34
- package/dist/empty-state-card.js +24 -18
- package/dist/image.css-mistica.js +7 -4
- package/dist/image.css.d.ts +1 -0
- package/dist/image.js +69 -58
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -0
- package/dist/inline.css-mistica.js +14 -12
- package/dist/inline.css.d.ts +5 -1
- package/dist/inline.d.ts +4 -2
- package/dist/inline.js +31 -16
- package/dist/loading-bar.css-mistica.js +6 -18
- package/dist/loading-bar.css.d.ts +1 -4
- package/dist/loading-bar.js +22 -27
- package/dist/loading-screen.css-mistica.js +51 -0
- package/dist/loading-screen.css.d.ts +11 -0
- package/dist/loading-screen.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/loading-screen.d.ts +28 -0
- package/dist/loading-screen.js +398 -0
- package/dist/logo.css-mistica.js +21 -5
- package/dist/logo.css.d.ts +7 -0
- package/dist/logo.d.ts +2 -2
- package/dist/logo.js +86 -61
- package/dist/navigation-bar.css-mistica.js +43 -37
- package/dist/navigation-bar.css.d.ts +3 -1
- package/dist/navigation-bar.js +165 -209
- package/dist/package-version.js +1 -1
- package/dist/tabs.css.d.ts +1 -1
- package/dist/vivinho-loading-animation/in-lottie.json.js +1479 -0
- package/dist/vivinho-loading-animation/index.d.ts +8 -0
- package/dist/vivinho-loading-animation/index.js +119 -0
- package/dist/vivinho-loading-animation/out-lottie.json.js +2143 -0
- package/dist/vivinho-loading-animation/pulse-lottie.json.js +2017 -0
- package/dist/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +20 -0
- package/dist/vivinho-loading-animation/vivinho-loading-animation.css.d.ts +2 -0
- package/dist/vivinho-loading-animation/vivinho-loading-animation.css.ts.vanilla.css-mistica.js +11 -0
- package/dist/vivinho-loading-animation/wave-lottie.json.js +10207 -0
- package/dist-es/carousel.js +46 -43
- package/dist-es/chip.js +78 -61
- package/dist-es/empty-state-card.js +41 -35
- package/dist-es/image.css-mistica.js +2 -2
- package/dist-es/image.js +86 -76
- package/dist-es/index.js +1782 -1781
- package/dist-es/inline.css-mistica.js +7 -8
- package/dist-es/inline.js +39 -24
- package/dist-es/loading-bar.css-mistica.js +2 -2
- package/dist-es/loading-bar.js +22 -32
- package/dist-es/loading-screen.css-mistica.js +7 -0
- package/dist-es/loading-screen.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/loading-screen.js +335 -0
- package/dist-es/logo.css-mistica.js +7 -2
- package/dist-es/logo.js +110 -85
- package/dist-es/navigation-bar.css-mistica.js +19 -19
- package/dist-es/navigation-bar.js +219 -263
- package/dist-es/package-version.js +1 -1
- package/dist-es/style.css +1 -1
- package/dist-es/vivinho-loading-animation/in-lottie.json.js +1426 -0
- package/dist-es/vivinho-loading-animation/index.js +64 -0
- package/dist-es/vivinho-loading-animation/out-lottie.json.js +2090 -0
- package/dist-es/vivinho-loading-animation/pulse-lottie.json.js +1964 -0
- package/dist-es/vivinho-loading-animation/vivinho-loading-animation.css-mistica.js +3 -0
- package/dist-es/vivinho-loading-animation/vivinho-loading-animation.css.ts.vanilla.css-mistica.js +2 -0
- package/dist-es/vivinho-loading-animation/wave-lottie.json.js +10154 -0
- package/package.json +2 -1
package/dist-es/carousel.js
CHANGED
|
@@ -75,19 +75,22 @@ const ie = (e, r)=>{
|
|
|
75
75
|
return we(r, !1) && t && !!e;
|
|
76
76
|
}, ae = (param)=>{
|
|
77
77
|
let { currentIndex: e, numPages: r, onPress: t } = param;
|
|
78
|
-
const o = Ne(), { isDesktopOrBigger:
|
|
79
|
-
const
|
|
80
|
-
return o ?
|
|
78
|
+
const o = Ne(), { isDesktopOrBigger: h } = oe(), m = (b)=>{
|
|
79
|
+
const f = b === e;
|
|
80
|
+
return o ? f ? Oe : De : f ? Ve : ze;
|
|
81
81
|
};
|
|
82
82
|
return /* @__PURE__ */ s(Se, {
|
|
83
|
-
space:
|
|
83
|
+
space: {
|
|
84
|
+
mobile: 8,
|
|
85
|
+
desktop: 16
|
|
86
|
+
},
|
|
84
87
|
alignItems: "center",
|
|
85
88
|
dataAttributes: {
|
|
86
89
|
"component-name": "PageBullets"
|
|
87
90
|
},
|
|
88
91
|
children: Array.from({
|
|
89
92
|
length: r
|
|
90
|
-
}, (
|
|
93
|
+
}, (b, f)=>/* @__PURE__ */ s(M, {
|
|
91
94
|
className: He({
|
|
92
95
|
display: "block",
|
|
93
96
|
padding: 0,
|
|
@@ -95,11 +98,11 @@ const ie = (e, r)=>{
|
|
|
95
98
|
background: "transparent"
|
|
96
99
|
}),
|
|
97
100
|
maybe: !0,
|
|
98
|
-
onPress:
|
|
101
|
+
onPress: h && t ? ()=>t(f) : void 0,
|
|
99
102
|
children: /* @__PURE__ */ s("div", {
|
|
100
|
-
className: m(
|
|
103
|
+
className: m(f)
|
|
101
104
|
})
|
|
102
|
-
},
|
|
105
|
+
}, f))
|
|
103
106
|
});
|
|
104
107
|
}, Z = (e, r, t)=>t ? typeof t == "number" ? t : t[e] || r[e] : r[e], Xe = (e, r)=>{
|
|
105
108
|
const t = {
|
|
@@ -126,7 +129,7 @@ const ie = (e, r)=>{
|
|
|
126
129
|
}, ee = (e, r)=>{
|
|
127
130
|
if (e.length === 0) return [];
|
|
128
131
|
const t = Math.ceil(e.length / r), o = [];
|
|
129
|
-
for(let
|
|
132
|
+
for(let h = 0; h < e.length; h += t)o.push(e[h]);
|
|
130
133
|
return o[o.length - 1] = e[e.length - t], o;
|
|
131
134
|
}, Ze = (e, r)=>{
|
|
132
135
|
const t = [];
|
|
@@ -134,14 +137,14 @@ const ie = (e, r)=>{
|
|
|
134
137
|
for(let o = t.length - 1; o >= 0; o--)if (e - t[o] >= -1) return o;
|
|
135
138
|
return 0;
|
|
136
139
|
}, ue = 5e3, fe = (param)=>{
|
|
137
|
-
let { items: e, itemStyle: r, itemClassName: t, withBullets: o, renderBullets:
|
|
138
|
-
const { texts: T, platformOverrides: x, skinName: y } = re(), c = Je(), i = Xe(c || "large",
|
|
140
|
+
let { items: e, itemStyle: r, itemClassName: t, withBullets: o, renderBullets: h, initialActiveItem: m, itemsPerPage: b, itemsToScroll: f, mobilePageOffset: p, gap: N, free: R, centered: A, autoplay: v, onPageChange: P, dataAttributes: F } = param;
|
|
141
|
+
const { texts: T, platformOverrides: x, skinName: y } = re(), c = Je(), i = Xe(c || "large", b), { isDesktopOrBigger: w, isTablet: C } = oe(), U = C ? i.tablet : i.mobile, I = Math.max(Math.floor(w ? i.desktop : U), 1), g = n.useRef(null), S = Math.ceil(e.length / I), [{ scrollLeft: G, scrollRight: q }, he] = n.useState({
|
|
139
142
|
scrollLeft: 0,
|
|
140
143
|
scrollRight: 0
|
|
141
144
|
}), [K, me] = n.useState([]), W = n.useMemo(()=>ee(K, S), [
|
|
142
145
|
K,
|
|
143
146
|
S
|
|
144
|
-
]), O =
|
|
147
|
+
]), O = f ? ee(K, Math.ceil(e.length / f)) : W, pe = q !== 0, ge = G !== 0;
|
|
145
148
|
n.useEffect(()=>{
|
|
146
149
|
if (g.current) {
|
|
147
150
|
const l = g.current, a = ()=>{
|
|
@@ -159,11 +162,11 @@ const ie = (e, r)=>{
|
|
|
159
162
|
}));
|
|
160
163
|
};
|
|
161
164
|
a(), u(), l.addEventListener("scroll", a);
|
|
162
|
-
const
|
|
165
|
+
const d = le(l, ()=>{
|
|
163
166
|
a(), u();
|
|
164
167
|
});
|
|
165
168
|
return ()=>{
|
|
166
|
-
l.removeEventListener("scroll", a),
|
|
169
|
+
l.removeEventListener("scroll", a), d();
|
|
167
170
|
};
|
|
168
171
|
}
|
|
169
172
|
return ()=>{};
|
|
@@ -181,20 +184,20 @@ const ie = (e, r)=>{
|
|
|
181
184
|
let a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0;
|
|
182
185
|
const u = g.current;
|
|
183
186
|
if (u) {
|
|
184
|
-
const
|
|
187
|
+
const d = W[l];
|
|
185
188
|
u.scrollTo({
|
|
186
|
-
left:
|
|
189
|
+
left: d,
|
|
187
190
|
behavior: a ? "smooth" : "auto"
|
|
188
191
|
});
|
|
189
192
|
}
|
|
190
193
|
}, [
|
|
191
194
|
W
|
|
192
|
-
]),
|
|
195
|
+
]), be = n.useCallback(()=>{
|
|
193
196
|
const l = g.current;
|
|
194
197
|
if (l) {
|
|
195
198
|
const { scrollLeft: a } = l, u = [
|
|
196
199
|
...O
|
|
197
|
-
].reverse().find((
|
|
200
|
+
].reverse().find((d)=>d - a < -1);
|
|
198
201
|
l.scrollTo({
|
|
199
202
|
left: u,
|
|
200
203
|
behavior: "smooth"
|
|
@@ -205,7 +208,7 @@ const ie = (e, r)=>{
|
|
|
205
208
|
]), Y = n.useCallback(()=>{
|
|
206
209
|
const l = g.current;
|
|
207
210
|
if (l) {
|
|
208
|
-
const { scrollLeft: a } = l, u = O.find((
|
|
211
|
+
const { scrollLeft: a } = l, u = O.find((d)=>d - a > 1);
|
|
209
212
|
l.scrollTo({
|
|
210
213
|
left: u,
|
|
211
214
|
behavior: "smooth"
|
|
@@ -213,7 +216,7 @@ const ie = (e, r)=>{
|
|
|
213
216
|
}
|
|
214
217
|
}, [
|
|
215
218
|
O
|
|
216
|
-
]), H = ie(!!
|
|
219
|
+
]), H = ie(!!v, g);
|
|
217
220
|
n.useEffect(()=>{
|
|
218
221
|
m !== void 0 && D(Math.floor(m / I), !1);
|
|
219
222
|
}, [
|
|
@@ -221,10 +224,10 @@ const ie = (e, r)=>{
|
|
|
221
224
|
D,
|
|
222
225
|
I
|
|
223
226
|
]), n.useEffect(()=>{
|
|
224
|
-
if (H &&
|
|
225
|
-
const l = typeof
|
|
226
|
-
var
|
|
227
|
-
q !== 0 ? Y() : a && ((
|
|
227
|
+
if (H && v) {
|
|
228
|
+
const l = typeof v == "boolean" ? ue : v.time, a = typeof v == "object" && v.loop, u = setInterval(()=>{
|
|
229
|
+
var d;
|
|
230
|
+
q !== 0 ? Y() : a && ((d = g.current) == null || d.scrollTo({
|
|
228
231
|
left: 0,
|
|
229
232
|
behavior: "smooth"
|
|
230
233
|
}));
|
|
@@ -232,7 +235,7 @@ const ie = (e, r)=>{
|
|
|
232
235
|
return ()=>clearInterval(u);
|
|
233
236
|
}
|
|
234
237
|
}, [
|
|
235
|
-
|
|
238
|
+
v,
|
|
236
239
|
Y,
|
|
237
240
|
q,
|
|
238
241
|
H
|
|
@@ -242,8 +245,8 @@ const ie = (e, r)=>{
|
|
|
242
245
|
if (P) {
|
|
243
246
|
const l = Math.min((k + 1) * I - 1, e.length - 1), a = [];
|
|
244
247
|
for(let u = 0; u < I; u++){
|
|
245
|
-
const
|
|
246
|
-
|
|
248
|
+
const d = l - u;
|
|
249
|
+
d >= 0 && a.unshift(d);
|
|
247
250
|
}
|
|
248
251
|
J.current ? Q.current !== k && P({
|
|
249
252
|
pageIndex: k,
|
|
@@ -258,7 +261,7 @@ const ie = (e, r)=>{
|
|
|
258
261
|
P
|
|
259
262
|
]);
|
|
260
263
|
let V = null;
|
|
261
|
-
|
|
264
|
+
h ? V = h({
|
|
262
265
|
numPages: S,
|
|
263
266
|
currentIndex: k,
|
|
264
267
|
onPress: D
|
|
@@ -267,7 +270,7 @@ const ie = (e, r)=>{
|
|
|
267
270
|
currentIndex: k,
|
|
268
271
|
onPress: D
|
|
269
272
|
}));
|
|
270
|
-
const
|
|
273
|
+
const ve = "64px", Ie = "36px";
|
|
271
274
|
return /* @__PURE__ */ $(ke, {
|
|
272
275
|
space: 24,
|
|
273
276
|
dataAttributes: _object_spread({
|
|
@@ -282,7 +285,7 @@ const ie = (e, r)=>{
|
|
|
282
285
|
children: /* @__PURE__ */ s(M, {
|
|
283
286
|
className: je,
|
|
284
287
|
"aria-label": T.carouselPrevButton,
|
|
285
|
-
onPress:
|
|
288
|
+
onPress: be,
|
|
286
289
|
disabled: !ge,
|
|
287
290
|
children: /* @__PURE__ */ s(te, {})
|
|
288
291
|
})
|
|
@@ -297,7 +300,7 @@ const ie = (e, r)=>{
|
|
|
297
300
|
[L.itemsPerPageTablet]: String(i.tablet),
|
|
298
301
|
[L.itemsPerPageMobile]: String(i.mobile)
|
|
299
302
|
}, p === "large" ? {
|
|
300
|
-
[L.mobilePageOffset]:
|
|
303
|
+
[L.mobilePageOffset]: ve
|
|
301
304
|
} : y === Qe ? {
|
|
302
305
|
[L.mobilePageOffset]: Ie
|
|
303
306
|
} : {}, N !== void 0 ? {
|
|
@@ -340,7 +343,7 @@ const ie = (e, r)=>{
|
|
|
340
343
|
]
|
|
341
344
|
});
|
|
342
345
|
}, It = (e)=>/* @__PURE__ */ s(fe, _object_spread({}, e)), Pt = (param)=>/* @__PURE__ */ {
|
|
343
|
-
let { items: e, itemStyle: r, itemClassName: t, withBullets: o, renderBullets:
|
|
346
|
+
let { items: e, itemStyle: r, itemClassName: t, withBullets: o, renderBullets: h, initialActiveItem: m, onPageChange: b, dataAttributes: f } = param;
|
|
344
347
|
return s(fe, {
|
|
345
348
|
items: e,
|
|
346
349
|
itemStyle: r,
|
|
@@ -354,10 +357,10 @@ const ie = (e, r)=>{
|
|
|
354
357
|
itemsToScroll: 1,
|
|
355
358
|
gap: 0,
|
|
356
359
|
withBullets: o,
|
|
357
|
-
renderBullets:
|
|
360
|
+
renderBullets: h,
|
|
358
361
|
initialActiveItem: m,
|
|
359
|
-
onPageChange:
|
|
360
|
-
dataAttributes:
|
|
362
|
+
onPageChange: b,
|
|
363
|
+
dataAttributes: f
|
|
361
364
|
});
|
|
362
365
|
}, de = /*#__PURE__*/ n.createContext(!1), xt = ()=>n.useContext(de), et = (param)=>/* @__PURE__ */ {
|
|
363
366
|
let { children: e } = param;
|
|
@@ -366,11 +369,11 @@ const ie = (e, r)=>{
|
|
|
366
369
|
children: e
|
|
367
370
|
});
|
|
368
371
|
}, wt = (param)=>{
|
|
369
|
-
let { items: e, withBullets: r, autoplay: t, onPageChange: o, dataAttributes:
|
|
370
|
-
const { texts:
|
|
372
|
+
let { items: e, withBullets: r, autoplay: t, onPageChange: o, dataAttributes: h, inverseBullets: m = !0 } = param;
|
|
373
|
+
const { texts: b, platformOverrides: f } = re(), p = n.useRef(null), [{ scrollLeft: N, scrollRight: R }, A] = n.useState({
|
|
371
374
|
scrollLeft: 0,
|
|
372
375
|
scrollRight: 0
|
|
373
|
-
}),
|
|
376
|
+
}), v = n.useCallback(()=>{
|
|
374
377
|
const c = p.current;
|
|
375
378
|
c && c.scrollBy({
|
|
376
379
|
left: -c.clientWidth,
|
|
@@ -427,14 +430,14 @@ const ie = (e, r)=>{
|
|
|
427
430
|
]), /* @__PURE__ */ s(et, {
|
|
428
431
|
children: /* @__PURE__ */ $("div", _object_spread_props(_object_spread({
|
|
429
432
|
className: Be
|
|
430
|
-
}, Ce(
|
|
433
|
+
}, Ce(h, "SlideShow")), {
|
|
431
434
|
children: [
|
|
432
435
|
/* @__PURE__ */ s(E, {
|
|
433
436
|
isInverse: !1,
|
|
434
437
|
children: /* @__PURE__ */ s(M, {
|
|
435
438
|
className: Ee,
|
|
436
|
-
"aria-label":
|
|
437
|
-
onPress:
|
|
439
|
+
"aria-label": b.carouselPrevButton,
|
|
440
|
+
onPress: v,
|
|
438
441
|
disabled: !T,
|
|
439
442
|
children: /* @__PURE__ */ s(te, {})
|
|
440
443
|
})
|
|
@@ -449,7 +452,7 @@ const ie = (e, r)=>{
|
|
|
449
452
|
children: e.map((c, i)=>/* @__PURE__ */ s("div", {
|
|
450
453
|
className: Te,
|
|
451
454
|
style: {
|
|
452
|
-
scrollSnapStop: ne(
|
|
455
|
+
scrollSnapStop: ne(f) ? "always" : "normal"
|
|
453
456
|
},
|
|
454
457
|
children: c
|
|
455
458
|
}, i))
|
|
@@ -459,7 +462,7 @@ const ie = (e, r)=>{
|
|
|
459
462
|
isInverse: !1,
|
|
460
463
|
children: /* @__PURE__ */ s(M, {
|
|
461
464
|
className: ye,
|
|
462
|
-
"aria-label":
|
|
465
|
+
"aria-label": b.carouselNextButton,
|
|
463
466
|
onPress: P,
|
|
464
467
|
disabled: !F,
|
|
465
468
|
children: /* @__PURE__ */ s(se, {})
|
package/dist-es/chip.js
CHANGED
|
@@ -51,104 +51,121 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
}
|
|
52
52
|
return target;
|
|
53
53
|
}
|
|
54
|
-
import { jsxs as
|
|
54
|
+
import { jsxs as f, Fragment as b, jsx as e } from "react/jsx-runtime";
|
|
55
55
|
import E from "classnames";
|
|
56
|
-
import { useTheme as N
|
|
57
|
-
import
|
|
58
|
-
import
|
|
59
|
-
import { Text2 as
|
|
60
|
-
import
|
|
56
|
+
import { useTheme as N } from "./hooks.js";
|
|
57
|
+
import k from "./badge.js";
|
|
58
|
+
import i from "./box.js";
|
|
59
|
+
import { Text2 as V } from "./text.js";
|
|
60
|
+
import y from "./icon-button.js";
|
|
61
61
|
import j from "./generated/mistica-icons/icon-close-regular.js";
|
|
62
|
-
import { pxToRem as
|
|
63
|
-
import { iconActive as
|
|
64
|
-
import { vars as
|
|
65
|
-
import { getPrefixedDataAttributes as
|
|
66
|
-
import { useThemeVariant as
|
|
67
|
-
import { BaseTouchable as
|
|
68
|
-
const
|
|
69
|
-
const { Icon: c, children:
|
|
70
|
-
|
|
62
|
+
import { pxToRem as z } from "./utils/css.js";
|
|
63
|
+
import { iconActive as D, icon as L, chipVariants as n, button as M, chipInteractiveVariants as O } from "./chip.css-mistica.js";
|
|
64
|
+
import { vars as W } from "./skins/skin-contract.css-mistica.js";
|
|
65
|
+
import { getPrefixedDataAttributes as A } from "./utils/dom.js";
|
|
66
|
+
import { useThemeVariant as F } from "./theme-variant-context.js";
|
|
67
|
+
import { BaseTouchable as g } from "./touchable.js";
|
|
68
|
+
const $ = (t)=>{
|
|
69
|
+
const { Icon: c, children: C, id: x, dataAttributes: s, active: l, badge: r, onClose: d } = t, { texts: p, isDarkMode: P, textPresets: I } = N(), m = F() === "alternative", u = c ? {
|
|
70
|
+
mobile: 16,
|
|
71
|
+
desktop: 8
|
|
72
|
+
} : {
|
|
73
|
+
mobile: 20,
|
|
74
|
+
desktop: 12
|
|
75
|
+
}, R = {
|
|
76
|
+
mobile: 20,
|
|
77
|
+
desktop: 12
|
|
78
|
+
}, v = {
|
|
79
|
+
mobile: 16,
|
|
80
|
+
desktop: 8
|
|
81
|
+
}, T = ()=>r ? /* @__PURE__ */ e(b, {
|
|
82
|
+
children: r === !0 ? /* @__PURE__ */ e(k, {}) : /* @__PURE__ */ e(k, {
|
|
71
83
|
value: r
|
|
72
84
|
})
|
|
73
|
-
}) : null, h = /* @__PURE__ */
|
|
85
|
+
}) : null, h = /* @__PURE__ */ f(b, {
|
|
74
86
|
children: [
|
|
75
|
-
c && /* @__PURE__ */
|
|
87
|
+
c && /* @__PURE__ */ e(i, {
|
|
76
88
|
paddingRight: 4,
|
|
77
|
-
className:
|
|
78
|
-
children: /* @__PURE__ */
|
|
89
|
+
className: l ? D : L,
|
|
90
|
+
children: /* @__PURE__ */ e(c, {
|
|
79
91
|
color: "currentColor",
|
|
80
|
-
size:
|
|
92
|
+
size: z(16)
|
|
81
93
|
})
|
|
82
94
|
}),
|
|
83
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ e(i, {
|
|
84
96
|
paddingRight: r ? 8 : d ? 4 : 0,
|
|
85
|
-
children: /* @__PURE__ */
|
|
86
|
-
id:
|
|
97
|
+
children: /* @__PURE__ */ e(V, {
|
|
98
|
+
id: x,
|
|
87
99
|
weight: I.indicator.weight,
|
|
88
100
|
truncate: 1,
|
|
89
101
|
color: "currentColor",
|
|
90
|
-
children:
|
|
102
|
+
children: C
|
|
91
103
|
})
|
|
92
104
|
})
|
|
93
105
|
]
|
|
94
106
|
});
|
|
95
|
-
if (r) return /* @__PURE__ */
|
|
96
|
-
className: m ?
|
|
97
|
-
paddingLeft:
|
|
98
|
-
paddingRight:
|
|
99
|
-
},
|
|
107
|
+
if (r) return /* @__PURE__ */ f(i, _object_spread_props(_object_spread({
|
|
108
|
+
className: m ? n.overAlternative : n.default,
|
|
109
|
+
paddingLeft: u,
|
|
110
|
+
paddingRight: v
|
|
111
|
+
}, A(s, "Chip")), {
|
|
100
112
|
children: [
|
|
101
113
|
h,
|
|
102
|
-
|
|
114
|
+
T()
|
|
103
115
|
]
|
|
104
116
|
}));
|
|
105
|
-
if (d) return /* @__PURE__ */
|
|
106
|
-
className: m ?
|
|
107
|
-
paddingLeft:
|
|
108
|
-
paddingRight:
|
|
109
|
-
},
|
|
117
|
+
if (d) return /* @__PURE__ */ f(i, _object_spread_props(_object_spread({
|
|
118
|
+
className: m ? n.overAlternative : n.default,
|
|
119
|
+
paddingLeft: u,
|
|
120
|
+
paddingRight: v
|
|
121
|
+
}, A(s, "Chip")), {
|
|
110
122
|
children: [
|
|
111
123
|
h,
|
|
112
|
-
/* @__PURE__ */
|
|
124
|
+
/* @__PURE__ */ e(y, {
|
|
113
125
|
size: 24,
|
|
114
126
|
style: {
|
|
115
127
|
display: "flex",
|
|
116
128
|
justifyContent: "center",
|
|
117
129
|
alignItems: "center"
|
|
118
130
|
},
|
|
119
|
-
"aria-label":
|
|
131
|
+
"aria-label": p.closeButtonLabel,
|
|
120
132
|
onPress: ()=>d(),
|
|
121
|
-
children: /* @__PURE__ */
|
|
133
|
+
children: /* @__PURE__ */ e(j, {
|
|
122
134
|
size: 16,
|
|
123
|
-
color:
|
|
135
|
+
color: W.colors.neutralMedium
|
|
124
136
|
})
|
|
125
137
|
})
|
|
126
138
|
]
|
|
127
139
|
}));
|
|
128
|
-
const
|
|
129
|
-
|
|
130
|
-
|
|
140
|
+
const w = l !== void 0 || t.href || t.onPress || t.to, a = _object_spread({
|
|
141
|
+
"component-name": "Chip"
|
|
142
|
+
}, s), o = (B)=>/* @__PURE__ */ e(i, {
|
|
143
|
+
className: E(n[l ? "active" : m ? "overAlternative" : "default"], {
|
|
144
|
+
[O[P ? "dark" : "light"]]: w
|
|
131
145
|
}),
|
|
132
|
-
paddingLeft:
|
|
133
|
-
paddingRight: R
|
|
134
|
-
|
|
146
|
+
paddingLeft: u,
|
|
147
|
+
paddingRight: R,
|
|
148
|
+
dataAttributes: B,
|
|
135
149
|
children: h
|
|
136
|
-
})
|
|
137
|
-
return
|
|
138
|
-
className:
|
|
139
|
-
trackingEvent:
|
|
140
|
-
onPress:
|
|
150
|
+
});
|
|
151
|
+
return t.onPress ? /* @__PURE__ */ e(g, {
|
|
152
|
+
className: M,
|
|
153
|
+
trackingEvent: t.trackingEvent,
|
|
154
|
+
onPress: t.onPress,
|
|
155
|
+
dataAttributes: a,
|
|
141
156
|
children: o()
|
|
142
|
-
}) :
|
|
143
|
-
trackingEvent:
|
|
144
|
-
to:
|
|
145
|
-
fullPageOnWebView:
|
|
157
|
+
}) : t.to ? /* @__PURE__ */ e(g, {
|
|
158
|
+
trackingEvent: t.trackingEvent,
|
|
159
|
+
to: t.to,
|
|
160
|
+
fullPageOnWebView: t.fullPageOnWebView,
|
|
161
|
+
dataAttributes: a,
|
|
146
162
|
children: o()
|
|
147
|
-
}) :
|
|
148
|
-
trackingEvent:
|
|
149
|
-
href:
|
|
150
|
-
newTab:
|
|
163
|
+
}) : t.href ? /* @__PURE__ */ e(g, {
|
|
164
|
+
trackingEvent: t.trackingEvent,
|
|
165
|
+
href: t.href,
|
|
166
|
+
newTab: t.newTab,
|
|
167
|
+
dataAttributes: a,
|
|
151
168
|
children: o()
|
|
152
|
-
}) : o();
|
|
153
|
-
},
|
|
154
|
-
export {
|
|
169
|
+
}) : o(a);
|
|
170
|
+
}, rt = $;
|
|
171
|
+
export { rt as default };
|
|
@@ -1,66 +1,72 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
3
|
-
import
|
|
3
|
+
import s from "./box.js";
|
|
4
4
|
import { Boxed as g } from "./boxed.js";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import { Text as
|
|
8
|
-
import
|
|
9
|
-
import { container as
|
|
10
|
-
import { vars as
|
|
11
|
-
const
|
|
12
|
-
let { title:
|
|
13
|
-
var
|
|
14
|
-
const {
|
|
5
|
+
import { useTheme as S } from "./hooks.js";
|
|
6
|
+
import c from "./stack.js";
|
|
7
|
+
import { Text as k, Text2 as y } from "./text.js";
|
|
8
|
+
import E from "./button-group.js";
|
|
9
|
+
import { container as N, iconContainer as u, image as B } from "./empty-state-card.css-mistica.js";
|
|
10
|
+
import { vars as C } from "./skins/skin-contract.css-mistica.js";
|
|
11
|
+
const T = (param)=>{
|
|
12
|
+
let { title: d, description: n, button: r, secondaryButton: i, buttonLink: o, icon: t, imageUrl: a, "aria-label": h, dataAttributes: f } = param;
|
|
13
|
+
var l;
|
|
14
|
+
const { textPresets: x } = S();
|
|
15
15
|
let m;
|
|
16
16
|
return a && (m = /* @__PURE__ */ e("img", {
|
|
17
|
-
className:
|
|
17
|
+
className: B,
|
|
18
18
|
alt: "",
|
|
19
19
|
src: a
|
|
20
|
-
})), process.env.NODE_ENV !== "production" && r && !((
|
|
21
|
-
dataAttributes:
|
|
22
|
-
children: /* @__PURE__ */ e(
|
|
23
|
-
paddingY:
|
|
24
|
-
|
|
20
|
+
})), process.env.NODE_ENV !== "production" && r && !((l = r == null ? void 0 : r.props) != null && l.small) && console.error("button property in EmptyStateCard must be a a small Button. Set small prop to true"), /* @__PURE__ */ e(g, {
|
|
21
|
+
dataAttributes: f,
|
|
22
|
+
children: /* @__PURE__ */ e(s, {
|
|
23
|
+
paddingY: {
|
|
24
|
+
mobile: 24,
|
|
25
|
+
desktop: 40
|
|
26
|
+
},
|
|
27
|
+
paddingX: {
|
|
28
|
+
mobile: 16,
|
|
29
|
+
desktop: 40
|
|
30
|
+
},
|
|
25
31
|
children: /* @__PURE__ */ e("section", {
|
|
26
|
-
className:
|
|
27
|
-
"aria-label":
|
|
28
|
-
children: /* @__PURE__ */ p(
|
|
32
|
+
className: N,
|
|
33
|
+
"aria-label": h,
|
|
34
|
+
children: /* @__PURE__ */ p(c, {
|
|
29
35
|
space: 16,
|
|
30
36
|
children: [
|
|
31
|
-
m !== null && m !== void 0 ? m :
|
|
32
|
-
className:
|
|
33
|
-
children:
|
|
37
|
+
m !== null && m !== void 0 ? m : t && /* @__PURE__ */ e("div", {
|
|
38
|
+
className: u,
|
|
39
|
+
children: t
|
|
34
40
|
}),
|
|
35
|
-
/* @__PURE__ */ e(
|
|
36
|
-
children: /* @__PURE__ */ p(
|
|
41
|
+
/* @__PURE__ */ e(s, {
|
|
42
|
+
children: /* @__PURE__ */ p(c, {
|
|
37
43
|
space: 8,
|
|
38
44
|
children: [
|
|
39
|
-
/* @__PURE__ */ e(
|
|
45
|
+
/* @__PURE__ */ e(k, {
|
|
40
46
|
mobileSize: 18,
|
|
41
47
|
mobileLineHeight: "24px",
|
|
42
48
|
desktopSize: 20,
|
|
43
49
|
desktopLineHeight: "28px",
|
|
44
|
-
weight:
|
|
45
|
-
children:
|
|
50
|
+
weight: x.cardTitle.weight,
|
|
51
|
+
children: d
|
|
46
52
|
}),
|
|
47
|
-
/* @__PURE__ */ e(
|
|
53
|
+
/* @__PURE__ */ e(y, {
|
|
48
54
|
regular: !0,
|
|
49
|
-
color:
|
|
50
|
-
children:
|
|
55
|
+
color: C.colors.textSecondary,
|
|
56
|
+
children: n
|
|
51
57
|
})
|
|
52
58
|
]
|
|
53
59
|
})
|
|
54
60
|
}),
|
|
55
|
-
(r || i ||
|
|
61
|
+
(r || i || o) && /* @__PURE__ */ e(E, {
|
|
56
62
|
primaryButton: r,
|
|
57
63
|
secondaryButton: i,
|
|
58
|
-
link:
|
|
64
|
+
link: o
|
|
59
65
|
})
|
|
60
66
|
]
|
|
61
67
|
})
|
|
62
68
|
})
|
|
63
69
|
})
|
|
64
70
|
});
|
|
65
|
-
},
|
|
66
|
-
export {
|
|
71
|
+
}, O = T;
|
|
72
|
+
export { O as default };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./sprinkles.css.ts.vanilla.css-mistica.js";
|
|
2
2
|
import "./image.css.ts.vanilla.css-mistica.js";
|
|
3
|
-
var
|
|
3
|
+
var _ = 300, a = "_17tt25r3 _1y2v1nfjn _1y2v1nfk2 _1y2v1nfgi _1y2v1nfh3 _1y2v1nfhk _1y2v1nflb _1y2v1nfiv _1y2v1nfiw _1y2v1nfj7", i = "_17tt25r1", n = {
|
|
4
4
|
mediaBorderRadius: "var(--_17tt25r0)"
|
|
5
5
|
};
|
|
6
|
-
export {
|
|
6
|
+
export { _ as FADE_IN_DURATION_MS, a as image, i as imageWithBorder, n as vars };
|