spicykatsu 0.0.41 → 0.0.42

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 S, openBlock as r, createElementBlock as c, Fragment as B, renderList as O, createElementVNode as p, normalizeClass as k, toDisplayString as v, createCommentVNode as y, createVNode as A, Transition as D, withCtx as M, withDirectives as z, renderSlot as g, vShow as G, watch as x, createBlock as J, withKeys as P, computed as h, resolveDirective as Q, normalizeStyle as C, onMounted as Z, onUnmounted as ee, createTextVNode as E, vModelText as R, mergeProps as W, withModifiers as Y, 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 o = e, s = S(o.defaultOpen || []), l = (a) => {
16
+ if (o.singleOpen)
17
+ s.value = s.value.includes(a) ? [] : [a];
18
+ else {
19
+ const d = s.value.indexOf(a);
20
+ d === -1 ? s.value.push(a) : s.value.splice(d, 1);
21
+ }
22
+ }, t = (a) => s.value.includes(a);
23
+ return (a, d) => (r(), c("div", se, [
24
+ (r(!0), c(B, null, O(a.sections, (n, u) => (r(), c("div", {
25
+ key: u,
26
+ class: "spicyAccordionItem"
27
+ }, [
28
+ p("button", {
29
+ class: k(["spicyAccordionHeader", { open: t(u) }]),
30
+ onClick: (i) => l(u),
31
+ "aria-expanded": t(u)
32
+ }, [
33
+ p("span", null, v(n.title), 1),
34
+ n.icon ? (r(), c("svg", ae, [
35
+ p("path", {
36
+ d: n.icon
37
+ }, null, 8, ne)
38
+ ])) : y("", !0),
39
+ d[0] || (d[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
+ A(D, { name: "fade" }, {
49
+ default: M(() => [
50
+ z(p("div", ie, [
51
+ g(a.$slots, `section-${u}`)
52
+ ], 512), [
53
+ [G, t(u)]
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 = () => {
20
- o.value = !1;
78
+ const o = e, s = S(!0), l = () => {
79
+ s.value = !1;
21
80
  };
22
- return Y(
23
- () => t.autoClose,
24
- (l) => {
25
- l && l > 0 && setTimeout(() => {
26
- a();
27
- }, l);
81
+ return x(
82
+ () => o.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) => (r(), J(D, { name: "fade" }, {
89
+ default: M(() => [
90
+ s.value ? (r(), c("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: P(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 ? (r(), c("span", ue, v(t.icon), 1)) : y("", !0),
99
+ !t.iconOnly && t.text ? (r(), c("span", de, v(t.text), 1)) : y("", !0),
100
+ t.closable ? (r(), c("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
+ }, he = ["d"], ve = {
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: o }) {
140
+ const s = o, l = () => {
141
+ s("click");
142
+ }, t = e, a = h(() => ({
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
+ })), d = h(() => !t.text && (t.icon || t.mdi)), n = h(() => ({
150
+ spicyBtn: !0,
151
+ outlined: t.variant === "outlined",
152
+ disabled: t.disabled,
153
+ isRound: d.value
154
+ }));
155
+ return (u, i) => {
156
+ const f = Q("spicyRipple");
157
+ return z((r(), c("button", {
158
+ class: k(n.value),
159
+ style: C(a.value),
160
+ disabled: u.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": u.text,
164
+ "aria-disabled": u.disabled,
165
+ tabindex: u.disabled ? -1 : 0
100
166
  }, [
101
- s.mdi ? (r(), c("svg", re, [
102
- h("path", {
167
+ u.mdi ? (r(), c("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: u.mdi
172
+ }, null, 8, he)
173
+ ])) : y("", !0),
174
+ u.icon && !u.mdi ? (r(), c("span", ve, v(u.icon), 1)) : y("", !0),
175
+ u.text ? (r(), c("span", me, v(u.text), 1)) : y("", !0),
176
+ g(u.$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" }, Se = { class: "spicyCarouselTitle" }, Ce = { 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);
205
+ let o, s, l = !1;
206
+ const t = e, a = h(() => ({
207
+ "--width": t.width,
208
+ "--height": t.height,
209
+ "--activeColor": t.activeColor
210
+ })), d = h(() => {
211
+ var m;
212
+ return (m = t.slides[u.value]) == null ? void 0 : m.title;
213
+ }), n = h(() => i.value.fullScreen === !1 ? !1 : t.fullScreen), u = S(t.initialSlide), i = h(() => t.slides[u.value]);
214
+ let f;
215
+ const _ = () => {
216
+ u.value = (u.value - 1 + t.slides.length) % t.slides.length;
217
+ }, T = () => {
218
+ u.value = (u.value + 1) % t.slides.length;
219
+ }, K = (m) => {
220
+ u.value = m;
161
221
  }, 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));
222
+ f && clearInterval(f);
223
+ }, F = () => {
224
+ t.autoplay && (f = window.setInterval(T, t.autoplaySpeed));
225
+ }, X = () => {
226
+ window.open(i.value.img);
227
+ }, U = () => {
228
+ t.enableImageClick && X();
229
+ }, j = (m) => {
230
+ o = m.touches[0].clientX, s = m.touches[0].clientY, l = !1;
231
+ }, q = (m) => {
232
+ if (!l) {
233
+ const w = m.touches[0].clientX - o, L = m.touches[0].clientY - s;
234
+ Math.abs(w) > Math.abs(L) && (w > 40 ? (_(), l = !0) : w < -40 && (T(), l = !0));
173
235
  }
174
236
  };
175
- return G(() => {
237
+ return Z(() => {
238
+ F();
239
+ }), ee(() => {
176
240
  V();
177
- }), J(() => {
178
- O();
179
- }), (y, B) => (r(), c("div", {
241
+ }), (m, w) => (r(), c("div", {
180
242
  class: "spicyCarouselWrapper",
181
- style: k({ ...s.value })
243
+ style: C({ ...a.value })
182
244
  }, [
183
- h("div", {
245
+ p("div", {
184
246
  class: "spicyCarouselContainer",
185
- onMouseenter: O,
186
- onMouseleave: V,
247
+ onMouseenter: V,
248
+ onMouseleave: F,
187
249
  onTouchstart: j,
188
- onTouchmove: K
250
+ onTouchmove: q
189
251
  }, [
190
- Q(P, {
252
+ A(D, {
191
253
  name: "slide",
192
254
  mode: "out-in"
193
255
  }, {
194
- default: A(() => [
256
+ default: M(() => [
195
257
  (r(), c("div", {
196
- class: C(["spicyCarouselSlide", { pointCursor: l.enableImageClick }]),
197
- key: d.value,
198
- style: k({ backgroundImage: `url(${n.value.img})` }),
199
- onClick: H
258
+ class: k(["spicyCarouselSlide", { pointCursor: t.enableImageClick }]),
259
+ key: u.value,
260
+ style: C({ backgroundImage: `url(${i.value.img})` }),
261
+ onClick: U
200
262
  }, [
201
- y.slides[d.value].text ? (r(), c("div", {
263
+ m.slides[u.value].text ? (r(), c("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[u.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, v(m.slides[u.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", Se, [
277
+ d.value ? (r(), c("h2", Ce, v(i.value.title), 1)) : y("", !0)
216
278
  ]),
217
- y.showNavigation ? (r(), c("div", me, [
218
- h("button", {
279
+ m.showNavigation ? (r(), c("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 ? (r(), c("div", $e, [
294
+ (r(!0), c(B, null, O(m.slides, (L, I) => (r(), c("button", {
295
+ key: I,
296
+ onClick: (Dt) => K(I),
297
+ class: k(["spicyCarouselPageBtn", { active: I === u.value }])
232
298
  }, [
233
- h("span", $e, v(T + 1), 1)
234
- ], 10, we))), 128))
235
- ])) : f("", !0)
299
+ p("span", Be, v(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 o = e, s = h(() => ({
314
+ width: o.width,
315
+ borderBottom: `${o.height} ${o.variant} ${o.bgColor}`
250
316
  }));
251
- return (a, l) => (r(), c("div", {
317
+ return (l, t) => (r(), c("div", {
252
318
  class: "spicyDivider",
253
- style: k(o.value),
319
+ style: C(s.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"], Ae = /* @__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 o = e, s = S(!1), l = () => {
337
+ s.value = !s.value;
338
+ }, t = h(() => ({
339
+ width: o.width,
340
+ textAlign: o.align
341
+ }));
342
+ return (a, d) => (r(), c("div", {
343
+ class: k(["spicyDropdown", { open: s.value }])
344
+ }, [
345
+ p("button", {
346
+ onClick: l,
347
+ class: "spicyDropdownButton"
348
+ }, [
349
+ a.icon ? (r(), c("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
+ E(" " + v(a.label) + " ", 1),
359
+ a.icon === "" ? (r(), c("svg", {
360
+ key: 1,
361
+ width: a.iconSize,
362
+ height: a.iconSize,
363
+ viewBox: "0 0 24 24",
364
+ class: k(["arrow", { open: s.value }])
365
+ }, d[0] || (d[0] = [
366
+ p("path", { d: "M7 10l5 5 5-5H7z" }, null, -1)
367
+ ]), 10, Oe)) : y("", !0)
368
+ ]),
369
+ A(D, { name: "fade" }, {
370
+ default: M(() => [
371
+ s.value ? (r(), c("div", {
372
+ key: 0,
373
+ class: "spicyDropdownMenu",
374
+ style: C(t.value)
375
+ }, [
376
+ g(a.$slots, "default")
377
+ ], 4)) : y("", !0)
378
+ ]),
379
+ _: 3
380
+ })
381
+ ], 2));
382
+ }
383
+ }), ze = ["aria-label"], Pe = ["placeholder", "aria-label"], Ve = {
261
384
  key: 0,
262
385
  class: "spicyInputError"
263
- }, Ie = /* @__PURE__ */ b({
386
+ }, Fe = /* @__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;
275
- o.value = d.value;
276
- }, s = () => {
277
- a.value = !1;
278
- }, u = () => {
279
- a.value = !0;
396
+ const s = S(e.value), l = S(!1), t = (n) => {
397
+ const u = n.target;
398
+ s.value = u.value;
399
+ }, a = () => {
400
+ l.value = !1;
401
+ }, d = () => {
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, u) => (r(), c("div", {
405
+ class: k(["spicyInputWrapper", [n.variant, { hasValue: s.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
+ }, v(n.label), 9, ze),
411
+ z(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": u[0] || (u[0] = (i) => s.value = i),
416
+ placeholder: n.placeholder,
417
+ onInput: t,
418
+ onBlur: a,
419
+ onFocus: d,
420
+ "aria-label": n.label
421
+ }, null, 42, Pe), [
422
+ [R, s.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 ? (r(), c("span", Ve, v(n.error), 1)) : y("", !0)
303
426
  ], 2));
304
427
  }
305
- }), Oe = { class: "spicyModalHeader" }, Ve = { class: "spicyModalActions" }, Fe = ["onClick"], Le = /* @__PURE__ */ b({
428
+ }), Le = { class: "spicyModalHeader" }, Ye = { class: "spicyModalActions" }, xe = ["onClick"], Ee = /* @__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(() => ({
322
- "--width": o.width,
323
- "--height": o.height,
324
- "--skBorderRadius": o.borderRadius,
325
- "--skBgColor": o.bgColor,
326
- "--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();
443
+ setup(e, { emit: o }) {
444
+ const s = e, l = h(() => ({
445
+ "--width": s.width,
446
+ "--height": s.height,
447
+ "--skBorderRadius": s.borderRadius,
448
+ "--skBgColor": s.bgColor,
449
+ "--skTextColor": s.textColor
450
+ })), t = o, a = () => {
451
+ t("update:visible", !1);
452
+ }, d = (n) => {
453
+ const u = n.target;
454
+ s.closeOnClick && u.classList.contains("spicyModalOverlay") && a();
332
455
  };
333
- return (i, d) => i.visible ? (r(), c("div", {
456
+ return (n, u) => n.visible ? (r(), c("div", {
334
457
  key: 0,
335
458
  class: "spicyModalOverlay",
336
- onClick: u
459
+ onClick: d
337
460
  }, [
338
- h("div", {
461
+ p("div", {
339
462
  class: "spicyModal",
340
- style: k({ ...a.value })
463
+ style: C({ ...l.value })
341
464
  }, [
342
- h("header", Oe, [
343
- m(i.$slots, "spicyModalHeader", {
344
- title: i.modalTitle,
345
- ariaLabel: i.modalTitle
465
+ p("header", Le, [
466
+ g(n.$slots, "spicyModalHeader", {
467
+ title: n.modalTitle,
468
+ ariaLabel: n.modalTitle
346
469
  }, () => [
347
- Z(v(i.modalTitle), 1)
470
+ E(v(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", Ye, [
475
+ g(n.$slots, "spicyModalActions"),
476
+ n.actions.length === 0 && n.closeBtn ? (r(), c("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
+ (r(!0), c(B, null, O(n.actions, (i) => (r(), c("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
+ }, v(i.label), 9, xe))), 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"], Ke = ["stroke-width", "r", "cx", "cy"], Xe = ["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 o = e, s = h(() => Math.round(o.value / o.max * 100)), l = h(() => o.type === "linear"), t = h(() => ({
516
+ width: `${s.value}%`,
517
+ backgroundColor: o.color,
518
+ height: o.height
519
+ })), a = h(() => o.size / 2), d = h(() => (o.size - o.strokeWidth) / 2), n = h(() => 2 * Math.PI * d.value), u = h(() => ({
520
+ strokeDasharray: `${n.value} ${n.value}`,
521
+ strokeDashoffset: `${n.value - s.value / 100 * n.value}`,
522
+ transition: "stroke-dashoffset 400ms ease"
523
+ }));
524
+ return (i, f) => (r(), c(B, null, [
525
+ l.value ? (r(), c("div", Re, [
526
+ p("div", {
527
+ class: "spicyProgressBar",
528
+ style: C(t.value)
529
+ }, null, 4),
530
+ i.showLabel ? (r(), c("div", We, v(s.value) + "%", 1)) : y("", !0)
531
+ ])) : (r(), c("div", Ne, [
532
+ (r(), c("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: d.value,
541
+ cx: a.value,
542
+ cy: a.value
543
+ }, null, 8, Ke),
544
+ p("circle", {
545
+ class: "spicyCircularProgress",
546
+ stroke: i.color,
547
+ "stroke-width": i.strokeWidth,
548
+ r: d.value,
549
+ cx: a.value,
550
+ cy: a.value,
551
+ style: C(u.value)
552
+ }, null, 12, Xe)
553
+ ], 8, He)),
554
+ i.showLabel ? (r(), c("div", Ue, v(s.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 o = e, s = h(() => ({
567
+ "--color": o.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) => (r(), c("div", {
570
+ class: k(["spicySheet", { isRound: l.isRound }]),
571
+ style: C({ ...s.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,100 @@ 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(
397
- () => o.modelValue,
398
- (u) => {
399
- l.value = u;
586
+ setup(e, { emit: o }) {
587
+ const s = e, l = o, t = S(s.modelValue);
588
+ x(
589
+ () => s.modelValue,
590
+ (d) => {
591
+ t.value = d;
400
592
  }
401
593
  );
402
- const s = (u) => {
403
- const i = u.target;
404
- a("update:modelValue", Number(i.value));
594
+ const a = (d) => {
595
+ const n = d.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 (d, n) => (r(), c("div", Ge, [
599
+ d.label ? (r(), c("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": d.label
603
+ }, v(d.label), 9, Je)) : y("", !0),
604
+ z(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: d.min,
609
+ max: d.max,
610
+ step: d.step,
611
+ "onUpdate:modelValue": n[0] || (n[0] = (u) => t.value = u),
612
+ onInput: a
613
+ }, null, 40, Qe), [
614
+ [R, t.value]
423
615
  ]),
424
- m(u.$slots, "default")
616
+ g(d.$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 d;
630
+ const o = e, s = S(((d = o.tabs[0]) == null ? void 0 : d.name) || ""), l = h(() => {
631
+ var n;
632
+ return (n = o.tabs.find((u) => u.name === s.value)) == null ? void 0 : n.name;
633
+ }), t = (n) => {
634
+ s.value = n;
635
+ }, a = h(() => o.layout === "vertical" ? "vertical" : "horizontal");
636
+ return (n, u) => (r(), c("div", {
637
+ class: k(["spicyTabs", a.value])
638
+ }, [
639
+ p("div", et, [
640
+ (r(!0), c(B, null, O(n.tabs, (i) => (r(), c("button", {
641
+ key: i.name,
642
+ class: k(["tabButton", { active: s.value === i.name }]),
643
+ onClick: (f) => t(i.name)
644
+ }, v(i.label), 11, tt))), 128))
645
+ ]),
646
+ A(D, { name: "fade" }, {
647
+ default: M(() => [
648
+ l.value ? (r(), c("div", ot, [
649
+ g(n.$slots, l.value)
650
+ ])) : y("", !0)
651
+ ]),
652
+ _: 3
653
+ })
654
+ ], 2));
655
+ }
656
+ }), lt = /* @__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
+ },
664
+ setup(e) {
665
+ const o = e, s = h(() => ({
666
+ borderRadius: o.isRound ? "16px" : "2px",
667
+ border: o.border,
668
+ padding: o.padding,
669
+ backgroundColor: o.color
670
+ }));
671
+ return (l, t) => (r(), c(B, null, [
672
+ p("textarea", W({
673
+ class: "spicyTextArea",
674
+ style: s.value
675
+ }, l.$attrs), null, 16),
676
+ g(l.$slots, "default")
677
+ ], 64));
678
+ }
679
+ }), at = ["tabindex", "aria-label", "aria-checked", "onKeydown"], nt = /* @__PURE__ */ b({
430
680
  __name: "SpicyToggle",
431
681
  props: {
432
682
  modelValue: { type: Boolean, default: !1 },
@@ -437,34 +687,36 @@ const le = ["aria-label"], ae = {
437
687
  disabled: { type: Boolean, default: !1 }
438
688
  },
439
689
  emits: ["update:modelValue"],
440
- setup(e, { emit: t }) {
441
- const o = e, a = g(() => ({
442
- "--skBorderColor": o.borderColor,
443
- "--activeColor": o.activeColor
444
- })), l = t, s = () => {
445
- l("update:modelValue", !o.modelValue);
690
+ setup(e, { emit: o }) {
691
+ const s = e, l = h(() => ({
692
+ "--skBorderColor": s.borderColor,
693
+ "--activeColor": s.activeColor
694
+ })), t = o, a = () => {
695
+ t("update:modelValue", !s.modelValue);
446
696
  };
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,
697
+ return (d, n) => (r(), c("div", W({
698
+ class: ["spicyToggle", { outlined: d.variant === "outlined", "is-active": d.modelValue }],
699
+ tabindex: d.disabled ? -1 : 0,
450
700
  role: "switch",
451
- style: { ...a.value },
452
- "aria-label": u.label,
453
- "aria-checked": u.modelValue,
454
- onClick: s,
701
+ style: { ...l.value },
702
+ "aria-label": d.label,
703
+ "aria-checked": d.modelValue,
704
+ onClick: a,
455
705
  onKeydown: [
456
- M(L(s, ["prevent"]), ["space"]),
457
- M(L(s, ["prevent"]), ["enter"])
706
+ P(Y(a, ["prevent"]), ["space"]),
707
+ P(Y(a, ["prevent"]), ["enter"])
458
708
  ]
459
- }, u.$attrs), Ne, 16, xe));
709
+ }, d.$attrs), n[0] || (n[0] = [
710
+ p("div", { class: "spicyToggleKnob" }, null, -1)
711
+ ]), 16, at));
460
712
  }
461
- }), We = ["aria-hidden"], He = {
713
+ }), it = ["aria-hidden"], rt = {
462
714
  key: 0,
463
715
  class: "spicyTooltipIcon"
464
- }, je = ["aria-label"], Ke = {
716
+ }, ct = ["aria-label"], ut = {
465
717
  key: 2,
466
718
  class: "spicyTooltipIcon"
467
- }, Xe = /* @__PURE__ */ b({
719
+ }, dt = /* @__PURE__ */ b({
468
720
  __name: "SpicyTooltip",
469
721
  props: {
470
722
  text: { default: "" },
@@ -473,260 +725,231 @@ const le = ["aria-label"], ae = {
473
725
  position: { default: "top" }
474
726
  },
475
727
  setup(e) {
476
- const t = e, o = S(!1), a = S(null), l = te({
728
+ const o = e, s = S(!1), l = S(null), t = te({
477
729
  position: "absolute",
478
730
  top: "0px",
479
731
  left: "0px",
480
732
  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`;
733
+ }), a = (i) => {
734
+ const f = i.right - window.innerWidth;
735
+ f > 0 && (t.left = `${parseInt(t.left) - f - 5}px`), i.left < 0 && (t.left = "5px");
736
+ }, d = {
737
+ top: (i, f) => {
738
+ t.left = `${i.left + (i.width - f.width) / 2}px`, t.top = `${i.top - f.height - 5}px`;
487
739
  },
488
- bottom: (n, p) => {
489
- l.left = `${n.left + (n.width - p.width) / 2}px`, l.top = `${n.bottom + 5}px`;
740
+ bottom: (i, f) => {
741
+ t.left = `${i.left + (i.width - f.width) / 2}px`, t.top = `${i.bottom + 5}px`;
490
742
  },
491
- left: (n, p) => {
492
- l.left = `${n.left - p.width - 5}px`, l.top = `${n.top + (n.height - p.height) / 2}px`;
743
+ left: (i, f) => {
744
+ t.left = `${i.left - f.width - 5}px`, t.top = `${i.top + (i.height - f.height) / 2}px`;
493
745
  },
494
- right: (n, p) => {
495
- l.left = `${n.right + 5}px`, l.top = `${n.top + (n.height - p.height) / 2}px`;
746
+ right: (i, f) => {
747
+ t.left = `${i.right + 5}px`, t.top = `${i.top + (i.height - f.height) / 2}px`;
496
748
  }
497
- }, i = () => {
498
- 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($);
749
+ }, n = () => {
750
+ s.value = !0, oe(() => {
751
+ if (l.value && s.value) {
752
+ const i = l.value.getBoundingClientRect(), f = l.value.querySelector(".spicyTooltip");
753
+ if (f) {
754
+ const _ = f.getBoundingClientRect(), T = d[o.position];
755
+ T(i, _), a(_);
504
756
  }
505
757
  }
506
758
  });
507
- }, d = () => {
508
- o.value = !1;
759
+ }, u = () => {
760
+ s.value = !1;
509
761
  };
510
- return (n, p) => (r(), c("div", {
511
- onMouseover: i,
512
- onMouseleave: d,
762
+ return (i, f) => (r(), c("div", {
763
+ onMouseover: n,
764
+ onMouseleave: u,
513
765
  ref_key: "host",
514
- ref: a
766
+ ref: l
515
767
  }, [
516
- m(n.$slots, "default"),
517
- o.value ? (r(), c("div", {
768
+ g(i.$slots, "default"),
769
+ s.value ? (r(), c("div", {
518
770
  key: 0,
519
771
  class: "spicyTooltip",
520
- style: k(l),
772
+ style: C(t),
521
773
  role: "tooltip",
522
- "aria-hidden": !o.value
774
+ "aria-hidden": !s.value
523
775
  }, [
524
- n.prependIcon ? (r(), c("span", He, v(n.prependIcon), 1)) : f("", !0),
525
- n.text ? (r(), c("span", {
776
+ i.prependIcon ? (r(), c("span", rt, v(i.prependIcon), 1)) : y("", !0),
777
+ i.text ? (r(), c("span", {
526
778
  key: 1,
527
779
  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)
780
+ "aria-label": i.text
781
+ }, v(i.text), 9, ct)) : y("", !0),
782
+ i.appendIcon ? (r(), c("span", ut, v(i.appendIcon), 1)) : y("", !0)
783
+ ], 12, it)) : y("", !0)
532
784
  ], 544));
533
785
  }
534
786
  });
535
- function R(e, t) {
536
- const o = {
787
+ function N(e, o) {
788
+ const s = {
537
789
  YYYY: () => e.getFullYear().toString(),
538
790
  MM: () => (e.getMonth() + 1).toString().padStart(2, "0"),
539
791
  DD: () => e.getDate().toString().padStart(2, "0")
540
792
  };
541
- return t.replace(/YYYY|MM|DD/g, (a) => o[a]());
793
+ return o.replace(/YYYY|MM|DD/g, (l) => s[l]());
542
794
  }
543
- function qe(e) {
544
- const [t, o, a] = e.split("-");
545
- return new Date(Number(t), Number(o) - 1, Number(a));
795
+ function pt(e) {
796
+ const [o, s, l] = e.split("-");
797
+ return new Date(Number(o), Number(s) - 1, Number(l));
546
798
  }
547
- function Ge(e, t) {
548
- const o = Math.abs(t.getTime() - e.getTime());
549
- return Math.ceil(o / (1e3 * 60 * 60 * 24));
799
+ function yt(e, o) {
800
+ const s = Math.abs(o.getTime() - e.getTime());
801
+ return Math.ceil(s / (1e3 * 60 * 60 * 24));
550
802
  }
551
- function Je(e, t) {
552
- const o = new Date(e);
553
- return o.setDate(e.getDate() + t), o;
803
+ function ft(e, o) {
804
+ const s = new Date(e);
805
+ return s.setDate(e.getDate() + o), s;
554
806
  }
555
- function Qe(e, t) {
556
- const o = new Date(e);
557
- return o.setDate(e.getDate() - t), o;
807
+ function ht(e, o) {
808
+ const s = new Date(e);
809
+ return s.setDate(e.getDate() - o), s;
558
810
  }
559
- function Ze(e) {
560
- const t = /* @__PURE__ */ new Date();
561
- return e.getDate() === t.getDate() && e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear();
811
+ function vt(e) {
812
+ const o = /* @__PURE__ */ new Date();
813
+ return e.getDate() === o.getDate() && e.getMonth() === o.getMonth() && e.getFullYear() === o.getFullYear();
562
814
  }
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();
815
+ function mt(e) {
816
+ const o = /* @__PURE__ */ new Date();
817
+ return o.setDate(o.getDate() - 1), e.getDate() === o.getDate() && e.getMonth() === o.getMonth() && e.getFullYear() === o.getFullYear();
566
818
  }
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();
819
+ function gt(e) {
820
+ const o = /* @__PURE__ */ new Date();
821
+ return o.setDate(o.getDate() + 1), e.getDate() === o.getDate() && e.getMonth() === o.getMonth() && e.getFullYear() === o.getFullYear();
570
822
  }
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")
823
+ function bt(e = "YYYY-MM-DD", o = { show: !0, separator: "-" }) {
824
+ if (typeof e != "string" || typeof o != "object" || !o.hasOwnProperty("show") || typeof o.show != "boolean")
573
825
  throw new Error(
574
826
  'Invalid parameters: Please provide a valid format string and options object with a boolean "show" property.'
575
827
  );
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 };
828
+ let l = N(/* @__PURE__ */ new Date(), e);
829
+ return o.separator && o.separator !== "-" && (l = l.replace(/-/g, o.separator)), o.show ? { value: l, isVisible: !0 } : { value: l, isVisible: !1 };
578
830
  }
579
- const vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
831
+ const It = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
580
832
  __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
833
+ currentDate: bt,
834
+ dateAdd: ft,
835
+ dateDiff: yt,
836
+ dateIsToday: vt,
837
+ dateIsTomorrow: gt,
838
+ dateIsYesterday: mt,
839
+ dateSubtract: ht,
840
+ formatDate: N,
841
+ parseDate: pt
590
842
  }, 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;
843
+ function kt(e) {
844
+ const o = /* @__PURE__ */ new WeakMap();
845
+ function s(l) {
846
+ if ($(l) || typeof l != "object")
847
+ return l;
848
+ if (o.has(l))
849
+ return o.get(l);
850
+ const t = Array.isArray(l) ? [] : {};
851
+ o.set(l, t);
852
+ for (const a in l)
853
+ Object.prototype.hasOwnProperty.call(l, a) && (t[a] = s(l[a]));
854
+ return t;
603
855
  }
604
- return o(e);
856
+ return s(e);
605
857
  }
606
- function N(...e) {
607
- const t = {};
608
- 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);
858
+ function H(...e) {
859
+ const o = {};
860
+ return e.forEach((s) => {
861
+ if (!$(s)) {
862
+ for (const l in s)
863
+ if (Object.prototype.hasOwnProperty.call(s, l)) {
864
+ const t = s[l];
865
+ t !== void 0 && (typeof t == "object" && t !== null && !Array.isArray(t) ? o[l] = H(o[l] || {}, t) : o[l] = t);
614
866
  }
615
867
  }
616
- }), t;
868
+ }), o;
617
869
  }
618
- function at(...e) {
619
- return w(e[0]) ? e[0] : Object.assign({}, ...e);
870
+ function St(...e) {
871
+ return $(e[0]) ? e[0] : Object.assign({}, ...e);
620
872
  }
621
- function st(e) {
622
- return w(e) ? [] : Object.keys(e);
873
+ function Ct(e) {
874
+ return $(e) ? [] : Object.keys(e);
623
875
  }
624
- function nt(e) {
625
- return w(e) ? [] : Object.values(e);
876
+ function wt(e) {
877
+ return $(e) ? [] : Object.values(e);
626
878
  }
627
- function it(e) {
628
- return w(e) ? [] : Object.entries(e);
879
+ function $t(e) {
880
+ return $(e) ? [] : Object.entries(e);
629
881
  }
630
- function w(e) {
882
+ function $(e) {
631
883
  return e === null || typeof e != "object" ? !1 : Array.isArray(e) ? e.length === 0 : Object.keys(e).length === 0;
632
884
  }
633
- const mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
634
- __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;
648
- }
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({
885
+ const Ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
666
886
  __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 = {
887
+ deepClone: kt,
888
+ deepMerge: H,
889
+ getObjectEntries: $t,
890
+ getObjectKeys: Ct,
891
+ getObjectValues: wt,
892
+ isObjectEmpty: $,
893
+ mergeObjects: St
894
+ }, Symbol.toStringTag, { value: "Module" })), _t = ':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)}', Bt = ".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}}", Tt = {
672
895
  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", () => {
678
- o.remove();
896
+ e.style.position = "relative", e.style.overflow = "hidden", e.addEventListener("click", (o) => {
897
+ const s = document.createElement("span"), l = Math.max(e.clientWidth, e.clientHeight), t = l / 2;
898
+ s.style.width = s.style.height = `${l}px`, s.style.left = `${o.clientX - e.getBoundingClientRect().left - t}px`, s.style.top = `${o.clientY - e.getBoundingClientRect().top - t}px`, s.classList.add("spicyRipple");
899
+ const a = e.querySelector(".spicyRipple");
900
+ a && a.remove(), e.appendChild(s), s.addEventListener("animationend", () => {
901
+ s.remove();
679
902
  });
680
903
  });
681
904
  }
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);
905
+ }, At = {
906
+ install(e, o = {}) {
907
+ const { useComponents: s = !0, useStyles: l = !0, useDirectives: t = !0 } = o;
908
+ if (s && (e.component("SpicyAccordion", re), e.component("SpicyAlert", pe), e.component("SpicyBtn", ge), e.component("SpicyCarousel", Te), e.component("SpicyDivider", De), e.component("SpicyDropdown", Ae), e.component("SpicyLabel", Fe), e.component("SpicyModal", Ee), e.component("SpicyProgress", je), e.component("SpicySheet", qe), e.component("SpicySlider", Ze), e.component("SpicyTabs", st), e.component("SpicyTextarea", lt), e.component("SpicyToggle", nt), e.component("SpicyTooltip", dt)), l) {
909
+ const a = document.createElement("style");
910
+ a.id = "SpicyStyles", a.textContent = _t, document.head.appendChild(a);
688
911
  }
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);
912
+ if (t) {
913
+ e.directive("spicyRipple", Tt);
914
+ const a = document.createElement("style");
915
+ a.id = "SpicyRippleStyles", a.textContent = Bt, document.head.appendChild(a);
693
916
  }
694
917
  }
695
918
  };
696
919
  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
920
+ re as SpicyAccordion,
921
+ pe as SpicyAlert,
922
+ ge as SpicyBtn,
923
+ Te as SpicyCarousel,
924
+ De as SpicyDivider,
925
+ Ae as SpicyDropdown,
926
+ At as SpicyKatsu,
927
+ Fe as SpicyLabel,
928
+ Ee as SpicyModal,
929
+ je as SpicyProgress,
930
+ qe as SpicySheet,
931
+ Ze as SpicySlider,
932
+ st as SpicyTabs,
933
+ lt as SpicyTextarea,
934
+ nt as SpicyToggle,
935
+ dt as SpicyTooltip,
936
+ bt as currentDate,
937
+ ft as dateAdd,
938
+ yt as dateDiff,
939
+ vt as dateIsToday,
940
+ gt as dateIsTomorrow,
941
+ mt as dateIsYesterday,
942
+ ht as dateSubtract,
943
+ It as dateUtils,
944
+ kt as deepClone,
945
+ H as deepMerge,
946
+ N as formatDate,
947
+ $t as getObjectEntries,
948
+ Ct as getObjectKeys,
949
+ wt as getObjectValues,
950
+ $ as isObjectEmpty,
951
+ St as mergeObjects,
952
+ Ot as objUtils,
953
+ pt as parseDate,
954
+ Tt as ripple
732
955
  };