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