@godxjp/ui 19.0.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 (445) hide show
  1. package/README.md +25 -128
  2. package/dist/app/app-provider.d.ts +1 -1
  3. package/dist/app/app-provider.js +3 -0
  4. package/dist/app/theme-axes.d.ts +4 -15
  5. package/dist/app/timezones.d.ts +1 -4
  6. package/dist/components/charts/area-chart.d.ts +2 -3
  7. package/dist/components/charts/bar-chart.d.ts +2 -3
  8. package/dist/components/charts/chart-frame.d.ts +7 -16
  9. package/dist/components/charts/chart-summary.d.ts +2 -2
  10. package/dist/components/charts/compact-bar-trend.d.ts +9 -24
  11. package/dist/components/charts/index.d.ts +1 -6
  12. package/dist/components/data-display/badge.d.ts +2 -12
  13. package/dist/components/data-display/card.d.ts +21 -41
  14. package/dist/components/data-display/carousel.d.ts +1 -2
  15. package/dist/components/data-display/code-block.d.ts +4 -0
  16. package/dist/components/data-display/code-block.js +24 -0
  17. package/dist/components/data-display/data-table.d.ts +15 -37
  18. package/dist/components/data-display/data-table.js +1 -3
  19. package/dist/components/data-display/descriptions.d.ts +2 -6
  20. package/dist/components/data-display/descriptions.js +0 -2
  21. package/dist/components/data-display/index.d.ts +4 -0
  22. package/dist/components/data-display/index.js +4 -0
  23. package/dist/components/data-display/list-row.d.ts +3 -22
  24. package/dist/components/data-display/permission-matrix.d.ts +7 -20
  25. package/dist/components/data-display/progress.d.ts +1 -1
  26. package/dist/components/data-display/prose.d.ts +4 -0
  27. package/dist/components/data-display/prose.js +20 -0
  28. package/dist/components/data-display/service-launcher-card.d.ts +3 -10
  29. package/dist/components/data-display/table.d.ts +20 -80
  30. package/dist/components/data-display/table.js +0 -3
  31. package/dist/components/data-display/timeline.d.ts +3 -5
  32. package/dist/components/data-entry/branch-scope-picker.d.ts +2 -19
  33. package/dist/components/data-entry/branch-scope-picker.js +0 -1
  34. package/dist/components/data-entry/calendar.d.ts +3 -2
  35. package/dist/components/data-entry/calendar.js +58 -3
  36. package/dist/components/data-entry/cascader.js +3 -1
  37. package/dist/components/data-entry/checkbox-group.js +12 -5
  38. package/dist/components/data-entry/checkbox.js +30 -21
  39. package/dist/components/data-entry/command-palette.d.ts +8 -22
  40. package/dist/components/data-entry/date-picker.d.ts +4 -5
  41. package/dist/components/data-entry/date-picker.js +12 -3
  42. package/dist/components/data-entry/date-range-picker.d.ts +1 -1
  43. package/dist/components/data-entry/date-range-picker.js +17 -6
  44. package/dist/components/data-entry/form-errors.d.ts +7 -18
  45. package/dist/components/data-entry/form-field.d.ts +1 -1
  46. package/dist/components/data-entry/form-field.js +15 -6
  47. package/dist/components/data-entry/form.d.ts +1 -9
  48. package/dist/components/data-entry/input.d.ts +16 -14
  49. package/dist/components/data-entry/input.js +13 -3
  50. package/dist/components/data-entry/month-picker.js +6 -4
  51. package/dist/components/data-entry/month-range-picker.d.ts +4 -6
  52. package/dist/components/data-entry/month-range-picker.js +11 -5
  53. package/dist/components/data-entry/number-input.d.ts +1 -5
  54. package/dist/components/data-entry/number-input.js +1 -0
  55. package/dist/components/data-entry/radio.js +19 -6
  56. package/dist/components/data-entry/search-select.d.ts +3 -5
  57. package/dist/components/data-entry/search-select.js +8 -2
  58. package/dist/components/data-entry/select.d.ts +15 -2
  59. package/dist/components/data-entry/select.js +57 -10
  60. package/dist/components/data-entry/switch.js +9 -2
  61. package/dist/components/data-entry/textarea.d.ts +10 -16
  62. package/dist/components/data-entry/textarea.js +8 -1
  63. package/dist/components/data-entry/time-picker.d.ts +3 -5
  64. package/dist/components/data-entry/tree-select.js +3 -1
  65. package/dist/components/data-entry/upload-types.d.ts +1 -5
  66. package/dist/components/data-entry/use-upload-draft.d.ts +0 -4
  67. package/dist/components/feedback/dialog.d.ts +6 -15
  68. package/dist/components/feedback/overlay-header-tone.d.ts +1 -1
  69. package/dist/components/feedback/sheet.d.ts +3 -10
  70. package/dist/components/feedback/sheet.js +1 -1
  71. package/dist/components/feedback/sonner.js +2 -3
  72. package/dist/components/general/activity.d.ts +4 -30
  73. package/dist/components/general/button.js +1 -10
  74. package/dist/components/general/logo.d.ts +6 -28
  75. package/dist/components/general/reveal.d.ts +3 -9
  76. package/dist/components/general/typography.d.ts +1 -3
  77. package/dist/components/layout/account-chip.d.ts +8 -0
  78. package/dist/components/layout/account-chip.js +45 -0
  79. package/dist/components/layout/auth-divider.d.ts +2 -9
  80. package/dist/components/layout/auth-shell.d.ts +1 -14
  81. package/dist/components/layout/breadcrumb.d.ts +1 -5
  82. package/dist/components/layout/centered-shell.d.ts +4 -18
  83. package/dist/components/layout/error-surface.d.ts +11 -28
  84. package/dist/components/layout/error-surface.js +4 -1
  85. package/dist/components/layout/index.d.ts +2 -0
  86. package/dist/components/layout/index.js +2 -0
  87. package/dist/components/layout/legal-document-shell.d.ts +5 -28
  88. package/dist/components/layout/master-detail.d.ts +2 -18
  89. package/dist/components/layout/page-container.js +0 -1
  90. package/dist/components/layout/responsive-grid.d.ts +6 -1
  91. package/dist/components/layout/responsive-grid.js +9 -2
  92. package/dist/components/layout/service-role-panel.d.ts +7 -19
  93. package/dist/components/layout/sidebar.d.ts +5 -27
  94. package/dist/components/layout/sidebar.js +0 -1
  95. package/dist/components/layout/split-pane.d.ts +0 -7
  96. package/dist/components/layout/topbar.d.ts +1 -14
  97. package/dist/components/navigation/app-setting-picker.js +1 -3
  98. package/dist/components/navigation/filter-bar.d.ts +1 -6
  99. package/dist/components/navigation/pagination-utils.d.ts +2 -12
  100. package/dist/components/navigation/tabs-scroll.d.ts +2 -36
  101. package/dist/components/navigation/tabs.js +4 -8
  102. package/dist/components/query/data-state.d.ts +2 -2
  103. package/dist/components/ui/credential-reveal.d.ts +1 -4
  104. package/dist/components/ui/hover-card.d.ts +1 -2
  105. package/dist/components/ui/separator.d.ts +2 -15
  106. package/dist/components/ui/toggle-group.d.ts +1 -5
  107. package/dist/components/ui/toggle.d.ts +6 -31
  108. package/dist/email/brand-mark.d.ts +6 -34
  109. package/dist/email/color.d.ts +7 -17
  110. package/dist/email/geometry.d.ts +4 -8
  111. package/dist/email/index.d.ts +4 -48
  112. package/dist/email/inline-style.d.ts +3 -9
  113. package/dist/email/urgency.d.ts +2 -7
  114. package/dist/form/form-context.d.ts +2 -5
  115. package/dist/form/form-root.d.ts +1 -2
  116. package/dist/i18n/messages/en.json +4 -0
  117. package/dist/i18n/messages/ja.json +4 -0
  118. package/dist/i18n/messages/vi.json +4 -0
  119. package/dist/inertia/index.d.ts +2 -10
  120. package/dist/lib/control-styles.d.ts +10 -21
  121. package/dist/lib/control-styles.js +4 -6
  122. package/dist/lib/datetime/format-date.d.ts +1 -4
  123. package/dist/lib/field-a11y.d.ts +31 -36
  124. package/dist/lib/field-a11y.js +16 -2
  125. package/dist/lib/format.d.ts +4 -8
  126. package/dist/lib/hooks.d.ts +6 -12
  127. package/dist/lib/permission-grid.d.ts +3 -18
  128. package/dist/lib/query-error.d.ts +3 -3
  129. package/dist/props/components/app.prop.d.ts +19 -27
  130. package/dist/props/components/charts.prop.d.ts +2 -3
  131. package/dist/props/components/data-display.prop.d.ts +48 -72
  132. package/dist/props/components/data-entry.prop.d.ts +41 -30
  133. package/dist/props/components/form.prop.d.ts +2 -6
  134. package/dist/props/components/general.prop.d.ts +11 -27
  135. package/dist/props/components/layout.prop.d.ts +89 -260
  136. package/dist/props/components/navigation.prop.d.ts +27 -42
  137. package/dist/props/registry.d.ts +31 -0
  138. package/dist/props/registry.js +33 -0
  139. package/dist/props/vocabulary/data.prop.d.ts +18 -49
  140. package/dist/props/vocabulary/index.d.ts +1 -1
  141. package/dist/props/vocabulary/interaction.prop.d.ts +10 -12
  142. package/dist/props/vocabulary/layout.prop.d.ts +8 -30
  143. package/dist/props/vocabulary/shared.prop.d.ts +3 -2
  144. package/dist/styles/alert-layout.css +1 -32
  145. package/dist/styles/badge-layout.css +4 -18
  146. package/dist/styles/base.css +14 -113
  147. package/dist/styles/card-layout.css +6 -128
  148. package/dist/styles/chart-layout.css +2 -17
  149. package/dist/styles/control.css +380 -458
  150. package/dist/styles/core.css +21 -0
  151. package/dist/styles/data-display-layout.css +175 -94
  152. package/dist/styles/data-entry-layout.css +0 -45
  153. package/dist/styles/density.css +1 -30
  154. package/dist/styles/dialog-layout.css +5 -69
  155. package/dist/styles/focus-ring.css +13 -87
  156. package/dist/styles/fonts.css +1 -31
  157. package/dist/styles/form-layout.css +7 -91
  158. package/dist/styles/index.css +2 -20
  159. package/dist/styles/layout.css +38 -456
  160. package/dist/styles/logo-layout.css +1 -35
  161. package/dist/styles/motion.css +3 -42
  162. package/dist/styles/navigation-layout.css +3 -50
  163. package/dist/styles/shell-layout.css +37 -403
  164. package/dist/styles/table-layout.css +16 -274
  165. package/dist/styles/text-layout.css +7 -21
  166. package/dist/styles/toggle.css +1 -23
  167. package/dist/theme/dxs.canonical.css +1 -55
  168. package/dist/theme/example.service.css +1 -26
  169. package/dist/theme/famgia.service.css +5 -15
  170. package/dist/tokens/axes.css +3 -40
  171. package/dist/tokens/base.css +1 -4
  172. package/dist/tokens/components/activity.css +6 -42
  173. package/dist/tokens/components/badge.css +4 -13
  174. package/dist/tokens/components/banner.css +4 -9
  175. package/dist/tokens/components/card.css +32 -88
  176. package/dist/tokens/components/chart.css +9 -26
  177. package/dist/tokens/components/control.css +37 -222
  178. package/dist/tokens/components/data-display.css +28 -79
  179. package/dist/tokens/components/data-entry.css +5 -19
  180. package/dist/tokens/components/descriptions.css +7 -27
  181. package/dist/tokens/components/email.css +38 -84
  182. package/dist/tokens/components/error-surface.css +2 -18
  183. package/dist/tokens/components/feedback.css +27 -124
  184. package/dist/tokens/components/form.css +13 -45
  185. package/dist/tokens/components/legal-document.css +16 -41
  186. package/dist/tokens/components/list-row.css +11 -36
  187. package/dist/tokens/components/logo.css +2 -57
  188. package/dist/tokens/components/navigation.css +16 -94
  189. package/dist/tokens/components/scroll-area.css +2 -18
  190. package/dist/tokens/components/separator.css +8 -30
  191. package/dist/tokens/components/sheet.css +3 -14
  192. package/dist/tokens/components/shell.css +53 -307
  193. package/dist/tokens/components/sidebar.css +5 -22
  194. package/dist/tokens/components/table.css +19 -140
  195. package/dist/tokens/components/toggle.css +3 -65
  196. package/dist/tokens/components/upload.css +7 -43
  197. package/dist/tokens/foundation.css +108 -383
  198. package/dist/tokens/semantic/layout.css +33 -207
  199. package/docs/CANONICAL-CONTRACTS.md +206 -0
  200. package/docs/COMPONENTS.md +157 -0
  201. package/docs/COMPOSITION-VS-COMPONENT.md +105 -0
  202. package/docs/CONSUMER-RULES.md +14 -0
  203. package/docs/CUSTOMER-THEMING.md +162 -0
  204. package/docs/DATETIME.md +69 -0
  205. package/docs/DEVELOPMENT.md +173 -0
  206. package/docs/FORMS.md +143 -0
  207. package/docs/FRAME-A11Y-CI.md +267 -0
  208. package/docs/FRAME-COVERAGE-LEDGER.md +123 -0
  209. package/docs/FRAME-COVERAGE-REPORT.md +140 -0
  210. package/docs/FRAME-COVERAGE-STANDARD.md +65 -0
  211. package/docs/FRAME-COVERAGE.md +29 -0
  212. package/docs/PROPS-REGISTRY.md +61 -0
  213. package/docs/PROPS-VOCABULARY.md +100 -0
  214. package/docs/README.md +60 -0
  215. package/docs/REGISTRY.md +70 -0
  216. package/docs/SPACING.md +56 -0
  217. package/docs/STANDARDS-vocabulary-tokens.md +48 -0
  218. package/docs/TESTING.md +98 -0
  219. package/docs/TOKENS.md +347 -0
  220. package/docs/asset-modules.d.ts +46 -0
  221. package/docs/assets/cover-terrain.svg +6 -0
  222. package/docs/assets/portrait-amber.svg +5 -0
  223. package/docs/assets/portrait-clay.svg +5 -0
  224. package/docs/assets/portrait-indigo.svg +5 -0
  225. package/docs/assets/portrait-iris.svg +5 -0
  226. package/docs/assets/portrait-moss.svg +5 -0
  227. package/docs/assets/portrait-plum.svg +5 -0
  228. package/docs/assets/portrait-slate.svg +5 -0
  229. package/docs/charts/compact-bar-trend.tsx +328 -0
  230. package/docs/charts/size-tiers.tsx +192 -0
  231. package/docs/data-display/accordion.tsx +99 -0
  232. package/docs/data-display/avatar.tsx +355 -0
  233. package/docs/data-display/badge.tsx +247 -0
  234. package/docs/data-display/card/examples/detail-panel.tsx +106 -0
  235. package/docs/data-display/card/index.md +3 -0
  236. package/docs/data-display/card/index.tsx +285 -0
  237. package/docs/data-display/carousel.tsx +156 -0
  238. package/docs/data-display/charts.tsx +198 -0
  239. package/docs/data-display/code-block.tsx +90 -0
  240. package/docs/data-display/collapsible.tsx +162 -0
  241. package/docs/data-display/credential-reveal.tsx +145 -0
  242. package/docs/data-display/data-table/examples/approval-queue.tsx +212 -0
  243. package/docs/data-display/data-table/examples/grid-features.tsx +158 -0
  244. package/docs/data-display/data-table/examples/list-page.tsx +175 -0
  245. package/docs/data-display/data-table/index.md +5 -0
  246. package/docs/data-display/data-table/index.tsx +295 -0
  247. package/docs/data-display/descriptions.tsx +143 -0
  248. package/docs/data-display/empty-state.tsx +164 -0
  249. package/docs/data-display/hover-card.tsx +181 -0
  250. package/docs/data-display/list-row.tsx +420 -0
  251. package/docs/data-display/permission-matrix.tsx +184 -0
  252. package/docs/data-display/popover-touch.tsx +27 -0
  253. package/docs/data-display/popover.tsx +245 -0
  254. package/docs/data-display/progress.tsx +84 -0
  255. package/docs/data-display/prose.tsx +105 -0
  256. package/docs/data-display/qr-code.tsx +68 -0
  257. package/docs/data-display/scroll-area.tsx +271 -0
  258. package/docs/data-display/service-launcher-card.tsx +145 -0
  259. package/docs/data-display/stat-card.tsx +99 -0
  260. package/docs/data-display/table.tsx +251 -0
  261. package/docs/data-display/timeline.tsx +112 -0
  262. package/docs/data-display/touch-actions.tsx +36 -0
  263. package/docs/data-display/tree-list.tsx +107 -0
  264. package/docs/data-entry/branch-scope-picker.tsx +123 -0
  265. package/docs/data-entry/calendar.tsx +180 -0
  266. package/docs/data-entry/cascader.tsx +378 -0
  267. package/docs/data-entry/checkbox.tsx +256 -0
  268. package/docs/data-entry/color-picker.tsx +117 -0
  269. package/docs/data-entry/command-palette.tsx +179 -0
  270. package/docs/data-entry/command.tsx +262 -0
  271. package/docs/data-entry/country-picker-recipe.tsx +170 -0
  272. package/docs/data-entry/date-picker.tsx +191 -0
  273. package/docs/data-entry/date-range-picker.tsx +149 -0
  274. package/docs/data-entry/form/examples/employee-settings.tsx +267 -0
  275. package/docs/data-entry/form/examples/invoice-form.tsx +387 -0
  276. package/docs/data-entry/form-field/examples/a11y-contract.tsx +240 -0
  277. package/docs/data-entry/form-field/examples/create-form.tsx +105 -0
  278. package/docs/data-entry/form-field/index.md +8 -0
  279. package/docs/data-entry/form-field/index.tsx +326 -0
  280. package/docs/data-entry/form-inertia.tsx +80 -0
  281. package/docs/data-entry/form-root.tsx +102 -0
  282. package/docs/data-entry/form.tsx +724 -0
  283. package/docs/data-entry/input-otp.tsx +231 -0
  284. package/docs/data-entry/input.tsx +114 -0
  285. package/docs/data-entry/label.tsx +100 -0
  286. package/docs/data-entry/month-picker.tsx +101 -0
  287. package/docs/data-entry/month-range-picker.tsx +115 -0
  288. package/docs/data-entry/number-input.tsx +240 -0
  289. package/docs/data-entry/password-input.tsx +106 -0
  290. package/docs/data-entry/password-strength.tsx +97 -0
  291. package/docs/data-entry/radio-group.tsx +95 -0
  292. package/docs/data-entry/rating.tsx +87 -0
  293. package/docs/data-entry/search-input.tsx +120 -0
  294. package/docs/data-entry/select-async-contracts.tsx +108 -0
  295. package/docs/data-entry/select-matrix.tsx +204 -0
  296. package/docs/data-entry/select.tsx +369 -0
  297. package/docs/data-entry/slider.tsx +130 -0
  298. package/docs/data-entry/switch.tsx +67 -0
  299. package/docs/data-entry/tag-input.tsx +108 -0
  300. package/docs/data-entry/textarea.tsx +209 -0
  301. package/docs/data-entry/time-picker.tsx +99 -0
  302. package/docs/data-entry/toggle-count.tsx +293 -0
  303. package/docs/data-entry/toggle-group.tsx +225 -0
  304. package/docs/data-entry/toggle.tsx +127 -0
  305. package/docs/data-entry/transfer.tsx +97 -0
  306. package/docs/data-entry/tree-select.tsx +204 -0
  307. package/docs/data-entry/upload.tsx +184 -0
  308. package/docs/feedback/alert-dialog.tsx +270 -0
  309. package/docs/feedback/alert.tsx +248 -0
  310. package/docs/feedback/banner.tsx +183 -0
  311. package/docs/feedback/danger-confirm.tsx +88 -0
  312. package/docs/feedback/dialog-touch.tsx +24 -0
  313. package/docs/feedback/dialog.tsx +193 -0
  314. package/docs/feedback/sheet.tsx +410 -0
  315. package/docs/feedback/skeleton.tsx +111 -0
  316. package/docs/feedback/toast.tsx +135 -0
  317. package/docs/feedback/tooltip.tsx +171 -0
  318. package/docs/feedback/two-factor-setup.tsx +68 -0
  319. package/docs/foundation/_email-specimen.ts +274 -0
  320. package/docs/foundation/colors.tsx +202 -0
  321. package/docs/foundation/density.tsx +232 -0
  322. package/docs/foundation/email-tokens.tsx +306 -0
  323. package/docs/foundation/radius-shadow.tsx +152 -0
  324. package/docs/foundation/spacing.tsx +211 -0
  325. package/docs/foundation/typography.tsx +147 -0
  326. package/docs/general/activity.tsx +224 -0
  327. package/docs/general/button/examples/destructive-confirm.tsx +90 -0
  328. package/docs/general/button/examples/form-actions.tsx +85 -0
  329. package/docs/general/button/examples/toolbar.tsx +160 -0
  330. package/docs/general/button/index.md +12 -0
  331. package/docs/general/button/index.tsx +211 -0
  332. package/docs/general/logo.tsx +131 -0
  333. package/docs/general/reveal.tsx +41 -0
  334. package/docs/general/typography.tsx +152 -0
  335. package/docs/layout/account-chip.tsx +72 -0
  336. package/docs/layout/admin-collection.tsx +122 -0
  337. package/docs/layout/app-shell.tsx +374 -0
  338. package/docs/layout/aspect-ratio.tsx +119 -0
  339. package/docs/layout/auth-account-summary.tsx +103 -0
  340. package/docs/layout/auth-divider.tsx +28 -0
  341. package/docs/layout/auth-footer.tsx +37 -0
  342. package/docs/layout/auth-identity.tsx +36 -0
  343. package/docs/layout/auth-recovery/examples/mfa-challenge.md +41 -0
  344. package/docs/layout/auth-recovery/examples/mfa-challenge.tsx +254 -0
  345. package/docs/layout/auth-recovery/examples/mobile-390.md +25 -0
  346. package/docs/layout/auth-recovery/examples/mobile-390.tsx +82 -0
  347. package/docs/layout/auth-recovery/examples/password-recovery.md +24 -0
  348. package/docs/layout/auth-recovery/examples/password-recovery.tsx +197 -0
  349. package/docs/layout/auth-recovery/examples/wrapping-ja-en-vi.md +27 -0
  350. package/docs/layout/auth-recovery/examples/wrapping-ja-en-vi.tsx +156 -0
  351. package/docs/layout/auth-recovery/index.md +140 -0
  352. package/docs/layout/auth-recovery/index.tsx +96 -0
  353. package/docs/layout/auth-shell-context.tsx +103 -0
  354. package/docs/layout/auth-shell-device.tsx +112 -0
  355. package/docs/layout/auth-shell-registration.tsx +335 -0
  356. package/docs/layout/auth-shell-variants.tsx +139 -0
  357. package/docs/layout/auth-shell.tsx +59 -0
  358. package/docs/layout/auth-stack.tsx +40 -0
  359. package/docs/layout/centered-shell.tsx +102 -0
  360. package/docs/layout/error-surface/examples/application-403.tsx +84 -0
  361. package/docs/layout/error-surface/examples/application-404.tsx +77 -0
  362. package/docs/layout/error-surface/examples/system-500.tsx +47 -0
  363. package/docs/layout/error-surface/examples/system-503.tsx +48 -0
  364. package/docs/layout/error-surface/index.md +153 -0
  365. package/docs/layout/error-surface/index.tsx +239 -0
  366. package/docs/layout/flex.tsx +262 -0
  367. package/docs/layout/legal-document-shell/_data.ts +110 -0
  368. package/docs/layout/legal-document-shell/examples/desktop-1440.md +12 -0
  369. package/docs/layout/legal-document-shell/examples/desktop-1440.tsx +83 -0
  370. package/docs/layout/legal-document-shell/examples/mobile-390.md +22 -0
  371. package/docs/layout/legal-document-shell/examples/mobile-390.tsx +70 -0
  372. package/docs/layout/legal-document-shell/examples/tablet-1024.md +3 -0
  373. package/docs/layout/legal-document-shell/examples/tablet-1024.tsx +84 -0
  374. package/docs/layout/legal-document-shell/examples/wrapping-ja-en-vi.md +18 -0
  375. package/docs/layout/legal-document-shell/examples/wrapping-ja-en-vi.tsx +61 -0
  376. package/docs/layout/legal-document-shell/index.md +51 -0
  377. package/docs/layout/legal-document-shell/index.tsx +101 -0
  378. package/docs/layout/master-detail.tsx +387 -0
  379. package/docs/layout/org-switcher.tsx +131 -0
  380. package/docs/layout/page-container.tsx +946 -0
  381. package/docs/layout/resizable-panel.tsx +419 -0
  382. package/docs/layout/responsive-grid.tsx +235 -0
  383. package/docs/layout/separator.tsx +327 -0
  384. package/docs/layout/service-role-panel.tsx +144 -0
  385. package/docs/layout/sidebar.tsx +586 -0
  386. package/docs/layout/split-pane.tsx +451 -0
  387. package/docs/layout/topbar.tsx +347 -0
  388. package/docs/navigation/app-setting-picker.tsx +141 -0
  389. package/docs/navigation/breadcrumb.tsx +128 -0
  390. package/docs/navigation/context-menu.tsx +117 -0
  391. package/docs/navigation/dropdown-menu.tsx +213 -0
  392. package/docs/navigation/filter-bar.tsx +227 -0
  393. package/docs/navigation/menubar.tsx +141 -0
  394. package/docs/navigation/navigation-menu.tsx +165 -0
  395. package/docs/navigation/pagination.tsx +241 -0
  396. package/docs/navigation/steps.tsx +263 -0
  397. package/docs/navigation/tabs-rtl.tsx +28 -0
  398. package/docs/navigation/tabs.tsx +308 -0
  399. package/docs/navigation/toolbar.tsx +339 -0
  400. package/docs/providers/app-provider.tsx +191 -0
  401. package/docs/providers/format-date.tsx +230 -0
  402. package/docs/query/button-refetch.tsx +160 -0
  403. package/docs/query/data-state.tsx +192 -0
  404. package/docs/query/infinite-query-state.tsx +93 -0
  405. package/docs/query/mutation-feedback.tsx +70 -0
  406. package/docs/query/prefetch-link.tsx +262 -0
  407. package/docs/query/touch-actions.tsx +68 -0
  408. package/docs/showcase/acme-portal.tsx +441 -0
  409. package/docs/showcase/acme-website.tsx +455 -0
  410. package/docs/showcase/case1-warehouse-dashboard.tsx +343 -0
  411. package/docs/showcase/case2-employee-me.tsx +441 -0
  412. package/docs/showcase/case3-approval-workflow.tsx +527 -0
  413. package/docs/showcase/case4-login.tsx +307 -0
  414. package/docs/showcase/case5-shift-calendar.tsx +795 -0
  415. package/docs/showcase/case6-agency-handy.tsx +1072 -0
  416. package/docs/showcase/futurelastic-web.tsx +390 -0
  417. package/docs/showcase/org-switcher.tsx +313 -0
  418. package/docs/showcase/permission-matrix.tsx +343 -0
  419. package/docs/showcase/public-landing.tsx +210 -0
  420. package/docs/showcase/settings-account-sections.tsx +559 -0
  421. package/docs/showcase/settings-security-mfa.tsx +145 -0
  422. package/docs/showcase/table-approval-queue.tsx +199 -0
  423. package/docs/showcase/table-bulk-actions.tsx +460 -0
  424. package/docs/showcase/table-compact-kintone.tsx +438 -0
  425. package/docs/showcase/table-conditional-format.tsx +367 -0
  426. package/docs/showcase/table-crud-list.tsx +544 -0
  427. package/docs/showcase/table-density.tsx +340 -0
  428. package/docs/showcase/table-expandable-rows.tsx +471 -0
  429. package/docs/showcase/table-filter-chips.tsx +461 -0
  430. package/docs/showcase/table-footer-totals.tsx +311 -0
  431. package/docs/showcase/table-grouped-subtotals.tsx +388 -0
  432. package/docs/showcase/table-master-detail.tsx +479 -0
  433. package/docs/showcase/table-pagination.tsx +320 -0
  434. package/docs/showcase/table-states.tsx +363 -0
  435. package/docs/showcase/table-sticky-columns.tsx +373 -0
  436. package/docs/showcase/table-tree-rows.tsx +444 -0
  437. package/docs/showcase/table-view-tabs.tsx +488 -0
  438. package/package.json +10 -11
  439. package/scripts/_agent-setup.mjs +16 -2
  440. package/scripts/audit-hook.mjs +3 -13
  441. package/scripts/init-agent-kit.mjs +1 -14
  442. package/scripts/postinstall.mjs +12 -12
  443. package/scripts/ui-audit.mjs +93 -31
  444. package/scripts/visual-audit-rules.mjs +51 -7
  445. package/scripts/visual-audit.mjs +118 -47
