@codeandfunction/callaloo 4.7.6 → 4.8.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/dist/callaloo.global.js +1 -1
- package/dist/chunks/CLModal.vue_vue_type_style_index_0_lang-BDyONfaQ.js +176 -0
- package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
- package/dist/components/Containers/CLCarousel/CLCarousel.js +144 -148
- package/dist/components/Modals/CLModal/CLModal.js +3 -174
- package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.css +1 -0
- package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.js +267 -0
- package/dist/components/Modals/CLModalDatePicker/CLModalDatePicker.vue.d.ts +77 -0
- package/dist/components/Modals/CLModalDatePicker/index.d.ts +4 -0
- package/dist/components/Modals/index.d.ts +2 -1
- package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.js +438 -425
- package/dist/components/Popups/CLDropdownMenu/CLDropdownMenu.vue.d.ts +9 -2
- package/dist/composables/useDatePicker.d.ts +39 -0
- package/dist/composables/useDatePicker.js +136 -0
- package/dist/composables/useDatePicker.spec.js +232 -0
- package/dist/composables/useDropdown.d.ts +1 -1
- package/dist/composables/useDropdown.js +16 -16
- package/package.json +5 -1
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import '../../../assets/core.css';
|
|
2
2
|
import './CLCarousel.css';
|
|
3
3
|
import { defineComponent as xe, computed as w, createElementBlock as h, openBlock as f, Fragment as te, createCommentVNode as P, unref as e, normalizeClass as r, renderList as ke, createBlock as ze, createElementVNode as x, createVNode as y, withCtx as de, createTextVNode as ue, toDisplayString as ee, useCssVars as Ie, ref as v, onMounted as Ee, nextTick as Y, onUnmounted as We, watch as Be, renderSlot as ve } from "vue";
|
|
4
|
-
import { _ as
|
|
4
|
+
import { _ as N } from "../../../chunks/CLButton.vue_vue_type_style_index_0_lang-MvhnNzVW.js";
|
|
5
5
|
import { _ as Te } from "../../../chunks/CLText.vue_vue_type_style_index_0_lang-B-L8ECJL.js";
|
|
6
|
-
import { CLPaginationType as E, CLColorVariants as
|
|
6
|
+
import { CLPaginationType as E, CLColorVariants as M, CLSizes as V, CLIconSizes as H, CLIconNames as j, CLTextTypes as Ne, CLAlign as Q, CLOrder as Z, CLColors as Me } from "../../../index.js";
|
|
7
7
|
import { i as _, d as Ae, e as Ve } from "../../../chunks/helper-qUkciePY.js";
|
|
8
|
-
import { useHasSlotContent as
|
|
8
|
+
import { useHasSlotContent as De } from "../../../composables/useHasSlotContent.js";
|
|
9
|
+
import { _ as Oe } from "../../../chunks/_plugin-vue_export-helper-CHgC5LLL.js";
|
|
9
10
|
const ce = /* @__PURE__ */ xe({
|
|
10
11
|
name: "CLCarouselNavigation",
|
|
11
12
|
__name: "CLCarouselNavigation",
|
|
@@ -27,29 +28,29 @@ const ce = /* @__PURE__ */ xe({
|
|
|
27
28
|
variant: {}
|
|
28
29
|
},
|
|
29
30
|
setup(t) {
|
|
30
|
-
const
|
|
31
|
-
`${
|
|
32
|
-
]),
|
|
33
|
-
`${
|
|
34
|
-
]),
|
|
35
|
-
`${
|
|
31
|
+
const a = t, n = w(() => [
|
|
32
|
+
`${a.prefix}__dots-container`
|
|
33
|
+
]), q = w(() => [
|
|
34
|
+
`${a.prefix}__arrows-container`
|
|
35
|
+
]), D = w(() => [
|
|
36
|
+
`${a.prefix}__numbered-container`
|
|
36
37
|
]), p = w(() => [
|
|
37
|
-
`${
|
|
38
|
+
`${a.prefix}__inline-container`
|
|
38
39
|
]), c = w(() => [
|
|
39
|
-
`${
|
|
40
|
+
`${a.prefix}__prev-page`
|
|
40
41
|
]), $ = w(() => [
|
|
41
|
-
`${
|
|
42
|
+
`${a.prefix}__next-page`
|
|
42
43
|
]), F = w(() => [
|
|
43
|
-
`${
|
|
44
|
+
`${a.prefix}__page-indicator`
|
|
44
45
|
]), W = w(() => [
|
|
45
|
-
`${
|
|
46
|
-
]), L = (k) =>
|
|
47
|
-
return (k,
|
|
46
|
+
`${a.prefix}__show-more`
|
|
47
|
+
]), L = (k) => a.currentPage === k, C = w(() => !a.enabled || !a.prevPageEnabled), m = w(() => !a.enabled || !a.nextPageEnabled);
|
|
48
|
+
return (k, O) => (f(), h(te, null, [
|
|
48
49
|
t.paginationType === e(E).Dots ? (f(), h("div", {
|
|
49
50
|
key: 0,
|
|
50
51
|
class: r(e(n))
|
|
51
52
|
}, [
|
|
52
|
-
(f(!0), h(te, null, ke(t.totalPages, (b) => (f(), ze(e(
|
|
53
|
+
(f(!0), h(te, null, ke(t.totalPages, (b) => (f(), ze(e(N), {
|
|
53
54
|
key: `dot-${b}`,
|
|
54
55
|
"aria-label": `Show page ${b}`,
|
|
55
56
|
color: t.color,
|
|
@@ -57,26 +58,26 @@ const ce = /* @__PURE__ */ xe({
|
|
|
57
58
|
height: "0.75rem",
|
|
58
59
|
"on-click": () => t.gotoPage(b),
|
|
59
60
|
width: "0.75rem",
|
|
60
|
-
variant: L(b) ? e(
|
|
61
|
+
variant: L(b) ? e(M).Outline : t.variant,
|
|
61
62
|
wrap: ""
|
|
62
63
|
}, null, 8, ["aria-label", "color", "disabled", "on-click", "variant"]))), 128))
|
|
63
64
|
], 2)) : P("", !0),
|
|
64
65
|
t.paginationType === e(E).Numbered ? (f(), h("div", {
|
|
65
66
|
key: 1,
|
|
66
|
-
class: r(e(
|
|
67
|
+
class: r(e(D))
|
|
67
68
|
}, [
|
|
68
69
|
x("div", {
|
|
69
70
|
class: r(e(c))
|
|
70
71
|
}, [
|
|
71
|
-
y(e(
|
|
72
|
+
y(e(N), {
|
|
72
73
|
"aria-label": "Show previous page of slides",
|
|
73
74
|
color: t.color,
|
|
74
75
|
disabled: e(C),
|
|
75
|
-
"icon-before": e(
|
|
76
|
-
"icon-size": e(
|
|
77
|
-
size: e(
|
|
76
|
+
"icon-before": e(j).ChevronLeft,
|
|
77
|
+
"icon-size": e(H).Tiny,
|
|
78
|
+
size: e(V).Tiny,
|
|
78
79
|
"on-click": t.showPrevItems,
|
|
79
|
-
variant: e(C) ? e(
|
|
80
|
+
variant: e(C) ? e(M).Text : t.variant
|
|
80
81
|
}, null, 8, ["color", "disabled", "icon-before", "icon-size", "size", "on-click", "variant"])
|
|
81
82
|
], 2),
|
|
82
83
|
x("div", {
|
|
@@ -94,25 +95,25 @@ const ce = /* @__PURE__ */ xe({
|
|
|
94
95
|
x("div", {
|
|
95
96
|
class: r(e($))
|
|
96
97
|
}, [
|
|
97
|
-
y(e(
|
|
98
|
+
y(e(N), {
|
|
98
99
|
"aria-label": "Show next page of slides",
|
|
99
100
|
color: t.color,
|
|
100
101
|
disabled: e(m),
|
|
101
|
-
"icon-before": e(
|
|
102
|
-
"icon-size": e(
|
|
103
|
-
size: e(
|
|
102
|
+
"icon-before": e(j).ChevronRight,
|
|
103
|
+
"icon-size": e(H).Tiny,
|
|
104
|
+
size: e(V).Tiny,
|
|
104
105
|
"on-click": t.showNextItems,
|
|
105
|
-
variant: e(m) ? e(
|
|
106
|
+
variant: e(m) ? e(M).Text : t.variant
|
|
106
107
|
}, null, 8, ["color", "disabled", "icon-before", "icon-size", "size", "on-click", "variant"])
|
|
107
108
|
], 2),
|
|
108
109
|
t.showMore ? (f(), h("div", {
|
|
109
110
|
key: 0,
|
|
110
111
|
class: r(e(W))
|
|
111
112
|
}, [
|
|
112
|
-
y(e(
|
|
113
|
+
y(e(N), {
|
|
113
114
|
"aria-label": t.moreAriaLabel,
|
|
114
115
|
color: t.color,
|
|
115
|
-
size: e(
|
|
116
|
+
size: e(V).Small,
|
|
116
117
|
"on-click": t.showMore,
|
|
117
118
|
variant: t.variant
|
|
118
119
|
}, {
|
|
@@ -125,34 +126,34 @@ const ce = /* @__PURE__ */ xe({
|
|
|
125
126
|
], 2)) : P("", !0),
|
|
126
127
|
t.paginationType === e(E).Arrows ? (f(), h("div", {
|
|
127
128
|
key: 2,
|
|
128
|
-
class: r(e(
|
|
129
|
+
class: r(e(q))
|
|
129
130
|
}, [
|
|
130
131
|
x("div", {
|
|
131
132
|
class: r(e(c))
|
|
132
133
|
}, [
|
|
133
|
-
y(e(
|
|
134
|
+
y(e(N), {
|
|
134
135
|
"aria-label": "Show previous page of slides",
|
|
135
136
|
color: t.color,
|
|
136
137
|
disabled: e(C),
|
|
137
|
-
"icon-before": e(
|
|
138
|
-
"icon-size": e(
|
|
139
|
-
size: e(
|
|
138
|
+
"icon-before": e(j).ChevronLeft,
|
|
139
|
+
"icon-size": e(H).Tiny,
|
|
140
|
+
size: e(V).Tiny,
|
|
140
141
|
"on-click": t.showPrevItems,
|
|
141
|
-
variant: e(C) ? e(
|
|
142
|
+
variant: e(C) ? e(M).Text : t.variant
|
|
142
143
|
}, null, 8, ["color", "disabled", "icon-before", "icon-size", "size", "on-click", "variant"])
|
|
143
144
|
], 2),
|
|
144
145
|
x("div", {
|
|
145
146
|
class: r(e($))
|
|
146
147
|
}, [
|
|
147
|
-
y(e(
|
|
148
|
+
y(e(N), {
|
|
148
149
|
"aria-label": "Show next page of slides",
|
|
149
150
|
color: t.color,
|
|
150
151
|
disabled: e(m),
|
|
151
|
-
"icon-before": e(
|
|
152
|
-
"icon-size": e(
|
|
153
|
-
size: e(
|
|
152
|
+
"icon-before": e(j).ChevronRight,
|
|
153
|
+
"icon-size": e(H).Tiny,
|
|
154
|
+
size: e(V).Tiny,
|
|
154
155
|
"on-click": t.showNextItems,
|
|
155
|
-
variant: e(m) ? e(
|
|
156
|
+
variant: e(m) ? e(M).Text : t.variant
|
|
156
157
|
}, null, 8, ["color", "disabled", "icon-before", "icon-size", "size", "on-click", "variant"])
|
|
157
158
|
], 2)
|
|
158
159
|
], 2)) : P("", !0),
|
|
@@ -163,16 +164,16 @@ const ce = /* @__PURE__ */ xe({
|
|
|
163
164
|
x("div", {
|
|
164
165
|
class: r(e(c))
|
|
165
166
|
}, [
|
|
166
|
-
y(e(
|
|
167
|
+
y(e(N), {
|
|
167
168
|
"aria-label": "Show previous page of slides",
|
|
168
169
|
"align-content": e(Q).Center,
|
|
169
170
|
color: t.color,
|
|
170
171
|
disabled: e(C),
|
|
171
|
-
"icon-before": e(
|
|
172
|
-
"icon-size": e(
|
|
173
|
-
size: e(
|
|
172
|
+
"icon-before": e(j).ChevronLeft,
|
|
173
|
+
"icon-size": e(H).Small,
|
|
174
|
+
size: e(V).Tiny,
|
|
174
175
|
"on-click": t.showPrevItems,
|
|
175
|
-
variant: e(C) ? e(
|
|
176
|
+
variant: e(C) ? e(M).Text : t.variant,
|
|
176
177
|
width: "30px",
|
|
177
178
|
height: "30px",
|
|
178
179
|
wrap: ""
|
|
@@ -181,16 +182,16 @@ const ce = /* @__PURE__ */ xe({
|
|
|
181
182
|
x("div", {
|
|
182
183
|
class: r(e($))
|
|
183
184
|
}, [
|
|
184
|
-
y(e(
|
|
185
|
+
y(e(N), {
|
|
185
186
|
"aria-label": "Show next page of slides",
|
|
186
187
|
"align-content": e(Q).Center,
|
|
187
188
|
color: t.color,
|
|
188
189
|
disabled: e(m),
|
|
189
|
-
"icon-before": e(
|
|
190
|
-
"icon-size": e(
|
|
191
|
-
size: e(
|
|
190
|
+
"icon-before": e(j).ChevronRight,
|
|
191
|
+
"icon-size": e(H).Small,
|
|
192
|
+
size: e(V).Tiny,
|
|
192
193
|
"on-click": t.showNextItems,
|
|
193
|
-
variant: e(m) ? e(
|
|
194
|
+
variant: e(m) ? e(M).Text : t.variant,
|
|
194
195
|
width: "30px",
|
|
195
196
|
height: "30px",
|
|
196
197
|
wrap: ""
|
|
@@ -199,7 +200,7 @@ const ce = /* @__PURE__ */ xe({
|
|
|
199
200
|
], 2)) : P("", !0)
|
|
200
201
|
], 64));
|
|
201
202
|
}
|
|
202
|
-
}),
|
|
203
|
+
}), Re = ["data-testid"], He = ["hidden"], je = /* @__PURE__ */ xe({
|
|
203
204
|
name: "CLCarousel",
|
|
204
205
|
__name: "CLCarousel",
|
|
205
206
|
props: {
|
|
@@ -215,7 +216,7 @@ const ce = /* @__PURE__ */ xe({
|
|
|
215
216
|
perPageByBreakpoints: {},
|
|
216
217
|
testId: { default: "clll-carousel" },
|
|
217
218
|
title: {},
|
|
218
|
-
variant: { default:
|
|
219
|
+
variant: { default: M.Soft },
|
|
219
220
|
width: { default: "100%" }
|
|
220
221
|
},
|
|
221
222
|
setup(t) {
|
|
@@ -223,103 +224,103 @@ const ce = /* @__PURE__ */ xe({
|
|
|
223
224
|
v3ba68b74: o.width,
|
|
224
225
|
v1ab12a15: e(oe)
|
|
225
226
|
}));
|
|
226
|
-
const
|
|
227
|
+
const a = "clll-carousel", n = t, q = v(), D = v(!1), p = v(1), c = v(n.perPage), $ = v(0), F = De("title"), W = v(!1), L = v(!1), C = v(!1), m = v(0), k = v(!1), O = v(), b = v(!1), z = v(), J = v(), oe = v("100%"), T = v(0), B = v(0), fe = () => {
|
|
227
228
|
if (n.perPageByBreakpoints?.length) {
|
|
228
229
|
c.value = n.perPage;
|
|
229
|
-
for (const [o,
|
|
230
|
-
window.matchMedia(`(min-width: ${o}px)`).matches && (c.value =
|
|
230
|
+
for (const [o, l] of n.perPageByBreakpoints)
|
|
231
|
+
window.matchMedia(`(min-width: ${o}px)`).matches && (c.value = l);
|
|
231
232
|
}
|
|
232
233
|
}, ge = () => {
|
|
233
|
-
if (z?.value &&
|
|
234
|
-
const
|
|
235
|
-
T.value =
|
|
234
|
+
if (z?.value && B.value) {
|
|
235
|
+
const l = Math.ceil(B.value / c.value);
|
|
236
|
+
T.value = l, n.infinite ? (L.value = !0, C.value = !0) : l > 1 && (L.value = !0);
|
|
236
237
|
}
|
|
237
238
|
}, Se = () => {
|
|
238
239
|
W.value || Y(() => {
|
|
239
|
-
let o,
|
|
240
|
+
let o, l;
|
|
240
241
|
const i = z?.value;
|
|
241
242
|
if (i) {
|
|
242
243
|
const s = i?.querySelectorAll(
|
|
243
|
-
`div[class="${
|
|
244
|
+
`div[class="${a}__slides"] > *`
|
|
244
245
|
) ?? [];
|
|
245
246
|
if (n.infinite && n.enabled && m.value > 0) {
|
|
246
|
-
const u = i.offsetWidth, g = u / c.value, d = i.scrollLeft, S = $.value / 2, I = g * S,
|
|
247
|
+
const u = i.offsetWidth, g = u / c.value, d = i.scrollLeft, S = $.value / 2, I = g * S, A = g * m.value;
|
|
247
248
|
let U = d - I;
|
|
248
|
-
U < 0 && (U =
|
|
249
|
+
U < 0 && (U = A + U);
|
|
249
250
|
const G = Math.floor(U / u) + 1;
|
|
250
251
|
if (G < 1 ? p.value = T.value : G > T.value ? p.value = 1 : p.value = G, !W.value) {
|
|
251
252
|
if (d < I) {
|
|
252
253
|
W.value = !0;
|
|
253
|
-
const K = d +
|
|
254
|
+
const K = d + A;
|
|
254
255
|
i.scrollTo({ left: K, behavior: "auto" }), setTimeout(() => {
|
|
255
256
|
W.value = !1;
|
|
256
257
|
}, 50);
|
|
257
|
-
} else if (d >= I +
|
|
258
|
+
} else if (d >= I + A) {
|
|
258
259
|
W.value = !0;
|
|
259
|
-
const K = d -
|
|
260
|
+
const K = d - A;
|
|
260
261
|
i.scrollTo({ left: K, behavior: "auto" }), setTimeout(() => {
|
|
261
262
|
W.value = !1;
|
|
262
263
|
}, 50);
|
|
263
264
|
}
|
|
264
265
|
}
|
|
265
266
|
} else {
|
|
266
|
-
const u =
|
|
267
|
+
const u = B.value - 1;
|
|
267
268
|
for (let g = 0; g < T.value; g++) {
|
|
268
269
|
const d = c.value * (g + 1) - 1, S = d < u ? s[d] : s[u], I = d < u ? d : u;
|
|
269
|
-
Ve({ parent: i, child: S, leftOffset: 40, rightOffset: 40, threshold: 0.5 }) && (I === u ? (
|
|
270
|
+
Ve({ parent: i, child: S, leftOffset: 40, rightOffset: 40, threshold: 0.5 }) && (I === u ? (l = u, o = g + 1) : (l = I, o = g + 1));
|
|
270
271
|
}
|
|
271
|
-
|
|
272
|
+
l !== void 0 && l > -1 && o && (p.value = o, o > 1 && (C.value = !0), o === 1 && (C.value = !1), o < T.value && (L.value = !0), o === T.value && (L.value = !1));
|
|
272
273
|
}
|
|
273
274
|
}
|
|
274
275
|
});
|
|
275
276
|
}, he = (o) => {
|
|
276
|
-
|
|
277
|
-
const
|
|
278
|
-
!
|
|
277
|
+
q.value && Y(() => {
|
|
278
|
+
const l = Ae(q.value) && !F.value;
|
|
279
|
+
!l && (o.title || o.controlPosition === Z.Before) ? D.value = !1 : D.value = l;
|
|
279
280
|
});
|
|
280
281
|
}, le = (o) => {
|
|
281
|
-
const
|
|
282
|
-
if (
|
|
282
|
+
const l = z?.value, i = l.offsetWidth;
|
|
283
|
+
if (l && i)
|
|
283
284
|
if (n.infinite && n.enabled && m.value > 0) {
|
|
284
285
|
const s = i / c.value, u = $.value / 2, g = s * u, d = o - 1, S = g + i * d;
|
|
285
|
-
|
|
286
|
+
l.scrollTo({ left: S, behavior: "smooth" });
|
|
286
287
|
} else {
|
|
287
288
|
const s = o - 1, u = i * s;
|
|
288
|
-
|
|
289
|
+
l.scrollTo({ left: u, behavior: "smooth" });
|
|
289
290
|
}
|
|
290
291
|
}, me = () => {
|
|
291
292
|
k.value = !0;
|
|
292
293
|
const o = c.value;
|
|
293
294
|
fe(), we(), ge();
|
|
294
|
-
const
|
|
295
|
-
if (
|
|
295
|
+
const l = z?.value, i = l.offsetWidth;
|
|
296
|
+
if (l)
|
|
296
297
|
if (n.infinite && n.enabled && m.value > 0) {
|
|
297
|
-
const s = i / c.value, u = i / o, g = $.value / 2, d = u * g, I =
|
|
298
|
+
const s = i / c.value, u = i / o, g = $.value / 2, d = u * g, I = l.scrollLeft - d;
|
|
298
299
|
if (o !== c.value) {
|
|
299
|
-
const K =
|
|
300
|
-
`div[class="${
|
|
301
|
-
), Ce = Array.from(K),
|
|
302
|
-
|
|
303
|
-
const X = Math.min(c.value,
|
|
304
|
-
X > 0 &&
|
|
300
|
+
const K = l.querySelectorAll(
|
|
301
|
+
`div[class="${a}__slides"] > *`
|
|
302
|
+
), Ce = Array.from(K), R = Ce.slice(g, Ce.length - g);
|
|
303
|
+
l.innerHTML = "", R.forEach((ye) => l.appendChild(ye));
|
|
304
|
+
const X = Math.min(c.value, R.length);
|
|
305
|
+
X > 0 && R.length > 0 && (R.slice(-X).forEach((se) => {
|
|
305
306
|
const re = se.cloneNode(!0);
|
|
306
|
-
|
|
307
|
-
}),
|
|
307
|
+
l.insertBefore(re, R[0]);
|
|
308
|
+
}), R.slice(0, X).forEach((se) => {
|
|
308
309
|
const re = se.cloneNode(!0);
|
|
309
|
-
|
|
310
|
+
l.appendChild(re);
|
|
310
311
|
}), $.value = X * 2);
|
|
311
312
|
}
|
|
312
|
-
const
|
|
313
|
+
const A = $.value / 2, G = s * A + I;
|
|
313
314
|
Y(() => {
|
|
314
|
-
|
|
315
|
+
l.scrollLeft = G;
|
|
315
316
|
});
|
|
316
317
|
} else {
|
|
317
318
|
p.value = 1;
|
|
318
319
|
const s = p.value - 1, u = i * s;
|
|
319
|
-
|
|
320
|
+
l.scrollLeft = u;
|
|
320
321
|
}
|
|
321
|
-
_ && k.value && (window.clearTimeout(
|
|
322
|
-
k.value && (k.value = !1), window.clearTimeout(
|
|
322
|
+
_ && k.value && (window.clearTimeout(O.value), O.value = window.setTimeout(() => {
|
|
323
|
+
k.value && (k.value = !1), window.clearTimeout(O.value);
|
|
323
324
|
}, 300));
|
|
324
325
|
}, be = () => {
|
|
325
326
|
k.value || (b.value = !0, _ && b.value && (window.clearTimeout(J.value), J.value = window.setTimeout(() => {
|
|
@@ -330,27 +331,27 @@ const ce = /* @__PURE__ */ xe({
|
|
|
330
331
|
}, we = () => {
|
|
331
332
|
const o = z?.value;
|
|
332
333
|
if (o) {
|
|
333
|
-
const
|
|
334
|
-
|
|
334
|
+
const l = o.offsetWidth;
|
|
335
|
+
B.value >= c.value ? oe.value = `${l / c.value}px` : oe.value = `${l / B.value}px`;
|
|
335
336
|
}
|
|
336
337
|
}, ne = () => {
|
|
337
|
-
const o = z?.value,
|
|
338
|
-
if (o &&
|
|
338
|
+
const o = z?.value, l = o.offsetWidth;
|
|
339
|
+
if (o && l)
|
|
339
340
|
if (n.infinite && n.enabled && m.value > 0) {
|
|
340
|
-
const s = o.scrollLeft +
|
|
341
|
+
const s = o.scrollLeft + l;
|
|
341
342
|
o.scrollTo({ left: s, behavior: "smooth" });
|
|
342
343
|
} else {
|
|
343
|
-
const i = p.value, s =
|
|
344
|
+
const i = p.value, s = l * i;
|
|
344
345
|
o.scrollTo({ left: s, behavior: "smooth" });
|
|
345
346
|
}
|
|
346
347
|
}, ie = () => {
|
|
347
|
-
const o = z?.value,
|
|
348
|
-
if (o &&
|
|
348
|
+
const o = z?.value, l = o.offsetWidth;
|
|
349
|
+
if (o && l)
|
|
349
350
|
if (n.infinite && n.enabled && m.value > 0) {
|
|
350
|
-
const s = o.scrollLeft -
|
|
351
|
+
const s = o.scrollLeft - l;
|
|
351
352
|
o.scrollTo({ left: s, behavior: "smooth" });
|
|
352
353
|
} else {
|
|
353
|
-
const i = p.value - 1, s =
|
|
354
|
+
const i = p.value - 1, s = l * (i - 1);
|
|
354
355
|
o.scrollTo({ left: s, behavior: "smooth" });
|
|
355
356
|
}
|
|
356
357
|
};
|
|
@@ -359,11 +360,11 @@ const ce = /* @__PURE__ */ xe({
|
|
|
359
360
|
window.addEventListener("resize", me);
|
|
360
361
|
const o = z?.value;
|
|
361
362
|
if (o) {
|
|
362
|
-
const
|
|
363
|
-
`div[class="${
|
|
363
|
+
const l = o?.querySelectorAll(
|
|
364
|
+
`div[class="${a}__slides"] > *`
|
|
364
365
|
) ?? [];
|
|
365
|
-
if (m.value =
|
|
366
|
-
const i = Array.from(
|
|
366
|
+
if (m.value = l.length, B.value = l.length, n.infinite && n.enabled && l.length > 0) {
|
|
367
|
+
const i = Array.from(l), s = Math.min(c.value, i.length);
|
|
367
368
|
i.slice(-s).forEach((d) => {
|
|
368
369
|
const S = d.cloneNode(!0);
|
|
369
370
|
o.insertBefore(S, i[0]);
|
|
@@ -381,52 +382,52 @@ const ce = /* @__PURE__ */ xe({
|
|
|
381
382
|
}
|
|
382
383
|
}), We(() => {
|
|
383
384
|
if (_) {
|
|
384
|
-
window.removeEventListener("resize", me),
|
|
385
|
+
window.removeEventListener("resize", me), O.value && window.clearTimeout(O.value), J.value && window.clearTimeout(J.value);
|
|
385
386
|
const o = z?.value;
|
|
386
387
|
o && (o.removeEventListener("scroll", be), o.removeEventListener("scrollend", ae));
|
|
387
388
|
}
|
|
388
389
|
});
|
|
389
390
|
const Pe = w(() => [
|
|
390
|
-
|
|
391
|
-
`${
|
|
392
|
-
`${
|
|
393
|
-
`${
|
|
394
|
-
n.enabled ? `${
|
|
395
|
-
|
|
396
|
-
n.onShowMore ? `${
|
|
391
|
+
a,
|
|
392
|
+
`${a}--${n.controlAlign}`,
|
|
393
|
+
`${a}--${n.controlPosition}`,
|
|
394
|
+
`${a}--${n.paginationType}`,
|
|
395
|
+
n.enabled ? `${a}--enabled` : `${a}--disabled`,
|
|
396
|
+
D.value ? "" : `${a}--hastitle`,
|
|
397
|
+
n.onShowMore ? `${a}--has-more` : ""
|
|
397
398
|
]), $e = w(() => [
|
|
398
|
-
`${
|
|
399
|
-
F.value ? `${
|
|
399
|
+
`${a}__slide-controls`,
|
|
400
|
+
F.value ? `${a}__slide-controls--hascustomtitle` : ""
|
|
400
401
|
]), Le = w(() => [
|
|
401
|
-
`${
|
|
402
|
-
k.value ? `${
|
|
403
|
-
b.value ? `${
|
|
404
|
-
W.value ? `${
|
|
402
|
+
`${a}__slides`,
|
|
403
|
+
k.value ? `${a}__slides--resizing` : "",
|
|
404
|
+
b.value ? `${a}__slides--scrolling` : "",
|
|
405
|
+
W.value ? `${a}__slides--jumping` : ""
|
|
405
406
|
]), pe = w(() => [
|
|
406
|
-
`${
|
|
407
|
-
`${
|
|
408
|
-
`${
|
|
407
|
+
`${a}__navigation`,
|
|
408
|
+
`${a}__navigation--${n.controlAlign}`,
|
|
409
|
+
`${a}__navigation--${n.controlPosition}`
|
|
409
410
|
]);
|
|
410
411
|
return Be(n, (o) => {
|
|
411
412
|
he(o);
|
|
412
|
-
}), (o,
|
|
413
|
+
}), (o, l) => (f(), h("div", {
|
|
413
414
|
class: r(e(Pe)),
|
|
414
415
|
"data-testid": t.testId
|
|
415
416
|
}, [
|
|
416
417
|
x("div", {
|
|
417
418
|
ref_key: "beforeControls",
|
|
418
|
-
ref:
|
|
419
|
+
ref: q,
|
|
419
420
|
class: r(e($e)),
|
|
420
|
-
hidden: e(
|
|
421
|
+
hidden: e(D)
|
|
421
422
|
}, [
|
|
422
423
|
x("div", {
|
|
423
|
-
class: r(`${
|
|
424
|
+
class: r(`${a}__custom-title`)
|
|
424
425
|
}, [
|
|
425
426
|
ve(o.$slots, "title")
|
|
426
427
|
], 2),
|
|
427
428
|
t.title ? (f(), h("div", {
|
|
428
429
|
key: 0,
|
|
429
|
-
class: r(`${
|
|
430
|
+
class: r(`${a}__title`)
|
|
430
431
|
}, [
|
|
431
432
|
y(e(Te), {
|
|
432
433
|
align: e(F) ? e(Q).Center : e(Q).Left,
|
|
@@ -440,7 +441,7 @@ const ce = /* @__PURE__ */ xe({
|
|
|
440
441
|
}, 8, ["align"])
|
|
441
442
|
], 2)) : P("", !0),
|
|
442
443
|
t.controlPosition === e(Z).Before && ![e(E).Inline, e(E).Hidden].includes(t.paginationType) ? (f(), h(te, { key: 1 }, [
|
|
443
|
-
e(T) && e(
|
|
444
|
+
e(T) && e(B) > e(c) ? (f(), h("div", {
|
|
444
445
|
key: 0,
|
|
445
446
|
class: r(e(pe))
|
|
446
447
|
}, [
|
|
@@ -453,7 +454,7 @@ const ce = /* @__PURE__ */ xe({
|
|
|
453
454
|
"next-page-enabled": e(L),
|
|
454
455
|
"pagination-type": t.paginationType,
|
|
455
456
|
"prev-page-enabled": e(C),
|
|
456
|
-
prefix:
|
|
457
|
+
prefix: a,
|
|
457
458
|
"show-more": t.onShowMore,
|
|
458
459
|
"show-next-items": ne,
|
|
459
460
|
"show-prev-items": ie,
|
|
@@ -462,7 +463,7 @@ const ce = /* @__PURE__ */ xe({
|
|
|
462
463
|
}, null, 8, ["color", "current-page", "enabled", "more-label", "next-page-enabled", "pagination-type", "prev-page-enabled", "show-more", "total-pages", "variant"])
|
|
463
464
|
], 2)) : P("", !0)
|
|
464
465
|
], 64)) : P("", !0)
|
|
465
|
-
], 10,
|
|
466
|
+
], 10, He),
|
|
466
467
|
x("div", {
|
|
467
468
|
ref_key: "scrollContainer",
|
|
468
469
|
ref: z,
|
|
@@ -472,9 +473,9 @@ const ce = /* @__PURE__ */ xe({
|
|
|
472
473
|
ve(o.$slots, "default")
|
|
473
474
|
], 2),
|
|
474
475
|
t.controlPosition === e(Z).After && ![e(E).Inline, e(E).Hidden].includes(t.paginationType) ? (f(), h(te, { key: 0 }, [
|
|
475
|
-
e(T) && e(
|
|
476
|
+
e(T) && e(B) > e(c) ? (f(), h("div", {
|
|
476
477
|
key: 0,
|
|
477
|
-
class: r(`${
|
|
478
|
+
class: r(`${a}__slide-controls`)
|
|
478
479
|
}, [
|
|
479
480
|
x("div", {
|
|
480
481
|
class: r(e(pe))
|
|
@@ -487,7 +488,7 @@ const ce = /* @__PURE__ */ xe({
|
|
|
487
488
|
"more-label": t.moreLabel,
|
|
488
489
|
"next-page-enabled": e(L),
|
|
489
490
|
"pagination-type": t.paginationType,
|
|
490
|
-
prefix:
|
|
491
|
+
prefix: a,
|
|
491
492
|
"prev-page-enabled": e(C),
|
|
492
493
|
"show-more": t.onShowMore,
|
|
493
494
|
"show-next-items": ne,
|
|
@@ -500,10 +501,10 @@ const ce = /* @__PURE__ */ xe({
|
|
|
500
501
|
], 64)) : P("", !0),
|
|
501
502
|
t.paginationType === e(E).Inline ? (f(), h("div", {
|
|
502
503
|
key: 1,
|
|
503
|
-
class: r(`${
|
|
504
|
+
class: r(`${a}__slide-controls ${a}__slide-controls--inline`)
|
|
504
505
|
}, [
|
|
505
506
|
x("div", {
|
|
506
|
-
class: r(`${
|
|
507
|
+
class: r(`${a}__navigation`)
|
|
507
508
|
}, [
|
|
508
509
|
y(ce, {
|
|
509
510
|
color: t.color,
|
|
@@ -513,7 +514,7 @@ const ce = /* @__PURE__ */ xe({
|
|
|
513
514
|
"more-label": t.moreLabel,
|
|
514
515
|
"next-page-enabled": e(L),
|
|
515
516
|
"pagination-type": t.paginationType,
|
|
516
|
-
prefix:
|
|
517
|
+
prefix: a,
|
|
517
518
|
"prev-page-enabled": e(C),
|
|
518
519
|
"show-more": t.onShowMore,
|
|
519
520
|
"show-next-items": ne,
|
|
@@ -523,22 +524,17 @@ const ce = /* @__PURE__ */ xe({
|
|
|
523
524
|
}, null, 8, ["color", "current-page", "enabled", "more-label", "next-page-enabled", "pagination-type", "prev-page-enabled", "show-more", "total-pages", "variant"])
|
|
524
525
|
], 2)
|
|
525
526
|
], 2)) : P("", !0)
|
|
526
|
-
], 10,
|
|
527
|
+
], 10, Re));
|
|
527
528
|
}
|
|
528
|
-
}),
|
|
529
|
-
const n = t.__vccOpts || t;
|
|
530
|
-
for (const [V, B] of l)
|
|
531
|
-
n[V] = B;
|
|
532
|
-
return n;
|
|
533
|
-
}, qe = {}, Fe = {
|
|
529
|
+
}), qe = {}, Fe = {
|
|
534
530
|
class: /* @__PURE__ */ r(["clll-carousel__slide"])
|
|
535
531
|
};
|
|
536
|
-
function Je(t,
|
|
532
|
+
function Je(t, a) {
|
|
537
533
|
return f(), h("div", Fe, [
|
|
538
534
|
ve(t.$slots, "default")
|
|
539
535
|
]);
|
|
540
536
|
}
|
|
541
|
-
const Ue = /* @__PURE__ */
|
|
537
|
+
const Ue = /* @__PURE__ */ Oe(qe, [["render", Je]]), Ge = je;
|
|
542
538
|
Ge.Slide = Ue;
|
|
543
539
|
export {
|
|
544
540
|
Ge as CLCarousel,
|