tembro 2.0.5 → 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 (381) 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-pagination.cjs +1 -1
  17. package/dist/components/data-table/data-table-pagination.js +4 -4
  18. package/dist/components/data-table/data-table-toolbar.cjs +1 -1
  19. package/dist/components/data-table/data-table-toolbar.js +12 -13
  20. package/dist/components/data-table/data-table.cjs +1 -1
  21. package/dist/components/data-table/data-table.d.ts +2 -2
  22. package/dist/components/data-table/data-table.js +2 -1
  23. package/dist/components/display/carousel.cjs +1 -1
  24. package/dist/components/display/carousel.d.ts +15 -1
  25. package/dist/components/display/carousel.js +128 -86
  26. package/dist/components/display/code-block.cjs +2 -2
  27. package/dist/components/display/code-block.d.ts +2 -1
  28. package/dist/components/display/code-block.js +17 -12
  29. package/dist/components/display/delta-badge.cjs +1 -1
  30. package/dist/components/display/delta-badge.d.ts +2 -1
  31. package/dist/components/display/delta-badge.js +11 -7
  32. package/dist/components/display/kanban.cjs +1 -1
  33. package/dist/components/display/kanban.d.ts +4 -1
  34. package/dist/components/display/kanban.js +60 -33
  35. package/dist/components/display/metric-grid.cjs +1 -1
  36. package/dist/components/display/metric-grid.d.ts +1 -0
  37. package/dist/components/display/metric-grid.js +1 -1
  38. package/dist/components/display/qr-code.cjs +1 -1
  39. package/dist/components/display/qr-code.d.ts +2 -1
  40. package/dist/components/display/qr-code.js +19 -16
  41. package/dist/components/display/smart-card.d.ts +1 -1
  42. package/dist/components/display/status-legend.d.ts +1 -1
  43. package/dist/components/display/tag.cjs +1 -1
  44. package/dist/components/display/tag.d.ts +2 -1
  45. package/dist/components/display/tag.js +28 -22
  46. package/dist/components/display/tree-view.cjs +1 -1
  47. package/dist/components/display/tree-view.d.ts +9 -1
  48. package/dist/components/display/tree-view.js +104 -40
  49. package/dist/components/display/trend-card.cjs +1 -1
  50. package/dist/components/display/trend-card.js +27 -41
  51. package/dist/components/feedback/alert.cjs +1 -1
  52. package/dist/components/feedback/alert.d.ts +2 -1
  53. package/dist/components/feedback/alert.js +6 -6
  54. package/dist/components/feedback/loading-state.cjs +1 -1
  55. package/dist/components/feedback/loading-state.d.ts +3 -1
  56. package/dist/components/feedback/loading-state.js +23 -10
  57. package/dist/components/feedback/page-state.cjs +1 -1
  58. package/dist/components/feedback/page-state.d.ts +2 -1
  59. package/dist/components/feedback/page-state.js +7 -4
  60. package/dist/components/form/form-field-shell.cjs +1 -1
  61. package/dist/components/form/form-field-shell.d.ts +4 -2
  62. package/dist/components/form/form-field-shell.js +57 -41
  63. package/dist/components/form/form-input.cjs +1 -1
  64. package/dist/components/form/form-input.d.ts +3 -4
  65. package/dist/components/form/form-input.js +259 -257
  66. package/dist/components/form/form-select.cjs +1 -1
  67. package/dist/components/form/form-select.d.ts +2 -2
  68. package/dist/components/form/form-select.js +8 -6
  69. package/dist/components/form/form-switch.cjs +1 -1
  70. package/dist/components/form/form-switch.d.ts +1 -1
  71. package/dist/components/form/form-switch.js +58 -54
  72. package/dist/components/form/form-textarea.cjs +1 -1
  73. package/dist/components/form/form-textarea.d.ts +1 -1
  74. package/dist/components/form/form-textarea.js +29 -27
  75. package/dist/components/inputs/async-select.d.ts +3 -0
  76. package/dist/components/inputs/search-input.d.ts +3 -0
  77. package/dist/components/inputs/simple-select.cjs +1 -1
  78. package/dist/components/inputs/simple-select.d.ts +10 -32
  79. package/dist/components/inputs/simple-select.js +5 -101
  80. package/dist/components/layout/app-sidebar.cjs +1 -1
  81. package/dist/components/layout/app-sidebar.d.ts +1 -0
  82. package/dist/components/layout/app-sidebar.js +36 -36
  83. package/dist/components/layout/breadcrumbs.cjs +1 -1
  84. package/dist/components/layout/breadcrumbs.d.ts +2 -1
  85. package/dist/components/layout/breadcrumbs.js +7 -7
  86. package/dist/components/modern/calendar-scheduler.cjs +1 -1
  87. package/dist/components/modern/calendar-scheduler.d.ts +5 -1
  88. package/dist/components/modern/calendar-scheduler.js +47 -28
  89. package/dist/components/modern/dual-list-picker.cjs +1 -1
  90. package/dist/components/modern/dual-list-picker.d.ts +5 -1
  91. package/dist/components/modern/dual-list-picker.js +81 -23
  92. package/dist/components/modern/rich-text-editor.cjs +1 -1
  93. package/dist/components/modern/rich-text-editor.d.ts +3 -1
  94. package/dist/components/modern/rich-text-editor.js +12 -9
  95. package/dist/components/modern/tour.cjs +1 -1
  96. package/dist/components/modern/tour.d.ts +5 -1
  97. package/dist/components/modern/tour.js +57 -35
  98. package/dist/components/navigation/command-bar.cjs +1 -1
  99. package/dist/components/navigation/command-bar.d.ts +3 -1
  100. package/dist/components/navigation/command-bar.js +10 -7
  101. package/dist/components/navigation/demo.cjs +1 -1
  102. package/dist/components/navigation/demo.js +0 -1
  103. package/dist/components/navigation/nav-tabs.cjs +1 -1
  104. package/dist/components/navigation/nav-tabs.js +39 -27
  105. package/dist/components/navigation/page-tabs.cjs +1 -1
  106. package/dist/components/navigation/page-tabs.js +41 -30
  107. package/dist/components/navigation/pagination.cjs +1 -1
  108. package/dist/components/navigation/pagination.d.ts +7 -1
  109. package/dist/components/navigation/pagination.js +48 -25
  110. package/dist/components/notifications/notification-center.cjs +1 -1
  111. package/dist/components/notifications/notification-center.d.ts +3 -1
  112. package/dist/components/notifications/notification-center.js +56 -38
  113. package/dist/components/notifications/toast.cjs +1 -1
  114. package/dist/components/notifications/toast.d.ts +1 -0
  115. package/dist/components/notifications/toast.js +4 -0
  116. package/dist/components/overlay/alert-dialog.cjs +1 -1
  117. package/dist/components/overlay/alert-dialog.js +1 -1
  118. package/dist/components/overlay/confirm-dialog.cjs +1 -1
  119. package/dist/components/overlay/confirm-dialog.d.ts +4 -2
  120. package/dist/components/overlay/confirm-dialog.js +31 -22
  121. package/dist/components/overlay/drawer.cjs +1 -1
  122. package/dist/components/overlay/drawer.d.ts +3 -1
  123. package/dist/components/overlay/drawer.js +24 -16
  124. package/dist/components/ui/accordion/index.d.ts +4 -0
  125. package/dist/components/ui/badge/index.cjs +1 -1
  126. package/dist/components/ui/badge/index.d.ts +1 -1
  127. package/dist/components/ui/badge/index.js +2 -1
  128. package/dist/components/ui/button/index.cjs +1 -1
  129. package/dist/components/ui/button/index.d.ts +2 -1
  130. package/dist/components/ui/button/index.js +13 -10
  131. package/dist/components/ui/card/index.cjs +1 -1
  132. package/dist/components/ui/card/index.d.ts +13 -2
  133. package/dist/components/ui/card/index.js +74 -49
  134. package/dist/components/ui/dialog/index.cjs +1 -1
  135. package/dist/components/ui/dialog/index.js +2 -1
  136. package/dist/components/ui/hover-card.cjs +1 -1
  137. package/dist/components/ui/hover-card.d.ts +11 -3
  138. package/dist/components/ui/hover-card.js +29 -24
  139. package/dist/components/ui/input/index.cjs +1 -1
  140. package/dist/components/ui/input/index.d.ts +9 -1
  141. package/dist/components/ui/input/index.js +63 -30
  142. package/dist/components/ui/popover/index.cjs +1 -1
  143. package/dist/components/ui/popover/index.d.ts +2 -2
  144. package/dist/components/ui/popover/index.js +6 -5
  145. package/dist/components/ui/radio-group/index.cjs +1 -1
  146. package/dist/components/ui/radio-group/index.d.ts +5 -1
  147. package/dist/components/ui/radio-group/index.js +50 -16
  148. package/dist/components/ui/right-click-menu/index.cjs +1 -1
  149. package/dist/components/ui/right-click-menu/index.d.ts +5 -1
  150. package/dist/components/ui/right-click-menu/index.js +77 -23
  151. package/dist/components/ui/segmented-control/index.cjs +1 -1
  152. package/dist/components/ui/segmented-control/index.d.ts +2 -1
  153. package/dist/components/ui/segmented-control/index.js +23 -11
  154. package/dist/components/ui/select/index.cjs +1 -1
  155. package/dist/components/ui/select/index.d.ts +40 -1
  156. package/dist/components/ui/select/index.js +159 -48
  157. package/dist/components/ui/switch/index.cjs +1 -1
  158. package/dist/components/ui/switch/index.d.ts +18 -0
  159. package/dist/components/ui/switch/index.js +47 -17
  160. package/dist/components/ui/tabs/index.cjs +1 -1
  161. package/dist/components/ui/tabs/index.d.ts +14 -4
  162. package/dist/components/ui/tabs/index.js +11 -8
  163. package/dist/components/ui/textarea/index.cjs +1 -1
  164. package/dist/components/ui/textarea/index.d.ts +10 -2
  165. package/dist/components/ui/textarea/index.js +37 -8
  166. package/dist/components/ui/textarea.cjs +1 -0
  167. package/dist/components/ui/textarea.d.ts +1 -0
  168. package/dist/components/ui/textarea.js +2 -0
  169. package/dist/components/ui/tooltip/index.cjs +1 -1
  170. package/dist/components/ui/tooltip/index.d.ts +11 -3
  171. package/dist/components/ui/tooltip/index.js +41 -20
  172. package/dist/components/upload/file-upload.cjs +1 -1
  173. package/dist/components/upload/file-upload.d.ts +8 -1
  174. package/dist/components/upload/file-upload.js +132 -100
  175. package/dist/components/upload/image-upload.cjs +1 -1
  176. package/dist/components/upload/image-upload.d.ts +5 -1
  177. package/dist/components/upload/image-upload.js +34 -9
  178. package/dist/index.cjs +1 -1
  179. package/dist/index.js +31 -31
  180. package/dist/public-component-surface.cjs +1 -1
  181. package/dist/public-component-surface.js +15 -0
  182. package/dist/showcase/component-api-schema.cjs +1 -1
  183. package/dist/showcase/component-api-schema.js +187 -10
  184. package/dist/showcase/create-demo.cjs +5 -4
  185. package/dist/showcase/create-demo.js +2 -2
  186. package/dist/showcase/fallback.cjs +3 -3
  187. package/dist/showcase/fallback.js +221 -243
  188. package/dist/showcase/premium/alert/showcase.cjs +1 -1
  189. package/dist/showcase/premium/alert/showcase.js +1 -0
  190. package/dist/showcase/premium/app-sidebar/showcase.cjs +1 -1
  191. package/dist/showcase/premium/app-sidebar/showcase.js +1 -0
  192. package/dist/showcase/premium/badge/showcase.cjs +1 -1
  193. package/dist/showcase/premium/badge/showcase.js +7 -0
  194. package/dist/showcase/premium/badge/types.d.ts +1 -1
  195. package/dist/showcase/premium/breadcrumbs/showcase.cjs +1 -1
  196. package/dist/showcase/premium/breadcrumbs/showcase.js +12 -1
  197. package/dist/showcase/premium/button/mock.cjs +1 -4
  198. package/dist/showcase/premium/button/mock.js +1 -1
  199. package/dist/showcase/premium/button/showcase.cjs +1 -1
  200. package/dist/showcase/premium/button/showcase.js +2 -2
  201. package/dist/showcase/premium/card/showcase.cjs +1 -1
  202. package/dist/showcase/premium/card/showcase.js +96 -47
  203. package/dist/showcase/premium/carousel/showcase.cjs +1 -1
  204. package/dist/showcase/premium/carousel/showcase.js +76 -49
  205. package/dist/showcase/premium/command-bar/showcase.cjs +1 -1
  206. package/dist/showcase/premium/command-bar/showcase.js +2 -0
  207. package/dist/showcase/premium/data-table/mock.cjs +12 -11
  208. package/dist/showcase/premium/data-table/mock.js +1 -1
  209. package/dist/showcase/premium/data-table/showcase.cjs +1 -1
  210. package/dist/showcase/premium/data-table/showcase.js +1 -1
  211. package/dist/showcase/premium/data-table-parts/showcase.cjs +1 -1
  212. package/dist/showcase/premium/data-table-parts/showcase.js +3 -1
  213. package/dist/showcase/premium/file-upload/showcase.cjs +1 -1
  214. package/dist/showcase/premium/file-upload/showcase.js +25 -4
  215. package/dist/showcase/premium/image-upload/showcase.cjs +1 -1
  216. package/dist/showcase/premium/image-upload/showcase.js +4 -1
  217. package/dist/showcase/premium/index.cjs +1 -1
  218. package/dist/showcase/premium/index.js +396 -402
  219. package/dist/showcase/premium/loading-state/showcase.cjs +1 -1
  220. package/dist/showcase/premium/loading-state/showcase.js +3 -1
  221. package/dist/showcase/premium/metric-grid/showcase.cjs +1 -1
  222. package/dist/showcase/premium/metric-grid/showcase.js +96 -28
  223. package/dist/showcase/premium/notification-center/showcase.cjs +1 -1
  224. package/dist/showcase/premium/notification-center/showcase.js +7 -3
  225. package/dist/showcase/premium/page-state/showcase.cjs +1 -1
  226. package/dist/showcase/premium/page-state/showcase.js +5 -1
  227. package/dist/showcase/premium/pagination/showcase.cjs +1 -1
  228. package/dist/showcase/premium/pagination/showcase.js +15 -2
  229. package/dist/showcase/premium/popover/showcase.cjs +1 -1
  230. package/dist/showcase/premium/popover/showcase.js +85 -50
  231. package/dist/showcase/premium/radio-group/showcase.cjs +1 -1
  232. package/dist/showcase/premium/radio-group/showcase.js +27 -4
  233. package/dist/showcase/premium/right-click-menu/showcase.cjs +1 -1
  234. package/dist/showcase/premium/right-click-menu/showcase.js +56 -43
  235. package/dist/showcase/premium/segmented-control/showcase.cjs +1 -1
  236. package/dist/showcase/premium/segmented-control/showcase.js +1 -0
  237. package/dist/showcase/premium/select/data.cjs +1 -1
  238. package/dist/showcase/premium/select/data.js +69 -34
  239. package/dist/showcase/premium/select/mock.cjs +20 -8
  240. package/dist/showcase/premium/select/mock.js +3 -2
  241. package/dist/showcase/premium/select/showcase.cjs +1 -1
  242. package/dist/showcase/premium/select/showcase.js +101 -86
  243. package/dist/showcase/premium/select/types.d.ts +3 -0
  244. package/dist/showcase/premium/statistic/showcase.cjs +1 -1
  245. package/dist/showcase/premium/statistic/showcase.js +57 -25
  246. package/dist/showcase/premium/switch/showcase.cjs +1 -1
  247. package/dist/showcase/premium/switch/showcase.js +25 -14
  248. package/dist/showcase/premium/tabs/showcase.cjs +1 -1
  249. package/dist/showcase/premium/tabs/showcase.js +171 -48
  250. package/dist/showcase/premium/textarea/mock.cjs +12 -4
  251. package/dist/showcase/premium/textarea/mock.js +1 -1
  252. package/dist/showcase/premium/textarea/showcase.cjs +1 -1
  253. package/dist/showcase/premium/textarea/showcase.js +8 -3
  254. package/dist/showcase/premium/toast/showcase.cjs +1 -1
  255. package/dist/showcase/premium/toast/showcase.js +32 -6
  256. package/dist/showcase/premium/types.d.ts +1 -1
  257. package/dist/showcase/registry-quality.cjs +1 -1
  258. package/dist/showcase/registry-quality.js +1 -0
  259. package/dist/showcase/registry-specific.cjs +1 -1
  260. package/dist/showcase/registry-specific.js +78 -74
  261. package/dist/showcase/render-registry-preview.cjs +1 -1
  262. package/dist/showcase/render-registry-preview.js +90 -108
  263. package/dist/showcase/site-data.cjs +1 -1
  264. package/dist/showcase/site-data.js +60 -21
  265. package/dist/showcase/tembro-registry.json.cjs +1 -1
  266. package/dist/showcase/tembro-registry.json.js +34 -20
  267. package/dist/showcase/types.d.ts +1 -1
  268. package/package.json +1 -1
  269. package/packages/cli/dist/index.cjs +31 -31
  270. package/packages/cli/vendor/src/components/calendar/calendar.tsx +59 -50
  271. package/packages/cli/vendor/src/components/calendar/date-range-picker.tsx +7 -4
  272. package/packages/cli/vendor/src/components/charts/charts.tsx +109 -66
  273. package/packages/cli/vendor/src/components/charts/progress-ring.tsx +37 -26
  274. package/packages/cli/vendor/src/components/data-table/data-table-column-visibility-menu.tsx +41 -22
  275. package/packages/cli/vendor/src/components/data-table/data-table-pagination.tsx +7 -7
  276. package/packages/cli/vendor/src/components/data-table/data-table-toolbar.tsx +8 -6
  277. package/packages/cli/vendor/src/components/data-table/data-table.tsx +21 -20
  278. package/packages/cli/vendor/src/components/display/carousel.tsx +102 -9
  279. package/packages/cli/vendor/src/components/display/code-block.tsx +22 -2
  280. package/packages/cli/vendor/src/components/display/delta-badge.tsx +11 -11
  281. package/packages/cli/vendor/src/components/display/kanban.tsx +103 -57
  282. package/packages/cli/vendor/src/components/display/metric-grid.tsx +16 -13
  283. package/packages/cli/vendor/src/components/display/qr-code.tsx +17 -15
  284. package/packages/cli/vendor/src/components/display/smart-card.tsx +1 -1
  285. package/packages/cli/vendor/src/components/display/status-legend.tsx +1 -1
  286. package/packages/cli/vendor/src/components/display/tag.tsx +39 -21
  287. package/packages/cli/vendor/src/components/display/tree-view.tsx +221 -84
  288. package/packages/cli/vendor/src/components/display/trend-card.tsx +6 -40
  289. package/packages/cli/vendor/src/components/feedback/alert.tsx +3 -1
  290. package/packages/cli/vendor/src/components/feedback/loading-state.tsx +33 -17
  291. package/packages/cli/vendor/src/components/feedback/page-state.tsx +8 -7
  292. package/packages/cli/vendor/src/components/form/form-field-shell.tsx +37 -8
  293. package/packages/cli/vendor/src/components/form/form-input.tsx +11 -12
  294. package/packages/cli/vendor/src/components/form/form-select.tsx +6 -4
  295. package/packages/cli/vendor/src/components/form/form-switch.tsx +9 -3
  296. package/packages/cli/vendor/src/components/form/form-textarea.tsx +6 -2
  297. package/packages/cli/vendor/src/components/inputs/async-select.tsx +11 -8
  298. package/packages/cli/vendor/src/components/inputs/search-input.tsx +5 -2
  299. package/packages/cli/vendor/src/components/inputs/simple-select.tsx +20 -190
  300. package/packages/cli/vendor/src/components/layout/app-sidebar.tsx +3 -1
  301. package/packages/cli/vendor/src/components/layout/breadcrumbs.tsx +3 -1
  302. package/packages/cli/vendor/src/components/modern/calendar-scheduler.tsx +28 -13
  303. package/packages/cli/vendor/src/components/modern/dual-list-picker.tsx +103 -35
  304. package/packages/cli/vendor/src/components/modern/rich-text-editor.tsx +25 -22
  305. package/packages/cli/vendor/src/components/modern/tour.tsx +47 -29
  306. package/packages/cli/vendor/src/components/navigation/command-bar.tsx +6 -0
  307. package/packages/cli/vendor/src/components/navigation/demo.tsx +0 -1
  308. package/packages/cli/vendor/src/components/navigation/nav-tabs.tsx +38 -29
  309. package/packages/cli/vendor/src/components/navigation/page-tabs.tsx +35 -23
  310. package/packages/cli/vendor/src/components/navigation/pagination.tsx +65 -31
  311. package/packages/cli/vendor/src/components/notifications/notification-center.tsx +64 -39
  312. package/packages/cli/vendor/src/components/notifications/toast.tsx +23 -21
  313. package/packages/cli/vendor/src/components/overlay/alert-dialog.tsx +1 -1
  314. package/packages/cli/vendor/src/components/overlay/confirm-dialog.tsx +45 -22
  315. package/packages/cli/vendor/src/components/overlay/drawer.tsx +18 -5
  316. package/packages/cli/vendor/src/components/ui/accordion/index.tsx +4 -0
  317. package/packages/cli/vendor/src/components/ui/badge/index.tsx +2 -1
  318. package/packages/cli/vendor/src/components/ui/button/index.tsx +11 -5
  319. package/packages/cli/vendor/src/components/ui/card/index.tsx +95 -25
  320. package/packages/cli/vendor/src/components/ui/dialog/index.tsx +2 -1
  321. package/packages/cli/vendor/src/components/ui/hover-card.tsx +54 -28
  322. package/packages/cli/vendor/src/components/ui/input/index.tsx +98 -0
  323. package/packages/cli/vendor/src/components/ui/popover/index.tsx +10 -8
  324. package/packages/cli/vendor/src/components/ui/radio-group/index.tsx +55 -6
  325. package/packages/cli/vendor/src/components/ui/right-click-menu/index.tsx +120 -9
  326. package/packages/cli/vendor/src/components/ui/segmented-control/index.tsx +29 -3
  327. package/packages/cli/vendor/src/components/ui/select/index.tsx +260 -34
  328. package/packages/cli/vendor/src/components/ui/switch/index.tsx +71 -6
  329. package/packages/cli/vendor/src/components/ui/tabs/index.tsx +22 -6
  330. package/packages/cli/vendor/src/components/ui/textarea/index.tsx +105 -15
  331. package/packages/cli/vendor/src/components/ui/textarea.tsx +2 -0
  332. package/packages/cli/vendor/src/components/ui/tooltip/index.tsx +67 -22
  333. package/packages/cli/vendor/src/components/upload/file-upload.tsx +120 -57
  334. package/packages/cli/vendor/src/components/upload/image-upload.tsx +71 -24
  335. package/packages/cli/vendor/src/public-component-surface.ts +3 -0
  336. package/packages/cli/vendor/src/showcase/component-api-schema.ts +79 -41
  337. package/packages/cli/vendor/src/showcase/create-demo.tsx +16 -15
  338. package/packages/cli/vendor/src/showcase/fallback.tsx +4 -19
  339. package/packages/cli/vendor/src/showcase/premium/alert/showcase.tsx +1 -0
  340. package/packages/cli/vendor/src/showcase/premium/app-sidebar/showcase.tsx +1 -0
  341. package/packages/cli/vendor/src/showcase/premium/badge/showcase.tsx +4 -2
  342. package/packages/cli/vendor/src/showcase/premium/badge/types.ts +1 -1
  343. package/packages/cli/vendor/src/showcase/premium/breadcrumbs/showcase.tsx +3 -1
  344. package/packages/cli/vendor/src/showcase/premium/button/mock.ts +2 -5
  345. package/packages/cli/vendor/src/showcase/premium/button/showcase.tsx +2 -2
  346. package/packages/cli/vendor/src/showcase/premium/card/showcase.tsx +26 -1
  347. package/packages/cli/vendor/src/showcase/premium/carousel/showcase.tsx +19 -3
  348. package/packages/cli/vendor/src/showcase/premium/command-bar/showcase.tsx +1 -1
  349. package/packages/cli/vendor/src/showcase/premium/data-table/mock.ts +26 -25
  350. package/packages/cli/vendor/src/showcase/premium/data-table/showcase.tsx +3 -3
  351. package/packages/cli/vendor/src/showcase/premium/data-table-parts/showcase.tsx +3 -3
  352. package/packages/cli/vendor/src/showcase/premium/file-upload/showcase.tsx +21 -1
  353. package/packages/cli/vendor/src/showcase/premium/image-upload/showcase.tsx +4 -1
  354. package/packages/cli/vendor/src/showcase/premium/index.ts +0 -2
  355. package/packages/cli/vendor/src/showcase/premium/loading-state/showcase.tsx +1 -1
  356. package/packages/cli/vendor/src/showcase/premium/metric-grid/showcase.tsx +36 -4
  357. package/packages/cli/vendor/src/showcase/premium/notification-center/showcase.tsx +4 -3
  358. package/packages/cli/vendor/src/showcase/premium/page-state/showcase.tsx +1 -0
  359. package/packages/cli/vendor/src/showcase/premium/pagination/showcase.tsx +13 -1
  360. package/packages/cli/vendor/src/showcase/premium/popover/showcase.tsx +27 -11
  361. package/packages/cli/vendor/src/showcase/premium/radio-group/showcase.tsx +13 -1
  362. package/packages/cli/vendor/src/showcase/premium/right-click-menu/showcase.tsx +8 -5
  363. package/packages/cli/vendor/src/showcase/premium/segmented-control/showcase.tsx +1 -0
  364. package/packages/cli/vendor/src/showcase/premium/select/data.ts +12 -3
  365. package/packages/cli/vendor/src/showcase/premium/select/mock.ts +4 -4
  366. package/packages/cli/vendor/src/showcase/premium/select/showcase.tsx +35 -22
  367. package/packages/cli/vendor/src/showcase/premium/select/types.ts +3 -0
  368. package/packages/cli/vendor/src/showcase/premium/statistic/showcase.tsx +10 -1
  369. package/packages/cli/vendor/src/showcase/premium/switch/showcase.tsx +15 -6
  370. package/packages/cli/vendor/src/showcase/premium/tabs/showcase.tsx +48 -1
  371. package/packages/cli/vendor/src/showcase/premium/textarea/mock.ts +12 -4
  372. package/packages/cli/vendor/src/showcase/premium/textarea/showcase.tsx +5 -0
  373. package/packages/cli/vendor/src/showcase/premium/toast/showcase.tsx +17 -1
  374. package/packages/cli/vendor/src/showcase/premium/types.ts +1 -1
  375. package/packages/cli/vendor/src/showcase/registry-quality.ts +3 -2
  376. package/packages/cli/vendor/src/showcase/registry-specific.tsx +7 -8
  377. package/packages/cli/vendor/src/showcase/render-registry-preview.tsx +5 -21
  378. package/packages/cli/vendor/src/showcase/site-data.tsx +21 -15
  379. package/packages/cli/vendor/src/showcase/tembro-registry.json +42 -20
  380. package/packages/cli/vendor/src/showcase/types.ts +1 -1
  381. package/registry.json +18 -6
