@nadicodeai/ui 12.1.101 → 12.1.103

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 (567) hide show
  1. package/dist/components/accordion.d.ts +38 -12
  2. package/dist/components/accordion.d.ts.map +1 -1
  3. package/dist/components/accordion.js +36 -15
  4. package/dist/components/account-menu.d.ts +18 -18
  5. package/dist/components/account-menu.d.ts.map +1 -1
  6. package/dist/components/account-menu.js +17 -13
  7. package/dist/components/action-menu.d.ts +20 -19
  8. package/dist/components/action-menu.d.ts.map +1 -1
  9. package/dist/components/action-menu.js +22 -15
  10. package/dist/components/action-status.d.ts +14 -10
  11. package/dist/components/action-status.d.ts.map +1 -1
  12. package/dist/components/action-status.js +14 -10
  13. package/dist/components/activity-calendar.d.ts +3 -1
  14. package/dist/components/activity-calendar.d.ts.map +1 -1
  15. package/dist/components/activity-calendar.js +16 -2
  16. package/dist/components/activity-feed.d.ts +2 -2
  17. package/dist/components/activity-feed.d.ts.map +1 -1
  18. package/dist/components/activity-feed.js +14 -5
  19. package/dist/components/agent-card.d.ts +11 -5
  20. package/dist/components/agent-card.d.ts.map +1 -1
  21. package/dist/components/agent-card.js +13 -7
  22. package/dist/components/agent-list-row.js +1 -1
  23. package/dist/components/agent-orb-appearance.d.ts +7 -1
  24. package/dist/components/agent-orb-appearance.d.ts.map +1 -1
  25. package/dist/components/agent-orb-appearance.js +26 -0
  26. package/dist/components/agent-profile.d.ts +8 -7
  27. package/dist/components/agent-profile.d.ts.map +1 -1
  28. package/dist/components/agent-profile.js +6 -6
  29. package/dist/components/alert-dialog.d.ts +25 -16
  30. package/dist/components/alert-dialog.d.ts.map +1 -1
  31. package/dist/components/alert-dialog.js +30 -18
  32. package/dist/components/alert.d.ts +1 -1
  33. package/dist/components/avatar.d.ts +83 -17
  34. package/dist/components/avatar.d.ts.map +1 -1
  35. package/dist/components/avatar.js +89 -23
  36. package/dist/components/badge.d.ts +59 -8
  37. package/dist/components/badge.d.ts.map +1 -1
  38. package/dist/components/badge.js +57 -14
  39. package/dist/components/breadcrumb.d.ts +18 -7
  40. package/dist/components/breadcrumb.d.ts.map +1 -1
  41. package/dist/components/breadcrumb.js +37 -13
  42. package/dist/components/button-group.d.ts +12 -15
  43. package/dist/components/button-group.d.ts.map +1 -1
  44. package/dist/components/button-group.js +13 -17
  45. package/dist/components/button.d.ts +126 -23
  46. package/dist/components/button.d.ts.map +1 -1
  47. package/dist/components/button.js +164 -39
  48. package/dist/components/calendar.d.ts +26 -15
  49. package/dist/components/calendar.d.ts.map +1 -1
  50. package/dist/components/calendar.js +60 -46
  51. package/dist/components/card-row.d.ts +13 -5
  52. package/dist/components/card-row.d.ts.map +1 -1
  53. package/dist/components/card-row.js +24 -10
  54. package/dist/components/card.d.ts +6 -12
  55. package/dist/components/card.d.ts.map +1 -1
  56. package/dist/components/card.js +11 -16
  57. package/dist/components/carousel.d.ts +3 -3
  58. package/dist/components/carousel.d.ts.map +1 -1
  59. package/dist/components/carousel.js +7 -7
  60. package/dist/components/catalog-drawer.d.ts +7 -7
  61. package/dist/components/catalog-drawer.d.ts.map +1 -1
  62. package/dist/components/catalog-drawer.js +6 -6
  63. package/dist/components/chart-area-stacked.d.ts +1 -1
  64. package/dist/components/chart-area-stacked.d.ts.map +1 -1
  65. package/dist/components/chart-area-stacked.js +4 -4
  66. package/dist/components/chart-axis.d.ts +14 -1
  67. package/dist/components/chart-axis.d.ts.map +1 -1
  68. package/dist/components/chart-axis.js +11 -1
  69. package/dist/components/chart-bar-horizontal.d.ts +2 -2
  70. package/dist/components/chart-bar-horizontal.d.ts.map +1 -1
  71. package/dist/components/chart-bar-horizontal.js +14 -5
  72. package/dist/components/chart-bar-multiple.d.ts +1 -1
  73. package/dist/components/chart-bar-multiple.d.ts.map +1 -1
  74. package/dist/components/chart-bar-multiple.js +3 -3
  75. package/dist/components/chart-bar-stacked.d.ts +1 -1
  76. package/dist/components/chart-bar-stacked.d.ts.map +1 -1
  77. package/dist/components/chart-bar-stacked.js +3 -3
  78. package/dist/components/chart-card.d.ts +17 -6
  79. package/dist/components/chart-card.d.ts.map +1 -1
  80. package/dist/components/chart-card.js +11 -4
  81. package/dist/components/chart-date-range-control.d.ts +18 -9
  82. package/dist/components/chart-date-range-control.d.ts.map +1 -1
  83. package/dist/components/chart-date-range-control.js +43 -47
  84. package/dist/components/chart-sparkline.d.ts +4 -3
  85. package/dist/components/chart-sparkline.d.ts.map +1 -1
  86. package/dist/components/chart-sparkline.js +6 -5
  87. package/dist/components/check-counts.d.ts +44 -0
  88. package/dist/components/check-counts.d.ts.map +1 -0
  89. package/dist/components/check-counts.js +51 -0
  90. package/dist/components/checkbox.d.ts +39 -11
  91. package/dist/components/checkbox.d.ts.map +1 -1
  92. package/dist/components/checkbox.js +38 -11
  93. package/dist/components/choicebox.d.ts +96 -0
  94. package/dist/components/choicebox.d.ts.map +1 -0
  95. package/dist/components/choicebox.js +113 -0
  96. package/dist/components/clearable-input.d.ts +57 -0
  97. package/dist/components/clearable-input.d.ts.map +1 -0
  98. package/dist/components/clearable-input.js +58 -0
  99. package/dist/components/code-block.d.ts +77 -17
  100. package/dist/components/code-block.d.ts.map +1 -1
  101. package/dist/components/code-block.js +85 -15
  102. package/dist/components/collapsible.d.ts +27 -10
  103. package/dist/components/collapsible.d.ts.map +1 -1
  104. package/dist/components/collapsible.js +24 -9
  105. package/dist/components/collection-filters.d.ts +3 -1
  106. package/dist/components/collection-filters.d.ts.map +1 -1
  107. package/dist/components/collection-filters.js +7 -9
  108. package/dist/components/collection-page.d.ts +31 -10
  109. package/dist/components/collection-page.d.ts.map +1 -1
  110. package/dist/components/collection-page.js +14 -13
  111. package/dist/components/collection-search.d.ts +32 -10
  112. package/dist/components/collection-search.d.ts.map +1 -1
  113. package/dist/components/collection-search.js +24 -13
  114. package/dist/components/collection-sort.d.ts.map +1 -1
  115. package/dist/components/collection-sort.js +2 -2
  116. package/dist/components/collection-toolbar.d.ts +5 -2
  117. package/dist/components/collection-toolbar.d.ts.map +1 -1
  118. package/dist/components/collection-toolbar.js +7 -4
  119. package/dist/components/combobox.d.ts +97 -22
  120. package/dist/components/combobox.d.ts.map +1 -1
  121. package/dist/components/combobox.js +80 -28
  122. package/dist/components/command.d.ts +34 -21
  123. package/dist/components/command.d.ts.map +1 -1
  124. package/dist/components/command.js +33 -25
  125. package/dist/components/confirm-dialog.d.ts +23 -6
  126. package/dist/components/confirm-dialog.d.ts.map +1 -1
  127. package/dist/components/confirm-dialog.js +32 -13
  128. package/dist/components/context-menu.d.ts +14 -10
  129. package/dist/components/context-menu.d.ts.map +1 -1
  130. package/dist/components/context-menu.js +17 -12
  131. package/dist/components/copy-button.d.ts +5 -2
  132. package/dist/components/copy-button.d.ts.map +1 -1
  133. package/dist/components/copy-button.js +16 -8
  134. package/dist/components/data-table.d.ts +120 -54
  135. package/dist/components/data-table.d.ts.map +1 -1
  136. package/dist/components/data-table.js +163 -92
  137. package/dist/components/desktop-shell.d.ts +4 -2
  138. package/dist/components/desktop-shell.d.ts.map +1 -1
  139. package/dist/components/desktop-shell.js +3 -3
  140. package/dist/components/dialog.d.ts +63 -24
  141. package/dist/components/dialog.d.ts.map +1 -1
  142. package/dist/components/dialog.js +52 -31
  143. package/dist/components/disclosure-row.d.ts +1 -2
  144. package/dist/components/disclosure-row.d.ts.map +1 -1
  145. package/dist/components/disclosure-row.js +1 -2
  146. package/dist/components/disclosure.d.ts +1 -1
  147. package/dist/components/disclosure.js +1 -1
  148. package/dist/components/drawer.d.ts +33 -12
  149. package/dist/components/drawer.d.ts.map +1 -1
  150. package/dist/components/drawer.js +47 -35
  151. package/dist/components/dropdown-menu.d.ts +59 -14
  152. package/dist/components/dropdown-menu.d.ts.map +1 -1
  153. package/dist/components/dropdown-menu.js +58 -26
  154. package/dist/components/empty-state.d.ts +35 -12
  155. package/dist/components/empty-state.d.ts.map +1 -1
  156. package/dist/components/empty-state.js +35 -17
  157. package/dist/components/entry-scene.d.ts +4 -4
  158. package/dist/components/entry-scene.d.ts.map +1 -1
  159. package/dist/components/entry-scene.js +2 -2
  160. package/dist/components/field.d.ts +44 -14
  161. package/dist/components/field.d.ts.map +1 -1
  162. package/dist/components/field.js +49 -20
  163. package/dist/components/file-diff.d.ts.map +1 -1
  164. package/dist/components/file-diff.js +3 -4
  165. package/dist/components/form-dialog.d.ts +7 -7
  166. package/dist/components/form-dialog.d.ts.map +1 -1
  167. package/dist/components/form-dialog.js +13 -11
  168. package/dist/components/form-drawer.d.ts +10 -7
  169. package/dist/components/form-drawer.d.ts.map +1 -1
  170. package/dist/components/form-drawer.js +11 -10
  171. package/dist/components/gauge.d.ts +64 -0
  172. package/dist/components/gauge.d.ts.map +1 -0
  173. package/dist/components/gauge.js +73 -0
  174. package/dist/components/hover-card.d.ts +72 -14
  175. package/dist/components/hover-card.d.ts.map +1 -1
  176. package/dist/components/hover-card.js +51 -17
  177. package/dist/components/identity-mark.d.ts +8 -1
  178. package/dist/components/identity-mark.d.ts.map +1 -1
  179. package/dist/components/identity-mark.js +31 -5
  180. package/dist/components/input-group.d.ts +44 -21
  181. package/dist/components/input-group.d.ts.map +1 -1
  182. package/dist/components/input-group.js +74 -27
  183. package/dist/components/input.d.ts +64 -12
  184. package/dist/components/input.d.ts.map +1 -1
  185. package/dist/components/input.js +51 -15
  186. package/dist/components/item.d.ts +37 -15
  187. package/dist/components/item.d.ts.map +1 -1
  188. package/dist/components/item.js +41 -22
  189. package/dist/components/kbd.d.ts +49 -13
  190. package/dist/components/kbd.d.ts.map +1 -1
  191. package/dist/components/kbd.js +115 -16
  192. package/dist/components/kpi-card.d.ts +12 -4
  193. package/dist/components/kpi-card.d.ts.map +1 -1
  194. package/dist/components/kpi-card.js +13 -4
  195. package/dist/components/label.d.ts +17 -10
  196. package/dist/components/label.d.ts.map +1 -1
  197. package/dist/components/label.js +18 -11
  198. package/dist/components/library-shelf.d.ts +6 -6
  199. package/dist/components/library-shelf.d.ts.map +1 -1
  200. package/dist/components/library-shelf.js +5 -5
  201. package/dist/components/load-more-button.d.ts +35 -0
  202. package/dist/components/load-more-button.d.ts.map +1 -0
  203. package/dist/components/load-more-button.js +26 -0
  204. package/dist/components/menu-choice-row.d.ts +6 -8
  205. package/dist/components/menu-choice-row.d.ts.map +1 -1
  206. package/dist/components/menu-choice-row.js +8 -8
  207. package/dist/components/message-notice.d.ts +8 -13
  208. package/dist/components/message-notice.d.ts.map +1 -1
  209. package/dist/components/message-notice.js +25 -22
  210. package/dist/components/middle-truncate.d.ts +33 -0
  211. package/dist/components/middle-truncate.d.ts.map +1 -0
  212. package/dist/components/middle-truncate.js +72 -0
  213. package/dist/components/multi-select.d.ts +94 -0
  214. package/dist/components/multi-select.d.ts.map +1 -0
  215. package/dist/components/multi-select.js +132 -0
  216. package/dist/components/native-select.d.ts +37 -13
  217. package/dist/components/native-select.d.ts.map +1 -1
  218. package/dist/components/native-select.js +27 -11
  219. package/dist/components/notice-banner.d.ts +17 -10
  220. package/dist/components/notice-banner.d.ts.map +1 -1
  221. package/dist/components/notice-banner.js +12 -11
  222. package/dist/components/numbered-steps.d.ts +10 -4
  223. package/dist/components/numbered-steps.d.ts.map +1 -1
  224. package/dist/components/numbered-steps.js +9 -7
  225. package/dist/components/object-page.d.ts +40 -14
  226. package/dist/components/object-page.d.ts.map +1 -1
  227. package/dist/components/object-page.js +12 -10
  228. package/dist/components/object-workspace.d.ts +29 -10
  229. package/dist/components/object-workspace.d.ts.map +1 -1
  230. package/dist/components/object-workspace.js +18 -8
  231. package/dist/components/overview-page.d.ts +2 -2
  232. package/dist/components/overview-page.d.ts.map +1 -1
  233. package/dist/components/overview-page.js +8 -7
  234. package/dist/components/page-actions.d.ts +28 -8
  235. package/dist/components/page-actions.d.ts.map +1 -1
  236. package/dist/components/page-actions.js +22 -25
  237. package/dist/components/page-header.d.ts +11 -4
  238. package/dist/components/page-header.d.ts.map +1 -1
  239. package/dist/components/page-header.js +10 -5
  240. package/dist/components/pending-label.d.ts +6 -5
  241. package/dist/components/pending-label.d.ts.map +1 -1
  242. package/dist/components/pending-label.js +14 -6
  243. package/dist/components/picture-label.d.ts +2 -2
  244. package/dist/components/picture-label.d.ts.map +1 -1
  245. package/dist/components/picture-label.js +3 -3
  246. package/dist/components/portal-sidebar-frame.d.ts +9 -21
  247. package/dist/components/portal-sidebar-frame.d.ts.map +1 -1
  248. package/dist/components/portal-sidebar-frame.js +13 -27
  249. package/dist/components/progress-checklist.d.ts +46 -0
  250. package/dist/components/progress-checklist.d.ts.map +1 -0
  251. package/dist/components/progress-checklist.js +46 -0
  252. package/dist/components/progress.d.ts +48 -8
  253. package/dist/components/progress.d.ts.map +1 -1
  254. package/dist/components/progress.js +92 -16
  255. package/dist/components/prose.d.ts +19 -0
  256. package/dist/components/prose.d.ts.map +1 -0
  257. package/dist/components/prose.js +29 -0
  258. package/dist/components/radio-group.d.ts +51 -12
  259. package/dist/components/radio-group.d.ts.map +1 -1
  260. package/dist/components/radio-group.js +42 -12
  261. package/dist/components/reading-column.js +1 -1
  262. package/dist/components/record-identity.d.ts +6 -5
  263. package/dist/components/record-identity.d.ts.map +1 -1
  264. package/dist/components/record-identity.js +12 -3
  265. package/dist/components/record-list.d.ts +117 -27
  266. package/dist/components/record-list.d.ts.map +1 -1
  267. package/dist/components/record-list.js +185 -55
  268. package/dist/components/record-time.d.ts +20 -7
  269. package/dist/components/record-time.d.ts.map +1 -1
  270. package/dist/components/record-time.js +38 -19
  271. package/dist/components/resizable.d.ts +7 -5
  272. package/dist/components/resizable.d.ts.map +1 -1
  273. package/dist/components/resizable.js +6 -6
  274. package/dist/components/scope-switcher.d.ts +2 -0
  275. package/dist/components/scope-switcher.d.ts.map +1 -1
  276. package/dist/components/scope-switcher.js +2 -2
  277. package/dist/components/scroll-area.d.ts +47 -11
  278. package/dist/components/scroll-area.d.ts.map +1 -1
  279. package/dist/components/scroll-area.js +72 -14
  280. package/dist/components/segmented-control.d.ts +82 -0
  281. package/dist/components/segmented-control.d.ts.map +1 -0
  282. package/dist/components/segmented-control.js +90 -0
  283. package/dist/components/select.d.ts +55 -15
  284. package/dist/components/select.d.ts.map +1 -1
  285. package/dist/components/select.js +62 -19
  286. package/dist/components/separator.d.ts +12 -5
  287. package/dist/components/separator.d.ts.map +1 -1
  288. package/dist/components/separator.js +11 -6
  289. package/dist/components/settings-facts.d.ts +34 -14
  290. package/dist/components/settings-facts.d.ts.map +1 -1
  291. package/dist/components/settings-facts.js +21 -12
  292. package/dist/components/settings-page.d.ts +4 -4
  293. package/dist/components/settings-page.js +5 -5
  294. package/dist/components/settings-section.d.ts +160 -34
  295. package/dist/components/settings-section.d.ts.map +1 -1
  296. package/dist/components/settings-section.js +92 -39
  297. package/dist/components/sheet.d.ts +47 -16
  298. package/dist/components/sheet.d.ts.map +1 -1
  299. package/dist/components/sheet.js +40 -19
  300. package/dist/components/sidebar-sections.d.ts +16 -12
  301. package/dist/components/sidebar-sections.d.ts.map +1 -1
  302. package/dist/components/sidebar-sections.js +30 -15
  303. package/dist/components/sidebar.d.ts +117 -21
  304. package/dist/components/sidebar.d.ts.map +1 -1
  305. package/dist/components/sidebar.js +180 -55
  306. package/dist/components/skeleton.d.ts +54 -8
  307. package/dist/components/skeleton.d.ts.map +1 -1
  308. package/dist/components/skeleton.js +44 -9
  309. package/dist/components/slider.d.ts +53 -11
  310. package/dist/components/slider.d.ts.map +1 -1
  311. package/dist/components/slider.js +71 -17
  312. package/dist/components/snippet.d.ts +57 -0
  313. package/dist/components/snippet.d.ts.map +1 -0
  314. package/dist/components/snippet.js +60 -0
  315. package/dist/components/sonner.d.ts +13 -14
  316. package/dist/components/sonner.d.ts.map +1 -1
  317. package/dist/components/sonner.js +25 -22
  318. package/dist/components/status-badge.d.ts +37 -11
  319. package/dist/components/status-badge.d.ts.map +1 -1
  320. package/dist/components/status-badge.js +63 -15
  321. package/dist/components/status-dot.d.ts +42 -11
  322. package/dist/components/status-dot.d.ts.map +1 -1
  323. package/dist/components/status-dot.js +40 -11
  324. package/dist/components/switch.d.ts +43 -12
  325. package/dist/components/switch.d.ts.map +1 -1
  326. package/dist/components/switch.js +42 -12
  327. package/dist/components/table-card.d.ts +21 -12
  328. package/dist/components/table-card.d.ts.map +1 -1
  329. package/dist/components/table-card.js +17 -9
  330. package/dist/components/table-layouts.d.ts +40 -8
  331. package/dist/components/table-layouts.d.ts.map +1 -1
  332. package/dist/components/table-layouts.js +52 -8
  333. package/dist/components/table-value.d.ts +4 -3
  334. package/dist/components/table-value.d.ts.map +1 -1
  335. package/dist/components/table-value.js +6 -5
  336. package/dist/components/table.d.ts +62 -25
  337. package/dist/components/table.d.ts.map +1 -1
  338. package/dist/components/table.js +62 -26
  339. package/dist/components/tabs.d.ts +86 -17
  340. package/dist/components/tabs.d.ts.map +1 -1
  341. package/dist/components/tabs.js +93 -22
  342. package/dist/components/text-link.d.ts +4 -1
  343. package/dist/components/text-link.d.ts.map +1 -1
  344. package/dist/components/text-link.js +4 -1
  345. package/dist/components/text-with-copy-button.d.ts +30 -0
  346. package/dist/components/text-with-copy-button.d.ts.map +1 -0
  347. package/dist/components/text-with-copy-button.js +32 -0
  348. package/dist/components/textarea.d.ts +40 -10
  349. package/dist/components/textarea.d.ts.map +1 -1
  350. package/dist/components/textarea.js +50 -11
  351. package/dist/components/theme-mode-switcher.d.ts +20 -3
  352. package/dist/components/theme-mode-switcher.d.ts.map +1 -1
  353. package/dist/components/theme-mode-switcher.js +23 -6
  354. package/dist/components/toggle-group.d.ts +28 -8
  355. package/dist/components/toggle-group.d.ts.map +1 -1
  356. package/dist/components/toggle-group.js +12 -6
  357. package/dist/components/toggle.d.ts +6 -3
  358. package/dist/components/toggle.d.ts.map +1 -1
  359. package/dist/components/toggle.js +10 -7
  360. package/dist/components/tooltip.d.ts +43 -12
  361. package/dist/components/tooltip.d.ts.map +1 -1
  362. package/dist/components/tooltip.js +45 -16
  363. package/dist/components/trend-badge.js +1 -1
  364. package/dist/components/update-card.js +1 -1
  365. package/dist/eslint/index.js +82 -0
  366. package/dist/eslint/rules/badge-is-static-label.js +93 -0
  367. package/dist/eslint/rules/button-icon-slot.js +102 -0
  368. package/dist/eslint/rules/button-link-for-navigation.js +146 -0
  369. package/dist/eslint/rules/button-no-aria-label-with-text.js +75 -0
  370. package/dist/eslint/rules/button-type-roles-only-in-buttons.js +83 -0
  371. package/dist/eslint/rules/choice-control-has-a-name.js +98 -0
  372. package/dist/eslint/rules/choice-group-in-fieldset.js +86 -0
  373. package/dist/eslint/rules/command-shortcut-single-owner.js +118 -0
  374. package/dist/eslint/rules/confirm-dialog-words.js +63 -0
  375. package/dist/eslint/rules/data-table-one-unsized-column.js +96 -0
  376. package/dist/eslint/rules/destructive-action-placement.js +69 -0
  377. package/dist/eslint/rules/disabled-choice-says-why.js +71 -0
  378. package/dist/eslint/rules/ellipsis-opens-a-dialog.js +110 -0
  379. package/dist/eslint/rules/input-group-owners.js +155 -0
  380. package/dist/eslint/rules/kbd-children-no-modifier-text.js +128 -0
  381. package/dist/eslint/rules/literal-text.js +41 -0
  382. package/dist/eslint/rules/middle-truncate-placement.js +69 -0
  383. package/dist/eslint/rules/no-bare-button-label.js +55 -0
  384. package/dist/eslint/rules/no-control-in-read-only-surface.js +106 -0
  385. package/dist/eslint/rules/no-hand-built-busy.js +104 -0
  386. package/dist/eslint/rules/no-hand-built-theme-picker.js +144 -0
  387. package/dist/eslint/rules/no-hand-built-tile.js +41 -0
  388. package/dist/eslint/rules/no-hand-formatted-date.js +87 -0
  389. package/dist/eslint/rules/no-hand-stacked-avatars.js +67 -0
  390. package/dist/eslint/rules/no-nested-collapse.js +60 -0
  391. package/dist/eslint/rules/no-search-in-form.js +47 -0
  392. package/dist/eslint/rules/no-shadcn-appearance-override.js +2 -16
  393. package/dist/eslint/rules/no-shell-prompt-in-snippet.js +74 -0
  394. package/dist/eslint/rules/no-stock-error-words.js +56 -0
  395. package/dist/eslint/rules/no-tooltip-around-labelled-field.js +72 -0
  396. package/dist/eslint/rules/no-weight-class-on-strong-in-type-role.js +57 -0
  397. package/dist/eslint/rules/one-submenu-level.js +43 -0
  398. package/dist/eslint/rules/one-toast-per-flow.js +91 -0
  399. package/dist/eslint/rules/option-count.js +167 -0
  400. package/dist/eslint/rules/page-command-link-not-render.js +43 -0
  401. package/dist/eslint/rules/progress-needs-name.js +57 -0
  402. package/dist/eslint/rules/settings-limit-in-footer.js +94 -0
  403. package/dist/eslint/rules/skeleton-in-region.js +80 -0
  404. package/dist/eslint/rules/sortable-heading-uses-sort.js +79 -0
  405. package/dist/eslint/rules/table-cell-inset-owner.js +107 -0
  406. package/dist/eslint/rules/tabs-selection-is-controlled.js +47 -0
  407. package/dist/eslint/rules/tooltip-only-arrow.js +38 -0
  408. package/dist/eslint/rules/tooltip-trigger-accessible-name.js +114 -0
  409. package/dist/eslint/strict-design-system.js +21 -7
  410. package/dist/index.d.ts +13 -13
  411. package/dist/index.d.ts.map +1 -1
  412. package/dist/index.js +12 -13
  413. package/dist/internal/assistant-ui/attachment.d.ts.map +1 -1
  414. package/dist/internal/assistant-ui/attachment.js +2 -2
  415. package/dist/internal/assistant-ui/reasoning.d.ts +1 -1
  416. package/dist/internal/assistant-ui/reasoning.d.ts.map +1 -1
  417. package/dist/internal/assistant-ui/tool-fallback.js +1 -1
  418. package/dist/internal/assistant-ui/tool-group.d.ts +1 -1
  419. package/dist/internal/assistant-ui/tool-group.d.ts.map +1 -1
  420. package/dist/internal/assistant-ui/tooltip-icon-button.d.ts +2 -3
  421. package/dist/internal/assistant-ui/tooltip-icon-button.d.ts.map +1 -1
  422. package/dist/internal/assistant-ui/tooltip-icon-button.js +1 -1
  423. package/dist/internal/catalog-list.js +2 -2
  424. package/dist/internal/collection-note.d.ts +23 -0
  425. package/dist/internal/collection-note.d.ts.map +1 -0
  426. package/dist/internal/collection-note.js +17 -0
  427. package/dist/internal/collection-rail.d.ts +57 -0
  428. package/dist/internal/collection-rail.d.ts.map +1 -0
  429. package/dist/internal/collection-rail.js +33 -0
  430. package/dist/internal/company-logo.d.ts +18 -0
  431. package/dist/internal/company-logo.d.ts.map +1 -0
  432. package/dist/internal/company-logo.js +14 -0
  433. package/dist/internal/control-name.d.ts +12 -0
  434. package/dist/internal/control-name.d.ts.map +1 -0
  435. package/dist/internal/control-name.js +1 -0
  436. package/dist/internal/diff-line.d.ts +9 -0
  437. package/dist/internal/diff-line.d.ts.map +1 -0
  438. package/dist/internal/diff-line.js +8 -0
  439. package/dist/internal/empty.d.ts +8 -4
  440. package/dist/internal/empty.d.ts.map +1 -1
  441. package/dist/internal/empty.js +14 -8
  442. package/dist/internal/field-frame.d.ts +33 -0
  443. package/dist/internal/field-frame.d.ts.map +1 -0
  444. package/dist/internal/field-frame.js +20 -0
  445. package/dist/internal/final-focus.d.ts +8 -0
  446. package/dist/internal/final-focus.d.ts.map +1 -0
  447. package/dist/internal/final-focus.js +10 -0
  448. package/dist/internal/footer-strip.d.ts.map +1 -1
  449. package/dist/internal/footer-strip.js +3 -1
  450. package/dist/internal/form-submit.d.ts +9 -5
  451. package/dist/internal/form-submit.d.ts.map +1 -1
  452. package/dist/internal/form-submit.js +31 -2
  453. package/dist/internal/input-box.d.ts +26 -0
  454. package/dist/internal/input-box.d.ts.map +1 -0
  455. package/dist/internal/input-box.js +59 -0
  456. package/dist/internal/menu-surface.d.ts +10 -3
  457. package/dist/internal/menu-surface.d.ts.map +1 -1
  458. package/dist/internal/menu-surface.js +10 -3
  459. package/dist/internal/notice.d.ts +25 -0
  460. package/dist/internal/notice.d.ts.map +1 -0
  461. package/dist/internal/notice.js +33 -0
  462. package/dist/internal/overlay-stem.d.ts +5 -0
  463. package/dist/internal/overlay-stem.d.ts.map +1 -0
  464. package/dist/internal/overlay-stem.js +7 -0
  465. package/dist/internal/phone-sheet.d.ts +4 -0
  466. package/dist/internal/phone-sheet.d.ts.map +1 -0
  467. package/dist/internal/phone-sheet.js +2 -0
  468. package/dist/internal/present-content.d.ts +3 -0
  469. package/dist/internal/present-content.d.ts.map +1 -0
  470. package/dist/internal/present-content.js +1 -0
  471. package/dist/internal/record-menu-items.d.ts +4 -3
  472. package/dist/internal/record-menu-items.d.ts.map +1 -1
  473. package/dist/internal/record-menu-items.js +21 -6
  474. package/dist/internal/settings-save.d.ts +9 -2
  475. package/dist/internal/settings-save.d.ts.map +1 -1
  476. package/dist/internal/settings-save.js +9 -6
  477. package/dist/internal/table-compact-line.d.ts +38 -0
  478. package/dist/internal/table-compact-line.d.ts.map +1 -0
  479. package/dist/internal/table-compact-line.js +35 -0
  480. package/dist/internal/title-when-cut.d.ts +8 -0
  481. package/dist/internal/title-when-cut.d.ts.map +1 -0
  482. package/dist/internal/title-when-cut.js +22 -0
  483. package/dist/internal/unsaved-guard.d.ts +18 -0
  484. package/dist/internal/unsaved-guard.d.ts.map +1 -0
  485. package/dist/internal/unsaved-guard.js +31 -0
  486. package/dist/lib/merge-tokens.generated.js +2 -2
  487. package/dist/showcase/foundations.d.ts.map +1 -1
  488. package/dist/showcase/foundations.js +10 -2
  489. package/dist/showcase/specimens/actions.d.ts +2 -0
  490. package/dist/showcase/specimens/actions.d.ts.map +1 -1
  491. package/dist/showcase/specimens/actions.js +30 -5
  492. package/dist/showcase/specimens/charts.d.ts.map +1 -1
  493. package/dist/showcase/specimens/charts.js +22 -13
  494. package/dist/showcase/specimens/choices.d.ts +14 -3
  495. package/dist/showcase/specimens/choices.d.ts.map +1 -1
  496. package/dist/showcase/specimens/choices.js +93 -13
  497. package/dist/showcase/specimens/compositions.d.ts.map +1 -1
  498. package/dist/showcase/specimens/compositions.js +136 -23
  499. package/dist/showcase/specimens/data.d.ts +12 -7
  500. package/dist/showcase/specimens/data.d.ts.map +1 -1
  501. package/dist/showcase/specimens/data.js +139 -35
  502. package/dist/showcase/specimens/feedback.d.ts +2 -0
  503. package/dist/showcase/specimens/feedback.d.ts.map +1 -1
  504. package/dist/showcase/specimens/feedback.js +39 -15
  505. package/dist/showcase/specimens/index.d.ts +20 -12
  506. package/dist/showcase/specimens/index.d.ts.map +1 -1
  507. package/dist/showcase/specimens/inputs.d.ts +4 -2
  508. package/dist/showcase/specimens/inputs.d.ts.map +1 -1
  509. package/dist/showcase/specimens/inputs.js +62 -19
  510. package/dist/showcase/specimens/menus.d.ts +0 -1
  511. package/dist/showcase/specimens/menus.d.ts.map +1 -1
  512. package/dist/showcase/specimens/menus.js +47 -18
  513. package/dist/showcase/specimens/navigation.d.ts +6 -4
  514. package/dist/showcase/specimens/navigation.d.ts.map +1 -1
  515. package/dist/showcase/specimens/navigation.js +61 -32
  516. package/dist/showcase/specimens/other.d.ts +1 -3
  517. package/dist/showcase/specimens/other.d.ts.map +1 -1
  518. package/dist/showcase/specimens/other.js +17 -13
  519. package/dist/showcase/specimens/status.d.ts +4 -1
  520. package/dist/showcase/specimens/status.d.ts.map +1 -1
  521. package/dist/showcase/specimens/status.js +64 -11
  522. package/dist/showcase/usage.generated.d.ts +1 -1
  523. package/dist/showcase/usage.generated.d.ts.map +1 -1
  524. package/dist/showcase/usage.generated.js +637 -549
  525. package/dist/standalone/index.js +1 -1
  526. package/dist/styles/components.css +13 -13
  527. package/dist/styles/globals.css +25 -0
  528. package/package.json +2 -3
  529. package/dist/components/approval-row.d.ts +0 -34
  530. package/dist/components/approval-row.d.ts.map +0 -1
  531. package/dist/components/approval-row.js +0 -27
  532. package/dist/components/channel-view.d.ts +0 -112
  533. package/dist/components/channel-view.d.ts.map +0 -1
  534. package/dist/components/channel-view.js +0 -84
  535. package/dist/components/dashboard-shell.d.ts +0 -51
  536. package/dist/components/dashboard-shell.d.ts.map +0 -1
  537. package/dist/components/dashboard-shell.js +0 -89
  538. package/dist/components/direction.d.ts +0 -2
  539. package/dist/components/direction.d.ts.map +0 -1
  540. package/dist/components/direction.js +0 -1
  541. package/dist/components/expandable-block.d.ts +0 -20
  542. package/dist/components/expandable-block.d.ts.map +0 -1
  543. package/dist/components/expandable-block.js +0 -32
  544. package/dist/components/form.d.ts +0 -42
  545. package/dist/components/form.d.ts.map +0 -1
  546. package/dist/components/form.js +0 -91
  547. package/dist/components/label-system.d.ts +0 -17
  548. package/dist/components/label-system.d.ts.map +0 -1
  549. package/dist/components/label-system.js +0 -21
  550. package/dist/components/memory-item.d.ts +0 -21
  551. package/dist/components/memory-item.d.ts.map +0 -1
  552. package/dist/components/memory-item.js +0 -18
  553. package/dist/components/menubar.d.ts +0 -43
  554. package/dist/components/menubar.d.ts.map +0 -1
  555. package/dist/components/menubar.js +0 -69
  556. package/dist/components/navigation-menu.d.ts +0 -26
  557. package/dist/components/navigation-menu.d.ts.map +0 -1
  558. package/dist/components/navigation-menu.js +0 -45
  559. package/dist/components/pagination.d.ts +0 -33
  560. package/dist/components/pagination.d.ts.map +0 -1
  561. package/dist/components/pagination.js +0 -41
  562. package/dist/components/plugin-slot-boundary.d.ts +0 -42
  563. package/dist/components/plugin-slot-boundary.d.ts.map +0 -1
  564. package/dist/components/plugin-slot-boundary.js +0 -41
  565. package/dist/components/status-row.d.ts +0 -32
  566. package/dist/components/status-row.d.ts.map +0 -1
  567. package/dist/components/status-row.js +0 -35
