spicykatsu 0.4.1 → 0.8.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.
Files changed (175) hide show
  1. package/README.md +43 -7
  2. package/dist/SpicyAccordion-Cm-RI3r_.js +47 -0
  3. package/dist/SpicyAccordion-TUM16yOu.js +50 -0
  4. package/dist/SpicyAccordion.js +2 -0
  5. package/dist/SpicyAlert-BD6QHaFZ.js +100 -0
  6. package/dist/SpicyAlert-BwS5wCXQ.js +102 -0
  7. package/dist/{lib/SpicyAlert/SpicyAlert.js → SpicyAlert-Bwi92wCd.js} +17 -17
  8. package/dist/SpicyAlert.js +2 -0
  9. package/dist/{lib/SpicyBtn/SpicyBtn.js → SpicyBtn-B5nk3vCZ.js} +14 -14
  10. package/dist/SpicyBtn-DQ7A3JOM.js +80 -0
  11. package/dist/SpicyBtn.js +2 -0
  12. package/dist/SpicyCarousel-Be5oYKnj.js +121 -0
  13. package/dist/SpicyCarousel-BpRYOVoa.js +123 -0
  14. package/dist/SpicyCarousel-CkCmK2tQ.js +123 -0
  15. package/dist/SpicyCarousel-DGtg0K1L.js +123 -0
  16. package/dist/SpicyCarousel.js +2 -0
  17. package/dist/SpicyDataTable-BqoW4IZ4.js +126 -0
  18. package/dist/SpicyDataTable-CLkxtyXn.js +129 -0
  19. package/dist/SpicyDataTable-x2bGAZMS.js +129 -0
  20. package/dist/SpicyDataTable.js +2 -0
  21. package/dist/{lib/SpicyDialog/SpicyDialog.js → SpicyDialog-CKtIwcPz.js} +4 -3
  22. package/dist/SpicyDialog-P2nz6r0B.js +47 -0
  23. package/dist/SpicyDialog.js +2 -0
  24. package/dist/{lib/SpicyDivider/SpicyDivider.js → SpicyDivider-CDgC_pdd.js} +0 -0
  25. package/dist/SpicyDivider.js +2 -0
  26. package/dist/SpicyDropdown-COCmOTvv.js +66 -0
  27. package/dist/SpicyDropdown-CkpSJleZ.js +64 -0
  28. package/dist/{lib/SpicyDropdown/SpicyDropdown.js → SpicyDropdown-DLqjiK7t.js} +11 -11
  29. package/dist/SpicyDropdown-DYtCUZwE.js +67 -0
  30. package/dist/SpicyDropdown-HF7sHzZS.js +68 -0
  31. package/dist/SpicyDropdown.js +2 -0
  32. package/dist/{lib/SpicyFileInput/SpicyFileInput.js → SpicyFileInput-7dwibTqM.js} +16 -16
  33. package/dist/SpicyFileInput-Cm8fYpHV.js +139 -0
  34. package/dist/SpicyFileInput-CnO7Pecq.js +130 -0
  35. package/dist/SpicyFileInput-Dkgt7474.js +132 -0
  36. package/dist/SpicyFileInput.js +2 -0
  37. package/dist/SpicyModal-DYN8yDMt.js +96 -0
  38. package/dist/{lib/SpicyModal/SpicyModal.js → SpicyModal-Dx4dKN4V.js} +10 -10
  39. package/dist/SpicyModal.js +2 -0
  40. package/dist/SpicyProgress-62dbvFg1.js +76 -0
  41. package/dist/SpicyProgress-CjD0SCA7.js +76 -0
  42. package/dist/SpicyProgress.js +2 -0
  43. package/dist/{lib/SpicySheet/SpicySheet.js → SpicySheet-k07oHm4-.js} +4 -3
  44. package/dist/SpicySheet.js +2 -0
  45. package/dist/SpicySlider-CGNWDfwv.js +63 -0
  46. package/dist/{lib/SpicySlider/SpicySlider.js → SpicySlider-DPgJ_VLR.js} +12 -12
  47. package/dist/SpicySlider-DfkXTMmc.js +63 -0
  48. package/dist/SpicySlider.js +2 -0
  49. package/dist/{lib/SpicyTabs/SpicyTabs.js → SpicyTabs-8fPN5eaX.js} +10 -10
  50. package/dist/SpicyTabs-BHIwFnvt.js +67 -0
  51. package/dist/SpicyTabs-DmB1xuWN.js +66 -0
  52. package/dist/SpicyTabs-DrrGbixN.js +67 -0
  53. package/dist/SpicyTabs-eGAZI2BB.js +70 -0
  54. package/dist/SpicyTabs.js +2 -0
  55. package/dist/{lib/SpicyTextArea/SpicyTextArea.js → SpicyTextArea-BqgEgEyx.js} +7 -7
  56. package/dist/SpicyTextArea-CxEDRJ1P.js +41 -0
  57. package/dist/SpicyTextArea.js +2 -0
  58. package/dist/{lib/SpicyTextField/SpicyTextField.js → SpicyTextField-BMX1T6xl.js} +12 -12
  59. package/dist/SpicyTextField-sziwr-ns.js +96 -0
  60. package/dist/SpicyTextField.js +2 -0
  61. package/dist/SpicyToggle-C-JcmPvu.js +55 -0
  62. package/dist/{lib/SpicyToggle/SpicyToggle.js → SpicyToggle-DJTopuIB.js} +8 -8
  63. package/dist/SpicyToggle-DdJKYSzD.js +55 -0
  64. package/dist/SpicyToggle.js +2 -0
  65. package/dist/{lib/SpicyTooltip/SpicyTooltip.js → SpicyTooltip-8nWZNAvJ.js} +11 -11
  66. package/dist/SpicyTooltip-CE8Cg0wo.js +80 -0
  67. package/dist/SpicyTooltip-aBB5NaKu.js +81 -0
  68. package/dist/SpicyTooltip.js +2 -0
  69. package/dist/{lib/SpicyTree/SpicyTree.js → SpicyTree-BkxOQATS.js} +13 -13
  70. package/dist/SpicyTree.js +2 -0
  71. package/dist/index.js +60 -0
  72. package/dist/spicyDrag-BLiL2y_4.js +38 -0
  73. package/dist/spicyDrag-CgD0GOa9.js +38 -0
  74. package/dist/spicyDrag.js +2 -0
  75. package/dist/spicyRipple-CViURy7j.js +43 -0
  76. package/dist/spicyRipple-DHAFwamp.js +43 -0
  77. package/dist/spicyRipple-DcEibbQv.js +42 -0
  78. package/dist/spicyRipple.js +2 -0
  79. package/dist/spicykatsu.css +2 -0
  80. package/dist/spicykatsu.umd.js +1 -0
  81. package/dist/{lib/SpicyAccordion → styles}/SpicyAccordion.css +1 -1
  82. package/dist/styles/SpicyAlert.css +1 -0
  83. package/dist/{lib/SpicyBtn → styles}/SpicyBtn.css +0 -0
  84. package/dist/styles/SpicyCarousel.css +1 -0
  85. package/dist/styles/SpicyDataTable.css +1 -0
  86. package/dist/{lib/SpicyDialog → styles}/SpicyDialog.css +0 -0
  87. package/dist/{lib/SpicyDropdown → styles}/SpicyDropdown.css +1 -1
  88. package/dist/{lib/SpicyFileInput → styles}/SpicyFileInput.css +0 -0
  89. package/dist/{lib/SpicyModal → styles}/SpicyModal.css +0 -0
  90. package/dist/styles/SpicyProgress.css +1 -0
  91. package/dist/{lib/SpicySheet → styles}/SpicySheet.css +0 -0
  92. package/dist/{lib/SpicySlider → styles}/SpicySlider.css +0 -0
  93. package/dist/{lib/SpicyTabs → styles}/SpicyTabs.css +1 -1
  94. package/dist/{lib/SpicyTextArea → styles}/SpicyTextArea.css +0 -0
  95. package/dist/styles/SpicyTextField.css +1 -0
  96. package/dist/{lib/SpicyToggle → styles}/SpicyToggle.css +0 -0
  97. package/dist/{lib/SpicyTooltip → styles}/SpicyTooltip.css +0 -0
  98. package/dist/{lib/SpicyTree → styles}/SpicyTree.css +0 -0
  99. package/dist/styles/base.css +28 -0
  100. package/dist/styles/main.css +2 -0
  101. package/dist/styles/variables.css +16 -0
  102. package/dist/types/components/SpicyAccordion/SpicyAccordion.test.d.ts +1 -0
  103. package/dist/types/components/SpicyAccordion/SpicyAccordion.vue.d.ts +24 -0
  104. package/dist/types/components/SpicyAlert/SpicyAlert.test.d.ts +1 -0
  105. package/dist/types/components/SpicyAlert/SpicyAlert.vue.d.ts +35 -0
  106. package/dist/types/components/SpicyBtn/SpicyBtn.test.d.ts +1 -0
  107. package/dist/types/components/SpicyBtn/SpicyBtn.vue.d.ts +39 -0
  108. package/dist/types/components/SpicyCarousel/SpicyCarousel.test.d.ts +1 -0
  109. package/dist/types/components/SpicyCarousel/SpicyCarousel.vue.d.ts +48 -0
  110. package/dist/types/components/SpicyDataTable/SpicyDataTable.test.d.ts +1 -0
  111. package/dist/types/components/SpicyDataTable/SpicyDataTable.vue.d.ts +52 -0
  112. package/dist/types/components/SpicyDialog/SpicyDialog.test.d.ts +1 -0
  113. package/dist/types/components/SpicyDialog/SpicyDialog.vue.d.ts +28 -0
  114. package/dist/types/components/SpicyDivider/SpicyDivider.test.d.ts +1 -0
  115. package/dist/types/components/SpicyDivider/SpicyDivider.vue.d.ts +26 -0
  116. package/dist/types/components/SpicyDropdown/SpicyDropdown.test.d.ts +1 -0
  117. package/dist/types/components/SpicyDropdown/SpicyDropdown.vue.d.ts +27 -0
  118. package/dist/types/components/SpicyFileInput/SpicyFileInput.test.d.ts +1 -0
  119. package/dist/types/components/SpicyFileInput/SpicyFileInput.vue.d.ts +42 -0
  120. package/dist/types/components/SpicyModal/SpicyModal.test.d.ts +1 -0
  121. package/dist/types/components/SpicyModal/SpicyModal.vue.d.ts +62 -0
  122. package/dist/types/components/SpicyProgress/SpicyProgress.test.d.ts +1 -0
  123. package/dist/types/components/SpicyProgress/SpicyProgress.vue.d.ts +31 -0
  124. package/dist/types/components/SpicySheet/SpicySheet.test.d.ts +1 -0
  125. package/dist/types/components/SpicySheet/SpicySheet.vue.d.ts +24 -0
  126. package/dist/types/components/SpicySlider/SpicySlider.test.d.ts +1 -0
  127. package/dist/types/components/SpicySlider/SpicySlider.vue.d.ts +34 -0
  128. package/dist/types/components/SpicyTabs/SpicyTabs.test.d.ts +1 -0
  129. package/dist/types/components/SpicyTabs/SpicyTabs.vue.d.ts +24 -0
  130. package/dist/types/components/SpicyTextArea/SpicyTextArea.test.d.ts +1 -0
  131. package/dist/types/components/SpicyTextArea/SpicyTextArea.vue.d.ts +32 -0
  132. package/dist/types/components/SpicyTextField/SpicyTextField.test.d.ts +1 -0
  133. package/dist/types/components/SpicyTextField/SpicyTextField.vue.d.ts +42 -0
  134. package/dist/types/components/SpicyToggle/SpicyToggle.test.d.ts +1 -0
  135. package/dist/types/components/SpicyToggle/SpicyToggle.vue.d.ts +22 -0
  136. package/dist/types/components/SpicyTooltip/SpicyTooltip.test.d.ts +1 -0
  137. package/dist/types/components/SpicyTooltip/SpicyTooltip.vue.d.ts +24 -0
  138. package/dist/types/components/SpicyTree/SpicyTree.test.d.ts +1 -0
  139. package/dist/types/components/SpicyTree/SpicyTree.vue.d.ts +13 -0
  140. package/dist/types/components/SpicyTree/SpicyTreeNode.vue.d.ts +13 -0
  141. package/dist/types/directives/spicyDrag.d.ts +6 -0
  142. package/dist/types/directives/spicyRipple.d.ts +2 -0
  143. package/dist/types/entries/SpicyAccordion.d.ts +2 -0
  144. package/dist/types/entries/SpicyAlert.d.ts +2 -0
  145. package/dist/types/entries/SpicyBtn.d.ts +2 -0
  146. package/dist/types/entries/SpicyCarousel.d.ts +2 -0
  147. package/dist/types/entries/SpicyDataTable.d.ts +2 -0
  148. package/dist/types/entries/SpicyDialog.d.ts +2 -0
  149. package/dist/types/entries/SpicyDivider.d.ts +2 -0
  150. package/dist/types/entries/SpicyDropdown.d.ts +2 -0
  151. package/dist/types/entries/SpicyFileInput.d.ts +2 -0
  152. package/dist/types/entries/SpicyModal.d.ts +2 -0
  153. package/dist/types/entries/SpicyProgress.d.ts +2 -0
  154. package/dist/types/entries/SpicySheet.d.ts +2 -0
  155. package/dist/types/entries/SpicySlider.d.ts +2 -0
  156. package/dist/types/entries/SpicyTabs.d.ts +2 -0
  157. package/dist/types/entries/SpicyTextArea.d.ts +2 -0
  158. package/dist/types/entries/SpicyTextField.d.ts +2 -0
  159. package/dist/types/entries/SpicyToggle.d.ts +2 -0
  160. package/dist/types/entries/SpicyTooltip.d.ts +2 -0
  161. package/dist/types/entries/SpicyTree.d.ts +3 -0
  162. package/dist/types/entries/spicyDrag.d.ts +2 -0
  163. package/dist/types/entries/spicyRipple.d.ts +2 -0
  164. package/dist/types/index.d.ts +34 -0
  165. package/dist/types/umd.d.ts +3 -0
  166. package/package.json +158 -52
  167. package/dist/lib/SpicyAccordion/SpicyAccordion.js +0 -47
  168. package/dist/lib/SpicyAlert/SpicyAlert.css +0 -1
  169. package/dist/lib/SpicyCarousel/SpicyCarousel.css +0 -1
  170. package/dist/lib/SpicyCarousel/SpicyCarousel.js +0 -121
  171. package/dist/lib/SpicyDataTable/SpicyDataTable.css +0 -1
  172. package/dist/lib/SpicyDataTable/SpicyDataTable.js +0 -196
  173. package/dist/lib/SpicyProgress/SpicyProgress.js +0 -4
  174. package/dist/lib/SpicyTextField/SpicyTextField.css +0 -1
  175. package/dist/spicykatsu.es.js +0 -148
