@nadicodeai/ui 12.1.96 → 12.1.98

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 (566) hide show
  1. package/AGENTS.md +5 -1
  2. package/dist/components/accordion.d.ts +13 -0
  3. package/dist/components/accordion.d.ts.map +1 -1
  4. package/dist/components/accordion.js +13 -0
  5. package/dist/components/account-menu.d.ts +62 -18
  6. package/dist/components/account-menu.d.ts.map +1 -1
  7. package/dist/components/account-menu.js +32 -8
  8. package/dist/components/action-menu.d.ts +61 -5
  9. package/dist/components/action-menu.d.ts.map +1 -1
  10. package/dist/components/action-menu.js +31 -2
  11. package/dist/components/action-status.d.ts +13 -3
  12. package/dist/components/action-status.d.ts.map +1 -1
  13. package/dist/components/action-status.js +13 -3
  14. package/dist/components/activity-calendar.d.ts +14 -0
  15. package/dist/components/activity-calendar.d.ts.map +1 -1
  16. package/dist/components/activity-calendar.js +14 -0
  17. package/dist/components/activity-feed.d.ts +62 -0
  18. package/dist/components/activity-feed.d.ts.map +1 -0
  19. package/dist/components/activity-feed.js +54 -0
  20. package/dist/components/agent-card.d.ts +15 -0
  21. package/dist/components/agent-card.d.ts.map +1 -1
  22. package/dist/components/agent-card.js +15 -0
  23. package/dist/components/agent-list-row.d.ts +11 -7
  24. package/dist/components/agent-list-row.d.ts.map +1 -1
  25. package/dist/components/agent-list-row.js +10 -8
  26. package/dist/components/agent-orb.d.ts +16 -0
  27. package/dist/components/agent-orb.d.ts.map +1 -1
  28. package/dist/components/agent-orb.js +16 -0
  29. package/dist/components/agent-profile.d.ts +39 -10
  30. package/dist/components/agent-profile.d.ts.map +1 -1
  31. package/dist/components/agent-profile.js +39 -10
  32. package/dist/components/alert-dialog.d.ts +14 -0
  33. package/dist/components/alert-dialog.d.ts.map +1 -1
  34. package/dist/components/alert-dialog.js +16 -2
  35. package/dist/components/alert.d.ts +14 -0
  36. package/dist/components/alert.d.ts.map +1 -1
  37. package/dist/components/alert.js +14 -0
  38. package/dist/components/app-mark.d.ts +14 -4
  39. package/dist/components/app-mark.d.ts.map +1 -1
  40. package/dist/components/app-mark.js +13 -3
  41. package/dist/components/approval-row.d.ts +15 -2
  42. package/dist/components/approval-row.d.ts.map +1 -1
  43. package/dist/components/approval-row.js +15 -2
  44. package/dist/components/aspect-ratio.d.ts +10 -0
  45. package/dist/components/aspect-ratio.d.ts.map +1 -1
  46. package/dist/components/aspect-ratio.js +10 -0
  47. package/dist/components/avatar.d.ts +15 -0
  48. package/dist/components/avatar.d.ts.map +1 -1
  49. package/dist/components/avatar.js +15 -0
  50. package/dist/components/badge.d.ts +11 -1
  51. package/dist/components/badge.d.ts.map +1 -1
  52. package/dist/components/badge.js +10 -5
  53. package/dist/components/brand-field.d.ts +10 -0
  54. package/dist/components/brand-field.d.ts.map +1 -1
  55. package/dist/components/brand-field.js +10 -0
  56. package/dist/components/brand.d.ts +14 -0
  57. package/dist/components/brand.d.ts.map +1 -1
  58. package/dist/components/brand.js +14 -0
  59. package/dist/components/breadcrumb.d.ts +20 -2
  60. package/dist/components/breadcrumb.d.ts.map +1 -1
  61. package/dist/components/breadcrumb.js +13 -3
  62. package/dist/components/button-group.d.ts +21 -0
  63. package/dist/components/button-group.d.ts.map +1 -1
  64. package/dist/components/button-group.js +21 -0
  65. package/dist/components/button.d.ts +20 -0
  66. package/dist/components/button.d.ts.map +1 -1
  67. package/dist/components/button.js +20 -0
  68. package/dist/components/calendar.d.ts +15 -0
  69. package/dist/components/calendar.d.ts.map +1 -1
  70. package/dist/components/calendar.js +15 -0
  71. package/dist/components/card-row.d.ts +15 -5
  72. package/dist/components/card-row.d.ts.map +1 -1
  73. package/dist/components/card-row.js +15 -5
  74. package/dist/components/card.d.ts +16 -0
  75. package/dist/components/card.d.ts.map +1 -1
  76. package/dist/components/card.js +16 -0
  77. package/dist/components/carousel.d.ts +12 -0
  78. package/dist/components/carousel.d.ts.map +1 -1
  79. package/dist/components/carousel.js +12 -0
  80. package/dist/components/catalog-drawer.d.ts +29 -0
  81. package/dist/components/catalog-drawer.d.ts.map +1 -0
  82. package/dist/components/catalog-drawer.js +31 -0
  83. package/dist/components/catalog-entry.d.ts +49 -26
  84. package/dist/components/catalog-entry.d.ts.map +1 -1
  85. package/dist/components/catalog-entry.js +5 -27
  86. package/dist/components/channel-view.d.ts +23 -0
  87. package/dist/components/channel-view.d.ts.map +1 -1
  88. package/dist/components/channel-view.js +13 -4
  89. package/dist/components/chart-area-stacked.d.ts +11 -1
  90. package/dist/components/chart-area-stacked.d.ts.map +1 -1
  91. package/dist/components/chart-area-stacked.js +12 -2
  92. package/dist/components/chart-bar-horizontal.d.ts +11 -1
  93. package/dist/components/chart-bar-horizontal.d.ts.map +1 -1
  94. package/dist/components/chart-bar-horizontal.js +12 -2
  95. package/dist/components/chart-bar-multiple.d.ts +9 -4
  96. package/dist/components/chart-bar-multiple.d.ts.map +1 -1
  97. package/dist/components/chart-bar-multiple.js +10 -5
  98. package/dist/components/chart-bar-stacked.d.ts +11 -1
  99. package/dist/components/chart-bar-stacked.d.ts.map +1 -1
  100. package/dist/components/chart-bar-stacked.js +12 -2
  101. package/dist/components/chart-card.d.ts +33 -20
  102. package/dist/components/chart-card.d.ts.map +1 -1
  103. package/dist/components/chart-card.js +18 -4
  104. package/dist/components/chart-date-range-control.d.ts +15 -10
  105. package/dist/components/chart-date-range-control.d.ts.map +1 -1
  106. package/dist/components/chart-date-range-control.js +14 -10
  107. package/dist/components/chart-date-range.d.ts.map +1 -1
  108. package/dist/components/chart-entity-colors.d.ts +7 -0
  109. package/dist/components/chart-entity-colors.d.ts.map +1 -1
  110. package/dist/components/chart-entity-colors.js +7 -0
  111. package/dist/components/chart-sparkline.d.ts +10 -0
  112. package/dist/components/chart-sparkline.d.ts.map +1 -1
  113. package/dist/components/chart-sparkline.js +8 -7
  114. package/dist/components/chart.d.ts +10 -0
  115. package/dist/components/chart.d.ts.map +1 -1
  116. package/dist/components/chart.js +10 -0
  117. package/dist/components/checkbox.d.ts +15 -0
  118. package/dist/components/checkbox.d.ts.map +1 -1
  119. package/dist/components/checkbox.js +15 -0
  120. package/dist/components/code-block.d.ts +15 -0
  121. package/dist/components/code-block.d.ts.map +1 -1
  122. package/dist/components/code-block.js +15 -0
  123. package/dist/components/collapsible.d.ts +12 -0
  124. package/dist/components/collapsible.d.ts.map +1 -1
  125. package/dist/components/collapsible.js +12 -0
  126. package/dist/components/collection-filters.d.ts +15 -2
  127. package/dist/components/collection-filters.d.ts.map +1 -1
  128. package/dist/components/collection-filters.js +13 -1
  129. package/dist/components/collection-page.d.ts +29 -115
  130. package/dist/components/collection-page.d.ts.map +1 -1
  131. package/dist/components/collection-page.js +24 -140
  132. package/dist/components/collection-search.d.ts +14 -0
  133. package/dist/components/collection-search.d.ts.map +1 -1
  134. package/dist/components/collection-search.js +14 -0
  135. package/dist/components/collection-sort.d.ts +13 -3
  136. package/dist/components/collection-sort.d.ts.map +1 -1
  137. package/dist/components/collection-sort.js +13 -3
  138. package/dist/components/collection-toolbar.d.ts +13 -0
  139. package/dist/components/collection-toolbar.d.ts.map +1 -1
  140. package/dist/components/collection-toolbar.js +13 -0
  141. package/dist/components/combobox.d.ts +17 -0
  142. package/dist/components/combobox.d.ts.map +1 -1
  143. package/dist/components/combobox.js +18 -1
  144. package/dist/components/command.d.ts +16 -0
  145. package/dist/components/command.d.ts.map +1 -1
  146. package/dist/components/command.js +16 -0
  147. package/dist/components/company-card.d.ts +16 -4
  148. package/dist/components/company-card.d.ts.map +1 -1
  149. package/dist/components/company-card.js +16 -4
  150. package/dist/components/confirm-dialog.d.ts +24 -14
  151. package/dist/components/confirm-dialog.d.ts.map +1 -1
  152. package/dist/components/confirm-dialog.js +16 -10
  153. package/dist/components/context-menu.d.ts +10 -0
  154. package/dist/components/context-menu.d.ts.map +1 -1
  155. package/dist/components/context-menu.js +11 -1
  156. package/dist/components/copy-button.d.ts +10 -0
  157. package/dist/components/copy-button.d.ts.map +1 -1
  158. package/dist/components/copy-button.js +10 -0
  159. package/dist/components/dashboard-shell.d.ts +14 -0
  160. package/dist/components/dashboard-shell.d.ts.map +1 -1
  161. package/dist/components/dashboard-shell.js +14 -0
  162. package/dist/components/data-table.d.ts +20 -0
  163. package/dist/components/data-table.d.ts.map +1 -1
  164. package/dist/components/data-table.js +23 -2
  165. package/dist/components/desktop-shell.d.ts +15 -0
  166. package/dist/components/desktop-shell.d.ts.map +1 -1
  167. package/dist/components/desktop-shell.js +15 -0
  168. package/dist/components/dialog.d.ts +16 -0
  169. package/dist/components/dialog.d.ts.map +1 -1
  170. package/dist/components/dialog.js +18 -2
  171. package/dist/components/diff-count.d.ts +11 -0
  172. package/dist/components/diff-count.d.ts.map +1 -1
  173. package/dist/components/diff-count.js +11 -0
  174. package/dist/components/disclosure-row.d.ts +12 -0
  175. package/dist/components/disclosure-row.d.ts.map +1 -1
  176. package/dist/components/disclosure-row.js +12 -0
  177. package/dist/components/disclosure.d.ts +15 -5
  178. package/dist/components/disclosure.d.ts.map +1 -1
  179. package/dist/components/disclosure.js +15 -5
  180. package/dist/components/drawer.d.ts +13 -0
  181. package/dist/components/drawer.d.ts.map +1 -1
  182. package/dist/components/drawer.js +13 -0
  183. package/dist/components/dropdown-menu.d.ts +17 -5
  184. package/dist/components/dropdown-menu.d.ts.map +1 -1
  185. package/dist/components/dropdown-menu.js +21 -8
  186. package/dist/components/empty-art.d.ts +1 -1
  187. package/dist/components/empty-art.d.ts.map +1 -1
  188. package/dist/components/empty-art.js +6 -0
  189. package/dist/components/empty-state.d.ts +24 -10
  190. package/dist/components/empty-state.d.ts.map +1 -1
  191. package/dist/components/empty-state.js +23 -1
  192. package/dist/components/entry-scene.d.ts +33 -20
  193. package/dist/components/entry-scene.d.ts.map +1 -1
  194. package/dist/components/entry-scene.js +34 -7
  195. package/dist/components/expandable-block.d.ts +10 -0
  196. package/dist/components/expandable-block.d.ts.map +1 -1
  197. package/dist/components/expandable-block.js +10 -0
  198. package/dist/components/field.d.ts +17 -0
  199. package/dist/components/field.d.ts.map +1 -1
  200. package/dist/components/field.js +17 -0
  201. package/dist/components/file-diff.d.ts +12 -0
  202. package/dist/components/file-diff.d.ts.map +1 -1
  203. package/dist/components/file-diff.js +12 -0
  204. package/dist/components/file-type-icon.d.ts +12 -0
  205. package/dist/components/file-type-icon.d.ts.map +1 -1
  206. package/dist/components/file-type-icon.js +12 -0
  207. package/dist/components/footer.d.ts +14 -0
  208. package/dist/components/footer.d.ts.map +1 -1
  209. package/dist/components/footer.js +14 -0
  210. package/dist/components/form-dialog.d.ts +10 -0
  211. package/dist/components/form-dialog.d.ts.map +1 -1
  212. package/dist/components/form-dialog.js +10 -0
  213. package/dist/components/form-drawer.d.ts +24 -11
  214. package/dist/components/form-drawer.d.ts.map +1 -1
  215. package/dist/components/form-drawer.js +13 -3
  216. package/dist/components/form.d.ts +17 -0
  217. package/dist/components/form.d.ts.map +1 -1
  218. package/dist/components/form.js +17 -0
  219. package/dist/components/glass-control.d.ts +13 -0
  220. package/dist/components/glass-control.d.ts.map +1 -1
  221. package/dist/components/glass-control.js +13 -0
  222. package/dist/components/hive-scene.d.ts +14 -0
  223. package/dist/components/hive-scene.d.ts.map +1 -1
  224. package/dist/components/hive-scene.js +14 -0
  225. package/dist/components/house-icons.d.ts +15 -0
  226. package/dist/components/house-icons.d.ts.map +1 -1
  227. package/dist/components/house-icons.js +15 -0
  228. package/dist/components/hover-card.d.ts +15 -0
  229. package/dist/components/hover-card.d.ts.map +1 -1
  230. package/dist/components/hover-card.js +16 -1
  231. package/dist/components/identity-mark.d.ts +55 -0
  232. package/dist/components/identity-mark.d.ts.map +1 -0
  233. package/dist/components/identity-mark.js +66 -0
  234. package/dist/components/input-group.d.ts +16 -0
  235. package/dist/components/input-group.d.ts.map +1 -1
  236. package/dist/components/input-group.js +16 -0
  237. package/dist/components/input-otp.d.ts +15 -0
  238. package/dist/components/input-otp.d.ts.map +1 -1
  239. package/dist/components/input-otp.js +15 -0
  240. package/dist/components/input.d.ts +15 -0
  241. package/dist/components/input.d.ts.map +1 -1
  242. package/dist/components/input.js +15 -0
  243. package/dist/components/item.d.ts +16 -0
  244. package/dist/components/item.d.ts.map +1 -1
  245. package/dist/components/item.js +16 -0
  246. package/dist/components/kbd.d.ts +14 -0
  247. package/dist/components/kbd.d.ts.map +1 -1
  248. package/dist/components/kbd.js +14 -0
  249. package/dist/components/kpi-card.d.ts +21 -13
  250. package/dist/components/kpi-card.d.ts.map +1 -1
  251. package/dist/components/kpi-card.js +14 -3
  252. package/dist/components/label-system.d.ts +12 -0
  253. package/dist/components/label-system.d.ts.map +1 -1
  254. package/dist/components/label-system.js +12 -0
  255. package/dist/components/label.d.ts +15 -0
  256. package/dist/components/label.d.ts.map +1 -1
  257. package/dist/components/label.js +15 -0
  258. package/dist/components/library-shelf.d.ts +35 -0
  259. package/dist/components/library-shelf.d.ts.map +1 -0
  260. package/dist/components/library-shelf.js +40 -0
  261. package/dist/components/memory-item.d.ts +12 -0
  262. package/dist/components/memory-item.d.ts.map +1 -1
  263. package/dist/components/memory-item.js +12 -0
  264. package/dist/components/menu-choice-row.d.ts +13 -5
  265. package/dist/components/menu-choice-row.d.ts.map +1 -1
  266. package/dist/components/menu-choice-row.js +12 -6
  267. package/dist/components/menubar.d.ts +13 -0
  268. package/dist/components/menubar.d.ts.map +1 -1
  269. package/dist/components/menubar.js +13 -0
  270. package/dist/components/message-notice.d.ts +16 -0
  271. package/dist/components/message-notice.d.ts.map +1 -1
  272. package/dist/components/message-notice.js +18 -2
  273. package/dist/components/model-identity.d.ts +16 -3
  274. package/dist/components/model-identity.d.ts.map +1 -1
  275. package/dist/components/model-identity.js +16 -3
  276. package/dist/components/model-mark.d.ts +15 -2
  277. package/dist/components/model-mark.d.ts.map +1 -1
  278. package/dist/components/model-mark.js +15 -2
  279. package/dist/components/nadia-presence.d.ts +10 -4
  280. package/dist/components/nadia-presence.d.ts.map +1 -1
  281. package/dist/components/nadia-presence.js +10 -4
  282. package/dist/components/native-select.d.ts +16 -0
  283. package/dist/components/native-select.d.ts.map +1 -1
  284. package/dist/components/native-select.js +16 -0
  285. package/dist/components/navigation-menu.d.ts +14 -0
  286. package/dist/components/navigation-menu.d.ts.map +1 -1
  287. package/dist/components/navigation-menu.js +14 -0
  288. package/dist/components/notice-banner.d.ts +10 -3
  289. package/dist/components/notice-banner.d.ts.map +1 -1
  290. package/dist/components/notice-banner.js +9 -3
  291. package/dist/components/numbered-steps.d.ts +33 -0
  292. package/dist/components/numbered-steps.d.ts.map +1 -0
  293. package/dist/components/numbered-steps.js +23 -0
  294. package/dist/components/object-page.d.ts +37 -0
  295. package/dist/components/object-page.d.ts.map +1 -0
  296. package/dist/components/object-page.js +19 -0
  297. package/dist/components/object-workspace.d.ts +26 -36
  298. package/dist/components/object-workspace.d.ts.map +1 -1
  299. package/dist/components/object-workspace.js +27 -24
  300. package/dist/components/overview-page.d.ts +24 -0
  301. package/dist/components/overview-page.d.ts.map +1 -0
  302. package/dist/components/overview-page.js +26 -0
  303. package/dist/components/page-actions.d.ts +28 -23
  304. package/dist/components/page-actions.d.ts.map +1 -1
  305. package/dist/components/page-actions.js +20 -14
  306. package/dist/components/page-header.d.ts +11 -5
  307. package/dist/components/page-header.d.ts.map +1 -1
  308. package/dist/components/page-header.js +11 -5
  309. package/dist/components/pagination.d.ts +15 -0
  310. package/dist/components/pagination.d.ts.map +1 -1
  311. package/dist/components/pagination.js +15 -0
  312. package/dist/components/pairing-code.d.ts +15 -4
  313. package/dist/components/pairing-code.d.ts.map +1 -1
  314. package/dist/components/pairing-code.js +15 -4
  315. package/dist/components/pending-label.d.ts +12 -4
  316. package/dist/components/pending-label.d.ts.map +1 -1
  317. package/dist/components/pending-label.js +12 -4
  318. package/dist/components/picture-label.d.ts +15 -7
  319. package/dist/components/picture-label.d.ts.map +1 -1
  320. package/dist/components/picture-label.js +15 -7
  321. package/dist/components/platform-mark.d.ts +12 -3
  322. package/dist/components/platform-mark.d.ts.map +1 -1
  323. package/dist/components/platform-mark.js +12 -3
  324. package/dist/components/plugin-slot-boundary.d.ts +15 -0
  325. package/dist/components/plugin-slot-boundary.d.ts.map +1 -1
  326. package/dist/components/plugin-slot-boundary.js +15 -0
  327. package/dist/components/popover.d.ts +15 -0
  328. package/dist/components/popover.d.ts.map +1 -1
  329. package/dist/components/popover.js +16 -1
  330. package/dist/components/portal-sidebar-frame.d.ts +26 -12
  331. package/dist/components/portal-sidebar-frame.d.ts.map +1 -1
  332. package/dist/components/portal-sidebar-frame.js +26 -0
  333. package/dist/components/progress.d.ts +10 -8
  334. package/dist/components/progress.d.ts.map +1 -1
  335. package/dist/components/progress.js +11 -9
  336. package/dist/components/qr-code.d.ts +9 -3
  337. package/dist/components/qr-code.d.ts.map +1 -1
  338. package/dist/components/qr-code.js +9 -3
  339. package/dist/components/radio-group.d.ts +15 -0
  340. package/dist/components/radio-group.d.ts.map +1 -1
  341. package/dist/components/radio-group.js +15 -0
  342. package/dist/components/reading-column.d.ts +11 -0
  343. package/dist/components/reading-column.d.ts.map +1 -1
  344. package/dist/components/reading-column.js +11 -0
  345. package/dist/components/record-identity.d.ts +12 -7
  346. package/dist/components/record-identity.d.ts.map +1 -1
  347. package/dist/components/record-identity.js +11 -7
  348. package/dist/components/record-list.d.ts +119 -0
  349. package/dist/components/record-list.d.ts.map +1 -0
  350. package/dist/components/record-list.js +161 -0
  351. package/dist/components/record-sheet.d.ts +36 -0
  352. package/dist/components/record-sheet.d.ts.map +1 -0
  353. package/dist/components/record-sheet.js +19 -0
  354. package/dist/components/record-time.d.ts +27 -11
  355. package/dist/components/record-time.d.ts.map +1 -1
  356. package/dist/components/record-time.js +34 -12
  357. package/dist/components/resizable.d.ts +10 -0
  358. package/dist/components/resizable.d.ts.map +1 -1
  359. package/dist/components/resizable.js +10 -0
  360. package/dist/components/row-edit-form.d.ts +8 -5
  361. package/dist/components/row-edit-form.d.ts.map +1 -1
  362. package/dist/components/row-edit-form.js +8 -5
  363. package/dist/components/run-timeline.d.ts +24 -11
  364. package/dist/components/run-timeline.d.ts.map +1 -1
  365. package/dist/components/run-timeline.js +13 -6
  366. package/dist/components/scope-switcher.d.ts +11 -0
  367. package/dist/components/scope-switcher.d.ts.map +1 -1
  368. package/dist/components/scope-switcher.js +20 -9
  369. package/dist/components/scroll-area.d.ts +12 -0
  370. package/dist/components/scroll-area.d.ts.map +1 -1
  371. package/dist/components/scroll-area.js +12 -0
  372. package/dist/components/select.d.ts +16 -0
  373. package/dist/components/select.d.ts.map +1 -1
  374. package/dist/components/select.js +17 -1
  375. package/dist/components/separator.d.ts +11 -0
  376. package/dist/components/separator.d.ts.map +1 -1
  377. package/dist/components/separator.js +11 -0
  378. package/dist/components/settings-facts.d.ts +18 -1
  379. package/dist/components/settings-facts.d.ts.map +1 -1
  380. package/dist/components/settings-facts.js +20 -1
  381. package/dist/components/settings-page.d.ts +20 -0
  382. package/dist/components/settings-page.d.ts.map +1 -0
  383. package/dist/components/settings-page.js +16 -0
  384. package/dist/components/settings-section.d.ts +38 -8
  385. package/dist/components/settings-section.d.ts.map +1 -1
  386. package/dist/components/settings-section.js +33 -7
  387. package/dist/components/sheet.d.ts +16 -0
  388. package/dist/components/sheet.d.ts.map +1 -1
  389. package/dist/components/sheet.js +18 -2
  390. package/dist/components/sidebar-sections.d.ts +40 -0
  391. package/dist/components/sidebar-sections.d.ts.map +1 -0
  392. package/dist/components/sidebar-sections.js +35 -0
  393. package/dist/components/sidebar.d.ts +14 -1
  394. package/dist/components/sidebar.d.ts.map +1 -1
  395. package/dist/components/sidebar.js +13 -2
  396. package/dist/components/skeleton.d.ts +10 -0
  397. package/dist/components/skeleton.d.ts.map +1 -1
  398. package/dist/components/skeleton.js +11 -1
  399. package/dist/components/slider.d.ts +14 -0
  400. package/dist/components/slider.d.ts.map +1 -1
  401. package/dist/components/slider.js +14 -0
  402. package/dist/components/sonner.d.ts +18 -0
  403. package/dist/components/sonner.d.ts.map +1 -1
  404. package/dist/components/sonner.js +18 -0
  405. package/dist/components/status-badge.d.ts +13 -2
  406. package/dist/components/status-badge.d.ts.map +1 -1
  407. package/dist/components/status-badge.js +21 -9
  408. package/dist/components/status-dot.d.ts +12 -0
  409. package/dist/components/status-dot.d.ts.map +1 -1
  410. package/dist/components/status-dot.js +12 -0
  411. package/dist/components/status-row.d.ts +14 -0
  412. package/dist/components/status-row.d.ts.map +1 -1
  413. package/dist/components/status-row.js +14 -0
  414. package/dist/components/switch.d.ts +15 -0
  415. package/dist/components/switch.d.ts.map +1 -1
  416. package/dist/components/switch.js +15 -0
  417. package/dist/components/table-card.d.ts +16 -3
  418. package/dist/components/table-card.d.ts.map +1 -1
  419. package/dist/components/table-card.js +16 -3
  420. package/dist/components/table-value.d.ts +24 -2
  421. package/dist/components/table-value.d.ts.map +1 -1
  422. package/dist/components/table-value.js +25 -3
  423. package/dist/components/table.d.ts +16 -0
  424. package/dist/components/table.d.ts.map +1 -1
  425. package/dist/components/table.js +17 -1
  426. package/dist/components/tabs.d.ts +27 -0
  427. package/dist/components/tabs.d.ts.map +1 -1
  428. package/dist/components/tabs.js +27 -0
  429. package/dist/components/tag.d.ts +12 -2
  430. package/dist/components/tag.d.ts.map +1 -1
  431. package/dist/components/tag.js +12 -2
  432. package/dist/components/text-link.d.ts +17 -0
  433. package/dist/components/text-link.d.ts.map +1 -1
  434. package/dist/components/text-link.js +17 -0
  435. package/dist/components/textarea.d.ts +14 -0
  436. package/dist/components/textarea.d.ts.map +1 -1
  437. package/dist/components/textarea.js +14 -0
  438. package/dist/components/theme-mode-switcher.d.ts +21 -0
  439. package/dist/components/theme-mode-switcher.d.ts.map +1 -1
  440. package/dist/components/theme-mode-switcher.js +23 -1
  441. package/dist/components/toggle-group.d.ts +13 -0
  442. package/dist/components/toggle-group.d.ts.map +1 -1
  443. package/dist/components/toggle-group.js +13 -0
  444. package/dist/components/toggle.d.ts +14 -0
  445. package/dist/components/toggle.d.ts.map +1 -1
  446. package/dist/components/toggle.js +14 -0
  447. package/dist/components/tool-icon.d.ts +14 -4
  448. package/dist/components/tool-icon.d.ts.map +1 -1
  449. package/dist/components/tool-icon.js +27 -42
  450. package/dist/components/tooltip.d.ts +15 -0
  451. package/dist/components/tooltip.d.ts.map +1 -1
  452. package/dist/components/tooltip.js +15 -0
  453. package/dist/components/trend-badge.d.ts +16 -1
  454. package/dist/components/trend-badge.d.ts.map +1 -1
  455. package/dist/components/trend-badge.js +16 -7
  456. package/dist/components/update-card.d.ts +36 -0
  457. package/dist/components/update-card.d.ts.map +1 -0
  458. package/dist/components/update-card.js +28 -0
  459. package/dist/components/usage-meter.d.ts +15 -0
  460. package/dist/components/usage-meter.d.ts.map +1 -1
  461. package/dist/components/usage-meter.js +15 -0
  462. package/dist/components/waiting-line.d.ts +13 -10
  463. package/dist/components/waiting-line.d.ts.map +1 -1
  464. package/dist/components/waiting-line.js +13 -10
  465. package/dist/eslint/index.js +8 -0
  466. package/dist/eslint/rules/empty-state-owner.js +145 -0
  467. package/dist/eslint/rules/menu-owner.js +75 -0
  468. package/dist/eslint/rules/no-decorative-icon.js +164 -0
  469. package/dist/eslint/rules/page-composition.js +232 -0
  470. package/dist/eslint/rules/rendered-import.js +121 -0
  471. package/dist/eslint/strict-design-system.js +1 -1
  472. package/dist/hooks/use-hydrated.d.ts +2 -0
  473. package/dist/hooks/use-hydrated.d.ts.map +1 -0
  474. package/dist/hooks/use-hydrated.js +7 -0
  475. package/dist/index.d.ts +15 -10
  476. package/dist/index.d.ts.map +1 -1
  477. package/dist/index.js +15 -10
  478. package/dist/internal/catalog-list.d.ts +14 -0
  479. package/dist/internal/catalog-list.d.ts.map +1 -0
  480. package/dist/internal/catalog-list.js +53 -0
  481. package/dist/internal/empty.d.ts +6 -9
  482. package/dist/internal/empty.d.ts.map +1 -1
  483. package/dist/internal/empty.js +24 -22
  484. package/dist/internal/footer-strip.d.ts +0 -4
  485. package/dist/internal/footer-strip.d.ts.map +1 -1
  486. package/dist/internal/footer-strip.js +0 -4
  487. package/dist/internal/record-menu-items.d.ts +19 -0
  488. package/dist/internal/record-menu-items.d.ts.map +1 -0
  489. package/dist/internal/record-menu-items.js +20 -0
  490. package/dist/internal/settings-save.d.ts +43 -0
  491. package/dist/internal/settings-save.d.ts.map +1 -0
  492. package/dist/internal/settings-save.js +147 -0
  493. package/dist/lib/theme-mode.d.ts +1 -1
  494. package/dist/lib/theme-mode.js +1 -1
  495. package/dist/showcase/assets.d.ts +8 -0
  496. package/dist/showcase/assets.d.ts.map +1 -0
  497. package/dist/showcase/assets.js +13 -0
  498. package/dist/showcase/foundations.d.ts +2 -0
  499. package/dist/showcase/foundations.d.ts.map +1 -0
  500. package/dist/showcase/foundations.js +61 -0
  501. package/dist/showcase/samples.d.ts +21 -0
  502. package/dist/showcase/samples.d.ts.map +1 -0
  503. package/dist/showcase/samples.js +48 -0
  504. package/dist/showcase/showcase.d.ts +10 -0
  505. package/dist/showcase/showcase.d.ts.map +1 -0
  506. package/dist/showcase/showcase.js +44 -0
  507. package/dist/showcase/specimens/actions.d.ts +7 -0
  508. package/dist/showcase/specimens/actions.d.ts.map +1 -0
  509. package/dist/showcase/specimens/actions.js +15 -0
  510. package/dist/showcase/specimens/charts.d.ts +17 -0
  511. package/dist/showcase/specimens/charts.d.ts.map +1 -0
  512. package/dist/showcase/specimens/charts.js +104 -0
  513. package/dist/showcase/specimens/choices.d.ts +21 -0
  514. package/dist/showcase/specimens/choices.d.ts.map +1 -0
  515. package/dist/showcase/specimens/choices.js +68 -0
  516. package/dist/showcase/specimens/compositions.d.ts +39 -0
  517. package/dist/showcase/specimens/compositions.d.ts.map +1 -0
  518. package/dist/showcase/specimens/compositions.js +270 -0
  519. package/dist/showcase/specimens/data.d.ts +31 -0
  520. package/dist/showcase/specimens/data.d.ts.map +1 -0
  521. package/dist/showcase/specimens/data.js +111 -0
  522. package/dist/showcase/specimens/feedback.d.ts +23 -0
  523. package/dist/showcase/specimens/feedback.d.ts.map +1 -0
  524. package/dist/showcase/specimens/feedback.js +64 -0
  525. package/dist/showcase/specimens/index.d.ts +164 -0
  526. package/dist/showcase/specimens/index.d.ts.map +1 -0
  527. package/dist/showcase/specimens/index.js +24 -0
  528. package/dist/showcase/specimens/inputs.d.ts +22 -0
  529. package/dist/showcase/specimens/inputs.d.ts.map +1 -0
  530. package/dist/showcase/specimens/inputs.js +60 -0
  531. package/dist/showcase/specimens/menus.d.ts +20 -0
  532. package/dist/showcase/specimens/menus.d.ts.map +1 -0
  533. package/dist/showcase/specimens/menus.js +65 -0
  534. package/dist/showcase/specimens/navigation.d.ts +22 -0
  535. package/dist/showcase/specimens/navigation.d.ts.map +1 -0
  536. package/dist/showcase/specimens/navigation.js +103 -0
  537. package/dist/showcase/specimens/other.d.ts +26 -0
  538. package/dist/showcase/specimens/other.d.ts.map +1 -0
  539. package/dist/showcase/specimens/other.js +73 -0
  540. package/dist/showcase/specimens/specimen.d.ts +5 -0
  541. package/dist/showcase/specimens/specimen.d.ts.map +1 -0
  542. package/dist/showcase/specimens/specimen.js +1 -0
  543. package/dist/showcase/specimens/status.d.ts +22 -0
  544. package/dist/showcase/specimens/status.d.ts.map +1 -0
  545. package/dist/showcase/specimens/status.js +44 -0
  546. package/dist/showcase/usage.generated.d.ts +16 -0
  547. package/dist/showcase/usage.generated.d.ts.map +1 -0
  548. package/dist/showcase/usage.generated.js +1788 -0
  549. package/dist/standalone/index.js +1 -1
  550. package/dist/styles/components.css +21 -0
  551. package/package.json +8 -3
  552. package/dist/components/automation-section.d.ts +0 -78
  553. package/dist/components/automation-section.d.ts.map +0 -1
  554. package/dist/components/automation-section.js +0 -75
  555. package/dist/components/catalog-tile.d.ts +0 -19
  556. package/dist/components/catalog-tile.d.ts.map +0 -1
  557. package/dist/components/catalog-tile.js +0 -13
  558. package/dist/components/feedback-state.d.ts +0 -14
  559. package/dist/components/feedback-state.d.ts.map +0 -1
  560. package/dist/components/feedback-state.js +0 -65
  561. package/dist/components/installer-shell.d.ts +0 -25
  562. package/dist/components/installer-shell.d.ts.map +0 -1
  563. package/dist/components/installer-shell.js +0 -32
  564. package/dist/components/settings-form.d.ts +0 -9
  565. package/dist/components/settings-form.d.ts.map +0 -1
  566. package/dist/components/settings-form.js +0 -83
