spicykatsu 0.0.41 → 0.0.43

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.
@@ -1,11 +1,70 @@
1
- import { defineComponent as b, ref as S, watch as Y, openBlock as r, createBlock as X, Transition as P, withCtx as A, createElementBlock as c, normalizeClass as C, withKeys as M, toDisplayString as v, createCommentVNode as f, renderSlot as m, computed as g, resolveDirective as q, withDirectives as D, normalizeStyle as k, createElementVNode as h, onMounted as G, onUnmounted as J, createVNode as Q, Fragment as E, renderList as z, vModelText as x, createTextVNode as Z, mergeProps as ee, withModifiers as L, reactive as te, nextTick as oe } from "vue";
2
- const le = ["aria-label"], ae = {
1
+ import { defineComponent as b, ref as C, openBlock as c, createElementBlock as u, Fragment as B, renderList as O, createElementVNode as p, normalizeClass as k, toDisplayString as h, createCommentVNode as y, createVNode as L, Transition as D, withCtx as M, withDirectives as A, renderSlot as g, vShow as G, watch as E, createBlock as J, withKeys as V, computed as v, resolveDirective as Q, normalizeStyle as S, onMounted as Z, onUnmounted as ee, createTextVNode as x, vModelText as R, mergeProps as W, withModifiers as F, reactive as te, nextTick as oe } from "vue";
2
+ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae = {
3
+ key: 0,
4
+ class: "accordionIcon",
5
+ viewBox: "0 0 24 24",
6
+ xmlns: "http://www.w3.org/2000/svg"
7
+ }, ne = ["d"], ie = { class: "spicyAccordionContent" }, re = /* @__PURE__ */ b({
8
+ __name: "SpicyAccordion",
9
+ props: {
10
+ sections: {},
11
+ singleOpen: { type: Boolean, default: !1 },
12
+ defaultOpen: {}
13
+ },
14
+ setup(e) {
15
+ const s = e, o = C(s.defaultOpen || []), l = (a) => {
16
+ if (s.singleOpen)
17
+ o.value = o.value.includes(a) ? [] : [a];
18
+ else {
19
+ const r = o.value.indexOf(a);
20
+ r === -1 ? o.value.push(a) : o.value.splice(r, 1);
21
+ }
22
+ }, t = (a) => o.value.includes(a);
23
+ return (a, r) => (c(), u("div", se, [
24
+ (c(!0), u(B, null, O(a.sections, (n, d) => (c(), u("div", {
25
+ key: d,
26
+ class: "spicyAccordionItem"
27
+ }, [
28
+ p("button", {
29
+ class: k(["spicyAccordionHeader", { open: t(d) }]),
30
+ onClick: (i) => l(d),
31
+ "aria-expanded": t(d)
32
+ }, [
33
+ p("span", null, h(n.title), 1),
34
+ n.icon ? (c(), u("svg", ae, [
35
+ p("path", {
36
+ d: n.icon
37
+ }, null, 8, ne)
38
+ ])) : y("", !0),
39
+ r[0] || (r[0] = p("span", { class: "accordionToggle" }, [
40
+ p("svg", {
41
+ class: "accordionArrow",
42
+ viewBox: "0 0 24 24"
43
+ }, [
44
+ p("path", { d: "M7 10l5 5 5-5H7z" })
45
+ ])
46
+ ], -1))
47
+ ], 10, le),
48
+ L(D, { name: "fade" }, {
49
+ default: M(() => [
50
+ A(p("div", ie, [
51
+ g(a.$slots, `section-${d}`)
52
+ ], 512), [
53
+ [G, t(d)]
54
+ ])
55
+ ]),
56
+ _: 2
57
+ }, 1024)
58
+ ]))), 128))
59
+ ]));
60
+ }
61
+ }), ce = ["aria-label"], ue = {
3
62
  key: 0,
4
63
  class: "spicyAlertIcon"
5
- }, se = {
64
+ }, de = {
6
65
  key: 1,
7
66
  class: "spicyAlertText"
8
- }, ne = /* @__PURE__ */ b({
67
+ }, pe = /* @__PURE__ */ b({
9
68
  __name: "SpicyAlert",
10
69
  props: {
11
70
  variant: { default: "info" },
@@ -16,52 +75,52 @@ const le = ["aria-label"], ae = {
16
75
  autoClose: { default: 0 }
17
76
  },
18
77
  setup(e) {
19
- const t = e, o = S(!0), a = () => {
78
+ const s = e, o = C(!0), l = () => {
20
79
  o.value = !1;
21
80
  };
22
- return Y(
23
- () => t.autoClose,
24
- (l) => {
25
- l && l > 0 && setTimeout(() => {
26
- a();
27
- }, l);
81
+ return E(
82
+ () => s.autoClose,
83
+ (t) => {
84
+ t && t > 0 && setTimeout(() => {
85
+ l();
86
+ }, t);
28
87
  }
29
- ), (l, s) => (r(), X(P, { name: "fade" }, {
30
- default: A(() => [
31
- o.value ? (r(), c("div", {
88
+ ), (t, a) => (c(), J(D, { name: "fade" }, {
89
+ default: M(() => [
90
+ o.value ? (c(), u("div", {
32
91
  key: 0,
33
- class: C(["spicyAlert", l.variant]),
92
+ class: k(["spicyAlert", t.variant]),
34
93
  "aria-atomic": "true",
35
- "aria-label": l.text,
94
+ "aria-label": t.text,
36
95
  role: "alert",
37
- onKeydown: M(a, ["enter"])
96
+ onKeydown: V(l, ["enter"])
38
97
  }, [
39
- l.iconOnly || l.text ? (r(), c("span", ae, v(l.icon), 1)) : f("", !0),
40
- !l.iconOnly && l.text ? (r(), c("span", se, v(l.text), 1)) : f("", !0),
41
- l.closable ? (r(), c("button", {
98
+ t.iconOnly || t.text ? (c(), u("span", ue, h(t.icon), 1)) : y("", !0),
99
+ !t.iconOnly && t.text ? (c(), u("span", de, h(t.text), 1)) : y("", !0),
100
+ t.closable ? (c(), u("button", {
42
101
  key: 2,
43
102
  class: "spicyAlertCloseBtn",
44
- onClick: a,
103
+ onClick: l,
45
104
  "aria-label": "Close alert"
46
- }, " X ")) : f("", !0),
47
- m(l.$slots, "default")
48
- ], 42, le)) : f("", !0)
105
+ }, " X ")) : y("", !0),
106
+ g(t.$slots, "default")
107
+ ], 42, ce)) : y("", !0)
49
108
  ]),
50
109
  _: 3
51
110
  }));
52
111
  }
53
- }), ie = ["disabled", "aria-label", "aria-disabled", "tabindex"], re = {
112
+ }), ye = ["disabled", "aria-label", "aria-disabled", "tabindex"], fe = {
54
113
  key: 0,
55
114
  class: "spicyBtnIcon spicyMDI",
56
115
  viewBox: "0 0 24 24",
57
116
  xmlns: "http://www.w3.org/2000/svg"
58
- }, ce = ["d"], ue = {
117
+ }, ve = ["d"], he = {
59
118
  key: 1,
60
119
  class: "spicyBtnIcon"
61
- }, de = {
120
+ }, me = {
62
121
  key: 2,
63
122
  class: "spicyBtnText"
64
- }, pe = /* @__PURE__ */ b({
123
+ }, ge = /* @__PURE__ */ b({
65
124
  __name: "SpicyBtn",
66
125
  props: {
67
126
  variant: { default: "filled" },
@@ -77,53 +136,56 @@ const le = ["aria-label"], ae = {
77
136
  fontWeight: { default: 500 }
78
137
  },
79
138
  emits: ["click"],
80
- setup(e, { emit: t }) {
81
- const o = e, a = g(() => ({
82
- "--skFontSize": typeof o.fontSize == "number" ? `${o.fontSize}px` : o.fontSize,
83
- "--skFontWeight": o.fontWeight,
84
- "--skBgColor": o.bgColor,
85
- "--skTextColor": o.textColor,
86
- "--skBorderColor": o.borderColor,
87
- "--hoverColor": o.hoverColor
88
- })), l = g(() => !o.text && (o.icon || o.mdi));
89
- return (s, u) => {
90
- const i = q("spicyRipple");
91
- return D((r(), c("button", {
92
- class: C(["spicyBtn", { outlined: s.variant === "outlined", disabled: s.disabled, isRound: l.value }]),
93
- style: k({ ...a.value }),
94
- disabled: s.disabled,
95
- onClick: u[0] || (u[0] = (d) => s.$emit("click")),
139
+ setup(e, { emit: s }) {
140
+ const o = s, l = () => {
141
+ t.disabled || o("click");
142
+ }, t = e, a = v(() => ({
143
+ "--skFontSize": typeof t.fontSize == "number" ? `${t.fontSize}px` : t.fontSize,
144
+ "--skFontWeight": t.fontWeight,
145
+ "--skBgColor": t.bgColor,
146
+ "--skTextColor": t.textColor,
147
+ "--skBorderColor": t.borderColor,
148
+ "--hoverColor": t.hoverColor
149
+ })), r = v(() => !t.text && (t.icon || t.mdi)), n = v(() => ({
150
+ spicyBtn: !0,
151
+ outlined: t.variant === "outlined",
152
+ disabled: t.disabled,
153
+ isRound: r.value
154
+ }));
155
+ return (d, i) => {
156
+ const f = Q("spicyRipple");
157
+ return A((c(), u("button", {
158
+ class: k(n.value),
159
+ style: S(a.value),
160
+ disabled: d.disabled,
161
+ onClick: l,
96
162
  role: "button",
97
- "aria-label": s.text,
98
- "aria-disabled": s.disabled,
99
- tabindex: s.disabled ? -1 : 0
163
+ "aria-label": d.text,
164
+ "aria-disabled": d.disabled,
165
+ tabindex: d.disabled ? -1 : 0
100
166
  }, [
101
- s.mdi ? (r(), c("svg", re, [
102
- h("path", {
167
+ d.mdi ? (c(), u("svg", fe, [
168
+ p("path", {
103
169
  fill: "currentColor",
104
170
  class: "mdi-icon",
105
- d: s.mdi
106
- }, null, 8, ce)
107
- ])) : f("", !0),
108
- s.icon && !s.mdi ? (r(), c("span", ue, v(s.icon), 1)) : f("", !0),
109
- s.text ? (r(), c("span", de, v(s.text), 1)) : f("", !0),
110
- m(s.$slots, "default")
111
- ], 14, ie)), [
112
- [i]
171
+ d: d.mdi
172
+ }, null, 8, ve)
173
+ ])) : y("", !0),
174
+ d.icon && !d.mdi ? (c(), u("span", he, h(d.icon), 1)) : y("", !0),
175
+ d.text ? (c(), u("span", me, h(d.text), 1)) : y("", !0),
176
+ g(d.$slots, "default")
177
+ ], 14, ye)), [
178
+ [f]
113
179
  ]);
114
180
  };
115
181
  }
116
- }), fe = ["aria-label"], ye = { class: "spicyCarouselInfoText" }, he = { class: "spicyCarouselTitle" }, ve = { key: 0 }, me = {
182
+ }), be = ["aria-label"], ke = { class: "spicyCarouselInfoText" }, Ce = { class: "spicyCarouselTitle" }, Se = { key: 0 }, we = {
117
183
  key: 0,
118
184
  class: "spicyCarouselNavControls"
119
- }, ge = /* @__PURE__ */ h("span", { class: "spicyCarouselPrevBtnIcon" }, "<", -1), be = [
120
- ge
121
- ], Ce = /* @__PURE__ */ h("span", { class: "spicyCarouselNextBtnIcon" }, ">", -1), Se = [
122
- Ce
123
- ], ke = {
185
+ }, $e = {
124
186
  key: 1,
125
187
  class: "spicyCarouselPagination"
126
- }, we = ["onClick"], $e = { class: "spicyCarouselPage" }, _e = /* @__PURE__ */ b({
188
+ }, _e = ["onClick"], Be = { class: "spicyCarouselPage" }, Te = /* @__PURE__ */ b({
127
189
  __name: "SpicyCarousel",
128
190
  props: {
129
191
  autoplay: { type: Boolean, default: !1 },
@@ -140,102 +202,106 @@ const le = ["aria-label"], ae = {
140
202
  enableImageClick: { type: Boolean, default: !1 }
141
203
  },
142
204
  setup(e) {
143
- let t, o, a = !1;
144
- const l = e, s = g(() => ({
145
- "--width": l.width,
146
- "--height": l.height,
147
- "--activeColor": l.activeColor
148
- })), u = g(() => {
149
- var y;
150
- return (y = l.slides[d.value]) == null ? void 0 : y.title;
151
- }), i = g(() => n.value.fullScreen === !1 ? !1 : l.fullScreen), d = S(l.initialSlide), n = g(() => l.slides[d.value]);
152
- let p;
153
- const $ = () => {
154
- d.value = (d.value - 1 + l.slides.length) % l.slides.length;
155
- }, _ = () => {
156
- d.value = (d.value + 1) % l.slides.length;
157
- }, U = (y) => {
158
- d.value = y;
159
- }, O = () => {
160
- p && clearInterval(p);
161
- }, V = () => {
162
- l.autoplay && (p = window.setInterval(_, l.autoplaySpeed));
163
- }, W = () => {
164
- window.open(n.value.img);
165
- }, H = () => {
166
- l.enableImageClick && W();
167
- }, j = (y) => {
168
- t = y.touches[0].clientX, o = y.touches[0].clientY, a = !1;
169
- }, K = (y) => {
170
- if (!a) {
171
- const B = y.touches[0].clientX - t, F = y.touches[0].clientY - o;
172
- Math.abs(B) > Math.abs(F) && (B > 40 ? ($(), a = !0) : B < -40 && (_(), a = !0));
205
+ let s, o, l = !1;
206
+ const t = e, a = v(() => ({
207
+ "--width": t.width,
208
+ "--height": t.height,
209
+ "--activeColor": t.activeColor
210
+ })), r = v(() => {
211
+ var m;
212
+ return (m = t.slides[d.value]) == null ? void 0 : m.title;
213
+ }), n = v(() => i.value.fullScreen === !1 ? !1 : t.fullScreen), d = C(t.initialSlide), i = v(() => t.slides[d.value]);
214
+ let f;
215
+ const _ = () => {
216
+ d.value = (d.value - 1 + t.slides.length) % t.slides.length;
217
+ }, T = () => {
218
+ d.value = (d.value + 1) % t.slides.length;
219
+ }, X = (m) => {
220
+ d.value = m;
221
+ }, z = () => {
222
+ f && clearInterval(f);
223
+ }, P = () => {
224
+ t.autoplay && (f = window.setInterval(T, t.autoplaySpeed));
225
+ }, K = () => {
226
+ window.open(i.value.img);
227
+ }, U = () => {
228
+ t.enableImageClick && K();
229
+ }, j = (m) => {
230
+ s = m.touches[0].clientX, o = m.touches[0].clientY, l = !1;
231
+ }, q = (m) => {
232
+ if (!l) {
233
+ const w = m.touches[0].clientX - s, Y = m.touches[0].clientY - o;
234
+ Math.abs(w) > Math.abs(Y) && (w > 40 ? (_(), l = !0) : w < -40 && (T(), l = !0));
173
235
  }
174
236
  };
175
- return G(() => {
176
- V();
177
- }), J(() => {
178
- O();
179
- }), (y, B) => (r(), c("div", {
237
+ return Z(() => {
238
+ P();
239
+ }), ee(() => {
240
+ z();
241
+ }), (m, w) => (c(), u("div", {
180
242
  class: "spicyCarouselWrapper",
181
- style: k({ ...s.value })
243
+ style: S({ ...a.value })
182
244
  }, [
183
- h("div", {
245
+ p("div", {
184
246
  class: "spicyCarouselContainer",
185
- onMouseenter: O,
186
- onMouseleave: V,
247
+ onMouseenter: z,
248
+ onMouseleave: P,
187
249
  onTouchstart: j,
188
- onTouchmove: K
250
+ onTouchmove: q
189
251
  }, [
190
- Q(P, {
252
+ L(D, {
191
253
  name: "slide",
192
254
  mode: "out-in"
193
255
  }, {
194
- default: A(() => [
195
- (r(), c("div", {
196
- class: C(["spicyCarouselSlide", { pointCursor: l.enableImageClick }]),
256
+ default: M(() => [
257
+ (c(), u("div", {
258
+ class: k(["spicyCarouselSlide", { pointCursor: t.enableImageClick }]),
197
259
  key: d.value,
198
- style: k({ backgroundImage: `url(${n.value.img})` }),
199
- onClick: H
260
+ style: S({ backgroundImage: `url(${i.value.img})` }),
261
+ onClick: U
200
262
  }, [
201
- y.slides[d.value].text ? (r(), c("div", {
263
+ m.slides[d.value].text ? (c(), u("div", {
202
264
  key: 0,
203
- class: C(["spicyCarouselTextOverlay", { fullScreen: i.value }]),
204
- "aria-label": y.slides[d.value].text
265
+ class: k(["spicyCarouselTextOverlay", { fullScreen: n.value }]),
266
+ "aria-label": m.slides[d.value].text
205
267
  }, [
206
- h("span", ye, v(y.slides[d.value].text), 1)
207
- ], 10, fe)) : f("", !0),
208
- m(y.$slots, "default")
268
+ p("span", ke, h(m.slides[d.value].text), 1)
269
+ ], 10, be)) : y("", !0),
270
+ g(m.$slots, "default")
209
271
  ], 6))
210
272
  ]),
211
273
  _: 3
212
274
  })
213
275
  ], 32),
214
- h("div", he, [
215
- u.value ? (r(), c("h2", ve, v(n.value.title), 1)) : f("", !0)
276
+ p("div", Ce, [
277
+ r.value ? (c(), u("h2", Se, h(i.value.title), 1)) : y("", !0)
216
278
  ]),
217
- y.showNavigation ? (r(), c("div", me, [
218
- h("button", {
279
+ m.showNavigation ? (c(), u("div", we, [
280
+ p("button", {
219
281
  class: "spicyCarouselPrevBtn",
220
- onClick: $
221
- }, be),
222
- h("button", {
223
- class: "spicyCarouselNextBtn",
224
282
  onClick: _
225
- }, Se)
226
- ])) : f("", !0),
227
- y.showPagination ? (r(), c("div", ke, [
228
- (r(!0), c(E, null, z(y.slides, (F, T) => (r(), c("button", {
229
- key: T,
230
- onClick: (yt) => U(T),
231
- class: C(["spicyCarouselPageBtn", { active: T === d.value }])
283
+ }, w[0] || (w[0] = [
284
+ p("span", { class: "spicyCarouselPrevBtnIcon" }, "<", -1)
285
+ ])),
286
+ p("button", {
287
+ class: "spicyCarouselNextBtn",
288
+ onClick: T
289
+ }, w[1] || (w[1] = [
290
+ p("span", { class: "spicyCarouselNextBtnIcon" }, ">", -1)
291
+ ]))
292
+ ])) : y("", !0),
293
+ m.showPagination ? (c(), u("div", $e, [
294
+ (c(!0), u(B, null, O(m.slides, (Y, I) => (c(), u("button", {
295
+ key: I,
296
+ onClick: (It) => X(I),
297
+ class: k(["spicyCarouselPageBtn", { active: I === d.value }])
232
298
  }, [
233
- h("span", $e, v(T + 1), 1)
234
- ], 10, we))), 128))
235
- ])) : f("", !0)
299
+ p("span", Be, h(I + 1), 1)
300
+ ], 10, _e))), 128))
301
+ ])) : y("", !0)
236
302
  ], 4));
237
303
  }
238
- }), Be = /* @__PURE__ */ b({
304
+ }), De = /* @__PURE__ */ b({
239
305
  __name: "SpicyDivider",
240
306
  props: {
241
307
  variant: { default: "solid" },
@@ -244,23 +310,80 @@ const le = ["aria-label"], ae = {
244
310
  bgColor: { default: "#5f5f5f" }
245
311
  },
246
312
  setup(e) {
247
- const t = e, o = g(() => ({
248
- width: t.width,
249
- borderBottom: `${t.height} ${t.variant} ${t.bgColor}`
313
+ const s = e, o = v(() => ({
314
+ width: s.width,
315
+ borderBottom: `${s.height} ${s.variant} ${s.bgColor}`
250
316
  }));
251
- return (a, l) => (r(), c("div", {
317
+ return (l, t) => (c(), u("div", {
252
318
  class: "spicyDivider",
253
- style: k(o.value),
319
+ style: S(o.value),
254
320
  role: "separator",
255
321
  "aria-orientation": "horizontal"
256
322
  }, [
257
- m(a.$slots, "default")
323
+ g(l.$slots, "default")
258
324
  ], 4));
259
325
  }
260
- }), Te = ["aria-label"], Me = ["placeholder", "aria-label"], De = {
326
+ }), Me = ["width", "height"], Ie = ["d"], Oe = ["width", "height"], Le = /* @__PURE__ */ b({
327
+ __name: "SpicyDropdown",
328
+ props: {
329
+ label: {},
330
+ align: { default: "left" },
331
+ width: { default: "200px" },
332
+ icon: { default: "" },
333
+ iconSize: { default: "24px" }
334
+ },
335
+ setup(e) {
336
+ const s = e, o = C(!1), l = () => {
337
+ o.value = !o.value;
338
+ }, t = v(() => ({
339
+ width: s.width,
340
+ textAlign: s.align
341
+ }));
342
+ return (a, r) => (c(), u("div", {
343
+ class: k(["spicyDropdown", { open: o.value }])
344
+ }, [
345
+ p("button", {
346
+ onClick: l,
347
+ class: "spicyDropdownButton"
348
+ }, [
349
+ a.icon ? (c(), u("svg", {
350
+ key: 0,
351
+ width: a.iconSize,
352
+ height: a.iconSize,
353
+ viewBox: "0 0 24 24",
354
+ class: "dropdownIcon"
355
+ }, [
356
+ p("path", { d: a.icon }, null, 8, Ie)
357
+ ], 8, Me)) : y("", !0),
358
+ x(" " + h(a.label) + " ", 1),
359
+ a.icon === "" ? (c(), u("svg", {
360
+ key: 1,
361
+ width: a.iconSize,
362
+ height: a.iconSize,
363
+ viewBox: "0 0 24 24",
364
+ class: k(["arrow", { open: o.value }])
365
+ }, r[0] || (r[0] = [
366
+ p("path", { d: "M7 10l5 5 5-5H7z" }, null, -1)
367
+ ]), 10, Oe)) : y("", !0)
368
+ ]),
369
+ L(D, { name: "fade" }, {
370
+ default: M(() => [
371
+ o.value ? (c(), u("div", {
372
+ key: 0,
373
+ class: "spicyDropdownMenu",
374
+ style: S(t.value)
375
+ }, [
376
+ g(a.$slots, "default")
377
+ ], 4)) : y("", !0)
378
+ ]),
379
+ _: 3
380
+ })
381
+ ], 2));
382
+ }
383
+ }), Ae = ["aria-label"], Ve = ["placeholder", "aria-label"], ze = {
261
384
  key: 0,
262
385
  class: "spicyInputError"
263
- }, Ie = /* @__PURE__ */ b({
386
+ }, Pe = /* @__PURE__ */ b({
264
387
  __name: "SpicyLabel",
265
388
  props: {
266
389
  value: { default: "" },
@@ -270,39 +393,39 @@ const le = ["aria-label"], ae = {
270
393
  variant: { default: "filled" }
271
394
  },
272
395
  setup(e) {
273
- const o = S(e.value), a = S(!1), l = (i) => {
274
- const d = i.target;
396
+ const o = C(e.value), l = C(!1), t = (n) => {
397
+ const d = n.target;
275
398
  o.value = d.value;
276
- }, s = () => {
277
- a.value = !1;
278
- }, u = () => {
279
- a.value = !0;
399
+ }, a = () => {
400
+ l.value = !1;
401
+ }, r = () => {
402
+ l.value = !0;
280
403
  };
281
- return (i, d) => (r(), c("div", {
282
- class: C(["spicyInputWrapper", [i.variant, { hasValue: o.value || i.value, hasFocus: a.value, hasError: i.error }]])
404
+ return (n, d) => (c(), u("div", {
405
+ class: k(["spicyInputWrapper", [n.variant, { hasValue: o.value || n.value, hasFocus: l.value, hasError: n.error }]])
283
406
  }, [
284
- h("label", {
407
+ p("label", {
285
408
  class: "spicyInputLabel",
286
- "aria-label": i.label
287
- }, v(i.label), 9, Te),
288
- D(h("input", {
409
+ "aria-label": n.label
410
+ }, h(n.label), 9, Ae),
411
+ A(p("input", {
289
412
  type: "text",
290
413
  name: "spicyInput",
291
- class: C(["spicyInput", i.variant]),
292
- "onUpdate:modelValue": d[0] || (d[0] = (n) => o.value = n),
293
- placeholder: i.placeholder,
294
- onInput: l,
295
- onBlur: s,
296
- onFocus: u,
297
- "aria-label": i.label
298
- }, null, 42, Me), [
299
- [x, o.value]
414
+ class: k(["spicyInput", n.variant]),
415
+ "onUpdate:modelValue": d[0] || (d[0] = (i) => o.value = i),
416
+ placeholder: n.placeholder,
417
+ onInput: t,
418
+ onBlur: a,
419
+ onFocus: r,
420
+ "aria-label": n.label
421
+ }, null, 42, Ve), [
422
+ [R, o.value]
300
423
  ]),
301
- m(i.$slots, "default"),
302
- i.error ? (r(), c("span", De, v(i.error), 1)) : f("", !0)
424
+ g(n.$slots, "default"),
425
+ n.error ? (c(), u("span", ze, h(n.error), 1)) : y("", !0)
303
426
  ], 2));
304
427
  }
305
- }), Oe = { class: "spicyModalHeader" }, Ve = { class: "spicyModalActions" }, Fe = ["onClick"], Le = /* @__PURE__ */ b({
428
+ }), Ye = { class: "spicyModalHeader" }, Fe = { class: "spicyModalActions" }, Ee = ["onClick"], xe = /* @__PURE__ */ b({
306
429
  __name: "SpicyModal",
307
430
  props: {
308
431
  width: { default: "400px" },
@@ -317,71 +440,140 @@ const le = ["aria-label"], ae = {
317
440
  textColor: { default: "" }
318
441
  },
319
442
  emits: ["update:visible"],
320
- setup(e, { emit: t }) {
321
- const o = e, a = g(() => ({
443
+ setup(e, { emit: s }) {
444
+ const o = e, l = v(() => ({
322
445
  "--width": o.width,
323
446
  "--height": o.height,
324
447
  "--skBorderRadius": o.borderRadius,
325
448
  "--skBgColor": o.bgColor,
326
449
  "--skTextColor": o.textColor
327
- })), l = t, s = () => {
328
- l("update:visible", !1);
329
- }, u = (i) => {
330
- const d = i.target;
331
- o.closeOnClick && d.classList.contains("spicyModalOverlay") && s();
450
+ })), t = s, a = () => {
451
+ t("update:visible", !1);
452
+ }, r = (n) => {
453
+ const d = n.target;
454
+ o.closeOnClick && d.classList.contains("spicyModalOverlay") && a();
332
455
  };
333
- return (i, d) => i.visible ? (r(), c("div", {
456
+ return (n, d) => n.visible ? (c(), u("div", {
334
457
  key: 0,
335
458
  class: "spicyModalOverlay",
336
- onClick: u
459
+ onClick: r
337
460
  }, [
338
- h("div", {
461
+ p("div", {
339
462
  class: "spicyModal",
340
- style: k({ ...a.value })
463
+ style: S({ ...l.value })
341
464
  }, [
342
- h("header", Oe, [
343
- m(i.$slots, "spicyModalHeader", {
344
- title: i.modalTitle,
345
- ariaLabel: i.modalTitle
465
+ p("header", Ye, [
466
+ g(n.$slots, "spicyModalHeader", {
467
+ title: n.modalTitle,
468
+ ariaLabel: n.modalTitle
346
469
  }, () => [
347
- Z(v(i.modalTitle), 1)
470
+ x(h(n.modalTitle), 1)
348
471
  ])
349
472
  ]),
350
- m(i.$slots, "default"),
351
- h("div", Ve, [
352
- m(i.$slots, "spicyModalActions"),
353
- i.actions.length === 0 && i.closeBtn ? (r(), c("button", {
473
+ g(n.$slots, "default"),
474
+ p("div", Fe, [
475
+ g(n.$slots, "spicyModalActions"),
476
+ n.actions.length === 0 && n.closeBtn ? (c(), u("button", {
354
477
  key: 0,
355
478
  class: "spicyModalCloseBtn spicyModalActionBtn",
356
- onClick: s
357
- }, " Close ")) : f("", !0),
358
- (r(!0), c(E, null, z(i.actions, (n) => (r(), c("button", {
479
+ onClick: a
480
+ }, " Close ")) : y("", !0),
481
+ (c(!0), u(B, null, O(n.actions, (i) => (c(), u("button", {
359
482
  class: "spicyModalExtraBtn spicyModalActionBtn",
360
- key: n.label,
361
- onClick: n.handler
362
- }, v(n.label), 9, Fe))), 128))
483
+ key: i.label,
484
+ onClick: i.handler
485
+ }, h(i.label), 9, Ee))), 128))
363
486
  ])
364
487
  ], 4)
365
- ])) : f("", !0);
488
+ ])) : y("", !0);
489
+ }
490
+ }), Re = {
491
+ key: 0,
492
+ class: "spicyProgress"
493
+ }, We = {
494
+ key: 0,
495
+ class: "spicyProgressLabel"
496
+ }, Ne = {
497
+ key: 1,
498
+ class: "spicyProgressCircular"
499
+ }, He = ["width", "height"], Xe = ["stroke-width", "r", "cx", "cy"], Ke = ["stroke", "stroke-width", "r", "cx", "cy"], Ue = {
500
+ key: 0,
501
+ class: "spicyCircularLabel"
502
+ }, je = /* @__PURE__ */ b({
503
+ __name: "SpicyProgress",
504
+ props: {
505
+ value: {},
506
+ max: { default: 100 },
507
+ color: { default: "#4caf50" },
508
+ height: { default: "8px" },
509
+ strokeWidth: { default: 8 },
510
+ type: { default: "linear" },
511
+ showLabel: { type: Boolean, default: !1 },
512
+ size: { default: 100 }
513
+ },
514
+ setup(e) {
515
+ const s = e, o = v(() => Math.round(s.value / s.max * 100)), l = v(() => s.type === "linear"), t = v(() => ({
516
+ width: `${o.value}%`,
517
+ backgroundColor: s.color,
518
+ height: s.height
519
+ })), a = v(() => s.size / 2), r = v(() => (s.size - s.strokeWidth) / 2), n = v(() => 2 * Math.PI * r.value), d = v(() => ({
520
+ strokeDasharray: `${n.value} ${n.value}`,
521
+ strokeDashoffset: `${n.value - o.value / 100 * n.value}`,
522
+ transition: "stroke-dashoffset 400ms ease"
523
+ }));
524
+ return (i, f) => (c(), u(B, null, [
525
+ l.value ? (c(), u("div", Re, [
526
+ p("div", {
527
+ class: "spicyProgressBar",
528
+ style: S(t.value)
529
+ }, null, 4),
530
+ i.showLabel ? (c(), u("div", We, h(o.value) + "%", 1)) : y("", !0)
531
+ ])) : (c(), u("div", Ne, [
532
+ (c(), u("svg", {
533
+ class: "spicyCircularSvg",
534
+ width: i.size,
535
+ height: i.size
536
+ }, [
537
+ p("circle", {
538
+ class: "spicyCircularTrack",
539
+ "stroke-width": i.strokeWidth,
540
+ r: r.value,
541
+ cx: a.value,
542
+ cy: a.value
543
+ }, null, 8, Xe),
544
+ p("circle", {
545
+ class: "spicyCircularProgress",
546
+ stroke: i.color,
547
+ "stroke-width": i.strokeWidth,
548
+ r: r.value,
549
+ cx: a.value,
550
+ cy: a.value,
551
+ style: S(d.value)
552
+ }, null, 12, Ke)
553
+ ], 8, He)),
554
+ i.showLabel ? (c(), u("div", Ue, h(o.value) + "%", 1)) : y("", !0)
555
+ ])),
556
+ g(i.$slots, "default")
557
+ ], 64));
366
558
  }
367
- }), Ye = /* @__PURE__ */ b({
559
+ }), qe = /* @__PURE__ */ b({
368
560
  __name: "SpicySheet",
369
561
  props: {
370
- isRounded: { type: Boolean, default: !1 },
562
+ isRound: { type: Boolean, default: !1 },
371
563
  color: { default: "" }
372
564
  },
373
565
  setup(e) {
374
- const t = e, o = g(() => ({
375
- "--color": t.color || "transparent"
566
+ const s = e, o = v(() => ({
567
+ "--color": s.color || "transparent"
376
568
  }));
377
- return (a, l) => (r(), c("div", {
378
- class: C(["spicySheet", { isRound: a.isRounded }]),
379
- style: k({ ...o.value })
569
+ return (l, t) => (c(), u("div", {
570
+ class: k(["spicySheet", { isRound: l.isRound }]),
571
+ style: S({ ...o.value })
380
572
  }, [
381
- m(a.$slots, "default")
573
+ g(l.$slots, "default")
382
574
  ], 6));
383
575
  }
384
- }), Pe = { class: "spicySlider" }, Ae = ["aria-label"], Ee = ["min", "max", "step"], ze = /* @__PURE__ */ b({
576
+ }), Ge = { class: "spicySlider" }, Je = ["aria-label"], Qe = ["min", "max", "step"], Ze = /* @__PURE__ */ b({
385
577
  __name: "SpicySlider",
386
578
  props: {
387
579
  min: { default: 0 },
@@ -391,42 +583,108 @@ const le = ["aria-label"], ae = {
391
583
  modelValue: { default: 0 }
392
584
  },
393
585
  emits: ["update:modelValue"],
394
- setup(e, { emit: t }) {
395
- const o = e, a = t, l = S(o.modelValue);
396
- Y(
586
+ setup(e, { emit: s }) {
587
+ const o = e, l = s, t = C(o.modelValue);
588
+ E(
397
589
  () => o.modelValue,
398
- (u) => {
399
- l.value = u;
590
+ (r) => {
591
+ t.value = r;
400
592
  }
401
593
  );
402
- const s = (u) => {
403
- const i = u.target;
404
- a("update:modelValue", Number(i.value));
594
+ const a = (r) => {
595
+ const n = r.target;
596
+ l("update:modelValue", Number(n.value));
405
597
  };
406
- return (u, i) => (r(), c("div", Pe, [
407
- u.label ? (r(), c("label", {
598
+ return (r, n) => (c(), u("div", Ge, [
599
+ r.label ? (c(), u("label", {
408
600
  key: 0,
409
601
  class: "spicySliderLabel",
410
- "aria-label": u.label
411
- }, v(u.label), 9, Ae)) : f("", !0),
412
- D(h("input", {
602
+ "aria-label": r.label
603
+ }, h(r.label), 9, Je)) : y("", !0),
604
+ A(p("input", {
413
605
  name: "spicySliderInput",
414
606
  class: "spicySliderInput",
415
607
  type: "range",
416
- min: u.min,
417
- max: u.max,
418
- step: u.step,
419
- "onUpdate:modelValue": i[0] || (i[0] = (d) => l.value = d),
420
- onInput: s
421
- }, null, 40, Ee), [
422
- [x, l.value]
608
+ min: r.min,
609
+ max: r.max,
610
+ step: r.step,
611
+ "onUpdate:modelValue": n[0] || (n[0] = (d) => t.value = d),
612
+ onInput: a
613
+ }, null, 40, Qe), [
614
+ [R, t.value]
423
615
  ]),
424
- m(u.$slots, "default")
616
+ g(r.$slots, "default")
425
617
  ]));
426
618
  }
427
- }), xe = ["tabindex", "aria-label", "aria-checked", "onKeydown"], Re = /* @__PURE__ */ h("div", { class: "spicyToggleKnob" }, null, -1), Ne = [
428
- Re
429
- ], Ue = /* @__PURE__ */ b({
619
+ }), et = { class: "spicyTabsHeader" }, tt = ["onClick"], ot = {
620
+ key: 0,
621
+ class: "spicyTabsContent"
622
+ }, st = /* @__PURE__ */ b({
623
+ __name: "SpicyTabs",
624
+ props: {
625
+ layout: { default: "horizontal" },
626
+ tabs: {}
627
+ },
628
+ setup(e) {
629
+ var r;
630
+ const s = e, o = C(((r = s.tabs[0]) == null ? void 0 : r.name) || ""), l = v(() => {
631
+ var n;
632
+ return (n = s.tabs.find((d) => d.name === o.value)) == null ? void 0 : n.name;
633
+ }), t = (n) => {
634
+ o.value = n;
635
+ }, a = v(() => s.layout === "vertical" ? "vertical" : "horizontal");
636
+ return (n, d) => (c(), u("div", {
637
+ class: k(["spicyTabs", a.value])
638
+ }, [
639
+ p("div", et, [
640
+ (c(!0), u(B, null, O(n.tabs, (i) => (c(), u("button", {
641
+ key: i.name,
642
+ class: k(["tabButton", { active: o.value === i.name }]),
643
+ onClick: (f) => t(i.name)
644
+ }, h(i.label), 11, tt))), 128))
645
+ ]),
646
+ L(D, { name: "fade" }, {
647
+ default: M(() => [
648
+ l.value ? (c(), u("div", ot, [
649
+ g(n.$slots, l.value)
650
+ ])) : y("", !0)
651
+ ]),
652
+ _: 3
653
+ })
654
+ ], 2));
655
+ }
656
+ }), lt = ["value", "name"], at = /* @__PURE__ */ b({
657
+ __name: "SpicyTextarea",
658
+ props: {
659
+ border: { default: "1px solid var(--skBorderColor, #515353)" },
660
+ isRound: { type: Boolean, default: !1 },
661
+ padding: { default: "8px" },
662
+ color: { default: "#4e4e4e" },
663
+ modelValue: { default: "" },
664
+ name: { default: "" }
665
+ },
666
+ emits: ["update:modelValue"],
667
+ setup(e, { emit: s }) {
668
+ const o = e, l = v(() => ({
669
+ borderRadius: o.isRound ? "16px" : "2px",
670
+ border: o.border,
671
+ padding: o.padding,
672
+ backgroundColor: o.color
673
+ })), t = s, a = (r) => {
674
+ t("update:modelValue", r.target.value);
675
+ };
676
+ return (r, n) => (c(), u(B, null, [
677
+ p("textarea", W({
678
+ class: "spicyTextarea",
679
+ value: r.modelValue,
680
+ onInput: a,
681
+ name: r.name,
682
+ style: l.value
683
+ }, r.$attrs), null, 16, lt),
684
+ g(r.$slots, "default")
685
+ ], 64));
686
+ }
687
+ }), nt = ["tabindex", "aria-label", "aria-checked", "onKeydown"], it = /* @__PURE__ */ b({
430
688
  __name: "SpicyToggle",
431
689
  props: {
432
690
  modelValue: { type: Boolean, default: !1 },
@@ -437,34 +695,36 @@ const le = ["aria-label"], ae = {
437
695
  disabled: { type: Boolean, default: !1 }
438
696
  },
439
697
  emits: ["update:modelValue"],
440
- setup(e, { emit: t }) {
441
- const o = e, a = g(() => ({
698
+ setup(e, { emit: s }) {
699
+ const o = e, l = v(() => ({
442
700
  "--skBorderColor": o.borderColor,
443
701
  "--activeColor": o.activeColor
444
- })), l = t, s = () => {
445
- l("update:modelValue", !o.modelValue);
702
+ })), t = s, a = () => {
703
+ t("update:modelValue", !o.modelValue);
446
704
  };
447
- return (u, i) => (r(), c("div", ee({
448
- class: ["spicyToggle", { outlined: u.variant === "outlined", "is-active": u.modelValue }],
449
- tabindex: u.disabled ? -1 : 0,
705
+ return (r, n) => (c(), u("div", W({
706
+ class: ["spicyToggle", { outlined: r.variant === "outlined", "is-active": r.modelValue }],
707
+ tabindex: r.disabled ? -1 : 0,
450
708
  role: "switch",
451
- style: { ...a.value },
452
- "aria-label": u.label,
453
- "aria-checked": u.modelValue,
454
- onClick: s,
709
+ style: { ...l.value },
710
+ "aria-label": r.label,
711
+ "aria-checked": r.modelValue,
712
+ onClick: a,
455
713
  onKeydown: [
456
- M(L(s, ["prevent"]), ["space"]),
457
- M(L(s, ["prevent"]), ["enter"])
714
+ V(F(a, ["prevent"]), ["space"]),
715
+ V(F(a, ["prevent"]), ["enter"])
458
716
  ]
459
- }, u.$attrs), Ne, 16, xe));
717
+ }, r.$attrs), n[0] || (n[0] = [
718
+ p("div", { class: "spicyToggleKnob" }, null, -1)
719
+ ]), 16, nt));
460
720
  }
461
- }), We = ["aria-hidden"], He = {
721
+ }), rt = ["aria-hidden"], ct = {
462
722
  key: 0,
463
723
  class: "spicyTooltipIcon"
464
- }, je = ["aria-label"], Ke = {
724
+ }, ut = ["aria-label"], dt = {
465
725
  key: 2,
466
726
  class: "spicyTooltipIcon"
467
- }, Xe = /* @__PURE__ */ b({
727
+ }, pt = /* @__PURE__ */ b({
468
728
  __name: "SpicyTooltip",
469
729
  props: {
470
730
  text: { default: "" },
@@ -473,260 +733,253 @@ const le = ["aria-label"], ae = {
473
733
  position: { default: "top" }
474
734
  },
475
735
  setup(e) {
476
- const t = e, o = S(!1), a = S(null), l = te({
736
+ const s = e, o = C(!1), l = C(null), t = te({
477
737
  position: "absolute",
478
738
  top: "0px",
479
739
  left: "0px",
480
740
  maxWidth: "175px"
481
- }), s = (n) => {
482
- const p = n.right - window.innerWidth;
483
- p > 0 && (l.left = `${parseInt(l.left) - p - 5}px`), n.left < 0 && (l.left = "5px");
484
- }, u = {
485
- top: (n, p) => {
486
- l.left = `${n.left + (n.width - p.width) / 2}px`, l.top = `${n.top - p.height - 5}px`;
741
+ }), a = (i) => {
742
+ const f = i.right - window.innerWidth;
743
+ f > 0 && (t.left = `${parseInt(t.left) - f - 5}px`), i.left < 0 && (t.left = "5px");
744
+ }, r = {
745
+ top: (i, f) => {
746
+ t.left = `${i.left + (i.width - f.width) / 2}px`, t.top = `${i.top - f.height - 5}px`;
487
747
  },
488
- bottom: (n, p) => {
489
- l.left = `${n.left + (n.width - p.width) / 2}px`, l.top = `${n.bottom + 5}px`;
748
+ bottom: (i, f) => {
749
+ t.left = `${i.left + (i.width - f.width) / 2}px`, t.top = `${i.bottom + 5}px`;
490
750
  },
491
- left: (n, p) => {
492
- l.left = `${n.left - p.width - 5}px`, l.top = `${n.top + (n.height - p.height) / 2}px`;
751
+ left: (i, f) => {
752
+ t.left = `${i.left - f.width - 5}px`, t.top = `${i.top + (i.height - f.height) / 2}px`;
493
753
  },
494
- right: (n, p) => {
495
- l.left = `${n.right + 5}px`, l.top = `${n.top + (n.height - p.height) / 2}px`;
754
+ right: (i, f) => {
755
+ t.left = `${i.right + 5}px`, t.top = `${i.top + (i.height - f.height) / 2}px`;
496
756
  }
497
- }, i = () => {
757
+ }, n = () => {
498
758
  o.value = !0, oe(() => {
499
- if (a.value && o.value) {
500
- const n = a.value.getBoundingClientRect(), p = a.value.querySelector(".spicyTooltip");
501
- if (p) {
502
- const $ = p.getBoundingClientRect(), _ = u[t.position];
503
- _(n, $), s($);
759
+ if (l.value && o.value) {
760
+ const i = l.value.getBoundingClientRect(), f = l.value.querySelector(".spicyTooltip");
761
+ if (f) {
762
+ const _ = f.getBoundingClientRect(), T = r[s.position];
763
+ T(i, _), a(_);
504
764
  }
505
765
  }
506
766
  });
507
767
  }, d = () => {
508
768
  o.value = !1;
509
769
  };
510
- return (n, p) => (r(), c("div", {
511
- onMouseover: i,
770
+ return (i, f) => (c(), u("div", {
771
+ onMouseover: n,
512
772
  onMouseleave: d,
513
773
  ref_key: "host",
514
- ref: a
774
+ ref: l
515
775
  }, [
516
- m(n.$slots, "default"),
517
- o.value ? (r(), c("div", {
776
+ g(i.$slots, "default"),
777
+ o.value ? (c(), u("div", {
518
778
  key: 0,
519
779
  class: "spicyTooltip",
520
- style: k(l),
780
+ style: S(t),
521
781
  role: "tooltip",
522
782
  "aria-hidden": !o.value
523
783
  }, [
524
- n.prependIcon ? (r(), c("span", He, v(n.prependIcon), 1)) : f("", !0),
525
- n.text ? (r(), c("span", {
784
+ i.prependIcon ? (c(), u("span", ct, h(i.prependIcon), 1)) : y("", !0),
785
+ i.text ? (c(), u("span", {
526
786
  key: 1,
527
787
  class: "spicyTooltipText",
528
- "aria-label": n.text
529
- }, v(n.text), 9, je)) : f("", !0),
530
- n.appendIcon ? (r(), c("span", Ke, v(n.appendIcon), 1)) : f("", !0)
531
- ], 12, We)) : f("", !0)
788
+ "aria-label": i.text
789
+ }, h(i.text), 9, ut)) : y("", !0),
790
+ i.appendIcon ? (c(), u("span", dt, h(i.appendIcon), 1)) : y("", !0)
791
+ ], 12, rt)) : y("", !0)
532
792
  ], 544));
533
793
  }
534
794
  });
535
- function R(e, t) {
795
+ function N(e, s) {
536
796
  const o = {
537
797
  YYYY: () => e.getFullYear().toString(),
538
798
  MM: () => (e.getMonth() + 1).toString().padStart(2, "0"),
539
799
  DD: () => e.getDate().toString().padStart(2, "0")
540
800
  };
541
- return t.replace(/YYYY|MM|DD/g, (a) => o[a]());
801
+ return s.replace(/YYYY|MM|DD/g, (l) => o[l]());
542
802
  }
543
- function qe(e) {
544
- const [t, o, a] = e.split("-");
545
- return new Date(Number(t), Number(o) - 1, Number(a));
803
+ function yt(e) {
804
+ const [s, o, l] = e.split("-");
805
+ return new Date(Number(s), Number(o) - 1, Number(l));
546
806
  }
547
- function Ge(e, t) {
548
- const o = Math.abs(t.getTime() - e.getTime());
807
+ function ft(e, s) {
808
+ const o = Math.abs(s.getTime() - e.getTime());
549
809
  return Math.ceil(o / (1e3 * 60 * 60 * 24));
550
810
  }
551
- function Je(e, t) {
811
+ function vt(e, s) {
552
812
  const o = new Date(e);
553
- return o.setDate(e.getDate() + t), o;
813
+ return o.setDate(e.getDate() + s), o;
554
814
  }
555
- function Qe(e, t) {
815
+ function ht(e, s) {
556
816
  const o = new Date(e);
557
- return o.setDate(e.getDate() - t), o;
817
+ return o.setDate(e.getDate() - s), o;
558
818
  }
559
- function Ze(e) {
560
- const t = /* @__PURE__ */ new Date();
561
- return e.getDate() === t.getDate() && e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear();
819
+ function mt(e) {
820
+ const s = /* @__PURE__ */ new Date();
821
+ return e.getDate() === s.getDate() && e.getMonth() === s.getMonth() && e.getFullYear() === s.getFullYear();
562
822
  }
563
- function et(e) {
564
- const t = /* @__PURE__ */ new Date();
565
- return t.setDate(t.getDate() - 1), e.getDate() === t.getDate() && e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear();
823
+ function gt(e) {
824
+ const s = /* @__PURE__ */ new Date();
825
+ return s.setDate(s.getDate() - 1), e.getDate() === s.getDate() && e.getMonth() === s.getMonth() && e.getFullYear() === s.getFullYear();
566
826
  }
567
- function tt(e) {
568
- const t = /* @__PURE__ */ new Date();
569
- return t.setDate(t.getDate() + 1), e.getDate() === t.getDate() && e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear();
827
+ function bt(e) {
828
+ const s = /* @__PURE__ */ new Date();
829
+ return s.setDate(s.getDate() + 1), e.getDate() === s.getDate() && e.getMonth() === s.getMonth() && e.getFullYear() === s.getFullYear();
570
830
  }
571
- function ot(e = "YYYY-MM-DD", t = { show: !0, separator: "-" }) {
572
- if (typeof e != "string" || typeof t != "object" || !t.hasOwnProperty("show") || typeof t.show != "boolean")
831
+ function kt(e = "YYYY-MM-DD", s = { show: !0, separator: "-" }) {
832
+ if (typeof e != "string" || typeof s != "object" || !s.hasOwnProperty("show") || typeof s.show != "boolean")
573
833
  throw new Error(
574
834
  'Invalid parameters: Please provide a valid format string and options object with a boolean "show" property.'
575
835
  );
576
- let a = R(/* @__PURE__ */ new Date(), e);
577
- return t.separator && t.separator !== "-" && (a = a.replace(/-/g, t.separator)), t.show ? { value: a, isVisible: !0 } : { value: a, isVisible: !1 };
836
+ let l = N(/* @__PURE__ */ new Date(), e);
837
+ return s.separator && s.separator !== "-" && (l = l.replace(/-/g, s.separator)), s.show ? { value: l, isVisible: !0 } : { value: l, isVisible: !1 };
578
838
  }
579
- const vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
839
+ const Lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
580
840
  __proto__: null,
581
- currentDate: ot,
582
- dateAdd: Je,
583
- dateDiff: Ge,
584
- dateIsToday: Ze,
585
- dateIsTomorrow: tt,
586
- dateIsYesterday: et,
587
- dateSubtract: Qe,
588
- formatDate: R,
589
- parseDate: qe
841
+ currentDate: kt,
842
+ dateAdd: vt,
843
+ dateDiff: ft,
844
+ dateIsToday: mt,
845
+ dateIsTomorrow: bt,
846
+ dateIsYesterday: gt,
847
+ dateSubtract: ht,
848
+ formatDate: N,
849
+ parseDate: yt
590
850
  }, Symbol.toStringTag, { value: "Module" }));
591
- function lt(e) {
592
- const t = /* @__PURE__ */ new WeakMap();
593
- function o(a) {
594
- if (w(a) || typeof a != "object")
595
- return a;
596
- if (t.has(a))
597
- return t.get(a);
598
- const l = Array.isArray(a) ? [] : {};
599
- t.set(a, l);
600
- for (const s in a)
601
- Object.prototype.hasOwnProperty.call(a, s) && (l[s] = o(a[s]));
602
- return l;
851
+ function Ct(e) {
852
+ const s = /* @__PURE__ */ new WeakMap();
853
+ function o(l) {
854
+ if ($(l) || typeof l != "object")
855
+ return l;
856
+ if (s.has(l))
857
+ return s.get(l);
858
+ const t = Array.isArray(l) ? [] : {};
859
+ s.set(l, t);
860
+ for (const a in l)
861
+ Object.prototype.hasOwnProperty.call(l, a) && (t[a] = o(l[a]));
862
+ return t;
603
863
  }
604
864
  return o(e);
605
865
  }
606
- function N(...e) {
607
- const t = {};
866
+ function H(...e) {
867
+ const s = {};
608
868
  return e.forEach((o) => {
609
- if (!w(o)) {
610
- for (const a in o)
611
- if (Object.prototype.hasOwnProperty.call(o, a)) {
612
- const l = o[a];
613
- l !== void 0 && (typeof l == "object" && l !== null && !Array.isArray(l) ? t[a] = N(t[a] || {}, l) : t[a] = l);
869
+ if (!$(o)) {
870
+ for (const l in o)
871
+ if (Object.prototype.hasOwnProperty.call(o, l)) {
872
+ const t = o[l];
873
+ t !== void 0 && (typeof t == "object" && t !== null && !Array.isArray(t) ? s[l] = H(s[l] || {}, t) : s[l] = t);
614
874
  }
615
875
  }
616
- }), t;
876
+ }), s;
617
877
  }
618
- function at(...e) {
619
- return w(e[0]) ? e[0] : Object.assign({}, ...e);
878
+ function St(...e) {
879
+ return $(e[0]) ? e[0] : Object.assign({}, ...e);
620
880
  }
621
- function st(e) {
622
- return w(e) ? [] : Object.keys(e);
881
+ function wt(e) {
882
+ return $(e) ? [] : Object.keys(e);
623
883
  }
624
- function nt(e) {
625
- return w(e) ? [] : Object.values(e);
884
+ function $t(e) {
885
+ return $(e) ? [] : Object.values(e);
626
886
  }
627
- function it(e) {
628
- return w(e) ? [] : Object.entries(e);
887
+ function _t(e) {
888
+ return $(e) ? [] : Object.entries(e);
629
889
  }
630
- function w(e) {
890
+ function $(e) {
631
891
  return e === null || typeof e != "object" ? !1 : Array.isArray(e) ? e.length === 0 : Object.keys(e).length === 0;
632
892
  }
633
- const mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
893
+ const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
634
894
  __proto__: null,
635
- deepClone: lt,
636
- deepMerge: N,
637
- getObjectEntries: it,
638
- getObjectKeys: st,
639
- getObjectValues: nt,
640
- isObjectEmpty: w,
641
- mergeObjects: at
642
- }, Symbol.toStringTag, { value: "Module" }));
643
- function I(e) {
644
- try {
645
- return new URL(e), !0;
646
- } catch (t) {
647
- return console.error("Invalid URL:", t), !1;
895
+ deepClone: Ct,
896
+ deepMerge: H,
897
+ getObjectEntries: _t,
898
+ getObjectKeys: wt,
899
+ getObjectValues: $t,
900
+ isObjectEmpty: $,
901
+ mergeObjects: St
902
+ }, Symbol.toStringTag, { value: "Module" })), Bt = ':root{--skBgColor: #28292a;--skBgSecondaryColor: #424344;--skBorderColor: #515353;--skPrimaryColor: #811faf;--skSecondaryColor: #0066b3;--skAccentColor: #004a77;--skHoverColor: #656769;--skTextColor: #ddd;--disabledOpacity: .5;--skLabelFocus: var(--skPrimaryColor);--skFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif;--skFontSize: 14px;--skFontWeight: 500;--skBorderWidth: 2px;--skBorderRadius: 4px}.spicyText{color:var(--skTextColor);font-family:var(--skFontFamily);font-size:var(--skFontSize)}.spicyHeader{color:var(--skTextColor);font-family:var(--skFontFamily);font-size:24px;font-weight:700}.spicyLink:hover{color:var(--skHoverColor)}.spicyLink:active{color:var(--skPrimaryColor)}.spicyLink:focus{color:var(--skLabelFocus)}.spicyLink:disabled{opacity:var(--disabledOpacity)}', Tt = ".spicyRipple{position:absolute;border-radius:50%;background:currentColor;transform:scale(0);animation:spicy-ripple-animation .6s linear;pointer-events:none;z-index:1}@keyframes spicy-ripple-animation{to{transform:scale(4);opacity:0}}", Dt = {
903
+ mounted(e) {
904
+ e.style.position = "absolute", e.style.cursor = "move";
905
+ let s, o;
906
+ const l = (n) => {
907
+ e.style.left = `${n.pageX - s}px`, e.style.top = `${n.pageY - o}px`;
908
+ }, t = () => {
909
+ document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", t);
910
+ }, a = (n) => {
911
+ s = n.clientX - e.getBoundingClientRect().left, o = n.clientY - e.getBoundingClientRect().top, document.addEventListener("mousemove", l), document.addEventListener("mouseup", t);
912
+ };
913
+ e.addEventListener("mousedown", a);
914
+ const r = e;
915
+ r._cleanup = () => {
916
+ r.removeEventListener("mousedown", a), document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", t);
917
+ };
918
+ },
919
+ unmounted(e) {
920
+ const s = e;
921
+ s._cleanup && s._cleanup();
648
922
  }
649
- }
650
- function rt(e) {
651
- return I(e) ? new URL(e).hostname : null;
652
- }
653
- function ct(e, t) {
654
- if (!I(e)) return e;
655
- const o = new URL(e);
656
- return Object.keys(t).forEach((a) => o.searchParams.append(a, t[a])), o.toString();
657
- }
658
- function ut(e, t, o = "https") {
659
- if (!["http", "https", "ftp", "sftp", "ftps", "ssh"].includes(o.toLowerCase()))
660
- throw new Error("Invalid protocol: " + o);
661
- if (!/^(?!:\/\/)([a-z0-9-]+\.)*[a-z0-9-]+$/i.test(e))
662
- throw new Error("Invalid hostname: " + e);
663
- return t.startsWith("/") || (t = "/" + t), t.endsWith("/") && t.length > 1 && (t = t.slice(0, -1)), t === "/" && (t = ""), `${o.toLowerCase()}://${e}${t}`;
664
- }
665
- const gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
666
- __proto__: null,
667
- appendParamsToUrl: ct,
668
- generateUrl: ut,
669
- getHostname: rt,
670
- isUrlValid: I
671
- }, Symbol.toStringTag, { value: "Module" })), dt = ':root{--skBgColor: #28292a;--skBgSecondaryColor: #424344;--skBorderColor: #515353;--skPrimaryColor: #811faf;--skSecondaryColor: #0066b3;--skAccentColor: #004a77;--skHoverColor: #656769;--skTextColor: #ddd;--disabledOpacity: .5;--skLabelFocus: var(--skPrimaryColor);--skFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif;--skFontSize: 14px;--skFontWeight: 500;--skBorderWidth: 2px;--skBorderRadius: 4px}.spicyText{color:var(--skTextColor);font-family:var(--skFontFamily);font-size:var(--skFontSize)}.spicyHeader{color:var(--skTextColor);font-family:var(--skFontFamily);font-size:24px;font-weight:700}.spicyLink:hover{color:var(--skHoverColor)}.spicyLink:active{color:var(--skPrimaryColor)}.spicyLink:focus{color:var(--skLabelFocus)}.spicyLink:disabled{opacity:var(--disabledOpacity)}', pt = ".spicyRipple{position:absolute;border-radius:50%;background:currentColor;transform:scale(0);animation:spicy-ripple-animation .6s linear;pointer-events:none;z-index:1}@keyframes spicy-ripple-animation{to{transform:scale(4);opacity:0}}", ft = {
923
+ }, Mt = {
672
924
  beforeMount(e) {
673
- e.style.position = "relative", e.style.overflow = "hidden", e.addEventListener("click", (t) => {
674
- const o = document.createElement("span"), a = Math.max(e.clientWidth, e.clientHeight), l = a / 2;
675
- o.style.width = o.style.height = `${a}px`, o.style.left = `${t.clientX - e.getBoundingClientRect().left - l}px`, o.style.top = `${t.clientY - e.getBoundingClientRect().top - l}px`, o.classList.add("spicyRipple");
676
- const s = e.querySelector(".spicyRipple");
677
- s && s.remove(), e.appendChild(o), o.addEventListener("animationend", () => {
925
+ e.style.position = "relative", e.style.overflow = "hidden", e.addEventListener("click", (s) => {
926
+ const o = document.createElement("span"), l = Math.max(e.clientWidth, e.clientHeight), t = l / 2;
927
+ o.style.width = o.style.height = `${l}px`, o.style.left = `${s.clientX - e.getBoundingClientRect().left - t}px`, o.style.top = `${s.clientY - e.getBoundingClientRect().top - t}px`, o.classList.add("spicyRipple");
928
+ const a = e.querySelector(".spicyRipple");
929
+ a && a.remove(), e.appendChild(o), o.addEventListener("animationend", () => {
678
930
  o.remove();
679
931
  });
680
932
  });
681
933
  }
682
- }, bt = {
683
- install(e, t = {}) {
684
- const { useComponents: o = !0, useStyles: a = !0, useDirectives: l = !0 } = t;
685
- if (o && (e.component("SpicyAlert", ne), e.component("SpicyBtn", pe), e.component("SpicyCarousel", _e), e.component("SpicyDivider", Be), e.component("SpicyLabel", Ie), e.component("SpicyModal", Le), e.component("SpicySheet", Ye), e.component("SpicySlider", ze), e.component("SpicyToggle", Ue), e.component("SpicyTooltip", Xe)), a) {
686
- const s = document.createElement("style");
687
- s.id = "SpicyStyles", s.textContent = dt, document.head.appendChild(s);
934
+ }, Vt = {
935
+ install(e, s = {}) {
936
+ const { useComponents: o = !0, useStyles: l = !0, useDirectives: t = !0 } = s;
937
+ if (o && (e.component("SpicyAccordion", re), e.component("SpicyAlert", pe), e.component("SpicyBtn", ge), e.component("SpicyCarousel", Te), e.component("SpicyDivider", De), e.component("SpicyDropdown", Le), e.component("SpicyLabel", Pe), e.component("SpicyModal", xe), e.component("SpicyProgress", je), e.component("SpicySheet", qe), e.component("SpicySlider", Ze), e.component("SpicyTabs", st), e.component("SpicyTextarea", at), e.component("SpicyToggle", it), e.component("SpicyTooltip", pt)), l) {
938
+ const a = document.createElement("style");
939
+ a.id = "SpicyStyles", a.textContent = Bt, document.head.appendChild(a);
688
940
  }
689
- if (l) {
690
- e.directive("spicyRipple", ft);
691
- const s = document.createElement("style");
692
- s.id = "SpicyRippleStyles", s.textContent = pt, document.head.appendChild(s);
941
+ if (t) {
942
+ e.directive("spicyDrag", Dt), e.directive("spicyRipple", Mt);
943
+ const a = document.createElement("style");
944
+ a.id = "SpicyRippleStyles", a.textContent = Tt, document.head.appendChild(a);
693
945
  }
694
946
  }
695
947
  };
696
948
  export {
697
- ne as SpicyAlert,
698
- pe as SpicyBtn,
699
- _e as SpicyCarousel,
700
- Be as SpicyDivider,
701
- bt as SpicyKatsu,
702
- Ie as SpicyLabel,
703
- Le as SpicyModal,
704
- Ye as SpicySheet,
705
- ze as SpicySlider,
706
- Ue as SpicyToggle,
707
- Xe as SpicyTooltip,
708
- ct as appendParamsToUrl,
709
- ot as currentDate,
710
- Je as dateAdd,
711
- Ge as dateDiff,
712
- Ze as dateIsToday,
713
- tt as dateIsTomorrow,
714
- et as dateIsYesterday,
715
- Qe as dateSubtract,
716
- vt as dateUtils,
717
- lt as deepClone,
718
- N as deepMerge,
719
- R as formatDate,
720
- ut as generateUrl,
721
- rt as getHostname,
722
- it as getObjectEntries,
723
- st as getObjectKeys,
724
- nt as getObjectValues,
725
- w as isObjectEmpty,
726
- I as isUrlValid,
727
- at as mergeObjects,
728
- mt as objUtils,
729
- qe as parseDate,
730
- ft as ripple,
731
- gt as urlUtils
949
+ re as SpicyAccordion,
950
+ pe as SpicyAlert,
951
+ ge as SpicyBtn,
952
+ Te as SpicyCarousel,
953
+ De as SpicyDivider,
954
+ Le as SpicyDropdown,
955
+ Vt as SpicyKatsu,
956
+ Pe as SpicyLabel,
957
+ xe as SpicyModal,
958
+ je as SpicyProgress,
959
+ qe as SpicySheet,
960
+ Ze as SpicySlider,
961
+ st as SpicyTabs,
962
+ at as SpicyTextarea,
963
+ it as SpicyToggle,
964
+ pt as SpicyTooltip,
965
+ kt as currentDate,
966
+ vt as dateAdd,
967
+ ft as dateDiff,
968
+ mt as dateIsToday,
969
+ bt as dateIsTomorrow,
970
+ gt as dateIsYesterday,
971
+ ht as dateSubtract,
972
+ Lt as dateUtils,
973
+ Ct as deepClone,
974
+ H as deepMerge,
975
+ N as formatDate,
976
+ _t as getObjectEntries,
977
+ wt as getObjectKeys,
978
+ $t as getObjectValues,
979
+ $ as isObjectEmpty,
980
+ St as mergeObjects,
981
+ At as objUtils,
982
+ yt as parseDate,
983
+ Dt as spicyDrag,
984
+ Mt as spicyRipple
732
985
  };