@godxjp/ui 19.1.0 → 19.3.1

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 (437) 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 +20 -14
  11. package/dist/components/data-display/badge.js +18 -4
  12. package/dist/components/data-display/card.d.ts +21 -41
  13. package/dist/components/data-display/carousel.d.ts +1 -2
  14. package/dist/components/data-display/code-block.d.ts +4 -0
  15. package/dist/components/data-display/code-block.js +24 -0
  16. package/dist/components/data-display/data-table.d.ts +15 -37
  17. package/dist/components/data-display/data-table.js +1 -3
  18. package/dist/components/data-display/descriptions.d.ts +2 -6
  19. package/dist/components/data-display/descriptions.js +0 -2
  20. package/dist/components/data-display/index.d.ts +4 -0
  21. package/dist/components/data-display/index.js +4 -0
  22. package/dist/components/data-display/list-row.d.ts +3 -22
  23. package/dist/components/data-display/permission-matrix.d.ts +7 -20
  24. package/dist/components/data-display/progress.d.ts +1 -1
  25. package/dist/components/data-display/prose.d.ts +4 -0
  26. package/dist/components/data-display/prose.js +20 -0
  27. package/dist/components/data-display/service-launcher-card.d.ts +3 -10
  28. package/dist/components/data-display/table.d.ts +20 -80
  29. package/dist/components/data-display/table.js +0 -3
  30. package/dist/components/data-display/timeline.d.ts +3 -5
  31. package/dist/components/data-entry/branch-scope-picker.d.ts +2 -19
  32. package/dist/components/data-entry/branch-scope-picker.js +0 -1
  33. package/dist/components/data-entry/calendar.d.ts +3 -2
  34. package/dist/components/data-entry/calendar.js +58 -3
  35. package/dist/components/data-entry/command-palette.d.ts +8 -22
  36. package/dist/components/data-entry/date-picker.d.ts +4 -5
  37. package/dist/components/data-entry/date-picker.js +6 -1
  38. package/dist/components/data-entry/date-range-picker.d.ts +1 -1
  39. package/dist/components/data-entry/date-range-picker.js +8 -3
  40. package/dist/components/data-entry/form-errors.d.ts +7 -18
  41. package/dist/components/data-entry/form-field.js +1 -5
  42. package/dist/components/data-entry/form.d.ts +1 -9
  43. package/dist/components/data-entry/input.d.ts +16 -14
  44. package/dist/components/data-entry/input.js +3 -0
  45. package/dist/components/data-entry/month-picker.js +2 -2
  46. package/dist/components/data-entry/month-range-picker.d.ts +4 -6
  47. package/dist/components/data-entry/month-range-picker.js +2 -2
  48. package/dist/components/data-entry/number-input.d.ts +1 -5
  49. package/dist/components/data-entry/number-input.js +1 -0
  50. package/dist/components/data-entry/radio.js +0 -1
  51. package/dist/components/data-entry/search-select.d.ts +2 -4
  52. package/dist/components/data-entry/select.d.ts +11 -6
  53. package/dist/components/data-entry/select.js +4 -2
  54. package/dist/components/data-entry/switch.js +0 -1
  55. package/dist/components/data-entry/textarea.d.ts +10 -16
  56. package/dist/components/data-entry/time-picker.d.ts +3 -5
  57. package/dist/components/data-entry/upload-types.d.ts +1 -5
  58. package/dist/components/data-entry/use-upload-draft.d.ts +0 -4
  59. package/dist/components/feedback/dialog.d.ts +6 -15
  60. package/dist/components/feedback/overlay-header-tone.d.ts +1 -1
  61. package/dist/components/feedback/sheet.d.ts +3 -10
  62. package/dist/components/feedback/sheet.js +1 -1
  63. package/dist/components/feedback/sonner.js +2 -3
  64. package/dist/components/general/activity.d.ts +4 -30
  65. package/dist/components/general/button.js +1 -10
  66. package/dist/components/general/logo.d.ts +6 -28
  67. package/dist/components/general/reveal.d.ts +3 -9
  68. package/dist/components/general/typography.d.ts +1 -3
  69. package/dist/components/layout/account-chip.d.ts +8 -0
  70. package/dist/components/layout/account-chip.js +45 -0
  71. package/dist/components/layout/auth-divider.d.ts +2 -9
  72. package/dist/components/layout/auth-shell.d.ts +1 -14
  73. package/dist/components/layout/breadcrumb.d.ts +1 -5
  74. package/dist/components/layout/centered-shell.d.ts +4 -18
  75. package/dist/components/layout/error-surface.d.ts +11 -28
  76. package/dist/components/layout/error-surface.js +4 -1
  77. package/dist/components/layout/index.d.ts +2 -0
  78. package/dist/components/layout/index.js +2 -0
  79. package/dist/components/layout/legal-document-shell.d.ts +5 -28
  80. package/dist/components/layout/master-detail.d.ts +2 -18
  81. package/dist/components/layout/page-container.js +0 -1
  82. package/dist/components/layout/responsive-grid.d.ts +6 -1
  83. package/dist/components/layout/responsive-grid.js +9 -2
  84. package/dist/components/layout/service-role-panel.d.ts +7 -19
  85. package/dist/components/layout/sidebar.d.ts +5 -27
  86. package/dist/components/layout/sidebar.js +0 -1
  87. package/dist/components/layout/split-pane.d.ts +0 -7
  88. package/dist/components/layout/topbar.d.ts +1 -14
  89. package/dist/components/navigation/app-setting-picker.js +1 -3
  90. package/dist/components/navigation/filter-bar.d.ts +1 -6
  91. package/dist/components/navigation/pagination-utils.d.ts +2 -12
  92. package/dist/components/navigation/tabs-scroll.d.ts +2 -36
  93. package/dist/components/navigation/tabs.js +4 -8
  94. package/dist/components/query/data-state.d.ts +2 -2
  95. package/dist/components/ui/credential-reveal.d.ts +1 -4
  96. package/dist/components/ui/hover-card.d.ts +1 -2
  97. package/dist/components/ui/separator.d.ts +2 -15
  98. package/dist/components/ui/toggle-group.d.ts +1 -5
  99. package/dist/components/ui/toggle.d.ts +6 -31
  100. package/dist/email/brand-mark.d.ts +6 -34
  101. package/dist/email/color.d.ts +7 -17
  102. package/dist/email/geometry.d.ts +4 -8
  103. package/dist/email/index.d.ts +4 -48
  104. package/dist/email/inline-style.d.ts +3 -9
  105. package/dist/email/urgency.d.ts +2 -7
  106. package/dist/form/form-context.d.ts +2 -5
  107. package/dist/form/form-root.d.ts +1 -2
  108. package/dist/i18n/messages/en.json +4 -0
  109. package/dist/i18n/messages/ja.json +4 -0
  110. package/dist/i18n/messages/vi.json +4 -0
  111. package/dist/inertia/index.d.ts +2 -10
  112. package/dist/lib/control-styles.d.ts +10 -21
  113. package/dist/lib/control-styles.js +4 -6
  114. package/dist/lib/datetime/format-date.d.ts +1 -4
  115. package/dist/lib/field-a11y.d.ts +11 -68
  116. package/dist/lib/field-a11y.js +0 -1
  117. package/dist/lib/format.d.ts +4 -8
  118. package/dist/lib/hooks.d.ts +6 -12
  119. package/dist/lib/permission-grid.d.ts +3 -18
  120. package/dist/lib/query-error.d.ts +3 -3
  121. package/dist/props/components/app.prop.d.ts +15 -38
  122. package/dist/props/components/charts.prop.d.ts +2 -3
  123. package/dist/props/components/data-display.prop.d.ts +55 -72
  124. package/dist/props/components/data-entry.prop.d.ts +35 -40
  125. package/dist/props/components/form.prop.d.ts +2 -6
  126. package/dist/props/components/general.prop.d.ts +11 -27
  127. package/dist/props/components/layout.prop.d.ts +89 -260
  128. package/dist/props/components/navigation.prop.d.ts +27 -42
  129. package/dist/props/registry.d.ts +36 -1
  130. package/dist/props/registry.js +45 -1
  131. package/dist/props/vocabulary/data.prop.d.ts +18 -49
  132. package/dist/props/vocabulary/index.d.ts +1 -1
  133. package/dist/props/vocabulary/interaction.prop.d.ts +10 -12
  134. package/dist/props/vocabulary/layout.prop.d.ts +8 -30
  135. package/dist/props/vocabulary/shared.prop.d.ts +3 -2
  136. package/dist/styles/alert-layout.css +1 -32
  137. package/dist/styles/badge-layout.css +19 -18
  138. package/dist/styles/base.css +14 -113
  139. package/dist/styles/card-layout.css +6 -128
  140. package/dist/styles/chart-layout.css +2 -17
  141. package/dist/styles/control.css +380 -458
  142. package/dist/styles/core.css +21 -0
  143. package/dist/styles/data-display-layout.css +175 -94
  144. package/dist/styles/data-entry-layout.css +0 -45
  145. package/dist/styles/density.css +1 -30
  146. package/dist/styles/dialog-layout.css +5 -69
  147. package/dist/styles/focus-ring.css +13 -87
  148. package/dist/styles/fonts.css +1 -31
  149. package/dist/styles/form-layout.css +7 -91
  150. package/dist/styles/index.css +2 -20
  151. package/dist/styles/layout.css +38 -456
  152. package/dist/styles/logo-layout.css +1 -35
  153. package/dist/styles/motion.css +3 -42
  154. package/dist/styles/navigation-layout.css +3 -50
  155. package/dist/styles/shell-layout.css +37 -403
  156. package/dist/styles/table-layout.css +16 -274
  157. package/dist/styles/text-layout.css +7 -21
  158. package/dist/styles/toggle.css +1 -23
  159. package/dist/theme/dxs.canonical.css +1 -55
  160. package/dist/theme/example.service.css +1 -26
  161. package/dist/theme/famgia.service.css +5 -15
  162. package/dist/tokens/axes.css +3 -40
  163. package/dist/tokens/base.css +1 -4
  164. package/dist/tokens/components/activity.css +6 -42
  165. package/dist/tokens/components/badge.css +12 -13
  166. package/dist/tokens/components/banner.css +4 -9
  167. package/dist/tokens/components/card.css +32 -88
  168. package/dist/tokens/components/chart.css +9 -26
  169. package/dist/tokens/components/control.css +37 -222
  170. package/dist/tokens/components/data-display.css +28 -79
  171. package/dist/tokens/components/data-entry.css +5 -19
  172. package/dist/tokens/components/descriptions.css +7 -27
  173. package/dist/tokens/components/email.css +38 -84
  174. package/dist/tokens/components/error-surface.css +2 -18
  175. package/dist/tokens/components/feedback.css +27 -124
  176. package/dist/tokens/components/form.css +13 -45
  177. package/dist/tokens/components/legal-document.css +16 -41
  178. package/dist/tokens/components/list-row.css +11 -36
  179. package/dist/tokens/components/logo.css +2 -57
  180. package/dist/tokens/components/navigation.css +16 -94
  181. package/dist/tokens/components/scroll-area.css +2 -18
  182. package/dist/tokens/components/separator.css +8 -30
  183. package/dist/tokens/components/sheet.css +3 -14
  184. package/dist/tokens/components/shell.css +53 -307
  185. package/dist/tokens/components/sidebar.css +5 -22
  186. package/dist/tokens/components/table.css +19 -140
  187. package/dist/tokens/components/toggle.css +3 -65
  188. package/dist/tokens/components/upload.css +7 -43
  189. package/dist/tokens/foundation.css +108 -383
  190. package/dist/tokens/semantic/layout.css +33 -207
  191. package/docs/CANONICAL-CONTRACTS.md +206 -0
  192. package/docs/COMPONENTS.md +157 -0
  193. package/docs/COMPOSITION-VS-COMPONENT.md +105 -0
  194. package/docs/CONSUMER-RULES.md +14 -0
  195. package/docs/CUSTOMER-THEMING.md +162 -0
  196. package/docs/DATETIME.md +69 -0
  197. package/docs/DEVELOPMENT.md +173 -0
  198. package/docs/FORMS.md +143 -0
  199. package/docs/FRAME-A11Y-CI.md +267 -0
  200. package/docs/FRAME-COVERAGE-LEDGER.md +123 -0
  201. package/docs/FRAME-COVERAGE-REPORT.md +140 -0
  202. package/docs/FRAME-COVERAGE-STANDARD.md +65 -0
  203. package/docs/FRAME-COVERAGE.md +29 -0
  204. package/docs/PROPS-REGISTRY.md +61 -0
  205. package/docs/PROPS-VOCABULARY.md +100 -0
  206. package/docs/README.md +60 -0
  207. package/docs/REGISTRY.md +70 -0
  208. package/docs/SPACING.md +56 -0
  209. package/docs/STANDARDS-vocabulary-tokens.md +48 -0
  210. package/docs/TESTING.md +98 -0
  211. package/docs/TOKENS.md +347 -0
  212. package/docs/asset-modules.d.ts +46 -0
  213. package/docs/assets/cover-terrain.svg +6 -0
  214. package/docs/assets/portrait-amber.svg +5 -0
  215. package/docs/assets/portrait-clay.svg +5 -0
  216. package/docs/assets/portrait-indigo.svg +5 -0
  217. package/docs/assets/portrait-iris.svg +5 -0
  218. package/docs/assets/portrait-moss.svg +5 -0
  219. package/docs/assets/portrait-plum.svg +5 -0
  220. package/docs/assets/portrait-slate.svg +5 -0
  221. package/docs/charts/compact-bar-trend.tsx +328 -0
  222. package/docs/charts/size-tiers.tsx +192 -0
  223. package/docs/data-display/accordion.tsx +99 -0
  224. package/docs/data-display/avatar.tsx +355 -0
  225. package/docs/data-display/badge.tsx +283 -0
  226. package/docs/data-display/card/examples/detail-panel.tsx +106 -0
  227. package/docs/data-display/card/index.md +3 -0
  228. package/docs/data-display/card/index.tsx +285 -0
  229. package/docs/data-display/carousel.tsx +160 -0
  230. package/docs/data-display/charts.tsx +198 -0
  231. package/docs/data-display/code-block.tsx +90 -0
  232. package/docs/data-display/collapsible.tsx +162 -0
  233. package/docs/data-display/credential-reveal.tsx +145 -0
  234. package/docs/data-display/data-table/examples/approval-queue.tsx +212 -0
  235. package/docs/data-display/data-table/examples/grid-features.tsx +158 -0
  236. package/docs/data-display/data-table/examples/list-page.tsx +175 -0
  237. package/docs/data-display/data-table/index.md +5 -0
  238. package/docs/data-display/data-table/index.tsx +295 -0
  239. package/docs/data-display/descriptions.tsx +143 -0
  240. package/docs/data-display/empty-state.tsx +164 -0
  241. package/docs/data-display/hover-card.tsx +181 -0
  242. package/docs/data-display/list-row.tsx +420 -0
  243. package/docs/data-display/permission-matrix.tsx +188 -0
  244. package/docs/data-display/popover-touch.tsx +27 -0
  245. package/docs/data-display/popover.tsx +246 -0
  246. package/docs/data-display/progress.tsx +84 -0
  247. package/docs/data-display/prose.tsx +105 -0
  248. package/docs/data-display/qr-code.tsx +68 -0
  249. package/docs/data-display/scroll-area.tsx +303 -0
  250. package/docs/data-display/service-launcher-card.tsx +145 -0
  251. package/docs/data-display/stat-card.tsx +99 -0
  252. package/docs/data-display/table.tsx +251 -0
  253. package/docs/data-display/timeline.tsx +112 -0
  254. package/docs/data-display/touch-actions.tsx +36 -0
  255. package/docs/data-display/tree-list.tsx +107 -0
  256. package/docs/data-entry/branch-scope-picker.tsx +123 -0
  257. package/docs/data-entry/calendar.tsx +180 -0
  258. package/docs/data-entry/cascader.tsx +378 -0
  259. package/docs/data-entry/checkbox.tsx +256 -0
  260. package/docs/data-entry/color-picker.tsx +117 -0
  261. package/docs/data-entry/command-palette.tsx +179 -0
  262. package/docs/data-entry/command.tsx +262 -0
  263. package/docs/data-entry/country-picker-recipe.tsx +175 -0
  264. package/docs/data-entry/date-picker.tsx +191 -0
  265. package/docs/data-entry/date-range-picker.tsx +149 -0
  266. package/docs/data-entry/form/examples/employee-settings.tsx +267 -0
  267. package/docs/data-entry/form/examples/invoice-form.tsx +387 -0
  268. package/docs/data-entry/form-field/examples/a11y-contract.tsx +240 -0
  269. package/docs/data-entry/form-field/examples/create-form.tsx +105 -0
  270. package/docs/data-entry/form-field/index.md +8 -0
  271. package/docs/data-entry/form-field/index.tsx +330 -0
  272. package/docs/data-entry/form-inertia.tsx +80 -0
  273. package/docs/data-entry/form-root.tsx +102 -0
  274. package/docs/data-entry/form.tsx +724 -0
  275. package/docs/data-entry/input-otp.tsx +231 -0
  276. package/docs/data-entry/input.tsx +114 -0
  277. package/docs/data-entry/label.tsx +100 -0
  278. package/docs/data-entry/month-picker.tsx +101 -0
  279. package/docs/data-entry/month-range-picker.tsx +115 -0
  280. package/docs/data-entry/number-input.tsx +240 -0
  281. package/docs/data-entry/password-input.tsx +102 -0
  282. package/docs/data-entry/password-strength.tsx +97 -0
  283. package/docs/data-entry/radio-group.tsx +95 -0
  284. package/docs/data-entry/rating.tsx +87 -0
  285. package/docs/data-entry/search-input.tsx +120 -0
  286. package/docs/data-entry/select-async-contracts.tsx +108 -0
  287. package/docs/data-entry/select-matrix.tsx +204 -0
  288. package/docs/data-entry/select.tsx +369 -0
  289. package/docs/data-entry/slider.tsx +130 -0
  290. package/docs/data-entry/switch.tsx +67 -0
  291. package/docs/data-entry/tag-input.tsx +108 -0
  292. package/docs/data-entry/textarea.tsx +209 -0
  293. package/docs/data-entry/time-picker.tsx +99 -0
  294. package/docs/data-entry/toggle-count.tsx +293 -0
  295. package/docs/data-entry/toggle-group.tsx +225 -0
  296. package/docs/data-entry/toggle.tsx +127 -0
  297. package/docs/data-entry/transfer.tsx +97 -0
  298. package/docs/data-entry/tree-select.tsx +204 -0
  299. package/docs/data-entry/upload.tsx +184 -0
  300. package/docs/feedback/alert-dialog.tsx +270 -0
  301. package/docs/feedback/alert.tsx +248 -0
  302. package/docs/feedback/banner.tsx +183 -0
  303. package/docs/feedback/danger-confirm.tsx +88 -0
  304. package/docs/feedback/dialog-touch.tsx +24 -0
  305. package/docs/feedback/dialog.tsx +193 -0
  306. package/docs/feedback/sheet.tsx +420 -0
  307. package/docs/feedback/skeleton.tsx +111 -0
  308. package/docs/feedback/toast.tsx +135 -0
  309. package/docs/feedback/tooltip.tsx +171 -0
  310. package/docs/feedback/two-factor-setup.tsx +68 -0
  311. package/docs/foundation/_email-specimen.ts +274 -0
  312. package/docs/foundation/colors.tsx +204 -0
  313. package/docs/foundation/density.tsx +232 -0
  314. package/docs/foundation/email-tokens.tsx +323 -0
  315. package/docs/foundation/radius-shadow.tsx +154 -0
  316. package/docs/foundation/spacing.tsx +211 -0
  317. package/docs/foundation/typography.tsx +147 -0
  318. package/docs/general/activity.tsx +224 -0
  319. package/docs/general/button/examples/destructive-confirm.tsx +90 -0
  320. package/docs/general/button/examples/form-actions.tsx +85 -0
  321. package/docs/general/button/examples/toolbar.tsx +160 -0
  322. package/docs/general/button/index.md +12 -0
  323. package/docs/general/button/index.tsx +211 -0
  324. package/docs/general/logo.tsx +131 -0
  325. package/docs/general/reveal.tsx +41 -0
  326. package/docs/general/typography.tsx +152 -0
  327. package/docs/layout/account-chip.tsx +72 -0
  328. package/docs/layout/admin-collection.tsx +122 -0
  329. package/docs/layout/app-shell.tsx +374 -0
  330. package/docs/layout/aspect-ratio.tsx +135 -0
  331. package/docs/layout/auth-account-summary.tsx +103 -0
  332. package/docs/layout/auth-divider.tsx +28 -0
  333. package/docs/layout/auth-footer.tsx +37 -0
  334. package/docs/layout/auth-identity.tsx +36 -0
  335. package/docs/layout/auth-recovery/examples/mfa-challenge.md +41 -0
  336. package/docs/layout/auth-recovery/examples/mfa-challenge.tsx +254 -0
  337. package/docs/layout/auth-recovery/examples/mobile-390.md +25 -0
  338. package/docs/layout/auth-recovery/examples/mobile-390.tsx +82 -0
  339. package/docs/layout/auth-recovery/examples/password-recovery.md +24 -0
  340. package/docs/layout/auth-recovery/examples/password-recovery.tsx +197 -0
  341. package/docs/layout/auth-recovery/examples/wrapping-ja-en-vi.md +27 -0
  342. package/docs/layout/auth-recovery/examples/wrapping-ja-en-vi.tsx +156 -0
  343. package/docs/layout/auth-recovery/index.md +140 -0
  344. package/docs/layout/auth-recovery/index.tsx +96 -0
  345. package/docs/layout/auth-shell-context.tsx +103 -0
  346. package/docs/layout/auth-shell-device.tsx +112 -0
  347. package/docs/layout/auth-shell-registration.tsx +335 -0
  348. package/docs/layout/auth-shell-variants.tsx +139 -0
  349. package/docs/layout/auth-shell.tsx +59 -0
  350. package/docs/layout/auth-stack.tsx +40 -0
  351. package/docs/layout/centered-shell.tsx +102 -0
  352. package/docs/layout/error-surface/examples/application-403.tsx +84 -0
  353. package/docs/layout/error-surface/examples/application-404.tsx +77 -0
  354. package/docs/layout/error-surface/examples/system-500.tsx +47 -0
  355. package/docs/layout/error-surface/examples/system-503.tsx +48 -0
  356. package/docs/layout/error-surface/index.md +153 -0
  357. package/docs/layout/error-surface/index.tsx +239 -0
  358. package/docs/layout/flex.tsx +266 -0
  359. package/docs/layout/legal-document-shell/_data.ts +110 -0
  360. package/docs/layout/legal-document-shell/examples/desktop-1440.md +12 -0
  361. package/docs/layout/legal-document-shell/examples/desktop-1440.tsx +83 -0
  362. package/docs/layout/legal-document-shell/examples/mobile-390.md +22 -0
  363. package/docs/layout/legal-document-shell/examples/mobile-390.tsx +70 -0
  364. package/docs/layout/legal-document-shell/examples/tablet-1024.md +3 -0
  365. package/docs/layout/legal-document-shell/examples/tablet-1024.tsx +84 -0
  366. package/docs/layout/legal-document-shell/examples/wrapping-ja-en-vi.md +18 -0
  367. package/docs/layout/legal-document-shell/examples/wrapping-ja-en-vi.tsx +61 -0
  368. package/docs/layout/legal-document-shell/index.md +51 -0
  369. package/docs/layout/legal-document-shell/index.tsx +101 -0
  370. package/docs/layout/master-detail.tsx +387 -0
  371. package/docs/layout/org-switcher.tsx +131 -0
  372. package/docs/layout/page-container.tsx +954 -0
  373. package/docs/layout/resizable-panel.tsx +419 -0
  374. package/docs/layout/responsive-grid.tsx +243 -0
  375. package/docs/layout/separator.tsx +327 -0
  376. package/docs/layout/service-role-panel.tsx +144 -0
  377. package/docs/layout/sidebar.tsx +609 -0
  378. package/docs/layout/split-pane.tsx +468 -0
  379. package/docs/layout/topbar.tsx +349 -0
  380. package/docs/navigation/app-setting-picker.tsx +142 -0
  381. package/docs/navigation/breadcrumb.tsx +135 -0
  382. package/docs/navigation/context-menu.tsx +123 -0
  383. package/docs/navigation/dropdown-menu.tsx +213 -0
  384. package/docs/navigation/filter-bar.tsx +227 -0
  385. package/docs/navigation/menubar.tsx +141 -0
  386. package/docs/navigation/navigation-menu.tsx +158 -0
  387. package/docs/navigation/pagination.tsx +241 -0
  388. package/docs/navigation/steps.tsx +265 -0
  389. package/docs/navigation/tabs-rtl.tsx +28 -0
  390. package/docs/navigation/tabs.tsx +314 -0
  391. package/docs/navigation/toolbar.tsx +339 -0
  392. package/docs/providers/app-provider.tsx +191 -0
  393. package/docs/providers/format-date.tsx +230 -0
  394. package/docs/query/button-refetch.tsx +160 -0
  395. package/docs/query/data-state.tsx +192 -0
  396. package/docs/query/infinite-query-state.tsx +93 -0
  397. package/docs/query/mutation-feedback.tsx +70 -0
  398. package/docs/query/prefetch-link.tsx +262 -0
  399. package/docs/query/touch-actions.tsx +68 -0
  400. package/docs/showcase/acme-portal.tsx +455 -0
  401. package/docs/showcase/acme-website.tsx +461 -0
  402. package/docs/showcase/case1-warehouse-dashboard.tsx +359 -0
  403. package/docs/showcase/case2-employee-me.tsx +444 -0
  404. package/docs/showcase/case3-approval-workflow.tsx +529 -0
  405. package/docs/showcase/case4-login.tsx +313 -0
  406. package/docs/showcase/case5-shift-calendar.tsx +795 -0
  407. package/docs/showcase/case6-agency-handy.tsx +1113 -0
  408. package/docs/showcase/futurelastic-web.tsx +392 -0
  409. package/docs/showcase/org-switcher.tsx +313 -0
  410. package/docs/showcase/permission-matrix.tsx +346 -0
  411. package/docs/showcase/public-landing.tsx +210 -0
  412. package/docs/showcase/settings-account-sections.tsx +559 -0
  413. package/docs/showcase/settings-security-mfa.tsx +145 -0
  414. package/docs/showcase/table-approval-queue.tsx +199 -0
  415. package/docs/showcase/table-bulk-actions.tsx +460 -0
  416. package/docs/showcase/table-compact-kintone.tsx +438 -0
  417. package/docs/showcase/table-conditional-format.tsx +367 -0
  418. package/docs/showcase/table-crud-list.tsx +544 -0
  419. package/docs/showcase/table-density.tsx +347 -0
  420. package/docs/showcase/table-expandable-rows.tsx +480 -0
  421. package/docs/showcase/table-filter-chips.tsx +456 -0
  422. package/docs/showcase/table-footer-totals.tsx +314 -0
  423. package/docs/showcase/table-grouped-subtotals.tsx +391 -0
  424. package/docs/showcase/table-master-detail.tsx +484 -0
  425. package/docs/showcase/table-pagination.tsx +327 -0
  426. package/docs/showcase/table-states.tsx +366 -0
  427. package/docs/showcase/table-sticky-columns.tsx +376 -0
  428. package/docs/showcase/table-tree-rows.tsx +444 -0
  429. package/docs/showcase/table-view-tabs.tsx +488 -0
  430. package/package.json +9 -12
  431. package/scripts/_agent-setup.mjs +16 -2
  432. package/scripts/audit-hook.mjs +3 -13
  433. package/scripts/init-agent-kit.mjs +1 -14
  434. package/scripts/postinstall.mjs +12 -12
  435. package/scripts/ui-audit.mjs +93 -31
  436. package/scripts/visual-audit-rules.mjs +51 -7
  437. package/scripts/visual-audit.mjs +118 -47
