@leaflink/stash 44.0.0-beta.6 → 44.0.0-beta.7

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