@eifi1/ui-kit 0.51.3 → 0.51.5
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 +6 -6
- package/dist/account/account-settings-labels.js.map +1 -1
- package/dist/account/account-settings.js +11 -9
- package/dist/account/account-settings.js.map +1 -1
- package/dist/account/delete-account-setting.js +56 -65
- package/dist/account/delete-account-setting.js.map +1 -1
- package/dist/account/email-change-setting-labels.js.map +1 -1
- package/dist/account/email-change-setting.js.map +1 -1
- package/dist/account/passkeys-setting.js.map +1 -1
- package/dist/account/sessions-setting.js.map +1 -1
- package/dist/admin/admin-action-confirm.js +1 -3
- package/dist/admin/admin-action-confirm.js.map +1 -1
- package/dist/admin/admin-action-log.js.map +1 -1
- package/dist/admin/admin-area-labels.js +4 -1
- package/dist/admin/admin-area-labels.js.map +1 -1
- package/dist/admin/admin-overview.js +19 -11
- package/dist/admin/admin-overview.js.map +1 -1
- package/dist/admin/admin-sections.js.map +1 -1
- package/dist/admin/admin-tool-links.d.ts +1 -1
- package/dist/admin/admin-tool-links.js +7 -1
- package/dist/admin/admin-tool-links.js.map +1 -1
- package/dist/admin/invitations-panel.js +2 -13
- package/dist/admin/invitations-panel.js.map +1 -1
- package/dist/admin/mail-test-card.js.map +1 -1
- package/dist/admin/reviewer-scope-editor.js +4 -11
- package/dist/admin/reviewer-scope-editor.js.map +1 -1
- package/dist/admin/role-select.js.map +1 -1
- package/dist/admin/user-roster.js +1 -9
- package/dist/admin/user-roster.js.map +1 -1
- package/dist/auth/accept-invitation.js.map +1 -1
- package/dist/auth/auth-errors.js.map +1 -1
- package/dist/auth/forgot-password-form.js +23 -31
- package/dist/auth/forgot-password-form.js.map +1 -1
- package/dist/auth/register-form.js.map +1 -1
- package/dist/auth/reset-password-form.js.map +1 -1
- package/dist/auth/sign-in-form.js +13 -5
- package/dist/auth/sign-in-form.js.map +1 -1
- package/dist/auth/verify-email.js +1 -8
- package/dist/auth/verify-email.js.map +1 -1
- package/dist/billing/billing-banner.js.map +1 -1
- package/dist/billing/billing-labels.js.map +1 -1
- package/dist/billing/checkout-processing.js.map +1 -1
- package/dist/billing/plan-card.js +91 -85
- package/dist/billing/plan-card.js.map +1 -1
- package/dist/billing/plan-limit-toast.js.map +1 -1
- package/dist/billing/plan-limit.js.map +1 -1
- package/dist/billing/plan-price.js.map +1 -1
- package/dist/billing/plan-switch.js.map +1 -1
- package/dist/billing/subscription-actions.js.map +1 -1
- package/dist/bin/eifi1-pay-page.mjs +6 -1
- package/dist/components/account-chips.js.map +1 -1
- package/dist/components/alert-banner.js +1 -5
- package/dist/components/alert-banner.js.map +1 -1
- package/dist/components/amount-input.js +29 -12
- package/dist/components/amount-input.js.map +1 -1
- package/dist/components/authed-image.js.map +1 -1
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/bulk-action-bar.js +1 -4
- package/dist/components/bulk-action-bar.js.map +1 -1
- package/dist/components/button-group.js.map +1 -1
- package/dist/components/button-look.js.map +1 -1
- package/dist/components/button.js +1 -7
- package/dist/components/button.js.map +1 -1
- package/dist/components/calculator.js +5 -5
- package/dist/components/calculator.js.map +1 -1
- package/dist/components/calendar-heatmap.js +4 -10
- package/dist/components/calendar-heatmap.js.map +1 -1
- package/dist/components/card.js +1 -8
- package/dist/components/card.js.map +1 -1
- package/dist/components/chart-zoom-core.js +3 -17
- package/dist/components/chart-zoom-core.js.map +1 -1
- package/dist/components/chart.d.ts +1 -1
- package/dist/components/chart.js +4 -22
- package/dist/components/chart.js.map +1 -1
- package/dist/components/checkbox-group.js +1 -4
- package/dist/components/checkbox-group.js.map +1 -1
- package/dist/components/chip-input.js +4 -1
- package/dist/components/chip-input.js.map +1 -1
- package/dist/components/chip.js +10 -5
- package/dist/components/chip.js.map +1 -1
- package/dist/components/choice-card.js +58 -74
- package/dist/components/choice-card.js.map +1 -1
- package/dist/components/column-mapper-labels.js.map +1 -1
- package/dist/components/column-mapper.js +167 -227
- package/dist/components/column-mapper.js.map +1 -1
- package/dist/components/combobox-core.js +5 -9
- package/dist/components/combobox-core.js.map +1 -1
- package/dist/components/combobox.js +1 -4
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/confirm-dialog.js.map +1 -1
- package/dist/components/copy-button.js.map +1 -1
- package/dist/components/country-select.d.ts +5 -4
- package/dist/components/country-select.js +3 -19
- package/dist/components/country-select.js.map +1 -1
- package/dist/components/currency-option-list.js +13 -11
- package/dist/components/currency-option-list.js.map +1 -1
- package/dist/components/currency-select.js +1 -6
- package/dist/components/currency-select.js.map +1 -1
- package/dist/components/danger-confirm.js.map +1 -1
- package/dist/components/data-table-cells.js.map +1 -1
- package/dist/components/data-table-column-settings.js.map +1 -1
- package/dist/components/data-table-filter-popover.js +2 -18
- package/dist/components/data-table-filter-popover.js.map +1 -1
- package/dist/components/data-table-filters.js.map +1 -1
- package/dist/components/data-table-fit.js +7 -5
- package/dist/components/data-table-fit.js.map +1 -1
- package/dist/components/data-table-groups.js +3 -1
- package/dist/components/data-table-groups.js.map +1 -1
- package/dist/components/data-table-head.js +49 -57
- package/dist/components/data-table-head.js.map +1 -1
- package/dist/components/data-table-mobile.js +31 -44
- package/dist/components/data-table-mobile.js.map +1 -1
- package/dist/components/data-table-pagination.js.map +1 -1
- package/dist/components/data-table-row-actions.js +19 -16
- package/dist/components/data-table-row-actions.js.map +1 -1
- package/dist/components/data-table-row.js.map +1 -1
- package/dist/components/data-table-shared.js.map +1 -1
- package/dist/components/data-table-sort.js.map +1 -1
- package/dist/components/data-table-virtual.js +4 -1
- package/dist/components/data-table-virtual.js.map +1 -1
- package/dist/components/data-table.d.ts +8 -0
- package/dist/components/data-table.js +30 -39
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-picker.js +1 -6
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/date-range-picker.js.map +1 -1
- package/dist/components/description-list.js +10 -10
- package/dist/components/description-list.js.map +1 -1
- package/dist/components/dialog-frame.js +9 -2
- package/dist/components/dialog-frame.js.map +1 -1
- package/dist/components/disclosure.js +17 -27
- package/dist/components/disclosure.js.map +1 -1
- package/dist/components/dropdown.js +25 -35
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/empty-state.js.map +1 -1
- package/dist/components/entity-combobox.js.map +1 -1
- package/dist/components/error-boundary.js.map +1 -1
- package/dist/components/field-base.js +5 -5
- package/dist/components/field-base.js.map +1 -1
- package/dist/components/field-parts.d.ts +1 -1
- package/dist/components/field-parts.js +10 -14
- package/dist/components/field-parts.js.map +1 -1
- package/dist/components/field-sync.js +8 -10
- package/dist/components/field-sync.js.map +1 -1
- package/dist/components/file-button.js.map +1 -1
- package/dist/components/file-dropzone.js.map +1 -1
- package/dist/components/floating-panel.js +4 -1
- package/dist/components/floating-panel.js.map +1 -1
- package/dist/components/focus-ring.js.map +1 -1
- package/dist/components/form-actions.js.map +1 -1
- package/dist/components/grouped-picker.js +11 -12
- package/dist/components/grouped-picker.js.map +1 -1
- package/dist/components/hover-menu.js +1 -4
- package/dist/components/hover-menu.js.map +1 -1
- package/dist/components/iban-input-labels.js.map +1 -1
- package/dist/components/icon-button.js +4 -1
- package/dist/components/icon-button.js.map +1 -1
- package/dist/components/icon-picker.js +6 -10
- package/dist/components/icon-picker.js.map +1 -1
- package/dist/components/image-grid.js +41 -50
- package/dist/components/image-grid.js.map +1 -1
- package/dist/components/inline-edit-field.js.map +1 -1
- package/dist/components/inline-entity-combobox.js +6 -12
- package/dist/components/inline-entity-combobox.js.map +1 -1
- package/dist/components/input.js +14 -2
- package/dist/components/input.js.map +1 -1
- package/dist/components/jump-calendar.js +1 -7
- package/dist/components/jump-calendar.js.map +1 -1
- package/dist/components/legal-labels.js +8 -2
- package/dist/components/legal-labels.js.map +1 -1
- package/dist/components/legal-page.d.ts +18 -1
- package/dist/components/legal-page.js +27 -2
- package/dist/components/legal-page.js.map +1 -1
- package/dist/components/legal.d.ts +40 -5
- package/dist/components/legal.js +41 -5
- package/dist/components/legal.js.map +1 -1
- package/dist/components/lightbox.js.map +1 -1
- package/dist/components/line-items.js +26 -36
- package/dist/components/line-items.js.map +1 -1
- package/dist/components/list-labels.js +3 -1
- package/dist/components/list-labels.js.map +1 -1
- package/dist/components/list.d.ts +18 -1
- package/dist/components/list.js +54 -13
- package/dist/components/list.js.map +1 -1
- package/dist/components/measured-grid.js +29 -53
- package/dist/components/measured-grid.js.map +1 -1
- package/dist/components/menu-item.js.map +1 -1
- package/dist/components/mini-calendar.js +13 -31
- package/dist/components/mini-calendar.js.map +1 -1
- package/dist/components/money-field.js.map +1 -1
- package/dist/components/month-picker.js +10 -21
- package/dist/components/month-picker.js.map +1 -1
- package/dist/components/multi-entity-combobox.js +3 -16
- package/dist/components/multi-entity-combobox.js.map +1 -1
- package/dist/components/multi-select.js.map +1 -1
- package/dist/components/nav-pills.js +10 -1
- package/dist/components/nav-pills.js.map +1 -1
- package/dist/components/number-field.js.map +1 -1
- package/dist/components/number-input.js +1 -7
- package/dist/components/number-input.js.map +1 -1
- package/dist/components/numpad-sheet.js +1 -4
- package/dist/components/numpad-sheet.js.map +1 -1
- package/dist/components/one-time-code-input.js +1 -7
- package/dist/components/one-time-code-input.js.map +1 -1
- package/dist/components/page-contents.js +13 -22
- package/dist/components/page-contents.js.map +1 -1
- package/dist/components/page-header.js +1 -11
- package/dist/components/page-header.js.map +1 -1
- package/dist/components/password-strength-labels.js.map +1 -1
- package/dist/components/password-strength.js +2 -8
- package/dist/components/password-strength.js.map +1 -1
- package/dist/components/phone-input.js +42 -57
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/picker-sheet.js.map +1 -1
- package/dist/components/pie-chart.js +1 -8
- package/dist/components/pie-chart.js.map +1 -1
- package/dist/components/popover.js.map +1 -1
- package/dist/components/progress-bar.js +16 -9
- package/dist/components/progress-bar.js.map +1 -1
- package/dist/components/qr-code.js +1 -8
- package/dist/components/qr-code.js.map +1 -1
- package/dist/components/row-actions.js +5 -1
- package/dist/components/row-actions.js.map +1 -1
- package/dist/components/search-field.js.map +1 -1
- package/dist/components/select.js +28 -38
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.js +1 -5
- package/dist/components/separator.js.map +1 -1
- package/dist/components/series-chart-axes.js +4 -1
- package/dist/components/series-chart-axes.js.map +1 -1
- package/dist/components/series-chart-budget.js.map +1 -1
- package/dist/components/series-chart-ticks.js.map +1 -1
- package/dist/components/series-chart.js +29 -45
- package/dist/components/series-chart.js.map +1 -1
- package/dist/components/settings-fields.js +21 -17
- package/dist/components/settings-fields.js.map +1 -1
- package/dist/components/share-card.js +4 -9
- package/dist/components/share-card.js.map +1 -1
- package/dist/components/sign-chip.js.map +1 -1
- package/dist/components/signature-pad.js +4 -13
- package/dist/components/signature-pad.js.map +1 -1
- package/dist/components/signed-amount.js +12 -5
- package/dist/components/signed-amount.js.map +1 -1
- package/dist/components/skeleton.js +2 -17
- package/dist/components/skeleton.js.map +1 -1
- package/dist/components/slider.js +13 -36
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sparkline.js.map +1 -1
- package/dist/components/stat-tile.js +14 -10
- package/dist/components/stat-tile.js.map +1 -1
- package/dist/components/swatch-picker.js +14 -4
- package/dist/components/swatch-picker.js.map +1 -1
- package/dist/components/swipeable-row.d.ts +1 -1
- package/dist/components/swipeable-row.js +1 -8
- package/dist/components/swipeable-row.js.map +1 -1
- package/dist/components/table-skeleton.js +4 -1
- package/dist/components/table-skeleton.js.map +1 -1
- package/dist/components/table.js +12 -9
- package/dist/components/table.js.map +1 -1
- package/dist/components/tabs.js +5 -24
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/text-link.js.map +1 -1
- package/dist/components/text.js.map +1 -1
- package/dist/components/tile-radio.js +1 -7
- package/dist/components/tile-radio.js.map +1 -1
- package/dist/components/time-input.js.map +1 -1
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toggle-group.js +6 -1
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle-legend.js +2 -11
- package/dist/components/toggle-legend.js.map +1 -1
- package/dist/components/tooltip.js +2 -22
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/translation-review-editor.js +1 -4
- package/dist/components/translation-review-editor.js.map +1 -1
- package/dist/components/translation-review-parts.d.ts +1 -1
- package/dist/components/translation-review-parts.js +7 -1
- package/dist/components/translation-review-parts.js.map +1 -1
- package/dist/components/translation-review.js +18 -7
- package/dist/components/translation-review.js.map +1 -1
- package/dist/components/tree-view.js +14 -10
- package/dist/components/tree-view.js.map +1 -1
- package/dist/components/treemap.js +1 -13
- package/dist/components/treemap.js.map +1 -1
- package/dist/components/trigger-aria.js.map +1 -1
- package/dist/components/use-table-state.js +14 -11
- package/dist/components/use-table-state.js.map +1 -1
- package/dist/components/user-avatar.js +3 -26
- package/dist/components/user-avatar.js.map +1 -1
- package/dist/demo/demo-start.js +8 -4
- package/dist/demo/demo-start.js.map +1 -1
- package/dist/eslint/index.js +1 -1
- package/dist/feedback/feedback-attachment-labels.js.map +1 -1
- package/dist/feedback/feedback-attachment.js +1 -8
- package/dist/feedback/feedback-attachment.js.map +1 -1
- package/dist/feedback/feedback-capture.d.ts +1 -1
- package/dist/feedback/feedback-capture.js +3 -1
- package/dist/feedback/feedback-capture.js.map +1 -1
- package/dist/feedback/feedback-comment-thread.js +27 -13
- package/dist/feedback/feedback-comment-thread.js.map +1 -1
- package/dist/feedback/feedback-context.js +1 -4
- package/dist/feedback/feedback-context.js.map +1 -1
- package/dist/feedback/feedback-dialog.js.map +1 -1
- package/dist/feedback/feedback-inbox.js.map +1 -1
- package/dist/feedback/feedback-public-list.js +7 -1
- package/dist/feedback/feedback-public-list.js.map +1 -1
- package/dist/feedback/feedback-record.js +1 -5
- package/dist/feedback/feedback-record.js.map +1 -1
- package/dist/feedback/feedback-replies.js +25 -10
- package/dist/feedback/feedback-replies.js.map +1 -1
- package/dist/feedback/feedback-row-detail.js.map +1 -1
- package/dist/feedback/feedback-status-undo.js.map +1 -1
- package/dist/feedback/feedback-submit-dialog.js.map +1 -1
- package/dist/feedback/feedback-table.d.ts +3 -1
- package/dist/feedback/feedback-table.js +22 -5
- package/dist/feedback/feedback-table.js.map +1 -1
- package/dist/feedback/feedback-thread.js +2 -13
- package/dist/feedback/feedback-thread.js.map +1 -1
- package/dist/feedback/feedback-vocabulary.js.map +1 -1
- package/dist/feedback/feedback-vote-button.js.map +1 -1
- package/dist/hooks/use-anchored-rect.js.map +1 -1
- package/dist/hooks/use-document-title.js.map +1 -1
- package/dist/hooks/use-file-drop.js.map +1 -1
- package/dist/hooks/use-file-picker-labels.js.map +1 -1
- package/dist/hooks/use-file-picker.js.map +1 -1
- package/dist/hooks/use-focus-trap.js.map +1 -1
- package/dist/hooks/use-overlay-history.js +10 -5
- package/dist/hooks/use-overlay-history.js.map +1 -1
- package/dist/hooks/use-row-swipe.d.ts +1 -1
- package/dist/hooks/use-row-swipe.js +1 -6
- package/dist/hooks/use-row-swipe.js.map +1 -1
- package/dist/i18n/defaults.js +1 -4
- package/dist/i18n/defaults.js.map +1 -1
- package/dist/i18n/german.js +15 -4
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.js +2 -8
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/languages.js.map +1 -1
- package/dist/i18n/locales/en.js +19 -4
- package/dist/i18n/locales/en.js.map +2 -2
- package/dist/i18n/locales/es.js +15 -4
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.js +15 -4
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.js +15 -4
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.js +15 -4
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.js +11 -3
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/plurals.js.map +1 -1
- package/dist/i18n/review.js +15 -7
- package/dist/i18n/review.js.map +1 -1
- package/dist/i18n/shared-labels.js.map +1 -1
- package/dist/index.d.ts +17 -17
- package/dist/index.js +40 -23
- package/dist/index.js.map +1 -1
- package/dist/landing/access.js +1 -4
- package/dist/landing/access.js.map +1 -1
- package/dist/landing/landing-sections.js +35 -38
- package/dist/landing/landing-sections.js.map +1 -1
- package/dist/landing/page-seo.js.map +1 -1
- package/dist/lib/calc.js.map +1 -1
- package/dist/lib/clipboard-minus.js.map +1 -1
- package/dist/lib/dates.js.map +1 -1
- package/dist/lib/decimal-marks.js.map +1 -1
- package/dist/lib/device-settings.js +2 -1
- package/dist/lib/device-settings.js.map +1 -1
- package/dist/lib/direction.js.map +1 -1
- package/dist/lib/iban.js.map +1 -1
- package/dist/lib/logger.js +1 -5
- package/dist/lib/logger.js.map +1 -1
- package/dist/lib/person-name.js.map +1 -1
- package/dist/lib/phone.js.map +1 -1
- package/dist/lib/qr-encode.js +344 -8
- package/dist/lib/qr-encode.js.map +1 -1
- package/dist/lib/session-refresh.js.map +1 -1
- package/dist/lib/table-text.js +15 -3
- package/dist/lib/table-text.js.map +1 -1
- package/dist/lib/text-match.d.ts +20 -0
- package/dist/lib/text-match.js +11 -1
- package/dist/lib/text-match.js.map +1 -1
- package/dist/lib/translation-review.js.map +1 -1
- package/dist/notifications/notification-inbox.js +63 -44
- package/dist/notifications/notification-inbox.js.map +1 -1
- package/dist/notifications/notification-parts.js.map +1 -1
- package/dist/notifications/notification-types-setting.js.map +1 -1
- package/dist/notifications/notifications-labels.js.map +1 -1
- package/dist/notifications/push-device-setting.js +6 -1
- package/dist/notifications/push-device-setting.js.map +1 -1
- package/dist/notifications/push-devices-setting.js.map +1 -1
- package/dist/notifications/push-worker.js.map +1 -1
- package/dist/notifications/quiet-hours-setting.js.map +1 -1
- package/dist/notifications/use-push-device.js +4 -1
- package/dist/notifications/use-push-device.js.map +1 -1
- package/dist/offline/pwa-update-prompt.d.ts +1 -1
- package/dist/offline/pwa-update-prompt.js +7 -1
- package/dist/offline/pwa-update-prompt.js.map +1 -1
- package/dist/offline/query-persistence.js.map +1 -1
- package/dist/offline.d.ts +1 -1
- package/dist/offline.js +6 -1
- package/dist/offline.js.map +1 -1
- package/dist/pay/pay.css +8 -1
- package/dist/rhf/fields.d.ts +1 -2
- package/dist/rhf/fields.js +1 -10
- package/dist/rhf/fields.js.map +1 -1
- package/dist/rhf/form-core.js +1 -4
- package/dist/rhf/form-core.js.map +1 -1
- package/dist/rhf/line-items.js.map +1 -1
- package/dist/rhf/use-rhf-wizard-step.js.map +1 -1
- package/dist/search/command-palette.js +71 -62
- package/dist/search/command-palette.js.map +1 -1
- package/dist/search/global-search.js +34 -5
- package/dist/search/global-search.js.map +1 -1
- package/dist/search/search-index.js.map +1 -1
- package/dist/settings/device-reset-setting.js +1 -6
- package/dist/settings/device-reset-setting.js.map +1 -1
- package/dist/settings/settings-heading.js.map +1 -1
- package/dist/settings/settings-layout.js +9 -20
- package/dist/settings/settings-layout.js.map +1 -1
- package/dist/settings/use-settings-focus.d.ts +7 -0
- package/dist/settings/use-settings-focus.js +2 -0
- package/dist/settings/use-settings-focus.js.map +1 -1
- package/dist/settings/use-settings-route.js.map +1 -1
- package/dist/shell/app-shell.js +62 -31
- package/dist/shell/app-shell.js.map +1 -1
- package/dist/shell/auth-layout.js +1 -10
- package/dist/shell/auth-layout.js.map +1 -1
- package/dist/shell/dev-menu.d.ts +5 -0
- package/dist/shell/dev-menu.js +14 -7
- package/dist/shell/dev-menu.js.map +1 -1
- package/dist/shell/option-switcher-menu.js.map +1 -1
- package/dist/shell/sync-status-indicator.js +7 -6
- package/dist/shell/sync-status-indicator.js.map +1 -1
- package/dist/shell/top-bar-parts-labels.js.map +1 -1
- package/dist/shell/topbar-action-menu.d.ts +14 -1
- package/dist/shell/topbar-action-menu.js +85 -34
- package/dist/shell/topbar-action-menu.js.map +1 -1
- package/dist/shell/topbar-controls.js +1 -10
- package/dist/shell/topbar-controls.js.map +1 -1
- package/dist/shell/tour-menu.js +9 -1
- package/dist/shell/tour-menu.js.map +1 -1
- package/dist/shell.d.ts +1 -1
- package/dist/shell.js +2 -1
- package/dist/shell.js.map +1 -1
- package/dist/sync/db.js.map +1 -1
- package/dist/sync/engine.js +24 -6
- package/dist/sync/engine.js.map +1 -1
- package/dist/sync.d.ts +2 -2
- package/dist/sync.js +7 -1
- package/dist/sync.js.map +1 -1
- package/dist/testing/css-variables.js.map +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/dist/testing/index.js +1 -3
- package/dist/testing/index.js.map +1 -1
- package/dist/testing/react.js.map +1 -1
- package/dist/testing/viewport.js +7 -4
- package/dist/testing/viewport.js.map +1 -1
- package/dist/theme/contrast-tokens.js +13 -2
- package/dist/theme/contrast-tokens.js.map +1 -1
- package/dist/theme/palette-derive.d.ts +1 -1
- package/dist/theme/palette-derive.js +18 -29
- package/dist/theme/palette-derive.js.map +1 -1
- package/dist/theme/palette-presets.js.map +1 -1
- package/dist/theme/palette-store.js.map +1 -1
- package/dist/theme/text-size.js.map +1 -1
- package/dist/theme/theme-store.js +1 -3
- package/dist/theme/theme-store.js.map +1 -1
- package/dist/tour/tour-catalogue.js.map +1 -1
- package/dist/tour/tour-dock.js +5 -1
- package/dist/tour/tour-dock.js.map +1 -1
- package/dist/tour/tour-engine.js +1 -4
- package/dist/tour/tour-engine.js.map +1 -1
- package/dist/tour/tour.js +21 -12
- package/dist/tour/tour.js.map +1 -1
- package/dist/tour/use-tour-progress.js.map +1 -1
- package/dist/tour/use-tour-url-sync.js.map +1 -1
- package/dist/wizard/stepper-nav.js +3 -24
- package/dist/wizard/stepper-nav.js.map +1 -1
- package/dist/wizard/types.js.map +1 -1
- package/dist/wizard/use-wizard.js +24 -28
- package/dist/wizard/use-wizard.js.map +1 -1
- package/dist/wizard/validation.js.map +1 -1
- package/dist/wizard/wizard-context.js.map +1 -1
- package/dist/wizard/wizard-step.d.ts +1 -1
- package/dist/wizard/wizard-step.js +1 -8
- package/dist/wizard/wizard-step.js.map +1 -1
- package/dist/wizard/wizard-summary.js.map +1 -1
- package/package.json +5 -2
- package/src/account/account-settings-labels.ts +1 -2
- package/src/account/account-settings.tsx +11 -17
- package/src/account/delete-account-setting.tsx +1 -6
- package/src/account/email-change-setting-labels.ts +1 -2
- package/src/account/email-change-setting.tsx +3 -1
- package/src/account/passkeys-setting.tsx +1 -3
- package/src/account/sessions-setting.tsx +4 -2
- package/src/admin/admin-action-confirm.tsx +4 -7
- package/src/admin/admin-action-log.tsx +29 -29
- package/src/admin/admin-area-labels.ts +4 -1
- package/src/admin/admin-overview.tsx +8 -2
- package/src/admin/admin-sections.tsx +3 -1
- package/src/admin/admin-tool-links.tsx +7 -1
- package/src/admin/invitations-panel.tsx +5 -11
- package/src/admin/mail-test-card.tsx +1 -2
- package/src/admin/reviewer-scope-editor.tsx +4 -9
- package/src/admin/role-select.tsx +4 -2
- package/src/admin/user-roster.tsx +2 -11
- package/src/auth/accept-invitation.tsx +1 -7
- package/src/auth/auth-errors.ts +1 -6
- package/src/auth/forgot-password-form.tsx +2 -7
- package/src/auth/register-form.tsx +7 -8
- package/src/auth/reset-password-form.tsx +2 -5
- package/src/auth/sign-in-form.tsx +15 -14
- package/src/auth/verify-email.tsx +2 -7
- package/src/billing/billing-banner.tsx +3 -7
- package/src/billing/billing-labels.ts +6 -4
- package/src/billing/checkout-processing.ts +0 -1
- package/src/billing/plan-card.tsx +9 -8
- package/src/billing/plan-limit-toast.tsx +1 -2
- package/src/billing/plan-limit.ts +1 -2
- package/src/billing/plan-price.ts +1 -4
- package/src/billing/plan-switch.tsx +1 -2
- package/src/billing/subscription-actions.tsx +5 -2
- package/src/components/account-chips.tsx +1 -7
- package/src/components/alert-banner.tsx +2 -8
- package/src/components/amount-input.tsx +206 -178
- package/src/components/authed-image.tsx +7 -4
- package/src/components/autocomplete.tsx +7 -9
- package/src/components/bulk-action-bar.tsx +2 -7
- package/src/components/button-group.tsx +1 -2
- package/src/components/button-look.ts +6 -17
- package/src/components/button.tsx +1 -4
- package/src/components/calculator.tsx +6 -9
- package/src/components/calendar-heatmap.tsx +5 -10
- package/src/components/card.tsx +9 -13
- package/src/components/chart-zoom-core.tsx +6 -33
- package/src/components/chart.tsx +8 -31
- package/src/components/checkbox-group.tsx +1 -4
- package/src/components/chip-input.tsx +6 -6
- package/src/components/chip.tsx +14 -26
- package/src/components/choice-card.tsx +4 -18
- package/src/components/column-mapper-labels.ts +3 -10
- package/src/components/column-mapper.tsx +33 -122
- package/src/components/combobox-core.tsx +17 -47
- package/src/components/combobox.tsx +2 -6
- package/src/components/confirm-dialog.tsx +1 -3
- package/src/components/copy-button.tsx +2 -4
- package/src/components/country-select.tsx +9 -21
- package/src/components/currency-option-list.tsx +16 -18
- package/src/components/currency-select.tsx +2 -7
- package/src/components/danger-confirm.tsx +8 -9
- package/src/components/data-table-cells.tsx +1 -2
- package/src/components/data-table-column-settings.tsx +1 -3
- package/src/components/data-table-filter-popover.tsx +5 -19
- package/src/components/data-table-filters.ts +1 -6
- package/src/components/data-table-fit.ts +7 -7
- package/src/components/data-table-groups.tsx +3 -1
- package/src/components/data-table-head.tsx +32 -46
- package/src/components/data-table-mobile.tsx +99 -108
- package/src/components/data-table-pagination.tsx +2 -6
- package/src/components/data-table-row-actions.tsx +25 -24
- package/src/components/data-table-row.tsx +16 -17
- package/src/components/data-table-shared.tsx +10 -16
- package/src/components/data-table-sort.ts +1 -2
- package/src/components/data-table-virtual.ts +9 -4
- package/src/components/data-table.tsx +497 -501
- package/src/components/date-picker.tsx +1 -7
- package/src/components/date-range-picker.tsx +3 -13
- package/src/components/description-list.tsx +7 -13
- package/src/components/dialog-frame.tsx +12 -3
- package/src/components/disclosure.tsx +8 -12
- package/src/components/dropdown.tsx +3 -11
- package/src/components/empty-state.tsx +1 -3
- package/src/components/entity-combobox.tsx +2 -6
- package/src/components/error-boundary.tsx +7 -7
- package/src/components/field-base.tsx +8 -14
- package/src/components/field-parts.tsx +12 -23
- package/src/components/field-sync.tsx +7 -11
- package/src/components/file-button.tsx +7 -3
- package/src/components/file-dropzone.tsx +7 -12
- package/src/components/floating-panel.tsx +44 -51
- package/src/components/focus-ring.ts +1 -2
- package/src/components/form-actions.tsx +1 -4
- package/src/components/grouped-picker.tsx +21 -16
- package/src/components/hover-menu.tsx +1 -4
- package/src/components/iban-input-labels.ts +1 -2
- package/src/components/icon-button.tsx +46 -48
- package/src/components/icon-picker.tsx +9 -20
- package/src/components/image-grid.tsx +1 -6
- package/src/components/inline-edit-field.tsx +1 -5
- package/src/components/inline-entity-combobox.tsx +11 -25
- package/src/components/input.tsx +14 -2
- package/src/components/jump-calendar.tsx +2 -6
- package/src/components/legal-labels.ts +8 -3
- package/src/components/legal-page.tsx +56 -6
- package/src/components/legal.tsx +83 -10
- package/src/components/lightbox.tsx +1 -3
- package/src/components/line-items.tsx +7 -15
- package/src/components/list-labels.ts +2 -0
- package/src/components/list.tsx +81 -27
- package/src/components/measured-grid.tsx +8 -30
- package/src/components/menu-item.tsx +1 -3
- package/src/components/mini-calendar.tsx +129 -159
- package/src/components/money-field.tsx +4 -2
- package/src/components/month-picker.tsx +14 -21
- package/src/components/multi-entity-combobox.tsx +6 -26
- package/src/components/multi-select.tsx +5 -9
- package/src/components/nav-pills.tsx +10 -2
- package/src/components/number-field.tsx +18 -15
- package/src/components/number-input.tsx +3 -19
- package/src/components/numpad-sheet.tsx +9 -13
- package/src/components/one-time-code-input.tsx +6 -11
- package/src/components/page-contents.tsx +2 -9
- package/src/components/page-header.tsx +5 -10
- package/src/components/password-strength-labels.ts +1 -2
- package/src/components/password-strength.tsx +6 -9
- package/src/components/phone-input.tsx +2 -13
- package/src/components/picker-sheet.tsx +2 -5
- package/src/components/pie-chart.tsx +6 -12
- package/src/components/popover.tsx +2 -1
- package/src/components/progress-bar.tsx +16 -25
- package/src/components/qr-code.tsx +2 -9
- package/src/components/row-actions.tsx +9 -1
- package/src/components/search-field.tsx +4 -5
- package/src/components/select.tsx +2 -10
- package/src/components/separator.tsx +1 -5
- package/src/components/series-chart-axes.ts +5 -5
- package/src/components/series-chart-budget.ts +1 -4
- package/src/components/series-chart-ticks.ts +1 -4
- package/src/components/series-chart.tsx +43 -83
- package/src/components/settings-fields.tsx +20 -15
- package/src/components/share-card.tsx +6 -14
- package/src/components/sign-chip.tsx +16 -16
- package/src/components/signature-pad.tsx +21 -13
- package/src/components/signed-amount.tsx +6 -14
- package/src/components/skeleton.tsx +2 -13
- package/src/components/slider.tsx +9 -20
- package/src/components/sparkline.tsx +2 -13
- package/src/components/stat-tile.tsx +13 -24
- package/src/components/swatch-picker.tsx +8 -3
- package/src/components/swipeable-row.tsx +2 -11
- package/src/components/table-skeleton.tsx +4 -1
- package/src/components/table.tsx +12 -8
- package/src/components/tabs.tsx +24 -39
- package/src/components/text-link.tsx +6 -6
- package/src/components/text.tsx +1 -2
- package/src/components/tile-radio.tsx +6 -19
- package/src/components/time-input.tsx +4 -5
- package/src/components/toast.tsx +3 -12
- package/src/components/toggle-group.tsx +9 -9
- package/src/components/toggle-legend.tsx +4 -16
- package/src/components/tooltip.tsx +9 -48
- package/src/components/translation-review-editor.tsx +4 -4
- package/src/components/translation-review-parts.tsx +7 -1
- package/src/components/translation-review.tsx +15 -16
- package/src/components/tree-view.tsx +17 -20
- package/src/components/treemap.tsx +3 -15
- package/src/components/trigger-aria.ts +1 -4
- package/src/components/use-table-state.ts +16 -17
- package/src/components/user-avatar.tsx +4 -21
- package/src/demo/demo-start.tsx +8 -4
- package/src/feedback/feedback-attachment-labels.ts +2 -1
- package/src/feedback/feedback-attachment.tsx +16 -29
- package/src/feedback/feedback-capture.ts +3 -1
- package/src/feedback/feedback-comment-thread.tsx +9 -6
- package/src/feedback/feedback-context.tsx +1 -4
- package/src/feedback/feedback-dialog.tsx +3 -4
- package/src/feedback/feedback-inbox.tsx +3 -9
- package/src/feedback/feedback-public-list.tsx +7 -1
- package/src/feedback/feedback-record.ts +6 -14
- package/src/feedback/feedback-replies.tsx +10 -5
- package/src/feedback/feedback-row-detail.tsx +2 -5
- package/src/feedback/feedback-status-undo.ts +1 -4
- package/src/feedback/feedback-submit-dialog.tsx +4 -4
- package/src/feedback/feedback-table.tsx +29 -9
- package/src/feedback/feedback-thread.tsx +4 -16
- package/src/feedback/feedback-vocabulary.ts +72 -82
- package/src/feedback/feedback-vote-button.tsx +9 -8
- package/src/hooks/use-anchored-rect.ts +1 -4
- package/src/hooks/use-document-title.ts +3 -1
- package/src/hooks/use-file-drop.ts +1 -3
- package/src/hooks/use-file-picker-labels.ts +1 -2
- package/src/hooks/use-file-picker.tsx +1 -5
- package/src/hooks/use-focus-trap.ts +1 -2
- package/src/hooks/use-overlay-history.ts +10 -5
- package/src/hooks/use-row-swipe.ts +1 -6
- package/src/i18n/defaults.ts +1 -4
- package/src/i18n/german.ts +42 -50
- package/src/i18n/kit-labels.tsx +5 -20
- package/src/i18n/languages.ts +2 -8
- package/src/i18n/locales/en.ts +15 -31
- package/src/i18n/locales/es.ts +44 -50
- package/src/i18n/locales/fr.ts +43 -52
- package/src/i18n/locales/hu.ts +35 -38
- package/src/i18n/locales/it.ts +44 -53
- package/src/i18n/locales/zh.ts +23 -33
- package/src/i18n/plurals.ts +4 -1
- package/src/i18n/review.ts +20 -7
- package/src/i18n/shared-labels.ts +1 -2
- package/src/index.ts +107 -32
- package/src/landing/access.ts +2 -7
- package/src/landing/landing-sections.tsx +14 -15
- package/src/landing/page-seo.ts +1 -3
- package/src/lib/calc.ts +4 -1
- package/src/lib/clipboard-minus.ts +4 -1
- package/src/lib/dates.ts +2 -10
- package/src/lib/decimal-marks.ts +1 -3
- package/src/lib/device-settings.ts +2 -1
- package/src/lib/direction.ts +1 -3
- package/src/lib/iban.ts +89 -9
- package/src/lib/logger.ts +1 -5
- package/src/lib/person-name.ts +1 -3
- package/src/lib/phone.ts +5 -8
- package/src/lib/qr-encode.ts +32 -8
- package/src/lib/session-refresh.ts +5 -6
- package/src/lib/table-text.ts +24 -6
- package/src/lib/text-match.ts +43 -1
- package/src/lib/translation-review.ts +1 -3
- package/src/notifications/notification-inbox.tsx +17 -4
- package/src/notifications/notification-parts.tsx +1 -2
- package/src/notifications/notification-types-setting.tsx +19 -18
- package/src/notifications/notifications-labels.ts +1 -2
- package/src/notifications/push-device-setting.tsx +7 -1
- package/src/notifications/push-devices-setting.tsx +7 -3
- package/src/notifications/push-worker.ts +10 -2
- package/src/notifications/quiet-hours-setting.tsx +4 -1
- package/src/notifications/use-push-device.ts +4 -1
- package/src/offline/pwa-update-prompt.tsx +7 -1
- package/src/offline/query-persistence.ts +9 -6
- package/src/offline.ts +6 -1
- package/src/rhf/fields.tsx +50 -19
- package/src/rhf/form-core.tsx +2 -6
- package/src/rhf/line-items.tsx +5 -7
- package/src/rhf/use-rhf-wizard-step.ts +3 -12
- package/src/search/command-palette.tsx +15 -23
- package/src/search/global-search.tsx +38 -8
- package/src/search/search-index.ts +5 -1
- package/src/settings/device-reset-setting.tsx +5 -8
- package/src/settings/settings-heading.tsx +3 -1
- package/src/settings/settings-layout.tsx +6 -13
- package/src/settings/use-settings-focus.ts +8 -0
- package/src/settings/use-settings-route.ts +4 -3
- package/src/shell/app-shell.tsx +48 -24
- package/src/shell/auth-layout.tsx +1 -6
- package/src/shell/dev-menu.tsx +18 -6
- package/src/shell/option-switcher-menu.tsx +1 -3
- package/src/shell/sync-status-indicator.tsx +14 -12
- package/src/shell/top-bar-parts-labels.ts +1 -3
- package/src/shell/topbar-action-menu.tsx +130 -45
- package/src/shell/topbar-controls.tsx +5 -19
- package/src/shell/tour-menu.tsx +9 -1
- package/src/shell.ts +1 -1
- package/src/sync/db.ts +5 -1
- package/src/sync/engine.ts +44 -12
- package/src/sync.ts +16 -2
- package/src/testing/css-variables.ts +1 -2
- package/src/testing/index.ts +1 -6
- package/src/testing/react.ts +1 -2
- package/src/testing/viewport.ts +9 -9
- package/src/theme/contrast-tokens.ts +13 -2
- package/src/theme/palette-derive.ts +24 -50
- package/src/theme/palette-presets.ts +0 -1
- package/src/theme/palette-store.ts +1 -4
- package/src/theme/text-size.ts +1 -1
- package/src/theme/theme-store.ts +2 -6
- package/src/tour/tour-catalogue.tsx +4 -2
- package/src/tour/tour-dock.ts +5 -1
- package/src/tour/tour-engine.ts +2 -6
- package/src/tour/tour.tsx +28 -12
- package/src/tour/use-tour-progress.ts +8 -2
- package/src/tour/use-tour-url-sync.ts +3 -1
- package/src/vite-env.d.ts +1 -4
- package/src/wizard/stepper-nav.tsx +10 -35
- package/src/wizard/types.ts +1 -4
- package/src/wizard/use-wizard.ts +28 -43
- package/src/wizard/validation.ts +1 -5
- package/src/wizard/wizard-context.tsx +2 -6
- package/src/wizard/wizard-step.tsx +1 -8
- package/src/wizard/wizard-summary.tsx +2 -6
- package/tokens.css +393 -152
package/src/testing/react.ts
CHANGED
|
@@ -49,8 +49,7 @@ export async function rowMenuAction(
|
|
|
49
49
|
// Any row's name: the words around the name, whatever the language puts first.
|
|
50
50
|
const [before, after] = actionsFor("\u0000").split("\u0000");
|
|
51
51
|
const anyRow = (name: string) =>
|
|
52
|
-
name === actions ||
|
|
53
|
-
(name.length > before.length + after.length && name.startsWith(before) && name.endsWith(after));
|
|
52
|
+
name === actions || (name.length > before.length + after.length && name.startsWith(before) && name.endsWith(after));
|
|
54
53
|
const trigger = (await screen.findAllByRole("button", { name: row === undefined ? anyRow : actionsFor(row) }))[0];
|
|
55
54
|
fireEvent.click(trigger);
|
|
56
55
|
const title = trigger.getAttribute("aria-label") ?? trigger.textContent ?? "";
|
package/src/testing/viewport.ts
CHANGED
|
@@ -89,9 +89,7 @@ function condition(part: string, width: number, options: ViewportOptions): boole
|
|
|
89
89
|
function answer(query: string, width: number, options: ViewportOptions): boolean {
|
|
90
90
|
return query
|
|
91
91
|
.split(",")
|
|
92
|
-
.some((alternative) =>
|
|
93
|
-
alternative.split(/\s+and\s+/).every((part) => condition(part, width, options)),
|
|
94
|
-
);
|
|
92
|
+
.some((alternative) => alternative.split(/\s+and\s+/).every((part) => condition(part, width, options)));
|
|
95
93
|
}
|
|
96
94
|
|
|
97
95
|
/** A list {@link viewportMatchMedia} handed out: what {@link setViewportWidth} flips. */
|
|
@@ -155,7 +153,12 @@ function mediaQueryList(query: string, viewport: StubViewport): StubMediaQueryLi
|
|
|
155
153
|
* `matches` and `media`, on an `Event` (jsdom has no `MediaQueryListEvent`). */
|
|
156
154
|
function changeEvent(list: StubMediaQueryList): Event {
|
|
157
155
|
const event = new Event("change");
|
|
158
|
-
for (const [key, value] of Object.entries({
|
|
156
|
+
for (const [key, value] of Object.entries({
|
|
157
|
+
matches: list.matches,
|
|
158
|
+
media: list.media,
|
|
159
|
+
target: list,
|
|
160
|
+
currentTarget: list,
|
|
161
|
+
})) {
|
|
159
162
|
Object.defineProperty(event, key, { value, enumerable: true });
|
|
160
163
|
}
|
|
161
164
|
return event;
|
|
@@ -175,10 +178,7 @@ function changeEvent(list: StubMediaQueryList): Event {
|
|
|
175
178
|
* `vi.stubGlobal("matchMedia", viewportMatchMedia(375))` — or use
|
|
176
179
|
* {@link stubViewportWidth}.
|
|
177
180
|
*/
|
|
178
|
-
export function viewportMatchMedia(
|
|
179
|
-
width: number,
|
|
180
|
-
options: ViewportOptions = {},
|
|
181
|
-
): (query: string) => MediaQueryList {
|
|
181
|
+
export function viewportMatchMedia(width: number, options: ViewportOptions = {}): (query: string) => MediaQueryList {
|
|
182
182
|
const viewport: StubViewport = { width, options, lists: new Set() };
|
|
183
183
|
const matchMedia = (query: string) => {
|
|
184
184
|
const list = mediaQueryList(query, viewport);
|
|
@@ -215,7 +215,7 @@ export function setViewportWidth(width: number): void {
|
|
|
215
215
|
if (!viewport) {
|
|
216
216
|
throw new Error(
|
|
217
217
|
"setViewportWidth: no viewport stub is in force — put one in first with " +
|
|
218
|
-
|
|
218
|
+
'stubViewportWidth(width), or vi.stubGlobal("matchMedia", viewportMatchMedia(width)).',
|
|
219
219
|
);
|
|
220
220
|
}
|
|
221
221
|
viewport.width = width;
|
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
contrast,
|
|
3
|
+
hexToOklch,
|
|
4
|
+
luminance,
|
|
5
|
+
oklchToHex,
|
|
6
|
+
oklchToRgb,
|
|
7
|
+
parseHex,
|
|
8
|
+
rgbToOklch,
|
|
9
|
+
solveLightness,
|
|
10
|
+
toHex,
|
|
11
|
+
} from "./color";
|
|
2
12
|
import type { TokenSet } from "./palette-presets";
|
|
3
13
|
|
|
4
14
|
/**
|
|
@@ -218,7 +228,8 @@ function steppedBorder(t: TokenSet, well: WellStep | null): string {
|
|
|
218
228
|
// light well (§13.4), which is the darkest surface under More contrast.
|
|
219
229
|
const surface2 = well?.bgSurface2 ?? t.bgSurface2;
|
|
220
230
|
let lo = BORDER_STRONG_SHARE;
|
|
221
|
-
if (worstContrast(mix(t.border, t.textPrimary, 1 - lo), t, surface2) >= BORDER_TARGET)
|
|
231
|
+
if (worstContrast(mix(t.border, t.textPrimary, 1 - lo), t, surface2) >= BORDER_TARGET)
|
|
232
|
+
return mix(t.border, t.textPrimary, 1 - lo);
|
|
222
233
|
let hi = 1;
|
|
223
234
|
for (let i = 0; i < 16; i++) {
|
|
224
235
|
const mid = (lo + hi) / 2;
|
|
@@ -218,8 +218,7 @@ function surfaceSet(hue: number, mode: ThemeMode, tint: number, weight: number)
|
|
|
218
218
|
// the three. Solving against `bgSurface` alone left it at 1.36:1 on `bgPage`, so the
|
|
219
219
|
// target and the audit disagreed about the same border.
|
|
220
220
|
const hardest = [bgPage, bgSurface, bgSurface2].reduce((a, b) =>
|
|
221
|
-
contrast(a, mode === "light" ? "#000000" : "#ffffff") <
|
|
222
|
-
contrast(b, mode === "light" ? "#000000" : "#ffffff")
|
|
221
|
+
contrast(a, mode === "light" ? "#000000" : "#ffffff") < contrast(b, mode === "light" ? "#000000" : "#ffffff")
|
|
223
222
|
? a
|
|
224
223
|
: b,
|
|
225
224
|
);
|
|
@@ -261,12 +260,7 @@ function tintOn(hue: number, chroma: number, surface: string, mode: ThemeMode):
|
|
|
261
260
|
return oklchToHex({ l, c: Math.min(chroma * 0.45, 0.06), h: hue });
|
|
262
261
|
}
|
|
263
262
|
|
|
264
|
-
export function derivePalette({
|
|
265
|
-
anchors,
|
|
266
|
-
mode,
|
|
267
|
-
surfaceTint = 0.55,
|
|
268
|
-
textContrast,
|
|
269
|
-
}: DeriveOptions): DerivedPalette {
|
|
263
|
+
export function derivePalette({ anchors, mode, surfaceTint = 0.55, textContrast }: DeriveOptions): DerivedPalette {
|
|
270
264
|
const warnings: string[] = [];
|
|
271
265
|
const brand = hexToOklch(anchors.brand);
|
|
272
266
|
if (!brand) {
|
|
@@ -285,8 +279,7 @@ export function derivePalette({
|
|
|
285
279
|
// wherever it lands. Solving against `bgSurface` alone is the mistake that makes a
|
|
286
280
|
// muted label fail on the page background it also sits on.
|
|
287
281
|
const worstSurface = [surfaces.bgPage, surfaces.bgSurface, surfaces.bgSurface2].reduce((a, b) =>
|
|
288
|
-
contrast(a, mode === "light" ? "#000000" : "#ffffff") <
|
|
289
|
-
contrast(b, mode === "light" ? "#000000" : "#ffffff")
|
|
282
|
+
contrast(a, mode === "light" ? "#000000" : "#ffffff") < contrast(b, mode === "light" ? "#000000" : "#ffffff")
|
|
290
283
|
? a
|
|
291
284
|
: b,
|
|
292
285
|
);
|
|
@@ -304,8 +297,7 @@ export function derivePalette({
|
|
|
304
297
|
// roles above keep their margin (4.6:1 and up) and need no second solve.
|
|
305
298
|
const hover = hoverFill({ textPrimary, bgSurface: surfaces.bgSurface });
|
|
306
299
|
const worstText = [worstSurface, hover].reduce((a, b) =>
|
|
307
|
-
contrast(a, mode === "light" ? "#000000" : "#ffffff") <
|
|
308
|
-
contrast(b, mode === "light" ? "#000000" : "#ffffff")
|
|
300
|
+
contrast(a, mode === "light" ? "#000000" : "#ffffff") < contrast(b, mode === "light" ? "#000000" : "#ffffff")
|
|
309
301
|
? a
|
|
310
302
|
: b,
|
|
311
303
|
);
|
|
@@ -328,9 +320,7 @@ export function derivePalette({
|
|
|
328
320
|
// and passing either through unchanged put a value in the TokenSet that is not a CSS
|
|
329
321
|
// colour — it then fails silently at paint time, three layers from here.
|
|
330
322
|
let brandHex =
|
|
331
|
-
brandRatio >= 3
|
|
332
|
-
? toHex(parseHex(anchors.brand)!)
|
|
333
|
-
: solveAgainst(brand.h, brandChroma, 3, brandGround, mode);
|
|
323
|
+
brandRatio >= 3 ? toHex(parseHex(anchors.brand)!) : solveAgainst(brand.h, brandChroma, 3, brandGround, mode);
|
|
334
324
|
if (brandRatio < 3) {
|
|
335
325
|
warnings.push(
|
|
336
326
|
`brand ${anchors.brand} sits at ${brandRatio.toFixed(2)}:1 against the ${mode} surfaces, ` +
|
|
@@ -425,20 +415,8 @@ export function derivePalette({
|
|
|
425
415
|
const hue = semanticHue[role];
|
|
426
416
|
const chroma = semanticChroma[role];
|
|
427
417
|
const bg = tintOn(hue, chroma, surfaces.bgSurface, mode);
|
|
428
|
-
const onSurface = solveLightness(
|
|
429
|
-
|
|
430
|
-
parseHex(worstText)!,
|
|
431
|
-
hue,
|
|
432
|
-
chroma,
|
|
433
|
-
mode === "light" ? "darker" : "lighter",
|
|
434
|
-
);
|
|
435
|
-
const onTint = solveLightness(
|
|
436
|
-
4.5,
|
|
437
|
-
parseHex(bg)!,
|
|
438
|
-
hue,
|
|
439
|
-
chroma,
|
|
440
|
-
mode === "light" ? "darker" : "lighter",
|
|
441
|
-
);
|
|
418
|
+
const onSurface = solveLightness(4.5, parseHex(worstText)!, hue, chroma, mode === "light" ? "darker" : "lighter");
|
|
419
|
+
const onTint = solveLightness(4.5, parseHex(bg)!, hue, chroma, mode === "light" ? "darker" : "lighter");
|
|
442
420
|
const l = mode === "light" ? Math.min(onSurface, onTint) : Math.max(onSurface, onTint);
|
|
443
421
|
return oklchToHex({ l, c: chroma, h: hue });
|
|
444
422
|
};
|
|
@@ -508,7 +486,13 @@ export function derivePalette({
|
|
|
508
486
|
// numpad's sign, a future row's figure), so it gets the text floor too (0.33). The
|
|
509
487
|
// fixed lightness left it at 4.24:1 on four light pages.
|
|
510
488
|
const neutralChroma = 0.012 * weight;
|
|
511
|
-
const neutralFloor = solveLightness(
|
|
489
|
+
const neutralFloor = solveLightness(
|
|
490
|
+
4.5,
|
|
491
|
+
parseHex(worstText)!,
|
|
492
|
+
brand.h,
|
|
493
|
+
neutralChroma,
|
|
494
|
+
mode === "light" ? "darker" : "lighter",
|
|
495
|
+
);
|
|
512
496
|
const moneyNeutral = oklchToHex({
|
|
513
497
|
l: mode === "light" ? Math.min(0.52, neutralFloor) : Math.max(0.72, neutralFloor),
|
|
514
498
|
c: neutralChroma,
|
|
@@ -557,12 +541,7 @@ export function derivePalette({
|
|
|
557
541
|
* `moneyIncome`/`moneyExpense` — so a heatmap cell and the figure printed beside it
|
|
558
542
|
* agree about which way is which, rather than each inventing its own convention.
|
|
559
543
|
*/
|
|
560
|
-
function deriveHeat(
|
|
561
|
-
income: string,
|
|
562
|
-
expense: string,
|
|
563
|
-
surfaces: { bgSurface2: string },
|
|
564
|
-
mode: ThemeMode,
|
|
565
|
-
): HeatStops {
|
|
544
|
+
function deriveHeat(income: string, expense: string, surfaces: { bgSurface2: string }, mode: ThemeMode): HeatStops {
|
|
566
545
|
const exp = hexToOklch(expense)!;
|
|
567
546
|
return {
|
|
568
547
|
neutral: surfaces.bgSurface2,
|
|
@@ -649,7 +628,13 @@ export function auditPalette(
|
|
|
649
628
|
}
|
|
650
629
|
// The stepped light well, a hex `applyTokenSet` writes (§13.3, decision 2).
|
|
651
630
|
if (step?.well) {
|
|
652
|
-
add(
|
|
631
|
+
add(
|
|
632
|
+
"bgSurface2 on bgSurface",
|
|
633
|
+
t.bgSurface2,
|
|
634
|
+
t.bgSurface,
|
|
635
|
+
WELL_STEP_MIN,
|
|
636
|
+
"house rule: the well stands two hover steps from the card",
|
|
637
|
+
);
|
|
653
638
|
}
|
|
654
639
|
for (const [name, bg] of textGrounds) {
|
|
655
640
|
add(`textPrimary on ${name}`, t.textPrimary, bg, 7, "WCAG 1.4.6 AAA body text");
|
|
@@ -694,13 +679,7 @@ export function auditPalette(
|
|
|
694
679
|
add("warning on warningBg", semantic.warning, semantic.warningBg, 4.5, "WCAG 1.4.3 — badge text");
|
|
695
680
|
add("info on infoBg", semantic.info, semantic.infoBg, 4.5, "WCAG 1.4.3 — badge text");
|
|
696
681
|
add("success on successBg", semantic.success, semantic.successBg, 4.5, "WCAG 1.4.3 — badge text");
|
|
697
|
-
add(
|
|
698
|
-
"dangerContrast on danger",
|
|
699
|
-
semantic.dangerContrast,
|
|
700
|
-
semantic.danger,
|
|
701
|
-
4.5,
|
|
702
|
-
"WCAG 1.4.3 AA body text",
|
|
703
|
-
);
|
|
682
|
+
add("dangerContrast on danger", semantic.dangerContrast, semantic.danger, 4.5, "WCAG 1.4.3 AA body text");
|
|
704
683
|
}
|
|
705
684
|
|
|
706
685
|
const failures = checks.filter((c) => !c.passes);
|
|
@@ -771,12 +750,7 @@ const SINGLE_LIGHTNESS_MAX_SERIES = 4;
|
|
|
771
750
|
* wants their charts to follow their brand and is willing to read the report — not as
|
|
772
751
|
* a silent upgrade to the default.
|
|
773
752
|
*/
|
|
774
|
-
export function deriveChartRamp(
|
|
775
|
-
brandHex: string,
|
|
776
|
-
mode: ThemeMode,
|
|
777
|
-
surfaces: string[],
|
|
778
|
-
count = 9,
|
|
779
|
-
): ChartRampReport {
|
|
753
|
+
export function deriveChartRamp(brandHex: string, mode: ThemeMode, surfaces: string[], count = 9): ChartRampReport {
|
|
780
754
|
const brand = hexToOklch(brandHex) ?? { l: 0.6, c: 0.12, h: 264 };
|
|
781
755
|
const base = mode === "light" ? 0.58 : 0.74;
|
|
782
756
|
const c = Math.max(0.09, Math.min(brand.c, 0.15));
|
|
@@ -41,10 +41,7 @@ interface PaletteState {
|
|
|
41
41
|
* that app's theme store (for the active light/dark mode). Returns the palette
|
|
42
42
|
* hook plus the effect + selector hooks that read the active preset's tokens.
|
|
43
43
|
*/
|
|
44
|
-
export function createPaletteStore(
|
|
45
|
-
storageKey: string,
|
|
46
|
-
useTheme: UseBoundStore<StoreApi<ThemeState>>,
|
|
47
|
-
) {
|
|
44
|
+
export function createPaletteStore(storageKey: string, useTheme: UseBoundStore<StoreApi<ThemeState>>) {
|
|
48
45
|
const usePalette = create<PaletteState>()(
|
|
49
46
|
logger(
|
|
50
47
|
persist(
|
package/src/theme/text-size.ts
CHANGED
|
@@ -260,7 +260,7 @@ export function createTextSizeStore(storageKey: string) {
|
|
|
260
260
|
merge: (persisted, current) => ({
|
|
261
261
|
...current,
|
|
262
262
|
size: isTextSize((persisted as { size?: unknown } | null)?.size)
|
|
263
|
-
? (
|
|
263
|
+
? (persisted as { size: TextSize }).size
|
|
264
264
|
: null,
|
|
265
265
|
}),
|
|
266
266
|
},
|
package/src/theme/theme-store.ts
CHANGED
|
@@ -37,9 +37,7 @@ function resolve(preference: ThemePreference): ThemeMode {
|
|
|
37
37
|
* persisted the concrete `mode` (light/dark); carry that over as an explicit
|
|
38
38
|
* preference so the choice survives. Shared by the store's `migrate` and the
|
|
39
39
|
* pre-hydration {@link applyPersistedTheme}. */
|
|
40
|
-
function preferenceFromState(
|
|
41
|
-
s: { mode?: string; preference?: string } | null | undefined,
|
|
42
|
-
): ThemePreference {
|
|
40
|
+
function preferenceFromState(s: { mode?: string; preference?: string } | null | undefined): ThemePreference {
|
|
43
41
|
if (s?.preference === "light" || s?.preference === "dark" || s?.preference === "system") {
|
|
44
42
|
return s.preference;
|
|
45
43
|
}
|
|
@@ -112,9 +110,7 @@ export function createThemeStore(storageKey: string) {
|
|
|
112
110
|
// Only the preference is persisted; `mode` is derived on load.
|
|
113
111
|
partialize: (s) => ({ preference: s.preference }),
|
|
114
112
|
migrate: (persistedState): { preference: ThemePreference } => ({
|
|
115
|
-
preference: preferenceFromState(
|
|
116
|
-
persistedState as { mode?: string; preference?: string } | null,
|
|
117
|
-
),
|
|
113
|
+
preference: preferenceFromState(persistedState as { mode?: string; preference?: string } | null),
|
|
118
114
|
}),
|
|
119
115
|
onRehydrateStorage: () => (state) => {
|
|
120
116
|
// The persisted preference decides the concrete mode at load.
|
|
@@ -220,14 +220,16 @@ export function TourCatalogue({
|
|
|
220
220
|
const done = (tour: TourInfo) => isTourDone(tour, completed[tour.id]);
|
|
221
221
|
const needle = foldForSearch(query.trim(), locale);
|
|
222
222
|
const matchesQuery = (tour: TourInfo) =>
|
|
223
|
-
!needle ||
|
|
223
|
+
!needle ||
|
|
224
|
+
[tour.title, tour.description, tour.about].some((text) => !!text && foldForSearch(text, locale).includes(needle));
|
|
224
225
|
const inState = (tour: TourInfo) => (state === "all" ? true : state === "done" ? done(tour) : !done(tour));
|
|
225
226
|
const inGroup = (tour: TourInfo, id: string | null = group) => id === null || tour.group === id;
|
|
226
227
|
|
|
227
228
|
const found = listed.filter((t) => matchesQuery(t) && inGroup(t));
|
|
228
229
|
const foundDone = found.filter(done).length;
|
|
229
230
|
const visible = found.filter(inState);
|
|
230
|
-
const groupCount = (id: string | null) =>
|
|
231
|
+
const groupCount = (id: string | null) =>
|
|
232
|
+
listed.filter((t) => matchesQuery(t) && inState(t) && inGroup(t, id)).length;
|
|
231
233
|
const filtering = needle.length > 0 || state !== "all" || group !== null;
|
|
232
234
|
const sections = groups
|
|
233
235
|
.map((g) => ({ ...g, tours: visible.filter((t) => t.group === g.id) }))
|
package/src/tour/tour-dock.ts
CHANGED
|
@@ -89,7 +89,11 @@ export function dockStyle(edge: DockEdge, spot: DockRect | null, band: Band): CS
|
|
|
89
89
|
maxHeight: cap,
|
|
90
90
|
};
|
|
91
91
|
if (edge === "top") {
|
|
92
|
-
return {
|
|
92
|
+
return {
|
|
93
|
+
...base,
|
|
94
|
+
top: band.top <= 0 ? `max(${GUTTER}px, env(safe-area-inset-top))` : band.top + GUTTER,
|
|
95
|
+
bottom: "auto",
|
|
96
|
+
};
|
|
93
97
|
}
|
|
94
98
|
const fromBottom = vh - band.bottom;
|
|
95
99
|
return {
|
package/src/tour/tour-engine.ts
CHANGED
|
@@ -12,10 +12,7 @@ export function liveEngine<T extends object>(
|
|
|
12
12
|
): { engine: T; set: (current: T) => void } {
|
|
13
13
|
let current = initial;
|
|
14
14
|
const read = () => {
|
|
15
|
-
if (!current)
|
|
16
|
-
throw new Error(
|
|
17
|
-
"[ui-kit] The tour engine was read before its provider rendered.",
|
|
18
|
-
);
|
|
15
|
+
if (!current) throw new Error("[ui-kit] The tour engine was read before its provider rendered.");
|
|
19
16
|
return current;
|
|
20
17
|
};
|
|
21
18
|
const engine = {} as T;
|
|
@@ -26,8 +23,7 @@ export function liveEngine<T extends object>(
|
|
|
26
23
|
const value = read()[key];
|
|
27
24
|
// A method is looked up when it is CALLED, so a kept `engine.stop` is the latest too.
|
|
28
25
|
return typeof value === "function"
|
|
29
|
-
? (...args: unknown[]) =>
|
|
30
|
-
(read()[key] as (...a: unknown[]) => unknown)(...args)
|
|
26
|
+
? (...args: unknown[]) => (read()[key] as (...a: unknown[]) => unknown)(...args)
|
|
31
27
|
: value;
|
|
32
28
|
},
|
|
33
29
|
});
|
package/src/tour/tour.tsx
CHANGED
|
@@ -597,7 +597,8 @@ export function TourProvider({
|
|
|
597
597
|
}
|
|
598
598
|
// The step awaiting it, or the first later one: the record is saved, so the fields
|
|
599
599
|
// between are passed over.
|
|
600
|
-
const awaiting =
|
|
600
|
+
const awaiting =
|
|
601
|
+
s[i]?.awaitGate === signal.key ? i : s.findIndex((st, k) => k > i && st.awaitGate === signal.key);
|
|
601
602
|
if (awaiting < 0) return;
|
|
602
603
|
const to = forward(s, awaiting + 1, "next");
|
|
603
604
|
if (to < 0) finish();
|
|
@@ -681,7 +682,8 @@ function resolveAt(steps: TourStep[], at: TourAt): number {
|
|
|
681
682
|
const anchor = `data-tour="${at}"`;
|
|
682
683
|
const found = steps.findIndex((step) => step.target?.includes(anchor));
|
|
683
684
|
if (found >= 0) return found;
|
|
684
|
-
if (devWarnings())
|
|
685
|
+
if (devWarnings())
|
|
686
|
+
console.warn(`[ui-kit] A tour was started at "${at}", but no step targets [${anchor}]: it starts at 0.`);
|
|
685
687
|
return 0;
|
|
686
688
|
}
|
|
687
689
|
|
|
@@ -778,7 +780,7 @@ function spotRectOf(el: Element, step: TourStep): Rect {
|
|
|
778
780
|
let bottom = own.top + own.height;
|
|
779
781
|
const reach = (step.padding ?? 8) + RING_BAND;
|
|
780
782
|
// Grow until nothing more is in reach: a hint under the field, then an error under it.
|
|
781
|
-
for (let grew = true; grew;
|
|
783
|
+
for (let grew = true; grew;) {
|
|
782
784
|
grew = false;
|
|
783
785
|
for (let i = lines.length - 1; i >= 0; i--) {
|
|
784
786
|
const r = lines[i];
|
|
@@ -1119,7 +1121,7 @@ function TourOverlay({
|
|
|
1119
1121
|
if (!ready || !step.optional || step.gate || !devWarnings()) return;
|
|
1120
1122
|
console.warn(
|
|
1121
1123
|
`[ui-kit] Tour step "${step.title}" is \`optional\` without a \`gate\`: it shows the Optional chip ` +
|
|
1122
|
-
|
|
1124
|
+
'and a plain Next. "Leave empty" needs a gate to compare.',
|
|
1123
1125
|
);
|
|
1124
1126
|
}, [ready, step]);
|
|
1125
1127
|
|
|
@@ -1302,7 +1304,12 @@ function TourOverlay({
|
|
|
1302
1304
|
// On an interactive step a key pressed in the target, or in a layer it opened (the
|
|
1303
1305
|
// number pad's Escape, a menu's arrows), is the page's. The card's and the bare
|
|
1304
1306
|
// page's (focus on <body>) stay the tour's.
|
|
1305
|
-
if (
|
|
1307
|
+
if (
|
|
1308
|
+
interactive &&
|
|
1309
|
+
e.target instanceof Node &&
|
|
1310
|
+
e.target !== document.body &&
|
|
1311
|
+
!rootRef.current?.contains(e.target)
|
|
1312
|
+
) {
|
|
1306
1313
|
return;
|
|
1307
1314
|
}
|
|
1308
1315
|
// Escape is the tour's Escape layer's (above) once the step is shown; while it is
|
|
@@ -1479,7 +1486,11 @@ function SpotlightShields({ spot }: { spot: Rect }) {
|
|
|
1479
1486
|
const bottom = spot.top + spot.height;
|
|
1480
1487
|
return (
|
|
1481
1488
|
<>
|
|
1482
|
-
<div
|
|
1489
|
+
<div
|
|
1490
|
+
data-tour-shield=""
|
|
1491
|
+
className={shield}
|
|
1492
|
+
style={{ top: 0, left: 0, right: 0, height: Math.max(0, spot.top) }}
|
|
1493
|
+
/>
|
|
1483
1494
|
<div data-tour-shield="" className={shield} style={{ top: bottom, left: 0, right: 0, bottom: 0 }} />
|
|
1484
1495
|
<div
|
|
1485
1496
|
data-tour-shield=""
|
|
@@ -1688,7 +1699,16 @@ function TourCard({
|
|
|
1688
1699
|
}
|
|
1689
1700
|
setEdge(null);
|
|
1690
1701
|
setStyle(
|
|
1691
|
-
placeCard(
|
|
1702
|
+
placeCard(
|
|
1703
|
+
rect,
|
|
1704
|
+
card.offsetWidth,
|
|
1705
|
+
card.offsetHeight,
|
|
1706
|
+
window.innerWidth,
|
|
1707
|
+
window.innerHeight,
|
|
1708
|
+
12,
|
|
1709
|
+
step.placement,
|
|
1710
|
+
dir,
|
|
1711
|
+
),
|
|
1692
1712
|
);
|
|
1693
1713
|
}, [ref, rect, index, step.placement, step.target, dir, docked, bandTick]);
|
|
1694
1714
|
|
|
@@ -1728,11 +1748,7 @@ function TourCard({
|
|
|
1728
1748
|
{step.action && <div className="mt-3">{step.action}</div>}
|
|
1729
1749
|
<div className="mt-4 space-y-2">
|
|
1730
1750
|
<div className="flex items-center justify-between gap-2">
|
|
1731
|
-
<button
|
|
1732
|
-
type="button"
|
|
1733
|
-
onClick={onSkip}
|
|
1734
|
-
className="text-xs text-placeholder hover:text-secondary"
|
|
1735
|
-
>
|
|
1751
|
+
<button type="button" onClick={onSkip} className="text-xs text-placeholder hover:text-secondary">
|
|
1736
1752
|
{labels.skip}
|
|
1737
1753
|
</button>
|
|
1738
1754
|
<div className="flex items-center gap-2">
|
|
@@ -197,7 +197,10 @@ function fromRecord(value: unknown): TourCompletions | undefined {
|
|
|
197
197
|
* The record, and whether the text was READ (empty, the kit's shape, or a shape `migrate`
|
|
198
198
|
* knows) rather than dropped: a write over an unread text would lose it (B-1).
|
|
199
199
|
*/
|
|
200
|
-
function parse(
|
|
200
|
+
function parse(
|
|
201
|
+
raw: string | null,
|
|
202
|
+
migrate: UseTourProgressOptions["migrate"],
|
|
203
|
+
): { value: TourCompletions; readable: boolean } {
|
|
201
204
|
if (raw === null || raw.trim() === "") return { value: EMPTY, readable: true };
|
|
202
205
|
let value: unknown = raw;
|
|
203
206
|
try {
|
|
@@ -294,7 +297,10 @@ function devWarn(message: string) {
|
|
|
294
297
|
* Remember `account` for `key` if it is the first one, and return the key's account.
|
|
295
298
|
* @internal Not part of the barrel; `TourProvider` registers its `progress` with it.
|
|
296
299
|
*/
|
|
297
|
-
export function rememberAccount(
|
|
300
|
+
export function rememberAccount(
|
|
301
|
+
key: string,
|
|
302
|
+
account: TourProgressAccount | undefined,
|
|
303
|
+
): TourProgressAccount | undefined {
|
|
298
304
|
if (account && !accounts.has(key)) {
|
|
299
305
|
accounts.set(key, account);
|
|
300
306
|
if (account.adopt && account.adopt.storageKey === key) {
|
|
@@ -58,7 +58,9 @@ function navigationInFlight(history: Navigator | undefined, dataRouter: DataRout
|
|
|
58
58
|
const live = state?.location ?? (history as (Navigator & { location?: Partial<Place> }) | undefined)?.location;
|
|
59
59
|
if (!live) return false;
|
|
60
60
|
return (
|
|
61
|
-
live.pathname !== rendered.pathname ||
|
|
61
|
+
live.pathname !== rendered.pathname ||
|
|
62
|
+
(live.search ?? "") !== rendered.search ||
|
|
63
|
+
(live.hash ?? "") !== rendered.hash
|
|
62
64
|
);
|
|
63
65
|
}
|
|
64
66
|
|
package/src/vite-env.d.ts
CHANGED
|
@@ -19,8 +19,5 @@ interface ImportMeta {
|
|
|
19
19
|
* prop, which is the kind of guard the consumer app writes with `readFileSync`
|
|
20
20
|
* and cannot be written that way here.
|
|
21
21
|
*/
|
|
22
|
-
glob<T = unknown>(
|
|
23
|
-
pattern: string,
|
|
24
|
-
options?: { query?: string; import?: string; eager?: boolean },
|
|
25
|
-
): Record<string, T>;
|
|
22
|
+
glob<T = unknown>(pattern: string, options?: { query?: string; import?: string; eager?: boolean }): Record<string, T>;
|
|
26
23
|
}
|
|
@@ -226,14 +226,8 @@ export function StepperNav<TData extends Record<string, unknown>>({
|
|
|
226
226
|
<div className={cn("flex flex-col gap-6", className)}>
|
|
227
227
|
{(title || description) && (
|
|
228
228
|
<div>
|
|
229
|
-
{title &&
|
|
230
|
-
|
|
231
|
-
{title}
|
|
232
|
-
</h1>
|
|
233
|
-
)}
|
|
234
|
-
{description && (
|
|
235
|
-
<p className="mt-1 text-sm text-muted">{description}</p>
|
|
236
|
-
)}
|
|
229
|
+
{title && <h1 className="text-2xl font-bold tracking-tight text-primary">{title}</h1>}
|
|
230
|
+
{description && <p className="mt-1 text-sm text-muted">{description}</p>}
|
|
237
231
|
</div>
|
|
238
232
|
)}
|
|
239
233
|
|
|
@@ -262,14 +256,10 @@ export function StepperNav<TData extends Record<string, unknown>>({
|
|
|
262
256
|
<span
|
|
263
257
|
className={cn(
|
|
264
258
|
"flex size-8 shrink-0 items-center justify-center rounded-full border-2 text-xs font-semibold transition-colors",
|
|
265
|
-
status === "completed" &&
|
|
266
|
-
|
|
267
|
-
status === "
|
|
268
|
-
|
|
269
|
-
status === "upcoming" &&
|
|
270
|
-
"border-subtle bg-surface text-placeholder",
|
|
271
|
-
status === "skipped" &&
|
|
272
|
-
"border-subtle bg-surface-2 text-muted",
|
|
259
|
+
status === "completed" && "border-brand bg-brand text-brand-contrast",
|
|
260
|
+
status === "active" && "border-brand bg-surface text-brand",
|
|
261
|
+
status === "upcoming" && "border-subtle bg-surface text-placeholder",
|
|
262
|
+
status === "skipped" && "border-subtle bg-surface-2 text-muted",
|
|
273
263
|
)}
|
|
274
264
|
>
|
|
275
265
|
{status === "completed" ? <Check className="size-4" /> : index + 1}
|
|
@@ -278,9 +268,7 @@ export function StepperNav<TData extends Record<string, unknown>>({
|
|
|
278
268
|
<span
|
|
279
269
|
className={cn(
|
|
280
270
|
"hidden text-xs font-medium md:block",
|
|
281
|
-
status === "active" || status === "completed"
|
|
282
|
-
? "text-primary"
|
|
283
|
-
: "text-muted",
|
|
271
|
+
status === "active" || status === "completed" ? "text-primary" : "text-muted",
|
|
284
272
|
)}
|
|
285
273
|
>
|
|
286
274
|
{step.label}
|
|
@@ -290,10 +278,7 @@ export function StepperNav<TData extends Record<string, unknown>>({
|
|
|
290
278
|
{/* Connector line */}
|
|
291
279
|
{!isLast && (
|
|
292
280
|
<div
|
|
293
|
-
className={cn(
|
|
294
|
-
"mx-2 h-0.5 flex-1",
|
|
295
|
-
status === "completed" ? "bg-brand" : "bg-[var(--border)]",
|
|
296
|
-
)}
|
|
281
|
+
className={cn("mx-2 h-0.5 flex-1", status === "completed" ? "bg-brand" : "bg-[var(--border)]")}
|
|
297
282
|
/>
|
|
298
283
|
)}
|
|
299
284
|
</li>
|
|
@@ -317,13 +302,7 @@ export function StepperNav<TData extends Record<string, unknown>>({
|
|
|
317
302
|
|
|
318
303
|
{/* Submit error */}
|
|
319
304
|
{wizard.error && (
|
|
320
|
-
<div
|
|
321
|
-
role="alert"
|
|
322
|
-
className={cn(
|
|
323
|
-
"text-sm text-danger",
|
|
324
|
-
alertFrameClass("danger"),
|
|
325
|
-
)}
|
|
326
|
-
>
|
|
305
|
+
<div role="alert" className={cn("text-sm text-danger", alertFrameClass("danger"))}>
|
|
327
306
|
{wizard.error}
|
|
328
307
|
</div>
|
|
329
308
|
)}
|
|
@@ -347,11 +326,7 @@ export function StepperNav<TData extends Record<string, unknown>>({
|
|
|
347
326
|
</Button>
|
|
348
327
|
)}
|
|
349
328
|
{wizard.currentStep.optional && !wizard.isLastStep && !wizard.isCommitStep && (
|
|
350
|
-
<Button
|
|
351
|
-
variant="ghost"
|
|
352
|
-
onClick={wizard.skip}
|
|
353
|
-
disabled={wizard.nextBlocked || wizard.isValidating}
|
|
354
|
-
>
|
|
329
|
+
<Button variant="ghost" onClick={wizard.skip} disabled={wizard.nextBlocked || wizard.isValidating}>
|
|
355
330
|
{l.skip}
|
|
356
331
|
</Button>
|
|
357
332
|
)}
|
package/src/wizard/types.ts
CHANGED
|
@@ -119,7 +119,6 @@ export interface UseWizardOptions<TData extends Record<string, unknown>> {
|
|
|
119
119
|
|
|
120
120
|
export type StepStatus = "upcoming" | "active" | "completed" | "skipped";
|
|
121
121
|
|
|
122
|
-
|
|
123
122
|
/** What `finish` resolves to at run time (0.50): whether the commit went through, and the
|
|
124
123
|
* error's message when `onComplete` threw. `undefined` when there was nothing to run. */
|
|
125
124
|
export interface WizardFinishResult {
|
|
@@ -168,9 +167,7 @@ export interface UseWizardReturn<TData extends Record<string, unknown>> {
|
|
|
168
167
|
/** Leave after the post-commit steps: drops the URL param, then calls `onDone`. */
|
|
169
168
|
done: () => void;
|
|
170
169
|
/** Register a validator for the mounted step (used by useRhfWizardStep). */
|
|
171
|
-
registerStepValidate: (
|
|
172
|
-
fn: () => ValidateResult | Promise<ValidateResult>,
|
|
173
|
-
) => () => void;
|
|
170
|
+
registerStepValidate: (fn: () => ValidateResult | Promise<ValidateResult>) => () => void;
|
|
174
171
|
/** True when the mounted step has blocked forward navigation (Next/Skip disabled). */
|
|
175
172
|
nextBlocked: boolean;
|
|
176
173
|
/** Set by the active step (via useWizardNextGate) to disable/enable Next+Skip. */
|