@@ -1,4 +1,4 @@
1
- /* Table component tokens: row height, cell padding. */
1
+
2
2
 
3
3
  :root {
4
4
  --table-row-height-compact: var(--band-height-sm);
@@ -7,140 +7,48 @@
7
7
  --table-row-height: calc(var(--table-row-height-default) * var(--scaling));
8
8
  --table-cell-padding-y: var(--space-2);
9
9
  --table-cell-space-x: var(--control-padding-x);
10
- /* Pagination footer inset (gh#236). The footer ships as a SELF-CONTAINED slot and is commonly
11
- * placed in a flush container (`<Card><CardContent flush><DataTable/>`), where no ancestor
12
- * supplies padding — so it owns its own on BOTH axes instead of declaring block-start only.
13
- * Block default = the previous single `padding-top` value, now on both block edges (breathing
14
- * room above the footer and before the container's closing border). Inline default = the cell
15
- * inline padding, so the "rows per page" label sits on the same optical axis as the first
16
- * column's text. A service retunes either axis to its own grid (#45).
17
- * Both are declared `initial` so the defaults re-resolve at the CALL SITE: --space-stack-sm and
18
- * --table-cell-space-x are density-scaled and re-declared inside a `.ui-density-*` subtree, and a
19
- * :root binding would freeze the footer at the :root density (docs/TOKENS.md — the :root freeze
20
- * rule). Defaults = var(--space-stack-sm) block · var(--table-cell-space-x) inline. */
21
- /* Cell-grid rule colour for `<Table bordered>` (gh#274) — the outer frame and the vertical
22
- * rules between columns. Declared `initial` so the default re-resolves to the LIVE --border
23
- * role at the call site (a :root binding to hsl(var(--border)) freezes at the :root value and
24
- * a scoped [data-tenant] override of --border would never reach it — docs/TOKENS.md).
25
- * Default = hsl(var(--border)). */
10
+
26
11
  --table-border-color: initial;
27
12
  --table-pagination-padding-y: initial;
28
13
  --table-pagination-padding-x: initial;
29
- /* DataTable surface — narrow-viewport legibility FLOOR (gh#253). Below the `sm` viewport step a
30
- * multi-column admin grid whose columns are `white-space: nowrap` would otherwise be crushed, so
31
- * the bordered surface keeps a minimum inline size and `.ui-data-table-scroll` scrolls instead.
32
- * This shipped as a hard-coded `min-w-[640px]` utility on the surface element, which left a
33
- * service that wants a narrower (or no) floor with no route but forking the component (#45).
34
- * Default = the previous literal, in px so the floor releases at EXACTLY the same width as the
35
- * px-based `sm` media query that clears it (a rem value would drift under a non-16px root and
36
- * re-introduce the scroll between the two thresholds). Set `0` to opt out entirely — which is
37
- * what `preset="action-collection"` does, because there the priority measures own the width. */
14
+
38
15
  --table-surface-min-inline-size: 640px;
39
16
  --table-head-font-size: var(--font-size-xs);
40
- /* Header band — its OWN bg + fg knobs (decoupled from --secondary). Declared `initial` so the
41
- * default re-resolves to the LIVE --muted / --muted-foreground roles at the call site: a :root
42
- * binding to a role var freezes at the :root value and a scoped [data-tenant] role override never
43
- * reaches it. A brand sets both header tokens together to keep band/text contrast.
44
- * Defaults = hsl(var(--muted)) band · hsl(var(--muted-foreground)) text. */
17
+
45
18
  --table-header-background: initial;
46
19
  --table-header-foreground: initial;
47
- /* Inline-end shadow that lifts a pinned (sticky) action column off the body it scrolls over. */
20
+
48
21
  --table-pin-shadow: -6px 0 6px -5px hsl(var(--foreground) / 0.12);
49
- /* Row-state tint washes — translucent muted over the opaque base. `initial` so the --muted
50
- * default re-resolves under a scoped theme; a service retints by reading another role (e.g.
51
- * --primary). Defaults = hsl(var(--muted) / 0.4 striped · 0.5 hover · 0.3 selected). */
22
+
52
23
  --table-row-striped-background: initial;
53
24
  --table-row-hover-background: initial;
54
25
  --table-row-selected-background: initial;
55
26
  }
