@alepha/ui 0.28.0 → 0.29.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. package/README.md +31 -2
  2. package/dist/components/account/account-connections.d.ts.map +1 -1
  3. package/dist/components/account/account-connections.js +4 -1
  4. package/dist/components/account/account-connections.js.map +1 -1
  5. package/dist/components/account/account-delete-dialog.d.ts.map +1 -1
  6. package/dist/components/account/account-delete-dialog.js +12 -15
  7. package/dist/components/account/account-delete-dialog.js.map +1 -1
  8. package/dist/components/account/account-keys.d.ts.map +1 -1
  9. package/dist/components/account/account-keys.js +22 -28
  10. package/dist/components/account/account-keys.js.map +1 -1
  11. package/dist/components/account/account-mfa-dialog.js +1 -4
  12. package/dist/components/account/account-mfa-dialog.js.map +1 -1
  13. package/dist/components/account/account-password-dialog.d.ts.map +1 -1
  14. package/dist/components/account/account-password-dialog.js +11 -14
  15. package/dist/components/account/account-password-dialog.js.map +1 -1
  16. package/dist/components/account/account-profile.js +3 -2
  17. package/dist/components/account/account-profile.js.map +1 -1
  18. package/dist/components/account/account-router-options.d.ts +38 -0
  19. package/dist/components/account/account-router-options.d.ts.map +1 -1
  20. package/dist/components/account/account-router-options.js.map +1 -1
  21. package/dist/components/account/account-router-page.d.ts +11 -1
  22. package/dist/components/account/account-router-page.d.ts.map +1 -1
  23. package/dist/components/account/account-router-page.js +11 -1
  24. package/dist/components/account/account-router-page.js.map +1 -1
  25. package/dist/components/account/account-router.d.ts +11 -0
  26. package/dist/components/account/account-router.d.ts.map +1 -1
  27. package/dist/components/account/account-router.js +16 -5
  28. package/dist/components/account/account-router.js.map +1 -1
  29. package/dist/components/admin/admin-audits.d.ts.map +1 -1
  30. package/dist/components/admin/admin-audits.js +91 -34
  31. package/dist/components/admin/admin-audits.js.map +1 -1
  32. package/dist/components/admin/admin-files.d.ts.map +1 -1
  33. package/dist/components/admin/admin-files.js +6 -17
  34. package/dist/components/admin/admin-files.js.map +1 -1
  35. package/dist/components/admin/admin-jobs-executions-panel.d.ts.map +1 -1
  36. package/dist/components/admin/admin-jobs-executions-panel.js +39 -8
  37. package/dist/components/admin/admin-jobs-executions-panel.js.map +1 -1
  38. package/dist/components/admin/admin-jobs-payload-dialog.d.ts +19 -0
  39. package/dist/components/admin/admin-jobs-payload-dialog.d.ts.map +1 -0
  40. package/dist/components/admin/admin-jobs-payload-dialog.js +33 -0
  41. package/dist/components/admin/admin-jobs-payload-dialog.js.map +1 -0
  42. package/dist/components/admin/admin-keys.d.ts.map +1 -1
  43. package/dist/components/admin/admin-keys.js +5 -4
  44. package/dist/components/admin/admin-keys.js.map +1 -1
  45. package/dist/components/admin/admin-notifications-channel-label.d.ts +14 -0
  46. package/dist/components/admin/admin-notifications-channel-label.d.ts.map +1 -0
  47. package/dist/components/admin/admin-notifications-channel-label.js +26 -0
  48. package/dist/components/admin/admin-notifications-channel-label.js.map +1 -0
  49. package/dist/components/admin/admin-notifications-preview-body.d.ts.map +1 -1
  50. package/dist/components/admin/admin-notifications-preview-body.js +23 -13
  51. package/dist/components/admin/admin-notifications-preview-body.js.map +1 -1
  52. package/dist/components/admin/admin-notifications.d.ts.map +1 -1
  53. package/dist/components/admin/admin-notifications.js +11 -12
  54. package/dist/components/admin/admin-notifications.js.map +1 -1
  55. package/dist/components/admin/admin-payments.d.ts.map +1 -1
  56. package/dist/components/admin/admin-payments.js +9 -7
  57. package/dist/components/admin/admin-payments.js.map +1 -1
  58. package/dist/components/admin/admin-router-options.d.ts +12 -0
  59. package/dist/components/admin/admin-router-options.d.ts.map +1 -1
  60. package/dist/components/admin/admin-router-options.js.map +1 -1
  61. package/dist/components/admin/admin-router.d.ts +5 -8
  62. package/dist/components/admin/admin-router.d.ts.map +1 -1
  63. package/dist/components/admin/admin-router.js +6 -29
  64. package/dist/components/admin/admin-router.js.map +1 -1
  65. package/dist/components/admin/admin-sessions.d.ts.map +1 -1
  66. package/dist/components/admin/admin-sessions.js +9 -7
  67. package/dist/components/admin/admin-sessions.js.map +1 -1
  68. package/dist/components/admin/admin-user-detail-audits-tab.d.ts.map +1 -1
  69. package/dist/components/admin/admin-user-detail-audits-tab.js +5 -4
  70. package/dist/components/admin/admin-user-detail-audits-tab.js.map +1 -1
  71. package/dist/components/admin/admin-user-detail-sessions-tab.d.ts.map +1 -1
  72. package/dist/components/admin/admin-user-detail-sessions-tab.js +7 -5
  73. package/dist/components/admin/admin-user-detail-sessions-tab.js.map +1 -1
  74. package/dist/components/admin/admin-user-detail.js +3 -2
  75. package/dist/components/admin/admin-user-detail.js.map +1 -1
  76. package/dist/components/admin/admin-users-roles-picker.d.ts.map +1 -1
  77. package/dist/components/admin/admin-users-roles-picker.js.map +1 -1
  78. package/dist/components/admin/admin-users.d.ts.map +1 -1
  79. package/dist/components/admin/admin-users.js +6 -4
  80. package/dist/components/admin/admin-users.js.map +1 -1
  81. package/dist/components/admin/analytics/AnalyticsChartBars.js +2 -1
  82. package/dist/components/admin/analytics/AnalyticsChartBars.js.map +1 -1
  83. package/dist/components/admin/parameter-history-item.d.ts.map +1 -1
  84. package/dist/components/admin/parameter-history-item.js +3 -2
  85. package/dist/components/admin/parameter-history-item.js.map +1 -1
  86. package/dist/components/alepha-table/alepha-table-bulk-menu.js +2 -1
  87. package/dist/components/alepha-table/alepha-table-bulk-menu.js.map +1 -1
  88. package/dist/components/alepha-table/alepha-table-filter-dialog.d.ts +60 -0
  89. package/dist/components/alepha-table/alepha-table-filter-dialog.d.ts.map +1 -0
  90. package/dist/components/alepha-table/alepha-table-filter-dialog.js +88 -0
  91. package/dist/components/alepha-table/alepha-table-filter-dialog.js.map +1 -0
  92. package/dist/components/alepha-table/alepha-table-filter-menu.d.ts +35 -0
  93. package/dist/components/alepha-table/alepha-table-filter-menu.d.ts.map +1 -0
  94. package/dist/components/alepha-table/alepha-table-filter-menu.js +54 -0
  95. package/dist/components/alepha-table/alepha-table-filter-menu.js.map +1 -0
  96. package/dist/components/alepha-table/alepha-table.d.ts +188 -3
  97. package/dist/components/alepha-table/alepha-table.d.ts.map +1 -1
  98. package/dist/components/alepha-table/alepha-table.js +551 -162
  99. package/dist/components/alepha-table/alepha-table.js.map +1 -1
  100. package/dist/components/alepha-table/query-filters.d.ts +73 -0
  101. package/dist/components/alepha-table/query-filters.d.ts.map +1 -0
  102. package/dist/components/alepha-table/query-filters.js +118 -0
  103. package/dist/components/alepha-table/query-filters.js.map +1 -0
  104. package/dist/components/app-actions/app-actions.d.ts +21 -0
  105. package/dist/components/app-actions/app-actions.d.ts.map +1 -1
  106. package/dist/components/app-actions/app-actions.js +11 -5
  107. package/dist/components/app-actions/app-actions.js.map +1 -1
  108. package/dist/components/app-shell/app-shell.d.ts +45 -0
  109. package/dist/components/app-shell/app-shell.d.ts.map +1 -1
  110. package/dist/components/app-shell/app-shell.js +119 -16
  111. package/dist/components/app-shell/app-shell.js.map +1 -1
  112. package/dist/components/auth/auth-register.js +31 -30
  113. package/dist/components/auth/auth-register.js.map +1 -1
  114. package/dist/components/auto-form/auto-form.d.ts.map +1 -1
  115. package/dist/components/auto-form/auto-form.js +68 -30
  116. package/dist/components/auto-form/auto-form.js.map +1 -1
  117. package/dist/components/button-dark/button-dark.d.ts.map +1 -1
  118. package/dist/components/button-dark/button-dark.js +39 -8
  119. package/dist/components/button-dark/button-dark.js.map +1 -1
  120. package/dist/components/button-inbox/button-inbox.d.ts +66 -0
  121. package/dist/components/button-inbox/button-inbox.d.ts.map +1 -0
  122. package/dist/components/button-inbox/button-inbox.js +167 -0
  123. package/dist/components/button-inbox/button-inbox.js.map +1 -0
  124. package/dist/components/button-inbox/inbox-unread-atom.d.ts +22 -0
  125. package/dist/components/button-inbox/inbox-unread-atom.d.ts.map +1 -0
  126. package/dist/components/button-inbox/inbox-unread-atom.js +29 -0
  127. package/dist/components/button-inbox/inbox-unread-atom.js.map +1 -0
  128. package/dist/components/button-theme/button-theme.d.ts +4 -3
  129. package/dist/components/button-theme/button-theme.d.ts.map +1 -1
  130. package/dist/components/button-theme/button-theme.js +8 -25
  131. package/dist/components/button-theme/button-theme.js.map +1 -1
  132. package/dist/components/button-user/button-user.d.ts +19 -0
  133. package/dist/components/button-user/button-user.d.ts.map +1 -1
  134. package/dist/components/button-user/button-user.js +1 -1
  135. package/dist/components/button-user/button-user.js.map +1 -1
  136. package/dist/components/control/control.d.ts +51 -0
  137. package/dist/components/control/control.d.ts.map +1 -1
  138. package/dist/components/control/control.js +49 -5
  139. package/dist/components/control/control.js.map +1 -1
  140. package/dist/components/control-array/control-array.js +2 -1
  141. package/dist/components/control-array/control-array.js.map +1 -1
  142. package/dist/components/control-date/control-date.d.ts +27 -0
  143. package/dist/components/control-date/control-date.d.ts.map +1 -1
  144. package/dist/components/control-date/control-date.js +15 -19
  145. package/dist/components/control-date/control-date.js.map +1 -1
  146. package/dist/components/control-date/date-only.d.ts +18 -0
  147. package/dist/components/control-date/date-only.d.ts.map +1 -0
  148. package/dist/components/control-date/date-only.js +29 -0
  149. package/dist/components/control-date/date-only.js.map +1 -0
  150. package/dist/components/control-date-range/control-date-range.d.ts +56 -0
  151. package/dist/components/control-date-range/control-date-range.d.ts.map +1 -0
  152. package/dist/components/control-date-range/control-date-range.js +148 -0
  153. package/dist/components/control-date-range/control-date-range.js.map +1 -0
  154. package/dist/components/control-object/control-object.js +2 -1
  155. package/dist/components/control-object/control-object.js.map +1 -1
  156. package/dist/components/control-select/control-select.d.ts.map +1 -1
  157. package/dist/components/control-select/control-select.js +177 -37
  158. package/dist/components/control-select/control-select.js.map +1 -1
  159. package/dist/components/control-upload/control-upload.d.ts.map +1 -1
  160. package/dist/components/control-upload/control-upload.js +1 -11
  161. package/dist/components/control-upload/control-upload.js.map +1 -1
  162. package/dist/components/detail/detail-aside.d.ts.map +1 -1
  163. package/dist/components/detail/detail-aside.js +4 -3
  164. package/dist/components/detail/detail-aside.js.map +1 -1
  165. package/dist/components/file-image/file-image.js +2 -1
  166. package/dist/components/file-image/file-image.js.map +1 -1
  167. package/dist/components/markdown-view/SpoilerSpan.d.ts +28 -0
  168. package/dist/components/markdown-view/SpoilerSpan.d.ts.map +1 -0
  169. package/dist/components/markdown-view/SpoilerSpan.js +53 -0
  170. package/dist/components/markdown-view/SpoilerSpan.js.map +1 -0
  171. package/dist/components/markdown-view/diagram/layoutSequence.js +13 -23
  172. package/dist/components/markdown-view/diagram/layoutSequence.js.map +1 -1
  173. package/dist/components/markdown-view/diagram/textMetrics.js +2 -2
  174. package/dist/components/markdown-view/diagram/textMetrics.js.map +1 -1
  175. package/dist/components/markdown-view/markdown-view.css +44 -0
  176. package/dist/components/markdown-view/markdown-view.d.ts +12 -0
  177. package/dist/components/markdown-view/markdown-view.d.ts.map +1 -1
  178. package/dist/components/markdown-view/markdown-view.js +22 -1
  179. package/dist/components/markdown-view/markdown-view.js.map +1 -1
  180. package/dist/components/markdown-view/remarkSpoiler.d.ts +17 -0
  181. package/dist/components/markdown-view/remarkSpoiler.d.ts.map +1 -0
  182. package/dist/components/markdown-view/remarkSpoiler.js +117 -0
  183. package/dist/components/markdown-view/remarkSpoiler.js.map +1 -0
  184. package/dist/components/permission-matrix/permission-matrix-group-rows.d.ts +34 -0
  185. package/dist/components/permission-matrix/permission-matrix-group-rows.d.ts.map +1 -0
  186. package/dist/components/permission-matrix/permission-matrix-group-rows.js +109 -0
  187. package/dist/components/permission-matrix/permission-matrix-group-rows.js.map +1 -0
  188. package/dist/components/permission-matrix/permission-matrix.d.ts +145 -0
  189. package/dist/components/permission-matrix/permission-matrix.d.ts.map +1 -0
  190. package/dist/components/permission-matrix/permission-matrix.js +113 -0
  191. package/dist/components/permission-matrix/permission-matrix.js.map +1 -0
  192. package/dist/components/plate-layout/plate-layout.d.ts +5 -0
  193. package/dist/components/plate-layout/plate-layout.d.ts.map +1 -1
  194. package/dist/components/plate-layout/plate-layout.js +2 -1
  195. package/dist/components/plate-layout/plate-layout.js.map +1 -1
  196. package/dist/components/plate-layout/plate-tab-bar.d.ts +10 -0
  197. package/dist/components/plate-layout/plate-tab-bar.d.ts.map +1 -1
  198. package/dist/components/plate-layout/plate-tab-bar.js +1 -1
  199. package/dist/components/plate-layout/plate-tab-bar.js.map +1 -1
  200. package/dist/components/settings/settings-nav.js +2 -1
  201. package/dist/components/settings/settings-nav.js.map +1 -1
  202. package/dist/components/time-ago/time-ago.d.ts +57 -0
  203. package/dist/components/time-ago/time-ago.d.ts.map +1 -0
  204. package/dist/components/time-ago/time-ago.js +60 -0
  205. package/dist/components/time-ago/time-ago.js.map +1 -0
  206. package/dist/components/tree-view/tree-model.d.ts +128 -0
  207. package/dist/components/tree-view/tree-model.d.ts.map +1 -0
  208. package/dist/components/tree-view/tree-model.js +226 -0
  209. package/dist/components/tree-view/tree-model.js.map +1 -0
  210. package/dist/components/tree-view/tree-view-rename-input.d.ts +31 -0
  211. package/dist/components/tree-view/tree-view-rename-input.d.ts.map +1 -0
  212. package/dist/components/tree-view/tree-view-rename-input.js +68 -0
  213. package/dist/components/tree-view/tree-view-rename-input.js.map +1 -0
  214. package/dist/components/tree-view/tree-view-resizer.d.ts +38 -0
  215. package/dist/components/tree-view/tree-view-resizer.d.ts.map +1 -0
  216. package/dist/components/tree-view/tree-view-resizer.js +73 -0
  217. package/dist/components/tree-view/tree-view-resizer.js.map +1 -0
  218. package/dist/components/tree-view/tree-view-row.d.ts +177 -0
  219. package/dist/components/tree-view/tree-view-row.d.ts.map +1 -0
  220. package/dist/components/tree-view/tree-view-row.js +241 -0
  221. package/dist/components/tree-view/tree-view-row.js.map +1 -0
  222. package/dist/components/tree-view/tree-view.d.ts +186 -0
  223. package/dist/components/tree-view/tree-view.d.ts.map +1 -0
  224. package/dist/components/tree-view/tree-view.js +112 -0
  225. package/dist/components/tree-view/tree-view.js.map +1 -0
  226. package/dist/components/tree-view/use-tree-state.d.ts +79 -0
  227. package/dist/components/tree-view/use-tree-state.d.ts.map +1 -0
  228. package/dist/components/tree-view/use-tree-state.js +93 -0
  229. package/dist/components/tree-view/use-tree-state.js.map +1 -0
  230. package/dist/components/ui/button.d.ts.map +1 -1
  231. package/dist/components/ui/button.js +1 -1
  232. package/dist/components/ui/button.js.map +1 -1
  233. package/dist/components/ui/dropdown-menu.js.map +1 -1
  234. package/dist/components/ui/select.d.ts +7 -0
  235. package/dist/components/ui/select.d.ts.map +1 -1
  236. package/dist/components/ui/select.js +7 -0
  237. package/dist/components/ui/select.js.map +1 -1
  238. package/dist/components/ui/sidebar.js +1 -1
  239. package/dist/components/ui/sidebar.js.map +1 -1
  240. package/dist/components/ui/table.js.map +1 -1
  241. package/dist/components/ui/tooltip.js.map +1 -1
  242. package/dist/lib/i18n-fr.d.ts.map +1 -1
  243. package/dist/lib/i18n-fr.js +31 -47
  244. package/dist/lib/i18n-fr.js.map +1 -1
  245. package/dist/lib/utils.d.ts +22 -2
  246. package/dist/lib/utils.d.ts.map +1 -1
  247. package/dist/lib/utils.js +29 -5
  248. package/dist/lib/utils.js.map +1 -1
  249. package/dist/styles.css +255 -0
  250. package/package.json +13 -14
  251. package/src/components/account/__tests__/account-router.spec.ts +95 -0
  252. package/src/components/account/account-connections.tsx +14 -1
  253. package/src/components/account/account-delete-dialog.tsx +3 -2
  254. package/src/components/account/account-keys.tsx +11 -4
  255. package/src/components/account/account-mfa-dialog.tsx +1 -1
  256. package/src/components/account/account-password-dialog.tsx +3 -2
  257. package/src/components/account/account-profile.tsx +1 -1
  258. package/src/components/account/account-router-options.tsx +45 -0
  259. package/src/components/account/account-router-page.tsx +11 -1
  260. package/src/components/account/account-router.tsx +23 -6
  261. package/src/components/admin/__tests__/admin-jobs-payload-dialog.browser.spec.tsx +68 -0
  262. package/src/components/admin/__tests__/admin-notifications-preview-body.browser.spec.tsx +20 -4
  263. package/src/components/admin/__tests__/admin-status-labels.browser.spec.tsx +0 -31
  264. package/src/components/admin/admin-audits.tsx +99 -5
  265. package/src/components/admin/admin-files.tsx +7 -16
  266. package/src/components/admin/admin-jobs-executions-panel.tsx +152 -114
  267. package/src/components/admin/admin-jobs-payload-dialog.tsx +57 -0
  268. package/src/components/admin/admin-keys.tsx +7 -4
  269. package/src/components/admin/admin-notifications-channel-label.ts +18 -0
  270. package/src/components/admin/admin-notifications-preview-body.tsx +7 -2
  271. package/src/components/admin/admin-notifications.tsx +19 -8
  272. package/src/components/admin/admin-payments.tsx +7 -4
  273. package/src/components/admin/admin-router-options.tsx +12 -0
  274. package/src/components/admin/admin-router.tsx +5 -27
  275. package/src/components/admin/admin-sessions.tsx +10 -6
  276. package/src/components/admin/admin-user-detail-audits-tab.tsx +7 -4
  277. package/src/components/admin/admin-user-detail-sessions-tab.tsx +7 -4
  278. package/src/components/admin/admin-users-roles-picker.tsx +4 -0
  279. package/src/components/admin/admin-users.tsx +6 -3
  280. package/src/components/admin/parameter-history-item.tsx +4 -2
  281. package/src/components/alepha-table/__tests__/alepha-table-default-hidden.browser.spec.tsx +108 -0
  282. package/src/components/alepha-table/__tests__/alepha-table-empty-state.browser.spec.tsx +233 -0
  283. package/src/components/alepha-table/__tests__/alepha-table-persist-facets.browser.spec.tsx +177 -0
  284. package/src/components/alepha-table/__tests__/alepha-table-persisted-filters.browser.spec.tsx +182 -0
  285. package/src/components/alepha-table/__tests__/alepha-table-query-seed.browser.spec.tsx +170 -0
  286. package/src/components/alepha-table/__tests__/alepha-table-row-action-checked.browser.spec.tsx +210 -0
  287. package/src/components/alepha-table/__tests__/alepha-table-row-action-group.browser.spec.tsx +202 -0
  288. package/src/components/alepha-table/__tests__/alepha-table-scope.browser.spec.tsx +161 -0
  289. package/src/components/alepha-table/__tests__/alepha-table-share-filters.browser.spec.tsx +309 -0
  290. package/src/components/alepha-table/__tests__/query-filters.spec.ts +212 -0
  291. package/src/components/alepha-table/alepha-table-filter-dialog.tsx +162 -0
  292. package/src/components/alepha-table/alepha-table-filter-menu.tsx +77 -0
  293. package/src/components/alepha-table/alepha-table.tsx +1113 -207
  294. package/src/components/alepha-table/query-filters.ts +159 -0
  295. package/src/components/app-actions/app-actions.tsx +32 -3
  296. package/src/components/app-shell/__tests__/sidebar-nav-accordion.browser.spec.tsx +163 -0
  297. package/src/components/app-shell/app-shell.tsx +255 -12
  298. package/src/components/auto-form/__tests__/auto-form-settings-card.browser.spec.tsx +1 -1
  299. package/src/components/auto-form/auto-form.tsx +98 -30
  300. package/src/components/button-dark/button-dark.tsx +47 -8
  301. package/src/components/button-inbox/__tests__/button-inbox.browser.spec.tsx +247 -0
  302. package/src/components/button-inbox/button-inbox.tsx +303 -0
  303. package/src/components/button-inbox/inbox-unread-atom.ts +27 -0
  304. package/src/components/button-theme/button-theme.tsx +16 -29
  305. package/src/components/button-user/__tests__/button-user-avatar.browser.spec.tsx +88 -0
  306. package/src/components/button-user/button-user.tsx +24 -1
  307. package/src/components/control/__tests__/control-date-range.browser.spec.tsx +177 -0
  308. package/src/components/control/control.tsx +119 -12
  309. package/src/components/control-date/control-date.tsx +117 -22
  310. package/src/components/control-date/date-only.ts +26 -0
  311. package/src/components/control-date-range/control-date-range.tsx +250 -0
  312. package/src/components/control-select/__tests__/control-select-clear-label.browser.spec.tsx +129 -15
  313. package/src/components/control-select/__tests__/control-select-deselect.browser.spec.tsx +27 -6
  314. package/src/components/control-select/__tests__/control-select-multi.browser.spec.tsx +204 -1
  315. package/src/components/control-select/__tests__/control-select-size-minimal.browser.spec.tsx +77 -1
  316. package/src/components/control-select/control-select.tsx +317 -83
  317. package/src/components/control-upload/control-upload.tsx +1 -10
  318. package/src/components/detail/detail-aside.tsx +30 -6
  319. package/src/components/markdown-view/SpoilerSpan.tsx +66 -0
  320. package/src/components/markdown-view/__tests__/markdown-view-spoiler.browser.spec.tsx +165 -0
  321. package/src/components/markdown-view/diagram/textMetrics.spec.ts +1 -1
  322. package/src/components/markdown-view/diagram/textMetrics.ts +2 -2
  323. package/src/components/markdown-view/markdown-view.css +44 -0
  324. package/src/components/markdown-view/markdown-view.tsx +37 -1
  325. package/src/components/markdown-view/remarkSpoiler.ts +150 -0
  326. package/src/components/permission-matrix/__tests__/permission-matrix.browser.spec.tsx +237 -0
  327. package/src/components/permission-matrix/permission-matrix-group-rows.tsx +240 -0
  328. package/src/components/permission-matrix/permission-matrix.tsx +286 -0
  329. package/src/components/plate-layout/__tests__/plate-layout.browser.spec.tsx +22 -0
  330. package/src/components/plate-layout/plate-layout.tsx +6 -0
  331. package/src/components/plate-layout/plate-tab-bar.tsx +27 -1
  332. package/src/components/time-ago/time-ago.browser.spec.tsx +110 -0
  333. package/src/components/time-ago/time-ago.tsx +80 -0
  334. package/src/components/tree-view/__tests__/tree-model.spec.ts +441 -0
  335. package/src/components/tree-view/__tests__/tree-view-drag.browser.spec.tsx +295 -0
  336. package/src/components/tree-view/__tests__/tree-view-rename.browser.spec.tsx +278 -0
  337. package/src/components/tree-view/__tests__/tree-view-resizer.browser.spec.tsx +112 -0
  338. package/src/components/tree-view/__tests__/tree-view.browser.spec.tsx +260 -0
  339. package/src/components/tree-view/__tests__/use-tree-state.browser.spec.tsx +238 -0
  340. package/src/components/tree-view/tree-model.ts +369 -0
  341. package/src/components/tree-view/tree-view-rename-input.tsx +95 -0
  342. package/src/components/tree-view/tree-view-resizer.tsx +83 -0
  343. package/src/components/tree-view/tree-view-row.tsx +414 -0
  344. package/src/components/tree-view/tree-view.tsx +300 -0
  345. package/src/components/tree-view/use-tree-state.ts +184 -0
  346. package/src/components/ui/button.tsx +79 -1
  347. package/src/components/ui/dropdown-menu.tsx +1 -1
  348. package/src/components/ui/select.tsx +7 -0
  349. package/src/components/ui/table.tsx +1 -1
  350. package/src/components/ui/tooltip.tsx +1 -1
  351. package/src/lib/i18n-fr.ts +34 -51
  352. package/src/lib/utils.ts +32 -4
  353. package/src/styles.css +255 -0
  354. package/dist/components/admin/admin-workflows-execution-sheet.d.ts +0 -11
  355. package/dist/components/admin/admin-workflows-execution-sheet.d.ts.map +0 -1
  356. package/dist/components/admin/admin-workflows-execution-sheet.js +0 -190
  357. package/dist/components/admin/admin-workflows-execution-sheet.js.map +0 -1
  358. package/dist/components/admin/admin-workflows-executions-panel.d.ts +0 -9
  359. package/dist/components/admin/admin-workflows-executions-panel.d.ts.map +0 -1
  360. package/dist/components/admin/admin-workflows-executions-panel.js +0 -121
  361. package/dist/components/admin/admin-workflows-executions-panel.js.map +0 -1
  362. package/dist/components/admin/admin-workflows-status-badge.d.ts +0 -12
  363. package/dist/components/admin/admin-workflows-status-badge.d.ts.map +0 -1
  364. package/dist/components/admin/admin-workflows-status-badge.js +0 -30
  365. package/dist/components/admin/admin-workflows-status-badge.js.map +0 -1
  366. package/dist/components/admin/admin-workflows-status-labels.d.ts +0 -19
  367. package/dist/components/admin/admin-workflows-status-labels.d.ts.map +0 -1
  368. package/dist/components/admin/admin-workflows-status-labels.js +0 -48
  369. package/dist/components/admin/admin-workflows-status-labels.js.map +0 -1
  370. package/dist/components/admin/admin-workflows.d.ts +0 -4
  371. package/dist/components/admin/admin-workflows.d.ts.map +0 -1
  372. package/dist/components/admin/admin-workflows.js +0 -145
  373. package/dist/components/admin/admin-workflows.js.map +0 -1
  374. package/src/components/admin/admin-workflows-execution-sheet.tsx +0 -285
  375. package/src/components/admin/admin-workflows-executions-panel.tsx +0 -169
  376. package/src/components/admin/admin-workflows-status-badge.tsx +0 -41
  377. package/src/components/admin/admin-workflows-status-labels.ts +0 -51
  378. package/src/components/admin/admin-workflows.tsx +0 -209