package/AGENTS.md CHANGED
@@ -6,7 +6,8 @@ product compositions. Source lives in `src/`; consumers receive `dist/` through
6
6
 
7
7
  Every design rule a component follows is in `../design-system/DESIGN.md`:
8
8
  tokens, roles, materials, glass, motion, status, activity, Agent orbs, marks and
9
- the component rules in its "Components" section. This file holds only how the
9
+ the component rules in its "Components" section. A component change a person
10
+ can see goes through `product-design` first. This file holds only how the
10
11
  package is kept.
11
12
 
12
13
  - **Styling.** A component uses the semantic roles and the generated tokens, and
@@ -29,6 +30,9 @@ package is kept.
29
30
  package ships no auth abstraction. A value or function an app's server code
30
31
  calls lives in a module without `"use client"`, and only the Portal's
31
32
  production build (`npm run build -w @nadicodeai/portal`) proves it.
33
+ - **Usage.** The main export's TSDoc carries `@family`, `@when`, `@instead`,
34
+ `@behaviour`, `@words` and `@access`; `generate:usage` refreshes the
35
+ showcase's index from it, and `lint` fails until it runs.
32
36
  - **Agents.** `@nadicodeai/ui/agents` re-exports assistant-ui and our reviewed
33
37
  compositions; `@nadicodeai/ui/agent-orb` is the React-free entry a native
