@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.
Files changed (41) hide show
  1. package/dist/AddressSelect.js +1 -1
  2. package/dist/Carousel.js +238 -231
  3. package/dist/Carousel.js.map +1 -1
  4. package/dist/DatePicker.js +4766 -7897
  5. package/dist/DatePicker.js.map +1 -1
  6. package/dist/Filters.js +6 -6
  7. package/dist/InputOptions.js +1 -1
  8. package/dist/ListView.js +5 -5
  9. package/dist/Select.js +1 -1
  10. package/dist/SelectStatus.js +1 -1
  11. package/dist/components.css +1 -1
  12. package/dist/formatDateTime-a5e70901.js +1336 -0
  13. package/dist/formatDateTime-a5e70901.js.map +1 -0
  14. package/dist/index.js +82 -81
  15. package/dist/index.js.map +1 -1
  16. package/dist/isValid-4b2b7a54.js +18 -0
  17. package/dist/isValid-4b2b7a54.js.map +1 -0
  18. package/dist/parseISO-ed4094c1.js +133 -0
  19. package/dist/parseISO-ed4094c1.js.map +1 -0
  20. package/dist/searchFuzzy-9b74ec4e.js +446 -0
  21. package/dist/searchFuzzy-9b74ec4e.js.map +1 -0
  22. package/dist/toTimeZone-a2ed6470.js +328 -0
  23. package/dist/toTimeZone-a2ed6470.js.map +1 -0
  24. package/dist/useSearch.js +1 -1
  25. package/dist/useValidation.js.map +1 -1
  26. package/dist/utils/createValidDate.js +2 -2
  27. package/dist/utils/formatDateTime.js +7 -1730
  28. package/dist/utils/formatDateTime.js.map +1 -1
  29. package/dist/utils/normalizeDate.js +1 -1
  30. package/dist/utils/searchFuzzy.js +1 -1
  31. package/dist/utils/toTimeZone.js +3 -4
  32. package/dist/utils/toTimeZone.js.map +1 -1
  33. package/package.json +29 -29
  34. package/dist/index-5e5945a9.js +0 -134
  35. package/dist/index-5e5945a9.js.map +0 -1
  36. package/dist/index-fe8d3765.js +0 -36
  37. package/dist/index-fe8d3765.js.map +0 -1
  38. package/dist/searchFuzzy-74a7de1c.js +0 -326
  39. package/dist/searchFuzzy-74a7de1c.js.map +0 -1
  40. package/dist/toTimeZone-e6e9ab75.js +0 -351
  41. package/dist/toTimeZone-e6e9ab75.js.map +0 -1
package/dist/Carousel.js CHANGED
@@ -1,13 +1,13 @@
1
- import { defineComponent as Y, 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 ye, watch as oe, 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 ae, createBlock as ke, createCommentVNode as Te, renderList as le, renderSlot as Ve, createElementVNode as Ae, normalizeClass as H } from "vue";
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.1
7
- * (c) 2023
6
+ * Vue 3 Carousel 0.3.4
7
+ * (c) 2024
8
8
  * @license MIT
9
9
  */
10
- const f = {
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: f.itemsToShow,
38
+ default: p.itemsToShow,
39
39
  type: Number
40
40
  },
41
41
  // count of items to be scrolled
42
42
  itemsToScroll: {
43
- default: f.itemsToScroll,
43
+ default: p.itemsToScroll,
44
44
  type: Number
45
45
  },
46
46
  // control infinite scrolling mode
47
47
  wrapAround: {
48
- default: f.wrapAround,
48
+ default: p.wrapAround,
49
49
  type: Boolean
50
50
  },
51
51
  // control max drag
52
52
  throttle: {
53
- default: f.throttle,
53
+ default: p.throttle,
54
54
  type: Number
55
55
  },
56
56
  // control snap position alignment
57
57
  snapAlign: {
58
- default: f.snapAlign,
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: f.transition,
65
+ default: p.transition,
66
66
  type: Number
67
67
  },
68
68
  // an object to store breakpoints
69
69
  breakpoints: {
70
- default: f.breakpoints,
70
+ default: p.breakpoints,
71
71
  type: Object
72
72
  },
73
73
  // time to auto advance slides in ms
74
74
  autoplay: {
75
- default: f.autoplay,
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: f.pauseAutoplayOnHover,
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: f.mouseDrag,
90
+ default: p.mouseDrag,
91
91
  type: Boolean
92
92
  },
93
93
  // toggle mouse dragging.