package/dist/styles.css CHANGED
@@ -70,7 +70,44 @@
70
70
  --destructive-foreground: oklch(0.985 0 0);
71
71
  --border: oklch(0.922 0 0);
72
72
  --input: oklch(0.922 0 0);
73
+ /*
74
+ * The border a field takes on hover.
75
+ *
76
+ * Defined ONCE, and only here, because it is relative: the field's own
77
+ * border pulled 20% toward the text colour. `--foreground` is near-black in
78
+ * light and near-white in dark, so the same expression darkens the border in
79
+ * one mode and lightens it in the other, with no `.dark` counterpart to keep
80
+ * in step. It also follows every theme in `apps/ui`'s palette switcher for
81
+ * free, keeping each one's hue instead of washing toward neutral grey the
82
+ * way a mix with plain black or white would.
83
+ *
84
+ * `oklab` rather than sRGB so the step is perceptually even across a light
85
+ * grey border and a dark tinted one. Where `--input` is translucent (dark
86
+ * mode ships `oklch(1 0 0 / 15%)`) the mix raises the alpha too, which is
87
+ * the same direction: a hovered field reads as more present, not less.
88
+ */
89
+ --input-hover: color-mix(in oklab, var(--input), var(--foreground) 20%);
73
90
  --ring: oklch(0.708 0 0);
