@eifi1/ui-kit 0.31.1 → 0.32.1
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 +51 -28
- package/dist/account/delete-account-setting.d.ts +8 -3
- package/dist/admin/admin-action-confirm.d.ts +8 -3
- package/dist/admin/admin-action-log.d.ts +1 -1
- package/dist/admin/admin-action-log.js +4 -2
- package/dist/admin/admin-action-log.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/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 +76 -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/chart.js.map +1 -1
- 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 +5 -4
- 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 +38 -0
- package/dist/components/appearance-labels.js +19 -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/button-group.js +7 -1
- package/dist/components/button-group.js.map +1 -1
- 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 +54 -23
- package/dist/components/chip.js.map +1 -1
- package/dist/components/choice-card.d.ts +1 -1
- package/dist/components/choice-card.js +9 -8
- 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/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 +3 -2
- package/dist/components/data-table-pagination.js +15 -6
- package/dist/components/data-table-pagination.js.map +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 +18 -6
- 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 +10 -4
- 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 +50 -39
- 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 +4 -4
- 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 +231 -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 +57 -8
- package/dist/components/settings-fields.js +39 -1
- package/dist/components/settings-fields.js.map +1 -1
- package/dist/components/share-card.d.ts +11 -6
- package/dist/components/share-card.js +8 -2
- 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/status-dot.js +9 -2
- package/dist/components/status-dot.js.map +1 -1
- package/dist/components/swipeable-row.js +10 -2
- 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 +25 -3
- 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-editor.js +1 -1
- package/dist/components/translation-review-editor.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 +207 -119
- 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/components/wizard-stepper.js +20 -14
- package/dist/components/wizard-stepper.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-CpIhzxxZ.d.ts → delete-account-setting-FLyJf-kZ.d.ts} +642 -60
- 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 +88 -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 +94 -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 +89 -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 +91 -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 +91 -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 +92 -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 +89 -3
- package/dist/i18n/locales/zh.js.map +1 -1
- package/dist/i18n/review.d.ts +8 -3
- package/dist/i18n/review.js +15 -1
- package/dist/i18n/review.js.map +1 -1
- package/dist/index.d.ts +27 -11
- package/dist/index.js +77 -4
- package/dist/index.js.map +1 -1
- package/dist/landing/landing-actions.d.ts +8 -3
- package/dist/landing/landing-sections.d.ts +8 -3
- package/dist/landing/landing-sections.js +7 -3
- package/dist/landing/landing-sections.js.map +1 -1
- 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 +8 -3
- 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-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 +9 -5
- 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 +110 -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 +173 -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/wizard-summary.js +1 -1
- package/dist/wizard/wizard-summary.js.map +1 -1
- package/dist/wizard.d.ts +8 -3
- package/package.json +1 -1
- package/src/admin/admin-action-log.tsx +6 -1
- 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/billing/billing-banner.tsx +205 -0
- package/src/billing/billing-labels.ts +240 -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/chart.ts +2 -0
- package/src/components/account-chips.tsx +36 -10
- package/src/components/alert-banner.tsx +16 -7
- package/src/components/amount-input.tsx +5 -5
- package/src/components/appearance-labels.ts +47 -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/button-group.tsx +21 -0
- 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 +139 -30
- package/src/components/choice-card.tsx +16 -11
- 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/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-pagination.tsx +60 -31
- package/src/components/data-table.tsx +164 -43
- package/src/components/date-picker.tsx +44 -10
- 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 +26 -4
- 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 +15 -6
- 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 +9 -4
- package/src/components/pie-chart.tsx +19 -9
- package/src/components/popover.tsx +22 -5
- package/src/components/row-actions.tsx +450 -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 +89 -5
- package/src/components/share-card.tsx +31 -2
- 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/status-dot.tsx +25 -2
- package/src/components/swipeable-row.tsx +10 -2
- 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 +115 -14
- package/src/components/toggle-legend.tsx +53 -8
- package/src/components/translation-review-editor.tsx +1 -1
- package/src/components/translation-review.tsx +11 -5
- package/src/components/tree-view.tsx +3 -2
- package/src/components/treemap.tsx +27 -10
- package/src/components/ui.tsx +353 -153
- package/src/components/user-avatar.tsx +1 -1
- package/src/components/wizard-stepper.tsx +5 -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 +132 -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 +107 -0
- package/src/i18n/kit-labels.tsx +12 -0
- package/src/i18n/locales/es.ts +98 -0
- package/src/i18n/locales/fr.ts +102 -0
- package/src/i18n/locales/hu.ts +100 -0
- package/src/i18n/locales/it.ts +103 -0
- package/src/i18n/locales/zh.ts +94 -0
- package/src/i18n/review.ts +14 -0
- package/src/index.ts +76 -6
- package/src/landing/landing-sections.tsx +7 -3
- package/src/landing/public-header.tsx +4 -4
- 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-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/theme/contrast-tokens.ts +112 -0
- package/src/theme/contrast.ts +225 -0
- package/src/theme/palette-presets.ts +24 -4
- package/src/theme/palette-store.ts +6 -1
- package/src/theme/text-size.ts +283 -0
- package/src/wizard/wizard-summary.tsx +4 -2
- package/tokens.css +158 -8
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
import { useEffect, useMemo, useSyncExternalStore } from "react";
|
|
2
|
+
import { create } from "zustand";
|
|
3
|
+
import { persist } from "zustand/middleware";
|
|
4
|
+
import { logger } from "../lib/logger";
|
|
5
|
+
import { readStored } from "../lib/safe-storage";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* The text size (docs/text-size-harmonization.md §2.1, §3.1, §10.3, §10.6).
|
|
9
|
+
*
|
|
10
|
+
* ONE scale on `<html>`: `data-text-size="normal|large|xlarge"`, and `tokens.css` turns
|
|
11
|
+
* it into `font-size: 100% / 125% / 150%` — percent, never px, so "Normal" keeps
|
|
12
|
+
* whatever size the person set in the browser. Tailwind's spacing and type are rem, so
|
|
13
|
+
* about 90 % of every screen grows with that one declaration; the breakpoints follow too
|
|
14
|
+
* (tokens.css redefines `sm:` … `3xl:` per size, {@link useBreakpoint} answers the same
|
|
15
|
+
* in JS).
|
|
16
|
+
*
|
|
17
|
+
* The names below are the mechanism's public vocabulary and are FROZEN: an app's
|
|
18
|
+
* storage, its `/auth/me` column (server-kit's `TEXT_SIZES`) and the inline boot snippet
|
|
19
|
+
* all spell them this way.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/** The three steps, in order (§2.1, §10.6): server-kit's `TEXT_SIZES`, value for value. */
|
|
23
|
+
export const TEXT_SIZES = ["normal", "large", "xlarge"] as const;
|
|
24
|
+
|
|
25
|
+
export type TextSize = (typeof TEXT_SIZES)[number];
|
|
26
|
+
|
|
27
|
+
/** The root font size each step sets, as a factor of the browser's own (tokens.css). For
|
|
28
|
+
* what CSS cannot reach: a canvas or SVG chart's px constants, a windowed list's row
|
|
29
|
+
* estimate, a popover width in px (§3.2). */
|
|
30
|
+
export const TEXT_SCALE: Readonly<Record<TextSize, number>> = { normal: 1, large: 1.25, xlarge: 1.5 };
|
|
31
|
+
|
|
32
|
+
/** The attribute on `<html>` that carries the size. */
|
|
33
|
+
const TEXT_SIZE_ATTRIBUTE = "data-text-size";
|
|
34
|
+
|
|
35
|
+
export function isTextSize(value: unknown): value is TextSize {
|
|
36
|
+
return value === "normal" || value === "large" || value === "xlarge";
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The size in force: **this device's own choice → the account's → Normal** (§2.2, §2.6).
|
|
41
|
+
* Each is taken only when it is one of {@link TEXT_SIZES}; anything else (a stale value,
|
|
42
|
+
* `null` = never chosen) falls through to the next. The one order the pre-paint call, the
|
|
43
|
+
* apply hook and `useAccountAppearance` all use, so the three can never disagree.
|
|
44
|
+
*/
|
|
45
|
+
export function resolveTextSize(device: unknown, account?: unknown): TextSize {
|
|
46
|
+
if (isTextSize(device)) return device;
|
|
47
|
+
if (isTextSize(account)) return account;
|
|
48
|
+
return "normal";
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* ── <html data-text-size> and the subscribers that read it ─────────────── */
|
|
52
|
+
|
|
53
|
+
const listeners = new Set<() => void>();
|
|
54
|
+
let observer: MutationObserver | null = null;
|
|
55
|
+
|
|
56
|
+
function notify(): void {
|
|
57
|
+
for (const listener of listeners) listener();
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function subscribe(listener: () => void): () => void {
|
|
61
|
+
listeners.add(listener);
|
|
62
|
+
// Also catches writers that are not this module — the inline boot snippet, an app
|
|
63
|
+
// setting the attribute by hand, a test.
|
|
64
|
+
if (!observer && typeof MutationObserver !== "undefined" && typeof document !== "undefined") {
|
|
65
|
+
observer = new MutationObserver(notify);
|
|
66
|
+
observer.observe(document.documentElement, { attributes: true, attributeFilter: [TEXT_SIZE_ATTRIBUTE] });
|
|
67
|
+
}
|
|
68
|
+
return () => {
|
|
69
|
+
listeners.delete(listener);
|
|
70
|
+
if (listeners.size === 0) {
|
|
71
|
+
observer?.disconnect();
|
|
72
|
+
observer = null;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/** The size `<html>` carries now; Normal without one (or outside a browser). */
|
|
78
|
+
export function readTextSize(): TextSize {
|
|
79
|
+
if (typeof document === "undefined") return "normal";
|
|
80
|
+
const value = document.documentElement.getAttribute(TEXT_SIZE_ATTRIBUTE);
|
|
81
|
+
return isTextSize(value) ? value : "normal";
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** Put `size` on `<html>`. Every {@link useTextSize} re-renders with it. */
|
|
85
|
+
export function applyTextSize(size: TextSize): void {
|
|
86
|
+
if (typeof document === "undefined") return;
|
|
87
|
+
const root = document.documentElement;
|
|
88
|
+
if (root.getAttribute(TEXT_SIZE_ATTRIBUTE) === size) return;
|
|
89
|
+
root.setAttribute(TEXT_SIZE_ATTRIBUTE, size);
|
|
90
|
+
notify();
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface TextSizeInfo {
|
|
94
|
+
size: TextSize;
|
|
95
|
+
/** {@link TEXT_SCALE} for `size`: 1, 1.25 or 1.5. */
|
|
96
|
+
scale: number;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The size in force on this page, and its scale (§3.1) — read from `<html>`, so it needs
|
|
101
|
+
* no store and works in every kit component: whoever applied the size (the app's store,
|
|
102
|
+
* the pre-paint call, the inline snippet), this follows it.
|
|
103
|
+
*
|
|
104
|
+
* Only for what CSS cannot do. A class that should differ at Large is a `large:`
|
|
105
|
+
* variant; a layout switch is a breakpoint, which already scales.
|
|
106
|
+
*/
|
|
107
|
+
export function useTextSize(): TextSizeInfo {
|
|
108
|
+
const size = useSyncExternalStore(subscribe, readTextSize, () => "normal" as const);
|
|
109
|
+
return useMemo(() => ({ size, scale: TEXT_SCALE[size] }), [size]);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
/* ── Storage: the frozen format, the pre-paint call ─────────────────────── */
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* What a text-size store persists under its key — zustand's persist envelope, and FROZEN
|
|
116
|
+
* (§10.3) because an app's inline `<head>` snippet reads it before any module loads:
|
|
117
|
+
*
|
|
118
|
+
* {"state":{"size":"large"},"version":1}
|
|
119
|
+
*
|
|
120
|
+
* `size` is one of {@link TEXT_SIZES}, or `null` / absent when this device never chose.
|
|
121
|
+
* A future change adds a key; it never renames `state.size` or changes its values.
|
|
122
|
+
*
|
|
123
|
+
* A hand-written seed (a test, a screenshot script) must carry `"version":1`: the store
|
|
124
|
+
* drops a stored state of another version as a migration it doesn't know, silently
|
|
125
|
+
* (keksdose's 0.32 report). The inline snippet reads `state.size` whatever the version,
|
|
126
|
+
* so the two would disagree. In the kit's showcase, `?text-size=` needs no seed.
|
|
127
|
+
*/
|
|
128
|
+
export interface PersistedTextSize {
|
|
129
|
+
state?: { size?: TextSize | null };
|
|
130
|
+
version?: number;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** This device's own choice under `storageKey`, or `null` when it never chose (or the
|
|
134
|
+
* storage is blocked, malformed, or holds a value that is not a size). */
|
|
135
|
+
export function readPersistedTextSize(storageKey: string): TextSize | null {
|
|
136
|
+
try {
|
|
137
|
+
const blob = JSON.parse(readStored(storageKey) ?? "null") as PersistedTextSize | null;
|
|
138
|
+
const size = blob?.state?.size;
|
|
139
|
+
return isTextSize(size) ? size : null;
|
|
140
|
+
} catch {
|
|
141
|
+
return null;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export interface PersistedAppearanceOptions {
|
|
146
|
+
/**
|
|
147
|
+
* The account's last known value, for a device without a choice of its own (§10.3):
|
|
148
|
+
* what the app persisted with its user (keksdose keeps `/auth/me` in localStorage), so
|
|
149
|
+
* a cold boot paints the account's size instead of Normal and then jumping — offline
|
|
150
|
+
* too. Called once, guarded: a throw counts as "no account value".
|
|
151
|
+
*/
|
|
152
|
+
account?: () => string | null | undefined;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function readAccount(account: PersistedAppearanceOptions["account"]): unknown {
|
|
156
|
+
if (!account) return undefined;
|
|
157
|
+
try {
|
|
158
|
+
return account();
|
|
159
|
+
} catch {
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Pre-paint (§3.1, §10.3): read this device's choice under `storageKey` — else the
|
|
166
|
+
* account's last known value — and put it on `<html>` BEFORE `createRoot`, next to
|
|
167
|
+
* `applyPersistedTheme`, so the first paint already has the right size. Returns the size
|
|
168
|
+
* applied.
|
|
169
|
+
*
|
|
170
|
+
* ```ts
|
|
171
|
+
* applyPersistedTextSize("keksdose-text-size", {
|
|
172
|
+
* account: () => readPersistedUser()?.text_size,
|
|
173
|
+
* });
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
export function applyPersistedTextSize(storageKey: string, options: PersistedAppearanceOptions = {}): TextSize {
|
|
177
|
+
const size = resolveTextSize(readPersistedTextSize(storageKey), readAccount(options.account));
|
|
178
|
+
applyTextSize(size);
|
|
179
|
+
return size;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* The same pre-paint as {@link applyPersistedTextSize}, as an inline `<head>` script for
|
|
184
|
+
* a boot splash painted from `index.html` before any module runs (§10.3). A function
|
|
185
|
+
* EXPRESSION: call it with the storage key and, optionally, a function returning the
|
|
186
|
+
* account's last known value.
|
|
187
|
+
*
|
|
188
|
+
* ```html
|
|
189
|
+
* <script>
|
|
190
|
+
* (function(k,a){…})("keksdose-text-size", function () {
|
|
191
|
+
* return JSON.parse(localStorage.getItem("keksdose-auth")).state.user.text_size;
|
|
192
|
+
* });
|
|
193
|
+
* </script>
|
|
194
|
+
* ```
|
|
195
|
+
*
|
|
196
|
+
* Paste the constant's value in place of `(function(k,a){…})`. It reads the frozen
|
|
197
|
+
* {@link PersistedTextSize} format, never throws, and sets only `data-text-size`.
|
|
198
|
+
*
|
|
199
|
+
* The splash sizes in rem, and needs the root rules inline beside it, since the app's
|
|
200
|
+
* stylesheet is a separate request and arrives after the splash paints (0.32.1,
|
|
201
|
+
* keksdose's 0.32 report: that is every app, not an edge case):
|
|
202
|
+
*
|
|
203
|
+
* ```html
|
|
204
|
+
* <style>html[data-text-size=large]{font-size:125%}html[data-text-size=xlarge]{font-size:150%}</style>
|
|
205
|
+
* ```
|
|
206
|
+
*
|
|
207
|
+
* Under a hash-based Content Security Policy (`script-src 'sha256-…'`) this is a second
|
|
208
|
+
* inline script with its own hash: add it to the policy, and recompute it whenever the
|
|
209
|
+
* storage key or the account function in the call changes (keksdose added it to both
|
|
210
|
+
* its Caddyfiles, and its guard test hashes every inline script).
|
|
211
|
+
*/
|
|
212
|
+
export const TEXT_SIZE_INLINE_SCRIPT =
|
|
213
|
+
"(function(k,a){function ok(v){return v==='normal'||v==='large'||v==='xlarge'}" +
|
|
214
|
+
"var v=null;try{var s=JSON.parse(localStorage.getItem(k)||'null');v=s&&s.state&&s.state.size}catch(e){}" +
|
|
215
|
+
"if(!ok(v)){v=null;try{v=a?a():null}catch(e){}}" +
|
|
216
|
+
"try{document.documentElement.setAttribute('data-text-size',ok(v)?v:'normal')}catch(e){}})";
|
|
217
|
+
|
|
218
|
+
/* ── The store ──────────────────────────────────────────────────────────── */
|
|
219
|
+
|
|
220
|
+
export interface TextSizeState {
|
|
221
|
+
/** This device's own choice (persisted), or `null` when it never chose — then the
|
|
222
|
+
* account's value applies (§2.2). */
|
|
223
|
+
size: TextSize | null;
|
|
224
|
+
/** Store this device's choice; `null` forgets it, so the account's applies again. */
|
|
225
|
+
setSize: (size: TextSize | null) => void;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export interface ApplyTextSizeOptions {
|
|
229
|
+
/** The account's value (`/auth/me`'s `text_size`): it applies while this device has no
|
|
230
|
+
* choice of its own. Leave it out where there is no account. */
|
|
231
|
+
account?: string | null;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
/**
|
|
235
|
+
* Build a text-size store bound to a consumer-supplied localStorage key, shaped like
|
|
236
|
+
* `createThemeStore` (§6). It holds the DEVICE's choice only; the account's value comes
|
|
237
|
+
* in through `useApplyTextSize({ account })` and `useAccountAppearance`, and the size in
|
|
238
|
+
* force is always {@link resolveTextSize} of the two.
|
|
239
|
+
*
|
|
240
|
+
* - `useTextSizeStore` — the zustand hook: `size` (device choice or null) and `setSize`.
|
|
241
|
+
* - `useApplyTextSize({ account })` — the effect that puts the size in force on `<html>`.
|
|
242
|
+
* Mount it once near the root, beside `useApplyTheme`.
|
|
243
|
+
*
|
|
244
|
+
* The persisted format is {@link PersistedTextSize}, and frozen.
|
|
245
|
+
*/
|
|
246
|
+
export function createTextSizeStore(storageKey: string) {
|
|
247
|
+
const useTextSizeStore = create<TextSizeState>()(
|
|
248
|
+
logger(
|
|
249
|
+
persist(
|
|
250
|
+
(set) => ({
|
|
251
|
+
size: null,
|
|
252
|
+
setSize: (size) => set({ size: isTextSize(size) ? size : null }),
|
|
253
|
+
}),
|
|
254
|
+
{
|
|
255
|
+
name: storageKey,
|
|
256
|
+
version: 1,
|
|
257
|
+
partialize: (s) => ({ size: s.size }),
|
|
258
|
+
// A hand-edited or future value must not reach <html> as an unknown size.
|
|
259
|
+
merge: (persisted, current) => ({
|
|
260
|
+
...current,
|
|
261
|
+
size: isTextSize((persisted as { size?: unknown } | null)?.size)
|
|
262
|
+
? ((persisted as { size: TextSize }).size)
|
|
263
|
+
: null,
|
|
264
|
+
}),
|
|
265
|
+
},
|
|
266
|
+
),
|
|
267
|
+
"text-size",
|
|
268
|
+
),
|
|
269
|
+
);
|
|
270
|
+
|
|
271
|
+
function useApplyTextSize({ account }: ApplyTextSizeOptions = {}): TextSize {
|
|
272
|
+
const device = useTextSizeStore((s) => s.size);
|
|
273
|
+
const size = resolveTextSize(device, account);
|
|
274
|
+
useEffect(() => {
|
|
275
|
+
applyTextSize(size);
|
|
276
|
+
}, [size]);
|
|
277
|
+
return size;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
return { useTextSizeStore, useApplyTextSize };
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
export type TextSizeStore = ReturnType<typeof createTextSizeStore>;
|
|
@@ -40,8 +40,10 @@ export function WizardSummary({
|
|
|
40
40
|
<Card key={sIdx}>
|
|
41
41
|
{/* CardHeader is a grid, and CardAction is the top-right column it
|
|
42
42
|
reserves — the edit button has to go through it or it stacks under
|
|
43
|
-
the title instead of sitting beside it.
|
|
44
|
-
|
|
43
|
+
the title instead of sitting beside it. `stackAction={false}`: the pencil
|
|
44
|
+
is named by `aria-label` and stays an icon at Large, so it keeps its
|
|
45
|
+
place beside the title there too (0.32.1). */}
|
|
46
|
+
<CardHeader className="pb-2" stackAction={false}>
|
|
45
47
|
<CardTitle className="text-base">{section.label}</CardTitle>
|
|
46
48
|
{section.stepIndex !== undefined && onEditStep && (
|
|
47
49
|
<CardAction>
|
package/tokens.css
CHANGED
|
@@ -30,6 +30,148 @@
|
|
|
30
30
|
|
|
31
31
|
@custom-variant dark (&:where(.dark, .dark *));
|
|
32
32
|
|
|
33
|
+
/* ── Text size and contrast (0.32, docs/text-size-harmonization.md §3, §5, §10) ──────
|
|
34
|
+
*
|
|
35
|
+
* ONE scale on <html>: `data-text-size="normal|large|xlarge"` is 100 / 125 / 150 % of
|
|
36
|
+
* the browser's OWN font size — percent, never px, so "Normal" keeps whatever the person
|
|
37
|
+
* set in the browser. Tailwind's spacing and type are rem, so this one declaration grows
|
|
38
|
+
* about 90 % of every screen. The kit's stores put the attribute there before first
|
|
39
|
+
* paint (`applyPersistedTextSize`, or the inline `TEXT_SIZE_INLINE_SCRIPT`).
|
|
40
|
+
*
|
|
41
|
+
* `data-contrast="more"` is "More contrast", from the setting or from
|
|
42
|
+
* `prefers-contrast: more` on "System". The colour tokens are stepped in JS
|
|
43
|
+
* (`applyTokenSet`), because they are written inline on <html> and no rule here could
|
|
44
|
+
* beat them; what lives here is only what is NOT inline — the focus frame's width.
|
|
45
|
+
*
|
|
46
|
+
* These names are frozen: apps read them, and so does an app's boot splash. */
|
|
47
|
+
|
|
48
|
+
@theme {
|
|
49
|
+
/* The kit's two small sizes, which were `text-[10px]` / `text-[11px]` and did not
|
|
50
|
+
grow with anything (§3.2). Font size only, no line height — exactly what the
|
|
51
|
+
arbitrary px values set — so a site moves to them without its line box changing. */
|
|
52
|
+
--text-micro: 0.625rem;
|
|
53
|
+
--text-caption: 0.6875rem;
|
|
54
|
+
/* keksdose's `min-[2400px]` as a named step (§10.4), so it scales like the others.
|
|
55
|
+
Declared here so Tailwind registers `3xl:` in the breakpoint group — the variant
|
|
56
|
+
below then replaces its query and keeps that place in the cascade order. */
|
|
57
|
+
--breakpoint-3xl: 150rem;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
html[data-text-size="large"] {
|
|
61
|
+
font-size: 125%;
|
|
62
|
+
}
|
|
63
|
+
html[data-text-size="xlarge"] {
|
|
64
|
+
font-size: 150%;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* One focus frame for the kit (§5): `FOCUS_RING` draws its ring this wide. Not inline,
|
|
68
|
+
so a stylesheet rule can raise it. */
|
|
69
|
+
:root {
|
|
70
|
+
--focus-ring-width: 2px;
|
|
71
|
+
}
|
|
72
|
+
:root[data-contrast="more"] {
|
|
73
|
+
--focus-ring-width: 3px;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* ── Breakpoints that follow the text size (§3.3, §10.4) ─────────────────────────────
|
|
77
|
+
*
|
|
78
|
+
* A media query's rem is the browser's default font size, never <html>'s, so Tailwind's
|
|
79
|
+
* `md:` would stay at 48rem while the text grows to 150 % — a tablet at Extra large
|
|
80
|
+
* would keep the desktop shell. Each breakpoint is therefore redefined as three media
|
|
81
|
+
* queries, one per size, each scoped to that size with an attribute selector:
|
|
82
|
+
*
|
|
83
|
+
* md: 48rem at Normal, 60rem at Large, 72rem at Extra large (× 1, 1.25, 1.5)
|
|
84
|
+
*
|
|
85
|
+
* The scope sits in `:where()`, so `md:flex` keeps the specificity it had (0,1,0) and
|
|
86
|
+
* the cascade between utilities is unchanged. A redefined built-in (`sm` … `2xl`, and
|
|
87
|
+
* `3xl` from @theme above) keeps its place in Tailwind's variant order — checked in the
|
|
88
|
+
* built showcase CSS — and Tailwind's own query for it is not emitted any more.
|
|
89
|
+
*
|
|
90
|
+
* The `max-*` variants are new names to Tailwind (its own `max-*` is one functional
|
|
91
|
+
* variant, which CSS cannot replace), so they sort AFTER the other variants rather than
|
|
92
|
+
* before `sm`. They are declared widest first, as Tailwind orders its own, so the
|
|
93
|
+
* narrower range still wins (`max-lg:px-4 max-sm:px-2`). A scan of the kit, the
|
|
94
|
+
* showcase and the three apps (2026-10-08) found no element where a `max-*` utility and
|
|
95
|
+
* a later variant (`md:`, `dark:`, `@container`, `pointer-*` …) set the same property
|
|
96
|
+
* in an overlapping range, so no rendering changes with that order.
|
|
97
|
+
*
|
|
98
|
+
* Not a container on <body> (§10.4): fixed overlays and a container querying itself
|
|
99
|
+
* would break. Arbitrary `min-[…]` / `max-[…]` media variants do NOT scale — use a
|
|
100
|
+
* name. `useBreakpoint` / `usePhoneLayout` answer the same questions in JS, with the
|
|
101
|
+
* same numbers (hooks/use-breakpoint.ts). */
|
|
102
|
+
|
|
103
|
+
@custom-variant sm {
|
|
104
|
+
@media (width >= 40rem) { &:where(:not([data-text-size$=large] *)) { @slot; } }
|
|
105
|
+
@media (width >= 50rem) { &:where([data-text-size=large] *) { @slot; } }
|
|
106
|
+
@media (width >= 60rem) { &:where([data-text-size=xlarge] *) { @slot; } }
|
|
107
|
+
}
|
|
108
|
+
@custom-variant md {
|
|
109
|
+
@media (width >= 48rem) { &:where(:not([data-text-size$=large] *)) { @slot; } }
|
|
110
|
+
@media (width >= 60rem) { &:where([data-text-size=large] *) { @slot; } }
|
|
111
|
+
@media (width >= 72rem) { &:where([data-text-size=xlarge] *) { @slot; } }
|
|
112
|
+
}
|
|
113
|
+
@custom-variant lg {
|
|
114
|
+
@media (width >= 64rem) { &:where(:not([data-text-size$=large] *)) { @slot; } }
|
|
115
|
+
@media (width >= 80rem) { &:where([data-text-size=large] *) { @slot; } }
|
|
116
|
+
@media (width >= 96rem) { &:where([data-text-size=xlarge] *) { @slot; } }
|
|
117
|
+
}
|
|
118
|
+
@custom-variant xl {
|
|
119
|
+
@media (width >= 80rem) { &:where(:not([data-text-size$=large] *)) { @slot; } }
|
|
120
|
+
@media (width >= 100rem) { &:where([data-text-size=large] *) { @slot; } }
|
|
121
|
+
@media (width >= 120rem) { &:where([data-text-size=xlarge] *) { @slot; } }
|
|
122
|
+
}
|
|
123
|
+
@custom-variant 2xl {
|
|
124
|
+
@media (width >= 96rem) { &:where(:not([data-text-size$=large] *)) { @slot; } }
|
|
125
|
+
@media (width >= 120rem) { &:where([data-text-size=large] *) { @slot; } }
|
|
126
|
+
@media (width >= 144rem) { &:where([data-text-size=xlarge] *) { @slot; } }
|
|
127
|
+
}
|
|
128
|
+
@custom-variant 3xl {
|
|
129
|
+
@media (width >= 150rem) { &:where(:not([data-text-size$=large] *)) { @slot; } }
|
|
130
|
+
@media (width >= 187.5rem) { &:where([data-text-size=large] *) { @slot; } }
|
|
131
|
+
@media (width >= 225rem) { &:where([data-text-size=xlarge] *) { @slot; } }
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
@custom-variant max-3xl {
|
|
135
|
+
@media (width < 150rem) { &:where(:not([data-text-size$=large] *)) { @slot; } }
|
|
136
|
+
@media (width < 187.5rem) { &:where([data-text-size=large] *) { @slot; } }
|
|
137
|
+
@media (width < 225rem) { &:where([data-text-size=xlarge] *) { @slot; } }
|
|
138
|
+
}
|
|
139
|
+
@custom-variant max-2xl {
|
|
140
|
+
@media (width < 96rem) { &:where(:not([data-text-size$=large] *)) { @slot; } }
|
|
141
|
+
@media (width < 120rem) { &:where([data-text-size=large] *) { @slot; } }
|
|
142
|
+
@media (width < 144rem) { &:where([data-text-size=xlarge] *) { @slot; } }
|
|
143
|
+
}
|
|
144
|
+
@custom-variant max-xl {
|
|
145
|
+
@media (width < 80rem) { &:where(:not([data-text-size$=large] *)) { @slot; } }
|
|
146
|
+
@media (width < 100rem) { &:where([data-text-size=large] *) { @slot; } }
|
|
147
|
+
@media (width < 120rem) { &:where([data-text-size=xlarge] *) { @slot; } }
|
|
148
|
+
}
|
|
149
|
+
@custom-variant max-lg {
|
|
150
|
+
@media (width < 64rem) { &:where(:not([data-text-size$=large] *)) { @slot; } }
|
|
151
|
+
@media (width < 80rem) { &:where([data-text-size=large] *) { @slot; } }
|
|
152
|
+
@media (width < 96rem) { &:where([data-text-size=xlarge] *) { @slot; } }
|
|
153
|
+
}
|
|
154
|
+
@custom-variant max-md {
|
|
155
|
+
@media (width < 48rem) { &:where(:not([data-text-size$=large] *)) { @slot; } }
|
|
156
|
+
@media (width < 60rem) { &:where([data-text-size=large] *) { @slot; } }
|
|
157
|
+
@media (width < 72rem) { &:where([data-text-size=xlarge] *) { @slot; } }
|
|
158
|
+
}
|
|
159
|
+
@custom-variant max-sm {
|
|
160
|
+
@media (width < 40rem) { &:where(:not([data-text-size$=large] *)) { @slot; } }
|
|
161
|
+
@media (width < 50rem) { &:where([data-text-size=large] *) { @slot; } }
|
|
162
|
+
@media (width < 60rem) { &:where([data-text-size=xlarge] *) { @slot; } }
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* `large:` is Large AND Extra large; `xlarge:` only Extra large; `contrast:` is More
|
|
166
|
+
contrast however it came about. Modelled on `dark:` — `:where()`, so a variant adds
|
|
167
|
+
no specificity and `large:text-base` beats `text-sm` by order alone. Declared AFTER
|
|
168
|
+
the breakpoints, so a size wins over a breakpoint: `max-sm:grid-cols-2
|
|
169
|
+
large:grid-cols-1` is one column on a phone at Large.
|
|
170
|
+
`$=large` ("ends in large") matches both "large" and "xlarge". */
|
|
171
|
+
@custom-variant large (&:where([data-text-size$=large], [data-text-size$=large] *));
|
|
172
|
+
@custom-variant xlarge (&:where([data-text-size=xlarge], [data-text-size=xlarge] *));
|
|
173
|
+
@custom-variant contrast (&:where([data-contrast=more], [data-contrast=more] *));
|
|
174
|
+
|
|
33
175
|
:root {
|
|
34
176
|
--bg-page: #ede3cf; /* warm dim sand — low-glare light page */
|
|
35
177
|
--bg-surface: #f6ecd9; /* warm off-white card/panel (not pure white) */
|
|
@@ -304,7 +446,7 @@
|
|
|
304
446
|
/* The kit's focus ring on the toast's buttons — sonner's is a black shadow that
|
|
305
447
|
vanishes on the dark theme. */
|
|
306
448
|
.kit-toaster [data-sonner-toast][data-styled="true"] :is([data-button], [data-close-button]):focus-visible {
|
|
307
|
-
outline: 2px solid var(--brand);
|
|
449
|
+
outline: var(--focus-ring-width, 2px) solid var(--brand);
|
|
308
450
|
outline-offset: 2px;
|
|
309
451
|
}
|
|
310
452
|
|
|
@@ -551,10 +693,18 @@ body {
|
|
|
551
693
|
.animate-drill { animation-name: overlay-fade-in; }
|
|
552
694
|
}
|
|
553
695
|
|
|
554
|
-
/* Scrollbars: keep light defaults; theme to
|
|
696
|
+
/* Scrollbars: keep light defaults; theme to the palette when dark mode is active.
|
|
697
|
+
*
|
|
698
|
+
* From the tokens, not literals (0.32.1, keksdose's 0.32 report): the thumb is a border
|
|
699
|
+
* (`--border`) on the page (`--bg-page`), so a palette preset carries through, and so
|
|
700
|
+
* does More contrast (§5), which steps `--border` until it clears 3:1 against every
|
|
701
|
+
* surface, the page among them: WCAG 1.4.11's floor for a control's visible part. At
|
|
702
|
+
* standard contrast it is as quiet as the slate-700-on-slate-900 it replaces (1.5:1
|
|
703
|
+
* against 1.7:1 in the default dark preset). Hover takes `--border-strong`, the border
|
|
704
|
+
* pulled toward the text, which grows with it. */
|
|
555
705
|
.dark {
|
|
556
706
|
color-scheme: dark;
|
|
557
|
-
scrollbar-color:
|
|
707
|
+
scrollbar-color: var(--border) var(--bg-page);
|
|
558
708
|
}
|
|
559
709
|
|
|
560
710
|
.dark ::-webkit-scrollbar {
|
|
@@ -563,19 +713,19 @@ body {
|
|
|
563
713
|
}
|
|
564
714
|
|
|
565
715
|
.dark ::-webkit-scrollbar-track {
|
|
566
|
-
background-color:
|
|
716
|
+
background-color: var(--bg-page);
|
|
567
717
|
}
|
|
568
718
|
|
|
569
719
|
.dark ::-webkit-scrollbar-thumb {
|
|
570
|
-
background-color:
|
|
720
|
+
background-color: var(--border);
|
|
571
721
|
border-radius: 6px;
|
|
572
|
-
border: 2px solid
|
|
722
|
+
border: 2px solid var(--bg-page); /* the track's colour: inset padding */
|
|
573
723
|
}
|
|
574
724
|
|
|
575
725
|
.dark ::-webkit-scrollbar-thumb:hover {
|
|
576
|
-
background-color:
|
|
726
|
+
background-color: var(--border-strong);
|
|
577
727
|
}
|
|
578
728
|
|
|
579
729
|
.dark ::-webkit-scrollbar-corner {
|
|
580
|
-
background-color:
|
|
730
|
+
background-color: var(--bg-page);
|
|
581
731
|
}
|