spicykatsu 0.0.40 → 0.0.41
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 +4 -6
- package/dist/spicykatsu.es.js +47 -41
- package/dist/spicykatsu.umd.js +1 -1
- package/dist/style.css +1 -1
- package/dist/types/components/SpicyAlert.vue.d.ts +69 -0
- package/dist/types/components/SpicyBtn.vue.d.ts +94 -0
- package/dist/types/components/SpicyCarousel.vue.d.ts +100 -0
- package/dist/types/components/SpicyDivider.vue.d.ts +62 -0
- package/dist/types/components/SpicyLabel.vue.d.ts +66 -0
- package/dist/types/components/SpicyModal.vue.d.ts +94 -0
- package/dist/types/components/SpicySheet.vue.d.ts +54 -0
- package/dist/types/components/SpicySlider.vue.d.ts +70 -0
- package/dist/types/components/SpicyToggle.vue.d.ts +52 -0
- package/dist/types/components/SpicyTooltip.vue.d.ts +64 -0
- package/dist/types/directives/ripple.d.ts +2 -0
- package/dist/types/index.d.ts +33 -0
- package/dist/types/scripts/dateUtils.d.ts +75 -0
- package/dist/types/scripts/objUtils.d.ts +8 -0
- package/dist/types/scripts/urlUtils.d.ts +7 -0
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
|
-
# SpicyKatsuLib
|
|
2
|
-
|
|
3
|
-
Fun, simple library for Vue3. Something for me to play around with in my projects.
|
|
4
|
-
|
|
5
|
-
Included will be componenets and utilites.
|
|
6
|
-
|
|
1
|
+
# SpicyKatsuLib
|
|
2
|
+
|
|
3
|
+
Fun, simple library for Vue3. Something for me to play around with in my projects.
|
|
4
|
+
|
|
7
5
|
Docs: [SpicyKatsu Docs](https://satoru8.gitlab.io/spicykatsuvlib/)
|
package/dist/spicykatsu.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as b, ref as
|
|
1
|
+
import { defineComponent as b, ref as S, 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 k, createElementVNode as h, onMounted as G, onUnmounted as J, createVNode as Q, Fragment as E, renderList as z, vModelText as x, createTextVNode as Z, mergeProps as ee, withModifiers as L, reactive as te, nextTick as oe } from "vue";
|
|
2
2
|
const le = ["aria-label"], ae = {
|
|
3
3
|
key: 0,
|
|
4
4
|
class: "spicyAlertIcon"
|
|
@@ -12,11 +12,11 @@ const le = ["aria-label"], ae = {
|
|
|
12
12
|
text: { default: "" },
|
|
13
13
|
icon: { default: "" },
|
|
14
14
|
iconOnly: { type: Boolean, default: !1 },
|
|
15
|
-
closable: { type: Boolean, default: !
|
|
15
|
+
closable: { type: Boolean, default: !1 },
|
|
16
16
|
autoClose: { default: 0 }
|
|
17
17
|
},
|
|
18
18
|
setup(e) {
|
|
19
|
-
const t = e, o =
|
|
19
|
+
const t = e, o = S(!0), a = () => {
|
|
20
20
|
o.value = !1;
|
|
21
21
|
};
|
|
22
22
|
return Y(
|
|
@@ -90,7 +90,7 @@ const le = ["aria-label"], ae = {
|
|
|
90
90
|
const i = q("spicyRipple");
|
|
91
91
|
return D((r(), c("button", {
|
|
92
92
|
class: C(["spicyBtn", { outlined: s.variant === "outlined", disabled: s.disabled, isRound: l.value }]),
|
|
93
|
-
style:
|
|
93
|
+
style: k({ ...a.value }),
|
|
94
94
|
disabled: s.disabled,
|
|
95
95
|
onClick: u[0] || (u[0] = (d) => s.$emit("click")),
|
|
96
96
|
role: "button",
|
|
@@ -118,9 +118,9 @@ const le = ["aria-label"], ae = {
|
|
|
118
118
|
class: "spicyCarouselNavControls"
|
|
119
119
|
}, ge = /* @__PURE__ */ h("span", { class: "spicyCarouselPrevBtnIcon" }, "<", -1), be = [
|
|
120
120
|
ge
|
|
121
|
-
], Ce = /* @__PURE__ */ h("span", { class: "spicyCarouselNextBtnIcon" }, ">", -1),
|
|
121
|
+
], Ce = /* @__PURE__ */ h("span", { class: "spicyCarouselNextBtnIcon" }, ">", -1), Se = [
|
|
122
122
|
Ce
|
|
123
|
-
],
|
|
123
|
+
], ke = {
|
|
124
124
|
key: 1,
|
|
125
125
|
class: "spicyCarouselPagination"
|
|
126
126
|
}, we = ["onClick"], $e = { class: "spicyCarouselPage" }, _e = /* @__PURE__ */ b({
|
|
@@ -148,7 +148,7 @@ const le = ["aria-label"], ae = {
|
|
|
148
148
|
})), u = g(() => {
|
|
149
149
|
var y;
|
|
150
150
|
return (y = l.slides[d.value]) == null ? void 0 : y.title;
|
|
151
|
-
}), i = g(() => n.value.fullScreen === !1 ? !1 : l.fullScreen), d =
|
|
151
|
+
}), i = g(() => n.value.fullScreen === !1 ? !1 : l.fullScreen), d = S(l.initialSlide), n = g(() => l.slides[d.value]);
|
|
152
152
|
let p;
|
|
153
153
|
const $ = () => {
|
|
154
154
|
d.value = (d.value - 1 + l.slides.length) % l.slides.length;
|
|
@@ -178,7 +178,7 @@ const le = ["aria-label"], ae = {
|
|
|
178
178
|
O();
|
|
179
179
|
}), (y, B) => (r(), c("div", {
|
|
180
180
|
class: "spicyCarouselWrapper",
|
|
181
|
-
style:
|
|
181
|
+
style: k({ ...s.value })
|
|
182
182
|
}, [
|
|
183
183
|
h("div", {
|
|
184
184
|
class: "spicyCarouselContainer",
|
|
@@ -195,7 +195,7 @@ const le = ["aria-label"], ae = {
|
|
|
195
195
|
(r(), c("div", {
|
|
196
196
|
class: C(["spicyCarouselSlide", { pointCursor: l.enableImageClick }]),
|
|
197
197
|
key: d.value,
|
|
198
|
-
style:
|
|
198
|
+
style: k({ backgroundImage: `url(${n.value.img})` }),
|
|
199
199
|
onClick: H
|
|
200
200
|
}, [
|
|
201
201
|
y.slides[d.value].text ? (r(), c("div", {
|
|
@@ -222,12 +222,12 @@ const le = ["aria-label"], ae = {
|
|
|
222
222
|
h("button", {
|
|
223
223
|
class: "spicyCarouselNextBtn",
|
|
224
224
|
onClick: _
|
|
225
|
-
},
|
|
225
|
+
}, Se)
|
|
226
226
|
])) : f("", !0),
|
|
227
|
-
y.showPagination ? (r(), c("div",
|
|
228
|
-
(r(!0), c(
|
|
227
|
+
y.showPagination ? (r(), c("div", ke, [
|
|
228
|
+
(r(!0), c(E, null, z(y.slides, (F, T) => (r(), c("button", {
|
|
229
229
|
key: T,
|
|
230
|
-
onClick: (
|
|
230
|
+
onClick: (yt) => U(T),
|
|
231
231
|
class: C(["spicyCarouselPageBtn", { active: T === d.value }])
|
|
232
232
|
}, [
|
|
233
233
|
h("span", $e, v(T + 1), 1)
|
|
@@ -250,7 +250,7 @@ const le = ["aria-label"], ae = {
|
|
|
250
250
|
}));
|
|
251
251
|
return (a, l) => (r(), c("div", {
|
|
252
252
|
class: "spicyDivider",
|
|
253
|
-
style:
|
|
253
|
+
style: k(o.value),
|
|
254
254
|
role: "separator",
|
|
255
255
|
"aria-orientation": "horizontal"
|
|
256
256
|
}, [
|
|
@@ -270,7 +270,7 @@ const le = ["aria-label"], ae = {
|
|
|
270
270
|
variant: { default: "filled" }
|
|
271
271
|
},
|
|
272
272
|
setup(e) {
|
|
273
|
-
const o =
|
|
273
|
+
const o = S(e.value), a = S(!1), l = (i) => {
|
|
274
274
|
const d = i.target;
|
|
275
275
|
o.value = d.value;
|
|
276
276
|
}, s = () => {
|
|
@@ -337,7 +337,7 @@ const le = ["aria-label"], ae = {
|
|
|
337
337
|
}, [
|
|
338
338
|
h("div", {
|
|
339
339
|
class: "spicyModal",
|
|
340
|
-
style:
|
|
340
|
+
style: k({ ...a.value })
|
|
341
341
|
}, [
|
|
342
342
|
h("header", Oe, [
|
|
343
343
|
m(i.$slots, "spicyModalHeader", {
|
|
@@ -355,7 +355,7 @@ const le = ["aria-label"], ae = {
|
|
|
355
355
|
class: "spicyModalCloseBtn spicyModalActionBtn",
|
|
356
356
|
onClick: s
|
|
357
357
|
}, " Close ")) : f("", !0),
|
|
358
|
-
(r(!0), c(
|
|
358
|
+
(r(!0), c(E, null, z(i.actions, (n) => (r(), c("button", {
|
|
359
359
|
class: "spicyModalExtraBtn spicyModalActionBtn",
|
|
360
360
|
key: n.label,
|
|
361
361
|
onClick: n.handler
|
|
@@ -376,12 +376,12 @@ const le = ["aria-label"], ae = {
|
|
|
376
376
|
}));
|
|
377
377
|
return (a, l) => (r(), c("div", {
|
|
378
378
|
class: C(["spicySheet", { isRound: a.isRounded }]),
|
|
379
|
-
style:
|
|
379
|
+
style: k({ ...o.value })
|
|
380
380
|
}, [
|
|
381
381
|
m(a.$slots, "default")
|
|
382
382
|
], 6));
|
|
383
383
|
}
|
|
384
|
-
}), Pe = { class: "spicySlider" }, Ae = ["aria-label"],
|
|
384
|
+
}), Pe = { class: "spicySlider" }, Ae = ["aria-label"], Ee = ["min", "max", "step"], ze = /* @__PURE__ */ b({
|
|
385
385
|
__name: "SpicySlider",
|
|
386
386
|
props: {
|
|
387
387
|
min: { default: 0 },
|
|
@@ -392,10 +392,13 @@ const le = ["aria-label"], ae = {
|
|
|
392
392
|
},
|
|
393
393
|
emits: ["update:modelValue"],
|
|
394
394
|
setup(e, { emit: t }) {
|
|
395
|
-
const o = e, a = t, l =
|
|
396
|
-
Y(
|
|
397
|
-
|
|
398
|
-
|
|
395
|
+
const o = e, a = t, l = S(o.modelValue);
|
|
396
|
+
Y(
|
|
397
|
+
() => o.modelValue,
|
|
398
|
+
(u) => {
|
|
399
|
+
l.value = u;
|
|
400
|
+
}
|
|
401
|
+
);
|
|
399
402
|
const s = (u) => {
|
|
400
403
|
const i = u.target;
|
|
401
404
|
a("update:modelValue", Number(i.value));
|
|
@@ -415,7 +418,7 @@ const le = ["aria-label"], ae = {
|
|
|
415
418
|
step: u.step,
|
|
416
419
|
"onUpdate:modelValue": i[0] || (i[0] = (d) => l.value = d),
|
|
417
420
|
onInput: s
|
|
418
|
-
}, null, 40,
|
|
421
|
+
}, null, 40, Ee), [
|
|
419
422
|
[x, l.value]
|
|
420
423
|
]),
|
|
421
424
|
m(u.$slots, "default")
|
|
@@ -470,7 +473,7 @@ const le = ["aria-label"], ae = {
|
|
|
470
473
|
position: { default: "top" }
|
|
471
474
|
},
|
|
472
475
|
setup(e) {
|
|
473
|
-
const t = e, o =
|
|
476
|
+
const t = e, o = S(!1), a = S(null), l = te({
|
|
474
477
|
position: "absolute",
|
|
475
478
|
top: "0px",
|
|
476
479
|
left: "0px",
|
|
@@ -514,7 +517,7 @@ const le = ["aria-label"], ae = {
|
|
|
514
517
|
o.value ? (r(), c("div", {
|
|
515
518
|
key: 0,
|
|
516
519
|
class: "spicyTooltip",
|
|
517
|
-
style:
|
|
520
|
+
style: k(l),
|
|
518
521
|
role: "tooltip",
|
|
519
522
|
"aria-hidden": !o.value
|
|
520
523
|
}, [
|
|
@@ -573,7 +576,7 @@ function ot(e = "YYYY-MM-DD", t = { show: !0, separator: "-" }) {
|
|
|
573
576
|
let a = R(/* @__PURE__ */ new Date(), e);
|
|
574
577
|
return t.separator && t.separator !== "-" && (a = a.replace(/-/g, t.separator)), t.show ? { value: a, isVisible: !0 } : { value: a, isVisible: !1 };
|
|
575
578
|
}
|
|
576
|
-
const
|
|
579
|
+
const vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
577
580
|
__proto__: null,
|
|
578
581
|
currentDate: ot,
|
|
579
582
|
dateAdd: Je,
|
|
@@ -627,7 +630,7 @@ function it(e) {
|
|
|
627
630
|
function w(e) {
|
|
628
631
|
return e === null || typeof e != "object" ? !1 : Array.isArray(e) ? e.length === 0 : Object.keys(e).length === 0;
|
|
629
632
|
}
|
|
630
|
-
const
|
|
633
|
+
const mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
631
634
|
__proto__: null,
|
|
632
635
|
deepClone: lt,
|
|
633
636
|
deepMerge: N,
|
|
@@ -659,13 +662,13 @@ function ut(e, t, o = "https") {
|
|
|
659
662
|
throw new Error("Invalid hostname: " + e);
|
|
660
663
|
return t.startsWith("/") || (t = "/" + t), t.endsWith("/") && t.length > 1 && (t = t.slice(0, -1)), t === "/" && (t = ""), `${o.toLowerCase()}://${e}${t}`;
|
|
661
664
|
}
|
|
662
|
-
const
|
|
665
|
+
const gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
663
666
|
__proto__: null,
|
|
664
667
|
appendParamsToUrl: ct,
|
|
665
668
|
generateUrl: ut,
|
|
666
669
|
getHostname: rt,
|
|
667
670
|
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}}
|
|
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 = {
|
|
669
672
|
beforeMount(e) {
|
|
670
673
|
e.style.position = "relative", e.style.overflow = "hidden", e.addEventListener("click", (t) => {
|
|
671
674
|
const o = document.createElement("span"), a = Math.max(e.clientWidth, e.clientHeight), l = a / 2;
|
|
@@ -676,14 +679,18 @@ const mt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
676
679
|
});
|
|
677
680
|
});
|
|
678
681
|
}
|
|
679
|
-
},
|
|
682
|
+
}, bt = {
|
|
680
683
|
install(e, t = {}) {
|
|
681
684
|
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",
|
|
685
|
+
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", ze), e.component("SpicyToggle", Ue), e.component("SpicyTooltip", Xe)), a) {
|
|
686
|
+
const s = document.createElement("style");
|
|
687
|
+
s.id = "SpicyStyles", s.textContent = dt, document.head.appendChild(s);
|
|
688
|
+
}
|
|
689
|
+
if (l) {
|
|
690
|
+
e.directive("spicyRipple", ft);
|
|
683
691
|
const s = document.createElement("style");
|
|
684
|
-
s.textContent =
|
|
692
|
+
s.id = "SpicyRippleStyles", s.textContent = pt, document.head.appendChild(s);
|
|
685
693
|
}
|
|
686
|
-
l && e.directive("spicyRipple", pt);
|
|
687
694
|
}
|
|
688
695
|
};
|
|
689
696
|
export {
|
|
@@ -691,11 +698,11 @@ export {
|
|
|
691
698
|
pe as SpicyBtn,
|
|
692
699
|
_e as SpicyCarousel,
|
|
693
700
|
Be as SpicyDivider,
|
|
694
|
-
|
|
701
|
+
bt as SpicyKatsu,
|
|
695
702
|
Ie as SpicyLabel,
|
|
696
703
|
Le as SpicyModal,
|
|
697
704
|
Ye as SpicySheet,
|
|
698
|
-
|
|
705
|
+
ze as SpicySlider,
|
|
699
706
|
Ue as SpicyToggle,
|
|
700
707
|
Xe as SpicyTooltip,
|
|
701
708
|
ct as appendParamsToUrl,
|
|
@@ -706,7 +713,7 @@ export {
|
|
|
706
713
|
tt as dateIsTomorrow,
|
|
707
714
|
et as dateIsYesterday,
|
|
708
715
|
Qe as dateSubtract,
|
|
709
|
-
|
|
716
|
+
vt as dateUtils,
|
|
710
717
|
lt as deepClone,
|
|
711
718
|
N as deepMerge,
|
|
712
719
|
R as formatDate,
|
|
@@ -718,9 +725,8 @@ export {
|
|
|
718
725
|
w as isObjectEmpty,
|
|
719
726
|
I as isUrlValid,
|
|
720
727
|
at as mergeObjects,
|
|
721
|
-
|
|
728
|
+
mt as objUtils,
|
|
722
729
|
qe as parseDate,
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
mt as urlUtils
|
|
730
|
+
ft as ripple,
|
|
731
|
+
gt as urlUtils
|
|
726
732
|
};
|
package/dist/spicykatsu.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(i,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(i=typeof globalThis<"u"?globalThis:i||self,e(i.SpicyKatsu={},i.Vue))})(this,function(i,e){"use strict";const x=["aria-label"],ee={key:0,class:"spicyAlertIcon"},te={key:1,class:"spicyAlertText"},B=e.defineComponent({__name:"SpicyAlert",props:{variant:{default:"info"},text:{default:""},icon:{default:""},iconOnly:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},autoClose:{default:0}},setup(t){const o=t,l=e.ref(!0),a=()=>{l.value=!1};return e.watch(()=>o.autoClose,n=>{n&&n>0&&setTimeout(()=>{a()},n)}),(n,s)=>(e.openBlock(),e.createBlock(e.Transition,{name:"fade"},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["spicyAlert",n.variant]),"aria-atomic":"true","aria-label":n.text,role:"alert",onKeydown:e.withKeys(a,["enter"])},[n.iconOnly||n.text?(e.openBlock(),e.createElementBlock("span",ee,e.toDisplayString(n.icon),1)):e.createCommentVNode("",!0),!n.iconOnly&&n.text?(e.openBlock(),e.createElementBlock("span",te,e.toDisplayString(n.text),1)):e.createCommentVNode("",!0),n.closable?(e.openBlock(),e.createElementBlock("button",{key:2,class:"spicyAlertCloseBtn",onClick:a,"aria-label":"Close alert"}," X ")):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default")],42,x)):e.createCommentVNode("",!0)]),_:3}))}}),oe=["disabled","aria-label","aria-disabled","tabindex"],le={key:0,class:"spicyBtnIcon spicyMDI",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},ne=["d"],ae={key:1,class:"spicyBtnIcon"},ie={key:2,class:"spicyBtnText"},w=e.defineComponent({__name:"SpicyBtn",props:{variant:{default:"filled"},disabled:{type:Boolean,default:!1},text:{default:""},icon:{default:""},mdi:{default:""},bgColor:{default:""},textColor:{default:"#ddd"},hoverColor:{default:""},borderColor:{default:""},fontSize:{default:16},fontWeight:{default:500}},emits:["click"],setup(t,{emit:o}){const l=t,a=e.computed(()=>({"--skFontSize":typeof l.fontSize=="number"?`${l.fontSize}px`:l.fontSize,"--skFontWeight":l.fontWeight,"--skBgColor":l.bgColor,"--skTextColor":l.textColor,"--skBorderColor":l.borderColor,"--hoverColor":l.hoverColor})),n=e.computed(()=>!l.text&&(l.icon||l.mdi));return(s,d)=>{const c=e.resolveDirective("spicyRipple");return e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["spicyBtn",{outlined:s.variant==="outlined",disabled:s.disabled,isRound:n.value}]),style:e.normalizeStyle({...a.value}),disabled:s.disabled,onClick:d[0]||(d[0]=p=>s.$emit("click")),role:"button","aria-label":s.text,"aria-disabled":s.disabled,tabindex:s.disabled?-1:0},[s.mdi?(e.openBlock(),e.createElementBlock("svg",le,[e.createElementVNode("path",{fill:"currentColor",class:"mdi-icon",d:s.mdi},null,8,ne)])):e.createCommentVNode("",!0),s.icon&&!s.mdi?(e.openBlock(),e.createElementBlock("span",ae,e.toDisplayString(s.icon),1)):e.createCommentVNode("",!0),s.text?(e.openBlock(),e.createElementBlock("span",ie,e.toDisplayString(s.text),1)):e.createCommentVNode("",!0),e.renderSlot(s.$slots,"default")],14,oe)),[[c]])}}}),se=["aria-label"],re={class:"spicyCarouselInfoText"},ce={class:"spicyCarouselTitle"},de={key:0},pe={key:0,class:"spicyCarouselNavControls"},fe=[e.createElementVNode("span",{class:"spicyCarouselPrevBtnIcon"},"<",-1)],me=[e.createElementVNode("span",{class:"spicyCarouselNextBtnIcon"},">",-1)],ye={key:1,class:"spicyCarouselPagination"},ue=["onClick"],he={class:"spicyCarouselPage"},_=e.defineComponent({__name:"SpicyCarousel",props:{autoplay:{type:Boolean,default:!1},autoplaySpeed:{default:5e3},showNavigation:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},activeColor:{default:"var(--skPrimaryColor)"},loop:{type:Boolean,default:!0},initialSlide:{default:0},slides:{default:()=>[]},width:{default:"580px"},height:{default:"360px"},fullScreen:{type:Boolean,default:!1},enableImageClick:{type:Boolean,default:!1}},setup(t){let o,l,a=!1;const n=t,s=e.computed(()=>({"--width":n.width,"--height":n.height,"--activeColor":n.activeColor})),d=e.computed(()=>{var m;return(m=n.slides[p.value])==null?void 0:m.title}),c=e.computed(()=>r.value.fullScreen===!1?!1:n.fullScreen),p=e.ref(n.initialSlide),r=e.computed(()=>n.slides[p.value]);let f;const u=()=>{p.value=(p.value-1+n.slides.length)%n.slides.length},h=()=>{p.value=(p.value+1)%n.slides.length},Le=m=>{p.value=m},Q=()=>{f&&clearInterval(f)},Z=()=>{n.autoplay&&(f=window.setInterval(h,n.autoplaySpeed))},Pe=()=>{window.open(r.value.img)},Ye=()=>{n.enableImageClick&&Pe()},Ae=m=>{o=m.touches[0].clientX,l=m.touches[0].clientY,a=!1},Ue=m=>{if(!a){const k=m.touches[0].clientX-o,v=m.touches[0].clientY-l;Math.abs(k)>Math.abs(v)&&(k>40?(u(),a=!0):k<-40&&(h(),a=!0))}};return e.onMounted(()=>{Z()}),e.onUnmounted(()=>{Q()}),(m,k)=>(e.openBlock(),e.createElementBlock("div",{class:"spicyCarouselWrapper",style:e.normalizeStyle({...s.value})},[e.createElementVNode("div",{class:"spicyCarouselContainer",onMouseenter:Q,onMouseleave:Z,onTouchstart:Ae,onTouchmove:Ue},[e.createVNode(e.Transition,{name:"slide",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["spicyCarouselSlide",{pointCursor:n.enableImageClick}]),key:p.value,style:e.normalizeStyle({backgroundImage:`url(${r.value.img})`}),onClick:Ye},[m.slides[p.value].text?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["spicyCarouselTextOverlay",{fullScreen:c.value}]),"aria-label":m.slides[p.value].text},[e.createElementVNode("span",re,e.toDisplayString(m.slides[p.value].text),1)],10,se)):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"default")],6))]),_:3})],32),e.createElementVNode("div",ce,[d.value?(e.openBlock(),e.createElementBlock("h2",de,e.toDisplayString(r.value.title),1)):e.createCommentVNode("",!0)]),m.showNavigation?(e.openBlock(),e.createElementBlock("div",pe,[e.createElementVNode("button",{class:"spicyCarouselPrevBtn",onClick:u},fe),e.createElementVNode("button",{class:"spicyCarouselNextBtn",onClick:h},me)])):e.createCommentVNode("",!0),m.showPagination?(e.openBlock(),e.createElementBlock("div",ye,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.slides,(v,C)=>(e.openBlock(),e.createElementBlock("button",{key:C,onClick:Ke=>Le(C),class:e.normalizeClass(["spicyCarouselPageBtn",{active:C===p.value}])},[e.createElementVNode("span",he,e.toDisplayString(C+1),1)],10,ue))),128))])):e.createCommentVNode("",!0)],4))}}),$=e.defineComponent({__name:"SpicyDivider",props:{variant:{default:"solid"},width:{default:"100%"},height:{default:"1px"},bgColor:{default:"#5f5f5f"}},setup(t){const o=t,l=e.computed(()=>({width:o.width,borderBottom:`${o.height} ${o.variant} ${o.bgColor}`}));return(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"spicyDivider",style:e.normalizeStyle(l.value),role:"separator","aria-orientation":"horizontal"},[e.renderSlot(a.$slots,"default")],4))}}),ge=["aria-label"],ke=["placeholder","aria-label"],Ce={key:0,class:"spicyInputError"},E=e.defineComponent({__name:"SpicyLabel",props:{value:{default:""},placeholder:{default:""},label:{default:""},error:{default:""},variant:{default:"filled"}},setup(t){const o=t,l=e.ref(o.value),a=e.ref(!1),n=c=>{const p=c.target;l.value=p.value},s=()=>{a.value=!1},d=()=>{a.value=!0};return(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["spicyInputWrapper",[c.variant,{hasValue:l.value||c.value,hasFocus:a.value,hasError:c.error}]])},[e.createElementVNode("label",{class:"spicyInputLabel","aria-label":c.label},e.toDisplayString(c.label),9,ge),e.withDirectives(e.createElementVNode("input",{type:"text",name:"spicyInput",class:e.normalizeClass(["spicyInput",c.variant]),"onUpdate:modelValue":p[0]||(p[0]=r=>l.value=r),placeholder:c.placeholder,onInput:n,onBlur:s,onFocus:d,"aria-label":c.label},null,42,ke),[[e.vModelText,l.value]]),e.renderSlot(c.$slots,"default"),c.error?(e.openBlock(),e.createElementBlock("span",Ce,e.toDisplayString(c.error),1)):e.createCommentVNode("",!0)],2))}}),be={class:"spicyModalHeader"},Se={class:"spicyModalActions"},Be=["onClick"],D=e.defineComponent({__name:"SpicyModal",props:{width:{default:"400px"},height:{default:"auto"},borderRadius:{default:"6px"},bgColor:{default:""},visible:{type:Boolean,default:!1},closeBtn:{type:Boolean,default:!0},actions:{default:()=>[]},closeOnClick:{type:Boolean,default:!0},modalTitle:{default:""},textColor:{default:""}},emits:["update:visible"],setup(t,{emit:o}){const l=t,a=e.computed(()=>({"--width":l.width,"--height":l.height,"--skBorderRadius":l.borderRadius,"--skBgColor":l.bgColor,"--skTextColor":l.textColor})),n=o,s=()=>{n("update:visible",!1)},d=c=>{const p=c.target;l.closeOnClick&&p.classList.contains("spicyModalOverlay")&&s()};return(c,p)=>c.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"spicyModalOverlay",onClick:d},[e.createElementVNode("div",{class:"spicyModal",style:e.normalizeStyle({...a.value})},[e.createElementVNode("header",be,[e.renderSlot(c.$slots,"spicyModalHeader",{title:c.modalTitle,ariaLabel:c.modalTitle},()=>[e.createTextVNode(e.toDisplayString(c.modalTitle),1)])]),e.renderSlot(c.$slots,"default"),e.createElementVNode("div",Se,[e.renderSlot(c.$slots,"spicyModalActions"),c.actions.length===0&&c.closeBtn?(e.openBlock(),e.createElementBlock("button",{key:0,class:"spicyModalCloseBtn spicyModalActionBtn",onClick:s}," Close ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.actions,r=>(e.openBlock(),e.createElementBlock("button",{class:"spicyModalExtraBtn spicyModalActionBtn",key:r.label,onClick:r.handler},e.toDisplayString(r.label),9,Be))),128))])],4)])):e.createCommentVNode("",!0)}}),V=e.defineComponent({__name:"SpicySheet",props:{isRounded:{type:Boolean,default:!1},color:{default:""}},setup(t){const o=t,l=e.computed(()=>({"--color":o.color||"transparent"}));return(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["spicySheet",{isRound:a.isRounded}]),style:e.normalizeStyle({...l.value})},[e.renderSlot(a.$slots,"default")],6))}}),we={class:"spicySlider"},_e=["aria-label"],$e=["min","max","step"],T=e.defineComponent({__name:"SpicySlider",props:{min:{default:0},max:{default:100},step:{default:1},label:{default:""},modelValue:{default:0}},emits:["update:modelValue"],setup(t,{emit:o}){const l=t,a=o,n=e.ref(l.modelValue);e.watch(()=>l.modelValue,d=>{n.value=d});const s=d=>{const c=d.target;a("update:modelValue",Number(c.value))};return(d,c)=>(e.openBlock(),e.createElementBlock("div",we,[d.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:"spicySliderLabel","aria-label":d.label},e.toDisplayString(d.label),9,_e)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{name:"spicySliderInput",class:"spicySliderInput",type:"range",min:d.min,max:d.max,step:d.step,"onUpdate:modelValue":c[0]||(c[0]=p=>n.value=p),onInput:s},null,40,$e),[[e.vModelText,n.value]]),e.renderSlot(d.$slots,"default")]))}}),Ee=["tabindex","aria-label","aria-checked","onKeydown"],De=[e.createElementVNode("div",{class:"spicyToggleKnob"},null,-1)],M=e.defineComponent({__name:"SpicyToggle",props:{modelValue:{type:Boolean,default:!1},label:{default:""},variant:{default:"outlined"},borderColor:{default:""},activeColor:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:o}){const l=t,a=e.computed(()=>({"--skBorderColor":l.borderColor,"--activeColor":l.activeColor})),n=o,s=()=>{n("update:modelValue",!l.modelValue)};return(d,c)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:["spicyToggle",{outlined:d.variant==="outlined","is-active":d.modelValue}],tabindex:d.disabled?-1:0,role:"switch",style:{...a.value},"aria-label":d.label,"aria-checked":d.modelValue,onClick:s,onKeydown:[e.withKeys(e.withModifiers(s,["prevent"]),["space"]),e.withKeys(e.withModifiers(s,["prevent"]),["enter"])]},d.$attrs),De,16,Ee))}}),Ve=["aria-hidden"],Te={key:0,class:"spicyTooltipIcon"},Me=["aria-label"],Ne={key:2,class:"spicyTooltipIcon"},N=e.defineComponent({__name:"SpicyTooltip",props:{text:{default:""},prependIcon:{default:""},appendIcon:{default:""},position:{default:"top"}},setup(t){const o=t,l=e.ref(!1),a=e.ref(null),n=e.reactive({position:"absolute",top:"0px",left:"0px",maxWidth:"175px"}),s=r=>{const f=r.right-window.innerWidth;f>0&&(n.left=`${parseInt(n.left)-f-5}px`),r.left<0&&(n.left="5px")},d={top:(r,f)=>{n.left=`${r.left+(r.width-f.width)/2}px`,n.top=`${r.top-f.height-5}px`},bottom:(r,f)=>{n.left=`${r.left+(r.width-f.width)/2}px`,n.top=`${r.bottom+5}px`},left:(r,f)=>{n.left=`${r.left-f.width-5}px`,n.top=`${r.top+(r.height-f.height)/2}px`},right:(r,f)=>{n.left=`${r.right+5}px`,n.top=`${r.top+(r.height-f.height)/2}px`}},c=()=>{l.value=!0,e.nextTick(()=>{if(a.value&&l.value){const r=a.value.getBoundingClientRect(),f=a.value.querySelector(".spicyTooltip");if(f){const u=f.getBoundingClientRect(),h=d[o.position];h(r,u),s(u)}}})},p=()=>{l.value=!1};return(r,f)=>(e.openBlock(),e.createElementBlock("div",{onMouseover:c,onMouseleave:p,ref_key:"host",ref:a},[e.renderSlot(r.$slots,"default"),l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"spicyTooltip",style:e.normalizeStyle(n),role:"tooltip","aria-hidden":!l.value},[r.prependIcon?(e.openBlock(),e.createElementBlock("span",Te,e.toDisplayString(r.prependIcon),1)):e.createCommentVNode("",!0),r.text?(e.openBlock(),e.createElementBlock("span",{key:1,class:"spicyTooltipText","aria-label":r.text},e.toDisplayString(r.text),9,Me)):e.createCommentVNode("",!0),r.appendIcon?(e.openBlock(),e.createElementBlock("span",Ne,e.toDisplayString(r.appendIcon),1)):e.createCommentVNode("",!0)],12,Ve)):e.createCommentVNode("",!0)],544))}});function b(t,o){const l={YYYY:()=>t.getFullYear().toString(),MM:()=>(t.getMonth()+1).toString().padStart(2,"0"),DD:()=>t.getDate().toString().padStart(2,"0")};return o.replace(/YYYY|MM|DD/g,a=>l[a]())}function I(t){const[o,l,a]=t.split("-");return new Date(Number(o),Number(l)-1,Number(a))}function O(t,o){const l=Math.abs(o.getTime()-t.getTime());return Math.ceil(l/(1e3*60*60*24))}function z(t,o){const l=new Date(t);return l.setDate(t.getDate()+o),l}function F(t,o){const l=new Date(t);return l.setDate(t.getDate()-o),l}function L(t){const o=new Date;return t.getDate()===o.getDate()&&t.getMonth()===o.getMonth()&&t.getFullYear()===o.getFullYear()}function P(t){const o=new Date;return o.setDate(o.getDate()-1),t.getDate()===o.getDate()&&t.getMonth()===o.getMonth()&&t.getFullYear()===o.getFullYear()}function Y(t){const o=new Date;return o.setDate(o.getDate()+1),t.getDate()===o.getDate()&&t.getMonth()===o.getMonth()&&t.getFullYear()===o.getFullYear()}function A(t="YYYY-MM-DD",o={show:!0,separator:"-"}){if(typeof t!="string"||typeof o!="object"||!o.hasOwnProperty("show")||typeof o.show!="boolean")throw new Error('Invalid parameters: Please provide a valid format string and options object with a boolean "show" property.');let a=b(new Date,t);return o.separator&&o.separator!=="-"&&(a=a.replace(/-/g,o.separator)),o.show?{value:a,isVisible:!0}:{value:a,isVisible:!1}}const Ie=Object.freeze(Object.defineProperty({__proto__:null,currentDate:A,dateAdd:z,dateDiff:O,dateIsToday:L,dateIsTomorrow:Y,dateIsYesterday:P,dateSubtract:F,formatDate:b,parseDate:I},Symbol.toStringTag,{value:"Module"}));function U(t){const o=new WeakMap;function l(a){if(y(a)||typeof a!="object")return a;if(o.has(a))return o.get(a);const n=Array.isArray(a)?[]:{};o.set(a,n);for(const s in a)Object.prototype.hasOwnProperty.call(a,s)&&(n[s]=l(a[s]));return n}return l(t)}function S(...t){const o={};return t.forEach(l=>{if(!y(l)){for(const a in l)if(Object.prototype.hasOwnProperty.call(l,a)){const n=l[a];n!==void 0&&(typeof n=="object"&&n!==null&&!Array.isArray(n)?o[a]=S(o[a]||{},n):o[a]=n)}}}),o}function R(...t){return y(t[0])?t[0]:Object.assign({},...t)}function j(t){return y(t)?[]:Object.keys(t)}function W(t){return y(t)?[]:Object.values(t)}function K(t){return y(t)?[]:Object.entries(t)}function y(t){return t===null||typeof t!="object"?!1:Array.isArray(t)?t.length===0:Object.keys(t).length===0}const Oe=Object.freeze(Object.defineProperty({__proto__:null,deepClone:U,deepMerge:S,getObjectEntries:K,getObjectKeys:j,getObjectValues:W,isObjectEmpty:y,mergeObjects:R},Symbol.toStringTag,{value:"Module"}));function g(t){try{return new URL(t),!0}catch(o){return console.error("Invalid URL:",o),!1}}function H(t){return g(t)?new URL(t).hostname:null}function X(t,o){if(!g(t))return t;const l=new URL(t);return Object.keys(o).forEach(a=>l.searchParams.append(a,o[a])),l.toString()}function q(t,o,l="https"){if(!["http","https","ftp","sftp","ftps","ssh"].includes(l.toLowerCase()))throw new Error("Invalid protocol: "+l);if(!/^(?!:\/\/)([a-z0-9-]+\.)*[a-z0-9-]+$/i.test(t))throw new Error("Invalid hostname: "+t);return o.startsWith("/")||(o="/"+o),o.endsWith("/")&&o.length>1&&(o=o.slice(0,-1)),o==="/"&&(o=""),`${l.toLowerCase()}://${t}${o}`}const ze=Object.freeze(Object.defineProperty({__proto__:null,appendParamsToUrl:X,generateUrl:q,getHostname:H,isUrlValid:g},Symbol.toStringTag,{value:"Module"})),G=':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}}',J={beforeMount(t){t.style.position="relative",t.style.overflow="hidden",t.addEventListener("click",o=>{const l=document.createElement("span"),a=Math.max(t.clientWidth,t.clientHeight),n=a/2;l.style.width=l.style.height=`${a}px`,l.style.left=`${o.clientX-t.getBoundingClientRect().left-n}px`,l.style.top=`${o.clientY-t.getBoundingClientRect().top-n}px`,l.classList.add("spicyRipple");const s=t.querySelector(".spicyRipple");s&&s.remove(),t.appendChild(l),l.addEventListener("animationend",()=>{l.remove()})})}},Fe={install(t,o={}){const{useComponents:l=!0,useStyles:a=!0,useDirectives:n=!0}=o;if(l&&(t.component("SpicyAlert",B),t.component("SpicyBtn",w),t.component("SpicyCarousel",_),t.component("SpicyDivider",$),t.component("SpicyLabel",E),t.component("SpicyModal",D),t.component("SpicySheet",V),t.component("SpicySlider",T),t.component("SpicyToggle",M),t.component("SpicyTooltip",N)),a){const s=document.createElement("style");s.textContent=G,document.head.appendChild(s)}n&&t.directive("spicyRipple",J)}};i.SpicyAlert=B,i.SpicyBtn=w,i.SpicyCarousel=_,i.SpicyDivider=$,i.SpicyKatsu=Fe,i.SpicyLabel=E,i.SpicyModal=D,i.SpicySheet=V,i.SpicySlider=T,i.SpicyToggle=M,i.SpicyTooltip=N,i.appendParamsToUrl=X,i.currentDate=A,i.dateAdd=z,i.dateDiff=O,i.dateIsToday=L,i.dateIsTomorrow=Y,i.dateIsYesterday=P,i.dateSubtract=F,i.dateUtils=Ie,i.deepClone=U,i.deepMerge=S,i.formatDate=b,i.generateUrl=q,i.getHostname=H,i.getObjectEntries=K,i.getObjectKeys=j,i.getObjectValues=W,i.isObjectEmpty=y,i.isUrlValid=g,i.mergeObjects=R,i.objUtils=Oe,i.parseDate=I,i.ripple=J,i.spicyStyles=G,i.urlUtils=ze,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(s,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(s=typeof globalThis<"u"?globalThis:s||self,e(s.SpicyKatsu={},s.Vue))})(this,function(s,e){"use strict";const x=["aria-label"],v={key:0,class:"spicyAlertIcon"},ee={key:1,class:"spicyAlertText"},B=e.defineComponent({__name:"SpicyAlert",props:{variant:{default:"info"},text:{default:""},icon:{default:""},iconOnly:{type:Boolean,default:!1},closable:{type:Boolean,default:!1},autoClose:{default:0}},setup(t){const o=t,l=e.ref(!0),a=()=>{l.value=!1};return e.watch(()=>o.autoClose,n=>{n&&n>0&&setTimeout(()=>{a()},n)}),(n,i)=>(e.openBlock(),e.createBlock(e.Transition,{name:"fade"},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["spicyAlert",n.variant]),"aria-atomic":"true","aria-label":n.text,role:"alert",onKeydown:e.withKeys(a,["enter"])},[n.iconOnly||n.text?(e.openBlock(),e.createElementBlock("span",v,e.toDisplayString(n.icon),1)):e.createCommentVNode("",!0),!n.iconOnly&&n.text?(e.openBlock(),e.createElementBlock("span",ee,e.toDisplayString(n.text),1)):e.createCommentVNode("",!0),n.closable?(e.openBlock(),e.createElementBlock("button",{key:2,class:"spicyAlertCloseBtn",onClick:a,"aria-label":"Close alert"}," X ")):e.createCommentVNode("",!0),e.renderSlot(n.$slots,"default")],42,x)):e.createCommentVNode("",!0)]),_:3}))}}),te=["disabled","aria-label","aria-disabled","tabindex"],oe={key:0,class:"spicyBtnIcon spicyMDI",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},le=["d"],ne={key:1,class:"spicyBtnIcon"},ae={key:2,class:"spicyBtnText"},w=e.defineComponent({__name:"SpicyBtn",props:{variant:{default:"filled"},disabled:{type:Boolean,default:!1},text:{default:""},icon:{default:""},mdi:{default:""},bgColor:{default:""},textColor:{default:"#ddd"},hoverColor:{default:""},borderColor:{default:""},fontSize:{default:16},fontWeight:{default:500}},emits:["click"],setup(t,{emit:o}){const l=t,a=e.computed(()=>({"--skFontSize":typeof l.fontSize=="number"?`${l.fontSize}px`:l.fontSize,"--skFontWeight":l.fontWeight,"--skBgColor":l.bgColor,"--skTextColor":l.textColor,"--skBorderColor":l.borderColor,"--hoverColor":l.hoverColor})),n=e.computed(()=>!l.text&&(l.icon||l.mdi));return(i,d)=>{const c=e.resolveDirective("spicyRipple");return e.withDirectives((e.openBlock(),e.createElementBlock("button",{class:e.normalizeClass(["spicyBtn",{outlined:i.variant==="outlined",disabled:i.disabled,isRound:n.value}]),style:e.normalizeStyle({...a.value}),disabled:i.disabled,onClick:d[0]||(d[0]=p=>i.$emit("click")),role:"button","aria-label":i.text,"aria-disabled":i.disabled,tabindex:i.disabled?-1:0},[i.mdi?(e.openBlock(),e.createElementBlock("svg",oe,[e.createElementVNode("path",{fill:"currentColor",class:"mdi-icon",d:i.mdi},null,8,le)])):e.createCommentVNode("",!0),i.icon&&!i.mdi?(e.openBlock(),e.createElementBlock("span",ne,e.toDisplayString(i.icon),1)):e.createCommentVNode("",!0),i.text?(e.openBlock(),e.createElementBlock("span",ae,e.toDisplayString(i.text),1)):e.createCommentVNode("",!0),e.renderSlot(i.$slots,"default")],14,te)),[[c]])}}}),ie=["aria-label"],se={class:"spicyCarouselInfoText"},re={class:"spicyCarouselTitle"},ce={key:0},de={key:0,class:"spicyCarouselNavControls"},pe=[e.createElementVNode("span",{class:"spicyCarouselPrevBtnIcon"},"<",-1)],fe=[e.createElementVNode("span",{class:"spicyCarouselNextBtnIcon"},">",-1)],me={key:1,class:"spicyCarouselPagination"},ye=["onClick"],ue={class:"spicyCarouselPage"},_=e.defineComponent({__name:"SpicyCarousel",props:{autoplay:{type:Boolean,default:!1},autoplaySpeed:{default:5e3},showNavigation:{type:Boolean,default:!0},showPagination:{type:Boolean,default:!0},activeColor:{default:"var(--skPrimaryColor)"},loop:{type:Boolean,default:!0},initialSlide:{default:0},slides:{default:()=>[]},width:{default:"580px"},height:{default:"360px"},fullScreen:{type:Boolean,default:!1},enableImageClick:{type:Boolean,default:!1}},setup(t){let o,l,a=!1;const n=t,i=e.computed(()=>({"--width":n.width,"--height":n.height,"--activeColor":n.activeColor})),d=e.computed(()=>{var m;return(m=n.slides[p.value])==null?void 0:m.title}),c=e.computed(()=>r.value.fullScreen===!1?!1:n.fullScreen),p=e.ref(n.initialSlide),r=e.computed(()=>n.slides[p.value]);let f;const u=()=>{p.value=(p.value-1+n.slides.length)%n.slides.length},h=()=>{p.value=(p.value+1)%n.slides.length},Pe=m=>{p.value=m},J=()=>{f&&clearInterval(f)},Q=()=>{n.autoplay&&(f=window.setInterval(h,n.autoplaySpeed))},Ye=()=>{window.open(r.value.img)},Ae=()=>{n.enableImageClick&&Ye()},Ue=m=>{o=m.touches[0].clientX,l=m.touches[0].clientY,a=!1},Re=m=>{if(!a){const k=m.touches[0].clientX-o,Z=m.touches[0].clientY-l;Math.abs(k)>Math.abs(Z)&&(k>40?(u(),a=!0):k<-40&&(h(),a=!0))}};return e.onMounted(()=>{Q()}),e.onUnmounted(()=>{J()}),(m,k)=>(e.openBlock(),e.createElementBlock("div",{class:"spicyCarouselWrapper",style:e.normalizeStyle({...i.value})},[e.createElementVNode("div",{class:"spicyCarouselContainer",onMouseenter:J,onMouseleave:Q,onTouchstart:Ue,onTouchmove:Re},[e.createVNode(e.Transition,{name:"slide",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["spicyCarouselSlide",{pointCursor:n.enableImageClick}]),key:p.value,style:e.normalizeStyle({backgroundImage:`url(${r.value.img})`}),onClick:Ae},[m.slides[p.value].text?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["spicyCarouselTextOverlay",{fullScreen:c.value}]),"aria-label":m.slides[p.value].text},[e.createElementVNode("span",se,e.toDisplayString(m.slides[p.value].text),1)],10,ie)):e.createCommentVNode("",!0),e.renderSlot(m.$slots,"default")],6))]),_:3})],32),e.createElementVNode("div",re,[d.value?(e.openBlock(),e.createElementBlock("h2",ce,e.toDisplayString(r.value.title),1)):e.createCommentVNode("",!0)]),m.showNavigation?(e.openBlock(),e.createElementBlock("div",de,[e.createElementVNode("button",{class:"spicyCarouselPrevBtn",onClick:u},pe),e.createElementVNode("button",{class:"spicyCarouselNextBtn",onClick:h},fe)])):e.createCommentVNode("",!0),m.showPagination?(e.openBlock(),e.createElementBlock("div",me,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.slides,(Z,C)=>(e.openBlock(),e.createElementBlock("button",{key:C,onClick:He=>Pe(C),class:e.normalizeClass(["spicyCarouselPageBtn",{active:C===p.value}])},[e.createElementVNode("span",ue,e.toDisplayString(C+1),1)],10,ye))),128))])):e.createCommentVNode("",!0)],4))}}),$=e.defineComponent({__name:"SpicyDivider",props:{variant:{default:"solid"},width:{default:"100%"},height:{default:"1px"},bgColor:{default:"#5f5f5f"}},setup(t){const o=t,l=e.computed(()=>({width:o.width,borderBottom:`${o.height} ${o.variant} ${o.bgColor}`}));return(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:"spicyDivider",style:e.normalizeStyle(l.value),role:"separator","aria-orientation":"horizontal"},[e.renderSlot(a.$slots,"default")],4))}}),he=["aria-label"],ge=["placeholder","aria-label"],ke={key:0,class:"spicyInputError"},E=e.defineComponent({__name:"SpicyLabel",props:{value:{default:""},placeholder:{default:""},label:{default:""},error:{default:""},variant:{default:"filled"}},setup(t){const o=t,l=e.ref(o.value),a=e.ref(!1),n=c=>{const p=c.target;l.value=p.value},i=()=>{a.value=!1},d=()=>{a.value=!0};return(c,p)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["spicyInputWrapper",[c.variant,{hasValue:l.value||c.value,hasFocus:a.value,hasError:c.error}]])},[e.createElementVNode("label",{class:"spicyInputLabel","aria-label":c.label},e.toDisplayString(c.label),9,he),e.withDirectives(e.createElementVNode("input",{type:"text",name:"spicyInput",class:e.normalizeClass(["spicyInput",c.variant]),"onUpdate:modelValue":p[0]||(p[0]=r=>l.value=r),placeholder:c.placeholder,onInput:n,onBlur:i,onFocus:d,"aria-label":c.label},null,42,ge),[[e.vModelText,l.value]]),e.renderSlot(c.$slots,"default"),c.error?(e.openBlock(),e.createElementBlock("span",ke,e.toDisplayString(c.error),1)):e.createCommentVNode("",!0)],2))}}),Ce={class:"spicyModalHeader"},Se={class:"spicyModalActions"},be=["onClick"],D=e.defineComponent({__name:"SpicyModal",props:{width:{default:"400px"},height:{default:"auto"},borderRadius:{default:"6px"},bgColor:{default:""},visible:{type:Boolean,default:!1},closeBtn:{type:Boolean,default:!0},actions:{default:()=>[]},closeOnClick:{type:Boolean,default:!0},modalTitle:{default:""},textColor:{default:""}},emits:["update:visible"],setup(t,{emit:o}){const l=t,a=e.computed(()=>({"--width":l.width,"--height":l.height,"--skBorderRadius":l.borderRadius,"--skBgColor":l.bgColor,"--skTextColor":l.textColor})),n=o,i=()=>{n("update:visible",!1)},d=c=>{const p=c.target;l.closeOnClick&&p.classList.contains("spicyModalOverlay")&&i()};return(c,p)=>c.visible?(e.openBlock(),e.createElementBlock("div",{key:0,class:"spicyModalOverlay",onClick:d},[e.createElementVNode("div",{class:"spicyModal",style:e.normalizeStyle({...a.value})},[e.createElementVNode("header",Ce,[e.renderSlot(c.$slots,"spicyModalHeader",{title:c.modalTitle,ariaLabel:c.modalTitle},()=>[e.createTextVNode(e.toDisplayString(c.modalTitle),1)])]),e.renderSlot(c.$slots,"default"),e.createElementVNode("div",Se,[e.renderSlot(c.$slots,"spicyModalActions"),c.actions.length===0&&c.closeBtn?(e.openBlock(),e.createElementBlock("button",{key:0,class:"spicyModalCloseBtn spicyModalActionBtn",onClick:i}," Close ")):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.actions,r=>(e.openBlock(),e.createElementBlock("button",{class:"spicyModalExtraBtn spicyModalActionBtn",key:r.label,onClick:r.handler},e.toDisplayString(r.label),9,be))),128))])],4)])):e.createCommentVNode("",!0)}}),V=e.defineComponent({__name:"SpicySheet",props:{isRounded:{type:Boolean,default:!1},color:{default:""}},setup(t){const o=t,l=e.computed(()=>({"--color":o.color||"transparent"}));return(a,n)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["spicySheet",{isRound:a.isRounded}]),style:e.normalizeStyle({...l.value})},[e.renderSlot(a.$slots,"default")],6))}}),Be={class:"spicySlider"},we=["aria-label"],_e=["min","max","step"],T=e.defineComponent({__name:"SpicySlider",props:{min:{default:0},max:{default:100},step:{default:1},label:{default:""},modelValue:{default:0}},emits:["update:modelValue"],setup(t,{emit:o}){const l=t,a=o,n=e.ref(l.modelValue);e.watch(()=>l.modelValue,d=>{n.value=d});const i=d=>{const c=d.target;a("update:modelValue",Number(c.value))};return(d,c)=>(e.openBlock(),e.createElementBlock("div",Be,[d.label?(e.openBlock(),e.createElementBlock("label",{key:0,class:"spicySliderLabel","aria-label":d.label},e.toDisplayString(d.label),9,we)):e.createCommentVNode("",!0),e.withDirectives(e.createElementVNode("input",{name:"spicySliderInput",class:"spicySliderInput",type:"range",min:d.min,max:d.max,step:d.step,"onUpdate:modelValue":c[0]||(c[0]=p=>n.value=p),onInput:i},null,40,_e),[[e.vModelText,n.value]]),e.renderSlot(d.$slots,"default")]))}}),$e=["tabindex","aria-label","aria-checked","onKeydown"],Ee=[e.createElementVNode("div",{class:"spicyToggleKnob"},null,-1)],M=e.defineComponent({__name:"SpicyToggle",props:{modelValue:{type:Boolean,default:!1},label:{default:""},variant:{default:"outlined"},borderColor:{default:""},activeColor:{default:""},disabled:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(t,{emit:o}){const l=t,a=e.computed(()=>({"--skBorderColor":l.borderColor,"--activeColor":l.activeColor})),n=o,i=()=>{n("update:modelValue",!l.modelValue)};return(d,c)=>(e.openBlock(),e.createElementBlock("div",e.mergeProps({class:["spicyToggle",{outlined:d.variant==="outlined","is-active":d.modelValue}],tabindex:d.disabled?-1:0,role:"switch",style:{...a.value},"aria-label":d.label,"aria-checked":d.modelValue,onClick:i,onKeydown:[e.withKeys(e.withModifiers(i,["prevent"]),["space"]),e.withKeys(e.withModifiers(i,["prevent"]),["enter"])]},d.$attrs),Ee,16,$e))}}),De=["aria-hidden"],Ve={key:0,class:"spicyTooltipIcon"},Te=["aria-label"],Me={key:2,class:"spicyTooltipIcon"},N=e.defineComponent({__name:"SpicyTooltip",props:{text:{default:""},prependIcon:{default:""},appendIcon:{default:""},position:{default:"top"}},setup(t){const o=t,l=e.ref(!1),a=e.ref(null),n=e.reactive({position:"absolute",top:"0px",left:"0px",maxWidth:"175px"}),i=r=>{const f=r.right-window.innerWidth;f>0&&(n.left=`${parseInt(n.left)-f-5}px`),r.left<0&&(n.left="5px")},d={top:(r,f)=>{n.left=`${r.left+(r.width-f.width)/2}px`,n.top=`${r.top-f.height-5}px`},bottom:(r,f)=>{n.left=`${r.left+(r.width-f.width)/2}px`,n.top=`${r.bottom+5}px`},left:(r,f)=>{n.left=`${r.left-f.width-5}px`,n.top=`${r.top+(r.height-f.height)/2}px`},right:(r,f)=>{n.left=`${r.right+5}px`,n.top=`${r.top+(r.height-f.height)/2}px`}},c=()=>{l.value=!0,e.nextTick(()=>{if(a.value&&l.value){const r=a.value.getBoundingClientRect(),f=a.value.querySelector(".spicyTooltip");if(f){const u=f.getBoundingClientRect(),h=d[o.position];h(r,u),i(u)}}})},p=()=>{l.value=!1};return(r,f)=>(e.openBlock(),e.createElementBlock("div",{onMouseover:c,onMouseleave:p,ref_key:"host",ref:a},[e.renderSlot(r.$slots,"default"),l.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"spicyTooltip",style:e.normalizeStyle(n),role:"tooltip","aria-hidden":!l.value},[r.prependIcon?(e.openBlock(),e.createElementBlock("span",Ve,e.toDisplayString(r.prependIcon),1)):e.createCommentVNode("",!0),r.text?(e.openBlock(),e.createElementBlock("span",{key:1,class:"spicyTooltipText","aria-label":r.text},e.toDisplayString(r.text),9,Te)):e.createCommentVNode("",!0),r.appendIcon?(e.openBlock(),e.createElementBlock("span",Me,e.toDisplayString(r.appendIcon),1)):e.createCommentVNode("",!0)],12,De)):e.createCommentVNode("",!0)],544))}});function S(t,o){const l={YYYY:()=>t.getFullYear().toString(),MM:()=>(t.getMonth()+1).toString().padStart(2,"0"),DD:()=>t.getDate().toString().padStart(2,"0")};return o.replace(/YYYY|MM|DD/g,a=>l[a]())}function I(t){const[o,l,a]=t.split("-");return new Date(Number(o),Number(l)-1,Number(a))}function O(t,o){const l=Math.abs(o.getTime()-t.getTime());return Math.ceil(l/(1e3*60*60*24))}function z(t,o){const l=new Date(t);return l.setDate(t.getDate()+o),l}function F(t,o){const l=new Date(t);return l.setDate(t.getDate()-o),l}function L(t){const o=new Date;return t.getDate()===o.getDate()&&t.getMonth()===o.getMonth()&&t.getFullYear()===o.getFullYear()}function P(t){const o=new Date;return o.setDate(o.getDate()-1),t.getDate()===o.getDate()&&t.getMonth()===o.getMonth()&&t.getFullYear()===o.getFullYear()}function Y(t){const o=new Date;return o.setDate(o.getDate()+1),t.getDate()===o.getDate()&&t.getMonth()===o.getMonth()&&t.getFullYear()===o.getFullYear()}function A(t="YYYY-MM-DD",o={show:!0,separator:"-"}){if(typeof t!="string"||typeof o!="object"||!o.hasOwnProperty("show")||typeof o.show!="boolean")throw new Error('Invalid parameters: Please provide a valid format string and options object with a boolean "show" property.');let a=S(new Date,t);return o.separator&&o.separator!=="-"&&(a=a.replace(/-/g,o.separator)),o.show?{value:a,isVisible:!0}:{value:a,isVisible:!1}}const Ne=Object.freeze(Object.defineProperty({__proto__:null,currentDate:A,dateAdd:z,dateDiff:O,dateIsToday:L,dateIsTomorrow:Y,dateIsYesterday:P,dateSubtract:F,formatDate:S,parseDate:I},Symbol.toStringTag,{value:"Module"}));function U(t){const o=new WeakMap;function l(a){if(y(a)||typeof a!="object")return a;if(o.has(a))return o.get(a);const n=Array.isArray(a)?[]:{};o.set(a,n);for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&(n[i]=l(a[i]));return n}return l(t)}function b(...t){const o={};return t.forEach(l=>{if(!y(l)){for(const a in l)if(Object.prototype.hasOwnProperty.call(l,a)){const n=l[a];n!==void 0&&(typeof n=="object"&&n!==null&&!Array.isArray(n)?o[a]=b(o[a]||{},n):o[a]=n)}}}),o}function R(...t){return y(t[0])?t[0]:Object.assign({},...t)}function j(t){return y(t)?[]:Object.keys(t)}function W(t){return y(t)?[]:Object.values(t)}function K(t){return y(t)?[]:Object.entries(t)}function y(t){return t===null||typeof t!="object"?!1:Array.isArray(t)?t.length===0:Object.keys(t).length===0}const Ie=Object.freeze(Object.defineProperty({__proto__:null,deepClone:U,deepMerge:b,getObjectEntries:K,getObjectKeys:j,getObjectValues:W,isObjectEmpty:y,mergeObjects:R},Symbol.toStringTag,{value:"Module"}));function g(t){try{return new URL(t),!0}catch(o){return console.error("Invalid URL:",o),!1}}function H(t){return g(t)?new URL(t).hostname:null}function X(t,o){if(!g(t))return t;const l=new URL(t);return Object.keys(o).forEach(a=>l.searchParams.append(a,o[a])),l.toString()}function q(t,o,l="https"){if(!["http","https","ftp","sftp","ftps","ssh"].includes(l.toLowerCase()))throw new Error("Invalid protocol: "+l);if(!/^(?!:\/\/)([a-z0-9-]+\.)*[a-z0-9-]+$/i.test(t))throw new Error("Invalid hostname: "+t);return o.startsWith("/")||(o="/"+o),o.endsWith("/")&&o.length>1&&(o=o.slice(0,-1)),o==="/"&&(o=""),`${l.toLowerCase()}://${t}${o}`}const Oe=Object.freeze(Object.defineProperty({__proto__:null,appendParamsToUrl:X,generateUrl:q,getHostname:H,isUrlValid:g},Symbol.toStringTag,{value:"Module"})),ze=':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)}',Fe=".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}}",G={beforeMount(t){t.style.position="relative",t.style.overflow="hidden",t.addEventListener("click",o=>{const l=document.createElement("span"),a=Math.max(t.clientWidth,t.clientHeight),n=a/2;l.style.width=l.style.height=`${a}px`,l.style.left=`${o.clientX-t.getBoundingClientRect().left-n}px`,l.style.top=`${o.clientY-t.getBoundingClientRect().top-n}px`,l.classList.add("spicyRipple");const i=t.querySelector(".spicyRipple");i&&i.remove(),t.appendChild(l),l.addEventListener("animationend",()=>{l.remove()})})}},Le={install(t,o={}){const{useComponents:l=!0,useStyles:a=!0,useDirectives:n=!0}=o;if(l&&(t.component("SpicyAlert",B),t.component("SpicyBtn",w),t.component("SpicyCarousel",_),t.component("SpicyDivider",$),t.component("SpicyLabel",E),t.component("SpicyModal",D),t.component("SpicySheet",V),t.component("SpicySlider",T),t.component("SpicyToggle",M),t.component("SpicyTooltip",N)),a){const i=document.createElement("style");i.id="SpicyStyles",i.textContent=ze,document.head.appendChild(i)}if(n){t.directive("spicyRipple",G);const i=document.createElement("style");i.id="SpicyRippleStyles",i.textContent=Fe,document.head.appendChild(i)}}};s.SpicyAlert=B,s.SpicyBtn=w,s.SpicyCarousel=_,s.SpicyDivider=$,s.SpicyKatsu=Le,s.SpicyLabel=E,s.SpicyModal=D,s.SpicySheet=V,s.SpicySlider=T,s.SpicyToggle=M,s.SpicyTooltip=N,s.appendParamsToUrl=X,s.currentDate=A,s.dateAdd=z,s.dateDiff=O,s.dateIsToday=L,s.dateIsTomorrow=Y,s.dateIsYesterday=P,s.dateSubtract=F,s.dateUtils=Ne,s.deepClone=U,s.deepMerge=b,s.formatDate=S,s.generateUrl=q,s.getHostname=H,s.getObjectEntries=K,s.getObjectKeys=j,s.getObjectValues=W,s.isObjectEmpty=y,s.isUrlValid=g,s.mergeObjects=R,s.objUtils=Ie,s.parseDate=I,s.ripple=G,s.urlUtils=Oe,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.fade-enter-active,.fade-leave-active{transition:opacity .35s}.fade-enter,.fade-leave-to{opacity:0}.spicyAlert{display:flex;align-items:center;padding:12px;border-radius:4px;margin-bottom:12px}.spicyAlertIcon{margin-right:8px}.spicyAlertCloseBtn{margin-left:auto;background:none;border:none;cursor:pointer}.info{background-color:#e0e0e0;color:#333}.success{background-color:#bcf7c9;color:#155724}.warning{background-color:#fff3cd;color:#856404}.error{background-color:#ffbdc2;color:#911f2a}.spicyBtn{display:flex;align-items:center;justify-content:center;text-align:center;
|
|
1
|
+
.fade-enter-active,.fade-leave-active{transition:opacity .35s}.fade-enter,.fade-leave-to{opacity:0}.spicyAlert{display:flex;align-items:center;padding:12px;border-radius:4px;margin-bottom:12px}.spicyAlertIcon{margin-right:8px}.spicyAlertCloseBtn{margin-left:auto;background:none;border:none;cursor:pointer}.info{background-color:#e0e0e0;color:#333}.success{background-color:#bcf7c9;color:#155724}.warning{background-color:#fff3cd;color:#856404}.error{background-color:#ffbdc2;color:#911f2a}.spicyBtn{display:flex;align-items:center;justify-content:center;text-align:center;padding:8px 16px;background-color:var(--skBgColor, #28292a);border:none;border-radius:4px;color:var(--skTextColor, #ddd);cursor:pointer;font-size:var(--skFontSize, 16px);font-weight:var(--skFontWeight, 500);transition:background-color .25s}.spicyBtn.outlined{background-color:transparent;border:2px solid var(--skBorderColor, #515353)}.spicyBtn.disabled{opacity:.5;cursor:not-allowed}.spicyBtn:hover:not(.disabled){background-color:var(--hoverColor, grey)}.spicyBtn.outlined:hover:not(.disabled){background-color:var(--hoverColor, grey);color:var(--skTextColor, #ddd)}.spicyBtnIcon{min-width:30px}.mdi-icon{width:30px;height:30px}.spicyBtn.isRound{border-radius:50px;padding:12px}.spicyCarouselWrapper{position:relative;width:var(--width, 580px);height:var(--height, 360px);padding:30px;display:flex;align-items:center;justify-content:center}.spicyCarouselTitle{position:absolute;top:0;width:var(--width, 580px);background-color:#0009;height:30px;color:#ccc;font-size:18px;font-weight:700}.spicyCarouselContainer{position:relative;overflow:hidden;width:100%;height:100%;border-radius:var(--borderRadius);background-color:#0009}.spicyCarouselSlide{position:absolute;top:0;left:0;width:100%;height:100%;background-size:cover;background-position:center;background-repeat:no-repeat;transition:opacity .3s ease}.spicyCarouselTextOverlay{position:absolute;bottom:10px;left:10px;background-color:#000000bf;padding:10px;color:#ccc;font-size:18px;font-weight:700;text-shadow:2px 2px 4px rgba(0,0,0,.5);border-radius:4px}.spicyCarouselTextOverlay.fullScreen{top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;text-align:center;background-color:#0000004d}.slide-enter-active,.slide-leave-active{transition:opacity .3s}.slide-enter,.slide-leave-to{opacity:0}.spicyCarouselNavControls{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;justify-content:space-between;align-items:center;pointer-events:none}.spicyCarouselNextBtn{border-radius:0 6px 6px 0}.spicyCarouselPrevBtn{border-radius:6px 0 0 6px}.spicyCarouselPrevBtn,.spicyCarouselNextBtn{border:none;font-size:24px;color:#ccc;cursor:pointer;background:#0009;height:100%;width:30px;display:flex;align-items:center;justify-content:center;transition:transform .3s;pointer-events:auto;z-index:2}.spicyCarouselPrevBtn:hover,.spicyCarouselNextBtn:hover{background:var(--skPrimaryColor)}.spicyCarouselPagination{position:absolute;background:#0009;bottom:0;left:50%;height:30px;width:var(--width, 580px);transform:translate(-50%);display:flex;gap:8px;z-index:2;align-items:center;justify-content:center;pointer-events:auto}.spicyCarouselPageBtn{border:none;color:#fff;cursor:pointer;background:#00b7ff80;height:26px;width:26px;border-radius:50%;display:flex;align-items:center;justify-content:center;transition:transform .3s}.spicyCarouselPageBtn.active{background:var(--activeColor, --skPrimaryColor)}.spicyCarouselPageBtn:hover{background:var(--skPrimaryColor)}.pointCursor{cursor:pointer}.spicyDivider{width:100%;border:none;border-top:1px solid #5f5f5f}.spicyInputWrapper{display:flex;flex-direction:column;position:relative}.spicyInputLabel{position:absolute;top:12px;left:16px;color:var(--textColor, var(--skTextColor));transition:top .25s,font-size .25s,color .25s;pointer-events:none;font-size:18px;background-color:transparent}.spicyInput{padding:20px 16px 8px;border:none;border-bottom:1px solid var(--skBorderColor, #515353);font-size:16px;width:100%;box-sizing:border-box;transition:border-color .25s;background-color:transparent;color:var(--textColor, var(--skTextColor, #ddd))}.spicyInputWrapper .spicyInput:focus{outline:none;border-color:var(--skLabelFocus)}.outlined .spicyInput{border:1px solid var(--skBorderColor, #515353);border-radius:4px}.filled .spicyInput{border:none;border-bottom:1px solid var(--skBorderColor, #515353)}.hasValue .spicyInputLabel,.hasFocus .spicyInputLabel{top:-18px;font-size:16px;color:var(--skLabelFocus);font-weight:700}.hasError .spicyInput{border-color:red}.spicyInputError{color:red;font-size:12px}.spicyModalOverlay{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#0009;display:flex;justify-content:center;align-items:center;z-index:1000}.spicyModal{padding:20px;box-shadow:0 0 6px 2px #0003;transition:transform .3s ease-out;font-size:15px;border-radius:var(--skBorderRadius);background-color:var(--skBgColor);z-index:1001}.spicyModalHeader{text-align:center;font-size:20px;font-weight:700}.spicyModalActions{margin-top:20px;text-align:right}.spicyModalActionBtn{background-color:transparent;border:none;color:var(--skTextColor, #ddd);cursor:pointer}.spicyModalActionBtn:hover{text-decoration:underline}.spicySheet{display:flex;flex-direction:column;padding:16px;background-color:var(--color)}.spicySheet.isRound{border-radius:8px}.spicySlider{width:100%;display:flex;flex-direction:column;align-items:center;justify-content:center}.spicySliderLabel{margin-bottom:5px;font-size:16px}.spicySliderInput{width:100%}.spicyToggle{width:50px;height:24px;background-color:var(--skBgSecondaryColor, #424344);border-radius:30px;cursor:pointer;padding:2px;transition:background-color .2s;display:inline-flex;align-items:center}.spicyToggle.is-active{background-color:var(--activeColor, var(--skPrimaryColor))}.spicyToggleKnob{width:20px;height:20px;background-color:#fff;border-radius:50%;transition:transform .2s;box-shadow:0 2px 4px #0003}.spicyToggle.is-active .spicyToggleKnob{transform:translate(26px)}.spicyToggle.outlined{background-color:transparent;border:2px solid var(--skBorderColor, #515353)}.spicyToggle.outlined.is-active{background-color:var(--activeColor, var(--skPrimaryColor));border-color:var(--activeColor, var(--skPrimaryColor))}.spicyTooltip{z-index:9999;background-color:var(--skBgColor);color:var(--skTextColor);padding:8px;border-radius:4px;font-size:15px;border:1px solid var(--skBorderColor);display:flex;align-items:center;justify-content:center}.spicyTooltipIcon{font-size:18px}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
interface SpicyAlertProps {
|
|
2
|
+
variant?: 'info' | 'success' | 'warning' | 'error' | 'custom';
|
|
3
|
+
text?: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
iconOnly?: boolean;
|
|
6
|
+
closable?: boolean;
|
|
7
|
+
autoClose?: number;
|
|
8
|
+
}
|
|
9
|
+
declare var __VLS_inheritedAttrs: {};
|
|
10
|
+
declare const __VLS_refs: {};
|
|
11
|
+
declare const __VLS_templateResult: {
|
|
12
|
+
slots: {
|
|
13
|
+
default?(_: {}): any;
|
|
14
|
+
};
|
|
15
|
+
refs: __VLS_PickRefsExpose<typeof __VLS_refs>;
|
|
16
|
+
attrs: Partial<typeof __VLS_inheritedAttrs>;
|
|
17
|
+
};
|
|
18
|
+
type __VLS_Slots = typeof __VLS_templateResult['slots'];
|
|
19
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<SpicyAlertProps>, {
|
|
20
|
+
variant: string;
|
|
21
|
+
text: string;
|
|
22
|
+
icon: string;
|
|
23
|
+
iconOnly: boolean;
|
|
24
|
+
closable: boolean;
|
|
25
|
+
autoClose: number;
|
|
26
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<SpicyAlertProps>, {
|
|
27
|
+
variant: string;
|
|
28
|
+
text: string;
|
|
29
|
+
icon: string;
|
|
30
|
+
iconOnly: boolean;
|
|
31
|
+
closable: boolean;
|
|
32
|
+
autoClose: number;
|
|
33
|
+
}>>>, {
|
|
34
|
+
variant: "info" | "success" | "warning" | "error" | "custom";
|
|
35
|
+
text: string;
|
|
36
|
+
icon: string;
|
|
37
|
+
iconOnly: boolean;
|
|
38
|
+
closable: boolean;
|
|
39
|
+
autoClose: number;
|
|
40
|
+
}, {}>;
|
|
41
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_Slots>;
|
|
42
|
+
export default _default;
|
|
43
|
+
type __VLS_PickRefsExpose<T> = T extends object ? {
|
|
44
|
+
[K in keyof T]: (T[K] extends any[] ? Parameters<T[K][0]['expose']>[0][] : T[K] extends {
|
|
45
|
+
expose?: (exposed: infer E) => void;
|
|
46
|
+
} ? E : T[K]) | null;
|
|
47
|
+
} : never;
|
|
48
|
+
type __VLS_WithDefaults<P, D> = {
|
|
49
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
50
|
+
default: D[K];
|
|
51
|
+
}> : P[K];
|
|
52
|
+
};
|
|
53
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
54
|
+
type __VLS_TypePropsToOption<T> = {
|
|
55
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
56
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
57
|
+
} : {
|
|
58
|
+
type: import('vue').PropType<T[K]>;
|
|
59
|
+
required: true;
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
63
|
+
new (): {
|
|
64
|
+
$slots: S;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
type __VLS_PrettifyLocal<T> = {
|
|
68
|
+
[K in keyof T]: T[K];
|
|
69
|
+
} & {};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
interface SpicyBtnProps {
|
|
2
|
+
variant?: 'outlined' | 'filled';
|
|
3
|
+
disabled?: boolean;
|
|
4
|
+
text?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
mdi?: string;
|
|
7
|
+
bgColor?: string;
|
|
8
|
+
textColor?: string;
|
|
9
|
+
hoverColor?: string;
|
|
10
|
+
borderColor?: string;
|
|
11
|
+
fontSize?: number | string;
|
|
12
|
+
fontWeight?: number | string;
|
|
13
|
+
}
|
|
14
|
+
declare var __VLS_0: {};
|
|
15
|
+
declare var __VLS_inheritedAttrs: {};
|
|
16
|
+
declare const __VLS_refs: {};
|
|
17
|
+
declare const __VLS_templateResult: {
|
|
18
|
+
slots: {
|
|
19
|
+
default?(_: typeof __VLS_0): any;
|
|
20
|
+
};
|
|
21
|
+
refs: __VLS_PickRefsExpose<typeof __VLS_refs>;
|
|
22
|
+
attrs: Partial<typeof __VLS_inheritedAttrs>;
|
|
23
|
+
};
|
|
24
|
+
type __VLS_Slots = typeof __VLS_templateResult['slots'];
|
|
25
|
+
declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToOption<SpicyBtnProps>, {
|
|
26
|
+
variant: string;
|
|
27
|
+
disabled: boolean;
|
|
28
|
+
text: string;
|
|
29
|
+
icon: string;
|
|
30
|
+
mdi: string;
|
|
31
|
+
bgColor: string;
|
|
32
|
+
textColor: string;
|
|
33
|
+
hoverColor: string;
|
|
34
|
+
borderColor: string;
|
|
35
|
+
fontSize: number;
|
|
36
|
+
fontWeight: number;
|
|
37
|
+
}>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
38
|
+
click: () => void;
|
|
39
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<SpicyBtnProps>, {
|
|
40
|
+
variant: string;
|
|
41
|
+
disabled: boolean;
|
|
42
|
+
text: string;
|
|
43
|
+
icon: string;
|
|
44
|
+
mdi: string;
|
|
45
|
+
bgColor: string;
|
|
46
|
+
textColor: string;
|
|
47
|
+
hoverColor: string;
|
|
48
|
+
borderColor: string;
|
|
49
|
+
fontSize: number;
|
|
50
|
+
fontWeight: number;
|
|
51
|
+
}>>> & {
|
|
52
|
+
onClick?: (() => any) | undefined;
|
|
53
|
+
}, {
|
|
54
|
+
variant: "outlined" | "filled";
|
|
55
|
+
text: string;
|
|
56
|
+
icon: string;
|
|
57
|
+
disabled: boolean;
|
|
58
|
+
mdi: string;
|
|
59
|
+
bgColor: string;
|
|
60
|
+
textColor: string;
|
|
61
|
+
hoverColor: string;
|
|
62
|
+
borderColor: string;
|
|
63
|
+
fontSize: number | string;
|
|
64
|
+
fontWeight: number | string;
|
|
65
|
+
}, {}>;
|
|
66
|
+
declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_Slots>;
|
|
67
|
+
export default _default;
|
|
68
|
+
type __VLS_PickRefsExpose<T> = T extends object ? {
|
|
69
|
+
[K in keyof T]: (T[K] extends any[] ? Parameters<T[K][0]['expose']>[0][] : T[K] extends {
|
|
70
|
+
expose?: (exposed: infer E) => void;
|
|
71
|
+
} ? E : T[K]) | null;
|
|
72
|
+
} : never;
|
|
73
|
+
type __VLS_WithDefaults<P, D> = {
|
|
74
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_PrettifyLocal<P[K] & {
|
|
75
|
+
default: D[K];
|
|
76
|
+
}> : P[K];
|
|
77
|
+
};
|
|
78
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
79
|
+
type __VLS_TypePropsToOption<T> = {
|
|
80
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
81
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
82
|
+
} : {
|
|
83
|
+
type: import('vue').PropType<T[K]>;
|
|
84
|
+
required: true;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
type __VLS_WithTemplateSlots<T, S> = T & {
|
|
88
|
+
new (): {
|
|
89
|
+
$slots: S;
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
type __VLS_PrettifyLocal<T> = {
|
|
93
|
+
[K in keyof T]: T[K];
|
|
94
|
+
} & {};
|