34
38
  startup screen paints an orb with before React loads.
@@ -1,4 +1,17 @@
1
1
  import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
2
+ /**
3
+ * Sections that open and close under their headings.
4
+ *
5
+ * @family Other
6
+ * @when Optional or advanced content in named sections, such as the questions of a help page.
7
+ * @instead One piece of supporting detail is `Disclosure`. A long block cut short is
8
+ * `ExpandableBlock`. The page's main answer is never hidden in one.
9
+ * @behaviour Related sections may stay open together; exclusive ones open one at a time. The
10
+ * trigger's chevron turns when open.
11
+ * @words Each trigger names its topic as a noun phrase or a question a person asks.
12
+ * @access Each trigger is a `button` with `aria-expanded` controlling its panel; headings keep the
13
+ * page's outline.
14
+ */
2
15
  declare function Accordion({ className, ...props }: AccordionPrimitive.Root.Props): import("react").JSX.Element;
3
16
  declare function AccordionItem({ className, ...props }: AccordionPrimitive.Item.Props): import("react").JSX.Element;
4
17
  declare function AccordionTrigger({ className, children, ...props }: AccordionPrimitive.Trigger.Props): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../src/components/accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAK3E,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,IAAI,CAAC,KAAK,+BAQxE;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,IAAI,CAAC,KAAK,+BAQ5E;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,OAAO,CAAC,KAAK,+BAmB5F;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,KAAK,CAAC,KAAK,+BAiB1F;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../src/components/accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAK3E;;;;;;;;;;;;GAYG;AACH,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,IAAI,CAAC,KAAK,+BAQxE;AAED,iBAAS,aAAa,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,IAAI,CAAC,KAAK,+BAQ5E;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,OAAO,CAAC,KAAK,+BAmB5F;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,CAAC,KAAK,CAAC,KAAK,+BAiB1F;AAED,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -2,6 +2,19 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Accordion as AccordionPrimitive } from "@base-ui/react/accordion";
