@alepha/ui 0.38.0 → 0.40.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 (1082) hide show
  1. package/README.md +6 -3
  2. package/dist/account/AccountDeleteDialog.d.ts +4 -4
  3. package/dist/account/AccountDeleteDialog.js +1 -1
  4. package/dist/account/AccountDeleteDialog.js.map +1 -1
  5. package/dist/account/AccountDialog.js.map +1 -1
  6. package/dist/account/AccountMfaDialog.d.ts +18 -0
  7. package/dist/account/AccountMfaDialog.d.ts.map +1 -1
  8. package/dist/account/AccountMfaDialog.js +99 -17
  9. package/dist/account/AccountMfaDialog.js.map +1 -1
  10. package/dist/account/AccountPasskeyProofDialog.d.ts +7 -4
  11. package/dist/account/AccountPasskeyProofDialog.d.ts.map +1 -1
  12. package/dist/account/AccountPasskeyProofDialog.js +4 -2
  13. package/dist/account/AccountPasskeyProofDialog.js.map +1 -1
  14. package/dist/account/AccountPasswordDialog.d.ts +19 -5
  15. package/dist/account/AccountPasswordDialog.d.ts.map +1 -1
  16. package/dist/account/AccountPasswordDialog.js +41 -24
  17. package/dist/account/AccountPasswordDialog.js.map +1 -1
  18. package/dist/account/AccountProfile.d.ts +1 -1
  19. package/dist/account/AccountProfile.js +1 -1
  20. package/dist/account/AccountProfile.js.map +1 -1
  21. package/dist/account/AccountProfileView.d.ts +1 -1
  22. package/dist/account/AccountProfileView.d.ts.map +1 -1
  23. package/dist/account/AccountProfileView.js +76 -11
  24. package/dist/account/AccountProfileView.js.map +1 -1
  25. package/dist/account/AccountRecoveryCodes.js.map +1 -1
  26. package/dist/account/AccountSecurityView.d.ts +1 -1
  27. package/dist/account/AccountSecurityView.d.ts.map +1 -1
  28. package/dist/account/AccountSecurityView.js +37 -2
  29. package/dist/account/AccountSecurityView.js.map +1 -1
  30. package/dist/account/AccountSessionsView.d.ts +2 -1
  31. package/dist/account/AccountSessionsView.d.ts.map +1 -1
  32. package/dist/account/AccountSessionsView.js +17 -8
  33. package/dist/account/AccountSessionsView.js.map +1 -1
  34. package/dist/account/ApiKeyCreateDialog.js.map +1 -1
  35. package/dist/admin/$pageAdmin.d.ts +1 -1
  36. package/dist/admin/$pageAdmin.js +1 -1
  37. package/dist/admin/$pageAdmin.js.map +1 -1
  38. package/dist/admin/AdminAnalytics.d.ts.map +1 -1
  39. package/dist/admin/AdminAnalytics.js +8 -6
  40. package/dist/admin/AdminAnalytics.js.map +1 -1
  41. package/dist/admin/AdminAudits.d.ts.map +1 -1
  42. package/dist/admin/AdminAudits.js +10 -17
  43. package/dist/admin/AdminAudits.js.map +1 -1
  44. package/dist/admin/AdminDashboard.d.ts +1 -1
  45. package/dist/admin/AdminDashboard.js +1 -1
  46. package/dist/admin/AdminDashboard.js.map +1 -1
  47. package/dist/admin/AdminDashboardCard.d.ts +2 -2
  48. package/dist/admin/AdminFiles.js +1 -1
  49. package/dist/admin/AdminFiles.js.map +1 -1
  50. package/dist/admin/AdminJobDetail.d.ts.map +1 -1
  51. package/dist/admin/AdminJobDetail.js +5 -0
  52. package/dist/admin/AdminJobDetail.js.map +1 -1
  53. package/dist/admin/AdminJobExecutionSheet.d.ts.map +1 -1
  54. package/dist/admin/AdminJobExecutionSheet.js +7 -0
  55. package/dist/admin/AdminJobExecutionSheet.js.map +1 -1
  56. package/dist/admin/AdminJobsStatusBadge.d.ts +1 -1
  57. package/dist/admin/AdminJobsStatusBadge.js +1 -1
  58. package/dist/admin/AdminJobsStatusBadge.js.map +1 -1
  59. package/dist/admin/AdminKeys.d.ts.map +1 -1
  60. package/dist/admin/AdminKeys.js +7 -7
  61. package/dist/admin/AdminKeys.js.map +1 -1
  62. package/dist/admin/AdminLayout.d.ts +4 -4
  63. package/dist/admin/AdminLayout.js +4 -4
  64. package/dist/admin/AdminLayout.js.map +1 -1
  65. package/dist/admin/AdminNotifications.js +1 -1
  66. package/dist/admin/AdminNotifications.js.map +1 -1
  67. package/dist/admin/AdminNotificationsStatusBadge.d.ts +1 -1
  68. package/dist/admin/AdminNotificationsStatusBadge.js +1 -1
  69. package/dist/admin/AdminNotificationsStatusBadge.js.map +1 -1
  70. package/dist/admin/AdminParameters.d.ts +2 -2
  71. package/dist/admin/AdminParameters.d.ts.map +1 -1
  72. package/dist/admin/AdminParameters.js +26 -16
  73. package/dist/admin/AdminParameters.js.map +1 -1
  74. package/dist/admin/AdminParametersEditorForm.js +2 -2
  75. package/dist/admin/AdminParametersEditorForm.js.map +1 -1
  76. package/dist/admin/AdminParametersEditorPane.d.ts.map +1 -1
  77. package/dist/admin/AdminParametersEditorPane.js +3 -4
  78. package/dist/admin/AdminParametersEditorPane.js.map +1 -1
  79. package/dist/admin/AdminParametersHistoryPane.js +1 -1
  80. package/dist/admin/AdminParametersHistoryPane.js.map +1 -1
  81. package/dist/admin/AdminParametersTreeNodeView.d.ts +4 -0
  82. package/dist/admin/AdminParametersTreeNodeView.d.ts.map +1 -1
  83. package/dist/admin/AdminParametersTreeNodeView.js +5 -3
  84. package/dist/admin/AdminParametersTreeNodeView.js.map +1 -1
  85. package/dist/admin/AdminParametersTreePane.d.ts +4 -0
  86. package/dist/admin/AdminParametersTreePane.d.ts.map +1 -1
  87. package/dist/admin/AdminParametersTreePane.js +3 -2
  88. package/dist/admin/AdminParametersTreePane.js.map +1 -1
  89. package/dist/admin/AdminPayments.js +1 -1
  90. package/dist/admin/AdminPayments.js.map +1 -1
  91. package/dist/admin/AdminPaymentsStatusBadge.d.ts +1 -1
  92. package/dist/admin/AdminPaymentsStatusBadge.js +1 -1
  93. package/dist/admin/AdminPaymentsStatusBadge.js.map +1 -1
  94. package/dist/admin/AdminRouter.d.ts +15 -15
  95. package/dist/admin/AdminRouter.js +15 -15
  96. package/dist/admin/AdminRouter.js.map +1 -1
  97. package/dist/admin/AdminRouterOptions.d.ts +9 -9
  98. package/dist/admin/AdminRouterOptions.js +2 -2
  99. package/dist/admin/AdminRouterOptions.js.map +1 -1
  100. package/dist/admin/AdminSessions.d.ts.map +1 -1
  101. package/dist/admin/AdminSessions.js +9 -14
  102. package/dist/admin/AdminSessions.js.map +1 -1
  103. package/dist/admin/AdminUserAvatarControl.js.map +1 -1
  104. package/dist/admin/AdminUserCell.d.ts +6 -6
  105. package/dist/admin/AdminUserCell.d.ts.map +1 -1
  106. package/dist/admin/AdminUserCell.js +6 -5
  107. package/dist/admin/AdminUserCell.js.map +1 -1
  108. package/dist/admin/AdminUserDetail.d.ts +1 -1
  109. package/dist/admin/AdminUserDetail.d.ts.map +1 -1
  110. package/dist/admin/AdminUserDetail.js +7 -5
  111. package/dist/admin/AdminUserDetail.js.map +1 -1
  112. package/dist/admin/AdminUserDetailAuditsTab.js +1 -1
  113. package/dist/admin/AdminUserDetailAuditsTab.js.map +1 -1
  114. package/dist/admin/AdminUserDetailIdentityAside.d.ts +2 -2
  115. package/dist/admin/AdminUserDetailIdentityAside.js +3 -3
  116. package/dist/admin/AdminUserDetailIdentityAside.js.map +1 -1
  117. package/dist/admin/AdminUserDetailOverviewTab.d.ts +1 -1
  118. package/dist/admin/AdminUserDetailOverviewTab.js.map +1 -1
  119. package/dist/admin/AdminUserDetailPasswordDialog.js +1 -1
  120. package/dist/admin/AdminUserDetailPasswordDialog.js.map +1 -1
  121. package/dist/admin/AdminUserDetailSecurityTab.d.ts +1 -1
  122. package/dist/admin/AdminUserDetailSecurityTab.js.map +1 -1
  123. package/dist/admin/AdminUserDetailSessionsTab.js +2 -2
  124. package/dist/admin/AdminUserDetailSessionsTab.js.map +1 -1
  125. package/dist/admin/AdminUsers.d.ts.map +1 -1
  126. package/dist/admin/AdminUsers.js +6 -5
  127. package/dist/admin/AdminUsers.js.map +1 -1
  128. package/dist/admin/AdminUsersRolesPicker.d.ts +1 -1
  129. package/dist/admin/AdminUsersRolesPicker.js.map +1 -1
  130. package/dist/admin/AdminWebhookDeliveryDialog.d.ts.map +1 -1
  131. package/dist/admin/AdminWebhookDeliveryDialog.js +5 -8
  132. package/dist/admin/AdminWebhookDeliveryDialog.js.map +1 -1
  133. package/dist/admin/AdminWebhookDetail.d.ts.map +1 -1
  134. package/dist/admin/AdminWebhookDetail.js +15 -0
  135. package/dist/admin/AdminWebhookDetail.js.map +1 -1
  136. package/dist/admin/AdminWebhooksCreateDialog.d.ts.map +1 -1
  137. package/dist/admin/AdminWebhooksCreateDialog.js +1 -0
  138. package/dist/admin/AdminWebhooksCreateDialog.js.map +1 -1
  139. package/dist/admin/ParameterHistoryItem.js +3 -3
  140. package/dist/admin/ParameterHistoryItem.js.map +1 -1
  141. package/dist/admin/adminUserDetailProfilePolicy.d.ts +2 -2
  142. package/dist/admin/adminUserDetailProfilePolicy.js +2 -2
  143. package/dist/admin/adminUserDetailProfilePolicy.js.map +1 -1
  144. package/dist/admin/analytics/QueryPanel.js +1 -1
  145. package/dist/admin/analytics/QueryPanel.js.map +1 -1
  146. package/dist/admin/analytics/RequestDialog.d.ts.map +1 -1
  147. package/dist/admin/analytics/RequestDialog.js +2 -3
  148. package/dist/admin/analytics/RequestDialog.js.map +1 -1
  149. package/dist/admin/analytics/ResultsTable.js +1 -1
  150. package/dist/admin/analytics/ResultsTable.js.map +1 -1
  151. package/dist/admin/analytics/ToggleChip.d.ts +5 -3
  152. package/dist/admin/analytics/ToggleChip.d.ts.map +1 -1
  153. package/dist/admin/analytics/ToggleChip.js +2 -2
  154. package/dist/admin/analytics/ToggleChip.js.map +1 -1
  155. package/dist/admin/analytics/TotalsCards.js +1 -1
  156. package/dist/admin/analytics/TotalsCards.js.map +1 -1
  157. package/dist/admin/analytics/analyticsModel.d.ts.map +1 -1
  158. package/dist/admin/analytics/analyticsModel.js +9 -4
  159. package/dist/admin/analytics/analyticsModel.js.map +1 -1
  160. package/dist/admin/analytics/analyticsTypes.d.ts +1 -1
  161. package/dist/admin/analytics/chartModel.d.ts.map +1 -1
  162. package/dist/admin/analytics/chartModel.js +4 -3
  163. package/dist/admin/analytics/chartModel.js.map +1 -1
  164. package/dist/admin/analytics/useFilterValues.js.map +1 -1
  165. package/dist/admin/diffLines.d.ts +1 -1
  166. package/dist/admin/diffLines.js +1 -1
  167. package/dist/admin/diffLines.js.map +1 -1
  168. package/dist/admin/index.d.ts +1 -1
  169. package/dist/admin/useAdminDetailTrail.d.ts +13 -0
  170. package/dist/admin/useAdminDetailTrail.d.ts.map +1 -0
  171. package/dist/admin/useAdminDetailTrail.js +31 -0
  172. package/dist/admin/useAdminDetailTrail.js.map +1 -0
  173. package/dist/admin/useJobRetentionLabels.d.ts +1 -1
  174. package/dist/admin/useJobRetentionLabels.d.ts.map +1 -1
  175. package/dist/admin/useJobRetentionLabels.js +2 -1
  176. package/dist/admin/useJobRetentionLabels.js.map +1 -1
  177. package/dist/admin/useNotificationStatusLabels.d.ts +1 -1
  178. package/dist/admin/useNotificationStatusLabels.js +1 -1
  179. package/dist/admin/useNotificationStatusLabels.js.map +1 -1
  180. package/dist/ai/AiChat.d.ts +6 -3
  181. package/dist/ai/AiChat.d.ts.map +1 -1
  182. package/dist/ai/AiChat.js +34 -5
  183. package/dist/ai/AiChat.js.map +1 -1
  184. package/dist/ai/AiChatConfirmCard.d.ts.map +1 -1
  185. package/dist/ai/AiChatConfirmCard.js +5 -1
  186. package/dist/ai/AiChatConfirmCard.js.map +1 -1
  187. package/dist/ai/AiChatFloat.d.ts +14 -0
  188. package/dist/ai/AiChatFloat.d.ts.map +1 -0
  189. package/dist/ai/AiChatFloat.js +30 -0
  190. package/dist/ai/AiChatFloat.js.map +1 -0
  191. package/dist/ai/AiChatHistory.js +1 -1
  192. package/dist/ai/AiChatHistory.js.map +1 -1
  193. package/dist/ai/AiChatMessage.js +2 -2
  194. package/dist/ai/AiChatMessage.js.map +1 -1
  195. package/dist/ai/AiChatPanel.d.ts +19 -0
  196. package/dist/ai/AiChatPanel.d.ts.map +1 -1
  197. package/dist/ai/AiChatPanel.js +65 -19
  198. package/dist/ai/AiChatPanel.js.map +1 -1
  199. package/dist/ai/AiChatToolStepDetails.d.ts +14 -0
  200. package/dist/ai/AiChatToolStepDetails.d.ts.map +1 -0
  201. package/dist/ai/AiChatToolStepDetails.js +34 -0
  202. package/dist/ai/AiChatToolStepDetails.js.map +1 -0
  203. package/dist/ai/AiChatToolTrace.d.ts +50 -0
  204. package/dist/ai/AiChatToolTrace.d.ts.map +1 -0
  205. package/dist/ai/AiChatToolTrace.js +91 -0
  206. package/dist/ai/AiChatToolTrace.js.map +1 -0
  207. package/dist/ai/AiFormRegistry.js.map +1 -1
  208. package/dist/ai/index.d.ts +4 -2
  209. package/dist/ai/index.d.ts.map +1 -1
  210. package/dist/ai/index.js +3 -1
  211. package/dist/auth/AuthLogin.d.ts +1 -1
  212. package/dist/auth/AuthLogin.d.ts.map +1 -1
  213. package/dist/auth/AuthLogin.js +12 -3
  214. package/dist/auth/AuthLogin.js.map +1 -1
  215. package/dist/auth/AuthMfaStep.d.ts +5 -0
  216. package/dist/auth/AuthMfaStep.d.ts.map +1 -1
  217. package/dist/auth/AuthMfaStep.js +43 -5
  218. package/dist/auth/AuthMfaStep.js.map +1 -1
  219. package/dist/auth/AuthRegister.d.ts +1 -1
  220. package/dist/auth/AuthRegister.js.map +1 -1
  221. package/dist/auth/AuthRegisterFormPhase.js.map +1 -1
  222. package/dist/auth/AuthResetPassword.d.ts.map +1 -1
  223. package/dist/auth/AuthResetPassword.js +47 -13
  224. package/dist/auth/AuthResetPassword.js.map +1 -1
  225. package/dist/auth/AuthRouter.d.ts +10 -70
  226. package/dist/auth/AuthRouter.d.ts.map +1 -1
  227. package/dist/auth/AuthRouter.js +10 -18
  228. package/dist/auth/AuthRouter.js.map +1 -1
  229. package/dist/auth/AuthVerifyEmailStateful.js.map +1 -1
  230. package/dist/auth/TurnstileWidget.d.ts +2 -2
  231. package/dist/auth/TurnstileWidget.js +1 -1
  232. package/dist/auth/TurnstileWidget.js.map +1 -1
  233. package/dist/command/Command.d.ts +10 -0
  234. package/dist/command/Command.d.ts.map +1 -1
  235. package/dist/command/Command.js +3 -1
  236. package/dist/command/Command.js.map +1 -1
  237. package/dist/core/Avatar.d.ts.map +1 -1
  238. package/dist/core/Avatar.js +1 -1
  239. package/dist/core/Avatar.js.map +1 -1
  240. package/dist/core/Badge.d.ts +3 -2
  241. package/dist/core/Badge.d.ts.map +1 -1
  242. package/dist/core/Badge.js +65 -7
  243. package/dist/core/Badge.js.map +1 -1
  244. package/dist/core/Button.d.ts.map +1 -1
  245. package/dist/core/Button.js +17 -1
  246. package/dist/core/Button.js.map +1 -1
  247. package/dist/core/Card.d.ts +13 -0
  248. package/dist/core/Card.d.ts.map +1 -1
  249. package/dist/core/Card.js +4 -2
  250. package/dist/core/Card.js.map +1 -1
  251. package/dist/core/Collapsible.d.ts +1 -1
  252. package/dist/core/Collapsible.js +1 -1
  253. package/dist/core/Collapsible.js.map +1 -1
  254. package/dist/core/ContextMenu.js +1 -1
  255. package/dist/core/ContextMenu.js.map +1 -1
  256. package/dist/core/Dialog.d.ts.map +1 -1
  257. package/dist/core/Dialog.js +1 -1
  258. package/dist/core/Dialog.js.map +1 -1
  259. package/dist/core/DialogHosts.js.map +1 -1
  260. package/dist/core/Drawer.d.ts.map +1 -1
  261. package/dist/core/Drawer.js +2 -1
  262. package/dist/core/Drawer.js.map +1 -1
  263. package/dist/core/DropdownMenu.js +1 -1
  264. package/dist/core/DropdownMenu.js.map +1 -1
  265. package/dist/core/FileImage.d.ts +7 -7
  266. package/dist/core/FileImage.d.ts.map +1 -1
  267. package/dist/core/FileImage.js +7 -4
  268. package/dist/core/FileImage.js.map +1 -1
  269. package/dist/core/Menubar.js +1 -1
  270. package/dist/core/Menubar.js.map +1 -1
  271. package/dist/core/PageOutline.d.ts.map +1 -1
  272. package/dist/core/PageOutline.js +35 -6
  273. package/dist/core/PageOutline.js.map +1 -1
  274. package/dist/core/PaneResizer.d.ts +57 -0
  275. package/dist/core/PaneResizer.d.ts.map +1 -0
  276. package/dist/core/PaneResizer.js +84 -0
  277. package/dist/core/PaneResizer.js.map +1 -0
  278. package/dist/core/Segmented.d.ts +9 -2
  279. package/dist/core/Segmented.d.ts.map +1 -1
  280. package/dist/core/Segmented.js +5 -3
  281. package/dist/core/Segmented.js.map +1 -1
  282. package/dist/core/Sidebar.d.ts.map +1 -1
  283. package/dist/core/Sidebar.js +3 -1
  284. package/dist/core/Sidebar.js.map +1 -1
  285. package/dist/core/Slider.d.ts.map +1 -1
  286. package/dist/core/Slider.js +2 -1
  287. package/dist/core/Slider.js.map +1 -1
  288. package/dist/core/Table.js +1 -1
  289. package/dist/core/Table.js.map +1 -1
  290. package/dist/core/Tabs.d.ts.map +1 -1
  291. package/dist/core/Tabs.js +1 -0
  292. package/dist/core/Tabs.js.map +1 -1
  293. package/dist/core/Textarea.d.ts.map +1 -1
  294. package/dist/core/Textarea.js +7 -2
  295. package/dist/core/Textarea.js.map +1 -1
  296. package/dist/core/TimeAgo.d.ts +3 -4
  297. package/dist/core/TimeAgo.d.ts.map +1 -1
  298. package/dist/core/TimeAgo.js +3 -4
  299. package/dist/core/TimeAgo.js.map +1 -1
  300. package/dist/core/index.d.ts +2 -1
  301. package/dist/core/index.d.ts.map +1 -1
  302. package/dist/core/index.js +3 -1
  303. package/dist/core/useDialog.d.ts +8 -1
  304. package/dist/core/useDialog.d.ts.map +1 -1
  305. package/dist/core/useDialog.js +36 -5
  306. package/dist/core/useDialog.js.map +1 -1
  307. package/dist/core/useToast.d.ts +17 -1
  308. package/dist/core/useToast.d.ts.map +1 -1
  309. package/dist/core/useToast.js +16 -0
  310. package/dist/core/useToast.js.map +1 -1
  311. package/dist/core/useUndoable.d.ts.map +1 -1
  312. package/dist/core/useUndoable.js +2 -1
  313. package/dist/core/useUndoable.js.map +1 -1
  314. package/dist/core/userInitials.d.ts +24 -3
  315. package/dist/core/userInitials.d.ts.map +1 -1
  316. package/dist/core/userInitials.js +21 -4
  317. package/dist/core/userInitials.js.map +1 -1
  318. package/dist/form/AutoForm.d.ts +10 -10
  319. package/dist/form/AutoForm.d.ts.map +1 -1
  320. package/dist/form/AutoForm.js +15 -3
  321. package/dist/form/AutoForm.js.map +1 -1
  322. package/dist/form/AutoFormBottomBar.js.map +1 -1
  323. package/dist/form/AutoFormErrorPopover.d.ts.map +1 -1
  324. package/dist/form/AutoFormErrorPopover.js +2 -2
  325. package/dist/form/AutoFormErrorPopover.js.map +1 -1
  326. package/dist/form/AutoFormGroupBlock.js.map +1 -1
  327. package/dist/form/AutoFormGroupGridField.js.map +1 -1
  328. package/dist/form/Control.d.ts +10 -10
  329. package/dist/form/Control.d.ts.map +1 -1
  330. package/dist/form/Control.js +7 -2
  331. package/dist/form/Control.js.map +1 -1
  332. package/dist/form/ControlArray.d.ts +1 -1
  333. package/dist/form/ControlArray.d.ts.map +1 -1
  334. package/dist/form/ControlArray.js +3 -0
  335. package/dist/form/ControlArray.js.map +1 -1
  336. package/dist/form/ControlDate.d.ts.map +1 -1
  337. package/dist/form/ControlDate.js +3 -0
  338. package/dist/form/ControlDate.js.map +1 -1
  339. package/dist/form/ControlDatePopover.d.ts.map +1 -1
  340. package/dist/form/ControlDatePopover.js +5 -2
  341. package/dist/form/ControlDatePopover.js.map +1 -1
  342. package/dist/form/ControlDateRange.d.ts +2 -2
  343. package/dist/form/ControlDateRange.d.ts.map +1 -1
  344. package/dist/form/ControlDateRange.js +7 -3
  345. package/dist/form/ControlDateRange.js.map +1 -1
  346. package/dist/form/ControlMonthPopover.d.ts +0 -4
  347. package/dist/form/ControlMonthPopover.d.ts.map +1 -1
  348. package/dist/form/ControlMonthPopover.js +0 -2
  349. package/dist/form/ControlMonthPopover.js.map +1 -1
  350. package/dist/form/ControlNumber.d.ts.map +1 -1
  351. package/dist/form/ControlNumber.js +3 -0
  352. package/dist/form/ControlNumber.js.map +1 -1
  353. package/dist/form/ControlObject.d.ts.map +1 -1
  354. package/dist/form/ControlObject.js +3 -0
  355. package/dist/form/ControlObject.js.map +1 -1
  356. package/dist/form/ControlPassword.d.ts +2 -2
  357. package/dist/form/ControlPassword.d.ts.map +1 -1
  358. package/dist/form/ControlPassword.js +5 -3
  359. package/dist/form/ControlPassword.js.map +1 -1
  360. package/dist/form/ControlSelect.d.ts +7 -6
  361. package/dist/form/ControlSelect.d.ts.map +1 -1
  362. package/dist/form/ControlSelect.js +5 -1
  363. package/dist/form/ControlSelect.js.map +1 -1
  364. package/dist/form/ControlSelectCombobox.d.ts +1 -1
  365. package/dist/form/ControlSelectCombobox.d.ts.map +1 -1
  366. package/dist/form/ControlSelectCombobox.js +1 -1
  367. package/dist/form/ControlSelectCombobox.js.map +1 -1
  368. package/dist/form/ControlUpload.d.ts +2 -2
  369. package/dist/form/ControlUpload.d.ts.map +1 -1
  370. package/dist/form/ControlUpload.js +26 -5
  371. package/dist/form/ControlUpload.js.map +1 -1
  372. package/dist/form/FormField.d.ts +3 -3
  373. package/dist/form/FormField.js.map +1 -1
  374. package/dist/form/FormFieldLayoutProvider.d.ts +1 -1
  375. package/dist/form/FormFieldLayoutProvider.js +1 -1
  376. package/dist/form/FormFieldLayoutProvider.js.map +1 -1
  377. package/dist/form/FormFieldRequiredMarkerProvider.js +1 -1
  378. package/dist/form/FormFieldRequiredMarkerProvider.js.map +1 -1
  379. package/dist/form/autoFormGroups.js.map +1 -1
  380. package/dist/form/controlSelectOptions.d.ts +1 -1
  381. package/dist/form/controlSelectOptions.d.ts.map +1 -1
  382. package/dist/form/controlSelectOptions.js +2 -2
  383. package/dist/form/controlSelectOptions.js.map +1 -1
  384. package/dist/form/grid.d.ts +1 -1
  385. package/dist/form/grid.js +1 -1
  386. package/dist/form/grid.js.map +1 -1
  387. package/dist/form/resizeImage.d.ts +3 -3
  388. package/dist/form/resizeImage.js +2 -2
  389. package/dist/form/resizeImage.js.map +1 -1
  390. package/dist/form/useFieldErrorText.d.ts +8 -0
  391. package/dist/form/useFieldErrorText.d.ts.map +1 -0
  392. package/dist/form/useFieldErrorText.js +17 -0
  393. package/dist/form/useFieldErrorText.js.map +1 -0
  394. package/dist/i18n/en/index.d.ts +22 -0
  395. package/dist/i18n/en/index.d.ts.map +1 -0
  396. package/dist/i18n/en/index.js +1 -0
  397. package/dist/i18n/en/uiEn.d.ts +37 -0
  398. package/dist/i18n/en/uiEn.d.ts.map +1 -0
  399. package/dist/i18n/en/uiEn.js +1468 -0
  400. package/dist/i18n/en/uiEn.js.map +1 -0
  401. package/dist/i18n/fr/uiFr.d.ts +3 -2
  402. package/dist/i18n/fr/uiFr.d.ts.map +1 -1
  403. package/dist/i18n/fr/uiFr.js +59 -5
  404. package/dist/i18n/fr/uiFr.js.map +1 -1
  405. package/dist/markdown/MarkdownView.css +2 -2
  406. package/dist/markdown/MarkdownView.d.ts +16 -2
  407. package/dist/markdown/MarkdownView.d.ts.map +1 -1
  408. package/dist/markdown/MarkdownView.js +20 -7
  409. package/dist/markdown/MarkdownView.js.map +1 -1
  410. package/dist/markdown/diagram/FlowchartDiagram.d.ts +3 -2
  411. package/dist/markdown/diagram/FlowchartDiagram.d.ts.map +1 -1
  412. package/dist/markdown/diagram/FlowchartDiagram.js +3 -2
  413. package/dist/markdown/diagram/FlowchartDiagram.js.map +1 -1
  414. package/dist/markdown/diagram/FlowchartDiagramEdge.d.ts +5 -3
  415. package/dist/markdown/diagram/FlowchartDiagramEdge.d.ts.map +1 -1
  416. package/dist/markdown/diagram/FlowchartDiagramEdge.js +5 -3
  417. package/dist/markdown/diagram/FlowchartDiagramEdge.js.map +1 -1
  418. package/dist/markdown/diagram/SequenceDiagram.d.ts +3 -2
  419. package/dist/markdown/diagram/SequenceDiagram.d.ts.map +1 -1
  420. package/dist/markdown/diagram/SequenceDiagram.js +3 -2
  421. package/dist/markdown/diagram/SequenceDiagram.js.map +1 -1
  422. package/dist/markdown/diagram/SequenceDiagramFragment.d.ts +1 -1
  423. package/dist/markdown/diagram/SequenceDiagramFragment.d.ts.map +1 -1
  424. package/dist/markdown/diagram/SequenceDiagramFragment.js +1 -0
  425. package/dist/markdown/diagram/SequenceDiagramFragment.js.map +1 -1
  426. package/dist/markdown/diagram/SequenceDiagramParticipantActor.d.ts.map +1 -1
  427. package/dist/markdown/diagram/SequenceDiagramParticipantActor.js +2 -6
  428. package/dist/markdown/diagram/SequenceDiagramParticipantActor.js.map +1 -1
  429. package/dist/markdown/diagram/flowchartParser.js +16 -18
  430. package/dist/markdown/diagram/flowchartParser.js.map +1 -1
  431. package/dist/markdown/diagram/layoutSequence.d.ts +10 -0
  432. package/dist/markdown/diagram/layoutSequence.d.ts.map +1 -1
  433. package/dist/markdown/diagram/layoutSequence.js +50 -21
  434. package/dist/markdown/diagram/layoutSequence.js.map +1 -1
  435. package/dist/markdown/diagram/sequenceModel.d.ts +9 -12
  436. package/dist/markdown/diagram/sequenceModel.d.ts.map +1 -1
  437. package/dist/markdown/diagram/sequenceParser.js +14 -5
  438. package/dist/markdown/diagram/sequenceParser.js.map +1 -1
  439. package/dist/markdown/diagram/textMetrics.d.ts.map +1 -1
  440. package/dist/markdown/diagram/textMetrics.js +4 -4
  441. package/dist/markdown/diagram/textMetrics.js.map +1 -1
  442. package/dist/markdown/highlightLines.d.ts +27 -0
  443. package/dist/markdown/highlightLines.d.ts.map +1 -0
  444. package/dist/markdown/highlightLines.js +91 -0
  445. package/dist/markdown/highlightLines.js.map +1 -0
  446. package/dist/markdown/index.d.ts +5 -2
  447. package/dist/markdown/index.d.ts.map +1 -1
  448. package/dist/markdown/index.js +2 -1
  449. package/dist/markdown/rehypeHighlight.d.ts +6 -5
  450. package/dist/markdown/rehypeHighlight.d.ts.map +1 -1
  451. package/dist/markdown/rehypeHighlight.js +6 -5
  452. package/dist/markdown/rehypeHighlight.js.map +1 -1
  453. package/dist/markdown/remarkSpoiler.js +2 -2
  454. package/dist/markdown/remarkSpoiler.js.map +1 -1
  455. package/dist/organizations/OrganizationInviteDialog.d.ts.map +1 -1
  456. package/dist/organizations/OrganizationInviteDialog.js +2 -1
  457. package/dist/organizations/OrganizationInviteDialog.js.map +1 -1
  458. package/dist/organizations/OrganizationMemberIdentity.d.ts +6 -0
  459. package/dist/organizations/OrganizationMemberIdentity.d.ts.map +1 -1
  460. package/dist/organizations/OrganizationMemberIdentity.js +3 -2
  461. package/dist/organizations/OrganizationMemberIdentity.js.map +1 -1
  462. package/dist/organizations/OrganizationMemberRankPicker.d.ts.map +1 -1
  463. package/dist/organizations/OrganizationMemberRankPicker.js +2 -1
  464. package/dist/organizations/OrganizationMemberRankPicker.js.map +1 -1
  465. package/dist/organizations/OrganizationMembers.d.ts.map +1 -1
  466. package/dist/organizations/OrganizationMembers.js +3 -1
  467. package/dist/organizations/OrganizationMembers.js.map +1 -1
  468. package/dist/organizations/OrganizationRankColumnHeader.d.ts +9 -0
  469. package/dist/organizations/OrganizationRankColumnHeader.d.ts.map +1 -1
  470. package/dist/organizations/OrganizationRankColumnHeader.js +55 -26
  471. package/dist/organizations/OrganizationRankColumnHeader.js.map +1 -1
  472. package/dist/organizations/OrganizationRanks.d.ts.map +1 -1
  473. package/dist/organizations/OrganizationRanks.js +62 -7
  474. package/dist/organizations/OrganizationRanks.js.map +1 -1
  475. package/dist/organizations/rankOrder.d.ts +21 -0
  476. package/dist/organizations/rankOrder.d.ts.map +1 -0
  477. package/dist/organizations/rankOrder.js +20 -0
  478. package/dist/organizations/rankOrder.js.map +1 -0
  479. package/dist/settings/SettingsDangerSection.d.ts +3 -3
  480. package/dist/settings/SettingsDangerSection.d.ts.map +1 -1
  481. package/dist/settings/SettingsDangerSection.js +5 -3
  482. package/dist/settings/SettingsDangerSection.js.map +1 -1
  483. package/dist/settings/SettingsDialog.js +2 -2
  484. package/dist/settings/SettingsDialog.js.map +1 -1
  485. package/dist/settings/SettingsDialogs.js.map +1 -1
  486. package/dist/settings/SettingsHeading.d.ts +4 -4
  487. package/dist/settings/SettingsHeading.js +3 -3
  488. package/dist/settings/SettingsHeading.js.map +1 -1
  489. package/dist/settings/SettingsRow.d.ts +4 -4
  490. package/dist/settings/SettingsRow.js +1 -1
  491. package/dist/settings/SettingsRow.js.map +1 -1
  492. package/dist/settings/SettingsSection.d.ts +3 -3
  493. package/dist/settings/SettingsSection.js +2 -2
  494. package/dist/settings/SettingsSection.js.map +1 -1
  495. package/dist/shell/ActionErrorToaster.d.ts +1 -1
  496. package/dist/shell/ActionErrorToaster.js +1 -1
  497. package/dist/shell/ActionErrorToaster.js.map +1 -1
  498. package/dist/shell/AppActions.d.ts +5 -5
  499. package/dist/shell/AppActions.d.ts.map +1 -1
  500. package/dist/shell/AppActions.js +3 -3
  501. package/dist/shell/AppActions.js.map +1 -1
  502. package/dist/shell/AppShell.d.ts +1 -1
  503. package/dist/shell/AppShell.js.map +1 -1
  504. package/dist/shell/AppShellNavDropdownItems.d.ts +2 -2
  505. package/dist/shell/AppShellNavDropdownItems.js +2 -2
  506. package/dist/shell/AppShellNavDropdownItems.js.map +1 -1
  507. package/dist/shell/AppShellSidebarNavItem.js.map +1 -1
  508. package/dist/shell/ButtonInbox.d.ts +8 -0
  509. package/dist/shell/ButtonInbox.d.ts.map +1 -1
  510. package/dist/shell/ButtonInbox.js +18 -14
  511. package/dist/shell/ButtonInbox.js.map +1 -1
  512. package/dist/shell/ButtonLanguage.d.ts +1 -1
  513. package/dist/shell/ButtonLanguage.js +1 -1
  514. package/dist/shell/ButtonLanguage.js.map +1 -1
  515. package/dist/shell/ButtonSettingsLanguageMenu.js.map +1 -1
  516. package/dist/shell/ButtonUser.d.ts +1 -1
  517. package/dist/shell/ButtonUser.js.map +1 -1
  518. package/dist/shell/ButtonUserAdminMenuItem.d.ts +1 -1
  519. package/dist/shell/ButtonUserAdminMenuItem.js.map +1 -1
  520. package/dist/shell/DetailAside.d.ts +10 -4
  521. package/dist/shell/DetailAside.d.ts.map +1 -1
  522. package/dist/shell/DetailAside.js +46 -39
  523. package/dist/shell/DetailAside.js.map +1 -1
  524. package/dist/shell/DetailLayout.d.ts +7 -7
  525. package/dist/shell/DetailLayout.js +4 -4
  526. package/dist/shell/DetailLayout.js.map +1 -1
  527. package/dist/shell/NavShell.d.ts +3 -3
  528. package/dist/shell/NavShell.js +2 -2
  529. package/dist/shell/NavShell.js.map +1 -1
  530. package/dist/shell/NavigationProgress.d.ts +0 -1
  531. package/dist/shell/NavigationProgress.d.ts.map +1 -1
  532. package/dist/shell/NavigationProgress.js +8 -2
  533. package/dist/shell/NavigationProgress.js.map +1 -1
  534. package/dist/shell/PlateFolderTabs.d.ts.map +1 -1
  535. package/dist/shell/PlateFolderTabs.js +1 -1
  536. package/dist/shell/PlateFolderTabs.js.map +1 -1
  537. package/dist/shell/PlateLayout.d.ts +7 -11
  538. package/dist/shell/PlateLayout.d.ts.map +1 -1
  539. package/dist/shell/PlateLayout.js +48 -23
  540. package/dist/shell/PlateLayout.js.map +1 -1
  541. package/dist/shell/Spotlight.d.ts +1 -1
  542. package/dist/shell/Spotlight.js.map +1 -1
  543. package/dist/shell/appShellNav.d.ts +3 -3
  544. package/dist/shell/appShellNav.js +2 -2
  545. package/dist/shell/appShellNav.js.map +1 -1
  546. package/dist/shell/navTreeUtil.d.ts +5 -5
  547. package/dist/shell/navTreeUtil.js +4 -4
  548. package/dist/shell/navTreeUtil.js.map +1 -1
  549. package/dist/shell/useDetailTab.d.ts +5 -4
  550. package/dist/shell/useDetailTab.d.ts.map +1 -1
  551. package/dist/shell/useDetailTab.js +6 -5
  552. package/dist/shell/useDetailTab.js.map +1 -1
  553. package/dist/shell/useNavBreadcrumbs.d.ts +1 -1
  554. package/dist/shell/useNavBreadcrumbs.d.ts.map +1 -1
  555. package/dist/shell/useNavBreadcrumbs.js +2 -2
  556. package/dist/shell/useNavBreadcrumbs.js.map +1 -1
  557. package/dist/shell/useNavEntries.d.ts +5 -5
  558. package/dist/shell/useNavEntries.d.ts.map +1 -1
  559. package/dist/shell/useNavEntries.js.map +1 -1
  560. package/dist/shell/useNavTree.d.ts +1 -1
  561. package/dist/shell/useNavTree.js.map +1 -1
  562. package/dist/sortable/index.d.ts +17 -0
  563. package/dist/sortable/index.d.ts.map +1 -0
  564. package/dist/sortable/index.js +4 -0
  565. package/dist/sortable/useSortableItem.d.ts +32 -0
  566. package/dist/sortable/useSortableItem.d.ts.map +1 -0
  567. package/dist/sortable/useSortableItem.js +35 -0
  568. package/dist/sortable/useSortableItem.js.map +1 -0
  569. package/dist/sortable/useSortableList.d.ts +85 -0
  570. package/dist/sortable/useSortableList.d.ts.map +1 -0
  571. package/dist/sortable/useSortableList.js +125 -0
  572. package/dist/sortable/useSortableList.js.map +1 -0
  573. package/dist/styles.css +34 -14
  574. package/dist/swagger/OpenApiSpec.d.ts +5 -0
  575. package/dist/swagger/OpenApiSpec.d.ts.map +1 -1
  576. package/dist/swagger/OpenApiSpec.js +14 -1
  577. package/dist/swagger/OpenApiSpec.js.map +1 -1
  578. package/dist/swagger/SwaggerExplorer.d.ts.map +1 -1
  579. package/dist/swagger/SwaggerExplorer.js +4 -1
  580. package/dist/swagger/SwaggerExplorer.js.map +1 -1
  581. package/dist/swagger/SwaggerNav.js +1 -1
  582. package/dist/swagger/SwaggerNav.js.map +1 -1
  583. package/dist/swagger/SwaggerRequestBuilder.d.ts +4 -2
  584. package/dist/swagger/SwaggerRequestBuilder.d.ts.map +1 -1
  585. package/dist/swagger/SwaggerRequestBuilder.js +10 -7
  586. package/dist/swagger/SwaggerRequestBuilder.js.map +1 -1
  587. package/dist/swagger/SwaggerSchemaView.d.ts +3 -2
  588. package/dist/swagger/SwaggerSchemaView.d.ts.map +1 -1
  589. package/dist/swagger/SwaggerSchemaView.js +11 -16
  590. package/dist/swagger/SwaggerSchemaView.js.map +1 -1
  591. package/dist/swagger/SwaggerSchemaViewField.d.ts +18 -0
  592. package/dist/swagger/SwaggerSchemaViewField.d.ts.map +1 -0
  593. package/dist/swagger/SwaggerSchemaViewField.js +28 -0
  594. package/dist/swagger/SwaggerSchemaViewField.js.map +1 -0
  595. package/dist/swagger/SwaggerTryIt.d.ts.map +1 -1
  596. package/dist/swagger/SwaggerTryIt.js +1 -1
  597. package/dist/swagger/SwaggerTryIt.js.map +1 -1
  598. package/dist/swagger/SwaggerTryItForm.d.ts +6 -1
  599. package/dist/swagger/SwaggerTryItForm.d.ts.map +1 -1
  600. package/dist/swagger/SwaggerTryItForm.js +14 -8
  601. package/dist/swagger/SwaggerTryItForm.js.map +1 -1
  602. package/dist/table/DataTable.d.ts.map +1 -1
  603. package/dist/table/DataTable.js +107 -19
  604. package/dist/table/DataTable.js.map +1 -1
  605. package/dist/table/DataTableBody.d.ts +19 -1
  606. package/dist/table/DataTableBody.d.ts.map +1 -1
  607. package/dist/table/DataTableBody.js +90 -46
  608. package/dist/table/DataTableBody.js.map +1 -1
  609. package/dist/table/DataTableFilterDialog.d.ts +5 -5
  610. package/dist/table/DataTableFilterDialog.js +4 -4
  611. package/dist/table/DataTableFilterDialog.js.map +1 -1
  612. package/dist/table/DataTableFooter.js +1 -1
  613. package/dist/table/DataTableFooter.js.map +1 -1
  614. package/dist/table/DataTableGroupRow.d.ts +25 -0
  615. package/dist/table/DataTableGroupRow.d.ts.map +1 -0
  616. package/dist/table/DataTableGroupRow.js +43 -0
  617. package/dist/table/DataTableGroupRow.js.map +1 -0
  618. package/dist/table/DataTableHeaderPopupList.d.ts.map +1 -1
  619. package/dist/table/DataTableHeaderPopupList.js +1 -0
  620. package/dist/table/DataTableHeaderPopupList.js.map +1 -1
  621. package/dist/table/DataTableHeaderRow.js.map +1 -1
  622. package/dist/table/DataTablePresetRail.d.ts +6 -1
  623. package/dist/table/DataTablePresetRail.d.ts.map +1 -1
  624. package/dist/table/DataTablePresetRail.js +4 -2
  625. package/dist/table/DataTablePresetRail.js.map +1 -1
  626. package/dist/table/DataTablePresetRailButton.js +1 -1
  627. package/dist/table/DataTablePresetRailButton.js.map +1 -1
  628. package/dist/table/DataTableRowActionGroupItem.d.ts +23 -0
  629. package/dist/table/DataTableRowActionGroupItem.d.ts.map +1 -0
  630. package/dist/table/DataTableRowActionGroupItem.js +38 -0
  631. package/dist/table/DataTableRowActionGroupItem.js.map +1 -0
  632. package/dist/table/DataTableRowActionItem.d.ts.map +1 -1
  633. package/dist/table/DataTableRowActionItem.js +15 -2
  634. package/dist/table/DataTableRowActionItem.js.map +1 -1
  635. package/dist/table/DataTableRowActionsInline.d.ts.map +1 -1
  636. package/dist/table/DataTableRowActionsInline.js +2 -1
  637. package/dist/table/DataTableRowActionsInline.js.map +1 -1
  638. package/dist/table/DataTableRowActionsMenu.d.ts +3 -2
  639. package/dist/table/DataTableRowActionsMenu.d.ts.map +1 -1
  640. package/dist/table/DataTableRowActionsMenu.js +12 -14
  641. package/dist/table/DataTableRowActionsMenu.js.map +1 -1
  642. package/dist/table/DataTableSummaryCard.d.ts +13 -0
  643. package/dist/table/DataTableSummaryCard.d.ts.map +1 -1
  644. package/dist/table/DataTableSummaryCard.js +24 -2
  645. package/dist/table/DataTableSummaryCard.js.map +1 -1
  646. package/dist/table/DataTableSummaryPanel.d.ts +8 -0
  647. package/dist/table/DataTableSummaryPanel.d.ts.map +1 -1
  648. package/dist/table/DataTableSummaryPanel.js +6 -2
  649. package/dist/table/DataTableSummaryPanel.js.map +1 -1
  650. package/dist/table/DataTableToolbar.js.map +1 -1
  651. package/dist/table/PermissionMatrix.d.ts +6 -0
  652. package/dist/table/PermissionMatrix.d.ts.map +1 -1
  653. package/dist/table/PermissionMatrix.js.map +1 -1
  654. package/dist/table/PermissionMatrixGroupRows.d.ts.map +1 -1
  655. package/dist/table/PermissionMatrixGroupRows.js +9 -4
  656. package/dist/table/PermissionMatrixGroupRows.js.map +1 -1
  657. package/dist/table/dataTableBaseProps.d.ts +75 -12
  658. package/dist/table/dataTableBaseProps.d.ts.map +1 -1
  659. package/dist/table/dataTableFilterFields.d.ts +5 -0
  660. package/dist/table/dataTableFilterFields.d.ts.map +1 -1
  661. package/dist/table/dataTableFilterFields.js +15 -1
  662. package/dist/table/dataTableFilterFields.js.map +1 -1
  663. package/dist/table/dataTablePersistence.d.ts +53 -11
  664. package/dist/table/dataTablePersistence.d.ts.map +1 -1
  665. package/dist/table/dataTablePersistence.js +66 -29
  666. package/dist/table/dataTablePersistence.js.map +1 -1
  667. package/dist/table/dataTableTypes.d.ts +96 -11
  668. package/dist/table/dataTableTypes.d.ts.map +1 -1
  669. package/dist/table/index.d.ts +10 -3
  670. package/dist/table/index.d.ts.map +1 -1
  671. package/dist/table/index.js +2 -1
  672. package/dist/table/paginateLocal.d.ts +32 -3
  673. package/dist/table/paginateLocal.d.ts.map +1 -1
  674. package/dist/table/paginateLocal.js +47 -3
  675. package/dist/table/paginateLocal.js.map +1 -1
  676. package/dist/table/useDataTableColumns.d.ts.map +1 -1
  677. package/dist/table/useDataTableColumns.js +4 -4
  678. package/dist/table/useDataTableColumns.js.map +1 -1
  679. package/dist/table/useDataTableData.d.ts +1 -0
  680. package/dist/table/useDataTableData.d.ts.map +1 -1
  681. package/dist/table/useDataTableData.js +43 -24
  682. package/dist/table/useDataTableData.js.map +1 -1
  683. package/dist/table/useDataTableFilterForm.d.ts +4 -0
  684. package/dist/table/useDataTableFilterForm.d.ts.map +1 -1
  685. package/dist/table/useDataTableFilterForm.js +9 -4
  686. package/dist/table/useDataTableFilterForm.js.map +1 -1
  687. package/dist/table/useDataTableFilterModel.d.ts.map +1 -1
  688. package/dist/table/useDataTableFilterModel.js +2 -4
  689. package/dist/table/useDataTableFilterModel.js.map +1 -1
  690. package/dist/table/useDataTableFilterVisibility.d.ts +5 -0
  691. package/dist/table/useDataTableFilterVisibility.d.ts.map +1 -1
  692. package/dist/table/useDataTableFilterVisibility.js +16 -8
  693. package/dist/table/useDataTableFilterVisibility.js.map +1 -1
  694. package/dist/table/useDataTableRefresh.d.ts.map +1 -1
  695. package/dist/table/useDataTableRefresh.js +3 -2
  696. package/dist/table/useDataTableRefresh.js.map +1 -1
  697. package/dist/table/useDataTableSummary.d.ts +5 -0
  698. package/dist/table/useDataTableSummary.d.ts.map +1 -1
  699. package/dist/table/useDataTableSummary.js +6 -6
  700. package/dist/table/useDataTableSummary.js.map +1 -1
  701. package/dist/table/useDataTableWake.d.ts +43 -0
  702. package/dist/table/useDataTableWake.d.ts.map +1 -0
  703. package/dist/table/useDataTableWake.js +40 -0
  704. package/dist/table/useDataTableWake.js.map +1 -0
  705. package/dist/table/useTableSelection.d.ts +1 -1
  706. package/dist/table/useTableSelection.js.map +1 -1
  707. package/dist/tree/TreeView.d.ts +8 -8
  708. package/dist/tree/TreeView.d.ts.map +1 -1
  709. package/dist/tree/TreeView.js +63 -6
  710. package/dist/tree/TreeView.js.map +1 -1
  711. package/dist/tree/TreeViewRow.d.ts +15 -24
  712. package/dist/tree/TreeViewRow.d.ts.map +1 -1
  713. package/dist/tree/TreeViewRow.js +45 -18
  714. package/dist/tree/TreeViewRow.js.map +1 -1
  715. package/dist/tree/index.d.ts +3 -4
  716. package/dist/tree/index.d.ts.map +1 -1
  717. package/dist/tree/index.js +2 -3
  718. package/dist/tree/treeModel.d.ts +19 -0
  719. package/dist/tree/treeModel.d.ts.map +1 -1
  720. package/dist/tree/treeModel.js +23 -2
  721. package/dist/tree/treeModel.js.map +1 -1
  722. package/docs/packages-alepha-ui-account.md +1 -0
  723. package/docs/packages-alepha-ui-admin.md +1 -1
  724. package/docs/packages-alepha-ui-ai.md +3 -3
  725. package/docs/packages-alepha-ui-calendar.md +1 -0
  726. package/docs/packages-alepha-ui-chart.md +1 -0
  727. package/docs/packages-alepha-ui-command.md +1 -0
  728. package/docs/packages-alepha-ui-core.md +1 -0
  729. package/docs/packages-alepha-ui-form.md +1 -0
  730. package/docs/packages-alepha-ui-i18n-en.md +35 -0
  731. package/docs/packages-alepha-ui-i18n-fr.md +1 -0
  732. package/docs/packages-alepha-ui-markdown.md +4 -1
  733. package/docs/packages-alepha-ui-organizations.md +1 -0
  734. package/docs/packages-alepha-ui-otp.md +1 -0
  735. package/docs/packages-alepha-ui-overview.md +5 -3
  736. package/docs/packages-alepha-ui-resizable.md +1 -0
  737. package/docs/packages-alepha-ui-sortable.md +34 -0
  738. package/docs/packages-alepha-ui-table.md +7 -1
  739. package/docs/packages-alepha-ui-tree.md +2 -2
  740. package/package.json +22 -4
  741. package/src/account/AccountDeleteDialog.tsx +4 -4
  742. package/src/account/AccountMfaDialog.tsx +155 -20
  743. package/src/account/AccountPasskeyProofDialog.tsx +7 -4
  744. package/src/account/AccountPasswordDialog.tsx +50 -11
  745. package/src/account/AccountProfile.tsx +1 -1
  746. package/src/account/AccountProfileView.tsx +125 -31
  747. package/src/account/AccountSecurityView.tsx +56 -3
  748. package/src/account/AccountSessionsView.tsx +33 -7
  749. package/src/account/__tests__/AccountProfile.browser.spec.tsx +122 -14
  750. package/src/account/__tests__/AccountProof.browser.spec.tsx +465 -0
  751. package/src/account/__tests__/AccountSessions.browser.spec.tsx +18 -3
  752. package/src/admin/$pageAdmin.tsx +1 -1
  753. package/src/admin/AdminAnalytics.tsx +19 -6
  754. package/src/admin/AdminAudits.tsx +22 -24
  755. package/src/admin/AdminDashboard.tsx +1 -1
  756. package/src/admin/AdminDashboardCard.tsx +2 -2
  757. package/src/admin/AdminFiles.tsx +1 -1
  758. package/src/admin/AdminJobDetail.tsx +7 -0
  759. package/src/admin/AdminJobExecutionSheet.tsx +9 -0
  760. package/src/admin/AdminJobsStatusBadge.tsx +1 -1
  761. package/src/admin/AdminKeys.tsx +19 -10
  762. package/src/admin/AdminLayout.tsx +4 -4
  763. package/src/admin/AdminNotifications.tsx +1 -1
  764. package/src/admin/AdminNotificationsStatusBadge.tsx +1 -1
  765. package/src/admin/AdminParameters.tsx +42 -28
  766. package/src/admin/AdminParametersEditorForm.tsx +2 -2
  767. package/src/admin/AdminParametersEditorPane.tsx +6 -5
  768. package/src/admin/AdminParametersHistoryPane.tsx +1 -1
  769. package/src/admin/AdminParametersTreeNodeView.tsx +9 -3
  770. package/src/admin/AdminParametersTreePane.tsx +7 -2
  771. package/src/admin/AdminPayments.tsx +1 -1
  772. package/src/admin/AdminPaymentsStatusBadge.tsx +1 -1
  773. package/src/admin/AdminRouter.tsx +15 -15
  774. package/src/admin/AdminRouterOptions.tsx +9 -9
  775. package/src/admin/AdminSessions.tsx +17 -19
  776. package/src/admin/AdminUserCell.tsx +9 -10
  777. package/src/admin/AdminUserDetail.tsx +24 -29
  778. package/src/admin/AdminUserDetailAuditsTab.tsx +2 -2
  779. package/src/admin/AdminUserDetailIdentityAside.tsx +3 -3
  780. package/src/admin/AdminUserDetailOverviewTab.tsx +1 -1
  781. package/src/admin/AdminUserDetailPasswordDialog.tsx +1 -1
  782. package/src/admin/AdminUserDetailSecurityTab.tsx +1 -1
  783. package/src/admin/AdminUserDetailSessionsTab.tsx +2 -2
  784. package/src/admin/AdminUsers.tsx +6 -7
  785. package/src/admin/AdminUsersRolesPicker.tsx +2 -2
  786. package/src/admin/AdminWebhookDeliveryDialog.tsx +0 -1
  787. package/src/admin/AdminWebhookDetail.tsx +22 -0
  788. package/src/admin/AdminWebhooksCreateDialog.tsx +3 -0
  789. package/src/admin/ParameterHistoryItem.tsx +3 -3
  790. package/src/admin/__tests__/$pageAdmin.spec.ts +3 -3
  791. package/src/admin/__tests__/AdminAnalytics.browser.spec.tsx +66 -0
  792. package/src/admin/__tests__/AdminFacetReads.browser.spec.tsx +107 -0
  793. package/src/admin/__tests__/AdminKeysCreate.browser.spec.tsx +134 -0
  794. package/src/admin/__tests__/AdminKeysTokenDialog.browser.spec.tsx +13 -2
  795. package/src/admin/__tests__/AdminLayout.browser.spec.tsx +3 -3
  796. package/src/admin/__tests__/AdminParametersEditorPane.browser.spec.tsx +102 -0
  797. package/src/admin/__tests__/AdminParametersOrphanDelete.browser.spec.tsx +136 -0
  798. package/src/admin/__tests__/AdminRouter.spec.ts +14 -8
  799. package/src/admin/__tests__/AdminUserCell.browser.spec.tsx +27 -12
  800. package/src/admin/__tests__/AdminUserDetail.browser.spec.tsx +147 -0
  801. package/src/admin/__tests__/AdminWebhooks.browser.spec.tsx +12 -0
  802. package/src/admin/__tests__/AnalyticsRequestDialog.browser.spec.tsx +92 -0
  803. package/src/admin/__tests__/AnalyticsToggleChip.browser.spec.tsx +37 -0
  804. package/src/admin/__tests__/useAdminDetailTrail.browser.spec.tsx +71 -0
  805. package/src/admin/__tests__/useJobRetentionLabels.browser.spec.tsx +51 -0
  806. package/src/admin/adminUserDetailProfilePolicy.spec.ts +1 -1
  807. package/src/admin/adminUserDetailProfilePolicy.ts +5 -5
  808. package/src/admin/analytics/QueryPanel.tsx +1 -1
  809. package/src/admin/analytics/RequestDialog.tsx +7 -3
  810. package/src/admin/analytics/ResultsTable.tsx +1 -1
  811. package/src/admin/analytics/ToggleChip.tsx +7 -5
  812. package/src/admin/analytics/TotalsCards.tsx +1 -1
  813. package/src/admin/analytics/analyticsModel.spec.ts +41 -0
  814. package/src/admin/analytics/analyticsModel.ts +11 -4
  815. package/src/admin/analytics/analyticsTypes.ts +1 -1
  816. package/src/admin/analytics/chartModel.spec.ts +39 -0
  817. package/src/admin/analytics/chartModel.ts +24 -20
  818. package/src/admin/diffLines.ts +1 -1
  819. package/src/admin/index.ts +1 -1
  820. package/src/admin/useAdminDetailTrail.ts +39 -0
  821. package/src/admin/useJobRetentionLabels.ts +6 -1
  822. package/src/admin/useNotificationStatusLabels.ts +1 -1
  823. package/src/ai/AiChat.tsx +44 -6
  824. package/src/ai/AiChatConfirmCard.tsx +7 -1
  825. package/src/ai/AiChatFloat.tsx +46 -0
  826. package/src/ai/AiChatHistory.tsx +2 -2
  827. package/src/ai/AiChatMessage.tsx +2 -2
  828. package/src/ai/AiChatPanel.tsx +154 -47
  829. package/src/ai/AiChatToolStepDetails.tsx +42 -0
  830. package/src/ai/AiChatToolTrace.tsx +167 -0
  831. package/src/ai/__tests__/AiChat.browser.spec.tsx +270 -2
  832. package/src/ai/index.ts +4 -2
  833. package/src/auth/AuthLogin.tsx +50 -9
  834. package/src/auth/AuthMfaStep.tsx +99 -33
  835. package/src/auth/AuthRegister.tsx +5 -5
  836. package/src/auth/AuthRegisterFormPhase.tsx +1 -1
  837. package/src/auth/AuthResetPassword.tsx +52 -11
  838. package/src/auth/AuthRouter.tsx +10 -18
  839. package/src/auth/TurnstileWidget.tsx +4 -4
  840. package/src/auth/__tests__/AuthMfaStep.browser.spec.tsx +115 -0
  841. package/src/auth/__tests__/AuthPasskey.browser.spec.tsx +48 -3
  842. package/src/auth/__tests__/AuthPasswordForms.browser.spec.tsx +250 -0
  843. package/src/auth/__tests__/AuthRouter.spec.ts +0 -13
  844. package/src/command/Command.tsx +17 -2
  845. package/src/command/__tests__/Command.browser.spec.tsx +45 -1
  846. package/src/core/Avatar.tsx +6 -1
  847. package/src/core/Badge.tsx +66 -7
  848. package/src/core/Button.tsx +26 -1
  849. package/src/core/Card.tsx +25 -1
  850. package/src/core/Collapsible.tsx +1 -1
  851. package/src/core/ContextMenu.tsx +1 -1
  852. package/src/core/Dialog.tsx +6 -2
  853. package/src/core/Drawer.tsx +2 -1
  854. package/src/core/DropdownMenu.tsx +1 -1
  855. package/src/core/FileImage.tsx +12 -9
  856. package/src/core/Menubar.tsx +1 -1
  857. package/src/core/PageOutline.tsx +43 -4
  858. package/src/core/PaneResizer.tsx +128 -0
  859. package/src/core/Segmented.tsx +32 -10
  860. package/src/core/Sidebar.tsx +4 -1
  861. package/src/core/Slider.tsx +6 -4
  862. package/src/core/Table.tsx +1 -1
  863. package/src/core/Tabs.tsx +1 -0
  864. package/src/core/Textarea.tsx +14 -2
  865. package/src/core/TimeAgo.tsx +3 -4
  866. package/src/core/__tests__/Button.browser.spec.tsx +57 -0
  867. package/src/core/__tests__/CoreA11y.browser.spec.tsx +4 -0
  868. package/src/core/__tests__/FileImage.browser.spec.tsx +23 -0
  869. package/src/core/__tests__/PageOutline.browser.spec.tsx +36 -12
  870. package/src/core/__tests__/PaneResizer.browser.spec.tsx +104 -0
  871. package/src/core/__tests__/Segmented.browser.spec.tsx +29 -0
  872. package/src/core/__tests__/SidebarShortcut.browser.spec.tsx +35 -0
  873. package/src/core/__tests__/Tabs.browser.spec.tsx +23 -0
  874. package/src/core/__tests__/Textarea.browser.spec.tsx +41 -0
  875. package/src/core/__tests__/UserAvatar.browser.spec.tsx +1 -2
  876. package/src/core/__tests__/primitiveSlots.spec.ts +1 -0
  877. package/src/core/__tests__/useDialogConfirm.browser.spec.tsx +89 -0
  878. package/src/core/__tests__/useToast.browser.spec.tsx +1 -1
  879. package/src/core/__tests__/useUndoable.browser.spec.tsx +43 -0
  880. package/src/core/__tests__/userInitials.spec.ts +44 -0
  881. package/src/core/index.ts +12 -1
  882. package/src/core/useDialog.tsx +52 -4
  883. package/src/core/useToast.tsx +19 -19
  884. package/src/core/useUndoable.tsx +6 -2
  885. package/src/core/userInitials.ts +45 -6
  886. package/src/form/AutoForm.tsx +39 -15
  887. package/src/form/AutoFormBottomBar.tsx +2 -2
  888. package/src/form/AutoFormErrorPopover.tsx +7 -3
  889. package/src/form/AutoFormGroupBlock.tsx +1 -1
  890. package/src/form/AutoFormGroupGridField.tsx +1 -1
  891. package/src/form/Control.tsx +18 -13
  892. package/src/form/ControlArray.tsx +7 -4
  893. package/src/form/ControlDate.tsx +3 -0
  894. package/src/form/ControlDatePopover.tsx +6 -2
  895. package/src/form/ControlDateRange.tsx +10 -4
  896. package/src/form/ControlMonthPopover.tsx +0 -8
  897. package/src/form/ControlNumber.tsx +3 -0
  898. package/src/form/ControlObject.tsx +3 -0
  899. package/src/form/ControlPassword.tsx +9 -3
  900. package/src/form/ControlSelect.tsx +17 -10
  901. package/src/form/ControlSelectCombobox.tsx +9 -6
  902. package/src/form/ControlUpload.tsx +49 -10
  903. package/src/form/FormField.tsx +4 -4
  904. package/src/form/FormFieldLayoutProvider.tsx +1 -1
  905. package/src/form/FormFieldRequiredMarkerProvider.tsx +1 -1
  906. package/src/form/__tests__/AutoFormAutoSave.browser.spec.tsx +87 -0
  907. package/src/form/__tests__/AutoFormSettingsCard.browser.spec.tsx +3 -3
  908. package/src/form/__tests__/ControlChoices.browser.spec.tsx +30 -0
  909. package/src/form/__tests__/ControlDateRange.browser.spec.tsx +41 -2
  910. package/src/form/__tests__/ControlDateTime.browser.spec.tsx +82 -0
  911. package/src/form/__tests__/ControlFrenchLabels.browser.spec.tsx +129 -0
  912. package/src/form/__tests__/ControlRequiredRefusal.browser.spec.tsx +71 -2
  913. package/src/form/__tests__/ControlSelectClearLabel.browser.spec.tsx +3 -3
  914. package/src/form/__tests__/ControlSelectEmptyValue.browser.spec.tsx +60 -0
  915. package/src/form/__tests__/ControlSelectMulti.browser.spec.tsx +2 -2
  916. package/src/form/__tests__/ControlSelectSearchable.browser.spec.tsx +2 -2
  917. package/src/form/__tests__/ControlSelectTriggerProps.browser.spec.tsx +1 -1
  918. package/src/form/__tests__/ControlUpload.browser.spec.tsx +149 -0
  919. package/src/form/autoFormGroups.ts +1 -1
  920. package/src/form/controlSelectOptions.ts +17 -13
  921. package/src/form/grid.tsx +1 -1
  922. package/src/form/resizeImage.ts +4 -4
  923. package/src/form/useFieldErrorText.ts +20 -0
  924. package/src/i18n/en/__tests__/uiEn.spec.ts +110 -0
  925. package/src/i18n/en/index.ts +22 -0
  926. package/src/i18n/en/uiEn.ts +1647 -0
  927. package/src/i18n/fr/__tests__/uiFr.spec.ts +1 -1
  928. package/src/i18n/fr/uiFr.ts +75 -5
  929. package/src/markdown/MarkdownView.css +2 -2
  930. package/src/markdown/MarkdownView.tsx +40 -9
  931. package/src/markdown/__tests__/MarkdownViewHighlight.browser.spec.tsx +9 -0
  932. package/src/markdown/__tests__/MarkdownViewMermaid.browser.spec.tsx +24 -3
  933. package/src/markdown/__tests__/MarkdownViewRawHtml.browser.spec.tsx +3 -3
  934. package/src/markdown/__tests__/highlightLines.spec.ts +45 -0
  935. package/src/markdown/diagram/FlowchartDiagram.tsx +3 -2
  936. package/src/markdown/diagram/FlowchartDiagramEdge.tsx +5 -3
  937. package/src/markdown/diagram/SequenceDiagram.tsx +3 -2
  938. package/src/markdown/diagram/SequenceDiagramFragment.tsx +6 -3
  939. package/src/markdown/diagram/SequenceDiagramParticipantActor.tsx +1 -6
  940. package/src/markdown/diagram/flowchartParser.spec.ts +40 -0
  941. package/src/markdown/diagram/flowchartParser.ts +33 -8
  942. package/src/markdown/diagram/layoutSequence.spec.ts +46 -0
  943. package/src/markdown/diagram/layoutSequence.ts +61 -10
  944. package/src/markdown/diagram/sequenceModel.ts +9 -13
  945. package/src/markdown/diagram/sequenceParser.spec.ts +59 -11
  946. package/src/markdown/diagram/sequenceParser.ts +17 -4
  947. package/src/markdown/diagram/textMetrics.ts +6 -5
  948. package/src/markdown/highlightLines.ts +120 -0
  949. package/src/markdown/index.ts +14 -2
  950. package/src/markdown/rehypeHighlight.ts +6 -5
  951. package/src/markdown/remarkSpoiler.ts +2 -2
  952. package/src/organizations/OrganizationInviteDialog.tsx +3 -1
  953. package/src/organizations/OrganizationMemberIdentity.tsx +16 -11
  954. package/src/organizations/OrganizationMemberRankPicker.tsx +3 -1
  955. package/src/organizations/OrganizationMembers.tsx +11 -1
  956. package/src/organizations/OrganizationRankColumnHeader.tsx +64 -2
  957. package/src/organizations/OrganizationRanks.tsx +105 -17
  958. package/src/organizations/__tests__/OrganizationMemberRankPicker.browser.spec.tsx +36 -0
  959. package/src/organizations/__tests__/OrganizationMembers.browser.spec.tsx +33 -2
  960. package/src/organizations/__tests__/OrganizationRanks.browser.spec.tsx +78 -3
  961. package/src/organizations/__tests__/rankOrder.spec.ts +47 -0
  962. package/src/organizations/rankOrder.ts +30 -0
  963. package/src/settings/SettingsDangerSection.tsx +7 -4
  964. package/src/settings/SettingsDialog.tsx +3 -3
  965. package/src/settings/SettingsHeading.tsx +4 -4
  966. package/src/settings/SettingsRow.tsx +4 -4
  967. package/src/settings/SettingsSection.tsx +3 -3
  968. package/src/settings/__tests__/SettingsSection.browser.spec.tsx +44 -5
  969. package/src/shell/ActionErrorToaster.tsx +1 -1
  970. package/src/shell/AppActions.tsx +9 -8
  971. package/src/shell/AppShell.tsx +5 -5
  972. package/src/shell/AppShellNavDropdownItems.tsx +2 -2
  973. package/src/shell/AppShellSidebarNavItem.tsx +7 -7
  974. package/src/shell/ButtonInbox.tsx +40 -13
  975. package/src/shell/ButtonLanguage.tsx +1 -1
  976. package/src/shell/ButtonUser.tsx +1 -1
  977. package/src/shell/ButtonUserAdminMenuItem.tsx +1 -1
  978. package/src/shell/DetailAside.tsx +30 -12
  979. package/src/shell/DetailLayout.tsx +10 -10
  980. package/src/shell/NavShell.tsx +3 -3
  981. package/src/shell/NavigationProgress.tsx +9 -3
  982. package/src/shell/PlateFolderTabs.tsx +4 -2
  983. package/src/shell/PlateLayout.tsx +98 -44
  984. package/src/shell/Spotlight.tsx +1 -1
  985. package/src/shell/__tests__/ActionErrorToasterHandled.browser.spec.tsx +25 -18
  986. package/src/shell/__tests__/ButtonInbox.browser.spec.tsx +133 -2
  987. package/src/shell/__tests__/ButtonUserAvatar.browser.spec.tsx +6 -4
  988. package/src/shell/__tests__/DetailAside.browser.spec.tsx +2 -2
  989. package/src/shell/__tests__/DetailLayout.browser.spec.tsx +1 -1
  990. package/src/shell/__tests__/NavigationProgress.browser.spec.tsx +24 -4
  991. package/src/shell/__tests__/PlateLayout.browser.spec.tsx +44 -11
  992. package/src/shell/__tests__/SidebarNavAutoClose.browser.spec.tsx +2 -2
  993. package/src/shell/__tests__/navTreeUtil.spec.ts +1 -1
  994. package/src/shell/__tests__/useNavBreadcrumbs.browser.spec.tsx +76 -0
  995. package/src/shell/appShellNav.tsx +3 -3
  996. package/src/shell/navTreeUtil.ts +6 -6
  997. package/src/shell/useDetailTab.tsx +6 -5
  998. package/src/shell/useNavBreadcrumbs.ts +4 -2
  999. package/src/shell/useNavEntries.ts +9 -8
  1000. package/src/shell/useNavTree.ts +1 -1
  1001. package/src/sortable/__tests__/useSortableList.browser.spec.tsx +157 -0
  1002. package/src/sortable/index.ts +22 -0
  1003. package/src/sortable/useSortableItem.ts +65 -0
  1004. package/src/sortable/useSortableList.ts +231 -0
  1005. package/src/styles.css +34 -14
  1006. package/src/swagger/OpenApiSpec.ts +23 -1
  1007. package/src/swagger/SwaggerExplorer.tsx +6 -1
  1008. package/src/swagger/SwaggerNav.tsx +2 -2
  1009. package/src/swagger/SwaggerRequestBuilder.ts +23 -7
  1010. package/src/swagger/SwaggerSchemaView.tsx +11 -16
  1011. package/src/swagger/SwaggerSchemaViewField.tsx +36 -0
  1012. package/src/swagger/SwaggerTryIt.tsx +25 -22
  1013. package/src/swagger/SwaggerTryItForm.tsx +28 -13
  1014. package/src/swagger/__tests__/SwaggerExplorer.browser.spec.tsx +49 -0
  1015. package/src/swagger/__tests__/SwaggerOperationView.browser.spec.tsx +42 -2
  1016. package/src/swagger/__tests__/SwaggerRequestBuilder.spec.ts +110 -0
  1017. package/src/swagger/__tests__/SwaggerTryIt.browser.spec.tsx +139 -0
  1018. package/src/table/DataTable.tsx +162 -22
  1019. package/src/table/DataTableBody.tsx +179 -80
  1020. package/src/table/DataTableFilterDialog.tsx +5 -5
  1021. package/src/table/DataTableFooter.tsx +3 -3
  1022. package/src/table/DataTableGroupRow.tsx +60 -0
  1023. package/src/table/DataTableHeaderPopupList.tsx +8 -0
  1024. package/src/table/DataTableHeaderRow.tsx +1 -1
  1025. package/src/table/DataTablePresetRail.tsx +12 -2
  1026. package/src/table/DataTablePresetRailButton.tsx +2 -2
  1027. package/src/table/DataTableRowActionGroupItem.tsx +75 -0
  1028. package/src/table/DataTableRowActionItem.tsx +6 -0
  1029. package/src/table/DataTableRowActionsInline.tsx +3 -1
  1030. package/src/table/DataTableRowActionsMenu.tsx +33 -49
  1031. package/src/table/DataTableSummaryCard.tsx +38 -1
  1032. package/src/table/DataTableSummaryPanel.tsx +21 -2
  1033. package/src/table/DataTableToolbar.tsx +4 -4
  1034. package/src/table/PermissionMatrix.tsx +7 -0
  1035. package/src/table/PermissionMatrixGroupRows.tsx +19 -1
  1036. package/src/table/__tests__/DataTableEmptyState.browser.spec.tsx +45 -0
  1037. package/src/table/__tests__/DataTableFilterBar.browser.spec.tsx +12 -0
  1038. package/src/table/__tests__/DataTableFilterOnChange.browser.spec.tsx +89 -0
  1039. package/src/table/__tests__/DataTableGroupBy.browser.spec.tsx +281 -0
  1040. package/src/table/__tests__/DataTableHeaderPopup.browser.spec.tsx +21 -0
  1041. package/src/table/__tests__/DataTablePersistenceStorage.browser.spec.tsx +204 -0
  1042. package/src/table/__tests__/DataTablePresets.browser.spec.tsx +49 -0
  1043. package/src/table/__tests__/DataTableRefreshOnFocus.browser.spec.tsx +128 -0
  1044. package/src/table/__tests__/DataTableRowActionGroup.browser.spec.tsx +118 -1
  1045. package/src/table/__tests__/DataTableScope.browser.spec.tsx +34 -1
  1046. package/src/table/__tests__/DataTableSort.browser.spec.tsx +91 -0
  1047. package/src/table/__tests__/DataTableStatic.browser.spec.tsx +33 -4
  1048. package/src/table/__tests__/paginateLocal.spec.ts +65 -0
  1049. package/src/table/dataTableBaseProps.ts +72 -11
  1050. package/src/table/dataTableFilterFields.ts +17 -0
  1051. package/src/table/dataTablePersistence.ts +118 -32
  1052. package/src/table/dataTableTypes.ts +97 -11
  1053. package/src/table/index.ts +20 -2
  1054. package/src/table/paginateLocal.ts +111 -7
  1055. package/src/table/useDataTableColumns.ts +9 -4
  1056. package/src/table/useDataTableData.ts +59 -29
  1057. package/src/table/useDataTableFilterForm.ts +14 -4
  1058. package/src/table/useDataTableFilterModel.tsx +4 -4
  1059. package/src/table/useDataTableFilterVisibility.ts +20 -7
  1060. package/src/table/useDataTableRefresh.ts +4 -2
  1061. package/src/table/useDataTableSummary.ts +27 -9
  1062. package/src/table/useDataTableWake.ts +77 -0
  1063. package/src/table/useTableSelection.ts +1 -1
  1064. package/src/tree/TreeView.tsx +75 -15
  1065. package/src/tree/TreeViewRow.tsx +62 -42
  1066. package/src/tree/__tests__/TreeViewDrag.browser.spec.tsx +101 -91
  1067. package/src/tree/__tests__/treeModel.spec.ts +25 -0
  1068. package/src/tree/index.ts +4 -9
  1069. package/src/tree/treeModel.ts +38 -1
  1070. package/dist/admin/AdminJobsPayloadDialog.d.ts +0 -19
  1071. package/dist/admin/AdminJobsPayloadDialog.d.ts.map +0 -1
  1072. package/dist/admin/AdminJobsPayloadDialog.js +0 -30
  1073. package/dist/admin/AdminJobsPayloadDialog.js.map +0 -1
  1074. package/dist/tree/TreeViewResizer.d.ts +0 -38
  1075. package/dist/tree/TreeViewResizer.d.ts.map +0 -1
  1076. package/dist/tree/TreeViewResizer.js +0 -72
  1077. package/dist/tree/TreeViewResizer.js.map +0 -1
  1078. package/src/admin/AdminJobsPayloadDialog.tsx +0 -57
  1079. package/src/admin/__tests__/AdminJobsPayloadDialog.browser.spec.tsx +0 -67
  1080. package/src/tree/TreeViewResizer.tsx +0 -83
  1081. package/src/tree/__tests__/TreeViewResizer.browser.spec.tsx +0 -112
  1082. /package/src/shell/__tests__/{AppActions.browser.spec.tsx → ButtonUserAccountMenuItem.browser.spec.tsx} +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ControlDatePopover.js","names":["CalendarIcon","ChevronDownIcon"],"sources":["../../src/form/ControlDatePopover.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useI18n } from \"alepha/react/i18n\";\nimport {\n Calendar as CalendarIcon,\n ChevronDown as ChevronDownIcon,\n} from \"lucide-react\";\nimport { type HTMLAttributes, useState } from \"react\";\nimport type { DayPickerProps } from \"react-day-picker\";\n\nimport { LazyCalendar, preloadCalendar } from \"../calendar/LazyCalendar.tsx\";\nimport { Input } from \"../core/Input.tsx\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../core/Popover.tsx\";\nimport { cn } from \"../core/utils.ts\";\nimport { DATE_ONLY, formatDateOnly, parseDateOnly } from \"./dateOnly.ts\";\nimport {\n ControlClearButton,\n TRIGGER_CLASSES,\n TRIGGER_SIZES,\n TRIGGER_WRAPPER_CLASSES,\n} from \"./fieldTrigger.tsx\";\n\nexport interface ControlDatePopoverProps {\n id?: string;\n value?: string;\n withTime: boolean;\n disabled?: boolean;\n clearable?: boolean;\n captionLayout?: DayPickerProps[\"captionLayout\"];\n startMonth?: Date;\n endMonth?: Date;\n /** Forwarded to the trigger: an `aria-label`, a `data-testid`. */\n triggerProps?: HTMLAttributes<HTMLElement>;\n onChange: (value: string | undefined) => void;\n}\n\nexport const ControlDatePopover = (props: ControlDatePopoverProps) => {\n const { tr, l } = useI18n();\n const [open, setOpen] = useState(false);\n const date = props.value\n ? !props.withTime && DATE_ONLY.test(props.value)\n ? parseDateOnly(props.value)\n : new Date(props.value)\n : undefined;\n\n // In the page's language, never the browser's. `toLocaleString()` with no\n // locale followed the browser, so an English browser on a French page\n // printed 9/10/2026 for the 10th of September, and the server, which has no\n // browser, rendered yet another shape before hydration (#Q2392). The\n // runtime's time zone is unchanged: `Intl` still formats in it.\n const formatted = date\n ? props.withTime\n ? l(date, {\n date: {\n year: \"numeric\",\n month: \"numeric\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"2-digit\",\n },\n })\n : l(date)\n : \"\";\n\n const handleDate = (d: Date | undefined) => {\n if (!d) {\n props.onChange(undefined);\n return;\n }\n if (props.withTime) {\n props.onChange(d.toISOString());\n } else {\n props.onChange(formatDateOnly(d));\n setOpen(false);\n }\n };\n\n const handleTime = (timeStr: string) => {\n if (!date) return;\n const [h, m] = timeStr.split(\":\").map(Number);\n const next = new Date(date);\n next.setHours(h ?? 0, m ?? 0, 0, 0);\n props.onChange(next.toISOString());\n };\n\n const timeValue =\n date && props.withTime\n ? `${String(date.getHours()).padStart(2, \"0\")}:${String(date.getMinutes()).padStart(2, \"0\")}`\n : \"\";\n\n const showClear = Boolean(props.clearable && date && !props.disabled);\n const size = TRIGGER_SIZES.default;\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n {/* The kit's field trigger, and the kit's clear button positioned on it\n - `control-base/field-trigger`, the same two a select draws. The\n clear sits BESIDE the trigger rather than inside it: a button nested\n in a button is invalid, and Base UI's popover trigger would swallow\n its click anyway. */}\n <div className={TRIGGER_WRAPPER_CLASSES}>\n <PopoverTrigger\n {...props.triggerProps}\n id={props.id}\n // A FIELD trigger, not a button, and the distinction is load\n // bearing: `styles.css` gives the `--border-hover` border to a\n // list of `data-slot`s, and this one was not on it, so the date\n // control was the only field in the kit that did not darken its\n // border under the pointer.\n //\n // ⚠️ It used to render `Button variant=\"outline\"` and then undo\n // the button-ness of it in four overrides - the border token, the\n // hover fill, the open-state fill, the placeholder colour - which\n // is a fair description of why it still did not look like the\n // selects beside it (feedback #2197). The shared trigger is a\n // field to begin with, so there is nothing left to undo.\n data-slot=\"date-trigger\"\n disabled={props.disabled}\n // The calendar is a chunk of its own (`LazyCalendar`). Asking for it\n // as the pointer arrives or focus lands means the click that opens\n // the popover usually finds it already downloaded.\n onPointerEnter={preloadCalendar}\n onFocus={preloadCalendar}\n className={cn(\n TRIGGER_CLASSES,\n size.trigger,\n size.chevron,\n // Muted means \"nothing picked yet\", exactly as on a select. With\n // a value the text is already `foreground`, so this only matters\n // while empty.\n !date && \"text-muted-foreground\",\n )}\n >\n {/* The room for the clear button - see `clearGap` in TRIGGER_SIZES\n for why it is a margin here and not padding on the trigger, and\n `ControlSelectCombobox` for `trigger-label`. */}\n <span\n data-slot=\"trigger-label\"\n className={cn(\n \"flex min-w-0 items-center gap-2\",\n showClear && size.clearGap,\n )}\n >\n {/*\n Muted whatever the field holds, matching `InputGroupAddon`, which\n paints every other leading icon in the kit `text-muted-foreground`\n on the container.\n\n Without the class this icon simply inherits the trigger's `color`,\n which the control swaps between muted and foreground to grey the\n PLACEHOLDER - so the icon brightened when a date was picked. That\n looked deliberate and was not: an icon says what kind of field this\n is, which does not change when you fill it, and the text beside it\n already carries filled-versus-empty.\n */}\n <CalendarIcon\n className={cn(\"text-muted-foreground shrink-0\", size.icon)}\n />\n <span className=\"truncate\">\n {formatted ||\n tr(\"controlDate.placeholder\", { default: \"Pick a date\" })}\n </span>\n </span>\n {/* Same trailing caret a select trigger carries, for the same\n reason: this opens a popover, and without it the control reads\n as a text field that happens to have a calendar glyph. */}\n <ChevronDownIcon className=\"text-muted-foreground pointer-events-none size-4 shrink-0\" />\n </PopoverTrigger>\n {showClear && (\n <ControlClearButton onClick={() => props.onChange(undefined)} />\n )}\n </div>\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <LazyCalendar\n mode=\"single\"\n selected={date}\n onSelect={handleDate}\n captionLayout={props.captionLayout}\n startMonth={props.startMonth}\n endMonth={props.endMonth}\n />\n {props.withTime && (\n <div className=\"border-t p-3\">\n <Input\n type=\"time\"\n value={timeValue}\n onChange={(e) => handleTime(e.target.value)}\n />\n </div>\n )}\n </PopoverContent>\n </Popover>\n );\n};\n"],"mappings":";;;;;;;;;;;AAsCA,MAAa,sBAAsB,UAAmC;CACpE,MAAM,EAAE,IAAI,MAAM,QAAQ;CAC1B,MAAM,CAAC,MAAM,WAAW,SAAS,KAAK;CACtC,MAAM,OAAO,MAAM,QACf,CAAC,MAAM,YAAY,UAAU,KAAK,MAAM,KAAK,IAC3C,cAAc,MAAM,KAAK,IACzB,IAAI,KAAK,MAAM,KAAK,IACtB,KAAA;CAOJ,MAAM,YAAY,OACd,MAAM,WACJ,EAAE,MAAM,EACN,MAAM;EACJ,MAAM;EACN,OAAO;EACP,KAAK;EACL,MAAM;EACN,QAAQ;CACV,EACF,CAAC,IACD,EAAE,IAAI,IACR;CAEJ,MAAM,cAAc,MAAwB;EAC1C,IAAI,CAAC,GAAG;GACN,MAAM,SAAS,KAAA,CAAS;GACxB;EACF;EACA,IAAI,MAAM,UACR,MAAM,SAAS,EAAE,YAAY,CAAC;OACzB;GACL,MAAM,SAAS,eAAe,CAAC,CAAC;GAChC,QAAQ,KAAK;EACf;CACF;CAEA,MAAM,cAAc,YAAoB;EACtC,IAAI,CAAC,MAAM;EACX,MAAM,CAAC,GAAG,KAAK,QAAQ,MAAM,GAAG,CAAC,CAAC,IAAI,MAAM;EAC5C,MAAM,OAAO,IAAI,KAAK,IAAI;EAC1B,KAAK,SAAS,KAAK,GAAG,KAAK,GAAG,GAAG,CAAC;EAClC,MAAM,SAAS,KAAK,YAAY,CAAC;CACnC;CAEA,MAAM,YACJ,QAAQ,MAAM,WACV,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,OAAO,KAAK,WAAW,CAAC,CAAC,CAAC,SAAS,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sources":["../../src/form/ControlDatePopover.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useI18n } from \"alepha/react/i18n\";\nimport {\n Calendar as CalendarIcon,\n ChevronDown as ChevronDownIcon,\n} from \"lucide-react\";\nimport { type HTMLAttributes, useState } from \"react\";\nimport type { DayPickerProps } from \"react-day-picker\";\n\nimport { LazyCalendar, preloadCalendar } from \"../calendar/LazyCalendar.tsx\";\nimport { Input } from \"../core/Input.tsx\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../core/Popover.tsx\";\nimport { cn } from \"../core/utils.ts\";\nimport { DATE_ONLY, formatDateOnly, parseDateOnly } from \"./dateOnly.ts\";\nimport {\n ControlClearButton,\n TRIGGER_CLASSES,\n TRIGGER_SIZES,\n TRIGGER_WRAPPER_CLASSES,\n} from \"./fieldTrigger.tsx\";\n\nexport interface ControlDatePopoverProps {\n id?: string;\n value?: string;\n withTime: boolean;\n disabled?: boolean;\n clearable?: boolean;\n captionLayout?: DayPickerProps[\"captionLayout\"];\n startMonth?: Date;\n endMonth?: Date;\n /** Forwarded to the trigger: an `aria-label`, a `data-testid`. */\n triggerProps?: HTMLAttributes<HTMLElement>;\n onChange: (value: string | undefined) => void;\n}\n\nexport const ControlDatePopover = (props: ControlDatePopoverProps) => {\n const { tr, l } = useI18n();\n const [open, setOpen] = useState(false);\n const date = props.value\n ? !props.withTime && DATE_ONLY.test(props.value)\n ? parseDateOnly(props.value)\n : new Date(props.value)\n : undefined;\n\n // In the page's language, never the browser's. `toLocaleString()` with no\n // locale followed the browser, so an English browser on a French page\n // printed 9/10/2026 for the 10th of September, and the server, which has no\n // browser, rendered yet another shape before hydration (#Q2392). The\n // runtime's time zone is unchanged: `Intl` still formats in it.\n const formatted = date\n ? props.withTime\n ? l(date, {\n date: {\n year: \"numeric\",\n month: \"numeric\",\n day: \"numeric\",\n hour: \"numeric\",\n minute: \"2-digit\",\n },\n })\n : l(date)\n : \"\";\n\n const handleDate = (d: Date | undefined) => {\n if (!d) {\n props.onChange(undefined);\n return;\n }\n if (props.withTime) {\n // The calendar hands back the day at local midnight: keep the time the\n // field already holds.\n const next = new Date(d);\n if (date) next.setHours(date.getHours(), date.getMinutes(), 0, 0);\n props.onChange(next.toISOString());\n } else {\n props.onChange(formatDateOnly(d));\n setOpen(false);\n }\n };\n\n const handleTime = (timeStr: string) => {\n if (!date) return;\n const [h, m] = timeStr.split(\":\").map(Number);\n const next = new Date(date);\n next.setHours(h ?? 0, m ?? 0, 0, 0);\n props.onChange(next.toISOString());\n };\n\n const timeValue =\n date && props.withTime\n ? `${String(date.getHours()).padStart(2, \"0\")}:${String(date.getMinutes()).padStart(2, \"0\")}`\n : \"\";\n\n const showClear = Boolean(props.clearable && date && !props.disabled);\n const size = TRIGGER_SIZES.default;\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n {/* The kit's field trigger, and the kit's clear button positioned on it\n - `form/fieldTrigger.tsx`, the same two a select draws. The\n clear sits BESIDE the trigger rather than inside it: a button nested\n in a button is invalid, and Base UI's popover trigger would swallow\n its click anyway. */}\n <div className={TRIGGER_WRAPPER_CLASSES}>\n <PopoverTrigger\n {...props.triggerProps}\n id={props.id}\n // A FIELD trigger, not a button, and the distinction is load\n // bearing: `styles.css` gives the `--border-hover` border to a\n // list of `data-slot`s, and this one was not on it, so the date\n // control was the only field in the kit that did not darken its\n // border under the pointer.\n //\n // ⚠️ It used to render `Button variant=\"outline\"` and then undo\n // the button-ness of it in four overrides - the border token, the\n // hover fill, the open-state fill, the placeholder colour - which\n // is a fair description of why it still did not look like the\n // selects beside it (feedback #2197). The shared trigger is a\n // field to begin with, so there is nothing left to undo.\n data-slot=\"date-trigger\"\n disabled={props.disabled}\n // The calendar is a chunk of its own (`LazyCalendar`). Asking for it\n // as the pointer arrives or focus lands means the click that opens\n // the popover usually finds it already downloaded.\n onPointerEnter={preloadCalendar}\n onFocus={preloadCalendar}\n className={cn(\n TRIGGER_CLASSES,\n size.trigger,\n size.chevron,\n // Muted means \"nothing picked yet\", exactly as on a select. With\n // a value the text is already `foreground`, so this only matters\n // while empty.\n !date && \"text-muted-foreground\",\n )}\n >\n {/* The room for the clear button - see `clearGap` in TRIGGER_SIZES\n for why it is a margin here and not padding on the trigger, and\n `ControlSelectCombobox` for `trigger-label`. */}\n <span\n data-slot=\"trigger-label\"\n className={cn(\n \"flex min-w-0 items-center gap-2\",\n showClear && size.clearGap,\n )}\n >\n {/*\n Muted whatever the field holds, matching `InputGroupAddon`, which\n paints every other leading icon in the kit `text-muted-foreground`\n on the container.\n\n Without the class this icon simply inherits the trigger's `color`,\n which the control swaps between muted and foreground to grey the\n PLACEHOLDER - so the icon brightened when a date was picked. That\n looked deliberate and was not: an icon says what kind of field this\n is, which does not change when you fill it, and the text beside it\n already carries filled-versus-empty.\n */}\n <CalendarIcon\n className={cn(\"text-muted-foreground shrink-0\", size.icon)}\n />\n <span className=\"truncate\">\n {formatted ||\n tr(\"controlDate.placeholder\", { default: \"Pick a date\" })}\n </span>\n </span>\n {/* Same trailing caret a select trigger carries, for the same\n reason: this opens a popover, and without it the control reads\n as a text field that happens to have a calendar glyph. */}\n <ChevronDownIcon className=\"text-muted-foreground pointer-events-none size-4 shrink-0\" />\n </PopoverTrigger>\n {showClear && (\n <ControlClearButton onClick={() => props.onChange(undefined)} />\n )}\n </div>\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n <LazyCalendar\n mode=\"single\"\n selected={date}\n onSelect={handleDate}\n captionLayout={props.captionLayout}\n startMonth={props.startMonth}\n endMonth={props.endMonth}\n />\n {props.withTime && (\n <div className=\"border-t p-3\">\n <Input\n type=\"time\"\n value={timeValue}\n onChange={(e) => handleTime(e.target.value)}\n />\n </div>\n )}\n </PopoverContent>\n </Popover>\n );\n};\n"],"mappings":";;;;;;;;;;;AAsCA,MAAa,sBAAsB,UAAmC;CACpE,MAAM,EAAE,IAAI,MAAM,QAAQ;CAC1B,MAAM,CAAC,MAAM,WAAW,SAAS,KAAK;CACtC,MAAM,OAAO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,qBAAC,gBAAD;IACE,GAAI,MAAM;IACV,IAAI,MAAM;IAaV,aAAU;IACV,UAAU,MAAM;IAIhB,gBAAgB;IAChB,SAAS;IACT,WAAW,GACT,iBACA,KAAK,SACL,KAAK,SAIL,CAAC,QAAQ,uBACX;IA9BF,UAAA,CAmCE,qBAAC,QAAD;KACE,aAAU;KACV,WAAW,GACT,mCACA,aAAa,KAAK,QACpB;KALF,UAAA,CAmBE,oBAACA,UAAD,EACE,WAAW,GAAG,kCAAkC,KAAK,IAAI,EAC1D,CAAA,GACD,oBAAC,QAAD;MAAM,WAAU;MACb,UAAA,aACC,GAAG,2BAA2B,EAAE,SAAS,cAAc,CAAC;KACtD,CAAA,CACF;IAIN,CAAA,GAAA,oBAACC,aAAD,EAAiB,WAAU,4DAA6D,CAAA,CAC1E;GACf,CAAA,GAAA,aACC,oBAAC,oBAAD,EAAoB,eAAe,MAAM,SAAS,KAAA,CAAS,EAAI,CAAA,CAE9D;EACL,CAAA,GAAA,qBAAC,gBAAD;GAAgB,WAAU;GAAa,OAAM;GAA7C,UAAA,CACE,oBAAC,cAAD;IACE,MAAK;IACL,UAAU;IACV,UAAU;IACV,eAAe,MAAM;IACrB,YAAY,MAAM;IAClB,UAAU,MAAM;GACjB,CAAA,GACA,MAAM,YACL,oBAAC,OAAD;IAAK,WAAU;IACb,UAAA,oBAAC,OAAD;KACE,MAAK;KACL,OAAO;KACP,WAAW,MAAM,WAAW,EAAE,OAAO,KAAK;IAC3C,CAAA;GACE,CAAA,CAEO;EACT,CAAA,CAAA;;AAEb"}
