@nadicodeai/ui 12.1.102 → 12.1.104

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 (562) 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.js +2 -2
  5. package/dist/components/action-menu.d.ts +20 -19
  6. package/dist/components/action-menu.d.ts.map +1 -1
  7. package/dist/components/action-menu.js +22 -15
  8. package/dist/components/action-status.d.ts +14 -10
  9. package/dist/components/action-status.d.ts.map +1 -1
  10. package/dist/components/action-status.js +14 -10
  11. package/dist/components/activity-calendar.d.ts +3 -1
  12. package/dist/components/activity-calendar.d.ts.map +1 -1
  13. package/dist/components/activity-calendar.js +16 -2
  14. package/dist/components/activity-feed.d.ts +2 -2
  15. package/dist/components/activity-feed.d.ts.map +1 -1
  16. package/dist/components/activity-feed.js +14 -5
  17. package/dist/components/agent-card.d.ts +11 -5
  18. package/dist/components/agent-card.d.ts.map +1 -1
  19. package/dist/components/agent-card.js +13 -7
  20. package/dist/components/agent-list-row.js +1 -1
  21. package/dist/components/agent-orb-appearance.d.ts +7 -1
  22. package/dist/components/agent-orb-appearance.d.ts.map +1 -1
  23. package/dist/components/agent-orb-appearance.js +26 -0
  24. package/dist/components/agent-profile.d.ts +8 -7
  25. package/dist/components/agent-profile.d.ts.map +1 -1
  26. package/dist/components/agent-profile.js +6 -6
  27. package/dist/components/alert-dialog.d.ts +25 -16
  28. package/dist/components/alert-dialog.d.ts.map +1 -1
  29. package/dist/components/alert-dialog.js +30 -18
  30. package/dist/components/alert.d.ts +1 -1
  31. package/dist/components/avatar.d.ts +83 -17
  32. package/dist/components/avatar.d.ts.map +1 -1
  33. package/dist/components/avatar.js +89 -23
  34. package/dist/components/badge.d.ts +59 -8
  35. package/dist/components/badge.d.ts.map +1 -1
  36. package/dist/components/badge.js +57 -14
  37. package/dist/components/breadcrumb.d.ts +18 -7
  38. package/dist/components/breadcrumb.d.ts.map +1 -1
  39. package/dist/components/breadcrumb.js +37 -13
  40. package/dist/components/button-group.d.ts +12 -15
  41. package/dist/components/button-group.d.ts.map +1 -1
  42. package/dist/components/button-group.js +13 -17
  43. package/dist/components/button.d.ts +126 -23
  44. package/dist/components/button.d.ts.map +1 -1
  45. package/dist/components/button.js +164 -39
  46. package/dist/components/calendar.d.ts +26 -15
  47. package/dist/components/calendar.d.ts.map +1 -1
  48. package/dist/components/calendar.js +60 -46
  49. package/dist/components/card-row.d.ts +13 -5
  50. package/dist/components/card-row.d.ts.map +1 -1
  51. package/dist/components/card-row.js +24 -10
  52. package/dist/components/card.d.ts +6 -12
  53. package/dist/components/card.d.ts.map +1 -1
  54. package/dist/components/card.js +11 -16
  55. package/dist/components/carousel.d.ts +3 -3
  56. package/dist/components/carousel.d.ts.map +1 -1
  57. package/dist/components/carousel.js +7 -7
  58. package/dist/components/catalog-drawer.d.ts +7 -7
  59. package/dist/components/catalog-drawer.d.ts.map +1 -1
  60. package/dist/components/catalog-drawer.js +6 -6
  61. package/dist/components/chart-area-stacked.d.ts +1 -1
  62. package/dist/components/chart-area-stacked.d.ts.map +1 -1
  63. package/dist/components/chart-area-stacked.js +4 -4
  64. package/dist/components/chart-axis.d.ts +14 -1
  65. package/dist/components/chart-axis.d.ts.map +1 -1
  66. package/dist/components/chart-axis.js +11 -1
  67. package/dist/components/chart-bar-horizontal.d.ts +2 -2
  68. package/dist/components/chart-bar-horizontal.d.ts.map +1 -1
  69. package/dist/components/chart-bar-horizontal.js +14 -5
  70. package/dist/components/chart-bar-multiple.d.ts +1 -1
  71. package/dist/components/chart-bar-multiple.d.ts.map +1 -1
  72. package/dist/components/chart-bar-multiple.js +3 -3
  73. package/dist/components/chart-bar-stacked.d.ts +1 -1
  74. package/dist/components/chart-bar-stacked.d.ts.map +1 -1
  75. package/dist/components/chart-bar-stacked.js +3 -3
  76. package/dist/components/chart-card.d.ts +17 -6
  77. package/dist/components/chart-card.d.ts.map +1 -1
  78. package/dist/components/chart-card.js +11 -4
  79. package/dist/components/chart-date-range-control.d.ts +18 -9
  80. package/dist/components/chart-date-range-control.d.ts.map +1 -1
  81. package/dist/components/chart-date-range-control.js +43 -47
  82. package/dist/components/chart-sparkline.d.ts +4 -3
  83. package/dist/components/chart-sparkline.d.ts.map +1 -1
  84. package/dist/components/chart-sparkline.js +6 -5
  85. package/dist/components/check-counts.d.ts +44 -0
  86. package/dist/components/check-counts.d.ts.map +1 -0
  87. package/dist/components/check-counts.js +51 -0
  88. package/dist/components/checkbox.d.ts +39 -11
  89. package/dist/components/checkbox.d.ts.map +1 -1
  90. package/dist/components/checkbox.js +38 -11
  91. package/dist/components/choicebox.d.ts +96 -0
  92. package/dist/components/choicebox.d.ts.map +1 -0
  93. package/dist/components/choicebox.js +113 -0
  94. package/dist/components/clearable-input.d.ts +57 -0
  95. package/dist/components/clearable-input.d.ts.map +1 -0
  96. package/dist/components/clearable-input.js +58 -0
  97. package/dist/components/code-block.d.ts +77 -17
  98. package/dist/components/code-block.d.ts.map +1 -1
  99. package/dist/components/code-block.js +85 -15
  100. package/dist/components/collapsible.d.ts +27 -10
  101. package/dist/components/collapsible.d.ts.map +1 -1
  102. package/dist/components/collapsible.js +24 -9
  103. package/dist/components/collection-filters.d.ts +3 -1
  104. package/dist/components/collection-filters.d.ts.map +1 -1
  105. package/dist/components/collection-filters.js +7 -9
  106. package/dist/components/collection-page.d.ts +31 -10
  107. package/dist/components/collection-page.d.ts.map +1 -1
  108. package/dist/components/collection-page.js +14 -13
  109. package/dist/components/collection-search.d.ts +32 -10
  110. package/dist/components/collection-search.d.ts.map +1 -1
  111. package/dist/components/collection-search.js +24 -13
  112. package/dist/components/collection-sort.d.ts.map +1 -1
  113. package/dist/components/collection-sort.js +2 -2
  114. package/dist/components/collection-toolbar.d.ts +5 -2
  115. package/dist/components/collection-toolbar.d.ts.map +1 -1
  116. package/dist/components/collection-toolbar.js +7 -4
  117. package/dist/components/combobox.d.ts +97 -22
  118. package/dist/components/combobox.d.ts.map +1 -1
  119. package/dist/components/combobox.js +80 -28
  120. package/dist/components/command.d.ts +34 -21
  121. package/dist/components/command.d.ts.map +1 -1
  122. package/dist/components/command.js +33 -25
  123. package/dist/components/confirm-dialog.d.ts +23 -6
  124. package/dist/components/confirm-dialog.d.ts.map +1 -1
  125. package/dist/components/confirm-dialog.js +32 -13
  126. package/dist/components/context-menu.d.ts +14 -10
  127. package/dist/components/context-menu.d.ts.map +1 -1
  128. package/dist/components/context-menu.js +17 -12
  129. package/dist/components/copy-button.d.ts +5 -2
  130. package/dist/components/copy-button.d.ts.map +1 -1
  131. package/dist/components/copy-button.js +16 -8
  132. package/dist/components/data-table.d.ts +120 -54
  133. package/dist/components/data-table.d.ts.map +1 -1
  134. package/dist/components/data-table.js +163 -92
  135. package/dist/components/desktop-shell.d.ts +4 -2
  136. package/dist/components/desktop-shell.d.ts.map +1 -1
  137. package/dist/components/desktop-shell.js +3 -3
  138. package/dist/components/dialog.d.ts +63 -24
  139. package/dist/components/dialog.d.ts.map +1 -1
  140. package/dist/components/dialog.js +52 -31
  141. package/dist/components/disclosure-row.d.ts +1 -2
  142. package/dist/components/disclosure-row.d.ts.map +1 -1
  143. package/dist/components/disclosure-row.js +1 -2
  144. package/dist/components/disclosure.d.ts +1 -1
  145. package/dist/components/disclosure.js +1 -1
  146. package/dist/components/drawer.d.ts +33 -12
  147. package/dist/components/drawer.d.ts.map +1 -1
  148. package/dist/components/drawer.js +47 -35
  149. package/dist/components/dropdown-menu.d.ts +59 -14
  150. package/dist/components/dropdown-menu.d.ts.map +1 -1
  151. package/dist/components/dropdown-menu.js +58 -26
  152. package/dist/components/empty-state.d.ts +35 -12
  153. package/dist/components/empty-state.d.ts.map +1 -1
  154. package/dist/components/empty-state.js +35 -17
  155. package/dist/components/entry-scene.d.ts +4 -4
  156. package/dist/components/entry-scene.d.ts.map +1 -1
  157. package/dist/components/entry-scene.js +2 -2
  158. package/dist/components/field.d.ts +44 -14
  159. package/dist/components/field.d.ts.map +1 -1
  160. package/dist/components/field.js +49 -20
  161. package/dist/components/file-diff.d.ts.map +1 -1
  162. package/dist/components/file-diff.js +3 -4
  163. package/dist/components/form-dialog.d.ts +7 -7
  164. package/dist/components/form-dialog.d.ts.map +1 -1
  165. package/dist/components/form-dialog.js +13 -11
  166. package/dist/components/form-drawer.d.ts +10 -7
  167. package/dist/components/form-drawer.d.ts.map +1 -1
  168. package/dist/components/form-drawer.js +11 -10
  169. package/dist/components/gauge.d.ts +64 -0
  170. package/dist/components/gauge.d.ts.map +1 -0
  171. package/dist/components/gauge.js +73 -0
  172. package/dist/components/hover-card.d.ts +72 -14
  173. package/dist/components/hover-card.d.ts.map +1 -1
  174. package/dist/components/hover-card.js +51 -17
  175. package/dist/components/identity-mark.d.ts +8 -1
  176. package/dist/components/identity-mark.d.ts.map +1 -1
  177. package/dist/components/identity-mark.js +31 -5
  178. package/dist/components/input-group.d.ts +44 -21
  179. package/dist/components/input-group.d.ts.map +1 -1
  180. package/dist/components/input-group.js +74 -27
  181. package/dist/components/input.d.ts +64 -12
  182. package/dist/components/input.d.ts.map +1 -1
  183. package/dist/components/input.js +51 -15
  184. package/dist/components/item.d.ts +37 -15
  185. package/dist/components/item.d.ts.map +1 -1
  186. package/dist/components/item.js +41 -22
  187. package/dist/components/kbd.d.ts +49 -13
  188. package/dist/components/kbd.d.ts.map +1 -1
  189. package/dist/components/kbd.js +115 -16
  190. package/dist/components/kpi-card.d.ts +12 -4
  191. package/dist/components/kpi-card.d.ts.map +1 -1
  192. package/dist/components/kpi-card.js +13 -4
  193. package/dist/components/label.d.ts +17 -10
  194. package/dist/components/label.d.ts.map +1 -1
  195. package/dist/components/label.js +18 -11
  196. package/dist/components/library-shelf.d.ts +6 -6
  197. package/dist/components/library-shelf.d.ts.map +1 -1
  198. package/dist/components/library-shelf.js +5 -5
  199. package/dist/components/load-more-button.d.ts +35 -0
  200. package/dist/components/load-more-button.d.ts.map +1 -0
  201. package/dist/components/load-more-button.js +26 -0
  202. package/dist/components/message-notice.d.ts +8 -13
  203. package/dist/components/message-notice.d.ts.map +1 -1
  204. package/dist/components/message-notice.js +25 -22
  205. package/dist/components/middle-truncate.d.ts +33 -0
  206. package/dist/components/middle-truncate.d.ts.map +1 -0
  207. package/dist/components/middle-truncate.js +72 -0
  208. package/dist/components/multi-select.d.ts +94 -0
  209. package/dist/components/multi-select.d.ts.map +1 -0
  210. package/dist/components/multi-select.js +132 -0
  211. package/dist/components/native-select.d.ts +37 -13
  212. package/dist/components/native-select.d.ts.map +1 -1
  213. package/dist/components/native-select.js +27 -11
  214. package/dist/components/notice-banner.d.ts +17 -10
  215. package/dist/components/notice-banner.d.ts.map +1 -1
  216. package/dist/components/notice-banner.js +12 -11
  217. package/dist/components/numbered-steps.d.ts +10 -4
  218. package/dist/components/numbered-steps.d.ts.map +1 -1
  219. package/dist/components/numbered-steps.js +9 -7
  220. package/dist/components/object-page.d.ts +40 -14
  221. package/dist/components/object-page.d.ts.map +1 -1
  222. package/dist/components/object-page.js +12 -10
  223. package/dist/components/object-workspace.d.ts +29 -10
  224. package/dist/components/object-workspace.d.ts.map +1 -1
  225. package/dist/components/object-workspace.js +18 -8
  226. package/dist/components/overview-page.d.ts +2 -2
  227. package/dist/components/overview-page.d.ts.map +1 -1
  228. package/dist/components/overview-page.js +8 -7
  229. package/dist/components/page-actions.d.ts +28 -8
  230. package/dist/components/page-actions.d.ts.map +1 -1
  231. package/dist/components/page-actions.js +22 -25
  232. package/dist/components/page-header.d.ts +11 -4
  233. package/dist/components/page-header.d.ts.map +1 -1
  234. package/dist/components/page-header.js +10 -5
  235. package/dist/components/pending-label.d.ts +6 -5
  236. package/dist/components/pending-label.d.ts.map +1 -1
  237. package/dist/components/pending-label.js +14 -6
  238. package/dist/components/picture-label.d.ts +2 -2
  239. package/dist/components/picture-label.d.ts.map +1 -1
  240. package/dist/components/picture-label.js +3 -3
  241. package/dist/components/portal-sidebar-frame.d.ts +9 -21
  242. package/dist/components/portal-sidebar-frame.d.ts.map +1 -1
  243. package/dist/components/portal-sidebar-frame.js +13 -27
  244. package/dist/components/progress-checklist.d.ts +46 -0
  245. package/dist/components/progress-checklist.d.ts.map +1 -0
  246. package/dist/components/progress-checklist.js +46 -0
  247. package/dist/components/progress.d.ts +48 -8
  248. package/dist/components/progress.d.ts.map +1 -1
  249. package/dist/components/progress.js +92 -16
  250. package/dist/components/prose.d.ts +19 -0
  251. package/dist/components/prose.d.ts.map +1 -0
  252. package/dist/components/prose.js +29 -0
  253. package/dist/components/radio-group.d.ts +51 -12
  254. package/dist/components/radio-group.d.ts.map +1 -1
  255. package/dist/components/radio-group.js +42 -12
  256. package/dist/components/reading-column.js +1 -1
  257. package/dist/components/record-identity.d.ts +6 -5
  258. package/dist/components/record-identity.d.ts.map +1 -1
  259. package/dist/components/record-identity.js +12 -3
  260. package/dist/components/record-list.d.ts +117 -27
  261. package/dist/components/record-list.d.ts.map +1 -1
  262. package/dist/components/record-list.js +185 -55
  263. package/dist/components/record-time.d.ts +20 -7
  264. package/dist/components/record-time.d.ts.map +1 -1
  265. package/dist/components/record-time.js +38 -19
  266. package/dist/components/resizable.d.ts +7 -5
  267. package/dist/components/resizable.d.ts.map +1 -1
  268. package/dist/components/resizable.js +6 -6
  269. package/dist/components/scope-switcher.d.ts +2 -0
  270. package/dist/components/scope-switcher.d.ts.map +1 -1
  271. package/dist/components/scope-switcher.js +2 -2
  272. package/dist/components/scroll-area.d.ts +47 -11
  273. package/dist/components/scroll-area.d.ts.map +1 -1
  274. package/dist/components/scroll-area.js +72 -14
  275. package/dist/components/segmented-control.d.ts +82 -0
  276. package/dist/components/segmented-control.d.ts.map +1 -0
  277. package/dist/components/segmented-control.js +90 -0
  278. package/dist/components/select.d.ts +55 -15
  279. package/dist/components/select.d.ts.map +1 -1
  280. package/dist/components/select.js +62 -19
  281. package/dist/components/separator.d.ts +12 -5
  282. package/dist/components/separator.d.ts.map +1 -1
  283. package/dist/components/separator.js +11 -6
  284. package/dist/components/settings-facts.d.ts +34 -14
  285. package/dist/components/settings-facts.d.ts.map +1 -1
  286. package/dist/components/settings-facts.js +21 -12
  287. package/dist/components/settings-page.d.ts +4 -4
  288. package/dist/components/settings-page.js +5 -5
  289. package/dist/components/settings-section.d.ts +160 -34
  290. package/dist/components/settings-section.d.ts.map +1 -1
  291. package/dist/components/settings-section.js +92 -39
  292. package/dist/components/sheet.d.ts +47 -16
  293. package/dist/components/sheet.d.ts.map +1 -1
  294. package/dist/components/sheet.js +40 -19
  295. package/dist/components/sidebar-sections.d.ts +16 -12
  296. package/dist/components/sidebar-sections.d.ts.map +1 -1
  297. package/dist/components/sidebar-sections.js +30 -15
  298. package/dist/components/sidebar.d.ts +117 -21
  299. package/dist/components/sidebar.d.ts.map +1 -1
  300. package/dist/components/sidebar.js +180 -55
  301. package/dist/components/skeleton.d.ts +54 -8
  302. package/dist/components/skeleton.d.ts.map +1 -1
  303. package/dist/components/skeleton.js +44 -9
  304. package/dist/components/slider.d.ts +53 -11
  305. package/dist/components/slider.d.ts.map +1 -1
  306. package/dist/components/slider.js +71 -17
  307. package/dist/components/snippet.d.ts +57 -0
  308. package/dist/components/snippet.d.ts.map +1 -0
  309. package/dist/components/snippet.js +60 -0
  310. package/dist/components/sonner.d.ts +13 -14
  311. package/dist/components/sonner.d.ts.map +1 -1
  312. package/dist/components/sonner.js +25 -22
  313. package/dist/components/status-badge.d.ts +37 -11
  314. package/dist/components/status-badge.d.ts.map +1 -1
  315. package/dist/components/status-badge.js +63 -15
  316. package/dist/components/status-dot.d.ts +42 -11
  317. package/dist/components/status-dot.d.ts.map +1 -1
  318. package/dist/components/status-dot.js +40 -11
  319. package/dist/components/switch.d.ts +43 -12
  320. package/dist/components/switch.d.ts.map +1 -1
  321. package/dist/components/switch.js +42 -12
  322. package/dist/components/table-card.d.ts +21 -12
  323. package/dist/components/table-card.d.ts.map +1 -1
  324. package/dist/components/table-card.js +17 -9
  325. package/dist/components/table-layouts.d.ts +40 -8
  326. package/dist/components/table-layouts.d.ts.map +1 -1
  327. package/dist/components/table-layouts.js +52 -8
  328. package/dist/components/table-value.d.ts +4 -3
  329. package/dist/components/table-value.d.ts.map +1 -1
  330. package/dist/components/table-value.js +6 -5
  331. package/dist/components/table.d.ts +62 -25
  332. package/dist/components/table.d.ts.map +1 -1
  333. package/dist/components/table.js +62 -26
  334. package/dist/components/tabs.d.ts +86 -17
  335. package/dist/components/tabs.d.ts.map +1 -1
  336. package/dist/components/tabs.js +93 -22
  337. package/dist/components/text-link.d.ts +4 -1
  338. package/dist/components/text-link.d.ts.map +1 -1
  339. package/dist/components/text-link.js +4 -1
  340. package/dist/components/text-with-copy-button.d.ts +30 -0
  341. package/dist/components/text-with-copy-button.d.ts.map +1 -0
  342. package/dist/components/text-with-copy-button.js +32 -0
  343. package/dist/components/textarea.d.ts +40 -10
  344. package/dist/components/textarea.d.ts.map +1 -1
  345. package/dist/components/textarea.js +50 -11
  346. package/dist/components/theme-mode-switcher.d.ts +18 -1
  347. package/dist/components/theme-mode-switcher.d.ts.map +1 -1
  348. package/dist/components/theme-mode-switcher.js +20 -2
  349. package/dist/components/toggle-group.d.ts +28 -8
  350. package/dist/components/toggle-group.d.ts.map +1 -1
  351. package/dist/components/toggle-group.js +12 -6
  352. package/dist/components/toggle.d.ts +6 -3
  353. package/dist/components/toggle.d.ts.map +1 -1
  354. package/dist/components/toggle.js +10 -7
  355. package/dist/components/tooltip.d.ts +43 -12
  356. package/dist/components/tooltip.d.ts.map +1 -1
  357. package/dist/components/tooltip.js +45 -16
  358. package/dist/components/trend-badge.js +1 -1
  359. package/dist/components/update-card.js +1 -1
  360. package/dist/eslint/index.js +82 -0
  361. package/dist/eslint/rules/badge-is-static-label.js +93 -0
  362. package/dist/eslint/rules/button-icon-slot.js +102 -0
  363. package/dist/eslint/rules/button-link-for-navigation.js +146 -0
  364. package/dist/eslint/rules/button-no-aria-label-with-text.js +75 -0
  365. package/dist/eslint/rules/button-type-roles-only-in-buttons.js +83 -0
  366. package/dist/eslint/rules/choice-control-has-a-name.js +98 -0
  367. package/dist/eslint/rules/choice-group-in-fieldset.js +86 -0
  368. package/dist/eslint/rules/command-shortcut-single-owner.js +118 -0
  369. package/dist/eslint/rules/confirm-dialog-words.js +63 -0
  370. package/dist/eslint/rules/data-table-one-unsized-column.js +96 -0
  371. package/dist/eslint/rules/destructive-action-placement.js +69 -0
  372. package/dist/eslint/rules/disabled-choice-says-why.js +71 -0
  373. package/dist/eslint/rules/ellipsis-opens-a-dialog.js +110 -0
  374. package/dist/eslint/rules/input-group-owners.js +155 -0
  375. package/dist/eslint/rules/kbd-children-no-modifier-text.js +128 -0
  376. package/dist/eslint/rules/literal-text.js +41 -0
  377. package/dist/eslint/rules/middle-truncate-placement.js +69 -0
  378. package/dist/eslint/rules/no-bare-button-label.js +55 -0
  379. package/dist/eslint/rules/no-control-in-read-only-surface.js +106 -0
  380. package/dist/eslint/rules/no-hand-built-busy.js +104 -0
  381. package/dist/eslint/rules/no-hand-built-theme-picker.js +144 -0
  382. package/dist/eslint/rules/no-hand-built-tile.js +41 -0
  383. package/dist/eslint/rules/no-hand-formatted-date.js +87 -0
  384. package/dist/eslint/rules/no-hand-stacked-avatars.js +67 -0
  385. package/dist/eslint/rules/no-nested-collapse.js +60 -0
  386. package/dist/eslint/rules/no-search-in-form.js +47 -0
  387. package/dist/eslint/rules/no-shadcn-appearance-override.js +2 -16
  388. package/dist/eslint/rules/no-shell-prompt-in-snippet.js +74 -0
  389. package/dist/eslint/rules/no-stock-error-words.js +56 -0
  390. package/dist/eslint/rules/no-tooltip-around-labelled-field.js +72 -0
  391. package/dist/eslint/rules/no-weight-class-on-strong-in-type-role.js +57 -0
  392. package/dist/eslint/rules/one-submenu-level.js +43 -0
  393. package/dist/eslint/rules/one-toast-per-flow.js +91 -0
  394. package/dist/eslint/rules/option-count.js +167 -0
  395. package/dist/eslint/rules/page-command-link-not-render.js +43 -0
  396. package/dist/eslint/rules/progress-needs-name.js +57 -0
  397. package/dist/eslint/rules/settings-limit-in-footer.js +94 -0
  398. package/dist/eslint/rules/skeleton-in-region.js +80 -0
  399. package/dist/eslint/rules/sortable-heading-uses-sort.js +79 -0
  400. package/dist/eslint/rules/table-cell-inset-owner.js +107 -0
  401. package/dist/eslint/rules/tabs-selection-is-controlled.js +47 -0
  402. package/dist/eslint/rules/tooltip-only-arrow.js +38 -0
  403. package/dist/eslint/rules/tooltip-trigger-accessible-name.js +114 -0
  404. package/dist/eslint/strict-design-system.js +21 -7
  405. package/dist/index.d.ts +13 -13
  406. package/dist/index.d.ts.map +1 -1
  407. package/dist/index.js +12 -13
  408. package/dist/internal/assistant-ui/attachment.d.ts.map +1 -1
  409. package/dist/internal/assistant-ui/attachment.js +2 -2
  410. package/dist/internal/assistant-ui/reasoning.d.ts +1 -1
  411. package/dist/internal/assistant-ui/reasoning.d.ts.map +1 -1
  412. package/dist/internal/assistant-ui/tool-fallback.js +1 -1
  413. package/dist/internal/assistant-ui/tool-group.d.ts +1 -1
  414. package/dist/internal/assistant-ui/tool-group.d.ts.map +1 -1
  415. package/dist/internal/assistant-ui/tooltip-icon-button.d.ts +2 -3
  416. package/dist/internal/assistant-ui/tooltip-icon-button.d.ts.map +1 -1
  417. package/dist/internal/assistant-ui/tooltip-icon-button.js +1 -1
  418. package/dist/internal/catalog-list.js +2 -2
  419. package/dist/internal/collection-note.d.ts +23 -0
  420. package/dist/internal/collection-note.d.ts.map +1 -0
  421. package/dist/internal/collection-note.js +17 -0
  422. package/dist/internal/collection-rail.d.ts +57 -0
  423. package/dist/internal/collection-rail.d.ts.map +1 -0
  424. package/dist/internal/collection-rail.js +33 -0
  425. package/dist/internal/company-logo.d.ts +18 -0
  426. package/dist/internal/company-logo.d.ts.map +1 -0
  427. package/dist/internal/company-logo.js +14 -0
  428. package/dist/internal/control-name.d.ts +12 -0
  429. package/dist/internal/control-name.d.ts.map +1 -0
  430. package/dist/internal/control-name.js +1 -0
  431. package/dist/internal/diff-line.d.ts +9 -0
  432. package/dist/internal/diff-line.d.ts.map +1 -0
  433. package/dist/internal/diff-line.js +8 -0
  434. package/dist/internal/empty.d.ts +8 -4
  435. package/dist/internal/empty.d.ts.map +1 -1
  436. package/dist/internal/empty.js +14 -8
  437. package/dist/internal/field-frame.d.ts +33 -0
  438. package/dist/internal/field-frame.d.ts.map +1 -0
  439. package/dist/internal/field-frame.js +20 -0
  440. package/dist/internal/final-focus.d.ts +8 -0
  441. package/dist/internal/final-focus.d.ts.map +1 -0
  442. package/dist/internal/final-focus.js +10 -0
  443. package/dist/internal/footer-strip.d.ts.map +1 -1
  444. package/dist/internal/footer-strip.js +3 -1
  445. package/dist/internal/form-submit.d.ts +9 -5
  446. package/dist/internal/form-submit.d.ts.map +1 -1
  447. package/dist/internal/form-submit.js +31 -2
  448. package/dist/internal/input-box.d.ts +26 -0
  449. package/dist/internal/input-box.d.ts.map +1 -0
  450. package/dist/internal/input-box.js +59 -0
  451. package/dist/internal/menu-surface.d.ts +10 -3
  452. package/dist/internal/menu-surface.d.ts.map +1 -1
  453. package/dist/internal/menu-surface.js +10 -3
  454. package/dist/internal/notice.d.ts +25 -0
  455. package/dist/internal/notice.d.ts.map +1 -0
  456. package/dist/internal/notice.js +33 -0
  457. package/dist/internal/overlay-stem.d.ts +5 -0
  458. package/dist/internal/overlay-stem.d.ts.map +1 -0
  459. package/dist/internal/overlay-stem.js +7 -0
  460. package/dist/internal/phone-sheet.d.ts +4 -0
  461. package/dist/internal/phone-sheet.d.ts.map +1 -0
  462. package/dist/internal/phone-sheet.js +2 -0
  463. package/dist/internal/present-content.d.ts +3 -0
  464. package/dist/internal/present-content.d.ts.map +1 -0
  465. package/dist/internal/present-content.js +1 -0
  466. package/dist/internal/record-menu-items.d.ts +4 -3
  467. package/dist/internal/record-menu-items.d.ts.map +1 -1
  468. package/dist/internal/record-menu-items.js +21 -6
  469. package/dist/internal/settings-save.d.ts +9 -2
  470. package/dist/internal/settings-save.d.ts.map +1 -1
  471. package/dist/internal/settings-save.js +19 -6
  472. package/dist/internal/table-compact-line.d.ts +38 -0
  473. package/dist/internal/table-compact-line.d.ts.map +1 -0
  474. package/dist/internal/table-compact-line.js +35 -0
  475. package/dist/internal/title-when-cut.d.ts +8 -0
  476. package/dist/internal/title-when-cut.d.ts.map +1 -0
  477. package/dist/internal/title-when-cut.js +22 -0
  478. package/dist/internal/unsaved-guard.d.ts +18 -0
  479. package/dist/internal/unsaved-guard.d.ts.map +1 -0
  480. package/dist/internal/unsaved-guard.js +31 -0
  481. package/dist/lib/merge-tokens.generated.js +2 -2
  482. package/dist/showcase/foundations.d.ts.map +1 -1
  483. package/dist/showcase/foundations.js +10 -2
  484. package/dist/showcase/specimens/actions.d.ts +2 -0
  485. package/dist/showcase/specimens/actions.d.ts.map +1 -1
  486. package/dist/showcase/specimens/actions.js +30 -5
  487. package/dist/showcase/specimens/charts.d.ts.map +1 -1
  488. package/dist/showcase/specimens/charts.js +22 -13
  489. package/dist/showcase/specimens/choices.d.ts +14 -3
  490. package/dist/showcase/specimens/choices.d.ts.map +1 -1
  491. package/dist/showcase/specimens/choices.js +93 -13
  492. package/dist/showcase/specimens/compositions.d.ts.map +1 -1
  493. package/dist/showcase/specimens/compositions.js +136 -23
  494. package/dist/showcase/specimens/data.d.ts +12 -7
  495. package/dist/showcase/specimens/data.d.ts.map +1 -1
  496. package/dist/showcase/specimens/data.js +139 -35
  497. package/dist/showcase/specimens/feedback.d.ts +2 -0
  498. package/dist/showcase/specimens/feedback.d.ts.map +1 -1
  499. package/dist/showcase/specimens/feedback.js +39 -15
  500. package/dist/showcase/specimens/index.d.ts +20 -12
  501. package/dist/showcase/specimens/index.d.ts.map +1 -1
  502. package/dist/showcase/specimens/inputs.d.ts +4 -2
  503. package/dist/showcase/specimens/inputs.d.ts.map +1 -1
  504. package/dist/showcase/specimens/inputs.js +62 -19
  505. package/dist/showcase/specimens/menus.d.ts +0 -1
  506. package/dist/showcase/specimens/menus.d.ts.map +1 -1
  507. package/dist/showcase/specimens/menus.js +47 -17
  508. package/dist/showcase/specimens/navigation.d.ts +6 -4
  509. package/dist/showcase/specimens/navigation.d.ts.map +1 -1
  510. package/dist/showcase/specimens/navigation.js +61 -32
  511. package/dist/showcase/specimens/other.d.ts +1 -3
  512. package/dist/showcase/specimens/other.d.ts.map +1 -1
  513. package/dist/showcase/specimens/other.js +17 -13
  514. package/dist/showcase/specimens/status.d.ts +4 -1
  515. package/dist/showcase/specimens/status.d.ts.map +1 -1
  516. package/dist/showcase/specimens/status.js +64 -11
  517. package/dist/showcase/usage.generated.d.ts +1 -1
  518. package/dist/showcase/usage.generated.d.ts.map +1 -1
  519. package/dist/showcase/usage.generated.js +632 -544
  520. package/dist/standalone/index.js +1 -1
  521. package/dist/styles/components.css +13 -13
  522. package/dist/styles/globals.css +25 -0
  523. package/package.json +2 -3
  524. package/dist/components/approval-row.d.ts +0 -34
  525. package/dist/components/approval-row.d.ts.map +0 -1
  526. package/dist/components/approval-row.js +0 -27
  527. package/dist/components/channel-view.d.ts +0 -112
  528. package/dist/components/channel-view.d.ts.map +0 -1
  529. package/dist/components/channel-view.js +0 -84
  530. package/dist/components/dashboard-shell.d.ts +0 -51
  531. package/dist/components/dashboard-shell.d.ts.map +0 -1
  532. package/dist/components/dashboard-shell.js +0 -89
  533. package/dist/components/direction.d.ts +0 -2
  534. package/dist/components/direction.d.ts.map +0 -1
  535. package/dist/components/direction.js +0 -1
  536. package/dist/components/expandable-block.d.ts +0 -20
  537. package/dist/components/expandable-block.d.ts.map +0 -1
  538. package/dist/components/expandable-block.js +0 -32
  539. package/dist/components/form.d.ts +0 -42
  540. package/dist/components/form.d.ts.map +0 -1
  541. package/dist/components/form.js +0 -91
  542. package/dist/components/label-system.d.ts +0 -17
  543. package/dist/components/label-system.d.ts.map +0 -1
  544. package/dist/components/label-system.js +0 -21
  545. package/dist/components/memory-item.d.ts +0 -21
  546. package/dist/components/memory-item.d.ts.map +0 -1
  547. package/dist/components/memory-item.js +0 -18
  548. package/dist/components/menubar.d.ts +0 -43
  549. package/dist/components/menubar.d.ts.map +0 -1
  550. package/dist/components/menubar.js +0 -69
  551. package/dist/components/navigation-menu.d.ts +0 -26
  552. package/dist/components/navigation-menu.d.ts.map +0 -1
  553. package/dist/components/navigation-menu.js +0 -45
  554. package/dist/components/pagination.d.ts +0 -33
  555. package/dist/components/pagination.d.ts.map +0 -1
  556. package/dist/components/pagination.js +0 -41
  557. package/dist/components/plugin-slot-boundary.d.ts +0 -42
  558. package/dist/components/plugin-slot-boundary.d.ts.map +0 -1
  559. package/dist/components/plugin-slot-boundary.js +0 -41
  560. package/dist/components/status-row.d.ts +0 -32
  561. package/dist/components/status-row.d.ts.map +0 -1
  562. package/dist/components/status-row.js +0 -35