3
3
  import { cn } from "../lib/utils.js";
4
4
  import { ChevronDownIcon } from "lucide-react";
5
+ /**
6
+ * Sections that open and close under their headings.
7
+ *
8
+ * @family Other
9
+ * @when Optional or advanced content in named sections, such as the questions of a help page.
10
+ * @instead One piece of supporting detail is `Disclosure`. A long block cut short is
11
+ * `ExpandableBlock`. The page's main answer is never hidden in one.
12
+ * @behaviour Related sections may stay open together; exclusive ones open one at a time. The
13
+ * trigger's chevron turns when open.
14
+ * @words Each trigger names its topic as a noun phrase or a question a person asks.
15
+ * @access Each trigger is a `button` with `aria-expanded` controlling its panel; headings keep the
16
+ * page's outline.
17
+ */
5
18
  function Accordion({ className, ...props }) {
6
19
  return (_jsx(AccordionPrimitive.Root, { "data-slot": "accordion", className: cn("flex w-full flex-col", className), ...props }));
7
20
  }
@@ -1,4 +1,9 @@
1
- import type { ReactElement, ReactNode } from "react";
1
+ import type { ComponentProps, ReactElement, ReactNode } from "react";
2
+ import type { MenuCommand } from "./action-menu.js";
3
+ import { type MenuChoiceRowProps } from "./menu-choice-row.js";
4
+ import type { PageCommandAction } from "./page-actions.js";
5
+ import { type ResolvedMessage } from "./product-message.js";
6
+ import { ThemeModeMenu } from "./theme-mode-switcher.js";
2
7
  /** Whose account it is: the name people recognise, the picture, and the lines under it. */
