@telefonica/mistica 14.34.0 → 14.35.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.css-mistica.js +1 -1
- package/dist/button.css-mistica.js +7 -7
- package/dist/callout.css-mistica.js +1 -1
- package/dist/callout.js +17 -12
- package/dist/card.js +277 -244
- package/dist/carousel.css-mistica.js +5 -5
- package/dist/carousel.js +54 -52
- package/dist/checkbox.js +18 -18
- package/dist/community/advanced-data-card.css-mistica.js +3 -3
- package/dist/community/advanced-data-card.js +57 -50
- package/dist/community/blocks.js +42 -35
- package/dist/counter.css-mistica.js +1 -1
- package/dist/cvv-field.js +1 -1
- package/dist/dialog.css-mistica.js +3 -3
- package/dist/dialog.js +2 -2
- package/dist/hero.js +34 -30
- package/dist/hooks.d.ts +12 -1
- package/dist/hooks.js +85 -48
- package/dist/image.css-mistica.js +7 -2
- package/dist/image.css.d.ts +3 -0
- package/dist/image.d.ts +1 -7
- package/dist/image.js +55 -66
- package/dist/list.css-mistica.js +1 -1
- package/dist/list.js +80 -75
- package/dist/loading-bar.css-mistica.js +6 -6
- package/dist/maybe-dismissable.css-mistica.js +1 -1
- package/dist/menu.js +32 -32
- package/dist/navigation-bar.css-mistica.js +10 -10
- package/dist/overlay.js +10 -10
- package/dist/package-version.js +1 -1
- package/dist/pin-field.css-mistica.js +3 -3
- package/dist/popover.css-mistica.js +4 -4
- package/dist/radio-button.css-mistica.js +5 -5
- package/dist/radio-button.js +7 -7
- package/dist/screen-reader-only.css-mistica.js +1 -1
- package/dist/select.css-mistica.js +7 -7
- package/dist/select.js +65 -53
- package/dist/sheet.css-mistica.js +8 -8
- package/dist/skeletons.d.ts +9 -1
- package/dist/skeletons.js +3 -0
- package/dist/skins/blau.js +2 -1
- package/dist/skins/defaults.js +2 -1
- package/dist/skins/movistar-legacy.js +2 -1
- package/dist/skins/movistar.js +2 -1
- package/dist/skins/o2.js +2 -1
- package/dist/skins/skin-contract.css-mistica.js +2 -1
- package/dist/skins/skin-contract.css.d.ts +1 -0
- package/dist/skins/telefonica.js +2 -1
- package/dist/skins/types/index.d.ts +1 -0
- package/dist/skins/vivo-new.js +2 -1
- package/dist/skins/vivo.js +2 -1
- package/dist/slider.css-mistica.js +19 -19
- package/dist/slider.css.d.ts +8 -8
- package/dist/slider.d.ts +28 -8
- package/dist/slider.js +226 -106
- package/dist/snackbar.css-mistica.js +5 -5
- package/dist/sprinkles.css-mistica.js +71 -68
- package/dist/stacking-group.js +31 -24
- package/dist/stepper.css-mistica.js +3 -3
- package/dist/switch-component.css-mistica.js +17 -17
- package/dist/switch-component.js +12 -12
- package/dist/tab-focus.js +12 -12
- package/dist/tabs.css-mistica.js +1 -1
- package/dist/text-field-base.css-mistica.js +1 -1
- package/dist/text-field-components.css-mistica.js +7 -7
- package/dist/text-link.css-mistica.js +3 -3
- package/dist/theme-context-provider.js +39 -36
- package/dist/tooltip-context-provider.d.ts +14 -0
- package/dist/tooltip-context-provider.js +90 -0
- package/dist/tooltip.css-mistica.js +25 -54
- package/dist/tooltip.css.d.ts +19 -26
- package/dist/tooltip.d.ts +15 -1
- package/dist/tooltip.js +255 -207
- package/dist/touchable.css-mistica.js +1 -1
- package/dist/touchable.js +8 -8
- package/dist/utils/aspect-ratio-support.css-mistica.js +2 -2
- package/dist/utils/environment.d.ts +1 -0
- package/dist/utils/environment.js +4 -1
- package/dist/utils/keys.d.ts +8 -0
- package/dist/utils/{key-codes.js → keys.js} +6 -6
- package/dist/video.css-mistica.js +1 -1
- package/dist/video.js +33 -31
- package/dist-es/avatar.css-mistica.js +1 -1
- package/dist-es/button.css-mistica.js +7 -7
- package/dist-es/callout.css-mistica.js +1 -1
- package/dist-es/callout.js +33 -28
- package/dist-es/card.js +416 -383
- package/dist-es/carousel.css-mistica.js +2 -2
- package/dist-es/carousel.js +84 -82
- package/dist-es/checkbox.js +18 -18
- package/dist-es/community/advanced-data-card.css-mistica.js +2 -2
- package/dist-es/community/advanced-data-card.js +83 -76
- package/dist-es/community/blocks.js +77 -70
- package/dist-es/counter.css-mistica.js +1 -1
- package/dist-es/cvv-field.js +1 -1
- package/dist-es/dialog.css-mistica.js +3 -3
- package/dist-es/dialog.js +2 -2
- package/dist-es/hero.js +69 -65
- package/dist-es/hooks.js +83 -49
- package/dist-es/image.css-mistica.js +4 -2
- package/dist-es/image.js +74 -79
- package/dist-es/list.css-mistica.js +1 -1
- package/dist-es/list.js +116 -111
- package/dist-es/loading-bar.css-mistica.js +2 -2
- package/dist-es/maybe-dismissable.css-mistica.js +1 -1
- package/dist-es/menu.js +41 -41
- package/dist-es/navigation-bar.css-mistica.js +6 -6
- package/dist-es/overlay.js +14 -14
- package/dist-es/package-version.js +1 -1
- package/dist-es/pin-field.css-mistica.js +2 -2
- package/dist-es/popover.css-mistica.js +2 -2
- package/dist-es/radio-button.css-mistica.js +4 -4
- package/dist-es/radio-button.js +2 -2
- package/dist-es/screen-reader-only.css-mistica.js +1 -1
- package/dist-es/select.css-mistica.js +7 -7
- package/dist-es/select.js +89 -77
- package/dist-es/sheet.css-mistica.js +2 -2
- package/dist-es/skeletons.js +1 -1
- package/dist-es/skins/blau.js +2 -1
- package/dist-es/skins/defaults.js +2 -1
- package/dist-es/skins/movistar-legacy.js +2 -1
- package/dist-es/skins/movistar.js +2 -1
- package/dist-es/skins/o2.js +2 -1
- package/dist-es/skins/skin-contract.css-mistica.js +2 -1
- package/dist-es/skins/telefonica.js +2 -1
- package/dist-es/skins/vivo-new.js +2 -1
- package/dist-es/skins/vivo.js +2 -1
- package/dist-es/slider.css-mistica.js +2 -8
- package/dist-es/slider.js +231 -111
- package/dist-es/snackbar.css-mistica.js +4 -4
- package/dist-es/sprinkles.css-mistica.js +71 -68
- package/dist-es/stacking-group.js +37 -30
- package/dist-es/stepper.css-mistica.js +2 -2
- package/dist-es/style.css +1 -1
- package/dist-es/switch-component.css-mistica.js +13 -13
- package/dist-es/switch-component.js +14 -14
- package/dist-es/tab-focus.js +14 -14
- package/dist-es/tabs.css-mistica.js +1 -1
- package/dist-es/text-field-base.css-mistica.js +1 -1
- package/dist-es/text-field-components.css-mistica.js +2 -2
- package/dist-es/text-link.css-mistica.js +3 -3
- package/dist-es/theme-context-provider.js +53 -50
- package/dist-es/tooltip-context-provider.js +29 -0
- package/dist-es/tooltip.css-mistica.js +16 -9
- package/dist-es/tooltip.js +264 -216
- package/dist-es/touchable.css-mistica.js +1 -1
- package/dist-es/touchable.js +8 -8
- package/dist-es/utils/aspect-ratio-support.css-mistica.js +2 -2
- package/dist-es/utils/environment.js +2 -2
- package/dist-es/utils/keys.js +2 -0
- package/dist-es/video.css-mistica.js +1 -1
- package/dist-es/video.js +41 -39
- package/package.json +1 -1
- package/dist/utils/key-codes.d.ts +0 -8
- package/dist-es/utils/key-codes.js +0 -2
|
@@ -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 f = "_1abcu71 _1y2v1nfc2 _1y2v1nfci _1y2v1nfdt _1y2v1nf46", b = "_1abcu72 _1abcu71 _1y2v1nfc2 _1y2v1nfci _1y2v1nfdt _1y2v1nf47", y = "_1abcu72 _1abcu71 _1y2v1nfc2 _1y2v1nfci _1y2v1nfdt _1y2v1nf4o", r = "_1abcu75 _1abcu71 _1y2v1nfc2 _1y2v1nfci _1y2v1nfdt", c = "_1abcu7m _1abcu7b _1y2v1nfba _1y2v1nfcu", e = "_1y2v1nfba _1y2v1nfbj", u = "_1y2v1nfb3 _1y2v1nfd7 _1y2v1nfb4", t = "_1abcu7p", o = "_1abcu7t _1abcu7r _1abcu7d _1y2v1nfba _1y2v1nfbp _1y2v1nfbj _1y2v1nfdt _1y2v1nf33 _1y2v1nfc8 _1y2v1nfco _1y2v1nfdr _1y2v1nfb5", s = "_1abcu7s _1abcu7r _1abcu7d _1y2v1nfba _1y2v1nfbp _1y2v1nfbj _1y2v1nfdt _1y2v1nf33 _1y2v1nfc8 _1y2v1nfco _1y2v1nfdr _1y2v1nfb5", l = "_1abcu7n", i = "_1abcu7o", d = "_1abcu7w _1abcu7b _1y2v1nfba _1y2v1nfcu", p = "_1abcu714 _1y2v1nfb5
|
|
5
|
+
var f = "_1abcu71 _1y2v1nfc2 _1y2v1nfci _1y2v1nfdt _1y2v1nf46", b = "_1abcu72 _1abcu71 _1y2v1nfc2 _1y2v1nfci _1y2v1nfdt _1y2v1nf47", y = "_1abcu72 _1abcu71 _1y2v1nfc2 _1y2v1nfci _1y2v1nfdt _1y2v1nf4o", r = "_1abcu75 _1abcu71 _1y2v1nfc2 _1y2v1nfci _1y2v1nfdt", c = "_1abcu7m _1abcu7b _1y2v1nfba _1y2v1nfcu", e = "_1y2v1nfba _1y2v1nfbj", u = "_1y2v1nfb3 _1y2v1nfd7 _1y2v1nfb4", t = "_1abcu7p", o = "_1abcu7t _1abcu7r _1abcu7d _1y2v1nfba _1y2v1nfbp _1y2v1nfbj _1y2v1nfdt _1y2v1nf33 _1y2v1nfc8 _1y2v1nfco _1y2v1nfdr _1y2v1nfb5", s = "_1abcu7s _1abcu7r _1abcu7d _1y2v1nfba _1y2v1nfbp _1y2v1nfbj _1y2v1nfdt _1y2v1nf33 _1y2v1nfc8 _1y2v1nfco _1y2v1nfdr _1y2v1nfb5", l = "_1abcu7n", i = "_1abcu7o", d = "_1abcu7w _1abcu7b _1y2v1nfba _1y2v1nfcu", p = "_1abcu714 _1y2v1nfb5 _1y2v1nffx _1y2v1nfba _1y2v1nfbj _1y2v1nfbx", m = "_1y2v1nfb4", w = "_1abcu7y _1y2v1nfbx _1y2v1nfbs", P = "_1abcu712 _1abcu7r _1abcu7d _1y2v1nfba _1y2v1nfbp _1y2v1nfbj _1y2v1nfdt _1y2v1nf33 _1y2v1nfc8 _1y2v1nfco _1y2v1nfdr _1y2v1nfb5 _1y2v1nffi", h = "_1abcu710 _1abcu7r _1abcu7d _1y2v1nfba _1y2v1nfbp _1y2v1nfbj _1y2v1nfdt _1y2v1nf33 _1y2v1nfc8 _1y2v1nfco _1y2v1nfdr _1y2v1nfb5 _1y2v1nff3", j = {
|
|
6
6
|
itemsPerPageMobile: "var(--_1abcu7g)",
|
|
7
7
|
itemsPerPageTablet: "var(--_1abcu7h)",
|
|
8
8
|
itemsPerPageDesktop: "var(--_1abcu7i)",
|
|
9
9
|
gap: "var(--_1abcu7j)",
|
|
10
10
|
mobilePageOffset: "var(--_1abcu7k)"
|
|
11
11
|
};
|
|
12
|
-
export { f as bullet, b as bulletActive, y as bulletActiveInverse, r as bulletInverse, c as carousel, e as carouselBullets, u as carouselContainer, t as carouselItem, o as carouselNextArrowButton, s as carouselPrevArrowButton, l as carouselWithScroll, i as centeredCarousel, d as slideshow, p as slideshowBullets,
|
|
12
|
+
export { f as bullet, b as bulletActive, y as bulletActiveInverse, r as bulletInverse, c as carousel, e as carouselBullets, u as carouselContainer, t as carouselItem, o as carouselNextArrowButton, s as carouselPrevArrowButton, l as carouselWithScroll, i as centeredCarousel, d as slideshow, p as slideshowBullets, m as slideshowContainer, w as slideshowItem, P as slideshowNextArrowButton, h as slideshowPrevArrowButton, j as vars };
|
package/dist-es/carousel.js
CHANGED
|
@@ -51,35 +51,35 @@ function _object_spread_props(target, source) {
|
|
|
51
51
|
}
|
|
52
52
|
return target;
|
|
53
53
|
}
|
|
54
|
-
import { jsx as s, jsxs as
|
|
54
|
+
import { jsx as s, jsxs as $ } from "react/jsx-runtime";
|
|
55
55
|
import * as n from "react";
|
|
56
56
|
import te from "./generated/mistica-icons/icon-chevron-left-regular.js";
|
|
57
57
|
import se from "./generated/mistica-icons/icon-chevron-right-regular.js";
|
|
58
|
-
import { useScreenSize as oe, useTheme as re, useIsInViewport as
|
|
59
|
-
import
|
|
60
|
-
import
|
|
61
|
-
import { BaseTouchable as
|
|
62
|
-
import
|
|
63
|
-
import { useIsInverseVariant as
|
|
64
|
-
import { MediaBorderRadiusProvider as Ne } from "./image.js";
|
|
58
|
+
import { useScreenSize as oe, useTheme as re, useIsInViewport as we } from "./hooks.js";
|
|
59
|
+
import Se from "./inline.js";
|
|
60
|
+
import ke from "./stack.js";
|
|
61
|
+
import { BaseTouchable as M } from "./touchable.js";
|
|
62
|
+
import X from "classnames";
|
|
63
|
+
import { useIsInverseVariant as Ne, ThemeVariant as E } from "./theme-variant-context.js";
|
|
65
64
|
import { listenResize as le, getPrefixedDataAttributes as Ce } from "./utils/dom.js";
|
|
66
65
|
import { isAndroid as ne, isIos as Le, isRunningAcceptanceTest as Re } from "./utils/platform.js";
|
|
67
66
|
import { useDocumentVisibility as Ae } from "./utils/document-visibility.js";
|
|
68
|
-
import { slideshowContainer as
|
|
67
|
+
import { slideshowContainer as Be, slideshowPrevArrowButton as Ee, slideshow as Me, slideshowItem as Te, slideshowNextArrowButton as ye, slideshowBullets as We, bulletActiveInverse as Oe, bulletInverse as De, bulletActive as Ve, bullet as ze, carouselContainer as _e, carouselPrevArrowButton as je, carousel as Fe, centeredCarousel as Ue, carouselWithScroll as qe, vars as L, carouselItem as Ke, carouselNextArrowButton as Ye, carouselBullets as $e } from "./carousel.css-mistica.js";
|
|
68
|
+
import { vars as Ge } from "./image.css-mistica.js";
|
|
69
69
|
import { sprinkles as He } from "./sprinkles.css-mistica.js";
|
|
70
70
|
import { useDesktopContainerType as Je } from "./desktop-container-type-context.js";
|
|
71
71
|
import { VIVO_NEW_SKIN as Qe } from "./skins/constants.js";
|
|
72
|
-
import { applyCssVars as
|
|
73
|
-
const
|
|
72
|
+
import { applyCssVars as ce } from "./utils/css.js";
|
|
73
|
+
const ie = (e, r)=>{
|
|
74
74
|
const t = Ae();
|
|
75
|
-
return
|
|
76
|
-
},
|
|
75
|
+
return we(r, !1) && t && !!e;
|
|
76
|
+
}, ae = (param)=>{
|
|
77
77
|
let { currentIndex: e, numPages: r, onPress: t } = param;
|
|
78
|
-
const o =
|
|
79
|
-
const d =
|
|
78
|
+
const o = Ne(), { isDesktopOrBigger: f } = oe(), m = (v)=>{
|
|
79
|
+
const d = v === e;
|
|
80
80
|
return o ? d ? Oe : De : d ? Ve : ze;
|
|
81
81
|
};
|
|
82
|
-
return /* @__PURE__ */ s(
|
|
82
|
+
return /* @__PURE__ */ s(Se, {
|
|
83
83
|
space: f ? 16 : 8,
|
|
84
84
|
alignItems: "center",
|
|
85
85
|
dataAttributes: {
|
|
@@ -87,7 +87,7 @@ const ce = (e, r)=>{
|
|
|
87
87
|
},
|
|
88
88
|
children: Array.from({
|
|
89
89
|
length: r
|
|
90
|
-
}, (
|
|
90
|
+
}, (v, d)=>/* @__PURE__ */ s(M, {
|
|
91
91
|
className: He({
|
|
92
92
|
display: "block",
|
|
93
93
|
padding: 0,
|
|
@@ -101,7 +101,7 @@ const ce = (e, r)=>{
|
|
|
101
101
|
})
|
|
102
102
|
}, d))
|
|
103
103
|
});
|
|
104
|
-
},
|
|
104
|
+
}, Z = (e, r, t)=>t ? typeof t == "number" ? t : t[e] || r[e] : r[e], Xe = (e, r)=>{
|
|
105
105
|
const t = {
|
|
106
106
|
mobile: 1,
|
|
107
107
|
tablet: 2,
|
|
@@ -112,14 +112,14 @@ const ce = (e, r)=>{
|
|
|
112
112
|
}
|
|
113
113
|
};
|
|
114
114
|
if (!r) return _object_spread_props(_object_spread({}, t), {
|
|
115
|
-
desktop:
|
|
115
|
+
desktop: Z(e, t.desktop)
|
|
116
116
|
});
|
|
117
117
|
if (typeof r == "number") return {
|
|
118
118
|
mobile: r,
|
|
119
119
|
tablet: r,
|
|
120
120
|
desktop: r
|
|
121
121
|
};
|
|
122
|
-
const o =
|
|
122
|
+
const o = Z(e, t.desktop, r.desktop);
|
|
123
123
|
return _object_spread_props(_object_spread({}, t, r), {
|
|
124
124
|
desktop: o
|
|
125
125
|
});
|
|
@@ -128,34 +128,34 @@ const ce = (e, r)=>{
|
|
|
128
128
|
const t = Math.ceil(e.length / r), o = [];
|
|
129
129
|
for(let f = 0; f < e.length; f += t)o.push(e[f]);
|
|
130
130
|
return o[o.length - 1] = e[e.length - t], o;
|
|
131
|
-
},
|
|
131
|
+
}, Ze = (e, r)=>{
|
|
132
132
|
const t = [];
|
|
133
133
|
for(let o = 0; o < r.length; o++)o === 0 ? t.push(r[0]) : t.push((r[o] + r[o - 1]) / 2);
|
|
134
134
|
for(let o = t.length - 1; o >= 0; o--)if (e - t[o] >= -1) return o;
|
|
135
135
|
return 0;
|
|
136
|
-
},
|
|
137
|
-
let { items: e, itemStyle: r, itemClassName: t, withBullets: o, renderBullets: f, initialActiveItem: m, itemsPerPage:
|
|
138
|
-
const { texts: T, platformOverrides: x, skinName: y } = re(), c = Je(), i =
|
|
136
|
+
}, ue = 5e3, fe = (param)=>{
|
|
137
|
+
let { items: e, itemStyle: r, itemClassName: t, withBullets: o, renderBullets: f, initialActiveItem: m, itemsPerPage: v, itemsToScroll: d, mobilePageOffset: p, gap: N, free: R, centered: A, autoplay: b, onPageChange: P, dataAttributes: F } = param;
|
|
138
|
+
const { texts: T, platformOverrides: x, skinName: y } = re(), c = Je(), i = Xe(c || "large", v), { 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
139
|
scrollLeft: 0,
|
|
140
140
|
scrollRight: 0
|
|
141
|
-
}), [K,
|
|
141
|
+
}), [K, me] = n.useState([]), W = n.useMemo(()=>ee(K, S), [
|
|
142
142
|
K,
|
|
143
143
|
S
|
|
144
|
-
]), O = d ? ee(K, Math.ceil(e.length / d)) : W,
|
|
144
|
+
]), O = d ? ee(K, Math.ceil(e.length / d)) : W, pe = q !== 0, ge = G !== 0;
|
|
145
145
|
n.useEffect(()=>{
|
|
146
146
|
if (g.current) {
|
|
147
147
|
const l = g.current, a = ()=>{
|
|
148
|
-
const { scrollWidth: z, clientWidth:
|
|
149
|
-
|
|
148
|
+
const { scrollWidth: z, clientWidth: B } = l, _ = Math.round(l.scrollLeft), j = Math.round(z - (_ + B));
|
|
149
|
+
he({
|
|
150
150
|
scrollLeft: _,
|
|
151
151
|
scrollRight: j
|
|
152
152
|
});
|
|
153
153
|
}, u = ()=>{
|
|
154
154
|
const z = l.scrollWidth - l.clientWidth;
|
|
155
|
-
|
|
155
|
+
me(Array.from(l.querySelectorAll("[data-item]")).map((B, _)=>{
|
|
156
156
|
if (_ === e.length - 1) return z;
|
|
157
|
-
const j =
|
|
158
|
-
return Math.min(
|
|
157
|
+
const j = B.offsetLeft, Pe = parseInt(getComputedStyle(B).scrollMargin), xe = A && !w ? j - B.clientWidth / 2 : j;
|
|
158
|
+
return Math.min(xe - Pe - l.offsetLeft, z);
|
|
159
159
|
}));
|
|
160
160
|
};
|
|
161
161
|
a(), u(), l.addEventListener("scroll", a);
|
|
@@ -189,7 +189,7 @@ const ce = (e, r)=>{
|
|
|
189
189
|
}
|
|
190
190
|
}, [
|
|
191
191
|
W
|
|
192
|
-
]),
|
|
192
|
+
]), ve = n.useCallback(()=>{
|
|
193
193
|
const l = g.current;
|
|
194
194
|
if (l) {
|
|
195
195
|
const { scrollLeft: a } = l, u = [
|
|
@@ -213,7 +213,7 @@ const ce = (e, r)=>{
|
|
|
213
213
|
}
|
|
214
214
|
}, [
|
|
215
215
|
O
|
|
216
|
-
]),
|
|
216
|
+
]), H = ie(!!b, g);
|
|
217
217
|
n.useEffect(()=>{
|
|
218
218
|
m !== void 0 && D(Math.floor(m / I), !1);
|
|
219
219
|
}, [
|
|
@@ -221,8 +221,8 @@ const ce = (e, r)=>{
|
|
|
221
221
|
D,
|
|
222
222
|
I
|
|
223
223
|
]), n.useEffect(()=>{
|
|
224
|
-
if (
|
|
225
|
-
const l = typeof
|
|
224
|
+
if (H && b) {
|
|
225
|
+
const l = typeof b == "boolean" ? ue : b.time, a = typeof b == "object" && b.loop, u = setInterval(()=>{
|
|
226
226
|
var h;
|
|
227
227
|
q !== 0 ? Y() : a && ((h = g.current) == null || h.scrollTo({
|
|
228
228
|
left: 0,
|
|
@@ -232,12 +232,12 @@ const ce = (e, r)=>{
|
|
|
232
232
|
return ()=>clearInterval(u);
|
|
233
233
|
}
|
|
234
234
|
}, [
|
|
235
|
-
|
|
235
|
+
b,
|
|
236
236
|
Y,
|
|
237
237
|
q,
|
|
238
|
-
|
|
238
|
+
H
|
|
239
239
|
]);
|
|
240
|
-
const k =
|
|
240
|
+
const k = Ze(G, W), J = n.useRef(!m), Q = n.useRef(0);
|
|
241
241
|
n.useEffect(()=>{
|
|
242
242
|
if (P) {
|
|
243
243
|
const l = Math.min((k + 1) * I - 1, e.length - 1), a = [];
|
|
@@ -245,10 +245,10 @@ const ce = (e, r)=>{
|
|
|
245
245
|
const h = l - u;
|
|
246
246
|
h >= 0 && a.unshift(h);
|
|
247
247
|
}
|
|
248
|
-
|
|
248
|
+
J.current ? Q.current !== k && P({
|
|
249
249
|
pageIndex: k,
|
|
250
250
|
shownItemIndexes: a
|
|
251
|
-
}) :
|
|
251
|
+
}) : J.current = a.includes(m || 0), Q.current = k;
|
|
252
252
|
}
|
|
253
253
|
}, [
|
|
254
254
|
k,
|
|
@@ -262,44 +262,44 @@ const ce = (e, r)=>{
|
|
|
262
262
|
numPages: S,
|
|
263
263
|
currentIndex: k,
|
|
264
264
|
onPress: D
|
|
265
|
-
}) : o && (V = S > 1 && /* @__PURE__ */ s(
|
|
265
|
+
}) : o && (V = S > 1 && /* @__PURE__ */ s(ae, {
|
|
266
266
|
numPages: S,
|
|
267
267
|
currentIndex: k,
|
|
268
268
|
onPress: D
|
|
269
269
|
}));
|
|
270
|
-
const be = "64px",
|
|
271
|
-
return /* @__PURE__ */
|
|
270
|
+
const be = "64px", Ie = "36px";
|
|
271
|
+
return /* @__PURE__ */ $(ke, {
|
|
272
272
|
space: 24,
|
|
273
273
|
dataAttributes: _object_spread({
|
|
274
274
|
"component-name": "Carousel"
|
|
275
275
|
}, F),
|
|
276
276
|
children: [
|
|
277
|
-
/* @__PURE__ */
|
|
277
|
+
/* @__PURE__ */ $("div", {
|
|
278
278
|
className: _e,
|
|
279
279
|
children: [
|
|
280
|
-
/* @__PURE__ */ s(
|
|
280
|
+
/* @__PURE__ */ s(E, {
|
|
281
281
|
isInverse: !1,
|
|
282
|
-
children: /* @__PURE__ */ s(
|
|
282
|
+
children: /* @__PURE__ */ s(M, {
|
|
283
283
|
className: je,
|
|
284
284
|
"aria-label": T.carouselPrevButton,
|
|
285
|
-
onPress:
|
|
286
|
-
disabled: !
|
|
285
|
+
onPress: ve,
|
|
286
|
+
disabled: !ge,
|
|
287
287
|
children: /* @__PURE__ */ s(te, {})
|
|
288
288
|
})
|
|
289
289
|
}),
|
|
290
290
|
/* @__PURE__ */ s("div", {
|
|
291
|
-
className:
|
|
291
|
+
className: X(Fe, {
|
|
292
292
|
[Ue]: A,
|
|
293
293
|
[qe]: S > 1
|
|
294
294
|
}),
|
|
295
|
-
style: _object_spread_props(_object_spread({},
|
|
295
|
+
style: _object_spread_props(_object_spread({}, ce(_object_spread({
|
|
296
296
|
[L.itemsPerPageDesktop]: String(i.desktop),
|
|
297
297
|
[L.itemsPerPageTablet]: String(i.tablet),
|
|
298
298
|
[L.itemsPerPageMobile]: String(i.mobile)
|
|
299
299
|
}, p === "large" ? {
|
|
300
300
|
[L.mobilePageOffset]: be
|
|
301
301
|
} : y === Qe ? {
|
|
302
|
-
[L.mobilePageOffset]:
|
|
302
|
+
[L.mobilePageOffset]: Ie
|
|
303
303
|
} : {}, N !== void 0 ? {
|
|
304
304
|
[L.gap]: String(N)
|
|
305
305
|
} : {}))), {
|
|
@@ -313,7 +313,7 @@ const ce = (e, r)=>{
|
|
|
313
313
|
}),
|
|
314
314
|
ref: g,
|
|
315
315
|
children: e.map((l, a)=>/* @__PURE__ */ s("div", {
|
|
316
|
-
className:
|
|
316
|
+
className: X(Ke, t),
|
|
317
317
|
style: _object_spread_props(_object_spread({}, r), {
|
|
318
318
|
scrollSnapStop: ne(x) ? "always" : "normal"
|
|
319
319
|
}),
|
|
@@ -321,27 +321,27 @@ const ce = (e, r)=>{
|
|
|
321
321
|
children: l
|
|
322
322
|
}, a))
|
|
323
323
|
}),
|
|
324
|
-
/* @__PURE__ */ s(
|
|
324
|
+
/* @__PURE__ */ s(E, {
|
|
325
325
|
isInverse: !1,
|
|
326
|
-
children: /* @__PURE__ */ s(
|
|
326
|
+
children: /* @__PURE__ */ s(M, {
|
|
327
327
|
className: Ye,
|
|
328
328
|
"aria-label": T.carouselNextButton,
|
|
329
329
|
onPress: Y,
|
|
330
|
-
disabled: !
|
|
330
|
+
disabled: !pe,
|
|
331
331
|
children: /* @__PURE__ */ s(se, {})
|
|
332
332
|
})
|
|
333
333
|
})
|
|
334
334
|
]
|
|
335
335
|
}),
|
|
336
336
|
V && /* @__PURE__ */ s("div", {
|
|
337
|
-
className:
|
|
337
|
+
className: $e,
|
|
338
338
|
children: V
|
|
339
339
|
})
|
|
340
340
|
]
|
|
341
341
|
});
|
|
342
|
-
}, It = (e)=>/* @__PURE__ */ s(
|
|
343
|
-
let { items: e, itemStyle: r, itemClassName: t, withBullets: o, renderBullets: f, initialActiveItem: m, onPageChange:
|
|
344
|
-
return s(
|
|
342
|
+
}, It = (e)=>/* @__PURE__ */ s(fe, _object_spread({}, e)), Pt = (param)=>/* @__PURE__ */ {
|
|
343
|
+
let { items: e, itemStyle: r, itemClassName: t, withBullets: o, renderBullets: f, initialActiveItem: m, onPageChange: v, dataAttributes: d } = param;
|
|
344
|
+
return s(fe, {
|
|
345
345
|
items: e,
|
|
346
346
|
itemStyle: r,
|
|
347
347
|
itemClassName: t,
|
|
@@ -356,21 +356,21 @@ const ce = (e, r)=>{
|
|
|
356
356
|
withBullets: o,
|
|
357
357
|
renderBullets: f,
|
|
358
358
|
initialActiveItem: m,
|
|
359
|
-
onPageChange:
|
|
359
|
+
onPageChange: v,
|
|
360
360
|
dataAttributes: d
|
|
361
361
|
});
|
|
362
|
-
},
|
|
362
|
+
}, de = /*#__PURE__*/ n.createContext(!1), xt = ()=>n.useContext(de), et = (param)=>/* @__PURE__ */ {
|
|
363
363
|
let { children: e } = param;
|
|
364
|
-
return s(
|
|
364
|
+
return s(de.Provider, {
|
|
365
365
|
value: !0,
|
|
366
366
|
children: e
|
|
367
367
|
});
|
|
368
368
|
}, wt = (param)=>{
|
|
369
369
|
let { items: e, withBullets: r, autoplay: t, onPageChange: o, dataAttributes: f, inverseBullets: m = !0 } = param;
|
|
370
|
-
const { texts:
|
|
370
|
+
const { texts: v, platformOverrides: d } = re(), p = n.useRef(null), [{ scrollLeft: N, scrollRight: R }, A] = n.useState({
|
|
371
371
|
scrollLeft: 0,
|
|
372
372
|
scrollRight: 0
|
|
373
|
-
}),
|
|
373
|
+
}), b = n.useCallback(()=>{
|
|
374
374
|
const c = p.current;
|
|
375
375
|
c && c.scrollBy({
|
|
376
376
|
left: -c.clientWidth,
|
|
@@ -402,10 +402,10 @@ const ce = (e, r)=>{
|
|
|
402
402
|
}, [
|
|
403
403
|
e.length
|
|
404
404
|
]);
|
|
405
|
-
const y =
|
|
405
|
+
const y = ie(!!t, p);
|
|
406
406
|
return n.useEffect(()=>{
|
|
407
407
|
if (y && t) {
|
|
408
|
-
const c = typeof t == "boolean" ?
|
|
408
|
+
const c = typeof t == "boolean" ? ue : t.time, i = typeof t == "object" && t.loop, w = setInterval(()=>{
|
|
409
409
|
var C;
|
|
410
410
|
R !== 0 ? P() : i && ((C = p.current) == null || C.scrollTo({
|
|
411
411
|
left: 0,
|
|
@@ -425,24 +425,26 @@ const ce = (e, r)=>{
|
|
|
425
425
|
x,
|
|
426
426
|
o
|
|
427
427
|
]), /* @__PURE__ */ s(et, {
|
|
428
|
-
children: /* @__PURE__ */
|
|
429
|
-
className:
|
|
428
|
+
children: /* @__PURE__ */ $("div", _object_spread_props(_object_spread({
|
|
429
|
+
className: Be
|
|
430
430
|
}, Ce(f, "SlideShow")), {
|
|
431
431
|
children: [
|
|
432
|
-
/* @__PURE__ */ s(
|
|
432
|
+
/* @__PURE__ */ s(E, {
|
|
433
433
|
isInverse: !1,
|
|
434
|
-
children: /* @__PURE__ */ s(
|
|
435
|
-
className:
|
|
436
|
-
"aria-label":
|
|
437
|
-
onPress:
|
|
434
|
+
children: /* @__PURE__ */ s(M, {
|
|
435
|
+
className: Ee,
|
|
436
|
+
"aria-label": v.carouselPrevButton,
|
|
437
|
+
onPress: b,
|
|
438
438
|
disabled: !T,
|
|
439
439
|
children: /* @__PURE__ */ s(te, {})
|
|
440
440
|
})
|
|
441
441
|
}),
|
|
442
|
-
/* @__PURE__ */ s(
|
|
443
|
-
|
|
442
|
+
/* @__PURE__ */ s("div", {
|
|
443
|
+
style: ce({
|
|
444
|
+
[Ge.mediaBorderRadius]: "0px"
|
|
445
|
+
}),
|
|
444
446
|
children: /* @__PURE__ */ s("div", {
|
|
445
|
-
className:
|
|
447
|
+
className: Me,
|
|
446
448
|
ref: p,
|
|
447
449
|
children: e.map((c, i)=>/* @__PURE__ */ s("div", {
|
|
448
450
|
className: Te,
|
|
@@ -453,21 +455,21 @@ const ce = (e, r)=>{
|
|
|
453
455
|
}, i))
|
|
454
456
|
})
|
|
455
457
|
}),
|
|
456
|
-
/* @__PURE__ */ s(
|
|
458
|
+
/* @__PURE__ */ s(E, {
|
|
457
459
|
isInverse: !1,
|
|
458
|
-
children: /* @__PURE__ */ s(
|
|
460
|
+
children: /* @__PURE__ */ s(M, {
|
|
459
461
|
className: ye,
|
|
460
|
-
"aria-label":
|
|
462
|
+
"aria-label": v.carouselNextButton,
|
|
461
463
|
onPress: P,
|
|
462
464
|
disabled: !F,
|
|
463
465
|
children: /* @__PURE__ */ s(se, {})
|
|
464
466
|
})
|
|
465
467
|
}),
|
|
466
|
-
r && e.length > 1 && /* @__PURE__ */ s(
|
|
468
|
+
r && e.length > 1 && /* @__PURE__ */ s(E, {
|
|
467
469
|
isInverse: m,
|
|
468
470
|
children: /* @__PURE__ */ s("div", {
|
|
469
471
|
className: We,
|
|
470
|
-
children: /* @__PURE__ */ s(
|
|
472
|
+
children: /* @__PURE__ */ s(ae, {
|
|
471
473
|
numPages: e.length,
|
|
472
474
|
currentIndex: x
|
|
473
475
|
})
|
|
@@ -477,4 +479,4 @@ const ce = (e, r)=>{
|
|
|
477
479
|
}))
|
|
478
480
|
});
|
|
479
481
|
};
|
|
480
|
-
export { It as Carousel, Pt as CenteredCarousel, et as IsInsideSlideshowProvider,
|
|
482
|
+
export { It as Carousel, Pt as CenteredCarousel, et as IsInsideSlideshowProvider, ae as PageBullets, wt as Slideshow, xt as useIsInsideSlideshowContext };
|
package/dist-es/checkbox.js
CHANGED
|
@@ -53,7 +53,7 @@ function _object_spread_props(target, source) {
|
|
|
53
53
|
}
|
|
54
54
|
import { jsx as a, jsxs as A } from "react/jsx-runtime";
|
|
55
55
|
import * as m from "react";
|
|
56
|
-
import { SPACE as D } from "./utils/
|
|
56
|
+
import { SPACE as D } from "./utils/keys.js";
|
|
57
57
|
import { useControlProps as L } from "./form-context.js";
|
|
58
58
|
import N from "./inline.js";
|
|
59
59
|
import { Text3 as f } from "./text.js";
|
|
@@ -65,7 +65,7 @@ import { vars as v } from "./skins/skin-contract.css-mistica.js";
|
|
|
65
65
|
import { combineRefs as z } from "./utils/common.js";
|
|
66
66
|
const B = (param)=>{
|
|
67
67
|
let { isChecked: e, disabled: c } = param;
|
|
68
|
-
const { isIos:
|
|
68
|
+
const { isIos: l } = R(), o = l ? /* @__PURE__ */ a("svg", {
|
|
69
69
|
viewBox: "0 0 10 8",
|
|
70
70
|
width: "10",
|
|
71
71
|
height: "8",
|
|
@@ -89,47 +89,47 @@ const B = (param)=>{
|
|
|
89
89
|
})
|
|
90
90
|
});
|
|
91
91
|
return /* @__PURE__ */ a("div", {
|
|
92
|
-
className: n(j[e ? "checked" :
|
|
92
|
+
className: n(j[e ? "checked" : l ? "ios" : "rest"], {
|
|
93
93
|
[x]: c
|
|
94
94
|
}),
|
|
95
|
-
children:
|
|
95
|
+
children: o
|
|
96
96
|
});
|
|
97
97
|
}, K = /*#__PURE__*/ m.forwardRef((e, c)=>{
|
|
98
|
-
const
|
|
98
|
+
const l = P(e["aria-labelledby"]), o = e["aria-label"], C = o || e["aria-labelledby"], { defaultValue: g, value: t, onChange: s, focusableRef: w, disabled: i } = L({
|
|
99
99
|
name: e.name,
|
|
100
100
|
value: e.checked,
|
|
101
101
|
defaultValue: e.defaultChecked,
|
|
102
102
|
onChange: e.onChange,
|
|
103
103
|
disabled: e.disabled
|
|
104
|
-
}), [
|
|
105
|
-
t === void 0 ? (y(!
|
|
106
|
-
}, I = (
|
|
107
|
-
|
|
104
|
+
}), [r, y] = m.useState(!!g), h = ()=>{
|
|
105
|
+
t === void 0 ? (y(!r), s(!r)) : s(!t);
|
|
106
|
+
}, I = (d)=>{
|
|
107
|
+
d.key === D && (d.preventDefault(), d.stopPropagation(), h());
|
|
108
108
|
}, b = /* @__PURE__ */ a(B, {
|
|
109
109
|
disabled: i,
|
|
110
|
-
isChecked: t !== null && t !== void 0 ? t :
|
|
110
|
+
isChecked: t !== null && t !== void 0 ? t : r
|
|
111
111
|
});
|
|
112
112
|
return(// When the checkbox is disabled, it shouldn't be focusable
|
|
113
113
|
// eslint-disable-next-line jsx-a11y/no-static-element-interactions
|
|
114
114
|
/* @__PURE__ */ a("div", _object_spread_props(_object_spread({
|
|
115
115
|
id: e.id,
|
|
116
116
|
role: e.role || "checkbox",
|
|
117
|
-
"aria-checked": t !== null && t !== void 0 ? t :
|
|
117
|
+
"aria-checked": t !== null && t !== void 0 ? t : r,
|
|
118
118
|
onKeyDown: i ? void 0 : I,
|
|
119
|
-
onClick: (
|
|
120
|
-
|
|
119
|
+
onClick: (d)=>{
|
|
120
|
+
d.stopPropagation(), i || h();
|
|
121
121
|
},
|
|
122
122
|
tabIndex: i ? void 0 : 0,
|
|
123
123
|
ref: z(c, w),
|
|
124
124
|
className: i ? E : V,
|
|
125
|
-
"aria-label":
|
|
126
|
-
"aria-labelledby":
|
|
125
|
+
"aria-label": o,
|
|
126
|
+
"aria-labelledby": o ? void 0 : l,
|
|
127
127
|
"aria-disabled": i
|
|
128
128
|
}, S(e.dataAttributes, "Checkbox")), {
|
|
129
129
|
children: e.render ? e.render({
|
|
130
130
|
controlElement: b,
|
|
131
|
-
labelId:
|
|
132
|
-
checked: t !== null && t !== void 0 ? t :
|
|
131
|
+
labelId: l,
|
|
132
|
+
checked: t !== null && t !== void 0 ? t : r,
|
|
133
133
|
disabled: !!i
|
|
134
134
|
}) : /* @__PURE__ */ A(N, {
|
|
135
135
|
space: 16,
|
|
@@ -148,7 +148,7 @@ const B = (param)=>{
|
|
|
148
148
|
e.children && /* @__PURE__ */ a(f, {
|
|
149
149
|
regular: !0,
|
|
150
150
|
as: "div",
|
|
151
|
-
id:
|
|
151
|
+
id: l,
|
|
152
152
|
role: C ? "presentation" : void 0,
|
|
153
153
|
children: /* @__PURE__ */ a("span", {
|
|
154
154
|
className: i ? x : "",
|
|
@@ -3,5 +3,5 @@ import "./advanced-data-card.css.ts.vanilla.css-mistica.js";
|
|
|
3
3
|
var a = "_1x00fru3 _1x00fru1 _1y2v1nf90 _1y2v1nfa9 _1y2v1nfba _1y2v1nfbw _1y2v1nfbm _1y2v1nf7x", _ = {
|
|
4
4
|
default: "_1x00fruk",
|
|
5
5
|
mobile: "_1x00frul"
|
|
6
|
-
}, n = "_1x00frur", v = "_1x00frun", t = "_1x00fruo _1x00frun", u = "_1x00fru9 _1x00fru1 _1y2v1nf90 _1y2v1nfa9 _1y2v1nf6c _1y2v1nf7x", x = "_1x00frud _1y2v1nfb4 _1y2v1nfba _1y2v1nfbw _1y2v1nfbg _1y2v1nfbx _1y2v1nfce _1x00frub", y = "_1x00frui", o = "_1x00fruq _1y2v1nfba _1y2v1nfbf", b = "_1y2v1nfba _1y2v1nfbw _1y2v1nfbp _1y2v1nfdj", i = "_1x00frum", e = "
|
|
7
|
-
export { a as actions, _ as actionsVariants, n as adjustButtonLink, v as button, t as buttonMobile, u as cardContentStyle, x as dataCard, y as divider, o as footerDirection, b as footerText, i as marginRightAuto, e as marginRightButton, d as minHeight, c as paddingX, l as touchableArea,
|
|
6
|
+
}, n = "_1x00frur", v = "_1x00frun", t = "_1x00fruo _1x00frun", u = "_1x00fru9 _1x00fru1 _1y2v1nf90 _1y2v1nfa9 _1y2v1nf6c _1y2v1nf7x", x = "_1x00frud _1y2v1nfb4 _1y2v1nfba _1y2v1nfbw _1y2v1nfbg _1y2v1nfbx _1y2v1nfce _1x00frub", y = "_1x00frui", o = "_1x00fruq _1y2v1nfba _1y2v1nfbf", b = "_1y2v1nfba _1y2v1nfbw _1y2v1nfbp _1y2v1nfdj", i = "_1x00frum", e = "_1y2v1nffg", d = "_1x00frub", c = "_1x00fru1 _1y2v1nf90 _1y2v1nfa9", l = "_1x00fru4", g = "_1x00fru7", m = "_1x00fru5", h = "_1x00frua";
|
|
7
|
+
export { a as actions, _ as actionsVariants, n as adjustButtonLink, v as button, t as buttonMobile, u as cardContentStyle, x as dataCard, y as divider, o as footerDirection, b as footerText, i as marginRightAuto, e as marginRightButton, d as minHeight, c as paddingX, l as touchableArea, g as touchableCardOverlay, m as touchableContainer, h as zindex };
|