91
+ /*
92
+ * The bevel: a 1px inset line laid along the TOP edge of a chrome surface,
93
+ * immediately under the `--border` that already closes that edge. The pair
94
+ * is the whole illusion: two adjacent lines of OPPOSITE polarity read as a
95
+ * fold, so the surface looks raised out of the page instead of painted onto
96
+ * it. One line alone is just a divider.
97
+ *
98
+ * Which polarity is the bevel's is decided by the border, and the border
99
+ * changes sides between the modes. In light, `--border` is DARKER than the
100
+ * surface it edges, so the bevel is the highlight: pure white, because these
101
+ * surfaces are `bg-muted`, already within a few percent of the page, and
102
+ * nothing short of actual white separates them.
103
+ *
104
+ * In dark the border is LIGHTER than its surface (`oklch(1 0 0 / 10%)` over
105
+ * a near-black card), so it is already the highlight and the bevel has to be
106
+ * the shadow under it. A white line there does not make a fold, it makes the
107
+ * border look 2px thick and desaturated, which is what a neutral white wash
108
+ * does to a tinted theme.
109
+ */
110
+ --bevel: oklch(1 0 0);
74
111
  --chart-1: oklch(0.646 0.222 41.116);
75
112
  --chart-2: oklch(0.6 0.118 184.704);
