@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
|
@@ -382,14 +382,7 @@ export function Tooltip({
|
|
|
382
382
|
if (isEmptyLabel(label)) return <>{children}</>;
|
|
383
383
|
if (portal === true) {
|
|
384
384
|
return (
|
|
385
|
-
<PortalTooltip
|
|
386
|
-
label={label}
|
|
387
|
-
side={side}
|
|
388
|
-
className={className}
|
|
389
|
-
redact={redact}
|
|
390
|
-
tap={tap}
|
|
391
|
-
{...rest}
|
|
392
|
-
>
|
|
385
|
+
<PortalTooltip label={label} side={side} className={className} redact={redact} tap={tap} {...rest}>
|
|
393
386
|
{children}
|
|
394
387
|
</PortalTooltip>
|
|
395
388
|
);
|
|
@@ -413,7 +406,6 @@ export function Tooltip({
|
|
|
413
406
|
);
|
|
414
407
|
}
|
|
415
408
|
|
|
416
|
-
|
|
417
409
|
/** The pointer handlers a caller may hand {@link Tooltip} that the trigger also needs:
|
|
418
410
|
* both run, the trigger's first. (The mouse and focus handlers are the trigger's alone,
|
|
419
411
|
* as they have always been.) */
|
|
@@ -731,9 +723,7 @@ function InPlaceTooltip({
|
|
|
731
723
|
{/* In place the bubble is always there to point at; portalled or lazy, only while up. */}
|
|
732
724
|
{describedBy(children, clipped || lazy ? (open ? id : undefined) : dismissed ? undefined : id)}
|
|
733
725
|
{clipped ? (
|
|
734
|
-
open &&
|
|
735
|
-
<PortalBubble triggerRef={triggerRef} id={id} label={label} side={side} dir={dir} redact={redact} />
|
|
736
|
-
)
|
|
726
|
+
open && <PortalBubble triggerRef={triggerRef} id={id} label={label} side={side} dir={dir} redact={redact} />
|
|
737
727
|
) : lazy ? (
|
|
738
728
|
// keksdose F6: the in-place slot and classes, the portalled lifetime. Mounted only
|
|
739
729
|
// while up, so it is visible whenever it exists.
|
|
@@ -795,11 +785,7 @@ function describedBy(children: ReactNode, id: string | undefined): ReactNode {
|
|
|
795
785
|
* it has nothing to say — `""`, `null`, `undefined`, `false` from a `&&` guard. A
|
|
796
786
|
* numeric `0` is a real label and stays one. */
|
|
797
787
|
function isEmptyLabel(label: ReactNode): boolean {
|
|
798
|
-
return (
|
|
799
|
-
label == null ||
|
|
800
|
-
label === false ||
|
|
801
|
-
(typeof label === "string" && label.trim() === "")
|
|
802
|
-
);
|
|
788
|
+
return label == null || label === false || (typeof label === "string" && label.trim() === "");
|
|
803
789
|
}
|
|
804
790
|
|
|
805
791
|
const TOOLTIP_GAP = 4;
|
|
@@ -878,10 +864,7 @@ function useViewportClamp(
|
|
|
878
864
|
// new label, side or direction — is not measured yet, and renders clipped until it is.
|
|
879
865
|
const [placement, setPlacement] = useState<Placement>(UNPLACED);
|
|
880
866
|
const measured =
|
|
881
|
-
placement.for !== null &&
|
|
882
|
-
placement.for.side === side &&
|
|
883
|
-
placement.for.label === label &&
|
|
884
|
-
placement.for.dir === dir;
|
|
867
|
+
placement.for !== null && placement.for.side === side && placement.for.label === label && placement.for.dir === dir;
|
|
885
868
|
useLayoutEffect(() => {
|
|
886
869
|
const el = bubbleRef.current;
|
|
887
870
|
if (!active || !el) {
|
|
@@ -939,10 +922,7 @@ const portalTransformBySide: Record<PhysicalSide, string> = {
|
|
|
939
922
|
|
|
940
923
|
/** Anchor point (viewport px) for the tooltip on the given side of `r`. Paired
|
|
941
924
|
* with {@link portalTransformBySide}, which shifts the box onto that point. */
|
|
942
|
-
function tooltipAnchor(
|
|
943
|
-
r: AnchorRect,
|
|
944
|
-
side: PhysicalSide,
|
|
945
|
-
): { left: number; top: number } {
|
|
925
|
+
function tooltipAnchor(r: AnchorRect, side: PhysicalSide): { left: number; top: number } {
|
|
946
926
|
switch (side) {
|
|
947
927
|
case "right":
|
|
948
928
|
return { left: r.right + TOOLTIP_GAP, top: r.top + r.height / 2 };
|
|
@@ -980,12 +960,7 @@ const opposite: Record<PhysicalSide, PhysicalSide> = {
|
|
|
980
960
|
};
|
|
981
961
|
|
|
982
962
|
/** Whether the bubble clears the viewport edge on `side` of the trigger. */
|
|
983
|
-
function roomOn(
|
|
984
|
-
r: AnchorRect,
|
|
985
|
-
side: PhysicalSide,
|
|
986
|
-
size: TooltipSize,
|
|
987
|
-
viewport: TooltipViewport,
|
|
988
|
-
): boolean {
|
|
963
|
+
function roomOn(r: AnchorRect, side: PhysicalSide, size: TooltipSize, viewport: TooltipViewport): boolean {
|
|
989
964
|
switch (side) {
|
|
990
965
|
case "left":
|
|
991
966
|
return r.left - TOOLTIP_GAP - size.width >= TOOLTIP_MARGIN;
|
|
@@ -1045,10 +1020,7 @@ export function placeTooltip(
|
|
|
1045
1020
|
size: TooltipSize,
|
|
1046
1021
|
viewport: TooltipViewport,
|
|
1047
1022
|
): TooltipPlacement {
|
|
1048
|
-
const chosen =
|
|
1049
|
-
roomOn(r, side, size, viewport) || !roomOn(r, opposite[side], size, viewport)
|
|
1050
|
-
? side
|
|
1051
|
-
: opposite[side];
|
|
1023
|
+
const chosen = roomOn(r, side, size, viewport) || !roomOn(r, opposite[side], size, viewport) ? side : opposite[side];
|
|
1052
1024
|
const point = tooltipAnchor(r, chosen);
|
|
1053
1025
|
const box =
|
|
1054
1026
|
chosen === "left"
|
|
@@ -1065,16 +1037,7 @@ export function placeTooltip(
|
|
|
1065
1037
|
};
|
|
1066
1038
|
}
|
|
1067
1039
|
|
|
1068
|
-
function PortalTooltip({
|
|
1069
|
-
label,
|
|
1070
|
-
side,
|
|
1071
|
-
className,
|
|
1072
|
-
redact,
|
|
1073
|
-
tap,
|
|
1074
|
-
children,
|
|
1075
|
-
ref,
|
|
1076
|
-
...rest
|
|
1077
|
-
}: TooltipVariantProps) {
|
|
1040
|
+
function PortalTooltip({ label, side, className, redact, tap, children, ref, ...rest }: TooltipVariantProps) {
|
|
1078
1041
|
const { triggerRef, setTrigger } = useTriggerRef(ref);
|
|
1079
1042
|
// The trigger's reading direction, read when the bubble is asked for (an event, not a
|
|
1080
1043
|
// render): it resolves `start` / `end`, and the portalled bubble — which has left the
|
|
@@ -1103,9 +1066,7 @@ function PortalTooltip({
|
|
|
1103
1066
|
>
|
|
1104
1067
|
{describedBy(children, open ? id : undefined)}
|
|
1105
1068
|
</span>
|
|
1106
|
-
{open &&
|
|
1107
|
-
<PortalBubble triggerRef={triggerRef} id={id} label={label} side={side} dir={dir} redact={redact} />
|
|
1108
|
-
)}
|
|
1069
|
+
{open && <PortalBubble triggerRef={triggerRef} id={id} label={label} side={side} dir={dir} redact={redact} />}
|
|
1109
1070
|
</>
|
|
1110
1071
|
);
|
|
1111
1072
|
}
|
|
@@ -147,9 +147,7 @@ export function TranslationReviewEditor({
|
|
|
147
147
|
const trimmedNote = note.trim() || null;
|
|
148
148
|
// Approving says the text is right as it stands: there is no wording to suggest.
|
|
149
149
|
const sent = verdict === "APPROVED" ? null : suggestion.trim() || null;
|
|
150
|
-
void run(verdict === "APPROVED" ? "approve" : "flag", () =>
|
|
151
|
-
onSave(reviewWrite(row, verdict, trimmedNote, sent)),
|
|
152
|
-
);
|
|
150
|
+
void run(verdict === "APPROVED" ? "approve" : "flag", () => onSave(reviewWrite(row, verdict, trimmedNote, sent)));
|
|
153
151
|
};
|
|
154
152
|
|
|
155
153
|
return (
|
|
@@ -212,7 +210,9 @@ export function TranslationReviewEditor({
|
|
|
212
210
|
{/* Read-only: what the reviewer said, as text — the fields are for saying it. */}
|
|
213
211
|
{!editable && review?.verdict === "NEEDS_CHANGE" && (review.suggestion || review.note) && (
|
|
214
212
|
<div className="space-y-2">
|
|
215
|
-
{review.suggestion &&
|
|
213
|
+
{review.suggestion && (
|
|
214
|
+
<Then label={missing ? labels.translation : labels.suggestion} text={review.suggestion} />
|
|
215
|
+
)}
|
|
216
216
|
{review.note && <Then label={labels.note} text={review.note} />}
|
|
217
217
|
</div>
|
|
218
218
|
)}
|
|
@@ -173,7 +173,13 @@ export interface TranslationLocaleTabsProps {
|
|
|
173
173
|
* strip's caret saying it goes on (`overflowCue`). Nothing for a single locale:
|
|
174
174
|
* a strip with one tab is a heading that looks clickable.
|
|
175
175
|
*/
|
|
176
|
-
export function TranslationLocaleTabs({
|
|
176
|
+
export function TranslationLocaleTabs({
|
|
177
|
+
locales,
|
|
178
|
+
active,
|
|
179
|
+
onChange,
|
|
180
|
+
className,
|
|
181
|
+
labels: labelsProp,
|
|
182
|
+
}: TranslationLocaleTabsProps) {
|
|
177
183
|
const labels = useKitLabels("translationReview", DEFAULT_TRANSLATION_REVIEW_LABELS, labelsProp);
|
|
178
184
|
if (locales.length < 2) return null;
|
|
179
185
|
return (
|
|
@@ -324,7 +324,6 @@ export interface TranslationReviewPanelProps {
|
|
|
324
324
|
labels?: LabelOverride<TranslationReviewLabels>;
|
|
325
325
|
}
|
|
326
326
|
|
|
327
|
-
|
|
328
327
|
/**
|
|
329
328
|
* How many rows the groups may render at once on a wide screen before they start folded
|
|
330
329
|
* ({@link TranslationReviewPanelProps.defaultGroupsOpen}): two of the default 50-row pages.
|
|
@@ -432,7 +431,10 @@ function TextCell({ row, labels, clamp }: { row: TranslationRow; labels: Transla
|
|
|
432
431
|
return row.text === "" ? (
|
|
433
432
|
<span className="italic text-muted">{labels.missingText}</span>
|
|
434
433
|
) : (
|
|
435
|
-
<span
|
|
434
|
+
<span
|
|
435
|
+
lang={row.locale}
|
|
436
|
+
className={cn("whitespace-pre-line break-words", clamp && "line-clamp-3 large:line-clamp-none")}
|
|
437
|
+
>
|
|
436
438
|
{row.text}
|
|
437
439
|
</span>
|
|
438
440
|
);
|
|
@@ -670,7 +672,12 @@ export function TranslationReviewPanel({
|
|
|
670
672
|
): Promise<boolean> => {
|
|
671
673
|
if (!onSave || targets.length === 0) return false;
|
|
672
674
|
const save = onSave;
|
|
673
|
-
const ok = await run(key, () =>
|
|
675
|
+
const ok = await run(key, () =>
|
|
676
|
+
save(
|
|
677
|
+
targets.map((r) => reviewWrite(r, "APPROVED")),
|
|
678
|
+
{ origin, toasted: undoOn },
|
|
679
|
+
),
|
|
680
|
+
);
|
|
674
681
|
if (ok && undoOn) sayDone(targets, description);
|
|
675
682
|
return ok;
|
|
676
683
|
};
|
|
@@ -764,9 +771,7 @@ export function TranslationReviewPanel({
|
|
|
764
771
|
{
|
|
765
772
|
key: "reference",
|
|
766
773
|
header: referenceLabel,
|
|
767
|
-
cell: (r) =>
|
|
768
|
-
<span className="line-clamp-3 whitespace-pre-line break-words text-secondary">{r.reference}</span>
|
|
769
|
-
),
|
|
774
|
+
cell: (r) => <span className="line-clamp-3 whitespace-pre-line break-words text-secondary">{r.reference}</span>,
|
|
770
775
|
mobileHidden: true,
|
|
771
776
|
},
|
|
772
777
|
{
|
|
@@ -805,11 +810,9 @@ export function TranslationReviewPanel({
|
|
|
805
810
|
name: (r) => r.key,
|
|
806
811
|
tooltipSide: "start",
|
|
807
812
|
actions: (r) =>
|
|
808
|
-
translationReviewSwipePlan(
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
{ canClear: onClear !== undefined },
|
|
812
|
-
).end.map((id): RowAction => {
|
|
813
|
+
translationReviewSwipePlan({ end: ["approve", ...(binding.end ?? []), ...(binding.start ?? [])] }, r, {
|
|
814
|
+
canClear: onClear !== undefined,
|
|
815
|
+
}).end.map((id): RowAction => {
|
|
813
816
|
const swipe = swipeAction(r, id);
|
|
814
817
|
// `edit` only opens the editor, whose own Save is the commit.
|
|
815
818
|
const writes = id !== "edit";
|
|
@@ -1230,11 +1233,7 @@ export function TranslationReviewPanel({
|
|
|
1230
1233
|
</BulkActionBar>
|
|
1231
1234
|
)}
|
|
1232
1235
|
|
|
1233
|
-
{groups && groups.length > 0 ? (
|
|
1234
|
-
<div className="space-y-3">{groups.map(groupSection)}</div>
|
|
1235
|
-
) : (
|
|
1236
|
-
table(visible)
|
|
1237
|
-
)}
|
|
1236
|
+
{groups && groups.length > 0 ? <div className="space-y-3">{groups.map(groupSection)}</div> : table(visible)}
|
|
1238
1237
|
</div>
|
|
1239
1238
|
);
|
|
1240
1239
|
}
|
|
@@ -153,9 +153,7 @@ export function TreeRow({
|
|
|
153
153
|
style={{ paddingInlineStart: ROW_PAD + depth * indent, ...style }}
|
|
154
154
|
className={cn(
|
|
155
155
|
"relative flex min-h-8 items-center gap-1.5 rounded pe-2 text-sm",
|
|
156
|
-
selected
|
|
157
|
-
? "bg-active font-medium text-primary"
|
|
158
|
-
: "text-secondary",
|
|
156
|
+
selected ? "bg-active font-medium text-primary" : "text-secondary",
|
|
159
157
|
className,
|
|
160
158
|
)}
|
|
161
159
|
>
|
|
@@ -183,12 +181,18 @@ export function TreeRow({
|
|
|
183
181
|
e.stopPropagation();
|
|
184
182
|
onToggle();
|
|
185
183
|
}}
|
|
186
|
-
className={cn(
|
|
184
|
+
className={cn(
|
|
185
|
+
"flex size-4 shrink-0 items-center justify-center rounded text-muted outline-none hover:text-primary",
|
|
186
|
+
FOCUS_RING,
|
|
187
|
+
)}
|
|
187
188
|
>
|
|
188
189
|
{chevron}
|
|
189
190
|
</button>
|
|
190
191
|
) : expandable ? (
|
|
191
|
-
<span
|
|
192
|
+
<span
|
|
193
|
+
data-tree-toggle=""
|
|
194
|
+
className="flex size-4 shrink-0 cursor-pointer items-center justify-center text-muted"
|
|
195
|
+
>
|
|
192
196
|
{chevron}
|
|
193
197
|
</span>
|
|
194
198
|
) : (
|
|
@@ -203,9 +207,7 @@ export function TreeRow({
|
|
|
203
207
|
{label}
|
|
204
208
|
</span>
|
|
205
209
|
{trailing !== undefined && trailing !== null && (
|
|
206
|
-
<span className="ms-auto flex shrink-0 items-center gap-1 text-xs tabular-nums text-muted">
|
|
207
|
-
{trailing}
|
|
208
|
-
</span>
|
|
210
|
+
<span className="ms-auto flex shrink-0 items-center gap-1 text-xs tabular-nums text-muted">{trailing}</span>
|
|
209
211
|
)}
|
|
210
212
|
</>
|
|
211
213
|
)}
|
|
@@ -215,8 +217,10 @@ export function TreeRow({
|
|
|
215
217
|
|
|
216
218
|
/* ── TreeView ────────────────────────────────────────────────────────────── */
|
|
217
219
|
|
|
218
|
-
export interface TreeViewProps<T = unknown>
|
|
219
|
-
|
|
220
|
+
export interface TreeViewProps<T = unknown> extends Omit<
|
|
221
|
+
ComponentPropsWithRef<"ul">,
|
|
222
|
+
"onSelect" | "children" | "defaultValue"
|
|
223
|
+
> {
|
|
220
224
|
items: readonly TreeNode<T>[];
|
|
221
225
|
/** Open nodes, controlled. */
|
|
222
226
|
expanded?: readonly string[];
|
|
@@ -285,14 +289,8 @@ export function TreeView<T = unknown>({
|
|
|
285
289
|
onClick,
|
|
286
290
|
...rest
|
|
287
291
|
}: TreeViewProps<T>) {
|
|
288
|
-
const [expandedList, setExpandedOwn] = useControllable<readonly string[]>(
|
|
289
|
-
|
|
290
|
-
defaultExpanded ?? [],
|
|
291
|
-
);
|
|
292
|
-
const [selected, setSelectedOwn] = useControllable<string | null>(
|
|
293
|
-
selectedProp,
|
|
294
|
-
defaultSelected ?? null,
|
|
295
|
-
);
|
|
292
|
+
const [expandedList, setExpandedOwn] = useControllable<readonly string[]>(expandedProp, defaultExpanded ?? []);
|
|
293
|
+
const [selected, setSelectedOwn] = useControllable<string | null>(selectedProp, defaultSelected ?? null);
|
|
296
294
|
const expandedSet = useMemo(() => new Set(expandedList), [expandedList]);
|
|
297
295
|
const [loading, setLoading] = useState<ReadonlySet<string>>(() => new Set());
|
|
298
296
|
const [focusedId, setFocusedId] = useState<string | null>(null);
|
|
@@ -327,8 +325,7 @@ export function TreeView<T = unknown>({
|
|
|
327
325
|
while (cur && !visibleIds.has(cur)) cur = byId.get(cur)?.parentId ?? null;
|
|
328
326
|
return cur;
|
|
329
327
|
};
|
|
330
|
-
const tabbable =
|
|
331
|
-
nearestVisible(focusedId) ?? nearestVisible(selected) ?? visible[0]?.node.id ?? null;
|
|
328
|
+
const tabbable = nearestVisible(focusedId) ?? nearestVisible(selected) ?? visible[0]?.node.id ?? null;
|
|
332
329
|
|
|
333
330
|
useEffect(() => {
|
|
334
331
|
const id = pendingFocus.current;
|
|
@@ -279,8 +279,7 @@ export function TreemapCell({
|
|
|
279
279
|
// 29px down and an 11px glyph hangs ~2px below it, so 36 leaves the same ~5px under
|
|
280
280
|
// the note that the label keeps under itself at the 20px floor.
|
|
281
281
|
const rawNote = id != null && nodeNote ? nodeNote(id) : undefined;
|
|
282
|
-
const note =
|
|
283
|
-
label != null && rawNote != null && ph >= 36 * scale ? fitLabel(rawNote, pw, noteSize) : null;
|
|
282
|
+
const note = label != null && rawNote != null && ph >= 36 * scale ? fitLabel(rawNote, pw, noteSize) : null;
|
|
284
283
|
// The label's START edge, 6px in from the tile's. The tiles themselves are laid out
|
|
285
284
|
// physically (the plot is not mirrored, see `ChartContainer`) and the chart's SVG is
|
|
286
285
|
// pinned `ltr`, so the direction is set on each <text> explicitly: `start` is then
|
|
@@ -312,16 +311,7 @@ export function TreemapCell({
|
|
|
312
311
|
>
|
|
313
312
|
{/* The 2px gutter is the card showing through, not a white grid — on a dark
|
|
314
313
|
surface white lines glare harder than the tiles. */}
|
|
315
|
-
<rect
|
|
316
|
-
x={px}
|
|
317
|
-
y={py}
|
|
318
|
-
width={pw}
|
|
319
|
-
height={ph}
|
|
320
|
-
fill={tileFill}
|
|
321
|
-
stroke="var(--bg-surface)"
|
|
322
|
-
strokeWidth={2}
|
|
323
|
-
rx={3}
|
|
324
|
-
/>
|
|
314
|
+
<rect x={px} y={py} width={pw} height={ph} fill={tileFill} stroke="var(--bg-surface)" strokeWidth={2} rx={3} />
|
|
325
315
|
{edge && pw > 3 && ph > 3 && (
|
|
326
316
|
<rect
|
|
327
317
|
data-edge=""
|
|
@@ -481,9 +471,7 @@ export function Treemap({
|
|
|
481
471
|
dataKey="size"
|
|
482
472
|
fill="var(--chart-1)"
|
|
483
473
|
isAnimationActive={false}
|
|
484
|
-
content={
|
|
485
|
-
<TreemapCell onNodeClick={onNodeClick} redactNames={redactNames} nodeNote={nodeNote} dir={dir} />
|
|
486
|
-
}
|
|
474
|
+
content={<TreemapCell onNodeClick={onNodeClick} redactNames={redactNames} nodeNote={nodeNote} dir={dir} />}
|
|
487
475
|
>
|
|
488
476
|
<ChartTooltip content={<Content hideLabel valueFormatter={format} />} />
|
|
489
477
|
</RechartsTreemap>
|
|
@@ -20,9 +20,7 @@ export interface TriggerAria {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/** Split a field's props into what its trigger takes and what its wrapper takes. */
|
|
23
|
-
export function splitTriggerAria<T extends TriggerAria>(
|
|
24
|
-
props: T,
|
|
25
|
-
): [TriggerAria, Omit<T, keyof TriggerAria>] {
|
|
23
|
+
export function splitTriggerAria<T extends TriggerAria>(props: T): [TriggerAria, Omit<T, keyof TriggerAria>] {
|
|
26
24
|
const {
|
|
27
25
|
id,
|
|
28
26
|
"aria-label": label,
|
|
@@ -44,4 +42,3 @@ export function splitTriggerAria<T extends TriggerAria>(
|
|
|
44
42
|
rest,
|
|
45
43
|
];
|
|
46
44
|
}
|
|
47
|
-
|
|
@@ -4,12 +4,7 @@ import * as ReactRouter from "react-router";
|
|
|
4
4
|
import { useLocation, useSearchParams } from "react-router";
|
|
5
5
|
import { useKitTableStorageKeyPrefix } from "../i18n/kit-labels";
|
|
6
6
|
import { readStored, writeStored } from "../lib/safe-storage";
|
|
7
|
-
import {
|
|
8
|
-
decodeFilterValue,
|
|
9
|
-
encodeFilterValue,
|
|
10
|
-
isFilterActive,
|
|
11
|
-
resolveFilter,
|
|
12
|
-
} from "./data-table-filters";
|
|
7
|
+
import { decodeFilterValue, encodeFilterValue, isFilterActive, resolveFilter } from "./data-table-filters";
|
|
13
8
|
import { decodeSorts, encodeSorts, normalizeSorts, type SortState } from "./data-table-sort";
|
|
14
9
|
import type { DataTableColumn, FilterState, ServerPagination } from "./data-table";
|
|
15
10
|
|
|
@@ -254,9 +249,7 @@ function urlSignature<T>(
|
|
|
254
249
|
}
|
|
255
250
|
parts.push(`${keys.sort}=${encodeSorts(sorts)}`);
|
|
256
251
|
parts.push(
|
|
257
|
-
`${keys.pageSize}=${
|
|
258
|
-
pageSize === Infinity ? "all" : pageSize === defaultPageSize ? "" : String(pageSize)
|
|
259
|
-
}`,
|
|
252
|
+
`${keys.pageSize}=${pageSize === Infinity ? "all" : pageSize === defaultPageSize ? "" : String(pageSize)}`,
|
|
260
253
|
);
|
|
261
254
|
parts.push(`${keys.page}=${page > 0 ? String(page + 1) : ""}`);
|
|
262
255
|
return parts.join("&");
|
|
@@ -360,10 +353,7 @@ export function useTableState<T>({
|
|
|
360
353
|
const [urlInitial] = useState<TableUrlState>(() =>
|
|
361
354
|
urlSync ? readTableUrlState(searchParams, columns, urlPrefix) : {},
|
|
362
355
|
);
|
|
363
|
-
const initial = useMemo(
|
|
364
|
-
() => loadPersisted(storageKey, storageKeyPrefix),
|
|
365
|
-
[storageKey, storageKeyPrefix],
|
|
366
|
-
);
|
|
356
|
+
const initial = useMemo(() => loadPersisted(storageKey, storageKeyPrefix), [storageKey, storageKeyPrefix]);
|
|
367
357
|
const [internalSorts, setInternalSorts] = useState<SortState[]>(() =>
|
|
368
358
|
urlInitial.sorts !== undefined ? urlInitial.sorts : normalizeSorts(initial.sort),
|
|
369
359
|
);
|
|
@@ -482,9 +472,7 @@ export function useTableState<T>({
|
|
|
482
472
|
}, [storageKey, storageKeyPrefix, persisted]);
|
|
483
473
|
|
|
484
474
|
const lastUrl = useRef<string | null>(null);
|
|
485
|
-
const urlSig = urlSync
|
|
486
|
-
? urlSignature(columns, sorts, filters, pageSize, page, defaultPageSize, keys)
|
|
487
|
-
: "";
|
|
475
|
+
const urlSig = urlSync ? urlSignature(columns, sorts, filters, pageSize, page, defaultPageSize, keys) : "";
|
|
488
476
|
useEffect(() => {
|
|
489
477
|
if (!urlSync) return;
|
|
490
478
|
if (lastUrl.current === urlSig) return;
|
|
@@ -492,7 +480,18 @@ export function useTableState<T>({
|
|
|
492
480
|
// `columns` is deliberately not a dependency and does not need to be: the
|
|
493
481
|
// signature above is computed from it, so a column set that would produce a
|
|
494
482
|
// different address produces a different signature first.
|
|
495
|
-
writeUrlState(
|
|
483
|
+
writeUrlState(
|
|
484
|
+
setSearchParams,
|
|
485
|
+
columns,
|
|
486
|
+
sorts,
|
|
487
|
+
filters,
|
|
488
|
+
pageSize,
|
|
489
|
+
page,
|
|
490
|
+
defaultPageSize,
|
|
491
|
+
undefined,
|
|
492
|
+
locationState,
|
|
493
|
+
keys,
|
|
494
|
+
);
|
|
496
495
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
497
496
|
}, [urlSync, urlSig]);
|
|
498
497
|
|
|
@@ -30,8 +30,7 @@ const AVATAR_SIZES = {
|
|
|
30
30
|
lg: "size-12 text-base",
|
|
31
31
|
} as const;
|
|
32
32
|
|
|
33
|
-
const CHIP =
|
|
34
|
-
"inline-flex shrink-0 items-center justify-center rounded-full bg-inverse font-semibold text-inverse";
|
|
33
|
+
const CHIP = "inline-flex shrink-0 items-center justify-center rounded-full bg-inverse font-semibold text-inverse";
|
|
35
34
|
|
|
36
35
|
/** The dot grows with the avatar: 8px on `sm`, 10px on `md` (keksdose's), 12px on `lg`. */
|
|
37
36
|
const BADGE_SIZES: Record<keyof typeof AVATAR_SIZES, StatusDotSize> = { sm: "sm", md: "md", lg: "lg" };
|
|
@@ -90,22 +89,10 @@ export function UserAvatar({ name, email, person, size = "md", badge, className,
|
|
|
90
89
|
// also contains the sr-only text.
|
|
91
90
|
return (
|
|
92
91
|
<span {...rest} className="relative inline-flex shrink-0">
|
|
93
|
-
<span
|
|
94
|
-
aria-hidden
|
|
95
|
-
className={cn(
|
|
96
|
-
CHIP,
|
|
97
|
-
AVATAR_SIZES[size],
|
|
98
|
-
className,
|
|
99
|
-
)}
|
|
100
|
-
>
|
|
92
|
+
<span aria-hidden className={cn(CHIP, AVATAR_SIZES[size], className)}>
|
|
101
93
|
{initials}
|
|
102
94
|
</span>
|
|
103
|
-
<StatusDot
|
|
104
|
-
ring
|
|
105
|
-
tone={badge.tone ?? "danger"}
|
|
106
|
-
size={BADGE_SIZES[size]}
|
|
107
|
-
className="absolute -end-0.5 -top-0.5"
|
|
108
|
-
/>
|
|
95
|
+
<StatusDot ring tone={badge.tone ?? "danger"} size={BADGE_SIZES[size]} className="absolute -end-0.5 -top-0.5" />
|
|
109
96
|
<span className="sr-only">{badge.label}</span>
|
|
110
97
|
</span>
|
|
111
98
|
);
|
|
@@ -121,11 +108,7 @@ export function UserAvatar({ name, email, person, size = "md", badge, className,
|
|
|
121
108
|
// `aria-label` arrives through `...rest` and wins.
|
|
122
109
|
aria-hidden
|
|
123
110
|
{...rest}
|
|
124
|
-
className={cn(
|
|
125
|
-
CHIP,
|
|
126
|
-
AVATAR_SIZES[size],
|
|
127
|
-
className,
|
|
128
|
-
)}
|
|
111
|
+
className={cn(CHIP, AVATAR_SIZES[size], className)}
|
|
129
112
|
>
|
|
130
113
|
{initials}
|
|
131
114
|
</span>
|
package/src/demo/demo-start.tsx
CHANGED
|
@@ -116,10 +116,14 @@ export function DemoStart<T>({
|
|
|
116
116
|
const accessLink = useAccessAction(access, landingLabels);
|
|
117
117
|
const [refusal, setRefusal] = useState<Refusal | null>(null);
|
|
118
118
|
useNoIndex(noIndex);
|
|
119
|
-
useOncePerKey<T>(
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
119
|
+
useOncePerKey<T>(
|
|
120
|
+
ONCE,
|
|
121
|
+
() => start(),
|
|
122
|
+
(_key, result) => {
|
|
123
|
+
if (result.ok) onStarted(result.value);
|
|
124
|
+
else setRefusal(refusalOf(result.error));
|
|
125
|
+
},
|
|
126
|
+
);
|
|
123
127
|
|
|
124
128
|
return (
|
|
125
129
|
<div {...rest} className={cn("flex flex-col items-center gap-4 py-4 text-center", className)}>
|
|
@@ -22,7 +22,8 @@ import type { FeedbackAttachmentFieldLabels } from "./feedback-attachment";
|
|
|
22
22
|
export const DEFAULT_FEEDBACK_ATTACHMENT_LABELS: FeedbackAttachmentFieldLabels = {
|
|
23
23
|
attachmentAdd: "Add attachment",
|
|
24
24
|
attachmentCapture: "Capture screenshot",
|
|
25
|
-
attachmentPaste:
|
|
25
|
+
attachmentPaste:
|
|
26
|
+
"…or paste a screenshot straight from the clipboard, so you can show one corner rather than the whole page.",
|
|
26
27
|
attachmentRemove: "Remove attachment",
|
|
27
28
|
attachmentList: "Attachments",
|
|
28
29
|
attachmentScreenshot: "Screenshot",
|
|
@@ -328,9 +328,7 @@ export interface FeedbackAttachmentFieldRefsProps extends FeedbackAttachmentFiel
|
|
|
328
328
|
}
|
|
329
329
|
|
|
330
330
|
export type FeedbackAttachmentFieldProps =
|
|
331
|
-
|
|
|
332
|
-
| FeedbackAttachmentFieldMultipleProps
|
|
333
|
-
| FeedbackAttachmentFieldRefsProps;
|
|
331
|
+
FeedbackAttachmentFieldSingleProps | FeedbackAttachmentFieldMultipleProps | FeedbackAttachmentFieldRefsProps;
|
|
334
332
|
|
|
335
333
|
/**
|
|
336
334
|
* Picking one picture: the file dialog, a capture of the app view, or a paste.
|
|
@@ -444,11 +442,7 @@ function SingleField({
|
|
|
444
442
|
{value ? (
|
|
445
443
|
<div className="flex items-start gap-2">
|
|
446
444
|
{value.type.startsWith("image/") && preview ? (
|
|
447
|
-
<img
|
|
448
|
-
src={preview}
|
|
449
|
-
alt={value.name}
|
|
450
|
-
className="h-20 w-20 rounded border border-subtle object-cover"
|
|
451
|
-
/>
|
|
445
|
+
<img src={preview} alt={value.name} className="h-20 w-20 rounded border border-subtle object-cover" />
|
|
452
446
|
) : (
|
|
453
447
|
// Non-image attachments (PDF, text) can't preview as an <img>, so
|
|
454
448
|
// show a neutral file tile with the name/size beside it instead.
|
|
@@ -458,9 +452,7 @@ function SingleField({
|
|
|
458
452
|
)}
|
|
459
453
|
<div className="min-w-0 flex-1">
|
|
460
454
|
<div className="truncate-until-large text-sm text-secondary">{value.name}</div>
|
|
461
|
-
<div className="text-xs text-muted">
|
|
462
|
-
{fileText.size(value.size)}
|
|
463
|
-
</div>
|
|
455
|
+
<div className="text-xs text-muted">{fileText.size(value.size)}</div>
|
|
464
456
|
</div>
|
|
465
457
|
<RemoveButton label={text.attachmentRemove} onClick={() => onChange(null)} disabled={disabled} />
|
|
466
458
|
</div>
|
|
@@ -489,9 +481,7 @@ function SingleField({
|
|
|
489
481
|
</div>
|
|
490
482
|
{/* Said out loud, because a gesture with no affordance is a gesture
|
|
491
483
|
nobody finds. */}
|
|
492
|
-
<p className="text-xs text-muted">
|
|
493
|
-
{text.attachmentPaste}
|
|
494
|
-
</p>
|
|
484
|
+
<p className="text-xs text-muted">{text.attachmentPaste}</p>
|
|
495
485
|
</div>
|
|
496
486
|
)}
|
|
497
487
|
<input
|
|
@@ -614,8 +604,7 @@ function MultipleField({
|
|
|
614
604
|
const root = rootRef.current;
|
|
615
605
|
if (!root) return;
|
|
616
606
|
const removes = root.querySelectorAll<HTMLElement>("[data-attachment-remove]");
|
|
617
|
-
const target =
|
|
618
|
-
removes[index] ?? root.querySelector<HTMLElement>("[data-attachment-action]") ?? removes[index - 1];
|
|
607
|
+
const target = removes[index] ?? root.querySelector<HTMLElement>("[data-attachment-action]") ?? removes[index - 1];
|
|
619
608
|
target?.focus();
|
|
620
609
|
}, [value, screenshot]);
|
|
621
610
|
|
|
@@ -650,7 +639,9 @@ function MultipleField({
|
|
|
650
639
|
<div className="truncate-until-large text-xs text-muted">
|
|
651
640
|
{/* The screenshot's file name moves down here: still there for the
|
|
652
641
|
reporter who wants to know what will be sent, not its title. */}
|
|
653
|
-
{chip.screenshot
|
|
642
|
+
{chip.screenshot
|
|
643
|
+
? `${chip.file.name} · ${fileText.size(chip.file.size)}`
|
|
644
|
+
: fileText.size(chip.file.size)}
|
|
654
645
|
</div>
|
|
655
646
|
</div>
|
|
656
647
|
<RemoveButton
|
|
@@ -692,9 +683,7 @@ function MultipleField({
|
|
|
692
683
|
)}
|
|
693
684
|
</div>
|
|
694
685
|
)}
|
|
695
|
-
<p className="text-xs text-muted">
|
|
696
|
-
{room > 0 ? text.attachmentPaste : limitLabel(max)}
|
|
697
|
-
</p>
|
|
686
|
+
<p className="text-xs text-muted">{room > 0 ? text.attachmentPaste : limitLabel(max)}</p>
|
|
698
687
|
<input
|
|
699
688
|
ref={fileInputRef}
|
|
700
689
|
type="file"
|
|
@@ -857,8 +846,7 @@ function RefsField({
|
|
|
857
846
|
const root = rootRef.current;
|
|
858
847
|
if (!root) return;
|
|
859
848
|
const removes = root.querySelectorAll<HTMLElement>("[data-attachment-remove]");
|
|
860
|
-
const target =
|
|
861
|
-
removes[index] ?? root.querySelector<HTMLElement>("[data-attachment-action]") ?? removes[index - 1];
|
|
849
|
+
const target = removes[index] ?? root.querySelector<HTMLElement>("[data-attachment-action]") ?? removes[index - 1];
|
|
862
850
|
target?.focus();
|
|
863
851
|
}, [value]);
|
|
864
852
|
|
|
@@ -973,18 +961,18 @@ function RefsField({
|
|
|
973
961
|
function RefGlyph({ type }: { type?: string }) {
|
|
974
962
|
return (
|
|
975
963
|
<span className="flex size-12 shrink-0 items-center justify-center rounded border border-subtle bg-surface-2 text-placeholder">
|
|
976
|
-
{type?.startsWith("image/") ?
|
|
964
|
+
{type?.startsWith("image/") ? (
|
|
965
|
+
<ImageIcon aria-hidden className="size-6" />
|
|
966
|
+
) : (
|
|
967
|
+
<FileText aria-hidden className="size-6" />
|
|
968
|
+
)}
|
|
977
969
|
</span>
|
|
978
970
|
);
|
|
979
971
|
}
|
|
980
972
|
|
|
981
973
|
function Heading({ text, className }: { text?: string; className?: string }) {
|
|
982
974
|
if (!text) return null;
|
|
983
|
-
return (
|
|
984
|
-
<div className={cn("mb-1 text-xs font-medium uppercase tracking-wide text-muted", className)}>
|
|
985
|
-
{text}
|
|
986
|
-
</div>
|
|
987
|
-
);
|
|
975
|
+
return <div className={cn("mb-1 text-xs font-medium uppercase tracking-wide text-muted", className)}>{text}</div>;
|
|
988
976
|
}
|
|
989
977
|
|
|
990
978
|
function CaptureButton({
|
|
@@ -1064,7 +1052,6 @@ function RemoveButton({
|
|
|
1064
1052
|
);
|
|
1065
1053
|
}
|
|
1066
1054
|
|
|
1067
|
-
|
|
1068
1055
|
/**
|
|
1069
1056
|
* The {@link FeedbackAttachmentErrorInfo} builder of one field: its limits, and the
|
|
1070
1057
|
* sentence for each refusal. The sentences are the `filePicker` namespace's — the ones
|
|
@@ -260,7 +260,9 @@ export interface CaptureAppScreenshotOptions {
|
|
|
260
260
|
* Call it from the "Capture screenshot" button's own click and nowhere else (keksdose
|
|
261
261
|
* checked: running it at dialog OPEN was suspected and was never the cause of the wait).
|
|
262
262
|
*/
|
|
263
|
-
export async function captureAppScreenshot({
|
|
263
|
+
export async function captureAppScreenshot({
|
|
264
|
+
rootId = "root",
|
|
265
|
+
}: CaptureAppScreenshotOptions = {}): Promise<File | null> {
|
|
264
266
|
let domToBlob: (typeof import("modern-screenshot"))["domToBlob"];
|
|
265
267
|
try {
|
|
266
268
|
({ domToBlob } = await import("modern-screenshot"));
|