@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
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
* stylesheet's `:root` / `.dark` mirror. Component internals (`--slider-fill`, `--fp-*`,
|
|
30
30
|
* `--icon-button-tone`, `--label-strip-edge`) are not: an app that reads one depends on
|
|
31
31
|
* the kit's internals, and the guard says so. */
|
|
32
|
-
declare const KIT_CSS_VARIABLES: ReadonlySet<string>;
|
|
33
|
-
interface UndeclaredCssVariablesOptions {
|
|
32
|
+
export declare const KIT_CSS_VARIABLES: ReadonlySet<string>;
|
|
33
|
+
export interface UndeclaredCssVariablesOptions {
|
|
34
34
|
/** Variables a library writes at runtime, as names or patterns:
|
|
35
35
|
* `["--radix-collapsible-content-height"]`. An app's own writes are found in its
|
|
36
36
|
* source and need no listing. */
|
|
@@ -47,7 +47,7 @@ interface UndeclaredCssVariablesOptions {
|
|
|
47
47
|
* declared only inside `@theme inline`, which Tailwind never emits as a variable. Comments
|
|
48
48
|
* are skipped. The same rule builds {@link KIT_CSS_VARIABLES} from `tokens.css`.
|
|
49
49
|
*/
|
|
50
|
-
declare function declaredCustomProperties(css: string): Set<string>;
|
|
50
|
+
export declare function declaredCustomProperties(css: string): Set<string>;
|
|
51
51
|
/**
|
|
52
52
|
* Every `var(--name)` without a fallback that nothing declares, as `"path:line --name"`.
|
|
53
53
|
*
|
|
@@ -69,6 +69,4 @@ declare function declaredCustomProperties(css: string): Set<string>;
|
|
|
69
69
|
* (`test.css.include`) would otherwise lose every declaration and every use in it, and
|
|
70
70
|
* this would pass or fail for the wrong reason.
|
|
71
71
|
*/
|
|
72
|
-
declare function undeclaredCssVariables(sources: Record<string, string>, options?: UndeclaredCssVariablesOptions): string[];
|
|
73
|
-
|
|
74
|
-
export { KIT_CSS_VARIABLES, type UndeclaredCssVariablesOptions, declaredCustomProperties, undeclaredCssVariables };
|
|
72
|
+
export declare function undeclaredCssVariables(sources: Record<string, string>, options?: UndeclaredCssVariablesOptions): string[];
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/** Every custom property tokens.css declares, `@theme inline` names and `--app-nav-h`
|
|
2
2
|
* left out (100 names). */
|
|
3
|
-
declare const KIT_NAMES: string;
|
|
3
|
+
export declare const KIT_NAMES: string;
|
|
4
4
|
/** The theme variables of Tailwind 4.3.3's `theme.css` (413 names). */
|
|
5
|
-
declare const TAILWIND_THEME_NAMES: string;
|
|
6
|
-
|
|
7
|
-
export { KIT_NAMES, TAILWIND_THEME_NAMES };
|
|
5
|
+
export declare const TAILWIND_THEME_NAMES: string;
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export { KIT_CSS_VARIABLES,
|
|
1
|
+
export { KIT_CSS_VARIABLES, declaredCustomProperties, undeclaredCssVariables, type UndeclaredCssVariablesOptions, } from "./css-variables.js";
|
|
2
|
+
export { stubResizeObserver, stubViewportWidth, viewportMatchMedia, type ResizeObserverStub, type StubbedBoxSize, type ViewportOptions, } from "./viewport.js";
|
package/dist/testing/index.js
CHANGED
|
@@ -4,9 +4,17 @@ import {
|
|
|
4
4
|
declaredCustomProperties,
|
|
5
5
|
undeclaredCssVariables
|
|
6
6
|
} from "./css-variables.js";
|
|
7
|
+
import {
|
|
8
|
+
stubResizeObserver,
|
|
9
|
+
stubViewportWidth,
|
|
10
|
+
viewportMatchMedia
|
|
11
|
+
} from "./viewport.js";
|
|
7
12
|
export {
|
|
8
13
|
KIT_CSS_VARIABLES,
|
|
9
14
|
declaredCustomProperties,
|
|
10
|
-
|
|
15
|
+
stubResizeObserver,
|
|
16
|
+
stubViewportWidth,
|
|
17
|
+
undeclaredCssVariables,
|
|
18
|
+
viewportMatchMedia
|
|
11
19
|
};
|
|
12
20
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/testing/index.ts"],"sourcesContent":["// `@eifi1/ui-kit/testing` — helpers an app runs from its OWN test suite (0.33).\n//\n// Not part of the main barrel: nothing here renders, and an app's production bundle has\n// no business carrying it. Browser-safe like the rest of the kit (no `node:fs`): each\n// helper takes texts, so an app collects them with `import.meta.glob` or `node:fs`, as\n// its setup allows. The first content is the guard against undeclared CSS custom\n// properties (docs/colour-roles-harmonization.md §8).\nexport {\n KIT_CSS_VARIABLES,\n declaredCustomProperties,\n undeclaredCssVariables,\n type UndeclaredCssVariablesOptions,\n} from \"./css-variables\";\n"],"mappings":";AAOA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/testing/index.ts"],"sourcesContent":["// `@eifi1/ui-kit/testing` — helpers an app runs from its OWN test suite (0.33).\n//\n// Not part of the main barrel: nothing here renders, and an app's production bundle has\n// no business carrying it. Browser-safe like the rest of the kit (no `node:fs`): each\n// helper takes texts, so an app collects them with `import.meta.glob` or `node:fs`, as\n// its setup allows. The first content is the guard against undeclared CSS custom\n// properties (docs/colour-roles-harmonization.md §8).\nexport {\n KIT_CSS_VARIABLES,\n declaredCustomProperties,\n undeclaredCssVariables,\n type UndeclaredCssVariablesOptions,\n} from \"./css-variables\";\n// 0.34 (refactor audit 2026-10, TST-10): the environment jsdom lacks — a `matchMedia`\n// that answers from a viewport width (right at every text size) and a `ResizeObserver`\n// the test drives. Framework-free: each returns its own undo.\nexport {\n stubResizeObserver,\n stubViewportWidth,\n viewportMatchMedia,\n type ResizeObserverStub,\n type StubbedBoxSize,\n type ViewportOptions,\n} from \"./viewport\";\n"],"mappings":";AAOA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AAIP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAIK;","names":[]}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment stubs for an app's own tests (0.34, refactor audit 2026-10, TST-10): the
|
|
3
|
+
* two browser APIs jsdom does not have and the kit's layout reads — `matchMedia` and
|
|
4
|
+
* `ResizeObserver`.
|
|
5
|
+
*
|
|
6
|
+
* Every suite rebuilt them by hand: the kit stubbed `matchMedia` in 25 files and defined
|
|
7
|
+
* the same `stubPhone()` eight times, keksdose stubs it in 41, and most copies answer
|
|
8
|
+
* one literal string. That breaks quietly at Large text, where `md` is 960 px and the
|
|
9
|
+
* phone query the kit writes is `(width < 960px)`, not `(width < 768px)`. These answer
|
|
10
|
+
* every width query from a WIDTH, as a browser does, so they stay right at every text
|
|
11
|
+
* size (docs/text-size-harmonization.md §3.3). The reference is keksdose's
|
|
12
|
+
* `frontend/src/test/viewport.ts`, which this generalises.
|
|
13
|
+
*
|
|
14
|
+
* Framework-free, like the rest of `@eifi1/ui-kit/testing`: nothing here imports vitest
|
|
15
|
+
* or jest. Each stub returns its own undo, so it works under either runner, and a suite
|
|
16
|
+
* that prefers `vi.stubGlobal` passes it {@link viewportMatchMedia} instead.
|
|
17
|
+
*/
|
|
18
|
+
/** The media features a test may want besides the width. Each is off by default. */
|
|
19
|
+
export interface ViewportOptions {
|
|
20
|
+
/** The primary pointer is a finger: `(pointer: coarse)`, `(any-pointer: coarse)` and
|
|
21
|
+
* `(hover: none)` match; `(pointer: fine)` and `(hover: hover)` do not. */
|
|
22
|
+
coarse?: boolean;
|
|
23
|
+
/** The person asked for less motion: `(prefers-reduced-motion: reduce)` matches, and
|
|
24
|
+
* the kit's overlays skip their exit animations. */
|
|
25
|
+
reducedMotion?: boolean;
|
|
26
|
+
/** `(prefers-color-scheme: dark)` matches (`light` does not). */
|
|
27
|
+
dark?: boolean;
|
|
28
|
+
/** `(prefers-contrast: more)` matches. */
|
|
29
|
+
moreContrast?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* A `window.matchMedia` for a viewport `width` CSS px wide.
|
|
33
|
+
*
|
|
34
|
+
* Width queries answer from `width`: the range syntax the kit writes for `max-*`
|
|
35
|
+
* (`(width < 768px)`) and every other comparison, `(min-width: …)` and `(max-width: …)`,
|
|
36
|
+
* in px or rem; `and` and comma lists combine as in CSS. The features in `options` answer
|
|
37
|
+
* as set there; every other query is false. The lists it returns never change, so
|
|
38
|
+
* nothing fires `change`: a test that changes the width stubs again and renders again.
|
|
39
|
+
*
|
|
40
|
+
* Hand it to the runner's own global stub where the suite undoes stubs that way —
|
|
41
|
+
* `vi.stubGlobal("matchMedia", viewportMatchMedia(375))` — or use
|
|
42
|
+
* {@link stubViewportWidth}.
|
|
43
|
+
*/
|
|
44
|
+
export declare function viewportMatchMedia(width: number, options?: ViewportOptions): (query: string) => MediaQueryList;
|
|
45
|
+
/**
|
|
46
|
+
* Make `window.matchMedia` answer as a viewport `width` CSS px wide (see
|
|
47
|
+
* {@link viewportMatchMedia}), and return the undo: it puts back what was there, which
|
|
48
|
+
* in jsdom is nothing — no `matchMedia` at all, the desktop fallback of every kit hook.
|
|
49
|
+
*
|
|
50
|
+
* ```ts
|
|
51
|
+
* let undo = () => {};
|
|
52
|
+
* afterEach(() => undo());
|
|
53
|
+
* it("shows cards on a phone", () => {
|
|
54
|
+
* undo = stubViewportWidth(375);
|
|
55
|
+
* …
|
|
56
|
+
* });
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* Right at every text size: at Large the kit's phone query is `(width < 960px)`, which a
|
|
60
|
+
* 375 px viewport matches and a 1280 px one does not, as in a browser.
|
|
61
|
+
*/
|
|
62
|
+
export declare function stubViewportWidth(width: number, options?: ViewportOptions): () => void;
|
|
63
|
+
/** A box size for {@link ResizeObserverStub.resize}, in CSS px. */
|
|
64
|
+
export interface StubbedBoxSize {
|
|
65
|
+
width: number;
|
|
66
|
+
height: number;
|
|
67
|
+
}
|
|
68
|
+
/** What {@link stubResizeObserver} returns: the test drives the observers. */
|
|
69
|
+
export interface ResizeObserverStub {
|
|
70
|
+
/**
|
|
71
|
+
* Report `target` at `size` to every live observer watching it, as a browser does once
|
|
72
|
+
* layout settles: one entry, with `contentRect` and the three box sizes all `size`.
|
|
73
|
+
* Synchronous; wrap it in `act()` when the callback sets state.
|
|
74
|
+
*/
|
|
75
|
+
resize(target: Element, size: StubbedBoxSize): void;
|
|
76
|
+
/** The elements some live observer watches now, each once. */
|
|
77
|
+
observed(): Element[];
|
|
78
|
+
/** Put back the `ResizeObserver` that was there before — in jsdom, none. */
|
|
79
|
+
restore(): void;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Install a `ResizeObserver` the test drives. jsdom has none, and lays nothing out, so a
|
|
83
|
+
* component that measures itself (a windowed list, a fitted chart, a measured grid)
|
|
84
|
+
* either crashes on the missing global or never learns a size. Observers here record
|
|
85
|
+
* what they watch and are called only by {@link ResizeObserverStub.resize}.
|
|
86
|
+
*
|
|
87
|
+
* ```ts
|
|
88
|
+
* const ro = stubResizeObserver();
|
|
89
|
+
* afterEach(() => ro.restore());
|
|
90
|
+
* act(() => ro.resize(screen.getByRole("list"), { width: 400, height: 320 }));
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export declare function stubResizeObserver(): ResizeObserverStub;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
function lengthPx(value, unit) {
|
|
3
|
+
return unit === "px" ? Number(value) : Number(value) * 16;
|
|
4
|
+
}
|
|
5
|
+
const RANGE = /^\(\s*width\s*(<=|>=|<|>)\s*([\d.]+)(px|r?em)\s*\)$/;
|
|
6
|
+
const MIN_MAX = /^\(\s*(min|max)-width\s*:\s*([\d.]+)(px|r?em)\s*\)$/;
|
|
7
|
+
const FEATURE = /^\(\s*([a-z-]+)\s*:\s*([a-z-]+)\s*\)$/;
|
|
8
|
+
function condition(part, width, options) {
|
|
9
|
+
const q = part.trim();
|
|
10
|
+
if (q === "all" || q === "screen") return true;
|
|
11
|
+
const range = RANGE.exec(q);
|
|
12
|
+
if (range) {
|
|
13
|
+
const px = lengthPx(range[2], range[3]);
|
|
14
|
+
switch (range[1]) {
|
|
15
|
+
case "<":
|
|
16
|
+
return width < px;
|
|
17
|
+
case "<=":
|
|
18
|
+
return width <= px;
|
|
19
|
+
case ">":
|
|
20
|
+
return width > px;
|
|
21
|
+
default:
|
|
22
|
+
return width >= px;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const minMax = MIN_MAX.exec(q);
|
|
26
|
+
if (minMax) {
|
|
27
|
+
const px = lengthPx(minMax[2], minMax[3]);
|
|
28
|
+
return minMax[1] === "min" ? width >= px : width <= px;
|
|
29
|
+
}
|
|
30
|
+
const feature = FEATURE.exec(q);
|
|
31
|
+
if (!feature) return false;
|
|
32
|
+
const [, name, value] = feature;
|
|
33
|
+
const coarse = Boolean(options.coarse);
|
|
34
|
+
switch (name) {
|
|
35
|
+
case "pointer":
|
|
36
|
+
case "any-pointer":
|
|
37
|
+
return value === (coarse ? "coarse" : "fine");
|
|
38
|
+
case "hover":
|
|
39
|
+
case "any-hover":
|
|
40
|
+
return value === (coarse ? "none" : "hover");
|
|
41
|
+
case "prefers-reduced-motion":
|
|
42
|
+
return value === (options.reducedMotion ? "reduce" : "no-preference");
|
|
43
|
+
case "prefers-color-scheme":
|
|
44
|
+
return value === (options.dark ? "dark" : "light");
|
|
45
|
+
case "prefers-contrast":
|
|
46
|
+
return value === (options.moreContrast ? "more" : "no-preference");
|
|
47
|
+
default:
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
function viewportMatchMedia(width, options = {}) {
|
|
52
|
+
const answer = (query) => query.split(",").some(
|
|
53
|
+
(alternative) => alternative.split(/\s+and\s+/).every((part) => condition(part, width, options))
|
|
54
|
+
);
|
|
55
|
+
return (query) => ({
|
|
56
|
+
matches: answer(query),
|
|
57
|
+
media: query,
|
|
58
|
+
onchange: null,
|
|
59
|
+
addEventListener: () => {
|
|
60
|
+
},
|
|
61
|
+
removeEventListener: () => {
|
|
62
|
+
},
|
|
63
|
+
addListener: () => {
|
|
64
|
+
},
|
|
65
|
+
removeListener: () => {
|
|
66
|
+
},
|
|
67
|
+
dispatchEvent: () => false
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function stubViewportWidth(width, options = {}) {
|
|
71
|
+
const before = Object.getOwnPropertyDescriptor(window, "matchMedia");
|
|
72
|
+
Object.defineProperty(window, "matchMedia", {
|
|
73
|
+
configurable: true,
|
|
74
|
+
writable: true,
|
|
75
|
+
value: viewportMatchMedia(width, options)
|
|
76
|
+
});
|
|
77
|
+
return () => {
|
|
78
|
+
if (before) Object.defineProperty(window, "matchMedia", before);
|
|
79
|
+
else Reflect.deleteProperty(window, "matchMedia");
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function stubResizeObserver() {
|
|
83
|
+
const live = /* @__PURE__ */ new Set();
|
|
84
|
+
class StubResizeObserver {
|
|
85
|
+
constructor(callback) {
|
|
86
|
+
this.callback = callback;
|
|
87
|
+
live.add(this);
|
|
88
|
+
}
|
|
89
|
+
callback;
|
|
90
|
+
targets = /* @__PURE__ */ new Set();
|
|
91
|
+
observe(target) {
|
|
92
|
+
this.targets.add(target);
|
|
93
|
+
}
|
|
94
|
+
unobserve(target) {
|
|
95
|
+
this.targets.delete(target);
|
|
96
|
+
}
|
|
97
|
+
disconnect() {
|
|
98
|
+
this.targets.clear();
|
|
99
|
+
live.delete(this);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
const before = Object.getOwnPropertyDescriptor(globalThis, "ResizeObserver");
|
|
103
|
+
Object.defineProperty(globalThis, "ResizeObserver", {
|
|
104
|
+
configurable: true,
|
|
105
|
+
writable: true,
|
|
106
|
+
value: StubResizeObserver
|
|
107
|
+
});
|
|
108
|
+
return {
|
|
109
|
+
resize(target, { width, height }) {
|
|
110
|
+
const box = [{ inlineSize: width, blockSize: height }];
|
|
111
|
+
const contentRect = {
|
|
112
|
+
x: 0,
|
|
113
|
+
y: 0,
|
|
114
|
+
top: 0,
|
|
115
|
+
left: 0,
|
|
116
|
+
width,
|
|
117
|
+
height,
|
|
118
|
+
right: width,
|
|
119
|
+
bottom: height,
|
|
120
|
+
toJSON: () => ({ x: 0, y: 0, width, height })
|
|
121
|
+
};
|
|
122
|
+
const entry = {
|
|
123
|
+
target,
|
|
124
|
+
contentRect,
|
|
125
|
+
borderBoxSize: box,
|
|
126
|
+
contentBoxSize: box,
|
|
127
|
+
devicePixelContentBoxSize: box
|
|
128
|
+
};
|
|
129
|
+
for (const observer of [...live]) {
|
|
130
|
+
if (observer.targets.has(target)) {
|
|
131
|
+
observer.callback([entry], observer);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
observed() {
|
|
136
|
+
const all = [];
|
|
137
|
+
for (const observer of live) for (const target of observer.targets) if (!all.includes(target)) all.push(target);
|
|
138
|
+
return all;
|
|
139
|
+
},
|
|
140
|
+
restore() {
|
|
141
|
+
live.clear();
|
|
142
|
+
if (before) Object.defineProperty(globalThis, "ResizeObserver", before);
|
|
143
|
+
else Reflect.deleteProperty(globalThis, "ResizeObserver");
|
|
144
|
+
}
|
|
145
|
+
};
|
|
146
|
+
}
|
|
147
|
+
export {
|
|
148
|
+
stubResizeObserver,
|
|
149
|
+
stubViewportWidth,
|
|
150
|
+
viewportMatchMedia
|
|
151
|
+
};
|
|
152
|
+
//# sourceMappingURL=viewport.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/testing/viewport.ts"],"sourcesContent":["/**\n * Environment stubs for an app's own tests (0.34, refactor audit 2026-10, TST-10): the\n * two browser APIs jsdom does not have and the kit's layout reads — `matchMedia` and\n * `ResizeObserver`.\n *\n * Every suite rebuilt them by hand: the kit stubbed `matchMedia` in 25 files and defined\n * the same `stubPhone()` eight times, keksdose stubs it in 41, and most copies answer\n * one literal string. That breaks quietly at Large text, where `md` is 960 px and the\n * phone query the kit writes is `(width < 960px)`, not `(width < 768px)`. These answer\n * every width query from a WIDTH, as a browser does, so they stay right at every text\n * size (docs/text-size-harmonization.md §3.3). The reference is keksdose's\n * `frontend/src/test/viewport.ts`, which this generalises.\n *\n * Framework-free, like the rest of `@eifi1/ui-kit/testing`: nothing here imports vitest\n * or jest. Each stub returns its own undo, so it works under either runner, and a suite\n * that prefers `vi.stubGlobal` passes it {@link viewportMatchMedia} instead.\n */\n\n/** The media features a test may want besides the width. Each is off by default. */\nexport interface ViewportOptions {\n /** The primary pointer is a finger: `(pointer: coarse)`, `(any-pointer: coarse)` and\n * `(hover: none)` match; `(pointer: fine)` and `(hover: hover)` do not. */\n coarse?: boolean;\n /** The person asked for less motion: `(prefers-reduced-motion: reduce)` matches, and\n * the kit's overlays skip their exit animations. */\n reducedMotion?: boolean;\n /** `(prefers-color-scheme: dark)` matches (`light` does not). */\n dark?: boolean;\n /** `(prefers-contrast: more)` matches. */\n moreContrast?: boolean;\n}\n\n/** One length in CSS px. A media query's `rem`/`em` is the browser's default font size,\n * 16 px, never `<html>`'s — the kit's own `breakpointQuery` writes px. */\nfunction lengthPx(value: string, unit: string): number {\n return unit === \"px\" ? Number(value) : Number(value) * 16;\n}\n\nconst RANGE = /^\\(\\s*width\\s*(<=|>=|<|>)\\s*([\\d.]+)(px|r?em)\\s*\\)$/;\nconst MIN_MAX = /^\\(\\s*(min|max)-width\\s*:\\s*([\\d.]+)(px|r?em)\\s*\\)$/;\nconst FEATURE = /^\\(\\s*([a-z-]+)\\s*:\\s*([a-z-]+)\\s*\\)$/;\n\n/** One `(…)` condition, or a media type. */\nfunction condition(part: string, width: number, options: ViewportOptions): boolean {\n const q = part.trim();\n if (q === \"all\" || q === \"screen\") return true;\n const range = RANGE.exec(q);\n if (range) {\n const px = lengthPx(range[2], range[3]);\n switch (range[1]) {\n case \"<\":\n return width < px;\n case \"<=\":\n return width <= px;\n case \">\":\n return width > px;\n default:\n return width >= px;\n }\n }\n const minMax = MIN_MAX.exec(q);\n if (minMax) {\n const px = lengthPx(minMax[2], minMax[3]);\n return minMax[1] === \"min\" ? width >= px : width <= px;\n }\n const feature = FEATURE.exec(q);\n if (!feature) return false;\n const [, name, value] = feature;\n const coarse = Boolean(options.coarse);\n switch (name) {\n case \"pointer\":\n case \"any-pointer\":\n return value === (coarse ? \"coarse\" : \"fine\");\n case \"hover\":\n case \"any-hover\":\n return value === (coarse ? \"none\" : \"hover\");\n case \"prefers-reduced-motion\":\n return value === (options.reducedMotion ? \"reduce\" : \"no-preference\");\n case \"prefers-color-scheme\":\n return value === (options.dark ? \"dark\" : \"light\");\n case \"prefers-contrast\":\n return value === (options.moreContrast ? \"more\" : \"no-preference\");\n default:\n return false;\n }\n}\n\n/**\n * A `window.matchMedia` for a viewport `width` CSS px wide.\n *\n * Width queries answer from `width`: the range syntax the kit writes for `max-*`\n * (`(width < 768px)`) and every other comparison, `(min-width: …)` and `(max-width: …)`,\n * in px or rem; `and` and comma lists combine as in CSS. The features in `options` answer\n * as set there; every other query is false. The lists it returns never change, so\n * nothing fires `change`: a test that changes the width stubs again and renders again.\n *\n * Hand it to the runner's own global stub where the suite undoes stubs that way —\n * `vi.stubGlobal(\"matchMedia\", viewportMatchMedia(375))` — or use\n * {@link stubViewportWidth}.\n */\nexport function viewportMatchMedia(\n width: number,\n options: ViewportOptions = {},\n): (query: string) => MediaQueryList {\n const answer = (query: string) =>\n query\n .split(\",\")\n .some((alternative) =>\n alternative.split(/\\s+and\\s+/).every((part) => condition(part, width, options)),\n );\n return (query: string) =>\n ({\n matches: answer(query),\n media: query,\n onchange: null,\n addEventListener: () => {},\n removeEventListener: () => {},\n addListener: () => {},\n removeListener: () => {},\n dispatchEvent: () => false,\n }) as unknown as MediaQueryList;\n}\n\n/**\n * Make `window.matchMedia` answer as a viewport `width` CSS px wide (see\n * {@link viewportMatchMedia}), and return the undo: it puts back what was there, which\n * in jsdom is nothing — no `matchMedia` at all, the desktop fallback of every kit hook.\n *\n * ```ts\n * let undo = () => {};\n * afterEach(() => undo());\n * it(\"shows cards on a phone\", () => {\n * undo = stubViewportWidth(375);\n * …\n * });\n * ```\n *\n * Right at every text size: at Large the kit's phone query is `(width < 960px)`, which a\n * 375 px viewport matches and a 1280 px one does not, as in a browser.\n */\nexport function stubViewportWidth(width: number, options: ViewportOptions = {}): () => void {\n const before = Object.getOwnPropertyDescriptor(window, \"matchMedia\");\n Object.defineProperty(window, \"matchMedia\", {\n configurable: true,\n writable: true,\n value: viewportMatchMedia(width, options),\n });\n return () => {\n if (before) Object.defineProperty(window, \"matchMedia\", before);\n else Reflect.deleteProperty(window, \"matchMedia\");\n };\n}\n\n/** A box size for {@link ResizeObserverStub.resize}, in CSS px. */\nexport interface StubbedBoxSize {\n width: number;\n height: number;\n}\n\n/** What {@link stubResizeObserver} returns: the test drives the observers. */\nexport interface ResizeObserverStub {\n /**\n * Report `target` at `size` to every live observer watching it, as a browser does once\n * layout settles: one entry, with `contentRect` and the three box sizes all `size`.\n * Synchronous; wrap it in `act()` when the callback sets state.\n */\n resize(target: Element, size: StubbedBoxSize): void;\n /** The elements some live observer watches now, each once. */\n observed(): Element[];\n /** Put back the `ResizeObserver` that was there before — in jsdom, none. */\n restore(): void;\n}\n\n/**\n * Install a `ResizeObserver` the test drives. jsdom has none, and lays nothing out, so a\n * component that measures itself (a windowed list, a fitted chart, a measured grid)\n * either crashes on the missing global or never learns a size. Observers here record\n * what they watch and are called only by {@link ResizeObserverStub.resize}.\n *\n * ```ts\n * const ro = stubResizeObserver();\n * afterEach(() => ro.restore());\n * act(() => ro.resize(screen.getByRole(\"list\"), { width: 400, height: 320 }));\n * ```\n */\nexport function stubResizeObserver(): ResizeObserverStub {\n const live = new Set<StubResizeObserver>();\n\n class StubResizeObserver {\n readonly targets = new Set<Element>();\n constructor(readonly callback: ResizeObserverCallback) {\n live.add(this);\n }\n observe(target: Element) {\n this.targets.add(target);\n }\n unobserve(target: Element) {\n this.targets.delete(target);\n }\n disconnect() {\n this.targets.clear();\n live.delete(this);\n }\n }\n\n const before = Object.getOwnPropertyDescriptor(globalThis, \"ResizeObserver\");\n Object.defineProperty(globalThis, \"ResizeObserver\", {\n configurable: true,\n writable: true,\n value: StubResizeObserver,\n });\n\n return {\n resize(target, { width, height }) {\n const box = [{ inlineSize: width, blockSize: height }];\n const contentRect = {\n x: 0,\n y: 0,\n top: 0,\n left: 0,\n width,\n height,\n right: width,\n bottom: height,\n toJSON: () => ({ x: 0, y: 0, width, height }),\n };\n const entry = {\n target,\n contentRect,\n borderBoxSize: box,\n contentBoxSize: box,\n devicePixelContentBoxSize: box,\n } as unknown as ResizeObserverEntry;\n for (const observer of [...live]) {\n if (observer.targets.has(target)) {\n observer.callback([entry], observer as unknown as ResizeObserver);\n }\n }\n },\n observed() {\n const all: Element[] = [];\n for (const observer of live) for (const target of observer.targets) if (!all.includes(target)) all.push(target);\n return all;\n },\n restore() {\n live.clear();\n if (before) Object.defineProperty(globalThis, \"ResizeObserver\", before);\n else Reflect.deleteProperty(globalThis, \"ResizeObserver\");\n },\n };\n}\n"],"mappings":";AAkCA,SAAS,SAAS,OAAe,MAAsB;AACrD,SAAO,SAAS,OAAO,OAAO,KAAK,IAAI,OAAO,KAAK,IAAI;AACzD;AAEA,MAAM,QAAQ;AACd,MAAM,UAAU;AAChB,MAAM,UAAU;AAGhB,SAAS,UAAU,MAAc,OAAe,SAAmC;AACjF,QAAM,IAAI,KAAK,KAAK;AACpB,MAAI,MAAM,SAAS,MAAM,SAAU,QAAO;AAC1C,QAAM,QAAQ,MAAM,KAAK,CAAC;AAC1B,MAAI,OAAO;AACT,UAAM,KAAK,SAAS,MAAM,CAA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AAA,QACH,KAAK;AAAA,QACL,MAAM;AAAA,QACN;AAAA,QACA;AAAA,QACA,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,QAAQ,OAAO,EAAE,GAAG,GAAG,GAAG,GAAG,OAAO,OAAO;AAAA,MAC7C;AACA,YAAM,QAAQ;AAAA,QACZ;AAAA,QACA;AAAA,QACA,eAAe;AAAA,QACf,gBAAgB;AAAA,QAChB,2BAA2B;AAAA,MAC7B;AACA,iBAAW,YAAY,CAAC,GAAG,IAAI,GAAG;AAChC,YAAI,SAAS,QAAQ,IAAI,MAAM,GAAG;AAChC,mBAAS,SAAS,CAAC,KAAK,GAAG,QAAqC;AAAA,QAClE;AAAA,MACF;AAAA,IACF;AAAA,IACA,WAAW;AACT,YAAM,MAAiB,CAAC;AACxB,iBAAW,YAAY,KAAM,YAAW,UAAU,SAAS,QAAS,KAAI,CAAC,IAAI,SAAS,MAAM,EAAG,KAAI,KAAK,MAAM;AAC9G,aAAO;AAAA,IACT;AAAA,IACA,UAAU;AACR,WAAK,MAAM;AACX,UAAI,OAAQ,QAAO,eAAe,YAAY,kBAAkB,MAAM;AAAA,UACjE,SAAQ,eAAe,YAAY,gBAAgB;AAAA,IAC1D;AAAA,EACF;AACF;","names":[]}
|
|
@@ -5,23 +5,23 @@
|
|
|
5
5
|
* exist — a series with no stroke at all. A fractional index is truncated, and one
|
|
6
6
|
* that is not a number (NaN, ±Infinity — an `indexOf` miss divided by something)
|
|
7
7
|
* takes the first colour rather than `var(--chart-NaN)`. */
|
|
8
|
-
declare function paletteFor(index: number): string;
|
|
8
|
+
export declare function paletteFor(index: number): string;
|
|
9
9
|
/** Semantic money colours, theme-aware via tokens. Pair with +/- and arrow
|
|
10
10
|
cues at the call site so colour is never the only signal (CVD). */
|
|
11
|
-
declare const CHART_COLORS: {
|
|
11
|
+
export declare const CHART_COLORS: {
|
|
12
12
|
readonly income: "var(--money-income)";
|
|
13
13
|
readonly expense: "var(--money-expense)";
|
|
14
14
|
readonly net: "var(--money-net)";
|
|
15
15
|
readonly assigned: "var(--brand)";
|
|
16
16
|
readonly activity: "var(--money-expense)";
|
|
17
17
|
};
|
|
18
|
-
declare const PALETTE_HEX: {
|
|
18
|
+
export declare const PALETTE_HEX: {
|
|
19
19
|
readonly light: readonly ["#332288", "#88ccee", "#44aa99", "#117733", "#999933", "#ddcc77", "#cc6677", "#882255", "#aa4499"];
|
|
20
20
|
readonly dark: readonly ["#7e72d6", "#9fd8f2", "#5fc4b0", "#3fa45f", "#bfbf5e", "#e8dda0", "#e08c9a", "#c25a78", "#cc78be"];
|
|
21
21
|
};
|
|
22
22
|
/** A heatmap's interpolation stops for one theme. Open string fields so any
|
|
23
23
|
palette preset (not just the built-in default) can supply its own stops. */
|
|
24
|
-
interface HeatStops {
|
|
24
|
+
export interface HeatStops {
|
|
25
25
|
neutral: string;
|
|
26
26
|
under: string;
|
|
27
27
|
over: string;
|
|
@@ -31,7 +31,7 @@ interface HeatStops {
|
|
|
31
31
|
}
|
|
32
32
|
/** Diverging (variance: under←0→over) and sequential (spending intensity)
|
|
33
33
|
heatmap stops, per theme. Teal = under/good, amber = over/spend = bad. */
|
|
34
|
-
declare const HEATMAP_HEX: {
|
|
34
|
+
export declare const HEATMAP_HEX: {
|
|
35
35
|
readonly light: {
|
|
36
36
|
readonly neutral: "#f1e7d2";
|
|
37
37
|
readonly under: "#0b6650";
|
|
@@ -50,7 +50,7 @@ declare const HEATMAP_HEX: {
|
|
|
50
50
|
};
|
|
51
51
|
};
|
|
52
52
|
/** Linear interpolate two #rrggbb hexes; `t` in [0,1]. Returns #rrggbb. */
|
|
53
|
-
declare function lerpHex(a: string, b: string, t: number): string;
|
|
53
|
+
export declare function lerpHex(a: string, b: string, t: number): string;
|
|
54
54
|
/** Pick a legible text colour (near-black / near-white) for a solid hex fill, by
|
|
55
55
|
MEASURING both against it and keeping the one that wins.
|
|
56
56
|
|
|
@@ -68,6 +68,4 @@ declare function lerpHex(a: string, b: string, t: number): string;
|
|
|
68
68
|
category with zero assigned and positive activity — a refund). Picking a constant
|
|
69
69
|
instead is what produced the earlier bug: the unparsed fill fell through to the
|
|
70
70
|
light ink, near-white on a near-white cell, and the figure was invisible. */
|
|
71
|
-
declare function textOn(hex: string): string;
|
|
72
|
-
|
|
73
|
-
export { CHART_COLORS, HEATMAP_HEX, type HeatStops, PALETTE_HEX, lerpHex, paletteFor, textOn };
|
|
71
|
+
export declare function textOn(hex: string): string;
|
package/dist/theme/color.d.ts
CHANGED
|
@@ -18,13 +18,13 @@
|
|
|
18
18
|
*
|
|
19
19
|
* Reference: Björn Ottosson, "A perceptual color space for image processing" (2020).
|
|
20
20
|
*/
|
|
21
|
-
interface Rgb {
|
|
21
|
+
export interface Rgb {
|
|
22
22
|
/** 0–255. */
|
|
23
23
|
r: number;
|
|
24
24
|
g: number;
|
|
25
25
|
b: number;
|
|
26
26
|
}
|
|
27
|
-
interface Oklch {
|
|
27
|
+
export interface Oklch {
|
|
28
28
|
/** Perceptual lightness, 0–1. */
|
|
29
29
|
l: number;
|
|
30
30
|
/** Chroma, 0–~0.4 in sRGB. */
|
|
@@ -33,9 +33,9 @@ interface Oklch {
|
|
|
33
33
|
h: number;
|
|
34
34
|
}
|
|
35
35
|
/** `#rgb` or `#rrggbb` → components, or null when it is neither. */
|
|
36
|
-
declare function parseHex(hex: string): Rgb | null;
|
|
37
|
-
declare function toHex({ r, g, b }: Rgb): string;
|
|
38
|
-
declare function rgbToOklch(rgb: Rgb): Oklch;
|
|
36
|
+
export declare function parseHex(hex: string): Rgb | null;
|
|
37
|
+
export declare function toHex({ r, g, b }: Rgb): string;
|
|
38
|
+
export declare function rgbToOklch(rgb: Rgb): Oklch;
|
|
39
39
|
/**
|
|
40
40
|
* OKLCH → sRGB, reducing CHROMA until the colour fits.
|
|
41
41
|
*
|
|
@@ -45,13 +45,13 @@ declare function rgbToOklch(rgb: Rgb): Oklch;
|
|
|
45
45
|
* recognisably the one that was asked for, which matters when the whole point is to
|
|
46
46
|
* derive a family at a fixed lightness.
|
|
47
47
|
*/
|
|
48
|
-
declare function oklchToRgb(target: Oklch): Rgb;
|
|
49
|
-
declare function hexToOklch(hex: string): Oklch | null;
|
|
50
|
-
declare function oklchToHex(lch: Oklch): string;
|
|
48
|
+
export declare function oklchToRgb(target: Oklch): Rgb;
|
|
49
|
+
export declare function hexToOklch(hex: string): Oklch | null;
|
|
50
|
+
export declare function oklchToHex(lch: Oklch): string;
|
|
51
51
|
/** WCAG 2.x relative luminance. */
|
|
52
|
-
declare function luminance(rgb: Rgb): number;
|
|
52
|
+
export declare function luminance(rgb: Rgb): number;
|
|
53
53
|
/** WCAG 2.x contrast ratio, 1–21. Order-independent. */
|
|
54
|
-
declare function contrast(a: Rgb | string, b: Rgb | string): number;
|
|
54
|
+
export declare function contrast(a: Rgb | string, b: Rgb | string): number;
|
|
55
55
|
/**
|
|
56
56
|
* The lightness at hue `h`, chroma `c` that hits `target` contrast against `against`.
|
|
57
57
|
*
|
|
@@ -65,14 +65,12 @@ declare function contrast(a: Rgb | string, b: Rgb | string): number;
|
|
|
65
65
|
* it returns the extreme end, and the caller should check the contrast it actually got
|
|
66
66
|
* rather than assuming success — `deriveTokenSet` does exactly that.
|
|
67
67
|
*/
|
|
68
|
-
declare function solveLightness(target: number, against: Rgb, h: number, c: number, direction: "lighter" | "darker"): number;
|
|
69
|
-
type CvdType = "protanopia" | "deuteranopia" | "tritanopia";
|
|
70
|
-
declare function simulateCvd(rgb: Rgb, type: CvdType): Rgb;
|
|
68
|
+
export declare function solveLightness(target: number, against: Rgb, h: number, c: number, direction: "lighter" | "darker"): number;
|
|
69
|
+
export type CvdType = "protanopia" | "deuteranopia" | "tritanopia";
|
|
70
|
+
export declare function simulateCvd(rgb: Rgb, type: CvdType): Rgb;
|
|
71
71
|
/**
|
|
72
72
|
* Perceptual distance in OKLab, which is what that space is FOR: a Euclidean distance
|
|
73
73
|
* in OKLab corresponds far more closely to "how different do these look" than one in
|
|
74
74
|
* sRGB, where the same numeric gap is obvious among greens and invisible among blues.
|
|
75
75
|
*/
|
|
76
|
-
declare function deltaE(a: Rgb, b: Rgb): number;
|
|
77
|
-
|
|
78
|
-
export { type CvdType, type Oklch, type Rgb, contrast, deltaE, hexToOklch, luminance, oklchToHex, oklchToRgb, parseHex, rgbToOklch, simulateCvd, solveLightness, toHex };
|
|
76
|
+
export declare function deltaE(a: Rgb, b: Rgb): number;
|
package/dist/theme/color.js
CHANGED
|
@@ -86,9 +86,10 @@ function solveLightness(target, against, h, c, direction) {
|
|
|
86
86
|
const bgL = rgbToOklch(against).l;
|
|
87
87
|
let lo = direction === "darker" ? 0 : bgL;
|
|
88
88
|
let hi = direction === "darker" ? bgL : 1;
|
|
89
|
+
const bg = toHex(against);
|
|
89
90
|
for (let i = 0; i < 24; i++) {
|
|
90
91
|
const mid = (lo + hi) / 2;
|
|
91
|
-
const got = contrast(oklchToRgb({ l: mid, c, h }),
|
|
92
|
+
const got = contrast(toHex(oklchToRgb({ l: mid, c, h })), bg);
|
|
92
93
|
if (got < target) {
|
|
93
94
|
if (direction === "darker") hi = mid;
|
|
94
95
|
else lo = mid;
|
package/dist/theme/color.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/theme/color.ts"],"sourcesContent":["/**\n * Colour maths for the palette system: sRGB ↔ OKLab ↔ OKLCH, WCAG contrast, gamut\n * clipping, and colour-vision-deficiency simulation.\n *\n * Dependency-free on purpose. This package already ships 48MB of runtime dependencies\n * for a 1.4MB library, and a colour-space conversion is forty lines of arithmetic that\n * will not change — importing culori or chroma-js to get it would be the largest\n * dependency in the kit, paid for by every consumer, to avoid writing down formulas\n * that were published once and are now fixed.\n *\n * **Why OKLCH rather than HSL.** HSL's \"lightness\" is not lightness: `hsl(60 100% 50%)`\n * (yellow) and `hsl(240 100% 50%)` (blue) claim the same 50% and differ by a factor of\n * about twelve in perceived brightness. Any scheme that derives a palette by holding HSL\n * lightness constant therefore produces a set that looks wildly uneven, and any scheme\n * that solves for contrast in HSL has to solve separately per hue. OKLab is built so a\n * given L means the same apparent lightness at every hue, which is what makes \"same\n * lightness, different hue\" a usable rule and what makes a contrast solve converge.\n *\n * Reference: Björn Ottosson, \"A perceptual color space for image processing\" (2020).\n */\n\nexport interface Rgb {\n /** 0–255. */\n r: number;\n g: number;\n b: number;\n}\n\nexport interface Oklch {\n /** Perceptual lightness, 0–1. */\n l: number;\n /** Chroma, 0–~0.4 in sRGB. */\n c: number;\n /** Hue angle in degrees, 0–360. */\n h: number;\n}\n\n/* ── sRGB ─────────────────────────────────────────────────────────────────── */\n\n/** `#rgb` or `#rrggbb` → components, or null when it is neither. */\nexport function parseHex(hex: string): Rgb | null {\n const h = hex.trim().replace(/^#/, \"\");\n const full =\n h.length === 3\n ? h\n .split(\"\")\n .map((c) => c + c)\n .join(\"\")\n : h;\n if (!/^[0-9a-fA-F]{6}$/.test(full)) return null;\n return {\n r: parseInt(full.slice(0, 2), 16),\n g: parseInt(full.slice(2, 4), 16),\n b: parseInt(full.slice(4, 6), 16),\n };\n}\n\nexport function toHex({ r, g, b }: Rgb): string {\n const part = (v: number) =>\n Math.max(0, Math.min(255, Math.round(v)))\n .toString(16)\n .padStart(2, \"0\");\n return `#${part(r)}${part(g)}${part(b)}`;\n}\n\n/** sRGB 0–255 → linear-light 0–1. The transfer function, not a gamma of 2.2. */\nfunction toLinear(channel: number): number {\n const c = channel / 255;\n return c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n}\n\nfunction fromLinear(channel: number): number {\n const c = channel <= 0.0031308 ? 12.92 * channel : 1.055 * channel ** (1 / 2.4) - 0.055;\n return c * 255;\n}\n\n/* ── OKLab / OKLCH ────────────────────────────────────────────────────────── */\n\nexport function rgbToOklch(rgb: Rgb): Oklch {\n const r = toLinear(rgb.r);\n const g = toLinear(rgb.g);\n const b = toLinear(rgb.b);\n\n const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);\n const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);\n const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);\n\n const L = 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s;\n const A = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s;\n const B = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s;\n\n const c = Math.sqrt(A * A + B * B);\n // Hue is meaningless at zero chroma; 0 keeps it stable rather than NaN-adjacent.\n const h = c < 1e-6 ? 0 : ((Math.atan2(B, A) * 180) / Math.PI + 360) % 360;\n return { l: L, c, h };\n}\n\n/** OKLCH → sRGB, WITHOUT gamut clipping. May return components outside 0–255. */\nfunction oklchToRgbRaw({ l, c, h }: Oklch): Rgb {\n const rad = (h * Math.PI) / 180;\n const A = c * Math.cos(rad);\n const B = c * Math.sin(rad);\n\n const l_ = (l + 0.3963377774 * A + 0.2158037573 * B) ** 3;\n const m_ = (l - 0.1055613458 * A - 0.0638541728 * B) ** 3;\n const s_ = (l - 0.0894841775 * A - 1.291485548 * B) ** 3;\n\n return {\n r: fromLinear(4.0767416621 * l_ - 3.3077115913 * m_ + 0.2309699292 * s_),\n g: fromLinear(-1.2684380046 * l_ + 2.6097574011 * m_ - 0.3413193965 * s_),\n b: fromLinear(-0.0041960863 * l_ - 0.7034186147 * m_ + 1.707614701 * s_),\n };\n}\n\nfunction inGamut({ r, g, b }: Rgb): boolean {\n const ok = (v: number) => v >= -0.5 && v <= 255.5;\n return ok(r) && ok(g) && ok(b);\n}\n\n/**\n * OKLCH → sRGB, reducing CHROMA until the colour fits.\n *\n * Clamping the channels instead — the obvious approach — shifts hue and lightness\n * together and unpredictably: a saturated blue that overflows clips to a different blue\n * that is also lighter. Holding L and h and giving up chroma keeps the colour\n * recognisably the one that was asked for, which matters when the whole point is to\n * derive a family at a fixed lightness.\n */\nexport function oklchToRgb(target: Oklch): Rgb {\n const direct = oklchToRgbRaw(target);\n if (inGamut(direct)) return direct;\n\n let lo = 0;\n let hi = target.c;\n // 20 halvings resolves chroma to ~4e-7, far below a perceptible step.\n for (let i = 0; i < 20; i++) {\n const mid = (lo + hi) / 2;\n if (inGamut(oklchToRgbRaw({ ...target, c: mid }))) lo = mid;\n else hi = mid;\n }\n return oklchToRgbRaw({ ...target, c: lo });\n}\n\nexport function hexToOklch(hex: string): Oklch | null {\n const rgb = parseHex(hex);\n return rgb ? rgbToOklch(rgb) : null;\n}\n\nexport function oklchToHex(lch: Oklch): string {\n return toHex(oklchToRgb(lch));\n}\n\n/* ── WCAG contrast ────────────────────────────────────────────────────────── */\n\n/** WCAG 2.x relative luminance. */\nexport function luminance(rgb: Rgb): number {\n return 0.2126 * toLinear(rgb.r) + 0.7152 * toLinear(rgb.g) + 0.0722 * toLinear(rgb.b);\n}\n\n/** WCAG 2.x contrast ratio, 1–21. Order-independent. */\nexport function contrast(a: Rgb | string, b: Rgb | string): number {\n const ra = typeof a === \"string\" ? parseHex(a) : a;\n const rb = typeof b === \"string\" ? parseHex(b) : b;\n if (!ra || !rb) return 1;\n const la = luminance(ra);\n const lb = luminance(rb);\n return (Math.max(la, lb) + 0.05) / (Math.min(la, lb) + 0.05);\n}\n\n/**\n * The lightness at hue `h`, chroma `c` that hits `target` contrast against `against`.\n *\n * Binary search rather than algebra: OKLab lightness does not map to WCAG luminance in\n * closed form, and it is not even monotonic in the general case once gamut clipping\n * starts reducing chroma. It IS monotonic over the half-range we search — away from the\n * background — which is why the direction is chosen first.\n *\n * Returns the best lightness found. If the target is unreachable at this hue and chroma\n * (a saturated yellow cannot make 7:1 against white at any lightness without going grey)\n * it returns the extreme end, and the caller should check the contrast it actually got\n * rather than assuming success — `deriveTokenSet` does exactly that.\n */\nexport function solveLightness(\n target: number,\n against: Rgb,\n h: number,\n c: number,\n direction: \"lighter\" | \"darker\",\n): number {\n // The half-range on the far side of the background from where we are heading.\n // Going darker, that is [0, backgroundL]; going lighter, [backgroundL, 1]. Contrast is\n // monotonic across each of those halves, which is what makes a binary search valid —\n // it is NOT monotonic across the whole 0..1 range, because it turns around at the\n // background's own lightness.\n const bgL = rgbToOklch(against).l;\n let lo = direction === \"darker\" ? 0 : bgL;\n let hi = direction === \"darker\" ? bgL : 1;\n\n for (let i = 0; i < 24; i++) {\n const mid = (lo + hi) / 2;\n const got = contrast(oklchToRgb({ l: mid, c, h }), against);\n // Moving AWAY from the background raises contrast; which way that is depends on\n // whether we are going lighter or darker.\n if (got < target) {\n if (direction === \"darker\") hi = mid;\n else lo = mid;\n } else if (direction === \"darker\") lo = mid;\n else hi = mid;\n }\n return direction === \"darker\" ? lo : hi;\n}\n\n/* ── Colour-vision deficiency ─────────────────────────────────────────────── */\n\nexport type CvdType = \"protanopia\" | \"deuteranopia\" | \"tritanopia\";\n\n/**\n * Brettel/Viénot-style dichromat simulation in linear RGB.\n *\n * An approximation, and a well-established one. It is here so the kit can FAIL a\n * categorical ramp that two of its series become indistinguishable under, rather than\n * asserting CVD-safety in a comment the way `chart-palette.ts` did — the audit found\n * four of the nine default light chart hues below the 3:1 they were claimed to hold.\n */\nconst CVD_MATRIX: Record<CvdType, number[][]> = {\n protanopia: [\n [0.1705, 0.8295, 0],\n [0.1705, 0.8295, 0],\n [-0.0045, 0.0045, 1],\n ],\n deuteranopia: [\n [0.33066, 0.66934, 0],\n [0.33066, 0.66934, 0],\n [-0.02785, 0.02785, 1],\n ],\n tritanopia: [\n [1, 0.1273, -0.1273],\n [0, 0.8739, 0.1261],\n [0, 0.8739, 0.1261],\n ],\n};\n\nexport function simulateCvd(rgb: Rgb, type: CvdType): Rgb {\n const m = CVD_MATRIX[type];\n const [r, g, b] = [toLinear(rgb.r), toLinear(rgb.g), toLinear(rgb.b)];\n return {\n r: fromLinear(m[0][0] * r + m[0][1] * g + m[0][2] * b),\n g: fromLinear(m[1][0] * r + m[1][1] * g + m[1][2] * b),\n b: fromLinear(m[2][0] * r + m[2][1] * g + m[2][2] * b),\n };\n}\n\n/**\n * Perceptual distance in OKLab, which is what that space is FOR: a Euclidean distance\n * in OKLab corresponds far more closely to \"how different do these look\" than one in\n * sRGB, where the same numeric gap is obvious among greens and invisible among blues.\n */\nexport function deltaE(a: Rgb, b: Rgb): number {\n const A = rgbToOklch(a);\n const B = rgbToOklch(b);\n const aA = A.c * Math.cos((A.h * Math.PI) / 180);\n const aB = A.c * Math.sin((A.h * Math.PI) / 180);\n const bA = B.c * Math.cos((B.h * Math.PI) / 180);\n const bB = B.c * Math.sin((B.h * Math.PI) / 180);\n return Math.hypot(A.l - B.l, aA - bA, aB - bB);\n}\n"],"mappings":";AAwCO,SAAS,SAAS,KAAyB;AAChD,QAAM,IAAI,IAAI,KAAK,EAAE,QAAQ,MAAM,EAAE;AACrC,QAAM,OACJ,EAAE,WAAW,IACT,EACG,MAAM,EAAE,EACR,IAAI,CAAC,MAAM,IAAI,CAAC,EAChB,KAAK,EAAE,IACV;AACN,MAAI,CAAC,mBAAmB,KAAK,IAAI,EAAG,QAAO;AAC3C,SAAO;AAAA,IACL,GAAG,SAAS,KAAK,MAAM,GAAG,CAAC,GAAG,EAAE;AAAA,IAChC,GAAG,SAAS,KAAK,MAAM,GAAG,CAAC,GAAG,EAAE;AAAA,IAChC,GAAG,SAAS,KAAK,MAAM,GAAG,CAAC,GAAG,EAAE;AAAA,EAClC;AACF;AAEO,SAAS,MAAM,EAAE,GAAG,GAAG,EAAE,GAAgB;AAC9C,QAAM,OAAO,CAAC,MACZ,KAAK,IAAI,GAAG,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,EACrC,SAAS,EAAE,EACX,SAAS,GAAG,GAAG;AACpB,SAAO,IAAI,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC;AACxC;AAGA,SAAS,SAAS,SAAyB;AACzC,QAAM,IAAI,UAAU;AACpB,SAAO,KAAK,UAAU,IAAI,UAAU,IAAI,SAAS,UAAU;AAC7D;AAEA,SAAS,WAAW,SAAyB;AAC3C,QAAM,IAAI,WAAW,WA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AAC;AAAA,IACrD,GAAG,WAAW,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;AAAA,IACrD,GAAG,WAAW,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;AAAA,EACvD;AACF;AAOO,SAAS,OAAO,GAAQ,GAAgB;AAC7C,QAAM,IAAI,WAAW,CAAC;AACtB,QAAM,IAAI,WAAW,CAAC;AACtB,QAAM,KAAK,EAAE,IAAI,KAAK,IAAK,EAAE,IAAI,KAAK,KAAM,GAAG;AAC/C,QAAM,KAAK,EAAE,IAAI,KAAK,IAAK,EAAE,IAAI,KAAK,KAAM,GAAG;AAC/C,QAAM,KAAK,EAAE,IAAI,KAAK,IAAK,EAAE,IAAI,KAAK,KAAM,GAAG;AAC/C,QAAM,KAAK,EAAE,IAAI,KAAK,IAAK,EAAE,IAAI,KAAK,KAAM,GAAG;AAC/C,SAAO,KAAK,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,KAAK,EAAE;AAC/C;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../src/theme/color.ts"],"sourcesContent":["/**\n * Colour maths for the palette system: sRGB ↔ OKLab ↔ OKLCH, WCAG contrast, gamut\n * clipping, and colour-vision-deficiency simulation.\n *\n * Dependency-free on purpose. This package already ships 48MB of runtime dependencies\n * for a 1.4MB library, and a colour-space conversion is forty lines of arithmetic that\n * will not change — importing culori or chroma-js to get it would be the largest\n * dependency in the kit, paid for by every consumer, to avoid writing down formulas\n * that were published once and are now fixed.\n *\n * **Why OKLCH rather than HSL.** HSL's \"lightness\" is not lightness: `hsl(60 100% 50%)`\n * (yellow) and `hsl(240 100% 50%)` (blue) claim the same 50% and differ by a factor of\n * about twelve in perceived brightness. Any scheme that derives a palette by holding HSL\n * lightness constant therefore produces a set that looks wildly uneven, and any scheme\n * that solves for contrast in HSL has to solve separately per hue. OKLab is built so a\n * given L means the same apparent lightness at every hue, which is what makes \"same\n * lightness, different hue\" a usable rule and what makes a contrast solve converge.\n *\n * Reference: Björn Ottosson, \"A perceptual color space for image processing\" (2020).\n */\n\nexport interface Rgb {\n /** 0–255. */\n r: number;\n g: number;\n b: number;\n}\n\nexport interface Oklch {\n /** Perceptual lightness, 0–1. */\n l: number;\n /** Chroma, 0–~0.4 in sRGB. */\n c: number;\n /** Hue angle in degrees, 0–360. */\n h: number;\n}\n\n/* ── sRGB ─────────────────────────────────────────────────────────────────── */\n\n/** `#rgb` or `#rrggbb` → components, or null when it is neither. */\nexport function parseHex(hex: string): Rgb | null {\n const h = hex.trim().replace(/^#/, \"\");\n const full =\n h.length === 3\n ? h\n .split(\"\")\n .map((c) => c + c)\n .join(\"\")\n : h;\n if (!/^[0-9a-fA-F]{6}$/.test(full)) return null;\n return {\n r: parseInt(full.slice(0, 2), 16),\n g: parseInt(full.slice(2, 4), 16),\n b: parseInt(full.slice(4, 6), 16),\n };\n}\n\nexport function toHex({ r, g, b }: Rgb): string {\n const part = (v: number) =>\n Math.max(0, Math.min(255, Math.round(v)))\n .toString(16)\n .padStart(2, \"0\");\n return `#${part(r)}${part(g)}${part(b)}`;\n}\n\n/** sRGB 0–255 → linear-light 0–1. The transfer function, not a gamma of 2.2. */\nfunction toLinear(channel: number): number {\n const c = channel / 255;\n return c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4;\n}\n\nfunction fromLinear(channel: number): number {\n const c = channel <= 0.0031308 ? 12.92 * channel : 1.055 * channel ** (1 / 2.4) - 0.055;\n return c * 255;\n}\n\n/* ── OKLab / OKLCH ────────────────────────────────────────────────────────── */\n\nexport function rgbToOklch(rgb: Rgb): Oklch {\n const r = toLinear(rgb.r);\n const g = toLinear(rgb.g);\n const b = toLinear(rgb.b);\n\n const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);\n const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);\n const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);\n\n const L = 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s;\n const A = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s;\n const B = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s;\n\n const c = Math.sqrt(A * A + B * B);\n // Hue is meaningless at zero chroma; 0 keeps it stable rather than NaN-adjacent.\n const h = c < 1e-6 ? 0 : ((Math.atan2(B, A) * 180) / Math.PI + 360) % 360;\n return { l: L, c, h };\n}\n\n/** OKLCH → sRGB, WITHOUT gamut clipping. May return components outside 0–255. */\nfunction oklchToRgbRaw({ l, c, h }: Oklch): Rgb {\n const rad = (h * Math.PI) / 180;\n const A = c * Math.cos(rad);\n const B = c * Math.sin(rad);\n\n const l_ = (l + 0.3963377774 * A + 0.2158037573 * B) ** 3;\n const m_ = (l - 0.1055613458 * A - 0.0638541728 * B) ** 3;\n const s_ = (l - 0.0894841775 * A - 1.291485548 * B) ** 3;\n\n return {\n r: fromLinear(4.0767416621 * l_ - 3.3077115913 * m_ + 0.2309699292 * s_),\n g: fromLinear(-1.2684380046 * l_ + 2.6097574011 * m_ - 0.3413193965 * s_),\n b: fromLinear(-0.0041960863 * l_ - 0.7034186147 * m_ + 1.707614701 * s_),\n };\n}\n\nfunction inGamut({ r, g, b }: Rgb): boolean {\n const ok = (v: number) => v >= -0.5 && v <= 255.5;\n return ok(r) && ok(g) && ok(b);\n}\n\n/**\n * OKLCH → sRGB, reducing CHROMA until the colour fits.\n *\n * Clamping the channels instead — the obvious approach — shifts hue and lightness\n * together and unpredictably: a saturated blue that overflows clips to a different blue\n * that is also lighter. Holding L and h and giving up chroma keeps the colour\n * recognisably the one that was asked for, which matters when the whole point is to\n * derive a family at a fixed lightness.\n */\nexport function oklchToRgb(target: Oklch): Rgb {\n const direct = oklchToRgbRaw(target);\n if (inGamut(direct)) return direct;\n\n let lo = 0;\n let hi = target.c;\n // 20 halvings resolves chroma to ~4e-7, far below a perceptible step.\n for (let i = 0; i < 20; i++) {\n const mid = (lo + hi) / 2;\n if (inGamut(oklchToRgbRaw({ ...target, c: mid }))) lo = mid;\n else hi = mid;\n }\n return oklchToRgbRaw({ ...target, c: lo });\n}\n\nexport function hexToOklch(hex: string): Oklch | null {\n const rgb = parseHex(hex);\n return rgb ? rgbToOklch(rgb) : null;\n}\n\nexport function oklchToHex(lch: Oklch): string {\n return toHex(oklchToRgb(lch));\n}\n\n/* ── WCAG contrast ────────────────────────────────────────────────────────── */\n\n/** WCAG 2.x relative luminance. */\nexport function luminance(rgb: Rgb): number {\n return 0.2126 * toLinear(rgb.r) + 0.7152 * toLinear(rgb.g) + 0.0722 * toLinear(rgb.b);\n}\n\n/** WCAG 2.x contrast ratio, 1–21. Order-independent. */\nexport function contrast(a: Rgb | string, b: Rgb | string): number {\n const ra = typeof a === \"string\" ? parseHex(a) : a;\n const rb = typeof b === \"string\" ? parseHex(b) : b;\n if (!ra || !rb) return 1;\n const la = luminance(ra);\n const lb = luminance(rb);\n return (Math.max(la, lb) + 0.05) / (Math.min(la, lb) + 0.05);\n}\n\n/**\n * The lightness at hue `h`, chroma `c` that hits `target` contrast against `against`.\n *\n * Binary search rather than algebra: OKLab lightness does not map to WCAG luminance in\n * closed form, and it is not even monotonic in the general case once gamut clipping\n * starts reducing chroma. It IS monotonic over the half-range we search — away from the\n * background — which is why the direction is chosen first.\n *\n * Returns the best lightness found. If the target is unreachable at this hue and chroma\n * (a saturated yellow cannot make 7:1 against white at any lightness without going grey)\n * it returns the extreme end, and the caller should check the contrast it actually got\n * rather than assuming success — `deriveTokenSet` does exactly that.\n */\nexport function solveLightness(\n target: number,\n against: Rgb,\n h: number,\n c: number,\n direction: \"lighter\" | \"darker\",\n): number {\n // The half-range on the far side of the background from where we are heading.\n // Going darker, that is [0, backgroundL]; going lighter, [backgroundL, 1]. Contrast is\n // monotonic across each of those halves, which is what makes a binary search valid —\n // it is NOT monotonic across the whole 0..1 range, because it turns around at the\n // background's own lightness.\n const bgL = rgbToOklch(against).l;\n let lo = direction === \"darker\" ? 0 : bgL;\n let hi = direction === \"darker\" ? bgL : 1;\n // Measured on the HEX both colours are painted as, never on the float (round 0.34\n // BUG-8): a solve that stopped on the float colour rounded to a hex just under the\n // target — brand #000000's light income figure solved to 4.5000 and shipped at 4.49:1.\n // Rounding keeps contrast monotonic in each half, so the bisection still holds, and\n // the side it returns is the side whose hex clears the target.\n const bg = toHex(against);\n\n for (let i = 0; i < 24; i++) {\n const mid = (lo + hi) / 2;\n const got = contrast(toHex(oklchToRgb({ l: mid, c, h })), bg);\n // Moving AWAY from the background raises contrast; which way that is depends on\n // whether we are going lighter or darker.\n if (got < target) {\n if (direction === \"darker\") hi = mid;\n else lo = mid;\n } else if (direction === \"darker\") lo = mid;\n else hi = mid;\n }\n return direction === \"darker\" ? lo : hi;\n}\n\n/* ── Colour-vision deficiency ─────────────────────────────────────────────── */\n\nexport type CvdType = \"protanopia\" | \"deuteranopia\" | \"tritanopia\";\n\n/**\n * Brettel/Viénot-style dichromat simulation in linear RGB.\n *\n * An approximation, and a well-established one. It is here so the kit can FAIL a\n * categorical ramp that two of its series become indistinguishable under, rather than\n * asserting CVD-safety in a comment the way `chart-palette.ts` did — the audit found\n * four of the nine default light chart hues below the 3:1 they were claimed to hold.\n */\nconst CVD_MATRIX: Record<CvdType, number[][]> = {\n protanopia: [\n [0.1705, 0.8295, 0],\n [0.1705, 0.8295, 0],\n [-0.0045, 0.0045, 1],\n ],\n deuteranopia: [\n [0.33066, 0.66934, 0],\n [0.33066, 0.66934, 0],\n [-0.02785, 0.02785, 1],\n ],\n tritanopia: [\n [1, 0.1273, -0.1273],\n [0, 0.8739, 0.1261],\n [0, 0.8739, 0.1261],\n ],\n};\n\nexport function simulateCvd(rgb: Rgb, type: CvdType): Rgb {\n const m = CVD_MATRIX[type];\n const [r, g, b] = [toLinear(rgb.r), toLinear(rgb.g), toLinear(rgb.b)];\n return {\n r: fromLinear(m[0][0] * r + m[0][1] * g + m[0][2] * b),\n g: fromLinear(m[1][0] * r + m[1][1] * g + m[1][2] * b),\n b: fromLinear(m[2][0] * r + m[2][1] * g + m[2][2] * b),\n };\n}\n\n/**\n * Perceptual distance in OKLab, which is what that space is FOR: a Euclidean distance\n * in OKLab corresponds far more closely to \"how different do these look\" than one in\n * sRGB, where the same numeric gap is obvious among greens and invisible among blues.\n */\nexport function deltaE(a: Rgb, b: Rgb): number {\n const A = rgbToOklch(a);\n const B = rgbToOklch(b);\n const aA = A.c * Math.cos((A.h * Math.PI) / 180);\n const aB = A.c * Math.sin((A.h * Math.PI) / 180);\n const bA = B.c * Math.cos((B.h * Math.PI) / 180);\n const bB = B.c * Math.sin((B.h * Math.PI) / 180);\n return Math.hypot(A.l - B.l, aA - bA, aB - bB);\n}\n"],"mappings":";AAwCO,SAAS,SAAS,KAAyB;AAChD,QAAM,IAAI,IAAI,KAAK,EAAE,QAAQ,MAAM,EAAE;AACrC,QAAM,OACJ,EAAE,WAAW,IACT,EACG,MAAM,EAAE,EACR,IAAI,CAAC,MAAM,IAAI,CAAC,EAChB,KAAK,EAAE,IACV;AACN,MAAI,CAAC,mBAAmB,KAAK,IAAI,EAAG,QAAO;AAC3C,SAAO;AAAA,IACL,GAAG,SAAS,KAAK,MAAM,GAAG,CAAC,GAAG,EAAE;AAAA,IAChC,GAAG,SAAS,KAAK,MAAM,GAAG,CAAC,GAAG,EAAE;AAAA,IAChC,GAAG,SAAS,KAAK,MAAM,GAAG,CAAC,GAAG,EAAE;AAAA,EAClC;AACF;AAEO,SAAS,MAAM,EAAE,GAAG,GAAG,EAAE,GAAgB;AAC9C,QAAM,OAAO,CAAC,MACZ,KAAK,IAAI,GAAG,KAAK,IAAI,KAAK,KAAK,MAAM,CAAC,CAAC,CAAC,EACrC,SAAS,EAAE,EACX,SAAS,GAAG,GAAG;AACpB,SAAO,IAAI,KAAK,C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,WAAW,IAAI;AACzB,QAAM,CAAC,GAAG,GAAG,CAAC,IAAI,CAAC,SAAS,IAAI,CAAC,GAAG,SAAS,IAAI,CAAC,GAAG,SAAS,IAAI,CAAC,CAAC;AACpE,SAAO;AAAA,IACL,GAAG,WAAW,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;AAAA,IACrD,GAAG,WAAW,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;AAAA,IACrD,GAAG,WAAW,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;AAAA,EACvD;AACF;AAOO,SAAS,OAAO,GAAQ,GAAgB;AAC7C,QAAM,IAAI,WAAW,CAAC;AACtB,QAAM,IAAI,WAAW,CAAC;AACtB,QAAM,KAAK,EAAE,IAAI,KAAK,IAAK,EAAE,IAAI,KAAK,KAAM,GAAG;AAC/C,QAAM,KAAK,EAAE,IAAI,KAAK,IAAK,EAAE,IAAI,KAAK,KAAM,GAAG;AAC/C,QAAM,KAAK,EAAE,IAAI,KAAK,IAAK,EAAE,IAAI,KAAK,KAAM,GAAG;AAC/C,QAAM,KAAK,EAAE,IAAI,KAAK,IAAK,EAAE,IAAI,KAAK,KAAM,GAAG;AAC/C,SAAO,KAAK,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,IAAI,KAAK,EAAE;AAC/C;","names":[]}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { TokenSet } from
|
|
2
|
-
import './chart-palette.js';
|
|
3
|
-
|
|
1
|
+
import type { TokenSet } from "./palette-presets.js";
|
|
4
2
|
/**
|
|
5
3
|
* The "More contrast" step on a token set (docs/text-size-harmonization.md §5, §10.5).
|
|
6
4
|
* INTERNAL — `applyTokenSet` and the contrast layer share it; it is not re-exported.
|
|
@@ -23,8 +21,8 @@ import './chart-palette.js';
|
|
|
23
21
|
* `--border-strong` stays derived in tokens.css and grows with it.
|
|
24
22
|
*/
|
|
25
23
|
/** The custom properties a contrast step writes. */
|
|
26
|
-
declare const CONTRAST_STEPPED_VARS: readonly ["--text-secondary", "--text-muted", "--text-placeholder", "--border"];
|
|
27
|
-
interface ContrastStep {
|
|
24
|
+
export declare const CONTRAST_STEPPED_VARS: readonly ["--text-secondary", "--text-muted", "--text-placeholder", "--border"];
|
|
25
|
+
export interface ContrastStep {
|
|
28
26
|
textSecondary: string;
|
|
29
27
|
textMuted: string;
|
|
30
28
|
textPlaceholder: string;
|
|
@@ -34,7 +32,7 @@ interface ContrastStep {
|
|
|
34
32
|
* use, so a stepped value sits where the stylesheet would have put it. A colour that is
|
|
35
33
|
* not hex (a consumer's own token set) comes back unmixed. The deriver mixes with it
|
|
36
34
|
* too (`--bg-hover`, `--brand-muted`, `--brand-bg`, `--brand-bg-hover`). */
|
|
37
|
-
declare function mix(a: string, b: string, p: number): string;
|
|
35
|
+
export declare function mix(a: string, b: string, p: number): string;
|
|
38
36
|
/**
|
|
39
37
|
* `--bg-hover` in tokens.css: this share of `--text-primary` mixed into `--bg-surface`.
|
|
40
38
|
*
|
|
@@ -47,9 +45,9 @@ declare function mix(a: string, b: string, p: number): string;
|
|
|
47
45
|
* solves the money colours against this fill, and tokens-css-audit.test.ts measures
|
|
48
46
|
* every text role on it in every shipped preset, so the two cannot part.
|
|
49
47
|
*/
|
|
50
|
-
declare const HOVER_INK = 0.055;
|
|
48
|
+
export declare const HOVER_INK = 0.055;
|
|
51
49
|
/** The card's hover fill (`--bg-hover`) for `t`, as tokens.css mixes it. */
|
|
52
|
-
declare function hoverFill(t: Pick<TokenSet, "textPrimary" | "bgSurface">): string;
|
|
50
|
+
export declare function hoverFill(t: Pick<TokenSet, "textPrimary" | "bgSurface">): string;
|
|
53
51
|
/**
|
|
54
52
|
* `--brand-muted` in tokens.css: this share of `--brand` mixed into `--text-primary`.
|
|
55
53
|
*
|
|
@@ -61,24 +59,22 @@ declare function hoverFill(t: Pick<TokenSet, "textPrimary" | "bgSurface">): stri
|
|
|
61
59
|
* lighten: by the time the text cleared 4.5:1 the hover sat 1.00:1 from the chip it
|
|
62
60
|
* hovers. So the text moves toward the ink, as `--bg-hover` moved for its text.
|
|
63
61
|
*/
|
|
64
|
-
declare const BRAND_MUTED_SHARE = 0.62;
|
|
62
|
+
export declare const BRAND_MUTED_SHARE = 0.62;
|
|
65
63
|
/** `--brand-bg` and `--brand-bg-hover` in tokens.css: these shares of `--brand` mixed
|
|
66
64
|
* into `--bg-surface`. */
|
|
67
|
-
declare const BRAND_BG_SHARE = 0.14;
|
|
68
|
-
declare const BRAND_BG_HOVER_SHARE = 0.24;
|
|
65
|
+
export declare const BRAND_BG_SHARE = 0.14;
|
|
66
|
+
export declare const BRAND_BG_HOVER_SHARE = 0.24;
|
|
69
67
|
/** `--brand-muted`, `--brand-bg` and `--brand-bg-hover` for `t`, as tokens.css mixes them.
|
|
70
68
|
* tokens-css-audit.test.ts holds the three shares equal to the stylesheet's. */
|
|
71
|
-
declare function brandSoft(t: Pick<TokenSet, "brand" | "textPrimary" | "bgSurface">): {
|
|
69
|
+
export declare function brandSoft(t: Pick<TokenSet, "brand" | "textPrimary" | "bgSurface">): {
|
|
72
70
|
brandMuted: string;
|
|
73
71
|
brandBg: string;
|
|
74
72
|
brandBgHover: string;
|
|
75
73
|
};
|
|
76
74
|
/** The four stepped values for `t`. Pure. */
|
|
77
|
-
declare function contrastStep(t: TokenSet): ContrastStep;
|
|
75
|
+
export declare function contrastStep(t: TokenSet): ContrastStep;
|
|
78
76
|
/** Remember the set `applyTokenSet` wrote, so a contrast change can re-apply it. */
|
|
79
|
-
declare function rememberTokenSet(el: HTMLElement, t: TokenSet): void;
|
|
77
|
+
export declare function rememberTokenSet(el: HTMLElement, t: TokenSet): void;
|
|
80
78
|
/** The set `applyTokenSet` last wrote to `el`, or undefined when nothing did — an app
|
|
81
79
|
* without the palette layer, whose base tokens come from tokens.css. */
|
|
82
|
-
declare function rememberedTokenSet(el: HTMLElement): TokenSet | undefined;
|
|
83
|
-
|
|
84
|
-
export { BRAND_BG_HOVER_SHARE, BRAND_BG_SHARE, BRAND_MUTED_SHARE, CONTRAST_STEPPED_VARS, type ContrastStep, HOVER_INK, brandSoft, contrastStep, hoverFill, mix, rememberTokenSet, rememberedTokenSet };
|
|
80
|
+
export declare function rememberedTokenSet(el: HTMLElement): TokenSet | undefined;
|