@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
package/README.md CHANGED
@@ -190,6 +190,41 @@ describe('Component', () => {
190
190
 
191
191
  This document provides comprehensive usage examples and API reference for all Vue components and directives in GSPA UI.
192
192
 
193
+ ## Importing components
194
+
195
+ Import individual components when the application does not need the global plugin. Granular exports keep unrelated components out of the application bundle:
196
+
197
+ ```js
198
+ import Button from '@gspa/ui/components/Button'
199
+ import AuthLayout from '@gspa/ui/layouts/AuthLayout'
200
+ import '@gspa/ui/css'
201
+ ```
202
+
203
+ For a small entry point, import component CSS instead of the complete utility sheet:
204
+
205
+ ```js
206
+ import Button from '@gspa/ui/components/Button'
207
+ import '@gspa/ui/css/button'
208
+ ```
209
+
210
+ Granular styles are available for `button`, `input`, `form-field`, and `auth-layout`. `@gspa/ui/css/tokens` contains only semantic theme tokens and shared accessibility rules. Scoped legacy styles can be loaded through `@gspa/ui/css/scoped/<Component>` when that component needs them.
211
+
212
+ Form controls include their validation and password icons, so authentication forms do not require global Font Awesome registration. For custom `Icon` names, applications may retain Font Awesome or provide a component adapter once:
213
+
214
+ ```js
215
+ app.use(VueUI, {
216
+ iconAdapter: ({ name, prefix }) => myIconRegistry[prefix]?.[name]
217
+ })
218
+ ```
219
+
220
+ Nested components use the same convention:
221
+
222
+ ```js
223
+ import BarChart from '@gspa/ui/components/charts/BarChart'
224
+ ```
225
+
226
+ Named imports from `@gspa/ui` remain tree-shakeable. The default `VueUI` plugin intentionally registers every component and should only be used when an application needs the complete library.
227
+
193
228
  ## Button Authorization Access Control
194
229
 
195
230
  `Button` supports access-control props directly:
@@ -0,0 +1,205 @@
1
+ import { defineComponent as x, inject as k, computed as i, createElementBlock as a, createCommentVNode as s, openBlock as n, mergeProps as z, unref as h, createBlock as S, renderSlot as B, normalizeClass as g, createElementVNode as m, toDisplayString as b } from "vue";
2
+ import { cva as O } from "class-variance-authority";
3
+ import { cn as A } from "./utils/cn.js";
4
+ import C from "./components/Icon.js";
5
+ import { AUTH_RESOLVER_KEY as E } from "./lib/auth.js";
6
+ const M = ["disabled", "type", "aria-disabled", "aria-busy"], R = { key: 2 }, V = {
7
+ key: 4,
8
+ class: "sr-only",
9
+ role: "status",
10
+ "aria-live": "polite"
11
+ }, F = /* @__PURE__ */ x({
12
+ inheritAttrs: !1,
13
+ __name: "Button",
14
+ props: {
15
+ variant: {
16
+ type: String,
17
+ default: "default",
18
+ validator: (e) => [
19
+ "primary",
20
+ "default",
21
+ "danger",
22
+ "outline",
23
+ "secondary",
24
+ "ghost",
25
+ "link",
26
+ "success",
27
+ "warning",
28
+ "info",
29
+ "subtle",
30
+ "dark",
31
+ "light",
32
+ "primaryOutline",
33
+ "dangerOutline",
34
+ "successOutline",
35
+ "gradient"
36
+ ].includes(e)
37
+ },
38
+ size: {
39
+ type: String,
40
+ default: "default",
41
+ validator: (e) => ["2xs", "xs", "sm", "default", "md", "lg", "xl", "2xl", "icon-sm", "icon", "icon-lg"].includes(e)
42
+ },
43
+ disabled: {
44
+ type: Boolean,
45
+ default: !1
46
+ },
47
+ loading: {
48
+ type: Boolean,
49
+ default: !1
50
+ },
51
+ loadingText: {
52
+ type: String,
53
+ default: null
54
+ },
55
+ loadingLabel: {
56
+ type: String,
57
+ default: "Loading"
58
+ },
59
+ type: {
60
+ type: String,
61
+ default: "button"
62
+ },
63
+ icon: {
64
+ type: String,
65
+ default: null
66
+ },
67
+ permission: {
68
+ type: [String, Array, Boolean, Function],
69
+ default: null
70
+ },
71
+ role: {
72
+ type: [String, Array, Boolean, Function],
73
+ default: null
74
+ },
75
+ requireAll: {
76
+ type: Boolean,
77
+ default: !1
78
+ },
79
+ unauthorized: {
80
+ type: String,
81
+ default: "show",
82
+ validator: (e) => ["show", "hide", "disable"].includes(e)
83
+ }
84
+ },
85
+ setup(e) {
86
+ const t = e, d = k(E, null), l = (r) => r == null ? null : typeof r == "boolean" ? r : typeof r == "function" ? !!r() : r, u = i(() => {
87
+ const r = l(t.permission), o = l(t.role);
88
+ return r === null && o === null ? !0 : (r === null || typeof r == "boolean") && (o === null || typeof o == "boolean") ? (r ?? !0) && (o ?? !0) : typeof d == "function" ? !!d({
89
+ permission: r,
90
+ role: o,
91
+ requireAll: t.requireAll
92
+ }) : !0;
93
+ }), f = i(() => t.unauthorized === "hide" && !u.value), p = i(() => t.unauthorized === "disable" && !u.value), c = i(() => t.disabled || t.loading || p.value), v = O(
94
+ "inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium transition-[color,background-color,border-color,box-shadow,transform] duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--ui-primary) focus-visible:ring-offset-2 active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50",
95
+ {
96
+ variants: {
97
+ variant: {
98
+ primary: "ui-primary-bg shadow-sm hover:bg-(--ui-primary-strong) hover:shadow-md",
99
+ default: "ui-primary-bg shadow-sm hover:bg-(--ui-primary-strong) hover:shadow-md",
100
+ danger: "ui-danger-bg shadow-sm hover:bg-(--ui-danger-strong) hover:shadow-md",
101
+ outline: "border ui-border-strong ui-surface ui-text hover:bg-(--ui-surface-soft) hover:border-(--ui-primary) hover:text-(--ui-primary)",
102
+ secondary: "border ui-border ui-surface-muted ui-text hover:bg-(--ui-surface-soft) hover:shadow-sm",
103
+ ghost: "bg-transparent ui-text-muted hover:bg-[color:color-mix(in oklab, var(--ui-accent-soft), transparent 40%)] hover:text-(--ui-text)",
104
+ link: "ui-primary underline-offset-4 hover:underline hover:text-(--ui-primary-strong)",
105
+ success: "ui-success-bg shadow-sm hover:bg-(--ui-success-strong) hover:shadow-md",
106
+ warning: "ui-warning-bg shadow-sm hover:bg-(--ui-warning-strong) hover:shadow-md",
107
+ info: "border border-blue-600 bg-blue-600 text-white shadow-sm hover:bg-blue-700 hover:shadow-md dark:border-blue-500 dark:bg-blue-500 dark:text-white dark:hover:bg-blue-400",
108
+ subtle: "border ui-border ui-surface ui-text-muted hover:text-(--ui-text) hover:bg-(--ui-surface-soft)",
109
+ dark: "border border-zinc-900 bg-zinc-900 text-white shadow-sm hover:bg-black hover:shadow-md dark:border-zinc-100 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-white",
110
+ light: "border border-zinc-200 bg-white text-zinc-900 shadow-sm hover:bg-zinc-50 hover:shadow-md dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800",
111
+ primaryOutline: "border border-(--ui-primary) ui-primary bg-transparent hover:bg-(--ui-primary-soft) hover:border-(--ui-primary-strong) hover:text-(--ui-primary-strong)",
112
+ dangerOutline: "border border-(--ui-danger) ui-danger bg-transparent hover:bg-(--ui-danger-soft) hover:border-(--ui-danger-strong) hover:text-(--ui-danger-strong)",
113
+ successOutline: "border border-(--ui-success) ui-success bg-transparent hover:bg-(--ui-success-soft) hover:border-(--ui-success-strong) hover:text-(--ui-success-strong)",
114
+ gradient: "bg-linear-to-r from-(--ui-primary) to-(--ui-accent) ui-text-inverse shadow-sm hover:from-(--ui-primary-strong) hover:to-(--ui-accent-strong) hover:shadow-md"
115
+ },
116
+ size: {
117
+ "2xs": "h-4 px-1 py-3 text-md rounded",
118
+ xs: "h-7 px-2.5 py-1 text-xs rounded-md",
119
+ sm: "h-8 px-3 py-1.5 text-sm rounded-md",
120
+ default: "h-9 px-4 py-2 text-sm rounded-md",
121
+ md: "h-10 px-4 py-2 text-sm rounded-md",
122
+ lg: "h-11 px-6 py-2.5 text-base rounded-md",
123
+ xl: "h-12 px-8 py-3 text-base rounded-lg",
124
+ "2xl": "h-14 px-10 py-3.5 text-lg rounded-lg",
125
+ "icon-sm": "h-8 w-8 p-0",
126
+ icon: "h-10 w-10 p-0",
127
+ "icon-lg": "h-12 w-12 p-0"
128
+ }
129
+ },
130
+ defaultVariants: {
131
+ variant: "default",
132
+ size: "default"
133
+ }
134
+ }
135
+ ), y = i(() => ({
136
+ "2xs": "h-3 w-3",
137
+ xs: "h-3.5 w-3.5",
138
+ sm: "h-4 w-4",
139
+ default: "h-4 w-4",
140
+ md: "h-4 w-4",
141
+ lg: "h-5 w-5",
142
+ xl: "h-5 w-5",
143
+ "2xl": "h-6 w-6",
144
+ "icon-sm": "h-4 w-4",
145
+ icon: "h-5 w-5",
146
+ "icon-lg": "h-6 w-6"
147
+ })[t.size] || "h-4 w-4"), w = i(() => ({
148
+ "2xs": "h-3 w-3",
149
+ xs: "h-3.5 w-3.5",
150
+ sm: "h-4 w-4",
151
+ default: "h-4 w-4",
152
+ md: "h-4 w-4",
153
+ lg: "h-5 w-5",
154
+ xl: "h-5 w-5",
155
+ "2xl": "h-6 w-6",
156
+ "icon-sm": "h-4 w-4",
157
+ icon: "h-5 w-5",
158
+ "icon-lg": "h-6 w-6"
159
+ })[t.size] || "h-4 w-4");
160
+ return (r, o) => f.value ? s("", !0) : (n(), a("button", z({
161
+ key: 0,
162
+ class: h(A)(h(v)({ variant: e.variant, size: e.size }), r.$attrs.class),
163
+ disabled: c.value,
164
+ type: e.type,
165
+ "aria-disabled": c.value,
166
+ "aria-busy": e.loading
167
+ }, r.$attrs), [
168
+ e.loading ? (n(), a("svg", {
169
+ key: 0,
170
+ class: g([w.value, "animate-spin mr-2 text-current"]),
171
+ xmlns: "http://www.w3.org/2000/svg",
172
+ fill: "none",
173
+ viewBox: "0 0 24 24",
174
+ "aria-hidden": "true"
175
+ }, [...o[0] || (o[0] = [
176
+ m("circle", {
177
+ class: "opacity-25",
178
+ cx: "12",
179
+ cy: "12",
180
+ r: "10",
181
+ stroke: "currentColor",
182
+ "stroke-width": "4"
183
+ }, null, -1),
184
+ m("path", {
185
+ class: "opacity-75",
186
+ fill: "none",
187
+ stroke: "currentColor",
188
+ "stroke-linecap": "round",
189
+ "stroke-width": "4",
190
+ d: "M4 12a8 8 0 018-8"
191
+ }, null, -1)
192
+ ])], 2)) : s("", !0),
193
+ e.icon && !e.loading ? (n(), S(C, {
194
+ key: 1,
195
+ icon: e.icon,
196
+ class: g(y.value)
197
+ }, null, 8, ["icon", "class"])) : s("", !0),
198
+ e.loading && e.loadingText ? (n(), a("span", R, b(e.loadingText), 1)) : B(r.$slots, "default", { key: 3 }),
199
+ e.loading ? (n(), a("span", V, b(e.loadingLabel), 1)) : s("", !0)
200
+ ], 16, M));
201
+ }
202
+ });
203
+ export {
204
+ F as _
205
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),m=require("class-variance-authority"),b=require("./utils/cn.cjs"),p=require("./components/Icon.cjs"),f=require("./lib/auth.cjs"),v=["disabled","type","aria-disabled","aria-busy"],y={key:2},w={key:4,class:"sr-only",role:"status","aria-live":"polite"},x=e.defineComponent({inheritAttrs:!1,__name:"Button",props:{variant:{type:String,default:"default",validator:r=>["primary","default","danger","outline","secondary","ghost","link","success","warning","info","subtle","dark","light","primaryOutline","dangerOutline","successOutline","gradient"].includes(r)},size:{type:String,default:"default",validator:r=>["2xs","xs","sm","default","md","lg","xl","2xl","icon-sm","icon","icon-lg"].includes(r)},disabled:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},loadingText:{type:String,default:null},loadingLabel:{type:String,default:"Loading"},type:{type:String,default:"button"},icon:{type:String,default:null},permission:{type:[String,Array,Boolean,Function],default:null},role:{type:[String,Array,Boolean,Function],default:null},requireAll:{type:Boolean,default:!1},unauthorized:{type:String,default:"show",validator:r=>["show","hide","disable"].includes(r)}},setup(r){const o=r,i=e.inject(f.AUTH_RESOLVER_KEY,null),a=t=>t==null?null:typeof t=="boolean"?t:typeof t=="function"?!!t():t,s=e.computed(()=>{const t=a(o.permission),n=a(o.role);return t===null&&n===null?!0:(t===null||typeof t=="boolean")&&(n===null||typeof n=="boolean")?(t??!0)&&(n??!0):typeof i=="function"?!!i({permission:t,role:n,requireAll:o.requireAll}):!0}),u=e.computed(()=>o.unauthorized==="hide"&&!s.value),d=e.computed(()=>o.unauthorized==="disable"&&!s.value),l=e.computed(()=>o.disabled||o.loading||d.value),c=m.cva("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md font-medium transition-[color,background-color,border-color,box-shadow,transform] duration-200 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--ui-primary) focus-visible:ring-offset-2 active:scale-[0.98] disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{primary:"ui-primary-bg shadow-sm hover:bg-(--ui-primary-strong) hover:shadow-md",default:"ui-primary-bg shadow-sm hover:bg-(--ui-primary-strong) hover:shadow-md",danger:"ui-danger-bg shadow-sm hover:bg-(--ui-danger-strong) hover:shadow-md",outline:"border ui-border-strong ui-surface ui-text hover:bg-(--ui-surface-soft) hover:border-(--ui-primary) hover:text-(--ui-primary)",secondary:"border ui-border ui-surface-muted ui-text hover:bg-(--ui-surface-soft) hover:shadow-sm",ghost:"bg-transparent ui-text-muted hover:bg-[color:color-mix(in oklab, var(--ui-accent-soft), transparent 40%)] hover:text-(--ui-text)",link:"ui-primary underline-offset-4 hover:underline hover:text-(--ui-primary-strong)",success:"ui-success-bg shadow-sm hover:bg-(--ui-success-strong) hover:shadow-md",warning:"ui-warning-bg shadow-sm hover:bg-(--ui-warning-strong) hover:shadow-md",info:"border border-blue-600 bg-blue-600 text-white shadow-sm hover:bg-blue-700 hover:shadow-md dark:border-blue-500 dark:bg-blue-500 dark:text-white dark:hover:bg-blue-400",subtle:"border ui-border ui-surface ui-text-muted hover:text-(--ui-text) hover:bg-(--ui-surface-soft)",dark:"border border-zinc-900 bg-zinc-900 text-white shadow-sm hover:bg-black hover:shadow-md dark:border-zinc-100 dark:bg-zinc-100 dark:text-zinc-900 dark:hover:bg-white",light:"border border-zinc-200 bg-white text-zinc-900 shadow-sm hover:bg-zinc-50 hover:shadow-md dark:border-zinc-700 dark:bg-zinc-900 dark:text-zinc-100 dark:hover:bg-zinc-800",primaryOutline:"border border-(--ui-primary) ui-primary bg-transparent hover:bg-(--ui-primary-soft) hover:border-(--ui-primary-strong) hover:text-(--ui-primary-strong)",dangerOutline:"border border-(--ui-danger) ui-danger bg-transparent hover:bg-(--ui-danger-soft) hover:border-(--ui-danger-strong) hover:text-(--ui-danger-strong)",successOutline:"border border-(--ui-success) ui-success bg-transparent hover:bg-(--ui-success-soft) hover:border-(--ui-success-strong) hover:text-(--ui-success-strong)",gradient:"bg-linear-to-r from-(--ui-primary) to-(--ui-accent) ui-text-inverse shadow-sm hover:from-(--ui-primary-strong) hover:to-(--ui-accent-strong) hover:shadow-md"},size:{"2xs":"h-4 px-1 py-3 text-md rounded",xs:"h-7 px-2.5 py-1 text-xs rounded-md",sm:"h-8 px-3 py-1.5 text-sm rounded-md",default:"h-9 px-4 py-2 text-sm rounded-md",md:"h-10 px-4 py-2 text-sm rounded-md",lg:"h-11 px-6 py-2.5 text-base rounded-md",xl:"h-12 px-8 py-3 text-base rounded-lg","2xl":"h-14 px-10 py-3.5 text-lg rounded-lg","icon-sm":"h-8 w-8 p-0",icon:"h-10 w-10 p-0","icon-lg":"h-12 w-12 p-0"}},defaultVariants:{variant:"default",size:"default"}}),h=e.computed(()=>({"2xs":"h-3 w-3",xs:"h-3.5 w-3.5",sm:"h-4 w-4",default:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-5 w-5","2xl":"h-6 w-6","icon-sm":"h-4 w-4",icon:"h-5 w-5","icon-lg":"h-6 w-6"})[o.size]||"h-4 w-4"),g=e.computed(()=>({"2xs":"h-3 w-3",xs:"h-3.5 w-3.5",sm:"h-4 w-4",default:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5",xl:"h-5 w-5","2xl":"h-6 w-6","icon-sm":"h-4 w-4",icon:"h-5 w-5","icon-lg":"h-6 w-6"})[o.size]||"h-4 w-4");return(t,n)=>u.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("button",e.mergeProps({key:0,class:e.unref(b.cn)(e.unref(c)({variant:r.variant,size:r.size}),t.$attrs.class),disabled:l.value,type:r.type,"aria-disabled":l.value,"aria-busy":r.loading},t.$attrs),[r.loading?(e.openBlock(),e.createElementBlock("svg",{key:0,class:e.normalizeClass([g.value,"animate-spin mr-2 text-current"]),xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","aria-hidden":"true"},[...n[0]||(n[0]=[e.createElementVNode("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),e.createElementVNode("path",{class:"opacity-75",fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-width":"4",d:"M4 12a8 8 0 018-8"},null,-1)])],2)):e.createCommentVNode("",!0),r.icon&&!r.loading?(e.openBlock(),e.createBlock(p.default,{key:1,icon:r.icon,class:e.normalizeClass(h.value)},null,8,["icon","class"])):e.createCommentVNode("",!0),r.loading&&r.loadingText?(e.openBlock(),e.createElementBlock("span",y,e.toDisplayString(r.loadingText),1)):e.renderSlot(t.$slots,"default",{key:3}),r.loading?(e.openBlock(),e.createElementBlock("span",w,e.toDisplayString(r.loadingLabel),1)):e.createCommentVNode("",!0)],16,v))}});exports._sfc_main=x;
@@ -0,0 +1 @@
1
+ .table-loading-overlay[data-v-dc691687]{border-radius:.5rem;z-index:10}.kv-module-themed-table[data-v-dc691687] thead th{background:var(--module-soft, var(--ui-primary-soft));color:var(--module-text, var(--ui-primary));border-bottom-color:var(--module-border, var(--ui-border-strong))}.kv-module-themed-table[data-v-dc691687] tbody tr:nth-child(odd){background:var(--module-soft-alt, transparent)}.kv-module-themed-table[data-v-dc691687] tbody tr:nth-child(2n){background:color-mix(in oklab,var(--module-soft-alt, transparent) 55%,transparent 45%)}@keyframes pulse-dc691687{0%,to{opacity:1}50%{opacity:.5}}.animate-pulse[data-v-dc691687]{animation:pulse-dc691687 2s cubic-bezier(.4,0,.6,1) infinite}
@@ -0,0 +1 @@
1
+ .kv-module-themed-toolbar[data-v-b6fc1eb4]{border-color:var(--module-border, var(--ui-border-strong));background:color-mix(in oklab,var(--module-soft, var(--ui-primary-soft)) 50%,var(--ui-bg) 50%)}.kv-module-themed-toolbar[data-v-b6fc1eb4] button{border-color:var(--module-border, var(--ui-border-strong))}
@@ -0,0 +1,205 @@
1
+ import { defineComponent as D, useId as N, computed as s, ref as F, provide as A, createElementBlock as r, openBlock as i, normalizeClass as m, unref as a, createCommentVNode as c, createElementVNode as d, createVNode as B, createTextVNode as O, toDisplayString as h, createBlock as H, renderSlot as K, Transition as C, withCtx as T } from "vue";
2
+ import { cva as g } from "class-variance-authority";
3
+ import { cn as f } from "./utils/cn.js";
4
+ import { FORM_FIELD_CONTEXT_KEY as R } from "./lib/form-field.js";
5
+ import U from "./components/DatePicker.js";
6
+ const X = ["for"], Y = {
7
+ key: 0,
8
+ class: "ui-danger ml-1",
9
+ "aria-hidden": "true"
10
+ }, G = {
11
+ key: 1,
12
+ class: "sr-only"
13
+ }, J = ["id"], Q = { class: "relative" }, W = ["disabled", "aria-controls", "aria-label"], Z = {
14
+ key: 0,
15
+ class: "h-4 w-4",
16
+ viewBox: "0 0 24 24",
17
+ fill: "none",
18
+ stroke: "currentColor",
19
+ "aria-hidden": "true"
20
+ }, _ = {
21
+ key: 1,
22
+ class: "h-4 w-4",
23
+ viewBox: "0 0 24 24",
24
+ fill: "none",
25
+ stroke: "currentColor",
26
+ "aria-hidden": "true"
27
+ }, ee = ["id"], te = ["id"], se = ["id"], oe = /* @__PURE__ */ D({
28
+ inheritAttrs: !1,
29
+ __name: "FormField",
30
+ props: {
31
+ label: String,
32
+ description: String,
33
+ error: String,
34
+ serverError: String,
35
+ success: String,
36
+ helpText: String,
37
+ required: { type: Boolean, default: !1 },
38
+ disabled: { type: Boolean, default: !1 },
39
+ autocomplete: String,
40
+ name: String,
41
+ type: { type: String, default: "text" },
42
+ modelValue: { type: [String, Date], default: "" },
43
+ size: { type: String, default: "md" },
44
+ id: String,
45
+ showPasswordLabel: { type: String, default: "Show password" },
46
+ hidePasswordLabel: { type: String, default: "Hide password" }
47
+ },
48
+ emits: ["update:modelValue"],
49
+ setup(e, { emit: M }) {
50
+ const t = e, q = M, E = `field-${N()}`, o = s(() => t.id || E), b = s(() => t.serverError || t.error || ""), n = s(() => !!b.value), v = F(!1), p = s(() => t.type === "password" && v.value ? "text" : t.type), x = s(() => `${o.value}-description`), k = s(() => `${o.value}-error`), w = s(() => `${o.value}-help`), z = s(() => `${o.value}-success`), V = () => {
51
+ t.disabled || (v.value = !v.value);
52
+ }, y = s(() => {
53
+ const u = [];
54
+ return t.description && u.push(x.value), n.value ? u.push(k.value) : t.helpText && u.push(w.value), t.success && !n.value && u.push(z.value), u.length ? u.join(" ") : void 0;
55
+ });
56
+ A(R, {
57
+ id: o,
58
+ describedBy: y,
59
+ invalid: n,
60
+ required: s(() => t.required),
61
+ disabled: s(() => t.disabled),
62
+ autocomplete: s(() => t.autocomplete),
63
+ name: s(() => t.name),
64
+ inputType: p,
65
+ originalType: s(() => t.type),
66
+ hasPasswordToggle: s(() => t.type === "password")
67
+ });
68
+ const I = g("ui-text", { variants: { size: { sm: "space-y-1", md: "space-y-2", lg: "space-y-3" } }, defaultVariants: { size: "md" } }), L = g("block ui-text", { variants: { size: { sm: "text-xs font-medium", md: "text-sm font-medium", lg: "text-base font-medium" } }, defaultVariants: { size: "md" } }), P = g("ui-text-muted", { variants: { size: { sm: "text-xs", md: "text-sm", lg: "text-base" } }, defaultVariants: { size: "md" } }), S = g("flex items-start gap-2", { variants: { size: { sm: "text-xs", md: "text-sm", lg: "text-sm" }, intent: { error: "ui-danger", success: "ui-success" } }, defaultVariants: { size: "md", intent: "error" } }), $ = g("ui-text-muted", { variants: { size: { sm: "text-xs", md: "text-sm", lg: "text-sm" } }, defaultVariants: { size: "md" } });
69
+ return (u, l) => (i(), r("div", {
70
+ class: m(a(f)(a(I)({ size: e.size }), u.$attrs.class))
71
+ }, [
72
+ e.label ? (i(), r("label", {
73
+ key: 0,
74
+ for: o.value,
75
+ class: m(a(f)(a(L)({ size: e.size })))
76
+ }, [
77
+ O(h(e.label) + " ", 1),
78
+ e.required ? (i(), r("span", Y, "*")) : c("", !0),
79
+ e.required ? (i(), r("span", G, " (required)")) : c("", !0)
80
+ ], 10, X)) : c("", !0),
81
+ e.description ? (i(), r("p", {
82
+ key: 1,
83
+ id: x.value,
84
+ class: m(a(f)(a(P)({ size: e.size })))
85
+ }, h(e.description), 11, J)) : c("", !0),
86
+ d("div", Q, [
87
+ e.type === "date" ? (i(), H(U, {
88
+ key: 0,
89
+ id: o.value,
90
+ "model-value": e.modelValue,
91
+ disabled: e.disabled,
92
+ required: e.required,
93
+ "aria-describedby": y.value,
94
+ "aria-invalid": n.value,
95
+ class: m(n.value ? "border-(--ui-danger)" : ""),
96
+ "onUpdate:modelValue": l[0] || (l[0] = (j) => q("update:modelValue", j))
97
+ }, null, 8, ["id", "model-value", "disabled", "required", "aria-describedby", "aria-invalid", "class"])) : K(u.$slots, "default", {
98
+ key: 1,
99
+ fieldId: o.value,
100
+ hasError: n.value,
101
+ ariaDescribedBy: y.value,
102
+ inputType: p.value,
103
+ showPassword: v.value,
104
+ togglePasswordVisibility: V
105
+ }),
106
+ e.type === "password" ? (i(), r("button", {
107
+ key: 2,
108
+ type: "button",
109
+ class: "absolute inset-y-0 right-0 flex items-center pr-3 ui-text-muted transition-colors hover:text-(--ui-text) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--ui-ring) focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
110
+ disabled: e.disabled,
111
+ "aria-controls": o.value,
112
+ "aria-label": v.value ? e.hidePasswordLabel : e.showPasswordLabel,
113
+ onClick: V
114
+ }, [
115
+ v.value ? (i(), r("svg", Z, [...l[1] || (l[1] = [
116
+ d("path", {
117
+ "stroke-linecap": "round",
118
+ "stroke-linejoin": "round",
119
+ "stroke-width": "2",
120
+ 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"
121
+ }, null, -1)
122
+ ])])) : (i(), r("svg", _, [...l[2] || (l[2] = [
123
+ d("path", {
124
+ "stroke-linecap": "round",
125
+ "stroke-linejoin": "round",
126
+ "stroke-width": "2",
127
+ 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"
128
+ }, null, -1),
129
+ d("circle", {
130
+ cx: "12",
131
+ cy: "11",
132
+ r: "3",
133
+ "stroke-width": "2"
134
+ }, null, -1)
135
+ ])]))
136
+ ], 8, W)) : c("", !0)
137
+ ]),
138
+ B(C, { name: "ui-field-message" }, {
139
+ default: T(() => [
140
+ n.value ? (i(), r("div", {
141
+ key: 0,
142
+ id: k.value,
143
+ class: m(a(f)(a(S)({ size: e.size, intent: "error" }))),
144
+ role: "alert",
145
+ "aria-live": "polite",
146
+ "aria-atomic": "true"
147
+ }, [
148
+ l[3] || (l[3] = d("svg", {
149
+ class: "mt-0.5 h-4 w-4 shrink-0",
150
+ viewBox: "0 0 24 24",
151
+ fill: "none",
152
+ stroke: "currentColor",
153
+ "aria-hidden": "true"
154
+ }, [
155
+ d("path", {
156
+ "stroke-linecap": "round",
157
+ "stroke-linejoin": "round",
158
+ "stroke-width": "2",
159
+ d: "M12 9v4m0 4h.01M10.3 4.1L2 18.2a1.2 1.2 0 001 1.8h18a1.2 1.2 0 001-1.8L13.7 4.1a2 2 0 00-3.4 0z"
160
+ })
161
+ ], -1)),
162
+ d("span", null, h(b.value), 1)
163
+ ], 10, ee)) : c("", !0)
164
+ ]),
165
+ _: 1
166
+ }),
167
+ e.helpText && !n.value ? (i(), r("p", {
168
+ key: 2,
169
+ id: w.value,
170
+ class: m(a(f)(a($)({ size: e.size })))
171
+ }, h(e.helpText), 11, te)) : c("", !0),
172
+ B(C, { name: "ui-field-message" }, {
173
+ default: T(() => [
174
+ e.success && !n.value ? (i(), r("div", {
175
+ key: 0,
176
+ id: z.value,
177
+ class: m(a(f)(a(S)({ size: e.size, intent: "success" }))),
178
+ role: "status",
179
+ "aria-live": "polite"
180
+ }, [
181
+ l[4] || (l[4] = d("svg", {
182
+ class: "mt-0.5 h-4 w-4 shrink-0",
183
+ viewBox: "0 0 24 24",
184
+ fill: "none",
185
+ stroke: "currentColor",
186
+ "aria-hidden": "true"
187
+ }, [
188
+ d("path", {
189
+ "stroke-linecap": "round",
190
+ "stroke-linejoin": "round",
191
+ "stroke-width": "2",
192
+ d: "M5 12l4 4L19 6"
193
+ })
194
+ ], -1)),
195
+ d("span", null, h(e.success), 1)
196
+ ], 10, se)) : c("", !0)
197
+ ]),
198
+ _: 1
199
+ })
200
+ ], 2));
201
+ }
202
+ });
203
+ export {
204
+ oe as _
205
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),d=require("class-variance-authority"),n=require("./utils/cn.cjs"),C=require("./lib/form-field.cjs"),N=require("./components/DatePicker.cjs"),S=["for"],q={key:0,class:"ui-danger ml-1","aria-hidden":"true"},T={key:1,class:"sr-only"},D=["id"],M={class:"relative"},I=["disabled","aria-controls","aria-label"],P={key:0,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","aria-hidden":"true"},L={key:1,class:"h-4 w-4",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","aria-hidden":"true"},$=["id"],j=["id"],F=["id"],A=e.defineComponent({inheritAttrs:!1,__name:"FormField",props:{label:String,description:String,error:String,serverError:String,success:String,helpText:String,required:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},autocomplete:String,name:String,type:{type:String,default:"text"},modelValue:{type:[String,Date],default:""},size:{type:String,default:"md"},id:String,showPasswordLabel:{type:String,default:"Show password"},hidePasswordLabel:{type:String,default:"Hide password"}},emits:["update:modelValue"],setup(t,{emit:g}){const s=t,b=g,x=`field-${e.useId()}`,i=e.computed(()=>s.id||x),u=e.computed(()=>s.serverError||s.error||""),l=e.computed(()=>!!u.value),o=e.ref(!1),m=e.computed(()=>s.type==="password"&&o.value?"text":s.type),v=e.computed(()=>`${i.value}-description`),f=e.computed(()=>`${i.value}-error`),p=e.computed(()=>`${i.value}-help`),k=e.computed(()=>`${i.value}-success`),h=()=>{s.disabled||(o.value=!o.value)},c=e.computed(()=>{const r=[];return s.description&&r.push(v.value),l.value?r.push(f.value):s.helpText&&r.push(p.value),s.success&&!l.value&&r.push(k.value),r.length?r.join(" "):void 0});e.provide(C.FORM_FIELD_CONTEXT_KEY,{id:i,describedBy:c,invalid:l,required:e.computed(()=>s.required),disabled:e.computed(()=>s.disabled),autocomplete:e.computed(()=>s.autocomplete),name:e.computed(()=>s.name),inputType:m,originalType:e.computed(()=>s.type),hasPasswordToggle:e.computed(()=>s.type==="password")});const V=d.cva("ui-text",{variants:{size:{sm:"space-y-1",md:"space-y-2",lg:"space-y-3"}},defaultVariants:{size:"md"}}),w=d.cva("block ui-text",{variants:{size:{sm:"text-xs font-medium",md:"text-sm font-medium",lg:"text-base font-medium"}},defaultVariants:{size:"md"}}),B=d.cva("ui-text-muted",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-base"}},defaultVariants:{size:"md"}}),y=d.cva("flex items-start gap-2",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-sm"},intent:{error:"ui-danger",success:"ui-success"}},defaultVariants:{size:"md",intent:"error"}}),z=d.cva("ui-text-muted",{variants:{size:{sm:"text-xs",md:"text-sm",lg:"text-sm"}},defaultVariants:{size:"md"}});return(r,a)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(e.unref(n.cn)(e.unref(V)({size:t.size}),r.$attrs.class))},[t.label?(e.openBlock(),e.createElementBlock("label",{key:0,for:i.value,class:e.normalizeClass(e.unref(n.cn)(e.unref(w)({size:t.size})))},[e.createTextVNode(e.toDisplayString(t.label)+" ",1),t.required?(e.openBlock(),e.createElementBlock("span",q,"*")):e.createCommentVNode("",!0),t.required?(e.openBlock(),e.createElementBlock("span",T," (required)")):e.createCommentVNode("",!0)],10,S)):e.createCommentVNode("",!0),t.description?(e.openBlock(),e.createElementBlock("p",{key:1,id:v.value,class:e.normalizeClass(e.unref(n.cn)(e.unref(B)({size:t.size})))},e.toDisplayString(t.description),11,D)):e.createCommentVNode("",!0),e.createElementVNode("div",M,[t.type==="date"?(e.openBlock(),e.createBlock(N.default,{key:0,id:i.value,"model-value":t.modelValue,disabled:t.disabled,required:t.required,"aria-describedby":c.value,"aria-invalid":l.value,class:e.normalizeClass(l.value?"border-(--ui-danger)":""),"onUpdate:modelValue":a[0]||(a[0]=E=>b("update:modelValue",E))},null,8,["id","model-value","disabled","required","aria-describedby","aria-invalid","class"])):e.renderSlot(r.$slots,"default",{key:1,fieldId:i.value,hasError:l.value,ariaDescribedBy:c.value,inputType:m.value,showPassword:o.value,togglePasswordVisibility:h}),t.type==="password"?(e.openBlock(),e.createElementBlock("button",{key:2,type:"button",class:"absolute inset-y-0 right-0 flex items-center pr-3 ui-text-muted transition-colors hover:text-(--ui-text) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--ui-ring) focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",disabled:t.disabled,"aria-controls":i.value,"aria-label":o.value?t.hidePasswordLabel:t.showPasswordLabel,onClick:h},[o.value?(e.openBlock(),e.createElementBlock("svg",P,[...a[1]||(a[1]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",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"},null,-1)])])):(e.openBlock(),e.createElementBlock("svg",L,[...a[2]||(a[2]=[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",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"},null,-1),e.createElementVNode("circle",{cx:"12",cy:"11",r:"3","stroke-width":"2"},null,-1)])]))],8,I)):e.createCommentVNode("",!0)]),e.createVNode(e.Transition,{name:"ui-field-message"},{default:e.withCtx(()=>[l.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:f.value,class:e.normalizeClass(e.unref(n.cn)(e.unref(y)({size:t.size,intent:"error"}))),role:"alert","aria-live":"polite","aria-atomic":"true"},[a[3]||(a[3]=e.createElementVNode("svg",{class:"mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 9v4m0 4h.01M10.3 4.1L2 18.2a1.2 1.2 0 001 1.8h18a1.2 1.2 0 001-1.8L13.7 4.1a2 2 0 00-3.4 0z"})],-1)),e.createElementVNode("span",null,e.toDisplayString(u.value),1)],10,$)):e.createCommentVNode("",!0)]),_:1}),t.helpText&&!l.value?(e.openBlock(),e.createElementBlock("p",{key:2,id:p.value,class:e.normalizeClass(e.unref(n.cn)(e.unref(z)({size:t.size})))},e.toDisplayString(t.helpText),11,j)):e.createCommentVNode("",!0),e.createVNode(e.Transition,{name:"ui-field-message"},{default:e.withCtx(()=>[t.success&&!l.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:k.value,class:e.normalizeClass(e.unref(n.cn)(e.unref(y)({size:t.size,intent:"success"}))),role:"status","aria-live":"polite"},[a[4]||(a[4]=e.createElementVNode("svg",{class:"mt-0.5 h-4 w-4 shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 12l4 4L19 6"})],-1)),e.createElementVNode("span",null,e.toDisplayString(t.success),1)],10,F)):e.createCommentVNode("",!0)]),_:1})],2))}});exports._sfc_main=A;
@@ -0,0 +1 @@
1
+ .kv-module-header[data-v-3e4b26b8]{background:color-mix(in oklab,var(--module-soft, var(--ui-primary-soft)) 62%,var(--ui-surface) 38%)}
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),I=require("./lib/form-field.cjs"),R={class:"relative"},q={key:0,class:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2"},z=["id","name","type","value","placeholder","disabled","readonly","required","autocomplete","aria-describedby","aria-invalid"],L={key:1,class:"absolute right-3 top-1/2 -translate-y-1/2"},F=["aria-label"],j=["id"],M=["id"],O=e.defineComponent({__name:"Input",props:{modelValue:{type:[String,Number],default:""},type:{type:String,default:"text"},placeholder:{type:String,default:""},disabled:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1},required:{type:Boolean,default:!1},size:{type:String,default:"md"},variant:{type:String,default:"default"},iconLeft:{type:[String,Object],default:null},iconRight:{type:[String,Object],default:null},clearable:{type:Boolean,default:!1},clearLabel:{type:String,default:"Clear input"},autocomplete:String,name:String,error:String,serverError:String,helpText:String,ariaDescribedBy:String,id:String},emits:["update:modelValue","blur","focus","clear","keydown"],setup(o,{expose:g,emit:y}){const t=o,i=y,r=e.inject(I.FORM_FIELD_CONTEXT_KEY,null),u=e.ref(null),b=`input-${e.useId()}`,d=e.computed(()=>t.id||e.unref(r?.id)||b),B=e.computed(()=>{const a=e.unref(r?.inputType),l=e.unref(r?.originalType);return l==="password"||t.type==="text"&&l&&l!=="text"?a:t.type}),c=e.computed(()=>t.disabled||!!e.unref(r?.disabled)),h=e.computed(()=>t.required||!!e.unref(r?.required)),k=e.computed(()=>t.autocomplete??e.unref(r?.autocomplete)??void 0),x=e.computed(()=>t.name??e.unref(r?.name)??void 0),s=e.computed(()=>t.serverError||t.error||""),f=e.computed(()=>!!s.value||t.variant==="error"||!!e.unref(r?.invalid)),m=e.computed(()=>`${d.value}-error`),p=e.computed(()=>`${d.value}-help`),C=e.computed(()=>!!s.value&&!r),E=e.computed(()=>{const a=new Set,l=n=>String(n||"").split(/\s+/).filter(Boolean).forEach(D=>a.add(D));return l(t.ariaDescribedBy),l(e.unref(r?.describedBy)),!r&&s.value?a.add(m.value):!r&&t.helpText&&a.add(p.value),a.size?[...a].join(" "):void 0}),S=a=>i("update:modelValue",a.target.value),w=()=>{i("update:modelValue",""),i("clear"),u.value?.focus()},V=e.computed(()=>({sm:"px-3 py-1.5 text-sm",md:"px-3 py-2 text-sm",lg:"px-4 py-3 text-base"})[t.size]),T=e.computed(()=>f.value?"border-(--ui-danger) focus:border-(--ui-danger) focus:ring-(--ui-danger)":{default:"ui-border-strong focus:border-(--ui-primary) focus:ring-(--ui-ring)",error:"border-(--ui-danger) focus:border-(--ui-danger) focus:ring-(--ui-danger)",success:"border-(--ui-success) focus:border-(--ui-success) focus:ring-(--ui-success)"}[t.variant]),v=e.computed(()=>["ui-text-muted",{sm:"h-4 w-4",md:"h-4 w-4",lg:"h-5 w-5"}[t.size]]),N=e.computed(()=>["block rounded-lg border ui-surface transition-colors duration-200","focus:outline-none focus:ring-2 focus:ring-offset-1","disabled:bg-(--ui-surface-muted) disabled:text-(--ui-text-muted) disabled:cursor-not-allowed disabled:opacity-80","placeholder:text-(--ui-text-muted)",t.type==="color"?"h-12 w-20 cursor-pointer":"w-full",V.value,T.value,{"pl-10":t.iconLeft,"pr-10":t.iconRight||t.clearable||!!e.unref(r?.hasPasswordToggle)}]);return g({focus:()=>u.value?.focus(),blur:()=>u.value?.blur(),select:()=>u.value?.select()}),(a,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",R,[o.iconLeft?(e.openBlock(),e.createElementBlock("div",q,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.iconLeft),{class:e.normalizeClass(v.value),"aria-hidden":"true"},null,8,["class"]))])):e.createCommentVNode("",!0),e.createElementVNode("input",{id:d.value,ref_key:"inputRef",ref:u,name:x.value,type:B.value,value:o.modelValue,placeholder:o.placeholder,disabled:c.value,readonly:o.readonly,required:h.value,autocomplete:k.value,class:e.normalizeClass(N.value),"aria-describedby":E.value,"aria-invalid":f.value?"true":void 0,onInput:S,onBlur:l[0]||(l[0]=n=>i("blur",n)),onFocus:l[1]||(l[1]=n=>i("focus",n)),onKeydown:l[2]||(l[2]=n=>i("keydown",n))},null,42,z),o.iconRight||o.clearable?(e.openBlock(),e.createElementBlock("div",L,[o.clearable&&o.modelValue&&!c.value?(e.openBlock(),e.createElementBlock("button",{key:0,class:"rounded-sm ui-text-muted transition-colors hover:text-(--ui-text) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--ui-ring)",type:"button","aria-label":o.clearLabel,onClick:w},[...l[3]||(l[3]=[e.createElementVNode("svg",{class:"h-5 w-5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","aria-hidden":"true"},[e.createElementVNode("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 6l12 12M18 6L6 18"})],-1)])],8,F)):o.iconRight?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o.iconRight),{key:1,class:e.normalizeClass(v.value),"aria-hidden":"true"},null,8,["class"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),C.value?(e.openBlock(),e.createElementBlock("p",{key:0,id:m.value,class:"mt-1 flex items-center gap-1 text-sm ui-danger",role:"alert","aria-live":"polite","aria-atomic":"true"},e.toDisplayString(s.value),9,j)):o.helpText&&!e.unref(r)?(e.openBlock(),e.createElementBlock("p",{key:1,id:p.value,class:"mt-1 text-sm ui-text-muted"},e.toDisplayString(o.helpText),9,M)):e.createCommentVNode("",!0)]))}});exports._sfc_main=O;
@@ -0,0 +1,137 @@
1
+ import { defineComponent as $, inject as A, ref as K, useId as H, computed as t, unref as i, createElementBlock as d, openBlock as n, createElementVNode as v, createCommentVNode as p, createBlock as k, resolveDynamicComponent as S, normalizeClass as g, toDisplayString as w } from "vue";
2
+ import { FORM_FIELD_CONTEXT_KEY as P } from "./lib/form-field.js";
3
+ const X = { class: "relative" }, Y = {
4
+ key: 0,
5
+ class: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2"
6
+ }, G = ["id", "name", "type", "value", "placeholder", "disabled", "readonly", "required", "autocomplete", "aria-describedby", "aria-invalid"], J = {
7
+ key: 1,
8
+ class: "absolute right-3 top-1/2 -translate-y-1/2"
9
+ }, Q = ["aria-label"], U = ["id"], W = ["id"], ee = /* @__PURE__ */ $({
10
+ __name: "Input",
11
+ props: {
12
+ modelValue: { type: [String, Number], default: "" },
13
+ type: { type: String, default: "text" },
14
+ placeholder: { type: String, default: "" },
15
+ disabled: { type: Boolean, default: !1 },
16
+ readonly: { type: Boolean, default: !1 },
17
+ required: { type: Boolean, default: !1 },
18
+ size: { type: String, default: "md" },
19
+ variant: { type: String, default: "default" },
20
+ iconLeft: { type: [String, Object], default: null },
21
+ iconRight: { type: [String, Object], default: null },
22
+ clearable: { type: Boolean, default: !1 },
23
+ clearLabel: { type: String, default: "Clear input" },
24
+ autocomplete: String,
25
+ name: String,
26
+ error: String,
27
+ serverError: String,
28
+ helpText: String,
29
+ ariaDescribedBy: String,
30
+ id: String
31
+ },
32
+ emits: ["update:modelValue", "blur", "focus", "clear", "keydown"],
33
+ setup(l, { expose: C, emit: T }) {
34
+ const e = l, s = T, r = A(P, null), c = K(null), E = `input-${H()}`, m = t(() => e.id || i(r?.id) || E), I = t(() => {
35
+ const o = i(r?.inputType), a = i(r?.originalType);
36
+ return a === "password" || e.type === "text" && a && a !== "text" ? o : e.type;
37
+ }), y = t(() => e.disabled || !!i(r?.disabled)), R = t(() => e.required || !!i(r?.required)), L = t(() => e.autocomplete ?? i(r?.autocomplete) ?? void 0), V = t(() => e.name ?? i(r?.name) ?? void 0), f = t(() => e.serverError || e.error || ""), b = t(() => !!f.value || e.variant === "error" || !!i(r?.invalid)), h = t(() => `${m.value}-error`), x = t(() => `${m.value}-help`), D = t(() => !!f.value && !r), q = t(() => {
38
+ const o = /* @__PURE__ */ new Set(), a = (u) => String(u || "").split(/\s+/).filter(Boolean).forEach((O) => o.add(O));
39
+ return a(e.ariaDescribedBy), a(i(r?.describedBy)), !r && f.value ? o.add(h.value) : !r && e.helpText && o.add(x.value), o.size ? [...o].join(" ") : void 0;
40
+ }), z = (o) => s("update:modelValue", o.target.value), j = () => {
41
+ s("update:modelValue", ""), s("clear"), c.value?.focus();
42
+ }, F = t(() => ({ sm: "px-3 py-1.5 text-sm", md: "px-3 py-2 text-sm", lg: "px-4 py-3 text-base" })[e.size]), N = t(() => b.value ? "border-(--ui-danger) focus:border-(--ui-danger) focus:ring-(--ui-danger)" : {
43
+ default: "ui-border-strong focus:border-(--ui-primary) focus:ring-(--ui-ring)",
44
+ error: "border-(--ui-danger) focus:border-(--ui-danger) focus:ring-(--ui-danger)",
45
+ success: "border-(--ui-success) focus:border-(--ui-success) focus:ring-(--ui-success)"
46
+ }[e.variant]), B = t(() => ["ui-text-muted", { sm: "h-4 w-4", md: "h-4 w-4", lg: "h-5 w-5" }[e.size]]), M = t(() => [
47
+ "block rounded-lg border ui-surface transition-colors duration-200",
48
+ "focus:outline-none focus:ring-2 focus:ring-offset-1",
49
+ "disabled:bg-(--ui-surface-muted) disabled:text-(--ui-text-muted) disabled:cursor-not-allowed disabled:opacity-80",
50
+ "placeholder:text-(--ui-text-muted)",
51
+ e.type === "color" ? "h-12 w-20 cursor-pointer" : "w-full",
52
+ F.value,
53
+ N.value,
54
+ {
55
+ "pl-10": e.iconLeft,
56
+ "pr-10": e.iconRight || e.clearable || !!i(r?.hasPasswordToggle)
57
+ }
58
+ ]);
59
+ return C({
60
+ focus: () => c.value?.focus(),
61
+ blur: () => c.value?.blur(),
62
+ select: () => c.value?.select()
63
+ }), (o, a) => (n(), d("div", null, [
64
+ v("div", X, [
65
+ l.iconLeft ? (n(), d("div", Y, [
66
+ (n(), k(S(l.iconLeft), {
67
+ class: g(B.value),
68
+ "aria-hidden": "true"
69
+ }, null, 8, ["class"]))
70
+ ])) : p("", !0),
71
+ v("input", {
72
+ id: m.value,
73
+ ref_key: "inputRef",
74
+ ref: c,
75
+ name: V.value,
76
+ type: I.value,
77
+ value: l.modelValue,
78
+ placeholder: l.placeholder,
79
+ disabled: y.value,
80
+ readonly: l.readonly,
81
+ required: R.value,
82
+ autocomplete: L.value,
83
+ class: g(M.value),
84
+ "aria-describedby": q.value,
85
+ "aria-invalid": b.value ? "true" : void 0,
86
+ onInput: z,
87
+ onBlur: a[0] || (a[0] = (u) => s("blur", u)),
88
+ onFocus: a[1] || (a[1] = (u) => s("focus", u)),
89
+ onKeydown: a[2] || (a[2] = (u) => s("keydown", u))
90
+ }, null, 42, G),
91
+ l.iconRight || l.clearable ? (n(), d("div", J, [
92
+ l.clearable && l.modelValue && !y.value ? (n(), d("button", {
93
+ key: 0,
94
+ class: "rounded-sm ui-text-muted transition-colors hover:text-(--ui-text) focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-(--ui-ring)",
95
+ type: "button",
96
+ "aria-label": l.clearLabel,
97
+ onClick: j
98
+ }, [...a[3] || (a[3] = [
99
+ v("svg", {
100
+ class: "h-5 w-5",
101
+ viewBox: "0 0 24 24",
102
+ fill: "none",
103
+ stroke: "currentColor",
104
+ "aria-hidden": "true"
105
+ }, [
106
+ v("path", {
107
+ "stroke-linecap": "round",
108
+ "stroke-linejoin": "round",
109
+ "stroke-width": "2",
110
+ d: "M6 6l12 12M18 6L6 18"
111
+ })
112
+ ], -1)
113
+ ])], 8, Q)) : l.iconRight ? (n(), k(S(l.iconRight), {
114
+ key: 1,
115
+ class: g(B.value),
116
+ "aria-hidden": "true"
117
+ }, null, 8, ["class"])) : p("", !0)
118
+ ])) : p("", !0)
119
+ ]),
120
+ D.value ? (n(), d("p", {
121
+ key: 0,
122
+ id: h.value,
123
+ class: "mt-1 flex items-center gap-1 text-sm ui-danger",
124
+ role: "alert",
125
+ "aria-live": "polite",
126
+ "aria-atomic": "true"
127
+ }, w(f.value), 9, U)) : l.helpText && !i(r) ? (n(), d("p", {
128
+ key: 1,
129
+ id: x.value,
130
+ class: "mt-1 text-sm ui-text-muted"
131
+ }, w(l.helpText), 9, W)) : p("", !0)
132
+ ]));
133
+ }
134
+ });
135
+ export {
136
+ ee as _
137
+ };