tembro 2.0.6 → 2.1.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 (341) hide show
  1. package/dist/components/calendar/calendar.cjs +1 -1
  2. package/dist/components/calendar/calendar.d.ts +2 -1
  3. package/dist/components/calendar/calendar.js +126 -122
  4. package/dist/components/calendar/date-range-picker.cjs +1 -1
  5. package/dist/components/calendar/date-range-picker.d.ts +2 -1
  6. package/dist/components/calendar/date-range-picker.js +39 -39
  7. package/dist/components/charts/charts.cjs +1 -1
  8. package/dist/components/charts/charts.d.ts +13 -4
  9. package/dist/components/charts/charts.js +76 -46
  10. package/dist/components/charts/progress-ring.cjs +1 -1
  11. package/dist/components/charts/progress-ring.d.ts +3 -1
  12. package/dist/components/charts/progress-ring.js +11 -10
  13. package/dist/components/data-table/data-table-column-visibility-menu.cjs +1 -1
  14. package/dist/components/data-table/data-table-column-visibility-menu.d.ts +4 -1
  15. package/dist/components/data-table/data-table-column-visibility-menu.js +36 -8
  16. package/dist/components/data-table/data-table-toolbar.cjs +1 -1
  17. package/dist/components/data-table/data-table-toolbar.js +12 -13
  18. package/dist/components/display/carousel.cjs +1 -1
  19. package/dist/components/display/carousel.d.ts +9 -1
  20. package/dist/components/display/carousel.js +123 -81
  21. package/dist/components/display/code-block.cjs +2 -2
  22. package/dist/components/display/code-block.d.ts +2 -1
  23. package/dist/components/display/code-block.js +17 -12
  24. package/dist/components/display/delta-badge.cjs +1 -1
  25. package/dist/components/display/delta-badge.d.ts +2 -1
  26. package/dist/components/display/delta-badge.js +11 -7
  27. package/dist/components/display/kanban.cjs +1 -1
  28. package/dist/components/display/kanban.d.ts +4 -1
  29. package/dist/components/display/kanban.js +60 -33
  30. package/dist/components/display/metric-grid.cjs +1 -1
  31. package/dist/components/display/metric-grid.d.ts +1 -0
  32. package/dist/components/display/metric-grid.js +1 -1
  33. package/dist/components/display/qr-code.cjs +1 -1
  34. package/dist/components/display/qr-code.d.ts +2 -1
  35. package/dist/components/display/qr-code.js +19 -16
  36. package/dist/components/display/tag.cjs +1 -1
  37. package/dist/components/display/tag.d.ts +2 -1
  38. package/dist/components/display/tag.js +28 -22
  39. package/dist/components/display/tree-view.cjs +1 -1
  40. package/dist/components/display/tree-view.d.ts +9 -1
  41. package/dist/components/display/tree-view.js +104 -40
  42. package/dist/components/display/trend-card.cjs +1 -1
  43. package/dist/components/display/trend-card.js +27 -41
  44. package/dist/components/feedback/alert.cjs +1 -1
  45. package/dist/components/feedback/alert.d.ts +2 -1
  46. package/dist/components/feedback/alert.js +6 -6
  47. package/dist/components/feedback/loading-state.cjs +1 -1
  48. package/dist/components/feedback/loading-state.d.ts +3 -1
  49. package/dist/components/feedback/loading-state.js +23 -10
  50. package/dist/components/feedback/page-state.cjs +1 -1
  51. package/dist/components/feedback/page-state.d.ts +2 -1
  52. package/dist/components/feedback/page-state.js +7 -4
  53. package/dist/components/form/form-field-shell.cjs +1 -1
  54. package/dist/components/form/form-field-shell.d.ts +4 -2
  55. package/dist/components/form/form-field-shell.js +57 -41
  56. package/dist/components/form/form-input.cjs +1 -1
  57. package/dist/components/form/form-input.js +2 -0
  58. package/dist/components/form/form-select.cjs +1 -1
  59. package/dist/components/form/form-select.js +2 -0
  60. package/dist/components/form/form-switch.cjs +1 -1
  61. package/dist/components/form/form-switch.d.ts +1 -1
  62. package/dist/components/form/form-switch.js +58 -54
  63. package/dist/components/form/form-textarea.cjs +1 -1
  64. package/dist/components/form/form-textarea.d.ts +1 -1
  65. package/dist/components/form/form-textarea.js +29 -27
  66. package/dist/components/layout/app-sidebar.cjs +1 -1
  67. package/dist/components/layout/app-sidebar.d.ts +1 -0
  68. package/dist/components/layout/app-sidebar.js +36 -36
  69. package/dist/components/layout/breadcrumbs.cjs +1 -1
  70. package/dist/components/layout/breadcrumbs.d.ts +2 -1
  71. package/dist/components/layout/breadcrumbs.js +7 -7
  72. package/dist/components/modern/calendar-scheduler.cjs +1 -1
  73. package/dist/components/modern/calendar-scheduler.d.ts +5 -1
  74. package/dist/components/modern/calendar-scheduler.js +47 -28
  75. package/dist/components/modern/dual-list-picker.cjs +1 -1
  76. package/dist/components/modern/dual-list-picker.d.ts +5 -1
  77. package/dist/components/modern/dual-list-picker.js +81 -23
  78. package/dist/components/modern/rich-text-editor.cjs +1 -1
  79. package/dist/components/modern/rich-text-editor.d.ts +3 -1
  80. package/dist/components/modern/rich-text-editor.js +12 -9
  81. package/dist/components/modern/tour.cjs +1 -1
  82. package/dist/components/modern/tour.d.ts +5 -1
  83. package/dist/components/modern/tour.js +57 -35
  84. package/dist/components/navigation/command-bar.cjs +1 -1
  85. package/dist/components/navigation/command-bar.d.ts +3 -1
  86. package/dist/components/navigation/command-bar.js +10 -7
  87. package/dist/components/navigation/demo.cjs +1 -1
  88. package/dist/components/navigation/demo.js +0 -1
  89. package/dist/components/navigation/nav-tabs.cjs +1 -1
  90. package/dist/components/navigation/nav-tabs.js +39 -27
  91. package/dist/components/navigation/page-tabs.cjs +1 -1
  92. package/dist/components/navigation/page-tabs.js +41 -30
  93. package/dist/components/navigation/pagination.cjs +1 -1
  94. package/dist/components/navigation/pagination.d.ts +7 -1
  95. package/dist/components/navigation/pagination.js +48 -25
  96. package/dist/components/notifications/notification-center.cjs +1 -1
  97. package/dist/components/notifications/notification-center.d.ts +3 -1
  98. package/dist/components/notifications/notification-center.js +56 -38
  99. package/dist/components/notifications/toast.cjs +1 -1
  100. package/dist/components/notifications/toast.d.ts +1 -0
  101. package/dist/components/notifications/toast.js +4 -0
  102. package/dist/components/overlay/alert-dialog.cjs +1 -1
  103. package/dist/components/overlay/alert-dialog.js +1 -1
  104. package/dist/components/overlay/confirm-dialog.cjs +1 -1
  105. package/dist/components/overlay/confirm-dialog.d.ts +4 -2
  106. package/dist/components/overlay/confirm-dialog.js +31 -22
  107. package/dist/components/overlay/drawer.cjs +1 -1
  108. package/dist/components/overlay/drawer.d.ts +3 -1
  109. package/dist/components/overlay/drawer.js +24 -16
  110. package/dist/components/ui/accordion/index.d.ts +4 -0
  111. package/dist/components/ui/badge/index.cjs +1 -1
  112. package/dist/components/ui/badge/index.d.ts +1 -1
  113. package/dist/components/ui/badge/index.js +2 -1
  114. package/dist/components/ui/button/index.cjs +1 -1
  115. package/dist/components/ui/button/index.d.ts +2 -1
  116. package/dist/components/ui/button/index.js +13 -10
  117. package/dist/components/ui/dialog/index.cjs +1 -1
  118. package/dist/components/ui/dialog/index.js +2 -1
  119. package/dist/components/ui/hover-card.cjs +1 -1
  120. package/dist/components/ui/hover-card.d.ts +11 -3
  121. package/dist/components/ui/hover-card.js +29 -24
  122. package/dist/components/ui/input/index.d.ts +1 -1
  123. package/dist/components/ui/popover/index.cjs +1 -1
  124. package/dist/components/ui/popover/index.d.ts +2 -2
  125. package/dist/components/ui/popover/index.js +6 -5
  126. package/dist/components/ui/radio-group/index.cjs +1 -1
  127. package/dist/components/ui/radio-group/index.d.ts +5 -1
  128. package/dist/components/ui/radio-group/index.js +50 -16
  129. package/dist/components/ui/right-click-menu/index.cjs +1 -1
  130. package/dist/components/ui/right-click-menu/index.d.ts +5 -1
  131. package/dist/components/ui/right-click-menu/index.js +77 -23
  132. package/dist/components/ui/segmented-control/index.cjs +1 -1
  133. package/dist/components/ui/segmented-control/index.d.ts +2 -1
  134. package/dist/components/ui/segmented-control/index.js +23 -11
  135. package/dist/components/ui/select/index.cjs +1 -1
  136. package/dist/components/ui/select/index.d.ts +8 -1
  137. package/dist/components/ui/select/index.js +40 -35
  138. package/dist/components/ui/switch/index.cjs +1 -1
  139. package/dist/components/ui/switch/index.d.ts +18 -0
  140. package/dist/components/ui/switch/index.js +47 -17
  141. package/dist/components/ui/tabs/index.cjs +1 -1
  142. package/dist/components/ui/tabs/index.d.ts +14 -4
  143. package/dist/components/ui/tabs/index.js +11 -8
  144. package/dist/components/ui/textarea/index.cjs +1 -1
  145. package/dist/components/ui/textarea/index.d.ts +10 -2
  146. package/dist/components/ui/textarea/index.js +37 -8
  147. package/dist/components/ui/textarea.cjs +1 -0
  148. package/dist/components/ui/textarea.d.ts +1 -0
  149. package/dist/components/ui/textarea.js +2 -0
  150. package/dist/components/ui/tooltip/index.cjs +1 -1
  151. package/dist/components/ui/tooltip/index.d.ts +11 -3
  152. package/dist/components/ui/tooltip/index.js +41 -20
  153. package/dist/components/upload/file-upload.cjs +1 -1
  154. package/dist/components/upload/file-upload.d.ts +8 -1
  155. package/dist/components/upload/file-upload.js +132 -100
  156. package/dist/components/upload/image-upload.cjs +1 -1
  157. package/dist/components/upload/image-upload.d.ts +5 -1
  158. package/dist/components/upload/image-upload.js +34 -9
  159. package/dist/index.cjs +1 -1
  160. package/dist/index.js +31 -31
  161. package/dist/public-component-surface.cjs +1 -1
  162. package/dist/public-component-surface.js +15 -0
  163. package/dist/showcase/component-api-schema.cjs +1 -1
  164. package/dist/showcase/component-api-schema.js +187 -10
  165. package/dist/showcase/fallback.cjs +3 -3
  166. package/dist/showcase/fallback.js +221 -243
  167. package/dist/showcase/premium/alert/showcase.cjs +1 -1
  168. package/dist/showcase/premium/alert/showcase.js +1 -0
  169. package/dist/showcase/premium/app-sidebar/showcase.cjs +1 -1
  170. package/dist/showcase/premium/app-sidebar/showcase.js +1 -0
  171. package/dist/showcase/premium/badge/showcase.cjs +1 -1
  172. package/dist/showcase/premium/badge/showcase.js +7 -0
  173. package/dist/showcase/premium/badge/types.d.ts +1 -1
  174. package/dist/showcase/premium/breadcrumbs/showcase.cjs +1 -1
  175. package/dist/showcase/premium/breadcrumbs/showcase.js +12 -1
  176. package/dist/showcase/premium/button/mock.cjs +1 -4
  177. package/dist/showcase/premium/button/mock.js +1 -1
  178. package/dist/showcase/premium/button/showcase.cjs +1 -1
  179. package/dist/showcase/premium/button/showcase.js +2 -2
  180. package/dist/showcase/premium/card/showcase.cjs +1 -1
  181. package/dist/showcase/premium/card/showcase.js +96 -47
  182. package/dist/showcase/premium/carousel/showcase.cjs +1 -1
  183. package/dist/showcase/premium/carousel/showcase.js +76 -49
  184. package/dist/showcase/premium/command-bar/showcase.cjs +1 -1
  185. package/dist/showcase/premium/command-bar/showcase.js +2 -0
  186. package/dist/showcase/premium/data-table/mock.cjs +12 -11
  187. package/dist/showcase/premium/data-table/mock.js +1 -1
  188. package/dist/showcase/premium/file-upload/showcase.cjs +1 -1
  189. package/dist/showcase/premium/file-upload/showcase.js +25 -4
  190. package/dist/showcase/premium/image-upload/showcase.cjs +1 -1
  191. package/dist/showcase/premium/image-upload/showcase.js +4 -1
  192. package/dist/showcase/premium/index.cjs +1 -1
  193. package/dist/showcase/premium/index.js +396 -402
  194. package/dist/showcase/premium/loading-state/showcase.cjs +1 -1
  195. package/dist/showcase/premium/loading-state/showcase.js +3 -1
  196. package/dist/showcase/premium/metric-grid/showcase.cjs +1 -1
  197. package/dist/showcase/premium/metric-grid/showcase.js +96 -28
  198. package/dist/showcase/premium/notification-center/showcase.cjs +1 -1
  199. package/dist/showcase/premium/notification-center/showcase.js +7 -3
  200. package/dist/showcase/premium/page-state/showcase.cjs +1 -1
  201. package/dist/showcase/premium/page-state/showcase.js +5 -1
  202. package/dist/showcase/premium/pagination/showcase.cjs +1 -1
  203. package/dist/showcase/premium/pagination/showcase.js +15 -2
  204. package/dist/showcase/premium/popover/showcase.cjs +1 -1
  205. package/dist/showcase/premium/popover/showcase.js +85 -50
  206. package/dist/showcase/premium/radio-group/showcase.cjs +1 -1
  207. package/dist/showcase/premium/radio-group/showcase.js +27 -4
  208. package/dist/showcase/premium/right-click-menu/showcase.cjs +1 -1
  209. package/dist/showcase/premium/right-click-menu/showcase.js +56 -43
  210. package/dist/showcase/premium/segmented-control/showcase.cjs +1 -1
  211. package/dist/showcase/premium/segmented-control/showcase.js +1 -0
  212. package/dist/showcase/premium/select/data.cjs +1 -1
  213. package/dist/showcase/premium/select/data.js +69 -34
  214. package/dist/showcase/premium/select/mock.cjs +19 -6
  215. package/dist/showcase/premium/select/mock.js +3 -2
  216. package/dist/showcase/premium/select/showcase.cjs +1 -1
  217. package/dist/showcase/premium/select/showcase.js +43 -18
  218. package/dist/showcase/premium/select/types.d.ts +3 -0
  219. package/dist/showcase/premium/statistic/showcase.cjs +1 -1
  220. package/dist/showcase/premium/statistic/showcase.js +57 -25
  221. package/dist/showcase/premium/switch/showcase.cjs +1 -1
  222. package/dist/showcase/premium/switch/showcase.js +25 -14
  223. package/dist/showcase/premium/tabs/showcase.cjs +1 -1
  224. package/dist/showcase/premium/tabs/showcase.js +171 -48
  225. package/dist/showcase/premium/textarea/mock.cjs +12 -4
  226. package/dist/showcase/premium/textarea/mock.js +1 -1
  227. package/dist/showcase/premium/textarea/showcase.cjs +1 -1
  228. package/dist/showcase/premium/textarea/showcase.js +8 -3
  229. package/dist/showcase/premium/toast/showcase.cjs +1 -1
  230. package/dist/showcase/premium/toast/showcase.js +32 -6
  231. package/dist/showcase/premium/types.d.ts +1 -1
  232. package/dist/showcase/registry-quality.cjs +1 -1
  233. package/dist/showcase/registry-quality.js +1 -0
  234. package/dist/showcase/render-registry-preview.cjs +1 -1
  235. package/dist/showcase/render-registry-preview.js +57 -79
  236. package/dist/showcase/site-data.cjs +1 -1
  237. package/dist/showcase/site-data.js +60 -21
  238. package/dist/showcase/tembro-registry.json.cjs +1 -1
  239. package/dist/showcase/tembro-registry.json.js +34 -20
  240. package/dist/showcase/types.d.ts +1 -1
  241. package/package.json +1 -1
  242. package/packages/cli/dist/index.cjs +31 -31
  243. package/packages/cli/vendor/src/components/calendar/calendar.tsx +59 -50
  244. package/packages/cli/vendor/src/components/calendar/date-range-picker.tsx +7 -4
  245. package/packages/cli/vendor/src/components/charts/charts.tsx +109 -66
  246. package/packages/cli/vendor/src/components/charts/progress-ring.tsx +37 -26
  247. package/packages/cli/vendor/src/components/data-table/data-table-column-visibility-menu.tsx +41 -22
  248. package/packages/cli/vendor/src/components/data-table/data-table-toolbar.tsx +8 -6
  249. package/packages/cli/vendor/src/components/display/carousel.tsx +84 -3
  250. package/packages/cli/vendor/src/components/display/code-block.tsx +22 -2
  251. package/packages/cli/vendor/src/components/display/delta-badge.tsx +11 -11
  252. package/packages/cli/vendor/src/components/display/kanban.tsx +103 -57
  253. package/packages/cli/vendor/src/components/display/metric-grid.tsx +16 -13
  254. package/packages/cli/vendor/src/components/display/qr-code.tsx +17 -15
  255. package/packages/cli/vendor/src/components/display/tag.tsx +39 -21
  256. package/packages/cli/vendor/src/components/display/tree-view.tsx +221 -84
  257. package/packages/cli/vendor/src/components/display/trend-card.tsx +6 -40
  258. package/packages/cli/vendor/src/components/feedback/alert.tsx +3 -1
  259. package/packages/cli/vendor/src/components/feedback/loading-state.tsx +33 -17
  260. package/packages/cli/vendor/src/components/feedback/page-state.tsx +8 -7
  261. package/packages/cli/vendor/src/components/form/form-field-shell.tsx +37 -8
  262. package/packages/cli/vendor/src/components/form/form-input.tsx +2 -0
  263. package/packages/cli/vendor/src/components/form/form-select.tsx +2 -0
  264. package/packages/cli/vendor/src/components/form/form-switch.tsx +9 -3
  265. package/packages/cli/vendor/src/components/form/form-textarea.tsx +6 -2
  266. package/packages/cli/vendor/src/components/layout/app-sidebar.tsx +3 -1
  267. package/packages/cli/vendor/src/components/layout/breadcrumbs.tsx +3 -1
  268. package/packages/cli/vendor/src/components/modern/calendar-scheduler.tsx +28 -13
  269. package/packages/cli/vendor/src/components/modern/dual-list-picker.tsx +103 -35
  270. package/packages/cli/vendor/src/components/modern/rich-text-editor.tsx +25 -22
  271. package/packages/cli/vendor/src/components/modern/tour.tsx +47 -29
  272. package/packages/cli/vendor/src/components/navigation/command-bar.tsx +6 -0
  273. package/packages/cli/vendor/src/components/navigation/demo.tsx +0 -1
  274. package/packages/cli/vendor/src/components/navigation/nav-tabs.tsx +38 -29
  275. package/packages/cli/vendor/src/components/navigation/page-tabs.tsx +35 -23
  276. package/packages/cli/vendor/src/components/navigation/pagination.tsx +65 -31
  277. package/packages/cli/vendor/src/components/notifications/notification-center.tsx +64 -39
  278. package/packages/cli/vendor/src/components/notifications/toast.tsx +23 -21
  279. package/packages/cli/vendor/src/components/overlay/alert-dialog.tsx +1 -1
  280. package/packages/cli/vendor/src/components/overlay/confirm-dialog.tsx +45 -22
  281. package/packages/cli/vendor/src/components/overlay/drawer.tsx +18 -5
  282. package/packages/cli/vendor/src/components/ui/accordion/index.tsx +4 -0
  283. package/packages/cli/vendor/src/components/ui/badge/index.tsx +2 -1
  284. package/packages/cli/vendor/src/components/ui/button/index.tsx +11 -5
  285. package/packages/cli/vendor/src/components/ui/dialog/index.tsx +2 -1
  286. package/packages/cli/vendor/src/components/ui/hover-card.tsx +54 -28
  287. package/packages/cli/vendor/src/components/ui/popover/index.tsx +10 -8
  288. package/packages/cli/vendor/src/components/ui/radio-group/index.tsx +55 -6
  289. package/packages/cli/vendor/src/components/ui/right-click-menu/index.tsx +120 -9
  290. package/packages/cli/vendor/src/components/ui/segmented-control/index.tsx +29 -3
  291. package/packages/cli/vendor/src/components/ui/select/index.tsx +64 -31
  292. package/packages/cli/vendor/src/components/ui/switch/index.tsx +71 -6
  293. package/packages/cli/vendor/src/components/ui/tabs/index.tsx +22 -6
  294. package/packages/cli/vendor/src/components/ui/textarea/index.tsx +105 -15
  295. package/packages/cli/vendor/src/components/ui/textarea.tsx +2 -0
  296. package/packages/cli/vendor/src/components/ui/tooltip/index.tsx +67 -22
  297. package/packages/cli/vendor/src/components/upload/file-upload.tsx +120 -57
  298. package/packages/cli/vendor/src/components/upload/image-upload.tsx +71 -24
  299. package/packages/cli/vendor/src/public-component-surface.ts +3 -0
  300. package/packages/cli/vendor/src/showcase/component-api-schema.ts +79 -41
  301. package/packages/cli/vendor/src/showcase/fallback.tsx +4 -19
  302. package/packages/cli/vendor/src/showcase/premium/alert/showcase.tsx +1 -0
  303. package/packages/cli/vendor/src/showcase/premium/app-sidebar/showcase.tsx +1 -0
  304. package/packages/cli/vendor/src/showcase/premium/badge/showcase.tsx +4 -2
  305. package/packages/cli/vendor/src/showcase/premium/badge/types.ts +1 -1
  306. package/packages/cli/vendor/src/showcase/premium/breadcrumbs/showcase.tsx +3 -1
  307. package/packages/cli/vendor/src/showcase/premium/button/mock.ts +2 -5
  308. package/packages/cli/vendor/src/showcase/premium/button/showcase.tsx +2 -2
  309. package/packages/cli/vendor/src/showcase/premium/card/showcase.tsx +26 -1
  310. package/packages/cli/vendor/src/showcase/premium/carousel/showcase.tsx +19 -3
  311. package/packages/cli/vendor/src/showcase/premium/command-bar/showcase.tsx +1 -1
  312. package/packages/cli/vendor/src/showcase/premium/data-table/mock.ts +26 -25
  313. package/packages/cli/vendor/src/showcase/premium/file-upload/showcase.tsx +21 -1
  314. package/packages/cli/vendor/src/showcase/premium/image-upload/showcase.tsx +4 -1
  315. package/packages/cli/vendor/src/showcase/premium/index.ts +0 -2
  316. package/packages/cli/vendor/src/showcase/premium/loading-state/showcase.tsx +1 -1
  317. package/packages/cli/vendor/src/showcase/premium/metric-grid/showcase.tsx +36 -4
  318. package/packages/cli/vendor/src/showcase/premium/notification-center/showcase.tsx +4 -3
  319. package/packages/cli/vendor/src/showcase/premium/page-state/showcase.tsx +1 -0
  320. package/packages/cli/vendor/src/showcase/premium/pagination/showcase.tsx +13 -1
  321. package/packages/cli/vendor/src/showcase/premium/popover/showcase.tsx +27 -11
  322. package/packages/cli/vendor/src/showcase/premium/radio-group/showcase.tsx +13 -1
  323. package/packages/cli/vendor/src/showcase/premium/right-click-menu/showcase.tsx +8 -5
  324. package/packages/cli/vendor/src/showcase/premium/segmented-control/showcase.tsx +1 -0
  325. package/packages/cli/vendor/src/showcase/premium/select/data.ts +12 -3
  326. package/packages/cli/vendor/src/showcase/premium/select/mock.ts +4 -4
  327. package/packages/cli/vendor/src/showcase/premium/select/showcase.tsx +22 -1
  328. package/packages/cli/vendor/src/showcase/premium/select/types.ts +3 -0
  329. package/packages/cli/vendor/src/showcase/premium/statistic/showcase.tsx +10 -1
  330. package/packages/cli/vendor/src/showcase/premium/switch/showcase.tsx +15 -6
  331. package/packages/cli/vendor/src/showcase/premium/tabs/showcase.tsx +48 -1
  332. package/packages/cli/vendor/src/showcase/premium/textarea/mock.ts +12 -4
  333. package/packages/cli/vendor/src/showcase/premium/textarea/showcase.tsx +5 -0
  334. package/packages/cli/vendor/src/showcase/premium/toast/showcase.tsx +17 -1
  335. package/packages/cli/vendor/src/showcase/premium/types.ts +1 -1
  336. package/packages/cli/vendor/src/showcase/registry-quality.ts +3 -2
  337. package/packages/cli/vendor/src/showcase/render-registry-preview.tsx +0 -15
  338. package/packages/cli/vendor/src/showcase/site-data.tsx +21 -15
  339. package/packages/cli/vendor/src/showcase/tembro-registry.json +42 -20
  340. package/packages/cli/vendor/src/showcase/types.ts +1 -1
  341. package/registry.json +18 -6
