@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,686 @@
1
+ import { useSlots as qe, computed as U, ref as z, watch as re, resolveComponent as ze, createElementBlock as i, openBlock as s, createCommentVNode as w, createElementVNode as k, toDisplayString as _, withModifiers as De, renderSlot as H, Fragment as L, renderList as J, normalizeClass as v, createBlock as x, withCtx as V, createVNode as C, createTextVNode as F } from "vue";
2
+ import Re from "./Slider.js";
3
+ import le from "./DatePicker.js";
4
+ import { _ as je } from "../FormField.vue_vue_type_script_setup_true_lang-DimMUyA-.js";
5
+ import { _ as $ } from "../Input.vue_vue_type_script_setup_true_lang-CpBoY97r.js";
6
+ import Pe from "./Textarea.js";
7
+ import ie from "./Select.js";
8
+ import Le from "./MultiSelect.js";
9
+ import { _ as D } from "../Button.vue_vue_type_script_setup_true_lang-B3TkBTvG.js";
10
+ import G from "./Label.js";
11
+ import ue from "./FileUpload.js";
12
+ import { toast as R } from "../lib/toast.js";
13
+ import { _ as Oe } from "../_plugin-vue_export-helper-CHgC5LLL.js";
14
+ const Ye = { class: "w-full p-2" }, Ee = {
15
+ key: 0,
16
+ class: "mb-6"
17
+ }, Ie = { class: "text-xl font-semibold ui-text" }, Ne = {
18
+ key: 0,
19
+ class: "mt-1 text-sm ui-text-muted"
20
+ }, He = {
21
+ key: 0,
22
+ class: "mb-4"
23
+ }, Je = {
24
+ key: 0,
25
+ class: "text-base font-semibold ui-text"
26
+ }, Ge = {
27
+ key: 1,
28
+ class: "mt-1 text-sm ui-text-muted"
29
+ }, Ke = ["value"], Qe = ["title", "aria-label", "disabled", "onClick"], We = {
30
+ key: 0,
31
+ class: "h-4 w-4",
32
+ viewBox: "0 0 24 24",
33
+ fill: "none",
34
+ stroke: "currentColor",
35
+ "aria-hidden": "true"
36
+ }, Xe = {
37
+ key: 0,
38
+ "stroke-linecap": "round",
39
+ "stroke-linejoin": "round",
40
+ "stroke-width": "2",
41
+ d: "M3 3l18 18M10.6 10.7a2 2 0 002.7 2.7M9.9 4.2A10.7 10.7 0 0112 4c5 0 8.7 4.4 9.6 6.5.2.3.2.7 0 1a15 15 0 01-2.2 3.3M6.2 6.2A15.8 15.8 0 002.4 10.5c-.2.3-.2.7 0 1C3.3 13.6 7 18 12 18c1 0 2-.2 2.9-.5"
42
+ }, Ze = {
43
+ key: 2,
44
+ class: "flex w-full items-center gap-2"
45
+ }, fe = { class: "min-w-0 flex-1" }, ea = {
46
+ key: 3,
47
+ class: "flex w-full items-center gap-2"
48
+ }, aa = { class: "min-w-0 flex-1" }, ta = {
49
+ key: 5,
50
+ class: "flex items-center"
51
+ }, na = {
52
+ key: 6,
53
+ class: "flex items-center"
54
+ }, oa = ["id", "aria-checked", "disabled", "onClick"], sa = {
55
+ key: 7,
56
+ class: "space-y-2"
57
+ }, ra = {
58
+ key: 11,
59
+ class: "space-y-2"
60
+ }, la = { class: "flex items-center gap-4" }, ia = { class: "min-w-12 text-right text-sm font-medium ui-text" }, ua = {
61
+ key: 0,
62
+ class: "flex justify-end gap-3 pt-6"
63
+ }, ca = {
64
+ key: 0,
65
+ class: "hidden"
66
+ }, ma = {
67
+ __name: "ReusableForm",
68
+ props: {
69
+ title: { type: String, default: "" },
70
+ description: { type: String, default: "" },
71
+ entityName: { type: String, default: "Item" },
72
+ fields: {
73
+ type: Array,
74
+ required: !0,
75
+ validator: (h) => Array.isArray(h) && h.every((B) => B?.name && B?.label && B?.type)
76
+ },
77
+ sections: { type: Array, default: () => [] },
78
+ initialData: { type: Object, default: null },
79
+ loading: { type: Boolean, default: !1 },
80
+ customValidation: { type: Function, default: null },
81
+ crossValidate: { type: Function, default: null },
82
+ submitLabel: { type: String, default: "Submit" },
83
+ showReset: { type: Boolean, default: !0 },
84
+ showCancel: { type: Boolean, default: !0 },
85
+ showSubmit: { type: Boolean, default: !0 },
86
+ formType: {
87
+ type: String,
88
+ default: "create",
89
+ validator: (h) => ["create", "edit"].includes(h)
90
+ }
91
+ },
92
+ emits: ["submit", "reset", "cancel", "form-change"],
93
+ setup(h, { emit: B }) {
94
+ const g = h, j = B, ce = qe(), c = U(() => g.loading), u = z({}), d = z({}), P = z({}), K = z({}), O = z(!1), me = U(() => Array.isArray(g.sections) && g.sections.length > 0), de = U(() => !!ce.actions), Q = U(() => me.value ? g.sections.map((e, t) => {
95
+ const r = e?.id || `section-${t + 1}`, n = Array.isArray(e?.fields) ? e.fields : (g.fields || []).filter((a) => a.sectionId === r);
96
+ return {
97
+ id: r,
98
+ title: e?.title || "",
99
+ description: e?.description || "",
100
+ icon: e?.icon || "",
101
+ wrapperClass: e?.wrapperClass || "",
102
+ gridClass: e?.gridClass || "grid grid-cols-12 gap-4",
103
+ card: e?.card !== !1,
104
+ fields: n
105
+ };
106
+ }) : [{
107
+ id: "default",
108
+ title: "",
109
+ description: "",
110
+ icon: "",
111
+ wrapperClass: "",
112
+ gridClass: "grid grid-cols-12 gap-4",
113
+ card: !1,
114
+ fields: g.fields || []
115
+ }]), T = U(() => Q.value.flatMap((e) => e.fields || [])), pe = U(() => Object.keys(d.value).length === 0), W = (e) => {
116
+ try {
117
+ return JSON.stringify(e ?? {});
118
+ } catch {
119
+ return "";
120
+ }
121
+ }, Y = (e, t) => {
122
+ if (!(!e || !t))
123
+ return t.split(".").reduce((r, n) => r?.[n], e);
124
+ }, M = (e, t, r) => {
125
+ const n = t.split("."), a = n.pop(), l = n.reduce((b, y) => ((!b[y] || typeof b[y] != "object") && (b[y] = {}), b[y]), e);
126
+ l[a] = r;
127
+ }, E = (e) => e.type === "checkbox" || e.type === "switch" ? !1 : e.type === "number" || e.type === "slider" || e.type === "range" ? e.min ?? 0 : e.type === "file" ? null : e.type === "multifile" || e.type === "multiselect" ? [] : e.type === "radio" && e.options?.[0]?.value || "", X = () => {
128
+ const e = {};
129
+ return T.value.forEach((t) => {
130
+ t.name.includes(".") ? M(e, t.name, E(t)) : e[t.name] = E(t);
131
+ }), e;
132
+ }, be = (e) => {
133
+ const t = {};
134
+ return T.value.forEach((r) => {
135
+ const n = r.name.includes(".") ? Y(e, r.name) : e?.[r.name], a = E(r), l = n === void 0 ? a : n;
136
+ if (r.name.includes(".")) {
137
+ M(t, r.name, l);
138
+ return;
139
+ }
140
+ r.type === "file" ? t[r.name] = null : r.type === "multifile" || r.type === "multiselect" ? t[r.name] = Array.isArray(l) ? l : [] : t[r.name] = l;
141
+ }), t;
142
+ };
143
+ re(
144
+ () => g.initialData,
145
+ (e) => {
146
+ const t = e ? be(e) : X();
147
+ W(t) !== W(u.value) && (O.value = !0, u.value = t, queueMicrotask(() => {
148
+ O.value = !1;
149
+ }));
150
+ },
151
+ { immediate: !0 }
152
+ ), re(
153
+ u,
154
+ (e) => {
155
+ O.value || j("form-change", e);
156
+ },
157
+ { deep: !0 }
158
+ );
159
+ const m = (e) => e.includes(".") ? Y(u.value, e) : u.value[e], I = (e) => {
160
+ const t = d.value?.[e];
161
+ return t || (e.includes(".") ? Y(d.value, e) : void 0);
162
+ }, p = (e, t) => {
163
+ e.includes(".") ? M(u.value, e, t) : u.value[e] = t;
164
+ }, S = (e) => e?.type === "password", q = (e) => !!P.value[e.name], ye = (e) => S(e) ? q(e) ? "text" : "password" : e.type, ve = (e) => {
165
+ e?.name && (P.value = {
166
+ ...P.value,
167
+ [e.name]: !P.value[e.name]
168
+ });
169
+ }, he = () => {
170
+ if (d.value = {}, T.value.forEach((e) => {
171
+ const t = m(e.name);
172
+ if (e.required && !e.disabled && e.type !== "hidden" && (e.type === "checkbox" || e.type === "switch" ? t || (d.value[e.name] = e.errorMessage || `${e.label} is required`) : e.type === "multiselect" || e.type === "multifile" ? (!Array.isArray(t) || t.length === 0) && (d.value[e.name] = e.errorMessage || `${e.label} is required`) : e.type === "number" || e.type === "slider" || e.type === "range" ? t === "" || t === null || t === void 0 ? d.value[e.name] = e.errorMessage || `${e.label} is required` : e.min !== void 0 && Number(t) < e.min ? d.value[e.name] = `${e.label} must be at least ${e.min}` : e.max !== void 0 && Number(t) > e.max && (d.value[e.name] = `${e.label} must be at most ${e.max}`) : e.type === "email" ? !t || !String(t).trim() ? d.value[e.name] = e.errorMessage || `${e.label} is required` : /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(String(t)) || (d.value[e.name] = "Please enter a valid email address") : e.type === "url" ? !t || !String(t).trim() ? d.value[e.name] = e.errorMessage || `${e.label} is required` : /^https?:\/\/.+/.test(String(t)) || (d.value[e.name] = "Please enter a valid URL") : (t == null || typeof t == "string" && !t.trim()) && (d.value[e.name] = e.errorMessage || `${e.label} is required`)), typeof e.validate == "function") {
173
+ const r = e.validate(t, u.value);
174
+ r && (d.value[e.name] = r);
175
+ }
176
+ }), typeof g.customValidation == "function") {
177
+ const e = g.customValidation(u.value);
178
+ e && typeof e == "object" && (d.value = { ...d.value, ...e });
179
+ }
180
+ if (typeof g.crossValidate == "function") {
181
+ const e = g.crossValidate(u.value);
182
+ e && typeof e == "object" && (d.value = { ...d.value, ...e });
183
+ }
184
+ return Object.keys(d.value).length === 0;
185
+ }, A = (e, t, r = void 0) => typeof e == "function" ? e(u.value, t) : e === void 0 ? r : e, Z = (e) => !!e?.actionButton && e.actionButton.show !== !1, f = (e) => {
186
+ if (!e?.actionButton) return !0;
187
+ const t = typeof e.actionButton.disabled == "function" ? e.actionButton.disabled(u.value, e) : e.actionButton.disabled;
188
+ return !!(c.value || e.disabled || t);
189
+ }, ee = (e) => e?.actionButton ? typeof e.actionButton.loading == "function" ? e.actionButton.loading(u.value, e) : !!e.actionButton.loading : !1, ae = (e) => {
190
+ typeof e?.actionButton?.onClick == "function" && e.actionButton.onClick(u.value, e);
191
+ }, te = (e) => S(e) || !!A(e.trailingIcon, e, null), ge = (e) => S(e) ? q(e) ? "eye-slash" : "eye" : A(e.trailingIcon, e, null), ne = (e) => S(e) ? q(e) ? "Hide password" : "Show password" : A(e.trailingIconTitle, e, "Action"), xe = (e) => S(e) ? q(e) ? "Hide password" : "Show password" : A(e.trailingIconAriaLabel, e, ne(e)), we = (e) => A(e.trailingIconClass, e, "w-4 h-4"), N = (e) => !!(c.value || e.disabled || A(e.trailingIconDisabled, e, !1)), ke = (e) => {
192
+ if (!N(e)) {
193
+ if (S(e)) {
194
+ ve(e);
195
+ return;
196
+ }
197
+ typeof e?.onTrailingIconClick == "function" && e.onTrailingIconClick(u.value, e);
198
+ }
199
+ }, oe = async (e, t) => {
200
+ if (p(e.name, t), typeof e?.onChange == "function")
201
+ try {
202
+ await e.onChange(t, u.value);
203
+ } catch {
204
+ R.error("An error occurred while processing the change");
205
+ }
206
+ }, _e = (e, t) => {
207
+ if (p(e.name, t), typeof e?.onChange == "function")
208
+ try {
209
+ e.onChange(t, u.value);
210
+ } catch {
211
+ R.error("An error occurred while processing the change");
212
+ }
213
+ }, Ce = (e, t) => {
214
+ p(e.name, t), typeof e?.onChange == "function" && e.onChange(t, u.value);
215
+ }, Ve = (e, t) => {
216
+ p(e.name, t), typeof e?.onChange == "function" && e.onChange(t, u.value);
217
+ }, Fe = (e, t) => {
218
+ p(e.name, t), typeof e?.onChange == "function" && e.onChange(t, u.value);
219
+ }, Se = (e, t) => {
220
+ p(e.name, t), typeof e?.onChange == "function" && e.onChange(t, u.value);
221
+ }, $e = (e) => {
222
+ const t = new FormData();
223
+ return Object.keys(e).forEach((r) => {
224
+ const n = e[r];
225
+ n != null && (n instanceof File ? t.append(r, n) : Array.isArray(n) ? n.forEach((a, l) => {
226
+ a instanceof File ? t.append(`${r}[]`, a) : t.append(`${r}[${l}]`, a);
227
+ }) : typeof n == "object" && !(n instanceof Date) ? Object.keys(n).forEach((a) => {
228
+ t.append(`${r}[${a}]`, n[a]);
229
+ }) : t.append(r, n));
230
+ }), t;
231
+ }, Ae = () => {
232
+ const e = {};
233
+ let t = !1;
234
+ T.value.forEach((n) => {
235
+ const a = m(n.name);
236
+ if (n.type === "number" || n.type === "slider" || n.type === "range") {
237
+ const b = a === "" || a === null || a === void 0 ? a : Number(a);
238
+ n.name.includes(".") ? M(e, n.name, b) : e[n.name] = b;
239
+ return;
240
+ }
241
+ if (n.type === "file") {
242
+ a instanceof File ? (t = !0, e[n.name] = a) : g.formType === "edit" && a && (e[n.name] = a);
243
+ return;
244
+ }
245
+ if (n.type === "multifile") {
246
+ Array.isArray(a) && a.some((b) => b instanceof File) ? (t = !0, e[n.name] = a) : g.formType === "edit" && Array.isArray(a) && a.length > 0 && (e[n.name] = a);
247
+ return;
248
+ }
249
+ const l = ["text", "textarea", "date", "email", "url", "tel", "search", "time", "datetime-local", "month", "week"].includes(n.type) && typeof a == "string" ? a.trim() : a;
250
+ n.name.includes(".") ? M(e, n.name, l) : e[n.name] = l;
251
+ });
252
+ let r = e;
253
+ return t && (r = $e(e), g.formType === "edit" && r.append("_method", "PUT")), { formData: r, hasFiles: t };
254
+ }, se = async () => {
255
+ if (T.value.some(
256
+ (r) => r.type !== "multifile" && (K.value[r.name] || []).length > 0
257
+ ))
258
+ return R.error("Please wait for all files to finish uploading"), !1;
259
+ if (!he())
260
+ return R.error("Please fix the validation errors before submitting"), !1;
261
+ const t = Ae();
262
+ return j("submit", {
263
+ formData: t.formData,
264
+ formType: g.formType,
265
+ originalData: g.initialData,
266
+ hasFiles: t.hasFiles
267
+ }), !0;
268
+ }, Ue = async () => {
269
+ try {
270
+ await se();
271
+ } catch {
272
+ R.error("An error occurred during submission");
273
+ }
274
+ }, Be = () => {
275
+ u.value = X(), d.value = {}, K.value = {}, j("reset");
276
+ }, Te = () => j("cancel");
277
+ return (e, t) => {
278
+ const r = ze("font-awesome-icon");
279
+ return s(), i("div", Ye, [
280
+ h.title ? (s(), i("div", Ee, [
281
+ k("h2", Ie, _(h.title), 1),
282
+ h.description ? (s(), i("p", Ne, _(h.description), 1)) : w("", !0)
283
+ ])) : w("", !0),
284
+ k("form", {
285
+ class: "space-y-6",
286
+ onSubmit: De(Ue, ["prevent"])
287
+ }, [
288
+ (s(!0), i(L, null, J(Q.value, (n) => (s(), i("div", {
289
+ key: n.id,
290
+ class: v(n.wrapperClass || "")
291
+ }, [
292
+ k("div", {
293
+ class: v(n.card ? "ui-surface border ui-border-strong rounded-xl p-4 sm:p-5" : "")
294
+ }, [
295
+ H(e.$slots, "section-header", { section: n }, () => [
296
+ n.title || n.description ? (s(), i("div", He, [
297
+ n.title ? (s(), i("h3", Je, _(n.title), 1)) : w("", !0),
298
+ n.description ? (s(), i("p", Ge, _(n.description), 1)) : w("", !0)
299
+ ])) : w("", !0)
300
+ ], !0),
301
+ k("div", {
302
+ class: v(n.gridClass)
303
+ }, [
304
+ (s(!0), i(L, null, J(n.fields, (a) => (s(), i("div", {
305
+ key: a.name,
306
+ class: v(a.wrapperClass || "col-span-12")
307
+ }, [
308
+ a.type === "hidden" ? (s(), i("input", {
309
+ key: 0,
310
+ value: m(a.name),
311
+ type: "hidden"
312
+ }, null, 8, Ke)) : (s(), x(je, {
313
+ key: 1,
314
+ id: `form-${h.entityName}-${a.name}`,
315
+ label: a.label,
316
+ required: !!a.required,
317
+ error: I(a.name),
318
+ "error-message": I(a.name),
319
+ "help-text": a.helpText,
320
+ class: v(a.labelClass || "")
321
+ }, {
322
+ default: V(({ fieldId: l, hasError: b, ariaDescribedBy: y }) => [
323
+ H(e.$slots, `field-${a.name}`, {
324
+ field: a,
325
+ formData: u.value,
326
+ error: I(a.name),
327
+ update: (o) => p(a.name, o)
328
+ }, () => [
329
+ ["text", "number", "password", "color", "email", "tel", "url", "search"].includes(a.type) ? (s(), i("div", {
330
+ key: 0,
331
+ class: v(["relative", te(a) ? "has-trailing-icon" : ""])
332
+ }, [
333
+ C($, {
334
+ id: l,
335
+ "model-value": m(a.name),
336
+ type: ye(a),
337
+ placeholder: a.placeholder,
338
+ disabled: c.value || a.disabled,
339
+ readonly: a.readonly || a.disabled,
340
+ class: v([b ? "border-(--ui-danger)" : "ui-border-strong", a.inputClass || ""]),
341
+ "aria-describedby": y,
342
+ "onUpdate:modelValue": (o) => p(a.name, o)
343
+ }, null, 8, ["id", "model-value", "type", "placeholder", "disabled", "readonly", "class", "aria-describedby", "onUpdate:modelValue"]),
344
+ te(a) ? (s(), i("button", {
345
+ key: 0,
346
+ type: "button",
347
+ class: v(["absolute right-3 top-1/2 -translate-y-1/2 ui-text hover:text-(--ui-text) transition-colors", N(a) ? "opacity-50 cursor-not-allowed" : ""]),
348
+ title: ne(a),
349
+ "aria-label": xe(a),
350
+ disabled: N(a),
351
+ onClick: (o) => ke(a)
352
+ }, [
353
+ S(a) ? (s(), i("svg", We, [
354
+ q(a) ? (s(), i("path", Xe)) : (s(), i(L, { key: 1 }, [
355
+ t[0] || (t[0] = k("path", {
356
+ "stroke-linecap": "round",
357
+ "stroke-linejoin": "round",
358
+ "stroke-width": "2",
359
+ d: "M2.4 10.5C3.3 8.4 7 4 12 4s8.7 4.4 9.6 6.5c.2.3.2.7 0 1C20.7 13.6 17 18 12 18s-8.7-4.4-9.6-6.5a1.1 1.1 0 010-1z"
360
+ }, null, -1)),
361
+ t[1] || (t[1] = k("circle", {
362
+ cx: "12",
363
+ cy: "11",
364
+ r: "3",
365
+ "stroke-width": "2"
366
+ }, null, -1))
367
+ ], 64))
368
+ ])) : (s(), x(r, {
369
+ key: 1,
370
+ icon: ge(a),
371
+ class: v(we(a))
372
+ }, null, 8, ["icon", "class"]))
373
+ ], 10, Qe)) : w("", !0)
374
+ ], 2)) : a.type === "textarea" ? (s(), x(Pe, {
375
+ key: 1,
376
+ id: l,
377
+ "model-value": m(a.name),
378
+ placeholder: a.placeholder,
379
+ disabled: c.value || a.disabled,
380
+ readonly: a.readonly || a.disabled,
381
+ rows: a.rows || 3,
382
+ class: v(["w-full rounded-md border px-3 py-2 focus:outline-none focus:ring-2 focus:ring-(--ui-primary)", b ? "border-(--ui-danger)" : "ui-border-strong", a.inputClass || ""]),
383
+ "aria-describedby": y,
384
+ "onUpdate:modelValue": (o) => p(a.name, o)
385
+ }, null, 8, ["id", "model-value", "placeholder", "disabled", "readonly", "rows", "class", "aria-describedby", "onUpdate:modelValue"])) : a.type === "select" ? (s(), i("div", Ze, [
386
+ k("div", fe, [
387
+ C(ie, {
388
+ id: l,
389
+ "model-value": m(a.name),
390
+ options: a.options,
391
+ placeholder: a.placeholder || "Select an option",
392
+ disabled: c.value || a.disabled,
393
+ "has-error": b,
394
+ "aria-describedby": y,
395
+ "onUpdate:modelValue": (o) => oe(a, o)
396
+ }, null, 8, ["id", "model-value", "options", "placeholder", "disabled", "has-error", "aria-describedby", "onUpdate:modelValue"])
397
+ ]),
398
+ Z(a) ? (s(), x(D, {
399
+ key: 0,
400
+ type: "button",
401
+ variant: a.actionButton.variant || "outline",
402
+ size: a.actionButton.size || "icon",
403
+ class: v(a.actionButton.class || ""),
404
+ title: a.actionButton.title || a.actionButton.label || "Action",
405
+ disabled: f(a),
406
+ loading: ee(a),
407
+ onClick: (o) => ae(a)
408
+ }, {
409
+ default: V(() => [
410
+ F(_(a.actionButton.label || "+"), 1)
411
+ ]),
412
+ _: 2
413
+ }, 1032, ["variant", "size", "class", "title", "disabled", "loading", "onClick"])) : w("", !0)
414
+ ])) : a.type === "multiselect" ? (s(), i("div", ea, [
415
+ k("div", aa, [
416
+ C(Le, {
417
+ id: l,
418
+ "model-value": m(a.name),
419
+ options: a.options,
420
+ disabled: c.value || a.disabled,
421
+ placeholder: a.placeholder || "Select options",
422
+ "has-error": b,
423
+ "aria-describedby": y,
424
+ "onUpdate:modelValue": (o) => p(a.name, o)
425
+ }, null, 8, ["id", "model-value", "options", "disabled", "placeholder", "has-error", "aria-describedby", "onUpdate:modelValue"])
426
+ ]),
427
+ Z(a) ? (s(), x(D, {
428
+ key: 0,
429
+ type: "button",
430
+ variant: a.actionButton.variant || "outline",
431
+ size: a.actionButton.size || "icon",
432
+ class: v(a.actionButton.class || ""),
433
+ title: a.actionButton.title || a.actionButton.label || "Action",
434
+ disabled: f(a),
435
+ loading: ee(a),
436
+ onClick: (o) => ae(a)
437
+ }, {
438
+ default: V(() => [
439
+ F(_(a.actionButton.label || "+"), 1)
440
+ ]),
441
+ _: 2
442
+ }, 1032, ["variant", "size", "class", "title", "disabled", "loading", "onClick"])) : w("", !0)
443
+ ])) : a.type === "combobox" ? (s(), x(ie, {
444
+ key: 4,
445
+ id: l,
446
+ "model-value": m(a.name),
447
+ options: a.options,
448
+ placeholder: a.placeholder || "Select or type to add new",
449
+ disabled: c.value || a.disabled,
450
+ "has-error": b,
451
+ "aria-describedby": y,
452
+ "allow-create": a.allowCreate,
453
+ "onUpdate:modelValue": (o) => oe(a, o)
454
+ }, null, 8, ["id", "model-value", "options", "placeholder", "disabled", "has-error", "aria-describedby", "allow-create", "onUpdate:modelValue"])) : a.type === "checkbox" ? (s(), i("div", ta, [
455
+ C($, {
456
+ id: l,
457
+ "model-value": m(a.name),
458
+ type: "checkbox",
459
+ disabled: c.value || a.disabled,
460
+ class: "h-4 w-4 rounded ui-border-strong",
461
+ "aria-describedby": y,
462
+ "onUpdate:modelValue": (o) => p(a.name, o)
463
+ }, null, 8, ["id", "model-value", "disabled", "aria-describedby", "onUpdate:modelValue"]),
464
+ C(G, {
465
+ for: l,
466
+ class: "ml-2 text-sm ui-text"
467
+ }, {
468
+ default: V(() => [
469
+ F(_(a.checkboxLabel || a.label), 1)
470
+ ]),
471
+ _: 2
472
+ }, 1032, ["for"])
473
+ ])) : a.type === "switch" ? (s(), i("div", na, [
474
+ k("button", {
475
+ id: l,
476
+ type: "button",
477
+ role: "switch",
478
+ "aria-checked": m(a.name),
479
+ disabled: c.value || a.disabled,
480
+ class: v([
481
+ "relative inline-flex h-6 w-11 items-center rounded-full border-2 transition-colors focus:outline-none focus:ring-2 focus:ring-(--ui-primary) focus:ring-offset-2",
482
+ m(a.name) ? "ui-primary-bg border-(--ui-primary)" : "ui-surface-soft border-(--ui-border-strong)",
483
+ c.value || a.disabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
484
+ ]),
485
+ onClick: (o) => p(a.name, !m(a.name))
486
+ }, [
487
+ k("span", {
488
+ class: v(["inline-block h-4 w-4 transform rounded-full ui-surface border ui-border-strong transition-transform", m(a.name) ? "translate-x-6" : "translate-x-1"])
489
+ }, null, 2)
490
+ ], 10, oa),
491
+ C(G, {
492
+ for: l,
493
+ class: "ml-3 text-sm ui-text"
494
+ }, {
495
+ default: V(() => [
496
+ F(_(a.checkboxLabel || a.label), 1)
497
+ ]),
498
+ _: 2
499
+ }, 1032, ["for"])
500
+ ])) : a.type === "radio" ? (s(), i("div", sa, [
501
+ (s(!0), i(L, null, J(a.options, (o) => (s(), i("div", {
502
+ key: o.value,
503
+ class: "flex items-center"
504
+ }, [
505
+ C($, {
506
+ id: `${l}-${o.value}`,
507
+ "model-value": m(a.name),
508
+ type: "radio",
509
+ value: o.value,
510
+ disabled: c.value || a.disabled,
511
+ class: "h-4 w-4 ui-border-strong",
512
+ "aria-describedby": y,
513
+ "onUpdate:modelValue": (Me) => p(a.name, Me)
514
+ }, null, 8, ["id", "model-value", "value", "disabled", "aria-describedby", "onUpdate:modelValue"]),
515
+ C(G, {
516
+ for: `${l}-${o.value}`,
517
+ class: "ml-2 text-sm ui-text"
518
+ }, {
519
+ default: V(() => [
520
+ F(_(o.label), 1)
521
+ ]),
522
+ _: 2
523
+ }, 1032, ["for"])
524
+ ]))), 128))
525
+ ])) : a.type === "file" ? (s(), x(ue, {
526
+ key: 8,
527
+ multiple: !1,
528
+ accept: a.accept,
529
+ "max-size": a.maxSize,
530
+ variant: a.variant || "default",
531
+ onFilesSelected: (o) => Ce(a, o),
532
+ onFileRemoved: (o) => Ve(a, o)
533
+ }, null, 8, ["accept", "max-size", "variant", "onFilesSelected", "onFileRemoved"])) : a.type === "multifile" ? (s(), x(ue, {
534
+ key: 9,
535
+ multiple: a.multiple !== !1,
536
+ accept: a.accept,
537
+ "max-size": a.maxSize,
538
+ "max-files": a.maxFiles,
539
+ variant: a.variant || "default",
540
+ onFilesSelected: (o) => Fe(a, o),
541
+ onFileRemoved: (o) => Se(a, o)
542
+ }, null, 8, ["multiple", "accept", "max-size", "max-files", "variant", "onFilesSelected", "onFileRemoved"])) : a.type === "slider" ? (s(), x(Re, {
543
+ key: 10,
544
+ "model-value": m(a.name),
545
+ min: a.min,
546
+ max: a.max,
547
+ step: a.step,
548
+ disabled: c.value || a.disabled,
549
+ "onUpdate:modelValue": (o) => _e(a, o)
550
+ }, null, 8, ["model-value", "min", "max", "step", "disabled", "onUpdate:modelValue"])) : a.type === "range" ? (s(), i("div", ra, [
551
+ k("div", la, [
552
+ C($, {
553
+ id: l,
554
+ "model-value": m(a.name),
555
+ type: "range",
556
+ min: a.min,
557
+ max: a.max,
558
+ step: a.step || 1,
559
+ disabled: c.value || a.disabled,
560
+ class: "flex-1",
561
+ "aria-describedby": y,
562
+ "onUpdate:modelValue": (o) => p(a.name, o)
563
+ }, null, 8, ["id", "model-value", "min", "max", "step", "disabled", "aria-describedby", "onUpdate:modelValue"]),
564
+ k("span", ia, _(m(a.name)), 1)
565
+ ])
566
+ ])) : a.type === "date" ? (s(), x(le, {
567
+ key: 12,
568
+ id: l,
569
+ "model-value": m(a.name),
570
+ disabled: c.value || a.disabled,
571
+ required: a.required,
572
+ min: a.min,
573
+ max: a.max,
574
+ placeholder: a.placeholder || "Select date",
575
+ format: a.format || "DD/MM/YYYY",
576
+ "enable-time": a.enableTime === !0,
577
+ "minute-interval": a.minuteInterval || 1,
578
+ clearable: a.clearable !== !1,
579
+ "show-today": a.showToday !== !1,
580
+ "calendar-position": a.calendarPosition || "left-0 bottom-full",
581
+ "aria-describedby": y,
582
+ "onUpdate:modelValue": (o) => p(a.name, o)
583
+ }, null, 8, ["id", "model-value", "disabled", "required", "min", "max", "placeholder", "format", "enable-time", "minute-interval", "clearable", "show-today", "calendar-position", "aria-describedby", "onUpdate:modelValue"])) : a.type === "time" ? (s(), x($, {
584
+ key: 13,
585
+ id: l,
586
+ "model-value": m(a.name),
587
+ type: "time",
588
+ disabled: c.value || a.disabled,
589
+ class: v([b ? "border-(--ui-danger)" : "ui-border-strong", a.inputClass || ""]),
590
+ "aria-describedby": y,
591
+ "onUpdate:modelValue": (o) => p(a.name, o)
592
+ }, null, 8, ["id", "model-value", "disabled", "class", "aria-describedby", "onUpdate:modelValue"])) : a.type === "datetime-local" ? (s(), x(le, {
593
+ key: 14,
594
+ id: l,
595
+ "model-value": m(a.name),
596
+ disabled: c.value || a.disabled,
597
+ required: a.required,
598
+ min: a.min,
599
+ max: a.max,
600
+ placeholder: a.placeholder || "Select date and time",
601
+ format: a.format || "DD/MM/YYYY",
602
+ "enable-time": !0,
603
+ "minute-interval": a.minuteInterval || 1,
604
+ clearable: a.clearable !== !1,
605
+ "show-today": a.showToday !== !1,
606
+ "aria-describedby": y,
607
+ "onUpdate:modelValue": (o) => p(a.name, o)
608
+ }, null, 8, ["id", "model-value", "disabled", "required", "min", "max", "placeholder", "format", "minute-interval", "clearable", "show-today", "aria-describedby", "onUpdate:modelValue"])) : a.type === "month" ? (s(), x($, {
609
+ key: 15,
610
+ id: l,
611
+ "model-value": m(a.name),
612
+ type: "month",
613
+ disabled: c.value || a.disabled,
614
+ class: v([b ? "border-(--ui-danger)" : "ui-border-strong", a.inputClass || ""]),
615
+ "aria-describedby": y,
616
+ "onUpdate:modelValue": (o) => p(a.name, o)
617
+ }, null, 8, ["id", "model-value", "disabled", "class", "aria-describedby", "onUpdate:modelValue"])) : a.type === "week" ? (s(), x($, {
618
+ key: 16,
619
+ id: l,
620
+ "model-value": m(a.name),
621
+ type: "week",
622
+ disabled: c.value || a.disabled,
623
+ class: v([b ? "border-(--ui-danger)" : "ui-border-strong", a.inputClass || ""]),
624
+ "aria-describedby": y,
625
+ "onUpdate:modelValue": (o) => p(a.name, o)
626
+ }, null, 8, ["id", "model-value", "disabled", "class", "aria-describedby", "onUpdate:modelValue"])) : w("", !0)
627
+ ], !0)
628
+ ]),
629
+ _: 2
630
+ }, 1032, ["id", "label", "required", "error", "error-message", "help-text", "class"]))
631
+ ], 2))), 128))
632
+ ], 2)
633
+ ], 2)
634
+ ], 2))), 128)),
635
+ H(e.$slots, "actions", {
636
+ formData: u.value,
637
+ isValid: pe.value,
638
+ submit: se
639
+ }, () => [
640
+ h.showSubmit ? (s(), i("div", ua, [
641
+ h.showReset ? (s(), x(D, {
642
+ key: 0,
643
+ type: "button",
644
+ variant: "outline",
645
+ disabled: c.value,
646
+ onClick: Be
647
+ }, {
648
+ default: V(() => [...t[2] || (t[2] = [
649
+ F(" Reset ", -1)
650
+ ])]),
651
+ _: 1
652
+ }, 8, ["disabled"])) : w("", !0),
653
+ h.showCancel ? (s(), x(D, {
654
+ key: 1,
655
+ type: "button",
656
+ variant: "outline",
657
+ disabled: c.value,
658
+ onClick: Te
659
+ }, {
660
+ default: V(() => [...t[3] || (t[3] = [
661
+ F(" Cancel ", -1)
662
+ ])]),
663
+ _: 1
664
+ }, 8, ["disabled"])) : w("", !0),
665
+ C(D, {
666
+ type: "submit",
667
+ disabled: c.value,
668
+ loading: c.value,
669
+ variant: "default"
670
+ }, {
671
+ default: V(() => [
672
+ F(_(h.submitLabel), 1)
673
+ ]),
674
+ _: 1
675
+ }, 8, ["disabled", "loading"])
676
+ ])) : w("", !0)
677
+ ], !0),
678
+ h.showSubmit && de.value ? (s(), i("div", ca)) : w("", !0)
679
+ ], 32)
680
+ ]);
681
+ };
682
+ }
683
+ }, Fa = /* @__PURE__ */ Oe(ma, [["__scopeId", "data-v-7f79d2a2"]]);
684
+ export {
685
+ Fa as default
686
+ };