@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
|
@@ -2,13 +2,7 @@ import { useEffect, useId, useMemo, useRef } from "react";
|
|
|
2
2
|
import type { KeyboardEvent, ReactNode, Ref } from "react";
|
|
3
3
|
import { CalculatorButton, type CalculatorButtonLabels } from "./calculator";
|
|
4
4
|
import { NumberPadSheet, type NumberPadSheetLabels } from "./numpad-sheet";
|
|
5
|
-
import {
|
|
6
|
-
FIELD_BASE,
|
|
7
|
-
FIELD_DISPLAY,
|
|
8
|
-
FIELD_INVALID,
|
|
9
|
-
FLOATING_INPUT_CLASS,
|
|
10
|
-
FloatingField,
|
|
11
|
-
} from "./field-base";
|
|
5
|
+
import { FIELD_BASE, FIELD_DISPLAY, FIELD_INVALID, FLOATING_INPUT_CLASS, FloatingField } from "./field-base";
|
|
12
6
|
// The data alone (0.35): not the picker, which this field does not render.
|
|
13
7
|
import { CURRENCIES } from "../currencies";
|
|
14
8
|
import { FieldCaption, LockedReason, mergeRefs, type DisabledReasonDisplay, type FieldHelpProps } from "./field-parts";
|
|
@@ -205,13 +199,7 @@ function decimalsOf(n: number): number {
|
|
|
205
199
|
* binary noise goes: `0.1 × 3` is 0.30000000000000004, and `toFixed(1)` of it is
|
|
206
200
|
* "0.3". Summing steps would accumulate that noise press by press instead.
|
|
207
201
|
*/
|
|
208
|
-
export function stepNumber(
|
|
209
|
-
current: number | null,
|
|
210
|
-
count: number,
|
|
211
|
-
step: number,
|
|
212
|
-
min?: number,
|
|
213
|
-
max?: number,
|
|
214
|
-
): number {
|
|
202
|
+
export function stepNumber(current: number | null, count: number, step: number, min?: number, max?: number): number {
|
|
215
203
|
const clamp = (n: number) => Math.min(max ?? Infinity, Math.max(min ?? -Infinity, n));
|
|
216
204
|
// Nothing to step from: land on the value nearest zero the bounds allow, rather
|
|
217
205
|
// than on ±step — a room count with `min={1}` goes to 1, a rate to 0.
|
|
@@ -221,11 +209,7 @@ export function stepNumber(
|
|
|
221
209
|
const nearest = Math.round(raw);
|
|
222
210
|
// "On the grid" within float tolerance: (0.3 - 0) / 0.1 is 2.9999999999999996.
|
|
223
211
|
const onGrid = Math.abs(raw - nearest) < 1e-9;
|
|
224
|
-
const k = onGrid
|
|
225
|
-
? nearest + count
|
|
226
|
-
: count > 0
|
|
227
|
-
? Math.ceil(raw) + count - 1
|
|
228
|
-
: Math.floor(raw) + count + 1;
|
|
212
|
+
const k = onGrid ? nearest + count : count > 0 ? Math.ceil(raw) + count - 1 : Math.floor(raw) + count + 1;
|
|
229
213
|
const places = Math.min(Math.max(decimalsOf(step), decimalsOf(origin)), 20);
|
|
230
214
|
return clamp(Number((origin + k * step).toFixed(places)));
|
|
231
215
|
}
|
|
@@ -6,11 +6,7 @@ import { cn } from "../lib/cn";
|
|
|
6
6
|
import { FOCUS_RING } from "./focus-ring";
|
|
7
7
|
import { useDismissLayer } from "../hooks/use-dismiss";
|
|
8
8
|
import { evaluateExpression, formatResult, sanitizeLive } from "../lib/calc";
|
|
9
|
-
import {
|
|
10
|
-
DEFAULT_CALCULATOR_LABELS,
|
|
11
|
-
useKitLabels,
|
|
12
|
-
type CalculatorLabels,
|
|
13
|
-
} from "../i18n/kit-labels";
|
|
9
|
+
import { DEFAULT_CALCULATOR_LABELS, useKitLabels, type CalculatorLabels } from "../i18n/kit-labels";
|
|
14
10
|
|
|
15
11
|
/**
|
|
16
12
|
* A full calculator keypad rendered as a bottom sheet — the mobile counterpart to
|
|
@@ -45,9 +41,7 @@ export interface NumberPadSheetLabels extends Partial<CalculatorLabels> {
|
|
|
45
41
|
done?: string;
|
|
46
42
|
}
|
|
47
43
|
|
|
48
|
-
type PadKey =
|
|
49
|
-
| { kind: "ins"; label: string; ins: string; accent?: boolean; name?: PadKeyName }
|
|
50
|
-
| { kind: "back" };
|
|
44
|
+
type PadKey = { kind: "ins"; label: string; ins: string; accent?: boolean; name?: PadKeyName } | { kind: "back" };
|
|
51
45
|
|
|
52
46
|
/** The {@link CalculatorLabels} key naming a non-digit key; digits are their glyph. */
|
|
53
47
|
type PadKeyName = "plus" | "minus" | "times" | "divide" | "decimal";
|
|
@@ -222,14 +216,16 @@ export function NumberPadSheet({
|
|
|
222
216
|
{/* Header display: which field + the running expression and live result, so
|
|
223
217
|
the value stays visible even when the sheet covers the field. */}
|
|
224
218
|
<div className="flex items-end justify-between gap-3 px-2 pb-2">
|
|
225
|
-
{label != null &&
|
|
226
|
-
<span className="truncate pb-1 text-xs font-medium text-money-neutral">{label}</span>
|
|
227
|
-
)}
|
|
219
|
+
{label != null && <span className="truncate pb-1 text-xs font-medium text-money-neutral">{label}</span>}
|
|
228
220
|
{/* At the logical end, opposite the label; the figures themselves stay
|
|
229
221
|
left-to-right and right-aligned, like the desktop calculator's. */}
|
|
230
222
|
<div className="ms-auto min-w-0">
|
|
231
|
-
<div dir="ltr" className="truncate text-right font-mono text-lg leading-tight text-primary">
|
|
232
|
-
|
|
223
|
+
<div dir="ltr" className="truncate text-right font-mono text-lg leading-tight text-primary">
|
|
224
|
+
{value || "0"}
|
|
225
|
+
</div>
|
|
226
|
+
<div dir="ltr" className="h-4 text-right font-mono text-xs text-money-neutral">
|
|
227
|
+
{preview}
|
|
228
|
+
</div>
|
|
233
229
|
</div>
|
|
234
230
|
</div>
|
|
235
231
|
|
|
@@ -2,13 +2,7 @@ import { useId, useState } from "react";
|
|
|
2
2
|
import type { ChangeEvent, ClipboardEvent, FocusEvent, InputHTMLAttributes, ReactNode, Ref } from "react";
|
|
3
3
|
import { cn } from "../lib/cn";
|
|
4
4
|
import { EndHintRow, FieldCaption, useFieldError, useFieldHint, type FieldHelpProps } from "./field-parts";
|
|
5
|
-
import {
|
|
6
|
-
FIELD_BASE,
|
|
7
|
-
FIELD_INVALID,
|
|
8
|
-
FIELD_WRITABLE_LOOK,
|
|
9
|
-
FLOATING_INPUT_CLASS,
|
|
10
|
-
FloatingField,
|
|
11
|
-
} from "./field-base";
|
|
5
|
+
import { FIELD_BASE, FIELD_INVALID, FIELD_WRITABLE_LOOK, FLOATING_INPUT_CLASS, FloatingField } from "./field-base";
|
|
12
6
|
|
|
13
7
|
/**
|
|
14
8
|
* The field for a verification code — the six digits an authenticator app shows, or the
|
|
@@ -57,10 +51,11 @@ import {
|
|
|
57
51
|
* the error under that, both attached through `aria-describedby` after the caller's own.
|
|
58
52
|
*/
|
|
59
53
|
export interface OneTimeCodeInputProps
|
|
60
|
-
extends
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
extends
|
|
55
|
+
Omit<
|
|
56
|
+
InputHTMLAttributes<HTMLInputElement>,
|
|
57
|
+
"value" | "defaultValue" | "onChange" | "type" | "inputMode" | "autoComplete" | "maxLength" | "pattern"
|
|
58
|
+
>,
|
|
64
59
|
FieldHelpProps {
|
|
65
60
|
/** The digits so far — a string, so leading zeros survive. */
|
|
66
61
|
value: string;
|
|
@@ -200,12 +200,7 @@ export function PageContents({
|
|
|
200
200
|
|
|
201
201
|
if (variant === "disclosure") {
|
|
202
202
|
return (
|
|
203
|
-
<details
|
|
204
|
-
className={cn(
|
|
205
|
-
"group rounded-md border border-subtle bg-surface",
|
|
206
|
-
className,
|
|
207
|
-
)}
|
|
208
|
-
>
|
|
203
|
+
<details className={cn("group rounded-md border border-subtle bg-surface", className)}>
|
|
209
204
|
<summary className="flex cursor-pointer list-none items-center justify-between px-3 py-2 text-sm font-medium text-secondary [&::-webkit-details-marker]:hidden">
|
|
210
205
|
{l.title}
|
|
211
206
|
<ChevronDown
|
|
@@ -222,9 +217,7 @@ export function PageContents({
|
|
|
222
217
|
|
|
223
218
|
return (
|
|
224
219
|
<nav {...rest} aria-label={l.title} className={className}>
|
|
225
|
-
<p className="mb-2 text-caption font-semibold uppercase tracking-wide text-muted">
|
|
226
|
-
{l.title}
|
|
227
|
-
</p>
|
|
220
|
+
<p className="mb-2 text-caption font-semibold uppercase tracking-wide text-muted">{l.title}</p>
|
|
228
221
|
{list}
|
|
229
222
|
</nav>
|
|
230
223
|
);
|
|
@@ -39,8 +39,7 @@ export type PageHeaderMobileLayout = "stacked" | "inline";
|
|
|
39
39
|
* their label onto three lines. `large:max-sm:`, the scaled phone width, so Normal and
|
|
40
40
|
* every wider screen keep their row; `inline` is for actions known to fit, and stays.
|
|
41
41
|
*/
|
|
42
|
-
const STACK_ACTIONS_AT_LARGE =
|
|
43
|
-
"large:max-sm:flex-col large:max-sm:items-stretch large:max-sm:[&>*]:w-full";
|
|
42
|
+
const STACK_ACTIONS_AT_LARGE = "large:max-sm:flex-col large:max-sm:items-stretch large:max-sm:[&>*]:w-full";
|
|
44
43
|
|
|
45
44
|
const ROW: Record<PageHeaderMobileLayout, string> = {
|
|
46
45
|
stacked: "flex-col gap-3 sm:flex-row sm:items-start sm:justify-between sm:gap-4",
|
|
@@ -247,7 +246,9 @@ export function PageHeader({
|
|
|
247
246
|
return (
|
|
248
247
|
<div {...rest} className={cn("flex min-w-0 flex-col gap-2", className)}>
|
|
249
248
|
{breadcrumbs != null && (
|
|
250
|
-
<PageHeaderTrailContext.Provider value={titled ? TITLED : UNTITLED}>
|
|
249
|
+
<PageHeaderTrailContext.Provider value={titled ? TITLED : UNTITLED}>
|
|
250
|
+
{breadcrumbs}
|
|
251
|
+
</PageHeaderTrailContext.Provider>
|
|
251
252
|
)}
|
|
252
253
|
{/* With a second group, `inline` wraps so that group's full-width basis puts it
|
|
253
254
|
on a row of its own on a phone (`stacked` is a column there already, and a
|
|
@@ -264,13 +265,7 @@ export function PageHeader({
|
|
|
264
265
|
>
|
|
265
266
|
<div ref={titleRef} className={cn("flex-1", keepsWords ? "min-w-min" : "min-w-0")}>
|
|
266
267
|
{eyebrow != null && <p className={cn(SECTION_LABEL_CLASS.xs, "mb-1")}>{eyebrow}</p>}
|
|
267
|
-
<Heading
|
|
268
|
-
className={cn(
|
|
269
|
-
truncateTitle ? "truncate-until-large" : "break-words",
|
|
270
|
-
"text-primary",
|
|
271
|
-
TITLE[size],
|
|
272
|
-
)}
|
|
273
|
-
>
|
|
268
|
+
<Heading className={cn(truncateTitle ? "truncate-until-large" : "break-words", "text-primary", TITLE[size])}>
|
|
274
269
|
{title}
|
|
275
270
|
</Heading>
|
|
276
271
|
{description != null && <p className="mt-1 text-sm text-muted">{description}</p>}
|
|
@@ -18,6 +18,5 @@ export const DEFAULT_PASSWORD_STRENGTH_LABELS: PasswordStrengthLabels = {
|
|
|
18
18
|
optional: (rule) => `${rule} (optional)`,
|
|
19
19
|
met: "Met:",
|
|
20
20
|
notMet: "Not met:",
|
|
21
|
-
tooLong: (maxBytes) =>
|
|
22
|
-
`At most ${maxBytes} characters (accents and emoji count for more than one).`,
|
|
21
|
+
tooLong: (maxBytes) => `At most ${maxBytes} characters (accents and emoji count for more than one).`,
|
|
23
22
|
};
|
|
@@ -55,7 +55,10 @@ export interface PasswordScoreOptions {
|
|
|
55
55
|
const DEFAULT_MIN_LENGTH = 8;
|
|
56
56
|
|
|
57
57
|
/** The checklist's rules, evaluated. Pure; the order is the order they are shown in. */
|
|
58
|
-
export function passwordRules(
|
|
58
|
+
export function passwordRules(
|
|
59
|
+
value: string,
|
|
60
|
+
{ minLength = DEFAULT_MIN_LENGTH }: PasswordScoreOptions = {},
|
|
61
|
+
): PasswordRule[] {
|
|
59
62
|
return [
|
|
60
63
|
// Code points, not UTF-16 units: an emoji is one character to the person typing it.
|
|
61
64
|
{ id: "length", met: [...value].length >= minLength, required: true },
|
|
@@ -208,10 +211,7 @@ export function PasswordStrengthMeter({
|
|
|
208
211
|
{[1, 2, 3, 4].map((step) => (
|
|
209
212
|
<div
|
|
210
213
|
key={step}
|
|
211
|
-
className={cn(
|
|
212
|
-
"h-1 flex-1 rounded-full",
|
|
213
|
-
step <= score ? FILL[score] : "bg-[var(--border)]",
|
|
214
|
-
)}
|
|
214
|
+
className={cn("h-1 flex-1 rounded-full", step <= score ? FILL[score] : "bg-[var(--border)]")}
|
|
215
215
|
/>
|
|
216
216
|
))}
|
|
217
217
|
</div>
|
|
@@ -223,10 +223,7 @@ export function PasswordStrengthMeter({
|
|
|
223
223
|
<li
|
|
224
224
|
key={r.id}
|
|
225
225
|
// `relative`: the sr-only state needs a local containing block.
|
|
226
|
-
className={cn(
|
|
227
|
-
"relative",
|
|
228
|
-
r.met ? "text-success" : "text-muted",
|
|
229
|
-
)}
|
|
226
|
+
className={cn("relative", r.met ? "text-success" : "text-muted")}
|
|
230
227
|
data-met={r.met}
|
|
231
228
|
>
|
|
232
229
|
<span className="sr-only">{r.met ? labels.met : labels.notMet} </span>
|
|
@@ -2,14 +2,7 @@ import { useState } from "react";
|
|
|
2
2
|
import type { ChangeEvent, FocusEvent } from "react";
|
|
3
3
|
import { useKitLabels, type LabelOverride } from "../i18n/kit-labels";
|
|
4
4
|
import { cn } from "../lib/cn";
|
|
5
|
-
import {
|
|
6
|
-
PHONE_COUNTRIES,
|
|
7
|
-
PHONE_DIAL_CODES,
|
|
8
|
-
formatNationalPhone,
|
|
9
|
-
formatPhone,
|
|
10
|
-
isE164,
|
|
11
|
-
parsePhone,
|
|
12
|
-
} from "../lib/phone";
|
|
5
|
+
import { PHONE_COUNTRIES, PHONE_DIAL_CODES, formatNationalPhone, formatPhone, isE164, parsePhone } from "../lib/phone";
|
|
13
6
|
import type { ParsedPhone, PhoneCountry, PhoneCountryCode } from "../lib/phone";
|
|
14
7
|
import { useFieldMessages } from "./field-parts";
|
|
15
8
|
import { Input, type InputProps } from "./input";
|
|
@@ -237,11 +230,7 @@ export function PhoneInput({
|
|
|
237
230
|
const named = typeof label === "string" && label !== "";
|
|
238
231
|
|
|
239
232
|
return (
|
|
240
|
-
<div
|
|
241
|
-
className={className}
|
|
242
|
-
role={named ? "group" : undefined}
|
|
243
|
-
aria-label={named ? label : undefined}
|
|
244
|
-
>
|
|
233
|
+
<div className={className} role={named ? "group" : undefined} aria-label={named ? label : undefined}>
|
|
245
234
|
{/* On a phone at Large the number takes a line of its own under the country (0.32.1,
|
|
246
235
|
the 360 px Extra-large sweep; docs/text-size-harmonization.md §4 "nothing
|
|
247
236
|
truncates"): the 7rem select is 168 px at 150 %, and on a 360 px phone it left
|
|
@@ -20,8 +20,7 @@ import { DEFAULT_PICKER_SHEET_LABELS, useKitLabels } from "../i18n/kit-labels";
|
|
|
20
20
|
* tooltip string, and `onClose` is "the sheet was dismissed", not the DOM's
|
|
21
21
|
* `<dialog>` close event. Everything else a caller can pass reaches the sheet.
|
|
22
22
|
*/
|
|
23
|
-
export interface PickerSheetProps
|
|
24
|
-
extends Omit<ComponentPropsWithoutRef<"div">, "title" | "onClose"> {
|
|
23
|
+
export interface PickerSheetProps extends Omit<ComponentPropsWithoutRef<"div">, "title" | "onClose"> {
|
|
25
24
|
open: boolean;
|
|
26
25
|
onClose: () => void;
|
|
27
26
|
/** The field's own label — a sheet that fills the screen has to say what it is
|
|
@@ -270,9 +269,7 @@ export function PickerSheet({
|
|
|
270
269
|
className={cn("fixed inset-0 z-50 flex flex-col bg-surface outline-none", className)}
|
|
271
270
|
>
|
|
272
271
|
<div className="flex items-center gap-2 border-b border-subtle px-3 py-2">
|
|
273
|
-
<span className="min-w-0 flex-1 truncate text-sm font-semibold text-primary">
|
|
274
|
-
{title}
|
|
275
|
-
</span>
|
|
272
|
+
<span className="min-w-0 flex-1 truncate text-sm font-semibold text-primary">{title}</span>
|
|
276
273
|
<button
|
|
277
274
|
type="button"
|
|
278
275
|
aria-label={labels.close}
|
|
@@ -210,8 +210,9 @@ export function PieChart({
|
|
|
210
210
|
const { drawable, drawn, total, pieData } = useMemo(() => {
|
|
211
211
|
const drawable = data
|
|
212
212
|
.map((slice, i) => ({ slice, value: slice.value, color: slice.color ?? paletteFor(i) }))
|
|
213
|
-
.filter(
|
|
214
|
-
|
|
213
|
+
.filter(
|
|
214
|
+
(d): d is { slice: PieChartSlice; value: number; color: string } =>
|
|
215
|
+
typeof d.value === "number" && Number.isFinite(d.value) && d.value > 0,
|
|
215
216
|
);
|
|
216
217
|
const shown = drawable.filter((d) => !hidden.has(d.slice.key));
|
|
217
218
|
const total = shown.reduce((acc, d) => acc + d.value, 0);
|
|
@@ -404,10 +405,7 @@ export function PieChart({
|
|
|
404
405
|
}));
|
|
405
406
|
|
|
406
407
|
const emptyBox = (
|
|
407
|
-
<div
|
|
408
|
-
className={cn("flex items-center justify-center text-sm text-muted", box.className)}
|
|
409
|
-
style={box.style}
|
|
410
|
-
>
|
|
408
|
+
<div className={cn("flex items-center justify-center text-sm text-muted", box.className)} style={box.style}>
|
|
411
409
|
{empty ?? labels.empty}
|
|
412
410
|
</div>
|
|
413
411
|
);
|
|
@@ -439,9 +437,7 @@ export function PieChart({
|
|
|
439
437
|
content={
|
|
440
438
|
<Content
|
|
441
439
|
hideLabel
|
|
442
|
-
valueFormatter={(v) =>
|
|
443
|
-
`${formatValue(v)} (${formatShare(total > 0 ? v / total : 0)})`
|
|
444
|
-
}
|
|
440
|
+
valueFormatter={(v) => `${formatValue(v)} (${formatShare(total > 0 ? v / total : 0)})`}
|
|
445
441
|
/>
|
|
446
442
|
}
|
|
447
443
|
/>
|
|
@@ -466,9 +462,7 @@ export function PieChart({
|
|
|
466
462
|
{focusedSlice ? formatValue(focusedSlice.value) : (centerValue ?? formatValue(total))}
|
|
467
463
|
</span>
|
|
468
464
|
{focusedSlice && (
|
|
469
|
-
<span className="text-xs tabular-nums text-muted">
|
|
470
|
-
{formatShare(focusedSlice.share)}
|
|
471
|
-
</span>
|
|
465
|
+
<span className="text-xs tabular-nums text-muted">{formatShare(focusedSlice.share)}</span>
|
|
472
466
|
)}
|
|
473
467
|
</div>
|
|
474
468
|
)}
|
|
@@ -194,7 +194,8 @@ export function Popover({
|
|
|
194
194
|
return (
|
|
195
195
|
<>
|
|
196
196
|
{trigger({ open, toggle, ref: triggerRef })}
|
|
197
|
-
{open &&
|
|
197
|
+
{open &&
|
|
198
|
+
pos &&
|
|
198
199
|
createPortal(
|
|
199
200
|
/* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions -- the
|
|
200
201
|
dialog container, per the APG dialog pattern: `onKeyDown` is Escape-to-close for
|
|
@@ -25,15 +25,7 @@ export { DEFAULT_PROGRESS_BAR_LABELS };
|
|
|
25
25
|
* "careful" about a figure that is neither. keksdose's report meters (food-group-card,
|
|
26
26
|
* drilldown-modal) sit beside amounts that are already in the money colours.
|
|
27
27
|
*/
|
|
28
|
-
export type ProgressBarTone =
|
|
29
|
-
| "brand"
|
|
30
|
-
| "neutral"
|
|
31
|
-
| "success"
|
|
32
|
-
| "warning"
|
|
33
|
-
| "danger"
|
|
34
|
-
| "info"
|
|
35
|
-
| "income"
|
|
36
|
-
| "expense";
|
|
28
|
+
export type ProgressBarTone = "brand" | "neutral" | "success" | "warning" | "danger" | "info" | "income" | "expense";
|
|
37
29
|
/**
|
|
38
30
|
* Track heights: `sm` 4px, `slim` 6px, `md` 8px, `lg` 12px. `slim` is a word and not a
|
|
39
31
|
* letter because the letters are taken in order — an `xs` at 6px would be THICKER than
|
|
@@ -340,8 +332,7 @@ export function ProgressBar({
|
|
|
340
332
|
: text;
|
|
341
333
|
})
|
|
342
334
|
: [];
|
|
343
|
-
const current =
|
|
344
|
-
partTotal ?? (value === undefined || !Number.isFinite(value) ? (meter ? min : undefined) : value);
|
|
335
|
+
const current = partTotal ?? (value === undefined || !Number.isFinite(value) ? (meter ? min : undefined) : value);
|
|
345
336
|
const indeterminate = current === undefined;
|
|
346
337
|
const clamped = indeterminate ? undefined : Math.min(max, Math.max(min, current));
|
|
347
338
|
const fraction = clamped === undefined || span <= 0 ? 0 : (clamped - min) / span;
|
|
@@ -352,14 +343,11 @@ export function ProgressBar({
|
|
|
352
343
|
? new Intl.ListFormat(kitLocale, { style: "short", type: "unit" }).format(partTexts)
|
|
353
344
|
: valueText;
|
|
354
345
|
|
|
355
|
-
const over =
|
|
356
|
-
overage && !stacked && value !== undefined && Number.isFinite(value) && value > max ? value - max : 0;
|
|
346
|
+
const over = overage && !stacked && value !== undefined && Number.isFinite(value) && value > max ? value - max : 0;
|
|
357
347
|
const overageNode =
|
|
358
348
|
over > 0 ? (
|
|
359
349
|
<p id={`${hintId}-over`} data-part="overage" data-private={priv} className="mt-1 text-xs text-danger">
|
|
360
|
-
{typeof overage === "function"
|
|
361
|
-
? overage(over)
|
|
362
|
-
: text.overLimit(new Intl.NumberFormat(kitLocale).format(over))}
|
|
350
|
+
{typeof overage === "function" ? overage(over) : text.overLimit(new Intl.NumberFormat(kitLocale).format(over))}
|
|
363
351
|
</p>
|
|
364
352
|
) : null;
|
|
365
353
|
const describedBy =
|
|
@@ -380,7 +368,12 @@ export function ProgressBar({
|
|
|
380
368
|
{showValue && valueText !== undefined && (
|
|
381
369
|
// Hidden: the same words are the bar's aria-valuetext, and reading them
|
|
382
370
|
// twice in a row is noise.
|
|
383
|
-
<span
|
|
371
|
+
<span
|
|
372
|
+
aria-hidden
|
|
373
|
+
data-part="value"
|
|
374
|
+
data-private={priv}
|
|
375
|
+
className="ms-auto shrink-0 tabular-nums text-muted"
|
|
376
|
+
>
|
|
384
377
|
{valueText}
|
|
385
378
|
</span>
|
|
386
379
|
)}
|
|
@@ -443,7 +436,10 @@ export function ProgressBar({
|
|
|
443
436
|
data-part="fill"
|
|
444
437
|
// Block flow starts at the inline start, so a plain width fills from the
|
|
445
438
|
// right under `dir="rtl"` with nothing extra.
|
|
446
|
-
className={cn(
|
|
439
|
+
className={cn(
|
|
440
|
+
"h-full rounded-full transition-[width] duration-300 motion-reduce:transition-none",
|
|
441
|
+
FILL[tone],
|
|
442
|
+
)}
|
|
447
443
|
style={{ width: `${fraction * 100}%` }}
|
|
448
444
|
/>
|
|
449
445
|
)}
|
|
@@ -454,10 +450,7 @@ export function ProgressBar({
|
|
|
454
450
|
<li key={seg.key ?? i} className="flex items-center gap-2">
|
|
455
451
|
<span
|
|
456
452
|
aria-hidden
|
|
457
|
-
className={cn(
|
|
458
|
-
"size-2.5 shrink-0 rounded-sm",
|
|
459
|
-
fills[i],
|
|
460
|
-
)}
|
|
453
|
+
className={cn("size-2.5 shrink-0 rounded-sm", fills[i])}
|
|
461
454
|
style={{ backgroundColor: seg.className ? undefined : seg.color }}
|
|
462
455
|
/>
|
|
463
456
|
{seg.label != null && (
|
|
@@ -470,9 +463,7 @@ export function ProgressBar({
|
|
|
470
463
|
data-private={priv}
|
|
471
464
|
className={cn(
|
|
472
465
|
"ms-auto shrink-0 text-xs tabular-nums",
|
|
473
|
-
toneTextClass(
|
|
474
|
-
(typeof legendTone === "function" ? legendTone(seg, i) : legendTone) ?? "muted",
|
|
475
|
-
),
|
|
466
|
+
toneTextClass((typeof legendTone === "function" ? legendTone(seg, i) : legendTone) ?? "muted"),
|
|
476
467
|
)}
|
|
477
468
|
>
|
|
478
469
|
{legendValue ? legendValue(seg, formatPart(seg.value), i) : formatPart(seg.value)}
|
|
@@ -32,14 +32,7 @@ export interface QrCodeProps extends Omit<ComponentPropsWithRef<"svg">, "childre
|
|
|
32
32
|
* A value too long for any QR version (≈2.9 kB) renders nothing rather than throwing
|
|
33
33
|
* in render.
|
|
34
34
|
*/
|
|
35
|
-
export function QrCode({
|
|
36
|
-
value,
|
|
37
|
-
label,
|
|
38
|
-
errorCorrection = "M",
|
|
39
|
-
margin = 4,
|
|
40
|
-
className,
|
|
41
|
-
...rest
|
|
42
|
-
}: QrCodeProps) {
|
|
35
|
+
export function QrCode({ value, label, errorCorrection = "M", margin = 4, className, ...rest }: QrCodeProps) {
|
|
43
36
|
const path = useMemo(() => {
|
|
44
37
|
try {
|
|
45
38
|
const { modules, size } = encodeQr(value, { errorCorrection });
|
|
@@ -47,7 +40,7 @@ export function QrCode({
|
|
|
47
40
|
// commands rather than one <rect> per module.
|
|
48
41
|
let d = "";
|
|
49
42
|
for (let y = 0; y < size; y++) {
|
|
50
|
-
for (let x = 0; x < size;
|
|
43
|
+
for (let x = 0; x < size;) {
|
|
51
44
|
if (!modules[y][x]) {
|
|
52
45
|
x++;
|
|
53
46
|
continue;
|
|
@@ -471,7 +471,15 @@ function useActionHref(action: RowAction): string | undefined {
|
|
|
471
471
|
}
|
|
472
472
|
|
|
473
473
|
/** One entry of the "⋯" menu: the words, as a link for an `href`, else a button. */
|
|
474
|
-
function MenuAction({
|
|
474
|
+
function MenuAction({
|
|
475
|
+
action,
|
|
476
|
+
close,
|
|
477
|
+
run,
|
|
478
|
+
}: {
|
|
479
|
+
action: RowAction;
|
|
480
|
+
close: () => void;
|
|
481
|
+
run: (action: RowAction) => void;
|
|
482
|
+
}) {
|
|
475
483
|
const href = useActionHref(action);
|
|
476
484
|
const glyph = glyphOf(action.icon);
|
|
477
485
|
const glyphTone = action.tone === undefined ? undefined : MENU_GLYPH_TONE[action.tone];
|
|
@@ -6,11 +6,10 @@ import { FIELD_BASE, FIELD_TOUCH_TEXT } from "./field-base";
|
|
|
6
6
|
import { mergeRefs } from "./field-parts";
|
|
7
7
|
import { DEFAULT_COMMON_LABELS, useKitLabels } from "../i18n/kit-labels";
|
|
8
8
|
|
|
9
|
-
interface SearchFieldOwnProps
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
> {
|
|
9
|
+
interface SearchFieldOwnProps extends Omit<
|
|
10
|
+
InputHTMLAttributes<HTMLInputElement>,
|
|
11
|
+
"value" | "onChange" | "type" | "aria-label"
|
|
12
|
+
> {
|
|
14
13
|
value: string;
|
|
15
14
|
/** The typed text. Emitted as a plain string, not an event: every caller of the
|
|
16
15
|
* four this replaced wanted the string, and one of them held it in a URL param
|
|
@@ -157,9 +157,7 @@ export function Select(props: SelectProps) {
|
|
|
157
157
|
// account type became read-only and still looked exactly like a picker). A locked
|
|
158
158
|
// one has no menu either.
|
|
159
159
|
const chevron =
|
|
160
|
-
rest.disabled || listBox || locked ? null :
|
|
161
|
-
<FieldChevron className={small ? "end-1.5 size-3.5" : undefined} />
|
|
162
|
-
);
|
|
160
|
+
rest.disabled || listBox || locked ? null : <FieldChevron className={small ? "end-1.5 size-3.5" : undefined} />;
|
|
163
161
|
// `pe-9` is the room the chevron takes; a list box has none to make room for.
|
|
164
162
|
//
|
|
165
163
|
// A list box's height is `size` rows plus its padding, but its rows are clipped at
|
|
@@ -263,13 +261,7 @@ export function Select(props: SelectProps) {
|
|
|
263
261
|
return (
|
|
264
262
|
<FieldGroup errorEl={below} reserve={reserve}>
|
|
265
263
|
{withReason(
|
|
266
|
-
<FloatingField
|
|
267
|
-
className={boxClass}
|
|
268
|
-
htmlFor={fieldId}
|
|
269
|
-
label={label}
|
|
270
|
-
staticLabel
|
|
271
|
-
hint={hint}
|
|
272
|
-
>
|
|
264
|
+
<FloatingField className={boxClass} htmlFor={fieldId} label={label} staticLabel hint={hint}>
|
|
273
265
|
<select
|
|
274
266
|
ref={ref}
|
|
275
267
|
id={fieldId}
|
|
@@ -27,11 +27,7 @@ export function Separator({ orientation = "horizontal", decorative = false, clas
|
|
|
27
27
|
role={decorative ? "none" : "separator"}
|
|
28
28
|
aria-orientation={!decorative && vertical ? "vertical" : undefined}
|
|
29
29
|
data-orientation={orientation}
|
|
30
|
-
className={cn(
|
|
31
|
-
"shrink-0 bg-[var(--border)]",
|
|
32
|
-
vertical ? "w-px self-stretch" : "h-px w-full",
|
|
33
|
-
className,
|
|
34
|
-
)}
|
|
30
|
+
className={cn("shrink-0 bg-[var(--border)]", vertical ? "w-px self-stretch" : "h-px w-full", className)}
|
|
35
31
|
/>
|
|
36
32
|
);
|
|
37
33
|
}
|
|
@@ -59,7 +59,10 @@ export function tiltedTickBand(labels: readonly string[], angle: number, scale =
|
|
|
59
59
|
const rad = (Math.abs(angle) * Math.PI) / 180;
|
|
60
60
|
const longest = Math.max(0, ...labels.map((label) => label.length)) * TICK_CHAR_WIDTH * scale;
|
|
61
61
|
const band = Math.sin(rad) * longest + Math.cos(rad) * TICK_LINE_HEIGHT * scale + TICK_GAP;
|
|
62
|
-
return Math.min(
|
|
62
|
+
return Math.min(
|
|
63
|
+
Math.round(MAX_TILTED_TICK_BAND * scale),
|
|
64
|
+
Math.max(Math.ceil(LEVEL_TICK_BAND * scale), Math.ceil(band)),
|
|
65
|
+
);
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
/** The width the ticks of a y axis get when a caller does not say, in px at Normal. */
|
|
@@ -201,10 +204,7 @@ export function anchoredBand(extent: readonly [number, number] | undefined): [nu
|
|
|
201
204
|
* it in its neighbour's colour on each click. Resolving the colours on the full list
|
|
202
205
|
* and filtering after keeps each series in the colour its legend entry shows.
|
|
203
206
|
*/
|
|
204
|
-
export function visibleSeries(
|
|
205
|
-
series: readonly SeriesChartSeries[],
|
|
206
|
-
hidden: ReadonlySet<string>,
|
|
207
|
-
): SeriesChartSeries[] {
|
|
207
|
+
export function visibleSeries(series: readonly SeriesChartSeries[], hidden: ReadonlySet<string>): SeriesChartSeries[] {
|
|
208
208
|
return series
|
|
209
209
|
.map((entry, index) => ({ ...entry, color: entry.color ?? paletteFor(index) }))
|
|
210
210
|
.filter((entry) => !hidden.has(entry.key));
|
|
@@ -59,10 +59,7 @@ const sideOf = (axis: BudgetAxis) => axis.orientation ?? "left";
|
|
|
59
59
|
* stays), then the rest in declaration order, until the cap. Per side, that is simply the
|
|
60
60
|
* first `left` left-hand axes and the first `right` right-hand ones.
|
|
61
61
|
*/
|
|
62
|
-
export function budgetedAxes(
|
|
63
|
-
axes: readonly BudgetAxis[],
|
|
64
|
-
budget: SeriesChartAxisBudget | undefined,
|
|
65
|
-
): string[] {
|
|
62
|
+
export function budgetedAxes(axes: readonly BudgetAxis[], budget: SeriesChartAxisBudget | undefined): string[] {
|
|
66
63
|
if (budget === undefined) return [];
|
|
67
64
|
const visible = axes.filter((axis) => !axis.hide);
|
|
68
65
|
if (typeof budget === "number") {
|
|
@@ -90,10 +90,7 @@ export function integerTicks(
|
|
|
90
90
|
* third to ninth month. A tick belongs on every whole slot inside it, and on nothing in
|
|
91
91
|
* between: there is no month 2.5. Recharts' `minTickGap` thins them where they crowd.
|
|
92
92
|
*/
|
|
93
|
-
export function categoryTicks(
|
|
94
|
-
domain: readonly [number, number] | undefined,
|
|
95
|
-
count: number,
|
|
96
|
-
): number[] | undefined {
|
|
93
|
+
export function categoryTicks(domain: readonly [number, number] | undefined, count: number): number[] | undefined {
|
|
97
94
|
if (!domain || !(count > 0)) return undefined;
|
|
98
95
|
const first = Math.max(0, Math.ceil(domain[0] - 1e-6));
|
|
99
96
|
const last = Math.min(count - 1, Math.floor(domain[1] + 1e-6));
|