spicykatsu 0.4.1 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/SpicyAccordion-Cm-RI3r_.js +47 -0
- package/dist/SpicyAccordion.js +2 -0
- package/dist/{lib/SpicyAlert/SpicyAlert.js → SpicyAlert-Bwi92wCd.js} +17 -17
- package/dist/SpicyAlert.js +2 -0
- package/dist/{lib/SpicyBtn/SpicyBtn.js → SpicyBtn-B5nk3vCZ.js} +14 -14
- package/dist/SpicyBtn.js +2 -0
- package/dist/SpicyCarousel-Be5oYKnj.js +121 -0
- package/dist/SpicyCarousel.js +2 -0
- package/dist/SpicyDataTable-BqoW4IZ4.js +126 -0
- package/dist/SpicyDataTable.js +2 -0
- package/dist/{lib/SpicyDialog/SpicyDialog.js → SpicyDialog-CKtIwcPz.js} +4 -3
- package/dist/SpicyDialog.js +2 -0
- package/dist/{lib/SpicyDivider/SpicyDivider.js → SpicyDivider-CDgC_pdd.js} +0 -0
- package/dist/SpicyDivider.js +2 -0
- package/dist/{lib/SpicyDropdown/SpicyDropdown.js → SpicyDropdown-DLqjiK7t.js} +11 -11
- package/dist/SpicyDropdown.js +2 -0
- package/dist/{lib/SpicyFileInput/SpicyFileInput.js → SpicyFileInput-7dwibTqM.js} +16 -16
- package/dist/SpicyFileInput.js +2 -0
- package/dist/{lib/SpicyModal/SpicyModal.js → SpicyModal-Dx4dKN4V.js} +10 -10
- package/dist/SpicyModal.js +2 -0
- package/dist/SpicyProgress-CjD0SCA7.js +76 -0
- package/dist/SpicyProgress.js +2 -0
- package/dist/{lib/SpicySheet/SpicySheet.js → SpicySheet-k07oHm4-.js} +4 -3
- package/dist/SpicySheet.js +2 -0
- package/dist/{lib/SpicySlider/SpicySlider.js → SpicySlider-DPgJ_VLR.js} +12 -12
- package/dist/SpicySlider.js +2 -0
- package/dist/{lib/SpicyTabs/SpicyTabs.js → SpicyTabs-8fPN5eaX.js} +10 -10
- package/dist/SpicyTabs.js +2 -0
- package/dist/{lib/SpicyTextArea/SpicyTextArea.js → SpicyTextArea-BqgEgEyx.js} +7 -7
- package/dist/SpicyTextArea.js +2 -0
- package/dist/{lib/SpicyTextField/SpicyTextField.js → SpicyTextField-BMX1T6xl.js} +12 -12
- package/dist/SpicyTextField.js +2 -0
- package/dist/{lib/SpicyToggle/SpicyToggle.js → SpicyToggle-DJTopuIB.js} +8 -8
- package/dist/SpicyToggle.js +2 -0
- package/dist/{lib/SpicyTooltip/SpicyTooltip.js → SpicyTooltip-8nWZNAvJ.js} +11 -11
- package/dist/SpicyTooltip.js +2 -0
- package/dist/{lib/SpicyTree/SpicyTree.js → SpicyTree-BkxOQATS.js} +13 -13
- package/dist/SpicyTree.js +2 -0
- package/dist/index.js +60 -0
- package/dist/spicyDrag-CgD0GOa9.js +38 -0
- package/dist/spicyDrag.js +2 -0
- package/dist/spicyRipple-DHAFwamp.js +43 -0
- package/dist/spicyRipple.js +2 -0
- package/dist/spicykatsu.css +2 -0
- package/dist/spicykatsu.umd.js +1 -0
- package/dist/{lib/SpicyAccordion → styles}/SpicyAccordion.css +0 -0
- package/dist/{lib/SpicyAlert → styles}/SpicyAlert.css +0 -0
- package/dist/{lib/SpicyBtn → styles}/SpicyBtn.css +0 -0
- package/dist/{lib/SpicyCarousel → styles}/SpicyCarousel.css +0 -0
- package/dist/styles/SpicyDataTable.css +1 -0
- package/dist/{lib/SpicyDialog → styles}/SpicyDialog.css +0 -0
- package/dist/{lib/SpicyDropdown → styles}/SpicyDropdown.css +0 -0
- package/dist/{lib/SpicyFileInput → styles}/SpicyFileInput.css +0 -0
- package/dist/{lib/SpicyModal → styles}/SpicyModal.css +0 -0
- package/dist/styles/SpicyProgress.css +1 -0
- package/dist/{lib/SpicySheet → styles}/SpicySheet.css +0 -0
- package/dist/{lib/SpicySlider → styles}/SpicySlider.css +0 -0
- package/dist/{lib/SpicyTabs → styles}/SpicyTabs.css +0 -0
- package/dist/{lib/SpicyTextArea → styles}/SpicyTextArea.css +0 -0
- package/dist/{lib/SpicyTextField → styles}/SpicyTextField.css +0 -0
- package/dist/{lib/SpicyToggle → styles}/SpicyToggle.css +0 -0
- package/dist/{lib/SpicyTooltip → styles}/SpicyTooltip.css +0 -0
- package/dist/{lib/SpicyTree → styles}/SpicyTree.css +0 -0
- package/dist/styles/main.css +45 -0
- package/dist/types/components/SpicyAccordion/SpicyAccordion.vue.d.ts +24 -0
- package/dist/types/components/SpicyAlert/SpicyAlert.vue.d.ts +31 -0
- package/dist/types/components/SpicyBtn/SpicyBtn.vue.d.ts +39 -0
- package/dist/types/components/SpicyCarousel/SpicyCarousel.vue.d.ts +48 -0
- package/dist/types/components/SpicyDataTable/SpicyDataTable.vue.d.ts +52 -0
- package/dist/types/components/SpicyDialog/SpicyDialog.vue.d.ts +44 -0
- package/dist/types/components/SpicyDivider/SpicyDivider.vue.d.ts +26 -0
- package/dist/types/components/SpicyDropdown/SpicyDropdown.vue.d.ts +25 -0
- package/dist/types/components/SpicyFileInput/SpicyFileInput.vue.d.ts +42 -0
- package/dist/types/components/SpicyModal/SpicyModal.vue.d.ts +58 -0
- package/dist/types/components/SpicyProgress/SpicyProgress.vue.d.ts +31 -0
- package/dist/types/components/SpicySheet/SpicySheet.vue.d.ts +24 -0
- package/dist/types/components/SpicySlider/SpicySlider.vue.d.ts +34 -0
- package/dist/types/components/SpicyTabs/SpicyTabs.vue.d.ts +24 -0
- package/dist/types/components/SpicyTextArea/SpicyTextArea.vue.d.ts +32 -0
- package/dist/types/components/SpicyTextField/SpicyTextField.vue.d.ts +42 -0
- package/dist/types/components/SpicyToggle/SpicyToggle.vue.d.ts +22 -0
- package/dist/types/components/SpicyTooltip/SpicyTooltip.vue.d.ts +24 -0
- package/dist/types/components/SpicyTree/SpicyTree.vue.d.ts +11 -0
- package/dist/types/components/SpicyTree/SpicyTreeNode.vue.d.ts +12 -0
- package/dist/types/directives/spicyDrag.d.ts +6 -0
- package/dist/types/directives/spicyRipple.d.ts +2 -0
- package/dist/types/entries/SpicyAccordion.d.ts +2 -0
- package/dist/types/entries/SpicyAlert.d.ts +2 -0
- package/dist/types/entries/SpicyBtn.d.ts +2 -0
- package/dist/types/entries/SpicyCarousel.d.ts +2 -0
- package/dist/types/entries/SpicyDataTable.d.ts +2 -0
- package/dist/types/entries/SpicyDialog.d.ts +2 -0
- package/dist/types/entries/SpicyDivider.d.ts +2 -0
- package/dist/types/entries/SpicyDropdown.d.ts +2 -0
- package/dist/types/entries/SpicyFileInput.d.ts +2 -0
- package/dist/types/entries/SpicyModal.d.ts +2 -0
- package/dist/types/entries/SpicyProgress.d.ts +2 -0
- package/dist/types/entries/SpicySheet.d.ts +2 -0
- package/dist/types/entries/SpicySlider.d.ts +2 -0
- package/dist/types/entries/SpicyTabs.d.ts +2 -0
- package/dist/types/entries/SpicyTextArea.d.ts +2 -0
- package/dist/types/entries/SpicyTextField.d.ts +2 -0
- package/dist/types/entries/SpicyToggle.d.ts +2 -0
- package/dist/types/entries/SpicyTooltip.d.ts +2 -0
- package/dist/types/entries/SpicyTree.d.ts +3 -0
- package/dist/types/entries/spicyDrag.d.ts +2 -0
- package/dist/types/entries/spicyRipple.d.ts +2 -0
- package/dist/types/index.d.ts +34 -0
- package/dist/types/umd.d.ts +4 -0
- package/package.json +140 -52
- package/dist/lib/SpicyAccordion/SpicyAccordion.js +0 -47
- package/dist/lib/SpicyCarousel/SpicyCarousel.js +0 -121
- package/dist/lib/SpicyDataTable/SpicyDataTable.css +0 -1
- package/dist/lib/SpicyDataTable/SpicyDataTable.js +0 -196
- package/dist/lib/SpicyProgress/SpicyProgress.js +0 -4
- package/dist/spicykatsu.es.js +0 -148
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ app.use(SpicyKatsu)
|
|
|
24
24
|
app.mount('#app')
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
Styles are automatically injected when you call `app.use(SpicyKatsu)`
|
|
27
|
+
Styles are automatically injected when you call `app.use(SpicyKatsu)` - no CSS import needed.
|
|
28
28
|
|
|
29
29
|
You can also import components individually for JS tree-shaking:
|
|
30
30
|
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { Fragment as e, Transition as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, ref as l, renderList as u, renderSlot as d, toDisplayString as f, vShow as p, withCtx as m, withDirectives as h } from "vue";
|
|
2
|
+
//#region src/components/SpicyAccordion/SpicyAccordion.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var g = { class: "spicyAccordion" }, _ = ["onClick", "aria-expanded"], v = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "accordionIcon",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
8
|
+
}, y = ["d"], b = { class: "spicyAccordionContent" }, x = /* @__PURE__ */ o({
|
|
9
|
+
__name: "SpicyAccordion",
|
|
10
|
+
props: {
|
|
11
|
+
sections: {},
|
|
12
|
+
singleOpen: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !1
|
|
15
|
+
},
|
|
16
|
+
defaultOpen: {}
|
|
17
|
+
},
|
|
18
|
+
setup(o) {
|
|
19
|
+
let x = o, S = l(x.defaultOpen || []), C = (e) => {
|
|
20
|
+
if (x.singleOpen) S.value = S.value.includes(e) ? [] : [e];
|
|
21
|
+
else {
|
|
22
|
+
let t = S.value.indexOf(e);
|
|
23
|
+
t === -1 ? S.value.push(e) : S.value.splice(t, 1);
|
|
24
|
+
}
|
|
25
|
+
}, w = (e) => S.value.includes(e);
|
|
26
|
+
return (l, x) => (c(), r("div", g, [(c(!0), r(e, null, u(o.sections, (e, o) => (c(), r("div", {
|
|
27
|
+
key: o,
|
|
28
|
+
class: "spicyAccordionItem"
|
|
29
|
+
}, [i("button", {
|
|
30
|
+
class: s(["spicyAccordionHeader", { open: w(o) }]),
|
|
31
|
+
onClick: (e) => C(o),
|
|
32
|
+
"aria-expanded": w(o)
|
|
33
|
+
}, [
|
|
34
|
+
i("span", null, f(e.title), 1),
|
|
35
|
+
e.icon ? (c(), r("svg", v, [i("path", { d: e.icon }, null, 8, y)])) : n("", !0),
|
|
36
|
+
x[0] ||= i("span", { class: "accordionToggle" }, [i("svg", {
|
|
37
|
+
class: "accordionArrow",
|
|
38
|
+
viewBox: "0 0 24 24"
|
|
39
|
+
}, [i("path", { d: "M7 10l5 5 5-5H7z" })])], -1)
|
|
40
|
+
], 10, _), a(t, { name: "fade" }, {
|
|
41
|
+
default: m(() => [h(i("div", b, [d(l.$slots, `section-${o}`)], 512), [[p, w(o)]])]),
|
|
42
|
+
_: 2
|
|
43
|
+
}, 1024)]))), 128))]));
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
//#endregion
|
|
47
|
+
export { x as t };
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { Transition as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, normalizeClass as o, onBeforeUnmount as s, openBlock as c, ref as l, renderSlot as u, toDisplayString as d, watch as f, withCtx as p, withKeys as m } from "vue";
|
|
2
|
-
//#region src/components/SpicyAlert/SpicyAlert.
|
|
3
|
-
var h =
|
|
2
|
+
//#region src/components/SpicyAlert/SpicyAlert.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var h = ["aria-label"], g = {
|
|
4
4
|
key: 0,
|
|
5
5
|
class: "spicyAlertIcon"
|
|
6
|
-
},
|
|
6
|
+
}, _ = {
|
|
7
7
|
key: 1,
|
|
8
8
|
class: "spicyAlertIcon",
|
|
9
9
|
viewBox: "0 0 24 24",
|
|
10
10
|
xmlns: "http://www.w3.org/2000/svg"
|
|
11
|
-
},
|
|
11
|
+
}, v = ["d"], y = { class: "spicyAlertContainer" }, b = {
|
|
12
12
|
key: 0,
|
|
13
13
|
class: "spicyAlertTitle"
|
|
14
|
-
},
|
|
14
|
+
}, x = {
|
|
15
15
|
key: 1,
|
|
16
16
|
class: "spicyAlertText"
|
|
17
|
-
},
|
|
17
|
+
}, S = {
|
|
18
18
|
key: 0,
|
|
19
19
|
viewBox: "0 0 24 24",
|
|
20
20
|
xmlns: "http://www.w3.org/2000/svg"
|
|
21
|
-
},
|
|
21
|
+
}, C = ["d"], w = { key: 1 }, T = /* @__PURE__ */ a({
|
|
22
22
|
__name: "SpicyAlert",
|
|
23
23
|
props: {
|
|
24
24
|
variant: { default: "info" },
|
|
@@ -42,7 +42,7 @@ var h = ".spicyAlert{align-items:center;gap:10px;padding:12px;display:flex}.spic
|
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
44
|
setup(a) {
|
|
45
|
-
let
|
|
45
|
+
let T = a, E = l(!0), D = null, O = l(T.autoClose), k = null, A = () => {
|
|
46
46
|
E.value = !1;
|
|
47
47
|
}, j = () => {
|
|
48
48
|
O.value > 0 && (k = Date.now(), D = setTimeout(() => {
|
|
@@ -58,7 +58,7 @@ var h = ".spicyAlert{align-items:center;gap:10px;padding:12px;display:flex}.spic
|
|
|
58
58
|
}, P = () => {
|
|
59
59
|
j();
|
|
60
60
|
};
|
|
61
|
-
return f(() =>
|
|
61
|
+
return f(() => T.autoClose, (e) => {
|
|
62
62
|
O.value = e, M(), j();
|
|
63
63
|
}), s(() => {
|
|
64
64
|
M();
|
|
@@ -73,27 +73,27 @@ var h = ".spicyAlert{align-items:center;gap:10px;padding:12px;display:flex}.spic
|
|
|
73
73
|
onMouseenter: N,
|
|
74
74
|
onMouseleave: P
|
|
75
75
|
}, [
|
|
76
|
-
a.iconOnly && a.icon ? (c(), r("span",
|
|
77
|
-
a.mdi ? (c(), r("svg",
|
|
76
|
+
a.iconOnly && a.icon ? (c(), r("span", g, d(a.icon), 1)) : n("", !0),
|
|
77
|
+
a.mdi ? (c(), r("svg", _, [i("path", {
|
|
78
78
|
fill: "currentColor",
|
|
79
79
|
class: "spicyAlertMDI",
|
|
80
80
|
d: a.mdi
|
|
81
|
-
}, null, 8,
|
|
82
|
-
i("div",
|
|
81
|
+
}, null, 8, v)])) : n("", !0),
|
|
82
|
+
i("div", y, [a.title ? (c(), r("span", b, d(a.title), 1)) : n("", !0), !a.iconOnly && a.text ? (c(), r("span", x, d(a.text), 1)) : n("", !0)]),
|
|
83
83
|
a.closable ? (c(), r("button", {
|
|
84
84
|
key: 2,
|
|
85
85
|
class: "spicyAlertCloseBtn",
|
|
86
86
|
onClick: A,
|
|
87
87
|
"aria-label": "Close alert"
|
|
88
|
-
}, [a.closeIcon ? (c(), r("svg",
|
|
88
|
+
}, [a.closeIcon ? (c(), r("svg", S, [i("path", {
|
|
89
89
|
fill: "#000",
|
|
90
90
|
d: a.closeIcon
|
|
91
|
-
}, null, 8,
|
|
91
|
+
}, null, 8, C)])) : (c(), r("span", w, "X"))])) : n("", !0),
|
|
92
92
|
a.text ? n("", !0) : u(s.$slots, "default", { key: 3 })
|
|
93
|
-
], 42,
|
|
93
|
+
], 42, h)) : n("", !0)]),
|
|
94
94
|
_: 3
|
|
95
95
|
}));
|
|
96
96
|
}
|
|
97
97
|
});
|
|
98
98
|
//#endregion
|
|
99
|
-
export {
|
|
99
|
+
export { T as t };
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, normalizeStyle as o, openBlock as s, renderSlot as c, resolveDirective as l, toDisplayString as u, withDirectives as d } from "vue";
|
|
2
|
-
//#region src/components/SpicyBtn/SpicyBtn.
|
|
3
|
-
var f =
|
|
2
|
+
//#region src/components/SpicyBtn/SpicyBtn.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var f = [
|
|
4
4
|
"disabled",
|
|
5
5
|
"aria-label",
|
|
6
6
|
"aria-disabled",
|
|
7
7
|
"tabindex"
|
|
8
|
-
],
|
|
8
|
+
], p = {
|
|
9
9
|
key: 0,
|
|
10
10
|
class: "spicyBtnIcon",
|
|
11
11
|
viewBox: "0 0 24 24",
|
|
12
12
|
xmlns: "http://www.w3.org/2000/svg"
|
|
13
|
-
},
|
|
13
|
+
}, m = ["d"], h = {
|
|
14
14
|
key: 1,
|
|
15
15
|
class: "spicyBtnIcon"
|
|
16
|
-
},
|
|
16
|
+
}, g = {
|
|
17
17
|
key: 2,
|
|
18
18
|
class: "spicyBtnText"
|
|
19
|
-
},
|
|
19
|
+
}, _ = /* @__PURE__ */ i({
|
|
20
20
|
__name: "SpicyBtn",
|
|
21
21
|
props: {
|
|
22
22
|
variant: { default: "filled" },
|
|
@@ -37,8 +37,8 @@ var f = ".spicyBtn{text-align:center;cursor:pointer;color:var(--skTextColor,#ddd
|
|
|
37
37
|
ariaLabel: {}
|
|
38
38
|
},
|
|
39
39
|
emits: ["click"],
|
|
40
|
-
setup(i, { emit:
|
|
41
|
-
let v =
|
|
40
|
+
setup(i, { emit: _ }) {
|
|
41
|
+
let v = _, y = (e) => {
|
|
42
42
|
b.disabled || v("click", e);
|
|
43
43
|
}, b = i, x = e(() => b.ariaLabel || b.text || "Button"), S = e(() => ({
|
|
44
44
|
"--skFontSize": typeof b.fontSize == "number" ? `${b.fontSize}px` : b.fontSize,
|
|
@@ -54,7 +54,7 @@ var f = ".spicyBtn{text-align:center;cursor:pointer;color:var(--skTextColor,#ddd
|
|
|
54
54
|
isRound: C.value,
|
|
55
55
|
[b.size]: b.size !== "default"
|
|
56
56
|
}));
|
|
57
|
-
return (e,
|
|
57
|
+
return (e, _) => {
|
|
58
58
|
let v = l("spicyRipple");
|
|
59
59
|
return d((s(), n("button", {
|
|
60
60
|
class: a(w.value),
|
|
@@ -66,16 +66,16 @@ var f = ".spicyBtn{text-align:center;cursor:pointer;color:var(--skTextColor,#ddd
|
|
|
66
66
|
"aria-disabled": i.disabled,
|
|
67
67
|
tabindex: i.disabled ? -1 : 0
|
|
68
68
|
}, [
|
|
69
|
-
i.mdi ? (s(), n("svg",
|
|
69
|
+
i.mdi ? (s(), n("svg", p, [r("path", {
|
|
70
70
|
fill: "currentColor",
|
|
71
71
|
class: "spicyBtnMDI",
|
|
72
72
|
d: i.mdi
|
|
73
|
-
}, null, 8,
|
|
74
|
-
i.text ? (s(), n("span",
|
|
73
|
+
}, null, 8, m)])) : i.icon ? (s(), n("span", h, u(i.icon), 1)) : t("", !0),
|
|
74
|
+
i.text ? (s(), n("span", g, u(i.text), 1)) : t("", !0),
|
|
75
75
|
c(e.$slots, "default")
|
|
76
|
-
], 14,
|
|
76
|
+
], 14, f)), [[v]]);
|
|
77
77
|
};
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
80
|
//#endregion
|
|
81
|
-
export {
|
|
81
|
+
export { _ as t };
|
package/dist/SpicyBtn.js
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { Fragment as e, Transition as t, computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, normalizeClass as c, normalizeStyle as l, onMounted as u, onUnmounted as d, openBlock as f, ref as p, renderList as m, renderSlot as h, toDisplayString as g, withCtx as _ } from "vue";
|
|
2
|
+
//#region src/components/SpicyCarousel/SpicyCarousel.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var v = ["aria-label"], y = { class: "spicyCarouselInfoText" }, b = { class: "spicyCarouselTitle" }, x = { key: 0 }, S = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "spicyCarouselNavControls"
|
|
6
|
+
}, C = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "spicyCarouselPagination"
|
|
9
|
+
}, w = ["onClick"], T = { class: "spicyCarouselPage" }, E = /* @__PURE__ */ s({
|
|
10
|
+
__name: "SpicyCarousel",
|
|
11
|
+
props: {
|
|
12
|
+
autoplay: {
|
|
13
|
+
type: Boolean,
|
|
14
|
+
default: !1
|
|
15
|
+
},
|
|
16
|
+
autoplaySpeed: { default: 5e3 },
|
|
17
|
+
showNavigation: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: !0
|
|
20
|
+
},
|
|
21
|
+
showPagination: {
|
|
22
|
+
type: Boolean,
|
|
23
|
+
default: !0
|
|
24
|
+
},
|
|
25
|
+
activeColor: { default: "var(--skPrimaryColor)" },
|
|
26
|
+
loop: {
|
|
27
|
+
type: Boolean,
|
|
28
|
+
default: !0
|
|
29
|
+
},
|
|
30
|
+
initialSlide: { default: 0 },
|
|
31
|
+
slides: { default: () => [] },
|
|
32
|
+
width: { default: "580px" },
|
|
33
|
+
height: { default: "360px" },
|
|
34
|
+
fullScreen: {
|
|
35
|
+
type: Boolean,
|
|
36
|
+
default: !1
|
|
37
|
+
},
|
|
38
|
+
enableImageClick: {
|
|
39
|
+
type: Boolean,
|
|
40
|
+
default: !1
|
|
41
|
+
},
|
|
42
|
+
paginationLimit: { default: 10 }
|
|
43
|
+
},
|
|
44
|
+
setup(s) {
|
|
45
|
+
let E, D, O = !1, k = s, A = n(() => ({
|
|
46
|
+
"--width": k.width,
|
|
47
|
+
"--height": k.height,
|
|
48
|
+
"--activeColor": k.activeColor
|
|
49
|
+
})), j = n(() => k.paginationLimit), M = n(() => k.slides[P.value]?.title), N = n(() => F.value.fullScreen === !1 ? !1 : k.fullScreen), P = p(k.initialSlide), F = n(() => k.slides[P.value]), I, L = () => {
|
|
50
|
+
P.value = (P.value - 1 + k.slides.length) % k.slides.length;
|
|
51
|
+
}, R = () => {
|
|
52
|
+
P.value = (P.value + 1) % k.slides.length;
|
|
53
|
+
}, z = (e) => {
|
|
54
|
+
P.value = e;
|
|
55
|
+
}, B = () => {
|
|
56
|
+
I && clearInterval(I);
|
|
57
|
+
}, V = () => {
|
|
58
|
+
k.autoplay && (I = window.setInterval(R, k.autoplaySpeed));
|
|
59
|
+
}, H = () => {
|
|
60
|
+
window.open(F.value.img);
|
|
61
|
+
}, U = () => {
|
|
62
|
+
k.enableImageClick && H();
|
|
63
|
+
}, W = (e) => {
|
|
64
|
+
E = e.touches[0].clientX, D = e.touches[0].clientY, O = !1;
|
|
65
|
+
}, G = (e) => {
|
|
66
|
+
if (!O) {
|
|
67
|
+
let t = e.touches[0].clientX - E, n = e.touches[0].clientY - D;
|
|
68
|
+
Math.abs(t) > Math.abs(n) && (t > 40 ? (L(), O = !0) : t < -40 && (R(), O = !0));
|
|
69
|
+
}
|
|
70
|
+
}, K = n(() => {
|
|
71
|
+
let e = k.slides.length, t = Math.max(0, P.value - Math.floor(j.value / 2)), n = Math.min(e, t + j.value);
|
|
72
|
+
return [...Array(e).keys()].slice(t, n);
|
|
73
|
+
});
|
|
74
|
+
return u(() => {
|
|
75
|
+
V();
|
|
76
|
+
}), d(() => {
|
|
77
|
+
B();
|
|
78
|
+
}), (n, u) => (f(), i("div", {
|
|
79
|
+
class: "spicyCarouselWrapper",
|
|
80
|
+
style: l({ ...A.value })
|
|
81
|
+
}, [
|
|
82
|
+
a("div", {
|
|
83
|
+
class: "spicyCarouselContainer",
|
|
84
|
+
onMouseenter: B,
|
|
85
|
+
onMouseleave: V,
|
|
86
|
+
onTouchstart: W,
|
|
87
|
+
onTouchmove: G
|
|
88
|
+
}, [o(t, {
|
|
89
|
+
name: "slide",
|
|
90
|
+
mode: "out-in"
|
|
91
|
+
}, {
|
|
92
|
+
default: _(() => [(f(), i("div", {
|
|
93
|
+
class: c(["spicyCarouselSlide", { pointCursor: k.enableImageClick }]),
|
|
94
|
+
key: P.value,
|
|
95
|
+
style: l({ backgroundImage: `url(${F.value.img})` }),
|
|
96
|
+
onClick: U
|
|
97
|
+
}, [s.slides[P.value].text ? (f(), i("div", {
|
|
98
|
+
key: 0,
|
|
99
|
+
class: c(["spicyCarouselTextOverlay", { fullScreen: N.value }]),
|
|
100
|
+
"aria-label": s.slides[P.value].text
|
|
101
|
+
}, [a("span", y, g(s.slides[P.value].text), 1)], 10, v)) : r("", !0), h(n.$slots, "default")], 6))]),
|
|
102
|
+
_: 3
|
|
103
|
+
})], 32),
|
|
104
|
+
a("div", b, [M.value ? (f(), i("h2", x, g(F.value.title), 1)) : r("", !0)]),
|
|
105
|
+
s.showNavigation ? (f(), i("div", S, [a("button", {
|
|
106
|
+
class: "spicyCarouselPrevBtn",
|
|
107
|
+
onClick: L
|
|
108
|
+
}, [...u[0] ||= [a("span", { class: "spicyCarouselPrevBtnIcon" }, "<", -1)]]), a("button", {
|
|
109
|
+
class: "spicyCarouselNextBtn",
|
|
110
|
+
onClick: R
|
|
111
|
+
}, [...u[1] ||= [a("span", { class: "spicyCarouselNextBtnIcon" }, ">", -1)]])])) : r("", !0),
|
|
112
|
+
s.showPagination ? (f(), i("div", C, [(f(!0), i(e, null, m(K.value, (e) => (f(), i("button", {
|
|
113
|
+
key: e,
|
|
114
|
+
onClick: (t) => z(e),
|
|
115
|
+
class: c(["spicyCarouselPageBtn", { active: e === P.value }])
|
|
116
|
+
}, [a("span", T, g(e + 1), 1)], 10, w))), 128))])) : r("", !0)
|
|
117
|
+
], 4));
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
//#endregion
|
|
121
|
+
export { E as t };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { t as e } from "./SpicyBtn-B5nk3vCZ.js";
|
|
2
|
+
import { t } from "./SpicyProgress-CjD0SCA7.js";
|
|
3
|
+
import { Fragment as n, computed as r, createCommentVNode as i, createElementBlock as a, createElementVNode as o, createTextVNode as s, createVNode as c, defineComponent as l, normalizeClass as u, normalizeStyle as d, openBlock as f, ref as p, renderList as m, renderSlot as h, toDisplayString as g, watch as _ } from "vue";
|
|
4
|
+
//#region src/components/SpicyDataTable/SpicyDataTable.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var v = { class: "spicyDataTable" }, y = { class: "spicyDataTableContainer" }, b = { class: "spicyDataTableTable" }, x = { class: "spicyDataTableHeader" }, S = ["onClick"], C = { class: "headerText" }, w = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "sortIcon"
|
|
8
|
+
}, T = { class: "spicyDataTableBody" }, E = ["onClick"], D = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "spicyDataTableLoading"
|
|
11
|
+
}, O = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "spicyDataTablePagination"
|
|
14
|
+
}, k = { class: "paginationInfo" }, A = { class: "paginationControls" }, j = { class: "paginationPerPage" }, M = ["value"], N = ["value"], P = /* @__PURE__ */ l({
|
|
15
|
+
__name: "SpicyDataTable",
|
|
16
|
+
props: {
|
|
17
|
+
headers: {},
|
|
18
|
+
items: {},
|
|
19
|
+
itemKey: { default: "id" },
|
|
20
|
+
itemsPerPage: { default: 10 },
|
|
21
|
+
page: { default: 1 },
|
|
22
|
+
loading: {
|
|
23
|
+
type: Boolean,
|
|
24
|
+
default: !1
|
|
25
|
+
},
|
|
26
|
+
serverItemsLength: {},
|
|
27
|
+
showPagination: {
|
|
28
|
+
type: Boolean,
|
|
29
|
+
default: !0
|
|
30
|
+
},
|
|
31
|
+
sortable: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: !0
|
|
34
|
+
},
|
|
35
|
+
fixedRowHeight: { default: "auto" }
|
|
36
|
+
},
|
|
37
|
+
emits: [
|
|
38
|
+
"update:page",
|
|
39
|
+
"update:itemsPerPage",
|
|
40
|
+
"click:row"
|
|
41
|
+
],
|
|
42
|
+
setup(l, { emit: P }) {
|
|
43
|
+
let F = P, I = l, L = p(""), R = p(!1), z = p(I.page), B = [
|
|
44
|
+
5,
|
|
45
|
+
10,
|
|
46
|
+
25,
|
|
47
|
+
50,
|
|
48
|
+
100
|
|
49
|
+
], V = r(() => {
|
|
50
|
+
if (!L.value || !I.sortable) return I.items;
|
|
51
|
+
let e = [...I.items].sort((e, t) => {
|
|
52
|
+
let n = e[L.value], r = t[L.value];
|
|
53
|
+
return n === r ? 0 : n == null ? 1 : r == null ? -1 : typeof n == "number" && typeof r == "number" ? n - r : String(n).localeCompare(String(r));
|
|
54
|
+
});
|
|
55
|
+
return R.value ? e.reverse() : e;
|
|
56
|
+
}), H = r(() => I.serverItemsLength || V.value.length), U = r(() => Math.ceil(H.value / I.itemsPerPage)), W = r(() => {
|
|
57
|
+
let e = (z.value - 1) * I.itemsPerPage, t = e + I.itemsPerPage;
|
|
58
|
+
return V.value.slice(e, t);
|
|
59
|
+
}), G = r(() => `${(z.value - 1) * I.itemsPerPage + 1}-${Math.min(z.value * I.itemsPerPage, H.value)} of ${H.value}`), K = (e) => {
|
|
60
|
+
e.sortable === !1 || !I.sortable || (L.value === e.value ? R.value = !R.value : (L.value = e.value, R.value = !1));
|
|
61
|
+
}, q = (e, t) => {
|
|
62
|
+
F("click:row", e, t);
|
|
63
|
+
}, J = () => {
|
|
64
|
+
z.value > 1 && (z.value--, F("update:page", z.value));
|
|
65
|
+
}, Y = () => {
|
|
66
|
+
z.value < U.value && (z.value++, F("update:page", z.value));
|
|
67
|
+
}, X = (e) => {
|
|
68
|
+
let t = e.target;
|
|
69
|
+
F("update:itemsPerPage", Number(t.value)), z.value = 1, F("update:page", 1);
|
|
70
|
+
};
|
|
71
|
+
return _(() => I.page, (e) => {
|
|
72
|
+
z.value = e;
|
|
73
|
+
}), (r, p) => (f(), a("div", v, [
|
|
74
|
+
o("div", y, [o("table", b, [o("thead", x, [o("tr", null, [(f(!0), a(n, null, m(l.headers, (e) => (f(), a("th", {
|
|
75
|
+
key: e.value,
|
|
76
|
+
class: u([
|
|
77
|
+
"spicyDataTableCell",
|
|
78
|
+
"spicyDataTableHeaderCell",
|
|
79
|
+
e.align || "left",
|
|
80
|
+
{ sortable: e.sortable !== !1 && l.sortable }
|
|
81
|
+
]),
|
|
82
|
+
onClick: (t) => K(e)
|
|
83
|
+
}, [o("span", C, g(e.text), 1), e.sortable !== !1 && l.sortable && L.value === e.value ? (f(), a("span", w, g(R.value ? "▼" : "▲"), 1)) : i("", !0)], 10, S))), 128))])]), o("tbody", T, [(f(!0), a(n, null, m(W.value, (e, t) => (f(), a("tr", {
|
|
84
|
+
key: e[l.itemKey],
|
|
85
|
+
class: u(["spicyDataTableRow", { clickable: r.$attrs["onClick:row"] }]),
|
|
86
|
+
style: d({ height: l.fixedRowHeight }),
|
|
87
|
+
onClick: (t) => q(e, t)
|
|
88
|
+
}, [(f(!0), a(n, null, m(l.headers, (n) => (f(), a("td", {
|
|
89
|
+
key: n.value,
|
|
90
|
+
class: u(["spicyDataTableCell", n.align || "left"])
|
|
91
|
+
}, [h(r.$slots, `item.${n.value}`, {
|
|
92
|
+
item: e,
|
|
93
|
+
index: t
|
|
94
|
+
}, () => [s(g(e[n.value]), 1)])], 2))), 128))], 14, E))), 128))])])]),
|
|
95
|
+
l.loading ? (f(), a("div", D, [h(r.$slots, "loading", {}, () => [c(t, {
|
|
96
|
+
value: 0,
|
|
97
|
+
type: "circular",
|
|
98
|
+
size: 60
|
|
99
|
+
})])])) : i("", !0),
|
|
100
|
+
l.showPagination ? (f(), a("div", O, [
|
|
101
|
+
o("div", k, [o("span", null, g(G.value), 1)]),
|
|
102
|
+
o("div", A, [c(e, {
|
|
103
|
+
disabled: z.value === 1,
|
|
104
|
+
onClick: J,
|
|
105
|
+
text: "Previous",
|
|
106
|
+
size: "small"
|
|
107
|
+
}, null, 8, ["disabled"]), c(e, {
|
|
108
|
+
disabled: z.value === U.value,
|
|
109
|
+
onClick: Y,
|
|
110
|
+
text: "Next",
|
|
111
|
+
size: "small"
|
|
112
|
+
}, null, 8, ["disabled"])]),
|
|
113
|
+
o("div", j, [o("select", {
|
|
114
|
+
value: l.itemsPerPage,
|
|
115
|
+
onChange: X,
|
|
116
|
+
class: "itemsPerPageSelect"
|
|
117
|
+
}, [(f(), a(n, null, m(B, (e) => o("option", {
|
|
118
|
+
key: e,
|
|
119
|
+
value: e
|
|
120
|
+
}, g(e) + " / page ", 9, N)), 64))], 40, M)])
|
|
121
|
+
])) : i("", !0)
|
|
122
|
+
]));
|
|
123
|
+
}
|
|
124
|
+
});
|
|
125
|
+
//#endregion
|
|
126
|
+
export { P as t };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Teleport as e, Transition as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createVNode as o, defineComponent as s, normalizeStyle as c, openBlock as l, renderSlot as u, watch as d, withCtx as f, withModifiers as p } from "vue";
|
|
2
|
-
//#
|
|
3
|
-
|
|
2
|
+
//#endregion
|
|
3
|
+
//#region src/components/SpicyDialog/SpicyDialog.vue
|
|
4
|
+
var m = /* @__PURE__ */ s({
|
|
4
5
|
__name: "SpicyDialog",
|
|
5
6
|
props: {
|
|
6
7
|
modelValue: Boolean,
|
|
@@ -41,4 +42,4 @@ var m = ".spicyDialogOverlay{z-index:2000;justify-content:center;align-items:cen
|
|
|
41
42
|
}
|
|
42
43
|
});
|
|
43
44
|
//#endregion
|
|
44
|
-
export { m as
|
|
45
|
+
export { m as t };
|
|
File without changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Transition as e, computed as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createTextVNode as a, createVNode as o, defineComponent as s, normalizeClass as c, normalizeStyle as l, onMounted as u, onUnmounted as d, openBlock as f, ref as p, renderSlot as m, toDisplayString as h, withCtx as g, withModifiers as _ } from "vue";
|
|
2
|
-
//#region src/components/SpicyDropdown/SpicyDropdown.
|
|
3
|
-
var v =
|
|
2
|
+
//#region src/components/SpicyDropdown/SpicyDropdown.vue?vue&type=script&setup=true&lang.ts
|
|
3
|
+
var v = ["aria-expanded"], y = ["width", "height"], b = ["d"], x = ["width", "height"], S = /* @__PURE__ */ s({
|
|
4
4
|
__name: "SpicyDropdown",
|
|
5
5
|
props: {
|
|
6
6
|
label: {},
|
|
@@ -10,16 +10,16 @@ var v = ".spicyDropdown{display:inline-block;position:relative}.spicyDropdownBut
|
|
|
10
10
|
iconSize: { default: "24px" }
|
|
11
11
|
},
|
|
12
12
|
setup(s) {
|
|
13
|
-
let
|
|
13
|
+
let S = s, C = p(!1), w = p(null), T = () => {
|
|
14
14
|
C.value = !C.value;
|
|
15
15
|
}, E = (e) => {
|
|
16
16
|
w.value && !w.value.contains(e.target) && (C.value = !1);
|
|
17
17
|
};
|
|
18
18
|
u(() => document.addEventListener("click", E)), d(() => document.removeEventListener("click", E));
|
|
19
|
-
let D = t(() =>
|
|
20
|
-
width:
|
|
21
|
-
[
|
|
22
|
-
textAlign:
|
|
19
|
+
let D = t(() => S.icon || ""), O = t(() => ({
|
|
20
|
+
width: S.width,
|
|
21
|
+
[S.align === "right" ? "right" : "left"]: 0,
|
|
22
|
+
textAlign: S.align
|
|
23
23
|
}));
|
|
24
24
|
return (t, u) => (f(), r("div", {
|
|
25
25
|
ref_key: "dropdownRef",
|
|
@@ -38,7 +38,7 @@ var v = ".spicyDropdown{display:inline-block;position:relative}.spicyDropdownBut
|
|
|
38
38
|
height: s.iconSize,
|
|
39
39
|
viewBox: "0 0 24 24",
|
|
40
40
|
class: "dropdownIcon"
|
|
41
|
-
}, [i("path", { d: D.value }, null, 8,
|
|
41
|
+
}, [i("path", { d: D.value }, null, 8, b)], 8, y)) : n("", !0),
|
|
42
42
|
a(" " + h(s.label) + " ", 1),
|
|
43
43
|
D.value ? n("", !0) : (f(), r("svg", {
|
|
44
44
|
key: 1,
|
|
@@ -46,8 +46,8 @@ var v = ".spicyDropdown{display:inline-block;position:relative}.spicyDropdownBut
|
|
|
46
46
|
height: s.iconSize,
|
|
47
47
|
viewBox: "0 0 24 24",
|
|
48
48
|
class: c(["arrow", { open: C.value }])
|
|
49
|
-
}, [...u[1] ||= [i("path", { d: "M7 10l5 5 5-5H7z" }, null, -1)]], 10,
|
|
50
|
-
], 8,
|
|
49
|
+
}, [...u[1] ||= [i("path", { d: "M7 10l5 5 5-5H7z" }, null, -1)]], 10, x))
|
|
50
|
+
], 8, v), o(e, { name: "fade" }, {
|
|
51
51
|
default: g(() => [C.value ? (f(), r("div", {
|
|
52
52
|
key: 0,
|
|
53
53
|
class: "spicyDropdownMenu",
|
|
@@ -60,4 +60,4 @@ var v = ".spicyDropdown{display:inline-block;position:relative}.spicyDropdownBut
|
|
|
60
60
|
}
|
|
61
61
|
});
|
|
62
62
|
//#endregion
|
|
63
|
-
export {
|
|
63
|
+
export { S as t };
|