@@ -1,69 +1,133 @@
1
1
  import { cn as e } from "../../lib/utils.js";
2
2
  import * as t from "react";
3
3
  import { ChevronRightIcon as n } from "lucide-react";
4
- import { jsx as r, jsxs as i } from "react/jsx-runtime";
4
+ import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
5
5
  //#region src/components/display/tree-view.tsx
6
- function a({ items: n, defaultExpandedKeys: i = [], expandedKeys: a, onExpandedKeysChange: s, selectedKey: c, onSelect: l, className: u, ...d }) {
7
- let [f, p] = t.useState(i), m = a ?? f, h = (e) => {
8
- a === void 0 && p(e), s?.(e);
9
- }, g = (e) => {
10
- h(m.includes(e) ? m.filter((t) => t !== e) : [...m, e]);
11
- };
12
- return /* @__PURE__ */ r("div", {
6
+ function o({ items: n, defaultExpandedKeys: r = [], expandedKeys: a, onExpandedKeysChange: o, selectedKey: c, onSelect: l, checkedKeys: u, defaultCheckedKeys: f = [], onCheckedKeysChange: p, checkable: m = !1, searchQuery: h, onLoadChildren: g, className: _, ...v }) {
7
+ let [y, b] = t.useState(r), [x, S] = t.useState(f), C = a ?? y, w = u ?? x, T = h?.trim().toLowerCase(), E = t.useCallback((e) => {
8
+ a === void 0 && b(e), o?.(e);
9
+ }, [a, o]), D = (e, t) => {
10
+ let n = t ? [...new Set([...w, e])] : w.filter((t) => t !== e);
11
+ u === void 0 && S(n), p?.(n);
12
+ }, O = t.useCallback((e) => {
13
+ E(C.includes(e) ? C.filter((t) => t !== e) : [...C, e]);
14
+ }, [C, E]), k = t.useMemo(() => s(n, C, T), [
15
+ n,
16
+ C,
17
+ T
18
+ ]);
19
+ return /* @__PURE__ */ i("div", {
13
20
  "data-slot": "tree-view",
14
21
  role: "tree",
15
- className: e("grid gap-1 text-sm", u),
16
- ...d,
17
- children: n.map((e) => /* @__PURE__ */ r(o, {
22
+ className: e("grid gap-1 text-sm", _),
23
+ onKeyDown: (e) => {
24
+ let t = e.target.dataset.treeNodeKey;
25
+ if (!t) return;
26
+ let n = k.indexOf(t), r = (t) => {
27
+ if (!t) return;
28
+ let n = t.replace(/\\/g, "\\\\").replace(/"/g, "\\\"");
29
+ e.currentTarget.querySelector(`[data-tree-node-key="${n}"]`)?.focus();
30
+ };
31
+ e.key === "ArrowDown" ? (e.preventDefault(), r(k[Math.min(n + 1, k.length - 1)])) : e.key === "ArrowUp" ? (e.preventDefault(), r(k[Math.max(n - 1, 0)])) : e.key === "ArrowRight" ? (e.preventDefault(), C.includes(t) || O(t)) : e.key === "ArrowLeft" && (e.preventDefault(), C.includes(t) && O(t)), v.onKeyDown?.(e);
32
+ },
33
+ ...v,
34
+ children: n.map((e) => /* @__PURE__ */ i(d, {
18
35
  item: e,
19
36
  level: 1,
20
- expandedKeys: m,
37
+ expandedKeys: C,
21
38
  selectedKey: c,
22
- onToggle: g,
23
- onSelect: l
39
+ onToggle: O,
40
+ onSelect: l,
41
+ checkedKeys: w,
42
+ onCheckedChange: D,
43
+ checkable: m,
44
+ searchQuery: T,
45
+ onLoadChildren: g
24
46
  }, e.key))
25
47
  });
26
48
  }
27
- function o({ item: t, level: a, expandedKeys: s, selectedKey: c, onToggle: l, onSelect: u }) {
28
- let d = !!t.children?.length, f = s.includes(t.key), p = c === t.key;
29
- return /* @__PURE__ */ i("div", {
49
+ function s(e, t, n) {
50
+ return e.flatMap((e) => l(e, n) ? [e.key, ...e.children && t.includes(e.key) ? s(e.children, t, n) : []] : []);
51
+ }
52
+ function c(e) {
53
+ return e.searchText ?? (typeof e.label == "string" ? e.label : e.key);
54
+ }
55
+ function l(e, t) {
56
+ return t ? c(e).toLowerCase().includes(t) || !!e.children?.some((e) => l(e, t)) : !0;
57
+ }
58
+ function u(e, t) {
59
+ if (!t || typeof e != "string") return e;
60
+ let n = e.toLowerCase().indexOf(t);
61
+ return n < 0 ? e : /* @__PURE__ */ a(r, { children: [
62
+ e.slice(0, n),
63
+ /* @__PURE__ */ i("mark", {
64
+ className: "rounded bg-primary/15 px-0.5 text-foreground",
65
+ children: e.slice(n, n + t.length)
66
+ }),
67
+ e.slice(n + t.length)
68
+ ] });
69
+ }
70
+ function d({ item: t, level: r, expandedKeys: o, selectedKey: s, onToggle: f, onSelect: p, checkedKeys: m, onCheckedChange: h, checkable: g, searchQuery: _, onLoadChildren: v }) {
71
+ if (!l(t, _)) return null;
72
+ let y = !!t.children?.length || !!v, b = o.includes(t.key), x = s === t.key, S = m.includes(t.key);
73
+ return /* @__PURE__ */ a("div", {
30
74
  "data-slot": "tree-node",
31
75
  role: "treeitem",
32
- "aria-expanded": d ? f : void 0,
33
- "aria-selected": p || void 0,
34
- children: [/* @__PURE__ */ i("div", {
35
- className: e("flex items-center gap-1 rounded-md px-2 py-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground", p && "bg-muted text-foreground", t.disabled && "pointer-events-none opacity-50"),
36
- style: { paddingLeft: `${a * .75}rem` },
76
+ "aria-expanded": y ? b : void 0,
77
+ "aria-selected": x || void 0,
78
+ children: [/* @__PURE__ */ a("div", {
79
+ className: e("flex items-center gap-1 rounded-md px-2 py-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground", x && "bg-muted text-foreground", t.disabled && "pointer-events-none opacity-50"),
80
+ style: { paddingLeft: `${r * .75}rem` },
37
81
  children: [
38
- /* @__PURE__ */ r("button", {
82
+ /* @__PURE__ */ i("button", {
39
83
  type: "button",
40
- "aria-label": f ? "Collapse" : "Expand",
41
- className: e("flex size-5 items-center justify-center rounded-sm", !d && "invisible"),
42
- onClick: () => l(t.key),
43
- children: /* @__PURE__ */ r(n, { className: e("size-4 transition-transform", f && "rotate-90") })
84
+ "aria-label": b ? "Collapse" : "Expand",
85
+ className: e("flex size-5 items-center justify-center rounded-sm", !y && "invisible"),
86
+ onClick: () => {
87
+ !b && !t.children?.length && v?.(t), f(t.key);
88
+ },
89
+ children: /* @__PURE__ */ i(n, { className: e("size-4 transition-transform", b && "rotate-90") })
90
+ }),
91
+ g && /* @__PURE__ */ i("input", {
92
+ type: "checkbox",
93
+ className: "size-4 rounded border-border accent-primary",
94
+ checked: S,
95
+ disabled: t.disabled,
96
+ "aria-label": `Select ${c(t)}`,
97
+ onChange: (e) => h(t.key, e.currentTarget.checked)
44
98
  }),
45
99
  t.icon,
46
- /* @__PURE__ */ r("button", {
100
+ /* @__PURE__ */ i("button", {
47
101
  type: "button",
48
- className: "min-w-0 flex-1 truncate text-left",
49
- onClick: () => u?.(t),
50
- children: t.label
102
+ "data-tree-node-key": t.key,
103
+ className: "min-w-0 flex-1 truncate rounded-sm text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/40",
104
+ disabled: t.disabled,
105
+ onClick: () => p?.(t),
106
+ children: u(t.label, _)
51
107
  }),
52
- t.extra
108
+ t.loading ? /* @__PURE__ */ i("span", {
109
+ className: "text-xs text-muted-foreground",
110
+ children: "Loading..."
111
+ }) : t.extra
53
112
  ]
54
- }), d && f && /* @__PURE__ */ r("div", {
113
+ }), y && b && /* @__PURE__ */ i("div", {
55
114
  role: "group",
56
115
  className: "grid gap-1",
57
- children: t.children?.map((e) => /* @__PURE__ */ r(o, {
116
+ children: t.children?.map((e) => /* @__PURE__ */ i(d, {
58
117
  item: e,
59
- level: a + 1,
60
- expandedKeys: s,
61
- selectedKey: c,
62
- onToggle: l,
63
- onSelect: u
118
+ level: r + 1,
119
+ expandedKeys: o,
120
+ selectedKey: s,
121
+ onToggle: f,
122
+ onSelect: p,
123
+ checkedKeys: m,
124
+ onCheckedChange: h,
125
+ checkable: g,
126
+ searchQuery: _,
127
+ onLoadChildren: v
64
128
  }, e.key))
65
129
  })]
66
130
  });
67
131
  }
68
132
  //#endregion
69
- export { a as TreeView };
133
+ export { o as TreeView };
@@ -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/card/index.cjs"),r=require("./delta-badge.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");function o({title:e,value:i,change:o,trend:s,description:c,icon:l,sparkline:u,className:d,...f}){let p=()=>{if(!u||u.length<2)return null;let e=Math.min(...u),t=Math.max(...u)-e||1,n=u.map((n,r)=>`${r/(u.length-1)*100},${100-(n-e)/t*100}`).join(` `),r=s===`up`?`var(--aui-success,var(--primary))`:s===`down`?`var(--destructive)`:`var(--muted-foreground)`;return(0,a.jsx)(`div`,{className:`absolute bottom-0 left-0 right-0 h-12 overflow-hidden opacity-20 pointer-events-none`,children:(0,a.jsxs)(`svg`,{viewBox:`0 0 100 100`,preserveAspectRatio:`none`,className:`w-full h-full stroke-2`,children:[(0,a.jsx)(`polyline`,{points:n,fill:`none`,stroke:r,vectorEffect:`non-scaling-stroke`}),(0,a.jsx)(`polygon`,{points:`0,100 ${n} 100,100`,fill:`color-mix(in srgb, ${r} 20%, transparent)`})]})})};return(0,a.jsxs)(n.Card,{"data-slot":`trend-card`,className:t.cn(`relative overflow-hidden`,d),...f,children:[(0,a.jsxs)(n.CardHeader,{className:`flex flex-row items-center justify-between space-y-0 pb-2`,children:[(0,a.jsx)(n.CardTitle,{className:`text-sm font-medium text-muted-foreground`,children:e}),l&&(0,a.jsx)(`div`,{className:`text-muted-foreground`,children:l})]}),(0,a.jsxs)(n.CardContent,{children:[(0,a.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,a.jsx)(`div`,{className:`text-2xl font-bold`,children:i}),o&&(0,a.jsx)(r.DeltaBadge,{value:o,trend:s})]}),c&&(0,a.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:c})]}),p()]})}exports.TrendCard=o;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/card/index.cjs"),r=require("./delta-badge.cjs"),i=require("../charts/charts.cjs");let a=require("react");a=e.__toESM(a,1);let o=require("react/jsx-runtime");function s({title:e,value:a,change:s,trend:c,description:l,icon:u,sparkline:d,className:f,...p}){return(0,o.jsxs)(n.Card,{"data-slot":`trend-card`,className:t.cn(`relative overflow-hidden`,f),...p,children:[(0,o.jsxs)(n.CardHeader,{className:`flex flex-row items-center justify-between space-y-0 pb-2`,children:[(0,o.jsx)(n.CardTitle,{className:`text-sm font-medium text-muted-foreground`,children:e}),u&&(0,o.jsx)(`div`,{className:`text-muted-foreground`,children:u})]}),(0,o.jsxs)(n.CardContent,{children:[(0,o.jsxs)(`div`,{className:`flex items-baseline gap-2`,children:[(0,o.jsx)(`div`,{className:`text-2xl font-bold`,children:a}),s&&(0,o.jsx)(r.DeltaBadge,{value:s,trend:c})]}),l&&(0,o.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:l})]}),d&&d.length>1?(0,o.jsx)(`div`,{className:`px-6 pb-4`,children:(0,o.jsx)(i.Sparkline,{values:d,positive:c!==`down`})}):null]})}exports.TrendCard=s;
@@ -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 };