@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
|
@@ -52,16 +52,7 @@ export { DEFAULT_STAT_TILE_LABELS };
|
|
|
52
52
|
* below 30°"). Say it in the hint or description as well; colour alone is not one.
|
|
53
53
|
*/
|
|
54
54
|
export type StatTileTone =
|
|
55
|
-
| "
|
|
56
|
-
| "brand"
|
|
57
|
-
| "income"
|
|
58
|
-
| "expense"
|
|
59
|
-
| "net"
|
|
60
|
-
| "signed"
|
|
61
|
-
| "success"
|
|
62
|
-
| "warning"
|
|
63
|
-
| "danger"
|
|
64
|
-
| "info";
|
|
55
|
+
"neutral" | "brand" | "income" | "expense" | "net" | "signed" | "success" | "warning" | "danger" | "info";
|
|
65
56
|
|
|
66
57
|
const TONE_CLASS: Record<Exclude<StatTileTone, "signed">, string> = {
|
|
67
58
|
neutral: "text-primary",
|
|
@@ -124,8 +115,7 @@ export interface StatTileLinkProps {
|
|
|
124
115
|
* one to scroll into view or measure. `ComponentPropsWithoutRef` only kept it out of the
|
|
125
116
|
* type; at runtime `{...rest}` already carried it there.
|
|
126
117
|
*/
|
|
127
|
-
export interface StatTileProps
|
|
128
|
-
extends Omit<ComponentPropsWithRef<"div">, "children" | "onClick"> {
|
|
118
|
+
export interface StatTileProps extends Omit<ComponentPropsWithRef<"div">, "children" | "onClick"> {
|
|
129
119
|
/** What is measured. Also the tile's accessible name when it is a link/button. */
|
|
130
120
|
label: ReactNode;
|
|
131
121
|
/**
|
|
@@ -435,7 +425,11 @@ export function StatTile({
|
|
|
435
425
|
// `relative`: the containing block for the sr-only sentence (see the
|
|
436
426
|
// sr-only-containment test for what an escaped one does to the page).
|
|
437
427
|
<div className="relative mt-1 flex flex-wrap items-center gap-x-1.5 text-xs tabular-nums">
|
|
438
|
-
<span
|
|
428
|
+
<span
|
|
429
|
+
id={deltaId}
|
|
430
|
+
data-private={priv}
|
|
431
|
+
className={cn("inline-flex items-center gap-0.5 font-medium", deltaTone)}
|
|
432
|
+
>
|
|
439
433
|
<Icon className="size-3 shrink-0" aria-hidden />
|
|
440
434
|
{/* The figure at zero too, like Delta (kastlan 48): "0 %" says the change was
|
|
441
435
|
measured; a bare dash reads like a missing value. */}
|
|
@@ -448,11 +442,7 @@ export function StatTile({
|
|
|
448
442
|
}
|
|
449
443
|
|
|
450
444
|
// ── Headline ──
|
|
451
|
-
const valueClass = cn(
|
|
452
|
-
"whitespace-nowrap font-semibold tabular-nums",
|
|
453
|
-
VALUE_TEXT[size],
|
|
454
|
-
toneClass(tone, value),
|
|
455
|
-
);
|
|
445
|
+
const valueClass = cn("whitespace-nowrap font-semibold tabular-nums", VALUE_TEXT[size], toneClass(tone, value));
|
|
456
446
|
const headline = loading ? (
|
|
457
447
|
<span id={valueId} className="relative block py-0.5">
|
|
458
448
|
<span aria-hidden className={cn(SKELETON_CLASS, "block h-6 w-24 max-w-full")} />
|
|
@@ -461,9 +451,7 @@ export function StatTile({
|
|
|
461
451
|
) : hasValue ? (
|
|
462
452
|
<span id={valueId} data-private={priv} className={cn(valueClass, valueLabel != null && !large && "ms-auto")}>
|
|
463
453
|
{show(value)}
|
|
464
|
-
{unit != null &&
|
|
465
|
-
<span className="ms-1 text-[0.7em] font-medium text-muted">{unit}</span>
|
|
466
|
-
)}
|
|
454
|
+
{unit != null && <span className="ms-1 text-[0.7em] font-medium text-muted">{unit}</span>}
|
|
467
455
|
</span>
|
|
468
456
|
) : (
|
|
469
457
|
<span id={valueId} className={cn("relative", valueClass, "text-muted")}>
|
|
@@ -472,8 +460,9 @@ export function StatTile({
|
|
|
472
460
|
</span>
|
|
473
461
|
);
|
|
474
462
|
|
|
475
|
-
const graphic =
|
|
476
|
-
|
|
463
|
+
const graphic = loading
|
|
464
|
+
? null
|
|
465
|
+
: (sparkline ??
|
|
477
466
|
(trend && (
|
|
478
467
|
<Sparkline
|
|
479
468
|
data={trend}
|
|
@@ -485,7 +474,7 @@ export function StatTile({
|
|
|
485
474
|
tone={tone === "signed" ? "signed" : tone === "neutral" ? "chart" : tone}
|
|
486
475
|
data-private={priv}
|
|
487
476
|
/>
|
|
488
|
-
));
|
|
477
|
+
)));
|
|
489
478
|
|
|
490
479
|
return (
|
|
491
480
|
<Card
|
|
@@ -62,8 +62,7 @@ export interface SwatchOption<T extends string> {
|
|
|
62
62
|
* is omitted rather than shadowed, as on {@link ToggleGroup}.
|
|
63
63
|
*/
|
|
64
64
|
export interface SwatchPickerProps<T extends string>
|
|
65
|
-
extends Omit<ComponentPropsWithRef<"div">, "onChange" | "children" | "defaultValue">,
|
|
66
|
-
FieldHelpProps {
|
|
65
|
+
extends Omit<ComponentPropsWithRef<"div">, "onChange" | "children" | "defaultValue">, FieldHelpProps {
|
|
67
66
|
options: SwatchOption<T>[];
|
|
68
67
|
/** The chosen colour, or `null` for none. */
|
|
69
68
|
value: T | null;
|
|
@@ -270,7 +269,13 @@ export function SwatchPicker<T extends string>({
|
|
|
270
269
|
);
|
|
271
270
|
if (!labelled) return group;
|
|
272
271
|
return (
|
|
273
|
-
<LabelStrip
|
|
272
|
+
<LabelStrip
|
|
273
|
+
labelId={labelId}
|
|
274
|
+
label={label}
|
|
275
|
+
hint={messages.labelHint}
|
|
276
|
+
disabled={disabled || locked}
|
|
277
|
+
className={className}
|
|
278
|
+
>
|
|
274
279
|
{group}
|
|
275
280
|
{messages.below}
|
|
276
281
|
</LabelStrip>
|
|
@@ -192,14 +192,7 @@ const PEEK_PX = 40;
|
|
|
192
192
|
* the eye and not from the accessibility tree, so the row also ANNOUNCES what can be
|
|
193
193
|
* done to it rather than keeping it behind a gesture nobody can hear.
|
|
194
194
|
*/
|
|
195
|
-
export function SwipeableRow({
|
|
196
|
-
right,
|
|
197
|
-
left,
|
|
198
|
-
enabled = true,
|
|
199
|
-
actionsLabel,
|
|
200
|
-
className,
|
|
201
|
-
children,
|
|
202
|
-
}: SwipeableRowProps) {
|
|
195
|
+
export function SwipeableRow({ right, left, enabled = true, actionsLabel, className, children }: SwipeableRowProps) {
|
|
203
196
|
const labels = useKitLabels("swipeableRow", DEFAULT_SWIPEABLE_ROW_LABELS, {
|
|
204
197
|
actions: actionsLabel,
|
|
205
198
|
});
|
|
@@ -309,9 +302,7 @@ export function SwipeableRow({
|
|
|
309
302
|
{shown.icon}
|
|
310
303
|
</span>
|
|
311
304
|
)}
|
|
312
|
-
<span className={cn("truncate transition-all", armed && "text-sm font-semibold")}>
|
|
313
|
-
{shown.label}
|
|
314
|
-
</span>
|
|
305
|
+
<span className={cn("truncate transition-all", armed && "text-sm font-semibold")}>{shown.label}</span>
|
|
315
306
|
</div>
|
|
316
307
|
)}
|
|
317
308
|
<div
|
|
@@ -70,7 +70,10 @@ export function TableSkeleton({
|
|
|
70
70
|
) : (
|
|
71
71
|
<div
|
|
72
72
|
key={key}
|
|
73
|
-
className={cn(
|
|
73
|
+
className={cn(
|
|
74
|
+
"flex items-center gap-4 px-4 py-3",
|
|
75
|
+
stack && "max-sm:flex-col max-sm:items-stretch max-sm:gap-2",
|
|
76
|
+
)}
|
|
74
77
|
data-skeleton-row=""
|
|
75
78
|
>
|
|
76
79
|
<Skeleton className={cn("h-4", NAME_WIDTHS[key % NAME_WIDTHS.length])} />
|
package/src/components/table.tsx
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
Children,
|
|
3
|
+
createContext,
|
|
4
|
+
useCallback,
|
|
5
|
+
useContext,
|
|
6
|
+
useId,
|
|
7
|
+
useLayoutEffect,
|
|
8
|
+
useMemo,
|
|
9
|
+
useRef,
|
|
10
|
+
useState,
|
|
11
|
+
} from "react";
|
|
2
12
|
import type { ComponentPropsWithRef, ReactNode, Ref } from "react";
|
|
3
13
|
import { cn } from "../lib/cn";
|
|
4
14
|
import { useEdgeFade } from "../lib/strip-fade";
|
|
@@ -633,11 +643,5 @@ export type TableCaptionProps = ComponentPropsWithRef<"caption">;
|
|
|
633
643
|
export function TableCaption({ className, id, ...rest }: TableCaptionProps) {
|
|
634
644
|
const { captionId, registerCaption } = useContext(TableContext);
|
|
635
645
|
useLayoutEffect(() => (id ? undefined : registerCaption()), [id, registerCaption]);
|
|
636
|
-
return (
|
|
637
|
-
<caption
|
|
638
|
-
{...rest}
|
|
639
|
-
id={id ?? captionId}
|
|
640
|
-
className={cn("mt-2 text-start text-sm text-muted", className)}
|
|
641
|
-
/>
|
|
642
|
-
);
|
|
646
|
+
return <caption {...rest} id={id ?? captionId} className={cn("mt-2 text-start text-sm text-muted", className)} />;
|
|
643
647
|
}
|
package/src/components/tabs.tsx
CHANGED
|
@@ -66,8 +66,7 @@ export { DEFAULT_TABS_LABELS };
|
|
|
66
66
|
* `children` because the strip renders `tabs` — a caller who wants a PANEL wires it up
|
|
67
67
|
* through `panelId`, which is the whole point of that prop.
|
|
68
68
|
*/
|
|
69
|
-
export interface TabsProps<T extends string>
|
|
70
|
-
extends Omit<ComponentPropsWithoutRef<"div">, "onChange" | "children"> {
|
|
69
|
+
export interface TabsProps<T extends string> extends Omit<ComponentPropsWithoutRef<"div">, "onChange" | "children"> {
|
|
71
70
|
/** `label` is a ReactNode so tabs can pair an icon with text; `badge` is an
|
|
72
71
|
* optional trailing node (e.g. a count pill). `href` marks a tab that IS a route:
|
|
73
72
|
* it renders as an anchor so it can be middle-/⌘-clicked into a new tab (Keksdose
|
|
@@ -200,8 +199,7 @@ export interface TabsProps<T extends string>
|
|
|
200
199
|
ref?: Ref<HTMLDivElement>;
|
|
201
200
|
}
|
|
202
201
|
|
|
203
|
-
const TABLIST_CLASSES =
|
|
204
|
-
"flex gap-1 overflow-x-auto overflow-y-hidden border-b border-subtle";
|
|
202
|
+
const TABLIST_CLASSES = "flex gap-1 overflow-x-auto overflow-y-hidden border-b border-subtle";
|
|
205
203
|
// The side nav. A column of full-width rows with the open one FILLED rather than
|
|
206
204
|
// underlined: an underline under one row of a list reads as a separator, not as a
|
|
207
205
|
// selection. `--bg-active` is the kit's own selected-row fill (the sidebar's), so the
|
|
@@ -211,8 +209,7 @@ const TAB_VERTICAL_CLASSES =
|
|
|
211
209
|
FOCUS_RING_WIDTH +
|
|
212
210
|
" flex w-full items-center rounded-md px-3 py-2 text-start text-sm font-medium transition-colors focus:outline-none focus-visible:ring-strong";
|
|
213
211
|
const TAB_VERTICAL_ACTIVE_CLASSES = "bg-active text-primary";
|
|
214
|
-
const TAB_VERTICAL_INACTIVE_CLASSES =
|
|
215
|
-
"text-muted hover:bg-hover hover:text-primary";
|
|
212
|
+
const TAB_VERTICAL_INACTIVE_CLASSES = "text-muted hover:bg-hover hover:text-primary";
|
|
216
213
|
|
|
217
214
|
// `max-w-full`: no tab outgrows its strip. A sheet's `detail` line ("Spurstangenkraft
|
|
218
215
|
// links · … · 31 Punkte") made one tab 448px wide in a 390px strip, and a tab wider
|
|
@@ -222,8 +219,7 @@ const TAB_CLASSES =
|
|
|
222
219
|
FOCUS_RING_WIDTH +
|
|
223
220
|
" max-w-full whitespace-nowrap px-3 py-2 text-sm font-medium transition-colors border-b-2 -mb-px focus:outline-none focus-visible:ring-strong";
|
|
224
221
|
const TAB_ACTIVE_CLASSES = "border-[var(--text-primary)] text-primary";
|
|
225
|
-
const TAB_INACTIVE_CLASSES =
|
|
226
|
-
"border-transparent text-muted hover:text-secondary hover:border-strong";
|
|
222
|
+
const TAB_INACTIVE_CLASSES = "border-transparent text-muted hover:text-secondary hover:border-strong";
|
|
227
223
|
|
|
228
224
|
// The add/remove chrome. The × reserves its gutter on every removable tab (see
|
|
229
225
|
// `onRemove`).
|
|
@@ -321,7 +317,11 @@ export function Tabs<T extends string>({
|
|
|
321
317
|
labelVisible={false}
|
|
322
318
|
onClick={() => onCue(side)}
|
|
323
319
|
>
|
|
324
|
-
{side === "start" ?
|
|
320
|
+
{side === "start" ? (
|
|
321
|
+
<ChevronLeft className="rtl:-scale-x-100" />
|
|
322
|
+
) : (
|
|
323
|
+
<ChevronRight className="rtl:-scale-x-100" />
|
|
324
|
+
)}
|
|
325
325
|
</IconButton>
|
|
326
326
|
</div>
|
|
327
327
|
)}
|
|
@@ -340,10 +340,8 @@ export function Tabs<T extends string>({
|
|
|
340
340
|
}, [active]);
|
|
341
341
|
const isRemovable = (tab: TabItem<T>) => onRemove !== undefined && tab.removable !== false;
|
|
342
342
|
// Whether Delete reaches this tab: every removable tab, or only the open one.
|
|
343
|
-
const deletesOnKey = (tab: TabItem<T>) =>
|
|
344
|
-
|
|
345
|
-
const nameOf = (tab: TabItem<T>) =>
|
|
346
|
-
tab.name ?? (typeof tab.label === "string" ? tab.label : tab.id);
|
|
343
|
+
const deletesOnKey = (tab: TabItem<T>) => isRemovable(tab) && (removeOn === "every" || tab.id === active);
|
|
344
|
+
const nameOf = (tab: TabItem<T>) => tab.name ?? (typeof tab.label === "string" ? tab.label : tab.id);
|
|
347
345
|
|
|
348
346
|
// Where focus goes once a removal the strip asked for has happened. The caller
|
|
349
347
|
// owns `tabs` and may take its time (a confirmation, a request), so this waits
|
|
@@ -372,10 +370,7 @@ export function Tabs<T extends string>({
|
|
|
372
370
|
if (focused && focused !== document.body && !strip.contains(focused) && focused !== removeRef.current) return;
|
|
373
371
|
// The removed tab was open: focus follows the caller's new selection, which is
|
|
374
372
|
// also the strip's tab stop. It was not: its neighbour, as the ARIA pattern has it.
|
|
375
|
-
const target =
|
|
376
|
-
!pending.wasActive && tabs.some((t) => t.id === pending.neighbour)
|
|
377
|
-
? pending.neighbour
|
|
378
|
-
: active;
|
|
373
|
+
const target = !pending.wasActive && tabs.some((t) => t.id === pending.neighbour) ? pending.neighbour : active;
|
|
379
374
|
const index = tabs.findIndex((t) => t.id === target);
|
|
380
375
|
strip.querySelectorAll<HTMLElement>('[role="tab"]')[index]?.focus();
|
|
381
376
|
}, [tabs, active]);
|
|
@@ -419,12 +414,7 @@ export function Tabs<T extends string>({
|
|
|
419
414
|
const from = items.indexOf(e.currentTarget);
|
|
420
415
|
if (from === -1) return;
|
|
421
416
|
e.preventDefault();
|
|
422
|
-
const to =
|
|
423
|
-
e.key === "Home"
|
|
424
|
-
? 0
|
|
425
|
-
: e.key === "End"
|
|
426
|
-
? items.length - 1
|
|
427
|
-
: (from + step + items.length) % items.length;
|
|
417
|
+
const to = e.key === "Home" ? 0 : e.key === "End" ? items.length - 1 : (from + step + items.length) % items.length;
|
|
428
418
|
items[to]?.focus();
|
|
429
419
|
};
|
|
430
420
|
const tablist = (
|
|
@@ -485,18 +475,16 @@ export function Tabs<T extends string>({
|
|
|
485
475
|
isActive ? TAB_VERTICAL_ACTIVE_CLASSES : TAB_VERTICAL_INACTIVE_CLASSES,
|
|
486
476
|
removable && "pe-8",
|
|
487
477
|
)
|
|
488
|
-
: cn(
|
|
489
|
-
TAB_CLASSES,
|
|
490
|
-
isActive ? TAB_ACTIVE_CLASSES : TAB_INACTIVE_CLASSES,
|
|
491
|
-
removable && TAB_REMOVABLE_CLASSES,
|
|
492
|
-
),
|
|
478
|
+
: cn(TAB_CLASSES, isActive ? TAB_ACTIVE_CLASSES : TAB_INACTIVE_CLASSES, removable && TAB_REMOVABLE_CLASSES),
|
|
493
479
|
};
|
|
494
480
|
const inner = (
|
|
495
481
|
<span
|
|
496
482
|
className={cn(
|
|
497
483
|
// In a side nav the row is the full width, so the label takes it and a
|
|
498
484
|
// badge lands at the row's end, where a column of counts lines up.
|
|
499
|
-
vertical
|
|
485
|
+
vertical
|
|
486
|
+
? "flex min-w-0 flex-1 items-center gap-1.5"
|
|
487
|
+
: "inline-flex max-w-full min-w-0 items-center gap-1.5",
|
|
500
488
|
tab.empty && TAB_EMPTY_CLASSES,
|
|
501
489
|
)}
|
|
502
490
|
>
|
|
@@ -523,7 +511,11 @@ export function Tabs<T extends string>({
|
|
|
523
511
|
tab.label
|
|
524
512
|
)}
|
|
525
513
|
{tab.badge != null ? (
|
|
526
|
-
vertical ?
|
|
514
|
+
vertical ? (
|
|
515
|
+
<span className="ms-auto flex shrink-0 items-center">{tab.badge}</span>
|
|
516
|
+
) : (
|
|
517
|
+
tab.badge
|
|
518
|
+
)
|
|
527
519
|
) : null}
|
|
528
520
|
</span>
|
|
529
521
|
);
|
|
@@ -671,15 +663,8 @@ export function Tabs<T extends string>({
|
|
|
671
663
|
{removeButton}
|
|
672
664
|
{/* Outside the tablist: an action, not a tab — and a tablist may own only
|
|
673
665
|
tabs. The rule under the strip carries on beneath it. */}
|
|
674
|
-
<div
|
|
675
|
-
|
|
676
|
-
>
|
|
677
|
-
<button
|
|
678
|
-
type="button"
|
|
679
|
-
onClick={onAdd}
|
|
680
|
-
disabled={busy}
|
|
681
|
-
className={cn(TAB_ADD_CLASSES, TAB_ADD_PHONE_CLASSES)}
|
|
682
|
-
>
|
|
666
|
+
<div className="flex flex-1 items-center self-stretch border-b border-subtle">
|
|
667
|
+
<button type="button" onClick={onAdd} disabled={busy} className={cn(TAB_ADD_CLASSES, TAB_ADD_PHONE_CLASSES)}>
|
|
683
668
|
<Plus aria-hidden />
|
|
684
669
|
{/* Below md a scrolling strip keeps the room for tabs: the label is visually
|
|
685
670
|
hidden and the "+" carries it as its name. Beside "+ Add loop" a 390px strip
|
|
@@ -177,8 +177,10 @@ export interface TextLinkRenderProps {
|
|
|
177
177
|
[key: `data-${string}`]: unknown;
|
|
178
178
|
}
|
|
179
179
|
|
|
180
|
-
export interface TextLinkProps
|
|
181
|
-
|
|
180
|
+
export interface TextLinkProps extends Omit<
|
|
181
|
+
ComponentPropsWithoutRef<"a">,
|
|
182
|
+
"href" | "children" | "aria-current" | "onClick" | "onKeyDown"
|
|
183
|
+
> {
|
|
182
184
|
href: string;
|
|
183
185
|
children: ReactNode;
|
|
184
186
|
/** Default `brand`. */
|
|
@@ -285,8 +287,7 @@ export function TextLink({
|
|
|
285
287
|
const common = useKitLabels("common", DEFAULT_COMMON_LABELS);
|
|
286
288
|
const kitLink = useKitLink();
|
|
287
289
|
const underline = underlineProp ?? (UNDERLINED_BY_DEFAULT.has(tone) ? "always" : "hover");
|
|
288
|
-
const ariaCurrent: TextLinkCurrent | undefined =
|
|
289
|
-
current === true ? "page" : current === false ? undefined : current;
|
|
290
|
+
const ariaCurrent: TextLinkCurrent | undefined = current === true ? "page" : current === false ? undefined : current;
|
|
290
291
|
|
|
291
292
|
const look = cn(
|
|
292
293
|
"rounded-sm underline-offset-2 transition-colors",
|
|
@@ -303,8 +304,7 @@ export function TextLink({
|
|
|
303
304
|
{children}
|
|
304
305
|
{external && (
|
|
305
306
|
<>
|
|
306
|
-
<ExternalLink aria-hidden className="ms-1 inline size-[0.85em] align-[-0.1em] rtl:-scale-x-100" />
|
|
307
|
-
{" "}
|
|
307
|
+
<ExternalLink aria-hidden className="ms-1 inline size-[0.85em] align-[-0.1em] rtl:-scale-x-100" />{" "}
|
|
308
308
|
<span className="sr-only">({common.opensInNewTab})</span>
|
|
309
309
|
</>
|
|
310
310
|
)}
|
package/src/components/text.tsx
CHANGED
|
@@ -69,8 +69,7 @@ const SECTION_LABEL_BAND_CLASS: Record<SectionLabelSize, string> = {
|
|
|
69
69
|
md: "text-caption",
|
|
70
70
|
sm: "text-xs",
|
|
71
71
|
};
|
|
72
|
-
const BAND =
|
|
73
|
-
"block border-b border-subtle bg-surface-2 px-4 py-2 font-medium uppercase tracking-wide text-secondary";
|
|
72
|
+
const BAND = "block border-b border-subtle bg-surface-2 px-4 py-2 font-medium uppercase tracking-wide text-secondary";
|
|
74
73
|
|
|
75
74
|
type SectionLabelElement = "h2" | "h3" | "h4" | "h5" | "h6" | "p" | "span" | "div" | "legend";
|
|
76
75
|
|
|
@@ -138,10 +138,8 @@ const TILE_BASE =
|
|
|
138
138
|
FOCUS_RING +
|
|
139
139
|
" focus-visible:ring-offset-2 focus-visible:ring-offset-surface " +
|
|
140
140
|
"disabled:cursor-not-allowed disabled:opacity-50";
|
|
141
|
-
const TILE_IDLE =
|
|
142
|
-
|
|
143
|
-
const TILE_SELECTED =
|
|
144
|
-
"border-[var(--text-primary)] bg-surface ring-1 ring-[var(--text-primary)]";
|
|
141
|
+
const TILE_IDLE = "border-subtle bg-surface hover:border-strong hover:bg-hover";
|
|
142
|
+
const TILE_SELECTED = "border-[var(--text-primary)] bg-surface ring-1 ring-[var(--text-primary)]";
|
|
145
143
|
/** A locked tile: the disabled look without `disabled` — dimmed, a not-allowed cursor. */
|
|
146
144
|
const TILE_LOCKED = "cursor-not-allowed opacity-50";
|
|
147
145
|
/** …and no hover offer on an idle one, which cannot be chosen. Not on the selected
|
|
@@ -180,15 +178,11 @@ export function TileRadioGroup<T extends string>({
|
|
|
180
178
|
const noteId = useId();
|
|
181
179
|
const reasonId = useId();
|
|
182
180
|
const s = TILE_SIZE[size];
|
|
183
|
-
const checkedIndex =
|
|
184
|
-
checked === undefined ? -1 : items.findIndex((it) => it.key === checked);
|
|
181
|
+
const checkedIndex = checked === undefined ? -1 : items.findIndex((it) => it.key === checked);
|
|
185
182
|
// The ONE tab stop: the checked tile, else the first that can be reached — the APG
|
|
186
183
|
// rule, so Tab into a group with nothing checked still lands somewhere. A locked
|
|
187
184
|
// tile is reachable: landing on it is how its reason is read.
|
|
188
|
-
const tabStop =
|
|
189
|
-
checkedIndex >= 0 && !isOff(items[checkedIndex])
|
|
190
|
-
? checkedIndex
|
|
191
|
-
: items.findIndex((it) => !isOff(it));
|
|
185
|
+
const tabStop = checkedIndex >= 0 && !isOff(items[checkedIndex]) ? checkedIndex : items.findIndex((it) => !isOff(it));
|
|
192
186
|
|
|
193
187
|
const onKeyDown = (e: KeyboardEvent<HTMLButtonElement>, index: number) => {
|
|
194
188
|
// Left and right are VISUAL directions: in a right-to-left page the row runs the
|
|
@@ -269,19 +263,12 @@ export function TileRadioGroup<T extends string>({
|
|
|
269
263
|
tileClassName?.(item, selected),
|
|
270
264
|
)}
|
|
271
265
|
>
|
|
272
|
-
{item.key === null ? (
|
|
273
|
-
<Ban aria-hidden className={cn(s.glyph, "text-muted")} />
|
|
274
|
-
) : (
|
|
275
|
-
renderTile(item, selected)
|
|
276
|
-
)}
|
|
266
|
+
{item.key === null ? <Ban aria-hidden className={cn(s.glyph, "text-muted")} /> : renderTile(item, selected)}
|
|
277
267
|
{item.note && (
|
|
278
268
|
<>
|
|
279
269
|
{/* A dot rather than a dimmed tile: dimming reads as "disabled", and a
|
|
280
270
|
tile with a note is entirely available. */}
|
|
281
|
-
<span
|
|
282
|
-
aria-hidden
|
|
283
|
-
className="absolute end-0.5 top-0.5 size-1.5 rounded-full bg-[var(--text-muted)]"
|
|
284
|
-
/>
|
|
271
|
+
<span aria-hidden className="absolute end-0.5 top-0.5 size-1.5 rounded-full bg-[var(--text-muted)]" />
|
|
285
272
|
{/* `hidden` still serves as a description: aria-describedby reads
|
|
286
273
|
hidden text, which is what keeps it out of the layout. */}
|
|
287
274
|
<span id={`${noteId}-${i}`} hidden>
|
|
@@ -35,11 +35,10 @@ import { cn } from "../lib/cn";
|
|
|
35
35
|
* at the site"), a {@link FieldHint} rides the label line. `showCount` is typed out — a
|
|
36
36
|
* time has no length worth counting.
|
|
37
37
|
*/
|
|
38
|
-
export interface TimeInputProps
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
> {
|
|
38
|
+
export interface TimeInputProps extends Omit<
|
|
39
|
+
InputProps,
|
|
40
|
+
"type" | "value" | "defaultValue" | "min" | "max" | "step" | "variant" | "showCount" | "countLabels"
|
|
41
|
+
> {
|
|
43
42
|
/** `"HH:mm"` (or `"HH:mm:ss"` with a sub-minute `step`); `""` is "no time". */
|
|
44
43
|
value: string;
|
|
45
44
|
/** The normalised value on every change the browser reports — which for a time
|
package/src/components/toast.tsx
CHANGED
|
@@ -140,8 +140,7 @@ const privately = (node: ReactNode) => <span data-private="">{node}</span>;
|
|
|
140
140
|
* whitespace-free class token.
|
|
141
141
|
*/
|
|
142
142
|
const ID_CLASS = "kit-toast-id-";
|
|
143
|
-
const idClass = (id: ToastId) =>
|
|
144
|
-
`${ID_CLASS}${typeof id === "number" ? "n" : "s"}-${encodeURIComponent(String(id))}`;
|
|
143
|
+
const idClass = (id: ToastId) => `${ID_CLASS}${typeof id === "number" ? "n" : "s"}-${encodeURIComponent(String(id))}`;
|
|
145
144
|
|
|
146
145
|
/** The id {@link idClass} stamped on a toast element, or null for a toast the kit did
|
|
147
146
|
* not make (an app still calling sonner directly). */
|
|
@@ -284,13 +283,7 @@ export const toast = Object.assign(
|
|
|
284
283
|
|
|
285
284
|
/* ── The Toaster ─────────────────────────────────────────────────────────── */
|
|
286
285
|
|
|
287
|
-
export type ToastPosition =
|
|
288
|
-
| "top-left"
|
|
289
|
-
| "top-center"
|
|
290
|
-
| "top-right"
|
|
291
|
-
| "bottom-left"
|
|
292
|
-
| "bottom-center"
|
|
293
|
-
| "bottom-right";
|
|
286
|
+
export type ToastPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
|
|
294
287
|
|
|
295
288
|
export type ToastSwipeDirection = "top" | "right" | "bottom" | "left";
|
|
296
289
|
|
|
@@ -381,9 +374,7 @@ const ALL_DIRECTIONS: ToastSwipeDirection[] = ["top", "right", "bottom", "left"]
|
|
|
381
374
|
|
|
382
375
|
/** Light or dark, as the `.dark` class on `<html>` says right now. */
|
|
383
376
|
function readDocumentTheme(): "light" | "dark" {
|
|
384
|
-
return typeof document !== "undefined" && document.documentElement.classList.contains("dark")
|
|
385
|
-
? "dark"
|
|
386
|
-
: "light";
|
|
377
|
+
return typeof document !== "undefined" && document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
387
378
|
}
|
|
388
379
|
|
|
389
380
|
function subscribeDocumentTheme(onChange: () => void): () => void {
|
|
@@ -37,8 +37,7 @@ export interface ToggleOption<T extends string> {
|
|
|
37
37
|
* worse than one that does not compile.
|
|
38
38
|
*/
|
|
39
39
|
export interface ToggleGroupBaseProps<T extends string>
|
|
40
|
-
extends Omit<ComponentPropsWithoutRef<"div">, "onChange" | "children">,
|
|
41
|
-
FieldHelpProps {
|
|
40
|
+
extends Omit<ComponentPropsWithoutRef<"div">, "onChange" | "children">, FieldHelpProps {
|
|
42
41
|
options: ToggleOption<T>[];
|
|
43
42
|
className?: string;
|
|
44
43
|
/** Applied to every option button (e.g. to tune height/rounding to match
|
|
@@ -354,9 +353,7 @@ export interface ToggleGroupClearableProps<T extends string> extends ToggleGroup
|
|
|
354
353
|
|
|
355
354
|
/** `allowEmpty` picks the shape, so `onChange` is typed `(T) => void` unless the group
|
|
356
355
|
* can actually emit `null` — no existing caller has a `null` to handle. */
|
|
357
|
-
export type ToggleGroupProps<T extends string> =
|
|
358
|
-
| ToggleGroupRequiredProps<T>
|
|
359
|
-
| ToggleGroupClearableProps<T>;
|
|
356
|
+
export type ToggleGroupProps<T extends string> = ToggleGroupRequiredProps<T> | ToggleGroupClearableProps<T>;
|
|
360
357
|
|
|
361
358
|
/**
|
|
362
359
|
* Overloaded rather than typed by the union alone (keksdose, "Gaps found adopting
|
|
@@ -542,9 +539,7 @@ export function ToggleGroup<T extends string>(props: ToggleGroupProps<T>): React
|
|
|
542
539
|
field && CHROME_SEGMENT[size],
|
|
543
540
|
// In the strip placement: a 22px group under a 20px strip — STRIP_SEGMENT.
|
|
544
541
|
strip && STRIP_SEGMENT[size],
|
|
545
|
-
active
|
|
546
|
-
? "bg-inverse text-inverse"
|
|
547
|
-
: "text-secondary hover:bg-hover",
|
|
542
|
+
active ? "bg-inverse text-inverse" : "text-secondary hover:bg-hover",
|
|
548
543
|
// No hover fill on a group that cannot be changed — a segment that
|
|
549
544
|
// lights up under the pointer is an offer, and there is none here. Not on
|
|
550
545
|
// the chosen segment: its fill IS its state, and its inverse text would
|
|
@@ -578,7 +573,12 @@ export function ToggleGroup<T extends string>(props: ToggleGroupProps<T>): React
|
|
|
578
573
|
aria-labelledby={labelled && ariaLabelAttr === undefined ? labelId : rest["aria-labelledby"]}
|
|
579
574
|
aria-invalid={hasError || rest["aria-invalid"] || undefined}
|
|
580
575
|
aria-describedby={
|
|
581
|
-
[
|
|
576
|
+
[
|
|
577
|
+
rest["aria-describedby"],
|
|
578
|
+
hintAsCaption !== undefined && hintCaptionId,
|
|
579
|
+
hasCaption && captionId,
|
|
580
|
+
hasError && errorId,
|
|
581
|
+
]
|
|
582
582
|
.filter(Boolean)
|
|
583
583
|
.join(" ") || undefined
|
|
584
584
|
}
|
|
@@ -26,13 +26,7 @@ import { DEFAULT_SERIES_CHART_LABELS, type SeriesChartLabels } from "./series-ch
|
|
|
26
26
|
* Kept here, beside the legend's own mark, and read by `SeriesChart` from here — so
|
|
27
27
|
* the key under a chart and the lines on it cannot disagree.
|
|
28
28
|
*/
|
|
29
|
-
export const STROKE_PATTERNS: readonly (string | undefined)[] = [
|
|
30
|
-
undefined,
|
|
31
|
-
"5 4",
|
|
32
|
-
"1 3",
|
|
33
|
-
"9 3 2 3",
|
|
34
|
-
"9 3 2 3 2 3",
|
|
35
|
-
];
|
|
29
|
+
export const STROKE_PATTERNS: readonly (string | undefined)[] = [undefined, "5 4", "1 3", "9 3 2 3", "9 3 2 3 2 3"];
|
|
36
30
|
|
|
37
31
|
/** The dash array for the nth pattern, wrapping past the fifth. */
|
|
38
32
|
export function strokeDash(order: number): string | undefined {
|
|
@@ -79,8 +73,7 @@ export function toggleHidden(hidden: ReadonlySet<string>, key: string): Readonly
|
|
|
79
73
|
* A caller that places its legend itself and wants it kept beside the chart at every
|
|
80
74
|
* size overrides with `large:col-auto large:basis-auto`.
|
|
81
75
|
*/
|
|
82
|
-
const UNDER_THE_CHART_AT_LARGE =
|
|
83
|
-
"large:order-last large:col-span-full large:basis-full large:[*:has(>&)]:flex-wrap";
|
|
76
|
+
const UNDER_THE_CHART_AT_LARGE = "large:order-last large:col-span-full large:basis-full large:[*:has(>&)]:flex-wrap";
|
|
84
77
|
|
|
85
78
|
/** A vertical legend's entries from Large up: across, wrapping — it is under the chart
|
|
86
79
|
* now (see {@link UNDER_THE_CHART_AT_LARGE}), where a column of entries would be a
|
|
@@ -284,10 +277,7 @@ export function StaticLegend({
|
|
|
284
277
|
{entries.map((entry) => (
|
|
285
278
|
<Item
|
|
286
279
|
key={entry.key}
|
|
287
|
-
className={cn(
|
|
288
|
-
"flex items-center gap-1.5 text-caption text-secondary",
|
|
289
|
-
entry.align === "end" && "ms-auto",
|
|
290
|
-
)}
|
|
280
|
+
className={cn("flex items-center gap-1.5 text-caption text-secondary", entry.align === "end" && "ms-auto")}
|
|
291
281
|
>
|
|
292
282
|
<LegendMark entry={entry} off={false} />
|
|
293
283
|
{entry.label}
|
|
@@ -335,9 +325,7 @@ export function LegendColumn({ children, className }: { children: ReactNode; cla
|
|
|
335
325
|
export function LegendGroup({ title, children }: { title: ReactNode; children: ReactNode }) {
|
|
336
326
|
return (
|
|
337
327
|
<div className="flex min-w-0 flex-col items-start gap-1">
|
|
338
|
-
<span className="text-micro font-semibold uppercase tracking-wide text-muted">
|
|
339
|
-
{title}
|
|
340
|
-
</span>
|
|
328
|
+
<span className="text-micro font-semibold uppercase tracking-wide text-muted">{title}</span>
|
|
341
329
|
<div className="flex flex-col items-start gap-y-0.5">{children}</div>
|
|
342
330
|
</div>
|
|
343
331
|
);
|