veloce-vue 0.21.0 → 0.23.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 (236) hide show
  1. package/_virtual/_plugin-vue_export-helper.js +9 -0
  2. package/components/Accordion.vue.js +91 -0
  3. package/components/Accordion.vue2.js +4 -0
  4. package/components/Badge.vue.d.ts +1 -0
  5. package/components/Badge.vue.js +47 -0
  6. package/components/Badge.vue2.js +4 -0
  7. package/components/Button.vue.d.ts +7 -8
  8. package/components/Button.vue.js +7 -0
  9. package/components/Button.vue2.js +114 -0
  10. package/components/Checkbox.vue.d.ts +6 -7
  11. package/components/Checkbox.vue.js +98 -0
  12. package/components/Checkbox.vue2.js +4 -0
  13. package/components/Chip.vue.d.ts +6 -7
  14. package/components/Chip.vue.js +61 -0
  15. package/components/Chip.vue2.js +4 -0
  16. package/components/Drawer.vue.js +94 -0
  17. package/components/Drawer.vue2.js +4 -0
  18. package/components/Fieldset.vue.d.ts +6 -7
  19. package/components/Fieldset.vue.js +49 -0
  20. package/components/Fieldset.vue2.js +4 -0
  21. package/components/Input.vue.d.ts +11 -12
  22. package/components/Input.vue.js +106 -0
  23. package/components/Input.vue2.js +4 -0
  24. package/components/JsonRenderer.vue.js +63 -0
  25. package/components/JsonRenderer.vue2.js +4 -0
  26. package/components/Layout.vue.d.ts +7 -17
  27. package/components/Layout.vue.js +69 -0
  28. package/components/Layout.vue2.js +4 -0
  29. package/components/Message.vue.d.ts +6 -7
  30. package/components/Message.vue.js +109 -0
  31. package/components/Message.vue2.js +4 -0
  32. package/components/MiniEditor.vue.js +132 -0
  33. package/components/MiniEditor.vue2.js +4 -0
  34. package/components/Modal.vue.js +73 -0
  35. package/components/Modal.vue2.js +4 -0
  36. package/components/Popover.vue.js +78 -0
  37. package/components/Popover.vue2.js +4 -0
  38. package/components/ProgressBar.vue.js +51 -0
  39. package/components/ProgressBar.vue2.js +4 -0
  40. package/components/ProgressSpinner.vue.js +47 -0
  41. package/components/ProgressSpinner.vue2.js +4 -0
  42. package/components/RangeSlider.vue.js +61 -0
  43. package/components/RangeSlider.vue2.js +4 -0
  44. package/components/Select.vue.js +129 -0
  45. package/components/Select.vue2.js +4 -0
  46. package/components/Separator.vue.d.ts +6 -7
  47. package/components/Separator.vue.js +74 -0
  48. package/components/Separator.vue2.js +4 -0
  49. package/components/Skeleton.vue.js +7 -0
  50. package/components/Skeleton.vue2.js +24 -0
  51. package/components/Switch.vue.js +48 -0
  52. package/components/Switch.vue2.js +4 -0
  53. package/components/Tooltip.vue.js +35 -0
  54. package/components/Tooltip.vue2.js +4 -0
  55. package/components/icon/Icon.vue.d.ts +2 -3
  56. package/components/icon/Icon.vue.js +21 -0
  57. package/components/icon/Icon.vue2.js +4 -0
  58. package/components/icon/icons.d.ts +139 -142
  59. package/components/typography/Blockquote.vue.js +55 -0
  60. package/components/typography/Blockquote.vue2.js +4 -0
  61. package/components/typography/Code.vue.js +74 -0
  62. package/components/typography/Code.vue2.js +4 -0
  63. package/components/typography/H1.vue.js +55 -0
  64. package/components/typography/H1.vue2.js +4 -0
  65. package/components/typography/H2.vue.js +55 -0
  66. package/components/typography/H2.vue2.js +4 -0
  67. package/components/typography/H3.vue.js +55 -0
  68. package/components/typography/H3.vue2.js +4 -0
  69. package/components/typography/H4.vue.js +55 -0
  70. package/components/typography/H4.vue2.js +4 -0
  71. package/components/typography/H5.vue.js +55 -0
  72. package/components/typography/H5.vue2.js +4 -0
  73. package/components/typography/H6.vue.js +55 -0
  74. package/components/typography/H6.vue2.js +4 -0
  75. package/components/typography/Label.vue.js +61 -0
  76. package/components/typography/Label.vue2.js +4 -0
  77. package/components/typography/List.vue.js +60 -0
  78. package/components/typography/List.vue2.js +4 -0
  79. package/components/typography/P.vue.js +55 -0
  80. package/components/typography/P.vue2.js +4 -0
  81. package/components/typography/Span.vue.js +55 -0
  82. package/components/typography/Span.vue2.js +4 -0
  83. package/config.js +2 -14
  84. package/exports/icons.d.ts +2 -1
  85. package/exports/toast.d.ts +1 -1
  86. package/exports/types.d.ts +3 -3
  87. package/icons/Alert.vue.js +31 -0
  88. package/icons/AlertCircle.vue.js +31 -0
  89. package/icons/Archive.vue.js +33 -0
  90. package/icons/ArrowDown.vue.js +26 -0
  91. package/icons/ArrowLeft.vue.js +26 -0
  92. package/icons/ArrowRight.vue.js +26 -0
  93. package/icons/ArrowUp.vue.js +26 -0
  94. package/icons/AtSign.vue.js +30 -0
  95. package/icons/Bell.vue.js +26 -0
  96. package/icons/Bold.vue.js +20 -0
  97. package/icons/Bookmark.vue.js +25 -0
  98. package/icons/Camera.vue.js +30 -0
  99. package/icons/Check.vue.js +20 -0
  100. package/icons/CheckCircle.vue.js +26 -0
  101. package/icons/CheckSquare.vue.js +26 -0
  102. package/icons/ChevronDown.vue.js +20 -0
  103. package/icons/ChevronLeft.vue.js +25 -0
  104. package/icons/ChevronRight.vue.js +25 -0
  105. package/icons/ChevronUp.vue.js +25 -0
  106. package/icons/Circle.vue.js +29 -0
  107. package/icons/Clock.vue.js +30 -0
  108. package/icons/Close.vue.js +20 -0
  109. package/icons/Cloud.vue.js +25 -0
  110. package/icons/CloudDownload.vue.js +27 -0
  111. package/icons/CloudUpload.vue.js +27 -0
  112. package/icons/Code.vue.js +26 -0
  113. package/icons/Command.vue.js +26 -0
  114. package/icons/Copy.vue.js +33 -0
  115. package/icons/CreditCard.vue.js +32 -0
  116. package/icons/Database.vue.js +32 -0
  117. package/icons/Download.vue.js +27 -0
  118. package/icons/Edit.vue.js +26 -0
  119. package/icons/ExternalLink.vue.js +27 -0
  120. package/icons/Eye.vue.js +30 -0
  121. package/icons/EyeOff.vue.js +26 -0
  122. package/icons/FastForward.vue.js +26 -0
  123. package/icons/File.vue.js +26 -0
  124. package/icons/FileAudio.vue.js +17 -0
  125. package/icons/FileImage.vue.js +27 -0
  126. package/icons/FilePdf.vue.js +17 -0
  127. package/icons/FileText.vue.js +17 -0
  128. package/icons/FileVideo.vue.js +27 -0
  129. package/icons/FileZip.vue.js +17 -0
  130. package/icons/Filter.vue.js +25 -0
  131. package/icons/Folder.vue.js +25 -0
  132. package/icons/FolderOpen.vue.js +25 -0
  133. package/icons/FolderPlus.vue.js +27 -0
  134. package/icons/Grid.vue.js +33 -0
  135. package/icons/Hamburger.vue.js +24 -0
  136. package/icons/Hash.vue.js +17 -0
  137. package/icons/Heart.vue.js +25 -0
  138. package/icons/HelpCircle.vue.js +31 -0
  139. package/icons/Highlight.vue.js +20 -0
  140. package/icons/Home.vue.js +26 -0
  141. package/icons/Image.vue.js +38 -0
  142. package/icons/Inbox.vue.js +26 -0
  143. package/icons/Info.vue.js +31 -0
  144. package/icons/Italic.vue.js +24 -0
  145. package/icons/Key.vue.js +31 -0
  146. package/icons/Layout.vue.js +33 -0
  147. package/icons/Link.vue.js +26 -0
  148. package/icons/Link2.vue.js +27 -0
  149. package/icons/List.vue.js +17 -0
  150. package/icons/Loading.vue.js +33 -0
  151. package/icons/Lock.vue.js +33 -0
  152. package/icons/LogIn.vue.js +27 -0
  153. package/icons/LogOut.vue.js +27 -0
  154. package/icons/Mail.vue.js +32 -0
  155. package/icons/Maximize.vue.js +25 -0
  156. package/icons/Menu.vue.js +42 -0
  157. package/icons/MessageCircle.vue.js +25 -0
  158. package/icons/MessageSquare.vue.js +25 -0
  159. package/icons/Mic.vue.js +17 -0
  160. package/icons/MicOff.vue.js +17 -0
  161. package/icons/Minimize.vue.js +25 -0
  162. package/icons/Minus.vue.js +25 -0
  163. package/icons/Moon.vue.js +24 -0
  164. package/icons/MoreHorizontal.vue.js +39 -0
  165. package/icons/MoreVertical.vue.js +39 -0
  166. package/icons/Move.vue.js +17 -0
  167. package/icons/Package.vue.js +17 -0
  168. package/icons/Paperclip.vue.js +25 -0
  169. package/icons/Pause.vue.js +36 -0
  170. package/icons/Phone.vue.js +25 -0
  171. package/icons/Play.vue.js +25 -0
  172. package/icons/Plus.vue.js +26 -0
  173. package/icons/Printer.vue.js +27 -0
  174. package/icons/RadioButton.vue.js +34 -0
  175. package/icons/RefreshCw.vue.js +17 -0
  176. package/icons/Repeat.vue.js +17 -0
  177. package/icons/Rewind.vue.js +26 -0
  178. package/icons/RotateCcw.vue.js +26 -0
  179. package/icons/RotateCw.vue.js +26 -0
  180. package/icons/Save.vue.js +26 -0
  181. package/icons/Scissors.vue.js +17 -0
  182. package/icons/Search.vue.js +30 -0
  183. package/icons/Send.vue.js +26 -0
  184. package/icons/Server.vue.js +17 -0
  185. package/icons/Settings.vue.js +30 -0
  186. package/icons/Share.vue.js +27 -0
  187. package/icons/Shield.vue.js +25 -0
  188. package/icons/Shuffle.vue.js +17 -0
  189. package/icons/Sidebar.vue.js +32 -0
  190. package/icons/SkipBack.vue.js +31 -0
  191. package/icons/SkipForward.vue.js +31 -0
  192. package/icons/Slider.vue.js +17 -0
  193. package/icons/Sliders.vue.js +17 -0
  194. package/icons/SortAsc.vue.js +17 -0
  195. package/icons/SortDesc.vue.js +17 -0
  196. package/icons/Square.vue.js +31 -0
  197. package/icons/Star.vue.js +25 -0
  198. package/icons/Stop.vue.js +31 -0
  199. package/icons/Sun.vue.js +20 -0
  200. package/icons/Tag.vue.js +31 -0
  201. package/icons/Tags.vue.js +27 -0
  202. package/icons/Terminal.vue.js +31 -0
  203. package/icons/ThumbsDown.vue.js +26 -0
  204. package/icons/ThumbsUp.vue.js +26 -0
  205. package/icons/ToggleLeft.vue.js +36 -0
  206. package/icons/ToggleRight.vue.js +36 -0
  207. package/icons/Trash.vue.js +27 -0
  208. package/icons/Trash2.vue.js +17 -0
  209. package/icons/Unlink.vue.js +17 -0
  210. package/icons/Unlock.vue.js +33 -0
  211. package/icons/Upload.vue.js +27 -0
  212. package/icons/User.vue.js +30 -0
  213. package/icons/Users.vue.js +31 -0
  214. package/icons/Video.vue.js +32 -0
  215. package/icons/VideoOff.vue.js +27 -0
  216. package/icons/Volume.vue.js +26 -0
  217. package/icons/Volume1.vue.js +26 -0
  218. package/icons/Volume2.vue.js +26 -0
  219. package/icons/VolumeMute.vue.js +25 -0
  220. package/icons/VolumeX.vue.js +27 -0
  221. package/icons/X.vue.js +26 -0
  222. package/icons/XCircle.vue.js +31 -0
  223. package/icons/Zap.vue.js +25 -0
  224. package/icons/ZoomIn.vue.js +17 -0
  225. package/icons/ZoomOut.vue.js +31 -0
  226. package/icons.js +280 -4
  227. package/package.json +6 -1
  228. package/ui.js +45 -8345
  229. package/utils/config.js +16 -0
  230. package/utils/margin.js +77 -0
  231. package/utils/padding.js +77 -0
  232. package/utils/typography.js +66 -0
  233. package/utils/useRandomId.js +10 -0
  234. package/veloce.css +1 -1
  235. package/components/icon/index.d.ts +0 -6
  236. package/index-BLYh_r9b.js +0 -2977
