spicykatsu 0.0.34 → 0.0.36

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