@eifi1/ui-kit 0.51.4 → 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 +3 -3
- 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 +1 -4
- 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 +10 -8
- 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.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 +44 -56
- 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.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 +6 -8
- 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 +2 -7
- 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 +2 -8
- 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.map +1 -1
- package/dist/components/legal-page.js +14 -2
- package/dist/components/legal-page.js.map +1 -1
- package/dist/components/legal.js +12 -2
- 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.js +22 -10
- 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.js +4 -1
- 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 +4 -1
- 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 +4 -1
- package/dist/i18n/locales/en.js.map +2 -2
- package/dist/i18n/locales/es.js +4 -1
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.js +4 -1
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.js +4 -1
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.js +4 -1
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/plurals.js.map +1 -1
- package/dist/i18n/review.js +13 -7
- package/dist/i18n/review.js.map +1 -1
- package/dist/i18n/shared-labels.js.map +1 -1
- package/dist/index.d.ts +16 -16
- 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 +4 -0
- 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-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.js +12 -6
- 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.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/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 +12 -42
- 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 +13 -14
- 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 +1 -3
- package/src/components/data-table-groups.tsx +3 -1
- package/src/components/data-table-head.tsx +27 -45
- 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 +489 -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 +6 -8
- 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 +4 -17
- package/src/components/image-grid.tsx +1 -6
- package/src/components/inline-edit-field.tsx +1 -5
- package/src/components/inline-entity-combobox.tsx +6 -21
- package/src/components/input.tsx +14 -2
- package/src/components/jump-calendar.tsx +2 -6
- package/src/components/legal-labels.ts +1 -2
- package/src/components/legal-page.tsx +18 -7
- package/src/components/legal.tsx +14 -5
- package/src/components/lightbox.tsx +1 -3
- package/src/components/line-items.tsx +7 -15
- package/src/components/list.tsx +29 -25
- 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 +12 -8
- 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 +33 -49
- package/src/i18n/kit-labels.tsx +5 -20
- package/src/i18n/languages.ts +2 -8
- package/src/i18n/locales/en.ts +11 -31
- package/src/i18n/locales/es.ts +35 -49
- package/src/i18n/locales/fr.ts +34 -51
- package/src/i18n/locales/hu.ts +26 -37
- package/src/i18n/locales/it.ts +35 -52
- package/src/i18n/locales/zh.ts +14 -32
- package/src/i18n/plurals.ts +4 -1
- package/src/i18n/review.ts +18 -7
- package/src/i18n/shared-labels.ts +1 -2
- package/src/index.ts +106 -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 +15 -3
- 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-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 +12 -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 +9 -8
- package/src/shell/topbar-controls.tsx +5 -19
- package/src/shell/tour-menu.tsx +9 -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/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. */
|
package/src/wizard/use-wizard.ts
CHANGED
|
@@ -50,10 +50,7 @@ function isAfterCommit(state: { currentStepIndex: number; committedStepIndex: nu
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/** Whether `index` is on the far side of a commit the wizard has already moved past. */
|
|
53
|
-
function crossesCommit(
|
|
54
|
-
state: { currentStepIndex: number; committedStepIndex: number | null },
|
|
55
|
-
index: number,
|
|
56
|
-
) {
|
|
53
|
+
function crossesCommit(state: { currentStepIndex: number; committedStepIndex: number | null }, index: number) {
|
|
57
54
|
return isAfterCommit(state) && index <= (state.committedStepIndex as number);
|
|
58
55
|
}
|
|
59
56
|
|
|
@@ -74,10 +71,7 @@ type WizardAction<TData> =
|
|
|
74
71
|
| { type: "SHOW_CANCEL_DIALOG"; show: boolean };
|
|
75
72
|
|
|
76
73
|
function createReducer<TData>(stepCount: number) {
|
|
77
|
-
return function reducer(
|
|
78
|
-
state: WizardState<TData>,
|
|
79
|
-
action: WizardAction<TData>,
|
|
80
|
-
): WizardState<TData> {
|
|
74
|
+
return function reducer(state: WizardState<TData>, action: WizardAction<TData>): WizardState<TData> {
|
|
81
75
|
switch (action.type) {
|
|
82
76
|
case "GO_NEXT": {
|
|
83
77
|
if (action.from !== state.currentStepIndex) return state;
|
|
@@ -187,27 +181,20 @@ export function useWizard<TData extends Record<string, unknown>>(
|
|
|
187
181
|
// step's validators are present — each unregisters on unmount. `goNext` and
|
|
188
182
|
// `finish` run them (via `runStepValidators`) alongside the step config's own
|
|
189
183
|
// `validate`.
|
|
190
|
-
const validatorsRef = useRef(
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
validatorsRef.current.delete(token);
|
|
199
|
-
};
|
|
200
|
-
},
|
|
201
|
-
[],
|
|
202
|
-
);
|
|
184
|
+
const validatorsRef = useRef(new Map<symbol, () => ValidateResult | Promise<ValidateResult>>());
|
|
185
|
+
const registerStepValidate = useCallback((fn: () => ValidateResult | Promise<ValidateResult>) => {
|
|
186
|
+
const token = Symbol();
|
|
187
|
+
validatorsRef.current.set(token, fn);
|
|
188
|
+
return () => {
|
|
189
|
+
validatorsRef.current.delete(token);
|
|
190
|
+
};
|
|
191
|
+
}, []);
|
|
203
192
|
|
|
204
193
|
// Chosen once, at mount: a hook may not be called conditionally, but it may be
|
|
205
194
|
// chosen once and then called unconditionally on every render — which is what
|
|
206
195
|
// makes `urlSync: false` work with no router above the wizard at all.
|
|
207
196
|
const [useStepUrl] = useState(() => (urlSync === false ? useNoStepUrl : useSearchParamStepUrl));
|
|
208
|
-
const [urlParam] = useState(() =>
|
|
209
|
-
typeof urlSync === "object" && urlSync.param ? urlSync.param : "step",
|
|
210
|
-
);
|
|
197
|
+
const [urlParam] = useState(() => (typeof urlSync === "object" && urlSync.param ? urlSync.param : "step"));
|
|
211
198
|
// The wizard's entered `data` and `completedSteps` are NOT persisted across a
|
|
212
199
|
// reload / deep-link (the reducer re-inits to empty defaults on every mount).
|
|
213
200
|
// Restoring a later step index from `?step=N` would therefore leave the wizard
|
|
@@ -234,10 +221,7 @@ export function useWizard<TData extends Record<string, unknown>>(
|
|
|
234
221
|
// state is invalid (e.g. tenant shares != 100%). Defaults to false, so
|
|
235
222
|
// wizards that never call setNextBlocked behave exactly as before.
|
|
236
223
|
const [nextBlocked, setNextBlockedState] = useState(false);
|
|
237
|
-
const setNextBlocked = useCallback(
|
|
238
|
-
(blocked: boolean) => setNextBlockedState(blocked),
|
|
239
|
-
[],
|
|
240
|
-
);
|
|
224
|
+
const setNextBlocked = useCallback((blocked: boolean) => setNextBlockedState(blocked), []);
|
|
241
225
|
|
|
242
226
|
// Sync step index to URL (a no-op under `urlSync: false`). `clearStepUrl` drops
|
|
243
227
|
// the param when the wizard is left through the kit, and stops the sync writing
|
|
@@ -259,14 +243,9 @@ export function useWizard<TData extends Record<string, unknown>>(
|
|
|
259
243
|
// been walked through (completed or skipped). Guards against a restored/last-step
|
|
260
244
|
// index submitting a payload built from empty defaults.
|
|
261
245
|
const canFinish = steps.every(
|
|
262
|
-
(_, index) =>
|
|
263
|
-
index >= commitStepIndex ||
|
|
264
|
-
state.completedSteps.has(index) ||
|
|
265
|
-
state.skippedSteps.has(index),
|
|
246
|
+
(_, index) => index >= commitStepIndex || state.completedSteps.has(index) || state.skippedSteps.has(index),
|
|
266
247
|
);
|
|
267
|
-
const canGoBack =
|
|
268
|
-
(!isFirstStep || onExit !== undefined) &&
|
|
269
|
-
!crossesCommit(state, state.currentStepIndex - 1);
|
|
248
|
+
const canGoBack = (!isFirstStep || onExit !== undefined) && !crossesCommit(state, state.currentStepIndex - 1);
|
|
270
249
|
const canCancel = cancellable && !afterCommit;
|
|
271
250
|
const canDone = isLastStep && afterCommit && onDone !== undefined;
|
|
272
251
|
|
|
@@ -551,18 +530,24 @@ function useSearchParamStepUrl(param: string, index: number): () => void {
|
|
|
551
530
|
const leftRef = useRef(false);
|
|
552
531
|
useEffect(() => {
|
|
553
532
|
if (leftRef.current) return;
|
|
554
|
-
setUrlParams(
|
|
555
|
-
prev
|
|
556
|
-
|
|
557
|
-
|
|
533
|
+
setUrlParams(
|
|
534
|
+
(prev) => {
|
|
535
|
+
prev.set(param, String(index));
|
|
536
|
+
return prev;
|
|
537
|
+
},
|
|
538
|
+
{ replace: true },
|
|
539
|
+
);
|
|
558
540
|
}, [param, index, setUrlParams]);
|
|
559
541
|
return useCallback(() => {
|
|
560
542
|
if (leftRef.current) return;
|
|
561
543
|
leftRef.current = true;
|
|
562
|
-
setUrlParams(
|
|
563
|
-
prev
|
|
564
|
-
|
|
565
|
-
|
|
544
|
+
setUrlParams(
|
|
545
|
+
(prev) => {
|
|
546
|
+
prev.delete(param);
|
|
547
|
+
return prev;
|
|
548
|
+
},
|
|
549
|
+
{ replace: true },
|
|
550
|
+
);
|
|
566
551
|
}, [param, setUrlParams]);
|
|
567
552
|
}
|
|
568
553
|
|
package/src/wizard/validation.ts
CHANGED
|
@@ -26,11 +26,7 @@ export function requiredFieldsValidator<T extends Record<string, unknown>>(
|
|
|
26
26
|
const errors: FieldErrors = {};
|
|
27
27
|
for (const f of fields) {
|
|
28
28
|
const v = data[f.key];
|
|
29
|
-
const ok = f.valid
|
|
30
|
-
? f.valid(v, data)
|
|
31
|
-
: typeof v === "string"
|
|
32
|
-
? v.trim() !== ""
|
|
33
|
-
: v != null;
|
|
29
|
+
const ok = f.valid ? f.valid(v, data) : typeof v === "string" ? v.trim() !== "" : v != null;
|
|
34
30
|
if (!ok) errors[String(f.key)] = f.message ?? defaultMessage;
|
|
35
31
|
}
|
|
36
32
|
return { ok: Object.keys(errors).length === 0, errors };
|
|
@@ -9,9 +9,7 @@ export interface WizardContextValue {
|
|
|
9
9
|
* AND-combining the results — this replaces the per-page `useRef` +
|
|
10
10
|
* `validate: () => ref.current?.()` bridge each RHF step used to wire.
|
|
11
11
|
*/
|
|
12
|
-
registerStepValidate: (
|
|
13
|
-
fn: () => ValidateResult | Promise<ValidateResult>,
|
|
14
|
-
) => () => void;
|
|
12
|
+
registerStepValidate: (fn: () => ValidateResult | Promise<ValidateResult>) => () => void;
|
|
15
13
|
/** Lets the mounted step disable Next/Skip (e.g. invalid tenant shares). */
|
|
16
14
|
setNextBlocked: (blocked: boolean) => void;
|
|
17
15
|
}
|
|
@@ -52,9 +50,7 @@ export function useOptionalWizardContext(): WizardContextValue | null {
|
|
|
52
50
|
* `<StepperNav>`, like {@link useWizardContext}: a validator with nothing to run it is
|
|
53
51
|
* a bug to hear about.
|
|
54
52
|
*/
|
|
55
|
-
export function useWizardStepValidate(
|
|
56
|
-
validate: () => ValidateResult | Promise<ValidateResult>,
|
|
57
|
-
): void {
|
|
53
|
+
export function useWizardStepValidate(validate: () => ValidateResult | Promise<ValidateResult>): void {
|
|
58
54
|
const { registerStepValidate } = useWizardContext();
|
|
59
55
|
const ref = useRef(validate);
|
|
60
56
|
useEffect(() => {
|
|
@@ -34,14 +34,7 @@ const HEADING = { 2: "h2", 3: "h3", 4: "h4" } as const;
|
|
|
34
34
|
/** The vertical rhythm one wizard step's content sits on. A component rather
|
|
35
35
|
* than a class string so every step in every app spaces its fields the same —
|
|
36
36
|
* and, with `title` / `description`, heads them the same. */
|
|
37
|
-
export function WizardStep({
|
|
38
|
-
children,
|
|
39
|
-
className,
|
|
40
|
-
title,
|
|
41
|
-
description,
|
|
42
|
-
headingLevel = 3,
|
|
43
|
-
actions,
|
|
44
|
-
}: WizardStepProps) {
|
|
37
|
+
export function WizardStep({ children, className, title, description, headingLevel = 3, actions }: WizardStepProps) {
|
|
45
38
|
const hasTitle = title !== undefined && title !== null && title !== false && title !== "";
|
|
46
39
|
const hasDescription =
|
|
47
40
|
description !== undefined && description !== null && description !== false && description !== "";
|
|
@@ -68,14 +68,10 @@ export function WizardSummary({
|
|
|
68
68
|
<dl className="grid gap-2 text-sm">
|
|
69
69
|
{section.items.map((item, iIdx) => (
|
|
70
70
|
<div key={iIdx}>
|
|
71
|
-
{iIdx > 0 &&
|
|
72
|
-
<div className="mb-2 border-t border-subtle" role="presentation" />
|
|
73
|
-
)}
|
|
71
|
+
{iIdx > 0 && <div className="mb-2 border-t border-subtle" role="presentation" />}
|
|
74
72
|
<div className="flex items-start justify-between gap-4">
|
|
75
73
|
<dt className="text-muted">{item.label}</dt>
|
|
76
|
-
<dd className="text-end font-medium text-primary">
|
|
77
|
-
{item.value}
|
|
78
|
-
</dd>
|
|
74
|
+
<dd className="text-end font-medium text-primary">{item.value}</dd>
|
|
79
75
|
</div>
|
|
80
76
|
</div>
|
|
81
77
|
))}
|