veloce-vue 0.20.0 → 0.22.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 (255) hide show
  1. package/_virtual/_plugin-vue_export-helper.js +9 -0
  2. package/components/Accordion.vue.d.ts +19 -1
  3. package/components/Accordion.vue.js +91 -0
  4. package/components/Accordion.vue2.js +4 -0
  5. package/components/Badge.vue.d.ts +1 -0
  6. package/components/Badge.vue.js +47 -0
  7. package/components/Badge.vue2.js +4 -0
  8. package/components/Button.vue.d.ts +16 -8
  9. package/components/Button.vue.js +7 -0
  10. package/components/Button.vue2.js +114 -0
  11. package/components/Checkbox.vue.d.ts +6 -7
  12. package/components/Checkbox.vue.js +98 -0
  13. package/components/Checkbox.vue2.js +4 -0
  14. package/components/Chip.vue.d.ts +6 -7
  15. package/components/Chip.vue.js +61 -0
  16. package/components/Chip.vue2.js +4 -0
  17. package/components/Drawer.vue.js +94 -0
  18. package/components/Drawer.vue2.js +4 -0
  19. package/components/Fieldset.vue.d.ts +6 -7
  20. package/components/Fieldset.vue.js +49 -0
  21. package/components/Fieldset.vue2.js +4 -0
  22. package/components/Input.vue.d.ts +11 -12
  23. package/components/Input.vue.js +106 -0
  24. package/components/Input.vue2.js +4 -0
  25. package/components/JsonRenderer.vue.d.ts +14 -0
  26. package/components/JsonRenderer.vue.js +63 -0
  27. package/components/JsonRenderer.vue2.js +4 -0
  28. package/components/Layout.vue.js +83 -0
  29. package/components/Layout.vue2.js +4 -0
  30. package/components/Message.vue.d.ts +97 -8
  31. package/components/Message.vue.js +109 -0
  32. package/components/Message.vue2.js +4 -0
  33. package/components/MiniEditor.vue.d.ts +12 -0
  34. package/components/MiniEditor.vue.js +132 -0
  35. package/components/MiniEditor.vue2.js +4 -0
  36. package/components/Modal.vue.js +73 -0
  37. package/components/Modal.vue2.js +4 -0
  38. package/components/Popover.vue.js +78 -0
  39. package/components/Popover.vue2.js +4 -0
  40. package/components/ProgressBar.vue.js +51 -0
  41. package/components/ProgressBar.vue2.js +4 -0
  42. package/components/ProgressSpinner.vue.js +47 -0
  43. package/components/ProgressSpinner.vue2.js +4 -0
  44. package/components/RangeSlider.vue.js +61 -0
  45. package/components/RangeSlider.vue2.js +4 -0
  46. package/components/Select.vue.js +129 -0
  47. package/components/Select.vue2.js +4 -0
  48. package/components/Separator.vue.d.ts +8 -9
  49. package/components/Separator.vue.js +74 -0
  50. package/components/Separator.vue2.js +4 -0
  51. package/components/Skeleton.vue.d.ts +1 -1
  52. package/components/Skeleton.vue.js +7 -0
  53. package/components/Skeleton.vue2.js +24 -0
  54. package/components/Switch.vue.js +48 -0
  55. package/components/Switch.vue2.js +4 -0
  56. package/components/Tooltip.vue.js +35 -0
  57. package/components/Tooltip.vue2.js +4 -0
  58. package/components/icon/Icon.vue.d.ts +2 -3
  59. package/components/icon/Icon.vue.js +21 -0
  60. package/components/icon/Icon.vue2.js +4 -0
  61. package/components/icon/icons.d.ts +139 -139
  62. package/components/typography/Blockquote.vue.d.ts +151 -0
  63. package/components/typography/Blockquote.vue.js +55 -0
  64. package/components/typography/Blockquote.vue2.js +4 -0
  65. package/components/typography/Code.vue.d.ts +160 -0
  66. package/components/typography/Code.vue.js +74 -0
  67. package/components/typography/Code.vue2.js +4 -0
  68. package/components/typography/H1.vue.d.ts +151 -0
  69. package/components/typography/H1.vue.js +55 -0
  70. package/components/typography/H1.vue2.js +4 -0
  71. package/components/typography/H2.vue.d.ts +151 -0
  72. package/components/typography/H2.vue.js +55 -0
  73. package/components/typography/H2.vue2.js +4 -0
  74. package/components/typography/H3.vue.d.ts +151 -0
  75. package/components/typography/H3.vue.js +55 -0
  76. package/components/typography/H3.vue2.js +4 -0
  77. package/components/typography/H4.vue.d.ts +151 -0
  78. package/components/typography/H4.vue.js +55 -0
  79. package/components/typography/H4.vue2.js +4 -0
  80. package/components/typography/H5.vue.d.ts +151 -0
  81. package/components/typography/H5.vue.js +55 -0
  82. package/components/typography/H5.vue2.js +4 -0
  83. package/components/typography/H6.vue.d.ts +151 -0
  84. package/components/typography/H6.vue.js +55 -0
  85. package/components/typography/H6.vue2.js +4 -0
  86. package/components/typography/Label.vue.d.ts +160 -0
  87. package/components/typography/Label.vue.js +61 -0
  88. package/components/typography/Label.vue2.js +4 -0
  89. package/components/typography/List.vue.d.ts +123 -0
  90. package/components/typography/List.vue.js +60 -0
  91. package/components/typography/List.vue2.js +4 -0
  92. package/components/typography/P.vue.d.ts +151 -0
  93. package/components/typography/P.vue.js +55 -0
  94. package/components/typography/P.vue2.js +4 -0
  95. package/components/typography/Span.vue.d.ts +151 -0
  96. package/components/typography/Span.vue.js +55 -0
  97. package/components/typography/Span.vue2.js +4 -0
  98. package/config.js +2 -14
  99. package/exports/composables.d.ts +1 -0
  100. package/exports/icons.d.ts +2 -1
  101. package/exports/toast.d.ts +4 -0
  102. package/exports/types.d.ts +56 -3
  103. package/exports/typography.d.ts +12 -0
  104. package/exports/ui.d.ts +2 -0
  105. package/exports/utils.d.ts +3 -0
  106. package/icons/Alert.vue.js +31 -0
  107. package/icons/AlertCircle.vue.js +31 -0
  108. package/icons/Archive.vue.js +33 -0
  109. package/icons/ArrowDown.vue.js +26 -0
  110. package/icons/ArrowLeft.vue.js +26 -0
  111. package/icons/ArrowRight.vue.js +26 -0
  112. package/icons/ArrowUp.vue.js +26 -0
  113. package/icons/AtSign.vue.js +30 -0
  114. package/icons/Bell.vue.js +26 -0
  115. package/icons/Bold.vue.js +20 -0
  116. package/icons/Bookmark.vue.js +25 -0
  117. package/icons/Camera.vue.js +30 -0
  118. package/icons/Check.vue.js +20 -0
  119. package/icons/CheckCircle.vue.js +26 -0
  120. package/icons/CheckSquare.vue.js +26 -0
  121. package/icons/ChevronDown.vue.js +20 -0
  122. package/icons/ChevronLeft.vue.js +25 -0
  123. package/icons/ChevronRight.vue.js +25 -0
  124. package/icons/ChevronUp.vue.js +25 -0
  125. package/icons/Circle.vue.js +29 -0
  126. package/icons/Clock.vue.js +30 -0
  127. package/icons/Close.vue.js +20 -0
  128. package/icons/Cloud.vue.js +25 -0
  129. package/icons/CloudDownload.vue.js +27 -0
  130. package/icons/CloudUpload.vue.js +27 -0
  131. package/icons/Code.vue.js +26 -0
  132. package/icons/Command.vue.js +26 -0
  133. package/icons/Copy.vue.js +33 -0
  134. package/icons/CreditCard.vue.js +32 -0
  135. package/icons/Database.vue.js +32 -0
  136. package/icons/Download.vue.js +27 -0
  137. package/icons/Edit.vue.js +26 -0
  138. package/icons/ExternalLink.vue.js +27 -0
  139. package/icons/Eye.vue.js +30 -0
  140. package/icons/EyeOff.vue.js +26 -0
  141. package/icons/FastForward.vue.js +26 -0
  142. package/icons/File.vue.js +26 -0
  143. package/icons/FileAudio.vue.js +17 -0
  144. package/icons/FileImage.vue.js +27 -0
  145. package/icons/FilePdf.vue.js +17 -0
  146. package/icons/FileText.vue.js +17 -0
  147. package/icons/FileVideo.vue.js +27 -0
  148. package/icons/FileZip.vue.js +17 -0
  149. package/icons/Filter.vue.js +25 -0
  150. package/icons/Folder.vue.js +25 -0
  151. package/icons/FolderOpen.vue.js +25 -0
  152. package/icons/FolderPlus.vue.js +27 -0
  153. package/icons/Grid.vue.js +33 -0
  154. package/icons/Hamburger.vue.js +24 -0
  155. package/icons/Hash.vue.js +17 -0
  156. package/icons/Heart.vue.js +25 -0
  157. package/icons/HelpCircle.vue.js +31 -0
  158. package/icons/Highlight.vue.js +20 -0
  159. package/icons/Home.vue.js +26 -0
  160. package/icons/Image.vue.js +38 -0
  161. package/icons/Inbox.vue.js +26 -0
  162. package/icons/Info.vue.js +31 -0
  163. package/icons/Italic.vue.js +24 -0
  164. package/icons/Key.vue.js +31 -0
  165. package/icons/Layout.vue.js +33 -0
  166. package/icons/Link.vue.js +26 -0
  167. package/icons/Link2.vue.js +27 -0
  168. package/icons/List.vue.js +17 -0
  169. package/icons/Loading.vue.js +33 -0
  170. package/icons/Lock.vue.js +33 -0
  171. package/icons/LogIn.vue.js +27 -0
  172. package/icons/LogOut.vue.js +27 -0
  173. package/icons/Mail.vue.js +32 -0
  174. package/icons/Maximize.vue.js +25 -0
  175. package/icons/Menu.vue.js +42 -0
  176. package/icons/MessageCircle.vue.js +25 -0
  177. package/icons/MessageSquare.vue.js +25 -0
  178. package/icons/Mic.vue.js +17 -0
  179. package/icons/MicOff.vue.js +17 -0
  180. package/icons/Minimize.vue.js +25 -0
  181. package/icons/Minus.vue.js +25 -0
  182. package/icons/Moon.vue.js +24 -0
  183. package/icons/MoreHorizontal.vue.js +39 -0
  184. package/icons/MoreVertical.vue.js +39 -0
  185. package/icons/Move.vue.js +17 -0
  186. package/icons/Package.vue.js +17 -0
  187. package/icons/Paperclip.vue.js +25 -0
  188. package/icons/Pause.vue.js +36 -0
  189. package/icons/Phone.vue.js +25 -0
  190. package/icons/Play.vue.js +25 -0
  191. package/icons/Plus.vue.js +26 -0
  192. package/icons/Printer.vue.js +27 -0
  193. package/icons/RadioButton.vue.js +34 -0
  194. package/icons/RefreshCw.vue.js +17 -0
  195. package/icons/Repeat.vue.js +17 -0
  196. package/icons/Rewind.vue.js +26 -0
  197. package/icons/RotateCcw.vue.js +26 -0
  198. package/icons/RotateCw.vue.js +26 -0
  199. package/icons/Save.vue.js +26 -0
  200. package/icons/Scissors.vue.js +17 -0
  201. package/icons/Search.vue.js +30 -0
  202. package/icons/Send.vue.js +26 -0
  203. package/icons/Server.vue.js +17 -0
  204. package/icons/Settings.vue.js +30 -0
  205. package/icons/Share.vue.js +27 -0
  206. package/icons/Shield.vue.js +25 -0
  207. package/icons/Shuffle.vue.js +17 -0
  208. package/icons/Sidebar.vue.js +32 -0
  209. package/icons/SkipBack.vue.js +31 -0
  210. package/icons/SkipForward.vue.js +31 -0
  211. package/icons/Slider.vue.js +17 -0
  212. package/icons/Sliders.vue.js +17 -0
  213. package/icons/SortAsc.vue.js +17 -0
  214. package/icons/SortDesc.vue.js +17 -0
  215. package/icons/Square.vue.js +31 -0
  216. package/icons/Star.vue.js +25 -0
  217. package/icons/Stop.vue.js +31 -0
  218. package/icons/Sun.vue.js +20 -0
  219. package/icons/Tag.vue.js +31 -0
  220. package/icons/Tags.vue.js +27 -0
  221. package/icons/Terminal.vue.js +31 -0
  222. package/icons/ThumbsDown.vue.js +26 -0
  223. package/icons/ThumbsUp.vue.js +26 -0
  224. package/icons/ToggleLeft.vue.js +36 -0
  225. package/icons/ToggleRight.vue.js +36 -0
  226. package/icons/Trash.vue.js +27 -0
  227. package/icons/Trash2.vue.js +17 -0
  228. package/icons/Unlink.vue.js +17 -0
  229. package/icons/Unlock.vue.js +33 -0
  230. package/icons/Upload.vue.js +27 -0
  231. package/icons/User.vue.js +30 -0
  232. package/icons/Users.vue.js +31 -0
  233. package/icons/Video.vue.js +32 -0
  234. package/icons/VideoOff.vue.js +27 -0
  235. package/icons/Volume.vue.js +26 -0
  236. package/icons/Volume1.vue.js +26 -0
  237. package/icons/Volume2.vue.js +26 -0
  238. package/icons/VolumeMute.vue.js +25 -0
  239. package/icons/VolumeX.vue.js +27 -0
  240. package/icons/X.vue.js +26 -0
  241. package/icons/XCircle.vue.js +31 -0
  242. package/icons/Zap.vue.js +25 -0
  243. package/icons/ZoomIn.vue.js +17 -0
  244. package/icons/ZoomOut.vue.js +31 -0
  245. package/icons.js +280 -4
  246. package/package.json +6 -1
  247. package/ui.js +45 -7352
  248. package/utils/config.js +16 -0
  249. package/utils/margin.js +77 -0
  250. package/utils/padding.js +77 -0
  251. package/utils/typography.js +66 -0
  252. package/utils/useRandomId.js +10 -0
  253. package/veloce.css +1 -1
  254. package/components/icon/index.d.ts +0 -6
  255. package/index-Cqxg4hfC.js +0 -2928
