@eifi1/ui-kit 0.31.1 → 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 +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/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 +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/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-CpIhzxxZ.d.ts → delete-account-setting-BvdQdbv3.d.ts} +605 -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 +89 -2
- 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 +84 -2
- package/dist/i18n/locales/es.js.map +1 -1
- package/dist/i18n/locales/fr.d.ts +8 -3
- package/dist/i18n/locales/fr.js +86 -2
- package/dist/i18n/locales/fr.js.map +1 -1
- package/dist/i18n/locales/hu.d.ts +8 -3
- package/dist/i18n/locales/hu.js +86 -2
- package/dist/i18n/locales/hu.js.map +1 -1
- package/dist/i18n/locales/it.d.ts +8 -3
- package/dist/i18n/locales/it.js +87 -2
- package/dist/i18n/locales/it.js.map +1 -1
- package/dist/i18n/locales/zh.d.ts +8 -3
- package/dist/i18n/locales/zh.js +84 -2
- 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 +75 -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/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 +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/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 +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/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 +103 -0
- package/src/i18n/kit-labels.tsx +12 -0
- package/src/i18n/locales/es.ts +94 -0
- package/src/i18n/locales/fr.ts +98 -0
- package/src/i18n/locales/hu.ts +96 -0
- package/src/i18n/locales/it.ts +99 -0
- package/src/i18n/locales/zh.ts +90 -0
- package/src/i18n/review.ts +14 -0
- package/src/index.ts +74 -6
- 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 +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,158 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { e4 as LabelOverride, bH as BillingLabels } from '../delete-account-setting-BvdQdbv3.js';
|
|
3
|
+
import '../components/tooltip.js';
|
|
4
|
+
import '../hooks/use-anchored-rect.js';
|
|
5
|
+
import '../lib/clipping.js';
|
|
6
|
+
import '../data-table-labels-kpAAVi6g.js';
|
|
7
|
+
import '../components/data-table-sort.js';
|
|
8
|
+
import '../components/swipeable-row.js';
|
|
9
|
+
import '../components/mini-calendar.js';
|
|
10
|
+
import '../components/calendar-heatmap.js';
|
|
11
|
+
import '../components/popover.js';
|
|
12
|
+
import '../hooks/use-breakpoint.js';
|
|
13
|
+
import '../components/chip.js';
|
|
14
|
+
import 'lucide-react';
|
|
15
|
+
import '../components/field-parts.js';
|
|
16
|
+
import '../components/field-sync.js';
|
|
17
|
+
import '../wizard/types.js';
|
|
18
|
+
import '../tour/tour.js';
|
|
19
|
+
import '../search/command-palette.js';
|
|
20
|
+
import '../search/global-search.js';
|
|
21
|
+
import '../search/search-index.js';
|
|
22
|
+
import '../components/month-picker.js';
|
|
23
|
+
import '../components/page-contents.js';
|
|
24
|
+
import '../components/series-chart-labels.js';
|
|
25
|
+
import '../components/pie-chart-labels.js';
|
|
26
|
+
import '../components/sparkline.js';
|
|
27
|
+
import '../components/stat-tile.js';
|
|
28
|
+
import '../components/signature-pad.js';
|
|
29
|
+
import '../components/password-strength.js';
|
|
30
|
+
import '../components/swatch-picker.js';
|
|
31
|
+
import '../components/tile-radio.js';
|
|
32
|
+
import '../components/icon-picker.js';
|
|
33
|
+
import '../components/dialog-frame.js';
|
|
34
|
+
import '../components/modal.js';
|
|
35
|
+
import '../hooks/use-search-param-state.js';
|
|
36
|
+
import '../components/measured-grid.js';
|
|
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 '../shell/topbar-action-menu.js';
|
|
43
|
+
import '../components/menu-item.js';
|
|
44
|
+
import '../components/floating-panel.js';
|
|
45
|
+
import '../hooks/use-authed-src.js';
|
|
46
|
+
import '../components/account-settings-labels.js';
|
|
47
|
+
import '../components/bulk-action-bar.js';
|
|
48
|
+
import '../components/list.js';
|
|
49
|
+
import '../components/breadcrumbs.js';
|
|
50
|
+
import '../components/toast.js';
|
|
51
|
+
import '../components/description-list.js';
|
|
52
|
+
import '../components/line-items.js';
|
|
53
|
+
import '../components/error-boundary.js';
|
|
54
|
+
import '../components/authed-image.js';
|
|
55
|
+
import '../components/image-grid.js';
|
|
56
|
+
import '../components/lightbox.js';
|
|
57
|
+
import '../components/write-lock.js';
|
|
58
|
+
import '../auth/sign-in-form.js';
|
|
59
|
+
import '../landing/access.js';
|
|
60
|
+
import '../landing/landing-labels.js';
|
|
61
|
+
import '../shell/topbar-controls.js';
|
|
62
|
+
import '../theme/palette-presets.js';
|
|
63
|
+
import '../theme/chart-palette.js';
|
|
64
|
+
import '../theme/theme-store.js';
|
|
65
|
+
import 'zustand/middleware';
|
|
66
|
+
import 'zustand';
|
|
67
|
+
import '../auth/complete-name-dialog.js';
|
|
68
|
+
import '../auth/forgot-password-form.js';
|
|
69
|
+
import '../auth/status-parts.js';
|
|
70
|
+
import '../auth/reset-password-form.js';
|
|
71
|
+
import '../auth/verify-email.js';
|
|
72
|
+
import '../auth/not-found-page.js';
|
|
73
|
+
import '../auth/accept-invitation.js';
|
|
74
|
+
import '../shell/company-switcher.js';
|
|
75
|
+
import '../account/email-change-setting.js';
|
|
76
|
+
import '../account/sessions-setting.js';
|
|
77
|
+
import '../lib/format.js';
|
|
78
|
+
import '../account/data-export-setting.js';
|
|
79
|
+
import '../components/account-chips.js';
|
|
80
|
+
import '../admin/admin-parts.js';
|
|
81
|
+
import '../admin/admin-action-log.js';
|
|
82
|
+
import '../settings/settings-labels.js';
|
|
83
|
+
import '../demo/demo-labels.js';
|
|
84
|
+
import '../components/appearance-labels.js';
|
|
85
|
+
import '../theme/contrast.js';
|
|
86
|
+
import '../theme/text-size.js';
|
|
87
|
+
import '../components/reauth-dialog.js';
|
|
88
|
+
import '../components/server-wake.js';
|
|
89
|
+
import '../lib/server-wake.js';
|
|
90
|
+
import '../components/translation-review-labels.js';
|
|
91
|
+
import '../lib/translation-review.js';
|
|
92
|
+
import '../components/country-select.js';
|
|
93
|
+
import '../components/inline-edit-field.js';
|
|
94
|
+
import '../lib/iban.js';
|
|
95
|
+
import '../lib/phone.js';
|
|
96
|
+
import '../components/sign-chip.js';
|
|
97
|
+
import '../components/column-mapper.js';
|
|
98
|
+
import '../lib/column-mapping.js';
|
|
99
|
+
import '../lib/table-text.js';
|
|
100
|
+
import '../components/focus-ring.js';
|
|
101
|
+
|
|
102
|
+
/** One reason an app may lock writing: whether it locks now, and its one sentence. */
|
|
103
|
+
interface WriteLockSource {
|
|
104
|
+
locked: boolean;
|
|
105
|
+
/** The sentence a locked commit shows ("Not possible in the demo."). */
|
|
106
|
+
reason?: ReactNode;
|
|
107
|
+
}
|
|
108
|
+
/** What {@link combineWriteLocks} answers: the props of one `WriteLockProvider`. */
|
|
109
|
+
interface CombinedWriteLock {
|
|
110
|
+
locked: boolean;
|
|
111
|
+
/** The first locked source's reason; `undefined` while nothing locks. */
|
|
112
|
+
reason: ReactNode | undefined;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Several reasons to lock writing, as ONE `WriteLockProvider` (docs/billing-harmonization.md
|
|
116
|
+
* §12.6): the demo's read-only data and billing's read-only lapse, in keksdose's case on
|
|
117
|
+
* the same budget page.
|
|
118
|
+
*
|
|
119
|
+
* const demo = useDemoLabels();
|
|
120
|
+
* const billingReason = useBillingLockReason({ guest: !isOwner, item: budget.name });
|
|
121
|
+
* <WriteLockProvider {...combineWriteLocks([
|
|
122
|
+
* { locked: demoReadOnly, reason: demo.writeLocked },
|
|
123
|
+
* { locked: budget.locked === "billing", reason: billingReason },
|
|
124
|
+
* ])}>
|
|
125
|
+
*
|
|
126
|
+
* WHY NOT TWO NESTED PROVIDERS: the nearest provider wins (write-lock.tsx), and an inner
|
|
127
|
+
* `locked={false}` REOPENS an outer lock on purpose — a viewer's own notes on a shared
|
|
128
|
+
* curve. So `<Demo locked><Billing locked={false}>` would unlock the demo's data, and an
|
|
129
|
+
* app would have to mount the inner provider only while it locks. One provider fed by
|
|
130
|
+
* this function has no such order to get wrong.
|
|
131
|
+
*
|
|
132
|
+
* Locked when any source is; the reason is the FIRST locked source's, so list them in the
|
|
133
|
+
* order the server refuses them (§12.3): the demo's 403 before billing's 402. One sentence,
|
|
134
|
+
* not two joined: a tooltip answers "why can't I?" once, and in practice one source locks
|
|
135
|
+
* at a time — demo users have no subscription row and are never gated (§12.7). `null`,
|
|
136
|
+
* `undefined` and `false` entries are skipped, for `cond && { … }`.
|
|
137
|
+
*/
|
|
138
|
+
declare function combineWriteLocks(sources: ReadonlyArray<WriteLockSource | null | undefined | false>): CombinedWriteLock;
|
|
139
|
+
interface BillingLockReasonOptions {
|
|
140
|
+
/**
|
|
141
|
+
* The reader is a GUEST in someone else's item (§12.6): the reason never says why
|
|
142
|
+
* beyond "for now", because the owner's payment status is the owner's personal data —
|
|
143
|
+
* "This budget is read-only for now; its owner can lift that." Default false: the
|
|
144
|
+
* reader is the payer, "Your plan has ended. Choose a plan to make changes again."
|
|
145
|
+
*/
|
|
146
|
+
guest?: boolean;
|
|
147
|
+
/** A guest's item, by its own name ("Household 2026"). Ignored for the payer. */
|
|
148
|
+
item?: string;
|
|
149
|
+
labels?: LabelOverride<BillingLabels>;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* The billing lock's sentence for a `WriteLockProvider` (§3.3), in the `billing` words of
|
|
153
|
+
* the nearest provider: the payer's `lockReason`, or a guest's `guestReadOnly`. Feed it
|
|
154
|
+
* to {@link combineWriteLocks} beside the demo's.
|
|
155
|
+
*/
|
|
156
|
+
declare function useBillingLockReason(options?: BillingLockReasonOptions): string;
|
|
157
|
+
|
|
158
|
+
export { type BillingLockReasonOptions, type CombinedWriteLock, type WriteLockSource, combineWriteLocks, useBillingLockReason };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useBillingLabels } from "./billing-labels.js";
|
|
3
|
+
function combineWriteLocks(sources) {
|
|
4
|
+
for (const source of sources) {
|
|
5
|
+
if (source && source.locked) return { locked: true, reason: source.reason };
|
|
6
|
+
}
|
|
7
|
+
return { locked: false, reason: void 0 };
|
|
8
|
+
}
|
|
9
|
+
function useBillingLockReason(options = {}) {
|
|
10
|
+
const labels = useBillingLabels(options.labels);
|
|
11
|
+
return options.guest ? labels.guestReadOnly(options.item) : labels.lockReason;
|
|
12
|
+
}
|
|
13
|
+
export {
|
|
14
|
+
combineWriteLocks,
|
|
15
|
+
useBillingLockReason
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=billing-lock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/billing/billing-lock.ts"],"sourcesContent":["import type { ReactNode } from \"react\";\n\nimport type { LabelOverride } from \"../i18n/kit-labels\";\nimport { useBillingLabels } from \"./billing-labels\";\nimport type { BillingLabels } from \"./billing-labels\";\n\n/** One reason an app may lock writing: whether it locks now, and its one sentence. */\nexport interface WriteLockSource {\n locked: boolean;\n /** The sentence a locked commit shows (\"Not possible in the demo.\"). */\n reason?: ReactNode;\n}\n\n/** What {@link combineWriteLocks} answers: the props of one `WriteLockProvider`. */\nexport interface CombinedWriteLock {\n locked: boolean;\n /** The first locked source's reason; `undefined` while nothing locks. */\n reason: ReactNode | undefined;\n}\n\n/**\n * Several reasons to lock writing, as ONE `WriteLockProvider` (docs/billing-harmonization.md\n * §12.6): the demo's read-only data and billing's read-only lapse, in keksdose's case on\n * the same budget page.\n *\n * const demo = useDemoLabels();\n * const billingReason = useBillingLockReason({ guest: !isOwner, item: budget.name });\n * <WriteLockProvider {...combineWriteLocks([\n * { locked: demoReadOnly, reason: demo.writeLocked },\n * { locked: budget.locked === \"billing\", reason: billingReason },\n * ])}>\n *\n * WHY NOT TWO NESTED PROVIDERS: the nearest provider wins (write-lock.tsx), and an inner\n * `locked={false}` REOPENS an outer lock on purpose — a viewer's own notes on a shared\n * curve. So `<Demo locked><Billing locked={false}>` would unlock the demo's data, and an\n * app would have to mount the inner provider only while it locks. One provider fed by\n * this function has no such order to get wrong.\n *\n * Locked when any source is; the reason is the FIRST locked source's, so list them in the\n * order the server refuses them (§12.3): the demo's 403 before billing's 402. One sentence,\n * not two joined: a tooltip answers \"why can't I?\" once, and in practice one source locks\n * at a time — demo users have no subscription row and are never gated (§12.7). `null`,\n * `undefined` and `false` entries are skipped, for `cond && { … }`.\n */\nexport function combineWriteLocks(\n sources: ReadonlyArray<WriteLockSource | null | undefined | false>,\n): CombinedWriteLock {\n for (const source of sources) {\n if (source && source.locked) return { locked: true, reason: source.reason };\n }\n return { locked: false, reason: undefined };\n}\n\nexport interface BillingLockReasonOptions {\n /**\n * The reader is a GUEST in someone else's item (§12.6): the reason never says why\n * beyond \"for now\", because the owner's payment status is the owner's personal data —\n * \"This budget is read-only for now; its owner can lift that.\" Default false: the\n * reader is the payer, \"Your plan has ended. Choose a plan to make changes again.\"\n */\n guest?: boolean;\n /** A guest's item, by its own name (\"Household 2026\"). Ignored for the payer. */\n item?: string;\n labels?: LabelOverride<BillingLabels>;\n}\n\n/**\n * The billing lock's sentence for a `WriteLockProvider` (§3.3), in the `billing` words of\n * the nearest provider: the payer's `lockReason`, or a guest's `guestReadOnly`. Feed it\n * to {@link combineWriteLocks} beside the demo's.\n */\nexport function useBillingLockReason(options: BillingLockReasonOptions = {}): string {\n const labels = useBillingLabels(options.labels);\n return options.guest ? labels.guestReadOnly(options.item) : labels.lockReason;\n}\n"],"mappings":";AAGA,SAAS,wBAAwB;AAyC1B,SAAS,kBACd,SACmB;AACnB,aAAW,UAAU,SAAS;AAC5B,QAAI,UAAU,OAAO,OAAQ,QAAO,EAAE,QAAQ,MAAM,QAAQ,OAAO,OAAO;AAAA,EAC5E;AACA,SAAO,EAAE,QAAQ,OAAO,QAAQ,OAAU;AAC5C;AAoBO,SAAS,qBAAqB,UAAoC,CAAC,GAAW;AACnF,QAAM,SAAS,iBAAiB,QAAQ,MAAM;AAC9C,SAAO,QAAQ,QAAQ,OAAO,cAAc,QAAQ,IAAI,IAAI,OAAO;AACrE;","names":[]}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { DateInput } from '../lib/format.js';
|
|
2
|
+
import { fb as SubscriptionStatus } from '../delete-account-setting-BvdQdbv3.js';
|
|
3
|
+
import 'react';
|
|
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 '../account/data-export-setting.js';
|
|
79
|
+
import '../components/account-chips.js';
|
|
80
|
+
import '../admin/admin-parts.js';
|
|
81
|
+
import '../admin/admin-action-log.js';
|
|
82
|
+
import '../settings/settings-labels.js';
|
|
83
|
+
import '../demo/demo-labels.js';
|
|
84
|
+
import '../components/appearance-labels.js';
|
|
85
|
+
import '../theme/contrast.js';
|
|
86
|
+
import '../theme/text-size.js';
|
|
87
|
+
import '../components/reauth-dialog.js';
|
|
88
|
+
import '../components/server-wake.js';
|
|
89
|
+
import '../lib/server-wake.js';
|
|
90
|
+
import '../components/translation-review-labels.js';
|
|
91
|
+
import '../lib/translation-review.js';
|
|
92
|
+
import '../components/country-select.js';
|
|
93
|
+
import '../components/inline-edit-field.js';
|
|
94
|
+
import '../lib/iban.js';
|
|
95
|
+
import '../lib/phone.js';
|
|
96
|
+
import '../components/sign-chip.js';
|
|
97
|
+
import '../components/column-mapper.js';
|
|
98
|
+
import '../lib/column-mapping.js';
|
|
99
|
+
import '../lib/table-text.js';
|
|
100
|
+
import '../components/focus-ring.js';
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* What a device knows of the payer's standing — the fields of `GET /billing/overview`
|
|
104
|
+
* (docs/billing-harmonization.md §4) that decide the read-only lock, under their wire
|
|
105
|
+
* names. Pass the overview as it came; the other fields are ignored.
|
|
106
|
+
*/
|
|
107
|
+
interface BillingStanding {
|
|
108
|
+
status: SubscriptionStatus;
|
|
109
|
+
/** The server's answer at the time of the read (§3.3). */
|
|
110
|
+
in_good_standing: boolean;
|
|
111
|
+
/** When a trial ends (§3.2). Empty for a pure guest whose trial has not started (§12.9). */
|
|
112
|
+
trial_ends_at?: DateInput;
|
|
113
|
+
/** When a free grant ends: a beta user's 12 months, an operator's grant. Empty for a
|
|
114
|
+
* grant without an end (§12.8). */
|
|
115
|
+
comped_until?: DateInput;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* The moment this payer's data becomes read-only by itself, known IN ADVANCE — or `null`
|
|
119
|
+
* when no date says so (docs/billing-harmonization.md §12.5).
|
|
120
|
+
*
|
|
121
|
+
* A device writes locally first and sends later (keksdose's outbox, an encrypted budget
|
|
122
|
+
* always), so a lock that only arrives with the server's 402 comes after the UI already
|
|
123
|
+
* said "saved" — keksdose's phantom save (dev#496). The two dates that end good standing
|
|
124
|
+
* on a schedule are in the overview, so the device locks itself on time, offline too:
|
|
125
|
+
* a trial at `trial_ends_at`, a grant at `comped_until`. Only `past_due` → `expired`
|
|
126
|
+
* depends on the provider's retries and waits for the next sync.
|
|
127
|
+
*/
|
|
128
|
+
declare function billingLockAt(standing: BillingStanding): Date | null;
|
|
129
|
+
/**
|
|
130
|
+
* Whether the payer's data is read-only at `now` (default: the present moment): the
|
|
131
|
+
* server already said so (`in_good_standing: false`), or a date from
|
|
132
|
+
* {@link billingLockAt} has passed since the overview was read. Mirror it into the app's
|
|
133
|
+
* offline write gate and its `WriteLockProvider` (§3.3, §12.5).
|
|
134
|
+
*
|
|
135
|
+
* A GUEST's device cannot do this for the owner: the owner's dates are the owner's
|
|
136
|
+
* personal data (§12.6). An item shared with a guest carries `locked: "billing" | null`,
|
|
137
|
+
* which the guest's device mirrors as it comes.
|
|
138
|
+
*/
|
|
139
|
+
declare function isBillingReadOnly(standing: BillingStanding, now?: number | Date): boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Whole calendar days from `now` to `endsAt`, in the device's time zone — 0 on the day
|
|
142
|
+
* itself (and after it), 1 the day before — or `null` for no readable date. The count a
|
|
143
|
+
* trial or grant banner says ("ends tomorrow", "ends in 5 days"), from the day a reader
|
|
144
|
+
* lives in rather than from 24-hour blocks: a trial ending at 01:00 tomorrow ends
|
|
145
|
+
* "tomorrow", not "today".
|
|
146
|
+
*/
|
|
147
|
+
declare function billingDaysLeft(endsAt: DateInput, now?: number | Date): number | null;
|
|
148
|
+
|
|
149
|
+
export { type BillingStanding, billingDaysLeft, billingLockAt, isBillingReadOnly };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { toDate } from "../lib/format.js";
|
|
3
|
+
function billingLockAt(standing) {
|
|
4
|
+
if (standing.status === "trialing") return toDate(standing.trial_ends_at ?? null);
|
|
5
|
+
if (standing.status === "comped") return toDate(standing.comped_until ?? null);
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
function isBillingReadOnly(standing, now = Date.now()) {
|
|
9
|
+
if (!standing.in_good_standing) return true;
|
|
10
|
+
const at = billingLockAt(standing);
|
|
11
|
+
const instant = typeof now === "number" ? now : now.getTime();
|
|
12
|
+
return at !== null && at.getTime() <= instant;
|
|
13
|
+
}
|
|
14
|
+
const DAY = 864e5;
|
|
15
|
+
function billingDaysLeft(endsAt, now = Date.now()) {
|
|
16
|
+
const end = toDate(endsAt);
|
|
17
|
+
if (!end) return null;
|
|
18
|
+
const from = typeof now === "number" ? new Date(now) : now;
|
|
19
|
+
const endDay = new Date(end.getFullYear(), end.getMonth(), end.getDate()).getTime();
|
|
20
|
+
const fromDay = new Date(from.getFullYear(), from.getMonth(), from.getDate()).getTime();
|
|
21
|
+
return Math.max(0, Math.round((endDay - fromDay) / DAY));
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
billingDaysLeft,
|
|
25
|
+
billingLockAt,
|
|
26
|
+
isBillingReadOnly
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=billing-standing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/billing/billing-standing.ts"],"sourcesContent":["import { toDate } from \"../lib/format\";\nimport type { DateInput } from \"../lib/format\";\nimport type { SubscriptionStatus } from \"./billing-labels\";\n\n/**\n * What a device knows of the payer's standing — the fields of `GET /billing/overview`\n * (docs/billing-harmonization.md §4) that decide the read-only lock, under their wire\n * names. Pass the overview as it came; the other fields are ignored.\n */\nexport interface BillingStanding {\n status: SubscriptionStatus;\n /** The server's answer at the time of the read (§3.3). */\n in_good_standing: boolean;\n /** When a trial ends (§3.2). Empty for a pure guest whose trial has not started (§12.9). */\n trial_ends_at?: DateInput;\n /** When a free grant ends: a beta user's 12 months, an operator's grant. Empty for a\n * grant without an end (§12.8). */\n comped_until?: DateInput;\n}\n\n/**\n * The moment this payer's data becomes read-only by itself, known IN ADVANCE — or `null`\n * when no date says so (docs/billing-harmonization.md §12.5).\n *\n * A device writes locally first and sends later (keksdose's outbox, an encrypted budget\n * always), so a lock that only arrives with the server's 402 comes after the UI already\n * said \"saved\" — keksdose's phantom save (dev#496). The two dates that end good standing\n * on a schedule are in the overview, so the device locks itself on time, offline too:\n * a trial at `trial_ends_at`, a grant at `comped_until`. Only `past_due` → `expired`\n * depends on the provider's retries and waits for the next sync.\n */\nexport function billingLockAt(standing: BillingStanding): Date | null {\n if (standing.status === \"trialing\") return toDate(standing.trial_ends_at ?? null);\n if (standing.status === \"comped\") return toDate(standing.comped_until ?? null);\n return null;\n}\n\n/**\n * Whether the payer's data is read-only at `now` (default: the present moment): the\n * server already said so (`in_good_standing: false`), or a date from\n * {@link billingLockAt} has passed since the overview was read. Mirror it into the app's\n * offline write gate and its `WriteLockProvider` (§3.3, §12.5).\n *\n * A GUEST's device cannot do this for the owner: the owner's dates are the owner's\n * personal data (§12.6). An item shared with a guest carries `locked: \"billing\" | null`,\n * which the guest's device mirrors as it comes.\n */\nexport function isBillingReadOnly(standing: BillingStanding, now: number | Date = Date.now()): boolean {\n if (!standing.in_good_standing) return true;\n const at = billingLockAt(standing);\n const instant = typeof now === \"number\" ? now : now.getTime();\n return at !== null && at.getTime() <= instant;\n}\n\nconst DAY = 86_400_000;\n\n/**\n * Whole calendar days from `now` to `endsAt`, in the device's time zone — 0 on the day\n * itself (and after it), 1 the day before — or `null` for no readable date. The count a\n * trial or grant banner says (\"ends tomorrow\", \"ends in 5 days\"), from the day a reader\n * lives in rather than from 24-hour blocks: a trial ending at 01:00 tomorrow ends\n * \"tomorrow\", not \"today\".\n */\nexport function billingDaysLeft(endsAt: DateInput, now: number | Date = Date.now()): number | null {\n const end = toDate(endsAt);\n if (!end) return null;\n const from = typeof now === \"number\" ? new Date(now) : now;\n const endDay = new Date(end.getFullYear(), end.getMonth(), end.getDate()).getTime();\n const fromDay = new Date(from.getFullYear(), from.getMonth(), from.getDate()).getTime();\n // `round`, not `floor`: a day across a DST change is 23 or 25 hours long.\n return Math.max(0, Math.round((endDay - fromDay) / DAY));\n}\n"],"mappings":";AAAA,SAAS,cAAc;AA+BhB,SAAS,cAAc,UAAwC;AACpE,MAAI,SAAS,WAAW,WAAY,QAAO,OAAO,SAAS,iBAAiB,IAAI;AAChF,MAAI,SAAS,WAAW,SAAU,QAAO,OAAO,SAAS,gBAAgB,IAAI;AAC7E,SAAO;AACT;AAYO,SAAS,kBAAkB,UAA2B,MAAqB,KAAK,IAAI,GAAY;AACrG,MAAI,CAAC,SAAS,iBAAkB,QAAO;AACvC,QAAM,KAAK,cAAc,QAAQ;AACjC,QAAM,UAAU,OAAO,QAAQ,WAAW,MAAM,IAAI,QAAQ;AAC5D,SAAO,OAAO,QAAQ,GAAG,QAAQ,KAAK;AACxC;AAEA,MAAM,MAAM;AASL,SAAS,gBAAgB,QAAmB,MAAqB,KAAK,IAAI,GAAkB;AACjG,QAAM,MAAM,OAAO,MAAM;AACzB,MAAI,CAAC,IAAK,QAAO;AACjB,QAAM,OAAO,OAAO,QAAQ,WAAW,IAAI,KAAK,GAAG,IAAI;AACvD,QAAM,SAAS,IAAI,KAAK,IAAI,YAAY,GAAG,IAAI,SAAS,GAAG,IAAI,QAAQ,CAAC,EAAE,QAAQ;AAClF,QAAM,UAAU,IAAI,KAAK,KAAK,YAAY,GAAG,KAAK,SAAS,GAAG,KAAK,QAAQ,CAAC,EAAE,QAAQ;AAEtF,SAAO,KAAK,IAAI,GAAG,KAAK,OAAO,SAAS,WAAW,GAAG,CAAC;AACzD;","names":[]}
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import * as react from 'react';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { e4 as LabelOverride, bH as BillingLabels } from '../delete-account-setting-BvdQdbv3.js';
|
|
4
|
+
import { ChoiceCardProps } from '../components/choice-card.js';
|
|
5
|
+
import { PlanPrices, BillingCurrency, BillingInterval } from './plan-price.js';
|
|
6
|
+
import '../components/tooltip.js';
|
|
7
|
+
import '../hooks/use-anchored-rect.js';
|
|
8
|
+
import '../lib/clipping.js';
|
|
9
|
+
import '../data-table-labels-kpAAVi6g.js';
|
|
10
|
+
import '../components/data-table-sort.js';
|
|
11
|
+
import '../components/swipeable-row.js';
|
|
12
|
+
import '../components/mini-calendar.js';
|
|
13
|
+
import '../components/calendar-heatmap.js';
|
|
14
|
+
import '../components/popover.js';
|
|
15
|
+
import '../hooks/use-breakpoint.js';
|
|
16
|
+
import '../components/chip.js';
|
|
17
|
+
import 'lucide-react';
|
|
18
|
+
import '../components/field-parts.js';
|
|
19
|
+
import '../components/field-sync.js';
|
|
20
|
+
import '../wizard/types.js';
|
|
21
|
+
import '../tour/tour.js';
|
|
22
|
+
import '../search/command-palette.js';
|
|
23
|
+
import '../search/global-search.js';
|
|
24
|
+
import '../search/search-index.js';
|
|
25
|
+
import '../components/month-picker.js';
|
|
26
|
+
import '../components/page-contents.js';
|
|
27
|
+
import '../components/series-chart-labels.js';
|
|
28
|
+
import '../components/pie-chart-labels.js';
|
|
29
|
+
import '../components/sparkline.js';
|
|
30
|
+
import '../components/stat-tile.js';
|
|
31
|
+
import '../components/signature-pad.js';
|
|
32
|
+
import '../components/password-strength.js';
|
|
33
|
+
import '../components/swatch-picker.js';
|
|
34
|
+
import '../components/tile-radio.js';
|
|
35
|
+
import '../components/icon-picker.js';
|
|
36
|
+
import '../components/dialog-frame.js';
|
|
37
|
+
import '../components/modal.js';
|
|
38
|
+
import '../hooks/use-search-param-state.js';
|
|
39
|
+
import '../components/measured-grid.js';
|
|
40
|
+
import '../components/user-avatar.js';
|
|
41
|
+
import '../lib/person-name.js';
|
|
42
|
+
import '../components/status-dot.js';
|
|
43
|
+
import '../components/progress-bar.js';
|
|
44
|
+
import '../components/signed-amount.js';
|
|
45
|
+
import '../shell/topbar-action-menu.js';
|
|
46
|
+
import '../components/menu-item.js';
|
|
47
|
+
import '../components/floating-panel.js';
|
|
48
|
+
import '../hooks/use-authed-src.js';
|
|
49
|
+
import '../components/account-settings-labels.js';
|
|
50
|
+
import '../components/bulk-action-bar.js';
|
|
51
|
+
import '../components/list.js';
|
|
52
|
+
import '../components/breadcrumbs.js';
|
|
53
|
+
import '../components/toast.js';
|
|
54
|
+
import '../components/description-list.js';
|
|
55
|
+
import '../components/line-items.js';
|
|
56
|
+
import '../components/error-boundary.js';
|
|
57
|
+
import '../components/authed-image.js';
|
|
58
|
+
import '../components/image-grid.js';
|
|
59
|
+
import '../components/lightbox.js';
|
|
60
|
+
import '../components/write-lock.js';
|
|
61
|
+
import '../auth/sign-in-form.js';
|
|
62
|
+
import '../landing/access.js';
|
|
63
|
+
import '../landing/landing-labels.js';
|
|
64
|
+
import '../shell/topbar-controls.js';
|
|
65
|
+
import '../theme/palette-presets.js';
|
|
66
|
+
import '../theme/chart-palette.js';
|
|
67
|
+
import '../theme/theme-store.js';
|
|
68
|
+
import 'zustand/middleware';
|
|
69
|
+
import 'zustand';
|
|
70
|
+
import '../auth/complete-name-dialog.js';
|
|
71
|
+
import '../auth/forgot-password-form.js';
|
|
72
|
+
import '../auth/status-parts.js';
|
|
73
|
+
import '../auth/reset-password-form.js';
|
|
74
|
+
import '../auth/verify-email.js';
|
|
75
|
+
import '../auth/not-found-page.js';
|
|
76
|
+
import '../auth/accept-invitation.js';
|
|
77
|
+
import '../shell/company-switcher.js';
|
|
78
|
+
import '../account/email-change-setting.js';
|
|
79
|
+
import '../account/sessions-setting.js';
|
|
80
|
+
import '../lib/format.js';
|
|
81
|
+
import '../account/data-export-setting.js';
|
|
82
|
+
import '../components/account-chips.js';
|
|
83
|
+
import '../admin/admin-parts.js';
|
|
84
|
+
import '../admin/admin-action-log.js';
|
|
85
|
+
import '../settings/settings-labels.js';
|
|
86
|
+
import '../demo/demo-labels.js';
|
|
87
|
+
import '../components/appearance-labels.js';
|
|
88
|
+
import '../theme/contrast.js';
|
|
89
|
+
import '../theme/text-size.js';
|
|
90
|
+
import '../components/reauth-dialog.js';
|
|
91
|
+
import '../components/server-wake.js';
|
|
92
|
+
import '../lib/server-wake.js';
|
|
93
|
+
import '../components/translation-review-labels.js';
|
|
94
|
+
import '../lib/translation-review.js';
|
|
95
|
+
import '../components/country-select.js';
|
|
96
|
+
import '../components/inline-edit-field.js';
|
|
97
|
+
import '../lib/iban.js';
|
|
98
|
+
import '../lib/phone.js';
|
|
99
|
+
import '../components/sign-chip.js';
|
|
100
|
+
import '../components/column-mapper.js';
|
|
101
|
+
import '../lib/column-mapping.js';
|
|
102
|
+
import '../lib/table-text.js';
|
|
103
|
+
import '../components/focus-ring.js';
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* One plan of the app's catalogue (docs/billing-harmonization.md §3.1) as a page shows it:
|
|
107
|
+
* server-kit's `PlanSpec` from `GET /billing/plans`, plus the words, which are the app's
|
|
108
|
+
* (display names and feature lines come from its i18n, never from the provider).
|
|
109
|
+
*/
|
|
110
|
+
interface BillingPlan {
|
|
111
|
+
/** The plan code, lowercase on the wire (§12.16); compared without case here. */
|
|
112
|
+
code: string;
|
|
113
|
+
/** The app's display name, in the reader's language: "Pro". */
|
|
114
|
+
name: string;
|
|
115
|
+
/** A line under the price. */
|
|
116
|
+
description?: ReactNode;
|
|
117
|
+
/** Gross prices in minor units, per currency and period (§3.1, §12.17). None at all —
|
|
118
|
+
* or 0 — is a free plan. */
|
|
119
|
+
prices?: PlanPrices | null;
|
|
120
|
+
/** Dimension → limit; `null` is unlimited (§3.1). Shown in the object's order. */
|
|
121
|
+
limits?: Readonly<Record<string, number | null>>;
|
|
122
|
+
/** The app's feature lines. */
|
|
123
|
+
features?: readonly ReactNode[];
|
|
124
|
+
/** Not choosable — a plan being retired, say. */
|
|
125
|
+
disabled?: boolean;
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* How a plan stands to the one the payer pays for now: `current` is it, `upgrade` comes
|
|
129
|
+
* after it in the catalogue's order (`PlanSpec.sort`), `downgrade` before it.
|
|
130
|
+
*/
|
|
131
|
+
type PlanRelation = "current" | "upgrade" | "downgrade";
|
|
132
|
+
/** The plan's place against `current`, by the order of `plans`; `undefined` without a
|
|
133
|
+
* current plan (a trial, an ended plan) or for a code that is not in the list. */
|
|
134
|
+
declare function planRelation(plans: readonly Pick<BillingPlan, "code">[], code: string, current: string | null | undefined): PlanRelation | undefined;
|
|
135
|
+
/** What both parts need to draw a plan. */
|
|
136
|
+
interface PlanDisplayProps {
|
|
137
|
+
/** The currency the prices are shown in (§2.6). */
|
|
138
|
+
currency: BillingCurrency;
|
|
139
|
+
/** The period the prices are shown for. */
|
|
140
|
+
interval: BillingInterval;
|
|
141
|
+
/** The app's name of each limit's dimension ("Budgets"). A dimension without one is
|
|
142
|
+
* shown by its key. */
|
|
143
|
+
dimensionLabels?: Readonly<Record<string, string>>;
|
|
144
|
+
/** How a limit's figure is written — kastlan's storage is bytes (`formatFileSize`).
|
|
145
|
+
* Default: a number in the kit's locale. */
|
|
146
|
+
formatLimit?: (dimension: string, value: number) => string;
|
|
147
|
+
/** Over the provider's locale. */
|
|
148
|
+
locale?: string;
|
|
149
|
+
/** Prop > `<UiKitProvider labels={{ billing }}>` > English. */
|
|
150
|
+
labels?: LabelOverride<BillingLabels>;
|
|
151
|
+
}
|
|
152
|
+
interface PlanCardProps extends Omit<ChoiceCardProps, "type" | "title" | "description" | "icon" | "indeterminate" | "value" | "labels">, PlanDisplayProps {
|
|
153
|
+
plan: BillingPlan;
|
|
154
|
+
/** See {@link PlanRelation}. `current` draws the "Current plan" chip — a word in the
|
|
155
|
+
* card's name, never a colour alone. */
|
|
156
|
+
relation?: PlanRelation;
|
|
157
|
+
/**
|
|
158
|
+
* The provider's own localised price in place of the catalogue's figure (§12.17) — a
|
|
159
|
+
* Merchant of Record's price preview for the buyer's country, tax included. The period
|
|
160
|
+
* and "VAT included" stay: the law asks for a gross price, and the card says so.
|
|
161
|
+
*/
|
|
162
|
+
pricePreview?: ReactNode;
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* One plan as a {@link ChoiceCard} radio (§7): the name (and "Current plan"), the GROSS
|
|
166
|
+
* price in the chosen currency and period through `formatMoney` ("CHF 49 per year, VAT
|
|
167
|
+
* included", §12.17), the limits ("Budgets: 3", "Seats: Unlimited") and the app's feature
|
|
168
|
+
* lines. A plan with prices but none for this currency and period is shown, "Not offered
|
|
169
|
+
* for this billing period", and cannot be picked.
|
|
170
|
+
*
|
|
171
|
+
* A radio of a set: give the cards one `name`, or use {@link PlanPicker}, which does that
|
|
172
|
+
* and owns the choice. Everything else a `ChoiceCard` takes goes to it — `checked`,
|
|
173
|
+
* `onCheckedChange`, `name`, `className`. Carries `data-plan` and `data-relation`.
|
|
174
|
+
*/
|
|
175
|
+
declare const PlanCard: react.ForwardRefExoticComponent<PlanCardProps & react.RefAttributes<HTMLInputElement>>;
|
|
176
|
+
/** What {@link PlanPickerProps.onChoose} is handed: everything `POST /billing/checkout`
|
|
177
|
+
* takes (§4). */
|
|
178
|
+
interface PlanChoice {
|
|
179
|
+
plan: string;
|
|
180
|
+
interval: BillingInterval;
|
|
181
|
+
currency: BillingCurrency;
|
|
182
|
+
}
|
|
183
|
+
interface PlanPickerProps extends Omit<PlanDisplayProps, "currency" | "interval"> {
|
|
184
|
+
/** The catalogue, in its order (`PlanSpec.sort`): cheapest first. The order decides
|
|
185
|
+
* upgrade and downgrade. */
|
|
186
|
+
plans: readonly BillingPlan[];
|
|
187
|
+
/**
|
|
188
|
+
* The plan the payer pays for now (`plan` of the overview while `active` or
|
|
189
|
+
* `past_due`). Leave it out during a trial and after a plan ended: then every plan is
|
|
190
|
+
* "Choose …", the trial's plan included, since none is paid for yet.
|
|
191
|
+
*/
|
|
192
|
+
current?: string | null;
|
|
193
|
+
/** The picked plan, controlled. `null` while none is. */
|
|
194
|
+
value?: string | null;
|
|
195
|
+
/** The picked plan, uncontrolled. Default: `current`, else nothing. */
|
|
196
|
+
defaultValue?: string | null;
|
|
197
|
+
onValueChange?: (plan: string) => void;
|
|
198
|
+
/** The period, controlled. */
|
|
199
|
+
interval?: BillingInterval;
|
|
200
|
+
/** The period, uncontrolled. Default `year` — lead with yearly (§12.17). */
|
|
201
|
+
defaultInterval?: BillingInterval;
|
|
202
|
+
onIntervalChange?: (interval: BillingInterval) => void;
|
|
203
|
+
/** The currency, controlled. */
|
|
204
|
+
currency?: BillingCurrency;
|
|
205
|
+
/** The currency, uncontrolled. Default: the account's stored currency is the app's to
|
|
206
|
+
* pass here (§12.18); without it, {@link billingCurrencyFor} the kit's locale. */
|
|
207
|
+
defaultCurrency?: BillingCurrency;
|
|
208
|
+
onCurrencyChange?: (currency: BillingCurrency) => void;
|
|
209
|
+
/** The currencies the payer may switch between. Default: every currency a plan has a
|
|
210
|
+
* price in. The switch shows only for more than one. */
|
|
211
|
+
currencies?: readonly BillingCurrency[];
|
|
212
|
+
/** The button: the app starts its checkout (`POST /billing/checkout`, then off to the
|
|
213
|
+
* provider's page). The kit sends no request. */
|
|
214
|
+
onChoose: (choice: PlanChoice) => void;
|
|
215
|
+
/** The checkout is being opened: the button's spinner, no second press. */
|
|
216
|
+
pending?: boolean;
|
|
217
|
+
/** The provider's localised price for a plan, or `undefined` for the catalogue's —
|
|
218
|
+
* see {@link PlanCardProps.pricePreview}. */
|
|
219
|
+
pricePreview?: (plan: BillingPlan, choice: Omit<PlanChoice, "plan">) => ReactNode | undefined;
|
|
220
|
+
/** A visible question over the cards. Without one the set is named "Plans". */
|
|
221
|
+
legend?: ReactNode;
|
|
222
|
+
/** Shared by the radios. Generated if omitted. */
|
|
223
|
+
name?: string;
|
|
224
|
+
/** Classes for the whole picker. */
|
|
225
|
+
className?: string;
|
|
226
|
+
/** Classes for the card grid. Default: one column, two from `sm`, three from `lg`. */
|
|
227
|
+
gridClassName?: string;
|
|
228
|
+
/** Classes for every card. */
|
|
229
|
+
cardClassName?: string;
|
|
230
|
+
}
|
|
231
|
+
/**
|
|
232
|
+
* The plans to choose from (§7): the period switch — yearly first (§12.17) — and, where
|
|
233
|
+
* the payer may pay in either, the currency switch (§2.6); a {@link PlanCard} per plan in
|
|
234
|
+
* a radio set; and one button that says what pressing it does: "Upgrade to Pro", "Switch
|
|
235
|
+
* to Free", or "Choose Pro" with no plan paid for yet.
|
|
236
|
+
*
|
|
237
|
+
* One button under the set rather than one per card: each card IS a radio — a `<label>`
|
|
238
|
+
* round an `<input>` — and a button inside a label is interactive content inside
|
|
239
|
+
* interactive content. Picking and committing are two steps anyway: the price under the
|
|
240
|
+
* picked card is what checkout will charge.
|
|
241
|
+
*
|
|
242
|
+
* The button never takes the write lock: billing itself always works, a read-only payer
|
|
243
|
+
* must be able to pay (§3.3). It is off, with the reason on hover and focus, while
|
|
244
|
+
* nothing is picked or the current plan is.
|
|
245
|
+
*/
|
|
246
|
+
declare function PlanPicker({ plans, current, value: valueProp, defaultValue, onValueChange, interval: intervalProp, defaultInterval, onIntervalChange, currency: currencyProp, defaultCurrency, onCurrencyChange, currencies: currenciesProp, onChoose, pending, pricePreview, legend, name, className, gridClassName, cardClassName, dimensionLabels, formatLimit, locale: localeProp, labels: labelsProp, }: PlanPickerProps): react.JSX.Element;
|
|
247
|
+
|
|
248
|
+
export { type BillingPlan, PlanCard, type PlanCardProps, type PlanChoice, PlanPicker, type PlanPickerProps, type PlanRelation, planRelation };
|