@dodopayments/ui 1.7.2 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/component-registry.json +1469 -238
- package/ai/component-registry.md +42 -38
- package/ai/components/app-top-bar.md +17 -5
- package/ai/components/area-chart.md +2 -0
- package/ai/components/bar-chart.md +2 -0
- package/ai/components/breadcrumb.md +2 -0
- package/ai/components/button-group.md +2 -0
- package/ai/components/chart-legend.md +2 -0
- package/ai/components/checkout-page.md +2 -0
- package/ai/components/color-input.md +2 -0
- package/ai/components/combobox.md +199 -0
- package/ai/components/composed-chart.md +2 -0
- package/ai/components/container.md +2 -0
- package/ai/components/context-menu.md +2 -0
- package/ai/components/dialog.md +1 -0
- package/ai/components/direction-provider.md +2 -0
- package/ai/components/drawer.md +2 -0
- package/ai/components/field.md +2 -0
- package/ai/components/filter-grid.md +2 -0
- package/ai/components/flag.md +22 -0
- package/ai/components/funnel-chart.md +2 -0
- package/ai/components/fx-conversion.md +2 -0
- package/ai/components/gauge-chart.md +2 -0
- package/ai/components/heatmap-chart.md +2 -0
- package/ai/components/invoice-document.md +2 -0
- package/ai/components/link.md +3 -3
- package/ai/components/list-item.md +4 -4
- package/ai/components/live-activity.md +2 -0
- package/ai/components/new-items-pill.md +2 -0
- package/ai/components/page-header.md +1 -0
- package/ai/components/payment-result.md +2 -0
- package/ai/components/pie-chart.md +2 -0
- package/ai/components/plan-picker.md +2 -0
- package/ai/components/product-card.md +2 -0
- package/ai/components/proration-preview.md +2 -0
- package/ai/components/radar-chart.md +2 -0
- package/ai/components/reorder-list.md +4 -0
- package/ai/components/required-mark.md +22 -0
- package/ai/components/ring-chart.md +2 -0
- package/ai/components/sale-share-card.md +2 -0
- package/ai/components/sankey-chart.md +2 -0
- package/ai/components/scatter-chart.md +2 -0
- package/ai/components/settings-section.md +2 -0
- package/ai/components/sheet.md +8 -4
- package/ai/components/slider.md +2 -0
- package/ai/components/sunburst-chart.md +2 -0
- package/ai/components/switch-transition.md +91 -0
- package/ai/components/task-steps.md +2 -0
- package/ai/components/test-mode-banner.md +2 -2
- package/ai/components/timestamp.md +8 -8
- package/ai/components/timezone-select.md +2 -0
- package/ai/components/typing-indicator.md +2 -0
- package/ai/components/wallet-buttons.md +2 -0
- package/ai/components/wizard-steps.md +2 -0
- package/ai/skills/dodo-charts/SKILL.md +21 -12
- package/ai/skills/dodo-design/SKILL.md +21 -10
- package/bin/registry.js +15 -4
- package/bin/scan.d.ts +3 -2
- package/bin/scan.js +4 -4
- package/dist/components/app-top-bar/app-top-bar.d.ts +17 -3
- package/dist/components/app-top-bar/app-top-bar.d.ts.map +1 -1
- package/dist/components/app-top-bar/app-top-bar.js +25 -9
- package/dist/components/app-top-bar/app-top-bar.js.map +1 -1
- package/dist/components/app-top-bar/index.d.ts +1 -1
- package/dist/components/app-top-bar/index.d.ts.map +1 -1
- package/dist/components/app-top-bar/index.js +1 -1
- package/dist/components/app-top-bar/index.js.map +1 -1
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.js +11 -2
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/checkbox/checkbox.js +7 -3
- package/dist/components/checkbox/checkbox.js.map +1 -1
- package/dist/components/collapsible/collapsible.d.ts.map +1 -1
- package/dist/components/collapsible/collapsible.js +3 -1
- package/dist/components/collapsible/collapsible.js.map +1 -1
- package/dist/components/{select/select-combobox.d.ts → combobox/combobox.d.ts} +1 -1
- package/dist/components/combobox/combobox.d.ts.map +1 -0
- package/dist/components/{select/select-combobox.js → combobox/combobox.js} +1 -1
- package/dist/components/combobox/combobox.js.map +1 -0
- package/dist/components/combobox/index.d.ts +2 -0
- package/dist/components/combobox/index.d.ts.map +1 -0
- package/dist/components/combobox/index.js +2 -0
- package/dist/components/combobox/index.js.map +1 -0
- package/dist/components/country-select/country-select.js +1 -1
- package/dist/components/country-select/country-select.js.map +1 -1
- package/dist/components/currency-select/currency-select.js +1 -1
- package/dist/components/currency-select/currency-select.js.map +1 -1
- package/dist/components/data-grid/data-grid.js +2 -2
- package/dist/components/data-grid/data-grid.js.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +1 -1
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.js +8 -7
- package/dist/components/date-picker/date-picker.js.map +1 -1
- package/dist/components/date-picker/index.d.ts +1 -1
- package/dist/components/date-picker/index.d.ts.map +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-picker/index.js.map +1 -1
- package/dist/components/dialog/confirm-dialog.d.ts +7 -1
- package/dist/components/dialog/confirm-dialog.d.ts.map +1 -1
- package/dist/components/dialog/confirm-dialog.js +2 -2
- package/dist/components/dialog/confirm-dialog.js.map +1 -1
- package/dist/components/field/field.d.ts +0 -19
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/field.js +2 -13
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/field/index.d.ts +1 -1
- package/dist/components/field/index.d.ts.map +1 -1
- package/dist/components/field/index.js +1 -1
- package/dist/components/field/index.js.map +1 -1
- package/dist/components/field/label.d.ts +0 -8
- package/dist/components/field/label.d.ts.map +1 -1
- package/dist/components/field/label.js +1 -9
- package/dist/components/field/label.js.map +1 -1
- package/dist/components/filter-grid/filter-grid.js +1 -1
- package/dist/components/filter-grid/filter-grid.js.map +1 -1
- package/dist/components/flag/country-flag.d.ts.map +1 -0
- package/dist/components/flag/country-flag.js.map +1 -0
- package/dist/components/flag/flag.d.ts.map +1 -0
- package/dist/components/{payment-logos → flag}/flag.js +1 -1
- package/dist/components/flag/flag.js.map +1 -0
- package/dist/components/flag/index.d.ts +2 -0
- package/dist/components/flag/index.d.ts.map +1 -0
- package/dist/components/flag/index.js +2 -0
- package/dist/components/flag/index.js.map +1 -0
- package/dist/components/form/form.js +1 -1
- package/dist/components/form/form.js.map +1 -1
- package/dist/components/form-field/form-field.d.ts.map +1 -1
- package/dist/components/form-field/form-field.js +2 -1
- package/dist/components/form-field/form-field.js.map +1 -1
- package/dist/components/input/chips-field.d.ts +6 -0
- package/dist/components/input/chips-field.d.ts.map +1 -1
- package/dist/components/input/chips-field.js +3 -1
- package/dist/components/input/chips-field.js.map +1 -1
- package/dist/components/input/input-chips-suggestions.js +1 -1
- package/dist/components/input/input-chips-suggestions.js.map +1 -1
- package/dist/components/input/input-phone.js +1 -1
- package/dist/components/input/input-phone.js.map +1 -1
- package/dist/components/input/input.d.ts +15 -0
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +9 -4
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/link/link.d.ts +5 -5
- package/dist/components/link/link.js +5 -5
- package/dist/components/link/link.js.map +1 -1
- package/dist/components/list-item/list-item.d.ts +6 -6
- package/dist/components/list-item/list-item.d.ts.map +1 -1
- package/dist/components/list-item/list-item.js +7 -6
- package/dist/components/list-item/list-item.js.map +1 -1
- package/dist/components/list-toolbar/list-toolbar-date-range.d.ts +1 -1
- package/dist/components/list-toolbar/list-toolbar-date-range.js +3 -3
- package/dist/components/list-toolbar/list-toolbar-date-range.js.map +1 -1
- package/dist/components/list-toolbar/list-toolbar.js +1 -1
- package/dist/components/list-toolbar/list-toolbar.js.map +1 -1
- package/dist/components/page-header/page-header.d.ts +13 -2
- package/dist/components/page-header/page-header.d.ts.map +1 -1
- package/dist/components/page-header/page-header.js +14 -2
- package/dist/components/page-header/page-header.js.map +1 -1
- package/dist/components/payment-logos/index.d.ts +1 -1
- package/dist/components/payment-logos/index.d.ts.map +1 -1
- package/dist/components/payment-logos/index.js +1 -1
- package/dist/components/payment-logos/index.js.map +1 -1
- package/dist/components/record-header/record-header.js +1 -1
- package/dist/components/record-header/record-header.js.map +1 -1
- package/dist/components/reorder-list/reorder-list.d.ts +15 -1
- package/dist/components/reorder-list/reorder-list.d.ts.map +1 -1
- package/dist/components/reorder-list/reorder-list.js +13 -6
- package/dist/components/reorder-list/reorder-list.js.map +1 -1
- package/dist/components/required-mark/index.d.ts +2 -0
- package/dist/components/required-mark/index.d.ts.map +1 -0
- package/dist/components/required-mark/index.js +2 -0
- package/dist/components/required-mark/index.js.map +1 -0
- package/dist/components/required-mark/required-mark.d.ts +9 -0
- package/dist/components/required-mark/required-mark.d.ts.map +1 -0
- package/dist/components/required-mark/required-mark.js +11 -0
- package/dist/components/required-mark/required-mark.js.map +1 -0
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.js +18 -1
- package/dist/components/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/select/select.js +2 -2
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/settings-section/settings-section.d.ts +3 -1
- package/dist/components/settings-section/settings-section.d.ts.map +1 -1
- package/dist/components/settings-section/settings-section.js +6 -5
- package/dist/components/settings-section/settings-section.js.map +1 -1
- package/dist/components/sheet/sheet.d.ts +6 -4
- package/dist/components/sheet/sheet.d.ts.map +1 -1
- package/dist/components/sheet/sheet.js +4 -2
- package/dist/components/sheet/sheet.js.map +1 -1
- package/dist/components/sidebar/sidebar.js +1 -1
- package/dist/components/sidebar/sidebar.js.map +1 -1
- package/dist/components/switch-transition/index.d.ts +2 -0
- package/dist/components/switch-transition/index.d.ts.map +1 -0
- package/dist/components/switch-transition/index.js +2 -0
- package/dist/components/switch-transition/index.js.map +1 -0
- package/dist/components/switch-transition/switch-transition.d.ts +30 -0
- package/dist/components/switch-transition/switch-transition.d.ts.map +1 -0
- package/dist/components/switch-transition/switch-transition.js +80 -0
- package/dist/components/switch-transition/switch-transition.js.map +1 -0
- package/dist/components/test-mode-banner/test-mode-banner.d.ts +1 -1
- package/dist/components/test-mode-banner/test-mode-banner.js +2 -2
- package/dist/components/test-mode-banner/test-mode-banner.js.map +1 -1
- package/dist/components/timestamp/timestamp.d.ts +5 -7
- package/dist/components/timestamp/timestamp.d.ts.map +1 -1
- package/dist/components/timestamp/timestamp.js +18 -14
- package/dist/components/timestamp/timestamp.js.map +1 -1
- package/dist/icons/index.d.ts +22 -0
- package/dist/icons/index.d.ts.map +1 -1
- package/dist/icons/index.js +22 -0
- package/dist/icons/index.js.map +1 -1
- package/dist/icons/ui/ai-agents.d.ts +3 -1
- package/dist/icons/ui/ai-agents.d.ts.map +1 -1
- package/dist/icons/ui/ai-agents.js +3 -1
- package/dist/icons/ui/ai-agents.js.map +1 -1
- package/dist/icons/ui/badge-check-2-outline-duo.d.ts +3 -0
- package/dist/icons/ui/badge-check-2-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/badge-check-2-outline-duo.js +5 -0
- package/dist/icons/ui/badge-check-2-outline-duo.js.map +1 -0
- package/dist/icons/ui/ban-outline-duo.d.ts +3 -0
- package/dist/icons/ui/ban-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/ban-outline-duo.js +5 -0
- package/dist/icons/ui/ban-outline-duo.js.map +1 -0
- package/dist/icons/ui/chart-column-outline-duo.d.ts +3 -0
- package/dist/icons/ui/chart-column-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/chart-column-outline-duo.js +5 -0
- package/dist/icons/ui/chart-column-outline-duo.js.map +1 -0
- package/dist/icons/ui/check-glyph-12.d.ts +3 -1
- package/dist/icons/ui/check-glyph-12.d.ts.map +1 -1
- package/dist/icons/ui/check-glyph-12.js +3 -1
- package/dist/icons/ui/check-glyph-12.js.map +1 -1
- package/dist/icons/ui/circle-user-outline-duo.d.ts +3 -0
- package/dist/icons/ui/circle-user-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/circle-user-outline-duo.js +5 -0
- package/dist/icons/ui/circle-user-outline-duo.js.map +1 -0
- package/dist/icons/ui/credit-card-outline-duo.d.ts +3 -0
- package/dist/icons/ui/credit-card-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/credit-card-outline-duo.js +5 -0
- package/dist/icons/ui/credit-card-outline-duo.js.map +1 -0
- package/dist/icons/ui/crown.d.ts +3 -0
- package/dist/icons/ui/crown.d.ts.map +1 -0
- package/dist/icons/ui/crown.js +5 -0
- package/dist/icons/ui/crown.js.map +1 -0
- package/dist/icons/ui/envelope-outline-duo.d.ts +3 -0
- package/dist/icons/ui/envelope-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/envelope-outline-duo.js +5 -0
- package/dist/icons/ui/envelope-outline-duo.js.map +1 -0
- package/dist/icons/ui/gear-outline-duo.d.ts +3 -0
- package/dist/icons/ui/gear-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/gear-outline-duo.js +5 -0
- package/dist/icons/ui/gear-outline-duo.js.map +1 -0
- package/dist/icons/ui/greek-temple-2-outline-duo.d.ts +3 -0
- package/dist/icons/ui/greek-temple-2-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/greek-temple-2-outline-duo.js +5 -0
- package/dist/icons/ui/greek-temple-2-outline-duo.js.map +1 -0
- package/dist/icons/ui/heart-glyph.d.ts +3 -1
- package/dist/icons/ui/heart-glyph.d.ts.map +1 -1
- package/dist/icons/ui/heart-glyph.js +3 -1
- package/dist/icons/ui/heart-glyph.js.map +1 -1
- package/dist/icons/ui/heart.d.ts +3 -1
- package/dist/icons/ui/heart.d.ts.map +1 -1
- package/dist/icons/ui/heart.js +3 -1
- package/dist/icons/ui/heart.js.map +1 -1
- package/dist/icons/ui/laptop-2.d.ts +3 -0
- package/dist/icons/ui/laptop-2.d.ts.map +1 -0
- package/dist/icons/ui/laptop-2.js +5 -0
- package/dist/icons/ui/laptop-2.js.map +1 -0
- package/dist/icons/ui/life-ring-outline-duo.d.ts +3 -0
- package/dist/icons/ui/life-ring-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/life-ring-outline-duo.js +5 -0
- package/dist/icons/ui/life-ring-outline-duo.js.map +1 -0
- package/dist/icons/ui/mobile.d.ts +3 -0
- package/dist/icons/ui/mobile.d.ts.map +1 -0
- package/dist/icons/ui/mobile.js +5 -0
- package/dist/icons/ui/mobile.js.map +1 -0
- package/dist/icons/ui/office-3-outline-duo.d.ts +3 -0
- package/dist/icons/ui/office-3-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/office-3-outline-duo.js +5 -0
- package/dist/icons/ui/office-3-outline-duo.js.map +1 -0
- package/dist/icons/ui/palette-2-outline-duo.d.ts +3 -0
- package/dist/icons/ui/palette-2-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/palette-2-outline-duo.js +5 -0
- package/dist/icons/ui/palette-2-outline-duo.js.map +1 -0
- package/dist/icons/ui/plug-2-outline-duo.d.ts +3 -0
- package/dist/icons/ui/plug-2-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/plug-2-outline-duo.js +5 -0
- package/dist/icons/ui/plug-2-outline-duo.js.map +1 -0
- package/dist/icons/ui/plug-sparkle-outline-duo.d.ts +3 -0
- package/dist/icons/ui/plug-sparkle-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/plug-sparkle-outline-duo.js +5 -0
- package/dist/icons/ui/plug-sparkle-outline-duo.js.map +1 -0
- package/dist/icons/ui/refresh-clockwise-outline-duo.d.ts +3 -0
- package/dist/icons/ui/refresh-clockwise-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/refresh-clockwise-outline-duo.js +5 -0
- package/dist/icons/ui/refresh-clockwise-outline-duo.js.map +1 -0
- package/dist/icons/ui/scale-outline-duo.d.ts +3 -0
- package/dist/icons/ui/scale-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/scale-outline-duo.js +5 -0
- package/dist/icons/ui/scale-outline-duo.js.map +1 -0
- package/dist/icons/ui/shop-outline-duo.d.ts +3 -0
- package/dist/icons/ui/shop-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/shop-outline-duo.js +5 -0
- package/dist/icons/ui/shop-outline-duo.js.map +1 -0
- package/dist/icons/ui/tag-outline-duo.d.ts +3 -0
- package/dist/icons/ui/tag-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/tag-outline-duo.js +5 -0
- package/dist/icons/ui/tag-outline-duo.js.map +1 -0
- package/dist/icons/ui/ticket-outline-duo.d.ts +3 -0
- package/dist/icons/ui/ticket-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/ticket-outline-duo.js +5 -0
- package/dist/icons/ui/ticket-outline-duo.js.map +1 -0
- package/dist/icons/ui/trash-2.d.ts +3 -1
- package/dist/icons/ui/trash-2.d.ts.map +1 -1
- package/dist/icons/ui/trash-2.js +3 -1
- package/dist/icons/ui/trash-2.js.map +1 -1
- package/dist/icons/ui/users-6-outline-duo.d.ts +3 -0
- package/dist/icons/ui/users-6-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/users-6-outline-duo.js +5 -0
- package/dist/icons/ui/users-6-outline-duo.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/{components/date-picker/day-label.d.ts → lib/calendar-day.d.ts} +1 -1
- package/dist/lib/calendar-day.d.ts.map +1 -0
- package/dist/{components/date-picker/day-label.js → lib/calendar-day.js} +1 -1
- package/dist/lib/calendar-day.js.map +1 -0
- package/dist/lib/cn-tables.js +5 -5
- package/dist/lib/cn-tables.js.map +1 -1
- package/dist/lib/column-title.d.ts.map +1 -0
- package/dist/lib/column-title.js.map +1 -0
- package/dist/{components/date-picker/presets.d.ts → lib/date-presets.d.ts} +2 -2
- package/dist/lib/date-presets.d.ts.map +1 -0
- package/dist/{components/date-picker/presets.js → lib/date-presets.js} +2 -2
- package/dist/lib/date-presets.js.map +1 -0
- package/dist/lib/field-context.d.ts +21 -0
- package/dist/lib/field-context.d.ts.map +1 -0
- package/dist/lib/field-context.js +14 -0
- package/dist/lib/field-context.js.map +1 -0
- package/dist/lib/motion.d.ts +4 -2
- package/dist/lib/motion.d.ts.map +1 -1
- package/dist/lib/motion.js +4 -2
- package/dist/lib/motion.js.map +1 -1
- package/dist/lib/use-animated-height.d.ts +6 -0
- package/dist/lib/use-animated-height.d.ts.map +1 -0
- package/dist/lib/use-animated-height.js +67 -0
- package/dist/lib/use-animated-height.js.map +1 -0
- package/dist/primitives/ui/autocomplete.js +1 -1
- package/dist/primitives/ui/autocomplete.js.map +1 -1
- package/dist/primitives/ui/button.js +6 -6
- package/dist/primitives/ui/button.js.map +1 -1
- package/dist/primitives/ui/card.js +1 -1
- package/dist/primitives/ui/card.js.map +1 -1
- package/dist/primitives/ui/checkbox.js +1 -1
- package/dist/primitives/ui/checkbox.js.map +1 -1
- package/dist/primitives/ui/combobox.js +3 -3
- package/dist/primitives/ui/combobox.js.map +1 -1
- package/dist/primitives/ui/drawer.js +1 -1
- package/dist/primitives/ui/drawer.js.map +1 -1
- package/dist/primitives/ui/empty.js +2 -2
- package/dist/primitives/ui/empty.js.map +1 -1
- package/dist/primitives/ui/group.js +2 -2
- package/dist/primitives/ui/group.js.map +1 -1
- package/dist/primitives/ui/input-group.js +1 -1
- package/dist/primitives/ui/input-group.js.map +1 -1
- package/dist/primitives/ui/input.js +2 -2
- package/dist/primitives/ui/input.js.map +1 -1
- package/dist/primitives/ui/menu.d.ts +1 -1
- package/dist/primitives/ui/menu.d.ts.map +1 -1
- package/dist/primitives/ui/menu.js +1 -1
- package/dist/primitives/ui/menu.js.map +1 -1
- package/dist/primitives/ui/number-field.js +1 -1
- package/dist/primitives/ui/number-field.js.map +1 -1
- package/dist/primitives/ui/otp-field.js +1 -1
- package/dist/primitives/ui/otp-field.js.map +1 -1
- package/dist/primitives/ui/popover.js +1 -1
- package/dist/primitives/ui/popover.js.map +1 -1
- package/dist/primitives/ui/preview-card.js +1 -1
- package/dist/primitives/ui/preview-card.js.map +1 -1
- package/dist/primitives/ui/radio-group.js +1 -1
- package/dist/primitives/ui/radio-group.js.map +1 -1
- package/dist/primitives/ui/select.js +2 -2
- package/dist/primitives/ui/select.js.map +1 -1
- package/dist/primitives/ui/sheet.d.ts +4 -3
- package/dist/primitives/ui/sheet.d.ts.map +1 -1
- package/dist/primitives/ui/sheet.js +112 -6
- package/dist/primitives/ui/sheet.js.map +1 -1
- package/dist/primitives/ui/skeleton.js +1 -1
- package/dist/primitives/ui/skeleton.js.map +1 -1
- package/dist/primitives/ui/textarea.js +2 -2
- package/dist/primitives/ui/textarea.js.map +1 -1
- package/dist/primitives/ui/toast.js +2 -2
- package/dist/primitives/ui/toast.js.map +1 -1
- package/dist/primitives/ui/toggle-group.js +1 -1
- package/dist/primitives/ui/toggle-group.js.map +1 -1
- package/dist/primitives/ui/toggle.js +1 -1
- package/dist/primitives/ui/toggle.js.map +1 -1
- package/dist/primitives/ui/toolbar.js +1 -1
- package/dist/primitives/ui/toolbar.js.map +1 -1
- package/dist/primitives/ui/tooltip.js +1 -1
- package/dist/primitives/ui/tooltip.js.map +1 -1
- package/dist/styles/extensions.css +5 -0
- package/dist/styles/hover.test.tsx +154 -0
- package/dist/styles/rtl.test.tsx +1 -1
- package/dist/styles/theme-switch-tokens.test.tsx +96 -0
- package/dist/styles/theme.css +23 -10
- package/dist/styles/tokens-artwork.css +115 -0
- package/dist/styles/tokens-charts.css +81 -0
- package/dist/styles/tokens-motion.css +60 -0
- package/dist/styles/tokens.css +81 -340
- package/dist/styles/tokens.test.tsx +40 -4
- package/eslint/restricted-classes.js +6 -0
- package/package.json +5 -1
- package/stylelint/index.d.ts +1 -1
- package/stylelint/index.js +9 -2
- package/dist/components/country-select/country-flag.d.ts.map +0 -1
- package/dist/components/country-select/country-flag.js.map +0 -1
- package/dist/components/data-grid/column-title.d.ts.map +0 -1
- package/dist/components/data-grid/column-title.js.map +0 -1
- package/dist/components/date-picker/day-label.d.ts.map +0 -1
- package/dist/components/date-picker/day-label.js.map +0 -1
- package/dist/components/date-picker/presets.d.ts.map +0 -1
- package/dist/components/date-picker/presets.js.map +0 -1
- package/dist/components/payment-logos/flag.d.ts.map +0 -1
- package/dist/components/payment-logos/flag.js.map +0 -1
- package/dist/components/select/select-combobox.d.ts.map +0 -1
- package/dist/components/select/select-combobox.js.map +0 -1
- /package/dist/components/{country-select → flag}/country-flag.d.ts +0 -0
- /package/dist/components/{country-select → flag}/country-flag.js +0 -0
- /package/dist/components/{payment-logos → flag}/flag.d.ts +0 -0
- /package/dist/{components/data-grid → lib}/column-title.d.ts +0 -0
- /package/dist/{components/data-grid → lib}/column-title.js +0 -0
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Heatmap Chart
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
A calendar heatmap on the bklit `HeatmapChart` primitive (visx): one column per week, one row per
|
|
4
6
|
weekday, each cell filled by its level on the `--chart-scale-01..05` tokens. Compose it from
|
|
5
7
|
children: `HeatmapCells`, `HeatmapXAxis` (months), `HeatmapYAxis` (weekdays), `HeatmapSeparator`
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Invoice Document
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
An invoice as its PDF prints, ported from the dashboard's invoice preview: A4 at 72 dpi (595 wide,
|
|
4
6
|
at least 842 tall) with the title, status and merchant on a grey strip, the parties, the amount due,
|
|
5
7
|
the details, the lines and the totals, then Dodo's footer. It always draws light, as the PDF does.
|
package/ai/components/link.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Navigates somewhere (Dodo Nest Link). `inline` underlines words inside a sentence and wraps with it;
|
|
4
4
|
`entity` has no underline and a trailing arrow, for “View all” and IDs, and truncates on one line.
|
|
5
5
|
Blue (`accent`) by default, red (`error`) next to a destructive or warning message. An inline link takes
|
|
6
|
-
the size of its sentence; an entity link is always
|
|
6
|
+
the size of its sentence; an entity link is always 12. Keep the full stop outside the link.
|
|
7
7
|
|
|
8
8
|
Renders an `<a>`; pass a router link through `render` (`render={<NextLink href="/payments" />}`) to
|
|
9
9
|
keep client-side navigation.
|
|
@@ -17,7 +17,7 @@ import { Link } from "@dodopayments/ui/link";
|
|
|
17
17
|
Navigates somewhere (Dodo Nest Link). `inline` underlines words inside a sentence and wraps with it;
|
|
18
18
|
`entity` has no underline and a trailing arrow, for “View all” and IDs, and truncates on one line.
|
|
19
19
|
Blue (`accent`) by default, red (`error`) next to a destructive or warning message. An inline link takes
|
|
20
|
-
the size of its sentence; an entity link is always
|
|
20
|
+
the size of its sentence; an entity link is always 12. Keep the full stop outside the link.
|
|
21
21
|
|
|
22
22
|
Renders an `<a>`; pass a router link through `render` (`render={<NextLink href="/payments" />}`) to
|
|
23
23
|
keep client-side navigation.
|
|
@@ -27,7 +27,7 @@ keep client-side navigation.
|
|
|
27
27
|
| `external` | `boolean` | `false` | Open the link in a new tab (`target="_blank"`, `rel="noopener noreferrer"`), end it with an up-right arrow (it replaces the entity arrow; in running text it wraps with the last word, never alone) and append `externalLabel` for screen readers (also appended to `aria-label` when set). |
|
|
28
28
|
| `externalLabel` | `string` | `"(opens in a new tab)"` | Visually hidden text appended to external links. |
|
|
29
29
|
| `tone` | `"accent" \| "error"` | `"accent"` | `accent`: Content/Accent (Blue 600, Blue 400 in dark). The default.<br>`error`: Content/Error (Red 600, Red 400 in dark), only next to a destructive or warning message. |
|
|
30
|
-
| `variant` | `"inline" \| "entity"` | `"inline"` | `inline`: Underlined words inside a sentence. Takes the sentence's size and line height (Link/Primary in 14, Link/Secondary in 12) and wraps with it. The underline is the link colour at 40% and turns solid on hover.<br>`entity`: Labels/
|
|
30
|
+
| `variant` | `"inline" \| "entity"` | `"inline"` | `inline`: Underlined words inside a sentence. Takes the sentence's size and line height (Link/Primary in 14, Link/Secondary in 12) and wraps with it. The underline is the link colour at 40% and turns solid on hover.<br>`entity`: Labels/Secondary (12) and a 12 trailing arrow, for “View all” and IDs that open a page. No underline until hover, when it fades in under the label. Keeps one line and truncates. |
|
|
31
31
|
|
|
32
32
|
Also accepts Base UI props: `render`.
|
|
33
33
|
|
|
@@ -4,8 +4,8 @@ One line of a list or one small card (Dodo Nest List item): a leading part, the
|
|
|
4
4
|
each, with an ellipsis, or whole with `wrap`) and a trailing part. `layout` is `row` (order lines, settings rows, sessions, saved
|
|
5
5
|
payment methods inside a panel; a divider under every row but the last), `card` (side-by-side portal cards, 12
|
|
6
6
|
apart), `tile` (a bordered row tile: add-ons with a quantity, or with `href` / `render` a link with a chevron for a settings index) or `add` (a dashed “Add …” tile that is a button; pass `onClick`). Renders a `<div>` (an `<li>` with
|
|
7
|
-
`render={<li />}`, a link with `render={<a href="…" />}`); the add tile renders a `<button>`.
|
|
8
|
-
selected state: for a choice, use a Radio card.
|
|
7
|
+
`render={<li />}`, a link with `render={<a href="…" />}`); the add tile renders a `<button>`. A linked tile fills
|
|
8
|
+
and nudges its chevron on hover. It has no selected state: for a choice, use a Radio card.
|
|
9
9
|
|
|
10
10
|
```tsx
|
|
11
11
|
import { ListItem, ListItemPrice, ListItemThumbnail } from "@dodopayments/ui/list-item";
|
|
@@ -17,8 +17,8 @@ One line of a list or one small card (Dodo Nest List item): a leading part, the
|
|
|
17
17
|
each, with an ellipsis, or whole with `wrap`) and a trailing part. `layout` is `row` (order lines, settings rows, sessions, saved
|
|
18
18
|
payment methods inside a panel; a divider under every row but the last), `card` (side-by-side portal cards, 12
|
|
19
19
|
apart), `tile` (a bordered row tile: add-ons with a quantity, or with `href` / `render` a link with a chevron for a settings index) or `add` (a dashed “Add …” tile that is a button; pass `onClick`). Renders a `<div>` (an `<li>` with
|
|
20
|
-
`render={<li />}`, a link with `render={<a href="…" />}`); the add tile renders a `<button>`.
|
|
21
|
-
selected state: for a choice, use a Radio card.
|
|
20
|
+
`render={<li />}`, a link with `render={<a href="…" />}`); the add tile renders a `<button>`. A linked tile fills
|
|
21
|
+
and nudges its chevron on hover. It has no selected state: for a choice, use a Radio card.
|
|
22
22
|
|
|
23
23
|
| Prop | Type | Default | Description |
|
|
24
24
|
| --- | --- | --- | --- |
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Live Activity
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
A small pod that reports one background task, like a phone's live activity, after interior.dev's
|
|
4
6
|
live activity. Compact it shows a spinner and the percentage; hover, focus, a new task or a phase
|
|
5
7
|
change opens it to show the title, detail and a progress bar. The pod springs between the two
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# New Items Pill
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
A floating "3 new items" pill for feeds and chats, after interior.dev's new items pill
|
|
4
6
|
(https://www.interior.dev/docs/new-items-pill). Place it in a `relative` wrapper around the scroll
|
|
5
7
|
container and feed it from {@link useNewItems}. It springs in from its edge, and a live region
|
|
@@ -37,6 +37,7 @@ first section.
|
|
|
37
37
|
| `description` | `ReactNode` | - | One line under the title (Body/Secondary, Content/Secondary). |
|
|
38
38
|
| `help` | `ReactNode` | - | Help text behind a 12px question icon after the title, in a Tooltip. |
|
|
39
39
|
| `helpLabel` | `string` | `"More information"` | Accessible name of the help icon. |
|
|
40
|
+
| `media` | `ReactNode` | - | A leading visual before the title and description, centred on them, e.g. a 40px app logo or `Avatar` on a record's page. Decorative: the title names the page. |
|
|
40
41
|
| `meta` | `ReactNode` | - | Next to the title: a status `Badge` and/or a `CopyableId`. |
|
|
41
42
|
| `size` | `"sm" \| "md" \| null` | - | |
|
|
42
43
|
| `titleAs` | `"h1" \| "h2" \| "h3"` | `"h1"` | Element used for the title. |
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Payment Result
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
Receipt card for the page a customer lands on after paying, ported from the checkout status page:
|
|
4
6
|
a merchant pill, a toned icon with the outcome title, a status `Badge` and date row, the decline
|
|
5
7
|
reason, then the purchased items, the totals with an optional `Alert` notice and the invoice
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Pie Chart
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
Parts of a whole as pie or donut slices, on the bklit `PieChart` primitive (visx). Compose it from
|
|
4
6
|
children: one `PieSlice` per row of `data` (`index`), and a `PieCenter` for a donut
|
|
5
7
|
(`innerRadius > 0`) that shows the total, or the hovered slice. Rows are `{ label, value, color? }`
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Plan Picker
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
Plan chooser for checkout and change-plan flows, ported from the checkout product collection and
|
|
4
6
|
the customer portal's change-plan sheet. Plans are cards in a `RadioGroup`: a label row with the
|
|
5
7
|
radio, name, badges and price, then under a divider the description, feature chips, an `extra`
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Product Card
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
Storefront product card, ported from the Dodo store front: a square blur-up photo (or
|
|
4
6
|
`imageFallback`) with an optional `badge` and an info button that slides `description` up over
|
|
5
7
|
the image, then the name, `compareAtPrice` struck through, `price` and `interval`. Purchase turns
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Proration Preview
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
What a plan change costs, ported from the customer portal's change-plan sheet: the current and
|
|
4
6
|
new plan side by side, a sentence on when the change applies, then plain rows (credit for unused
|
|
5
7
|
time, charge for the new plan, the amount due today and the next invoice). Amounts are integer
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Radar Chart
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
Several series compared over the same metrics, as polygons on a radar (spider) grid, on the bklit
|
|
4
6
|
`RadarChart` primitive (visx). Compose it from children: `RadarGrid`, `RadarAxis`, `RadarLabels`
|
|
5
7
|
and one `RadarArea` per series (`index` into `data`). `metrics` is a list of `{ key, label }`;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Reorder List
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
A vertical list the user can reorder by dragging or with the keyboard, after interior.dev's reorder
|
|
4
6
|
list (https://www.interior.dev/docs/reorder-list). It uses `motion`'s `Reorder`: the dragged row
|
|
5
7
|
lifts and the other rows spring out of its way. With the keyboard, Space grabs a row, the arrow
|
|
@@ -30,7 +32,9 @@ move without animation.
|
|
|
30
32
|
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
31
33
|
| `disabled` | `boolean` | - | Turns off dragging and keyboard moves. |
|
|
32
34
|
| `interactive` | `boolean` | - | Rows hold their own controls, such as a switch or a menu. Their content stays readable by assistive technology, a key pressed on a control does not grab the row, and a row drags only from its handle, so a click on a control never starts a drag. |
|
|
35
|
+
| `onDropAt` | `((item: T, point: { x: number; y: number; }) => void)` | - | Called when a drag ends, with the row and the pointer's viewport position (for `elementsFromPoint`), so a page can move the row into another list it was dropped on, e.g. another checkout group. |
|
|
33
36
|
| `onValueCommitted` | `((next: T[]) => void)` | - | Called with the final order when a drag or a keyboard move ends. |
|
|
37
|
+
| `variant` | `"card" \| "plain"` | `"card"` | `card` boxes each row; `plain` divides the rows with a line, for a list inside a card of its own. A dragged row lifts with a fill and a shadow either way. |
|
|
34
38
|
|
|
35
39
|
## useReorderList
|
|
36
40
|
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Required mark
|
|
2
|
+
|
|
3
|
+
> **Beta**: the API may still change in a minor release.
|
|
4
|
+
|
|
5
|
+
Decorative required marker shared by `Label` and `FieldLabel`. Hidden from assistive
|
|
6
|
+
technology: the control's own `required` attribute is what gets announced. Exported for a
|
|
7
|
+
heading over a required group of fields; give it `className="ms-1"` there.
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { LabelRequiredIndicator } from "@dodopayments/ui/required-mark";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## LabelRequiredIndicator
|
|
14
|
+
|
|
15
|
+
Decorative required marker shared by `Label` and `FieldLabel`. Hidden from assistive
|
|
16
|
+
technology: the control's own `required` attribute is what gets announced. Exported for a
|
|
17
|
+
heading over a required group of fields; give it `className="ms-1"` there.
|
|
18
|
+
|
|
19
|
+
| Prop | Type | Default | Description |
|
|
20
|
+
| --- | --- | --- | --- |
|
|
21
|
+
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
22
|
+
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Ring Chart
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
Progress toward several targets as concentric rings, on the bklit `RingChart` primitive (visx).
|
|
4
6
|
Compose it from children: one `Ring` per row of `data` (`index`, 0 = innermost) and an optional
|
|
5
7
|
`RingCenter` that shows the sum of the values, or the hovered ring. Rows are
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Sale share card
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
A new sale as an image to share (the dashboard's payments list, Share): 720 by 400, the artwork behind, the
|
|
4
6
|
business chip, a headline and the amount in the brand lime with a dark outline. Always light, whatever the theme,
|
|
5
7
|
so the saved picture looks the same. Capture this element at its own size, and preview it in a `ScaledFrame`.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Sankey Chart
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
A Sankey diagram on the bklit `SankeyChart` primitive (visx, d3-sankey): flows between nodes, each
|
|
4
6
|
band as wide as its value. Use it to show where an amount goes, e.g. gross volume into fees,
|
|
5
7
|
refunds and payouts. Compose it from children: `SankeyLink` (the bands), `SankeyNode` (the bars
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Scatter Chart
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
Values over time as dots, on the bklit `ScatterChart` primitive (visx). Compose it from
|
|
4
6
|
children: one `Scatter` per series (`dataKey`), `ChartGrid` or `Background`, `XAxis`, `YAxis`,
|
|
5
7
|
`ChartTooltip`. Rows need a `Date` under `xDataKey` (default `"date"`) and a number under each
|
|
@@ -38,6 +38,7 @@ control on the trailing side, and optional content underneath. Ported from the d
|
|
|
38
38
|
| `controlId` | `string` | - | `id` of the form control in `control`: the title becomes its `<label>`. |
|
|
39
39
|
| `description` | `ReactNode` | - | What the setting does or its current state, under the title. |
|
|
40
40
|
| `descriptionId` | `string` | - | `id` given to the description, so the control can reference it with `aria-describedby`. |
|
|
41
|
+
| `icon` | `ReactNode` | - | A leading icon tile before the title, e.g. `<FeaturedIcon icon={<KeyIcon />} />`. |
|
|
41
42
|
| `tooltip` | `ReactNode` | - | Longer help in a tooltip on an info button next to the title. |
|
|
42
43
|
| `tooltipLabel` | `string` | `"More information"` | Accessible name of the info button. |
|
|
43
44
|
|
|
@@ -65,6 +66,7 @@ label (clicking it toggles the switch) and the description is its accessible des
|
|
|
65
66
|
| --- | --- | --- | --- |
|
|
66
67
|
| `title` (required) | `ReactNode` | - | What the setting is, e.g. "Password". |
|
|
67
68
|
| `description` | `ReactNode` | - | What the setting does or its current state, under the title. |
|
|
69
|
+
| `icon` | `ReactNode` | - | A leading icon tile before the title, e.g. `<FeaturedIcon icon={<KeyIcon />} />`. |
|
|
68
70
|
| `switchProps` | `Omit<SwitchProps, "defaultChecked" \| "id" \| "disabled" \| "name" \| "checked" \| "onCheckedChange">` | - | Other props of the `Switch`, e.g. `size` or `inputRef`. |
|
|
69
71
|
| `tooltip` | `ReactNode` | - | Longer help in a tooltip on an info button next to the title. |
|
|
70
72
|
| `tooltipLabel` | `string` | `"More information"` | Accessible name of the info button. |
|
package/ai/components/sheet.md
CHANGED
|
@@ -4,8 +4,10 @@ The sheet (Dodo Nest Sheet): portal + scrim + popup + close button, sliding in f
|
|
|
4
4
|
direction (the right in LTR). `type="side"` (default) is a grey tray 8 from the screen edges, 400 wide (`size="lg"`:
|
|
5
5
|
560, `size="xl"`: 768), with the title and close on the grey chin, the body in a white panel that scrolls, and the
|
|
6
6
|
actions on the grey strip; below 400 it fills the screen minus 8 on every side. `type="full"` covers the screen.
|
|
7
|
-
Always include a `SheetTitle`; lay it out as `SheetHeader`, `SheetPanel` and `SheetFooter
|
|
8
|
-
|
|
7
|
+
Always include a `SheetTitle`; lay it out as `SheetHeader`, `SheetPanel` and `SheetFooter`, and use a Dialog for a
|
|
8
|
+
yes / no confirm. A sheet can open over another, nested in its tree or not: the one behind steps back, smaller and
|
|
9
|
+
faded under the scrim's colour and blur, over a single scrim, and Escape or a click away closes only the top one. A sheet is at least as wide as the
|
|
10
|
+
one it covers, so only a sliver of that one shows.
|
|
9
11
|
|
|
10
12
|
```tsx
|
|
11
13
|
import { SheetContent, Sheet, SheetClose, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPanel, SheetPortal, SheetTitle, SheetTrigger } from "@dodopayments/ui/sheet";
|
|
@@ -17,8 +19,10 @@ The sheet (Dodo Nest Sheet): portal + scrim + popup + close button, sliding in f
|
|
|
17
19
|
direction (the right in LTR). `type="side"` (default) is a grey tray 8 from the screen edges, 400 wide (`size="lg"`:
|
|
18
20
|
560, `size="xl"`: 768), with the title and close on the grey chin, the body in a white panel that scrolls, and the
|
|
19
21
|
actions on the grey strip; below 400 it fills the screen minus 8 on every side. `type="full"` covers the screen.
|
|
20
|
-
Always include a `SheetTitle`; lay it out as `SheetHeader`, `SheetPanel` and `SheetFooter
|
|
21
|
-
|
|
22
|
+
Always include a `SheetTitle`; lay it out as `SheetHeader`, `SheetPanel` and `SheetFooter`, and use a Dialog for a
|
|
23
|
+
yes / no confirm. A sheet can open over another, nested in its tree or not: the one behind steps back, smaller and
|
|
24
|
+
faded under the scrim's colour and blur, over a single scrim, and Escape or a click away closes only the top one. A sheet is at least as wide as the
|
|
25
|
+
one it covers, so only a sliver of that one shows.
|
|
22
26
|
|
|
23
27
|
| Prop | Type | Default | Description |
|
|
24
28
|
| --- | --- | --- | --- |
|
package/ai/components/slider.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Slider
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
Picks a number, or a range with two thumbs, by dragging or with the keyboard: the Dodo Nest Slider. A 4px
|
|
4
6
|
track in `--tertiary`, the range in the brand colour with the Progress bar's glossy rim, and a 16px Thumb
|
|
5
7
|
(Surface/Primary, a 1px gradient rim and a soft shadow) that stays inside the track at both ends. Renders
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Sunburst Chart
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
A hierarchy as rings around a center, on the bklit `SunburstChart` primitive. Compose it from
|
|
4
6
|
children: one `SunburstSegment` per arc of `buildArcs(data).arcs`, plus `SunburstCenter` (the hub:
|
|
5
7
|
the focused total with `formatValue`, and a click zooms out), `SunburstLabels`, `SunburstBreadcrumb`
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Switch transition
|
|
2
|
+
|
|
3
|
+
The screen a switch of mode or business shows while the dashboard reloads its data: a slow Paper mesh
|
|
4
|
+
gradient in the tone's colour (green for live mode, amber for test mode, blue for a business) over the page, and the
|
|
5
|
+
message shimmering in the middle at heading size. It covers the whole viewport (portalled, above
|
|
6
|
+
sheets and dialogs), fades in, and fades out once `active` clears. The gradient stands still under
|
|
7
|
+
reduced motion, and is left out where WebGL 2 is unavailable.
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { SwitchTransition } from "@dodopayments/ui/switch-transition";
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## SwitchTransition
|
|
14
|
+
|
|
15
|
+
The screen a switch of mode or business shows while the dashboard reloads its data: a slow Paper mesh
|
|
16
|
+
gradient in the tone's colour (green for live mode, amber for test mode, blue for a business) over the page, and the
|
|
17
|
+
message shimmering in the middle at heading size. It covers the whole viewport (portalled, above
|
|
18
|
+
sheets and dialogs), fades in, and fades out once `active` clears. The gradient stands still under
|
|
19
|
+
reduced motion, and is left out where WebGL 2 is unavailable.
|
|
20
|
+
|
|
21
|
+
| Prop | Type | Default | Description |
|
|
22
|
+
| --- | --- | --- | --- |
|
|
23
|
+
| `active` (required) | `boolean` | - | A switch is running. Clear it once the new mode or business has loaded. |
|
|
24
|
+
| `message` (required) | `string` | - | What is happening, such as "Switching to test mode". Announced politely. |
|
|
25
|
+
| `inline` | `boolean` | `false` | Render in place, still covering the viewport, instead of in a portal: for a page that is only this screen (a sign-in callback), so it renders on the server too. |
|
|
26
|
+
| `tone` | `SwitchTransitionTone` | `"brand"` | The gradient's colour: `brand` for live mode, `warning` for test mode, `info` for a business. |
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
### switch-transition/default
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
"use client";
|
|
34
|
+
|
|
35
|
+
import { Button } from "@dodopayments/ui/button";
|
|
36
|
+
import { SwitchTransition } from "@dodopayments/ui/switch-transition";
|
|
37
|
+
import * as React from "react";
|
|
38
|
+
|
|
39
|
+
export default function SwitchTransitionDefault() {
|
|
40
|
+
const [active, setActive] = React.useState(false);
|
|
41
|
+
|
|
42
|
+
return (
|
|
43
|
+
<div className="flex flex-col items-center gap-4">
|
|
44
|
+
<div className="relative h-60 w-full overflow-hidden rounded-xl border border-border">
|
|
45
|
+
<SwitchTransition
|
|
46
|
+
active={active}
|
|
47
|
+
className="absolute"
|
|
48
|
+
inline
|
|
49
|
+
message="Switching to live mode"
|
|
50
|
+
/>
|
|
51
|
+
</div>
|
|
52
|
+
<Button
|
|
53
|
+
onClick={() => {
|
|
54
|
+
setActive(true);
|
|
55
|
+
setTimeout(() => setActive(false), 2000);
|
|
56
|
+
}}
|
|
57
|
+
variant="secondary"
|
|
58
|
+
>
|
|
59
|
+
Switch mode
|
|
60
|
+
</Button>
|
|
61
|
+
</div>
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
### switch-transition/tones
|
|
67
|
+
|
|
68
|
+
```tsx
|
|
69
|
+
"use client";
|
|
70
|
+
|
|
71
|
+
import { SwitchTransition } from "@dodopayments/ui/switch-transition";
|
|
72
|
+
|
|
73
|
+
export default function SwitchTransitionTones() {
|
|
74
|
+
return (
|
|
75
|
+
<div className="grid w-full grid-cols-1 gap-4 sm:grid-cols-3">
|
|
76
|
+
{(["brand", "warning", "info"] as const).map((tone) => (
|
|
77
|
+
<div className="relative h-40 overflow-hidden rounded-xl border border-border" key={tone}>
|
|
78
|
+
<SwitchTransition
|
|
79
|
+
active
|
|
80
|
+
className="absolute"
|
|
81
|
+
inline
|
|
82
|
+
message={`Tone: ${tone}`}
|
|
83
|
+
tone={tone}
|
|
84
|
+
/>
|
|
85
|
+
</div>
|
|
86
|
+
))}
|
|
87
|
+
</div>
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
```
|
|
91
|
+
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Task Steps
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
A vertical checklist for a multi-step job, such as a deploy or an import, after interior.dev's task
|
|
4
6
|
steps (https://www.interior.dev/docs/task-steps). Steps before `value` show a check, the step at
|
|
5
7
|
`value` spins and shimmers, and later steps wait as dots. Set `failed` to mark the step at `value`
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Warning strip that stays at the top of the dashboard while test mode is on, so nobody mistakes
|
|
4
4
|
test data for live data. It is the app shell's own strip (not an Alert): a centred 12px (Body/Secondary)
|
|
5
|
-
message on a dark strip (`bg-test-banner`: Grey
|
|
5
|
+
message on a 36px dark strip (`bg-test-banner`: Grey 950, the Surface/Inverted fill, and Grey 800 in dark mode), sticky by
|
|
6
6
|
default, with an optional underlined "Switch to live mode" link button and a "Learn more" link. It slides in from above on mount. Pair it with
|
|
7
7
|
`TestModeBadge` next to test-mode records.
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@ import { TestModeBanner, TestModeBadge } from "@dodopayments/ui/test-mode-banner
|
|
|
14
14
|
|
|
15
15
|
Warning strip that stays at the top of the dashboard while test mode is on, so nobody mistakes
|
|
16
16
|
test data for live data. It is the app shell's own strip (not an Alert): a centred 12px (Body/Secondary)
|
|
17
|
-
message on a dark strip (`bg-test-banner`: Grey
|
|
17
|
+
message on a 36px dark strip (`bg-test-banner`: Grey 950, the Surface/Inverted fill, and Grey 800 in dark mode), sticky by
|
|
18
18
|
default, with an optional underlined "Switch to live mode" link button and a "Learn more" link. It slides in from above on mount. Pair it with
|
|
19
19
|
`TestModeBadge` next to test-mode records.
|
|
20
20
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
# Timestamp
|
|
2
2
|
|
|
3
3
|
A timestamp that reveals the exact time on hover, focus or tap: the trigger shows the time in
|
|
4
|
-
`format`, the
|
|
5
|
-
epoch milliseconds. Relative times refresh every 30 seconds. Built on the `
|
|
6
|
-
touch (coarse pointer) devices a tap toggles it
|
|
4
|
+
`format`, the card lists it in the preferred (or device) zone, in UTC, relative to now and as
|
|
5
|
+
epoch milliseconds. Relative times refresh every 30 seconds. Built on the `PreviewCard` primitive; on
|
|
6
|
+
touch (coarse pointer) devices a tap toggles it. The card is not in the tab order, so each row's copy
|
|
7
|
+
button is for a pointer; keyboard and screen-reader users get every zone from the trigger's own text.
|
|
7
8
|
|
|
8
9
|
```tsx
|
|
9
10
|
import { Timestamp, TimeZoneProvider } from "@dodopayments/ui/timestamp";
|
|
@@ -12,9 +13,10 @@ import { Timestamp, TimeZoneProvider } from "@dodopayments/ui/timestamp";
|
|
|
12
13
|
## Timestamp
|
|
13
14
|
|
|
14
15
|
A timestamp that reveals the exact time on hover, focus or tap: the trigger shows the time in
|
|
15
|
-
`format`, the
|
|
16
|
-
epoch milliseconds. Relative times refresh every 30 seconds. Built on the `
|
|
17
|
-
touch (coarse pointer) devices a tap toggles it
|
|
16
|
+
`format`, the card lists it in the preferred (or device) zone, in UTC, relative to now and as
|
|
17
|
+
epoch milliseconds. Relative times refresh every 30 seconds. Built on the `PreviewCard` primitive; on
|
|
18
|
+
touch (coarse pointer) devices a tap toggles it. The card is not in the tab order, so each row's copy
|
|
19
|
+
button is for a pointer; keyboard and screen-reader users get every zone from the trigger's own text.
|
|
18
20
|
|
|
19
21
|
| Prop | Type | Default | Description |
|
|
20
22
|
| --- | --- | --- | --- |
|
|
@@ -23,8 +25,6 @@ touch (coarse pointer) devices a tap toggles it, since primitive tooltips open o
|
|
|
23
25
|
| `labels` | `TimestampLabels` | - | Labels of the UTC, relative and timestamp rows. |
|
|
24
26
|
| `timeZone` | `string` | - | IANA time zone (e.g. "Asia/Kolkata") for the trigger and the first tooltip row, over the nearest `TimeZoneProvider`'s. When neither is set or valid, the trigger uses UTC and the first row uses the device's zone. |
|
|
25
27
|
|
|
26
|
-
Also accepts Base UI props: `className`, `closeDelay`, `closeOnClick`, `delay`, `disabled`, `handle`, `payload`.
|
|
27
|
-
|
|
28
28
|
## TimeZoneProvider
|
|
29
29
|
|
|
30
30
|
Sets the time zone of every `Timestamp` inside it (and the components built on it, such as the
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Typing Indicator
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
A chat bubble with three dots that ripple while someone types, and an "is typing" label, after
|
|
4
6
|
interior.dev's typing indicator (https://www.interior.dev/docs/typing-indicator). The bubble grows in
|
|
5
7
|
from its bottom corner and shrinks away on send. The label slides between rosters. A polite live region
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Wallet Buttons
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
Express checkout buttons for Apple Pay, Google Pay and Amazon Pay in the brands' black (white in dark mode) style,
|
|
4
6
|
shown only for the wallets in `available`, with an "Or pay another way" divider before the other
|
|
5
7
|
payment methods.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# Wizard Steps
|
|
2
2
|
|
|
3
|
+
> **Deprecated** since 1.8.0.
|
|
4
|
+
|
|
3
5
|
A multi-step form with a numbered rail, a sliding panel and Back / Next buttons, after interior.dev's
|
|
4
6
|
wizard steps (https://www.interior.dev/docs/wizard-steps). The panel slides in the direction of travel.
|
|
5
7
|
As a step finishes its connector fills (`duration-slow`) and its check draws (`duration-very-slow`
|
|
@@ -46,24 +46,33 @@ Import each part from its subpath:
|
|
|
46
46
|
A chart root finds its children by component type. Put the parts directly inside the root (you can
|
|
47
47
|
use a fragment). Do not wrap them in your own components.
|
|
48
48
|
|
|
49
|
+
## Deprecated charts
|
|
50
|
+
|
|
51
|
+
Since 1.8.0 these are deprecated, because the Dodo products use them on fewer than three features: Area, Bar,
|
|
52
|
+
Composed, Scatter, Pie, Ring, Sunburst, Radar, Gauge, Funnel, Heatmap and Sankey charts, and Chart legend. They
|
|
53
|
+
still work, but do not choose them for new UI; the table below marks them "(deprecated)". Prefer `LineChart`,
|
|
54
|
+
`ChoroplethChart`, `RetentionMatrix` and `ComparisonBars`, and the compact `Legend` parts for a legend. If a screen
|
|
55
|
+
needs one of the deprecated charts, check with the design system owners first. `npx dodo-ui doc <Chart>` shows the
|
|
56
|
+
current status.
|
|
57
|
+
|
|
49
58
|
## Choose the chart
|
|
50
59
|
|
|
51
60
|
| You need to show | Use | Not |
|
|
52
61
|
| --- | --- | --- |
|
|
53
|
-
| One or a few metrics over time, with volume | `AreaChart` | `BarChart` with 90 thin bars |
|
|
62
|
+
| One or a few metrics over time, with volume | `AreaChart` (deprecated) | `BarChart` with 90 thin bars |
|
|
54
63
|
| Several metrics over time, to compare trends | `LineChart` | Stacked areas that hide each other |
|
|
55
64
|
| Gain and loss over time around zero | `LineChart` with `ProfitLossLine` | Two separate series |
|
|
56
|
-
| Values per category or per month | `BarChart` (`orientation="horizontal"` for long labels) | `PieChart` |
|
|
57
|
-
| Different kinds of series on one time axis (orders as columns, revenue as a line) | `ComposedChart` | Two charts stacked on top of each other |
|
|
58
|
-
| The relation between two values per day | `ScatterChart` | `LineChart` |
|
|
59
|
-
| Parts of one total, 5 parts or fewer | `PieChart` (donut with `innerRadius`) | A pie with 12 slices |
|
|
60
|
-
| Progress of several items toward their own target | `RingChart` | A pie |
|
|
61
|
-
| A hierarchy (region, then country, then method) | `SunburstChart` | Nested pies |
|
|
62
|
-
| Several series over the same set of metrics | `RadarChart` | A bar chart with many groups |
|
|
63
|
-
| One value against a limit (usage of a plan cap) | `GaugeChart` | A pie with two slices |
|
|
64
|
-
| How many reach each step of a flow (checkout) | `FunnelChart` | A bar chart |
|
|
65
|
-
| A daily count over weeks or months | `HeatmapChart` | A 180-bar chart |
|
|
66
|
-
| Where an amount goes (gross volume into fees, refunds, payouts) | `SankeyChart` | A stacked bar |
|
|
65
|
+
| Values per category or per month | `BarChart` (deprecated) (`orientation="horizontal"` for long labels) | `PieChart` |
|
|
66
|
+
| Different kinds of series on one time axis (orders as columns, revenue as a line) | `ComposedChart` (deprecated) | Two charts stacked on top of each other |
|
|
67
|
+
| The relation between two values per day | `ScatterChart` (deprecated) | `LineChart` |
|
|
68
|
+
| Parts of one total, 5 parts or fewer | `PieChart` (deprecated) (donut with `innerRadius`) | A pie with 12 slices |
|
|
69
|
+
| Progress of several items toward their own target | `RingChart` (deprecated) | A pie |
|
|
70
|
+
| A hierarchy (region, then country, then method) | `SunburstChart` (deprecated) | Nested pies |
|
|
71
|
+
| Several series over the same set of metrics | `RadarChart` (deprecated) | A bar chart with many groups |
|
|
72
|
+
| One value against a limit (usage of a plan cap) | `GaugeChart` (deprecated) | A pie with two slices |
|
|
73
|
+
| How many reach each step of a flow (checkout) | `FunnelChart` (deprecated) | A bar chart |
|
|
74
|
+
| A daily count over weeks or months | `HeatmapChart` (deprecated) | A 180-bar chart |
|
|
75
|
+
| Where an amount goes (gross volume into fees, refunds, payouts) | `SankeyChart` (deprecated) | A stacked bar |
|
|
67
76
|
| A value per country or region | `ChoroplethChart` | A table of 200 rows only |
|
|
68
77
|
| How many customers of each monthly cohort stay active (user retention) | `RetentionMatrix` | A `HeatmapChart` with cohorts as weekdays |
|
|
69
78
|
| Categories against the previous period (payments by outcome, revenue by product) | `ComparisonBars` | A grouped `BarChart` of two periods |
|