@danielcruzcode/ui-core 0.1.3 → 0.1.5

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.
Files changed (127) hide show
  1. package/dist/commerce/ProductCard/ProductCard.d.ts +1 -1
  2. package/dist/commerce/ProductCard/ProductCard.d.ts.map +1 -1
  3. package/dist/commerce/ProductShelf/ProductShelf.d.ts +1 -1
  4. package/dist/commerce/ProductShelf/ProductShelf.d.ts.map +1 -1
  5. package/dist/components/Card/Card.d.ts +1 -1
  6. package/dist/components/Card/Card.d.ts.map +1 -1
  7. package/dist/components/Carousel/Carousel.d.ts +2 -2
  8. package/dist/components/Carousel/Carousel.d.ts.map +1 -1
  9. package/dist/index.cjs.js +1 -1
  10. package/dist/index.cjs10.js +1 -1
  11. package/dist/index.cjs11.js +1 -1
  12. package/dist/index.cjs12.js +5 -1
  13. package/dist/index.cjs13.js +6 -1
  14. package/dist/index.cjs14.js +1 -1
  15. package/dist/index.cjs15.js +1 -1
  16. package/dist/index.cjs16.js +1 -1
  17. package/dist/index.cjs17.js +1 -1
  18. package/dist/index.cjs18.js +1 -1
  19. package/dist/index.cjs2.js +19 -1
  20. package/dist/index.cjs3.js +12 -1
  21. package/dist/index.cjs4.js +17 -1
  22. package/dist/index.cjs5.js +17 -1
  23. package/dist/index.cjs6.js +8 -1
  24. package/dist/index.cjs7.js +12 -1
  25. package/dist/index.cjs8.js +8 -1
  26. package/dist/index.cjs9.js +18 -1
  27. package/dist/index.esm.js +22 -22
  28. package/dist/index.esm10.js +65 -61
  29. package/dist/index.esm11.js +24 -48
  30. package/dist/index.esm12.js +11 -22
  31. package/dist/index.esm13.js +12 -25
  32. package/dist/index.esm14.js +45 -11
  33. package/dist/index.esm15.js +22 -5
  34. package/dist/index.esm16.js +33 -5
  35. package/dist/index.esm17.js +1202 -6
  36. package/dist/index.esm18.js +50 -13
  37. package/dist/index.esm2.js +38 -5
  38. package/dist/index.esm3.js +27 -46
  39. package/dist/index.esm4.js +29 -32
  40. package/dist/index.esm5.js +35 -96
  41. package/dist/index.esm6.js +26 -58
  42. package/dist/index.esm7.js +29 -5
  43. package/dist/index.esm8.js +34 -55
  44. package/dist/index.esm9.js +69 -162
  45. package/dist/layout/Container/Container.d.ts +2 -1
  46. package/dist/layout/Container/Container.d.ts.map +1 -1
  47. package/dist/layout/Stack/Stack.d.ts +4 -3
  48. package/dist/layout/Stack/Stack.d.ts.map +1 -1
  49. package/dist/primitives/Badge/Badge.d.ts.map +1 -1
  50. package/dist/primitives/Button/Button.d.ts +1 -1
  51. package/dist/primitives/Button/Button.d.ts.map +1 -1
  52. package/dist/primitives/Checkbox/Checkbox.d.ts +1 -1
  53. package/dist/primitives/Checkbox/Checkbox.d.ts.map +1 -1
  54. package/dist/primitives/Input/Input.d.ts +1 -1
  55. package/dist/primitives/Input/Input.d.ts.map +1 -1
  56. package/dist/primitives/Select/Select.d.ts +1 -1
  57. package/dist/primitives/Select/Select.d.ts.map +1 -1
  58. package/dist/primitives/Tag/Tag.d.ts.map +1 -1
  59. package/package.json +6 -26
  60. package/dist/commerce/ProductCard/ProductCard.css.d.ts +0 -23
  61. package/dist/commerce/ProductCard/ProductCard.css.d.ts.map +0 -1
  62. package/dist/commerce/ProductShelf/ProductShelf.css.d.ts +0 -3
  63. package/dist/commerce/ProductShelf/ProductShelf.css.d.ts.map +0 -1
  64. package/dist/components/Card/Card.css.d.ts +0 -30
  65. package/dist/components/Card/Card.css.d.ts.map +0 -1
  66. package/dist/components/Carousel/Carousel.css.d.ts +0 -8
  67. package/dist/components/Carousel/Carousel.css.d.ts.map +0 -1
  68. package/dist/index.cjs19.js +0 -1
  69. package/dist/index.cjs20.js +0 -1
  70. package/dist/index.cjs21.js +0 -1
  71. package/dist/index.cjs22.js +0 -1
  72. package/dist/index.cjs23.js +0 -1
  73. package/dist/index.cjs24.js +0 -1
  74. package/dist/index.cjs25.js +0 -1
  75. package/dist/index.cjs26.js +0 -1
  76. package/dist/index.cjs27.js +0 -1
  77. package/dist/index.cjs28.js +0 -1
  78. package/dist/index.cjs30.js +0 -1
  79. package/dist/index.cjs31.js +0 -1
  80. package/dist/index.cjs35.js +0 -1
  81. package/dist/index.cjs44.js +0 -1
  82. package/dist/index.cjs45.js +0 -1
  83. package/dist/index.cjs46.js +0 -1
  84. package/dist/index.cjs49.js +0 -1
  85. package/dist/index.cjs50.js +0 -1
  86. package/dist/index.cjs51.js +0 -1
  87. package/dist/index.cjs52.js +0 -1
  88. package/dist/index.esm19.js +0 -12
  89. package/dist/index.esm20.js +0 -26
  90. package/dist/index.esm21.js +0 -7
  91. package/dist/index.esm22.js +0 -7
  92. package/dist/index.esm23.js +0 -11
  93. package/dist/index.esm24.js +0 -136
  94. package/dist/index.esm25.js +0 -226
  95. package/dist/index.esm26.js +0 -130
  96. package/dist/index.esm27.js +0 -280
  97. package/dist/index.esm28.js +0 -11
  98. package/dist/index.esm30.js +0 -5
  99. package/dist/index.esm31.js +0 -1
  100. package/dist/index.esm35.js +0 -88
  101. package/dist/index.esm44.js +0 -2038
  102. package/dist/index.esm45.js +0 -60
  103. package/dist/index.esm46.js +0 -191
  104. package/dist/index.esm49.js +0 -12
  105. package/dist/index.esm50.js +0 -182
  106. package/dist/index.esm51.js +0 -6
  107. package/dist/index.esm52.js +0 -134
  108. package/dist/layout/Container/Container.css.d.ts +0 -20
  109. package/dist/layout/Container/Container.css.d.ts.map +0 -1
  110. package/dist/layout/Stack/Stack.css.d.ts +0 -2
  111. package/dist/layout/Stack/Stack.css.d.ts.map +0 -1
  112. package/dist/primitives/Badge/Badge.css.d.ts +0 -37
  113. package/dist/primitives/Badge/Badge.css.d.ts.map +0 -1
  114. package/dist/primitives/Button/Button.css.d.ts +0 -60
  115. package/dist/primitives/Button/Button.css.d.ts.map +0 -1
  116. package/dist/primitives/Checkbox/Checkbox.css.d.ts +0 -9
  117. package/dist/primitives/Checkbox/Checkbox.css.d.ts.map +0 -1
  118. package/dist/primitives/Input/Input.css.d.ts +0 -11
  119. package/dist/primitives/Input/Input.css.d.ts.map +0 -1
  120. package/dist/primitives/Select/Select.css.d.ts +0 -8
  121. package/dist/primitives/Select/Select.css.d.ts.map +0 -1
  122. package/dist/primitives/Tag/Tag.css.d.ts +0 -16
  123. package/dist/primitives/Tag/Tag.css.d.ts.map +0 -1
  124. package/dist/styles.css +0 -1
  125. package/dist/styles.d.ts +0 -1
  126. package/dist/styles.d.ts.map +0 -1
  127. package/styles.css +0 -1