76
113
  --chart-3: oklch(0.398 0.07 227.392);
@@ -106,6 +143,7 @@
106
143
  --border: oklch(1 0 0 / 10%);
107
144
  --input: oklch(1 0 0 / 15%);
108
145
  --ring: oklch(0.556 0 0);
146
+ --bevel: oklch(0 0 0 / 30%);
109
147
  --chart-1: oklch(0.488 0.243 264.376);
110
148
  --chart-2: oklch(0.696 0.17 162.48);
111
149
  --chart-3: oklch(0.769 0.188 70.08);
@@ -129,6 +167,58 @@
129
167
  body {
130
168
  @apply bg-background text-foreground;
131
169
  }
170
+
171
+ /*
172
+ * The pointer cursor on anything clickable.
173
+ *
174
+ * Tailwind v3's Preflight carried `button, [role="button"] { cursor: pointer }`
175
+ * and v4 dropped it, deliberately, to match the browser default. The browser
176
+ * default is defensible and the result is not: `<a href>` still gets a
177
+ * pointer from the UA stylesheet, `<button>` gets `default`, and Base UI's
178
+ * span-based switches and checkboxes get `auto`. So a page ends up telling
179
+ * the reader that half its controls are clickable and the other half are
180
+ * text, with the split falling on an implementation detail they cannot see.
181
+ * Measured on the Table showcase before this rule: 37 controls, 8 pointers.
182
+ *
183
+ * Here rather than on the components: `yarn w @alepha/ui sync` overwrites
184
+ * every `src/components/ui/*.tsx` wholesale, so a per-component `cursor-pointer`
185
+ * survives only as a `LOCAL_PATCHES` entry, one per primitive, forever. The
186
+ * fifteen hand-written `cursor-pointer` classes already scattered through the
187
+ * repo are what that approach looks like halfway through.
188
+ *
189
+ * Roles as well as tags, because Base UI renders several controls as a
190
+ * `<span>` carrying the role. Disabled is excluded three ways: `:disabled`
191
+ * for native controls, and the two attributes Base UI sets on the ones that
192
+ * are not - a control that refuses the click should not invite it.
193
+ */
194
+ :is(
195
+ button,
196
+ summary,
197
+ [role="button"],
198
+ [role="checkbox"],
199
+ [role="radio"],
200
+ [role="switch"],
201
+ [role="tab"],
202
+ [role="option"],
203
+ [role="menuitem"],
204
+ [role="menuitemcheckbox"],
205
+ [role="menuitemradio"],
206
+ [role="combobox"],
207
+ input[type="checkbox"],
208
+ input[type="radio"]
209
+ ):not(
210
+ :disabled,
211
+ [aria-disabled="true"],
212
+ [data-disabled],
213
+ /* A Combobox carries `role="combobox"` on TWO elements: the trigger
214
+ button, and the typeahead input inside the popup. The input wants a
215
+ caret, not a hand. Text entry is excluded by shape rather than by
216
+ listing the types, so a future `[role]` on an input cannot reopen it. */
217
+ input:not([type="checkbox"], [type="radio"]),
218
+ textarea
219
+ ) {
220
+ cursor: pointer;
221
+ }
132
222
  }