3
8
  export type AccountIdentity = {
4
9
  /**
@@ -31,34 +36,73 @@ export type AccountMenuIdentityProps = {
31
36
  * same block in both places.
32
37
  */
33
38
  export declare function AccountMenuIdentity({ className, identity, pictureOnly, size, }: AccountMenuIdentityProps): import("react").JSX.Element;
39
+ export type AccountMenuCommand = MenuCommand & {
40
+ /** A reading at the row's end: "62% left". */
41
+ value?: ReactNode;
42
+ };
43
+ /** A product's own exclusive setting, in a submenu: Alveare's presence. */
44
+ export type AccountMenuChoice = {
45
+ label: string;
46
+ icon: ReactElement;
47
+ value: string;
48
+ /** Each option's name, its mark, and one muted line under the name when the name alone does not say what it is. */
49
+ options: readonly {
50
+ value: string;
51
+ label: string;
52
+ mark?: ReactNode;
53
+ detail?: string;
54
+ }[];
55
+ onValueChange: (value: string) => void;
56
+ };
57
+ export type AccountMenuSignOut = {
58
+ /** "Sign out". */
59
+ label: string;
60
+ /** "Signing out". */
61
+ pendingLabel: string;
62
+ pending: boolean;
63
+ failure?: ResolvedMessage | null;
64
+ onSignOut: () => void;
65
+ /** Sign out opens the product's own confirmation, so the menu closes and leaves focus to it. */
66
+ confirms?: boolean;
67
+ };
34
68
  export type AccountMenuProps = {
35
- /** Where the menu sits against its trigger. */
36
- align?: "center" | "end" | "start";
37
- /** The groups under the header: what this account can do, ending in the way out. */
38
- children: ReactNode;
39
- className?: string;
40
- /** Closes the trigger to further presses while the account is leaving. */
41
- disabled?: boolean;
42
- /** Sits beside the header, for a single icon-only action on the account itself. */
43
- headerAction?: ReactNode;
44
69
  identity: AccountIdentity;
45
- /** The trigger's accessible name; it carries only the identity otherwise. */
70
+ /** Names the trigger and the menu: "Account" reads "Account: Ada Rossi". */
46
71
  label: string;
47
- /** Runs when the menu opens or closes, for a shell that records where it was. */
48
- onOpenChange?: (open: boolean) => void;
72
+ /** The gear beside the identity, to the account's settings. */
73
+ settings?: PageCommandAction & {
74
+ label: string;
75
+ };
76
+ /** Applies at once and keeps the menu open. */
77
+ theme: ComponentProps<typeof ThemeModeMenu>;
78
+ language?: MenuChoiceRowProps<string> & {
79
+ icon: ReactElement;
80
+ };
81
+ choices?: readonly AccountMenuChoice[];
82
+ commands?: readonly AccountMenuCommand[];
83
+ signOut: AccountMenuSignOut;
49
84
  /**
50
85
  * The trigger shows the picture alone, for a navigation rail drawn too narrow
51
86
  * for the name; the menu still opens on the whole identity.
52
87
  */
53
88
  pictureOnly?: boolean;
54
- side?: "bottom" | "left" | "right" | "top";
55
89
  /** The element the trigger renders as, when a shell has its own button. */
56
90
  triggerRender?: ReactElement;
91
+ align?: "center" | "end" | "start";
92
+ side?: "bottom" | "left" | "right" | "top";
93
+ /** Runs when the menu opens or closes, for a shell that records where it was. */
94
+ onOpenChange?: (open: boolean) => void;
57
95
  };
58
96
  /**
59
- * The account menu at the foot of a shell's navigation: press whose account it
60
- * is, and the menu opens on that same identity with what they can do beneath it.
61
- * One composition, so the Portal and the desktop read the same.
97
+ * The account menu at the foot of a shell's navigation: whose account it is,
98
+ * and the menu opening on that same identity with what they can do beneath it.
99
+ *
100
+ * @family Menus
101
+ * @when The account at the sidebar's foot in the Portal, Nadia and Alveare: the gear to the account's settings, Theme, Language, a product's own settings, its commands, and Sign out.
102
+ * @instead A record's or a page's commands are an ActionMenu; a setting with more than a few options or one that needs a Save belongs on a SettingsPage.
103
+ * @behaviour The menu opens upward on the identity. In order: the gear, Theme, Language, the product's choices as submenus, its commands with any reading at their end, and Sign out last in the error colour. Theme and Language apply at once and keep the menu open. While signing out, Sign out says its pending word, the menu stays open and the trigger is locked; a failure shows under it. A Sign out that `confirms` closes the menu instead, for the product's own confirmation.
104
+ * @words The menu's name ("Account"), the person's name and lines, then each row's noun or verb from the product's catalogue: "Theme", "Language", "Usage", "Sign out" and "Signing out".
105
+ * @access The trigger and the menu are named "{label}: {name}"; the gear carries its label; the pending sign-out is aria-busy and announced through a status; a failure is an alert.
62
106
  */
63
- export declare function AccountMenu({ align, children, className, disabled, headerAction, identity, label, onOpenChange, pictureOnly, side, triggerRender, }: AccountMenuProps): import("react").JSX.Element;
107
+ export declare function AccountMenu({ align, choices, commands, identity, label, language, onOpenChange, pictureOnly, settings, side, signOut, theme, triggerRender, }: AccountMenuProps): import("react").JSX.Element;
64
108
  //# sourceMappingURL=account-menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"account-menu.d.ts","sourceRoot":"","sources":["../../src/components/account-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAarD,2FAA2F;AAC3F,MAAM,MAAM,eAAe,GAAG;IAC5B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,EAAE,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,eAAe,CAAC;IAC1B,8EAA8E;IAC9E,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,EACT,QAAQ,EACR,WAAmB,EACnB,IAAgB,GACjB,EAAE,wBAAwB,+BA4B1B;AAED,MAAM,MAAM,gBAAgB,GAAG;IAC7B,+CAA+C;IAC/C,KAAK,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;IACnC,oFAAoF;IACpF,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,mFAAmF;IACnF,YAAY,CAAC,EAAE,SAAS,CAAC;IACzB,QAAQ,EAAE,eAAe,CAAC;IAC1B,6EAA6E;IAC7E,KAAK,EAAE,MAAM,CAAC;IAC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,QAAQ,CAAC,EAAE,iBAAiB,GAAG;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACjD,+CAA+C;IAC/C,KAAK,EAAE,cAAc,CAAC,OAAO,aAAa,CAAC,CAAC;IAC5C,QAAQ,CAAC,EAAE,kBAAkB,CAAC,MAAM,CAAC,GAAG;QAAE,IAAI,EAAE,YAAY,CAAA;KAAE,CAAC;IAC/D,OAAO,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IACvC,QAAQ,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;IACzC,OAAO,EAAE,kBAAkB,CAAC;IAC5B;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2EAA2E;IAC3E,aAAa,CAAC,EAAE,YAAY,CAAC;IAC7B,KAAK,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;IACnC,IAAI,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,CAAC;IAC3C,iFAAiF;IACjF,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CACxC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,WAAW,CAAC,EAC1B,KAAe,EACf,OAAY,EACZ,QAAa,EACb,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,YAAY,EACZ,WAAmB,EACnB,QAAQ,EACR,IAAY,EACZ,OAAO,EACP,KAAK,EACL,aAAa,GACd,EAAE,gBAAgB,+BAgGlB"}
@@ -1,8 +1,14 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { ChevronsUpDown, UserRound } from "lucide-react";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { ChevronsUpDown, LogOut, Settings, UserRound } from "lucide-react";
4
4
  import { Avatar, AvatarFallback, AvatarImage } from "./avatar.js";
5
- import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuSeparator, DropdownMenuTrigger, } from "./dropdown-menu.js";
5
+ import { DropdownMenu, DropdownMenuCommand, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from "./dropdown-menu.js";
6
+ import { FieldError } from "./field.js";
7
+ import { MenuChoiceRow } from "./menu-choice-row.js";
8
+ import { PendingLabel } from "./pending-label.js";
9
+ import { bodyBeyondTitle } from "./product-message.js";
10
+ import { ThemeModeMenu } from "./theme-mode-switcher.js";
11
+ import { MenuCommandRow, menuItemAction } from "../internal/record-menu-items.js";
6
12
  import { cn } from "../lib/utils.js";
7
13
  /**
8
14
  * The account's avatar beside its name and lines. The trigger shows it with the
@@ -13,10 +19,28 @@ export function AccountMenuIdentity({ className, identity, pictureOnly = false,
13
19
  return (_jsxs("span", { className: cn("flex min-w-0 items-center gap-2 text-left text-sm", className), "data-slot": "account-menu-identity", children: [_jsxs(Avatar, { "aria-hidden": "true", size: size === "lg" ? "default" : "sm", children: [identity.image ? _jsx(AvatarImage, { alt: "", src: identity.image }) : null, _jsx(AvatarFallback, { children: identity.initials || _jsx(UserRound, { "aria-hidden": "true", className: "size-3/5" }) })] }), pictureOnly ? null : (_jsxs("span", { className: "grid min-w-0 flex-1 gap-0.5 leading-tight", children: [_jsx("span", { className: "truncate font-medium text-foreground", children: identity.name }), (size === "lg" ? identity.lines : identity.lines?.slice(0, 1))?.map((line, index) => (_jsx("span", { className: "truncate text-xs font-normal text-muted-foreground", children: line }, index)))] }))] }));
14
20
  }
15
21
  /**
16
- * The account menu at the foot of a shell's navigation: press whose account it
17
- * is, and the menu opens on that same identity with what they can do beneath it.
18
- * One composition, so the Portal and the desktop read the same.
22
+ * The account menu at the foot of a shell's navigation: whose account it is,
23
+ * and the menu opening on that same identity with what they can do beneath it.
24
+ *
25
+ * @family Menus
26
+ * @when The account at the sidebar's foot in the Portal, Nadia and Alveare: the gear to the account's settings, Theme, Language, a product's own settings, its commands, and Sign out.
27
+ * @instead A record's or a page's commands are an ActionMenu; a setting with more than a few options or one that needs a Save belongs on a SettingsPage.
28
+ * @behaviour The menu opens upward on the identity. In order: the gear, Theme, Language, the product's choices as submenus, its commands with any reading at their end, and Sign out last in the error colour. Theme and Language apply at once and keep the menu open. While signing out, Sign out says its pending word, the menu stays open and the trigger is locked; a failure shows under it. A Sign out that `confirms` closes the menu instead, for the product's own confirmation.
29
+ * @words The menu's name ("Account"), the person's name and lines, then each row's noun or verb from the product's catalogue: "Theme", "Language", "Usage", "Sign out" and "Signing out".
30
+ * @access The trigger and the menu are named "{label}: {name}"; the gear carries its label; the pending sign-out is aria-busy and announced through a status; a failure is an alert.
19
31
  */
20
- export function AccountMenu({ align = "start", children, className, disabled, headerAction, identity, label, onOpenChange, pictureOnly = false, side = "top", triggerRender, }) {
21
- return (_jsxs(DropdownMenu, { onOpenChange: onOpenChange, children: [_jsxs(DropdownMenuTrigger, { "aria-label": `${label}: ${identity.name}`, disabled: disabled, render: triggerRender ?? (_jsx("button", { className: "flex w-full min-w-0 items-center gap-2 rounded-sm p-1.5 text-left outline-none hover:bg-accent focus-visible:nc-focus-outline focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 data-[popup-open]:bg-accent", type: "button" })), children: [_jsx(AccountMenuIdentity, { className: pictureOnly ? undefined : "flex-1", identity: identity, pictureOnly: pictureOnly }), pictureOnly ? null : (_jsx(ChevronsUpDown, { "aria-hidden": "true", className: "ml-auto size-4 shrink-0 text-muted-foreground" }))] }), _jsxs(DropdownMenuContent, { align: align, "aria-label": `${label}: ${identity.name}`, className: cn("w-72 max-w-[calc(100vw-2rem)]", className), density: "comfortable", side: side, sideOffset: 8, children: [_jsxs(DropdownMenuGroup, { className: "flex min-w-0 items-center gap-1 pr-1.5", children: [_jsx(AccountMenuIdentity, { className: "min-w-0 flex-1 px-2 py-2", identity: identity, size: "lg" }), headerAction] }), _jsx(DropdownMenuSeparator, {}), children] })] }));
32
+ export function AccountMenu({ align = "start", choices = [], commands = [], identity, label, language, onOpenChange, pictureOnly = false, settings, side = "top", signOut, theme, triggerRender, }) {
33
+ const name = `${label}: ${identity.name}`;
34
+ return (_jsxs(DropdownMenu, { onOpenChange: onOpenChange, children: [_jsxs(DropdownMenuTrigger, { "aria-label": name, disabled: signOut.pending, render: triggerRender ?? (_jsx("button", { className: "flex w-full min-w-0 items-center gap-2 rounded-sm p-1.5 text-left outline-none hover:bg-accent focus-visible:nc-focus-outline focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 data-[popup-open]:bg-accent", type: "button" })), children: [_jsx(AccountMenuIdentity, { className: pictureOnly ? undefined : "flex-1", identity: identity, pictureOnly: pictureOnly }), pictureOnly ? null : (_jsx(ChevronsUpDown, { "aria-hidden": "true", className: "ml-auto size-4 shrink-0 text-muted-foreground" }))] }), _jsxs(DropdownMenuContent, { align: align, "aria-label": name, className: "w-72 max-w-[calc(100vw-2rem)]", density: "comfortable", side: side, sideOffset: 8, children: [_jsxs(DropdownMenuGroup, { className: "flex min-w-0 items-center gap-1 pr-1.5", children: [_jsx(AccountMenuIdentity, { className: "min-w-0 flex-1 px-2 py-2", identity: identity, size: "lg" }), settings ? (_jsx(DropdownMenuItem, { "aria-label": settings.label, iconOnly: true, ...menuItemAction(settings), children: _jsx(Settings, { "aria-hidden": "true" }) })) : null] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuGroup, { children: [_jsx(ThemeModeMenu, { ...theme }), language ? _jsx(MenuChoiceRow, { ...language }) : null, choices.map((choice) => (_jsx(AccountMenuChoiceRow, { choice: choice }, choice.label)))] }), commands.length > 0 ? (_jsxs(_Fragment, { children: [_jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuGroup, { children: commands.map(({ value, ...command }) => (_jsx(MenuCommandRow, { command: command, value: value }, command.label))) })] })) : null, _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuCommand, { "aria-busy": signOut.pending || undefined, closeOnClick: signOut.confirms === true, disabled: signOut.pending, icon: _jsx(LogOut, {}), onClick: () => {
35
+ if (!signOut.pending)
36
+ signOut.onSignOut();
37
+ }, variant: "destructive", children: _jsx(PendingLabel, { pending: signOut.pending, pendingLabel: signOut.pendingLabel, children: signOut.label }) }), signOut.pending ? (_jsx("span", { className: "sr-only", role: "status", children: signOut.pendingLabel })) : null, signOut.failure ? (_jsxs(FieldError, { className: "mx-3 mb-1 break-words", "data-message-code": signOut.failure.code, children: [_jsx("span", { className: "block font-medium", children: signOut.failure.title }), bodyBeyondTitle(signOut.failure) ? (_jsx("span", { className: "block", children: bodyBeyondTitle(signOut.failure) })) : null] })) : null] })] })] }));
38
+ }
39
+ function AccountMenuChoiceRow({ choice }) {
40
+ const current = choice.options.find((option) => option.value === choice.value);
41
+ return (_jsxs(DropdownMenuSub, { children: [_jsxs(DropdownMenuSubTrigger, { className: "gap-2.5", children: [_jsx("span", { "aria-hidden": "true", className: "flex shrink-0 items-center text-muted-foreground", children: choice.icon }), _jsx("span", { className: "min-w-0 flex-1 truncate", children: choice.label }), current ? (_jsx(DropdownMenuShortcut, { className: "ml-0", children: current.label })) : null] }), _jsx(DropdownMenuSubContent, { children: _jsx(DropdownMenuRadioGroup, { "aria-label": choice.label, onValueChange: (next) => {
42
+ const selected = choice.options.find((option) => option.value === next);
43
+ if (selected)
44
+ choice.onValueChange(selected.value);
45
+ }, value: choice.value, children: choice.options.map((option) => (_jsxs(DropdownMenuRadioItem, { closeOnClick: false, value: option.value, children: [option.mark, option.detail ? (_jsxs("span", { className: "grid min-w-0 flex-1 gap-0.5 leading-tight", children: [_jsx("span", { className: "truncate", children: option.label }), _jsx("span", { className: "truncate text-xs text-muted-foreground", children: option.detail })] })) : (option.label)] }, option.value))) }) })] }));
22
46
  }
