spicykatsu 0.0.33 → 0.0.34

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
@@ -3,4 +3,6 @@
3
3
  Fun, simple library for Vue3. Something for me to play around with in my projects.
4
4
  The idea is to make things simple and lightweight. While keeping functionality.
5
5
 
6
- Included will be componenets and utilites. Maybe more in the future.
6
+ Included will be componenets and utilites. Maybe more in the future.
7
+
8
+ Docs: [SpicyKatsu Docs](https://satoru8.gitlab.io/spicykatsuvlib/)
@@ -1,8 +1,8 @@
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 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 = {
3
3
  key: 0,
4
4
  class: "spicyAlertIcon"
5
- }, W = { key: 1 }, R = {
5
+ }, oe = { key: 1 }, le = {
6
6
  __name: "SpicyAlert",
7
7
  props: {
8
8
  variant: {
@@ -17,33 +17,38 @@ const U = {
17
17
  autoClose: { type: Number, default: 0 }
18
18
  },
19
19
  setup(e) {
20
- const t = e, l = w(!0), n = () => {
21
- l.value = !1;
20
+ const t = e, o = C(!0), n = () => {
21
+ o.value = !1;
22
22
  };
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", {
23
+ return H(
24
+ () => t.autoClose,
25
+ (l) => {
26
+ l > 0 && setTimeout(() => {
27
+ o.value = !1;
28
+ }, l);
29
+ }
30
+ ), (l, c) => (s(), j(V, { name: "fade" }, {
31
+ default: E(() => [
32
+ o.value ? (s(), i("div", {
28
33
  key: 0,
29
- class: h(["spicyAlert", e.variant])
34
+ class: S(["spicyAlert", e.variant])
30
35
  }, [
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", {
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", {
34
39
  key: 2,
35
40
  class: "closeBtn",
36
41
  onClick: n
37
- }, "×")) : c("", !0)
38
- ], 2)) : c("", !0)
42
+ }, "×")) : p("", !0)
43
+ ], 2)) : p("", !0)
39
44
  ]),
40
45
  _: 1
41
46
  }));
42
47
  }
43
- }, j = ["disabled"], H = {
48
+ }, ne = ["disabled"], ae = {
44
49
  key: 0,
45
50
  class: "spicyBtnIcon"
46
- }, K = {
51
+ }, se = {
47
52
  __name: "SpicyBtn",
48
53
  props: {
49
54
  variant: {
@@ -64,32 +69,36 @@ const U = {
64
69
  },
65
70
  emits: ["click"],
66
71
  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,
73
- "--hoverColor": l.hoverColor
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
74
79
  }));
75
- return (o, a) => (r(), i("button", {
76
- class: h(["spicyBtn", { outlined: e.variant === "outlined", disabled: e.disabled }]),
77
- style: k({ ...n.value }),
80
+ return (l, c) => (s(), i("button", {
81
+ class: S(["spicyBtn", { outlined: e.variant === "outlined", disabled: e.disabled }]),
82
+ style: I({ ...n.value }),
78
83
  disabled: e.disabled,
79
- onClick: a[0] || (a[0] = (...f) => o.onClick && o.onClick(...f))
84
+ onClick: c[0] || (c[0] = (v) => l.$emit("click"))
80
85
  }, [
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));
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));
85
90
  }
86
- }, q = {
91
+ }, ie = ["aria-label"], re = { class: "infoText" }, ce = {
87
92
  key: 0,
88
93
  class: "navControls"
89
- }, G = {
94
+ }, ue = /* @__PURE__ */ y("span", { class: "prevBtnIcon" }, "<", -1), de = [
95
+ ue
96
+ ], ye = /* @__PURE__ */ y("span", { class: "nextBtnIcon" }, ">", -1), pe = [
97
+ ye
98
+ ], fe = {
90
99
  key: 1,
91
100
  class: "pagination"
92
- }, J = ["onClick"], Q = {
101
+ }, ve = ["onClick"], ge = { class: "page" }, he = {
93
102
  __name: "SpicyCarousel",
94
103
  props: {
95
104
  autoplay: { type: Boolean, default: !1 },
@@ -102,88 +111,245 @@ const U = {
102
111
  slides: { type: Array, required: !0 },
103
112
  width: { type: String, default: "540px" },
104
113
  height: { type: String, default: "300px" },
105
- variant: { type: String, default: "" }
114
+ fullScreen: { type: Boolean, default: !1 },
115
+ enableImageClick: { type: Boolean, default: !1 }
106
116
  },
107
117
  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]);
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]);
113
124
  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 = () => {
125
+ 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 = () => {
124
132
  clearInterval(a);
125
- }, p = () => {
126
- t.autoplay && (a = setInterval(y, t.autoplaySpeed));
133
+ }, w = () => {
134
+ l.autoplay && (a = setInterval(u, l.autoplaySpeed));
135
+ }, $ = () => {
136
+ window.open(g.value.img);
137
+ }, 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));
145
+ }
127
146
  };