56
27
 
57
- /* Table · action-collection preset (gh#253) — the canonical dense approval / action queue.
58
- * Column PRIORITY measures replace the desktop intrinsic widths (a nowrap free-text column is
59
- * what makes a five-column queue wider than its card and forces a horizontal scroll). Nothing
60
- * here is read unless `preset="action-collection"` is set, so every existing table is untouched.
61
- * Percentages so the ratio holds at any card width; the action affordance is an absolute measure
62
- * because it must never be squeezed below its touch target. */
63
28
  :root {
64
- --table-action-collection-primary-width: 18%; /* requester / subject */
65
- --table-action-collection-secondary-width: 22%; /* target / resource */
66
- --table-action-collection-meta-width: 12%; /* timestamps, ids — lowest priority */
67
- --table-action-collection-actions-width: 3.5rem; /* row-action affordance, never clipped */
68
- /* Compact tier, applied below the collapse step (the 390px acceptance frame). Percentages,
69
- * like the desktop tier: while the priority ratios FIT (the canonical queues up to the
70
- * six-column budget below), they keep the table filling its container edge-to-edge with no
71
- * horizontal scroll — the gh#253 acceptance. */
29
+ --table-action-collection-primary-width: 18%;
30
+ --table-action-collection-secondary-width: 22%;
31
+ --table-action-collection-meta-width: 12%;
32
+ --table-action-collection-actions-width: 3.5rem;
33
+
72
34
  --table-action-collection-primary-width-compact: 24%;
73
35
  --table-action-collection-secondary-width-compact: 22%;
74
36
  --table-action-collection-meta-width-compact: 20%;
75
37
  --table-action-collection-actions-width-compact: 2.75rem;
76
- /* Wide-collection FLOORS — the compact measures from SEVEN columns up (gh#262).
77
- *
78
- * Percentage measures stop working once a queue carries enough columns for the shares to sum
79
- * past 100%: `table-layout: fixed` NORMALIZES them back into the table's specified width, so at
80
- * ~10 columns on a 390px frame a "24%" column really renders at a tenth of the frame, every
81
- * column drops below one CJK glyph, and JA headers shred into a vertical one-character-per-line
82
- * column (the failure mode WCAG 2.2 SC 1.4.10 Reflow exists to prevent). Cell `min-inline-size`
83
- * and `max(%, length)` widths are equally inert in the fixed algorithm, and the intrinsic
84
- * (max-content) size of a fixed-layout table is degenerate — all verified in Chromium — so a
85
- * LENGTH is the only floor an engine respects: length columns are never squeezed, and when
86
- * their sum outgrows the container the table's used width grows past its specified 100%
87
- * (CSS 2.1 §17.5.2.1) into the keyboard-reachable overflow-x wrapper, which scrolls.
88
- * ONE-dimensional scrolling of a data table is explicitly permitted by SC 1.4.10;
89
- * one-character-per-line is not readable at all.
90
- *
91
- * The stylesheet switches tiers on a COLUMN BUDGET, not on width: up to six columns the
92
- * percentage ratios above still resolve to readable measures at every acceptance artboard
93
- * (320 · 375 · 390), so the canonical five-column approval queue keeps its documented
94
- * scroll-free 390 frame byte-for-byte; from seven columns the shares are guaranteed to
95
- * over-sum and the floors + intentional scroll take over. That budget is the preset's
96
- * documented column-count ceiling (gh#262 expectation 3): past six columns the preset stops
97
- * compressing and starts scrolling.
98
- *
99
- * Units are rem, not ch: `ch` tracks the "0" glyph (~half a CJK em), so a ch-denominated floor
100
- * would silently halve for the JA copy these floors exist to protect. At the compact type tier
101
- * (font-size-xs = 0.75rem, space-2 inline padding each side) the 5rem meta floor keeps a ~4rem
102
- * text measure = 5 full-width glyphs per line — a JA header wraps to two readable lines, never
103
- * a character column. */
38
+
104
39
  --table-action-collection-primary-width-floor: 6rem;
105
40
  --table-action-collection-secondary-width-floor: 5.5rem;
106
41
  --table-action-collection-meta-width-floor: 5rem;
107
- /* Floor for a column with NO `priority` (the free-text column, `auto` up to the budget). It
108
- * cannot stay `auto` past the budget: once the marked columns over-constrain the table, the
109
- * fixed algorithm hands an auto column exactly 0px (verified in Chromium) — the same
110
- * shredding, moved to the free-text column. The actions floor is simply
111
- * `--table-action-collection-actions-width-compact`, already an absolute measure. */
42
+
112
43
  --table-action-collection-flex-width-floor: 5rem;
113
44
  --table-action-collection-font-size-compact: var(--font-size-xs);
114
45
  --table-action-collection-cell-space-x-compact: var(--space-2);
115
46
  --table-action-collection-cell-padding-y-compact: var(--space-2);
116
47
  --table-action-collection-row-height-compact: var(--table-row-height-compact);
117
- /* Compact-tier LEGIBILITY FLOOR — the measure below which the preset stops fitting the table
118
- * to its container and lets the scroll region it already owns take over.
119
- *
120
- * The percentage budget above is sized for ONE column per priority tier plus one free-text
121
- * column. A queue that repeats a tier — two `secondary` columns, three `meta` columns, or an
122
- * unmarked column beside them — asks for more than 100%, and under `table-layout: fixed` the
123
- * surplus is taken out of the columns rather than out of the table: measured on a seven-column
124
- * Japanese admin queue at 390, every column landed at 44–59px and CJK labels wrapped at ONE to
125
- * TWO characters per line (dxs-platform/platform#680). That is a WCAG 2.2 SC 1.4.10 Reflow (AA)
126
- * failure, and it is the failure mode this floor removes.
127
- *
128
- * Scrolling is the correct escape, not a concession: SC 1.4.10 exempts "parts of the content
129
- * which require two-dimensional layout for usage or meaning", and its own note names data
130
- * tables as the example. A table that scrolls horizontally inside its card conforms; a table
131
- * whose cells are one character wide does not.
132
- *
133
- * Default `0` so nothing changes for any existing consumer: a queue that fits its priority
134
- * budget keeps fitting. A consumer whose queue carries more columns than the budget sets this
135
- * to the measure at which its narrowest column is still readable (roughly 5rem per column for
136
- * Japanese at the compact type tier) and the table scrolls instead of crushing. */
48
+
137
49
  --table-action-collection-min-inline-size-compact: 0;
138
50
  }
