@leaflink/stash 50.4.0 → 50.5.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/Carousel.js +321 -324
- package/dist/Carousel.js.map +1 -1
- package/dist/Carousel.vue.d.ts +4 -0
- package/dist/DataViewToolbar.js +24 -18
- package/dist/DataViewToolbar.js.map +1 -1
- package/dist/DatePicker.vue.d.ts +1 -1
- package/dist/Filters.vue.d.ts +9 -9
- package/dist/Image.js +6 -166
- package/dist/Image.js.map +1 -1
- package/dist/Image.vue_vue_type_script_setup_true_lang-YUNunj71.js +169 -0
- package/dist/Image.vue_vue_type_script_setup_true_lang-YUNunj71.js.map +1 -0
- package/dist/InlineEdit.vue.d.ts +1 -1
- package/dist/ListView.vue.d.ts +9 -9
- package/dist/Module.vue.d.ts +1 -1
- package/dist/Textarea.js +25 -20
- package/dist/Textarea.js.map +1 -1
- package/dist/Thumbnail.js +91 -0
- package/dist/Thumbnail.js.map +1 -0
- package/dist/Thumbnail.vue.d.ts +63 -0
- package/dist/ThumbnailEmpty.js +33 -0
- package/dist/ThumbnailEmpty.js.map +1 -0
- package/dist/ThumbnailEmpty.vue.d.ts +9 -0
- package/dist/ThumbnailGroup.js +73 -0
- package/dist/ThumbnailGroup.js.map +1 -0
- package/dist/ThumbnailGroup.keys-D6WL5xQ5.js +16 -0
- package/dist/ThumbnailGroup.keys-D6WL5xQ5.js.map +1 -0
- package/dist/ThumbnailGroup.vue.d.ts +191 -0
- package/dist/Tooltip.js +6 -6
- package/dist/components.css +1 -1
- package/dist/{index-Ck3Dl09q.js → index-Bbc2pg2X.js} +3 -3
- package/dist/index-Bbc2pg2X.js.map +1 -0
- package/dist/locale.js +16 -12
- package/dist/locale.js.map +1 -1
- package/dist/useSortable.js +1 -1
- package/package.json +2 -1
- package/dist/index-Ck3Dl09q.js.map +0 -1
package/dist/Carousel.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { t as
|
|
3
|
-
import
|
|
1
|
+
import { defineComponent as F, inject as b, reactive as j, ref as d, h as _, provide as N, onMounted as Ie, nextTick as Le, onUnmounted as Ee, computed as D, watch as ae, cloneVNode as Te, Fragment as B, useAttrs as je, useCssModule as Be, openBlock as k, createElementBlock as E, createVNode as De, unref as A, mergeProps as Re, withCtx as G, createBlock as W, createCommentVNode as ke, renderList as le, renderSlot as Pe, createElementVNode as Ve, normalizeClass as ie } from "vue";
|
|
2
|
+
import { t as V } from "./locale.js";
|
|
3
|
+
import Ue from "./Thumbnail.js";
|
|
4
|
+
import $e from "./ThumbnailGroup.js";
|
|
5
|
+
import { _ as Xe } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
4
6
|
/**
|
|
5
7
|
* Vue 3 Carousel 0.3.4
|
|
6
8
|
* (c) 2024
|
|
@@ -31,7 +33,7 @@ const p = {
|
|
|
31
33
|
iconArrowRight: "Arrow pointing to the right",
|
|
32
34
|
iconArrowLeft: "Arrow pointing to the left"
|
|
33
35
|
}
|
|
34
|
-
},
|
|
36
|
+
}, Ae = {
|
|
35
37
|
// count of items to showed per view
|
|
36
38
|
itemsToShow: {
|
|
37
39
|
default: p.itemsToShow,
|
|
@@ -114,377 +116,377 @@ const p = {
|
|
|
114
116
|
type: Object
|
|
115
117
|
}
|
|
116
118
|
};
|
|
117
|
-
function
|
|
118
|
-
const { snapAlign: t, wrapAround:
|
|
119
|
-
if (
|
|
119
|
+
function ze({ config: e, slidesCount: n }) {
|
|
120
|
+
const { snapAlign: t, wrapAround: a, itemsToShow: r = 1 } = e;
|
|
121
|
+
if (a)
|
|
120
122
|
return Math.max(n - 1, 0);
|
|
121
|
-
let
|
|
123
|
+
let i;
|
|
122
124
|
switch (t) {
|
|
123
125
|
case "start":
|
|
124
|
-
|
|
126
|
+
i = n - r;
|
|
125
127
|
break;
|
|
126
128
|
case "end":
|
|
127
|
-
|
|
129
|
+
i = n - 1;
|
|
128
130
|
break;
|
|
129
131
|
case "center":
|
|
130
132
|
case "center-odd":
|
|
131
|
-
|
|
133
|
+
i = n - Math.ceil((r - 0.5) / 2);
|
|
132
134
|
break;
|
|
133
135
|
case "center-even":
|
|
134
|
-
|
|
136
|
+
i = n - Math.ceil(r / 2);
|
|
135
137
|
break;
|
|
136
138
|
default:
|
|
137
|
-
|
|
139
|
+
i = 0;
|
|
138
140
|
break;
|
|
139
141
|
}
|
|
140
|
-
return Math.max(
|
|
142
|
+
return Math.max(i, 0);
|
|
141
143
|
}
|
|
142
|
-
function
|
|
143
|
-
const { wrapAround: t, snapAlign:
|
|
144
|
-
let
|
|
145
|
-
if (t ||
|
|
146
|
-
return
|
|
147
|
-
switch (
|
|
144
|
+
function He({ config: e, slidesCount: n }) {
|
|
145
|
+
const { wrapAround: t, snapAlign: a, itemsToShow: r = 1 } = e;
|
|
146
|
+
let i = 0;
|
|
147
|
+
if (t || r > n)
|
|
148
|
+
return i;
|
|
149
|
+
switch (a) {
|
|
148
150
|
case "start":
|
|
149
|
-
|
|
151
|
+
i = 0;
|
|
150
152
|
break;
|
|
151
153
|
case "end":
|
|
152
|
-
|
|
154
|
+
i = r - 1;
|
|
153
155
|
break;
|
|
154
156
|
case "center":
|
|
155
157
|
case "center-odd":
|
|
156
|
-
|
|
158
|
+
i = Math.floor((r - 1) / 2);
|
|
157
159
|
break;
|
|
158
160
|
case "center-even":
|
|
159
|
-
|
|
161
|
+
i = Math.floor((r - 2) / 2);
|
|
160
162
|
break;
|
|
161
163
|
default:
|
|
162
|
-
|
|
164
|
+
i = 0;
|
|
163
165
|
break;
|
|
164
166
|
}
|
|
165
|
-
return
|
|
167
|
+
return i;
|
|
166
168
|
}
|
|
167
|
-
function
|
|
169
|
+
function re({ val: e, max: n, min: t }) {
|
|
168
170
|
return n < t ? e : Math.min(Math.max(e, t), n);
|
|
169
171
|
}
|
|
170
|
-
function
|
|
171
|
-
const { snapAlign:
|
|
172
|
-
let
|
|
173
|
-
switch (
|
|
172
|
+
function Ye({ config: e, currentSlide: n, slidesCount: t }) {
|
|
173
|
+
const { snapAlign: a, wrapAround: r, itemsToShow: i = 1 } = e;
|
|
174
|
+
let v = n;
|
|
175
|
+
switch (a) {
|
|
174
176
|
case "center":
|
|
175
177
|
case "center-odd":
|
|
176
|
-
|
|
178
|
+
v -= (i - 1) / 2;
|
|
177
179
|
break;
|
|
178
180
|
case "center-even":
|
|
179
|
-
|
|
181
|
+
v -= (i - 2) / 2;
|
|
180
182
|
break;
|
|
181
183
|
case "end":
|
|
182
|
-
|
|
184
|
+
v -= i - 1;
|
|
183
185
|
break;
|
|
184
186
|
}
|
|
185
|
-
return
|
|
186
|
-
val:
|
|
187
|
-
max: t -
|
|
187
|
+
return r ? v : re({
|
|
188
|
+
val: v,
|
|
189
|
+
max: t - i,
|
|
188
190
|
min: 0
|
|
189
191
|
});
|
|
190
192
|
}
|
|
191
|
-
function
|
|
193
|
+
function Ce(e) {
|
|
192
194
|
return e ? e.reduce((n, t) => {
|
|
193
|
-
var
|
|
194
|
-
return t.type ===
|
|
195
|
+
var a;
|
|
196
|
+
return t.type === B ? [...n, ...Ce(t.children)] : ((a = t.type) === null || a === void 0 ? void 0 : a.name) === "CarouselSlide" ? [...n, t] : n;
|
|
195
197
|
}, []) : [];
|
|
196
198
|
}
|
|
197
|
-
function
|
|
198
|
-
return e > n ?
|
|
199
|
+
function se({ val: e, max: n, min: t = 0 }) {
|
|
200
|
+
return e > n ? se({ val: e - (n + 1), max: n, min: t }) : e < t ? se({ val: e + (n + 1), max: n, min: t }) : e;
|
|
199
201
|
}
|
|
200
|
-
function
|
|
202
|
+
function Ge(e, n) {
|
|
201
203
|
let t;
|
|
202
|
-
return n ? function(...
|
|
203
|
-
const
|
|
204
|
-
t || (e.apply(
|
|
204
|
+
return n ? function(...a) {
|
|
205
|
+
const r = this;
|
|
206
|
+
t || (e.apply(r, a), t = !0, setTimeout(() => t = !1, n));
|
|
205
207
|
} : e;
|
|
206
208
|
}
|
|
207
|
-
function
|
|
209
|
+
function We(e, n) {
|
|
208
210
|
let t;
|
|
209
|
-
return function(...
|
|
211
|
+
return function(...a) {
|
|
210
212
|
t && clearTimeout(t), t = setTimeout(() => {
|
|
211
|
-
e(...
|
|
213
|
+
e(...a), t = null;
|
|
212
214
|
}, n);
|
|
213
215
|
};
|
|
214
216
|
}
|
|
215
|
-
function
|
|
216
|
-
return Object.entries(n).reduce((t, [
|
|
217
|
+
function Fe(e = "", n = {}) {
|
|
218
|
+
return Object.entries(n).reduce((t, [a, r]) => t.replace(`{${a}}`, String(r)), e);
|
|
217
219
|
}
|
|
218
|
-
var
|
|
220
|
+
var qe = F({
|
|
219
221
|
name: "ARIA",
|
|
220
222
|
setup() {
|
|
221
|
-
const e = b("config",
|
|
222
|
-
return () =>
|
|
223
|
+
const e = b("config", j(Object.assign({}, p))), n = b("currentSlide", d(0)), t = b("slidesCount", d(0));
|
|
224
|
+
return () => _("div", {
|
|
223
225
|
class: ["carousel__liveregion", "carousel__sr-only"],
|
|
224
226
|
"aria-live": "polite",
|
|
225
227
|
"aria-atomic": "true"
|
|
226
|
-
},
|
|
228
|
+
}, Fe(e.i18n.itemXofY, {
|
|
227
229
|
currentSlide: n.value + 1,
|
|
228
230
|
slidesCount: t.value
|
|
229
231
|
}));
|
|
230
232
|
}
|
|
231
|
-
}),
|
|
233
|
+
}), Je = F({
|
|
232
234
|
name: "Carousel",
|
|
233
|
-
props:
|
|
234
|
-
setup(e, { slots: n, emit: t, expose:
|
|
235
|
-
var
|
|
236
|
-
const
|
|
237
|
-
let
|
|
238
|
-
const
|
|
239
|
-
let
|
|
240
|
-
|
|
241
|
-
function
|
|
242
|
-
S = Object.assign({}, e.breakpoints),
|
|
235
|
+
props: Ae,
|
|
236
|
+
setup(e, { slots: n, emit: t, expose: a }) {
|
|
237
|
+
var r;
|
|
238
|
+
const i = d(null), v = d([]), m = d(0), s = d(0), l = j(Object.assign({}, p));
|
|
239
|
+
let g = Object.assign({}, p), S;
|
|
240
|
+
const c = d((r = e.modelValue) !== null && r !== void 0 ? r : 0), C = d(0), u = d(0), y = d(0), w = d(0);
|
|
241
|
+
let T, q;
|
|
242
|
+
N("config", l), N("slidesCount", s), N("currentSlide", c), N("maxSlide", y), N("minSlide", w), N("slideWidth", m);
|
|
243
|
+
function J() {
|
|
244
|
+
S = Object.assign({}, e.breakpoints), g = Object.assign(Object.assign(Object.assign({}, g), e), { i18n: Object.assign(Object.assign({}, g.i18n), e.i18n), breakpoints: void 0 }), de(g);
|
|
243
245
|
}
|
|
244
|
-
function
|
|
246
|
+
function U() {
|
|
245
247
|
if (!S || !Object.keys(S).length)
|
|
246
248
|
return;
|
|
247
|
-
const o = Object.keys(S).map((f) => Number(f)).sort((f,
|
|
248
|
-
let
|
|
249
|
+
const o = Object.keys(S).map((f) => Number(f)).sort((f, M) => +M - +f);
|
|
250
|
+
let h = Object.assign({}, g);
|
|
249
251
|
o.some((f) => {
|
|
250
|
-
const
|
|
251
|
-
return
|
|
252
|
-
}),
|
|
252
|
+
const M = window.matchMedia(`(min-width: ${f}px)`).matches;
|
|
253
|
+
return M && (h = Object.assign(Object.assign({}, h), S[f])), M;
|
|
254
|
+
}), de(h);
|
|
253
255
|
}
|
|
254
|
-
function
|
|
255
|
-
Object.entries(o).forEach(([
|
|
256
|
+
function de(o) {
|
|
257
|
+
Object.entries(o).forEach(([h, f]) => l[h] = f);
|
|
256
258
|
}
|
|
257
|
-
const
|
|
258
|
-
|
|
259
|
+
const ve = We(() => {
|
|
260
|
+
U(), $(), R();
|
|
259
261
|
}, 16);
|
|
260
|
-
function
|
|
261
|
-
if (!
|
|
262
|
+
function R() {
|
|
263
|
+
if (!i.value)
|
|
262
264
|
return;
|
|
263
|
-
const o =
|
|
264
|
-
m.value = o.width /
|
|
265
|
+
const o = i.value.getBoundingClientRect();
|
|
266
|
+
m.value = o.width / l.itemsToShow;
|
|
265
267
|
}
|
|
266
268
|
function $() {
|
|
267
|
-
|
|
268
|
-
val:
|
|
269
|
-
max:
|
|
270
|
-
min:
|
|
269
|
+
s.value <= 0 || (u.value = Math.ceil((s.value - 1) / 2), y.value = ze({ config: l, slidesCount: s.value }), w.value = He({ config: l, slidesCount: s.value }), l.wrapAround || (c.value = re({
|
|
270
|
+
val: c.value,
|
|
271
|
+
max: y.value,
|
|
272
|
+
min: w.value
|
|
271
273
|
})));
|
|
272
274
|
}
|
|
273
275
|
Ie(() => {
|
|
274
|
-
|
|
275
|
-
}),
|
|
276
|
-
|
|
276
|
+
Le(() => R()), setTimeout(() => R(), 1e3), U(), ge(), window.addEventListener("resize", ve, { passive: !0 }), t("init");
|
|
277
|
+
}), Ee(() => {
|
|
278
|
+
q && clearTimeout(q), T && clearInterval(T), window.removeEventListener("resize", ve, {
|
|
277
279
|
passive: !0
|
|
278
280
|
});
|
|
279
281
|
});
|
|
280
282
|
let x = !1;
|
|
281
|
-
const
|
|
283
|
+
const X = { x: 0, y: 0 }, z = { x: 0, y: 0 }, O = j({ x: 0, y: 0 }), H = d(!1), K = d(!1), Me = () => {
|
|
282
284
|
H.value = !0;
|
|
283
|
-
},
|
|
285
|
+
}, Ne = () => {
|
|
284
286
|
H.value = !1;
|
|
285
287
|
};
|
|
286
|
-
function
|
|
287
|
-
["INPUT", "TEXTAREA", "SELECT"].includes(o.target.tagName) || (x = o.type === "touchstart", x || o.preventDefault(), !(!x && o.button !== 0 ||
|
|
288
|
+
function fe(o) {
|
|
289
|
+
["INPUT", "TEXTAREA", "SELECT"].includes(o.target.tagName) || (x = o.type === "touchstart", x || o.preventDefault(), !(!x && o.button !== 0 || I.value) && (X.x = x ? o.touches[0].clientX : o.clientX, X.y = x ? o.touches[0].clientY : o.clientY, document.addEventListener(x ? "touchmove" : "mousemove", pe, !0), document.addEventListener(x ? "touchend" : "mouseup", me, !0)));
|
|
288
290
|
}
|
|
289
|
-
const
|
|
290
|
-
|
|
291
|
-
const
|
|
292
|
-
|
|
293
|
-
},
|
|
294
|
-
function
|
|
295
|
-
const o =
|
|
291
|
+
const pe = Ge((o) => {
|
|
292
|
+
K.value = !0, z.x = x ? o.touches[0].clientX : o.clientX, z.y = x ? o.touches[0].clientY : o.clientY;
|
|
293
|
+
const h = z.x - X.x, f = z.y - X.y;
|
|
294
|
+
O.y = f, O.x = h;
|
|
295
|
+
}, l.throttle);
|
|
296
|
+
function me() {
|
|
297
|
+
const o = l.dir === "rtl" ? -1 : 1, h = Math.sign(O.x) * 0.4, f = Math.round(O.x / m.value + h) * o;
|
|
296
298
|
if (f && !x) {
|
|
297
|
-
const
|
|
298
|
-
window.removeEventListener("click",
|
|
299
|
+
const M = (xe) => {
|
|
300
|
+
window.removeEventListener("click", M, !0);
|
|
299
301
|
};
|
|
300
|
-
window.addEventListener("click",
|
|
302
|
+
window.addEventListener("click", M, !0);
|
|
301
303
|
}
|
|
302
|
-
L(
|
|
303
|
-
}
|
|
304
|
-
function me() {
|
|
305
|
-
!a.autoplay || a.autoplay <= 0 || (j = setInterval(() => {
|
|
306
|
-
a.pauseAutoplayOnHover && H.value || Y();
|
|
307
|
-
}, a.autoplay));
|
|
304
|
+
L(c.value - f), O.x = 0, O.y = 0, K.value = !1, document.removeEventListener(x ? "touchmove" : "mousemove", pe, !0), document.removeEventListener(x ? "touchend" : "mouseup", me, !0);
|
|
308
305
|
}
|
|
309
306
|
function ge() {
|
|
310
|
-
|
|
307
|
+
!l.autoplay || l.autoplay <= 0 || (T = setInterval(() => {
|
|
308
|
+
l.pauseAutoplayOnHover && H.value || Y();
|
|
309
|
+
}, l.autoplay));
|
|
310
|
+
}
|
|
311
|
+
function he() {
|
|
312
|
+
T && (clearInterval(T), T = null), ge();
|
|
311
313
|
}
|
|
312
|
-
const
|
|
314
|
+
const I = d(!1);
|
|
313
315
|
function L(o) {
|
|
314
|
-
const
|
|
316
|
+
const h = l.wrapAround ? o : re({
|
|
315
317
|
val: o,
|
|
316
|
-
max:
|
|
317
|
-
min:
|
|
318
|
+
max: y.value,
|
|
319
|
+
min: w.value
|
|
318
320
|
});
|
|
319
|
-
|
|
321
|
+
c.value === h || I.value || (t("slide-start", {
|
|
320
322
|
slidingToIndex: o,
|
|
321
|
-
currentSlideIndex:
|
|
322
|
-
prevSlideIndex:
|
|
323
|
-
slidesCount:
|
|
324
|
-
}),
|
|
325
|
-
if (
|
|
326
|
-
const f =
|
|
327
|
-
val:
|
|
328
|
-
max:
|
|
323
|
+
currentSlideIndex: c.value,
|
|
324
|
+
prevSlideIndex: C.value,
|
|
325
|
+
slidesCount: s.value
|
|
326
|
+
}), I.value = !0, C.value = c.value, c.value = h, q = setTimeout(() => {
|
|
327
|
+
if (l.wrapAround) {
|
|
328
|
+
const f = se({
|
|
329
|
+
val: h,
|
|
330
|
+
max: y.value,
|
|
329
331
|
min: 0
|
|
330
332
|
});
|
|
331
|
-
f !==
|
|
332
|
-
currentSlideIndex:
|
|
333
|
+
f !== c.value && (c.value = f, t("loop", {
|
|
334
|
+
currentSlideIndex: c.value,
|
|
333
335
|
slidingToIndex: o
|
|
334
336
|
}));
|
|
335
337
|
}
|
|
336
|
-
t("update:modelValue",
|
|
337
|
-
currentSlideIndex:
|
|
338
|
-
prevSlideIndex:
|
|
339
|
-
slidesCount:
|
|
340
|
-
}),
|
|
341
|
-
},
|
|
338
|
+
t("update:modelValue", c.value), t("slide-end", {
|
|
339
|
+
currentSlideIndex: c.value,
|
|
340
|
+
prevSlideIndex: C.value,
|
|
341
|
+
slidesCount: s.value
|
|
342
|
+
}), I.value = !1, he();
|
|
343
|
+
}, l.transition));
|
|
342
344
|
}
|
|
343
345
|
function Y() {
|
|
344
|
-
L(
|
|
346
|
+
L(c.value + l.itemsToScroll);
|
|
345
347
|
}
|
|
346
|
-
function
|
|
347
|
-
L(
|
|
348
|
+
function Q() {
|
|
349
|
+
L(c.value - l.itemsToScroll);
|
|
348
350
|
}
|
|
349
|
-
const
|
|
350
|
-
|
|
351
|
-
const
|
|
352
|
-
config:
|
|
353
|
-
currentSlide:
|
|
354
|
-
slidesCount:
|
|
351
|
+
const we = { slideTo: L, next: Y, prev: Q };
|
|
352
|
+
N("nav", we), N("isSliding", I);
|
|
353
|
+
const be = D(() => Ye({
|
|
354
|
+
config: l,
|
|
355
|
+
currentSlide: c.value,
|
|
356
|
+
slidesCount: s.value
|
|
355
357
|
}));
|
|
356
|
-
|
|
357
|
-
const
|
|
358
|
-
const o =
|
|
358
|
+
N("slidesToScroll", be);
|
|
359
|
+
const Oe = D(() => {
|
|
360
|
+
const o = l.dir === "rtl" ? -1 : 1, h = be.value * m.value * o;
|
|
359
361
|
return {
|
|
360
|
-
transform: `translateX(${
|
|
361
|
-
transition: `${
|
|
362
|
-
margin:
|
|
362
|
+
transform: `translateX(${O.x - h}px)`,
|
|
363
|
+
transition: `${I.value ? l.transition : 0}ms`,
|
|
364
|
+
margin: l.wrapAround ? `0 -${s.value * m.value}px` : "",
|
|
363
365
|
width: "100%"
|
|
364
366
|
};
|
|
365
367
|
});
|
|
366
368
|
function _e() {
|
|
367
|
-
|
|
369
|
+
J(), U(), $(), R(), he();
|
|
368
370
|
}
|
|
369
|
-
Object.keys(
|
|
370
|
-
["modelValue"].includes(o) ||
|
|
371
|
-
}),
|
|
372
|
-
o !==
|
|
373
|
-
}),
|
|
371
|
+
Object.keys(Ae).forEach((o) => {
|
|
372
|
+
["modelValue"].includes(o) || ae(() => e[o], _e);
|
|
373
|
+
}), ae(() => e.modelValue, (o) => {
|
|
374
|
+
o !== c.value && L(Number(o));
|
|
375
|
+
}), ae(s, $), t("before-init"), J();
|
|
374
376
|
const Se = {
|
|
375
|
-
config:
|
|
376
|
-
slidesCount:
|
|
377
|
+
config: l,
|
|
378
|
+
slidesCount: s,
|
|
377
379
|
slideWidth: m,
|
|
378
380
|
next: Y,
|
|
379
|
-
prev:
|
|
381
|
+
prev: Q,
|
|
380
382
|
slideTo: L,
|
|
381
|
-
currentSlide:
|
|
382
|
-
maxSlide:
|
|
383
|
-
minSlide:
|
|
384
|
-
middleSlide:
|
|
383
|
+
currentSlide: c,
|
|
384
|
+
maxSlide: y,
|
|
385
|
+
minSlide: w,
|
|
386
|
+
middleSlide: u
|
|
385
387
|
};
|
|
386
|
-
|
|
387
|
-
updateBreakpointsConfigs:
|
|
388
|
+
a({
|
|
389
|
+
updateBreakpointsConfigs: U,
|
|
388
390
|
updateSlidesData: $,
|
|
389
|
-
updateSlideWidth:
|
|
390
|
-
initDefaultConfigs:
|
|
391
|
+
updateSlideWidth: R,
|
|
392
|
+
initDefaultConfigs: J,
|
|
391
393
|
restartCarousel: _e,
|
|
392
394
|
slideTo: L,
|
|
393
395
|
next: Y,
|
|
394
|
-
prev:
|
|
395
|
-
nav:
|
|
396
|
+
prev: Q,
|
|
397
|
+
nav: we,
|
|
396
398
|
data: Se
|
|
397
399
|
});
|
|
398
|
-
const
|
|
400
|
+
const Z = n.default || n.slides, ee = n.addons, ye = j(Se);
|
|
399
401
|
return () => {
|
|
400
|
-
const o =
|
|
401
|
-
o.forEach((
|
|
402
|
+
const o = Ce(Z == null ? void 0 : Z(ye)), h = (ee == null ? void 0 : ee(ye)) || [];
|
|
403
|
+
o.forEach((te, ne) => te.props.index = ne);
|
|
402
404
|
let f = o;
|
|
403
|
-
if (
|
|
404
|
-
const
|
|
405
|
-
index: -o.length +
|
|
405
|
+
if (l.wrapAround) {
|
|
406
|
+
const te = o.map((oe, P) => Te(oe, {
|
|
407
|
+
index: -o.length + P,
|
|
406
408
|
isClone: !0,
|
|
407
|
-
key: `clone-before-${
|
|
408
|
-
})),
|
|
409
|
-
index: o.length +
|
|
409
|
+
key: `clone-before-${P}`
|
|
410
|
+
})), ne = o.map((oe, P) => Te(oe, {
|
|
411
|
+
index: o.length + P,
|
|
410
412
|
isClone: !0,
|
|
411
|
-
key: `clone-after-${
|
|
413
|
+
key: `clone-after-${P}`
|
|
412
414
|
}));
|
|
413
|
-
f = [...
|
|
415
|
+
f = [...te, ...o, ...ne];
|
|
414
416
|
}
|
|
415
|
-
|
|
416
|
-
const
|
|
417
|
+
v.value = o, s.value = Math.max(o.length, 1);
|
|
418
|
+
const M = _("ol", {
|
|
417
419
|
class: "carousel__track",
|
|
418
|
-
style:
|
|
419
|
-
onMousedownCapture:
|
|
420
|
-
onTouchstartPassiveCapture:
|
|
421
|
-
}, f),
|
|
422
|
-
return
|
|
423
|
-
ref:
|
|
420
|
+
style: Oe.value,
|
|
421
|
+
onMousedownCapture: l.mouseDrag ? fe : null,
|
|
422
|
+
onTouchstartPassiveCapture: l.touchDrag ? fe : null
|
|
423
|
+
}, f), xe = _("div", { class: "carousel__viewport" }, M);
|
|
424
|
+
return _("section", {
|
|
425
|
+
ref: i,
|
|
424
426
|
class: {
|
|
425
427
|
carousel: !0,
|
|
426
|
-
"is-sliding":
|
|
427
|
-
"is-dragging":
|
|
428
|
+
"is-sliding": I.value,
|
|
429
|
+
"is-dragging": K.value,
|
|
428
430
|
"is-hover": H.value,
|
|
429
|
-
"carousel--rtl":
|
|
431
|
+
"carousel--rtl": l.dir === "rtl"
|
|
430
432
|
},
|
|
431
|
-
dir:
|
|
432
|
-
"aria-label":
|
|
433
|
+
dir: l.dir,
|
|
434
|
+
"aria-label": l.i18n.ariaGallery,
|
|
433
435
|
tabindex: "0",
|
|
434
436
|
onMouseenter: Me,
|
|
435
|
-
onMouseleave:
|
|
436
|
-
}, [
|
|
437
|
+
onMouseleave: Ne
|
|
438
|
+
}, [xe, h, _(qe)]);
|
|
437
439
|
};
|
|
438
440
|
}
|
|
439
|
-
}),
|
|
441
|
+
}), ue;
|
|
440
442
|
(function(e) {
|
|
441
443
|
e.arrowUp = "arrowUp", e.arrowDown = "arrowDown", e.arrowRight = "arrowRight", e.arrowLeft = "arrowLeft";
|
|
442
|
-
})(
|
|
443
|
-
const
|
|
444
|
+
})(ue || (ue = {}));
|
|
445
|
+
const Ke = {
|
|
444
446
|
arrowUp: "M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6-6 6z",
|
|
445
447
|
arrowDown: "M7.41 8.59L12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z",
|
|
446
448
|
arrowRight: "M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z",
|
|
447
449
|
arrowLeft: "M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"
|
|
448
450
|
};
|
|
449
|
-
function
|
|
450
|
-
return e in
|
|
451
|
+
function Qe(e) {
|
|
452
|
+
return e in ue;
|
|
451
453
|
}
|
|
452
|
-
const
|
|
453
|
-
const n = b("config",
|
|
454
|
-
if (!t || typeof t != "string" || !
|
|
454
|
+
const ce = (e) => {
|
|
455
|
+
const n = b("config", j(Object.assign({}, p))), t = String(e.name), a = `icon${t.charAt(0).toUpperCase() + t.slice(1)}`;
|
|
456
|
+
if (!t || typeof t != "string" || !Qe(t))
|
|
455
457
|
return;
|
|
456
|
-
const
|
|
457
|
-
return
|
|
458
|
+
const r = Ke[t], i = _("path", { d: r }), v = n.i18n[a] || e.title || t, m = _("title", v);
|
|
459
|
+
return _("svg", {
|
|
458
460
|
class: "carousel__icon",
|
|
459
461
|
viewBox: "0 0 24 24",
|
|
460
462
|
role: "img",
|
|
461
|
-
"aria-label":
|
|
462
|
-
}, [m,
|
|
463
|
+
"aria-label": v
|
|
464
|
+
}, [m, i]);
|
|
463
465
|
};
|
|
464
|
-
|
|
465
|
-
const
|
|
466
|
-
const { next:
|
|
466
|
+
ce.props = { name: String, title: String };
|
|
467
|
+
const Ze = (e, { slots: n, attrs: t }) => {
|
|
468
|
+
const { next: a, prev: r } = n || {}, i = b("config", j(Object.assign({}, p))), v = b("maxSlide", d(1)), m = b("minSlide", d(1)), s = b("currentSlide", d(1)), l = b("nav", {}), { dir: g, wrapAround: S, i18n: c } = i, C = g === "rtl", u = _("button", {
|
|
467
469
|
type: "button",
|
|
468
470
|
class: [
|
|
469
471
|
"carousel__prev",
|
|
470
|
-
!S &&
|
|
472
|
+
!S && s.value <= m.value && "carousel__prev--disabled",
|
|
471
473
|
t == null ? void 0 : t.class
|
|
472
474
|
],
|
|
473
|
-
"aria-label":
|
|
474
|
-
onClick:
|
|
475
|
-
}, (
|
|
475
|
+
"aria-label": c.ariaPreviousSlide,
|
|
476
|
+
onClick: l.prev
|
|
477
|
+
}, (r == null ? void 0 : r()) || _(ce, { name: C ? "arrowRight" : "arrowLeft" })), y = _("button", {
|
|
476
478
|
type: "button",
|
|
477
479
|
class: [
|
|
478
480
|
"carousel__next",
|
|
479
|
-
!S &&
|
|
481
|
+
!S && s.value >= v.value && "carousel__next--disabled",
|
|
480
482
|
t == null ? void 0 : t.class
|
|
481
483
|
],
|
|
482
|
-
"aria-label":
|
|
483
|
-
onClick:
|
|
484
|
-
}, (
|
|
485
|
-
return [
|
|
484
|
+
"aria-label": c.ariaNextSlide,
|
|
485
|
+
onClick: l.next
|
|
486
|
+
}, (a == null ? void 0 : a()) || _(ce, { name: C ? "arrowLeft" : "arrowRight" }));
|
|
487
|
+
return [u, y];
|
|
486
488
|
};
|
|
487
|
-
var
|
|
489
|
+
var et = F({
|
|
488
490
|
name: "CarouselSlide",
|
|
489
491
|
props: {
|
|
490
492
|
index: {
|
|
@@ -497,40 +499,36 @@ var Qe = G({
|
|
|
497
499
|
}
|
|
498
500
|
},
|
|
499
501
|
setup(e, { slots: n }) {
|
|
500
|
-
const t = b("config",
|
|
501
|
-
const
|
|
502
|
-
return e.index >=
|
|
502
|
+
const t = b("config", j(Object.assign({}, p))), a = b("currentSlide", d(0)), r = b("slidesToScroll", d(0)), i = b("isSliding", d(!1)), v = D(() => e.index === a.value), m = D(() => e.index === a.value - 1), s = D(() => e.index === a.value + 1), l = D(() => {
|
|
503
|
+
const g = Math.floor(r.value), S = Math.ceil(r.value + t.itemsToShow - 1);
|
|
504
|
+
return e.index >= g && e.index <= S;
|
|
503
505
|
});
|
|
504
506
|
return () => {
|
|
505
|
-
var
|
|
506
|
-
return
|
|
507
|
+
var g;
|
|
508
|
+
return _("li", {
|
|
507
509
|
style: { width: `${100 / t.itemsToShow}%` },
|
|
508
510
|
class: {
|
|
509
511
|
carousel__slide: !0,
|
|
510
512
|
"carousel__slide--clone": e.isClone,
|
|
511
|
-
"carousel__slide--visible":
|
|
512
|
-
"carousel__slide--active":
|
|
513
|
+
"carousel__slide--visible": l.value,
|
|
514
|
+
"carousel__slide--active": v.value,
|
|
513
515
|
"carousel__slide--prev": m.value,
|
|
514
|
-
"carousel__slide--next":
|
|
515
|
-
"carousel__slide--sliding":
|
|
516
|
+
"carousel__slide--next": s.value,
|
|
517
|
+
"carousel__slide--sliding": i.value
|
|
516
518
|
},
|
|
517
|
-
"aria-hidden": !
|
|
518
|
-
}, (
|
|
519
|
-
isActive:
|
|
519
|
+
"aria-hidden": !l.value
|
|
520
|
+
}, (g = n.default) === null || g === void 0 ? void 0 : g.call(n, {
|
|
521
|
+
isActive: v.value,
|
|
520
522
|
isClone: e.isClone,
|
|
521
523
|
isPrev: m.value,
|
|
522
|
-
isNext:
|
|
523
|
-
isSliding:
|
|
524
|
-
isVisible:
|
|
524
|
+
isNext: s.value,
|
|
525
|
+
isSliding: i.value,
|
|
526
|
+
isVisible: l.value
|
|
525
527
|
}));
|
|
526
528
|
};
|
|
527
529
|
}
|
|
528
530
|
});
|
|
529
|
-
const
|
|
530
|
-
key: 0,
|
|
531
|
-
class: "tw-flex tw-list-none",
|
|
532
|
-
"data-test": "stash-carousel|pagination-tiles"
|
|
533
|
-
}, tt = ["aria-current", "onClick"], nt = ["data-test", "src", "title"], ot = /* @__PURE__ */ G({
|
|
531
|
+
const tt = ["src", "title"], nt = /* @__PURE__ */ F({
|
|
534
532
|
inheritAttrs: !1,
|
|
535
533
|
__name: "Carousel",
|
|
536
534
|
props: {
|
|
@@ -549,132 +547,131 @@ const Ze = ["src", "title"], et = {
|
|
|
549
547
|
},
|
|
550
548
|
emits: ["click", "transition", "transition:multi"],
|
|
551
549
|
setup(e, { expose: n, emit: t }) {
|
|
552
|
-
const
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
var i;
|
|
560
|
-
return (i = d.value) == null ? void 0 : i.prev();
|
|
561
|
-
}
|
|
562
|
-
});
|
|
563
|
-
const m = t, u = c(0), a = () => {
|
|
564
|
-
S();
|
|
565
|
-
}, h = () => {
|
|
566
|
-
m("click", l.slides[u.value]);
|
|
550
|
+
const a = e, r = je(), i = Be(), v = d(), m = t, s = d(0);
|
|
551
|
+
function l(...u) {
|
|
552
|
+
const [y] = u;
|
|
553
|
+
y !== void 0 && g(y);
|
|
554
|
+
}
|
|
555
|
+
const g = (u) => {
|
|
556
|
+
s.value = u;
|
|
567
557
|
}, S = () => {
|
|
568
|
-
|
|
569
|
-
|
|
558
|
+
C();
|
|
559
|
+
}, c = () => {
|
|
560
|
+
m("click", a.slides[s.value]);
|
|
561
|
+
}, C = () => {
|
|
562
|
+
if (a.itemsToShow === 1) {
|
|
563
|
+
m("transition", a.slides[s.value]);
|
|
570
564
|
return;
|
|
571
565
|
}
|
|
572
|
-
const
|
|
573
|
-
m("transition:multi",
|
|
566
|
+
const u = a.slides.slice(s.value, s.value + a.itemsToShow);
|
|
567
|
+
m("transition:multi", u);
|
|
574
568
|
};
|
|
575
|
-
return (
|
|
576
|
-
|
|
569
|
+
return n({
|
|
570
|
+
next: () => {
|
|
571
|
+
var u;
|
|
572
|
+
return (u = v.value) == null ? void 0 : u.next();
|
|
573
|
+
},
|
|
574
|
+
prev: () => {
|
|
575
|
+
var u;
|
|
576
|
+
return (u = v.value) == null ? void 0 : u.prev();
|
|
577
|
+
},
|
|
578
|
+
slideTo: g
|
|
579
|
+
}), (u, y) => (k(), E(B, null, [
|
|
580
|
+
De(A(Je), Re({
|
|
577
581
|
ref_key: "carouselRef",
|
|
578
|
-
ref:
|
|
579
|
-
|
|
580
|
-
"onUpdate:modelValue": T[0] || (T[0] = (w) => u.value = w),
|
|
582
|
+
ref: v,
|
|
583
|
+
"model-value": s.value,
|
|
581
584
|
"aria-live": "polite",
|
|
582
585
|
"aria-roledescription": "carousel",
|
|
583
|
-
class: ["stash-carousel tw-mb-6",
|
|
586
|
+
class: ["stash-carousel tw-mb-6", A(i).root],
|
|
584
587
|
"data-test": "stash-carousel",
|
|
585
|
-
autoplay:
|
|
588
|
+
autoplay: u.autoplayInterval,
|
|
586
589
|
i18n: {
|
|
587
|
-
ariaNextSlide:
|
|
588
|
-
ariaPreviousSlide:
|
|
589
|
-
iconArrowLeft:
|
|
590
|
-
iconArrowRight:
|
|
590
|
+
ariaNextSlide: A(V)("ll.next"),
|
|
591
|
+
ariaPreviousSlide: A(V)("ll.previous"),
|
|
592
|
+
iconArrowLeft: A(V)("ll.previous"),
|
|
593
|
+
iconArrowRight: A(V)("ll.next")
|
|
591
594
|
},
|
|
592
|
-
"items-to-scroll":
|
|
593
|
-
"items-to-show":
|
|
594
|
-
"pause-autoplay-on-hover":
|
|
595
|
-
"wrap-around":
|
|
596
|
-
},
|
|
597
|
-
onInit:
|
|
598
|
-
onSlideEnd:
|
|
595
|
+
"items-to-scroll": a.itemsToScroll,
|
|
596
|
+
"items-to-show": a.itemsToShow,
|
|
597
|
+
"pause-autoplay-on-hover": u.pauseAutoplayOnHover,
|
|
598
|
+
"wrap-around": a.loop
|
|
599
|
+
}, A(r), {
|
|
600
|
+
onInit: S,
|
|
601
|
+
onSlideEnd: C,
|
|
602
|
+
"onUpdate:modelValue": l
|
|
599
603
|
}), {
|
|
600
|
-
addons:
|
|
601
|
-
|
|
604
|
+
addons: G(() => [
|
|
605
|
+
a.slides.length > 1 && !a.hideNavigation ? (k(), W(A(Ze), { key: 0 })) : ke("", !0)
|
|
602
606
|
]),
|
|
603
|
-
default:
|
|
604
|
-
(k(!0),
|
|
607
|
+
default: G(() => [
|
|
608
|
+
(k(!0), E(B, null, le(a.slides, (w, T) => (k(), W(A(et), {
|
|
605
609
|
key: w.id,
|
|
606
610
|
"data-test": "stash-carousel|slide",
|
|
607
611
|
class: "tw-cursor-pointer",
|
|
608
|
-
onClick:
|
|
612
|
+
onClick: c
|
|
609
613
|
}, {
|
|
610
|
-
default:
|
|
611
|
-
|
|
614
|
+
default: G(() => [
|
|
615
|
+
Pe(u.$slots, "slide", {
|
|
612
616
|
slide: w,
|
|
613
|
-
index:
|
|
617
|
+
index: T
|
|
614
618
|
}, () => [
|
|
615
|
-
|
|
616
|
-
class:
|
|
619
|
+
Ve("img", {
|
|
620
|
+
class: ie(["tw-h-full tw-w-full", [{ "tw-rounded": a.roundBorders }]]),
|
|
617
621
|
src: w.imageUrl,
|
|
618
|
-
title:
|
|
619
|
-
index:
|
|
620
|
-
total:
|
|
622
|
+
title: A(V)("ll.carousel.imageLabel", {
|
|
623
|
+
index: T + 1,
|
|
624
|
+
total: u.slides.length
|
|
621
625
|
})
|
|
622
|
-
}, null, 10,
|
|
626
|
+
}, null, 10, tt)
|
|
623
627
|
])
|
|
624
628
|
]),
|
|
625
629
|
_: 2
|
|
626
630
|
}, 1024))), 128))
|
|
627
631
|
]),
|
|
628
632
|
_: 3
|
|
629
|
-
}, 16, ["
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
src: w.imageUrl,
|
|
648
|
-
title: _(B)("ll.carousel.paginationLabel", { index: v + 1 })
|
|
649
|
-
}, null, 10, nt)
|
|
650
|
-
], 8, tt))), 128))
|
|
651
|
-
])) : (k(), N("ul", {
|
|
633
|
+
}, 16, ["model-value", "autoplay", "class", "i18n", "items-to-scroll", "items-to-show", "pause-autoplay-on-hover", "wrap-around"]),
|
|
634
|
+
a.hidePagination ? ke("", !0) : (k(), E(B, { key: 0 }, [
|
|
635
|
+
a.pagination === "tile" ? (k(), W($e, {
|
|
636
|
+
key: 0,
|
|
637
|
+
"active-thumbnail": s.value,
|
|
638
|
+
thumbnails: u.slides,
|
|
639
|
+
radius: a.paginationTileRadius === "full" ? "circle" : "rounded",
|
|
640
|
+
"onUpdate:activeThumbnail": g
|
|
641
|
+
}, {
|
|
642
|
+
default: G(() => [
|
|
643
|
+
(k(!0), E(B, null, le(u.slides, (w) => (k(), W(Ue, {
|
|
644
|
+
key: w.id,
|
|
645
|
+
thumbnail: w,
|
|
646
|
+
variant: "translucent"
|
|
647
|
+
}, null, 8, ["thumbnail"]))), 128))
|
|
648
|
+
]),
|
|
649
|
+
_: 1
|
|
650
|
+
}, 8, ["active-thumbnail", "thumbnails", "radius"])) : (k(), E("ul", {
|
|
652
651
|
key: 1,
|
|
653
|
-
class:
|
|
652
|
+
class: ie(["tw-text-center", [!u.staticPaginationDots && "lg:tw-hidden"]]),
|
|
654
653
|
"data-test": "stash-carousel|pagination-dots"
|
|
655
654
|
}, [
|
|
656
|
-
(k(!0),
|
|
655
|
+
(k(!0), E(B, null, le(u.slides, (w, T) => (k(), E("li", {
|
|
657
656
|
key: w.imageUrl,
|
|
658
|
-
class:
|
|
657
|
+
class: ie(["tw-inline-block tw-rounded-full", [A(i)["pagination-dot"], [s.value === T ? "tw-bg-blue-500" : "tw-bg-blue-100"]]])
|
|
659
658
|
}, null, 2))), 128))
|
|
660
659
|
], 2))
|
|
661
660
|
], 64))
|
|
662
661
|
], 64));
|
|
663
662
|
}
|
|
664
|
-
}),
|
|
665
|
-
root:
|
|
663
|
+
}), ot = "_root_4piw3_2", at = "_carousel__icon_4piw3_2", lt = "_carousel__next_4piw3_18", it = "_carousel__prev_4piw3_26", rt = {
|
|
664
|
+
root: ot,
|
|
666
665
|
carousel__icon: at,
|
|
667
|
-
carousel__next:
|
|
668
|
-
"carousel__next--disabled": "_carousel__next--
|
|
669
|
-
carousel__prev:
|
|
670
|
-
"carousel__prev--disabled": "_carousel__prev--
|
|
671
|
-
"pagination-dot": "_pagination-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
},
|
|
675
|
-
$style: st
|
|
676
|
-
}, ft = /* @__PURE__ */ ze(ot, [["__cssModules", ut]]);
|
|
666
|
+
carousel__next: lt,
|
|
667
|
+
"carousel__next--disabled": "_carousel__next--disabled_4piw3_22",
|
|
668
|
+
carousel__prev: it,
|
|
669
|
+
"carousel__prev--disabled": "_carousel__prev--disabled_4piw3_30",
|
|
670
|
+
"pagination-dot": "_pagination-dot_4piw3_34"
|
|
671
|
+
}, st = {
|
|
672
|
+
$style: rt
|
|
673
|
+
}, pt = /* @__PURE__ */ Xe(nt, [["__cssModules", st]]);
|
|
677
674
|
export {
|
|
678
|
-
|
|
675
|
+
pt as default
|
|
679
676
|
};
|
|
680
677
|
//# sourceMappingURL=Carousel.js.map
|