@@ -1,62 +1,48 @@
1
1
  import { cn as e } from "../../lib/utils.js";
2
2
  import { Card as t, CardContent as n, CardHeader as r, CardTitle as i } from "../ui/card/index.js";
3
3
  import { DeltaBadge as a } from "./delta-badge.js";
4
+ import { Sparkline as o } from "../charts/charts.js";
4
5
  import "react";
5
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
6
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
6
7
  //#region src/components/display/trend-card.tsx
7
- function c({ title: c, value: l, change: u, trend: d, description: f, icon: p, sparkline: m, className: h, ...g }) {
8
- let _ = () => {
9
- if (!m || m.length < 2) return null;
10
- let e = Math.min(...m), t = Math.max(...m) - e || 1, n = m.map((n, r) => `${r / (m.length - 1) * 100},${100 - (n - e) / t * 100}`).join(" "), r = d === "up" ? "var(--aui-success,var(--primary))" : d === "down" ? "var(--destructive)" : "var(--muted-foreground)";
11
- return /* @__PURE__ */ o("div", {
12
- className: "absolute bottom-0 left-0 right-0 h-12 overflow-hidden opacity-20 pointer-events-none",
13
- children: /* @__PURE__ */ s("svg", {
14
- viewBox: "0 0 100 100",
15
- preserveAspectRatio: "none",
16
- className: "w-full h-full stroke-2",
17
- children: [/* @__PURE__ */ o("polyline", {
18
- points: n,
19
- fill: "none",
20
- stroke: r,
21
- vectorEffect: "non-scaling-stroke"
22
- }), /* @__PURE__ */ o("polygon", {
23
- points: `0,100 ${n} 100,100`,
24
- fill: `color-mix(in srgb, ${r} 20%, transparent)`
25
- })]
26
- })
27
- });
28
- };
29
- return /* @__PURE__ */ s(t, {
8
+ function l({ title: l, value: u, change: d, trend: f, description: p, icon: m, sparkline: h, className: g, ..._ }) {
9
+ return /* @__PURE__ */ c(t, {
30
10
  "data-slot": "trend-card",
31
- className: e("relative overflow-hidden", h),
32
- ...g,
11
+ className: e("relative overflow-hidden", g),
12
+ ..._,
33
13
  children: [
34
- /* @__PURE__ */ s(r, {
14
+ /* @__PURE__ */ c(r, {
35
15
  className: "flex flex-row items-center justify-between space-y-0 pb-2",
36
- children: [/* @__PURE__ */ o(i, {
16
+ children: [/* @__PURE__ */ s(i, {
37
17
  className: "text-sm font-medium text-muted-foreground",
38
- children: c
39
- }), p && /* @__PURE__ */ o("div", {
18
+ children: l
19
+ }), m && /* @__PURE__ */ s("div", {
40
20
  className: "text-muted-foreground",
41
- children: p
21
+ children: m
42
22
  })]
43
23
  }),
44
- /* @__PURE__ */ s(n, { children: [/* @__PURE__ */ s("div", {
24
+ /* @__PURE__ */ c(n, { children: [/* @__PURE__ */ c("div", {
45
25
  className: "flex items-baseline gap-2",
46
- children: [/* @__PURE__ */ o("div", {
26
+ children: [/* @__PURE__ */ s("div", {
47
27
  className: "text-2xl font-bold",
48
- children: l
49
- }), u && /* @__PURE__ */ o(a, {
50
- value: u,
51
- trend: d
28
+ children: u
29
+ }), d && /* @__PURE__ */ s(a, {
30
+ value: d,
31
+ trend: f
52
32
  })]
53
- }), f && /* @__PURE__ */ o("p", {
33
+ }), p && /* @__PURE__ */ s("p", {
54
34
  className: "mt-1 text-xs text-muted-foreground",
55
- children: f
35
+ children: p
56
36
  })] }),
57
- _()
37
+ h && h.length > 1 ? /* @__PURE__ */ s("div", {
38
+ className: "px-6 pb-4",
39
+ children: /* @__PURE__ */ s(o, {
40
+ values: h,
41
+ positive: f !== "down"
42
+ })
43
+ }) : null
58
44
  ]
59
45
  });
60
46
  }
61
47
  //#endregion
62
- export { c as TrendCard };
48
+ export { l as TrendCard };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("lucide-react"),i=require("react/jsx-runtime");var a={info:{soft:`border-primary/25 bg-primary/5 text-foreground`,outline:`border-primary/35 bg-background text-foreground`,solid:`border-primary bg-primary text-primary-foreground`},success:{soft:`border-emerald-500/25 bg-emerald-500/10 text-foreground`,outline:`border-emerald-500/35 bg-background text-foreground`,solid:`border-emerald-600 bg-emerald-600 text-white`},warning:{soft:`border-amber-500/30 bg-amber-500/10 text-foreground`,outline:`border-amber-500/35 bg-background text-foreground`,solid:`border-amber-500 bg-amber-500 text-amber-950`},destructive:{soft:`border-destructive/30 bg-destructive/10 text-foreground`,outline:`border-destructive/35 bg-background text-foreground`,solid:`border-destructive bg-destructive text-destructive-foreground`},muted:{soft:`border-border bg-muted/50 text-foreground`,outline:`border-border bg-background text-foreground`,solid:`border-border bg-foreground text-background`}},o={info:`text-primary`,success:`text-emerald-600 dark:text-emerald-400`,warning:`text-amber-600 dark:text-amber-400`,destructive:`text-destructive`,muted:`text-muted-foreground`};function s(e){switch(e){case`success`:return(0,i.jsx)(r.CheckCircle2Icon,{className:`size-4`});case`warning`:return(0,i.jsx)(r.TriangleAlertIcon,{className:`size-4`});case`destructive`:return(0,i.jsx)(r.AlertCircleIcon,{className:`size-4`});default:return(0,i.jsx)(r.InfoIcon,{className:`size-4`})}}function c({tone:e=`info`,variant:n=`soft`,size:r=`md`,title:c,description:l,icon:u,action:d,dismissible:f=!1,dismissLabel:p=`Dismiss alert`,onDismiss:m,className:h,children:g,..._}){return(0,i.jsxs)(`div`,{"data-slot":`alert`,"data-size":r,role:e===`destructive`||e===`warning`?`alert`:`status`,className:t.cn(`flex gap-3 rounded-[var(--aui-card-radius,var(--radius-xl))] border p-4 text-sm shadow-[var(--aui-card-shadow,var(--aui-control-shadow,0_1px_0_rgba(255,255,255,0.05)))] data-[size=sm]:p-3`,a[e][n],h),..._,children:[(0,i.jsx)(`div`,{"data-slot":`alert-icon`,className:t.cn(`mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full border border-current/10 bg-background/55`,n===`solid`&&`bg-white/12 text-current`,o[e]),children:u??s(e)}),(0,i.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[c&&(0,i.jsx)(`div`,{"data-slot":`alert-title`,className:`font-medium leading-none`,children:c}),(l||g)&&(0,i.jsx)(`div`,{"data-slot":`alert-description`,className:t.cn(`text-muted-foreground`,n===`solid`&&`text-current/88`),children:l??g})]}),d||f?(0,i.jsxs)(`div`,{"data-slot":`alert-action`,className:`flex shrink-0 items-start gap-2`,children:[d,f?(0,i.jsx)(`button`,{type:`button`,"aria-label":p,className:t.cn(`inline-flex size-8 items-center justify-center rounded-full border border-current/10 bg-background/45 text-current transition-opacity hover:opacity-90`,n===`solid`&&`bg-white/12`),onClick:m,children:(0,i.jsx)(`span`,{"aria-hidden":`true`,children:`×`})}):null]}):null]})}exports.Alert=c;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("lucide-react"),i=require("react/jsx-runtime");var a={info:{soft:`border-primary/25 bg-primary/5 text-foreground`,outline:`border-primary/35 bg-background text-foreground`,solid:`border-primary bg-primary text-primary-foreground`},success:{soft:`border-emerald-500/25 bg-emerald-500/10 text-foreground`,outline:`border-emerald-500/35 bg-background text-foreground`,solid:`border-emerald-600 bg-emerald-600 text-white`},warning:{soft:`border-amber-500/30 bg-amber-500/10 text-foreground`,outline:`border-amber-500/35 bg-background text-foreground`,solid:`border-amber-500 bg-amber-500 text-amber-950`},destructive:{soft:`border-destructive/30 bg-destructive/10 text-foreground`,outline:`border-destructive/35 bg-background text-foreground`,solid:`border-destructive bg-destructive text-destructive-foreground`},muted:{soft:`border-border bg-muted/50 text-foreground`,outline:`border-border bg-background text-foreground`,solid:`border-border bg-foreground text-background`}},o={info:`text-primary`,success:`text-emerald-600 dark:text-emerald-400`,warning:`text-amber-600 dark:text-amber-400`,destructive:`text-destructive`,muted:`text-muted-foreground`};function s(e){switch(e){case`success`:return(0,i.jsx)(r.CheckCircle2Icon,{className:`size-4`});case`warning`:return(0,i.jsx)(r.TriangleAlertIcon,{className:`size-4`});case`destructive`:return(0,i.jsx)(r.AlertCircleIcon,{className:`size-4`});default:return(0,i.jsx)(r.InfoIcon,{className:`size-4`})}}function c({tone:e=`info`,variant:n=`soft`,size:r=`md`,title:c,description:l,icon:u,action:d,dismissible:f=!1,dismissLabel:p=`Dismiss alert`,onDismiss:m,actionsAlign:h=`end`,className:g,children:_,...v}){return(0,i.jsxs)(`div`,{"data-slot":`alert`,"data-size":r,role:e===`destructive`||e===`warning`?`alert`:`status`,className:t.cn(`flex gap-3 rounded-[var(--aui-card-radius,var(--radius-xl))] border p-4 text-sm shadow-[var(--aui-card-shadow,var(--aui-control-shadow,0_1px_0_rgba(255,255,255,0.05)))] data-[size=sm]:p-3`,a[e][n],g),...v,children:[(0,i.jsx)(`div`,{"data-slot":`alert-icon`,className:t.cn(`mt-0.5 flex size-8 shrink-0 items-center justify-center rounded-full border border-current/10 bg-background/55`,n===`solid`&&`bg-white/12 text-current`,o[e]),children:u??s(e)}),(0,i.jsxs)(`div`,{className:`min-w-0 flex-1 space-y-1`,children:[c&&(0,i.jsx)(`div`,{"data-slot":`alert-title`,className:`font-medium leading-none`,children:c}),(l||_)&&(0,i.jsx)(`div`,{"data-slot":`alert-description`,className:t.cn(`text-muted-foreground`,n===`solid`&&`text-current/88`),children:l??_})]}),d||f?(0,i.jsxs)(`div`,{"data-slot":`alert-action`,className:t.cn(`flex shrink-0 items-start gap-2`,h===`start`&&`order-[-1] mr-2`),children:[d,f?(0,i.jsx)(`button`,{type:`button`,"aria-label":p,className:t.cn(`inline-flex size-8 items-center justify-center rounded-full border border-current/10 bg-background/45 text-current transition-opacity hover:opacity-90`,n===`solid`&&`bg-white/12`),onClick:m,children:(0,i.jsx)(`span`,{"aria-hidden":`true`,children:`×`})}):null]}):null]})}exports.Alert=c;
@@ -11,6 +11,7 @@ export type AlertProps = React.ComponentProps<"div"> & {
11
11
  dismissible?: boolean;
12
12
  dismissLabel?: string;
13
13
  onDismiss?: () => void;
14
+ actionsAlign?: "start" | "end";
14
15
  };
15
- declare function Alert({ tone, variant, size, title, description, icon, action, dismissible, dismissLabel, onDismiss, className, children, ...props }: AlertProps): React.JSX.Element;
16
+ declare function Alert({ tone, variant, size, title, description, icon, action, dismissible, dismissLabel, onDismiss, actionsAlign, className, children, ...props }: AlertProps): React.JSX.Element;
16
17
  export { Alert };
@@ -44,13 +44,13 @@ function l(e) {
44
44
  default: return /* @__PURE__ */ a(r, { className: "size-4" });
45
45
  }
46
46
  }
47
- function u({ tone: t = "info", variant: n = "soft", size: r = "md", title: i, description: u, icon: d, action: f, dismissible: p = !1, dismissLabel: m = "Dismiss alert", onDismiss: h, className: g, children: _, ...v }) {
47
+ function u({ tone: t = "info", variant: n = "soft", size: r = "md", title: i, description: u, icon: d, action: f, dismissible: p = !1, dismissLabel: m = "Dismiss alert", onDismiss: h, actionsAlign: g = "end", className: _, children: v, ...y }) {
48
48
  return /* @__PURE__ */ o("div", {
49
49
  "data-slot": "alert",
50
50
  "data-size": r,
51
51
  role: t === "destructive" || t === "warning" ? "alert" : "status",
52
- className: e("flex gap-3 rounded-[var(--aui-card-radius,var(--radius-xl))] border p-4 text-sm shadow-[var(--aui-card-shadow,var(--aui-control-shadow,0_1px_0_rgba(255,255,255,0.05)))] data-[size=sm]:p-3", s[t][n], g),
53
- ...v,
52
+ className: e("flex gap-3 rounded-[var(--aui-card-radius,var(--radius-xl))] border p-4 text-sm shadow-[var(--aui-card-shadow,var(--aui-control-shadow,0_1px_0_rgba(255,255,255,0.05)))] data-[size=sm]:p-3", s[t][n], _),
53
+ ...y,
54
54
  children: [
55
55
  /* @__PURE__ */ a("div", {
56
56
  "data-slot": "alert-icon",
@@ -63,15 +63,15 @@ function u({ tone: t = "info", variant: n = "soft", size: r = "md", title: i, de
63
63
  "data-slot": "alert-title",
64
64
  className: "font-medium leading-none",
65
65
  children: i
66
- }), (u || _) && /* @__PURE__ */ a("div", {
66
+ }), (u || v) && /* @__PURE__ */ a("div", {
67
67
  "data-slot": "alert-description",
68
68
  className: e("text-muted-foreground", n === "solid" && "text-current/88"),
69
- children: u ?? _
69
+ children: u ?? v
70
70
  })]
71
71
  }),
72
72
  f || p ? /* @__PURE__ */ o("div", {
73
73
  "data-slot": "alert-action",
74
- className: "flex shrink-0 items-start gap-2",
74
+ className: e("flex shrink-0 items-start gap-2", g === "start" && "order-[-1] mr-2"),
75
75
  children: [f, p ? /* @__PURE__ */ a("button", {
76
76
  type: "button",
77
77
  "aria-label": m,
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("lucide-react"),i=require("react/jsx-runtime");function a({className:e,label:n=`Loading...`,description:a,icon:o,...s}){return(0,i.jsxs)(`div`,{"data-slot":`loading-state`,className:t.cn(`flex min-h-52 flex-col items-center justify-center gap-4 rounded-[var(--radius-3xl)] border border-border/75 bg-muted/25 p-10 text-center text-muted-foreground shadow-sm ring-1 ring-foreground/4`,e),...s,children:[(0,i.jsx)(`div`,{className:`flex size-12 items-center justify-center rounded-full border border-border/70 bg-background/92 shadow-[0_1px_0_rgba(255,255,255,0.08)]`,children:o??(0,i.jsx)(r.Loader2Icon,{className:`size-5 animate-spin`})}),(0,i.jsxs)(`div`,{className:`grid gap-1.5`,children:[n&&(0,i.jsx)(`div`,{className:`text-base font-semibold tracking-tight text-foreground`,children:n}),a&&(0,i.jsx)(`p`,{className:`max-w-sm text-sm leading-6`,children:a})]})]})}exports.LoadingState=a;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("lucide-react"),i=require("react/jsx-runtime");function a({className:e,label:n=`Loading...`,description:a,icon:o,variant:s=`spinner`,progress:c,...l}){return(0,i.jsxs)(`div`,{"data-slot":`loading-state`,className:t.cn(`flex min-h-52 flex-col items-center justify-center gap-4 rounded-[var(--radius-3xl)] border border-border/75 bg-muted/25 p-10 text-center text-muted-foreground shadow-sm ring-1 ring-foreground/4`,e),...l,children:[s===`skeleton`?(0,i.jsxs)(`div`,{className:`grid gap-3`,children:[(0,i.jsx)(`div`,{className:`h-4 w-32 animate-pulse rounded bg-muted`}),(0,i.jsx)(`div`,{className:`h-24 w-64 animate-pulse rounded-[min(var(--radius-xl),16px)] bg-muted/70`})]}):(0,i.jsx)(`div`,{className:`flex size-12 items-center justify-center rounded-full border border-border/70 bg-background/92 shadow-[0_1px_0_rgba(255,255,255,0.08)]`,children:o??(0,i.jsx)(r.Loader2Icon,{className:`size-5 animate-spin`})}),(0,i.jsxs)(`div`,{className:`grid gap-1.5`,children:[n&&(0,i.jsx)(`div`,{className:`text-base font-semibold tracking-tight text-foreground`,children:n}),a&&(0,i.jsx)(`p`,{className:`max-w-sm text-sm leading-6`,children:a}),s===`progress`&&typeof c==`number`?(0,i.jsx)(`div`,{className:`mx-auto mt-2 h-2 w-full max-w-xs overflow-hidden rounded-full bg-muted/80`,children:(0,i.jsx)(`div`,{className:`h-full rounded-full bg-primary`,style:{width:`${Math.min(Math.max(c,0),100)}%`}})}):null]})]})}exports.LoadingState=a;
@@ -3,6 +3,8 @@ export type LoadingStateProps = React.ComponentProps<"div"> & {
3
3
  label?: React.ReactNode;
4
4
  description?: React.ReactNode;
5
5
  icon?: React.ReactNode;
6
+ variant?: "spinner" | "skeleton" | "progress";
7
+ progress?: number;
6
8
  };
7
- declare function LoadingState({ className, label, description, icon, ...props }: LoadingStateProps): React.JSX.Element;
9
+ declare function LoadingState({ className, label, description, icon, variant, progress, ...props }: LoadingStateProps): React.JSX.Element;
8
10
  export { LoadingState };
@@ -3,23 +3,36 @@ import "react";
3
3
  import { Loader2Icon as t } from "lucide-react";
4
4
  import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
5
  //#region src/components/feedback/loading-state.tsx
6
- function i({ className: i, label: a = "Loading...", description: o, icon: s, ...c }) {
6
+ function i({ className: i, label: a = "Loading...", description: o, icon: s, variant: c = "spinner", progress: l, ...u }) {
7
7
  return /* @__PURE__ */ r("div", {
8
8
  "data-slot": "loading-state",
9
9
  className: e("flex min-h-52 flex-col items-center justify-center gap-4 rounded-[var(--radius-3xl)] border border-border/75 bg-muted/25 p-10 text-center text-muted-foreground shadow-sm ring-1 ring-foreground/4", i),
10
- ...c,
11
- children: [/* @__PURE__ */ n("div", {
10
+ ...u,
11
+ children: [c === "skeleton" ? /* @__PURE__ */ r("div", {
12
+ className: "grid gap-3",
13
+ children: [/* @__PURE__ */ n("div", { className: "h-4 w-32 animate-pulse rounded bg-muted" }), /* @__PURE__ */ n("div", { className: "h-24 w-64 animate-pulse rounded-[min(var(--radius-xl),16px)] bg-muted/70" })]
14
+ }) : /* @__PURE__ */ n("div", {
12
15
  className: "flex size-12 items-center justify-center rounded-full border border-border/70 bg-background/92 shadow-[0_1px_0_rgba(255,255,255,0.08)]",
13
16
  children: s ?? /* @__PURE__ */ n(t, { className: "size-5 animate-spin" })
14
17
  }), /* @__PURE__ */ r("div", {
15
18
  className: "grid gap-1.5",
16
- children: [a && /* @__PURE__ */ n("div", {
17
- className: "text-base font-semibold tracking-tight text-foreground",
18
- children: a
19
- }), o && /* @__PURE__ */ n("p", {
20
- className: "max-w-sm text-sm leading-6",
21
- children: o
22
- })]
19
+ children: [
20
+ a && /* @__PURE__ */ n("div", {
21
+ className: "text-base font-semibold tracking-tight text-foreground",
22
+ children: a
23
+ }),
24
+ o && /* @__PURE__ */ n("p", {
25
+ className: "max-w-sm text-sm leading-6",
26
+ children: o
27
+ }),
28
+ c === "progress" && typeof l == "number" ? /* @__PURE__ */ n("div", {
29
+ className: "mx-auto mt-2 h-2 w-full max-w-xs overflow-hidden rounded-full bg-muted/80",
30
+ children: /* @__PURE__ */ n("div", {
31
+ className: "h-full rounded-full bg-primary",
32
+ style: { width: `${Math.min(Math.max(l, 0), 100)}%` }
33
+ })
34
+ }) : null
35
+ ]
23
36
  })]
24
37
  });
25
38
  }
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime");function o(e){switch(e){case`loading`:return(0,a.jsx)(i.Loader2Icon,{className:`size-8 animate-spin`});case`error`:return(0,a.jsx)(i.AlertCircleIcon,{className:`size-8`});case`success`:return(0,a.jsx)(i.CheckCircle2Icon,{className:`size-8`});case`info`:return(0,a.jsx)(i.InfoIcon,{className:`size-8`});default:return(0,a.jsx)(i.SearchXIcon,{className:`size-8`})}}function s({tone:e=`empty`,title:n,description:r,icon:i,action:s,compact:c=!1,className:l,...u}){return(0,a.jsxs)(`div`,{"data-slot":`page-state`,role:e===`error`?`alert`:`status`,className:t.cn(`flex flex-col items-center justify-center rounded-[var(--radius-3xl)] border border-border/75 bg-card/96 text-center shadow-sm ring-1 ring-foreground/4`,c?`gap-2 p-6`:`min-h-72 gap-4 p-10`,l),...u,children:[(0,a.jsx)(`div`,{className:`flex size-14 items-center justify-center rounded-full border border-border/70 bg-muted/45 text-muted-foreground shadow-[0_1px_0_rgba(255,255,255,0.05)]`,children:i??o(e)}),(0,a.jsxs)(`div`,{className:`grid gap-1`,children:[n&&(0,a.jsx)(`div`,{className:`text-base font-semibold tracking-tight text-foreground`,children:n}),r&&(0,a.jsx)(`div`,{className:`max-w-md text-sm leading-6 text-muted-foreground`,children:r})]}),s&&(0,a.jsx)(`div`,{children:s})]})}function c({retryLabel:e=`Retry`,onRetry:r,action:i,className:o,...c}){return(0,a.jsx)(s,{compact:!0,className:t.cn(`min-h-0`,o),action:i??(r?(0,a.jsx)(n.Button,{type:`button`,variant:`outline`,size:`sm`,onClick:r,children:e}):void 0),...c})}exports.InlineState=c,exports.PageState=s;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime");function o(e){switch(e){case`loading`:return(0,a.jsx)(i.Loader2Icon,{className:`size-8 animate-spin`});case`error`:return(0,a.jsx)(i.AlertCircleIcon,{className:`size-8`});case`success`:return(0,a.jsx)(i.CheckCircle2Icon,{className:`size-8`});case`info`:return(0,a.jsx)(i.InfoIcon,{className:`size-8`});default:return(0,a.jsx)(i.SearchXIcon,{className:`size-8`})}}function s({tone:e=`empty`,title:n,description:r,icon:i,action:s,extra:c,compact:l=!1,className:u,...d}){return(0,a.jsxs)(`div`,{"data-slot":`page-state`,role:e===`error`?`alert`:`status`,className:t.cn(`flex flex-col items-center justify-center rounded-[var(--radius-3xl)] border border-border/75 bg-card/96 text-center shadow-sm ring-1 ring-foreground/4`,l?`gap-2 p-6`:`min-h-72 gap-4 p-10`,u),...d,children:[(0,a.jsx)(`div`,{className:`flex size-14 items-center justify-center rounded-full border border-border/70 bg-muted/45 text-muted-foreground shadow-[0_1px_0_rgba(255,255,255,0.05)]`,children:i??o(e)}),(0,a.jsxs)(`div`,{className:`grid gap-1`,children:[n&&(0,a.jsx)(`div`,{className:`text-base font-semibold tracking-tight text-foreground`,children:n}),r&&(0,a.jsx)(`div`,{className:`max-w-md text-sm leading-6 text-muted-foreground`,children:r})]}),s||c?(0,a.jsxs)(`div`,{className:`flex flex-wrap items-center justify-center gap-2`,children:[s,c]}):null]})}function c({retryLabel:e=`Retry`,onRetry:r,action:i,className:o,...c}){return(0,a.jsx)(s,{compact:!0,className:t.cn(`min-h-0`,o),action:i??(r?(0,a.jsx)(n.Button,{type:`button`,variant:`outline`,size:`sm`,onClick:r,children:e}):void 0),...c})}exports.InlineState=c,exports.PageState=s;
@@ -6,9 +6,10 @@ export type PageStateProps = Omit<React.ComponentProps<"div">, "title"> & {
6
6
  description?: React.ReactNode;
7
7
  icon?: React.ReactNode;
8
8
  action?: React.ReactNode;
9
+ extra?: React.ReactNode;
9
10
  compact?: boolean;
10
11
  };
11
- declare function PageState({ tone, title, description, icon, action, compact, className, ...props }: PageStateProps): React.JSX.Element;
12
+ declare function PageState({ tone, title, description, icon, action, extra, compact, className, ...props }: PageStateProps): React.JSX.Element;
12
13
  export type InlineStateProps = Omit<PageStateProps, "compact"> & {
13
14
  retryLabel?: React.ReactNode;
14
15
  onRetry?: () => void;
@@ -13,12 +13,12 @@ function l(e) {
13
13
  default: return /* @__PURE__ */ s(o, { className: "size-8" });
14
14
  }
15
15
  }
16
- function u({ tone: t = "empty", title: n, description: r, icon: i, action: a, compact: o = !1, className: u, ...d }) {
16
+ function u({ tone: t = "empty", title: n, description: r, icon: i, action: a, extra: o, compact: u = !1, className: d, ...f }) {
17
17
  return /* @__PURE__ */ c("div", {
18
18
  "data-slot": "page-state",
19
19
  role: t === "error" ? "alert" : "status",
20
- className: e("flex flex-col items-center justify-center rounded-[var(--radius-3xl)] border border-border/75 bg-card/96 text-center shadow-sm ring-1 ring-foreground/4", o ? "gap-2 p-6" : "min-h-72 gap-4 p-10", u),
21
- ...d,
20
+ className: e("flex flex-col items-center justify-center rounded-[var(--radius-3xl)] border border-border/75 bg-card/96 text-center shadow-sm ring-1 ring-foreground/4", u ? "gap-2 p-6" : "min-h-72 gap-4 p-10", d),
21
+ ...f,
22
22
  children: [
23
23
  /* @__PURE__ */ s("div", {
24
24
  className: "flex size-14 items-center justify-center rounded-full border border-border/70 bg-muted/45 text-muted-foreground shadow-[0_1px_0_rgba(255,255,255,0.05)]",
@@ -34,7 +34,10 @@ function u({ tone: t = "empty", title: n, description: r, icon: i, action: a, co
34
34
  children: r
35
35
  })]
36
36
  }),
37
- a && /* @__PURE__ */ s("div", { children: a })
37
+ a || o ? /* @__PURE__ */ c("div", {
38
+ className: "flex flex-wrap items-center justify-center gap-2",
39
+ children: [a, o]
40
+ }) : null
38
41
  ]
39
42
  });
40
43
  }
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("lucide-react"),i=require("react/jsx-runtime");function a(e,t={}){let n=`${e}-label`,r=`${e}-description`,i=`${e}-error`;return{labelId:n,descriptionId:r,errorId:i,describedBy:[t.description?r:null,t.error?i:null].filter(Boolean).join(` `)||void 0}}var o={vertical:`grid gap-2`,horizontal:`grid gap-2 sm:grid-cols-[minmax(0,12rem)_1fr] sm:items-start sm:gap-5`,inline:`flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4`};function s({className:e,label:n,description:a,error:s,required:c=!1,htmlFor:l,labelId:u,descriptionId:d,errorId:f,layout:p=`vertical`,descriptionPosition:m=`top`,labelAction:h,requiredIndicator:g=(0,i.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`}),errorIcon:_,showErrorIcon:v=!0,disabled:y=!1,readOnly:b=!1,labelClassName:x,labelRowClassName:S,descriptionClassName:C,errorClassName:w,contentClassName:T,children:E,...D}){let O=!!(n||h),k=a&&m===`top`,A=a&&m===`bottom`,j=_??(0,i.jsx)(r.AlertCircleIcon,{className:`size-3.5`}),M=O?(0,i.jsxs)(`div`,{"data-slot":`form-field-label-row`,className:t.cn(`flex min-w-0 items-center justify-between gap-3`,p===`inline`&&`sm:w-auto`,S),children:[n?(0,i.jsxs)(`label`,{"data-slot":`form-field-label`,htmlFor:l,id:u,className:t.cn(`min-w-0 text-sm font-semibold leading-none tracking-tight text-foreground`,y&&`cursor-not-allowed opacity-60`,b&&`opacity-80`,x),children:[n,c&&g]}):(0,i.jsx)(`span`,{}),h&&(0,i.jsx)(`div`,{"data-slot":`form-field-label-action`,className:`shrink-0 text-sm`,children:h})]}):null,N=a?(0,i.jsx)(`p`,{"data-slot":`form-field-description`,id:d,className:t.cn(`text-sm leading-6 text-muted-foreground`,y&&`opacity-60`,C),children:a}):null,P=(0,i.jsx)(`div`,{"data-slot":`form-field-content`,className:t.cn(`min-w-0 space-y-2`,T),children:E}),F=s?(0,i.jsxs)(`p`,{"data-slot":`form-field-error`,id:f,role:`alert`,"aria-live":`polite`,className:t.cn(`flex items-start gap-2 rounded-[min(var(--radius-xl),16px)] border border-destructive/18 bg-destructive/8 px-3 py-2 text-sm font-medium leading-6 text-destructive`,w),children:[v&&(0,i.jsx)(`span`,{className:`mt-1 shrink-0`,children:j}),(0,i.jsx)(`span`,{className:`min-w-0`,children:s})]}):null;return(0,i.jsx)(`div`,{"data-slot":`form-field-shell`,"data-layout":p,"data-invalid":!!s||void 0,"data-disabled":y||void 0,"data-readonly":b||void 0,"aria-disabled":y||void 0,className:t.cn(o[p],`rounded-[var(--radius-2xl)]`,e),...D,children:p===`horizontal`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(`div`,{className:`grid gap-2 sm:pt-2.5`,children:[M,k&&N]}),(0,i.jsxs)(`div`,{className:`grid min-w-0 gap-2`,children:[P,A&&N,F]})]}):p===`inline`?(0,i.jsxs)(i.Fragment,{children:[M,(0,i.jsxs)(`div`,{className:`grid min-w-0 flex-1 gap-2`,children:[k&&N,P,A&&N,F]})]}):(0,i.jsxs)(i.Fragment,{children:[M,k&&N,P,A&&N,F]})})}exports.FormFieldShell=s,exports.resolveFormFieldIds=a;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs");let n=require("react");n=e.__toESM(n,1);let r=require("lucide-react"),i=require("react/jsx-runtime");function a(e,t={}){let n=`${e}-label`,r=`${e}-description`,i=`${e}-error`;return{labelId:n,descriptionId:r,errorId:i,describedBy:[t.description?r:null,t.error?i:null].filter(Boolean).join(` `)||void 0}}var o={vertical:`grid gap-2`,horizontal:`grid gap-2 sm:grid-cols-[minmax(0,12rem)_1fr] sm:items-start sm:gap-5`,inline:`flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4`};function s({className:e,label:n,description:a,error:s,success:c,loading:l=!1,required:u=!1,htmlFor:d,labelId:f,descriptionId:p,errorId:m,layout:h=`vertical`,descriptionPosition:g=`top`,labelAction:_,requiredIndicator:v=(0,i.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`}),errorIcon:y,showErrorIcon:b=!0,disabled:x=!1,readOnly:S=!1,labelClassName:C,labelRowClassName:w,descriptionClassName:T,errorClassName:E,contentClassName:D,children:O,...k}){let A=!!(n||_),j=a&&g===`top`,M=a&&g===`bottom`,N=y??(0,i.jsx)(r.AlertCircleIcon,{className:`size-3.5`}),P=A?(0,i.jsxs)(`div`,{"data-slot":`form-field-label-row`,className:t.cn(`flex min-w-0 items-center justify-between gap-3`,h===`inline`&&`sm:w-auto`,w),children:[n?(0,i.jsxs)(`label`,{"data-slot":`form-field-label`,htmlFor:d,id:f,className:t.cn(`min-w-0 text-sm font-semibold leading-none tracking-tight text-foreground`,x&&`cursor-not-allowed opacity-60`,S&&`opacity-80`,C),children:[n,u&&v]}):(0,i.jsx)(`span`,{}),_&&(0,i.jsx)(`div`,{"data-slot":`form-field-label-action`,className:`shrink-0 text-sm`,children:_})]}):null,F=a?(0,i.jsx)(`p`,{"data-slot":`form-field-description`,id:p,className:t.cn(`text-sm leading-6 text-muted-foreground`,x&&`opacity-60`,T),children:a}):null,I=(0,i.jsx)(`div`,{"data-slot":`form-field-content`,className:t.cn(`min-w-0 space-y-2`,D),children:O}),L=s?(0,i.jsxs)(`p`,{"data-slot":`form-field-error`,id:m,role:`alert`,"aria-live":`polite`,className:t.cn(`flex items-start gap-2 rounded-[min(var(--radius-xl),16px)] border border-destructive/18 bg-destructive/8 px-3 py-2 text-sm font-medium leading-6 text-destructive`,E),children:[b&&(0,i.jsx)(`span`,{className:`mt-1 shrink-0`,children:N}),(0,i.jsx)(`span`,{className:`min-w-0`,children:s})]}):null,R=c&&!s?(0,i.jsx)(`p`,{"data-slot":`form-field-success`,className:`rounded-[min(var(--radius-xl),16px)] border border-emerald-500/18 bg-emerald-500/8 px-3 py-2 text-sm font-medium leading-6 text-emerald-700 dark:text-emerald-300`,children:c}):null,z=l?(0,i.jsx)(`p`,{"data-slot":`form-field-loading`,className:`text-sm leading-6 text-muted-foreground`,children:`Loading...`}):null;return(0,i.jsx)(`div`,{"data-slot":`form-field-shell`,"data-layout":h,"data-invalid":!!s||void 0,"data-success":!!(c&&!s)||void 0,"data-loading":l||void 0,"data-disabled":x||void 0,"data-readonly":S||void 0,"aria-disabled":x||void 0,className:t.cn(o[h],`rounded-[var(--radius-2xl)]`,e),...k,children:h===`horizontal`?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(`div`,{className:`grid gap-2 sm:pt-2.5`,children:[P,j&&F]}),(0,i.jsxs)(`div`,{className:`grid min-w-0 gap-2`,children:[I,z,M&&F,R,L]})]}):h===`inline`?(0,i.jsxs)(i.Fragment,{children:[P,(0,i.jsxs)(`div`,{className:`grid min-w-0 flex-1 gap-2`,children:[j&&F,I,z,M&&F,R,L]})]}):(0,i.jsxs)(i.Fragment,{children:[P,j&&F,I,z,M&&F,R,L]})})}exports.FormFieldShell=s,exports.resolveFormFieldIds=a;
@@ -5,6 +5,8 @@ export type FormFieldShellProps = React.ComponentProps<"div"> & {
5
5
  label?: React.ReactNode;
6
6
  description?: React.ReactNode;
7
7
  error?: React.ReactNode;
8
+ success?: React.ReactNode;
9
+ loading?: boolean;
8
10
  required?: boolean;
9
11
  htmlFor?: string;
10
12
  labelId?: string;
@@ -24,7 +26,7 @@ export type FormFieldShellProps = React.ComponentProps<"div"> & {
24
26
  errorClassName?: string;
25
27
  contentClassName?: string;
26
28
  };
27
- export type FormFieldShellControlProps = Pick<FormFieldShellProps, "label" | "description" | "required" | "className" | "htmlFor" | "labelId" | "descriptionId" | "errorId" | "layout" | "descriptionPosition" | "labelAction" | "requiredIndicator" | "errorIcon" | "showErrorIcon" | "disabled" | "readOnly" | "labelClassName" | "labelRowClassName" | "descriptionClassName" | "errorClassName" | "contentClassName">;
29
+ export type FormFieldShellControlProps = Pick<FormFieldShellProps, "label" | "description" | "success" | "loading" | "required" | "className" | "htmlFor" | "labelId" | "descriptionId" | "errorId" | "layout" | "descriptionPosition" | "labelAction" | "requiredIndicator" | "errorIcon" | "showErrorIcon" | "disabled" | "readOnly" | "labelClassName" | "labelRowClassName" | "descriptionClassName" | "errorClassName" | "contentClassName">;
28
30
  export type FormFieldMessageState = {
29
31
  description?: React.ReactNode;
30
32
  error?: React.ReactNode;
@@ -36,5 +38,5 @@ export type FormFieldResolvedIds = {
36
38
  describedBy?: string;
37
39
  };
38
40
  declare function resolveFormFieldIds(id: string, state?: FormFieldMessageState): FormFieldResolvedIds;
39
- declare function FormFieldShell({ className, label, description, error, required, htmlFor, labelId, descriptionId, errorId, layout, descriptionPosition, labelAction, requiredIndicator, errorIcon, showErrorIcon, disabled, readOnly, labelClassName, labelRowClassName, descriptionClassName, errorClassName, contentClassName, children, ...props }: FormFieldShellProps): React.JSX.Element;
41
+ declare function FormFieldShell({ className, label, description, error, success, loading, required, htmlFor, labelId, descriptionId, errorId, layout, descriptionPosition, labelAction, requiredIndicator, errorIcon, showErrorIcon, disabled, readOnly, labelClassName, labelRowClassName, descriptionClassName, errorClassName, contentClassName, children, ...props }: FormFieldShellProps): React.JSX.Element;
40
42
  export { FormFieldShell, resolveFormFieldIds };
@@ -17,80 +17,96 @@ var o = {
17
17
  horizontal: "grid gap-2 sm:grid-cols-[minmax(0,12rem)_1fr] sm:items-start sm:gap-5",
18
18
  inline: "flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4"
19
19
  };
20
- function s({ className: a, label: s, description: c, error: l, required: u = !1, htmlFor: d, labelId: f, descriptionId: p, errorId: m, layout: h = "vertical", descriptionPosition: g = "top", labelAction: _, requiredIndicator: v = /* @__PURE__ */ r("span", {
20
+ function s({ className: a, label: s, description: c, error: l, success: u, loading: d = !1, required: f = !1, htmlFor: p, labelId: m, descriptionId: h, errorId: g, layout: _ = "vertical", descriptionPosition: v = "top", labelAction: y, requiredIndicator: b = /* @__PURE__ */ r("span", {
21
21
  className: "ml-1 text-destructive",
22
22
  children: "*"
23
- }), errorIcon: y, showErrorIcon: b = !0, disabled: x = !1, readOnly: S = !1, labelClassName: C, labelRowClassName: w, descriptionClassName: T, errorClassName: E, contentClassName: D, children: O, ...k }) {
24
- let A = !!(s || _), j = c && g === "top", M = c && g === "bottom", N = y ?? /* @__PURE__ */ r(t, { className: "size-3.5" }), P = A ? /* @__PURE__ */ i("div", {
23
+ }), errorIcon: x, showErrorIcon: S = !0, disabled: C = !1, readOnly: w = !1, labelClassName: T, labelRowClassName: E, descriptionClassName: D, errorClassName: O, contentClassName: k, children: A, ...j }) {
24
+ let M = !!(s || y), N = c && v === "top", P = c && v === "bottom", F = x ?? /* @__PURE__ */ r(t, { className: "size-3.5" }), I = M ? /* @__PURE__ */ i("div", {
25
25
  "data-slot": "form-field-label-row",
26
- className: e("flex min-w-0 items-center justify-between gap-3", h === "inline" && "sm:w-auto", w),
26
+ className: e("flex min-w-0 items-center justify-between gap-3", _ === "inline" && "sm:w-auto", E),
27
27
  children: [s ? /* @__PURE__ */ i("label", {
28
28
  "data-slot": "form-field-label",
29
- htmlFor: d,
30
- id: f,
31
- className: e("min-w-0 text-sm font-semibold leading-none tracking-tight text-foreground", x && "cursor-not-allowed opacity-60", S && "opacity-80", C),
32
- children: [s, u && v]
33
- }) : /* @__PURE__ */ r("span", {}), _ && /* @__PURE__ */ r("div", {
29
+ htmlFor: p,
30
+ id: m,
31
+ className: e("min-w-0 text-sm font-semibold leading-none tracking-tight text-foreground", C && "cursor-not-allowed opacity-60", w && "opacity-80", T),
32
+ children: [s, f && b]
33
+ }) : /* @__PURE__ */ r("span", {}), y && /* @__PURE__ */ r("div", {
34
34
  "data-slot": "form-field-label-action",
35
35
  className: "shrink-0 text-sm",
36
- children: _
36
+ children: y
37
37
  })]
38
- }) : null, F = c ? /* @__PURE__ */ r("p", {
38
+ }) : null, L = c ? /* @__PURE__ */ r("p", {
39
39
  "data-slot": "form-field-description",
40
- id: p,
41
- className: e("text-sm leading-6 text-muted-foreground", x && "opacity-60", T),
40
+ id: h,
41
+ className: e("text-sm leading-6 text-muted-foreground", C && "opacity-60", D),
42
42
  children: c
43
- }) : null, I = /* @__PURE__ */ r("div", {
43
+ }) : null, R = /* @__PURE__ */ r("div", {
44
44
  "data-slot": "form-field-content",
45
- className: e("min-w-0 space-y-2", D),
46
- children: O
47
- }), L = l ? /* @__PURE__ */ i("p", {
45
+ className: e("min-w-0 space-y-2", k),
46
+ children: A
47
+ }), z = l ? /* @__PURE__ */ i("p", {
48
48
  "data-slot": "form-field-error",
49
- id: m,
49
+ id: g,
50
50
  role: "alert",
51
51
  "aria-live": "polite",
52
- className: e("flex items-start gap-2 rounded-[min(var(--radius-xl),16px)] border border-destructive/18 bg-destructive/8 px-3 py-2 text-sm font-medium leading-6 text-destructive", E),
53
- children: [b && /* @__PURE__ */ r("span", {
52
+ className: e("flex items-start gap-2 rounded-[min(var(--radius-xl),16px)] border border-destructive/18 bg-destructive/8 px-3 py-2 text-sm font-medium leading-6 text-destructive", O),
53
+ children: [S && /* @__PURE__ */ r("span", {
54
54
  className: "mt-1 shrink-0",
55
- children: N
55
+ children: F
56
56
  }), /* @__PURE__ */ r("span", {
57
57
  className: "min-w-0",
58
58
  children: l
59
59
  })]
60
+ }) : null, B = u && !l ? /* @__PURE__ */ r("p", {
61
+ "data-slot": "form-field-success",
62
+ className: "rounded-[min(var(--radius-xl),16px)] border border-emerald-500/18 bg-emerald-500/8 px-3 py-2 text-sm font-medium leading-6 text-emerald-700 dark:text-emerald-300",
63
+ children: u
64
+ }) : null, V = d ? /* @__PURE__ */ r("p", {
65
+ "data-slot": "form-field-loading",
66
+ className: "text-sm leading-6 text-muted-foreground",
67
+ children: "Loading..."
60
68
  }) : null;
61
69
  return /* @__PURE__ */ r("div", {
62
70
  "data-slot": "form-field-shell",
63
- "data-layout": h,
71
+ "data-layout": _,
64
72
  "data-invalid": !!l || void 0,
65
- "data-disabled": x || void 0,
66
- "data-readonly": S || void 0,
67
- "aria-disabled": x || void 0,
68
- className: e(o[h], "rounded-[var(--radius-2xl)]", a),
69
- ...k,
70
- children: h === "horizontal" ? /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ i("div", {
73
+ "data-success": !!(u && !l) || void 0,
74
+ "data-loading": d || void 0,
75
+ "data-disabled": C || void 0,
76
+ "data-readonly": w || void 0,
77
+ "aria-disabled": C || void 0,
78
+ className: e(o[_], "rounded-[var(--radius-2xl)]", a),
79
+ ...j,
80
+ children: _ === "horizontal" ? /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ i("div", {
71
81
  className: "grid gap-2 sm:pt-2.5",
72
- children: [P, j && F]
82
+ children: [I, N && L]
73
83
  }), /* @__PURE__ */ i("div", {
74
84
  className: "grid min-w-0 gap-2",
75
85
  children: [
76
- I,
77
- M && F,
78
- L
86
+ R,
87
+ V,
88
+ P && L,
89
+ B,
90
+ z
79
91
  ]
80
- })] }) : h === "inline" ? /* @__PURE__ */ i(n, { children: [P, /* @__PURE__ */ i("div", {
92
+ })] }) : _ === "inline" ? /* @__PURE__ */ i(n, { children: [I, /* @__PURE__ */ i("div", {
81
93
  className: "grid min-w-0 flex-1 gap-2",
82
94
  children: [
83
- j && F,
84
- I,
85
- M && F,
86
- L
95
+ N && L,
96
+ R,
97
+ V,
98
+ P && L,
99
+ B,
100
+ z
87
101
  ]
88
102
  })] }) : /* @__PURE__ */ i(n, { children: [
89
- P,
90
- j && F,
91
103
  I,
92
- M && F,
93
- L
104
+ N && L,
105
+ R,
106
+ V,
107
+ P && L,
108
+ B,
109
+ z
94
110
  ] })
95
111
  });
96
112
  }
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../inputs/date-input.cjs"),n=require("../inputs/date-range-input.cjs"),r=require("../inputs/money-input.cjs"),i=require("../inputs/masked-input.cjs"),a=require("../inputs/number-input.cjs"),o=require("../inputs/phone-input.cjs"),s=require("../inputs/quantity-input.cjs"),c=require("../ui/input/index.cjs"),l=require("./form-field-shell.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("react/jsx-runtime"),f=require("react-hook-form");function p(e){return{label:e.label,description:e.description,required:e.required,className:e.className,htmlFor:e.id??e.name,layout:e.layout,descriptionPosition:e.descriptionPosition,labelAction:e.labelAction,requiredIndicator:e.requiredIndicator,errorIcon:e.errorIcon,showErrorIcon:e.showErrorIcon,disabled:e.disabled,readOnly:e.readOnly,labelClassName:e.labelClassName,labelRowClassName:e.labelRowClassName,descriptionClassName:e.descriptionClassName,errorClassName:e.errorClassName,contentClassName:e.contentClassName}}function m(e){let u=e.id??e.name,m=p(e),h=e.kind??`text`,g=e.fieldClassName??`w-full`;return(0,d.jsx)(f.Controller,{control:e.control,name:e.name,rules:e.rules,render:({field:f,fieldState:p})=>{let _=p.error?.message,v=l.resolveFormFieldIds(u,{description:e.description,error:_});if(h===`search`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:s,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,onValueChange:N,onBlur:P,...F}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(c.Input,{...F,type:`search`,id:j??u,name:f.name,ref:f.ref,value:f.value??``,disabled:C,readOnly:e.readOnly,inputClassName:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),P?.(e)},onValueChange:e=>{f.onChange(e),N?.(e)}})})}if(h===`password`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:s,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,onValueChange:N,onBlur:P,...F}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(c.Input,{...F,type:`password`,id:j??u,ref:f.ref,name:f.name,value:f.value??``,disabled:C,readOnly:e.readOnly,inputClassName:A??g,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),P?.(e)},onChange:e=>{let t=e.currentTarget.value;f.onChange(t),N?.(t)},"aria-invalid":p.invalid||void 0})})}if(h===`number`){let{control:t,name:n,label:r,description:i,required:o,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=null,onNumberChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(a.NumberInput,{...I,id:j??u,name:f.name,ref:f.ref,value:f.value??``,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onNumberChange:e=>{f.onChange(e??N),P?.(e)}})})}if(h===`phone`){let{control:t,name:n,label:r,description:i,required:a,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,valueMode:N=`raw`,countryCode:P=`+998`,maxDigits:F=12,onValueChange:I,onBlur:L,...R}=e,z=f.value==null?``:String(f.value),B=N===`raw`?o.formatPhoneDigits(z,P,F):z;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(o.PhoneInput,{...R,id:j??u,name:f.name,ref:f.ref,value:B,disabled:C,readOnly:e.readOnly,countryCode:P,maxDigits:F,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),L?.(e)},onValueChange:(e,t)=>{let n=N===`raw`?t:e;f.onChange(n),I?.(n,t,e)}})})}if(h===`date`){let{control:n,name:r,label:i,description:a,required:o,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=``,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(t.DateInput,{...I,id:j??u,name:f.name,ref:f.ref,value:f.value??``,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:e=>{f.onChange(e||N),P?.(e)}})})}if(h===`clearable`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:s,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=``,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(c.Input,{...I,clearable:!0,id:j??u,name:f.name,ref:f.ref,value:f.value??``,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:e=>{f.onChange(e||N),P?.(e)}})})}if(h===`masked`){let{control:t,name:n,label:r,description:a,required:o,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,valueMode:N=`raw`,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(i.MaskedInput,{...I,id:j??u,name:f.name,ref:f.ref,value:String(f.value??``),disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:(e,t)=>{let n=N===`raw`?t:e;f.onChange(n),P?.(e,t)}})})}if(h===`money`){let{control:t,name:n,label:i,description:a,required:o,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=null,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(r.MoneyInput,{...I,id:j??u,name:f.name,ref:f.ref,value:f.value??null,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:(e,t)=>{f.onChange(e??N),P?.(e,t)}})})}if(h===`quantity`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=null,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(s.QuantityInput,{...I,id:j??u,name:f.name,ref:f.ref,value:f.value,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:e=>{f.onChange(e??N),P?.(e)}})})}if(h===`date-range`){let{control:t,name:r,label:i,description:a,required:o,className:s,layout:c,descriptionPosition:h,labelAction:g,requiredIndicator:y,errorIcon:b,showErrorIcon:x,disabled:S,labelClassName:C,labelRowClassName:w,descriptionClassName:T,errorClassName:E,contentClassName:D,fieldClassName:O,id:k,kind:A,onValueChange:j,onBlur:M,...N}=e,P=f.value;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:k??u,children:(0,d.jsx)(n.DateRangeInput,{...N,id:k??u,value:P&&typeof P==`object`?{from:P.from,to:P.to}:{from:``,to:``},fromInputProps:{...N.fromInputProps??{},disabled:S,readOnly:e.readOnly,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0},toInputProps:{...N.toInputProps??{},disabled:S,readOnly:e.readOnly,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0},onValueChange:e=>{f.onChange(e),j?.(e)},"aria-invalid":p.invalid||void 0,onBlur:e=>{f.onBlur(),M?.(e)}})})}let{control:y,name:b,label:x,description:S,required:C,className:w,layout:T,descriptionPosition:E,labelAction:D,requiredIndicator:O,errorIcon:k,showErrorIcon:A,disabled:j,readOnly:M,labelClassName:N,labelRowClassName:P,descriptionClassName:F,errorClassName:I,contentClassName:L,fieldClassName:R,transformIn:z,transformOut:B,id:V,kind:H,onChange:U,onBlur:W,...G}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:V??u,children:(0,d.jsx)(c.Input,{...G,id:V??u,ref:f.ref,name:f.name,value:z?z(f.value):f.value??``,disabled:j,readOnly:M,onBlur:e=>{f.onBlur(),W?.(e)},onChange:e=>{f.onChange(B?B(e):e.target.value),U?.(e)},"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,className:R??g})})}})}exports.FormInput=m;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../inputs/date-input.cjs"),n=require("../inputs/date-range-input.cjs"),r=require("../inputs/money-input.cjs"),i=require("../inputs/masked-input.cjs"),a=require("../inputs/number-input.cjs"),o=require("../inputs/phone-input.cjs"),s=require("../inputs/quantity-input.cjs"),c=require("../ui/input/index.cjs"),l=require("./form-field-shell.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("react/jsx-runtime"),f=require("react-hook-form");function p(e){return{label:e.label,description:e.description,success:e.success,loading:e.loading,required:e.required,className:e.className,htmlFor:e.id??e.name,layout:e.layout,descriptionPosition:e.descriptionPosition,labelAction:e.labelAction,requiredIndicator:e.requiredIndicator,errorIcon:e.errorIcon,showErrorIcon:e.showErrorIcon,disabled:e.disabled,readOnly:e.readOnly,labelClassName:e.labelClassName,labelRowClassName:e.labelRowClassName,descriptionClassName:e.descriptionClassName,errorClassName:e.errorClassName,contentClassName:e.contentClassName}}function m(e){let u=e.id??e.name,m=p(e),h=e.kind??`text`,g=e.fieldClassName??`w-full`;return(0,d.jsx)(f.Controller,{control:e.control,name:e.name,rules:e.rules,render:({field:f,fieldState:p})=>{let _=p.error?.message,v=l.resolveFormFieldIds(u,{description:e.description,error:_});if(h===`search`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:s,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,onValueChange:N,onBlur:P,...F}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(c.Input,{...F,type:`search`,id:j??u,name:f.name,ref:f.ref,value:f.value??``,disabled:C,readOnly:e.readOnly,inputClassName:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),P?.(e)},onValueChange:e=>{f.onChange(e),N?.(e)}})})}if(h===`password`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:s,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,onValueChange:N,onBlur:P,...F}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(c.Input,{...F,type:`password`,id:j??u,ref:f.ref,name:f.name,value:f.value??``,disabled:C,readOnly:e.readOnly,inputClassName:A??g,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),P?.(e)},onChange:e=>{let t=e.currentTarget.value;f.onChange(t),N?.(t)},"aria-invalid":p.invalid||void 0})})}if(h===`number`){let{control:t,name:n,label:r,description:i,required:o,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=null,onNumberChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(a.NumberInput,{...I,id:j??u,name:f.name,ref:f.ref,value:f.value??``,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onNumberChange:e=>{f.onChange(e??N),P?.(e)}})})}if(h===`phone`){let{control:t,name:n,label:r,description:i,required:a,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,valueMode:N=`raw`,countryCode:P=`+998`,maxDigits:F=12,onValueChange:I,onBlur:L,...R}=e,z=f.value==null?``:String(f.value),B=N===`raw`?o.formatPhoneDigits(z,P,F):z;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(o.PhoneInput,{...R,id:j??u,name:f.name,ref:f.ref,value:B,disabled:C,readOnly:e.readOnly,countryCode:P,maxDigits:F,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),L?.(e)},onValueChange:(e,t)=>{let n=N===`raw`?t:e;f.onChange(n),I?.(n,t,e)}})})}if(h===`date`){let{control:n,name:r,label:i,description:a,required:o,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=``,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(t.DateInput,{...I,id:j??u,name:f.name,ref:f.ref,value:f.value??``,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:e=>{f.onChange(e||N),P?.(e)}})})}if(h===`clearable`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:s,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=``,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(c.Input,{...I,clearable:!0,id:j??u,name:f.name,ref:f.ref,value:f.value??``,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:e=>{f.onChange(e||N),P?.(e)}})})}if(h===`masked`){let{control:t,name:n,label:r,description:a,required:o,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,valueMode:N=`raw`,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(i.MaskedInput,{...I,id:j??u,name:f.name,ref:f.ref,value:String(f.value??``),disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:(e,t)=>{let n=N===`raw`?t:e;f.onChange(n),P?.(e,t)}})})}if(h===`money`){let{control:t,name:n,label:i,description:a,required:o,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=null,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(r.MoneyInput,{...I,id:j??u,name:f.name,ref:f.ref,value:f.value??null,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:(e,t)=>{f.onChange(e??N),P?.(e,t)}})})}if(h===`quantity`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=null,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(s.QuantityInput,{...I,id:j??u,name:f.name,ref:f.ref,value:f.value,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:e=>{f.onChange(e??N),P?.(e)}})})}if(h===`date-range`){let{control:t,name:r,label:i,description:a,required:o,className:s,layout:c,descriptionPosition:h,labelAction:g,requiredIndicator:y,errorIcon:b,showErrorIcon:x,disabled:S,labelClassName:C,labelRowClassName:w,descriptionClassName:T,errorClassName:E,contentClassName:D,fieldClassName:O,id:k,kind:A,onValueChange:j,onBlur:M,...N}=e,P=f.value;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:k??u,children:(0,d.jsx)(n.DateRangeInput,{...N,id:k??u,value:P&&typeof P==`object`?{from:P.from,to:P.to}:{from:``,to:``},fromInputProps:{...N.fromInputProps??{},disabled:S,readOnly:e.readOnly,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0},toInputProps:{...N.toInputProps??{},disabled:S,readOnly:e.readOnly,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0},onValueChange:e=>{f.onChange(e),j?.(e)},"aria-invalid":p.invalid||void 0,onBlur:e=>{f.onBlur(),M?.(e)}})})}let{control:y,name:b,label:x,description:S,required:C,className:w,layout:T,descriptionPosition:E,labelAction:D,requiredIndicator:O,errorIcon:k,showErrorIcon:A,disabled:j,readOnly:M,labelClassName:N,labelRowClassName:P,descriptionClassName:F,errorClassName:I,contentClassName:L,fieldClassName:R,transformIn:z,transformOut:B,id:V,kind:H,onChange:U,onBlur:W,...G}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:V??u,children:(0,d.jsx)(c.Input,{...G,id:V??u,ref:f.ref,name:f.name,value:z?z(f.value):f.value??``,disabled:j,readOnly:M,onBlur:e=>{f.onBlur(),W?.(e)},onChange:e=>{f.onChange(B?B(e):e.target.value),U?.(e)},"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,className:R??g})})}})}exports.FormInput=m;
@@ -15,6 +15,8 @@ function p(e) {
15
15
  return {
16
16
  label: e.label,
17
17
  description: e.description,
18
+ success: e.success,
19
+ loading: e.loading,
18
20
  required: e.required,
19
21
  className: e.className,
20
22
  htmlFor: e.id ?? e.name,
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../ui/select/index.cjs"),t=require("../inputs/async-select.cjs"),n=require("./form-field-shell.cjs");let r=require("react/jsx-runtime"),i=require("react-hook-form");function a(e){return{label:e.label,description:e.description,required:e.required,className:e.className,htmlFor:e.name,layout:e.layout,descriptionPosition:e.descriptionPosition,labelAction:e.labelAction,requiredIndicator:e.requiredIndicator,errorIcon:e.errorIcon,showErrorIcon:e.showErrorIcon,disabled:e.disabled,readOnly:e.readOnly,labelClassName:e.labelClassName,labelRowClassName:e.labelRowClassName,descriptionClassName:e.descriptionClassName,errorClassName:e.errorClassName,contentClassName:e.contentClassName}}function o(o){let s=a(o),c=o.kind??`simple`,l=o.fieldClassName??`w-full`;return(0,r.jsx)(i.Controller,{control:o.control,name:o.name,render:({field:i,fieldState:a})=>{let u=a.error?.message,d=n.resolveFormFieldIds(`${o.name}`,{description:o.description,error:u});if(c===`async`){let{control:e,name:a,label:c,description:f,required:p,className:m,layout:h,descriptionPosition:g,labelAction:_,requiredIndicator:v,errorIcon:y,showErrorIcon:b,disabled:x,readOnly:S,labelClassName:C,labelRowClassName:w,descriptionClassName:T,errorClassName:E,contentClassName:D,fieldClassName:O,emptyValue:k,kind:A,onValueChange:j,...M}=o;return(0,r.jsx)(n.FormFieldShell,{...s,labelId:d.labelId,descriptionId:d.descriptionId,errorId:d.errorId,error:u,children:(0,r.jsx)(t.AsyncSelect,{...M,value:i.value==null||i.value===``?void 0:String(i.value),disabled:x||S,"aria-describedby":d.describedBy,"aria-errormessage":u?d.errorId:void 0,onValueChange:(e,t)=>{i.onChange(e??k),j?.(e,t)},triggerClassName:O??l})})}let{control:f,name:p,label:m,description:h,required:g,className:_,layout:v,descriptionPosition:y,labelAction:b,requiredIndicator:x,errorIcon:S,showErrorIcon:C,disabled:w,readOnly:T,labelClassName:E,labelRowClassName:D,descriptionClassName:O,errorClassName:k,contentClassName:A,fieldClassName:j,emptyValue:M,kind:N,onValueChange:P,...F}=o;return(0,r.jsx)(n.FormFieldShell,{...s,labelId:d.labelId,descriptionId:d.descriptionId,errorId:d.errorId,error:u,children:(0,r.jsx)(e.Select,{...F,value:i.value==null?void 0:String(i.value),disabled:w||T,"aria-describedby":d.describedBy,"aria-errormessage":u?d.errorId:void 0,onValueChange:e=>{i.onChange(e||M),P?.(e)},triggerClassName:j??l})})}})}exports.FormSelect=o;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../ui/select/index.cjs"),t=require("../inputs/async-select.cjs"),n=require("./form-field-shell.cjs");let r=require("react/jsx-runtime"),i=require("react-hook-form");function a(e){return{label:e.label,description:e.description,success:e.success,loading:e.loading,required:e.required,className:e.className,htmlFor:e.name,layout:e.layout,descriptionPosition:e.descriptionPosition,labelAction:e.labelAction,requiredIndicator:e.requiredIndicator,errorIcon:e.errorIcon,showErrorIcon:e.showErrorIcon,disabled:e.disabled,readOnly:e.readOnly,labelClassName:e.labelClassName,labelRowClassName:e.labelRowClassName,descriptionClassName:e.descriptionClassName,errorClassName:e.errorClassName,contentClassName:e.contentClassName}}function o(o){let s=a(o),c=o.kind??`simple`,l=o.fieldClassName??`w-full`;return(0,r.jsx)(i.Controller,{control:o.control,name:o.name,render:({field:i,fieldState:a})=>{let u=a.error?.message,d=n.resolveFormFieldIds(`${o.name}`,{description:o.description,error:u});if(c===`async`){let{control:e,name:a,label:c,description:f,required:p,className:m,layout:h,descriptionPosition:g,labelAction:_,requiredIndicator:v,errorIcon:y,showErrorIcon:b,disabled:x,readOnly:S,labelClassName:C,labelRowClassName:w,descriptionClassName:T,errorClassName:E,contentClassName:D,fieldClassName:O,emptyValue:k,kind:A,onValueChange:j,...M}=o;return(0,r.jsx)(n.FormFieldShell,{...s,labelId:d.labelId,descriptionId:d.descriptionId,errorId:d.errorId,error:u,children:(0,r.jsx)(t.AsyncSelect,{...M,value:i.value==null||i.value===``?void 0:String(i.value),disabled:x||S,"aria-describedby":d.describedBy,"aria-errormessage":u?d.errorId:void 0,onValueChange:(e,t)=>{i.onChange(e??k),j?.(e,t)},triggerClassName:O??l})})}let{control:f,name:p,label:m,description:h,required:g,className:_,layout:v,descriptionPosition:y,labelAction:b,requiredIndicator:x,errorIcon:S,showErrorIcon:C,disabled:w,readOnly:T,labelClassName:E,labelRowClassName:D,descriptionClassName:O,errorClassName:k,contentClassName:A,fieldClassName:j,emptyValue:M,kind:N,onValueChange:P,...F}=o;return(0,r.jsx)(n.FormFieldShell,{...s,labelId:d.labelId,descriptionId:d.descriptionId,errorId:d.errorId,error:u,children:(0,r.jsx)(e.Select,{...F,value:i.value==null?void 0:String(i.value),disabled:w||T,"aria-describedby":d.describedBy,"aria-errormessage":u?d.errorId:void 0,onValueChange:e=>{i.onChange(e||M),P?.(e)},triggerClassName:j??l})})}})}exports.FormSelect=o;
@@ -8,6 +8,8 @@ function o(e) {
8
8
  return {
9
9
  label: e.label,
10
10
  description: e.description,
11
+ success: e.success,
12
+ loading: e.loading,
11
13
  required: e.required,
12
14
  className: e.className,
13
15
  htmlFor: e.name,
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/switch/index.cjs"),r=require("./form-field-shell.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime"),o=require("react-hook-form");function s({control:e,name:i,label:s,description:c,required:l,className:u,layout:d,descriptionPosition:f,labelAction:p,requiredIndicator:m,errorIcon:h,showErrorIcon:g,disabled:_,readOnly:v,labelClassName:y,labelRowClassName:b,descriptionClassName:x,errorClassName:S,contentClassName:C,fieldClassName:w,labelPlacement:T=`end`,id:E,onCheckedChange:D,...O}){let k=E??i;return(0,a.jsx)(o.Controller,{control:e,name:i,render:({field:e,fieldState:i})=>{let o=i.error?.message,E=r.resolveFormFieldIds(k,{description:c,error:o}),A=s?(0,a.jsxs)(`label`,{id:E.labelId,htmlFor:k,className:t.cn(`text-sm font-medium leading-none`,_&&`opacity-60`,y),children:[s,l&&(m??(0,a.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`}))]}):null,j=(0,a.jsx)(n.Switch,{id:k,ref:e.ref,checked:!!e.value,disabled:_||v,"aria-invalid":i.invalid||void 0,"aria-labelledby":s?E.labelId:void 0,"aria-describedby":E.describedBy,"aria-errormessage":o?E.errorId:void 0,className:w,onBlur:e.onBlur,onCheckedChange:t=>{e.onChange(t),D?.(t)},...O});return T===`start`?(0,a.jsx)(r.FormFieldShell,{label:s,description:c,required:l,error:o,htmlFor:k,labelId:E.labelId,descriptionId:E.descriptionId,errorId:E.errorId,className:u,layout:d,descriptionPosition:f,labelAction:p,requiredIndicator:m,errorIcon:h,showErrorIcon:g,disabled:_,readOnly:v,labelClassName:y,labelRowClassName:b,descriptionClassName:x,errorClassName:S,contentClassName:C,children:j}):(0,a.jsx)(r.FormFieldShell,{error:o,className:u,descriptionId:E.descriptionId,errorId:E.errorId,errorIcon:h,showErrorIcon:g,disabled:_,readOnly:v,errorClassName:S,contentClassName:C,children:(0,a.jsxs)(`div`,{className:`flex items-start gap-3`,children:[j,(s||c||p)&&(0,a.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(s||p)&&(0,a.jsxs)(`div`,{className:t.cn(`flex items-center justify-between gap-2`,b),children:[A,p&&(0,a.jsx)(`div`,{className:`shrink-0 text-sm`,children:p})]}),c&&(0,a.jsx)(`p`,{id:E.descriptionId,className:t.cn(`text-xs text-muted-foreground`,x),children:c})]})]})})}})}exports.FormSwitch=s;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/switch/index.cjs"),r=require("./form-field-shell.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime"),o=require("react-hook-form");function s({control:e,name:i,label:s,description:c,success:l,loading:u,required:d,className:f,layout:p,descriptionPosition:m,labelAction:h,requiredIndicator:g,errorIcon:_,showErrorIcon:v,disabled:y,readOnly:b,labelClassName:x,labelRowClassName:S,descriptionClassName:C,errorClassName:w,contentClassName:T,fieldClassName:E,labelPlacement:D=`end`,id:O,onCheckedChange:k,...A}){let j=O??i;return(0,a.jsx)(o.Controller,{control:e,name:i,render:({field:e,fieldState:i})=>{let o=i.error?.message,O=r.resolveFormFieldIds(j,{description:c,error:o}),M=s?(0,a.jsxs)(`label`,{id:O.labelId,htmlFor:j,className:t.cn(`text-sm font-medium leading-none`,y&&`opacity-60`,x),children:[s,d&&(g??(0,a.jsx)(`span`,{className:`ml-1 text-destructive`,children:`*`}))]}):null,N=(0,a.jsx)(n.Switch,{id:j,ref:e.ref,checked:!!e.value,disabled:y||b,"aria-invalid":i.invalid||void 0,"aria-labelledby":s?O.labelId:void 0,"aria-describedby":O.describedBy,"aria-errormessage":o?O.errorId:void 0,className:E,onBlur:e.onBlur,onCheckedChange:t=>{e.onChange(t),k?.(t)},...A});return D===`start`?(0,a.jsx)(r.FormFieldShell,{label:s,description:c,success:l,loading:u,required:d,error:o,htmlFor:j,labelId:O.labelId,descriptionId:O.descriptionId,errorId:O.errorId,className:f,layout:p,descriptionPosition:m,labelAction:h,requiredIndicator:g,errorIcon:_,showErrorIcon:v,disabled:y,readOnly:b,labelClassName:x,labelRowClassName:S,descriptionClassName:C,errorClassName:w,contentClassName:T,children:N}):(0,a.jsx)(r.FormFieldShell,{error:o,success:l,loading:u,className:f,descriptionId:O.descriptionId,errorId:O.errorId,errorIcon:_,showErrorIcon:v,disabled:y,readOnly:b,errorClassName:w,contentClassName:T,children:(0,a.jsxs)(`div`,{className:`flex items-start gap-3`,children:[N,(s||c||h)&&(0,a.jsxs)(`div`,{className:`grid min-w-0 gap-1`,children:[(s||h)&&(0,a.jsxs)(`div`,{className:t.cn(`flex items-center justify-between gap-2`,S),children:[M,h&&(0,a.jsx)(`div`,{className:`shrink-0 text-sm`,children:h})]}),c&&(0,a.jsx)(`p`,{id:O.descriptionId,className:t.cn(`text-xs text-muted-foreground`,C),children:c})]})]})})}})}exports.FormSwitch=s;
@@ -10,5 +10,5 @@ export type FormSwitchProps<TFieldValues extends FieldValues = FieldValues, TNam
10
10
  labelPlacement?: FormSwitchLabelPlacement;
11
11
  onCheckedChange?: (checked: boolean) => void;
12
12
  };
13
- declare function FormSwitch<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ control, name, label, description, required, className, layout, descriptionPosition, labelAction, requiredIndicator, errorIcon, showErrorIcon, disabled, readOnly, labelClassName, labelRowClassName, descriptionClassName, errorClassName, contentClassName, fieldClassName, labelPlacement, id, onCheckedChange, ...props }: FormSwitchProps<TFieldValues, TName>): React.JSX.Element;
13
+ declare function FormSwitch<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ control, name, label, description, success, loading, required, className, layout, descriptionPosition, labelAction, requiredIndicator, errorIcon, showErrorIcon, disabled, readOnly, labelClassName, labelRowClassName, descriptionClassName, errorClassName, contentClassName, fieldClassName, labelPlacement, id, onCheckedChange, ...props }: FormSwitchProps<TFieldValues, TName>): React.JSX.Element;
14
14
  export { FormSwitch };