139
51
 
140
- /* Table · stacked-record-collection preset (gh#293 restore — SCR-215) — the canonical WIDE,
141
- * heterogeneous record collection. Below the collapse step every `<tr>` becomes a bordered
142
- * key-value card; these tokens own the card's own geometry (unlike action-collection, there is no
143
- * column-priority measure to retune — the whole row becomes one block). */
144
52
  :root {
145
53
  --table-stacked-collection-card-padding-y: var(--space-stack-sm);
146
54
  --table-stacked-collection-card-padding-x: var(--space-inline-md);
@@ -148,52 +56,23 @@
148
56
  --table-stacked-collection-cell-padding-y: var(--space-stack-xs);
149
57
  --table-stacked-collection-label-font-size: var(--font-size-xs);
150
58
 
151
- /* DATA TABLE odds and ends that were still literal on the component (#319). The table's cell
152
- * rhythm, widths and action-collection tiers were already tokenized; these are the pieces
153
- * around them — the select column, sort glyphs, sticky header layer and skeleton shapes. */
154
59
  --table-select-column-width: 2.5rem;
155
60
  --table-sort-icon-size: var(--icon-size-xs);
156
61
  --table-toolbar-icon-size: var(--icon-size-md);
157
62
  --table-pagination-icon-size: var(--icon-size-md);
158
63
  --table-pagination-font-size: var(--font-size-sm);
159
- /* Skeleton placeholders mimic the real content they stand in for: a checkbox square and a
160
- * text line at the row's cap height. Retune with --table-cell-padding-y to keep the loading
161
- * state the same height as the loaded one. */
64
+
162
65
  --table-skeleton-check-size: 1rem;
163
- /* The skeleton bar's BLOCK SIZE. `--table-skeleton-line-height` was a length on the
164
- * line-height axis, whose scale is unitless ratios (gh#324) — a mis-named height, and the
165
- * only raw value on that axis, which is what kept the axis ungated. Renamed rather than
166
- * left, with the old name kept as a DEPRECATED ALIAS: it is a published token a consumer
167
- * theme may already override, and styles/table-layout.css still reads the old name, so an
168
- * override of either spelling keeps working. Prefer the new name; the alias may be removed
169
- * in a future major. */
66
+
170
67
  --table-skeleton-line-block-size: 1rem;
171
68
  --table-skeleton-line-height: var(--table-skeleton-line-block-size);
172
69
  --table-skeleton-radius: var(--radius-sm);
173
70
 
174
- /* The table's own base type step (gh#319). Was a `text-sm` utility on the <table>; the theme
175
- * remaps `--text-sm` to `--font-size-sm`, so this default is byte-identical. */
176
71
  --table-font-size: var(--font-size-sm);
177
- /* MANDATORY companion to --table-font-size — the gh#260 trap, again. `text-sm` also set
178
- * line-height from Tailwind's `--text-sm--line-height`, and styles/base.css remaps `--text-sm`
179
- * but NOT that companion. Without this the table would silently inherit ambient page leading
180
- * the moment the font-size moved into CSS. Same unitless ratio Tailwind ships. */
72
+
181
73
  --table-line-height: calc(1.25 / 0.875);
182
- /* Horizontal row rule (chrome, #44) — the divider between body rows AND under the header row.
183
- * Owned here rather than as TableRow's `border-b` utility so the "last row draws no rule"
184
- * rule in `@layer components` can actually zero it; a utility would outrank it by layer.
185
- * Colour is deliberately NOT set: it inherits the global `* { border-color: hsl(var(--border)) }`
186
- * so a scoped [data-tenant]/.dark override of --border still reaches every row. */
74
+
187
75
  --table-row-border-width: var(--stroke-hairline);
188
- /* Flush divider (chrome, #44/#45) — the ONE edge a full-bleed table keeps when it sits inside
189
- * `<CardContent flush>`: the line between a plain CardHeader and the first row. The other three
190
- * edges coincide with the card's own frame and are erased (gh#305); this one has nothing behind
191
- * it, so without it the header band floats (gh#306). Scoped by construction to the case that
192
- * needs it — a BANDED header, a CardBar or a headerless card already draw their own line there
193
- * and never reach this token — so a service tunes only the plain-header divider: `0` for a
194
- * borderless full-bleed table, heavier for a stronger band. Colour and style are NOT set here:
195
- * only the width is restored, so the surface's own border declaration still owns them and a
196
- * scoped [data-tenant]/.dark override of --border reaches it.
197
- * Default = the same hairline the table's other rules draw. */
76
+
198
77
  --table-flush-divider-width: var(--table-row-border-width);
199
78
  }