133
223
 
134
224
  /* ────────────────────────────────────────────────────────────────────────
@@ -276,3 +366,168 @@
276
366
  border-radius: 9999px;
277
367
  background-color: var(--sidebar-primary);
278
368
  }
369
+
370
+ /* ────────────────────────────────────────────────────────────────────────
371
+ * A sidebar entry sinks on press the way a Button does (feedback #P2181).
372
+ *
373
+ * `Button` nudges down one pixel with
374
+ * `not-disabled:active:not-aria-[haspopup]:translate-y-px` under
375
+ * `transition-all`; this is the same nudge, with the same exclusions, on
376
+ * `SidebarMenuButton`. Here rather than in `sidebar.tsx` for the reason the
377
+ * active bar above is: `yarn w @alepha/ui sync` overwrites that file.
378
+ *
379
+ * - `aria-haspopup` is excluded as Button excludes it: a trigger that sinks
380
+ * reads as a button that did something rather than one that opened. Lore's
381
+ * project switcher renders through `SidebarMenuButton` as a menu trigger,
382
+ * and Base UI gives it the trigger's `data-slot`, so this rule does not
383
+ * match it today; the exclusion keeps it that way if that ever changes.
384
+ * - Disabled and `aria-disabled` entries do not move.
385
+ * - `translate` joins the button's own `width, height, padding` transition
386
+ * rather than replacing it, so the collapse animation is untouched, and it
387
+ * keeps the utility's duration and easing - Tailwind's defaults, the ones
388
+ * Button's `transition-all` runs on. Without it the nudge would snap.
389
+ * - The x half reads `--tw-translate-x`, so a translate utility anybody puts
390
+ * on an entry survives the press.
391
+ *
392
+ * Sub-buttons are left alone: they already carry `-translate-x-px`, and the
393
+ * report was about the entries themselves.
394
+ * ──────────────────────────────────────────────────────────────────────── */
395
+
396
+ [data-slot="sidebar-menu-button"] {
397
+ transition-property: width, height, padding, translate;
398
+ }
399
+
400
+ [data-slot="sidebar-menu-button"]:active:not(
401
+ :disabled,
402
+ [aria-disabled="true"],
403
+ [data-disabled],
404
+ [aria-haspopup]
405
+ ) {
406
+ translate: var(--tw-translate-x, 0) 1px;
407
+ }
408
+
409
+ /* ────────────────────────────────────────────────────────────────────────
410
+ * Menu and list items, which are the OTHER half of the cursor problem.
411
+ *
412
+ * The rule in `@layer base` above cannot reach these. shadcn ships
413
+ * `cursor-default` as an explicit utility on every menu item, select item,
414
+ * combobox item, command item and context-menu item, and a utility outranks
415
+ * anything in the base layer, so those items stayed on `default` while the
416
+ * buttons beside them turned into pointers. That is the same split the rule
417
+ * was written to close, moved one layer down.
418
+ *
419
+ * Unlayered on purpose: unlayered CSS beats every `@layer`, including
420
+ * Tailwind's `utilities`, which is what the sidebar rules below already rely
421
+ * on. Targeted by ROLE rather than by `data-slot` so it covers the checkbox
422
+ * and radio variants of a menu item without naming five primitives, each of
423
+ * which `yarn w @alepha/ui sync` would happily rename.
424
+ *
425
+ * This is a deliberate departure from shadcn, whose `cursor-default` copies
426
+ * the macOS convention that native menus do not show a hand. The convention
427
+ * is real, and it belongs to the menu bar - not to a popover inside a web
428
+ * page, where a row of text with no pointer reads as inert. Leaving these
429
+ * alone would have fixed half the inconsistency and kept the other half.
430
+ *
431
+ * Disabled items are excluded, and they also carry `pointer-events-none`
432
+ * already, so the guard is belt and braces.
433
+ * ──────────────────────────────────────────────────────────────────────── */
434
+
435
+ :is(
436
+ [role="option"],
437
+ [role="menuitem"],
438
+ [role="menuitemcheckbox"],
439
+ [role="menuitemradio"]
440
+ ):not([data-disabled], [aria-disabled="true"], [data-disabled="true"]) {
441
+ cursor: pointer;
442
+ }
443
+
444
+ /* ────────────────────────────────────────────────────────────────────────
445
+ * The hover border on a field.
446
+ *
447
+ * Every bordered surface a `Control` can render, addressed by `data-slot`
448
+ * rather than patched into each primitive: `yarn w @alepha/ui sync` overwrites
449
+ * `src/components/ui/*.tsx` wholesale, so a class added there survives only as
450
+ * a `LOCAL_PATCHES` entry per primitive. Same reasoning as the cursor rules
451
+ * above.
452
+ *
453
+ * Unlayered, because `border-input` is a utility and `@layer base` loses to
454
+ * it. All six slots carry `transition-colors` already, so the change eases in
455
+ * and out on its own; `combobox-trigger` gets both the border and the
456
+ * transition from `control-select`, which is the one that is not obvious.
457
+ *
458
+ * SPLIT IN TWO, because the primitives disagree about which pseudo-class earns
459
+ * the focus border, and this rule outranks all of them. Whatever is excluded
460
+ * here has to match what actually paints `border-ring`, exactly: exclude too
461
+ * little and the hover paints over a focus ring, exclude too much and the
462
+ * field stops responding to the mouse.
463
+ *
464
+ * The second failure is the one that happened. Excluding `:focus-within` as a
465
+ * safe superset looked harmless and was not: Base UI returns focus to the
466
+ * trigger after a selection, so choosing a value left the field `:focus` -
467
+ * measured `:focus` true, `:focus-visible` FALSE, `:active` false - and the
468
+ * hover border silently stopped working for the rest of the visit. Nothing was
469
+ * painting `border-ring` in that state either, since it keys on
470
+ * `:focus-visible`, so the exclusion was protecting nothing at all.
471
+ *
472
+ * Hence: `:focus-visible` for the five slots whose focus border keys on it,
473
+ * and `:focus-within` only for `combobox-chips`, which really does use
474
+ * `focus-within:border-ring`. `input-group` keys on a `:has()` of the first,
475
+ * so it needs the `:has(:focus-visible)` spelling.
476
+ *
477
+ * Invalid and disabled are excluded in both the direct and the `:has()` form,
478
+ * because half these slots are wrappers carrying the state on a descendant.
479
+ * ──────────────────────────────────────────────────────────────────────── */
480
+
481
+ :is(
482
+ [data-slot="input"],
483
+ [data-slot="textarea"],
484
+ [data-slot="select-trigger"],
485
+ [data-slot="input-group"],
486
+ [data-slot="combobox-trigger"],
487
+ [data-slot="date-trigger"]
488
+ ):hover:not(
489
+ :disabled,
490
+ :focus-visible,
491
+ :has(:focus-visible),
492
+ [aria-invalid="true"],
493
+ [data-disabled],
494
+ :has(:disabled),
495
+ :has([aria-invalid="true"])
496
+ ) {
497
+ border-color: var(--input-hover);
498
+ }
499
+
500
+ /* The one that genuinely takes `focus-within:border-ring`. */
501
+ [data-slot="combobox-chips"]:hover:not(
502
+ :focus-within,
503
+ [aria-invalid="true"],
504
+ [data-disabled],
505
+ :has(:disabled),
506
+ :has([aria-invalid="true"])
507
+ ) {
508
+ border-color: var(--input-hover);
509
+ }
510
+
511
+ /*
512
+ * The checkbox takes the same hover border, on its UNCHECKED state only.
513
+ *
514
+ * Checked, the box is filled `--primary` and carries a `--primary` border to
515
+ * match, so mixing `--foreground` into that would either vanish - in dark,
516
+ * where `--primary` is already near-white - or lay a dark smudge along the
517
+ * edge of a filled box in light. The border is the affordance only while the
518
+ * box is empty, which is exactly the state the other slots are always in.
519
+ *
520
+ * Base UI renders a native `disabled` here AND mirrors it as `[data-disabled]`,
521
+ * so both spellings are excluded, the way the shared rule above does it. There
522
+ * is no `:has()` form to match: this slot is the control itself rather than a
523
+ * wrapper carrying its state on a descendant.
524
+ */
525
+ [data-slot="checkbox"]:hover:not(
526
+ :disabled,
527
+ :focus-visible,
528
+ [data-checked],
529
+ [data-disabled],
530
+ [aria-invalid="true"]
531
+ ) {
532
+ border-color: var(--input-hover);
533
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alepha/ui",
3
- "version": "0.28.0",
3
+ "version": "0.29.0",
4
4
  "description": "Shared shadcn Base UI Nova components for Alepha apps. Edited directly; bugfixes propagate via normal dep updates.",
5
5
  "keywords": [
6
6
  "alepha",
@@ -57,49 +57,48 @@
57
57
  }
58
58
  },