@@ -0,0 +1,4 @@
1
+ import f from "./ProgressSpinner.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,61 @@
1
+ import { defineComponent as b, mergeModels as y, useModel as E, ref as v, onMounted as x, onUnmounted as L, createElementBlock as w, openBlock as p, createElementVNode as s, createCommentVNode as M, normalizeStyle as d, normalizeClass as f, createTextVNode as V, toDisplayString as B } from "vue";
2
+ const P = { class: "progress-container relative min-w-full px-3 py-4" }, S = { class: "relative h-2 rounded-full bg-neutral-100 dark:bg-neutral-800" }, k = /* @__PURE__ */ b({
3
+ __name: "RangeSlider",
4
+ props: /* @__PURE__ */ y({
5
+ showTooltip: { type: Boolean, default: !1 },
6
+ tooltipPosition: { type: String, default: "top" }
7
+ }, {
8
+ modelValue: { required: !0 },
9
+ modelModifiers: {}
10
+ }),
11
+ emits: ["update:modelValue"],
12
+ setup(l) {
13
+ const o = E(l, "modelValue"), r = v(!1), a = v(!1), n = (t) => {
14
+ if (!r.value) return;
15
+ const i = document.querySelector(".progress-container");
16
+ if (!i) return;
17
+ const m = i.getBoundingClientRect();
18
+ let u;
19
+ t instanceof TouchEvent ? u = t.touches[0]?.clientX ?? 0 : u = t.clientX;
20
+ const h = u - m.left, g = Math.max(0, Math.min(100, h / m.width * 100));
21
+ o.value = g;
22
+ }, c = (t) => {
23
+ r.value = !0, a.value = !0, n(t);
24
+ }, e = () => {
25
+ r.value = !1, a.value = !1;
26
+ };
27
+ return x(() => {
28
+ window.addEventListener("mousemove", n), window.addEventListener("mouseup", e), window.addEventListener("mouseleave", e), window.addEventListener("touchmove", n, { passive: !1 }), window.addEventListener("touchend", e), window.addEventListener("touchcancel", e);
29
+ }), L(() => {
30
+ window.removeEventListener("mousemove", n), window.removeEventListener("mouseup", e), window.removeEventListener("mouseleave", e), window.removeEventListener("touchmove", n), window.removeEventListener("touchend", e), window.removeEventListener("touchcancel", e);
31
+ }), (t, i) => (p(), w("div", P, [
32
+ s("div", S, [
33
+ s("div", {
34
+ class: "bg-primary absolute h-2 rounded-full",
35
+ style: d({ width: o.value + "%" })
36
+ }, null, 4),
37
+ s("div", {
38
+ class: "absolute top-1/2 -ml-2 flex h-4 w-4 -translate-y-1/2 cursor-pointer items-center justify-center rounded-full border border-gray-300 bg-white shadow",
39
+ style: d({ left: o.value + "%" }),
40
+ unselectable: "on",
41
+ onselectstart: "return false;",
42
+ onMousedown: c,
43
+ onTouchstart: c
44
+ }, null, 36),
45
+ a.value && l.showTooltip ? (p(), w("div", {
46
+ key: 0,
47
+ class: f([[l.tooltipPosition === "top" ? "-top-9" : "-bottom-9"], "absolute mx-auto w-10 -translate-x-1/2 select-none rounded bg-neutral-700 px-2 py-1 text-xs text-white"]),
48
+ style: d({ left: o.value + "%" })
49
+ }, [
50
+ V(B(Math.round(o.value)) + "% ", 1),
51
+ s("span", {
52
+ class: f([[l.tooltipPosition === "top" ? "-bottom-1" : "-top-1"], "absolute left-1/2 -ml-1 h-2 w-2 rotate-45 bg-neutral-700"])
53
+ }, null, 2)
54
+ ], 6)) : M("", !0)
55
+ ])
56
+ ]));
57
+ }
58
+ });
59
+ export {
60
+ k as default
61
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./RangeSlider.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,129 @@
1
+ import { defineComponent as j, mergeModels as w, useModel as A, computed as d, ref as v, useTemplateRef as D, watch as b, createElementBlock as s, openBlock as n, createVNode as y, unref as a, withCtx as O, createBlock as C, createCommentVNode as f, createElementVNode as z, Fragment as E, renderList as W, normalizeClass as S, toDisplayString as q } from "vue";
2
+ /* empty css */
3
+ import H from "../icons/Check.vue.js";
4
+ import P from "../icons/ChevronDown.vue.js";
5
+ import Q from "../icons/Search.vue.js";
6
+ import R from "./icon/Icon.vue.js";
7
+ import { AnimatePresence as T, motion as U } from "motion-v";
8
+ import _ from "./Button.vue.js";
9
+ import G from "./Input.vue.js";
10
+ import { onClickOutside as I } from "@vueuse/core";
11
+ /* empty css */
12
+ const J = {
13
+ key: 0,
14
+ class: "border-b p-2"
15
+ }, K = { class: "h-full max-h-[220px] overflow-y-auto overflow-x-hidden p-2" }, X = ["onClick"], ue = /* @__PURE__ */ j({
16
+ __name: "Select",
17
+ props: /* @__PURE__ */ w({
18
+ options: { type: Array, required: !0 },
19
+ variant: { type: String, default: "outlined" },
20
+ severity: { type: String, default: "neutral" },
21
+ size: { type: String, default: "md" },
22
+ showFilter: { type: Boolean, default: !1 },
23
+ isOpen: { type: Boolean, default: !1 },
24
+ closeOnClickOutside: { type: Boolean, default: !0 },
25
+ fontWeight: { type: String, default: "normal" }
26
+ }, {
27
+ modelValue: {},
28
+ modelModifiers: {}
29
+ }),
30
+ emits: /* @__PURE__ */ w(["update:isOpen"], ["update:modelValue"]),
31
+ setup(l, { emit: V }) {
32
+ const r = l, B = V, g = A(l, "modelValue"), u = d(() => g.value), e = v(r.isOpen ?? !1), m = v(!1), h = D("target");
33
+ I(h, () => {
34
+ r.closeOnClickOutside, e.value = !1, p();
35
+ }), b(
36
+ () => r.isOpen,
37
+ (t) => t !== e.value && (e.value = t)
38
+ ), b(e, (t) => {
39
+ B("update:isOpen", t);
40
+ });
41
+ const M = () => {
42
+ e.value = !e.value, e.value || p();
43
+ }, L = (t) => {
44
+ g.value = t, p();
45
+ }, p = () => {
46
+ e.value = !1, m.value = !1, i.value = "";
47
+ }, i = v(""), k = d(() => i.value ? r.options.filter((t) => t.toLowerCase().includes(i.value.toLowerCase())) : r.options), x = d(() => {
48
+ switch (r.size) {
49
+ case "sm":
50
+ return "text-sm py-1 px-2";
51
+ case "md":
52
+ return "text-sm py-1.5 px-2.5";
53
+ case "lg":
54
+ return "text-base py-2 px-3";
55
+ case "xl":
56
+ return "text-lg py-2.5 px-3.5";
57
+ }
58
+ }), N = d(() => u.value || "Select");
59
+ return (t, c) => (n(), s("div", {
60
+ class: "relative",
61
+ ref_key: "target",
62
+ ref: h
63
+ }, [
64
+ y(a(_), {
65
+ "icon-class": e.value ? "rotate-180 transition-transform duration-200" : "transition-transform duration-200",
66
+ icon: a(P),
67
+ class: "justify-between! w-full capitalize",
68
+ variant: l.variant,
69
+ size: l.size,
70
+ label: N.value,
71
+ "font-weight": l.fontWeight,
72
+ severity: l.severity,
73
+ onClick: M
74
+ }, null, 8, ["icon-class", "icon", "variant", "size", "label", "font-weight", "severity"]),
75
+ y(a(T), null, {
76
+ default: O(() => [
77
+ e.value ? (n(), C(a(U).div, {
78
+ key: 0,
79
+ class: "bg-background absolute top-full z-10 mt-1 flex w-full list-none flex-col rounded border shadow-md shadow-slate-500/10 dark:shadow-slate-900/20",
80
+ initial: { opacity: 0, scale: 1, y: -25 },
81
+ animate: { opacity: 1, scale: 1, y: 0 },
82
+ exit: { opacity: 0, scale: 1, y: -25 },
83
+ transition: {
84
+ duration: 0.2,
85
+ ease: [0.4, 0, 0.2, 1],
86
+ y: { duration: 0.2, ease: [0.4, 0, 0.2, 1] }
87
+ }
88
+ }, {
89
+ default: O(() => [
90
+ l.showFilter ? (n(), s("div", J, [
91
+ y(a(G), {
92
+ modelValue: i.value,
93
+ "onUpdate:modelValue": c[0] || (c[0] = (o) => i.value = o),
94
+ "trailing-icon": a(Q),
95
+ placeholder: "Search",
96
+ size: l.size
97
+ }, null, 8, ["modelValue", "trailing-icon", "size"])
98
+ ])) : f("", !0),
99
+ z("ul", K, [
100
+ (n(!0), s(E, null, W(k.value, (o, $) => (n(), s("li", {
101
+ key: $,
102
+ class: S([[x.value, { "dark:text-neutral-300": o !== u.value }, { "bg-neutral-100/75 dark:bg-neutral-800/75": o === u.value && !m.value }], "flex w-full cursor-pointer items-center justify-between rounded border border-transparent text-left transition-colors duration-150 hover:bg-neutral-100/75 dark:hover:bg-neutral-800/75"]),
103
+ onMouseenter: c[1] || (c[1] = (F) => m.value = !0),
104
+ onClick: (F) => L(o)
105
+ }, [
106
+ z("span", null, q(o), 1),
107
+ o === u.value ? (n(), C(a(R), {
108
+ key: 0,
109
+ icon: a(H),
110
+ class: "size-5"
111
+ }, null, 8, ["icon"])) : f("", !0)
112
+ ], 42, X))), 128)),
113
+ k.value.length === 0 ? (n(), s("li", {
114
+ key: 0,
115
+ class: S([x.value, ""])
116
+ }, "No options found", 2)) : f("", !0)
117
+ ])
118
+ ]),
119
+ _: 1
120
+ })) : f("", !0)
121
+ ]),
122
+ _: 1
123
+ })
124
+ ], 512));
125
+ }
126
+ });
127
+ export {
128
+ ue as default
129
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Select.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,6 +1,5 @@
1
- import { Icons } from '../exports/icons';
2
1
  import { Direction, Severity, Size } from '../exports/types';
3
- import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { Component, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
4
3
  type SeparatorType = "solid" | "dashed" | "dotted";
5
4
  declare function __VLS_template(): {
6
5
  attrs: Partial<{}>;
@@ -33,8 +32,8 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
33
32
  default: string;
34
33
  };
35
34
  icon: {
36
- type: () => Icons;
37
- default: string;
35
+ type: () => Component;
36
+ default: () => null;
38
37
  };
39
38
  bordered: {
40
39
  type: BooleanConstructor;
@@ -71,8 +70,8 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
71
70
  default: string;
72
71
  };
73
72
  icon: {
74
- type: () => Icons;
75
- default: string;
73
+ type: () => Component;
74
+ default: () => null;
76
75
  };
77
76
  bordered: {
78
77
  type: BooleanConstructor;
@@ -91,12 +90,12 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
91
90
  label: string;
92
91
  height: string;
93
92
  type: SeparatorType;
94
- icon: "filter" | "code" | "link" | "menu" | "video" | "circle" | "image" | "stop" | "square" | "x" | "alert" | "alert-circle" | "archive" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "at-sign" | "bell" | "bookmark" | "camera" | "check" | "check-circle" | "check-square" | "chevron-down" | "chevron-left" | "chevron-right" | "chevron-up" | "clock" | "close" | "cloud" | "cloud-download" | "cloud-upload" | "command" | "copy" | "credit-card" | "database" | "download" | "edit" | "external-link" | "eye" | "eye-off" | "fast-forward" | "file" | "file-audio" | "file-image" | "file-pdf" | "file-text" | "file-video" | "file-zip" | "folder" | "folder-open" | "folder-plus" | "grid" | "hamburger" | "hash" | "heart" | "help-circle" | "home" | "inbox" | "info" | "key" | "layout" | "link-2" | "list" | "loading" | "lock" | "log-in" | "log-out" | "mail" | "maximize" | "message-circle" | "message-square" | "mic" | "mic-off" | "minimize" | "minus" | "moon" | "more-horizontal" | "more-vertical" | "move" | "package" | "paperclip" | "pause" | "phone" | "play" | "plus" | "printer" | "radio-button" | "refresh-cw" | "repeat" | "rewind" | "rotate-ccw" | "rotate-cw" | "save" | "scissors" | "search" | "send" | "server" | "settings" | "share" | "shield" | "shuffle" | "sidebar" | "skip-back" | "skip-forward" | "slider" | "sliders" | "sort-asc" | "sort-desc" | "star" | "sun" | "tag" | "tags" | "terminal" | "thumbs-down" | "thumbs-up" | "toggle-left" | "toggle-right" | "trash" | "trash-2" | "unlink" | "unlock" | "upload" | "user" | "users" | "video-off" | "volume" | "volume-1" | "volume-2" | "volume-mute" | "volume-x" | "x-circle" | "zap" | "zoom-in" | "zoom-out";
93
+ icon: Component;
95
94
  size: Size;
96
- direction: Direction;
95
+ bordered: boolean;
97
96
  rounded: boolean;
97
+ direction: Direction;
98
98
  severity: Severity;
99
- bordered: boolean;
100
99
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
101
100
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
102
101
  export default _default;
@@ -0,0 +1,74 @@
1
+ import { defineComponent as h, computed as o, createElementBlock as s, openBlock as n, normalizeStyle as f, normalizeClass as i, createElementVNode as m, createCommentVNode as l, renderSlot as y, createBlock as g, unref as x, toDisplayString as v } from "vue";
2
+ import S from "./icon/Icon.vue.js";
3
+ const z = {
4
+ key: 1,
5
+ class: "text-sm"
6
+ }, w = /* @__PURE__ */ h({
7
+ __name: "Separator",
8
+ props: {
9
+ direction: { type: String, default: "vertical" },
10
+ severity: { type: String, default: "primary" },
11
+ type: { type: String, default: "solid" },
12
+ size: { type: String, default: "md" },
13
+ label: { type: String, default: "" },
14
+ icon: { type: Object, default: () => null },
15
+ bordered: { type: Boolean, default: !1 },
16
+ rounded: { type: Boolean, default: !1 },
17
+ height: {
18
+ type: String,
19
+ default: "",
20
+ validator: (t) => (t === "" || t === "auto" || /^-?\d+(\.\d+)?(px|rem|em)$/.test(t) || console.warn(`[Separator] Invalid "height" prop. Expected "auto" or a number with unit (e.g. "8px", "1rem"). Received: ${t}`), !0)
21
+ }
22
+ },
23
+ setup(t) {
24
+ const e = t, a = o(() => ({
25
+ primary: "border-primary",
26
+ secondary: "border-secondary",
27
+ success: "border-success",
28
+ info: "border-info",
29
+ warning: "border-warning",
30
+ error: "border-error",
31
+ neutral: "border-border"
32
+ })[e.severity]), c = o(() => ({
33
+ solid: "border-solid",
34
+ dashed: "border-dashed",
35
+ dotted: "border-dotted"
36
+ })[e.type]), p = o(() => {
37
+ const r = {
38
+ horizontal: { sm: "border-t-[1px]", md: "border-t-[2px]", lg: "border-t-[4px]", xl: "border-t-[6px]" },
39
+ vertical: { sm: "border-s-[1px]", md: "border-s-[2px]", lg: "border-s-[4px]", xl: "border-s-[6px]" }
40
+ }, d = e.direction === "horizontal" ? "h-px" : "w-px";
41
+ return { border: r[e.direction][e.size], cross: d };
42
+ }), u = o(() => {
43
+ const r = [];
44
+ return e.direction === "horizontal" && r.push("w-full", "py-4"), e.direction === "vertical" && (e.height === "auto" || e.height === "") && r.push("h-full"), r;
45
+ }), b = o(() => {
46
+ if (e.height && e.height !== "auto") return { height: e.height };
47
+ });
48
+ return (r, d) => (n(), s("div", {
49
+ class: i(u.value),
50
+ style: f(b.value)
51
+ }, [
52
+ m("div", {
53
+ class: i([e.direction === "horizontal" ? "w-full" : "h-full", p.value.border, a.value, c.value, "relative"])
54
+ }, [
55
+ e.direction === "horizontal" && (e.icon || e.label) ? (n(), s("span", {
56
+ key: 0,
57
+ class: i([e.label ? "px-2 py-1" : "p-1", { border: e.bordered }, e.rounded ? "rounded-full" : "rounded", "bg-background absolute inset-0 m-auto flex h-fit w-fit shrink-0 items-center justify-center gap-1.5"])
58
+ }, [
59
+ y(r.$slots, "content", {}, () => [
60
+ e.icon ? (n(), g(x(S), {
61
+ key: 0,
62
+ icon: e.icon,
63
+ class: "size-4 shrink-0"
64
+ }, null, 8, ["icon"])) : l("", !0),
65
+ e.label ? (n(), s("span", z, v(e.label), 1)) : l("", !0)
66
+ ])
67
+ ], 2)) : l("", !0)
68
+ ], 2)
69
+ ], 6));
70
+ }
71
+ });
72
+ export {
73
+ w as default
74
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Separator.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -44,8 +44,8 @@ declare const _default: DefineComponent<ExtractPropTypes<{
44
44
  }>> & Readonly<{}>, {
45
45
  width: string;
46
46
  height: string;
47
- animation: "none" | "pulse" | "wave";
48
47
  rounded: boolean;
48
+ animation: "none" | "pulse" | "wave";
49
49
  variant: "text" | "circular" | "rectangular";
50
50
  }, {}, {}, {}, string, ComponentProvideOptions, true, {}, HTMLDivElement>;
51
51
  export default _default;
@@ -0,0 +1,7 @@
1
+ import o from "./Skeleton.vue2.js";
2
+ /* empty css */
3
+ import t from "../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-50ab951d"]]);
5
+ export {
6
+ m as default
7
+ };
@@ -0,0 +1,24 @@
1
+ import { defineComponent as l, computed as t, createElementBlock as o, openBlock as i, normalizeStyle as u, normalizeClass as d } from "vue";
2
+ const m = /* @__PURE__ */ l({
3
+ __name: "Skeleton",
4
+ props: {
5
+ width: { type: String, default: "100%" },
6
+ height: { type: String, default: "1rem" },
7
+ rounded: { type: Boolean, default: !1 },
8
+ variant: { type: String, default: "text" },
9
+ animation: { type: String, default: "pulse" }
10
+ },
11
+ setup(n) {
12
+ const e = n, a = t(() => [{ "rounded-full": e.rounded || e.variant === "circular" }, { rounded: !e.rounded && e.variant !== "circular" }, { "animate-pulse": e.animation === "pulse" }, { "skeleton-wave": e.animation === "wave" }]), r = t(() => ({
13
+ width: e.width,
14
+ height: e.height
15
+ }));
16
+ return (s, c) => (i(), o("div", {
17
+ class: d([a.value, "bg-neutral-200 dark:bg-neutral-800"]),
18
+ style: u(r.value)
19
+ }, null, 6));
20
+ }
21
+ });
22
+ export {
23
+ m as default
24
+ };
@@ -0,0 +1,48 @@
1
+ import { defineComponent as d, mergeModels as f, useModel as i, computed as s, createElementBlock as u, openBlock as h, withDirectives as p, createElementVNode as m, normalizeClass as b, vModelCheckbox as k } from "vue";
2
+ const g = { class: "flex items-center gap-2" }, w = ["disabled"], v = /* @__PURE__ */ d({
3
+ __name: "Switch",
4
+ props: /* @__PURE__ */ f({
5
+ severity: { type: String, default: "primary" },
6
+ disabled: { type: Boolean, default: !1 },
7
+ size: { type: String, default: "md" }
8
+ }, {
9
+ modelValue: { type: Boolean, default: !1 },
10
+ modelModifiers: {}
11
+ }),
12
+ emits: ["update:modelValue"],
13
+ setup(a) {
14
+ const e = a, r = i(a, "modelValue"), l = s(() => {
15
+ switch (e.size) {
16
+ case "sm":
17
+ return "h-4 w-7 after:h-3 after:w-3 after:left-0.5 after:top-0.5 checked:after:left-3.5";
18
+ case "md":
19
+ return "h-6 w-11 after:h-5 after:w-5 after:left-0.5 after:top-0.5 checked:after:left-5.5";
20
+ case "lg":
21
+ return "h-7 w-14 after:h-6 after:w-6 after:left-0.5 after:top-0.5 checked:after:left-7.5";
22
+ case "xl":
23
+ return "h-8 w-16 after:h-7 after:w-7 after:left-0.5 after:top-0.5 checked:after:left-8.5";
24
+ }
25
+ }), o = s(() => `bg-neutral-200 ${{
26
+ primary: "checked:bg-primary",
27
+ secondary: "checked:bg-secondary",
28
+ success: "checked:bg-success",
29
+ info: "checked:bg-info",
30
+ warning: "checked:bg-warning",
31
+ error: "checked:bg-error",
32
+ neutral: "checked:bg-neutral-400"
33
+ }[e.severity]}`);
34
+ return (c, t) => (h(), u("div", g, [
35
+ p(m("input", {
36
+ type: "checkbox",
37
+ disabled: e.disabled,
38
+ "onUpdate:modelValue": t[0] || (t[0] = (n) => r.value = n),
39
+ class: b([[l.value, o.value], "peer relative cursor-pointer appearance-none rounded-full transition-all duration-200 after:absolute after:rounded-full after:bg-white after:shadow-sm after:transition-all focus:outline-none focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-60"])
40
+ }, null, 10, w), [
41
+ [k, r.value]
42
+ ])
43
+ ]));
44
+ }
45
+ });
46
+ export {
47
+ v as default
48
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Switch.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,35 @@
1
+ import { defineComponent as r, ref as u, createElementBlock as l, openBlock as n, renderSlot as a, createCommentVNode as d, normalizeClass as f, toDisplayString as m } from "vue";
2
+ const p = { key: 0 }, y = /* @__PURE__ */ r({
3
+ __name: "Tooltip",
4
+ props: {
5
+ content: { type: String, default: "" },
6
+ position: { type: String, default: "bottom", options: ["top", "bottom", "left", "right"] },
7
+ bodyClass: { type: String, default: "" }
8
+ },
9
+ setup(t) {
10
+ const o = u(!1);
11
+ return (s, e) => (n(), l("div", {
12
+ class: "relative inline-block",
13
+ onMouseenter: e[0] || (e[0] = (i) => o.value = !0),
14
+ onMouseleave: e[1] || (e[1] = (i) => o.value = !1)
15
+ }, [
16
+ a(s.$slots, "default"),
17
+ o.value ? (n(), l("div", {
18
+ key: 0,
19
+ class: f([
20
+ "bg-background absolute z-10 w-max rounded border px-3 py-2 text-sm shadow-md transition-opacity duration-200",
21
+ t.position === "top" && "bottom-full left-1/2 mb-2 -translate-x-1/2",
22
+ t.position === "bottom" && "left-1/2 top-full mt-2 -translate-x-1/2",
23
+ t.position === "left" && "right-full top-1/2 mr-2 -translate-y-1/2",
24
+ t.position === "right" && "left-full top-1/2 ml-2 -translate-y-1/2",
25
+ t.bodyClass
26
+ ])
27
+ }, [
28
+ t.content ? (n(), l("span", p, m(t.content), 1)) : a(s.$slots, "body", { key: 1 })
29
+ ], 2)) : d("", !0)
30
+ ], 32));
31
+ }
32
+ });
33
+ export {
34
+ y as default
35
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Tooltip.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,7 +1,6 @@
1
- import { Icons as IconsType } from './index.ts';
2
- import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
1
+ import { Component, DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
2
  type __VLS_Props = {
4
- icon: IconsType | (string & {});
3
+ icon: Component;
5
4
  class?: string;
6
5
  size?: number | string;
7
6
  };
@@ -0,0 +1,21 @@
1
+ import { defineComponent as l, computed as n, createBlock as a, renderSlot as i, openBlock as r, resolveDynamicComponent as p, normalizeClass as u } from "vue";
2
+ const d = /* @__PURE__ */ l({
3
+ __name: "Icon",
4
+ props: {
5
+ icon: {},
6
+ class: {},
7
+ size: {}
8
+ },
9
+ setup(t) {
10
+ const e = t, o = n(() => e.size ?? 24), s = n(() => e.icon);
11
+ return (c, m) => s.value ? (r(), a(p(s.value), {
12
+ key: 0,
13
+ class: u(["shrink-0", e.class]),
14
+ width: o.value,
15
+ height: o.value
16
+ }, null, 8, ["class", "width", "height"])) : i(c.$slots, "default", { key: 1 });
17
+ }
18
+ });
19
+ export {
20
+ d as default
21
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Icon.vue.js";
2
+ export {
3
+ f as default
4
+ };