@alepha/ui 0.25.1 → 0.26.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/LICENSE +21 -0
- package/README.md +136 -2
- package/dist/components/account/account-connections.d.ts +16 -0
- package/dist/components/account/account-connections.d.ts.map +1 -0
- package/dist/components/account/account-connections.js +76 -0
- package/dist/components/account/account-connections.js.map +1 -0
- package/dist/components/account/account-delete-dialog.d.ts +44 -0
- package/dist/components/account/account-delete-dialog.d.ts.map +1 -0
- package/dist/components/account/account-delete-dialog.js +126 -0
- package/dist/components/account/account-delete-dialog.js.map +1 -0
- package/dist/components/account/account-header.d.ts +33 -0
- package/dist/components/account/account-header.d.ts.map +1 -0
- package/dist/components/account/account-header.js +41 -0
- package/dist/components/account/account-header.js.map +1 -0
- package/dist/components/account/account-keys.d.ts +23 -0
- package/dist/components/account/account-keys.d.ts.map +1 -0
- package/dist/components/account/account-keys.js +168 -0
- package/dist/components/account/account-keys.js.map +1 -0
- package/dist/components/account/account-layout.d.ts +32 -0
- package/dist/components/account/account-layout.d.ts.map +1 -0
- package/dist/components/account/account-layout.js +53 -0
- package/dist/components/account/account-layout.js.map +1 -0
- package/dist/components/account/account-password-dialog.d.ts +31 -0
- package/dist/components/account/account-password-dialog.d.ts.map +1 -0
- package/dist/components/account/account-password-dialog.js +120 -0
- package/dist/components/account/account-password-dialog.js.map +1 -0
- package/dist/components/account/account-profile.d.ts +27 -0
- package/dist/components/account/account-profile.d.ts.map +1 -0
- package/dist/components/account/account-profile.js +217 -0
- package/dist/components/account/account-profile.js.map +1 -0
- package/dist/components/account/account-router-options.d.ts +77 -0
- package/dist/components/account/account-router-options.d.ts.map +1 -0
- package/dist/components/account/account-router-options.js +22 -0
- package/dist/components/account/account-router-options.js.map +1 -0
- package/dist/components/account/account-router-page.d.ts +49 -0
- package/dist/components/account/account-router-page.d.ts.map +1 -0
- package/dist/components/account/account-router-page.js +61 -0
- package/dist/components/account/account-router-page.js.map +1 -0
- package/dist/components/account/account-router.d.ts +214 -0
- package/dist/components/account/account-router.d.ts.map +1 -0
- package/dist/components/account/account-router.js +216 -0
- package/dist/components/account/account-router.js.map +1 -0
- package/dist/components/account/account-security.d.ts +22 -0
- package/dist/components/account/account-security.d.ts.map +1 -0
- package/dist/components/account/account-security.js +107 -0
- package/dist/components/account/account-security.js.map +1 -0
- package/dist/components/account/account-sessions.d.ts +17 -0
- package/dist/components/account/account-sessions.d.ts.map +1 -0
- package/dist/components/account/account-sessions.js +108 -0
- package/dist/components/account/account-sessions.js.map +1 -0
- package/dist/components/action-error-toaster/action-error-toaster.d.ts +39 -0
- package/dist/components/action-error-toaster/action-error-toaster.d.ts.map +1 -0
- package/dist/components/action-error-toaster/action-error-toaster.js +40 -0
- package/dist/components/action-error-toaster/action-error-toaster.js.map +1 -0
- package/dist/components/admin/admin-analytics-query-panel.d.ts +16 -0
- package/dist/components/admin/admin-analytics-query-panel.d.ts.map +1 -0
- package/dist/components/admin/admin-analytics-query-panel.js +117 -0
- package/dist/components/admin/admin-analytics-query-panel.js.map +1 -0
- package/dist/components/admin/admin-analytics-results.d.ts +15 -0
- package/dist/components/admin/admin-analytics-results.d.ts.map +1 -0
- package/dist/components/admin/admin-analytics-results.js +56 -0
- package/dist/components/admin/admin-analytics-results.js.map +1 -0
- package/dist/components/admin/admin-analytics.d.ts +9 -0
- package/dist/components/admin/admin-analytics.d.ts.map +1 -0
- package/dist/components/admin/admin-analytics.js +66 -0
- package/dist/components/admin/admin-analytics.js.map +1 -0
- package/dist/components/admin/admin-audits.d.ts +4 -0
- package/dist/components/admin/admin-audits.d.ts.map +1 -0
- package/dist/components/admin/admin-audits.js +173 -0
- package/dist/components/admin/admin-audits.js.map +1 -0
- package/dist/components/admin/admin-files.d.ts +4 -0
- package/dist/components/admin/admin-files.d.ts.map +1 -0
- package/dist/components/admin/admin-files.js +237 -0
- package/dist/components/admin/admin-files.js.map +1 -0
- package/dist/components/admin/admin-jobs-executions-panel.d.ts +11 -0
- package/dist/components/admin/admin-jobs-executions-panel.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs-executions-panel.js +200 -0
- package/dist/components/admin/admin-jobs-executions-panel.js.map +1 -0
- package/dist/components/admin/admin-jobs-status-badge.d.ts +9 -0
- package/dist/components/admin/admin-jobs-status-badge.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs-status-badge.js +26 -0
- package/dist/components/admin/admin-jobs-status-badge.js.map +1 -0
- package/dist/components/admin/admin-jobs.d.ts +4 -0
- package/dist/components/admin/admin-jobs.d.ts.map +1 -0
- package/dist/components/admin/admin-jobs.js +248 -0
- package/dist/components/admin/admin-jobs.js.map +1 -0
- package/dist/components/admin/admin-keys-token-dialog.d.ts +15 -0
- package/dist/components/admin/admin-keys-token-dialog.d.ts.map +1 -0
- package/dist/components/admin/admin-keys-token-dialog.js +66 -0
- package/dist/components/admin/admin-keys-token-dialog.js.map +1 -0
- package/dist/components/admin/admin-keys.d.ts +4 -0
- package/dist/components/admin/admin-keys.d.ts.map +1 -0
- package/dist/components/admin/admin-keys.js +161 -0
- package/dist/components/admin/admin-keys.js.map +1 -0
- package/dist/components/admin/admin-layout.d.ts +33 -0
- package/dist/components/admin/admin-layout.d.ts.map +1 -0
- package/dist/components/admin/admin-layout.js +101 -0
- package/dist/components/admin/admin-layout.js.map +1 -0
- package/dist/components/admin/admin-notifications.d.ts +4 -0
- package/dist/components/admin/admin-notifications.d.ts.map +1 -0
- package/dist/components/admin/admin-notifications.js +99 -0
- package/dist/components/admin/admin-notifications.js.map +1 -0
- package/dist/components/admin/admin-page.d.ts +16 -0
- package/dist/components/admin/admin-page.d.ts.map +1 -0
- package/dist/components/admin/admin-page.js +15 -0
- package/dist/components/admin/admin-page.js.map +1 -0
- package/dist/components/admin/admin-parameters.d.ts +26 -0
- package/dist/components/admin/admin-parameters.d.ts.map +1 -0
- package/dist/components/admin/admin-parameters.js +560 -0
- package/dist/components/admin/admin-parameters.js.map +1 -0
- package/dist/components/admin/admin-payments.d.ts +4 -0
- package/dist/components/admin/admin-payments.d.ts.map +1 -0
- package/dist/components/admin/admin-payments.js +72 -0
- package/dist/components/admin/admin-payments.js.map +1 -0
- package/dist/components/admin/admin-router-options.d.ts +135 -0
- package/dist/components/admin/admin-router-options.d.ts.map +1 -0
- package/dist/components/admin/admin-router-options.js +29 -0
- package/dist/components/admin/admin-router-options.js.map +1 -0
- package/dist/components/admin/admin-router-page.d.ts +54 -0
- package/dist/components/admin/admin-router-page.d.ts.map +1 -0
- package/dist/components/admin/admin-router-page.js +66 -0
- package/dist/components/admin/admin-router-page.js.map +1 -0
- package/dist/components/admin/admin-router.d.ts +169 -0
- package/dist/components/admin/admin-router.d.ts.map +1 -0
- package/dist/components/admin/admin-router.js +346 -0
- package/dist/components/admin/admin-router.js.map +1 -0
- package/dist/components/admin/admin-sessions.d.ts +4 -0
- package/dist/components/admin/admin-sessions.d.ts.map +1 -0
- package/dist/components/admin/admin-sessions.js +124 -0
- package/dist/components/admin/admin-sessions.js.map +1 -0
- package/dist/components/admin/admin-user-cell.d.ts +37 -0
- package/dist/components/admin/admin-user-cell.d.ts.map +1 -0
- package/dist/components/admin/admin-user-cell.js +35 -0
- package/dist/components/admin/admin-user-cell.js.map +1 -0
- package/dist/components/admin/admin-user-detail-audits-tab.d.ts +15 -0
- package/dist/components/admin/admin-user-detail-audits-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-audits-tab.js +55 -0
- package/dist/components/admin/admin-user-detail-audits-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail-identity-aside.d.ts +14 -0
- package/dist/components/admin/admin-user-detail-identity-aside.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-identity-aside.js +162 -0
- package/dist/components/admin/admin-user-detail-identity-aside.js.map +1 -0
- package/dist/components/admin/admin-user-detail-overview-tab.d.ts +26 -0
- package/dist/components/admin/admin-user-detail-overview-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-overview-tab.js +60 -0
- package/dist/components/admin/admin-user-detail-overview-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail-password-dialog.d.ts +15 -0
- package/dist/components/admin/admin-user-detail-password-dialog.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-password-dialog.js +47 -0
- package/dist/components/admin/admin-user-detail-password-dialog.js.map +1 -0
- package/dist/components/admin/admin-user-detail-password-schema.d.ts +10 -0
- package/dist/components/admin/admin-user-detail-password-schema.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-password-schema.js +13 -0
- package/dist/components/admin/admin-user-detail-password-schema.js.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-policy.d.ts +56 -0
- package/dist/components/admin/admin-user-detail-profile-policy.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-policy.js +73 -0
- package/dist/components/admin/admin-user-detail-profile-policy.js.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-schema.d.ts +18 -0
- package/dist/components/admin/admin-user-detail-profile-schema.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-profile-schema.js +21 -0
- package/dist/components/admin/admin-user-detail-profile-schema.js.map +1 -0
- package/dist/components/admin/admin-user-detail-security-tab.d.ts +20 -0
- package/dist/components/admin/admin-user-detail-security-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-security-tab.js +70 -0
- package/dist/components/admin/admin-user-detail-security-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.d.ts +25 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.js +64 -0
- package/dist/components/admin/admin-user-detail-sessions-tab.js.map +1 -0
- package/dist/components/admin/admin-user-detail.d.ts +39 -0
- package/dist/components/admin/admin-user-detail.d.ts.map +1 -0
- package/dist/components/admin/admin-user-detail.js +386 -0
- package/dist/components/admin/admin-user-detail.js.map +1 -0
- package/dist/components/admin/admin-users-roles-picker.d.ts +23 -0
- package/dist/components/admin/admin-users-roles-picker.d.ts.map +1 -0
- package/dist/components/admin/admin-users-roles-picker.js +77 -0
- package/dist/components/admin/admin-users-roles-picker.js.map +1 -0
- package/dist/components/admin/admin-users-status-filter.d.ts +13 -0
- package/dist/components/admin/admin-users-status-filter.d.ts.map +1 -0
- package/dist/components/admin/admin-users-status-filter.js +41 -0
- package/dist/components/admin/admin-users-status-filter.js.map +1 -0
- package/dist/components/admin/admin-users.d.ts +16 -0
- package/dist/components/admin/admin-users.d.ts.map +1 -0
- package/dist/components/admin/admin-users.js +325 -0
- package/dist/components/admin/admin-users.js.map +1 -0
- package/dist/components/admin/admin-workflows-execution-sheet.d.ts +11 -0
- package/dist/components/admin/admin-workflows-execution-sheet.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows-execution-sheet.js +190 -0
- package/dist/components/admin/admin-workflows-execution-sheet.js.map +1 -0
- package/dist/components/admin/admin-workflows-executions-panel.d.ts +9 -0
- package/dist/components/admin/admin-workflows-executions-panel.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows-executions-panel.js +153 -0
- package/dist/components/admin/admin-workflows-executions-panel.js.map +1 -0
- package/dist/components/admin/admin-workflows-status-badge.d.ts +12 -0
- package/dist/components/admin/admin-workflows-status-badge.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows-status-badge.js +30 -0
- package/dist/components/admin/admin-workflows-status-badge.js.map +1 -0
- package/dist/components/admin/admin-workflows.d.ts +4 -0
- package/dist/components/admin/admin-workflows.d.ts.map +1 -0
- package/dist/components/admin/admin-workflows.js +145 -0
- package/dist/components/admin/admin-workflows.js.map +1 -0
- package/dist/components/admin/diff-lines.d.ts +13 -0
- package/dist/components/admin/diff-lines.d.ts.map +1 -0
- package/dist/components/admin/diff-lines.js +57 -0
- package/dist/components/admin/diff-lines.js.map +1 -0
- package/dist/components/admin/parameter-diff-dialog.d.ts +36 -0
- package/dist/components/admin/parameter-diff-dialog.d.ts.map +1 -0
- package/dist/components/admin/parameter-diff-dialog.js +58 -0
- package/dist/components/admin/parameter-diff-dialog.js.map +1 -0
- package/dist/components/admin/parameter-history-item.d.ts +17 -0
- package/dist/components/admin/parameter-history-item.d.ts.map +1 -0
- package/dist/components/admin/parameter-history-item.js +177 -0
- package/dist/components/admin/parameter-history-item.js.map +1 -0
- package/dist/components/admin/parameter-json-dialog.d.ts +13 -0
- package/dist/components/admin/parameter-json-dialog.d.ts.map +1 -0
- package/dist/components/admin/parameter-json-dialog.js +63 -0
- package/dist/components/admin/parameter-json-dialog.js.map +1 -0
- package/dist/components/admin/parameter-save-dialog.d.ts +26 -0
- package/dist/components/admin/parameter-save-dialog.d.ts.map +1 -0
- package/dist/components/admin/parameter-save-dialog.js +74 -0
- package/dist/components/admin/parameter-save-dialog.js.map +1 -0
- package/dist/components/admin/use-confirmed-action.d.ts +53 -0
- package/dist/components/admin/use-confirmed-action.d.ts.map +1 -0
- package/dist/components/admin/use-confirmed-action.js +50 -0
- package/dist/components/admin/use-confirmed-action.js.map +1 -0
- package/dist/components/alepha-table/alepha-table.d.ts +218 -0
- package/dist/components/alepha-table/alepha-table.d.ts.map +1 -0
- package/dist/components/alepha-table/alepha-table.js +565 -0
- package/dist/components/alepha-table/alepha-table.js.map +1 -0
- package/dist/components/alepha-table/use-table-selection.d.ts +34 -0
- package/dist/components/alepha-table/use-table-selection.d.ts.map +1 -0
- package/dist/components/alepha-table/use-table-selection.js +45 -0
- package/dist/components/alepha-table/use-table-selection.js.map +1 -0
- package/dist/components/app-actions/app-actions.d.ts +74 -0
- package/dist/components/app-actions/app-actions.d.ts.map +1 -0
- package/dist/components/app-actions/app-actions.js +77 -0
- package/dist/components/app-actions/app-actions.js.map +1 -0
- package/dist/components/app-shell/app-shell.d.ts +135 -0
- package/dist/components/app-shell/app-shell.d.ts.map +1 -0
- package/dist/components/app-shell/app-shell.js +276 -0
- package/dist/components/app-shell/app-shell.js.map +1 -0
- package/dist/components/auth/auth-login.d.ts +40 -0
- package/dist/components/auth/auth-login.d.ts.map +1 -0
- package/dist/components/auth/auth-login.js +237 -0
- package/dist/components/auth/auth-login.js.map +1 -0
- package/dist/components/auth/auth-register.d.ts +35 -0
- package/dist/components/auth/auth-register.d.ts.map +1 -0
- package/dist/components/auth/auth-register.js +478 -0
- package/dist/components/auth/auth-register.js.map +1 -0
- package/dist/components/auth/auth-reset-password.d.ts +21 -0
- package/dist/components/auth/auth-reset-password.d.ts.map +1 -0
- package/dist/components/auth/auth-reset-password.js +283 -0
- package/dist/components/auth/auth-reset-password.js.map +1 -0
- package/dist/components/auth/auth-router.d.ts +245 -0
- package/dist/components/auth/auth-router.d.ts.map +1 -0
- package/dist/components/auth/auth-router.js +117 -0
- package/dist/components/auth/auth-router.js.map +1 -0
- package/dist/components/auth/auth-verify-email.d.ts +19 -0
- package/dist/components/auth/auth-verify-email.d.ts.map +1 -0
- package/dist/components/auth/auth-verify-email.js +124 -0
- package/dist/components/auth/auth-verify-email.js.map +1 -0
- package/dist/components/auth/provider-labels.d.ts +9 -0
- package/dist/components/auth/provider-labels.d.ts.map +1 -0
- package/dist/components/auth/provider-labels.js +20 -0
- package/dist/components/auth/provider-labels.js.map +1 -0
- package/dist/components/auto-form/auto-form.d.ts +219 -0
- package/dist/components/auto-form/auto-form.d.ts.map +1 -0
- package/dist/components/auto-form/auto-form.js +412 -0
- package/dist/components/auto-form/auto-form.js.map +1 -0
- package/dist/components/brand-icon/brand-icon.d.ts +18 -0
- package/dist/components/brand-icon/brand-icon.d.ts.map +1 -0
- package/dist/components/brand-icon/brand-icon.js +84 -0
- package/dist/components/brand-icon/brand-icon.js.map +1 -0
- package/dist/components/button-dark/button-dark.d.ts +25 -0
- package/dist/components/button-dark/button-dark.d.ts.map +1 -0
- package/dist/components/button-dark/button-dark.js +44 -0
- package/dist/components/button-dark/button-dark.js.map +1 -0
- package/dist/components/button-language/button-language.d.ts +24 -0
- package/dist/components/button-language/button-language.d.ts.map +1 -0
- package/dist/components/button-language/button-language.js +50 -0
- package/dist/components/button-language/button-language.js.map +1 -0
- package/dist/components/button-theme/button-theme.d.ts +33 -0
- package/dist/components/button-theme/button-theme.d.ts.map +1 -0
- package/dist/components/button-theme/button-theme.js +90 -0
- package/dist/components/button-theme/button-theme.js.map +1 -0
- package/dist/components/button-user/button-user.d.ts +147 -0
- package/dist/components/button-user/button-user.d.ts.map +1 -0
- package/dist/components/button-user/button-user.js +147 -0
- package/dist/components/button-user/button-user.js.map +1 -0
- package/dist/components/captcha/turnstile-widget.d.ts +59 -0
- package/dist/components/captcha/turnstile-widget.d.ts.map +1 -0
- package/dist/components/captcha/turnstile-widget.js +97 -0
- package/dist/components/captcha/turnstile-widget.js.map +1 -0
- package/dist/components/control/control.d.ts +200 -0
- package/dist/components/control/control.d.ts.map +1 -0
- package/dist/components/control/control.js +300 -0
- package/dist/components/control/control.js.map +1 -0
- package/dist/components/control-array/control-array.d.ts +77 -0
- package/dist/components/control-array/control-array.d.ts.map +1 -0
- package/dist/components/control-array/control-array.js +444 -0
- package/dist/components/control-array/control-array.js.map +1 -0
- package/dist/components/control-base/field-i18n.d.ts +30 -0
- package/dist/components/control-base/field-i18n.d.ts.map +1 -0
- package/dist/components/control-base/field-i18n.js +27 -0
- package/dist/components/control-base/field-i18n.js.map +1 -0
- package/dist/components/control-base/form-field.d.ts +128 -0
- package/dist/components/control-base/form-field.d.ts.map +1 -0
- package/dist/components/control-base/form-field.js +208 -0
- package/dist/components/control-base/form-field.js.map +1 -0
- package/dist/components/control-base/grid.d.ts +18 -0
- package/dist/components/control-base/grid.d.ts.map +1 -0
- package/dist/components/control-base/grid.js +46 -0
- package/dist/components/control-base/grid.js.map +1 -0
- package/dist/components/control-base/icon-hint.d.ts +9 -0
- package/dist/components/control-base/icon-hint.d.ts.map +1 -0
- package/dist/components/control-base/icon-hint.js +35 -0
- package/dist/components/control-base/icon-hint.js.map +1 -0
- package/dist/components/control-date/control-date.d.ts +34 -0
- package/dist/components/control-date/control-date.d.ts.map +1 -0
- package/dist/components/control-date/control-date.js +111 -0
- package/dist/components/control-date/control-date.js.map +1 -0
- package/dist/components/control-number/control-number.d.ts +38 -0
- package/dist/components/control-number/control-number.d.ts.map +1 -0
- package/dist/components/control-number/control-number.js +77 -0
- package/dist/components/control-number/control-number.js.map +1 -0
- package/dist/components/control-object/control-object.d.ts +45 -0
- package/dist/components/control-object/control-object.d.ts.map +1 -0
- package/dist/components/control-object/control-object.js +110 -0
- package/dist/components/control-object/control-object.js.map +1 -0
- package/dist/components/control-password/control-password.d.ts +28 -0
- package/dist/components/control-password/control-password.d.ts.map +1 -0
- package/dist/components/control-password/control-password.js +65 -0
- package/dist/components/control-password/control-password.js.map +1 -0
- package/dist/components/control-select/control-select.d.ts +128 -0
- package/dist/components/control-select/control-select.d.ts.map +1 -0
- package/dist/components/control-select/control-select.js +363 -0
- package/dist/components/control-select/control-select.js.map +1 -0
- package/dist/components/control-upload/control-upload.d.ts +67 -0
- package/dist/components/control-upload/control-upload.d.ts.map +1 -0
- package/dist/components/control-upload/control-upload.js +294 -0
- package/dist/components/control-upload/control-upload.js.map +1 -0
- package/dist/components/file-image/file-image.d.ts +31 -0
- package/dist/components/file-image/file-image.d.ts.map +1 -0
- package/dist/components/file-image/file-image.js +27 -0
- package/dist/components/file-image/file-image.js.map +1 -0
- package/dist/components/language-toggle/language-toggle.d.ts +8 -0
- package/dist/components/language-toggle/language-toggle.d.ts.map +1 -0
- package/dist/components/language-toggle/language-toggle.js +49 -0
- package/dist/components/language-toggle/language-toggle.js.map +1 -0
- package/dist/components/markdown-view/markdown-view.css +114 -0
- package/dist/components/markdown-view/markdown-view.d.ts +21 -0
- package/dist/components/markdown-view/markdown-view.d.ts.map +1 -0
- package/dist/components/markdown-view/markdown-view.js +104 -0
- package/dist/components/markdown-view/markdown-view.js.map +1 -0
- package/dist/components/nav-shell/nav-page.d.ts +24 -0
- package/dist/components/nav-shell/nav-page.d.ts.map +1 -0
- package/dist/components/nav-shell/nav-page.js +28 -0
- package/dist/components/nav-shell/nav-page.js.map +1 -0
- package/dist/components/nav-shell/nav-shell.d.ts +26 -0
- package/dist/components/nav-shell/nav-shell.d.ts.map +1 -0
- package/dist/components/nav-shell/nav-shell.js +53 -0
- package/dist/components/nav-shell/nav-shell.js.map +1 -0
- package/dist/components/nav-shell/nav-tree-util.d.ts +65 -0
- package/dist/components/nav-shell/nav-tree-util.d.ts.map +1 -0
- package/dist/components/nav-shell/nav-tree-util.js +87 -0
- package/dist/components/nav-shell/nav-tree-util.js.map +1 -0
- package/dist/components/nav-shell/spotlight.d.ts +37 -0
- package/dist/components/nav-shell/spotlight.d.ts.map +1 -0
- package/dist/components/nav-shell/spotlight.js +102 -0
- package/dist/components/nav-shell/spotlight.js.map +1 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts +24 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.d.ts.map +1 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.js +36 -0
- package/dist/components/nav-shell/use-nav-breadcrumbs.js.map +1 -0
- package/dist/components/nav-shell/use-nav-entries.d.ts +45 -0
- package/dist/components/nav-shell/use-nav-entries.d.ts.map +1 -0
- package/dist/components/nav-shell/use-nav-entries.js +60 -0
- package/dist/components/nav-shell/use-nav-entries.js.map +1 -0
- package/dist/components/nav-shell/use-nav-tree.d.ts +21 -0
- package/dist/components/nav-shell/use-nav-tree.d.ts.map +1 -0
- package/dist/components/nav-shell/use-nav-tree.js +48 -0
- package/dist/components/nav-shell/use-nav-tree.js.map +1 -0
- package/dist/components/settings/settings-danger-section.d.ts +35 -0
- package/dist/components/settings/settings-danger-section.d.ts.map +1 -0
- package/dist/components/settings/settings-danger-section.js +42 -0
- package/dist/components/settings/settings-danger-section.js.map +1 -0
- package/dist/components/settings/settings-heading.d.ts +36 -0
- package/dist/components/settings/settings-heading.d.ts.map +1 -0
- package/dist/components/settings/settings-heading.js +39 -0
- package/dist/components/settings/settings-heading.js.map +1 -0
- package/dist/components/settings/settings-layout.d.ts +81 -0
- package/dist/components/settings/settings-layout.d.ts.map +1 -0
- package/dist/components/settings/settings-layout.js +56 -0
- package/dist/components/settings/settings-layout.js.map +1 -0
- package/dist/components/settings/settings-nav.d.ts +85 -0
- package/dist/components/settings/settings-nav.d.ts.map +1 -0
- package/dist/components/settings/settings-nav.js +91 -0
- package/dist/components/settings/settings-nav.js.map +1 -0
- package/dist/components/settings/settings-row.d.ts +45 -0
- package/dist/components/settings/settings-row.d.ts.map +1 -0
- package/dist/components/settings/settings-row.js +44 -0
- package/dist/components/settings/settings-row.js.map +1 -0
- package/dist/components/settings/settings-section.d.ts +36 -0
- package/dist/components/settings/settings-section.d.ts.map +1 -0
- package/dist/components/settings/settings-section.js +36 -0
- package/dist/components/settings/settings-section.js.map +1 -0
- package/dist/components/ui/accordion.d.ts +7 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/accordion.js +55 -0
- package/dist/components/ui/accordion.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +19 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +96 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/alert.d.ts +11 -0
- package/dist/components/ui/alert.d.ts.map +1 -0
- package/dist/components/ui/alert.js +44 -0
- package/dist/components/ui/alert.js.map +1 -0
- package/dist/components/ui/aspect-ratio.d.ts +5 -0
- package/dist/components/ui/aspect-ratio.d.ts.map +1 -0
- package/dist/components/ui/aspect-ratio.js +15 -0
- package/dist/components/ui/aspect-ratio.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +12 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +52 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +8 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +31 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/breadcrumb.d.ts +11 -0
- package/dist/components/ui/breadcrumb.d.ts.map +1 -0
- package/dist/components/ui/breadcrumb.js +73 -0
- package/dist/components/ui/breadcrumb.js.map +1 -0
- package/dist/components/ui/button-group.d.ts +11 -0
- package/dist/components/ui/button-group.d.ts.map +1 -0
- package/dist/components/ui/button-group.js +43 -0
- package/dist/components/ui/button-group.js.map +1 -0
- package/dist/components/ui/button.d.ts +18 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +60 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +11 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +119 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/card.d.ts +12 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +57 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/carousel.d.ts +29 -0
- package/dist/components/ui/carousel.d.ts.map +1 -0
- package/dist/components/ui/carousel.js +134 -0
- package/dist/components/ui/carousel.js.map +1 -0
- package/dist/components/ui/chart.d.ts +45 -0
- package/dist/components/ui/chart.d.ts.map +1 -0
- package/dist/components/ui/chart.js +151 -0
- package/dist/components/ui/chart.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +4 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +22 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +26 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/combobox.d.ts +25 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +164 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/command.d.ts +20 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/command.js +89 -0
- package/dist/components/ui/command.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +30 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +134 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +18 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +93 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/direction.d.ts +2 -0
- package/dist/components/ui/direction.d.ts.map +1 -0
- package/dist/components/ui/direction.js +3 -0
- package/dist/components/ui/drawer.d.ts +17 -0
- package/dist/components/ui/drawer.d.ts.map +1 -0
- package/dist/components/ui/drawer.js +125 -0
- package/dist/components/ui/drawer.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +30 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +138 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/empty.d.ts +12 -0
- package/dist/components/ui/empty.d.ts.map +1 -0
- package/dist/components/ui/empty.js +61 -0
- package/dist/components/ui/empty.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +6 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +38 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/input-group.d.ts +19 -0
- package/dist/components/ui/input-group.d.ts.map +1 -0
- package/dist/components/ui/input-group.js +80 -0
- package/dist/components/ui/input-group.js.map +1 -0
- package/dist/components/ui/input-otp.d.ts +12 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input-otp.js +49 -0
- package/dist/components/ui/input-otp.js.map +1 -0
- package/dist/components/ui/input.d.ts +4 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +16 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/item.d.ts +23 -0
- package/dist/components/ui/item.d.ts.map +1 -0
- package/dist/components/ui/item.js +122 -0
- package/dist/components/ui/item.js.map +1 -0
- package/dist/components/ui/kbd.d.ts +4 -0
- package/dist/components/ui/kbd.d.ts.map +1 -0
- package/dist/components/ui/kbd.js +21 -0
- package/dist/components/ui/kbd.js.map +1 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/label.js +15 -0
- package/dist/components/ui/label.js.map +1 -0
- package/dist/components/ui/menubar.d.ts +30 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/menubar.js +137 -0
- package/dist/components/ui/menubar.js.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +12 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.js +84 -0
- package/dist/components/ui/navigation-menu.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +18 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +87 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +56 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +8 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +46 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +6 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +29 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/resizable.js +30 -0
- package/dist/components/ui/resizable.js.map +1 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/scroll-area.d.ts.map +1 -0
- package/dist/components/ui/scroll-area.js +38 -0
- package/dist/components/ui/scroll-area.js.map +1 -0
- package/dist/components/ui/segmented.d.ts +46 -0
- package/dist/components/ui/segmented.d.ts.map +1 -0
- package/dist/components/ui/segmented.js +119 -0
- package/dist/components/ui/segmented.js.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +99 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +17 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +15 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +90 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +64 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +388 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +14 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/slider.d.ts.map +1 -0
- package/dist/components/ui/slider.js +35 -0
- package/dist/components/ui/slider.js.map +1 -0
- package/dist/components/ui/sonner.d.ts +4 -0
- package/dist/components/ui/sonner.d.ts.map +1 -0
- package/dist/components/ui/sonner.js +33 -0
- package/dist/components/ui/sonner.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +3 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +17 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/switch.d.ts +6 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +21 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +11 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +68 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +11 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +47 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/textarea.d.ts +4 -0
- package/dist/components/ui/textarea.d.ts.map +1 -0
- package/dist/components/ui/textarea.js +14 -0
- package/dist/components/ui/textarea.js.map +1 -0
- package/dist/components/ui/toggle-group.d.ts +12 -0
- package/dist/components/ui/toggle-group.d.ts.map +1 -0
- package/dist/components/ui/toggle-group.js +54 -0
- package/dist/components/ui/toggle-group.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +9 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +38 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +43 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/use-dialog/use-dialog.d.ts +61 -0
- package/dist/components/use-dialog/use-dialog.d.ts.map +1 -0
- package/dist/components/use-dialog/use-dialog.js +139 -0
- package/dist/components/use-dialog/use-dialog.js.map +1 -0
- package/dist/components/use-toast/use-toast.d.ts +37 -0
- package/dist/components/use-toast/use-toast.d.ts.map +1 -0
- package/dist/components/use-toast/use-toast.js +32 -0
- package/dist/components/use-toast/use-toast.js.map +1 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +20 -0
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/lib/i18n-fr.d.ts +46 -0
- package/dist/lib/i18n-fr.d.ts.map +1 -0
- package/dist/lib/i18n-fr.js +505 -0
- package/dist/lib/i18n-fr.js.map +1 -0
- package/dist/lib/resize-image.d.ts +50 -0
- package/dist/lib/resize-image.d.ts.map +1 -0
- package/dist/lib/resize-image.js +68 -0
- package/dist/lib/resize-image.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +10 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles.css +254 -0
- package/package.json +46 -15
- package/src/components/account/__tests__/account-router.spec.ts +201 -0
- package/src/components/account/account-connections.tsx +111 -0
- package/src/components/account/account-delete-dialog.tsx +184 -0
- package/src/components/account/account-header.tsx +57 -0
- package/src/components/account/account-keys.tsx +221 -0
- package/src/components/account/account-layout.tsx +66 -0
- package/src/components/account/account-password-dialog.tsx +152 -0
- package/src/components/account/account-profile.tsx +342 -0
- package/src/components/account/account-router-options.tsx +88 -0
- package/src/components/account/account-router-page.tsx +69 -0
- package/src/components/account/account-router.tsx +233 -0
- package/src/components/account/account-security.tsx +150 -0
- package/src/components/account/account-sessions.tsx +140 -0
- package/src/components/admin/__tests__/admin-keys-token-dialog.browser.spec.tsx +62 -0
- package/src/components/admin/__tests__/admin-layout.browser.spec.tsx +82 -0
- package/src/components/admin/__tests__/admin-router-page.spec.ts +54 -0
- package/src/components/admin/__tests__/admin-router.spec.ts +208 -0
- package/src/components/admin/__tests__/admin-user-cell.browser.spec.tsx +99 -0
- package/src/components/admin/__tests__/admin-user-detail.spec.ts +29 -0
- package/src/components/admin/admin-analytics-query-panel.tsx +149 -0
- package/src/components/admin/admin-analytics-results.tsx +95 -0
- package/src/components/admin/admin-analytics.tsx +104 -0
- package/src/components/admin/admin-audits.tsx +12 -15
- package/src/components/admin/admin-files.tsx +10 -18
- package/src/components/admin/admin-jobs-executions-panel.tsx +2 -1
- package/src/components/admin/admin-jobs.tsx +3 -1
- package/src/components/admin/admin-keys-token-dialog.tsx +123 -0
- package/src/components/admin/admin-keys.tsx +54 -3
- package/src/components/admin/admin-layout.tsx +107 -0
- package/src/components/admin/admin-payments.tsx +4 -5
- package/src/components/admin/admin-router-options.tsx +150 -0
- package/src/components/admin/admin-router-page.tsx +74 -0
- package/src/components/admin/admin-router.tsx +379 -0
- package/src/components/admin/admin-sessions.tsx +2 -16
- package/src/components/admin/admin-user-cell.tsx +70 -0
- package/src/components/admin/admin-user-detail-overview-tab.tsx +28 -0
- package/src/components/admin/admin-user-detail-profile-policy.spec.ts +146 -0
- package/src/components/admin/admin-user-detail-profile-policy.ts +147 -0
- package/src/components/admin/admin-user-detail-security-tab.tsx +1 -1
- package/src/components/admin/admin-user-detail.tsx +76 -32
- package/src/components/admin/admin-users-status-filter.tsx +2 -0
- package/src/components/admin/admin-workflows-execution-sheet.tsx +277 -0
- package/src/components/admin/admin-workflows-executions-panel.tsx +170 -0
- package/src/components/admin/admin-workflows-status-badge.tsx +40 -0
- package/src/components/admin/admin-workflows.tsx +207 -0
- package/src/components/alepha-table/alepha-table.tsx +91 -19
- package/src/components/app-actions/__tests__/app-actions.browser.spec.tsx +79 -0
- package/src/components/app-actions/app-actions.tsx +118 -0
- package/src/components/app-shell/app-shell.tsx +122 -0
- package/src/components/auth/auth-register.tsx +55 -17
- package/src/components/auth/auth-reset-password.tsx +81 -8
- package/src/components/auto-form/__tests__/auto-form-settings-card.browser.spec.tsx +237 -0
- package/src/components/auto-form/auto-form.tsx +113 -27
- package/src/components/button-user/button-user.tsx +121 -5
- package/src/components/control/control.tsx +47 -79
- package/src/components/control-base/form-field.tsx +60 -3
- package/src/components/control-password/control-password.tsx +87 -0
- package/src/components/control-select/__tests__/control-select-clear-label.browser.spec.tsx +101 -0
- package/src/components/control-select/__tests__/control-select-searchable.browser.spec.tsx +142 -0
- package/src/components/control-select/control-select.tsx +78 -111
- package/src/components/control-upload/control-upload.tsx +27 -1
- package/src/components/markdown-view/__tests__/markdown-view-raw-html.browser.spec.tsx +48 -0
- package/src/components/markdown-view/markdown-view.tsx +14 -0
- package/src/components/nav-shell/__tests__/nav-tree-util.spec.ts +88 -0
- package/src/components/nav-shell/nav-page.tsx +3 -3
- package/src/components/nav-shell/nav-tree-util.ts +48 -0
- package/src/components/nav-shell/use-nav-entries.ts +11 -2
- package/src/components/settings/__tests__/settings-nav.browser.spec.tsx +123 -0
- package/src/components/settings/__tests__/settings-section.browser.spec.tsx +130 -0
- package/src/components/settings/settings-danger-section.tsx +59 -0
- package/src/components/settings/settings-heading.tsx +55 -0
- package/src/components/settings/settings-layout.tsx +115 -0
- package/src/components/settings/settings-nav.tsx +175 -0
- package/src/components/settings/settings-row.tsx +81 -0
- package/src/components/settings/settings-section.tsx +52 -0
- package/src/components/ui/dropdown-menu.tsx +9 -1
- package/src/components/ui/segmented.tsx +19 -2
- package/src/lib/i18n-fr.ts +68 -0
- package/src/lib/resize-image.ts +135 -0
- package/src/styles.css +126 -1
- /package/src/components/{admin/admin-user-detail-provider-labels.ts → auth/provider-labels.ts} +0 -0
|
@@ -2,6 +2,10 @@ import * as React from "react";
|
|
|
2
2
|
|
|
3
3
|
void React;
|
|
4
4
|
|
|
5
|
+
import {
|
|
6
|
+
TurnstileWidget,
|
|
7
|
+
type TurnstileWidgetHandle,
|
|
8
|
+
} from "@alepha/ui/components/captcha/turnstile-widget";
|
|
5
9
|
import { Control } from "@alepha/ui/components/control/control";
|
|
6
10
|
import { iconFor } from "@alepha/ui/components/control-base/icon-hint";
|
|
7
11
|
import { Alert, AlertDescription } from "@alepha/ui/components/ui/alert";
|
|
@@ -25,7 +29,7 @@ import { useForm, useFormState } from "alepha/react/form";
|
|
|
25
29
|
import { useI18n } from "alepha/react/i18n";
|
|
26
30
|
import { useRouter } from "alepha/react/router";
|
|
27
31
|
import { AlertCircle, CheckCircle2, Info } from "lucide-react";
|
|
28
|
-
import { type ReactNode, useState } from "react";
|
|
32
|
+
import { type ReactNode, useEffect, useRef, useState } from "react";
|
|
29
33
|
|
|
30
34
|
export interface AuthResetPasswordProps {
|
|
31
35
|
/**
|
|
@@ -78,15 +82,56 @@ export function AuthResetPassword(props: AuthResetPasswordProps) {
|
|
|
78
82
|
const linkQ = [realmBit, redirectBit].filter(Boolean).join("&");
|
|
79
83
|
const realmQuery = linkQ ? `?${linkQ}` : "";
|
|
80
84
|
|
|
85
|
+
/**
|
|
86
|
+
* Captcha, mirroring the registration screen.
|
|
87
|
+
*
|
|
88
|
+
* `createPasswordResetIntent` rejects a request with no token whenever the
|
|
89
|
+
* realm sets `captchaRequired` — it sends mail in our name, so it is gated
|
|
90
|
+
* exactly like registration. Without a widget here the screen could not
|
|
91
|
+
* satisfy that gate at all and every reset answered 400.
|
|
92
|
+
*/
|
|
93
|
+
const captchaSiteKey = props.realmConfig.captchaSiteKey;
|
|
94
|
+
const [captchaToken, setCaptchaToken] = useState<string | undefined>();
|
|
95
|
+
const captchaRef = useRef<TurnstileWidgetHandle | null>(null);
|
|
96
|
+
/*
|
|
97
|
+
* `useForm` memoizes its handler at form-create time, so the handler closes
|
|
98
|
+
* over the *initial* `captchaToken` — `undefined` — and would post that
|
|
99
|
+
* forever. Mirror the live value into a ref the handler reads at submit
|
|
100
|
+
* time. Same reason, same fix as `auth-register.tsx`.
|
|
101
|
+
*/
|
|
102
|
+
const captchaTokenRef = useRef<string | undefined>(undefined);
|
|
103
|
+
useEffect(() => {
|
|
104
|
+
captchaTokenRef.current = captchaToken;
|
|
105
|
+
}, [captchaToken]);
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Turnstile tokens are single-use, and both the first send and every resend
|
|
109
|
+
* hit the same gated endpoint. Drop the spent token and re-arm the widget
|
|
110
|
+
* so the next request carries a fresh one rather than a replay the server
|
|
111
|
+
* will refuse.
|
|
112
|
+
*/
|
|
113
|
+
const consumeCaptcha = () => {
|
|
114
|
+
if (!captchaSiteKey) return;
|
|
115
|
+
setCaptchaToken(undefined);
|
|
116
|
+
captchaRef.current?.reset();
|
|
117
|
+
};
|
|
118
|
+
|
|
81
119
|
const emailForm = useForm({
|
|
82
120
|
schema: resetPasswordRequestSchema,
|
|
83
121
|
handler: async (data) => {
|
|
84
122
|
setError(null);
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
123
|
+
try {
|
|
124
|
+
const intent = await userCtrl.createPasswordResetIntent({
|
|
125
|
+
query: { userRealmName: props.realmConfig.realmName },
|
|
126
|
+
body: {
|
|
127
|
+
email: data.email,
|
|
128
|
+
captchaToken: captchaSiteKey ? captchaTokenRef.current : undefined,
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
setState({ step: "code", intent, email: data.email });
|
|
132
|
+
} finally {
|
|
133
|
+
consumeCaptcha();
|
|
134
|
+
}
|
|
90
135
|
},
|
|
91
136
|
});
|
|
92
137
|
|
|
@@ -140,7 +185,10 @@ export function AuthResetPassword(props: AuthResetPasswordProps) {
|
|
|
140
185
|
try {
|
|
141
186
|
const intent = await userCtrl.createPasswordResetIntent({
|
|
142
187
|
query: { userRealmName: props.realmConfig.realmName },
|
|
143
|
-
body: {
|
|
188
|
+
body: {
|
|
189
|
+
email: state.email,
|
|
190
|
+
captchaToken: captchaSiteKey ? captchaTokenRef.current : undefined,
|
|
191
|
+
},
|
|
144
192
|
});
|
|
145
193
|
setState((s) => ({ ...s, intent }));
|
|
146
194
|
} catch (e) {
|
|
@@ -153,6 +201,7 @@ export function AuthResetPassword(props: AuthResetPasswordProps) {
|
|
|
153
201
|
);
|
|
154
202
|
} finally {
|
|
155
203
|
setSubmitting(false);
|
|
204
|
+
consumeCaptcha();
|
|
156
205
|
}
|
|
157
206
|
};
|
|
158
207
|
|
|
@@ -213,7 +262,19 @@ export function AuthResetPassword(props: AuthResetPasswordProps) {
|
|
|
213
262
|
input={emailForm.input.email}
|
|
214
263
|
icon={iconFor("email")}
|
|
215
264
|
/>
|
|
216
|
-
|
|
265
|
+
{captchaSiteKey && (
|
|
266
|
+
<TurnstileWidget
|
|
267
|
+
ref={captchaRef}
|
|
268
|
+
siteKey={captchaSiteKey}
|
|
269
|
+
onToken={setCaptchaToken}
|
|
270
|
+
className="flex justify-center"
|
|
271
|
+
/>
|
|
272
|
+
)}
|
|
273
|
+
<Button
|
|
274
|
+
type="submit"
|
|
275
|
+
loading={emailSubmitting}
|
|
276
|
+
disabled={!!captchaSiteKey && !captchaToken}
|
|
277
|
+
>
|
|
217
278
|
{tr("auth.reset.sendCode", {
|
|
218
279
|
default: "Send verification code",
|
|
219
280
|
})}
|
|
@@ -258,10 +319,22 @@ export function AuthResetPassword(props: AuthResetPasswordProps) {
|
|
|
258
319
|
<Button onClick={handleCodeSubmit} disabled={code.length !== 6}>
|
|
259
320
|
{tr("auth.reset.continue", { default: "Continue" })}
|
|
260
321
|
</Button>
|
|
322
|
+
{/* Resend calls the same gated endpoint as the first send,
|
|
323
|
+
and the token that got us here is already spent — so this
|
|
324
|
+
step needs its own challenge rather than reusing one. */}
|
|
325
|
+
{captchaSiteKey && (
|
|
326
|
+
<TurnstileWidget
|
|
327
|
+
ref={captchaRef}
|
|
328
|
+
siteKey={captchaSiteKey}
|
|
329
|
+
onToken={setCaptchaToken}
|
|
330
|
+
className="flex justify-center"
|
|
331
|
+
/>
|
|
332
|
+
)}
|
|
261
333
|
<Button
|
|
262
334
|
variant="ghost"
|
|
263
335
|
onClick={handleResend}
|
|
264
336
|
loading={submitting}
|
|
337
|
+
disabled={!!captchaSiteKey && !captchaToken}
|
|
265
338
|
>
|
|
266
339
|
{tr("auth.reset.resend", { default: "Resend code" })}
|
|
267
340
|
</Button>
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
import { render, screen } from "@testing-library/react";
|
|
2
|
+
import { Alepha, z } from "alepha";
|
|
3
|
+
import { AlephaLogger } from "alepha/logger";
|
|
4
|
+
import { AlephaContext } from "alepha/react";
|
|
5
|
+
import { useForm } from "alepha/react/form";
|
|
6
|
+
import { AlephaReactI18n } from "alepha/react/i18n";
|
|
7
|
+
import type { ReactNode } from "react";
|
|
8
|
+
import { describe, expect, it } from "vitest";
|
|
9
|
+
import { AutoForm, type AutoFormProps } from "../auto-form.tsx";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* `layout="row"` is not a near-miss of the settings-card shape, it is that
|
|
13
|
+
* shape — so these pin the three things that make it one and are invisible in
|
|
14
|
+
* a screenshot review: the action bar belongs to the card rather than to a
|
|
15
|
+
* second bordered box under it, the heading comes from `SettingsHeading`, and
|
|
16
|
+
* a text control takes the settings column width.
|
|
17
|
+
*
|
|
18
|
+
* The regression these guard against is the reverse direction too: the grid
|
|
19
|
+
* layout and `autoSave` must keep the chrome they had, since every existing
|
|
20
|
+
* caller is one of those.
|
|
21
|
+
*/
|
|
22
|
+
describe("AutoForm settings-card layout", () => {
|
|
23
|
+
const start = async () => {
|
|
24
|
+
const alepha = Alepha.create().with(AlephaLogger).with(AlephaReactI18n);
|
|
25
|
+
await alepha.start();
|
|
26
|
+
return alepha;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const mount = (alepha: Alepha, ui: ReactNode) =>
|
|
30
|
+
render(
|
|
31
|
+
<AlephaContext.Provider value={alepha}>{ui}</AlephaContext.Provider>,
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
const Probe = (props: Partial<AutoFormProps<any>>) => {
|
|
35
|
+
const form = useForm({
|
|
36
|
+
initialValues: { username: "" },
|
|
37
|
+
schema: z.object({ username: z.string() }),
|
|
38
|
+
handler: () => {},
|
|
39
|
+
});
|
|
40
|
+
return (
|
|
41
|
+
<AutoForm
|
|
42
|
+
form={form}
|
|
43
|
+
fields={{ username: { label: "Username" } }}
|
|
44
|
+
{...props}
|
|
45
|
+
/>
|
|
46
|
+
);
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
it("renders the action bar as the card's own last row", async () => {
|
|
50
|
+
const alepha = await start();
|
|
51
|
+
const { container } = mount(
|
|
52
|
+
alepha,
|
|
53
|
+
<Probe layout="row" groups={[{ fields: ["username"] }]} />,
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
const card = container.querySelector(".divide-y");
|
|
57
|
+
expect(card).toBeTruthy();
|
|
58
|
+
// Inside the card, so `divide-y` draws the rule above it. A standalone bar
|
|
59
|
+
// would sit outside and read as a second card.
|
|
60
|
+
expect(card?.contains(screen.getByRole("button", { name: "Save" }))).toBe(
|
|
61
|
+
true,
|
|
62
|
+
);
|
|
63
|
+
expect(card?.contains(screen.getByRole("button", { name: "Reset" }))).toBe(
|
|
64
|
+
true,
|
|
65
|
+
);
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("gives the action row the same padding as a field row", async () => {
|
|
69
|
+
const alepha = await start();
|
|
70
|
+
const { container } = mount(
|
|
71
|
+
alepha,
|
|
72
|
+
<Probe layout="row" groups={[{ fields: ["username"] }]} />,
|
|
73
|
+
);
|
|
74
|
+
|
|
75
|
+
const card = container.querySelector(".divide-y");
|
|
76
|
+
const rows = Array.from(card?.children ?? []);
|
|
77
|
+
// Field row, then action row — and both on the card's `px-4 py-3` rhythm,
|
|
78
|
+
// or the rule above the buttons lands at a different inset than the ones
|
|
79
|
+
// between fields.
|
|
80
|
+
expect(rows).toHaveLength(2);
|
|
81
|
+
for (const row of rows) {
|
|
82
|
+
expect(row.className).toContain("px-4");
|
|
83
|
+
expect(row.className).toContain("py-3");
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
it("matches the card chrome SettingsSection renders", async () => {
|
|
88
|
+
const alepha = await start();
|
|
89
|
+
const { container } = mount(
|
|
90
|
+
alepha,
|
|
91
|
+
<Probe layout="row" groups={[{ fields: ["username"] }]} />,
|
|
92
|
+
);
|
|
93
|
+
|
|
94
|
+
const card = container.querySelector(".divide-y");
|
|
95
|
+
for (const cls of ["rounded-lg", "border", "bg-card", "shadow-sm"]) {
|
|
96
|
+
expect(card?.className).toContain(cls);
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
it("renders a group description above the card", async () => {
|
|
101
|
+
const alepha = await start();
|
|
102
|
+
mount(
|
|
103
|
+
alepha,
|
|
104
|
+
<Probe
|
|
105
|
+
layout="row"
|
|
106
|
+
groups={[
|
|
107
|
+
{
|
|
108
|
+
title: "Name",
|
|
109
|
+
description: "How you are identified to other people.",
|
|
110
|
+
fields: ["username"],
|
|
111
|
+
},
|
|
112
|
+
]}
|
|
113
|
+
/>,
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
expect(screen.getByText("Name")).toBeTruthy();
|
|
117
|
+
expect(
|
|
118
|
+
screen.getByText("How you are identified to other people."),
|
|
119
|
+
).toBeTruthy();
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
it("gives a text control the settings column width", async () => {
|
|
123
|
+
const alepha = await start();
|
|
124
|
+
mount(alepha, <Probe layout="row" groups={[{ fields: ["username"] }]} />);
|
|
125
|
+
|
|
126
|
+
// The right-hand cell is an `auto` grid column, so `w-full` alone leaves
|
|
127
|
+
// the input at its ~172px intrinsic size and every card gets a different
|
|
128
|
+
// control column.
|
|
129
|
+
expect(
|
|
130
|
+
screen.getByRole("textbox", { name: "Username" }).className,
|
|
131
|
+
).toContain("sm:w-64");
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
it("lets a caller override the settings column width", async () => {
|
|
135
|
+
const alepha = await start();
|
|
136
|
+
mount(
|
|
137
|
+
alepha,
|
|
138
|
+
<Probe
|
|
139
|
+
layout="row"
|
|
140
|
+
groups={[{ fields: ["username"] }]}
|
|
141
|
+
fields={{
|
|
142
|
+
username: {
|
|
143
|
+
label: "Username",
|
|
144
|
+
inputProps: { className: "sm:w-96" },
|
|
145
|
+
},
|
|
146
|
+
}}
|
|
147
|
+
/>,
|
|
148
|
+
);
|
|
149
|
+
|
|
150
|
+
// tailwind-merge, not both classes landing on the element: at `sm` the
|
|
151
|
+
// caller's width has to be the only one that applies.
|
|
152
|
+
// `getByRole`, not `getByLabelText`: `username` is required here, and the
|
|
153
|
+
// marker `FormField` renders for that puts a literal "*" in the label's
|
|
154
|
+
// text content even though it is `aria-hidden`.
|
|
155
|
+
const className = screen.getByRole("textbox", {
|
|
156
|
+
name: "Username",
|
|
157
|
+
}).className;
|
|
158
|
+
expect(className).toContain("sm:w-96");
|
|
159
|
+
expect(className).not.toContain("sm:w-64");
|
|
160
|
+
});
|
|
161
|
+
|
|
162
|
+
it("marks a required field with an asterisk by default", async () => {
|
|
163
|
+
const alepha = await start();
|
|
164
|
+
mount(alepha, <Probe layout="row" groups={[{ fields: ["username"] }]} />);
|
|
165
|
+
|
|
166
|
+
expect(screen.getByText("*")).toBeTruthy();
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
it("hides the asterisk under requiredMarker={false}", async () => {
|
|
170
|
+
const alepha = await start();
|
|
171
|
+
mount(
|
|
172
|
+
alepha,
|
|
173
|
+
<Probe
|
|
174
|
+
layout="row"
|
|
175
|
+
requiredMarker={false}
|
|
176
|
+
groups={[{ fields: ["username"] }]}
|
|
177
|
+
/>,
|
|
178
|
+
);
|
|
179
|
+
|
|
180
|
+
expect(screen.queryByText("*")).toBeNull();
|
|
181
|
+
});
|
|
182
|
+
|
|
183
|
+
it("still announces the field as required with the marker hidden", async () => {
|
|
184
|
+
const alepha = await start();
|
|
185
|
+
mount(
|
|
186
|
+
alepha,
|
|
187
|
+
<Probe
|
|
188
|
+
layout="row"
|
|
189
|
+
requiredMarker={false}
|
|
190
|
+
groups={[{ fields: ["username"] }]}
|
|
191
|
+
/>,
|
|
192
|
+
);
|
|
193
|
+
|
|
194
|
+
// The asterisk is `aria-hidden`, so it never carried this to a screen
|
|
195
|
+
// reader — `aria-required` does, and it comes from the schema. If hiding
|
|
196
|
+
// the marker ever took this with it, the prop would have quietly turned a
|
|
197
|
+
// cosmetic choice into an accessibility regression.
|
|
198
|
+
expect(
|
|
199
|
+
screen
|
|
200
|
+
.getByRole("textbox", { name: "Username" })
|
|
201
|
+
.getAttribute("aria-required"),
|
|
202
|
+
).toBe("true");
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
it("still hides the action bar under autoSave", async () => {
|
|
206
|
+
const alepha = await start();
|
|
207
|
+
mount(
|
|
208
|
+
alepha,
|
|
209
|
+
<Probe layout="row" autoSave groups={[{ fields: ["username"] }]} />,
|
|
210
|
+
);
|
|
211
|
+
|
|
212
|
+
expect(screen.queryByRole("button", { name: "Save" })).toBeNull();
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
it("leaves the grid layout's standalone bar alone", async () => {
|
|
216
|
+
const alepha = await start();
|
|
217
|
+
const { container } = mount(
|
|
218
|
+
alepha,
|
|
219
|
+
<Probe groups={[{ fields: ["username"] }]} />,
|
|
220
|
+
);
|
|
221
|
+
|
|
222
|
+
// No settings card at all in the grid layout, so the bar has nowhere to
|
|
223
|
+
// move into and must still render as its own bordered box.
|
|
224
|
+
expect(container.querySelector(".divide-y")).toBeNull();
|
|
225
|
+
const save = screen.getByRole("button", { name: "Save" });
|
|
226
|
+
expect(save.closest(".rounded-md")?.className).toContain("border");
|
|
227
|
+
});
|
|
228
|
+
|
|
229
|
+
it("keeps the submit button when the schema resolves to no fields", async () => {
|
|
230
|
+
const alepha = await start();
|
|
231
|
+
// A group whose fields do not exist on the form used to render nothing at
|
|
232
|
+
// all, which in row layout would have taken the action bar down with it.
|
|
233
|
+
mount(alepha, <Probe layout="row" groups={[{ fields: ["nope"] }]} />);
|
|
234
|
+
|
|
235
|
+
expect(screen.getByRole("button", { name: "Save" })).toBeTruthy();
|
|
236
|
+
});
|
|
237
|
+
});
|
|
@@ -9,9 +9,11 @@ import {
|
|
|
9
9
|
import {
|
|
10
10
|
FormFieldAutoSaveProvider,
|
|
11
11
|
FormFieldLayoutProvider,
|
|
12
|
+
FormFieldRequiredMarkerProvider,
|
|
12
13
|
} from "@alepha/ui/components/control-base/form-field";
|
|
13
14
|
import { spanClass, widthFor } from "@alepha/ui/components/control-base/grid";
|
|
14
15
|
import { iconFor } from "@alepha/ui/components/control-base/icon-hint";
|
|
16
|
+
import { SettingsHeading } from "@alepha/ui/components/settings/settings-heading";
|
|
15
17
|
import { Button } from "@alepha/ui/components/ui/button";
|
|
16
18
|
import {
|
|
17
19
|
Card,
|
|
@@ -35,7 +37,7 @@ import {
|
|
|
35
37
|
useFormState,
|
|
36
38
|
} from "alepha/react/form";
|
|
37
39
|
import { useI18n } from "alepha/react/i18n";
|
|
38
|
-
import { AlertCircle,
|
|
40
|
+
import { AlertCircle, X } from "lucide-react";
|
|
39
41
|
import { type ReactNode, useEffect, useMemo, useState } from "react";
|
|
40
42
|
|
|
41
43
|
/**
|
|
@@ -90,6 +92,14 @@ export interface AutoFormGroup {
|
|
|
90
92
|
* Group title shown in the header.
|
|
91
93
|
*/
|
|
92
94
|
title?: string;
|
|
95
|
+
/**
|
|
96
|
+
* One line under the title, for context the fields should not each repeat.
|
|
97
|
+
*
|
|
98
|
+
* Only rendered in `layout="row"`, where the heading sits above the card
|
|
99
|
+
* and there is room for it — the boxed group bar the grid layout uses is a
|
|
100
|
+
* single line by construction.
|
|
101
|
+
*/
|
|
102
|
+
description?: string;
|
|
93
103
|
/**
|
|
94
104
|
* Icon name (lucide) for the group header.
|
|
95
105
|
*/
|
|
@@ -190,6 +200,22 @@ export interface AutoFormProps<T extends ZObject> {
|
|
|
190
200
|
*/
|
|
191
201
|
disabled?: boolean;
|
|
192
202
|
|
|
203
|
+
/**
|
|
204
|
+
* Show the red `*` next to the label of every required field.
|
|
205
|
+
*
|
|
206
|
+
* Set `false` on a form where the marker is not news — one whose fields are
|
|
207
|
+
* nearly all required, or where the one required field is self-evidently so
|
|
208
|
+
* (a project's Name). A page of asterisks tells the reader nothing about
|
|
209
|
+
* which field to be careful with, which is the only thing the marker is for.
|
|
210
|
+
*
|
|
211
|
+
* Purely visual. `aria-required` still comes from the schema, so a screen
|
|
212
|
+
* reader announces the field as required either way — the marker itself is
|
|
213
|
+
* `aria-hidden` and never carried that.
|
|
214
|
+
*
|
|
215
|
+
* @default true
|
|
216
|
+
*/
|
|
217
|
+
requiredMarker?: boolean;
|
|
218
|
+
|
|
193
219
|
/**
|
|
194
220
|
* Cancel button — hidden when omitted.
|
|
195
221
|
*/
|
|
@@ -259,6 +285,14 @@ export interface AutoFormProps<T extends ZObject> {
|
|
|
259
285
|
* - `"row"`: settings-style — each control sits on its own line with the
|
|
260
286
|
* label/description on the left and the control on the right. Each
|
|
261
287
|
* group renders as a bordered card with horizontal dividers.
|
|
288
|
+
*
|
|
289
|
+
* `"row"` **is** the settings-card shape, not an approximation of it: the
|
|
290
|
+
* rows render the same markup as {@link SettingsRow}, the card the same as
|
|
291
|
+
* {@link SettingsSection}, the heading through the same
|
|
292
|
+
* {@link SettingsHeading}, and the action bar as the card's own last
|
|
293
|
+
* divided row. So a settings card whose rows are form fields should be an
|
|
294
|
+
* `AutoForm`, and reach for `SettingsSection` only for the rows that are
|
|
295
|
+
* *not* fields — an avatar picker, a read-only value, a lone button.
|
|
262
296
|
*/
|
|
263
297
|
layout?: "stack" | "row";
|
|
264
298
|
|
|
@@ -371,25 +405,7 @@ export function AutoForm<T extends ZObject>(props: AutoFormProps<T>) {
|
|
|
371
405
|
props.headerAction
|
|
372
406
|
);
|
|
373
407
|
|
|
374
|
-
const
|
|
375
|
-
<FormFieldLayoutProvider value={props.layout ?? "stack"}>
|
|
376
|
-
<FormFieldAutoSaveProvider value={autoSaveEnabled}>
|
|
377
|
-
{resolvedGroups.map((group, gi) => (
|
|
378
|
-
<GroupBlock
|
|
379
|
-
key={gi}
|
|
380
|
-
group={group}
|
|
381
|
-
inputs={inputs}
|
|
382
|
-
disabled={props.disabled}
|
|
383
|
-
fields={props.fields}
|
|
384
|
-
i18nPrefix={props.i18nPrefix}
|
|
385
|
-
multiGroup={resolvedGroups.length > 1}
|
|
386
|
-
layout={props.layout ?? "stack"}
|
|
387
|
-
gridClassName={props.gridClassName}
|
|
388
|
-
/>
|
|
389
|
-
))}
|
|
390
|
-
</FormFieldAutoSaveProvider>
|
|
391
|
-
</FormFieldLayoutProvider>
|
|
392
|
-
);
|
|
408
|
+
const layout = props.layout ?? "stack";
|
|
393
409
|
|
|
394
410
|
const bottomBarProps = {
|
|
395
411
|
form: props.form,
|
|
@@ -404,6 +420,44 @@ export function AutoForm<T extends ZObject>(props: AutoFormProps<T>) {
|
|
|
404
420
|
actions: props.actions,
|
|
405
421
|
};
|
|
406
422
|
|
|
423
|
+
// In row layout the action bar is the card's own last row, not a second
|
|
424
|
+
// bordered box floating under it — see the `layout` prop's note. `card`
|
|
425
|
+
// mode already owns its footer (`CardFooter`), and a form that resolved to
|
|
426
|
+
// no groups at all has nothing to put the bar inside, so both fall back to
|
|
427
|
+
// the standalone bar below.
|
|
428
|
+
const inCardBottomBar =
|
|
429
|
+
layout === "row" &&
|
|
430
|
+
!props.card &&
|
|
431
|
+
!skipBottomBar &&
|
|
432
|
+
resolvedGroups.length ? (
|
|
433
|
+
<BottomBar {...bottomBarProps} bare />
|
|
434
|
+
) : undefined;
|
|
435
|
+
|
|
436
|
+
const fieldGroups = (
|
|
437
|
+
<FormFieldLayoutProvider value={layout}>
|
|
438
|
+
<FormFieldRequiredMarkerProvider value={props.requiredMarker ?? true}>
|
|
439
|
+
<FormFieldAutoSaveProvider value={autoSaveEnabled}>
|
|
440
|
+
{resolvedGroups.map((group, gi) => (
|
|
441
|
+
<GroupBlock
|
|
442
|
+
key={gi}
|
|
443
|
+
group={group}
|
|
444
|
+
inputs={inputs}
|
|
445
|
+
disabled={props.disabled}
|
|
446
|
+
fields={props.fields}
|
|
447
|
+
i18nPrefix={props.i18nPrefix}
|
|
448
|
+
multiGroup={resolvedGroups.length > 1}
|
|
449
|
+
layout={layout}
|
|
450
|
+
gridClassName={props.gridClassName}
|
|
451
|
+
bottomBar={
|
|
452
|
+
gi === resolvedGroups.length - 1 ? inCardBottomBar : undefined
|
|
453
|
+
}
|
|
454
|
+
/>
|
|
455
|
+
))}
|
|
456
|
+
</FormFieldAutoSaveProvider>
|
|
457
|
+
</FormFieldRequiredMarkerProvider>
|
|
458
|
+
</FormFieldLayoutProvider>
|
|
459
|
+
);
|
|
460
|
+
|
|
407
461
|
if (props.card) {
|
|
408
462
|
const cardClassName =
|
|
409
463
|
typeof props.card === "string" ? props.card : undefined;
|
|
@@ -500,7 +554,9 @@ export function AutoForm<T extends ZObject>(props: AutoFormProps<T>) {
|
|
|
500
554
|
|
|
501
555
|
{props.footer}
|
|
502
556
|
|
|
503
|
-
{!skipBottomBar &&
|
|
557
|
+
{!skipBottomBar && !inCardBottomBar && (
|
|
558
|
+
<BottomBar {...bottomBarProps} />
|
|
559
|
+
)}
|
|
504
560
|
</div>
|
|
505
561
|
</form>
|
|
506
562
|
);
|
|
@@ -517,6 +573,12 @@ interface GroupBlockProps {
|
|
|
517
573
|
multiGroup?: boolean;
|
|
518
574
|
layout: "stack" | "row";
|
|
519
575
|
gridClassName?: string;
|
|
576
|
+
/**
|
|
577
|
+
* The form's action bar, rendered as this group's last divided row. Set by
|
|
578
|
+
* `AutoForm` on the *last* group in `layout="row"`; `undefined` everywhere
|
|
579
|
+
* else, including every group in the grid layout.
|
|
580
|
+
*/
|
|
581
|
+
bottomBar?: ReactNode;
|
|
520
582
|
}
|
|
521
583
|
|
|
522
584
|
function GroupBlock(props: GroupBlockProps) {
|
|
@@ -566,7 +628,10 @@ function GroupBlock(props: GroupBlockProps) {
|
|
|
566
628
|
props: Partial<ControlProps>;
|
|
567
629
|
}>;
|
|
568
630
|
|
|
569
|
-
|
|
631
|
+
// `!props.bottomBar`: a group carrying the action bar still renders when it
|
|
632
|
+
// has no resolvable fields, or the form would silently lose its submit
|
|
633
|
+
// button rather than merely render empty.
|
|
634
|
+
if (!items.length && !props.multiGroup && !props.bottomBar) return null;
|
|
570
635
|
|
|
571
636
|
// Naked group: no title, no icon → no card chrome (lets solo complex
|
|
572
637
|
// fields render with just their own header).
|
|
@@ -575,12 +640,23 @@ function GroupBlock(props: GroupBlockProps) {
|
|
|
575
640
|
// Row layout: each group becomes a divider-stacked card, every Control
|
|
576
641
|
// takes a full row through its own FormField row layout (via context).
|
|
577
642
|
if (props.layout === "row") {
|
|
643
|
+
const hasHeading = !!(group.title || group.description);
|
|
578
644
|
return (
|
|
579
645
|
<div>
|
|
580
|
-
{
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
646
|
+
{hasHeading && (
|
|
647
|
+
// `SettingsHeading` rather than a local span pair: this is the same
|
|
648
|
+
// heading `SettingsSection` renders, and the whole reason that
|
|
649
|
+
// component exists is that there be exactly one of it. `items-start`
|
|
650
|
+
// + `mt-0.5` keeps the icon on the title line when a description
|
|
651
|
+
// wraps a second one under it.
|
|
652
|
+
<div className="mb-2 flex items-start gap-2">
|
|
653
|
+
{Icon && (
|
|
654
|
+
<Icon className="text-muted-foreground mt-0.5 size-4 shrink-0" />
|
|
655
|
+
)}
|
|
656
|
+
<SettingsHeading
|
|
657
|
+
title={group.title}
|
|
658
|
+
description={group.description}
|
|
659
|
+
/>
|
|
584
660
|
</div>
|
|
585
661
|
)}
|
|
586
662
|
<div className="bg-card divide-y rounded-lg border shadow-sm">
|
|
@@ -592,6 +668,11 @@ function GroupBlock(props: GroupBlockProps) {
|
|
|
592
668
|
disabled={props.disabled || it.props.disabled}
|
|
593
669
|
/>
|
|
594
670
|
))}
|
|
671
|
+
{props.bottomBar && (
|
|
672
|
+
// Same `px-4 py-3` every row carries, so the action row sits on
|
|
673
|
+
// the card's own rhythm and `divide-y` draws its rule flush.
|
|
674
|
+
<div className="px-4 py-3">{props.bottomBar}</div>
|
|
675
|
+
)}
|
|
595
676
|
</div>
|
|
596
677
|
</div>
|
|
597
678
|
);
|
|
@@ -697,7 +778,12 @@ function BottomBar(props: BottomBarProps) {
|
|
|
697
778
|
onClick={() => props.form.reset()}
|
|
698
779
|
disabled={props.disabled || !props.dirty}
|
|
699
780
|
>
|
|
700
|
-
|
|
781
|
+
{/* No icon, deliberately. The submit button next to it carries none
|
|
782
|
+
— a glyph would have to be either a dated floppy disk or a tick
|
|
783
|
+
that reads as "done" rather than "do it" — and a bar where only
|
|
784
|
+
some buttons are decorated reads as unfinished rather than as a
|
|
785
|
+
hierarchy. `Button` still shows a spinner while submitting,
|
|
786
|
+
which is the one icon here that carries information. */}
|
|
701
787
|
{tr("autoForm.reset", { default: "Reset" })}
|
|
702
788
|
</Button>
|
|
703
789
|
)}
|