@gspa/ui 0.1.3 → 0.2.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 (280) hide show
  1. package/README.md +35 -0
  2. package/dist/Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js +205 -0
  3. package/dist/Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs +1 -0
  4. package/dist/DataTable.css +1 -0
  5. package/dist/DataTableToolBar.css +1 -0
  6. package/dist/FormField.vue_vue_type_script_setup_true_lang-DimMUyA-.js +205 -0
  7. package/dist/FormField.vue_vue_type_script_setup_true_lang-mEO-VA6R.cjs +1 -0
  8. package/dist/Header.css +1 -0
  9. package/dist/Input.vue_vue_type_script_setup_true_lang-C1OQn24h.cjs +1 -0
  10. package/dist/Input.vue_vue_type_script_setup_true_lang-CpBoY97r.js +137 -0
  11. package/dist/Loader.css +1 -0
  12. package/dist/ReminderConfig.css +1 -0
  13. package/dist/ReusableForm.css +1 -0
  14. package/dist/Sidebar.css +1 -0
  15. package/dist/Toast.css +1 -0
  16. package/dist/_plugin-vue_export-helper-BHFhmbuH.cjs +1 -0
  17. package/dist/_plugin-vue_export-helper-CHgC5LLL.js +9 -0
  18. package/dist/components/Accordion.cjs +1 -0
  19. package/dist/components/Accordion.js +192 -0
  20. package/dist/components/AccordionItem.cjs +1 -0
  21. package/dist/components/AccordionItem.js +109 -0
  22. package/dist/components/AddReminderModal.cjs +1 -0
  23. package/dist/components/AddReminderModal.js +107 -0
  24. package/dist/components/Alert.cjs +1 -0
  25. package/dist/components/Alert.js +227 -0
  26. package/dist/components/Avatar.cjs +1 -0
  27. package/dist/components/Avatar.js +86 -0
  28. package/dist/components/Badge.cjs +1 -0
  29. package/dist/components/Badge.js +109 -0
  30. package/dist/components/Breadcrumb.cjs +1 -0
  31. package/dist/components/Breadcrumb.js +72 -0
  32. package/dist/components/Button.cjs +1 -0
  33. package/dist/components/Button.js +4 -0
  34. package/dist/components/ButtonGroup.cjs +1 -0
  35. package/dist/components/ButtonGroup.js +46 -0
  36. package/dist/components/Calendar.cjs +1 -0
  37. package/dist/components/Calendar.js +341 -0
  38. package/dist/components/Card.cjs +1 -0
  39. package/dist/components/Card.js +316 -0
  40. package/dist/components/CardBody.cjs +1 -0
  41. package/dist/components/CardBody.js +34 -0
  42. package/dist/components/CardContent.cjs +1 -0
  43. package/dist/components/CardContent.js +17 -0
  44. package/dist/components/CardFooter.cjs +1 -0
  45. package/dist/components/CardFooter.js +34 -0
  46. package/dist/components/CardHeader.cjs +1 -0
  47. package/dist/components/CardHeader.js +91 -0
  48. package/dist/components/CardTitle.cjs +1 -0
  49. package/dist/components/CardTitle.js +17 -0
  50. package/dist/components/Checkbox.cjs +1 -0
  51. package/dist/components/Checkbox.js +185 -0
  52. package/dist/components/CircularProgress.cjs +1 -0
  53. package/dist/components/CircularProgress.js +141 -0
  54. package/dist/components/DataTable.cjs +1 -0
  55. package/dist/components/DataTable.js +863 -0
  56. package/dist/components/DataTableCell.cjs +1 -0
  57. package/dist/components/DataTableCell.js +95 -0
  58. package/dist/components/DataTableFilters.cjs +1 -0
  59. package/dist/components/DataTableFilters.js +519 -0
  60. package/dist/components/DataTableHeader.cjs +1 -0
  61. package/dist/components/DataTableHeader.js +116 -0
  62. package/dist/components/DataTablePagination.cjs +1 -0
  63. package/dist/components/DataTablePagination.js +290 -0
  64. package/dist/components/DataTableRow.cjs +1 -0
  65. package/dist/components/DataTableRow.js +199 -0
  66. package/dist/components/DataTableToolBar.cjs +1 -0
  67. package/dist/components/DataTableToolBar.js +477 -0
  68. package/dist/components/DatePicker.cjs +1 -0
  69. package/dist/components/DatePicker.js +401 -0
  70. package/dist/components/Divider.cjs +1 -0
  71. package/dist/components/Divider.js +103 -0
  72. package/dist/components/Dropdown.cjs +1 -0
  73. package/dist/components/Dropdown.js +104 -0
  74. package/dist/components/DropdownItem.cjs +1 -0
  75. package/dist/components/DropdownItem.js +60 -0
  76. package/dist/components/EventsCalendar.cjs +1 -0
  77. package/dist/components/EventsCalendar.js +863 -0
  78. package/dist/components/FileUpload.cjs +1 -0
  79. package/dist/components/FileUpload.js +195 -0
  80. package/dist/components/FilterDrawer.cjs +1 -0
  81. package/dist/components/FilterDrawer.js +412 -0
  82. package/dist/components/Footer.cjs +1 -0
  83. package/dist/components/Footer.js +157 -0
  84. package/dist/components/FormField.cjs +1 -0
  85. package/dist/components/FormField.js +4 -0
  86. package/dist/components/Graph.cjs +1 -0
  87. package/dist/components/Graph.js +164 -0
  88. package/dist/components/GraphFilters.cjs +1 -0
  89. package/dist/components/GraphFilters.js +305 -0
  90. package/dist/components/Header.cjs +1 -0
  91. package/dist/components/Header.js +674 -0
  92. package/dist/components/Icon.cjs +1 -0
  93. package/dist/components/Icon.js +58 -0
  94. package/dist/components/Image.cjs +1 -0
  95. package/dist/components/Image.js +112 -0
  96. package/dist/components/Input.cjs +1 -0
  97. package/dist/components/Input.js +4 -0
  98. package/dist/components/InputGroup.cjs +1 -0
  99. package/dist/components/InputGroup.js +45 -0
  100. package/dist/components/Label.cjs +1 -0
  101. package/dist/components/Label.js +46 -0
  102. package/dist/components/Link.cjs +1 -0
  103. package/dist/components/Link.js +119 -0
  104. package/dist/components/ListItem.cjs +1 -0
  105. package/dist/components/ListItem.js +89 -0
  106. package/dist/components/Loader.cjs +1 -0
  107. package/dist/components/Loader.js +154 -0
  108. package/dist/components/Logo.cjs +1 -0
  109. package/dist/components/Logo.js +67 -0
  110. package/dist/components/MenuItem.cjs +1 -0
  111. package/dist/components/MenuItem.js +66 -0
  112. package/dist/components/Modal.cjs +1 -0
  113. package/dist/components/Modal.js +110 -0
  114. package/dist/components/ModalBody.cjs +1 -0
  115. package/dist/components/ModalBody.js +33 -0
  116. package/dist/components/ModalFooter.cjs +1 -0
  117. package/dist/components/ModalFooter.js +33 -0
  118. package/dist/components/ModalHeader.cjs +1 -0
  119. package/dist/components/ModalHeader.js +24 -0
  120. package/dist/components/MultiSelect.cjs +1 -0
  121. package/dist/components/MultiSelect.js +211 -0
  122. package/dist/components/Notification.cjs +1 -0
  123. package/dist/components/Notification.js +121 -0
  124. package/dist/components/Option.cjs +1 -0
  125. package/dist/components/Option.js +44 -0
  126. package/dist/components/Progress.cjs +1 -0
  127. package/dist/components/Progress.js +77 -0
  128. package/dist/components/ProgressBar.cjs +1 -0
  129. package/dist/components/ProgressBar.js +101 -0
  130. package/dist/components/Radio.cjs +1 -0
  131. package/dist/components/Radio.js +81 -0
  132. package/dist/components/RailNav.cjs +1 -0
  133. package/dist/components/RailNav.js +124 -0
  134. package/dist/components/ReminderConfig.cjs +1 -0
  135. package/dist/components/ReminderConfig.js +375 -0
  136. package/dist/components/ReusableForm.cjs +1 -0
  137. package/dist/components/ReusableForm.js +686 -0
  138. package/dist/components/ReusableFormModal.cjs +1 -0
  139. package/dist/components/ReusableFormModal.js +112 -0
  140. package/dist/components/RightDrawer.cjs +1 -0
  141. package/dist/components/RightDrawer.js +143 -0
  142. package/dist/components/Search.cjs +1 -0
  143. package/dist/components/Search.js +252 -0
  144. package/dist/components/Select.cjs +1 -0
  145. package/dist/components/Select.js +243 -0
  146. package/dist/components/Sidebar.cjs +1 -0
  147. package/dist/components/Sidebar.js +372 -0
  148. package/dist/components/Slider.cjs +1 -0
  149. package/dist/components/Slider.js +42 -0
  150. package/dist/components/Spinner.cjs +1 -0
  151. package/dist/components/Spinner.js +87 -0
  152. package/dist/components/Stepper.cjs +1 -0
  153. package/dist/components/Stepper.js +12 -0
  154. package/dist/components/StepperItem.cjs +1 -0
  155. package/dist/components/StepperItem.js +33 -0
  156. package/dist/components/Switch.cjs +1 -0
  157. package/dist/components/Switch.js +112 -0
  158. package/dist/components/Tab.cjs +1 -0
  159. package/dist/components/Tab.js +134 -0
  160. package/dist/components/TabPanel.cjs +1 -0
  161. package/dist/components/TabPanel.js +49 -0
  162. package/dist/components/Text.cjs +1 -0
  163. package/dist/components/Text.js +84 -0
  164. package/dist/components/Textarea.cjs +1 -0
  165. package/dist/components/Textarea.js +102 -0
  166. package/dist/components/ThemeConfigurator.cjs +1 -0
  167. package/dist/components/ThemeConfigurator.js +73 -0
  168. package/dist/components/Timeline.cjs +1 -0
  169. package/dist/components/Timeline.js +24 -0
  170. package/dist/components/TimelineItem.cjs +1 -0
  171. package/dist/components/TimelineItem.js +63 -0
  172. package/dist/components/Toast.cjs +1 -0
  173. package/dist/components/Toast.js +231 -0
  174. package/dist/components/Tooltip.cjs +1 -0
  175. package/dist/components/Tooltip.js +124 -0
  176. package/dist/components/Typography.cjs +1 -0
  177. package/dist/components/Typography.js +267 -0
  178. package/dist/components/charts/BarChart.cjs +1 -0
  179. package/dist/components/charts/BarChart.js +323 -0
  180. package/dist/components/charts/LineChart.cjs +1 -0
  181. package/dist/components/charts/LineChart.js +322 -0
  182. package/dist/components/charts/PieChart.cjs +1 -0
  183. package/dist/components/charts/PieChart.js +311 -0
  184. package/dist/components/charts/StackedBarChart.cjs +1 -0
  185. package/dist/components/charts/StackedBarChart.js +348 -0
  186. package/dist/components/widgets/DashboardWidget.cjs +1 -0
  187. package/dist/components/widgets/DashboardWidget.js +309 -0
  188. package/dist/directives/tooltip.cjs +47 -0
  189. package/dist/directives/tooltip.js +115 -0
  190. package/dist/gspa-ui.css +1 -1
  191. package/dist/index.cjs +1 -0
  192. package/dist/index.esm.js +315 -19546
  193. package/dist/layouts/AuthLayout.cjs +1 -0
  194. package/dist/layouts/AuthLayout.js +188 -0
  195. package/dist/layouts/DashboardLayout.cjs +1 -0
  196. package/dist/layouts/DashboardLayout.js +244 -0
  197. package/dist/layouts/DefaultLayout.cjs +1 -0
  198. package/dist/layouts/DefaultLayout.js +94 -0
  199. package/dist/layouts/ErrorLayout.cjs +1 -0
  200. package/dist/layouts/ErrorLayout.js +452 -0
  201. package/dist/lib/auth.cjs +1 -0
  202. package/dist/lib/auth.js +4 -0
  203. package/dist/lib/form-field.cjs +1 -0
  204. package/dist/lib/form-field.js +4 -0
  205. package/dist/lib/icon.cjs +1 -0
  206. package/dist/lib/icon.js +4 -0
  207. package/dist/lib/theme.cjs +1 -0
  208. package/dist/lib/theme.js +145 -0
  209. package/dist/lib/toast.cjs +1 -0
  210. package/dist/lib/toast.js +81 -0
  211. package/dist/src/components/Alert.vue.d.ts.map +1 -1
  212. package/dist/src/components/Button.vue.d.ts +127 -29
  213. package/dist/src/components/Button.vue.d.ts.map +1 -1
  214. package/dist/src/components/Checkbox.vue.d.ts +2 -2
  215. package/dist/src/components/DataTable.vue.d.ts +1 -1
  216. package/dist/src/components/FormField.vue.d.ts +106 -38
  217. package/dist/src/components/FormField.vue.d.ts.map +1 -1
  218. package/dist/src/components/Icon.vue.d.ts.map +1 -1
  219. package/dist/src/components/Input.vue.d.ts +137 -33
  220. package/dist/src/components/Input.vue.d.ts.map +1 -1
  221. package/dist/src/components/ReusableForm.vue.d.ts +1 -1
  222. package/dist/src/components/ReusableForm.vue.d.ts.map +1 -1
  223. package/dist/src/components/ReusableFormModal.vue.d.ts +1 -1
  224. package/dist/src/components/Textarea.vue.d.ts +2 -2
  225. package/dist/src/index.d.ts +9 -4
  226. package/dist/src/index.d.ts.map +1 -1
  227. package/dist/src/layouts/AuthLayout.vue.d.ts +2 -0
  228. package/dist/src/layouts/AuthLayout.vue.d.ts.map +1 -1
  229. package/dist/src/lib/form-field.d.ts +2 -0
  230. package/dist/src/lib/form-field.d.ts.map +1 -0
  231. package/dist/src/lib/icon.d.ts +2 -0
  232. package/dist/src/lib/icon.d.ts.map +1 -0
  233. package/dist/src/lib/theme.d.ts +4 -0
  234. package/dist/src/lib/theme.d.ts.map +1 -1
  235. package/dist/src/types.d.ts +44 -0
  236. package/dist/src/types.d.ts.map +1 -0
  237. package/dist/styles/auth-layout.css +1 -0
  238. package/dist/styles/button.css +1 -0
  239. package/dist/styles/form-field.css +1 -0
  240. package/dist/styles/input.css +1 -0
  241. package/dist/styles/tokens.css +1 -0
  242. package/dist/tsconfig.tsbuildinfo +1 -1
  243. package/dist/utils/cn.cjs +1 -0
  244. package/dist/utils/cn.js +7 -0
  245. package/package.json +45 -8
  246. package/dist/index.js +0 -605
  247. package/dist/src/__tests__/Alert.spec.d.ts +0 -2
  248. package/dist/src/__tests__/Alert.spec.d.ts.map +0 -1
  249. package/dist/src/__tests__/App.spec.d.ts +0 -2
  250. package/dist/src/__tests__/App.spec.d.ts.map +0 -1
  251. package/dist/src/__tests__/AuthLayout.spec.d.ts +0 -2
  252. package/dist/src/__tests__/AuthLayout.spec.d.ts.map +0 -1
  253. package/dist/src/__tests__/Badge.spec.d.ts +0 -2
  254. package/dist/src/__tests__/Badge.spec.d.ts.map +0 -1
  255. package/dist/src/__tests__/Button.spec.d.ts +0 -2
  256. package/dist/src/__tests__/Button.spec.d.ts.map +0 -1
  257. package/dist/src/__tests__/Card.spec.d.ts +0 -2
  258. package/dist/src/__tests__/Card.spec.d.ts.map +0 -1
  259. package/dist/src/__tests__/Checkbox.spec.d.ts +0 -2
  260. package/dist/src/__tests__/Checkbox.spec.d.ts.map +0 -1
  261. package/dist/src/__tests__/Dropdown.spec.d.ts +0 -2
  262. package/dist/src/__tests__/Dropdown.spec.d.ts.map +0 -1
  263. package/dist/src/__tests__/Input.spec.d.ts +0 -2
  264. package/dist/src/__tests__/Input.spec.d.ts.map +0 -1
  265. package/dist/src/__tests__/Modal.spec.d.ts +0 -2
  266. package/dist/src/__tests__/Modal.spec.d.ts.map +0 -1
  267. package/dist/src/__tests__/Radio.spec.d.ts +0 -2
  268. package/dist/src/__tests__/Radio.spec.d.ts.map +0 -1
  269. package/dist/src/__tests__/ReusableForm.spec.d.ts +0 -2
  270. package/dist/src/__tests__/ReusableForm.spec.d.ts.map +0 -1
  271. package/dist/src/__tests__/Tabs.spec.d.ts +0 -2
  272. package/dist/src/__tests__/Tabs.spec.d.ts.map +0 -1
  273. package/dist/src/__tests__/integration/CardIntegration.spec.d.ts +0 -2
  274. package/dist/src/__tests__/integration/CardIntegration.spec.d.ts.map +0 -1
  275. package/dist/src/__tests__/integration/FormIntegration.spec.d.ts +0 -2
  276. package/dist/src/__tests__/integration/FormIntegration.spec.d.ts.map +0 -1
  277. package/dist/src/__tests__/integration/ModalIntegration.spec.d.ts +0 -2
  278. package/dist/src/__tests__/integration/ModalIntegration.spec.d.ts.map +0 -1
  279. package/dist/src/__tests__/integration/NavigationIntegration.spec.d.ts +0 -2
  280. package/dist/src/__tests__/integration/NavigationIntegration.spec.d.ts.map +0 -1
