spicykatsu 0.0.55 → 0.4.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 +79 -3
- package/dist/lib/SpicyAccordion/SpicyAccordion.css +1 -1
- package/dist/lib/SpicyAccordion/SpicyAccordion.js +46 -63
- package/dist/lib/SpicyAlert/SpicyAlert.css +1 -1
- package/dist/lib/SpicyAlert/SpicyAlert.js +98 -88
- package/dist/lib/SpicyBtn/SpicyBtn.css +1 -1
- package/dist/lib/SpicyBtn/SpicyBtn.js +80 -76
- package/dist/lib/SpicyCarousel/SpicyCarousel.css +1 -1
- package/dist/lib/SpicyCarousel/SpicyCarousel.js +120 -130
- package/dist/lib/SpicyDialog/SpicyDialog.css +1 -1
- package/dist/lib/SpicyDialog/SpicyDialog.js +43 -55
- package/dist/lib/SpicyDivider/SpicyDivider.js +31 -29
- package/dist/lib/SpicyDropdown/SpicyDropdown.css +1 -1
- package/dist/lib/SpicyDropdown/SpicyDropdown.js +62 -67
- package/dist/lib/SpicyFileInput/SpicyFileInput.css +1 -1
- package/dist/lib/SpicyFileInput/SpicyFileInput.js +125 -109
- package/dist/lib/SpicyModal/SpicyModal.css +1 -1
- package/dist/lib/SpicyModal/SpicyModal.js +95 -88
- package/dist/lib/SpicyProgress/SpicyProgress.css +1 -1
- package/dist/lib/SpicyProgress/SpicyProgress.js +75 -73
- package/dist/lib/SpicySheet/SpicySheet.css +1 -1
- package/dist/lib/SpicySheet/SpicySheet.js +31 -24
- package/dist/lib/SpicySlider/SpicySlider.css +1 -1
- package/dist/lib/SpicySlider/SpicySlider.js +60 -51
- package/dist/lib/SpicyTabs/SpicyTabs.css +1 -1
- package/dist/lib/SpicyTabs/SpicyTabs.js +70 -82
- package/dist/lib/SpicyTextArea/SpicyTextArea.css +1 -1
- package/dist/lib/SpicyTextArea/SpicyTextArea.js +35 -35
- package/dist/lib/SpicyTextField/SpicyTextField.css +1 -1
- package/dist/lib/SpicyTextField/SpicyTextField.js +96 -83
- package/dist/lib/SpicyToggle/SpicyToggle.css +1 -1
- package/dist/lib/SpicyToggle/SpicyToggle.js +54 -46
- package/dist/lib/SpicyTooltip/SpicyTooltip.css +1 -1
- package/dist/lib/SpicyTooltip/SpicyTooltip.js +74 -77
- package/dist/lib/SpicyTree/SpicyTree.css +1 -1
- package/dist/lib/SpicyTree/SpicyTree.js +53 -21
- package/dist/spicykatsu.es.js +145 -146
- package/package.json +19 -12
- package/dist/lib/SpicyTreeNode/SpicyTreeNode.css +0 -1
- package/dist/lib/SpicyTreeNode/SpicyTreeNode.js +0 -55
- package/dist/lib/main/main.js +0 -4
- package/dist/lib/ripple/ripple.js +0 -4
- package/dist/spicykatsu.umd.js +0 -1
- package/dist/style.css +0 -1
- package/dist/types/components/SpicyAccordion.vue.d.ts +0 -25
- package/dist/types/components/SpicyAlert.vue.d.ts +0 -34
- package/dist/types/components/SpicyBtn.vue.d.ts +0 -40
- package/dist/types/components/SpicyCarousel.vue.d.ts +0 -51
- package/dist/types/components/SpicyDialog.vue.d.ts +0 -47
- package/dist/types/components/SpicyDivider.vue.d.ts +0 -29
- package/dist/types/components/SpicyDropdown.vue.d.ts +0 -28
- package/dist/types/components/SpicyFileInput.vue.d.ts +0 -47
- package/dist/types/components/SpicyModal.vue.d.ts +0 -53
- package/dist/types/components/SpicyProgress.vue.d.ts +0 -34
- package/dist/types/components/SpicySheet.vue.d.ts +0 -27
- package/dist/types/components/SpicySlider.vue.d.ts +0 -37
- package/dist/types/components/SpicyTabs.vue.d.ts +0 -27
- package/dist/types/components/SpicyTextArea.vue.d.ts +0 -35
- package/dist/types/components/SpicyTextField.vue.d.ts +0 -47
- package/dist/types/components/SpicyToggle.vue.d.ts +0 -21
- package/dist/types/components/SpicyTooltip.vue.d.ts +0 -29
- package/dist/types/components/SpicyTree.vue.d.ts +0 -11
- package/dist/types/components/SpicyTreeNode.vue.d.ts +0 -18
- package/dist/types/directives/spicyDrag.d.ts +0 -6
- package/dist/types/directives/spicyRipple.d.ts +0 -2
- package/dist/types/index.d.ts +0 -33
package/README.md
CHANGED
|
@@ -1,7 +1,83 @@
|
|
|
1
1
|
# SpicyKatsuLib
|
|
2
2
|
|
|
3
|
-
Fun, simple library for
|
|
3
|
+
Fun, simple component library for Vue 3. Built as a personal playground — feel free to use it in your own projects.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
📖 **[Docs](https://satoru8.gitlab.io/spicykatsuvlib/)** | 📦 **[npm](https://www.npmjs.com/package/spicykatsu)**
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install spicykatsu
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { createApp } from 'vue'
|
|
19
|
+
import App from './App.vue'
|
|
20
|
+
import { SpicyKatsu } from 'spicykatsu'
|
|
21
|
+
import 'spicykatsu/dist/style.css'
|
|
22
|
+
|
|
23
|
+
const app = createApp(App)
|
|
24
|
+
app.use(SpicyKatsu)
|
|
25
|
+
app.mount('#app')
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
You can also import components individually for tree shaking:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { SpicyBtn, SpicyModal } from 'spicykatsu'
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Options
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
app.use(SpicyKatsu, {
|
|
38
|
+
useComponents: true, // Register all components globally (default: true)
|
|
39
|
+
useStyles: true, // Inject CSS variables (default: true)
|
|
40
|
+
useDirectives: true // Register v-spicyDrag and v-spicyRipple (default: true)
|
|
41
|
+
})
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Components
|
|
45
|
+
|
|
46
|
+
| Component | Description |
|
|
47
|
+
|-----------|-------------|
|
|
48
|
+
| `SpicyAccordion` | Collapsible sections, single or multi-open |
|
|
49
|
+
| `SpicyAlert` | Dismissible alerts with variants and auto-close |
|
|
50
|
+
| `SpicyBtn` | Button with MDI icon support and ripple effect |
|
|
51
|
+
| `SpicyCarousel` | Image carousel with autoplay, touch, and pagination |
|
|
52
|
+
| `SpicyDialog` | Teleported overlay dialog |
|
|
53
|
+
| `SpicyDivider` | Horizontal or vertical divider |
|
|
54
|
+
| `SpicyDropdown` | Dropdown menu with click-outside close |
|
|
55
|
+
| `SpicyFileInput` | File input with drag-and-drop and multi-file preview |
|
|
56
|
+
| `SpicyModal` | Modal dialog with title, actions, and Escape-to-close |
|
|
57
|
+
| `SpicyProgress` | Linear and circular progress indicators |
|
|
58
|
+
| `SpicySheet` | Styled container/card |
|
|
59
|
+
| `SpicySlider` | Range slider input |
|
|
60
|
+
| `SpicyTabs` | Tabbed interface with scrollable tab bar |
|
|
61
|
+
| `SpicyTextArea` | Styled textarea |
|
|
62
|
+
| `SpicyTextField` | Text input with floating label, prefix, and validation |
|
|
63
|
+
| `SpicyToggle` | Toggle switch |
|
|
64
|
+
| `SpicyTooltip` | Hover tooltip with position control |
|
|
65
|
+
| `SpicyTree` | Recursive tree view |
|
|
66
|
+
|
|
67
|
+
## Directives
|
|
68
|
+
|
|
69
|
+
| Directive | Description |
|
|
70
|
+
|-----------|-------------|
|
|
71
|
+
| `v-spicyDrag` | Makes any element draggable (mouse + touch). Accepts `{ axis: 'x' | 'y' }` |
|
|
72
|
+
| `v-spicyRipple` | Adds a Material-style ripple on click/touch |
|
|
73
|
+
|
|
74
|
+
## Dev / Playground
|
|
75
|
+
|
|
76
|
+
Clone the repo and run:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
bun install
|
|
80
|
+
bun run dev
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The playground (`src/playground/Playground.vue`) has a live example of every component and directive.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.spicyAccordion{border:1px solid
|
|
1
|
+
.spicyAccordion{border:1px solid var(--skBorderColor,#ddd);border-radius:4px;overflow:hidden}.spicyAccordionItem{border-bottom:1px solid var(--skBorderColor,#ddd)}.spicyAccordionItem:last-child{border-bottom:none}.spicyAccordionHeader{background-color:var(--skBgSecondaryColor,#f5f5f5);color:var(--skTextColor,#333);text-align:left;cursor:pointer;border:none;justify-content:space-between;align-items:center;width:100%;padding:10px;transition:background-color .2s;display:flex}.spicyAccordionHeader.open{background-color:var(--skBgColor,#e0e0e0)}.spicyAccordionHeader.open .accordionArrow{transform:rotate(180deg)}.spicyAccordionContent{background-color:var(--skBgColor,#fff);color:var(--skTextColor,#333);padding:10px}.accordionToggle{align-items:center;transition:transform .2s;display:flex}.accordionArrow{width:20px;height:20px;transition:transform .2s}.fade-enter-active,.fade-leave-active{transition:opacity .2s}.fade-enter-from,.fade-leave-to{opacity:0}
|
|
@@ -1,64 +1,47 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
])
|
|
46
|
-
], -1))
|
|
47
|
-
], 10, B),
|
|
48
|
-
w(y, { name: "fade" }, {
|
|
49
|
-
default: C(() => [
|
|
50
|
-
k(o("div", V, [
|
|
51
|
-
A(e.$slots, `section-${n}`)
|
|
52
|
-
], 512), [
|
|
53
|
-
[O, l(n)]
|
|
54
|
-
])
|
|
55
|
-
]),
|
|
56
|
-
_: 2
|
|
57
|
-
}, 1024)
|
|
58
|
-
]))), 128))
|
|
59
|
-
]));
|
|
60
|
-
}
|
|
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.css?inline
|
|
3
|
+
var g = ".spicyAccordion{border:1px solid var(--skBorderColor,#ddd);border-radius:4px;overflow:hidden}.spicyAccordionItem{border-bottom:1px solid var(--skBorderColor,#ddd)}.spicyAccordionItem:last-child{border-bottom:none}.spicyAccordionHeader{background-color:var(--skBgSecondaryColor,#f5f5f5);color:var(--skTextColor,#333);text-align:left;cursor:pointer;border:none;justify-content:space-between;align-items:center;width:100%;padding:10px;transition:background-color .2s;display:flex}.spicyAccordionHeader.open{background-color:var(--skBgColor,#e0e0e0)}.spicyAccordionHeader.open .accordionArrow{transform:rotate(180deg)}.spicyAccordionContent{background-color:var(--skBgColor,#fff);color:var(--skTextColor,#333);padding:10px}.accordionToggle{align-items:center;transition:transform .2s;display:flex}.accordionArrow{width:20px;height:20px;transition:transform .2s}.fade-enter-active,.fade-leave-active{transition:opacity .2s}.fade-enter-from,.fade-leave-to{opacity:0}", _ = { class: "spicyAccordion" }, v = ["onClick", "aria-expanded"], y = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "accordionIcon",
|
|
6
|
+
viewBox: "0 0 24 24",
|
|
7
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
8
|
+
}, b = ["d"], x = { class: "spicyAccordionContent" }, S = /* @__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 g = o, S = l(g.defaultOpen || []), C = (e) => {
|
|
20
|
+
if (g.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, g) => (c(), r("div", _, [(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", y, [i("path", { d: e.icon }, null, 8, b)])) : n("", !0),
|
|
36
|
+
g[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, v), a(t, { name: "fade" }, {
|
|
41
|
+
default: m(() => [h(i("div", x, [d(l.$slots, `section-${o}`)], 512), [[p, w(o)]])]),
|
|
42
|
+
_: 2
|
|
43
|
+
}, 1024)]))), 128))]));
|
|
44
|
+
}
|
|
61
45
|
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
};
|
|
46
|
+
//#endregion
|
|
47
|
+
export { g as n, S as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.spicyAlert{
|
|
1
|
+
.spicyAlert{align-items:center;gap:10px;padding:12px;display:flex}.spicyAlert.info{color:#333;background-color:#e0e0e0}.spicyAlert.success{color:#155724;background-color:#a3ffb7}.spicyAlert.warning{color:#856404;background-color:#ffecaf}.spicyAlert.error{color:#911f2a;background-color:#ffbdc2}.spicyAlert.spicyAlertRound{border-radius:8px}.spicyAlertIcon{width:24px;height:24px}.spicyAlertContainer{flex-direction:column;display:flex}.spicyAlertCloseBtn{cursor:pointer;background:0 0;border:none;width:20px;height:20px;margin-left:auto}.spicyAlertCloseBtn svg{width:20px;height:20px}.fade-enter-active,.fade-leave-active{transition:opacity .35s}.fade-enter-from,.fade-leave-to{opacity:0}
|
|
@@ -1,89 +1,99 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
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.css?inline
|
|
3
|
+
var h = ".spicyAlert{align-items:center;gap:10px;padding:12px;display:flex}.spicyAlert.info{color:#333;background-color:#e0e0e0}.spicyAlert.success{color:#155724;background-color:#a3ffb7}.spicyAlert.warning{color:#856404;background-color:#ffecaf}.spicyAlert.error{color:#911f2a;background-color:#ffbdc2}.spicyAlert.spicyAlertRound{border-radius:8px}.spicyAlertIcon{width:24px;height:24px}.spicyAlertContainer{flex-direction:column;display:flex}.spicyAlertCloseBtn{cursor:pointer;background:0 0;border:none;width:20px;height:20px;margin-left:auto}.spicyAlertCloseBtn svg{width:20px;height:20px}.fade-enter-active,.fade-leave-active{transition:opacity .35s}.fade-enter-from,.fade-leave-to{opacity:0}", g = ["aria-label"], _ = {
|
|
4
|
+
key: 0,
|
|
5
|
+
class: "spicyAlertIcon"
|
|
6
|
+
}, v = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "spicyAlertIcon",
|
|
9
|
+
viewBox: "0 0 24 24",
|
|
10
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
11
|
+
}, y = ["d"], b = { class: "spicyAlertContainer" }, x = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "spicyAlertTitle"
|
|
14
|
+
}, S = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "spicyAlertText"
|
|
17
|
+
}, C = {
|
|
18
|
+
key: 0,
|
|
19
|
+
viewBox: "0 0 24 24",
|
|
20
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
21
|
+
}, w = ["d"], T = { key: 1 }, E = /* @__PURE__ */ a({
|
|
22
|
+
__name: "SpicyAlert",
|
|
23
|
+
props: {
|
|
24
|
+
variant: { default: "info" },
|
|
25
|
+
title: {},
|
|
26
|
+
text: {},
|
|
27
|
+
icon: {},
|
|
28
|
+
mdi: {},
|
|
29
|
+
iconOnly: {
|
|
30
|
+
type: Boolean,
|
|
31
|
+
default: !1
|
|
32
|
+
},
|
|
33
|
+
closable: {
|
|
34
|
+
type: Boolean,
|
|
35
|
+
default: !1
|
|
36
|
+
},
|
|
37
|
+
autoClose: { default: 0 },
|
|
38
|
+
closeIcon: {},
|
|
39
|
+
isRound: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: !1
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
setup(a) {
|
|
45
|
+
let h = a, E = l(!0), D = null, O = l(h.autoClose), k = null, A = () => {
|
|
46
|
+
E.value = !1;
|
|
47
|
+
}, j = () => {
|
|
48
|
+
O.value > 0 && (k = Date.now(), D = setTimeout(() => {
|
|
49
|
+
A();
|
|
50
|
+
}, O.value));
|
|
51
|
+
}, M = () => {
|
|
52
|
+
D &&= (clearTimeout(D), null);
|
|
53
|
+
}, N = () => {
|
|
54
|
+
if (D && k !== null) {
|
|
55
|
+
let e = Date.now() - k;
|
|
56
|
+
O.value = Math.max(0, O.value - e), M(), k = null;
|
|
57
|
+
}
|
|
58
|
+
}, P = () => {
|
|
59
|
+
j();
|
|
60
|
+
};
|
|
61
|
+
return f(() => h.autoClose, (e) => {
|
|
62
|
+
O.value = e, M(), j();
|
|
63
|
+
}), s(() => {
|
|
64
|
+
M();
|
|
65
|
+
}), j(), (s, l) => (c(), t(e, { name: "fade" }, {
|
|
66
|
+
default: p(() => [E.value ? (c(), r("div", {
|
|
67
|
+
key: 0,
|
|
68
|
+
class: o(["spicyAlert", [a.variant, { spicyAlertRound: a.isRound }]]),
|
|
69
|
+
"aria-atomic": "true",
|
|
70
|
+
"aria-label": a.text || "Alert",
|
|
71
|
+
role: "alert",
|
|
72
|
+
onKeydown: m(A, ["enter"]),
|
|
73
|
+
onMouseenter: N,
|
|
74
|
+
onMouseleave: P
|
|
75
|
+
}, [
|
|
76
|
+
a.iconOnly && a.icon ? (c(), r("span", _, d(a.icon), 1)) : n("", !0),
|
|
77
|
+
a.mdi ? (c(), r("svg", v, [i("path", {
|
|
78
|
+
fill: "currentColor",
|
|
79
|
+
class: "spicyAlertMDI",
|
|
80
|
+
d: a.mdi
|
|
81
|
+
}, null, 8, y)])) : n("", !0),
|
|
82
|
+
i("div", b, [a.title ? (c(), r("span", x, d(a.title), 1)) : n("", !0), !a.iconOnly && a.text ? (c(), r("span", S, d(a.text), 1)) : n("", !0)]),
|
|
83
|
+
a.closable ? (c(), r("button", {
|
|
84
|
+
key: 2,
|
|
85
|
+
class: "spicyAlertCloseBtn",
|
|
86
|
+
onClick: A,
|
|
87
|
+
"aria-label": "Close alert"
|
|
88
|
+
}, [a.closeIcon ? (c(), r("svg", C, [i("path", {
|
|
89
|
+
fill: "#000",
|
|
90
|
+
d: a.closeIcon
|
|
91
|
+
}, null, 8, w)])) : (c(), r("span", T, "X"))])) : n("", !0),
|
|
92
|
+
a.text ? n("", !0) : u(s.$slots, "default", { key: 3 })
|
|
93
|
+
], 42, g)) : n("", !0)]),
|
|
94
|
+
_: 3
|
|
95
|
+
}));
|
|
96
|
+
}
|
|
86
97
|
});
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
};
|
|
98
|
+
//#endregion
|
|
99
|
+
export { h as n, E as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.spicyBtn{
|
|
1
|
+
.spicyBtn{text-align:center;cursor:pointer;color:var(--skTextColor,#ddd);background-color:var(--skBgColor,#28292a);font-size:var(--skFontSize,16px);font-weight:var(--skFontWeight,500);-webkit-user-select:none;user-select:none;border:none;border-radius:4px;justify-content:center;align-items:center;gap:4px;padding:8px 16px;display:flex}.spicyBtn.outlined{border:2px solid var(--skBorderColor,#515353);background-color:#0000}.spicyBtn.disabled{opacity:.3;cursor:not-allowed;pointer-events:none}.spicyBtn:hover:not(.disabled){background-color:var(--hoverColor,grey)}.spicyBtn:focus-visible{outline:2px solid var(--skTextColor,#ddd);outline-offset:2px}.spicyBtn.isRound{border-radius:50px;padding:12px}.spicyBtn.large{font-size:calc(var(--skFontSize,16px) * 1.2);padding:12px 24px}.spicyBtn.large.isRound{padding:16px}.spicyBtn.large .spicyBtnIcon{width:32px;height:32px}.spicyBtn.small{font-size:calc(var(--skFontSize,16px) * .85);padding:4px 12px}.spicyBtn.small.isRound{padding:8px}.spicyBtn.small .spicyBtnIcon{width:18px;height:18px}.spicyBtn .spicyBtnIcon{justify-content:center;align-items:center;width:22px;height:22px;display:flex}
|
|
@@ -1,77 +1,81 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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.css?inline
|
|
3
|
+
var f = ".spicyBtn{text-align:center;cursor:pointer;color:var(--skTextColor,#ddd);background-color:var(--skBgColor,#28292a);font-size:var(--skFontSize,16px);font-weight:var(--skFontWeight,500);-webkit-user-select:none;user-select:none;border:none;border-radius:4px;justify-content:center;align-items:center;gap:4px;padding:8px 16px;display:flex}.spicyBtn.outlined{border:2px solid var(--skBorderColor,#515353);background-color:#0000}.spicyBtn.disabled{opacity:.3;cursor:not-allowed;pointer-events:none}.spicyBtn:hover:not(.disabled){background-color:var(--hoverColor,grey)}.spicyBtn:focus-visible{outline:2px solid var(--skTextColor,#ddd);outline-offset:2px}.spicyBtn.isRound{border-radius:50px;padding:12px}.spicyBtn.large{font-size:calc(var(--skFontSize,16px) * 1.2);padding:12px 24px}.spicyBtn.large.isRound{padding:16px}.spicyBtn.large .spicyBtnIcon{width:32px;height:32px}.spicyBtn.small{font-size:calc(var(--skFontSize,16px) * .85);padding:4px 12px}.spicyBtn.small.isRound{padding:8px}.spicyBtn.small .spicyBtnIcon{width:18px;height:18px}.spicyBtn .spicyBtnIcon{justify-content:center;align-items:center;width:22px;height:22px;display:flex}", p = [
|
|
4
|
+
"disabled",
|
|
5
|
+
"aria-label",
|
|
6
|
+
"aria-disabled",
|
|
7
|
+
"tabindex"
|
|
8
|
+
], m = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "spicyBtnIcon",
|
|
11
|
+
viewBox: "0 0 24 24",
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
13
|
+
}, h = ["d"], g = {
|
|
14
|
+
key: 1,
|
|
15
|
+
class: "spicyBtnIcon"
|
|
16
|
+
}, _ = {
|
|
17
|
+
key: 2,
|
|
18
|
+
class: "spicyBtnText"
|
|
19
|
+
}, v = /* @__PURE__ */ i({
|
|
20
|
+
__name: "SpicyBtn",
|
|
21
|
+
props: {
|
|
22
|
+
variant: { default: "filled" },
|
|
23
|
+
disabled: {
|
|
24
|
+
type: Boolean,
|
|
25
|
+
default: !1
|
|
26
|
+
},
|
|
27
|
+
text: {},
|
|
28
|
+
icon: {},
|
|
29
|
+
mdi: {},
|
|
30
|
+
size: { default: "default" },
|
|
31
|
+
bgColor: {},
|
|
32
|
+
textColor: { default: "#ddd" },
|
|
33
|
+
hoverColor: {},
|
|
34
|
+
borderColor: {},
|
|
35
|
+
fontSize: { default: 16 },
|
|
36
|
+
fontWeight: { default: 500 },
|
|
37
|
+
ariaLabel: {}
|
|
38
|
+
},
|
|
39
|
+
emits: ["click"],
|
|
40
|
+
setup(i, { emit: f }) {
|
|
41
|
+
let v = f, y = (e) => {
|
|
42
|
+
b.disabled || v("click", e);
|
|
43
|
+
}, b = i, x = e(() => b.ariaLabel || b.text || "Button"), S = e(() => ({
|
|
44
|
+
"--skFontSize": typeof b.fontSize == "number" ? `${b.fontSize}px` : b.fontSize,
|
|
45
|
+
"--skFontWeight": b.fontWeight,
|
|
46
|
+
"--skBgColor": b.bgColor,
|
|
47
|
+
"--skTextColor": b.textColor,
|
|
48
|
+
"--skBorderColor": b.borderColor,
|
|
49
|
+
"--hoverColor": b.hoverColor
|
|
50
|
+
})), C = e(() => !b.text && (b.icon || b.mdi)), w = e(() => ({
|
|
51
|
+
spicyBtn: !0,
|
|
52
|
+
outlined: b.variant === "outlined",
|
|
53
|
+
disabled: b.disabled,
|
|
54
|
+
isRound: C.value,
|
|
55
|
+
[b.size]: b.size !== "default"
|
|
56
|
+
}));
|
|
57
|
+
return (e, f) => {
|
|
58
|
+
let v = l("spicyRipple");
|
|
59
|
+
return d((s(), n("button", {
|
|
60
|
+
class: a(w.value),
|
|
61
|
+
style: o(S.value),
|
|
62
|
+
disabled: i.disabled,
|
|
63
|
+
onClick: y,
|
|
64
|
+
role: "button",
|
|
65
|
+
"aria-label": x.value,
|
|
66
|
+
"aria-disabled": i.disabled,
|
|
67
|
+
tabindex: i.disabled ? -1 : 0
|
|
68
|
+
}, [
|
|
69
|
+
i.mdi ? (s(), n("svg", m, [r("path", {
|
|
70
|
+
fill: "currentColor",
|
|
71
|
+
class: "spicyBtnMDI",
|
|
72
|
+
d: i.mdi
|
|
73
|
+
}, null, 8, h)])) : i.icon ? (s(), n("span", g, u(i.icon), 1)) : t("", !0),
|
|
74
|
+
i.text ? (s(), n("span", _, u(i.text), 1)) : t("", !0),
|
|
75
|
+
c(e.$slots, "default")
|
|
76
|
+
], 14, p)), [[v]]);
|
|
77
|
+
};
|
|
78
|
+
}
|
|
74
79
|
});
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
};
|
|
80
|
+
//#endregion
|
|
81
|
+
export { f as n, v as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.spicyCarouselWrapper{
|
|
1
|
+
.spicyCarouselWrapper{width:var(--width,580px);height:var(--height,360px);justify-content:center;align-items:center;padding:30px;display:flex;position:relative}.spicyCarouselWrapper .spicyCarouselTitle{width:var(--width,580px);color:#ccc;background-color:#0009;height:30px;font-size:18px;font-weight:700;position:absolute;top:0}.spicyCarouselWrapper .spicyCarouselContainer{border-radius:var(--borderRadius);background-color:#0009;width:100%;height:100%;position:relative;overflow:hidden}.spicyCarouselWrapper .spicyCarouselSlide{background-position:50%;background-repeat:no-repeat;background-size:cover;width:100%;height:100%;transition:opacity .3s;position:absolute;top:0;left:0}.spicyCarouselWrapper .spicyCarouselTextOverlay{color:#ccc;text-shadow:2px 2px 4px #00000080;background-color:#000000bf;border-radius:4px;padding:10px;font-size:18px;font-weight:700;position:absolute;bottom:10px;left:10px}.spicyCarouselWrapper .spicyCarouselTextOverlay.fullScreen{text-align:center;background-color:#0000004d;justify-content:center;align-items:center;display:flex;inset:0}.spicyCarouselWrapper .spicyCarouselNavControls{pointer-events:none;justify-content:space-between;align-items:center;width:100%;height:100%;display:flex;position:absolute;top:0;left:0}.spicyCarouselWrapper .spicyCarouselNavControls .spicyCarouselPrevBtn,.spicyCarouselWrapper .spicyCarouselNavControls .spicyCarouselNextBtn{color:#ccc;cursor:pointer;pointer-events:auto;z-index:2;background:#0009;border:none;justify-content:center;align-items:center;width:30px;height:100%;font-size:24px;transition:transform .3s;display:flex}:is(.spicyCarouselWrapper .spicyCarouselNavControls .spicyCarouselPrevBtn,.spicyCarouselWrapper .spicyCarouselNavControls .spicyCarouselNextBtn):hover{background:var(--skPrimaryColor)}.spicyCarouselWrapper .spicyCarouselNavControls .spicyCarouselPrevBtn{border-radius:6px 0 0 6px}.spicyCarouselWrapper .spicyCarouselNavControls .spicyCarouselNextBtn{border-radius:0 6px 6px 0}.spicyCarouselWrapper .spicyCarouselPagination{height:30px;width:var(--width,580px);z-index:2;pointer-events:auto;background:#0009;justify-content:center;align-items:center;gap:8px;display:flex;position:absolute;bottom:0;left:50%;transform:translate(-50%)}.spicyCarouselWrapper .spicyCarouselPagination .spicyCarouselPageBtn{color:#fff;cursor:pointer;background:#00b7ff80;border:none;border-radius:50%;justify-content:center;align-items:center;width:26px;height:26px;transition:transform .3s;display:flex}.spicyCarouselWrapper .spicyCarouselPagination .spicyCarouselPageBtn.active{background:var(--activeColor,var(--skPrimaryColor))}.spicyCarouselWrapper .spicyCarouselPagination .spicyCarouselPageBtn:hover{background:var(--skPrimaryColor)}.spicyCarouselWrapper .pointCursor{cursor:pointer}.spicyCarouselWrapper .slide-enter-active,.spicyCarouselWrapper .slide-leave-active{transition:opacity .3s}.spicyCarouselWrapper .slide-enter-from,.spicyCarouselWrapper .slide-leave-to{opacity:0}
|