@@ -1 +1 @@
1
- {"version":3,"file":"chart-card.d.ts","sourceRoot":"","sources":["../../src/components/chart-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EAAqB,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAChF,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAG3F,KAAK,WAAW,GAAG;IACjB,0EAA0E;IAC1E,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAElD,KAAK,aAAa,GAAG,SAAS,GAAG,IAAI,CAAC;AAEtC,KAAK,iBAAiB,GAAG;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,cAAc,CAAC;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC;IAC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AQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;CAChD,qBAyDA;AAED,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,KAAK,EACL,UAAU,EACV,SAAqB,EACrB,KAAK,EACL,MAAM,GACP,EAAE,iBAAiB,qBAgCnB;AAED,uEAAuE;AACvE,iBAAS,kBAAkB,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAEvD;AAED;;;;GAIG;AACH,QAAA,MAAM,iBAAiB,0GACkF,CAAC;AAE1G,sEAAsE;AACtE,QAAA,MAAM,kBAAkB,4BAA4B,CAAC;AAErD,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,SAAS,EACT,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,GAChB,CAAC;AACF,YAAY,EACV,eAAe,EACf,aAAa,EACb,cAAc,EACd,aAAa,EACb,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,iBAAiB,GAClB,CAAC"}
@@ -1,7 +1,9 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import * as React from "react";
4
+ import { ChevronRight } from "lucide-react";
4
5
  import { cn } from "../lib/utils.js";
6
+ import { ButtonLink } from "./button.js";
5
7
  import { Card, CardAction, CardContent, CardDescription, CardHeader, CardTitle, } from "./card.js";
6
8
  import { CHART_ENTITY_OTHER_COLOR, entityColor, } from "./chart-entity-colors.js";
7
9
  import { PageCommandButton } from "./page-actions.js";
@@ -12,6 +14,11 @@ const chartSizes = {
12
14
  default: "h-64",
13
15
  lg: "h-80",
14
16
  };
17
+ /**
18
+ * Below a 28 rem card the controls drop under the title; a lone link stays at the
19
+ * header's trailing edge, as the ranking cards beside it keep theirs.
20
+ */
21
+ const CONTROLS_UNDER_TITLE_WHEN_NARROW = "has-data-[slot=card-action]:grid-cols-1 [&>[data-slot=card-action]]:col-start-1 [&>[data-slot=card-action]]:row-span-1 [&>[data-slot=card-action]]:row-start-3 [&>[data-slot=card-action]]:justify-self-start @md/chart-card:has-data-[slot=card-action]:grid-cols-[1fr_auto] @md/chart-card:[&>[data-slot=card-action]]:col-start-2 @md/chart-card:[&>[data-slot=card-action]]:row-span-2 @md/chart-card:[&>[data-slot=card-action]]:row-start-1 @md/chart-card:[&>[data-slot=card-action]]:justify-self-end";
15
22
  /** Synthetic key for the aggregated neutral series. */
16
23
  const OTHER_SERIES_ID = "__nc-other-series__";
17
24
  function defaultValueFormatter(value) {
@@ -62,13 +69,13 @@ function foldOtherSeries(series, data, entityColorMap, otherLabel) {
62
69
  * @family Charts
63
70
  * @when Every chart and every reading built around one: the frame a page never builds by hand. A chart is a named section of its page.
64
71
  * @instead A single figure is a `KpiCard`, never nested inside a chart. A ranking beside the plot goes in the card's `aside`, not a second card.
65
- * @behaviour Header grid: title and period in the first column, controls in the second from a 28 rem card width, under the title below it. Summary, plot, legend, footer in that order. An empty dataset shows its `emptyState` in the plot's place. The footer is a recessed strip behind a hairline: the reading's time left, the link to its owner right.
66
- * @words Title names the measure and its split: "Model spend by Customer". Period as dates. Footer: the reading's time, "Updated 4 minutes ago" or "Read at 12:42", and the way to its owner, "Open in Analytics". Sentence case throughout.
72
+ * @behaviour Header grid: title and period in the first column, controls and then the link to the reading's owner (a small ghost button ending in a chevron, as OpenRouter's "Explore ›") in the second from a 28 rem card width, under the title below it; a link with no controls stays at the trailing edge at every width. Summary, plot, legend, footer in that order. An empty dataset shows its `emptyState` in the plot's place. The footer is a recessed strip behind a hairline: the reading's time left, a command on the reading (Refresh) right.
73
+ * @words Title names the measure and its split: "Model spend by Customer". Period as dates. The link: "Explore", or "Open in Analytics" where the owner is another page. Footer: the reading's time, "Updated 4 minutes ago" or "Read at 12:42". Sentence case throughout.
67
74
  * @access The title is a heading at the page's level (default 2) and labels the plot. The plot is focusable and shows the 2 px focus outline only on keyboard focus.
68
75
  */
69
- function ChartCard({ title, period, controls, summary, aside, footer, headingLevel = 2, className, children, }) {
76
+ function ChartCard({ title, period, controls, link, summary, aside, footer, headingLevel = 2, className, children, }) {
70
77
  const titleId = React.useId();
71
- return (_jsxs(Card, { "data-slot": "chart-card", className: cn("@container/chart-card", className), children: [_jsxs(CardHeader, { className: "has-data-[slot=card-action]:grid-cols-1 [&>[data-slot=card-action]]:col-start-1 [&>[data-slot=card-action]]:row-span-1 [&>[data-slot=card-action]]:row-start-3 [&>[data-slot=card-action]]:justify-self-start @md/chart-card:has-data-[slot=card-action]:grid-cols-[1fr_auto] @md/chart-card:[&>[data-slot=card-action]]:col-start-2 @md/chart-card:[&>[data-slot=card-action]]:row-span-2 @md/chart-card:[&>[data-slot=card-action]]:row-start-1 @md/chart-card:[&>[data-slot=card-action]]:justify-self-end", children: [_jsx(CardTitle, { id: titleId, role: "heading", "aria-level": headingLevel, children: title }), period ? _jsx(CardDescription, { children: period }) : null, controls ? _jsx(CardAction, { children: controls }) : null] }), summary ? (_jsx("div", { "data-slot": "chart-card-summary", className: "px-(--card-spacing)", children: summary })) : null, _jsxs(CardContent, { className: cn(aside &&
78
+ return (_jsxs(Card, { "data-slot": "chart-card", className: cn("@container/chart-card", className), children: [_jsxs(CardHeader, { className: cn(controls && CONTROLS_UNDER_TITLE_WHEN_NARROW), children: [_jsx(CardTitle, { id: titleId, role: "heading", "aria-level": headingLevel, children: title }), period ? _jsx(CardDescription, { children: period }) : null, controls || link ? (_jsxs(CardAction, { className: "flex flex-wrap items-center gap-2", children: [controls, link ? (_jsx(ButtonLink, { variant: "ghost", size: "sm", suffix: _jsx(ChevronRight, { "aria-hidden": "true" }), "aria-label": link.accessibleName, render: link.link, children: link.label })) : null] })) : null] }), summary ? (_jsx("div", { "data-slot": "chart-card-summary", className: "px-(--card-spacing)", children: summary })) : null, _jsxs(CardContent, { className: cn(aside &&
72
79
  "grid min-w-0 gap-(--card-spacing) lg:grid-cols-[minmax(0,2fr)_minmax(16rem,1fr)]"), children: [_jsx("div", { className: "min-w-0", children: children(titleId) }), aside ? (_jsx("aside", { "data-slot": "chart-card-aside", className: "min-w-0 border-t border-border pt-(--card-spacing) lg:border-t-0 lg:border-l lg:pt-0 lg:pl-(--card-spacing)", children: aside })) : null] }), footer ? (_jsx(FooterStrip, { hint: footer.reading, hintSlot: "chart-card-reading", children: footer.link ? _jsx(PageCommandButton, { command: footer.link, variant: "ghost" }) : null })) : null] }));
73
80
  }
74
81
  function ChartSummary({ label, value, valueTitle, valueSize = "default", trend, status, }) {
@@ -1,16 +1,21 @@
1
1
  import * as React from "react";
2
2
  import { type DateRangePreset, type DateRangeValue } from "./chart-date-range.js";
3
3
  /**
4
- * The period a chart reads: a `Select` of presets with a custom window from a calendar.
4
+ * The period a chart reads: a button that opens the common windows and a calendar for any other.
5
5
  *
6
6
  * @family Charts
7
- * @when The reading period of an overview or a chart: on the title row through `PageActions`' `period`, or in a `ChartCard`'s `controls` where the page has none.
8
- * @instead A choice of metric is a `ToggleGroup` in the card's controls. A date a person enters in a form is a date field.
9
- * @behaviour One select with the presets and a custom window; the value is encoded into the URL by the caller with `encodeDateRange`.
10
- * @words Presets name the window: "Past 7 days", "Past 14 days", "Past 30 days", "This cycle". A custom window reads as its dates.
11
- * @access The select carries the control's accessible name and announces the current range.
7
+ * @when "Pick `<Calendar>` for analytics ranges and any picker where day-of-week and month context matter." "Provide `<Calendar.Presets>` for the common ranges (`Last 7 Days`, `Month to Date`) so users land on the right window in one click." (https://vercel.com/geist/calendar)
8
+ * Ours: the reading period of an overview or a chart: on the title row through `PageActions`' `period`, or in a `ChartCard`'s `controls` where the page has none.
9
+ * @instead "For ISO dates pasted whole or relative shorthand like `7d`, use a free-form `Input`." (https://vercel.com/geist/calendar)
10
+ * Ours: a choice of metric is a `ToggleGroup` in the card's controls. A date a person enters in a form is a date field.
11
+ * @behaviour "Pair a horizontal layout with live results next to the calendar; in narrow surfaces like a sidebar, fall back to the stacked layout." "Set `min` and `max` to the data window so users can’t pick outside the retention range." "Keep the trigger label as the chosen range (`Apr 1 – Apr 28, 2026`); don’t fall back to `Pick a date` once a value is committed." "Persist the selected range when the popover closes and re-opens so users can tweak the end date without re-picking the start." (https://vercel.com/geist/calendar)
12
+ * Ours: one button that reads as the current window. It opens the presets as buttons beside a two-month calendar, stacked above it on a narrow surface. A preset applies at once and closes; a custom window applies on the second day. `min` and `max` are `minValue` and `maxValue`, the data's retention window. The value is encoded into the URL by the caller with `encodeDateRange`.
13
+ * @words "Each preset is a real button with a Title Case label (`Last 30 Days`); don’t mark presets as menu items without keyboard handling." (https://vercel.com/geist/calendar)
14
+ * Ours: presets name the window in sentence case: *Past 7 days*, *Past 14 days*, *Past 30 days*, *This cycle*. A custom window reads as its dates.
15
+ * @access "Trap focus inside the popover so Tab cycles day cells and presets instead of the page behind it." "Announce range changes through `aria-live="polite"` so a screen reader hears `From Apr 1 to Apr 28` after the second click." (https://vercel.com/geist/calendar)
16
+ * Ours: the button carries the control's name and the current window, and opens a dialog of preset buttons, the current one pressed, and the day grid. A polite status next to the button states the window: the preset's name, or the dates once the second day is chosen; it does not change after the first day.
12
17
  */
13
- declare function DateRangeControl({ value, onChange, label, presets, presetLabels, customLabel, formatCustomValue, className, }: {
18
+ declare function DateRangeControl({ value, onChange, label, presets, presetLabels, formatCustomValue, minValue, maxValue, size, className, }: {
14
19
  value: DateRangeValue;
15
20
  onChange: (value: DateRangeValue) => void;
16
21
  /** Accessible name for the control. */
@@ -18,13 +23,17 @@ declare function DateRangeControl({ value, onChange, label, presets, presetLabel
18
23
  /** Which presets to offer, in order. Defaults to the full codec set. */
19
24
  presets?: readonly DateRangePreset[];
20
25
  presetLabels: Record<DateRangePreset, string>;
21
- customLabel: string;
22
26
  /** Renders the selected custom window as a finished label in the reader's language. */
23
27
  formatCustomValue: (value: {
24
28
  from: string;
25
29
  to: string;
26
30
  }) => string;
27
- className?: string;
31
+ /** The first day with data, as `yyyy-mm-dd`. */
32
+ minValue?: string | undefined;
33
+ /** The last day with data, as `yyyy-mm-dd`. */
34
+ maxValue?: string | undefined;
35
+ size?: "default" | "sm" | undefined;
36
+ className?: string | undefined;
28
37
  }): React.JSX.Element;
29
38
  export { DateRangeControl };
30
39
  //# sourceMappingURL=chart-date-range-control.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"chart-date-range-control.d.ts","sourceRoot":"","sources":["../../src/components/chart-date-range-control.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAa/B,OAAO,EAKL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,+BAA+B,CAAC;AA2BvC;;;;;;;;;GASG;AACH,iBAAS,gBAAgB,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,KAAK,EACL,OAA4B,EAC5B,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,SAAS,GACV,EAAE;IACD,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,OAAO,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC9C,WAAW,EAAE,MAAM,CAAC;IACpB,uFAAuF;IACvF,iBAAiB,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,qBAiGA;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"chart-date-range-control.d.ts","sourceRoot":"","sources":["../../src/components/chart-date-range-control.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAIL,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,+BAA+B,CAAC;AAyBvC;;;;;;;;;;;;;;GAcG;AACH,iBAAS,gBAAgB,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,KAAK,EACL,OAA4B,EAC5B,YAAY,EACZ,iBAAiB,EACjB,QAAQ,EACR,QAAQ,EACR,IAAgB,EAChB,SAAS,GACV,EAAE;IACD,KAAK,EAAE,cAAc,CAAC;IACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;IAC1C,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,wEAAwE;IACxE,OAAO,CAAC,EAAE,SAAS,eAAe,EAAE,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC;IAC9C,uFAAuF;IACvF,iBAAiB,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,CAAC;IACnE,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,qBAuGA;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1,29 +1,28 @@
1
- // Composed from the shadcn registry items `select`, `popover` and `calendar`
2
- // (https://ui.shadcn.com/r/styles/base-nova/select.json, .../popover.json,
3
- // .../calendar.json).
1
+ // Composed from the shadcn registry items `popover` and `calendar`
2
+ // (https://ui.shadcn.com/r/styles/base-nova/popover.json, .../calendar.json).
4
3
  "use client";
5
4
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
5
  import * as React from "react";
6
+ import { CalendarIcon } from "lucide-react";
7
+ import { Button } from "./button.js";
7
8
  import { cn } from "../lib/utils.js";
8
- import { Popover, PopoverContent } from "./popover.js";
9
- import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue, } from "./select.js";
10
- import { DATE_RANGE_PRESETS, formatIsoDay, isDateRangePreset, parseIsoDay, } from "./chart-date-range.js";
9
+ import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
10
+ import { DATE_RANGE_PRESETS, formatIsoDay, parseIsoDay, } from "./chart-date-range.js";
11
11
  /**
12
- * chart-date-range-control — ONE Select of relative presets with a "Custom"
13
- * entry that opens a range calendar in a Popover anchored to it. A page
14
- * toolbar carries one such control, not a row of range buttons.
12
+ * chart-date-range-control: ONE button that opens the common windows as
13
+ * buttons beside a range calendar. A page toolbar carries one such control,
14
+ * not a row of range buttons.
15
15
  *
16
16
  * Fully controlled: the consumer owns the value and typically round-trips it
17
17
  * through URL state with `encodeDateRange` / `decodeDateRange` from
18
18
  * `chart-date-range` (a separate server-safe module, because the package owns
19
19
  * no routing).
20
20
  *
21
- * `presets` narrows which entries the Select offers, in the order given. It
22
- * only filters the offered entries — the codec enum (`DATE_RANGE_PRESETS`) is
21
+ * `presets` narrows which windows are offered, in the order given. It only
22
+ * filters the offered buttons: the codec enum (`DATE_RANGE_PRESETS`) is
23
23
  * unchanged, so a URL arriving with an un-offered but valid preset token still
24
24
  * decodes; the consumer decides its fallback.
25
25
  */
26
- const CUSTOM_VALUE = "custom";
27
26
  const loadCalendar = () => import("./calendar");
28
27
  const Calendar = React.lazy(() => loadCalendar().then((module) => ({ default: module.Calendar })));
29
28
  function preloadCalendar(open) {
@@ -31,19 +30,26 @@ function preloadCalendar(open) {
31
30
  loadCalendar().catch(() => undefined);
32
31
  }
33
32
  /**
34
- * The period a chart reads: a `Select` of presets with a custom window from a calendar.
33
+ * The period a chart reads: a button that opens the common windows and a calendar for any other.
35
34
  *
36
35
  * @family Charts
37
- * @when The reading period of an overview or a chart: on the title row through `PageActions`' `period`, or in a `ChartCard`'s `controls` where the page has none.
38
- * @instead A choice of metric is a `ToggleGroup` in the card's controls. A date a person enters in a form is a date field.
39
- * @behaviour One select with the presets and a custom window; the value is encoded into the URL by the caller with `encodeDateRange`.
40
- * @words Presets name the window: "Past 7 days", "Past 14 days", "Past 30 days", "This cycle". A custom window reads as its dates.
41
- * @access The select carries the control's accessible name and announces the current range.
36
+ * @when "Pick `<Calendar>` for analytics ranges and any picker where day-of-week and month context matter." "Provide `<Calendar.Presets>` for the common ranges (`Last 7 Days`, `Month to Date`) so users land on the right window in one click." (https://vercel.com/geist/calendar)
37
+ * Ours: the reading period of an overview or a chart: on the title row through `PageActions`' `period`, or in a `ChartCard`'s `controls` where the page has none.
38
+ * @instead "For ISO dates pasted whole or relative shorthand like `7d`, use a free-form `Input`." (https://vercel.com/geist/calendar)
39
+ * Ours: a choice of metric is a `ToggleGroup` in the card's controls. A date a person enters in a form is a date field.
40
+ * @behaviour "Pair a horizontal layout with live results next to the calendar; in narrow surfaces like a sidebar, fall back to the stacked layout." "Set `min` and `max` to the data window so users can’t pick outside the retention range." "Keep the trigger label as the chosen range (`Apr 1 – Apr 28, 2026`); don’t fall back to `Pick a date` once a value is committed." "Persist the selected range when the popover closes and re-opens so users can tweak the end date without re-picking the start." (https://vercel.com/geist/calendar)
41
+ * Ours: one button that reads as the current window. It opens the presets as buttons beside a two-month calendar, stacked above it on a narrow surface. A preset applies at once and closes; a custom window applies on the second day. `min` and `max` are `minValue` and `maxValue`, the data's retention window. The value is encoded into the URL by the caller with `encodeDateRange`.
42
+ * @words "Each preset is a real button with a Title Case label (`Last 30 Days`); don’t mark presets as menu items without keyboard handling." (https://vercel.com/geist/calendar)
43
+ * Ours: presets name the window in sentence case: *Past 7 days*, *Past 14 days*, *Past 30 days*, *This cycle*. A custom window reads as its dates.
44
+ * @access "Trap focus inside the popover so Tab cycles day cells and presets instead of the page behind it." "Announce range changes through `aria-live="polite"` so a screen reader hears `From Apr 1 to Apr 28` after the second click." (https://vercel.com/geist/calendar)
45
+ * Ours: the button carries the control's name and the current window, and opens a dialog of preset buttons, the current one pressed, and the day grid. A polite status next to the button states the window: the preset's name, or the dates once the second day is chosen; it does not change after the first day.
42
46
  */
43
- function DateRangeControl({ value, onChange, label, presets = DATE_RANGE_PRESETS, presetLabels, customLabel, formatCustomValue, className, }) {
47
+ function DateRangeControl({ value, onChange, label, presets = DATE_RANGE_PRESETS, presetLabels, formatCustomValue, minValue, maxValue, size = "default", className, }) {
44
48
  const [open, setOpen] = React.useState(false);
45
49
  const [pending, setPending] = React.useState(undefined);
46
- const anchor = React.useRef(null);
50
+ const id = React.useId();
51
+ const labelId = `${id}-label`;
52
+ const triggerId = `${id}-trigger`;
47
53
  const isCustom = value.kind === "custom";
48
54
  const selected = pending ??
49
55
  (isCustom ? { from: parseIsoDay(value.from), to: parseIsoDay(value.to) } : undefined);
@@ -52,40 +58,30 @@ function DateRangeControl({ value, onChange, label, presets = DATE_RANGE_PRESETS
52
58
  : presetLabels[value.preset];
53
59
  function handleOpenChange(nextOpen) {
54
60
  setOpen(nextOpen);
61
+ preloadCalendar(nextOpen);
55
62
  if (!nextOpen) {
56
63
  setPending(undefined);
57
64
  }
58
65
  }
59
- function handleSelectChange(next) {
60
- if (next === CUSTOM_VALUE) {
61
- setOpen(true);
62
- return;
63
- }
64
- if (next !== null && isDateRangePreset(next)) {
65
- onChange({ kind: "preset", preset: next });
66
- }
66
+ function handlePreset(preset) {
67
+ setPending(undefined);
68
+ setOpen(false);
69
+ onChange({ kind: "preset", preset });
67
70
  }
68
- function handleCalendarSelect(range) {
69
- // The day picker answers the FIRST click with `from` and `to` on the same
70
- // day, so "both ends are set" is not the same as "the reader chose a
71
- // window". A range commits on the second click: the first one only opens
72
- // the selection and leaves the calendar up.
73
- const started = pending?.from !== undefined;
74
- const oneDay = range?.from !== undefined &&
75
- range.to !== undefined &&
76
- range.from.getTime() === range.to.getTime();
77
- if (range?.from && range?.to && (started || !oneDay)) {
78
- setPending(undefined);
79
- setOpen(false);
80
- onChange({
81
- kind: "custom",
82
- from: formatIsoDay(range.from),
83
- to: formatIsoDay(range.to),
84
- });
71
+ function handleCalendarSelect(_range, day) {
72
+ // The first click on an open picker starts a new window at that day, whatever window it
73
+ // shows; the day picker would instead stretch the shown window to it and the window would
74
+ // commit on one click. The second click ends the window, before or after the first day.
75
+ const start = pending?.from;
76
+ if (start === undefined) {
77
+ setPending({ from: day, to: undefined });
85
78
  return;
86
79
  }
87
- setPending(range);
80
+ const [from, to] = start.getTime() <= day.getTime() ? [start, day] : [day, start];
81
+ setPending(undefined);
82
+ setOpen(false);
83
+ onChange({ kind: "custom", from: formatIsoDay(from), to: formatIsoDay(to) });
88
84
  }
89
- return (_jsxs("div", { ref: anchor, "data-slot": "date-range-control", className: cn("inline-flex", className), children: [_jsxs(Select, { value: isCustom ? CUSTOM_VALUE : value.preset, onValueChange: handleSelectChange, onOpenChange: preloadCalendar, children: [_jsx(SelectTrigger, { "aria-label": label, className: "w-auto min-w-36", children: _jsx(SelectValue, { children: triggerLabel }) }), _jsx(SelectContent, { children: _jsxs(SelectGroup, { children: [presets.map((preset) => (_jsx(SelectItem, { value: preset, children: presetLabels[preset] }, preset))), _jsx(SelectItem, { value: CUSTOM_VALUE, children: customLabel })] }) })] }), _jsx(Popover, { open: open, onOpenChange: handleOpenChange, children: _jsx(PopoverContent, { anchor: anchor, align: "start", className: "w-auto p-0", children: _jsx(React.Suspense, { fallback: null, children: _jsx(Calendar, { mode: "range", numberOfMonths: 2, defaultMonth: selected?.from, selected: selected, onSelect: handleCalendarSelect }) }) }) })] }));
85
+ return (_jsxs("div", { "data-slot": "date-range-control", className: cn("inline-flex", className), children: [_jsx("span", { className: "sr-only", id: labelId, children: label }), _jsxs(Popover, { open: open, onOpenChange: handleOpenChange, children: [_jsx(PopoverTrigger, { render: _jsx(Button, { "aria-labelledby": `${labelId} ${triggerId}`, className: "w-auto min-w-36 justify-start", id: triggerId, prefix: _jsx(CalendarIcon, { "aria-hidden": "true" }), size: size, variant: "outline" }), children: triggerLabel }), _jsxs(PopoverContent, { align: "start", "aria-label": label, className: "w-auto flex-col gap-0 p-0 md:flex-row", sideOffset: 8, children: [_jsx("div", { className: "flex flex-col gap-1 border-b border-border p-2 md:w-44 md:border-r md:border-b-0", children: presets.map((preset) => (_jsx(Button, { "aria-pressed": !isCustom && value.preset === preset, className: "w-full justify-start", onClick: () => handlePreset(preset), size: "sm", variant: "ghost", children: presetLabels[preset] }, preset))) }), _jsx(React.Suspense, { fallback: null, children: _jsx(Calendar, { mode: "range", numberOfMonths: 2, defaultMonth: selected?.from, selected: selected, onSelect: handleCalendarSelect, minValue: minValue === undefined ? undefined : parseIsoDay(minValue), maxValue: maxValue === undefined ? undefined : parseIsoDay(maxValue) }) })] })] }), _jsx("span", { "aria-live": "polite", className: "sr-only", role: "status", children: triggerLabel })] }));
90
86
  }
91
87
  export { DateRangeControl };
@@ -1,10 +1,11 @@
1
1
  /**
2
- * The stock linear line with nothing around it: no axes, no grid, no tooltip, no card.
2
+ * The stock line with nothing around it: no axes, no grid, no tooltip, no card, drawn smooth and thin
3
+ * as OpenRouter's Activity tiles draw theirs, so a weekly rhythm reads as a wave and not as a row of spikes.
3
4
  *
4
5
  * @family Charts
5
6
  * @when What is trending: a row in a list, beside its name and its delta.
6
- * @instead When the reader needs values, axes or a period, use a full chart card. A KPI value carries its delta badge, not a sparkline, unless the card owns one.
7
- * @behaviour 96 by 32 px, a 2 px linear line. Stroke is one chart token or the entity's colour.
7
+ * @instead When the reader needs values, axes or a period, use a full chart card. A KPI value carries its delta badge; a `KpiCard` draws its own sparkline from its `sparkline` values, never one placed beside it.
8
+ * @behaviour 96 by 32 px, a 1.5 px monotone line through every value. Stroke is one chart token or the entity's colour.
8
9
  * @words None of its own. The row names the measure and the window: "Requests · past 8 weeks".
9
10
  * @access Decorative by default, hidden from assistive technology, because the value and delta beside it carry the reading. Standalone it takes a `label` and becomes an image.
10
11
  */
@@ -1 +1 @@
1
- {"version":3,"file":"chart-sparkline.d.ts","sourceRoot":"","sources":["../../src/components/chart-sparkline.tsx"],"names":[],"mappings":"AAYA;;;;;;;;;GASG;AACH,iBAAS,cAAc,CAAC,EACtB,IAAI,EACJ,KAAK,EACL,KAA2B,EAC3B,SAAS,GACV,EAAE;IACD,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAwBA;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"chart-sparkline.d.ts","sourceRoot":"","sources":["../../src/components/chart-sparkline.tsx"],"names":[],"mappings":"AAYA;;;;;;;;;;GAUG;AACH,iBAAS,cAAc,CAAC,EACtB,IAAI,EACJ,KAAK,EACL,KAA2B,EAC3B,SAAS,GACV,EAAE;IACD,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACxB,oEAAoE;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAwBA;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  // Pulled from the shadcn registry item `chart-line-linear`
2
2
  // (https://ui.shadcn.com/r/styles/new-york-v4/chart-line-linear.json),
3
- // stripped of its card, axes, grid and tooltip.
3
+ // stripped of its card, axes, grid and tooltip, its line drawn monotone at 1.5 px.
4
4
  "use client";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  import { Line, LineChart } from "recharts";
@@ -8,12 +8,13 @@ import { cn } from "../lib/utils.js";
8
8
  import { ChartContainer } from "./chart.js";
9
9
  const SPARKLINE_SERIES_KEY = "value";
10
10
  /**
11
- * The stock linear line with nothing around it: no axes, no grid, no tooltip, no card.
11
+ * The stock line with nothing around it: no axes, no grid, no tooltip, no card, drawn smooth and thin
12
+ * as OpenRouter's Activity tiles draw theirs, so a weekly rhythm reads as a wave and not as a row of spikes.
12
13
  *
13
14
  * @family Charts
14
15
  * @when What is trending: a row in a list, beside its name and its delta.
15
- * @instead When the reader needs values, axes or a period, use a full chart card. A KPI value carries its delta badge, not a sparkline, unless the card owns one.
16
- * @behaviour 96 by 32 px, a 2 px linear line. Stroke is one chart token or the entity's colour.
16
+ * @instead When the reader needs values, axes or a period, use a full chart card. A KPI value carries its delta badge; a `KpiCard` draws its own sparkline from its `sparkline` values, never one placed beside it.
17
+ * @behaviour 96 by 32 px, a 1.5 px monotone line through every value. Stroke is one chart token or the entity's colour.
17
18
  * @words None of its own. The row names the measure and the window: "Requests · past 8 weeks".
18
19
  * @access Decorative by default, hidden from assistive technology, because the value and delta beside it carry the reading. Standalone it takes a `label` and becomes an image.
19
20
  */
@@ -22,6 +23,6 @@ function ChartSparkline({ data, label, color = "var(--nc-chart-1)", className, }
22
23
  const chartConfig = {
23
24
  [SPARKLINE_SERIES_KEY]: { label: label ?? "Trend", color },
24
25
  };
25
- return (_jsx(ChartContainer, { "data-slot": "chart-sparkline", config: chartConfig, className: cn("aspect-auto h-8 w-24", className), ...(label ? { role: "img", "aria-label": label } : { "aria-hidden": true }), children: _jsx(LineChart, { data: chartData, margin: { top: 2, right: 2, bottom: 2, left: 2 }, children: _jsx(Line, { dataKey: SPARKLINE_SERIES_KEY, type: "linear", stroke: color, strokeWidth: 2, dot: false }) }) }));
26
+ return (_jsx(ChartContainer, { "data-slot": "chart-sparkline", config: chartConfig, className: cn("aspect-auto h-8 w-24", className), ...(label ? { role: "img", "aria-label": label } : { "aria-hidden": true }), children: _jsx(LineChart, { data: chartData, margin: { top: 2, right: 2, bottom: 2, left: 2 }, children: _jsx(Line, { dataKey: SPARKLINE_SERIES_KEY, type: "monotone", stroke: color, strokeWidth: 1.5, dot: false }) }) }));
26
27
  }
27
28
  export { ChartSparkline };
@@ -0,0 +1,44 @@
1
+ /** How a check ended, or that it has not ended yet. */
2
+ type CheckOutcome = "passed" | "failed" | "warning" | "pending";
3
+ type CheckCount = {
4
+ outcome: CheckOutcome;
5
+ count: number;
6
+ /** The count in words, which is what is read: "3 tasks completed". */
7
+ label: string;
8
+ };
9
+ type CheckCountsProps = {
10
+ /** Every outcome the checks can end in, zeros included: a zero stays, greyed. */
11
+ counts: readonly CheckCount[];
12
+ className?: string;
13
+ };
14
+ /**
15
+ * The checks run on one thing, counted by how they ended, each count a small outlined pill.
16
+ *
17
+ * @family Status
18
+ * @when The summary of a set of checks on one object, at the trailing edge of the row that opens
19
+ * them: an Agent's health checks (tasks completed, failed, still running), as Vercel counts a
20
+ * deployment's checks on its Deployment Checks row.
21
+ * @instead One state of a record is a `StatusBadge`. Whether the row as a whole passed is
22
+ * `CheckState`. A count of changed lines is `DiffCount`.
23
+ * @behaviour Each outcome is a 24 px outlined pill of its mark, in the outcome's colour (passed
24
+ * blue, failed red, warning amber, pending grey), and its count in ink and tabular figures, zeros
25
+ * included, in the order given, as Vercel draws a deployment's check counts. Static.
26
+ * @words The label is the count in words with its noun: *3 tasks completed*, *0 failed*.
27
+ * @access A list, drawn in phrasing elements so it can stand inside the button of the row it sums
28
+ * up; each chip is read by its label, and the mark is hidden, so colour never carries
29
+ * the outcome alone.
30
+ */
31
+ declare function CheckCounts({ counts, className }: CheckCountsProps): import("react").JSX.Element;
32
+ /**
33
+ * Whether a row of checks passed, as one filled 16 px circle at the row's trailing edge (passed
34
+ * blue with its check, as Vercel closes each deployment step); `none`
35
+ * when there was nothing to check. Read by its `label`, never by its colour.
36
+ */
37
+ declare function CheckState({ outcome, label, className, }: {
38
+ outcome: CheckOutcome | "none";
39
+ /** The state in words: "All checks passed", "1 check failed". */
40
+ label: string;
41
+ className?: string;
42
+ }): import("react").JSX.Element;
43
+ export { CheckCounts, CheckState, type CheckCount, type CheckOutcome };
44
+ //# sourceMappingURL=check-counts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"check-counts.d.ts","sourceRoot":"","sources":["../../src/components/check-counts.tsx"],"names":[],"mappings":"AAYA,uDAAuD;AACvD,KAAK,YAAY,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAC;AAEhE,KAAK,UAAU,GAAG;IAChB,OAAO,EAAE,YAAY,CAAC;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAWF,KAAK,gBAAgB,GAAG;IACtB,iFAAiF;IACjF,MAAM,EAAE,SAAS,UAAU,EAAE,CAAC;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,iBAAS,WAAW,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,gBAAgB,+BAwB3D;AAUD;;;;GAIG;AACH,iBAAS,UAAU,CAAC,EAClB,OAAO,EACP,KAAK,EACL,SAAS,GACV,EAAE;IACD,OAAO,EAAE,YAAY,GAAG,MAAM,CAAC;IAC/B,iEAAiE;IACjE,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAiBA;AAED,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,UAAU,EAAE,KAAK,YAAY,EAAE,CAAC"}
@@ -0,0 +1,51 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Check, CircleAlert, CircleCheck, CircleDot, Clock, Minus, } from "lucide-react";
3
+ import { cn } from "../lib/utils.js";
4
+ // As Vercel's deployment checks: an outlined pill per outcome, its mark in the
5
+ // outcome's colour and its count in ink, zeros included.
6
+ const CHIP_BY_OUTCOME = {
7
+ passed: { icon: CircleCheck, mark: "text-info" },
8
+ failed: { icon: CircleAlert, mark: "text-destructive" },
9
+ warning: { icon: CircleDot, mark: "text-warning" },
10
+ pending: { icon: Clock, mark: "text-muted-foreground" },
11
+ };
12
+ /**
13
+ * The checks run on one thing, counted by how they ended, each count a small outlined pill.
14
+ *
15
+ * @family Status
16
+ * @when The summary of a set of checks on one object, at the trailing edge of the row that opens
17
+ * them: an Agent's health checks (tasks completed, failed, still running), as Vercel counts a
18
+ * deployment's checks on its Deployment Checks row.
19
+ * @instead One state of a record is a `StatusBadge`. Whether the row as a whole passed is
20
+ * `CheckState`. A count of changed lines is `DiffCount`.
21
+ * @behaviour Each outcome is a 24 px outlined pill of its mark, in the outcome's colour (passed
22
+ * blue, failed red, warning amber, pending grey), and its count in ink and tabular figures, zeros
23
+ * included, in the order given, as Vercel draws a deployment's check counts. Static.
24
+ * @words The label is the count in words with its noun: *3 tasks completed*, *0 failed*.
25
+ * @access A list, drawn in phrasing elements so it can stand inside the button of the row it sums
26
+ * up; each chip is read by its label, and the mark is hidden, so colour never carries
27
+ * the outcome alone.
28
+ */
29
+ function CheckCounts({ counts, className }) {
30
+ return (_jsx("span", { className: cn("flex shrink-0 items-center gap-1", className), "data-slot": "check-counts", role: "list", children: counts.map(({ outcome, count, label }) => {
31
+ const { icon: Icon, mark } = CHIP_BY_OUTCOME[outcome];
32
+ return (_jsxs("span", { className: "inline-flex h-6 items-center gap-1.5 rounded-full border border-border px-2 text-label-sm font-medium text-foreground tabular-nums", "data-outcome": outcome, role: "listitem", children: [_jsx(Icon, { "aria-hidden": "true", className: cn("size-3.5", mark) }), _jsx("span", { "aria-hidden": "true", children: count }), _jsx("span", { className: "sr-only", children: label })] }, outcome));
33
+ }) }));
34
+ }
35
+ const STATE_BY_OUTCOME = {
36
+ passed: { icon: Check, fill: "bg-info text-info-foreground" },
37
+ failed: { icon: CircleAlert, fill: "bg-destructive text-destructive-foreground" },
38
+ warning: { icon: CircleDot, fill: "bg-warning text-warning-foreground" },
39
+ pending: { icon: Clock, fill: "bg-muted-foreground text-background" },
40
+ none: { icon: Minus, fill: "bg-accent text-muted-foreground" },
41
+ };
42
+ /**
43
+ * Whether a row of checks passed, as one filled 16 px circle at the row's trailing edge (passed
44
+ * blue with its check, as Vercel closes each deployment step); `none`
45
+ * when there was nothing to check. Read by its `label`, never by its colour.
46
+ */
47
+ function CheckState({ outcome, label, className, }) {
48
+ const { icon: Icon, fill } = STATE_BY_OUTCOME[outcome];
49
+ return (_jsx("span", { "aria-label": label, className: cn("inline-flex size-4 shrink-0 items-center justify-center rounded-full", fill, className), "data-outcome": outcome, "data-slot": "check-state", role: "img", children: _jsx(Icon, { "aria-hidden": "true", className: "size-2.5", strokeWidth: 3 }) }));
50
+ }
51
+ export { CheckCounts, CheckState };
@@ -1,19 +1,47 @@
1
1
  import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
2
+ import { type ControlName } from "../internal/control-name.js";
2
3
  /**
3
4
  * A box that is checked, unchecked or mixed.
4
5
  *
5
6
  * @family Choices
6
- * @when Independent yes-or-no choices in a form, an acknowledgment before a step, selecting rows.
7
- * @instead A setting that is on or off is a `Switch`. One of several is a `RadioGroup`. Several
8
- * values from a long list is a multi-select.
9
- * @behaviour Unchecked is only the input-grey edge, showing the surface beneath. Checked fills with
10
- * ink and a 14 px check; mixed shows a minus and is worked out from the rows below. The label
11
- * toggles it too, and on touch the target is 44 px. A required acknowledgment is checked on submit.
12
- * @words The label says what is true when checked, positively: *Send a copy to the person who
13
- * asked*, not *Don't send*. A related set gets a legend.
14
- * @access `role="checkbox"` with `aria-checked` true, false or mixed. A row's box is named for its
15
- * record: *Select pec@acme.it*. A set sits in a `FieldSet` with its legend.
7
+ * @when "Multi-select inside a list, like table-row pickers, multi-pick filters, and opt-in
8
+ * preference groups." (https://vercel.com/geist/checkbox) "Acknowledgments where the user must
9
+ * affirm a specific statement (terms of service, irreversible export)."
10
+ * (https://vercel.com/geist/checkbox)
11
+ * @instead "For a single boolean setting like dark mode or password protection, use `Toggle`."
12
+ * (https://vercel.com/geist/checkbox) "The on/off mechanic is clearer there than a lone checkbox."
13
+ * (https://vercel.com/geist/checkbox) Ours: Geist's `Toggle` is our `Switch`. One of several
14
+ * exclusive options is a `RadioGroup`, and one that needs a description is a `ChoiceboxGroup`.
15
+ * Several values from a long list is a multi-select.
16
+ * @behaviour "Indeterminate is a visual state, not a third value."
17
+ * (https://vercel.com/geist/checkbox) "Drive it from a parent that knows partial selection, and
18
+ * clear it as soon as every child is fully checked or unchecked."
19
+ * (https://vercel.com/geist/checkbox) "Validation on a required acknowledgment fires on submit, not
20
+ * on blur, so checking and unchecking shouldn’t flash an error."
21
+ * (https://vercel.com/geist/checkbox) "Disabled checkboxes still need a Tooltip naming the reason;
22
+ * a greyed box with no explanation reads as a bug." (https://vercel.com/geist/checkbox) Ours: named
23
+ * by `aria-label`, `aria-labelledby` or an `id` that a `FieldLabel` points at; a box with none does
24
+ * not compile. It is 16 px with a 4 px corner, the label 8 px away at 13 px regular weight on a 20
25
+ * px row, and the label is part of the target. Colour: only a checked box fills, in ink; an
26
+ * unchecked box shows the surface and greys on hover. Mixed is an unfilled box with a grey dash. A
27
+ * disabled box turns grey, an unchecked or mixed one with a lighter edge and a checked one mid
28
+ * grey, and ignores hover.
29
+ * @words "Group label above a `<fieldset>` is a Title Case noun like `Notifications` or `Required
30
+ * Permissions`. No trailing colon." (https://vercel.com/geist/checkbox) "Acknowledgment label is a
31
+ * full sentence ending in a period: `I agree to the Terms of Service.`"
32
+ * (https://vercel.com/geist/checkbox) "Indeterminate copy names the partial count next to the group
33
+ * label (`3 of 5 selected`). Never leave the dash state unlabeled."
34
+ * (https://vercel.com/geist/checkbox) Ours: sentence case, not Title Case. The label says what is
35
+ * true when checked, positively: *Send a copy to the person who asked*, not *Don't send*.
36
+ * @access "Wrap related checkboxes in `<fieldset>` with a `<legend>` so screen readers announce the
37
+ * group name before each option." (https://vercel.com/geist/checkbox) "Row-select checkbox in a
38
+ * table has no visible label. Set `aria-label="Select {row name}"` so the row stays identifiable
39
+ * out of context." (https://vercel.com/geist/checkbox) "The click target already extends to the
40
+ * label. Don’t override the `<label>`/`htmlFor` association with a custom wrapper that breaks the
41
+ * click region." (https://vercel.com/geist/checkbox) Ours: `role="checkbox"` with `aria-checked`
42
+ * true, false or mixed. A row's box is named for its record: *Select pec@acme.it*. A set sits in a
43
+ * `FieldSet` with its legend.
16
44
  */
17
- declare function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props): import("react").JSX.Element;
45
+ declare function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props & ControlName): import("react").JSX.Element;
18
46
  export { Checkbox };
19
47
  //# sourceMappingURL=checkbox.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAKxE;;;;;;;;;;;;;;GAcG;AACH,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,+BAmBtE;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../src/components/checkbox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,IAAI,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAGxE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAG3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,CAAC,IAAI,CAAC,KAAK,GAAG,WAAW,+BAmBpF;AAED,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -7,18 +7,45 @@ import { CheckIcon, MinusIcon } from "lucide-react";
7
7
  * A box that is checked, unchecked or mixed.
8
8
  *
9
9
  * @family Choices
10
- * @when Independent yes-or-no choices in a form, an acknowledgment before a step, selecting rows.
11
- * @instead A setting that is on or off is a `Switch`. One of several is a `RadioGroup`. Several
12
- * values from a long list is a multi-select.
13
- * @behaviour Unchecked is only the input-grey edge, showing the surface beneath. Checked fills with
14
- * ink and a 14 px check; mixed shows a minus and is worked out from the rows below. The label
15
- * toggles it too, and on touch the target is 44 px. A required acknowledgment is checked on submit.
16
- * @words The label says what is true when checked, positively: *Send a copy to the person who
17
- * asked*, not *Don't send*. A related set gets a legend.
18
- * @access `role="checkbox"` with `aria-checked` true, false or mixed. A row's box is named for its
19
- * record: *Select pec@acme.it*. A set sits in a `FieldSet` with its legend.
10
+ * @when "Multi-select inside a list, like table-row pickers, multi-pick filters, and opt-in
11
+ * preference groups." (https://vercel.com/geist/checkbox) "Acknowledgments where the user must
12
+ * affirm a specific statement (terms of service, irreversible export)."
13
+ * (https://vercel.com/geist/checkbox)
14
+ * @instead "For a single boolean setting like dark mode or password protection, use `Toggle`."
15
+ * (https://vercel.com/geist/checkbox) "The on/off mechanic is clearer there than a lone checkbox."
16
+ * (https://vercel.com/geist/checkbox) Ours: Geist's `Toggle` is our `Switch`. One of several
17
+ * exclusive options is a `RadioGroup`, and one that needs a description is a `ChoiceboxGroup`.
18
+ * Several values from a long list is a multi-select.
19
+ * @behaviour "Indeterminate is a visual state, not a third value."
20
+ * (https://vercel.com/geist/checkbox) "Drive it from a parent that knows partial selection, and
21
+ * clear it as soon as every child is fully checked or unchecked."
22
+ * (https://vercel.com/geist/checkbox) "Validation on a required acknowledgment fires on submit, not
23
+ * on blur, so checking and unchecking shouldn’t flash an error."
24
+ * (https://vercel.com/geist/checkbox) "Disabled checkboxes still need a Tooltip naming the reason;
25
+ * a greyed box with no explanation reads as a bug." (https://vercel.com/geist/checkbox) Ours: named
26
+ * by `aria-label`, `aria-labelledby` or an `id` that a `FieldLabel` points at; a box with none does
27
+ * not compile. It is 16 px with a 4 px corner, the label 8 px away at 13 px regular weight on a 20
28
+ * px row, and the label is part of the target. Colour: only a checked box fills, in ink; an
29
+ * unchecked box shows the surface and greys on hover. Mixed is an unfilled box with a grey dash. A
30
+ * disabled box turns grey, an unchecked or mixed one with a lighter edge and a checked one mid
31
+ * grey, and ignores hover.
32
+ * @words "Group label above a `<fieldset>` is a Title Case noun like `Notifications` or `Required
33
+ * Permissions`. No trailing colon." (https://vercel.com/geist/checkbox) "Acknowledgment label is a
34
+ * full sentence ending in a period: `I agree to the Terms of Service.`"
35
+ * (https://vercel.com/geist/checkbox) "Indeterminate copy names the partial count next to the group
36
+ * label (`3 of 5 selected`). Never leave the dash state unlabeled."
37
+ * (https://vercel.com/geist/checkbox) Ours: sentence case, not Title Case. The label says what is
38
+ * true when checked, positively: *Send a copy to the person who asked*, not *Don't send*.
39
+ * @access "Wrap related checkboxes in `<fieldset>` with a `<legend>` so screen readers announce the
40
+ * group name before each option." (https://vercel.com/geist/checkbox) "Row-select checkbox in a
41
+ * table has no visible label. Set `aria-label="Select {row name}"` so the row stays identifiable
42
+ * out of context." (https://vercel.com/geist/checkbox) "The click target already extends to the
43
+ * label. Don’t override the `<label>`/`htmlFor` association with a custom wrapper that breaks the
44
+ * click region." (https://vercel.com/geist/checkbox) Ours: `role="checkbox"` with `aria-checked`
45
+ * true, false or mixed. A row's box is named for its record: *Select pec@acme.it*. A set sits in a
46
+ * `FieldSet` with its legend.
20
47
  */
21
48
  function Checkbox({ className, ...props }) {
22
- return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-xs border border-input transition-colors group-has-disabled/field:opacity-50 after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-x-1/2 after:-translate-y-1/2 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:aria-checked:border-primary data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground data-indeterminate:border-primary data-indeterminate:bg-primary data-indeterminate:text-primary-foreground [@media(hover:hover)_and_(pointer:fine)]:after:hidden", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none [&>svg]:size-3.5", render: (indicatorProps, state) => (_jsx("span", { ...indicatorProps, children: state.indeterminate ? _jsx(MinusIcon, {}) : _jsx(CheckIcon, {}) })) }) }));
49
+ return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn("peer relative flex size-4 shrink-0 items-center justify-center rounded-xs-plus border border-input nc-transition-paint after:absolute after:top-1/2 after:left-1/2 after:size-touch-target after:-translate-x-1/2 after:-translate-y-1/2 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground data-disabled:cursor-not-allowed data-disabled:not-data-checked:border-border data-disabled:not-data-checked:bg-muted data-disabled:data-checked:border-transparent data-disabled:data-checked:bg-input/50 data-indeterminate:text-input data-unchecked:not-data-disabled:hover:bg-accent data-indeterminate:not-data-disabled:hover:bg-accent aria-invalid:border-destructive aria-invalid:aria-checked:border-primary [@media(hover:hover)_and_(pointer:fine)]:after:hidden", className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "grid place-content-center text-current transition-none [&>svg]:size-3.5", render: (indicatorProps, state) => (_jsx("span", { ...indicatorProps, children: state.indeterminate ? _jsx(MinusIcon, {}) : _jsx(CheckIcon, {}) })) }) }));
23
50
  }
24
51
  export { Checkbox };