@godxjp/ui 19.1.0 → 19.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (436) hide show
  1. package/README.md +25 -128
  2. package/dist/app/theme-axes.d.ts +4 -15
  3. package/dist/app/timezones.d.ts +1 -4
  4. package/dist/components/charts/area-chart.d.ts +2 -3
  5. package/dist/components/charts/bar-chart.d.ts +2 -3
  6. package/dist/components/charts/chart-frame.d.ts +7 -16
  7. package/dist/components/charts/chart-summary.d.ts +2 -2
  8. package/dist/components/charts/compact-bar-trend.d.ts +9 -24
  9. package/dist/components/charts/index.d.ts +1 -6
  10. package/dist/components/data-display/badge.d.ts +2 -12
  11. package/dist/components/data-display/card.d.ts +21 -41
  12. package/dist/components/data-display/carousel.d.ts +1 -2
  13. package/dist/components/data-display/code-block.d.ts +4 -0
  14. package/dist/components/data-display/code-block.js +24 -0
  15. package/dist/components/data-display/data-table.d.ts +15 -37
  16. package/dist/components/data-display/data-table.js +1 -3
  17. package/dist/components/data-display/descriptions.d.ts +2 -6
  18. package/dist/components/data-display/descriptions.js +0 -2
  19. package/dist/components/data-display/index.d.ts +4 -0
  20. package/dist/components/data-display/index.js +4 -0
  21. package/dist/components/data-display/list-row.d.ts +3 -22
  22. package/dist/components/data-display/permission-matrix.d.ts +7 -20
  23. package/dist/components/data-display/progress.d.ts +1 -1
  24. package/dist/components/data-display/prose.d.ts +4 -0
  25. package/dist/components/data-display/prose.js +20 -0
  26. package/dist/components/data-display/service-launcher-card.d.ts +3 -10
  27. package/dist/components/data-display/table.d.ts +20 -80
  28. package/dist/components/data-display/table.js +0 -3
  29. package/dist/components/data-display/timeline.d.ts +3 -5
  30. package/dist/components/data-entry/branch-scope-picker.d.ts +2 -19
  31. package/dist/components/data-entry/branch-scope-picker.js +0 -1
  32. package/dist/components/data-entry/calendar.d.ts +3 -2
  33. package/dist/components/data-entry/calendar.js +58 -3
  34. package/dist/components/data-entry/command-palette.d.ts +8 -22
  35. package/dist/components/data-entry/date-picker.d.ts +4 -5
  36. package/dist/components/data-entry/date-picker.js +6 -1
  37. package/dist/components/data-entry/date-range-picker.d.ts +1 -1
  38. package/dist/components/data-entry/date-range-picker.js +8 -3
  39. package/dist/components/data-entry/form-errors.d.ts +7 -18
  40. package/dist/components/data-entry/form-field.js +1 -5
  41. package/dist/components/data-entry/form.d.ts +1 -9
  42. package/dist/components/data-entry/input.d.ts +16 -14
  43. package/dist/components/data-entry/input.js +3 -0
  44. package/dist/components/data-entry/month-picker.js +2 -2
  45. package/dist/components/data-entry/month-range-picker.d.ts +4 -6
  46. package/dist/components/data-entry/month-range-picker.js +2 -2
  47. package/dist/components/data-entry/number-input.d.ts +1 -5
  48. package/dist/components/data-entry/number-input.js +1 -0
  49. package/dist/components/data-entry/radio.js +0 -1
  50. package/dist/components/data-entry/search-select.d.ts +2 -4
  51. package/dist/components/data-entry/select.d.ts +11 -6
  52. package/dist/components/data-entry/select.js +4 -2
  53. package/dist/components/data-entry/switch.js +0 -1
  54. package/dist/components/data-entry/textarea.d.ts +10 -16
  55. package/dist/components/data-entry/time-picker.d.ts +3 -5
  56. package/dist/components/data-entry/upload-types.d.ts +1 -5
  57. package/dist/components/data-entry/use-upload-draft.d.ts +0 -4
  58. package/dist/components/feedback/dialog.d.ts +6 -15
  59. package/dist/components/feedback/overlay-header-tone.d.ts +1 -1
  60. package/dist/components/feedback/sheet.d.ts +3 -10
  61. package/dist/components/feedback/sheet.js +1 -1
  62. package/dist/components/feedback/sonner.js +2 -3
  63. package/dist/components/general/activity.d.ts +4 -30
  64. package/dist/components/general/button.js +1 -10
  65. package/dist/components/general/logo.d.ts +6 -28
  66. package/dist/components/general/reveal.d.ts +3 -9
  67. package/dist/components/general/typography.d.ts +1 -3
  68. package/dist/components/layout/account-chip.d.ts +8 -0
  69. package/dist/components/layout/account-chip.js +45 -0
  70. package/dist/components/layout/auth-divider.d.ts +2 -9
  71. package/dist/components/layout/auth-shell.d.ts +1 -14
  72. package/dist/components/layout/breadcrumb.d.ts +1 -5
  73. package/dist/components/layout/centered-shell.d.ts +4 -18
  74. package/dist/components/layout/error-surface.d.ts +11 -28
  75. package/dist/components/layout/error-surface.js +4 -1
  76. package/dist/components/layout/index.d.ts +2 -0
  77. package/dist/components/layout/index.js +2 -0
  78. package/dist/components/layout/legal-document-shell.d.ts +5 -28
  79. package/dist/components/layout/master-detail.d.ts +2 -18
  80. package/dist/components/layout/page-container.js +0 -1
  81. package/dist/components/layout/responsive-grid.d.ts +6 -1
  82. package/dist/components/layout/responsive-grid.js +9 -2
  83. package/dist/components/layout/service-role-panel.d.ts +7 -19
  84. package/dist/components/layout/sidebar.d.ts +5 -27
  85. package/dist/components/layout/sidebar.js +0 -1
  86. package/dist/components/layout/split-pane.d.ts +0 -7
  87. package/dist/components/layout/topbar.d.ts +1 -14
  88. package/dist/components/navigation/app-setting-picker.js +1 -3
  89. package/dist/components/navigation/filter-bar.d.ts +1 -6
  90. package/dist/components/navigation/pagination-utils.d.ts +2 -12
  91. package/dist/components/navigation/tabs-scroll.d.ts +2 -36
  92. package/dist/components/navigation/tabs.js +4 -8
  93. package/dist/components/query/data-state.d.ts +2 -2
  94. package/dist/components/ui/credential-reveal.d.ts +1 -4
  95. package/dist/components/ui/hover-card.d.ts +1 -2
  96. package/dist/components/ui/separator.d.ts +2 -15
  97. package/dist/components/ui/toggle-group.d.ts +1 -5
  98. package/dist/components/ui/toggle.d.ts +6 -31
  99. package/dist/email/brand-mark.d.ts +6 -34
  100. package/dist/email/color.d.ts +7 -17
  101. package/dist/email/geometry.d.ts +4 -8
  102. package/dist/email/index.d.ts +4 -48
  103. package/dist/email/inline-style.d.ts +3 -9
  104. package/dist/email/urgency.d.ts +2 -7
  105. package/dist/form/form-context.d.ts +2 -5
  106. package/dist/form/form-root.d.ts +1 -2
  107. package/dist/i18n/messages/en.json +4 -0
  108. package/dist/i18n/messages/ja.json +4 -0
  109. package/dist/i18n/messages/vi.json +4 -0
  110. package/dist/inertia/index.d.ts +2 -10
  111. package/dist/lib/control-styles.d.ts +10 -21
  112. package/dist/lib/control-styles.js +4 -6
  113. package/dist/lib/datetime/format-date.d.ts +1 -4
  114. package/dist/lib/field-a11y.d.ts +11 -68
  115. package/dist/lib/field-a11y.js +0 -1
  116. package/dist/lib/format.d.ts +4 -8
  117. package/dist/lib/hooks.d.ts +6 -12
  118. package/dist/lib/permission-grid.d.ts +3 -18
  119. package/dist/lib/query-error.d.ts +3 -3
  120. package/dist/props/components/app.prop.d.ts +15 -38
  121. package/dist/props/components/charts.prop.d.ts +2 -3
  122. package/dist/props/components/data-display.prop.d.ts +48 -72
  123. package/dist/props/components/data-entry.prop.d.ts +35 -40
  124. package/dist/props/components/form.prop.d.ts +2 -6
  125. package/dist/props/components/general.prop.d.ts +11 -27
  126. package/dist/props/components/layout.prop.d.ts +89 -260
  127. package/dist/props/components/navigation.prop.d.ts +27 -42
  128. package/dist/props/registry.d.ts +31 -0
  129. package/dist/props/registry.js +33 -0
  130. package/dist/props/vocabulary/data.prop.d.ts +18 -49
  131. package/dist/props/vocabulary/index.d.ts +1 -1
  132. package/dist/props/vocabulary/interaction.prop.d.ts +10 -12
  133. package/dist/props/vocabulary/layout.prop.d.ts +8 -30
  134. package/dist/props/vocabulary/shared.prop.d.ts +3 -2
  135. package/dist/styles/alert-layout.css +1 -32
  136. package/dist/styles/badge-layout.css +4 -18
  137. package/dist/styles/base.css +14 -113
  138. package/dist/styles/card-layout.css +6 -128
  139. package/dist/styles/chart-layout.css +2 -17
  140. package/dist/styles/control.css +380 -458
  141. package/dist/styles/core.css +21 -0
  142. package/dist/styles/data-display-layout.css +175 -94
  143. package/dist/styles/data-entry-layout.css +0 -45
  144. package/dist/styles/density.css +1 -30
  145. package/dist/styles/dialog-layout.css +5 -69
  146. package/dist/styles/focus-ring.css +13 -87
  147. package/dist/styles/fonts.css +1 -31
  148. package/dist/styles/form-layout.css +7 -91
  149. package/dist/styles/index.css +2 -20
  150. package/dist/styles/layout.css +38 -456
  151. package/dist/styles/logo-layout.css +1 -35
  152. package/dist/styles/motion.css +3 -42
  153. package/dist/styles/navigation-layout.css +3 -50
  154. package/dist/styles/shell-layout.css +37 -403
  155. package/dist/styles/table-layout.css +16 -274
  156. package/dist/styles/text-layout.css +7 -21
  157. package/dist/styles/toggle.css +1 -23
  158. package/dist/theme/dxs.canonical.css +1 -55
  159. package/dist/theme/example.service.css +1 -26
  160. package/dist/theme/famgia.service.css +5 -15
  161. package/dist/tokens/axes.css +3 -40
  162. package/dist/tokens/base.css +1 -4
  163. package/dist/tokens/components/activity.css +6 -42
  164. package/dist/tokens/components/badge.css +4 -13
  165. package/dist/tokens/components/banner.css +4 -9
  166. package/dist/tokens/components/card.css +32 -88
  167. package/dist/tokens/components/chart.css +9 -26
  168. package/dist/tokens/components/control.css +37 -222
  169. package/dist/tokens/components/data-display.css +28 -79
  170. package/dist/tokens/components/data-entry.css +5 -19
  171. package/dist/tokens/components/descriptions.css +7 -27
  172. package/dist/tokens/components/email.css +38 -84
  173. package/dist/tokens/components/error-surface.css +2 -18
  174. package/dist/tokens/components/feedback.css +27 -124
  175. package/dist/tokens/components/form.css +13 -45
  176. package/dist/tokens/components/legal-document.css +16 -41
  177. package/dist/tokens/components/list-row.css +11 -36
  178. package/dist/tokens/components/logo.css +2 -57
  179. package/dist/tokens/components/navigation.css +16 -94
  180. package/dist/tokens/components/scroll-area.css +2 -18
  181. package/dist/tokens/components/separator.css +8 -30
  182. package/dist/tokens/components/sheet.css +3 -14
  183. package/dist/tokens/components/shell.css +53 -307
  184. package/dist/tokens/components/sidebar.css +5 -22
  185. package/dist/tokens/components/table.css +19 -140
  186. package/dist/tokens/components/toggle.css +3 -65
  187. package/dist/tokens/components/upload.css +7 -43
  188. package/dist/tokens/foundation.css +108 -383
  189. package/dist/tokens/semantic/layout.css +33 -207
  190. package/docs/CANONICAL-CONTRACTS.md +206 -0
  191. package/docs/COMPONENTS.md +157 -0
  192. package/docs/COMPOSITION-VS-COMPONENT.md +105 -0
  193. package/docs/CONSUMER-RULES.md +14 -0
  194. package/docs/CUSTOMER-THEMING.md +162 -0
  195. package/docs/DATETIME.md +69 -0
  196. package/docs/DEVELOPMENT.md +173 -0
  197. package/docs/FORMS.md +143 -0
  198. package/docs/FRAME-A11Y-CI.md +267 -0
  199. package/docs/FRAME-COVERAGE-LEDGER.md +123 -0
  200. package/docs/FRAME-COVERAGE-REPORT.md +140 -0
  201. package/docs/FRAME-COVERAGE-STANDARD.md +65 -0
  202. package/docs/FRAME-COVERAGE.md +29 -0
  203. package/docs/PROPS-REGISTRY.md +61 -0
  204. package/docs/PROPS-VOCABULARY.md +100 -0
  205. package/docs/README.md +60 -0
  206. package/docs/REGISTRY.md +70 -0
  207. package/docs/SPACING.md +56 -0
  208. package/docs/STANDARDS-vocabulary-tokens.md +48 -0
  209. package/docs/TESTING.md +98 -0
  210. package/docs/TOKENS.md +347 -0
  211. package/docs/asset-modules.d.ts +46 -0
  212. package/docs/assets/cover-terrain.svg +6 -0
  213. package/docs/assets/portrait-amber.svg +5 -0
  214. package/docs/assets/portrait-clay.svg +5 -0
  215. package/docs/assets/portrait-indigo.svg +5 -0
  216. package/docs/assets/portrait-iris.svg +5 -0
  217. package/docs/assets/portrait-moss.svg +5 -0
  218. package/docs/assets/portrait-plum.svg +5 -0
  219. package/docs/assets/portrait-slate.svg +5 -0
  220. package/docs/charts/compact-bar-trend.tsx +328 -0
  221. package/docs/charts/size-tiers.tsx +192 -0
  222. package/docs/data-display/accordion.tsx +99 -0
  223. package/docs/data-display/avatar.tsx +355 -0
  224. package/docs/data-display/badge.tsx +247 -0
  225. package/docs/data-display/card/examples/detail-panel.tsx +106 -0
  226. package/docs/data-display/card/index.md +3 -0
  227. package/docs/data-display/card/index.tsx +285 -0
  228. package/docs/data-display/carousel.tsx +156 -0
  229. package/docs/data-display/charts.tsx +198 -0
  230. package/docs/data-display/code-block.tsx +90 -0
  231. package/docs/data-display/collapsible.tsx +162 -0
  232. package/docs/data-display/credential-reveal.tsx +145 -0
  233. package/docs/data-display/data-table/examples/approval-queue.tsx +212 -0
  234. package/docs/data-display/data-table/examples/grid-features.tsx +158 -0
  235. package/docs/data-display/data-table/examples/list-page.tsx +175 -0
  236. package/docs/data-display/data-table/index.md +5 -0
  237. package/docs/data-display/data-table/index.tsx +295 -0
  238. package/docs/data-display/descriptions.tsx +143 -0
  239. package/docs/data-display/empty-state.tsx +164 -0
  240. package/docs/data-display/hover-card.tsx +181 -0
  241. package/docs/data-display/list-row.tsx +420 -0
  242. package/docs/data-display/permission-matrix.tsx +184 -0
  243. package/docs/data-display/popover-touch.tsx +27 -0
  244. package/docs/data-display/popover.tsx +245 -0
  245. package/docs/data-display/progress.tsx +84 -0
  246. package/docs/data-display/prose.tsx +105 -0
  247. package/docs/data-display/qr-code.tsx +68 -0
  248. package/docs/data-display/scroll-area.tsx +271 -0
  249. package/docs/data-display/service-launcher-card.tsx +145 -0
  250. package/docs/data-display/stat-card.tsx +99 -0
  251. package/docs/data-display/table.tsx +251 -0
  252. package/docs/data-display/timeline.tsx +112 -0
  253. package/docs/data-display/touch-actions.tsx +36 -0
  254. package/docs/data-display/tree-list.tsx +107 -0
  255. package/docs/data-entry/branch-scope-picker.tsx +123 -0
  256. package/docs/data-entry/calendar.tsx +180 -0
  257. package/docs/data-entry/cascader.tsx +378 -0
  258. package/docs/data-entry/checkbox.tsx +256 -0
  259. package/docs/data-entry/color-picker.tsx +117 -0
  260. package/docs/data-entry/command-palette.tsx +179 -0
  261. package/docs/data-entry/command.tsx +262 -0
  262. package/docs/data-entry/country-picker-recipe.tsx +170 -0
  263. package/docs/data-entry/date-picker.tsx +191 -0
  264. package/docs/data-entry/date-range-picker.tsx +149 -0
  265. package/docs/data-entry/form/examples/employee-settings.tsx +267 -0
  266. package/docs/data-entry/form/examples/invoice-form.tsx +387 -0
  267. package/docs/data-entry/form-field/examples/a11y-contract.tsx +240 -0
  268. package/docs/data-entry/form-field/examples/create-form.tsx +105 -0
  269. package/docs/data-entry/form-field/index.md +8 -0
  270. package/docs/data-entry/form-field/index.tsx +326 -0
  271. package/docs/data-entry/form-inertia.tsx +80 -0
  272. package/docs/data-entry/form-root.tsx +102 -0
  273. package/docs/data-entry/form.tsx +724 -0
  274. package/docs/data-entry/input-otp.tsx +231 -0
  275. package/docs/data-entry/input.tsx +114 -0
  276. package/docs/data-entry/label.tsx +100 -0
  277. package/docs/data-entry/month-picker.tsx +101 -0
  278. package/docs/data-entry/month-range-picker.tsx +115 -0
  279. package/docs/data-entry/number-input.tsx +240 -0
  280. package/docs/data-entry/password-input.tsx +106 -0
  281. package/docs/data-entry/password-strength.tsx +97 -0
  282. package/docs/data-entry/radio-group.tsx +95 -0
  283. package/docs/data-entry/rating.tsx +87 -0
  284. package/docs/data-entry/search-input.tsx +120 -0
  285. package/docs/data-entry/select-async-contracts.tsx +108 -0
  286. package/docs/data-entry/select-matrix.tsx +204 -0
  287. package/docs/data-entry/select.tsx +369 -0
  288. package/docs/data-entry/slider.tsx +130 -0
  289. package/docs/data-entry/switch.tsx +67 -0
  290. package/docs/data-entry/tag-input.tsx +108 -0
  291. package/docs/data-entry/textarea.tsx +209 -0
  292. package/docs/data-entry/time-picker.tsx +99 -0
  293. package/docs/data-entry/toggle-count.tsx +293 -0
  294. package/docs/data-entry/toggle-group.tsx +225 -0
  295. package/docs/data-entry/toggle.tsx +127 -0
  296. package/docs/data-entry/transfer.tsx +97 -0
  297. package/docs/data-entry/tree-select.tsx +204 -0
  298. package/docs/data-entry/upload.tsx +184 -0
  299. package/docs/feedback/alert-dialog.tsx +270 -0
  300. package/docs/feedback/alert.tsx +248 -0
  301. package/docs/feedback/banner.tsx +183 -0
  302. package/docs/feedback/danger-confirm.tsx +88 -0
  303. package/docs/feedback/dialog-touch.tsx +24 -0
  304. package/docs/feedback/dialog.tsx +193 -0
  305. package/docs/feedback/sheet.tsx +410 -0
  306. package/docs/feedback/skeleton.tsx +111 -0
  307. package/docs/feedback/toast.tsx +135 -0
  308. package/docs/feedback/tooltip.tsx +171 -0
  309. package/docs/feedback/two-factor-setup.tsx +68 -0
  310. package/docs/foundation/_email-specimen.ts +274 -0
  311. package/docs/foundation/colors.tsx +202 -0
  312. package/docs/foundation/density.tsx +232 -0
  313. package/docs/foundation/email-tokens.tsx +306 -0
  314. package/docs/foundation/radius-shadow.tsx +152 -0
  315. package/docs/foundation/spacing.tsx +211 -0
  316. package/docs/foundation/typography.tsx +147 -0
  317. package/docs/general/activity.tsx +224 -0
  318. package/docs/general/button/examples/destructive-confirm.tsx +90 -0
  319. package/docs/general/button/examples/form-actions.tsx +85 -0
  320. package/docs/general/button/examples/toolbar.tsx +160 -0
  321. package/docs/general/button/index.md +12 -0
  322. package/docs/general/button/index.tsx +211 -0
  323. package/docs/general/logo.tsx +131 -0
  324. package/docs/general/reveal.tsx +41 -0
  325. package/docs/general/typography.tsx +152 -0
  326. package/docs/layout/account-chip.tsx +72 -0
  327. package/docs/layout/admin-collection.tsx +122 -0
  328. package/docs/layout/app-shell.tsx +374 -0
  329. package/docs/layout/aspect-ratio.tsx +119 -0
  330. package/docs/layout/auth-account-summary.tsx +103 -0
  331. package/docs/layout/auth-divider.tsx +28 -0
  332. package/docs/layout/auth-footer.tsx +37 -0
  333. package/docs/layout/auth-identity.tsx +36 -0
  334. package/docs/layout/auth-recovery/examples/mfa-challenge.md +41 -0
  335. package/docs/layout/auth-recovery/examples/mfa-challenge.tsx +254 -0
  336. package/docs/layout/auth-recovery/examples/mobile-390.md +25 -0
  337. package/docs/layout/auth-recovery/examples/mobile-390.tsx +82 -0
  338. package/docs/layout/auth-recovery/examples/password-recovery.md +24 -0
  339. package/docs/layout/auth-recovery/examples/password-recovery.tsx +197 -0
  340. package/docs/layout/auth-recovery/examples/wrapping-ja-en-vi.md +27 -0
  341. package/docs/layout/auth-recovery/examples/wrapping-ja-en-vi.tsx +156 -0
  342. package/docs/layout/auth-recovery/index.md +140 -0
  343. package/docs/layout/auth-recovery/index.tsx +96 -0
  344. package/docs/layout/auth-shell-context.tsx +103 -0
  345. package/docs/layout/auth-shell-device.tsx +112 -0
  346. package/docs/layout/auth-shell-registration.tsx +335 -0
  347. package/docs/layout/auth-shell-variants.tsx +139 -0
  348. package/docs/layout/auth-shell.tsx +59 -0
  349. package/docs/layout/auth-stack.tsx +40 -0
  350. package/docs/layout/centered-shell.tsx +102 -0
  351. package/docs/layout/error-surface/examples/application-403.tsx +84 -0
  352. package/docs/layout/error-surface/examples/application-404.tsx +77 -0
  353. package/docs/layout/error-surface/examples/system-500.tsx +47 -0
  354. package/docs/layout/error-surface/examples/system-503.tsx +48 -0
  355. package/docs/layout/error-surface/index.md +153 -0
  356. package/docs/layout/error-surface/index.tsx +239 -0
  357. package/docs/layout/flex.tsx +262 -0
  358. package/docs/layout/legal-document-shell/_data.ts +110 -0
  359. package/docs/layout/legal-document-shell/examples/desktop-1440.md +12 -0
  360. package/docs/layout/legal-document-shell/examples/desktop-1440.tsx +83 -0
  361. package/docs/layout/legal-document-shell/examples/mobile-390.md +22 -0
  362. package/docs/layout/legal-document-shell/examples/mobile-390.tsx +70 -0
  363. package/docs/layout/legal-document-shell/examples/tablet-1024.md +3 -0
  364. package/docs/layout/legal-document-shell/examples/tablet-1024.tsx +84 -0
  365. package/docs/layout/legal-document-shell/examples/wrapping-ja-en-vi.md +18 -0
  366. package/docs/layout/legal-document-shell/examples/wrapping-ja-en-vi.tsx +61 -0
  367. package/docs/layout/legal-document-shell/index.md +51 -0
  368. package/docs/layout/legal-document-shell/index.tsx +101 -0
  369. package/docs/layout/master-detail.tsx +387 -0
  370. package/docs/layout/org-switcher.tsx +131 -0
  371. package/docs/layout/page-container.tsx +946 -0
  372. package/docs/layout/resizable-panel.tsx +419 -0
  373. package/docs/layout/responsive-grid.tsx +235 -0
  374. package/docs/layout/separator.tsx +327 -0
  375. package/docs/layout/service-role-panel.tsx +144 -0
  376. package/docs/layout/sidebar.tsx +586 -0
  377. package/docs/layout/split-pane.tsx +451 -0
  378. package/docs/layout/topbar.tsx +347 -0
  379. package/docs/navigation/app-setting-picker.tsx +141 -0
  380. package/docs/navigation/breadcrumb.tsx +128 -0
  381. package/docs/navigation/context-menu.tsx +117 -0
  382. package/docs/navigation/dropdown-menu.tsx +213 -0
  383. package/docs/navigation/filter-bar.tsx +227 -0
  384. package/docs/navigation/menubar.tsx +141 -0
  385. package/docs/navigation/navigation-menu.tsx +165 -0
  386. package/docs/navigation/pagination.tsx +241 -0
  387. package/docs/navigation/steps.tsx +263 -0
  388. package/docs/navigation/tabs-rtl.tsx +28 -0
  389. package/docs/navigation/tabs.tsx +308 -0
  390. package/docs/navigation/toolbar.tsx +339 -0
  391. package/docs/providers/app-provider.tsx +191 -0
  392. package/docs/providers/format-date.tsx +230 -0
  393. package/docs/query/button-refetch.tsx +160 -0
  394. package/docs/query/data-state.tsx +192 -0
  395. package/docs/query/infinite-query-state.tsx +93 -0
  396. package/docs/query/mutation-feedback.tsx +70 -0
  397. package/docs/query/prefetch-link.tsx +262 -0
  398. package/docs/query/touch-actions.tsx +68 -0
  399. package/docs/showcase/acme-portal.tsx +441 -0
  400. package/docs/showcase/acme-website.tsx +455 -0
  401. package/docs/showcase/case1-warehouse-dashboard.tsx +343 -0
  402. package/docs/showcase/case2-employee-me.tsx +441 -0
  403. package/docs/showcase/case3-approval-workflow.tsx +527 -0
  404. package/docs/showcase/case4-login.tsx +307 -0
  405. package/docs/showcase/case5-shift-calendar.tsx +795 -0
  406. package/docs/showcase/case6-agency-handy.tsx +1072 -0
  407. package/docs/showcase/futurelastic-web.tsx +390 -0
  408. package/docs/showcase/org-switcher.tsx +313 -0
  409. package/docs/showcase/permission-matrix.tsx +343 -0
  410. package/docs/showcase/public-landing.tsx +210 -0
  411. package/docs/showcase/settings-account-sections.tsx +559 -0
  412. package/docs/showcase/settings-security-mfa.tsx +145 -0
  413. package/docs/showcase/table-approval-queue.tsx +199 -0
  414. package/docs/showcase/table-bulk-actions.tsx +460 -0
  415. package/docs/showcase/table-compact-kintone.tsx +438 -0
  416. package/docs/showcase/table-conditional-format.tsx +367 -0
  417. package/docs/showcase/table-crud-list.tsx +544 -0
  418. package/docs/showcase/table-density.tsx +340 -0
  419. package/docs/showcase/table-expandable-rows.tsx +471 -0
  420. package/docs/showcase/table-filter-chips.tsx +461 -0
  421. package/docs/showcase/table-footer-totals.tsx +311 -0
  422. package/docs/showcase/table-grouped-subtotals.tsx +388 -0
  423. package/docs/showcase/table-master-detail.tsx +479 -0
  424. package/docs/showcase/table-pagination.tsx +320 -0
  425. package/docs/showcase/table-states.tsx +363 -0
  426. package/docs/showcase/table-sticky-columns.tsx +373 -0
  427. package/docs/showcase/table-tree-rows.tsx +444 -0
  428. package/docs/showcase/table-view-tabs.tsx +488 -0
  429. package/package.json +9 -11
  430. package/scripts/_agent-setup.mjs +16 -2
  431. package/scripts/audit-hook.mjs +3 -13
  432. package/scripts/init-agent-kit.mjs +1 -14
  433. package/scripts/postinstall.mjs +12 -12
  434. package/scripts/ui-audit.mjs +93 -31
  435. package/scripts/visual-audit-rules.mjs +51 -7
  436. package/scripts/visual-audit.mjs +118 -47