@@ -1,8 +1,64 @@
1
- import type { ReactNode } from "react";
2
- export type ActionMenuProps = {
1
+ import type { ComponentProps, ReactElement, ReactNode } from "react";
2
+ import { DropdownMenuContent } from "./dropdown-menu.js";
3
+ import type { PageCommandAction } from "./page-actions.js";
4
+ /** One command in a menu: its icon first, then its label. */
5
+ export type MenuCommand = PageCommandAction & {
3
6
  label: string;
4
- triggerId?: string;
5
- children: ReactNode;
7
+ icon: ReactElement;
8
+ /** Read instead of the label when the label alone does not name the target: "Let Sofia use Gmail". */
9
+ accessibleName?: string | undefined;
10
+ /** Drawn last, after the divider, in the error colour. */
11
+ destructive?: boolean | undefined;
12
+ disabled?: boolean | undefined;
13
+ /** The value it acts on, in mono under its label: the address Copy address copies. */
14
+ detail?: string | undefined;
15
+ /** Why it cannot run now, read under its label; a disabled command keeps it visible. */
16
+ reason?: ReactNode;
6
17
  };
7
- export declare function ActionMenu({ label, triggerId, children }: ActionMenuProps): import("react").JSX.Element;
18
+ /** A record's menu: whose it is, and what can be done to it. */
19
+ export type RecordMenu = {
20
+ /** The trigger's accessible name, from the catalogue: "More for pec@acme.it". */
21
+ label: string;
22
+ /** The record the menu acts on, its first line: "pec@acme.it". */
23
+ record: string;
24
+ commands: readonly MenuCommand[];
25
+ };
26
+ export type ActionMenuProps = RecordMenu & {
27
+ triggerId?: string | undefined;
28
+ /** Controlled, for a host that stays visible while the menu is open (a message's hover bar). */
29
+ open?: boolean | undefined;
30
+ onOpenChange?: ((open: boolean) => void) | undefined;
31
+ /** false keeps the page interactive while the menu is open. */
32
+ modal?: boolean | undefined;
33
+ side?: "bottom" | "top" | undefined;
34
+ /** Where focus goes when the menu closes, when not its trigger: Edit hands it to a composer. */
35
+ finalFocus?: ComponentProps<typeof DropdownMenuContent>["finalFocus"];
36
+ };
37
+ /**
38
+ * A record's three dots: the menu of its secondary commands, headed by the record's name.
39
+ *
40
+ * @family Menus
41
+ * @when The secondary commands of one record from a visible trigger: the row's three dots, or the page's, which comes last in the title row.
42
+ * @instead For a record's main task use a visible button (Edit opens the row). For finding across everything use `CommandDialog`. For a value to choose use `Select`. For right-click use the mirror, `ActionContextMenu`.
43
+ * @behaviour Ghost 36 px trigger that keeps its fill while open. The menu opens aligned to the trigger's end, 6 px below: the record's name, the commands with their icons first and the value one acts on in mono under it, then the destructive ones after a divider in the error colour. Typeahead, arrows, Escape returns focus. A disabled command stays, greyed, with its reason under it. Nothing renders with no command.
44
+ * @words The trigger reads "More for {record}"; the header is the record's name. Commands are verb and noun in sentence case, "Remove mailbox", never a bare "Delete". About ten at most; rows wrap, never truncate.
45
+ * @access The trigger is a ghost icon button named by `label`, `aria-expanded` while open. `role="menu"`, items `menuitem` in a group named by the record; the value a command acts on and its reason are the item's description; icons hidden.
46
+ */
47
+ export declare function ActionMenu({ label, record, commands, triggerId, open, onOpenChange, modal, side, finalFocus, }: ActionMenuProps): import("react").JSX.Element | null;
48
+ /** The same commands on a right-click, Shift+F10 or the Menu key of the record's row. */
49
+ export type ActionContextMenuProps = RecordMenu & {
50
+ /** The record's row, which keeps its own element and opens the menu. */
51
+ children: ReactElement;
52
+ };
53
+ /**
54
+ * A record's menu opened from its row by a right-click: the mirror of its `ActionMenu`.
55
+ *
56
+ * @family Menus
57
+ * @when A right-click or long-press convenience on a record that already has a visible menu with the same commands.
58
+ * @instead For anything a person must find use the visible three dots or a button: a context menu is never the only way. For global search use `CommandDialog`.
59
+ * @behaviour The dropdown's surface and rows exactly, opening at the pointer. The same commands in the same order, the same disabled reasons, destructive last after a divider. With no command the row renders alone.
60
+ * @words Identical to the visible menu's, in the same order; a command reached two ways reads the same both ways.
61
+ * @access The Menu key and Shift+F10 open it on the focused row. The menu is named by `label`; Escape closes it and returns focus to the row.
62
+ */
63
+ export declare function ActionContextMenu({ label, record, commands, children }: ActionContextMenuProps): import("react").JSX.Element;
8
64
  //# sourceMappingURL=action-menu.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"action-menu.d.ts","sourceRoot":"","sources":["../../src/components/action-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA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AAC;IAC/B,gGAAgG;IAChG,IAAI,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACrD,+DAA+D;IAC/D,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,IAAI,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;IACpC,gGAAgG;IAChG,UAAU,CAAC,EAAE,cAAc,CAAC,OAAO,mBAAmB,CAAC,CAAC,YAAY,CAAC,CAAC;CACvE,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,MAAM,EACN,QAAQ,EACR,SAAS,EACT,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,IAAe,EACf,UAAU,GACX,EAAE,eAAe,sCAoBjB;AAED,yFAAyF;AACzF,MAAM,MAAM,sBAAsB,GAAG,UAAU,GAAG;IAChD,wEAAwE;IACxE,QAAQ,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,EAAE,sBAAsB,+BAU9F"}
@@ -2,7 +2,36 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { EllipsisIcon } from "lucide-react";
4
4
  import { Button } from "./button.js";
5
+ import { ContextMenu, ContextMenuContent, ContextMenuTrigger } from "./context-menu.js";
5
6
  import { DropdownMenu, DropdownMenuContent, DropdownMenuTrigger } from "./dropdown-menu.js";
6
- export function ActionMenu({ label, triggerId, children }) {
7
- return (_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { id: triggerId, "aria-label": label, render: _jsx(Button, { variant: "ghost", size: "icon" }), children: _jsx(EllipsisIcon, { "aria-hidden": "true" }) }), _jsx(DropdownMenuContent, { align: "end", children: children })] }));
7
+ import { RecordMenuItems } from "../internal/record-menu-items.js";
8
+ /**
9
+ * A record's three dots: the menu of its secondary commands, headed by the record's name.
10
+ *
11
+ * @family Menus
12
+ * @when The secondary commands of one record from a visible trigger: the row's three dots, or the page's, which comes last in the title row.
13
+ * @instead For a record's main task use a visible button (Edit opens the row). For finding across everything use `CommandDialog`. For a value to choose use `Select`. For right-click use the mirror, `ActionContextMenu`.
14
+ * @behaviour Ghost 36 px trigger that keeps its fill while open. The menu opens aligned to the trigger's end, 6 px below: the record's name, the commands with their icons first and the value one acts on in mono under it, then the destructive ones after a divider in the error colour. Typeahead, arrows, Escape returns focus. A disabled command stays, greyed, with its reason under it. Nothing renders with no command.
15
+ * @words The trigger reads "More for {record}"; the header is the record's name. Commands are verb and noun in sentence case, "Remove mailbox", never a bare "Delete". About ten at most; rows wrap, never truncate.
16
+ * @access The trigger is a ghost icon button named by `label`, `aria-expanded` while open. `role="menu"`, items `menuitem` in a group named by the record; the value a command acts on and its reason are the item's description; icons hidden.
17
+ */
18
+ export function ActionMenu({ label, record, commands, triggerId, open, onOpenChange, modal, side = "bottom", finalFocus, }) {
19
+ if (commands.length === 0)
20
+ return null;
21
+ return (_jsxs(DropdownMenu, { modal: modal, onOpenChange: onOpenChange ? (next) => onOpenChange(next) : undefined, open: open, children: [_jsx(DropdownMenuTrigger, { id: triggerId, "aria-label": label, render: _jsx(Button, { variant: "ghost", size: "icon" }), children: _jsx(EllipsisIcon, { "aria-hidden": "true" }) }), _jsx(DropdownMenuContent, { align: "end", finalFocus: finalFocus, side: side, children: _jsx(RecordMenuItems, { commands: commands, record: record }) })] }));
22
+ }
23
+ /**
24
+ * A record's menu opened from its row by a right-click: the mirror of its `ActionMenu`.
25
+ *
26
+ * @family Menus
27
+ * @when A right-click or long-press convenience on a record that already has a visible menu with the same commands.
28
+ * @instead For anything a person must find use the visible three dots or a button: a context menu is never the only way. For global search use `CommandDialog`.
29
+ * @behaviour The dropdown's surface and rows exactly, opening at the pointer. The same commands in the same order, the same disabled reasons, destructive last after a divider. With no command the row renders alone.
30
+ * @words Identical to the visible menu's, in the same order; a command reached two ways reads the same both ways.
31
+ * @access The Menu key and Shift+F10 open it on the focused row. The menu is named by `label`; Escape closes it and returns focus to the row.
32
+ */
33
+ export function ActionContextMenu({ label, record, commands, children }) {
34
+ if (commands.length === 0)
35
+ return children;
36
+ return (_jsxs(ContextMenu, { children: [_jsx(ContextMenuTrigger, { render: children }), _jsx(ContextMenuContent, { "aria-label": label, children: _jsx(RecordMenuItems, { commands: commands, record: record }) })] }));
8
37
  }
