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