@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
package/dist/components/legal.js
CHANGED
|
@@ -6,6 +6,7 @@ import { cn } from "../lib/cn.js";
|
|
|
6
6
|
import { countryName } from "../lib/countries.js";
|
|
7
7
|
import { AlertBanner } from "./alert-banner.js";
|
|
8
8
|
import { TextLink } from "./text-link.js";
|
|
9
|
+
import { DEFAULT_LEGAL_LABELS } from "./legal-labels.js";
|
|
9
10
|
const LEGAL_HREFS = Object.freeze({
|
|
10
11
|
impressum: "/impressum",
|
|
11
12
|
privacy: "/privacy",
|
|
@@ -39,101 +40,6 @@ function legalOperatorText(operator, locale = "en") {
|
|
|
39
40
|
bindingLanguage: operator.bindingLanguage ? languageName(operator.bindingLanguage, locale) : ""
|
|
40
41
|
};
|
|
41
42
|
}
|
|
42
|
-
const DEFAULT_LEGAL_LABELS = {
|
|
43
|
-
navLabel: "Legal",
|
|
44
|
-
links: {
|
|
45
|
-
impressum: "Imprint",
|
|
46
|
-
privacy: "Privacy Policy",
|
|
47
|
-
terms: "Terms"
|
|
48
|
-
},
|
|
49
|
-
titles: {
|
|
50
|
-
impressum: "Imprint",
|
|
51
|
-
privacy: "Privacy Policy",
|
|
52
|
-
terms: "Terms of Service"
|
|
53
|
-
},
|
|
54
|
-
backHome: "Back to home",
|
|
55
|
-
accept: "I accept the {terms} and the {privacy}",
|
|
56
|
-
notice: {
|
|
57
|
-
beta: "Closed beta. These texts have not been reviewed by a lawyer yet and will be before a public launch.",
|
|
58
|
-
privacy: "Closed beta. The legal wording below has not been reviewed by a lawyer yet and will be before a public launch. The technical descriptions \u2014 what is stored, where, and who can read it \u2014 describe what the software actually does today, and are meant to be checked against it."
|
|
59
|
-
},
|
|
60
|
-
translation: {
|
|
61
|
-
note: (o) => `This is a translation for your convenience. The ${o.bindingLanguage} version is binding.`,
|
|
62
|
-
show: (o) => `Show the ${o.bindingLanguage} version`
|
|
63
|
-
},
|
|
64
|
-
sections: {
|
|
65
|
-
impressum: {
|
|
66
|
-
operator: {
|
|
67
|
-
title: "Operator",
|
|
68
|
-
body: (o) => `${o.name}
|
|
69
|
-
${o.postalCode} ${o.city}
|
|
70
|
-
${o.country}
|
|
71
|
-
|
|
72
|
-
The full postal address is supplied on request to anyone with a legitimate legal interest; write to the contact address below.`
|
|
73
|
-
},
|
|
74
|
-
contact: {
|
|
75
|
-
title: "Contact",
|
|
76
|
-
body: (o) => `Email: ${o.email}`
|
|
77
|
-
},
|
|
78
|
-
disclaimer: {
|
|
79
|
-
title: "Liability for content and links",
|
|
80
|
-
body: "This is a private, non-commercial project offered during a closed beta, without warranty. External sites we link to are the responsibility of their respective operators; we have no control over their content.",
|
|
81
|
-
commercial: "This is a commercial service. Paid plans are sold by our reseller, which acts as the Merchant of Record: it sells the subscription in its own name, takes the payment, issues the invoice and handles VAT, and its terms of sale apply to the purchase. We take care that the content of this service is accurate, but cannot guarantee that it is complete or up to date. External sites we link to are the responsibility of their respective operators; we have no control over their content."
|
|
82
|
-
}
|
|
83
|
-
},
|
|
84
|
-
privacy: {
|
|
85
|
-
controller: {
|
|
86
|
-
title: "Controller",
|
|
87
|
-
body: (o) => `The party responsible for processing personal data in this service is:
|
|
88
|
-
${o.name}
|
|
89
|
-
${o.postalCode} ${o.city}, ${o.country}
|
|
90
|
-
Email: ${o.email}
|
|
91
|
-
|
|
92
|
-
The full postal address is supplied on request to data subjects and supervisory authorities.`
|
|
93
|
-
},
|
|
94
|
-
legal_basis: {
|
|
95
|
-
title: "Legal basis",
|
|
96
|
-
body: "As the operator is based in Switzerland, processing is governed by the Swiss Federal Act on Data Protection (FADP). Where the EU General Data Protection Regulation (GDPR) applies to you, we rely on the performance of a contract to provide the service (Art. 6(1)(b) GDPR) and our legitimate interest in operating and securing it (Art. 6(1)(f) GDPR)."
|
|
97
|
-
},
|
|
98
|
-
browser: {
|
|
99
|
-
title: "What your browser stores",
|
|
100
|
-
lead: "No cookies. The app keeps the following in your browser's storage:",
|
|
101
|
-
tail: "None of it is used to track you. Entries waiting to be sent are sent to us as soon as they can be; everything else stays on your device. All of it disappears when you clear the site's data, and signing out removes the sign-in tokens."
|
|
102
|
-
},
|
|
103
|
-
rights: {
|
|
104
|
-
title: "Your rights",
|
|
105
|
-
lead: "You have the right to access, rectification, erasure, restriction, data portability and objection.",
|
|
106
|
-
tail: "If you are in Switzerland you may contact the Federal Data Protection and Information Commissioner (FDPIC); if you are in the EU you may lodge a complaint with your local supervisory authority."
|
|
107
|
-
},
|
|
108
|
-
contact: {
|
|
109
|
-
title: "Contact for data protection",
|
|
110
|
-
body: (o) => `For any privacy request, contact: ${o.email}`
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
|
-
terms: {
|
|
114
|
-
warranty: {
|
|
115
|
-
title: "No warranty",
|
|
116
|
-
body: 'The service is provided "as is" and "as available", without warranties of any kind to the extent permitted by law. As a beta it may contain errors, change, or be interrupted at any time \u2014 keep your own backups of important data.'
|
|
117
|
-
},
|
|
118
|
-
liability: {
|
|
119
|
-
title: "Limitation of liability",
|
|
120
|
-
body: "To the extent permitted by applicable law, the operator is not liable for any indirect or consequential damage arising from the use of, or inability to use, the service. Nothing here limits liability that cannot be limited by law."
|
|
121
|
-
},
|
|
122
|
-
changes: {
|
|
123
|
-
title: "Changes to these terms",
|
|
124
|
-
body: "These terms may be updated as the service evolves. Material changes will be announced by email or in the app; continued use after a change means you accept it."
|
|
125
|
-
},
|
|
126
|
-
language: {
|
|
127
|
-
title: "Language",
|
|
128
|
-
body: (o) => `These terms are written in ${o.bindingLanguage}. Translations into other languages are provided for convenience only; where a translation differs, the ${o.bindingLanguage} version prevails.`
|
|
129
|
-
},
|
|
130
|
-
law: {
|
|
131
|
-
title: "Governing law",
|
|
132
|
-
body: (o) => `These terms are governed by Swiss law, excluding its conflict-of-laws rules. As far as legally permissible, the place of jurisdiction is ${o.city} (${o.region}), ${o.country}.`
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
};
|
|
137
43
|
function useLegalLabels(labels) {
|
|
138
44
|
return useKitLabels("legal", DEFAULT_LEGAL_LABELS, labels);
|
|
139
45
|
}
|
|
@@ -201,7 +107,7 @@ function LegalLinks({
|
|
|
201
107
|
}
|
|
202
108
|
function LegalFooter({ children, links, currentHref, landmark = true, className, labels }) {
|
|
203
109
|
const Root = landmark ? "footer" : "div";
|
|
204
|
-
return /* @__PURE__ */ jsx(Root, { className: cn("border-t border-
|
|
110
|
+
return /* @__PURE__ */ jsx(Root, { className: cn("border-t border-subtle bg-surface", className), children: /* @__PURE__ */ jsxs("div", { className: "mx-auto max-w-5xl px-4 py-8 text-sm text-muted", children: [
|
|
205
111
|
/* @__PURE__ */ jsx(
|
|
206
112
|
LegalLinks,
|
|
207
113
|
{
|
|
@@ -221,13 +127,13 @@ function LegalSection({ heading, body, children, id: idProp, headingAs }) {
|
|
|
221
127
|
const number = slot?.number;
|
|
222
128
|
const Heading = headingAs ?? page?.sectionHeading ?? "h2";
|
|
223
129
|
return /* @__PURE__ */ jsxs("section", { id, className: "scroll-mt-20", children: [
|
|
224
|
-
/* @__PURE__ */ jsxs(Heading, { className: "text-lg font-semibold break-words text-
|
|
130
|
+
/* @__PURE__ */ jsxs(Heading, { className: "text-lg font-semibold break-words text-primary", children: [
|
|
225
131
|
number !== void 0 && `${number}. `,
|
|
226
132
|
heading
|
|
227
133
|
] }),
|
|
228
134
|
/* @__PURE__ */ jsxs(LegalSlotContext.Provider, { value: null, children: [
|
|
229
|
-
body !== void 0 && /* @__PURE__ */ jsx(LegalText, { text: body, className: "mt-2 text-sm leading-relaxed text-
|
|
230
|
-
children !== void 0 && /* @__PURE__ */ jsx("div", { className: "mt-2 text-sm leading-relaxed break-words text-
|
|
135
|
+
body !== void 0 && /* @__PURE__ */ jsx(LegalText, { text: body, className: "mt-2 text-sm leading-relaxed text-secondary" }),
|
|
136
|
+
children !== void 0 && /* @__PURE__ */ jsx("div", { className: "mt-2 text-sm leading-relaxed break-words text-secondary", children: typeof children === "string" ? resolveLegalRefs(children, page) : children })
|
|
231
137
|
] })
|
|
232
138
|
] });
|
|
233
139
|
}
|
|
@@ -245,11 +151,11 @@ function LegalLayout({
|
|
|
245
151
|
}) {
|
|
246
152
|
return /* @__PURE__ */ jsxs("article", { className: cn("mx-auto w-full max-w-3xl px-4 py-12", className), children: [
|
|
247
153
|
back !== void 0 && /* @__PURE__ */ jsx("div", { className: "mb-4 text-sm", children: back }),
|
|
248
|
-
/* @__PURE__ */ jsx(Heading, { className: "text-3xl font-bold tracking-tight break-words text-
|
|
154
|
+
/* @__PURE__ */ jsx(Heading, { className: "text-3xl font-bold tracking-tight break-words text-primary", children: title }),
|
|
249
155
|
translationNote !== void 0 && translationNote !== null && /* @__PURE__ */ jsx("div", { className: "mt-3", children: translationNote }),
|
|
250
156
|
notice !== void 0 && notice !== null && /* @__PURE__ */ jsx(AlertBanner, { tone: "warning", role: "note", className: "mt-4", children: notice }),
|
|
251
157
|
/* @__PURE__ */ jsx("div", { className: "mt-8 space-y-8", children }),
|
|
252
|
-
links !== void 0 && links.length > 0 && /* @__PURE__ */ jsx(LegalLinks, { links, currentHref, labels, className: "mt-12 border-t border-
|
|
158
|
+
links !== void 0 && links.length > 0 && /* @__PURE__ */ jsx(LegalLinks, { links, currentHref, labels, className: "mt-12 border-t border-subtle pt-4" })
|
|
253
159
|
] });
|
|
254
160
|
}
|
|
255
161
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/legal.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport type { MouseEvent, ReactNode } from \"react\";\n\nimport { useKitLabels } from \"../i18n/kit-labels\";\nimport type { LabelOverride } from \"../i18n/kit-labels\";\nimport { cn } from \"../lib/cn\";\nimport { countryName } from \"../lib/countries\";\nimport { AlertBanner } from \"./alert-banner\";\nimport { TextLink } from \"./text-link\";\n\n/**\n * The legal pages — Imprint, Privacy Policy, Terms — for every app.\n *\n * 0.19 (docs/i18n-harmonization.md H10): keksdose and kastlan each carried the same\n * shell, written twice: a back link, the title, a \"closed beta, not yet reviewed by a\n * lawyer\" notice, sections of heading + running text, and kastlan's row of links to the\n * three pages with the current one marked. That shape moved here; the words stayed in\n * each app.\n *\n * 0.28 (docs/legal-harmonization.md) reverses the second half: the wording that is the\n * same in all three apps is the kit's too, in all seven languages, so there is ONE text\n * to change after the lawyer's review instead of three apps drifting apart sentence by\n * sentence. This module holds the labels (every kit-owned legal word, §4.3/§4.4), the\n * column (`LegalLayout`), the section (`LegalSection`, now numbered and cross-referenced\n * inside a `LegalPage`), the links row and the public footer. The page frame, the\n * kit-owned sections and the terms checkbox are in `./legal-page`.\n *\n * `LegalLayout` stays a CONTENT COLUMN, not a page: before 0.28 keksdose showed it inside\n * its public landing header and footer and kastlan inside `AuthLayout`. `LegalPage` is\n * the frame around it that the contract (§3.2) settled on — keksdose's.\n */\n\n// ── The operator ──────────────────────────────────────────────────────────────\n\n/** The three pages, by the key every app uses for them (§4.1). Kurvenschmiede's\n * `imprint` became `impressum`. */\nexport type LegalPageKey = \"impressum\" | \"privacy\" | \"terms\";\n\n/** The three routes (§3.1): one per page, the language from i18n, no per-language URLs. */\nexport const LEGAL_HREFS: Readonly<Record<LegalPageKey, string>> = Object.freeze({\n impressum: \"/impressum\",\n privacy: \"/privacy\",\n terms: \"/terms\",\n});\n\n/**\n * Who runs the app — the values the kit's legal sections are filled in with (§5).\n *\n * The kit holds NO personal data: every app passes the same values once, to\n * {@link LegalPage}'s `operator`. Plain strings, so the app's config or env can hold them.\n */\nexport interface LegalOperator {\n /** The operator's name, as the imprint prints it. */\n name: string;\n /** \"9470\"-shaped; printed before the city. */\n postalCode: string;\n /** The place — the imprint's address line and the terms' place of jurisdiction. */\n city: string;\n /** The canton or state, abbreviated as the place of jurisdiction writes it: \"SG\". */\n region: string;\n /**\n * ISO 3166-1 alpha-2: \"CH\". A CODE, not a name — the kit names it in the page's\n * language (`Intl.DisplayNames`, see `countryName`), so \"Switzerland\", \"Schweiz\",\n * \"Suisse\" and \"瑞士\" all come from one value.\n */\n country: string;\n /** The contact address the imprint and the privacy policy print. */\n email: string;\n /**\n * The language whose version of the legal texts is BINDING (\"de-CH\"), a BCP 47 code\n * (0.28.1, Marcel 2026-10-05). The lawyer reviews that one; the others are translations\n * for convenience. With it, {@link LegalPage} shows a note on every page read in\n * another language, and the terms' `language` section says which version prevails.\n * Only the language subtag counts: \"de-CH\" and \"de\" are the same language here.\n */\n bindingLanguage?: string;\n}\n\n/**\n * The operator as the kit's texts read it: {@link LegalOperator} with `country` already\n * NAMED in the page's language (\"Schweiz\", not \"CH\").\n *\n * The label functions take this rather than the code so they stay pure string functions\n * of plain values, like every other function label in the kit: a catalogue never calls\n * `Intl`, and a review row can be rendered from placeholders (`{{country}}`).\n */\nexport type LegalOperatorText = Readonly<Record<keyof LegalOperator, string>>;\n\n/** The language subtag of a BCP 47 code, lower-cased: \"de-CH\" → \"de\". */\nexport function baseLanguage(code: string): string {\n return code.split(/[-_]/)[0]!.toLowerCase();\n}\n\nconst languageNamers = new Map<string, Intl.DisplayNames | null>();\n\n/** The name of a language in `locale` — \"Deutsch\", \"German\", \"allemand\", \"德语\" — from its\n * language subtag, so \"de-CH\" is plain \"German\", not \"Swiss High German\". The code itself\n * when the runtime cannot name it. */\nfunction languageName(code: string, locale: string): string {\n let namer = languageNamers.get(locale);\n if (namer === undefined) {\n try {\n namer = new Intl.DisplayNames([locale], { type: \"language\" });\n } catch {\n namer = null;\n }\n languageNamers.set(locale, namer);\n }\n const base = baseLanguage(code);\n try {\n return namer?.of(base) ?? base;\n } catch {\n return base;\n }\n}\n\n/** @internal The operator as the texts read it: its country named in `locale` (English\n * without one — `countryName`'s rule, so an app that set no locale reads English). */\nexport function legalOperatorText(operator: LegalOperator, locale: string = \"en\"): LegalOperatorText {\n return {\n ...operator,\n country: countryName(operator.country, locale),\n bindingLanguage: operator.bindingLanguage ? languageName(operator.bindingLanguage, locale) : \"\",\n };\n}\n\n// ── Labels ────────────────────────────────────────────────────────────────────\n\n/** A kit section whose text is fixed: a heading and one body. */\nexport interface LegalTextSectionLabels {\n title: string;\n body: string;\n}\n\n/**\n * 0.32.0: the imprint's disclaimer, with the body of its COMMERCIAL variant\n * (docs/billing-harmonization.md §8; legal decision 7). The title is the same in both:\n * liability for content and links is the subject either way.\n */\nexport interface LegalDisclaimerSectionLabels extends LegalTextSectionLabels {\n /**\n * The body for `<LegalKitSection section=\"disclaimer\" variant=\"commercial\">`: a paid\n * service sold through a Merchant of Record, which sells in its own name (§2.2), so the\n * \"private, non-commercial … closed beta\" of `body` would be untrue. OPTIONAL, as every\n * key added to a namespace an app may annotate: left out, the provider's, then English.\n */\n commercial?: string;\n}\n\n/** A kit section whose text names the operator (§4.3 `{name}`, `{email}`, …). */\nexport interface LegalOperatorSectionLabels {\n title: string;\n /** Called with the operator, its country already named in the page's language. Line\n * breaks are kept (`white-space: pre-line`): an address is plain lines. */\n body: (operator: LegalOperatorText) => string;\n}\n\n/** A kit section with an app slot (or a list) between its two parts. */\nexport interface LegalFramedSectionLabels {\n title: string;\n /** Before the app's part. */\n lead: string;\n /** After it. */\n tail: string;\n}\n\n/**\n * Every word of the legal pages that is the kit's — docs/legal-harmonization.md §4.3 and\n * §4.4, verbatim. English, British spelling; the other six languages are in the\n * catalogues (`@eifi1/ui-kit/i18n/<code>`).\n *\n * Keys follow the contract: `sections.<page>.<section key>`, the section keys being\n * keksdose's (`legal_basis`, not `legalBasis`), because the same key is the section's\n * `id` (`/privacy#legal_basis`) and the app's own sections sit beside these under the\n * same names in its catalogue. Titles carry NO number: {@link LegalPage} numbers the\n * privacy and terms sections in render order (§4.1).\n */\nexport interface LegalLabels {\n /** The accessible name of {@link LegalLinks}' and {@link LegalFooter}'s `<nav>`. */\n navLabel: string;\n /** The short labels of the three links, everywhere the links appear (§3.3). */\n links: Record<LegalPageKey, string>;\n /** The pages' titles — the `<h1>`, and the links of the terms checkbox. */\n titles: Record<LegalPageKey, string>;\n /** The back link above the title: \"← Back to home\". */\n backHome: string;\n /**\n * The terms checkbox (§3.4) — ONE template with `{terms}` and `{privacy}`, which\n * become the links (named with `titles`). Not a prefix plus a joiner: a language puts\n * the links where its grammar wants them, articles included, and nothing is added\n * around a placeholder — Italian elides, \"e l’{privacy}\", with no space.\n */\n accept: string;\n /** The notice under the title (§3.2): `beta` on the imprint and the terms, `privacy`\n * on the privacy policy. */\n notice: {\n beta: string;\n privacy: string;\n };\n /**\n * 0.28.1: on a page read in another language than the operator's `bindingLanguage` —\n * `note` under the title, `show` on the button that switches to the binding version\n * (when the app passes `onShowBindingLanguage`). `o.bindingLanguage` is the binding\n * language's NAME in the reader's language (\"German\", \"allemand\").\n */\n translation: {\n note: (o: LegalOperatorText) => string;\n show: (o: LegalOperatorText) => string;\n };\n /** The kit's sections (§4.3), by page and section key. */\n sections: {\n impressum: {\n operator: LegalOperatorSectionLabels;\n contact: LegalOperatorSectionLabels;\n /** `body` is the default, non-commercial text; `commercial` the 0.32 variant. */\n disclaimer: LegalDisclaimerSectionLabels;\n };\n privacy: {\n controller: LegalOperatorSectionLabels;\n /** The app's paragraph follows the body (§4.2): consent, where an app relies on it. */\n legal_basis: LegalTextSectionLabels;\n /** `lead`, then the app's entries as a list, then `tail`, then the app's paragraph. */\n browser: LegalFramedSectionLabels;\n /** `lead` (the rights), then the app's paragraph (export, deletion), then `tail`\n * (the supervisory authorities). */\n rights: LegalFramedSectionLabels;\n contact: LegalOperatorSectionLabels;\n };\n terms: {\n warranty: LegalTextSectionLabels;\n liability: LegalTextSectionLabels;\n changes: LegalTextSectionLabels;\n /** 0.28.1: which language's version prevails — `o.bindingLanguage`, named. */\n language: LegalOperatorSectionLabels;\n /** The place of jurisdiction is the operator's `{city} ({region}), {country}`. */\n law: LegalOperatorSectionLabels;\n };\n };\n}\n\nexport const DEFAULT_LEGAL_LABELS: LegalLabels = {\n navLabel: \"Legal\",\n links: {\n impressum: \"Imprint\",\n privacy: \"Privacy Policy\",\n terms: \"Terms\",\n },\n titles: {\n impressum: \"Imprint\",\n privacy: \"Privacy Policy\",\n terms: \"Terms of Service\",\n },\n backHome: \"Back to home\",\n accept: \"I accept the {terms} and the {privacy}\",\n notice: {\n beta: \"Closed beta. These texts have not been reviewed by a lawyer yet and will be before a public launch.\",\n privacy:\n \"Closed beta. The legal wording below has not been reviewed by a lawyer yet and will be before a public launch. The technical descriptions — what is stored, where, and who can read it — describe what the software actually does today, and are meant to be checked against it.\",\n },\n translation: {\n note: (o) =>\n `This is a translation for your convenience. The ${o.bindingLanguage} version is binding.`,\n show: (o) => `Show the ${o.bindingLanguage} version`,\n },\n sections: {\n impressum: {\n operator: {\n title: \"Operator\",\n body: (o) =>\n `${o.name}\\n${o.postalCode} ${o.city}\\n${o.country}\\n\\nThe full postal address is supplied on request to anyone with a legitimate legal interest; write to the contact address below.`,\n },\n contact: {\n title: \"Contact\",\n body: (o) => `Email: ${o.email}`,\n },\n disclaimer: {\n title: \"Liability for content and links\",\n body: \"This is a private, non-commercial project offered during a closed beta, without warranty. External sites we link to are the responsibility of their respective operators; we have no control over their content.\",\n commercial:\n \"This is a commercial service. Paid plans are sold by our reseller, which acts as the Merchant of Record: it sells the subscription in its own name, takes the payment, issues the invoice and handles VAT, and its terms of sale apply to the purchase. We take care that the content of this service is accurate, but cannot guarantee that it is complete or up to date. External sites we link to are the responsibility of their respective operators; we have no control over their content.\",\n },\n },\n privacy: {\n controller: {\n title: \"Controller\",\n body: (o) =>\n `The party responsible for processing personal data in this service is:\\n${o.name}\\n${o.postalCode} ${o.city}, ${o.country}\\nEmail: ${o.email}\\n\\nThe full postal address is supplied on request to data subjects and supervisory authorities.`,\n },\n legal_basis: {\n title: \"Legal basis\",\n body: \"As the operator is based in Switzerland, processing is governed by the Swiss Federal Act on Data Protection (FADP). Where the EU General Data Protection Regulation (GDPR) applies to you, we rely on the performance of a contract to provide the service (Art. 6(1)(b) GDPR) and our legitimate interest in operating and securing it (Art. 6(1)(f) GDPR).\",\n },\n browser: {\n title: \"What your browser stores\",\n lead: \"No cookies. The app keeps the following in your browser's storage:\",\n tail: \"None of it is used to track you. Entries waiting to be sent are sent to us as soon as they can be; everything else stays on your device. All of it disappears when you clear the site's data, and signing out removes the sign-in tokens.\",\n },\n rights: {\n title: \"Your rights\",\n lead: \"You have the right to access, rectification, erasure, restriction, data portability and objection.\",\n tail: \"If you are in Switzerland you may contact the Federal Data Protection and Information Commissioner (FDPIC); if you are in the EU you may lodge a complaint with your local supervisory authority.\",\n },\n contact: {\n title: \"Contact for data protection\",\n body: (o) => `For any privacy request, contact: ${o.email}`,\n },\n },\n terms: {\n warranty: {\n title: \"No warranty\",\n body: 'The service is provided \"as is\" and \"as available\", without warranties of any kind to the extent permitted by law. As a beta it may contain errors, change, or be interrupted at any time — keep your own backups of important data.',\n },\n liability: {\n title: \"Limitation of liability\",\n body: \"To the extent permitted by applicable law, the operator is not liable for any indirect or consequential damage arising from the use of, or inability to use, the service. Nothing here limits liability that cannot be limited by law.\",\n },\n changes: {\n title: \"Changes to these terms\",\n body: \"These terms may be updated as the service evolves. Material changes will be announced by email or in the app; continued use after a change means you accept it.\",\n },\n language: {\n title: \"Language\",\n body: (o) =>\n `These terms are written in ${o.bindingLanguage}. Translations into other languages are provided for convenience only; where a translation differs, the ${o.bindingLanguage} version prevails.`,\n },\n law: {\n title: \"Governing law\",\n body: (o) =>\n `These terms are governed by Swiss law, excluding its conflict-of-laws rules. As far as legally permissible, the place of jurisdiction is ${o.city} (${o.region}), ${o.country}.`,\n },\n },\n },\n};\n\n/** The `legal` namespace, resolved: defaults < provider < `labels` prop. The prop may be\n * partial at every depth (`{ titles: { terms: \"…\" } }`), as the provider's is. */\nexport function useLegalLabels(labels?: LabelOverride<LegalLabels>): LegalLabels {\n return useKitLabels(\"legal\", DEFAULT_LEGAL_LABELS, labels as Partial<LegalLabels> | undefined);\n}\n\n// ── What a LegalPage tells the sections inside it ─────────────────────────────\n\n/** Where a `{ref:key}` points: the section's number on a numbered page, else its heading. */\nexport interface LegalRefTarget {\n number?: number;\n heading: ReactNode;\n}\n\n/** @internal Set by `LegalPage` around its column; `null` outside one. */\nexport interface LegalPageContextValue {\n page: LegalPageKey;\n /** The operator with its country named — what the kit sections are filled in with. */\n operator: LegalOperatorText;\n /** The heading level of a section that does not choose one: one below the title. */\n sectionHeading: \"h2\" | \"h3\";\n /** Every section's key, in render order — known BEFORE any section renders, so a\n * reference can point forward (keksdose's section 2 refers to section 10). */\n targets: ReadonlyMap<string, LegalRefTarget>;\n}\n\n/** @internal */\nexport const LegalPageContext = createContext<LegalPageContextValue | null>(null);\n\n/** @internal The place `LegalPage` gave one section: its key and its number. Reset to\n * `null` inside a section, so a section nested in another's children takes neither. */\nexport interface LegalSectionSlot {\n id?: string;\n number?: number;\n}\n\n/** @internal */\nexport const LegalSlotContext = createContext<LegalSectionSlot | null>(null);\n\n/** @internal `{ref:retention}`. A key is a section key: letters, digits, `_` and `-`. */\nconst REF_TOKEN = /\\{ref:([A-Za-z0-9_-]+)\\}/g;\n\n/**\n * A development build's console note — never in production (the consumer's bundler\n * makes `import.meta.env.DEV` false) and never under vitest. Optional-chained:\n * `import.meta.env` is a Vite injection, absent under plain Node.\n */\nfunction devWarnings(): boolean {\n return Boolean(import.meta.env?.DEV) && !import.meta.env?.VITEST;\n}\nconst warned = new Set<string>();\n/** @internal Once per message. */\nexport function warnLegalOnce(message: string): void {\n if (!devWarnings() || warned.has(message)) return;\n warned.add(message);\n console.warn(`[ui-kit] ${message}`);\n}\n\n/**\n * `text` with every `{ref:key}` replaced by a link to `#key` that reads the section's\n * number — the words around it stay the app's (\"see section {ref:retention}\", \"siehe\n * Abschnitt {ref:retention}\"), so each language keeps its grammar (§4.1). On the imprint,\n * which is not numbered, the link reads the section's heading instead.\n *\n * Outside a {@link LegalPage} the text is returned as it is: there is no order to count.\n * A key the page has no section for stays visible as the raw token — a broken reference\n * an app test can find (`not.toHaveTextContent(\"{ref:\")`), not a silently wrong number.\n */\nexport function resolveLegalRefs(text: string, page: LegalPageContextValue | null): ReactNode {\n if (!page || !text.includes(\"{ref:\")) return text;\n const out: ReactNode[] = [];\n let last = 0;\n for (const match of text.matchAll(REF_TOKEN)) {\n const at = match.index ?? 0;\n if (at > last) out.push(text.slice(last, at));\n const key = match[1];\n const target = page.targets.get(key);\n if (target) {\n out.push(\n <TextLink key={`${key}@${at}`} href={`#${key}`}>\n {target.number ?? target.heading}\n </TextLink>,\n );\n } else {\n warnLegalOnce(`{ref:${key}} on the ${page.page} page points at no section of it.`);\n out.push(match[0]);\n }\n last = at + match[0].length;\n }\n if (last < text.length) out.push(text.slice(last));\n return out;\n}\n\n/** @internal Running text — one translation string — with its line breaks kept and its\n * `{ref:key}` tokens resolved. */\nexport function LegalText({ text, className }: { text: string; className?: string }) {\n const page = useContext(LegalPageContext);\n // `break-words`: an address, an email or a URL in a translation is one long word, and\n // on a 390px phone it would push the column wider than the screen.\n return <p className={cn(\"whitespace-pre-line break-words\", className)}>{resolveLegalRefs(text, page)}</p>;\n}\n\n// ── Links ─────────────────────────────────────────────────────────────────────\n\nexport interface LegalLink {\n href: string;\n /** \"Imprint\", \"Privacy Policy\", \"Terms\". */\n label: ReactNode;\n}\n\nexport interface LegalLinksProps {\n /** Default (0.28): the three routes, `/impressum`, `/privacy` and `/terms`, with the\n * kit's short link labels (`legal.links`), in the contract's order. */\n links?: readonly LegalLink[];\n /** The page being shown; its link is marked `aria-current=\"page\"`. Usually the\n * router's pathname. */\n currentHref?: string;\n /** `false` renders the links without the `<nav>` landmark — inside `AuthLayout`'s\n * `footer` or `TopBarActionMenu`'s `footer`, which are named `<nav>`s already. The row\n * keeps its spacing and `className` either way (0.27.1: it used to return the bare\n * links, so in a plain container — Kurvenschmiede's account-menu `<li>` — they ran\n * together as \"ImpressumDatenschutzerklärungNutz…\" and overflowed). Default true. */\n nav?: boolean;\n /** Called on a click on any of the links, before it navigates — an account menu closes\n * itself here (0.28.1, keksdose: it had to catch the click on a wrapping `<div>`). */\n onLinkClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n labels?: LabelOverride<LegalLabels>;\n className?: string;\n}\n\n/** The default links: the three routes under the kit's short labels. */\nfunction defaultLinks(labels: LegalLabels): LegalLink[] {\n return ([\"impressum\", \"privacy\", \"terms\"] as const).map((page) => ({\n href: LEGAL_HREFS[page],\n label: labels.links[page],\n }));\n}\n\n/**\n * The legal pages as a row of quiet links, the one you are on marked (kastlan's\n * `LegalLinks`). Wraps on a phone.\n *\n * 0.28: `·` separators between the links, keksdose's footer style, wherever the links\n * appear — the account menu included (§3.3). The dots are `aria-hidden`: a screen reader\n * already hears three links, and \"middle dot\" between them is noise. They are flex items\n * of the row like the links, so the row's gap spaces them evenly.\n */\nexport function LegalLinks({\n links,\n currentHref,\n nav = true,\n onLinkClick,\n labels: labelsProp,\n className,\n}: LegalLinksProps) {\n const labels = useLegalLabels(labelsProp);\n const shown = links ?? defaultLinks(labels);\n const items = shown.flatMap((link, i) => [\n ...(i > 0 ? [<span key={`sep-${link.href}`} aria-hidden=\"true\">·</span>] : []),\n <TextLink key={link.href} href={link.href} tone=\"muted\" current={link.href === currentHref} onClick={onLinkClick}>\n {link.label}\n </TextLink>,\n ]);\n const rowClass = cn(\"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs\", className);\n if (!nav) return <div className={rowClass}>{items}</div>;\n return (\n <nav aria-label={labels.navLabel} className={rowClass}>\n {items}\n </nav>\n );\n}\n\n// ── Footer ────────────────────────────────────────────────────────────────────\n\nexport interface LegalFooterProps {\n /** Under the links, centred — the app's tagline (keksdose: \"Self-hosted household\n * budgeting & bookkeeping.\"). */\n children?: ReactNode;\n /** Default: the three routes with the kit's link labels — see {@link LegalLinks}. */\n links?: readonly LegalLink[];\n /** Marks that link `aria-current=\"page\"`. {@link LegalPage}'s default footer passes\n * its own page. */\n currentHref?: string;\n /**\n * Default true: the footer is a `<footer>`. `false` draws a `<div>` — for a host that is\n * a footer already: `AuthLayout`'s `footer` slot is one, and HTML forbids a footer inside\n * a footer (0.28.1, kastlan). On an `AuthLayout` page the usual choice is simpler still:\n * `footer={<LegalLinks nav={false} />}` with `footerLabel` set to the kit's `navLabel`\n * ({@link useLegalLabels}).\n */\n landmark?: boolean;\n className?: string;\n labels?: LabelOverride<LegalLabels>;\n}\n\n/**\n * The public footer (§3.3): the three links, centred, with their separators, in a\n * `<nav aria-label=\"Legal\">` — on the landing or home page, every signed-out page the app\n * has, the legal pages and the 404. The rule behind it: from every page a signed-out\n * visitor can reach, the three links are one click away.\n *\n * keksdose's `SiteFooter` (features/landing/site-footer.tsx), which carried them on its\n * landing, auth, legal and 404 pages; kastlan and Kurvenschmiede had them on some pages\n * only. Its palette classes (`border-slate-200 bg-white dark:…`) became the surface and\n * border tokens, so it follows the theme like the rest of the kit.\n */\nexport function LegalFooter({ children, links, currentHref, landmark = true, className, labels }: LegalFooterProps) {\n const Root = landmark ? \"footer\" : \"div\";\n return (\n <Root className={cn(\"border-t border-[var(--border)] bg-[var(--bg-surface)]\", className)}>\n <div className=\"mx-auto max-w-5xl px-4 py-8 text-sm text-[var(--text-muted)]\">\n <LegalLinks\n links={links}\n currentHref={currentHref}\n labels={labels}\n className=\"justify-center gap-y-2 text-sm\"\n />\n {children !== undefined && children !== null && <p className=\"mt-4 text-center\">{children}</p>}\n </div>\n </Root>\n );\n}\n\n// ── Section ───────────────────────────────────────────────────────────────────\n\nexport interface LegalSectionProps {\n heading: ReactNode;\n /** Running text. Line breaks in it are kept (`white-space: pre-line`), so a\n * translation can hold an address or a list as plain lines. Inside a\n * {@link LegalPage}, `{ref:key}` becomes the number of section `key`, linked. */\n body?: string;\n /** Anything richer than plain text — links, a list — after `body`. A plain string\n * here has its `{ref:key}` tokens resolved too. */\n children?: ReactNode;\n /**\n * The section's `id`, for a link to it from elsewhere. Inside a {@link LegalPage} it\n * defaults to the element's React `key` — keksdose's\n * `SECTIONS.map((s) => <LegalSection key={s} … />)` gets `id=\"retention\"` with\n * nothing added — and it is the key a `{ref:…}` names.\n */\n id?: string;\n /** The heading's element. Default `h2` under the layout's `h1` (inside a\n * `LegalPage`, one level below its title). */\n headingAs?: \"h2\" | \"h3\";\n}\n\n/**\n * One section: heading and running text.\n *\n * 0.28, inside a {@link LegalPage}: its `id` (the `key` unless given), its number on the\n * privacy policy and the terms (\"3. Legal basis\" — titles carry no number, §4.1), and\n * `{ref:key}` resolution in `body`. Outside one it is exactly the 0.19 section.\n */\nexport function LegalSection({ heading, body, children, id: idProp, headingAs }: LegalSectionProps) {\n const page = useContext(LegalPageContext);\n const slot = useContext(LegalSlotContext);\n const id = idProp ?? slot?.id;\n const number = slot?.number;\n const Heading = headingAs ?? page?.sectionHeading ?? \"h2\";\n return (\n <section id={id} className=\"scroll-mt-20\">\n <Heading className=\"text-lg font-semibold break-words text-[var(--text-primary)]\">\n {number !== undefined && `${number}. `}\n {heading}\n </Heading>\n <LegalSlotContext.Provider value={null}>\n {body !== undefined && (\n <LegalText text={body} className=\"mt-2 text-sm leading-relaxed text-[var(--text-secondary)]\" />\n )}\n {children !== undefined && (\n <div className=\"mt-2 text-sm leading-relaxed break-words text-[var(--text-secondary)]\">\n {typeof children === \"string\" ? resolveLegalRefs(children, page) : children}\n </div>\n )}\n </LegalSlotContext.Provider>\n </section>\n );\n}\n\n// ── Layout ────────────────────────────────────────────────────────────────────\n\nexport interface LegalLayoutProps {\n /** \"Imprint\", \"Privacy Policy\", \"Terms\". */\n title: ReactNode;\n /** Above the title — the app's \"← Back\" link (`<TextLink icon={ArrowLeft}>`). Inside\n * a {@link LegalPage}, \"← Back to home\". */\n back?: ReactNode;\n /**\n * A notice under the title, as a warning banner with `role=\"note\"` — page furniture,\n * not an alert. Per page, not per layout: the privacy page says something more precise\n * than the others (its technical sections describe running code).\n */\n notice?: ReactNode;\n /** 0.28.1: under the title, before the notice — {@link LegalPage}'s note that this\n * page is a translation and which language is binding. */\n translationNote?: ReactNode;\n /** The sections — {@link LegalSection}s. */\n children: ReactNode;\n /** The three pages, linked at the end of the column with the current one marked.\n * Leave out when the page's chrome already shows them (a {@link LegalFooter}). */\n links?: readonly LegalLink[];\n currentHref?: string;\n /** Default `h1`: the page's heading. */\n headingAs?: \"h1\" | \"h2\";\n /** Extra classes on the column — `px-0 py-0` inside a chrome that pads already. */\n className?: string;\n labels?: LabelOverride<LegalLabels>;\n}\n\nexport function LegalLayout({\n title,\n back,\n notice,\n translationNote,\n children,\n links,\n currentHref,\n headingAs: Heading = \"h1\",\n className,\n labels,\n}: LegalLayoutProps) {\n return (\n <article className={cn(\"mx-auto w-full max-w-3xl px-4 py-12\", className)}>\n {back !== undefined && <div className=\"mb-4 text-sm\">{back}</div>}\n <Heading className=\"text-3xl font-bold tracking-tight break-words text-[var(--text-primary)]\">{title}</Heading>\n {translationNote !== undefined && translationNote !== null && <div className=\"mt-3\">{translationNote}</div>}\n {notice !== undefined && notice !== null && (\n <AlertBanner tone=\"warning\" role=\"note\" className=\"mt-4\">\n {notice}\n </AlertBanner>\n )}\n <div className=\"mt-8 space-y-8\">{children}</div>\n {links !== undefined && links.length > 0 && (\n <LegalLinks links={links} currentHref={currentHref} labels={labels} className=\"mt-12 border-t border-[var(--border)] pt-4\" />\n )}\n </article>\n );\n}\n"],"mappings":";AA6ZQ,cAmIF,YAnIE;AA7ZR,SAAS,eAAe,kBAAkB;AAG1C,SAAS,oBAAoB;AAE7B,SAAS,UAAU;AACnB,SAAS,mBAAmB;AAC5B,SAAS,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B,QAAQ,oBAAC,SAAI,WAAU,QAAQ,2BAAgB;AAAA,IACpG,WAAW,UAAa,WAAW,QAClC,oBAAC,eAAY,MAAK,WAAU,MAAK,QAAO,WAAU,QAC/C,kBACH;AAAA,IAEF,oBAAC,SAAI,WAAU,kBAAkB,UAAS;AAAA,IACzC,UAAU,UAAa,MAAM,SAAS,KACrC,oBAAC,cAAW,OAAc,aAA0B,QAAgB,WAAU,8CAA6C;AAAA,KAE/H;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/legal.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\nimport type { MouseEvent, ReactNode } from \"react\";\n\nimport { useKitLabels } from \"../i18n/kit-labels\";\nimport type { LabelOverride } from \"../i18n/kit-labels\";\nimport { cn } from \"../lib/cn\";\nimport { countryName } from \"../lib/countries\";\nimport { AlertBanner } from \"./alert-banner\";\nimport { TextLink } from \"./text-link\";\nimport { DEFAULT_LEGAL_LABELS } from \"./legal-labels\";\n\n/**\n * The legal pages — Imprint, Privacy Policy, Terms — for every app.\n *\n * 0.19 (docs/i18n-harmonization.md H10): keksdose and kastlan each carried the same\n * shell, written twice: a back link, the title, a \"closed beta, not yet reviewed by a\n * lawyer\" notice, sections of heading + running text, and kastlan's row of links to the\n * three pages with the current one marked. That shape moved here; the words stayed in\n * each app.\n *\n * 0.28 (docs/legal-harmonization.md) reverses the second half: the wording that is the\n * same in all three apps is the kit's too, in all seven languages, so there is ONE text\n * to change after the lawyer's review instead of three apps drifting apart sentence by\n * sentence. This module holds the labels (every kit-owned legal word, §4.3/§4.4), the\n * column (`LegalLayout`), the section (`LegalSection`, now numbered and cross-referenced\n * inside a `LegalPage`), the links row and the public footer. The page frame, the\n * kit-owned sections and the terms checkbox are in `./legal-page`.\n *\n * `LegalLayout` stays a CONTENT COLUMN, not a page: before 0.28 keksdose showed it inside\n * its public landing header and footer and kastlan inside `AuthLayout`. `LegalPage` is\n * the frame around it that the contract (§3.2) settled on — keksdose's.\n */\n\n// ── The operator ──────────────────────────────────────────────────────────────\n\n/** The three pages, by the key every app uses for them (§4.1). Kurvenschmiede's\n * `imprint` became `impressum`. */\nexport type LegalPageKey = \"impressum\" | \"privacy\" | \"terms\";\n\n/** The three routes (§3.1): one per page, the language from i18n, no per-language URLs. */\nexport const LEGAL_HREFS: Readonly<Record<LegalPageKey, string>> = Object.freeze({\n impressum: \"/impressum\",\n privacy: \"/privacy\",\n terms: \"/terms\",\n});\n\n/**\n * Who runs the app — the values the kit's legal sections are filled in with (§5).\n *\n * The kit holds NO personal data: every app passes the same values once, to\n * {@link LegalPage}'s `operator`. Plain strings, so the app's config or env can hold them.\n */\nexport interface LegalOperator {\n /** The operator's name, as the imprint prints it. */\n name: string;\n /** \"9470\"-shaped; printed before the city. */\n postalCode: string;\n /** The place — the imprint's address line and the terms' place of jurisdiction. */\n city: string;\n /** The canton or state, abbreviated as the place of jurisdiction writes it: \"SG\". */\n region: string;\n /**\n * ISO 3166-1 alpha-2: \"CH\". A CODE, not a name — the kit names it in the page's\n * language (`Intl.DisplayNames`, see `countryName`), so \"Switzerland\", \"Schweiz\",\n * \"Suisse\" and \"瑞士\" all come from one value.\n */\n country: string;\n /** The contact address the imprint and the privacy policy print. */\n email: string;\n /**\n * The language whose version of the legal texts is BINDING (\"de-CH\"), a BCP 47 code\n * (0.28.1, Marcel 2026-10-05). The lawyer reviews that one; the others are translations\n * for convenience. With it, {@link LegalPage} shows a note on every page read in\n * another language, and the terms' `language` section says which version prevails.\n * Only the language subtag counts: \"de-CH\" and \"de\" are the same language here.\n */\n bindingLanguage?: string;\n}\n\n/**\n * The operator as the kit's texts read it: {@link LegalOperator} with `country` already\n * NAMED in the page's language (\"Schweiz\", not \"CH\").\n *\n * The label functions take this rather than the code so they stay pure string functions\n * of plain values, like every other function label in the kit: a catalogue never calls\n * `Intl`, and a review row can be rendered from placeholders (`{{country}}`).\n */\nexport type LegalOperatorText = Readonly<Record<keyof LegalOperator, string>>;\n\n/** The language subtag of a BCP 47 code, lower-cased: \"de-CH\" → \"de\". */\nexport function baseLanguage(code: string): string {\n return code.split(/[-_]/)[0]!.toLowerCase();\n}\n\nconst languageNamers = new Map<string, Intl.DisplayNames | null>();\n\n/** The name of a language in `locale` — \"Deutsch\", \"German\", \"allemand\", \"德语\" — from its\n * language subtag, so \"de-CH\" is plain \"German\", not \"Swiss High German\". The code itself\n * when the runtime cannot name it. */\nfunction languageName(code: string, locale: string): string {\n let namer = languageNamers.get(locale);\n if (namer === undefined) {\n try {\n namer = new Intl.DisplayNames([locale], { type: \"language\" });\n } catch {\n namer = null;\n }\n languageNamers.set(locale, namer);\n }\n const base = baseLanguage(code);\n try {\n return namer?.of(base) ?? base;\n } catch {\n return base;\n }\n}\n\n/** @internal The operator as the texts read it: its country named in `locale` (English\n * without one — `countryName`'s rule, so an app that set no locale reads English). */\nexport function legalOperatorText(operator: LegalOperator, locale: string = \"en\"): LegalOperatorText {\n return {\n ...operator,\n country: countryName(operator.country, locale),\n bindingLanguage: operator.bindingLanguage ? languageName(operator.bindingLanguage, locale) : \"\",\n };\n}\n\n// ── Labels ────────────────────────────────────────────────────────────────────\n\n/** A kit section whose text is fixed: a heading and one body. */\nexport interface LegalTextSectionLabels {\n title: string;\n body: string;\n}\n\n/**\n * 0.32.0: the imprint's disclaimer, with the body of its COMMERCIAL variant\n * (docs/billing-harmonization.md §8; legal decision 7). The title is the same in both:\n * liability for content and links is the subject either way.\n */\nexport interface LegalDisclaimerSectionLabels extends LegalTextSectionLabels {\n /**\n * The body for `<LegalKitSection section=\"disclaimer\" variant=\"commercial\">`: a paid\n * service sold through a Merchant of Record, which sells in its own name (§2.2), so the\n * \"private, non-commercial … closed beta\" of `body` would be untrue. OPTIONAL, as every\n * key added to a namespace an app may annotate: left out, the provider's, then English.\n */\n commercial?: string;\n}\n\n/** A kit section whose text names the operator (§4.3 `{name}`, `{email}`, …). */\nexport interface LegalOperatorSectionLabels {\n title: string;\n /** Called with the operator, its country already named in the page's language. Line\n * breaks are kept (`white-space: pre-line`): an address is plain lines. */\n body: (operator: LegalOperatorText) => string;\n}\n\n/** A kit section with an app slot (or a list) between its two parts. */\nexport interface LegalFramedSectionLabels {\n title: string;\n /** Before the app's part. */\n lead: string;\n /** After it. */\n tail: string;\n}\n\n/**\n * Every word of the legal pages that is the kit's — docs/legal-harmonization.md §4.3 and\n * §4.4, verbatim. English, British spelling; the other six languages are in the\n * catalogues (`@eifi1/ui-kit/i18n/<code>`).\n *\n * Keys follow the contract: `sections.<page>.<section key>`, the section keys being\n * keksdose's (`legal_basis`, not `legalBasis`), because the same key is the section's\n * `id` (`/privacy#legal_basis`) and the app's own sections sit beside these under the\n * same names in its catalogue. Titles carry NO number: {@link LegalPage} numbers the\n * privacy and terms sections in render order (§4.1).\n */\nexport interface LegalLabels {\n /** The accessible name of {@link LegalLinks}' and {@link LegalFooter}'s `<nav>`. */\n navLabel: string;\n /** The short labels of the three links, everywhere the links appear (§3.3). */\n links: Record<LegalPageKey, string>;\n /** The pages' titles — the `<h1>`, and the links of the terms checkbox. */\n titles: Record<LegalPageKey, string>;\n /** The back link above the title: \"← Back to home\". */\n backHome: string;\n /**\n * The terms checkbox (§3.4) — ONE template with `{terms}` and `{privacy}`, which\n * become the links (named with `titles`). Not a prefix plus a joiner: a language puts\n * the links where its grammar wants them, articles included, and nothing is added\n * around a placeholder — Italian elides, \"e l’{privacy}\", with no space.\n */\n accept: string;\n /** The notice under the title (§3.2): `beta` on the imprint and the terms, `privacy`\n * on the privacy policy. */\n notice: {\n beta: string;\n privacy: string;\n };\n /**\n * 0.28.1: on a page read in another language than the operator's `bindingLanguage` —\n * `note` under the title, `show` on the button that switches to the binding version\n * (when the app passes `onShowBindingLanguage`). `o.bindingLanguage` is the binding\n * language's NAME in the reader's language (\"German\", \"allemand\").\n */\n translation: {\n note: (o: LegalOperatorText) => string;\n show: (o: LegalOperatorText) => string;\n };\n /** The kit's sections (§4.3), by page and section key. */\n sections: {\n impressum: {\n operator: LegalOperatorSectionLabels;\n contact: LegalOperatorSectionLabels;\n /** `body` is the default, non-commercial text; `commercial` the 0.32 variant. */\n disclaimer: LegalDisclaimerSectionLabels;\n };\n privacy: {\n controller: LegalOperatorSectionLabels;\n /** The app's paragraph follows the body (§4.2): consent, where an app relies on it. */\n legal_basis: LegalTextSectionLabels;\n /** `lead`, then the app's entries as a list, then `tail`, then the app's paragraph. */\n browser: LegalFramedSectionLabels;\n /** `lead` (the rights), then the app's paragraph (export, deletion), then `tail`\n * (the supervisory authorities). */\n rights: LegalFramedSectionLabels;\n contact: LegalOperatorSectionLabels;\n };\n terms: {\n warranty: LegalTextSectionLabels;\n liability: LegalTextSectionLabels;\n changes: LegalTextSectionLabels;\n /** 0.28.1: which language's version prevails — `o.bindingLanguage`, named. */\n language: LegalOperatorSectionLabels;\n /** The place of jurisdiction is the operator's `{city} ({region}), {country}`. */\n law: LegalOperatorSectionLabels;\n };\n };\n}\n\n// Defined in ./legal-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_LEGAL_LABELS };\n\n/** The `legal` namespace, resolved: defaults < provider < `labels` prop. The prop may be\n * partial at every depth (`{ titles: { terms: \"…\" } }`), as the provider's is. */\nexport function useLegalLabels(labels?: LabelOverride<LegalLabels>): LegalLabels {\n return useKitLabels(\"legal\", DEFAULT_LEGAL_LABELS, labels);\n}\n\n// ── What a LegalPage tells the sections inside it ─────────────────────────────\n\n/** Where a `{ref:key}` points: the section's number on a numbered page, else its heading. */\nexport interface LegalRefTarget {\n number?: number;\n heading: ReactNode;\n}\n\n/** @internal Set by `LegalPage` around its column; `null` outside one. */\nexport interface LegalPageContextValue {\n page: LegalPageKey;\n /** The operator with its country named — what the kit sections are filled in with. */\n operator: LegalOperatorText;\n /** The heading level of a section that does not choose one: one below the title. */\n sectionHeading: \"h2\" | \"h3\";\n /** Every section's key, in render order — known BEFORE any section renders, so a\n * reference can point forward (keksdose's section 2 refers to section 10). */\n targets: ReadonlyMap<string, LegalRefTarget>;\n}\n\n/** @internal */\nexport const LegalPageContext = createContext<LegalPageContextValue | null>(null);\n\n/** @internal The place `LegalPage` gave one section: its key and its number. Reset to\n * `null` inside a section, so a section nested in another's children takes neither. */\nexport interface LegalSectionSlot {\n id?: string;\n number?: number;\n}\n\n/** @internal */\nexport const LegalSlotContext = createContext<LegalSectionSlot | null>(null);\n\n/** @internal `{ref:retention}`. A key is a section key: letters, digits, `_` and `-`. */\nconst REF_TOKEN = /\\{ref:([A-Za-z0-9_-]+)\\}/g;\n\n/**\n * A development build's console note — never in production (the consumer's bundler\n * makes `import.meta.env.DEV` false) and never under vitest. Optional-chained:\n * `import.meta.env` is a Vite injection, absent under plain Node.\n */\nfunction devWarnings(): boolean {\n return Boolean(import.meta.env?.DEV) && !import.meta.env?.VITEST;\n}\nconst warned = new Set<string>();\n/** @internal Once per message. */\nexport function warnLegalOnce(message: string): void {\n if (!devWarnings() || warned.has(message)) return;\n warned.add(message);\n console.warn(`[ui-kit] ${message}`);\n}\n\n/**\n * `text` with every `{ref:key}` replaced by a link to `#key` that reads the section's\n * number — the words around it stay the app's (\"see section {ref:retention}\", \"siehe\n * Abschnitt {ref:retention}\"), so each language keeps its grammar (§4.1). On the imprint,\n * which is not numbered, the link reads the section's heading instead.\n *\n * Outside a {@link LegalPage} the text is returned as it is: there is no order to count.\n * A key the page has no section for stays visible as the raw token — a broken reference\n * an app test can find (`not.toHaveTextContent(\"{ref:\")`), not a silently wrong number.\n */\nexport function resolveLegalRefs(text: string, page: LegalPageContextValue | null): ReactNode {\n if (!page || !text.includes(\"{ref:\")) return text;\n const out: ReactNode[] = [];\n let last = 0;\n for (const match of text.matchAll(REF_TOKEN)) {\n const at = match.index ?? 0;\n if (at > last) out.push(text.slice(last, at));\n const key = match[1];\n const target = page.targets.get(key);\n if (target) {\n out.push(\n <TextLink key={`${key}@${at}`} href={`#${key}`}>\n {target.number ?? target.heading}\n </TextLink>,\n );\n } else {\n warnLegalOnce(`{ref:${key}} on the ${page.page} page points at no section of it.`);\n out.push(match[0]);\n }\n last = at + match[0].length;\n }\n if (last < text.length) out.push(text.slice(last));\n return out;\n}\n\n/** @internal Running text — one translation string — with its line breaks kept and its\n * `{ref:key}` tokens resolved. */\nexport function LegalText({ text, className }: { text: string; className?: string }) {\n const page = useContext(LegalPageContext);\n // `break-words`: an address, an email or a URL in a translation is one long word, and\n // on a 390px phone it would push the column wider than the screen.\n return <p className={cn(\"whitespace-pre-line break-words\", className)}>{resolveLegalRefs(text, page)}</p>;\n}\n\n// ── Links ─────────────────────────────────────────────────────────────────────\n\nexport interface LegalLink {\n href: string;\n /** \"Imprint\", \"Privacy Policy\", \"Terms\". */\n label: ReactNode;\n}\n\nexport interface LegalLinksProps {\n /** Default (0.28): the three routes, `/impressum`, `/privacy` and `/terms`, with the\n * kit's short link labels (`legal.links`), in the contract's order. */\n links?: readonly LegalLink[];\n /** The page being shown; its link is marked `aria-current=\"page\"`. Usually the\n * router's pathname. */\n currentHref?: string;\n /** `false` renders the links without the `<nav>` landmark — inside `AuthLayout`'s\n * `footer` or `TopBarActionMenu`'s `footer`, which are named `<nav>`s already. The row\n * keeps its spacing and `className` either way (0.27.1: it used to return the bare\n * links, so in a plain container — Kurvenschmiede's account-menu `<li>` — they ran\n * together as \"ImpressumDatenschutzerklärungNutz…\" and overflowed). Default true. */\n nav?: boolean;\n /** Called on a click on any of the links, before it navigates — an account menu closes\n * itself here (0.28.1, keksdose: it had to catch the click on a wrapping `<div>`). */\n onLinkClick?: (event: MouseEvent<HTMLAnchorElement>) => void;\n labels?: LabelOverride<LegalLabels>;\n className?: string;\n}\n\n/** The default links: the three routes under the kit's short labels. */\nfunction defaultLinks(labels: LegalLabels): LegalLink[] {\n return ([\"impressum\", \"privacy\", \"terms\"] as const).map((page) => ({\n href: LEGAL_HREFS[page],\n label: labels.links[page],\n }));\n}\n\n/**\n * The legal pages as a row of quiet links, the one you are on marked (kastlan's\n * `LegalLinks`). Wraps on a phone.\n *\n * 0.28: `·` separators between the links, keksdose's footer style, wherever the links\n * appear — the account menu included (§3.3). The dots are `aria-hidden`: a screen reader\n * already hears three links, and \"middle dot\" between them is noise. They are flex items\n * of the row like the links, so the row's gap spaces them evenly.\n */\nexport function LegalLinks({\n links,\n currentHref,\n nav = true,\n onLinkClick,\n labels: labelsProp,\n className,\n}: LegalLinksProps) {\n const labels = useLegalLabels(labelsProp);\n const shown = links ?? defaultLinks(labels);\n const items = shown.flatMap((link, i) => [\n ...(i > 0 ? [<span key={`sep-${link.href}`} aria-hidden=\"true\">·</span>] : []),\n <TextLink key={link.href} href={link.href} tone=\"muted\" current={link.href === currentHref} onClick={onLinkClick}>\n {link.label}\n </TextLink>,\n ]);\n const rowClass = cn(\"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs\", className);\n if (!nav) return <div className={rowClass}>{items}</div>;\n return (\n <nav aria-label={labels.navLabel} className={rowClass}>\n {items}\n </nav>\n );\n}\n\n// ── Footer ────────────────────────────────────────────────────────────────────\n\nexport interface LegalFooterProps {\n /** Under the links, centred — the app's tagline (keksdose: \"Self-hosted household\n * budgeting & bookkeeping.\"). */\n children?: ReactNode;\n /** Default: the three routes with the kit's link labels — see {@link LegalLinks}. */\n links?: readonly LegalLink[];\n /** Marks that link `aria-current=\"page\"`. {@link LegalPage}'s default footer passes\n * its own page. */\n currentHref?: string;\n /**\n * Default true: the footer is a `<footer>`. `false` draws a `<div>` — for a host that is\n * a footer already: `AuthLayout`'s `footer` slot is one, and HTML forbids a footer inside\n * a footer (0.28.1, kastlan). On an `AuthLayout` page the usual choice is simpler still:\n * `footer={<LegalLinks nav={false} />}` with `footerLabel` set to the kit's `navLabel`\n * ({@link useLegalLabels}).\n */\n landmark?: boolean;\n className?: string;\n labels?: LabelOverride<LegalLabels>;\n}\n\n/**\n * The public footer (§3.3): the three links, centred, with their separators, in a\n * `<nav aria-label=\"Legal\">` — on the landing or home page, every signed-out page the app\n * has, the legal pages and the 404. The rule behind it: from every page a signed-out\n * visitor can reach, the three links are one click away.\n *\n * keksdose's `SiteFooter` (features/landing/site-footer.tsx), which carried them on its\n * landing, auth, legal and 404 pages; kastlan and Kurvenschmiede had them on some pages\n * only. Its palette classes (`border-slate-200 bg-white dark:…`) became the surface and\n * border tokens, so it follows the theme like the rest of the kit.\n */\nexport function LegalFooter({ children, links, currentHref, landmark = true, className, labels }: LegalFooterProps) {\n const Root = landmark ? \"footer\" : \"div\";\n return (\n <Root className={cn(\"border-t border-subtle bg-surface\", className)}>\n <div className=\"mx-auto max-w-5xl px-4 py-8 text-sm text-muted\">\n <LegalLinks\n links={links}\n currentHref={currentHref}\n labels={labels}\n className=\"justify-center gap-y-2 text-sm\"\n />\n {children !== undefined && children !== null && <p className=\"mt-4 text-center\">{children}</p>}\n </div>\n </Root>\n );\n}\n\n// ── Section ───────────────────────────────────────────────────────────────────\n\nexport interface LegalSectionProps {\n heading: ReactNode;\n /** Running text. Line breaks in it are kept (`white-space: pre-line`), so a\n * translation can hold an address or a list as plain lines. Inside a\n * {@link LegalPage}, `{ref:key}` becomes the number of section `key`, linked. */\n body?: string;\n /** Anything richer than plain text — links, a list — after `body`. A plain string\n * here has its `{ref:key}` tokens resolved too. */\n children?: ReactNode;\n /**\n * The section's `id`, for a link to it from elsewhere. Inside a {@link LegalPage} it\n * defaults to the element's React `key` — keksdose's\n * `SECTIONS.map((s) => <LegalSection key={s} … />)` gets `id=\"retention\"` with\n * nothing added — and it is the key a `{ref:…}` names.\n */\n id?: string;\n /** The heading's element. Default `h2` under the layout's `h1` (inside a\n * `LegalPage`, one level below its title). */\n headingAs?: \"h2\" | \"h3\";\n}\n\n/**\n * One section: heading and running text.\n *\n * 0.28, inside a {@link LegalPage}: its `id` (the `key` unless given), its number on the\n * privacy policy and the terms (\"3. Legal basis\" — titles carry no number, §4.1), and\n * `{ref:key}` resolution in `body`. Outside one it is exactly the 0.19 section.\n */\nexport function LegalSection({ heading, body, children, id: idProp, headingAs }: LegalSectionProps) {\n const page = useContext(LegalPageContext);\n const slot = useContext(LegalSlotContext);\n const id = idProp ?? slot?.id;\n const number = slot?.number;\n const Heading = headingAs ?? page?.sectionHeading ?? \"h2\";\n return (\n <section id={id} className=\"scroll-mt-20\">\n <Heading className=\"text-lg font-semibold break-words text-primary\">\n {number !== undefined && `${number}. `}\n {heading}\n </Heading>\n <LegalSlotContext.Provider value={null}>\n {body !== undefined && (\n <LegalText text={body} className=\"mt-2 text-sm leading-relaxed text-secondary\" />\n )}\n {children !== undefined && (\n <div className=\"mt-2 text-sm leading-relaxed break-words text-secondary\">\n {typeof children === \"string\" ? resolveLegalRefs(children, page) : children}\n </div>\n )}\n </LegalSlotContext.Provider>\n </section>\n );\n}\n\n// ── Layout ────────────────────────────────────────────────────────────────────\n\nexport interface LegalLayoutProps {\n /** \"Imprint\", \"Privacy Policy\", \"Terms\". */\n title: ReactNode;\n /** Above the title — the app's \"← Back\" link (`<TextLink icon={ArrowLeft}>`). Inside\n * a {@link LegalPage}, \"← Back to home\". */\n back?: ReactNode;\n /**\n * A notice under the title, as a warning banner with `role=\"note\"` — page furniture,\n * not an alert. Per page, not per layout: the privacy page says something more precise\n * than the others (its technical sections describe running code).\n */\n notice?: ReactNode;\n /** 0.28.1: under the title, before the notice — {@link LegalPage}'s note that this\n * page is a translation and which language is binding. */\n translationNote?: ReactNode;\n /** The sections — {@link LegalSection}s. */\n children: ReactNode;\n /** The three pages, linked at the end of the column with the current one marked.\n * Leave out when the page's chrome already shows them (a {@link LegalFooter}). */\n links?: readonly LegalLink[];\n currentHref?: string;\n /** Default `h1`: the page's heading. */\n headingAs?: \"h1\" | \"h2\";\n /** Extra classes on the column — `px-0 py-0` inside a chrome that pads already. */\n className?: string;\n labels?: LabelOverride<LegalLabels>;\n}\n\nexport function LegalLayout({\n title,\n back,\n notice,\n translationNote,\n children,\n links,\n currentHref,\n headingAs: Heading = \"h1\",\n className,\n labels,\n}: LegalLayoutProps) {\n return (\n <article className={cn(\"mx-auto w-full max-w-3xl px-4 py-12\", className)}>\n {back !== undefined && <div className=\"mb-4 text-sm\">{back}</div>}\n <Heading className=\"text-3xl font-bold tracking-tight break-words text-primary\">{title}</Heading>\n {translationNote !== undefined && translationNote !== null && <div className=\"mt-3\">{translationNote}</div>}\n {notice !== undefined && notice !== null && (\n <AlertBanner tone=\"warning\" role=\"note\" className=\"mt-4\">\n {notice}\n </AlertBanner>\n )}\n <div className=\"mt-8 space-y-8\">{children}</div>\n {links !== undefined && links.length > 0 && (\n <LegalLinks links={links} currentHref={currentHref} labels={labels} className=\"mt-12 border-t border-subtle pt-4\" />\n )}\n </article>\n );\n}\n"],"mappings":";AAmUQ,cAmIF,YAnIE;AAnUR,SAAS,eAAe,kBAAkB;AAG1C,SAAS,oBAAoB;AAE7B,SAAS,UAAU;AACnB,SAAS,mBAAmB;AAC5B,SAAS,mBAAmB;AAC5B,SAAS,gBAAgB;AACzB,SAAS,4BAA4B;AA+B9B,MAAM,cAAsD,OAAO,OAAO;AAAA,EAC/E,WAAW;AAAA,EACX,SAAS;AAAA,EACT,OAAO;AACT,CAAC;AA8CM,SAAS,aAAa,MAAsB;AACjD,SAAO,KAAK,MAAM,MAAM,EAAE,CAAC,EAAG,YAAY;AAC5C;AAEA,MAAM,iBAAiB,oBAAI,IAAsC;AAKjE,SAAS,aAAa,MAAc,QAAwB;AAC1D,MAAI,QAAQ,eAAe,IAAI,MAAM;AACrC,MAAI,UAAU,QAAW;AACvB,QAAI;AACF,cAAQ,IAAI,KAAK,aAAa,CAAC,MAAM,GAAG,EAAE,MAAM,WAAW,CAAC;AAAA,IAC9D,QAAQ;AACN,cAAQ;AAAA,IACV;AACA,mBAAe,IAAI,QAAQ,KAAK;AAAA,EAClC;AACA,QAAM,OAAO,aAAa,IAAI;AAC9B,MAAI;AACF,WAAO,OAAO,GAAG,IAAI,KAAK;AAAA,EAC5B,QAAQ;AACN,WAAO;AAAA,EACT;AACF;AAIO,SAAS,kBAAkB,UAAyB,SAAiB,MAAyB;AACnG,SAAO;AAAA,IACL,GAAG;AAAA,IACH,SAAS,YAAY,SAAS,SAAS,MAAM;A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AK,QAAO,WAAU,QAC/C,kBACH;AAAA,IAEF,oBAAC,SAAI,WAAU,kBAAkB,UAAS;AAAA,IACzC,UAAU,UAAa,MAAM,SAAS,KACrC,oBAAC,cAAW,OAAc,aAA0B,QAAgB,WAAU,qCAAoC;AAAA,KAEtH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const DEFAULT_LIGHTBOX_LABELS = {
|
|
3
|
+
dialog: "Image viewer",
|
|
4
|
+
close: "Close",
|
|
5
|
+
previous: "Previous image",
|
|
6
|
+
next: "Next image",
|
|
7
|
+
counter: (index, count) => `${index} / ${count}`,
|
|
8
|
+
position: (index, count) => `Image ${index} of ${count}`,
|
|
9
|
+
download: "Download",
|
|
10
|
+
zoom: "Zoom",
|
|
11
|
+
noPreview: "No preview available for this file",
|
|
12
|
+
openInNewTab: "Open in new tab"
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
DEFAULT_LIGHTBOX_LABELS
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=lightbox-labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/lightbox-labels.ts"],"sourcesContent":["// The English words of ./lightbox, 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). ./lightbox re-exports them.\n\nimport type { LightboxLabels } from \"./lightbox\";\n\nexport const DEFAULT_LIGHTBOX_LABELS: LightboxLabels = {\n dialog: \"Image viewer\",\n close: \"Close\",\n previous: \"Previous image\",\n next: \"Next image\",\n counter: (index, count) => `${index} / ${count}`,\n position: (index, count) => `Image ${index} of ${count}`,\n download: \"Download\",\n zoom: \"Zoom\",\n noPreview: \"No preview available for this file\",\n openInNewTab: \"Open in new tab\",\n};\n"],"mappings":";AAMO,MAAM,0BAA0C;AAAA,EACrD,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,UAAU;AAAA,EACV,MAAM;AAAA,EACN,SAAS,CAAC,OAAO,UAAU,GAAG,KAAK,MAAM,KAAK;AAAA,EAC9C,UAAU,CAAC,OAAO,UAAU,SAAS,KAAK,OAAO,KAAK;AAAA,EACtD,UAAU;AAAA,EACV,MAAM;AAAA,EACN,WAAW;AAAA,EACX,cAAc;AAChB;","names":[]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { AuthedFetcher } from
|
|
4
|
-
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import { type LabelOverride } from "../i18n/kit-labels.js";
|
|
3
|
+
import type { AuthedFetcher } from "../hooks/use-authed-src.js";
|
|
4
|
+
import { DEFAULT_LIGHTBOX_LABELS } from "./lightbox-labels.js";
|
|
5
5
|
/** `image`: shown as a picture. `file`: anything a browser cannot put in an `<img>` —
|
|
6
6
|
* a floor plan uploaded as a PDF — shown as a file card with open and download. */
|
|
7
|
-
type ImageItemKind = "image" | "file";
|
|
8
|
-
interface ImageItem {
|
|
7
|
+
export type ImageItemKind = "image" | "file";
|
|
8
|
+
export interface ImageItem {
|
|
9
9
|
/** React key. Defaults to `src`. */
|
|
10
10
|
key?: string | number;
|
|
11
11
|
/** The full-size file — what the lightbox shows and downloads. An API path when the
|
|
@@ -27,8 +27,8 @@ interface ImageItem {
|
|
|
27
27
|
}
|
|
28
28
|
/** What an item is, from what is known about it WITHOUT fetching it — see
|
|
29
29
|
* {@link ImageItem.kind}. `fetchedType` is the blob's type once it is in. */
|
|
30
|
-
declare function imageItemKind(item: ImageItem, fetchedType?: string): ImageItemKind;
|
|
31
|
-
interface LightboxLabels {
|
|
30
|
+
export declare function imageItemKind(item: ImageItem, fetchedType?: string): ImageItemKind;
|
|
31
|
+
export interface LightboxLabels {
|
|
32
32
|
/** The dialog's accessible name. */
|
|
33
33
|
dialog: string;
|
|
34
34
|
close: string;
|
|
@@ -46,8 +46,8 @@ interface LightboxLabels {
|
|
|
46
46
|
/** A file card's link to the browser's own viewer (a PDF opens in its viewer). */
|
|
47
47
|
openInNewTab: string;
|
|
48
48
|
}
|
|
49
|
-
|
|
50
|
-
interface LightboxProps {
|
|
49
|
+
export { DEFAULT_LIGHTBOX_LABELS };
|
|
50
|
+
export interface LightboxProps {
|
|
51
51
|
open: boolean;
|
|
52
52
|
/** The X, Escape and the Back gesture all call this. */
|
|
53
53
|
onClose: () => void;
|
|
@@ -75,7 +75,7 @@ interface LightboxProps {
|
|
|
75
75
|
/** Push a history entry so Back closes the viewer. Default `true`; see
|
|
76
76
|
* `FullBleedDialog`'s `backCloses` for when to turn it off. */
|
|
77
77
|
backCloses?: boolean;
|
|
78
|
-
labels?:
|
|
78
|
+
labels?: LabelOverride<LightboxLabels>;
|
|
79
79
|
}
|
|
80
80
|
/**
|
|
81
81
|
* A full-screen viewer for a set of images (and files that are not images).
|
|
@@ -99,6 +99,4 @@ interface LightboxProps {
|
|
|
99
99
|
* preview was the alternative; phone browsers render a PDF in one inconsistently or
|
|
100
100
|
* not at all, and a card works everywhere.
|
|
101
101
|
*/
|
|
102
|
-
declare function Lightbox({ open, onClose, items, index: indexProp, onIndexChange, fetcher, loop, zoom: zoomEnabled, download, onDownload, backCloses, labels: labelsProp, }: LightboxProps): react.JSX.Element;
|
|
103
|
-
|
|
104
|
-
export { DEFAULT_LIGHTBOX_LABELS, type ImageItem, type ImageItemKind, Lightbox, type LightboxLabels, type LightboxProps, imageItemKind };
|
|
102
|
+
export declare function Lightbox({ open, onClose, items, index: indexProp, onIndexChange, fetcher, loop, zoom: zoomEnabled, download, onDownload, backCloses, labels: labelsProp, }: LightboxProps): import("react").JSX.Element;
|
|
@@ -8,9 +8,11 @@ import { useKitLabels } from "../i18n/kit-labels.js";
|
|
|
8
8
|
import { useAuthedSrc } from "../hooks/use-authed-src.js";
|
|
9
9
|
import { useBreakpoint } from "../hooks/use-breakpoint.js";
|
|
10
10
|
import { FullBleedDialog } from "./full-bleed-dialog.js";
|
|
11
|
-
import { IconButton
|
|
11
|
+
import { IconButton } from "./icon-button.js";
|
|
12
|
+
import { buttonClasses } from "./button-look.js";
|
|
12
13
|
import { ImageStates, DEFAULT_AUTHED_IMAGE_LABELS } from "./authed-image.js";
|
|
13
14
|
import { useAnchorDir } from "./use-anchor-dir.js";
|
|
15
|
+
import { DEFAULT_LIGHTBOX_LABELS } from "./lightbox-labels.js";
|
|
14
16
|
const FILE_EXTENSION = /\.(pdf|docx?|xlsx?|pptx?|odt|ods|zip|txt|csv|rtf)(?:[?#]|$)/i;
|
|
15
17
|
function imageItemKind(item, fetchedType) {
|
|
16
18
|
if (item.kind) return item.kind;
|
|
@@ -19,18 +21,6 @@ function imageItemKind(item, fetchedType) {
|
|
|
19
21
|
if (fetchedType && !fetchedType.startsWith("image/")) return "file";
|
|
20
22
|
return "image";
|
|
21
23
|
}
|
|
22
|
-
const DEFAULT_LIGHTBOX_LABELS = {
|
|
23
|
-
dialog: "Image viewer",
|
|
24
|
-
close: "Close",
|
|
25
|
-
previous: "Previous image",
|
|
26
|
-
next: "Next image",
|
|
27
|
-
counter: (index, count) => `${index} / ${count}`,
|
|
28
|
-
position: (index, count) => `Image ${index} of ${count}`,
|
|
29
|
-
download: "Download",
|
|
30
|
-
zoom: "Zoom",
|
|
31
|
-
noPreview: "No preview available for this file",
|
|
32
|
-
openInNewTab: "Open in new tab"
|
|
33
|
-
};
|
|
34
24
|
const SWIPE_MIN_PX = 50;
|
|
35
25
|
function Lightbox({
|
|
36
26
|
open,
|
|
@@ -128,7 +118,7 @@ function Lightbox({
|
|
|
128
118
|
}
|
|
129
119
|
) : null : null;
|
|
130
120
|
const header = item ? /* @__PURE__ */ jsxs("div", { className: "flex min-w-0 items-center gap-2", children: [
|
|
131
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "shrink-0 text-sm tabular-nums text-
|
|
121
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "shrink-0 text-sm tabular-nums text-secondary", children: labels.counter(index + 1, count) }),
|
|
132
122
|
/* @__PURE__ */ jsx("span", { role: "status", "aria-live": "polite", className: "sr-only", children: `${labels.position(index + 1, count)}${item.alt ? `: ${item.alt}` : ""}` }),
|
|
133
123
|
/* @__PURE__ */ jsx("span", { className: "min-w-0 flex-1" }),
|
|
134
124
|
zoomEnabled && kind === "image" && /* @__PURE__ */ jsx(
|
|
@@ -144,10 +134,10 @@ function Lightbox({
|
|
|
144
134
|
),
|
|
145
135
|
downloadControl
|
|
146
136
|
] }) : null;
|
|
147
|
-
const slide = !item ? null : kind === "file" ? /* @__PURE__ */ jsxs("div", { className: "flex max-w-sm flex-col items-center gap-3 rounded-lg border border-
|
|
148
|
-
/* @__PURE__ */ jsx(FileText, { "aria-hidden": true, className: "size-10 text-
|
|
149
|
-
/* @__PURE__ */ jsx("p", { className: "break-all font-medium text-
|
|
150
|
-
/* @__PURE__ */ jsx("p", { className: "text-sm text-
|
|
137
|
+
const slide = !item ? null : kind === "file" ? /* @__PURE__ */ jsxs("div", { className: "flex max-w-sm flex-col items-center gap-3 rounded-lg border border-subtle p-6 text-center", children: [
|
|
138
|
+
/* @__PURE__ */ jsx(FileText, { "aria-hidden": true, className: "size-10 text-muted" }),
|
|
139
|
+
/* @__PURE__ */ jsx("p", { className: "break-all font-medium text-primary", children: item.fileName ?? item.alt }),
|
|
140
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted", children: labels.noPreview }),
|
|
151
141
|
fetched.src && /* @__PURE__ */ jsxs(
|
|
152
142
|
"a",
|
|
153
143
|
{
|
|
@@ -193,7 +183,7 @@ function Lightbox({
|
|
|
193
183
|
backCloses,
|
|
194
184
|
onKeyDown,
|
|
195
185
|
"data-lightbox": "",
|
|
196
|
-
footer: item?.caption !== void 0 && item.caption !== null && item.caption !== false ? /* @__PURE__ */ jsx("p", { className: "me-auto min-w-0 text-sm text-
|
|
186
|
+
footer: item?.caption !== void 0 && item.caption !== null && item.caption !== false ? /* @__PURE__ */ jsx("p", { className: "me-auto min-w-0 text-sm text-secondary", children: item.caption }) : void 0,
|
|
197
187
|
children: [
|
|
198
188
|
/* @__PURE__ */ jsx(
|
|
199
189
|
"div",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/components/lightbox.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\nimport type { KeyboardEvent, ReactNode, TouchEvent } from \"react\";\nimport { ChevronLeft, ChevronRight, Download, ExternalLink, FileText, ZoomIn } from \"lucide-react\";\n\nimport { cn } from \"../lib/cn\";\nimport { horizontalStep } from \"../lib/direction\";\nimport { useKitLabels } from \"../i18n/kit-labels\";\nimport { useAuthedSrc } from \"../hooks/use-authed-src\";\nimport { useBreakpoint } from \"../hooks/use-breakpoint\";\nimport type { AuthedFetcher } from \"../hooks/use-authed-src\";\nimport { FullBleedDialog } from \"./full-bleed-dialog\";\nimport { IconButton, buttonClasses } from \"./ui\";\nimport { ImageStates, DEFAULT_AUTHED_IMAGE_LABELS } from \"./authed-image\";\nimport { useAnchorDir } from \"./use-anchor-dir\";\n\n/* ── The item both the grid and the lightbox show ────────────────────────── */\n\n/** `image`: shown as a picture. `file`: anything a browser cannot put in an `<img>` —\n * a floor plan uploaded as a PDF — shown as a file card with open and download. */\nexport type ImageItemKind = \"image\" | \"file\";\n\nexport interface ImageItem {\n /** React key. Defaults to `src`. */\n key?: string | number;\n /** The full-size file — what the lightbox shows and downloads. An API path when the\n * component is given a `fetcher`. */\n src: string;\n /** A smaller rendition for the grid, when the server has one. Default: `src`. */\n thumbnailSrc?: string;\n /** Required: the picture's text alternative, and the open button's name. */\n alt: string;\n /** Shown under the thumbnail and at the foot of the lightbox. */\n caption?: ReactNode;\n /** The file's MIME type, when known (`\"application/pdf\"`). Decides {@link kind}. */\n mimeType?: string;\n /** Say it outright. Default: from {@link mimeType}, else from the file extension in\n * `src`, else — for a fetched file — from the type the server sent back. */\n kind?: ImageItemKind;\n /** The name a download is saved under, and a file card's heading. */\n fileName?: string;\n}\n\nconst FILE_EXTENSION = /\\.(pdf|docx?|xlsx?|pptx?|odt|ods|zip|txt|csv|rtf)(?:[?#]|$)/i;\n\n/** What an item is, from what is known about it WITHOUT fetching it — see\n * {@link ImageItem.kind}. `fetchedType` is the blob's type once it is in. */\nexport function imageItemKind(item: ImageItem, fetchedType?: string): ImageItemKind {\n if (item.kind) return item.kind;\n if (item.mimeType) return item.mimeType.startsWith(\"image/\") ? \"image\" : \"file\";\n if (FILE_EXTENSION.test(item.src)) return \"file\";\n if (fetchedType && !fetchedType.startsWith(\"image/\")) return \"file\";\n return \"image\";\n}\n\n/* ── Labels ──────────────────────────────────────────────────────────────── */\n\nexport interface LightboxLabels {\n /** The dialog's accessible name. */\n dialog: string;\n close: string;\n previous: string;\n next: string;\n /** The visible counter: \"3 / 7\". */\n counter: (index: number, count: number) => string;\n /** What a screen reader hears on each page turn: \"Image 3 of 7\". The alt follows. */\n position: (index: number, count: number) => string;\n download: string;\n /** The zoom toggle (a pressed/not-pressed button — its name does not change). */\n zoom: string;\n /** A file card's note: the file has no picture to show. */\n noPreview: string;\n /** A file card's link to the browser's own viewer (a PDF opens in its viewer). */\n openInNewTab: string;\n}\n\nexport const DEFAULT_LIGHTBOX_LABELS: LightboxLabels = {\n dialog: \"Image viewer\",\n close: \"Close\",\n previous: \"Previous image\",\n next: \"Next image\",\n counter: (index, count) => `${index} / ${count}`,\n position: (index, count) => `Image ${index} of ${count}`,\n download: \"Download\",\n zoom: \"Zoom\",\n noPreview: \"No preview available for this file\",\n openInNewTab: \"Open in new tab\",\n};\n\n/* ── The component ───────────────────────────────────────────────────────── */\n\nexport interface LightboxProps {\n open: boolean;\n /** The X, Escape and the Back gesture all call this. */\n onClose: () => void;\n items: readonly ImageItem[];\n /** The item on screen (0-based). Controlled, so the grid — or a URL — can own it. */\n index: number;\n onIndexChange: (index: number) => void;\n /** The app's authenticated GET (see {@link useAuthedSrc}); left out, `src` is\n * loaded by the browser as usual. */\n fetcher?: AuthedFetcher | null;\n /** Previous from the first goes to the last, and next from the last to the first.\n * Default `false`: the buttons at the ends are disabled, which says where the set\n * ends. */\n loop?: boolean;\n /** Double-click (or double-tap) the picture, or the zoom button, to see it at full\n * size and pan by scrolling. Default `true`. Pinch zoom is the browser's own. */\n zoom?: boolean;\n /** A download link in the header. Default `true`. */\n download?: boolean;\n /**\n * Download through the app instead — kastlan's floor plans have `openDocument(id)`,\n * which knows the stored file name. Replaces the link with a button that calls this.\n */\n onDownload?: (item: ImageItem, index: number) => void;\n /** Push a history entry so Back closes the viewer. Default `true`; see\n * `FullBleedDialog`'s `backCloses` for when to turn it off. */\n backCloses?: boolean;\n labels?: Partial<LightboxLabels>;\n}\n\n/** Swipes shorter than this are taps, and a drag that is mostly vertical is a scroll. */\nconst SWIPE_MIN_PX = 50;\n\n/**\n * A full-screen viewer for a set of images (and files that are not images).\n *\n * Built on {@link FullBleedDialog} rather than beside it, so the viewer has the kit's\n * one implementation of everything an overlay owes the page: the focus trap, Escape,\n * the Back gesture closing it instead of leaving the page (`useOverlayHistory`), the\n * body-scroll lock and the enter/exit motion.\n *\n * Paging: the previous/next buttons, ←/→ (which swap in a right-to-left page — the\n * direction is read at the point the viewer is rendered, since the dialog itself is\n * portalled out of it), Home/End, and a horizontal swipe on a touch screen.\n *\n * Zoom is a TOGGLE, not a gesture: double-click (or the zoom button) shows the picture\n * at its natural size and the body scrolls to pan. Pinch-to-zoom is not implemented —\n * the browser's own page pinch still works — because a pinch handler would have to own\n * every touch on the picture, and with it the swipe.\n *\n * A non-image (a PDF floor plan) is shown as a file card: its name, \"no preview\", a\n * link that opens it in the browser's own viewer, and the download. An `<iframe>`\n * preview was the alternative; phone browsers render a PDF in one inconsistently or\n * not at all, and a card works everywhere.\n */\nexport function Lightbox({\n open,\n onClose,\n items,\n index: indexProp,\n onIndexChange,\n fetcher,\n loop = false,\n zoom: zoomEnabled = true,\n download = true,\n onDownload,\n backCloses,\n labels: labelsProp,\n}: LightboxProps) {\n const labels = useKitLabels(\"lightbox\", DEFAULT_LIGHTBOX_LABELS, labelsProp);\n const imageLabels = useKitLabels(\"authedImage\", DEFAULT_AUTHED_IMAGE_LABELS);\n const count = items.length;\n // Clamped: the set can shrink under an open viewer (the photo on screen was deleted).\n const index = count === 0 ? 0 : Math.min(Math.max(indexProp, 0), count - 1);\n const item = items[index] as ImageItem | undefined;\n\n // The dialog is portalled to <body>, out of the subtree whose `dir` it would have\n // inherited; this marker stays where the viewer was rendered and reads it there.\n const anchorRef = useRef<HTMLSpanElement>(null);\n const dir = useAnchorDir(anchorRef, open);\n\n // The toolbar's words (docs/text-size-harmonization.md §4, §10.8). At Large an\n // IconButton shows its label beside the glyph; on a narrow screen the viewer's header —\n // the counter, Zoom, Download and the dialog's close — has no room for two words at\n // 150 % (a 390 px phone is 260 px of Normal type), so below `sm` the toolbar keeps its\n // icons, as the plain download link hides its word there (`max-sm:sr-only`). From `sm`\n // up, at the same breakpoint the CSS uses, the words show. Each name stays the\n // accessible name and the tooltip either way.\n const narrow = useBreakpoint(\"max-sm\");\n const toolbarLabelVisible = narrow ? false : undefined;\n\n const fetched = useAuthedSrc(item?.src, { fetcher, enabled: open });\n const kind = item ? imageItemKind(item, fetched.type) : \"image\";\n\n const [zoomedKey, setZoomedKey] = useState<string | null>(null);\n const itemKey = item ? String(item.key ?? item.src) : null;\n // Zoom belongs to the picture it was turned on for: paging on resets it.\n const zoomed = zoomEnabled && kind === \"image\" && zoomedKey !== null && zoomedKey === itemKey;\n const toggleZoom = () => setZoomedKey(zoomed ? null : itemKey);\n\n const canPrev = loop ? count > 1 : index > 0;\n const canNext = loop ? count > 1 : index < count - 1;\n const go = (step: number) => {\n if (count === 0) return;\n let next = index + step;\n if (loop) next = (next + count) % count;\n if (next < 0 || next >= count || next === index) return;\n onIndexChange(next);\n };\n\n const onKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {\n // A key meant for a control stays with it: Space/Enter on a button, typing in any\n // field a caller's caption might hold.\n const target = e.target as HTMLElement;\n if (target.closest(\"input, textarea, select, [contenteditable='true']\")) return;\n const step = horizontalStep(e.key, e.currentTarget);\n if (step !== 0) {\n e.preventDefault();\n go(step);\n } else if (e.key === \"Home\") {\n e.preventDefault();\n if (index !== 0) onIndexChange(0);\n } else if (e.key === \"End\") {\n e.preventDefault();\n if (index !== count - 1) onIndexChange(count - 1);\n }\n };\n\n const touchStart = useRef<{ x: number; y: number } | null>(null);\n const onTouchStart = (e: TouchEvent) => {\n const t = e.touches[0];\n touchStart.current = e.touches.length === 1 && t ? { x: t.clientX, y: t.clientY } : null;\n };\n const onTouchEnd = (e: TouchEvent) => {\n const start = touchStart.current;\n touchStart.current = null;\n const t = e.changedTouches[0];\n // Zoomed, a drag is a PAN of the picture, not a page turn.\n if (!start || !t || zoomed) return;\n const dx = t.clientX - start.x;\n const dy = t.clientY - start.y;\n if (Math.abs(dx) < SWIPE_MIN_PX || Math.abs(dx) < Math.abs(dy)) return;\n // Swiping toward the START edge brings in the next picture from the end edge.\n const towardStart = dir === \"rtl\" ? dx > 0 : dx < 0;\n go(towardStart ? 1 : -1);\n };\n\n // Paging the viewer while zoomed would leave the new picture scrolled to where the\n // last one was panned; start each at its top-left.\n const bodyRef = useRef<HTMLDivElement>(null);\n useEffect(() => {\n bodyRef.current?.scrollTo?.({ top: 0, left: 0 });\n }, [index]);\n\n const downloadHref = fetched.src;\n const downloadControl =\n download && item ? (\n onDownload ? (\n <IconButton\n size=\"sm\"\n label={labels.download}\n labelVisible={toolbarLabelVisible}\n onClick={() => onDownload(item, index)}\n >\n <Download />\n </IconButton>\n ) : downloadHref ? (\n <a\n href={downloadHref}\n // `download` names the saved file; a blob: URL has no name of its own.\n download={item.fileName ?? \"\"}\n className={buttonClasses(\"ghost\", { size: \"sm\" })}\n >\n <Download aria-hidden className=\"size-4\" />\n <span className=\"max-sm:sr-only\">{labels.download}</span>\n </a>\n ) : null\n ) : null;\n\n const header = item ? (\n <div className=\"flex min-w-0 items-center gap-2\">\n <span aria-hidden className=\"shrink-0 text-sm tabular-nums text-[var(--text-secondary)]\">\n {labels.counter(index + 1, count)}\n </span>\n {/* The page turn, said — focus does not move when the picture changes, so\n without this a reader pressing → hears nothing at all. */}\n <span role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {`${labels.position(index + 1, count)}${item.alt ? `: ${item.alt}` : \"\"}`}\n </span>\n <span className=\"min-w-0 flex-1\" />\n {zoomEnabled && kind === \"image\" && (\n <IconButton\n size=\"sm\"\n label={labels.zoom}\n labelVisible={toolbarLabelVisible}\n pressed={zoomed}\n onClick={toggleZoom}\n >\n <ZoomIn />\n </IconButton>\n )}\n {downloadControl}\n </div>\n ) : null;\n\n const slide = !item ? null : kind === \"file\" ? (\n <div className=\"flex max-w-sm flex-col items-center gap-3 rounded-lg border border-[var(--border)] p-6 text-center\">\n <FileText aria-hidden className=\"size-10 text-[var(--text-muted)]\" />\n <p className=\"break-all font-medium text-[var(--text-primary)]\">{item.fileName ?? item.alt}</p>\n <p className=\"text-sm text-[var(--text-muted)]\">{labels.noPreview}</p>\n {fetched.src && (\n <a\n href={fetched.src}\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n className={buttonClasses(\"secondary\", { size: \"sm\" })}\n >\n <ExternalLink aria-hidden className=\"size-4\" />\n {labels.openInNewTab}\n </a>\n )}\n </div>\n ) : (\n <ImageStates\n // Keyed by item: a new picture is a new decode, never the old one's \"loaded\".\n key={itemKey ?? undefined}\n fetched={fetched}\n alt={item.alt}\n labels={imageLabels}\n wrapperClassName={\n zoomed ? \"max-w-none shrink-0\" : \"flex h-full w-full items-center justify-center\"\n }\n className={cn(\n zoomed ? \"max-w-none cursor-zoom-out\" : \"max-h-full max-w-full object-contain\",\n !zoomed && zoomEnabled && \"cursor-zoom-in\",\n )}\n imgProps={{\n draggable: false,\n onDoubleClick: zoomEnabled ? toggleZoom : undefined,\n }}\n />\n );\n\n return (\n <>\n <span ref={anchorRef} hidden />\n <FullBleedDialog\n open={open && !!item}\n onClose={onClose}\n closeLabel={labels.close}\n aria-label={labels.dialog}\n dir={dir}\n header={header}\n backCloses={backCloses}\n onKeyDown={onKeyDown}\n data-lightbox=\"\"\n footer={\n item?.caption !== undefined && item.caption !== null && item.caption !== false ? (\n <p className=\"me-auto min-w-0 text-sm text-[var(--text-secondary)]\">{item.caption}</p>\n ) : undefined\n }\n >\n <div\n ref={bodyRef}\n data-lightbox-stage=\"\"\n data-zoomed={zoomed ? \"\" : undefined}\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd}\n className={cn(\n \"relative h-full min-h-48 w-full\",\n zoomed ? \"overflow-auto\" : \"flex items-center justify-center overflow-hidden\",\n )}\n >\n {slide}\n </div>\n {count > 1 && (\n <>\n <IconButton\n variant=\"overlay\"\n size=\"lg\"\n label={labels.previous}\n disabled={!canPrev}\n onClick={() => go(-1)}\n className=\"absolute start-3 top-1/2 -translate-y-1/2\"\n tooltip={false}\n >\n <ChevronLeft className=\"rtl:-scale-x-100\" />\n </IconButton>\n <IconButton\n variant=\"overlay\"\n size=\"lg\"\n label={labels.next}\n disabled={!canNext}\n onClick={() => go(1)}\n className=\"absolute end-3 top-1/2 -translate-y-1/2\"\n tooltip={false}\n >\n <ChevronRight className=\"rtl:-scale-x-100\" />\n </IconButton>\n </>\n )}\n </FullBleedDialog>\n </>\n );\n}\n"],"mappings":";AA+PU,SAgHA,UAhHA,KAGF,YAHE;AA/PV,SAAS,WAAW,QAAQ,gBAAgB;AAE5C,SAAS,aAAa,cAAc,UAAU,cAAc,UAAU,cAAc;AAEpF,SAAS,UAAU;AACnB,SAAS,sBAAsB;AAC/B,SAAS,oBAAoB;AAC7B,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAE9B,SAAS,uBAAuB;AAChC,SAAS,YAAY,qBAAqB;AAC1C,SAAS,aAAa,mCAAmC;AACzD,SAAS,oBAAoB;AA6B7B,MAAM,iBAAiB;AAIhB,SAAS,cAAc,MAAiB,aAAqC;AAClF,MAAI,KAAK,KAAM,QAAO,KAAK;AAC3B,MAAI,KAAK,SAAU,QAAO,KAAK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,QACA;AAAA,QACA;AAAA,QACA,iBAAc;AAAA,QACd,QACE,MAAM,YAAY,UAAa,KAAK,YAAY,QAAQ,KAAK,YAAY,QACvE,oBAAC,OAAE,WAAU,wDAAwD,eAAK,SAAQ,IAChF;AAAA,QAGN;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,KAAK;AAAA,cACL,uBAAoB;AAAA,cACpB,eAAa,SAAS,KAAK;AAAA,cAC3B;AAAA,cACA;AAAA,cACA,WAAW;AAAA,gBACT;AAAA,gBACA,SAAS,kBAAkB;AAAA,cAC7B;AAAA,cAEC;AAAA;AAAA,UACH;AAAA,UACC,QAAQ,KACP,iCACE;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAO,OAAO;AAAA,gBACd,UAAU,CAAC;AAAA,gBACX,SAAS,MAAM,GAAG,EAAE;AAAA,gBACpB,WAAU;AAAA,gBACV,SAAS;AAAA,gBAET,8BAAC,eAAY,WAAU,oBAAmB;AAAA;AAAA,YAC5C;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,OAAO,OAAO;AAAA,gBACd,UAAU,CAAC;AAAA,gBACX,SAAS,MAAM,GAAG,CAAC;AAAA,gBACnB,WAAU;AAAA,gBACV,SAAS;AAAA,gBAET,8BAAC,gBAAa,WAAU,oBAAmB;AAAA;AAAA,YAC7C;AAAA,aACF;AAAA;AAAA;AAAA,IAEJ;AAAA,KACF;AAEJ;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/components/lightbox.tsx"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\nimport type { KeyboardEvent, ReactNode, TouchEvent } from \"react\";\nimport { ChevronLeft, ChevronRight, Download, ExternalLink, FileText, ZoomIn } from \"lucide-react\";\n\nimport { cn } from \"../lib/cn\";\nimport { horizontalStep } from \"../lib/direction\";\nimport { useKitLabels, type LabelOverride } from \"../i18n/kit-labels\";\nimport { useAuthedSrc } from \"../hooks/use-authed-src\";\nimport { useBreakpoint } from \"../hooks/use-breakpoint\";\nimport type { AuthedFetcher } from \"../hooks/use-authed-src\";\nimport { FullBleedDialog } from \"./full-bleed-dialog\";\nimport { IconButton } from \"./icon-button\";\nimport { buttonClasses } from \"./button-look\";\nimport { ImageStates, DEFAULT_AUTHED_IMAGE_LABELS } from \"./authed-image\";\nimport { useAnchorDir } from \"./use-anchor-dir\";\nimport { DEFAULT_LIGHTBOX_LABELS } from \"./lightbox-labels\";\n\n/* ── The item both the grid and the lightbox show ────────────────────────── */\n\n/** `image`: shown as a picture. `file`: anything a browser cannot put in an `<img>` —\n * a floor plan uploaded as a PDF — shown as a file card with open and download. */\nexport type ImageItemKind = \"image\" | \"file\";\n\nexport interface ImageItem {\n /** React key. Defaults to `src`. */\n key?: string | number;\n /** The full-size file — what the lightbox shows and downloads. An API path when the\n * component is given a `fetcher`. */\n src: string;\n /** A smaller rendition for the grid, when the server has one. Default: `src`. */\n thumbnailSrc?: string;\n /** Required: the picture's text alternative, and the open button's name. */\n alt: string;\n /** Shown under the thumbnail and at the foot of the lightbox. */\n caption?: ReactNode;\n /** The file's MIME type, when known (`\"application/pdf\"`). Decides {@link kind}. */\n mimeType?: string;\n /** Say it outright. Default: from {@link mimeType}, else from the file extension in\n * `src`, else — for a fetched file — from the type the server sent back. */\n kind?: ImageItemKind;\n /** The name a download is saved under, and a file card's heading. */\n fileName?: string;\n}\n\nconst FILE_EXTENSION = /\\.(pdf|docx?|xlsx?|pptx?|odt|ods|zip|txt|csv|rtf)(?:[?#]|$)/i;\n\n/** What an item is, from what is known about it WITHOUT fetching it — see\n * {@link ImageItem.kind}. `fetchedType` is the blob's type once it is in. */\nexport function imageItemKind(item: ImageItem, fetchedType?: string): ImageItemKind {\n if (item.kind) return item.kind;\n if (item.mimeType) return item.mimeType.startsWith(\"image/\") ? \"image\" : \"file\";\n if (FILE_EXTENSION.test(item.src)) return \"file\";\n if (fetchedType && !fetchedType.startsWith(\"image/\")) return \"file\";\n return \"image\";\n}\n\n/* ── Labels ──────────────────────────────────────────────────────────────── */\n\nexport interface LightboxLabels {\n /** The dialog's accessible name. */\n dialog: string;\n close: string;\n previous: string;\n next: string;\n /** The visible counter: \"3 / 7\". */\n counter: (index: number, count: number) => string;\n /** What a screen reader hears on each page turn: \"Image 3 of 7\". The alt follows. */\n position: (index: number, count: number) => string;\n download: string;\n /** The zoom toggle (a pressed/not-pressed button — its name does not change). */\n zoom: string;\n /** A file card's note: the file has no picture to show. */\n noPreview: string;\n /** A file card's link to the browser's own viewer (a PDF opens in its viewer). */\n openInNewTab: string;\n}\n\n// Defined in ./lightbox-labels, which holds no component code (0.34, KS U8).\nexport { DEFAULT_LIGHTBOX_LABELS };\n\n/* ── The component ───────────────────────────────────────────────────────── */\n\nexport interface LightboxProps {\n open: boolean;\n /** The X, Escape and the Back gesture all call this. */\n onClose: () => void;\n items: readonly ImageItem[];\n /** The item on screen (0-based). Controlled, so the grid — or a URL — can own it. */\n index: number;\n onIndexChange: (index: number) => void;\n /** The app's authenticated GET (see {@link useAuthedSrc}); left out, `src` is\n * loaded by the browser as usual. */\n fetcher?: AuthedFetcher | null;\n /** Previous from the first goes to the last, and next from the last to the first.\n * Default `false`: the buttons at the ends are disabled, which says where the set\n * ends. */\n loop?: boolean;\n /** Double-click (or double-tap) the picture, or the zoom button, to see it at full\n * size and pan by scrolling. Default `true`. Pinch zoom is the browser's own. */\n zoom?: boolean;\n /** A download link in the header. Default `true`. */\n download?: boolean;\n /**\n * Download through the app instead — kastlan's floor plans have `openDocument(id)`,\n * which knows the stored file name. Replaces the link with a button that calls this.\n */\n onDownload?: (item: ImageItem, index: number) => void;\n /** Push a history entry so Back closes the viewer. Default `true`; see\n * `FullBleedDialog`'s `backCloses` for when to turn it off. */\n backCloses?: boolean;\n labels?: LabelOverride<LightboxLabels>;\n}\n\n/** Swipes shorter than this are taps, and a drag that is mostly vertical is a scroll. */\nconst SWIPE_MIN_PX = 50;\n\n/**\n * A full-screen viewer for a set of images (and files that are not images).\n *\n * Built on {@link FullBleedDialog} rather than beside it, so the viewer has the kit's\n * one implementation of everything an overlay owes the page: the focus trap, Escape,\n * the Back gesture closing it instead of leaving the page (`useOverlayHistory`), the\n * body-scroll lock and the enter/exit motion.\n *\n * Paging: the previous/next buttons, ←/→ (which swap in a right-to-left page — the\n * direction is read at the point the viewer is rendered, since the dialog itself is\n * portalled out of it), Home/End, and a horizontal swipe on a touch screen.\n *\n * Zoom is a TOGGLE, not a gesture: double-click (or the zoom button) shows the picture\n * at its natural size and the body scrolls to pan. Pinch-to-zoom is not implemented —\n * the browser's own page pinch still works — because a pinch handler would have to own\n * every touch on the picture, and with it the swipe.\n *\n * A non-image (a PDF floor plan) is shown as a file card: its name, \"no preview\", a\n * link that opens it in the browser's own viewer, and the download. An `<iframe>`\n * preview was the alternative; phone browsers render a PDF in one inconsistently or\n * not at all, and a card works everywhere.\n */\nexport function Lightbox({\n open,\n onClose,\n items,\n index: indexProp,\n onIndexChange,\n fetcher,\n loop = false,\n zoom: zoomEnabled = true,\n download = true,\n onDownload,\n backCloses,\n labels: labelsProp,\n}: LightboxProps) {\n const labels = useKitLabels(\"lightbox\", DEFAULT_LIGHTBOX_LABELS, labelsProp);\n const imageLabels = useKitLabels(\"authedImage\", DEFAULT_AUTHED_IMAGE_LABELS);\n const count = items.length;\n // Clamped: the set can shrink under an open viewer (the photo on screen was deleted).\n const index = count === 0 ? 0 : Math.min(Math.max(indexProp, 0), count - 1);\n const item = items[index] as ImageItem | undefined;\n\n // The dialog is portalled to <body>, out of the subtree whose `dir` it would have\n // inherited; this marker stays where the viewer was rendered and reads it there.\n const anchorRef = useRef<HTMLSpanElement>(null);\n const dir = useAnchorDir(anchorRef, open);\n\n // The toolbar's words (docs/text-size-harmonization.md §4, §10.8). At Large an\n // IconButton shows its label beside the glyph; on a narrow screen the viewer's header —\n // the counter, Zoom, Download and the dialog's close — has no room for two words at\n // 150 % (a 390 px phone is 260 px of Normal type), so below `sm` the toolbar keeps its\n // icons, as the plain download link hides its word there (`max-sm:sr-only`). From `sm`\n // up, at the same breakpoint the CSS uses, the words show. Each name stays the\n // accessible name and the tooltip either way.\n const narrow = useBreakpoint(\"max-sm\");\n const toolbarLabelVisible = narrow ? false : undefined;\n\n const fetched = useAuthedSrc(item?.src, { fetcher, enabled: open });\n const kind = item ? imageItemKind(item, fetched.type) : \"image\";\n\n const [zoomedKey, setZoomedKey] = useState<string | null>(null);\n const itemKey = item ? String(item.key ?? item.src) : null;\n // Zoom belongs to the picture it was turned on for: paging on resets it.\n const zoomed = zoomEnabled && kind === \"image\" && zoomedKey !== null && zoomedKey === itemKey;\n const toggleZoom = () => setZoomedKey(zoomed ? null : itemKey);\n\n const canPrev = loop ? count > 1 : index > 0;\n const canNext = loop ? count > 1 : index < count - 1;\n const go = (step: number) => {\n if (count === 0) return;\n let next = index + step;\n if (loop) next = (next + count) % count;\n if (next < 0 || next >= count || next === index) return;\n onIndexChange(next);\n };\n\n const onKeyDown = (e: KeyboardEvent<HTMLDivElement>) => {\n // A key meant for a control stays with it: Space/Enter on a button, typing in any\n // field a caller's caption might hold.\n const target = e.target as HTMLElement;\n if (target.closest(\"input, textarea, select, [contenteditable='true']\")) return;\n const step = horizontalStep(e.key, e.currentTarget);\n if (step !== 0) {\n e.preventDefault();\n go(step);\n } else if (e.key === \"Home\") {\n e.preventDefault();\n if (index !== 0) onIndexChange(0);\n } else if (e.key === \"End\") {\n e.preventDefault();\n if (index !== count - 1) onIndexChange(count - 1);\n }\n };\n\n const touchStart = useRef<{ x: number; y: number } | null>(null);\n const onTouchStart = (e: TouchEvent) => {\n const t = e.touches[0];\n touchStart.current = e.touches.length === 1 && t ? { x: t.clientX, y: t.clientY } : null;\n };\n const onTouchEnd = (e: TouchEvent) => {\n const start = touchStart.current;\n touchStart.current = null;\n const t = e.changedTouches[0];\n // Zoomed, a drag is a PAN of the picture, not a page turn.\n if (!start || !t || zoomed) return;\n const dx = t.clientX - start.x;\n const dy = t.clientY - start.y;\n if (Math.abs(dx) < SWIPE_MIN_PX || Math.abs(dx) < Math.abs(dy)) return;\n // Swiping toward the START edge brings in the next picture from the end edge.\n const towardStart = dir === \"rtl\" ? dx > 0 : dx < 0;\n go(towardStart ? 1 : -1);\n };\n\n // Paging the viewer while zoomed would leave the new picture scrolled to where the\n // last one was panned; start each at its top-left.\n const bodyRef = useRef<HTMLDivElement>(null);\n useEffect(() => {\n bodyRef.current?.scrollTo?.({ top: 0, left: 0 });\n }, [index]);\n\n const downloadHref = fetched.src;\n const downloadControl =\n download && item ? (\n onDownload ? (\n <IconButton\n size=\"sm\"\n label={labels.download}\n labelVisible={toolbarLabelVisible}\n onClick={() => onDownload(item, index)}\n >\n <Download />\n </IconButton>\n ) : downloadHref ? (\n <a\n href={downloadHref}\n // `download` names the saved file; a blob: URL has no name of its own.\n download={item.fileName ?? \"\"}\n className={buttonClasses(\"ghost\", { size: \"sm\" })}\n >\n <Download aria-hidden className=\"size-4\" />\n <span className=\"max-sm:sr-only\">{labels.download}</span>\n </a>\n ) : null\n ) : null;\n\n const header = item ? (\n <div className=\"flex min-w-0 items-center gap-2\">\n <span aria-hidden className=\"shrink-0 text-sm tabular-nums text-secondary\">\n {labels.counter(index + 1, count)}\n </span>\n {/* The page turn, said — focus does not move when the picture changes, so\n without this a reader pressing → hears nothing at all. */}\n <span role=\"status\" aria-live=\"polite\" className=\"sr-only\">\n {`${labels.position(index + 1, count)}${item.alt ? `: ${item.alt}` : \"\"}`}\n </span>\n <span className=\"min-w-0 flex-1\" />\n {zoomEnabled && kind === \"image\" && (\n <IconButton\n size=\"sm\"\n label={labels.zoom}\n labelVisible={toolbarLabelVisible}\n pressed={zoomed}\n onClick={toggleZoom}\n >\n <ZoomIn />\n </IconButton>\n )}\n {downloadControl}\n </div>\n ) : null;\n\n const slide = !item ? null : kind === \"file\" ? (\n <div className=\"flex max-w-sm flex-col items-center gap-3 rounded-lg border border-subtle p-6 text-center\">\n <FileText aria-hidden className=\"size-10 text-muted\" />\n <p className=\"break-all font-medium text-primary\">{item.fileName ?? item.alt}</p>\n <p className=\"text-sm text-muted\">{labels.noPreview}</p>\n {fetched.src && (\n <a\n href={fetched.src}\n target=\"_blank\"\n rel=\"noreferrer noopener\"\n className={buttonClasses(\"secondary\", { size: \"sm\" })}\n >\n <ExternalLink aria-hidden className=\"size-4\" />\n {labels.openInNewTab}\n </a>\n )}\n </div>\n ) : (\n <ImageStates\n // Keyed by item: a new picture is a new decode, never the old one's \"loaded\".\n key={itemKey ?? undefined}\n fetched={fetched}\n alt={item.alt}\n labels={imageLabels}\n wrapperClassName={\n zoomed ? \"max-w-none shrink-0\" : \"flex h-full w-full items-center justify-center\"\n }\n className={cn(\n zoomed ? \"max-w-none cursor-zoom-out\" : \"max-h-full max-w-full object-contain\",\n !zoomed && zoomEnabled && \"cursor-zoom-in\",\n )}\n imgProps={{\n draggable: false,\n onDoubleClick: zoomEnabled ? toggleZoom : undefined,\n }}\n />\n );\n\n return (\n <>\n <span ref={anchorRef} hidden />\n <FullBleedDialog\n open={open && !!item}\n onClose={onClose}\n closeLabel={labels.close}\n aria-label={labels.dialog}\n dir={dir}\n header={header}\n backCloses={backCloses}\n onKeyDown={onKeyDown}\n data-lightbox=\"\"\n footer={\n item?.caption !== undefined && item.caption !== null && item.caption !== false ? (\n <p className=\"me-auto min-w-0 text-sm text-secondary\">{item.caption}</p>\n ) : undefined\n }\n >\n <div\n ref={bodyRef}\n data-lightbox-stage=\"\"\n data-zoomed={zoomed ? \"\" : undefined}\n onTouchStart={onTouchStart}\n onTouchEnd={onTouchEnd}\n className={cn(\n \"relative h-full min-h-48 w-full\",\n zoomed ? \"overflow-auto\" : \"flex items-center justify-center overflow-hidden\",\n )}\n >\n {slide}\n </div>\n {count > 1 && (\n <>\n <IconButton\n variant=\"overlay\"\n size=\"lg\"\n label={labels.previous}\n disabled={!canPrev}\n onClick={() => go(-1)}\n className=\"absolute start-3 top-1/2 -translate-y-1/2\"\n tooltip={false}\n >\n <ChevronLeft className=\"rtl:-scale-x-100\" />\n </IconButton>\n <IconButton\n variant=\"overlay\"\n size=\"lg\"\n label={labels.next}\n disabled={!canNext}\n onClick={() => go(1)}\n className=\"absolute end-3 top-1/2 -translate-y-1/2\"\n tooltip={false}\n >\n <ChevronRight className=\"rtl:-scale-x-100\" />\n </IconButton>\n </>\n )}\n </FullBleedDialog>\n </>\n );\n}\n"],"mappings":";AAuPU,SAgHA,UAhHA,KAGF,YAHE;AAvPV,SAAS,WAAW,QAAQ,gBAAgB;AAE5C,SAAS,aAAa,cAAc,UAAU,cAAc,UAAU,cAAc;AAEpF,SAAS,UAAU;AACnB,SAAS,sBAAsB;AAC/B,SAAS,oBAAwC;AACjD,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAE9B,SAAS,uBAAuB;AAChC,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAC9B,SAAS,aAAa,mCAAmC;AACzD,SAAS,oBAAoB;AAC7B,SAAS,+BAA+B;AA6BxC,MAAM,iBAAiB;AAIhB,SAAS,cAAc,MAAiB,aAAqC;AAClF,MAAI,KAAK,KAAM,QAAO,KAAK;AAC3B,MAAI,KAAK,SAAU,QAAO,KAAK,SAAS,WAAW,QAAQ,IAAI,UAAU;AACzE,MAAI,eAAe,KAAK,KAAK,GAAG,EAAG,QAAO;AAC1C,MAAI,eAAe,CAAC,YAAY,WAAW,QAAQ,EAAG,QAAO;AAC7D,SAAO;AACT;AA4DA,MAAM,eAAe;AAwBd,SAAS,SAAS;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,MAAM,cAAc;AAAA,EACpB,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,QAAQ;AACV,GAAkB;AAChB,QAAM,SAAS,aAAa,YAAY,yBAAyB,UAAU;AAC3E,QAAM,cAAc,aAAa,eAAe,2BAA2B;AAC3E,QAAM,QAAQ,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,gBACX,SAAS,MAAM,GAAG,CAAC;AAAA,gBACnB,WAAU;AAAA,gBACV,SAAS;AAAA,gBAET,8BAAC,gBAAa,WAAU,oBAAmB;AAAA;AAAA,YAC7C;AAAA,aACF;AAAA;AAAA;AAAA,IAEJ;AAAA,KACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const DEFAULT_LINE_ITEMS_LABELS = {
|
|
3
|
+
add: "Add row",
|
|
4
|
+
remove: (row) => `Remove row ${row}`,
|
|
5
|
+
confirmRemove: (row) => `Remove row ${row}? Press again to confirm`,
|
|
6
|
+
row: (row) => `Row ${row}`,
|
|
7
|
+
cell: (column, row) => `${column}, row ${row}`,
|
|
8
|
+
totals: "Total"
|
|
9
|
+
};
|
|
10
|
+
export {
|
|
11
|
+
DEFAULT_LINE_ITEMS_LABELS
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=line-items-labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/line-items-labels.ts"],"sourcesContent":["// The English words of ./line-items, 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). ./line-items re-exports them.\n\nimport type { LineItemsLabels } from \"./line-items\";\n\nexport const DEFAULT_LINE_ITEMS_LABELS: LineItemsLabels = {\n add: \"Add row\",\n remove: (row) => `Remove row ${row}`,\n confirmRemove: (row) => `Remove row ${row}? Press again to confirm`,\n row: (row) => `Row ${row}`,\n cell: (column, row) => `${column}, row ${row}`,\n totals: \"Total\",\n};\n"],"mappings":";AAMO,MAAM,4BAA6C;AAAA,EACxD,KAAK;AAAA,EACL,QAAQ,CAAC,QAAQ,cAAc,GAAG;AAAA,EAClC,eAAe,CAAC,QAAQ,cAAc,GAAG;AAAA,EACzC,KAAK,CAAC,QAAQ,OAAO,GAAG;AAAA,EACxB,MAAM,CAAC,QAAQ,QAAQ,GAAG,MAAM,SAAS,GAAG;AAAA,EAC5C,QAAQ;AACV;","names":[]}
|