@@ -1,42 +1,23 @@
1
- /* Shell (sidebar / topbar / kbd) component tokens — small-by-design text
2
- * knobs (rule #45/#46). A service re-tunes chrome text without moving the
3
- * global scale. */
1
+
4
2
 
5
3
  :root {
6
4
  --sidebar-section-label-font-size: var(--font-size-2xs);
7
5
  --sidebar-product-tenant-font-size: var(--font-size-2xs);
8
6
  --sidebar-badge-font-size: var(--font-size-2xs);
9
- /* Sidebar nav count pill colours — the pill had a font-size knob and NO colour knob, so a rail
10
- * that needed to tell "unread" from "mentions you" had to nest a <Badge> inside `badge` and got
11
- * two pills, one inside the other. `initial` so the role defaults re-resolve at the call site
12
- * under a scoped theme (a :root binding to a role var freezes at :root).
13
- * Defaults = hsl(var(--secondary)) fill · hsl(var(--muted-foreground)) text. */
7
+
14
8
  --sidebar-badge-background: initial;
15
9
  --sidebar-badge-foreground: initial;
16
- /* The EMPHASIS pair, read only by `SidebarItemProp.badgeTone="destructive"` (rule #44 — a
17
- * neutral row never resolves them). Defaults = hsl(var(--destructive)) fill ·
18
- * hsl(var(--destructive-foreground)) text, the canonical AA-checked pair. */
10
+
19
11
  --sidebar-badge-destructive-background: initial;
20
12
  --sidebar-badge-destructive-foreground: initial;
21
- /* Softened focus ring on the tinted shell grounds: at full alpha the ring
22
- * reads as a SELECTED item rather than a focused one (styles/focus-ring.css). */
13
+
23
14
  --sidebar-user-focus-ring-alpha: 0.45;
24
- /* Topbar glyphs. Three separate sizes, all previously baked as literals in shell-layout.css.
25
- *
26
- * --topbar-chip-icon-size is off the SCALE but on the pixel GRID, and those are different
27
- * findings. Read the rule it styles: `display: grid; place-items: center; font-weight: 700` —
28
- * it is a letter MEDALLION, not a glyph, so the half-pixel-stroke argument that made the
29
- * NavigationMenu chevron snap from 14.4px to 14px does not apply here. 18px is a whole pixel
30
- * sitting between --icon-size-md (16) and -lg (20); snapping it would be a visible 2px box
31
- * change bought for nothing. Declared, not silently tolerated.
32
- * scale-exempt: 18px letter medallion, a whole pixel between two icon steps, not a glyph */
15
+
33
16
  --topbar-chip-icon-size: 1.125rem;
34
- /* Sidebar product-switcher caret — a real glyph, previously a bare 0.875rem. */
17
+
35
18
  --sidebar-product-caret-icon-size: var(--icon-size-sm);
36
19
  --topbar-icon-size: var(--icon-size-md);
37
- /* The caret is the eighth literal-sized icon rule in this file. The ratchet missed it because
38
- * its selector says `caret` while the pattern looked for `icon|glyph` — the guard has been
39
- * taught the wider vocabulary. */
20
+
40
21
  --topbar-caret-icon-size: var(--icon-size-xs);
41
22
 
42
23
  --topbar-icon-focus-ring-alpha: 0.45;
@@ -51,160 +32,60 @@
51
32
  --sidebar-avatar-font-size: var(--font-size-2xs);
52
33
  --sidebar-user-name-font-size: var(--font-size-xs);
53
34
 
54
- /* Brand-chrome gradient hooks — opt-in, invisible by default. A service paints
55
- * the sidebar/topbar surface by setting these to a gradient (no-op = none). */
56
35
  --sidebar-gradient: none;
57
36
  --topbar-gradient: none;
58
37
 
59
- /* DXS application-shell geometry. These defaults mirror the checked-in
60
- * Admin/Console hi-fi source while remaining themeable by consumers. */
61
38
  --app-shell-bar-height: var(--band-height-2xl);
62
- /* (the coarse-pointer override lives at the end of this file — Rule #24 grows
63
- * controls to 44px, and a 48px bar cannot hold a 44px control plus its 3px
64
- * focus ring at the very top of the viewport, where overflow cannot help.) */
65
- /* Inline inset and slot gap of the AppShell top bar.
66
- *
67
- * ONE OWNER FOR THE HORIZONTAL PAGE-INSET AXIS (gh#330). The bar sits in the SAME grid track as
68
- * `.app-main`, directly above the page, so its first control and the page title are on one
69
- * vertical edge — or they are supposed to be. These two knobs used to name their own values
70
- * (--space-4 / --space-3) while the page named --space-page-x / --space-page-compact-x, and
71
- * nothing reconciled them: measured in Chromium on /isolate/layout-app-shell the topbar's
72
- * content started at x=80 while the page header's started at x=88 (1512px), and because the two
73
- * sides also stepped at DIFFERENT breakpoints (shell 900px, page 720px) the error was not even
74
- * constant — 8px at 1512, 12px between 720 and 900, 4px below 720. A consumer cannot correct a
75
- * drift that changes with the viewport.
76
- *
77
- * The page gutter WINS the axis, for three reasons: it is read by seven regions (page header,
78
- * toolbar, body, footer, PageContainer.Inset, the DataTable full-bleed compensation, Banner)
79
- * against this knob's one element; the bar is the region that must line up with the page, not
80
- * the other way round (the rail is a different track with its own inset); and moving the bar
81
- * moves exactly one element in one composition, while moving --space-page-x would move every
82
- * page in every consumer app.
83
- *
84
- * The NAMES stay — a theme that already sets `--app-shell-bar-inset` keeps working, and a bar
85
- * that genuinely wants to sit tighter than its page still has its own knob. Only the DEFAULTS
86
- * now point at the owner. `-compact` applies below the PAGE's 720px step (not the shell's 900px
87
- * restructure), so both sides tighten on the same line — see styles/shell-layout.css. */
39
+
88
40
  --app-shell-bar-inset: var(--space-page-x);
89
41
  --app-shell-bar-inset-compact: var(--space-page-compact-x);
90
42
  --app-shell-bar-gap: var(--space-3);
91
- /* Docked navigation rail widths — the SINGLE most-retuned shell constant (rule #45). A service
92
- * that designs on a different grid sets `--app-shell-sidebar-width: 15.9375rem` (255px) once
93
- * instead of forking `.app-root`. `-rail-` is the icon-only width used at
94
- * `<AppShell sidebarCollapsed>`. */
43
+
95
44
  --app-shell-sidebar-width: 16rem;
96
45
  --app-shell-rail-width: 4rem;
97
46
  --app-shell-page-max-width: 80rem;
98
47
  --app-shell-main-background: hsl(var(--muted) / 0.4);
99
48
  --app-shell-mobile-nav-width: 22.5rem;
100
- /* Mobile-drawer scrim — `initial` so the shared --overlay-background default re-resolves at the
101
- * CALL SITE under a scoped [data-tenant]/.dark theme (a :root binding freezes at :root). Default =
102
- * var(--app-shell-mobile-nav-alpha) of the global scrim, i.e. rgb(0 0 0 / 0.2) out of the box. */
49
+
103
50
  --app-shell-mobile-nav-background: initial;
104
- /* Share of the global --overlay-background this drawer's scrim uses. A slide-in drawer washes the
105
- * page more lightly than a modal dialog; keeping it a RATIO means a service retints the whole
106
- * system with one --overlay-background and every overlay keeps its calibrated depth. */
51
+
107
52
  --app-shell-mobile-nav-alpha: 40%;
108
- /* Inline inset of the mobile drawer's scrollable nav body. Near-zero by design: the drawer nav
109
- * (the <Sidebar> node by default) owns its own inset via --sidebar-nav-scroll-padding, so the
110
- * generic sheet chrome inset must NOT stack on top of it (gh#211). Set it to var(--space-6) for
111
- * a custom mobileNav node that wants the full sheet chrome inset. */
53
+
112
54
  --app-shell-mobile-nav-inset: var(--space-1);
113
- /* Hamburger glyph in the drawer trigger. Bigger ON PURPOSE than the trigger Button's own
114
- * `size="sm"` icon step (--control-icon-size-sm, 0.875rem) — it is the ONLY navigation
115
- * affordance on a phone, so it reads at the 1.25rem step. A flat rem, not a density-scaled
116
- * alias: it must not move with the density axis, or the one tap target that opens navigation
117
- * shrinks on a compact page. Consumed as a `size-[var(...)]` utility so it outranks
118
- * `.ui-button--sm svg` (see the comment at the call site in app-shell.tsx). */
55
+
119
56
  --app-shell-mobile-nav-icon-size: var(--icon-size-lg);
120
57
 
121
- /* ServiceRolePanel (gh#319). `.ui-service-role-panel` shipped as a bare hook — the class was on
122
- * the root but no rule existed anywhere, so the role rail's rhythm lived entirely as Tailwind
123
- * literals inside the component and no theme could reach it (#45). The panel is a thin
124
- * composition over MasterDetail, which still owns ALL the two-track geometry; these knobs cover
125
- * only the role LIST inside the master rail.
126
- *
127
- * Flat rems, not `--space-*`: the literals they replace read Tailwind's own `--spacing` grid,
128
- * which this package never remaps and which does not follow the density axis. Aliasing them
129
- * would start scaling the rail inside a `.ui-density-*` subtree — a visual change, not a
130
- * refactor. */
131
- --service-role-panel-list-gap: 0.25rem; /* between role rows (was `gap-1`) */
132
- --service-role-panel-row-gap: 0.25rem; /* select button ↔ delete button (was `gap-1`) */
133
- --service-role-panel-item-title-gap: 0.375rem; /* role name ↔ lock Badge (was `gap-1.5`) */
134
- /* The role row is a MULTI-LINE button (name over a description/member-count line), so it opts
135
- * out of the control height grid (`h-auto`) and sets its own block padding — that is what the
136
- * `py-2` literal was doing. It needs the raised `.ui-service-role-panel` ancestor specificity
137
- * (0,2,0) to beat `.ui-button--md { padding-block: var(--button-space-block) }` (0,1,0):
138
- * layout.css is imported BEFORE control.css and both are `@layer components`, so an equal
139
- * (0,1,0) rule here would silently lose. */
58
+ --service-role-panel-list-gap: 0.25rem;
59
+ --service-role-panel-row-gap: 0.25rem;
60
+ --service-role-panel-item-title-gap: 0.375rem;
61
+
140
62
  --service-role-panel-item-padding-block: 0.5rem;
141
63
  --sidebar-brand-mark-size: 1.375rem;
142
64
  --sidebar-nav-item-height: var(--band-height-md);
143
- /* ON the type scale (gh#329). This was `0.8125rem` — 13px, which is not a step: the golden scale
144
- * runs …/ratio² ≈ 11.1 · /ratio ≈ 12.5 · base 14…, so 13 sat BETWEEN two steps and every nav row
145
- * in the rail read off the system's type rhythm. It had no mechanical anchor either — unlike the
146
- * auth field label below, which is pinned to an artboard y-coordinate and keeps its literal with
147
- * a declared `scale-exempt` — only the checked-in hi-fi source's number.
148
- *
149
- * GEOMETRY MOVES, by 0.53px: 13px → --font-size-xs (≈12.47px), the step the sub-row
150
- * (--sidebar-nav-sub-font-size) and the flyout title already take. Nothing reflows — the row is a
151
- * fixed 2rem with `align-items: center`, and 1.5 × 12.47 = 18.7px sits inside it with the same
152
- * headroom 19.5px had. What is gained is that a service overriding --font-size-base now moves the
153
- * rail's labels with the rest of its type, instead of leaving one constant behind. */
65
+
154
66
  --sidebar-nav-item-font-size: var(--font-size-xs);
155
- /* Line box of the nav LABEL, not the row (gh#254): `.sb-label` clips, so its line box is its clip
156
- * box, and the row's `line-height: 1` shears descenders and Vietnamese tone marks. Keep >= 1.2. */
67
+
157
68
  --sidebar-nav-item-line-height: 1.5;
158
- /* Same gh#254 trap, two more clipping boxes. `.ui-auth-account-email` and the truncating last
159
- * child of `.ui-topbar-start` both clip (`overflow: hidden`/`clip` + `text-overflow: ellipsis`),
160
- * so their line box IS their clip box — inheriting a tight value shears descenders and Vietnamese
161
- * tone marks exactly as the sidebar label did. Keep >= 1.2. */
69
+
162
70
  --auth-account-summary-email-line-height: 1.5;
163
71
  --topbar-start-truncate-line-height: 1.5;
164
72
  --sidebar-nav-icon-size: var(--icon-size-md);
165
73
  --sidebar-nav-item-gap: 0.625rem;
166
74
  --sidebar-nav-item-padding-x: 0.625rem;
167
75
  --sidebar-nav-gap: 2px;
168
- /* Corner radius of a nav row. Defaults to the global rail radius, which is what an inset pill
169
- * wants — but a rail that sets --sidebar-nav-scroll-padding and --sidebar-nav-gap to 0 makes its
170
- * rows full-bleed bands flush with both edges, and a band wants square corners. Every other
171
- * geometry property of `.sb-nav-item` was already a knob; this one was pinned to a constant, so
172
- * the only way to square a band was a consumer selector against a DS internal class — the exact
173
- * coupling rule #45 exists to prevent. Set `0` for full-bleed bands. */
76
+
174
77
  --sidebar-nav-item-radius: calc(var(--radius) - 1px);
175
78
  --sidebar-nav-scroll-padding: var(--space-3) var(--space-2);
176
79
  --sidebar-section-gap: var(--space-4);
177
80
  --sidebar-section-label-padding-x: var(--space-2);
178
81
  --sidebar-section-label-padding-bottom: var(--space-1);
179
- /* Default `none` (gh#296): the search trigger fills its whole `Topbar` center slot — flush to
180
- * whatever sits in `end` (a locale picker, notification bell, account menu) — rather than
181
- * floating as a fixed ~420px box with dead space on either side at normal desktop widths. A
182
- * consumer that wants a capped, centered search box (the previous look) sets this explicitly. */
82
+
183
83
  --topbar-search-max-width: none;
184
- /* Standalone <Topbar> geometry (rule #45). Topbar is a pure slot bar, so its box is intentionally
185
- * QUIET by default: `auto` height and no inline inset, i.e. exactly what it did before these knobs
186
- * existed — inside AppShell the `.app-topbar` grid row still owns the height. A service that
187
- * places Topbar directly on a page sets `--topbar-height: 3.5rem` / `--topbar-inset: var(--space-4)`
188
- * once instead of writing an app-local class. `--topbar-gap` is the gap BETWEEN the start/center/end
189
- * clusters and INSIDE each of them, so one knob re-rhythms the whole bar. */
84
+
190
85
  --topbar-height: auto;
191
86
  --topbar-inset: 0px;
192
87
  --topbar-gap: var(--space-2);
193
- /* ⚠ THIS KNOB DELETES CONTENT AT 1100px AND BELOW — read before you ship a center slot.
194
- * At compact desktop/tablet widths the docked sidebar leaves too little inline room for three
195
- * intrinsically-sized clusters, so the package hides the optional center slot before it can
196
- * cover the breadcrumb/title or end utilities (gh#244). The default is `none`, which means a
197
- * global search trigger placed in `center` is INVISIBLE from 1100px down — including on every
198
- * phone — unless the consumer opts back in. That default arrived in 18.6.0 and removed the slot
199
- * for consumers who never changed a line of their own code (gh#12); it stays because the
200
- * overlap it prevents is a real defect and flipping a shipped default twice is worse than
201
- * documenting it once, but it is a DECISION, not an accident:
202
- *
203
- * :root { --topbar-center-compact-display: flex; } ← restore the slot at every width
204
- *
205
- * Opt back in only once the center content has a compact presentation of its own (an icon-only
206
- * search trigger, a collapsing field). A page-local media query is the anti-pattern this knob
207
- * replaces. */
88
+
208
89
  --topbar-center-compact-display: none;
209
90
  --org-switcher-trigger-height: var(--band-height-xl);
210
91
  --org-switcher-trigger-padding-x: var(--space-2);
@@ -213,22 +94,12 @@
213
94
  --org-switcher-sheet-max-height: 75dvh;
214
95
  --org-switcher-state-min-height: 8rem;
215
96
 
216
- /* Sidebar active-item tint/marker — `initial` so the role defaults re-resolve at the call site
217
- * under a scoped theme (a :root binding to a role var freezes at :root; a scoped role override
218
- * never reaches it). A service re-tunes the active sub-item accent without forking CSS.
219
- * Defaults = hsl(var(--primary)) marker/tint. */
220
97
  --sidebar-item-active-color: initial;
221
98
  --sidebar-item-active-tint: initial;
222
- /* Main nav-item active row — defaults mirror the hover state (accent bg, foreground text); a
223
- * service overrides these to brand the selected row (e.g. a gold tint + gold text on a navy
224
- * sidebar). `initial` so the defaults re-resolve under a scoped theme.
225
- * Defaults = hsl(var(--accent)) fill · hsl(var(--foreground)) text. */
99
+
226
100
  --sidebar-item-active-background: initial;
227
101
  --sidebar-item-active-foreground: initial;
228
102
 
229
- /* AuthShell — centred auth/login page shell. Comfortable control density (44px, WCAG touch floor)
230
- * + a larger auth heading, scoped to the shell; a service re-tunes the auth card width, insets
231
- * and heading size without forking. */
232
103
  --auth-shell-control-height: var(--control-height-comfortable);
233
104
  --auth-shell-heading-size: var(--font-size-2xl);
234
105
  --auth-shell-card-max-width: 24rem;
@@ -236,54 +107,24 @@
236
107
  --auth-shell-main-padding: var(--space-6);
237
108
  --auth-shell-footer-padding: var(--space-3) var(--space-6) var(--space-4);
238
109
 
239
- /* Canonical DXS auth preset. These are public theme knobs: consumers select the preset once on
240
- * AuthShell and may retune the product theme here rather than overriding individual fields. */
241
110
  --auth-shell-canonical-control-height: var(--band-height-lg);
242
111
  --auth-shell-canonical-card-max-width: 22.5rem;
243
112
  --auth-shell-canonical-heading-size: var(--font-size-base);
244
113
  --auth-shell-canonical-main-padding: 1rem;
245
114
  --auth-shell-canonical-main-padding-mobile: 0.9375rem;
246
- /* INLINE (start/end) inset of the compact auth card — the column the title, fields and actions
247
- * align to. Independent of the block axis below (gh#232). */
115
+
248
116
  --auth-shell-compact-card-inset: var(--space-6);
249
- /* BLOCK (top/bottom) padding of the compact auth card — the knob that tunes canonical Login card
250
- * HEIGHT without narrowing the column. Bound to the card's --card-space-shell-y, so it really
251
- * reaches CardContent's block edges (before gh#232 it was wired only to --card-space-body-y and
252
- * the rendered body kept the inset on both block edges — the documented token did nothing).
253
- * Declared `initial` so the default mirrors the LIVE --auth-shell-compact-card-inset resolved at
254
- * the CALL SITE: the canonical card renders exactly as before (24px block = 24px inline), and a
255
- * service that re-tunes the inset inside a scoped `[data-tenant]` still drags the block default
256
- * with it (a :root binding would freeze at the :root inset — docs/TOKENS.md). */
257
- --auth-shell-card-padding-block-compact: initial; /* default = var(--auth-shell-compact-card-inset) */
258
- /* Header↔body gap inside the compact auth card (the breathing room under the title before the
259
- * first field). Its own knob since gh#232 — it used to ride on
260
- * --auth-shell-card-padding-block-compact, which conflated the section gap with the card's block
261
- * padding and made the block knob un-tunable. Default is the pre-gh#232 12px rhythm. */
117
+
118
+ --auth-shell-card-padding-block-compact: initial;
119
+
262
120
  --auth-shell-card-body-gap-compact: var(--space-3);
263
- /* IN-SLOT stack gap of the compact auth card (title ↕ description inside the header). */
264
- --auth-shell-card-gap-compact: var(--space-3);
265
121
 
266
- /* Named AUTH FLOW PRESETS (gh#217 / gh#220). A preset owns the whole page measure for one
267
- * canonical hosted-identity flow — card max-width plus the desktop and mobile page gutters — so a
268
- * consumer selects `preset` once instead of hand-overriding --auth-shell-card-max-width. Presets
269
- * are orthogonal to `variant` (which owns control density / heading size) and are applied AFTER
270
- * it, so `variant="canonical" preset="device-authorization"` keeps the canonical chrome and only
271
- * re-measures the page. Literal lengths (not --space-*) because the canonical artboards specify
272
- * exact device pixels that must not drift with --scaling. */
122
+ --auth-shell-card-gap-compact: var(--space-3);
273
123
 
274
- /* Main-axis alignment of the auth column. Default `center` = today's vertically-centred card;
275
- * a flow whose intro + card + footnote stack is tall opts into `start` via this knob. */
276
124
  --auth-shell-main-align: center;
277
- /* Gap between the direct sections of the auth column (intro · card · remember row). Default 0
278
- * (quiet, rule #44) so an existing single-card consumer is untouched; presets opt in. */
125
+
279
126
  --auth-shell-card-stack-gap: 0px;
280
127
 
281
- /* Login preset (gh#237) — canonical SCR-001 anchors at 1440x900, 1024x900 and 390x844.
282
- * The 112px identity slot is deliberately taller than a two-line real requester. Identity
283
- * content aligns to the slot end, so missing/one-line/two-line requester data changes only the
284
- * empty space above it, never the card or footer position. The flow starts at y=231 desktop and
285
- * y=221 mobile: 231/221 + 112 + 20 gap = card y=363/353. Literal artboard lengths belong here,
286
- * not in a consumer selector, and do not drift with --scaling. */
287
128
  --auth-shell-login-card-max-width: 22.5rem;
288
129
  --auth-shell-login-flow-offset-block: 14.4375rem;
289
130
  --auth-shell-login-flow-offset-block-mobile: 13.8125rem;
@@ -292,98 +133,38 @@
292
133
  --auth-shell-login-main-padding-block-end: 1rem;
293
134
  --auth-shell-login-identity-slot-block-size: 7rem;
294
135
  --auth-shell-login-card-stack-gap: 1.25rem;
295
- /* Canonical SCR-001 block inset is a FLAT 24px — the same measure as the inline inset. The card
296
- * draws its own 1px border and a border-box rect already contains it, so the former
297
- * `+ 2 x --control-border-width` double-counted the border and pushed the passkey CTA to y=390
298
- * instead of the canonical y=388 (gh#263). */
136
+
299
137
  --auth-shell-login-card-padding-block-compact: var(--auth-shell-compact-card-inset);
300
138
 
301
- /* Device-authorization preset — 380px card measure, 15px block · 5px inline mobile gutter
302
- * (at a 390px viewport the card is x=5px, width=380px). */
303
139
  --auth-shell-device-card-max-width: 23.75rem;
304
140
  --auth-shell-device-main-padding: 1rem;
305
141
  --auth-shell-device-main-padding-mobile: 0.9375rem 0.3125rem;
306
- /* CODE FIELD measure — the preset owns it (gh#12). A device grant is the one canonical flow whose
307
- * PRIMARY control is the code field, so leaving it on the generic square --otp-slot-size made the
308
- * preset own the page but not its own subject: two 4-slot `appearance="grouped"` boxes rendered
309
- * 146x38 (4 x the canonical 36px control tier + the 1px group border) against a 112x54 artboard.
310
- * These are the per-slot boxes that ADD UP to that artboard group:
311
- * inline 27.5px x 4 + 2 x 1px group border = 112px
312
- * block 52px + 2 x 1px group border = 54px
313
- * Literal artboard lengths, like every other preset measure here — they must not drift with
314
- * --scaling. A service that groups its code differently overrides --otp-slot-inline-size /
315
- * --otp-slot-block-size on its own field; the generic square knob is untouched everywhere else. */
142
+
316
143
  --auth-shell-device-otp-slot-inline-size: 1.71875rem;
317
144
  --auth-shell-device-otp-slot-block-size: 3.25rem;
318
145
 
319
- /* Context-selection preset — 25rem card measure on desktop/tablet, edge-to-edge on mobile
320
- * (0 inline gutter) with a 16px rhythm between the intro, the card and the remember row. */
321
146
  --auth-shell-context-card-max-width: 25rem;
322
147
  --auth-shell-context-main-padding: var(--space-6);
323
148
  --auth-shell-context-main-padding-mobile: var(--space-6) 0;
324
149
  --auth-shell-context-card-stack-gap: 1rem;
325
150
 
326
- /* Account-recovery preset (gh#233) — the SCR-008 measure shared by the password-recovery panel
327
- * (request · sent · new-password · expired) and the sign-in MFA challenge panel (OTP ·
328
- * recovery-code · passkey-failure). Both canonical desktop panels measure w=432 at 1440, so ONE
329
- * preset owns them; the 360px canonical Login measure is untouched.
330
- * The mobile gutter is a DECIDED contract, not a traced artboard: the supplied 390 reference is a
331
- * desktop 2x2 composite that crops horizontally and cannot be measured. 15px inline at 390 ⇒ the
332
- * panel is x=15, width=360 — the same page rhythm as the canonical Login flow, so a user moving
333
- * from Login to Recovery on a phone never sees the surface jump. */
334
151
  --auth-shell-recovery-card-max-width: 27rem;
335
152
  --auth-shell-recovery-main-padding: 1rem;
336
153
  --auth-shell-recovery-main-padding-mobile: 0.9375rem;
337
154
 
338
- /* Registration preset (gh#256) — the canonical sign-up measure. Two things make it structurally
339
- * different from every preset above, and both are the reason it could not be expressed by
340
- * re-using `login`:
341
- *
342
- * 1. LONG-FORM SCROLLING. A registration card is the tallest surface in the hosted-identity set
343
- * (name · email · password · confirm · strength meter · consent · submit · provider row), and
344
- * a vertically CENTRED tall card clips its own top on a short viewport — the top overflows
345
- * above the scroll origin and becomes unreachable. So the column is start-aligned and the
346
- * block-start inset becomes ordinary page padding the user can scroll past.
347
- * 2. FOOTER CLEARANCE. The legal/consent footer must never be flush against the submit button
348
- * at the end of a long scroll, so the block-end inset is a knob of its own rather than
349
- * mirroring the block-start one.
350
- *
351
- * The 360px form measure and the 15px mobile inline gutter match the canonical Login flow exactly
352
- * (22.5rem card, x=15 at 390 ⇒ width=360), so a user moving sign-in → sign-up on a phone never
353
- * sees the surface jump. */
354
155
  --auth-shell-registration-card-max-width: 22.5rem;
355
- /* Block-start offsets are DERIVED from the canonical SCR-002 artboard, not chosen: the card
356
- * anchors at y=284 (1440x900) and y=274 (390x844), and the column is
357
- * card y = padding-block-start + identity slot + stack gap
358
- * so 284 - 112 - 20 = 152px (9.5rem) and 274 - 112 - 20 = 142px (8.875rem). Like every canonical
359
- * screen in this family the page passes NO brand bar (the mark lives INSIDE the column as
360
- * AuthIdentity), so `main` starts at the viewport top and the offset is the whole anchor. */
156
+
361
157
  --auth-shell-registration-main-padding-block-start: 9.5rem;
362
158
  --auth-shell-registration-main-padding-block-start-mobile: 8.875rem;
363
159
  --auth-shell-registration-main-padding-inline: 1rem;
364
160
  --auth-shell-registration-main-padding-inline-mobile: 0.9375rem;
365
- /* Footer clearance — the gap the legal footer keeps below the end of a long form. */
161
+
366
162
  --auth-shell-registration-main-padding-block-end: 3rem;
367
163
  --auth-shell-registration-main-padding-block-end-mobile: 2rem;
368
164
  --auth-shell-registration-card-stack-gap: 1.25rem;
369
- /* Fixed identity track, the same 112px `login` proved (gh#237). Without it the card anchor moves
370
- * with the title/requester line count, so the canonical y above would hold for exactly one copy
371
- * length and drift for every other. The slot absorbs absent / one-line / two-line identity
372
- * content instead. */
165
+
373
166
  --auth-shell-registration-identity-slot-block-size: 7rem;
374
167
 
375
- /* Labelled auth divider geometry. The canonical SCR-001 divider row is 19px tall at an 11px
376
- * label (the artboard label inherits the page's line-height instead of collapsing to a 1.0 line
377
- * box). 19/11 is that RATIO, not a pin: it holds the row proportional when the label's step
378
- * moves, which is exactly what gh#329 did to it. The previous hardcoded `line-height: 1`
379
- * rendered an 11px row, sitting the whole lower half of the Login card 8px high (gh#263).
380
- *
381
- * ON the type scale (gh#329): the label was the literal `0.6875rem` (11px) and is now
382
- * --font-size-2xs, the scale's ratio⁻² step ≈ 11.107px — the same step the sidebar section
383
- * label, the kbd cap and the chrome page subtitle already take. GEOMETRY MOVES by 0.11px on the
384
- * label and 0.19px on the row (19 → 19.19px), i.e. a fifth of a pixel, and in exchange the auth
385
- * micro-scale finally rides the service's --font-size-base like everything else. 11 was never a
386
- * step; it was 2xs rounded to the nearest whole pixel and then written down as if it were. */
387
168
  --auth-shell-divider-gap: 0.625rem;
388
169
  --auth-shell-divider-label-font-size: var(--font-size-2xs);
389
170
  --auth-shell-divider-label-line-height: calc(19 / 11);
@@ -401,82 +182,47 @@
401
182
  --auth-account-summary-avatar-glyph-size: var(--control-icon-size-sm);
402
183
  --auth-account-summary-email-font-size: var(--font-size-sm);
403
184
  --auth-footer-content-gap: 0.375rem;
404
- /* The same 11px → 2xs snap as the divider label above (gh#329); this one carried no artboard
405
- * anchor at all, only the literal. GEOMETRY MOVES by 0.11px. */
185
+
406
186
  --auth-footer-text-font-size: var(--font-size-2xs);
407
187
  --auth-stack-gap: var(--space-3);
408
188
  --auth-shell-field-label-gap: var(--space-1);
409
- /* Canonical SCR-001 field label: a LITERAL 12px (the golden-ratio --font-size-xs ≈ 12.47px would
410
- * drift the 18px line box to 18.7px and push the email input off its y=489 anchor) with a 1.5
411
- * line box = 18px. The former var(--font-size-xs)/1.25 pair rendered a 14px box, sitting the
412
- * email input 4px high (gh#263).
413
- *
414
- * gh#329 asked whether this is merely a long way of writing --font-size-xs. It is NOT: the xs
415
- * step is base/ratio ≈ 12.47px, not 12. This is the system's TIER 2 — a value that is off every
416
- * step because it is anchored to something outside the system (an artboard coordinate), which is
417
- * a real need and must have a sanctioned route rather than becoming a fork or an !important. The
418
- * route is the marker below, which the scale-bypass guard honours and PRINTS, so the exception is
419
- * declared once and stays visible instead of hiding in prose. */
420
- /* scale-exempt: SCR-001 pins the email input at y=489; --font-size-xs (12.47px) drifts the 18px label box to 18.7px (gh#263) */
189
+
421
190
  --auth-shell-field-label-font-size: 0.75rem;
422
191
  --auth-shell-field-label-line-height: 1.5;
423
192
 
424
- /* CenteredShell — authenticated, no-sidebar, centred-column page shell (hosted-ID "My Page",
425
- * account, standalone settings). The bar mirrors AppShell's `.app-topbar` chrome (fixed height +
426
- * inline padding); the column max-width has three tiers, all wider than the 24rem auth card. A
427
- * service retunes the bar inset, block padding and each width tier without forking CSS. */
428
193
  --centered-shell-bar-height: var(--app-shell-bar-height);
429
- --centered-shell-bar-padding-x: var(--space-4);
194
+ --centered-shell-bar-padding-x: var(--space-page-x);
195
+ --centered-shell-bar-padding-x-compact: var(--space-page-compact-x);
430
196
  --centered-shell-main-padding: var(--space-6);
197
+
198
+ --centered-shell-main-padding-inline-compact: var(--space-page-compact-x);
431
199
  --centered-shell-footer-padding: var(--space-3) var(--space-6) var(--space-4);
432
- /* Block offset of the centred column inside the 100dvh shell. `0` (default, the quietest state —
433
- * rule #44) keeps the top-aligned flowing page; `auto` centres the column in the viewport, which
434
- * is what CenteredShell `align="center"` sets for a SYSTEM-level standalone surface (500/503
435
- * error page, maintenance notice). Auto block offsets collapse to 0 when the content is taller
436
- * than the viewport, so a long localized message scrolls from the top instead of clipping. */
200
+ --centered-shell-footer-padding-inline-compact: var(--space-page-compact-x);
201
+
437
202
  --centered-shell-column-offset-block: 0;
438
203
  --centered-shell-width-sm: 32rem;
439
204
  --centered-shell-width-md: 46rem;
440
205
  --centered-shell-width-lg: 64rem;
441
206
  }
