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