@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
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Money and periods of the plan catalogue (docs/billing-harmonization.md §3.1, §4, §12.17).
|
|
3
|
+
*
|
|
4
|
+
* Money crosses the wire as INTEGER MINOR UNITS plus an ISO currency, never as a float
|
|
5
|
+
* (§4): 4900 CHF is CHF 49.00. The kit turns it into the reader's notation with
|
|
6
|
+
* `formatMoney`, so no app divides by 100 by hand.
|
|
7
|
+
*/
|
|
8
|
+
/** A billing period: the provider charges per month or per year. */
|
|
9
|
+
type BillingInterval = "month" | "year";
|
|
10
|
+
/** The two currencies every app sells in (§2.6). */
|
|
11
|
+
type BillingCurrency = "CHF" | "EUR";
|
|
12
|
+
/**
|
|
13
|
+
* The periods in the order the picker offers them — YEARLY FIRST (§12.17): a Merchant of
|
|
14
|
+
* Record takes about 5 % + 0.50 per transaction, so a small monthly price loses a fifth
|
|
15
|
+
* of itself (CHF 3 a month loses about 22 %). The page leads with the yearly price.
|
|
16
|
+
*/
|
|
17
|
+
declare const BILLING_INTERVALS: readonly BillingInterval[];
|
|
18
|
+
/** One currency's prices, in minor units, per period. A period left out is not offered. */
|
|
19
|
+
type PlanIntervalPrices = Partial<Record<BillingInterval, number>>;
|
|
20
|
+
/** A plan's prices as server-kit's `PlanSpec.prices` sends them: currency → period →
|
|
21
|
+
* minor units, GROSS (§12.17). */
|
|
22
|
+
type PlanPrices = Partial<Record<BillingCurrency, PlanIntervalPrices>>;
|
|
23
|
+
/**
|
|
24
|
+
* What one plan costs in one currency and period:
|
|
25
|
+
* - `price` — a gross amount in minor units;
|
|
26
|
+
* - `free` — a plan with no prices at all (keksdose's free plan), or a price of 0;
|
|
27
|
+
* - `not-offered` — a plan with prices, but none for this currency and period.
|
|
28
|
+
*/
|
|
29
|
+
type PlanPriceAnswer = {
|
|
30
|
+
kind: "price";
|
|
31
|
+
minor: number;
|
|
32
|
+
} | {
|
|
33
|
+
kind: "free";
|
|
34
|
+
} | {
|
|
35
|
+
kind: "not-offered";
|
|
36
|
+
};
|
|
37
|
+
/** What `prices` says for `currency` and `interval` — see {@link PlanPriceAnswer}. */
|
|
38
|
+
declare function planPrice(prices: PlanPrices | null | undefined, currency: BillingCurrency, interval: BillingInterval): PlanPriceAnswer;
|
|
39
|
+
/** Minor units as the amount: 4900 CHF → 49, 1250 EUR → 12.5. The currency's minor unit
|
|
40
|
+
* comes from `Intl` (CHF and EUR have 2); a code `Intl` cannot read counts as 2. */
|
|
41
|
+
declare function minorToMajor(minor: number, currency: string): number;
|
|
42
|
+
/**
|
|
43
|
+
* A price in minor units, in the reader's notation: "CHF 49", "CHF 4.90", "49 €",
|
|
44
|
+
* "4,90 €". A whole amount drops its decimals — a price list reads "CHF 49" — and any
|
|
45
|
+
* other keeps all of them ("CHF 4.90", never "CHF 4.9").
|
|
46
|
+
*/
|
|
47
|
+
declare function formatPlanPrice(minor: number, currency: string, options?: {
|
|
48
|
+
locale?: string;
|
|
49
|
+
}): string;
|
|
50
|
+
/**
|
|
51
|
+
* The currency a payer starts with when the app stores none (§12.18): francs where the
|
|
52
|
+
* locale's region is Switzerland or Liechtenstein, euros everywhere else — "de-CH" and
|
|
53
|
+
* "fr-CH" CHF, "de" (Germany, once `Intl` fills the region in) and "it" EUR.
|
|
54
|
+
*
|
|
55
|
+
* Only the fallback: an account's stored currency comes first (keksdose's
|
|
56
|
+
* `reporting_currency` — a de-CH speaker living in Germany pays in euros), and the payer
|
|
57
|
+
* may switch in the picker either way; checkout takes the one they leave it on (§4).
|
|
58
|
+
*/
|
|
59
|
+
declare function billingCurrencyFor(locale?: string): BillingCurrency;
|
|
60
|
+
|
|
61
|
+
export { BILLING_INTERVALS, type BillingCurrency, type BillingInterval, type PlanIntervalPrices, type PlanPriceAnswer, type PlanPrices, billingCurrencyFor, formatPlanPrice, minorToMajor, planPrice };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { currencyMinorDigits, formatMoney } from "../lib/format.js";
|
|
3
|
+
const BILLING_INTERVALS = Object.freeze(["year", "month"]);
|
|
4
|
+
function hasAnyPrice(prices) {
|
|
5
|
+
if (!prices) return false;
|
|
6
|
+
return Object.values(prices).some(
|
|
7
|
+
(byInterval) => byInterval && Object.values(byInterval).some((v) => typeof v === "number")
|
|
8
|
+
);
|
|
9
|
+
}
|
|
10
|
+
function planPrice(prices, currency, interval) {
|
|
11
|
+
const minor = prices?.[currency]?.[interval];
|
|
12
|
+
if (typeof minor === "number" && Number.isFinite(minor)) {
|
|
13
|
+
return minor === 0 ? { kind: "free" } : { kind: "price", minor };
|
|
14
|
+
}
|
|
15
|
+
return hasAnyPrice(prices) ? { kind: "not-offered" } : { kind: "free" };
|
|
16
|
+
}
|
|
17
|
+
function minorToMajor(minor, currency) {
|
|
18
|
+
const digits = currencyMinorDigits(currency) ?? 2;
|
|
19
|
+
return minor / 10 ** digits;
|
|
20
|
+
}
|
|
21
|
+
function formatPlanPrice(minor, currency, options = {}) {
|
|
22
|
+
const digits = currencyMinorDigits(currency) ?? 2;
|
|
23
|
+
const whole = Number.isInteger(minor) && minor % 10 ** digits === 0;
|
|
24
|
+
return formatMoney(minorToMajor(minor, currency), currency, {
|
|
25
|
+
locale: options.locale,
|
|
26
|
+
digits: whole ? 0 : digits
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function billingCurrencyFor(locale) {
|
|
30
|
+
if (!locale) return "EUR";
|
|
31
|
+
try {
|
|
32
|
+
const region = new Intl.Locale(locale).maximize().region;
|
|
33
|
+
return region === "CH" || region === "LI" ? "CHF" : "EUR";
|
|
34
|
+
} catch {
|
|
35
|
+
return "EUR";
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
BILLING_INTERVALS,
|
|
40
|
+
billingCurrencyFor,
|
|
41
|
+
formatPlanPrice,
|
|
42
|
+
minorToMajor,
|
|
43
|
+
planPrice
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=plan-price.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/billing/plan-price.ts"],"sourcesContent":["import { currencyMinorDigits, formatMoney } from \"../lib/format\";\n\n/**\n * Money and periods of the plan catalogue (docs/billing-harmonization.md §3.1, §4, §12.17).\n *\n * Money crosses the wire as INTEGER MINOR UNITS plus an ISO currency, never as a float\n * (§4): 4900 CHF is CHF 49.00. The kit turns it into the reader's notation with\n * `formatMoney`, so no app divides by 100 by hand.\n */\n\n/** A billing period: the provider charges per month or per year. */\nexport type BillingInterval = \"month\" | \"year\";\n\n/** The two currencies every app sells in (§2.6). */\nexport type BillingCurrency = \"CHF\" | \"EUR\";\n\n/**\n * The periods in the order the picker offers them — YEARLY FIRST (§12.17): a Merchant of\n * Record takes about 5 % + 0.50 per transaction, so a small monthly price loses a fifth\n * of itself (CHF 3 a month loses about 22 %). The page leads with the yearly price.\n */\nexport const BILLING_INTERVALS: readonly BillingInterval[] = Object.freeze([\"year\", \"month\"]);\n\n/** One currency's prices, in minor units, per period. A period left out is not offered. */\nexport type PlanIntervalPrices = Partial<Record<BillingInterval, number>>;\n\n/** A plan's prices as server-kit's `PlanSpec.prices` sends them: currency → period →\n * minor units, GROSS (§12.17). */\nexport type PlanPrices = Partial<Record<BillingCurrency, PlanIntervalPrices>>;\n\n/**\n * What one plan costs in one currency and period:\n * - `price` — a gross amount in minor units;\n * - `free` — a plan with no prices at all (keksdose's free plan), or a price of 0;\n * - `not-offered` — a plan with prices, but none for this currency and period.\n */\nexport type PlanPriceAnswer =\n | { kind: \"price\"; minor: number }\n | { kind: \"free\" }\n | { kind: \"not-offered\" };\n\n/** Whether a price table holds any figure at all. */\nfunction hasAnyPrice(prices: PlanPrices | null | undefined): boolean {\n if (!prices) return false;\n return Object.values(prices).some(\n (byInterval) => byInterval && Object.values(byInterval).some((v) => typeof v === \"number\"),\n );\n}\n\n/** What `prices` says for `currency` and `interval` — see {@link PlanPriceAnswer}. */\nexport function planPrice(\n prices: PlanPrices | null | undefined,\n currency: BillingCurrency,\n interval: BillingInterval,\n): PlanPriceAnswer {\n const minor = prices?.[currency]?.[interval];\n if (typeof minor === \"number\" && Number.isFinite(minor)) {\n return minor === 0 ? { kind: \"free\" } : { kind: \"price\", minor };\n }\n return hasAnyPrice(prices) ? { kind: \"not-offered\" } : { kind: \"free\" };\n}\n\n/** Minor units as the amount: 4900 CHF → 49, 1250 EUR → 12.5. The currency's minor unit\n * comes from `Intl` (CHF and EUR have 2); a code `Intl` cannot read counts as 2. */\nexport function minorToMajor(minor: number, currency: string): number {\n const digits = currencyMinorDigits(currency) ?? 2;\n return minor / 10 ** digits;\n}\n\n/**\n * A price in minor units, in the reader's notation: \"CHF 49\", \"CHF 4.90\", \"49 €\",\n * \"4,90 €\". A whole amount drops its decimals — a price list reads \"CHF 49\" — and any\n * other keeps all of them (\"CHF 4.90\", never \"CHF 4.9\").\n */\nexport function formatPlanPrice(minor: number, currency: string, options: { locale?: string } = {}): string {\n const digits = currencyMinorDigits(currency) ?? 2;\n const whole = Number.isInteger(minor) && minor % 10 ** digits === 0;\n return formatMoney(minorToMajor(minor, currency), currency, {\n locale: options.locale,\n digits: whole ? 0 : digits,\n });\n}\n\n/**\n * The currency a payer starts with when the app stores none (§12.18): francs where the\n * locale's region is Switzerland or Liechtenstein, euros everywhere else — \"de-CH\" and\n * \"fr-CH\" CHF, \"de\" (Germany, once `Intl` fills the region in) and \"it\" EUR.\n *\n * Only the fallback: an account's stored currency comes first (keksdose's\n * `reporting_currency` — a de-CH speaker living in Germany pays in euros), and the payer\n * may switch in the picker either way; checkout takes the one they leave it on (§4).\n */\nexport function billingCurrencyFor(locale?: string): BillingCurrency {\n if (!locale) return \"EUR\";\n try {\n const region = new Intl.Locale(locale).maximize().region;\n return region === \"CH\" || region === \"LI\" ? \"CHF\" : \"EUR\";\n } catch {\n return \"EUR\";\n }\n}\n"],"mappings":";AAAA,SAAS,qBAAqB,mBAAmB;AAqB1C,MAAM,oBAAgD,OAAO,OAAO,CAAC,QAAQ,OAAO,CAAC;AAqB5F,SAAS,YAAY,QAAgD;AACnE,MAAI,CAAC,OAAQ,QAAO;AACpB,SAAO,OAAO,OAAO,MAAM,EAAE;AAAA,IAC3B,CAAC,eAAe,cAAc,OAAO,OAAO,UAAU,EAAE,KAAK,CAAC,MAAM,OAAO,MAAM,QAAQ;AAAA,EAC3F;AACF;AAGO,SAAS,UACd,QACA,UACA,UACiB;AACjB,QAAM,QAAQ,SAAS,QAAQ,IAAI,QAAQ;AAC3C,MAAI,OAAO,UAAU,YAAY,OAAO,SAAS,KAAK,GAAG;AACvD,WAAO,UAAU,IAAI,EAAE,MAAM,OAAO,IAAI,EAAE,MAAM,SAAS,MAAM;AAAA,EACjE;AACA,SAAO,YAAY,MAAM,IAAI,EAAE,MAAM,cAAc,IAAI,EAAE,MAAM,OAAO;AACxE;AAIO,SAAS,aAAa,OAAe,UAA0B;AACpE,QAAM,SAAS,oBAAoB,QAAQ,KAAK;AAChD,SAAO,QAAQ,MAAM;AACvB;AAOO,SAAS,gBAAgB,OAAe,UAAkB,UAA+B,CAAC,GAAW;AAC1G,QAAM,SAAS,oBAAoB,QAAQ,KAAK;AAChD,QAAM,QAAQ,OAAO,UAAU,KAAK,KAAK,QAAQ,MAAM,WAAW;AAClE,SAAO,YAAY,aAAa,OAAO,QAAQ,GAAG,UAAU;AAAA,IAC1D,QAAQ,QAAQ;AAAA,IAChB,QAAQ,QAAQ,IAAI;AAAA,EACtB,CAAC;AACH;AAWO,SAAS,mBAAmB,QAAkC;AACnE,MAAI,CAAC,OAAQ,QAAO;AACpB,MAAI;AACF,UAAM,SAAS,IAAI,KAAK,OAAO,MAAM,EAAE,SAAS,EAAE;AAClD,WAAO,WAAW,QAAQ,WAAW,OAAO,QAAQ;AAAA,EACtD,QAAQ;AACN,WAAO;AAAA,EACT;AACF;","names":[]}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import { e4 as LabelOverride, bH as BillingLabels } from '../delete-account-setting-BvdQdbv3.js';
|
|
4
|
+
import '../components/tooltip.js';
|
|
5
|
+
import '../hooks/use-anchored-rect.js';
|
|
6
|
+
import '../lib/clipping.js';
|
|
7
|
+
import '../data-table-labels-kpAAVi6g.js';
|
|
8
|
+
import '../components/data-table-sort.js';
|
|
9
|
+
import '../components/swipeable-row.js';
|
|
10
|
+
import '../components/mini-calendar.js';
|
|
11
|
+
import '../components/calendar-heatmap.js';
|
|
12
|
+
import '../components/popover.js';
|
|
13
|
+
import '../hooks/use-breakpoint.js';
|
|
14
|
+
import '../components/chip.js';
|
|
15
|
+
import 'lucide-react';
|
|
16
|
+
import '../components/field-parts.js';
|
|
17
|
+
import '../components/field-sync.js';
|
|
18
|
+
import '../wizard/types.js';
|
|
19
|
+
import '../tour/tour.js';
|
|
20
|
+
import '../search/command-palette.js';
|
|
21
|
+
import '../search/global-search.js';
|
|
22
|
+
import '../search/search-index.js';
|
|
23
|
+
import '../components/month-picker.js';
|
|
24
|
+
import '../components/page-contents.js';
|
|
25
|
+
import '../components/series-chart-labels.js';
|
|
26
|
+
import '../components/pie-chart-labels.js';
|
|
27
|
+
import '../components/sparkline.js';
|
|
28
|
+
import '../components/stat-tile.js';
|
|
29
|
+
import '../components/signature-pad.js';
|
|
30
|
+
import '../components/password-strength.js';
|
|
31
|
+
import '../components/swatch-picker.js';
|
|
32
|
+
import '../components/tile-radio.js';
|
|
33
|
+
import '../components/icon-picker.js';
|
|
34
|
+
import '../components/dialog-frame.js';
|
|
35
|
+
import '../components/modal.js';
|
|
36
|
+
import '../hooks/use-search-param-state.js';
|
|
37
|
+
import '../components/measured-grid.js';
|
|
38
|
+
import '../components/user-avatar.js';
|
|
39
|
+
import '../lib/person-name.js';
|
|
40
|
+
import '../components/status-dot.js';
|
|
41
|
+
import '../components/progress-bar.js';
|
|
42
|
+
import '../components/signed-amount.js';
|
|
43
|
+
import '../shell/topbar-action-menu.js';
|
|
44
|
+
import '../components/menu-item.js';
|
|
45
|
+
import '../components/floating-panel.js';
|
|
46
|
+
import '../hooks/use-authed-src.js';
|
|
47
|
+
import '../components/account-settings-labels.js';
|
|
48
|
+
import '../components/bulk-action-bar.js';
|
|
49
|
+
import '../components/list.js';
|
|
50
|
+
import '../components/breadcrumbs.js';
|
|
51
|
+
import '../components/toast.js';
|
|
52
|
+
import '../components/description-list.js';
|
|
53
|
+
import '../components/line-items.js';
|
|
54
|
+
import '../components/error-boundary.js';
|
|
55
|
+
import '../components/authed-image.js';
|
|
56
|
+
import '../components/image-grid.js';
|
|
57
|
+
import '../components/lightbox.js';
|
|
58
|
+
import '../components/write-lock.js';
|
|
59
|
+
import '../auth/sign-in-form.js';
|
|
60
|
+
import '../landing/access.js';
|
|
61
|
+
import '../landing/landing-labels.js';
|
|
62
|
+
import '../shell/topbar-controls.js';
|
|
63
|
+
import '../theme/palette-presets.js';
|
|
64
|
+
import '../theme/chart-palette.js';
|
|
65
|
+
import '../theme/theme-store.js';
|
|
66
|
+
import 'zustand/middleware';
|
|
67
|
+
import 'zustand';
|
|
68
|
+
import '../auth/complete-name-dialog.js';
|
|
69
|
+
import '../auth/forgot-password-form.js';
|
|
70
|
+
import '../auth/status-parts.js';
|
|
71
|
+
import '../auth/reset-password-form.js';
|
|
72
|
+
import '../auth/verify-email.js';
|
|
73
|
+
import '../auth/not-found-page.js';
|
|
74
|
+
import '../auth/accept-invitation.js';
|
|
75
|
+
import '../shell/company-switcher.js';
|
|
76
|
+
import '../account/email-change-setting.js';
|
|
77
|
+
import '../account/sessions-setting.js';
|
|
78
|
+
import '../lib/format.js';
|
|
79
|
+
import '../account/data-export-setting.js';
|
|
80
|
+
import '../components/account-chips.js';
|
|
81
|
+
import '../admin/admin-parts.js';
|
|
82
|
+
import '../admin/admin-action-log.js';
|
|
83
|
+
import '../settings/settings-labels.js';
|
|
84
|
+
import '../demo/demo-labels.js';
|
|
85
|
+
import '../components/appearance-labels.js';
|
|
86
|
+
import '../theme/contrast.js';
|
|
87
|
+
import '../theme/text-size.js';
|
|
88
|
+
import '../components/reauth-dialog.js';
|
|
89
|
+
import '../components/server-wake.js';
|
|
90
|
+
import '../lib/server-wake.js';
|
|
91
|
+
import '../components/translation-review-labels.js';
|
|
92
|
+
import '../lib/translation-review.js';
|
|
93
|
+
import '../components/country-select.js';
|
|
94
|
+
import '../components/inline-edit-field.js';
|
|
95
|
+
import '../lib/iban.js';
|
|
96
|
+
import '../lib/phone.js';
|
|
97
|
+
import '../components/sign-chip.js';
|
|
98
|
+
import '../components/column-mapper.js';
|
|
99
|
+
import '../lib/column-mapping.js';
|
|
100
|
+
import '../lib/table-text.js';
|
|
101
|
+
import '../components/focus-ring.js';
|
|
102
|
+
|
|
103
|
+
interface SubscriptionActionsProps extends Omit<ComponentPropsWithoutRef<"div">, "children"> {
|
|
104
|
+
/** "Payment and invoices", as a link — or {@link onManage}. Without either, none. */
|
|
105
|
+
manageHref?: string;
|
|
106
|
+
/** "Payment and invoices", as the app's call: `POST /billing/portal`, then off to its
|
|
107
|
+
* `url` (§4). The kit sends no request. */
|
|
108
|
+
onManage?: () => void;
|
|
109
|
+
/** "Cancel subscription", as a link — or {@link onCancel}. Without either, none. */
|
|
110
|
+
cancelHref?: string;
|
|
111
|
+
/** "Cancel subscription", as the app's call — usually the portal again, where the
|
|
112
|
+
* provider's cancel and withdrawal functions are (§12.26). */
|
|
113
|
+
onCancel?: () => void;
|
|
114
|
+
/** Which of the two is under way: its spinner, no second press. */
|
|
115
|
+
pending?: "manage" | "cancel" | null;
|
|
116
|
+
/** Prop > `<UiKitProvider labels={{ billing }}>` > English. */
|
|
117
|
+
labels?: LabelOverride<BillingLabels>;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* The two ways to the provider's hosted portal on the subscription page
|
|
121
|
+
* (docs/billing-harmonization.md §2.8, §7, §12.26): "Payment and invoices" — the payment
|
|
122
|
+
* method and the invoices live there, never in the app — and a VISIBLE "Cancel
|
|
123
|
+
* subscription". Consumer law wants the second in plain sight: Germany's cancellation
|
|
124
|
+
* button (§312k BGB) and the EU withdrawal function (Directive (EU) 2023/2673, from
|
|
125
|
+
* 19 June 2026) are in the portal, and the app's page must not hide the way there behind
|
|
126
|
+
* "manage".
|
|
127
|
+
*
|
|
128
|
+
* Neither takes the write lock: a read-only payer must be able to pay, leave or cancel
|
|
129
|
+
* (§3.3).
|
|
130
|
+
*/
|
|
131
|
+
declare function SubscriptionActions({ manageHref, onManage, cancelHref, onCancel, pending, labels: labelsProp, className, ...rest }: SubscriptionActionsProps): react.JSX.Element | null;
|
|
132
|
+
|
|
133
|
+
export { SubscriptionActions, type SubscriptionActionsProps };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../lib/cn.js";
|
|
4
|
+
import { Button } from "../components/ui.js";
|
|
5
|
+
import { useBillingLabels } from "./billing-labels.js";
|
|
6
|
+
function SubscriptionActions({
|
|
7
|
+
manageHref,
|
|
8
|
+
onManage,
|
|
9
|
+
cancelHref,
|
|
10
|
+
onCancel,
|
|
11
|
+
pending,
|
|
12
|
+
labels: labelsProp,
|
|
13
|
+
className,
|
|
14
|
+
...rest
|
|
15
|
+
}) {
|
|
16
|
+
const labels = useBillingLabels(labelsProp);
|
|
17
|
+
const manage = manageHref !== void 0 ? /* @__PURE__ */ jsx(Button, { href: manageHref, variant: "secondary", children: labels.manage }) : onManage !== void 0 ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "secondary", onClick: onManage, pending: pending === "manage", children: labels.manage }) : null;
|
|
18
|
+
const cancel = cancelHref !== void 0 ? /* @__PURE__ */ jsx(Button, { href: cancelHref, variant: "link", tone: "danger", children: labels.cancel }) : onCancel !== void 0 ? /* @__PURE__ */ jsx(Button, { type: "button", variant: "link", tone: "danger", onClick: onCancel, pending: pending === "cancel", children: labels.cancel }) : null;
|
|
19
|
+
if (!manage && !cancel) return null;
|
|
20
|
+
return /* @__PURE__ */ jsxs("div", { ...rest, className: cn("flex flex-wrap items-center gap-x-4 gap-y-2", className), children: [
|
|
21
|
+
manage,
|
|
22
|
+
cancel
|
|
23
|
+
] });
|
|
24
|
+
}
|
|
25
|
+
export {
|
|
26
|
+
SubscriptionActions
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=subscription-actions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/billing/subscription-actions.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef } from \"react\";\n\nimport type { LabelOverride } from \"../i18n/kit-labels\";\nimport { cn } from \"../lib/cn\";\nimport { Button } from \"../components/ui\";\nimport { useBillingLabels } from \"./billing-labels\";\nimport type { BillingLabels } from \"./billing-labels\";\n\nexport interface SubscriptionActionsProps extends Omit<ComponentPropsWithoutRef<\"div\">, \"children\"> {\n /** \"Payment and invoices\", as a link — or {@link onManage}. Without either, none. */\n manageHref?: string;\n /** \"Payment and invoices\", as the app's call: `POST /billing/portal`, then off to its\n * `url` (§4). The kit sends no request. */\n onManage?: () => void;\n /** \"Cancel subscription\", as a link — or {@link onCancel}. Without either, none. */\n cancelHref?: string;\n /** \"Cancel subscription\", as the app's call — usually the portal again, where the\n * provider's cancel and withdrawal functions are (§12.26). */\n onCancel?: () => void;\n /** Which of the two is under way: its spinner, no second press. */\n pending?: \"manage\" | \"cancel\" | null;\n /** Prop > `<UiKitProvider labels={{ billing }}>` > English. */\n labels?: LabelOverride<BillingLabels>;\n}\n\n/**\n * The two ways to the provider's hosted portal on the subscription page\n * (docs/billing-harmonization.md §2.8, §7, §12.26): \"Payment and invoices\" — the payment\n * method and the invoices live there, never in the app — and a VISIBLE \"Cancel\n * subscription\". Consumer law wants the second in plain sight: Germany's cancellation\n * button (§312k BGB) and the EU withdrawal function (Directive (EU) 2023/2673, from\n * 19 June 2026) are in the portal, and the app's page must not hide the way there behind\n * \"manage\".\n *\n * Neither takes the write lock: a read-only payer must be able to pay, leave or cancel\n * (§3.3).\n */\nexport function SubscriptionActions({\n manageHref,\n onManage,\n cancelHref,\n onCancel,\n pending,\n labels: labelsProp,\n className,\n ...rest\n}: SubscriptionActionsProps) {\n const labels = useBillingLabels(labelsProp);\n const manage =\n manageHref !== undefined ? (\n <Button href={manageHref} variant=\"secondary\">\n {labels.manage}\n </Button>\n ) : onManage !== undefined ? (\n <Button type=\"button\" variant=\"secondary\" onClick={onManage} pending={pending === \"manage\"}>\n {labels.manage}\n </Button>\n ) : null;\n const cancel =\n cancelHref !== undefined ? (\n <Button href={cancelHref} variant=\"link\" tone=\"danger\">\n {labels.cancel}\n </Button>\n ) : onCancel !== undefined ? (\n <Button type=\"button\" variant=\"link\" tone=\"danger\" onClick={onCancel} pending={pending === \"cancel\"}>\n {labels.cancel}\n </Button>\n ) : null;\n if (!manage && !cancel) return null;\n return (\n <div {...rest} className={cn(\"flex flex-wrap items-center gap-x-4 gap-y-2\", className)}>\n {manage}\n {cancel}\n </div>\n );\n}\n"],"mappings":";AAkDM,cAoBF,YApBE;AA/CN,SAAS,UAAU;AACnB,SAAS,cAAc;AACvB,SAAS,wBAAwB;AAgC1B,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,GAAG;AACL,GAA6B;AAC3B,QAAM,SAAS,iBAAiB,UAAU;AAC1C,QAAM,SACJ,eAAe,SACb,oBAAC,UAAO,MAAM,YAAY,SAAQ,aAC/B,iBAAO,QACV,IACE,aAAa,SACf,oBAAC,UAAO,MAAK,UAAS,SAAQ,aAAY,SAAS,UAAU,SAAS,YAAY,UAC/E,iBAAO,QACV,IACE;AACN,QAAM,SACJ,eAAe,SACb,oBAAC,UAAO,MAAM,YAAY,SAAQ,QAAO,MAAK,UAC3C,iBAAO,QACV,IACE,aAAa,SACf,oBAAC,UAAO,MAAK,UAAS,SAAQ,QAAO,MAAK,UAAS,SAAS,UAAU,SAAS,YAAY,UACxF,iBAAO,QACV,IACE;AACN,MAAI,CAAC,UAAU,CAAC,OAAQ,QAAO;AAC/B,SACE,qBAAC,SAAK,GAAG,MAAM,WAAW,GAAG,+CAA+C,SAAS,GAClF;AAAA;AAAA,IACA;AAAA,KACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { fb as SubscriptionStatus, e4 as LabelOverride, bH as BillingLabels } from '../delete-account-setting-BvdQdbv3.js';
|
|
4
|
+
import { ChipTone, ChipSize, ChipVariant, ChipShape } from '../components/chip.js';
|
|
5
|
+
import '../components/tooltip.js';
|
|
6
|
+
import '../hooks/use-anchored-rect.js';
|
|
7
|
+
import '../lib/clipping.js';
|
|
8
|
+
import '../data-table-labels-kpAAVi6g.js';
|
|
9
|
+
import '../components/data-table-sort.js';
|
|
10
|
+
import '../components/swipeable-row.js';
|
|
11
|
+
import '../components/mini-calendar.js';
|
|
12
|
+
import '../components/calendar-heatmap.js';
|
|
13
|
+
import '../components/popover.js';
|
|
14
|
+
import '../hooks/use-breakpoint.js';
|
|
15
|
+
import '../components/field-sync.js';
|
|
16
|
+
import '../wizard/types.js';
|
|
17
|
+
import '../tour/tour.js';
|
|
18
|
+
import '../search/command-palette.js';
|
|
19
|
+
import '../search/global-search.js';
|
|
20
|
+
import '../search/search-index.js';
|
|
21
|
+
import '../components/month-picker.js';
|
|
22
|
+
import '../components/page-contents.js';
|
|
23
|
+
import '../components/series-chart-labels.js';
|
|
24
|
+
import '../components/pie-chart-labels.js';
|
|
25
|
+
import '../components/sparkline.js';
|
|
26
|
+
import '../components/stat-tile.js';
|
|
27
|
+
import '../components/signature-pad.js';
|
|
28
|
+
import '../components/password-strength.js';
|
|
29
|
+
import '../components/swatch-picker.js';
|
|
30
|
+
import '../components/tile-radio.js';
|
|
31
|
+
import '../components/icon-picker.js';
|
|
32
|
+
import '../components/dialog-frame.js';
|
|
33
|
+
import '../components/modal.js';
|
|
34
|
+
import '../hooks/use-search-param-state.js';
|
|
35
|
+
import '../components/measured-grid.js';
|
|
36
|
+
import 'lucide-react';
|
|
37
|
+
import '../components/user-avatar.js';
|
|
38
|
+
import '../lib/person-name.js';
|
|
39
|
+
import '../components/status-dot.js';
|
|
40
|
+
import '../components/progress-bar.js';
|
|
41
|
+
import '../components/signed-amount.js';
|
|
42
|
+
import '../components/field-parts.js';
|
|
43
|
+
import '../shell/topbar-action-menu.js';
|
|
44
|
+
import '../components/menu-item.js';
|
|
45
|
+
import '../components/floating-panel.js';
|
|
46
|
+
import '../hooks/use-authed-src.js';
|
|
47
|
+
import '../components/account-settings-labels.js';
|
|
48
|
+
import '../components/bulk-action-bar.js';
|
|
49
|
+
import '../components/list.js';
|
|
50
|
+
import '../components/breadcrumbs.js';
|
|
51
|
+
import '../components/toast.js';
|
|
52
|
+
import '../components/description-list.js';
|
|
53
|
+
import '../components/line-items.js';
|
|
54
|
+
import '../components/error-boundary.js';
|
|
55
|
+
import '../components/authed-image.js';
|
|
56
|
+
import '../components/image-grid.js';
|
|
57
|
+
import '../components/lightbox.js';
|
|
58
|
+
import '../components/write-lock.js';
|
|
59
|
+
import '../auth/sign-in-form.js';
|
|
60
|
+
import '../landing/access.js';
|
|
61
|
+
import '../landing/landing-labels.js';
|
|
62
|
+
import '../shell/topbar-controls.js';
|
|
63
|
+
import '../theme/palette-presets.js';
|
|
64
|
+
import '../theme/chart-palette.js';
|
|
65
|
+
import '../theme/theme-store.js';
|
|
66
|
+
import 'zustand/middleware';
|
|
67
|
+
import 'zustand';
|
|
68
|
+
import '../auth/complete-name-dialog.js';
|
|
69
|
+
import '../auth/forgot-password-form.js';
|
|
70
|
+
import '../auth/status-parts.js';
|
|
71
|
+
import '../auth/reset-password-form.js';
|
|
72
|
+
import '../auth/verify-email.js';
|
|
73
|
+
import '../auth/not-found-page.js';
|
|
74
|
+
import '../auth/accept-invitation.js';
|
|
75
|
+
import '../shell/company-switcher.js';
|
|
76
|
+
import '../account/email-change-setting.js';
|
|
77
|
+
import '../account/sessions-setting.js';
|
|
78
|
+
import '../lib/format.js';
|
|
79
|
+
import '../account/data-export-setting.js';
|
|
80
|
+
import '../components/account-chips.js';
|
|
81
|
+
import '../admin/admin-parts.js';
|
|
82
|
+
import '../admin/admin-action-log.js';
|
|
83
|
+
import '../settings/settings-labels.js';
|
|
84
|
+
import '../demo/demo-labels.js';
|
|
85
|
+
import '../components/appearance-labels.js';
|
|
86
|
+
import '../theme/contrast.js';
|
|
87
|
+
import '../theme/text-size.js';
|
|
88
|
+
import '../components/reauth-dialog.js';
|
|
89
|
+
import '../components/server-wake.js';
|
|
90
|
+
import '../lib/server-wake.js';
|
|
91
|
+
import '../components/translation-review-labels.js';
|
|
92
|
+
import '../lib/translation-review.js';
|
|
93
|
+
import '../components/country-select.js';
|
|
94
|
+
import '../components/inline-edit-field.js';
|
|
95
|
+
import '../lib/iban.js';
|
|
96
|
+
import '../lib/phone.js';
|
|
97
|
+
import '../components/sign-chip.js';
|
|
98
|
+
import '../components/column-mapper.js';
|
|
99
|
+
import '../lib/column-mapping.js';
|
|
100
|
+
import '../lib/table-text.js';
|
|
101
|
+
import '../components/focus-ring.js';
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* The tone of each status (docs/billing-harmonization.md §3.2, §3.3). The tone follows
|
|
105
|
+
* the STANDING, so a roster reads at a glance who can write:
|
|
106
|
+
*
|
|
107
|
+
* - `active` green: paid, in good standing;
|
|
108
|
+
* - `trialing` blue (info): in good standing until `trial_ends_at`, nothing wrong;
|
|
109
|
+
* - `past_due` amber: a payment failed, still in good standing while the provider retries;
|
|
110
|
+
* - `expired` red: out of good standing — read-only until a plan is chosen;
|
|
111
|
+
* - `canceled` grey: the payer's own choice, nothing to warn about;
|
|
112
|
+
* - `comped` purple, a hue rather than a tone: free by grant — neither paid nor in trouble,
|
|
113
|
+
* only different from both.
|
|
114
|
+
*/
|
|
115
|
+
declare const SUBSCRIPTION_STATUS_TONES: Readonly<Record<SubscriptionStatus, ChipTone>>;
|
|
116
|
+
interface SubscriptionStatusChipProps {
|
|
117
|
+
/**
|
|
118
|
+
* The row's `status` as the API sends it (§3.2). A value the kit does not know yet is
|
|
119
|
+
* shown as itself, in `neutral` — an unknown status is still a fact an operator should
|
|
120
|
+
* see. `null` / `undefined` renders nothing.
|
|
121
|
+
*/
|
|
122
|
+
status: SubscriptionStatus | (string & {}) | null | undefined;
|
|
123
|
+
/** Over {@link SUBSCRIPTION_STATUS_TONES}. */
|
|
124
|
+
tone?: ChipTone;
|
|
125
|
+
/** Over the status's word, for an app whose word is its own. */
|
|
126
|
+
children?: ReactNode;
|
|
127
|
+
/** Default `sm` (a roster's `extra` column, §6). */
|
|
128
|
+
size?: ChipSize;
|
|
129
|
+
/** Default `soft`. */
|
|
130
|
+
variant?: ChipVariant;
|
|
131
|
+
/** Default `square`, the status tag of `AccountStateChip`. */
|
|
132
|
+
shape?: ChipShape;
|
|
133
|
+
/** Default true, as `AccountStateChip`. */
|
|
134
|
+
caps?: boolean;
|
|
135
|
+
className?: string;
|
|
136
|
+
/** Prop > `<UiKitProvider labels={{ billing: { status } }}>` > English. */
|
|
137
|
+
labels?: LabelOverride<BillingLabels>;
|
|
138
|
+
[key: `data-${string}`]: string | number | boolean | undefined;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* A subscription's status as a chip, in the kit's words and tones (§6: the operator's
|
|
142
|
+
* roster shows the plan and the standing; §7: the subscription page). ALWAYS A WORD, never
|
|
143
|
+
* colour alone: "Trial", "Active", "Payment overdue", "Cancelled", "Expired",
|
|
144
|
+
* "Complimentary" — the tone repeats what the word says. Carries `data-status` with the
|
|
145
|
+
* key, for a test or a style hook.
|
|
146
|
+
*/
|
|
147
|
+
declare function SubscriptionStatusChip({ status, tone, children, size, variant, shape, caps, className, labels: labelsProp, ...rest }: SubscriptionStatusChipProps): react.JSX.Element | null;
|
|
148
|
+
|
|
149
|
+
export { SUBSCRIPTION_STATUS_TONES, SubscriptionStatusChip, type SubscriptionStatusChipProps };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Chip } from "../components/chip.js";
|
|
4
|
+
import { useBillingLabels } from "./billing-labels.js";
|
|
5
|
+
const SUBSCRIPTION_STATUS_TONES = Object.freeze({
|
|
6
|
+
trialing: "info",
|
|
7
|
+
active: "success",
|
|
8
|
+
past_due: "warning",
|
|
9
|
+
canceled: "neutral",
|
|
10
|
+
expired: "danger",
|
|
11
|
+
comped: "purple"
|
|
12
|
+
});
|
|
13
|
+
const isKnown = (value) => Object.prototype.hasOwnProperty.call(SUBSCRIPTION_STATUS_TONES, value);
|
|
14
|
+
function SubscriptionStatusChip({
|
|
15
|
+
status,
|
|
16
|
+
tone,
|
|
17
|
+
children,
|
|
18
|
+
size = "sm",
|
|
19
|
+
variant,
|
|
20
|
+
shape = "square",
|
|
21
|
+
caps = true,
|
|
22
|
+
className,
|
|
23
|
+
labels: labelsProp,
|
|
24
|
+
...rest
|
|
25
|
+
}) {
|
|
26
|
+
const labels = useBillingLabels(labelsProp);
|
|
27
|
+
if (status === null || status === void 0 || status === "") return null;
|
|
28
|
+
const known = isKnown(status);
|
|
29
|
+
return /* @__PURE__ */ jsx(
|
|
30
|
+
Chip,
|
|
31
|
+
{
|
|
32
|
+
...rest,
|
|
33
|
+
"data-status": status,
|
|
34
|
+
tone: tone ?? (known ? SUBSCRIPTION_STATUS_TONES[status] : "neutral"),
|
|
35
|
+
size,
|
|
36
|
+
variant,
|
|
37
|
+
shape,
|
|
38
|
+
caps,
|
|
39
|
+
className,
|
|
40
|
+
children: children ?? (known ? labels.status[status] : status)
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
SUBSCRIPTION_STATUS_TONES,
|
|
46
|
+
SubscriptionStatusChip
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=subscription-status-chip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/billing/subscription-status-chip.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport type { LabelOverride } from \"../i18n/kit-labels\";\nimport { Chip } from \"../components/chip\";\nimport type { ChipShape, ChipSize, ChipTone, ChipVariant } from \"../components/chip\";\nimport { useBillingLabels } from \"./billing-labels\";\nimport type { BillingLabels, SubscriptionStatus } from \"./billing-labels\";\n\n/**\n * The tone of each status (docs/billing-harmonization.md §3.2, §3.3). The tone follows\n * the STANDING, so a roster reads at a glance who can write:\n *\n * - `active` green: paid, in good standing;\n * - `trialing` blue (info): in good standing until `trial_ends_at`, nothing wrong;\n * - `past_due` amber: a payment failed, still in good standing while the provider retries;\n * - `expired` red: out of good standing — read-only until a plan is chosen;\n * - `canceled` grey: the payer's own choice, nothing to warn about;\n * - `comped` purple, a hue rather than a tone: free by grant — neither paid nor in trouble,\n * only different from both.\n */\nexport const SUBSCRIPTION_STATUS_TONES: Readonly<Record<SubscriptionStatus, ChipTone>> = Object.freeze({\n trialing: \"info\",\n active: \"success\",\n past_due: \"warning\",\n canceled: \"neutral\",\n expired: \"danger\",\n comped: \"purple\",\n});\n\nexport interface SubscriptionStatusChipProps {\n /**\n * The row's `status` as the API sends it (§3.2). A value the kit does not know yet is\n * shown as itself, in `neutral` — an unknown status is still a fact an operator should\n * see. `null` / `undefined` renders nothing.\n */\n status: SubscriptionStatus | (string & {}) | null | undefined;\n /** Over {@link SUBSCRIPTION_STATUS_TONES}. */\n tone?: ChipTone;\n /** Over the status's word, for an app whose word is its own. */\n children?: ReactNode;\n /** Default `sm` (a roster's `extra` column, §6). */\n size?: ChipSize;\n /** Default `soft`. */\n variant?: ChipVariant;\n /** Default `square`, the status tag of `AccountStateChip`. */\n shape?: ChipShape;\n /** Default true, as `AccountStateChip`. */\n caps?: boolean;\n className?: string;\n /** Prop > `<UiKitProvider labels={{ billing: { status } }}>` > English. */\n labels?: LabelOverride<BillingLabels>;\n [key: `data-${string}`]: string | number | boolean | undefined;\n}\n\n// Own keys only: `\"toString\" in {}` is true.\nconst isKnown = (value: string): value is SubscriptionStatus =>\n Object.prototype.hasOwnProperty.call(SUBSCRIPTION_STATUS_TONES, value);\n\n/**\n * A subscription's status as a chip, in the kit's words and tones (§6: the operator's\n * roster shows the plan and the standing; §7: the subscription page). ALWAYS A WORD, never\n * colour alone: \"Trial\", \"Active\", \"Payment overdue\", \"Cancelled\", \"Expired\",\n * \"Complimentary\" — the tone repeats what the word says. Carries `data-status` with the\n * key, for a test or a style hook.\n */\nexport function SubscriptionStatusChip({\n status,\n tone,\n children,\n size = \"sm\",\n variant,\n shape = \"square\",\n caps = true,\n className,\n labels: labelsProp,\n ...rest\n}: SubscriptionStatusChipProps) {\n const labels = useBillingLabels(labelsProp);\n if (status === null || status === undefined || status === \"\") return null;\n const known = isKnown(status);\n return (\n <Chip\n {...rest}\n data-status={status}\n tone={tone ?? (known ? SUBSCRIPTION_STATUS_TONES[status] : \"neutral\")}\n size={size}\n variant={variant}\n shape={shape}\n caps={caps}\n className={className}\n >\n {children ?? (known ? labels.status[status] : status)}\n </Chip>\n );\n}\n"],"mappings":";AAiFI;AA9EJ,SAAS,YAAY;AAErB,SAAS,wBAAwB;AAe1B,MAAM,4BAA4E,OAAO,OAAO;AAAA,EACrG,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ;AACV,CAAC;AA4BD,MAAM,UAAU,CAAC,UACf,OAAO,UAAU,eAAe,KAAK,2BAA2B,KAAK;AAShE,SAAS,uBAAuB;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,EACR,OAAO;AAAA,EACP;AAAA,EACA,QAAQ;AAAA,EACR,GAAG;AACL,GAAgC;AAC9B,QAAM,SAAS,iBAAiB,UAAU;AAC1C,MAAI,WAAW,QAAQ,WAAW,UAAa,WAAW,GAAI,QAAO;AACrE,QAAM,QAAQ,QAAQ,MAAM;AAC5B,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAa;AAAA,MACb,MAAM,SAAS,QAAQ,0BAA0B,MAAM,IAAI;AAAA,MAC3D;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEC,uBAAa,QAAQ,OAAO,OAAO,MAAM,IAAI;AAAA;AAAA,EAChD;AAEJ;","names":[]}
|
package/dist/chart.d.ts
CHANGED
|
@@ -13,18 +13,21 @@ export { TimeTickUnit } from './components/series-chart-ticks.js';
|
|
|
13
13
|
import 'recharts';
|
|
14
14
|
import 'react';
|
|
15
15
|
import './lib/direction.js';
|
|
16
|
-
import './
|
|
16
|
+
import './components/chart-height.js';
|
|
17
|
+
import './delete-account-setting-BvdQdbv3.js';
|
|
17
18
|
import './components/tooltip.js';
|
|
18
19
|
import './hooks/use-anchored-rect.js';
|
|
19
20
|
import './lib/clipping.js';
|
|
20
|
-
import './data-table-labels-
|
|
21
|
+
import './data-table-labels-kpAAVi6g.js';
|
|
21
22
|
import './components/data-table-sort.js';
|
|
22
23
|
import './components/swipeable-row.js';
|
|
23
24
|
import './components/mini-calendar.js';
|
|
24
25
|
import './components/calendar-heatmap.js';
|
|
25
26
|
import './components/popover.js';
|
|
27
|
+
import './hooks/use-breakpoint.js';
|
|
26
28
|
import './components/chip.js';
|
|
27
29
|
import 'lucide-react';
|
|
30
|
+
import './components/field-parts.js';
|
|
28
31
|
import './components/field-sync.js';
|
|
29
32
|
import './wizard/types.js';
|
|
30
33
|
import './tour/tour.js';
|
|
@@ -90,6 +93,9 @@ import './admin/admin-parts.js';
|
|
|
90
93
|
import './admin/admin-action-log.js';
|
|
91
94
|
import './settings/settings-labels.js';
|
|
92
95
|
import './demo/demo-labels.js';
|
|
96
|
+
import './components/appearance-labels.js';
|
|
97
|
+
import './theme/contrast.js';
|
|
98
|
+
import './theme/text-size.js';
|
|
93
99
|
import './components/reauth-dialog.js';
|
|
94
100
|
import './components/server-wake.js';
|
|
95
101
|
import './lib/server-wake.js';
|
|
@@ -103,4 +109,4 @@ import './components/sign-chip.js';
|
|
|
103
109
|
import './components/column-mapper.js';
|
|
104
110
|
import './lib/column-mapping.js';
|
|
105
111
|
import './lib/table-text.js';
|
|
106
|
-
import './components/
|
|
112
|
+
import './components/focus-ring.js';
|
|
@@ -3,7 +3,11 @@ import { ReactElement, ReactNode } from 'react';
|
|
|
3
3
|
import { LucideIcon } from 'lucide-react';
|
|
4
4
|
import { DateInput, FormatDateStyle, FormatRelativeTimeOptions } from '../lib/format.js';
|
|
5
5
|
import { ChipTone, ChipSize, ChipVariant, ChipShape } from './chip.js';
|
|
6
|
-
import { d as DataTableColumn } from '../data-table-labels-
|
|
6
|
+
import { d as DataTableColumn } from '../data-table-labels-kpAAVi6g.js';
|
|
7
|
+
import './field-parts.js';
|
|
8
|
+
import './tooltip.js';
|
|
9
|
+
import '../hooks/use-anchored-rect.js';
|
|
10
|
+
import '../lib/clipping.js';
|
|
7
11
|
import './data-table-sort.js';
|
|
8
12
|
import './swipeable-row.js';
|
|
9
13
|
|
|
@@ -147,10 +151,18 @@ interface DateMarkProps {
|
|
|
147
151
|
/**
|
|
148
152
|
* `"date"` (default): the date in `dateStyle` — "Created". `"relative"`: how long
|
|
149
153
|
* ago — "Last login", where the question is "recently?" — with the full date and
|
|
150
|
-
* time
|
|
154
|
+
* time beside it (keksdose's last-seen column; see `absolute`).
|
|
151
155
|
*/
|
|
152
156
|
display?: "date" | "relative";
|
|
153
|
-
/**
|
|
157
|
+
/**
|
|
158
|
+
* Where a `"relative"` mark puts the exact date and time (0.32,
|
|
159
|
+
* docs/text-size-harmonization.md §4: "relative dates show the absolute one beside
|
|
160
|
+
* them", at every size — a touch screen never opens the tooltip it used to live in):
|
|
161
|
+
* `"below"` (default), a muted second line under the words, so a table column keeps
|
|
162
|
+
* its width; `"inline"`, after them on the same line, for a sentence or a wide cell.
|
|
163
|
+
*/
|
|
164
|
+
absolute?: "below" | "inline";
|
|
165
|
+
/** Default `medium`. Under `"relative"`, the style of the exact date beside it (default
|
|
154
166
|
* `dateTime`) and of the date `relative.absoluteAfterDays` switches to. Given, it wins
|
|
155
167
|
* over the provider's `formatDate`. */
|
|
156
168
|
dateStyle?: FormatDateStyle | Intl.DateTimeFormatOptions;
|
|
@@ -174,7 +186,7 @@ interface DateMarkProps {
|
|
|
174
186
|
* an empty answer, it is `Intl`'s `medium` date as before. The relative display is not
|
|
175
187
|
* a calendar day and keeps `formatRelativeTime`.
|
|
176
188
|
*/
|
|
177
|
-
declare function DateMark({ value, display, dateStyle, relative, empty, locale: localeProp, className, }: DateMarkProps): react.JSX.Element;
|
|
189
|
+
declare function DateMark({ value, display, dateStyle, relative, absolute, empty, locale: localeProp, className, }: DateMarkProps): react.JSX.Element;
|
|
178
190
|
interface DateColumnOptions<T> extends Omit<DateMarkProps, "value" | "className"> {
|
|
179
191
|
key: string;
|
|
180
192
|
header: ReactNode;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { cn } from "../lib/cn.js";
|
|
4
4
|
import { formatDate, formatRelativeTime, toDate, EMPTY_FORMATTED_VALUE } from "../lib/format.js";
|
|
5
5
|
import { useKitDateFormatter, useKitLabels, useKitLocale } from "../i18n/kit-labels.js";
|
|
6
6
|
import { toLocalIso } from "../lib/dates.js";
|
|
7
7
|
import { Chip } from "./chip.js";
|
|
8
|
-
import { Tooltip } from "./tooltip.js";
|
|
9
8
|
function RoleChip({
|
|
10
9
|
value: role,
|
|
11
10
|
roles,
|
|
@@ -99,6 +98,7 @@ function DateMark({
|
|
|
99
98
|
display = "date",
|
|
100
99
|
dateStyle,
|
|
101
100
|
relative,
|
|
101
|
+
absolute = "below",
|
|
102
102
|
empty = EMPTY_FORMATTED_VALUE,
|
|
103
103
|
locale: localeProp,
|
|
104
104
|
className
|
|
@@ -113,7 +113,25 @@ function DateMark({
|
|
|
113
113
|
return /* @__PURE__ */ jsx("time", { dateTime: date.toISOString(), className: cls, children: own || formatDate(date, dateStyle ?? "medium", { locale }) });
|
|
114
114
|
}
|
|
115
115
|
const text = formatRelativeTime(date, { ...relative, locale, absoluteStyle: dateStyle ?? "medium" });
|
|
116
|
-
|
|
116
|
+
const exact = formatDate(date, dateStyle ?? "dateTime", { locale });
|
|
117
|
+
const sameDay = text === formatDate(date, dateStyle ?? "medium", { locale });
|
|
118
|
+
const iso = date.toISOString();
|
|
119
|
+
if (sameDay) {
|
|
120
|
+
return /* @__PURE__ */ jsx("time", { dateTime: iso, className: cls, children: exact });
|
|
121
|
+
}
|
|
122
|
+
return /* @__PURE__ */ jsxs(
|
|
123
|
+
"time",
|
|
124
|
+
{
|
|
125
|
+
dateTime: iso,
|
|
126
|
+
"data-slot": "date-mark",
|
|
127
|
+
className: cn(absolute === "below" ? "inline-flex flex-col leading-tight" : "inline", className),
|
|
128
|
+
children: [
|
|
129
|
+
/* @__PURE__ */ jsx("span", { className: "whitespace-nowrap tabular-nums", children: text }),
|
|
130
|
+
absolute === "inline" && " \xB7 ",
|
|
131
|
+
/* @__PURE__ */ jsx("span", { className: cn("whitespace-nowrap tabular-nums text-[var(--text-muted)]", absolute === "below" && "text-xs"), children: exact })
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
);
|
|
117
135
|
}
|
|
118
136
|
function dateColumn({
|
|
119
137
|
key,
|