@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.
- package/README.md +31 -2
- package/dist/components/account/account-connections.d.ts.map +1 -1
- package/dist/components/account/account-connections.js +4 -1
- package/dist/components/account/account-connections.js.map +1 -1
- package/dist/components/account/account-delete-dialog.d.ts.map +1 -1
- package/dist/components/account/account-delete-dialog.js +12 -15
- package/dist/components/account/account-delete-dialog.js.map +1 -1
- package/dist/components/account/account-keys.d.ts.map +1 -1
- package/dist/components/account/account-keys.js +22 -28
- package/dist/components/account/account-keys.js.map +1 -1
- package/dist/components/account/account-mfa-dialog.js +1 -4
- package/dist/components/account/account-mfa-dialog.js.map +1 -1
- package/dist/components/account/account-password-dialog.d.ts.map +1 -1
- package/dist/components/account/account-password-dialog.js +11 -14
- package/dist/components/account/account-password-dialog.js.map +1 -1
- package/dist/components/account/account-profile.js +3 -2
- package/dist/components/account/account-profile.js.map +1 -1
- package/dist/components/account/account-router-options.d.ts +38 -0
- package/dist/components/account/account-router-options.d.ts.map +1 -1
- package/dist/components/account/account-router-options.js.map +1 -1
- package/dist/components/account/account-router-page.d.ts +11 -1
- package/dist/components/account/account-router-page.d.ts.map +1 -1
- package/dist/components/account/account-router-page.js +11 -1
- package/dist/components/account/account-router-page.js.map +1 -1
- package/dist/components/account/account-router.d.ts +11 -0
- package/dist/components/account/account-router.d.ts.map +1 -1
- package/dist/components/account/account-router.js +16 -5
- package/dist/components/account/account-router.js.map +1 -1
- package/dist/components/admin/admin-audits.d.ts.map +1 -1
- package/dist/components/admin/admin-audits.js +91 -34
- package/dist/components/admin/admin-audits.js.map +1 -1
- package/dist/components/admin/admin-files.d.ts.map +1 -1
- package/dist/components/admin/admin-files.js +6 -17
- package/dist/components/admin/admin-files.js.map +1 -1
- package/dist/components/admin/admin-jobs-executions-panel.d.ts.map +1 -1
- package/dist/components/admin/admin-jobs-executions-panel.js +39 -8
- package/dist/components/admin/admin-jobs-executions-panel.js.map +1 -1
- package/dist/components/admin/admin-jobs-payload-dialog.d.ts +19 -0
- package/dist/components/admin/admin-jobs-payload-dialog.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs-payload-dialog.js +33 -0
- package/dist/components/admin/admin-jobs-payload-dialog.js.map +1 -0
- package/dist/components/admin/admin-keys.d.ts.map +1 -1
- package/dist/components/admin/admin-keys.js +5 -4
- package/dist/components/admin/admin-keys.js.map +1 -1
- package/dist/components/admin/admin-notifications-channel-label.d.ts +14 -0
- package/dist/components/admin/admin-notifications-channel-label.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications-channel-label.js +26 -0
- package/dist/components/admin/admin-notifications-channel-label.js.map +1 -0
- package/dist/components/admin/admin-notifications-preview-body.d.ts.map +1 -1
- package/dist/components/admin/admin-notifications-preview-body.js +23 -13
- package/dist/components/admin/admin-notifications-preview-body.js.map +1 -1
- package/dist/components/admin/admin-notifications.d.ts.map +1 -1
- package/dist/components/admin/admin-notifications.js +11 -12
- package/dist/components/admin/admin-notifications.js.map +1 -1
- package/dist/components/admin/admin-payments.d.ts.map +1 -1
- package/dist/components/admin/admin-payments.js +9 -7
- package/dist/components/admin/admin-payments.js.map +1 -1
- package/dist/components/admin/admin-router-options.d.ts +12 -0
- package/dist/components/admin/admin-router-options.d.ts.map +1 -1
- package/dist/components/admin/admin-router-options.js.map +1 -1
- package/dist/components/admin/admin-router.d.ts +5 -8
- package/dist/components/admin/admin-router.d.ts.map +1 -1
- package/dist/components/admin/admin-router.js +6 -29
- package/dist/components/admin/admin-router.js.map +1 -1
- package/dist/components/admin/admin-sessions.d.ts.map +1 -1
- package/dist/components/admin/admin-sessions.js +9 -7
- package/dist/components/admin/admin-sessions.js.map +1 -1
- package/dist/components/admin/admin-user-detail-audits-tab.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-audits-tab.js +5 -4
- package/dist/components/admin/admin-user-detail-audits-tab.js.map +1 -1
- package/dist/components/admin/admin-user-detail-sessions-tab.d.ts.map +1 -1
- package/dist/components/admin/admin-user-detail-sessions-tab.js +7 -5
- package/dist/components/admin/admin-user-detail-sessions-tab.js.map +1 -1
- package/dist/components/admin/admin-user-detail.js +3 -2
- package/dist/components/admin/admin-user-detail.js.map +1 -1
- package/dist/components/admin/admin-users-roles-picker.d.ts.map +1 -1
- package/dist/components/admin/admin-users-roles-picker.js.map +1 -1
- package/dist/components/admin/admin-users.d.ts.map +1 -1
- package/dist/components/admin/admin-users.js +6 -4
- package/dist/components/admin/admin-users.js.map +1 -1
- package/dist/components/admin/analytics/AnalyticsChartBars.js +2 -1
- package/dist/components/admin/analytics/AnalyticsChartBars.js.map +1 -1
- package/dist/components/admin/parameter-history-item.d.ts.map +1 -1
- package/dist/components/admin/parameter-history-item.js +3 -2
- package/dist/components/admin/parameter-history-item.js.map +1 -1
- package/dist/components/alepha-table/alepha-table-bulk-menu.js +2 -1
- package/dist/components/alepha-table/alepha-table-bulk-menu.js.map +1 -1
- package/dist/components/alepha-table/alepha-table-filter-dialog.d.ts +60 -0
- package/dist/components/alepha-table/alepha-table-filter-dialog.d.ts.map +1 -0
- package/dist/components/alepha-table/alepha-table-filter-dialog.js +88 -0
- package/dist/components/alepha-table/alepha-table-filter-dialog.js.map +1 -0
- package/dist/components/alepha-table/alepha-table-filter-menu.d.ts +35 -0
- package/dist/components/alepha-table/alepha-table-filter-menu.d.ts.map +1 -0
- package/dist/components/alepha-table/alepha-table-filter-menu.js +54 -0
- package/dist/components/alepha-table/alepha-table-filter-menu.js.map +1 -0
- package/dist/components/alepha-table/alepha-table.d.ts +188 -3
- package/dist/components/alepha-table/alepha-table.d.ts.map +1 -1
- package/dist/components/alepha-table/alepha-table.js +551 -162
- package/dist/components/alepha-table/alepha-table.js.map +1 -1
- package/dist/components/alepha-table/query-filters.d.ts +73 -0
- package/dist/components/alepha-table/query-filters.d.ts.map +1 -0
- package/dist/components/alepha-table/query-filters.js +118 -0
- package/dist/components/alepha-table/query-filters.js.map +1 -0
- package/dist/components/app-actions/app-actions.d.ts +21 -0
- package/dist/components/app-actions/app-actions.d.ts.map +1 -1
- package/dist/components/app-actions/app-actions.js +11 -5
- package/dist/components/app-actions/app-actions.js.map +1 -1
- package/dist/components/app-shell/app-shell.d.ts +45 -0
- package/dist/components/app-shell/app-shell.d.ts.map +1 -1
- package/dist/components/app-shell/app-shell.js +119 -16
- package/dist/components/app-shell/app-shell.js.map +1 -1
- package/dist/components/auth/auth-register.js +31 -30
- package/dist/components/auth/auth-register.js.map +1 -1
- package/dist/components/auto-form/auto-form.d.ts.map +1 -1
- package/dist/components/auto-form/auto-form.js +68 -30
- package/dist/components/auto-form/auto-form.js.map +1 -1
- package/dist/components/button-dark/button-dark.d.ts.map +1 -1
- package/dist/components/button-dark/button-dark.js +39 -8
- package/dist/components/button-dark/button-dark.js.map +1 -1
- package/dist/components/button-inbox/button-inbox.d.ts +66 -0
- package/dist/components/button-inbox/button-inbox.d.ts.map +1 -0
- package/dist/components/button-inbox/button-inbox.js +167 -0
- package/dist/components/button-inbox/button-inbox.js.map +1 -0
- package/dist/components/button-inbox/inbox-unread-atom.d.ts +22 -0
- package/dist/components/button-inbox/inbox-unread-atom.d.ts.map +1 -0
- package/dist/components/button-inbox/inbox-unread-atom.js +29 -0
- package/dist/components/button-inbox/inbox-unread-atom.js.map +1 -0
- package/dist/components/button-theme/button-theme.d.ts +4 -3
- package/dist/components/button-theme/button-theme.d.ts.map +1 -1
- package/dist/components/button-theme/button-theme.js +8 -25
- package/dist/components/button-theme/button-theme.js.map +1 -1
- package/dist/components/button-user/button-user.d.ts +19 -0
- package/dist/components/button-user/button-user.d.ts.map +1 -1
- package/dist/components/button-user/button-user.js +1 -1
- package/dist/components/button-user/button-user.js.map +1 -1
- package/dist/components/control/control.d.ts +51 -0
- package/dist/components/control/control.d.ts.map +1 -1
- package/dist/components/control/control.js +49 -5
- package/dist/components/control/control.js.map +1 -1
- package/dist/components/control-array/control-array.js +2 -1
- package/dist/components/control-array/control-array.js.map +1 -1
- package/dist/components/control-date/control-date.d.ts +27 -0
- package/dist/components/control-date/control-date.d.ts.map +1 -1
- package/dist/components/control-date/control-date.js +15 -19
- package/dist/components/control-date/control-date.js.map +1 -1
- package/dist/components/control-date/date-only.d.ts +18 -0
- package/dist/components/control-date/date-only.d.ts.map +1 -0
- package/dist/components/control-date/date-only.js +29 -0
- package/dist/components/control-date/date-only.js.map +1 -0
- package/dist/components/control-date-range/control-date-range.d.ts +56 -0
- package/dist/components/control-date-range/control-date-range.d.ts.map +1 -0
- package/dist/components/control-date-range/control-date-range.js +148 -0
- package/dist/components/control-date-range/control-date-range.js.map +1 -0
- package/dist/components/control-object/control-object.js +2 -1
- package/dist/components/control-object/control-object.js.map +1 -1
- package/dist/components/control-select/control-select.d.ts.map +1 -1
- package/dist/components/control-select/control-select.js +177 -37
- package/dist/components/control-select/control-select.js.map +1 -1
- package/dist/components/control-upload/control-upload.d.ts.map +1 -1
- package/dist/components/control-upload/control-upload.js +1 -11
- package/dist/components/control-upload/control-upload.js.map +1 -1
- package/dist/components/detail/detail-aside.d.ts.map +1 -1
- package/dist/components/detail/detail-aside.js +4 -3
- package/dist/components/detail/detail-aside.js.map +1 -1
- package/dist/components/file-image/file-image.js +2 -1
- package/dist/components/file-image/file-image.js.map +1 -1
- package/dist/components/markdown-view/SpoilerSpan.d.ts +28 -0
- package/dist/components/markdown-view/SpoilerSpan.d.ts.map +1 -0
- package/dist/components/markdown-view/SpoilerSpan.js +53 -0
- package/dist/components/markdown-view/SpoilerSpan.js.map +1 -0
- package/dist/components/markdown-view/diagram/layoutSequence.js +13 -23
- package/dist/components/markdown-view/diagram/layoutSequence.js.map +1 -1
- package/dist/components/markdown-view/diagram/textMetrics.js +2 -2
- package/dist/components/markdown-view/diagram/textMetrics.js.map +1 -1
- package/dist/components/markdown-view/markdown-view.css +44 -0
- package/dist/components/markdown-view/markdown-view.d.ts +12 -0
- package/dist/components/markdown-view/markdown-view.d.ts.map +1 -1
- package/dist/components/markdown-view/markdown-view.js +22 -1
- package/dist/components/markdown-view/markdown-view.js.map +1 -1
- package/dist/components/markdown-view/remarkSpoiler.d.ts +17 -0
- package/dist/components/markdown-view/remarkSpoiler.d.ts.map +1 -0
- package/dist/components/markdown-view/remarkSpoiler.js +117 -0
- package/dist/components/markdown-view/remarkSpoiler.js.map +1 -0
- package/dist/components/permission-matrix/permission-matrix-group-rows.d.ts +34 -0
- package/dist/components/permission-matrix/permission-matrix-group-rows.d.ts.map +1 -0
- package/dist/components/permission-matrix/permission-matrix-group-rows.js +109 -0
- package/dist/components/permission-matrix/permission-matrix-group-rows.js.map +1 -0
- package/dist/components/permission-matrix/permission-matrix.d.ts +145 -0
- package/dist/components/permission-matrix/permission-matrix.d.ts.map +1 -0
- package/dist/components/permission-matrix/permission-matrix.js +113 -0
- package/dist/components/permission-matrix/permission-matrix.js.map +1 -0
- package/dist/components/plate-layout/plate-layout.d.ts +5 -0
- package/dist/components/plate-layout/plate-layout.d.ts.map +1 -1
- package/dist/components/plate-layout/plate-layout.js +2 -1
- package/dist/components/plate-layout/plate-layout.js.map +1 -1
- package/dist/components/plate-layout/plate-tab-bar.d.ts +10 -0
- package/dist/components/plate-layout/plate-tab-bar.d.ts.map +1 -1
- package/dist/components/plate-layout/plate-tab-bar.js +1 -1
- package/dist/components/plate-layout/plate-tab-bar.js.map +1 -1
- package/dist/components/settings/settings-nav.js +2 -1
- package/dist/components/settings/settings-nav.js.map +1 -1
- package/dist/components/time-ago/time-ago.d.ts +57 -0
- package/dist/components/time-ago/time-ago.d.ts.map +1 -0
- package/dist/components/time-ago/time-ago.js +60 -0
- package/dist/components/time-ago/time-ago.js.map +1 -0
- package/dist/components/tree-view/tree-model.d.ts +128 -0
- package/dist/components/tree-view/tree-model.d.ts.map +1 -0
- package/dist/components/tree-view/tree-model.js +226 -0
- package/dist/components/tree-view/tree-model.js.map +1 -0
- package/dist/components/tree-view/tree-view-rename-input.d.ts +31 -0
- package/dist/components/tree-view/tree-view-rename-input.d.ts.map +1 -0
- package/dist/components/tree-view/tree-view-rename-input.js +68 -0
- package/dist/components/tree-view/tree-view-rename-input.js.map +1 -0
- package/dist/components/tree-view/tree-view-resizer.d.ts +38 -0
- package/dist/components/tree-view/tree-view-resizer.d.ts.map +1 -0
- package/dist/components/tree-view/tree-view-resizer.js +73 -0
- package/dist/components/tree-view/tree-view-resizer.js.map +1 -0
- package/dist/components/tree-view/tree-view-row.d.ts +177 -0
- package/dist/components/tree-view/tree-view-row.d.ts.map +1 -0
- package/dist/components/tree-view/tree-view-row.js +241 -0
- package/dist/components/tree-view/tree-view-row.js.map +1 -0
- package/dist/components/tree-view/tree-view.d.ts +186 -0
- package/dist/components/tree-view/tree-view.d.ts.map +1 -0
- package/dist/components/tree-view/tree-view.js +112 -0
- package/dist/components/tree-view/tree-view.js.map +1 -0
- package/dist/components/tree-view/use-tree-state.d.ts +79 -0
- package/dist/components/tree-view/use-tree-state.d.ts.map +1 -0
- package/dist/components/tree-view/use-tree-state.js +93 -0
- package/dist/components/tree-view/use-tree-state.js.map +1 -0
- package/dist/components/ui/button.d.ts.map +1 -1
- package/dist/components/ui/button.js +1 -1
- package/dist/components/ui/button.js.map +1 -1
- package/dist/components/ui/dropdown-menu.js.map +1 -1
- package/dist/components/ui/select.d.ts +7 -0
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/select.js +7 -0
- package/dist/components/ui/select.js.map +1 -1
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/sidebar.js.map +1 -1
- package/dist/components/ui/table.js.map +1 -1
- package/dist/components/ui/tooltip.js.map +1 -1
- package/dist/lib/i18n-fr.d.ts.map +1 -1
- package/dist/lib/i18n-fr.js +31 -47
- package/dist/lib/i18n-fr.js.map +1 -1
- package/dist/lib/utils.d.ts +22 -2
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +29 -5
- package/dist/lib/utils.js.map +1 -1
- package/dist/styles.css +255 -0
- package/package.json +13 -14
- package/src/components/account/__tests__/account-router.spec.ts +95 -0
- package/src/components/account/account-connections.tsx +14 -1
- package/src/components/account/account-delete-dialog.tsx +3 -2
- package/src/components/account/account-keys.tsx +11 -4
- package/src/components/account/account-mfa-dialog.tsx +1 -1
- package/src/components/account/account-password-dialog.tsx +3 -2
- package/src/components/account/account-profile.tsx +1 -1
- package/src/components/account/account-router-options.tsx +45 -0
- package/src/components/account/account-router-page.tsx +11 -1
- package/src/components/account/account-router.tsx +23 -6
- package/src/components/admin/__tests__/admin-jobs-payload-dialog.browser.spec.tsx +68 -0
- package/src/components/admin/__tests__/admin-notifications-preview-body.browser.spec.tsx +20 -4
- package/src/components/admin/__tests__/admin-status-labels.browser.spec.tsx +0 -31
- package/src/components/admin/admin-audits.tsx +99 -5
- package/src/components/admin/admin-files.tsx +7 -16
- package/src/components/admin/admin-jobs-executions-panel.tsx +152 -114
- package/src/components/admin/admin-jobs-payload-dialog.tsx +57 -0
- package/src/components/admin/admin-keys.tsx +7 -4
- package/src/components/admin/admin-notifications-channel-label.ts +18 -0
- package/src/components/admin/admin-notifications-preview-body.tsx +7 -2
- package/src/components/admin/admin-notifications.tsx +19 -8
- package/src/components/admin/admin-payments.tsx +7 -4
- package/src/components/admin/admin-router-options.tsx +12 -0
- package/src/components/admin/admin-router.tsx +5 -27
- package/src/components/admin/admin-sessions.tsx +10 -6
- package/src/components/admin/admin-user-detail-audits-tab.tsx +7 -4
- package/src/components/admin/admin-user-detail-sessions-tab.tsx +7 -4
- package/src/components/admin/admin-users-roles-picker.tsx +4 -0
- package/src/components/admin/admin-users.tsx +6 -3
- package/src/components/admin/parameter-history-item.tsx +4 -2
- package/src/components/alepha-table/__tests__/alepha-table-default-hidden.browser.spec.tsx +108 -0
- package/src/components/alepha-table/__tests__/alepha-table-empty-state.browser.spec.tsx +233 -0
- package/src/components/alepha-table/__tests__/alepha-table-persist-facets.browser.spec.tsx +177 -0
- package/src/components/alepha-table/__tests__/alepha-table-persisted-filters.browser.spec.tsx +182 -0
- package/src/components/alepha-table/__tests__/alepha-table-query-seed.browser.spec.tsx +170 -0
- package/src/components/alepha-table/__tests__/alepha-table-row-action-checked.browser.spec.tsx +210 -0
- package/src/components/alepha-table/__tests__/alepha-table-row-action-group.browser.spec.tsx +202 -0
- package/src/components/alepha-table/__tests__/alepha-table-scope.browser.spec.tsx +161 -0
- package/src/components/alepha-table/__tests__/alepha-table-share-filters.browser.spec.tsx +309 -0
- package/src/components/alepha-table/__tests__/query-filters.spec.ts +212 -0
- package/src/components/alepha-table/alepha-table-filter-dialog.tsx +162 -0
- package/src/components/alepha-table/alepha-table-filter-menu.tsx +77 -0
- package/src/components/alepha-table/alepha-table.tsx +1113 -207
- package/src/components/alepha-table/query-filters.ts +159 -0
- package/src/components/app-actions/app-actions.tsx +32 -3
- package/src/components/app-shell/__tests__/sidebar-nav-accordion.browser.spec.tsx +163 -0
- package/src/components/app-shell/app-shell.tsx +255 -12
- package/src/components/auto-form/__tests__/auto-form-settings-card.browser.spec.tsx +1 -1
- package/src/components/auto-form/auto-form.tsx +98 -30
- package/src/components/button-dark/button-dark.tsx +47 -8
- package/src/components/button-inbox/__tests__/button-inbox.browser.spec.tsx +247 -0
- package/src/components/button-inbox/button-inbox.tsx +303 -0
- package/src/components/button-inbox/inbox-unread-atom.ts +27 -0
- package/src/components/button-theme/button-theme.tsx +16 -29
- package/src/components/button-user/__tests__/button-user-avatar.browser.spec.tsx +88 -0
- package/src/components/button-user/button-user.tsx +24 -1
- package/src/components/control/__tests__/control-date-range.browser.spec.tsx +177 -0
- package/src/components/control/control.tsx +119 -12
- package/src/components/control-date/control-date.tsx +117 -22
- package/src/components/control-date/date-only.ts +26 -0
- package/src/components/control-date-range/control-date-range.tsx +250 -0
- package/src/components/control-select/__tests__/control-select-clear-label.browser.spec.tsx +129 -15
- package/src/components/control-select/__tests__/control-select-deselect.browser.spec.tsx +27 -6
- package/src/components/control-select/__tests__/control-select-multi.browser.spec.tsx +204 -1
- package/src/components/control-select/__tests__/control-select-size-minimal.browser.spec.tsx +77 -1
- package/src/components/control-select/control-select.tsx +317 -83
- package/src/components/control-upload/control-upload.tsx +1 -10
- package/src/components/detail/detail-aside.tsx +30 -6
- package/src/components/markdown-view/SpoilerSpan.tsx +66 -0
- package/src/components/markdown-view/__tests__/markdown-view-spoiler.browser.spec.tsx +165 -0
- package/src/components/markdown-view/diagram/textMetrics.spec.ts +1 -1
- package/src/components/markdown-view/diagram/textMetrics.ts +2 -2
- package/src/components/markdown-view/markdown-view.css +44 -0
- package/src/components/markdown-view/markdown-view.tsx +37 -1
- package/src/components/markdown-view/remarkSpoiler.ts +150 -0
- package/src/components/permission-matrix/__tests__/permission-matrix.browser.spec.tsx +237 -0
- package/src/components/permission-matrix/permission-matrix-group-rows.tsx +240 -0
- package/src/components/permission-matrix/permission-matrix.tsx +286 -0
- package/src/components/plate-layout/__tests__/plate-layout.browser.spec.tsx +22 -0
- package/src/components/plate-layout/plate-layout.tsx +6 -0
- package/src/components/plate-layout/plate-tab-bar.tsx +27 -1
- package/src/components/time-ago/time-ago.browser.spec.tsx +110 -0
- package/src/components/time-ago/time-ago.tsx +80 -0
- package/src/components/tree-view/__tests__/tree-model.spec.ts +441 -0
- package/src/components/tree-view/__tests__/tree-view-drag.browser.spec.tsx +295 -0
- package/src/components/tree-view/__tests__/tree-view-rename.browser.spec.tsx +278 -0
- package/src/components/tree-view/__tests__/tree-view-resizer.browser.spec.tsx +112 -0
- package/src/components/tree-view/__tests__/tree-view.browser.spec.tsx +260 -0
- package/src/components/tree-view/__tests__/use-tree-state.browser.spec.tsx +238 -0
- package/src/components/tree-view/tree-model.ts +369 -0
- package/src/components/tree-view/tree-view-rename-input.tsx +95 -0
- package/src/components/tree-view/tree-view-resizer.tsx +83 -0
- package/src/components/tree-view/tree-view-row.tsx +414 -0
- package/src/components/tree-view/tree-view.tsx +300 -0
- package/src/components/tree-view/use-tree-state.ts +184 -0
- package/src/components/ui/button.tsx +79 -1
- package/src/components/ui/dropdown-menu.tsx +1 -1
- package/src/components/ui/select.tsx +7 -0
- package/src/components/ui/table.tsx +1 -1
- package/src/components/ui/tooltip.tsx +1 -1
- package/src/lib/i18n-fr.ts +34 -51
- package/src/lib/utils.ts +32 -4
- package/src/styles.css +255 -0
- package/dist/components/admin/admin-workflows-execution-sheet.d.ts +0 -11
- package/dist/components/admin/admin-workflows-execution-sheet.d.ts.map +0 -1
- package/dist/components/admin/admin-workflows-execution-sheet.js +0 -190
- package/dist/components/admin/admin-workflows-execution-sheet.js.map +0 -1
- package/dist/components/admin/admin-workflows-executions-panel.d.ts +0 -9
- package/dist/components/admin/admin-workflows-executions-panel.d.ts.map +0 -1
- package/dist/components/admin/admin-workflows-executions-panel.js +0 -121
- package/dist/components/admin/admin-workflows-executions-panel.js.map +0 -1
- package/dist/components/admin/admin-workflows-status-badge.d.ts +0 -12
- package/dist/components/admin/admin-workflows-status-badge.d.ts.map +0 -1
- package/dist/components/admin/admin-workflows-status-badge.js +0 -30
- package/dist/components/admin/admin-workflows-status-badge.js.map +0 -1
- package/dist/components/admin/admin-workflows-status-labels.d.ts +0 -19
- package/dist/components/admin/admin-workflows-status-labels.d.ts.map +0 -1
- package/dist/components/admin/admin-workflows-status-labels.js +0 -48
- package/dist/components/admin/admin-workflows-status-labels.js.map +0 -1
- package/dist/components/admin/admin-workflows.d.ts +0 -4
- package/dist/components/admin/admin-workflows.d.ts.map +0 -1
- package/dist/components/admin/admin-workflows.js +0 -145
- package/dist/components/admin/admin-workflows.js.map +0 -1
- package/src/components/admin/admin-workflows-execution-sheet.tsx +0 -285
- package/src/components/admin/admin-workflows-executions-panel.tsx +0 -169
- package/src/components/admin/admin-workflows-status-badge.tsx +0 -41
- package/src/components/admin/admin-workflows-status-labels.ts +0 -51
- 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.
|
|
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.
|
|
61
|
-
"sync": "node scripts/sync.
|
|
62
|
-
"sync:check": "node scripts/sync.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
94
|
+
"alepha": "0.29.0",
|
|
96
95
|
"react": "^19.2.8",
|
|
97
96
|
"react-dom": "^19.2.8",
|
|
98
|
-
"tsdown": "^0.
|
|
97
|
+
"tsdown": "^0.23.0",
|
|
99
98
|
"typescript": "^7.0.2"
|
|
100
99
|
},
|
|
101
100
|
"peerDependencies": {
|
|
102
|
-
"alepha": "^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
|
-
<
|
|
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
|
-
</
|
|
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
|
-
|
|
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
|
-
</
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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
|
|
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
|
-
<
|
|
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
|
-
</
|
|
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
|
|
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
|