@leaflink/stash 48.20.0 → 48.20.1
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/AddressSelect.js +1 -1
- package/dist/Carousel.js +238 -231
- package/dist/Carousel.js.map +1 -1
- package/dist/DatePicker.js +4766 -7897
- package/dist/DatePicker.js.map +1 -1
- package/dist/Filters.js +6 -6
- package/dist/InputOptions.js +1 -1
- package/dist/ListView.js +5 -5
- package/dist/Select.js +1 -1
- package/dist/SelectStatus.js +1 -1
- package/dist/components.css +1 -1
- package/dist/formatDateTime-a5e70901.js +1336 -0
- package/dist/formatDateTime-a5e70901.js.map +1 -0
- package/dist/index.js +82 -81
- package/dist/index.js.map +1 -1
- package/dist/isValid-4b2b7a54.js +18 -0
- package/dist/isValid-4b2b7a54.js.map +1 -0
- package/dist/parseISO-ed4094c1.js +133 -0
- package/dist/parseISO-ed4094c1.js.map +1 -0
- package/dist/searchFuzzy-9b74ec4e.js +446 -0
- package/dist/searchFuzzy-9b74ec4e.js.map +1 -0
- package/dist/toTimeZone-a2ed6470.js +328 -0
- package/dist/toTimeZone-a2ed6470.js.map +1 -0
- package/dist/useSearch.js +1 -1
- package/dist/useValidation.js.map +1 -1
- package/dist/utils/createValidDate.js +2 -2
- package/dist/utils/formatDateTime.js +7 -1730
- package/dist/utils/formatDateTime.js.map +1 -1
- package/dist/utils/normalizeDate.js +1 -1
- package/dist/utils/searchFuzzy.js +1 -1
- package/dist/utils/toTimeZone.js +3 -4
- package/dist/utils/toTimeZone.js.map +1 -1
- package/package.json +29 -29
- package/dist/index-5e5945a9.js +0 -134
- package/dist/index-5e5945a9.js.map +0 -1
- package/dist/index-fe8d3765.js +0 -36
- package/dist/index-fe8d3765.js.map +0 -1
- package/dist/searchFuzzy-74a7de1c.js +0 -326
- package/dist/searchFuzzy-74a7de1c.js.map +0 -1
- package/dist/toTimeZone-e6e9ab75.js +0 -351
- package/dist/toTimeZone-e6e9ab75.js.map +0 -1
package/dist/Carousel.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as G, inject as b, reactive as L, ref as c, h as y, provide as C, onMounted as Le, nextTick as Ie, onUnmounted as Ee, computed as R, watch as ae, cloneVNode as xe, Fragment as D, useAttrs as Be, useCssModule as De, openBlock as k, createElementBlock as j, createVNode as Re, unref as S, mergeProps as Pe, withCtx as oe, createBlock as ke, createCommentVNode as Te, renderList as le, renderSlot as Ve, createElementVNode as Ae, normalizeClass as W } from "vue";
|
|
2
2
|
import { t as B } from "./locale.js";
|
|
3
3
|
import { _ as $e } from "./_plugin-vue_export-helper-dad06003.js";
|
|
4
4
|
import "lodash-es/get";
|
|
5
5
|
/**
|
|
6
|
-
* Vue 3 Carousel 0.3.
|
|
7
|
-
* (c)
|
|
6
|
+
* Vue 3 Carousel 0.3.4
|
|
7
|
+
* (c) 2024
|
|
8
8
|
* @license MIT
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
10
|
+
const p = {
|
|
11
11
|
itemsToShow: 1,
|
|
12
12
|
itemsToScroll: 1,
|
|
13
13
|
modelValue: 0,
|
|
@@ -35,49 +35,49 @@ const f = {
|
|
|
35
35
|
}, Ce = {
|
|
36
36
|
// count of items to showed per view
|
|
37
37
|
itemsToShow: {
|
|
38
|
-
default:
|
|
38
|
+
default: p.itemsToShow,
|
|
39
39
|
type: Number
|
|
40
40
|
},
|
|
41
41
|
// count of items to be scrolled
|
|
42
42
|
itemsToScroll: {
|
|
43
|
-
default:
|
|
43
|
+
default: p.itemsToScroll,
|
|
44
44
|
type: Number
|
|
45
45
|
},
|
|
46
46
|
// control infinite scrolling mode
|
|
47
47
|
wrapAround: {
|
|
48
|
-
default:
|
|
48
|
+
default: p.wrapAround,
|
|
49
49
|
type: Boolean
|
|
50
50
|
},
|
|
51
51
|
// control max drag
|
|
52
52
|
throttle: {
|
|
53
|
-
default:
|
|
53
|
+
default: p.throttle,
|
|
54
54
|
type: Number
|
|
55
55
|
},
|
|
56
56
|
// control snap position alignment
|
|
57
57
|
snapAlign: {
|
|
58
|
-
default:
|
|
58
|
+
default: p.snapAlign,
|
|
59
59
|
validator(e) {
|
|
60
60
|
return ["start", "end", "center", "center-even", "center-odd"].includes(e);
|
|
61
61
|
}
|
|
62
62
|
},
|
|
63
63
|
// sliding transition time in ms
|
|
64
64
|
transition: {
|
|
65
|
-
default:
|
|
65
|
+
default: p.transition,
|
|
66
66
|
type: Number
|
|
67
67
|
},
|
|
68
68
|
// an object to store breakpoints
|
|
69
69
|
breakpoints: {
|
|
70
|
-
default:
|
|
70
|
+
default: p.breakpoints,
|
|
71
71
|
type: Object
|
|
72
72
|
},
|
|
73
73
|
// time to auto advance slides in ms
|
|
74
74
|
autoplay: {
|
|
75
|
-
default:
|
|
75
|
+
default: p.autoplay,
|
|
76
76
|
type: Number
|
|
77
77
|
},
|
|
78
78
|
// pause autoplay when mouse hover over the carousel
|
|
79
79
|
pauseAutoplayOnHover: {
|
|
80
|
-
default:
|
|
80
|
+
default: p.pauseAutoplayOnHover,
|
|
81
81
|
type: Boolean
|
|
82
82
|
},
|
|
83
83
|
// slide number number of initial slide
|
|
@@ -87,24 +87,24 @@ const f = {
|
|
|
87
87
|
},
|
|
88
88
|
// toggle mouse dragging.
|
|
89
89
|
mouseDrag: {
|
|
90
|
-
default:
|
|
90
|
+
default: p.mouseDrag,
|
|
91
91
|
type: Boolean
|
|
92
92
|
},
|
|
93
93
|
// toggle mouse dragging.
|
|
94
94
|
touchDrag: {
|
|
95
|
-
default:
|
|
95
|
+
default: p.touchDrag,
|
|
96
96
|
type: Boolean
|
|
97
97
|
},
|
|
98
98
|
// control snap position alignment
|
|
99
99
|
dir: {
|
|
100
|
-
default:
|
|
100
|
+
default: p.dir,
|
|
101
101
|
validator(e) {
|
|
102
102
|
return ["rtl", "ltr"].includes(e);
|
|
103
103
|
}
|
|
104
104
|
},
|
|
105
105
|
// aria-labels and additional text labels
|
|
106
106
|
i18n: {
|
|
107
|
-
default:
|
|
107
|
+
default: p.i18n,
|
|
108
108
|
type: Object
|
|
109
109
|
},
|
|
110
110
|
// an object to pass all settings
|
|
@@ -116,8 +116,8 @@ const f = {
|
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
118
|
function Ue({ config: e, slidesCount: n }) {
|
|
119
|
-
const { snapAlign: t, wrapAround:
|
|
120
|
-
if (
|
|
119
|
+
const { snapAlign: t, wrapAround: o, itemsToShow: s = 1 } = e;
|
|
120
|
+
if (o)
|
|
121
121
|
return Math.max(n - 1, 0);
|
|
122
122
|
let r;
|
|
123
123
|
switch (t) {
|
|
@@ -141,11 +141,11 @@ function Ue({ config: e, slidesCount: n }) {
|
|
|
141
141
|
return Math.max(r, 0);
|
|
142
142
|
}
|
|
143
143
|
function Xe({ config: e, slidesCount: n }) {
|
|
144
|
-
const { wrapAround: t, snapAlign:
|
|
144
|
+
const { wrapAround: t, snapAlign: o, itemsToShow: s = 1 } = e;
|
|
145
145
|
let r = 0;
|
|
146
146
|
if (t || s > n)
|
|
147
147
|
return r;
|
|
148
|
-
switch (
|
|
148
|
+
switch (o) {
|
|
149
149
|
case "start":
|
|
150
150
|
r = 0;
|
|
151
151
|
break;
|
|
@@ -169,30 +169,30 @@ function ie({ val: e, max: n, min: t }) {
|
|
|
169
169
|
return n < t ? e : Math.min(Math.max(e, t), n);
|
|
170
170
|
}
|
|
171
171
|
function ze({ config: e, currentSlide: n, slidesCount: t }) {
|
|
172
|
-
const { snapAlign:
|
|
173
|
-
let
|
|
174
|
-
switch (
|
|
172
|
+
const { snapAlign: o, wrapAround: s, itemsToShow: r = 1 } = e;
|
|
173
|
+
let d = n;
|
|
174
|
+
switch (o) {
|
|
175
175
|
case "center":
|
|
176
176
|
case "center-odd":
|
|
177
|
-
|
|
177
|
+
d -= (r - 1) / 2;
|
|
178
178
|
break;
|
|
179
179
|
case "center-even":
|
|
180
|
-
|
|
180
|
+
d -= (r - 2) / 2;
|
|
181
181
|
break;
|
|
182
182
|
case "end":
|
|
183
|
-
|
|
183
|
+
d -= r - 1;
|
|
184
184
|
break;
|
|
185
185
|
}
|
|
186
|
-
return s ?
|
|
187
|
-
val:
|
|
186
|
+
return s ? d : ie({
|
|
187
|
+
val: d,
|
|
188
188
|
max: t - r,
|
|
189
189
|
min: 0
|
|
190
190
|
});
|
|
191
191
|
}
|
|
192
192
|
function je(e) {
|
|
193
193
|
return e ? e.reduce((n, t) => {
|
|
194
|
-
var
|
|
195
|
-
return t.type === D ? [...n, ...je(t.children)] : ((
|
|
194
|
+
var o;
|
|
195
|
+
return t.type === D ? [...n, ...je(t.children)] : ((o = t.type) === null || o === void 0 ? void 0 : o.name) === "CarouselSlide" ? [...n, t] : n;
|
|
196
196
|
}, []) : [];
|
|
197
197
|
}
|
|
198
198
|
function re({ val: e, max: n, min: t = 0 }) {
|
|
@@ -200,26 +200,26 @@ function re({ val: e, max: n, min: t = 0 }) {
|
|
|
200
200
|
}
|
|
201
201
|
function He(e, n) {
|
|
202
202
|
let t;
|
|
203
|
-
return n ? function(...
|
|
203
|
+
return n ? function(...o) {
|
|
204
204
|
const s = this;
|
|
205
|
-
t || (e.apply(s,
|
|
205
|
+
t || (e.apply(s, o), t = !0, setTimeout(() => t = !1, n));
|
|
206
206
|
} : e;
|
|
207
207
|
}
|
|
208
208
|
function Ye(e, n) {
|
|
209
209
|
let t;
|
|
210
|
-
return function(...
|
|
210
|
+
return function(...o) {
|
|
211
211
|
t && clearTimeout(t), t = setTimeout(() => {
|
|
212
|
-
e(...
|
|
212
|
+
e(...o), t = null;
|
|
213
213
|
}, n);
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
function We(e = "", n = {}) {
|
|
217
|
-
return Object.entries(n).reduce((t, [
|
|
217
|
+
return Object.entries(n).reduce((t, [o, s]) => t.replace(`{${o}}`, String(s)), e);
|
|
218
218
|
}
|
|
219
|
-
var Ge =
|
|
219
|
+
var Ge = G({
|
|
220
220
|
name: "ARIA",
|
|
221
221
|
setup() {
|
|
222
|
-
const e = b("config", L(Object.assign({},
|
|
222
|
+
const e = b("config", L(Object.assign({}, p))), n = b("currentSlide", c(0)), t = b("slidesCount", c(0));
|
|
223
223
|
return () => y("div", {
|
|
224
224
|
class: ["carousel__liveregion", "carousel__sr-only"],
|
|
225
225
|
"aria-live": "polite",
|
|
@@ -229,212 +229,212 @@ var Ge = Y({
|
|
|
229
229
|
slidesCount: t.value
|
|
230
230
|
}));
|
|
231
231
|
}
|
|
232
|
-
}), Fe =
|
|
232
|
+
}), Fe = G({
|
|
233
233
|
name: "Carousel",
|
|
234
234
|
props: Ce,
|
|
235
|
-
setup(e, { slots: n, emit: t, expose:
|
|
235
|
+
setup(e, { slots: n, emit: t, expose: o }) {
|
|
236
236
|
var s;
|
|
237
|
-
const r = c(null),
|
|
238
|
-
let h = Object.assign({},
|
|
239
|
-
const
|
|
240
|
-
let E,
|
|
241
|
-
C("config",
|
|
242
|
-
function
|
|
237
|
+
const r = c(null), d = c([]), m = c(0), u = c(0), l = L(Object.assign({}, p));
|
|
238
|
+
let h = Object.assign({}, p), _;
|
|
239
|
+
const i = c((s = e.modelValue) !== null && s !== void 0 ? s : 0), T = c(0), w = c(0), v = c(0), I = c(0);
|
|
240
|
+
let E, F;
|
|
241
|
+
C("config", l), C("slidesCount", u), C("currentSlide", i), C("maxSlide", v), C("minSlide", I), C("slideWidth", m);
|
|
242
|
+
function q() {
|
|
243
243
|
_ = Object.assign({}, e.breakpoints), h = Object.assign(Object.assign(Object.assign({}, h), e), { i18n: Object.assign(Object.assign({}, h.i18n), e.i18n), breakpoints: void 0 }), ce(h);
|
|
244
244
|
}
|
|
245
|
-
function
|
|
245
|
+
function $() {
|
|
246
246
|
if (!_ || !Object.keys(_).length)
|
|
247
247
|
return;
|
|
248
|
-
const
|
|
249
|
-
let
|
|
250
|
-
|
|
251
|
-
const A = window.matchMedia(`(min-width: ${
|
|
252
|
-
return A && (
|
|
253
|
-
}), ce(
|
|
248
|
+
const a = Object.keys(_).map((f) => Number(f)).sort((f, A) => +A - +f);
|
|
249
|
+
let g = Object.assign({}, h);
|
|
250
|
+
a.some((f) => {
|
|
251
|
+
const A = window.matchMedia(`(min-width: ${f}px)`).matches;
|
|
252
|
+
return A && (g = Object.assign(Object.assign({}, g), _[f])), A;
|
|
253
|
+
}), ce(g);
|
|
254
254
|
}
|
|
255
|
-
function ce(
|
|
256
|
-
Object.entries(
|
|
255
|
+
function ce(a) {
|
|
256
|
+
Object.entries(a).forEach(([g, f]) => l[g] = f);
|
|
257
257
|
}
|
|
258
258
|
const de = Ye(() => {
|
|
259
|
-
|
|
259
|
+
$(), U(), P();
|
|
260
260
|
}, 16);
|
|
261
|
-
function
|
|
261
|
+
function P() {
|
|
262
262
|
if (!r.value)
|
|
263
263
|
return;
|
|
264
|
-
const
|
|
265
|
-
|
|
264
|
+
const a = r.value.getBoundingClientRect();
|
|
265
|
+
m.value = a.width / l.itemsToShow;
|
|
266
266
|
}
|
|
267
|
-
function
|
|
268
|
-
u.value <= 0 || (w.value = Math.ceil((u.value - 1) / 2),
|
|
269
|
-
val:
|
|
270
|
-
max:
|
|
267
|
+
function U() {
|
|
268
|
+
u.value <= 0 || (w.value = Math.ceil((u.value - 1) / 2), v.value = Ue({ config: l, slidesCount: u.value }), I.value = Xe({ config: l, slidesCount: u.value }), l.wrapAround || (i.value = ie({
|
|
269
|
+
val: i.value,
|
|
270
|
+
max: v.value,
|
|
271
271
|
min: I.value
|
|
272
272
|
})));
|
|
273
273
|
}
|
|
274
274
|
Le(() => {
|
|
275
|
-
Ie(() =>
|
|
275
|
+
Ie(() => P()), setTimeout(() => P(), 1e3), $(), me(), window.addEventListener("resize", de, { passive: !0 }), t("init");
|
|
276
276
|
}), Ee(() => {
|
|
277
|
-
|
|
277
|
+
F && clearTimeout(F), E && clearInterval(E), window.removeEventListener("resize", de, {
|
|
278
278
|
passive: !0
|
|
279
279
|
});
|
|
280
280
|
});
|
|
281
281
|
let x = !1;
|
|
282
|
-
const
|
|
283
|
-
|
|
284
|
-
},
|
|
285
|
-
|
|
282
|
+
const X = { x: 0, y: 0 }, z = { x: 0, y: 0 }, N = L({ x: 0, y: 0 }), H = c(!1), J = c(!1), Ne = () => {
|
|
283
|
+
H.value = !0;
|
|
284
|
+
}, Me = () => {
|
|
285
|
+
H.value = !1;
|
|
286
286
|
};
|
|
287
|
-
function ve(
|
|
288
|
-
["INPUT", "TEXTAREA", "SELECT"].includes(
|
|
287
|
+
function ve(a) {
|
|
288
|
+
["INPUT", "TEXTAREA", "SELECT"].includes(a.target.tagName) || (x = a.type === "touchstart", x || a.preventDefault(), !(!x && a.button !== 0 || M.value) && (X.x = x ? a.touches[0].clientX : a.clientX, X.y = x ? a.touches[0].clientY : a.clientY, document.addEventListener(x ? "touchmove" : "mousemove", fe, !0), document.addEventListener(x ? "touchend" : "mouseup", pe, !0)));
|
|
289
289
|
}
|
|
290
|
-
const fe = He((
|
|
291
|
-
|
|
292
|
-
const
|
|
293
|
-
|
|
294
|
-
},
|
|
290
|
+
const fe = He((a) => {
|
|
291
|
+
J.value = !0, z.x = x ? a.touches[0].clientX : a.clientX, z.y = x ? a.touches[0].clientY : a.clientY;
|
|
292
|
+
const g = z.x - X.x, f = z.y - X.y;
|
|
293
|
+
N.y = f, N.x = g;
|
|
294
|
+
}, l.throttle);
|
|
295
295
|
function pe() {
|
|
296
|
-
const
|
|
297
|
-
if (
|
|
298
|
-
const A = (
|
|
299
|
-
|
|
296
|
+
const a = l.dir === "rtl" ? -1 : 1, g = Math.sign(N.x) * 0.4, f = Math.round(N.x / m.value + g) * a;
|
|
297
|
+
if (f && !x) {
|
|
298
|
+
const A = (ye) => {
|
|
299
|
+
window.removeEventListener("click", A, !0);
|
|
300
300
|
};
|
|
301
301
|
window.addEventListener("click", A, !0);
|
|
302
302
|
}
|
|
303
|
-
O(
|
|
303
|
+
O(i.value - f), N.x = 0, N.y = 0, J.value = !1, document.removeEventListener(x ? "touchmove" : "mousemove", fe, !0), document.removeEventListener(x ? "touchend" : "mouseup", pe, !0);
|
|
304
304
|
}
|
|
305
305
|
function me() {
|
|
306
|
-
!
|
|
307
|
-
|
|
308
|
-
},
|
|
306
|
+
!l.autoplay || l.autoplay <= 0 || (E = setInterval(() => {
|
|
307
|
+
l.pauseAutoplayOnHover && H.value || Y();
|
|
308
|
+
}, l.autoplay));
|
|
309
309
|
}
|
|
310
310
|
function ge() {
|
|
311
311
|
E && (clearInterval(E), E = null), me();
|
|
312
312
|
}
|
|
313
|
-
const
|
|
314
|
-
function O(
|
|
315
|
-
const
|
|
316
|
-
val:
|
|
317
|
-
max:
|
|
313
|
+
const M = c(!1);
|
|
314
|
+
function O(a) {
|
|
315
|
+
const g = l.wrapAround ? a : ie({
|
|
316
|
+
val: a,
|
|
317
|
+
max: v.value,
|
|
318
318
|
min: I.value
|
|
319
319
|
});
|
|
320
|
-
|
|
321
|
-
slidingToIndex:
|
|
322
|
-
currentSlideIndex:
|
|
320
|
+
i.value === g || M.value || (t("slide-start", {
|
|
321
|
+
slidingToIndex: a,
|
|
322
|
+
currentSlideIndex: i.value,
|
|
323
323
|
prevSlideIndex: T.value,
|
|
324
324
|
slidesCount: u.value
|
|
325
|
-
}),
|
|
326
|
-
if (
|
|
327
|
-
const
|
|
328
|
-
val:
|
|
329
|
-
max:
|
|
325
|
+
}), M.value = !0, T.value = i.value, i.value = g, F = setTimeout(() => {
|
|
326
|
+
if (l.wrapAround) {
|
|
327
|
+
const f = re({
|
|
328
|
+
val: g,
|
|
329
|
+
max: v.value,
|
|
330
330
|
min: 0
|
|
331
331
|
});
|
|
332
|
-
|
|
333
|
-
currentSlideIndex:
|
|
334
|
-
slidingToIndex:
|
|
332
|
+
f !== i.value && (i.value = f, t("loop", {
|
|
333
|
+
currentSlideIndex: i.value,
|
|
334
|
+
slidingToIndex: a
|
|
335
335
|
}));
|
|
336
336
|
}
|
|
337
|
-
t("update:modelValue",
|
|
338
|
-
currentSlideIndex:
|
|
337
|
+
t("update:modelValue", i.value), t("slide-end", {
|
|
338
|
+
currentSlideIndex: i.value,
|
|
339
339
|
prevSlideIndex: T.value,
|
|
340
340
|
slidesCount: u.value
|
|
341
|
-
}),
|
|
342
|
-
},
|
|
341
|
+
}), M.value = !1, ge();
|
|
342
|
+
}, l.transition));
|
|
343
343
|
}
|
|
344
|
-
function
|
|
345
|
-
O(
|
|
344
|
+
function Y() {
|
|
345
|
+
O(i.value + l.itemsToScroll);
|
|
346
346
|
}
|
|
347
|
-
function
|
|
348
|
-
O(
|
|
347
|
+
function K() {
|
|
348
|
+
O(i.value - l.itemsToScroll);
|
|
349
349
|
}
|
|
350
|
-
const he = { slideTo: O, next:
|
|
351
|
-
C("nav", he), C("isSliding",
|
|
352
|
-
const we =
|
|
353
|
-
config:
|
|
354
|
-
currentSlide:
|
|
350
|
+
const he = { slideTo: O, next: Y, prev: K };
|
|
351
|
+
C("nav", he), C("isSliding", M);
|
|
352
|
+
const we = R(() => ze({
|
|
353
|
+
config: l,
|
|
354
|
+
currentSlide: i.value,
|
|
355
355
|
slidesCount: u.value
|
|
356
356
|
}));
|
|
357
357
|
C("slidesToScroll", we);
|
|
358
|
-
const Oe =
|
|
359
|
-
const
|
|
358
|
+
const Oe = R(() => {
|
|
359
|
+
const a = l.dir === "rtl" ? -1 : 1, g = we.value * m.value * a;
|
|
360
360
|
return {
|
|
361
|
-
transform: `translateX(${
|
|
362
|
-
transition: `${
|
|
363
|
-
margin:
|
|
361
|
+
transform: `translateX(${N.x - g}px)`,
|
|
362
|
+
transition: `${M.value ? l.transition : 0}ms`,
|
|
363
|
+
margin: l.wrapAround ? `0 -${u.value * m.value}px` : "",
|
|
364
364
|
width: "100%"
|
|
365
365
|
};
|
|
366
366
|
});
|
|
367
367
|
function _e() {
|
|
368
|
-
|
|
368
|
+
q(), $(), U(), P(), ge();
|
|
369
369
|
}
|
|
370
|
-
Object.keys(Ce).forEach((
|
|
371
|
-
["modelValue"].includes(
|
|
372
|
-
}),
|
|
373
|
-
|
|
374
|
-
}),
|
|
370
|
+
Object.keys(Ce).forEach((a) => {
|
|
371
|
+
["modelValue"].includes(a) || ae(() => e[a], _e);
|
|
372
|
+
}), ae(() => e.modelValue, (a) => {
|
|
373
|
+
a !== i.value && O(Number(a));
|
|
374
|
+
}), ae(u, U), t("before-init"), q();
|
|
375
375
|
const Se = {
|
|
376
|
-
config:
|
|
376
|
+
config: l,
|
|
377
377
|
slidesCount: u,
|
|
378
|
-
slideWidth:
|
|
379
|
-
next:
|
|
380
|
-
prev:
|
|
378
|
+
slideWidth: m,
|
|
379
|
+
next: Y,
|
|
380
|
+
prev: K,
|
|
381
381
|
slideTo: O,
|
|
382
|
-
currentSlide:
|
|
383
|
-
maxSlide:
|
|
382
|
+
currentSlide: i,
|
|
383
|
+
maxSlide: v,
|
|
384
384
|
minSlide: I,
|
|
385
385
|
middleSlide: w
|
|
386
386
|
};
|
|
387
|
-
|
|
388
|
-
updateBreakpointsConfigs:
|
|
389
|
-
updateSlidesData:
|
|
390
|
-
updateSlideWidth:
|
|
391
|
-
initDefaultConfigs:
|
|
387
|
+
o({
|
|
388
|
+
updateBreakpointsConfigs: $,
|
|
389
|
+
updateSlidesData: U,
|
|
390
|
+
updateSlideWidth: P,
|
|
391
|
+
initDefaultConfigs: q,
|
|
392
392
|
restartCarousel: _e,
|
|
393
393
|
slideTo: O,
|
|
394
|
-
next:
|
|
395
|
-
prev:
|
|
394
|
+
next: Y,
|
|
395
|
+
prev: K,
|
|
396
396
|
nav: he,
|
|
397
397
|
data: Se
|
|
398
398
|
});
|
|
399
|
-
const
|
|
399
|
+
const Q = n.default || n.slides, Z = n.addons, be = L(Se);
|
|
400
400
|
return () => {
|
|
401
|
-
const
|
|
402
|
-
|
|
403
|
-
let
|
|
404
|
-
if (
|
|
405
|
-
const ee =
|
|
406
|
-
index: -
|
|
401
|
+
const a = je(Q == null ? void 0 : Q(be)), g = (Z == null ? void 0 : Z(be)) || [];
|
|
402
|
+
a.forEach((ee, te) => ee.props.index = te);
|
|
403
|
+
let f = a;
|
|
404
|
+
if (l.wrapAround) {
|
|
405
|
+
const ee = a.map((ne, V) => xe(ne, {
|
|
406
|
+
index: -a.length + V,
|
|
407
407
|
isClone: !0,
|
|
408
|
-
key: `clone-before-${
|
|
409
|
-
})), te =
|
|
410
|
-
index:
|
|
408
|
+
key: `clone-before-${V}`
|
|
409
|
+
})), te = a.map((ne, V) => xe(ne, {
|
|
410
|
+
index: a.length + V,
|
|
411
411
|
isClone: !0,
|
|
412
|
-
key: `clone-after-${
|
|
412
|
+
key: `clone-after-${V}`
|
|
413
413
|
}));
|
|
414
|
-
|
|
414
|
+
f = [...ee, ...a, ...te];
|
|
415
415
|
}
|
|
416
|
-
|
|
416
|
+
d.value = a, u.value = Math.max(a.length, 1);
|
|
417
417
|
const A = y("ol", {
|
|
418
418
|
class: "carousel__track",
|
|
419
419
|
style: Oe.value,
|
|
420
|
-
onMousedownCapture:
|
|
421
|
-
onTouchstartPassiveCapture:
|
|
422
|
-
},
|
|
420
|
+
onMousedownCapture: l.mouseDrag ? ve : null,
|
|
421
|
+
onTouchstartPassiveCapture: l.touchDrag ? ve : null
|
|
422
|
+
}, f), ye = y("div", { class: "carousel__viewport" }, A);
|
|
423
423
|
return y("section", {
|
|
424
424
|
ref: r,
|
|
425
425
|
class: {
|
|
426
426
|
carousel: !0,
|
|
427
|
-
"is-sliding":
|
|
428
|
-
"is-dragging":
|
|
429
|
-
"is-hover":
|
|
430
|
-
"carousel--rtl":
|
|
427
|
+
"is-sliding": M.value,
|
|
428
|
+
"is-dragging": J.value,
|
|
429
|
+
"is-hover": H.value,
|
|
430
|
+
"carousel--rtl": l.dir === "rtl"
|
|
431
431
|
},
|
|
432
|
-
dir:
|
|
433
|
-
"aria-label":
|
|
432
|
+
dir: l.dir,
|
|
433
|
+
"aria-label": l.i18n.ariaGallery,
|
|
434
434
|
tabindex: "0",
|
|
435
|
-
onMouseenter:
|
|
436
|
-
onMouseleave:
|
|
437
|
-
}, [
|
|
435
|
+
onMouseenter: Ne,
|
|
436
|
+
onMouseleave: Me
|
|
437
|
+
}, [ye, g, y(Ge)]);
|
|
438
438
|
};
|
|
439
439
|
}
|
|
440
440
|
}), se;
|
|
@@ -451,41 +451,41 @@ function Je(e) {
|
|
|
451
451
|
return e in se;
|
|
452
452
|
}
|
|
453
453
|
const ue = (e) => {
|
|
454
|
-
const n = b("config", L(Object.assign({},
|
|
454
|
+
const n = b("config", L(Object.assign({}, p))), t = String(e.name), o = `icon${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
455
455
|
if (!t || typeof t != "string" || !Je(t))
|
|
456
456
|
return;
|
|
457
|
-
const s = qe[t], r = y("path", { d: s }),
|
|
457
|
+
const s = qe[t], r = y("path", { d: s }), d = n.i18n[o] || e.title || t, m = y("title", d);
|
|
458
458
|
return y("svg", {
|
|
459
459
|
class: "carousel__icon",
|
|
460
460
|
viewBox: "0 0 24 24",
|
|
461
461
|
role: "img",
|
|
462
|
-
"aria-label":
|
|
463
|
-
}, [
|
|
462
|
+
"aria-label": d
|
|
463
|
+
}, [m, r]);
|
|
464
464
|
};
|
|
465
465
|
ue.props = { name: String, title: String };
|
|
466
466
|
const Ke = (e, { slots: n, attrs: t }) => {
|
|
467
|
-
const { next:
|
|
467
|
+
const { next: o, prev: s } = n || {}, r = b("config", L(Object.assign({}, p))), d = b("maxSlide", c(1)), m = b("minSlide", c(1)), u = b("currentSlide", c(1)), l = b("nav", {}), { dir: h, wrapAround: _, i18n: i } = r, T = h === "rtl", w = y("button", {
|
|
468
468
|
type: "button",
|
|
469
469
|
class: [
|
|
470
470
|
"carousel__prev",
|
|
471
|
-
!_ && u.value <=
|
|
471
|
+
!_ && u.value <= m.value && "carousel__prev--disabled",
|
|
472
472
|
t == null ? void 0 : t.class
|
|
473
473
|
],
|
|
474
|
-
"aria-label":
|
|
475
|
-
onClick:
|
|
476
|
-
}, (s == null ? void 0 : s()) || y(ue, { name: T ? "arrowRight" : "arrowLeft" })),
|
|
474
|
+
"aria-label": i.ariaPreviousSlide,
|
|
475
|
+
onClick: l.prev
|
|
476
|
+
}, (s == null ? void 0 : s()) || y(ue, { name: T ? "arrowRight" : "arrowLeft" })), v = y("button", {
|
|
477
477
|
type: "button",
|
|
478
478
|
class: [
|
|
479
479
|
"carousel__next",
|
|
480
|
-
!_ && u.value >=
|
|
480
|
+
!_ && u.value >= d.value && "carousel__next--disabled",
|
|
481
481
|
t == null ? void 0 : t.class
|
|
482
482
|
],
|
|
483
|
-
"aria-label":
|
|
484
|
-
onClick:
|
|
485
|
-
}, (
|
|
486
|
-
return [w,
|
|
483
|
+
"aria-label": i.ariaNextSlide,
|
|
484
|
+
onClick: l.next
|
|
485
|
+
}, (o == null ? void 0 : o()) || y(ue, { name: T ? "arrowLeft" : "arrowRight" }));
|
|
486
|
+
return [w, v];
|
|
487
487
|
};
|
|
488
|
-
var Qe =
|
|
488
|
+
var Qe = G({
|
|
489
489
|
name: "CarouselSlide",
|
|
490
490
|
props: {
|
|
491
491
|
index: {
|
|
@@ -498,10 +498,10 @@ var Qe = Y({
|
|
|
498
498
|
}
|
|
499
499
|
},
|
|
500
500
|
setup(e, { slots: n }) {
|
|
501
|
-
const t = b("config", L(Object.assign({},
|
|
501
|
+
const t = b("config", L(Object.assign({}, p))), o = b("currentSlide", c(0)), s = b("slidesToScroll", c(0)), r = b("isSliding", c(!1)), d = R(() => e.index === o.value), m = R(() => e.index === o.value - 1), u = R(() => e.index === o.value + 1), l = R(() => {
|
|
502
502
|
const h = Math.floor(s.value), _ = Math.ceil(s.value + t.itemsToShow - 1);
|
|
503
503
|
return e.index >= h && e.index <= _;
|
|
504
|
-
};
|
|
504
|
+
});
|
|
505
505
|
return () => {
|
|
506
506
|
var h;
|
|
507
507
|
return y("li", {
|
|
@@ -509,14 +509,21 @@ var Qe = Y({
|
|
|
509
509
|
class: {
|
|
510
510
|
carousel__slide: !0,
|
|
511
511
|
"carousel__slide--clone": e.isClone,
|
|
512
|
-
"carousel__slide--visible":
|
|
513
|
-
"carousel__slide--active":
|
|
514
|
-
"carousel__slide--prev":
|
|
515
|
-
"carousel__slide--next": u
|
|
512
|
+
"carousel__slide--visible": l.value,
|
|
513
|
+
"carousel__slide--active": d.value,
|
|
514
|
+
"carousel__slide--prev": m.value,
|
|
515
|
+
"carousel__slide--next": u.value,
|
|
516
516
|
"carousel__slide--sliding": r.value
|
|
517
517
|
},
|
|
518
|
-
"aria-hidden": !
|
|
519
|
-
}, (h = n.default) === null || h === void 0 ? void 0 : h.call(n
|
|
518
|
+
"aria-hidden": !l.value
|
|
519
|
+
}, (h = n.default) === null || h === void 0 ? void 0 : h.call(n, {
|
|
520
|
+
isActive: d.value,
|
|
521
|
+
isClone: e.isClone,
|
|
522
|
+
isPrev: m.value,
|
|
523
|
+
isNext: u.value,
|
|
524
|
+
isSliding: r.value,
|
|
525
|
+
isVisible: l.value
|
|
526
|
+
}));
|
|
520
527
|
};
|
|
521
528
|
}
|
|
522
529
|
});
|
|
@@ -524,7 +531,7 @@ const Ze = ["src", "title"], et = {
|
|
|
524
531
|
key: 0,
|
|
525
532
|
class: "tw-flex tw-list-none",
|
|
526
533
|
"data-test": "stash-carousel|pagination-tiles"
|
|
527
|
-
}, tt = ["aria-current", "onClick"], nt = ["data-test", "src", "title"],
|
|
534
|
+
}, tt = ["aria-current", "onClick"], nt = ["data-test", "src", "title"], at = /* @__PURE__ */ G({
|
|
528
535
|
inheritAttrs: !1,
|
|
529
536
|
__name: "Carousel",
|
|
530
537
|
props: {
|
|
@@ -543,75 +550,75 @@ const Ze = ["src", "title"], et = {
|
|
|
543
550
|
},
|
|
544
551
|
emits: ["click", "transition", "transition:multi"],
|
|
545
552
|
setup(e, { expose: n, emit: t }) {
|
|
546
|
-
const
|
|
553
|
+
const o = e, s = Be(), r = De(), d = c();
|
|
547
554
|
n({
|
|
548
555
|
next: () => {
|
|
549
|
-
var
|
|
550
|
-
return (
|
|
556
|
+
var i;
|
|
557
|
+
return (i = d.value) == null ? void 0 : i.next();
|
|
551
558
|
},
|
|
552
559
|
prev: () => {
|
|
553
|
-
var
|
|
554
|
-
return (
|
|
560
|
+
var i;
|
|
561
|
+
return (i = d.value) == null ? void 0 : i.prev();
|
|
555
562
|
}
|
|
556
563
|
});
|
|
557
|
-
const
|
|
564
|
+
const m = t, u = c(0), l = () => {
|
|
558
565
|
_();
|
|
559
566
|
}, h = () => {
|
|
560
|
-
|
|
567
|
+
m("click", o.slides[u.value]);
|
|
561
568
|
}, _ = () => {
|
|
562
|
-
if (
|
|
563
|
-
|
|
569
|
+
if (o.itemsToShow === 1) {
|
|
570
|
+
m("transition", o.slides[u.value]);
|
|
564
571
|
return;
|
|
565
572
|
}
|
|
566
|
-
const
|
|
567
|
-
|
|
573
|
+
const i = o.slides.slice(u.value, u.value + o.itemsToShow);
|
|
574
|
+
m("transition:multi", i);
|
|
568
575
|
};
|
|
569
|
-
return (
|
|
576
|
+
return (i, T) => (k(), j(D, null, [
|
|
570
577
|
Re(S(Fe), Pe({
|
|
571
578
|
ref_key: "carouselRef",
|
|
572
|
-
ref:
|
|
579
|
+
ref: d,
|
|
573
580
|
modelValue: u.value,
|
|
574
581
|
"onUpdate:modelValue": T[0] || (T[0] = (w) => u.value = w),
|
|
575
582
|
"aria-live": "polite",
|
|
576
583
|
"aria-roledescription": "carousel",
|
|
577
584
|
class: ["stash-carousel tw-mb-6", S(r).root],
|
|
578
585
|
"data-test": "stash-carousel",
|
|
579
|
-
autoplay:
|
|
586
|
+
autoplay: i.autoplayInterval,
|
|
580
587
|
i18n: {
|
|
581
588
|
ariaNextSlide: S(B)("ll.next"),
|
|
582
589
|
ariaPreviousSlide: S(B)("ll.previous"),
|
|
583
590
|
iconArrowLeft: S(B)("ll.previous"),
|
|
584
591
|
iconArrowRight: S(B)("ll.next")
|
|
585
592
|
},
|
|
586
|
-
"items-to-scroll":
|
|
587
|
-
"items-to-show":
|
|
588
|
-
"pause-autoplay-on-hover":
|
|
589
|
-
"wrap-around":
|
|
593
|
+
"items-to-scroll": o.itemsToScroll,
|
|
594
|
+
"items-to-show": o.itemsToShow,
|
|
595
|
+
"pause-autoplay-on-hover": i.pauseAutoplayOnHover,
|
|
596
|
+
"wrap-around": o.loop
|
|
590
597
|
}, S(s), {
|
|
591
|
-
onInit:
|
|
598
|
+
onInit: l,
|
|
592
599
|
onSlideEnd: _
|
|
593
600
|
}), {
|
|
594
|
-
addons:
|
|
595
|
-
|
|
601
|
+
addons: oe(() => [
|
|
602
|
+
o.slides.length > 1 && !o.hideNavigation ? (k(), ke(S(Ke), { key: 0 })) : Te("", !0)
|
|
596
603
|
]),
|
|
597
|
-
default:
|
|
598
|
-
(k(!0), j(D, null, le(
|
|
604
|
+
default: oe(() => [
|
|
605
|
+
(k(!0), j(D, null, le(o.slides, (w, v) => (k(), ke(S(Qe), {
|
|
599
606
|
key: w.id,
|
|
600
607
|
"data-test": "stash-carousel|slide",
|
|
601
608
|
class: "tw-cursor-pointer",
|
|
602
609
|
onClick: h
|
|
603
610
|
}, {
|
|
604
|
-
default:
|
|
605
|
-
Ve(
|
|
611
|
+
default: oe(() => [
|
|
612
|
+
Ve(i.$slots, "slide", {
|
|
606
613
|
slide: w,
|
|
607
|
-
index:
|
|
614
|
+
index: v
|
|
608
615
|
}, () => [
|
|
609
616
|
Ae("img", {
|
|
610
|
-
class:
|
|
617
|
+
class: W(["tw-h-full tw-w-full", [{ "tw-rounded": o.roundBorders }]]),
|
|
611
618
|
src: w.imageUrl,
|
|
612
619
|
title: S(B)("ll.carousel.imageLabel", {
|
|
613
|
-
index:
|
|
614
|
-
total:
|
|
620
|
+
index: v + 1,
|
|
621
|
+
total: i.slides.length
|
|
615
622
|
})
|
|
616
623
|
}, null, 10, Ze)
|
|
617
624
|
])
|
|
@@ -621,42 +628,42 @@ const Ze = ["src", "title"], et = {
|
|
|
621
628
|
]),
|
|
622
629
|
_: 3
|
|
623
630
|
}, 16, ["modelValue", "autoplay", "class", "i18n", "items-to-scroll", "items-to-show", "pause-autoplay-on-hover", "wrap-around"]),
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
(k(!0), j(D, null, le(
|
|
631
|
+
o.hidePagination ? Te("", !0) : (k(), j(D, { key: 0 }, [
|
|
632
|
+
o.pagination === "tile" ? (k(), j("ul", et, [
|
|
633
|
+
(k(!0), j(D, null, le(i.slides, (w, v) => (k(), j("li", {
|
|
627
634
|
key: w.imageUrl,
|
|
628
635
|
class: "tw-mr-3 tw-cursor-pointer",
|
|
629
|
-
"aria-current": u.value ===
|
|
630
|
-
onClick: (I) => u.value =
|
|
636
|
+
"aria-current": u.value === v,
|
|
637
|
+
onClick: (I) => u.value = v
|
|
631
638
|
}, [
|
|
632
639
|
Ae("img", {
|
|
633
|
-
class:
|
|
640
|
+
class: W(["tw-rounded", [
|
|
634
641
|
S(r)["pagination-tile"],
|
|
635
642
|
{
|
|
636
|
-
"is-current-tile": u.value ===
|
|
637
|
-
"tw-rounded-full":
|
|
643
|
+
"is-current-tile": u.value === v,
|
|
644
|
+
"tw-rounded-full": o.paginationTileRadius === "full"
|
|
638
645
|
}
|
|
639
646
|
]]),
|
|
640
|
-
"data-test": `stash-carousel|pagination-tile-${
|
|
647
|
+
"data-test": `stash-carousel|pagination-tile-${v}`,
|
|
641
648
|
src: w.imageUrl,
|
|
642
|
-
title: S(B)("ll.carousel.paginationLabel", { index:
|
|
649
|
+
title: S(B)("ll.carousel.paginationLabel", { index: v + 1 })
|
|
643
650
|
}, null, 10, nt)
|
|
644
651
|
], 8, tt))), 128))
|
|
645
652
|
])) : (k(), j("ul", {
|
|
646
653
|
key: 1,
|
|
647
|
-
class:
|
|
654
|
+
class: W(["tw-text-center", [!i.staticPaginationDots && "lg:tw-hidden"]]),
|
|
648
655
|
"data-test": "stash-carousel|pagination-dots"
|
|
649
656
|
}, [
|
|
650
|
-
(k(!0), j(D, null, le(
|
|
657
|
+
(k(!0), j(D, null, le(i.slides, (w, v) => (k(), j("li", {
|
|
651
658
|
key: w.imageUrl,
|
|
652
|
-
class:
|
|
659
|
+
class: W(["tw-inline-block tw-rounded-full", [S(r)["pagination-dot"], [u.value === v ? "tw-bg-blue-500" : "tw-bg-blue-100"]]])
|
|
653
660
|
}, null, 2))), 128))
|
|
654
661
|
], 2))
|
|
655
662
|
], 64))
|
|
656
663
|
], 64));
|
|
657
664
|
}
|
|
658
|
-
}),
|
|
659
|
-
root:
|
|
665
|
+
}), ot = "_root_a92j2_2", lt = "_carousel__icon_a92j2_2", it = "_carousel__next_a92j2_18", rt = "_carousel__prev_a92j2_26", st = {
|
|
666
|
+
root: ot,
|
|
660
667
|
carousel__icon: lt,
|
|
661
668
|
carousel__next: it,
|
|
662
669
|
"carousel__next--disabled": "_carousel__next--disabled_a92j2_22",
|
|
@@ -667,7 +674,7 @@ const Ze = ["src", "title"], et = {
|
|
|
667
674
|
"is-current-tile": "_is-current-tile_a92j2_47"
|
|
668
675
|
}, ut = {
|
|
669
676
|
$style: st
|
|
670
|
-
}, pt = /* @__PURE__ */ $e(
|
|
677
|
+
}, pt = /* @__PURE__ */ $e(at, [["__cssModules", ut]]);
|
|
671
678
|
export {
|
|
672
679
|
pt as default
|
|
673
680
|
};
|