@nadicodeai/ui 12.1.102 → 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 (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 +9 -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
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ import { PageCommandButton } from "../components/page-actions.js";
5
+ import { textLinkVariants } from "../components/text-link.js";
6
+ import { FooterStrip } from "./footer-strip.js";
7
+ function LearnMore({ label, link }) {
8
+ return useRender({
9
+ defaultTagName: "a",
10
+ render: link,
11
+ props: { className: textLinkVariants({ kind: "quiet" }), children: label },
12
+ });
13
+ }
14
+ /** The note's strip, under a collection card's count and paging. */
15
+ export function CollectionNoteStrip({ note }) {
16
+ return (_jsx(FooterStrip, { hint: _jsxs("span", { className: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [note.text, note.learnMore ? _jsx(LearnMore, { ...note.learnMore }) : null] }), hintSlot: "table-card-note", children: note.action ? _jsx(PageCommandButton, { command: note.action, variant: "outline" }) : null }));
17
+ }
@@ -0,0 +1,57 @@
1
+ import { type ComponentProps, type ReactNode } from "react";
2
+ import { type EmptyStateKind } from "../components/empty-state.js";
3
+ import { type IdentityMarkProps } from "../components/identity-mark.js";
4
+ import { type PageCommand } from "../components/page-actions.js";
5
+ import { type StatusBadgeTone } from "../components/status-badge.js";
6
+ export type CollectionRailLinkProps = Omit<ComponentProps<"a">, "href"> & {
7
+ href: string;
8
+ };
9
+ export type CollectionRailItem = {
10
+ id: string;
11
+ /** The record's identity mark, drawn at 24 as on a feed line; a figure line has none. */
12
+ mark?: IdentityMarkProps;
13
+ title: string;
14
+ /** One muted line under the title: why it is here, or when. */
15
+ detail?: ReactNode;
16
+ /** A figure at the trailing edge, as Vercel's Usage card lists its amounts. */
17
+ value?: ReactNode;
18
+ /** Only for the exception, as in a row: the item's state word. */
19
+ status?: {
20
+ label: string;
21
+ tone: StatusBadgeTone;
22
+ };
23
+ /** Opens the record the item names. */
24
+ href?: string;
25
+ };
26
+ export type CollectionRailSection = {
27
+ id: string;
28
+ /** The card's name, set above it: "Needs attention". */
29
+ title: string;
30
+ /** Undefined while the column's read is in flight: the card holds its place with placeholder lines. */
31
+ items: readonly CollectionRailItem[] | undefined;
32
+ /** What the card says with no items: `cleared` for work that is done, `nothingYet` for a list that fills by itself. */
33
+ empty: EmptyStateKind<"cleared"> | EmptyStateKind<"nothingYet">;
34
+ } & ({
35
+ /** One muted line at the card's top, such as the cycle: "October · 4 of 9 statements issued". */
36
+ summary: ReactNode;
37
+ /** One outline button at the summary's end, as Vercel's Usage card carries Billing beside its cycle. */
38
+ action?: PageCommand;
39
+ } | {
40
+ summary?: undefined;
41
+ action?: never;
42
+ });
43
+ export type CollectionRail = {
44
+ /** Names the column for assistive technology: "About your customers". */
45
+ label: string;
46
+ sections: readonly CollectionRailSection[];
47
+ /** The column's read failed: one card says so in place of the sections, while the records beside it stay. */
48
+ failed?: EmptyStateKind<"failed">;
49
+ /** The product's router link for an item that opens its record. */
50
+ renderLink?: (props: CollectionRailLinkProps) => ReactNode;
51
+ };
52
+ /** The left column of a collection: titled cards of what matters about the records beside it. */
53
+ export declare function CollectionRailColumn({ rail, className, }: {
54
+ rail: CollectionRail;
55
+ className?: string;
56
+ }): import("react").JSX.Element;
57
+ //# sourceMappingURL=collection-rail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"collection-rail.d.ts","sourceRoot":"","sources":["../../src/internal/collection-rail.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAS,MAAM,OAAO,CAAC;AAGnE,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAClF,OAAO,EAAE,KAAK,WAAW,EAAqB,MAAM,2BAA2B,CAAC;AAEhF,OAAO,EAAe,KAAK,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAG9E,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAE3F,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,yFAAyF;IACzF,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,+DAA+D;IAC/D,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kEAAkE;IAClE,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,eAAe,CAAA;KAAE,CAAC;IAClD,uCAAuC;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,uGAAuG;IACvG,KAAK,EAAE,SAAS,kBAAkB,EAAE,GAAG,SAAS,CAAC;IACjD,uHAAuH;IACvH,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,GAAG,cAAc,CAAC,YAAY,CAAC,CAAC;CACjE,GAAG,CACA;IACE,iGAAiG;IACjG,OAAO,EAAE,SAAS,CAAC;IACnB,wGAAwG;IACxG,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,GACD;IAAE,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,MAAM,CAAC,EAAE,KAAK,CAAA;CAAE,CAC1C,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,qBAAqB,EAAE,CAAC;IAC3C,6GAA6G;IAC7G,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;IAClC,mEAAmE;IACnE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,SAAS,CAAC;CAC5D,CAAC;AA8FF,iGAAiG;AACjG,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,SAAS,GACV,EAAE;IACD,IAAI,EAAE,cAAc,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BAsBA"}
@@ -0,0 +1,33 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useId } from "react";
4
+ import { Card } from "../components/card.js";
5
+ import { EmptyState } from "../components/empty-state.js";
6
+ import { IdentityMark } from "../components/identity-mark.js";
7
+ import { PageCommandButton } from "../components/page-actions.js";
8
+ import { Skeleton, SkeletonRegion } from "../components/skeleton.js";
9
+ import { StatusBadge } from "../components/status-badge.js";
10
+ import { cn } from "../lib/utils.js";
11
+ function defaultLink(props) {
12
+ return _jsx("a", { ...props });
13
+ }
14
+ function RailItem({ item, renderLink, }) {
15
+ const body = (_jsxs(_Fragment, { children: [item.mark ? _jsx(IdentityMark, { ...item.mark, size: 24 }) : null, _jsxs("span", { className: "grid min-w-0 flex-1", children: [_jsx("span", { className: "truncate font-medium text-foreground", title: item.title, children: item.title }), item.detail ? (_jsx("span", { className: "line-clamp-2 text-body-sm break-words text-muted-foreground", children: item.detail })) : null] }), item.status ? _jsx(StatusBadge, { label: item.status.label, tone: item.status.tone }) : null, item.value === undefined ? null : (_jsx("span", { className: "shrink-0 text-right text-foreground tabular-nums", children: item.value }))] }));
16
+ const row = "flex min-h-9 min-w-0 items-center gap-3 px-4 py-2 text-sm";
17
+ return (_jsx("li", { "data-slot": "collection-rail-item", children: item.href ? (renderLink({
18
+ href: item.href,
19
+ className: cn(row, "nc-transition-paint hover:bg-accent"),
20
+ children: body,
21
+ })) : (_jsx("div", { className: row, children: body })) }));
22
+ }
23
+ const LOADING_LINES = ["first", "second", "third"];
24
+ function RailSection({ section, renderLink, }) {
25
+ const headingId = useId();
26
+ return (_jsxs("section", { "aria-labelledby": headingId, className: "grid min-w-0 gap-3", "data-slot": "rail-section", children: [_jsx("h2", { className: "text-heading-xs", id: headingId, children: section.title }), _jsxs(Card, { className: "gap-0 py-0", size: "sm", children: [section.summary ? (_jsxs("div", { className: "flex min-h-11 items-center justify-between gap-3 border-b border-border px-4 py-1.5 text-body-sm text-muted-foreground", children: [_jsx("span", { className: "min-w-0", children: section.summary }), section.action ? (_jsx(PageCommandButton, { command: section.action, size: "sm", variant: "outline" })) : null] })) : null, section.items === undefined ? (_jsx("ul", { "aria-hidden": "true", className: "divide-y divide-border", children: LOADING_LINES.map((line) => (_jsx("li", { className: "flex min-h-11 items-center px-4", children: _jsx(Skeleton, { className: "h-4 w-full" }) }, line))) })) : section.items.length > 0 ? (_jsx("ul", { className: "divide-y divide-border", children: section.items.map((item) => (_jsx(RailItem, { item: item, renderLink: renderLink }, item.id))) })) : (_jsx(EmptyState, { ...section.empty, headingLevel: 3, scope: "line" }))] })] }));
27
+ }
28
+ /** The left column of a collection: titled cards of what matters about the records beside it. */
29
+ export function CollectionRailColumn({ rail, className, }) {
30
+ const renderLink = rail.renderLink ?? defaultLink;
31
+ const loading = !rail.failed && rail.sections.some((section) => section.items === undefined);
32
+ return (_jsx("aside", { "aria-label": rail.label, className: cn("grid min-w-0 content-start gap-6", className), "data-slot": "collection-rail", children: _jsx(SkeletonRegion, { busy: loading, className: "contents", children: rail.failed ? (_jsx(Card, { className: "gap-0 py-0", size: "sm", children: _jsx(EmptyState, { ...rail.failed, headingLevel: 2, scope: "card" }) })) : (rail.sections.map((section) => (_jsx(RailSection, { renderLink: renderLink, section: section }, section.id)))) }) }));
33
+ }
@@ -0,0 +1,18 @@
1
+ import { type ReactNode } from "react";
2
+ /**
3
+ * A company's logo on its tile, and `fallback`, its initials, when the stored logo does not load,
4
+ * so a broken address never leaves an empty tile.
5
+ */
6
+ export declare function CompanyLogo({ logo, colourTile, size, naming, fallback, }: {
7
+ logo: string;
8
+ colourTile: boolean;
9
+ size: number;
10
+ naming: {
11
+ role: "img";
12
+ "aria-label": string;
13
+ } | {
14
+ "aria-hidden": true;
15
+ };
16
+ fallback: ReactNode;
17
+ }): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
18
+ //# sourceMappingURL=company-logo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"company-logo.d.ts","sourceRoot":"","sources":["../../src/internal/company-logo.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAIjD;;;GAGG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,UAAU,EACV,IAAI,EACJ,MAAM,EACN,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE;QAAE,IAAI,EAAE,KAAK,CAAC;QAAC,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG;QAAE,aAAa,EAAE,IAAI,CAAA;KAAE,CAAC;IACxE,QAAQ,EAAE,SAAS,CAAC;CACrB,+TAwBA"}
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import { cn } from "../lib/utils.js";
5
+ /**
6
+ * A company's logo on its tile, and `fallback`, its initials, when the stored logo does not load,
7
+ * so a broken address never leaves an empty tile.
8
+ */
9
+ export function CompanyLogo({ logo, colourTile, size, naming, fallback, }) {
10
+ const [failedLogo, setFailedLogo] = useState(null);
11
+ if (failedLogo === logo)
12
+ return fallback;
13
+ return (_jsx("span", { className: cn("inline-flex shrink-0 items-center justify-center overflow-hidden", colourTile ? null : "bg-nc-identity-ink ring-1 ring-border ring-inset", size >= 40 ? "rounded-md" : "rounded-sm"), "data-kind": "company", "data-slot": "identity-mark", style: { width: size, height: size }, ...naming, children: _jsx("img", { alt: "", className: colourTile ? "size-full object-cover" : "max-h-[60%] max-w-[78%] object-contain", "data-slot": "identity-mark-logo", onError: () => setFailedLogo(logo), src: logo }) }));
14
+ }
@@ -0,0 +1,12 @@
1
+ export type ControlName = {
2
+ "aria-label": string;
3
+ "aria-labelledby"?: undefined;
4
+ } | {
5
+ "aria-labelledby": string;
6
+ "aria-label"?: undefined;
7
+ } | {
8
+ id: string;
9
+ "aria-label"?: undefined;
10
+ "aria-labelledby"?: undefined;
11
+ };
12
+ //# sourceMappingURL=control-name.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-name.d.ts","sourceRoot":"","sources":["../../src/internal/control-name.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GACnB;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,iBAAiB,CAAC,EAAE,SAAS,CAAA;CAAE,GACvD;IAAE,iBAAiB,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,SAAS,CAAA;CAAE,GACvD;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,SAAS,CAAC;IAAC,iBAAiB,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ export declare const DIFF_ROW: {
2
+ readonly added: "bg-success-soft text-success-soft-foreground";
3
+ readonly removed: "bg-destructive-soft text-destructive-soft-foreground";
4
+ };
5
+ export declare const DIFF_MARK: {
6
+ readonly added: "+";
7
+ readonly removed: "−";
8
+ };
9
+ //# sourceMappingURL=diff-line.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"diff-line.d.ts","sourceRoot":"","sources":["../../src/internal/diff-line.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,QAAQ;;;CAGX,CAAC;AAEX,eAAO,MAAM,SAAS;;;CAGZ,CAAC"}
@@ -0,0 +1,8 @@
1
+ export const DIFF_ROW = {
2
+ added: "bg-success-soft text-success-soft-foreground",
3
+ removed: "bg-destructive-soft text-destructive-soft-foreground",
4
+ };
5
+ export const DIFF_MARK = {
6
+ added: "+",
7
+ removed: "−",
8
+ };
@@ -1,10 +1,14 @@
1
- type EmptyScope = "page" | "region" | "card";
2
- declare function Empty({ className, scope, ...props }: React.ComponentProps<"div"> & {
1
+ /** `line` is a card that lists a few items, such as a collection rail's: the absence is one row like an item. */
2
+ type EmptyScope = "page" | "region" | "card" | "line";
3
+ type EmptyTone = "neutral" | "error";
4
+ declare function Empty({ className, scope, tone, ...props }: React.ComponentProps<"div"> & {
3
5
  scope?: EmptyScope;
6
+ tone?: EmptyTone;
4
7
  }): import("react").JSX.Element;
5
8
  declare function EmptyHeader({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
9
+ type EmptyMediaVariant = "picture" | "tile" | "error";
6
10
  declare function EmptyMedia({ className, variant, ...props }: React.ComponentProps<"div"> & {
7
- variant: "picture" | "warning";
11
+ variant: EmptyMediaVariant;
8
12
  }): import("react").JSX.Element;
9
13
  type EmptyPictureSize = "page" | "card";
10
14
  declare function EmptyPicture({ size, src }: {
@@ -14,5 +18,5 @@ declare function EmptyPicture({ size, src }: {
14
18
  declare function EmptyTitle({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
15
19
  declare function EmptyDescription({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
16
20
  declare function EmptyContent({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
17
- export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, EmptyPicture, type EmptyPictureSize, type EmptyScope, };
21
+ export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, EmptyPicture, type EmptyPictureSize, type EmptyScope, type EmptyTone, };
18
22
  //# sourceMappingURL=empty.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../src/internal/empty.tsx"],"names":[],"mappings":"AAIA,KAAK,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE7C,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,KAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,UAAU,CAAA;CAAE,+BActD;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQxE;AAED,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,OAAO,EAAE,SAAS,GAAG,SAAS,CAAA;CAAE,+BAelE;AAED,KAAK,gBAAgB,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC,iBAAS,YAAY,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,+BA0B3E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAW7E;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQzE;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,UAAU,GAChB,CAAC"}
1
+ {"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../src/internal/empty.tsx"],"names":[],"mappings":"AAIA,iHAAiH;AACjH,KAAK,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AACtD,KAAK,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAOrC,iBAAS,KAAK,CAAC,EACb,SAAS,EACT,KAAgB,EAChB,IAAgB,EAChB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,UAAU,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAAE,+BAkBxE;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQxE;AAED,KAAK,iBAAiB,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAEtD,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,OAAO,EACP,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAAE,OAAO,EAAE,iBAAiB,CAAA;CAAE,+BAgB9D;AAED,KAAK,gBAAgB,GAAG,MAAM,GAAG,MAAM,CAAC;AAExC,iBAAS,YAAY,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,+BA6B3E;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQvE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAW7E;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,+BAQzE;AAED,OAAO,EACL,KAAK,EACL,WAAW,EACX,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,UAAU,EACV,YAAY,EACZ,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,SAAS,GACf,CAAC"}
@@ -1,18 +1,23 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useCallback, useState } from "react";
3
3
  import { cn } from "../lib/utils.js";
4
- function Empty({ className, scope = "region", ...props }) {
5
- return (_jsx("div", { "data-slot": "empty", className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center text-center", scope === "page" ? "px-6 pt-10 pb-11" : "px-5 py-7", scope !== "card" && "rounded-sm bg-card nc-elevation-resting", className), ...props, "data-scope": scope }));
4
+ const FRAME = {
5
+ error: "rounded-sm border border-destructive-soft-foreground/25 bg-destructive-soft",
6
+ neutral: "rounded-sm bg-card nc-elevation-resting",
7
+ };
8
+ function Empty({ className, scope = "region", tone = "neutral", ...props }) {
9
+ return (_jsx("div", { "data-slot": "empty", className: cn("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-6 text-center", scope === "card" && "px-5 py-8", scope === "line" && "min-h-11 flex-row justify-start gap-2 px-4 py-2.5 text-left", (scope === "page" || scope === "region") && "px-17.5 py-12", tone === "error" && "gap-2 p-4 text-destructive-soft-foreground", (scope === "page" || scope === "region") && FRAME[tone], className), ...props, "data-scope": scope, "data-tone": tone }));
6
10
  }
7
11
  function EmptyHeader({ className, ...props }) {
8
- return (_jsx("div", { "data-slot": "empty-header", className: cn("flex max-w-sm min-w-0 flex-col items-center gap-4", className), ...props }));
12
+ return (_jsx("div", { "data-slot": "empty-header", className: cn("flex max-w-sm min-w-0 flex-col items-center gap-6", className), ...props }));
9
13
  }
10
14
  function EmptyMedia({ className, variant, ...props }) {
11
- return (_jsx("div", { "data-slot": "empty-icon", "data-variant": variant, className: cn("flex shrink-0 justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", variant === "warning" &&
12
- "size-9 items-center rounded-md bg-destructive-soft text-destructive [&_svg:not([class*='size-'])]:size-4", variant === "picture" && "items-end", className), ...props }));
15
+ return (_jsx("div", { "data-slot": "empty-icon", "data-variant": variant, className: cn("flex shrink-0 justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0", variant === "tile" &&
16
+ "size-13.5 items-center rounded-md border border-border bg-card text-muted-foreground [&_svg:not([class*='size-'])]:size-8", variant === "error" && "items-center [&_svg:not([class*='size-'])]:size-4", variant === "picture" && "items-end", className), ...props }));
13
17
  }
14
18
  function EmptyPicture({ size, src }) {
15
19
  const [loaded, setLoaded] = useState(false);
20
+ const [waiting, setWaiting] = useState(false);
16
21
  const arriveOnLoad = useCallback((img) => {
17
22
  if (!img)
18
23
  return;
@@ -20,17 +25,18 @@ function EmptyPicture({ size, src }) {
20
25
  setLoaded(true);
21
26
  return;
22
27
  }
28
+ setWaiting(true);
23
29
  const show = () => setLoaded(true);
24
30
  img.addEventListener("load", show, { once: true });
25
31
  return () => img.removeEventListener("load", show);
26
32
  }, []);
27
- return (_jsx(EmptyMedia, { className: size === "page" ? "h-44 w-60" : "h-36 w-50", variant: "picture", children: _jsx("img", { alt: "", className: "max-h-full max-w-full object-contain object-bottom select-none", "data-loaded": loaded ? "" : undefined, "data-size": size, "data-slot": "empty-picture", draggable: false, ref: arriveOnLoad, src: src }) }));
33
+ return (_jsx(EmptyMedia, { className: size === "page" ? "h-44 w-60" : "h-36 w-50", variant: "picture", children: _jsx("img", { alt: "", className: "max-h-full max-w-full object-contain object-bottom select-none", "data-loaded": loaded ? "" : undefined, "data-waiting": waiting ? "" : undefined, "data-size": size, "data-slot": "empty-picture", draggable: false, ref: arriveOnLoad, src: src }) }));
28
34
  }
29
35
  function EmptyTitle({ className, ...props }) {
30
- return (_jsx("div", { "data-slot": "empty-title", className: cn("text-heading-xs text-foreground", className), ...props }));
36
+ return (_jsx("div", { "data-slot": "empty-title", className: cn("text-body-md font-medium text-foreground", className), ...props }));
31
37
  }
32
38
  function EmptyDescription({ className, ...props }) {
33
- return (_jsx("div", { "data-slot": "empty-description", className: cn("max-w-[38ch] text-body-sm text-balance text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
39
+ return (_jsx("div", { "data-slot": "empty-description", className: cn("max-w-85 text-body-sm text-balance text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", className), ...props }));
34
40
  }
35
41
  function EmptyContent({ className, ...props }) {
36
42
  return (_jsx("div", { "data-slot": "empty-content", className: cn("flex min-w-0 flex-wrap items-center justify-center gap-2", className), ...props }));
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ import type { AccessibleName } from "../components/button.js";
3
+ import type { FieldSize } from "./input-box.js";
4
+ export type FieldAria = Pick<React.AriaAttributes, "aria-invalid" | "aria-describedby">;
5
+ /**
6
+ * Every field has a name. A visible `label` is tied to its control by `id`; where the name is
7
+ * drawn elsewhere on the screen (a toolbar's search, a cell of a table), `aria-label` or
8
+ * `aria-labelledby` carries it. A field with none of the three does not compile.
9
+ */
10
+ export type FieldName = {
11
+ label: string;
12
+ id: string;
13
+ "aria-label"?: undefined;
14
+ "aria-labelledby"?: undefined;
15
+ } | (AccessibleName & {
16
+ label?: undefined;
17
+ });
18
+ type FieldControl = Pick<React.ComponentProps<"input">, "id" | "aria-invalid" | "aria-describedby">;
19
+ /**
20
+ * The `label`, `description` and `error` props of a field: the `Field` parts drawn around the
21
+ * control, the description as one muted sentence under it. The control takes back the
22
+ * `aria-invalid` and `aria-describedby` that join it to the description and the error.
23
+ */
24
+ export declare function FieldFrame({ label, description, error, size, control, children, }: {
25
+ label: string | undefined;
26
+ description?: string | undefined;
27
+ error: string | undefined;
28
+ size?: FieldSize;
29
+ control: FieldControl;
30
+ children: (aria: FieldAria) => React.ReactNode;
31
+ }): string | number | bigint | boolean | React.JSX.Element | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | null | undefined;
32
+ export {};
33
+ //# sourceMappingURL=field-frame.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-frame.d.ts","sourceRoot":"","sources":["../../src/internal/field-frame.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAE1D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,EAAE,cAAc,GAAG,kBAAkB,CAAC,CAAC;AAExF;;;;GAIG;AACH,MAAM,MAAM,SAAS,GACjB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,YAAY,CAAC,EAAE,SAAS,CAAC;IAAC,iBAAiB,CAAC,EAAE,SAAS,CAAA;CAAE,GACtF,CAAC,cAAc,GAAG;IAAE,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC,CAAC;AAE7C,KAAK,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,IAAI,GAAG,cAAc,GAAG,kBAAkB,CAAC,CAAC;AAEpG;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,WAAW,EACX,KAAK,EACL,IAAgB,EAChB,OAAO,EACP,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,EAAE,YAAY,CAAC;IACtB,QAAQ,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,KAAK,CAAC,SAAS,CAAC;CAChD,mSAsBA"}
@@ -0,0 +1,20 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import * as React from "react";
3
+ import { Field, FieldDescription, FieldError, FieldLabel } from "../components/field.js";
4
+ /**
5
+ * The `label`, `description` and `error` props of a field: the `Field` parts drawn around the
6
+ * control, the description as one muted sentence under it. The control takes back the
7
+ * `aria-invalid` and `aria-describedby` that join it to the description and the error.
8
+ */
9
+ export function FieldFrame({ label, description, error, size = "default", control, children, }) {
10
+ const descriptionId = React.useId();
11
+ const errorId = React.useId();
12
+ const invalid = error ? true : control["aria-invalid"];
13
+ const describedBy = [control["aria-describedby"], description && descriptionId, error && errorId]
14
+ .filter(Boolean)
15
+ .join(" ") || undefined;
16
+ const field = children({ "aria-invalid": invalid, "aria-describedby": describedBy });
17
+ if (!label && !description && !error)
18
+ return field;
19
+ return (_jsxs(Field, { "data-invalid": error ? true : undefined, children: [label ? _jsx(FieldLabel, { htmlFor: control.id, children: label }) : null, field, description ? _jsx(FieldDescription, { id: descriptionId, children: description }) : null, error ? (_jsx(FieldError, { id: errorId, size: size === "lg" ? "lg" : "default", children: error })) : null] }));
20
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Where focus goes when a dialog or sheet closes: back to its opener after every close but a pointer
3
+ * one, so a keyboard user or a close from the caller's own state (a save, a pick, Finish) keeps their
4
+ * place, and nowhere after a pointer close, so the opener does not keep a ring that reads as selected
5
+ * (as Vercel's dialogs do). Base UI leaves the close type empty when the caller closes through `open`.
6
+ */
7
+ export declare function returnFocusUnlessPointer(closeType: string): boolean;
8
+ //# sourceMappingURL=final-focus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"final-focus.d.ts","sourceRoot":"","sources":["../../src/internal/final-focus.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAEnE"}
@@ -0,0 +1,10 @@
1
+ const POINTER_CLOSES = new Set(["mouse", "touch", "pen"]);
2
+ /**
3
+ * Where focus goes when a dialog or sheet closes: back to its opener after every close but a pointer
4
+ * one, so a keyboard user or a close from the caller's own state (a save, a pick, Finish) keeps their
5
+ * place, and nowhere after a pointer close, so the opener does not keep a ring that reads as selected
6
+ * (as Vercel's dialogs do). Base UI leaves the close type empty when the caller closes through `open`.
7
+ */
8
+ export function returnFocusUnlessPointer(closeType) {
9
+ return !POINTER_CLOSES.has(closeType);
10
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"footer-strip.d.ts","sourceRoot":"","sources":["../../src/internal/footer-strip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,iBAAS,WAAW,CAAC,EACnB,IAAI,EACJ,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,4BAeA;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
1
+ {"version":3,"file":"footer-strip.d.ts","sourceRoot":"","sources":["../../src/internal/footer-strip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,iBAAS,WAAW,CAAC,EACnB,IAAI,EACJ,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,4BA6BA;AAED,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -1,9 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { CardFooter } from "../components/card.js";
3
+ import { cn } from "../lib/utils.js";
3
4
  function FooterStrip({ hint, hintSlot, children, }) {
4
5
  if (!hint && !children) {
5
6
  return null;
6
7
  }
7
- return (_jsxs(CardFooter, { children: [hint && (_jsx("div", { "data-slot": hintSlot, className: "min-w-0 flex-1 text-muted-foreground", children: hint })), children && _jsx("div", { className: "ml-auto flex flex-wrap items-center gap-3", children: children })] }));
8
+ const stacksWhenNarrow = hintSlot === "settings-section-hint";
9
+ return (_jsxs(CardFooter, { children: [hint && (_jsx("div", { "data-slot": hintSlot, className: cn("min-w-0 flex-1", stacksWhenNarrow && "max-sm:basis-full"), children: hint })), children && (_jsx("div", { className: cn("ml-auto flex flex-wrap items-center gap-3", stacksWhenNarrow && "max-sm:ml-0 max-sm:w-full max-sm:*:flex-1"), children: children }))] }));
8
10
  }
9
11
  export { FooterStrip };
@@ -2,15 +2,19 @@ import type { ComponentProps, ReactNode } from "react";
2
2
  /** The save of a drawer's, a dialog's or a row's form. */
3
3
  export type FormSubmit = {
4
4
  label: string;
5
- /** The button's own word while the save runs. */
6
- pendingLabel?: string;
7
- /** The save is running: the button says so and holds, and the waiting line follows. */
8
- pending?: boolean;
9
5
  /** Nothing to save yet, or a field still needs an answer. */
10
6
  disabled?: boolean;
11
7
  /** The id of the line that says why the save cannot run yet. */
12
8
  describedBy?: string;
13
- };
9
+ } & ({
10
+ pending?: undefined;
11
+ pendingLabel?: string;
12
+ } | {
13
+ /** The save is running: the button says so and holds, and the waiting line follows. */
14
+ pending: boolean;
15
+ /** The button's own word while the save runs: the label's -ing form, *Saving*. */
16
+ pendingLabel: string;
17
+ });
14
18
  export type FormProps = Omit<ComponentProps<"form">, "children" | "className"> & {
15
19
  cancelLabel: string;
16
20
  submit: FormSubmit;
@@ -1 +1 @@
1
- {"version":3,"file":"form-submit.d.ts","sourceRoot":"","sources":["../../src/internal/form-submit.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvD,0DAA0D;AAC1D,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,iDAAiD;IACjD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uFAAuF;IACvF,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC,GAAG;IAC/E,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,iFAAiF;IACjF,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,+BAclE"}
1
+ {"version":3,"file":"form-submit.d.ts","sourceRoot":"","sources":["../../src/internal/form-submit.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvD,0DAA0D;AAC1D,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gEAAgE;IAChE,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,CACA;IAAE,OAAO,CAAC,EAAE,SAAS,CAAC;IAAC,YAAY,CAAC,EAAE,MAAM,CAAA;CAAE,GAC9C;IACE,uFAAuF;IACvF,OAAO,EAAE,OAAO,CAAC;IACjB,kFAAkF;IAClF,YAAY,EAAE,MAAM,CAAC;CACtB,CACJ,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,WAAW,CAAC,GAAG;IAC/E,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,iFAAiF;IACjF,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,QAAQ,EAAE,SAAS,CAAC;CACrB,CAAC;AAoCF,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,UAAU,CAAA;CAAE,+BAclE"}
@@ -1,8 +1,37 @@
1
1
  "use client";
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Button } from "../components/button.js";
4
- import { PendingLabel } from "../components/pending-label.js";
4
+ const TRIMMED_INPUT_TYPES = new Set(["text", "email", "url", "search", "tel"]);
5
+ function isTextField(field) {
6
+ return (field instanceof HTMLTextAreaElement ||
7
+ (field instanceof HTMLInputElement && TRIMMED_INPUT_TYPES.has(field.type)));
8
+ }
9
+ function replaceValue(field, value) {
10
+ const prototype = field instanceof HTMLTextAreaElement
11
+ ? HTMLTextAreaElement.prototype
12
+ : HTMLInputElement.prototype;
13
+ Object.getOwnPropertyDescriptor(prototype, "value")?.set?.call(field, value);
14
+ field.dispatchEvent(new Event("input", { bubbles: true }));
15
+ }
16
+ /**
17
+ * "Trim leading and trailing whitespace before submit so ` example.com` and `example.com` resolve
18
+ * to one value." (https://vercel.com/geist/input) "Trim leading and trailing whitespace on submit
19
+ * so empty newlines don’t pass a `required` check." (https://vercel.com/geist/textarea) Ours: a
20
+ * controlled field is told through its own `input` event; passwords and other types keep every
21
+ * character.
22
+ */
23
+ function trimTextFields(form) {
24
+ if (!form)
25
+ return;
26
+ for (const field of form.elements) {
27
+ if (!isTextField(field) || field.readOnly || field.disabled)
28
+ continue;
29
+ const trimmed = field.value.trim();
30
+ if (trimmed !== field.value)
31
+ replaceValue(field, trimmed);
32
+ }
33
+ }
5
34
  export function FormSubmitButton({ submit }) {
6
35
  const pending = submit.pending === true;
7
- return (_jsx(Button, { "aria-busy": pending || undefined, "aria-describedby": submit.describedBy, disabled: pending || submit.disabled, type: "submit", children: _jsx(PendingLabel, { pending: pending, pendingLabel: submit.pendingLabel ?? submit.label, children: submit.label }) }));
36
+ return (_jsx(Button, { "aria-describedby": submit.describedBy, disabled: submit.disabled, loading: pending, loadingLabel: submit.pendingLabel ?? submit.label, onClick: (event) => trimTextFields(event.currentTarget.form), type: "submit", children: submit.label }));
8
37
  }
@@ -0,0 +1,26 @@
1
+ import * as React from "react";
2
+ export type FieldSize = "sm" | "default" | "lg";
3
+ /**
4
+ * The edge of every field-shaped box: a 1px ring drawn outside the box with a shadow, so the box
5
+ * keeps its size, and a 4px halo that is clear until focus or an error fills it. The states below
6
+ * only move the two colours.
7
+ */
8
+ export declare const fieldRing = "[--field-edge:var(--color-border)] [--field-halo:transparent] shadow-[0_0_0_1px_var(--field-edge),0_0_0_4px_var(--field-halo)] transition-shadow";
9
+ /** The states of a box that is itself the control: an input, a textarea, a select, a trigger. */
10
+ export declare const fieldStates: string;
11
+ /** A trigger whose list is open keeps the hover edge. */
12
+ export declare const fieldOpen = "data-popup-open:not-aria-invalid:[--field-edge:color-mix(in_oklab,var(--color-ring)_70%,transparent)]";
13
+ /** A trigger that keeps the page's outline for keyboard focus, as a button does: no halo. */
14
+ export declare const fieldTriggerStates: string;
15
+ /** The same states for a box that holds the control, so the ring wraps its prefix and suffix. */
16
+ export declare const fieldGroupStates: string;
17
+ /** The same states for a box of chips, whose ring wraps the chips and the input among them. */
18
+ export declare const fieldWithinStates: string;
19
+ /** A disabled box steps down in fill and text, never in opacity. */
20
+ export declare const fieldDisabled = "disabled:cursor-not-allowed disabled:bg-accent disabled:text-placeholder";
21
+ export type InputBoxProps = Omit<React.ComponentProps<"input">, "size"> & {
22
+ size?: FieldSize;
23
+ };
24
+ /** The bare box of `Input` and `InputGroupControl`, so the group can wrap it without a cycle. */
25
+ export declare function InputBox({ className, size, type, ...props }: InputBoxProps): React.JSX.Element;
26
+ //# sourceMappingURL=input-box.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-box.d.ts","sourceRoot":"","sources":["../../src/internal/input-box.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAAC;AAEhD;;;;GAIG;AACH,eAAO,MAAM,SAAS,qJAC8H,CAAC;AAErJ,iGAAiG;AACjG,eAAO,MAAM,WAAW,QAIb,CAAC;AAEZ,yDAAyD;AACzD,eAAO,MAAM,SAAS,0GACmF,CAAC;AAE1G,6FAA6F;AAC7F,eAAO,MAAM,kBAAkB,QAIpB,CAAC;AAEZ,iGAAiG;AACjG,eAAO,MAAM,gBAAgB,QAKlB,CAAC;AAEZ,+FAA+F;AAC/F,eAAO,MAAM,iBAAiB,QAKnB,CAAC;AAEZ,oEAAoE;AACpE,eAAO,MAAM,aAAa,6EACkD,CAAC;AAqB7E,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,GAAG;IACxE,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB,CAAC;AAEF,iGAAiG;AACjG,wBAAgB,QAAQ,CAAC,EAAE,SAAS,EAAE,IAAgB,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,qBAWtF"}
@@ -0,0 +1,59 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Input as InputPrimitive } from "@base-ui/react/input";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "../lib/utils.js";
5
+ /**
6
+ * The edge of every field-shaped box: a 1px ring drawn outside the box with a shadow, so the box
7
+ * keeps its size, and a 4px halo that is clear until focus or an error fills it. The states below
8
+ * only move the two colours.
9
+ */
10
+ export const fieldRing = "[--field-edge:var(--color-border)] [--field-halo:transparent] shadow-[0_0_0_1px_var(--field-edge),0_0_0_4px_var(--field-halo)] transition-shadow";
11
+ /** The states of a box that is itself the control: an input, a textarea, a select, a trigger. */
12
+ export const fieldStates = [
13
+ "enabled:not-focus-visible:not-aria-invalid:hover:[--field-edge:color-mix(in_oklab,var(--color-ring)_70%,transparent)]",
14
+ "focus-visible:outline-none focus-visible:[--field-edge:var(--color-ring)] focus-visible:[--field-halo:color-mix(in_oklab,var(--color-ring)_16%,transparent)]",
15
+ "aria-invalid:outline-none aria-invalid:[--field-edge:var(--color-destructive)] aria-invalid:[--field-halo:var(--nc-rosso-300)] aria-invalid:enabled:not-focus-visible:hover:[--field-halo:var(--nc-rosso-500)]",
16
+ ].join(" ");
17
+ /** A trigger whose list is open keeps the hover edge. */
18
+ export const fieldOpen = "data-popup-open:not-aria-invalid:[--field-edge:color-mix(in_oklab,var(--color-ring)_70%,transparent)]";
19
+ /** A trigger that keeps the page's outline for keyboard focus, as a button does: no halo. */
20
+ export const fieldTriggerStates = [
21
+ "enabled:not-aria-invalid:hover:[--field-edge:color-mix(in_oklab,var(--color-ring)_70%,transparent)]",
22
+ fieldOpen,
23
+ "aria-invalid:outline-none aria-invalid:[--field-edge:var(--color-destructive)] aria-invalid:[--field-halo:var(--nc-rosso-300)] aria-invalid:enabled:hover:[--field-halo:var(--nc-rosso-500)]",
24
+ ].join(" ");
25
+ /** The same states for a box that holds the control, so the ring wraps its prefix and suffix. */
26
+ export const fieldGroupStates = [
27
+ "not-has-[[data-slot=input-group-control]:disabled]:not-has-[[data-slot=input-group-control]:focus-visible]:not-has-[[data-slot][aria-invalid=true]]:hover:[--field-edge:color-mix(in_oklab,var(--color-ring)_70%,transparent)]",
28
+ "has-[[data-slot=input-group-control]:focus-visible]:[--field-edge:var(--color-ring)] has-[[data-slot=input-group-control]:focus-visible]:[--field-halo:color-mix(in_oklab,var(--color-ring)_16%,transparent)]",
29
+ "has-[[data-slot][aria-invalid=true]]:[--field-edge:var(--color-destructive)] has-[[data-slot][aria-invalid=true]]:[--field-halo:var(--nc-rosso-300)]",
30
+ "has-[[data-slot][aria-invalid=true]]:not-has-[[data-slot=input-group-control]:disabled]:not-has-[[data-slot=input-group-control]:focus-visible]:hover:[--field-halo:var(--nc-rosso-500)]",
31
+ ].join(" ");
32
+ /** The same states for a box of chips, whose ring wraps the chips and the input among them. */
33
+ export const fieldWithinStates = [
34
+ "not-focus-within:not-has-aria-invalid:hover:[--field-edge:color-mix(in_oklab,var(--color-ring)_70%,transparent)]",
35
+ "focus-within:[--field-edge:var(--color-ring)] focus-within:[--field-halo:color-mix(in_oklab,var(--color-ring)_16%,transparent)]",
36
+ "has-aria-invalid:[--field-edge:var(--color-destructive)] has-aria-invalid:[--field-halo:var(--nc-rosso-300)]",
37
+ "has-aria-invalid:not-focus-within:hover:[--field-halo:var(--nc-rosso-500)]",
38
+ ].join(" ");
39
+ /** A disabled box steps down in fill and text, never in opacity. */
40
+ export const fieldDisabled = "disabled:cursor-not-allowed disabled:bg-accent disabled:text-placeholder";
41
+ const inputBoxVariants = cva([
42
+ "min-h-touch-target w-full min-w-0 bg-(--nc-field,var(--background)) px-control-padding-inline py-0 text-base file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-placeholder [@media(hover:hover)_and_(pointer:fine)]:min-h-0",
43
+ fieldRing,
44
+ fieldStates,
45
+ fieldDisabled,
46
+ ], {
47
+ variants: {
48
+ size: {
49
+ sm: "h-nadicode-control-height-sm rounded-sm md:text-sm",
50
+ default: "h-control-height rounded-sm md:text-sm",
51
+ lg: "h-nadicode-control-height-lg rounded-md",
52
+ },
53
+ },
54
+ defaultVariants: { size: "default" },
55
+ });
56
+ /** The bare box of `Input` and `InputGroupControl`, so the group can wrap it without a cycle. */
57
+ export function InputBox({ className, size = "default", type, ...props }) {
58
+ return (_jsx(InputPrimitive, { type: type, "data-slot": "input", "data-size": size, "data-field-frame": "", className: cn(inputBoxVariants({ size }), className), ...props }));
59
+ }
@@ -1,6 +1,13 @@
1
1
  /**
2
- * A dropdown and a context menu carry the same commands over the same dense rows, so both take this solid floating
3
- * surface; DESIGN.md ("Elevation & Depth") keeps glass for chrome over content that scrolls or moves under it.
2
+ * A dropdown and a context menu carry the same commands, so both take this floating glass surface (DESIGN.md
3
+ * "Elevation & Depth"): the content under an open menu stays in view, saturated, behind its rows.
4
4
  */
5
- export declare const menuSurface = "group/menu z-50 max-h-(--available-height) w-max min-w-[min(14rem,var(--available-width))] max-w-(--available-width) overflow-x-hidden overflow-y-auto rounded-lg border-0 bg-popover p-nadicode-xxs text-popover-foreground nc-elevation-floating outline-none data-closed:overflow-hidden";
5
+ export declare const menuSurface = "group/menu z-50 max-h-(--available-height) w-max min-w-[min(12.5rem,var(--available-width))] max-w-(--available-width) overflow-x-hidden overflow-y-auto rounded-lg border-0 nc-glass p-1.5 text-popover-foreground nc-elevation-floating outline-none data-closed:overflow-hidden";
6
+ /**
7
+ * Every row of a menu, whatever it holds, so the parts of one menu never differ in height. A row that can be
8
+ * chosen shows the pointer cursor; one that cannot turns its text muted, never dimmed, keeps the default cursor
9
+ * and takes no highlight from the keyboard. The highlight is the row's fill alone: no text inside the row changes
10
+ * colour with it.
11
+ */
12
+ export declare const menuRow = "relative flex min-h-touch-target cursor-pointer items-center gap-1.5 rounded-sm px-1.5 py-1 group-data-[density=comfortable]/menu:gap-2 group-data-[density=comfortable]/menu:px-2 group-data-[density=comfortable]/menu:py-2 text-sm outline-hidden select-none focus:bg-accent data-inset:pl-7 data-disabled:pointer-events-none data-disabled:cursor-default data-disabled:text-muted-foreground data-disabled:focus:bg-transparent [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
6
13
  //# sourceMappingURL=menu-surface.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-surface.d.ts","sourceRoot":"","sources":["../../src/internal/menu-surface.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW,gSACuQ,CAAC"}
1
+ {"version":3,"file":"menu-surface.d.ts","sourceRoot":"","sources":["../../src/internal/menu-surface.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,WAAW,uRAC8P,CAAC;AAEvR;;;;;GAKG;AACH,eAAO,MAAM,OAAO,8iBACyhB,CAAC"}