@@ -7,9 +7,19 @@ interface ActionStatusProps {
7
7
  idleIcon?: ReactNode;
8
8
  }
9
9
  /**
10
- * A control's three words on one action: what it does, what it is doing, what
11
- * it did. Saving keeps the idle icon and the control's place, and changes only
12
- * the word; the caller marks the control `disabled` and `aria-busy`.
10
+ * A control's three words on one action: what it does, what it is doing, what it did.
11
+ *
12
+ * @family Status
13
+ * @when A control that reports its own action: what it does, what it is doing, what it did. Waits
14
+ * under about a second.
15
+ * @instead The record's resulting state is a `StatusBadge`. A wait past a second adds one waiting
16
+ * line beside the work. An Agent's work is her orb.
17
+ * @behaviour Saving keeps the idle icon, the size and the place; only the word changes. The caller
18
+ * sets `disabled` and `aria-busy`. Done shows the check.
19
+ * @words Verb and noun idle (*Save changes*), the verb in progress (*Saving*), the result
20
+ * (*Saved*). No ellipsis. Italian: *Salva modifiche*, *Salvataggio*, *Salvato*.
21
+ * @access The button's name is the current word. The result is announced once in a `role="status"`
22
+ * region; a failure as an alert.
13
23
  */
14
24
  declare function ActionStatus({ state, idle, busy, done, idleIcon }: ActionStatusProps): import("react").JSX.Element;
15
25
  export { ActionStatus };