@@ -1,82 +1,20 @@
1
- /* TOGGLE — counter-pill + pressed-state knobs (gh#312).
2
- *
3
- * Toggle owns the pressed state; Button owns the counter-pill vocabulary (`count` /
4
- * `overflowCount` / `showZero`). A counted pressed chip (a faceted filter chip "Unread 12", a
5
- * reaction chip) needs both, so Toggle grew the same vocabulary — and these knobs exist so it
6
- * grows it WITHOUT growing a second, drifting set of constants (cardinal rule #45).
7
- *
8
- * SHARE vs SPLIT — the rule this file follows, and why each half falls where it does:
9
- *
10
- * • GEOMETRY is genuinely the same pill — min-width, inline padding, type step, corner. Toggle
11
- * keeps its OWN knob for each (rule #45) but sets it to Button's exact value off the same
12
- * primitive scale token, and a test asserts the two stay equal — so a Toggle count set beside
13
- * a Button count is indistinguishable and cannot drift unnoticed, while a service can still
14
- * move one without the other.
15
- *
16
- * • COLOUR is genuinely different, and MEASURED so. Button's pill sits on a static variant
17
- * surface and tints itself with a translucent foreground (`bg-primary-foreground/15`,
18
- * `bg-foreground/8`). Toggle's pill sits on a surface that INVERTS when pressed, and a
19
- * translucent tint over it cannot clear WCAG 1.4.3 AA at the xs step: with the shipped roles,
20
- * `--primary-foreground` over `--primary-foreground/0.16` over `--primary` measures 3.82:1 in
21
- * light (4.39:1 even at 0.08 — the ceiling is the chip label's own 5.04:1, and any tint can
22
- * only lower it), and `--muted-foreground` over `--foreground/0.08` measures 4.32:1, dropping
23
- * to 3.64:1 once the chip hovers to `--accent`. Forcing a shared colour token here would ship
24
- * a known #299-class failure.
25
- *
26
- * So Toggle's pill uses OPAQUE role fills, which makes its contrast independent of the chip's
27
- * variant and hover surface, and inverts them with the state:
28
- * unpressed --foreground on --muted → 14.25:1 light · 12.40:1 dark
29
- * pressed --primary on --primary-foreground → 5.04:1 light · 7.07:1 dark
30
- * The pressed pair is the chip label's own pair, swapped — the pill is exactly as legible as
31
- * the label it sits next to, never worse, under any theme that keeps that pair legible.
32
- *
33
- * Every colour knob is a ROLE-MIRROR knob: `initial` at :root with the role default at the call
34
- * site (docs/TOKENS.md · "Role-mirror knobs MUST be `initial`"). A `:root` binding to
35
- * `var(--primary)` would freeze at the :root value and a scoped `[data-tenant]`/`.dark` override
36
- * of the role would never reach it.
37
- */
1
+
38
2
  :root {
39
- /* ── Counter pill · geometry. One knob per component (rule #45, and the repo's existing shape:
40
- * --button-count-*, --tag-input-chip-font-size, --toggle-sm-font-size are all independent knobs
41
- * off the same primitive scale). The VALUES are byte-identical to Button's counter pill and read
42
- * the same primitive tokens, so the two pills render the same size and a Toggle count set beside
43
- * a Button count is indistinguishable — asserted by
44
- * src/styles/__tests__/toggle-count-token-parity.test.ts so it cannot drift silently.
45
- *
46
- * (They are concrete here rather than `initial` + a call-site `var(--toggle-…, var(--button-…))`
47
- * fallback because check:typography requires a bare `var(--token)` for every font-size, and a
48
- * split shape across the five geometry knobs would be worse than a consistent one.) */
3
+
49
4
  --toggle-count-min-width: var(--space-4);
50
5
  --toggle-count-space-inline: var(--space-1);
51
6
  --toggle-count-font-size: var(--font-size-xs);
52
7
  --toggle-count-radius: var(--radius-pill);
53
- /* Quiet default (#44) — the toggle's own flex gap already separates label from pill; this knob
54
- * ADDS to it for a service whose design grid wants the counter pushed further out. */
8
+
55
9
  --toggle-count-gap: 0;
56
10
 
57
- /* ── Counter pill · unpressed colours. Defaults = hsl(var(--muted)) fill (quiet: 1.09:1 against
58
- * the chip's own surface, so at rest the count reads as text, #44) and hsl(var(--foreground))
59
- * text (14.25:1 on that fill). Opaque on purpose — a translucent fill would take its contrast
60
- * from whatever surface the chip currently has, and lose ~0.7 on hover. */
61
11
  --toggle-count-background: initial;
62
12
  --toggle-count-color: initial;
63
13
 
64
- /* ── Counter pill · PRESSED colours. Defaults = hsl(var(--primary-foreground)) fill,
65
- * hsl(var(--primary)) text — the pressed chip's OWN pair, swapped. Not `--primary` on
66
- * `--primary`: the pressed chip is already filled with --primary, so a --primary pill would be
67
- * invisible on it. The swap also flips the pill from near-invisible to solid, which is one of
68
- * the encodings that keeps the pressed state off colour alone (WCAG 1.4.1). */
69
14
  --toggle-pressed-count-background: initial;
70
15
  --toggle-pressed-count-color: initial;
71
16
 
72
- /* ── Pressed chrome. Default = hsl(var(--primary)), i.e. the pressed fill itself, so out of the
73
- * box this border is quiet (#44) and the pressed state is carried by the fill inversion + the
74
- * pill inversion + the forced-colors rule below. A service whose pressed fill is a PALE tint
75
- * (where those inversions get weak) opts into a visible outline by overriding this. */
76
17
  --toggle-pressed-border-color: initial;
77
18
 
78
- /* Under forced-colors every fill is flattened to a system colour, so neither inversion encodes
79
- * anything any more. This outline is the state's structural fallback there — drawn on the
80
- * PRESSED pill only, and as `outline` (not `border`) so it costs no layout. */
81
19
  --toggle-count-forced-outline-width: var(--stroke-hairline);
82
20
  }