@@ -1,24 +1,78 @@
1
1
  "use client";
2
- import { jsx } from "react/jsx-runtime";
2
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
3
+ import * as React from "react";
3
4
  import { ChevronLeft, ChevronRight } from "lucide-react";
4
- import { DayPicker } from "react-day-picker";
5
+ import { DayPicker, dateMatchModifiers } from "react-day-picker";
6
+ import { useTranslation } from "../../i18n/use-translation.js";
5
7
  import { cn } from "../../lib/utils.js";
6
8
  import { controlIconSmClass } from "../../lib/control-styles.js";
7
- import { buttonVariants } from "../general/button.js";
9
+ import { Button, buttonVariants } from "../general/button.js";
10
+ const startOfDay = (date) => new Date(date.getFullYear(), date.getMonth(), date.getDate());
11
+ const startOfMonth = (date) => new Date(date.getFullYear(), date.getMonth(), 1);
12
+ const endOfMonth = (date) => new Date(date.getFullYear(), date.getMonth() + 1, 0);
13
+ const sameDay = (a, b) => startOfDay(a).getTime() === startOfDay(b).getTime();
8
14
  function Calendar({
9
15
  className,
10
16
  classNames,
11
17
  showOutsideDays = true,
12
18
  "aria-label": ariaLabel,
13
19
  labels,
20
+ showToday = false,
21
+ showClose = false,
22
+ onClose,
23
+ footer,
24
+ month: monthProp,
25
+ onMonthChange,
14
26
  ...props
15
27
  }) {
28
+ const { t } = useTranslation();
29
+ const [month, setMonth] = React.useState(monthProp ?? props.defaultMonth);
30
+ const today = startOfDay(props.today ?? /* @__PURE__ */ new Date());
31
+ const todayDisabled = props.startMonth != null && today < startOfMonth(props.startMonth) || props.endMonth != null && today > endOfMonth(props.endMonth) || props.disabled != null && dateMatchModifiers(today, props.disabled);
32
+ const modifiers = { today: true };
33
+ const selectToday = (event) => {
34
+ setMonth(startOfMonth(today));
35
+ onMonthChange?.(startOfMonth(today));
36
+ if (props.mode === "single") {
37
+ props.onSelect?.(today, today, modifiers, event);
38
+ } else if (props.mode === "multiple") {
39
+ const current = props.selected ?? [];
40
+ const next = current.some((day) => sameDay(day, today)) ? current : [...current, today];
41
+ props.onSelect?.(next, today, modifiers, event);
42
+ } else if (props.mode === "range") {
43
+ const from = props.selected?.from;
44
+ const to = props.selected?.to;
45
+ const next = from && !to ? today < from ? { from: today, to: from } : { from, to: today } : { from: today, to: void 0 };
46
+ props.onSelect?.(next, today, modifiers, event);
47
+ }
48
+ };
49
+ const actions = showToday || showClose ? /* @__PURE__ */ jsxs(Fragment, { children: [
50
+ showToday ? /* @__PURE__ */ jsx(
51
+ Button,
52
+ {
53
+ type: "button",
54
+ variant: "ghost",
55
+ size: "sm",
56
+ className: "ui-calendar-footer-today",
57
+ disabled: todayDisabled,
58
+ onClick: selectToday,
59
+ children: t("dataEntry.calendar.today") ?? "Today"
60
+ }
61
+ ) : null,
62
+ showClose ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "ghost", size: "sm", onClick: onClose, children: t("dataEntry.calendar.close") ?? "Close" }) : null
63
+ ] }) : void 0;
16
64
  const rangeDefaults = props.mode === "range" ? { resetOnSelect: props.resetOnSelect ?? true } : null;
