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
@@ -1,6 +1,5 @@
1
- import { Icons } from '../exports/icons';
2
- import { Severity, Variant } from '../exports/types';
3
- import { DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
1
+ import { Component, DefineComponent, ExtractPropTypes, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ import { Margin, Padding, Severity, Variant } from '../exports/types';
4
3
  declare function __VLS_template(): {
5
4
  attrs: Partial<{}>;
6
5
  slots: {
@@ -21,13 +20,53 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
21
20
  default: string;
22
21
  };
23
22
  icon: {
24
- type: () => Icons;
25
- default: string;
23
+ type: () => Component;
24
+ default: () => null;
26
25
  };
27
26
  closable: {
28
27
  type: BooleanConstructor;
29
28
  default: boolean;
30
29
  };
30
+ margin: {
31
+ type: () => Margin;
32
+ default: string;
33
+ };
34
+ marginLeft: {
35
+ type: () => Margin;
36
+ default: string;
37
+ };
38
+ marginRight: {
39
+ type: () => Margin;
40
+ default: string;
41
+ };
42
+ marginTop: {
43
+ type: () => Margin;
44
+ default: string;
45
+ };
46
+ marginBottom: {
47
+ type: () => Margin;
48
+ default: string;
49
+ };
50
+ padding: {
51
+ type: () => Padding;
52
+ default: string;
53
+ };
54
+ paddingLeft: {
55
+ type: () => Padding;
56
+ default: string;
57
+ };
58
+ paddingRight: {
59
+ type: () => Padding;
60
+ default: string;
61
+ };
62
+ paddingTop: {
63
+ type: () => Padding;
64
+ default: string;
65
+ };
66
+ paddingBottom: {
67
+ type: () => Padding;
68
+ default: string;
69
+ };
31
70
  }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {
32
71
  close: () => any;
33
72
  }, string, PublicProps, Readonly< ExtractPropTypes<{
@@ -40,17 +79,67 @@ declare const __VLS_component: DefineComponent<ExtractPropTypes<{
40
79
  default: string;
41
80
  };
42
81
  icon: {
43
- type: () => Icons;
44
- default: string;
82
+ type: () => Component;
83
+ default: () => null;
45
84
  };
46
85
  closable: {
47
86
  type: BooleanConstructor;
48
87
  default: boolean;
49
88
  };
89
+ margin: {
90
+ type: () => Margin;
91
+ default: string;
92
+ };
93
+ marginLeft: {
94
+ type: () => Margin;
95
+ default: string;
96
+ };
97
+ marginRight: {
98
+ type: () => Margin;
99
+ default: string;
100
+ };
101
+ marginTop: {
102
+ type: () => Margin;
103
+ default: string;
104
+ };
105
+ marginBottom: {
106
+ type: () => Margin;
107
+ default: string;
108
+ };
109
+ padding: {
110
+ type: () => Padding;
111
+ default: string;
112
+ };
113
+ paddingLeft: {
114
+ type: () => Padding;
115
+ default: string;
116
+ };
117
+ paddingRight: {
118
+ type: () => Padding;
119
+ default: string;
120
+ };
121
+ paddingTop: {
122
+ type: () => Padding;
123
+ default: string;
124
+ };
125
+ paddingBottom: {
126
+ type: () => Padding;
127
+ default: string;
128
+ };
50
129
  }>> & Readonly<{
51
130
  onClose?: (() => any) | undefined;
52
131
  }>, {
53
- 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";
132
+ icon: Component;
133
+ margin: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
134
+ marginLeft: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
135
+ marginRight: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
136
+ marginTop: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
137
+ marginBottom: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
138
+ padding: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
139
+ paddingLeft: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
140
+ paddingRight: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
141
+ paddingTop: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
142
+ paddingBottom: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl";
54
143
  severity: Severity;
55
144
  variant: Variant;
56
145
  closable: boolean;
@@ -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,12 @@
1
+ import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
2
+ type __VLS_Props = {
3
+ modelValue: string;
4
+ };
5
+ declare const _default: DefineComponent<__VLS_Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
6
+ "update:modelValue": (value: string) => any;
7
+ }, string, PublicProps, Readonly<__VLS_Props> & Readonly<{
8
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
9
+ }>, {}, {}, {}, {}, string, ComponentProvideOptions, false, {
10
+ editor: HTMLDivElement;
11
+ }, HTMLDivElement>;
12
+ export default _default;
@@ -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
+ };