59
59
  "scripts": {
60
- "build": "tsdown && tsc -p tsconfig.build.json && node scripts/copy-css.mjs",
61
- "sync": "node scripts/sync.mjs",
62
- "sync:check": "node scripts/sync.mjs --check",
60
+ "build": "tsdown && tsc -p tsconfig.build.json && node scripts/copy-css.ts",
61
+ "sync": "node scripts/sync.ts",
62
+ "sync:check": "node scripts/sync.ts --check",
63
63
  "test": "alepha test",
64
64
  "typecheck": "tsc --noEmit"
65
65
  },
66
66
  "dependencies": {
67
- "@base-ui/react": "^1.7.0",
67
+ "@base-ui/react": "^1.8.0",
68
68
  "@fontsource-variable/inter": "^5.3.0",
69
69
  "@fontsource-variable/jetbrains-mono": "^5.3.0",
70
70
  "class-variance-authority": "^0.7.1",
71
- "clsx": "^2.1.1",
72
71
  "cmdk": "^1.1.1",
72
+ "cn": "^0.2.6",
73
73
  "date-fns": "^4.4.0",
74
74
  "graphre": "^0.1.3",
75
75
  "highlight.js": "^11.12.0",
76
76
  "input-otp": "^1.5.0",
77
- "lucide-react": "^1.38.0",
77
+ "lucide-react": "^1.43.0",
78
78
  "react-day-picker": "^10.0.1",
79
79
  "react-is": "^19.2.8",
80
80
  "react-markdown": "^10.1.0",
81
- "react-resizable-panels": "^4.12.3",
81
+ "react-resizable-panels": "^4.12.4",
82
82
  "recharts": "3.10.1",
83
83
  "rehype-highlight": "^7.0.2",
84
84
  "remark-gfm": "^4.0.1",
85
- "shadcn": "^4.19.1",
85
+ "shadcn": "^4.21.0",
86
86
  "sonner": "^2.0.8",
87
- "tailwind-merge": "^3.6.0",
88
87
  "tw-animate-css": "^1.4.0"
89
88
  },
