@eifi1/ui-kit 0.33.0 → 0.34.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 +445 -283
- package/dist/account/account-parts.d.ts +6 -8
- package/dist/account/account-parts.js +1 -2
- package/dist/account/account-parts.js.map +1 -1
- package/dist/{components → account}/account-settings-labels.d.ts +16 -10
- package/dist/{components → account}/account-settings-labels.js +3 -1
- package/dist/account/account-settings-labels.js.map +1 -0
- package/dist/{components → account}/account-settings.d.ts +53 -23
- package/dist/{components → account}/account-settings.js +97 -26
- package/dist/account/account-settings.js.map +1 -0
- package/dist/account/data-export-setting-labels.d.ts +2 -0
- package/dist/account/data-export-setting-labels.js +15 -0
- package/dist/account/data-export-setting-labels.js.map +1 -0
- package/dist/account/data-export-setting.d.ts +9 -11
- package/dist/account/data-export-setting.js +11 -27
- package/dist/account/data-export-setting.js.map +1 -1
- package/dist/account/delete-account-setting-labels.d.ts +2 -0
- package/dist/account/delete-account-setting-labels.js +23 -0
- package/dist/account/delete-account-setting-labels.js.map +1 -0
- package/dist/account/delete-account-setting.d.ts +132 -100
- package/dist/account/delete-account-setting.js +7 -23
- package/dist/account/delete-account-setting.js.map +1 -1
- package/dist/account/email-change-setting-labels.d.ts +2 -0
- package/dist/account/email-change-setting-labels.js +28 -0
- package/dist/account/email-change-setting-labels.js.map +1 -0
- package/dist/account/email-change-setting.d.ts +10 -12
- package/dist/account/email-change-setting.js +11 -30
- package/dist/account/email-change-setting.js.map +1 -1
- package/dist/{components → account}/passkeys-setting.d.ts +9 -12
- package/dist/{components → account}/passkeys-setting.js +10 -7
- package/dist/account/passkeys-setting.js.map +1 -0
- package/dist/account/sessions-setting-labels.d.ts +2 -0
- package/dist/account/sessions-setting-labels.js +22 -0
- package/dist/account/sessions-setting-labels.js.map +1 -0
- package/dist/account/sessions-setting.d.ts +12 -14
- package/dist/account/sessions-setting.js +8 -23
- package/dist/account/sessions-setting.js.map +1 -1
- package/dist/admin/admin-action-confirm-labels.d.ts +2 -0
- package/dist/admin/admin-action-confirm-labels.js +16 -0
- package/dist/admin/admin-action-confirm-labels.js.map +1 -0
- package/dist/admin/admin-action-confirm.d.ts +156 -100
- package/dist/admin/admin-action-confirm.js +17 -22
- package/dist/admin/admin-action-confirm.js.map +1 -1
- package/dist/admin/admin-action-log-labels.d.ts +2 -0
- package/dist/admin/admin-action-log-labels.js +73 -0
- package/dist/admin/admin-action-log-labels.js.map +1 -0
- package/dist/admin/admin-action-log.d.ts +98 -22
- package/dist/admin/admin-action-log.js +48 -45
- package/dist/admin/admin-action-log.js.map +1 -1
- package/dist/admin/admin-parts.d.ts +7 -14
- package/dist/admin/admin-parts.js +0 -4
- package/dist/admin/admin-parts.js.map +1 -1
- package/dist/admin/invitations-panel-labels.d.ts +2 -0
- package/dist/admin/invitations-panel-labels.js +29 -0
- package/dist/admin/invitations-panel-labels.js.map +1 -0
- package/dist/admin/invitations-panel.d.ts +167 -100
- package/dist/admin/invitations-panel.js +12 -31
- package/dist/admin/invitations-panel.js.map +1 -1
- package/dist/admin/plan-change-labels.d.ts +2 -0
- package/dist/admin/plan-change-labels.js +22 -0
- package/dist/admin/plan-change-labels.js.map +1 -0
- package/dist/admin/plan-change.d.ts +244 -100
- package/dist/admin/plan-change.js +17 -23
- package/dist/admin/plan-change.js.map +1 -1
- package/dist/admin/reviewer-scope-editor-labels.d.ts +2 -0
- package/dist/admin/reviewer-scope-editor-labels.js +14 -0
- package/dist/admin/reviewer-scope-editor-labels.js.map +1 -0
- package/dist/admin/reviewer-scope-editor.d.ts +95 -100
- package/dist/admin/reviewer-scope-editor.js +5 -13
- package/dist/admin/reviewer-scope-editor.js.map +1 -1
- package/dist/admin/role-select-labels.d.ts +2 -0
- package/dist/admin/role-select-labels.js +15 -0
- package/dist/admin/role-select-labels.js.map +1 -0
- package/dist/admin/role-select.d.ts +136 -100
- package/dist/admin/role-select.js +7 -18
- package/dist/admin/role-select.js.map +1 -1
- package/dist/admin/transfer-ownership-dialog-labels.d.ts +2 -0
- package/dist/admin/transfer-ownership-dialog-labels.js +18 -0
- package/dist/admin/transfer-ownership-dialog-labels.js.map +1 -0
- package/dist/admin/transfer-ownership-dialog.d.ts +81 -100
- package/dist/admin/transfer-ownership-dialog.js +3 -15
- package/dist/admin/transfer-ownership-dialog.js.map +1 -1
- package/dist/admin/user-roster-labels.d.ts +2 -0
- package/dist/admin/user-roster-labels.js +16 -0
- package/dist/admin/user-roster-labels.js.map +1 -0
- package/dist/admin/user-roster.d.ts +225 -100
- package/dist/admin/user-roster.js +4 -14
- package/dist/admin/user-roster.js.map +1 -1
- package/dist/auth/accept-invitation-labels.d.ts +2 -0
- package/dist/auth/accept-invitation-labels.js +20 -0
- package/dist/auth/accept-invitation-labels.js.map +1 -0
- package/dist/auth/accept-invitation.d.ts +11 -13
- package/dist/auth/accept-invitation.js +3 -16
- package/dist/auth/accept-invitation.js.map +1 -1
- package/dist/auth/auth-errors.d.ts +34 -23
- package/dist/auth/auth-errors.js +8 -4
- package/dist/auth/auth-errors.js.map +1 -1
- package/dist/auth/complete-name-dialog-labels.d.ts +2 -0
- package/dist/auth/complete-name-dialog-labels.js +14 -0
- package/dist/auth/complete-name-dialog-labels.js.map +1 -0
- package/dist/auth/complete-name-dialog.d.ts +9 -11
- package/dist/auth/complete-name-dialog.js +4 -11
- package/dist/auth/complete-name-dialog.js.map +1 -1
- package/dist/auth/email-tag.d.ts +2 -4
- package/dist/auth/forgot-password-form-labels.d.ts +3 -0
- package/dist/auth/forgot-password-form-labels.js +17 -0
- package/dist/auth/forgot-password-form-labels.js.map +1 -0
- package/dist/auth/forgot-password-form.d.ts +9 -12
- package/dist/auth/forgot-password-form.js +6 -15
- package/dist/auth/forgot-password-form.js.map +1 -1
- package/dist/auth/form-rules.d.ts +5 -7
- package/dist/auth/new-password-fields.d.ts +4 -8
- package/dist/auth/new-password-fields.js +1 -1
- package/dist/auth/new-password-fields.js.map +1 -1
- package/dist/auth/not-found-page-labels.d.ts +2 -0
- package/dist/auth/not-found-page-labels.js +11 -0
- package/dist/auth/not-found-page-labels.js.map +1 -0
- package/dist/auth/not-found-page.d.ts +9 -11
- package/dist/auth/not-found-page.js +5 -10
- package/dist/auth/not-found-page.js.map +1 -1
- package/dist/auth/register-form-labels.d.ts +3 -0
- package/dist/auth/register-form-labels.js +28 -0
- package/dist/auth/register-form-labels.js.map +1 -0
- package/dist/auth/register-form.d.ts +174 -100
- package/dist/auth/register-form.js +11 -31
- package/dist/auth/register-form.js.map +1 -1
- package/dist/auth/reset-password-form-labels.d.ts +3 -0
- package/dist/auth/reset-password-form-labels.js +24 -0
- package/dist/auth/reset-password-form-labels.js.map +1 -0
- package/dist/auth/reset-password-form.d.ts +12 -15
- package/dist/auth/reset-password-form.js +6 -22
- package/dist/auth/reset-password-form.js.map +1 -1
- package/dist/auth/sign-in-form-labels.d.ts +3 -0
- package/dist/auth/sign-in-form-labels.js +42 -0
- package/dist/auth/sign-in-form-labels.js.map +1 -0
- package/dist/auth/sign-in-form.d.ts +15 -19
- package/dist/auth/sign-in-form.js +12 -46
- package/dist/auth/sign-in-form.js.map +1 -1
- package/dist/auth/status-parts.d.ts +13 -17
- package/dist/auth/status-parts.js +3 -3
- package/dist/auth/status-parts.js.map +1 -1
- package/dist/auth/verify-email-labels.d.ts +2 -0
- package/dist/auth/verify-email-labels.js +25 -0
- package/dist/auth/verify-email-labels.js.map +1 -0
- package/dist/auth/verify-email.d.ts +15 -17
- package/dist/auth/verify-email.js +4 -21
- package/dist/auth/verify-email.js.map +1 -1
- package/dist/billing/billing-banner.d.ts +8 -108
- package/dist/billing/billing-banner.js +2 -1
- package/dist/billing/billing-banner.js.map +1 -1
- package/dist/billing/billing-labels.d.ts +168 -100
- package/dist/billing/billing-labels.js.map +1 -1
- package/dist/billing/billing-lock.d.ts +10 -109
- package/dist/billing/billing-overview.d.ts +7 -108
- package/dist/billing/billing-standing.d.ts +6 -107
- package/dist/billing/checkout-processing.d.ts +8 -110
- package/dist/billing/checkout-processing.js +2 -9
- package/dist/billing/checkout-processing.js.map +1 -1
- package/dist/billing/checkout-return.d.ts +5 -7
- package/dist/billing/pay-page.d.ts +22 -119
- package/dist/billing/pay-page.js.map +1 -1
- package/dist/billing/plan-card.d.ts +14 -114
- package/dist/billing/plan-card.js +15 -13
- package/dist/billing/plan-card.js.map +1 -1
- package/dist/billing/plan-limit-notice.d.ts +8 -108
- package/dist/billing/plan-limit-notice.js +1 -1
- package/dist/billing/plan-limit-notice.js.map +1 -1
- package/dist/billing/plan-limit-toast.d.ts +6 -106
- package/dist/billing/plan-limit.d.ts +2 -4
- package/dist/billing/plan-price.d.ts +10 -12
- package/dist/billing/subscription-actions.d.ts +6 -108
- package/dist/billing/subscription-actions.js +2 -2
- package/dist/billing/subscription-actions.js.map +1 -1
- package/dist/billing/subscription-status-chip.d.ts +7 -107
- package/dist/chart.d.ts +12 -112
- package/dist/chart.js +4 -0
- package/dist/chart.js.map +1 -1
- package/dist/components/account-chips-labels.d.ts +10 -0
- package/dist/components/account-chips-labels.js +15 -0
- package/dist/components/account-chips-labels.js.map +1 -0
- package/dist/components/account-chips.d.ts +22 -44
- package/dist/components/account-chips.js +9 -14
- package/dist/components/account-chips.js.map +1 -1
- package/dist/components/alert-banner.d.ts +15 -11
- package/dist/components/alert-banner.js +28 -18
- package/dist/components/alert-banner.js.map +1 -1
- package/dist/components/amount-input.d.ts +66 -109
- package/dist/components/amount-input.js +259 -283
- package/dist/components/amount-input.js.map +1 -1
- package/dist/components/appearance-labels.d.ts +6 -10
- package/dist/components/appearance-labels.js.map +1 -1
- package/dist/components/authed-image-labels.d.ts +2 -0
- package/dist/components/authed-image-labels.js +10 -0
- package/dist/components/authed-image-labels.js.map +1 -0
- package/dist/components/authed-image.d.ts +11 -13
- package/dist/components/authed-image.js +2 -6
- package/dist/components/authed-image.js.map +1 -1
- package/dist/components/autocomplete.d.ts +13 -11
- package/dist/components/autocomplete.js +35 -30
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/breadcrumbs-labels.d.ts +2 -0
- package/dist/components/breadcrumbs-labels.js +9 -0
- package/dist/components/breadcrumbs-labels.js.map +1 -0
- package/dist/components/breadcrumbs.d.ts +10 -12
- package/dist/components/breadcrumbs.js +7 -10
- package/dist/components/breadcrumbs.js.map +1 -1
- package/dist/components/bulk-action-bar-labels.d.ts +2 -0
- package/dist/components/bulk-action-bar-labels.js +10 -0
- package/dist/components/bulk-action-bar-labels.js.map +1 -0
- package/dist/components/bulk-action-bar.d.ts +10 -12
- package/dist/components/bulk-action-bar.js +9 -12
- package/dist/components/bulk-action-bar.js.map +1 -1
- package/dist/components/button-group.d.ts +7 -109
- package/dist/components/button-group.js +5 -5
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/button-look.d.ts +88 -0
- package/dist/components/button-look.js +91 -0
- package/dist/components/button-look.js.map +1 -0
- package/dist/components/button.d.ts +153 -0
- package/dist/components/button.js +165 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calculator.d.ts +8 -106
- package/dist/components/calculator.js +10 -7
- package/dist/components/calculator.js.map +1 -1
- package/dist/components/calendar-heatmap-labels.d.ts +3 -0
- package/dist/components/calendar-heatmap-labels.js +12 -0
- package/dist/components/calendar-heatmap-labels.js.map +1 -0
- package/dist/components/calendar-heatmap.d.ts +13 -16
- package/dist/components/calendar-heatmap.js +7 -13
- package/dist/components/calendar-heatmap.js.map +1 -1
- package/dist/components/card.d.ts +145 -0
- package/dist/components/card.js +186 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/chart-height.d.ts +4 -7
- package/dist/components/chart-zoom-core.d.ts +202 -0
- package/dist/components/chart-zoom-core.js +334 -0
- package/dist/components/chart-zoom-core.js.map +1 -0
- package/dist/components/chart-zoom.d.ts +39 -205
- package/dist/components/chart-zoom.js +15 -316
- package/dist/components/chart-zoom.js.map +1 -1
- package/dist/components/chart.d.ts +11 -15
- package/dist/components/chart.js +11 -11
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox-group.d.ts +6 -10
- package/dist/components/checkbox-group.js +10 -9
- package/dist/components/checkbox-group.js.map +1 -1
- package/dist/components/checkbox.d.ts +8 -12
- package/dist/components/checkbox.js +20 -18
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/chip-input.d.ts +73 -0
- package/dist/components/chip-input.js +224 -0
- package/dist/components/chip-input.js.map +1 -0
- package/dist/components/chip-labels.d.ts +2 -0
- package/dist/components/chip-labels.js +12 -0
- package/dist/components/chip-labels.js.map +1 -0
- package/dist/components/chip.d.ts +18 -93
- package/dist/components/chip.js +74 -426
- package/dist/components/chip.js.map +1 -1
- package/dist/components/choice-card.d.ts +21 -18
- package/dist/components/choice-card.js +45 -45
- package/dist/components/choice-card.js.map +1 -1
- package/dist/components/column-mapper-labels.d.ts +5 -0
- package/dist/components/column-mapper-labels.js +34 -0
- package/dist/components/column-mapper-labels.js.map +1 -0
- package/dist/components/column-mapper.d.ts +15 -17
- package/dist/components/column-mapper.js +11 -37
- package/dist/components/column-mapper.js.map +1 -1
- package/dist/components/combobox-core.d.ts +79 -40
- package/dist/components/combobox-core.js +189 -122
- package/dist/components/combobox-core.js.map +1 -1
- package/dist/components/combobox-suggestions.d.ts +76 -0
- package/dist/components/combobox-suggestions.js +56 -0
- package/dist/components/combobox-suggestions.js.map +1 -0
- package/dist/components/combobox.d.ts +14 -159
- package/dist/components/combobox.js +40 -507
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/confirm-dialog-labels.d.ts +7 -0
- package/dist/components/confirm-dialog-labels.js +10 -0
- package/dist/components/confirm-dialog-labels.js.map +1 -0
- package/dist/components/confirm-dialog.d.ts +165 -100
- package/dist/components/confirm-dialog.js +2 -6
- package/dist/components/confirm-dialog.js.map +1 -1
- package/dist/components/copy-button-labels.d.ts +2 -0
- package/dist/components/copy-button-labels.js +12 -0
- package/dist/components/copy-button-labels.js.map +1 -0
- package/dist/components/copy-button.d.ts +70 -100
- package/dist/components/copy-button.js +4 -9
- package/dist/components/copy-button.js.map +1 -1
- package/dist/components/country-select-labels.d.ts +2 -0
- package/dist/components/country-select-labels.js +10 -0
- package/dist/components/country-select-labels.js.map +1 -0
- package/dist/components/country-select.d.ts +18 -15
- package/dist/components/country-select.js +49 -64
- package/dist/components/country-select.js.map +1 -1
- package/dist/components/currency-option-list.d.ts +63 -0
- package/dist/components/currency-option-list.js +135 -0
- package/dist/components/currency-option-list.js.map +1 -0
- package/dist/components/currency-select.d.ts +10 -30
- package/dist/components/currency-select.js +50 -133
- package/dist/components/currency-select.js.map +1 -1
- package/dist/components/danger-confirm-labels.d.ts +14 -0
- package/dist/components/danger-confirm-labels.js +17 -0
- package/dist/components/danger-confirm-labels.js.map +1 -0
- package/dist/components/danger-confirm.d.ts +448 -100
- package/dist/components/danger-confirm.js +40 -46
- package/dist/components/danger-confirm.js.map +1 -1
- package/dist/components/data-table-cells.d.ts +9 -24
- package/dist/components/data-table-cells.js +1 -1
- package/dist/components/data-table-cells.js.map +1 -1
- package/dist/components/data-table-column-settings.d.ts +16 -0
- package/dist/components/data-table-column-settings.js +119 -0
- package/dist/components/data-table-column-settings.js.map +1 -0
- package/dist/components/data-table-filter-popover.d.ts +5 -19
- package/dist/components/data-table-filter-popover.js +39 -22
- package/dist/components/data-table-filter-popover.js.map +1 -1
- package/dist/components/data-table-filters.d.ts +93 -15
- package/dist/components/data-table-filters.js +22 -7
- package/dist/components/data-table-filters.js.map +1 -1
- package/dist/components/data-table-head.d.ts +36 -0
- package/dist/components/data-table-head.js +190 -0
- package/dist/components/data-table-head.js.map +1 -0
- package/dist/components/data-table-labels.d.ts +124 -15
- package/dist/components/data-table-labels.js +9 -5
- package/dist/components/data-table-labels.js.map +1 -1
- package/dist/components/data-table-mobile.d.ts +106 -0
- package/dist/components/data-table-mobile.js +412 -0
- package/dist/components/data-table-mobile.js.map +1 -0
- package/dist/components/data-table-pagination.d.ts +6 -21
- package/dist/components/data-table-pagination.js +7 -7
- package/dist/components/data-table-pagination.js.map +1 -1
- package/dist/components/data-table-resize.d.ts +37 -0
- package/dist/components/data-table-resize.js +103 -0
- package/dist/components/data-table-resize.js.map +1 -0
- package/dist/components/data-table-row-actions.d.ts +24 -0
- package/dist/components/data-table-row-actions.js +95 -0
- package/dist/components/data-table-row-actions.js.map +1 -0
- package/dist/components/data-table-selection.d.ts +21 -0
- package/dist/components/data-table-selection.js +30 -0
- package/dist/components/data-table-selection.js.map +1 -0
- package/dist/components/data-table-shared.d.ts +77 -0
- package/dist/components/data-table-shared.js +77 -0
- package/dist/components/data-table-shared.js.map +1 -0
- package/dist/components/data-table-sort.d.ts +8 -10
- package/dist/components/data-table.d.ts +603 -15
- package/dist/components/data-table.js +134 -927
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-field.d.ts +203 -0
- package/dist/components/date-field.js +270 -0
- package/dist/components/date-field.js.map +1 -0
- package/dist/components/date-picker.d.ts +6 -261
- package/dist/components/date-picker.js +24 -760
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/date-range-picker.d.ts +125 -0
- package/dist/components/date-range-picker.js +261 -0
- package/dist/components/date-range-picker.js.map +1 -0
- package/dist/components/description-list-labels.d.ts +2 -0
- package/dist/components/description-list-labels.js +8 -0
- package/dist/components/description-list-labels.js.map +1 -0
- package/dist/components/description-list.d.ts +13 -15
- package/dist/components/description-list.js +17 -11
- package/dist/components/description-list.js.map +1 -1
- package/dist/components/dialog-frame-labels.d.ts +2 -0
- package/dist/components/dialog-frame-labels.js +6 -0
- package/dist/components/dialog-frame-labels.js.map +1 -0
- package/dist/components/dialog-frame.d.ts +7 -11
- package/dist/components/dialog-frame.js +6 -6
- package/dist/components/dialog-frame.js.map +1 -1
- package/dist/components/disclosure.d.ts +6 -10
- package/dist/components/disclosure.js +11 -11
- package/dist/components/disclosure.js.map +1 -1
- package/dist/components/dropdown.d.ts +55 -27
- package/dist/components/dropdown.js +62 -31
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/empty-state.d.ts +64 -0
- package/dist/components/empty-state.js +70 -0
- package/dist/components/empty-state.js.map +1 -0
- package/dist/components/entity-combobox.d.ts +10 -11
- package/dist/components/entity-combobox.js +14 -13
- package/dist/components/entity-combobox.js.map +1 -1
- package/dist/components/error-boundary-labels.d.ts +2 -0
- package/dist/components/error-boundary-labels.js +19 -0
- package/dist/components/error-boundary-labels.js.map +1 -0
- package/dist/components/error-boundary.d.ts +17 -17
- package/dist/components/error-boundary.js +5 -17
- package/dist/components/error-boundary.js.map +1 -1
- package/dist/components/facing-pair.d.ts +7 -115
- package/dist/components/facing-pair.js +1 -1
- package/dist/components/facing-pair.js.map +1 -1
- package/dist/components/field-base.d.ts +260 -0
- package/dist/components/field-base.js +228 -0
- package/dist/components/field-base.js.map +1 -0
- package/dist/components/field-parts.d.ts +188 -87
- package/dist/components/field-parts.js +60 -33
- package/dist/components/field-parts.js.map +1 -1
- package/dist/components/field-strip.d.ts +19 -28
- package/dist/components/field-strip.js +2 -2
- package/dist/components/field-strip.js.map +1 -1
- package/dist/components/field-sync-labels.d.ts +2 -0
- package/dist/components/field-sync-labels.js +12 -0
- package/dist/components/field-sync-labels.js.map +1 -0
- package/dist/components/field-sync.d.ts +20 -19
- package/dist/components/field-sync.js +4 -10
- package/dist/components/field-sync.js.map +1 -1
- package/dist/components/field.d.ts +45 -10
- package/dist/components/field.js +10 -8
- package/dist/components/field.js.map +1 -1
- package/dist/components/file-button.d.ts +85 -100
- package/dist/components/file-button.js +23 -169
- package/dist/components/file-button.js.map +1 -1
- package/dist/components/file-dropzone.d.ts +9 -109
- package/dist/components/file-dropzone.js +22 -22
- package/dist/components/file-dropzone.js.map +1 -1
- package/dist/components/floating-panel-labels.d.ts +2 -0
- package/dist/components/floating-panel-labels.js +9 -0
- package/dist/components/floating-panel-labels.js.map +1 -0
- package/dist/components/floating-panel.d.ts +17 -21
- package/dist/components/floating-panel.js +19 -18
- package/dist/components/floating-panel.js.map +1 -1
- package/dist/components/focus-ring.d.ts +9 -6
- package/dist/components/focus-ring.js +2 -2
- package/dist/components/focus-ring.js.map +1 -1
- package/dist/components/form-actions-labels.d.ts +2 -0
- package/dist/components/form-actions-labels.js +10 -0
- package/dist/components/form-actions-labels.js.map +1 -0
- package/dist/components/form-actions.d.ts +280 -100
- package/dist/components/form-actions.js +10 -20
- package/dist/components/form-actions.js.map +1 -1
- package/dist/components/full-bleed-dialog.d.ts +7 -8
- package/dist/components/full-bleed-dialog.js +14 -13
- package/dist/components/full-bleed-dialog.js.map +1 -1
- package/dist/components/grouped-picker.d.ts +21 -16
- package/dist/components/grouped-picker.js +76 -62
- package/dist/components/grouped-picker.js.map +1 -1
- package/dist/components/help-popover.d.ts +60 -0
- package/dist/components/help-popover.js +48 -0
- package/dist/components/help-popover.js.map +1 -0
- package/dist/components/hover-menu.d.ts +17 -16
- package/dist/components/hover-menu.js +18 -17
- package/dist/components/hover-menu.js.map +1 -1
- package/dist/components/iban-input-labels.d.ts +2 -0
- package/dist/components/iban-input-labels.js +13 -0
- package/dist/components/iban-input-labels.js.map +1 -0
- package/dist/components/iban-input.d.ts +73 -100
- package/dist/components/iban-input.js +22 -15
- package/dist/components/iban-input.js.map +1 -1
- package/dist/components/icon-button.d.ts +300 -0
- package/dist/components/icon-button.js +465 -0
- package/dist/components/icon-button.js.map +1 -0
- package/dist/components/icon-picker-labels.d.ts +2 -0
- package/dist/components/icon-picker-labels.js +12 -0
- package/dist/components/icon-picker-labels.js.map +1 -0
- package/dist/components/icon-picker.d.ts +13 -13
- package/dist/components/icon-picker.js +18 -17
- package/dist/components/icon-picker.js.map +1 -1
- package/dist/components/image-grid-labels.d.ts +2 -0
- package/dist/components/image-grid-labels.js +10 -0
- package/dist/components/image-grid-labels.js.map +1 -0
- package/dist/components/image-grid.d.ts +12 -14
- package/dist/components/image-grid.js +6 -10
- package/dist/components/image-grid.js.map +1 -1
- package/dist/components/inline-edit-field-labels.d.ts +2 -0
- package/dist/components/inline-edit-field-labels.js +10 -0
- package/dist/components/inline-edit-field-labels.js.map +1 -0
- package/dist/components/inline-edit-field.d.ts +11 -13
- package/dist/components/inline-edit-field.js +11 -13
- package/dist/components/inline-edit-field.js.map +1 -1
- package/dist/components/inline-entity-combobox.d.ts +155 -0
- package/dist/components/inline-entity-combobox.js +467 -0
- package/dist/components/inline-entity-combobox.js.map +1 -0
- package/dist/components/input.d.ts +98 -0
- package/dist/components/input.js +219 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/jump-calendar.d.ts +8 -0
- package/dist/components/jump-calendar.js +274 -0
- package/dist/components/jump-calendar.js.map +1 -0
- package/dist/components/language-select.d.ts +20 -110
- package/dist/components/language-select.js +12 -7
- package/dist/components/language-select.js.map +1 -1
- package/dist/components/legal-labels.d.ts +2 -0
- package/dist/components/legal-labels.js +100 -0
- package/dist/components/legal-labels.js.map +1 -0
- package/dist/components/legal-page.d.ts +17 -117
- package/dist/components/legal-page.js +2 -2
- package/dist/components/legal-page.js.map +1 -1
- package/dist/components/legal.d.ts +353 -100
- package/dist/components/legal.js +7 -101
- package/dist/components/legal.js.map +1 -1
- package/dist/components/lightbox-labels.d.ts +2 -0
- package/dist/components/lightbox-labels.js +17 -0
- package/dist/components/lightbox-labels.js.map +1 -0
- package/dist/components/lightbox.d.ts +12 -14
- package/dist/components/lightbox.js +9 -19
- package/dist/components/lightbox.js.map +1 -1
- package/dist/components/line-items-labels.d.ts +2 -0
- package/dist/components/line-items-labels.js +13 -0
- package/dist/components/line-items-labels.js.map +1 -0
- package/dist/components/line-items.d.ts +16 -18
- package/dist/components/line-items.js +18 -26
- package/dist/components/line-items.js.map +1 -1
- package/dist/components/list-labels.d.ts +2 -0
- package/dist/components/list-labels.js +9 -0
- package/dist/components/list-labels.js.map +1 -0
- package/dist/components/list.d.ts +32 -21
- package/dist/components/list.js +41 -25
- package/dist/components/list.js.map +1 -1
- package/dist/components/loading-state.d.ts +5 -9
- package/dist/components/loading-state.js +2 -2
- package/dist/components/loading-state.js.map +1 -1
- package/dist/components/measured-grid-labels.d.ts +4 -0
- package/dist/components/measured-grid-labels.js +21 -0
- package/dist/components/measured-grid-labels.js.map +1 -0
- package/dist/components/measured-grid.d.ts +13 -17
- package/dist/components/measured-grid.js +31 -50
- package/dist/components/measured-grid.js.map +1 -1
- package/dist/components/menu-item.d.ts +10 -10
- package/dist/components/menu-item.js +9 -9
- package/dist/components/menu-item.js.map +1 -1
- package/dist/components/mini-calendar-labels.d.ts +4 -0
- package/dist/components/mini-calendar-labels.js +14 -0
- package/dist/components/mini-calendar-labels.js.map +1 -0
- package/dist/components/mini-calendar.d.ts +10 -14
- package/dist/components/mini-calendar.js +22 -29
- package/dist/components/mini-calendar.js.map +1 -1
- package/dist/components/modal.d.ts +26 -18
- package/dist/components/modal.js +8 -11
- package/dist/components/modal.js.map +1 -1
- package/dist/components/money-draft.d.ts +34 -0
- package/dist/components/money-draft.js +39 -0
- package/dist/components/money-draft.js.map +1 -0
- package/dist/components/money-field.d.ts +13 -110
- package/dist/components/money-field.js +6 -22
- package/dist/components/money-field.js.map +1 -1
- package/dist/components/month-picker-labels.d.ts +5 -0
- package/dist/components/month-picker-labels.js +18 -0
- package/dist/components/month-picker-labels.js.map +1 -0
- package/dist/components/month-picker.d.ts +15 -13
- package/dist/components/month-picker.js +34 -32
- package/dist/components/month-picker.js.map +1 -1
- package/dist/components/multi-entity-combobox.d.ts +9 -11
- package/dist/components/multi-entity-combobox.js +14 -13
- package/dist/components/multi-entity-combobox.js.map +1 -1
- package/dist/components/multi-select.d.ts +81 -21
- package/dist/components/multi-select.js +171 -197
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/nav-pills.d.ts +9 -10
- package/dist/components/nav-pills.js +53 -42
- package/dist/components/nav-pills.js.map +1 -1
- package/dist/components/number-field.d.ts +13 -110
- package/dist/components/number-field.js +2 -3
- package/dist/components/number-field.js.map +1 -1
- package/dist/components/number-input.d.ts +55 -109
- package/dist/components/number-input.js +50 -67
- package/dist/components/number-input.js.map +1 -1
- package/dist/components/numeric-field.d.ts +85 -0
- package/dist/components/numeric-field.js +71 -0
- package/dist/components/numeric-field.js.map +1 -0
- package/dist/components/numpad-sheet.d.ts +5 -107
- package/dist/components/numpad-sheet.js +7 -7
- package/dist/components/numpad-sheet.js.map +1 -1
- package/dist/components/one-time-code-input.d.ts +6 -7
- package/dist/components/one-time-code-input.js +119 -124
- package/dist/components/one-time-code-input.js.map +1 -1
- package/dist/components/page-contents-labels.d.ts +2 -0
- package/dist/components/page-contents-labels.js +8 -0
- package/dist/components/page-contents-labels.js.map +1 -0
- package/dist/components/page-contents.d.ts +13 -15
- package/dist/components/page-contents.js +7 -9
- package/dist/components/page-contents.js.map +1 -1
- package/dist/components/page-header.d.ts +10 -10
- package/dist/components/page-header.js +3 -3
- package/dist/components/page-header.js.map +1 -1
- package/dist/components/password-strength-labels.d.ts +2 -0
- package/dist/components/password-strength-labels.js +21 -0
- package/dist/components/password-strength-labels.js.map +1 -0
- package/dist/components/password-strength.d.ts +15 -17
- package/dist/components/password-strength.js +7 -22
- package/dist/components/password-strength.js.map +1 -1
- package/dist/components/phone-input-labels.d.ts +2 -0
- package/dist/components/phone-input-labels.js +9 -0
- package/dist/components/phone-input-labels.js.map +1 -0
- package/dist/components/phone-input.d.ts +75 -100
- package/dist/components/phone-input.js +20 -23
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/picker-sheet.d.ts +20 -8
- package/dist/components/picker-sheet.js +22 -11
- package/dist/components/picker-sheet.js.map +1 -1
- package/dist/components/pie-chart-labels.d.ts +2 -4
- package/dist/components/pie-chart.d.ts +8 -11
- package/dist/components/pie-chart.js +5 -5
- package/dist/components/pie-chart.js.map +1 -1
- package/dist/components/popover-labels.d.ts +2 -0
- package/dist/components/popover-labels.js +11 -0
- package/dist/components/popover-labels.js.map +1 -0
- package/dist/components/popover.d.ts +13 -11
- package/dist/components/popover.js +21 -23
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress-bar-labels.d.ts +2 -0
- package/dist/components/progress-bar-labels.js +9 -0
- package/dist/components/progress-bar-labels.js.map +1 -0
- package/dist/components/progress-bar.d.ts +16 -15
- package/dist/components/progress-bar.js +22 -20
- package/dist/components/progress-bar.js.map +1 -1
- package/dist/components/qr-code.d.ts +4 -8
- package/dist/components/qr-code.js.map +1 -1
- package/dist/components/reauth-dialog-labels.d.ts +2 -0
- package/dist/components/reauth-dialog-labels.js +12 -0
- package/dist/components/reauth-dialog-labels.js.map +1 -0
- package/dist/components/reauth-dialog.d.ts +8 -10
- package/dist/components/reauth-dialog.js +3 -8
- package/dist/components/reauth-dialog.js.map +1 -1
- package/dist/components/row-actions-labels.d.ts +2 -0
- package/dist/components/row-actions-labels.js +9 -0
- package/dist/components/row-actions-labels.js.map +1 -0
- package/dist/components/row-actions.d.ts +224 -100
- package/dist/components/row-actions.js +4 -5
- package/dist/components/row-actions.js.map +1 -1
- package/dist/components/scroll-area.d.ts +6 -9
- package/dist/components/scroll-area.js +4 -10
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/search-field.d.ts +12 -27
- package/dist/components/search-field.js +13 -16
- package/dist/components/search-field.js.map +1 -1
- package/dist/components/select.d.ts +69 -0
- package/dist/components/select.js +164 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +3 -7
- package/dist/components/separator.js.map +1 -1
- package/dist/components/series-chart-axes.d.ts +120 -0
- package/dist/components/series-chart-axes.js +164 -0
- package/dist/components/series-chart-axes.js.map +1 -0
- package/dist/components/series-chart-budget.d.ts +8 -9
- package/dist/components/series-chart-labels.d.ts +2 -4
- package/dist/components/series-chart-thin.d.ts +34 -0
- package/dist/components/series-chart-thin.js +103 -0
- package/dist/components/series-chart-thin.js.map +1 -0
- package/dist/components/series-chart-ticks.d.ts +9 -11
- package/dist/components/series-chart.d.ts +64 -213
- package/dist/components/series-chart.js +69 -160
- package/dist/components/series-chart.js.map +1 -1
- package/dist/components/server-wake-labels.d.ts +2 -0
- package/dist/components/server-wake-labels.js +9 -0
- package/dist/components/server-wake-labels.js.map +1 -0
- package/dist/components/server-wake.d.ts +32 -23
- package/dist/components/server-wake.js +15 -35
- package/dist/components/server-wake.js.map +1 -1
- package/dist/components/settings-fields.d.ts +46 -117
- package/dist/components/settings-fields.js +13 -3
- package/dist/components/settings-fields.js.map +1 -1
- package/dist/components/share-card-labels.d.ts +2 -0
- package/dist/components/share-card-labels.js +29 -0
- package/dist/components/share-card-labels.js.map +1 -0
- package/dist/components/share-card.d.ts +188 -100
- package/dist/components/share-card.js +16 -34
- package/dist/components/share-card.js.map +1 -1
- package/dist/components/sign-chip-labels.d.ts +2 -0
- package/dist/components/sign-chip-labels.js +11 -0
- package/dist/components/sign-chip-labels.js.map +1 -0
- package/dist/components/sign-chip.d.ts +7 -9
- package/dist/components/sign-chip.js +2 -7
- package/dist/components/sign-chip.js.map +1 -1
- package/dist/components/signature-pad-labels.d.ts +2 -0
- package/dist/components/signature-pad-labels.js +23 -0
- package/dist/components/signature-pad-labels.js.map +1 -0
- package/dist/components/signature-pad.d.ts +16 -15
- package/dist/components/signature-pad.js +22 -35
- package/dist/components/signature-pad.js.map +1 -1
- package/dist/components/signed-amount-labels.d.ts +2 -0
- package/dist/components/signed-amount-labels.js +9 -0
- package/dist/components/signed-amount-labels.js.map +1 -0
- package/dist/components/signed-amount.d.ts +19 -21
- package/dist/components/signed-amount.js +12 -15
- package/dist/components/signed-amount.js.map +1 -1
- package/dist/components/skeleton.d.ts +13 -9
- package/dist/components/skeleton.js +1 -1
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/slider.d.ts +16 -11
- package/dist/components/slider.js +23 -18
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sparkline-labels.d.ts +2 -0
- package/dist/components/sparkline-labels.js +13 -0
- package/dist/components/sparkline-labels.js.map +1 -0
- package/dist/components/sparkline.d.ts +10 -12
- package/dist/components/sparkline.js +10 -17
- package/dist/components/sparkline.js.map +1 -1
- package/dist/components/spinner.d.ts +45 -0
- package/dist/components/spinner.js +39 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/stat-tile-labels.d.ts +2 -0
- package/dist/components/stat-tile-labels.js +14 -0
- package/dist/components/stat-tile-labels.js.map +1 -0
- package/dist/components/stat-tile.d.ts +15 -17
- package/dist/components/stat-tile.js +25 -32
- package/dist/components/stat-tile.js.map +1 -1
- package/dist/components/status-dot.d.ts +8 -20
- package/dist/components/status-dot.js +13 -12
- package/dist/components/status-dot.js.map +1 -1
- package/dist/components/swatch-picker-labels.d.ts +2 -0
- package/dist/components/swatch-picker-labels.js +9 -0
- package/dist/components/swatch-picker-labels.js.map +1 -0
- package/dist/components/swatch-picker.d.ts +14 -14
- package/dist/components/swatch-picker.js +14 -8
- package/dist/components/swatch-picker.js.map +1 -1
- package/dist/components/swipeable-row.d.ts +14 -27
- package/dist/components/swipeable-row.js +2 -2
- package/dist/components/swipeable-row.js.map +1 -1
- package/dist/components/switch.d.ts +10 -13
- package/dist/components/switch.js +13 -12
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.d.ts +28 -31
- package/dist/components/table.js +15 -15
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.d.ts +182 -0
- package/dist/components/tabs.js +312 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/text-link.d.ts +17 -118
- package/dist/components/text-link.js +7 -7
- package/dist/components/text-link.js.map +1 -1
- package/dist/components/text.d.ts +14 -13
- package/dist/components/text.js +5 -5
- package/dist/components/text.js.map +1 -1
- package/dist/components/textarea.d.ts +20 -0
- package/dist/components/textarea.js +161 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/tile-radio.d.ts +6 -10
- package/dist/components/tile-radio.js +6 -6
- package/dist/components/tile-radio.js.map +1 -1
- package/dist/components/time-input.d.ts +5 -107
- package/dist/components/time-input.js +14 -5
- package/dist/components/time-input.js.map +1 -1
- package/dist/components/toast-labels.d.ts +2 -0
- package/dist/components/toast-labels.js +11 -0
- package/dist/components/toast-labels.js.map +1 -0
- package/dist/components/toast.d.ts +21 -23
- package/dist/components/toast.js +1 -6
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toggle-group.d.ts +26 -26
- package/dist/components/toggle-group.js +43 -19
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle-legend.d.ts +18 -21
- package/dist/components/toggle-legend.js +3 -3
- package/dist/components/toggle-legend.js.map +1 -1
- package/dist/components/tooltip.d.ts +16 -15
- package/dist/components/tooltip.js +4 -9
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/translation-review-editor.d.ts +8 -10
- package/dist/components/translation-review-editor.js +6 -5
- package/dist/components/translation-review-editor.js.map +1 -1
- package/dist/components/translation-review-labels.d.ts +4 -7
- package/dist/components/translation-review-parts.d.ts +19 -28
- package/dist/components/translation-review-parts.js +4 -7
- package/dist/components/translation-review-parts.js.map +1 -1
- package/dist/components/translation-review.d.ts +26 -24
- package/dist/components/translation-review.js +13 -10
- package/dist/components/translation-review.js.map +1 -1
- package/dist/components/tree-view.d.ts +7 -11
- package/dist/components/tree-view.js +8 -8
- package/dist/components/tree-view.js.map +1 -1
- package/dist/components/treemap.d.ts +9 -13
- package/dist/components/trigger-aria.d.ts +2 -4
- package/dist/components/ui-labels.d.ts +5 -0
- package/dist/components/ui-labels.js +20 -0
- package/dist/components/ui-labels.js.map +1 -0
- package/dist/components/use-anchor-dir.d.ts +3 -6
- package/dist/components/use-mobile-reveal.d.ts +2 -6
- package/dist/components/use-table-state.d.ts +154 -15
- package/dist/components/user-avatar.d.ts +8 -21
- package/dist/components/user-avatar.js +1 -1
- package/dist/components/user-avatar.js.map +1 -1
- package/dist/components/wizard-stepper.d.ts +6 -6
- package/dist/components/wizard-stepper.js +4 -3
- package/dist/components/wizard-stepper.js.map +1 -1
- package/dist/components/write-lock-labels.d.ts +2 -0
- package/dist/components/write-lock-labels.js +8 -0
- package/dist/components/write-lock-labels.js.map +1 -0
- package/dist/components/write-lock.d.ts +16 -18
- package/dist/components/write-lock.js +4 -8
- package/dist/components/write-lock.js.map +1 -1
- package/dist/data-table.d.ts +10 -18
- package/dist/data-table.js.map +1 -1
- package/dist/demo/demo-banner.d.ts +10 -13
- package/dist/demo/demo-banner.js +5 -19
- package/dist/demo/demo-banner.js.map +1 -1
- package/dist/demo/demo-countdown.d.ts +7 -9
- package/dist/demo/demo-ended.d.ts +10 -13
- package/dist/demo/demo-ended.js +4 -4
- package/dist/demo/demo-ended.js.map +1 -1
- package/dist/demo/demo-labels.d.ts +4 -5
- package/dist/demo/demo-labels.js.map +1 -1
- package/dist/demo/demo-session.d.ts +3 -5
- package/dist/demo/demo-start.d.ts +8 -11
- package/dist/demo/demo-start.js +3 -2
- package/dist/demo/demo-start.js.map +1 -1
- package/dist/feedback/feedback-attachment-labels.d.ts +16 -0
- package/dist/feedback/feedback-attachment-labels.js +17 -0
- package/dist/feedback/feedback-attachment-labels.js.map +1 -0
- package/dist/feedback/feedback-attachment.d.ts +312 -100
- package/dist/feedback/feedback-attachment.js +31 -42
- package/dist/feedback/feedback-attachment.js.map +1 -1
- package/dist/feedback/feedback-capture.d.ts +2 -4
- package/dist/feedback/feedback-context-labels.d.ts +2 -0
- package/dist/feedback/feedback-context-labels.js +9 -0
- package/dist/feedback/feedback-context-labels.js.map +1 -0
- package/dist/feedback/feedback-context.d.ts +110 -100
- package/dist/feedback/feedback-context.js +4 -7
- package/dist/feedback/feedback-context.js.map +1 -1
- package/dist/feedback/feedback-crash.d.ts +8 -109
- package/dist/feedback/feedback-dialog-labels.d.ts +12 -0
- package/dist/feedback/feedback-dialog-labels.js +17 -0
- package/dist/feedback/feedback-dialog-labels.js.map +1 -0
- package/dist/feedback/feedback-dialog.d.ts +186 -100
- package/dist/feedback/feedback-dialog.js +8 -18
- package/dist/feedback/feedback-dialog.js.map +1 -1
- package/dist/feedback/feedback-inbox.d.ts +236 -100
- package/dist/feedback/feedback-inbox.js +31 -141
- package/dist/feedback/feedback-inbox.js.map +1 -1
- package/dist/feedback/feedback-labels.d.ts +83 -100
- package/dist/feedback/feedback-labels.js.map +1 -1
- package/dist/feedback/feedback-menu-labels.d.ts +2 -0
- package/dist/feedback/feedback-menu-labels.js +10 -0
- package/dist/feedback/feedback-menu-labels.js.map +1 -0
- package/dist/feedback/feedback-menu.d.ts +83 -100
- package/dist/feedback/feedback-menu.js +3 -7
- package/dist/feedback/feedback-menu.js.map +1 -1
- package/dist/feedback/feedback-record.d.ts +239 -100
- package/dist/feedback/feedback-record.js +7 -2
- package/dist/feedback/feedback-record.js.map +1 -1
- package/dist/feedback/feedback-row-detail-labels.d.ts +2 -0
- package/dist/feedback/feedback-row-detail-labels.js +31 -0
- package/dist/feedback/feedback-row-detail-labels.js.map +1 -0
- package/dist/feedback/feedback-row-detail.d.ts +315 -100
- package/dist/feedback/feedback-row-detail.js +11 -37
- package/dist/feedback/feedback-row-detail.js.map +1 -1
- package/dist/feedback/feedback-status-undo.d.ts +66 -100
- package/dist/feedback/feedback-status-undo.js.map +1 -1
- package/dist/feedback/feedback-submit-dialog.d.ts +39 -0
- package/dist/feedback/feedback-submit-dialog.js +66 -0
- package/dist/feedback/feedback-submit-dialog.js.map +1 -0
- package/dist/feedback/feedback-submit.d.ts +13 -108
- package/dist/feedback/feedback-submit.js +19 -40
- package/dist/feedback/feedback-submit.js.map +1 -1
- package/dist/feedback/feedback-swipe.d.ts +9 -109
- package/dist/feedback/feedback-swipe.js +1 -1
- package/dist/feedback/feedback-swipe.js.map +1 -1
- package/dist/feedback/feedback-table-labels.d.ts +2 -0
- package/dist/feedback/feedback-table-labels.js +26 -0
- package/dist/feedback/feedback-table-labels.js.map +1 -0
- package/dist/feedback/feedback-table.d.ts +314 -100
- package/dist/feedback/feedback-table.js +11 -31
- package/dist/feedback/feedback-table.js.map +1 -1
- package/dist/feedback/feedback-thread-labels.d.ts +3 -0
- package/dist/feedback/feedback-thread-labels.js +21 -0
- package/dist/feedback/feedback-thread-labels.js.map +1 -0
- package/dist/feedback/feedback-thread.d.ts +378 -100
- package/dist/feedback/feedback-thread.js +32 -35
- package/dist/feedback/feedback-thread.js.map +1 -1
- package/dist/feedback/feedback-vocabulary.d.ts +98 -0
- package/dist/feedback/feedback-vocabulary.js +143 -0
- package/dist/feedback/feedback-vocabulary.js.map +1 -0
- package/dist/feedback.d.ts +15 -104
- package/dist/hooks/use-anchored-panel.d.ts +109 -17
- package/dist/hooks/use-anchored-panel.js +38 -6
- package/dist/hooks/use-anchored-panel.js.map +1 -1
- package/dist/hooks/use-anchored-rect.d.ts +15 -6
- package/dist/hooks/use-anchored-rect.js +2 -1
- package/dist/hooks/use-anchored-rect.js.map +1 -1
- package/dist/hooks/use-announce.d.ts +4 -6
- package/dist/hooks/use-authed-src.d.ts +5 -7
- package/dist/hooks/use-authed-src.js +3 -7
- package/dist/hooks/use-authed-src.js.map +1 -1
- package/dist/hooks/use-body-scroll-lock.d.ts +1 -3
- package/dist/hooks/use-breakpoint.d.ts +16 -17
- package/dist/hooks/use-breakpoint.js.map +1 -1
- package/dist/hooks/use-close-transition.d.ts +8 -8
- package/dist/hooks/use-close-transition.js +5 -4
- package/dist/hooks/use-close-transition.js.map +1 -1
- package/dist/hooks/use-copy-to-clipboard.d.ts +5 -7
- package/dist/hooks/use-debounce.d.ts +13 -6
- package/dist/hooks/use-debounce.js.map +1 -1
- package/dist/hooks/use-dismiss.d.ts +37 -11
- package/dist/hooks/use-dismiss.js +69 -10
- package/dist/hooks/use-dismiss.js.map +1 -1
- package/dist/hooks/use-file-drop.d.ts +8 -109
- package/dist/hooks/use-file-drop.js +1 -1
- package/dist/hooks/use-file-drop.js.map +1 -1
- package/dist/hooks/use-file-picker-labels.d.ts +2 -0
- package/dist/hooks/use-file-picker-labels.js +25 -0
- package/dist/hooks/use-file-picker-labels.js.map +1 -0
- package/dist/hooks/use-file-picker.d.ts +164 -0
- package/dist/hooks/use-file-picker.js +149 -0
- package/dist/hooks/use-file-picker.js.map +1 -0
- package/dist/hooks/use-focus-trap.d.ts +10 -4
- package/dist/hooks/use-focus-trap.js +19 -12
- package/dist/hooks/use-focus-trap.js.map +1 -1
- package/dist/hooks/use-hotkey.d.ts +7 -9
- package/dist/hooks/use-large-text.d.ts +3 -5
- package/dist/hooks/use-media-query.d.ts +1 -3
- package/dist/hooks/use-noindex.d.ts +1 -3
- package/dist/hooks/use-overlay-history.d.ts +1 -3
- package/dist/hooks/use-row-swipe.d.ts +5 -8
- package/dist/hooks/use-search-param-state.d.ts +10 -11
- package/dist/hooks/use-windowed-rows.d.ts +4 -7
- package/dist/i18n/defaults.d.ts +11 -104
- package/dist/i18n/defaults.js +82 -82
- package/dist/i18n/defaults.js.map +1 -1
- package/dist/i18n/german.d.ts +2 -104
- package/dist/i18n/german.js +56 -9
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +609 -100
- package/dist/i18n/kit-labels.js +22 -97
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/languages.d.ts +197 -100
- package/dist/i18n/locales/de-CH.d.ts +3 -105
- package/dist/i18n/locales/en.d.ts +4 -104
- package/dist/i18n/locales/en.js +1834 -4
- package/dist/i18n/locales/en.js.map +7 -1
- package/dist/i18n/locales/es.d.ts +3 -105
- package/dist/i18n/locales/es.js +54 -9
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +3 -105
- package/dist/i18n/locales/fr.js +56 -9
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.d.ts +3 -105
- package/dist/i18n/locales/hu.js +56 -10
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +3 -105
- package/dist/i18n/locales/it.js +55 -9
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +3 -105
- package/dist/i18n/locales/zh.js +52 -8
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/plurals.d.ts +20 -3
- package/dist/i18n/plurals.js +11 -0
- package/dist/i18n/plurals.js.map +1 -1
- package/dist/i18n/review.d.ts +5 -106
- package/dist/i18n/review.js +4 -0
- package/dist/i18n/review.js.map +1 -1
- package/dist/i18n/shared-labels.d.ts +17 -0
- package/dist/i18n/shared-labels.js +111 -0
- package/dist/i18n/shared-labels.js.map +1 -0
- package/dist/i18n/swiss.d.ts +1 -3
- package/dist/index.d.ts +329 -249
- package/dist/index.js +188 -215
- package/dist/index.js.map +1 -1
- package/dist/landing/access.d.ts +7 -9
- package/dist/landing/access.js.map +1 -1
- package/dist/landing/landing-actions.d.ts +9 -108
- package/dist/landing/landing-actions.js +1 -1
- package/dist/landing/landing-actions.js.map +1 -1
- package/dist/landing/landing-labels.d.ts +4 -5
- package/dist/landing/landing-labels.js.map +1 -1
- package/dist/landing/landing-sections.d.ts +21 -120
- package/dist/landing/landing-sections.js +15 -15
- package/dist/landing/landing-sections.js.map +1 -1
- package/dist/landing/page-seo.d.ts +7 -9
- package/dist/landing/public-header.d.ts +10 -110
- package/dist/landing/public-header.js +1 -1
- package/dist/landing/public-header.js.map +1 -1
- package/dist/landing/routing.d.ts +16 -119
- package/dist/landing/routing.js +2 -6
- package/dist/landing/routing.js.map +1 -1
- package/dist/lib/calc.d.ts +7 -9
- package/dist/lib/chip-edge-snap.d.ts +10 -0
- package/dist/lib/chip-edge-snap.js +131 -0
- package/dist/lib/chip-edge-snap.js.map +1 -0
- package/dist/lib/clipping.d.ts +2 -4
- package/dist/lib/cn.d.ts +2 -5
- package/dist/lib/cn.js +6 -1
- package/dist/lib/cn.js.map +1 -1
- package/dist/lib/column-mapping.d.ts +10 -13
- package/dist/lib/countries.d.ts +3 -5
- package/dist/lib/dates.d.ts +25 -25
- package/dist/lib/dates.js.map +1 -1
- package/dist/lib/decimal-marks.d.ts +8 -8
- package/dist/lib/decimal-marks.js +1 -1
- package/dist/lib/decimal-marks.js.map +1 -1
- package/dist/lib/direction.d.ts +4 -6
- package/dist/lib/document-navigation.d.ts +1 -3
- package/dist/lib/download.d.ts +67 -0
- package/dist/lib/download.js +89 -0
- package/dist/lib/download.js.map +1 -0
- package/dist/lib/floating-stack.d.ts +8 -6
- package/dist/lib/floating-stack.js.map +1 -1
- package/dist/lib/format.d.ts +24 -23
- package/dist/lib/format.js +3 -3
- package/dist/lib/format.js.map +1 -1
- package/dist/lib/iban.d.ts +9 -11
- package/dist/lib/ime.d.ts +17 -0
- package/dist/lib/ime.js +13 -0
- package/dist/lib/ime.js.map +1 -0
- package/dist/lib/isin.d.ts +3 -5
- package/dist/lib/logger.d.ts +4 -6
- package/dist/lib/person-name.d.ts +3 -5
- package/dist/lib/phone.d.ts +9 -11
- package/dist/lib/presence.d.ts +15 -0
- package/dist/lib/presence.js +8 -0
- package/dist/lib/presence.js.map +1 -0
- package/dist/lib/qr-encode.d.ts +4 -6
- package/dist/lib/reduced-motion.d.ts +18 -0
- package/dist/lib/reduced-motion.js +9 -0
- package/dist/lib/reduced-motion.js.map +1 -0
- package/dist/lib/round.d.ts +22 -0
- package/dist/lib/round.js +15 -0
- package/dist/lib/round.js.map +1 -0
- package/dist/lib/safe-storage.d.ts +14 -4
- package/dist/lib/safe-storage.js +24 -9
- package/dist/lib/safe-storage.js.map +1 -1
- package/dist/lib/server-wake.d.ts +13 -14
- package/dist/lib/session-refresh.d.ts +200 -0
- package/dist/lib/session-refresh.js +187 -0
- package/dist/lib/session-refresh.js.map +1 -0
- package/dist/lib/strip-fade.d.ts +10 -13
- package/dist/lib/table-text.d.ts +14 -16
- package/dist/lib/text-match.d.ts +41 -0
- package/dist/lib/text-match.js +23 -0
- package/dist/lib/text-match.js.map +1 -0
- package/dist/lib/translation-review.d.ts +44 -45
- package/dist/lib/translation-review.js +3 -2
- package/dist/lib/translation-review.js.map +1 -1
- package/dist/rhf/fields.d.ts +123 -188
- package/dist/rhf/fields.js +46 -54
- package/dist/rhf/fields.js.map +1 -1
- package/dist/rhf/form-core.d.ts +153 -0
- package/dist/rhf/form-core.js +143 -0
- package/dist/rhf/form-core.js.map +1 -0
- package/dist/rhf/form.d.ts +38 -174
- package/dist/rhf/form.js +9 -131
- package/dist/rhf/form.js.map +1 -1
- package/dist/rhf/line-items.d.ts +40 -11
- package/dist/rhf/line-items.js.map +1 -1
- package/dist/rhf/use-rhf-wizard-step.d.ts +3 -6
- package/dist/rhf.d.ts +4 -117
- package/dist/rhf.js.map +1 -1
- package/dist/search/command-palette-labels.d.ts +2 -0
- package/dist/search/command-palette-labels.js +15 -0
- package/dist/search/command-palette-labels.js.map +1 -0
- package/dist/search/command-palette.d.ts +10 -13
- package/dist/search/command-palette.js +25 -44
- package/dist/search/command-palette.js.map +1 -1
- package/dist/search/global-search-labels.d.ts +2 -0
- package/dist/search/global-search-labels.js +12 -0
- package/dist/search/global-search-labels.js.map +1 -0
- package/dist/search/global-search.d.ts +17 -16
- package/dist/search/global-search.js +12 -12
- package/dist/search/global-search.js.map +1 -1
- package/dist/search/search-index.d.ts +13 -14
- package/dist/search/search-index.js +2 -1
- package/dist/search/search-index.js.map +1 -1
- package/dist/search/use-command-key.d.ts +9 -0
- package/dist/search/use-command-key.js +18 -0
- package/dist/search/use-command-key.js.map +1 -0
- package/dist/search.d.ts +3 -4
- package/dist/settings/settings-card-classes.d.ts +11 -0
- package/dist/settings/settings-card-classes.js +8 -0
- package/dist/settings/settings-card-classes.js.map +1 -0
- package/dist/settings/settings-catalogue.d.ts +11 -14
- package/dist/settings/settings-context.d.ts +4 -8
- package/dist/settings/settings-heading.d.ts +8 -12
- package/dist/settings/settings-heading.js +1 -1
- package/dist/settings/settings-heading.js.map +1 -1
- package/dist/settings/settings-labels.d.ts +6 -7
- package/dist/settings/settings-labels.js.map +1 -1
- package/dist/settings/settings-layout.d.ts +36 -13
- package/dist/settings/settings-layout.js +25 -4
- package/dist/settings/settings-layout.js.map +1 -1
- package/dist/settings/settings-section.d.ts +4 -106
- package/dist/settings/settings-section.js +2 -2
- package/dist/settings/settings-section.js.map +1 -1
- package/dist/settings/use-account-appearance.d.ts +11 -16
- package/dist/settings/use-account-language.d.ts +8 -10
- package/dist/settings/use-settings-focus.d.ts +3 -5
- package/dist/settings/use-settings-focus.js +2 -4
- package/dist/settings/use-settings-focus.js.map +1 -1
- package/dist/settings/use-settings-route.d.ts +11 -16
- package/dist/shell/app-shell-labels.d.ts +2 -0
- package/dist/shell/app-shell-labels.js +9 -0
- package/dist/shell/app-shell-labels.js.map +1 -0
- package/dist/shell/app-shell.d.ts +216 -100
- package/dist/shell/app-shell.js +51 -35
- package/dist/shell/app-shell.js.map +1 -1
- package/dist/shell/auth-layout.d.ts +6 -9
- package/dist/shell/auth-layout.js +6 -6
- package/dist/shell/auth-layout.js.map +1 -1
- package/dist/shell/company-switcher-labels.d.ts +2 -0
- package/dist/shell/company-switcher-labels.js +12 -0
- package/dist/shell/company-switcher-labels.js.map +1 -0
- package/dist/shell/company-switcher.d.ts +9 -11
- package/dist/shell/company-switcher.js +3 -9
- package/dist/shell/company-switcher.js.map +1 -1
- package/dist/shell/option-switcher-menu.d.ts +19 -9
- package/dist/shell/option-switcher-menu.js +6 -4
- package/dist/shell/option-switcher-menu.js.map +1 -1
- package/dist/shell/role-switcher.d.ts +5 -6
- package/dist/shell/role-switcher.js +4 -3
- package/dist/shell/role-switcher.js.map +1 -1
- package/dist/shell/top-bar-brand.d.ts +4 -106
- package/dist/shell/top-bar-brand.js +1 -1
- package/dist/shell/top-bar-brand.js.map +1 -1
- package/dist/shell/top-bar.d.ts +6 -9
- package/dist/shell/top-bar.js +1 -1
- package/dist/shell/top-bar.js.map +1 -1
- package/dist/shell/topbar-action-menu.d.ts +30 -31
- package/dist/shell/topbar-action-menu.js +12 -10
- package/dist/shell/topbar-action-menu.js.map +1 -1
- package/dist/shell/topbar-controls.d.ts +20 -18
- package/dist/shell/topbar-controls.js +14 -11
- package/dist/shell/topbar-controls.js.map +1 -1
- package/dist/shell.d.ts +25 -115
- package/dist/shell.js.map +1 -1
- package/dist/table-text.d.ts +1 -1
- package/dist/testing/css-variables.d.ts +4 -6
- package/dist/testing/css-variables.generated.d.ts +2 -4
- package/dist/testing/index.d.ts +2 -1
- package/dist/testing/index.js +9 -1
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/viewport.d.ts +93 -0
- package/dist/testing/viewport.js +152 -0
- package/dist/testing/viewport.js.map +1 -0
- package/dist/theme/chart-palette.d.ts +7 -9
- package/dist/theme/color.d.ts +14 -16
- package/dist/theme/color.js +2 -1
- package/dist/theme/color.js.map +1 -1
- package/dist/theme/contrast-tokens.d.ts +13 -17
- package/dist/theme/contrast.d.ts +22 -27
- package/dist/theme/palette-derive.d.ts +16 -22
- package/dist/theme/palette-derive.js +15 -7
- package/dist/theme/palette-derive.js.map +1 -1
- package/dist/theme/palette-presets.d.ts +25 -15
- package/dist/theme/palette-presets.js +66 -66
- package/dist/theme/palette-presets.js.map +1 -1
- package/dist/theme/palette-store.d.ts +10 -13
- package/dist/theme/text-size.d.ts +21 -26
- package/dist/theme/theme-store.d.ts +9 -14
- package/dist/tour/tour-labels.d.ts +2 -0
- package/dist/tour/tour-labels.js +13 -0
- package/dist/tour/tour-labels.js.map +1 -0
- package/dist/tour/tour.d.ts +12 -14
- package/dist/tour/tour.js +9 -20
- package/dist/tour/tour.js.map +1 -1
- package/dist/tour.d.ts +1 -2
- package/dist/wizard/stepper-nav.d.ts +8 -107
- package/dist/wizard/stepper-nav.js +15 -14
- package/dist/wizard/stepper-nav.js.map +1 -1
- package/dist/wizard/types.d.ts +18 -18
- package/dist/wizard/types.js +1 -19
- package/dist/wizard/types.js.map +1 -1
- package/dist/wizard/use-wizard.d.ts +2 -6
- package/dist/wizard/validation.d.ts +3 -7
- package/dist/wizard/wizard-context.d.ts +7 -11
- package/dist/wizard/wizard-labels.d.ts +4 -0
- package/dist/wizard/wizard-labels.js +24 -0
- package/dist/wizard/wizard-labels.js.map +1 -0
- package/dist/wizard/wizard-step.d.ts +3 -7
- package/dist/wizard/wizard-step.js +2 -2
- package/dist/wizard/wizard-step.js.map +1 -1
- package/dist/wizard/wizard-summary.d.ts +5 -8
- package/dist/wizard/wizard-summary.js +6 -5
- package/dist/wizard/wizard-summary.js.map +1 -1
- package/dist/wizard.d.ts +7 -106
- package/package.json +9 -6
- package/src/account/account-parts.ts +3 -3
- package/src/{components → account}/account-settings-labels.ts +11 -1
- package/src/{components → account}/account-settings.tsx +145 -34
- package/src/account/data-export-setting-labels.ts +20 -0
- package/src/account/data-export-setting.tsx +19 -38
- package/src/account/delete-account-setting-labels.ts +33 -0
- package/src/account/delete-account-setting.tsx +13 -35
- package/src/account/email-change-setting-labels.ts +32 -0
- package/src/account/email-change-setting.tsx +17 -36
- package/src/{components → account}/passkeys-setting.tsx +14 -9
- package/src/account/sessions-setting-labels.ts +24 -0
- package/src/account/sessions-setting.tsx +14 -28
- package/src/admin/admin-action-confirm-labels.ts +19 -0
- package/src/admin/admin-action-confirm.tsx +59 -38
- package/src/admin/admin-action-log-labels.ts +74 -0
- package/src/admin/admin-action-log.tsx +180 -54
- package/src/admin/admin-parts.ts +0 -7
- package/src/admin/invitations-panel-labels.ts +31 -0
- package/src/admin/invitations-panel.tsx +16 -34
- package/src/admin/plan-change-labels.ts +23 -0
- package/src/admin/plan-change.tsx +89 -37
- package/src/admin/reviewer-scope-editor-labels.ts +16 -0
- package/src/admin/reviewer-scope-editor.tsx +9 -15
- package/src/admin/role-select-labels.ts +16 -0
- package/src/admin/role-select.tsx +13 -23
- package/src/admin/transfer-ownership-dialog-labels.ts +20 -0
- package/src/admin/transfer-ownership-dialog.tsx +7 -17
- package/src/admin/user-roster-labels.ts +17 -0
- package/src/admin/user-roster.tsx +9 -17
- package/src/auth/accept-invitation-labels.ts +21 -0
- package/src/auth/accept-invitation.tsx +9 -20
- package/src/auth/auth-errors.ts +29 -13
- package/src/auth/complete-name-dialog-labels.ts +16 -0
- package/src/auth/complete-name-dialog.tsx +8 -13
- package/src/auth/forgot-password-form-labels.ts +20 -0
- package/src/auth/forgot-password-form.tsx +12 -20
- package/src/auth/new-password-fields.tsx +1 -1
- package/src/auth/not-found-page-labels.ts +12 -0
- package/src/auth/not-found-page.tsx +11 -14
- package/src/auth/register-form-labels.ts +31 -0
- package/src/auth/register-form.tsx +18 -38
- package/src/auth/reset-password-form-labels.ts +27 -0
- package/src/auth/reset-password-form.tsx +12 -27
- package/src/auth/sign-in-form-labels.ts +44 -0
- package/src/auth/sign-in-form.tsx +18 -51
- package/src/auth/status-parts.tsx +3 -3
- package/src/auth/verify-email-labels.ts +26 -0
- package/src/auth/verify-email.tsx +15 -30
- package/src/billing/billing-banner.tsx +2 -1
- package/src/billing/billing-labels.ts +1 -1
- package/src/billing/checkout-processing.ts +2 -12
- package/src/billing/pay-page.ts +9 -5
- package/src/billing/plan-card.tsx +26 -27
- package/src/billing/plan-limit-notice.tsx +1 -1
- package/src/billing/subscription-actions.tsx +4 -4
- package/src/chart.ts +7 -1
- package/src/components/account-chips-labels.ts +16 -0
- package/src/components/account-chips.tsx +13 -16
- package/src/components/alert-banner.tsx +39 -19
- package/src/components/amount-input.tsx +461 -405
- package/src/components/appearance-labels.ts +2 -2
- package/src/components/authed-image-labels.ts +11 -0
- package/src/components/authed-image.tsx +6 -8
- package/src/components/autocomplete.tsx +84 -80
- package/src/components/breadcrumbs-labels.ts +10 -0
- package/src/components/breadcrumbs.tsx +17 -14
- package/src/components/bulk-action-bar-labels.ts +11 -0
- package/src/components/bulk-action-bar.tsx +15 -16
- package/src/components/button-group.tsx +7 -7
- package/src/components/button-look.ts +230 -0
- package/src/components/button.tsx +339 -0
- package/src/components/calculator.tsx +18 -11
- package/src/components/calendar-heatmap-labels.ts +15 -0
- package/src/components/calendar-heatmap.tsx +13 -19
- package/src/components/card.tsx +381 -0
- package/src/components/chart-zoom-core.tsx +653 -0
- package/src/components/chart-zoom.tsx +64 -648
- package/src/components/chart.tsx +11 -11
- package/src/components/checkbox-group.tsx +13 -10
- package/src/components/checkbox.tsx +43 -42
- package/src/components/chip-input.tsx +377 -0
- package/src/components/chip-labels.ts +13 -0
- package/src/components/chip.tsx +115 -711
- package/src/components/choice-card.tsx +83 -85
- package/src/components/column-mapper-labels.ts +45 -0
- package/src/components/column-mapper.tsx +16 -51
- package/src/components/combobox-core.tsx +351 -196
- package/src/components/combobox-suggestions.tsx +129 -0
- package/src/components/combobox.tsx +69 -893
- package/src/components/confirm-dialog-labels.ts +13 -0
- package/src/components/confirm-dialog.tsx +4 -8
- package/src/components/copy-button-labels.ts +13 -0
- package/src/components/copy-button.tsx +10 -12
- package/src/components/country-select-labels.ts +11 -0
- package/src/components/country-select.tsx +74 -89
- package/src/components/currency-option-list.tsx +216 -0
- package/src/components/currency-select.tsx +85 -196
- package/src/components/danger-confirm-labels.ts +20 -0
- package/src/components/danger-confirm.tsx +69 -77
- package/src/components/data-table-cells.tsx +5 -5
- package/src/components/data-table-column-settings.tsx +137 -0
- package/src/components/data-table-filter-popover.tsx +49 -24
- package/src/components/data-table-filters.ts +48 -11
- package/src/components/data-table-head.tsx +258 -0
- package/src/components/data-table-labels.ts +43 -11
- package/src/components/data-table-mobile.tsx +594 -0
- package/src/components/data-table-pagination.tsx +11 -10
- package/src/components/data-table-resize.ts +187 -0
- package/src/components/data-table-row-actions.tsx +152 -0
- package/src/components/data-table-selection.ts +55 -0
- package/src/components/data-table-shared.tsx +172 -0
- package/src/components/data-table.tsx +178 -1300
- package/src/components/date-field.tsx +627 -0
- package/src/components/date-picker.tsx +58 -1446
- package/src/components/date-range-picker.tsx +490 -0
- package/src/components/description-list-labels.ts +9 -0
- package/src/components/description-list.tsx +31 -15
- package/src/components/dialog-frame-labels.ts +7 -0
- package/src/components/dialog-frame.tsx +8 -6
- package/src/components/disclosure.tsx +14 -14
- package/src/components/dropdown.tsx +114 -42
- package/src/components/empty-state.tsx +137 -0
- package/src/components/entity-combobox.tsx +17 -12
- package/src/components/error-boundary-labels.ts +20 -0
- package/src/components/error-boundary.tsx +10 -20
- package/src/components/facing-pair.ts +1 -1
- package/src/components/field-base.tsx +615 -0
- package/src/components/field-parts.tsx +206 -77
- package/src/components/field-strip.tsx +16 -21
- package/src/components/field-sync-labels.ts +13 -0
- package/src/components/field-sync.tsx +11 -12
- package/src/components/field.tsx +13 -11
- package/src/components/file-button.tsx +64 -412
- package/src/components/file-dropzone.tsx +36 -33
- package/src/components/floating-panel-labels.ts +10 -0
- package/src/components/floating-panel.tsx +32 -21
- package/src/components/focus-ring.ts +9 -4
- package/src/components/form-actions-labels.ts +11 -0
- package/src/components/form-actions.tsx +17 -21
- package/src/components/full-bleed-dialog.tsx +33 -25
- package/src/components/grouped-picker.tsx +118 -96
- package/src/components/help-popover.tsx +115 -0
- package/src/components/hover-menu.tsx +46 -35
- package/src/components/iban-input-labels.ts +15 -0
- package/src/components/iban-input.tsx +25 -20
- package/src/components/icon-button.tsx +945 -0
- package/src/components/icon-picker-labels.ts +13 -0
- package/src/components/icon-picker.tsx +27 -24
- package/src/components/image-grid-labels.ts +11 -0
- package/src/components/image-grid.tsx +13 -15
- package/src/components/inline-edit-field-labels.ts +11 -0
- package/src/components/inline-edit-field.tsx +20 -19
- package/src/components/inline-entity-combobox.tsx +789 -0
- package/src/components/input.tsx +380 -0
- package/src/components/jump-calendar.tsx +385 -0
- package/src/components/language-select.tsx +31 -16
- package/src/components/legal-labels.ts +99 -0
- package/src/components/legal-page.tsx +2 -2
- package/src/components/legal.tsx +11 -101
- package/src/components/lightbox-labels.ts +18 -0
- package/src/components/lightbox.tsx +13 -21
- package/src/components/line-items-labels.ts +14 -0
- package/src/components/line-items.tsx +24 -31
- package/src/components/list-labels.ts +10 -0
- package/src/components/list.tsx +98 -75
- package/src/components/loading-state.tsx +4 -4
- package/src/components/measured-grid-labels.ts +25 -0
- package/src/components/measured-grid.tsx +39 -62
- package/src/components/menu-item.tsx +29 -26
- package/src/components/mini-calendar-labels.ts +17 -0
- package/src/components/mini-calendar.tsx +38 -45
- package/src/components/modal.tsx +36 -18
- package/src/components/money-draft.ts +72 -0
- package/src/components/money-field.tsx +16 -30
- package/src/components/month-picker-labels.ts +22 -0
- package/src/components/month-picker.tsx +59 -45
- package/src/components/multi-entity-combobox.tsx +17 -12
- package/src/components/multi-select.tsx +313 -288
- package/src/components/nav-pills.tsx +19 -8
- package/src/components/number-field.tsx +14 -5
- package/src/components/number-input.tsx +125 -90
- package/src/components/numeric-field.ts +161 -0
- package/src/components/numpad-sheet.tsx +16 -16
- package/src/components/one-time-code-input.tsx +154 -169
- package/src/components/page-contents-labels.ts +9 -0
- package/src/components/page-contents.tsx +15 -15
- package/src/components/page-header.tsx +9 -5
- package/src/components/password-strength-labels.ts +23 -0
- package/src/components/password-strength.tsx +13 -27
- package/src/components/phone-input-labels.ts +10 -0
- package/src/components/phone-input.tsx +42 -57
- package/src/components/picker-sheet.tsx +47 -18
- package/src/components/pie-chart.tsx +11 -9
- package/src/components/popover-labels.ts +14 -0
- package/src/components/popover.tsx +40 -39
- package/src/components/progress-bar-labels.ts +10 -0
- package/src/components/progress-bar.tsx +32 -23
- package/src/components/qr-code.tsx +2 -2
- package/src/components/reauth-dialog-labels.ts +13 -0
- package/src/components/reauth-dialog.tsx +7 -10
- package/src/components/row-actions-labels.ts +10 -0
- package/src/components/row-actions.tsx +11 -10
- package/src/components/scroll-area.tsx +4 -10
- package/src/components/search-field.tsx +35 -49
- package/src/components/select.tsx +302 -0
- package/src/components/separator.tsx +2 -2
- package/src/components/series-chart-axes.ts +329 -0
- package/src/components/series-chart-thin.ts +180 -0
- package/src/components/series-chart.tsx +124 -325
- package/src/components/server-wake-labels.ts +11 -0
- package/src/components/server-wake.tsx +42 -63
- package/src/components/settings-fields.tsx +46 -17
- package/src/components/share-card-labels.ts +30 -0
- package/src/components/share-card.tsx +22 -37
- package/src/components/sign-chip-labels.ts +12 -0
- package/src/components/sign-chip.tsx +6 -9
- package/src/components/signature-pad-labels.ts +24 -0
- package/src/components/signature-pad.tsx +48 -57
- package/src/components/signed-amount-labels.ts +10 -0
- package/src/components/signed-amount.tsx +21 -22
- package/src/components/skeleton.tsx +11 -3
- package/src/components/slider.tsx +51 -39
- package/src/components/sparkline-labels.ts +14 -0
- package/src/components/sparkline.tsx +16 -21
- package/src/components/spinner.tsx +81 -0
- package/src/components/stat-tile-labels.ts +15 -0
- package/src/components/stat-tile.tsx +32 -37
- package/src/components/status-dot.tsx +17 -14
- package/src/components/swatch-picker-labels.ts +10 -0
- package/src/components/swatch-picker.tsx +23 -16
- package/src/components/swipeable-row.tsx +7 -7
- package/src/components/switch.tsx +33 -32
- package/src/components/table.tsx +15 -15
- package/src/components/tabs.tsx +660 -0
- package/src/components/text-link.tsx +7 -7
- package/src/components/text.tsx +10 -6
- package/src/components/textarea.tsx +323 -0
- package/src/components/tile-radio.tsx +6 -6
- package/src/components/time-input.tsx +15 -7
- package/src/components/toast-labels.ts +12 -0
- package/src/components/toast.tsx +5 -8
- package/src/components/toggle-group.tsx +105 -42
- package/src/components/toggle-legend.tsx +6 -6
- package/src/components/tooltip.tsx +10 -21
- package/src/components/translation-review-editor.tsx +8 -7
- package/src/components/translation-review-parts.tsx +9 -13
- package/src/components/translation-review.tsx +26 -14
- package/src/components/tree-view.tsx +14 -12
- package/src/components/ui-labels.ts +22 -0
- package/src/components/user-avatar.tsx +3 -3
- package/src/components/wizard-stepper.tsx +10 -5
- package/src/components/write-lock-labels.ts +9 -0
- package/src/components/write-lock.tsx +10 -12
- package/src/data-table.ts +4 -0
- package/src/demo/demo-banner.tsx +9 -25
- package/src/demo/demo-ended.tsx +8 -7
- package/src/demo/demo-labels.ts +2 -2
- package/src/demo/demo-start.tsx +7 -5
- package/src/feedback/feedback-attachment-labels.ts +36 -0
- package/src/feedback/feedback-attachment.tsx +42 -66
- package/src/feedback/feedback-context-labels.ts +10 -0
- package/src/feedback/feedback-context.tsx +8 -9
- package/src/feedback/feedback-dialog-labels.ts +28 -0
- package/src/feedback/feedback-dialog.tsx +14 -44
- package/src/feedback/feedback-inbox.tsx +49 -252
- package/src/feedback/feedback-labels.ts +5 -5
- package/src/feedback/feedback-menu-labels.ts +11 -0
- package/src/feedback/feedback-menu.tsx +13 -11
- package/src/feedback/feedback-record.ts +21 -7
- package/src/feedback/feedback-row-detail-labels.ts +33 -0
- package/src/feedback/feedback-row-detail.tsx +30 -43
- package/src/feedback/feedback-status-undo.ts +3 -2
- package/src/feedback/feedback-submit-dialog.tsx +109 -0
- package/src/feedback/feedback-submit.tsx +45 -55
- package/src/feedback/feedback-swipe.tsx +1 -1
- package/src/feedback/feedback-table-labels.ts +27 -0
- package/src/feedback/feedback-table.tsx +24 -40
- package/src/feedback/feedback-thread-labels.ts +22 -0
- package/src/feedback/feedback-thread.tsx +68 -48
- package/src/feedback/feedback-vocabulary.ts +252 -0
- package/src/hooks/use-anchored-panel.ts +155 -9
- package/src/hooks/use-anchored-rect.ts +11 -9
- package/src/hooks/use-authed-src.ts +13 -7
- package/src/hooks/use-breakpoint.ts +5 -4
- package/src/hooks/use-close-transition.ts +9 -10
- package/src/hooks/use-debounce.ts +9 -0
- package/src/hooks/use-dismiss.ts +176 -19
- package/src/hooks/use-file-drop.ts +2 -2
- package/src/hooks/use-file-picker-labels.ts +29 -0
- package/src/hooks/use-file-picker.tsx +363 -0
- package/src/hooks/use-focus-trap.ts +74 -18
- package/src/i18n/defaults.ts +91 -82
- package/src/i18n/german.ts +54 -7
- package/src/i18n/kit-labels.tsx +70 -119
- package/src/i18n/locales/en.ts +46 -0
- package/src/i18n/locales/es.ts +52 -7
- package/src/i18n/locales/fr.ts +55 -8
- package/src/i18n/locales/hu.ts +54 -8
- package/src/i18n/locales/it.ts +53 -7
- package/src/i18n/locales/zh.ts +50 -6
- package/src/i18n/plurals.ts +29 -0
- package/src/i18n/review.ts +4 -0
- package/src/i18n/shared-labels.ts +135 -0
- package/src/index.ts +412 -402
- package/src/landing/access.ts +2 -1
- package/src/landing/landing-actions.tsx +6 -5
- package/src/landing/landing-labels.ts +2 -2
- package/src/landing/landing-sections.tsx +24 -23
- package/src/landing/public-header.tsx +3 -2
- package/src/landing/routing.tsx +2 -7
- package/src/lib/chip-edge-snap.ts +212 -0
- package/src/lib/cn.ts +13 -1
- package/src/lib/dates.ts +4 -2
- package/src/lib/decimal-marks.ts +4 -2
- package/src/lib/download.ts +172 -0
- package/src/lib/floating-stack.ts +5 -1
- package/src/lib/format.ts +5 -3
- package/src/lib/ime.ts +24 -0
- package/src/lib/presence.ts +18 -0
- package/src/lib/reduced-motion.ts +21 -0
- package/src/lib/round.ts +38 -0
- package/src/lib/safe-storage.ts +35 -11
- package/src/lib/session-refresh.ts +473 -0
- package/src/lib/text-match.ts +60 -0
- package/src/lib/translation-review.ts +7 -6
- package/src/rhf/fields.tsx +131 -179
- package/src/rhf/form-core.tsx +327 -0
- package/src/rhf/form.tsx +46 -321
- package/src/rhf/line-items.tsx +1 -1
- package/src/rhf.ts +3 -2
- package/src/search/command-palette-labels.ts +16 -0
- package/src/search/command-palette.tsx +37 -50
- package/src/search/global-search-labels.ts +13 -0
- package/src/search/global-search.tsx +50 -24
- package/src/search/search-index.ts +5 -6
- package/src/search/use-command-key.ts +22 -0
- package/src/settings/settings-card-classes.ts +11 -0
- package/src/settings/settings-heading.tsx +1 -1
- package/src/settings/settings-labels.ts +2 -2
- package/src/settings/settings-layout.tsx +65 -6
- package/src/settings/settings-section.tsx +5 -5
- package/src/settings/use-settings-focus.ts +2 -5
- package/src/shell/app-shell-labels.ts +10 -0
- package/src/shell/app-shell.tsx +79 -53
- package/src/shell/auth-layout.tsx +11 -10
- package/src/shell/company-switcher-labels.ts +13 -0
- package/src/shell/company-switcher.tsx +7 -11
- package/src/shell/option-switcher-menu.tsx +25 -6
- package/src/shell/role-switcher.tsx +7 -3
- package/src/shell/top-bar-brand.tsx +1 -1
- package/src/shell/top-bar.tsx +6 -5
- package/src/shell/topbar-action-menu.tsx +39 -20
- package/src/shell/topbar-controls.tsx +24 -12
- package/src/shell.ts +1 -1
- package/src/testing/index.ts +11 -0
- package/src/testing/viewport.ts +251 -0
- package/src/theme/color.ts +7 -1
- package/src/theme/palette-derive.ts +29 -7
- package/src/theme/palette-presets.ts +81 -68
- package/src/tour/tour-labels.ts +14 -0
- package/src/tour/tour.tsx +13 -23
- package/src/wizard/stepper-nav.tsx +19 -18
- package/src/wizard/types.ts +7 -22
- package/src/wizard/wizard-labels.ts +29 -0
- package/src/wizard/wizard-step.tsx +2 -2
- package/src/wizard/wizard-summary.tsx +8 -7
- package/tokens.css +63 -14
- package/dist/components/account-settings-labels.js.map +0 -1
- package/dist/components/account-settings.js.map +0 -1
- package/dist/components/choice-parts.d.ts +0 -24
- package/dist/components/choice-parts.js +0 -18
- package/dist/components/choice-parts.js.map +0 -1
- package/dist/components/passkeys-setting.js.map +0 -1
- package/dist/components/ui.d.ts +0 -100
- package/dist/components/ui.js +0 -1955
- package/dist/components/ui.js.map +0 -1
- package/dist/data-table-labels-BJ5JE_X2.d.ts +0 -923
- package/dist/delete-account-setting-DiPX4Vue.d.ts +0 -8130
- package/src/components/choice-parts.ts +0 -33
- package/src/components/ui.tsx +0 -4233
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/auth/sign-in-form.tsx"],"sourcesContent":["import { useEffect, useEffectEvent, useId, useRef, useState } from \"react\";\nimport type { ComponentPropsWithoutRef, FormEvent, ReactNode } from \"react\";\nimport { KeyRound } from \"lucide-react\";\n\nimport { useKitLabels } from \"../i18n/kit-labels\";\nimport { cn } from \"../lib/cn\";\nimport { AlertBanner } from \"../components/alert-banner\";\nimport { hasMessage } from \"../components/choice-parts\";\nimport { CurrentPasswordInput } from \"../components/danger-confirm\";\nimport { OneTimeCodeInput } from \"../components/one-time-code-input\";\nimport { TextLink } from \"../components/text-link\";\nimport { Button, Input } from \"../components/ui\";\nimport { accessAction } from \"../landing/access\";\nimport type { AccessChoice } from \"../landing/access\";\nimport { useLandingLabels } from \"../landing/landing-labels\";\nimport { authErrorCode, englishRateLimited, isRateLimited, retryAfterSeconds } from \"./auth-errors\";\nimport type { KitErrorCode } from \"./auth-errors\";\nimport { taggedEmail } from \"./email-tag\";\nimport { newPasswordProblem } from \"./form-rules\";\nimport { NewPasswordFields } from \"./new-password-fields\";\n\n/* ── The answers (§5.1) ──────────────────────────────────────────────────── */\n\n/**\n * What a sign-in call answers, in the kit's words — docs/auth-harmonization.md §5.1,\n * keksdose's three shapes. The app maps its own HTTP answer to one of these and resolves\n * with it; a refusal REJECTS (with whatever its client throws — {@link authErrorCode}\n * reads the code out of it).\n *\n * | the server answers (keksdose) | resolve with |\n * |---|---|\n * | `TokenResponse` `{access_token, refresh_token, token_type, user}` | `{ kind: \"signed-in\" }`, after the app has stored the session |\n * | `{requires_2fa: true, challenge_token}` | `{ kind: \"2fa\", challengeToken: challenge_token }` |\n * | `{requires_password_change: true, challenge_token, encrypted}` | `{ kind: \"password-change\", challengeToken: challenge_token, extra: { encrypted } }` |\n * | `401 {code: \"invalid_credentials\"}` | reject — let the client's error through |\n *\n * ```ts\n * async function toAnswer(res: TokenResponse | TwoFactorChallenge | PasswordChangeChallenge): Promise<SignInAnswer> {\n * if (\"requires_2fa\" in res) return { kind: \"2fa\", challengeToken: res.challenge_token };\n * if (\"requires_password_change\" in res)\n * return { kind: \"password-change\", challengeToken: res.challenge_token, extra: { encrypted: res.encrypted } };\n * await onLoginSuccess(res); // store tokens, load /auth/me, switch language\n * return { kind: \"signed-in\" };\n * }\n * <SignInForm onSubmit={async (v) => toAnswer(await authApi.login(v))} … />\n * ```\n *\n * The same mapping serves `/auth/login/2fa`, `/auth/login/set-password` and the passkey\n * finish, which answer the same union.\n */\nexport type SignInAnswer =\n | { kind: \"signed-in\" }\n | { kind: \"2fa\"; challengeToken: string }\n | {\n kind: \"password-change\";\n challengeToken: string;\n /** The challenge's app fields, passed through untouched — keksdose's `encrypted`,\n * which its note on this step reads (`passwordChangeContent`). */\n extra?: Readonly<Record<string, unknown>>;\n };\n\n/** The step on screen: the credentials, the second factor, or a new password. */\nexport type SignInStep = \"credentials\" | \"2fa\" | \"password-change\";\n\n/** What the person did when a call failed — {@link SignInFormProps.describeError}'s\n * second argument. */\nexport type SignInAction = \"password\" | \"passkey\" | \"code\" | \"set-password\";\n\nexport interface SignInCredentials {\n /** Trimmed. Lower-casing is the server's (§3.1). */\n email: string;\n /** As typed, never trimmed. */\n password: string;\n}\n\nexport interface SignInCodeValues {\n challengeToken: string;\n /** Digits only — {@link OneTimeCodeInput} drops the spaces of \"123 456\". A backup code\n * (`kind: \"recovery\"`) is trimmed and otherwise as typed: its dashes and case are the\n * server's to normalise, as kastlan's `_normalise_backup_code` does. */\n code: string;\n /**\n * 0.30.0: `\"recovery\"` when the person typed one of their backup codes instead\n * (`recoveryCode`); absent for the authenticator's code, as before. kastlan's\n * `/auth/login/2fa` takes either in the same `code` and tells them apart itself; an\n * app whose server takes a backup code elsewhere routes on this.\n */\n kind?: \"recovery\";\n}\n\nexport interface SignInNewPasswordValues {\n challengeToken: string;\n password: string;\n}\n\n/* ── Labels ──────────────────────────────────────────────────────────────── */\n\n/**\n * Every string `SignInForm` renders — the `signIn` namespace of `<UiKitProvider\n * labels>`, overridable per instance through `labels`. keksdose's words where it has\n * them (`auth.*` in its catalogue).\n */\nexport interface SignInLabels {\n email: string;\n password: string;\n /** The submit button. */\n submit: string;\n /** The passkey button (`onPasskey`). */\n passkey: string;\n /** The link to `forgotHref`. */\n forgotPassword: string;\n /** Before the link to `registerHref`. */\n noAccount: string;\n /** The link to `registerHref`. */\n register: string;\n /** The ONE answer to an unknown address, a wrong password and a deactivated account\n * (`invalid_credentials`, §5.2). */\n invalidCredentials: string;\n /** Any other failed sign-in (the network, a 500). */\n failed: string;\n /** A failed or refused passkey sign-in. */\n passkeyFailed: string;\n /**\n * The hint under `invalidCredentials` (§2.10), shown when `deactivatedContact` is\n * given. A TEMPLATE: `{contact}` is replaced by the contact — a `mailto:` link for an\n * address — so a language puts it where its grammar needs it.\n */\n deactivatedHint: string;\n /** The hint under `invalidCredentials` when `emailTag` is given (§4.5), given the\n * typed address with the app's tag: \"Signed up with ada+kastlan@example.com?\". */\n tagHint: (taggedAddress: string) => string;\n /** The second-factor step's heading. */\n twoFactorTitle: string;\n twoFactorIntro: string;\n /** The code field's label. */\n code: string;\n /** The code step's submit button. */\n verify: string;\n /** The code was refused. */\n codeInvalid: string;\n /** The set-a-new-password step's heading. */\n setPasswordTitle: string;\n setPasswordIntro: string;\n newPassword: string;\n confirmPassword: string;\n passwordMismatch: string;\n /** The set-a-new-password step's submit button. */\n setPasswordSubmit: string;\n setPasswordFailed: string;\n /** A challenge was refused as `token_invalid` — it expired between the steps; the\n * form is back on the credentials. */\n expired: string;\n /** From the second and third step back to the credentials. */\n backToSignIn: string;\n /*\n * 0.30.0 — OPTIONAL, like `TwoFactorSettingLabels.qrAlt` and for its reason: a new\n * required key is a compile error at every call site that annotates this interface\n * (CONTRIBUTING's additive-API rule). Each falls back to the provider's `signIn`, then\n * English.\n */\n /** The second-factor step's switch to a backup code (`recoveryCode`). */\n useRecoveryCode?: string;\n /** The switch back, from the backup-code field to the authenticator's code. */\n useAuthenticatorCode?: string;\n /** The backup-code field's label. */\n recoveryCode?: string;\n /** The step's intro while a backup code is asked for, in place of `twoFactorIntro`. */\n recoveryIntro?: string;\n /** Under the backup-code field, given how many letters and digits a code has. */\n recoveryCodeHint?: (length: number) => string;\n /** A refused backup code — wrong, or spent already (each one works once). */\n recoveryCodeInvalid?: string;\n /** Any step's request was throttled — HTTP 429 ({@link isRateLimited}) — given the\n * wait its `Retry-After` asks for, in seconds ({@link retryAfterSeconds}), or\n * `undefined` (or `0`) without one. */\n rateLimited?: (seconds?: number) => string;\n /** 0.31.0: the link after `noAccount` for an invitation-only app (`access` of kind\n * `request`) — a mail to support, in place of `register`. */\n requestAccess?: string;\n}\n\n/** `Required`: every key, the 0.30 ones included, has its English here. */\nexport const DEFAULT_SIGN_IN_LABELS: Required<SignInLabels> = {\n email: \"Email\",\n password: \"Password\",\n submit: \"Sign in\",\n passkey: \"Sign in with a passkey\",\n forgotPassword: \"Forgot your password?\",\n noAccount: \"No account yet?\",\n register: \"Create account\",\n invalidCredentials: \"The email or password is incorrect.\",\n failed: \"Sign-in failed. Please try again.\",\n passkeyFailed: \"Passkey sign-in failed.\",\n deactivatedHint: \"Account deactivated? Write to {contact}.\",\n tagHint: (taggedAddress) => `Signed up with ${taggedAddress}? Use that address.`,\n twoFactorTitle: \"Two-factor authentication\",\n twoFactorIntro: \"Enter the code your authenticator app shows.\",\n code: \"2FA code\",\n verify: \"Verify\",\n codeInvalid: \"Invalid 2FA code.\",\n setPasswordTitle: \"Choose a new password\",\n setPasswordIntro: \"A new password was requested for this account. Choose one and you are straight back in.\",\n newPassword: \"New password\",\n confirmPassword: \"Repeat new password\",\n passwordMismatch: \"The passwords don't match.\",\n setPasswordSubmit: \"Set password and sign in\",\n setPasswordFailed: \"The password could not be set.\",\n expired: \"This sign-in has expired. Please sign in again.\",\n backToSignIn: \"Back to sign in\",\n useRecoveryCode: \"Use a backup code\",\n useAuthenticatorCode: \"Use your authenticator app\",\n recoveryCode: \"Backup code\",\n recoveryIntro: \"Enter one of the backup codes you saved when you turned on two-factor authentication.\",\n recoveryCodeHint: (length) => `${length} letters and digits. Dashes and spaces don’t matter.`,\n recoveryCodeInvalid: \"This backup code is not valid, or it has been used already.\",\n rateLimited: englishRateLimited,\n requestAccess: \"Request access\",\n};\n\n/* ── Props ───────────────────────────────────────────────────────────────── */\n\nexport interface SignInFormProps extends Omit<ComponentPropsWithoutRef<\"div\">, \"onSubmit\" | \"children\"> {\n /**\n * The credentials step was submitted. Send them, and resolve with the answer\n * ({@link SignInAnswer}) or reject with the client's error. The form never sends a\n * request itself (§8): keksdose must see the password on its way, to refuse the same\n * string as an encryption passphrase later.\n *\n * On `signed-in` the form's job is over — it stays busy while the app navigates.\n */\n onSubmit: (credentials: SignInCredentials) => Promise<SignInAnswer>;\n /** The second factor was submitted (`/auth/login/2fa`). Resolves with the next answer\n * — keksdose may still require a new password after the code. */\n onCode: (values: SignInCodeValues) => Promise<SignInAnswer>;\n /** The new password was submitted (`/auth/login/set-password`). Resolves with the\n * answer, `signed-in` in practice; keksdose's `key_wrap_unchanged` note is the app's\n * to show from here. */\n onSetPassword: (values: SignInNewPasswordValues) => Promise<SignInAnswer>;\n /**\n * The passkey button was pressed: run the ceremony (`/auth/passkey/login/begin|finish`)\n * and resolve with its answer. It asks for NO email — a passkey is bound to the site,\n * and the browser offers every one it holds (keksdose #126). Left out, no button: pass\n * it only where `PublicKeyCredential` exists.\n */\n onPasskey?: () => Promise<SignInAnswer>;\n /**\n * Passkey autofill (conditional mediation). The email field is\n * `autoComplete=\"username webauthn\"`, so a pending `navigator.credentials.get({\n * mediation: \"conditional\" })` lists the site's passkeys in its dropdown. The form\n * calls this ONCE on mount; arm the request there and resolve with its answer when the\n * person picks a passkey, or with `null` when nothing happens. The signal aborts on\n * unmount — cancel the pending request then (keksdose: `armPasskeyAutofill(onDone,\n * signal)` + `cancelPasskeyAutofill()`). A rejection is silent: the button stays the\n * reliable path.\n */\n passkeyAutofill?: (signal: AbortSignal) => Promise<SignInAnswer | null | undefined>;\n /** \"Forgot your password?\" goes here — the app's `/forgot-password`. Left out, no\n * link. */\n forgotHref?: string;\n /** \"No account yet? Create account\" goes here — `/register`. Left out, no line. */\n registerHref?: string;\n /**\n * 0.31.0 (docs/landing-demo-harmonization.md §4.2): how a visitor gets an account —\n * the same value the landing's `PublicHeader` and `Hero` take. `{kind: \"request\",\n * email}` turns the line into \"No account yet? Request access\", a mail to support with\n * the subject and body of `accessAction` (every app is invitation-only); `{kind:\n * \"register\", href}` keeps \"Create account\", to `href`. Wins over `registerHref`; left\n * out, `registerHref` works as before.\n */\n access?: AccessChoice;\n /** The email field's start value — the reset page ends on \"Sign in\" with the address\n * filled in (§6.3). */\n defaultEmail?: string;\n /**\n * The app's address tag (`\"kastlan\"`, §4.5). After `invalid_credentials` the form also\n * says \"Signed up with you+kastlan@example.com? Use that address.\" — sign-in stays\n * exact, and the server looks nothing up.\n */\n emailTag?: string;\n /**\n * Who a deactivated user writes to (§2.10): an address (drawn as a `mailto:` link) or\n * the app's own node. Shown after `invalid_credentials` as \"Account deactivated? Write\n * to …\". Left out, no hint.\n */\n deactivatedContact?: ReactNode;\n /** Digits of the second factor. Default 6 (TOTP). */\n codeLength?: number;\n /**\n * 0.30.0: offer a backup code on the second-factor step (kastlan's 0.29 adoption: its\n * `/auth/login/2fa` takes one of the eight codes minted at 2FA setup, and the kit's\n * step had no way to type one). A \"Use a backup code\" switch under the code field\n * swaps the digits-only {@link OneTimeCodeInput} for a plain text field; the code goes\n * to `onCode` with the same challenge and `kind: \"recovery\"`.\n *\n * `true` for a 16-character code (kastlan's `ABCD-EFGH-JKLM-NPQR`), or `{ length }`.\n * The length counts letters and digits only — the dashes and spaces a printed code is\n * grouped with don't count — and \"Verify\" waits for it. Left out, no switch.\n */\n recoveryCode?: boolean | { length?: number };\n /** App content at the top of the credentials step — a notice, a demo button. */\n credentialsContent?: ReactNode;\n /**\n * App content on the second-factor step, under its intro. 0.30.0: pass a function and\n * it gets the challenge token — kastlan kept its own copy of the token for a \"lost\n * your device?\" link, which the step now hands over.\n */\n twoFactorContent?: ReactNode | ((challengeToken: string) => ReactNode);\n /**\n * App content on the set-a-new-password step, under its intro — keksdose's\n * private-mode note (\"Your encrypted data is untouched …\"), which depends on the\n * challenge: pass a function and it gets the challenge's `extra`.\n */\n passwordChangeContent?: ReactNode | ((extra: Readonly<Record<string, unknown>> | undefined) => ReactNode);\n /**\n * The app's own words for a failure, or `undefined` for the kit's: the device being\n * offline, a throttle with its wait (\"try again in an hour\"). Asked first, for every\n * failure; what it returns replaces the message, and the `invalid_credentials` hints\n * still follow. A bare `429` needs none since 0.30.0: the kit says `rateLimited`.\n */\n describeError?: (error: unknown, action: SignInAction) => ReactNode | undefined;\n /** The step changed — retitle the page (`AuthLayout`'s `title`) if the app wants. */\n onStepChange?: (step: SignInStep) => void;\n /** The level of the second and third step's heading. Default `h2`, under the page's\n * `h1`; one level under `AuthLayout`'s `headingAs` where that is embedded lower. */\n headingAs?: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n labels?: Partial<SignInLabels>;\n}\n\n/* ── Parts ───────────────────────────────────────────────────────────────── */\n\ninterface Failure {\n action: SignInAction;\n code: KitErrorCode | undefined;\n message: ReactNode;\n /** The address the failed credentials carried — the tag hint names its tagged form. */\n email?: string;\n}\n\n/** `{contact}` in the template, replaced by the contact (a `mailto:` link for an\n * address). Split, not interpolated, so the link is an element. A template that lost\n * its placeholder still shows the contact, after it. */\nfunction withContact(template: string, contact: ReactNode): ReactNode[] {\n const node =\n typeof contact === \"string\" && contact.includes(\"@\") ? (\n <TextLink key=\"contact\" href={`mailto:${contact}`} tone=\"secondary\">\n {contact}\n </TextLink>\n ) : (\n <span key=\"contact\">{contact}</span>\n );\n if (!template.includes(\"{contact}\")) return [template, \" \", node];\n return template\n .split(/(\\{contact\\})/)\n .filter((part) => part !== \"\")\n .map((part) => (part === \"{contact}\" ? node : part));\n}\n\nconst HINT_CLASS = \"text-xs text-[var(--text-secondary)]\";\n\n/** A backup code's letters and digits — kastlan's: 16, printed `ABCD-EFGH-JKLM-NPQR`. */\nconst RECOVERY_CODE_LENGTH = 16;\n\n/** How many letters and digits a typed backup code has: the dashes and spaces it is\n * printed in groups with don't count, so \"abcd-efgh ijkl mnop\" is 16 — the count\n * kastlan's server normalises the code to before it compares. */\nfunction recoveryCharacters(value: string): number {\n return value.replace(/[^\\p{L}\\p{N}]/gu, \"\").length;\n}\nconst INTRO_CLASS = \"text-sm text-[var(--text-secondary)]\";\n\n/* ── The form ────────────────────────────────────────────────────────────── */\n\n/**\n * Sign-in for every app (docs/auth-harmonization.md §5, §8): email and password, or a\n * passkey; then the second factor when it is on; then a new password when an admin\n * required one. keksdose's `LoginPage` and `ForcedPasswordChangeStep`\n * (features/auth/login-page.tsx, forced-password-change.tsx), as one component.\n *\n * **It never sends a request.** Each step hands its input to a callback and renders the\n * {@link SignInAnswer} it resolves with; a rejection is shown in the step it came from.\n * The challenge token lives in this component's state only, as in keksdose, so a reload\n * costs a fresh sign-in — no route, no storage.\n *\n * **One error for every wrong credential** (§2.10, §5.2): `invalid_credentials` shows one\n * sentence, whatever was wrong, plus two hints UNDER it — \"Account deactivated? Write to\n * …\" (`deactivatedContact`) and \"Signed up with you+kastlan@…? Use that address.\"\n * (`emailTag`). Any other failure says \"Sign-in failed\" and no hint: the hints answer a\n * refused credential, not a network that is down. `describeError` puts the app's words\n * on a failure the kit cannot know (a throttled attempt).\n *\n * **The steps.**\n * - Credentials: the email field is `username webauthn` (passkey autofill, see\n * `passkeyAutofill`), the password a `CurrentPasswordInput` (a password manager fills\n * it and never offers a new one). The submit is not disabled while the fields are\n * empty: a browser that autofills on load withholds the values until the first\n * interaction, and a disabled button would swallow that first click. The fields'\n * own `required` answers an empty submit instead. \"Forgot your password?\" sits under\n * the buttons, where someone whose password just failed is already looking\n * (keksdose #198).\n * - Second factor: {@link OneTimeCodeInput}, focused on arrival. \"Verify\" waits for the\n * whole code. A refused code stays here with its error; `token_invalid` (the\n * challenge expired) goes back to the credentials and says why. Kurvenschmiede has\n * no 2FA yet, and the step is here from the start, so adding it is backend work only\n * (§10.5). With `recoveryCode` (0.30.0) a switch under the field takes a backup code\n * instead, through the same `onCode` with `kind: \"recovery\"`.\n *\n * **A throttled request** (HTTP 429, {@link isRateLimited}) says \"Too many attempts. Try\n * again in 30 s.\" on any step (0.30.0) — the wait from its `Retry-After`, else \"Wait a\n * moment and try again.\" — after `describeError`, whose words still come first, and\n * instead of \"wrong password\" or \"invalid code\", which would send the person to try\n * another one.\n * - New password: new + confirm with the strength meter, the 8-character / 72-byte\n * rules and nothing else (§8). It reads as explained, not blocked (keksdose): the\n * person did nothing wrong.\n *\n * The password is dropped from state once the credentials are answered; \"Back to sign in\"\n * returns to an empty password field.\n */\nexport function SignInForm({\n onSubmit,\n onCode,\n onSetPassword,\n onPasskey,\n passkeyAutofill,\n forgotHref,\n registerHref,\n access,\n defaultEmail = \"\",\n emailTag,\n deactivatedContact,\n codeLength = 6,\n recoveryCode,\n credentialsContent,\n twoFactorContent,\n passwordChangeContent,\n describeError,\n onStepChange,\n headingAs: Heading = \"h2\",\n labels: labelsProp,\n className,\n ...rest\n}: SignInFormProps) {\n const labels = useKitLabels(\"signIn\", DEFAULT_SIGN_IN_LABELS, labelsProp);\n // The mail's subject and body are the landing's words (`landing` namespace), so the\n // request reads the same from every page that offers it.\n const landing = useLandingLabels();\n const accountLink =\n access === undefined\n ? registerHref === undefined\n ? null\n : { href: registerHref, label: labels.register }\n : access.kind === \"register\"\n ? { href: access.href, label: labels.register }\n : {\n href: accessAction(access, landing).href,\n label: labels.requestAccess ?? DEFAULT_SIGN_IN_LABELS.requestAccess,\n };\n const [step, setStep] = useState<SignInStep>(\"credentials\");\n const [email, setEmail] = useState(defaultEmail);\n const [password, setPassword] = useState(\"\");\n const [code, setCode] = useState(\"\");\n // 0.30.0: the second factor as a backup code instead of the authenticator's digits.\n const [useRecovery, setUseRecovery] = useState(false);\n const [recovery, setRecovery] = useState(\"\");\n const [newPassword, setNewPassword] = useState(\"\");\n const [confirm, setConfirm] = useState(\"\");\n const [challenge, setChallenge] = useState<{ token: string; extra?: Readonly<Record<string, unknown>> } | null>(\n null,\n );\n // What is running: one call at a time. \"done\" after `signed-in` — the app has the\n // session and is leaving; the buttons stay busy so nothing is sent twice meanwhile.\n const [busy, setBusy] = useState<SignInAction | \"done\" | null>(null);\n const [failure, setFailure] = useState<Failure | null>(null);\n const headingId = useId();\n\n const emailRef = useRef<HTMLInputElement>(null);\n const passwordRef = useRef<HTMLInputElement>(null);\n const codeRef = useRef<HTMLInputElement>(null);\n const recoveryRef = useRef<HTMLInputElement>(null);\n const newPasswordRef = useRef<HTMLInputElement>(null);\n\n // A late answer after unmount (the app navigated away) must not set state.\n const mounted = useRef(true);\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n }, []);\n\n const goTo = (next: SignInStep) => {\n setStep(next);\n onStepChange?.(next);\n };\n\n const present = (answer: SignInAnswer) => {\n setFailure(null);\n if (answer.kind === \"signed-in\") {\n setBusy(\"done\");\n return;\n }\n setBusy(null);\n // The password has done its work; it does not stay in state for the next steps.\n setPassword(\"\");\n setCode(\"\");\n setRecovery(\"\");\n setUseRecovery(false);\n setNewPassword(\"\");\n setConfirm(\"\");\n if (answer.kind === \"2fa\") {\n setChallenge({ token: answer.challengeToken });\n goTo(\"2fa\");\n } else if (answer.kind === \"password-change\") {\n setChallenge({ token: answer.challengeToken, extra: answer.extra });\n goTo(\"password-change\");\n }\n };\n\n const messageFor = (\n error: unknown,\n action: SignInAction,\n code: KitErrorCode | undefined,\n recoveryUsed: boolean,\n ): ReactNode => {\n const own = describeError?.(error, action);\n if (hasMessage(own)) return own;\n // After the app's words, before the kit's generic ones (0.30.0): a throttle is\n // neither a wrong password nor a wrong code, and saying so sends the person to try\n // another one — which the limiter counts too.\n if (isRateLimited(error)) return (labels.rateLimited ?? DEFAULT_SIGN_IN_LABELS.rateLimited)(retryAfterSeconds(error));\n if (action === \"password\") return code === \"invalid_credentials\" ? labels.invalidCredentials : labels.failed;\n if (action === \"passkey\") return labels.passkeyFailed;\n if (action === \"code\") {\n if (code === \"token_invalid\") return labels.expired;\n return recoveryUsed\n ? (labels.recoveryCodeInvalid ?? DEFAULT_SIGN_IN_LABELS.recoveryCodeInvalid)\n : labels.codeInvalid;\n }\n return code === \"token_invalid\" ? labels.expired : labels.setPasswordFailed;\n };\n\n const fail = (error: unknown, action: SignInAction, sentEmail?: string, recoveryUsed = false) => {\n setBusy(null);\n // Our own abort (a passkey ceremony cancelled by the unmount) is no failure.\n if ((error as { name?: unknown } | null)?.name === \"AbortError\") return;\n const code = authErrorCode(error);\n const message = messageFor(error, action, code, recoveryUsed);\n // The challenge expired between the steps: only a fresh sign-in helps.\n if ((action === \"code\" || action === \"set-password\") && code === \"token_invalid\") {\n setChallenge(null);\n setCode(\"\");\n setRecovery(\"\");\n setUseRecovery(false);\n setNewPassword(\"\");\n setConfirm(\"\");\n goTo(\"credentials\");\n }\n setFailure({ action, code, message, email: sentEmail });\n };\n\n const attempt = (\n action: SignInAction,\n call: () => Promise<SignInAnswer>,\n sentEmail?: string,\n recoveryUsed = false,\n ) => {\n if (busy) return;\n setBusy(action);\n setFailure(null);\n let result: Promise<SignInAnswer>;\n try {\n result = Promise.resolve(call());\n } catch (error) {\n result = Promise.reject(error);\n }\n result.then(\n (answer) => {\n if (mounted.current) present(answer);\n },\n (error: unknown) => {\n if (mounted.current) fail(error, action, sentEmail, recoveryUsed);\n },\n );\n };\n\n // Passkey autofill: armed once, on mount; the signal aborts on unmount. Its answer\n // arrives whenever the person picks a passkey from the email field's dropdown — and\n // is dropped if they have meanwhile started a sign-in of their own.\n const armAutofill = useEffectEvent((signal: AbortSignal) => passkeyAutofill?.(signal));\n const autofillAnswered = useEffectEvent((answer: SignInAnswer) => {\n if (busy === null) present(answer);\n });\n useEffect(() => {\n const controller = new AbortController();\n let pending: Promise<SignInAnswer | null | undefined>;\n try {\n pending = Promise.resolve(armAutofill(controller.signal));\n } catch (error) {\n pending = Promise.reject(error);\n }\n pending.then(\n (answer) => {\n if (answer && !controller.signal.aborted && mounted.current) autofillAnswered(answer);\n },\n () => {\n /* silent — unsupported, declined or aborted; the button stays the way in */\n },\n );\n return () => controller.abort();\n }, []);\n\n // Focus follows the step — not on mount (where it would pop a phone's keyboard over\n // the page), only once the person moved to another step.\n const shownStep = useRef(step);\n useEffect(() => {\n if (shownStep.current === step) return;\n shownStep.current = step;\n if (step === \"2fa\") codeRef.current?.focus();\n else if (step === \"password-change\") newPasswordRef.current?.focus();\n else if (emailRef.current?.value) passwordRef.current?.focus();\n else emailRef.current?.focus();\n }, [step]);\n // The backup-code switch swaps one field for the other under the focus that pressed\n // it; the field that came in is where the person is going. Only after a switch on\n // this step — arriving on it is the effect above.\n const shownRecovery = useRef(useRecovery);\n useEffect(() => {\n if (shownRecovery.current === useRecovery) return;\n shownRecovery.current = useRecovery;\n if (step !== \"2fa\") return;\n (useRecovery ? recoveryRef : codeRef).current?.focus();\n }, [useRecovery, step]);\n\n const backToCredentials = () => {\n if (busy) return;\n setChallenge(null);\n setFailure(null);\n setCode(\"\");\n setRecovery(\"\");\n setUseRecovery(false);\n setNewPassword(\"\");\n setConfirm(\"\");\n goTo(\"credentials\");\n };\n\n const working = busy !== null;\n const rootClass = cn(\"space-y-3\", className);\n\n /* ── Step 2: the second factor ── */\n if (step === \"2fa\" && challenge) {\n const recoveryOn = recoveryCode !== undefined && recoveryCode !== false;\n const recoveryLength = (typeof recoveryCode === \"object\" ? recoveryCode.length : undefined) ?? RECOVERY_CODE_LENGTH;\n const asRecovery = recoveryOn && useRecovery;\n const recoveryReady = recoveryCharacters(recovery) === recoveryLength;\n const ready = asRecovery ? recoveryReady : code.length === codeLength;\n const submitCode = (e: FormEvent) => {\n e.preventDefault();\n if (!ready) return;\n if (asRecovery) {\n attempt(\n \"code\",\n () => onCode({ challengeToken: challenge.token, code: recovery.trim(), kind: \"recovery\" }),\n undefined,\n true,\n );\n return;\n }\n attempt(\"code\", () => onCode({ challengeToken: challenge.token, code }));\n };\n const switchCode = () => {\n if (working) return;\n setFailure(null);\n setCode(\"\");\n setRecovery(\"\");\n setUseRecovery((on) => !on);\n };\n const codeError = failure?.action === \"code\" ? failure.message : undefined;\n const content =\n typeof twoFactorContent === \"function\" ? twoFactorContent(challenge.token) : twoFactorContent;\n return (\n <div {...rest} data-step=\"2fa\" className={rootClass}>\n <form className=\"space-y-3\" aria-labelledby={headingId} onSubmit={submitCode}>\n <Heading id={headingId} className=\"text-base font-semibold text-[var(--text-primary)]\">\n {labels.twoFactorTitle}\n </Heading>\n <p className={INTRO_CLASS}>\n {asRecovery ? (labels.recoveryIntro ?? DEFAULT_SIGN_IN_LABELS.recoveryIntro) : labels.twoFactorIntro}\n </p>\n {content}\n {asRecovery ? (\n // A plain text field, not the digits-only one: a backup code is letters and\n // digits in printed groups. Nothing a phone keyboard would \"correct\", and no\n // autofill — the browser's suggestion for an unknown field is the username.\n <Input\n ref={recoveryRef}\n label={labels.recoveryCode ?? DEFAULT_SIGN_IN_LABELS.recoveryCode}\n name=\"recovery-code\"\n value={recovery}\n onChange={(e) => {\n setRecovery(e.target.value);\n if (failure) setFailure(null);\n }}\n autoComplete=\"off\"\n autoCapitalize=\"characters\"\n autoCorrect=\"off\"\n spellCheck={false}\n inputClassName=\"font-mono\"\n hint={(labels.recoveryCodeHint ?? DEFAULT_SIGN_IN_LABELS.recoveryCodeHint)(recoveryLength)}\n readOnly={working}\n error={codeError}\n required\n />\n ) : (\n <OneTimeCodeInput\n ref={codeRef}\n label={labels.code}\n name=\"code\"\n value={code}\n length={codeLength}\n onChange={(next) => {\n setCode(next);\n if (failure) setFailure(null);\n }}\n readOnly={working}\n error={codeError}\n required\n />\n )}\n {recoveryOn && (\n <p className=\"text-sm\">\n <Button type=\"button\" variant=\"link\" size=\"sm\" disabled={working} onClick={switchCode}>\n {asRecovery\n ? (labels.useAuthenticatorCode ?? DEFAULT_SIGN_IN_LABELS.useAuthenticatorCode)\n : (labels.useRecoveryCode ?? DEFAULT_SIGN_IN_LABELS.useRecoveryCode)}\n </Button>\n </p>\n )}\n <Button type=\"submit\" className=\"w-full\" disabled={!working && !ready} pending={working}>\n {labels.verify}\n </Button>\n </form>\n <BackLink label={labels.backToSignIn} onClick={backToCredentials} disabled={working} />\n </div>\n );\n }\n\n /* ── Step 3: a new password ── */\n if (step === \"password-change\" && challenge) {\n const problem = newPasswordProblem(newPassword, confirm);\n const submitPassword = (e: FormEvent) => {\n e.preventDefault();\n if (problem) return;\n attempt(\"set-password\", () => onSetPassword({ challengeToken: challenge.token, password: newPassword }));\n };\n const content =\n typeof passwordChangeContent === \"function\" ? passwordChangeContent(challenge.extra) : passwordChangeContent;\n return (\n <div {...rest} data-step=\"password-change\" className={rootClass}>\n <form className=\"space-y-3\" aria-labelledby={headingId} onSubmit={submitPassword}>\n <Heading id={headingId} className=\"text-base font-semibold text-[var(--text-primary)]\">\n {labels.setPasswordTitle}\n </Heading>\n <p className={INTRO_CLASS}>{labels.setPasswordIntro}</p>\n {content}\n {/* Which account the new password is for, for the password manager: it files\n the new password under this username instead of guessing. */}\n {email !== \"\" && (\n <input type=\"email\" name=\"username\" autoComplete=\"username\" value={email} readOnly hidden />\n )}\n <NewPasswordFields\n password={newPassword}\n confirm={confirm}\n onPasswordChange={setNewPassword}\n onConfirmChange={setConfirm}\n busy={working}\n passwordRef={newPasswordRef}\n text={{ password: labels.newPassword, confirm: labels.confirmPassword, mismatch: labels.passwordMismatch }}\n />\n {failure?.action === \"set-password\" && (\n <AlertBanner tone=\"danger\" size=\"sm\" role=\"alert\">\n {failure.message}\n </AlertBanner>\n )}\n <Button type=\"submit\" className=\"w-full\" disabled={!working && problem !== null} pending={working}>\n {labels.setPasswordSubmit}\n </Button>\n </form>\n <BackLink label={labels.backToSignIn} onClick={backToCredentials} disabled={working} />\n </div>\n );\n }\n\n /* ── Step 1: the credentials ── */\n const submitCredentials = (e: FormEvent) => {\n e.preventDefault();\n const sent = email.trim();\n if (sent === \"\" || password === \"\") return;\n attempt(\"password\", () => onSubmit({ email: sent, password }), sent);\n };\n\n const refused = failure?.code === \"invalid_credentials\";\n const tagged =\n refused && failure?.action === \"password\" && emailTag && failure.email ? taggedEmail(failure.email, emailTag) : null;\n const showDeactivated = refused && hasMessage(deactivatedContact);\n\n return (\n <div {...rest} data-step=\"credentials\" className={rootClass}>\n <form className=\"space-y-3\" onSubmit={submitCredentials}>\n {credentialsContent}\n <Input\n ref={emailRef}\n type=\"email\"\n name=\"email\"\n // \"webauthn\" lets the browser list passkeys in this field's dropdown, paired\n // with the conditional request `passkeyAutofill` arms.\n autoComplete=\"username webauthn\"\n label={labels.email}\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n readOnly={working}\n required\n />\n <CurrentPasswordInput\n ref={passwordRef}\n name=\"password\"\n label={labels.password}\n value={password}\n onValueChange={setPassword}\n busy={working}\n required\n />\n {failure && (\n // One live region for the sentence and its hints: they are one answer.\n <div role=\"alert\" className=\"space-y-1.5\">\n <AlertBanner tone=\"danger\" size=\"sm\">\n {failure.message}\n </AlertBanner>\n {showDeactivated && (\n <p className={HINT_CLASS}>{withContact(labels.deactivatedHint, deactivatedContact)}</p>\n )}\n {tagged && <p className={HINT_CLASS}>{labels.tagHint(tagged)}</p>}\n </div>\n )}\n <Button type=\"submit\" className=\"w-full\" pending={busy === \"password\" || busy === \"done\"} disabled={busy === \"passkey\"}>\n {labels.submit}\n </Button>\n {onPasskey && (\n <Button\n type=\"button\"\n variant=\"secondary\"\n className=\"w-full\"\n pending={busy === \"passkey\"}\n disabled={busy === \"password\" || busy === \"done\"}\n onClick={() => attempt(\"passkey\", onPasskey)}\n >\n <KeyRound aria-hidden className=\"size-4\" />\n {labels.passkey}\n </Button>\n )}\n </form>\n {forgotHref !== undefined && (\n <p className=\"text-center text-sm\">\n <TextLink href={forgotHref} tone=\"secondary\">\n {labels.forgotPassword}\n </TextLink>\n </p>\n )}\n {accountLink !== null && (\n <p className=\"text-center text-sm text-[var(--text-secondary)]\">\n {labels.noAccount}{\" \"}\n <TextLink href={accountLink.href} tone=\"primary\">\n {accountLink.label}\n </TextLink>\n </p>\n )}\n </div>\n );\n}\n\n/** \"Back to sign in\" under the second and third step: a button, since it changes the\n * step in place rather than going anywhere. */\nfunction BackLink({ label, onClick, disabled }: { label: string; onClick: () => void; disabled: boolean }) {\n return (\n <p className=\"text-center text-sm\">\n <Button type=\"button\" variant=\"link\" tone=\"muted\" size=\"sm\" disabled={disabled} onClick={onClick}>\n {label}\n </Button>\n </p>\n );\n}\n"],"mappings":";AAwVM,cAiVE,YAjVF;AAxVN,SAAS,WAAW,gBAAgB,OAAO,QAAQ,gBAAgB;AAEnE,SAAS,gBAAgB;AAEzB,SAAS,oBAAoB;AAC7B,SAAS,UAAU;AACnB,SAAS,mBAAmB;AAC5B,SAAS,kBAAkB;AAC3B,SAAS,4BAA4B;AACrC,SAAS,wBAAwB;AACjC,SAAS,gBAAgB;AACzB,SAAS,QAAQ,aAAa;AAC9B,SAAS,oBAAoB;AAE7B,SAAS,wBAAwB;AACjC,SAAS,eAAe,oBAAoB,eAAe,yBAAyB;AAEpF,SAAS,mBAAmB;AAC5B,SAAS,0BAA0B;AACnC,SAAS,yBAAyB;AAmK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,eAAe,UACd,oBAAC,OAAE,WAAU,uBACX,8BAAC,YAAS,MAAM,YAAY,MAAK,aAC9B,iBAAO,gBACV,GACF;AAAA,IAED,gBAAgB,QACf,qBAAC,OAAE,WAAU,oDACV;AAAA,aAAO;AAAA,MAAW;AAAA,MACnB,oBAAC,YAAS,MAAM,YAAY,MAAM,MAAK,WACpC,sBAAY,OACf;AAAA,OACF;AAAA,KAEJ;AAEJ;AAIA,SAAS,SAAS,EAAE,OAAO,SAAS,SAAS,GAA8D;AACzG,SACE,oBAAC,OAAE,WAAU,uBACX,8BAAC,UAAO,MAAK,UAAS,SAAQ,QAAO,MAAK,SAAQ,MAAK,MAAK,UAAoB,SAC7E,iBACH,GACF;AAEJ;","names":["code"]}
|
|
1
|
+
{"version":3,"sources":["../../src/auth/sign-in-form.tsx"],"sourcesContent":["import { useEffect, useEffectEvent, useId, useRef, useState } from \"react\";\nimport type { ComponentPropsWithRef, FormEvent, ReactNode } from \"react\";\nimport { KeyRound } from \"lucide-react\";\n\nimport { useKitLabels, type LabelOverride } from \"../i18n/kit-labels\";\nimport { cn } from \"../lib/cn\";\nimport { AlertBanner } from \"../components/alert-banner\";\nimport { hasContent } from \"../lib/presence\";\nimport { CurrentPasswordInput } from \"../components/danger-confirm\";\nimport { OneTimeCodeInput } from \"../components/one-time-code-input\";\nimport { TextLink } from \"../components/text-link\";\nimport { Button } from \"../components/button\";\nimport { Input } from \"../components/input\";\nimport { accessAction } from \"../landing/access\";\nimport type { AccessChoice } from \"../landing/access\";\nimport { useLandingLabels } from \"../landing/landing-labels\";\nimport { authErrorCode, isRateLimited, retryAfterSeconds } from \"./auth-errors\";\nimport type { KitErrorCode } from \"./auth-errors\";\nimport { taggedEmail } from \"./email-tag\";\nimport { newPasswordProblem } from \"./form-rules\";\nimport { NewPasswordFields } from \"./new-password-fields\";\nimport { DEFAULT_SIGN_IN_LABELS } from \"./sign-in-form-labels\";\n\n/* ── The answers (§5.1) ──────────────────────────────────────────────────── */\n\n/**\n * What a sign-in call answers, in the kit's words — docs/auth-harmonization.md §5.1,\n * keksdose's three shapes. The app maps its own HTTP answer to one of these and resolves\n * with it; a refusal REJECTS (with whatever its client throws — {@link authErrorCode}\n * reads the code out of it).\n *\n * | the server answers (keksdose) | resolve with |\n * |---|---|\n * | `TokenResponse` `{access_token, refresh_token, token_type, user}` | `{ kind: \"signed-in\" }`, after the app has stored the session |\n * | `{requires_2fa: true, challenge_token}` | `{ kind: \"2fa\", challengeToken: challenge_token }` |\n * | `{requires_password_change: true, challenge_token, encrypted}` | `{ kind: \"password-change\", challengeToken: challenge_token, extra: { encrypted } }` |\n * | `401 {code: \"invalid_credentials\"}` | reject — let the client's error through |\n *\n * ```ts\n * async function toAnswer(res: TokenResponse | TwoFactorChallenge | PasswordChangeChallenge): Promise<SignInAnswer> {\n * if (\"requires_2fa\" in res) return { kind: \"2fa\", challengeToken: res.challenge_token };\n * if (\"requires_password_change\" in res)\n * return { kind: \"password-change\", challengeToken: res.challenge_token, extra: { encrypted: res.encrypted } };\n * await onLoginSuccess(res); // store tokens, load /auth/me, switch language\n * return { kind: \"signed-in\" };\n * }\n * <SignInForm onSubmit={async (v) => toAnswer(await authApi.login(v))} … />\n * ```\n *\n * The same mapping serves `/auth/login/2fa`, `/auth/login/set-password` and the passkey\n * finish, which answer the same union.\n */\nexport type SignInAnswer =\n | { kind: \"signed-in\" }\n | { kind: \"2fa\"; challengeToken: string }\n | {\n kind: \"password-change\";\n challengeToken: string;\n /** The challenge's app fields, passed through untouched — keksdose's `encrypted`,\n * which its note on this step reads (`passwordChangeContent`). */\n extra?: Readonly<Record<string, unknown>>;\n };\n\n/** The step on screen: the credentials, the second factor, or a new password. */\nexport type SignInStep = \"credentials\" | \"2fa\" | \"password-change\";\n\n/** What the person did when a call failed — {@link SignInFormProps.describeError}'s\n * second argument. */\nexport type SignInAction = \"password\" | \"passkey\" | \"code\" | \"set-password\";\n\nexport interface SignInCredentials {\n /** Trimmed. Lower-casing is the server's (§3.1). */\n email: string;\n /** As typed, never trimmed. */\n password: string;\n}\n\nexport interface SignInCodeValues {\n challengeToken: string;\n /** Digits only — {@link OneTimeCodeInput} drops the spaces of \"123 456\". A backup code\n * (`kind: \"recovery\"`) is trimmed and otherwise as typed: its dashes and case are the\n * server's to normalise, as kastlan's `_normalise_backup_code` does. */\n code: string;\n /**\n * 0.30.0: `\"recovery\"` when the person typed one of their backup codes instead\n * (`recoveryCode`); absent for the authenticator's code, as before. kastlan's\n * `/auth/login/2fa` takes either in the same `code` and tells them apart itself; an\n * app whose server takes a backup code elsewhere routes on this.\n */\n kind?: \"recovery\";\n}\n\nexport interface SignInNewPasswordValues {\n challengeToken: string;\n password: string;\n}\n\n/* ── Labels ──────────────────────────────────────────────────────────────── */\n\n/**\n * Every string `SignInForm` renders — the `signIn` namespace of `<UiKitProvider\n * labels>`, overridable per instance through `labels`. keksdose's words where it has\n * them (`auth.*` in its catalogue).\n */\nexport interface SignInLabels {\n email: string;\n password: string;\n /** The submit button. */\n submit: string;\n /** The passkey button (`onPasskey`). */\n passkey: string;\n /** The link to `forgotHref`. */\n forgotPassword: string;\n /** Before the link to `registerHref`. */\n noAccount: string;\n /** The link to `registerHref`. */\n register: string;\n /** The ONE answer to an unknown address, a wrong password and a deactivated account\n * (`invalid_credentials`, §5.2). */\n invalidCredentials: string;\n /** Any other failed sign-in (the network, a 500). */\n failed: string;\n /** A failed or refused passkey sign-in. */\n passkeyFailed: string;\n /**\n * The hint under `invalidCredentials` (§2.10), shown when `deactivatedContact` is\n * given. A TEMPLATE: `{contact}` is replaced by the contact — a `mailto:` link for an\n * address — so a language puts it where its grammar needs it.\n */\n deactivatedHint: string;\n /** The hint under `invalidCredentials` when `emailTag` is given (§4.5), given the\n * typed address with the app's tag: \"Signed up with ada+kastlan@example.com?\". */\n tagHint: (taggedAddress: string) => string;\n /** The second-factor step's heading. */\n twoFactorTitle: string;\n twoFactorIntro: string;\n /** The code field's label. */\n code: string;\n /** The code step's submit button. */\n verify: string;\n /** The code was refused. */\n codeInvalid: string;\n /** The set-a-new-password step's heading. */\n setPasswordTitle: string;\n setPasswordIntro: string;\n newPassword: string;\n confirmPassword: string;\n passwordMismatch: string;\n /** The set-a-new-password step's submit button. */\n setPasswordSubmit: string;\n setPasswordFailed: string;\n /** A challenge was refused as `token_invalid` — it expired between the steps; the\n * form is back on the credentials. */\n expired: string;\n /** From the second and third step back to the credentials. */\n backToSignIn: string;\n /*\n * 0.30.0 — OPTIONAL, like `TwoFactorSettingLabels.qrAlt` and for its reason: a new\n * required key is a compile error at every call site that annotates this interface\n * (CONTRIBUTING's additive-API rule). Each falls back to the provider's `signIn`, then\n * English.\n */\n /** The second-factor step's switch to a backup code (`recoveryCode`). */\n useRecoveryCode?: string;\n /** The switch back, from the backup-code field to the authenticator's code. */\n useAuthenticatorCode?: string;\n /** The backup-code field's label. */\n recoveryCode?: string;\n /** The step's intro while a backup code is asked for, in place of `twoFactorIntro`. */\n recoveryIntro?: string;\n /** Under the backup-code field, given how many letters and digits a code has. */\n recoveryCodeHint?: (length: number) => string;\n /** A refused backup code — wrong, or spent already (each one works once). */\n recoveryCodeInvalid?: string;\n /** Any step's request was throttled — HTTP 429 ({@link isRateLimited}) — given the\n * wait its `Retry-After` asks for, in seconds ({@link retryAfterSeconds}), or\n * `undefined` (or `0`) without one. */\n rateLimited?: (seconds?: number) => string;\n /** 0.31.0: the link after `noAccount` for an invitation-only app (`access` of kind\n * `request`) — a mail to support, in place of `register`. */\n requestAccess?: string;\n}\n\n// Defined in ./sign-in-form-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_SIGN_IN_LABELS };\n\n/* ── Props ───────────────────────────────────────────────────────────────── */\n\nexport interface SignInFormProps extends Omit<ComponentPropsWithRef<\"div\">, \"onSubmit\" | \"children\"> {\n /**\n * The credentials step was submitted. Send them, and resolve with the answer\n * ({@link SignInAnswer}) or reject with the client's error. The form never sends a\n * request itself (§8): keksdose must see the password on its way, to refuse the same\n * string as an encryption passphrase later.\n *\n * On `signed-in` the form's job is over — it stays busy while the app navigates.\n */\n onSubmit: (credentials: SignInCredentials) => Promise<SignInAnswer>;\n /** The second factor was submitted (`/auth/login/2fa`). Resolves with the next answer\n * — keksdose may still require a new password after the code. */\n onCode: (values: SignInCodeValues) => Promise<SignInAnswer>;\n /** The new password was submitted (`/auth/login/set-password`). Resolves with the\n * answer, `signed-in` in practice; keksdose's `key_wrap_unchanged` note is the app's\n * to show from here. */\n onSetPassword: (values: SignInNewPasswordValues) => Promise<SignInAnswer>;\n /**\n * The passkey button was pressed: run the ceremony (`/auth/passkey/login/begin|finish`)\n * and resolve with its answer. It asks for NO email — a passkey is bound to the site,\n * and the browser offers every one it holds (keksdose #126). Left out, no button: pass\n * it only where `PublicKeyCredential` exists.\n */\n onPasskey?: () => Promise<SignInAnswer>;\n /**\n * Passkey autofill (conditional mediation). The email field is\n * `autoComplete=\"username webauthn\"`, so a pending `navigator.credentials.get({\n * mediation: \"conditional\" })` lists the site's passkeys in its dropdown. The form\n * calls this ONCE on mount; arm the request there and resolve with its answer when the\n * person picks a passkey, or with `null` when nothing happens. The signal aborts on\n * unmount — cancel the pending request then (keksdose: `armPasskeyAutofill(onDone,\n * signal)` + `cancelPasskeyAutofill()`). A rejection is silent: the button stays the\n * reliable path.\n */\n passkeyAutofill?: (signal: AbortSignal) => Promise<SignInAnswer | null | undefined>;\n /** \"Forgot your password?\" goes here — the app's `/forgot-password`. Left out, no\n * link. */\n forgotHref?: string;\n /** \"No account yet? Create account\" goes here — `/register`. Left out, no line. */\n registerHref?: string;\n /**\n * 0.31.0 (docs/landing-demo-harmonization.md §4.2): how a visitor gets an account —\n * the same value the landing's `PublicHeader` and `Hero` take. `{kind: \"request\",\n * email}` turns the line into \"No account yet? Request access\", a mail to support with\n * the subject and body of `accessAction` (every app is invitation-only); `{kind:\n * \"register\", href}` keeps \"Create account\", to `href`. Wins over `registerHref`; left\n * out, `registerHref` works as before.\n */\n access?: AccessChoice;\n /** The email field's start value — the reset page ends on \"Sign in\" with the address\n * filled in (§6.3). */\n defaultEmail?: string;\n /**\n * The app's address tag (`\"kastlan\"`, §4.5). After `invalid_credentials` the form also\n * says \"Signed up with you+kastlan@example.com? Use that address.\" — sign-in stays\n * exact, and the server looks nothing up.\n */\n emailTag?: string;\n /**\n * Who a deactivated user writes to (§2.10): an address (drawn as a `mailto:` link) or\n * the app's own node. Shown after `invalid_credentials` as \"Account deactivated? Write\n * to …\". Left out, no hint.\n */\n deactivatedContact?: ReactNode;\n /** Digits of the second factor. Default 6 (TOTP). */\n codeLength?: number;\n /**\n * 0.30.0: offer a backup code on the second-factor step (kastlan's 0.29 adoption: its\n * `/auth/login/2fa` takes one of the eight codes minted at 2FA setup, and the kit's\n * step had no way to type one). A \"Use a backup code\" switch under the code field\n * swaps the digits-only {@link OneTimeCodeInput} for a plain text field; the code goes\n * to `onCode` with the same challenge and `kind: \"recovery\"`.\n *\n * `true` for a 16-character code (kastlan's `ABCD-EFGH-JKLM-NPQR`), or `{ length }`.\n * The length counts letters and digits only — the dashes and spaces a printed code is\n * grouped with don't count — and \"Verify\" waits for it. Left out, no switch.\n */\n recoveryCode?: boolean | { length?: number };\n /** App content at the top of the credentials step — a notice, a demo button. */\n credentialsContent?: ReactNode;\n /**\n * App content on the second-factor step, under its intro. 0.30.0: pass a function and\n * it gets the challenge token — kastlan kept its own copy of the token for a \"lost\n * your device?\" link, which the step now hands over.\n */\n twoFactorContent?: ReactNode | ((challengeToken: string) => ReactNode);\n /**\n * App content on the set-a-new-password step, under its intro — keksdose's\n * private-mode note (\"Your encrypted data is untouched …\"), which depends on the\n * challenge: pass a function and it gets the challenge's `extra`.\n */\n passwordChangeContent?: ReactNode | ((extra: Readonly<Record<string, unknown>> | undefined) => ReactNode);\n /**\n * The app's own words for a failure, or `undefined` for the kit's: the device being\n * offline, a throttle with its wait (\"try again in an hour\"). Asked first, for every\n * failure; what it returns replaces the message, and the `invalid_credentials` hints\n * still follow. A bare `429` needs none since 0.30.0: the kit says `rateLimited`.\n */\n describeError?: (error: unknown, action: SignInAction) => ReactNode | undefined;\n /** The step changed — retitle the page (`AuthLayout`'s `title`) if the app wants. */\n onStepChange?: (step: SignInStep) => void;\n /** The level of the second and third step's heading. Default `h2`, under the page's\n * `h1`; one level under `AuthLayout`'s `headingAs` where that is embedded lower. */\n headingAs?: \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n labels?: LabelOverride<SignInLabels>;\n}\n\n/* ── Parts ───────────────────────────────────────────────────────────────── */\n\ninterface Failure {\n action: SignInAction;\n code: KitErrorCode | undefined;\n message: ReactNode;\n /** The address the failed credentials carried — the tag hint names its tagged form. */\n email?: string;\n}\n\n/** `{contact}` in the template, replaced by the contact (a `mailto:` link for an\n * address). Split, not interpolated, so the link is an element. A template that lost\n * its placeholder still shows the contact, after it. */\nfunction withContact(template: string, contact: ReactNode): ReactNode[] {\n const node =\n typeof contact === \"string\" && contact.includes(\"@\") ? (\n <TextLink key=\"contact\" href={`mailto:${contact}`} tone=\"secondary\">\n {contact}\n </TextLink>\n ) : (\n <span key=\"contact\">{contact}</span>\n );\n if (!template.includes(\"{contact}\")) return [template, \" \", node];\n return template\n .split(/(\\{contact\\})/)\n .filter((part) => part !== \"\")\n .map((part) => (part === \"{contact}\" ? node : part));\n}\n\nconst HINT_CLASS = \"text-xs text-secondary\";\n\n/** A backup code's letters and digits — kastlan's: 16, printed `ABCD-EFGH-JKLM-NPQR`. */\nconst RECOVERY_CODE_LENGTH = 16;\n\n/** How many letters and digits a typed backup code has: the dashes and spaces it is\n * printed in groups with don't count, so \"abcd-efgh ijkl mnop\" is 16 — the count\n * kastlan's server normalises the code to before it compares. */\nfunction recoveryCharacters(value: string): number {\n return value.replace(/[^\\p{L}\\p{N}]/gu, \"\").length;\n}\nconst INTRO_CLASS = \"text-sm text-secondary\";\n\n/* ── The form ────────────────────────────────────────────────────────────── */\n\n/**\n * Sign-in for every app (docs/auth-harmonization.md §5, §8): email and password, or a\n * passkey; then the second factor when it is on; then a new password when an admin\n * required one. keksdose's `LoginPage` and `ForcedPasswordChangeStep`\n * (features/auth/login-page.tsx, forced-password-change.tsx), as one component.\n *\n * **It never sends a request.** Each step hands its input to a callback and renders the\n * {@link SignInAnswer} it resolves with; a rejection is shown in the step it came from.\n * The challenge token lives in this component's state only, as in keksdose, so a reload\n * costs a fresh sign-in — no route, no storage.\n *\n * **One error for every wrong credential** (§2.10, §5.2): `invalid_credentials` shows one\n * sentence, whatever was wrong, plus two hints UNDER it — \"Account deactivated? Write to\n * …\" (`deactivatedContact`) and \"Signed up with you+kastlan@…? Use that address.\"\n * (`emailTag`). Any other failure says \"Sign-in failed\" and no hint: the hints answer a\n * refused credential, not a network that is down. `describeError` puts the app's words\n * on a failure the kit cannot know (a throttled attempt).\n *\n * **The steps.**\n * - Credentials: the email field is `username webauthn` (passkey autofill, see\n * `passkeyAutofill`), the password a `CurrentPasswordInput` (a password manager fills\n * it and never offers a new one). The submit is not disabled while the fields are\n * empty: a browser that autofills on load withholds the values until the first\n * interaction, and a disabled button would swallow that first click. The fields'\n * own `required` answers an empty submit instead. \"Forgot your password?\" sits under\n * the buttons, where someone whose password just failed is already looking\n * (keksdose #198).\n * - Second factor: {@link OneTimeCodeInput}, focused on arrival. \"Verify\" waits for the\n * whole code. A refused code stays here with its error; `token_invalid` (the\n * challenge expired) goes back to the credentials and says why. Kurvenschmiede has\n * no 2FA yet, and the step is here from the start, so adding it is backend work only\n * (§10.5). With `recoveryCode` (0.30.0) a switch under the field takes a backup code\n * instead, through the same `onCode` with `kind: \"recovery\"`.\n *\n * **A throttled request** (HTTP 429, {@link isRateLimited}) says \"Too many attempts. Try\n * again in 30 s.\" on any step (0.30.0) — the wait from its `Retry-After`, else \"Wait a\n * moment and try again.\" — after `describeError`, whose words still come first, and\n * instead of \"wrong password\" or \"invalid code\", which would send the person to try\n * another one.\n * - New password: new + confirm with the strength meter, the 8-character / 72-byte\n * rules and nothing else (§8). It reads as explained, not blocked (keksdose): the\n * person did nothing wrong.\n *\n * The password is dropped from state once the credentials are answered; \"Back to sign in\"\n * returns to an empty password field.\n */\nexport function SignInForm({\n onSubmit,\n onCode,\n onSetPassword,\n onPasskey,\n passkeyAutofill,\n forgotHref,\n registerHref,\n access,\n defaultEmail = \"\",\n emailTag,\n deactivatedContact,\n codeLength = 6,\n recoveryCode,\n credentialsContent,\n twoFactorContent,\n passwordChangeContent,\n describeError,\n onStepChange,\n headingAs: Heading = \"h2\",\n labels: labelsProp,\n className,\n ...rest\n}: SignInFormProps) {\n const labels = useKitLabels(\"signIn\", DEFAULT_SIGN_IN_LABELS, labelsProp);\n // The mail's subject and body are the landing's words (`landing` namespace), so the\n // request reads the same from every page that offers it.\n const landing = useLandingLabels();\n const accountLink =\n access === undefined\n ? registerHref === undefined\n ? null\n : { href: registerHref, label: labels.register }\n : access.kind === \"register\"\n ? { href: access.href, label: labels.register }\n : {\n href: accessAction(access, landing).href,\n label: labels.requestAccess ?? DEFAULT_SIGN_IN_LABELS.requestAccess,\n };\n const [step, setStep] = useState<SignInStep>(\"credentials\");\n const [email, setEmail] = useState(defaultEmail);\n const [password, setPassword] = useState(\"\");\n const [code, setCode] = useState(\"\");\n // 0.30.0: the second factor as a backup code instead of the authenticator's digits.\n const [useRecovery, setUseRecovery] = useState(false);\n const [recovery, setRecovery] = useState(\"\");\n const [newPassword, setNewPassword] = useState(\"\");\n const [confirm, setConfirm] = useState(\"\");\n const [challenge, setChallenge] = useState<{ token: string; extra?: Readonly<Record<string, unknown>> } | null>(\n null,\n );\n // What is running: one call at a time. \"done\" after `signed-in` — the app has the\n // session and is leaving; the buttons stay busy so nothing is sent twice meanwhile.\n const [busy, setBusy] = useState<SignInAction | \"done\" | null>(null);\n const [failure, setFailure] = useState<Failure | null>(null);\n const headingId = useId();\n\n const emailRef = useRef<HTMLInputElement>(null);\n const passwordRef = useRef<HTMLInputElement>(null);\n const codeRef = useRef<HTMLInputElement>(null);\n const recoveryRef = useRef<HTMLInputElement>(null);\n const newPasswordRef = useRef<HTMLInputElement>(null);\n\n // A late answer after unmount (the app navigated away) must not set state.\n const mounted = useRef(true);\n useEffect(() => {\n mounted.current = true;\n return () => {\n mounted.current = false;\n };\n }, []);\n\n const goTo = (next: SignInStep) => {\n setStep(next);\n onStepChange?.(next);\n };\n\n const present = (answer: SignInAnswer) => {\n setFailure(null);\n if (answer.kind === \"signed-in\") {\n setBusy(\"done\");\n return;\n }\n setBusy(null);\n // The password has done its work; it does not stay in state for the next steps.\n setPassword(\"\");\n setCode(\"\");\n setRecovery(\"\");\n setUseRecovery(false);\n setNewPassword(\"\");\n setConfirm(\"\");\n if (answer.kind === \"2fa\") {\n setChallenge({ token: answer.challengeToken });\n goTo(\"2fa\");\n } else if (answer.kind === \"password-change\") {\n setChallenge({ token: answer.challengeToken, extra: answer.extra });\n goTo(\"password-change\");\n }\n };\n\n const messageFor = (\n error: unknown,\n action: SignInAction,\n code: KitErrorCode | undefined,\n recoveryUsed: boolean,\n ): ReactNode => {\n const own = describeError?.(error, action);\n if (hasContent(own)) return own;\n // After the app's words, before the kit's generic ones (0.30.0): a throttle is\n // neither a wrong password nor a wrong code, and saying so sends the person to try\n // another one — which the limiter counts too.\n if (isRateLimited(error)) return (labels.rateLimited ?? DEFAULT_SIGN_IN_LABELS.rateLimited)(retryAfterSeconds(error));\n if (action === \"password\") return code === \"invalid_credentials\" ? labels.invalidCredentials : labels.failed;\n if (action === \"passkey\") return labels.passkeyFailed;\n if (action === \"code\") {\n if (code === \"token_invalid\") return labels.expired;\n return recoveryUsed\n ? (labels.recoveryCodeInvalid ?? DEFAULT_SIGN_IN_LABELS.recoveryCodeInvalid)\n : labels.codeInvalid;\n }\n return code === \"token_invalid\" ? labels.expired : labels.setPasswordFailed;\n };\n\n const fail = (error: unknown, action: SignInAction, sentEmail?: string, recoveryUsed = false) => {\n setBusy(null);\n // Our own abort (a passkey ceremony cancelled by the unmount) is no failure.\n if ((error as { name?: unknown } | null)?.name === \"AbortError\") return;\n const code = authErrorCode(error);\n const message = messageFor(error, action, code, recoveryUsed);\n // The challenge expired between the steps: only a fresh sign-in helps.\n if ((action === \"code\" || action === \"set-password\") && code === \"token_invalid\") {\n setChallenge(null);\n setCode(\"\");\n setRecovery(\"\");\n setUseRecovery(false);\n setNewPassword(\"\");\n setConfirm(\"\");\n goTo(\"credentials\");\n }\n setFailure({ action, code, message, email: sentEmail });\n };\n\n const attempt = (\n action: SignInAction,\n call: () => Promise<SignInAnswer>,\n sentEmail?: string,\n recoveryUsed = false,\n ) => {\n if (busy) return;\n setBusy(action);\n setFailure(null);\n let result: Promise<SignInAnswer>;\n try {\n result = Promise.resolve(call());\n } catch (error) {\n result = Promise.reject(error);\n }\n result.then(\n (answer) => {\n if (mounted.current) present(answer);\n },\n (error: unknown) => {\n if (mounted.current) fail(error, action, sentEmail, recoveryUsed);\n },\n );\n };\n\n // Passkey autofill: armed once, on mount; the signal aborts on unmount. Its answer\n // arrives whenever the person picks a passkey from the email field's dropdown — and\n // is dropped if they have meanwhile started a sign-in of their own.\n const armAutofill = useEffectEvent((signal: AbortSignal) => passkeyAutofill?.(signal));\n const autofillAnswered = useEffectEvent((answer: SignInAnswer) => {\n if (busy === null) present(answer);\n });\n useEffect(() => {\n const controller = new AbortController();\n let pending: Promise<SignInAnswer | null | undefined>;\n try {\n pending = Promise.resolve(armAutofill(controller.signal));\n } catch (error) {\n pending = Promise.reject(error);\n }\n pending.then(\n (answer) => {\n if (answer && !controller.signal.aborted && mounted.current) autofillAnswered(answer);\n },\n () => {\n /* silent — unsupported, declined or aborted; the button stays the way in */\n },\n );\n return () => controller.abort();\n }, []);\n\n // Focus follows the step — not on mount (where it would pop a phone's keyboard over\n // the page), only once the person moved to another step.\n const shownStep = useRef(step);\n useEffect(() => {\n if (shownStep.current === step) return;\n shownStep.current = step;\n if (step === \"2fa\") codeRef.current?.focus();\n else if (step === \"password-change\") newPasswordRef.current?.focus();\n else if (emailRef.current?.value) passwordRef.current?.focus();\n else emailRef.current?.focus();\n }, [step]);\n // The backup-code switch swaps one field for the other under the focus that pressed\n // it; the field that came in is where the person is going. Only after a switch on\n // this step — arriving on it is the effect above.\n const shownRecovery = useRef(useRecovery);\n useEffect(() => {\n if (shownRecovery.current === useRecovery) return;\n shownRecovery.current = useRecovery;\n if (step !== \"2fa\") return;\n (useRecovery ? recoveryRef : codeRef).current?.focus();\n }, [useRecovery, step]);\n\n const backToCredentials = () => {\n if (busy) return;\n setChallenge(null);\n setFailure(null);\n setCode(\"\");\n setRecovery(\"\");\n setUseRecovery(false);\n setNewPassword(\"\");\n setConfirm(\"\");\n goTo(\"credentials\");\n };\n\n const working = busy !== null;\n const rootClass = cn(\"space-y-3\", className);\n\n /* ── Step 2: the second factor ── */\n if (step === \"2fa\" && challenge) {\n const recoveryOn = recoveryCode !== undefined && recoveryCode !== false;\n const recoveryLength = (typeof recoveryCode === \"object\" ? recoveryCode.length : undefined) ?? RECOVERY_CODE_LENGTH;\n const asRecovery = recoveryOn && useRecovery;\n const recoveryReady = recoveryCharacters(recovery) === recoveryLength;\n const ready = asRecovery ? recoveryReady : code.length === codeLength;\n const submitCode = (e: FormEvent) => {\n e.preventDefault();\n if (!ready) return;\n if (asRecovery) {\n attempt(\n \"code\",\n () => onCode({ challengeToken: challenge.token, code: recovery.trim(), kind: \"recovery\" }),\n undefined,\n true,\n );\n return;\n }\n attempt(\"code\", () => onCode({ challengeToken: challenge.token, code }));\n };\n const switchCode = () => {\n if (working) return;\n setFailure(null);\n setCode(\"\");\n setRecovery(\"\");\n setUseRecovery((on) => !on);\n };\n const codeError = failure?.action === \"code\" ? failure.message : undefined;\n const content =\n typeof twoFactorContent === \"function\" ? twoFactorContent(challenge.token) : twoFactorContent;\n return (\n <div {...rest} data-step=\"2fa\" className={rootClass}>\n <form className=\"space-y-3\" aria-labelledby={headingId} onSubmit={submitCode}>\n <Heading id={headingId} className=\"text-base font-semibold text-primary\">\n {labels.twoFactorTitle}\n </Heading>\n <p className={INTRO_CLASS}>\n {asRecovery ? (labels.recoveryIntro ?? DEFAULT_SIGN_IN_LABELS.recoveryIntro) : labels.twoFactorIntro}\n </p>\n {content}\n {asRecovery ? (\n // A plain text field, not the digits-only one: a backup code is letters and\n // digits in printed groups. Nothing a phone keyboard would \"correct\", and no\n // autofill — the browser's suggestion for an unknown field is the username.\n <Input\n ref={recoveryRef}\n label={labels.recoveryCode ?? DEFAULT_SIGN_IN_LABELS.recoveryCode}\n name=\"recovery-code\"\n value={recovery}\n onChange={(e) => {\n setRecovery(e.target.value);\n if (failure) setFailure(null);\n }}\n autoComplete=\"off\"\n autoCapitalize=\"characters\"\n autoCorrect=\"off\"\n spellCheck={false}\n inputClassName=\"font-mono\"\n hint={(labels.recoveryCodeHint ?? DEFAULT_SIGN_IN_LABELS.recoveryCodeHint)(recoveryLength)}\n readOnly={working}\n error={codeError}\n required\n />\n ) : (\n <OneTimeCodeInput\n ref={codeRef}\n label={labels.code}\n name=\"code\"\n value={code}\n length={codeLength}\n onChange={(next) => {\n setCode(next);\n if (failure) setFailure(null);\n }}\n readOnly={working}\n error={codeError}\n required\n />\n )}\n {recoveryOn && (\n <p className=\"text-sm\">\n <Button type=\"button\" variant=\"link\" size=\"sm\" disabled={working} onClick={switchCode}>\n {asRecovery\n ? (labels.useAuthenticatorCode ?? DEFAULT_SIGN_IN_LABELS.useAuthenticatorCode)\n : (labels.useRecoveryCode ?? DEFAULT_SIGN_IN_LABELS.useRecoveryCode)}\n </Button>\n </p>\n )}\n <Button type=\"submit\" className=\"w-full\" disabled={!working && !ready} pending={working}>\n {labels.verify}\n </Button>\n </form>\n <BackLink label={labels.backToSignIn} onClick={backToCredentials} disabled={working} />\n </div>\n );\n }\n\n /* ── Step 3: a new password ── */\n if (step === \"password-change\" && challenge) {\n const problem = newPasswordProblem(newPassword, confirm);\n const submitPassword = (e: FormEvent) => {\n e.preventDefault();\n if (problem) return;\n attempt(\"set-password\", () => onSetPassword({ challengeToken: challenge.token, password: newPassword }));\n };\n const content =\n typeof passwordChangeContent === \"function\" ? passwordChangeContent(challenge.extra) : passwordChangeContent;\n return (\n <div {...rest} data-step=\"password-change\" className={rootClass}>\n <form className=\"space-y-3\" aria-labelledby={headingId} onSubmit={submitPassword}>\n <Heading id={headingId} className=\"text-base font-semibold text-primary\">\n {labels.setPasswordTitle}\n </Heading>\n <p className={INTRO_CLASS}>{labels.setPasswordIntro}</p>\n {content}\n {/* Which account the new password is for, for the password manager: it files\n the new password under this username instead of guessing. */}\n {email !== \"\" && (\n <input type=\"email\" name=\"username\" autoComplete=\"username\" value={email} readOnly hidden />\n )}\n <NewPasswordFields\n password={newPassword}\n confirm={confirm}\n onPasswordChange={setNewPassword}\n onConfirmChange={setConfirm}\n busy={working}\n passwordRef={newPasswordRef}\n text={{ password: labels.newPassword, confirm: labels.confirmPassword, mismatch: labels.passwordMismatch }}\n />\n {failure?.action === \"set-password\" && (\n <AlertBanner tone=\"danger\" size=\"sm\" role=\"alert\">\n {failure.message}\n </AlertBanner>\n )}\n <Button type=\"submit\" className=\"w-full\" disabled={!working && problem !== null} pending={working}>\n {labels.setPasswordSubmit}\n </Button>\n </form>\n <BackLink label={labels.backToSignIn} onClick={backToCredentials} disabled={working} />\n </div>\n );\n }\n\n /* ── Step 1: the credentials ── */\n const submitCredentials = (e: FormEvent) => {\n e.preventDefault();\n const sent = email.trim();\n if (sent === \"\" || password === \"\") return;\n attempt(\"password\", () => onSubmit({ email: sent, password }), sent);\n };\n\n const refused = failure?.code === \"invalid_credentials\";\n const tagged =\n refused && failure?.action === \"password\" && emailTag && failure.email ? taggedEmail(failure.email, emailTag) : null;\n const showDeactivated = refused && hasContent(deactivatedContact);\n\n return (\n <div {...rest} data-step=\"credentials\" className={rootClass}>\n <form className=\"space-y-3\" onSubmit={submitCredentials}>\n {credentialsContent}\n <Input\n ref={emailRef}\n type=\"email\"\n name=\"email\"\n // \"webauthn\" lets the browser list passkeys in this field's dropdown, paired\n // with the conditional request `passkeyAutofill` arms.\n autoComplete=\"username webauthn\"\n label={labels.email}\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n readOnly={working}\n required\n />\n <CurrentPasswordInput\n ref={passwordRef}\n name=\"password\"\n label={labels.password}\n value={password}\n onValueChange={setPassword}\n busy={working}\n required\n />\n {failure && (\n // One live region for the sentence and its hints: they are one answer.\n <div role=\"alert\" className=\"space-y-1.5\">\n <AlertBanner tone=\"danger\" size=\"sm\">\n {failure.message}\n </AlertBanner>\n {showDeactivated && (\n <p className={HINT_CLASS}>{withContact(labels.deactivatedHint, deactivatedContact)}</p>\n )}\n {tagged && <p className={HINT_CLASS}>{labels.tagHint(tagged)}</p>}\n </div>\n )}\n <Button type=\"submit\" className=\"w-full\" pending={busy === \"password\" || busy === \"done\"} disabled={busy === \"passkey\"}>\n {labels.submit}\n </Button>\n {onPasskey && (\n <Button\n type=\"button\"\n variant=\"secondary\"\n className=\"w-full\"\n pending={busy === \"passkey\"}\n disabled={busy === \"password\" || busy === \"done\"}\n onClick={() => attempt(\"passkey\", onPasskey)}\n >\n <KeyRound aria-hidden className=\"size-4\" />\n {labels.passkey}\n </Button>\n )}\n </form>\n {forgotHref !== undefined && (\n <p className=\"text-center text-sm\">\n <TextLink href={forgotHref} tone=\"secondary\">\n {labels.forgotPassword}\n </TextLink>\n </p>\n )}\n {accountLink !== null && (\n <p className=\"text-center text-sm text-secondary\">\n {labels.noAccount}{\" \"}\n <TextLink href={accountLink.href} tone=\"primary\">\n {accountLink.label}\n </TextLink>\n </p>\n )}\n </div>\n );\n}\n\n/** \"Back to sign in\" under the second and third step: a button, since it changes the\n * step in place rather than going anywhere. */\nfunction BackLink({ label, onClick, disabled }: { label: string; onClick: () => void; disabled: boolean }) {\n return (\n <p className=\"text-center text-sm\">\n <Button type=\"button\" variant=\"link\" tone=\"muted\" size=\"sm\" disabled={disabled} onClick={onClick}>\n {label}\n </Button>\n </p>\n );\n}\n"],"mappings":";AAuTM,cAiVE,YAjVF;AAvTN,SAAS,WAAW,gBAAgB,OAAO,QAAQ,gBAAgB;AAEnE,SAAS,gBAAgB;AAEz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SAAQ,QAAO,MAAK,SAAQ,MAAK,MAAK,UAAoB,SAC7E,iBACH,GACF;AAEJ;","names":["code"]}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
|
|
1
|
+
import type { ReactNode } from "react";
|
|
4
2
|
/**
|
|
5
3
|
* The pieces the signed-out status pages share — {@link ForgotPasswordForm},
|
|
6
4
|
* {@link ResetPasswordForm}, {@link VerifyEmailStatus}, {@link AcceptInvitation} and
|
|
@@ -11,23 +9,23 @@ import { ReactNode } from 'react';
|
|
|
11
9
|
/** A heading level a page part may take. Default `h2`, under the page's `h1`
|
|
12
10
|
* (`AuthLayout`'s `title`, the app's name), as on `SignInForm`'s steps; deeper for a
|
|
13
11
|
* page embedded in another (a preview, the docs). */
|
|
14
|
-
type AuthHeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
12
|
+
export type AuthHeadingLevel = "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
15
13
|
/** The form pages' heading: start-aligned, the size of `SignInForm`'s step headings. */
|
|
16
|
-
declare const FORM_HEADING_CLASS = "text-base font-semibold text-
|
|
14
|
+
export declare const FORM_HEADING_CLASS = "text-base font-semibold text-primary";
|
|
17
15
|
/** The status pages' heading: centred over the centred outcome below it. */
|
|
18
|
-
declare const STATUS_HEADING_CLASS = "text-center text-base font-semibold text-
|
|
19
|
-
declare const INTRO_CLASS = "text-sm text-
|
|
16
|
+
export declare const STATUS_HEADING_CLASS = "text-center text-base font-semibold text-primary";
|
|
17
|
+
export declare const INTRO_CLASS = "text-sm text-secondary";
|
|
20
18
|
/**
|
|
21
19
|
* kastlan's outcome block (verify-email-page, reset-password-page): the kit's
|
|
22
20
|
* `EmptyState` without its dashed box, because it already sits in `AuthLayout`'s card —
|
|
23
21
|
* a box in a box. The icon and the title carry the tone.
|
|
24
22
|
*/
|
|
25
|
-
declare const OUTCOME_CLASS = "border-0 bg-transparent px-0 py-3";
|
|
23
|
+
export declare const OUTCOME_CLASS = "border-0 bg-transparent px-0 py-3";
|
|
26
24
|
/** `href` with `key=value` added to its query, before any `#fragment`: the reset page's
|
|
27
25
|
* "Sign in" carries the address (`/login?email=ada%40example.com`). */
|
|
28
|
-
declare function withQuery(href: string, key: string, value: string): string;
|
|
26
|
+
export declare function withQuery(href: string, key: string, value: string): string;
|
|
29
27
|
/** What a callback's promise came to. */
|
|
30
|
-
type Settled<T> = {
|
|
28
|
+
export type Settled<T> = {
|
|
31
29
|
ok: true;
|
|
32
30
|
value: T;
|
|
33
31
|
} | {
|
|
@@ -50,10 +48,10 @@ type Settled<T> = {
|
|
|
50
48
|
* `key === null` runs nothing (no token, not signed in yet) and forgets the last key, so
|
|
51
49
|
* the same token runs again once it is back.
|
|
52
50
|
*/
|
|
53
|
-
declare function useOncePerKey<T>(key: string | null, start: (key: string) => T | Promise<T>, settle: (key: string, result: Settled<T>) => void): void;
|
|
51
|
+
export declare function useOncePerKey<T>(key: string | null, start: (key: string) => T | Promise<T>, settle: (key: string, result: Settled<T>) => void): void;
|
|
54
52
|
/** Whether a callback's return is a promise to wait for. A callback that returns
|
|
55
53
|
* nothing is done when it returns. */
|
|
56
|
-
declare function isThenable(value: unknown): value is PromiseLike<unknown>;
|
|
54
|
+
export declare function isThenable(value: unknown): value is PromiseLike<unknown>;
|
|
57
55
|
/**
|
|
58
56
|
* Move focus to `ref` when `active` turns true — the outcome a person's own submit led
|
|
59
57
|
* to ("If an account exists … the link is on its way", "Your password has been
|
|
@@ -61,18 +59,16 @@ declare function isThenable(value: unknown): value is PromiseLike<unknown>;
|
|
|
61
59
|
* `<body>`; a screen reader then hears nothing at all. Focusing the message (a
|
|
62
60
|
* `tabIndex={-1}` box) reads it out and leaves the next Tab where the page continues.
|
|
63
61
|
*/
|
|
64
|
-
declare function useFocusWhen(active: boolean, ref: {
|
|
62
|
+
export declare function useFocusWhen(active: boolean, ref: {
|
|
65
63
|
current: HTMLElement | null;
|
|
66
64
|
}): void;
|
|
67
65
|
/** The box {@link useFocusWhen} focuses: centred, no focus ring of its own (it is not a
|
|
68
66
|
* control; the ring would read as one). */
|
|
69
|
-
declare function OutcomeMessage({ icon, children, focusRef, className, }: {
|
|
67
|
+
export declare function OutcomeMessage({ icon, children, focusRef, className, }: {
|
|
70
68
|
icon: ReactNode;
|
|
71
69
|
children: ReactNode;
|
|
72
70
|
focusRef?: {
|
|
73
71
|
current: HTMLDivElement | null;
|
|
74
72
|
};
|
|
75
73
|
className?: string;
|
|
76
|
-
}): react.JSX.Element;
|
|
77
|
-
|
|
78
|
-
export { type AuthHeadingLevel, FORM_HEADING_CLASS, INTRO_CLASS, OUTCOME_CLASS, OutcomeMessage, STATUS_HEADING_CLASS, type Settled, isThenable, useFocusWhen, useOncePerKey, withQuery };
|
|
74
|
+
}): import("react").JSX.Element;
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useEffect, useRef } from "react";
|
|
4
4
|
import { cn } from "../lib/cn.js";
|
|
5
|
-
const FORM_HEADING_CLASS = "text-base font-semibold text-
|
|
6
|
-
const STATUS_HEADING_CLASS = "text-center text-base font-semibold text-
|
|
7
|
-
const INTRO_CLASS = "text-sm text-
|
|
5
|
+
const FORM_HEADING_CLASS = "text-base font-semibold text-primary";
|
|
6
|
+
const STATUS_HEADING_CLASS = "text-center text-base font-semibold text-primary";
|
|
7
|
+
const INTRO_CLASS = "text-sm text-secondary";
|
|
8
8
|
const OUTCOME_CLASS = "border-0 bg-transparent px-0 py-3";
|
|
9
9
|
function withQuery(href, key, value) {
|
|
10
10
|
const hash = href.indexOf("#");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/auth/status-parts.tsx"],"sourcesContent":["import { useEffect, useRef } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"../lib/cn\";\n\n/**\n * The pieces the signed-out status pages share — {@link ForgotPasswordForm},\n * {@link ResetPasswordForm}, {@link VerifyEmailStatus}, {@link AcceptInvitation} and\n * {@link NotFoundPage} (docs/auth-harmonization.md §7).\n *\n * @internal Not part of the barrel; the pages are.\n */\n\n/** A heading level a page part may take. Default `h2`, under the page's `h1`\n * (`AuthLayout`'s `title`, the app's name), as on `SignInForm`'s steps; deeper for a\n * page embedded in another (a preview, the docs). */\nexport type AuthHeadingLevel = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n/** The form pages' heading: start-aligned, the size of `SignInForm`'s step headings. */\nexport const FORM_HEADING_CLASS = \"text-base font-semibold text-
|
|
1
|
+
{"version":3,"sources":["../../src/auth/status-parts.tsx"],"sourcesContent":["import { useEffect, useRef } from \"react\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"../lib/cn\";\n\n/**\n * The pieces the signed-out status pages share — {@link ForgotPasswordForm},\n * {@link ResetPasswordForm}, {@link VerifyEmailStatus}, {@link AcceptInvitation} and\n * {@link NotFoundPage} (docs/auth-harmonization.md §7).\n *\n * @internal Not part of the barrel; the pages are.\n */\n\n/** A heading level a page part may take. Default `h2`, under the page's `h1`\n * (`AuthLayout`'s `title`, the app's name), as on `SignInForm`'s steps; deeper for a\n * page embedded in another (a preview, the docs). */\nexport type AuthHeadingLevel = \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\n/** The form pages' heading: start-aligned, the size of `SignInForm`'s step headings. */\nexport const FORM_HEADING_CLASS = \"text-base font-semibold text-primary\";\n/** The status pages' heading: centred over the centred outcome below it. */\nexport const STATUS_HEADING_CLASS = \"text-center text-base font-semibold text-primary\";\nexport const INTRO_CLASS = \"text-sm text-secondary\";\n\n/**\n * kastlan's outcome block (verify-email-page, reset-password-page): the kit's\n * `EmptyState` without its dashed box, because it already sits in `AuthLayout`'s card —\n * a box in a box. The icon and the title carry the tone.\n */\nexport const OUTCOME_CLASS = \"border-0 bg-transparent px-0 py-3\";\n\n/** `href` with `key=value` added to its query, before any `#fragment`: the reset page's\n * \"Sign in\" carries the address (`/login?email=ada%40example.com`). */\nexport function withQuery(href: string, key: string, value: string): string {\n const hash = href.indexOf(\"#\");\n const base = hash === -1 ? href : href.slice(0, hash);\n const fragment = hash === -1 ? \"\" : href.slice(hash);\n const separator = base.includes(\"?\") ? (base.endsWith(\"?\") || base.endsWith(\"&\") ? \"\" : \"&\") : \"?\";\n return `${base}${separator}${encodeURIComponent(key)}=${encodeURIComponent(value)}${fragment}`;\n}\n\n/** What a callback's promise came to. */\nexport type Settled<T> = { ok: true; value: T } | { ok: false; error: unknown };\n\n/**\n * Run `start(key)` ONCE per key, and hand what it settles to into `settle` — unless the\n * key moved on in the meantime, when the stale answer is dropped.\n *\n * keksdose's verify-email and join pages fire their request from an effect behind a\n * `useRef` guard, and say why: the token is single-use, and StrictMode's\n * mount → unmount → remount would send it twice and turn a success into \"invalid\" on\n * the second answer. The guard is the same here; there is deliberately no \"unmounted\"\n * flag set in the cleanup, because StrictMode's simulated unmount would set it and the\n * remount would never clear the guard — the page would hang on its spinner (the bug\n * keksdose hit on /join with a react-query observer). A state update after a real\n * unmount is a no-op in React 18 and later.\n *\n * `key === null` runs nothing (no token, not signed in yet) and forgets the last key, so\n * the same token runs again once it is back.\n */\nexport function useOncePerKey<T>(\n key: string | null,\n start: (key: string) => T | Promise<T>,\n settle: (key: string, result: Settled<T>) => void,\n): void {\n const latest = useRef({ start, settle });\n useEffect(() => {\n latest.current = { start, settle };\n });\n const current = useRef<string | null>(null);\n useEffect(() => {\n if (key === null) {\n current.current = null;\n return;\n }\n if (current.current === key) return;\n current.current = key;\n const report = (result: Settled<T>) => {\n if (current.current === key) latest.current.settle(key, result);\n };\n let started: T | Promise<T>;\n try {\n started = latest.current.start(key);\n } catch (error) {\n report({ ok: false, error });\n return;\n }\n Promise.resolve(started).then(\n (value) => report({ ok: true, value }),\n (error: unknown) => report({ ok: false, error }),\n );\n }, [key]);\n}\n\n/** Whether a callback's return is a promise to wait for. A callback that returns\n * nothing is done when it returns. */\nexport function isThenable(value: unknown): value is PromiseLike<unknown> {\n return typeof (value as PromiseLike<unknown> | null)?.then === \"function\";\n}\n\n/**\n * Move focus to `ref` when `active` turns true — the outcome a person's own submit led\n * to (\"If an account exists … the link is on its way\", \"Your password has been\n * changed\"). The submit button they pressed is gone with the form, which drops focus to\n * `<body>`; a screen reader then hears nothing at all. Focusing the message (a\n * `tabIndex={-1}` box) reads it out and leaves the next Tab where the page continues.\n */\nexport function useFocusWhen(active: boolean, ref: { current: HTMLElement | null }): void {\n useEffect(() => {\n if (active) ref.current?.focus();\n }, [active, ref]);\n}\n\n/** The box {@link useFocusWhen} focuses: centred, no focus ring of its own (it is not a\n * control; the ring would read as one). */\nexport function OutcomeMessage({\n icon,\n children,\n focusRef,\n className,\n}: {\n icon: ReactNode;\n children: ReactNode;\n focusRef?: { current: HTMLDivElement | null };\n className?: string;\n}) {\n return (\n <div\n ref={focusRef}\n tabIndex={-1}\n className={cn(\"flex flex-col items-center gap-2 py-2 text-center outline-none\", className)}\n >\n <span aria-hidden className=\"[&_svg]:size-10\">\n {icon}\n </span>\n {children}\n </div>\n );\n}\n"],"mappings":";AA8HI,SAKE,KALF;AA9HJ,SAAS,WAAW,cAAc;AAElC,SAAS,UAAU;AAgBZ,MAAM,qBAAqB;AAE3B,MAAM,uBAAuB;AAC7B,MAAM,cAAc;AAOpB,MAAM,gBAAgB;AAItB,SAAS,UAAU,MAAc,KAAa,OAAuB;AAC1E,QAAM,OAAO,KAAK,QAAQ,GAAG;AAC7B,QAAM,OAAO,SAAS,KAAK,OAAO,KAAK,MAAM,GAAG,IAAI;AACpD,QAAM,WAAW,SAAS,KAAK,KAAK,KAAK,MAAM,IAAI;AACnD,QAAM,YAAY,KAAK,SAAS,GAAG,IAAK,KAAK,SAAS,GAAG,KAAK,KAAK,SAAS,GAAG,IAAI,KAAK,MAAO;AAC/F,SAAO,GAAG,IAAI,GAAG,SAAS,GAAG,mBAAmB,GAAG,CAAC,IAAI,mBAAmB,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AAAA,QACC;AAAA;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { englishRateLimited } from "./auth-errors.js";
|
|
3
|
+
const DEFAULT_VERIFY_EMAIL_LABELS = {
|
|
4
|
+
title: "Confirm your email address",
|
|
5
|
+
verifying: "Confirming\u2026",
|
|
6
|
+
verified: "Your email address is confirmed.",
|
|
7
|
+
continue: "Continue",
|
|
8
|
+
invalid: "This confirmation link is not valid",
|
|
9
|
+
expired: "This confirmation link has expired",
|
|
10
|
+
noToken: "This link is missing its confirmation token.",
|
|
11
|
+
invalidHint: "The link may have expired or already been used.",
|
|
12
|
+
requestInApp: "You can request a new one from inside the app.",
|
|
13
|
+
requestHere: "You can request a new one here.",
|
|
14
|
+
resend: "Send again",
|
|
15
|
+
resendIn: (seconds) => `Send again in ${seconds} s`,
|
|
16
|
+
resent: "Confirmation email sent",
|
|
17
|
+
resendError: "Could not send the confirmation email",
|
|
18
|
+
rateLimited: englishRateLimited,
|
|
19
|
+
banner: "Please confirm your email address.",
|
|
20
|
+
dismiss: "Not now"
|
|
21
|
+
};
|
|
22
|
+
export {
|
|
23
|
+
DEFAULT_VERIFY_EMAIL_LABELS
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=verify-email-labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/auth/verify-email-labels.ts"],"sourcesContent":["// The English words of ./verify-email, in a module with no component code: the English\n// catalogue (src/i18n/defaults.ts) imports them without the component, so `en` loads as one\n// chunk like the other languages (0.34, KS U8). ./verify-email re-exports them.\n\nimport { englishRateLimited } from \"./auth-errors\";\nimport type { VerifyEmailLabels } from \"./verify-email\";\n\nexport const DEFAULT_VERIFY_EMAIL_LABELS: VerifyEmailLabels = {\n title: \"Confirm your email address\",\n verifying: \"Confirming…\",\n verified: \"Your email address is confirmed.\",\n continue: \"Continue\",\n invalid: \"This confirmation link is not valid\",\n expired: \"This confirmation link has expired\",\n noToken: \"This link is missing its confirmation token.\",\n invalidHint: \"The link may have expired or already been used.\",\n requestInApp: \"You can request a new one from inside the app.\",\n requestHere: \"You can request a new one here.\",\n resend: \"Send again\",\n resendIn: (seconds) => `Send again in ${seconds} s`,\n resent: \"Confirmation email sent\",\n resendError: \"Could not send the confirmation email\",\n rateLimited: englishRateLimited,\n banner: \"Please confirm your email address.\",\n dismiss: \"Not now\",\n};\n"],"mappings":";AAIA,SAAS,0BAA0B;AAG5B,MAAM,8BAAiD;AAAA,EAC5D,OAAO;AAAA,EACP,WAAW;AAAA,EACX,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AAAA,EACT,aAAa;AAAA,EACb,cAAc;AAAA,EACd,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,UAAU,CAAC,YAAY,iBAAiB,OAAO;AAAA,EAC/C,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,SAAS;AACX;","names":[]}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { AuthHeadingLevel } from
|
|
4
|
-
|
|
1
|
+
import type { ComponentPropsWithRef, ReactNode } from "react";
|
|
2
|
+
import { type LabelOverride } from "../i18n/kit-labels.js";
|
|
3
|
+
import type { AuthHeadingLevel } from "./status-parts.js";
|
|
4
|
+
import { DEFAULT_VERIFY_EMAIL_LABELS } from "./verify-email-labels.js";
|
|
5
5
|
/** Every string the verification page and banner render — the `verifyEmail` namespace.
|
|
6
6
|
* keksdose's words (`verify_email.*`, and its server's "has expired"). */
|
|
7
|
-
interface VerifyEmailLabels {
|
|
7
|
+
export interface VerifyEmailLabels {
|
|
8
8
|
/** The page's heading. */
|
|
9
9
|
title: string;
|
|
10
10
|
/** While the link is redeemed. */
|
|
@@ -39,10 +39,10 @@ interface VerifyEmailLabels {
|
|
|
39
39
|
/** The banner's ×: it defers, it does not close anything. */
|
|
40
40
|
dismiss: string;
|
|
41
41
|
}
|
|
42
|
-
|
|
42
|
+
export { DEFAULT_VERIFY_EMAIL_LABELS };
|
|
43
43
|
/** What became of a confirmation link that did not verify. */
|
|
44
|
-
type VerifyEmailFailure = "invalid" | "expired";
|
|
45
|
-
interface VerifyEmailStatusProps extends Omit<
|
|
44
|
+
export type VerifyEmailFailure = "invalid" | "expired";
|
|
45
|
+
export interface VerifyEmailStatusProps extends Omit<ComponentPropsWithRef<"div">, "children" | "title"> {
|
|
46
46
|
/** The link's token — the app's `?token=`. Empty: the link was cut short, and the
|
|
47
47
|
* page says so without asking anyone. */
|
|
48
48
|
token: string;
|
|
@@ -56,7 +56,7 @@ interface VerifyEmailStatusProps extends Omit<ComponentPropsWithoutRef<"div">, "
|
|
|
56
56
|
/** Which dead end a rejection is. Default: `invalid` for everything — §5.2's servers
|
|
57
57
|
* answer one `token_invalid`; an app whose server tells expiry apart maps it here. */
|
|
58
58
|
classifyError?: (error: unknown) => VerifyEmailFailure;
|
|
59
|
-
/** 0.
|
|
59
|
+
/** 0.30.0: the words for a refused resend — the server's own sentence (a throttle's
|
|
60
60
|
* "try again in N minutes"), else the kit's `resendError`. */
|
|
61
61
|
describeError?: (error: unknown) => string | undefined;
|
|
62
62
|
/** Someone is signed in on this device: "Continue" goes into the app, and a dead link
|
|
@@ -77,7 +77,7 @@ interface VerifyEmailStatusProps extends Omit<ComponentPropsWithoutRef<"div">, "
|
|
|
77
77
|
title?: ReactNode;
|
|
78
78
|
/** The heading's level. Default `h2`, under the page's `h1`. */
|
|
79
79
|
headingAs?: AuthHeadingLevel;
|
|
80
|
-
labels?:
|
|
80
|
+
labels?: LabelOverride<VerifyEmailLabels>;
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
83
|
* Redeem an email-confirmation link (`/verify-email?token=…`, docs/auth-harmonization.md
|
|
@@ -94,12 +94,12 @@ interface VerifyEmailStatusProps extends Omit<ComponentPropsWithoutRef<"div">, "
|
|
|
94
94
|
* The outcome replaces the spinner, which says nothing to a screen reader on its own,
|
|
95
95
|
* so it is also announced.
|
|
96
96
|
*/
|
|
97
|
-
declare function VerifyEmailStatus({ token, onVerify, classifyError, describeError, signedIn, onResend, cooldown, continueHref, verifiedContent, title, headingAs: Heading, labels: labelsProp, className, ...rest }: VerifyEmailStatusProps): react.JSX.Element;
|
|
98
|
-
interface EmailVerificationBannerProps {
|
|
97
|
+
export declare function VerifyEmailStatus({ token, onVerify, classifyError, describeError, signedIn, onResend, cooldown, continueHref, verifiedContent, title, headingAs: Heading, labels: labelsProp, className, ...rest }: VerifyEmailStatusProps): import("react").JSX.Element;
|
|
98
|
+
export interface EmailVerificationBannerProps {
|
|
99
99
|
/** Send a new confirmation mail (`POST /auth/verify-email/resend`). Resolve when it
|
|
100
100
|
* went out; reject and the banner says it could not. */
|
|
101
101
|
onResend: () => Promise<unknown> | void;
|
|
102
|
-
/** 0.
|
|
102
|
+
/** 0.30.0: the words for a refused resend — the server's own sentence, else the kit's. */
|
|
103
103
|
describeError?: (error: unknown) => string | undefined;
|
|
104
104
|
/** Seconds "Send again" waits after a mail went out. Default 60; `0` never waits. */
|
|
105
105
|
cooldown?: number;
|
|
@@ -113,7 +113,7 @@ interface EmailVerificationBannerProps {
|
|
|
113
113
|
* budget with you directly." */
|
|
114
114
|
children?: ReactNode;
|
|
115
115
|
className?: string;
|
|
116
|
-
labels?:
|
|
116
|
+
labels?: LabelOverride<VerifyEmailLabels>;
|
|
117
117
|
}
|
|
118
118
|
/**
|
|
119
119
|
* The nudge for a signed-in account whose address is not confirmed — keksdose's
|
|
@@ -125,6 +125,4 @@ interface EmailVerificationBannerProps {
|
|
|
125
125
|
* went out (the button says how long), and its outcome is written into the banner and
|
|
126
126
|
* read out — no toast needed.
|
|
127
127
|
*/
|
|
128
|
-
declare function EmailVerificationBanner({ onResend, describeError, cooldown, onDismiss, variant, children, className, labels: labelsProp, }: EmailVerificationBannerProps): react.JSX.Element;
|
|
129
|
-
|
|
130
|
-
export { DEFAULT_VERIFY_EMAIL_LABELS, EmailVerificationBanner, type EmailVerificationBannerProps, type VerifyEmailFailure, type VerifyEmailLabels, VerifyEmailStatus, type VerifyEmailStatusProps };
|
|
128
|
+
export declare function EmailVerificationBanner({ onResend, describeError, cooldown, onDismiss, variant, children, className, labels: labelsProp, }: EmailVerificationBannerProps): import("react").JSX.Element;
|
|
@@ -7,28 +7,11 @@ import { useKitLabels } from "../i18n/kit-labels.js";
|
|
|
7
7
|
import { useAnnounce } from "../hooks/use-announce.js";
|
|
8
8
|
import { AlertBanner } from "../components/alert-banner.js";
|
|
9
9
|
import { LoadingState } from "../components/loading-state.js";
|
|
10
|
-
import { Button
|
|
10
|
+
import { Button } from "../components/button.js";
|
|
11
|
+
import { EmptyState } from "../components/empty-state.js";
|
|
11
12
|
import { OUTCOME_CLASS, STATUS_HEADING_CLASS, isThenable, useOncePerKey } from "./status-parts.js";
|
|
12
13
|
import { authErrorCode, englishRateLimited, isRateLimited, retryAfterSeconds } from "./auth-errors.js";
|
|
13
|
-
|
|
14
|
-
title: "Confirm your email address",
|
|
15
|
-
verifying: "Confirming\u2026",
|
|
16
|
-
verified: "Your email address is confirmed.",
|
|
17
|
-
continue: "Continue",
|
|
18
|
-
invalid: "This confirmation link is not valid",
|
|
19
|
-
expired: "This confirmation link has expired",
|
|
20
|
-
noToken: "This link is missing its confirmation token.",
|
|
21
|
-
invalidHint: "The link may have expired or already been used.",
|
|
22
|
-
requestInApp: "You can request a new one from inside the app.",
|
|
23
|
-
requestHere: "You can request a new one here.",
|
|
24
|
-
resend: "Send again",
|
|
25
|
-
resendIn: (seconds) => `Send again in ${seconds} s`,
|
|
26
|
-
resent: "Confirmation email sent",
|
|
27
|
-
resendError: "Could not send the confirmation email",
|
|
28
|
-
rateLimited: englishRateLimited,
|
|
29
|
-
banner: "Please confirm your email address.",
|
|
30
|
-
dismiss: "Not now"
|
|
31
|
-
};
|
|
14
|
+
import { DEFAULT_VERIFY_EMAIL_LABELS } from "./verify-email-labels.js";
|
|
32
15
|
const DEFAULT_COOLDOWN = 60;
|
|
33
16
|
function useResend(onResend, cooldown) {
|
|
34
17
|
const [phase, setPhase] = useState("idle");
|
|
@@ -96,7 +79,7 @@ function ResendStatus({
|
|
|
96
79
|
"span",
|
|
97
80
|
{
|
|
98
81
|
role: "status",
|
|
99
|
-
className: cn(phase === "failed" ? "text-
|
|
82
|
+
className: cn(phase === "failed" ? "text-danger" : "text-success", className),
|
|
100
83
|
children: phase === "sent" ? labels.resent : failed
|
|
101
84
|
}
|
|
102
85
|
);
|