442
207
 
443
- /* CenteredShell · public-landing preset (gh#252) — the token-owned geometry of a PUBLIC marketing
444
- * / product landing page: one content measure shared by header, main column and footer, the
445
- * section rhythm between page sections, the flat (chrome-quiet) card presentation and the hero
446
- * heading tier. Every value is a service-themeable knob (rule #45): a landing composition is a
447
- * COMPOSITION of real primitives (docs/COMPOSITION-VS-COMPONENT.md — Hero/Navbar/Footer FAIL the
448
- * Framework-Component Test), so the consumer must never own geometry or a media query. These
449
- * knobs are read ONLY under `.ui-centered-shell[data-preset="public-landing"]`, so the default
450
- * shell — which emits no `data-preset` at all — is byte-identical to before. */
451
208
  :root {
452
- --centered-shell-landing-max-width: 67.5rem; /* 1080px — header/main/footer share ONE measure */
453
- --centered-shell-landing-inset-inline: var(--space-6); /* 24px page gutter ≥ 40rem */
454
- --centered-shell-landing-inset-inline-compact: var(--space-4); /* 16px page gutter < 40rem */
455
- --centered-shell-landing-main-padding-block: var(--space-10); /* 40px */
456
- --centered-shell-landing-main-padding-block-compact: var(--space-6); /* 24px */
457
- --centered-shell-landing-section-gap: var(--space-10); /* rhythm BETWEEN page sections */
209
+ --centered-shell-landing-max-width: 67.5rem;
210
+ --centered-shell-landing-inset-inline: var(--space-6);
211
+ --centered-shell-landing-inset-inline-compact: var(--space-4);
212
+ --centered-shell-landing-main-padding-block: var(--space-10);
213
+ --centered-shell-landing-main-padding-block-compact: var(--space-6);
214
+ --centered-shell-landing-section-gap: var(--space-10);
458
215
  --centered-shell-landing-section-gap-compact: var(--space-6);
459
216
  --centered-shell-landing-footer-padding-block: var(--space-8);
460
- /* Chrome is a token, default quiet (rule #44): a landing surface is FLAT — no card elevation —
461
- * so a service opts back IN with `--centered-shell-landing-card-shadow: var(--card-shadow)`. */
217
+
462
218
  --centered-shell-landing-card-shadow: none;
463
- /* Hero heading tier. The preset re-points `--heading-h1` (same mechanism as
464
- * `.ui-auth-shell` → `--auth-shell-heading-size`), so a hero title is a real `Heading level={1}`
465
- * and never a consumer font-size. */
219
+
466
220
  --centered-shell-landing-heading-size: var(--font-size-display);
467
221
  --centered-shell-landing-heading-size-compact: var(--font-size-3xl);
468
- /* Role-mirror knob — MUST stay `initial`, with the role default at the CALL SITE
469
- * (`var(--centered-shell-landing-background, var(--background))`), so a scoped
470
- * `[data-tenant]` / `.dark` override of `--background` still reaches it (docs/TOKENS.md ·
471
- * "Role-mirror knobs MUST be `initial`"). Documented default = hsl(var(--background)) — a public
472
- * page is the plain page canvas, not the app's `--muted` chrome. */
222
+
473
223
  --centered-shell-landing-background: initial;
474
224
  }
