spicykatsu 0.0.35 → 0.0.37

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,11 @@
1
- import { ref as k, watch as H, openBlock as n, createBlock as j, Transition as _, withCtx as V, createElementBlock as i, normalizeClass as S, withKeys as K, toDisplayString as f, createCommentVNode as p, computed as $, normalizeStyle as I, renderSlot as B, onMounted as X, onUnmounted as R, createVNode as q, createElementVNode as y, Fragment as M, renderList as F, withDirectives as E, vModelCheckbox as G, createTextVNode as U, vModelText as J, mergeProps as Q, withModifiers as Y, reactive as Z, nextTick as ee } from "vue";
2
- const te = ["aria-label"], le = {
1
+ import { ref as w, watch as Y, openBlock as n, createBlock as R, Transition as E, withCtx as U, createElementBlock as s, normalizeClass as k, withKeys as A, toDisplayString as h, createCommentVNode as v, renderSlot as b, computed as C, normalizeStyle as I, onMounted as q, onUnmounted as G, createElementVNode as f, createVNode as J, Fragment as D, renderList as F, withDirectives as _, vModelCheckbox as Q, createTextVNode as W, vModelText as z, mergeProps as Z, withModifiers as N, reactive as ee, nextTick as te } from "vue";
2
+ const le = ["aria-label"], oe = {
3
3
  key: 0,
4
4
  class: "spicyAlertIcon"
5
- }, oe = {
5
+ }, ae = {
6
6
  key: 1,
7
7
  class: "spicyAlertText"
8
- }, ae = {
8
+ }, ne = {
9
9
  __name: "SpicyAlert",
10
10
  props: {
11
11
  variant: {
@@ -20,46 +20,47 @@ const te = ["aria-label"], le = {
20
20
  autoClose: { type: Number, default: 0 }
21
21
  },
22
22
  setup(e) {
23
- const t = e, l = k(!0), a = () => {
23
+ const t = e, l = w(!0), a = () => {
24
24
  l.value = !1;
25
25
  };
26
- return H(
26
+ return Y(
27
27
  () => t.autoClose,
28
28
  (o) => {
29
29
  o > 0 && setTimeout(() => {
30
30
  l.value = !1;
31
31
  }, o);
32
32
  }
33
- ), (o, c) => (n(), j(_, { name: "fade" }, {
34
- default: V(() => [
35
- l.value ? (n(), i("div", {
33
+ ), (o, r) => (n(), R(E, { name: "fade" }, {
34
+ default: U(() => [
35
+ l.value ? (n(), s("div", {
36
36
  key: 0,
37
- class: S(["spicyAlert", e.variant]),
37
+ class: k(["spicyAlert", e.variant]),
38
38
  "aria-atomic": "true",
39
39
  "aria-label": e.text,
40
40
  role: "alert",
41
- onKeydown: K(a, ["enter"])
41
+ onKeydown: A(a, ["enter"])
42
42
  }, [
43
- e.iconOnly || e.text ? (n(), i("span", le, f(e.icon), 1)) : p("", !0),
44
- !e.iconOnly && e.text ? (n(), i("span", oe, f(e.text), 1)) : p("", !0),
45
- e.closable ? (n(), i("button", {
43
+ e.iconOnly || e.text ? (n(), s("span", oe, h(e.icon), 1)) : v("", !0),
44
+ !e.iconOnly && e.text ? (n(), s("span", ae, h(e.text), 1)) : v("", !0),
45
+ e.closable ? (n(), s("button", {
46
46
  key: 2,
47
47
  class: "spicyAlertCloseBtn",
48
48
  onClick: a,
49
49
  "aria-label": "Close alert"
50
- }, " X ")) : p("", !0)
51
- ], 42, te)) : p("", !0)
50
+ }, " X ")) : v("", !0),
51
+ b(o.$slots, "default")
52
+ ], 42, le)) : v("", !0)
52
53
  ]),
53
- _: 1
54
+ _: 3
54
55
  }));
55
56
  }
56
- }, ne = ["disabled", "aria-label", "aria-disabled"], se = {
57
+ }, se = ["disabled", "aria-label", "aria-disabled", "tabindex"], ie = {
57
58
  key: 0,
58
59
  class: "spicyBtnIcon"
59
- }, ie = {
60
+ }, re = {
60
61
  key: 1,
61
62
  class: "spicyBtnText"
62
- }, re = {
63
+ }, ce = {
63
64
  __name: "SpicyBtn",
64
65
  props: {
65
66
  variant: {
@@ -80,7 +81,7 @@ const te = ["aria-label"], le = {
80
81
  },
81
82
  emits: ["click"],
82
83
  setup(e, { emit: t }) {
83
- const l = e, a = $(() => ({
84
+ const l = e, a = C(() => ({
84
85
  "--skFontSize": l.fontSize,
85
86
  "--skFontWeight": l.fontWeight,
86
87
  "--skBgColor": l.bgColor,
@@ -88,141 +89,166 @@ const te = ["aria-label"], le = {
88
89
  "--skBorderColor": l.borderColor,
89
90
  "--hoverColor": l.hoverColor
90
91
  }));
91
- return (o, c) => (n(), i("button", {
92
- class: S(["spicyBtn", { outlined: e.variant === "outlined", disabled: e.disabled }]),
92
+ return (o, r) => (n(), s("button", {
93
+ class: k(["spicyBtn", { outlined: e.variant === "outlined", disabled: e.disabled }]),
93
94
  style: I({ ...a.value }),
94
95
  disabled: e.disabled,
95
- onClick: c[0] || (c[0] = (v) => o.$emit("click")),
96
+ onClick: r[0] || (r[0] = (d) => o.$emit("click")),
96
97
  role: "button",
97
98
  "aria-label": e.text,
98
- "aria-disabled": e.disabled
99
+ "aria-disabled": e.disabled,
100
+ tabindex: e.disabled ? -1 : 0
99
101
  }, [
100
- e.icon ? (n(), i("span", se, f(e.icon), 1)) : p("", !0),
101
- e.text ? (n(), i("span", ie, f(e.text), 1)) : p("", !0),
102
- B(o.$slots, "default")
103
- ], 14, ne));
102
+ e.icon ? (n(), s("span", ie, h(e.icon), 1)) : v("", !0),
103
+ e.text ? (n(), s("span", re, h(e.text), 1)) : v("", !0),
104
+ b(o.$slots, "default")
105
+ ], 14, se));
104
106
  }
105
- }, ce = ["aria-label"], ue = { class: "spicyCarouselInfoText" }, de = {
107
+ }, ue = { class: "spicyCarouselWrapper" }, de = ["aria-label"], ye = { class: "spicyCarouselInfoText" }, pe = { class: "spicyCarouselTitle" }, fe = { key: 0 }, ve = {
106
108
  key: 0,
107
109
  class: "spicyCarouselNavControls"
108
- }, ye = /* @__PURE__ */ y("span", { class: "spicyCarouselPrevBtnIcon" }, "<", -1), pe = [
109
- ye
110
- ], fe = /* @__PURE__ */ y("span", { class: "spicyCarouselNextBtnIcon" }, ">", -1), ve = [
111
- fe
112
- ], ge = {
110
+ }, he = /* @__PURE__ */ f("span", { class: "spicyCarouselPrevBtnIcon" }, "<", -1), ge = [
111
+ he
112
+ ], me = /* @__PURE__ */ f("span", { class: "spicyCarouselNextBtnIcon" }, ">", -1), be = [
113
+ me
114
+ ], Se = {
113
115
  key: 1,
114
116
  class: "spicyCarouselPagination"
115
- }, he = ["onClick"], be = { class: "spicyCarouselPage" }, me = {
117
+ }, Ce = ["onClick"], ke = { class: "spicyCarouselPage" }, we = {
116
118
  __name: "SpicyCarousel",
117
119
  props: {
118
120
  autoplay: { type: Boolean, default: !1 },
119
121
  autoplaySpeed: { type: Number, default: 5e3 },
120
122
  showNavigation: { type: Boolean, default: !0 },
121
123
  showPagination: { type: Boolean, default: !0 },
122
- activeColor: { type: String, default: "rgba(0, 255, 234, 0.5)" },
124
+ activeColor: { type: String, default: "#00ffea80" },
123
125
  loop: { type: Boolean, default: !0 },
124
126
  initialSlide: { type: Number, default: 0 },
125
127
  slides: { type: Array, required: !0 },
126
- width: { type: String, default: "540px" },
127
- height: { type: String, default: "300px" },
128
+ width: { type: String, default: "580px" },
129
+ height: { type: String, default: "360px" },
128
130
  fullScreen: { type: Boolean, default: !1 },
129
131
  enableImageClick: { type: Boolean, default: !1 }
130
132
  },
131
133
  setup(e) {
132
134
  let t, l, a = !1;
133
- const o = e, c = $(() => ({
135
+ const o = e, r = C(() => ({
134
136
  "--width": o.width,
135
137
  "--height": o.height,
136
138
  "--activeColor": o.activeColor
137
- })), v = $(() => g.value.fullScreen === !1 ? !1 : o.fullScreen), r = k(o.initialSlide), g = $(() => o.slides[r.value]);
138
- let s;
139
- const d = () => {
140
- r.value = (r.value - 1 + o.slides.length) % o.slides.length;
141
- }, u = () => {
142
- r.value = (r.value + 1) % o.slides.length;
143
- }, D = (m) => {
144
- r.value = m;
145
- }, h = () => {
146
- clearInterval(s);
147
- }, w = () => {
148
- o.autoplay && (s = setInterval(u, o.autoplaySpeed));
139
+ })), d = C(() => o.slides[u.value].title), y = C(() => i.value.fullScreen === !1 ? !1 : o.fullScreen), u = w(o.initialSlide), i = C(() => o.slides[u.value]);
140
+ let c;
141
+ const p = () => {
142
+ u.value = (u.value - 1 + o.slides.length) % o.slides.length;
143
+ }, $ = () => {
144
+ u.value = (u.value + 1) % o.slides.length;
145
+ }, g = (S) => {
146
+ u.value = S;
147
+ }, B = () => {
148
+ clearInterval(c);
149
+ }, T = () => {
150
+ o.autoplay && (c = setInterval($, o.autoplaySpeed));
149
151
  }, x = () => {
150
- window.open(g.value.img);
151
- }, C = () => {
152
+ window.open(i.value.img);
153
+ }, m = () => {
152
154
  o.enableImageClick && x();
153
- }, b = (m) => {
154
- t = m.touches[0].clientX, l = m.touches[0].clientY, a = !1;
155
- }, O = (m) => {
155
+ }, O = (S) => {
156
+ t = S.touches[0].clientX, l = S.touches[0].clientY, a = !1;
157
+ }, X = (S) => {
156
158
  if (!a) {
157
- const P = m.touches[0].clientX - t, N = m.touches[0].clientY - l;
158
- Math.abs(P) > Math.abs(N) && (P > 40 ? (d(), a = !0) : P < -40 && (u(), a = !0));
159
+ const P = S.touches[0].clientX - t, L = S.touches[0].clientY - l;
160
+ Math.abs(P) > Math.abs(L) && (P > 40 ? (p(), a = !0) : P < -40 && ($(), a = !0));
159
161
  }
160
162
  };
161
- return X(() => {
162
- o.autoplay && (s = setInterval(u, o.autoplaySpeed));
163
- }), R(() => {
164
- clearInterval(s);
165
- }), (m, P) => (n(), i("div", {
166
- class: "spicyCarouselContainer",
167
- style: I({ ...c.value }),
168
- onMouseenter: h,
169
- onMouseleave: w,
170
- onTouchstart: b,
171
- onTouchmove: O
172
- }, [
173
- q(_, {
174
- name: "slide",
175
- mode: "out-in"
176
- }, {
177
- default: V(() => [
178
- (n(), i("div", {
179
- class: S(["spicyCarouselSlide", { pointCursor: o.enableImageClick }]),
180
- key: r.value,
181
- style: I({ backgroundImage: `url(${g.value.img})` }),
182
- onClick: C
183
- }, [
184
- e.slides[r.value].text ? (n(), i("div", {
185
- key: 0,
186
- class: S(["spicyCarouselTextOverlay", { fullScreen: v.value }]),
187
- "aria-label": e.slides[r.value].text
163
+ return q(() => {
164
+ o.autoplay && (c = setInterval($, o.autoplaySpeed));
165
+ }), G(() => {
166
+ clearInterval(c);
167
+ }), (S, P) => (n(), s("div", ue, [
168
+ f("div", {
169
+ class: "spicyCarouselContainer",
170
+ style: I({ ...r.value }),
171
+ onMouseenter: B,
172
+ onMouseleave: T,
173
+ onTouchstart: O,
174
+ onTouchmove: X
175
+ }, [
176
+ J(E, {
177
+ name: "slide",
178
+ mode: "out-in"
179
+ }, {
180
+ default: U(() => [
181
+ (n(), s("div", {
182
+ class: k(["spicyCarouselSlide", { pointCursor: o.enableImageClick }]),
183
+ key: u.value,
184
+ style: I({ backgroundImage: `url(${i.value.img})` }),
185
+ onClick: m
188
186
  }, [
189
- y("span", ue, f(e.slides[r.value].text), 1)
190
- ], 10, ce)) : p("", !0),
191
- B(m.$slots, "default")
192
- ], 6))
193
- ]),
194
- _: 3
195
- }),
196
- e.showNavigation ? (n(), i("div", de, [
197
- y("div", { class: "spicyCarouselPrevNav" }, [
198
- y("button", {
199
- class: "spicyCarouselPrevBtn",
200
- onClick: d
201
- }, pe)
202
- ]),
203
- y("div", { class: "spicyCarouselNextNav" }, [
204
- y("button", {
205
- class: "spicyCarouselNextBtn",
206
- onClick: u
207
- }, ve)
208
- ])
209
- ])) : p("", !0),
210
- e.showPagination ? (n(), i("div", ge, [
211
- (n(!0), i(M, null, F(e.slides, (N, A) => (n(), i("button", {
212
- key: A,
213
- onClick: (it) => D(A),
214
- class: S(["spicyCarouselPageBtn", { active: A === r.value }])
187
+ e.slides[u.value].text ? (n(), s("div", {
188
+ key: 0,
189
+ class: k(["spicyCarouselTextOverlay", { fullScreen: y.value }]),
190
+ "aria-label": e.slides[u.value].text
191
+ }, [
192
+ f("span", ye, h(e.slides[u.value].text), 1)
193
+ ], 10, de)) : v("", !0),
194
+ b(S.$slots, "default")
195
+ ], 6))
196
+ ]),
197
+ _: 3
198
+ })
199
+ ], 36),
200
+ f("div", pe, [
201
+ d.value ? (n(), s("h2", fe, h(i.value.title), 1)) : v("", !0)
202
+ ]),
203
+ e.showNavigation ? (n(), s("div", ve, [
204
+ f("button", {
205
+ class: "spicyCarouselPrevBtn",
206
+ onClick: p
207
+ }, ge),
208
+ f("button", {
209
+ class: "spicyCarouselNextBtn",
210
+ onClick: $
211
+ }, be)
212
+ ])) : v("", !0),
213
+ e.showPagination ? (n(), s("div", Se, [
214
+ (n(!0), s(D, null, F(e.slides, (L, V) => (n(), s("button", {
215
+ key: V,
216
+ onClick: (ht) => g(V),
217
+ class: k(["spicyCarouselPageBtn", { active: V === u.value }])
215
218
  }, [
216
- y("span", be, f(A + 1), 1)
217
- ], 10, he))), 128))
218
- ])) : p("", !0)
219
- ], 36));
219
+ f("span", ke, h(V + 1), 1)
220
+ ], 10, Ce))), 128))
221
+ ])) : v("", !0)
222
+ ]));
223
+ }
224
+ }, $e = {
225
+ __name: "SpicyDivider",
226
+ props: {
227
+ variant: { type: String, default: "solid", validator: (e) => ["solid", "dashed"].includes(e) },
228
+ width: { type: String, default: "100%" },
229
+ height: { type: String, default: "1px" },
230
+ bgColor: { type: String, default: "var(--skBgColor)" }
231
+ },
232
+ setup(e) {
233
+ const t = e, l = C(() => ({
234
+ width: t.width,
235
+ height: t.height,
236
+ borderBottom: `${t.height} ${t.variant} ${t.bgColor}`
237
+ }));
238
+ return (a, o) => (n(), s("div", {
239
+ class: "spicyDivider",
240
+ style: I(l.value),
241
+ role: "separator",
242
+ "aria-orientation": "horizontal"
243
+ }, [
244
+ b(a.$slots, "default")
245
+ ], 4));
220
246
  }
221
- }, Se = { class: "kbContainer" }, Ce = { class: "kbSidebar" }, ke = ["onUpdate:modelValue"], we = { class: "spicyKB" }, xe = ["onMousedown", "onTouchstart", "onClick"], $e = { class: "keyText" }, Be = {
247
+ }, xe = { class: "kbContainer" }, Be = { class: "kbSidebar" }, Te = ["onUpdate:modelValue"], Me = { class: "spicyKB" }, De = ["onMousedown", "onTouchstart", "onClick"], Fe = { class: "keyText" }, Ie = {
222
248
  __name: "SpicyKeyboard",
223
249
  emits: ["input"],
224
250
  setup(e, { emit: t }) {
225
- const l = k(null), a = k([
251
+ const l = w(null), a = w([
226
252
  {
227
253
  label: "Function Keys",
228
254
  visible: !1,
@@ -279,15 +305,15 @@ const te = ["aria-label"], le = {
279
305
  ["0", "."]
280
306
  ]
281
307
  }
282
- ]), o = $(
283
- () => a.value.filter((u) => u.visible).map((u) => u)
284
- ), c = t, v = (u) => {
285
- l.value = u;
286
- }, r = () => {
308
+ ]), o = C(
309
+ () => a.value.filter((p) => p.visible).map((p) => p)
310
+ ), r = t, d = (p) => {
311
+ l.value = p;
312
+ }, y = () => {
287
313
  l.value = null;
288
- }, g = (u) => {
289
- c("input", u);
290
- }, s = (u) => [
314
+ }, u = (p) => {
315
+ r("input", p);
316
+ }, i = (p) => [
291
317
  "Backspace",
292
318
  "Tab",
293
319
  "Caps",
@@ -305,60 +331,60 @@ const te = ["aria-label"], le = {
305
331
  "PgUp",
306
332
  "PgDn",
307
333
  "NumLock"
308
- ].includes(u) ? `key-${u.toLowerCase()}` : "", d = (u, D, h) => {
309
- const w = (C) => ["Backspace", "Tab", "Caps", "Enter", "Shift", "Space"].includes(C), x = (C) => ["Ctrl", "Win", "Alt", "Fn"].includes(C);
310
- return w(u) ? "key-wide" : x(u) ? "key-small" : D[h].length === 1 ? "key-fullwidth" : "";
334
+ ].includes(p) ? `key-${p.toLowerCase()}` : "", c = (p, $, g) => {
335
+ const B = (x) => ["Backspace", "Tab", "Caps", "Enter", "Shift", "Space"].includes(x), T = (x) => ["Ctrl", "Win", "Alt", "Fn"].includes(x);
336
+ return B(p) ? "key-wide" : T(p) ? "key-small" : $[g].length === 1 ? "key-fullwidth" : "";
311
337
  };
312
- return (u, D) => (n(), i("div", Se, [
313
- y("div", Ce, [
314
- (n(!0), i(M, null, F(a.value, (h, w) => (n(), i("div", {
338
+ return (p, $) => (n(), s("div", xe, [
339
+ f("div", Be, [
340
+ (n(!0), s(D, null, F(a.value, (g, B) => (n(), s("div", {
315
341
  class: "sidebar",
316
- key: w
342
+ key: B
317
343
  }, [
318
- y("label", null, [
319
- E(y("input", {
344
+ f("label", null, [
345
+ _(f("input", {
320
346
  type: "checkbox",
321
- "onUpdate:modelValue": (x) => h.visible = x
322
- }, null, 8, ke), [
323
- [G, h.visible]
347
+ "onUpdate:modelValue": (T) => g.visible = T
348
+ }, null, 8, Te), [
349
+ [Q, g.visible]
324
350
  ]),
325
- U(" " + f(h.label), 1)
351
+ W(" " + h(g.label), 1)
326
352
  ])
327
353
  ]))), 128))
328
354
  ]),
329
- y("div", we, [
330
- (n(!0), i(M, null, F(o.value, (h, w) => (n(), i("div", {
331
- class: S(["kbSection", { [h.label.toLowerCase().replace(/\s+/g, "")]: !0 }]),
332
- key: w
355
+ f("div", Me, [
356
+ (n(!0), s(D, null, F(o.value, (g, B) => (n(), s("div", {
357
+ class: k(["kbSection", { [g.label.toLowerCase().replace(/\s+/g, "")]: !0 }]),
358
+ key: B
333
359
  }, [
334
- (n(!0), i(M, null, F(h.layout, (x, C) => (n(), i("div", {
360
+ (n(!0), s(D, null, F(g.layout, (T, x) => (n(), s("div", {
335
361
  class: "spicyKBRow",
336
- key: C
362
+ key: x
337
363
  }, [
338
- (n(!0), i(M, null, F(x, (b) => (n(), i("button", {
339
- key: b,
340
- class: S(["spicyKBKey", [
341
- { "is-active": l.value === b },
342
- s(b),
343
- d(b, h.layout, C)
364
+ (n(!0), s(D, null, F(T, (m) => (n(), s("button", {
365
+ key: m,
366
+ class: k(["spicyKBKey", [
367
+ { "is-active": l.value === m },
368
+ i(m),
369
+ c(m, g.layout, x)
344
370
  ]]),
345
- onMousedown: (O) => v(b),
346
- onMouseup: r,
347
- onTouchstart: (O) => v(b),
348
- onTouchend: r,
349
- onClick: (O) => g(b)
371
+ onMousedown: (O) => d(m),
372
+ onMouseup: y,
373
+ onTouchstart: (O) => d(m),
374
+ onTouchend: y,
375
+ onClick: (O) => u(m)
350
376
  }, [
351
- y("span", $e, f(b), 1)
352
- ], 42, xe))), 128))
377
+ f("span", Fe, h(m), 1)
378
+ ], 42, De))), 128))
353
379
  ]))), 128))
354
380
  ], 2))), 128))
355
381
  ])
356
382
  ]));
357
383
  }
358
- }, Te = { class: "spicyInputLabel" }, Me = ["placeholder", "aria-label"], Fe = {
384
+ }, Oe = { class: "spicyInputLabel" }, Pe = ["placeholder", "aria-label"], Ve = {
359
385
  key: 0,
360
386
  class: "spicyInputError"
361
- }, De = {
387
+ }, Ae = {
362
388
  __name: "SpicyLabel",
363
389
  props: {
364
390
  value: { type: String, default: "" },
@@ -372,33 +398,33 @@ const te = ["aria-label"], le = {
372
398
  }
373
399
  },
374
400
  setup(e) {
375
- const l = k(e.value), a = k(!1), o = (r) => {
376
- l.value = r.target.value;
377
- }, c = () => {
401
+ const l = w(e.value), a = w(!1), o = (y) => {
402
+ l.value = y.target.value;
403
+ }, r = () => {
378
404
  a.value = !1;
379
- }, v = () => {
405
+ }, d = () => {
380
406
  a.value = !0;
381
407
  };
382
- return (r, g) => (n(), i("div", {
383
- class: S(["spicyInputWrapper", [e.variant, { hasValue: l.value || e.value, hasFocus: a.value, hasError: e.error }]])
408
+ return (y, u) => (n(), s("div", {
409
+ class: k(["spicyInputWrapper", [e.variant, { hasValue: l.value || e.value, hasFocus: a.value, hasError: e.error }]])
384
410
  }, [
385
- y("label", Te, f(e.label), 1),
386
- E(y("input", {
387
- class: S(["spicyInput", e.variant]),
388
- "onUpdate:modelValue": g[0] || (g[0] = (s) => l.value = s),
411
+ f("label", Oe, h(e.label), 1),
412
+ _(f("input", {
413
+ class: k(["spicyInput", e.variant]),
414
+ "onUpdate:modelValue": u[0] || (u[0] = (i) => l.value = i),
389
415
  placeholder: e.placeholder,
390
416
  onInput: o,
391
- onBlur: c,
392
- onFocus: v,
417
+ onBlur: r,
418
+ onFocus: d,
393
419
  "aria-label": e.label
394
- }, null, 42, Me), [
395
- [J, l.value]
420
+ }, null, 42, Pe), [
421
+ [z, l.value]
396
422
  ]),
397
- B(r.$slots, "default"),
398
- e.error ? (n(), i("span", Fe, f(e.error), 1)) : p("", !0)
423
+ b(y.$slots, "default"),
424
+ e.error ? (n(), s("span", Ve, h(e.error), 1)) : v("", !0)
399
425
  ], 2));
400
426
  }
401
- }, Ie = { class: "spicyModalHeader" }, Oe = { class: "spicyModalActions" }, Pe = ["onClick"], Ae = {
427
+ }, _e = { class: "spicyModalHeader" }, Ke = { class: "spicyModalActions" }, Le = ["onClick"], Ne = {
402
428
  __name: "SpicyModal",
403
429
  props: {
404
430
  width: { type: String, default: "50%" },
@@ -413,50 +439,90 @@ const te = ["aria-label"], le = {
413
439
  },
414
440
  emits: ["update:visible"],
415
441
  setup(e, { emit: t }) {
416
- const l = e, a = $(() => ({
442
+ const l = e, a = C(() => ({
417
443
  "--width": l.width,
418
444
  "--height": l.height,
419
445
  "--skBorderRadius": l.borderRadius,
420
446
  "--skBgColor": l.bgColor
421
- })), o = t, c = () => {
447
+ })), o = t, r = () => {
422
448
  o("update:visible", !1);
423
- }, v = (r) => {
424
- l.closeOnClick && r.target.classList.contains("spicyModalOverlay") && c();
449
+ }, d = (y) => {
450
+ l.closeOnClick && y.target.classList.contains("spicyModalOverlay") && r();
425
451
  };
426
- return (r, g) => e.visible ? (n(), i("div", {
452
+ return (y, u) => e.visible ? (n(), s("div", {
427
453
  key: 0,
428
454
  class: "spicyModalOverlay",
429
- onClick: v
455
+ onClick: d
430
456
  }, [
431
- y("div", {
457
+ f("div", {
432
458
  class: "spicyModal",
433
459
  style: I({ ...a.value })
434
460
  }, [
435
- y("header", Ie, [
436
- B(r.$slots, "spicyModalHeader", { title: e.modalTitle }, () => [
437
- U(f(e.modalTitle), 1)
461
+ f("header", _e, [
462
+ b(y.$slots, "spicyModalHeader", { title: e.modalTitle }, () => [
463
+ W(h(e.modalTitle), 1)
438
464
  ])
439
465
  ]),
440
- B(r.$slots, "default"),
441
- y("div", Oe, [
442
- B(r.$slots, "spicyModalActions"),
443
- e.actions.length === 0 && e.closeBtn ? (n(), i("button", {
466
+ b(y.$slots, "default"),
467
+ f("div", Ke, [
468
+ b(y.$slots, "spicyModalActions"),
469
+ e.actions.length === 0 && e.closeBtn ? (n(), s("button", {
444
470
  key: 0,
445
471
  class: "spicyModalCloseBtn spicyModalActionBtn",
446
- onClick: c
447
- }, " Close ")) : p("", !0),
448
- (n(!0), i(M, null, F(e.actions, (s) => (n(), i("button", {
472
+ onClick: r
473
+ }, " Close ")) : v("", !0),
474
+ (n(!0), s(D, null, F(e.actions, (i) => (n(), s("button", {
449
475
  class: "spicyModalExtraBtn spicyModalActionBtn",
450
- key: s.label,
451
- onClick: s.handler
452
- }, f(s.label), 9, Pe))), 128))
476
+ key: i.label,
477
+ onClick: i.handler
478
+ }, h(i.label), 9, Le))), 128))
453
479
  ])
454
480
  ], 4)
455
- ])) : p("", !0);
481
+ ])) : v("", !0);
482
+ }
483
+ }, Ye = { class: "spicySlider" }, Ee = {
484
+ key: 0,
485
+ class: "spicySliderLabel"
486
+ }, Ue = ["min", "max", "step"], We = {
487
+ __name: "SpicySlider",
488
+ props: {
489
+ min: { type: Number, default: 0 },
490
+ max: { type: Number, default: 100 },
491
+ step: { type: Number, default: 1 },
492
+ label: { type: String, default: "" },
493
+ modelValue: { type: Number, default: 0 }
494
+ },
495
+ emits: ["update:modelValue"],
496
+ setup(e, { emit: t }) {
497
+ const l = e, a = t, o = w(l.modelValue);
498
+ Y(
499
+ () => l.modelValue,
500
+ (d) => {
501
+ o.value = d;
502
+ }
503
+ );
504
+ const r = (d) => {
505
+ a("update:modelValue", Number(d.target.value));
506
+ };
507
+ return (d, y) => (n(), s("div", Ye, [
508
+ e.label ? (n(), s("label", Ee, h(e.label), 1)) : v("", !0),
509
+ _(f("input", {
510
+ class: "spicySliderInput",
511
+ type: "range",
512
+ min: e.min,
513
+ max: e.max,
514
+ step: e.step,
515
+ "onUpdate:modelValue": y[0] || (y[0] = (u) => o.value = u),
516
+ onInput: r
517
+ }, null, 40, Ue), [
518
+ [z, o.value]
519
+ ]),
520
+ b(d.$slots, "default")
521
+ ]));
456
522
  }
457
- }, Ke = ["aria-label", "aria-checked", "onKeydown"], Le = /* @__PURE__ */ y("div", { class: "spicyToggleKnob" }, null, -1), Ne = [
458
- Le
459
- ], Ye = {
523
+ }, ze = ["tabindex", "aria-label", "aria-checked", "onKeydown"], He = /* @__PURE__ */ f("div", { class: "spicyToggleKnob" }, null, -1), je = [
524
+ He
525
+ ], Xe = {
460
526
  __name: "SpicyToggle",
461
527
  props: {
462
528
  modelValue: Boolean,
@@ -477,33 +543,33 @@ const te = ["aria-label"], le = {
477
543
  },
478
544
  emits: ["update:modelValue"],
479
545
  setup(e, { emit: t }) {
480
- const l = e, a = $(() => ({
546
+ const l = e, a = C(() => ({
481
547
  "--skBorderColor": l.borderColor,
482
548
  "--activeColor": l.activeColor
483
- })), o = t, c = () => {
549
+ })), o = t, r = () => {
484
550
  o("update:modelValue", !l.modelValue);
485
551
  };
486
- return (v, r) => (n(), i("div", Q({
552
+ return (d, y) => (n(), s("div", Z({
487
553
  class: ["spicyToggle", { outlined: e.variant === "outlined", "is-active": e.modelValue }],
488
- tabindex: "0",
554
+ tabindex: d.disabled ? -1 : 0,
489
555
  role: "switch",
490
556
  style: { ...a.value },
491
557
  "aria-label": e.label,
492
558
  "aria-checked": e.modelValue.toString(),
493
- onClick: c,
559
+ onClick: r,
494
560
  onKeydown: [
495
- K(Y(c, ["prevent"]), ["space"]),
496
- K(Y(c, ["prevent"]), ["enter"])
561
+ A(N(r, ["prevent"]), ["space"]),
562
+ A(N(r, ["prevent"]), ["enter"])
497
563
  ]
498
- }, v.$attrs), Ne, 16, Ke));
564
+ }, d.$attrs), je, 16, ze));
499
565
  }
500
- }, _e = ["aria-hidden"], Ve = {
566
+ }, Re = ["aria-hidden"], qe = {
501
567
  key: 0,
502
568
  class: "spicyTooltipIcon"
503
- }, Ee = ["aria-label"], Ue = {
569
+ }, Ge = ["aria-label"], Je = {
504
570
  key: 2,
505
571
  class: "spicyTooltipIcon"
506
- }, We = {
572
+ }, Qe = {
507
573
  __name: "SpicyTooltip",
508
574
  props: {
509
575
  text: String,
@@ -516,63 +582,63 @@ const te = ["aria-label"], le = {
516
582
  }
517
583
  },
518
584
  setup(e) {
519
- const t = e, l = k(!1), a = k(null), o = Z({
585
+ const t = e, l = w(!1), a = w(null), o = ee({
520
586
  position: "absolute",
521
587
  top: "0px",
522
588
  left: "0px",
523
589
  maxWidth: "175px"
524
- }), c = (s) => {
525
- const d = s.right - window.innerWidth;
526
- d > 0 && (o.left = `${parseInt(o.left) - d - 5}px`), s.left < 0 && (o.left = "5px");
527
- }, v = {
528
- top: (s, d) => {
529
- o.left = `${s.left + (s.width - d.width) / 2}px`, o.top = `${s.top - d.height - 5}px`;
590
+ }), r = (i) => {
591
+ const c = i.right - window.innerWidth;
592
+ c > 0 && (o.left = `${parseInt(o.left) - c - 5}px`), i.left < 0 && (o.left = "5px");
593
+ }, d = {
594
+ top: (i, c) => {
595
+ o.left = `${i.left + (i.width - c.width) / 2}px`, o.top = `${i.top - c.height - 5}px`;
530
596
  },
531
- bottom: (s, d) => {
532
- o.left = `${s.left + (s.width - d.width) / 2}px`, o.top = `${s.bottom + 5}px`;
597
+ bottom: (i, c) => {
598
+ o.left = `${i.left + (i.width - c.width) / 2}px`, o.top = `${i.bottom + 5}px`;
533
599
  },
534
- left: (s, d) => {
535
- o.left = `${s.left - d.width - 5}px`, o.top = `${s.top + (s.height - d.height) / 2}px`;
600
+ left: (i, c) => {
601
+ o.left = `${i.left - c.width - 5}px`, o.top = `${i.top + (i.height - c.height) / 2}px`;
536
602
  },
537
- right: (s, d) => {
538
- o.left = `${s.right + 5}px`, o.top = `${s.top + (s.height - d.height) / 2}px`;
603
+ right: (i, c) => {
604
+ o.left = `${i.right + 5}px`, o.top = `${i.top + (i.height - c.height) / 2}px`;
539
605
  }
540
- }, r = () => {
541
- l.value = !0, ee(() => {
606
+ }, y = () => {
607
+ l.value = !0, te(() => {
542
608
  if (a.value && l.value) {
543
- const s = a.value.getBoundingClientRect(), d = a.value.querySelector(".spicyTooltip").getBoundingClientRect(), u = v[t.position];
544
- u(s, d), c(d);
609
+ const i = a.value.getBoundingClientRect(), c = a.value.querySelector(".spicyTooltip").getBoundingClientRect(), p = d[t.position];
610
+ p(i, c), r(c);
545
611
  }
546
612
  });
547
- }, g = () => {
613
+ }, u = () => {
548
614
  l.value = !1;
549
615
  };
550
- return (s, d) => (n(), i("div", {
551
- onMouseover: r,
552
- onMouseleave: g,
616
+ return (i, c) => (n(), s("div", {
617
+ onMouseover: y,
618
+ onMouseleave: u,
553
619
  ref_key: "host",
554
620
  ref: a
555
621
  }, [
556
- B(s.$slots, "default"),
557
- l.value ? (n(), i("div", {
622
+ b(i.$slots, "default"),
623
+ l.value ? (n(), s("div", {
558
624
  key: 0,
559
625
  class: "spicyTooltip",
560
626
  style: I(o),
561
627
  role: "tooltip",
562
628
  "aria-hidden": !l.value
563
629
  }, [
564
- e.prependIcon ? (n(), i("span", Ve, f(e.prependIcon), 1)) : p("", !0),
565
- e.text ? (n(), i("span", {
630
+ e.prependIcon ? (n(), s("span", qe, h(e.prependIcon), 1)) : v("", !0),
631
+ e.text ? (n(), s("span", {
566
632
  key: 1,
567
633
  class: "spicyTooltipText",
568
634
  "aria-label": e.text
569
- }, f(e.text), 9, Ee)) : p("", !0),
570
- e.appendIcon ? (n(), i("span", Ue, f(e.appendIcon), 1)) : p("", !0)
571
- ], 12, _e)) : p("", !0)
635
+ }, h(e.text), 9, Ge)) : v("", !0),
636
+ e.appendIcon ? (n(), s("span", Je, h(e.appendIcon), 1)) : v("", !0)
637
+ ], 12, Re)) : v("", !0)
572
638
  ], 544));
573
639
  }
574
640
  };
575
- function W(e, t) {
641
+ function H(e, t) {
576
642
  const l = {
577
643
  YYYY: () => e.getFullYear().toString(),
578
644
  MM: () => (e.getMonth() + 1).toString().padStart(2, "0"),
@@ -580,178 +646,177 @@ function W(e, t) {
580
646
  };
581
647
  return t.replace(/YYYY|MM|DD/g, (a) => l[a]());
582
648
  }
583
- function ze(e) {
649
+ function Ze(e) {
584
650
  const [t, l, a] = e.split("-");
585
651
  return new Date(Number(t), Number(l) - 1, Number(a));
586
652
  }
587
- function He(e, t) {
653
+ function et(e, t) {
588
654
  const l = Math.abs(t.getTime() - e.getTime());
589
655
  return Math.ceil(l / (1e3 * 60 * 60 * 24));
590
656
  }
591
- function je(e, t) {
657
+ function tt(e, t) {
592
658
  const l = new Date(e);
593
659
  return l.setDate(e.getDate() + t), l;
594
660
  }
595
- function Xe(e, t) {
661
+ function lt(e, t) {
596
662
  const l = new Date(e);
597
663
  return l.setDate(e.getDate() - t), l;
598
664
  }
599
- function Re(e) {
665
+ function ot(e) {
600
666
  const t = /* @__PURE__ */ new Date();
601
667
  return e.getDate() === t.getDate() && e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear();
602
668
  }
603
- function qe(e) {
669
+ function at(e) {
604
670
  const t = /* @__PURE__ */ new Date();
605
671
  return t.setDate(t.getDate() - 1), e.getDate() === t.getDate() && e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear();
606
672
  }
607
- function Ge(e) {
673
+ function nt(e) {
608
674
  const t = /* @__PURE__ */ new Date();
609
675
  return t.setDate(t.getDate() + 1), e.getDate() === t.getDate() && e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear();
610
676
  }
611
- function Je(e = "YYYY-MM-DD", t = { show: !0, separator: "-" }) {
677
+ function st(e = "YYYY-MM-DD", t = { show: !0, separator: "-" }) {
612
678
  if (typeof e != "string" || typeof t != "object" || !t.hasOwnProperty("show") || typeof t.show != "boolean")
613
679
  throw new Error(
614
680
  'Invalid parameters: Please provide a valid format string and options object with a boolean "show" property.'
615
681
  );
616
- let a = W(/* @__PURE__ */ new Date(), e);
682
+ let a = H(/* @__PURE__ */ new Date(), e);
617
683
  return t.separator && t.separator !== "-" && (a = a.replace(/-/g, t.separator)), t.show ? { value: a, isVisible: !0 } : { value: a, isVisible: !1 };
618
684
  }
619
- const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
685
+ const mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
620
686
  __proto__: null,
621
- currentDate: Je,
622
- dateAdd: je,
623
- dateDiff: He,
624
- dateIsToday: Re,
625
- dateIsTomorrow: Ge,
626
- dateIsYesterday: qe,
627
- dateSubtract: Xe,
628
- formatDate: W,
629
- parseDate: ze
687
+ currentDate: st,
688
+ dateAdd: tt,
689
+ dateDiff: et,
690
+ dateIsToday: ot,
691
+ dateIsTomorrow: nt,
692
+ dateIsYesterday: at,
693
+ dateSubtract: lt,
694
+ formatDate: H,
695
+ parseDate: Ze
630
696
  }, Symbol.toStringTag, { value: "Module" }));
631
- function Qe(e) {
697
+ function it(e) {
632
698
  const t = /* @__PURE__ */ new WeakMap();
633
699
  function l(a) {
634
- if (T(a) || typeof a != "object")
700
+ if (M(a) || typeof a != "object")
635
701
  return a;
636
702
  if (t.has(a))
637
703
  return t.get(a);
638
704
  const o = Array.isArray(a) ? [] : {};
639
705
  t.set(a, o);
640
- for (const c in a)
641
- Object.prototype.hasOwnProperty.call(a, c) && (o[c] = l(a[c]));
706
+ for (const r in a)
707
+ Object.prototype.hasOwnProperty.call(a, r) && (o[r] = l(a[r]));
642
708
  return o;
643
709
  }
644
710
  return l(e);
645
711
  }
646
- function z(...e) {
712
+ function j(...e) {
647
713
  const t = {};
648
714
  return e.forEach((l) => {
649
- if (!T(l)) {
715
+ if (!M(l)) {
650
716
  for (const a in l)
651
717
  if (Object.prototype.hasOwnProperty.call(l, a)) {
652
718
  const o = l[a];
653
- o !== void 0 && (typeof o == "object" && o !== null && !Array.isArray(o) ? t[a] = z(
654
- t[a] || {},
655
- o
656
- ) : t[a] = o);
719
+ o !== void 0 && (typeof o == "object" && o !== null && !Array.isArray(o) ? t[a] = j(t[a] || {}, o) : t[a] = o);
657
720
  }
658
721
  }
659
722
  }), t;
660
723
  }
661
- function Ze(...e) {
662
- return T(e[0]) ? e[0] : Object.assign({}, ...e);
724
+ function rt(...e) {
725
+ return M(e[0]) ? e[0] : Object.assign({}, ...e);
663
726
  }
664
- function et(e) {
665
- return T(e) ? [] : Object.keys(e);
727
+ function ct(e) {
728
+ return M(e) ? [] : Object.keys(e);
666
729
  }
667
- function tt(e) {
668
- return T(e) ? [] : Object.values(e);
730
+ function ut(e) {
731
+ return M(e) ? [] : Object.values(e);
669
732
  }
670
- function lt(e) {
671
- return T(e) ? [] : Object.entries(e);
733
+ function dt(e) {
734
+ return M(e) ? [] : Object.entries(e);
672
735
  }
673
- function T(e) {
736
+ function M(e) {
674
737
  return e === null || typeof e != "object" ? !1 : Array.isArray(e) ? e.length === 0 : Object.keys(e).length === 0;
675
738
  }
676
- const ut = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
739
+ const bt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
677
740
  __proto__: null,
678
- deepClone: Qe,
679
- deepMerge: z,
680
- getObjectEntries: lt,
681
- getObjectKeys: et,
682
- getObjectValues: tt,
683
- isObjectEmpty: T,
684
- mergeObjects: Ze
741
+ deepClone: it,
742
+ deepMerge: j,
743
+ getObjectEntries: dt,
744
+ getObjectKeys: ct,
745
+ getObjectValues: ut,
746
+ isObjectEmpty: M,
747
+ mergeObjects: rt
685
748
  }, Symbol.toStringTag, { value: "Module" }));
686
- function L(e) {
749
+ function K(e) {
687
750
  try {
688
751
  return new URL(e), !0;
689
752
  } catch (t) {
690
753
  return console.error("Invalid URL:", t), !1;
691
754
  }
692
755
  }
693
- function ot(e) {
694
- return L(e) ? new URL(e).hostname : null;
756
+ function yt(e) {
757
+ return K(e) ? new URL(e).hostname : null;
695
758
  }
696
- function at(e, t) {
697
- if (!L(e)) return e;
759
+ function pt(e, t) {
760
+ if (!K(e)) return e;
698
761
  const l = new URL(e);
699
762
  return Object.keys(t).forEach((a) => l.searchParams.append(a, t[a])), l.toString();
700
763
  }
701
- function nt(e, t, l = "https") {
764
+ function ft(e, t, l = "https") {
702
765
  if (!["http", "https", "ftp", "sftp", "ftps", "ssh"].includes(l.toLowerCase()))
703
766
  throw new Error("Invalid protocol: " + l);
704
767
  if (!/^(?!:\/\/)([a-z0-9-]+\.)*[a-z0-9-]+$/i.test(e))
705
768
  throw new Error("Invalid hostname: " + e);
706
769
  return t.startsWith("/") || (t = "/" + t), t.endsWith("/") && t.length > 1 && (t = t.slice(0, -1)), t === "/" && (t = ""), `${l.toLowerCase()}://${e}${t}`;
707
770
  }
708
- const dt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
771
+ const St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
709
772
  __proto__: null,
710
- appendParamsToUrl: at,
711
- generateUrl: nt,
712
- getHostname: ot,
713
- isUrlValid: L
714
- }, Symbol.toStringTag, { value: "Module" })), st = ':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)}', yt = {
773
+ appendParamsToUrl: pt,
774
+ generateUrl: ft,
775
+ getHostname: yt,
776
+ isUrlValid: K
777
+ }, Symbol.toStringTag, { value: "Module" })), vt = ':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)}', Ct = {
715
778
  install(e, t = {}) {
716
779
  const { useComponents: l = !0, useStyles: a = !0 } = t;
717
- if (l && (e.component("SpicyAlert", ae), e.component("SpicyBtn", re), e.component("SpicyCarousel", me), e.component("SpicyKeyboard", Be), e.component("SpicyLabel", De), e.component("SpicyModal", Ae), e.component("SpicyToggle", Ye), e.component("SpicyTooltip", We)), a) {
780
+ if (l && (e.component("SpicyAlert", ne), e.component("SpicyBtn", ce), e.component("SpicyCarousel", we), e.component("SpicyDivider", $e), e.component("SpicyKeyboard", Ie), e.component("SpicyLabel", Ae), e.component("SpicyModal", Ne), e.component("SpicySlider", We), e.component("SpicyToggle", Xe), e.component("SpicyTooltip", Qe)), a) {
718
781
  const o = document.createElement("style");
719
- o.textContent = st, document.head.appendChild(o);
782
+ o.textContent = vt, document.head.appendChild(o);
720
783
  }
721
784
  }
722
785
  };
723
786
  export {
724
- ae as SpicyAlert,
725
- re as SpicyBtn,
726
- me as SpicyCarousel,
727
- yt as SpicyKatsu,
728
- Be as SpicyKeyboard,
729
- De as SpicyLabel,
730
- Ae as SpicyModal,
731
- Ye as SpicyToggle,
732
- We as SpicyTooltip,
733
- at as appendParamsToUrl,
734
- Je as currentDate,
735
- je as dateAdd,
736
- He as dateDiff,
737
- Re as dateIsToday,
738
- Ge as dateIsTomorrow,
739
- qe as dateIsYesterday,
740
- Xe as dateSubtract,
741
- ct as dateUtils,
742
- Qe as deepClone,
743
- z as deepMerge,
744
- W as formatDate,
745
- nt as generateUrl,
746
- ot as getHostname,
747
- lt as getObjectEntries,
748
- et as getObjectKeys,
749
- tt as getObjectValues,
750
- T as isObjectEmpty,
751
- L as isUrlValid,
752
- Ze as mergeObjects,
753
- ut as objUtils,
754
- ze as parseDate,
755
- st as spicyStyles,
756
- dt as urlUtils
787
+ ne as SpicyAlert,
788
+ ce as SpicyBtn,
789
+ we as SpicyCarousel,
790
+ $e as SpicyDivider,
791
+ Ct as SpicyKatsu,
792
+ Ie as SpicyKeyboard,
793
+ Ae as SpicyLabel,
794
+ Ne as SpicyModal,
795
+ We as SpicySlider,
796
+ Xe as SpicyToggle,
797
+ Qe as SpicyTooltip,
798
+ pt as appendParamsToUrl,
799
+ st as currentDate,
800
+ tt as dateAdd,
801
+ et as dateDiff,
802
+ ot as dateIsToday,
803
+ nt as dateIsTomorrow,
804
+ at as dateIsYesterday,
805
+ lt as dateSubtract,
806
+ mt as dateUtils,
807
+ it as deepClone,
808
+ j as deepMerge,
809
+ H as formatDate,
810
+ ft as generateUrl,
811
+ yt as getHostname,
812
+ dt as getObjectEntries,
813
+ ct as getObjectKeys,
814
+ ut as getObjectValues,
815
+ M as isObjectEmpty,
816
+ K as isUrlValid,
817
+ rt as mergeObjects,
818
+ bt as objUtils,
819
+ Ze as parseDate,
820
+ vt as spicyStyles,
821
+ St as urlUtils
757
822
  };
@@ -1 +1 @@
1
- (function(r,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(r=typeof globalThis<"u"?globalThis:r||self,e(r.SpicyKatsu={},r.Vue))})(this,function(r,e){"use strict";const ee=["aria-label"],te={key:0,class:"spicyAlertIcon"},le={key:1,class:"spicyAlertText"},V={__name:"SpicyAlert",props:{variant:{type:String,default:"info",validator:t=>["info","success","warning","error","custom"].includes(t)},text:{type:String,default:""},icon:String,iconOnly:Boolean,closable:{type:Boolean,default:!1},autoClose:{type:Number,default:0}},setup(t){const l=t,o=e.ref(!0),a=()=>{o.value=!1};return e.watch(()=>l.autoClose,n=>{n>0&&setTimeout(()=>{o.value=!1},n)}),(n,c)=>(e.openBlock(),e.createBlock(e.Transition,{name:"fade"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["spicyAlert",t.variant]),"aria-atomic":"true","aria-label":t.text,role:"alert",onKeydown:e.withKeys(a,["enter"])},[t.iconOnly||t.text?(e.openBlock(),e.createElementBlock("span",te,e.toDisplayString(t.icon),1)):e.createCommentVNode("",!0),!t.iconOnly&&t.text?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(t.text),1)):e.createCommentVNode("",!0),t.closable?(e.openBlock(),e.createElementBlock("button",{key:2,class:"spicyAlertCloseBtn",onClick:a,"aria-label":"Close alert"}," X ")):e.createCommentVNode("",!0)],42,ee)):e.createCommentVNode("",!0)]),_:1}))}},oe=["disabled","aria-label","aria-disabled"],ne={key:0,class:"spicyBtnIcon"},ae={key:1,class:"spicyBtnText"},N={__name:"SpicyBtn",props:{variant:{type:String,default:"filled",validator:t=>["outlined","filled"].includes(t)},disabled:{type:Boolean,default:!1},text:{type:String,default:"Button"},icon:String,bgColor:String,textColor:String,hoverColor:String,borderColor:String,fontSize:{type:[Number,String],default:14},fontWeight:{type:[Number,String],default:500}},emits:["click"],setup(t,{emit:l}){const o=t,a=e.computed(()=>({"--skFontSize":o.fontSize,"--skFontWeight":o.fontWeight,"--skBgColor":o.bgColor,"--skTextColor":o.textColor,"--skBorderColor":o.borderColor,"--hoverColor":o.hoverColor}));return(n,c)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["spicyBtn",{outlined:t.variant==="outlined",disabled:t.disabled}]),style:e.normalizeStyle({...a.value}),disabled:t.disabled,onClick:c[0]||(c[0]=p=>n.$emit("click")),role:"button","aria-label":t.text,"aria-disabled":t.disabled},[t.icon?(e.openBlock(),e.createElementBlock("span",ne,e.toDisplayString(t.icon),1)):e.createCommentVNode("",!0),t.text?(e.openBlock(),e.createElementBlock("span",ae,e.toDisplayString(t.text),1)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default")],14,oe))}},re=["aria-label"],ie={class:"spicyCarouselInfoText"},se={key:0,class:"spicyCarouselNavControls"},ce=[e.createElementVNode("span",{class:"spicyCarouselPrevBtnIcon"},"<",-1)],de=[e.createElementVNode("span",{class:"spicyCarouselNextBtnIcon"},">",-1)],ye={key:1,class:"spicyCarouselPagination"},pe=["onClick"],ue={class:"spicyCarouselPage"},M={__name:"SpicyCarousel",props:{autoplay:{type:Boolean,default:!1},autoplaySpeed:{type:Number,default:5e3},showNavigation:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},activeColor:{type:String,default:"rgba(0, 255, 234, 0.5)"},loop:{type:Boolean,default:!0},initialSlide:{type:Number,default:0},slides:{type:Array,required:!0},width:{type:String,default:"540px"},height:{type:String,default:"300px"},fullScreen:{type:Boolean,default:!1},enableImageClick:{type:Boolean,default:!1}},setup(t){let l,o,a=!1;const n=t,c=e.computed(()=>({"--width":n.width,"--height":n.height,"--activeColor":n.activeColor})),p=e.computed(()=>u.value.fullScreen===!1?!1:n.fullScreen),s=e.ref(n.initialSlide),u=e.computed(()=>n.slides[s.value]);let i;const y=()=>{s.value=(s.value-1+n.slides.length)%n.slides.length},d=()=>{s.value=(s.value+1)%n.slides.length},C=g=>{s.value=g},f=()=>{clearInterval(i)},S=()=>{n.autoplay&&(i=setInterval(d,n.autoplaySpeed))},b=()=>{window.open(u.value.img)},k=()=>{n.enableImageClick&&b()},m=g=>{l=g.touches[0].clientX,o=g.touches[0].clientY,a=!1},w=g=>{if(!a){const E=g.touches[0].clientX-l,v=g.touches[0].clientY-o;Math.abs(E)>Math.abs(v)&&(E>40?(y(),a=!0):E<-40&&(d(),a=!0))}};return e.onMounted(()=>{n.autoplay&&(i=setInterval(d,n.autoplaySpeed))}),e.onUnmounted(()=>{clearInterval(i)}),(g,E)=>(e.openBlock(),e.createElementBlock("div",{class:"spicyCarouselContainer",style:e.normalizeStyle({...c.value}),onMouseenter:f,onMouseleave:S,onTouchstart:m,onTouchmove:w},[e.createVNode(e.Transition,{name:"slide",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["spicyCarouselSlide",{pointCursor:n.enableImageClick}]),key:s.value,style:e.normalizeStyle({backgroundImage:`url(${u.value.img})`}),onClick:k},[t.slides[s.value].text?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["spicyCarouselTextOverlay",{fullScreen:p.value}]),"aria-label":t.slides[s.value].text},[e.createElementVNode("span",ie,e.toDisplayString(t.slides[s.value].text),1)],10,re)):e.createCommentVNode("",!0),e.renderSlot(g.$slots,"default")],6))]),_:3}),t.showNavigation?(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("div",{class:"spicyCarouselPrevNav"},[e.createElementVNode("button",{class:"spicyCarouselPrevBtn",onClick:y},ce)]),e.createElementVNode("div",{class:"spicyCarouselNextNav"},[e.createElementVNode("button",{class:"spicyCarouselNextBtn",onClick:d},de)])])):e.createCommentVNode("",!0),t.showPagination?(e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.slides,(v,T)=>(e.openBlock(),e.createElementBlock("button",{key:T,onClick:_e=>C(T),class:e.normalizeClass(["spicyCarouselPageBtn",{active:T===s.value}])},[e.createElementVNode("span",ue,e.toDisplayString(T+1),1)],10,pe))),128))])):e.createCommentVNode("",!0)],36))}},fe={class:"kbContainer"},me={class:"kbSidebar"},ge=["onUpdate:modelValue"],he={class:"spicyKB"},ke=["onMousedown","onTouchstart","onClick"],Se={class:"keyText"},F={__name:"SpicyKeyboard",emits:["input"],setup(t,{emit:l}){const o=e.ref(null),a=e.ref([{label:"Function Keys",visible:!1,layout:[["Esc","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","PrtScr","ScrLk","Pause"]]},{label:"Main Keys",visible:!0,layout:[["`","1","2","3","4","5","6","7","8","9","0","-","=","Backspace"],["Tab","Q","W","E","R","T","Y","U","I","O","P","[","]","\\"],["Caps","A","S","D","F","G","H","J","K","L",";","'","Enter"],["Shift","Z","X","C","V","B","N","M",",",".","/","Shift"],["Ctrl","Win","Alt","Space","Alt","Fn","Ctrl"]]},{label:"Arrow Keys",visible:!0,layout:[["Ins","Home","PgUp"],["Del","End","PgDn"],["&uarr;","&larr;","&darr;","&rarr;"]]},{label:"Numpad",visible:!0,layout:[["NumLock","/","*","-"],["7","8","9","+"],["4","5","6"],["1","2","3","Enter"],["0","."]]}]),n=e.computed(()=>a.value.filter(d=>d.visible).map(d=>d)),c=l,p=d=>{o.value=d},s=()=>{o.value=null},u=d=>{c("input",d)},i=d=>["Backspace","Tab","Caps","Enter","Shift","Ctrl","Win","Alt","Space","Fn","Ins","Del","Home","End","PgUp","PgDn","NumLock"].includes(d)?`key-${d.toLowerCase()}`:"",y=(d,C,f)=>{const S=k=>["Backspace","Tab","Caps","Enter","Shift","Space"].includes(k),b=k=>["Ctrl","Win","Alt","Fn"].includes(k);return S(d)?"key-wide":b(d)?"key-small":C[f].length===1?"key-fullwidth":""};return(d,C)=>(e.openBlock(),e.createElementBlock("div",fe,[e.createElementVNode("div",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(f,S)=>(e.openBlock(),e.createElementBlock("div",{class:"sidebar",key:S},[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":b=>f.visible=b},null,8,ge),[[e.vModelCheckbox,f.visible]]),e.createTextVNode(" "+e.toDisplayString(f.label),1)])]))),128))]),e.createElementVNode("div",he,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(f,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["kbSection",{[f.label.toLowerCase().replace(/\s+/g,"")]:!0}]),key:S},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.layout,(b,k)=>(e.openBlock(),e.createElementBlock("div",{class:"spicyKBRow",key:k},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b,m=>(e.openBlock(),e.createElementBlock("button",{key:m,class:e.normalizeClass(["spicyKBKey",[{"is-active":o.value===m},i(m),y(m,f.layout,k)]]),onMousedown:w=>p(m),onMouseup:s,onTouchstart:w=>p(m),onTouchend:s,onClick:w=>u(m)},[e.createElementVNode("span",Se,e.toDisplayString(m),1)],42,ke))),128))]))),128))],2))),128))])]))}},be={class:"spicyInputLabel"},Ce=["placeholder","aria-label"],Be={key:0,class:"spicyInputError"},I={__name:"SpicyLabel",props:{value:{type:String,default:""},placeholder:{type:String,default:""},label:{type:String,default:""},error:{type:String,default:""},variant:{type:String,default:"filled",validator:t=>["outlined","filled"].includes(t)}},setup(t){const l=t,o=e.ref(l.value),a=e.ref(!1),n=s=>{o.value=s.target.value},c=()=>{a.value=!1},p=()=>{a.value=!0};return(s,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["spicyInputWrapper",[t.variant,{hasValue:o.value||t.value,hasFocus:a.value,hasError:t.error}]])},[e.createElementVNode("label",be,e.toDisplayString(t.label),1),e.withDirectives(e.createElementVNode("input",{class:e.normalizeClass(["spicyInput",t.variant]),"onUpdate:modelValue":u[0]||(u[0]=i=>o.value=i),placeholder:t.placeholder,onInput:n,onBlur:c,onFocus:p,"aria-label":t.label},null,42,Ce),[[e.vModelText,o.value]]),e.renderSlot(s.$slots,"default"),t.error?(e.openBlock(),e.createElementBlock("span",Be,e.toDisplayString(t.error),1)):e.createCommentVNode("",!0)],2))}},we={class:"spicyModalHeader"},Ee={class:"spicyModalActions"},Te=["onClick"],O={__name:"SpicyModal",props:{width:{type:String,default:"50%"},height:{type:String,default:"auto"},borderRadius:{type:String,default:"8px"},bgColor:{type:String,default:"#2b2b2b"},visible:{type:Boolean,default:!1},closeBtn:{type:Boolean,default:!1},actions:{type:Array,default:()=>[]},closeOnClick:{type:Boolean,default:!0},modalTitle:{type:String,default:""}},emits:["update:visible"],setup(t,{emit:l}){const o=t,a=e.computed(()=>({"--width":o.width,"--height":o.height,"--skBorderRadius":o.borderRadius,"--skBgColor":o.bgColor})),n=l,c=()=>{n("update:visible",!1)},p=s=>{o.closeOnClick&&s.target.classList.contains("spicyModalOverlay")&&c()};return(s,u)=>t.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"spicyModalOverlay",onClick:p},[e.createElementVNode("div",{class:"spicyModal",style:e.normalizeStyle({...a.value})},[e.createElementVNode("header",we,[e.renderSlot(s.$slots,"spicyModalHeader",{title:t.modalTitle},()=>[e.createTextVNode(e.toDisplayString(t.modalTitle),1)])]),e.renderSlot(s.$slots,"default"),e.createElementVNode("div",Ee,[e.renderSlot(s.$slots,"spicyModalActions"),t.actions.length===0&&t.closeBtn?(e.openBlock(),e.createElementBlock("button",{key:0,class:"spicyModalCloseBtn spicyModalActionBtn",onClick:c}," Close ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions,i=>(e.openBlock(),e.createElementBlock("button",{class:"spicyModalExtraBtn spicyModalActionBtn",key:i.label,onClick:i.handler},e.toDisplayString(i.label),9,Te))),128))])],4)])):e.createCommentVNode("",!0)}},$e=["aria-label","aria-checked","onKeydown"],De=[e.createElementVNode("div",{class:"spicyToggleKnob"},null,-1)],P={__name:"SpicyToggle",props:{modelValue:Boolean,label:{type:String,default:"Toggle"},variant:{type:String,default:"filled",validator:t=>["outlined","filled"].includes(t)},borderColor:String,activeColor:{type:String,default:"var(--skPrimaryColor)"}},emits:["update:modelValue"],setup(t,{emit:l}){const o=t,a=e.computed(()=>({"--skBorderColor":o.borderColor,"--activeColor":o.activeColor})),n=l,c=()=>{n("update:modelValue",!o.modelValue)};return(p,s)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:["spicyToggle",{outlined:t.variant==="outlined","is-active":t.modelValue}],tabindex:"0",role:"switch",style:{...a.value},"aria-label":t.label,"aria-checked":t.modelValue.toString(),onClick:c,onKeydown:[e.withKeys(e.withModifiers(c,["prevent"]),["space"]),e.withKeys(e.withModifiers(c,["prevent"]),["enter"])]},p.$attrs),De,16,$e))}},Ve=["aria-hidden"],Ne={key:0,class:"spicyTooltipIcon"},Me=["aria-label"],Fe={key:2,class:"spicyTooltipIcon"},x={__name:"SpicyTooltip",props:{text:String,prependIcon:String,appendIcon:String,position:{type:String,default:"top",validator:t=>["top","bottom","left","right"].includes(t)}},setup(t){const l=t,o=e.ref(!1),a=e.ref(null),n=e.reactive({position:"absolute",top:"0px",left:"0px",maxWidth:"175px"}),c=i=>{const y=i.right-window.innerWidth;y>0&&(n.left=`${parseInt(n.left)-y-5}px`),i.left<0&&(n.left="5px")},p={top:(i,y)=>{n.left=`${i.left+(i.width-y.width)/2}px`,n.top=`${i.top-y.height-5}px`},bottom:(i,y)=>{n.left=`${i.left+(i.width-y.width)/2}px`,n.top=`${i.bottom+5}px`},left:(i,y)=>{n.left=`${i.left-y.width-5}px`,n.top=`${i.top+(i.height-y.height)/2}px`},right:(i,y)=>{n.left=`${i.right+5}px`,n.top=`${i.top+(i.height-y.height)/2}px`}},s=()=>{o.value=!0,e.nextTick(()=>{if(a.value&&o.value){const i=a.value.getBoundingClientRect(),y=a.value.querySelector(".spicyTooltip").getBoundingClientRect(),d=p[l.position];d(i,y),c(y)}})},u=()=>{o.value=!1};return(i,y)=>(e.openBlock(),e.createElementBlock("div",{onMouseover:s,onMouseleave:u,ref_key:"host",ref:a},[e.renderSlot(i.$slots,"default"),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"spicyTooltip",style:e.normalizeStyle(n),role:"tooltip","aria-hidden":!o.value},[t.prependIcon?(e.openBlock(),e.createElementBlock("span",Ne,e.toDisplayString(t.prependIcon),1)):e.createCommentVNode("",!0),t.text?(e.openBlock(),e.createElementBlock("span",{key:1,class:"spicyTooltipText","aria-label":t.text},e.toDisplayString(t.text),9,Me)):e.createCommentVNode("",!0),t.appendIcon?(e.openBlock(),e.createElementBlock("span",Fe,e.toDisplayString(t.appendIcon),1)):e.createCommentVNode("",!0)],12,Ve)):e.createCommentVNode("",!0)],544))}};function $(t,l){const o={YYYY:()=>t.getFullYear().toString(),MM:()=>(t.getMonth()+1).toString().padStart(2,"0"),DD:()=>t.getDate().toString().padStart(2,"0")};return l.replace(/YYYY|MM|DD/g,a=>o[a]())}function K(t){const[l,o,a]=t.split("-");return new Date(Number(l),Number(o)-1,Number(a))}function A(t,l){const o=Math.abs(l.getTime()-t.getTime());return Math.ceil(o/(1e3*60*60*24))}function L(t,l){const o=new Date(t);return o.setDate(t.getDate()+l),o}function _(t,l){const o=new Date(t);return o.setDate(t.getDate()-l),o}function z(t){const l=new Date;return t.getDate()===l.getDate()&&t.getMonth()===l.getMonth()&&t.getFullYear()===l.getFullYear()}function Y(t){const l=new Date;return l.setDate(l.getDate()-1),t.getDate()===l.getDate()&&t.getMonth()===l.getMonth()&&t.getFullYear()===l.getFullYear()}function U(t){const l=new Date;return l.setDate(l.getDate()+1),t.getDate()===l.getDate()&&t.getMonth()===l.getMonth()&&t.getFullYear()===l.getFullYear()}function W(t="YYYY-MM-DD",l={show:!0,separator:"-"}){if(typeof t!="string"||typeof l!="object"||!l.hasOwnProperty("show")||typeof l.show!="boolean")throw new Error('Invalid parameters: Please provide a valid format string and options object with a boolean "show" property.');let a=$(new Date,t);return l.separator&&l.separator!=="-"&&(a=a.replace(/-/g,l.separator)),l.show?{value:a,isVisible:!0}:{value:a,isVisible:!1}}const Ie=Object.freeze(Object.defineProperty({__proto__:null,currentDate:W,dateAdd:L,dateDiff:A,dateIsToday:z,dateIsTomorrow:U,dateIsYesterday:Y,dateSubtract:_,formatDate:$,parseDate:K},Symbol.toStringTag,{value:"Module"}));function j(t){const l=new WeakMap;function o(a){if(h(a)||typeof a!="object")return a;if(l.has(a))return l.get(a);const n=Array.isArray(a)?[]:{};l.set(a,n);for(const c in a)Object.prototype.hasOwnProperty.call(a,c)&&(n[c]=o(a[c]));return n}return o(t)}function D(...t){const l={};return t.forEach(o=>{if(!h(o)){for(const a in o)if(Object.prototype.hasOwnProperty.call(o,a)){const n=o[a];n!==void 0&&(typeof n=="object"&&n!==null&&!Array.isArray(n)?l[a]=D(l[a]||{},n):l[a]=n)}}}),l}function H(...t){return h(t[0])?t[0]:Object.assign({},...t)}function X(t){return h(t)?[]:Object.keys(t)}function R(t){return h(t)?[]:Object.values(t)}function q(t){return h(t)?[]:Object.entries(t)}function h(t){return t===null||typeof t!="object"?!1:Array.isArray(t)?t.length===0:Object.keys(t).length===0}const Oe=Object.freeze(Object.defineProperty({__proto__:null,deepClone:j,deepMerge:D,getObjectEntries:q,getObjectKeys:X,getObjectValues:R,isObjectEmpty:h,mergeObjects:H},Symbol.toStringTag,{value:"Module"}));function B(t){try{return new URL(t),!0}catch(l){return console.error("Invalid URL:",l),!1}}function G(t){return B(t)?new URL(t).hostname:null}function J(t,l){if(!B(t))return t;const o=new URL(t);return Object.keys(l).forEach(a=>o.searchParams.append(a,l[a])),o.toString()}function Q(t,l,o="https"){if(!["http","https","ftp","sftp","ftps","ssh"].includes(o.toLowerCase()))throw new Error("Invalid protocol: "+o);if(!/^(?!:\/\/)([a-z0-9-]+\.)*[a-z0-9-]+$/i.test(t))throw new Error("Invalid hostname: "+t);return l.startsWith("/")||(l="/"+l),l.endsWith("/")&&l.length>1&&(l=l.slice(0,-1)),l==="/"&&(l=""),`${o.toLowerCase()}://${t}${l}`}const Pe=Object.freeze(Object.defineProperty({__proto__:null,appendParamsToUrl:J,generateUrl:Q,getHostname:G,isUrlValid:B},Symbol.toStringTag,{value:"Module"})),Z=':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)}',xe={install(t,l={}){const{useComponents:o=!0,useStyles:a=!0}=l;if(o&&(t.component("SpicyAlert",V),t.component("SpicyBtn",N),t.component("SpicyCarousel",M),t.component("SpicyKeyboard",F),t.component("SpicyLabel",I),t.component("SpicyModal",O),t.component("SpicyToggle",P),t.component("SpicyTooltip",x)),a){const n=document.createElement("style");n.textContent=Z,document.head.appendChild(n)}}};r.SpicyAlert=V,r.SpicyBtn=N,r.SpicyCarousel=M,r.SpicyKatsu=xe,r.SpicyKeyboard=F,r.SpicyLabel=I,r.SpicyModal=O,r.SpicyToggle=P,r.SpicyTooltip=x,r.appendParamsToUrl=J,r.currentDate=W,r.dateAdd=L,r.dateDiff=A,r.dateIsToday=z,r.dateIsTomorrow=U,r.dateIsYesterday=Y,r.dateSubtract=_,r.dateUtils=Ie,r.deepClone=j,r.deepMerge=D,r.formatDate=$,r.generateUrl=Q,r.getHostname=G,r.getObjectEntries=q,r.getObjectKeys=X,r.getObjectValues=R,r.isObjectEmpty=h,r.isUrlValid=B,r.mergeObjects=H,r.objUtils=Oe,r.parseDate=K,r.spicyStyles=Z,r.urlUtils=Pe,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
1
+ (function(i,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(i=typeof globalThis<"u"?globalThis:i||self,e(i.SpicyKatsu={},i.Vue))})(this,function(i,e){"use strict";const le=["aria-label"],oe={key:0,class:"spicyAlertIcon"},ne={key:1,class:"spicyAlertText"},T={__name:"SpicyAlert",props:{variant:{type:String,default:"info",validator:t=>["info","success","warning","error","custom"].includes(t)},text:{type:String,default:""},icon:String,iconOnly:Boolean,closable:{type:Boolean,default:!1},autoClose:{type:Number,default:0}},setup(t){const l=t,o=e.ref(!0),a=()=>{o.value=!1};return e.watch(()=>l.autoClose,n=>{n>0&&setTimeout(()=>{o.value=!1},n)}),(n,s)=>(e.openBlock(),e.createBlock(e.Transition,{name:"fade"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["spicyAlert",t.variant]),"aria-atomic":"true","aria-label":t.text,role:"alert",onKeydown:e.withKeys(a,["enter"])},[t.iconOnly||t.text?(e.openBlock(),e.createElementBlock("span",oe,e.toDisplayString(t.icon),1)):e.createCommentVNode("",!0),!t.iconOnly&&t.text?(e.openBlock(),e.createElementBlock("span",ne,e.toDisplayString(t.text),1)):e.createCommentVNode("",!0),t.closable?(e.openBlock(),e.createElementBlock("button",{key:2,class:"spicyAlertCloseBtn",onClick:a,"aria-label":"Close alert"}," X ")):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default")],42,le)):e.createCommentVNode("",!0)]),_:3}))}},ae=["disabled","aria-label","aria-disabled","tabindex"],ie={key:0,class:"spicyBtnIcon"},re={key:1,class:"spicyBtnText"},N={__name:"SpicyBtn",props:{variant:{type:String,default:"filled",validator:t=>["outlined","filled"].includes(t)},disabled:{type:Boolean,default:!1},text:{type:String,default:"Button"},icon:String,bgColor:String,textColor:String,hoverColor:String,borderColor:String,fontSize:{type:[Number,String],default:14},fontWeight:{type:[Number,String],default:500}},emits:["click"],setup(t,{emit:l}){const o=t,a=e.computed(()=>({"--skFontSize":o.fontSize,"--skFontWeight":o.fontWeight,"--skBgColor":o.bgColor,"--skTextColor":o.textColor,"--skBorderColor":o.borderColor,"--hoverColor":o.hoverColor}));return(n,s)=>(e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["spicyBtn",{outlined:t.variant==="outlined",disabled:t.disabled}]),style:e.normalizeStyle({...a.value}),disabled:t.disabled,onClick:s[0]||(s[0]=y=>n.$emit("click")),role:"button","aria-label":t.text,"aria-disabled":t.disabled,tabindex:t.disabled?-1:0},[t.icon?(e.openBlock(),e.createElementBlock("span",ie,e.toDisplayString(t.icon),1)):e.createCommentVNode("",!0),t.text?(e.openBlock(),e.createElementBlock("span",re,e.toDisplayString(t.text),1)):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default")],14,ae))}},se={class:"spicyCarouselWrapper"},ce=["aria-label"],de={class:"spicyCarouselInfoText"},ye={class:"spicyCarouselTitle"},pe={key:0},ue={key:0,class:"spicyCarouselNavControls"},me=[e.createElementVNode("span",{class:"spicyCarouselPrevBtnIcon"},"<",-1)],fe=[e.createElementVNode("span",{class:"spicyCarouselNextBtnIcon"},">",-1)],ge={key:1,class:"spicyCarouselPagination"},he=["onClick"],ke={class:"spicyCarouselPage"},M={__name:"SpicyCarousel",props:{autoplay:{type:Boolean,default:!1},autoplaySpeed:{type:Number,default:5e3},showNavigation:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},activeColor:{type:String,default:"#00ffea80"},loop:{type:Boolean,default:!0},initialSlide:{type:Number,default:0},slides:{type:Array,required:!0},width:{type:String,default:"580px"},height:{type:String,default:"360px"},fullScreen:{type:Boolean,default:!1},enableImageClick:{type:Boolean,default:!1}},setup(t){let l,o,a=!1;const n=t,s=e.computed(()=>({"--width":n.width,"--height":n.height,"--activeColor":n.activeColor})),y=e.computed(()=>n.slides[d.value].title),p=e.computed(()=>r.value.fullScreen===!1?!1:n.fullScreen),d=e.ref(n.initialSlide),r=e.computed(()=>n.slides[d.value]);let c;const u=()=>{d.value=(d.value-1+n.slides.length)%n.slides.length},k=()=>{d.value=(d.value+1)%n.slides.length},m=g=>{d.value=g},b=()=>{clearInterval(c)},C=()=>{n.autoplay&&(c=setInterval(k,n.autoplaySpeed))},S=()=>{window.open(r.value.img)},f=()=>{n.enableImageClick&&S()},w=g=>{l=g.touches[0].clientX,o=g.touches[0].clientY,a=!1},je=g=>{if(!a){const E=g.touches[0].clientX-l,te=g.touches[0].clientY-o;Math.abs(E)>Math.abs(te)&&(E>40?(u(),a=!0):E<-40&&(k(),a=!0))}};return e.onMounted(()=>{n.autoplay&&(c=setInterval(k,n.autoplaySpeed))}),e.onUnmounted(()=>{clearInterval(c)}),(g,E)=>(e.openBlock(),e.createElementBlock("div",se,[e.createElementVNode("div",{class:"spicyCarouselContainer",style:e.normalizeStyle({...s.value}),onMouseenter:b,onMouseleave:C,onTouchstart:w,onTouchmove:je},[e.createVNode(e.Transition,{name:"slide",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["spicyCarouselSlide",{pointCursor:n.enableImageClick}]),key:d.value,style:e.normalizeStyle({backgroundImage:`url(${r.value.img})`}),onClick:f},[t.slides[d.value].text?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["spicyCarouselTextOverlay",{fullScreen:p.value}]),"aria-label":t.slides[d.value].text},[e.createElementVNode("span",de,e.toDisplayString(t.slides[d.value].text),1)],10,ce)):e.createCommentVNode("",!0),e.renderSlot(g.$slots,"default")],6))]),_:3})],36),e.createElementVNode("div",ye,[y.value?(e.openBlock(),e.createElementBlock("h2",pe,e.toDisplayString(r.value.title),1)):e.createCommentVNode("",!0)]),t.showNavigation?(e.openBlock(),e.createElementBlock("div",ue,[e.createElementVNode("button",{class:"spicyCarouselPrevBtn",onClick:u},me),e.createElementVNode("button",{class:"spicyCarouselNextBtn",onClick:k},fe)])):e.createCommentVNode("",!0),t.showPagination?(e.openBlock(),e.createElementBlock("div",ge,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.slides,(te,$)=>(e.openBlock(),e.createElementBlock("button",{key:$,onClick:qe=>m($),class:e.normalizeClass(["spicyCarouselPageBtn",{active:$===d.value}])},[e.createElementVNode("span",ke,e.toDisplayString($+1),1)],10,he))),128))])):e.createCommentVNode("",!0)]))}},F={__name:"SpicyDivider",props:{variant:{type:String,default:"solid",validator:t=>["solid","dashed"].includes(t)},width:{type:String,default:"100%"},height:{type:String,default:"1px"},bgColor:{type:String,default:"var(--skBgColor)"}},setup(t){const l=t,o=e.computed(()=>({width:l.width,height:l.height,borderBottom:`${l.height} ${l.variant} ${l.bgColor}`}));return(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"spicyDivider",style:e.normalizeStyle(o.value),role:"separator","aria-orientation":"horizontal"},[e.renderSlot(a.$slots,"default")],4))}},Se={class:"kbContainer"},be={class:"kbSidebar"},Ce=["onUpdate:modelValue"],Be={class:"spicyKB"},we=["onMousedown","onTouchstart","onClick"],Ee={class:"keyText"},I={__name:"SpicyKeyboard",emits:["input"],setup(t,{emit:l}){const o=e.ref(null),a=e.ref([{label:"Function Keys",visible:!1,layout:[["Esc","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","PrtScr","ScrLk","Pause"]]},{label:"Main Keys",visible:!0,layout:[["`","1","2","3","4","5","6","7","8","9","0","-","=","Backspace"],["Tab","Q","W","E","R","T","Y","U","I","O","P","[","]","\\"],["Caps","A","S","D","F","G","H","J","K","L",";","'","Enter"],["Shift","Z","X","C","V","B","N","M",",",".","/","Shift"],["Ctrl","Win","Alt","Space","Alt","Fn","Ctrl"]]},{label:"Arrow Keys",visible:!0,layout:[["Ins","Home","PgUp"],["Del","End","PgDn"],["&uarr;","&larr;","&darr;","&rarr;"]]},{label:"Numpad",visible:!0,layout:[["NumLock","/","*","-"],["7","8","9","+"],["4","5","6"],["1","2","3","Enter"],["0","."]]}]),n=e.computed(()=>a.value.filter(u=>u.visible).map(u=>u)),s=l,y=u=>{o.value=u},p=()=>{o.value=null},d=u=>{s("input",u)},r=u=>["Backspace","Tab","Caps","Enter","Shift","Ctrl","Win","Alt","Space","Fn","Ins","Del","Home","End","PgUp","PgDn","NumLock"].includes(u)?`key-${u.toLowerCase()}`:"",c=(u,k,m)=>{const b=S=>["Backspace","Tab","Caps","Enter","Shift","Space"].includes(S),C=S=>["Ctrl","Win","Alt","Fn"].includes(S);return b(u)?"key-wide":C(u)?"key-small":k[m].length===1?"key-fullwidth":""};return(u,k)=>(e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("div",be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(m,b)=>(e.openBlock(),e.createElementBlock("div",{class:"sidebar",key:b},[e.createElementVNode("label",null,[e.withDirectives(e.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":C=>m.visible=C},null,8,Ce),[[e.vModelCheckbox,m.visible]]),e.createTextVNode(" "+e.toDisplayString(m.label),1)])]))),128))]),e.createElementVNode("div",Be,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(m,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["kbSection",{[m.label.toLowerCase().replace(/\s+/g,"")]:!0}]),key:b},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.layout,(C,S)=>(e.openBlock(),e.createElementBlock("div",{class:"spicyKBRow",key:S},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C,f=>(e.openBlock(),e.createElementBlock("button",{key:f,class:e.normalizeClass(["spicyKBKey",[{"is-active":o.value===f},r(f),c(f,m.layout,S)]]),onMousedown:w=>y(f),onMouseup:p,onTouchstart:w=>y(f),onTouchend:p,onClick:w=>d(f)},[e.createElementVNode("span",Ee,e.toDisplayString(f),1)],42,we))),128))]))),128))],2))),128))])]))}},$e={class:"spicyInputLabel"},Ve=["placeholder","aria-label"],De={key:0,class:"spicyInputError"},O={__name:"SpicyLabel",props:{value:{type:String,default:""},placeholder:{type:String,default:""},label:{type:String,default:""},error:{type:String,default:""},variant:{type:String,default:"filled",validator:t=>["outlined","filled"].includes(t)}},setup(t){const l=t,o=e.ref(l.value),a=e.ref(!1),n=p=>{o.value=p.target.value},s=()=>{a.value=!1},y=()=>{a.value=!0};return(p,d)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["spicyInputWrapper",[t.variant,{hasValue:o.value||t.value,hasFocus:a.value,hasError:t.error}]])},[e.createElementVNode("label",$e,e.toDisplayString(t.label),1),e.withDirectives(e.createElementVNode("input",{class:e.normalizeClass(["spicyInput",t.variant]),"onUpdate:modelValue":d[0]||(d[0]=r=>o.value=r),placeholder:t.placeholder,onInput:n,onBlur:s,onFocus:y,"aria-label":t.label},null,42,Ve),[[e.vModelText,o.value]]),e.renderSlot(p.$slots,"default"),t.error?(e.openBlock(),e.createElementBlock("span",De,e.toDisplayString(t.error),1)):e.createCommentVNode("",!0)],2))}},Te={class:"spicyModalHeader"},Ne={class:"spicyModalActions"},Me=["onClick"],x={__name:"SpicyModal",props:{width:{type:String,default:"50%"},height:{type:String,default:"auto"},borderRadius:{type:String,default:"8px"},bgColor:{type:String,default:"#2b2b2b"},visible:{type:Boolean,default:!1},closeBtn:{type:Boolean,default:!1},actions:{type:Array,default:()=>[]},closeOnClick:{type:Boolean,default:!0},modalTitle:{type:String,default:""}},emits:["update:visible"],setup(t,{emit:l}){const o=t,a=e.computed(()=>({"--width":o.width,"--height":o.height,"--skBorderRadius":o.borderRadius,"--skBgColor":o.bgColor})),n=l,s=()=>{n("update:visible",!1)},y=p=>{o.closeOnClick&&p.target.classList.contains("spicyModalOverlay")&&s()};return(p,d)=>t.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"spicyModalOverlay",onClick:y},[e.createElementVNode("div",{class:"spicyModal",style:e.normalizeStyle({...a.value})},[e.createElementVNode("header",Te,[e.renderSlot(p.$slots,"spicyModalHeader",{title:t.modalTitle},()=>[e.createTextVNode(e.toDisplayString(t.modalTitle),1)])]),e.renderSlot(p.$slots,"default"),e.createElementVNode("div",Ne,[e.renderSlot(p.$slots,"spicyModalActions"),t.actions.length===0&&t.closeBtn?(e.openBlock(),e.createElementBlock("button",{key:0,class:"spicyModalCloseBtn spicyModalActionBtn",onClick:s}," Close ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.actions,r=>(e.openBlock(),e.createElementBlock("button",{class:"spicyModalExtraBtn spicyModalActionBtn",key:r.label,onClick:r.handler},e.toDisplayString(r.label),9,Me))),128))])],4)])):e.createCommentVNode("",!0)}},Fe={class:"spicySlider"},Ie={key:0,class:"spicySliderLabel"},Oe=["min","max","step"],_={__name:"SpicySlider",props:{min:{type:Number,default:0},max:{type:Number,default:100},step:{type:Number,default:1},label:{type:String,default:""},modelValue:{type:Number,default:0}},emits:["update:modelValue"],setup(t,{emit:l}){const o=t,a=l,n=e.ref(o.modelValue);e.watch(()=>o.modelValue,y=>{n.value=y});const s=y=>{a("update:modelValue",Number(y.target.value))};return(y,p)=>(e.openBlock(),e.createElementBlock("div",Fe,[t.label?(e.openBlock(),e.createElementBlock("label",Ie,e.toDisplayString(t.label),1)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{class:"spicySliderInput",type:"range",min:t.min,max:t.max,step:t.step,"onUpdate:modelValue":p[0]||(p[0]=d=>n.value=d),onInput:s},null,40,Oe),[[e.vModelText,n.value]]),e.renderSlot(y.$slots,"default")]))}},xe=["tabindex","aria-label","aria-checked","onKeydown"],_e=[e.createElementVNode("div",{class:"spicyToggleKnob"},null,-1)],K={__name:"SpicyToggle",props:{modelValue:Boolean,label:{type:String,default:"Toggle"},variant:{type:String,default:"filled",validator:t=>["outlined","filled"].includes(t)},borderColor:String,activeColor:{type:String,default:"var(--skPrimaryColor)"}},emits:["update:modelValue"],setup(t,{emit:l}){const o=t,a=e.computed(()=>({"--skBorderColor":o.borderColor,"--activeColor":o.activeColor})),n=l,s=()=>{n("update:modelValue",!o.modelValue)};return(y,p)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:["spicyToggle",{outlined:t.variant==="outlined","is-active":t.modelValue}],tabindex:y.disabled?-1:0,role:"switch",style:{...a.value},"aria-label":t.label,"aria-checked":t.modelValue.toString(),onClick:s,onKeydown:[e.withKeys(e.withModifiers(s,["prevent"]),["space"]),e.withKeys(e.withModifiers(s,["prevent"]),["enter"])]},y.$attrs),_e,16,xe))}},Ke=["aria-hidden"],Pe={key:0,class:"spicyTooltipIcon"},Le=["aria-label"],Ae={key:2,class:"spicyTooltipIcon"},P={__name:"SpicyTooltip",props:{text:String,prependIcon:String,appendIcon:String,position:{type:String,default:"top",validator:t=>["top","bottom","left","right"].includes(t)}},setup(t){const l=t,o=e.ref(!1),a=e.ref(null),n=e.reactive({position:"absolute",top:"0px",left:"0px",maxWidth:"175px"}),s=r=>{const c=r.right-window.innerWidth;c>0&&(n.left=`${parseInt(n.left)-c-5}px`),r.left<0&&(n.left="5px")},y={top:(r,c)=>{n.left=`${r.left+(r.width-c.width)/2}px`,n.top=`${r.top-c.height-5}px`},bottom:(r,c)=>{n.left=`${r.left+(r.width-c.width)/2}px`,n.top=`${r.bottom+5}px`},left:(r,c)=>{n.left=`${r.left-c.width-5}px`,n.top=`${r.top+(r.height-c.height)/2}px`},right:(r,c)=>{n.left=`${r.right+5}px`,n.top=`${r.top+(r.height-c.height)/2}px`}},p=()=>{o.value=!0,e.nextTick(()=>{if(a.value&&o.value){const r=a.value.getBoundingClientRect(),c=a.value.querySelector(".spicyTooltip").getBoundingClientRect(),u=y[l.position];u(r,c),s(c)}})},d=()=>{o.value=!1};return(r,c)=>(e.openBlock(),e.createElementBlock("div",{onMouseover:p,onMouseleave:d,ref_key:"host",ref:a},[e.renderSlot(r.$slots,"default"),o.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"spicyTooltip",style:e.normalizeStyle(n),role:"tooltip","aria-hidden":!o.value},[t.prependIcon?(e.openBlock(),e.createElementBlock("span",Pe,e.toDisplayString(t.prependIcon),1)):e.createCommentVNode("",!0),t.text?(e.openBlock(),e.createElementBlock("span",{key:1,class:"spicyTooltipText","aria-label":t.text},e.toDisplayString(t.text),9,Le)):e.createCommentVNode("",!0),t.appendIcon?(e.openBlock(),e.createElementBlock("span",Ae,e.toDisplayString(t.appendIcon),1)):e.createCommentVNode("",!0)],12,Ke)):e.createCommentVNode("",!0)],544))}};function V(t,l){const o={YYYY:()=>t.getFullYear().toString(),MM:()=>(t.getMonth()+1).toString().padStart(2,"0"),DD:()=>t.getDate().toString().padStart(2,"0")};return l.replace(/YYYY|MM|DD/g,a=>o[a]())}function L(t){const[l,o,a]=t.split("-");return new Date(Number(l),Number(o)-1,Number(a))}function A(t,l){const o=Math.abs(l.getTime()-t.getTime());return Math.ceil(o/(1e3*60*60*24))}function z(t,l){const o=new Date(t);return o.setDate(t.getDate()+l),o}function Y(t,l){const o=new Date(t);return o.setDate(t.getDate()-l),o}function U(t){const l=new Date;return t.getDate()===l.getDate()&&t.getMonth()===l.getMonth()&&t.getFullYear()===l.getFullYear()}function W(t){const l=new Date;return l.setDate(l.getDate()-1),t.getDate()===l.getDate()&&t.getMonth()===l.getMonth()&&t.getFullYear()===l.getFullYear()}function j(t){const l=new Date;return l.setDate(l.getDate()+1),t.getDate()===l.getDate()&&t.getMonth()===l.getMonth()&&t.getFullYear()===l.getFullYear()}function H(t="YYYY-MM-DD",l={show:!0,separator:"-"}){if(typeof t!="string"||typeof l!="object"||!l.hasOwnProperty("show")||typeof l.show!="boolean")throw new Error('Invalid parameters: Please provide a valid format string and options object with a boolean "show" property.');let a=V(new Date,t);return l.separator&&l.separator!=="-"&&(a=a.replace(/-/g,l.separator)),l.show?{value:a,isVisible:!0}:{value:a,isVisible:!1}}const ze=Object.freeze(Object.defineProperty({__proto__:null,currentDate:H,dateAdd:z,dateDiff:A,dateIsToday:U,dateIsTomorrow:j,dateIsYesterday:W,dateSubtract:Y,formatDate:V,parseDate:L},Symbol.toStringTag,{value:"Module"}));function X(t){const l=new WeakMap;function o(a){if(h(a)||typeof a!="object")return a;if(l.has(a))return l.get(a);const n=Array.isArray(a)?[]:{};l.set(a,n);for(const s in a)Object.prototype.hasOwnProperty.call(a,s)&&(n[s]=o(a[s]));return n}return o(t)}function D(...t){const l={};return t.forEach(o=>{if(!h(o)){for(const a in o)if(Object.prototype.hasOwnProperty.call(o,a)){const n=o[a];n!==void 0&&(typeof n=="object"&&n!==null&&!Array.isArray(n)?l[a]=D(l[a]||{},n):l[a]=n)}}}),l}function R(...t){return h(t[0])?t[0]:Object.assign({},...t)}function q(t){return h(t)?[]:Object.keys(t)}function G(t){return h(t)?[]:Object.values(t)}function J(t){return h(t)?[]:Object.entries(t)}function h(t){return t===null||typeof t!="object"?!1:Array.isArray(t)?t.length===0:Object.keys(t).length===0}const Ye=Object.freeze(Object.defineProperty({__proto__:null,deepClone:X,deepMerge:D,getObjectEntries:J,getObjectKeys:q,getObjectValues:G,isObjectEmpty:h,mergeObjects:R},Symbol.toStringTag,{value:"Module"}));function B(t){try{return new URL(t),!0}catch(l){return console.error("Invalid URL:",l),!1}}function Q(t){return B(t)?new URL(t).hostname:null}function Z(t,l){if(!B(t))return t;const o=new URL(t);return Object.keys(l).forEach(a=>o.searchParams.append(a,l[a])),o.toString()}function v(t,l,o="https"){if(!["http","https","ftp","sftp","ftps","ssh"].includes(o.toLowerCase()))throw new Error("Invalid protocol: "+o);if(!/^(?!:\/\/)([a-z0-9-]+\.)*[a-z0-9-]+$/i.test(t))throw new Error("Invalid hostname: "+t);return l.startsWith("/")||(l="/"+l),l.endsWith("/")&&l.length>1&&(l=l.slice(0,-1)),l==="/"&&(l=""),`${o.toLowerCase()}://${t}${l}`}const Ue=Object.freeze(Object.defineProperty({__proto__:null,appendParamsToUrl:Z,generateUrl:v,getHostname:Q,isUrlValid:B},Symbol.toStringTag,{value:"Module"})),ee=':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)}',We={install(t,l={}){const{useComponents:o=!0,useStyles:a=!0}=l;if(o&&(t.component("SpicyAlert",T),t.component("SpicyBtn",N),t.component("SpicyCarousel",M),t.component("SpicyDivider",F),t.component("SpicyKeyboard",I),t.component("SpicyLabel",O),t.component("SpicyModal",x),t.component("SpicySlider",_),t.component("SpicyToggle",K),t.component("SpicyTooltip",P)),a){const n=document.createElement("style");n.textContent=ee,document.head.appendChild(n)}}};i.SpicyAlert=T,i.SpicyBtn=N,i.SpicyCarousel=M,i.SpicyDivider=F,i.SpicyKatsu=We,i.SpicyKeyboard=I,i.SpicyLabel=O,i.SpicyModal=x,i.SpicySlider=_,i.SpicyToggle=K,i.SpicyTooltip=P,i.appendParamsToUrl=Z,i.currentDate=H,i.dateAdd=z,i.dateDiff=A,i.dateIsToday=U,i.dateIsTomorrow=j,i.dateIsYesterday=W,i.dateSubtract=Y,i.dateUtils=ze,i.deepClone=X,i.deepMerge=D,i.formatDate=V,i.generateUrl=v,i.getHostname=Q,i.getObjectEntries=J,i.getObjectKeys=q,i.getObjectValues=G,i.isObjectEmpty=h,i.isUrlValid=B,i.mergeObjects=R,i.objUtils=Ye,i.parseDate=L,i.spicyStyles=ee,i.urlUtils=Ue,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .fade-enter-active,.fade-leave-active{transition:opacity .35s}.fade-enter,.fade-leave-to{opacity:0}.spicyAlert{display:flex;align-items:center;padding:12px;border-radius:4px;margin-bottom:12px}.spicyAlertIcon{margin-right:8px}.spicyAlertCloseBtn{margin-left:auto;background:none;border:none;cursor:pointer}.info{background-color:#e0e0e0;color:#333}.success{background-color:#bcf7c9;color:#155724}.warning{background-color:#fff3cd;color:#856404}.error{background-color:#ffbdc2;color:#911f2a}.spicyBtn{padding:8px 16px;background-color:var(--skBgColor, #28292a);border:none;border-radius:4px;color:var(--skTextColor, #ddd);cursor:pointer;font-size:14px;transition:background-color .25s}.spicyBtn.outlined{background-color:var(--skBgColor, transparent);border:2px solid var(--skBorderColor, #515353);color:var(--skTextColor, #ddd)}.spicyBtn.disabled{opacity:.5;cursor:not-allowed}.spicyBtn:hover:not(.disabled){background-color:var(--hoverColor, grey)}.spicyBtn.outlined:hover:not(.disabled){background-color:var(--hoverColor, grey);color:var(--skTextColor, #ddd)}.spicyBtnIcon{margin-right:6px}.spicyCarouselContainer{position:relative;overflow:hidden;width:var(--width, 540px);height:var(--height, 300px);border-radius:var(--borderRadius)}.spicyCarouselSlide{position:absolute;top:0;left:0;width:100%;height:100%;background-size:cover;background-position:center;background-repeat:no-repeat;transition:transform .3s ease}.spicyCarouselTextOverlay{position:absolute;bottom:10px;left:10px;background-color:#000000bf;padding:10px;color:#ccc;font-size:18px;font-weight:700;text-shadow:2px 2px 4px rgba(0,0,0,.5);border-radius:4px}.spicyCarouselTextOverlay.fullScreen{top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;text-align:center;background-color:#00000059}.slide-enter-active,.slide-leave-active{transition:opacity .3s}.slide-enter,.slide-leave-to{opacity:0}.spicyCarouselPrevNav,.spicyCarouselNextNav{width:100%;display:flex;align-items:center}.spicyCarouselNavControls{height:100%;display:flex}.spicyCarouselPrevBtn,.spicyCarouselNextBtn{position:absolute;border:none;font-size:24px;color:#ccc;cursor:pointer;z-index:1;text-shadow:0 0 5px black;background:#00000080;height:35px;width:35px;border-radius:50%}.spicyCarouselPrevBtnIcon,.spicyCarouselNextBtnIcon{display:flex;align-items:center;justify-content:center}.spicyCarouselPrevBtn{left:6px}.spicyCarouselNextBtn{right:6px}.spicyCarouselPagination{position:absolute;bottom:4px;left:50%;transform:translate(-50%);text-shadow:0 0 5px black}.spicyCarouselPageBtn{border:none;color:#ccc;cursor:pointer;margin:0 4px;background:#00000080;height:25px;width:25px;border-radius:50%;font-weight:700}.spicyCarouselPageBtn.active{background:var(--activeColor);font-weight:700}.pointCursor{cursor:pointer}.kbContainer{display:flex;gap:10px;padding:10px;border:1px solid #ccc;border-radius:5px;background-color:#f0f0f0}.kbSidebar{display:flex;flex-direction:column;gap:5px}.sidebar label{display:flex;align-items:center;gap:5px}.spicyKB{display:flex;flex-direction:row;gap:5px;background-color:#333;border-radius:5px;padding:10px}.kbSection{display:flex;flex-direction:column;gap:5px}.spicyKBRow{display:flex;gap:5px}.spicyKBKey{padding:10px;border:1px solid #ccc;border-radius:5px;background-color:#f0f0f0;cursor:pointer;transition:background-color .2s ease;font-family:Courier New,Courier,monospace;font-weight:700;text-transform:uppercase}.spicyKBKey:hover,.spicyKBKey.is-active{background-color:#e0e0e0}.key-backspace{width:100px}.key-tab,.key-caps,.key-enter,.key-shift{width:120px}.key-ctrl,.key-win,.key-alt,.key-fn{width:70px}.key-space{width:400px}.key-fullwidth{width:100%}.key-small{width:60px}.key-wide{width:80px}.keyText{-webkit-user-select:none;user-select:none}.spicyInputWrapper{display:flex;flex-direction:column;position:relative}.spicyInputLabel{position:absolute;top:12px;left:16px;color:var(--textColor, var(--skTextColor));transition:top .25s,font-size .25s,color .25s;pointer-events:none;font-size:18px;background-color:transparent}.spicyInput{padding:20px 16px 8px;border:none;border-bottom:1px solid var(--skBorderColor, #515353);font-size:16px;width:100%;box-sizing:border-box;transition:border-color .25s;background-color:transparent;color:var(--textColor, var(--skTextColor, #ddd))}.spicyInputWrapper .spicyInput:focus{outline:none;border-color:var(--skLabelFocus)}.outlined .spicyInput{border:1px solid var(--skBorderColor, #515353);border-radius:4px}.filled .spicyInput{border:none;border-bottom:1px solid var(--skBorderColor, #515353)}.hasValue .spicyInputLabel,.hasFocus .spicyInputLabel{top:-18px;font-size:16px;color:var(--skLabelFocus);font-weight:700}.hasError .spicyInput{border-color:red}.spicyInputError{color:red;font-size:12px}.spicyModalOverlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#0009;display:flex;justify-content:center;align-items:center;z-index:1000}.spicyModal{padding:20px;box-shadow:0 0 6px 2px #0003;transition:transform .3s ease-out;font-size:15px;border-radius:var(--skBorderRadius);background-color:var(--skBgColor);z-index:1001}.spicyModalHeader{text-align:center;font-size:20px;font-weight:700}.spicyModalActions{margin-top:20px;text-align:right}.spicyModalActionBtn{background-color:transparent;border:none;color:var(--skTextColor, #ddd);cursor:pointer}.spicyModalActionBtn:hover{text-decoration:underline}.spicyToggle{width:50px;height:24px;background-color:var(--skBgSecondaryColor, #424344);border-radius:30px;cursor:pointer;padding:2px;transition:background-color .2s;display:inline-flex;align-items:center}.spicyToggle.is-active{background-color:var(--activeColor, var(--skPrimaryColor))}.spicyToggleKnob{width:20px;height:20px;background-color:#fff;border-radius:50%;transition:transform .2s;box-shadow:0 2px 4px #0003}.spicyToggle.is-active .spicyToggleKnob{transform:translate(26px)}.spicyToggle.outlined{background-color:transparent;border:2px solid var(--skBorderColor, #515353)}.spicyToggle.outlined.is-active{background-color:var(--activeColor, var(--skPrimaryColor));border-color:var(--activeColor, var(--skPrimaryColor))}.spicyTooltip{z-index:9999;background-color:var(--skBgColor);color:var(--skTextColor);padding:8px;border-radius:4px;font-size:15px;border:1px solid var(--skBorderColor);display:flex;align-items:center;justify-content:center}.spicyTooltipIcon{font-size:18px}
1
+ .fade-enter-active,.fade-leave-active{transition:opacity .35s}.fade-enter,.fade-leave-to{opacity:0}.spicyAlert{display:flex;align-items:center;padding:12px;border-radius:4px;margin-bottom:12px}.spicyAlertIcon{margin-right:8px}.spicyAlertCloseBtn{margin-left:auto;background:none;border:none;cursor:pointer}.info{background-color:#e0e0e0;color:#333}.success{background-color:#bcf7c9;color:#155724}.warning{background-color:#fff3cd;color:#856404}.error{background-color:#ffbdc2;color:#911f2a}.spicyBtn{padding:8px 16px;background-color:var(--skBgColor, #28292a);border:none;border-radius:4px;color:var(--skTextColor, #ddd);cursor:pointer;font-size:14px;transition:background-color .25s}.spicyBtn.outlined{background-color:var(--skBgColor, transparent);border:2px solid var(--skBorderColor, #515353);color:var(--skTextColor, #ddd)}.spicyBtn.disabled{opacity:.5;cursor:not-allowed}.spicyBtn:hover:not(.disabled){background-color:var(--hoverColor, grey)}.spicyBtn.outlined:hover:not(.disabled){background-color:var(--hoverColor, grey);color:var(--skTextColor, #ddd)}.spicyBtnIcon{margin-right:6px}.spicyCarouselWrapper{position:relative;width:var(--width, 580px);height:var(--height, 360px);padding:30px;display:flex;align-items:center;justify-content:center}.spicyCarouselTitle{position:absolute;top:0;width:var(--width, 580px);background-color:#0009;height:30px;color:#ccc;font-size:18px;font-weight:700}.spicyCarouselContainer{position:relative;overflow:hidden;width:100%;height:100%;border-radius:var(--borderRadius);background-color:#0009}.spicyCarouselSlide{position:absolute;top:0;left:0;width:100%;height:100%;background-size:cover;background-position:center;background-repeat:no-repeat;transition:opacity .3s ease}.spicyCarouselTextOverlay{position:absolute;bottom:10px;left:10px;background-color:#000000bf;padding:10px;color:#ccc;font-size:18px;font-weight:700;text-shadow:2px 2px 4px rgba(0,0,0,.5);border-radius:4px}.spicyCarouselTextOverlay.fullScreen{top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;text-align:center;background-color:#0000004d}.slide-enter-active,.slide-leave-active{transition:opacity .3s}.slide-enter,.slide-leave-to{opacity:0}.spicyCarouselNavControls{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.spicyCarouselNextBtn{border-radius:0 6px 6px 0}.spicyCarouselPrevBtn{border-radius:6px 0 0 6px}.spicyCarouselPrevBtn,.spicyCarouselNextBtn{border:none;font-size:24px;color:#ccc;cursor:pointer;background:#0009;height:100%;width:30px;display:flex;align-items:center;justify-content:center;transition:transform .3s;pointer-events:auto;z-index:2}.spicyCarouselPrevBtn:hover,.spicyCarouselNextBtn:hover{background:var(--skPrimaryColor)}.spicyCarouselPagination{position:absolute;background:#0009;bottom:0;left:50%;height:30px;width:var(--width, 580px);transform:translate(-50%);display:flex;gap:8px;z-index:2;align-items:center;justify-content:center;pointer-events:auto}.spicyCarouselPageBtn{border:none;color:#fff;cursor:pointer;background:#00b7ff80;height:26px;width:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:transform .3s}.spicyCarouselPageBtn.active,.spicyCarouselPageBtn:hover{background:var(--skPrimaryColor)}.pointCursor{cursor:pointer}.spicyDivider{width:100%;border:none}.kbContainer{display:flex;gap:10px;padding:10px;border:1px solid #ccc;border-radius:5px;background-color:#f0f0f0}.kbSidebar{display:flex;flex-direction:column;gap:5px}.sidebar label{display:flex;align-items:center;gap:5px}.spicyKB{display:flex;flex-direction:row;gap:5px;background-color:#333;border-radius:5px;padding:10px}.kbSection{display:flex;flex-direction:column;gap:5px}.spicyKBRow{display:flex;gap:5px}.spicyKBKey{padding:10px;border:1px solid #ccc;border-radius:5px;background-color:#f0f0f0;cursor:pointer;transition:background-color .2s ease;font-family:Courier New,Courier,monospace;font-weight:700;text-transform:uppercase}.spicyKBKey:hover,.spicyKBKey.is-active{background-color:#e0e0e0}.key-backspace{width:100px}.key-tab,.key-caps,.key-enter,.key-shift{width:120px}.key-ctrl,.key-win,.key-alt,.key-fn{width:70px}.key-space{width:400px}.key-fullwidth{width:100%}.key-small{width:60px}.key-wide{width:80px}.keyText{-webkit-user-select:none;user-select:none}.spicyInputWrapper{display:flex;flex-direction:column;position:relative}.spicyInputLabel{position:absolute;top:12px;left:16px;color:var(--textColor, var(--skTextColor));transition:top .25s,font-size .25s,color .25s;pointer-events:none;font-size:18px;background-color:transparent}.spicyInput{padding:20px 16px 8px;border:none;border-bottom:1px solid var(--skBorderColor, #515353);font-size:16px;width:100%;box-sizing:border-box;transition:border-color .25s;background-color:transparent;color:var(--textColor, var(--skTextColor, #ddd))}.spicyInputWrapper .spicyInput:focus{outline:none;border-color:var(--skLabelFocus)}.outlined .spicyInput{border:1px solid var(--skBorderColor, #515353);border-radius:4px}.filled .spicyInput{border:none;border-bottom:1px solid var(--skBorderColor, #515353)}.hasValue .spicyInputLabel,.hasFocus .spicyInputLabel{top:-18px;font-size:16px;color:var(--skLabelFocus);font-weight:700}.hasError .spicyInput{border-color:red}.spicyInputError{color:red;font-size:12px}.spicyModalOverlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#0009;display:flex;justify-content:center;align-items:center;z-index:1000}.spicyModal{padding:20px;box-shadow:0 0 6px 2px #0003;transition:transform .3s ease-out;font-size:15px;border-radius:var(--skBorderRadius);background-color:var(--skBgColor);z-index:1001}.spicyModalHeader{text-align:center;font-size:20px;font-weight:700}.spicyModalActions{margin-top:20px;text-align:right}.spicyModalActionBtn{background-color:transparent;border:none;color:var(--skTextColor, #ddd);cursor:pointer}.spicyModalActionBtn:hover{text-decoration:underline}.spicySlider{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.spicySliderLabel{margin-bottom:5px;font-size:16px}.spicySliderInput{width:100%}.spicyToggle{width:50px;height:24px;background-color:var(--skBgSecondaryColor, #424344);border-radius:30px;cursor:pointer;padding:2px;transition:background-color .2s;display:inline-flex;align-items:center}.spicyToggle.is-active{background-color:var(--activeColor, var(--skPrimaryColor))}.spicyToggleKnob{width:20px;height:20px;background-color:#fff;border-radius:50%;transition:transform .2s;box-shadow:0 2px 4px #0003}.spicyToggle.is-active .spicyToggleKnob{transform:translate(26px)}.spicyToggle.outlined{background-color:transparent;border:2px solid var(--skBorderColor, #515353)}.spicyToggle.outlined.is-active{background-color:var(--activeColor, var(--skPrimaryColor));border-color:var(--activeColor, var(--skPrimaryColor))}.spicyTooltip{z-index:9999;background-color:var(--skBgColor);color:var(--skTextColor);padding:8px;border-radius:4px;font-size:15px;border:1px solid var(--skBorderColor);display:flex;align-items:center;justify-content:center}.spicyTooltipIcon{font-size:18px}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "license": "MIT",
5
5
  "author": "Sato",
6
6
  "private": false,
7
- "version": "0.0.35",
7
+ "version": "0.0.37",
8
8
  "files": [
9
9
  "dist/",
10
10
  "package.json",
@@ -18,13 +18,15 @@
18
18
  "publish": "npm publish",
19
19
  "docsdev": "vitepress dev docs",
20
20
  "docsbuild": "vitepress build docs",
21
- "docspreview": "vitepress preview docs"
21
+ "docspreview": "vitepress preview docs",
22
+ "prettier": "prettier --config ./.prettier.json --write --ignore-path .gitignore ./src"
22
23
  },
23
24
  "dependencies": {
24
25
  "vue": "^3.4.23"
25
26
  },
26
27
  "devDependencies": {
27
28
  "@vitejs/plugin-vue": "^5.0.4",
29
+ "prettier": "^3.3.3",
28
30
  "typescript": "^5.4.5",
29
31
  "vite": "^5.2.9",
30
32
  "vitepress": "^1.1.3",