@@ -1,21 +1,52 @@
1
1
  import type { ComponentProps } from "react";
2
2
  type StatusTone = "good" | "muted" | "warn" | "bad";
3
- interface StatusDotProps extends ComponentProps<"span"> {
3
+ type StatusDotName = {
4
+ label: string;
5
+ showLabel?: boolean;
6
+ decorative?: never;
7
+ } | {
8
+ decorative: true;
9
+ label?: never;
10
+ showLabel?: never;
11
+ };
12
+ type StatusDotProps = Omit<ComponentProps<"span">, "children" | "role" | "title" | "aria-hidden" | "aria-label" | "aria-labelledby"> & {
4
13
  tone: StatusTone;
5
- }
14
+ } & StatusDotName;
6
15
  /**
7
- * A small still dot beside a word that already names the state.
16
+ * A small still dot for one state, named by its label or by the word beside it.
8
17
  *
9
18
  * @family Status
10
- * @when A small mark in dense chrome, beside a word that already names the state: a channel, a
11
- * machine in a list.
12
- * @instead A status that stands alone is a `StatusBadge`. Something in motion is the waiting line
13
- * or an Agent's orb; the dot has no info tone.
14
- * @behaviour Still; never pulses. Tones are `good`, `muted`, `warn`, `bad`, at full strength.
15
- * @words None of its own. The word beside it says the state.
16
- * @access Always `aria-hidden`. If the word is missing, the state is missing.
19
+ * @when "Deployment lifecycle only. `state` accepts `QUEUED | BUILDING | READY | ERROR | CANCELED | DELETED`." (https://vercel.com/geist/status-dot)
20
+ * Ours: any one state in dense chrome (a channel, a machine in a list), set as `tone`. It always
21
+ * says which state it shows: `label` names it (*Ready*), and `decorative` stands for a word beside
22
+ * it that already does. The type asks for one of the two.
23
+ * "Don’t flash the color through every transitional state on a polling tick; only update when the readyState changes." (https://vercel.com/geist/status-dot)
24
+ * Ours: pick the tone from the state and keep it until the state changes.
25
+ * @instead "For non-deployment statuses (Workflow runs, Queue messages, Sandbox, Cron jobs), use a `Badge` with the canonical state vocabulary instead of repurposing the dot." (https://vercel.com/geist/status-dot)
26
+ * Ours: that `Badge` is `StatusBadge`; so is a status that stands alone, or one that needs a mark
27
+ * and a word.
28
+ * "For health summaries that need a number (uptime, hit rate), use `Gauge`; for in-flight work with a knowable total, use `Progress`." (https://vercel.com/geist/status-dot)
29
+ * Ours: something in motion is the waiting line or an Agent's orb; the dot has no info tone.
30
+ * @behaviour "The dot animates while `BUILDING` or `QUEUED` and goes static once the deployment reaches a terminal state." (https://vercel.com/geist/status-dot)
31
+ * "Don’t add a separate spinner alongside it." (https://vercel.com/geist/status-dot) Ours: still,
32
+ * even while a state is in progress: it never pulses. A 10 px dot; tones are `good`, `muted`,
33
+ * `warn`, `bad`, at full strength. Colour sits on the dot alone: with `showLabel` the word beside
34
+ * it is 14 px and neutral, never in the tone's colour. `label` alone draws the dot with the word as
35
+ * its name and tooltip; `showLabel` draws the word 8 px after it, for a dot with no other text
36
+ * around it.
37
+ * @words "Use `label` only when the dot stands alone without surrounding text; Geist sentence-cases the state for you (`Building`, `Ready`, `Error`)." (https://vercel.com/geist/status-dot)
38
+ * Ours: `label` is the required name unless the dot is `decorative`, and we write it in sentence
39
+ * case ourselves: *Ready*, *Error*, *Canceled*.
40
+ * "Don’t wrap the dot in extra prose like `Status: Ready`. The label already names the state." (https://vercel.com/geist/status-dot)
41
+ * @access "The component composes its own `aria-label` from `titlePrefix` plus the state message; don’t override it with a generic `aria-label="status"`." (https://vercel.com/geist/status-dot)
42
+ * Ours: there is no `titlePrefix` and no `aria-label` prop; `label` is the dot's name, an image
43
+ * role with that name.
44
+ * "When the dot sits inline with text that already names the state, mark the dot decorative with `aria-hidden` so screen readers don’t announce it twice." (https://vercel.com/geist/status-dot)
45
+ * Ours: `decorative` does it; the word beside the dot must name the state, and if that word is
46
+ * missing, the state is missing.
47
+ * "Color is not the only signal: every state ships with a distinct title and label so colorblind users get the same information." (https://vercel.com/geist/status-dot)
17
48
  */