475
225
 
476
- /* Rule #24 companion (gh#291): on coarse pointers --control-height grows to 2.75rem
477
- * (44px tap floor), and the shell bar sits flush with the viewport top — a 3rem bar
478
- * leaves the control's 3px focus ring painting ABOVE y=0, off-screen, which no
479
- * overflow setting can recover. 3.5rem gives 6px of breathing per side. */
480
226
  @media (pointer: coarse) {
481
227
  :root {
482
228
  --app-shell-bar-height: var(--band-height-3xl);
@@ -1,32 +1,15 @@
1
- /* Sidebar nav-row COLOUR knobs (gh#228). The row/label and its icon are separately themeable:
2
- * before this, `.sb-nav-item` painted one `--muted-foreground` that the Lucide SVG inherited, so a
3
- * service could only darken its 16px nav icons by writing page-local CSS or by re-tinting every
4
- * muted text globally. Geometry knobs (--sidebar-nav-icon-size, --sidebar-nav-item-height/-gap/
5
- * -padding-x) live in components/shell.css and are untouched by these.
6
- *
7
- * ROLE-MIRROR KNOBS — declared `initial` here with the role default at the CALL SITE
8
- * (`var(--knob, hsl(var(--role)))`), so a scoped `[data-tenant]` / `.dark` role override
9
- * re-resolves live instead of freezing at :root (docs/TOKENS.md · "Role-mirror knobs MUST be
10
- * `initial`"). Every default is byte-identical to the pre-gh#228 rendering.
11
- *
12
- * The ACTIVE row's own background/foreground keep their existing knobs
13
- * (--sidebar-item-active-background / --sidebar-item-active-foreground, components/shell.css);
14
- * only the active ICON gets a new one. */
1
+
15
2
 
16
3
  :root {
17
- /* Resting nav row + label (also the resting sub-row). Default = hsl(var(--muted-foreground)). */
4
+
18
5
  --sidebar-nav-item-foreground: initial;
19
- /* Hovered nav row + label. Default = hsl(var(--foreground)). */
6
+
20
7
  --sidebar-nav-item-hover-foreground: initial;
21
- /* `aria-disabled` nav row + label. Default = the resting row colour. */
8
+
22
9
  --sidebar-nav-item-disabled-foreground: initial;
23
10
 
24
- /* Nav ICON (`.sb-icon`, incl. the collapsed rail and group triggers). Default = currentColor,
25
- * i.e. the row colour — the pre-gh#228 look. Set this alone to get canonical dark icons next to
26
- * muted labels. */
27
11
  --sidebar-nav-icon-foreground: initial;
28
- /* Icon on a hovered / active / disabled row. Each falls back to --sidebar-nav-icon-foreground,
29
- * then to currentColor, so setting the base icon knob alone themes every state. */
12
+
30
13
  --sidebar-nav-icon-hover-foreground: initial;
31
14
  --sidebar-nav-icon-active-foreground: initial;
32
15
  --sidebar-nav-icon-disabled-foreground: initial;