@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,184 @@
|
|
|
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 { AlertTone, AlertSize } from '../components/alert-banner.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/chip.js';
|
|
16
|
+
import 'lucide-react';
|
|
17
|
+
import '../components/field-parts.js';
|
|
18
|
+
import '../components/field-sync.js';
|
|
19
|
+
import '../wizard/types.js';
|
|
20
|
+
import '../tour/tour.js';
|
|
21
|
+
import '../search/command-palette.js';
|
|
22
|
+
import '../search/global-search.js';
|
|
23
|
+
import '../search/search-index.js';
|
|
24
|
+
import '../components/month-picker.js';
|
|
25
|
+
import '../components/page-contents.js';
|
|
26
|
+
import '../components/series-chart-labels.js';
|
|
27
|
+
import '../components/pie-chart-labels.js';
|
|
28
|
+
import '../components/sparkline.js';
|
|
29
|
+
import '../components/stat-tile.js';
|
|
30
|
+
import '../components/signature-pad.js';
|
|
31
|
+
import '../components/password-strength.js';
|
|
32
|
+
import '../components/swatch-picker.js';
|
|
33
|
+
import '../components/tile-radio.js';
|
|
34
|
+
import '../components/icon-picker.js';
|
|
35
|
+
import '../components/dialog-frame.js';
|
|
36
|
+
import '../components/modal.js';
|
|
37
|
+
import '../hooks/use-search-param-state.js';
|
|
38
|
+
import '../components/measured-grid.js';
|
|
39
|
+
import '../components/user-avatar.js';
|
|
40
|
+
import '../lib/person-name.js';
|
|
41
|
+
import '../components/status-dot.js';
|
|
42
|
+
import '../components/progress-bar.js';
|
|
43
|
+
import '../components/signed-amount.js';
|
|
44
|
+
import '../shell/topbar-action-menu.js';
|
|
45
|
+
import '../components/menu-item.js';
|
|
46
|
+
import '../components/floating-panel.js';
|
|
47
|
+
import '../hooks/use-authed-src.js';
|
|
48
|
+
import '../components/account-settings-labels.js';
|
|
49
|
+
import '../components/bulk-action-bar.js';
|
|
50
|
+
import '../components/list.js';
|
|
51
|
+
import '../components/breadcrumbs.js';
|
|
52
|
+
import '../components/toast.js';
|
|
53
|
+
import '../components/description-list.js';
|
|
54
|
+
import '../components/line-items.js';
|
|
55
|
+
import '../components/error-boundary.js';
|
|
56
|
+
import '../components/authed-image.js';
|
|
57
|
+
import '../components/image-grid.js';
|
|
58
|
+
import '../components/lightbox.js';
|
|
59
|
+
import '../components/write-lock.js';
|
|
60
|
+
import '../auth/sign-in-form.js';
|
|
61
|
+
import '../landing/access.js';
|
|
62
|
+
import '../landing/landing-labels.js';
|
|
63
|
+
import '../shell/topbar-controls.js';
|
|
64
|
+
import '../theme/palette-presets.js';
|
|
65
|
+
import '../theme/chart-palette.js';
|
|
66
|
+
import '../theme/theme-store.js';
|
|
67
|
+
import 'zustand/middleware';
|
|
68
|
+
import 'zustand';
|
|
69
|
+
import '../auth/complete-name-dialog.js';
|
|
70
|
+
import '../auth/forgot-password-form.js';
|
|
71
|
+
import '../auth/status-parts.js';
|
|
72
|
+
import '../auth/reset-password-form.js';
|
|
73
|
+
import '../auth/verify-email.js';
|
|
74
|
+
import '../auth/not-found-page.js';
|
|
75
|
+
import '../auth/accept-invitation.js';
|
|
76
|
+
import '../shell/company-switcher.js';
|
|
77
|
+
import '../account/email-change-setting.js';
|
|
78
|
+
import '../account/sessions-setting.js';
|
|
79
|
+
import '../lib/format.js';
|
|
80
|
+
import '../account/data-export-setting.js';
|
|
81
|
+
import '../components/account-chips.js';
|
|
82
|
+
import '../admin/admin-parts.js';
|
|
83
|
+
import '../admin/admin-action-log.js';
|
|
84
|
+
import '../settings/settings-labels.js';
|
|
85
|
+
import '../demo/demo-labels.js';
|
|
86
|
+
import '../components/appearance-labels.js';
|
|
87
|
+
import '../theme/contrast.js';
|
|
88
|
+
import '../theme/text-size.js';
|
|
89
|
+
import '../components/reauth-dialog.js';
|
|
90
|
+
import '../components/server-wake.js';
|
|
91
|
+
import '../lib/server-wake.js';
|
|
92
|
+
import '../components/translation-review-labels.js';
|
|
93
|
+
import '../lib/translation-review.js';
|
|
94
|
+
import '../components/country-select.js';
|
|
95
|
+
import '../components/inline-edit-field.js';
|
|
96
|
+
import '../lib/iban.js';
|
|
97
|
+
import '../lib/phone.js';
|
|
98
|
+
import '../components/sign-chip.js';
|
|
99
|
+
import '../components/column-mapper.js';
|
|
100
|
+
import '../lib/column-mapping.js';
|
|
101
|
+
import '../lib/table-text.js';
|
|
102
|
+
import '../components/focus-ring.js';
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* The billing banners (docs/billing-harmonization.md §3.3, §7, §12.6, §12.21):
|
|
106
|
+
*
|
|
107
|
+
* - `trial-ending` — from 7 days before `trial_ends_at` (§3.3);
|
|
108
|
+
* - `grant-ending` — from 7 days before `comped_until`: a beta user's 12 months, an
|
|
109
|
+
* operator's grant;
|
|
110
|
+
* - `payment-failed` — from the first failed payment (`past_due`), while the provider
|
|
111
|
+
* retries;
|
|
112
|
+
* - `plan-ended` — out of good standing: read-only, never locked (§2.3);
|
|
113
|
+
* - `guest` — a guest in someone else's read-only item (§12.6);
|
|
114
|
+
* - `processing` — back from checkout before the webhook landed (§12.21).
|
|
115
|
+
*/
|
|
116
|
+
type BillingBannerKind = "trial-ending" | "grant-ending" | "payment-failed" | "plan-ended" | "guest" | "processing";
|
|
117
|
+
interface BillingBannerBaseProps extends Omit<ComponentPropsWithoutRef<"div">, "children" | "onClick"> {
|
|
118
|
+
/**
|
|
119
|
+
* Over the kind's tone: `trial-ending` and `grant-ending` are `info` until the last
|
|
120
|
+
* three days and `warning` in them; `payment-failed` is `danger` (money did not
|
|
121
|
+
* arrive — kastlan's past-due strip was red); `plan-ended` is `warning`, a state with
|
|
122
|
+
* everything still there rather than an error; `guest` and `processing` are `info`.
|
|
123
|
+
*/
|
|
124
|
+
tone?: AlertTone;
|
|
125
|
+
/** `strip` (default): the band under the top bar, on every page. `box`: the same
|
|
126
|
+
* message on the subscription page itself. */
|
|
127
|
+
variant?: "strip" | "box";
|
|
128
|
+
/** Default `sm` for a strip (the demo's banner), `md` for a box. */
|
|
129
|
+
size?: AlertSize;
|
|
130
|
+
/**
|
|
131
|
+
* Where the action goes — the subscription page, say. The app's action, as an `href`
|
|
132
|
+
* or as {@link onAction}; without either there is no button. Never a write-locked
|
|
133
|
+
* commit: billing itself always works (§3.3).
|
|
134
|
+
*/
|
|
135
|
+
actionHref?: string;
|
|
136
|
+
/** What the action does — the app's portal call (`POST /billing/portal`, then off to
|
|
137
|
+
* its `url`). The kit sends no request. */
|
|
138
|
+
onAction?: () => void;
|
|
139
|
+
/**
|
|
140
|
+
* Over the kind's action words: "Choose a plan" (trial, grant, plan ended), "Update
|
|
141
|
+
* payment method" (payment failed), "Check again" (processing). The guest banner has
|
|
142
|
+
* none of its own: an action there needs this.
|
|
143
|
+
*/
|
|
144
|
+
actionLabel?: string;
|
|
145
|
+
/** The action is under way: the button's spinner, no second press. */
|
|
146
|
+
actionPending?: boolean;
|
|
147
|
+
/** An × that calls this; the app removes the banner and remembers that it did. */
|
|
148
|
+
onDismiss?: () => void;
|
|
149
|
+
dismissLabel?: string;
|
|
150
|
+
/** Prop > `<UiKitProvider labels={{ billing }}>` > English. */
|
|
151
|
+
labels?: LabelOverride<BillingLabels>;
|
|
152
|
+
}
|
|
153
|
+
type BillingBannerProps = BillingBannerBaseProps & ({
|
|
154
|
+
kind: "trial-ending" | "grant-ending";
|
|
155
|
+
/** Calendar days left — `billingDaysLeft(trial_ends_at)`. 0 is today. */
|
|
156
|
+
daysLeft: number;
|
|
157
|
+
item?: never;
|
|
158
|
+
} | {
|
|
159
|
+
kind: "guest";
|
|
160
|
+
/** The item's own name ("Household 2026"), or nothing. NEVER the owner's status:
|
|
161
|
+
* the banner says "for now" and nothing more (§12.6). */
|
|
162
|
+
item?: string;
|
|
163
|
+
daysLeft?: never;
|
|
164
|
+
} | {
|
|
165
|
+
kind: "payment-failed" | "plan-ended" | "processing";
|
|
166
|
+
daysLeft?: never;
|
|
167
|
+
item?: never;
|
|
168
|
+
});
|
|
169
|
+
/**
|
|
170
|
+
* One of the billing banners, as a kit `AlertBanner` strip (§7): the kind's sentence, its
|
|
171
|
+
* glyph and tone, and the app's action. Carries `data-billing-banner` with the kind.
|
|
172
|
+
*
|
|
173
|
+
* The app decides WHICH banner shows, from `GET /billing/overview` (and hides all of them
|
|
174
|
+
* while billing is off, §4); the kit only says it. A guest's banner takes no status at
|
|
175
|
+
* all — the type does not let one in — so the owner's payment state cannot leak into it
|
|
176
|
+
* by a wrong prop (§12.6).
|
|
177
|
+
*
|
|
178
|
+
* `processing` is a live region (`role="status"`): it appears when the person comes back
|
|
179
|
+
* from checkout and goes when the overview catches up (§12.21), and a screen reader
|
|
180
|
+
* should hear both. The others are page furniture, role-less as the strip is.
|
|
181
|
+
*/
|
|
182
|
+
declare function BillingBanner(props: BillingBannerProps): react.JSX.Element;
|
|
183
|
+
|
|
184
|
+
export { BillingBanner, type BillingBannerKind, type BillingBannerProps };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { CreditCard, Hourglass, PencilOff } from "lucide-react";
|
|
4
|
+
import { AlertBanner } from "../components/alert-banner.js";
|
|
5
|
+
import { Button, Spinner } from "../components/ui.js";
|
|
6
|
+
import { useBillingLabels } from "./billing-labels.js";
|
|
7
|
+
const LAST_DAYS = 3;
|
|
8
|
+
function defaultTone(kind, daysLeft) {
|
|
9
|
+
switch (kind) {
|
|
10
|
+
case "trial-ending":
|
|
11
|
+
case "grant-ending":
|
|
12
|
+
return (daysLeft ?? 0) > LAST_DAYS ? "info" : "warning";
|
|
13
|
+
case "payment-failed":
|
|
14
|
+
return "danger";
|
|
15
|
+
case "plan-ended":
|
|
16
|
+
return "warning";
|
|
17
|
+
default:
|
|
18
|
+
return "info";
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
function BillingBanner(props) {
|
|
22
|
+
const {
|
|
23
|
+
kind,
|
|
24
|
+
daysLeft,
|
|
25
|
+
item,
|
|
26
|
+
tone,
|
|
27
|
+
variant = "strip",
|
|
28
|
+
size,
|
|
29
|
+
actionHref,
|
|
30
|
+
onAction,
|
|
31
|
+
actionLabel,
|
|
32
|
+
actionPending,
|
|
33
|
+
onDismiss,
|
|
34
|
+
dismissLabel,
|
|
35
|
+
labels: labelsProp,
|
|
36
|
+
role,
|
|
37
|
+
...rest
|
|
38
|
+
} = props;
|
|
39
|
+
const labels = useBillingLabels(labelsProp);
|
|
40
|
+
const days = Math.max(0, Math.floor(daysLeft ?? 0));
|
|
41
|
+
let text;
|
|
42
|
+
let icon;
|
|
43
|
+
let ownAction;
|
|
44
|
+
switch (kind) {
|
|
45
|
+
case "trial-ending":
|
|
46
|
+
text = labels.trialEnding(days);
|
|
47
|
+
icon = /* @__PURE__ */ jsx(Hourglass, {});
|
|
48
|
+
ownAction = labels.choosePlan;
|
|
49
|
+
break;
|
|
50
|
+
case "grant-ending":
|
|
51
|
+
text = labels.grantEnding(days);
|
|
52
|
+
icon = /* @__PURE__ */ jsx(Hourglass, {});
|
|
53
|
+
ownAction = labels.choosePlan;
|
|
54
|
+
break;
|
|
55
|
+
case "payment-failed":
|
|
56
|
+
text = labels.paymentFailed;
|
|
57
|
+
icon = /* @__PURE__ */ jsx(CreditCard, {});
|
|
58
|
+
ownAction = labels.updatePayment;
|
|
59
|
+
break;
|
|
60
|
+
case "plan-ended":
|
|
61
|
+
text = labels.planEnded;
|
|
62
|
+
icon = /* @__PURE__ */ jsx(PencilOff, {});
|
|
63
|
+
ownAction = labels.choosePlan;
|
|
64
|
+
break;
|
|
65
|
+
case "guest":
|
|
66
|
+
text = labels.guestReadOnly(item);
|
|
67
|
+
icon = /* @__PURE__ */ jsx(PencilOff, {});
|
|
68
|
+
ownAction = void 0;
|
|
69
|
+
break;
|
|
70
|
+
case "processing":
|
|
71
|
+
text = labels.processing;
|
|
72
|
+
icon = /* @__PURE__ */ jsx(Spinner, { label: null });
|
|
73
|
+
ownAction = labels.checkAgain;
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
const words = actionLabel ?? ownAction;
|
|
77
|
+
const action = words === void 0 || actionHref === void 0 && onAction === void 0 ? void 0 : actionHref !== void 0 ? /* @__PURE__ */ jsx(Button, { href: actionHref, variant: "secondary", size: "sm", children: words }) : /* @__PURE__ */ jsx(Button, { type: "button", variant: "secondary", size: "sm", onClick: onAction, pending: actionPending, children: words });
|
|
78
|
+
return /* @__PURE__ */ jsx(
|
|
79
|
+
AlertBanner,
|
|
80
|
+
{
|
|
81
|
+
...rest,
|
|
82
|
+
role: role ?? (kind === "processing" ? "status" : void 0),
|
|
83
|
+
variant,
|
|
84
|
+
size: size ?? (variant === "strip" ? "sm" : "md"),
|
|
85
|
+
tone: tone ?? defaultTone(kind, days),
|
|
86
|
+
icon,
|
|
87
|
+
action,
|
|
88
|
+
onDismiss,
|
|
89
|
+
dismissLabel,
|
|
90
|
+
"data-billing-banner": kind,
|
|
91
|
+
children: text
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
export {
|
|
96
|
+
BillingBanner
|
|
97
|
+
};
|
|
98
|
+
//# sourceMappingURL=billing-banner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/billing/billing-banner.tsx"],"sourcesContent":["import type { ComponentPropsWithoutRef, ReactNode } from \"react\";\nimport { CreditCard, Hourglass, PencilOff } from \"lucide-react\";\n\nimport type { LabelOverride } from \"../i18n/kit-labels\";\nimport { AlertBanner } from \"../components/alert-banner\";\nimport type { AlertSize, AlertTone } from \"../components/alert-banner\";\nimport { Button, Spinner } from \"../components/ui\";\nimport { useBillingLabels } from \"./billing-labels\";\nimport type { BillingLabels } from \"./billing-labels\";\n\n/**\n * The billing banners (docs/billing-harmonization.md §3.3, §7, §12.6, §12.21):\n *\n * - `trial-ending` — from 7 days before `trial_ends_at` (§3.3);\n * - `grant-ending` — from 7 days before `comped_until`: a beta user's 12 months, an\n * operator's grant;\n * - `payment-failed` — from the first failed payment (`past_due`), while the provider\n * retries;\n * - `plan-ended` — out of good standing: read-only, never locked (§2.3);\n * - `guest` — a guest in someone else's read-only item (§12.6);\n * - `processing` — back from checkout before the webhook landed (§12.21).\n */\nexport type BillingBannerKind =\n | \"trial-ending\"\n | \"grant-ending\"\n | \"payment-failed\"\n | \"plan-ended\"\n | \"guest\"\n | \"processing\";\n\ninterface BillingBannerBaseProps extends Omit<ComponentPropsWithoutRef<\"div\">, \"children\" | \"onClick\"> {\n /**\n * Over the kind's tone: `trial-ending` and `grant-ending` are `info` until the last\n * three days and `warning` in them; `payment-failed` is `danger` (money did not\n * arrive — kastlan's past-due strip was red); `plan-ended` is `warning`, a state with\n * everything still there rather than an error; `guest` and `processing` are `info`.\n */\n tone?: AlertTone;\n /** `strip` (default): the band under the top bar, on every page. `box`: the same\n * message on the subscription page itself. */\n variant?: \"strip\" | \"box\";\n /** Default `sm` for a strip (the demo's banner), `md` for a box. */\n size?: AlertSize;\n /**\n * Where the action goes — the subscription page, say. The app's action, as an `href`\n * or as {@link onAction}; without either there is no button. Never a write-locked\n * commit: billing itself always works (§3.3).\n */\n actionHref?: string;\n /** What the action does — the app's portal call (`POST /billing/portal`, then off to\n * its `url`). The kit sends no request. */\n onAction?: () => void;\n /**\n * Over the kind's action words: \"Choose a plan\" (trial, grant, plan ended), \"Update\n * payment method\" (payment failed), \"Check again\" (processing). The guest banner has\n * none of its own: an action there needs this.\n */\n actionLabel?: string;\n /** The action is under way: the button's spinner, no second press. */\n actionPending?: boolean;\n /** An × that calls this; the app removes the banner and remembers that it did. */\n onDismiss?: () => void;\n dismissLabel?: string;\n /** Prop > `<UiKitProvider labels={{ billing }}>` > English. */\n labels?: LabelOverride<BillingLabels>;\n}\n\nexport type BillingBannerProps = BillingBannerBaseProps &\n (\n | {\n kind: \"trial-ending\" | \"grant-ending\";\n /** Calendar days left — `billingDaysLeft(trial_ends_at)`. 0 is today. */\n daysLeft: number;\n item?: never;\n }\n | {\n kind: \"guest\";\n /** The item's own name (\"Household 2026\"), or nothing. NEVER the owner's status:\n * the banner says \"for now\" and nothing more (§12.6). */\n item?: string;\n daysLeft?: never;\n }\n | {\n kind: \"payment-failed\" | \"plan-ended\" | \"processing\";\n daysLeft?: never;\n item?: never;\n }\n );\n\n/** The last days, in which an ending trial or grant turns from news into a warning. */\nconst LAST_DAYS = 3;\n\nfunction defaultTone(kind: BillingBannerKind, daysLeft: number | undefined): AlertTone {\n switch (kind) {\n case \"trial-ending\":\n case \"grant-ending\":\n return (daysLeft ?? 0) > LAST_DAYS ? \"info\" : \"warning\";\n case \"payment-failed\":\n return \"danger\";\n case \"plan-ended\":\n return \"warning\";\n default:\n return \"info\";\n }\n}\n\n/**\n * One of the billing banners, as a kit `AlertBanner` strip (§7): the kind's sentence, its\n * glyph and tone, and the app's action. Carries `data-billing-banner` with the kind.\n *\n * The app decides WHICH banner shows, from `GET /billing/overview` (and hides all of them\n * while billing is off, §4); the kit only says it. A guest's banner takes no status at\n * all — the type does not let one in — so the owner's payment state cannot leak into it\n * by a wrong prop (§12.6).\n *\n * `processing` is a live region (`role=\"status\"`): it appears when the person comes back\n * from checkout and goes when the overview catches up (§12.21), and a screen reader\n * should hear both. The others are page furniture, role-less as the strip is.\n */\nexport function BillingBanner(props: BillingBannerProps) {\n const {\n kind,\n daysLeft,\n item,\n tone,\n variant = \"strip\",\n size,\n actionHref,\n onAction,\n actionLabel,\n actionPending,\n onDismiss,\n dismissLabel,\n labels: labelsProp,\n role,\n ...rest\n } = props;\n const labels = useBillingLabels(labelsProp);\n const days = Math.max(0, Math.floor(daysLeft ?? 0));\n\n let text: string;\n let icon: ReactNode;\n let ownAction: string | undefined;\n switch (kind) {\n case \"trial-ending\":\n text = labels.trialEnding(days);\n icon = <Hourglass />;\n ownAction = labels.choosePlan;\n break;\n case \"grant-ending\":\n text = labels.grantEnding(days);\n icon = <Hourglass />;\n ownAction = labels.choosePlan;\n break;\n case \"payment-failed\":\n text = labels.paymentFailed;\n icon = <CreditCard />;\n ownAction = labels.updatePayment;\n break;\n case \"plan-ended\":\n text = labels.planEnded;\n icon = <PencilOff />;\n ownAction = labels.choosePlan;\n break;\n case \"guest\":\n text = labels.guestReadOnly(item);\n icon = <PencilOff />;\n ownAction = undefined;\n break;\n case \"processing\":\n text = labels.processing;\n icon = <Spinner label={null} />;\n ownAction = labels.checkAgain;\n break;\n }\n\n const words = actionLabel ?? ownAction;\n const action =\n words === undefined || (actionHref === undefined && onAction === undefined) ? undefined : actionHref !== undefined ? (\n <Button href={actionHref} variant=\"secondary\" size=\"sm\">\n {words}\n </Button>\n ) : (\n <Button type=\"button\" variant=\"secondary\" size=\"sm\" onClick={onAction} pending={actionPending}>\n {words}\n </Button>\n );\n\n return (\n <AlertBanner\n {...rest}\n role={role ?? (kind === \"processing\" ? \"status\" : undefined)}\n variant={variant}\n size={size ?? (variant === \"strip\" ? \"sm\" : \"md\")}\n tone={tone ?? defaultTone(kind, days)}\n icon={icon}\n action={action}\n onDismiss={onDismiss}\n dismissLabel={dismissLabel}\n data-billing-banner={kind}\n >\n {text}\n </AlertBanner>\n );\n}\n"],"mappings":";AAkJa;AAjJb,SAAS,YAAY,WAAW,iBAAiB;AAGjD,SAAS,mBAAmB;AAE5B,SAAS,QAAQ,eAAe;AAChC,SAAS,wBAAwB;AAmFjC,MAAM,YAAY;AAElB,SAAS,YAAY,MAAyB,UAAyC;AACrF,UAAQ,MAAM;AAAA,IACZ,KAAK;AAAA,IACL,KAAK;AACH,cAAQ,YAAY,KAAK,YAAY,SAAS;AAAA,IAChD,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO;AAAA,IACT;AACE,aAAO;AAAA,EACX;AACF;AAeO,SAAS,cAAc,OAA2B;AACvD,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,QAAQ;AAAA,IACR;AAAA,IACA,GAAG;AAAA,EACL,IAAI;AACJ,QAAM,SAAS,iBAAiB,UAAU;AAC1C,QAAM,OAAO,KAAK,IAAI,GAAG,KAAK,MAAM,YAAY,CAAC,CAAC;AAElD,MAAI;AACJ,MAAI;AACJ,MAAI;AACJ,UAAQ,MAAM;AAAA,IACZ,KAAK;AACH,aAAO,OAAO,YAAY,IAAI;AAC9B,aAAO,oBAAC,aAAU;AAClB,kBAAY,OAAO;AACnB;AAAA,IACF,KAAK;AACH,aAAO,OAAO,YAAY,IAAI;AAC9B,aAAO,oBAAC,aAAU;AAClB,kBAAY,OAAO;AACnB;AAAA,IACF,KAAK;AACH,aAAO,OAAO;AACd,aAAO,oBAAC,cAAW;AACnB,kBAAY,OAAO;AACnB;AAAA,IACF,KAAK;AACH,aAAO,OAAO;AACd,aAAO,oBAAC,aAAU;AAClB,kBAAY,OAAO;AACnB;AAAA,IACF,KAAK;AACH,aAAO,OAAO,cAAc,IAAI;AAChC,aAAO,oBAAC,aAAU;AAClB,kBAAY;AACZ;AAAA,IACF,KAAK;AACH,aAAO,OAAO;AACd,aAAO,oBAAC,WAAQ,OAAO,MAAM;AAC7B,kBAAY,OAAO;AACnB;AAAA,EACJ;AAEA,QAAM,QAAQ,eAAe;AAC7B,QAAM,SACJ,UAAU,UAAc,eAAe,UAAa,aAAa,SAAa,SAAY,eAAe,SACvG,oBAAC,UAAO,MAAM,YAAY,SAAQ,aAAY,MAAK,MAChD,iBACH,IAEA,oBAAC,UAAO,MAAK,UAAS,SAAQ,aAAY,MAAK,MAAK,SAAS,UAAU,SAAS,eAC7E,iBACH;AAGJ,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,MAAM,SAAS,SAAS,eAAe,WAAW;AAAA,MAClD;AAAA,MACA,MAAM,SAAS,YAAY,UAAU,OAAO;AAAA,MAC5C,MAAM,QAAQ,YAAY,MAAM,IAAI;AAAA,MACpC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,uBAAqB;AAAA,MAEpB;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export { bH as BillingLabels, cp as DEFAULT_BILLING_LABELS, eW as SUBSCRIPTION_STATUSES, fb as SubscriptionStatus, f$ as useBillingLabels } from '../delete-account-setting-BvdQdbv3.js';
|
|
2
|
+
import 'react';
|
|
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';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useKitLabels } from "../i18n/kit-labels.js";
|
|
3
|
+
const SUBSCRIPTION_STATUSES = Object.freeze([
|
|
4
|
+
"trialing",
|
|
5
|
+
"active",
|
|
6
|
+
"past_due",
|
|
7
|
+
"canceled",
|
|
8
|
+
"expired",
|
|
9
|
+
"comped"
|
|
10
|
+
]);
|
|
11
|
+
function inDays(days) {
|
|
12
|
+
if (days <= 0) return "today";
|
|
13
|
+
if (days === 1) return "tomorrow";
|
|
14
|
+
return `in ${days} days`;
|
|
15
|
+
}
|
|
16
|
+
const DEFAULT_BILLING_LABELS = {
|
|
17
|
+
group: "Subscription",
|
|
18
|
+
plans: "Plans",
|
|
19
|
+
interval: "Billing period",
|
|
20
|
+
yearly: "Yearly",
|
|
21
|
+
monthly: "Monthly",
|
|
22
|
+
currency: "Currency",
|
|
23
|
+
perYear: "per year",
|
|
24
|
+
perMonth: "per month",
|
|
25
|
+
vatIncluded: "VAT included",
|
|
26
|
+
free: "Free",
|
|
27
|
+
notOffered: "Not offered for this billing period",
|
|
28
|
+
unlimited: "Unlimited",
|
|
29
|
+
limits: "Limits",
|
|
30
|
+
features: "Included",
|
|
31
|
+
current: "Current plan",
|
|
32
|
+
choose: (plan) => `Choose ${plan}`,
|
|
33
|
+
upgrade: (plan) => `Upgrade to ${plan}`,
|
|
34
|
+
downgrade: (plan) => `Switch to ${plan}`,
|
|
35
|
+
isCurrent: "This is your current plan.",
|
|
36
|
+
pickFirst: "Pick a plan first.",
|
|
37
|
+
status: {
|
|
38
|
+
trialing: "Trial",
|
|
39
|
+
active: "Active",
|
|
40
|
+
past_due: "Payment overdue",
|
|
41
|
+
canceled: "Cancelled",
|
|
42
|
+
expired: "Expired",
|
|
43
|
+
comped: "Complimentary"
|
|
44
|
+
},
|
|
45
|
+
trialEnding: (days) => `Your trial ends ${inDays(days)}. After that you can still view everything, but changes need a plan.`,
|
|
46
|
+
grantEnding: (days) => `Your free access ends ${inDays(days)}. After that you can still view everything, but changes need a plan.`,
|
|
47
|
+
paymentFailed: "Your last payment didn\u2019t go through. Update your payment method to keep your plan.",
|
|
48
|
+
planEnded: "Your plan has ended. You can still view and export everything; choose a plan to make changes again.",
|
|
49
|
+
guestReadOnly: (item) => item ? `\u201C${item}\u201D is read-only for now; its owner can lift that.` : "This is read-only for now; its owner can lift that.",
|
|
50
|
+
processing: "Your payment is being processed. Your plan starts as soon as it\u2019s confirmed; this page updates by itself.",
|
|
51
|
+
choosePlan: "Choose a plan",
|
|
52
|
+
updatePayment: "Update payment method",
|
|
53
|
+
checkAgain: "Check again",
|
|
54
|
+
lockReason: "Your plan has ended. Choose a plan to make changes again.",
|
|
55
|
+
limitReached: "Plan limit reached",
|
|
56
|
+
limitUpgrade: "To add more, choose a plan with a higher limit.",
|
|
57
|
+
limitContact: "To add more, ask us for a higher limit.",
|
|
58
|
+
askForMore: "Ask for more",
|
|
59
|
+
usage: (used, limit) => `${used} of ${limit}`,
|
|
60
|
+
contactSubject: (dimension) => `Plan limit: ${dimension}`,
|
|
61
|
+
manage: "Payment and invoices",
|
|
62
|
+
cancel: "Cancel subscription",
|
|
63
|
+
waitingChanges: (count) => count === 1 ? "1 change waiting for a plan" : `${count} changes waiting for a plan`,
|
|
64
|
+
discardWaiting: "Discard waiting changes"
|
|
65
|
+
};
|
|
66
|
+
function useBillingLabels(labels) {
|
|
67
|
+
return useKitLabels("billing", DEFAULT_BILLING_LABELS, labels);
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
DEFAULT_BILLING_LABELS,
|
|
71
|
+
SUBSCRIPTION_STATUSES,
|
|
72
|
+
useBillingLabels
|
|
73
|
+
};
|
|
74
|
+
//# sourceMappingURL=billing-labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/billing/billing-labels.ts"],"sourcesContent":["import { useKitLabels } from \"../i18n/kit-labels\";\nimport type { LabelOverride } from \"../i18n/kit-labels\";\n\n/**\n * The subscription's status vocabulary (docs/billing-harmonization.md §3.2) — server-kit's\n * `SubscriptionStatus`, value for value:\n *\n * - `trialing` — the 30-day trial without a card (§2.7), or a pure guest's row whose trial\n * has not started (§12.9, `trial_ends_at` empty);\n * - `active` — paid;\n * - `past_due` — a payment failed; in good standing during the provider's retries (§3.3);\n * - `canceled` — the payer cancelled; the American spelling is the wire's, the word shown\n * is \"Cancelled\";\n * - `expired` — a trial, a grant or a failed subscription ran out: read-only (§2.3);\n * - `comped` — free by the operator's grant or as a beta user (§3.2, `comped_until`).\n */\nexport type SubscriptionStatus = \"trialing\" | \"active\" | \"past_due\" | \"canceled\" | \"expired\" | \"comped\";\n\n/** Every status, in the order a lifecycle reads: trial, paid, trouble, ended, granted. */\nexport const SUBSCRIPTION_STATUSES: readonly SubscriptionStatus[] = Object.freeze([\n \"trialing\",\n \"active\",\n \"past_due\",\n \"canceled\",\n \"expired\",\n \"comped\",\n]);\n\n/**\n * The words of the subscription parts — the `billing` namespace of `<UiKitProvider labels>`\n * (docs/billing-harmonization.md §7, §10; ui-kit 0.32.0).\n *\n * WORDING (§12.24): the English group is \"Subscription\", never \"Plan\" — keksdose's \"plan\"\n * is the month's budget plan (\"One plan per month\"), and two meanings of one word on one\n * settings page is the clash the review found. \"Plan\" stays the word for WHAT is bought\n * (Free, Pro), \"subscription\" for the standing arrangement. German says \"Tarif\" for the\n * plan and \"Abonnement\" for the subscription (§10).\n *\n * Prices are GROSS (§12.17): Swiss consumer law (PBV) wants a consumer price with the\n * MWST in it, so the cards say so (`vatIncluded`).\n */\nexport interface BillingLabels {\n /** The settings group or admin section the parts live on (§7, §12.24): \"Subscription\". */\n group: string;\n\n /* ── PlanPicker / PlanCard (§7) ── */\n /** The picker's name when it has no visible `legend`: \"Plans\". */\n plans: string;\n /** The name of the billing-period switch: \"Billing period\". */\n interval: string;\n /** The switch's two options — yearly first (§12.17). */\n yearly: string;\n monthly: string;\n /** The name of the currency switch: \"Currency\". */\n currency: string;\n /** After a price: \"per year\", \"per month\". */\n perYear: string;\n perMonth: string;\n /** Under a price (§12.17): \"VAT included\". German: \"inkl. MWST\". */\n vatIncluded: string;\n /** A plan with no price, or a price of 0: \"Free\". */\n free: string;\n /** A plan with prices, but none for this currency and period. */\n notOffered: string;\n /** A limit of `null` (§3.1): \"Unlimited\". */\n unlimited: string;\n /** The accessible names of a card's two lists. */\n limits: string;\n features: string;\n /** The chip on the payer's current plan. */\n current: string;\n /** The picker's button for `plan` (the plan's display name) with no current plan —\n * during a trial, or after a plan ended: \"Choose Pro\". */\n choose: (plan: string) => string;\n /** …for a plan after the current one in the catalogue's order: \"Upgrade to Pro\". */\n upgrade: (plan: string) => string;\n /** …for a plan before it: \"Switch to Free\". */\n downgrade: (plan: string) => string;\n /** Why the button is off while the current plan is the one picked. */\n isCurrent: string;\n /** Why it is off while nothing is picked. */\n pickFirst: string;\n\n /* ── SubscriptionStatusChip (§6) ── */\n /** One word per status. */\n status: Record<SubscriptionStatus, string>;\n\n /* ── BillingBanner (§3.3, §12.6, §12.21) ── */\n /** A trial ends in `days` calendar days — 0 is today, 1 tomorrow. */\n trialEnding: (days: number) => string;\n /** A free grant (`comped_until`: a beta user's 12 months, an operator's grant) ends in\n * `days` calendar days. */\n grantEnding: (days: number) => string;\n /** The first failed payment (`past_due`), while the provider retries. */\n paymentFailed: string;\n /** Out of good standing: read-only, never locked (§2.3). */\n planEnded: string;\n /**\n * A guest in someone else's item that is read-only for billing (§12.6). It never says\n * WHY beyond \"for now\": the owner's payment status is the owner's personal data.\n * `item` is the item's own name (\"Household 2026\"), shown in quotes — or `undefined`.\n */\n guestReadOnly: (item?: string) => string;\n /** Back from checkout before the provider's webhook landed (§12.21). */\n processing: string;\n /** The action of the trial, grant and plan-ended banners, and of `PlanLimitNotice`'s\n * `upgrade` mode: \"Choose a plan\". */\n choosePlan: string;\n /** The payment-failed banner's action, to the provider's portal: \"Update payment method\". */\n updatePayment: string;\n /** The processing banner's action, when the app gives one: \"Check again\". */\n checkAgain: string;\n\n /* ── The read-only lock (§3.3, §12.6) ── */\n /** The `WriteLockProvider` reason for the payer (§3.3, verbatim). A guest's reason is\n * {@link guestReadOnly}. */\n lockReason: string;\n\n /* ── PlanLimitNotice (§3.4) ── */\n /** The notice's first line: \"Plan limit reached\". */\n limitReached: string;\n /** Mode `upgrade`: what the action does. */\n limitUpgrade: string;\n /** Mode `contact` (the operator grants plans by hand, keksdose's today). */\n limitContact: string;\n /** Mode `contact`'s action, a mail to support: \"Ask for more\". */\n askForMore: string;\n /** The meter's value: \"3 of 3\". Both figures are formatted already. */\n usage: (used: string, limit: string) => string;\n /** The subject of the `contact` mail; `dimension` is the app's name for it (\"Budgets\"). */\n contactSubject: (dimension: string) => string;\n\n /* ── The provider's portal (§7, §12.26) ── */\n /** The portal: payment method and invoices (§2.8, the provider hosts both). */\n manage: string;\n /**\n * The visible cancel link on the app's subscription page (§12.26). German: §312k BGB\n * wants the button that leads to the cancellation labelled \"Verträge hier kündigen\" or\n * as unambiguously — a translator should use exactly that.\n */\n cancel: string;\n\n /* ── Offline (§12.5) ── */\n /** Changes refused as `billing_read_only` inside a sync reply, kept queued and sent\n * after payment: \"3 changes waiting for a plan\". */\n waitingChanges: (count: number) => string;\n /** The sign-out guard's way out for someone who will not pay. */\n discardWaiting: string;\n}\n\n/** \"today\", \"tomorrow\", \"in 5 days\". */\nfunction inDays(days: number): string {\n if (days <= 0) return \"today\";\n if (days === 1) return \"tomorrow\";\n return `in ${days} days`;\n}\n\nexport const DEFAULT_BILLING_LABELS: BillingLabels = {\n group: \"Subscription\",\n\n plans: \"Plans\",\n interval: \"Billing period\",\n yearly: \"Yearly\",\n monthly: \"Monthly\",\n currency: \"Currency\",\n perYear: \"per year\",\n perMonth: \"per month\",\n vatIncluded: \"VAT included\",\n free: \"Free\",\n notOffered: \"Not offered for this billing period\",\n unlimited: \"Unlimited\",\n limits: \"Limits\",\n features: \"Included\",\n current: \"Current plan\",\n choose: (plan) => `Choose ${plan}`,\n upgrade: (plan) => `Upgrade to ${plan}`,\n downgrade: (plan) => `Switch to ${plan}`,\n isCurrent: \"This is your current plan.\",\n pickFirst: \"Pick a plan first.\",\n\n status: {\n trialing: \"Trial\",\n active: \"Active\",\n past_due: \"Payment overdue\",\n canceled: \"Cancelled\",\n expired: \"Expired\",\n comped: \"Complimentary\",\n },\n\n trialEnding: (days) =>\n `Your trial ends ${inDays(days)}. After that you can still view everything, but changes need a plan.`,\n grantEnding: (days) =>\n `Your free access ends ${inDays(days)}. After that you can still view everything, but changes need a plan.`,\n paymentFailed: \"Your last payment didn’t go through. Update your payment method to keep your plan.\",\n planEnded: \"Your plan has ended. You can still view and export everything; choose a plan to make changes again.\",\n guestReadOnly: (item) =>\n item ? `“${item}” is read-only for now; its owner can lift that.` : \"This is read-only for now; its owner can lift that.\",\n processing: \"Your payment is being processed. Your plan starts as soon as it’s confirmed; this page updates by itself.\",\n choosePlan: \"Choose a plan\",\n updatePayment: \"Update payment method\",\n checkAgain: \"Check again\",\n\n lockReason: \"Your plan has ended. Choose a plan to make changes again.\",\n\n limitReached: \"Plan limit reached\",\n limitUpgrade: \"To add more, choose a plan with a higher limit.\",\n limitContact: \"To add more, ask us for a higher limit.\",\n askForMore: \"Ask for more\",\n usage: (used, limit) => `${used} of ${limit}`,\n contactSubject: (dimension) => `Plan limit: ${dimension}`,\n\n manage: \"Payment and invoices\",\n cancel: \"Cancel subscription\",\n\n waitingChanges: (count) =>\n count === 1 ? \"1 change waiting for a plan\" : `${count} changes waiting for a plan`,\n discardWaiting: \"Discard waiting changes\",\n};\n\n/** The `billing` namespace, resolved: English, then the provider, then `labels` — which\n * may be partial at every depth (`{ status: { comped: \"Beta\" } }`). */\nexport function useBillingLabels(labels?: LabelOverride<BillingLabels>): BillingLabels {\n return useKitLabels(\"billing\", DEFAULT_BILLING_LABELS, labels as Partial<BillingLabels> | undefined);\n}\n"],"mappings":";AAAA,SAAS,oBAAoB;AAmBtB,MAAM,wBAAuD,OAAO,OAAO;AAAA,EAChF;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,CAAC;AA6HD,SAAS,OAAO,MAAsB;AACpC,MAAI,QAAQ,EAAG,QAAO;AACtB,MAAI,SAAS,EAAG,QAAO;AACvB,SAAO,MAAM,IAAI;AACnB;AAEO,MAAM,yBAAwC;AAAA,EACnD,OAAO;AAAA,EAEP,OAAO;AAAA,EACP,UAAU;AAAA,EACV,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA,EACV,aAAa;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,SAAS;AAAA,EACT,QAAQ,CAAC,SAAS,UAAU,IAAI;AAAA,EAChC,SAAS,CAAC,SAAS,cAAc,IAAI;AAAA,EACrC,WAAW,CAAC,SAAS,aAAa,IAAI;AAAA,EACtC,WAAW;AAAA,EACX,WAAW;AAAA,EAEX,QAAQ;AAAA,IACN,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,UAAU;AAAA,IACV,SAAS;AAAA,IACT,QAAQ;AAAA,EACV;AAAA,EAEA,aAAa,CAAC,SACZ,mBAAmB,OAAO,IAAI,CAAC;AAAA,EACjC,aAAa,CAAC,SACZ,yBAAyB,OAAO,IAAI,CAAC;AAAA,EACvC,eAAe;AAAA,EACf,WAAW;AAAA,EACX,eAAe,CAAC,SACd,OAAO,SAAI,IAAI,0DAAqD;AAAA,EACtE,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,YAAY;AAAA,EAEZ,YAAY;AAAA,EAEZ,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,OAAO,CAAC,MAAM,UAAU,GAAG,IAAI,OAAO,KAAK;AAAA,EAC3C,gBAAgB,CAAC,cAAc,eAAe,SAAS;AAAA,EAEvD,QAAQ;AAAA,EACR,QAAQ;AAAA,EAER,gBAAgB,CAAC,UACf,UAAU,IAAI,gCAAgC,GAAG,KAAK;AAAA,EACxD,gBAAgB;AAClB;AAIO,SAAS,iBAAiB,QAAsD;AACrF,SAAO,aAAa,WAAW,wBAAwB,MAA4C;AACrG;","names":[]}
|