@eifi1/ui-kit 0.31.0 → 0.32.0
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 +53 -30
- package/dist/account/delete-account-setting.d.ts +8 -3
- package/dist/admin/admin-action-confirm.d.ts +8 -3
- package/dist/admin/admin-parts.d.ts +8 -1
- package/dist/admin/admin-parts.js +1 -1
- package/dist/admin/admin-parts.js.map +1 -1
- package/dist/admin/invitations-panel.d.ts +8 -3
- package/dist/admin/invitations-panel.js +29 -26
- package/dist/admin/invitations-panel.js.map +1 -1
- package/dist/admin/reviewer-scope-editor.d.ts +8 -3
- package/dist/admin/role-select.d.ts +10 -5
- package/dist/admin/transfer-ownership-dialog.d.ts +8 -3
- package/dist/admin/user-roster.d.ts +10 -5
- package/dist/admin/user-roster.js +8 -47
- package/dist/admin/user-roster.js.map +1 -1
- package/dist/auth/auth-errors.d.ts +43 -8
- package/dist/auth/auth-errors.js +24 -1
- package/dist/auth/auth-errors.js.map +1 -1
- package/dist/auth/register-form.d.ts +8 -3
- package/dist/auth/reset-password-form.d.ts +1 -1
- package/dist/auth/reset-password-form.js +2 -1
- package/dist/auth/reset-password-form.js.map +1 -1
- package/dist/auth/verify-email.d.ts +4 -0
- package/dist/auth/verify-email.js +3 -2
- package/dist/auth/verify-email.js.map +1 -1
- package/dist/billing/billing-banner.d.ts +184 -0
- package/dist/billing/billing-banner.js +98 -0
- package/dist/billing/billing-banner.js.map +1 -0
- package/dist/billing/billing-labels.d.ts +100 -0
- package/dist/billing/billing-labels.js +74 -0
- package/dist/billing/billing-labels.js.map +1 -0
- package/dist/billing/billing-lock.d.ts +158 -0
- package/dist/billing/billing-lock.js +17 -0
- package/dist/billing/billing-lock.js.map +1 -0
- package/dist/billing/billing-standing.d.ts +149 -0
- package/dist/billing/billing-standing.js +28 -0
- package/dist/billing/billing-standing.js.map +1 -0
- package/dist/billing/plan-card.d.ts +248 -0
- package/dist/billing/plan-card.js +248 -0
- package/dist/billing/plan-card.js.map +1 -0
- package/dist/billing/plan-limit-notice.d.ts +156 -0
- package/dist/billing/plan-limit-notice.js +76 -0
- package/dist/billing/plan-limit-notice.js.map +1 -0
- package/dist/billing/plan-limit.d.ts +34 -0
- package/dist/billing/plan-limit.js +20 -0
- package/dist/billing/plan-limit.js.map +1 -0
- package/dist/billing/plan-price.d.ts +61 -0
- package/dist/billing/plan-price.js +45 -0
- package/dist/billing/plan-price.js.map +1 -0
- package/dist/billing/subscription-actions.d.ts +133 -0
- package/dist/billing/subscription-actions.js +28 -0
- package/dist/billing/subscription-actions.js.map +1 -0
- package/dist/billing/subscription-status-chip.d.ts +149 -0
- package/dist/billing/subscription-status-chip.js +48 -0
- package/dist/billing/subscription-status-chip.js.map +1 -0
- package/dist/chart.d.ts +9 -3
- package/dist/components/account-chips.d.ts +16 -4
- package/dist/components/account-chips.js +21 -3
- package/dist/components/account-chips.js.map +1 -1
- package/dist/components/alert-banner.d.ts +6 -1
- package/dist/components/alert-banner.js +4 -3
- package/dist/components/alert-banner.js.map +1 -1
- package/dist/components/amount-input.d.ts +8 -3
- package/dist/components/amount-input.js +5 -5
- package/dist/components/amount-input.js.map +1 -1
- package/dist/components/appearance-labels.d.ts +32 -0
- package/dist/components/appearance-labels.js +18 -0
- package/dist/components/appearance-labels.js.map +1 -0
- package/dist/components/autocomplete.js +2 -2
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/breadcrumbs.js +3 -2
- package/dist/components/breadcrumbs.js.map +1 -1
- package/dist/components/bulk-action-bar.d.ts +2 -2
- package/dist/components/bulk-action-bar.js +7 -12
- package/dist/components/bulk-action-bar.js.map +1 -1
- package/dist/components/button-group.d.ts +8 -3
- package/dist/components/calculator.d.ts +8 -3
- package/dist/components/calculator.js +4 -3
- package/dist/components/calculator.js.map +1 -1
- package/dist/components/calendar-heatmap.js +5 -5
- package/dist/components/calendar-heatmap.js.map +1 -1
- package/dist/components/chart-height.d.ts +23 -0
- package/dist/components/chart-height.js +15 -0
- package/dist/components/chart-height.js.map +1 -0
- package/dist/components/chart-zoom.js +6 -1
- package/dist/components/chart-zoom.js.map +1 -1
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox-group.js.map +1 -1
- package/dist/components/checkbox.d.ts +10 -0
- package/dist/components/checkbox.js +25 -10
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/chip.d.ts +19 -3
- package/dist/components/chip.js +47 -21
- package/dist/components/chip.js.map +1 -1
- package/dist/components/choice-card.d.ts +1 -1
- package/dist/components/choice-card.js +8 -7
- package/dist/components/choice-card.js.map +1 -1
- package/dist/components/column-mapper.js +1 -1
- package/dist/components/column-mapper.js.map +1 -1
- package/dist/components/combobox-core.js +8 -7
- package/dist/components/combobox-core.js.map +1 -1
- package/dist/components/combobox.js +8 -8
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/confirm-dialog.d.ts +8 -3
- package/dist/components/confirm-dialog.js +7 -1
- package/dist/components/confirm-dialog.js.map +1 -1
- package/dist/components/copy-button.d.ts +10 -5
- package/dist/components/country-select.js +1 -1
- package/dist/components/country-select.js.map +1 -1
- package/dist/components/currency-select.js +3 -3
- package/dist/components/currency-select.js.map +1 -1
- package/dist/components/danger-confirm.d.ts +8 -3
- package/dist/components/data-table-cells.d.ts +1 -1
- package/dist/components/data-table-filter-popover.d.ts +1 -1
- package/dist/components/data-table-filter-popover.js +4 -1
- package/dist/components/data-table-filter-popover.js.map +1 -1
- package/dist/components/data-table-filters.d.ts +1 -1
- package/dist/components/data-table-labels.d.ts +1 -1
- package/dist/components/data-table-pagination.d.ts +1 -1
- package/dist/components/data-table.d.ts +1 -1
- package/dist/components/data-table.js +123 -52
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/date-picker.d.ts +1 -1
- package/dist/components/date-picker.js +7 -5
- package/dist/components/date-picker.js.map +1 -1
- package/dist/components/description-list.js +2 -2
- package/dist/components/description-list.js.map +1 -1
- package/dist/components/dialog-frame.js +2 -1
- package/dist/components/dialog-frame.js.map +1 -1
- package/dist/components/disclosure.js +3 -2
- package/dist/components/disclosure.js.map +1 -1
- package/dist/components/dropdown.d.ts +1 -1
- package/dist/components/dropdown.js +7 -1
- package/dist/components/dropdown.js.map +1 -1
- package/dist/components/facing-pair.d.ts +19 -6
- package/dist/components/facing-pair.js +3 -2
- package/dist/components/facing-pair.js.map +1 -1
- package/dist/components/field-parts.d.ts +102 -6
- package/dist/components/field-parts.js +81 -6
- package/dist/components/field-parts.js.map +1 -1
- package/dist/components/field-sync.d.ts +4 -1
- package/dist/components/field-sync.js +12 -2
- package/dist/components/field-sync.js.map +1 -1
- package/dist/components/field.js +2 -2
- package/dist/components/field.js.map +1 -1
- package/dist/components/file-button.d.ts +8 -3
- package/dist/components/file-dropzone.d.ts +8 -3
- package/dist/components/floating-panel.js +7 -4
- package/dist/components/floating-panel.js.map +1 -1
- package/dist/components/focus-ring.d.ts +12 -0
- package/dist/components/focus-ring.js +8 -0
- package/dist/components/focus-ring.js.map +1 -0
- package/dist/components/form-actions.d.ts +8 -3
- package/dist/components/form-actions.js +33 -19
- package/dist/components/form-actions.js.map +1 -1
- package/dist/components/full-bleed-dialog.d.ts +11 -1
- package/dist/components/full-bleed-dialog.js +3 -1
- package/dist/components/full-bleed-dialog.js.map +1 -1
- package/dist/components/iban-input.d.ts +8 -3
- package/dist/components/image-grid.js +1 -1
- package/dist/components/image-grid.js.map +1 -1
- package/dist/components/inline-edit-field.js +6 -3
- package/dist/components/inline-edit-field.js.map +1 -1
- package/dist/components/language-select.d.ts +8 -3
- package/dist/components/legal-page.d.ts +26 -5
- package/dist/components/legal-page.js +3 -1
- package/dist/components/legal-page.js.map +1 -1
- package/dist/components/legal.d.ts +8 -3
- package/dist/components/legal.js +2 -1
- package/dist/components/legal.js.map +1 -1
- package/dist/components/lightbox.js +24 -2
- package/dist/components/lightbox.js.map +1 -1
- package/dist/components/line-items.js +2 -1
- package/dist/components/line-items.js.map +1 -1
- package/dist/components/list.d.ts +5 -0
- package/dist/components/list.js +13 -9
- package/dist/components/list.js.map +1 -1
- package/dist/components/measured-grid.d.ts +3 -1
- package/dist/components/measured-grid.js +38 -20
- package/dist/components/measured-grid.js.map +1 -1
- package/dist/components/menu-item.js +2 -1
- package/dist/components/menu-item.js.map +1 -1
- package/dist/components/mini-calendar.js +8 -4
- package/dist/components/mini-calendar.js.map +1 -1
- package/dist/components/money-field.d.ts +8 -3
- package/dist/components/month-picker.js +9 -5
- package/dist/components/month-picker.js.map +1 -1
- package/dist/components/nav-pills.js +1 -1
- package/dist/components/nav-pills.js.map +1 -1
- package/dist/components/number-field.d.ts +8 -3
- package/dist/components/number-input.d.ts +11 -4
- package/dist/components/number-input.js +8 -6
- package/dist/components/number-input.js.map +1 -1
- package/dist/components/numpad-sheet.d.ts +8 -3
- package/dist/components/numpad-sheet.js +2 -1
- package/dist/components/numpad-sheet.js.map +1 -1
- package/dist/components/one-time-code-input.js +2 -2
- package/dist/components/one-time-code-input.js.map +1 -1
- package/dist/components/page-contents.js +2 -2
- package/dist/components/page-contents.js.map +1 -1
- package/dist/components/phone-input.d.ts +8 -3
- package/dist/components/phone-input.js +2 -2
- package/dist/components/phone-input.js.map +1 -1
- package/dist/components/pie-chart.d.ts +8 -2
- package/dist/components/pie-chart.js +11 -7
- package/dist/components/pie-chart.js.map +1 -1
- package/dist/components/popover.d.ts +9 -1
- package/dist/components/popover.js +8 -4
- package/dist/components/popover.js.map +1 -1
- package/dist/components/row-actions.d.ts +100 -0
- package/dist/components/row-actions.js +165 -0
- package/dist/components/row-actions.js.map +1 -0
- package/dist/components/scroll-area.js +1 -1
- package/dist/components/scroll-area.js.map +1 -1
- package/dist/components/search-field.js +3 -2
- package/dist/components/search-field.js.map +1 -1
- package/dist/components/series-chart-budget.d.ts +30 -7
- package/dist/components/series-chart-budget.js +12 -4
- package/dist/components/series-chart-budget.js.map +1 -1
- package/dist/components/series-chart-ticks.d.ts +7 -1
- package/dist/components/series-chart-ticks.js +6 -0
- package/dist/components/series-chart-ticks.js.map +1 -1
- package/dist/components/series-chart.d.ts +58 -28
- package/dist/components/series-chart.js +42 -32
- package/dist/components/series-chart.js.map +1 -1
- package/dist/components/settings-fields.d.ts +51 -6
- package/dist/components/settings-fields.js +37 -0
- package/dist/components/settings-fields.js.map +1 -1
- package/dist/components/share-card.d.ts +11 -6
- package/dist/components/share-card.js +2 -0
- package/dist/components/share-card.js.map +1 -1
- package/dist/components/sign-chip.d.ts +4 -0
- package/dist/components/sign-chip.js +17 -4
- package/dist/components/sign-chip.js.map +1 -1
- package/dist/components/signature-pad.d.ts +3 -1
- package/dist/components/signature-pad.js +8 -5
- package/dist/components/signature-pad.js.map +1 -1
- package/dist/components/slider.js +7 -6
- package/dist/components/slider.js.map +1 -1
- package/dist/components/sparkline.d.ts +5 -1
- package/dist/components/sparkline.js +4 -2
- package/dist/components/sparkline.js.map +1 -1
- package/dist/components/stat-tile.d.ts +17 -1
- package/dist/components/stat-tile.js +48 -20
- package/dist/components/stat-tile.js.map +1 -1
- package/dist/components/status-dot.d.ts +4 -0
- package/dist/components/swipeable-row.js +2 -1
- package/dist/components/swipeable-row.js.map +1 -1
- package/dist/components/switch.d.ts +21 -7
- package/dist/components/switch.js +24 -11
- package/dist/components/switch.js.map +1 -1
- package/dist/components/table.js +2 -2
- package/dist/components/table.js.map +1 -1
- package/dist/components/text-link.d.ts +8 -3
- package/dist/components/text-link.js +1 -1
- package/dist/components/text-link.js.map +1 -1
- package/dist/components/text.d.ts +7 -2
- package/dist/components/text.js +5 -5
- package/dist/components/text.js.map +1 -1
- package/dist/components/tile-radio.js +2 -1
- package/dist/components/tile-radio.js.map +1 -1
- package/dist/components/time-input.d.ts +8 -3
- package/dist/components/toast.d.ts +18 -2
- package/dist/components/toast.js +8 -5
- package/dist/components/toast.js.map +1 -1
- package/dist/components/toggle-group.d.ts +16 -1
- package/dist/components/toggle-group.js +40 -11
- package/dist/components/toggle-group.js.map +1 -1
- package/dist/components/toggle-legend.d.ts +10 -1
- package/dist/components/toggle-legend.js +21 -7
- package/dist/components/toggle-legend.js.map +1 -1
- package/dist/components/translation-review-parts.d.ts +4 -0
- package/dist/components/translation-review.d.ts +4 -0
- package/dist/components/translation-review.js +3 -3
- package/dist/components/translation-review.js.map +1 -1
- package/dist/components/tree-view.js +3 -2
- package/dist/components/tree-view.js.map +1 -1
- package/dist/components/treemap.d.ts +5 -2
- package/dist/components/treemap.js +33 -16
- package/dist/components/treemap.js.map +1 -1
- package/dist/components/ui.d.ts +8 -3
- package/dist/components/ui.js +202 -114
- package/dist/components/ui.js.map +1 -1
- package/dist/components/use-table-state.d.ts +1 -1
- package/dist/components/user-avatar.d.ts +5 -1
- package/dist/components/user-avatar.js +1 -1
- package/dist/components/user-avatar.js.map +1 -1
- package/dist/{data-table-labels-DUELeXpa.d.ts → data-table-labels-kpAAVi6g.d.ts} +26 -2
- package/dist/data-table.d.ts +1 -1
- package/dist/{delete-account-setting-DCFS5Vof.d.ts → delete-account-setting-BvdQdbv3.d.ts} +613 -58
- package/dist/demo/demo-banner.js +1 -0
- package/dist/demo/demo-banner.js.map +1 -1
- package/dist/feedback/feedback-attachment.d.ts +8 -3
- package/dist/feedback/feedback-context.d.ts +8 -3
- package/dist/feedback/feedback-crash.d.ts +8 -3
- package/dist/feedback/feedback-dialog.d.ts +8 -3
- package/dist/feedback/feedback-dialog.js +3 -3
- package/dist/feedback/feedback-dialog.js.map +1 -1
- package/dist/feedback/feedback-inbox.d.ts +8 -3
- package/dist/feedback/feedback-inbox.js +2 -2
- package/dist/feedback/feedback-inbox.js.map +1 -1
- package/dist/feedback/feedback-labels.d.ts +8 -3
- package/dist/feedback/feedback-menu.d.ts +9 -4
- package/dist/feedback/feedback-record.d.ts +8 -3
- package/dist/feedback/feedback-row-detail.d.ts +8 -3
- package/dist/feedback/feedback-status-undo.d.ts +8 -3
- package/dist/feedback/feedback-submit.d.ts +8 -3
- package/dist/feedback/feedback-swipe.d.ts +8 -3
- package/dist/feedback/feedback-table.d.ts +8 -3
- package/dist/feedback/feedback-thread.d.ts +8 -3
- package/dist/feedback/feedback-thread.js +3 -3
- package/dist/feedback/feedback-thread.js.map +1 -1
- package/dist/feedback.d.ts +8 -3
- package/dist/hooks/use-anchored-panel.d.ts +32 -3
- package/dist/hooks/use-anchored-panel.js +21 -3
- package/dist/hooks/use-anchored-panel.js.map +1 -1
- package/dist/hooks/use-breakpoint.d.ts +77 -0
- package/dist/hooks/use-breakpoint.js +50 -0
- package/dist/hooks/use-breakpoint.js.map +1 -0
- package/dist/hooks/use-file-drop.d.ts +8 -3
- package/dist/hooks/use-large-text.d.ts +29 -0
- package/dist/hooks/use-large-text.js +20 -0
- package/dist/hooks/use-large-text.js.map +1 -0
- package/dist/hooks/use-windowed-rows.d.ts +52 -8
- package/dist/hooks/use-windowed-rows.js +94 -5
- package/dist/hooks/use-windowed-rows.js.map +1 -1
- package/dist/i18n/defaults.d.ts +8 -3
- package/dist/i18n/defaults.js +8 -0
- package/dist/i18n/defaults.js.map +1 -1
- package/dist/i18n/german.d.ts +8 -3
- package/dist/i18n/german.js +91 -3
- package/dist/i18n/german.js.map +1 -1
- package/dist/i18n/kit-labels.d.ts +8 -3
- package/dist/i18n/kit-labels.js.map +1 -1
- package/dist/i18n/languages.d.ts +10 -5
- package/dist/i18n/locales/de-CH.d.ts +8 -3
- package/dist/i18n/locales/en.d.ts +8 -3
- package/dist/i18n/locales/es.d.ts +8 -3
- package/dist/i18n/locales/es.js +86 -3
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +8 -3
- package/dist/i18n/locales/fr.js +88 -3
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.d.ts +8 -3
- package/dist/i18n/locales/hu.js +88 -3
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +8 -3
- package/dist/i18n/locales/it.js +89 -3
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +8 -3
- package/dist/i18n/locales/zh.js +86 -3
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/review.d.ts +8 -3
- package/dist/i18n/review.js +16 -1
- package/dist/i18n/review.js.map +1 -1
- package/dist/index.d.ts +29 -13
- package/dist/index.js +77 -5
- package/dist/index.js.map +1 -1
- package/dist/landing/landing-actions.d.ts +12 -5
- package/dist/landing/landing-actions.js +1 -1
- package/dist/landing/landing-actions.js.map +1 -1
- package/dist/landing/landing-sections.d.ts +8 -3
- package/dist/landing/public-header.d.ts +9 -4
- package/dist/landing/public-header.js +3 -3
- package/dist/landing/public-header.js.map +1 -1
- package/dist/landing/routing.d.ts +27 -9
- package/dist/landing/routing.js +5 -2
- package/dist/landing/routing.js.map +1 -1
- package/dist/lib/cn.js +3 -2
- package/dist/lib/cn.js.map +1 -1
- package/dist/rhf/fields.d.ts +8 -3
- package/dist/rhf/fields.js +1 -1
- package/dist/rhf/fields.js.map +1 -1
- package/dist/rhf/form.d.ts +8 -3
- package/dist/rhf/form.js +2 -2
- package/dist/rhf/form.js.map +1 -1
- package/dist/rhf.d.ts +8 -3
- package/dist/search/command-palette.d.ts +1 -1
- package/dist/search/command-palette.js +9 -8
- package/dist/search/command-palette.js.map +1 -1
- package/dist/settings/settings-labels.d.ts +8 -1
- package/dist/settings/settings-labels.js +7 -2
- package/dist/settings/settings-labels.js.map +1 -1
- package/dist/settings/settings-layout.js +2 -1
- package/dist/settings/settings-layout.js.map +1 -1
- package/dist/settings/settings-section.d.ts +8 -3
- package/dist/settings/use-account-appearance.d.ts +92 -0
- package/dist/settings/use-account-appearance.js +63 -0
- package/dist/settings/use-account-appearance.js.map +1 -0
- package/dist/settings/use-settings-route.d.ts +1 -1
- package/dist/settings/use-settings-route.js +2 -3
- package/dist/settings/use-settings-route.js.map +1 -1
- package/dist/shell/app-shell.d.ts +12 -171
- package/dist/shell/app-shell.js +144 -28
- package/dist/shell/app-shell.js.map +1 -1
- package/dist/shell/auth-layout.js +1 -1
- package/dist/shell/auth-layout.js.map +1 -1
- package/dist/shell/option-switcher-menu.js +1 -1
- package/dist/shell/option-switcher-menu.js.map +1 -1
- package/dist/shell/top-bar-brand.d.ts +8 -3
- package/dist/shell/top-bar-brand.js +3 -1
- package/dist/shell/top-bar-brand.js.map +1 -1
- package/dist/shell/topbar-action-menu.d.ts +4 -0
- package/dist/shell/topbar-action-menu.js +3 -3
- package/dist/shell/topbar-action-menu.js.map +1 -1
- package/dist/shell/topbar-controls.js +4 -4
- package/dist/shell/topbar-controls.js.map +1 -1
- package/dist/shell.d.ts +10 -6
- package/dist/shell.js.map +1 -1
- package/dist/theme/contrast-tokens.d.ts +41 -0
- package/dist/theme/contrast-tokens.js +59 -0
- package/dist/theme/contrast-tokens.js.map +1 -0
- package/dist/theme/contrast.d.ts +109 -0
- package/dist/theme/contrast.js +128 -0
- package/dist/theme/contrast.js.map +1 -0
- package/dist/theme/palette-presets.d.ts +12 -1
- package/dist/theme/palette-presets.js +9 -4
- package/dist/theme/palette-presets.js.map +1 -1
- package/dist/theme/palette-store.js.map +1 -1
- package/dist/theme/text-size.d.ts +157 -0
- package/dist/theme/text-size.js +121 -0
- package/dist/theme/text-size.js.map +1 -0
- package/dist/wizard/stepper-nav.d.ts +8 -3
- package/dist/wizard.d.ts +8 -3
- package/package.json +1 -1
- package/src/admin/admin-parts.ts +9 -2
- package/src/admin/invitations-panel.tsx +36 -29
- package/src/admin/user-roster.tsx +17 -72
- package/src/auth/auth-errors.ts +68 -7
- package/src/auth/reset-password-form.tsx +6 -2
- package/src/auth/verify-email.tsx +14 -2
- package/src/billing/billing-banner.tsx +205 -0
- package/src/billing/billing-labels.ts +224 -0
- package/src/billing/billing-lock.ts +75 -0
- package/src/billing/billing-standing.ts +72 -0
- package/src/billing/plan-card.tsx +458 -0
- package/src/billing/plan-limit-notice.tsx +145 -0
- package/src/billing/plan-limit.ts +53 -0
- package/src/billing/plan-price.ts +101 -0
- package/src/billing/subscription-actions.tsx +76 -0
- package/src/billing/subscription-status-chip.tsx +95 -0
- package/src/components/account-chips.tsx +36 -10
- package/src/components/alert-banner.tsx +11 -6
- package/src/components/amount-input.tsx +5 -5
- package/src/components/appearance-labels.ts +40 -0
- package/src/components/autocomplete.tsx +2 -2
- package/src/components/breadcrumbs.tsx +3 -3
- package/src/components/bulk-action-bar.tsx +11 -14
- package/src/components/calculator.tsx +4 -3
- package/src/components/calendar-heatmap.tsx +5 -5
- package/src/components/chart-height.ts +30 -0
- package/src/components/chart-zoom.tsx +6 -1
- package/src/components/checkbox-group.tsx +2 -2
- package/src/components/checkbox.tsx +62 -20
- package/src/components/chip.tsx +105 -24
- package/src/components/choice-card.tsx +15 -10
- package/src/components/column-mapper.tsx +1 -1
- package/src/components/combobox-core.tsx +8 -7
- package/src/components/combobox.tsx +8 -8
- package/src/components/confirm-dialog.tsx +20 -1
- package/src/components/country-select.tsx +1 -1
- package/src/components/currency-select.tsx +3 -3
- package/src/components/data-table-filter-popover.tsx +7 -1
- package/src/components/data-table.tsx +160 -43
- package/src/components/date-picker.tsx +12 -9
- package/src/components/description-list.tsx +2 -2
- package/src/components/dialog-frame.tsx +2 -1
- package/src/components/disclosure.tsx +3 -2
- package/src/components/dropdown.tsx +10 -2
- package/src/components/facing-pair.ts +12 -5
- package/src/components/field-parts.tsx +190 -7
- package/src/components/field-sync.tsx +17 -3
- package/src/components/field.tsx +2 -2
- package/src/components/floating-panel.tsx +7 -4
- package/src/components/focus-ring.ts +12 -0
- package/src/components/form-actions.tsx +55 -18
- package/src/components/full-bleed-dialog.tsx +18 -4
- package/src/components/image-grid.tsx +1 -1
- package/src/components/inline-edit-field.tsx +6 -3
- package/src/components/legal-page.tsx +28 -2
- package/src/components/legal.tsx +19 -1
- package/src/components/lightbox.tsx +24 -2
- package/src/components/line-items.tsx +7 -1
- package/src/components/list.tsx +36 -10
- package/src/components/measured-grid.tsx +49 -24
- package/src/components/menu-item.tsx +2 -2
- package/src/components/mini-calendar.tsx +8 -4
- package/src/components/month-picker.tsx +9 -5
- package/src/components/nav-pills.tsx +1 -1
- package/src/components/number-input.tsx +14 -7
- package/src/components/numpad-sheet.tsx +2 -2
- package/src/components/one-time-code-input.tsx +2 -2
- package/src/components/page-contents.tsx +2 -2
- package/src/components/phone-input.tsx +2 -2
- package/src/components/pie-chart.tsx +19 -9
- package/src/components/popover.tsx +22 -5
- package/src/components/row-actions.tsx +344 -0
- package/src/components/scroll-area.tsx +1 -1
- package/src/components/search-field.tsx +4 -2
- package/src/components/series-chart-budget.ts +40 -8
- package/src/components/series-chart-ticks.ts +10 -0
- package/src/components/series-chart.tsx +123 -72
- package/src/components/settings-fields.tsx +81 -2
- package/src/components/share-card.tsx +10 -0
- package/src/components/sign-chip.tsx +28 -4
- package/src/components/signature-pad.tsx +13 -7
- package/src/components/slider.tsx +22 -9
- package/src/components/sparkline.tsx +11 -3
- package/src/components/stat-tile.tsx +70 -14
- package/src/components/swipeable-row.tsx +2 -1
- package/src/components/switch.tsx +57 -23
- package/src/components/table.tsx +2 -2
- package/src/components/text-link.tsx +1 -1
- package/src/components/text.tsx +11 -6
- package/src/components/tile-radio.tsx +4 -1
- package/src/components/toast.tsx +27 -7
- package/src/components/toggle-group.tsx +99 -12
- package/src/components/toggle-legend.tsx +53 -8
- package/src/components/translation-review.tsx +10 -5
- package/src/components/tree-view.tsx +3 -2
- package/src/components/treemap.tsx +27 -10
- package/src/components/ui.tsx +331 -145
- package/src/components/user-avatar.tsx +1 -1
- package/src/demo/demo-banner.tsx +5 -0
- package/src/feedback/feedback-dialog.tsx +3 -3
- package/src/feedback/feedback-inbox.tsx +2 -2
- package/src/feedback/feedback-thread.tsx +3 -3
- package/src/hooks/use-anchored-panel.ts +67 -5
- package/src/hooks/use-breakpoint.ts +121 -0
- package/src/hooks/use-large-text.ts +41 -0
- package/src/hooks/use-windowed-rows.ts +168 -12
- package/src/i18n/defaults.ts +8 -0
- package/src/i18n/german.ts +105 -1
- package/src/i18n/kit-labels.tsx +12 -0
- package/src/i18n/locales/es.ts +96 -1
- package/src/i18n/locales/fr.ts +100 -1
- package/src/i18n/locales/hu.ts +98 -1
- package/src/i18n/locales/it.ts +101 -1
- package/src/i18n/locales/zh.ts +92 -1
- package/src/i18n/review.ts +15 -0
- package/src/index.ts +82 -8
- package/src/landing/landing-actions.tsx +9 -5
- package/src/landing/public-header.tsx +4 -4
- package/src/landing/routing.tsx +22 -5
- package/src/lib/cn.ts +13 -2
- package/src/rhf/fields.tsx +1 -1
- package/src/rhf/form.tsx +2 -2
- package/src/search/command-palette.tsx +10 -9
- package/src/settings/settings-labels.ts +13 -1
- package/src/settings/settings-layout.tsx +2 -1
- package/src/settings/use-account-appearance.ts +148 -0
- package/src/settings/use-settings-route.ts +3 -4
- package/src/shell/app-shell.tsx +278 -54
- package/src/shell/auth-layout.tsx +1 -1
- package/src/shell/option-switcher-menu.tsx +1 -1
- package/src/shell/top-bar-brand.tsx +3 -1
- package/src/shell/topbar-action-menu.tsx +3 -3
- package/src/shell/topbar-controls.tsx +4 -4
- package/src/shell.ts +7 -1
- package/src/theme/contrast-tokens.ts +112 -0
- package/src/theme/contrast.ts +224 -0
- package/src/theme/palette-presets.ts +24 -4
- package/src/theme/palette-store.ts +6 -1
- package/src/theme/text-size.ts +267 -0
- package/tokens.css +143 -1
package/dist/components/ui.js
CHANGED
|
@@ -1,67 +1,96 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { createContext, forwardRef, useContext, useId, useLayoutEffect, useRef, useState } from "react";
|
|
4
|
-
import { ChevronDown, Eye, EyeOff,
|
|
4
|
+
import { ChevronDown, Eye, EyeOff, Plus, X } from "lucide-react";
|
|
5
5
|
import { cn } from "../lib/cn.js";
|
|
6
|
+
import { FOCUS_RING, FOCUS_RING_WIDTH } from "./focus-ring.js";
|
|
6
7
|
import { scrollIntoStrip, useStripFade } from "../lib/strip-fade.js";
|
|
7
8
|
import { horizontalStep } from "../lib/direction.js";
|
|
8
|
-
import {
|
|
9
|
+
import { usePhoneLayout } from "../hooks/use-breakpoint.js";
|
|
10
|
+
import { useLargeText } from "../hooks/use-large-text.js";
|
|
9
11
|
import { Tooltip } from "./tooltip.js";
|
|
10
12
|
import { DEFAULT_COMMON_LABELS, useKitLabels, useKitLink } from "../i18n/kit-labels.js";
|
|
11
13
|
import { pickLinkRenderer, replacingClick, routerLinkNavigation } from "./text-link.js";
|
|
12
14
|
import { useCommitReason } from "./write-lock.js";
|
|
13
15
|
import { mergeDescribedBy } from "./choice-parts.js";
|
|
14
16
|
import {
|
|
17
|
+
CompactControlsContext,
|
|
18
|
+
DisabledReasonLine,
|
|
15
19
|
EndHintRow,
|
|
16
20
|
FieldCaption,
|
|
17
21
|
LockedReason,
|
|
22
|
+
useDisabledReasonLine,
|
|
18
23
|
useFieldHint,
|
|
19
24
|
useLockReason,
|
|
20
25
|
FLOATING_LABEL_STATIC,
|
|
21
26
|
STATIC_LABEL_TYPE
|
|
22
27
|
} from "./field-parts.js";
|
|
23
|
-
import { FieldLabel, FLOATING_LABEL_STATIC as FLOATING_LABEL_STATIC2 } from "./field-parts.js";
|
|
24
|
-
|
|
28
|
+
import { FieldLabel, FLOATING_LABEL_STATIC as FLOATING_LABEL_STATIC2, FieldHint } from "./field-parts.js";
|
|
29
|
+
import { FOCUS_RING as FOCUS_RING2, FOCUS_RING_WIDTH as FOCUS_RING_WIDTH2 } from "./focus-ring.js";
|
|
30
|
+
const BUTTON_BASE = cn(
|
|
31
|
+
"inline-flex items-center justify-center rounded-md font-medium transition-colors focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
32
|
+
FOCUS_RING_WIDTH
|
|
33
|
+
);
|
|
34
|
+
const TOUCH_TARGET_LARGE = "large:min-h-[48px] large:min-w-[48px]";
|
|
25
35
|
const BUTTON_SIZES = {
|
|
26
36
|
md: "gap-2 px-3 py-2 text-sm",
|
|
27
37
|
sm: "gap-1.5 px-2 py-1 text-xs"
|
|
28
38
|
};
|
|
39
|
+
const BUTTON_SIZES_LARGE = {
|
|
40
|
+
md: "large:min-h-[48px]",
|
|
41
|
+
sm: "large:min-h-[48px] large:py-2.5"
|
|
42
|
+
};
|
|
29
43
|
const buttonVariantClasses = {
|
|
30
|
-
primary: "border border-[var(--border)] bg-[var(--bg-surface-2)] text-[var(--text-primary)] hover:bg-[var(--border)] focus:ring-[var(--brand)]",
|
|
31
|
-
secondary: "border border-[var(--border)] bg-transparent text-[var(--text-primary)] hover:bg-[var(--bg-surface-2)] focus:ring-[var(--brand)]",
|
|
32
|
-
ghost: "bg-transparent text-[var(--text-primary)] hover:bg-[var(--bg-surface-2)] focus:ring-[var(--brand)]",
|
|
33
|
-
danger: "bg-[var(--danger)] text-[var(--danger-contrast)] hover:bg-[var(--danger-hover)] focus:ring-[var(--danger-border-strong)]",
|
|
34
|
-
brand: "bg-[var(--brand)] text-[var(--brand-contrast)] hover:bg-[var(--brand-hover)] focus:ring-[var(--brand)]",
|
|
44
|
+
primary: "border border-[var(--border)] bg-[var(--bg-surface-2)] text-[var(--text-primary)] hover:bg-[var(--border)] focus-visible:ring-[var(--brand)]",
|
|
45
|
+
secondary: "border border-[var(--border)] bg-transparent text-[var(--text-primary)] hover:bg-[var(--bg-surface-2)] focus-visible:ring-[var(--brand)]",
|
|
46
|
+
ghost: "bg-transparent text-[var(--text-primary)] hover:bg-[var(--bg-surface-2)] focus-visible:ring-[var(--brand)]",
|
|
47
|
+
danger: "bg-[var(--danger)] text-[var(--danger-contrast)] hover:bg-[var(--danger-hover)] focus-visible:ring-[var(--danger-border-strong)]",
|
|
48
|
+
brand: "bg-[var(--brand)] text-[var(--brand-contrast)] hover:bg-[var(--brand-hover)] focus-visible:ring-[var(--brand)]",
|
|
35
49
|
// A text link that is still a `<button>` — keksdose's six hand-rolled
|
|
36
50
|
// `<button className="text-brand underline">` sites ("Resend code", "Show all",
|
|
37
51
|
// "Undo" in a toast…), which act rather than navigate and so must not be anchors.
|
|
38
52
|
// The box padding goes (`p-0`) so it sits in a sentence at the text's own size, but
|
|
39
|
-
// the base's
|
|
53
|
+
// the base's focus ring stays: those copies had `outline-none` and no ring, so
|
|
40
54
|
// a keyboard user tabbing onto them saw nothing at all. `rounded-sm` keeps that
|
|
41
55
|
// ring hugging the word instead of drawing a pill round it.
|
|
42
|
-
link: "rounded-sm p-0 bg-transparent text-[var(--brand)] underline-offset-4 hover:underline focus:ring-[var(--brand)]"
|
|
56
|
+
link: "rounded-sm p-0 bg-transparent text-[var(--brand)] underline-offset-4 hover:underline focus-visible:ring-[var(--brand)]"
|
|
43
57
|
};
|
|
44
58
|
const BUTTON_TONES = {
|
|
45
59
|
muted: "text-[var(--text-secondary)] hover:text-[var(--text-primary)] disabled:hover:text-[var(--text-secondary)]",
|
|
46
|
-
danger: "text-[var(--text-secondary)] hover:text-[var(--danger)] focus:ring-[var(--danger-border-strong)] disabled:hover:text-[var(--text-secondary)]"
|
|
60
|
+
danger: "text-[var(--text-secondary)] hover:text-[var(--danger)] focus-visible:ring-[var(--danger-border-strong)] disabled:hover:text-[var(--text-secondary)]"
|
|
47
61
|
};
|
|
48
62
|
const TONED_VARIANTS = /* @__PURE__ */ new Set(["link", "ghost"]);
|
|
49
63
|
const BUTTON_BOXED_DANGER = {
|
|
50
|
-
secondary: "border-[var(--danger-border)] bg-transparent text-[var(--danger)] hover:bg-[var(--danger-bg)] focus:ring-[var(--danger-border-strong)]",
|
|
51
|
-
primary: "border-[var(--danger-border)] bg-[var(--danger-bg)] text-[var(--danger)] hover:border-[var(--danger)] hover:bg-[var(--danger)] hover:text-[var(--danger-contrast)] focus:ring-[var(--danger-border-strong)] disabled:hover:border-[var(--danger-border)] disabled:hover:bg-[var(--danger-bg)] disabled:hover:text-[var(--danger)]"
|
|
64
|
+
secondary: "border-[var(--danger-border)] bg-transparent text-[var(--danger)] hover:bg-[var(--danger-bg)] focus-visible:ring-[var(--danger-border-strong)]",
|
|
65
|
+
primary: "border-[var(--danger-border)] bg-[var(--danger-bg)] text-[var(--danger)] hover:border-[var(--danger)] hover:bg-[var(--danger)] hover:text-[var(--danger-contrast)] focus-visible:ring-[var(--danger-border-strong)] disabled:hover:border-[var(--danger-border)] disabled:hover:bg-[var(--danger-bg)] disabled:hover:text-[var(--danger)]"
|
|
52
66
|
};
|
|
53
67
|
const BUTTON_LINK_PRESSED = "font-medium text-[var(--brand)] hover:text-[var(--brand)] disabled:hover:text-[var(--brand)]";
|
|
54
68
|
function buttonClasses(variant = "primary", classNameOrOptions) {
|
|
55
69
|
const { size = "md", className } = typeof classNameOrOptions === "object" ? classNameOrOptions : { className: classNameOrOptions };
|
|
56
|
-
return cn(
|
|
70
|
+
return cn(
|
|
71
|
+
BUTTON_BASE,
|
|
72
|
+
BUTTON_SIZES[size],
|
|
73
|
+
variant !== "link" && BUTTON_SIZES_LARGE[size],
|
|
74
|
+
buttonVariantClasses[variant],
|
|
75
|
+
className
|
|
76
|
+
);
|
|
57
77
|
}
|
|
58
78
|
function hasContent(node) {
|
|
59
79
|
return node !== void 0 && node !== null && node !== false && node !== "";
|
|
60
80
|
}
|
|
81
|
+
import {
|
|
82
|
+
CompactControls,
|
|
83
|
+
DisabledReasonLine as DisabledReasonLine2,
|
|
84
|
+
DISABLED_REASON_LINE_CLASS,
|
|
85
|
+
useDisabledReasonLine as useDisabledReasonLine2
|
|
86
|
+
} from "./field-parts.js";
|
|
61
87
|
function buttonLook(variant, size, stretch, tone) {
|
|
62
88
|
return cn(
|
|
63
89
|
BUTTON_BASE,
|
|
64
90
|
BUTTON_SIZES[size],
|
|
91
|
+
// §4: `sm` at `md`'s height and the 48 px target at Large — not on a `link`. In the
|
|
92
|
+
// order `buttonClasses` has it, so the two strings stay identical.
|
|
93
|
+
variant !== "link" && BUTTON_SIZES_LARGE[size],
|
|
65
94
|
// In a flex row next to a taller labelled field, `stretch` makes the button
|
|
66
95
|
// fill the field's height so the two line up (self-stretch overrides the row's
|
|
67
96
|
// align-items). No effect outside a flex row / when it's already the tallest.
|
|
@@ -157,6 +186,7 @@ function ButtonElement({
|
|
|
157
186
|
tone = "default",
|
|
158
187
|
pressed,
|
|
159
188
|
disabledReason: ownDisabledReason,
|
|
189
|
+
disabledReasonDisplay,
|
|
160
190
|
commit,
|
|
161
191
|
pending,
|
|
162
192
|
className,
|
|
@@ -213,18 +243,39 @@ function ButtonElement({
|
|
|
213
243
|
}
|
|
214
244
|
);
|
|
215
245
|
if (!locked) return button;
|
|
216
|
-
return (
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
246
|
+
return /* @__PURE__ */ jsx(
|
|
247
|
+
ReasonFrame,
|
|
248
|
+
{
|
|
249
|
+
reason: disabledReason,
|
|
250
|
+
reasonId,
|
|
251
|
+
display: disabledReasonDisplay,
|
|
252
|
+
className: stretch ? "self-stretch" : void 0,
|
|
253
|
+
children: button
|
|
254
|
+
}
|
|
225
255
|
);
|
|
226
256
|
}
|
|
227
|
-
|
|
257
|
+
function ReasonFrame({
|
|
258
|
+
reason,
|
|
259
|
+
reasonId,
|
|
260
|
+
display,
|
|
261
|
+
className,
|
|
262
|
+
side,
|
|
263
|
+
portal,
|
|
264
|
+
children
|
|
265
|
+
}) {
|
|
266
|
+
const line = useDisabledReasonLine(display);
|
|
267
|
+
if (line) {
|
|
268
|
+
return /* @__PURE__ */ jsx(DisabledReasonLine, { id: reasonId, reason, className, children });
|
|
269
|
+
}
|
|
270
|
+
return /* @__PURE__ */ jsx(Tooltip, { label: reason, side, portal, className, children: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
271
|
+
children,
|
|
272
|
+
/* @__PURE__ */ jsx("span", { id: reasonId, hidden: true, children: reason })
|
|
273
|
+
] }) });
|
|
274
|
+
}
|
|
275
|
+
const ICON_BUTTON_BASE = cn(
|
|
276
|
+
"inline-flex items-center justify-center rounded-md transition-colors focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed",
|
|
277
|
+
FOCUS_RING_WIDTH
|
|
278
|
+
);
|
|
228
279
|
const ICON_BUTTON_SIZES = {
|
|
229
280
|
// 64px with a 28px glyph: a camera's shutter (keksdose invoices/camera-capture.tsx:248,
|
|
230
281
|
// `size-16` by hand) — the one control of a full-screen capture view, thumb-sized.
|
|
@@ -249,29 +300,56 @@ const ICON_BUTTON_STRETCH_SIZES = {
|
|
|
249
300
|
xs: "w-7 min-h-7 self-stretch rounded [&_svg]:size-4",
|
|
250
301
|
"2xs": "w-6 min-h-6 self-stretch rounded [&_svg]:size-3.5"
|
|
251
302
|
};
|
|
303
|
+
const ICON_BUTTON_TEXT_SIZES = {
|
|
304
|
+
"2xl": "h-16 gap-2 px-4 text-base [&_svg]:size-7",
|
|
305
|
+
xl: "h-12 gap-2 px-3.5 text-sm [&_svg]:size-6",
|
|
306
|
+
lg: "h-11 gap-2 px-3 text-sm [&_svg]:size-5",
|
|
307
|
+
md: "h-9 gap-1.5 px-2.5 text-sm [&_svg]:size-5",
|
|
308
|
+
sm: "h-8 gap-1.5 px-2 text-sm [&_svg]:size-5",
|
|
309
|
+
xs: "h-7 gap-1 rounded px-1.5 text-xs [&_svg]:size-4",
|
|
310
|
+
"2xs": "h-6 gap-1 rounded px-1.5 text-xs [&_svg]:size-3.5"
|
|
311
|
+
};
|
|
312
|
+
const ICON_BUTTON_TEXT_STRETCH_SIZES = {
|
|
313
|
+
"2xl": "min-h-16 self-stretch gap-2 px-4 text-base [&_svg]:size-7",
|
|
314
|
+
xl: "min-h-12 self-stretch gap-2 px-3.5 text-sm [&_svg]:size-6",
|
|
315
|
+
lg: "min-h-11 self-stretch gap-2 px-3 text-sm [&_svg]:size-5",
|
|
316
|
+
md: "min-h-9 self-stretch gap-1.5 px-2.5 text-sm [&_svg]:size-5",
|
|
317
|
+
sm: "min-h-8 self-stretch gap-1.5 px-2 text-sm [&_svg]:size-5",
|
|
318
|
+
xs: "min-h-7 self-stretch gap-1 rounded px-1.5 text-xs [&_svg]:size-4",
|
|
319
|
+
"2xs": "min-h-6 self-stretch gap-1 rounded px-1.5 text-xs [&_svg]:size-3.5"
|
|
320
|
+
};
|
|
321
|
+
const ICON_BUTTON_TOUCH_LARGE = {
|
|
322
|
+
"2xl": "",
|
|
323
|
+
xl: "",
|
|
324
|
+
lg: "",
|
|
325
|
+
md: TOUCH_TARGET_LARGE,
|
|
326
|
+
sm: TOUCH_TARGET_LARGE,
|
|
327
|
+
xs: TOUCH_TARGET_LARGE,
|
|
328
|
+
"2xs": "relative large:after:absolute large:after:inset-[calc((100%-48px)/2)] large:after:content-['']"
|
|
329
|
+
};
|
|
252
330
|
const ICON_BUTTON_TONES = {
|
|
253
331
|
danger: {
|
|
254
|
-
quiet: "text-[var(--text-placeholder)] hover:bg-[var(--danger-bg)] hover:text-[var(--danger)] focus:ring-[var(--danger-border-strong)]",
|
|
255
|
-
toned: "text-[var(--danger)] hover:bg-[var(--danger-bg)] focus:ring-[var(--danger-border-strong)]"
|
|
332
|
+
quiet: "text-[var(--text-placeholder)] hover:bg-[var(--danger-bg)] hover:text-[var(--danger)] focus-visible:ring-[var(--danger-border-strong)]",
|
|
333
|
+
toned: "text-[var(--danger)] hover:bg-[var(--danger-bg)] focus-visible:ring-[var(--danger-border-strong)]"
|
|
256
334
|
},
|
|
257
335
|
warning: {
|
|
258
|
-
quiet: "text-[var(--text-placeholder)] hover:bg-[var(--warning-bg)] hover:text-[var(--warning)] focus:ring-[var(--warning-border)]",
|
|
259
|
-
toned: "text-[var(--warning)] hover:bg-[var(--warning-bg)] focus:ring-[var(--warning-border)]"
|
|
336
|
+
quiet: "text-[var(--text-placeholder)] hover:bg-[var(--warning-bg)] hover:text-[var(--warning)] focus-visible:ring-[var(--warning-border)]",
|
|
337
|
+
toned: "text-[var(--warning)] hover:bg-[var(--warning-bg)] focus-visible:ring-[var(--warning-border)]"
|
|
260
338
|
},
|
|
261
339
|
info: {
|
|
262
|
-
quiet: "text-[var(--text-placeholder)] hover:bg-[var(--info-bg)] hover:text-[var(--info)] focus:ring-[var(--info-border)]",
|
|
263
|
-
toned: "text-[var(--info)] hover:bg-[var(--info-bg)] focus:ring-[var(--info-border)]"
|
|
340
|
+
quiet: "text-[var(--text-placeholder)] hover:bg-[var(--info-bg)] hover:text-[var(--info)] focus-visible:ring-[var(--info-border)]",
|
|
341
|
+
toned: "text-[var(--info)] hover:bg-[var(--info-bg)] focus-visible:ring-[var(--info-border)]"
|
|
264
342
|
},
|
|
265
343
|
success: {
|
|
266
|
-
quiet: "text-[var(--text-placeholder)] hover:bg-[var(--success-bg)] hover:text-[var(--success)] focus:ring-[var(--success-border)]",
|
|
267
|
-
toned: "text-[var(--success)] hover:bg-[var(--success-bg)] focus:ring-[var(--success-border)]"
|
|
344
|
+
quiet: "text-[var(--text-placeholder)] hover:bg-[var(--success-bg)] hover:text-[var(--success)] focus-visible:ring-[var(--success-border)]",
|
|
345
|
+
toned: "text-[var(--success)] hover:bg-[var(--success-bg)] focus-visible:ring-[var(--success-border)]"
|
|
268
346
|
},
|
|
269
347
|
// The hover fill and the ring are MIXED from the one colour, since a custom tone
|
|
270
348
|
// brings no `-bg` / `-border` pair of its own. The fallback is the body colour, so a
|
|
271
349
|
// `custom` tone with no colour set is the default look rather than invisible.
|
|
272
350
|
custom: {
|
|
273
|
-
quiet: "text-[var(--text-placeholder)] hover:bg-[color-mix(in_srgb,var(--icon-button-tone,var(--text-primary))_12%,transparent)] hover:text-[var(--icon-button-tone,var(--text-primary))] focus:ring-[color-mix(in_srgb,var(--icon-button-tone,var(--text-primary))_40%,transparent)]",
|
|
274
|
-
toned: "text-[var(--icon-button-tone,var(--text-primary))] hover:bg-[color-mix(in_srgb,var(--icon-button-tone,var(--text-primary))_12%,transparent)] focus:ring-[color-mix(in_srgb,var(--icon-button-tone,var(--text-primary))_40%,transparent)]"
|
|
351
|
+
quiet: "text-[var(--text-placeholder)] hover:bg-[color-mix(in_srgb,var(--icon-button-tone,var(--text-primary))_12%,transparent)] hover:text-[var(--icon-button-tone,var(--text-primary))] focus-visible:ring-[color-mix(in_srgb,var(--icon-button-tone,var(--text-primary))_40%,transparent)]",
|
|
352
|
+
toned: "text-[var(--icon-button-tone,var(--text-primary))] hover:bg-[color-mix(in_srgb,var(--icon-button-tone,var(--text-primary))_12%,transparent)] focus-visible:ring-[color-mix(in_srgb,var(--icon-button-tone,var(--text-primary))_40%,transparent)]"
|
|
275
353
|
}
|
|
276
354
|
};
|
|
277
355
|
const ICON_BUTTON_MUTED = "text-[var(--text-placeholder)] hover:bg-[var(--bg-surface-2)] hover:text-[var(--text-primary)]";
|
|
@@ -301,8 +379,8 @@ const ICON_BUTTON_DISABLED_REST = {
|
|
|
301
379
|
};
|
|
302
380
|
const ICON_BUTTON_QUIET_DISABLED_REST = "disabled:hover:text-[var(--text-placeholder)]";
|
|
303
381
|
const ICON_BUTTON_PRESSED = "bg-[var(--brand-bg)] text-[var(--brand)] hover:bg-[var(--brand-bg-hover)] hover:text-[var(--brand)] disabled:hover:bg-[var(--brand-bg)] disabled:hover:text-[var(--brand)]";
|
|
304
|
-
const ICON_BUTTON_OVERLAY = "rounded-full bg-[color-mix(in_srgb,var(--bg-inverse)_60%,transparent)] text-[var(--text-inverse)] backdrop-blur-sm hover:bg-[color-mix(in_srgb,var(--bg-inverse)_75%,transparent)] focus:ring-[var(--text-inverse)]";
|
|
305
|
-
const ICON_BUTTON_SHUTTER = "rounded-full border-4 border-[var(--media-ink)] bg-[var(--media-scrim)] text-[var(--media-ink)] backdrop-blur-sm hover:bg-[var(--media-scrim-hover)] focus:ring-[var(--media-ink)] focus:ring-offset-2 focus:ring-offset-[var(--media-scrim-hover)]";
|
|
382
|
+
const ICON_BUTTON_OVERLAY = "rounded-full bg-[color-mix(in_srgb,var(--bg-inverse)_60%,transparent)] text-[var(--text-inverse)] backdrop-blur-sm hover:bg-[color-mix(in_srgb,var(--bg-inverse)_75%,transparent)] focus-visible:ring-[var(--text-inverse)]";
|
|
383
|
+
const ICON_BUTTON_SHUTTER = "rounded-full border-4 border-[var(--media-ink)] bg-[var(--media-scrim)] text-[var(--media-ink)] backdrop-blur-sm hover:bg-[var(--media-scrim-hover)] focus-visible:ring-[var(--media-ink)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--media-scrim-hover)]";
|
|
306
384
|
const ICON_BUTTON_GLYPH_SIZES = {
|
|
307
385
|
12: "[&_svg]:size-3",
|
|
308
386
|
14: "[&_svg]:size-3.5",
|
|
@@ -328,6 +406,16 @@ const ICON_BUTTON_SPINNER_GLYPH = {
|
|
|
328
406
|
24: "size-6",
|
|
329
407
|
28: "size-7"
|
|
330
408
|
};
|
|
409
|
+
function useIconButtonText(label, labelVisible, variant, tooltip) {
|
|
410
|
+
const large = useLargeText();
|
|
411
|
+
const compact = useContext(CompactControlsContext);
|
|
412
|
+
if (!large || label === void 0 || label === "" || !tooltip) return false;
|
|
413
|
+
const visible = labelVisible ?? (!compact && variant !== "overlay" && variant !== "shutter");
|
|
414
|
+
return visible;
|
|
415
|
+
}
|
|
416
|
+
function IconButtonText({ label }) {
|
|
417
|
+
return /* @__PURE__ */ jsx("span", { "data-slot": "icon-button-label", children: label });
|
|
418
|
+
}
|
|
331
419
|
const ICON_BUTTON_TONE_PAIR = "[--icon-button-tone:var(--icon-button-tone-light)] dark:[--icon-button-tone:var(--icon-button-tone-dark)]";
|
|
332
420
|
function toneColorStyle(toneColor, style) {
|
|
333
421
|
if (toneColor === void 0) return style;
|
|
@@ -342,11 +430,14 @@ function iconButtonLook({
|
|
|
342
430
|
shape,
|
|
343
431
|
tone,
|
|
344
432
|
quiet,
|
|
345
|
-
toneColor
|
|
433
|
+
toneColor,
|
|
434
|
+
withText = false
|
|
346
435
|
}) {
|
|
347
436
|
return cn(
|
|
348
437
|
ICON_BUTTON_BASE,
|
|
349
|
-
stretch ? ICON_BUTTON_STRETCH_SIZES[size] : ICON_BUTTON_SIZES[size],
|
|
438
|
+
withText ? cn("font-medium whitespace-nowrap", stretch ? ICON_BUTTON_TEXT_STRETCH_SIZES[size] : ICON_BUTTON_TEXT_SIZES[size]) : stretch ? ICON_BUTTON_STRETCH_SIZES[size] : ICON_BUTTON_SIZES[size],
|
|
439
|
+
// With text the pill is a 48 px target at any size; the square follows its size.
|
|
440
|
+
withText ? TOUCH_TARGET_LARGE : ICON_BUTTON_TOUCH_LARGE[size],
|
|
350
441
|
glyphSize !== void 0 && ICON_BUTTON_GLYPH_SIZES[glyphSize],
|
|
351
442
|
// After the size, so the overlay's `rounded-full` beats the small sizes' `rounded`.
|
|
352
443
|
variant === "overlay" ? ICON_BUTTON_OVERLAY : variant === "shutter" ? ICON_BUTTON_SHUTTER : buttonVariantClasses[variant],
|
|
@@ -392,6 +483,7 @@ function IconButtonLink({
|
|
|
392
483
|
shape = "square",
|
|
393
484
|
toneColor,
|
|
394
485
|
label,
|
|
486
|
+
labelVisible,
|
|
395
487
|
tooltip = true,
|
|
396
488
|
tooltipSide,
|
|
397
489
|
tooltipPortal,
|
|
@@ -404,10 +496,15 @@ function IconButtonLink({
|
|
|
404
496
|
rel,
|
|
405
497
|
onClick,
|
|
406
498
|
onKeyDown,
|
|
407
|
-
children,
|
|
499
|
+
children: glyph,
|
|
408
500
|
ref,
|
|
409
501
|
...rest
|
|
410
502
|
}) {
|
|
503
|
+
const withText = useIconButtonText(label, labelVisible, variant, tooltip);
|
|
504
|
+
const children = withText ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
505
|
+
glyph,
|
|
506
|
+
/* @__PURE__ */ jsx(IconButtonText, { label })
|
|
507
|
+
] }) : glyph;
|
|
411
508
|
const kitLink = useKitLink();
|
|
412
509
|
const common = useKitLabels("common", DEFAULT_COMMON_LABELS);
|
|
413
510
|
const tone = toneProp ?? (toneColor !== void 0 ? "custom" : "default");
|
|
@@ -424,7 +521,7 @@ function IconButtonLink({
|
|
|
424
521
|
onKeyDown?.(e);
|
|
425
522
|
};
|
|
426
523
|
const cls = cn(
|
|
427
|
-
iconButtonLook({ variant, size, stretch, glyphSize, shape, tone, quiet, toneColor }),
|
|
524
|
+
iconButtonLook({ variant, size, stretch, glyphSize, shape, tone, quiet, toneColor, withText }),
|
|
428
525
|
// BASE's `disabled:` classes never match an `<a>` — Button's disabled link look.
|
|
429
526
|
disabled && "pointer-events-none cursor-not-allowed opacity-50",
|
|
430
527
|
className
|
|
@@ -469,7 +566,7 @@ function IconButtonLink({
|
|
|
469
566
|
);
|
|
470
567
|
}
|
|
471
568
|
control = withIconButtonBadge(control, badge, stretch);
|
|
472
|
-
if (!tooltip || label === void 0 || label === "") return control;
|
|
569
|
+
if (!tooltip || withText || label === void 0 || label === "") return control;
|
|
473
570
|
return (
|
|
474
571
|
// A fragment, as on the button: the bubble says what `aria-label` already does.
|
|
475
572
|
/* @__PURE__ */ jsx(
|
|
@@ -496,11 +593,13 @@ function IconButtonElement({
|
|
|
496
593
|
shape = "square",
|
|
497
594
|
toneColor,
|
|
498
595
|
label,
|
|
596
|
+
labelVisible,
|
|
499
597
|
tooltip = true,
|
|
500
598
|
tooltipSide,
|
|
501
599
|
tooltipPortal,
|
|
502
600
|
tooltipLazy = true,
|
|
503
601
|
disabledReason: ownDisabledReason,
|
|
602
|
+
disabledReasonDisplay,
|
|
504
603
|
commit,
|
|
505
604
|
pending,
|
|
506
605
|
glyphSize,
|
|
@@ -521,12 +620,13 @@ function IconButtonElement({
|
|
|
521
620
|
}) {
|
|
522
621
|
const tone = toneProp ?? (toneColor !== void 0 ? "custom" : "default");
|
|
523
622
|
const keep = disabledStyle === "keep";
|
|
623
|
+
const withText = useIconButtonText(label, labelVisible, variant, tooltip);
|
|
524
624
|
const reasonId = useId();
|
|
525
625
|
const disabledReason = useCommitReason(commit, ownDisabledReason);
|
|
526
626
|
const locked = hasContent(disabledReason);
|
|
527
627
|
const inert = locked || Boolean(pending);
|
|
528
628
|
const ownDescribedBy = rest["aria-describedby"];
|
|
529
|
-
const button = /* @__PURE__ */
|
|
629
|
+
const button = /* @__PURE__ */ jsxs(
|
|
530
630
|
"button",
|
|
531
631
|
{
|
|
532
632
|
ref,
|
|
@@ -551,7 +651,7 @@ function IconButtonElement({
|
|
|
551
651
|
onKeyDown?.(e);
|
|
552
652
|
},
|
|
553
653
|
className: cn(
|
|
554
|
-
iconButtonLook({ variant, size, stretch, glyphSize, shape, tone, quiet, toneColor }),
|
|
654
|
+
iconButtonLook({ variant, size, stretch, glyphSize, shape, tone, quiet, toneColor, withText }),
|
|
555
655
|
pressed && ICON_BUTTON_PRESSED,
|
|
556
656
|
// The disabled look for the focusable kind of disabled, as on Button.
|
|
557
657
|
locked && (keep ? "cursor-default" : "cursor-not-allowed opacity-50"),
|
|
@@ -559,43 +659,45 @@ function IconButtonElement({
|
|
|
559
659
|
pending && "cursor-progress",
|
|
560
660
|
className
|
|
561
661
|
),
|
|
562
|
-
children:
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
662
|
+
children: [
|
|
663
|
+
pending ? (
|
|
664
|
+
// Decorative, as on Button: `aria-busy` says it. Sized to the glyph it stands
|
|
665
|
+
// in for, in the glyph's colour, so the swap does not change the button's look.
|
|
666
|
+
/* @__PURE__ */ jsx(
|
|
667
|
+
Spinner,
|
|
668
|
+
{
|
|
669
|
+
label: null,
|
|
670
|
+
className: cn(
|
|
671
|
+
"border-current/30 border-t-current",
|
|
672
|
+
glyphSize !== void 0 ? ICON_BUTTON_SPINNER_GLYPH[glyphSize] : ICON_BUTTON_SPINNER[size]
|
|
673
|
+
)
|
|
674
|
+
}
|
|
675
|
+
)
|
|
676
|
+
) : children,
|
|
677
|
+
withText && /* @__PURE__ */ jsx(IconButtonText, { label })
|
|
678
|
+
]
|
|
576
679
|
}
|
|
577
680
|
);
|
|
578
681
|
const control = withIconButtonBadge(button, badge, stretch);
|
|
579
682
|
if (locked) {
|
|
580
683
|
return (
|
|
581
|
-
// Button's shape: the
|
|
582
|
-
//
|
|
684
|
+
// Button's shape: the reason as a line under it, or the bubble with a hidden copy
|
|
685
|
+
// for the description (see ReasonFrame).
|
|
583
686
|
/* @__PURE__ */ jsx(
|
|
584
|
-
|
|
687
|
+
ReasonFrame,
|
|
585
688
|
{
|
|
586
|
-
|
|
689
|
+
reason: disabledReason,
|
|
690
|
+
reasonId,
|
|
691
|
+
display: disabledReasonDisplay,
|
|
587
692
|
side: tooltipSide,
|
|
588
693
|
portal: tooltipPortal,
|
|
589
694
|
className: stretch ? "self-stretch" : void 0,
|
|
590
|
-
children:
|
|
591
|
-
control,
|
|
592
|
-
/* @__PURE__ */ jsx("span", { id: reasonId, hidden: true, children: disabledReason })
|
|
593
|
-
] })
|
|
695
|
+
children: control
|
|
594
696
|
}
|
|
595
697
|
)
|
|
596
698
|
);
|
|
597
699
|
}
|
|
598
|
-
if (!tooltip || label === void 0 || label === "") return control;
|
|
700
|
+
if (!tooltip || withText || label === void 0 || label === "") return control;
|
|
599
701
|
return (
|
|
600
702
|
// A fragment, so Tooltip leaves the button's description alone: the bubble says
|
|
601
703
|
// exactly what `aria-label` already does. Lazy by default — see `tooltipLazy`.
|
|
@@ -612,7 +714,9 @@ function IconButtonElement({
|
|
|
612
714
|
)
|
|
613
715
|
);
|
|
614
716
|
}
|
|
615
|
-
const
|
|
717
|
+
const FIELD_TOUCH_TEXT = "pointer-coarse:text-[length:max(0.875rem,16px)]";
|
|
718
|
+
const FIELD_BASE = "block w-full rounded-md border border-[var(--border)] bg-[var(--bg-surface)] px-3 py-2 text-sm text-[var(--text-primary)] shadow-sm placeholder:text-[var(--text-placeholder)] focus:border-[var(--brand)] focus:ring-[var(--brand)] " + // §10.1: at least 16 px on a touch screen, or iOS zooms the page on focus.
|
|
719
|
+
FIELD_TOUCH_TEXT + " disabled:cursor-default disabled:bg-[var(--bg-surface-2)] disabled:text-[var(--text-muted)] [&[readonly]]:bg-[var(--bg-surface-2)] [&[readonly]]:text-[var(--text-muted)]";
|
|
616
720
|
const FIELD_WRITABLE_LOOK = "[&[readonly]]:bg-[var(--bg-surface)] [&[readonly]]:text-[var(--text-primary)]";
|
|
617
721
|
const FIELD_FLOATING_PAD = "pt-4 pb-1";
|
|
618
722
|
const FIELD_INVALID = "border-[var(--danger-border-strong)] ring-1 ring-[var(--danger-border-strong)] focus:border-[var(--danger)] focus:ring-[var(--danger)]";
|
|
@@ -640,15 +744,15 @@ function FieldChevron({ className, ...rest }) {
|
|
|
640
744
|
const FLOATING_LABEL_CLASS = cn(
|
|
641
745
|
"pointer-events-none absolute start-3 top-2.5 text-sm text-[var(--text-placeholder)] transition-all",
|
|
642
746
|
"max-w-[calc(100%-1.5rem)] truncate",
|
|
643
|
-
"peer-focus:top-1 peer-focus:text-
|
|
644
|
-
"peer-[:not(:placeholder-shown)]:top-1 peer-[:not(:placeholder-shown)]:text-
|
|
747
|
+
"peer-focus:top-1 peer-focus:text-caption peer-focus:leading-tight peer-focus:text-[var(--text-secondary)]",
|
|
748
|
+
"peer-[:not(:placeholder-shown)]:top-1 peer-[:not(:placeholder-shown)]:text-caption peer-[:not(:placeholder-shown)]:leading-tight peer-[:not(:placeholder-shown)]:text-[var(--text-secondary)]",
|
|
645
749
|
"peer-disabled:opacity-50"
|
|
646
750
|
);
|
|
647
751
|
const FLOATING_ROW_CLASS = cn(
|
|
648
752
|
"pointer-events-none absolute start-3 top-2.5 flex items-center gap-1 transition-all",
|
|
649
753
|
"max-w-[calc(100%-3rem)] text-sm text-[var(--text-placeholder)]",
|
|
650
|
-
"peer-focus:top-1 peer-focus:text-
|
|
651
|
-
"peer-[:not(:placeholder-shown)]:top-1 peer-[:not(:placeholder-shown)]:text-
|
|
754
|
+
"peer-focus:top-1 peer-focus:text-caption peer-focus:leading-tight peer-focus:text-[var(--text-secondary)]",
|
|
755
|
+
"peer-[:not(:placeholder-shown)]:top-1 peer-[:not(:placeholder-shown)]:text-caption peer-[:not(:placeholder-shown)]:leading-tight peer-[:not(:placeholder-shown)]:text-[var(--text-secondary)]",
|
|
652
756
|
"peer-disabled:opacity-50"
|
|
653
757
|
);
|
|
654
758
|
function FloatingField({
|
|
@@ -698,33 +802,6 @@ function FloatingField({
|
|
|
698
802
|
] })
|
|
699
803
|
);
|
|
700
804
|
}
|
|
701
|
-
function FieldHint({
|
|
702
|
-
label,
|
|
703
|
-
side = "start",
|
|
704
|
-
className,
|
|
705
|
-
"aria-label": ariaLabel,
|
|
706
|
-
...rest
|
|
707
|
-
}) {
|
|
708
|
-
return (
|
|
709
|
-
// `tap="toggle"` (0.25): the "?" exists only to explain, so a tap on a phone shows
|
|
710
|
-
// the bubble and the next tap hides it — the touch rule (no bubble left behind by a
|
|
711
|
-
// tap) would otherwise make it show nothing at all.
|
|
712
|
-
/* @__PURE__ */ jsx(Tooltip, { label, side, portal: true, tap: "toggle", children: /* @__PURE__ */ jsx(
|
|
713
|
-
"button",
|
|
714
|
-
{
|
|
715
|
-
...rest,
|
|
716
|
-
type: "button",
|
|
717
|
-
"aria-label": ariaLabel ?? label,
|
|
718
|
-
onClick: (e) => e.preventDefault(),
|
|
719
|
-
className: cn(
|
|
720
|
-
"flex text-[var(--text-placeholder)] transition-colors hover:text-[var(--text-secondary)]",
|
|
721
|
-
className
|
|
722
|
-
),
|
|
723
|
-
children: /* @__PURE__ */ jsx(HelpCircle, { className: "size-3.5" })
|
|
724
|
-
}
|
|
725
|
-
) })
|
|
726
|
-
);
|
|
727
|
-
}
|
|
728
805
|
function Label({ required, size = "md", disabled, className, children, ...rest }) {
|
|
729
806
|
return /* @__PURE__ */ jsxs(
|
|
730
807
|
"label",
|
|
@@ -743,7 +820,7 @@ function Label({ required, size = "md", disabled, className, children, ...rest }
|
|
|
743
820
|
}
|
|
744
821
|
);
|
|
745
822
|
}
|
|
746
|
-
const FIELD_ERROR_CLASS = "mt-1 text-
|
|
823
|
+
const FIELD_ERROR_CLASS = "mt-1 text-caption leading-tight text-[var(--danger)]";
|
|
747
824
|
function useFieldError(error, invalid, describedBy, ariaInvalid) {
|
|
748
825
|
const errorId = useId();
|
|
749
826
|
const hasError = error !== void 0 && error !== null && error !== false && error !== "";
|
|
@@ -816,7 +893,7 @@ function CharacterCount({
|
|
|
816
893
|
{
|
|
817
894
|
"aria-hidden": true,
|
|
818
895
|
className: cn(
|
|
819
|
-
"shrink-0 text-
|
|
896
|
+
"shrink-0 text-caption leading-tight tabular-nums",
|
|
820
897
|
zone === "limit" ? "text-[var(--danger)]" : zone === "near" ? "text-[var(--warning)]" : "text-[var(--text-muted)]"
|
|
821
898
|
),
|
|
822
899
|
children: [
|
|
@@ -892,7 +969,7 @@ const Input = forwardRef(function Input2(props, ref) {
|
|
|
892
969
|
length.track(e.target.value);
|
|
893
970
|
rest.onChange?.(e);
|
|
894
971
|
} : rest.onChange;
|
|
895
|
-
const asDisplay =
|
|
972
|
+
const asDisplay = usePhoneLayout() && variant === "display";
|
|
896
973
|
const isPassword = type === "password";
|
|
897
974
|
const [revealed, setRevealed] = useState(false);
|
|
898
975
|
const effectiveType = isPassword && revealed ? "text" : type;
|
|
@@ -912,7 +989,10 @@ const Input = forwardRef(function Input2(props, ref) {
|
|
|
912
989
|
disabled: rest.disabled,
|
|
913
990
|
"aria-label": revealed ? passwordText.hide : passwordText.show,
|
|
914
991
|
"aria-pressed": revealed,
|
|
915
|
-
className:
|
|
992
|
+
className: cn(
|
|
993
|
+
"absolute inset-y-0 end-0 flex items-center rounded-e-md px-2.5 text-[var(--text-placeholder)] transition-colors hover:text-[var(--text-secondary)] focus:outline-none disabled:cursor-default disabled:opacity-50",
|
|
994
|
+
FOCUS_RING
|
|
995
|
+
),
|
|
916
996
|
children: revealed ? /* @__PURE__ */ jsx(EyeOff, { className: "size-4" }) : /* @__PURE__ */ jsx(Eye, { className: "size-4" })
|
|
917
997
|
}
|
|
918
998
|
) : null;
|
|
@@ -1031,7 +1111,7 @@ const Select = forwardRef(function Select2(props, ref) {
|
|
|
1031
1111
|
rest["aria-invalid"]
|
|
1032
1112
|
);
|
|
1033
1113
|
const below = textHint || errorEl !== null ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1034
|
-
textHint && /* @__PURE__ */ jsx("p", { id: hintId, className: "mt-1 text-
|
|
1114
|
+
textHint && /* @__PURE__ */ jsx("p", { id: hintId, className: "mt-1 text-caption leading-tight text-[var(--text-muted)]", children: hint }),
|
|
1035
1115
|
errorEl
|
|
1036
1116
|
] }) : null;
|
|
1037
1117
|
const chevron = rest.disabled || listBox || locked ? null : /* @__PURE__ */ jsx(FieldChevron, { className: small ? "end-1.5 size-3.5" : void 0 });
|
|
@@ -1145,7 +1225,7 @@ function labelEdge(scrollTop, lineHeight) {
|
|
|
1145
1225
|
return { height: Math.min(gone, LABEL_EDGE_SOFT_PX), solid: 0 };
|
|
1146
1226
|
}
|
|
1147
1227
|
const TEXTAREA_LABEL_STRIP = cn(
|
|
1148
|
-
"pointer-events-none absolute inset-x-px top-px hidden h-4 rounded-t-[
|
|
1228
|
+
"pointer-events-none absolute inset-x-px top-px hidden h-4 rounded-t-[calc(0.375rem-1px)] bg-[var(--bg-surface)]",
|
|
1149
1229
|
"peer-focus:block peer-[:not(:placeholder-shown)]:block",
|
|
1150
1230
|
"peer-disabled:bg-[var(--bg-surface-2)] peer-[[readonly]]:bg-[var(--bg-surface-2)]",
|
|
1151
1231
|
TEXTAREA_LABEL_EDGE
|
|
@@ -1298,8 +1378,8 @@ const CARD_PADDING = {
|
|
|
1298
1378
|
};
|
|
1299
1379
|
const CARD_PADDING_STRONG = {
|
|
1300
1380
|
none: "p-0",
|
|
1301
|
-
sm: "p-[
|
|
1302
|
-
md: "p-[
|
|
1381
|
+
sm: "p-[calc(0.75rem-1px)]",
|
|
1382
|
+
md: "p-[calc(1rem-1px)]"
|
|
1303
1383
|
};
|
|
1304
1384
|
const CARD_TONE_WASH = {
|
|
1305
1385
|
warning: "bg-[image:linear-gradient(var(--warning-bg),var(--warning-bg))]",
|
|
@@ -1540,19 +1620,19 @@ const DEFAULT_TABS_LABELS = {
|
|
|
1540
1620
|
};
|
|
1541
1621
|
const TABLIST_CLASSES = "flex gap-1 overflow-x-auto overflow-y-hidden border-b border-[var(--border)]";
|
|
1542
1622
|
const TABLIST_VERTICAL_CLASSES = "flex flex-col gap-0.5";
|
|
1543
|
-
const TAB_VERTICAL_CLASSES = "flex w-full items-center rounded-md px-3 py-2 text-start text-sm font-medium transition-colors focus:outline-none focus
|
|
1623
|
+
const TAB_VERTICAL_CLASSES = FOCUS_RING_WIDTH + " 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-[var(--border-strong)]";
|
|
1544
1624
|
const TAB_VERTICAL_ACTIVE_CLASSES = "bg-[var(--bg-active)] text-[var(--text-primary)]";
|
|
1545
1625
|
const TAB_VERTICAL_INACTIVE_CLASSES = "text-[var(--text-muted)] hover:bg-[var(--bg-hover)] hover:text-[var(--text-primary)]";
|
|
1546
1626
|
const TABLIST_WRAP_CLASSES = "flex flex-wrap gap-1.5 md:flex-nowrap md:gap-1 md:overflow-x-auto md:overflow-y-hidden md:border-b md:border-[var(--border)]";
|
|
1547
|
-
const TAB_CLASSES = "max-w-full whitespace-nowrap px-3 py-2 text-sm font-medium transition-colors border-b-2 -mb-px focus:outline-none focus
|
|
1627
|
+
const TAB_CLASSES = FOCUS_RING_WIDTH + " 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-[var(--border-strong)]";
|
|
1548
1628
|
const TAB_ACTIVE_CLASSES = "border-[var(--text-primary)] text-[var(--text-primary)]";
|
|
1549
1629
|
const TAB_INACTIVE_CLASSES = "border-transparent text-[var(--text-muted)] hover:text-[var(--text-secondary)] hover:border-[var(--border-strong)]";
|
|
1550
|
-
const TAB_WRAP_CLASSES = "max-w-full whitespace-nowrap rounded-md px-2.5 py-2 text-xs font-medium transition-colors focus:outline-none focus
|
|
1630
|
+
const TAB_WRAP_CLASSES = FOCUS_RING_WIDTH + " max-w-full whitespace-nowrap rounded-md px-2.5 py-2 text-xs font-medium transition-colors focus:outline-none focus-visible:ring-[var(--border-strong)] md:rounded-none md:border-b-2 md:-mb-px md:bg-transparent md:px-3 md:py-2 md:text-sm";
|
|
1551
1631
|
const TAB_WRAP_ACTIVE_CLASSES = "bg-[var(--brand)] text-[var(--brand-contrast)] md:border-[var(--text-primary)] md:text-[var(--text-primary)]";
|
|
1552
1632
|
const TAB_WRAP_INACTIVE_CLASSES = "bg-[var(--bg-surface)] text-[var(--text-primary)] md:border-transparent md:text-[var(--text-muted)] md:hover:border-[var(--border-strong)] md:hover:text-[var(--text-secondary)]";
|
|
1553
1633
|
const TAB_REMOVABLE_CLASSES = "pe-8 md:pe-8";
|
|
1554
1634
|
const TAB_EMPTY_CLASSES = "-mx-1.5 rounded border border-dashed border-[var(--border-strong)] px-1.5";
|
|
1555
|
-
const TAB_ADD_CLASSES = "inline-flex items-center gap-1 whitespace-nowrap rounded-md px-3 py-2 text-sm font-medium text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)] focus:outline-none focus
|
|
1635
|
+
const TAB_ADD_CLASSES = FOCUS_RING_WIDTH + " inline-flex items-center gap-1 whitespace-nowrap rounded-md px-3 py-2 text-sm font-medium text-[var(--text-muted)] transition-colors hover:text-[var(--text-primary)] focus:outline-none focus-visible:ring-[var(--border-strong)] disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:size-4";
|
|
1556
1636
|
const TAB_ADD_WRAP_CLASSES = "px-2.5 text-xs md:px-3 md:text-sm";
|
|
1557
1637
|
const TAB_ADD_PHONE_CLASSES = "relative max-md:px-2";
|
|
1558
1638
|
function Tabs({
|
|
@@ -1574,7 +1654,7 @@ function Tabs({
|
|
|
1574
1654
|
...rest
|
|
1575
1655
|
}) {
|
|
1576
1656
|
const text = useKitLabels("tabs", DEFAULT_TABS_LABELS, labels);
|
|
1577
|
-
const phone =
|
|
1657
|
+
const phone = usePhoneLayout();
|
|
1578
1658
|
const vertical = orientation === "vertical" && !phone;
|
|
1579
1659
|
const stripRef = useRef(null);
|
|
1580
1660
|
const fade = useStripFade(stripRef);
|
|
@@ -1694,7 +1774,7 @@ function Tabs({
|
|
|
1694
1774
|
"span",
|
|
1695
1775
|
{
|
|
1696
1776
|
className: cn(
|
|
1697
|
-
"max-w-full truncate text-
|
|
1777
|
+
"max-w-full truncate text-caption font-normal leading-tight text-[var(--text-muted)]",
|
|
1698
1778
|
// On a wrapped strip's filled chip (below `md`) the muted grey
|
|
1699
1779
|
// was dark text on the brand fill — "loop 2" all but vanished
|
|
1700
1780
|
// under the one label that most needed reading. It takes the
|
|
@@ -1816,19 +1896,25 @@ export {
|
|
|
1816
1896
|
CardFooter,
|
|
1817
1897
|
CardHeader,
|
|
1818
1898
|
CardTitle,
|
|
1899
|
+
CompactControls,
|
|
1819
1900
|
DEFAULT_CHARACTER_COUNT_LABELS,
|
|
1820
1901
|
DEFAULT_PASSWORD_REVEAL_LABELS,
|
|
1821
1902
|
DEFAULT_TABS_LABELS,
|
|
1903
|
+
DISABLED_REASON_LINE_CLASS,
|
|
1904
|
+
DisabledReasonLine2 as DisabledReasonLine,
|
|
1822
1905
|
EmptyState,
|
|
1823
1906
|
FIELD_BASE,
|
|
1824
1907
|
FIELD_DISPLAY,
|
|
1825
1908
|
FIELD_FLOATING_PAD,
|
|
1826
1909
|
FIELD_INVALID,
|
|
1910
|
+
FIELD_TOUCH_TEXT,
|
|
1827
1911
|
FIELD_TRIGGER,
|
|
1828
1912
|
FIELD_WRITABLE_LOOK,
|
|
1829
1913
|
FLOATING_INPUT_CLASS,
|
|
1830
1914
|
FLOATING_LABEL_CLASS,
|
|
1831
1915
|
FLOATING_LABEL_STATIC2 as FLOATING_LABEL_STATIC,
|
|
1916
|
+
FOCUS_RING2 as FOCUS_RING,
|
|
1917
|
+
FOCUS_RING_WIDTH2 as FOCUS_RING_WIDTH,
|
|
1832
1918
|
FieldChevron,
|
|
1833
1919
|
FieldHint,
|
|
1834
1920
|
FieldLabel,
|
|
@@ -1839,9 +1925,11 @@ export {
|
|
|
1839
1925
|
PHONE_QUERY,
|
|
1840
1926
|
Select,
|
|
1841
1927
|
Spinner,
|
|
1928
|
+
TOUCH_TARGET_LARGE,
|
|
1842
1929
|
Tabs,
|
|
1843
1930
|
Textarea,
|
|
1844
1931
|
buttonClasses,
|
|
1845
|
-
resolvePasswordRevealLabels
|
|
1932
|
+
resolvePasswordRevealLabels,
|
|
1933
|
+
useDisabledReasonLine2 as useDisabledReasonLine
|
|
1846
1934
|
};
|
|
1847
1935
|
//# sourceMappingURL=ui.js.map
|