@jcsoftdev/ui 0.4.0 → 0.6.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 (489) hide show
  1. package/CHANGELOG.md +434 -0
  2. package/README.md +26 -4
  3. package/bin/ui-theme.mjs +40 -6
  4. package/dist/ai/code-block/code-block.js +1 -1
  5. package/dist/atoms/big-date/big-date.js +2 -2
  6. package/dist/atoms/button/button.d.ts +14 -2
  7. package/dist/atoms/button/button.js +12 -5
  8. package/dist/atoms/chip/chip.d.ts +5 -0
  9. package/dist/atoms/chip/chip.js +3 -3
  10. package/dist/atoms/divider/divider.d.ts +15 -0
  11. package/dist/atoms/divider/divider.js +27 -0
  12. package/dist/atoms/divider/index.d.ts +1 -0
  13. package/dist/atoms/divider/index.js +1 -0
  14. package/dist/atoms/icon-button/icon-button.d.ts +1 -1
  15. package/dist/atoms/icon-button/icon-button.js +1 -1
  16. package/dist/atoms/index.d.ts +1 -0
  17. package/dist/atoms/index.js +1 -0
  18. package/dist/atoms/internal/hit-area.d.ts +5 -4
  19. package/dist/atoms/internal/hit-area.js +1 -1
  20. package/dist/atoms/progress/index.d.ts +1 -1
  21. package/dist/atoms/progress/index.js +4 -1
  22. package/dist/atoms/progress/progress.d.ts +6 -1
  23. package/dist/atoms/progress/progress.js +19 -1
  24. package/dist/atoms/radio-group/radio-group.js +1 -1
  25. package/dist/atoms/status-pill/status-pill.d.ts +16 -5
  26. package/dist/atoms/status-pill/status-pill.js +43 -18
  27. package/dist/auth/auth-illustration/auth-illustration.d.ts +35 -0
  28. package/dist/auth/auth-illustration/auth-illustration.js +72 -0
  29. package/dist/auth/auth-illustration/index.d.ts +3 -0
  30. package/dist/auth/auth-illustration/index.js +11 -0
  31. package/dist/auth/auth-illustration/look.d.ts +30 -0
  32. package/dist/auth/auth-illustration/look.js +0 -0
  33. package/dist/auth/auth-illustration/model.d.ts +133 -0
  34. package/dist/auth/auth-illustration/model.js +202 -0
  35. package/dist/auth/auth-illustration/use-art-pointer.d.ts +9 -0
  36. package/dist/auth/auth-illustration/use-art-pointer.js +69 -0
  37. package/dist/auth/auth-layout/auth-layout.d.ts +80 -0
  38. package/dist/auth/auth-layout/auth-layout.js +190 -0
  39. package/dist/auth/auth-layout/index.d.ts +1 -0
  40. package/dist/auth/auth-layout/index.js +1 -0
  41. package/dist/auth/character/character.d.ts +12 -0
  42. package/dist/auth/character/character.js +333 -0
  43. package/dist/auth/character/index.d.ts +1 -0
  44. package/dist/auth/character/index.js +1 -0
  45. package/dist/auth/index.d.ts +4 -0
  46. package/dist/auth/index.js +4 -0
  47. package/dist/auth/internal/auth-context.d.ts +17 -0
  48. package/dist/auth/internal/auth-context.js +10 -0
  49. package/dist/auth/internal/auth-styles.d.ts +1 -0
  50. package/dist/auth/internal/auth-styles.js +29 -0
  51. package/dist/auth/internal/portal-glyphs.d.ts +6 -0
  52. package/dist/auth/internal/portal-glyphs.js +39 -0
  53. package/dist/auth/login-form/context.d.ts +51 -0
  54. package/dist/auth/login-form/context.js +12 -0
  55. package/dist/auth/login-form/index.d.ts +2 -0
  56. package/dist/auth/login-form/index.js +23 -0
  57. package/dist/auth/login-form/login-form.d.ts +66 -0
  58. package/dist/auth/login-form/login-form.js +233 -0
  59. package/dist/auth/login-form/parts.d.ts +71 -0
  60. package/dist/auth/login-form/parts.js +371 -0
  61. package/dist/auth/looks/auth-illustration-any.d.ts +16 -0
  62. package/dist/auth/looks/auth-illustration-any.js +24 -0
  63. package/dist/auth/looks/index.d.ts +1 -0
  64. package/dist/auth/looks/index.js +1 -0
  65. package/dist/auth/mosaic/index.d.ts +1 -0
  66. package/dist/auth/mosaic/index.js +1 -0
  67. package/dist/auth/mosaic/mosaic.d.ts +11 -0
  68. package/dist/auth/mosaic/mosaic.js +195 -0
  69. package/dist/auth/slabs/index.d.ts +1 -0
  70. package/dist/auth/slabs/index.js +1 -0
  71. package/dist/auth/slabs/slabs.d.ts +13 -0
  72. package/dist/auth/slabs/slabs.js +136 -0
  73. package/dist/auth/stack/index.d.ts +1 -0
  74. package/dist/auth/stack/index.js +1 -0
  75. package/dist/auth/stack/stack.d.ts +6 -0
  76. package/dist/auth/stack/stack.js +222 -0
  77. package/dist/auth/statement/index.d.ts +1 -0
  78. package/dist/auth/statement/index.js +1 -0
  79. package/dist/auth/statement/statement.d.ts +13 -0
  80. package/dist/auth/statement/statement.js +99 -0
  81. package/dist/brand/logo-forge.js +1 -1
  82. package/dist/charts/candlestick-chart/candlestick-chart.js +2 -2
  83. package/dist/charts/chart-grid/chart-grid.js +2 -2
  84. package/dist/charts/chord-chart/chord-chart.js +1 -1
  85. package/dist/charts/core/axes.js +2 -2
  86. package/dist/charts/core/cartesian/annotations.js +2 -2
  87. package/dist/charts/core/cartesian/marks.js +1 -1
  88. package/dist/charts/core/distribution/marks.js +1 -1
  89. package/dist/charts/core/distribution/xy-points.js +1 -1
  90. package/dist/charts/core/export-menu.js +1 -1
  91. package/dist/charts/funnel-chart/funnel-chart.js +1 -1
  92. package/dist/charts/gantt-chart/gantt-chart.js +4 -4
  93. package/dist/charts/gantt-chart/gantt-marks.js +3 -3
  94. package/dist/charts/index.d.ts +2 -0
  95. package/dist/charts/index.js +2 -0
  96. package/dist/charts/maps/geo/map-data-table.js +1 -1
  97. package/dist/charts/polar-area-chart/polar-area-chart.js +1 -1
  98. package/dist/charts/radar-chart/radar-chart.js +1 -1
  99. package/dist/charts/stock-chart/stock-chart.js +1 -1
  100. package/dist/charts/stock-chart/stock-drawing-layer.js +3 -3
  101. package/dist/charts/stock-chart/stock-plot.js +2 -2
  102. package/dist/containers/chat-thread/chat-thread.d.ts +98 -0
  103. package/dist/containers/chat-thread/chat-thread.js +219 -0
  104. package/dist/containers/chat-thread/format.d.ts +20 -0
  105. package/dist/containers/chat-thread/format.js +50 -0
  106. package/dist/containers/chat-thread/index.d.ts +1 -0
  107. package/dist/containers/chat-thread/index.js +8 -0
  108. package/dist/containers/cols/cols.d.ts +1 -1
  109. package/dist/containers/cols/cols.js +7 -0
  110. package/dist/containers/comment/comment.js +1 -1
  111. package/dist/containers/context-rail/context-rail.d.ts +62 -0
  112. package/dist/containers/context-rail/context-rail.js +175 -0
  113. package/dist/containers/context-rail/index.d.ts +1 -0
  114. package/dist/containers/context-rail/index.js +6 -0
  115. package/dist/containers/dashboard/dashboard.d.ts +40 -0
  116. package/dist/containers/dashboard/dashboard.js +84 -0
  117. package/dist/containers/dashboard/index.d.ts +1 -0
  118. package/dist/containers/dashboard/index.js +14 -0
  119. package/dist/containers/data-grid/data-grid.demos.js +4 -4
  120. package/dist/containers/data-grid/data-grid.js +6 -6
  121. package/dist/containers/data-grid/filter-builder-editor.js +2 -2
  122. package/dist/containers/data-grid/grid-toolbar.js +1 -1
  123. package/dist/containers/data-grid/spreadsheet.demos.d.ts +1 -1
  124. package/dist/containers/data-grid/spreadsheet.demos.js +1 -1
  125. package/dist/containers/detail-header/detail-header.d.ts +24 -0
  126. package/dist/containers/detail-header/detail-header.js +32 -0
  127. package/dist/containers/detail-header/index.d.ts +1 -0
  128. package/dist/containers/detail-header/index.js +6 -0
  129. package/dist/containers/facts/facts.js +1 -1
  130. package/dist/containers/filter-bar/filter-bar.d.ts +58 -0
  131. package/dist/containers/filter-bar/filter-bar.js +123 -0
  132. package/dist/containers/filter-bar/index.d.ts +1 -0
  133. package/dist/containers/filter-bar/index.js +6 -0
  134. package/dist/containers/hbars/hbars.js +2 -2
  135. package/dist/containers/index.d.ts +9 -0
  136. package/dist/containers/index.js +9 -0
  137. package/dist/containers/kanban/kanban.d.ts +23 -2
  138. package/dist/containers/kanban/kanban.js +101 -21
  139. package/dist/containers/kanban/model.d.ts +12 -0
  140. package/dist/containers/kanban/model.js +8 -0
  141. package/dist/containers/kpi/kpi.js +1 -1
  142. package/dist/containers/kpi-group/kpi-group.d.ts +6 -1
  143. package/dist/containers/kpi-group/kpi-group.js +6 -2
  144. package/dist/containers/list-detail/index.d.ts +1 -1
  145. package/dist/containers/list-detail/index.js +4 -0
  146. package/dist/containers/list-detail/list-detail.d.ts +51 -3
  147. package/dist/containers/list-detail/list-detail.js +109 -15
  148. package/dist/containers/page/page.d.ts +17 -4
  149. package/dist/containers/page/page.js +33 -4
  150. package/dist/containers/page-header/back.d.ts +10 -0
  151. package/dist/containers/page-header/back.js +28 -0
  152. package/dist/containers/page-header/index.d.ts +1 -0
  153. package/dist/containers/page-header/index.js +1 -0
  154. package/dist/containers/page-header/page-header.d.ts +19 -2
  155. package/dist/containers/page-header/page-header.js +26 -2
  156. package/dist/containers/pagination/cursor-pagination.d.ts +28 -0
  157. package/dist/containers/pagination/cursor-pagination.js +48 -0
  158. package/dist/containers/pagination/index.d.ts +3 -0
  159. package/dist/containers/pagination/index.js +10 -0
  160. package/dist/containers/pagination/pagination.d.ts +52 -0
  161. package/dist/containers/pagination/pagination.js +216 -0
  162. package/dist/containers/pagination/range.d.ts +29 -0
  163. package/dist/containers/pagination/range.js +42 -0
  164. package/dist/containers/pagination/use-pagination.d.ts +18 -0
  165. package/dist/containers/pagination/use-pagination.js +22 -0
  166. package/dist/containers/responsive-list/responsive-list.d.ts +28 -2
  167. package/dist/containers/responsive-list/responsive-list.js +134 -25
  168. package/dist/containers/row-actions/index.d.ts +1 -0
  169. package/dist/containers/row-actions/index.js +4 -0
  170. package/dist/containers/row-actions/row-actions.d.ts +26 -0
  171. package/dist/containers/row-actions/row-actions.js +78 -0
  172. package/dist/containers/selectable-card/index.d.ts +1 -0
  173. package/dist/containers/selectable-card/index.js +6 -0
  174. package/dist/containers/selectable-card/selectable-card.d.ts +26 -0
  175. package/dist/containers/selectable-card/selectable-card.js +57 -0
  176. package/dist/containers/settings-layout/settings-layout.d.ts +24 -7
  177. package/dist/containers/settings-layout/settings-layout.js +63 -8
  178. package/dist/containers/shortcuts/shortcuts.js +1 -1
  179. package/dist/containers/table/cell-padding.d.ts +2 -0
  180. package/dist/containers/table/cell-padding.js +4 -0
  181. package/dist/containers/table/index.d.ts +1 -0
  182. package/dist/containers/table/index.js +8 -0
  183. package/dist/containers/table/sort.d.ts +14 -0
  184. package/dist/containers/table/sort.js +11 -0
  185. package/dist/containers/table/table-parts.d.ts +24 -0
  186. package/dist/containers/table/table-parts.js +52 -0
  187. package/dist/containers/table/table.d.ts +37 -3
  188. package/dist/containers/table/table.js +120 -19
  189. package/dist/containers/table-columns-menu/index.d.ts +1 -0
  190. package/dist/containers/table-columns-menu/index.js +6 -0
  191. package/dist/containers/table-columns-menu/table-columns-menu.d.ts +14 -0
  192. package/dist/containers/table-columns-menu/table-columns-menu.js +46 -0
  193. package/dist/dashboards/layout.d.ts +1 -27
  194. package/dist/dashboards/layout.js +8 -40
  195. package/dist/forms/chip-group/chip-group.d.ts +5 -0
  196. package/dist/forms/chip-group/chip-group.js +3 -1
  197. package/dist/forms/combobox/combobox.js +1 -1
  198. package/dist/forms/copy-field/copy-field.js +1 -1
  199. package/dist/forms/date-picker/date-picker.d.ts +3 -1
  200. package/dist/forms/date-picker/date-picker.js +4 -2
  201. package/dist/forms/date-picker/date-time-picker.d.ts +8 -2
  202. package/dist/forms/date-picker/date-time-picker.js +13 -2
  203. package/dist/forms/field/field.d.ts +9 -2
  204. package/dist/forms/field/field.js +18 -4
  205. package/dist/forms/fieldset/fieldset.d.ts +11 -0
  206. package/dist/forms/fieldset/fieldset.js +12 -0
  207. package/dist/forms/fieldset/index.d.ts +1 -0
  208. package/dist/forms/fieldset/index.js +4 -0
  209. package/dist/forms/form-footer/form-footer.d.ts +26 -0
  210. package/dist/forms/form-footer/form-footer.js +44 -0
  211. package/dist/forms/form-footer/index.d.ts +1 -0
  212. package/dist/forms/form-footer/index.js +4 -0
  213. package/dist/forms/form-grid/form-grid.d.ts +21 -4
  214. package/dist/forms/form-grid/form-grid.js +20 -3
  215. package/dist/forms/form-grid/index.d.ts +1 -1
  216. package/dist/forms/form-grid/index.js +6 -2
  217. package/dist/forms/form-section/form-section.d.ts +12 -0
  218. package/dist/forms/form-section/form-section.js +30 -0
  219. package/dist/forms/form-section/index.d.ts +1 -0
  220. package/dist/forms/form-section/index.js +4 -0
  221. package/dist/forms/index.d.ts +4 -0
  222. package/dist/forms/index.js +4 -0
  223. package/dist/forms/input/input.d.ts +6 -2
  224. package/dist/forms/input/input.js +6 -2
  225. package/dist/forms/internal/listbox-items.d.ts +1 -1
  226. package/dist/forms/internal/listbox-items.js +3 -2
  227. package/dist/forms/native-select/native-select.js +1 -1
  228. package/dist/forms/password-input/index.d.ts +1 -0
  229. package/dist/forms/password-input/index.js +1 -0
  230. package/dist/forms/password-input/password-input.d.ts +16 -0
  231. package/dist/forms/password-input/password-input.js +45 -0
  232. package/dist/forms/select/index.d.ts +1 -1
  233. package/dist/forms/select/select.d.ts +5 -2
  234. package/dist/forms/select/select.js +7 -2
  235. package/dist/forms/select-menu/select-menu.js +1 -1
  236. package/dist/forms/time-input/time-input.d.ts +4 -2
  237. package/dist/forms/time-input/time-input.js +3 -1
  238. package/dist/i18n/strings.d.ts +150 -0
  239. package/dist/i18n/strings.js +80 -2
  240. package/dist/icons/eye.d.ts +2 -0
  241. package/dist/icons/eye.js +11 -0
  242. package/dist/icons/graduation-cap.d.ts +2 -0
  243. package/dist/icons/graduation-cap.js +12 -0
  244. package/dist/icons/house.d.ts +2 -0
  245. package/dist/icons/house.js +11 -0
  246. package/dist/icons/index.d.ts +4 -0
  247. package/dist/icons/index.js +8 -0
  248. package/dist/icons/mail.d.ts +2 -0
  249. package/dist/icons/mail.js +11 -0
  250. package/dist/motion/count-up.d.ts +20 -0
  251. package/dist/motion/count-up.js +59 -0
  252. package/dist/motion/cross-fade.d.ts +21 -0
  253. package/dist/motion/cross-fade.js +86 -0
  254. package/dist/motion/index.d.ts +5 -0
  255. package/dist/motion/index.js +14 -0
  256. package/dist/motion/model.d.ts +15 -0
  257. package/dist/motion/model.js +68 -0
  258. package/dist/motion/motion-styles.d.ts +1 -0
  259. package/dist/motion/motion-styles.js +35 -0
  260. package/dist/motion/reveal.d.ts +37 -0
  261. package/dist/motion/reveal.js +69 -0
  262. package/dist/motion/use-enter-phase.d.ts +11 -0
  263. package/dist/motion/use-enter-phase.js +40 -0
  264. package/dist/motion/use-highlight-row.d.ts +22 -0
  265. package/dist/motion/use-highlight-row.js +38 -0
  266. package/dist/navigation/tabs/tabs.js +1 -1
  267. package/dist/navigation/wizard/wizard.d.ts +4 -1
  268. package/dist/navigation/wizard/wizard.js +3 -0
  269. package/dist/overlays/alert-dialog/alert-dialog.js +8 -1
  270. package/dist/overlays/context-menu/context-menu.js +3 -1
  271. package/dist/overlays/dialog/dialog.js +10 -2
  272. package/dist/overlays/drawer/drawer.d.ts +18 -4
  273. package/dist/overlays/drawer/drawer.js +53 -4
  274. package/dist/overlays/drawer/index.d.ts +1 -1
  275. package/dist/overlays/dropdown-menu/dropdown-menu.d.ts +1 -1
  276. package/dist/overlays/dropdown-menu/dropdown-menu.js +5 -4
  277. package/dist/overlays/hover-card/hover-card.js +2 -0
  278. package/dist/overlays/popover/popover.js +2 -0
  279. package/dist/overlays/toaster/index.d.ts +1 -1
  280. package/dist/overlays/toaster/toaster.d.ts +28 -2
  281. package/dist/overlays/toaster/toaster.js +73 -29
  282. package/dist/overlays/tooltip/tooltip.js +2 -0
  283. package/dist/primitives/use-presence.js +9 -0
  284. package/dist/shell/app-shell/app-shell.d.ts +8 -1
  285. package/dist/shell/app-shell/app-shell.js +50 -3
  286. package/dist/shell/index.d.ts +1 -0
  287. package/dist/shell/index.js +1 -0
  288. package/dist/shell/sidebar/sidebar.d.ts +17 -1
  289. package/dist/shell/sidebar/sidebar.js +126 -76
  290. package/dist/shell/topbar/topbar.d.ts +4 -2
  291. package/dist/shell/topbar/topbar.js +2 -0
  292. package/dist/showcase/operations-bento.js +2 -2
  293. package/dist/states/empty-state/empty-state.d.ts +10 -3
  294. package/dist/states/empty-state/empty-state.js +46 -5
  295. package/dist/states/error-state/error-state.js +1 -1
  296. package/dist/states/skeleton/skeleton.js +1 -1
  297. package/dist/utils/class-tokens.generated.js +4 -6
  298. package/dist/utils/list-navigation.d.ts +14 -0
  299. package/dist/utils/list-navigation.js +44 -0
  300. package/dist/utils/overlay-motion.d.ts +12 -0
  301. package/dist/utils/overlay-motion.js +14 -0
  302. package/dist/utils/use-container-width.d.ts +6 -0
  303. package/dist/utils/use-container-width.js +19 -0
  304. package/icons/svg/eye.svg +4 -0
  305. package/icons/svg/graduation-cap.svg +5 -0
  306. package/icons/svg/house.svg +4 -0
  307. package/icons/svg/mail.svg +4 -0
  308. package/package.json +2 -2
  309. package/scripts/build-theme.mjs +46 -5
  310. package/src/ai/code-block/code-block.tsx +1 -1
  311. package/src/atoms/big-date/big-date.tsx +2 -2
  312. package/src/atoms/button/button.tsx +33 -6
  313. package/src/atoms/chip/chip.tsx +8 -3
  314. package/src/atoms/divider/divider.tsx +40 -0
  315. package/src/atoms/divider/index.ts +1 -0
  316. package/src/atoms/icon-button/icon-button.tsx +2 -2
  317. package/src/atoms/index.ts +1 -0
  318. package/src/atoms/internal/hit-area.ts +5 -4
  319. package/src/atoms/progress/index.ts +8 -1
  320. package/src/atoms/progress/progress.tsx +30 -1
  321. package/src/atoms/radio-group/radio-group.tsx +1 -1
  322. package/src/atoms/status-pill/status-pill.tsx +59 -18
  323. package/src/auth/auth-illustration/auth-illustration.tsx +100 -0
  324. package/src/auth/auth-illustration/index.ts +8 -0
  325. package/src/auth/auth-illustration/look.ts +32 -0
  326. package/src/auth/auth-illustration/model.ts +330 -0
  327. package/src/auth/auth-illustration/use-art-pointer.ts +78 -0
  328. package/src/auth/auth-layout/auth-layout.tsx +282 -0
  329. package/src/auth/auth-layout/index.ts +1 -0
  330. package/src/auth/character/character.tsx +346 -0
  331. package/src/auth/character/index.ts +1 -0
  332. package/src/auth/index.ts +4 -0
  333. package/src/auth/internal/auth-context.ts +26 -0
  334. package/src/auth/internal/auth-styles.tsx +39 -0
  335. package/src/auth/internal/portal-glyphs.tsx +32 -0
  336. package/src/auth/login-form/context.ts +78 -0
  337. package/src/auth/login-form/index.ts +21 -0
  338. package/src/auth/login-form/login-form.tsx +330 -0
  339. package/src/auth/login-form/parts.tsx +457 -0
  340. package/src/auth/looks/auth-illustration-any.tsx +38 -0
  341. package/src/auth/looks/index.ts +1 -0
  342. package/src/auth/mosaic/index.ts +1 -0
  343. package/src/auth/mosaic/mosaic.tsx +255 -0
  344. package/src/auth/slabs/index.ts +1 -0
  345. package/src/auth/slabs/slabs.tsx +181 -0
  346. package/src/auth/stack/index.ts +1 -0
  347. package/src/auth/stack/stack.tsx +267 -0
  348. package/src/auth/statement/index.ts +1 -0
  349. package/src/auth/statement/statement.tsx +122 -0
  350. package/src/brand/logo-forge.tsx +1 -1
  351. package/src/charts/candlestick-chart/candlestick-chart.tsx +2 -2
  352. package/src/charts/chart-grid/chart-grid.tsx +2 -2
  353. package/src/charts/chord-chart/chord-chart.tsx +1 -1
  354. package/src/charts/core/axes.tsx +2 -2
  355. package/src/charts/core/cartesian/annotations.tsx +2 -2
  356. package/src/charts/core/cartesian/marks.tsx +1 -1
  357. package/src/charts/core/distribution/marks.tsx +1 -1
  358. package/src/charts/core/distribution/xy-points.tsx +1 -1
  359. package/src/charts/core/export-menu.tsx +1 -1
  360. package/src/charts/funnel-chart/funnel-chart.tsx +1 -1
  361. package/src/charts/gantt-chart/gantt-chart.tsx +4 -4
  362. package/src/charts/gantt-chart/gantt-marks.tsx +3 -3
  363. package/src/charts/index.ts +2 -0
  364. package/src/charts/maps/geo/map-data-table.tsx +1 -1
  365. package/src/charts/polar-area-chart/polar-area-chart.tsx +1 -1
  366. package/src/charts/radar-chart/radar-chart.tsx +1 -1
  367. package/src/charts/stock-chart/stock-chart.tsx +1 -1
  368. package/src/charts/stock-chart/stock-drawing-layer.tsx +3 -3
  369. package/src/charts/stock-chart/stock-plot.tsx +2 -2
  370. package/src/containers/chat-thread/chat-thread.tsx +331 -0
  371. package/src/containers/chat-thread/format.ts +67 -0
  372. package/src/containers/chat-thread/index.ts +12 -0
  373. package/src/containers/cols/cols.tsx +13 -1
  374. package/src/containers/comment/comment.tsx +1 -1
  375. package/src/containers/context-rail/context-rail.tsx +229 -0
  376. package/src/containers/context-rail/index.ts +7 -0
  377. package/src/containers/dashboard/dashboard.tsx +142 -0
  378. package/src/containers/dashboard/index.ts +12 -0
  379. package/src/containers/data-grid/data-grid.demos.tsx +4 -4
  380. package/src/containers/data-grid/data-grid.tsx +6 -6
  381. package/src/containers/data-grid/filter-builder-editor.tsx +2 -2
  382. package/src/containers/data-grid/grid-toolbar.tsx +1 -1
  383. package/src/containers/data-grid/spreadsheet.demos.tsx +1 -1
  384. package/src/containers/detail-header/detail-header.tsx +64 -0
  385. package/src/containers/detail-header/index.ts +5 -0
  386. package/src/containers/facts/facts.tsx +1 -1
  387. package/src/containers/filter-bar/filter-bar.tsx +201 -0
  388. package/src/containers/filter-bar/index.ts +7 -0
  389. package/src/containers/hbars/hbars.tsx +2 -2
  390. package/src/containers/index.ts +9 -0
  391. package/src/containers/kanban/kanban.tsx +146 -39
  392. package/src/containers/kanban/model.ts +20 -0
  393. package/src/containers/kpi/kpi.tsx +1 -1
  394. package/src/containers/kpi-group/kpi-group.tsx +17 -2
  395. package/src/containers/list-detail/index.ts +5 -0
  396. package/src/containers/list-detail/list-detail.tsx +157 -9
  397. package/src/containers/page/page.tsx +61 -7
  398. package/src/containers/page-header/back.tsx +42 -0
  399. package/src/containers/page-header/index.ts +1 -0
  400. package/src/containers/page-header/page-header.tsx +49 -3
  401. package/src/containers/pagination/cursor-pagination.tsx +79 -0
  402. package/src/containers/pagination/index.ts +7 -0
  403. package/src/containers/pagination/pagination.tsx +266 -0
  404. package/src/containers/pagination/range.ts +68 -0
  405. package/src/containers/pagination/use-pagination.ts +44 -0
  406. package/src/containers/responsive-list/responsive-list.tsx +183 -46
  407. package/src/containers/row-actions/index.ts +1 -0
  408. package/src/containers/row-actions/row-actions.tsx +114 -0
  409. package/src/containers/selectable-card/index.ts +5 -0
  410. package/src/containers/selectable-card/selectable-card.tsx +84 -0
  411. package/src/containers/settings-layout/settings-layout.tsx +104 -13
  412. package/src/containers/shortcuts/shortcuts.tsx +1 -1
  413. package/src/containers/table/cell-padding.ts +2 -0
  414. package/src/containers/table/index.ts +6 -0
  415. package/src/containers/table/sort.ts +23 -0
  416. package/src/containers/table/table-parts.tsx +81 -0
  417. package/src/containers/table/table.tsx +212 -45
  418. package/src/containers/table-columns-menu/index.ts +5 -0
  419. package/src/containers/table-columns-menu/table-columns-menu.tsx +68 -0
  420. package/src/dashboards/layout.tsx +8 -75
  421. package/src/forms/chip-group/chip-group.tsx +8 -1
  422. package/src/forms/combobox/combobox.tsx +1 -1
  423. package/src/forms/copy-field/copy-field.tsx +1 -1
  424. package/src/forms/date-picker/date-picker.tsx +7 -2
  425. package/src/forms/date-picker/date-time-picker.tsx +28 -2
  426. package/src/forms/field/field.tsx +30 -3
  427. package/src/forms/fieldset/fieldset.tsx +22 -0
  428. package/src/forms/fieldset/index.ts +1 -0
  429. package/src/forms/form-footer/form-footer.tsx +74 -0
  430. package/src/forms/form-footer/index.ts +1 -0
  431. package/src/forms/form-grid/form-grid.tsx +42 -5
  432. package/src/forms/form-grid/index.ts +8 -1
  433. package/src/forms/form-section/form-section.tsx +41 -0
  434. package/src/forms/form-section/index.ts +1 -0
  435. package/src/forms/index.ts +4 -0
  436. package/src/forms/input/input.tsx +12 -3
  437. package/src/forms/internal/listbox-items.tsx +3 -4
  438. package/src/forms/native-select/native-select.tsx +1 -1
  439. package/src/forms/password-input/index.ts +1 -0
  440. package/src/forms/password-input/password-input.tsx +57 -0
  441. package/src/forms/select/index.ts +1 -1
  442. package/src/forms/select/select.tsx +14 -3
  443. package/src/forms/select-menu/select-menu.tsx +1 -1
  444. package/src/forms/time-input/time-input.tsx +6 -2
  445. package/src/i18n/strings.ts +150 -0
  446. package/src/icons/eye.tsx +12 -0
  447. package/src/icons/graduation-cap.tsx +13 -0
  448. package/src/icons/house.tsx +12 -0
  449. package/src/icons/index.ts +4 -0
  450. package/src/icons/mail.tsx +12 -0
  451. package/src/motion/count-up.tsx +83 -0
  452. package/src/motion/cross-fade.tsx +139 -0
  453. package/src/motion/index.ts +5 -0
  454. package/src/motion/model.ts +86 -0
  455. package/src/motion/motion-styles.tsx +47 -0
  456. package/src/motion/reveal.tsx +115 -0
  457. package/src/motion/use-enter-phase.ts +50 -0
  458. package/src/motion/use-highlight-row.ts +63 -0
  459. package/src/navigation/tabs/tabs.tsx +1 -1
  460. package/src/navigation/wizard/wizard.tsx +6 -1
  461. package/src/overlays/alert-dialog/alert-dialog.tsx +5 -1
  462. package/src/overlays/context-menu/context-menu.tsx +3 -2
  463. package/src/overlays/dialog/dialog.tsx +7 -2
  464. package/src/overlays/drawer/drawer.tsx +68 -6
  465. package/src/overlays/drawer/index.ts +1 -0
  466. package/src/overlays/dropdown-menu/dropdown-menu.tsx +5 -4
  467. package/src/overlays/hover-card/hover-card.tsx +2 -0
  468. package/src/overlays/popover/popover.tsx +2 -0
  469. package/src/overlays/toaster/index.ts +2 -0
  470. package/src/overlays/toaster/toaster.tsx +113 -17
  471. package/src/overlays/tooltip/tooltip.tsx +2 -0
  472. package/src/primitives/use-presence.ts +13 -0
  473. package/src/shell/app-shell/app-shell.tsx +54 -2
  474. package/src/shell/index.ts +1 -0
  475. package/src/shell/sidebar/sidebar.tsx +154 -75
  476. package/src/shell/topbar/topbar.tsx +8 -0
  477. package/src/showcase/operations-bento.tsx +2 -2
  478. package/src/states/empty-state/empty-state.tsx +52 -9
  479. package/src/states/error-state/error-state.tsx +1 -1
  480. package/src/states/skeleton/skeleton.tsx +1 -1
  481. package/src/utils/class-tokens.generated.ts +4 -6
  482. package/src/utils/list-navigation.ts +63 -0
  483. package/src/utils/overlay-motion.ts +33 -0
  484. package/src/utils/use-container-width.ts +24 -0
  485. package/styles/Theme.kt +15 -18
  486. package/styles/tailwind.css +29 -28
  487. package/styles/theme.css +29 -28
  488. package/styles/tokens.css +46 -0
  489. package/tokens/default.json +51 -29