94
94
  touchDrag: {
95
- default: f.touchDrag,
95
+ default: p.touchDrag,
96
96
  type: Boolean
97
97
  },
98
98
  // control snap position alignment
99
99
  dir: {
100
- default: f.dir,
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: f.i18n,
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: a, itemsToShow: s = 1 } = e;
120
- if (a)
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: a, itemsToShow: s = 1 } = e;
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 (a) {
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: a, wrapAround: s, itemsToShow: r = 1 } = e;
173
- let p = n;
174
- switch (a) {
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
- p -= (r - 1) / 2;
177
+ d -= (r - 1) / 2;
178
178
  break;
179
179
  case "center-even":
180
- p -= (r - 2) / 2;
180
+ d -= (r - 2) / 2;
181
181
  break;
182
182
  case "end":
183
- p -= r - 1;
183
+ d -= r - 1;
184
184
  break;
185
185
  }
186
- return s ? p : ie({
187
- val: p,
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 a;
195
- return t.type === D ? [...n, ...je(t.children)] : ((a = t.type) === null || a === void 0 ? void 0 : a.name) === "CarouselSlide" ? [...n, t] : n;
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(...a) {
203
+ return n ? function(...o) {
204
204
  const s = this;
205
- t || (e.apply(s, a), t = !0, setTimeout(() => t = !1, n));
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(...a) {
210
+ return function(...o) {
211
211
  t && clearTimeout(t), t = setTimeout(() => {
212
- e(...a), t = null;
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, [a, s]) => t.replace(`{${a}}`, String(s)), e);
217
+ return Object.entries(n).reduce((t, [o, s]) => t.replace(`{${o}}`, String(s)), e);
218
218
  }
219
- var Ge = Y({
219
+ var Ge = G({
220
220
  name: "ARIA",
221
221
  setup() {
222
- const e = b("config", L(Object.assign({}, f))), n = b("currentSlide", c(0)), t = b("slidesCount", c(0));
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 = Y({
232
+ }), Fe = G({
233
233
  name: "Carousel",
234
234
  props: Ce,
235
- setup(e, { slots: n, emit: t, expose: a }) {
235
+ setup(e, { slots: n, emit: t, expose: o }) {
236
236
  var s;
237
- const r = c(null), p = c([]), g = c(0), u = c(0), i = L(Object.assign({}, f));
238
- let h = Object.assign({}, f), _;
239
- const l = c((s = e.modelValue) !== null && s !== void 0 ? s : 0), T = c(0), w = c(0), d = c(0), I = c(0);
240
- let E, W;
241
- C("config", i), C("slidesCount", u), C("currentSlide", l), C("maxSlide", d), C("minSlide", I), C("slideWidth", g);
242
- function G() {
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 V() {
245
+ function $() {
246
246
  if (!_ || !Object.keys(_).length)
247
247
  return;
248
- const o = Object.keys(_).map((v) => Number(v)).sort((v, A) => +A - +v);
249
- let m = Object.assign({}, h);
250
- o.some((v) => {
251
- const A = window.matchMedia(`(min-width: ${v}px)`).matches;
252
- return A && (m = Object.assign(Object.assign({}, m), _[v])), A;
253
- }), ce(m);
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(o) {
256
- Object.entries(o).forEach(([m, v]) => i[m] = v);
255
+ function ce(a) {
256
+ Object.entries(a).forEach(([g, f]) => l[g] = f);
257
257
  }
258
258
  const de = Ye(() => {
259
- V(), R();
259
+ $(), U(), P();
260
260
  }, 16);
261
- function R() {
261
+ function P() {
262
262
  if (!r.value)
263
263
  return;
264
- const o = r.value.getBoundingClientRect();
265
- g.value = o.width / i.itemsToShow;
264
+ const a = r.value.getBoundingClientRect();
265
+ m.value = a.width / l.itemsToShow;
266
266
  }
267
- function F() {
268
- u.value <= 0 || (w.value = Math.ceil((u.value - 1) / 2), d.value = Ue({ config: i, slidesCount: u.value }), I.value = Xe({ config: i, slidesCount: u.value }), i.wrapAround || (l.value = ie({
269
- val: l.value,
270
- max: d.value,
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(() => R()), setTimeout(() => R(), 1e3), V(), me(), window.addEventListener("resize", de, { passive: !0 }), t("init");
275
+ Ie(() => P()), setTimeout(() => P(), 1e3), $(), me(), window.addEventListener("resize", de, { passive: !0 }), t("init");
276
276
  }), Ee(() => {
277
- W && clearTimeout(W), E && clearInterval(E), window.removeEventListener("resize", de, {
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 $ = { x: 0, y: 0 }, U = { x: 0, y: 0 }, M = L({ x: 0, y: 0 }), X = c(!1), q = c(!1), Me = () => {
283
- X.value = !0;
284
- }, Ne = () => {
285
- X.value = !1;
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(o) {
288
- ["INPUT", "TEXTAREA", "SELECT"].includes(o.target.tagName) || (x = o.type === "touchstart", x || o.preventDefault(), !(!x && o.button !== 0 || N.value) && ($.x = x ? o.touches[0].clientX : o.clientX, $.y = x ? o.touches[0].clientY : o.clientY, document.addEventListener(x ? "touchmove" : "mousemove", fe, !0), document.addEventListener(x ? "touchend" : "mouseup", pe, !0)));
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((o) => {
291
- q.value = !0, U.x = x ? o.touches[0].clientX : o.clientX, U.y = x ? o.touches[0].clientY : o.clientY;
292
- const m = U.x - $.x, v = U.y - $.y;
293
- M.y = v, M.x = m;
294
- }, i.throttle);
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 o = i.dir === "rtl" ? -1 : 1, m = Math.sign(M.x) * 0.4, v = Math.round(M.x / g.value + m) * o;
297
- if (v && !x) {
298
- const A = (Z) => {
299
- Z.stopPropagation(), window.removeEventListener("click", A, !0);
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(l.value - v), M.x = 0, M.y = 0, q.value = !1, document.removeEventListener(x ? "touchmove" : "mousemove", fe, !0), document.removeEventListener(x ? "touchend" : "mouseup", pe, !0);
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
- !i.autoplay || i.autoplay <= 0 || (E = setInterval(() => {
307
- i.pauseAutoplayOnHover && X.value || z();
308
- }, i.autoplay));
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 N = c(!1);
314
- function O(o) {
315
- const m = i.wrapAround ? o : ie({
316
- val: o,
317
- max: d.value,
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
- l.value === m || N.value || (t("slide-start", {
321
- slidingToIndex: o,
322
- currentSlideIndex: l.value,
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
- }), N.value = !0, T.value = l.value, l.value = m, W = setTimeout(() => {
326
- if (i.wrapAround) {
327
- const v = re({
328
- val: m,
329
- max: d.value,
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
- v !== l.value && (l.value = v, t("loop", {
333
- currentSlideIndex: l.value,
334
- slidingToIndex: o
332
+ f !== i.value && (i.value = f, t("loop", {
333
+ currentSlideIndex: i.value,
334
+ slidingToIndex: a
335
335
  }));
336
336
  }
337
- t("update:modelValue", l.value), t("slide-end", {
338
- currentSlideIndex: l.value,
337
+ t("update:modelValue", i.value), t("slide-end", {
338
+ currentSlideIndex: i.value,
339
339
  prevSlideIndex: T.value,
340
340
  slidesCount: u.value
341
- }), N.value = !1, ge();
342
- }, i.transition));
341
+ }), M.value = !1, ge();
342
+ }, l.transition));
343
343
  }
344
- function z() {
345
- O(l.value + i.itemsToScroll);
344
+ function Y() {
345
+ O(i.value + l.itemsToScroll);
346
346
  }
347
- function J() {
348
- O(l.value - i.itemsToScroll);
347
+ function K() {
348
+ O(i.value - l.itemsToScroll);
349
349
  }
350
- const he = { slideTo: O, next: z, prev: J };
351
- C("nav", he), C("isSliding", N);
352
- const we = ye(() => ze({
353
- config: i,
354
- currentSlide: l.value,
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 = ye(() => {
359
- const o = i.dir === "rtl" ? -1 : 1, m = we.value * g.value * o;
358
+ const Oe = R(() => {
359
+ const a = l.dir === "rtl" ? -1 : 1, g = we.value * m.value * a;
360
360
  return {
361
- transform: `translateX(${M.x - m}px)`,
362
- transition: `${N.value ? i.transition : 0}ms`,
363
- margin: i.wrapAround ? `0 -${u.value * g.value}px` : "",
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
- G(), V(), F(), R(), ge();
368
+ q(), $(), U(), P(), ge();
369
369
  }
370
- Object.keys(Ce).forEach((o) => {
371
- ["modelValue"].includes(o) || oe(() => e[o], _e);
372
- }), oe(() => e.modelValue, (o) => {
373
- o !== l.value && O(Number(o));
374
- }), oe(u, F), t("before-init"), G();
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: i,
376
+ config: l,
377
377
  slidesCount: u,
378
- slideWidth: g,
379
- next: z,
380
- prev: J,
378
+ slideWidth: m,
379
+ next: Y,
380
+ prev: K,
381
381
  slideTo: O,
382
- currentSlide: l,
383
- maxSlide: d,
382
+ currentSlide: i,
383
+ maxSlide: v,
384
384
  minSlide: I,
385
385
  middleSlide: w
386
386
  };
387
- a({
388
- updateBreakpointsConfigs: V,
389
- updateSlidesData: F,
390
- updateSlideWidth: R,
391
- initDefaultConfigs: G,
387
+ o({
388
+ updateBreakpointsConfigs: $,
389
+ updateSlidesData: U,
390
+ updateSlideWidth: P,
391
+ initDefaultConfigs: q,
392
392
  restartCarousel: _e,
393
393
  slideTo: O,
394
- next: z,
395
- prev: J,
394
+ next: Y,
395
+ prev: K,
396
396
  nav: he,
397
397
  data: Se
398
398
  });
399
- const K = n.default || n.slides, Q = n.addons, be = L(Se);
399
+ const Q = n.default || n.slides, Z = n.addons, be = L(Se);
400
400
  return () => {
401
- const o = je(K == null ? void 0 : K(be)), m = (Q == null ? void 0 : Q(be)) || [];
402
- o.forEach((ee, te) => ee.props.index = te);
403
- let v = o;
404
- if (i.wrapAround) {
405
- const ee = o.map((ne, P) => xe(ne, {
406
- index: -o.length + P,
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-${P}`
409
- })), te = o.map((ne, P) => xe(ne, {
410
- index: o.length + P,
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-${P}`
412
+ key: `clone-after-${V}`
413
413
  }));
414
- v = [...ee, ...o, ...te];
414
+ f = [...ee, ...a, ...te];
415
415
  }
416
- p.value = o, u.value = Math.max(o.length, 1);
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: i.mouseDrag ? ve : null,
421
- onTouchstartPassiveCapture: i.touchDrag ? ve : null
422
- }, v), Z = y("div", { class: "carousel__viewport" }, A);
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": N.value,
428
- "is-dragging": q.value,
429
- "is-hover": X.value,
430
- "carousel--rtl": i.dir === "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: i.dir,
433
- "aria-label": i.i18n.ariaGallery,
432
+ dir: l.dir,
433
+ "aria-label": l.i18n.ariaGallery,
434
434
  tabindex: "0",
435
- onMouseenter: Me,
436
- onMouseleave: Ne
437
- }, [Z, m, y(Ge)]);
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({}, f))), t = String(e.name), a = `icon${t.charAt(0).toUpperCase() + t.slice(1)}`;
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 }), p = n.i18n[a] || e.title || t, g = y("title", p);
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": p
463
- }, [g, r]);
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: a, prev: s } = n || {}, r = b("config", L(Object.assign({}, f))), p = b("maxSlide", c(1)), g = b("minSlide", c(1)), u = b("currentSlide", c(1)), i = b("nav", {}), { dir: h, wrapAround: _, i18n: l } = r, T = h === "rtl", w = y("button", {
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 <= g.value && "carousel__prev--disabled",
471
+ !_ && u.value <= m.value && "carousel__prev--disabled",
472
472
  t == null ? void 0 : t.class
473
473
  ],
474
- "aria-label": l.ariaPreviousSlide,
475
- onClick: i.prev
476
- }, (s == null ? void 0 : s()) || y(ue, { name: T ? "arrowRight" : "arrowLeft" })), d = y("button", {
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 >= p.value && "carousel__next--disabled",
480
+ !_ && u.value >= d.value && "carousel__next--disabled",
481
481
  t == null ? void 0 : t.class
482
482
  ],
483
- "aria-label": l.ariaNextSlide,
484
- onClick: i.next
485
- }, (a == null ? void 0 : a()) || y(ue, { name: T ? "arrowLeft" : "arrowRight" }));
486
- return [w, d];
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 = Y({
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({}, f))), a = b("currentSlide", c(0)), s = b("slidesToScroll", c(0)), r = b("isSliding", c(!1)), p = () => e.index === a.value, g = () => e.index === a.value - 1, u = () => e.index === a.value + 1, i = () => {
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": i(),
513
- "carousel__slide--active": p(),
514
- "carousel__slide--prev": g(),
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": !i()
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"], ot = /* @__PURE__ */ Y({
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 a = e, s = Be(), r = De(), p = c();
553
+ const o = e, s = Be(), r = De(), d = c();
547
554
  n({
548
555
  next: () => {
549
- var l;
550
- return (l = p.value) == null ? void 0 : l.next();
556
+ var i;
557
+ return (i = d.value) == null ? void 0 : i.next();
551
558
  },
552
559
  prev: () => {
553
- var l;
554
- return (l = p.value) == null ? void 0 : l.prev();
560
+ var i;
561
+ return (i = d.value) == null ? void 0 : i.prev();
555
562
  }
556
563
  });
557
- const g = t, u = c(0), i = () => {
564
+ const m = t, u = c(0), l = () => {
558
565
  _();
559
566
  }, h = () => {
560
- g("click", a.slides[u.value]);
567
+ m("click", o.slides[u.value]);
561
568
  }, _ = () => {
562
- if (a.itemsToShow === 1) {
563
- g("transition", a.slides[u.value]);
569
+ if (o.itemsToShow === 1) {
570
+ m("transition", o.slides[u.value]);
564
571
  return;
565
572
  }
566
- const l = a.slides.slice(u.value, u.value + a.itemsToShow);
567
- g("transition:multi", l);
573
+ const i = o.slides.slice(u.value, u.value + o.itemsToShow);
574
+ m("transition:multi", i);
568
575
  };
569
- return (l, T) => (k(), j(D, null, [
576
+ return (i, T) => (k(), j(D, null, [
570
577
  Re(S(Fe), Pe({
571
578
  ref_key: "carouselRef",
572
- ref: p,
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: l.autoplayInterval,
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": a.itemsToScroll,
587
- "items-to-show": a.itemsToShow,
588
- "pause-autoplay-on-hover": l.pauseAutoplayOnHover,
589
- "wrap-around": a.loop
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: i,
598
+ onInit: l,
592
599
  onSlideEnd: _
593
600
  }), {
594
- addons: ae(() => [
595
- a.slides.length > 1 && !a.hideNavigation ? (k(), ke(S(Ke), { key: 0 })) : Te("", !0)
601
+ addons: oe(() => [
602
+ o.slides.length > 1 && !o.hideNavigation ? (k(), ke(S(Ke), { key: 0 })) : Te("", !0)
596
603
  ]),
597
- default: ae(() => [
598
- (k(!0), j(D, null, le(a.slides, (w, d) => (k(), ke(S(Qe), {
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: ae(() => [
605
- Ve(l.$slots, "slide", {
611
+ default: oe(() => [
612
+ Ve(i.$slots, "slide", {
606
613
  slide: w,
607
- index: d
614
+ index: v
608
615
  }, () => [
609
616
  Ae("img", {
610
- class: H(["tw-h-full tw-w-full", [{ "tw-rounded": a.roundBorders }]]),
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: d + 1,
614
- total: l.slides.length
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
- a.hidePagination ? Te("", !0) : (k(), j(D, { key: 0 }, [
625
- a.pagination === "tile" ? (k(), j("ul", et, [
626
- (k(!0), j(D, null, le(l.slides, (w, d) => (k(), j("li", {
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 === d,
630
- onClick: (I) => u.value = d
636
+ "aria-current": u.value === v,
637
+ onClick: (I) => u.value = v
631
638
  }, [
632
639
  Ae("img", {
633
- class: H(["tw-rounded", [
640
+ class: W(["tw-rounded", [
634
641
  S(r)["pagination-tile"],
635
642
  {
636
- "is-current-tile": u.value === d,
637
- "tw-rounded-full": a.paginationTileRadius === "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-${d}`,
647
+ "data-test": `stash-carousel|pagination-tile-${v}`,
641
648
  src: w.imageUrl,
642
- title: S(B)("ll.carousel.paginationLabel", { index: d + 1 })
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: H(["tw-text-center", [!l.staticPaginationDots && "lg:tw-hidden"]]),
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(l.slides, (w, d) => (k(), j("li", {
657
+ (k(!0), j(D, null, le(i.slides, (w, v) => (k(), j("li", {
651
658
  key: w.imageUrl,
652
- class: H(["tw-inline-block tw-rounded-full", [S(r)["pagination-dot"], [u.value === d ? "tw-bg-blue-500" : "tw-bg-blue-100"]]])
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
- }), at = "_root_a92j2_2", lt = "_carousel__icon_a92j2_2", it = "_carousel__next_a92j2_18", rt = "_carousel__prev_a92j2_26", st = {
659
- root: at,
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(ot, [["__cssModules", ut]]);
677
+ }, pt = /* @__PURE__ */ $e(at, [["__cssModules", ut]]);
671
678
  export {
672
679
  pt as default
673
680
  };