90
89
  "devDependencies": {
91
- "@playwright/test": "^1.62.1",
90
+ "@playwright/test": "^1.63.0",
92
91
  "@testing-library/dom": "^10.4.1",
93
92
  "@testing-library/react": "^16.3.3",
94
93
  "@types/react": "^19.2.18",
95
- "alepha": "0.28.0",
94
+ "alepha": "0.29.0",
96
95
  "react": "^19.2.8",
97
96
  "react-dom": "^19.2.8",
98
- "tsdown": "^0.22.14",
97
+ "tsdown": "^0.23.0",
99
98
  "typescript": "^7.0.2"
100
99
  },
101
100
  "peerDependencies": {
102
- "alepha": "^0.28.0",
101
+ "alepha": "^0.29.0",
103
102
  "react": "*",
104
103
  "react-dom": "*",
105
104
  "recharts": "^3",
@@ -8,6 +8,7 @@ import { describe, expect, it } from "vitest";
8
8
 
9
9
  import { AdminRouter } from "../../admin/admin-router.tsx";
10
10
  import type { NavMeta } from "../../nav-shell/nav-tree-util.ts";
11
+ import { accountRouterOptionsAtom } from "../account-router-options.tsx";
11
12
  import { $pageAccount } from "../account-router-page.tsx";
12
13
  import { AccountRouter } from "../account-router.tsx";
13
14
 
@@ -128,6 +129,100 @@ describe("AccountRouter", () => {
128
129
  expect(router.keys.options.can!({ has: () => true })).toBe(false);
129
130
  });
130
131
 
132
+ /**
133
+ * `hide`, for the page `can` cannot answer for.
134
+ *
135
+ * The test above names the gap in passing: `MyConnectionController` lives
136
+ * in `api/users`, so `listMyConnections` ships with `$realm` and the
137
+ * Connected apps page is offered by every application ever built on this
138
+ * router - including a public service with no OAuth client in the world,
139
+ * over a list that is empty by construction.
140
+ *
141
+ * ⚠️ These assert on `can`, which is what the rail is built from, and that
142
+ * is the whole of what hiding does. `can` is a UI-affordance predicate and
143
+ * NOT a route guard - `ReactBrowserRouterProvider` says so and
144
+ * deliberately does not block routing on it - so a hidden page is still
145
+ * reachable by typing its URL. That is not a hole this option opens: it is
146
+ * exactly what a page whose action is missing already does, which is the
147
+ * parity the option was asked for.
148
+ */
149
+ describe("hide", () => {
150
+ const mountWith = async (hide?: string[]) => {
151
+ const alepha = Alepha.create().with(AlephaReactRouter);
152
+ if (hide) {
153
+ alepha.store.set(accountRouterOptionsAtom, { hide } as never);
154
+ }
155
+ const router = alepha.inject(AccountRouter);
156
+ await alepha.start();
157
+ // Every action mounted, so nothing else can be what turns a page off.
158
+ alepha.store.set("alepha.server.request.apiLinks", {
159
+ actions: {
160
+ getMyProfile: { path: "/users/me" },
161
+ listMyIdentities: { path: "/users/me/identities" },
162
+ listMySessions: { path: "/users/me/sessions" },
163
+ listApiKeys: { path: "/api-keys" },
164
+ listMyConnections: { path: "/users/me/connections" },
165
+ },
166
+ });
167
+ return router;
168
+ };
169
+
170
+ it("drops a named page from the rail while every action is mounted", async () => {
171
+ const router = await mountWith(["connections"]);
172
+
173
+ expect(router.connections.options.can!({ has: () => true })).toBe(false);
174
+ });
175
+
176
+ it("leaves every page it does not name alone", async () => {
177
+ const router = await mountWith(["connections"]);
178
+
179
+ expect(router.profile.options.can!({ has: () => true })).toBe(true);
180
+ expect(router.security.options.can!({ has: () => true })).toBe(true);
181
+ expect(router.sessions.options.can!({ has: () => true })).toBe(true);
182
+ expect(router.keys.options.can!({ has: () => true })).toBe(true);
183
+ });
184
+
185
+ it("changes nothing when it is unset", async () => {
186
+ // Backwards compatible by construction: every application written
187
+ // before this option keeps all five pages.
188
+ const router = await mountWith();
189
+
190
+ for (const page of [
191
+ router.profile,
192
+ router.security,
193
+ router.sessions,
194
+ router.keys,
195
+ router.connections,
196
+ ]) {
197
+ expect(page.options.can!({ has: () => true })).toBe(true);
198
+ }
199
+ });
200
+
201
+ it("takes several pages, and is ANDed rather than replacing the action gate", async () => {
202
+ const alepha = Alepha.create().with(AlephaReactRouter);
203
+ alepha.store.set(accountRouterOptionsAtom, {
204
+ hide: ["connections", "sessions"],
205
+ } as never);
206
+ const router = alepha.inject(AccountRouter);
207
+ await alepha.start();
208
+ // Keys is absent from the registry AND unnamed by `hide`: the two
209
+ // gates answer independently, and either one is enough.
210
+ alepha.store.set("alepha.server.request.apiLinks", {
211
+ actions: {
212
+ getMyProfile: { path: "/users/me" },
213
+ listMyIdentities: { path: "/users/me/identities" },
214
+ listMySessions: { path: "/users/me/sessions" },
215
+ listMyConnections: { path: "/users/me/connections" },
216
+ },
217
+ });
218
+
219
+ expect(router.connections.options.can!({ has: () => true })).toBe(false);
220
+ expect(router.sessions.options.can!({ has: () => true })).toBe(false);
221
+ expect(router.keys.options.can!({ has: () => true })).toBe(false);
222
+ expect(router.profile.options.can!({ has: () => true })).toBe(true);
223
+ });
224
+ });
225
+
131
226
  /**
132
227
  * Same rule as `AdminRouter`: a class field is evaluated once, outside
133
228
  * React, so the rail follows a language switch only through the key. See
@@ -128,7 +128,20 @@ const AccountConnections = (props: AccountConnectionsProps) => {
128
128
  })
129
129
  : tr("account.connections.neverUsed", {
130
130
  default: " · never used",
131
- }))
131
+ })) +
132
+ /*
133
+ ⚠️ Said out loud, not hidden. Since the list groups by client
134
+ one row can stand for several authorizations, and a reader
135
+ deciding whether to disconnect should know how many go with
136
+ it. Omitted at one, which is every ordinary case - "1 session"
137
+ on every row would be noise.
138
+ */
139
+ (connection.sessionCount > 1
140
+ ? tr("account.connections.sessionCount", {
141
+ default: " · $1 sessions",
142
+ args: [String(connection.sessionCount)],
143
+ })
144
+ : "")
132
145
  }
133
146
  >
134
147
  <Button variant="ghost" size="sm" onClick={() => revoke(connection)}>