18
- declare function StatusDot({ className, tone, ...props }: StatusDotProps): import("react").JSX.Element;
49
+ declare function StatusDot({ className, tone, label, showLabel, decorative, ...props }: StatusDotProps): import("react").JSX.Element;
19
50
  export { StatusDot };
20
51
  export type { StatusTone };
21
52
  //# sourceMappingURL=status-dot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"status-dot.d.ts","sourceRoot":"","sources":["../../src/components/status-dot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAQpD,UAAU,cAAe,SAAQ,cAAc,CAAC,MAAM,CAAC;IACrD,IAAI,EAAE,UAAU,CAAC;CAClB;AACD;;;;;;;;;;;GAWG;AACH,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,+BAU/D;AACD,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"status-dot.d.ts","sourceRoot":"","sources":["../../src/components/status-dot.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,KAAK,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,MAAM,GAAG,KAAK,CAAC;AAUpD,KAAK,aAAa,GACd;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAAC,UAAU,CAAC,EAAE,KAAK,CAAA;CAAE,GAC1D;IAAE,UAAU,EAAE,IAAI,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAC;IAAC,SAAS,CAAC,EAAE,KAAK,CAAA;CAAE,CAAC;AAE3D,KAAK,cAAc,GAAG,IAAI,CACxB,cAAc,CAAC,MAAM,CAAC,EACtB,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,GAAG,YAAY,GAAG,iBAAiB,CACjF,GAAG;IACF,IAAI,EAAE,UAAU,CAAC;CAClB,GAAG,aAAa,CAAC;AAElB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,iBAAS,SAAS,CAAC,EACjB,SAAS,EACT,IAAI,EACJ,KAAK,EACL,SAAiB,EACjB,UAAU,EACV,GAAG,KAAK,EACT,EAAE,cAAc,+BAuChB;AACD,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,UAAU,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/utils.js";
