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