@@ -3,6 +3,7 @@ import { Button } from "@alepha/ui/components/ui/button";
3
3
  import {
4
4
  Dialog,
5
5
  DialogContent,
6
+ DialogFooter,
6
7
  DialogHeader,
7
8
  DialogTitle,
8
9
  } from "@alepha/ui/components/ui/dialog";
@@ -180,7 +181,7 @@ export const AccountDeleteDialog = (props: AccountDeleteDialogProps) => {
180
181
  />
181
182
  </div>
182
183
 
183
- <div className="flex justify-end gap-2">
184
+ <DialogFooter>
184
185
  <Button type="button" variant="ghost" onClick={close}>
185
186
  {tr("account.delete.cancel", { default: "Cancel" })}
186
187
  </Button>
@@ -191,7 +192,7 @@ export const AccountDeleteDialog = (props: AccountDeleteDialogProps) => {
191
192
  >
192
193
  {tr("account.delete.submit", { default: "Delete account" })}
193
194
  </Button>
194
- </div>
195
+ </DialogFooter>
195
196
  </form>
196
197
  </DialogContent>
197
198
  </Dialog>
@@ -4,6 +4,7 @@ import { Button } from "@alepha/ui/components/ui/button";
4
4
  import {
5
5
  Dialog,
6
6
  DialogContent,
7
+ DialogFooter,
7
8
  DialogHeader,
8
9
  DialogTitle,
9
10
  } from "@alepha/ui/components/ui/dialog";
@@ -192,7 +193,13 @@ const AccountKeys = (props: AccountKeysProps) => {
192
193
  required
193
194
  />
194
195
  </div>
195
- <div className="flex justify-end gap-2">
196
+ {/* `DialogFooter`, not a hand-rolled row: the border-top, the
197
+ tinted band and the rounded bottom live there, and they are
198
+ what every imperative dialog (`useDialog`'s confirm and
199
+ prompt) already looks like. These floated their buttons on
200
+ the body surface instead (feedback #P2143 asked for it
201
+ generically, from Lore's estate dialog). */}
202
+ <DialogFooter>
196
203
  <Button
197
204
  type="button"
198
205
  variant="ghost"
@@ -203,7 +210,7 @@ const AccountKeys = (props: AccountKeysProps) => {
203
210
  <Button type="submit" disabled={creating}>
204
211
  {tr("account.keys.submit", { default: "Create" })}
205
212
  </Button>
206
- </div>
213
+ </DialogFooter>
207
214
  </form>
208
215
  </DialogContent>
209
216
  </Dialog>
@@ -235,7 +242,7 @@ const AccountKeys = (props: AccountKeysProps) => {
235
242
  <code className="bg-muted rounded-md border p-3 font-mono text-xs break-all">
236
243
  {freshToken}
237
244
  </code>
238
- <div className="flex justify-end gap-2">
245
+ <DialogFooter>
239
246
  <Button variant="secondary" onClick={copy}>
240
247
  {copied ? (
241
248
  <Check className="size-4" />
@@ -254,7 +261,7 @@ const AccountKeys = (props: AccountKeysProps) => {
254
261
  >
255
262
  {tr("account.keys.done", { default: "Done" })}
256
263
  </Button>
257
- </div>
264
+ </DialogFooter>
258
265
  </div>
259
266
  </DialogContent>
260
267
  </Dialog>
@@ -182,7 +182,7 @@ export const AccountMfaDialog = (props: AccountMfaDialogProps) => {
182
182
  />
183
183
 
184
184
  <details className="text-muted-foreground text-center text-xs">
185
- <summary className="cursor-pointer">
185
+ <summary>
186
186
  {tr("account.mfa.cannotScan", {
187
187
  default: "Cannot scan the code?",
188
188
  })}
@@ -3,6 +3,7 @@ import { Button } from "@alepha/ui/components/ui/button";
3
3
  import {
4
4
  Dialog,
5
5
  DialogContent,
6
+ DialogFooter,
6
7
  DialogHeader,
7
8
  DialogTitle,
8
9
  } from "@alepha/ui/components/ui/dialog";
@@ -167,14 +168,14 @@ export const AccountPasswordDialog = (props: AccountPasswordDialogProps) => {
167
168
  autoComplete="new-password"
168
169
  required
169
170
  />
170
- <div className="flex justify-end gap-2">
171
+ <DialogFooter>
171
172
  <Button type="button" variant="ghost" onClick={close}>
172
173
  {tr("account.password.cancel", { default: "Cancel" })}
173
174
  </Button>
174
175
  <Button type="submit" disabled={submitting}>
175
176
  {title}
176
177
  </Button>
177
- </div>
178
+ </DialogFooter>
178
179
  </form>
179
180
  </DialogContent>
180
181
  </Dialog>
@@ -235,7 +235,7 @@ const AccountProfile = (props: AccountProfileProps) => {
235
235
  aria-label={tr("account.profile.avatarChange", {
236
236
  default: "Change avatar",
237
237
  })}
238
- className="relative size-14 shrink-0 cursor-pointer"
238
+ className="relative size-14 shrink-0"
239
239
  >
240
240
  {/* Only the image is clipped to a circle; the camera badge sits
241
241
  outside the wrapper so the round mask cannot crop it. */}
@@ -69,8 +69,53 @@ export interface AccountRouterOptions {
69
69
  keys?: AccountKeysProps;
70
70
  connections?: AccountConnectionsProps;
71
71
  };
72
+
73
+ /**
74
+ * Pages this application does not offer at all.
75
+ *
76
+ * Each page is already gated on whether the action behind it is mounted,
77
+ * and that answers most of the question: the API-keys page really does
78
+ * disappear for an application that never mounts `AlephaApiKeys`.
79
+ *
80
+ * ⚠️ **It cannot answer a page whose action is always mounted.**
81
+ * `MyConnectionController` ships with `$realm` and is `$secure()` with no
82
+ * permission, so `listMyConnections` exists in every application ever
83
+ * built on this router - and "Connected apps" was therefore offered to
84
+ * citizens of a public service that has no OAuth client in the world, over
85
+ * a list that is empty by construction. Whether the API exists is the
86
+ * registry's question; whether the application offers it is the
87
+ * application's, and only the application can answer the second.
88
+ *
89
+ * ANDed with the existing gate, never instead of it. A hidden page is
90
+ * absent from the rail and refused on direct entry, exactly as one whose
91
+ * action is missing already is.
92
+ *
93
+ * ⚠️ A list of exceptions rather than an allowlist, and that is the
94
+ * difference from the `pages: [...]` this router's own doc block rules
95
+ * out: an allowlist has to be kept complete, so a page added here would
96
+ * vanish from every application that had already written one down. Unset
97
+ * changes nothing, and a new page is offered by default.
98
+ *
99
+ * ```ts
100
+ * alepha.set(accountRouterOptionsAtom, { hide: ["connections"] });
101
+ * ```
102
+ */
103
+ hide?: AccountPage[];
72
104
  }
73
105
 
106
+ /**
107
+ * The pages `AccountRouter` mounts, by the field that declares each one.
108
+ *
109
+ * Named rather than inlined so {@link AccountRouterOptions.hide} and the
110
+ * router's own helper cannot drift apart on a rename.
111
+ */
112
+ export type AccountPage =
113
+ | "profile"
114
+ | "security"
115
+ | "sessions"
116
+ | "keys"
117
+ | "connections";
118
+
74
119
  /**
75
120
  * Boot-time configuration for `AccountRouter`, following the
76
121
  * `adminRouterOptionsAtom` pattern: the application calls