3
3
  const TONE_BG_CLASS = {
4
4
  good: "bg-success",
@@ -6,19 +6,48 @@ const TONE_BG_CLASS = {
6
6
  warn: "bg-warning",
7
7
  bad: "bg-destructive",
8
8
  };
9
+ const DOT_CLASS = "inline-block size-2.5 shrink-0 rounded-full";
9
10
  /**
10
- * A small still dot beside a word that already names the state.
11
+ * A small still dot for one state, named by its label or by the word beside it.
11
12
  *
12
13
  * @family Status
13
- * @when A small mark in dense chrome, beside a word that already names the state: a channel, a
14
- * machine in a list.
15
- * @instead A status that stands alone is a `StatusBadge`. Something in motion is the waiting line
16
- * or an Agent's orb; the dot has no info tone.
17
- * @behaviour Still; never pulses. Tones are `good`, `muted`, `warn`, `bad`, at full strength.
18
- * @words None of its own. The word beside it says the state.
19
- * @access Always `aria-hidden`. If the word is missing, the state is missing.
14
+ * @when "Deployment lifecycle only. `state` accepts `QUEUED | BUILDING | READY | ERROR | CANCELED | DELETED`." (https://vercel.com/geist/status-dot)
15
+ * Ours: any one state in dense chrome (a channel, a machine in a list), set as `tone`. It always
16
+ * says which state it shows: `label` names it (*Ready*), and `decorative` stands for a word beside
17
+ * it that already does. The type asks for one of the two.
18
+ * "Don’t flash the color through every transitional state on a polling tick; only update when the readyState changes." (https://vercel.com/geist/status-dot)
19
+ * Ours: pick the tone from the state and keep it until the state changes.
20
+ * @instead "For non-deployment statuses (Workflow runs, Queue messages, Sandbox, Cron jobs), use a `Badge` with the canonical state vocabulary instead of repurposing the dot." (https://vercel.com/geist/status-dot)
21
+ * Ours: that `Badge` is `StatusBadge`; so is a status that stands alone, or one that needs a mark
22
+ * and a word.
23
+ * "For health summaries that need a number (uptime, hit rate), use `Gauge`; for in-flight work with a knowable total, use `Progress`." (https://vercel.com/geist/status-dot)
24
+ * Ours: something in motion is the waiting line or an Agent's orb; the dot has no info tone.
25
+ * @behaviour "The dot animates while `BUILDING` or `QUEUED` and goes static once the deployment reaches a terminal state." (https://vercel.com/geist/status-dot)
26
+ * "Don’t add a separate spinner alongside it." (https://vercel.com/geist/status-dot) Ours: still,
27
+ * even while a state is in progress: it never pulses. A 10 px dot; tones are `good`, `muted`,
28
+ * `warn`, `bad`, at full strength. Colour sits on the dot alone: with `showLabel` the word beside
29
+ * it is 14 px and neutral, never in the tone's colour. `label` alone draws the dot with the word as
30
+ * its name and tooltip; `showLabel` draws the word 8 px after it, for a dot with no other text
31
+ * around it.
32
+ * @words "Use `label` only when the dot stands alone without surrounding text; Geist sentence-cases the state for you (`Building`, `Ready`, `Error`)." (https://vercel.com/geist/status-dot)
33
+ * Ours: `label` is the required name unless the dot is `decorative`, and we write it in sentence
34
+ * case ourselves: *Ready*, *Error*, *Canceled*.
35
+ * "Don’t wrap the dot in extra prose like `Status: Ready`. The label already names the state." (https://vercel.com/geist/status-dot)
36
+ * @access "The component composes its own `aria-label` from `titlePrefix` plus the state message; don’t override it with a generic `aria-label="status"`." (https://vercel.com/geist/status-dot)
37
+ * Ours: there is no `titlePrefix` and no `aria-label` prop; `label` is the dot's name, an image
38
+ * role with that name.
39
+ * "When the dot sits inline with text that already names the state, mark the dot decorative with `aria-hidden` so screen readers don’t announce it twice." (https://vercel.com/geist/status-dot)
40
+ * Ours: `decorative` does it; the word beside the dot must name the state, and if that word is
41
+ * missing, the state is missing.
42
+ * "Color is not the only signal: every state ships with a distinct title and label so colorblind users get the same information." (https://vercel.com/geist/status-dot)
20
43
  */
21
- function StatusDot({ className, tone, ...props }) {
22
- return (_jsx("span", { "aria-hidden": "true", className: cn("inline-block size-1.5 rounded-full", TONE_BG_CLASS[tone], className), "data-slot": "status-dot", "data-tone": tone, ...props }));
44
+ function StatusDot({ className, tone, label, showLabel = false, decorative, ...props }) {
45
+ if (decorative) {
46
+ return (_jsx("span", { ...props, "aria-hidden": "true", className: cn(DOT_CLASS, TONE_BG_CLASS[tone], className), "data-slot": "status-dot", "data-tone": tone }));
47
+ }
48
+ if (showLabel) {
49
+ return (_jsxs("span", { ...props, className: cn("inline-flex items-center gap-2 text-sm leading-4 text-foreground", className), "data-slot": "status-dot", "data-tone": tone, children: [_jsx("span", { "aria-hidden": "true", className: cn(DOT_CLASS, TONE_BG_CLASS[tone]) }), label] }));
50
+ }
51
+ return (_jsx("span", { ...props, "aria-label": label, className: cn(DOT_CLASS, TONE_BG_CLASS[tone], className), "data-slot": "status-dot", "data-tone": tone, role: "img", title: label }));
23
52
  }
24
53
  export { StatusDot };
@@ -1,21 +1,52 @@
1
1
  import { Switch as SwitchPrimitive } from "@base-ui/react/switch";
2
+ import { type ControlName } from "../internal/control-name.js";
2
3
  /**
3
4
  * A setting that is on or off.
4
5
  *
5
6
  * @family Choices
6
- * @when A setting that is either on or off, inside a settings section that saves.
7
- * @instead Choosing or agreeing to something is a `Checkbox`. A tool button that stays pressed is a
8
- * `Toggle`. Choosing between named values is a `RadioGroup`.
9
- * @behaviour Off is the input grey, on is ink; the thumb travels 16 px. Space flips it. On a
10
- * settings page the change waits for the section's Save, which lights up; only Theme and Language
11
- * in the account menu apply at once. A failed save leaves the switch showing the true state.
12
- * @words The label names what on means: *Approvals*, with help saying when. Never *Enable
13
- * approvals*, and no On/Off text beside the switch.
14
- * @access `role="switch"` with `aria-checked`. The name is the visible label and stays the same in
15
- * both states. `sm` only inside a dense row.
7
+ * @when "Use Toggle for a single boolean setting where ON takes effect immediately, like `Password
8
+ * Protection` or `Auto-Cancel Builds`." (https://vercel.com/geist/toggle) Ours: Geist's `Toggle` is
9
+ * our `Switch`, inside a settings section.
10
+ * @instead "Switch to `Checkbox` for a multi-select list, or to `Switch` for 2–3 mutually exclusive
11
+ * views." (https://vercel.com/geist/toggle) Ours: Geist's `Switch` is our `SegmentedControl`. A
12
+ * tool button that stays pressed is a `ToggleGroup`. Choosing between named values is a
13
+ * `RadioGroup`.
14
+ * @behaviour "`checked` is required and the component is controlled. Own the state and update it
15
+ * from `onChange`." (https://vercel.com/geist/toggle) "Persist on change and surface the result in
16
+ * a `useToasts().success(…)` toast (`Password protection enabled`); don’t leave the user wondering
17
+ * whether the flip stuck." (https://vercel.com/geist/toggle) "Pair with a form footer only when the
18
+ * setting needs an explicit `Save` step." (https://vercel.com/geist/toggle) "Disable Toggle only
19
+ * when the action is impossible (missing plan, locked policy); pair with helper text or a `Tooltip`
20
+ * that names the resolver." (https://vercel.com/geist/toggle) Ours: `checked` is optional, since a
21
+ * switch also runs uncontrolled with `defaultChecked`; the toast is raised with `showMessageToast`;
22
+ * the reason for a disabled switch is written in the card's footer, and it is left off. Always
23
+ * named: `aria-label` or `aria-labelledby`, or an `id` that a `FieldLabel`'s `htmlFor` points at,
24
+ * and a switch with none of them does not compile. A bare `Switch` is the 28 by 14 px track with an
25
+ * 11 px thumb; `md` is 36 by 20 px and `lg` 40 by 24 px. Colour: off is the input grey, on is
26
+ * ink, and a disabled switch turns grey, on or off, with a greyer thumb and no shadow. Space flips
27
+ * it. On a settings page it applies at once and the product's toast confirms it, in one of two
28
+ * places: in the card's header at the right of the title when the switch is the whole card, the
29
+ * footer holding only its line, or at the end of a row of a card of several settings, the label to
30
+ * its left. A failed change leaves the switch showing the true state.
31
+ * @words "The label is `children`, not a `label` prop. Title Case noun phrase, 1–4 words, naming
32
+ * what is true when ON: `Password Protection`, not `Enable Password Protection`."
33
+ * (https://vercel.com/geist/toggle) "Render an optional one-sentence description as a sibling under
34
+ * the label that explains ON only." (https://vercel.com/geist/toggle) "Don’t describe OFF; it’s the
35
+ * negation." (https://vercel.com/geist/toggle) "Keep `labelCasing="title"` (the default) so labels
36
+ * match other Title Case surfaces." (https://vercel.com/geist/toggle) "Use `labelCasing="normal"`
37
+ * only when sentence-case content sits inline next to the toggle."
38
+ * (https://vercel.com/geist/toggle) Ours: the label is 12 px at medium weight, in sentence case:
39
+ * *Approvals*, with the card's description in one sentence. The state word is a separate word
40
+ * beside the switch, not its name.
41
+ * @access "Provide an accessible name through `children`, `aria-label`, or `aria-labelledby`."
42
+ * (https://vercel.com/geist/toggle) "Geist warns in development if all three are missing."
43
+ * (https://vercel.com/geist/toggle) "Set `aria-label` only when the visible label sits elsewhere on
44
+ * the row; otherwise let `children` carry it so sighted and screen-reader copy stay aligned."
45
+ * (https://vercel.com/geist/toggle) Ours: `role="switch"` with `aria-checked`, the name the same in
46
+ * both states; a missing name does not compile.
16
47
  */
17
- declare function Switch({ className, size, ...props }: SwitchPrimitive.Root.Props & {
18
- size?: "sm" | "default";
48
+ declare function Switch({ className, size, ...props }: SwitchPrimitive.Root.Props & ControlName & {
49
+ size?: "sm" | "md" | "lg";
19
50
  }): import("react").JSX.Element;
20
51
  export { Switch };
21
52
  //# sourceMappingURL=switch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAIlE;;;;;;;;;;;;;;GAcG;AACH,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,GAAG;IAC9B,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAC;CACzB,+BAiBA;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"switch.d.ts","sourceRoot":"","sources":["../../src/components/switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAGlE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,iBAAS,MAAM,CAAC,EACd,SAAS,EACT,IAAW,EACX,GAAG,KAAK,EACT,EAAE,eAAe,CAAC,IAAI,CAAC,KAAK,GAC3B,WAAW,GAAG;IACZ,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;CAC3B,+BAiBF;AAED,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -5,18 +5,48 @@ import { cn } from "../lib/utils.js";
5
5
  * A setting that is on or off.
6
6
  *
7
7
  * @family Choices
8
- * @when A setting that is either on or off, inside a settings section that saves.
9
- * @instead Choosing or agreeing to something is a `Checkbox`. A tool button that stays pressed is a
10
- * `Toggle`. Choosing between named values is a `RadioGroup`.
11
- * @behaviour Off is the input grey, on is ink; the thumb travels 16 px. Space flips it. On a
12
- * settings page the change waits for the section's Save, which lights up; only Theme and Language
13
- * in the account menu apply at once. A failed save leaves the switch showing the true state.
14
- * @words The label names what on means: *Approvals*, with help saying when. Never *Enable
15
- * approvals*, and no On/Off text beside the switch.
16
- * @access `role="switch"` with `aria-checked`. The name is the visible label and stays the same in
17
- * both states. `sm` only inside a dense row.
8
+ * @when "Use Toggle for a single boolean setting where ON takes effect immediately, like `Password
9
+ * Protection` or `Auto-Cancel Builds`." (https://vercel.com/geist/toggle) Ours: Geist's `Toggle` is
10
+ * our `Switch`, inside a settings section.
11
+ * @instead "Switch to `Checkbox` for a multi-select list, or to `Switch` for 2–3 mutually exclusive
12
+ * views." (https://vercel.com/geist/toggle) Ours: Geist's `Switch` is our `SegmentedControl`. A
13
+ * tool button that stays pressed is a `ToggleGroup`. Choosing between named values is a
14
+ * `RadioGroup`.
15
+ * @behaviour "`checked` is required and the component is controlled. Own the state and update it
16
+ * from `onChange`." (https://vercel.com/geist/toggle) "Persist on change and surface the result in
17
+ * a `useToasts().success(…)` toast (`Password protection enabled`); don’t leave the user wondering
18
+ * whether the flip stuck." (https://vercel.com/geist/toggle) "Pair with a form footer only when the
19
+ * setting needs an explicit `Save` step." (https://vercel.com/geist/toggle) "Disable Toggle only
20
+ * when the action is impossible (missing plan, locked policy); pair with helper text or a `Tooltip`
21
+ * that names the resolver." (https://vercel.com/geist/toggle) Ours: `checked` is optional, since a
22
+ * switch also runs uncontrolled with `defaultChecked`; the toast is raised with `showMessageToast`;
23
+ * the reason for a disabled switch is written in the card's footer, and it is left off. Always
24
+ * named: `aria-label` or `aria-labelledby`, or an `id` that a `FieldLabel`'s `htmlFor` points at,
25
+ * and a switch with none of them does not compile. A bare `Switch` is the 28 by 14 px track with an
26
+ * 11 px thumb; `md` is 36 by 20 px and `lg` 40 by 24 px. Colour: off is the input grey, on is
27
+ * ink, and a disabled switch turns grey, on or off, with a greyer thumb and no shadow. Space flips
28
+ * it. On a settings page it applies at once and the product's toast confirms it, in one of two
29
+ * places: in the card's header at the right of the title when the switch is the whole card, the
30
+ * footer holding only its line, or at the end of a row of a card of several settings, the label to
31
+ * its left. A failed change leaves the switch showing the true state.
32
+ * @words "The label is `children`, not a `label` prop. Title Case noun phrase, 1–4 words, naming
33
+ * what is true when ON: `Password Protection`, not `Enable Password Protection`."
34
+ * (https://vercel.com/geist/toggle) "Render an optional one-sentence description as a sibling under
35
+ * the label that explains ON only." (https://vercel.com/geist/toggle) "Don’t describe OFF; it’s the
36
+ * negation." (https://vercel.com/geist/toggle) "Keep `labelCasing="title"` (the default) so labels
37
+ * match other Title Case surfaces." (https://vercel.com/geist/toggle) "Use `labelCasing="normal"`
38
+ * only when sentence-case content sits inline next to the toggle."
39
+ * (https://vercel.com/geist/toggle) Ours: the label is 12 px at medium weight, in sentence case:
40
+ * *Approvals*, with the card's description in one sentence. The state word is a separate word
41
+ * beside the switch, not its name.
42
+ * @access "Provide an accessible name through `children`, `aria-label`, or `aria-labelledby`."
43
+ * (https://vercel.com/geist/toggle) "Geist warns in development if all three are missing."
44
+ * (https://vercel.com/geist/toggle) "Set `aria-label` only when the visible label sits elsewhere on
45
+ * the row; otherwise let `children` carry it so sighted and screen-reader copy stay aligned."
46
+ * (https://vercel.com/geist/toggle) Ours: `role="switch"` with `aria-checked`, the name the same in
47
+ * both states; a missing name does not compile.
18
48
  */
19
- function Switch({ className, size = "default", ...props }) {
20
- return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", "data-size": size, className: cn("nc-transition-paint peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent p-px after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-x-1/2 after:-translate-y-1/2 aria-invalid:border-destructive data-[size=default]:h-5 data-[size=default]:w-9 data-[size=sm]:h-4 data-[size=sm]:w-7 data-checked:bg-primary data-unchecked:bg-input data-disabled:cursor-not-allowed data-disabled:opacity-50 [@media(hover:hover)_and_(pointer:fine)]:after:hidden", className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: "nc-transition-transform pointer-events-none block rounded-full bg-background ring-0 group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-full group-data-[size=sm]/switch:data-checked:translate-x-full group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0" }) }));
49
+ function Switch({ className, size = "sm", ...props }) {
50
+ return (_jsx(SwitchPrimitive.Root, { "data-slot": "switch", "data-size": size, className: cn("nc-transition-paint peer group/switch relative inline-flex shrink-0 items-start rounded-full border border-transparent p-0 after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-x-1/2 after:-translate-y-1/2 aria-invalid:border-destructive data-[size=sm]:h-3.5 data-[size=sm]:w-7 data-[size=md]:h-5 data-[size=md]:w-9 data-[size=lg]:h-6 data-[size=lg]:w-10 data-checked:bg-primary data-unchecked:bg-input data-disabled:cursor-not-allowed data-disabled:data-checked:bg-input/50 [@media(hover:hover)_and_(pointer:fine)]:after:hidden", className), ...props, children: _jsx(SwitchPrimitive.Thumb, { "data-slot": "switch-thumb", className: "pointer-events-none mt-px block rounded-full bg-background ring-0 nc-transition-transform not-data-disabled:nc-elevation-resting group-data-[size=sm]/switch:ml-px group-data-[size=sm]/switch:size-2.75 group-data-[size=md]/switch:size-4.25 group-data-[size=lg]/switch:ml-px group-data-[size=lg]/switch:size-5.25 group-data-[size=sm]/switch:data-checked:translate-x-3.5 group-data-[size=md]/switch:data-checked:translate-x-4.25 group-data-[size=lg]/switch:data-checked:translate-x-4 data-disabled:bg-muted data-unchecked:translate-x-0" }) }));
21
51
  }
22
52
  export { Switch };
@@ -1,8 +1,9 @@
1
1
  import * as React from "react";
2
+ import { type CollectionNote } from "../internal/collection-note.js";
2
3
  import { type CardSurface } from "./card.js";
3
4
  /**
4
- * The frame a collection's table sits in: a heading, the collection's own
5
- * toolbar under it, the table, a labelled total, and the recessed footer strip.
5
+ * The frame a collection's table sits in: a heading with the collection's own
6
+ * toolbar at its trailing edge, the table, a labelled total, and the recessed footer strip.
6
7
  *
7
8
  * The Portal's DataTable and Nadia's record sections draw this one frame, so a
8
9
  * registry card ends the same way in both products.
@@ -12,27 +13,35 @@ import { type CardSurface } from "./card.js";
12
13
  * the recessed footer strip.
13
14
  * @instead An entity collection that is the page's whole job is `CollectionPage`. A chart is
14
15
  * `ChartCard`. One object's facts are `SettingsFactsSection`.
15
- * @behaviour The heading, the toolbar and a separator come first when given; the summary row is a
16
- * labelled total under the table; the footer strip holds the hint on the left and the count or
17
- * paging on the right.
18
- * @words The title names the collection. The footer is a count or the paging; the summary is a
19
- * labelled total. Never a help sentence in the footer.
16
+ * @behaviour The heading and a separator come first when given, the toolbar on the heading's row at
17
+ * its trailing edge, title left and controls right, as Vercel heads a card's list; on a card under
18
+ * 576 px the toolbar takes its own line under the title. The table's first and last columns stand
19
+ * in from the card's edges by the card's spacing, so the first column lines up with the title. The summary row is a
20
+ * labelled total under the table, padded like a table footer so its label lines up with the first
21
+ * column and set in ink, medium text; the footer strip holds the hint on the left and the count or
22
+ * paging on the right. A `note` about the whole list stands in a strip of its own under that one:
23
+ * one muted line with an optional *Learn more* at the left and one secondary action at the right,
24
+ * as Vercel ends a deployments list ("Deployment Retention is enabled", *View Recently Deleted*).
25
+ * @words “Pagination labels are `Previous` and `Next`. Page-count copy reads `Page 2 of 7` or `21–40 of 142` with an en-dash inside the range.” (https://vercel.com/geist/table)
26
+ * Ours: the title names the collection. The footer is a count or the paging; the summary is a labelled total. Never a help sentence in the footer.
20
27
  * @access A `section` whose title is an `h2`; the summary is a `dl`.
21
28
  */
22
- declare function TableCard({ title, description, actions, toolbar, summary, footer, footerHint, children, className, surface, ...props }: Omit<React.ComponentProps<"section">, "title"> & {
29
+ declare function TableCard({ title, description, actions, toolbar, summary, footer, footerHint, note, children, className, surface, ...props }: Omit<React.ComponentProps<"section">, "title"> & {
23
30
  title?: React.ReactNode;
24
31
  description?: React.ReactNode;
25
32
  actions?: React.ReactNode;
26
- /** The collection's search, filters and actions, under the heading and above the table. */
33
+ /** The collection's search, filters and actions, on the heading's row at its trailing edge. */
27
34
  toolbar?: React.ReactNode;
28
35
  /** A labelled total under the table. */
29
36
  summary?: {
30
37
  label: React.ReactNode;
31
38
  value: React.ReactNode;
32
- };
39
+ } | undefined;
33
40
  footer?: React.ReactNode;
34
41
  footerHint?: React.ReactNode;
35
- surface?: CardSurface;
42
+ /** The note about the whole list, in its own strip under the count and the paging: a line, Learn more, one secondary action. */
43
+ note?: CollectionNote | undefined;
44
+ surface?: CardSurface | undefined;
36
45
  }): React.JSX.Element;
37
- export { TableCard };
46
+ export { TableCard, type CollectionNote };
38
47
  //# sourceMappingURL=table-card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-card.d.ts","sourceRoot":"","sources":["../../src/components/table-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAA4D,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAGpG;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,WAAW,EACX,OAAO,EACP,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,QAAQ,EACR,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,2FAA2F;IAC3F,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wCAAwC;IACxC,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,CAAC;IAC7D,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,WAAW,CAAC;CACvB,qBA8CA;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
1
+ {"version":3,"file":"table-card.d.ts","sourceRoot":"","sources":["../../src/components/table-card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAuB,KAAK,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAEtF,OAAO,EAA4D,KAAK,WAAW,EAAE,MAAM,QAAQ,CAAC;AAGpG;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,WAAW,EACX,OAAO,EACP,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,SAAS,EACT,OAAmB,EACnB,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG;IAClD,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,+FAA+F;IAC/F,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,wCAAwC;IACxC,OAAO,CAAC,EAAE;QAAE,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;QAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,GAAG,SAAS,CAAC;IACzE,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC7B,gIAAgI;IAChI,IAAI,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IAClC,OAAO,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CACnC,qBA0DA;AAED,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,CAAC"}
@@ -1,11 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
2
  import { cn } from "../lib/utils.js";
3
+ import { CollectionNoteStrip } from "../internal/collection-note.js";
3
4
  import { FooterStrip } from "../internal/footer-strip.js";
4
5
  import { Card, CardAction, CardDescription, CardHeader, CardTitle } from "./card.js";
5
6
  import { Separator } from "./separator.js";
6
7
  /**
7
- * The frame a collection's table sits in: a heading, the collection's own
8
- * toolbar under it, the table, a labelled total, and the recessed footer strip.
8
+ * The frame a collection's table sits in: a heading with the collection's own
9
+ * toolbar at its trailing edge, the table, a labelled total, and the recessed footer strip.
9
10
  *
10
11
  * The Portal's DataTable and Nadia's record sections draw this one frame, so a
11
12
  * registry card ends the same way in both products.
@@ -15,15 +16,22 @@ import { Separator } from "./separator.js";
15
16
  * the recessed footer strip.
16
17
  * @instead An entity collection that is the page's whole job is `CollectionPage`. A chart is
17
18
  * `ChartCard`. One object's facts are `SettingsFactsSection`.
18
- * @behaviour The heading, the toolbar and a separator come first when given; the summary row is a
19
- * labelled total under the table; the footer strip holds the hint on the left and the count or
20
- * paging on the right.
21
- * @words The title names the collection. The footer is a count or the paging; the summary is a
22
- * labelled total. Never a help sentence in the footer.
19
+ * @behaviour The heading and a separator come first when given, the toolbar on the heading's row at
20
+ * its trailing edge, title left and controls right, as Vercel heads a card's list; on a card under
21
+ * 576 px the toolbar takes its own line under the title. The table's first and last columns stand
22
+ * in from the card's edges by the card's spacing, so the first column lines up with the title. The summary row is a
23
+ * labelled total under the table, padded like a table footer so its label lines up with the first
24
+ * column and set in ink, medium text; the footer strip holds the hint on the left and the count or
25
+ * paging on the right. A `note` about the whole list stands in a strip of its own under that one:
26
+ * one muted line with an optional *Learn more* at the left and one secondary action at the right,
27
+ * as Vercel ends a deployments list ("Deployment Retention is enabled", *View Recently Deleted*).
28
+ * @words “Pagination labels are `Previous` and `Next`. Page-count copy reads `Page 2 of 7` or `21–40 of 142` with an en-dash inside the range.” (https://vercel.com/geist/table)
29
+ * Ours: the title names the collection. The footer is a count or the paging; the summary is a labelled total. Never a help sentence in the footer.
23
30
  * @access A `section` whose title is an `h2`; the summary is a `dl`.
24
31
  */
25
- function TableCard({ title, description, actions, toolbar, summary, footer, footerHint, children, className, surface = "resting", ...props }) {
32
+ function TableCard({ title, description, actions, toolbar, summary, footer, footerHint, note, children, className, surface = "resting", ...props }) {
26
33
  const heading = title || description || actions;
27
- return (_jsxs(Card, { render: _jsx("section", { ...props, "data-slot": "table-card" }), surface: surface, className: cn("min-w-0 gap-0 py-0", className), children: [(heading || toolbar) && (_jsxs(_Fragment, { children: [heading && (_jsxs(CardHeader, { className: cn("pt-(--card-spacing)", !toolbar && "pb-(--card-spacing)"), children: [title && (_jsx(CardTitle, { children: _jsx("h2", { children: title }) })), description && _jsx(CardDescription, { children: description }), actions && _jsx(CardAction, { children: actions })] })), toolbar && (_jsx("div", { "data-slot": "table-card-toolbar", className: "px-(--card-spacing) pt-(--card-spacing)", children: toolbar })), _jsx(Separator, {})] })), _jsx("div", { "data-slot": "table-card-body", className: "min-w-0", children: children }), summary && (_jsxs("dl", { "data-slot": "table-card-summary", className: "flex min-w-0 items-start justify-between gap-4 border-t border-border px-4 py-3 text-sm font-medium", children: [_jsx("dt", { children: summary.label }), _jsx("dd", { className: "text-right tabular-nums", children: summary.value })] })), _jsx(FooterStrip, { hint: footerHint, hintSlot: "table-card-hint", children: footer })] }));
34
+ return (_jsxs(Card, { render: _jsx("section", { ...props, "data-slot": "table-card" }), surface: surface, className: cn("min-w-0 gap-0 py-0", className), children: [(heading || toolbar) && (_jsxs(_Fragment, { children: [_jsxs(CardHeader, { className: "py-(--card-spacing)", children: [title && (_jsx(CardTitle, { children: _jsx("h2", { children: title }) })), description && _jsx(CardDescription, { children: description }), actions || toolbar ? (_jsxs(CardAction, { className: cn("flex min-w-0 items-center gap-2", toolbar &&
35
+ "@max-xl/card-header:col-span-2 @max-xl/card-header:col-start-1 @max-xl/card-header:row-span-1 @max-xl/card-header:row-start-auto @max-xl/card-header:justify-self-stretch"), children: [actions, toolbar ? (_jsx("div", { "data-slot": "table-card-toolbar", className: "min-w-0 flex-1", children: toolbar })) : null] })) : null] }), _jsx(Separator, {})] })), _jsx("div", { "data-slot": "table-card-body", className: "min-w-0 [&_[data-slot=table-cell]:first-child]:pl-(--card-spacing) [&_[data-slot=table-cell]:last-child]:pr-(--card-spacing) [&_[data-slot=table-head]:first-child]:pl-(--card-spacing) [&_[data-slot=table-head]:last-child]:pr-(--card-spacing)", children: children }), summary && (_jsxs("dl", { "data-slot": "table-card-summary", className: "flex min-w-0 items-start justify-between gap-4 border-t border-border px-(--card-spacing) py-2.5 text-sm font-medium", children: [_jsx("dt", { children: summary.label }), _jsx("dd", { className: "text-right tabular-nums", children: summary.value })] })), _jsx(FooterStrip, { hint: footerHint, hintSlot: "table-card-hint", children: footer }), note ? _jsx(CollectionNoteStrip, { note: note }) : null] }));
28
36
  }
29
37
  export { TableCard };
@@ -1,28 +1,60 @@
1
1
  export declare const tableCompactLayouts: {
2
+ /** Only by request: a row that must stay one line on any card wider than a phone's. */
3
+ readonly narrow: {
4
+ readonly width: 448;
5
+ readonly column: "hidden @md/table:table-cell";
6
+ readonly track: "hidden @md/table:table-column";
7
+ readonly row: "@max-md/table:[&>td]:border-b-0 @max-md/table:[&>td]:after:hidden @max-md/table:h-auto! @max-md/table:[&>td]:pb-1!";
8
+ readonly details: "@md/table:hidden";
9
+ readonly table: "@max-md/table:table-auto @max-md/table:[&_td]:whitespace-normal @max-md/table:[&_th:not(:first-child):not([data-identity])]:w-px @max-md/table:[&_tr:not([data-slot=table-detail-row])>td:not(:first-child)]:pl-0 @max-md/table:[&_tr:not([data-slot=table-detail-row])>td:not(:first-child):not(:last-child)]:pr-0";
10
+ };
2
11
  readonly tight: {
12
+ readonly width: 576;
3
13
  readonly column: "hidden @xl/table:table-cell";
4
- readonly row: "@max-xl/table:border-b-0";
14
+ readonly track: "hidden @xl/table:table-column";
15
+ readonly row: "@max-xl/table:[&>td]:border-b-0 @max-xl/table:[&>td]:after:hidden @max-xl/table:h-auto! @max-xl/table:[&>td]:pb-1!";
5
16
  readonly details: "@xl/table:hidden";
6
- readonly table: "@max-xl/table:table-auto @max-xl/table:[&_td]:whitespace-normal @max-xl/table:[&_th:not(:first-child)]:w-px @max-xl/table:[&_th]:px-2 @max-xl/table:[&_td]:px-2 @xl/table:[&_th]:px-4 @xl/table:[&_td]:px-4";
17
+ readonly table: "@max-xl/table:table-auto @max-xl/table:[&_td]:whitespace-normal @max-xl/table:[&_th:not(:first-child):not([data-identity])]:w-px";
7
18
  };
8
19
  readonly standard: {
20
+ readonly width: 768;
9
21
  readonly column: "hidden @3xl/table:table-cell";
10
- readonly row: "@max-3xl/table:border-b-0";
22
+ readonly track: "hidden @3xl/table:table-column";
23
+ readonly row: "@max-3xl/table:[&>td]:border-b-0 @max-3xl/table:[&>td]:after:hidden @max-3xl/table:h-auto! @max-3xl/table:[&>td]:pb-1!";
11
24
  readonly details: "@3xl/table:hidden";
12
- readonly table: "@max-3xl/table:table-auto @max-3xl/table:[&_td]:whitespace-normal @max-3xl/table:[&_th:not(:first-child)]:w-px @max-3xl/table:[&_th]:px-2 @max-3xl/table:[&_td]:px-2 @3xl/table:[&_th]:px-4 @3xl/table:[&_td]:px-4";
25
+ readonly table: "@max-3xl/table:table-auto @max-3xl/table:[&_td]:whitespace-normal @max-3xl/table:[&_th:not(:first-child):not([data-identity])]:w-px";
13
26
  };
14
27
  readonly wide: {
28
+ readonly width: 1024;
15
29
  readonly column: "hidden @5xl/table:table-cell";
16
- readonly row: "@max-5xl/table:border-b-0";
30
+ readonly track: "hidden @5xl/table:table-column";
31
+ readonly row: "@max-5xl/table:[&>td]:border-b-0 @max-5xl/table:[&>td]:after:hidden @max-5xl/table:h-auto! @max-5xl/table:[&>td]:pb-1!";
17
32
  readonly details: "@5xl/table:hidden";
18
- readonly table: "@max-5xl/table:table-auto @max-5xl/table:[&_td]:whitespace-normal @max-5xl/table:[&_th:not(:first-child)]:w-px @max-5xl/table:[&_th]:px-2 @max-5xl/table:[&_td]:px-2 @5xl/table:[&_th]:px-4 @5xl/table:[&_td]:px-4";
33
+ readonly table: "@max-5xl/table:table-auto @max-5xl/table:[&_td]:whitespace-normal @max-5xl/table:[&_th:not(:first-child):not([data-identity])]:w-px";
34
+ };
35
+ readonly roomy: {
36
+ readonly width: 1088;
37
+ readonly column: "hidden @min-[68rem]/table:table-cell";
38
+ readonly track: "hidden @min-[68rem]/table:table-column";
39
+ readonly row: "@max-[68rem]/table:[&>td]:border-b-0 @max-[68rem]/table:[&>td]:after:hidden @max-[68rem]/table:h-auto! @max-[68rem]/table:[&>td]:pb-1!";
40
+ readonly details: "@min-[68rem]/table:hidden";
41
+ readonly table: "@max-[68rem]/table:table-auto @max-[68rem]/table:[&_td]:whitespace-normal @max-[68rem]/table:[&_th:not(:first-child):not([data-identity])]:w-px";
19
42
  };
20
43
  readonly spacious: {
44
+ readonly width: 1152;
21
45
  readonly column: "hidden @6xl/table:table-cell";
22
- readonly row: "@max-6xl/table:border-b-0";
46
+ readonly track: "hidden @6xl/table:table-column";
47
+ readonly row: "@max-6xl/table:[&>td]:border-b-0 @max-6xl/table:[&>td]:after:hidden @max-6xl/table:h-auto! @max-6xl/table:[&>td]:pb-1!";
23
48
  readonly details: "@6xl/table:hidden";
24
- readonly table: "@max-6xl/table:table-auto @max-6xl/table:[&_td]:whitespace-normal @max-6xl/table:[&_th:not(:first-child)]:w-px @max-6xl/table:[&_th]:px-2 @max-6xl/table:[&_td]:px-2 @6xl/table:[&_th]:px-4 @6xl/table:[&_td]:px-4";
49
+ readonly table: "@max-6xl/table:table-auto @max-6xl/table:[&_td]:whitespace-normal @max-6xl/table:[&_th:not(:first-child):not([data-identity])]:w-px";
25
50
  };
26
51
  };
27
52
  export type TableCompactLayout = keyof typeof tableCompactLayouts;
53
+ /**
54
+ * The compact layout for columns of these sizes: the narrowest card width at which every sized
55
+ * column, and a floor for each column without a size, still fit. A card narrower than that
56
+ * leaves its secondary columns out of the row: each joins the one muted line under the name, or is
57
+ * dropped.
58
+ */
59
+ export declare function compactLayoutFor(sizes: readonly (number | undefined)[]): TableCompactLayout;
28
60
  //# sourceMappingURL=table-layouts.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"table-layouts.d.ts","sourceRoot":"","sources":["../../src/components/table-layouts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;CA6BtB,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,mBAAmB,CAAC"}
1
+ {"version":3,"file":"table-layouts.d.ts","sourceRoot":"","sources":["../../src/components/table-layouts.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB;IAC9B,uFAAuF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuD/E,CAAC;AAEX,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,mBAAmB,CAAC;AAalE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,kBAAkB,CAG3F"}
@@ -1,26 +1,70 @@
1
1
  export const tableCompactLayouts = {
2
+ /** Only by request: a row that must stay one line on any card wider than a phone's. */
3
+ narrow: {
4
+ width: 448,
5
+ column: "hidden @md/table:table-cell",
6
+ track: "hidden @md/table:table-column",
7
+ row: "@max-md/table:[&>td]:border-b-0 @max-md/table:[&>td]:after:hidden @max-md/table:h-auto! @max-md/table:[&>td]:pb-1!",
8
+ details: "@md/table:hidden",
9
+ table: "@max-md/table:table-auto @max-md/table:[&_td]:whitespace-normal @max-md/table:[&_th:not(:first-child):not([data-identity])]:w-px @max-md/table:[&_tr:not([data-slot=table-detail-row])>td:not(:first-child)]:pl-0 @max-md/table:[&_tr:not([data-slot=table-detail-row])>td:not(:first-child):not(:last-child)]:pr-0",
10
+ },
2
11
  tight: {
12
+ width: 576,
3
13
  column: "hidden @xl/table:table-cell",
4
- row: "@max-xl/table:border-b-0",
14
+ track: "hidden @xl/table:table-column",
15
+ row: "@max-xl/table:[&>td]:border-b-0 @max-xl/table:[&>td]:after:hidden @max-xl/table:h-auto! @max-xl/table:[&>td]:pb-1!",
5
16
  details: "@xl/table:hidden",
6
- table: "@max-xl/table:table-auto @max-xl/table:[&_td]:whitespace-normal @max-xl/table:[&_th:not(:first-child)]:w-px @max-xl/table:[&_th]:px-2 @max-xl/table:[&_td]:px-2 @xl/table:[&_th]:px-4 @xl/table:[&_td]:px-4",
17
+ table: "@max-xl/table:table-auto @max-xl/table:[&_td]:whitespace-normal @max-xl/table:[&_th:not(:first-child):not([data-identity])]:w-px",
7
18
  },
8
19
  standard: {
20
+ width: 768,
9
21
  column: "hidden @3xl/table:table-cell",
10
- row: "@max-3xl/table:border-b-0",
22
+ track: "hidden @3xl/table:table-column",
23
+ row: "@max-3xl/table:[&>td]:border-b-0 @max-3xl/table:[&>td]:after:hidden @max-3xl/table:h-auto! @max-3xl/table:[&>td]:pb-1!",
11
24
  details: "@3xl/table:hidden",
12
- table: "@max-3xl/table:table-auto @max-3xl/table:[&_td]:whitespace-normal @max-3xl/table:[&_th:not(:first-child)]:w-px @max-3xl/table:[&_th]:px-2 @max-3xl/table:[&_td]:px-2 @3xl/table:[&_th]:px-4 @3xl/table:[&_td]:px-4",
25
+ table: "@max-3xl/table:table-auto @max-3xl/table:[&_td]:whitespace-normal @max-3xl/table:[&_th:not(:first-child):not([data-identity])]:w-px",
13
26
  },
14
27
  wide: {
28
+ width: 1024,
15
29
  column: "hidden @5xl/table:table-cell",
16
- row: "@max-5xl/table:border-b-0",
30
+ track: "hidden @5xl/table:table-column",
31
+ row: "@max-5xl/table:[&>td]:border-b-0 @max-5xl/table:[&>td]:after:hidden @max-5xl/table:h-auto! @max-5xl/table:[&>td]:pb-1!",
17
32
  details: "@5xl/table:hidden",
18
- table: "@max-5xl/table:table-auto @max-5xl/table:[&_td]:whitespace-normal @max-5xl/table:[&_th:not(:first-child)]:w-px @max-5xl/table:[&_th]:px-2 @max-5xl/table:[&_td]:px-2 @5xl/table:[&_th]:px-4 @5xl/table:[&_td]:px-4",
33
+ table: "@max-5xl/table:table-auto @max-5xl/table:[&_td]:whitespace-normal @max-5xl/table:[&_th:not(:first-child):not([data-identity])]:w-px",
34
+ },
35
+ roomy: {
36
+ width: 1088,
37
+ column: "hidden @min-[68rem]/table:table-cell",
38
+ track: "hidden @min-[68rem]/table:table-column",
39
+ row: "@max-[68rem]/table:[&>td]:border-b-0 @max-[68rem]/table:[&>td]:after:hidden @max-[68rem]/table:h-auto! @max-[68rem]/table:[&>td]:pb-1!",
40
+ details: "@min-[68rem]/table:hidden",
41
+ table: "@max-[68rem]/table:table-auto @max-[68rem]/table:[&_td]:whitespace-normal @max-[68rem]/table:[&_th:not(:first-child):not([data-identity])]:w-px",
19
42
  },
20
43
  spacious: {
44
+ width: 1152,
21
45
  column: "hidden @6xl/table:table-cell",
22
- row: "@max-6xl/table:border-b-0",
46
+ track: "hidden @6xl/table:table-column",
47
+ row: "@max-6xl/table:[&>td]:border-b-0 @max-6xl/table:[&>td]:after:hidden @max-6xl/table:h-auto! @max-6xl/table:[&>td]:pb-1!",
23
48
  details: "@6xl/table:hidden",
24
- table: "@max-6xl/table:table-auto @max-6xl/table:[&_td]:whitespace-normal @max-6xl/table:[&_th:not(:first-child)]:w-px @max-6xl/table:[&_th]:px-2 @max-6xl/table:[&_td]:px-2 @6xl/table:[&_th]:px-4 @6xl/table:[&_td]:px-4",
49
+ table: "@max-6xl/table:table-auto @max-6xl/table:[&_td]:whitespace-normal @max-6xl/table:[&_th:not(:first-child):not([data-identity])]:w-px",
25
50
  },
26
51
  };
52
+ /** The least a column without a size needs, in pixels: below it the card lays out compact. */
53
+ const UNSIZED_COLUMN_FLOOR = 160;
54
+ const NARROWEST_FIRST = [
55
+ "tight",
56
+ "standard",
57
+ "wide",
58
+ "roomy",
59
+ "spacious",
60
+ ];
61
+ /**
62
+ * The compact layout for columns of these sizes: the narrowest card width at which every sized
63
+ * column, and a floor for each column without a size, still fit. A card narrower than that
64
+ * leaves its secondary columns out of the row: each joins the one muted line under the name, or is
65
+ * dropped.
66
+ */
67
+ export function compactLayoutFor(sizes) {
68
+ const needed = sizes.reduce((sum, size) => sum + (size ?? UNSIZED_COLUMN_FLOOR), 0);
69
+ return NARROWEST_FIRST.find((name) => tableCompactLayouts[name].width >= needed) ?? "spacious";
70
+ }
@@ -20,9 +20,10 @@ export type TableValueProps = {
20
20
  * @family Data
21
21
  * @when Every cell of a `DataTable` whose reading can be missing, zero, out of date, unreadable or still loading.
22
22
  * @instead A whole table that failed to read is `EmptyState kind="failed"`; a figure on its own is a `KpiCard`.
23
- * @behaviour Five states that never collapse into a dash: unknown (a muted dash), zero (the figure "0"), stale (the reading, then the stale word), failed (the warning mark and its words) and loading (a still 64 × 12 placeholder). A real value, `0` included, is shown as it is.
24
- * @words `missingLabel` says what the absence means ("Not reported", never "N/A" or "None"); `staleLabel` is one word ("Stale"); `failedLabel` says the read failed ("Couldn't read").
25
- * @access The dash is hidden and `missingLabel` is read in its place; the warning mark is hidden beside its words; the placeholder is decorative, and the table is `aria-busy` while it loads.
23
+ * @behaviour “Render `—` in cells where a value is unknown or not applicable. Don’t substitute `N/A`, `null`, or an empty string.” (https://vercel.com/geist/table)
24
+ * Ours: five states that never collapse into a dash: unknown (a muted dash), zero (the figure "0"), stale (the reading, then the stale word), failed (the error mark and its words, in the error colour) and loading (a still 64 × 12 placeholder). A real value, `0` included, is shown as it is.
25
+ * @words Ours: `missingLabel` says what the absence means ("Not reported", never "N/A" or "None"); `staleLabel` is one word ("Stale"); `failedLabel` says the read failed ("Couldn't read").
26
+ * @access The dash is hidden and `missingLabel` is read in its place; the error mark is hidden beside its words; the placeholder is decorative, and its cell is `aria-busy` while it loads.
26
27
  */
27
28
  export declare function TableValue(props: TableValueProps): string | number | import("react").JSX.Element;
28
29
  export {};