@@ -1,20 +1,7 @@
1
- /* Upload primitive tokens — dropzone, picture tile, avatar, draft bar, file row.
2
- *
3
- * Upload carried 66 hard-coded geometry/chrome literals, the single worst file in the library
4
- * (#319). It renders five variants (dropzone · button · picture · picture-card · avatar), and
5
- * EVERY one of them baked its box straight onto the component: a service could not resize the
6
- * avatar, retune the dropzone's generous 40px inset, or align the file row to its own grid
7
- * without forking. That is precisely the gap cardinal rule #45 exists to close.
8
- *
9
- * Radius defaults mirror the utilities they replace, verified against the built CSS:
10
- * rounded-lg = var(--radius) → --radius-lg
11
- * rounded-md = calc(var(--radius) / var(--radius-ratio)) → --radius-md
12
- * rounded-full → --radius-pill
13
- */
1
+
14
2
 
15
3
  :root {
16
- /* DROPZONE — the large drag target. Its inset is deliberately generous; a dense service
17
- * dials it back with one override instead of forking the variant. */
4
+
18
5
  --upload-dropzone-space-inset: var(--space-10);
19
6
  --upload-dropzone-radius: var(--radius-lg);
20
7
  --upload-dropzone-border-width: var(--stroke-md);
@@ -24,9 +11,6 @@
24
11
  --upload-dropzone-meta-space-block-start: var(--space-1);
25
12
  --upload-dropzone-meta-font-size: var(--font-size-xs);
26
13
 
27
- /* TILE — the 96px square shared by picture-card thumbnails and the "add image" button.
28
- * One knob resizes the whole gallery; picture-card grids are the most common thing a service
29
- * re-grids to match its own column rhythm. */
30
14
  --upload-tile-size: 6rem;
31
15
  --upload-tile-radius: var(--radius-md);
32
16
  --upload-tile-space-gap: var(--space-3);
@@ -34,17 +18,14 @@
34
18
  --upload-tile-label-space-block-start: var(--space-1);
35
19
  --upload-tile-label-font-size: var(--font-size-xs);
36
20
  --upload-tile-overlay-font-size: var(--font-size-xs);
37
- /* Busy scrim over a tile/frame — role-mirror knob, `initial` so --background re-resolves at the
38
- * CALL SITE under a scoped [data-tenant]/.dark theme. Default = hsl(var(--background) / 0.7). */
21
+
39
22
  --upload-overlay-background: initial;
40
23
  --upload-overlay-alpha: 70%;
41
24
 
42
- /* REMOVE affordance — the ✕ / trash chip pinned to a tile or avatar. */
43
25
  --upload-remove-space-inset: var(--space-1);
44
26
  --upload-remove-offset: var(--space-1);
45
27
  --upload-remove-icon-size: var(--icon-size-sm);
46
28
 
47
- /* PICTURE — the single wide preview variant. */
48
29
  --upload-picture-max-width: 20rem;
49
30
  --upload-picture-radius: var(--radius-md);
50
31
  --upload-picture-preview-max-height: 12rem;
@@ -52,27 +33,22 @@
52
33
  --upload-picture-empty-label-space-block-start: var(--space-2);
53
34
  --upload-picture-empty-label-font-size: var(--font-size-sm);
54
35
  --upload-picture-overlay-font-size: var(--font-size-sm);
55
- /* "Pending replace" chip. The radius previously came from a bare `rounded`, which resolves to a
56
- * flat .25rem and so ignored the radius scale entirely — the exact shape of a rule #44 miss.
57
- * It now follows the tile radius like every other chip in the component. */
36
+
58
37
  --upload-picture-badge-radius: var(--radius-md);
59
38
  --upload-picture-badge-offset: var(--space-2);
60
39
  --upload-picture-badge-space-inline: var(--space-2);
61
40
  --upload-picture-badge-space-block: 0.125rem;
62
41
  --upload-picture-badge-font-size: var(--font-size-xs);
63
42
 
64
- /* AVATAR — the round single-image variant. */
65
43
  --upload-avatar-size: 6rem;
66
44
  --upload-avatar-border-width: var(--stroke-md);
67
45
  --upload-avatar-change-space-block: var(--space-1);
68
- /* The "change" strip sits ON the photo, so its scrim is intentionally a fixed dark wash rather
69
- * than a surface role — it must stay legible over an arbitrary user image in either theme. */
46
+
70
47
  --upload-avatar-change-background: rgb(0 0 0 / 0.7);
71
48
  --upload-avatar-change-foreground: #fff;
72
- /* Alpha of an image the user has marked for deletion but not yet committed. */
49
+
73
50
  --upload-avatar-pending-delete-alpha: 0.4;
74
51
 
75
- /* DRAFT BAR — the undo strip shown after a pending remove/replace. */
76
52
  --upload-draft-space-inline: var(--space-3);
77
53
  --upload-draft-space-block: var(--space-2);
78
54
  --upload-draft-space-gap: var(--space-2);
@@ -80,7 +56,6 @@
80
56
  --upload-draft-font-size: var(--font-size-sm);
81
57
  --upload-draft-icon-size: var(--icon-size-sm);
82
58
 
83
- /* FILE ROW — the list rendered under the dropzone/button variants. */
84
59
  --upload-row-space-inline: var(--space-3);
85
60
  --upload-row-space-block: var(--space-2);
86
61
  --upload-row-space-gap: var(--space-3);
@@ -88,20 +63,9 @@
88
63
  --upload-row-font-size: var(--font-size-sm);
89
64
  --upload-row-icon-size: var(--icon-size-md);
90
65
 
91
- /* CROP DIALOG — the 1:1 avatar cropper (`UploadCropDialog`). The 66-literal upload pass above
92
- * never reached this file, so the whole cropper was still baked on the component: the dialog was
93
- * pinned to `max-w-sm`, the round preview to `size-48`, the zoom row to `px-2`. An avatar is one
94
- * of the most service-specific sizes there is (a 96px tile service wants a smaller crop stage
95
- * than a 200px one), and the crop stage must stay in proportion with --upload-avatar-size —
96
- * which is exactly the pair rule #45 exists to keep tunable together.
97
- *
98
- * The dialog width intentionally stays a knob of its own rather than reading
99
- * --dialog-width-default: the cropper is deliberately NARROWER than a normal dialog so the round
100
- * stage reads as the subject, not as a small element in a wide box. */
101
66
  --upload-crop-dialog-max-width: 24rem;
102
67
  --upload-crop-preview-size: 12rem;
103
68
  --upload-crop-preview-radius: var(--radius-pill);
104
- /* Zoom row inset — the slider is inset from the dialog edge so its thumb's focus ring is never
105
- * flush against the dialog padding. */
69
+
106
70
  --upload-crop-zoom-space-inline: var(--space-2);
107
71
  }