package/README.md CHANGED
@@ -14,6 +14,10 @@ npm install spicykatsu
14
14
 
15
15
  ## Usage
16
16
 
17
+ ### Full Install (Recommended)
18
+
19
+ All components, styles, and directives are registered automatically. No extra imports needed.
20
+
17
21
  ```ts
18
22
  import { createApp } from 'vue'
19
23
  import App from './App.vue'
@@ -24,30 +28,62 @@ app.use(SpicyKatsu)
24
28
  app.mount('#app')
25
29
  ```
26
30
 
27
- Styles are automatically injected when you call `app.use(SpicyKatsu)` — no CSS import needed.
31
+ ### Tree-Shakeable (For production optimization)
28
32
 
29
- You can also import components individually for JS tree-shaking:
33
+ Import only the components and directives you need. Each component's CSS is bundled automatically via its `<style>` block. However, you **must** also import the CSS variables so components look correct.
30
34
 
31
35
  ```ts
32
- import { SpicyBtn, SpicyModal } from 'spicykatsu'
36
+ import { createApp } from 'vue'
37
+ import App from './App.vue'
38
+ import { SpicyBtn, SpicyModal } from 'spicykatsu/SpicyBtn'
39
+ import { spicyRipple } from 'spicykatsu/spicyRipple'
40
+
41
+ // Import CSS variables (required for components to look correct)
42
+ import 'spicykatsu/styles/variables'
43
+
44
+ const app = createApp(App)
45
+ app.component('SpicyBtn', SpicyBtn)
46
+ app.component('SpicyModal', SpicyModal)
47
+ app.directive('spicyRipple', spicyRipple)
48
+ app.mount('#app')
33
49
  ```
