@dodopayments/ui 1.4.0 → 1.6.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/ai/component-registry.json +1258 -257
- package/ai/component-registry.md +5 -1
- package/ai/components/area-chart.md +4 -4
- package/ai/components/avatar.md +1 -1
- package/ai/components/badge.md +24 -0
- package/ai/components/bar-chart.md +18 -18
- package/ai/components/brand-logos.md +1 -1
- package/ai/components/button.md +24 -1
- package/ai/components/chart-tooltip.md +3 -3
- package/ai/components/chart.md +6 -6
- package/ai/components/checkout-page.md +1 -1
- package/ai/components/collapsible.md +1 -1
- package/ai/components/color-input.md +1 -1
- package/ai/components/composed-chart.md +7 -7
- package/ai/components/copyable-id.md +1 -0
- package/ai/components/country-select.md +1 -0
- package/ai/components/currency-select.md +1 -0
- package/ai/components/data-grid.md +92 -2
- package/ai/components/date-picker.md +1 -1
- package/ai/components/dialog.md +4 -2
- package/ai/components/drawer.md +292 -0
- package/ai/components/featured-icon.md +1 -0
- package/ai/components/field.md +1 -1
- package/ai/components/file-upload.md +1 -1
- package/ai/components/filter-grid.md +4 -7
- package/ai/components/funnel-chart.md +14 -12
- package/ai/components/gauge-chart.md +9 -11
- package/ai/components/icon-morph.md +1 -1
- package/ai/components/image-crop.md +89 -0
- package/ai/components/input-group.md +1 -1
- package/ai/components/input.md +43 -2
- package/ai/components/invoice-document.md +182 -0
- package/ai/components/line-chart.md +2 -2
- package/ai/components/load-more.md +1 -1
- package/ai/components/logo.md +1 -1
- package/ai/components/menu.md +10 -9
- package/ai/components/milestone.md +1 -1
- package/ai/components/money.md +3 -3
- package/ai/components/new-items-pill.md +1 -1
- package/ai/components/payment-logos.md +1 -1
- package/ai/components/pie-chart.md +11 -2
- package/ai/components/popover.md +2 -1
- package/ai/components/reorder-list.md +46 -1
- package/ai/components/ring-chart.md +17 -8
- package/ai/components/sale-share-card.md +48 -0
- package/ai/components/sankey-chart.md +23 -23
- package/ai/components/scaled-frame.md +1 -1
- package/ai/components/select.md +29 -2
- package/ai/components/setup-guide.md +1 -1
- package/ai/components/sidebar.md +2 -2
- package/ai/components/stat-card.md +32 -5
- package/ai/components/sunburst-chart.md +7 -4
- package/ai/components/tabs.md +39 -0
- package/ai/components/test-mode-banner.md +6 -3
- package/ai/components/timestamp.md +11 -2
- package/ai/components/timezone-select.md +1 -0
- package/ai/skills/dodo-charts/SKILL.md +12 -7
- package/ai/skills/dodo-design/SKILL.md +17 -7
- package/dist/components/avatar/avatar.d.ts +9 -7
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +9 -7
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/badge/badge.d.ts +12 -0
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +23 -4
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/brand-logos/brand-artwork.d.ts +30 -1
- package/dist/components/brand-logos/brand-artwork.d.ts.map +1 -1
- package/dist/components/brand-logos/brand-artwork.js +30 -1
- package/dist/components/brand-logos/brand-artwork.js.map +1 -1
- package/dist/components/brand-logos/brand-logos.d.ts +2 -2
- package/dist/components/brand-logos/brand-logos.d.ts.map +1 -1
- package/dist/components/brand-logos/brand-logos.js +11 -1
- package/dist/components/brand-logos/brand-logos.js.map +1 -1
- package/dist/components/button/button.d.ts +12 -0
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +8 -0
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/card/card-notice.d.ts.map +1 -1
- package/dist/components/card/card-notice.js +1 -1
- package/dist/components/card/card-notice.js.map +1 -1
- package/dist/components/code-block/code-block.d.ts.map +1 -1
- package/dist/components/code-block/code-block.js +3 -1
- package/dist/components/code-block/code-block.js.map +1 -1
- package/dist/components/comparison-bars/comparison-bars.js +2 -2
- package/dist/components/comparison-bars/comparison-bars.js.map +1 -1
- package/dist/components/copyable-id/copyable-id.d.ts +7 -1
- package/dist/components/copyable-id/copyable-id.d.ts.map +1 -1
- package/dist/components/copyable-id/copyable-id.js +21 -3
- package/dist/components/copyable-id/copyable-id.js.map +1 -1
- package/dist/components/country-select/country-select.d.ts +6 -1
- package/dist/components/country-select/country-select.d.ts.map +1 -1
- package/dist/components/country-select/country-select.js +2 -2
- package/dist/components/country-select/country-select.js.map +1 -1
- package/dist/components/currency-select/currency-select.d.ts +6 -1
- package/dist/components/currency-select/currency-select.d.ts.map +1 -1
- package/dist/components/currency-select/currency-select.js +2 -2
- package/dist/components/currency-select/currency-select.js.map +1 -1
- package/dist/components/data-grid/bulk-actions.js +2 -2
- package/dist/components/data-grid/bulk-actions.js.map +1 -1
- package/dist/components/data-grid/data-grid.d.ts +17 -2
- package/dist/components/data-grid/data-grid.d.ts.map +1 -1
- package/dist/components/data-grid/data-grid.js +111 -9
- package/dist/components/data-grid/data-grid.js.map +1 -1
- package/dist/components/data-grid/table.d.ts.map +1 -1
- package/dist/components/data-grid/table.js +5 -0
- package/dist/components/data-grid/table.js.map +1 -1
- package/dist/components/date-picker/date-picker.js +2 -2
- package/dist/components/date-picker/date-picker.js.map +1 -1
- package/dist/components/dialog/dialog.d.ts +12 -4
- package/dist/components/dialog/dialog.d.ts.map +1 -1
- package/dist/components/dialog/dialog.js +46 -7
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/drawer/drawer.d.ts +73 -0
- package/dist/components/drawer/drawer.d.ts.map +1 -0
- package/dist/components/drawer/drawer.js +56 -0
- package/dist/components/drawer/drawer.js.map +1 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/index.d.ts.map +1 -0
- package/dist/components/drawer/index.js +2 -0
- package/dist/components/drawer/index.js.map +1 -0
- package/dist/components/featured-icon/featured-icon.d.ts +103 -1
- package/dist/components/featured-icon/featured-icon.d.ts.map +1 -1
- package/dist/components/featured-icon/featured-icon.js +61 -3
- package/dist/components/featured-icon/featured-icon.js.map +1 -1
- package/dist/components/featured-icon/index.d.ts +1 -1
- package/dist/components/featured-icon/index.d.ts.map +1 -1
- package/dist/components/featured-icon/index.js +1 -1
- package/dist/components/featured-icon/index.js.map +1 -1
- package/dist/components/featured-icon/sphere.d.ts +7 -0
- package/dist/components/featured-icon/sphere.d.ts.map +1 -0
- package/dist/components/featured-icon/sphere.js +29 -0
- package/dist/components/featured-icon/sphere.js.map +1 -0
- package/dist/components/file-upload/file-upload.js +1 -1
- package/dist/components/file-upload/file-upload.js.map +1 -1
- package/dist/components/filter-grid/filter-grid.d.ts +7 -2
- package/dist/components/filter-grid/filter-grid.d.ts.map +1 -1
- package/dist/components/filter-grid/filter-grid.js +3 -2
- package/dist/components/filter-grid/filter-grid.js.map +1 -1
- package/dist/components/funnel-chart/funnel-chart.d.ts +3 -2
- package/dist/components/funnel-chart/funnel-chart.d.ts.map +1 -1
- package/dist/components/funnel-chart/funnel-chart.js +3 -2
- package/dist/components/funnel-chart/funnel-chart.js.map +1 -1
- package/dist/components/gauge-chart/gauge-chart.d.ts +3 -4
- package/dist/components/gauge-chart/gauge-chart.d.ts.map +1 -1
- package/dist/components/gauge-chart/gauge-chart.js +3 -4
- package/dist/components/gauge-chart/gauge-chart.js.map +1 -1
- package/dist/components/image-crop/crop-math.d.ts +28 -0
- package/dist/components/image-crop/crop-math.d.ts.map +1 -0
- package/dist/components/image-crop/crop-math.js +53 -0
- package/dist/components/image-crop/crop-math.js.map +1 -0
- package/dist/components/image-crop/image-crop.d.ts +31 -0
- package/dist/components/image-crop/image-crop.d.ts.map +1 -0
- package/dist/components/image-crop/image-crop.js +165 -0
- package/dist/components/image-crop/image-crop.js.map +1 -0
- package/dist/components/image-crop/index.d.ts +2 -0
- package/dist/components/image-crop/index.d.ts.map +1 -0
- package/dist/components/image-crop/index.js +2 -0
- package/dist/components/image-crop/index.js.map +1 -0
- package/dist/components/input/input.d.ts +8 -2
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +12 -3
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/input-group/input-group.d.ts +1 -1
- package/dist/components/input-group/input-group.js +1 -1
- package/dist/components/input-group/input-group.js.map +1 -1
- package/dist/components/invoice-document/index.d.ts +2 -0
- package/dist/components/invoice-document/index.d.ts.map +1 -0
- package/dist/components/invoice-document/index.js +2 -0
- package/dist/components/invoice-document/index.js.map +1 -0
- package/dist/components/invoice-document/invoice-document.d.ts +180 -0
- package/dist/components/invoice-document/invoice-document.d.ts.map +1 -0
- package/dist/components/invoice-document/invoice-document.js +58 -0
- package/dist/components/invoice-document/invoice-document.js.map +1 -0
- package/dist/components/list-item/list-item.d.ts +2 -2
- package/dist/components/list-item/list-item.d.ts.map +1 -1
- package/dist/components/list-item/list-item.js +3 -3
- package/dist/components/list-item/list-item.js.map +1 -1
- package/dist/components/list-toolbar/list-toolbar-date-range.js +1 -1
- package/dist/components/list-toolbar/list-toolbar-date-range.js.map +1 -1
- package/dist/components/live-activity/live-activity.d.ts.map +1 -1
- package/dist/components/live-activity/live-activity.js +8 -3
- package/dist/components/live-activity/live-activity.js.map +1 -1
- package/dist/components/logo/logo.d.ts +5 -1
- package/dist/components/logo/logo.d.ts.map +1 -1
- package/dist/components/logo/logo.js +7 -3
- package/dist/components/logo/logo.js.map +1 -1
- package/dist/components/menu/menu.d.ts +10 -9
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/menu/menu.js +5 -4
- package/dist/components/menu/menu.js.map +1 -1
- package/dist/components/page-header/page-header.d.ts.map +1 -1
- package/dist/components/page-header/page-header.js +6 -6
- package/dist/components/page-header/page-header.js.map +1 -1
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- package/dist/components/pagination/pagination.js +4 -2
- package/dist/components/pagination/pagination.js.map +1 -1
- package/dist/components/payment-logos/artwork/link.d.ts +2 -0
- package/dist/components/payment-logos/artwork/link.d.ts.map +1 -0
- package/dist/components/payment-logos/artwork/link.js +5 -0
- package/dist/components/payment-logos/artwork/link.js.map +1 -0
- package/dist/components/payment-logos/payment-logos.d.ts +1 -1
- package/dist/components/payment-logos/payment-logos.d.ts.map +1 -1
- package/dist/components/payment-logos/payment-logos.js +3 -0
- package/dist/components/payment-logos/payment-logos.js.map +1 -1
- package/dist/components/payment-method-list/payment-method-list.d.ts.map +1 -1
- package/dist/components/payment-method-list/payment-method-list.js +4 -1
- package/dist/components/payment-method-list/payment-method-list.js.map +1 -1
- package/dist/components/popover/popover.d.ts +7 -0
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/quantity-stepper/quantity-stepper.js +1 -1
- package/dist/components/quantity-stepper/quantity-stepper.js.map +1 -1
- package/dist/components/radio-group/radio-group.js +2 -2
- package/dist/components/radio-group/radio-group.js.map +1 -1
- package/dist/components/reorder-list/reorder-list.d.ts +11 -2
- package/dist/components/reorder-list/reorder-list.d.ts.map +1 -1
- package/dist/components/reorder-list/reorder-list.js +39 -16
- package/dist/components/reorder-list/reorder-list.js.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/components/sale-share-card/index.d.ts +2 -0
- package/dist/components/sale-share-card/index.d.ts.map +1 -0
- package/dist/components/sale-share-card/index.js +2 -0
- package/dist/components/sale-share-card/index.js.map +1 -0
- package/dist/components/sale-share-card/sale-share-card.d.ts +27 -0
- package/dist/components/sale-share-card/sale-share-card.d.ts.map +1 -0
- package/dist/components/sale-share-card/sale-share-card.js +46 -0
- package/dist/components/sale-share-card/sale-share-card.js.map +1 -0
- package/dist/components/sankey-chart/sankey-chart.d.ts +4 -4
- package/dist/components/sankey-chart/sankey-chart.js +4 -4
- package/dist/components/scaled-frame/scaled-frame.d.ts +6 -2
- package/dist/components/scaled-frame/scaled-frame.d.ts.map +1 -1
- package/dist/components/scaled-frame/scaled-frame.js +20 -1
- package/dist/components/scaled-frame/scaled-frame.js.map +1 -1
- package/dist/components/segmented-control/segmented-control.d.ts +2 -2
- package/dist/components/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/components/segmented-control/segmented-control.js +10 -2
- package/dist/components/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/select/select.d.ts +21 -3
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +24 -9
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/sidebar/sidebar.d.ts +2 -2
- package/dist/components/sidebar/sidebar.js +2 -2
- package/dist/components/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton/skeleton.js +7 -7
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/slider/slider-thumb.d.ts +2 -2
- package/dist/components/slider/slider-thumb.d.ts.map +1 -1
- package/dist/components/slider/slider-thumb.js +2 -2
- package/dist/components/slider/slider-thumb.js.map +1 -1
- package/dist/components/slider/slider.js +1 -1
- package/dist/components/slider/slider.js.map +1 -1
- package/dist/components/stat-card/index.d.ts +1 -1
- package/dist/components/stat-card/index.d.ts.map +1 -1
- package/dist/components/stat-card/index.js +1 -1
- package/dist/components/stat-card/index.js.map +1 -1
- package/dist/components/stat-card/stat-card.d.ts +47 -7
- package/dist/components/stat-card/stat-card.d.ts.map +1 -1
- package/dist/components/stat-card/stat-card.js +72 -12
- package/dist/components/stat-card/stat-card.js.map +1 -1
- package/dist/components/subscription-card/subscription-card.js +1 -1
- package/dist/components/subscription-card/subscription-card.js.map +1 -1
- package/dist/components/sunburst-chart/sunburst-chart.d.ts +2 -1
- package/dist/components/sunburst-chart/sunburst-chart.d.ts.map +1 -1
- package/dist/components/sunburst-chart/sunburst-chart.js +2 -1
- package/dist/components/sunburst-chart/sunburst-chart.js.map +1 -1
- package/dist/components/tabs/tabs.d.ts +30 -1
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +14 -4
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/test-mode-banner/test-mode-banner.d.ts.map +1 -1
- package/dist/components/test-mode-banner/test-mode-banner.js +3 -2
- package/dist/components/test-mode-banner/test-mode-banner.js.map +1 -1
- package/dist/components/timestamp/index.d.ts +1 -1
- package/dist/components/timestamp/index.d.ts.map +1 -1
- package/dist/components/timestamp/index.js +1 -1
- package/dist/components/timestamp/index.js.map +1 -1
- package/dist/components/timestamp/timestamp.d.ts +12 -2
- package/dist/components/timestamp/timestamp.d.ts.map +1 -1
- package/dist/components/timestamp/timestamp.js +12 -2
- package/dist/components/timestamp/timestamp.js.map +1 -1
- package/dist/components/timezone-select/timezone-select.d.ts +6 -1
- package/dist/components/timezone-select/timezone-select.d.ts.map +1 -1
- package/dist/components/timezone-select/timezone-select.js +2 -2
- package/dist/components/timezone-select/timezone-select.js.map +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/icons/index.d.ts +9 -0
- package/dist/icons/index.js +9 -0
- package/dist/icons/ui/arrow-turn-right.d.ts +3 -0
- package/dist/icons/ui/arrow-turn-right.d.ts.map +1 -0
- package/dist/icons/ui/arrow-turn-right.js +5 -0
- package/dist/icons/ui/arrow-turn-right.js.map +1 -0
- package/dist/icons/ui/box-glyph.d.ts +3 -0
- package/dist/icons/ui/box-glyph.js +5 -0
- package/dist/icons/ui/circle-check-glyph.d.ts +3 -0
- package/dist/icons/ui/circle-check-glyph.js +5 -0
- package/dist/icons/ui/crop.d.ts +3 -0
- package/dist/icons/ui/crop.d.ts.map +1 -0
- package/dist/icons/ui/crop.js +5 -0
- package/dist/icons/ui/crop.js.map +1 -0
- package/dist/icons/ui/greek-temple-glyph.d.ts +3 -0
- package/dist/icons/ui/greek-temple-glyph.js +5 -0
- package/dist/icons/ui/hourglass-glyph.d.ts +3 -0
- package/dist/icons/ui/hourglass-glyph.js +5 -0
- package/dist/icons/ui/shop-glyph.d.ts +3 -0
- package/dist/icons/ui/shop-glyph.js +5 -0
- package/dist/icons/ui/triangle-warning-glyph.d.ts +3 -0
- package/dist/icons/ui/triangle-warning-glyph.js +5 -0
- package/dist/icons/ui/user-glyph.d.ts +3 -0
- package/dist/icons/ui/user-glyph.js +5 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/cn-tables.js +5 -5
- package/dist/lib/cn-tables.js.map +1 -1
- package/dist/lib/locale-messages.d.ts +8 -0
- package/dist/lib/locale-messages.d.ts.map +1 -1
- package/dist/lib/locale-messages.js +9 -0
- package/dist/lib/locale-messages.js.map +1 -1
- package/dist/locales/ar.d.ts.map +1 -1
- package/dist/locales/ar.js +6 -0
- package/dist/locales/ar.js.map +1 -1
- package/dist/locales/de.d.ts.map +1 -1
- package/dist/locales/de.js +6 -0
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/es.d.ts.map +1 -1
- package/dist/locales/es.js +6 -0
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/fr.d.ts.map +1 -1
- package/dist/locales/fr.js +6 -0
- package/dist/locales/fr.js.map +1 -1
- package/dist/locales/he.d.ts.map +1 -1
- package/dist/locales/he.js +6 -0
- package/dist/locales/he.js.map +1 -1
- package/dist/locales/hi.d.ts.map +1 -1
- package/dist/locales/hi.js +6 -0
- package/dist/locales/hi.js.map +1 -1
- package/dist/locales/ja.d.ts.map +1 -1
- package/dist/locales/ja.js +6 -0
- package/dist/locales/ja.js.map +1 -1
- package/dist/locales/pt-BR.d.ts.map +1 -1
- package/dist/locales/pt-BR.js +6 -0
- package/dist/locales/pt-BR.js.map +1 -1
- package/dist/locales/zh-CN.d.ts.map +1 -1
- package/dist/locales/zh-CN.js +6 -0
- package/dist/locales/zh-CN.js.map +1 -1
- package/dist/primitives/charts/area-chart.js +1 -1
- package/dist/primitives/charts/area-chart.js.map +1 -1
- package/dist/primitives/charts/area.d.ts +1 -1
- package/dist/primitives/charts/area.d.ts.map +1 -1
- package/dist/primitives/charts/bar-chart.js +1 -1
- package/dist/primitives/charts/bar-chart.js.map +1 -1
- package/dist/primitives/charts/bar-squares.d.ts +1 -1
- package/dist/primitives/charts/bar-squares.d.ts.map +1 -1
- package/dist/primitives/charts/bar.d.ts +6 -5
- package/dist/primitives/charts/bar.d.ts.map +1 -1
- package/dist/primitives/charts/bar.js +1 -1
- package/dist/primitives/charts/bar.js.map +1 -1
- package/dist/primitives/charts/chart-context.js +2 -2
- package/dist/primitives/charts/chart-context.js.map +1 -1
- package/dist/primitives/charts/composed-chart.js +3 -3
- package/dist/primitives/charts/composed-chart.js.map +1 -1
- package/dist/primitives/charts/funnel-chart.d.ts +12 -8
- package/dist/primitives/charts/funnel-chart.d.ts.map +1 -1
- package/dist/primitives/charts/funnel-chart.js +38 -9
- package/dist/primitives/charts/funnel-chart.js.map +1 -1
- package/dist/primitives/charts/gauge.d.ts +4 -4
- package/dist/primitives/charts/gauge.js +8 -8
- package/dist/primitives/charts/gauge.js.map +1 -1
- package/dist/primitives/charts/line-chart.js +1 -1
- package/dist/primitives/charts/line-chart.js.map +1 -1
- package/dist/primitives/charts/line-series-terminal-marker.d.ts.map +1 -1
- package/dist/primitives/charts/line-series-terminal-marker.js +1 -1
- package/dist/primitives/charts/line-series-terminal-marker.js.map +1 -1
- package/dist/primitives/charts/line.d.ts +1 -1
- package/dist/primitives/charts/line.d.ts.map +1 -1
- package/dist/primitives/charts/notch-gauge-shared.d.ts.map +1 -1
- package/dist/primitives/charts/notch-gauge-shared.js +4 -3
- package/dist/primitives/charts/notch-gauge-shared.js.map +1 -1
- package/dist/primitives/charts/pie-context.d.ts +3 -2
- package/dist/primitives/charts/pie-context.d.ts.map +1 -1
- package/dist/primitives/charts/pie-context.js +7 -6
- package/dist/primitives/charts/pie-context.js.map +1 -1
- package/dist/primitives/charts/pie-slice.d.ts +2 -2
- package/dist/primitives/charts/pie-slice.js +1 -1
- package/dist/primitives/charts/pie-slice.js.map +1 -1
- package/dist/primitives/charts/ring-context.d.ts +4 -2
- package/dist/primitives/charts/ring-context.d.ts.map +1 -1
- package/dist/primitives/charts/ring-context.js +8 -6
- package/dist/primitives/charts/ring-context.js.map +1 -1
- package/dist/primitives/charts/ring.d.ts +8 -8
- package/dist/primitives/charts/ring.d.ts.map +1 -1
- package/dist/primitives/charts/ring.js +4 -4
- package/dist/primitives/charts/ring.js.map +1 -1
- package/dist/primitives/charts/sankey/sankey-link.d.ts +9 -10
- package/dist/primitives/charts/sankey/sankey-link.d.ts.map +1 -1
- package/dist/primitives/charts/sankey/sankey-link.js +14 -9
- package/dist/primitives/charts/sankey/sankey-link.js.map +1 -1
- package/dist/primitives/charts/sankey/sankey-node.d.ts +5 -5
- package/dist/primitives/charts/sankey/sankey-node.d.ts.map +1 -1
- package/dist/primitives/charts/sankey/sankey-node.js +6 -6
- package/dist/primitives/charts/sankey/sankey-node.js.map +1 -1
- package/dist/primitives/charts/series-bar.d.ts +4 -4
- package/dist/primitives/charts/series-bar.d.ts.map +1 -1
- package/dist/primitives/charts/series-bar.js +1 -1
- package/dist/primitives/charts/series-bar.js.map +1 -1
- package/dist/primitives/charts/sunburst-context.d.ts +3 -2
- package/dist/primitives/charts/sunburst-context.d.ts.map +1 -1
- package/dist/primitives/charts/sunburst-context.js +6 -5
- package/dist/primitives/charts/sunburst-context.js.map +1 -1
- package/dist/primitives/charts/sunburst-legend.d.ts +7 -2
- package/dist/primitives/charts/sunburst-legend.d.ts.map +1 -1
- package/dist/primitives/charts/sunburst-legend.js +8 -6
- package/dist/primitives/charts/sunburst-legend.js.map +1 -1
- package/dist/primitives/charts/sunburst-segment.d.ts +3 -3
- package/dist/primitives/charts/sunburst-segment.js +2 -2
- package/dist/primitives/charts/sunburst-segment.js.map +1 -1
- package/dist/primitives/charts/tooltip/date-ticker.js +2 -2
- package/dist/primitives/charts/tooltip/date-ticker.js.map +1 -1
- package/dist/primitives/charts/tooltip/tooltip-box.js +1 -1
- package/dist/primitives/charts/tooltip/tooltip-box.js.map +1 -1
- package/dist/primitives/hooks/use-media-query.d.ts +1 -1
- package/dist/primitives/hooks/use-media-query.js +1 -1
- package/dist/primitives/lib/mobile-sheet.d.ts +25 -0
- package/dist/primitives/lib/mobile-sheet.d.ts.map +1 -0
- package/dist/primitives/lib/mobile-sheet.js +28 -0
- package/dist/primitives/lib/mobile-sheet.js.map +1 -0
- package/dist/primitives/lib/segmented-control.d.ts +8 -2
- package/dist/primitives/lib/segmented-control.d.ts.map +1 -1
- package/dist/primitives/lib/segmented-control.js +8 -2
- package/dist/primitives/lib/segmented-control.js.map +1 -1
- package/dist/primitives/ui/alert-dialog.js +1 -1
- package/dist/primitives/ui/alert-dialog.js.map +1 -1
- package/dist/primitives/ui/autocomplete.js +1 -1
- package/dist/primitives/ui/autocomplete.js.map +1 -1
- package/dist/primitives/ui/button.d.ts +1 -1
- package/dist/primitives/ui/button.d.ts.map +1 -1
- package/dist/primitives/ui/button.js +3 -1
- package/dist/primitives/ui/button.js.map +1 -1
- package/dist/primitives/ui/calendar.d.ts.map +1 -1
- package/dist/primitives/ui/calendar.js +4 -2
- package/dist/primitives/ui/calendar.js.map +1 -1
- package/dist/primitives/ui/checkbox.d.ts.map +1 -1
- package/dist/primitives/ui/checkbox.js +3 -1
- package/dist/primitives/ui/checkbox.js.map +1 -1
- package/dist/primitives/ui/combobox.js +2 -2
- package/dist/primitives/ui/combobox.js.map +1 -1
- package/dist/primitives/ui/dialog.d.ts +7 -0
- package/dist/primitives/ui/dialog.d.ts.map +1 -1
- package/dist/primitives/ui/dialog.js +12 -1
- package/dist/primitives/ui/dialog.js.map +1 -1
- package/dist/primitives/ui/drawer.d.ts +1 -2
- package/dist/primitives/ui/drawer.d.ts.map +1 -1
- package/dist/primitives/ui/drawer.js +30 -14
- package/dist/primitives/ui/drawer.js.map +1 -1
- package/dist/primitives/ui/input-group.d.ts.map +1 -1
- package/dist/primitives/ui/input-group.js +4 -1
- package/dist/primitives/ui/input-group.js.map +1 -1
- package/dist/primitives/ui/input.js +1 -1
- package/dist/primitives/ui/input.js.map +1 -1
- package/dist/primitives/ui/menu.d.ts.map +1 -1
- package/dist/primitives/ui/menu.js +15 -16
- 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 +2 -2
- package/dist/primitives/ui/otp-field.js.map +1 -1
- package/dist/primitives/ui/popover.d.ts +3 -1
- package/dist/primitives/ui/popover.d.ts.map +1 -1
- package/dist/primitives/ui/popover.js +11 -5
- 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.d.ts +7 -3
- package/dist/primitives/ui/select.d.ts.map +1 -1
- package/dist/primitives/ui/select.js +14 -5
- package/dist/primitives/ui/select.js.map +1 -1
- package/dist/primitives/ui/sheet.d.ts.map +1 -1
- package/dist/primitives/ui/sheet.js +5 -4
- package/dist/primitives/ui/sheet.js.map +1 -1
- package/dist/primitives/ui/sidebar.js +1 -1
- package/dist/primitives/ui/slider.js +1 -1
- package/dist/primitives/ui/slider.js.map +1 -1
- package/dist/primitives/ui/switch.d.ts +1 -1
- package/dist/primitives/ui/switch.d.ts.map +1 -1
- package/dist/primitives/ui/switch.js +1 -1
- package/dist/primitives/ui/switch.js.map +1 -1
- package/dist/primitives/ui/tabs.d.ts.map +1 -1
- package/dist/primitives/ui/tabs.js +1 -1
- package/dist/primitives/ui/tabs.js.map +1 -1
- package/dist/primitives/ui/textarea.js +1 -1
- 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/tooltip.js +1 -1
- package/dist/primitives/ui/tooltip.js.map +1 -1
- package/dist/styles/motion.test.tsx +15 -0
- package/dist/styles/theme.css +13 -0
- package/dist/styles/tokens.css +142 -39
- package/dist/styles/tokens.test.tsx +154 -3
- package/dist/theme/color.d.ts +5 -0
- package/dist/theme/color.d.ts.map +1 -1
- package/dist/theme/color.js +22 -0
- package/dist/theme/color.js.map +1 -1
- package/dist/theme/css.d.ts +3 -3
- package/dist/theme/css.d.ts.map +1 -1
- package/dist/theme/css.js +33 -15
- package/dist/theme/css.js.map +1 -1
- package/package.json +1 -1
package/ai/component-registry.md
CHANGED
|
@@ -40,12 +40,14 @@
|
|
|
40
40
|
- **Collapsible** (`@dodopayments/ui/collapsible`, Layout): Shows and hides a section of content: the `Collapsible` primitive on Base UI `Collapsible`. Compose it
|
|
41
41
|
- **Scaled frame** (`@dodopayments/ui/scaled-frame`, Layout): Shows content laid out at a fixed size, scaled down to the width the frame has, e.g. a live checkout
|
|
42
42
|
- **Dialog** (`@dodopayments/ui/dialog`, Overlays): The dialog (Dodo Nest Dialog): portal + scrim + a grey tray around a white panel, with the close button
|
|
43
|
+
- **Drawer** (`@dodopayments/ui/drawer`, Overlays): The drawer: portal + scrim + popup, docked to the bottom edge with a drag handle and a close button. A grey tray
|
|
43
44
|
- **Direction Provider** (`@dodopayments/ui/direction-provider`, Utilities): Sets the reading direction for every component inside: keyboard navigation (arrow keys in menus,
|
|
44
45
|
- **Empty** (`@dodopayments/ui/empty`, Feedback): What a page, card or table shows when there is nothing yet (Dodo Nest Empty state): an optional Featured icon
|
|
45
46
|
- **Field** (`@dodopayments/ui/field`, Forms): Groups a label, description, control and error message and wires them together: the label and
|
|
46
47
|
- **Form** (`@dodopayments/ui/form`, Forms): Native `<form>` (the `Form` primitive on Base UI `Form`) that validates the `Field`s inside it on submit.
|
|
47
48
|
- **Form field** (`@dodopayments/ui/form-field`, Forms): react-hook-form adapter for `Field`. Registers the field through RHF's `Controller` and renders
|
|
48
49
|
- **File Upload** (`@dodopayments/ui/file-upload`, Forms): Dropzone for picking files: click (or Enter / Space) opens the file picker, and files can be
|
|
50
|
+
- **Image Crop** (`@dodopayments/ui/image-crop`, Forms): Crops a picked image before it is uploaded, as the dashboard's image fields do (main's ImageUpload): the
|
|
49
51
|
- **Grid** (`@dodopayments/ui/grid`, Layout): Composite (the primitives have no Grid): layout only, on the Tailwind spacing scale.
|
|
50
52
|
- **Copyable ID** (`@dodopayments/ui/copyable-id`, Data display): An ID or secret the merchant can copy, in Geist Mono 12: the Dodo Nest Copyable ID. `inline` (default) for rails,
|
|
51
53
|
- **Money** (`@dodopayments/ui/money`, Data display): A formatted amount from integer minor units and an ISO 4217 code: the decimals follow the
|
|
@@ -64,7 +66,7 @@
|
|
|
64
66
|
- **Pagination** (`@dodopayments/ui/pagination`, Navigation): Moves through the rows of a table (Dodo Nest Pagination): an optional "Rows per page" select, the
|
|
65
67
|
- **App top bar** (`@dodopayments/ui/app-top-bar`, Navigation): The bar at the top of every dashboard page (Dodo Nest App top bar): search on the left (opens the Command
|
|
66
68
|
- **Radio Group** (`@dodopayments/ui/radio-group`, Forms): A set of mutually exclusive options: exactly one `Radio` can be selected. Built on the primitives
|
|
67
|
-
- **Select** (`@dodopayments/ui/select`, Forms): The field (Figma `container`) that opens the list: put a `SelectValue` inside.
|
|
69
|
+
- **Select** (`@dodopayments/ui/select`, Forms): The field (Figma `container`) that opens the list: put a `SelectValue` inside. 36 tall, or 28 with `size="sm"`; the caret turns up
|
|
68
70
|
- **Sheet** (`@dodopayments/ui/sheet`, Overlays): The sheet (Dodo Nest Sheet): portal + scrim + popup + close button, sliding in from the end of the reading
|
|
69
71
|
- **Sidebar** (`@dodopayments/ui/sidebar`, Navigation): The app sidebar (Dodo Nest Sidebar), on the `Sidebar` primitive. From 1024px it docks to the start edge (the
|
|
70
72
|
- **Skeleton** (`@dodopayments/ui/skeleton`, Feedback): A grey placeholder shown while content loads (Dodo Nest Skeleton), sized like the thing it replaces: `shape="line"`
|
|
@@ -83,6 +85,7 @@
|
|
|
83
85
|
- **List toolbar** (`@dodopayments/ui/list-toolbar`, Data display): The row above every Data table (Dodo Nest List toolbar): search, a count or a Refresh button on the left, every
|
|
84
86
|
- **Leaderboard** (`@dodopayments/ui/leaderboard`, Data display): Top customers by spend (Dodo Nest Leaderboard): a podium of the top three (one joined block of white cells
|
|
85
87
|
- **Milestone** (`@dodopayments/ui/milestone`, Data display): A milestone on the Milestones page (Design File › Merchant Milestones). `state="achieved"` is a reached milestone:
|
|
88
|
+
- **Sale share card** (`@dodopayments/ui/sale-share-card`, Data display): A new sale as an image to share (the dashboard's payments list, Share): 720 by 400, the artwork behind, the
|
|
86
89
|
- **Setup guide** (`@dodopayments/ui/setup-guide`, Feedback): The setup guide a new business follows (the dashboard's Setup guide, opened from the top bar's Setup guide
|
|
87
90
|
- **Filter Grid** (`@dodopayments/ui/filter-grid`, Data display): Filter chips over a grid of cards, after interior.dev's filter grid
|
|
88
91
|
- **Live Activity** (`@dodopayments/ui/live-activity`, Feedback): A small pod that reports one background task, like a phone's live activity, after interior.dev's
|
|
@@ -99,6 +102,7 @@
|
|
|
99
102
|
- **Page header** (`@dodopayments/ui/page-header`, Navigation): The title row at the top of every dashboard page (Dodo Nest Page header). `size="sm"` shrinks the title and
|
|
100
103
|
- **Order Summary** (`@dodopayments/ui/order-summary`, Blocks): Checkout order summary, ported from the checkout and the customer portal: product rows
|
|
101
104
|
- **Details Panel** (`@dodopayments/ui/details-panel`, Blocks): Read-only facts of a record as labelled values grouped in sections, ported from the dashboard's
|
|
105
|
+
- **Invoice Document** (`@dodopayments/ui/invoice-document`, Blocks): An invoice as its PDF prints, ported from the dashboard's invoice preview: A4 at 72 dpi (595 wide,
|
|
102
106
|
- **Payment Result** (`@dodopayments/ui/payment-result`, Blocks): Receipt card for the page a customer lands on after paying, ported from the checkout status page:
|
|
103
107
|
- **Subscription Card** (`@dodopayments/ui/subscription-card`, Blocks): A customer's subscription in the customer portal: name, add-ons and business, the payment method in the top
|
|
104
108
|
- **Payment Method List** (`@dodopayments/ui/payment-method-list`, Blocks): Card listing saved payment methods or bank accounts, after the customer portal's payment methods
|
|
@@ -56,7 +56,7 @@ While the chart loads it draws the loading pulse or sweep.
|
|
|
56
56
|
| `dashArray` | `string` | - | Dash pattern for the tail segment when `dashFromIndex` is set. Default: "6,4" |
|
|
57
57
|
| `dashFromIndex` | `number` | - | Data index from which the line stroke becomes dashed (inclusive). Useful for projecting incomplete periods, e.g. dashed from yesterday through today. |
|
|
58
58
|
| `fadeEdges` | `FadeEdges` | - | Fade the area fill (and stroke) toward transparent at the chart edges. - `true` fades both edges, `false` disables the fade entirely. - `"left"` / `"right"` fades only that side: useful when the opposite edge butts up against another element you don't want to fade into. Default: false |
|
|
59
|
-
| `fill` | `string` | - | Fill color for the area gradient start. Default: var(--chart-1) |
|
|
59
|
+
| `fill` | `string` | - | Fill color for the area gradient start. Default: var(--chart-solid-1) |
|
|
60
60
|
| `fillOpacity` | `number` | - | Fill opacity at the top of the area. Default: 0.4 |
|
|
61
61
|
| `gradientSpan` | `number` | - | Vertical extent of the fill gradient (0–1). `1` fades across the full height; lower values compress the gradient toward the top. |
|
|
62
62
|
| `gradientToOpacity` | `number` | - | Gradient opacity at bottom (0 = fully transparent). Default: 0 |
|
|
@@ -146,7 +146,7 @@ export default function AreaChartDefault() {
|
|
|
146
146
|
<YAxis formatValue={(value) => usdCompact.format(value)} />
|
|
147
147
|
<ChartTooltip
|
|
148
148
|
rows={(point) => [
|
|
149
|
-
{ color: "var(--chart-1)", label: "Gross revenue", value: usd.format(point["revenue"] as number) },
|
|
149
|
+
{ color: "var(--chart-solid-1)", label: "Gross revenue", value: usd.format(point["revenue"] as number) },
|
|
150
150
|
]}
|
|
151
151
|
/>
|
|
152
152
|
</AreaChart>
|
|
@@ -220,7 +220,7 @@ const data = Array.from({ length: 13 }, (_, week) => ({
|
|
|
220
220
|
}));
|
|
221
221
|
|
|
222
222
|
const series = [
|
|
223
|
-
{ key: "scale", label: "Scale", color: "var(--chart-1)" },
|
|
223
|
+
{ key: "scale", label: "Scale", color: "var(--chart-solid-1)" },
|
|
224
224
|
{ key: "growth", label: "Growth", color: "var(--chart-2)" },
|
|
225
225
|
{ key: "starter", label: "Starter", color: "var(--chart-3)" },
|
|
226
226
|
] as const;
|
|
@@ -292,7 +292,7 @@ export default function AreaChartReferenceArea() {
|
|
|
292
292
|
patternColor="var(--chart-scale-pattern-color)"
|
|
293
293
|
strokeStyle="dashed"
|
|
294
294
|
/>
|
|
295
|
-
<Area dataKey="checkouts" fill="var(--chart-1)" />
|
|
295
|
+
<Area dataKey="checkouts" fill="var(--chart-solid-1)" />
|
|
296
296
|
<XAxis />
|
|
297
297
|
<ChartTooltip />
|
|
298
298
|
</AreaChart>
|
package/ai/components/avatar.md
CHANGED
|
@@ -28,7 +28,7 @@ Shown while the image loads, when it fails or when there is no image. Renders th
|
|
|
28
28
|
| Prop | Type | Default | Description |
|
|
29
29
|
| --- | --- | --- | --- |
|
|
30
30
|
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
31
|
-
| `color` | `"auto" \| "neutral" \| "blue" \| "purple" \| "pink" \| "lime"` | `"auto"` | `auto`: Picks blue, purple, pink or lime from the name's initials, so a name always gets the same colour.<br>`neutral`: Grey: Surface/Tertiary with Content/Primary initials. Never picked by `auto`; set it where colour would distract.<br>`blue`: The `info` tone: a soft blue fill with blue initials.<br>`purple`: The
|
|
31
|
+
| `color` | `"auto" \| "neutral" \| "blue" \| "purple" \| "pink" \| "lime"` | `"auto"` | `auto`: Picks blue, purple, pink or lime from the name's initials, so a name always gets the same colour.<br>`neutral`: Grey: Surface/Tertiary with Content/Primary initials. Never picked by `auto`; set it where colour would distract.<br>`blue`: The `info` tone: a soft blue fill with blue initials.<br>`purple`: The violet category tone: a soft violet fill with violet initials.<br>`pink`: The pink category tone: a soft pink fill with pink initials.<br>`lime`: The `success` tone: a soft green fill with green initials. |
|
|
32
32
|
| `name` | `string` | - | Full name, always read by screen readers (also when `children` replace the initials). Without `children`, its initials (first and last word) are shown. |
|
|
33
33
|
| `singleInitials` | `boolean` | `false` | Show only the first initial. |
|
|
34
34
|
|
package/ai/components/badge.md
CHANGED
|
@@ -23,6 +23,7 @@ icon come from the status map, and a later status change swaps the label in with
|
|
|
23
23
|
| `labels` | `Readonly<Record<string, string \| undefined>>` | - | Labels keyed by raw status, e.g. translations: `{ succeeded: "Erfolgreich" }`. Only with `status`. |
|
|
24
24
|
| `layout` | `"default" \| "icon"` | `"default"` | `default`: Text pill, optionally with a status dot or a trailing icon.<br>`icon`: Square pill wrapping a single icon. |
|
|
25
25
|
| `leadingIcon` | `ReactNode` | - | An icon before the label (Figma "Show leading icon"), 12px, e.g. a clock on a session timer or a card on a payment method chip. Decorative: the label names the badge. Replaces the `dot`. |
|
|
26
|
+
| `size` | `"md" \| "sm"` | `"md"` | `md`: 22px tall, as in Figma. The default.<br>`sm`: 18px tall with 6px inline padding: a compact pill for a dense table row or next to `sm` controls. Not a Figma size. |
|
|
26
27
|
| `status` | `"succeeded" \| "failed" \| "cancelled" \| "expired" \| "processing" \| "requires_customer_action" \| "requires_payment_method" \| "requires_merchant_action" \| "requires_confirmation" \| "requires_capture" \| "partially_captured" \| "partially_captured_and_capturable" \| "active" \| "pending" \| "on_hold" \| "paused" \| "scheduled_for_cancellation" \| "review" \| "partial" \| "full" \| "pre_dispute" \| "dispute" \| "pre_arbitration" \| "dispute_opened" \| "dispute_expired" \| "dispute_accepted" \| "dispute_cancelled" \| "dispute_challenged" \| "dispute_won" \| "dispute_lost" \| (string & Record<never, never>) \| null` | - | Raw status from the Dodo Payments API, e.g. `succeeded`, `on_hold` or `partial`. Picks the tone and the label (`children` replaces the label, e.g. with a translation). Unknown statuses render neutral with a readable label; `null`, `""` and a passed `undefined` (`status={row.status}` with no status yet) render "No status". When it changes, the tone crossfades and the new label swaps in. |
|
|
27
28
|
| `tone` | `"neutral" \| "success" \| "warning" \| "error" \| "info" \| "orange" \| "pink" \| "violet"` | `"neutral"` | `neutral`: Neutral status or metadata (draft, test mode), and category labels in a table column.<br>`success`: Success states: paid, active, succeeded.<br>`warning`: Pending or attention states: processing, requires action, on hold.<br>`error`: Failure states: failed, declined, cancelled.<br>`info`: Informational states: scheduled, upcoming, in review.<br>`orange`: A category or highlight whose meaning the label already carries. Not a status.<br>`pink`: A category or highlight whose meaning the label already carries. Not a status.<br>`violet`: A category or highlight, such as a product or plan type. Not a status. |
|
|
28
29
|
| `trailingIcon` | `"info"` | - | An icon after the label. `info` is a circle-info icon; wrap the badge in a `Tooltip` to explain it. |
|
|
@@ -60,6 +61,29 @@ neutral tone, no icon and its prettified raw value.
|
|
|
60
61
|
|
|
61
62
|
## Examples
|
|
62
63
|
|
|
64
|
+
### badge/compact
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
"use client";
|
|
68
|
+
|
|
69
|
+
import { Badge } from "@dodopayments/ui/badge";
|
|
70
|
+
|
|
71
|
+
export default function BadgeCompact() {
|
|
72
|
+
return (
|
|
73
|
+
<>
|
|
74
|
+
<Badge size="sm" tone="success">
|
|
75
|
+
Active
|
|
76
|
+
</Badge>
|
|
77
|
+
<Badge size="sm" tone="warning" dot>
|
|
78
|
+
Past due
|
|
79
|
+
</Badge>
|
|
80
|
+
<Badge size="sm">Test mode</Badge>
|
|
81
|
+
<Badge tone="success">Active</Badge>
|
|
82
|
+
</>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
63
87
|
### badge/icon
|
|
64
88
|
|
|
65
89
|
```tsx
|
|
@@ -60,7 +60,7 @@ gradient or a pattern `url(#id)`; set `stroke` for the tooltip dot when `fill` i
|
|
|
60
60
|
| `animate` | `boolean` | - | Whether to animate the bars. Default: true |
|
|
61
61
|
| `animationType` | `BarAnimationType` | - | Animation type: "grow" (height) or "fade" (opacity + blur). Default: "grow" |
|
|
62
62
|
| `fadedOpacity` | `number` | - | Opacity when not hovered (when another bar is hovered). Default: 0.3 |
|
|
63
|
-
| `fill` | `string` | - | Fill color for the bar. Can be a color, gradient url, or pattern url. Default: var(--chart-1) |
|
|
63
|
+
| `fill` | `string` | - | Fill color for the bar. Can be a color, gradient url, or pattern url. Default: var(--chart-solid-1) |
|
|
64
64
|
| `groupGap` | `number` | - | Gap between grouped bars in pixels. Default: 4 |
|
|
65
65
|
| `lineCap` | `BarLineCap` | - | Line cap style for bar ends: "round", "butt", or a number for custom radius. Default: "round" |
|
|
66
66
|
| `minBarHeight` | `number` | - | Minimum rendered bar height in px (non-stacked, vertical). Floors short or zero-value bars so they stay visible. Pair with the same value on `<BarDepthProvider minBarHeight>` when using the 3D surfaces. Default: 0 |
|
|
@@ -68,7 +68,7 @@ gradient or a pattern `url(#id)`; set `stroke` for the tooltip dot when `fill` i
|
|
|
68
68
|
| `stackGap` | `number` | - | Gap between stacked bars in pixels. Default: 0 |
|
|
69
69
|
| `staggerDelay` | `number` | - | Stagger delay between bars in seconds. Auto-calculated if not provided. |
|
|
70
70
|
| `stroke` | `string` | - | Color for tooltip dot. Use when fill is a gradient/pattern. Default: uses fill value |
|
|
71
|
-
| `variant` | `"tint" \| "solid"` | - | `"tint"`: the radar look, an opaque 20% wash of the colour (mixed into the card, so gridlines stay behind it) with a solid 3px edge at the value end (35% while hovered).
|
|
71
|
+
| `variant` | `"tint" \| "solid"` | - | `"solid"`: the full colour, the default look of the bar charts. `"tint"`: the radar look, an opaque 20% wash of the colour (mixed into the card, so gridlines stay behind it) with a solid 3px edge at the value end (35% while hovered). A gradient or pattern `fill` without `stroke`, and `perspective` bars, stay solid. Default: "solid" |
|
|
72
72
|
| `yAxisId` | `string \| number` | - | Y-scale group id for vertical bars (Recharts `yAxisId`). Default: `"left"`. |
|
|
73
73
|
|
|
74
74
|
## BarXAxis
|
|
@@ -134,10 +134,10 @@ Several `SeriesBar`s in a composed chart group or stack by the chart's bar setti
|
|
|
134
134
|
| `dataKey` (required) | `string` | - | Key in data for bar height (y value) |
|
|
135
135
|
| `animate` | `boolean` | - | Animate grow from baseline. Default: true |
|
|
136
136
|
| `fadedOpacity` | `number` | - | Opacity for non-hovered bars when another point is hovered (matches BarChart). Default: 0.3 |
|
|
137
|
-
| `fill` | `string` | - | Fill color. Default: var(--chart-1) |
|
|
137
|
+
| `fill` | `string` | - | Fill color. Default: var(--chart-solid-1) |
|
|
138
138
|
| `radius` | `number` | - | Corner radius for bar top corners. Default: 0 (square tops, similar to Bar lineCap="butt") |
|
|
139
139
|
| `stroke` | `string` | - | Tooltip dot color when fill is gradient/pattern. Default: fill |
|
|
140
|
-
| `variant` | `"tint" \| "solid"` | - | `"
|
|
140
|
+
| `variant` | `"tint" \| "solid"` | - | `"solid"`: the full colour, as `Bar`. `"tint"`: an opaque 20% wash of the colour (35% for the hovered point) with a solid 3px edge along the top. A gradient or pattern `fill` without `stroke` stays solid. Default: "solid" |
|
|
141
141
|
|
|
142
142
|
## BarColumnTrack
|
|
143
143
|
|
|
@@ -168,7 +168,7 @@ the tooltip dots land on the top square.
|
|
|
168
168
|
| `dataKey` (required) | `string` | - | Key in data for the column value. |
|
|
169
169
|
| `animate` | `boolean` | - | Whether the squares cascade up on mount. Default: true |
|
|
170
170
|
| `fadedOpacity` | `number` | - | Opacity of the other columns while one category is hovered. Default: 0.3 |
|
|
171
|
-
| `fill` | `string` | - | Fill color, gradient url, or pattern url. Default: var(--chart-1) |
|
|
171
|
+
| `fill` | `string` | - | Fill color, gradient url, or pattern url. Default: var(--chart-solid-1) |
|
|
172
172
|
| `gradientStops` | `GradientStop[]` | - | |
|
|
173
173
|
| `groupGap` | `number` | - | Gap between grouped series columns in pixels. Default: 4 |
|
|
174
174
|
| `patternPreset` | `"none" \| "vertical" \| "horizontal" \| "diagonal" \| "cross" \| "dots" \| "circles" \| "accent"` | - | Pattern preset when fill is a pattern (for gradient tinting) |
|
|
@@ -293,8 +293,8 @@ const data = [
|
|
|
293
293
|
];
|
|
294
294
|
|
|
295
295
|
const legendItems = [
|
|
296
|
-
{ label: "Gross revenue", value: 0, color: "var(--chart-1)" },
|
|
297
|
-
{ label: "Net revenue", value: 0, color: "var(--chart-2)" },
|
|
296
|
+
{ label: "Gross revenue", value: 0, color: "var(--chart-solid-1)" },
|
|
297
|
+
{ label: "Net revenue", value: 0, color: "var(--chart-solid-2)" },
|
|
298
298
|
];
|
|
299
299
|
|
|
300
300
|
const usd = new Intl.NumberFormat("en-US", {
|
|
@@ -308,19 +308,19 @@ export default function BarChartGrouped() {
|
|
|
308
308
|
<div className="flex w-full flex-col gap-3">
|
|
309
309
|
<Legend items={legendItems} className="flex-row flex-wrap gap-1">
|
|
310
310
|
<LegendItem className="flex items-center gap-2">
|
|
311
|
-
<LegendMarker
|
|
311
|
+
<LegendMarker />
|
|
312
312
|
<LegendLabel />
|
|
313
313
|
</LegendItem>
|
|
314
314
|
</Legend>
|
|
315
315
|
<BarChart data={data} xDataKey="month" label="Gross and net revenue by month, January to June 2026">
|
|
316
316
|
<ChartGrid horizontal />
|
|
317
|
-
<Bar dataKey="gross" fill="var(--chart-1)" />
|
|
318
|
-
<Bar dataKey="net" fill="var(--chart-2)" />
|
|
317
|
+
<Bar dataKey="gross" fill="var(--chart-solid-1)" />
|
|
318
|
+
<Bar dataKey="net" fill="var(--chart-solid-2)" />
|
|
319
319
|
<BarXAxis />
|
|
320
320
|
<ChartTooltip
|
|
321
321
|
rows={(point) => [
|
|
322
|
-
{ color: "var(--chart-1)", label: "Gross", value: usd.format(point.gross as number) },
|
|
323
|
-
{ color: "var(--chart-2)", label: "Net", value: usd.format(point.net as number) },
|
|
322
|
+
{ color: "var(--chart-solid-1)", label: "Gross", value: usd.format(point.gross as number) },
|
|
323
|
+
{ color: "var(--chart-solid-2)", label: "Net", value: usd.format(point.net as number) },
|
|
324
324
|
]}
|
|
325
325
|
/>
|
|
326
326
|
</BarChart>
|
|
@@ -364,12 +364,12 @@ export default function BarChartHorizontal() {
|
|
|
364
364
|
label="Top products by revenue, last 30 days"
|
|
365
365
|
>
|
|
366
366
|
<ChartGrid horizontal={false} vertical />
|
|
367
|
-
<Bar dataKey="revenue" fill="var(--chart-1)" />
|
|
367
|
+
<Bar dataKey="revenue" fill="var(--chart-solid-1)" />
|
|
368
368
|
<BarYAxis />
|
|
369
369
|
<ChartTooltip
|
|
370
370
|
showCrosshair={false}
|
|
371
371
|
rows={(point) => [
|
|
372
|
-
{ color: "var(--chart-1)", label: "Revenue", value: usd.format(point.revenue as number) },
|
|
372
|
+
{ color: "var(--chart-solid-1)", label: "Revenue", value: usd.format(point.revenue as number) },
|
|
373
373
|
]}
|
|
374
374
|
/>
|
|
375
375
|
</BarChart>
|
|
@@ -444,9 +444,9 @@ const data = [
|
|
|
444
444
|
];
|
|
445
445
|
|
|
446
446
|
const series = [
|
|
447
|
-
{ key: "bank", label: "Bank transfer", color: "var(--chart-1)" },
|
|
448
|
-
{ key: "card", label: "Card", color: "var(--chart-2)" },
|
|
449
|
-
{ key: "wallet", label: "Wallet", color: "var(--chart-3)" },
|
|
447
|
+
{ key: "bank", label: "Bank transfer", color: "var(--chart-solid-1)" },
|
|
448
|
+
{ key: "card", label: "Card", color: "var(--chart-solid-2)" },
|
|
449
|
+
{ key: "wallet", label: "Wallet", color: "var(--chart-solid-3)" },
|
|
450
450
|
] as const;
|
|
451
451
|
|
|
452
452
|
const legendItems = series.map(({ label, color }) => ({ label, value: 0, color }));
|
|
@@ -462,7 +462,7 @@ export default function BarChartStacked() {
|
|
|
462
462
|
<div className="flex w-full flex-col gap-3">
|
|
463
463
|
<Legend items={legendItems} className="flex-row flex-wrap gap-1">
|
|
464
464
|
<LegendItem className="flex items-center gap-2">
|
|
465
|
-
<LegendMarker
|
|
465
|
+
<LegendMarker />
|
|
466
466
|
<LegendLabel />
|
|
467
467
|
</LegendItem>
|
|
468
468
|
</Legend>
|
|
@@ -16,7 +16,7 @@ marks keep their brand colours.
|
|
|
16
16
|
|
|
17
17
|
| Prop | Type | Default | Description |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
|
-
| `brand` (required) | `"meta" \| "github" \| "gitlab" \| "terraform" \| "vercel" \| "google-cloud" \| "aws" \| "kubernetes" \| "google-analytics" \| "google-tag-manager" \| "stripe" \| "adyen" \| "dodo-payments"` | - | Which brand's mark to draw. |
|
|
19
|
+
| `brand` (required) | `"meta" \| "github" \| "gitlab" \| "terraform" \| "vercel" \| "google-cloud" \| "aws" \| "kubernetes" \| "google-analytics" \| "google-tag-manager" \| "stripe" \| "adyen" \| "dodo-payments" \| "discord" \| "telegram" \| "notion" \| "framer" \| "figma"` | - | Which brand's mark to draw. |
|
|
20
20
|
| `label` | `string` | - | Names the mark for screen readers (`role="img"`). Leave it out when the brand's name is already next to the mark: the mark is then decorative. |
|
|
21
21
|
|
|
22
22
|
## Examples
|
package/ai/components/button.md
CHANGED
|
@@ -30,7 +30,7 @@ and announces it.
|
|
|
30
30
|
| `loadingText` | `ReactNode` | - | Label shown while `loading` or `progress` is set. Defaults to `children`. |
|
|
31
31
|
| `progress` | `number \| null` | - | Determinate progress (0-100). A fill sweeps across the button and the percentage is shown next to `loadingText`. `null`/`undefined` falls back to `loading`. |
|
|
32
32
|
| `result` | `"success" \| "error" \| null` | - | Outcome of the last action, after interior.dev's loading button. `"success"` swaps the label for a check and `successText`, `"error"` for a warning icon and `errorText`; `null` shows the label. The outcome is announced through a polite live region. Pass it (even `null`) on buttons that report an outcome, so every face shares one cell from the first render. Clear it yourself, e.g. after 1.4s. With `result`, `Button` renders the button and a sibling status element, so do not pass a `Button` with `result` as the `render` element of another component. |
|
|
33
|
-
| `size` | `"xs" \| "default" \| "lg" \| "icon" \| "icon-xs" \| "icon-lg"` | `"lg"` | `xs`: 28px tall (24px from `sm`), Figma `sm`: dense toolbars, strip actions and inline actions.<br>`default`: 36px tall (32px from `sm`): a compact control when a design asks for one. Not a Figma size; prefer `lg`.<br>`lg`: 40px tall (36px from `sm`), Figma `lg`, the default: page, form, dialog and card actions, next to an Input.<br>`icon`: Square icon-only button at the default height. Requires `aria-label`.<br>`icon-xs`: Square icon-only button at `xs` height. Requires `aria-label`.<br>`icon-lg`: Square icon-only button at `lg` height. Requires `aria-label`. |
|
|
33
|
+
| `size` | `"xs" \| "sm" \| "default" \| "lg" \| "icon" \| "icon-sm" \| "icon-xs" \| "icon-lg"` | `"lg"` | `xs`: 28px tall (24px from `sm`), Figma `sm`: dense toolbars, strip actions and inline actions.<br>`sm`: 32px tall (28px from `sm`): a compact action in a dense toolbar, a table filter row or next to an `sm` Input. Not a Figma size.<br>`default`: 36px tall (32px from `sm`): a compact control when a design asks for one. Not a Figma size; prefer `lg`.<br>`lg`: 40px tall (36px from `sm`), Figma `lg`, the default: page, form, dialog and card actions, next to an Input.<br>`icon`: Square icon-only button at the default height. Requires `aria-label`.<br>`icon-sm`: Square icon-only button at `sm` height. Requires `aria-label`.<br>`icon-xs`: Square icon-only button at `xs` height. Requires `aria-label`.<br>`icon-lg`: Square icon-only button at `lg` height. Requires `aria-label`. |
|
|
34
34
|
| `successText` | `ReactNode` | `"Done"` | Label shown while `result` is `"success"`. |
|
|
35
35
|
| `variant` | `"default" \| "secondary" \| "ghost" \| "destructive" \| "warning" \| "wallet" \| "destructive-outline" \| "link"` | `"default"` | `default`: Primary action (Figma Button primary): a dark gradient with white text, white in dark mode. Use it for the one main action of a view, form or dialog.<br>`secondary`: Tactile light button (Figma Button secondary). The default for most actions in forms, toolbars and dialogs.<br>`ghost`: No chrome until hover (Figma Button ghost). Use for icon buttons and dense UI.<br>`destructive`: Irreversible or dangerous actions such as delete or revoke (Figma Button destructive): a red gradient with white text.<br>`warning`: Confirms an action that needs attention but can be undone, such as pause (Figma Button warning): an amber gradient with white text.<br>`wallet`: Express checkout (Apple Pay, Google Pay): the wallet brands' black button, white in dark mode, holding the wallet's `WalletLogo` (20 tall). Name it with `aria-label` ("Pay with Apple Pay"). `WalletButtons` lays out a row of them.<br>`destructive-outline`: Bordered destructive action where a solid red button is too loud, e.g. in a row of actions.<br>`link`: Looks like an inline link (link colour, underlined; the underline turns solid on hover) but behaves as a button. |
|
|
36
36
|
|
|
@@ -55,6 +55,29 @@ export default function ButtonAsLink() {
|
|
|
55
55
|
}
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
+
### button/compact
|
|
59
|
+
|
|
60
|
+
```tsx
|
|
61
|
+
"use client";
|
|
62
|
+
|
|
63
|
+
import { Button } from "@dodopayments/ui/button";
|
|
64
|
+
import { FilterIcon, PlusIcon } from "@dodopayments/ui/icons";
|
|
65
|
+
|
|
66
|
+
export default function ButtonCompact() {
|
|
67
|
+
return (
|
|
68
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
69
|
+
<Button size="sm" variant="secondary" icon={<FilterIcon aria-hidden />} iconPlacement="left">
|
|
70
|
+
Filter
|
|
71
|
+
</Button>
|
|
72
|
+
<Button size="sm">Export</Button>
|
|
73
|
+
<Button size="icon-sm" variant="secondary" aria-label="Add a column">
|
|
74
|
+
<PlusIcon />
|
|
75
|
+
</Button>
|
|
76
|
+
</div>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
58
81
|
### button/copy-with-text
|
|
59
82
|
|
|
60
83
|
```tsx
|
|
@@ -149,7 +149,7 @@ export default function ChartTooltipCustomRows() {
|
|
|
149
149
|
return (
|
|
150
150
|
<AreaChart data={data} label="Gross revenue, refunds and net revenue, first two weeks of September 2026">
|
|
151
151
|
<ChartGrid horizontal />
|
|
152
|
-
<Area dataKey="revenue" fill="var(--chart-1)" />
|
|
152
|
+
<Area dataKey="revenue" fill="var(--chart-solid-1)" />
|
|
153
153
|
<Area dataKey="refunds" fill="var(--chart-2)" />
|
|
154
154
|
<XAxis />
|
|
155
155
|
<ChartTooltip
|
|
@@ -157,7 +157,7 @@ export default function ChartTooltipCustomRows() {
|
|
|
157
157
|
const revenue = point.revenue as number;
|
|
158
158
|
const refunds = point.refunds as number;
|
|
159
159
|
return [
|
|
160
|
-
{ color: "var(--chart-1)", label: "Gross revenue", value: usd.format(revenue) },
|
|
160
|
+
{ color: "var(--chart-solid-1)", label: "Gross revenue", value: usd.format(revenue) },
|
|
161
161
|
{ color: "var(--chart-2)", label: "Refunds", value: usd.format(refunds) },
|
|
162
162
|
{ color: "var(--muted-foreground)", label: "Net revenue", value: usd.format(revenue - refunds) },
|
|
163
163
|
];
|
|
@@ -188,7 +188,7 @@ export default function ChartTooltipDefault() {
|
|
|
188
188
|
return (
|
|
189
189
|
<AreaChart data={data} label="Gross revenue and refunds, first two weeks of September 2026">
|
|
190
190
|
<ChartGrid horizontal />
|
|
191
|
-
<Area dataKey="revenue" fill="var(--chart-1)" />
|
|
191
|
+
<Area dataKey="revenue" fill="var(--chart-solid-1)" />
|
|
192
192
|
<Area dataKey="refunds" fill="var(--chart-2)" />
|
|
193
193
|
<XAxis />
|
|
194
194
|
<ChartTooltip />
|
package/ai/components/chart.md
CHANGED
|
@@ -307,7 +307,7 @@ export default function ChartBrushDemo() {
|
|
|
307
307
|
animationDuration={0}
|
|
308
308
|
style={{ aspectRatio: "unset" }}
|
|
309
309
|
>
|
|
310
|
-
<Area dataKey="payouts" fill="var(--chart-1)" fillOpacity={0.15} animate={false} showHighlight={false} />
|
|
310
|
+
<Area dataKey="payouts" fill="var(--chart-solid-1)" fillOpacity={0.15} animate={false} showHighlight={false} />
|
|
311
311
|
<ChartBrush
|
|
312
312
|
fadeOuterEdges
|
|
313
313
|
initialSelection={layout.brushSelection ?? undefined}
|
|
@@ -328,7 +328,7 @@ export default function ChartBrushDemo() {
|
|
|
328
328
|
yDomainTween
|
|
329
329
|
>
|
|
330
330
|
<ChartGrid horizontal />
|
|
331
|
-
<Area dataKey="payouts" fill="var(--chart-1)" />
|
|
331
|
+
<Area dataKey="payouts" fill="var(--chart-solid-1)" />
|
|
332
332
|
<XAxis />
|
|
333
333
|
<ChartTooltip />
|
|
334
334
|
</AreaChart>
|
|
@@ -364,7 +364,7 @@ export default function ChartGridAxes() {
|
|
|
364
364
|
return (
|
|
365
365
|
<AreaChart data={data} label="Monthly recurring revenue, September 2026" margin={{ left: 56 }}>
|
|
366
366
|
<ChartGrid horizontal vertical />
|
|
367
|
-
<Area dataKey="mrr" fill="var(--chart-1)" />
|
|
367
|
+
<Area dataKey="mrr" fill="var(--chart-solid-1)" />
|
|
368
368
|
<XAxis />
|
|
369
369
|
<YAxis formatValue={(value) => usdCompact.format(value)} />
|
|
370
370
|
</AreaChart>
|
|
@@ -425,7 +425,7 @@ export default function ChartMarkersDemo() {
|
|
|
425
425
|
return (
|
|
426
426
|
<AreaChart data={data} label="Gross revenue with product and incident events, September 2026" margin={{ top: 40 }}>
|
|
427
427
|
<ChartGrid horizontal />
|
|
428
|
-
<Area dataKey="revenue" fill="var(--chart-1)" />
|
|
428
|
+
<Area dataKey="revenue" fill="var(--chart-solid-1)" />
|
|
429
429
|
<XAxis />
|
|
430
430
|
<ChartMarkers items={markers} />
|
|
431
431
|
<ChartTooltip>
|
|
@@ -464,12 +464,12 @@ export default function ChartReferenceArea() {
|
|
|
464
464
|
markerColor="var(--chart-2)"
|
|
465
465
|
axisLabelColor="var(--chart-2)"
|
|
466
466
|
/>
|
|
467
|
-
<Area dataKey="conversion" fill="var(--chart-1)" />
|
|
467
|
+
<Area dataKey="conversion" fill="var(--chart-solid-1)" />
|
|
468
468
|
<XAxis />
|
|
469
469
|
<YAxis formatLargeNumbers={false} formatValue={(value) => `${value.toFixed(1)}%`} />
|
|
470
470
|
<ChartTooltip
|
|
471
471
|
rows={(point) => [
|
|
472
|
-
{ color: "var(--chart-1)", label: "Conversion", value: `${(point.conversion as number).toFixed(2)}%` },
|
|
472
|
+
{ color: "var(--chart-solid-1)", label: "Conversion", value: `${(point.conversion as number).toFixed(2)}%` },
|
|
473
473
|
]}
|
|
474
474
|
/>
|
|
475
475
|
</AreaChart>
|
|
@@ -89,7 +89,7 @@ export default function CheckoutPageBasic() {
|
|
|
89
89
|
<AvatarImage src={LOGO} alt="" />
|
|
90
90
|
<AvatarFallback name="Acme" />
|
|
91
91
|
</Avatar>
|
|
92
|
-
<span className="font-heading
|
|
92
|
+
<span className="font-heading text-heading-quaternary text-foreground">Acme</span>
|
|
93
93
|
</>
|
|
94
94
|
}
|
|
95
95
|
summary={
|
|
@@ -77,7 +77,7 @@ animation.
|
|
|
77
77
|
| `moreLabel` | `string` | `"Show more"` | Button text while collapsed. |
|
|
78
78
|
| `onOpenChange` | `((open: boolean) => void)` | - | Called with the next state when the user toggles it. |
|
|
79
79
|
| `open` | `boolean` | - | Whether the text is expanded. Pass it to control the component. |
|
|
80
|
-
| `size` | `"default" \| "icon" \| "xs" \| "lg" \| "icon-xs" \| "icon-lg" \| null` | - | |
|
|
80
|
+
| `size` | `"default" \| "sm" \| "icon" \| "xs" \| "lg" \| "icon-sm" \| "icon-xs" \| "icon-lg" \| null` | - | |
|
|
81
81
|
| `variant` | `"link" \| "default" \| "warning" \| "secondary" \| "ghost" \| "destructive" \| "wallet" \| "destructive-outline" \| null` | - | |
|
|
82
82
|
|
|
83
83
|
## useShowMore
|
|
@@ -24,7 +24,7 @@ picking black from empty fires no change: type it instead.
|
|
|
24
24
|
| `nativeInput` | `boolean` | - | |
|
|
25
25
|
| `onValueChange` | `((value: string) => void)` | - | Called with the typed text, or with the `#rrggbb` the native picker chose. |
|
|
26
26
|
| `pickerLabel` | `string` | - | Accessible name of the native colour picker behind the swatch. |
|
|
27
|
-
| `size` | `"lg"` | `"lg"` | Input height, as `Input` (`DODO_INPUT_VARIANTS`):
|
|
27
|
+
| `size` | `"sm" \| "lg"` | `"lg"` | Input height, as `Input` (`DODO_INPUT_VARIANTS`): `lg` 36 or the compact `sm` 28. |
|
|
28
28
|
| `unstyled` | `boolean` | - | |
|
|
29
29
|
|
|
30
30
|
Also accepts Base UI props: `render`.
|
|
@@ -71,8 +71,8 @@ const data = Array.from({ length: 30 }, (_, day) => {
|
|
|
71
71
|
});
|
|
72
72
|
|
|
73
73
|
const legendItems = [
|
|
74
|
-
{ label: "Orders", value: 0, color: "var(--chart-2)" },
|
|
75
|
-
{ label: "Revenue ($K)", value: 0, color: "var(--chart-1)" },
|
|
74
|
+
{ label: "Orders", value: 0, color: "var(--chart-solid-2)" },
|
|
75
|
+
{ label: "Revenue ($K)", value: 0, color: "var(--chart-solid-1)" },
|
|
76
76
|
{ label: "7-day run rate ($K)", value: 0, color: "var(--chart-comparison)" },
|
|
77
77
|
];
|
|
78
78
|
|
|
@@ -92,9 +92,9 @@ export default function ComposedChartDefault() {
|
|
|
92
92
|
maxBarSize={32}
|
|
93
93
|
>
|
|
94
94
|
<ChartGrid horizontal />
|
|
95
|
-
<SeriesBar dataKey="orders" fill="var(--chart-2)" radius={4} />
|
|
95
|
+
<SeriesBar dataKey="orders" fill="var(--chart-solid-2)" radius={4} />
|
|
96
96
|
<Line dataKey="runRate" variant="comparison" />
|
|
97
|
-
<Line dataKey="revenue" stroke="var(--chart-1)" />
|
|
97
|
+
<Line dataKey="revenue" stroke="var(--chart-solid-1)" />
|
|
98
98
|
<XAxis numTicks={6} />
|
|
99
99
|
<ChartTooltip showCrosshair={false} />
|
|
100
100
|
</ComposedChart>
|
|
@@ -125,9 +125,9 @@ const data = Array.from({ length: 12 }, (_, week) => ({
|
|
|
125
125
|
}));
|
|
126
126
|
|
|
127
127
|
const bars = [
|
|
128
|
-
{ key: "card", label: "Card", color: "var(--chart-1)" },
|
|
129
|
-
{ key: "bank", label: "Bank transfer", color: "var(--chart-2)" },
|
|
130
|
-
{ key: "wallet", label: "Wallet", color: "var(--chart-3)" },
|
|
128
|
+
{ key: "card", label: "Card", color: "var(--chart-solid-1)" },
|
|
129
|
+
{ key: "bank", label: "Bank transfer", color: "var(--chart-solid-2)" },
|
|
130
|
+
{ key: "wallet", label: "Wallet", color: "var(--chart-solid-3)" },
|
|
131
131
|
] as const;
|
|
132
132
|
|
|
133
133
|
const legendItems = [
|
|
@@ -24,6 +24,7 @@ row. An empty `value` renders a dash.
|
|
|
24
24
|
| `copyLabel` | `string` | `"Copy ID" ("Copy secret" for `variant="secret"`)` | Accessible name of the copy button. |
|
|
25
25
|
| `defaultRevealed` | `boolean` | `false` | Initial revealed state of an uncontrolled `secret`. |
|
|
26
26
|
| `label` | `ReactNode` | - | The key of a `chip`, e.g. "Customer ID" (Body/Secondary, Content/Secondary). |
|
|
27
|
+
| `link` | `ReactElement<Record<string, unknown>, string \| JSXElementConstructor<any>>` | - | Renders the value as this link, e.g. `<NextLink href="/payments/pay_…" />`, for an ID that opens its record. The value keeps its middle truncation and underlines on hover; the copy button stays beside it, outside the link. `inline` and `chip` only. |
|
|
27
28
|
| `onCopy` | `((value: string) => void)` | - | Called with `value` after it was written to the clipboard. |
|
|
28
29
|
| `onCopyError` | `((error: unknown) => void)` | - | Called when the clipboard write fails (e.g. permission denied or insecure context). |
|
|
29
30
|
| `onRevealedChange` | `((revealed: boolean) => void)` | - | Called when the reveal button shows or masks a `secret`, and when `remaskAfterMs` masks it again. |
|
|
@@ -36,6 +36,7 @@ field), with the search `ComboboxInput` inside the `ComboboxPopup`.
|
|
|
36
36
|
| `placeholder` | `string` | `"Select a country"` | Trigger text while nothing is selected. |
|
|
37
37
|
| `required` | `boolean` | - | |
|
|
38
38
|
| `searchPlaceholder` | `string` | `"Search countries"` | Placeholder and accessible name of the search input in the popup. |
|
|
39
|
+
| `size` | `"default" \| "sm"` | `"default"` | Trigger height: 36, or the compact 28 of `SelectTrigger` `size="sm"`. |
|
|
39
40
|
| `value` | `string \| null` | - | Selected ISO 3166-1 alpha-2 code (controlled). `null` clears the selection. |
|
|
40
41
|
|
|
41
42
|
## Examples
|
|
@@ -40,5 +40,6 @@ field), with the search `ComboboxInput` inside the `ComboboxPopup`.
|
|
|
40
40
|
| `placeholder` | `string` | `"Select a currency"` | Trigger text while nothing is selected. |
|
|
41
41
|
| `required` | `boolean` | - | |
|
|
42
42
|
| `searchPlaceholder` | `string` | `"Search currencies"` | Placeholder and accessible name of the search input in the popup. |
|
|
43
|
+
| `size` | `"default" \| "sm"` | `"default"` | Trigger height: 36, or the compact 28 of `SelectTrigger` `size="sm"`. |
|
|
43
44
|
| `value` | `string \| null` | - | Selected ISO 4217 code (controlled). `null` clears the selection. |
|
|
44
45
|
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
The Dodo Nest Data table, driven by a TanStack Table v8 instance: the column headers on a grey tray,
|
|
4
4
|
the rows (`size` md 48 / lg 64) on the white panel inside it, skeleton rows while `isLoading`, and
|
|
5
5
|
`emptyMessage` centred in the panel when there are no rows. It keeps the table layout at every width:
|
|
6
|
-
a table wider than its container scrolls sideways (the container is then a tab stop).
|
|
6
|
+
a table wider than its container scrolls sideways (the container is then a tab stop). For a phone, give the
|
|
7
|
+
less important columns `meta.priority` 2 or 3 so they hide while the table is narrow, and set `pinFirstColumn`
|
|
8
|
+
to keep the first column in view. It sets
|
|
7
9
|
`aria-sort` on sortable headers and marks selected rows `data-state="selected"`, tinted
|
|
8
10
|
Surface/Secondary as on hover. Sorting, selection and pagination stay in the table
|
|
9
11
|
instance; pair it with `DataGridColumnHeader`, `DataGridRowSelect(All)` and `DataGridPagination`
|
|
@@ -20,7 +22,9 @@ import { DataGrid, DataGridColumnHeader, DataGridPagination, DataGridRowSelect,
|
|
|
20
22
|
The Dodo Nest Data table, driven by a TanStack Table v8 instance: the column headers on a grey tray,
|
|
21
23
|
the rows (`size` md 48 / lg 64) on the white panel inside it, skeleton rows while `isLoading`, and
|
|
22
24
|
`emptyMessage` centred in the panel when there are no rows. It keeps the table layout at every width:
|
|
23
|
-
a table wider than its container scrolls sideways (the container is then a tab stop).
|
|
25
|
+
a table wider than its container scrolls sideways (the container is then a tab stop). For a phone, give the
|
|
26
|
+
less important columns `meta.priority` 2 or 3 so they hide while the table is narrow, and set `pinFirstColumn`
|
|
27
|
+
to keep the first column in view. It sets
|
|
24
28
|
`aria-sort` on sortable headers and marks selected rows `data-state="selected"`, tinted
|
|
25
29
|
Surface/Secondary as on hover. Sorting, selection and pagination stay in the table
|
|
26
30
|
instance; pair it with `DataGridColumnHeader`, `DataGridRowSelect(All)` and `DataGridPagination`
|
|
@@ -44,6 +48,7 @@ the selected rows.
|
|
|
44
48
|
| `loadingRows` | `number` | - | Number of skeleton rows while loading. Defaults to the current page size. |
|
|
45
49
|
| `onRowClick` | `((row: TData) => void)` | - | Called with the row's original data when a row is clicked or activated with Enter/Space. Makes rows focusable. Clicks on buttons, links, inputs, checkboxes and `[data-no-row-click]` elements inside the row are ignored. |
|
|
46
50
|
| `onRowNavigate` | `((href: string, row: TData) => void)` | `Assigns the URL to `window.location`` | Follows a row's link in the same tab, e.g. `(href) => router.push(href)` for client-side routing. |
|
|
51
|
+
| `pinFirstColumn` | `boolean` | `false` | Keep the first data column in view while a wide table scrolls sideways, next to the checkboxes if there are any, so each row stays identifiable on a phone. The columns passing under it fade. |
|
|
47
52
|
| `size` | `"md" \| "lg"` | `"md"` | `md`: 48 rows, for one-line cells (the default).<br>`lg`: 64 rows, for a primary cell with a subtitle, a date with its time or an avatar. |
|
|
48
53
|
|
|
49
54
|
## DataGridColumnHeader
|
|
@@ -1700,6 +1705,91 @@ export default function DataGridLoadingEmpty() {
|
|
|
1700
1705
|
}
|
|
1701
1706
|
```
|
|
1702
1707
|
|
|
1708
|
+
### data-grid/phone
|
|
1709
|
+
|
|
1710
|
+
```tsx
|
|
1711
|
+
"use client";
|
|
1712
|
+
|
|
1713
|
+
import { Badge } from "@dodopayments/ui/badge";
|
|
1714
|
+
import { DataGrid } from "@dodopayments/ui/data-grid";
|
|
1715
|
+
import { type ColumnDef, getCoreRowModel, useReactTable } from "@tanstack/react-table";
|
|
1716
|
+
|
|
1717
|
+
interface Payment {
|
|
1718
|
+
id: string;
|
|
1719
|
+
customer: string;
|
|
1720
|
+
method: string;
|
|
1721
|
+
created: string;
|
|
1722
|
+
status: "succeeded" | "failed" | "processing";
|
|
1723
|
+
amount: string;
|
|
1724
|
+
}
|
|
1725
|
+
|
|
1726
|
+
const payments: Payment[] = [
|
|
1727
|
+
{
|
|
1728
|
+
id: "pay_8Hq2Xa",
|
|
1729
|
+
customer: "ada@lovelace.dev",
|
|
1730
|
+
method: "Visa •••• 4242",
|
|
1731
|
+
created: "Nov 26, 09:14",
|
|
1732
|
+
status: "succeeded",
|
|
1733
|
+
amount: "$49.00",
|
|
1734
|
+
},
|
|
1735
|
+
{
|
|
1736
|
+
id: "pay_3Kd9Pm",
|
|
1737
|
+
customer: "grace@hopper.io",
|
|
1738
|
+
method: "UPI",
|
|
1739
|
+
created: "Nov 26, 08:51",
|
|
1740
|
+
status: "processing",
|
|
1741
|
+
amount: "$120.00",
|
|
1742
|
+
},
|
|
1743
|
+
{
|
|
1744
|
+
id: "pay_7Tn4Ws",
|
|
1745
|
+
customer: "alan@turing.org",
|
|
1746
|
+
method: "Mastercard •••• 4444",
|
|
1747
|
+
created: "Nov 25, 22:07",
|
|
1748
|
+
status: "failed",
|
|
1749
|
+
amount: "$19.00",
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
id: "pay_1Bz6Lc",
|
|
1753
|
+
customer: "katherine@johnson.space",
|
|
1754
|
+
method: "Apple Pay",
|
|
1755
|
+
created: "Nov 25, 18:30",
|
|
1756
|
+
status: "succeeded",
|
|
1757
|
+
amount: "$240.00",
|
|
1758
|
+
},
|
|
1759
|
+
];
|
|
1760
|
+
|
|
1761
|
+
const columns: ColumnDef<Payment>[] = [
|
|
1762
|
+
{ accessorKey: "id", header: "Payment", meta: { cellClassName: "font-mono" } },
|
|
1763
|
+
{
|
|
1764
|
+
accessorKey: "status",
|
|
1765
|
+
header: "Status",
|
|
1766
|
+
cell: ({ row }) => <Badge status={row.original.status} kind="payment" />,
|
|
1767
|
+
},
|
|
1768
|
+
{ accessorKey: "amount", header: "Amount", meta: { cellClassName: "tabular-nums" } },
|
|
1769
|
+
// Hidden while the table is under 448px wide: a phone.
|
|
1770
|
+
{ accessorKey: "customer", header: "Customer", meta: { priority: 2 } },
|
|
1771
|
+
// Hidden while it is under 672px wide: a phone or a narrow panel.
|
|
1772
|
+
{ accessorKey: "method", header: "Method", meta: { priority: 3 } },
|
|
1773
|
+
{ accessorKey: "created", header: "Created", meta: { priority: 3 } },
|
|
1774
|
+
];
|
|
1775
|
+
|
|
1776
|
+
export default function DataGridPhone() {
|
|
1777
|
+
// eslint-disable-next-line react-hooks/incompatible-library -- TanStack Table returns a mutable instance by design.
|
|
1778
|
+
const table = useReactTable({
|
|
1779
|
+
data: payments,
|
|
1780
|
+
columns,
|
|
1781
|
+
getRowId: (row) => row.id,
|
|
1782
|
+
getCoreRowModel: getCoreRowModel(),
|
|
1783
|
+
});
|
|
1784
|
+
|
|
1785
|
+
return (
|
|
1786
|
+
<div className="w-full min-w-0">
|
|
1787
|
+
<DataGrid table={table} aria-label="Payments" pinFirstColumn />
|
|
1788
|
+
</div>
|
|
1789
|
+
);
|
|
1790
|
+
}
|
|
1791
|
+
```
|
|
1792
|
+
|
|
1703
1793
|
### data-grid/row-hover
|
|
1704
1794
|
|
|
1705
1795
|
```tsx
|
|
@@ -66,7 +66,7 @@ A named shortcut in a range picker's preset list. `range` is evaluated against "
|
|
|
66
66
|
| --- | --- | --- | --- |
|
|
67
67
|
| `label` (required) | `string` | - | Text on the preset button, e.g. "Last 7 days". |
|
|
68
68
|
| `range` (required) | `(today: Date) => CompleteDateRange` | - | Returns the range for the given day. |
|
|
69
|
-
| `messageKey` | `"search" \| "clear" \| "loading" \| "next" \| "cardFieldLabel" \| "cardFieldNumber" \| "cardFieldExpiry" \| "cardFieldCvc" \| "cardFieldName" \| "cardFieldNumberError" \| "cardFieldExpiryError" \| "cardFieldCvcError" \| "cardFieldNameError" \| "billingActionFailed" \| "close" \| "dismiss" \| "spinnerLabel" \| "remove" \| "removeItem" \| "confirm" \| "cancel" \| "retry" \| "tryAgain" \| "back" \| "more" \| "showMore" \| "showLess" \| "selectEmpty" \| "copied" \| "copyFailed" \| "copyToClipboard" \| "loadMoreError" \| "activityTimelineLoading" \| "activityTimelineEmptyTitle" \| "activityTimelineEmptyDescription" \| "activityTimelineErrorTitle" \| "activityTimelineErrorDescription" \| "activityTimelineEnd" \| "autocompleteShowSuggestions" \| "comboboxShowOptions" \| "breadcrumbLabel" \| "codeBlockCopy" \| "codeBlockLabel" \| "dataGridSelectRow" \| "dataGridSelectAll" \| "dataGridSortBy" \| "dataGridSortAscending" \| "dataGridSortDescending" \| "dataGridTime" \| "datePresetToday" \| "datePresetYesterday" \| "datePresetLast7Days" \| "datePresetLast30Days" \| "datePresetThisWeek" \| "datePresetThisMonth" \| "datePresetLastMonth" \| "datePresetMonthToDate" \| "datePresetYearToDate" \| "datePresetLastYear" \| "dateRangeTitle" \| "dateRangePresets" \| "datePickerTitle" \| "datePickerReset" \| "datePickerApply" \| "datePickerStartDate" \| "datePickerEndDate" \| "dateFilterPlaceholder" \| "dateFilterClear" \| "loadMore" \| "loadMoreEnd" \| "paginationLabel" \| "paginationPrevious" \| "paginationNext" \| "paginationFirst" \| "paginationLast" \| "paginationPage" \| "tablePaginationRowsPerPage" \| "tablePaginationViewing" \| "secretFieldReveal" \| "secretFieldCopy" \| "secretFieldRemasked" \| "showMoreLabel" \| "sidebarTitle" \| "sidebarToggle" \| "sidebarCollapse" \| "sidebarExpand" \| "sidebarMode" \| "sidebarModeTest" \| "sidebarModeLive" \| "sidebarSwitchToLive" \| "sidebarSwitchToTest" \| "inputCopy" \| "sheetProgress" \| "statCardIncreased" \| "statCardDecreased" \| "statCardInfo" \| "statCardError" \| "statCardEmpty" \| "statCardNoChange" \| "timestampUtc" \| "timestampRelative" \| "timestampTimestamp" \| "wizardStepsLabel" \| "wizardStepsPosition" \| "progressStep" \| "wizardStepsFinish" \| "wizardStepsComplete" \| "wizardStepsCompleteHint" \| "prorationPreviewLabel" \| "prorationPreviewCurrentPlan" \| "prorationPreviewNewPlan" \| "prorationPreviewCredit" \| "prorationPreviewCharge" \| "prorationPreviewDueToday" \| "prorationPreviewNextInvoice" \| "prorationPreviewEffectiveNow" \| "prorationPreviewEffectivePeriodEnd" \| "codeTabsLabel" \| "walletButtonsPayWith" \| "walletButtonsDivider"` | - | Built-in message that translates `label` under a `LocaleProvider` while `label` is still that message's English default. Custom presets leave it out and show `label` as given; a built-in preset you relabel (`{ ...preset, label: "Past week" }`) shows its new `label` too. |
|
|
69
|
+
| `messageKey` | `"search" \| "clear" \| "loading" \| "next" \| "cardFieldLabel" \| "cardFieldNumber" \| "cardFieldExpiry" \| "cardFieldCvc" \| "cardFieldName" \| "cardFieldNumberError" \| "cardFieldExpiryError" \| "cardFieldCvcError" \| "cardFieldNameError" \| "billingActionFailed" \| "close" \| "dismiss" \| "spinnerLabel" \| "remove" \| "removeItem" \| "confirm" \| "cancel" \| "retry" \| "tryAgain" \| "back" \| "more" \| "showMore" \| "showLess" \| "selectEmpty" \| "copied" \| "copyFailed" \| "copyToClipboard" \| "loadMoreError" \| "activityTimelineLoading" \| "activityTimelineEmptyTitle" \| "activityTimelineEmptyDescription" \| "activityTimelineErrorTitle" \| "activityTimelineErrorDescription" \| "activityTimelineEnd" \| "autocompleteShowSuggestions" \| "comboboxShowOptions" \| "breadcrumbLabel" \| "codeBlockCopy" \| "codeBlockLabel" \| "dataGridSelectRow" \| "dataGridSelectAll" \| "dataGridSortBy" \| "dataGridSortAscending" \| "dataGridSortDescending" \| "dataGridTime" \| "datePresetToday" \| "datePresetYesterday" \| "datePresetLast7Days" \| "datePresetLast30Days" \| "datePresetThisWeek" \| "datePresetThisMonth" \| "datePresetLastMonth" \| "datePresetMonthToDate" \| "datePresetYearToDate" \| "datePresetLastYear" \| "dateRangeTitle" \| "dateRangePresets" \| "datePickerTitle" \| "datePickerReset" \| "datePickerApply" \| "datePickerStartDate" \| "datePickerEndDate" \| "dateFilterPlaceholder" \| "dateFilterClear" \| "loadMore" \| "loadMoreEnd" \| "paginationLabel" \| "paginationPrevious" \| "paginationNext" \| "paginationFirst" \| "paginationLast" \| "paginationPage" \| "tablePaginationRowsPerPage" \| "tablePaginationViewing" \| "secretFieldReveal" \| "secretFieldCopy" \| "secretFieldRemasked" \| "showMoreLabel" \| "sidebarTitle" \| "sidebarToggle" \| "sidebarCollapse" \| "sidebarExpand" \| "sidebarMode" \| "sidebarModeTest" \| "sidebarModeLive" \| "sidebarSwitchToLive" \| "sidebarSwitchToTest" \| "imageCropTitle" \| "imageCropArea" \| "imageCropApply" \| "imageCropKeyboardHint" \| "imageCropFailed" \| "imageCropUnreadable" \| "inputCopy" \| "sheetProgress" \| "statCardIncreased" \| "statCardDecreased" \| "statCardInfo" \| "statCardError" \| "statCardEmpty" \| "statCardNoChange" \| "timestampUtc" \| "timestampRelative" \| "timestampTimestamp" \| "wizardStepsLabel" \| "wizardStepsPosition" \| "progressStep" \| "wizardStepsFinish" \| "wizardStepsComplete" \| "wizardStepsCompleteHint" \| "prorationPreviewLabel" \| "prorationPreviewCurrentPlan" \| "prorationPreviewNewPlan" \| "prorationPreviewCredit" \| "prorationPreviewCharge" \| "prorationPreviewDueToday" \| "prorationPreviewNextInvoice" \| "prorationPreviewEffectiveNow" \| "prorationPreviewEffectivePeriodEnd" \| "codeTabsLabel" \| "walletButtonsPayWith" \| "walletButtonsDivider"` | - | Built-in message that translates `label` under a `LocaleProvider` while `label` is still that message's English default. Custom presets leave it out and show `label` as given; a built-in preset you relabel (`{ ...preset, label: "Past week" }`) shows its new `label` too. |
|
|
70
70
|
|
|
71
71
|
## Examples
|
|
72
72
|
|