@@ -1,226 +0,0 @@
1
- import { c as $ } from "./index.esm51.js";
2
- import { c as E } from "./index.esm49.js";
3
- import { m, d as q, s as S, i as G, j as P } from "./index.esm50.js";
4
- function N({
5
- swiper: a,
6
- extendParams: O,
7
- on: u,
8
- emit: v
9
- }) {
10
- const f = "swiper-pagination";
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`
41
- }
42
- }), a.pagination = {
43
- el: null,
44
- bullets: []
45
- };
46
- let b, p = 0;
47
- function k() {
48
- return !a.params.pagination.el || !a.pagination.el || Array.isArray(a.pagination.el) && a.pagination.el.length === 0;
49
- }
50
- function x(t, l) {
51
- const {
52
- bulletActiveClass: e
53
- } = a.params.pagination;
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);
72
- } else
73
- a.slideTo(e);
74
- }
75
- function h() {
76
- const t = a.rtl, l = a.params.pagination;
77
- if (k()) return;
78
- let e = a.pagination.el;
79
- e = m(e);
80
- let n, c;
81
- const C = a.virtual && a.params.virtual.enabled ? a.virtual.slides.length : a.slides.length, z = a.params.loop ? Math.ceil(C / a.params.slidesPerGroup) : a.snapGrid.length;
82
- if (a.params.loop ? (c = a.previousRealIndex || 0, n = a.params.slidesPerGroup > 1 ? Math.floor(a.realIndex / a.params.slidesPerGroup) : a.realIndex) : typeof a.snapIndex != "undefined" ? (n = a.snapIndex, c = a.previousSnapIndex) : (c = a.previousIndex || 0, n = a.activeIndex || 0), l.type === "bullets" && a.pagination.bullets && a.pagination.bullets.length > 0) {
83
- const s = a.pagination.bullets;
84
- let g, d, L;
85
- if (l.dynamicBullets && (b = G(s[0], a.isHorizontal() ? "width" : "height"), e.forEach((i) => {
86
- i.style[a.isHorizontal() ? "width" : "height"] = `${b * (l.dynamicMainBullets + 4)}px`;
87
- }), l.dynamicMainBullets > 1 && c !== void 0 && (p += n - (c || 0), p > l.dynamicMainBullets - 1 ? p = l.dynamicMainBullets - 1 : p < 0 && (p = 0)), g = Math.max(n - p, 0), d = g + (Math.min(s.length, l.dynamicMainBullets) - 1), L = (d + g) / 2), s.forEach((i) => {
88
- const o = [...["", "-next", "-next-next", "-prev", "-prev-prev", "-main"].map((r) => `${l.bulletActiveClass}${r}`)].map((r) => typeof r == "string" && r.includes(" ") ? r.split(" ") : r).flat();
89
- i.classList.remove(...o);
90
- }), e.length > 1)
91
- s.forEach((i) => {
92
- const o = P(i);
93
- o === n ? i.classList.add(...l.bulletActiveClass.split(" ")) : a.isElement && i.setAttribute("part", "bullet"), l.dynamicBullets && (o >= g && o <= d && i.classList.add(...`${l.bulletActiveClass}-main`.split(" ")), o === g && x(i, "prev"), o === d && x(i, "next"));
94
- });
95
- else {
96
- const i = s[n];
97
- if (i && i.classList.add(...l.bulletActiveClass.split(" ")), a.isElement && s.forEach((o, r) => {
98
- o.setAttribute("part", r === n ? "bullet-active" : "bullet");
99
- }), l.dynamicBullets) {
100
- const o = s[g], r = s[d];
101
- for (let y = g; y <= d; y += 1)
102
- s[y] && s[y].classList.add(...`${l.bulletActiveClass}-main`.split(" "));
103
- x(o, "prev"), x(r, "next");
104
- }
105
- }
106
- if (l.dynamicBullets) {
107
- const i = Math.min(s.length, l.dynamicMainBullets + 4), o = (b * i - b) / 2 - L * b, r = t ? "right" : "left";
108
- s.forEach((y) => {
109
- y.style[a.isHorizontal() ? r : "top"] = `${o}px`;
110
- });
111
- }
112
- }
113
- e.forEach((s, g) => {
114
- if (l.type === "fraction" && (s.querySelectorAll($(l.currentClass)).forEach((d) => {
115
- d.textContent = l.formatFractionCurrent(n + 1);
116
- }), s.querySelectorAll($(l.totalClass)).forEach((d) => {
117
- d.textContent = l.formatFractionTotal(z);
118
- })), l.type === "progressbar") {
119
- let d;
120
- l.progressbarOpposite ? d = a.isHorizontal() ? "vertical" : "horizontal" : d = a.isHorizontal() ? "horizontal" : "vertical";
121
- const L = (n + 1) / z;
122
- let i = 1, o = 1;
123
- d === "horizontal" ? i = L : o = L, s.querySelectorAll($(l.progressbarFillClass)).forEach((r) => {
124
- r.style.transform = `translate3d(0,0,0) scaleX(${i}) scaleY(${o})`, r.style.transitionDuration = `${a.params.speed}ms`;
125
- });
126
- }
127
- l.type === "custom" && l.renderCustom ? (S(s, l.renderCustom(a, n + 1, z)), g === 0 && v("paginationRender", s)) : (g === 0 && v("paginationRender", s), v("paginationUpdate", s)), a.params.watchOverflow && a.enabled && s.classList[a.isLocked ? "add" : "remove"](l.lockClass);
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}>`;
142
- }
143
- t.type === "fraction" && (t.renderFraction ? n = t.renderFraction.call(a, t.currentClass, t.totalClass) : n = `<span class="${t.currentClass}"></span> / <span class="${t.totalClass}"></span>`), t.type === "progressbar" && (t.renderProgressbar ? n = t.renderProgressbar.call(a, t.progressbarFillClass) : n = `<span class="${t.progressbarFillClass}"></span>`), a.pagination.bullets = [], e.forEach((c) => {
144
- t.type !== "custom" && S(c, n || ""), t.type === "bullets" && a.pagination.bullets.push(...c.querySelectorAll($(t.bulletClass)));
145
- }), t.type !== "custom" && v("paginationRender", e[0]);
146
- }
147
- function A() {
148
- a.params.pagination = E(a, a.originalParams.pagination, a.params.pagination, {
149
- el: "swiper-pagination"
150
- });
151
- const t = a.params.pagination;
152
- if (!t.el) return;
153
- let l;
154
- typeof t.el == "string" && a.isElement && (l = a.el.querySelector(t.el)), !l && typeof t.el == "string" && (l = [...document.querySelectorAll(t.el)]), l || (l = t.el), !(!l || l.length === 0) && (a.params.uniqueNavElements && typeof t.el == "string" && Array.isArray(l) && l.length > 1 && (l = [...a.el.querySelectorAll(t.el)], l.length > 1 && (l = l.find((e) => q(e, ".swiper")[0] === a.el))), Array.isArray(l) && l.length === 1 && (l = l[0]), Object.assign(a.pagination, {
155
- el: l
156
- }), l = m(l), l.forEach((e) => {
157
- t.type === "bullets" && t.clickable && e.classList.add(...(t.clickableClass || "").split(" ")), e.classList.add(t.modifierClass + t.type), e.classList.add(a.isHorizontal() ? t.horizontalClass : t.verticalClass), t.type === "bullets" && t.dynamicBullets && (e.classList.add(`${t.modifierClass}${t.type}-dynamic`), p = 0, t.dynamicMainBullets < 1 && (t.dynamicMainBullets = 1)), t.type === "progressbar" && t.progressbarOpposite && e.classList.add(t.progressbarOppositeClass), t.clickable && e.addEventListener("click", D), a.enabled || e.classList.add(t.lockClass);
158
- }));
159
- }
160
- function M() {
161
- const t = a.params.pagination;
162
- if (k()) return;
163
- let l = a.pagination.el;
164
- l && (l = m(l), l.forEach((e) => {
165
- e.classList.remove(t.hiddenClass), e.classList.remove(t.modifierClass + t.type), e.classList.remove(a.isHorizontal() ? t.horizontalClass : t.verticalClass), t.clickable && (e.classList.remove(...(t.clickableClass || "").split(" ")), e.removeEventListener("click", D));
166
- })), a.pagination.bullets && a.pagination.bullets.forEach((e) => e.classList.remove(...t.bulletActiveClass.split(" ")));
167
- }
168
- u("changeDirection", () => {
169
- if (!a.pagination || !a.pagination.el) return;
170
- const t = a.params.pagination;
171
- let {
172
- el: l
173
- } = a.pagination;
174
- l = m(l), l.forEach((e) => {
175
- e.classList.remove(t.horizontalClass, t.verticalClass), e.classList.add(a.isHorizontal() ? t.horizontalClass : t.verticalClass);
176
- });
177
- }), u("init", () => {
178
- a.params.pagination.enabled === !1 ? I() : (A(), B(), h());
179
- }), u("activeIndexChange", () => {
180
- typeof a.snapIndex == "undefined" && 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));
200
- }
201
- });
202
- const F = () => {
203
- a.el.classList.remove(a.params.pagination.paginationDisabledClass);
204
- let {
205
- el: t
206
- } = a.pagination;
207
- t && (t = m(t), t.forEach((l) => l.classList.remove(a.params.pagination.paginationDisabledClass))), A(), B(), h();
208
- }, I = () => {
209
- a.el.classList.add(a.params.pagination.paginationDisabledClass);
210
- let {
211
- el: t
212
- } = a.pagination;
213
- t && (t = m(t), t.forEach((l) => l.classList.add(a.params.pagination.paginationDisabledClass))), M();
214
- };
215
- Object.assign(a.pagination, {
216
- enable: F,
217
- disable: I,
218
- render: B,
219
- update: h,
220
- init: A,
221
- destroy: M
222
- });
223
- }
224
- export {
225
- N as default
226
- };
@@ -1,130 +0,0 @@
1
- import { g as h } from "./index.esm52.js";
2
- function V({
3
- swiper: e,
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 == "undefined" && (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
- }
128
- export {
129
- V as default
130
- };
@@ -1,280 +0,0 @@
1
- var ne = Object.defineProperty;
2
- var z = Object.getOwnPropertySymbols;
3
- var D = Object.prototype.hasOwnProperty, H = Object.prototype.propertyIsEnumerable;
4
- var q = (t, e, n) => e in t ? ne(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, U = (t, e) => {
5
- for (var n in e || (e = {}))
6
- D.call(e, n) && q(t, n, e[n]);
7
- if (z)
8
- for (var n of z(e))
9
- H.call(e, n) && q(t, n, e[n]);
10
- return t;
11
- };
12
- var T = (t, e) => {
13
- var n = {};
14
- for (var r in t)
15
- D.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
16
- if (t != null && z)
17
- for (var r of z(t))
18
- e.indexOf(r) < 0 && H.call(t, r) && (n[r] = t[r]);
19
- return n;
20
- };
21
- import a, { forwardRef as J, useState as R, useRef as f, useEffect as V, useLayoutEffect as se, createContext as K } from "react";
22
- import { S as ae } from "./index.esm44.js";
23
- import { g as ie, m as oe, a as le, u as ue } from "./index.esm45.js";
24
- import { d as Q, w as ce, n as pe, b as fe, a as de, e as W, u as me } from "./index.esm46.js";
25
- function B() {
26
- return B = Object.assign ? Object.assign.bind() : function(t) {
27
- for (var e = 1; e < arguments.length; e++) {
28
- var n = arguments[e];
29
- for (var r in n)
30
- Object.prototype.hasOwnProperty.call(n, r) && (t[r] = n[r]);
31
- }
32
- return t;
33
- }, B.apply(this, arguments);
34
- }
35
- function X(t) {
36
- return t.type && t.type.displayName && t.type.displayName.includes("SwiperSlide");
37
- }
38
- function Y(t) {
39
- const e = [];
40
- return a.Children.toArray(t).forEach((n) => {
41
- X(n) ? e.push(n) : n.props && n.props.children && Y(n.props.children).forEach((r) => e.push(r));
42
- }), e;
43
- }
44
- function Ee(t) {
45
- const e = [], n = {
46
- "container-start": [],
47
- "container-end": [],
48
- "wrapper-start": [],
49
- "wrapper-end": []
50
- };
51
- return a.Children.toArray(t).forEach((r) => {
52
- if (X(r))
53
- e.push(r);
54
- else if (r.props && r.props.slot && n[r.props.slot])
55
- n[r.props.slot].push(r);
56
- else if (r.props && r.props.children) {
57
- const l = Y(r.props.children);
58
- l.length > 0 ? l.forEach((m) => e.push(m)) : n["container-end"].push(r);
59
- } else
60
- n["container-end"].push(r);
61
- }), {
62
- slides: e,
63
- slots: n
64
- };
65
- }
66
- function ge(t, e, n) {
67
- if (!n) return null;
68
- const r = (i) => {
69
- let u = i;
70
- return i < 0 ? u = e.length + i : u >= e.length && (u = u - e.length), u;
71
- }, l = t.isHorizontal() ? {
72
- [t.rtlTranslate ? "right" : "left"]: `${n.offset}px`
73
- } : {
74
- top: `${n.offset}px`
75
- }, {
76
- from: m,
77
- to: S
78
- } = n, b = t.params.loop ? -e.length : 0, h = t.params.loop ? e.length * 2 : e.length, E = [];
79
- for (let i = b; i < h; i += 1)
80
- i >= m && i <= S && E.push(e[r(i)]);
81
- return E.map((i, u) => /* @__PURE__ */ a.cloneElement(i, {
82
- swiper: t,
83
- style: l,
84
- key: i.props.virtualIndex || i.key || `slide-${u}`
85
- }));
86
- }
87
- function $(t, e) {
88
- return typeof window == "undefined" ? V(t, e) : se(t, e);
89
- }
90
- const G = /* @__PURE__ */ K(null), we = /* @__PURE__ */ K(null), ve = /* @__PURE__ */ J((b = {}, S) => {
91
- var h = b, {
92
- className: t,
93
- tag: e = "div",
94
- wrapperTag: n = "div",
95
- children: r,
96
- onSwiper: l
97
- } = h, m = T(h, [
98
- "className",
99
- "tag",
100
- "wrapperTag",
101
- "children",
102
- "onSwiper"
103
- ]);
104
- let E = !1;
105
- const [i, u] = R("swiper"), [c, g] = R(null), [x, j] = R(!1), k = f(!1), w = f(null), s = f(null), P = f(null), L = f(null), p = f(null), O = f(null), N = f(null), I = f(null), {
106
- params: d,
107
- passedParams: A,
108
- rest: Z,
109
- events: y
110
- } = ie(m), {
111
- slides: C,
112
- slots: _
113
- } = Ee(r), F = () => {
114
- j(!x);
115
- };
116
- Object.assign(d.on, {
117
- _containerClasses(o, v) {
118
- u(v);
119
- }
120
- });
121
- const M = () => {
122
- Object.assign(d.on, y), E = !0;
123
- const o = U({}, d);
124
- if (delete o.wrapperClass, s.current = new ae(o), s.current.virtual && s.current.params.virtual.enabled) {
125
- s.current.virtual.slides = C;
126
- const v = {
127
- cache: !1,
128
- slides: C,
129
- renderExternal: g,
130
- renderExternalUpdate: !1
131
- };
132
- W(s.current.params.virtual, v), W(s.current.originalParams.virtual, v);
133
- }
134
- };
135
- w.current || M(), s.current && s.current.on("_beforeBreakpoint", F);
136
- const ee = () => {
137
- E || !y || !s.current || Object.keys(y).forEach((o) => {
138
- s.current.on(o, y[o]);
139
- });
140
- }, re = () => {
141
- !y || !s.current || Object.keys(y).forEach((o) => {
142
- s.current.off(o, y[o]);
143
- });
144
- };
145
- V(() => () => {
146
- s.current && s.current.off("_beforeBreakpoint", F);
147
- }), V(() => {
148
- !k.current && s.current && (s.current.emitSlidesClasses(), k.current = !0);
149
- }), $(() => {
150
- if (S && (S.current = w.current), !!w.current)
151
- return s.current.destroyed && M(), oe({
152
- el: w.current,
153
- nextEl: p.current,
154
- prevEl: O.current,
155
- paginationEl: N.current,
156
- scrollbarEl: I.current,
157
- swiper: s.current
158
- }, d), l && !s.current.destroyed && l(s.current), () => {
159
- s.current && !s.current.destroyed && s.current.destroy(!0, !1);
160
- };
161
- }, []), $(() => {
162
- ee();
163
- const o = le(A, P.current, C, L.current, (v) => v.key);
164
- return P.current = A, L.current = C, o.length && s.current && !s.current.destroyed && me({
165
- swiper: s.current,
166
- slides: C,
167
- passedParams: A,
168
- changedParams: o,
169
- nextEl: p.current,
170
- prevEl: O.current,
171
- scrollbarEl: I.current,
172
- paginationEl: N.current
173
- }), () => {
174
- re();
175
- };
176
- }), $(() => {
177
- ue(s.current);
178
- }, [c]);
179
- function te() {
180
- return d.virtual ? ge(s.current, C, c) : C.map((o, v) => /* @__PURE__ */ a.cloneElement(o, {
181
- swiper: s.current,
182
- swiperSlideIndex: v
183
- }));
184
- }
185
- return /* @__PURE__ */ a.createElement(e, B({
186
- ref: w,
187
- className: Q(`${i}${t ? ` ${t}` : ""}`)
188
- }, Z), /* @__PURE__ */ a.createElement(we.Provider, {
189
- value: s.current
190
- }, _["container-start"], /* @__PURE__ */ a.createElement(n, {
191
- className: ce(d.wrapperClass)
192
- }, _["wrapper-start"], te(), _["wrapper-end"]), pe(d) && /* @__PURE__ */ a.createElement(a.Fragment, null, /* @__PURE__ */ a.createElement("div", {
193
- ref: O,
194
- className: "swiper-button-prev"
195
- }), /* @__PURE__ */ a.createElement("div", {
196
- ref: p,
197
- className: "swiper-button-next"
198
- })), fe(d) && /* @__PURE__ */ a.createElement("div", {
199
- ref: I,
200
- className: "swiper-scrollbar"
201
- }), de(d) && /* @__PURE__ */ a.createElement("div", {
202
- ref: N,
203
- className: "swiper-pagination"
204
- }), _["container-end"]));
205
- });
206
- ve.displayName = "Swiper";
207
- const ye = /* @__PURE__ */ J((i = {}, E) => {
208
- var u = i, {
209
- tag: t = "div",
210
- children: e,
211
- className: n = "",
212
- swiper: r,
213
- zoom: l,
214
- lazy: m,
215
- virtualIndex: S,
216
- swiperSlideIndex: b
217
- } = u, h = T(u, [
218
- "tag",
219
- "children",
220
- "className",
221
- "swiper",
222
- "zoom",
223
- "lazy",
224
- "virtualIndex",
225
- "swiperSlideIndex"
226
- ]);
227
- const c = f(null), [g, x] = R("swiper-slide"), [j, k] = R(!1);
228
- function w(p, O, N) {
229
- O === c.current && x(N);
230
- }
231
- $(() => {
232
- if (typeof b != "undefined" && (c.current.swiperSlideIndex = b), E && (E.current = c.current), !(!c.current || !r)) {
233
- if (r.destroyed) {
234
- g !== "swiper-slide" && x("swiper-slide");
235
- return;
236
- }
237
- return r.on("_slideClass", w), () => {
238
- r && r.off("_slideClass", w);
239
- };
240
- }
241
- }), $(() => {
242
- r && c.current && !r.destroyed && x(r.getSlideClasses(c.current));
243
- }, [r]);
244
- const s = {
245
- isActive: g.indexOf("swiper-slide-active") >= 0,
246
- isVisible: g.indexOf("swiper-slide-visible") >= 0,
247
- isPrev: g.indexOf("swiper-slide-prev") >= 0,
248
- isNext: g.indexOf("swiper-slide-next") >= 0
249
- }, P = () => typeof e == "function" ? e(s) : e, L = () => {
250
- k(!0);
251
- };
252
- return /* @__PURE__ */ a.createElement(t, B({
253
- ref: c,
254
- className: Q(`${g}${n ? ` ${n}` : ""}`),
255
- "data-swiper-slide-index": S,
256
- onLoad: L
257
- }, h), l && /* @__PURE__ */ a.createElement(G.Provider, {
258
- value: s
259
- }, /* @__PURE__ */ a.createElement("div", {
260
- className: "swiper-zoom-container",
261
- "data-swiper-zoom": typeof l == "number" ? l : void 0
262
- }, P(), m && !j && /* @__PURE__ */ a.createElement("div", {
263
- className: "swiper-lazy-preloader",
264
- ref: (p) => {
265
- p && (p.lazyPreloaderManaged = !0);
266
- }
267
- }))), !l && /* @__PURE__ */ a.createElement(G.Provider, {
268
- value: s
269
- }, P(), m && !j && /* @__PURE__ */ a.createElement("div", {
270
- className: "swiper-lazy-preloader",
271
- ref: (p) => {
272
- p && (p.lazyPreloaderManaged = !0);
273
- }
274
- })));
275
- });
276
- ye.displayName = "SwiperSlide";
277
- export {
278
- ve as Swiper,
279
- ye as SwiperSlide
280
- };
@@ -1,11 +0,0 @@
1
- /* empty css */
2
- /* empty css */
3
- var e = "_1tx42e51", a = "_1tx42e52", o = "_1tx42e53", v = "_1tx42e54", x = "_1tx42e55", _ = "_1tx42e56";
4
- export {
5
- e as arrowBtn,
6
- o as arrowNext,
7
- a as arrowPrev,
8
- x as dot,
9
- _ as dotActive,
10
- v as dots
11
- };
@@ -1,5 +0,0 @@
1
- /* empty css */
2
- var r = "_15r2pp40";
3
- export {
4
- r as stackBase
5
- };
@@ -1 +0,0 @@
1
-