@@ -66,12 +66,12 @@ export interface ControlDateRangeProps {
66
66
  *
67
67
  * So `pending` counts the gesture instead of reading its shape, and it
68
68
  * handles both behaviours: a genuinely half range holds, and a
69
- * DayPicker-completed first click holds too. `control-date-range.browser
69
+ * DayPicker-completed first click holds too. `ControlDateRange.browser
70
70
  * .spec.tsx` drives two real clicks, which is what found this.
71
71
  *
72
72
  * ⚠️ **Local parts, never `new Date(value)`.** A date-only string is a
73
73
  * calendar day; parsing it as an instant shifts it by one west of Greenwich.
74
- * The two helpers are `control-date`'s own, shared rather than copied.
74
+ * The two helpers are `dateOnly.ts`'s, shared with `ControlDatePopover`.
75
75
  */
76
76
  export declare const ControlDateRange: (props: ControlDateRangeProps) => React.JSX.Element | null;
77
77
  //# sourceMappingURL=ControlDateRange.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ControlDateRange.d.ts","sourceRoot":"","sources":["../../src/form/ControlDateRange.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAepE,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,KAAK,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;QAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;IACjD;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,6BA0M5D,CAAC"}
1
+ {"version":3,"file":"ControlDateRange.d.ts","sourceRoot":"","sources":["../../src/form/ControlDateRange.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAgBpE,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,KAAK,EAAE,cAAc,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;;OAMG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,SAAS,CAAC;IAC1B;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC;QAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;KAAE,CAAC,CAAC;IACjD;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,gBAAgB,UAAW,qBAAqB,6BA+M5D,CAAC"}
@@ -4,6 +4,7 @@ import { cn } from "../core/utils.js";
4
4
  import { DATE_ONLY, formatDateOnly, parseDateOnly } from "./dateOnly.js";
5
5
  import { ControlClearButton, TRIGGER_CLASSES, TRIGGER_SIZES, TRIGGER_WRAPPER_CLASSES } from "./fieldTrigger.js";
6
6
  import { FormField } from "./FormField.js";
7
+ import { useFieldErrorText } from "./useFieldErrorText.js";
7
8
  import { useI18n } from "alepha/react/i18n";
8
9
  import { Calendar, ChevronDown } from "lucide-react";
9
10
  import { useState } from "react";
@@ -28,16 +29,17 @@ import { parseField, useFieldValue, useFormState } from "alepha/react/form";
28
29
  *
29
30
  * So `pending` counts the gesture instead of reading its shape, and it
30
31
  * handles both behaviours: a genuinely half range holds, and a
31
- * DayPicker-completed first click holds too. `control-date-range.browser
32
+ * DayPicker-completed first click holds too. `ControlDateRange.browser
32
33
  * .spec.tsx` drives two real clicks, which is what found this.
33
34
  *
34
35
  * ⚠️ **Local parts, never `new Date(value)`.** A date-only string is a
35
36
  * calendar day; parsing it as an instant shifts it by one west of Greenwich.
36
- * The two helpers are `control-date`'s own, shared rather than copied.
37
+ * The two helpers are `dateOnly.ts`'s, shared with `ControlDatePopover`.
37
38
  */
38
39
  const ControlDateRange = (props) => {
39
40
  const { tr, l } = useI18n();
40
41
  const form = useFormState(props.input, ["error"]);
42
+ const errorText = useFieldErrorText();
41
43
  const [value, setValue] = useFieldValue(props.input);
42
44
  const [open, setOpen] = useState(false);
43
45
  /**
@@ -60,6 +62,7 @@ const ControlDateRange = (props) => {
60
62
  description: props.description,
61
63
  error: form.error
62
64
  });
65
+ meta.error = errorText(meta.error);
63
66
  const shown = draft ?? stored;
64
67
  const formatted = shown?.from ? shown.to ? `${l(shown.from)} - ${l(shown.to)}` : l(shown.from) : "";
65
68
  const handleSelect = (next) => {
@@ -90,7 +93,8 @@ const ControlDateRange = (props) => {
90
93
  open,
91
94
  onOpenChange: (next) => {
92
95
  setOpen(next);
93
- if (next) setPending(false);
96
+ setPending(false);
97
+ if (!next) setDraft(stored);
94
98
  props.onPopupOpenChange?.(next);
95
99
  },
96
100
  children: [props.trigger ? /* @__PURE__ */ jsx(PopoverTrigger, {
@@ -1 +1 @@
1
- {"version":3,"file":"ControlDateRange.js","names":["CalendarIcon","ChevronDownIcon"],"sources":["../../src/form/ControlDateRange.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport {\n type BaseInputField,\n parseField,\n useFieldValue,\n useFormState,\n} from \"alepha/react/form\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport {\n Calendar as CalendarIcon,\n ChevronDown as ChevronDownIcon,\n} from \"lucide-react\";\nimport { type ReactElement, type ReactNode, useState } from \"react\";\nimport type { DateRange } from \"react-day-picker\";\n\nimport { LazyCalendar, preloadCalendar } from \"../calendar/LazyCalendar.tsx\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../core/Popover.tsx\";\nimport { cn } from \"../core/utils.ts\";\nimport { DATE_ONLY, formatDateOnly, parseDateOnly } from \"./dateOnly.ts\";\nimport {\n ControlClearButton,\n TRIGGER_CLASSES,\n TRIGGER_SIZES,\n TRIGGER_WRAPPER_CLASSES,\n} from \"./fieldTrigger.tsx\";\nimport { FormField } from \"./FormField.tsx\";\n\nexport interface ControlDateRangeProps {\n /**\n * Bound `InputField` from `useForm`. Stores `[start, end]`, two date-only\n * strings, or nothing at all.\n */\n input: BaseInputField;\n label?: string;\n description?: string;\n disabled?: boolean;\n /**\n * Offer a way back to empty once a range is picked.\n *\n * A calendar has no \"none\" cell, so without this an optional range field is\n * one-way. Spelled `clearable` like every other control in the kit, and\n * drawn like one: the kit's `x` on the trigger, not a button beside it.\n */\n clearable?: boolean;\n /**\n * Shown on the trigger while the field is empty. Defaults to the\n * catalogue's `controlDateRange.placeholder`.\n */\n placeholder?: string;\n /**\n * Extra classes on the trigger button. A filter bar sizes its slots, and a\n * range trigger holds two dates rather than one, so it usually wants to be\n * wider than its neighbours.\n */\n triggerClassName?: string;\n /**\n * Drawn on the trigger just before the range, muted: the filter's name on a\n * filter bar, so a set range reads \"Created 1 Jan - 31 Jan\" the way a set\n * list reads \"Status Active\". Absent while the field is empty, because the\n * placeholder already names it. Same contract as `ControlSelect`'s.\n */\n triggerPrefix?: ReactNode;\n /**\n * An element drawn INSTEAD of the field, as the button that opens the\n * calendar. Same contract as `ControlSelect`'s.\n */\n trigger?: ReactElement<{ children?: ReactNode }>;\n /**\n * The calendar opened or closed. Same contract as `ControlSelect`'s.\n */\n onPopupOpenChange?: (open: boolean) => void;\n}\n\n/**\n * A closed range of calendar days, as one field.\n *\n * `z.dateRange()` makes both ends mandatory, so this control never writes a\n * half-range: `.optional()` on the schema is the only way to say \"no filter\",\n * and there is nothing in between.\n *\n * ⚠️ **The field is written on the second CLICK, not on the first complete\n * range**, and the difference is measured rather than assumed. The trap this\n * was written for is DayPicker handing back `{ from }` with no `to`\n * mid-gesture; react-day-picker ^10 does something else, which is worse for a\n * naive control: the first click answers `{ from: d, to: d }`, a complete\n * one-day range. A control that wrote whenever both ends existed would\n * therefore take the start date as the whole range and slam the popover shut\n * before the reader picked an end.\n *\n * So `pending` counts the gesture instead of reading its shape, and it\n * handles both behaviours: a genuinely half range holds, and a\n * DayPicker-completed first click holds too. `control-date-range.browser\n * .spec.tsx` drives two real clicks, which is what found this.\n *\n * ⚠️ **Local parts, never `new Date(value)`.** A date-only string is a\n * calendar day; parsing it as an instant shifts it by one west of Greenwich.\n * The two helpers are `control-date`'s own, shared rather than copied.\n */\nexport const ControlDateRange = (props: ControlDateRangeProps) => {\n const { tr, l } = useI18n();\n const form = useFormState(props.input, [\"error\"]);\n const [value, setValue] = useFieldValue(props.input);\n const [open, setOpen] = useState(false);\n /**\n * Whether a selection gesture is half-made: one click in, waiting for the\n * other end. Reset whenever the popover opens, so an abandoned gesture\n * cannot make the next popover's first click look like a second one.\n */\n const [pending, setPending] = useState(false);\n\n const stored = toRange(value as unknown);\n const storedKey = Array.isArray(value) ? (value as string[]).join(\",\") : \"\";\n // The gesture in progress. Seeded from the field, and re-seeded whenever\n // the field moves underneath it - a form reset, or a value arriving from\n // the URL after the first paint.\n const [draft, setDraft] = useState<DateRange | undefined>(stored);\n const [seenKey, setSeenKey] = useState(storedKey);\n if (seenKey !== storedKey) {\n // ⚠️ Adjusted DURING render, not in an effect. React documents this as\n // the way to reset state when an input changes, and the effect version is\n // a lint error here (`react(set-state-in-effect)`) for the reason the\n // rule gives: it renders once with the stale draft and again with the new\n // one, so a value arriving from the URL is visibly wrong for a frame.\n //\n // Keyed on the joined VALUE, never on `stored`: `toRange` builds a new\n // object every render, so comparing objects would reset the draft on\n // every keystroke elsewhere in the form and discard a half-made\n // selection.\n setSeenKey(storedKey);\n setDraft(stored);\n }\n\n if (!props.input?.props) return null;\n\n const meta = parseField(props.input, {\n label: props.label,\n description: props.description,\n error: form.error,\n });\n\n const shown = draft ?? stored;\n // Each end in the page's language, like `ControlDatePopover`: the\n // browser's own `toLocaleDateString()` turned 10 to 12 September into\n // \"9/10/2026 - 9/12/2026\" on a French page (#Q2392).\n const formatted = shown?.from\n ? shown.to\n ? `${l(shown.from)} - ${l(shown.to)}`\n : l(shown.from)\n : \"\";\n\n const handleSelect = (next: DateRange | undefined) => {\n setDraft(next);\n if (!next?.from) {\n setPending(false);\n return;\n }\n if (!next.to || !pending) {\n // The first click of a gesture, whichever shape DayPicker gave it. The\n // field keeps whatever it had: writing now would either fail the schema\n // (half a range) or record the start day as the whole range, and\n // clearing would destroy the old range before the new one exists.\n setPending(true);\n return;\n }\n setPending(false);\n setValue([formatDateOnly(next.from), formatDateOnly(next.to)]);\n setOpen(false);\n // Closed by hand, not through the popover, so its own callback is not\n // called for this one.\n props.onPopupOpenChange?.(false);\n };\n\n const showClear = Boolean(props.clearable && stored?.from && !props.disabled);\n const size = TRIGGER_SIZES.default;\n\n return (\n <FormField\n onBlur={() => props.input.form?.blur(props.input.path)}\n id={meta.id}\n label={meta.label}\n description={meta.description}\n error={meta.error}\n required={meta.required}\n >\n <Popover\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n if (next) setPending(false);\n props.onPopupOpenChange?.(next);\n }}\n >\n {/* The kit's field trigger, and the kit's clear button positioned on\n it - `control-base/field-trigger`, the same two the selects on the\n filter bar beside this one draw (feedback #2197). The clear sits\n BESIDE the trigger rather than inside it because a button nested\n in a button is invalid, and Base UI's popover trigger would\n swallow its click anyway.\n\n A caller's own `trigger` replaces both, children handed over for\n the reason `ControlSelectCombobox` gives. */}\n {props.trigger ? (\n <PopoverTrigger\n id={meta.id}\n disabled={props.disabled}\n onPointerEnter={preloadCalendar}\n onFocus={preloadCalendar}\n render={props.trigger}\n >\n {props.trigger.props.children}\n </PopoverTrigger>\n ) : (\n <div className={TRIGGER_WRAPPER_CLASSES}>\n <PopoverTrigger\n id={meta.id}\n // `date-trigger`, the same slot `ControlDate` claims: `styles.css`\n // gives the `--border-hover` border to a list of `data-slot`s, and\n // this is how the two calendars are on it.\n data-slot=\"date-trigger\"\n disabled={props.disabled}\n // The calendar is a chunk of its own (`LazyCalendar`), fetched as\n // the pointer arrives or focus lands rather than on the click.\n onPointerEnter={preloadCalendar}\n onFocus={preloadCalendar}\n // `name` only, never the whole `input.props` spread: those\n // are an `<input>`'s props and this is a button, so their\n // `onChange` signature is genuinely incompatible. The name is\n // what `AutoForm`'s scroll-to-first-error looks a field up by.\n name={props.input.props.name}\n className={cn(\n TRIGGER_CLASSES,\n size.trigger,\n size.chevron,\n // Muted means \"nothing picked yet\", exactly as on a select.\n !formatted && \"text-muted-foreground\",\n props.triggerClassName,\n )}\n >\n {/* The room for the clear button - see `clearGap` in\n TRIGGER_SIZES for why it is a margin here and not padding on\n the trigger, and `ControlSelectCombobox` for `trigger-label`. */}\n <span\n data-slot=\"trigger-label\"\n className={cn(\n \"flex min-w-0 items-center gap-2\",\n showClear && size.clearGap,\n )}\n >\n {/*\n Muted whatever the field holds, matching every other leading\n icon in the kit. Without the class it inherits the trigger's\n own `color`, which swaps between muted and foreground to grey\n the PLACEHOLDER - so the icon brightened when a range was\n picked. An icon says what kind of field this is, which does\n not change when you fill it.\n */}\n <CalendarIcon\n className={cn(\"text-muted-foreground shrink-0\", size.icon)}\n />\n {/* The prefix rides in the same text run as the range, for the\n reason `ControlSelectCombobox` gives: one run, one space. */}\n <span className=\"truncate\">\n {props.triggerPrefix && formatted && (\n <span className=\"text-muted-foreground\">\n {props.triggerPrefix}{\" \"}\n </span>\n )}\n {formatted ||\n props.placeholder ||\n tr(\"controlDateRange.placeholder\", {\n default: \"Pick a date range\",\n })}\n </span>\n </span>\n {/* The same trailing caret a select trigger carries, appended by\n `ComboboxTrigger` there and written out here: this opens a\n popover, and without it the control reads as a text field that\n happens to have a calendar glyph. */}\n <ChevronDownIcon className=\"text-muted-foreground pointer-events-none size-4 shrink-0\" />\n </PopoverTrigger>\n {showClear && (\n <ControlClearButton\n onClick={() => {\n setDraft(undefined);\n setValue(undefined);\n }}\n />\n )}\n </div>\n )}\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n {/* The range visuals were built and unused: `calendar.tsx` passes\n `...props` straight to DayPicker and already defines\n `range_start` / `range_middle` / `range_end`, which its custom\n `DayButton` reads into styled data attributes. */}\n <LazyCalendar mode=\"range\" selected={shown} onSelect={handleSelect} />\n </PopoverContent>\n </Popover>\n </FormField>\n );\n};\n\n/**\n * The stored pair as DayPicker's own shape, or nothing.\n *\n * Anything that is not two parseable date-only strings reads as empty rather\n * than as half a range: the value comes off a URL as often as off a form, and\n * a malformed one is the schema's to reject, not this control's to render.\n */\nconst toRange = (value: unknown): DateRange | undefined => {\n if (!Array.isArray(value) || value.length !== 2) return undefined;\n const [from, to] = value as string[];\n if (!from || !to || !DATE_ONLY.test(from) || !DATE_ONLY.test(to)) {\n return undefined;\n }\n return { from: parseDateOnly(from), to: parseDateOnly(to) };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqGA,MAAa,oBAAoB,UAAiC;CAChE,MAAM,EAAE,IAAI,MAAM,QAAQ;CAC1B,MAAM,OAAO,aAAa,MAAM,OAAO,CAAC,OAAO,CAAC;CAChD,MAAM,CAAC,OAAO,YAAY,cAAc,MAAM,KAAK;CACnD,MAAM,CAAC,MAAM,WAAW,SAAS,KAAK;;;;;;CAMtC,MAAM,CAAC,SAAS,cAAc,SAAS,KAAK;CAE5C,MAAM,SAAS,QAAQ,KAAgB;CACvC,MAAM,YAAY,MAAM,QAAQ,KAAK,IAAK,MAAmB,KAAK,GAAG,IAAI;CAIzE,MAAM,CAAC,OAAO,YAAY,SAAgC,MAAM;CAChE,MAA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AU,KAAK,EAAE,GAC7D;CAEF,OAAO;EAAE,MAAM,cAAc,IAAI;EAAG,IAAI,cAAc,EAAE;CAAE;AAC5D"}
1
+ {"version":3,"file":"ControlDateRange.js","names":["CalendarIcon","ChevronDownIcon"],"sources":["../../src/form/ControlDateRange.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport {\n type BaseInputField,\n parseField,\n useFieldValue,\n useFormState,\n} from \"alepha/react/form\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport {\n Calendar as CalendarIcon,\n ChevronDown as ChevronDownIcon,\n} from \"lucide-react\";\nimport { type ReactElement, type ReactNode, useState } from \"react\";\nimport type { DateRange } from \"react-day-picker\";\n\nimport { LazyCalendar, preloadCalendar } from \"../calendar/LazyCalendar.tsx\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../core/Popover.tsx\";\nimport { cn } from \"../core/utils.ts\";\nimport { DATE_ONLY, formatDateOnly, parseDateOnly } from \"./dateOnly.ts\";\nimport {\n ControlClearButton,\n TRIGGER_CLASSES,\n TRIGGER_SIZES,\n TRIGGER_WRAPPER_CLASSES,\n} from \"./fieldTrigger.tsx\";\nimport { FormField } from \"./FormField.tsx\";\nimport { useFieldErrorText } from \"./useFieldErrorText.ts\";\n\nexport interface ControlDateRangeProps {\n /**\n * Bound `InputField` from `useForm`. Stores `[start, end]`, two date-only\n * strings, or nothing at all.\n */\n input: BaseInputField;\n label?: string;\n description?: string;\n disabled?: boolean;\n /**\n * Offer a way back to empty once a range is picked.\n *\n * A calendar has no \"none\" cell, so without this an optional range field is\n * one-way. Spelled `clearable` like every other control in the kit, and\n * drawn like one: the kit's `x` on the trigger, not a button beside it.\n */\n clearable?: boolean;\n /**\n * Shown on the trigger while the field is empty. Defaults to the\n * catalogue's `controlDateRange.placeholder`.\n */\n placeholder?: string;\n /**\n * Extra classes on the trigger button. A filter bar sizes its slots, and a\n * range trigger holds two dates rather than one, so it usually wants to be\n * wider than its neighbours.\n */\n triggerClassName?: string;\n /**\n * Drawn on the trigger just before the range, muted: the filter's name on a\n * filter bar, so a set range reads \"Created 1 Jan - 31 Jan\" the way a set\n * list reads \"Status Active\". Absent while the field is empty, because the\n * placeholder already names it. Same contract as `ControlSelect`'s.\n */\n triggerPrefix?: ReactNode;\n /**\n * An element drawn INSTEAD of the field, as the button that opens the\n * calendar. Same contract as `ControlSelect`'s.\n */\n trigger?: ReactElement<{ children?: ReactNode }>;\n /**\n * The calendar opened or closed. Same contract as `ControlSelect`'s.\n */\n onPopupOpenChange?: (open: boolean) => void;\n}\n\n/**\n * A closed range of calendar days, as one field.\n *\n * `z.dateRange()` makes both ends mandatory, so this control never writes a\n * half-range: `.optional()` on the schema is the only way to say \"no filter\",\n * and there is nothing in between.\n *\n * ⚠️ **The field is written on the second CLICK, not on the first complete\n * range**, and the difference is measured rather than assumed. The trap this\n * was written for is DayPicker handing back `{ from }` with no `to`\n * mid-gesture; react-day-picker ^10 does something else, which is worse for a\n * naive control: the first click answers `{ from: d, to: d }`, a complete\n * one-day range. A control that wrote whenever both ends existed would\n * therefore take the start date as the whole range and slam the popover shut\n * before the reader picked an end.\n *\n * So `pending` counts the gesture instead of reading its shape, and it\n * handles both behaviours: a genuinely half range holds, and a\n * DayPicker-completed first click holds too. `ControlDateRange.browser\n * .spec.tsx` drives two real clicks, which is what found this.\n *\n * ⚠️ **Local parts, never `new Date(value)`.** A date-only string is a\n * calendar day; parsing it as an instant shifts it by one west of Greenwich.\n * The two helpers are `dateOnly.ts`'s, shared with `ControlDatePopover`.\n */\nexport const ControlDateRange = (props: ControlDateRangeProps) => {\n const { tr, l } = useI18n();\n const form = useFormState(props.input, [\"error\"]);\n const errorText = useFieldErrorText();\n const [value, setValue] = useFieldValue(props.input);\n const [open, setOpen] = useState(false);\n /**\n * Whether a selection gesture is half-made: one click in, waiting for the\n * other end. Reset whenever the popover opens, so an abandoned gesture\n * cannot make the next popover's first click look like a second one.\n */\n const [pending, setPending] = useState(false);\n\n const stored = toRange(value as unknown);\n const storedKey = Array.isArray(value) ? (value as string[]).join(\",\") : \"\";\n // The gesture in progress. Seeded from the field, and re-seeded whenever\n // the field moves underneath it - a form reset, or a value arriving from\n // the URL after the first paint.\n const [draft, setDraft] = useState<DateRange | undefined>(stored);\n const [seenKey, setSeenKey] = useState(storedKey);\n if (seenKey !== storedKey) {\n // ⚠️ Adjusted DURING render, not in an effect. React documents this as\n // the way to reset state when an input changes, and the effect version is\n // a lint error here (`react(set-state-in-effect)`) for the reason the\n // rule gives: it renders once with the stale draft and again with the new\n // one, so a value arriving from the URL is visibly wrong for a frame.\n //\n // Keyed on the joined VALUE, never on `stored`: `toRange` builds a new\n // object every render, so comparing objects would reset the draft on\n // every keystroke elsewhere in the form and discard a half-made\n // selection.\n setSeenKey(storedKey);\n setDraft(stored);\n }\n\n if (!props.input?.props) return null;\n\n const meta = parseField(props.input, {\n label: props.label,\n description: props.description,\n error: form.error,\n });\n meta.error = errorText(meta.error);\n\n const shown = draft ?? stored;\n // Each end in the page's language, like `ControlDatePopover`: the\n // browser's own `toLocaleDateString()` turned 10 to 12 September into\n // \"9/10/2026 - 9/12/2026\" on a French page (#Q2392).\n const formatted = shown?.from\n ? shown.to\n ? `${l(shown.from)} - ${l(shown.to)}`\n : l(shown.from)\n : \"\";\n\n const handleSelect = (next: DateRange | undefined) => {\n setDraft(next);\n if (!next?.from) {\n setPending(false);\n return;\n }\n if (!next.to || !pending) {\n // The first click of a gesture, whichever shape DayPicker gave it. The\n // field keeps whatever it had: writing now would either fail the schema\n // (half a range) or record the start day as the whole range, and\n // clearing would destroy the old range before the new one exists.\n setPending(true);\n return;\n }\n setPending(false);\n setValue([formatDateOnly(next.from), formatDateOnly(next.to)]);\n setOpen(false);\n // Closed by hand, not through the popover, so its own callback is not\n // called for this one.\n props.onPopupOpenChange?.(false);\n };\n\n const showClear = Boolean(props.clearable && stored?.from && !props.disabled);\n const size = TRIGGER_SIZES.default;\n\n return (\n <FormField\n onBlur={() => props.input.form?.blur(props.input.path)}\n id={meta.id}\n label={meta.label}\n description={meta.description}\n error={meta.error}\n required={meta.required}\n >\n <Popover\n open={open}\n onOpenChange={(next) => {\n setOpen(next);\n setPending(false);\n // Closed on a half-made gesture: the trigger shows the range in\n // force again, not the abandoned day.\n if (!next) setDraft(stored);\n props.onPopupOpenChange?.(next);\n }}\n >\n {/* The kit's field trigger, and the kit's clear button positioned on\n it - `form/fieldTrigger.tsx`, the same two the selects on the\n filter bar beside this one draw (feedback #2197). The clear sits\n BESIDE the trigger rather than inside it because a button nested\n in a button is invalid, and Base UI's popover trigger would\n swallow its click anyway.\n\n A caller's own `trigger` replaces both, children handed over for\n the reason `ControlSelectCombobox` gives. */}\n {props.trigger ? (\n <PopoverTrigger\n id={meta.id}\n disabled={props.disabled}\n onPointerEnter={preloadCalendar}\n onFocus={preloadCalendar}\n render={props.trigger}\n >\n {props.trigger.props.children}\n </PopoverTrigger>\n ) : (\n <div className={TRIGGER_WRAPPER_CLASSES}>\n <PopoverTrigger\n id={meta.id}\n // `date-trigger`, the same slot `ControlDate` claims: `styles.css`\n // gives the `--border-hover` border to a list of `data-slot`s, and\n // this is how the two calendars are on it.\n data-slot=\"date-trigger\"\n disabled={props.disabled}\n // The calendar is a chunk of its own (`LazyCalendar`), fetched as\n // the pointer arrives or focus lands rather than on the click.\n onPointerEnter={preloadCalendar}\n onFocus={preloadCalendar}\n // `name` only, never the whole `input.props` spread: those\n // are an `<input>`'s props and this is a button, so their\n // `onChange` signature is genuinely incompatible. The name is\n // what `AutoForm`'s scroll-to-first-error looks a field up by.\n name={props.input.props.name}\n className={cn(\n TRIGGER_CLASSES,\n size.trigger,\n size.chevron,\n // Muted means \"nothing picked yet\", exactly as on a select.\n !formatted && \"text-muted-foreground\",\n props.triggerClassName,\n )}\n >\n {/* The room for the clear button - see `clearGap` in\n TRIGGER_SIZES for why it is a margin here and not padding on\n the trigger, and `ControlSelectCombobox` for `trigger-label`. */}\n <span\n data-slot=\"trigger-label\"\n className={cn(\n \"flex min-w-0 items-center gap-2\",\n showClear && size.clearGap,\n )}\n >\n {/*\n Muted whatever the field holds, matching every other leading\n icon in the kit. Without the class it inherits the trigger's\n own `color`, which swaps between muted and foreground to grey\n the PLACEHOLDER - so the icon brightened when a range was\n picked. An icon says what kind of field this is, which does\n not change when you fill it.\n */}\n <CalendarIcon\n className={cn(\"text-muted-foreground shrink-0\", size.icon)}\n />\n {/* The prefix rides in the same text run as the range, for the\n reason `ControlSelectCombobox` gives: one run, one space. */}\n <span className=\"truncate\">\n {props.triggerPrefix && formatted && (\n <span className=\"text-muted-foreground\">\n {props.triggerPrefix}{\" \"}\n </span>\n )}\n {formatted ||\n props.placeholder ||\n tr(\"controlDateRange.placeholder\", {\n default: \"Pick a date range\",\n })}\n </span>\n </span>\n {/* The same trailing caret a select trigger carries, appended by\n `ComboboxTrigger` there and written out here: this opens a\n popover, and without it the control reads as a text field that\n happens to have a calendar glyph. */}\n <ChevronDownIcon className=\"text-muted-foreground pointer-events-none size-4 shrink-0\" />\n </PopoverTrigger>\n {showClear && (\n <ControlClearButton\n onClick={() => {\n setDraft(undefined);\n setValue(undefined);\n }}\n />\n )}\n </div>\n )}\n <PopoverContent className=\"w-auto p-0\" align=\"start\">\n {/* The range visuals were built and unused: `calendar.tsx` passes\n `...props` straight to DayPicker and already defines\n `range_start` / `range_middle` / `range_end`, which its custom\n `DayButton` reads into styled data attributes. */}\n <LazyCalendar mode=\"range\" selected={shown} onSelect={handleSelect} />\n </PopoverContent>\n </Popover>\n </FormField>\n );\n};\n\n/**\n * The stored pair as DayPicker's own shape, or nothing.\n *\n * Anything that is not two parseable date-only strings reads as empty rather\n * than as half a range: the value comes off a URL as often as off a form, and\n * a malformed one is the schema's to reject, not this control's to render.\n */\nconst toRange = (value: unknown): DateRange | undefined => {\n if (!Array.isArray(value) || value.length !== 2) return undefined;\n const [from, to] = value as string[];\n if (!from || !to || !DATE_ONLY.test(from) || !DATE_ONLY.test(to)) {\n return undefined;\n }\n return { from: parseDateOnly(from), to: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;MACF,CAAA,CAAA;KAKN,CAAA,GAAA,oBAACC,aAAD,EAAiB,WAAU,4DAA6D,CAAA,CAC1E;IACf,CAAA,GAAA,aACC,oBAAC,oBAAD,EACE,eAAe;KACb,SAAS,KAAA,CAAS;KAClB,SAAS,KAAA,CAAS;IACpB,EACD,CAAA,CAEA;GAEP,CAAA,GAAA,oBAAC,gBAAD;IAAgB,WAAU;IAAa,OAAM;IAK3C,UAAA,oBAAC,cAAD;KAAc,MAAK;KAAQ,UAAU;KAAO,UAAU;IAAe,CAAA;GACvD,CAAA,CACT;;CACA,CAAA;AAEf;;;;;;;;AASA,MAAM,WAAW,UAA0C;CACzD,IAAI,CAAC,MAAM,QAAQ,KAAK,KAAK,MAAM,WAAW,GAAG,OAAO,KAAA;CACxD,MAAM,CAAC,MAAM,MAAM;CACnB,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,UAAU,KAAK,IAAI,KAAK,CAAC,UAAU,KAAK,EAAE,GAC7D;CAEF,OAAO;EAAE,MAAM,cAAc,IAAI;EAAG,IAAI,cAAc,EAAE;CAAE;AAC5D"}
@@ -5,10 +5,6 @@ export interface ControlMonthPopoverProps {
5
5
  value?: string;
6
6
  disabled?: boolean;
7
7
  clearable?: boolean;
8
- /** First selectable month, `YYYY-MM`. */
9
- min?: string;
10
- /** Last selectable month, `YYYY-MM`. */
11
- max?: string;
12
8
  /** Forwarded to the trigger: an `aria-label`, a `data-testid`. */
13
9
  triggerProps?: HTMLAttributes<HTMLElement>;
14
10
  onChange: (value: string | undefined) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"ControlMonthPopover.d.ts","sourceRoot":"","sources":["../../src/form/ControlMonthPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,OAAO,CAAC;AAiBtD,MAAM,WAAW,wBAAwB;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,yCAAyC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,wCAAwC;IACxC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,kEAAkE;IAClE,YAAY,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IAC3C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAC/C;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,UAAW,wBAAwB,sBAsHlE,CAAC"}
1
+ {"version":3,"file":"ControlMonthPopover.d.ts","sourceRoot":"","sources":["../../src/form/ControlMonthPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,OAAO,CAAC;AAiBtD,MAAM,WAAW,wBAAwB;IACvC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,kEAAkE;IAClE,YAAY,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IAC3C,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAC/C;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,UAAW,wBAAwB,sBAkHlE,CAAC"}
@@ -27,7 +27,6 @@ const ControlMonthPopover = (props) => {
27
27
  const month = match ? Number(match[2]) : void 0;
28
28
  const [shownYear, setShownYear] = useState(() => year ?? (/* @__PURE__ */ new Date()).getFullYear());
29
29
  const key = (y, m) => `${String(y).padStart(4, "0")}-${String(m).padStart(2, "0")}`;
30
- const outOfRange = (value) => props.min !== void 0 && value < props.min || props.max !== void 0 && value > props.max;
31
30
  const formatted = year !== void 0 && month !== void 0 ? l(new Date(year, month - 1, 1), { date: {
32
31
  year: "numeric",
33
32
  month: "long"
@@ -94,7 +93,6 @@ const ControlMonthPopover = (props) => {
94
93
  size: "sm",
95
94
  "data-value": value,
96
95
  "aria-pressed": selected,
97
- disabled: outOfRange(value),
98
96
  onClick: () => {
99
97
  props.onChange(value);
100
98
  setOpen(false);
@@ -1 +1 @@
1
- {"version":3,"file":"ControlMonthPopover.js","names":["CalendarIcon","ChevronDownIcon"],"sources":["../../src/form/ControlMonthPopover.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useI18n } from \"alepha/react/i18n\";\nimport {\n CalendarDays as CalendarIcon,\n ChevronDown as ChevronDownIcon,\n ChevronLeft,\n ChevronRight,\n} from \"lucide-react\";\nimport { type HTMLAttributes, useState } from \"react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../core/Popover.tsx\";\nimport { cn } from \"../core/utils.ts\";\nimport {\n ControlClearButton,\n TRIGGER_CLASSES,\n TRIGGER_SIZES,\n TRIGGER_WRAPPER_CLASSES,\n} from \"./fieldTrigger.tsx\";\n\n/**\n * A month as a form holds it: `YYYY-MM`, the value of `<input type=\"month\">`.\n */\nconst MONTH = /^(\\d{4})-(\\d{2})$/;\n\nexport interface ControlMonthPopoverProps {\n id?: string;\n value?: string;\n disabled?: boolean;\n clearable?: boolean;\n /** First selectable month, `YYYY-MM`. */\n min?: string;\n /** Last selectable month, `YYYY-MM`. */\n max?: string;\n /** Forwarded to the trigger: an `aria-label`, a `data-testid`. */\n triggerProps?: HTMLAttributes<HTMLElement>;\n onChange: (value: string | undefined) => void;\n}\n\n/**\n * The month picker: the kit's field trigger, then a year with its twelve\n * months. For a period that is a whole month (a report, an invoice), where a\n * day picker would ask for a day nobody means.\n *\n * The value is `YYYY-MM`, so a schema reads it as a plain string and a\n * server parses it without a time zone.\n */\nexport const ControlMonthPopover = (props: ControlMonthPopoverProps) => {\n const { tr, l, lang } = useI18n();\n const [open, setOpen] = useState(false);\n const match = props.value ? MONTH.exec(props.value) : null;\n const year = match ? Number(match[1]) : undefined;\n const month = match ? Number(match[2]) : undefined;\n const [shownYear, setShownYear] = useState(\n () => year ?? new Date().getFullYear(),\n );\n\n const key = (y: number, m: number) =>\n `${String(y).padStart(4, \"0\")}-${String(m).padStart(2, \"0\")}`;\n const outOfRange = (value: string) =>\n (props.min !== undefined && value < props.min) ||\n (props.max !== undefined && value > props.max);\n\n const formatted =\n year !== undefined && month !== undefined\n ? l(new Date(year, month - 1, 1), {\n date: { year: \"numeric\", month: \"long\" },\n })\n : \"\";\n const monthName = (m: number) =>\n new Date(2000, m - 1, 1).toLocaleString(lang, { month: \"short\" });\n\n const showClear = Boolean(props.clearable && match && !props.disabled);\n const size = TRIGGER_SIZES.default;\n\n return (\n <Popover\n open={open}\n onOpenChange={(next) => {\n if (next && year !== undefined) setShownYear(year);\n setOpen(next);\n }}\n >\n <div className={TRIGGER_WRAPPER_CLASSES}>\n <PopoverTrigger\n {...props.triggerProps}\n id={props.id}\n data-slot=\"date-trigger\"\n disabled={props.disabled}\n className={cn(\n TRIGGER_CLASSES,\n size.trigger,\n size.chevron,\n !match && \"text-muted-foreground\",\n )}\n >\n <span\n data-slot=\"trigger-label\"\n className={cn(\n \"flex min-w-0 items-center gap-2\",\n showClear && size.clearGap,\n )}\n >\n <CalendarIcon\n className={cn(\"text-muted-foreground shrink-0\", size.icon)}\n />\n <span className=\"truncate\">\n {formatted ||\n tr(\"controlMonth.placeholder\", { default: \"Pick a month\" })}\n </span>\n </span>\n <ChevronDownIcon className=\"text-muted-foreground pointer-events-none size-4 shrink-0\" />\n </PopoverTrigger>\n {showClear && (\n <ControlClearButton onClick={() => props.onChange(undefined)} />\n )}\n </div>\n <PopoverContent className=\"w-64 p-2\" align=\"start\">\n <div className=\"mb-2 flex items-center justify-between\">\n <Button\n variant=\"minimal\"\n size=\"icon-sm\"\n aria-label={tr(\"controlMonth.previousYear\", {\n default: \"Previous year\",\n })}\n onClick={() => setShownYear((it) => it - 1)}\n >\n <ChevronLeft className=\"rtl:-scale-x-100\" />\n </Button>\n <span className=\"text-sm font-medium tabular-nums\">{shownYear}</span>\n <Button\n variant=\"minimal\"\n size=\"icon-sm\"\n aria-label={tr(\"controlMonth.nextYear\", { default: \"Next year\" })}\n onClick={() => setShownYear((it) => it + 1)}\n >\n <ChevronRight className=\"rtl:-scale-x-100\" />\n </Button>\n </div>\n <div className=\"grid grid-cols-3 gap-1\">\n {Array.from({ length: 12 }, (_, i) => i + 1).map((m) => {\n const value = key(shownYear, m);\n const selected = year === shownYear && month === m;\n return (\n <Button\n key={m}\n variant={selected ? \"solid\" : \"minimal\"}\n intent={selected ? \"primary\" : \"none\"}\n size=\"sm\"\n data-value={value}\n aria-pressed={selected}\n disabled={outOfRange(value)}\n onClick={() => {\n props.onChange(value);\n setOpen(false);\n }}\n >\n {monthName(m)}\n </Button>\n );\n })}\n </div>\n </PopoverContent>\n </Popover>\n );\n};\n"],"mappings":";;;;;;;;;;;;AA0BA,MAAM,QAAQ;;;;;;;;;AAwBd,MAAa,uBAAuB,UAAoC;CACtE,MAAM,EAAE,IAAI,GAAG,SAAS,QAAQ;CAChC,MAAM,CAAC,MAAM,WAAW,SAAS,KAAK;CACtC,MAAM,QAAQ,MAAM,QAAQ,MAAM,KAAK,MAAM,KAAK,IAAI;CACtD,MAAM,OAAO,QAAQ,OAAO,MAAM,EAAE,IAAI,KAAA;CACxC,MAAM,QAAQ,QAAQ,OAAO,MAAM,EAAE,IAAI,KAAA;CACzC,MAAM,CAAC,WAAW,gBAAgB,eAC1B,yBAAQ,IAAI,KAAK,EAAA,CAAE,YAAY,CACvC;CAEA,MAAM,OAAO,GAAW,MACtB,GAAG,OAAO,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG,EAAE,GAAG,OAAO,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG;CAC5D,M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D;GAAgB,WAAU;GAAW,OAAM;GAA3C,UAAA,CACE,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA;KACE,oBAAC,QAAD;MACE,SAAQ;MACR,MAAK;MACL,cAAY,GAAG,6BAA6B,EAC1C,SAAS,gBACX,CAAC;MACD,eAAe,cAAc,OAAO,KAAK,CAAC;MAE1C,UAAA,oBAAC,aAAD,EAAa,WAAU,mBAAoB,CAAA;KACrC,CAAA;KACR,oBAAC,QAAD;MAAM,WAAU;MAAoC,UAAA;KAAgB,CAAA;KACpE,oBAAC,QAAD;MACE,SAAQ;MACR,MAAK;MACL,cAAY,GAAG,yBAAyB,EAAE,SAAS,YAAY,CAAC;MAChE,eAAe,cAAc,OAAO,KAAK,CAAC;MAE1C,UAAA,oBAAC,cAAD,EAAc,WAAU,mBAAoB,CAAA;KACtC,CAAA;IACL;GACL,CAAA,GAAA,oBAAC,OAAD;IAAK,WAAU;IACZ,UAAA,MAAM,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,MAAM,IAAI,CAAC,CAAC,CAAC,KAAK,MAAM;KACtD,MAAM,QAAQ,IAAI,WAAW,CAAC;KAC9B,MAAM,WAAW,SAAS,aAAa,UAAU;KACjD,OACE,oBAAC,QAAD;MAEE,SAAS,WAAW,UAAU;MAC9B,QAAQ,WAAW,YAAY;MAC/B,MAAK;MACL,cAAY;MACZ,gBAAc;MACd,UAAU,WAAW,KAAK;MAC1B,eAAe;OACb,MAAM,SAAS,KAAK;OACpB,QAAQ,KAAK;MACf;MAEC,UAAA,UAAU,CAAC;KACN,GAbD,CAaC;IAEZ,CAAC;GACE,CAAA,CACS;EACT,CAAA,CAAA;;AAEb"}
1
+ {"version":3,"file":"ControlMonthPopover.js","names":["CalendarIcon","ChevronDownIcon"],"sources":["../../src/form/ControlMonthPopover.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { useI18n } from \"alepha/react/i18n\";\nimport {\n CalendarDays as CalendarIcon,\n ChevronDown as ChevronDownIcon,\n ChevronLeft,\n ChevronRight,\n} from \"lucide-react\";\nimport { type HTMLAttributes, useState } from \"react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"../core/Popover.tsx\";\nimport { cn } from \"../core/utils.ts\";\nimport {\n ControlClearButton,\n TRIGGER_CLASSES,\n TRIGGER_SIZES,\n TRIGGER_WRAPPER_CLASSES,\n} from \"./fieldTrigger.tsx\";\n\n/**\n * A month as a form holds it: `YYYY-MM`, the value of `<input type=\"month\">`.\n */\nconst MONTH = /^(\\d{4})-(\\d{2})$/;\n\nexport interface ControlMonthPopoverProps {\n id?: string;\n value?: string;\n disabled?: boolean;\n clearable?: boolean;\n /** Forwarded to the trigger: an `aria-label`, a `data-testid`. */\n triggerProps?: HTMLAttributes<HTMLElement>;\n onChange: (value: string | undefined) => void;\n}\n\n/**\n * The month picker: the kit's field trigger, then a year with its twelve\n * months. For a period that is a whole month (a report, an invoice), where a\n * day picker would ask for a day nobody means.\n *\n * The value is `YYYY-MM`, so a schema reads it as a plain string and a\n * server parses it without a time zone.\n */\nexport const ControlMonthPopover = (props: ControlMonthPopoverProps) => {\n const { tr, l, lang } = useI18n();\n const [open, setOpen] = useState(false);\n const match = props.value ? MONTH.exec(props.value) : null;\n const year = match ? Number(match[1]) : undefined;\n const month = match ? Number(match[2]) : undefined;\n const [shownYear, setShownYear] = useState(\n () => year ?? new Date().getFullYear(),\n );\n\n const key = (y: number, m: number) =>\n `${String(y).padStart(4, \"0\")}-${String(m).padStart(2, \"0\")}`;\n\n const formatted =\n year !== undefined && month !== undefined\n ? l(new Date(year, month - 1, 1), {\n date: { year: \"numeric\", month: \"long\" },\n })\n : \"\";\n const monthName = (m: number) =>\n new Date(2000, m - 1, 1).toLocaleString(lang, { month: \"short\" });\n\n const showClear = Boolean(props.clearable && match && !props.disabled);\n const size = TRIGGER_SIZES.default;\n\n return (\n <Popover\n open={open}\n onOpenChange={(next) => {\n if (next && year !== undefined) setShownYear(year);\n setOpen(next);\n }}\n >\n <div className={TRIGGER_WRAPPER_CLASSES}>\n <PopoverTrigger\n {...props.triggerProps}\n id={props.id}\n data-slot=\"date-trigger\"\n disabled={props.disabled}\n className={cn(\n TRIGGER_CLASSES,\n size.trigger,\n size.chevron,\n !match && \"text-muted-foreground\",\n )}\n >\n <span\n data-slot=\"trigger-label\"\n className={cn(\n \"flex min-w-0 items-center gap-2\",\n showClear && size.clearGap,\n )}\n >\n <CalendarIcon\n className={cn(\"text-muted-foreground shrink-0\", size.icon)}\n />\n <span className=\"truncate\">\n {formatted ||\n tr(\"controlMonth.placeholder\", { default: \"Pick a month\" })}\n </span>\n </span>\n <ChevronDownIcon className=\"text-muted-foreground pointer-events-none size-4 shrink-0\" />\n </PopoverTrigger>\n {showClear && (\n <ControlClearButton onClick={() => props.onChange(undefined)} />\n )}\n </div>\n <PopoverContent className=\"w-64 p-2\" align=\"start\">\n <div className=\"mb-2 flex items-center justify-between\">\n <Button\n variant=\"minimal\"\n size=\"icon-sm\"\n aria-label={tr(\"controlMonth.previousYear\", {\n default: \"Previous year\",\n })}\n onClick={() => setShownYear((it) => it - 1)}\n >\n <ChevronLeft className=\"rtl:-scale-x-100\" />\n </Button>\n <span className=\"text-sm font-medium tabular-nums\">{shownYear}</span>\n <Button\n variant=\"minimal\"\n size=\"icon-sm\"\n aria-label={tr(\"controlMonth.nextYear\", { default: \"Next year\" })}\n onClick={() => setShownYear((it) => it + 1)}\n >\n <ChevronRight className=\"rtl:-scale-x-100\" />\n </Button>\n </div>\n <div className=\"grid grid-cols-3 gap-1\">\n {Array.from({ length: 12 }, (_, i) => i + 1).map((m) => {\n const value = key(shownYear, m);\n const selected = year === shownYear && month === m;\n return (\n <Button\n key={m}\n variant={selected ? \"solid\" : \"minimal\"}\n intent={selected ? \"primary\" : \"none\"}\n size=\"sm\"\n data-value={value}\n aria-pressed={selected}\n onClick={() => {\n props.onChange(value);\n setOpen(false);\n }}\n >\n {monthName(m)}\n </Button>\n );\n })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UAAU;KACjD,OACE,oBAAC,QAAD;MAEE,SAAS,WAAW,UAAU;MAC9B,QAAQ,WAAW,YAAY;MAC/B,MAAK;MACL,cAAY;MACZ,gBAAc;MACd,eAAe;OACb,MAAM,SAAS,KAAK;OACpB,QAAQ,KAAK;MACf;MAEC,UAAA,UAAU,CAAC;KACN,GAZD,CAYC;IAEZ,CAAC;GACE,CAAA,CACS;EACT,CAAA,CAAA;;AAEb"}
@@ -1 +1 @@
1
- {"version":3,"file":"ControlNumber.d.ts","sourceRoot":"","sources":["../../src/form/ControlNumber.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,mBAAmB,CAAC;AAO3B,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,UAAW,kBAAkB,6BA6FtD,CAAC"}
1
+ {"version":3,"file":"ControlNumber.d.ts","sourceRoot":"","sources":["../../src/form/ControlNumber.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,mBAAmB,CAAC;AAQ3B,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,UAAW,kBAAkB,6BA+FtD,CAAC"}
@@ -2,12 +2,14 @@ import { Input } from "../core/Input.js";
2
2
  import { Slider } from "../core/Slider.js";
3
3
  import { FormField } from "./FormField.js";
4
4
  import { iconFor } from "./iconHint.js";
5
+ import { useFieldErrorText } from "./useFieldErrorText.js";
5
6
  import "react";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
7
8
  import { parseField, useFieldValue, useFormState } from "alepha/react/form";
8
9
  // src/form/ControlNumber.tsx
9
10
  const ControlNumber = (props) => {
10
11
  const form = useFormState(props.input, ["error"]);
12
+ const errorText = useFieldErrorText();
11
13
  const [value, setValue] = useFieldValue(props.input);
12
14
  if (!props.input?.props) return null;
13
15
  const meta = parseField(props.input, {
@@ -15,6 +17,7 @@ const ControlNumber = (props) => {
15
17
  description: props.description,
16
18
  error: form.error
17
19
  });
20
+ meta.error = errorText(meta.error);
18
21
  const min = props.min ?? meta.constraints.minimum;
19
22
  const max = props.max ?? meta.constraints.maximum;
20
23
  if (props.slider) {
@@ -1 +1 @@
1
- {"version":3,"file":"ControlNumber.js","names":[],"sources":["../../src/form/ControlNumber.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport {\n type BaseInputField,\n parseField,\n useFieldValue,\n useFormState,\n} from \"alepha/react/form\";\n\nimport { Input } from \"../core/Input.tsx\";\nimport { Slider } from \"../core/Slider.tsx\";\nimport { FormField } from \"./FormField.tsx\";\nimport { iconFor } from \"./iconHint.tsx\";\n\nexport interface ControlNumberProps {\n /**\n * Bound numeric `InputField` from `useForm`.\n */\n input: BaseInputField;\n /**\n * Field label. Falls back to schema `title`.\n */\n label?: string;\n /**\n * Helper text shown below the input.\n */\n description?: string;\n /**\n * Render as a slider instead of a number input.\n */\n slider?: boolean;\n /**\n * Minimum allowed value. Falls back to schema `minimum`.\n */\n min?: number;\n /**\n * Maximum allowed value. Falls back to schema `maximum`.\n */\n max?: number;\n /**\n * Step size. Defaults to 1.\n */\n step?: number;\n /**\n * Disable the input.\n */\n disabled?: boolean;\n /**\n * Autofocus the input on mount. Ignored by the slider variant, which is not\n * a text field and has nothing to type into.\n */\n autoFocus?: boolean;\n}\n\nexport const ControlNumber = (props: ControlNumberProps) => {\n const form = useFormState(props.input, [\"error\"]);\n const [value, setValue] = useFieldValue(props.input);\n\n if (!props.input?.props) return null;\n\n const meta = parseField(props.input, {\n label: props.label,\n description: props.description,\n error: form.error,\n });\n\n const min = props.min ?? meta.constraints.minimum;\n const max = props.max ?? meta.constraints.maximum;\n\n if (props.slider) {\n const lo = min ?? 0;\n const hi = max ?? 100;\n return (\n <FormField\n onBlur={() => props.input.form?.blur(props.input.path)}\n id={meta.id}\n label={meta.label}\n description={meta.description}\n error={meta.error}\n required={meta.required}\n >\n <div className=\"flex items-center gap-3 py-2\">\n <Slider\n id={meta.id}\n // The `<label for>` above points at the slider's root, which is\n // not the input a screen reader lands on: the thumb takes the\n // label as its own name.\n aria-label={meta.label || undefined}\n min={lo}\n max={hi}\n step={props.step ?? 1}\n disabled={props.disabled}\n value={[Number(value ?? lo)]}\n onValueChange={(v) => setValue(Array.isArray(v) ? v[0] : v)}\n className=\"flex-1\"\n />\n <span className=\"text-muted-foreground w-10 text-end text-sm tabular-nums\">\n {value ?? lo}\n </span>\n </div>\n </FormField>\n );\n }\n\n const Icon = iconFor(meta.iconHint);\n return (\n <FormField\n onBlur={() => props.input.form?.blur(props.input.path)}\n id={meta.id}\n label={meta.label}\n description={meta.description}\n error={meta.error}\n required={meta.required}\n >\n <div className=\"relative\">\n {Icon && (\n <Icon className=\"text-muted-foreground absolute start-3 top-1/2 size-4 -translate-y-1/2\" />\n )}\n <Input\n id={meta.id}\n /*\n * Text controls carry the field name; numeric ones did not, so a number\n * rendered as `<input type=\"number\">` with no `name` at all. Two things\n * depended on it: `AutoForm`'s scroll-to-first-error looks the field up\n * with `document.querySelector('[name=\"…\"]')`, so it silently gave up on\n * numeric fields, and the browser cannot label an unnamed field for\n * autofill. Found while writing e2e tests against a price field that no\n * selector could reach.\n */\n name={props.input.props.name}\n type=\"number\"\n min={min}\n max={max}\n step={props.step}\n disabled={props.disabled}\n // oxlint-disable-next-line jsx-a11y/no-autofocus -- a caller-requested autofocus, see `autoFocus` in form/Control.tsx\n autoFocus={props.autoFocus}\n value={value ?? \"\"}\n onChange={(e) => {\n const v = e.target.value;\n setValue(v === \"\" ? undefined : Number(v));\n }}\n className={Icon ? \"ps-9\" : undefined}\n />\n </div>\n </FormField>\n );\n};\n"],"mappings":";;;;;;;;AAwDA,MAAa,iBAAiB,UAA8B;CAC1D,MAAM,OAAO,aAAa,MAAM,OAAO,CAAC,OAAO,CAAC;CAChD,MAAM,CAAC,OAAO,YAAY,cAAc,MAAM,KAAK;CAEnD,IAAI,CAAC,MAAM,OAAO,OAAO,OAAO;CAEhC,MAAM,OAAO,WAAW,MAAM,OAAO;EACnC,OAAO,MAAM;EACb,aAAa,MAAM;EACnB,OAAO,KAAK;CACd,CAAC;CAED,MAAM,MAAM,MAAM,OAAO,KAAK,YAAY;CAC1C,MAAM,MAAM,MAAM,OAAO,KAAK,YAAY;CAE1C,IAAI,MAAM,QAAQ;EAChB,MAAM,KAAK,OAAO;EAClB,MAAM,KAAK,OAAO;EAClB,OACE,oBAAC,WAAD;GACE,cAAc,MAAM,MAAM,MAAM,KAAK,MAAM,MAAM,IAAI;GACrD,IAAI,KAAK;GACT,OAAO,KAAK;GACZ,aAAa,KAAK;GAClB,OAAO,KAAK;GACZ,UAAU,KAAK;GAEf,UAAA,qBAAC,OAAD;IAAK,WAAU;IAAf,UAAA,CACE,oBAAC,QAAD;KACE,IAAI,KAAK;KAIT,cAAY,KAAK,SAAS,KAAA;KAC1B,KAAK;KACL,KAAK;KACL,MAAM,MAAM,QAAQ;KACpB,UAAU,MAAM;KAChB,OAAO,CAAC,OAAO,SAAS,EAAE,CAAC;KAC3B,gBAAgB,MAAM,SAAS,MAAM,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;KAC1D,WAAU;IACX,CAAA,GACD,oBAAC,QAAD;KAAM,WAAU;KACb,UAAA,SAAS;IACN,CAAA,CACH;;EACI,CAAA;CAEf;CAEA,MAAM,OAAO,QAAQ,KAAK,QAAQ;CAClC,OACE,oBAAC,WAAD;EACE,cAAc,MAAM,MAAM,MAAM,KAAK,MAAM,MAAM,IAAI;EACrD,IAAI,KAAK;EACT,OAAO,KAAK;EACZ,aAAa,KAAK;EAClB,OAAO,KAAK;EACZ,UAAU,KAAK;EAEf,UAAA,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACG,QACC,oBAAC,MAAD,EAAM,WAAU,yEAA0E,CAAA,GAE5F,oBAAC,OAAD;IACE,IAAI,KAAK;IAUT,MAAM,MAAM,MAAM,MAAM;IACxB,MAAK;IACA;IACA;IACL,MAAM,MAAM;IACZ,UAAU,MAAM;IAEhB,WAAW,MAAM;IACjB,OAAO,SAAS;IAChB,WAAW,MAAM;KACf,MAAM,IAAI,EAAE,OAAO;KACnB,SAAS,MAAM,KAAK,KAAA,IAAY,OAAO,CAAC,CAAC;IAC3C;IACA,WAAW,OAAO,SAAS,KAAA;GAC5B,CAAA,CACE;;CACI,CAAA;AAEf"}
1
+ {"version":3,"file":"ControlNumber.js","names":[],"sources":["../../src/form/ControlNumber.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport {\n type BaseInputField,\n parseField,\n useFieldValue,\n useFormState,\n} from \"alepha/react/form\";\n\nimport { Input } from \"../core/Input.tsx\";\nimport { Slider } from \"../core/Slider.tsx\";\nimport { FormField } from \"./FormField.tsx\";\nimport { iconFor } from \"./iconHint.tsx\";\nimport { useFieldErrorText } from \"./useFieldErrorText.ts\";\n\nexport interface ControlNumberProps {\n /**\n * Bound numeric `InputField` from `useForm`.\n */\n input: BaseInputField;\n /**\n * Field label. Falls back to schema `title`.\n */\n label?: string;\n /**\n * Helper text shown below the input.\n */\n description?: string;\n /**\n * Render as a slider instead of a number input.\n */\n slider?: boolean;\n /**\n * Minimum allowed value. Falls back to schema `minimum`.\n */\n min?: number;\n /**\n * Maximum allowed value. Falls back to schema `maximum`.\n */\n max?: number;\n /**\n * Step size. Defaults to 1.\n */\n step?: number;\n /**\n * Disable the input.\n */\n disabled?: boolean;\n /**\n * Autofocus the input on mount. Ignored by the slider variant, which is not\n * a text field and has nothing to type into.\n */\n autoFocus?: boolean;\n}\n\nexport const ControlNumber = (props: ControlNumberProps) => {\n const form = useFormState(props.input, [\"error\"]);\n const errorText = useFieldErrorText();\n const [value, setValue] = useFieldValue(props.input);\n\n if (!props.input?.props) return null;\n\n const meta = parseField(props.input, {\n label: props.label,\n description: props.description,\n error: form.error,\n });\n meta.error = errorText(meta.error);\n\n const min = props.min ?? meta.constraints.minimum;\n const max = props.max ?? meta.constraints.maximum;\n\n if (props.slider) {\n const lo = min ?? 0;\n const hi = max ?? 100;\n return (\n <FormField\n onBlur={() => props.input.form?.blur(props.input.path)}\n id={meta.id}\n label={meta.label}\n description={meta.description}\n error={meta.error}\n required={meta.required}\n >\n <div className=\"flex items-center gap-3 py-2\">\n <Slider\n id={meta.id}\n // The `<label for>` above points at the slider's root, which is\n // not the input a screen reader lands on: the thumb takes the\n // label as its own name.\n aria-label={meta.label || undefined}\n min={lo}\n max={hi}\n step={props.step ?? 1}\n disabled={props.disabled}\n value={[Number(value ?? lo)]}\n onValueChange={(v) => setValue(Array.isArray(v) ? v[0] : v)}\n className=\"flex-1\"\n />\n <span className=\"text-muted-foreground w-10 text-end text-sm tabular-nums\">\n {value ?? lo}\n </span>\n </div>\n </FormField>\n );\n }\n\n const Icon = iconFor(meta.iconHint);\n return (\n <FormField\n onBlur={() => props.input.form?.blur(props.input.path)}\n id={meta.id}\n label={meta.label}\n description={meta.description}\n error={meta.error}\n required={meta.required}\n >\n <div className=\"relative\">\n {Icon && (\n <Icon className=\"text-muted-foreground absolute start-3 top-1/2 size-4 -translate-y-1/2\" />\n )}\n <Input\n id={meta.id}\n /*\n * Text controls carry the field name; numeric ones did not, so a number\n * rendered as `<input type=\"number\">` with no `name` at all. Two things\n * depended on it: `AutoForm`'s scroll-to-first-error looks the field up\n * with `document.querySelector('[name=\"…\"]')`, so it silently gave up on\n * numeric fields, and the browser cannot label an unnamed field for\n * autofill. Found while writing e2e tests against a price field that no\n * selector could reach.\n */\n name={props.input.props.name}\n type=\"number\"\n min={min}\n max={max}\n step={props.step}\n disabled={props.disabled}\n // oxlint-disable-next-line jsx-a11y/no-autofocus -- a caller-requested autofocus, see `autoFocus` in form/Control.tsx\n autoFocus={props.autoFocus}\n value={value ?? \"\"}\n onChange={(e) => {\n const v = e.target.value;\n setValue(v === \"\" ? undefined : Number(v));\n }}\n className={Icon ? \"ps-9\" : undefined}\n />\n </div>\n </FormField>\n );\n};\n"],"mappings":";;;;;;;;;AAyDA,MAAa,iBAAiB,UAA8B;CAC1D,MAAM,OAAO,aAAa,MAAM,OAAO,CAAC,OAAO,CAAC;CAChD,MAAM,YAAY,kBAAkB;CACpC,MAAM,CAAC,OAAO,YAAY,cAAc,MAAM,KAAK;CAEnD,IAAI,CAAC,MAAM,OAAO,OAAO,OAAO;CAEhC,MAAM,OAAO,WAAW,MAAM,OAAO;EACnC,OAAO,MAAM;EACb,aAAa,MAAM;EACnB,OAAO,KAAK;CACd,CAAC;CACD,KAAK,QAAQ,UAAU,KAAK,KAAK;CAEjC,MAAM,M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S,MAAM,KAAK,KAAA,IAAY,OAAO,CAAC,CAAC;IAC3C;IACA,WAAW,OAAO,SAAS,KAAA;GAC5B,CAAA,CACE;;CACI,CAAA;AAEf"}
@@ -1 +1 @@
1
- {"version":3,"file":"ControlObject.d.ts","sourceRoot":"","sources":["../../src/form/ControlObject.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EACL,KAAK,cAAc,EAKpB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAK3D,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpE;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,UAAW,kBAAkB,6BA4JtD,CAAC"}
1
+ {"version":3,"file":"ControlObject.d.ts","sourceRoot":"","sources":["../../src/form/ControlObject.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EACL,KAAK,cAAc,EAKpB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAM3D,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACxB;;OAEG;IACH,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAAC;IAC/B;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpE;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;;;;;;;;;OAaG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,UAAW,kBAAkB,6BA8JtD,CAAC"}
@@ -3,6 +3,7 @@ import { Control } from "./Control.js";
3
3
  import { childI18nPrefix, resolveFieldI18n } from "./fieldI18n.js";
4
4
  import { FormFieldRequiredMark } from "./FormFieldRequiredMark.js";
5
5
  import { spanClass, widthFor } from "./grid.js";
6
+ import { useFieldErrorText } from "./useFieldErrorText.js";
6
7
  import { useAlepha } from "alepha/react";
7
8
  import { useI18n } from "alepha/react/i18n";
8
9
  import { ChevronDown, ChevronRight, Plus, Trash2 } from "lucide-react";
@@ -13,6 +14,7 @@ import { parseField, useFieldValue, useFormState } from "alepha/react/form";
13
14
  // src/form/ControlObject.tsx
14
15
  const ControlObject = (props) => {
15
16
  const form = useFormState(props.input, ["error"]);
17
+ const errorText = useFieldErrorText();
16
18
  const [value, setValue] = useFieldValue(props.input);
17
19
  const [expanded, setExpanded] = useState(props.defaultExpanded ?? true);
18
20
  const { tr } = useI18n();
@@ -35,6 +37,7 @@ const ControlObject = (props) => {
35
37
  description: props.description,
36
38
  error: form.error
37
39
  });
40
+ meta.error = errorText(meta.error);
38
41
  const schema = z.schema.unwrap(props.input.schema);
39
42
  if (!z.schema.isObject(schema)) return null;
40
43
  const isInitialized = value != null && typeof value === "object";
@@ -1 +1 @@
1
- {"version":3,"file":"ControlObject.js","names":[],"sources":["../../src/form/ControlObject.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { type ZObject, z } from \"alepha\";\nimport { useAlepha } from \"alepha/react\";\nimport {\n type BaseInputField,\n type ObjectInputField,\n parseField,\n useFieldValue,\n useFormState,\n} from \"alepha/react/form\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport { ChevronDown, ChevronRight, Plus, Trash2 } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport { Control, type ControlProps } from \"./Control.tsx\";\nimport { childI18nPrefix, resolveFieldI18n } from \"./fieldI18n.ts\";\nimport { FormFieldRequiredMark } from \"./FormFieldRequiredMark.tsx\";\nimport { spanClass, widthFor } from \"./grid.tsx\";\n\nexport interface ControlObjectProps {\n /**\n * Bound object `InputField` from `useForm`.\n */\n input: BaseInputField;\n /**\n * Field label. Falls back to schema `title`.\n */\n label?: string;\n /**\n * Helper text shown below the group.\n */\n description?: string;\n /**\n * Number of grid columns. @default 1\n */\n columns?: 1 | 2 | 3 | 4;\n /**\n * \"fieldset\" wraps in a bordered container with legend. \"plain\" renders fields only.\n */\n variant?: \"fieldset\" | \"plain\";\n /**\n * Per-field control props override, keyed by field name.\n */\n controlProps?: Record<string, Partial<Omit<ControlProps, \"input\">>>;\n /**\n * Disable the group and all inner controls.\n */\n disabled?: boolean;\n /**\n * Default expanded state. @default true\n */\n defaultExpanded?: boolean;\n /**\n * Dictionary prefix for this object's children (see `resolveFieldI18n`).\n */\n i18nPrefix?: string;\n /**\n * Take the clear button away from an optional object.\n *\n * The schema decides by default: an optional or nullable object that has\n * been initialised offers the button, and `false` opts out - the same way\n * round as a text field's `clearable`, and for the same reason. Pass\n * `false` when clearing is not something the API can honour, so the button\n * does not promise an edit that silently does nothing.\n *\n * This used to be opt-IN, which made the button unreachable: `Control` is\n * the only thing that mounts this component and it never passed the prop,\n * so an initialised optional object could not be cleared from the UI at\n * all.\n */\n clearable?: boolean;\n}\n\nexport const ControlObject = (props: ControlObjectProps) => {\n const form = useFormState(props.input, [\"error\"]);\n const [value, setValue] = useFieldValue(props.input);\n const [expanded, setExpanded] = useState(props.defaultExpanded ?? true);\n const { tr } = useI18n();\n const alepha = useAlepha();\n\n // An error under a collapsed object must be reachable: open it the moment\n // one lands on a field inside, so the field mounts and shows it (and\n // `AutoForm` can bring it into view).\n const formId = props.input?.form?.id;\n const path = props.input?.path;\n useEffect(() => {\n if (!formId || !path) return;\n return alepha.events.on(\"form:errors:changed\", (event) => {\n if (\n event.id === formId &&\n Object.keys(event.errors).some((key) => key.startsWith(`${path}/`))\n ) {\n setExpanded(true);\n }\n });\n }, [alepha, formId, path]);\n\n if (!props.input?.props) return null;\n\n const meta = parseField(props.input, {\n label: props.label,\n description: props.description,\n error: form.error,\n });\n\n // The field schema may be wrapped (optional/nullable/default); peel to the\n // ZodObject before reading its shape.\n const schema = z.schema.unwrap(props.input.schema) as ZObject;\n if (!z.schema.isObject(schema)) return null;\n\n // ── Init / clear ────────────────────────────────────────────────\n const isInitialized = value != null && typeof value === \"object\";\n\n // `clearable !== false`, not `clearable === true`: the schema is the\n // answer, and a caller opts out. A required object has nothing to clear to.\n const showClear =\n isInitialized &&\n !meta.required &&\n !props.disabled &&\n props.clearable !== false;\n\n const fieldNames = Object.keys(z.schema.shape(schema));\n const nestedItems = (props.input as ObjectInputField<ZObject>).items as\n | Record<string, BaseInputField>\n | undefined;\n\n const grid = (\n <div className=\"grid grid-cols-12 gap-3\">\n {fieldNames.map((name) => {\n const field = nestedItems?.[name];\n if (!field) return null;\n const fieldProps = {\n ...props.controlProps?.[name],\n ...resolveFieldI18n(\n tr,\n props.i18nPrefix,\n name,\n props.controlProps?.[name] ?? {},\n ),\n i18nPrefix: childI18nPrefix(props.i18nPrefix, name),\n };\n const width = widthFor(field, fieldProps.width as number | undefined);\n return (\n <div key={name} className={spanClass(width)}>\n <Control input={field} disabled={props.disabled} {...fieldProps} />\n </div>\n );\n })}\n </div>\n );\n\n if (props.variant === \"plain\") return grid;\n\n return (\n <fieldset\n className={`rounded-md border p-3 ${\n meta.error ? \"border-danger\" : \"border-border\"\n }`}\n >\n <div className=\"flex items-start gap-3\">\n {!isInitialized && !props.disabled ? (\n <Button\n type=\"button\"\n variant=\"outlined\"\n size=\"icon\"\n className=\"size-8 shrink-0\"\n aria-label={tr(\"controlObject.initialize\", {\n default: \"Initialize\",\n })}\n onClick={() => setValue({})}\n >\n <Plus className=\"size-4\" />\n </Button>\n ) : showClear ? (\n <Button\n type=\"button\"\n variant=\"minimal\"\n size=\"icon\"\n className=\"size-8 shrink-0\"\n aria-label={tr(\"controlObject.clear\", { default: \"Clear\" })}\n onClick={() => setValue(undefined)}\n >\n <Trash2 className=\"size-4\" />\n </Button>\n ) : // No placeholder when there is no button: an empty 32px box\n // indented the title past the field labels below it (#Q3426).\n null}\n <div className=\"flex min-w-0 flex-1 flex-col\">\n {meta.label && (\n <legend className=\"text-sm leading-tight font-medium\">\n {meta.label}\n {meta.required && <FormFieldRequiredMark />}\n </legend>\n )}\n {meta.description && (\n <p className=\"text-muted-foreground text-xs leading-tight\">\n {meta.description}\n </p>\n )}\n {meta.error && (\n <p className=\"text-danger-text text-xs leading-tight\">\n {meta.error}\n </p>\n )}\n </div>\n {isInitialized && (\n <Button\n type=\"button\"\n variant=\"minimal\"\n size=\"icon\"\n className=\"size-8 shrink-0\"\n aria-label={\n expanded\n ? tr(\"controlObject.collapse\", { default: \"Collapse\" })\n : tr(\"controlObject.expand\", { default: \"Expand\" })\n }\n onClick={() => setExpanded((e) => !e)}\n >\n {expanded ? (\n <ChevronDown className=\"size-4\" />\n ) : (\n <ChevronRight className=\"size-4 rtl:-scale-x-100\" />\n )}\n </Button>\n )}\n </div>\n {expanded && isInitialized && <div className=\"mt-3\">{grid}</div>}\n </fieldset>\n );\n};\n"],"mappings":";;;;;;;;;;;;;AA6EA,MAAa,iBAAiB,UAA8B;CAC1D,MAAM,OAAO,aAAa,MAAM,OAAO,CAAC,OAAO,CAAC;CAChD,MAAM,CAAC,OAAO,YAAY,cAAc,MAAM,KAAK;CACnD,MAAM,CAAC,UAAU,eAAe,SAAS,MAAM,mBAAmB,IAAI;CACtE,MAAM,EAAE,OAAO,QAAQ;CACvB,MAAM,SAAS,UAAU;CAKzB,MAAM,SAAS,MAAM,OAAO,MAAM;CAClC,MAAM,OAAO,MAAM,OAAO;CAC1B,gBAAgB;EACd,IAAI,CAAC,UAAU,CAAC,MAAM;EACtB,OAAO,OAAO,OAAO,GAAG,wBAAwB,UAAU;GACxD,IACE,MAAM,OAAO,UACb,OAAO,KAAK,MAAM,MAAM,CAAC,CAAC,MAAM,QAAQ,IAAI,WAAW,GAAG,KAAK,EAAE,CAAC,GAElE,YAAY,IAAI;EAEpB,CAAC;CACH,GAAG;EAAC;EAAQ;EAAQ;CAAI,CAAC;CAEzB,IAAI,CAAC,MAAM,OAAO,OAAO,OAAO;CAEhC,MAAM,OAAO,WAAW,MAAM,OAAO;EACnC,OAAO,MAAM;EACb,aAAa,MAAM;EACnB,OAAO,KAAK;CACd,CAAC;CAID,MAAM,SAAS,EAAE,OAAO,OAAO,MAAM,MAAM,MAAM;CACjD,IAAI,CAAC,EAAE,OAAO,SAAS,MAAM,GAAG,OAAO;CAGvC,MAAM,gBAAgB,SAAS,QAAQ,OAAO,UAAU;CAIxD,MAAM,YACJ,iBACA,CAAC,KAAK,YACN,CAAC,MAAM,YACP,MAAM,cAAc;CAEtB,MAAM,aAA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AAK,SACJ,qBAAC,UAAD;OAAQ,WAAU;OAAlB,UAAA,CACG,KAAK,OACL,KAAK,YAAY,oBAAC,uBAAD,CAAwB,CAAA,CACpC;;MAET,KAAK,eACJ,oBAAC,KAAD;OAAG,WAAU;OACV,UAAA,KAAK;MACL,CAAA;MAEJ,KAAK,SACJ,oBAAC,KAAD;OAAG,WAAU;OACV,UAAA,KAAK;MACL,CAAA;KAEF;;IACJ,iBACC,oBAAC,QAAD;KACE,MAAK;KACL,SAAQ;KACR,MAAK;KACL,WAAU;KACV,cACE,WACI,GAAG,0BAA0B,EAAE,SAAS,WAAW,CAAC,IACpD,GAAG,wBAAwB,EAAE,SAAS,SAAS,CAAC;KAEtD,eAAe,aAAa,MAAM,CAAC,CAAC;KAEnC,UAAA,WACC,oBAAC,aAAD,EAAa,WAAU,SAAU,CAAA,IAEjC,oBAAC,cAAD,EAAc,WAAU,0BAA2B,CAAA;IAE/C,CAAA;GAEP;EACJ,CAAA,GAAA,YAAY,iBAAiB,oBAAC,OAAD;GAAK,WAAU;GAAQ,UAAA;EAAU,CAAA,CACvD;;AAEd"}
1
+ {"version":3,"file":"ControlObject.js","names":[],"sources":["../../src/form/ControlObject.tsx"],"sourcesContent":["import * as React from \"react\";\n\nvoid React;\n\nimport { type ZObject, z } from \"alepha\";\nimport { useAlepha } from \"alepha/react\";\nimport {\n type BaseInputField,\n type ObjectInputField,\n parseField,\n useFieldValue,\n useFormState,\n} from \"alepha/react/form\";\nimport { useI18n } from \"alepha/react/i18n\";\nimport { ChevronDown, ChevronRight, Plus, Trash2 } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport { Control, type ControlProps } from \"./Control.tsx\";\nimport { childI18nPrefix, resolveFieldI18n } from \"./fieldI18n.ts\";\nimport { FormFieldRequiredMark } from \"./FormFieldRequiredMark.tsx\";\nimport { spanClass, widthFor } from \"./grid.tsx\";\nimport { useFieldErrorText } from \"./useFieldErrorText.ts\";\n\nexport interface ControlObjectProps {\n /**\n * Bound object `InputField` from `useForm`.\n */\n input: BaseInputField;\n /**\n * Field label. Falls back to schema `title`.\n */\n label?: string;\n /**\n * Helper text shown below the group.\n */\n description?: string;\n /**\n * Number of grid columns. @default 1\n */\n columns?: 1 | 2 | 3 | 4;\n /**\n * \"fieldset\" wraps in a bordered container with legend. \"plain\" renders fields only.\n */\n variant?: \"fieldset\" | \"plain\";\n /**\n * Per-field control props override, keyed by field name.\n */\n controlProps?: Record<string, Partial<Omit<ControlProps, \"input\">>>;\n /**\n * Disable the group and all inner controls.\n */\n disabled?: boolean;\n /**\n * Default expanded state. @default true\n */\n defaultExpanded?: boolean;\n /**\n * Dictionary prefix for this object's children (see `resolveFieldI18n`).\n */\n i18nPrefix?: string;\n /**\n * Take the clear button away from an optional object.\n *\n * The schema decides by default: an optional or nullable object that has\n * been initialised offers the button, and `false` opts out - the same way\n * round as a text field's `clearable`, and for the same reason. Pass\n * `false` when clearing is not something the API can honour, so the button\n * does not promise an edit that silently does nothing.\n *\n * This used to be opt-IN, which made the button unreachable: `Control` is\n * the only thing that mounts this component and it never passed the prop,\n * so an initialised optional object could not be cleared from the UI at\n * all.\n */\n clearable?: boolean;\n}\n\nexport const ControlObject = (props: ControlObjectProps) => {\n const form = useFormState(props.input, [\"error\"]);\n const errorText = useFieldErrorText();\n const [value, setValue] = useFieldValue(props.input);\n const [expanded, setExpanded] = useState(props.defaultExpanded ?? true);\n const { tr } = useI18n();\n const alepha = useAlepha();\n\n // An error under a collapsed object must be reachable: open it the moment\n // one lands on a field inside, so the field mounts and shows it (and\n // `AutoForm` can bring it into view).\n const formId = props.input?.form?.id;\n const path = props.input?.path;\n useEffect(() => {\n if (!formId || !path) return;\n return alepha.events.on(\"form:errors:changed\", (event) => {\n if (\n event.id === formId &&\n Object.keys(event.errors).some((key) => key.startsWith(`${path}/`))\n ) {\n setExpanded(true);\n }\n });\n }, [alepha, formId, path]);\n\n if (!props.input?.props) return null;\n\n const meta = parseField(props.input, {\n label: props.label,\n description: props.description,\n error: form.error,\n });\n meta.error = errorText(meta.error);\n\n // The field schema may be wrapped (optional/nullable/default); peel to the\n // ZodObject before reading its shape.\n const schema = z.schema.unwrap(props.input.schema) as ZObject;\n if (!z.schema.isObject(schema)) return null;\n\n // ── Init / clear ────────────────────────────────────────────────\n const isInitialized = value != null && typeof value === \"object\";\n\n // `clearable !== false`, not `clearable === true`: the schema is the\n // answer, and a caller opts out. A required object has nothing to clear to.\n const showClear =\n isInitialized &&\n !meta.required &&\n !props.disabled &&\n props.clearable !== false;\n\n const fieldNames = Object.keys(z.schema.shape(schema));\n const nestedItems = (props.input as ObjectInputField<ZObject>).items as\n | Record<string, BaseInputField>\n | undefined;\n\n const grid = (\n <div className=\"grid grid-cols-12 gap-3\">\n {fieldNames.map((name) => {\n const field = nestedItems?.[name];\n if (!field) return null;\n const fieldProps = {\n ...props.controlProps?.[name],\n ...resolveFieldI18n(\n tr,\n props.i18nPrefix,\n name,\n props.controlProps?.[name] ?? {},\n ),\n i18nPrefix: childI18nPrefix(props.i18nPrefix, name),\n };\n const width = widthFor(field, fieldProps.width as number | undefined);\n return (\n <div key={name} className={spanClass(width)}>\n <Control input={field} disabled={props.disabled} {...fieldProps} />\n </div>\n );\n })}\n </div>\n );\n\n if (props.variant === \"plain\") return grid;\n\n return (\n <fieldset\n className={`rounded-md border p-3 ${\n meta.error ? \"border-danger\" : \"border-border\"\n }`}\n >\n <div className=\"flex items-start gap-3\">\n {!isInitialized && !props.disabled ? (\n <Button\n type=\"button\"\n variant=\"outlined\"\n size=\"icon\"\n className=\"size-8 shrink-0\"\n aria-label={tr(\"controlObject.initialize\", {\n default: \"Initialize\",\n })}\n onClick={() => setValue({})}\n >\n <Plus className=\"size-4\" />\n </Button>\n ) : showClear ? (\n <Button\n type=\"button\"\n variant=\"minimal\"\n size=\"icon\"\n className=\"size-8 shrink-0\"\n aria-label={tr(\"controlObject.clear\", { default: \"Clear\" })}\n onClick={() => setValue(undefined)}\n >\n <Trash2 className=\"size-4\" />\n </Button>\n ) : // No placeholder when there is no button: an empty 32px box\n // indented the title past the field labels below it (#Q3426).\n null}\n <div className=\"flex min-w-0 flex-1 flex-col\">\n {meta.label && (\n <legend className=\"text-sm leading-tight font-medium\">\n {meta.label}\n {meta.required && <FormFieldRequiredMark />}\n </legend>\n )}\n {meta.description && (\n <p className=\"text-muted-foreground text-xs leading-tight\">\n {meta.description}\n </p>\n )}\n {meta.error && (\n <p className=\"text-danger-text text-xs leading-tight\">\n {meta.error}\n </p>\n )}\n </div>\n {isInitialized && (\n <Button\n type=\"button\"\n variant=\"minimal\"\n size=\"icon\"\n className=\"size-8 shrink-0\"\n aria-label={\n expanded\n ? tr(\"controlObject.collapse\", { default: \"Collapse\" })\n : tr(\"controlObject.expand\", { default: \"Expand\" })\n }\n onClick={() => setExpanded((e) => !e)}\n >\n {expanded ? (\n <ChevronDown className=\"size-4\" />\n ) : (\n <ChevronRight className=\"size-4 rtl:-scale-x-100\" />\n )}\n </Button>\n )}\n </div>\n {expanded && isInitialized && <div className=\"mt-3\">{grid}</div>}\n </fieldset>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AA8EA,MAAa,iBAAiB,UAA8B;CAC1D,MAAM,OAAO,aAAa,MAAM,OAAO,CAAC,OAAO,CAAC;CAChD,MAAM,YAAY,kBAAkB;CACpC,MAAM,CAAC,OAAO,YAAY,cAAc,MAAM,KAAK;CACnD,MAAM,CAAC,UAAU,eAAe,SAAS,MAAM,mBAAmB,IAAI;CACtE,MAAM,EAAE,OAAO,QAAQ;CACvB,MAAM,SAAS,UAAU;CAKzB,MAAM,SAAS,MAAM,OAAO,MAAM;CAClC,MAAM,OAAO,MAAM,OAAO;CAC1B,gBAAgB;EACd,IAAI,CAAC,UAAU,CAAC,MAAM;EACtB,OAAO,OAAO,OAAO,GAAG,wBAAwB,UAAU;GACxD,IACE,MAAM,OAAO,UACb,OAAO,KAAK,MAAM,MAAM,CAAC,CAAC,MAAM,QAAQ,IA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,8 @@ export interface ControlPasswordProps {
24
24
  /**
25
25
  * Masked password field with a reveal toggle.
26
26
  *
27
- * Lives outside `Control` so a hand-built form — a dialog that is not driven by
28
- * a schema — gets the same field the schema path renders, rather than pairing a
27
+ * Lives outside `Control` so a hand-built form (a dialog that is not driven by
28
+ * a schema) gets the same field the schema path renders, rather than pairing a
29
29
  * bare `<Input type="password">` with no way to check what was typed.
30
30
  */
31
31
  export declare const ControlPassword: (props: ControlPasswordProps) => import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"ControlPassword.d.ts","sourceRoot":"","sources":["../../src/form/ControlPassword.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,OAAO,CAAC;AAKtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,UAAW,oBAAoB,gCA2D1D,CAAC"}
1
+ {"version":3,"file":"ControlPassword.d.ts","sourceRoot":"","sources":["../../src/form/ControlPassword.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,OAAO,CAAC;AAKtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;IACzC,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,UAAW,oBAAoB,gCAgE1D,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import { Button } from "../core/Button.js";
2
2
  import { Input } from "../core/Input.js";
3
3
  import { FormField, formFieldAriaProps } from "./FormField.js";
4
+ import { useI18n } from "alepha/react/i18n";
4
5
  import { Eye, EyeOff } from "lucide-react";
5
6
  import { useState } from "react";
6
7
  import { jsx, jsxs } from "react/jsx-runtime";
@@ -8,11 +9,12 @@ import { jsx, jsxs } from "react/jsx-runtime";
8
9
  /**
9
10
  * Masked password field with a reveal toggle.
10
11
  *
11
- * Lives outside `Control` so a hand-built form — a dialog that is not driven by
12
- * a schema — gets the same field the schema path renders, rather than pairing a
12
+ * Lives outside `Control` so a hand-built form (a dialog that is not driven by
13
+ * a schema) gets the same field the schema path renders, rather than pairing a
13
14
  * bare `<Input type="password">` with no way to check what was typed.
14
15
  */
15
16
  const ControlPassword = (props) => {
17
+ const { tr } = useI18n();
16
18
  const [reveal, setReveal] = useState(false);
17
19
  const Icon = props.icon;
18
20
  return /* @__PURE__ */ jsx(FormField, {
@@ -52,7 +54,7 @@ const ControlPassword = (props) => {
52
54
  size: "icon",
53
55
  disabled: props.disabled,
54
56
  onClick: () => setReveal((r) => !r),
55
- "aria-label": reveal ? "Hide password" : "Show password",
57
+ "aria-label": reveal ? tr("controlPassword.hide", { default: "Hide password" }) : tr("controlPassword.show", { default: "Show password" }),
56
58
  className: "text-muted-foreground hover:text-foreground absolute inset-y-0 end-1 my-auto size-7",
57
59
  children: reveal ? /* @__PURE__ */ jsx(EyeOff, { className: "size-4" }) : /* @__PURE__ */ jsx(Eye, { className: "size-4" })
58
60
  })
@@ -1 +1 @@
1
- {"version":3,"file":"ControlPassword.js","names":[],"sources":["../../src/form/ControlPassword.tsx"],"sourcesContent":["import { Eye, EyeOff } from \"lucide-react\";\nimport { type HTMLAttributes, useState } from \"react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport { Input } from \"../core/Input.tsx\";\nimport { FormField, formFieldAriaProps } from \"./FormField.tsx\";\nimport type { IconComponent } from \"./iconHint.tsx\";\n\nexport interface ControlPasswordProps {\n id?: string;\n name?: string;\n label?: string;\n description?: string;\n error?: string;\n required?: boolean;\n disabled?: boolean;\n autoComplete?: string;\n autoFocus?: boolean;\n minLength?: number;\n maxLength?: number;\n inputProps?: HTMLAttributes<HTMLElement>;\n icon?: IconComponent;\n value: string;\n onChange: (v: string) => void;\n /**\n * Called when focus leaves the field.\n */\n onBlur?: () => void;\n}\n\n/**\n * Masked password field with a reveal toggle.\n *\n * Lives outside `Control` so a hand-built form — a dialog that is not driven by\n * a schema — gets the same field the schema path renders, rather than pairing a\n * bare `<Input type=\"password\">` with no way to check what was typed.\n */\nexport const ControlPassword = (props: ControlPasswordProps) => {\n const [reveal, setReveal] = useState(false);\n const Icon = props.icon;\n return (\n <FormField\n onBlur={props.onBlur}\n id={props.id}\n label={props.label}\n description={props.description}\n error={props.error}\n required={props.required}\n >\n <div className=\"relative\">\n {Icon && (\n <Icon className=\"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2\" />\n )}\n <Input\n {...props.inputProps}\n {...formFieldAriaProps({\n id: props.id,\n error: props.error,\n description: props.description,\n })}\n id={props.id}\n name={props.name}\n type={reveal ? \"text\" : \"password\"}\n autoComplete={props.autoComplete ?? \"current-password\"}\n // oxlint-disable-next-line jsx-a11y/no-autofocus -- a caller-requested autofocus, see `autoFocus` in form/Control.tsx\n autoFocus={props.autoFocus}\n disabled={props.disabled}\n required={props.required}\n minLength={props.minLength}\n maxLength={props.maxLength}\n value={props.value}\n onChange={(e) => props.onChange(e.target.value)}\n className={[props.inputProps?.className, Icon ? \"pe-9 ps-9\" : \"pe-9\"]\n .filter(Boolean)\n .join(\" \")}\n />\n {/*\n * Centred with `inset-y-0 my-auto`, never `top-1/2 -translate-y-1/2`:\n * Button's press nudge (`active:translate-y-px`) writes the same\n * `--tw-translate-y`, so while pressed `-50%` became `1px` and the\n * button slid down by half its height (#Q2219).\n */}\n <Button\n type=\"button\"\n variant=\"minimal\"\n size=\"icon\"\n disabled={props.disabled}\n onClick={() => setReveal((r) => !r)}\n aria-label={reveal ? \"Hide password\" : \"Show password\"}\n className=\"text-muted-foreground hover:text-foreground absolute inset-y-0 end-1 my-auto size-7\"\n >\n {reveal ? <EyeOff className=\"size-4\" /> : <Eye className=\"size-4\" />}\n </Button>\n </div>\n </FormField>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;AAqCA,MAAa,mBAAmB,UAAgC;CAC9D,MAAM,CAAC,QAAQ,aAAa,SAAS,KAAK;CAC1C,MAAM,OAAO,MAAM;CACnB,OACE,oBAAC,WAAD;EACE,QAAQ,MAAM;EACd,IAAI,MAAM;EACV,OAAO,MAAM;EACb,aAAa,MAAM;EACnB,OAAO,MAAM;EACb,UAAU,MAAM;EAEhB,UAAA,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACG,QACC,oBAAC,MAAD,EAAM,WAAU,6FAA8F,CAAA;IAEhH,oBAAC,OAAD;KACE,GAAI,MAAM;KACV,GAAI,mBAAmB;MACrB,IAAI,MAAM;MACV,OAAO,MAAM;MACb,aAAa,MAAM;KACrB,CAAC;KACD,IAAI,MAAM;KACV,MAAM,MAAM;KACZ,MAAM,SAAS,SAAS;KACxB,cAAc,MAAM,gBAAgB;KAEpC,WAAW,MAAM;KACjB,UAAU,MAAM;KAChB,UAAU,MAAM;KAChB,WAAW,MAAM;KACjB,WAAW,MAAM;KACjB,OAAO,MAAM;KACb,WAAW,MAAM,MAAM,SAAS,EAAE,OAAO,KAAK;KAC9C,WAAW,CAAC,MAAM,YAAY,WAAW,OAAO,cAAc,MAAM,CAAC,CAClE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;IACZ,CAAA;IAOD,oBAAC,QAAD;KACE,MAAK;KACL,SAAQ;KACR,MAAK;KACL,UAAU,MAAM;KAChB,eAAe,WAAW,MAAM,CAAC,CAAC;KAClC,cAAY,SAAS,kBAAkB;KACvC,WAAU;KAET,UAAA,SAAS,oBAAC,QAAD,EAAQ,WAAU,SAAU,CAAA,IAAI,oBAAC,KAAD,EAAK,WAAU,SAAU,CAAA;IAC7D,CAAA;GACL;;CACI,CAAA;AAEf"}
1
+ {"version":3,"file":"ControlPassword.js","names":[],"sources":["../../src/form/ControlPassword.tsx"],"sourcesContent":["import { useI18n } from \"alepha/react/i18n\";\nimport { Eye, EyeOff } from \"lucide-react\";\nimport { type HTMLAttributes, useState } from \"react\";\n\nimport { Button } from \"../core/Button.tsx\";\nimport { Input } from \"../core/Input.tsx\";\nimport { FormField, formFieldAriaProps } from \"./FormField.tsx\";\nimport type { IconComponent } from \"./iconHint.tsx\";\n\nexport interface ControlPasswordProps {\n id?: string;\n name?: string;\n label?: string;\n description?: string;\n error?: string;\n required?: boolean;\n disabled?: boolean;\n autoComplete?: string;\n autoFocus?: boolean;\n minLength?: number;\n maxLength?: number;\n inputProps?: HTMLAttributes<HTMLElement>;\n icon?: IconComponent;\n value: string;\n onChange: (v: string) => void;\n /**\n * Called when focus leaves the field.\n */\n onBlur?: () => void;\n}\n\n/**\n * Masked password field with a reveal toggle.\n *\n * Lives outside `Control` so a hand-built form (a dialog that is not driven by\n * a schema) gets the same field the schema path renders, rather than pairing a\n * bare `<Input type=\"password\">` with no way to check what was typed.\n */\nexport const ControlPassword = (props: ControlPasswordProps) => {\n const { tr } = useI18n();\n const [reveal, setReveal] = useState(false);\n const Icon = props.icon;\n return (\n <FormField\n onBlur={props.onBlur}\n id={props.id}\n label={props.label}\n description={props.description}\n error={props.error}\n required={props.required}\n >\n <div className=\"relative\">\n {Icon && (\n <Icon className=\"text-muted-foreground pointer-events-none absolute start-3 top-1/2 size-4 -translate-y-1/2\" />\n )}\n <Input\n {...props.inputProps}\n {...formFieldAriaProps({\n id: props.id,\n error: props.error,\n description: props.description,\n })}\n id={props.id}\n name={props.name}\n type={reveal ? \"text\" : \"password\"}\n autoComplete={props.autoComplete ?? \"current-password\"}\n // oxlint-disable-next-line jsx-a11y/no-autofocus -- a caller-requested autofocus, see `autoFocus` in form/Control.tsx\n autoFocus={props.autoFocus}\n disabled={props.disabled}\n required={props.required}\n minLength={props.minLength}\n maxLength={props.maxLength}\n value={props.value}\n onChange={(e) => props.onChange(e.target.value)}\n className={[props.inputProps?.className, Icon ? \"pe-9 ps-9\" : \"pe-9\"]\n .filter(Boolean)\n .join(\" \")}\n />\n {/*\n * Centred with `inset-y-0 my-auto`, never `top-1/2 -translate-y-1/2`:\n * Button's press nudge (`active:translate-y-px`) writes the same\n * `--tw-translate-y`, so while pressed `-50%` became `1px` and the\n * button slid down by half its height (#Q2219).\n */}\n <Button\n type=\"button\"\n variant=\"minimal\"\n size=\"icon\"\n disabled={props.disabled}\n onClick={() => setReveal((r) => !r)}\n aria-label={\n reveal\n ? tr(\"controlPassword.hide\", { default: \"Hide password\" })\n : tr(\"controlPassword.show\", { default: \"Show password\" })\n }\n className=\"text-muted-foreground hover:text-foreground absolute inset-y-0 end-1 my-auto size-7\"\n >\n {reveal ? <EyeOff className=\"size-4\" /> : <Eye className=\"size-4\" />}\n </Button>\n </div>\n </FormField>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;AAsCA,MAAa,mBAAmB,UAAgC;CAC9D,MAAM,EAAE,OAAO,QAAQ;CACvB,MAAM,CAAC,QAAQ,aAAa,SAAS,KAAK;CAC1C,MAAM,OAAO,MAAM;CACnB,OACE,oBAAC,WAAD;EACE,QAAQ,MAAM;EACd,IAAI,MAAM;EACV,OAAO,MAAM;EACb,aAAa,MAAM;EACnB,OAAO,MAAM;EACb,UAAU,MAAM;EAEhB,UAAA,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACG,QACC,oBAAC,MAAD,EAAM,WAAU,6FAA8F,CAAA;IAEhH,oBAAC,OAAD;KACE,GAAI,MAAM;KACV,GAAI,mBAAmB;MACrB,IAAI,MAAM;MACV,OAAO,MAAM;MACb,aAAa,MAAM;KACrB,CAAC;KACD,IAAI,MAAM;KACV,MAAM,MAAM;KACZ,MAAM,SAAS,SAAS;KACxB,cAAc,MAAM,gBAAgB;KAEpC,WAAW,MAAM;KACjB,UAAU,MAAM;KAChB,UAAU,MAAM;KAChB,WAAW,MAAM;KACjB,WAAW,MAAM;KACjB,OAAO,MAAM;KACb,WAAW,MAAM,MAAM,SAAS,EAAE,OAAO,KAAK;KAC9C,WAAW,CAAC,MAAM,YAAY,WAAW,OAAO,cAAc,MAAM,CAAC,CAClE,OAAO,OAAO,CAAC,CACf,KAAK,GAAG;IACZ,CAAA;IAOD,oBAAC,QAAD;KACE,MAAK;KACL,SAAQ;KACR,MAAK;KACL,UAAU,MAAM;KAChB,eAAe,WAAW,MAAM,CAAC,CAAC;KAClC,cACE,SACI,GAAG,wBAAwB,EAAE,SAAS,gBAAgB,CAAC,IACvD,GAAG,wBAAwB,EAAE,SAAS,gBAAgB,CAAC;KAE7D,WAAU;KAET,UAAA,SAAS,oBAAC,QAAD,EAAQ,WAAU,SAAU,CAAA,IAAI,oBAAC,KAAD,EAAK,WAAU,SAAU,CAAA;IAC7D,CAAA;GACL;;CACI,CAAA;AAEf"}
@@ -19,7 +19,7 @@ export interface ControlSelectProps {
19
19
  */
20
20
  description?: string;
21
21
  /**
22
- * Render as a `<Segmented>` control (best for 2–4 options).
22
+ * Render as a `<Segmented>` control (best for 2 to 4 options).
23
23
  */
24
24
  segmented?: boolean;
25
25
  /**
@@ -31,7 +31,7 @@ export interface ControlSelectProps {
31
31
  checkboxes?: boolean;
32
32
  /**
33
33
  * Force the search input on. Kept as the historical name for
34
- * `searchable: true` — every select is a combobox now, the flag only
34
+ * `searchable: true`: every select is a combobox now, the flag only
35
35
  * decides whether it carries a search field.
36
36
  */
37
37
  combobox?: boolean;
@@ -82,7 +82,7 @@ export interface ControlSelectProps {
82
82
  * When true, the dropdown gets a synthetic "none" row at the top that
83
83
  * resets the field to `undefined`. Useful for optional filter chips
84
84
  * (e.g. an admin-table status filter) where the user needs an explicit
85
- * "no filter" option — Base UI's `Select` reserves empty-string values
85
+ * "no filter" option: Base UI's `Select` reserves empty-string values
86
86
  * as its internal no-selection sentinel, so a regular `<SelectItem
87
87
  * value="">` can't be picked. With `clearable`, ControlSelect uses an
88
88
  * internal sentinel and translates it to `undefined` in `onChange`.
@@ -131,7 +131,8 @@ export interface ControlSelectProps {
131
131
  */
132
132
  triggerClassName?: string;
133
133
  /**
134
- * Trigger height and type scale. Defaults to `default`.
134
+ * Trigger height and type scale, the segmented control's included.
135
+ * Defaults to `default`.
135
136
  */
136
137
  size?: ControlSelectSize;
137
138
  /**
@@ -226,7 +227,7 @@ export type SelectOption = string | {
226
227
  */
227
228
  icon?: ReactNode;
228
229
  /**
229
- * When true, the row is non-interactive — can't be selected if
230
+ * When true, the row is non-interactive: can't be selected if
230
231
  * not selected, can't be deselected if selected. Useful for
231
232
  * default/mandatory entries (e.g. the base "user" role).
232
233
  */
@@ -237,7 +238,7 @@ export type SelectOption = string | {
237
238
  *
238
239
  * The kit's own scale, kept under this name because `Control` and a long tail
239
240
  * of callers already spell it `size="xs"` on a select. The table behind it,
240
- * and the trigger box it sizes, are `control-base/field-trigger`'s - shared
241
+ * and the trigger box it sizes, are `form/fieldTrigger.tsx`'s - shared
241
242
  * with the two calendar controls, which used to draw a button instead.
242
243
  */
243
244
  export type ControlSelectSize = ControlTriggerSize;
@@ -1 +1 @@
1
- {"version":3,"file":"ControlSelect.d.ts","sourceRoot":"","sources":["../../src/form/ControlSelect.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EACL,KAAK,cAAc,EAIpB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAMf,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAE7D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC;;OAEG;IACH,KAAK,EAAE,cAAc,CAAC;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,UAAU,CAA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