@@ -0,0 +1,109 @@
1
+ import { defineComponent as $, computed as n, createElementBlock as z, openBlock as o, normalizeClass as E, renderSlot as s, createBlock as l, createCommentVNode as g, createElementVNode as I, unref as a } from "vue";
2
+ import M from "../icons/Alert.vue.js";
3
+ import N from "../icons/CheckCircle.vue.js";
4
+ import c from "../icons/Close.vue.js";
5
+ import t from "../icons/Info.vue.js";
6
+ import p from "./icon/Icon.vue.js";
7
+ import { getMargin as P } from "../utils/margin.js";
8
+ import { getPadding as V } from "../utils/padding.js";
9
+ const j = { class: "flex-1" }, Q = /* @__PURE__ */ $({
10
+ __name: "Message",
11
+ props: {
12
+ severity: { type: String, default: "info" },
13
+ variant: { type: String, default: "solid" },
14
+ icon: { type: Object, default: () => null },
15
+ closable: { type: Boolean, default: !1 },
16
+ // margin
17
+ margin: { type: String, default: "" },
18
+ marginLeft: { type: String, default: "" },
19
+ marginRight: { type: String, default: "" },
20
+ marginTop: { type: String, default: "lg" },
21
+ marginBottom: { type: String, default: "md" },
22
+ // padding
23
+ padding: { type: String, default: "" },
24
+ paddingLeft: { type: String, default: "" },
25
+ paddingRight: { type: String, default: "" },
26
+ paddingTop: { type: String, default: "" },
27
+ paddingBottom: { type: String, default: "" }
28
+ },
29
+ emits: ["close"],
30
+ setup(u, { emit: m }) {
31
+ const { margin: f, marginLeft: b, marginRight: y, marginTop: k, marginBottom: h } = P(), { padding: x, paddingLeft: v, paddingRight: S, paddingTop: w, paddingBottom: B } = V(), r = u, C = m, T = {
32
+ success: N,
33
+ info: t,
34
+ warning: M,
35
+ error: c,
36
+ primary: t,
37
+ secondary: t,
38
+ neutral: t
39
+ }, i = {
40
+ success: {
41
+ solid: "bg-success-light dark:bg-success/20 text-success border-success/30",
42
+ outlined: "border-success text-success bg-transparent"
43
+ },
44
+ info: {
45
+ solid: "bg-info-light dark:bg-info/20 text-info border-info/30",
46
+ outlined: "border-info text-info bg-transparent"
47
+ },
48
+ warning: {
49
+ solid: "bg-warning-light dark:bg-warning/20 text-warning border-warning/30",
50
+ outlined: "border-warning text-warning bg-transparent"
51
+ },
52
+ error: {
53
+ solid: "bg-error-light dark:bg-error/20 text-error border-error/30",
54
+ outlined: "border-error text-error bg-transparent"
55
+ },
56
+ primary: {
57
+ solid: "bg-primary-light dark:bg-primary/20 text-primary border-primary/30",
58
+ outlined: "border-primary text-primary bg-transparent"
59
+ },
60
+ secondary: {
61
+ solid: "bg-secondary-light dark:bg-secondary/20 text-secondary border-secondary/30",
62
+ outlined: "border-secondary text-secondary bg-transparent"
63
+ },
64
+ neutral: {
65
+ solid: "bg-neutral-100 dark:bg-neutral-800 text-neutral-700 dark:text-neutral-200 border-neutral-300 dark:border-neutral-700",
66
+ outlined: "border-neutral-300 dark:border-neutral-700 text-neutral-700 dark:text-neutral-200 bg-transparent"
67
+ }
68
+ }, _ = n(() => {
69
+ const e = r.variant === "outlined" ? "outlined" : "solid";
70
+ return i[r.severity]?.[e] || i.info.solid;
71
+ }), L = n(() => [
72
+ // margin
73
+ f[r.margin],
74
+ b[r.marginLeft],
75
+ y[r.marginRight],
76
+ k[r.marginTop],
77
+ h[r.marginBottom],
78
+ // padding
79
+ x[r.padding],
80
+ v[r.paddingLeft],
81
+ S[r.paddingRight],
82
+ w[r.paddingTop],
83
+ B[r.paddingBottom]
84
+ ]), d = n(() => r.icon || T[r.severity] || t), R = () => {
85
+ C("close");
86
+ };
87
+ return (e, A) => (o(), z("div", {
88
+ class: E([[_.value, L.value], "flex items-start gap-3 rounded border p-3"])
89
+ }, [
90
+ e.$slots.icon ? s(e.$slots, "icon", { key: 0 }) : d.value ? (o(), l(a(p), {
91
+ key: 1,
92
+ icon: d.value,
93
+ class: "mt-0.5 size-5 shrink-0"
94
+ }, null, 8, ["icon"])) : g("", !0),
95
+ I("div", j, [
96
+ s(e.$slots, "default")
97
+ ]),
98
+ r.closable ? (o(), l(a(p), {
99
+ key: 2,
100
+ icon: a(c),
101
+ class: "ml-auto shrink-0 cursor-pointer rounded p-0.5 duration-100 hover:bg-black/10 dark:hover:bg-white/10",
102
+ onClick: R
103
+ }, null, 8, ["icon"])) : g("", !0)
104
+ ], 2));
105
+ }
106
+ });
107
+ export {
108
+ Q as default
109
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Message.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,132 @@
1
+ import { defineComponent as k, ref as h, onMounted as y, watch as M, createElementBlock as b, openBlock as B, createElementVNode as E, createVNode as g, unref as m } from "vue";
2
+ import v from "./Button.vue.js";
3
+ import z from "../icons/Bold.vue.js";
4
+ import A from "../icons/Italic.vue.js";
5
+ import F from "../icons/Highlight.vue.js";
6
+ const I = { class: "overflow-hidden rounded border" }, V = { class: "flex gap-2 border-b bg-neutral-50 p-2 dark:bg-neutral-800/25" }, W = /* @__PURE__ */ k({
7
+ __name: "MiniEditor",
8
+ props: {
9
+ modelValue: {}
10
+ },
11
+ emits: ["update:modelValue"],
12
+ setup(S, { emit: x }) {
13
+ const p = S, L = x, i = h(null), s = h(!1), u = h(!1), c = h(!1);
14
+ function N(e) {
15
+ i.value && (i.value.focus(), document.execCommand(e, !1), f(), a());
16
+ }
17
+ function T(e) {
18
+ const t = e.parentNode;
19
+ if (t) {
20
+ for (; e.firstChild; )
21
+ t.insertBefore(e.firstChild, e);
22
+ t.removeChild(e), t.normalize();
23
+ }
24
+ }
25
+ function _() {
26
+ if (!i.value) return;
27
+ i.value.focus();
28
+ const e = window.getSelection();
29
+ if (!e || e.rangeCount === 0) return;
30
+ const t = e.getRangeAt(0);
31
+ if (t.collapsed) return;
32
+ const l = [], w = t.commonAncestorContainer, H = document.createTreeWalker(w, NodeFilter.SHOW_ELEMENT, {
33
+ acceptNode: (n) => {
34
+ const o = n;
35
+ return o.tagName === "SPAN" && o.classList.contains("text-highlight") ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
36
+ }
37
+ });
38
+ let C;
39
+ for (; C = H.nextNode(); ) {
40
+ const n = C;
41
+ l.includes(n) || l.push(n);
42
+ }
43
+ let r = t.commonAncestorContainer;
44
+ for (; r && r !== i.value; ) {
45
+ if (r.nodeType === Node.ELEMENT_NODE) {
46
+ const n = r;
47
+ n.tagName === "SPAN" && n.classList.contains("text-highlight") && (l.includes(n) || l.push(n));
48
+ }
49
+ r = r.parentNode;
50
+ }
51
+ if (l.length > 0)
52
+ [...l].sort((o, d) => o.contains(d) ? 1 : d.contains(o) ? -1 : 0).forEach((o) => {
53
+ o.parentNode && T(o);
54
+ });
55
+ else {
56
+ const n = document.createElement("span");
57
+ n.className = "text-highlight";
58
+ try {
59
+ t.surroundContents(n);
60
+ } catch {
61
+ const d = t.extractContents();
62
+ n.appendChild(d), t.insertNode(n);
63
+ }
64
+ }
65
+ f(), a();
66
+ }
67
+ function a() {
68
+ if (!i.value) return;
69
+ const e = window.getSelection();
70
+ if (!e || e.rangeCount === 0) {
71
+ s.value = !1, u.value = !1, c.value = !1;
72
+ return;
73
+ }
74
+ const t = e.anchorNode?.parentElement;
75
+ s.value = document.queryCommandState("bold"), u.value = document.queryCommandState("italic"), c.value = !!t?.classList?.contains("text-highlight");
76
+ }
77
+ function f() {
78
+ i.value && L("update:modelValue", i.value.innerHTML);
79
+ }
80
+ return y(() => {
81
+ i.value && (i.value.innerHTML = p.modelValue || "", a());
82
+ }), M(
83
+ () => p.modelValue,
84
+ (e) => {
85
+ i.value && i.value.innerHTML !== e && (i.value.innerHTML = e || "", a());
86
+ }
87
+ ), (e, t) => (B(), b("div", I, [
88
+ E("div", V, [
89
+ g(v, {
90
+ icon: m(z),
91
+ highlighted: s.value,
92
+ variant: s.value ? "solid" : "ghost",
93
+ severity: "neutral",
94
+ size: "sm",
95
+ onClick: t[0] || (t[0] = (l) => N("bold"))
96
+ }, null, 8, ["icon", "highlighted", "variant"]),
97
+ g(v, {
98
+ icon: m(A),
99
+ "icon-class": "size-4",
100
+ highlighted: u.value,
101
+ variant: u.value ? "solid" : "ghost",
102
+ severity: "neutral",
103
+ size: "sm",
104
+ onClick: t[1] || (t[1] = (l) => N("italic"))
105
+ }, null, 8, ["icon", "highlighted", "variant"]),
106
+ g(v, {
107
+ icon: m(F),
108
+ "icon-class": "size-4",
109
+ highlighted: c.value,
110
+ variant: c.value ? "solid" : "ghost",
111
+ severity: "neutral",
112
+ size: "sm",
113
+ title: "Highlight",
114
+ onClick: _
115
+ }, null, 8, ["icon", "highlighted", "variant"])
116
+ ]),
117
+ E("div", {
118
+ onKeyup: a,
119
+ class: "min-h-[150px] p-3 outline-none focus-visible:ring-0",
120
+ ref_key: "editor",
121
+ ref: i,
122
+ contenteditable: "true",
123
+ onInput: f,
124
+ onMouseup: a,
125
+ onFocus: a
126
+ }, null, 544)
127
+ ]));
128
+ }
129
+ });
130
+ export {
131
+ W as default
132
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./MiniEditor.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,73 @@
1
+ import { defineComponent as f, useModel as x, createElementBlock as n, openBlock as a, Fragment as v, createElementVNode as o, createVNode as d, renderSlot as r, unref as t, withCtx as m, createBlock as h, createCommentVNode as c } from "vue";
2
+ /* empty css */
3
+ import w from "../icons/Close.vue.js";
4
+ import { AnimatePresence as y, motion as b } from "motion-v";
5
+ import k from "./Button.vue.js";
6
+ import { useWindowSize as g } from "@vueuse/core";
7
+ /* empty css */
8
+ const C = {
9
+ class: "bg-background text-muted flex max-w-[600px] flex-col overflow-hidden rounded border shadow-xl shadow-slate-700/10 sm:max-h-[95dvh] sm:w-[90%]",
10
+ role: "document"
11
+ }, V = { class: "flex items-center gap-4 border-b px-4 py-2" }, _ = { class: "max-h-[calc(100dvh-100px)] flex-1 overflow-auto px-4 py-2 sm:max-h-[75vh]" }, $ = {
12
+ key: 0,
13
+ class: "border-t px-4 py-2"
14
+ }, j = /* @__PURE__ */ f({
15
+ __name: "Modal",
16
+ props: {
17
+ modelValue: {},
18
+ modelModifiers: {}
19
+ },
20
+ emits: ["update:modelValue"],
21
+ setup(p) {
22
+ const s = x(p, "modelValue"), { width: i } = g();
23
+ return (l, e) => (a(), n(v, null, [
24
+ o("div", {
25
+ class: "w-fit",
26
+ onClick: e[0] || (e[0] = (u) => s.value = !0)
27
+ }, [
28
+ r(l.$slots, "default")
29
+ ]),
30
+ d(t(y), { initial: !1 }, {
31
+ default: m(() => [
32
+ s.value ? (a(), h(t(b).div, {
33
+ key: 0,
34
+ class: "modal-backdrop z-99999999 fixed left-0 top-0 flex items-center justify-center backdrop-blur-[2px] sm:h-screen sm:w-screen",
35
+ initial: { opacity: 0, scale: t(i) < 768 ? 1 : 0.85, translateX: t(i) < 768 ? "-120px" : "0" },
36
+ animate: { opacity: 1, scale: 1, translateX: "0" },
37
+ exit: { opacity: 0, scale: 1, translateX: "-120px" },
38
+ transition: {
39
+ duration: 0.15,
40
+ scale: { type: "spring", visualDuration: 0.2, bounce: 0.25 }
41
+ }
42
+ }, {
43
+ default: m(() => [
44
+ o("div", C, [
45
+ o("div", V, [
46
+ e[2] || (e[2] = o("h3", { class: "text-primary flex-1 text-lg font-medium" }, "Modal title", -1)),
47
+ d(t(k), {
48
+ icon: t(w),
49
+ class: "p-1!",
50
+ variant: "ghost",
51
+ circle: "",
52
+ onClick: e[1] || (e[1] = (u) => s.value = !1)
53
+ }, null, 8, ["icon"])
54
+ ]),
55
+ o("div", _, [
56
+ r(l.$slots, "content")
57
+ ]),
58
+ l.$slots.footer ? (a(), n("div", $, [
59
+ r(l.$slots, "footer")
60
+ ])) : c("", !0)
61
+ ])
62
+ ]),
63
+ _: 3
64
+ }, 8, ["initial"])) : c("", !0)
65
+ ]),
66
+ _: 3
67
+ })
68
+ ], 64));
69
+ }
70
+ });
71
+ export {
72
+ j as default
73
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Modal.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,78 @@
1
+ import { defineComponent as v, ref as y, createElementBlock as x, openBlock as s, createElementVNode as l, createVNode as u, renderSlot as d, unref as a, withCtx as i, createBlock as m, createCommentVNode as c, normalizeClass as n } from "vue";
2
+ import { AnimatePresence as f, motion as p } from "motion-v";
3
+ const C = /* @__PURE__ */ v({
4
+ __name: "Popover",
5
+ props: {
6
+ position: { type: String, default: "bottom", options: ["top", "bottom"] },
7
+ bodyClass: { type: String, default: "" },
8
+ contentClass: { type: String, default: "" }
9
+ },
10
+ setup(t) {
11
+ const o = y(!1);
12
+ return (r, e) => (s(), x("div", {
13
+ class: "relative inline-block",
14
+ onMouseleave: e[1] || (e[1] = (b) => o.value = !1)
15
+ }, [
16
+ l("div", {
17
+ class: "relative",
18
+ onMouseover: e[0] || (e[0] = (b) => o.value = !0)
19
+ }, [
20
+ u(a(f), null, {
21
+ default: i(() => [
22
+ o.value ? (s(), m(a(p).svg, {
23
+ key: 0,
24
+ class: n([{ "top-full": t.position === "bottom", "bottom-full rotate-180": t.position === "top" }, "text-border absolute left-1/2 w-4 -translate-x-1/2"]),
25
+ xmlns: "http://www.w3.org/2000/svg",
26
+ viewBox: "0 0 24 24",
27
+ initial: { opacity: 0, scale: 0.8 },
28
+ animate: { opacity: 1, scale: 1 },
29
+ exit: { opacity: 0, scale: 0.8 },
30
+ transition: {
31
+ duration: 0.2,
32
+ ease: [0.4, 0, 0.2, 1]
33
+ }
34
+ }, {
35
+ default: i(() => [...e[2] || (e[2] = [
36
+ l("path", {
37
+ fill: "currentColor",
38
+ d: "M3 19h18a1.002 1.002 0 0 0 .823-1.569l-9-13c-.373-.539-1.271-.539-1.645 0l-9 13A.999.999 0 0 0 3 19"
39
+ }, null, -1)
40
+ ])]),
41
+ _: 1
42
+ }, 8, ["class"])) : c("", !0)
43
+ ]),
44
+ _: 1
45
+ }),
46
+ l("div", {
47
+ class: n([t.position === "top" ? "-top-3.5" : "-bottom-3.5", "absolute left-0 right-0 mx-auto h-4"])
48
+ }, null, 2),
49
+ d(r.$slots, "default")
50
+ ], 32),
51
+ u(a(f), null, {
52
+ default: i(() => [
53
+ o.value ? (s(), m(a(p).div, {
54
+ key: 0,
55
+ class: n([[t.bodyClass, { "bottom-full mb-3": t.position === "top" }, { "top-full mt-3": t.position === "bottom" }], "absolute left-1/2 z-50 w-fit -translate-x-1/2"]),
56
+ initial: { opacity: 0, scale: 0.95, y: t.position === "top" ? 10 : -10 },
57
+ animate: { opacity: 1, scale: 1, y: 0 },
58
+ exit: { opacity: 0, scale: 0.95, y: t.position === "top" ? 10 : -10 },
59
+ transition: { duration: 0.2, ease: [0.4, 0, 0.2, 1] }
60
+ }, {
61
+ default: i(() => [
62
+ l("div", {
63
+ class: n([t.contentClass, "bg-background w-[200px] rounded-md border p-3"])
64
+ }, [
65
+ d(r.$slots, "body")
66
+ ], 2)
67
+ ]),
68
+ _: 3
69
+ }, 8, ["class", "initial", "exit"])) : c("", !0)
70
+ ]),
71
+ _: 3
72
+ })
73
+ ], 32));
74
+ }
75
+ });
76
+ export {
77
+ C as default
78
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./Popover.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,51 @@
1
+ import { defineComponent as c, computed as n, createElementBlock as s, openBlock as o, createElementVNode as l, normalizeClass as t, normalizeStyle as p, createCommentVNode as y, toDisplayString as f } from "vue";
2
+ const x = { class: "w-full" }, b = /* @__PURE__ */ c({
3
+ __name: "ProgressBar",
4
+ props: {
5
+ value: { type: Number, default: 0 },
6
+ max: { type: Number, default: 100 },
7
+ severity: { type: String, default: "primary" },
8
+ striped: { type: Boolean, default: !1 },
9
+ animated: { type: Boolean, default: !1 },
10
+ mode: { type: String, default: "determinate" },
11
+ textColor: { type: String, default: "white" }
12
+ },
13
+ setup(i) {
14
+ const e = i, r = n(() => Math.min(Math.max(e.value, 0), e.max) / e.max * 100), a = {
15
+ primary: "bg-primary",
16
+ secondary: "bg-secondary",
17
+ success: "bg-success",
18
+ info: "bg-info",
19
+ warning: "bg-warning",
20
+ error: "bg-error",
21
+ neutral: "bg-neutral-500"
22
+ }, d = {
23
+ primary: "text-primary",
24
+ secondary: "text-secondary",
25
+ success: "text-success",
26
+ info: "text-info",
27
+ warning: "text-warning",
28
+ error: "text-error",
29
+ neutral: "text-neutral-500",
30
+ white: "text-white"
31
+ }, u = n(() => [a[e.severity] || a.primary, { "bg-stripes": e.striped }, { "animate-pulse": e.animated }]);
32
+ return (m, g) => (o(), s("div", x, [
33
+ l("div", {
34
+ class: t([{ "h-4": e.mode === "determinate", "h-1.5": e.mode === "indeterminate" }, "w-full overflow-hidden rounded-full bg-neutral-200 dark:bg-neutral-800"])
35
+ }, [
36
+ l("div", {
37
+ class: t([u.value, "h-full transition-all duration-500 ease-out"]),
38
+ style: p({ width: `${r.value}%` })
39
+ }, [
40
+ e.mode === "determinate" ? (o(), s("div", {
41
+ key: 0,
42
+ class: t([d[e.textColor], "px-2 text-center text-xs font-medium"])
43
+ }, f(Math.round(r.value)) + "%", 3)) : y("", !0)
44
+ ], 6)
45
+ ], 2)
46
+ ]));
47
+ }
48
+ });
49
+ export {
50
+ b as default
51
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./ProgressBar.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,47 @@
1
+ import { defineComponent as l, computed as a, createElementBlock as c, openBlock as p, normalizeClass as m, createElementVNode as n } from "vue";
2
+ const d = /* @__PURE__ */ l({
3
+ __name: "ProgressSpinner",
4
+ props: {
5
+ severity: { type: String, default: "primary" },
6
+ size: { type: String, default: "md" }
7
+ },
8
+ setup(o) {
9
+ const e = o, t = {
10
+ primary: "text-primary",
11
+ secondary: "text-secondary",
12
+ success: "text-success",
13
+ info: "text-info",
14
+ warning: "text-warning",
15
+ error: "text-error",
16
+ neutral: "text-neutral-500"
17
+ }, s = {
18
+ sm: "size-8",
19
+ md: "size-12",
20
+ lg: "size-16",
21
+ xl: "size-24"
22
+ }, i = a(() => [t[e.severity] || t.primary, s[e.size] || s.md]);
23
+ return (u, r) => (p(), c("svg", {
24
+ class: m([i.value, "animate-spin"]),
25
+ viewBox: "0 0 24 24",
26
+ fill: "none",
27
+ xmlns: "http://www.w3.org/2000/svg"
28
+ }, [...r[0] || (r[0] = [
29
+ n("circle", {
30
+ class: "opacity-25",
31
+ cx: "12",
32
+ cy: "12",
33
+ r: "10",
34
+ "stroke-width": "4",
35
+ stroke: "currentColor"
36
+ }, null, -1),
37
+ n("path", {
38
+ class: "opacity-75",
39
+ d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",
40
+ fill: "currentColor"
41
+ }, null, -1)
42
+ ])], 2));
43
+ }
44
+ });
45
+ export {
46
+ d as default
47
+ };
@@ -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
+ };