34
50
 
35
- For CSS tree-shaking, set `useStyles: false` and import only what you need:
51
+ You can also import base utility styles if you use `.spicyText`, `.spicyHeader`, or `.spicyLink` classes:
36
52
 
37
53
  ```ts
38
- import 'spicykatsu/dist/lib/SpicyBtn/SpicyBtn.css'
54
+ import 'spicykatsu/styles/base'
39
55
  ```
40
56
 
41
- ## Options
57
+ Or import all styles at once:
58
+
59
+ ```ts
60
+ import 'spicykatsu/styles'
61
+ ```
62
+
63
+ ### Plugin with selective options
64
+
65
+ You can also use the plugin with options to control what gets registered:
42
66
 
43
67
  ```ts
44
68
  app.use(SpicyKatsu, {
45
69
  useComponents: true, // Register all components globally (default: true)
46
- useStyles: true, // Inject all component styles into <head> (default: true)
70
+ useStyles: true, // Inject all styles into <head> (default: true)
47
71
  useDirectives: true // Register v-spicyDrag and v-spicyRipple (default: true)
48
72
  })
49
73
  ```
50
74
 
75
+ Set any to `false` to opt out of that part. For example, to register components yourself but still get styles injected:
76
+
77
+ ```ts
78
+ app.use(SpicyKatsu, { useComponents: false })
79
+ ```
80
+
81
+ To inject only CSS variables (useful when tree-shaking components but still using the plugin for style injection):
82
+
83
+ ```ts
84
+ app.use(SpicyKatsu, { useComponents: false, useStyles: 'variables' })
85
+ ```
86
+
51
87
  ## Components