@@ -1 +1 @@
1
- {"version":3,"file":"action-status.d.ts","sourceRoot":"","sources":["../../src/components/action-status.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AACD;;;;GAIG;AACH,iBAAS,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAe,EAAE,EAAE,iBAAiB,+BAOpF;AACD,OAAO,EAAE,YAAY,EAAE,CAAC"}
1
+ {"version":3,"file":"action-status.d.ts","sourceRoot":"","sources":["../../src/components/action-status.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,UAAU,iBAAiB;IACzB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AACD;;;;;;;;;;;;;;GAcG;AACH,iBAAS,YAAY,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,QAAe,EAAE,EAAE,iBAAiB,+BAOpF;AACD,OAAO,EAAE,YAAY,EAAE,CAAC"}
@@ -1,9 +1,19 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { CheckIcon } from "lucide-react";
3
3
  /**
4
- * A control's three words on one action: what it does, what it is doing, what
5
- * it did. Saving keeps the idle icon and the control's place, and changes only
6
- * the word; the caller marks the control `disabled` and `aria-busy`.
4
+ * A control's three words on one action: what it does, what it is doing, what it did.
5
+ *
6
+ * @family Status
7
+ * @when A control that reports its own action: what it does, what it is doing, what it did. Waits
8
+ * under about a second.
9
+ * @instead The record's resulting state is a `StatusBadge`. A wait past a second adds one waiting
10
+ * line beside the work. An Agent's work is her orb.
11
+ * @behaviour Saving keeps the idle icon, the size and the place; only the word changes. The caller
12
+ * sets `disabled` and `aria-busy`. Done shows the check.
13
+ * @words Verb and noun idle (*Save changes*), the verb in progress (*Saving*), the result
14
+ * (*Saved*). No ellipsis. Italian: *Salva modifiche*, *Salvataggio*, *Salvato*.
15
+ * @access The button's name is the current word. The result is announced once in a `role="status"`
16
+ * region; a failure as an alert.
7
17
  */
8
18
  function ActionStatus({ state, idle, busy, done, idleIcon = null }) {
9
19
  return (_jsxs(_Fragment, { children: [state === "done" ? _jsx(CheckIcon, { "aria-hidden": "true", "data-icon": "inline-start" }) : idleIcon, state === "saving" ? busy : state === "done" ? done : idle] }));
@@ -21,6 +21,20 @@ type ActivityCalendarProps = Omit<HTMLAttributes<HTMLDivElement>, "children"> &
21
21
  valueFormatter?: (value: number) => string;
22
22
  };
23
23
  declare function activityCalendarData(data: readonly ActivityCalendarDatum[], from: string, to: string): Activity[];
24
+ /**
25
+ * On which days activity happened, as a year of cells.
26
+ *
27
+ * @family Charts
28
+ * @when On which measured days activity happened, over the window the data covers, up to the last
29
+ * 365 days.
30
+ * @instead Never added to fill a row. Amounts over time are a bar or area chart. It follows the
31
+ * selected metric and names its own from-to window.
32
+ * @behaviour One hue, chart-1, at four steps of opacity over an empty day; a legend from Less to
33
+ * More. Only measured history: unknown coverage stays unknown, never zero.
34
+ * @words The window as dates in the description. Each day's label: *8 October 2026: 42 requests*.
35
+ * @access Every day is a named cell for assistive technology; the legend steps are named too.
36
+ * Colour is never the only reading: the value is in each label.
37
+ */
24
38
  declare function ActivityCalendar({ data, from, to, locale, labels, valueFormatter, className, ...props }: ActivityCalendarProps): import("react").JSX.Element;
25
39
  export { ActivityCalendar, activityCalendarData };
26
40
  export type { ActivityCalendarDatum, ActivityCalendarLabels, ActivityCalendarProps };
@@ -1 +1 @@
1
- {"version":3,"file":"activity-calendar.d.ts","sourceRoot":"","sources":["../../src/components/activity-calendar.tsx"],"names":[],"mappings":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C"}
@@ -32,6 +32,20 @@ function localizedCalendarLabels(locale) {
32
32
  weekdays: Array.from({ length: 7 }, (_, day) => weekdays.format(new Date(Date.UTC(2024, 0, 7 + day)))),
33
33
  };
34
34
  }
35
+ /**
36
+ * On which days activity happened, as a year of cells.
37
+ *
38
+ * @family Charts
39
+ * @when On which measured days activity happened, over the window the data covers, up to the last
40
+ * 365 days.
41
+ * @instead Never added to fill a row. Amounts over time are a bar or area chart. It follows the
42
+ * selected metric and names its own from-to window.
43
+ * @behaviour One hue, chart-1, at four steps of opacity over an empty day; a legend from Less to
44
+ * More. Only measured history: unknown coverage stays unknown, never zero.
45
+ * @words The window as dates in the description. Each day's label: *8 October 2026: 42 requests*.
46
+ * @access Every day is a named cell for assistive technology; the legend steps are named too.
47
+ * Colour is never the only reading: the value is in each label.
48
+ */
35
49
  function ActivityCalendar({ data, from, to, locale, labels, valueFormatter = (value) => new Intl.NumberFormat(locale).format(value), className, ...props }) {
36
50
  const calendarData = activityCalendarData(data, from, to);
37
51
  const dateFormatter = new Intl.DateTimeFormat(locale, {
@@ -0,0 +1,62 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ import { DateRangeControl } from "./chart-date-range-control.js";
3
+ import { type CollectionFiltersProps } from "./collection-filters.js";
4
+ import { type CollectionSearchProps } from "./collection-search.js";
5
+ import { type EmptyStateKind } from "./empty-state.js";
6
+ import { type IdentityMarkProps } from "./identity-mark.js";
7
+ import { type PageCommand } from "./page-actions.js";
8
+ import type { RecordStatus } from "./record-list.js";
9
+ export type ActivityEvent = {
10
+ id: string;
11
+ /** Shown as the time of day in the viewer's zone; UTC and local on hover. */
12
+ at: Date | number | string;
13
+ /** Who did it, at 24: a person's initials, an Agent's orb, an Installation's tile. The system's own work has none. */
14
+ actor?: IdentityMarkProps;
15
+ /** The sentence: the actor's name in <strong>, the action, the object as a value link. */
16
+ summary: ReactNode;
17
+ /** Only for the exception: a revocation, a failure. */
18
+ status?: RecordStatus | null;
19
+ /** One muted line. */
20
+ detail?: ReactNode;
21
+ };
22
+ export type ActivityDay = {
23
+ id: string;
24
+ /** "Today" */
25
+ title: string;
26
+ /** "14 October" */
27
+ date: string;
28
+ /** Newest first. */
29
+ events: readonly ActivityEvent[];
30
+ };
31
+ export type ActivityFeedProps = {
32
+ label: string;
33
+ /** Newest day first; undefined while they load. */
34
+ days: readonly ActivityDay[] | undefined;
35
+ locale?: string;
36
+ /** The viewer's zone, which a page rendered on a server passes: each event's time of day is written in it. */
37
+ timeZone?: string;
38
+ /** Right above the rows; the product keeps them in the URL. */
39
+ search?: CollectionSearchProps;
40
+ filters?: CollectionFiltersProps;
41
+ range?: ComponentProps<typeof DateRangeControl>;
42
+ /** "Show older events"; never a page count. */
43
+ older?: PageCommand;
44
+ loadingLabel: string;
45
+ empty: EmptyStateKind<"nothingYet">;
46
+ /** Given only while a search or filter is set: "No events match these filters." with Clear filters. */
47
+ noMatch?: Omit<EmptyStateKind<"noResults">, "kind">;
48
+ failed?: EmptyStateKind<"failed">;
49
+ };
50
+ /**
51
+ * What happened to a record, and when: one row per event under its day,
52
+ * newest first.
53
+ *
54
+ * @family Compositions
55
+ * @when A record's history: a Customer's, a Partner's or an Installation's Activity tab in the Portal, the company wiki's updates in Nadia. Each answers "what happened, and when?".
56
+ * @instead The steps of one Agent run, read in order, are a RunTimeline; a list of records a person finds and acts on is a CollectionPage; a single "last changed" fact is a RecordTime.
57
+ * @behaviour The search, filters and window sit right above the rows, kept in the URL by the product. Days stand newest first, each a title and a muted date over one card of rows; a row is the time of day, the actor's 24 px mark, the sentence with a status badge only for an exception, and one muted line of detail. "Show older events" follows the last day; there is never a page count. States, first that holds: failed, loading (still rows in the row's shape), no match with Clear filters, nothing yet in one line, the days. Under 900 px the time moves under the sentence. It draws no card header: the tab is the title.
58
+ * @words The sentence names the actor in `<strong>`, the action in the past tense and the object as a link that keeps the text's colour: "Marco Rinaldi created the Agent Acme Quotes". Day titles are "Today", "Yesterday", then the weekday; dates are the product's own ("14 October"). Nothing yet: "No events yet." and what will appear. No match: "No events match these filters.".
59
+ * @access The toolbar is named by `label`; each day's title is a level-3 heading over a list of its events; while loading, one status named by `loadingLabel` stands for the rows; each time is a `<time>` with its exact moment for assistive technology. A system event has no mark, so nothing empty is announced.
60
+ */
61
+ export declare function ActivityFeed({ label, days, locale, timeZone, search, filters, range, older, loadingLabel, empty, noMatch, failed, }: ActivityFeedProps): import("react").JSX.Element;
62
+ //# sourceMappingURL=activity-feed.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"activity-feed.d.ts","sourceRoot":"","sources":["../../src/components/activity-feed.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACjG,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAE9F,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;AAChF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAK7D,MAAM,MAAM,aAAa,GAAG;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,EAAE,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,CAAC;IAC3B,sHAAsH;IACtH,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,0FAA0F;IAC1F,OAAO,EAAE,SAAS,CAAC;IACnB,uDAAuD;IACvD,MAAM,CAAC,EAAE,YAAY,GAAG,IAAI,CAAC;IAC7B,sBAAsB;IACtB,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,cAAc;IACd,KAAK,EAAE,MAAM,CAAC;IACd,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,oBAAoB;IACpB,MAAM,EAAE,SAAS,aAAa,EAAE,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,mDAAmD;IACnD,IAAI,EAAE,SAAS,WAAW,EAAE,GAAG,SAAS,CAAC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8GAA8G;IAC9G,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,+DAA+D;IAC/D,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,OAAO,CAAC,EAAE,sBAAsB,CAAC;IACjC,KAAK,CAAC,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,CAAC;IAChD,+CAA+C;IAC/C,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;IACpC,uGAAuG;IACvG,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC,CAAC;IACpD,MAAM,CAAC,EAAE,cAAc,CAAC,QAAQ,CAAC,CAAC;CACnC,CAAC;AA2FF;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,MAAM,EACN,OAAO,EACP,KAAK,EACL,KAAK,EACL,YAAY,EACZ,KAAK,EACL,OAAO,EACP,MAAM,GACP,EAAE,iBAAiB,+BAiCnB"}
@@ -0,0 +1,54 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { Card } from "./card.js";
4
+ import { DateRangeControl } from "./chart-date-range-control.js";
5
+ import { CollectionFilters } from "./collection-filters.js";
6
+ import { CollectionSearch } from "./collection-search.js";
7
+ import { CollectionToolbar } from "./collection-toolbar.js";
8
+ import { EmptyState } from "./empty-state.js";
9
+ import { IdentityMark } from "./identity-mark.js";
10
+ import { PageCommandButton } from "./page-actions.js";
11
+ import { RecordTime } from "./record-time.js";
12
+ import { Skeleton } from "./skeleton.js";
13
+ import { StatusBadge } from "./status-badge.js";
14
+ const ROW = "grid grid-cols-[72px_24px_minmax(0,1fr)] items-start gap-3 px-4 py-3 max-[900px]:grid-cols-[24px_minmax(0,1fr)]";
15
+ const UNDER_TEXT = "max-[900px]:col-start-2 max-[900px]:row-start-2";
16
+ const MARK_CELL = "max-[900px]:col-start-1 max-[900px]:row-start-1";
17
+ const TEXT_CELL = "max-[900px]:col-start-2 max-[900px]:row-start-1";
18
+ const LOADING_ROWS = ["first", "second", "third"];
19
+ function EventRow({ event, locale, timeZone }) {
20
+ return (_jsxs("li", { className: ROW, "data-slot": "activity-event", children: [_jsx("div", { className: `text-label-sm leading-5 ${UNDER_TEXT}`, "data-slot": "activity-event-time", children: _jsx(RecordTime, { at: event.at, locale: locale, mode: "clock", timeZone: timeZone }) }), _jsx("div", { className: `flex h-5 items-center ${MARK_CELL}`, children: event.actor ? _jsx(IdentityMark, { ...event.actor, size: 24 }) : null }), _jsxs("div", { className: `min-w-0 ${TEXT_CELL}`, children: [_jsxs("div", { className: "text-body-sm text-muted-foreground [&_strong]:font-medium [&_strong]:text-foreground", children: [event.summary, event.status ? (_jsx(StatusBadge, { className: "ml-1.5 align-middle", label: event.status.label, tone: event.status.tone })) : null] }), event.detail ? (_jsx("div", { className: "mt-0.5 text-label-sm text-muted-foreground", children: event.detail })) : null] })] }));
21
+ }
22
+ function LoadingRows({ label }) {
23
+ return (_jsx("div", { "aria-busy": "true", "aria-label": label, role: "status", children: _jsx(Card, { className: "gap-0 divide-y divide-border py-0", surface: "resting", children: LOADING_ROWS.map((row) => (_jsxs("div", { "aria-hidden": "true", className: ROW, children: [_jsx(Skeleton, { className: `mt-1 h-2.5 w-12 ${UNDER_TEXT}` }), _jsx(Skeleton, { className: `size-6 ${MARK_CELL}`, shape: "circle" }), _jsxs("div", { className: `grid gap-2 pt-1 ${TEXT_CELL}`, children: [_jsx(Skeleton, { className: "h-2.5 w-4/5" }), _jsx(Skeleton, { className: "h-2.5 w-3/5" })] })] }, row))) }) }));
24
+ }
25
+ function Days({ days, locale, timeZone, older, }) {
26
+ return (_jsxs(_Fragment, { children: [days.map((day) => (_jsxs("div", { className: "flex flex-col gap-2", "data-slot": "activity-day", children: [_jsxs("h3", { className: "text-body-sm font-medium text-foreground", children: [day.title, " ", _jsx("span", { className: "text-muted-foreground", children: day.date })] }), _jsx(Card, { className: "gap-0 divide-y divide-border py-0", render: _jsx("ul", {}), surface: "resting", children: day.events.map((event) => (_jsx(EventRow, { event: event, locale: locale, timeZone: timeZone }, event.id))) })] }, day.id))), older ? (_jsx("div", { className: "flex justify-center", children: _jsx(PageCommandButton, { command: older, variant: "outline" }) })) : null] }));
27
+ }
28
+ /**
29
+ * What happened to a record, and when: one row per event under its day,
30
+ * newest first.
31
+ *
32
+ * @family Compositions
33
+ * @when A record's history: a Customer's, a Partner's or an Installation's Activity tab in the Portal, the company wiki's updates in Nadia. Each answers "what happened, and when?".
34
+ * @instead The steps of one Agent run, read in order, are a RunTimeline; a list of records a person finds and acts on is a CollectionPage; a single "last changed" fact is a RecordTime.
35
+ * @behaviour The search, filters and window sit right above the rows, kept in the URL by the product. Days stand newest first, each a title and a muted date over one card of rows; a row is the time of day, the actor's 24 px mark, the sentence with a status badge only for an exception, and one muted line of detail. "Show older events" follows the last day; there is never a page count. States, first that holds: failed, loading (still rows in the row's shape), no match with Clear filters, nothing yet in one line, the days. Under 900 px the time moves under the sentence. It draws no card header: the tab is the title.
36
+ * @words The sentence names the actor in `<strong>`, the action in the past tense and the object as a link that keeps the text's colour: "Marco Rinaldi created the Agent Acme Quotes". Day titles are "Today", "Yesterday", then the weekday; dates are the product's own ("14 October"). Nothing yet: "No events yet." and what will appear. No match: "No events match these filters.".
37
+ * @access The toolbar is named by `label`; each day's title is a level-3 heading over a list of its events; while loading, one status named by `loadingLabel` stands for the rows; each time is a `<time>` with its exact moment for assistive technology. A system event has no mark, so nothing empty is announced.
38
+ */
39
+ export function ActivityFeed({ label, days, locale, timeZone, search, filters, range, older, loadingLabel, empty, noMatch, failed, }) {
40
+ const nothingYet = !failed && days?.length === 0 && !noMatch;
41
+ const toolbar = !nothingYet && (search || filters || range) ? (_jsx(CollectionToolbar, { actions: filters || range ? (_jsxs(_Fragment, { children: [filters ? _jsx(CollectionFilters, { ...filters }) : null, range ? _jsx(DateRangeControl, { ...range }) : null] })) : undefined, label: label, search: search ? _jsx(CollectionSearch, { ...search }) : undefined, surface: "plain" })) : null;
42
+ let body;
43
+ if (failed)
44
+ body = _jsx(EmptyState, { ...failed, scope: "region" });
45
+ else if (days === undefined)
46
+ body = _jsx(LoadingRows, { label: loadingLabel });
47
+ else if (days.length === 0 && noMatch)
48
+ body = _jsx(EmptyState, { ...noMatch, kind: "noResults", scope: "region" });
49
+ else if (days.length === 0)
50
+ body = _jsx(EmptyState, { ...empty, scope: "region" });
51
+ else
52
+ body = _jsx(Days, { days: days, locale: locale, older: older, timeZone: timeZone });
53
+ return (_jsxs("div", { className: "flex min-w-0 flex-col gap-4", "data-slot": "activity-feed", children: [toolbar, body] }));
54
+ }