@danielcruzcode/ui-core 0.1.0 → 0.1.2
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/dist/components/Carousel/Carousel.d.ts +2 -3
- package/dist/index.cjs11.js +1 -1
- package/dist/index.cjs12.js +1 -1
- package/dist/index.cjs14.js +1 -1
- package/dist/index.cjs16.js +1 -1
- package/dist/index.cjs17.js +1 -1
- package/dist/index.cjs18.js +1 -1
- package/dist/index.cjs19.js +1 -1
- package/dist/index.cjs20.js +1 -1
- package/dist/index.cjs21.js +1 -1
- package/dist/index.cjs22.js +1 -1
- package/dist/index.cjs23.js +1 -1
- package/dist/index.cjs25.js +1 -1
- package/dist/index.cjs26.js +1 -0
- package/dist/index.cjs28.js +1 -1
- package/dist/index.cjs29.js +1 -1
- package/dist/index.cjs30.js +1 -1
- package/dist/index.cjs4.js +1 -1
- package/dist/{index.cjs43.js → index.cjs40.js} +1 -1
- package/dist/index.cjs5.js +1 -1
- package/dist/index.cjs6.js +1 -1
- package/dist/index.cjs7.js +1 -1
- package/dist/index.cjs8.js +1 -1
- package/dist/index.cjs9.js +1 -1
- package/dist/index.esm11.js +1 -1
- package/dist/index.esm12.js +1 -1
- package/dist/index.esm14.js +4 -3
- package/dist/index.esm16.js +3 -4
- package/dist/index.esm17.js +8 -8
- package/dist/index.esm18.js +8 -7
- package/dist/index.esm19.js +134 -13
- package/dist/index.esm20.js +224 -10
- package/dist/index.esm21.js +116 -122
- package/dist/index.esm22.js +234 -213
- package/dist/index.esm23.js +9 -128
- package/dist/index.esm25.js +7 -7
- package/dist/index.esm26.js +26 -0
- package/dist/index.esm28.js +3 -22
- package/dist/index.esm29.js +2 -4
- package/dist/index.esm30.js +12 -2
- package/dist/index.esm4.js +1 -1
- package/dist/{index.esm43.js → index.esm40.js} +2 -2
- package/dist/index.esm5.js +5 -5
- package/dist/index.esm6.js +1 -1
- package/dist/index.esm7.js +1 -1
- package/dist/index.esm8.js +1 -1
- package/dist/index.esm9.js +1 -1
- package/package.json +11 -7
- package/styles.css +1 -0
- package/dist/components/Carousel/Carousel.js +0 -35
- package/dist/components/Carousel/Carousel.js.map +0 -1
- package/dist/components/Carousel/index.js +0 -2
- package/dist/components/Carousel/index.js.map +0 -1
- package/dist/index.cjs24.js +0 -1
- package/dist/index.esm24.js +0 -247
- /package/dist/{index.cjs42.js → index.cjs39.js} +0 -0
- /package/dist/{index.cjs44.js → index.cjs41.js} +0 -0
- /package/dist/{index.esm42.js → index.esm39.js} +0 -0
- /package/dist/{index.esm44.js → index.esm41.js} +0 -0
package/dist/index.esm22.js
CHANGED
|
@@ -1,226 +1,247 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
O({
|
|
12
|
-
pagination: {
|
|
13
|
-
el: null,
|
|
14
|
-
bulletElement: "span",
|
|
15
|
-
clickable: !1,
|
|
16
|
-
hideOnClick: !1,
|
|
17
|
-
renderBullet: null,
|
|
18
|
-
renderProgressbar: null,
|
|
19
|
-
renderFraction: null,
|
|
20
|
-
renderCustom: null,
|
|
21
|
-
progressbarOpposite: !1,
|
|
22
|
-
type: "bullets",
|
|
23
|
-
// 'bullets' or 'progressbar' or 'fraction' or 'custom'
|
|
24
|
-
dynamicBullets: !1,
|
|
25
|
-
dynamicMainBullets: 1,
|
|
26
|
-
formatFractionCurrent: (t) => t,
|
|
27
|
-
formatFractionTotal: (t) => t,
|
|
28
|
-
bulletClass: `${f}-bullet`,
|
|
29
|
-
bulletActiveClass: `${f}-bullet-active`,
|
|
30
|
-
modifierClass: `${f}-`,
|
|
31
|
-
currentClass: `${f}-current`,
|
|
32
|
-
totalClass: `${f}-total`,
|
|
33
|
-
hiddenClass: `${f}-hidden`,
|
|
34
|
-
progressbarFillClass: `${f}-progressbar-fill`,
|
|
35
|
-
progressbarOppositeClass: `${f}-progressbar-opposite`,
|
|
36
|
-
clickableClass: `${f}-clickable`,
|
|
37
|
-
lockClass: `${f}-lock`,
|
|
38
|
-
horizontalClass: `${f}-horizontal`,
|
|
39
|
-
verticalClass: `${f}-vertical`,
|
|
40
|
-
paginationDisabledClass: `${f}-disabled`
|
|
1
|
+
import i, { forwardRef as F, useState as O, useRef as p, useEffect as B, useLayoutEffect as K, createContext as M } from "react";
|
|
2
|
+
import { S as Q } from "./index.esm39.js";
|
|
3
|
+
import { g as X, m as Y, a as Z, u as ee } from "./index.esm40.js";
|
|
4
|
+
import { d as q, w as re, n as te, b as ne, a as se, e as T, u as ae } from "./index.esm41.js";
|
|
5
|
+
function L() {
|
|
6
|
+
return L = Object.assign ? Object.assign.bind() : function(s) {
|
|
7
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
8
|
+
var n = arguments[t];
|
|
9
|
+
for (var r in n)
|
|
10
|
+
Object.prototype.hasOwnProperty.call(n, r) && (s[r] = n[r]);
|
|
41
11
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
12
|
+
return s;
|
|
13
|
+
}, L.apply(this, arguments);
|
|
14
|
+
}
|
|
15
|
+
function D(s) {
|
|
16
|
+
return s.type && s.type.displayName && s.type.displayName.includes("SwiperSlide");
|
|
17
|
+
}
|
|
18
|
+
function H(s) {
|
|
19
|
+
const t = [];
|
|
20
|
+
return i.Children.toArray(s).forEach((n) => {
|
|
21
|
+
D(n) ? t.push(n) : n.props && n.props.children && H(n.props.children).forEach((r) => t.push(r));
|
|
22
|
+
}), t;
|
|
23
|
+
}
|
|
24
|
+
function ie(s) {
|
|
25
|
+
const t = [], n = {
|
|
26
|
+
"container-start": [],
|
|
27
|
+
"container-end": [],
|
|
28
|
+
"wrapper-start": [],
|
|
29
|
+
"wrapper-end": []
|
|
45
30
|
};
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
t && (t = t[`${l === "prev" ? "previous" : "next"}ElementSibling`], t && (t.classList.add(`${e}-${l}`), t = t[`${l === "prev" ? "previous" : "next"}ElementSibling`], t && t.classList.add(`${e}-${l}-${l}`)));
|
|
55
|
-
}
|
|
56
|
-
function H(t, l, e) {
|
|
57
|
-
if (t = t % e, l = l % e, l === t + 1)
|
|
58
|
-
return "next";
|
|
59
|
-
if (l === t - 1)
|
|
60
|
-
return "previous";
|
|
61
|
-
}
|
|
62
|
-
function D(t) {
|
|
63
|
-
const l = t.target.closest($(a.params.pagination.bulletClass));
|
|
64
|
-
if (!l)
|
|
65
|
-
return;
|
|
66
|
-
t.preventDefault();
|
|
67
|
-
const e = P(l) * a.params.slidesPerGroup;
|
|
68
|
-
if (a.params.loop) {
|
|
69
|
-
if (a.realIndex === e) return;
|
|
70
|
-
const n = H(a.realIndex, e, a.slides.length);
|
|
71
|
-
n === "next" ? a.slideNext() : n === "previous" ? a.slidePrev() : a.slideToLoop(e);
|
|
31
|
+
return i.Children.toArray(s).forEach((r) => {
|
|
32
|
+
if (D(r))
|
|
33
|
+
t.push(r);
|
|
34
|
+
else if (r.props && r.props.slot && n[r.props.slot])
|
|
35
|
+
n[r.props.slot].push(r);
|
|
36
|
+
else if (r.props && r.props.children) {
|
|
37
|
+
const u = H(r.props.children);
|
|
38
|
+
u.length > 0 ? u.forEach((d) => t.push(d)) : n["container-end"].push(r);
|
|
72
39
|
} else
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
40
|
+
n["container-end"].push(r);
|
|
41
|
+
}), {
|
|
42
|
+
slides: t,
|
|
43
|
+
slots: n
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function oe(s, t, n) {
|
|
47
|
+
if (!n) return null;
|
|
48
|
+
const r = (a) => {
|
|
49
|
+
let o = a;
|
|
50
|
+
return a < 0 ? o = t.length + a : o >= t.length && (o = o - t.length), o;
|
|
51
|
+
}, u = s.isHorizontal() ? {
|
|
52
|
+
[s.rtlTranslate ? "right" : "left"]: `${n.offset}px`
|
|
53
|
+
} : {
|
|
54
|
+
top: `${n.offset}px`
|
|
55
|
+
}, {
|
|
56
|
+
from: d,
|
|
57
|
+
to: C
|
|
58
|
+
} = n, g = s.params.loop ? -t.length : 0, S = s.params.loop ? t.length * 2 : t.length, w = [];
|
|
59
|
+
for (let a = g; a < S; a += 1)
|
|
60
|
+
a >= d && a <= C && w.push(t[r(a)]);
|
|
61
|
+
return w.map((a, o) => /* @__PURE__ */ i.cloneElement(a, {
|
|
62
|
+
swiper: s,
|
|
63
|
+
style: u,
|
|
64
|
+
key: a.props.virtualIndex || a.key || `slide-${o}`
|
|
65
|
+
}));
|
|
66
|
+
}
|
|
67
|
+
function N(s, t) {
|
|
68
|
+
return typeof window > "u" ? B(s, t) : K(s, t);
|
|
69
|
+
}
|
|
70
|
+
const V = /* @__PURE__ */ M(null), le = /* @__PURE__ */ M(null), ue = /* @__PURE__ */ F(({
|
|
71
|
+
className: s,
|
|
72
|
+
tag: t = "div",
|
|
73
|
+
wrapperTag: n = "div",
|
|
74
|
+
children: r,
|
|
75
|
+
onSwiper: u,
|
|
76
|
+
...d
|
|
77
|
+
} = {}, C) => {
|
|
78
|
+
let g = !1;
|
|
79
|
+
const [S, w] = O("swiper"), [a, o] = O(null), [h, R] = O(!1), $ = p(!1), m = p(null), e = p(null), b = p(null), j = p(null), c = p(null), x = p(null), P = p(null), _ = p(null), {
|
|
80
|
+
params: f,
|
|
81
|
+
passedParams: z,
|
|
82
|
+
rest: U,
|
|
83
|
+
events: v
|
|
84
|
+
} = X(d), {
|
|
85
|
+
slides: y,
|
|
86
|
+
slots: k
|
|
87
|
+
} = ie(r), I = () => {
|
|
88
|
+
R(!h);
|
|
89
|
+
};
|
|
90
|
+
Object.assign(f.on, {
|
|
91
|
+
_containerClasses(l, E) {
|
|
92
|
+
w(E);
|
|
112
93
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
function B() {
|
|
131
|
-
const t = a.params.pagination;
|
|
132
|
-
if (k()) return;
|
|
133
|
-
const l = a.virtual && a.params.virtual.enabled ? a.virtual.slides.length : a.grid && a.params.grid.rows > 1 ? a.slides.length / Math.ceil(a.params.grid.rows) : a.slides.length;
|
|
134
|
-
let e = a.pagination.el;
|
|
135
|
-
e = m(e);
|
|
136
|
-
let n = "";
|
|
137
|
-
if (t.type === "bullets") {
|
|
138
|
-
let c = a.params.loop ? Math.ceil(l / a.params.slidesPerGroup) : a.snapGrid.length;
|
|
139
|
-
a.params.freeMode && a.params.freeMode.enabled && c > l && (c = l);
|
|
140
|
-
for (let C = 0; C < c; C += 1)
|
|
141
|
-
t.renderBullet ? n += t.renderBullet.call(a, C, t.bulletClass) : n += `<${t.bulletElement} ${a.isElement ? 'part="bullet"' : ""} class="${t.bulletClass}"></${t.bulletElement}>`;
|
|
94
|
+
});
|
|
95
|
+
const A = () => {
|
|
96
|
+
Object.assign(f.on, v), g = !0;
|
|
97
|
+
const l = {
|
|
98
|
+
...f
|
|
99
|
+
};
|
|
100
|
+
if (delete l.wrapperClass, e.current = new Q(l), e.current.virtual && e.current.params.virtual.enabled) {
|
|
101
|
+
e.current.virtual.slides = y;
|
|
102
|
+
const E = {
|
|
103
|
+
cache: !1,
|
|
104
|
+
slides: y,
|
|
105
|
+
renderExternal: o,
|
|
106
|
+
renderExternalUpdate: !1
|
|
107
|
+
};
|
|
108
|
+
T(e.current.params.virtual, E), T(e.current.originalParams.virtual, E);
|
|
142
109
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
110
|
+
};
|
|
111
|
+
m.current || A(), e.current && e.current.on("_beforeBreakpoint", I);
|
|
112
|
+
const W = () => {
|
|
113
|
+
g || !v || !e.current || Object.keys(v).forEach((l) => {
|
|
114
|
+
e.current.on(l, v[l]);
|
|
115
|
+
});
|
|
116
|
+
}, G = () => {
|
|
117
|
+
!v || !e.current || Object.keys(v).forEach((l) => {
|
|
118
|
+
e.current.off(l, v[l]);
|
|
150
119
|
});
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
120
|
+
};
|
|
121
|
+
B(() => () => {
|
|
122
|
+
e.current && e.current.off("_beforeBreakpoint", I);
|
|
123
|
+
}), B(() => {
|
|
124
|
+
!$.current && e.current && (e.current.emitSlidesClasses(), $.current = !0);
|
|
125
|
+
}), N(() => {
|
|
126
|
+
if (C && (C.current = m.current), !!m.current)
|
|
127
|
+
return e.current.destroyed && A(), Y({
|
|
128
|
+
el: m.current,
|
|
129
|
+
nextEl: c.current,
|
|
130
|
+
prevEl: x.current,
|
|
131
|
+
paginationEl: P.current,
|
|
132
|
+
scrollbarEl: _.current,
|
|
133
|
+
swiper: e.current
|
|
134
|
+
}, f), u && !e.current.destroyed && u(e.current), () => {
|
|
135
|
+
e.current && !e.current.destroyed && e.current.destroy(!0, !1);
|
|
136
|
+
};
|
|
137
|
+
}, []), N(() => {
|
|
138
|
+
W();
|
|
139
|
+
const l = Z(z, b.current, y, j.current, (E) => E.key);
|
|
140
|
+
return b.current = z, j.current = y, l.length && e.current && !e.current.destroyed && ae({
|
|
141
|
+
swiper: e.current,
|
|
142
|
+
slides: y,
|
|
143
|
+
passedParams: z,
|
|
144
|
+
changedParams: l,
|
|
145
|
+
nextEl: c.current,
|
|
146
|
+
prevEl: x.current,
|
|
147
|
+
scrollbarEl: _.current,
|
|
148
|
+
paginationEl: P.current
|
|
149
|
+
}), () => {
|
|
150
|
+
G();
|
|
151
|
+
};
|
|
152
|
+
}), N(() => {
|
|
153
|
+
ee(e.current);
|
|
154
|
+
}, [a]);
|
|
155
|
+
function J() {
|
|
156
|
+
return f.virtual ? oe(e.current, y, a) : y.map((l, E) => /* @__PURE__ */ i.cloneElement(l, {
|
|
157
|
+
swiper: e.current,
|
|
158
|
+
swiperSlideIndex: E
|
|
158
159
|
}));
|
|
159
160
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
161
|
+
return /* @__PURE__ */ i.createElement(t, L({
|
|
162
|
+
ref: m,
|
|
163
|
+
className: q(`${S}${s ? ` ${s}` : ""}`)
|
|
164
|
+
}, U), /* @__PURE__ */ i.createElement(le.Provider, {
|
|
165
|
+
value: e.current
|
|
166
|
+
}, k["container-start"], /* @__PURE__ */ i.createElement(n, {
|
|
167
|
+
className: re(f.wrapperClass)
|
|
168
|
+
}, k["wrapper-start"], J(), k["wrapper-end"]), te(f) && /* @__PURE__ */ i.createElement(i.Fragment, null, /* @__PURE__ */ i.createElement("div", {
|
|
169
|
+
ref: x,
|
|
170
|
+
className: "swiper-button-prev"
|
|
171
|
+
}), /* @__PURE__ */ i.createElement("div", {
|
|
172
|
+
ref: c,
|
|
173
|
+
className: "swiper-button-next"
|
|
174
|
+
})), ne(f) && /* @__PURE__ */ i.createElement("div", {
|
|
175
|
+
ref: _,
|
|
176
|
+
className: "swiper-scrollbar"
|
|
177
|
+
}), se(f) && /* @__PURE__ */ i.createElement("div", {
|
|
178
|
+
ref: P,
|
|
179
|
+
className: "swiper-pagination"
|
|
180
|
+
}), k["container-end"]));
|
|
181
|
+
});
|
|
182
|
+
ue.displayName = "Swiper";
|
|
183
|
+
const ce = /* @__PURE__ */ F(({
|
|
184
|
+
tag: s = "div",
|
|
185
|
+
children: t,
|
|
186
|
+
className: n = "",
|
|
187
|
+
swiper: r,
|
|
188
|
+
zoom: u,
|
|
189
|
+
lazy: d,
|
|
190
|
+
virtualIndex: C,
|
|
191
|
+
swiperSlideIndex: g,
|
|
192
|
+
...S
|
|
193
|
+
} = {}, w) => {
|
|
194
|
+
const a = p(null), [o, h] = O("swiper-slide"), [R, $] = O(!1);
|
|
195
|
+
function m(c, x, P) {
|
|
196
|
+
x === a.current && h(P);
|
|
167
197
|
}
|
|
168
|
-
|
|
169
|
-
if (!a.
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}), u("init", () => {
|
|
178
|
-
a.params.pagination.enabled === !1 ? I() : (A(), B(), h());
|
|
179
|
-
}), u("activeIndexChange", () => {
|
|
180
|
-
typeof a.snapIndex > "u" && h();
|
|
181
|
-
}), u("snapIndexChange", () => {
|
|
182
|
-
h();
|
|
183
|
-
}), u("snapGridLengthChange", () => {
|
|
184
|
-
B(), h();
|
|
185
|
-
}), u("destroy", () => {
|
|
186
|
-
M();
|
|
187
|
-
}), u("enable disable", () => {
|
|
188
|
-
let {
|
|
189
|
-
el: t
|
|
190
|
-
} = a.pagination;
|
|
191
|
-
t && (t = m(t), t.forEach((l) => l.classList[a.enabled ? "remove" : "add"](a.params.pagination.lockClass)));
|
|
192
|
-
}), u("lock unlock", () => {
|
|
193
|
-
h();
|
|
194
|
-
}), u("click", (t, l) => {
|
|
195
|
-
const e = l.target, n = m(a.pagination.el);
|
|
196
|
-
if (a.params.pagination.el && a.params.pagination.hideOnClick && n && n.length > 0 && !e.classList.contains(a.params.pagination.bulletClass)) {
|
|
197
|
-
if (a.navigation && (a.navigation.nextEl && e === a.navigation.nextEl || a.navigation.prevEl && e === a.navigation.prevEl)) return;
|
|
198
|
-
const c = n[0].classList.contains(a.params.pagination.hiddenClass);
|
|
199
|
-
v(c === !0 ? "paginationShow" : "paginationHide"), n.forEach((C) => C.classList.toggle(a.params.pagination.hiddenClass));
|
|
198
|
+
N(() => {
|
|
199
|
+
if (typeof g < "u" && (a.current.swiperSlideIndex = g), w && (w.current = a.current), !(!a.current || !r)) {
|
|
200
|
+
if (r.destroyed) {
|
|
201
|
+
o !== "swiper-slide" && h("swiper-slide");
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
return r.on("_slideClass", m), () => {
|
|
205
|
+
r && r.off("_slideClass", m);
|
|
206
|
+
};
|
|
200
207
|
}
|
|
201
|
-
})
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
el: t
|
|
212
|
-
} = a.pagination;
|
|
213
|
-
t && (t = m(t), t.forEach((l) => l.classList.add(a.params.pagination.paginationDisabledClass))), M();
|
|
208
|
+
}), N(() => {
|
|
209
|
+
r && a.current && !r.destroyed && h(r.getSlideClasses(a.current));
|
|
210
|
+
}, [r]);
|
|
211
|
+
const e = {
|
|
212
|
+
isActive: o.indexOf("swiper-slide-active") >= 0,
|
|
213
|
+
isVisible: o.indexOf("swiper-slide-visible") >= 0,
|
|
214
|
+
isPrev: o.indexOf("swiper-slide-prev") >= 0,
|
|
215
|
+
isNext: o.indexOf("swiper-slide-next") >= 0
|
|
216
|
+
}, b = () => typeof t == "function" ? t(e) : t, j = () => {
|
|
217
|
+
$(!0);
|
|
214
218
|
};
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
}
|
|
223
|
-
|
|
219
|
+
return /* @__PURE__ */ i.createElement(s, L({
|
|
220
|
+
ref: a,
|
|
221
|
+
className: q(`${o}${n ? ` ${n}` : ""}`),
|
|
222
|
+
"data-swiper-slide-index": C,
|
|
223
|
+
onLoad: j
|
|
224
|
+
}, S), u && /* @__PURE__ */ i.createElement(V.Provider, {
|
|
225
|
+
value: e
|
|
226
|
+
}, /* @__PURE__ */ i.createElement("div", {
|
|
227
|
+
className: "swiper-zoom-container",
|
|
228
|
+
"data-swiper-zoom": typeof u == "number" ? u : void 0
|
|
229
|
+
}, b(), d && !R && /* @__PURE__ */ i.createElement("div", {
|
|
230
|
+
className: "swiper-lazy-preloader",
|
|
231
|
+
ref: (c) => {
|
|
232
|
+
c && (c.lazyPreloaderManaged = !0);
|
|
233
|
+
}
|
|
234
|
+
}))), !u && /* @__PURE__ */ i.createElement(V.Provider, {
|
|
235
|
+
value: e
|
|
236
|
+
}, b(), d && !R && /* @__PURE__ */ i.createElement("div", {
|
|
237
|
+
className: "swiper-lazy-preloader",
|
|
238
|
+
ref: (c) => {
|
|
239
|
+
c && (c.lazyPreloaderManaged = !0);
|
|
240
|
+
}
|
|
241
|
+
})));
|
|
242
|
+
});
|
|
243
|
+
ce.displayName = "SwiperSlide";
|
|
224
244
|
export {
|
|
225
|
-
|
|
245
|
+
ue as Swiper,
|
|
246
|
+
ce as SwiperSlide
|
|
226
247
|
};
|
package/dist/index.esm23.js
CHANGED
|
@@ -1,130 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
extendParams: B,
|
|
5
|
-
on: u,
|
|
6
|
-
emit: l,
|
|
7
|
-
params: d
|
|
8
|
-
}) {
|
|
9
|
-
e.autoplay = {
|
|
10
|
-
running: !1,
|
|
11
|
-
paused: !1,
|
|
12
|
-
timeLeft: 0
|
|
13
|
-
}, B({
|
|
14
|
-
autoplay: {
|
|
15
|
-
enabled: !1,
|
|
16
|
-
delay: 3e3,
|
|
17
|
-
waitForTransition: !0,
|
|
18
|
-
disableOnInteraction: !1,
|
|
19
|
-
stopOnLastSlide: !1,
|
|
20
|
-
reverseDirection: !1,
|
|
21
|
-
pauseOnMouseEnter: !1
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
let f, v, T = d && d.autoplay ? d.autoplay.delay : 3e3, E = d && d.autoplay ? d.autoplay.delay : 3e3, n, c = (/* @__PURE__ */ new Date()).getTime(), b, p, s, M, r, D;
|
|
25
|
-
function O(t) {
|
|
26
|
-
!e || e.destroyed || !e.wrapperEl || t.target === e.wrapperEl && (e.wrapperEl.removeEventListener("transitionend", O), !(D || t.detail && t.detail.bySwiperTouchMove) && i());
|
|
27
|
-
}
|
|
28
|
-
const F = () => {
|
|
29
|
-
if (e.destroyed || !e.autoplay.running) return;
|
|
30
|
-
e.autoplay.paused ? b = !0 : b && (E = n, b = !1);
|
|
31
|
-
const t = e.autoplay.paused ? n : c + E - (/* @__PURE__ */ new Date()).getTime();
|
|
32
|
-
e.autoplay.timeLeft = t, l("autoplayTimeLeft", t, t / T), v = requestAnimationFrame(() => {
|
|
33
|
-
F();
|
|
34
|
-
});
|
|
35
|
-
}, q = () => {
|
|
36
|
-
let t;
|
|
37
|
-
return e.virtual && e.params.virtual.enabled ? t = e.slides.find((o) => o.classList.contains("swiper-slide-active")) : t = e.slides[e.activeIndex], t ? parseInt(t.getAttribute("data-swiper-autoplay"), 10) : void 0;
|
|
38
|
-
}, L = () => {
|
|
39
|
-
let t = e.params.autoplay.delay;
|
|
40
|
-
const a = q();
|
|
41
|
-
return !Number.isNaN(a) && a > 0 && (t = a), t;
|
|
42
|
-
}, g = (t) => {
|
|
43
|
-
if (e.destroyed || !e.autoplay.running) return;
|
|
44
|
-
cancelAnimationFrame(v), F();
|
|
45
|
-
let a = t;
|
|
46
|
-
typeof a > "u" && (a = L(), T = a, E = a), n = a;
|
|
47
|
-
const o = e.params.speed, S = () => {
|
|
48
|
-
!e || e.destroyed || (e.params.autoplay.reverseDirection ? !e.isBeginning || e.params.loop || e.params.rewind ? (e.slidePrev(o, !0, !0), l("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(e.slides.length - 1, o, !0, !0), l("autoplay")) : !e.isEnd || e.params.loop || e.params.rewind ? (e.slideNext(o, !0, !0), l("autoplay")) : e.params.autoplay.stopOnLastSlide || (e.slideTo(0, o, !0, !0), l("autoplay")), e.params.cssMode && (c = (/* @__PURE__ */ new Date()).getTime(), requestAnimationFrame(() => {
|
|
49
|
-
g();
|
|
50
|
-
})));
|
|
51
|
-
};
|
|
52
|
-
return a > 0 ? (clearTimeout(f), f = setTimeout(() => {
|
|
53
|
-
S();
|
|
54
|
-
}, a)) : requestAnimationFrame(() => {
|
|
55
|
-
S();
|
|
56
|
-
}), a;
|
|
57
|
-
}, I = () => {
|
|
58
|
-
c = (/* @__PURE__ */ new Date()).getTime(), e.autoplay.running = !0, g(), l("autoplayStart");
|
|
59
|
-
}, m = () => {
|
|
60
|
-
e.autoplay.running = !1, clearTimeout(f), cancelAnimationFrame(v), l("autoplayStop");
|
|
61
|
-
}, y = (t, a) => {
|
|
62
|
-
if (e.destroyed || !e.autoplay.running) return;
|
|
63
|
-
clearTimeout(f), t || (r = !0);
|
|
64
|
-
const o = () => {
|
|
65
|
-
l("autoplayPause"), e.params.autoplay.waitForTransition ? e.wrapperEl.addEventListener("transitionend", O) : i();
|
|
66
|
-
};
|
|
67
|
-
if (e.autoplay.paused = !0, a) {
|
|
68
|
-
o();
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
n = (n || e.params.autoplay.delay) - ((/* @__PURE__ */ new Date()).getTime() - c), !(e.isEnd && n < 0 && !e.params.loop) && (n < 0 && (n = 0), o());
|
|
72
|
-
}, i = () => {
|
|
73
|
-
e.isEnd && n < 0 && !e.params.loop || e.destroyed || !e.autoplay.running || (c = (/* @__PURE__ */ new Date()).getTime(), r ? (r = !1, g(n)) : g(), e.autoplay.paused = !1, l("autoplayResume"));
|
|
74
|
-
}, A = () => {
|
|
75
|
-
if (e.destroyed || !e.autoplay.running) return;
|
|
76
|
-
const t = h();
|
|
77
|
-
t.visibilityState === "hidden" && (r = !0, y(!0)), t.visibilityState === "visible" && i();
|
|
78
|
-
}, P = (t) => {
|
|
79
|
-
t.pointerType === "mouse" && (r = !0, D = !0, !(e.animating || e.autoplay.paused) && y(!0));
|
|
80
|
-
}, N = (t) => {
|
|
81
|
-
t.pointerType === "mouse" && (D = !1, e.autoplay.paused && i());
|
|
82
|
-
}, x = () => {
|
|
83
|
-
e.params.autoplay.pauseOnMouseEnter && (e.el.addEventListener("pointerenter", P), e.el.addEventListener("pointerleave", N));
|
|
84
|
-
}, C = () => {
|
|
85
|
-
e.el && typeof e.el != "string" && (e.el.removeEventListener("pointerenter", P), e.el.removeEventListener("pointerleave", N));
|
|
86
|
-
}, R = () => {
|
|
87
|
-
h().addEventListener("visibilitychange", A);
|
|
88
|
-
}, _ = () => {
|
|
89
|
-
h().removeEventListener("visibilitychange", A);
|
|
90
|
-
};
|
|
91
|
-
u("init", () => {
|
|
92
|
-
e.params.autoplay.enabled && (x(), R(), I());
|
|
93
|
-
}), u("destroy", () => {
|
|
94
|
-
C(), _(), e.autoplay.running && m();
|
|
95
|
-
}), u("_freeModeStaticRelease", () => {
|
|
96
|
-
(s || r) && i();
|
|
97
|
-
}), u("_freeModeNoMomentumRelease", () => {
|
|
98
|
-
e.params.autoplay.disableOnInteraction ? m() : y(!0, !0);
|
|
99
|
-
}), u("beforeTransitionStart", (t, a, o) => {
|
|
100
|
-
e.destroyed || !e.autoplay.running || (o || !e.params.autoplay.disableOnInteraction ? y(!0, !0) : m());
|
|
101
|
-
}), u("sliderFirstMove", () => {
|
|
102
|
-
if (!(e.destroyed || !e.autoplay.running)) {
|
|
103
|
-
if (e.params.autoplay.disableOnInteraction) {
|
|
104
|
-
m();
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
p = !0, s = !1, r = !1, M = setTimeout(() => {
|
|
108
|
-
r = !0, s = !0, y(!0);
|
|
109
|
-
}, 200);
|
|
110
|
-
}
|
|
111
|
-
}), u("touchEnd", () => {
|
|
112
|
-
if (!(e.destroyed || !e.autoplay.running || !p)) {
|
|
113
|
-
if (clearTimeout(M), clearTimeout(f), e.params.autoplay.disableOnInteraction) {
|
|
114
|
-
s = !1, p = !1;
|
|
115
|
-
return;
|
|
116
|
-
}
|
|
117
|
-
s && e.params.cssMode && i(), s = !1, p = !1;
|
|
118
|
-
}
|
|
119
|
-
}), u("slideChange", () => {
|
|
120
|
-
e.destroyed || !e.autoplay.running || e.autoplay.paused && (n = L(), T = L());
|
|
121
|
-
}), Object.assign(e.autoplay, {
|
|
122
|
-
start: I,
|
|
123
|
-
stop: m,
|
|
124
|
-
pause: y,
|
|
125
|
-
resume: i
|
|
126
|
-
});
|
|
127
|
-
}
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
var e = "_1tx42e51", a = "_1tx42e52", o = "_1tx42e53", v = "_1tx42e54", x = "_1tx42e55", _ = "_1tx42e56";
|
|
128
4
|
export {
|
|
129
|
-
|
|
5
|
+
e as arrowBtn,
|
|
6
|
+
o as arrowNext,
|
|
7
|
+
a as arrowPrev,
|
|
8
|
+
x as dot,
|
|
9
|
+
_ as dotActive,
|
|
10
|
+
v as dots
|
|
130
11
|
};
|
package/dist/index.esm25.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
|
-
|
|
3
|
+
import { c as a } from "./index.esm34.js";
|
|
4
|
+
var d = a({ defaultClassName: "uk9byt0", variantClassNames: { hoverable: { true: "uk9byt1" }, padding: { none: "uk9byt2", sm: "uk9byt3", md: "uk9byt4", lg: "uk9byt5" } }, defaultVariants: { padding: "none" }, compoundVariants: [] }), u = "uk9byt6", o = "uk9byt7", n = "uk9byt8", b = "uk9byt9";
|
|
4
5
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
v as dots
|
|
6
|
+
n as cardBody,
|
|
7
|
+
b as cardFooter,
|
|
8
|
+
o as cardHeader,
|
|
9
|
+
u as cardMedia,
|
|
10
|
+
d as cardRecipe
|
|
11
11
|
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* empty css */
|
|
2
|
+
/* empty css */
|
|
3
|
+
var r = "w40enx1", n = "w40enx2", w = "w40enx3", v = "w40enx4", x = "w40enx5", i = "w40enx6", t = "w40enx7", l = "w40enx8", o = "w40enx9", p = "w40enxa", s = "w40enxb", m = "w40enxc", b = "w40enxd", g = "w40enxe", c = "w40enxf", k = "w40enxg", u = "w40enxh", d = "w40enxi", j = "w40enxk w40enxj", y = "w40enxl w40enxj", B = "w40enxm w40enxj";
|
|
4
|
+
export {
|
|
5
|
+
v as badgeOverlay,
|
|
6
|
+
i as body,
|
|
7
|
+
c as footer,
|
|
8
|
+
w as image,
|
|
9
|
+
n as imageWrapper,
|
|
10
|
+
g as installments,
|
|
11
|
+
b as originalPrice,
|
|
12
|
+
m as price,
|
|
13
|
+
s as priceWrapper,
|
|
14
|
+
k as quickViewBtn,
|
|
15
|
+
p as reviewCount,
|
|
16
|
+
r as root,
|
|
17
|
+
B as skeletonBtn,
|
|
18
|
+
j as skeletonImage,
|
|
19
|
+
y as skeletonLine,
|
|
20
|
+
o as starsWrapper,
|
|
21
|
+
l as subtitle,
|
|
22
|
+
t as title,
|
|
23
|
+
u as unavailableOverlay,
|
|
24
|
+
d as unavailableText,
|
|
25
|
+
x as wishlistBtn
|
|
26
|
+
};
|