@@ -0,0 +1,227 @@
1
+ import { ref as V, onBeforeUnmount as $, computed as c, createBlock as u, openBlock as s, Transition as A, withCtx as p, createElementBlock as i, createCommentVNode as a, normalizeClass as l, unref as y, createElementVNode as d, resolveDynamicComponent as N, toDisplayString as m, renderSlot as x, createTextVNode as C, Fragment as D, renderList as E, createVNode as X, h as r } from "vue";
2
+ import { cva as F } from "class-variance-authority";
3
+ import { cn as O } from "../utils/cn.js";
4
+ import { _ as U } from "../Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js";
5
+ const q = ["aria-live"], G = { class: "flex items-start gap-3" }, H = {
6
+ key: 0,
7
+ class: "shrink-0 mt-0.5"
8
+ }, J = { class: "flex-1 min-w-0" }, K = {
9
+ key: 0,
10
+ class: "font-medium text-sm mb-1"
11
+ }, P = {
12
+ key: 1,
13
+ class: "mt-3 flex gap-2"
14
+ }, Q = ["aria-label"], te = /* @__PURE__ */ Object.assign({ inheritAttrs: !1 }, {
15
+ __name: "Alert",
16
+ props: {
17
+ variant: {
18
+ type: String,
19
+ default: "info",
20
+ validator: (e) => ["info", "success", "warning", "error", "default", "danger"].includes(
21
+ e
22
+ )
23
+ },
24
+ title: String,
25
+ message: String,
26
+ dismissible: { type: Boolean, default: !1 },
27
+ dismissLabel: { type: String, default: "Dismiss alert" },
28
+ showIcon: { type: Boolean, default: !0 },
29
+ actions: { type: Array, default: () => [] },
30
+ autoClose: { type: [Boolean, Number], default: !1 }
31
+ },
32
+ emits: ["dismiss", "action"],
33
+ setup(e, { emit: b }) {
34
+ const n = e, v = b, f = V(!0), g = () => {
35
+ f.value = !1, v("dismiss");
36
+ }, B = (t) => {
37
+ v("action", t), t.onClick && t.onClick();
38
+ };
39
+ let h;
40
+ if (n.autoClose) {
41
+ const t = typeof n.autoClose == "number" ? n.autoClose : 5e3;
42
+ h = setTimeout(g, t);
43
+ }
44
+ $(() => clearTimeout(h));
45
+ const w = {
46
+ render() {
47
+ return r("svg", {
48
+ xmlns: "http://www.w3.org/2000/svg",
49
+ fill: "none",
50
+ viewBox: "0 0 24 24",
51
+ stroke: "currentColor"
52
+ }, [
53
+ r("path", {
54
+ "stroke-linecap": "round",
55
+ "stroke-linejoin": "round",
56
+ "stroke-width": "2",
57
+ d: "M12 9v2m0 4h.01M21 12A9 9 0 1112 3a9 9 0 019 9z"
58
+ })
59
+ ]);
60
+ }
61
+ }, M = {
62
+ render() {
63
+ return r("svg", {
64
+ xmlns: "http://www.w3.org/2000/svg",
65
+ fill: "none",
66
+ viewBox: "0 0 24 24",
67
+ stroke: "currentColor"
68
+ }, [
69
+ r("path", {
70
+ "stroke-linecap": "round",
71
+ "stroke-linejoin": "round",
72
+ "stroke-width": "2",
73
+ d: "M9 12l2 2l4-4m5 2a9 9 0 11-18 0a9 9 0 0118 0z"
74
+ })
75
+ ]);
76
+ }
77
+ }, z = {
78
+ render() {
79
+ return r("svg", {
80
+ xmlns: "http://www.w3.org/2000/svg",
81
+ fill: "none",
82
+ viewBox: "0 0 24 24",
83
+ stroke: "currentColor"
84
+ }, [
85
+ r("path", {
86
+ "stroke-linecap": "round",
87
+ "stroke-linejoin": "round",
88
+ "stroke-width": "2",
89
+ d: "M12 9v2m0 4h.01M10.29 3.86L1.82 18a1.5 1.5 0 001.29 2.25h18.78a1.5 1.5 0 001.29-2.25L13.71 3.86a1.5 1.5 0 00-2.42 0z"
90
+ })
91
+ ]);
92
+ }
93
+ }, k = {
94
+ render() {
95
+ return r("svg", {
96
+ xmlns: "http://www.w3.org/2000/svg",
97
+ fill: "none",
98
+ viewBox: "0 0 24 24",
99
+ stroke: "currentColor"
100
+ }, [
101
+ r("path", {
102
+ "stroke-linecap": "round",
103
+ "stroke-linejoin": "round",
104
+ "stroke-width": "2",
105
+ d: "M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0a9 9 0 0118 0z"
106
+ })
107
+ ]);
108
+ }
109
+ }, I = {
110
+ render() {
111
+ return r("svg", {
112
+ xmlns: "http://www.w3.org/2000/svg",
113
+ fill: "none",
114
+ viewBox: "0 0 24 24",
115
+ stroke: "currentColor"
116
+ }, [
117
+ r("path", {
118
+ "stroke-linecap": "round",
119
+ "stroke-linejoin": "round",
120
+ "stroke-width": "2",
121
+ d: "M6 18L18 6M6 6l12 12"
122
+ })
123
+ ]);
124
+ }
125
+ }, j = c(() => ({
126
+ info: w,
127
+ success: M,
128
+ warning: z,
129
+ error: k,
130
+ default: w,
131
+ danger: k
132
+ })[n.variant]), L = F(
133
+ "relative w-full rounded-lg border p-4 flex items-start gap-3 ",
134
+ {
135
+ variants: {
136
+ variant: {
137
+ default: "ui-surface ui-text ",
138
+ danger: "ui-danger-soft ui-danger",
139
+ info: "ui-primary-soft ui-primary",
140
+ success: "ui-success-soft ui-success",
141
+ warning: "ui-warning-soft ui-warning",
142
+ error: "ui-danger-soft ui-danger"
143
+ }
144
+ },
145
+ defaultVariants: { variant: "default" }
146
+ }
147
+ ), S = c(() => ["w-5 h-5", {
148
+ info: "ui-primary",
149
+ success: "ui-success",
150
+ warning: "ui-warning",
151
+ error: "ui-danger",
152
+ default: "ui-text",
153
+ danger: "ui-danger"
154
+ }[n.variant]]), T = c(() => ["shrink-0 p-1 rounded-md transition-colors duration-200", {
155
+ info: "ui-primary hover:text-(--ui-primary) hover:bg-(--ui-primary-soft)",
156
+ success: "ui-success hover:text-(--ui-success) hover:bg-(--ui-success-soft)",
157
+ warning: "ui-warning hover:text-(--ui-warning) hover:bg-(--ui-warning-soft)",
158
+ error: "ui-danger hover:text-(--ui-danger) hover:bg-(--ui-danger-soft)",
159
+ default: "ui-text hover:text-(--ui-text) hover:bg-(--ui-surface)",
160
+ danger: "ui-danger hover:text-(--ui-danger) hover:bg-(--ui-danger-soft)"
161
+ }[n.variant]]);
162
+ return (t, R) => (s(), u(A, {
163
+ "enter-active-class": "transition-all duration-300",
164
+ "enter-from-class": "opacity-0 scale-95",
165
+ "enter-to-class": "opacity-100 scale-100",
166
+ "leave-active-class": "transition-all duration-200",
167
+ "leave-from-class": "opacity-100 scale-100",
168
+ "leave-to-class": "opacity-0 scale-95"
169
+ }, {
170
+ default: p(() => [
171
+ f.value ? (s(), i("div", {
172
+ key: 0,
173
+ class: l(y(O)(y(L)({ variant: e.variant }), t.$attrs.class)),
174
+ role: "alert",
175
+ "aria-live": e.variant === "error" || e.variant === "danger" ? "assertive" : "polite",
176
+ "aria-atomic": "true"
177
+ }, [
178
+ d("div", G, [
179
+ e.showIcon ? (s(), i("div", H, [
180
+ (s(), u(N(j.value), {
181
+ class: l(S.value)
182
+ }, null, 8, ["class"]))
183
+ ])) : a("", !0),
184
+ d("div", J, [
185
+ e.title ? (s(), i("h4", K, m(e.title), 1)) : a("", !0),
186
+ d("div", {
187
+ class: l(["text-sm", { "mt-0": !e.title, "mt-1": e.title }])
188
+ }, [
189
+ x(t.$slots, "default", {}, () => [
190
+ C(m(e.message), 1)
191
+ ])
192
+ ], 2),
193
+ t.$slots.actions || e.actions.length > 0 ? (s(), i("div", P, [
194
+ x(t.$slots, "actions", {}, () => [
195
+ (s(!0), i(D, null, E(e.actions, (o) => (s(), u(U, {
196
+ key: o.label,
197
+ variant: o.variant || "outline",
198
+ size: o.size || "sm",
199
+ onClick: (W) => B(o)
200
+ }, {
201
+ default: p(() => [
202
+ C(m(o.label), 1)
203
+ ]),
204
+ _: 2
205
+ }, 1032, ["variant", "size", "onClick"]))), 128))
206
+ ])
207
+ ])) : a("", !0)
208
+ ]),
209
+ e.dismissible ? (s(), i("button", {
210
+ key: 1,
211
+ type: "button",
212
+ class: l(T.value),
213
+ "aria-label": e.dismissLabel,
214
+ onClick: g
215
+ }, [
216
+ X(I, { class: "w-4 h-4" })
217
+ ], 10, Q)) : a("", !0)
218
+ ])
219
+ ], 10, q)) : a("", !0)
220
+ ]),
221
+ _: 3
222
+ }));
223
+ }
224
+ });
225
+ export {
226
+ te as default
227
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),d=require("class-variance-authority"),l=require("../utils/cn.cjs"),m=require("./Icon.cjs"),f=["src","alt"],g={__name:"Avatar",props:{src:String,alt:String,initials:String,size:{type:String,default:"md",validator:s=>["xs","sm","md","lg","xl"].includes(s)},variant:{type:String,default:"default",validator:s=>["default","outline"].includes(s)},class:String},setup(s){const t=s,a=e.ref(!1),r=d.cva("relative flex shrink-0 overflow-hidden rounded-full",{variants:{size:{xs:"h-6 w-6",sm:"h-8 w-8",md:"h-10 w-10",lg:"h-12 w-12",xl:"h-16 w-16"},variant:{default:"bg-muted",outline:"border-2 ui-border-strong ui-surface "}}}),n=e.computed(()=>l.cn(r({size:t.size,variant:t.variant}),t.class)),i=e.computed(()=>"aspect-square h-full w-full object-cover"),c=e.computed(()=>l.cn("flex h-full w-full items-center justify-center rounded-full bg-muted font-medium text-muted-foreground",{"text-xs":t.size==="xs","text-sm":t.size==="sm","text-base":t.size==="md","text-lg":t.size==="lg","text-xl":t.size==="xl"})),o=e.computed(()=>l.cn("h-4 w-4 text-muted-foreground",{"h-3 w-3":t.size==="xs","h-4 w-4":t.size==="sm"||t.size==="md","h-5 w-5":t.size==="lg","h-6 w-6":t.size==="xl"})),u=()=>{a.value=!0};return(v,x)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(n.value)},[s.src?(e.openBlock(),e.createElementBlock("img",{key:0,src:s.src,alt:s.alt,class:e.normalizeClass(i.value),onError:u},null,42,f)):s.initials?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(c.value)},e.toDisplayString(s.initials),3)):(e.openBlock(),e.createBlock(m.default,{key:2,name:"user",class:e.normalizeClass(o.value)},null,8,["class"]))],2))}};exports.default=g;
@@ -0,0 +1,86 @@
1
+ import { ref as g, computed as t, createElementBlock as i, openBlock as a, normalizeClass as l, createBlock as x, toDisplayString as v } from "vue";
2
+ import { cva as h } from "class-variance-authority";
3
+ import { cn as r } from "../utils/cn.js";
4
+ import z from "./Icon.js";
5
+ const w = ["src", "alt"], E = {
6
+ __name: "Avatar",
7
+ props: {
8
+ src: String,
9
+ alt: String,
10
+ initials: String,
11
+ size: {
12
+ type: String,
13
+ default: "md",
14
+ validator: (s) => ["xs", "sm", "md", "lg", "xl"].includes(s)
15
+ },
16
+ variant: {
17
+ type: String,
18
+ default: "default",
19
+ validator: (s) => ["default", "outline"].includes(s)
20
+ },
21
+ class: String
22
+ },
23
+ setup(s) {
24
+ const e = s, n = g(!1), o = h(
25
+ "relative flex shrink-0 overflow-hidden rounded-full",
26
+ {
27
+ variants: {
28
+ size: {
29
+ xs: "h-6 w-6",
30
+ sm: "h-8 w-8",
31
+ md: "h-10 w-10",
32
+ lg: "h-12 w-12",
33
+ xl: "h-16 w-16"
34
+ },
35
+ variant: {
36
+ default: "bg-muted",
37
+ outline: "border-2 ui-border-strong ui-surface "
38
+ }
39
+ }
40
+ }
41
+ ), c = t(
42
+ () => r(o({ size: e.size, variant: e.variant }), e.class)
43
+ ), u = t(() => "aspect-square h-full w-full object-cover"), m = t(
44
+ () => r(
45
+ "flex h-full w-full items-center justify-center rounded-full bg-muted font-medium text-muted-foreground",
46
+ {
47
+ "text-xs": e.size === "xs",
48
+ "text-sm": e.size === "sm",
49
+ "text-base": e.size === "md",
50
+ "text-lg": e.size === "lg",
51
+ "text-xl": e.size === "xl"
52
+ }
53
+ )
54
+ ), d = t(
55
+ () => r("h-4 w-4 text-muted-foreground", {
56
+ "h-3 w-3": e.size === "xs",
57
+ "h-4 w-4": e.size === "sm" || e.size === "md",
58
+ "h-5 w-5": e.size === "lg",
59
+ "h-6 w-6": e.size === "xl"
60
+ })
61
+ ), f = () => {
62
+ n.value = !0;
63
+ };
64
+ return (k, p) => (a(), i("div", {
65
+ class: l(c.value)
66
+ }, [
67
+ s.src ? (a(), i("img", {
68
+ key: 0,
69
+ src: s.src,
70
+ alt: s.alt,
71
+ class: l(u.value),
72
+ onError: f
73
+ }, null, 42, w)) : s.initials ? (a(), i("span", {
74
+ key: 1,
75
+ class: l(m.value)
76
+ }, v(s.initials), 3)) : (a(), x(z, {
77
+ key: 2,
78
+ name: "user",
79
+ class: l(d.value)
80
+ }, null, 8, ["class"]))
81
+ ], 2));
82
+ }
83
+ };
84
+ export {
85
+ E as default
86
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const r=require("vue"),d=require("class-variance-authority"),l=require("../utils/cn.cjs"),c=require("./Icon.cjs"),m=["aria-label"],b=Object.assign({inheritAttrs:!1},{__name:"Badge",props:{variant:{type:String,default:"default",validator:e=>["default","secondary","danger","primary","outline","success","warning","info","ghost","link","subtle","dark","light","primaryOutline","dangerOutline","successOutline","gradient"].includes(e)},size:{type:String,default:"md",validator:e=>["sm","md","lg"].includes(e)},shape:{type:String,default:"rounded",validator:e=>["rounded","pill","square"].includes(e)},icon:{type:[String,Object],default:null},dismissible:{type:Boolean,default:!1},dismissLabel:{type:String,default:"Dismiss"}},emits:["dismiss"],setup(e,{emit:t}){const a=e,s=t,o=()=>s("dismiss"),u=d.cva("inline-flex items-center font-medium border transition-all duration-200",{variants:{variant:{default:"border border-(--ui-primary-soft) ui-primary-soft ui-primary hover:bg-(--ui-primary-soft) dark:border-(--ui-primary-soft) dark:bg-(--ui-primary-soft) dark:text-(--ui-primary)",secondary:"border ui-border-strong ui-surface-muted ui-text hover:bg-(--ui-surface) dark:border-(--ui-border-strong) dark:bg-(--ui-surface) dark:text-(--ui-text)",danger:"border border-(--ui-danger-soft) ui-danger-soft ui-danger hover:bg-(--ui-danger-soft) dark:border-(--ui-danger-soft) dark:bg-(--ui-danger-soft) dark:text-(--ui-danger)",primary:"border border-(--ui-primary-soft) ui-primary-soft ui-primary hover:bg-(--ui-primary-soft) dark:border-(--ui-primary-soft) dark:bg-(--ui-primary-soft) dark:text-(--ui-primary)",outline:"ui-text border",success:"border border-(--ui-success-soft) ui-success-soft ui-success dark:border-(--ui-success-soft) dark:bg-(--ui-success-soft) dark:text-(--ui-success)",warning:"border border-(--ui-warning-soft) ui-warning-soft ui-warning hover:bg-(--ui-warning-soft) dark:border-(--ui-warning-soft) dark:bg-(--ui-warning-soft) dark:text-(--ui-warning)",info:"border border-(--ui-primary-soft) ui-primary-soft ui-primary hover:bg-(--ui-primary-soft) dark:border-(--ui-primary-soft) dark:bg-(--ui-primary-soft) dark:text-(--ui-primary)",ghost:"bg-transparent ui-text hover:bg-(--ui-surface)",link:"ui-primary hover:underline",subtle:"ui-surface-muted ui-text hover:bg-(--ui-bg)",dark:"ui-bg ui-text hover:bg-(--ui-bg)",light:"ui-surface-muted ui-text border ui-border-strong hover:bg-(--ui-surface)",primaryOutline:"border border-(--ui-primary) ui-primary bg-transparent hover:bg-(--ui-primary-soft)",dangerOutline:"border border-(--ui-danger) ui-danger bg-transparent hover:bg-(--ui-danger-soft)",successOutline:"border border-(--ui-success) ui-success bg-transparent hover:bg-(--ui-success-soft)",gradient:"bg-linear-to-r from-(--ui-primary-soft) to-(--ui-accent) ui-text hover:from-(--ui-primary) hover:to-(--ui-accent)"},size:{sm:"px-2 py-0.5 text-xs",md:"px-2.5 py-1 text-sm",lg:"px-3 py-1.5 text-base"},shape:{rounded:"rounded-md",pill:"rounded-full",square:"rounded-none"}},defaultVariants:{variant:"default",size:"md",shape:"rounded"}}),n=r.computed(()=>["mr-1",{sm:"w-3 h-3",md:"w-4 h-4",lg:"w-5 h-5"}[a.size]]);return(i,g)=>(r.openBlock(),r.createElementBlock("span",{class:r.normalizeClass(r.unref(l.cn)(r.unref(u)({variant:e.variant,size:e.size,shape:e.shape}),i.$attrs.class))},[e.icon?(r.openBlock(),r.createBlock(r.resolveDynamicComponent(e.icon),{key:0,class:r.normalizeClass(n.value)},null,8,["class"])):r.createCommentVNode("",!0),r.renderSlot(i.$slots,"default"),e.dismissible?(r.openBlock(),r.createElementBlock("button",{key:1,class:"ml-1 hover:bg-[color:color-mix(in oklab, var(--ui-bg), transparent 90%)] rounded-full p-0.5 transition-colors","aria-label":e.dismissLabel,onClick:o},[r.createVNode(c.default,{icon:"circle-xmark",class:"w-3 h-3"})],8,m)):r.createCommentVNode("",!0)],2))}});exports.default=b;
@@ -0,0 +1,109 @@
1
+ import { computed as b, createElementBlock as t, openBlock as i, normalizeClass as a, unref as s, createBlock as g, createCommentVNode as o, renderSlot as f, resolveDynamicComponent as p, createVNode as y } from "vue";
2
+ import { cva as h } from "class-variance-authority";
3
+ import { cn as k } from "../utils/cn.js";
4
+ import v from "./Icon.js";
5
+ const x = ["aria-label"], C = /* @__PURE__ */ Object.assign({
6
+ inheritAttrs: !1
7
+ }, {
8
+ __name: "Badge",
9
+ props: {
10
+ variant: {
11
+ type: String,
12
+ default: "default",
13
+ validator: (r) => ["default", "secondary", "danger", "primary", "outline", "success", "warning", "info", "ghost", "link", "subtle", "dark", "light", "primaryOutline", "dangerOutline", "successOutline", "gradient"].includes(r)
14
+ },
15
+ size: {
16
+ type: String,
17
+ default: "md",
18
+ validator: (r) => ["sm", "md", "lg"].includes(r)
19
+ },
20
+ shape: {
21
+ type: String,
22
+ default: "rounded",
23
+ validator: (r) => ["rounded", "pill", "square"].includes(r)
24
+ },
25
+ icon: {
26
+ type: [String, Object],
27
+ default: null
28
+ },
29
+ dismissible: {
30
+ type: Boolean,
31
+ default: !1
32
+ },
33
+ dismissLabel: {
34
+ type: String,
35
+ default: "Dismiss"
36
+ }
37
+ },
38
+ emits: ["dismiss"],
39
+ setup(r, { emit: u }) {
40
+ const n = r, d = u, l = () => d("dismiss"), c = h(
41
+ "inline-flex items-center font-medium border transition-all duration-200",
42
+ {
43
+ variants: {
44
+ variant: {
45
+ default: "border border-(--ui-primary-soft) ui-primary-soft ui-primary hover:bg-(--ui-primary-soft) dark:border-(--ui-primary-soft) dark:bg-(--ui-primary-soft) dark:text-(--ui-primary)",
46
+ secondary: "border ui-border-strong ui-surface-muted ui-text hover:bg-(--ui-surface) dark:border-(--ui-border-strong) dark:bg-(--ui-surface) dark:text-(--ui-text)",
47
+ danger: "border border-(--ui-danger-soft) ui-danger-soft ui-danger hover:bg-(--ui-danger-soft) dark:border-(--ui-danger-soft) dark:bg-(--ui-danger-soft) dark:text-(--ui-danger)",
48
+ primary: "border border-(--ui-primary-soft) ui-primary-soft ui-primary hover:bg-(--ui-primary-soft) dark:border-(--ui-primary-soft) dark:bg-(--ui-primary-soft) dark:text-(--ui-primary)",
49
+ outline: "ui-text border",
50
+ success: "border border-(--ui-success-soft) ui-success-soft ui-success dark:border-(--ui-success-soft) dark:bg-(--ui-success-soft) dark:text-(--ui-success)",
51
+ warning: "border border-(--ui-warning-soft) ui-warning-soft ui-warning hover:bg-(--ui-warning-soft) dark:border-(--ui-warning-soft) dark:bg-(--ui-warning-soft) dark:text-(--ui-warning)",
52
+ info: "border border-(--ui-primary-soft) ui-primary-soft ui-primary hover:bg-(--ui-primary-soft) dark:border-(--ui-primary-soft) dark:bg-(--ui-primary-soft) dark:text-(--ui-primary)",
53
+ ghost: "bg-transparent ui-text hover:bg-(--ui-surface)",
54
+ link: "ui-primary hover:underline",
55
+ subtle: "ui-surface-muted ui-text hover:bg-(--ui-bg)",
56
+ dark: "ui-bg ui-text hover:bg-(--ui-bg)",
57
+ light: "ui-surface-muted ui-text border ui-border-strong hover:bg-(--ui-surface)",
58
+ primaryOutline: "border border-(--ui-primary) ui-primary bg-transparent hover:bg-(--ui-primary-soft)",
59
+ dangerOutline: "border border-(--ui-danger) ui-danger bg-transparent hover:bg-(--ui-danger-soft)",
60
+ successOutline: "border border-(--ui-success) ui-success bg-transparent hover:bg-(--ui-success-soft)",
61
+ gradient: "bg-linear-to-r from-(--ui-primary-soft) to-(--ui-accent) ui-text hover:from-(--ui-primary) hover:to-(--ui-accent)"
62
+ },
63
+ size: {
64
+ sm: "px-2 py-0.5 text-xs",
65
+ md: "px-2.5 py-1 text-sm",
66
+ lg: "px-3 py-1.5 text-base"
67
+ },
68
+ shape: {
69
+ rounded: "rounded-md",
70
+ pill: "rounded-full",
71
+ square: "rounded-none"
72
+ }
73
+ },
74
+ defaultVariants: {
75
+ variant: "default",
76
+ size: "md",
77
+ shape: "rounded"
78
+ }
79
+ }
80
+ ), m = b(() => ["mr-1", {
81
+ sm: "w-3 h-3",
82
+ md: "w-4 h-4",
83
+ lg: "w-5 h-5"
84
+ }[n.size]]);
85
+ return (e, w) => (i(), t("span", {
86
+ class: a(s(k)(s(c)({ variant: r.variant, size: r.size, shape: r.shape }), e.$attrs.class))
87
+ }, [
88
+ r.icon ? (i(), g(p(r.icon), {
89
+ key: 0,
90
+ class: a(m.value)
91
+ }, null, 8, ["class"])) : o("", !0),
92
+ f(e.$slots, "default"),
93
+ r.dismissible ? (i(), t("button", {
94
+ key: 1,
95
+ class: "ml-1 hover:bg-[color:color-mix(in oklab, var(--ui-bg), transparent 90%)] rounded-full p-0.5 transition-colors",
96
+ "aria-label": r.dismissLabel,
97
+ onClick: l
98
+ }, [
99
+ y(v, {
100
+ icon: "circle-xmark",
101
+ class: "w-3 h-3"
102
+ })
103
+ ], 8, x)) : o("", !0)
104
+ ], 2));
105
+ }
106
+ });
107
+ export {
108
+ C as default
109
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("class-variance-authority"),s=require("../utils/cn.cjs"),i=require("./Icon.cjs"),u=["aria-label"],m={class:"flex items-center space-x-1"},d={__name:"Breadcrumb",props:{items:{type:Array,required:!0,validator:t=>t.every(r=>r.label)},separator:{type:String,default:"chevron-right"},ariaLabel:{type:String,default:"Breadcrumb navigation"},variant:{type:String,default:"default",validator:t=>["default","ghost"].includes(t)}},setup(t){const r=t,l=c.cva("",{variants:{variant:{default:"",ghost:"text-muted-foreground"}}}),o=e.computed(()=>s.cn(l({variant:r.variant})));return(f,h)=>(e.openBlock(),e.createElementBlock("nav",{"aria-label":t.ariaLabel,class:e.normalizeClass(["flex",o.value])},[e.createElementVNode("ol",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.items,(n,a)=>(e.openBlock(),e.createElementBlock("li",{key:a,class:"flex items-center"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n.href?"a":"span"),{href:n.href,class:e.normalizeClass(["text-sm font-medium transition-colors hover:text-(--ui-text)",a===t.items.length-1?"ui-text":"ui-text hover:text-(--ui-text)"]),"aria-current":a===t.items.length-1?"page":void 0},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.label),1)]),_:2},1032,["href","class","aria-current"])),a<t.items.length-1?(e.openBlock(),e.createBlock(i.default,{key:0,name:t.separator,class:"mx-2 h-4 w-4 text-muted-foreground"},null,8,["name"])):e.createCommentVNode("",!0)]))),128))])],10,u))}};exports.default=d;
@@ -0,0 +1,72 @@
1
+ import { computed as m, createElementBlock as l, openBlock as t, normalizeClass as i, createElementVNode as u, Fragment as d, renderList as f, createBlock as s, createCommentVNode as h, resolveDynamicComponent as v, withCtx as g, createTextVNode as x, toDisplayString as b } from "vue";
2
+ import { cva as p } from "class-variance-authority";
3
+ import { cn as y } from "../utils/cn.js";
4
+ import k from "./Icon.js";
5
+ const B = ["aria-label"], C = { class: "flex items-center space-x-1" }, E = {
6
+ __name: "Breadcrumb",
7
+ props: {
8
+ items: {
9
+ type: Array,
10
+ required: !0,
11
+ validator: (e) => e.every((r) => r.label)
12
+ },
13
+ separator: {
14
+ type: String,
15
+ default: "chevron-right"
16
+ },
17
+ ariaLabel: {
18
+ type: String,
19
+ default: "Breadcrumb navigation"
20
+ },
21
+ variant: {
22
+ type: String,
23
+ default: "default",
24
+ validator: (e) => ["default", "ghost"].includes(e)
25
+ }
26
+ },
27
+ setup(e) {
28
+ const r = e, o = p("", {
29
+ variants: {
30
+ variant: {
31
+ default: "",
32
+ ghost: "text-muted-foreground"
33
+ }
34
+ }
35
+ }), c = m(
36
+ () => y(o({ variant: r.variant }))
37
+ );
38
+ return (S, V) => (t(), l("nav", {
39
+ "aria-label": e.ariaLabel,
40
+ class: i(["flex", c.value])
41
+ }, [
42
+ u("ol", C, [
43
+ (t(!0), l(d, null, f(e.items, (n, a) => (t(), l("li", {
44
+ key: a,
45
+ class: "flex items-center"
46
+ }, [
47
+ (t(), s(v(n.href ? "a" : "span"), {
48
+ href: n.href,
49
+ class: i([
50
+ "text-sm font-medium transition-colors hover:text-(--ui-text)",
51
+ a === e.items.length - 1 ? "ui-text" : "ui-text hover:text-(--ui-text)"
52
+ ]),
53
+ "aria-current": a === e.items.length - 1 ? "page" : void 0
54
+ }, {
55
+ default: g(() => [
56
+ x(b(n.label), 1)
57
+ ]),
58
+ _: 2
59
+ }, 1032, ["href", "class", "aria-current"])),
60
+ a < e.items.length - 1 ? (t(), s(k, {
61
+ key: 0,
62
+ name: e.separator,
63
+ class: "mx-2 h-4 w-4 text-muted-foreground"
64
+ }, null, 8, ["name"])) : h("", !0)
65
+ ]))), 128))
66
+ ])
67
+ ], 10, B));
68
+ }
69
+ };
70
+ export {
71
+ E as default
72
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("../Button.vue_vue_type_script_setup_true_lang-DZxttvYH.cjs");exports.default=e._sfc_main;
@@ -0,0 +1,4 @@
1
+ import { _ as f } from "../Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("class-variance-authority"),a=require("../utils/cn.cjs"),s=["aria-label"],d={__name:"ButtonGroup",props:{orientation:{type:String,default:"horizontal",validator:t=>["horizontal","vertical"].includes(t)},size:{type:String,default:"default",validator:t=>["sm","default","lg"].includes(t)},variant:{type:String,default:"default",validator:t=>["default","outline","ghost"].includes(t)},ariaLabel:String},setup(t){const n=t,o=r.cva("inline-flex ",{variants:{orientation:{horizontal:"flex-row [&>*:not(:first-child)]:ml-[-1px] [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none",vertical:"flex-col [&>*:not(:first-child)]:mt-[-1px] [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none"}}}),l=e.computed(()=>a.cn(o({orientation:n.orientation})));return(i,u)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(l.value),role:"group","aria-label":t.ariaLabel},[e.renderSlot(i.$slots,"default")],10,s))}};exports.default=d;
@@ -0,0 +1,46 @@
1
+ import { computed as r, createElementBlock as a, openBlock as i, normalizeClass as d, renderSlot as s } from "vue";
2
+ import { cva as c } from "class-variance-authority";
3
+ import { cn as u } from "../utils/cn.js";
4
+ const f = ["aria-label"], g = {
5
+ __name: "ButtonGroup",
6
+ props: {
7
+ orientation: {
8
+ type: String,
9
+ default: "horizontal",
10
+ validator: (t) => ["horizontal", "vertical"].includes(t)
11
+ },
12
+ size: {
13
+ type: String,
14
+ default: "default",
15
+ validator: (t) => ["sm", "default", "lg"].includes(t)
16
+ },
17
+ variant: {
18
+ type: String,
19
+ default: "default",
20
+ validator: (t) => ["default", "outline", "ghost"].includes(t)
21
+ },
22
+ ariaLabel: String
23
+ },
24
+ setup(t) {
25
+ const o = t, n = c("inline-flex ", {
26
+ variants: {
27
+ orientation: {
28
+ horizontal: "flex-row [&>*:not(:first-child)]:ml-[-1px] [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-r-none [&>*:last-child]:rounded-l-none",
29
+ vertical: "flex-col [&>*:not(:first-child)]:mt-[-1px] [&>*:not(:first-child):not(:last-child)]:rounded-none [&>*:first-child]:rounded-b-none [&>*:last-child]:rounded-t-none"
30
+ }
31
+ }
32
+ }), e = r(
33
+ () => u(n({ orientation: o.orientation }))
34
+ );
35
+ return (l, p) => (i(), a("div", {
36
+ class: d(e.value),
37
+ role: "group",
38
+ "aria-label": t.ariaLabel
39
+ }, [
40
+ s(l.$slots, "default")
41
+ ], 10, f));
42
+ }
43
+ };
44
+ export {
45
+ g as default
46
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),H={class:"relative w-full"},O={class:"relative"},A=["id","value","disabled","placeholder","required","aria-describedby"],U={class:"flex items-center justify-between mb-3"},W={class:"text-sm font-medium"},G={class:"grid grid-cols-7 gap-1 mb-2"},J={class:"grid grid-cols-7 gap-1"},K=["disabled","onClick"],Q={key:0,class:"mt-4 pt-3 border-t ui-border-strong"},R={key:0,class:"border-l pl-3 ui-border-strong"},X={class:"max-h-[260px] overflow-y-auto pr-1 space-y-1"},Z=["onClick"],_={__name:"Calendar",props:{id:String,modelValue:[String,Date],disabled:Boolean,required:Boolean,min:[String,Date],max:[String,Date],placeholder:{type:String,default:"Select date"},format:{type:String,default:"MM/DD/YYYY"},clearable:{type:Boolean,default:!0},showToday:{type:Boolean,default:!0},calendarPosition:{type:String,default:"left-0"},ariaDescribedby:String,enableTime:{type:Boolean,default:!1},minuteInterval:{type:Number,default:1}},emits:["update:modelValue"],setup(l,{emit:B}){const s=l,g=B,m=e.ref(!1),f=new Date,r=e.ref(f.getMonth()),i=e.ref(f.getFullYear()),u=e.ref(null),p=e.ref("00:00"),V=["Su","Mo","Tu","We","Th","Fr","Sa"],N=e.computed(()=>new Date(i.value,r.value).toLocaleString("default",{month:"long"})),y=e.computed(()=>new Date(i.value,r.value+1,0).getDate()),M=e.computed(()=>new Date(i.value,r.value,1).getDay()),h=e.computed(()=>{const o=new Date(i.value,r.value,0).getDate(),t=M.value;return Array.from({length:t},(n,a)=>o-t+a+1)}),C=e.computed(()=>{const o=h.value.length+y.value,t=o%7===0?0:7-o%7;return Array.from({length:t},(n,a)=>a+1)}),k=e.computed(()=>u.value?s.enableTime?$(u.value):x(u.value):""),T=e.computed(()=>{const o=Math.min(60,Math.max(1,Number(s.minuteInterval)||1)),t=[];for(let n=0;n<24;n++)for(let a=0;a<60;a+=o){const c=String(n).padStart(2,"0"),d=String(a).padStart(2,"0");t.push(`${c}:${d}`)}return t});function x(o){if(!o)return"";const t=new Date(o),n=String(t.getMonth()+1).padStart(2,"0"),a=String(t.getDate()).padStart(2,"0"),c=t.getFullYear();return s.format.replace("MM",n).replace("DD",a).replace("YYYY",c)}function $(o){const t=x(o),n=String(o.getHours()).padStart(2,"0"),a=String(o.getMinutes()).padStart(2,"0");return`${t} ${n}:${a}`}function v(o){if(!o)return null;if(o instanceof Date)return o;if(typeof o=="string"){if(o.includes("T")){const[a,c]=o.split("T"),d=v(a);if(!d)return null;const[P="00",q="00"]=(c||"").slice(0,5).split(":");return d.setHours(parseInt(P,10)||0,parseInt(q,10)||0,0,0),d}const n=o.split("-");if(n.length===3){const a=parseInt(n[0],10),c=parseInt(n[1],10)-1,d=parseInt(n[2],10);return new Date(a,c,d)}}const t=new Date(o);return isNaN(t.getTime())?null:t}function Y(o){if(!u.value)return!1;const t=new Date(u.value);return t.getDate()===o&&t.getMonth()===r.value&&t.getFullYear()===i.value}function b(o){const t=new Date(i.value,r.value,o);if(s.min){const n=v(s.min);if(n&&t<n)return!0}if(s.max){const n=v(s.max);if(n&&t>n)return!0}return!1}function F(){s.disabled||(m.value=!m.value)}function D(){m.value=!1}function I(){r.value===0?(r.value=11,i.value--):r.value--}function L(){r.value===11?(r.value=0,i.value++):r.value++}function w(o){if(b(o))return;const t=new Date(i.value,r.value,o);u.value=t,S(t),s.enableTime||(m.value=!1)}function S(o){const t=o.getFullYear(),n=String(o.getMonth()+1).padStart(2,"0"),a=String(o.getDate()).padStart(2,"0");if(!s.enableTime){g("update:modelValue",`${t}-${n}-${a}`);return}const[c="00",d="00"]=p.value.split(":");g("update:modelValue",`${t}-${n}-${a}T${c}:${d}`)}function j(){r.value=f.getMonth(),i.value=f.getFullYear(),w(f.getDate())}function z(){u.value=null,p.value="00:00",g("update:modelValue","")}e.watch(()=>s.modelValue,o=>{if(o){const t=v(o);if(t){u.value=t;const n=String(t.getHours()).padStart(2,"0"),a=String(t.getMinutes()).padStart(2,"0");p.value=`${n}:${a}`,r.value=t.getMonth(),i.value=t.getFullYear()}}else u.value=null},{immediate:!0}),e.watch(p,o=>{if(!s.enableTime||!u.value)return;const[t="00",n="00"]=(o||"00:00").split(":");u.value.setHours(parseInt(t,10)||0,parseInt(n,10)||0,0,0),S(u.value)});function E(o){o.key==="Escape"&&m.value&&D()}return e.onMounted(()=>{document.addEventListener("keydown",E)}),e.onBeforeUnmount(()=>{document.removeEventListener("keydown",E)}),(o,t)=>(e.openBlock(),e.createElementBlock("div",H,[e.createElementVNode("div",O,[e.createElementVNode("input",{id:l.id,type:"text",value:k.value,readonly:"",disabled:l.disabled,placeholder:l.placeholder,required:l.required,"aria-describedby":l.ariaDescribedby,class:"w-full px-3 py-2 pr-10 border ui-border-strong rounded-md bg-(--ui-bg) ui-text placeholder-slate-400 focus:outline-none focus:ring-2 focus:ring-(--ui-primary) focus:border-(--ui-primary) cursor-pointer disabled:bg-(--ui-surface) disabled:text-(--ui-text) disabled:cursor-not-allowed",onClick:F},null,8,A),t[2]||(t[2]=e.createElementVNode("div",{class:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none"},[e.createElementVNode("svg",{class:"w-5 h-5 ui-text",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})])],-1)),l.clearable&&k.value&&!l.disabled?(e.openBlock(),e.createElementBlock("button",{key:0,type:"button",class:"absolute right-9 top-1/2 -translate-y-1/2 p-1 hover:bg-(--ui-surface) rounded","aria-label":"Clear date",onClick:e.withModifiers(z,["stop"])},[...t[1]||(t[1]=[e.createElementVNode("svg",{class:"w-4 h-4 ui-text",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)])])):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{"enter-active-class":"transition ease-out duration-100","enter-from-class":"transform opacity-0 scale-95","enter-to-class":"transform opacity-100 scale-100","leave-active-class":"transition ease-in duration-75","leave-from-class":"transform opacity-100 scale-100","leave-to-class":"transform opacity-0 scale-95"},{default:e.withCtx(()=>[m.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["absolute z-99999 mt-2 rounded-lg shadow-lg p-4 ui-surface",l.calendarPosition,l.enableTime?"w-[420px]":"w-auto"]),onClick:t[0]||(t[0]=e.withModifiers(()=>{},["stop"]))},[e.createElementVNode("div",{class:e.normalizeClass(l.enableTime?"grid grid-cols-[1fr_124px] gap-3":"block")},[e.createElementVNode("div",null,[e.createElementVNode("div",U,[e.createElementVNode("button",{type:"button",class:"p-1 hover:bg-(--ui-surface) rounded","aria-label":"Previous Month",onClick:I},[...t[3]||(t[3]=[e.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M15 18l-6-6 6-6"})],-1)])]),e.createElementVNode("div",W,e.toDisplayString(N.value)+" "+e.toDisplayString(i.value),1),e.createElementVNode("button",{type:"button",class:"p-1 hover:bg-(--ui-surface) rounded","aria-label":"Next Month",onClick:L},[...t[4]||(t[4]=[e.createElementVNode("svg",{class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 18l6-6-6-6"})],-1)])])]),e.createElementVNode("div",G,[(e.openBlock(),e.createElementBlock(e.Fragment,null,e.renderList(V,n=>e.createElementVNode("div",{key:n,class:"text-center text-xs font-medium ui-text py-1"},e.toDisplayString(n),1)),64))]),e.createElementVNode("div",J,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(h.value,(n,a)=>(e.openBlock(),e.createElementBlock("div",{key:"prev-"+a,class:"text-center text-sm ui-text py-2"},e.toDisplayString(n),1))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(y.value,n=>(e.openBlock(),e.createElementBlock("button",{key:n,type:"button",disabled:b(n),class:e.normalizeClass(["w-8 h-8 text-sm rounded flex items-center justify-center",Y(n)?"ui-primary-bg ui-text":"hover:bg-(--ui-surface)",b(n)?"ui-text cursor-not-allowed":""]),onClick:a=>w(n)},e.toDisplayString(n),11,K))),128)),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(n,a)=>(e.openBlock(),e.createElementBlock("div",{key:"next-"+a,class:"text-center text-sm ui-text py-2"},e.toDisplayString(n),1))),128))]),l.showToday?(e.openBlock(),e.createElementBlock("div",Q,[e.createElementVNode("button",{type:"button",class:"w-full px-3 py-2 text-sm font-medium ui-primary hover:bg-(--ui-primary-soft) rounded-lg transition-colors",onClick:j}," Today ")])):e.createCommentVNode("",!0)]),l.enableTime?(e.openBlock(),e.createElementBlock("div",R,[t[5]||(t[5]=e.createElementVNode("div",{class:"text-xs font-semibold ui-text mb-2"},"Time",-1)),e.createElementVNode("div",X,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(T.value,n=>(e.openBlock(),e.createElementBlock("button",{key:n,type:"button",class:e.normalizeClass(["w-full px-2 py-1.5 text-left text-sm rounded transition-colors",n===p.value?"ui-primary-bg ui-text":"ui-text hover:bg-(--ui-surface)"]),onClick:a=>p.value=n},e.toDisplayString(n),11,Z))),128))])])):e.createCommentVNode("",!0)],2)],2)):e.createCommentVNode("",!0)]),_:1}),m.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:"fixed inset-0 z-99998",onClick:D})):e.createCommentVNode("",!0)]))}};exports.default=_;