128
- return N(() => {
147
+ return X(() => {
148
+ l.autoplay && (a = setInterval(u, l.autoplaySpeed));
149
+ }), R(() => {
129
150
  clearInterval(a);
130
- }), (g, Me) => (r(), i("div", {
151
+ }), (b, _) => (s(), i("div", {
131
152
  class: "carouselContainer",
132
- style: k({ ...l.value }),
133
- onMouseenter: s,
134
- onMouseleave: p
153
+ style: I({ ...c.value }),
154
+ onMouseenter: h,
155
+ onMouseleave: w,
156
+ onTouchstart: m,
157
+ onTouchmove: O
135
158
  }, [
136
- F(x, {
159
+ q(V, {
137
160
  name: "slide",
138
161
  mode: "out-in"
139
162
  }, {
140
- default: $(() => [
141
- (r(), i("div", {
142
- key: n.value,
143
- class: "slide",
144
- style: k({ backgroundImage: `url(${o.value.img})` })
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
145
170
  }, [
146
- S(g.$slots, "default"),
147
- e.slides[n.value].text ? (r(), i("div", {
171
+ e.slides[r.value].text ? (s(), i("div", {
148
172
  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))
173
+ class: S(["textOverlay", { fullScreen: v.value }])
174
+ }, [
175
+ y("span", re, f(e.slides[r.value].text), 1)
176
+ ], 2)) : p("", !0),
177
+ B(b.$slots, "default")
178
+ ], 14, ie))
152
179
  ]),
153
180
  _: 3
154
181
  }),
155
- e.showNavigation ? (r(), i("div", q, [
156
- u("div", { class: "prevNav" }, [
157
- u("button", {
158
- class: "prev",
159
- onClick: f
160
- }, "<")
182
+ e.showNavigation ? (s(), i("div", ce, [
183
+ y("div", { class: "prevNav" }, [
184
+ y("button", {
185
+ class: "prevBtn",
186
+ onClick: d
187
+ }, de)
161
188
  ]),
162
- u("div", { class: "nextNav" }, [
163
- u("button", {
164
- class: "next",
165
- onClick: y
166
- }, ">")
189
+ y("div", { class: "nextNav" }, [
190
+ y("button", {
191
+ class: "nextBtn",
192
+ onClick: u
193
+ }, pe)
167
194
  ])
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)
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 }])
201
+ }, [
202
+ y("span", ge, f(K + 1), 1)
203
+ ], 10, ve))), 128))
204
+ ])) : p("", !0)
176
205
  ], 36));
177
206
  }
178
- }, X = ["placeholder"], Z = {
207
+ }, me = { class: "kbContainer" }, be = { class: "kbSidebar" }, Se = ["onUpdate:modelValue"], ke = { class: "spicyKB" }, Ce = ["onMousedown", "onTouchstart", "onClick"], we = { class: "keyText" }, $e = {
208
+ __name: "SpicyKeyboard",
209
+ emits: ["input"],
210
+ setup(e, { emit: t }) {
211
+ const o = C(null), n = C([
212
+ {
213
+ label: "Function Keys",
214
+ visible: !1,
215
+ layout: [
216
+ [
217
+ "Esc",
218
+ "F1",
219
+ "F2",
220
+ "F3",
221
+ "F4",
222
+ "F5",
223
+ "F6",
224
+ "F7",
225
+ "F8",
226
+ "F9",
227
+ "F10",
228
+ "F11",
229
+ "F12",
230
+ "PrtScr",
231
+ "ScrLk",
232
+ "Pause"
233
+ ]
234
+ // ['PrtScr', 'ScrLk', 'Pause'],
235
+ ]
236
+ },
237
+ {
238
+ label: "Main Keys",
239
+ visible: !0,
240
+ layout: [
241
+ ["`", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "=", "Backspace"],
242
+ ["Tab", "Q", "W", "E", "R", "T", "Y", "U", "I", "O", "P", "[", "]", "\\"],
243
+ ["Caps", "A", "S", "D", "F", "G", "H", "J", "K", "L", ";", "'", "Enter"],
244
+ ["Shift", "Z", "X", "C", "V", "B", "N", "M", ",", ".", "/", "Shift"],
245
+ ["Ctrl", "Win", "Alt", "Space", "Alt", "Fn", "Ctrl"]
246
+ ]
247
+ },
248
+ {
249
+ label: "Arrow Keys",
250
+ visible: !0,
251
+ layout: [
252
+ ["Ins", "Home", "PgUp"],
253
+ ["Del", "End", "PgDn"],
254
+ ["&uarr;", "&larr;", "&darr;", "&rarr;"]
255
+ ]
256
+ },
257
+ {
258
+ label: "Numpad",
259
+ visible: !0,
260
+ layout: [
261
+ ["NumLock", "/", "*", "-"],
262
+ ["7", "8", "9", "+"],
263
+ ["4", "5", "6"],
264
+ ["1", "2", "3", "Enter"],
265
+ ["0", "."]
266
+ ]
267
+ }
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) => [
277
+ "Backspace",
278
+ "Tab",
279
+ "Caps",
280
+ "Enter",
281
+ "Shift",
282
+ "Ctrl",
283
+ "Win",
284
+ "Alt",
285
+ "Space",
286
+ "Fn",
287
+ "Ins",
288
+ "Del",
289
+ "Home",
290
+ "End",
291
+ "PgUp",
292
+ "PgDn",
293
+ "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" : "";
297
+ };
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", {
301
+ class: "sidebar",
302
+ key: w
303
+ }, [
304
+ y("label", null, [
305
+ N(y("input", {
306
+ type: "checkbox",
307
+ "onUpdate:modelValue": ($) => h.visible = $
308
+ }, null, 8, Se), [
309
+ [G, h.visible]
310
+ ]),
311
+ U(" " + f(h.label), 1)
312
+ ])
313
+ ]))), 128))
314
+ ]),
315
+ y("div", ke, [
316
+ (s(!0), i(M, null, F(l.value, (h, w) => (s(), i("div", {
317
+ class: S(["kbSection", { [h.label.toLowerCase().replace(/\s+/g, "")]: !0 }]),
318
+ key: w
319
+ }, [
320
+ (s(!0), i(M, null, F(h.layout, ($, k) => (s(), i("div", {
321
+ class: "spicyKBRow",
322
+ key: k
323
+ }, [
324
+ (s(!0), i(M, null, F($, (m) => (s(), i("button", {
325
+ key: m,
326
+ class: S(["spicyKBKey", [
327
+ { "is-active": o.value === m },
328
+ a(m),
329
+ d(m, h.layout, k)
330
+ ]]),
331
+ onMousedown: (O) => v(m),
332
+ onMouseup: r,
333
+ onTouchstart: (O) => v(m),
334
+ onTouchend: r,
335
+ onClick: (O) => g(m)
336
+ }, [
337
+ y("span", we, f(m), 1)
338
+ ], 42, Ce))), 128))
339
+ ]))), 128))
340
+ ], 2))), 128))
341
+ ])
342
+ ]));
343
+ }
344
+ }, xe = { class: "spicyInputLabel" }, Be = ["placeholder"], Te = {
179
345
  key: 0,
180
346
  class: "spicyInputError"
181
- }, _ = {
347
+ }, Me = {
182
348
  __name: "SpicyLabel",
183
349
  props: {
184
350
  value: { type: String, default: "" },
185
351
  placeholder: { type: String, default: "" },
186
- label: { type: String, default: "Label" },
352
+ label: { type: String, default: "" },
187
353
  error: { type: String, default: "" },
188
354
  variant: {
189
355
  type: String,
@@ -192,44 +358,32 @@ const U = {
192
358
  }
193
359
  },
194
360
  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;
361
+ const o = C(e.value), n = C(!1), l = (r) => {
362
+ o.value = r.target.value;
363
+ }, c = () => {
364
+ n.value = !1;
365
+ }, v = () => {
366
+ n.value = !0;
209
367
  };
210
- return (s, p) => (r(), i("div", {
211
- class: h(["spicyInputWrapper", [e.variant, { hasValue: n.value || e.value, hasFocus: o.value, hasError: e.error }]])
368
+ return (r, g) => (s(), i("div", {
369
+ class: S(["spicyInputWrapper", [e.variant, { hasValue: o.value || e.value, hasFocus: n.value, hasError: e.error }]])
212
370
  }, [
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),
371
+ y("label", xe, f(e.label), 1),
372
+ N(y("input", {
373
+ class: S(["spicyInput", e.variant]),
374
+ "onUpdate:modelValue": g[0] || (g[0] = (a) => o.value = a),
221
375
  placeholder: e.placeholder,
222
- onInput: f,
223
- onBlur: y,
224
- onFocus: b
225
- }, null, 42, X), [
226
- [P, n.value]
376
+ onInput: l,
377
+ onBlur: c,
378
+ onFocus: v
379
+ }, null, 42, Be), [
380
+ [J, o.value]
227
381
  ]),
228
- S(s.$slots, "default"),
229
- e.error ? (r(), i("span", Z, d(e.error), 1)) : c("", !0)
382
+ B(r.$slots, "default"),
383
+ e.error ? (s(), i("span", Te, f(e.error), 1)) : p("", !0)
230
384
  ], 2));
231
385
  }
232
- }, ee = { class: "spicyModalHeader" }, te = { class: "spicyModalActions" }, le = ["onClick"], ne = {
386
+ }, Fe = { class: "spicyModalHeader" }, De = { class: "spicyModalActions" }, Ie = ["onClick"], Oe = {
233
387
  __name: "SpicyModal",
234
388
  props: {
235
389
  width: { type: String, default: "50%" },
@@ -240,269 +394,349 @@ const U = {
240
394
  closeBtn: { type: Boolean, default: !1 },
241
395
  actions: { type: Array, default: () => [] },
242
396
  closeOnClick: { type: Boolean, default: !0 },
243
- modalTitle: { type: String, default: "Title" }
397
+ modalTitle: { type: String, default: "" }
244
398
  },
245
399
  emits: ["update:visible"],
246
400
  setup(e, { emit: t }) {
247
- const l = e, n = m(() => ({
248
- "--width": l.width,
249
- "--height": l.height,
250
- "--borderRadius": l.borderRadius,
251
- "--bgColor": l.bgColor
252
- })), o = t, a = () => {
253
- o("update:visible", !1);
254
- }, f = () => {
255
- l.closeOnClick && a();
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();
256
410
  };
257
- return (y, b) => e.visible ? (r(), i("div", {
411
+ return (r, g) => e.visible ? (s(), i("div", {
258
412
  key: 0,
259
413
  class: "spicyModalOverlay",
260
- onClick: f
414
+ onClick: v
261
415
  }, [
262
- u("div", {
416
+ y("div", {
263
417
  class: "spicyModal",
264
- style: k({ ...n.value })
418
+ style: I({ ...n.value })
265
419
  }, [
266
- u("header", ee, [
267
- S(y.$slots, "spicyModalHeader", { title: e.modalTitle }, () => [
268
- E(d(e.modalTitle), 1)
420
+ y("header", Fe, [
421
+ B(r.$slots, "spicyModalHeader", { title: e.modalTitle }, () => [
422
+ U(f(e.modalTitle), 1)
269
423
  ])
270
424
  ]),
271
- S(y.$slots, "default"),
272
- u("div", te, [
273
- e.actions.length === 0 && e.closeBtn ? (r(), i("button", {
425
+ B(r.$slots, "default"),
426
+ y("div", De, [
427
+ B(r.$slots, "spicyModalActions"),
428
+ e.actions.length === 0 && e.closeBtn ? (s(), i("button", {
274
429
  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",
280
- key: s.label,
281
- onClick: s.handler
282
- }, d(s.label), 9, le))), 128))
430
+ class: "closeBtn actionBtn",
431
+ 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))
283
438
  ])
284
439
  ], 4)
285
- ])) : c("", !0);
440
+ ])) : p("", !0);
286
441
  }
287
- }, oe = ["aria-checked", "onKeydown", "aria-label"], ae = /* @__PURE__ */ u("div", { class: "spicyToggleKnob" }, null, -1), re = [
288
- ae
289
- ], ie = {
442
+ }, _e = ["aria-checked", "onKeydown", "aria-label"], Ke = /* @__PURE__ */ y("div", { class: "spicyToggleKnob" }, null, -1), Ae = [
443
+ Ke
444
+ ], Le = {
290
445
  __name: "SpicyToggle",
291
446
  props: {
292
447
  modelValue: Boolean,
293
- label: String,
448
+ label: {
449
+ type: String,
450
+ default: "Toggle"
451
+ },
294
452
  variant: {
295
453
  type: String,
296
454
  default: "filled",
297
455
  validator: (e) => ["outlined", "filled"].includes(e)
298
456
  },
299
457
  borderColor: String,
300
- activeColor: String,
301
- focusShadow: String
458
+ activeColor: {
459
+ type: String,
460
+ default: "var(--skPrimaryColor)"
461
+ }
302
462
  },
303
463
  emits: ["update:modelValue"],
304
464
  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 = () => {
310
- o("update:modelValue", !l.modelValue);
465
+ const o = e, n = x(() => ({
466
+ "--skBorderColor": o.borderColor,
467
+ "--activeColor": o.activeColor
468
+ })), l = t, c = () => {
469
+ l("update:modelValue", !o.modelValue);
311
470
  };
312
- return (f, y) => (r(), i("div", L({
471
+ return (v, r) => (s(), i("div", Q({
313
472
  class: ["spicyToggle", { outlined: e.variant === "outlined", "is-active": e.modelValue }],
314
- style: { ...n.value },
315
- onClick: a,
473
+ tabindex: "0",
316
474
  role: "switch",
475
+ style: { ...n.value },
476
+ onClick: c,
317
477
  "aria-checked": e.modelValue.toString(),
318
- tabindex: "0",
319
478
  onKeydown: [
320
- M(O(a, ["prevent"]), ["space"]),
321
- M(O(a, ["prevent"]), ["enter"])
479
+ P(Y(c, ["prevent"]), ["space"]),
480
+ P(Y(c, ["prevent"]), ["enter"])
322
481
  ],
323
482
  "aria-label": e.label
324
- }, f.$attrs), re, 16, oe));
483
+ }, v.$attrs), Ae, 16, _e));
484
+ }
485
+ }, Pe = ["aria-hidden"], Ye = {
486
+ key: 0,
487
+ class: "spicyTooltipIcon"
488
+ }, Ve = {
489
+ key: 1,
490
+ class: "spicyTooltipText"
491
+ }, Ee = {
492
+ key: 2,
493
+ class: "spicyTooltipIcon"
494
+ }, Ne = {
495
+ __name: "SpicyTooltip",
496
+ props: {
497
+ text: String,
498
+ prependIcon: String,
499
+ appendIcon: String,
500
+ position: {
501
+ type: String,
502
+ default: "top",
503
+ validator: (e) => ["top", "bottom", "left", "right"].includes(e)
504
+ }
505
+ },
506
+ setup(e) {
507
+ const t = e, o = C(!1), n = C(null), l = Z({
508
+ position: "absolute",
509
+ top: "0px",
510
+ left: "0px",
511
+ 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`;
518
+ },
519
+ bottom: (a, d) => {
520
+ l.left = `${a.left + (a.width - d.width) / 2}px`, l.top = `${a.bottom + 5}px`;
521
+ },
522
+ left: (a, d) => {
523
+ l.left = `${a.left - d.width - 5}px`, l.top = `${a.top + (a.height - d.height) / 2}px`;
524
+ },
525
+ right: (a, d) => {
526
+ l.left = `${a.right + 5}px`, l.top = `${a.top + (a.height - d.height) / 2}px`;
527
+ }
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);
533
+ }
534
+ });
535
+ }, g = () => {
536
+ o.value = !1;
537
+ };
538
+ return (a, d) => (s(), i("div", {
539
+ onMouseover: r,
540
+ onMouseleave: g,
541
+ ref_key: "host",
542
+ ref: n
543
+ }, [
544
+ B(a.$slots, "default"),
545
+ o.value ? (s(), i("div", {
546
+ key: 0,
547
+ class: "spicyTooltip",
548
+ style: I(l),
549
+ role: "tooltip",
550
+ "aria-hidden": !o.value
551
+ }, [
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)
556
+ ], 544));
325
557
  }
326
558
  };
327
- function I(e, t) {
328
- const l = {
559
+ function W(e, t) {
560
+ const o = {
329
561
  YYYY: () => e.getFullYear().toString(),
330
562
  MM: () => (e.getMonth() + 1).toString().padStart(2, "0"),
331
563
  DD: () => e.getDate().toString().padStart(2, "0")
332
564
  };
333
- return t.replace(/YYYY|MM|DD/g, (n) => l[n]());
565
+ return t.replace(/YYYY|MM|DD/g, (n) => o[n]());
334
566
  }
335
- function se(e) {
336
- const [t, l, n] = e.split("-");
337
- return new Date(Number(t), Number(l) - 1, Number(n));
567
+ function Ue(e) {
568
+ const [t, o, n] = e.split("-");
569
+ return new Date(Number(t), Number(o) - 1, Number(n));
338
570
  }
339
- function ce(e, t) {
340
- const l = Math.abs(t.getTime() - e.getTime());
341
- return Math.ceil(l / (1e3 * 60 * 60 * 24));
571
+ function We(e, t) {
572
+ const o = Math.abs(t.getTime() - e.getTime());
573
+ return Math.ceil(o / (1e3 * 60 * 60 * 24));
342
574
  }
343
- function ue(e, t) {
344
- const l = new Date(e);
345
- return l.setDate(e.getDate() + t), l;
575
+ function ze(e, t) {
576
+ const o = new Date(e);
577
+ return o.setDate(e.getDate() + t), o;
346
578
  }
347
- function de(e, t) {
348
- const l = new Date(e);
349
- return l.setDate(e.getDate() - t), l;
579
+ function He(e, t) {
580
+ const o = new Date(e);
581
+ return o.setDate(e.getDate() - t), o;
350
582
  }
351
- function fe(e) {
583
+ function je(e) {
352
584
  const t = /* @__PURE__ */ new Date();
353
585
  return e.getDate() === t.getDate() && e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear();
354
586
  }
355
- function ye(e) {
587
+ function Xe(e) {
356
588
  const t = /* @__PURE__ */ new Date();
357
589
  return t.setDate(t.getDate() - 1), e.getDate() === t.getDate() && e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear();
358
590
  }
359
- function ge(e) {
591
+ function Re(e) {
360
592
  const t = /* @__PURE__ */ new Date();
361
593
  return t.setDate(t.getDate() + 1), e.getDate() === t.getDate() && e.getMonth() === t.getMonth() && e.getFullYear() === t.getFullYear();
362
594
  }
363
- function pe(e = "YYYY-MM-DD", t = { show: !0, separator: "-" }) {
595
+ function qe(e = "YYYY-MM-DD", t = { show: !0, separator: "-" }) {
364
596
  if (typeof e != "string" || typeof t != "object" || !t.hasOwnProperty("show") || typeof t.show != "boolean")
365
597
  throw new Error(
366
598
  'Invalid parameters: Please provide a valid format string and options object with a boolean "show" property.'
367
599
  );
368
- let n = I(/* @__PURE__ */ new Date(), e);
600
+ let n = W(/* @__PURE__ */ new Date(), e);
369
601
  return t.separator && t.separator !== "-" && (n = n.replace(/-/g, t.separator)), t.show ? { value: n, isVisible: !0 } : { value: n, isVisible: !1 };
370
602
  }
371
- const Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
603
+ const it = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
372
604
  __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
605
+ currentDate: qe,
606
+ dateAdd: ze,
607
+ dateDiff: We,
608
+ dateIsToday: je,
609
+ dateIsTomorrow: Re,
610
+ dateIsYesterday: Xe,
611
+ dateSubtract: He,
612
+ formatDate: W,
613
+ parseDate: Ue
382
614
  }, Symbol.toStringTag, { value: "Module" }));
383
- function ve(e) {
615
+ function Ge(e) {
384
616
  const t = /* @__PURE__ */ new WeakMap();
385
- function l(n) {
386
- if (v(n) || typeof n != "object")
617
+ function o(n) {
618
+ if (T(n) || typeof n != "object")
387
619
  return n;
388
620
  if (t.has(n))
389
621
  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]));
394
- return o;
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;
395
627
  }
396
- return l(e);
628
+ return o(e);
397
629
  }
398
- function A(...e) {
630
+ function z(...e) {
399
631
  const t = {};
400
- 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(
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(
406
638
  t[n] || {},
407
- o
408
- ) : t[n] = o);
639
+ l
640
+ ) : t[n] = l);
409
641
  }
410
642
  }
411
643
  }), t;
412
644
  }
413
- function he(...e) {
414
- return v(e[0]) ? e[0] : Object.assign({}, ...e);
645
+ function Je(...e) {
646
+ return T(e[0]) ? e[0] : Object.assign({}, ...e);
415
647
  }
416
- function me(e) {
417
- return v(e) ? [] : Object.keys(e);
648
+ function Qe(e) {
649
+ return T(e) ? [] : Object.keys(e);
418
650
  }
419
- function Se(e) {
420
- return v(e) ? [] : Object.values(e);
651
+ function Ze(e) {
652
+ return T(e) ? [] : Object.values(e);
421
653
  }
422
- function be(e) {
423
- return v(e) ? [] : Object.entries(e);
654
+ function et(e) {
655
+ return T(e) ? [] : Object.entries(e);
424
656
  }
425
- function v(e) {
657
+ function T(e) {
426
658
  return e === null || typeof e != "object" ? !1 : Array.isArray(e) ? e.length === 0 : Object.keys(e).length === 0;
427
659
  }
428
- const Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
660
+ const rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
429
661
  __proto__: null,
430
- deepClone: ve,
431
- deepMerge: A,
432
- getObjectEntries: be,
433
- getObjectKeys: me,
434
- getObjectValues: Se,
435
- isObjectEmpty: v,
436
- mergeObjects: he
662
+ deepClone: Ge,
663
+ deepMerge: z,
664
+ getObjectEntries: et,
665
+ getObjectKeys: Qe,
666
+ getObjectValues: Ze,
667
+ isObjectEmpty: T,
668
+ mergeObjects: Je
437
669
  }, Symbol.toStringTag, { value: "Module" }));
438
- function D(e) {
670
+ function A(e) {
439
671
  try {
440
672
  return new URL(e), !0;
441
673
  } catch (t) {
442
674
  return console.error("Invalid URL:", t), !1;
443
675
  }
444
676
  }
445
- function Ce(e) {
446
- return D(e) ? new URL(e).hostname : null;
677
+ function tt(e) {
678
+ return A(e) ? new URL(e).hostname : null;
447
679
  }
448
- function we(e, t) {
449
- if (!D(e))
680
+ function ot(e, t) {
681
+ if (!A(e))
450
682
  return e;
451
- const l = new URL(e);
452
- return Object.keys(t).forEach((n) => l.searchParams.append(n, t[n])), l.toString();
683
+ const o = new URL(e);
684
+ return Object.keys(t).forEach((n) => o.searchParams.append(n, t[n])), o.toString();
453
685
  }
454
- function ke(e, t, l = "https") {
455
- if (!["http", "https", "ftp", "sftp", "ftps", "ssh"].includes(l.toLowerCase()))
456
- throw new Error("Invalid protocol: " + l);
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);
457
689
  if (!/^(?!:\/\/)([a-z0-9-]+\.)*[a-z0-9-]+$/i.test(e))
458
690
  throw new Error("Invalid hostname: " + e);
459
- return t.startsWith("/") || (t = "/" + t), t.endsWith("/") && t.length > 1 && (t = t.slice(0, -1)), t === "/" && (t = ""), `${l.toLowerCase()}://${e}${t}`;
691
+ return t.startsWith("/") || (t = "/" + t), t.endsWith("/") && t.length > 1 && (t = t.slice(0, -1)), t === "/" && (t = ""), `${o.toLowerCase()}://${e}${t}`;
460
692
  }
461
- const Ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
693
+ const ct = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
462
694
  __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 = {
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 = {
468
700
  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) {
471
- const o = document.createElement("style");
472
- o.textContent = De, document.head.appendChild(o);
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);
473
705
  }
474
706
  }
475
707
  };
476
708
  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
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,
727
+ z as deepMerge,
728
+ ut as default,
729
+ 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
508
742
  };
@@ -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={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"}})});
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}.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}
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "license": "MIT",
5
5
  "author": "Sato",
6
6
  "private": false,
7
- "version": "0.0.33",
7
+ "version": "0.0.34",
8
8
  "files": [
9
9
  "dist/",
10
10
  "package.json",
@@ -16,8 +16,9 @@
16
16
  "dev": "vite",
17
17
  "build": "vue-tsc && vite build",
18
18
  "publish": "npm publish",
19
- "docs:dev": "vitepress dev docs",
20
- "test": "jest"
19
+ "docsdev": "vitepress dev docs",
20
+ "docsbuild": "vitepress build docs",
21
+ "docspreview": "vitepress preview docs"
21
22
  },
22
23
  "dependencies": {
23
24
  "vue": "^3.4.23"
@@ -26,6 +27,7 @@
26
27
  "@vitejs/plugin-vue": "^5.0.4",
27
28
  "typescript": "^5.4.5",
28
29
  "vite": "^5.2.9",
30
+ "vitepress": "^1.1.3",
29
31
  "vue-tsc": "^2.0.13"
30
32
  }
31
33
  }