52
88
 
53
89
  | Component | Description |
@@ -0,0 +1,47 @@
1
+ import { Fragment as e, Transition as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, createVNode as a, defineComponent as o, normalizeClass as s, openBlock as c, ref as l, renderList as u, renderSlot as d, toDisplayString as f, vShow as p, withCtx as m, withDirectives as h } from "vue";
2
+ //#region src/components/SpicyAccordion/SpicyAccordion.vue?vue&type=script&setup=true&lang.ts
3
+ var g = { class: "spicyAccordion" }, _ = ["onClick", "aria-expanded"], v = {
4
+ key: 0,
5
+ class: "accordionIcon",
6
+ viewBox: "0 0 24 24",
7
+ xmlns: "http://www.w3.org/2000/svg"
8
+ }, y = ["d"], b = { class: "spicyAccordionContent" }, x = /* @__PURE__ */ o({
9
+ __name: "SpicyAccordion",
10
+ props: {
11
+ sections: {},
12
+ singleOpen: {
13
+ type: Boolean,
14
+ default: !1
15
+ },
16
+ defaultOpen: {}
17
+ },
18
+ setup(o) {
19
+ let x = o, S = l(x.defaultOpen || []), C = (e) => {
20
+ if (x.singleOpen) S.value = S.value.includes(e) ? [] : [e];
21
+ else {
22
+ let t = S.value.indexOf(e);
23
+ t === -1 ? S.value.push(e) : S.value.splice(t, 1);
24
+ }
25
+ }, w = (e) => S.value.includes(e);
26
+ return (l, x) => (c(), r("div", g, [(c(!0), r(e, null, u(o.sections, (e, o) => (c(), r("div", {
27
+ key: o,
28
+ class: "spicyAccordionItem"
29
+ }, [i("button", {
30
+ class: s(["spicyAccordionHeader", { open: w(o) }]),
31
+ onClick: (e) => C(o),
32
+ "aria-expanded": w(o)
33
+ }, [
34
+ i("span", null, f(e.title), 1),
35
+ e.icon ? (c(), r("svg", v, [i("path", { d: e.icon }, null, 8, y)])) : n("", !0),
36
+ x[0] ||= i("span", { class: "accordionToggle" }, [i("svg", {
37
+ class: "accordionArrow",
38
+ viewBox: "0 0 24 24"
39
+ }, [i("path", { d: "M7 10l5 5 5-5H7z" })])], -1)
40
+ ], 10, _), a(t, { name: "fade" }, {
41
+ default: m(() => [h(i("div", b, [d(l.$slots, `section-${o}`)], 512), [[p, w(o)]])]),
42
+ _: 2
43
+ }, 1024)]))), 128))]));
44
+ }
45
+ });
46
+ //#endregion
47
+ export { x as t };
@@ -0,0 +1,50 @@
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, withCtx as p } from "vue";
2
+ //#region src/components/SpicyAccordion/SpicyAccordion.vue?vue&type=script&setup=true&lang.ts
3
+ var m = { class: "spicyAccordion" }, h = ["onClick", "aria-expanded"], g = {
4
+ key: 0,
5
+ class: "accordionIcon",
6
+ viewBox: "0 0 24 24",
7
+ xmlns: "http://www.w3.org/2000/svg"
8
+ }, _ = ["d"], v = {
9
+ key: 0,
10
+ class: "spicyAccordionContent"
11
+ }, y = /* @__PURE__ */ o({
12
+ __name: "SpicyAccordion",
13
+ props: {
14
+ sections: {},
15
+ singleOpen: {
16
+ type: Boolean,
17
+ default: !1
18
+ },
19
+ defaultOpen: {}
20
+ },
21
+ setup(o) {
22
+ let y = o, b = l(y.defaultOpen || []), x = (e) => {
23
+ if (y.singleOpen) b.value = b.value.includes(e) ? [] : [e];
24
+ else {
25
+ let t = b.value.indexOf(e);
26
+ t === -1 ? b.value.push(e) : b.value.splice(t, 1);
27
+ }
28
+ }, S = (e) => b.value.includes(e);
29
+ return (l, y) => (c(), r("div", m, [(c(!0), r(e, null, u(o.sections, (e, o) => (c(), r("div", {
30
+ key: o,
31
+ class: "spicyAccordionItem"
32
+ }, [i("button", {
33
+ class: s(["spicyAccordionHeader", { open: S(o) }]),
34
+ onClick: (e) => x(o),
35
+ "aria-expanded": S(o)
36
+ }, [
37
+ i("span", null, f(e.title), 1),
38
+ e.icon ? (c(), r("svg", g, [i("path", { d: e.icon }, null, 8, _)])) : n("", !0),
39
+ y[0] ||= i("span", { class: "accordionToggle" }, [i("svg", {
40
+ class: "accordionArrow",
41
+ viewBox: "0 0 24 24"
42
+ }, [i("path", { d: "M7 10l5 5 5-5H7z" })])], -1)
43
+ ], 10, h), a(t, { name: "accordion-slide" }, {
44
+ default: p(() => [S(o) ? (c(), r("div", v, [d(l.$slots, `section-${o}`)])) : n("", !0)]),
45
+ _: 2
46
+ }, 1024)]))), 128))]));
47
+ }
48
+ });
49
+ //#endregion
50
+ export { y as t };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./SpicyAccordion-TUM16yOu.js";
2
+ export { e as SpicyAccordion, e as default };
@@ -0,0 +1,100 @@
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.vue?vue&type=script&setup=true&lang.ts
3
+ var h = ["aria-label"], g = {
4
+ key: 0,
5
+ class: "spicyAlertIcon"
6
+ }, _ = {
7
+ key: 1,
8
+ class: "spicyAlertIcon",
9
+ viewBox: "0 0 24 24",
10
+ xmlns: "http://www.w3.org/2000/svg"
11
+ }, v = ["d"], y = { class: "spicyAlertContainer" }, b = {
12
+ key: 0,
13
+ class: "spicyAlertTitle"
14
+ }, x = {
15
+ key: 1,
16
+ class: "spicyAlertText"
17
+ }, S = {
18
+ key: 0,
19
+ viewBox: "0 0 24 24",
20
+ xmlns: "http://www.w3.org/2000/svg"
21
+ }, C = ["d"], w = { key: 1 }, T = /* @__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
+ emits: ["close"],
45
+ setup(a, { emit: T }) {
46
+ let E = a, D = T, O = l(!0), k = null, A = l(E.autoClose), j = null, M = () => {
47
+ O.value = !1, D("close");
48
+ }, N = () => {
49
+ A.value > 0 && (j = Date.now(), k = setTimeout(() => {
50
+ M();
51
+ }, A.value));
52
+ }, P = () => {
53
+ k &&= (clearTimeout(k), null);
54
+ }, F = () => {
55
+ if (k && j !== null) {
56
+ let e = Date.now() - j;
57
+ A.value = Math.max(0, A.value - e), P(), j = null;
58
+ }
59
+ }, I = () => {
60
+ N();
61
+ };
62
+ return f(() => E.autoClose, (e) => {
63
+ A.value = e, P(), N();
64
+ }), s(() => {
65
+ P();
66
+ }), N(), (s, l) => (c(), t(e, { name: "fade" }, {
67
+ default: p(() => [O.value ? (c(), r("div", {
68
+ key: 0,
69
+ class: o(["spicyAlert", [a.variant, { spicyAlertRound: a.isRound }]]),
70
+ "aria-atomic": "true",
71
+ "aria-label": a.text || "Alert",
72
+ role: "alert",
73
+ onKeydown: m(M, ["enter"]),
74
+ onMouseenter: F,
75
+ onMouseleave: I
76
+ }, [
77
+ a.iconOnly && a.icon ? (c(), r("span", g, d(a.icon), 1)) : n("", !0),
78
+ a.mdi ? (c(), r("svg", _, [i("path", {
79
+ fill: "currentColor",
80
+ class: "spicyAlertMDI",
81
+ d: a.mdi
82
+ }, null, 8, v)])) : n("", !0),
83
+ i("div", y, [a.title ? (c(), r("span", b, d(a.title), 1)) : n("", !0), !a.iconOnly && a.text ? (c(), r("span", x, d(a.text), 1)) : n("", !0)]),
84
+ a.closable ? (c(), r("button", {
85
+ key: 2,
86
+ class: "spicyAlertCloseBtn",
87
+ onClick: M,
88
+ "aria-label": "Close alert"
89
+ }, [a.closeIcon ? (c(), r("svg", S, [i("path", {
90
+ fill: "#000",
91
+ d: a.closeIcon
92
+ }, null, 8, C)])) : (c(), r("span", w, "X"))])) : n("", !0),
93
+ a.text ? n("", !0) : u(s.$slots, "default", { key: 3 })
94
+ ], 42, h)) : n("", !0)]),
95
+ _: 3
96
+ }));
97
+ }
98
+ });
99
+ //#endregion
100
+ export { T as t };
@@ -0,0 +1,102 @@
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, onMounted as c, openBlock as l, ref as u, renderSlot as d, toDisplayString as f, watch as p, withCtx as m, withKeys as h } from "vue";
2
+ //#region src/components/SpicyAlert/SpicyAlert.vue?vue&type=script&setup=true&lang.ts
3
+ var 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
+ emits: ["close"],
45
+ setup(a, { emit: E }) {
46
+ let D = a, O = E, k = u(!0), A = null, j = u(D.autoClose), M = null, N = () => {
47
+ k.value = !1, O("close");
48
+ }, P = () => {
49
+ j.value > 0 && (M = Date.now(), A = setTimeout(() => {
50
+ N();
51
+ }, j.value));
52
+ }, F = () => {
53
+ A &&= (clearTimeout(A), null);
54
+ }, I = () => {
55
+ if (A && M !== null) {
56
+ let e = Date.now() - M;
57
+ j.value = Math.max(0, j.value - e), F(), M = null;
58
+ }
59
+ }, L = () => {
60
+ P();
61
+ };
62
+ return p(() => D.autoClose, (e) => {
63
+ j.value = e, F(), P();
64
+ }), s(() => {
65
+ F();
66
+ }), c(() => {
67
+ P();
68
+ }), (s, c) => (l(), t(e, { name: "fade" }, {
69
+ default: m(() => [k.value ? (l(), r("div", {
70
+ key: 0,
71
+ class: o(["spicyAlert", [a.variant, { spicyAlertRound: a.isRound }]]),
72
+ "aria-atomic": "true",
73
+ "aria-label": a.text || "Alert",
74
+ role: "alert",
75
+ onKeydown: h(N, ["enter"]),
76
+ onMouseenter: I,
77
+ onMouseleave: L
78
+ }, [
79
+ a.iconOnly && a.icon ? (l(), r("span", _, f(a.icon), 1)) : n("", !0),
80
+ a.mdi ? (l(), r("svg", v, [i("path", {
81
+ fill: "currentColor",
82
+ class: "spicyAlertMDI",
83
+ d: a.mdi
84
+ }, null, 8, y)])) : n("", !0),
85
+ i("div", b, [a.title ? (l(), r("span", x, f(a.title), 1)) : n("", !0), !a.iconOnly && a.text ? (l(), r("span", S, f(a.text), 1)) : n("", !0)]),
86
+ a.closable ? (l(), r("button", {
87
+ key: 2,
88
+ class: "spicyAlertCloseBtn",
89
+ onClick: N,
90
+ "aria-label": "Close alert"
91
+ }, [a.closeIcon ? (l(), r("svg", C, [i("path", {
92
+ fill: "#000",
93
+ d: a.closeIcon
94
+ }, null, 8, w)])) : (l(), r("span", T, "X"))])) : n("", !0),
95
+ a.text ? n("", !0) : d(s.$slots, "default", { key: 3 })
96
+ ], 42, g)) : n("", !0)]),
97
+ _: 3
98
+ }));
99
+ }
100
+ });
101
+ //#endregion
102
+ export { E as t };
@@ -1,24 +1,24 @@
1
1
  import { Transition as e, createBlock as t, createCommentVNode as n, createElementBlock as r, createElementVNode as i, defineComponent as a, normalizeClass as o, onBeforeUnmount as s, openBlock as c, ref as l, renderSlot as u, toDisplayString as d, watch as f, withCtx as p, withKeys as m } from "vue";
2
- //#region src/components/SpicyAlert/SpicyAlert.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"], _ = {
2
+ //#region src/components/SpicyAlert/SpicyAlert.vue?vue&type=script&setup=true&lang.ts
3
+ var h = ["aria-label"], g = {
4
4
  key: 0,
5
5
  class: "spicyAlertIcon"
6
- }, v = {
6
+ }, _ = {
7
7
  key: 1,
8
8
  class: "spicyAlertIcon",
9
9
  viewBox: "0 0 24 24",
10
10
  xmlns: "http://www.w3.org/2000/svg"
11
- }, y = ["d"], b = { class: "spicyAlertContainer" }, x = {
11
+ }, v = ["d"], y = { class: "spicyAlertContainer" }, b = {
12
12
  key: 0,
13
13
  class: "spicyAlertTitle"
14
- }, S = {
14
+ }, x = {
15
15
  key: 1,
16
16
  class: "spicyAlertText"
17
- }, C = {
17
+ }, S = {
18
18
  key: 0,
19
19
  viewBox: "0 0 24 24",
20
20
  xmlns: "http://www.w3.org/2000/svg"
21
- }, w = ["d"], T = { key: 1 }, E = /* @__PURE__ */ a({
21
+ }, C = ["d"], w = { key: 1 }, T = /* @__PURE__ */ a({
22
22
  __name: "SpicyAlert",
23
23
  props: {
24
24
  variant: { default: "info" },
@@ -42,7 +42,7 @@ var h = ".spicyAlert{align-items:center;gap:10px;padding:12px;display:flex}.spic
42
42
  }
43
43
  },
44
44
  setup(a) {
45
- let h = a, E = l(!0), D = null, O = l(h.autoClose), k = null, A = () => {
45
+ let T = a, E = l(!0), D = null, O = l(T.autoClose), k = null, A = () => {
46
46
  E.value = !1;
47
47
  }, j = () => {
48
48
  O.value > 0 && (k = Date.now(), D = setTimeout(() => {
@@ -58,7 +58,7 @@ var h = ".spicyAlert{align-items:center;gap:10px;padding:12px;display:flex}.spic
58
58
  }, P = () => {
59
59
  j();
60
60
  };
61
- return f(() => h.autoClose, (e) => {
61
+ return f(() => T.autoClose, (e) => {
62
62
  O.value = e, M(), j();
63
63
  }), s(() => {
64
64
  M();
@@ -73,27 +73,27 @@ var h = ".spicyAlert{align-items:center;gap:10px;padding:12px;display:flex}.spic
73
73
  onMouseenter: N,
74
74
  onMouseleave: P
75
75
  }, [
76
- a.iconOnly && a.icon ? (c(), r("span", _, d(a.icon), 1)) : n("", !0),
77
- a.mdi ? (c(), r("svg", v, [i("path", {
76
+ a.iconOnly && a.icon ? (c(), r("span", g, d(a.icon), 1)) : n("", !0),
77
+ a.mdi ? (c(), r("svg", _, [i("path", {
78
78
  fill: "currentColor",
79
79
  class: "spicyAlertMDI",
80
80
  d: a.mdi
81
- }, null, 8, 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)]),
81
+ }, null, 8, v)])) : n("", !0),
82
+ i("div", y, [a.title ? (c(), r("span", b, d(a.title), 1)) : n("", !0), !a.iconOnly && a.text ? (c(), r("span", x, d(a.text), 1)) : n("", !0)]),
83
83
  a.closable ? (c(), r("button", {
84
84
  key: 2,
85
85
  class: "spicyAlertCloseBtn",
86
86
  onClick: A,
87
87
  "aria-label": "Close alert"
88
- }, [a.closeIcon ? (c(), r("svg", C, [i("path", {
88
+ }, [a.closeIcon ? (c(), r("svg", S, [i("path", {
89
89
  fill: "#000",
90
90
  d: a.closeIcon
91
- }, null, 8, w)])) : (c(), r("span", T, "X"))])) : n("", !0),
91
+ }, null, 8, C)])) : (c(), r("span", w, "X"))])) : n("", !0),
92
92
  a.text ? n("", !0) : u(s.$slots, "default", { key: 3 })
93
- ], 42, g)) : n("", !0)]),
93
+ ], 42, h)) : n("", !0)]),
94
94
  _: 3
