@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,341 @@
1
+ import { ref as y, computed as p, watch as j, onMounted as Z, onBeforeUnmount as _, createElementBlock as l, openBlock as s, createElementVNode as r, createVNode as ee, createCommentVNode as x, withModifiers as E, Transition as te, withCtx as ne, normalizeClass as S, toDisplayString as g, Fragment as k, renderList as D } from "vue";
2
+ const ae = { class: "relative w-full" }, re = { class: "relative" }, oe = ["id", "value", "disabled", "placeholder", "required", "aria-describedby"], le = { class: "flex items-center justify-between mb-3" }, se = { class: "text-sm font-medium" }, ie = { class: "grid grid-cols-7 gap-1 mb-2" }, ue = { class: "grid grid-cols-7 gap-1" }, de = ["disabled", "onClick"], ce = {
3
+ key: 0,
4
+ class: "mt-4 pt-3 border-t ui-border-strong"
5
+ }, fe = {
6
+ key: 0,
7
+ class: "border-l pl-3 ui-border-strong"
8
+ }, me = { class: "max-h-[260px] overflow-y-auto pr-1 space-y-1" }, ve = ["onClick"], ge = {
9
+ __name: "Calendar",
10
+ props: {
11
+ id: String,
12
+ modelValue: [String, Date],
13
+ disabled: Boolean,
14
+ required: Boolean,
15
+ min: [String, Date],
16
+ max: [String, Date],
17
+ placeholder: {
18
+ type: String,
19
+ default: "Select date"
20
+ },
21
+ format: {
22
+ type: String,
23
+ default: "MM/DD/YYYY"
24
+ },
25
+ clearable: {
26
+ type: Boolean,
27
+ default: !0
28
+ },
29
+ showToday: {
30
+ type: Boolean,
31
+ default: !0
32
+ },
33
+ calendarPosition: {
34
+ type: String,
35
+ default: "left-0"
36
+ },
37
+ ariaDescribedby: String,
38
+ enableTime: {
39
+ type: Boolean,
40
+ default: !1
41
+ },
42
+ minuteInterval: {
43
+ type: Number,
44
+ default: 1
45
+ }
46
+ },
47
+ emits: ["update:modelValue"],
48
+ setup(i, { emit: H }) {
49
+ const u = i, M = H, v = y(!1), h = /* @__PURE__ */ new Date(), o = y(h.getMonth()), d = y(h.getFullYear()), c = y(null), b = y("00:00"), L = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"], P = p(
50
+ () => new Date(d.value, o.value).toLocaleString("default", {
51
+ month: "long"
52
+ })
53
+ ), T = p(() => new Date(d.value, o.value + 1, 0).getDate()), q = p(() => new Date(d.value, o.value, 1).getDay()), $ = p(() => {
54
+ const n = new Date(d.value, o.value, 0).getDate(), e = q.value;
55
+ return Array.from({ length: e }, (t, a) => n - e + a + 1);
56
+ }), z = p(() => {
57
+ const n = $.value.length + T.value, e = n % 7 === 0 ? 0 : 7 - n % 7;
58
+ return Array.from({ length: e }, (t, a) => a + 1);
59
+ }), Y = p(() => c.value ? u.enableTime ? A(c.value) : V(c.value) : ""), O = p(() => {
60
+ const n = Math.min(60, Math.max(1, Number(u.minuteInterval) || 1)), e = [];
61
+ for (let t = 0; t < 24; t++)
62
+ for (let a = 0; a < 60; a += n) {
63
+ const f = String(t).padStart(2, "0"), m = String(a).padStart(2, "0");
64
+ e.push(`${f}:${m}`);
65
+ }
66
+ return e;
67
+ });
68
+ function V(n) {
69
+ if (!n) return "";
70
+ const e = new Date(n), t = String(e.getMonth() + 1).padStart(2, "0"), a = String(e.getDate()).padStart(2, "0"), f = e.getFullYear();
71
+ return u.format.replace("MM", t).replace("DD", a).replace("YYYY", f);
72
+ }
73
+ function A(n) {
74
+ const e = V(n), t = String(n.getHours()).padStart(2, "0"), a = String(n.getMinutes()).padStart(2, "0");
75
+ return `${e} ${t}:${a}`;
76
+ }
77
+ function w(n) {
78
+ if (!n) return null;
79
+ if (n instanceof Date) return n;
80
+ if (typeof n == "string") {
81
+ if (n.includes("T")) {
82
+ const [a, f] = n.split("T"), m = w(a);
83
+ if (!m) return null;
84
+ const [R = "00", X = "00"] = (f || "").slice(0, 5).split(":");
85
+ return m.setHours(parseInt(R, 10) || 0, parseInt(X, 10) || 0, 0, 0), m;
86
+ }
87
+ const t = n.split("-");
88
+ if (t.length === 3) {
89
+ const a = parseInt(t[0], 10), f = parseInt(t[1], 10) - 1, m = parseInt(t[2], 10);
90
+ return new Date(a, f, m);
91
+ }
92
+ }
93
+ const e = new Date(n);
94
+ return isNaN(e.getTime()) ? null : e;
95
+ }
96
+ function U(n) {
97
+ if (!c.value) return !1;
98
+ const e = new Date(c.value);
99
+ return e.getDate() === n && e.getMonth() === o.value && e.getFullYear() === d.value;
100
+ }
101
+ function C(n) {
102
+ const e = new Date(d.value, o.value, n);
103
+ if (u.min) {
104
+ const t = w(u.min);
105
+ if (t && e < t) return !0;
106
+ }
107
+ if (u.max) {
108
+ const t = w(u.max);
109
+ if (t && e > t) return !0;
110
+ }
111
+ return !1;
112
+ }
113
+ function W() {
114
+ u.disabled || (v.value = !v.value);
115
+ }
116
+ function B() {
117
+ v.value = !1;
118
+ }
119
+ function G() {
120
+ o.value === 0 ? (o.value = 11, d.value--) : o.value--;
121
+ }
122
+ function J() {
123
+ o.value === 11 ? (o.value = 0, d.value++) : o.value++;
124
+ }
125
+ function I(n) {
126
+ if (C(n)) return;
127
+ const e = new Date(d.value, o.value, n);
128
+ c.value = e, N(e), u.enableTime || (v.value = !1);
129
+ }
130
+ function N(n) {
131
+ const e = n.getFullYear(), t = String(n.getMonth() + 1).padStart(2, "0"), a = String(n.getDate()).padStart(2, "0");
132
+ if (!u.enableTime) {
133
+ M("update:modelValue", `${e}-${t}-${a}`);
134
+ return;
135
+ }
136
+ const [f = "00", m = "00"] = b.value.split(":");
137
+ M("update:modelValue", `${e}-${t}-${a}T${f}:${m}`);
138
+ }
139
+ function K() {
140
+ o.value = h.getMonth(), d.value = h.getFullYear(), I(h.getDate());
141
+ }
142
+ function Q() {
143
+ c.value = null, b.value = "00:00", M("update:modelValue", "");
144
+ }
145
+ j(() => u.modelValue, (n) => {
146
+ if (n) {
147
+ const e = w(n);
148
+ if (e) {
149
+ c.value = e;
150
+ const t = String(e.getHours()).padStart(2, "0"), a = String(e.getMinutes()).padStart(2, "0");
151
+ b.value = `${t}:${a}`, o.value = e.getMonth(), d.value = e.getFullYear();
152
+ }
153
+ } else
154
+ c.value = null;
155
+ }, { immediate: !0 }), j(b, (n) => {
156
+ if (!u.enableTime || !c.value) return;
157
+ const [e = "00", t = "00"] = (n || "00:00").split(":");
158
+ c.value.setHours(parseInt(e, 10) || 0, parseInt(t, 10) || 0, 0, 0), N(c.value);
159
+ });
160
+ function F(n) {
161
+ n.key === "Escape" && v.value && B();
162
+ }
163
+ return Z(() => {
164
+ document.addEventListener("keydown", F);
165
+ }), _(() => {
166
+ document.removeEventListener("keydown", F);
167
+ }), (n, e) => (s(), l("div", ae, [
168
+ r("div", re, [
169
+ r("input", {
170
+ id: i.id,
171
+ type: "text",
172
+ value: Y.value,
173
+ readonly: "",
174
+ disabled: i.disabled,
175
+ placeholder: i.placeholder,
176
+ required: i.required,
177
+ "aria-describedby": i.ariaDescribedby,
178
+ 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",
179
+ onClick: W
180
+ }, null, 8, oe),
181
+ e[2] || (e[2] = r("div", { class: "absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none" }, [
182
+ r("svg", {
183
+ class: "w-5 h-5 ui-text",
184
+ fill: "none",
185
+ stroke: "currentColor",
186
+ viewBox: "0 0 24 24"
187
+ }, [
188
+ r("path", {
189
+ "stroke-linecap": "round",
190
+ "stroke-linejoin": "round",
191
+ "stroke-width": "2",
192
+ 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"
193
+ })
194
+ ])
195
+ ], -1)),
196
+ i.clearable && Y.value && !i.disabled ? (s(), l("button", {
197
+ key: 0,
198
+ type: "button",
199
+ class: "absolute right-9 top-1/2 -translate-y-1/2 p-1 hover:bg-(--ui-surface) rounded",
200
+ "aria-label": "Clear date",
201
+ onClick: E(Q, ["stop"])
202
+ }, [...e[1] || (e[1] = [
203
+ r("svg", {
204
+ class: "w-4 h-4 ui-text",
205
+ fill: "none",
206
+ stroke: "currentColor",
207
+ viewBox: "0 0 24 24"
208
+ }, [
209
+ r("path", {
210
+ "stroke-linecap": "round",
211
+ "stroke-linejoin": "round",
212
+ "stroke-width": "2",
213
+ d: "M6 18L18 6M6 6l12 12"
214
+ })
215
+ ], -1)
216
+ ])])) : x("", !0)
217
+ ]),
218
+ ee(te, {
219
+ "enter-active-class": "transition ease-out duration-100",
220
+ "enter-from-class": "transform opacity-0 scale-95",
221
+ "enter-to-class": "transform opacity-100 scale-100",
222
+ "leave-active-class": "transition ease-in duration-75",
223
+ "leave-from-class": "transform opacity-100 scale-100",
224
+ "leave-to-class": "transform opacity-0 scale-95"
225
+ }, {
226
+ default: ne(() => [
227
+ v.value ? (s(), l("div", {
228
+ key: 0,
229
+ class: S(["absolute z-99999 mt-2 rounded-lg shadow-lg p-4 ui-surface", i.calendarPosition, i.enableTime ? "w-[420px]" : "w-auto"]),
230
+ onClick: e[0] || (e[0] = E(() => {
231
+ }, ["stop"]))
232
+ }, [
233
+ r("div", {
234
+ class: S(i.enableTime ? "grid grid-cols-[1fr_124px] gap-3" : "block")
235
+ }, [
236
+ r("div", null, [
237
+ r("div", le, [
238
+ r("button", {
239
+ type: "button",
240
+ class: "p-1 hover:bg-(--ui-surface) rounded",
241
+ "aria-label": "Previous Month",
242
+ onClick: G
243
+ }, [...e[3] || (e[3] = [
244
+ r("svg", {
245
+ class: "w-4 h-4",
246
+ fill: "none",
247
+ stroke: "currentColor",
248
+ viewBox: "0 0 24 24"
249
+ }, [
250
+ r("path", {
251
+ "stroke-linecap": "round",
252
+ "stroke-linejoin": "round",
253
+ "stroke-width": "2",
254
+ d: "M15 18l-6-6 6-6"
255
+ })
256
+ ], -1)
257
+ ])]),
258
+ r("div", se, g(P.value) + " " + g(d.value), 1),
259
+ r("button", {
260
+ type: "button",
261
+ class: "p-1 hover:bg-(--ui-surface) rounded",
262
+ "aria-label": "Next Month",
263
+ onClick: J
264
+ }, [...e[4] || (e[4] = [
265
+ r("svg", {
266
+ class: "w-4 h-4",
267
+ fill: "none",
268
+ stroke: "currentColor",
269
+ viewBox: "0 0 24 24"
270
+ }, [
271
+ r("path", {
272
+ "stroke-linecap": "round",
273
+ "stroke-linejoin": "round",
274
+ "stroke-width": "2",
275
+ d: "M9 18l6-6-6-6"
276
+ })
277
+ ], -1)
278
+ ])])
279
+ ]),
280
+ r("div", ie, [
281
+ (s(), l(k, null, D(L, (t) => r("div", {
282
+ key: t,
283
+ class: "text-center text-xs font-medium ui-text py-1"
284
+ }, g(t), 1)), 64))
285
+ ]),
286
+ r("div", ue, [
287
+ (s(!0), l(k, null, D($.value, (t, a) => (s(), l("div", {
288
+ key: "prev-" + a,
289
+ class: "text-center text-sm ui-text py-2"
290
+ }, g(t), 1))), 128)),
291
+ (s(!0), l(k, null, D(T.value, (t) => (s(), l("button", {
292
+ key: t,
293
+ type: "button",
294
+ disabled: C(t),
295
+ class: S([
296
+ "w-8 h-8 text-sm rounded flex items-center justify-center",
297
+ U(t) ? "ui-primary-bg ui-text" : "hover:bg-(--ui-surface)",
298
+ C(t) ? "ui-text cursor-not-allowed" : ""
299
+ ]),
300
+ onClick: (a) => I(t)
301
+ }, g(t), 11, de))), 128)),
302
+ (s(!0), l(k, null, D(z.value, (t, a) => (s(), l("div", {
303
+ key: "next-" + a,
304
+ class: "text-center text-sm ui-text py-2"
305
+ }, g(t), 1))), 128))
306
+ ]),
307
+ i.showToday ? (s(), l("div", ce, [
308
+ r("button", {
309
+ type: "button",
310
+ class: "w-full px-3 py-2 text-sm font-medium ui-primary hover:bg-(--ui-primary-soft) rounded-lg transition-colors",
311
+ onClick: K
312
+ }, " Today ")
313
+ ])) : x("", !0)
314
+ ]),
315
+ i.enableTime ? (s(), l("div", fe, [
316
+ e[5] || (e[5] = r("div", { class: "text-xs font-semibold ui-text mb-2" }, "Time", -1)),
317
+ r("div", me, [
318
+ (s(!0), l(k, null, D(O.value, (t) => (s(), l("button", {
319
+ key: t,
320
+ type: "button",
321
+ class: S(["w-full px-2 py-1.5 text-left text-sm rounded transition-colors", t === b.value ? "ui-primary-bg ui-text" : "ui-text hover:bg-(--ui-surface)"]),
322
+ onClick: (a) => b.value = t
323
+ }, g(t), 11, ve))), 128))
324
+ ])
325
+ ])) : x("", !0)
326
+ ], 2)
327
+ ], 2)) : x("", !0)
328
+ ]),
329
+ _: 1
330
+ }),
331
+ v.value ? (s(), l("div", {
332
+ key: 0,
333
+ class: "fixed inset-0 z-99998",
334
+ onClick: B
335
+ })) : x("", !0)
336
+ ]));
337
+ }
338
+ };
339
+ export {
340
+ ge as default
341
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),o=require("class-variance-authority"),n=require("../utils/cn.cjs"),y={key:0,class:"absolute inset-0 bg-[color:color-mix(in oklab, var(--ui-surface), transparent 40%)] backdrop-blur-sm flex items-center justify-center z-10","aria-hidden":"true"},x={class:"flex items-start justify-between gap-4"},B={class:"flex-1 min-w-0"},C={key:0,class:"shrink-0"},S=["src","alt","loading"],V={key:5,class:"absolute top-3 right-3"},z={class:"inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ui-bg ui-text"},E="w-full h-full object-cover",N="font-semibold ui-text line-clamp-2",$="text-sm ui-text mt-1 line-clamp-2",w={__name:"Card",props:{as:{type:String,default:"div"},variant:{type:String,default:"default",validator:t=>["default","outlined","elevated","filled","ghost"].includes(t)},padding:{type:String,default:"none",validator:t=>["none","sm","md","lg","xl"].includes(t)},bordered:{type:Boolean,default:!0},title:String,titleTag:{type:String,default:"h3"},titleSize:{type:String,default:"default",validator:t=>["sm","default","lg","xl"].includes(t)},subtitle:String,badge:String,contentClass:{type:[String,Array,Object],default:""},contentWrapper:{type:Boolean,default:!0},image:String,imageAlt:{type:String,default:"Card image"},imageAspect:{type:String,default:"auto",validator:t=>["auto","video","square","portrait"].includes(t)},imageLazy:{type:Boolean,default:!0},hoverable:Boolean,clickable:Boolean,disabled:Boolean,loading:Boolean},emits:["click"],setup(t,{emit:s}){const l=t,d=s,c=new Set(["textbox","searchbox","combobox","spinbutton"]),u=a=>{if(!(a instanceof Element))return!1;if(a.closest('input, textarea, select, button, a, [contenteditable], [contenteditable="true"]'))return!0;const r=a.getAttribute("role");return r?c.has(r):!1},i=a=>{l.clickable&&!l.disabled&&!l.loading&&d("click",a)},m=a=>{!l.clickable||l.disabled||l.loading||a.key!=="Enter"&&a.key!==" "&&a.key!=="Spacebar"||u(a.target)||a.currentTarget===a.target&&(a.preventDefault(),i(a))},g=e.computed(()=>({sm:"text-base",default:"text-lg",lg:"text-xl",xl:"text-2xl"})[l.titleSize]),b=e.computed(()=>({auto:"",video:"aspect-video",square:"aspect-square",portrait:"aspect-[3/4]"})[l.imageAspect]),f=o.cva("rounded-lg overflow-hidden transition-all duration-200 relative ui-text",{variants:{variant:{default:"ui-surface",outlined:"ui-surface",elevated:"ui-surface shadow-md",filled:"ui-surface-soft",ghost:"bg-transparent"},padding:{none:"",sm:"p-3",md:"p-4",lg:"p-6",xl:"p-8"},bordered:{true:"",false:""},hoverable:{true:"hover:shadow-lg hover:scale-[1.02]"},clickable:{true:"cursor-pointer focus:outline-none focus:ring-2 focus:ring-(--ui-ring) focus:ring-offset-2"},loading:{true:""}},compoundVariants:[{variant:"default",bordered:!0,class:"border ui-border-strong"},{variant:"outlined",bordered:!0,class:"border-2 ui-border-strong"},{variant:"elevated",bordered:!0,class:"border ui-border-strong"},{variant:"filled",bordered:!0,class:"border ui-border-strong"},{clickable:!0,hoverable:!1,class:"hover:bg-(--ui-surface)"}],defaultVariants:{variant:"default",padding:"md",bordered:!0}}),k=o.cva("",{variants:{padding:{none:"p-4 pb-3",sm:"px-3 pt-3 pb-2",md:"px-4 pt-4 pb-3",lg:"px-6 pt-6 pb-4",xl:"px-8 pt-8 pb-6"},hasBorder:{true:"border-b ui-border-strong mb-0",false:""}}}),p=o.cva("",{variants:{padding:{none:"p-4",sm:"p-3",md:"p-4",lg:"p-6",xl:"p-8"}}}),v=o.cva("border-t ui-border-strong bg-[color:color-mix(in oklab, var(--ui-surface), transparent 50%)]",{variants:{padding:{none:"p-4 pt-3",sm:"px-3 pb-3 pt-2",md:"px-4 pb-4 pt-3",lg:"px-6 pb-6 pt-4",xl:"px-8 pb-8 pt-6"}}}),h=o.cva("overflow-hidden",{variants:{padding:{none:"",sm:"-mx-3 mb-3",md:"-mx-4 mb-4",lg:"-mx-6 mb-6",xl:"-mx-8 mb-8"},hasHeader:{true:"",false:""}},compoundVariants:[{hasHeader:!0,padding:"sm",class:"-mt-3"},{hasHeader:!0,padding:"md",class:"-mt-4"},{hasHeader:!0,padding:"lg",class:"-mt-6"},{hasHeader:!0,padding:"xl",class:"-mt-8"}]});return(a,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.as),{class:e.normalizeClass(e.unref(n.cn)(e.unref(f)({variant:t.variant,padding:t.padding,hoverable:t.hoverable,clickable:t.clickable,loading:t.loading,bordered:t.bordered}))),disabled:t.disabled||t.loading,"aria-busy":t.loading,"aria-disabled":t.disabled,role:t.clickable?"button":void 0,tabindex:t.clickable&&!t.disabled?0:void 0,onClick:i,onKeydown:m},{default:e.withCtx(()=>[t.loading?(e.openBlock(),e.createElementBlock("div",y,[...r[0]||(r[0]=[e.createElementVNode("div",{class:"animate-spin rounded-full h-8 w-8 border-b-2 ui-border-strong"},null,-1)])])):e.createCommentVNode("",!0),a.$slots.header||t.title||t.subtitle||a.$slots.actions?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass(e.unref(n.cn)(e.unref(k)({padding:t.padding,hasBorder:!!(a.$slots.default||a.$slots.footer)})))},[e.renderSlot(a.$slots,"header",{},()=>[e.createElementVNode("div",x,[e.createElementVNode("div",B,[t.title?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.titleTag),{key:0,class:e.normalizeClass(e.unref(n.cn)(N,g.value))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1},8,["class"])):e.createCommentVNode("",!0),t.subtitle?(e.openBlock(),e.createElementBlock("p",{key:1,class:e.normalizeClass($)},e.toDisplayString(t.subtitle),1)):e.createCommentVNode("",!0)]),a.$slots.actions?(e.openBlock(),e.createElementBlock("div",C,[e.renderSlot(a.$slots,"actions")])):e.createCommentVNode("",!0)])])],2)):e.createCommentVNode("",!0),a.$slots.image||t.image?(e.openBlock(),e.createElementBlock("div",{key:2,class:e.normalizeClass(e.unref(n.cn)(e.unref(h)({padding:t.padding,hasHeader:!!(a.$slots.header||t.title)})))},[e.renderSlot(a.$slots,"image",{},()=>[t.image?(e.openBlock(),e.createElementBlock("img",{key:0,src:t.image,alt:t.imageAlt,class:e.normalizeClass(e.unref(n.cn)(E,b.value)),loading:t.imageLazy?"lazy":"eager"},null,10,S)):e.createCommentVNode("",!0)])],2)):e.createCommentVNode("",!0),a.$slots.default?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[t.contentWrapper?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(e.unref(n.cn)(e.unref(p)({padding:t.padding}),t.contentClass))},[e.renderSlot(a.$slots,"default")],2)):e.renderSlot(a.$slots,"default",{key:1})],64)):e.createCommentVNode("",!0),a.$slots.footer?(e.openBlock(),e.createElementBlock("div",{key:4,class:e.normalizeClass(e.unref(n.cn)(e.unref(v)({padding:t.padding})))},[e.renderSlot(a.$slots,"footer")],2)):e.createCommentVNode("",!0),t.badge?(e.openBlock(),e.createElementBlock("div",V,[e.createElementVNode("span",z,e.toDisplayString(t.badge),1)])):e.createCommentVNode("",!0)]),_:3},40,["class","disabled","aria-busy","aria-disabled","role","tabindex"]))}};exports.default=w;
@@ -0,0 +1,316 @@
1
+ import { computed as f, createBlock as v, openBlock as a, resolveDynamicComponent as p, normalizeClass as n, unref as l, withCtx as h, createElementBlock as i, createCommentVNode as r, createElementVNode as g, renderSlot as o, createTextVNode as T, toDisplayString as b, Fragment as j } from "vue";
2
+ import { cva as c } from "class-variance-authority";
3
+ import { cn as d } from "../utils/cn.js";
4
+ const E = {
5
+ key: 0,
6
+ class: "absolute inset-0 bg-[color:color-mix(in oklab, var(--ui-surface), transparent 40%)] backdrop-blur-sm flex items-center justify-center z-10",
7
+ "aria-hidden": "true"
8
+ }, q = { class: "flex items-start justify-between gap-4" }, D = { class: "flex-1 min-w-0" }, N = {
9
+ key: 0,
10
+ class: "shrink-0"
11
+ }, K = ["src", "alt", "loading"], L = {
12
+ key: 5,
13
+ class: "absolute top-3 right-3"
14
+ }, W = { class: "inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium ui-bg ui-text" }, F = "w-full h-full object-cover", I = "font-semibold ui-text line-clamp-2", O = "text-sm ui-text mt-1 line-clamp-2", M = {
15
+ __name: "Card",
16
+ props: {
17
+ // Component type
18
+ as: {
19
+ type: String,
20
+ default: "div"
21
+ },
22
+ // Styling variants
23
+ variant: {
24
+ type: String,
25
+ default: "default",
26
+ validator: (e) => ["default", "outlined", "elevated", "filled", "ghost"].includes(e)
27
+ },
28
+ padding: {
29
+ type: String,
30
+ default: "none",
31
+ validator: (e) => ["none", "sm", "md", "lg", "xl"].includes(e)
32
+ },
33
+ bordered: {
34
+ type: Boolean,
35
+ default: !0
36
+ },
37
+ // Content props
38
+ title: String,
39
+ titleTag: {
40
+ type: String,
41
+ default: "h3"
42
+ },
43
+ titleSize: {
44
+ type: String,
45
+ default: "default",
46
+ validator: (e) => ["sm", "default", "lg", "xl"].includes(e)
47
+ },
48
+ subtitle: String,
49
+ badge: String,
50
+ contentClass: {
51
+ type: [String, Array, Object],
52
+ default: ""
53
+ },
54
+ contentWrapper: {
55
+ type: Boolean,
56
+ default: !0
57
+ },
58
+ // Image props
59
+ image: String,
60
+ imageAlt: {
61
+ type: String,
62
+ default: "Card image"
63
+ },
64
+ imageAspect: {
65
+ type: String,
66
+ default: "auto",
67
+ validator: (e) => ["auto", "video", "square", "portrait"].includes(e)
68
+ },
69
+ imageLazy: {
70
+ type: Boolean,
71
+ default: !0
72
+ },
73
+ // Interaction states
74
+ hoverable: Boolean,
75
+ clickable: Boolean,
76
+ disabled: Boolean,
77
+ loading: Boolean
78
+ },
79
+ emits: ["click"],
80
+ setup(e, { emit: y }) {
81
+ const s = e, x = y, k = /* @__PURE__ */ new Set(["textbox", "searchbox", "combobox", "spinbutton"]), S = (t) => {
82
+ if (!(t instanceof Element)) return !1;
83
+ if (t.closest('input, textarea, select, button, a, [contenteditable], [contenteditable="true"]'))
84
+ return !0;
85
+ const u = t.getAttribute("role");
86
+ return u ? k.has(u) : !1;
87
+ }, m = (t) => {
88
+ s.clickable && !s.disabled && !s.loading && x("click", t);
89
+ }, C = (t) => {
90
+ !s.clickable || s.disabled || s.loading || t.key !== "Enter" && t.key !== " " && t.key !== "Spacebar" || S(t.target) || t.currentTarget === t.target && (t.preventDefault(), m(t));
91
+ }, $ = f(() => ({
92
+ sm: "text-base",
93
+ default: "text-lg",
94
+ lg: "text-xl",
95
+ xl: "text-2xl"
96
+ })[s.titleSize]), w = f(() => ({
97
+ auto: "",
98
+ video: "aspect-video",
99
+ square: "aspect-square",
100
+ portrait: "aspect-[3/4]"
101
+ })[s.imageAspect]), B = c(
102
+ "rounded-lg overflow-hidden transition-all duration-200 relative ui-text",
103
+ {
104
+ variants: {
105
+ variant: {
106
+ default: "ui-surface",
107
+ outlined: "ui-surface",
108
+ elevated: "ui-surface shadow-md",
109
+ filled: "ui-surface-soft",
110
+ ghost: "bg-transparent"
111
+ },
112
+ padding: {
113
+ none: "",
114
+ sm: "p-3",
115
+ md: "p-4",
116
+ lg: "p-6",
117
+ xl: "p-8"
118
+ },
119
+ bordered: {
120
+ true: "",
121
+ false: ""
122
+ },
123
+ hoverable: {
124
+ true: "hover:shadow-lg hover:scale-[1.02]"
125
+ },
126
+ clickable: {
127
+ true: "cursor-pointer focus:outline-none focus:ring-2 focus:ring-(--ui-ring) focus:ring-offset-2"
128
+ },
129
+ loading: {
130
+ true: ""
131
+ }
132
+ },
133
+ compoundVariants: [
134
+ {
135
+ variant: "default",
136
+ bordered: !0,
137
+ class: "border ui-border-strong"
138
+ },
139
+ {
140
+ variant: "outlined",
141
+ bordered: !0,
142
+ class: "border-2 ui-border-strong"
143
+ },
144
+ {
145
+ variant: "elevated",
146
+ bordered: !0,
147
+ class: "border ui-border-strong"
148
+ },
149
+ {
150
+ variant: "filled",
151
+ bordered: !0,
152
+ class: "border ui-border-strong"
153
+ },
154
+ {
155
+ clickable: !0,
156
+ hoverable: !1,
157
+ class: "hover:bg-(--ui-surface)"
158
+ }
159
+ ],
160
+ defaultVariants: {
161
+ variant: "default",
162
+ padding: "md",
163
+ bordered: !0
164
+ }
165
+ }
166
+ ), V = c("", {
167
+ variants: {
168
+ padding: {
169
+ none: "p-4 pb-3",
170
+ sm: "px-3 pt-3 pb-2",
171
+ md: "px-4 pt-4 pb-3",
172
+ lg: "px-6 pt-6 pb-4",
173
+ xl: "px-8 pt-8 pb-6"
174
+ },
175
+ hasBorder: {
176
+ true: "border-b ui-border-strong mb-0",
177
+ false: ""
178
+ }
179
+ }
180
+ }), z = c("", {
181
+ variants: {
182
+ padding: {
183
+ none: "p-4",
184
+ sm: "p-3",
185
+ md: "p-4",
186
+ lg: "p-6",
187
+ xl: "p-8"
188
+ }
189
+ }
190
+ }), A = c("border-t ui-border-strong bg-[color:color-mix(in oklab, var(--ui-surface), transparent 50%)]", {
191
+ variants: {
192
+ padding: {
193
+ none: "p-4 pt-3",
194
+ sm: "px-3 pb-3 pt-2",
195
+ md: "px-4 pb-4 pt-3",
196
+ lg: "px-6 pb-6 pt-4",
197
+ xl: "px-8 pb-8 pt-6"
198
+ }
199
+ }
200
+ }), H = c("overflow-hidden", {
201
+ variants: {
202
+ padding: {
203
+ none: "",
204
+ sm: "-mx-3 mb-3",
205
+ md: "-mx-4 mb-4",
206
+ lg: "-mx-6 mb-6",
207
+ xl: "-mx-8 mb-8"
208
+ },
209
+ hasHeader: {
210
+ true: "",
211
+ false: ""
212
+ }
213
+ },
214
+ compoundVariants: [
215
+ {
216
+ hasHeader: !0,
217
+ padding: "sm",
218
+ class: "-mt-3"
219
+ },
220
+ {
221
+ hasHeader: !0,
222
+ padding: "md",
223
+ class: "-mt-4"
224
+ },
225
+ {
226
+ hasHeader: !0,
227
+ padding: "lg",
228
+ class: "-mt-6"
229
+ },
230
+ {
231
+ hasHeader: !0,
232
+ padding: "xl",
233
+ class: "-mt-8"
234
+ }
235
+ ]
236
+ });
237
+ return (t, u) => (a(), v(p(e.as), {
238
+ class: n(l(d)(l(B)({ variant: e.variant, padding: e.padding, hoverable: e.hoverable, clickable: e.clickable, loading: e.loading, bordered: e.bordered }))),
239
+ disabled: e.disabled || e.loading,
240
+ "aria-busy": e.loading,
241
+ "aria-disabled": e.disabled,
242
+ role: e.clickable ? "button" : void 0,
243
+ tabindex: e.clickable && !e.disabled ? 0 : void 0,
244
+ onClick: m,
245
+ onKeydown: C
246
+ }, {
247
+ default: h(() => [
248
+ e.loading ? (a(), i("div", E, [...u[0] || (u[0] = [
249
+ g("div", { class: "animate-spin rounded-full h-8 w-8 border-b-2 ui-border-strong" }, null, -1)
250
+ ])])) : r("", !0),
251
+ t.$slots.header || e.title || e.subtitle || t.$slots.actions ? (a(), i("div", {
252
+ key: 1,
253
+ class: n(l(d)(l(V)({ padding: e.padding, hasBorder: !!(t.$slots.default || t.$slots.footer) })))
254
+ }, [
255
+ o(t.$slots, "header", {}, () => [
256
+ g("div", q, [
257
+ g("div", D, [
258
+ e.title ? (a(), v(p(e.titleTag), {
259
+ key: 0,
260
+ class: n(l(d)(I, $.value))
261
+ }, {
262
+ default: h(() => [
263
+ T(b(e.title), 1)
264
+ ]),
265
+ _: 1
266
+ }, 8, ["class"])) : r("", !0),
267
+ e.subtitle ? (a(), i("p", {
268
+ key: 1,
269
+ class: n(O)
270
+ }, b(e.subtitle), 1)) : r("", !0)
271
+ ]),
272
+ t.$slots.actions ? (a(), i("div", N, [
273
+ o(t.$slots, "actions")
274
+ ])) : r("", !0)
275
+ ])
276
+ ])
277
+ ], 2)) : r("", !0),
278
+ t.$slots.image || e.image ? (a(), i("div", {
279
+ key: 2,
280
+ class: n(l(d)(l(H)({ padding: e.padding, hasHeader: !!(t.$slots.header || e.title) })))
281
+ }, [
282
+ o(t.$slots, "image", {}, () => [
283
+ e.image ? (a(), i("img", {
284
+ key: 0,
285
+ src: e.image,
286
+ alt: e.imageAlt,
287
+ class: n(l(d)(F, w.value)),
288
+ loading: e.imageLazy ? "lazy" : "eager"
289
+ }, null, 10, K)) : r("", !0)
290
+ ])
291
+ ], 2)) : r("", !0),
292
+ t.$slots.default ? (a(), i(j, { key: 3 }, [
293
+ e.contentWrapper ? (a(), i("div", {
294
+ key: 0,
295
+ class: n(l(d)(l(z)({ padding: e.padding }), e.contentClass))
296
+ }, [
297
+ o(t.$slots, "default")
298
+ ], 2)) : o(t.$slots, "default", { key: 1 })
299
+ ], 64)) : r("", !0),
300
+ t.$slots.footer ? (a(), i("div", {
301
+ key: 4,
302
+ class: n(l(d)(l(A)({ padding: e.padding })))
303
+ }, [
304
+ o(t.$slots, "footer")
305
+ ], 2)) : r("", !0),
306
+ e.badge ? (a(), i("div", L, [
307
+ g("span", W, b(e.badge), 1)
308
+ ])) : r("", !0)
309
+ ]),
310
+ _: 3
311
+ }, 40, ["class", "disabled", "aria-busy", "aria-disabled", "role", "tabindex"]));
312
+ }
313
+ };
314
+ export {
315
+ M as default
316
+ };
@@ -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"),n=require("../utils/cn.cjs"),u={__name:"CardBody",props:{variant:{type:String,default:"default",validator:t=>["default","compact","spacious"].includes(t)}},setup(t){const a=t,s=c.cva("p-6 ui-text",{variants:{variant:{default:"p-6",compact:"p-4",spacious:"p-8"}}}),r=e.computed(()=>n.cn(s({variant:a.variant})));return(o,i)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(r.value)},[e.renderSlot(o.$slots,"default")],2))}};exports.default=u;