17
65
  return /* @__PURE__ */ jsx(
18
66
  DayPicker,
19
67
  {
20
68
  showOutsideDays,
21
69
  "aria-label": ariaLabel,
70
+ month: showToday ? monthProp ?? month : monthProp,
71
+ onMonthChange: (next) => {
72
+ setMonth(next);
73
+ onMonthChange?.(next);
74
+ },
75
+ footer: footer ?? actions,
22
76
  labels: {
23
77
  ...labels,
24
78
  labelNav: labels?.labelNav ?? (() => `${ariaLabel ?? "Calendar"} navigation`)
@@ -81,6 +135,7 @@ function Calendar({
81
135
  ),
82
136
  disabled: cn("ui-calendar-day-disabled", classNames?.disabled),
83
137
  hidden: cn("invisible", classNames?.hidden),
138
+ footer: cn("ui-calendar-footer", classNames?.footer),
84
139
  ...classNames
85
140
  },
86
141
  components: {
@@ -31,7 +31,7 @@ export type CommandPaletteProps = {
31
31
  onOpenChange?: (open: boolean) => void;
32
32
  /**
33
33
  * Controlled search-box query. Pairs with `onSearchChange`; leave it out for the uncontrolled
34
- * palette (seeded by `defaultSearch`). Same idiom as `SearchSelect`'s `search`.
34
+ * palette (seeded by `defaultSearch`).
35
35
  */
36
36
  search?: string;
37
37
  /** Initial uncontrolled query, and the value the palette resets to when it closes. Default `""`. */
@@ -45,8 +45,6 @@ export type CommandPaletteProps = {
45
45
  * Whether the palette filters `groups` itself (cmdk's client-side fuzzy match). Set `false` when
46
46
  * the QUERY is answered by a server and `groups` already holds the matches — otherwise every row
47
47
  * is scored a second time against the same string and late-arriving matches are dropped.
48
- *
49
- * It also decides who owns the empty node; see the component doc block. Default `true`.
50
48
  */
51
49
  shouldFilter?: boolean;
52
50
  loading?: boolean;
@@ -55,24 +53,12 @@ export type CommandPaletteProps = {
55
53
  shortcut?: boolean;
56
54
  };
57
55
  /**
58
- * CommandPalette — the ⌘K search dialog.
59
- *
60
- * ## The empty-state contract (gh#412)
61
- *
62
- * `labels.empty` renders under exactly one rule, and which mechanism decides follows `shouldFilter`:
63
- *
64
- * - **`shouldFilter` (default, client-side)** cmdk owns it: the palette holds items, the query
65
- * matches none of them. Unchanged.
66
- * - **`shouldFilter={false}` (server-side)** — the PALETTE owns it, derived synchronously from
67
- * props: the empty node renders when `groups` carries no items, and never while `loading` or
68
- * `error` is set. cmdk's own empty node cannot be trusted here, because it is driven by a
69
- * scheduled count of the items that have REGISTERED in the DOM, not by what the consumer knows —
70
- * so an async group that populates a frame late flips it on and off and any assertion over it
71
- * races. Reading `groups` instead makes "did we render the empty state?" a pure function of the
72
- * props at that render, which is what a contract test can assert.
73
- *
74
- * The practical consequence for search-as-you-type: hold `loading` true for the whole in-flight
75
- * window. While it is true the palette shows `labels.loading` and never claims "no results" —
76
- * a request that has not answered yet is not an empty result.
56
+ * Unchanged. - **`shouldFilter={false}` (server-side)** — the PALETTE owns it, derived
57
+ * synchronously from props: the empty node renders when `groups` carries no items, and never while
58
+ * `loading` or `error` is set. cmdk's own empty node cannot be trusted here, because it is driven
59
+ * by a scheduled count of the items that have REGISTERED in the DOM, not by what the consumer
60
+ * knows so an async group that populates a frame late flips it on and off and any assertion over
61
+ * it races. Reading `groups` instead makes "did we render the empty state?" a pure function of the
62
+ * props at that render, which is what a contract test can assert.
77
63
  */
78
64
  export declare function CommandPalette({ groups, labels, onSelect, open: controlledOpen, defaultOpen, onOpenChange, search: controlledSearch, defaultSearch, onSearchChange, shouldFilter, loading, error, trigger, shortcut, }: CommandPaletteProps): React.JSX.Element;
@@ -2,9 +2,8 @@ import * as React from "react";
2
2
  import type { DatePickerProp } from "../../props/components/data-entry.prop.js";
3
3
  export type { DatePickerProp, DatePickerProp as DatePickerProps, } from "../../props/components/data-entry.prop.js";
4
4
  /**
5
- * DatePicker — WAI-ARIA date combobox. A real, typeable `<input>` holds the value as an
6
- * ISO-8601 `yyyy-MM-dd` string (the international standard): it is form-submittable (give it a
7
- * `name`), screen-reader friendly, and e2e-testable by simply filling the input. The calendar
8
- * popover is the visual affordance; typing and the calendar stay in sync.
5
+ * DatePicker — WAI-ARIA date combobox. A real, typeable `<input>` holds the value as an ISO-8601
6
+ * `yyyy-MM-dd` string (the international standard): it is form-submittable (give it a `name`),
7
+ * screen-reader friendly, and e2e-testable by simply filling the input.
9
8
  */
10
- export declare function DatePicker({ value: valueProp, defaultValue, onValueChange, placeholder, disabled, className, id, name, locale: localeProp, fromDate, toDate, allowClear, ...ariaProps }: DatePickerProp): React.JSX.Element;
9
+ export declare function DatePicker({ value: valueProp, defaultValue, onValueChange, placeholder, disabled, className, id, name, locale: localeProp, showToday, showClose, fromDate, toDate, allowClear, ...ariaProps }: DatePickerProp): React.JSX.Element;
@@ -21,6 +21,8 @@ function DatePicker({
21
21
  id,
22
22
  name,
23
23
  locale: localeProp,
24
+ showToday,
25
+ showClose,
24
26
  fromDate,
25
27
  toDate,
26
28
  allowClear = true,
@@ -153,7 +155,10 @@ function DatePicker({
153
155
  ...toDate ? [{ after: toDate }] : []
154
156
  ],
155
157
  startMonth: fromDate,
156
- endMonth: toDate
158
+ endMonth: toDate,
159
+ showToday,
160
+ showClose,
161
+ onClose: () => setOpen(false)
157
162
  }
158
163
  )
159
164
  }
@@ -8,4 +8,4 @@ export type { DateRangePickerProp, DateRangePickerProp as DateRangePickerProps,
8
8
  * `${name}_to`, screen-reader friendly, e2e-testable by filling either input); the
9
9
  * range calendar is the visual affordance.
10
10
  */
11
- export declare function DateRangePicker({ value: valueProp, defaultValue, onValueChange, placeholder, disabled, className, id, name, locale: localeProp, fromDate, toDate, allowClear, ...ariaProps }: DateRangePickerProp): React.JSX.Element;
11
+ export declare function DateRangePicker({ value: valueProp, defaultValue, onValueChange, placeholder, disabled, className, id, name, locale: localeProp, showToday, showClose, fromDate, toDate, allowClear, ...ariaProps }: DateRangePickerProp): React.JSX.Element;
@@ -20,6 +20,8 @@ function DateRangePicker({
20
20
  id,
21
21
  name,
22
22
  locale: localeProp,
23
+ showToday,
24
+ showClose,
23
25
  fromDate,
24
26
  toDate,
25
27
  allowClear = true,
@@ -82,12 +84,12 @@ function DateRangePicker({
82
84
  ...groupA11y,
83
85
  "data-field": rangeField,
84
86
  "aria-disabled": disabled ? true : void 0,
87
+ "data-state": open ? "open" : "closed",
85
88
  className: cn(
86
89
  // One input-styled shell for the whole range — the shared composite-field box, so
87
90
  // this and the month range picker cannot drift into two slightly different fields.
88
91
  "ui-control ui-control-composite-field",
89
- "focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",
90
- open && "border-ring ring-ring/50 ring-[3px]",
92
+ "aria-invalid:border-destructive",
91
93
  className
92
94
  ),
93
95
  onClick: () => {
@@ -192,7 +194,10 @@ function DateRangePicker({
192
194
  ...toDate ? [{ after: toDate }] : []
193
195
  ],
194
196
  startMonth: fromDate,
195
- endMonth: toDate
197
+ endMonth: toDate,
198
+ showToday,
199
+ showClose,
200
+ onClose: () => setOpen(false)
196
201
  }
197
202
  )
198
203
  }
@@ -3,10 +3,9 @@ import type { FormErrorsProp, FormErrorsProviderProp } from "../../props/compone
3
3
  import type { ErrorBagProp } from "../../props/vocabulary/index.js";
4
4
  export type { FormErrorsProp, FormErrorsProp as FormErrorsProps, FormErrorsProviderProp, FormErrorsProviderProp as FormErrorsProviderProps, } from "../../props/components/data-entry.prop.js";
5
5
  /**
6
- * Registry shared by a `Form` with its FormFields and `<FormErrors />`. Each mounted
7
- * `FormField name="…"` CLAIMS its error-bag key (it is the visible owner of that message);
8
- * `<FormErrors />` renders only the unclaimed remainder. Claims are reference-counted so
9
- * duplicate names and unmount order stay correct.
6
+ * Registry shared by a `Form` with its FormFields and `<FormErrors />`. Each mounted `FormField
7
+ * name="…"` CLAIMS its error-bag key (it is the visible owner of that message); `<FormErrors />`
8
+ * renders only the unclaimed remainder.
10
9
  */
11
10
  interface FormErrorsRegistryValue {
12
11
  errors: ErrorBagProp;
@@ -19,18 +18,9 @@ export declare function useFormErrorsRegistry(): FormErrorsRegistryValue | null;
19
18
  /** First message of a bag entry — Laravel arrays surface their first message on the field. */
20
19
  export declare function firstBagMessage(entry: string | string[] | undefined): string | undefined;
21
20
  /**
22
- * FormErrorsProvider — one shared error registry (error bag + claim set) over a region.
23
- * 兄弟 Form 群で 1 つのエラーバッグを共有するための公開プロバイダ。Two ways to get one:
24
- *
25
- * 1. `Form errors={…}` renders this provider itself (both `<form>` and `asChild` modes) —
26
- * the single-form case needs nothing else.
27
- * 2. An edit screen split into several sibling Card+Form sections (the standard exseli shape)
28
- * wraps the REGION in `<FormErrorsProvider errors={…}>` instead: Forms **without** their own
29
- * `errors` join the surrounding registry, every `FormField name="…"` inside claims into it,
30
- * and one `<FormErrors />` anywhere in the region renders the unclaimed remainder.
31
- *
32
- * A nested Form WITH its own `errors` starts a new registry that shadows this one — its claims
33
- * and messages stay inside it.
21
+ * FormErrorsProvider — one shared error registry (error bag + claim set) over a region. 兄弟 Form 群で
22
+ * 1 つのエラーバッグを共有するための公開プロバイダ。Two ways to get one: 1. `Form errors={…}` renders this provider itself
23
+ * (both `<form>` and `asChild` modes) — the single-form case needs nothing else. 2.
34
24
  */
35
25
  export declare function FormErrorsProvider({ errors, children }: FormErrorsProviderProp): React.JSX.Element;
36
26
  /** FormField calls this to claim its error-bag key while mounted (no-op outside a Form). */
@@ -39,7 +29,6 @@ export declare function useClaimErrorKey(name: string | undefined): void;
39
29
  * FormErrors — renders the error-bag entries no mounted `FormField name="…"` displays: server
40
30
  * validation errors attached to hidden/derived fields (an `action_mode`, a `page`, a source-record
41
31
  * id) that would otherwise fail silently. Place it inside a `Form errors={…}` — typically above
42
- * the fields; it renders nothing while every entry is claimed or the bag is empty. Composed on
43
- * `Alert tone="destructive"` (role="alert"), so appearing messages are announced assertively.
32
+ * the fields; it renders nothing while every entry is claimed or the bag is empty.
44
33
  */
45
34
  export declare function FormErrors({ errors: errorsProp, title, className }: FormErrorsProp): React.JSX.Element | null;
@@ -59,19 +59,15 @@ function FormField({
59
59
  const childProps = React.isValidElement(children) ? children.props : void 0;
60
60
  const mergeIds = mergeAriaIds;
61
61
  const childWithA11y = isStatic ? (
62
- // Byte-for-byte the same value typography as `Descriptions.Item`'s `dd` (gh#294), so a
63
62
  // read-only FormField row and a Descriptions value are indistinguishable when mixed. That
64
- // used to be two copies of the literal `text-sm` kept in sync by this comment; both call sites
65
- // now read the SAME token pair (#319), so a service retunes both from one place and they
66
63
  // cannot drift. --descriptions-value-line-height is the mandatory companion: `text-sm` also
67
- // set Tailwind's `--text-sm--line-height`, which the theme never remaps (the gh#260 bug).
68
64
  /* @__PURE__ */ jsx("span", { className: "text-[length:var(--descriptions-value-font-size)] leading-[var(--descriptions-value-line-height)] break-all", children: staticText })
69
65
  ) : React.isValidElement(children) ? React.cloneElement(children, {
70
66
  // The label is associated via aria-labelledby (not <label for>): composite
71
67
  // controls (Radio.Group, checkbox lists, range pairs) have no labelable root,
72
68
  // and a dangling `for` triggers Chrome's "Incorrect use of <label>" issue.
73
69
  id: childProps?.id ?? resolvedId,
74
- // gh#337 — the machine key. Read the child's own value first in BOTH cases: cloneElement
70
+ // Read the child's own value first in BOTH cases: cloneElement
75
71
  // overwrites every key present in the config bag, `undefined` included, so a bare
76
72
  // `"data-field": fieldKey` would erase a value the control set for itself.
77
73
  "data-field": childProps?.["data-field"] ?? fieldKey,
@@ -14,15 +14,7 @@ export declare function useFormLayout(): FormLayoutContextValue | null;
14
14
  /**
15
15
  * Form — Ant-style layout container. Renders a `<form>` and provides layout (vertical/horizontal),
16
16
  * label/control width, label alignment, and a responsive collapse breakpoint to every FormField
17
- * inside it. A FormField may override any of these per-field. Optionally lays fields out in a
18
- * responsive multi-column grid via `columns` (reuses ResponsiveGrid — mobile-first, 1 col on small).
19
- *
20
- * `asChild` renders the caller's own element instead of a `<form>`, keeping only the layout
21
- * context. Routing libraries own the form element — Inertia's `<Form action method>` and
22
- * TanStack Form both render their own — so without this every such consumer has to choose
23
- * between the router's submission handling and the design system's field layout, and ends up
24
- * hand-rolling label columns per field. Two `<form>` elements cannot nest, so wrapping is not
25
- * an option: `<Form asChild layout="horizontal" labelWidth={174}><InertiaForm …/></Form>`.
17
+ * inside it.
26
18
  */
27
19
  export declare const Form: React.ForwardRefExoticComponent<React.FormHTMLAttributes<HTMLFormElement> & {
28
20
  layout?: FormLayoutProp;
@@ -1,37 +1,39 @@
1
1
  import * as React from "react";
2
- export type InputProps = React.InputHTMLAttributes<HTMLInputElement> & {
2
+ export type InputProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & {
3
+ /** Control height tier: `md` (default) or `sm`, the same tiers as SelectTrigger and NumberInput. */
4
+ size?: "sm" | "md";
3
5
  /** Show an inline ✕ that clears the field while it holds text (default false). */
4
6
  allowClear?: boolean;
5
7
  /** Called after the field is cleared via the inline ✕. */
6
8
  onClear?: () => void;
7
9
  /**
8
- * A leading affordance pinned inside the start of the field — e.g. a mail or
9
- * search icon (the common auth/search pattern). Decorative by default; the
10
- * input keeps the keyboard focus. Pairs with `trailingIcon`/`allowClear`.
10
+ * A leading affordance pinned inside the start of the field — e.g. a mail or search icon (the
11
+ * common auth/search pattern). Decorative by default; the input keeps the keyboard focus.
11
12
  */
12
13
  leadingIcon?: React.ReactNode;
13
14
  /**
14
- * A trailing affordance pinned inside the field — e.g. a calendar / clock popover
15
- * trigger button. ONE trailing icon shows at a time: when `allowClear` and the field
16
- * holds a value the clear ✕ REPLACES this icon; otherwise this icon shows. Never both.
15
+ * A trailing affordance pinned inside the field — e.g. a calendar / clock popover trigger
16
+ * button. ONE trailing icon shows at a time: when `allowClear` and the field holds a value the
17
+ * clear ✕ REPLACES this icon; otherwise this icon shows.
17
18
  */
18
19
  trailingIcon?: React.ReactNode;
19
20
  };
20
- export declare const Input: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
21
+ export declare const Input: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "size"> & {
22
+ /** Control height tier: `md` (default) or `sm`, the same tiers as SelectTrigger and NumberInput. */
23
+ size?: "sm" | "md";
21
24
  /** Show an inline ✕ that clears the field while it holds text (default false). */
22
25
  allowClear?: boolean;
23
26
  /** Called after the field is cleared via the inline ✕. */
24
27
  onClear?: () => void;
25
28
  /**
26
- * A leading affordance pinned inside the start of the field — e.g. a mail or
27
- * search icon (the common auth/search pattern). Decorative by default; the
28
- * input keeps the keyboard focus. Pairs with `trailingIcon`/`allowClear`.
29
+ * A leading affordance pinned inside the start of the field — e.g. a mail or search icon (the
30
+ * common auth/search pattern). Decorative by default; the input keeps the keyboard focus.
29
31
  */
30
32
  leadingIcon?: React.ReactNode;
31
33
  /**
32
- * A trailing affordance pinned inside the field — e.g. a calendar / clock popover
33
- * trigger button. ONE trailing icon shows at a time: when `allowClear` and the field
34
- * holds a value the clear ✕ REPLACES this icon; otherwise this icon shows. Never both.
34
+ * A trailing affordance pinned inside the field — e.g. a calendar / clock popover trigger
35
+ * button. ONE trailing icon shows at a time: when `allowClear` and the field holds a value the
36
+ * clear ✕ REPLACES this icon; otherwise this icon shows.
35
37
  */
36
38
  trailingIcon?: React.ReactNode;
37
39
  } & React.RefAttributes<HTMLInputElement>>;
@@ -13,6 +13,7 @@ const inputBaseClass = [
13
13
  ];
14
14
  const Input = React.forwardRef(
15
15
  ({
16
+ size,
16
17
  className,
17
18
  type,
18
19
  allowClear = false,
@@ -73,6 +74,7 @@ const Input = React.forwardRef(
73
74
  {
74
75
  type,
75
76
  "data-slot": "input",
77
+ "data-size": size,
76
78
  ref: setRefs,
77
79
  value,
78
80
  defaultValue,
@@ -103,6 +105,7 @@ const Input = React.forwardRef(
103
105
  {
104
106
  type,
105
107
  "data-slot": "input",
108
+ "data-size": size,
106
109
  ref: setRefs,
107
110
  value,
108
111
  defaultValue,
@@ -63,10 +63,10 @@ function MonthPicker({
63
63
  "div",
64
64
  {
65
65
  "data-disabled": disabled ? "" : void 0,
66
+ "data-state": open ? "open" : "closed",
66
67
  className: cn(
67
68
  "ui-control ui-control-composite-field",
68
- "focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",
69
- open && "border-ring ring-ring/50 ring-[3px]",
69
+ "aria-invalid:border-destructive",
70
70
  className
71
71
  ),
72
72
  onClick: () => {
@@ -2,11 +2,9 @@ import * as React from "react";
2
2
  import type { MonthRangePickerProp } from "../../props/components/data-entry.prop.js";
3
3
  export type { MonthRangePickerProp, MonthRangePickerProp as MonthRangePickerProps, } from "../../props/components/data-entry.prop.js";
4
4
  /**
5
- * MonthRangePicker — year/month (`yyyy/MM`) RANGE rendered as ONE input-styled
6
- * control (Ant Design RangePicker convention): `[ from → to ✕ 📅 ]`. The two
7
- * inner fields stay real, typeable `yyyy/MM` inputs (form-submittable via
8
- * `${name}_from` / `${name}_to`); the Ant-style month grid is the visual
9
- * affordance. Grid picks are two-step (from, then to — swapped when picked
10
- * backwards) and a pick on a COMPLETE range starts a new one (reset-on-complete).
5
+ * MonthRangePicker — year/month (`yyyy/MM`) RANGE rendered as ONE input-styled control (Ant Design
6
+ * RangePicker convention): `[ from → to ✕ 📅 ]`. The two inner fields stay real, typeable
7
+ * `yyyy/MM` inputs (form-submittable via `${name}_from` / `${name}_to`); the Ant-style month grid
8
+ * is the visual affordance.
11
9
  */
12
10
  export declare function MonthRangePicker({ value: valueProp, defaultValue, onValueChange, placeholder, disabled, className, id, name, fromYear, toYear, allowClear, ...ariaProps }: MonthRangePickerProp): React.JSX.Element;
@@ -113,10 +113,10 @@ function MonthRangePicker({
113
113
  "data-field": rangeField,
114
114
  "aria-disabled": disabled ? true : void 0,
115
115
  "data-disabled": disabled ? "" : void 0,
116
+ "data-state": open ? "open" : "closed",
116
117
  className: cn(
117
118
  "ui-control ui-control-composite-field",
118
- "focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",
119
- open && "border-ring ring-ring/50 ring-[3px]",
119
+ "aria-invalid:border-destructive",
120
120
  className
121
121
  ),
122
122
  onClick: () => {
@@ -2,11 +2,7 @@ import * as React from "react";
2
2
  export type { NumberInputProp, NumberInputProp as NumberInputProps, } from "../../props/components/data-entry.prop.js";
3
3
  /**
4
4
  * NumberInput — WAI-ARIA spinbutton: a localized numeric `<Input>` with increment/decrement steps.
5
- *
6
- * Composes the real `Input` primitive (no raw `<input>`) plus two icon `Button`s. The text input is
7
- * the `role="spinbutton"` element carrying `aria-valuenow/min/max/text`; type freely, ArrowUp/Down
8
- * (Shift = ×10) step, and the value commits clamped + rounded to `precision` on blur/Enter/step.
9
- * Display formats via `Intl.NumberFormat` at rest, but stays raw and typeable while focused.
5
+ * Composes the real `Input` primitive (no raw `<input>`) plus two icon `Button`s.
10
6
  */
11
7
  export declare const NumberInput: React.ForwardRefExoticComponent<import("../../lib/field-a11y.js").FieldA11yProps & {
12
8
  value?: import("../../props/index.js").ValueProp<number | null>;
@@ -154,6 +154,7 @@ const NumberInput = React.forwardRef(
154
154
  role: "spinbutton",
155
155
  "data-slot": "number-input-field",
156
156
  "data-testid": dataTestId,
157
+ "data-field": ariaProps["data-field"],
157
158
  className: "ui-number-input-field",
158
159
  value: draft,
159
160
  placeholder,
@@ -23,7 +23,6 @@ const RadioItem = React.forwardRef(({ className, ...props }, ref) => /* @__PURE_
23
23
  ref,
24
24
  "data-slot": "radio-group-item",
25
25
  className: cn(
26
- // `disabled:cursor-not-allowed disabled:opacity-50` DELETED, not moved (#319):
27
26
  // `.ui-radio:disabled, .ui-radio[data-disabled]` in styles/control.css already declares both
28
27
  // and reads --disabled-opacity. The utility was layered after components, so it silently
29
28
  // outranked that token — a service theme's --disabled-opacity never reached a radio.
@@ -4,9 +4,7 @@ export type { SearchSelectProp, SearchSelectProp as SearchSelectProps, SearchSel
4
4
  /**
5
5
  * SearchSelect — a searchable single-select combobox with a debounced search box, optional
6
6
  * optgroup-style grouping (`option.group`), and loading/empty states. Drive it EITHER remotely
7
- * with `loadOptions({ query, page })` (server search + infinite scroll) OR with a static
8
- * `options` array (client-side filter) — the latter supersedes the legacy `Autocomplete`.
9
- * Custom per-option rendering via `renderOption` (Ant-Design style). Form-submittable via
10
- * `name`; e2e-testable by the trigger's `data-testid` + each option's `${data-testid}-option-${value}`.
7
+ * with `loadOptions({ query, page })` (server search + infinite scroll) OR with a static `options`
8
+ * array (client-side filter) — the latter supersedes the legacy `Autocomplete`.
11
9
  */
12
10
  export declare function SearchSelect({ value: valueProp, defaultValue, onValueChange, options: staticOptions, loadOptions, renderOption, labelRender, selectedLabel, selectedIcon, placeholder, searchPlaceholder, emptyMessage, loadingMessage, errorMessage, clearLabel, clearable, disabled, readOnly, size, open: openProp, onOpenChange, search: searchProp, onSearchChange, filterOption, renderError, renderLoadMore, name, id, className, "data-testid": dataTestId, "data-field": dataField, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "aria-errormessage": ariaErrorMessage, "aria-invalid": ariaInvalid, "aria-required": ariaRequired, }: SearchSelectProp): React.JSX.Element;
@@ -1,4 +1,5 @@
1
1
  import * as React from "react";
2
+ import type { ControlWidthProp } from "../../props/vocabulary/shared.prop.js";
2
3
  import * as SelectPrimitive from "@radix-ui/react-select";
3
4
  import type { FieldA11yProps } from "../../lib/field-a11y.js";
4
5
  import type { SelectDataProp } from "../../props/components/data-entry.prop.js";
@@ -20,19 +21,23 @@ export declare function SelectGroup(props: React.ComponentProps<typeof SelectPri
20
21
  export declare function SelectValue(props: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
21
22
  export declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
22
23
  size?: "sm" | "md";
24
+ /**
25
+ * `full` (default) fills the field column — right inside a FormField. `auto` sizes to the
26
+ * selected label — right in a PageContainer `extra` slot, a toolbar or a footer row, where a
27
+ * full-width trigger swallows the row and starves its siblings (text truncated to "UA…").
28
+ */
29
+ width?: ControlWidthProp;
23
30
  /**
24
31
  * Show the built-in chevron disclosure indicator (default true). Set `false` for specialized
25
32
  * triggers — icon-only, or one that already renders its own affordance — so it isn't
26
- * duplicated. Omits the icon from the DOM entirely (not a CSS hide), so no consumer
27
- * descendant CSS is needed to remove it.
33
+ * duplicated.
28
34
  */
29
35
  showIndicator?: boolean;
30
- /** Stable machine key (gh#337) — normally inherited from `FormField` through the Select. */
31
36
  "data-field"?: string;
32
37
  /**
33
- * The selected CODE (gh#337). Normally supplied by `Select` itself — the trigger shows the
34
- * option's LABEL, and this is the only place the underlying value is readable from the DOM
35
- * without reaching into Radix's aria-hidden native `<select>`.
38
+ * Normally supplied by `Select` itself — the trigger shows the option's LABEL, and this is the
39
+ * only place the underlying value is readable from the DOM without reaching into Radix's
40
+ * aria-hidden native `<select>`.
36
41
  */
37
42
  "data-value"?: string;
38
43
  } & React.RefAttributes<HTMLButtonElement>>;
@@ -64,7 +64,7 @@ function SelectGroup(props) {
64
64
  function SelectValue(props) {
65
65
  return /* @__PURE__ */ jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
66
66
  }
67
- const SelectTrigger = React.forwardRef(({ className, children, size = "md", showIndicator = true, ...props }, ref) => {
67
+ const SelectTrigger = React.forwardRef(({ className, children, size = "md", width = "full", showIndicator = true, ...props }, ref) => {
68
68
  const field = React.useContext(SelectFieldA11yContext);
69
69
  const ownsName = props["aria-label"] !== void 0 || props["aria-labelledby"] !== void 0;
70
70
  const fieldOwnsName = field?.["aria-label"] !== void 0 || field?.["aria-labelledby"] !== void 0;
@@ -94,9 +94,11 @@ const SelectTrigger = React.forwardRef(({ className, children, size = "md", show
94
94
  ref,
95
95
  "data-slot": "select-trigger",
96
96
  "data-size": size,
97
+ "data-width": width,
97
98
  className: cn(
98
99
  controlTriggerClass,
99
- "aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground w-full whitespace-nowrap transition-[color,box-shadow] outline-none *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center",
100
+ width === "auto" ? "w-auto" : "w-full",
101
+ "aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground whitespace-nowrap transition-[color,box-shadow] outline-none *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center",
100
102
  className
101
103
  ),
102
104
  ...props,
@@ -32,7 +32,6 @@ const Switch = React.forwardRef(
32
32
  checked: isChecked,
33
33
  onCheckedChange: handleCheckedChange,
34
34
  className: cn(
35
- // `disabled:cursor-not-allowed disabled:opacity-50` DELETED, not moved (#319):
36
35
  // `.ui-switch:disabled, .ui-switch[data-disabled]` in styles/control.css already
37
36
  // declares both and reads --disabled-opacity. The utility was layered after
38
37
  // components, so it silently outranked that token. Byte-identical: the token
@@ -5,20 +5,17 @@ export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> &
5
5
  /** Called after the field is cleared via the inline ✕. */
6
6
  onClear?: () => void;
7
7
  /**
8
- * `ghost` strips the field's own border, background and focus ring, for a textarea embedded
9
- * in a surface that already draws the box (a chat composer inside a Card). The surface then
10
- * owns focus — give it `focus-within`. Default keeps the standalone control chrome.
8
+ * `ghost` strips the field's own border, background and focus ring, for a textarea embedded in a
9
+ * surface that already draws the box (a chat composer inside a Card). The surface then owns
10
+ * focus — give it `focus-within`.
11
11
  */
12
12
  variant?: "default" | "ghost";
13
13
  /**
14
- * Grow the control with its content instead of holding a fixed `rows` height (default false —
15
- * the inert default, so every existing `<Textarea>` keeps the geometry it has today).
16
- *
17
14
  * The floor is `minRows` (or `rows`, when that is the only one given) and never undercuts the
18
15
  * `--control-height` tier; past `maxRows` the control stops growing and scrolls internally.
19
16
  * Sizing is done in CSS by a hidden replica of the text, so it follows a paste, a programmatic
20
17
  * value change, a font swap and a container resize — not just typing — and it never writes
21
- * `style.height` or reads `scrollHeight`. Works controlled and uncontrolled.
18
+ * `style.height` or reads `scrollHeight`.
22
19
  */
23
20
  autoGrow?: boolean;
24
21
  /**
@@ -29,7 +26,7 @@ export type TextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> &
29
26
  /**
30
27
  * Ceiling in text rows while `autoGrow` (theme default `--textarea-autogrow-max-height-rows`,
31
28
  * 8); beyond it the control scrolls internally rather than pushing the page. Pass `0` for no
32
- * ceiling — only correct inside an owning scroll container. Ignored when `autoGrow` is false.
29
+ * ceiling — only correct inside an owning scroll container.
33
30
  */
34
31
  maxRows?: number;
35
32
  };
@@ -39,20 +36,17 @@ export declare const Textarea: React.ForwardRefExoticComponent<React.TextareaHTM
39
36
  /** Called after the field is cleared via the inline ✕. */
40
37
  onClear?: () => void;
41
38
  /**
42
- * `ghost` strips the field's own border, background and focus ring, for a textarea embedded
43
- * in a surface that already draws the box (a chat composer inside a Card). The surface then
44
- * owns focus — give it `focus-within`. Default keeps the standalone control chrome.
39
+ * `ghost` strips the field's own border, background and focus ring, for a textarea embedded in a
40
+ * surface that already draws the box (a chat composer inside a Card). The surface then owns
41
+ * focus — give it `focus-within`.
45
42
  */
46
43
  variant?: "default" | "ghost";
47
44
  /**
48
- * Grow the control with its content instead of holding a fixed `rows` height (default false —
49
- * the inert default, so every existing `<Textarea>` keeps the geometry it has today).
50
- *
51
45
  * The floor is `minRows` (or `rows`, when that is the only one given) and never undercuts the
52
46
  * `--control-height` tier; past `maxRows` the control stops growing and scrolls internally.
53
47
  * Sizing is done in CSS by a hidden replica of the text, so it follows a paste, a programmatic
54
48
  * value change, a font swap and a container resize — not just typing — and it never writes
55
- * `style.height` or reads `scrollHeight`. Works controlled and uncontrolled.
49
+ * `style.height` or reads `scrollHeight`.
56
50
  */
57
51
  autoGrow?: boolean;
58
52
  /**
@@ -63,7 +57,7 @@ export declare const Textarea: React.ForwardRefExoticComponent<React.TextareaHTM
63
57
  /**
64
58
  * Ceiling in text rows while `autoGrow` (theme default `--textarea-autogrow-max-height-rows`,
65
59
  * 8); beyond it the control scrolls internally rather than pushing the page. Pass `0` for no
66
- * ceiling — only correct inside an owning scroll container. Ignored when `autoGrow` is false.
60
+ * ceiling — only correct inside an owning scroll container.
67
61
  */
68
62
  maxRows?: number;
69
63
  } & React.RefAttributes<HTMLTextAreaElement>>;