95
95
  }));
96
96
  }
97
97
  });
98
98
  //#endregion
99
- export { h as n, E as t };
99
+ export { T as t };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./SpicyAlert-BwS5wCXQ.js";
2
+ export { e as SpicyAlert, e as default };
@@ -1,22 +1,22 @@
1
1
  import { computed as e, createCommentVNode as t, createElementBlock as n, createElementVNode as r, defineComponent as i, normalizeClass as a, normalizeStyle as o, openBlock as s, renderSlot as c, resolveDirective as l, toDisplayString as u, withDirectives as d } from "vue";
2
- //#region src/components/SpicyBtn/SpicyBtn.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 = [
2
+ //#region src/components/SpicyBtn/SpicyBtn.vue?vue&type=script&setup=true&lang.ts
3
+ var f = [
4
4
  "disabled",
5
5
  "aria-label",
6
6
  "aria-disabled",
7
7
  "tabindex"
8
- ], m = {
8
+ ], p = {
9
9
  key: 0,
10
10
  class: "spicyBtnIcon",
11
11
  viewBox: "0 0 24 24",
12
12
  xmlns: "http://www.w3.org/2000/svg"
13
- }, h = ["d"], g = {
13
+ }, m = ["d"], h = {
14
14
  key: 1,
15
15
  class: "spicyBtnIcon"
16
- }, _ = {
16
+ }, g = {
17
17
  key: 2,
18
18
  class: "spicyBtnText"
19
- }, v = /* @__PURE__ */ i({
19
+ }, _ = /* @__PURE__ */ i({
20
20
  __name: "SpicyBtn",
21
21
  props: {
22
22
  variant: { default: "filled" },
@@ -37,8 +37,8 @@ var f = ".spicyBtn{text-align:center;cursor:pointer;color:var(--skTextColor,#ddd
37
37
  ariaLabel: {}
38
38
  },
39
39
  emits: ["click"],
40
- setup(i, { emit: f }) {
41
- let v = f, y = (e) => {
40
+ setup(i, { emit: _ }) {
41
+ let v = _, y = (e) => {
42
42
  b.disabled || v("click", e);
43
43
  }, b = i, x = e(() => b.ariaLabel || b.text || "Button"), S = e(() => ({
44
44
  "--skFontSize": typeof b.fontSize == "number" ? `${b.fontSize}px` : b.fontSize,
@@ -54,7 +54,7 @@ var f = ".spicyBtn{text-align:center;cursor:pointer;color:var(--skTextColor,#ddd
54
54
  isRound: C.value,
55
55
  [b.size]: b.size !== "default"
56
56
  }));
57
- return (e, f) => {
57
+ return (e, _) => {
58
58
  let v = l("spicyRipple");
59
59
  return d((s(), n("button", {
60
60
  class: a(w.value),
@@ -66,16 +66,16 @@ var f = ".spicyBtn{text-align:center;cursor:pointer;color:var(--skTextColor,#ddd
66
66
  "aria-disabled": i.disabled,
67
67
  tabindex: i.disabled ? -1 : 0
68
68
  }, [
69
- i.mdi ? (s(), n("svg", m, [r("path", {
69
+ i.mdi ? (s(), n("svg", p, [r("path", {
70
70
  fill: "currentColor",
71
71
  class: "spicyBtnMDI",
72
72
  d: i.mdi
73
- }, null, 8, 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),
73
+ }, null, 8, m)])) : i.icon ? (s(), n("span", h, u(i.icon), 1)) : t("", !0),
74
+ i.text ? (s(), n("span", g, u(i.text), 1)) : t("", !0),
75
75
  c(e.$slots, "default")
76
- ], 14, p)), [[v]]);
76
+ ], 14, f)), [[v]]);
77
77
  };
78
78
  }
79
79
  });
80
80
  //#endregion
81
- export { f as n, v as t };
81
+ export { _ as t };
@@ -0,0 +1,80 @@
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.vue?vue&type=script&setup=true&lang.ts
3
+ var f = [
4
+ "disabled",
5
+ "aria-label",
6
+ "aria-disabled",
7
+ "tabindex"
8
+ ], p = {
9
+ key: 0,
10
+ class: "spicyBtnIcon",
11
+ viewBox: "0 0 24 24",
12
+ xmlns: "http://www.w3.org/2000/svg"
13
+ }, m = ["d"], h = {
14
+ key: 1,
15
+ class: "spicyBtnIcon"
16
+ }, g = {
17
+ key: 2,
18
+ class: "spicyBtnText"
19
+ }, _ = /* @__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: _ }) {
41
+ let v = _, 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, _) => {
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
+ "aria-label": x.value,
65
+ "aria-disabled": i.disabled,
66
+ tabindex: i.disabled ? -1 : 0
67
+ }, [
68
+ i.mdi ? (s(), n("svg", p, [r("path", {
69
+ fill: "currentColor",
70
+ class: "spicyBtnMDI",
71
+ d: i.mdi
72
+ }, null, 8, m)])) : i.icon ? (s(), n("span", h, u(i.icon), 1)) : t("", !0),
73
+ i.text ? (s(), n("span", g, u(i.text), 1)) : t("", !0),
74
+ c(e.$slots, "default")
75
+ ], 14, f)), [[v]]);
76
+ };
77
+ }
78
+ });
79
+ //#endregion
80
+ export { _ as t };
@@ -0,0 +1,2 @@
1
+ import { t as e } from "./SpicyBtn-DQ7A3JOM.js";
2
+ export { e as SpicyBtn, e as default };