@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
|
@@ -7,13 +7,7 @@ import { splitTriggerAria } from "./trigger-aria";
|
|
|
7
7
|
import { FIELD_BASE } from "./field-base";
|
|
8
8
|
import { FieldBox, useFieldMessages } from "./field-parts";
|
|
9
9
|
import { Tooltip } from "./tooltip";
|
|
10
|
-
import {
|
|
11
|
-
DateField,
|
|
12
|
-
useDatePickerLabels,
|
|
13
|
-
useTriggerFormat,
|
|
14
|
-
withEndHint,
|
|
15
|
-
type DatePickerBaseProps,
|
|
16
|
-
} from "./date-field";
|
|
10
|
+
import { DateField, useDatePickerLabels, useTriggerFormat, withEndHint, type DatePickerBaseProps } from "./date-field";
|
|
17
11
|
import { PanelCalendar } from "./jump-calendar";
|
|
18
12
|
// The shared field, the month-jump calendar and the range picker live in date-field.tsx,
|
|
19
13
|
// jump-calendar.tsx and date-range-picker.tsx (MOD-9); their public names are still this
|
|
@@ -191,11 +191,7 @@ function PresetColumn({
|
|
|
191
191
|
<div
|
|
192
192
|
role="group"
|
|
193
193
|
aria-label={label}
|
|
194
|
-
className={
|
|
195
|
-
sheet
|
|
196
|
-
? "grid grid-cols-2 gap-0.5"
|
|
197
|
-
: "flex w-32 shrink-0 flex-col gap-0.5 border-e border-subtle pe-2"
|
|
198
|
-
}
|
|
194
|
+
className={sheet ? "grid grid-cols-2 gap-0.5" : "flex w-32 shrink-0 flex-col gap-0.5 border-e border-subtle pe-2"}
|
|
199
195
|
>
|
|
200
196
|
{presets.map((p, i) => {
|
|
201
197
|
const selected = i === marked;
|
|
@@ -210,9 +206,7 @@ function PresetColumn({
|
|
|
210
206
|
"rounded px-2 text-start",
|
|
211
207
|
// 44px on a phone: the kit's touch-target size (`SHEET_ROW_CLASS`).
|
|
212
208
|
sheet ? "min-h-11 py-2 text-sm" : "py-1.5 text-xs",
|
|
213
|
-
selected
|
|
214
|
-
? "bg-active font-medium text-primary"
|
|
215
|
-
: "text-secondary hover:bg-hover",
|
|
209
|
+
selected ? "bg-active font-medium text-primary" : "text-secondary hover:bg-hover",
|
|
216
210
|
)}
|
|
217
211
|
>
|
|
218
212
|
{p.label}
|
|
@@ -419,11 +413,7 @@ export function DateRangePicker(props: DateRangePickerProps) {
|
|
|
419
413
|
const activeId = controlled ? preset : ownPreset;
|
|
420
414
|
const a = from ? render(from) : "";
|
|
421
415
|
const b = to ? render(to) : "";
|
|
422
|
-
const triggerText = from
|
|
423
|
-
? to
|
|
424
|
-
? `${a}${separator}${b}`
|
|
425
|
-
: `${a}${separator}…`
|
|
426
|
-
: (placeholder ?? "");
|
|
416
|
+
const triggerText = from ? (to ? `${a}${separator}${b}` : `${a}${separator}…`) : (placeholder ?? "");
|
|
427
417
|
const hasPresets = Boolean(presets && presets.length > 0);
|
|
428
418
|
const sheet = usePhoneLayout();
|
|
429
419
|
const commitRange = (f: string, t: string, presetId: string | undefined) => {
|
|
@@ -159,9 +159,7 @@ export function DescriptionList({
|
|
|
159
159
|
// outer `min(100%, …)` keeps a single card from overflowing a pane narrower than
|
|
160
160
|
// its minimum.
|
|
161
161
|
const track =
|
|
162
|
-
columns !== undefined
|
|
163
|
-
? `max(${minCardWidth}, (100% - ${columns - 1} * ${gap.len}) / ${columns})`
|
|
164
|
-
: minCardWidth;
|
|
162
|
+
columns !== undefined ? `max(${minCardWidth}, (100% - ${columns - 1} * ${gap.len}) / ${columns})` : minCardWidth;
|
|
165
163
|
const grid: CSSProperties | undefined = cards
|
|
166
164
|
? { gridTemplateColumns: `repeat(auto-fill, minmax(min(100%, ${track}), 1fr))` }
|
|
167
165
|
: undefined;
|
|
@@ -293,9 +291,7 @@ export function DescriptionItem({
|
|
|
293
291
|
// A hint is a fact: on a touch screen and at Large it is words under the term, not a
|
|
294
292
|
// 14 px "?" nobody can hover open — the fields' rule (DUP-2, refactor audit 2026-10),
|
|
295
293
|
// which this string hint had been left out of. Elsewhere the "?" as before.
|
|
296
|
-
const shownHint = useInlineHint(
|
|
297
|
-
hint ? <FieldHint label={hint} side="top" className="shrink-0" /> : undefined,
|
|
298
|
-
);
|
|
294
|
+
const shownHint = useInlineHint(hint ? <FieldHint label={hint} side="top" className="shrink-0" /> : undefined);
|
|
299
295
|
const spanClass =
|
|
300
296
|
span === "full"
|
|
301
297
|
? "col-span-full"
|
|
@@ -317,7 +313,10 @@ export function DescriptionItem({
|
|
|
317
313
|
{typeof shownHint === "string" ? (
|
|
318
314
|
// Its own line under the term, in the reading case of a sentence rather than a
|
|
319
315
|
// card term's capitals — StatTile's inline hint.
|
|
320
|
-
<span
|
|
316
|
+
<span
|
|
317
|
+
data-slot="description-hint"
|
|
318
|
+
className="basis-full text-caption leading-tight normal-case tracking-normal"
|
|
319
|
+
>
|
|
321
320
|
{shownHint}
|
|
322
321
|
</span>
|
|
323
322
|
) : (
|
|
@@ -350,12 +349,7 @@ export function DescriptionItem({
|
|
|
350
349
|
return (
|
|
351
350
|
<div
|
|
352
351
|
{...rest}
|
|
353
|
-
className={cn(
|
|
354
|
-
"min-w-0 rounded-md border border-subtle bg-surface",
|
|
355
|
-
CARD_PAD[density],
|
|
356
|
-
spanClass,
|
|
357
|
-
className,
|
|
358
|
-
)}
|
|
352
|
+
className={cn("min-w-0 rounded-md border border-subtle bg-surface", CARD_PAD[density], spanClass, className)}
|
|
359
353
|
>
|
|
360
354
|
{termNode}
|
|
361
355
|
{detail}
|
|
@@ -152,7 +152,9 @@ export function DialogFrame({
|
|
|
152
152
|
labelledBy={titleId}
|
|
153
153
|
// The caller's own description (a warning inside the body, say) is ADDED to the
|
|
154
154
|
// frame's, not traded for it: both are the dialog's.
|
|
155
|
-
aria-describedby={
|
|
155
|
+
aria-describedby={
|
|
156
|
+
[hasDescription ? descriptionId : undefined, describedBy].filter(Boolean).join(" ") || undefined
|
|
157
|
+
}
|
|
156
158
|
// `overflow-hidden` replaces the panel's own `overflow-y-auto` (tailwind-merge
|
|
157
159
|
// treats them as one group), `p-0` its `p-4`: the scroller and the padding move
|
|
158
160
|
// to the body, which is the only part that should move.
|
|
@@ -210,13 +212,20 @@ export function DialogFrame({
|
|
|
210
212
|
* only exists INSIDE the `Modal` (the frame's own body runs outside it). */
|
|
211
213
|
function FrameClose({ label, onClose }: { label?: string; onClose: () => void }) {
|
|
212
214
|
const close = useContext(ModalCloseContext) ?? onClose;
|
|
213
|
-
const labels = useKitLabels(
|
|
215
|
+
const labels = useKitLabels(
|
|
216
|
+
"dialogFrame",
|
|
217
|
+
DEFAULT_DIALOG_FRAME_LABELS,
|
|
218
|
+
label === undefined ? undefined : { close: label },
|
|
219
|
+
);
|
|
214
220
|
return (
|
|
215
221
|
<button
|
|
216
222
|
type="button"
|
|
217
223
|
onClick={close}
|
|
218
224
|
aria-label={labels.close}
|
|
219
|
-
className={cn(
|
|
225
|
+
className={cn(
|
|
226
|
+
"-me-1.5 -mt-1 shrink-0 rounded p-1.5 text-muted outline-none hover:bg-hover hover:text-secondary",
|
|
227
|
+
FOCUS_RING,
|
|
228
|
+
)}
|
|
220
229
|
>
|
|
221
230
|
<X aria-hidden className="size-5" />
|
|
222
231
|
</button>
|
|
@@ -386,9 +386,7 @@ export function Disclosure({
|
|
|
386
386
|
) : (
|
|
387
387
|
<span className={cn("block", card && "text-sm font-semibold text-primary")}>{title}</span>
|
|
388
388
|
)}
|
|
389
|
-
{hint !== undefined &&
|
|
390
|
-
<span className="mt-0.5 block text-xs font-normal text-muted">{hint}</span>
|
|
391
|
-
)}
|
|
389
|
+
{hint !== undefined && <span className="mt-0.5 block text-xs font-normal text-muted">{hint}</span>}
|
|
392
390
|
</span>
|
|
393
391
|
{/* The space is for the accessible name — "Net profit 1,234.50", not
|
|
394
392
|
"Net profit1,234.50"; between flex items it renders as nothing. */}
|
|
@@ -404,22 +402,20 @@ export function Disclosure({
|
|
|
404
402
|
|
|
405
403
|
// Preflight already makes h1–h6 inherit size and weight, so the heading adds
|
|
406
404
|
// structure and nothing visible.
|
|
407
|
-
const header = Heading ?
|
|
405
|
+
const header = Heading ? (
|
|
406
|
+
<Heading className={trailingBeside ? "min-w-0 flex-1" : undefined}>{button}</Heading>
|
|
407
|
+
) : (
|
|
408
|
+
button
|
|
409
|
+
);
|
|
408
410
|
|
|
409
411
|
return (
|
|
410
|
-
<div
|
|
411
|
-
{...rest}
|
|
412
|
-
className={cn(card && "rounded-lg border border-subtle bg-surface shadow-sm", className)}
|
|
413
|
-
>
|
|
412
|
+
<div {...rest} className={cn(card && "rounded-lg border border-subtle bg-surface shadow-sm", className)}>
|
|
414
413
|
{trailingBeside ? (
|
|
415
414
|
<div
|
|
416
415
|
className={cn(
|
|
417
416
|
"relative flex items-center gap-2",
|
|
418
417
|
card &&
|
|
419
|
-
cn(
|
|
420
|
-
"rounded-lg pe-4 has-[[data-disclosure-trigger]:enabled:hover]:bg-hover",
|
|
421
|
-
joined && "rounded-b-none",
|
|
422
|
-
),
|
|
418
|
+
cn("rounded-lg pe-4 has-[[data-disclosure-trigger]:enabled:hover]:bg-hover", joined && "rounded-b-none"),
|
|
423
419
|
)}
|
|
424
420
|
>
|
|
425
421
|
{header}
|
|
@@ -163,8 +163,7 @@ export function useDropdown<T extends HTMLElement = HTMLDivElement>({
|
|
|
163
163
|
* input each time the panel opens, so typing filters immediately.
|
|
164
164
|
*/
|
|
165
165
|
export function useDropdownSearch<T extends HTMLElement = HTMLDivElement>() {
|
|
166
|
-
const { open, setOpen, wrapperRef, panelRef, triggerRef, closeToTrigger } =
|
|
167
|
-
useDropdown<T>();
|
|
166
|
+
const { open, setOpen, wrapperRef, panelRef, triggerRef, closeToTrigger } = useDropdown<T>();
|
|
168
167
|
const [query, setQuery] = useState("");
|
|
169
168
|
const inputRef = useRef<HTMLInputElement>(null);
|
|
170
169
|
// The list's layer again, under `inputRef` for the search box's handler (round 0.35
|
|
@@ -196,8 +195,7 @@ export function useDropdownSearch<T extends HTMLElement = HTMLDivElement>() {
|
|
|
196
195
|
/** `onKeyDown` is the INPUT's, not the wrapper's — the list's keyboard is handled
|
|
197
196
|
* where the focus is (see the note above), so the div's own handler signature is
|
|
198
197
|
* omitted in favour of it. */
|
|
199
|
-
export interface DropdownSearchHeaderProps
|
|
200
|
-
extends Omit<ComponentPropsWithRef<"div">, "onKeyDown"> {
|
|
198
|
+
export interface DropdownSearchHeaderProps extends Omit<ComponentPropsWithRef<"div">, "onKeyDown"> {
|
|
201
199
|
query: string;
|
|
202
200
|
onQueryChange: (v: string) => void;
|
|
203
201
|
inputRef: RefObject<HTMLInputElement | null>;
|
|
@@ -251,13 +249,7 @@ export function DropdownSearchHeader({
|
|
|
251
249
|
// input whose only name is its placeholder has none the moment a character is
|
|
252
250
|
// typed into it — the placeholder disappears — which is why this is worth a prop
|
|
253
251
|
// at all rather than something a caller could add from outside.
|
|
254
|
-
<div
|
|
255
|
-
{...rest}
|
|
256
|
-
className={cn(
|
|
257
|
-
"flex items-center gap-2 border-b border-subtle px-2 py-1.5",
|
|
258
|
-
className,
|
|
259
|
-
)}
|
|
260
|
-
>
|
|
252
|
+
<div {...rest} className={cn("flex items-center gap-2 border-b border-subtle px-2 py-1.5", className)}>
|
|
261
253
|
<Search className="size-4 text-placeholder" />
|
|
262
254
|
<input
|
|
263
255
|
ref={inputRef}
|
|
@@ -130,9 +130,7 @@ export function EmptyState({
|
|
|
130
130
|
{/* `text-sm`: a heading keeps the box's size, not whatever a stylesheet gives h2. */}
|
|
131
131
|
<Title className={cn("text-sm font-medium text-secondary", toneClass)}>{title}</Title>
|
|
132
132
|
{hasHint && <div className="mt-1 text-xs">{hint}</div>}
|
|
133
|
-
{action != null &&
|
|
134
|
-
<div className="mt-4 flex flex-wrap items-center justify-center gap-2">{action}</div>
|
|
135
|
-
)}
|
|
133
|
+
{action != null && <div className="mt-4 flex flex-wrap items-center justify-center gap-2">{action}</div>}
|
|
136
134
|
</div>
|
|
137
135
|
);
|
|
138
136
|
}
|
|
@@ -34,8 +34,7 @@ export type { ComboClearValue, ComboOption } from "./combobox-core";
|
|
|
34
34
|
/** `onChange` is the kit's — "a selection was made", carrying values — rather
|
|
35
35
|
* than the div's form event, so the DOM's spelling of it is omitted. */
|
|
36
36
|
export interface EntityComboboxProps<V extends string | number, C extends ComboClearValue = null>
|
|
37
|
-
extends Omit<ComponentPropsWithoutRef<"div">, "onChange">,
|
|
38
|
-
FieldHelpProps {
|
|
37
|
+
extends Omit<ComponentPropsWithoutRef<"div">, "onChange">, FieldHelpProps {
|
|
39
38
|
/** Selected id; `null`, `undefined` or `clearValue` when nothing is selected. */
|
|
40
39
|
value: V | C | null | undefined;
|
|
41
40
|
/** Selecting an option emits its value; the clear button emits `clearValue`. */
|
|
@@ -311,10 +310,7 @@ export function EntityCombobox<V extends string | number, C extends ComboClearVa
|
|
|
311
310
|
// A caller's own name wins over the composition: two fields labelled
|
|
312
311
|
// "Account" on a transfer form are the from and the to, and only the
|
|
313
312
|
// caller knows which is which.
|
|
314
|
-
aria-label={
|
|
315
|
-
ariaLabel ??
|
|
316
|
-
(typeof label === "string" ? common.fieldValue(label, triggerText) : undefined)
|
|
317
|
-
}
|
|
313
|
+
aria-label={ariaLabel ?? (typeof label === "string" ? common.fieldValue(label, triggerText) : undefined)}
|
|
318
314
|
// The focusable kind of disabled while locked (Button's rule): a native
|
|
319
315
|
// `disabled` would take the field out of the tab order, and the reason with it.
|
|
320
316
|
disabled={lock.locked ? undefined : disabled}
|
|
@@ -107,9 +107,7 @@ export function describeThrown(error: unknown): ErrorBoundaryDetails {
|
|
|
107
107
|
* Never throws: it runs inside the fallback's own render, where a throw is a white
|
|
108
108
|
* screen. An error it cannot read is not a chunk failure.
|
|
109
109
|
*/
|
|
110
|
-
export function isChunkLoadError(
|
|
111
|
-
error: { name?: string | null; message?: string | null } | null | undefined,
|
|
112
|
-
): boolean {
|
|
110
|
+
export function isChunkLoadError(error: { name?: string | null; message?: string | null } | null | undefined): boolean {
|
|
113
111
|
try {
|
|
114
112
|
const s = `${error?.name ?? ""} ${error?.message ?? ""}`;
|
|
115
113
|
return /ChunkLoadError|dynamically imported module|module script failed|Loading chunk|Failed to fetch/i.test(s);
|
|
@@ -405,7 +403,11 @@ function currentPage(): { page: string; path: string } {
|
|
|
405
403
|
}
|
|
406
404
|
}
|
|
407
405
|
|
|
408
|
-
function buildReport(
|
|
406
|
+
function buildReport(
|
|
407
|
+
details: ErrorBoundaryDetails,
|
|
408
|
+
componentStack: string | undefined,
|
|
409
|
+
props: ErrorBoundaryProps,
|
|
410
|
+
): CrashReport {
|
|
409
411
|
const { page, path } = currentPage();
|
|
410
412
|
const extras: Record<string, string> = {};
|
|
411
413
|
try {
|
|
@@ -638,9 +640,7 @@ function ErrorFallback({
|
|
|
638
640
|
</p>
|
|
639
641
|
)}
|
|
640
642
|
{filing === "filed" && (
|
|
641
|
-
<p className="-mt-1 mb-1 basis-full text-xs">
|
|
642
|
-
{reference ? text.reportedAs(reference) : text.reported}
|
|
643
|
-
</p>
|
|
643
|
+
<p className="-mt-1 mb-1 basis-full text-xs">{reference ? text.reportedAs(reference) : text.reported}</p>
|
|
644
644
|
)}
|
|
645
645
|
{mode === "error" ? [retryButton, reloadButton] : [reloadButton, retryButton]}
|
|
646
646
|
{copyReport && reportText !== null && filing !== "filed" && (
|
|
@@ -78,8 +78,7 @@ export const FIELD_BASE =
|
|
|
78
78
|
* reason other than "you may not edit this". Attribute-scoped for the same reason
|
|
79
79
|
* FIELD_BASE is — the two have to cancel on the identical selector or twMerge
|
|
80
80
|
* cannot make the later one win. */
|
|
81
|
-
export const FIELD_WRITABLE_LOOK =
|
|
82
|
-
"[&[readonly]]:bg-surface [&[readonly]]:text-primary";
|
|
81
|
+
export const FIELD_WRITABLE_LOOK = "[&[readonly]]:bg-surface [&[readonly]]:text-primary";
|
|
83
82
|
|
|
84
83
|
// Extra top padding leaves room for a label that floats INSIDE the field (the
|
|
85
84
|
// "filled" pattern) — the label sits in the top strip, the value below it. Used by
|
|
@@ -190,10 +189,7 @@ export function FieldChevron({ className, ...rest }: FieldChevronProps) {
|
|
|
190
189
|
// a name, and an `aria-hidden` a caller could switch off by accident is a second
|
|
191
190
|
// announcement of the same field.
|
|
192
191
|
aria-hidden
|
|
193
|
-
className={cn(
|
|
194
|
-
"pointer-events-none absolute end-2.5 top-1/2 size-4 -translate-y-1/2 text-placeholder",
|
|
195
|
-
className,
|
|
196
|
-
)}
|
|
192
|
+
className={cn("pointer-events-none absolute end-2.5 top-1/2 size-4 -translate-y-1/2 text-placeholder", className)}
|
|
197
193
|
/>
|
|
198
194
|
);
|
|
199
195
|
}
|
|
@@ -256,8 +252,7 @@ export function SelectWidthFloor({ values, size = "md" }: { values: readonly str
|
|
|
256
252
|
// At Large it is a static label ABOVE the field instead (0.33, §10.17): in flow, so it
|
|
257
253
|
// wraps; always in its floated look, since there is no strip to float into and no
|
|
258
254
|
// placeholder to stand in for; no transition, since it never moves.
|
|
259
|
-
const LABEL_FLOATED_AT_LARGE =
|
|
260
|
-
"large:text-caption large:leading-tight large:text-secondary large:transition-none";
|
|
255
|
+
const LABEL_FLOATED_AT_LARGE = "large:text-caption large:leading-tight large:text-secondary large:transition-none";
|
|
261
256
|
|
|
262
257
|
export const FLOATING_LABEL_CLASS = cn(
|
|
263
258
|
"pointer-events-none absolute start-3 top-2.5 text-sm text-placeholder transition-all",
|
|
@@ -294,7 +289,10 @@ const FLOATING_ROW_CLASS = cn(
|
|
|
294
289
|
|
|
295
290
|
/** The static label's row with its "?" at the field's end, in the top strip — and at
|
|
296
291
|
* Large above the field (LABEL_ABOVE_AT_LARGE). */
|
|
297
|
-
const STATIC_ROW_CLASS = cn(
|
|
292
|
+
const STATIC_ROW_CLASS = cn(
|
|
293
|
+
"pointer-events-none absolute inset-x-3 top-1 flex items-center gap-1",
|
|
294
|
+
LABEL_ABOVE_AT_LARGE,
|
|
295
|
+
);
|
|
298
296
|
|
|
299
297
|
/**
|
|
300
298
|
* The one place that assembles a labelled field: a `relative` wrapper around the
|
|
@@ -602,11 +600,7 @@ export function CharacterCount({
|
|
|
602
600
|
aria-hidden
|
|
603
601
|
className={cn(
|
|
604
602
|
"shrink-0 text-caption leading-tight tabular-nums",
|
|
605
|
-
zone === "limit"
|
|
606
|
-
? "text-danger"
|
|
607
|
-
: zone === "near"
|
|
608
|
-
? "text-warning"
|
|
609
|
-
: "text-muted",
|
|
603
|
+
zone === "limit" ? "text-danger" : zone === "near" ? "text-warning" : "text-muted",
|
|
610
604
|
)}
|
|
611
605
|
>
|
|
612
606
|
{used}/{max}
|
|
@@ -55,8 +55,7 @@ export { assignRef, mergeRefs } from "../lib/refs";
|
|
|
55
55
|
// laid out by one flex row instead of by two absolute offsets guessing at the
|
|
56
56
|
// same baseline — which is what put dev#468's "?" three pixels above the word it
|
|
57
57
|
// belongs to.
|
|
58
|
-
export const STATIC_LABEL_TYPE =
|
|
59
|
-
"text-caption leading-tight text-muted peer-disabled:opacity-50";
|
|
58
|
+
export const STATIC_LABEL_TYPE = "text-caption leading-tight text-muted peer-disabled:opacity-50";
|
|
60
59
|
|
|
61
60
|
/**
|
|
62
61
|
* A field's label at Large and Extra large (0.33, docs/text-size-harmonization.md
|
|
@@ -150,13 +149,7 @@ export interface FieldHintProps extends Omit<ComponentPropsWithRef<"button">, "c
|
|
|
150
149
|
side?: TooltipSide;
|
|
151
150
|
}
|
|
152
151
|
|
|
153
|
-
export function FieldHint({
|
|
154
|
-
label,
|
|
155
|
-
side = "start",
|
|
156
|
-
className,
|
|
157
|
-
"aria-label": ariaLabel,
|
|
158
|
-
...rest
|
|
159
|
-
}: FieldHintProps) {
|
|
152
|
+
export function FieldHint({ label, side = "start", className, "aria-label": ariaLabel, ...rest }: FieldHintProps) {
|
|
160
153
|
return (
|
|
161
154
|
// `tap="toggle"` (0.25): the "?" exists only to explain, so a tap on a phone shows
|
|
162
155
|
// the bubble and the next tap hides it — the touch rule (no bubble left behind by a
|
|
@@ -281,7 +274,6 @@ export interface FieldHelpSource {
|
|
|
281
274
|
name?: ReactNode;
|
|
282
275
|
}
|
|
283
276
|
|
|
284
|
-
|
|
285
277
|
/**
|
|
286
278
|
* Whether a `hint` is a CAPTION (plain text: a non-empty string or a number) or
|
|
287
279
|
* something for the label line (a {@link FieldHint} "?", or any other node).
|
|
@@ -434,7 +426,10 @@ export function StaticLabelRow({ hint, children }: { hint: ReactNode; children:
|
|
|
434
426
|
return (
|
|
435
427
|
<div
|
|
436
428
|
data-field-label=""
|
|
437
|
-
className={cn(
|
|
429
|
+
className={cn(
|
|
430
|
+
"pointer-events-none absolute start-3 end-9 top-1 z-10 flex items-center gap-1",
|
|
431
|
+
LABEL_ABOVE_AT_LARGE,
|
|
432
|
+
)}
|
|
438
433
|
>
|
|
439
434
|
{children}
|
|
440
435
|
<span className="pointer-events-auto flex shrink-0 items-center">{hint}</span>
|
|
@@ -606,8 +601,7 @@ export function useDisabledReasonLine(display: DisabledReasonDisplay = "auto"):
|
|
|
606
601
|
/** The reason line's type: a field caption's ({@link FIELD_CAPTION_CLASS}), so a locked
|
|
607
602
|
* control's "why" reads like a field's standing advice. Capped, so a long reason under
|
|
608
603
|
* a small control wraps rather than widening its row without end. */
|
|
609
|
-
export const DISABLED_REASON_LINE_CLASS =
|
|
610
|
-
"mt-1 block max-w-[20rem] text-caption leading-tight text-muted";
|
|
604
|
+
export const DISABLED_REASON_LINE_CLASS = "mt-1 block max-w-[20rem] text-caption leading-tight text-muted";
|
|
611
605
|
|
|
612
606
|
/**
|
|
613
607
|
* A control and its `disabledReason` as a line under it — the `"line"` form of
|
|
@@ -713,15 +707,7 @@ export function useFieldMessages({
|
|
|
713
707
|
* once `error` is passed the box is kept even with no message, so the trigger is never
|
|
714
708
|
* reparented — and remounted, losing focus — as the message comes and goes.
|
|
715
709
|
*/
|
|
716
|
-
export function FieldBox({
|
|
717
|
-
below,
|
|
718
|
-
reserve,
|
|
719
|
-
children,
|
|
720
|
-
}: {
|
|
721
|
-
below: ReactNode;
|
|
722
|
-
reserve: boolean;
|
|
723
|
-
children: ReactNode;
|
|
724
|
-
}) {
|
|
710
|
+
export function FieldBox({ below, reserve, children }: { below: ReactNode; reserve: boolean; children: ReactNode }) {
|
|
725
711
|
if (below === null && !reserve) return <>{children}</>;
|
|
726
712
|
return (
|
|
727
713
|
<div>
|
|
@@ -746,7 +732,10 @@ export function FieldLabelLine({ label, hint }: { label: ReactNode; hint?: React
|
|
|
746
732
|
// over the row (and take the "?"'s hover) otherwise. Above the field at Large.
|
|
747
733
|
<div
|
|
748
734
|
data-field-label=""
|
|
749
|
-
className={cn(
|
|
735
|
+
className={cn(
|
|
736
|
+
"pointer-events-none absolute start-3 end-9 top-1 z-10 flex items-center gap-1",
|
|
737
|
+
LABEL_ABOVE_AT_LARGE,
|
|
738
|
+
)}
|
|
750
739
|
>
|
|
751
740
|
<FieldLabel className={cn(LABEL_IN_ROW, "max-w-full")}>{label}</FieldLabel>
|
|
752
741
|
<span className="pointer-events-auto flex shrink-0 items-center">{hint}</span>
|
|
@@ -282,8 +282,7 @@ export function FieldSyncIndicator({
|
|
|
282
282
|
const large = useLargeText();
|
|
283
283
|
showLabel = showLabel || large;
|
|
284
284
|
const { color, Icon } = STATE_STYLE[state];
|
|
285
|
-
const text =
|
|
286
|
-
state === "error" ? (error?.message?.trim() ? error.message : l.error) : l[state];
|
|
285
|
+
const text = state === "error" ? (error?.message?.trim() ? error.message : l.error) : l[state];
|
|
287
286
|
|
|
288
287
|
return (
|
|
289
288
|
<span
|
|
@@ -443,11 +442,12 @@ export function FieldSyncRow<T>({
|
|
|
443
442
|
>
|
|
444
443
|
{children}
|
|
445
444
|
<span className="pointer-events-none absolute inset-y-0 end-0 flex items-center pe-3">
|
|
446
|
-
{state === "edited" && (
|
|
447
|
-
<PencilLine aria-hidden className="size-4 text-[var(--status-edited)]" />
|
|
448
|
-
)}
|
|
445
|
+
{state === "edited" && <PencilLine aria-hidden className="size-4 text-[var(--status-edited)]" />}
|
|
449
446
|
{state === "pending" && (
|
|
450
|
-
<Loader2
|
|
447
|
+
<Loader2
|
|
448
|
+
aria-hidden
|
|
449
|
+
className="size-4 animate-spin text-[var(--status-pending)] motion-reduce:animate-none"
|
|
450
|
+
/>
|
|
451
451
|
)}
|
|
452
452
|
{state === "synced" && (
|
|
453
453
|
<Check
|
|
@@ -474,11 +474,7 @@ export function FieldSyncRow<T>({
|
|
|
474
474
|
</Tooltip>
|
|
475
475
|
)}
|
|
476
476
|
</span>
|
|
477
|
-
<span
|
|
478
|
-
role={isError ? "alert" : "status"}
|
|
479
|
-
aria-live={isError ? "assertive" : "polite"}
|
|
480
|
-
className="sr-only"
|
|
481
|
-
>
|
|
477
|
+
<span role={isError ? "alert" : "status"} aria-live={isError ? "assertive" : "polite"} className="sr-only">
|
|
482
478
|
{shown === null ? "" : text}
|
|
483
479
|
</span>
|
|
484
480
|
</div>
|
|
@@ -64,7 +64,8 @@ export type {
|
|
|
64
64
|
type ButtonOwnProps = ComponentPropsWithoutRef<typeof Button>;
|
|
65
65
|
|
|
66
66
|
export interface FileButtonProps
|
|
67
|
-
extends
|
|
67
|
+
extends
|
|
68
|
+
Omit<UseFilePickerOptions, "disabled">,
|
|
68
69
|
// `onDrop` & co. stay the caller's own when `droppable` is off; `type` is fixed to
|
|
69
70
|
// "button" (see 2. above) — a file trigger never submits a form.
|
|
70
71
|
Omit<ButtonOwnProps, "type" | "children" | "accept" | "capture" | "multiple"> {
|
|
@@ -106,7 +107,6 @@ export interface FileButtonProps
|
|
|
106
107
|
ref?: Ref<HTMLButtonElement>;
|
|
107
108
|
}
|
|
108
109
|
|
|
109
|
-
|
|
110
110
|
/**
|
|
111
111
|
* {@link useFilePicker} behind a {@link Button}: `variant` and every other button prop
|
|
112
112
|
* pass through, and the ref is the `<button>` (so `ref.current.click()` opens the
|
|
@@ -177,7 +177,11 @@ export function FileButton({
|
|
|
177
177
|
disabled: refusing,
|
|
178
178
|
});
|
|
179
179
|
const pickedText =
|
|
180
|
-
picked.length === 0
|
|
180
|
+
picked.length === 0
|
|
181
|
+
? ""
|
|
182
|
+
: picked.length === 1
|
|
183
|
+
? picked[0].name
|
|
184
|
+
: pickerLabels.selected(picked.length, picked[0].name);
|
|
181
185
|
const [dragOver, setDragOver] = useState(false);
|
|
182
186
|
|
|
183
187
|
const hasFiles = (e: DragEvent) => Array.from(e.dataTransfer?.types ?? []).includes("Files");
|
|
@@ -235,8 +235,7 @@ export function FileDropzone({
|
|
|
235
235
|
// page is not announced by itself.
|
|
236
236
|
const status = useAnnounce();
|
|
237
237
|
const alert = useAnnounce({ politeness: "assertive" });
|
|
238
|
-
const feedback: FileDropzoneRejectionFeedback =
|
|
239
|
-
rejectionFeedback ?? (onInvalid || onReject ? "none" : "toast");
|
|
238
|
+
const feedback: FileDropzoneRejectionFeedback = rejectionFeedback ?? (onInvalid || onReject ? "none" : "toast");
|
|
240
239
|
const dropLabel = dropLabelProp ?? labels.dropzone;
|
|
241
240
|
const browseLabel = browseLabelProp ?? labels.browse;
|
|
242
241
|
const emptyLabel = emptyLabelProp ?? (multiple ? labels.emptyMultiple : labels.empty);
|
|
@@ -272,9 +271,7 @@ export function FileDropzone({
|
|
|
272
271
|
if (!stands || rejected.length > 0) {
|
|
273
272
|
for (const r of rejected) onInvalid?.(r.file);
|
|
274
273
|
if (rejected.length > 0) onReject?.(rejected);
|
|
275
|
-
const message = stands
|
|
276
|
-
? summariseRejections(rejected, labels)
|
|
277
|
-
: labels.rejectedPick(picked.length);
|
|
274
|
+
const message = stands ? summariseRejections(rejected, labels) : labels.rejectedPick(picked.length);
|
|
278
275
|
if (feedback === "toast") {
|
|
279
276
|
// The kit's `toast`, which loads sonner (an optional peer) lazily, so an app
|
|
280
277
|
// that never trips this never has to install it. Nothing downstream depends
|
|
@@ -378,10 +375,10 @@ export function FileDropzone({
|
|
|
378
375
|
: locked
|
|
379
376
|
? "cursor-not-allowed border-subtle"
|
|
380
377
|
: dragOver
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
378
|
+
? "cursor-pointer border-strong bg-active"
|
|
379
|
+
: showError
|
|
380
|
+
? "cursor-pointer border-danger-strong"
|
|
381
|
+
: "cursor-pointer border-subtle hover:border-strong",
|
|
385
382
|
className,
|
|
386
383
|
)}
|
|
387
384
|
>
|
|
@@ -468,9 +465,7 @@ export function FileDropzone({
|
|
|
468
465
|
{locked && !(file && !multiple) ? (
|
|
469
466
|
reasonLine
|
|
470
467
|
) : (
|
|
471
|
-
<div className="text-xs text-muted">
|
|
472
|
-
{file && !multiple ? fileText.size(file.size) : hint}
|
|
473
|
-
</div>
|
|
468
|
+
<div className="text-xs text-muted">{file && !multiple ? fileText.size(file.size) : hint}</div>
|
|
474
469
|
)}
|
|
475
470
|
{locked && file && !multiple && reasonLine}
|
|
476
471
|
</>
|