spicykatsu 0.0.33 → 0.0.35

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