spicykatsu 0.0.42 → 0.0.43
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/dist/spicykatsu.es.js +365 -335
- package/dist/spicykatsu.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/SpicyTextarea.vue.d.ts +9 -1
- package/dist/types/directives/spicyDrag.d.ts +2 -0
- package/dist/types/directives/spicyRipple.d.ts +2 -0
- package/dist/types/index.d.ts +3 -2
- package/package.json +1 -1
- package/dist/types/directives/ripple.d.ts +0 -2
package/dist/spicykatsu.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as b, ref as
|
|
1
|
+
import { defineComponent as b, ref as C, openBlock as c, createElementBlock as u, Fragment as B, renderList as O, createElementVNode as p, normalizeClass as k, toDisplayString as h, createCommentVNode as y, createVNode as L, Transition as D, withCtx as M, withDirectives as A, renderSlot as g, vShow as G, watch as E, createBlock as J, withKeys as V, computed as v, resolveDirective as Q, normalizeStyle as S, onMounted as Z, onUnmounted as ee, createTextVNode as x, vModelText as R, mergeProps as W, withModifiers as F, reactive as te, nextTick as oe } from "vue";
|
|
2
2
|
const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "accordionIcon",
|
|
@@ -12,31 +12,31 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
12
12
|
defaultOpen: {}
|
|
13
13
|
},
|
|
14
14
|
setup(e) {
|
|
15
|
-
const
|
|
16
|
-
if (
|
|
17
|
-
|
|
15
|
+
const s = e, o = C(s.defaultOpen || []), l = (a) => {
|
|
16
|
+
if (s.singleOpen)
|
|
17
|
+
o.value = o.value.includes(a) ? [] : [a];
|
|
18
18
|
else {
|
|
19
|
-
const
|
|
20
|
-
|
|
19
|
+
const r = o.value.indexOf(a);
|
|
20
|
+
r === -1 ? o.value.push(a) : o.value.splice(r, 1);
|
|
21
21
|
}
|
|
22
|
-
}, t = (a) =>
|
|
23
|
-
return (a,
|
|
24
|
-
(
|
|
25
|
-
key:
|
|
22
|
+
}, t = (a) => o.value.includes(a);
|
|
23
|
+
return (a, r) => (c(), u("div", se, [
|
|
24
|
+
(c(!0), u(B, null, O(a.sections, (n, d) => (c(), u("div", {
|
|
25
|
+
key: d,
|
|
26
26
|
class: "spicyAccordionItem"
|
|
27
27
|
}, [
|
|
28
28
|
p("button", {
|
|
29
|
-
class: k(["spicyAccordionHeader", { open: t(
|
|
30
|
-
onClick: (i) => l(
|
|
31
|
-
"aria-expanded": t(
|
|
29
|
+
class: k(["spicyAccordionHeader", { open: t(d) }]),
|
|
30
|
+
onClick: (i) => l(d),
|
|
31
|
+
"aria-expanded": t(d)
|
|
32
32
|
}, [
|
|
33
|
-
p("span", null,
|
|
34
|
-
n.icon ? (
|
|
33
|
+
p("span", null, h(n.title), 1),
|
|
34
|
+
n.icon ? (c(), u("svg", ae, [
|
|
35
35
|
p("path", {
|
|
36
36
|
d: n.icon
|
|
37
37
|
}, null, 8, ne)
|
|
38
38
|
])) : y("", !0),
|
|
39
|
-
|
|
39
|
+
r[0] || (r[0] = p("span", { class: "accordionToggle" }, [
|
|
40
40
|
p("svg", {
|
|
41
41
|
class: "accordionArrow",
|
|
42
42
|
viewBox: "0 0 24 24"
|
|
@@ -45,12 +45,12 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
45
45
|
])
|
|
46
46
|
], -1))
|
|
47
47
|
], 10, le),
|
|
48
|
-
|
|
48
|
+
L(D, { name: "fade" }, {
|
|
49
49
|
default: M(() => [
|
|
50
|
-
|
|
51
|
-
g(a.$slots, `section-${
|
|
50
|
+
A(p("div", ie, [
|
|
51
|
+
g(a.$slots, `section-${d}`)
|
|
52
52
|
], 512), [
|
|
53
|
-
[G, t(
|
|
53
|
+
[G, t(d)]
|
|
54
54
|
])
|
|
55
55
|
]),
|
|
56
56
|
_: 2
|
|
@@ -75,29 +75,29 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
75
75
|
autoClose: { default: 0 }
|
|
76
76
|
},
|
|
77
77
|
setup(e) {
|
|
78
|
-
const
|
|
79
|
-
|
|
78
|
+
const s = e, o = C(!0), l = () => {
|
|
79
|
+
o.value = !1;
|
|
80
80
|
};
|
|
81
|
-
return
|
|
82
|
-
() =>
|
|
81
|
+
return E(
|
|
82
|
+
() => s.autoClose,
|
|
83
83
|
(t) => {
|
|
84
84
|
t && t > 0 && setTimeout(() => {
|
|
85
85
|
l();
|
|
86
86
|
}, t);
|
|
87
87
|
}
|
|
88
|
-
), (t, a) => (
|
|
88
|
+
), (t, a) => (c(), J(D, { name: "fade" }, {
|
|
89
89
|
default: M(() => [
|
|
90
|
-
|
|
90
|
+
o.value ? (c(), u("div", {
|
|
91
91
|
key: 0,
|
|
92
92
|
class: k(["spicyAlert", t.variant]),
|
|
93
93
|
"aria-atomic": "true",
|
|
94
94
|
"aria-label": t.text,
|
|
95
95
|
role: "alert",
|
|
96
|
-
onKeydown:
|
|
96
|
+
onKeydown: V(l, ["enter"])
|
|
97
97
|
}, [
|
|
98
|
-
t.iconOnly || t.text ? (
|
|
99
|
-
!t.iconOnly && t.text ? (
|
|
100
|
-
t.closable ? (
|
|
98
|
+
t.iconOnly || t.text ? (c(), u("span", ue, h(t.icon), 1)) : y("", !0),
|
|
99
|
+
!t.iconOnly && t.text ? (c(), u("span", de, h(t.text), 1)) : y("", !0),
|
|
100
|
+
t.closable ? (c(), u("button", {
|
|
101
101
|
key: 2,
|
|
102
102
|
class: "spicyAlertCloseBtn",
|
|
103
103
|
onClick: l,
|
|
@@ -114,7 +114,7 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
114
114
|
class: "spicyBtnIcon spicyMDI",
|
|
115
115
|
viewBox: "0 0 24 24",
|
|
116
116
|
xmlns: "http://www.w3.org/2000/svg"
|
|
117
|
-
},
|
|
117
|
+
}, ve = ["d"], he = {
|
|
118
118
|
key: 1,
|
|
119
119
|
class: "spicyBtnIcon"
|
|
120
120
|
}, me = {
|
|
@@ -136,50 +136,50 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
136
136
|
fontWeight: { default: 500 }
|
|
137
137
|
},
|
|
138
138
|
emits: ["click"],
|
|
139
|
-
setup(e, { emit:
|
|
140
|
-
const
|
|
141
|
-
|
|
142
|
-
}, t = e, a =
|
|
139
|
+
setup(e, { emit: s }) {
|
|
140
|
+
const o = s, l = () => {
|
|
141
|
+
t.disabled || o("click");
|
|
142
|
+
}, t = e, a = v(() => ({
|
|
143
143
|
"--skFontSize": typeof t.fontSize == "number" ? `${t.fontSize}px` : t.fontSize,
|
|
144
144
|
"--skFontWeight": t.fontWeight,
|
|
145
145
|
"--skBgColor": t.bgColor,
|
|
146
146
|
"--skTextColor": t.textColor,
|
|
147
147
|
"--skBorderColor": t.borderColor,
|
|
148
148
|
"--hoverColor": t.hoverColor
|
|
149
|
-
})),
|
|
149
|
+
})), r = v(() => !t.text && (t.icon || t.mdi)), n = v(() => ({
|
|
150
150
|
spicyBtn: !0,
|
|
151
151
|
outlined: t.variant === "outlined",
|
|
152
152
|
disabled: t.disabled,
|
|
153
|
-
isRound:
|
|
153
|
+
isRound: r.value
|
|
154
154
|
}));
|
|
155
|
-
return (
|
|
155
|
+
return (d, i) => {
|
|
156
156
|
const f = Q("spicyRipple");
|
|
157
|
-
return
|
|
157
|
+
return A((c(), u("button", {
|
|
158
158
|
class: k(n.value),
|
|
159
|
-
style:
|
|
160
|
-
disabled:
|
|
159
|
+
style: S(a.value),
|
|
160
|
+
disabled: d.disabled,
|
|
161
161
|
onClick: l,
|
|
162
162
|
role: "button",
|
|
163
|
-
"aria-label":
|
|
164
|
-
"aria-disabled":
|
|
165
|
-
tabindex:
|
|
163
|
+
"aria-label": d.text,
|
|
164
|
+
"aria-disabled": d.disabled,
|
|
165
|
+
tabindex: d.disabled ? -1 : 0
|
|
166
166
|
}, [
|
|
167
|
-
|
|
167
|
+
d.mdi ? (c(), u("svg", fe, [
|
|
168
168
|
p("path", {
|
|
169
169
|
fill: "currentColor",
|
|
170
170
|
class: "mdi-icon",
|
|
171
|
-
d:
|
|
172
|
-
}, null, 8,
|
|
171
|
+
d: d.mdi
|
|
172
|
+
}, null, 8, ve)
|
|
173
173
|
])) : y("", !0),
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
g(
|
|
174
|
+
d.icon && !d.mdi ? (c(), u("span", he, h(d.icon), 1)) : y("", !0),
|
|
175
|
+
d.text ? (c(), u("span", me, h(d.text), 1)) : y("", !0),
|
|
176
|
+
g(d.$slots, "default")
|
|
177
177
|
], 14, ye)), [
|
|
178
178
|
[f]
|
|
179
179
|
]);
|
|
180
180
|
};
|
|
181
181
|
}
|
|
182
|
-
}), be = ["aria-label"], ke = { class: "spicyCarouselInfoText" },
|
|
182
|
+
}), be = ["aria-label"], ke = { class: "spicyCarouselInfoText" }, Ce = { class: "spicyCarouselTitle" }, Se = { key: 0 }, we = {
|
|
183
183
|
key: 0,
|
|
184
184
|
class: "spicyCarouselNavControls"
|
|
185
185
|
}, $e = {
|
|
@@ -202,70 +202,70 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
202
202
|
enableImageClick: { type: Boolean, default: !1 }
|
|
203
203
|
},
|
|
204
204
|
setup(e) {
|
|
205
|
-
let
|
|
206
|
-
const t = e, a =
|
|
205
|
+
let s, o, l = !1;
|
|
206
|
+
const t = e, a = v(() => ({
|
|
207
207
|
"--width": t.width,
|
|
208
208
|
"--height": t.height,
|
|
209
209
|
"--activeColor": t.activeColor
|
|
210
|
-
})),
|
|
210
|
+
})), r = v(() => {
|
|
211
211
|
var m;
|
|
212
|
-
return (m = t.slides[
|
|
213
|
-
}), n =
|
|
212
|
+
return (m = t.slides[d.value]) == null ? void 0 : m.title;
|
|
213
|
+
}), n = v(() => i.value.fullScreen === !1 ? !1 : t.fullScreen), d = C(t.initialSlide), i = v(() => t.slides[d.value]);
|
|
214
214
|
let f;
|
|
215
215
|
const _ = () => {
|
|
216
|
-
|
|
216
|
+
d.value = (d.value - 1 + t.slides.length) % t.slides.length;
|
|
217
217
|
}, T = () => {
|
|
218
|
-
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
},
|
|
218
|
+
d.value = (d.value + 1) % t.slides.length;
|
|
219
|
+
}, X = (m) => {
|
|
220
|
+
d.value = m;
|
|
221
|
+
}, z = () => {
|
|
222
222
|
f && clearInterval(f);
|
|
223
|
-
},
|
|
223
|
+
}, P = () => {
|
|
224
224
|
t.autoplay && (f = window.setInterval(T, t.autoplaySpeed));
|
|
225
|
-
},
|
|
225
|
+
}, K = () => {
|
|
226
226
|
window.open(i.value.img);
|
|
227
227
|
}, U = () => {
|
|
228
|
-
t.enableImageClick &&
|
|
228
|
+
t.enableImageClick && K();
|
|
229
229
|
}, j = (m) => {
|
|
230
|
-
|
|
230
|
+
s = m.touches[0].clientX, o = m.touches[0].clientY, l = !1;
|
|
231
231
|
}, q = (m) => {
|
|
232
232
|
if (!l) {
|
|
233
|
-
const w = m.touches[0].clientX -
|
|
234
|
-
Math.abs(w) > Math.abs(
|
|
233
|
+
const w = m.touches[0].clientX - s, Y = m.touches[0].clientY - o;
|
|
234
|
+
Math.abs(w) > Math.abs(Y) && (w > 40 ? (_(), l = !0) : w < -40 && (T(), l = !0));
|
|
235
235
|
}
|
|
236
236
|
};
|
|
237
237
|
return Z(() => {
|
|
238
|
-
|
|
238
|
+
P();
|
|
239
239
|
}), ee(() => {
|
|
240
|
-
|
|
241
|
-
}), (m, w) => (
|
|
240
|
+
z();
|
|
241
|
+
}), (m, w) => (c(), u("div", {
|
|
242
242
|
class: "spicyCarouselWrapper",
|
|
243
|
-
style:
|
|
243
|
+
style: S({ ...a.value })
|
|
244
244
|
}, [
|
|
245
245
|
p("div", {
|
|
246
246
|
class: "spicyCarouselContainer",
|
|
247
|
-
onMouseenter:
|
|
248
|
-
onMouseleave:
|
|
247
|
+
onMouseenter: z,
|
|
248
|
+
onMouseleave: P,
|
|
249
249
|
onTouchstart: j,
|
|
250
250
|
onTouchmove: q
|
|
251
251
|
}, [
|
|
252
|
-
|
|
252
|
+
L(D, {
|
|
253
253
|
name: "slide",
|
|
254
254
|
mode: "out-in"
|
|
255
255
|
}, {
|
|
256
256
|
default: M(() => [
|
|
257
|
-
(
|
|
257
|
+
(c(), u("div", {
|
|
258
258
|
class: k(["spicyCarouselSlide", { pointCursor: t.enableImageClick }]),
|
|
259
|
-
key:
|
|
260
|
-
style:
|
|
259
|
+
key: d.value,
|
|
260
|
+
style: S({ backgroundImage: `url(${i.value.img})` }),
|
|
261
261
|
onClick: U
|
|
262
262
|
}, [
|
|
263
|
-
m.slides[
|
|
263
|
+
m.slides[d.value].text ? (c(), u("div", {
|
|
264
264
|
key: 0,
|
|
265
265
|
class: k(["spicyCarouselTextOverlay", { fullScreen: n.value }]),
|
|
266
|
-
"aria-label": m.slides[
|
|
266
|
+
"aria-label": m.slides[d.value].text
|
|
267
267
|
}, [
|
|
268
|
-
p("span", ke,
|
|
268
|
+
p("span", ke, h(m.slides[d.value].text), 1)
|
|
269
269
|
], 10, be)) : y("", !0),
|
|
270
270
|
g(m.$slots, "default")
|
|
271
271
|
], 6))
|
|
@@ -273,10 +273,10 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
273
273
|
_: 3
|
|
274
274
|
})
|
|
275
275
|
], 32),
|
|
276
|
-
p("div",
|
|
277
|
-
|
|
276
|
+
p("div", Ce, [
|
|
277
|
+
r.value ? (c(), u("h2", Se, h(i.value.title), 1)) : y("", !0)
|
|
278
278
|
]),
|
|
279
|
-
m.showNavigation ? (
|
|
279
|
+
m.showNavigation ? (c(), u("div", we, [
|
|
280
280
|
p("button", {
|
|
281
281
|
class: "spicyCarouselPrevBtn",
|
|
282
282
|
onClick: _
|
|
@@ -290,13 +290,13 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
290
290
|
p("span", { class: "spicyCarouselNextBtnIcon" }, ">", -1)
|
|
291
291
|
]))
|
|
292
292
|
])) : y("", !0),
|
|
293
|
-
m.showPagination ? (
|
|
294
|
-
(
|
|
293
|
+
m.showPagination ? (c(), u("div", $e, [
|
|
294
|
+
(c(!0), u(B, null, O(m.slides, (Y, I) => (c(), u("button", {
|
|
295
295
|
key: I,
|
|
296
|
-
onClick: (
|
|
297
|
-
class: k(["spicyCarouselPageBtn", { active: I ===
|
|
296
|
+
onClick: (It) => X(I),
|
|
297
|
+
class: k(["spicyCarouselPageBtn", { active: I === d.value }])
|
|
298
298
|
}, [
|
|
299
|
-
p("span", Be,
|
|
299
|
+
p("span", Be, h(I + 1), 1)
|
|
300
300
|
], 10, _e))), 128))
|
|
301
301
|
])) : y("", !0)
|
|
302
302
|
], 4));
|
|
@@ -310,20 +310,20 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
310
310
|
bgColor: { default: "#5f5f5f" }
|
|
311
311
|
},
|
|
312
312
|
setup(e) {
|
|
313
|
-
const
|
|
314
|
-
width:
|
|
315
|
-
borderBottom: `${
|
|
313
|
+
const s = e, o = v(() => ({
|
|
314
|
+
width: s.width,
|
|
315
|
+
borderBottom: `${s.height} ${s.variant} ${s.bgColor}`
|
|
316
316
|
}));
|
|
317
|
-
return (l, t) => (
|
|
317
|
+
return (l, t) => (c(), u("div", {
|
|
318
318
|
class: "spicyDivider",
|
|
319
|
-
style:
|
|
319
|
+
style: S(o.value),
|
|
320
320
|
role: "separator",
|
|
321
321
|
"aria-orientation": "horizontal"
|
|
322
322
|
}, [
|
|
323
323
|
g(l.$slots, "default")
|
|
324
324
|
], 4));
|
|
325
325
|
}
|
|
326
|
-
}), Me = ["width", "height"], Ie = ["d"], Oe = ["width", "height"],
|
|
326
|
+
}), Me = ["width", "height"], Ie = ["d"], Oe = ["width", "height"], Le = /* @__PURE__ */ b({
|
|
327
327
|
__name: "SpicyDropdown",
|
|
328
328
|
props: {
|
|
329
329
|
label: {},
|
|
@@ -333,20 +333,20 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
333
333
|
iconSize: { default: "24px" }
|
|
334
334
|
},
|
|
335
335
|
setup(e) {
|
|
336
|
-
const
|
|
337
|
-
|
|
338
|
-
}, t =
|
|
339
|
-
width:
|
|
340
|
-
textAlign:
|
|
336
|
+
const s = e, o = C(!1), l = () => {
|
|
337
|
+
o.value = !o.value;
|
|
338
|
+
}, t = v(() => ({
|
|
339
|
+
width: s.width,
|
|
340
|
+
textAlign: s.align
|
|
341
341
|
}));
|
|
342
|
-
return (a,
|
|
343
|
-
class: k(["spicyDropdown", { open:
|
|
342
|
+
return (a, r) => (c(), u("div", {
|
|
343
|
+
class: k(["spicyDropdown", { open: o.value }])
|
|
344
344
|
}, [
|
|
345
345
|
p("button", {
|
|
346
346
|
onClick: l,
|
|
347
347
|
class: "spicyDropdownButton"
|
|
348
348
|
}, [
|
|
349
|
-
a.icon ? (
|
|
349
|
+
a.icon ? (c(), u("svg", {
|
|
350
350
|
key: 0,
|
|
351
351
|
width: a.iconSize,
|
|
352
352
|
height: a.iconSize,
|
|
@@ -355,23 +355,23 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
355
355
|
}, [
|
|
356
356
|
p("path", { d: a.icon }, null, 8, Ie)
|
|
357
357
|
], 8, Me)) : y("", !0),
|
|
358
|
-
|
|
359
|
-
a.icon === "" ? (
|
|
358
|
+
x(" " + h(a.label) + " ", 1),
|
|
359
|
+
a.icon === "" ? (c(), u("svg", {
|
|
360
360
|
key: 1,
|
|
361
361
|
width: a.iconSize,
|
|
362
362
|
height: a.iconSize,
|
|
363
363
|
viewBox: "0 0 24 24",
|
|
364
|
-
class: k(["arrow", { open:
|
|
365
|
-
},
|
|
364
|
+
class: k(["arrow", { open: o.value }])
|
|
365
|
+
}, r[0] || (r[0] = [
|
|
366
366
|
p("path", { d: "M7 10l5 5 5-5H7z" }, null, -1)
|
|
367
367
|
]), 10, Oe)) : y("", !0)
|
|
368
368
|
]),
|
|
369
|
-
|
|
369
|
+
L(D, { name: "fade" }, {
|
|
370
370
|
default: M(() => [
|
|
371
|
-
|
|
371
|
+
o.value ? (c(), u("div", {
|
|
372
372
|
key: 0,
|
|
373
373
|
class: "spicyDropdownMenu",
|
|
374
|
-
style:
|
|
374
|
+
style: S(t.value)
|
|
375
375
|
}, [
|
|
376
376
|
g(a.$slots, "default")
|
|
377
377
|
], 4)) : y("", !0)
|
|
@@ -380,10 +380,10 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
380
380
|
})
|
|
381
381
|
], 2));
|
|
382
382
|
}
|
|
383
|
-
}),
|
|
383
|
+
}), Ae = ["aria-label"], Ve = ["placeholder", "aria-label"], ze = {
|
|
384
384
|
key: 0,
|
|
385
385
|
class: "spicyInputError"
|
|
386
|
-
},
|
|
386
|
+
}, Pe = /* @__PURE__ */ b({
|
|
387
387
|
__name: "SpicyLabel",
|
|
388
388
|
props: {
|
|
389
389
|
value: { default: "" },
|
|
@@ -393,39 +393,39 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
393
393
|
variant: { default: "filled" }
|
|
394
394
|
},
|
|
395
395
|
setup(e) {
|
|
396
|
-
const
|
|
397
|
-
const
|
|
398
|
-
|
|
396
|
+
const o = C(e.value), l = C(!1), t = (n) => {
|
|
397
|
+
const d = n.target;
|
|
398
|
+
o.value = d.value;
|
|
399
399
|
}, a = () => {
|
|
400
400
|
l.value = !1;
|
|
401
|
-
},
|
|
401
|
+
}, r = () => {
|
|
402
402
|
l.value = !0;
|
|
403
403
|
};
|
|
404
|
-
return (n,
|
|
405
|
-
class: k(["spicyInputWrapper", [n.variant, { hasValue:
|
|
404
|
+
return (n, d) => (c(), u("div", {
|
|
405
|
+
class: k(["spicyInputWrapper", [n.variant, { hasValue: o.value || n.value, hasFocus: l.value, hasError: n.error }]])
|
|
406
406
|
}, [
|
|
407
407
|
p("label", {
|
|
408
408
|
class: "spicyInputLabel",
|
|
409
409
|
"aria-label": n.label
|
|
410
|
-
},
|
|
411
|
-
|
|
410
|
+
}, h(n.label), 9, Ae),
|
|
411
|
+
A(p("input", {
|
|
412
412
|
type: "text",
|
|
413
413
|
name: "spicyInput",
|
|
414
414
|
class: k(["spicyInput", n.variant]),
|
|
415
|
-
"onUpdate:modelValue":
|
|
415
|
+
"onUpdate:modelValue": d[0] || (d[0] = (i) => o.value = i),
|
|
416
416
|
placeholder: n.placeholder,
|
|
417
417
|
onInput: t,
|
|
418
418
|
onBlur: a,
|
|
419
|
-
onFocus:
|
|
419
|
+
onFocus: r,
|
|
420
420
|
"aria-label": n.label
|
|
421
|
-
}, null, 42,
|
|
422
|
-
[R,
|
|
421
|
+
}, null, 42, Ve), [
|
|
422
|
+
[R, o.value]
|
|
423
423
|
]),
|
|
424
424
|
g(n.$slots, "default"),
|
|
425
|
-
n.error ? (
|
|
425
|
+
n.error ? (c(), u("span", ze, h(n.error), 1)) : y("", !0)
|
|
426
426
|
], 2));
|
|
427
427
|
}
|
|
428
|
-
}),
|
|
428
|
+
}), Ye = { class: "spicyModalHeader" }, Fe = { class: "spicyModalActions" }, Ee = ["onClick"], xe = /* @__PURE__ */ b({
|
|
429
429
|
__name: "SpicyModal",
|
|
430
430
|
props: {
|
|
431
431
|
width: { default: "400px" },
|
|
@@ -440,49 +440,49 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
440
440
|
textColor: { default: "" }
|
|
441
441
|
},
|
|
442
442
|
emits: ["update:visible"],
|
|
443
|
-
setup(e, { emit:
|
|
444
|
-
const
|
|
445
|
-
"--width":
|
|
446
|
-
"--height":
|
|
447
|
-
"--skBorderRadius":
|
|
448
|
-
"--skBgColor":
|
|
449
|
-
"--skTextColor":
|
|
450
|
-
})), t =
|
|
443
|
+
setup(e, { emit: s }) {
|
|
444
|
+
const o = e, l = v(() => ({
|
|
445
|
+
"--width": o.width,
|
|
446
|
+
"--height": o.height,
|
|
447
|
+
"--skBorderRadius": o.borderRadius,
|
|
448
|
+
"--skBgColor": o.bgColor,
|
|
449
|
+
"--skTextColor": o.textColor
|
|
450
|
+
})), t = s, a = () => {
|
|
451
451
|
t("update:visible", !1);
|
|
452
|
-
},
|
|
453
|
-
const
|
|
454
|
-
|
|
452
|
+
}, r = (n) => {
|
|
453
|
+
const d = n.target;
|
|
454
|
+
o.closeOnClick && d.classList.contains("spicyModalOverlay") && a();
|
|
455
455
|
};
|
|
456
|
-
return (n,
|
|
456
|
+
return (n, d) => n.visible ? (c(), u("div", {
|
|
457
457
|
key: 0,
|
|
458
458
|
class: "spicyModalOverlay",
|
|
459
|
-
onClick:
|
|
459
|
+
onClick: r
|
|
460
460
|
}, [
|
|
461
461
|
p("div", {
|
|
462
462
|
class: "spicyModal",
|
|
463
|
-
style:
|
|
463
|
+
style: S({ ...l.value })
|
|
464
464
|
}, [
|
|
465
|
-
p("header",
|
|
465
|
+
p("header", Ye, [
|
|
466
466
|
g(n.$slots, "spicyModalHeader", {
|
|
467
467
|
title: n.modalTitle,
|
|
468
468
|
ariaLabel: n.modalTitle
|
|
469
469
|
}, () => [
|
|
470
|
-
|
|
470
|
+
x(h(n.modalTitle), 1)
|
|
471
471
|
])
|
|
472
472
|
]),
|
|
473
473
|
g(n.$slots, "default"),
|
|
474
|
-
p("div",
|
|
474
|
+
p("div", Fe, [
|
|
475
475
|
g(n.$slots, "spicyModalActions"),
|
|
476
|
-
n.actions.length === 0 && n.closeBtn ? (
|
|
476
|
+
n.actions.length === 0 && n.closeBtn ? (c(), u("button", {
|
|
477
477
|
key: 0,
|
|
478
478
|
class: "spicyModalCloseBtn spicyModalActionBtn",
|
|
479
479
|
onClick: a
|
|
480
480
|
}, " Close ")) : y("", !0),
|
|
481
|
-
(
|
|
481
|
+
(c(!0), u(B, null, O(n.actions, (i) => (c(), u("button", {
|
|
482
482
|
class: "spicyModalExtraBtn spicyModalActionBtn",
|
|
483
483
|
key: i.label,
|
|
484
484
|
onClick: i.handler
|
|
485
|
-
},
|
|
485
|
+
}, h(i.label), 9, Ee))), 128))
|
|
486
486
|
])
|
|
487
487
|
], 4)
|
|
488
488
|
])) : y("", !0);
|
|
@@ -496,7 +496,7 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
496
496
|
}, Ne = {
|
|
497
497
|
key: 1,
|
|
498
498
|
class: "spicyProgressCircular"
|
|
499
|
-
}, He = ["width", "height"],
|
|
499
|
+
}, He = ["width", "height"], Xe = ["stroke-width", "r", "cx", "cy"], Ke = ["stroke", "stroke-width", "r", "cx", "cy"], Ue = {
|
|
500
500
|
key: 0,
|
|
501
501
|
class: "spicyCircularLabel"
|
|
502
502
|
}, je = /* @__PURE__ */ b({
|
|
@@ -512,24 +512,24 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
512
512
|
size: { default: 100 }
|
|
513
513
|
},
|
|
514
514
|
setup(e) {
|
|
515
|
-
const
|
|
516
|
-
width: `${
|
|
517
|
-
backgroundColor:
|
|
518
|
-
height:
|
|
519
|
-
})), a =
|
|
515
|
+
const s = e, o = v(() => Math.round(s.value / s.max * 100)), l = v(() => s.type === "linear"), t = v(() => ({
|
|
516
|
+
width: `${o.value}%`,
|
|
517
|
+
backgroundColor: s.color,
|
|
518
|
+
height: s.height
|
|
519
|
+
})), a = v(() => s.size / 2), r = v(() => (s.size - s.strokeWidth) / 2), n = v(() => 2 * Math.PI * r.value), d = v(() => ({
|
|
520
520
|
strokeDasharray: `${n.value} ${n.value}`,
|
|
521
|
-
strokeDashoffset: `${n.value -
|
|
521
|
+
strokeDashoffset: `${n.value - o.value / 100 * n.value}`,
|
|
522
522
|
transition: "stroke-dashoffset 400ms ease"
|
|
523
523
|
}));
|
|
524
|
-
return (i, f) => (
|
|
525
|
-
l.value ? (
|
|
524
|
+
return (i, f) => (c(), u(B, null, [
|
|
525
|
+
l.value ? (c(), u("div", Re, [
|
|
526
526
|
p("div", {
|
|
527
527
|
class: "spicyProgressBar",
|
|
528
|
-
style:
|
|
528
|
+
style: S(t.value)
|
|
529
529
|
}, null, 4),
|
|
530
|
-
i.showLabel ? (
|
|
531
|
-
])) : (
|
|
532
|
-
(
|
|
530
|
+
i.showLabel ? (c(), u("div", We, h(o.value) + "%", 1)) : y("", !0)
|
|
531
|
+
])) : (c(), u("div", Ne, [
|
|
532
|
+
(c(), u("svg", {
|
|
533
533
|
class: "spicyCircularSvg",
|
|
534
534
|
width: i.size,
|
|
535
535
|
height: i.size
|
|
@@ -537,21 +537,21 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
537
537
|
p("circle", {
|
|
538
538
|
class: "spicyCircularTrack",
|
|
539
539
|
"stroke-width": i.strokeWidth,
|
|
540
|
-
r:
|
|
540
|
+
r: r.value,
|
|
541
541
|
cx: a.value,
|
|
542
542
|
cy: a.value
|
|
543
|
-
}, null, 8,
|
|
543
|
+
}, null, 8, Xe),
|
|
544
544
|
p("circle", {
|
|
545
545
|
class: "spicyCircularProgress",
|
|
546
546
|
stroke: i.color,
|
|
547
547
|
"stroke-width": i.strokeWidth,
|
|
548
|
-
r:
|
|
548
|
+
r: r.value,
|
|
549
549
|
cx: a.value,
|
|
550
550
|
cy: a.value,
|
|
551
|
-
style:
|
|
552
|
-
}, null, 12,
|
|
551
|
+
style: S(d.value)
|
|
552
|
+
}, null, 12, Ke)
|
|
553
553
|
], 8, He)),
|
|
554
|
-
i.showLabel ? (
|
|
554
|
+
i.showLabel ? (c(), u("div", Ue, h(o.value) + "%", 1)) : y("", !0)
|
|
555
555
|
])),
|
|
556
556
|
g(i.$slots, "default")
|
|
557
557
|
], 64));
|
|
@@ -563,12 +563,12 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
563
563
|
color: { default: "" }
|
|
564
564
|
},
|
|
565
565
|
setup(e) {
|
|
566
|
-
const
|
|
567
|
-
"--color":
|
|
566
|
+
const s = e, o = v(() => ({
|
|
567
|
+
"--color": s.color || "transparent"
|
|
568
568
|
}));
|
|
569
|
-
return (l, t) => (
|
|
569
|
+
return (l, t) => (c(), u("div", {
|
|
570
570
|
class: k(["spicySheet", { isRound: l.isRound }]),
|
|
571
|
-
style:
|
|
571
|
+
style: S({ ...o.value })
|
|
572
572
|
}, [
|
|
573
573
|
g(l.$slots, "default")
|
|
574
574
|
], 6));
|
|
@@ -583,37 +583,37 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
583
583
|
modelValue: { default: 0 }
|
|
584
584
|
},
|
|
585
585
|
emits: ["update:modelValue"],
|
|
586
|
-
setup(e, { emit:
|
|
587
|
-
const
|
|
588
|
-
|
|
589
|
-
() =>
|
|
590
|
-
(
|
|
591
|
-
t.value =
|
|
586
|
+
setup(e, { emit: s }) {
|
|
587
|
+
const o = e, l = s, t = C(o.modelValue);
|
|
588
|
+
E(
|
|
589
|
+
() => o.modelValue,
|
|
590
|
+
(r) => {
|
|
591
|
+
t.value = r;
|
|
592
592
|
}
|
|
593
593
|
);
|
|
594
|
-
const a = (
|
|
595
|
-
const n =
|
|
594
|
+
const a = (r) => {
|
|
595
|
+
const n = r.target;
|
|
596
596
|
l("update:modelValue", Number(n.value));
|
|
597
597
|
};
|
|
598
|
-
return (
|
|
599
|
-
|
|
598
|
+
return (r, n) => (c(), u("div", Ge, [
|
|
599
|
+
r.label ? (c(), u("label", {
|
|
600
600
|
key: 0,
|
|
601
601
|
class: "spicySliderLabel",
|
|
602
|
-
"aria-label":
|
|
603
|
-
},
|
|
604
|
-
|
|
602
|
+
"aria-label": r.label
|
|
603
|
+
}, h(r.label), 9, Je)) : y("", !0),
|
|
604
|
+
A(p("input", {
|
|
605
605
|
name: "spicySliderInput",
|
|
606
606
|
class: "spicySliderInput",
|
|
607
607
|
type: "range",
|
|
608
|
-
min:
|
|
609
|
-
max:
|
|
610
|
-
step:
|
|
611
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
608
|
+
min: r.min,
|
|
609
|
+
max: r.max,
|
|
610
|
+
step: r.step,
|
|
611
|
+
"onUpdate:modelValue": n[0] || (n[0] = (d) => t.value = d),
|
|
612
612
|
onInput: a
|
|
613
613
|
}, null, 40, Qe), [
|
|
614
614
|
[R, t.value]
|
|
615
615
|
]),
|
|
616
|
-
g(
|
|
616
|
+
g(r.$slots, "default")
|
|
617
617
|
]));
|
|
618
618
|
}
|
|
619
619
|
}), et = { class: "spicyTabsHeader" }, tt = ["onClick"], ot = {
|
|
@@ -626,26 +626,26 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
626
626
|
tabs: {}
|
|
627
627
|
},
|
|
628
628
|
setup(e) {
|
|
629
|
-
var
|
|
630
|
-
const
|
|
629
|
+
var r;
|
|
630
|
+
const s = e, o = C(((r = s.tabs[0]) == null ? void 0 : r.name) || ""), l = v(() => {
|
|
631
631
|
var n;
|
|
632
|
-
return (n =
|
|
632
|
+
return (n = s.tabs.find((d) => d.name === o.value)) == null ? void 0 : n.name;
|
|
633
633
|
}), t = (n) => {
|
|
634
|
-
|
|
635
|
-
}, a =
|
|
636
|
-
return (n,
|
|
634
|
+
o.value = n;
|
|
635
|
+
}, a = v(() => s.layout === "vertical" ? "vertical" : "horizontal");
|
|
636
|
+
return (n, d) => (c(), u("div", {
|
|
637
637
|
class: k(["spicyTabs", a.value])
|
|
638
638
|
}, [
|
|
639
639
|
p("div", et, [
|
|
640
|
-
(
|
|
640
|
+
(c(!0), u(B, null, O(n.tabs, (i) => (c(), u("button", {
|
|
641
641
|
key: i.name,
|
|
642
|
-
class: k(["tabButton", { active:
|
|
642
|
+
class: k(["tabButton", { active: o.value === i.name }]),
|
|
643
643
|
onClick: (f) => t(i.name)
|
|
644
|
-
},
|
|
644
|
+
}, h(i.label), 11, tt))), 128))
|
|
645
645
|
]),
|
|
646
|
-
|
|
646
|
+
L(D, { name: "fade" }, {
|
|
647
647
|
default: M(() => [
|
|
648
|
-
l.value ? (
|
|
648
|
+
l.value ? (c(), u("div", ot, [
|
|
649
649
|
g(n.$slots, l.value)
|
|
650
650
|
])) : y("", !0)
|
|
651
651
|
]),
|
|
@@ -653,30 +653,38 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
653
653
|
})
|
|
654
654
|
], 2));
|
|
655
655
|
}
|
|
656
|
-
}), lt = /* @__PURE__ */ b({
|
|
656
|
+
}), lt = ["value", "name"], at = /* @__PURE__ */ b({
|
|
657
657
|
__name: "SpicyTextarea",
|
|
658
658
|
props: {
|
|
659
659
|
border: { default: "1px solid var(--skBorderColor, #515353)" },
|
|
660
660
|
isRound: { type: Boolean, default: !1 },
|
|
661
661
|
padding: { default: "8px" },
|
|
662
|
-
color: { default: "#4e4e4e" }
|
|
662
|
+
color: { default: "#4e4e4e" },
|
|
663
|
+
modelValue: { default: "" },
|
|
664
|
+
name: { default: "" }
|
|
663
665
|
},
|
|
664
|
-
|
|
665
|
-
|
|
666
|
+
emits: ["update:modelValue"],
|
|
667
|
+
setup(e, { emit: s }) {
|
|
668
|
+
const o = e, l = v(() => ({
|
|
666
669
|
borderRadius: o.isRound ? "16px" : "2px",
|
|
667
670
|
border: o.border,
|
|
668
671
|
padding: o.padding,
|
|
669
672
|
backgroundColor: o.color
|
|
670
|
-
}))
|
|
671
|
-
|
|
673
|
+
})), t = s, a = (r) => {
|
|
674
|
+
t("update:modelValue", r.target.value);
|
|
675
|
+
};
|
|
676
|
+
return (r, n) => (c(), u(B, null, [
|
|
672
677
|
p("textarea", W({
|
|
673
|
-
class: "
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
678
|
+
class: "spicyTextarea",
|
|
679
|
+
value: r.modelValue,
|
|
680
|
+
onInput: a,
|
|
681
|
+
name: r.name,
|
|
682
|
+
style: l.value
|
|
683
|
+
}, r.$attrs), null, 16, lt),
|
|
684
|
+
g(r.$slots, "default")
|
|
677
685
|
], 64));
|
|
678
686
|
}
|
|
679
|
-
}),
|
|
687
|
+
}), nt = ["tabindex", "aria-label", "aria-checked", "onKeydown"], it = /* @__PURE__ */ b({
|
|
680
688
|
__name: "SpicyToggle",
|
|
681
689
|
props: {
|
|
682
690
|
modelValue: { type: Boolean, default: !1 },
|
|
@@ -687,36 +695,36 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
687
695
|
disabled: { type: Boolean, default: !1 }
|
|
688
696
|
},
|
|
689
697
|
emits: ["update:modelValue"],
|
|
690
|
-
setup(e, { emit:
|
|
691
|
-
const
|
|
692
|
-
"--skBorderColor":
|
|
693
|
-
"--activeColor":
|
|
694
|
-
})), t =
|
|
695
|
-
t("update:modelValue", !
|
|
698
|
+
setup(e, { emit: s }) {
|
|
699
|
+
const o = e, l = v(() => ({
|
|
700
|
+
"--skBorderColor": o.borderColor,
|
|
701
|
+
"--activeColor": o.activeColor
|
|
702
|
+
})), t = s, a = () => {
|
|
703
|
+
t("update:modelValue", !o.modelValue);
|
|
696
704
|
};
|
|
697
|
-
return (
|
|
698
|
-
class: ["spicyToggle", { outlined:
|
|
699
|
-
tabindex:
|
|
705
|
+
return (r, n) => (c(), u("div", W({
|
|
706
|
+
class: ["spicyToggle", { outlined: r.variant === "outlined", "is-active": r.modelValue }],
|
|
707
|
+
tabindex: r.disabled ? -1 : 0,
|
|
700
708
|
role: "switch",
|
|
701
709
|
style: { ...l.value },
|
|
702
|
-
"aria-label":
|
|
703
|
-
"aria-checked":
|
|
710
|
+
"aria-label": r.label,
|
|
711
|
+
"aria-checked": r.modelValue,
|
|
704
712
|
onClick: a,
|
|
705
713
|
onKeydown: [
|
|
706
|
-
|
|
707
|
-
|
|
714
|
+
V(F(a, ["prevent"]), ["space"]),
|
|
715
|
+
V(F(a, ["prevent"]), ["enter"])
|
|
708
716
|
]
|
|
709
|
-
},
|
|
717
|
+
}, r.$attrs), n[0] || (n[0] = [
|
|
710
718
|
p("div", { class: "spicyToggleKnob" }, null, -1)
|
|
711
|
-
]), 16,
|
|
719
|
+
]), 16, nt));
|
|
712
720
|
}
|
|
713
|
-
}),
|
|
721
|
+
}), rt = ["aria-hidden"], ct = {
|
|
714
722
|
key: 0,
|
|
715
723
|
class: "spicyTooltipIcon"
|
|
716
|
-
},
|
|
724
|
+
}, ut = ["aria-label"], dt = {
|
|
717
725
|
key: 2,
|
|
718
726
|
class: "spicyTooltipIcon"
|
|
719
|
-
},
|
|
727
|
+
}, pt = /* @__PURE__ */ b({
|
|
720
728
|
__name: "SpicyTooltip",
|
|
721
729
|
props: {
|
|
722
730
|
text: { default: "" },
|
|
@@ -725,7 +733,7 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
725
733
|
position: { default: "top" }
|
|
726
734
|
},
|
|
727
735
|
setup(e) {
|
|
728
|
-
const
|
|
736
|
+
const s = e, o = C(!1), l = C(null), t = te({
|
|
729
737
|
position: "absolute",
|
|
730
738
|
top: "0px",
|
|
731
739
|
left: "0px",
|
|
@@ -733,7 +741,7 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
733
741
|
}), a = (i) => {
|
|
734
742
|
const f = i.right - window.innerWidth;
|
|
735
743
|
f > 0 && (t.left = `${parseInt(t.left) - f - 5}px`), i.left < 0 && (t.left = "5px");
|
|
736
|
-
},
|
|
744
|
+
}, r = {
|
|
737
745
|
top: (i, f) => {
|
|
738
746
|
t.left = `${i.left + (i.width - f.width) / 2}px`, t.top = `${i.top - f.height - 5}px`;
|
|
739
747
|
},
|
|
@@ -747,172 +755,193 @@ const se = { class: "spicyAccordion" }, le = ["onClick", "aria-expanded"], ae =
|
|
|
747
755
|
t.left = `${i.right + 5}px`, t.top = `${i.top + (i.height - f.height) / 2}px`;
|
|
748
756
|
}
|
|
749
757
|
}, n = () => {
|
|
750
|
-
|
|
751
|
-
if (l.value &&
|
|
758
|
+
o.value = !0, oe(() => {
|
|
759
|
+
if (l.value && o.value) {
|
|
752
760
|
const i = l.value.getBoundingClientRect(), f = l.value.querySelector(".spicyTooltip");
|
|
753
761
|
if (f) {
|
|
754
|
-
const _ = f.getBoundingClientRect(), T =
|
|
762
|
+
const _ = f.getBoundingClientRect(), T = r[s.position];
|
|
755
763
|
T(i, _), a(_);
|
|
756
764
|
}
|
|
757
765
|
}
|
|
758
766
|
});
|
|
759
|
-
},
|
|
760
|
-
|
|
767
|
+
}, d = () => {
|
|
768
|
+
o.value = !1;
|
|
761
769
|
};
|
|
762
|
-
return (i, f) => (
|
|
770
|
+
return (i, f) => (c(), u("div", {
|
|
763
771
|
onMouseover: n,
|
|
764
|
-
onMouseleave:
|
|
772
|
+
onMouseleave: d,
|
|
765
773
|
ref_key: "host",
|
|
766
774
|
ref: l
|
|
767
775
|
}, [
|
|
768
776
|
g(i.$slots, "default"),
|
|
769
|
-
|
|
777
|
+
o.value ? (c(), u("div", {
|
|
770
778
|
key: 0,
|
|
771
779
|
class: "spicyTooltip",
|
|
772
|
-
style:
|
|
780
|
+
style: S(t),
|
|
773
781
|
role: "tooltip",
|
|
774
|
-
"aria-hidden": !
|
|
782
|
+
"aria-hidden": !o.value
|
|
775
783
|
}, [
|
|
776
|
-
i.prependIcon ? (
|
|
777
|
-
i.text ? (
|
|
784
|
+
i.prependIcon ? (c(), u("span", ct, h(i.prependIcon), 1)) : y("", !0),
|
|
785
|
+
i.text ? (c(), u("span", {
|
|
778
786
|
key: 1,
|
|
779
787
|
class: "spicyTooltipText",
|
|
780
788
|
"aria-label": i.text
|
|
781
|
-
},
|
|
782
|
-
i.appendIcon ? (
|
|
783
|
-
], 12,
|
|
789
|
+
}, h(i.text), 9, ut)) : y("", !0),
|
|
790
|
+
i.appendIcon ? (c(), u("span", dt, h(i.appendIcon), 1)) : y("", !0)
|
|
791
|
+
], 12, rt)) : y("", !0)
|
|
784
792
|
], 544));
|
|
785
793
|
}
|
|
786
794
|
});
|
|
787
|
-
function N(e,
|
|
788
|
-
const
|
|
795
|
+
function N(e, s) {
|
|
796
|
+
const o = {
|
|
789
797
|
YYYY: () => e.getFullYear().toString(),
|
|
790
798
|
MM: () => (e.getMonth() + 1).toString().padStart(2, "0"),
|
|
791
799
|
DD: () => e.getDate().toString().padStart(2, "0")
|
|
792
800
|
};
|
|
793
|
-
return
|
|
794
|
-
}
|
|
795
|
-
function pt(e) {
|
|
796
|
-
const [o, s, l] = e.split("-");
|
|
797
|
-
return new Date(Number(o), Number(s) - 1, Number(l));
|
|
801
|
+
return s.replace(/YYYY|MM|DD/g, (l) => o[l]());
|
|
798
802
|
}
|
|
799
|
-
function yt(e
|
|
800
|
-
const s
|
|
801
|
-
return
|
|
803
|
+
function yt(e) {
|
|
804
|
+
const [s, o, l] = e.split("-");
|
|
805
|
+
return new Date(Number(s), Number(o) - 1, Number(l));
|
|
802
806
|
}
|
|
803
|
-
function ft(e,
|
|
804
|
-
const
|
|
805
|
-
return
|
|
807
|
+
function ft(e, s) {
|
|
808
|
+
const o = Math.abs(s.getTime() - e.getTime());
|
|
809
|
+
return Math.ceil(o / (1e3 * 60 * 60 * 24));
|
|
806
810
|
}
|
|
807
|
-
function
|
|
808
|
-
const
|
|
809
|
-
return
|
|
811
|
+
function vt(e, s) {
|
|
812
|
+
const o = new Date(e);
|
|
813
|
+
return o.setDate(e.getDate() + s), o;
|
|
810
814
|
}
|
|
811
|
-
function
|
|
812
|
-
const o =
|
|
813
|
-
return
|
|
815
|
+
function ht(e, s) {
|
|
816
|
+
const o = new Date(e);
|
|
817
|
+
return o.setDate(e.getDate() - s), o;
|
|
814
818
|
}
|
|
815
819
|
function mt(e) {
|
|
816
|
-
const
|
|
817
|
-
return
|
|
820
|
+
const s = /* @__PURE__ */ new Date();
|
|
821
|
+
return e.getDate() === s.getDate() && e.getMonth() === s.getMonth() && e.getFullYear() === s.getFullYear();
|
|
818
822
|
}
|
|
819
823
|
function gt(e) {
|
|
820
|
-
const
|
|
821
|
-
return
|
|
824
|
+
const s = /* @__PURE__ */ new Date();
|
|
825
|
+
return s.setDate(s.getDate() - 1), e.getDate() === s.getDate() && e.getMonth() === s.getMonth() && e.getFullYear() === s.getFullYear();
|
|
822
826
|
}
|
|
823
|
-
function bt(e
|
|
824
|
-
|
|
827
|
+
function bt(e) {
|
|
828
|
+
const s = /* @__PURE__ */ new Date();
|
|
829
|
+
return s.setDate(s.getDate() + 1), e.getDate() === s.getDate() && e.getMonth() === s.getMonth() && e.getFullYear() === s.getFullYear();
|
|
830
|
+
}
|
|
831
|
+
function kt(e = "YYYY-MM-DD", s = { show: !0, separator: "-" }) {
|
|
832
|
+
if (typeof e != "string" || typeof s != "object" || !s.hasOwnProperty("show") || typeof s.show != "boolean")
|
|
825
833
|
throw new Error(
|
|
826
834
|
'Invalid parameters: Please provide a valid format string and options object with a boolean "show" property.'
|
|
827
835
|
);
|
|
828
836
|
let l = N(/* @__PURE__ */ new Date(), e);
|
|
829
|
-
return
|
|
837
|
+
return s.separator && s.separator !== "-" && (l = l.replace(/-/g, s.separator)), s.show ? { value: l, isVisible: !0 } : { value: l, isVisible: !1 };
|
|
830
838
|
}
|
|
831
|
-
const
|
|
839
|
+
const Lt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
832
840
|
__proto__: null,
|
|
833
|
-
currentDate:
|
|
834
|
-
dateAdd:
|
|
835
|
-
dateDiff:
|
|
836
|
-
dateIsToday:
|
|
837
|
-
dateIsTomorrow:
|
|
838
|
-
dateIsYesterday:
|
|
841
|
+
currentDate: kt,
|
|
842
|
+
dateAdd: vt,
|
|
843
|
+
dateDiff: ft,
|
|
844
|
+
dateIsToday: mt,
|
|
845
|
+
dateIsTomorrow: bt,
|
|
846
|
+
dateIsYesterday: gt,
|
|
839
847
|
dateSubtract: ht,
|
|
840
848
|
formatDate: N,
|
|
841
|
-
parseDate:
|
|
849
|
+
parseDate: yt
|
|
842
850
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
843
|
-
function
|
|
844
|
-
const
|
|
845
|
-
function
|
|
851
|
+
function Ct(e) {
|
|
852
|
+
const s = /* @__PURE__ */ new WeakMap();
|
|
853
|
+
function o(l) {
|
|
846
854
|
if ($(l) || typeof l != "object")
|
|
847
855
|
return l;
|
|
848
|
-
if (
|
|
849
|
-
return
|
|
856
|
+
if (s.has(l))
|
|
857
|
+
return s.get(l);
|
|
850
858
|
const t = Array.isArray(l) ? [] : {};
|
|
851
|
-
|
|
859
|
+
s.set(l, t);
|
|
852
860
|
for (const a in l)
|
|
853
|
-
Object.prototype.hasOwnProperty.call(l, a) && (t[a] =
|
|
861
|
+
Object.prototype.hasOwnProperty.call(l, a) && (t[a] = o(l[a]));
|
|
854
862
|
return t;
|
|
855
863
|
}
|
|
856
|
-
return
|
|
864
|
+
return o(e);
|
|
857
865
|
}
|
|
858
866
|
function H(...e) {
|
|
859
|
-
const
|
|
860
|
-
return e.forEach((
|
|
861
|
-
if (!$(
|
|
862
|
-
for (const l in
|
|
863
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
864
|
-
const t =
|
|
865
|
-
t !== void 0 && (typeof t == "object" && t !== null && !Array.isArray(t) ?
|
|
867
|
+
const s = {};
|
|
868
|
+
return e.forEach((o) => {
|
|
869
|
+
if (!$(o)) {
|
|
870
|
+
for (const l in o)
|
|
871
|
+
if (Object.prototype.hasOwnProperty.call(o, l)) {
|
|
872
|
+
const t = o[l];
|
|
873
|
+
t !== void 0 && (typeof t == "object" && t !== null && !Array.isArray(t) ? s[l] = H(s[l] || {}, t) : s[l] = t);
|
|
866
874
|
}
|
|
867
875
|
}
|
|
868
|
-
}),
|
|
876
|
+
}), s;
|
|
869
877
|
}
|
|
870
878
|
function St(...e) {
|
|
871
879
|
return $(e[0]) ? e[0] : Object.assign({}, ...e);
|
|
872
880
|
}
|
|
873
|
-
function
|
|
881
|
+
function wt(e) {
|
|
874
882
|
return $(e) ? [] : Object.keys(e);
|
|
875
883
|
}
|
|
876
|
-
function
|
|
884
|
+
function $t(e) {
|
|
877
885
|
return $(e) ? [] : Object.values(e);
|
|
878
886
|
}
|
|
879
|
-
function
|
|
887
|
+
function _t(e) {
|
|
880
888
|
return $(e) ? [] : Object.entries(e);
|
|
881
889
|
}
|
|
882
890
|
function $(e) {
|
|
883
891
|
return e === null || typeof e != "object" ? !1 : Array.isArray(e) ? e.length === 0 : Object.keys(e).length === 0;
|
|
884
892
|
}
|
|
885
|
-
const
|
|
893
|
+
const At = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
886
894
|
__proto__: null,
|
|
887
|
-
deepClone:
|
|
895
|
+
deepClone: Ct,
|
|
888
896
|
deepMerge: H,
|
|
889
|
-
getObjectEntries:
|
|
890
|
-
getObjectKeys:
|
|
891
|
-
getObjectValues:
|
|
897
|
+
getObjectEntries: _t,
|
|
898
|
+
getObjectKeys: wt,
|
|
899
|
+
getObjectValues: $t,
|
|
892
900
|
isObjectEmpty: $,
|
|
893
901
|
mergeObjects: St
|
|
894
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
902
|
+
}, Symbol.toStringTag, { value: "Module" })), Bt = ':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)}', Tt = ".spicyRipple{position:absolute;border-radius:50%;background:currentColor;transform:scale(0);animation:spicy-ripple-animation .6s linear;pointer-events:none;z-index:1}@keyframes spicy-ripple-animation{to{transform:scale(4);opacity:0}}", Dt = {
|
|
903
|
+
mounted(e) {
|
|
904
|
+
e.style.position = "absolute", e.style.cursor = "move";
|
|
905
|
+
let s, o;
|
|
906
|
+
const l = (n) => {
|
|
907
|
+
e.style.left = `${n.pageX - s}px`, e.style.top = `${n.pageY - o}px`;
|
|
908
|
+
}, t = () => {
|
|
909
|
+
document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", t);
|
|
910
|
+
}, a = (n) => {
|
|
911
|
+
s = n.clientX - e.getBoundingClientRect().left, o = n.clientY - e.getBoundingClientRect().top, document.addEventListener("mousemove", l), document.addEventListener("mouseup", t);
|
|
912
|
+
};
|
|
913
|
+
e.addEventListener("mousedown", a);
|
|
914
|
+
const r = e;
|
|
915
|
+
r._cleanup = () => {
|
|
916
|
+
r.removeEventListener("mousedown", a), document.removeEventListener("mousemove", l), document.removeEventListener("mouseup", t);
|
|
917
|
+
};
|
|
918
|
+
},
|
|
919
|
+
unmounted(e) {
|
|
920
|
+
const s = e;
|
|
921
|
+
s._cleanup && s._cleanup();
|
|
922
|
+
}
|
|
923
|
+
}, Mt = {
|
|
895
924
|
beforeMount(e) {
|
|
896
|
-
e.style.position = "relative", e.style.overflow = "hidden", e.addEventListener("click", (
|
|
897
|
-
const
|
|
898
|
-
|
|
925
|
+
e.style.position = "relative", e.style.overflow = "hidden", e.addEventListener("click", (s) => {
|
|
926
|
+
const o = document.createElement("span"), l = Math.max(e.clientWidth, e.clientHeight), t = l / 2;
|
|
927
|
+
o.style.width = o.style.height = `${l}px`, o.style.left = `${s.clientX - e.getBoundingClientRect().left - t}px`, o.style.top = `${s.clientY - e.getBoundingClientRect().top - t}px`, o.classList.add("spicyRipple");
|
|
899
928
|
const a = e.querySelector(".spicyRipple");
|
|
900
|
-
a && a.remove(), e.appendChild(
|
|
901
|
-
|
|
929
|
+
a && a.remove(), e.appendChild(o), o.addEventListener("animationend", () => {
|
|
930
|
+
o.remove();
|
|
902
931
|
});
|
|
903
932
|
});
|
|
904
933
|
}
|
|
905
|
-
},
|
|
906
|
-
install(e,
|
|
907
|
-
const { useComponents:
|
|
908
|
-
if (
|
|
934
|
+
}, Vt = {
|
|
935
|
+
install(e, s = {}) {
|
|
936
|
+
const { useComponents: o = !0, useStyles: l = !0, useDirectives: t = !0 } = s;
|
|
937
|
+
if (o && (e.component("SpicyAccordion", re), e.component("SpicyAlert", pe), e.component("SpicyBtn", ge), e.component("SpicyCarousel", Te), e.component("SpicyDivider", De), e.component("SpicyDropdown", Le), e.component("SpicyLabel", Pe), e.component("SpicyModal", xe), e.component("SpicyProgress", je), e.component("SpicySheet", qe), e.component("SpicySlider", Ze), e.component("SpicyTabs", st), e.component("SpicyTextarea", at), e.component("SpicyToggle", it), e.component("SpicyTooltip", pt)), l) {
|
|
909
938
|
const a = document.createElement("style");
|
|
910
|
-
a.id = "SpicyStyles", a.textContent =
|
|
939
|
+
a.id = "SpicyStyles", a.textContent = Bt, document.head.appendChild(a);
|
|
911
940
|
}
|
|
912
941
|
if (t) {
|
|
913
|
-
e.directive("spicyRipple",
|
|
942
|
+
e.directive("spicyDrag", Dt), e.directive("spicyRipple", Mt);
|
|
914
943
|
const a = document.createElement("style");
|
|
915
|
-
a.id = "SpicyRippleStyles", a.textContent =
|
|
944
|
+
a.id = "SpicyRippleStyles", a.textContent = Tt, document.head.appendChild(a);
|
|
916
945
|
}
|
|
917
946
|
}
|
|
918
947
|
};
|
|
@@ -922,34 +951,35 @@ export {
|
|
|
922
951
|
ge as SpicyBtn,
|
|
923
952
|
Te as SpicyCarousel,
|
|
924
953
|
De as SpicyDivider,
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
954
|
+
Le as SpicyDropdown,
|
|
955
|
+
Vt as SpicyKatsu,
|
|
956
|
+
Pe as SpicyLabel,
|
|
957
|
+
xe as SpicyModal,
|
|
929
958
|
je as SpicyProgress,
|
|
930
959
|
qe as SpicySheet,
|
|
931
960
|
Ze as SpicySlider,
|
|
932
961
|
st as SpicyTabs,
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
962
|
+
at as SpicyTextarea,
|
|
963
|
+
it as SpicyToggle,
|
|
964
|
+
pt as SpicyTooltip,
|
|
965
|
+
kt as currentDate,
|
|
966
|
+
vt as dateAdd,
|
|
967
|
+
ft as dateDiff,
|
|
968
|
+
mt as dateIsToday,
|
|
969
|
+
bt as dateIsTomorrow,
|
|
970
|
+
gt as dateIsYesterday,
|
|
942
971
|
ht as dateSubtract,
|
|
943
|
-
|
|
944
|
-
|
|
972
|
+
Lt as dateUtils,
|
|
973
|
+
Ct as deepClone,
|
|
945
974
|
H as deepMerge,
|
|
946
975
|
N as formatDate,
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
976
|
+
_t as getObjectEntries,
|
|
977
|
+
wt as getObjectKeys,
|
|
978
|
+
$t as getObjectValues,
|
|
950
979
|
$ as isObjectEmpty,
|
|
951
980
|
St as mergeObjects,
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
981
|
+
At as objUtils,
|
|
982
|
+
yt as parseDate,
|
|
983
|
+
Dt as spicyDrag,
|
|
984
|
+
Mt as spicyRipple
|
|
955
985
|
};
|