package/CHANGELOG.md CHANGED
@@ -1,5 +1,439 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.6.0 (2026-10-30)
4
+
5
+ ### App shells, layout containers and adaptive density
6
+
7
+ Pieces a phone-first operations app kept patching in: a bottom bar the shell knows about, a side
8
+ rail that collapses to a sheet, selectable lists, a chat thread, density that follows the pointer,
9
+ and a product type scale. Additive except for the changes listed under "Changed".
10
+
11
+ #### Added
12
+
13
+ - **`AppShell` `bottomBar`**: phone navigation, usually a `BottomNav`. The shell renders it after
14
+ its children, fixed to the bottom edge and hidden from 900 px of shell width. While compact it
15
+ reserves the bar's height plus the safe-area inset at the bottom and publishes it as
16
+ `--app-bottom-bar` on the shell and on the document root.
17
+ - **`ContextRail`**, new in `@jcsoftdev/ui/containers` (also `/containers/context-rail`): a work area
18
+ with a sticky side rail (`stickyTop`, its own scroll). `width` is a number or `{ m, w, xw }`
19
+ (default 360 / 400 / 440 from 720 / 1280 / 1600 px of container width). Under `breakpoint` (720,
20
+ 960 or 1280; `"never"` keeps the rail beside the work area, `"always"` always collapses it) the
21
+ rail stacks below the work area, or with `collapse="sheet"` it is replaced by a `summary` bar that
22
+ opens it as a bottom sheet (`sheetOpen` / `onSheetOpenChange`, `sheetLabel`, `railLabel`). The
23
+ summary bar sticks at `bottom: var(--app-bottom-bar, 0px)`, above an `AppShell` bottom bar.
24
+ - **`ChatThread`**, new in `@jcsoftdev/ui/containers`: business chat with `customer` (incoming),
25
+ `bot` and `staff` (outgoing) authors, day separators (Today / Yesterday / date, by `timeZone`),
26
+ `note` items for system lines, optional delivery status (`sending`, `sent`, `delivered`, `read`,
27
+ `failed` with `onRetry`), a `composer` slot, an `empty` slot and a live `log` that stays at the
28
+ bottom. Texts come from `labels` (`chatThreadLabels.en` / `.es`). The `ai/` chat parts are
29
+ unchanged.
30
+ - **`SelectableCard`**, new in `@jcsoftdev/ui/containers`: a card that is itself one `button`. No
31
+ `selected` makes it a plain button; `selected` makes it a toggle (`aria-pressed`) or, with
32
+ `semantics="radio"`, a radio (`aria-checked`). `disabled` with `disabledReason` keeps it focusable
33
+ (`aria-disabled`), ignores clicks and announces the reason.
34
+ - **`ResponsiveList` selection and layout**: `onSelect` with `selectedKey` makes rows selectable
35
+ (click, Enter, Space; arrows, Home and End move focus; `selectOnFocus` selects as well), with one
36
+ tab stop per list. Without `renderActions` the cards are a `listbox` of `option`s and the table a
37
+ `grid` with `aria-selected`; with it the rows keep list and table semantics and the selected one
38
+ has `aria-current="true"`. `layout="cards"` always renders cards (a list in a narrow pane);
39
+ `breakpoint` (480, 640, 672, 768, 960 or 1280; default 672, the previous 42rem) sets the
40
+ container width where the table starts; `cardLabels="hidden"` keeps the field labels for screen
41
+ readers only. Lists without these props render as before.
42
+ - **`Cols variant="thirds"`**: three equal columns from 1280 px of `page` width, two from 720 px (an
43
+ odd last item spans both) and one below. The other variants keep their 940 / 1080 / 1500 px cuts.
44
+ - **Container breakpoint tokens** (`@jcsoftdev/ui-tokens`): the optional `containers` section of a
45
+ token file emits `--container-<name>` widths in `theme.css`; `tokens/default.json` ships
46
+ `page-m` 720, `page-w` 1280 and `page-xw` 1600 (`@min-page-w/page:`). Files without the section
47
+ build byte-identically.
48
+ - **`data-density="auto"`** (opt-in, `@jcsoftdev/ui-tokens`): `normal` values on a fine pointer and
49
+ `touch` values under `@media (pointer: coarse)`, CSS only. An explicit level on a subtree still
50
+ wins. Token files set both sides with `styles.density.auto` (`{ "fine", "coarse" }`, level ids)
51
+ or omit it; `auto` is reserved as a level id.
52
+ - **`--touch` token** (0, or 1 under `touch` and under `auto` on a coarse pointer), from the new
53
+ `styles.density.fixed` list of density tokens that are not scaled.
54
+ - **`Kanban`**: `cardActions` renders real buttons under each card (the card is no longer a
55
+ `role="button"` wrapper and keyboard pick-up moves to a grip button named by `gripLabel`);
56
+ `cardGrid` lays a lane's cards out as a grid once the lane is 30rem wide (`cardGridMinWidth`,
57
+ default 224 px), with drops in reading order (`dropIndexGrid` in `model.ts`); `draggable={false}`
58
+ makes a display-only board with no grip, no pick-up and no drag instructions. Boards without
59
+ these props are unchanged.
60
+ - **`DrawerContent` `side="bottom"`**: a bottom sheet across the width, padded by the safe-area
61
+ inset, capped at 85dvh with its own scroll, sliding up (`SHEET_MOTION`). `handle` adds a
62
+ decorative grab handle; dragging it down closes the sheet unless `blocking`. New `handle` part and
63
+ `DrawerSide` type. `side="right"` (default) is unchanged.
64
+ - **`Sidebar` collapsible groups**: `collapsible`, `defaultCollapsed` and controlled `collapsed` /
65
+ `onCollapsedChange` on a group. The label becomes a toggle (`aria-expanded`, `aria-controls`); a
66
+ group holding the active page starts open, and an uncontrolled group opens when one of its items
67
+ becomes active later. The rail (`collapsed` sidebar) keeps every item visible. New `groupToggle`
68
+ and `groupItems` parts.
69
+ - **`Toaster`**: `offset` (px, a CSS length, or `{ x, y }`) and `position` per viewport width
70
+ (`{ base, sm?, lg? }`, from 640 / 1024 px). Bottom positions without an explicit `offset.y` clear
71
+ the `AppShell` bottom bar (`--app-bottom-bar + 1rem`).
72
+ - **`SettingsLayout` / `SettingsLayoutNav` `breakpoint`** (720, 940, 1080 or 1280; default 940, or
73
+ `"never"`) and `container="self"` to measure its own `@container/settings`. The component is now a
74
+ client component.
75
+ - **`Progress` / `Meter` `tone`** (`accent` default, `neutral`, `success`, `warning`, `danger`,
76
+ `info`, or a `tonePalettes` name); non-default tones set `data-tone` on the root.
77
+ - **`KpiGroup` `minColumns={2}`**: two tiles across on the narrowest containers (an odd last tile
78
+ spans both); with `layout="auto-fit"` it never goes under two columns.
79
+ - **`Topbar` `start`**: a slot between the menu button and the breadcrumbs; new `start` part.
80
+ - **`StatusPill`**: `icon` (decorative, hidden from screen readers), `dot` (default `true` without
81
+ `icon`, `false` with one) and `collapseLabel` (hides the label under 700 px of container width).
82
+
83
+ #### Changed
84
+
85
+ - **Type scale (breaking, visual)**: product text is one tighter scale and no mobile role exceeds
86
+ its desktop counterpart. Density never changes text size.
87
+
88
+ | Role | Before | After |
89
+ | --- | --- | --- |
90
+ | `kpi-number` | 30 / 1.15 / -0.03em | 24 / 1.2 / -0.025em |
91
+ | `page-title` | 26 / 1.18 / -0.025em | 22 / 1.25 / -0.02em |
92
+ | `card-title` | 14 / 1.5 | 15 / 1.4 |
93
+ | `lede` | 14.5 | 14 |
94
+ | `row-title` | 13.5 | 14 |
95
+ | `meta` | 12.5 | 12 |
96
+ | `data` | 12.5 / 1.6 | 13 / 1.5 |
97
+ | `clock` | 17 | 16 |
98
+ | `m-title` | 34 / 41px | 22 / 1.25 / -0.02em |
99
+ | `m-card-title` | 26 / 1.1 | 20 / 1.2 / -0.015em |
100
+ | `m-row-title`, `m-button` | 15.5 | 15 |
101
+
102
+ `dialog-title`, `body`, `control`, `chip-text`, `overline`, `count`, `m-body` and `m-meta` keep
103
+ their sizes. The size-only steps (`text-fs-*`) go from 14 to 10: `fs-100`, `110`, `120`, `130`,
104
+ `140`, `150`, `160`, `200`, `240`, `440`. Removed steps map to the nearest survivor: `fs-95` to
105
+ `fs-100`, `fs-105` to `fs-110`, `fs-115` and `fs-125` to `fs-120`, `fs-220` to `fs-200`, `fs-300`
106
+ to `fs-240`. Components moved to the new steps (the small `Button` and the pagination, filter bar
107
+ and columns-menu texts 12.5 to 12 px; the small `Chip` 11.5 to 12 px; `DetailHeader` and the narrow `Kpi` 22 to 20 px; `BigDate`
108
+ 30 / 22 to 24 / 20 px; chart and grid micro-text to the 10 / 11 / 12 steps). Compose
109
+ `UiFontSizes` loses `fs95`, `fs105`, `fs115`, `fs125`, `fs220` and `fs300` and gains `fs200` and
110
+ `fs240`.
111
+ - **`StatusPill` (breaking)**: without `onSelect` or `onClick` it renders a plain `span` instead of
112
+ a disabled `button`; `interactive` forces either element. Its label stays visible at every width
113
+ unless `collapseLabel` is set (it used to hide under 700 px unconditionally), and a pill with an
114
+ `icon` no longer repeats the status as icon plus dot.
115
+ - **Touch sizing reads tokens, not an ancestor selector**: `Checkbox`, `Switch`, `RadioGroup`
116
+ rows, `Chip` (interactive and removable), `ChipGroup`, `Shortcuts`, the `Dialog` and `Drawer` close
117
+ buttons, `SettingsLayout` nav items, `Sidebar` links, `Tabs` triggers, `DropdownMenu` items and the
118
+ `Skeleton` list rows read `--touch-target` or `--touch` instead of `in-data-[density=touch]:`, so
119
+ they follow the nearest density level, `auto` included. `Sidebar` links, `Tabs` triggers,
120
+ `DropdownMenu` items and `SettingsLayout` nav items now reach 44 px under touch. Default density
121
+ renders the same sizes as before.
122
+ - **`Toaster`**: the action button shows its focus ring on `:focus-visible` only.
123
+
124
+ #### Migration
125
+
126
+ - Replace any `text-fs-95`, `-105`, `-115`, `-125`, `-220` or `-300` class with the step above, and
127
+ drop overrides of the removed `--text-fs-*` names.
128
+ - A `StatusPill` used as a button needs `onSelect`, `onClick` or `interactive`; pass
129
+ `collapseLabel` to keep the old icon-only look on narrow containers.
130
+ - To get the bottom bar reservation, move a `BottomNav` from the page column to `AppShell`'s
131
+ `bottomBar`.
132
+
133
+ ### Control sizes, table density, row actions and pagination
134
+
135
+ One height per control size, a denser and steadier table, and the row and paging parts an app used to
136
+ patch in. Additive except for the visual changes listed under "Changed".
137
+
138
+ #### Added
139
+
140
+ - **`--control-height-md` token** (`@jcsoftdev/ui-tokens`, Tailwind `h-control-md` / `w-control-md`):
141
+ 38px, scaled by `data-density` like the other control heights and 48px under `touch`, the same as
142
+ `--input-height`. With `--control-height-sm` (30px) it is the one height of each control size.
143
+ - **`size` on every field** (`"sm"` 30px, `"md"` 38px, default `md`): new on `Select`, `DatePicker`,
144
+ `TimeInput` and `DateTimePicker` (which passes it to both halves); `Input` gains `sm` (the same as
145
+ `xs`, which stays). `Button`, `IconButton`, `Input`, `Select`, `SelectMenu`, `NativeSelect`,
146
+ `Combobox`, `DatePicker`, `DateTimePicker` and `TimeInput` now render the same token per size
147
+ (`h-control-sm`, `h-control-md`), so they line up in a toolbar or a table row. Story:
148
+ `Forms/Control sizes` measures them.
149
+ - **`DateTimePicker` `classNames` reach the inner parts**: new parts `dateInput`, `clear`, `trigger`,
150
+ `content`, `calendar` (the inner `DatePicker`) and `timeInput`.
151
+ - **`Wizard` `buttonSize`** (default `"md"`): size of the Back and Next/Finish buttons, which now
152
+ reach the 38px md height of a field (they followed `Button` md, 36px, before).
153
+ - **`Table` `density`** (`"comfortable"` default, `"compact"`): every body row is at least 48px or
154
+ 40px (`--row-min-h`), whatever its cells hold, with cells centred vertically and their vertical
155
+ padding from `--table-cell-py` (8px or 4px). Both variables can be overridden with `className` or
156
+ `style`. The table carries `data-table-density`.
157
+ - **`Table` `stickyActions`**: the last column (the row actions) sticks to the right edge while the
158
+ table scrolls sideways, from 24rem of the table's own width; its row divider is redrawn and an edge
159
+ shadow shows while columns are hidden underneath.
160
+ - **`RowActions`, new in `@jcsoftdev/ui/containers`** (also `/containers/row-actions`): one row's
161
+ actions as at most one inline `primary` action plus an overflow menu (`DropdownMenu`) behind a 30px
162
+ "more" `IconButton`. Required `label` names the trigger; `items` are
163
+ `{ id, label, onSelect, icon?, tone?: "default" | "danger", disabled? }`, with `danger` items sorted
164
+ last behind a separator. It never wraps, renders no trigger without items, and stops click and key
165
+ events from reaching the row (portaled menu included). Exported types `RowActionItem`,
166
+ `RowActionsProps`. It brings the menu primitive into the `containers` barrel, which grows by about
167
+ 4 kB gzip for apps that import the whole barrel; `@jcsoftdev/ui/containers/table` does not include it.
168
+ - **`Pagination` `variant="pages"`**: the range as "Showing 1–25 of 134" ("Mostrando 1–25 de 134"),
169
+ then Previous, page number buttons (`aria-current="page"` on the current one, gaps on long lists)
170
+ and Next, all 30px `Button`s. It renders nothing on a single page (`hideOnSinglePage`, default
171
+ `true` for this variant and `false` for the default one) and shows the page size picker only when
172
+ `pageSizeOptions` is passed. New `labels` keys `showing`, `previousLabel`, `nextLabel`,
173
+ `pageNumber`. The default variant is unchanged.
174
+ - **`CursorPagination`**, new in `@jcsoftdev/ui/containers`: server-side cursor paging with an unknown
175
+ total. `page`, `count` (rows on this page), `pageSize` (default 25), `hasNext`, `onPrevious`,
176
+ `onNext`, `labels`. Shows "Showing 26–50" and Previous / Next; renders nothing on a first page
177
+ without a next cursor.
178
+ - **`usePagination(rows, resetKey?, pageSize = 25)`**, new in `@jcsoftdev/ui/containers`: client-side
179
+ paging returning `{ page, pageCount, total, pageSize, items, setPage }`; the page is clamped when
180
+ the list shrinks and returns to 1 when `resetKey` changes. Type `PaginationState`.
181
+ - **New UI strings** (en, es): `showingRange`, `showingRangeOpen`, `previous`, `pageNumber`. They grow
182
+ every entry that carries the string table by a few dozen bytes gzip.
183
+ - **`ChipGroup` `size`**: `"sm"` (default, 30px minimum) or `"md"` (38px minimum).
184
+
185
+ #### Changed
186
+
187
+ - **`Button` and `IconButton` `size="md"` (the default) are 38px instead of 36px** (`h-control-md`,
188
+ `w-control-md`), so a default button lines up with a default field. `sm` (30px) and `lg` (52px) are
189
+ unchanged. `--control-height` (36px) still exists for code that uses it directly.
190
+ - **Fields at `md` use `h-control-md` instead of `h-input`.** Same 38px in every density, so nothing
191
+ moves; a `className` that overrode `h-input` on these controls still wins through `cn`.
192
+ - **`DatePicker` clear and calendar buttons have a 30px hit area** (`min-h-control-sm`); the glyphs
193
+ stay where they were.
194
+ - **Chips meet the 30px hit area.** `ChipGroup` chips grow from 28px to 30px (`min-h-control-sm`,
195
+ replacing `min-h-7`). A `Chip` with `onClick` or `role="button"` is at least 30px tall at either
196
+ `size`; a display chip (and one with only `onRemove`) keeps its 24px or content height.
197
+ - **Table rows have a steady height.** With the default `comfortable` density a body row is at least
198
+ 48px and body cells pad 8px vertically instead of 11px: a one-line text row grows from about 41px
199
+ to 48px, and a row holding a 30px button shrinks from about 52px to 48px, so both match. Rows
200
+ taller than that (wrapped text) lose 6px. Pass `density="compact"` for 40px rows. Header cells are
201
+ unchanged. Cells rendered outside a `Table` keep the former 11px.
202
+ - **`Dialog` and `Drawer` close button is a 30px square** (`size-control-sm`, 44px under touch as
203
+ before) instead of a 24px one. It is centred on the same point, so the X glyph does not move.
204
+ - **Type change: `Select` and `TimeInput` no longer accept the native numeric `size` attribute**; `size`
205
+ is now the control size. A native `<select size={n}>` list box was never styled by `Select` (it
206
+ draws a single-line trigger with a chevron); use a plain `<select>` for that.
207
+
208
+ ### Overlay enter and exit motion
209
+
210
+ #### Changed
211
+
212
+ - **Overlays animate in and out.** `DropdownMenu` content and submenus, `ContextMenu` content, `Popover`,
213
+ the `SelectMenu` and `Combobox` listbox, `Tooltip` and `HoverCard` fade in while they
214
+ grow from 96% at their anchor (`transform-origin: var(--ui-popper-transform-origin)`) and slide 4px
215
+ in from the side they open on (`data-side`). `Dialog` and `AlertDialog` fade and settle from 97%;
216
+ `Drawer` slides in from the right; the scrim fades. The exit is the reverse at two thirds of the
217
+ duration and plays before the node unmounts. Timing is `--motion-duration` (180ms by default) and
218
+ `--motion-ease` from the theme, so style presets and `[data-motion]` retune it;
219
+ `prefers-reduced-motion: reduce` turns it off and unmounts at once. Enter uses `@starting-style`,
220
+ so it needs no stylesheet beyond what consumers already compile: `@jcsoftdev/ui/styles/tokens.css`,
221
+ `@jcsoftdev/ui/styles/theme.css` and the `@source` for the package's `dist`.
222
+ - **Menu items and listbox options fade their highlight** (120ms at the default duration). **Table
223
+ rows fade their hover background**, a sticky actions cell follows it, and the `RowActions` "more"
224
+ glyph is muted until its row is hovered or focused on devices that hover (never hidden).
225
+ - **Exit waits for the longest effect.** `usePresence` used to unmount on the first exit-relevant
226
+ `transitionend`/`animationend`; it now waits until no exit animation or transition on the node is
227
+ still running, so a consumer's own longer exit animation is not cut short by the built-in one.
228
+ - **Tests that query an overlay right after opening it in a real browser** may see it at opacity 0
229
+ (`toBeVisible()` from jest-dom fails) or still mounted for a moment after closing; wrap those
230
+ assertions in `waitFor`. jsdom and Playwright's `toBeVisible` are unaffected. The `forms`,
231
+ `overlays` and `shell` entries grow by a few hundred bytes gzip.
232
+
233
+ ### Page structure (G1, G4, G9, G10)
234
+
235
+ Additive; every new prop defaults to the previous behavior unless noted.
236
+
237
+ - **`ListDetail` (G1).** New `listWidth` (fixed list rail, number = px or any CSS length), `ratio`
238
+ (`1:1` default, `1:2`, `1:3`), `surface` (`flat` default, `card`), `stickyList` and `stickyOffset`
239
+ (the list column stays in view and scrolls on its own from 641px of the component's width). New
240
+ parts `ListDetailHeader` (`count`; search, filter chips and a result count above the list, passed as
241
+ `ListDetailList` `header`) and `ListDetailEmpty` (detail placeholder while nothing is selected).
242
+ Default look is unchanged. Markup change to check: `ListDetailList` now renders a column wrapper
243
+ (`data-list-detail-pane="list"`, carrying the divider and the hide-when-detail classes) around the
244
+ `ul`; the `ul` keeps its `aria-label`, `className` and props, but `list.parentElement` is no longer
245
+ the grid.
246
+ - **`PageHeader` (G4).** New slots `back` (with the new `PageHeaderBack` link: `href` or `asChild`,
247
+ localized "Back" label by default), `meta` (wrapping row of chips and facts) and `tabs` (full-width
248
+ `TabsNav` or `Tabs` list under the title), plus `sticky` and `stickyOffset` (the header, tabs
249
+ included, stays at the top of its scroll container on the page background). Without them the
250
+ header renders as before.
251
+ - **`Page` (G9).** New `aside` (a rail beside the content; 20rem by default, `asideWidth` to change
252
+ it, `asideSticky` to keep it in view), with the rail falling under the content at 1000px of page
253
+ width or less. The rail does not change the width the `page` container measures, so `Cols` inside
254
+ react the same with or without it. Without `aside` the markup is unchanged. `PageProps` is now an
255
+ interface extending the div props.
256
+ - **`DetailHeader` (G10), new in `@jcsoftdev/ui/containers`.** Record header for applicant, person and
257
+ student screens: `avatar`, `name` (heading, `headingLevel` default 2), `status`, `subtitle`,
258
+ `facts` (a `Facts` list) and `actions`; the actions wrap under the name from 480px of its own width
259
+ down.
260
+
261
+ ### Forms and empty states (G2, G7)
262
+
263
+ Additive and source compatible; no default changed. New UI strings `save` and `unsavedChanges` (en, es).
264
+
265
+ #### Added
266
+
267
+ - **Forms.** `FormSection` (`title`, `description`: the title column sits beside the fields from
268
+ 640px of container width and stacks above them in a narrower container), `Fieldset` (`legend`,
269
+ `description`, a native `fieldset`) and `FormFooter` (sticky by default; `onCancel`,
270
+ `cancelLabel`, `submitLabel`, `submitDisabled`, `dirty` for an "Unsaved changes" hint in a status
271
+ region, `busy` for a submit that stays focusable but inert and a disabled cancel). Typical form:
272
+ `Form > FormSection > FormGrid > Field`, then `FormFooter`.
273
+ - **`FormGrid` `columns` and `FormGridItem`.** `columns` 1 to 3 (default `2`, as before): 2 columns
274
+ from 620px and 3 from 900px of container width. `FormGridItem` `span` (1, 2, 3 or `"full"`) never
275
+ adds a column the grid does not have.
276
+ - **`Field` `required` and `disabled`.** `required` adds a visible `*` (hidden from assistive
277
+ tech) and `aria-required` on the control; native validation stays off. `disabled` disables the
278
+ control and mutes the label. Both reach the control the same way `error` does, also in a
279
+ multi-child field. New `required` part for `classNames`.
280
+ - **`EmptyState`.** `size="sm"` is an inline row (icon, title, description, action) to replace a
281
+ muted one-line paragraph. `icon` also takes `"inbox"`, `"search"` or `"lock"` (exported type
282
+ `EmptyStateIconName`) for a default domain icon; a node still works as before.
283
+
284
+ ### Data and dashboards (G3, G5, G6, G11)
285
+
286
+ Additive and source compatible, except for the barrel growth noted below. Guide: `/docs/data-and-dashboards/`.
287
+
288
+ #### Added
289
+
290
+ - **Dashboard blocks** (`@jcsoftdev/ui/containers`). `DashboardPage`, `KpiRow`, `CardGrid` (`columns` 2 or 3),
291
+ `ChartCard` (`height`) and `TableCard`, promoted from the stories. `KpiRow` is a named `group`;
292
+ `ChartCard` and `TableCard` are `section` landmarks named by their title (`headingLevel` 2 to 4).
293
+ Grids answer to the `page` container, never the viewport.
294
+ - **Sortable `Table`.** `TableHeaderCell sortable` (with a `columnId`) cycles ascending, descending and off
295
+ and reports `aria-sort`; `Table` takes `sort`, `defaultSort` and `onSortChange` (`TableSort`,
296
+ `nextTableSort`, `ariaSortFor`). The table reports the state, the app sorts the rows.
297
+ - **`TableEmpty`, `TableLoading` and column visibility.** `TableEmpty` is a row with an `EmptyState`
298
+ across `colSpan` columns; `TableLoading` renders placeholder rows with one status announcement;
299
+ `Table hiddenColumns` drops columns by `columnId` and `TableColumnsMenu` is the checkbox picker.
300
+ - **`Pagination`.** Standalone footer (1-based `page` and `pageSize`, controlled or not, `pageSizeOptions`,
301
+ `total`, `labels`) with the range text, first, previous, next and last buttons. `DataGrid` keeps its own.
302
+ - **`FilterBar`.** Search, `quickFilters` chips, a "More filters" popover (its `children`), removable
303
+ `activeFilters` chips, `onClearAll`, `resultCount` (polite status) and an `actions` slot. Under 40rem of
304
+ its own container width the chips and extra filters fold into one "Filters" button.
305
+ - **UI strings.** `tableEmpty`, `columns`, `pagination`, `rowsPerPage`, `pageRange`, `firstPage`,
306
+ `previousPage`, `nextPage`, `lastPage`, `search`, `filters`, `moreFilters`, `clearAllFilters`,
307
+ `removeFilter`, `activeFilters`, `resultOne` and `resultMany` (en and es). A custom `UiStrings` object
308
+ must add them to type-check.
309
+
310
+ #### Fixed
311
+
312
+ - **Exports.** `BottomNav` (and its helpers) is now exported from `@jcsoftdev/ui/shell`, and
313
+ `BulletChart` and `LollipopChart` from `@jcsoftdev/ui/charts`; all three were implemented and
314
+ documented but missing from their barrels. The `shell` entry now includes `BottomNav` and its
315
+ `Drawer`, so it grows by about 6 kB gzip for apps that import the whole barrel.
316
+
317
+ ### Motion (G8)
318
+
319
+ New `@jcsoftdev/ui/motion` entry, additive, no new dependency. Guide: `/docs/motion/`.
320
+
321
+ #### Added
322
+
323
+ - **`Reveal`** (`delay`, `inView`, `asChild`): fades content in with a 6px rise on a client mount,
324
+ or when it first scrolls into view.
325
+ - **`Stagger`** (`delay`, `inView`, `maxStagger`, `as`): children enter one after another, a quarter
326
+ duration apart, with the whole sequence capped by `maxStagger` (default 1.5 durations).
327
+ - **`CrossFade`** (`contentKey`) and **`Presence`** (`present`): keyed swap for list-detail panes and
328
+ tab panels. The old content fades out on top, out of the layout, `aria-hidden` and `inert`; focus
329
+ inside it moves to the new content.
330
+ - **`CountUp`** (`value`, `formatter`, `from`): counts to its value with any `Intl.NumberFormat`-style
331
+ formatter (default: the UI strings locale); reads as the final value to assistive tech and
332
+ reserves the final width. Works as a `Kpi` `value`.
333
+ - **`useHighlightRow(keys?)`** returning `{ highlight, rowProps }`, plus **`MotionStyles`**: an
334
+ accent pulse on inserted rows (automatic from `keys`) and updated rows (`highlight(key)`).
335
+ - Every duration and easing comes from `--motion-duration` and `--motion-ease`; enter and leave
336
+ animate only `opacity` and `transform` (the pulse fades a background colour). Server HTML and
337
+ hydration never animate, reduced motion reaches each end state at once, and hidden states use
338
+ `opacity` only, so assistive tech keeps reading the content.
339
+
340
+ ## 0.5.0 (2026-10-23)
341
+
342
+ ### Busy buttons keep focus (behavior to check when upgrading)
343
+
344
+ - **`Button` and `IconButton` `loading`** no longer set the native `disabled` attribute. A busy
345
+ button stays focusable, so pressing it from the keyboard leaves focus on it instead of dropping
346
+ to `body`. It is exposed as `aria-disabled="true"` plus `aria-busy="true"` (the status region
347
+ still announces the loading text), it ignores clicks, Enter and Space, and a `type="submit"`
348
+ button does not submit its form, including the implicit submit from Enter in one of its fields.
349
+ The dimmed `disabled` look no longer applies while loading; the spinner or loading label stays
350
+ and the cursor turns to `progress` (a button with neither a `loadingLabel` nor a spinner child
351
+ shows no other visible change, so give it one). Passing `disabled` keeps the native attribute and the dimmed
352
+ look as before, also while loading. Check code that read `button.disabled` or tests that expect
353
+ `toBeDisabled()` on a loading button: they now see `aria-disabled` instead.
354
+
355
+ ### Sign-in screen
356
+
357
+ New `@jcsoftdev/ui/auth` entry, additive and source compatible. Colors come only from the theme
358
+ tokens, so dark mode and every `data-accent` apply without extra code. Guide: `/docs/auth/`.
359
+
360
+ #### Added
361
+
362
+ - **Auth.** `AuthLayout` (`layout` `split`, `split-reverse`, `centered`, driven by its own container
363
+ width; parts `.Brand`, `.Art`, `.Panel`, `.Footer`; controlled or uncontrolled `state`,
364
+ `progress` and `activeIndex`; `useAuthLayout`), `AuthIllustration` (isometric portal slabs that
365
+ react to `state`, `progress` and `activeIndex` with CSS only; under reduced motion each state
366
+ keeps its pose without moving) and `LoginForm` (parts `.Header`, `.Portals`, `.Identifier`, `.Password`, `.Error`,
367
+ `.Submit`, `.Footer`; async `onSubmit`, `loading`, `error`, `success`; drives the surrounding
368
+ layout and works standalone). A field left empty is reported under that field; a failed sign-in
369
+ shows as a callout from `.Error`, placed above the fields in the default composition.
370
+ - **Auth compositions.** `AuthLayout` `panel` (`paper`, `solid`: a solid themed side panel with an
371
+ open form on the other side), `LoginForm` `appearance` (`card`, `open`), `LoginForm.Options`
372
+ (remember me, reported as `remember`, plus a help slot) and `LoginForm.Providers` (a labelled slot,
373
+ no providers included), and `AuthIllustration` `look` as the plug-in point for further looks.
374
+ - **Illustration motion.** Pointer parallax (fine pointers only, one CSS variable write per
375
+ frame), a hop per keystroke, an overshooting entrance, a cheer and burst on success, and an
376
+ error that settles back to the password state after `ERROR_HOLD_MS` (1.1s). Only `transform`
377
+ and `opacity` animate; reduced motion jumps straight to each state's pose (spread at rest, flung
378
+ apart on an error, assembled with a still burst on success) and turns the parallax off, also when
379
+ the setting changes while the page is open.
380
+ - **`Stack` look (`@jcsoftdev/ui/auth/stack`).** A tower of books that gains a book as the form fills,
381
+ wobbles on an error and plants a flag with the active portal's glyph on success; 4, 5 or 6
382
+ books by the width of its container.
383
+ - **`Mosaic` look (`@jcsoftdev/ui/auth/mosaic`).** A floor of isometric tiles that lights diagonally with
384
+ progress, glints per keystroke, glows under the pointer, flashes red on an error and ripples on
385
+ success; three tiles carry the portal glyphs and the active one stands raised.
386
+ - **`Character` look (`@jcsoftdev/ui/auth/character`).** A student on a hover board that follows the
387
+ pointer, looks toward the form while it is typed into, covers their eyes for the password,
388
+ shakes their head on an error and hops with a boost on success.
389
+ - **`Statement` look (`@jcsoftdev/ui/auth/statement`).** Kinetic type: `headline` rises word by word, an
390
+ optional `caption` and `action`, and a pill that fills toward its arrow as a progress meter;
391
+ on success the headline gives way to the new UI string `signedIn` (default headline
392
+ `welcomeBack`). Not hidden from assistive technology. `AuthLayout.Art` forwards `headline`,
393
+ `caption` and `action`.
394
+ - **One entry per look.** `AuthIllustration` takes the look as a component (`look`, default `Slabs`),
395
+ and each look is its own subpath (`@jcsoftdev/ui/auth/slabs`, `stack`, `mosaic`, `character`,
396
+ `statement`), so an app bundles only the looks it renders; each look carries only its own CSS. A look
397
+ is any component typed `AuthLook`, with optional static `variant` (the `data-variant` value) and
398
+ `text` (not hidden from assistive technology). `AuthLayout.Art` takes `look` too.
399
+ `AuthIllustrationAny` (`@jcsoftdev/ui/auth/looks`) keeps the string `variant` and imports all five
400
+ looks on purpose. The `ui/auth` size budget drops back from 32300 to its default-entry weight.
401
+ - **`PasswordInput`** (reveal toggle with `aria-pressed`) and **`Divider`** (optional label).
402
+ - **Icons.** `Eye`, `Mail`, `House` and `GraduationCap`.
403
+ - **UI strings** (en/es) for the sign-in screen and `showPassword`.
404
+
405
+ #### Fixed
406
+
407
+ - **Portal tiles.** A `LoginForm.Portals` tile lifts on keyboard focus as it does on hover, and the
408
+ selected tile shows a check badge besides its colour change, so the choice does not rest on
409
+ colour alone. The badge is decorative; the radio's `aria-checked` still carries the state.
410
+ - **Primary button hover contrast.** On hover the primary `Button` and `IconButton` (and so
411
+ `LoginForm.Submit`) turn their text to `--surface` on the darker `--accent-ink` fill. The text
412
+ kept `--on-accent`, made for the pale `--accent`, and fell to 2.4:1 in light themes for six of the
413
+ seven accents; it is now 5.7:1 or more in every accent, light and dark.
414
+ - **Portal tile edge.** An unselected portal tile draws its border in `--ink-3` instead of
415
+ `--line-strong`, which was 1.5:1 against the card; it is now 5.2:1 or more in light and dark.
416
+ - **Sign in shows it is busy.** `LoginForm.Submit` draws a spinner next to its label while the
417
+ request runs, since a loading button is no longer dimmed.
418
+ - **`Input`** with `start` or `end` draws one focus ring (the wrapper's) instead of a second square
419
+ ring on the inner input.
420
+ - **`LoginForm` posts by default.** The form carries `method="post"`, so a submit before hydration
421
+ can no longer put the identifier and the password in the URL (history, logs, Referer). Pass
422
+ `method` to override it.
423
+ - **Looks are client modules.** Each look and `AuthIllustrationAny` start with `"use client"`, so a
424
+ Server Component can pass `look={Stack}` to `AuthLayout.Art` or `AuthIllustration` without
425
+ Next.js rejecting a function prop.
426
+ - **`LoginForm` state.** The same failed sign-in twice in a row replays the error (a new submit
427
+ leaves the error state first). A controlled `success` or `error` returning to unset derives
428
+ idle, typing or password from focus again. Without portals the form no longer overrides
429
+ `AuthLayout` `defaultActiveIndex`.
430
+ - **`Statement` accessibility.** The visible line is the one assistive technology reads: "You're in."
431
+ replaces the headline on success, and the caption is hidden with it.
432
+ - **Password length no longer reaches the DOM.** `progress` counts the identifier by length but the
433
+ password only as filled or not (new pure `formProgress`), so styles and attributes do not mirror
434
+ how long the password is. The slabs tighten once the password is filled instead of per character,
435
+ and the keystroke hop no longer fires per password character.
436
+
3
437
  ## 0.4.0 (2026-10-21)
4
438
 
5
439
  ### Blocks for application screens
package/README.md CHANGED
@@ -31,6 +31,7 @@ Set these on `<html>` (or any element to restyle only its subtree); no rebuild i
31
31
  - Component groups: `@jcsoftdev/ui/atoms`, `forms`, `overlays`, `navigation`, `containers`, `states`, `shell`, `palette`, `calendar`, `charts`, `dashboards`, `utils`, each also per component (`@jcsoftdev/ui/atoms/button`).
32
32
  - `@jcsoftdev/ui/ai`: chat, prompt input, markdown and code block building blocks for AI interfaces.
33
33
  - `@jcsoftdev/ui/rich-text`: rich text editor with a sanitizer.
34
+ - `@jcsoftdev/ui/motion`: `Reveal`, `Stagger`, `CrossFade`, `Presence`, `CountUp` and `useHighlightRow`, on the `--motion-*` tokens and reduced-motion aware.
34
35
  - `@jcsoftdev/ui/i18n`: `UiStringsProvider`, `useUiStrings` and the `en`/`es` string presets.
35
36
  - `@jcsoftdev/ui/xlsx`: dependency-free `.xlsx` writer.
36
37
  - `@jcsoftdev/ui/brand`: logo mark and logo forge utilities.
@@ -116,14 +117,32 @@ https://ui.jcsoftdev.com/docs/customization/
116
117
  fixed hit areas (Checkbox, Switch, RadioGroup rows, an interactive Chip, the Dialog and Drawer close
117
118
  buttons) grow to at least 44px under it and are unchanged under every other level.
118
119
 
120
+ `data-density="auto"` picks the level from the input device, with CSS only: `normal` sizes on a fine
121
+ pointer (mouse, trackpad) and `touch` sizes under `@media (pointer: coarse)` (phones, tablets).
122
+ It is opt-in, not the default: with no attribute the kit keeps `normal` everywhere, so upgrading
123
+ never resizes an existing app on touch devices.
124
+
119
125
  ```html
120
- <html data-density="touch"> <!-- or any subtree: <main data-density="touch"> -->
126
+ <html data-density="auto"> <!-- or any subtree: <main data-density="touch"> -->
121
127
  ```
122
128
 
129
+ Recommended setup:
130
+
131
+ - Put `auto` on `<html>` so every screen adapts to the device.
132
+ - Force `touch` on operational screens (POS, kitchen display, kiosk) that are used by finger even
133
+ when a mouse is plugged in.
134
+ - Force `compact` or `normal` on dense admin tables.
135
+
136
+ An explicit level on a subtree always beats an `auto` ancestor, because each level redeclares the
137
+ whole set of density tokens on its own element. Fixed hit areas read `--touch-target` (0 or 44px) and
138
+ the `--touch` switch (0 or 1) instead of a selector, so they follow whichever level is nearest, `auto` included.
139
+
123
140
  Portaled content (Dialog, Drawer) leaves the subtree, so set the attribute on `<html>` or pass the
124
141
  `container` prop to keep it inside. Custom token files can declare absolute sizes per level:
125
142
  `{ "id": "touch", "density": 1.125, "values": { "control-height": "44px" } }`; the keys must be
126
- tokens listed in `styles.density.scaled`.
143
+ tokens listed in `styles.density.scaled` or `styles.density.fixed`. Both sides of `auto` are level
144
+ ids in `styles.density.auto` (`{ "fine": "normal", "coarse": "touch" }`); point them at other levels
145
+ to retune them, or remove the key to emit no `auto` level. `auto` is reserved and cannot be a level id.
127
146
 
128
147
  ## Localized default strings
129
148
 
@@ -147,7 +166,7 @@ older components already ship (NumberStepper, Carousel, AI set) are not routed t
147
166
 
148
167
  | Component | Added |
149
168
  | --- | --- |
150
- | `Button` | `loadingLabel` (shown instead of the children while `loading`, announced through a status region), `block` (full width), `size="lg"` (52px at normal density, scaled like the other controls). |
169
+ | `Button` | `loading` keeps the button focusable (`aria-disabled` and `aria-busy`, clicks and form submission ignored, not dimmed; `disabled` still disables natively), `loadingLabel` (shown instead of the children while `loading`, announced through a status region), `block` (full width), `size="lg"` (52px at normal density, scaled like the other controls). |
151
170
  | `Field` | `optional` appends the localized "(optional)" marker to the label; `error` also accepts `null`. |
152
171
  | `Banner` | `appearance="outline"` (page surface, only the border carries the tone; default `soft`), `title`; a default glyph per tone when `icon` is not passed (`icon={null}` hides it, so status never relies on color alone); only `danger` is `role="alert"`, the rest are `role="status"`; the `info` tone uses the `info` tokens. |
153
172
  | `Chip` | `icon`, `statusIcon` (prefixes `info`, `success`, `warning`, `danger` chips with their glyph), and an `info` tone. |
@@ -175,7 +194,10 @@ https://ui.jcsoftdev.com/docs/blocks/
175
194
  | `Wizard` | `navigation` | `Stepper` plus Back/Next/Finish: `steps`, async `canAdvance`, `onBeforeNext`, `onComplete`. |
176
195
  | `TabsNav`, `TabsNavLink` | `navigation` | Link-mode sub-navigation strip (`aria-current="page"`, `renderLink` or `asChild`). |
177
196
  | `Section`, `Note`, `Aside` | `containers` | Titled block with `actions` and optional `divider`, a text note with a `tone`, and a complementary region. |
178
- | `ListDetail` | `containers` | Master-detail that collapses to one pane under 641px of its own width. |
197
+ | `ListDetail` | `containers` | Master-detail that collapses to one pane under 641px of its own width. `listWidth` or `ratio` for a list rail, `surface="card"`, `stickyList`, a `ListDetailHeader` above the list and a `ListDetailEmpty` detail placeholder. |
198
+ | `PageHeader`, `PageHeaderBack` | `containers` | Page title block with `back`, `breadcrumbs`, `meta` and `tabs` rows and a `sticky` variant. |
199
+ | `Page` | `containers` | The `page` container; `aside` adds a side rail that stacks under the content at 1000px of page width. |
200
+ | `DetailHeader` | `containers` | Record header: `avatar`, `name`, `status`, `subtitle`, `facts` and `actions`. |
179
201
  | `Feed`, `FeedEvent` | `containers` | Activity log with a mark, text and `<time>` (absolute or `relative`). |
180
202
  | `Shortcuts`, `ShortcutsItem` | `containers` | Link or button tiles with `icon`, `count`, `kbd`. |
181
203
 
package/bin/ui-theme.mjs CHANGED
@@ -608,13 +608,22 @@ function stylesOf(tokens2) {
608
608
  };
609
609
  const density = styles.density ?? { levels: [] };
610
610
  const densityGoverned = new Set(
611
- density.levels.length ? ["density", ...density.scaled ?? []] : []
611
+ density.levels.length ? ["density", ...density.scaled ?? [], ...density.fixed ?? []] : []
612
612
  );
613
613
  for (const name of densityGoverned) {
614
614
  known(name, "density");
615
615
  if (isThemed(byName.get(name).value))
616
616
  throw new Error(`styles: density token "${name}" is themed`);
617
617
  }
618
+ const levelIds = new Set(density.levels.map((l) => l.id));
619
+ if (density.auto) {
620
+ if (levelIds.has("auto"))
621
+ throw new Error('styles: "auto" is reserved and cannot be a density level');
622
+ for (const side of ["fine", "coarse"]) {
623
+ if (!levelIds.has(density.auto[side]))
624
+ throw new Error(`styles: density auto.${side} names unknown level "${density.auto[side]}"`);
625
+ }
626
+ }
618
627
  for (const level of density.levels) {
619
628
  for (const name of Object.keys(level.values ?? {})) {
620
629
  if (!densityGoverned.has(name) || name === "density")
@@ -669,12 +678,26 @@ function buildStyleBlocks(tokens2) {
669
678
  });
670
679
  blocks.push(...variantBlocks("data-style", p.id, entries, themes));
671
680
  }
681
+ const fixed = new Set(s.density.fixed ?? []);
682
+ const densityEntries = (level) => s.densityGoverned.map((name) => {
683
+ if (name === "density") return [name, String(level.density)];
684
+ const base = s.byName.get(name).value;
685
+ return [
686
+ name,
687
+ level.values?.[name] ?? (fixed.has(name) ? base : `calc(${base} * var(--density))`)
688
+ ];
689
+ });
672
690
  for (const level of s.density.levels) {
673
- const entries = s.densityGoverned.map((name) => {
674
- if (name === "density") return [name, String(level.density)];
675
- return [name, level.values?.[name] ?? `calc(${s.byName.get(name).value} * var(--density))`];
676
- });
677
- blocks.push(...variantBlocks("data-density", level.id, entries, themes));
691
+ blocks.push(...variantBlocks("data-density", level.id, densityEntries(level), themes));
692
+ }
693
+ const auto = s.density.auto;
694
+ if (auto) {
695
+ const side = (id) => densityEntries(s.density.levels.find((l) => l.id === id));
696
+ blocks.push(...variantBlocks("data-density", "auto", side(auto.fine), themes));
697
+ const coarse = variantBlocks("data-density", "auto", side(auto.coarse), themes)[0];
698
+ blocks.push(`@media (pointer: coarse) {
699
+ ${indent(coarse)}
700
+ }`);
678
701
  }
679
702
  for (const level of s.radiusLevels) {
680
703
  const entries = s.radiusGoverned.flatMap((name) => {
@@ -782,6 +805,17 @@ function buildThemeCss(tokens2) {
782
805
  for (const s of tokens2.type?.sizeScale ?? []) {
783
806
  lines.push(` --text-${s.name}: ${s.fontSize};`);
784
807
  }
808
+ for (const [name, width] of Object.entries(tokens2.containers ?? {})) {
809
+ if (!TONE_NAME.test(name)) {
810
+ throw new Error(
811
+ `containers: "${name}" must be kebab-case (lowercase letters, digits, hyphens)`
812
+ );
813
+ }
814
+ if (!/^\d+(\.\d+)?(px|rem)$/.test(width)) {
815
+ throw new Error(`containers.${name}: "${width}" must be a literal px or rem width`);
816
+ }
817
+ lines.push(` --container-${name}: ${width};`);
818
+ }
785
819
  const styles = stylesOf(tokens2);
786
820
  for (const [themeVar, name] of Object.entries(tokens2.styles?.tailwind ?? {})) {
787
821
  if (!styles.byName.has(name)) throw new Error(`styles.tailwind: unknown token "${name}"`);
@@ -75,7 +75,7 @@ function CodeBlock({
75
75
  {
76
76
  tabIndex: 0,
77
77
  className: cn(
78
- "m-0 p-3 font-mono text-fs-125 leading-relaxed focus-visible:focus-ring",
78
+ "m-0 p-3 font-mono text-fs-120 leading-relaxed focus-visible:focus-ring",
79
79
  wrap ? "whitespace-pre-wrap break-words" : "overflow-x-auto",
80
80
  classNames?.pre
81
81
  ),
@@ -1,8 +1,8 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../../utils/cn.js";
3
3
  const sizeClasses = {
4
- normal: "text-fs-300",
5
- compact: "text-fs-220"
4
+ normal: "text-fs-240",
5
+ compact: "text-fs-200"
6
6
  };
7
7
  function BigDate({ size = "normal", className, ...props }) {
8
8
  return /* @__PURE__ */ jsx(
@@ -6,7 +6,11 @@ export type ButtonSize = "sm" | "md" | "lg";
6
6
  * `cn(buttonVariantClasses.primary, "bg-brand")` on a link, or `{ ...buttonVariantClasses, brand: "..." }`.
7
7
  */
8
8
  export declare const buttonVariantClasses: Readonly<Record<ButtonVariant, string>>;
9
- /** Class map behind each `size`; exported like {@link buttonVariantClasses}. */
9
+ /**
10
+ * Class map behind each `size`; exported like {@link buttonVariantClasses}. `sm` and `md` take the
11
+ * shared control heights (`--control-height-sm`, `--control-height-md`), so a button lines up with an
12
+ * `Input`, `Select`, `Combobox`, `DatePicker` or `TimeInput` of the same size.
13
+ */
10
14
  export declare const buttonSizeClasses: Readonly<Record<ButtonSize, string>>;
11
15
  export interface ButtonClassOptions {
12
16
  variant?: ButtonVariant;
@@ -21,7 +25,15 @@ export interface ButtonClassOptions {
21
25
  export declare function buttonClasses({ variant, size, block, className, }?: ButtonClassOptions): string;
22
26
  export interface ButtonProps extends ComponentPropsWithRef<"button"> {
23
27
  variant?: ButtonVariant;
28
+ /** `sm` is 30px and `md` (default) 38px, the heights every form control shares; `lg` is 52px. */
24
29
  size?: ButtonSize;
30
+ /**
31
+ * Busy state: the button keeps its focus and its full colour, ignores clicks (a submit button no
32
+ * longer submits, including the implicit submit from Enter in a field of its form) and is exposed
33
+ * as `aria-disabled` and `aria-busy`. It is not natively `disabled`, so keyboard focus stays on it
34
+ * while the work runs; pass `disabled` for a button that must leave the tab order. The visible
35
+ * cue is `loadingLabel` or a spinner among the children: without either only the cursor changes.
36
+ */
25
37
  loading?: boolean;
26
38
  /**
27
39
  * Replaces the children while `loading` and is announced to screen readers. Without it the
@@ -33,4 +45,4 @@ export interface ButtonProps extends ComponentPropsWithRef<"button"> {
33
45
  /** Render the child element (via Slot) instead of a `<button>`, e.g. a link. */
34
46
  asChild?: boolean;
35
47
  }
36
- export declare function Button({ variant, size, loading, loadingLabel, block, disabled, asChild, className, children, ...props }: ButtonProps): import("react").JSX.Element;
48
+ export declare function Button({ variant, size, loading, loadingLabel, block, disabled, asChild, className, children, onClick, ...props }: ButtonProps): import("react").JSX.Element;