@dodopayments/ui 1.6.0 → 1.7.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 +766 -67
- package/ai/component-registry.md +3 -0
- package/ai/components/activity-timeline.md +1 -1
- package/ai/components/alert.md +1 -1
- package/ai/components/app-top-bar.md +53 -3
- package/ai/components/auth-card.md +2 -0
- package/ai/components/bar-chart.md +4 -2
- package/ai/components/brand-logos.md +1 -1
- package/ai/components/button.md +86 -11
- package/ai/components/card.md +6 -3
- package/ai/components/celebration-dialog.md +66 -0
- package/ai/components/chart-share-card.md +25 -0
- package/ai/components/chart.md +27 -1
- package/ai/components/code-block.md +2 -1
- package/ai/components/collapsible.md +2 -2
- package/ai/components/command.md +4 -1
- package/ai/components/comparison-bars.md +1 -0
- package/ai/components/data-grid.md +2 -1
- package/ai/components/details-panel.md +5 -3
- package/ai/components/dialog.md +1 -0
- package/ai/components/empty.md +1 -1
- package/ai/components/field.md +15 -5
- package/ai/components/input.md +31 -6
- package/ai/components/leaderboard.md +5 -2
- package/ai/components/link.md +1 -1
- package/ai/components/list-item.md +5 -4
- package/ai/components/navigation-progress.md +55 -0
- package/ai/components/page-header.md +4 -4
- package/ai/components/popover.md +2 -0
- package/ai/components/quantity-stepper.md +3 -3
- package/ai/components/record-header.md +5 -5
- package/ai/components/rich-text-editor.md +2 -0
- package/ai/components/scaled-frame.md +4 -2
- package/ai/components/select.md +5 -2
- package/ai/components/settings-section.md +3 -0
- package/ai/components/sheet.md +10 -10
- package/ai/components/sidebar.md +21 -6
- package/ai/components/stat-card.md +7 -6
- package/ai/components/tabs.md +15 -4
- package/dist/components/activity-timeline/activity-timeline.d.ts +1 -1
- package/dist/components/activity-timeline/activity-timeline.js +2 -2
- package/dist/components/activity-timeline/activity-timeline.js.map +1 -1
- package/dist/components/alert/alert.d.ts +2 -1
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/alert.js +1 -1
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/app-top-bar/app-top-bar.d.ts +29 -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 +38 -12
- 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/auth-card/auth-card.d.ts +13 -1
- package/dist/components/auth-card/auth-card.d.ts.map +1 -1
- package/dist/components/auth-card/auth-card.js +5 -5
- package/dist/components/auth-card/auth-card.js.map +1 -1
- package/dist/components/badge/badge-status.d.ts +3 -3
- package/dist/components/badge/badge-status.js +3 -3
- package/dist/components/badge/badge-status.js.map +1 -1
- package/dist/components/bar-chart/bar-chart.d.ts +2 -1
- package/dist/components/bar-chart/bar-chart.d.ts.map +1 -1
- package/dist/components/bar-chart/bar-chart.js +2 -1
- package/dist/components/bar-chart/bar-chart.js.map +1 -1
- package/dist/components/brand-logos/brand-artwork.d.ts +99 -3
- package/dist/components/brand-logos/brand-artwork.d.ts.map +1 -1
- package/dist/components/brand-logos/brand-artwork.js +99 -3
- package/dist/components/brand-logos/brand-artwork.js.map +1 -1
- package/dist/components/brand-logos/brand-logos.d.ts +5 -2
- package/dist/components/brand-logos/brand-logos.d.ts.map +1 -1
- package/dist/components/brand-logos/brand-logos.js +46 -2
- package/dist/components/brand-logos/brand-logos.js.map +1 -1
- package/dist/components/button/button-narrow-label.d.ts +11 -0
- package/dist/components/button/button-narrow-label.d.ts.map +1 -0
- package/dist/components/button/button-narrow-label.js +22 -0
- package/dist/components/button/button-narrow-label.js.map +1 -0
- package/dist/components/button/button.d.ts +29 -6
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +71 -14
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/card/card.d.ts +16 -5
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.js +13 -4
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/celebration-dialog/celebration-dialog.d.ts +23 -0
- package/dist/components/celebration-dialog/celebration-dialog.d.ts.map +1 -0
- package/dist/components/celebration-dialog/celebration-dialog.js +158 -0
- package/dist/components/celebration-dialog/celebration-dialog.js.map +1 -0
- package/dist/components/celebration-dialog/index.d.ts +2 -0
- package/dist/components/celebration-dialog/index.d.ts.map +1 -0
- package/dist/components/celebration-dialog/index.js +2 -0
- package/dist/components/celebration-dialog/index.js.map +1 -0
- package/dist/components/chart-share-card/chart-share-card.d.ts +31 -0
- package/dist/components/chart-share-card/chart-share-card.d.ts.map +1 -0
- package/dist/components/chart-share-card/chart-share-card.js +15 -0
- package/dist/components/chart-share-card/chart-share-card.js.map +1 -0
- package/dist/components/chart-share-card/index.d.ts +2 -0
- package/dist/components/chart-share-card/index.d.ts.map +1 -0
- package/dist/components/chart-share-card/index.js +2 -0
- package/dist/components/chart-share-card/index.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +7 -2
- package/dist/components/code-block/code-block.d.ts.map +1 -1
- package/dist/components/code-block/code-block.js +49 -6
- package/dist/components/code-block/code-block.js.map +1 -1
- package/dist/components/code-block/highlight-code.d.ts +10 -0
- package/dist/components/code-block/highlight-code.d.ts.map +1 -0
- package/dist/components/code-block/highlight-code.js +45 -0
- package/dist/components/code-block/highlight-code.js.map +1 -0
- package/dist/components/code-block/highlight-shell.d.ts +9 -0
- package/dist/components/code-block/highlight-shell.d.ts.map +1 -0
- package/dist/components/code-block/highlight-shell.js +53 -0
- package/dist/components/code-block/highlight-shell.js.map +1 -0
- package/dist/components/collapsible/collapsible.d.ts +2 -2
- package/dist/components/collapsible/collapsible.js +4 -4
- package/dist/components/collapsible/collapsible.js.map +1 -1
- package/dist/components/command/command-palette.d.ts +15 -2
- package/dist/components/command/command-palette.d.ts.map +1 -1
- package/dist/components/command/command-palette.js +8 -5
- package/dist/components/command/command-palette.js.map +1 -1
- package/dist/components/comparison-bars/comparison-bars.d.ts +13 -2
- package/dist/components/comparison-bars/comparison-bars.d.ts.map +1 -1
- package/dist/components/comparison-bars/comparison-bars.js +3 -3
- package/dist/components/comparison-bars/comparison-bars.js.map +1 -1
- package/dist/components/data-grid/data-grid.d.ts +16 -1
- package/dist/components/data-grid/data-grid.d.ts.map +1 -1
- package/dist/components/data-grid/data-grid.js +94 -4
- package/dist/components/data-grid/data-grid.js.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +5 -0
- package/dist/components/date-picker/date-picker.d.ts.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/details-panel/details-panel.d.ts +11 -4
- package/dist/components/details-panel/details-panel.d.ts.map +1 -1
- package/dist/components/details-panel/details-panel.js +13 -12
- package/dist/components/details-panel/details-panel.js.map +1 -1
- package/dist/components/empty/empty.d.ts +3 -2
- package/dist/components/empty/empty.d.ts.map +1 -1
- package/dist/components/empty/empty.js.map +1 -1
- package/dist/components/field/field.d.ts +8 -6
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/field.js +15 -7
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/field/index.d.ts +1 -0
- package/dist/components/field/index.d.ts.map +1 -1
- package/dist/components/field/index.js +1 -0
- package/dist/components/field/index.js.map +1 -1
- package/dist/components/field/label.d.ts +2 -1
- package/dist/components/field/label.d.ts.map +1 -1
- package/dist/components/field/label.js +2 -1
- package/dist/components/field/label.js.map +1 -1
- package/dist/components/file-upload/file-upload.d.ts +1 -1
- package/dist/components/file-upload/file-upload.d.ts.map +1 -1
- package/dist/components/icon-morph/icon-morph.d.ts +1 -1
- package/dist/components/icon-morph/icon-morph.d.ts.map +1 -1
- package/dist/components/icon-morph/icon-morph.js.map +1 -1
- package/dist/components/input/input-suggestions.d.ts +1 -1
- package/dist/components/input/input-suggestions.d.ts.map +1 -1
- package/dist/components/input/input-suggestions.js +21 -4
- package/dist/components/input/input-suggestions.js.map +1 -1
- package/dist/components/input/input.d.ts +21 -8
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +18 -8
- 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.d.ts.map +1 -1
- package/dist/components/leaderboard/leaderboard.d.ts +3 -1
- package/dist/components/leaderboard/leaderboard.d.ts.map +1 -1
- package/dist/components/leaderboard/leaderboard.js +7 -5
- package/dist/components/leaderboard/leaderboard.js.map +1 -1
- package/dist/components/link/link.d.ts +4 -3
- package/dist/components/link/link.d.ts.map +1 -1
- package/dist/components/link/link.js +21 -2
- package/dist/components/link/link.js.map +1 -1
- package/dist/components/list-item/list-item.d.ts +10 -4
- package/dist/components/list-item/list-item.d.ts.map +1 -1
- package/dist/components/list-item/list-item.js +4 -4
- package/dist/components/list-item/list-item.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/milestone/milestone.js +1 -1
- package/dist/components/milestone/milestone.js.map +1 -1
- package/dist/components/money/money.d.ts.map +1 -1
- package/dist/components/money/money.js +3 -3
- package/dist/components/money/money.js.map +1 -1
- package/dist/components/navigation-progress/index.d.ts +2 -0
- package/dist/components/navigation-progress/index.d.ts.map +1 -0
- package/dist/components/navigation-progress/index.js +2 -0
- package/dist/components/navigation-progress/index.js.map +1 -0
- package/dist/components/navigation-progress/navigation-progress.d.ts +23 -0
- package/dist/components/navigation-progress/navigation-progress.d.ts.map +1 -0
- package/dist/components/navigation-progress/navigation-progress.js +53 -0
- package/dist/components/navigation-progress/navigation-progress.js.map +1 -0
- package/dist/components/page-header/page-header.d.ts +3 -3
- package/dist/components/page-header/page-header.d.ts.map +1 -1
- package/dist/components/page-header/page-header.js +5 -8
- package/dist/components/page-header/page-header.js.map +1 -1
- package/dist/components/popover/popover.d.ts +5 -1
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js +4 -2
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/quantity-stepper/quantity-stepper.d.ts +3 -3
- package/dist/components/quantity-stepper/quantity-stepper.js +2 -2
- package/dist/components/quantity-stepper/quantity-stepper.js.map +1 -1
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group/radio-group.js +6 -4
- package/dist/components/radio-group/radio-group.js.map +1 -1
- package/dist/components/record-header/record-header.d.ts +7 -3
- package/dist/components/record-header/record-header.d.ts.map +1 -1
- package/dist/components/record-header/record-header.js +11 -3
- package/dist/components/record-header/record-header.js.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +13 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.js +17 -9
- package/dist/components/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/components/rich-text-editor/rich-text-extensions.d.ts +5 -2
- package/dist/components/rich-text-editor/rich-text-extensions.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-extensions.js +43 -5
- package/dist/components/rich-text-editor/rich-text-extensions.js.map +1 -1
- package/dist/components/rich-text-editor/rich-text-markdown.d.ts +9 -3
- package/dist/components/rich-text-editor/rich-text-markdown.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-markdown.js +134 -44
- package/dist/components/rich-text-editor/rich-text-markdown.js.map +1 -1
- package/dist/components/scaled-frame/scaled-frame.d.ts +2 -1
- package/dist/components/scaled-frame/scaled-frame.d.ts.map +1 -1
- package/dist/components/scaled-frame/scaled-frame.js +8 -2
- package/dist/components/scaled-frame/scaled-frame.js.map +1 -1
- package/dist/components/select/select.d.ts +6 -3
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +12 -7
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/settings-section/settings-section.d.ts +8 -1
- package/dist/components/settings-section/settings-section.d.ts.map +1 -1
- package/dist/components/settings-section/settings-section.js +8 -8
- package/dist/components/settings-section/settings-section.js.map +1 -1
- package/dist/components/setup-guide/setup-guide.d.ts +2 -2
- package/dist/components/setup-guide/setup-guide.js +2 -2
- package/dist/components/setup-guide/setup-guide.js.map +1 -1
- package/dist/components/sheet/sheet.d.ts +16 -5
- package/dist/components/sheet/sheet.d.ts.map +1 -1
- package/dist/components/sheet/sheet.js +9 -5
- package/dist/components/sheet/sheet.js.map +1 -1
- package/dist/components/sidebar/index.d.ts +1 -1
- package/dist/components/sidebar/index.d.ts.map +1 -1
- package/dist/components/sidebar/index.js +1 -1
- package/dist/components/sidebar/index.js.map +1 -1
- package/dist/components/sidebar/sidebar.d.ts +37 -10
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar.js +75 -27
- package/dist/components/sidebar/sidebar.js.map +1 -1
- package/dist/components/skeleton/page-skeleton.js +1 -1
- package/dist/components/skeleton/page-skeleton.js.map +1 -1
- package/dist/components/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton/skeleton.js +1 -1
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/stat-card/stat-card.d.ts +24 -10
- package/dist/components/stat-card/stat-card.d.ts.map +1 -1
- package/dist/components/stat-card/stat-card.js +27 -18
- package/dist/components/stat-card/stat-card.js.map +1 -1
- package/dist/components/tabs/index.d.ts +1 -1
- package/dist/components/tabs/index.d.ts.map +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/index.js.map +1 -1
- package/dist/components/tabs/tabs.d.ts +18 -6
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +96 -7
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/icons/flags/basque.d.ts.map +1 -0
- package/dist/icons/flags/basque.js.map +1 -0
- package/dist/icons/flags/canary-islands.d.ts.map +1 -0
- package/dist/icons/flags/canary-islands.js.map +1 -0
- package/dist/icons/flags/england.d.ts.map +1 -0
- package/dist/icons/flags/england.js.map +1 -0
- package/dist/icons/flags/hawaii.d.ts.map +1 -0
- package/dist/icons/flags/hawaii.js.map +1 -0
- package/dist/icons/flags/kurdistan.d.ts.map +1 -0
- package/dist/icons/flags/kurdistan.js.map +1 -0
- package/dist/icons/flags/netherlands-antilles.d.ts.map +1 -0
- package/dist/icons/flags/netherlands-antilles.js.map +1 -0
- package/dist/icons/flags/northen-ireland.d.ts.map +1 -0
- package/dist/icons/flags/northen-ireland.js.map +1 -0
- package/dist/icons/flags/scotland.d.ts.map +1 -0
- package/dist/icons/flags/scotland.js.map +1 -0
- package/dist/icons/flags/wales.d.ts.map +1 -0
- package/dist/icons/flags/wales.js.map +1 -0
- package/dist/icons/index.d.ts +12 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +12 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/icons/ui/ai-agents.d.ts +3 -0
- package/dist/icons/ui/ai-agents.d.ts.map +1 -0
- package/dist/icons/ui/ai-agents.js +5 -0
- package/dist/icons/ui/ai-agents.js.map +1 -0
- package/dist/icons/ui/archive.d.ts.map +1 -0
- package/dist/icons/ui/archive.js.map +1 -0
- package/dist/icons/ui/arrow-door-out-3.d.ts.map +1 -0
- package/dist/icons/ui/arrow-door-out-3.js.map +1 -0
- package/dist/icons/ui/arrow-door-out.d.ts.map +1 -0
- package/dist/icons/ui/arrow-door-out.js.map +1 -0
- package/dist/icons/ui/arrow-left.d.ts.map +1 -0
- package/dist/icons/ui/arrow-left.js.map +1 -0
- package/dist/icons/ui/arrows-transaction.d.ts.map +1 -0
- package/dist/icons/ui/arrows-transaction.js.map +1 -0
- package/dist/icons/ui/bell-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/bell-outline-duo.js.map +1 -0
- package/dist/icons/ui/bolt.d.ts.map +1 -0
- package/dist/icons/ui/bolt.js.map +1 -0
- package/dist/icons/ui/book-open.d.ts +3 -0
- package/dist/icons/ui/book-open.d.ts.map +1 -0
- package/dist/icons/ui/book-open.js +5 -0
- package/dist/icons/ui/book-open.js.map +1 -0
- package/dist/icons/ui/box-glyph.d.ts.map +1 -0
- package/dist/icons/ui/box-glyph.js.map +1 -0
- package/dist/icons/ui/box-plus.d.ts.map +1 -0
- package/dist/icons/ui/box-plus.js.map +1 -0
- package/dist/icons/ui/chart-pie.d.ts.map +1 -0
- package/dist/icons/ui/chart-pie.js.map +1 -0
- package/dist/icons/ui/chat-bubble-writing.d.ts +3 -0
- package/dist/icons/ui/chat-bubble-writing.d.ts.map +1 -0
- package/dist/icons/ui/chat-bubble-writing.js +5 -0
- package/dist/icons/ui/chat-bubble-writing.js.map +1 -0
- package/dist/icons/ui/check-glyph-12.d.ts.map +1 -0
- package/dist/icons/ui/check-glyph-12.js.map +1 -0
- package/dist/icons/ui/circle-check-glyph.d.ts.map +1 -0
- package/dist/icons/ui/circle-check-glyph.js.map +1 -0
- package/dist/icons/ui/circle-user-check.d.ts.map +1 -0
- package/dist/icons/ui/circle-user-check.js.map +1 -0
- package/dist/icons/ui/coins.d.ts.map +1 -0
- package/dist/icons/ui/coins.js.map +1 -0
- package/dist/icons/ui/dots-vertical.d.ts.map +1 -0
- package/dist/icons/ui/dots-vertical.js.map +1 -0
- package/dist/icons/ui/fingerprint.d.ts.map +1 -0
- package/dist/icons/ui/fingerprint.js.map +1 -0
- package/dist/icons/ui/flask.d.ts.map +1 -0
- package/dist/icons/ui/flask.js.map +1 -0
- package/dist/icons/ui/gear.d.ts.map +1 -0
- package/dist/icons/ui/gear.js.map +1 -0
- package/dist/icons/ui/greek-temple-glyph.d.ts.map +1 -0
- package/dist/icons/ui/greek-temple-glyph.js.map +1 -0
- package/dist/icons/ui/greek-temple.d.ts.map +1 -0
- package/dist/icons/ui/greek-temple.js.map +1 -0
- package/dist/icons/ui/grid.d.ts +3 -0
- package/dist/icons/ui/grid.d.ts.map +1 -0
- package/dist/icons/ui/grid.js +5 -0
- package/dist/icons/ui/grid.js.map +1 -0
- package/dist/icons/ui/heart-glyph.d.ts.map +1 -0
- package/dist/icons/ui/heart-glyph.js.map +1 -0
- package/dist/icons/ui/heart.d.ts.map +1 -0
- package/dist/icons/ui/heart.js.map +1 -0
- package/dist/icons/ui/hourglass-glyph.d.ts.map +1 -0
- package/dist/icons/ui/hourglass-glyph.js.map +1 -0
- package/dist/icons/ui/house.d.ts.map +1 -0
- package/dist/icons/ui/house.js.map +1 -0
- package/dist/icons/ui/key.d.ts.map +1 -0
- package/dist/icons/ui/key.js.map +1 -0
- package/dist/icons/ui/lightbulb.d.ts +3 -0
- package/dist/icons/ui/lightbulb.d.ts.map +1 -0
- package/dist/icons/ui/lightbulb.js +5 -0
- package/dist/icons/ui/lightbulb.js.map +1 -0
- package/dist/icons/ui/link.d.ts +3 -0
- package/dist/icons/ui/link.d.ts.map +1 -0
- package/dist/icons/ui/link.js +5 -0
- package/dist/icons/ui/link.js.map +1 -0
- package/dist/icons/ui/media-pause.d.ts +3 -0
- package/dist/icons/ui/media-pause.d.ts.map +1 -0
- package/dist/icons/ui/media-pause.js +5 -0
- package/dist/icons/ui/media-pause.js.map +1 -0
- package/dist/icons/ui/media-play.d.ts +3 -0
- package/dist/icons/ui/media-play.d.ts.map +1 -0
- package/dist/icons/ui/media-play.js +5 -0
- package/dist/icons/ui/media-play.js.map +1 -0
- package/dist/icons/ui/money-bill.d.ts.map +1 -0
- package/dist/icons/ui/money-bill.js.map +1 -0
- package/dist/icons/ui/money-bills.d.ts.map +1 -0
- package/dist/icons/ui/money-bills.js.map +1 -0
- package/dist/icons/ui/money-refund.d.ts.map +1 -0
- package/dist/icons/ui/money-refund.js.map +1 -0
- package/dist/icons/ui/monitor.d.ts.map +1 -0
- package/dist/icons/ui/monitor.js.map +1 -0
- package/dist/icons/ui/moon.d.ts.map +1 -0
- package/dist/icons/ui/moon.js.map +1 -0
- package/dist/icons/ui/paper-plane.d.ts +3 -0
- package/dist/icons/ui/paper-plane.d.ts.map +1 -0
- package/dist/icons/ui/paper-plane.js +5 -0
- package/dist/icons/ui/paper-plane.js.map +1 -0
- package/dist/icons/ui/pencil.d.ts.map +1 -0
- package/dist/icons/ui/pencil.js.map +1 -0
- package/dist/icons/ui/print.d.ts +3 -0
- package/dist/icons/ui/print.d.ts.map +1 -0
- package/dist/icons/ui/print.js +5 -0
- package/dist/icons/ui/print.js.map +1 -0
- package/dist/icons/ui/refresh-clockwise.d.ts.map +1 -0
- package/dist/icons/ui/refresh-clockwise.js.map +1 -0
- package/dist/icons/ui/report.d.ts.map +1 -0
- package/dist/icons/ui/report.js.map +1 -0
- package/dist/icons/ui/shield-check.d.ts.map +1 -0
- package/dist/icons/ui/shield-check.js.map +1 -0
- package/dist/icons/ui/shop-glyph.d.ts.map +1 -0
- package/dist/icons/ui/shop-glyph.js.map +1 -0
- package/dist/icons/ui/sliders.d.ts.map +1 -0
- package/dist/icons/ui/sliders.js.map +1 -0
- package/dist/icons/ui/star-glyph-duo.d.ts.map +1 -0
- package/dist/icons/ui/star-glyph-duo.js.map +1 -0
- package/dist/icons/ui/star-glyph.d.ts.map +1 -0
- package/dist/icons/ui/star-glyph.js.map +1 -0
- package/dist/icons/ui/star-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/star-outline-duo.js.map +1 -0
- package/dist/icons/ui/star.d.ts.map +1 -0
- package/dist/icons/ui/star.js.map +1 -0
- package/dist/icons/ui/sun.d.ts.map +1 -0
- package/dist/icons/ui/sun.js.map +1 -0
- package/dist/icons/ui/terminal.d.ts.map +1 -0
- package/dist/icons/ui/terminal.js.map +1 -0
- package/dist/icons/ui/text-align-center.d.ts.map +1 -0
- package/dist/icons/ui/text-align-center.js.map +1 -0
- package/dist/icons/ui/text-align-left.d.ts.map +1 -0
- package/dist/icons/ui/text-align-left.js.map +1 -0
- package/dist/icons/ui/text-align-right.d.ts.map +1 -0
- package/dist/icons/ui/text-align-right.js.map +1 -0
- package/dist/icons/ui/ticket.d.ts.map +1 -0
- package/dist/icons/ui/ticket.js.map +1 -0
- package/dist/icons/ui/trash-2.d.ts.map +1 -0
- package/dist/icons/ui/trash-2.js.map +1 -0
- package/dist/icons/ui/triangle-warning-glyph.d.ts.map +1 -0
- package/dist/icons/ui/triangle-warning-glyph.js.map +1 -0
- package/dist/icons/ui/user-glyph.d.ts.map +1 -0
- package/dist/icons/ui/user-glyph.js.map +1 -0
- package/dist/icons/ui/user-plus.d.ts +3 -0
- package/dist/icons/ui/user-plus.d.ts.map +1 -0
- package/dist/icons/ui/user-plus.js +5 -0
- package/dist/icons/ui/user-plus.js.map +1 -0
- package/dist/icons/ui/users.d.ts.map +1 -0
- package/dist/icons/ui/users.js.map +1 -0
- package/dist/icons/ui/wallet-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/wallet-outline-duo.js.map +1 -0
- package/dist/icons/ui/wallet.d.ts.map +1 -0
- package/dist/icons/ui/wallet.js.map +1 -0
- package/dist/icons/ui/wand-sparkle.d.ts.map +1 -0
- package/dist/icons/ui/wand-sparkle.js.map +1 -0
- package/dist/icons/ui/wifi-off.d.ts +3 -0
- package/dist/icons/ui/wifi-off.d.ts.map +1 -0
- package/dist/icons/ui/wifi-off.js +5 -0
- package/dist/icons/ui/wifi-off.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/primitives/charts/bar-chart.d.ts.map +1 -1
- package/dist/primitives/charts/bar-chart.js +33 -3
- package/dist/primitives/charts/bar-chart.js.map +1 -1
- package/dist/primitives/charts/line.d.ts.map +1 -1
- package/dist/primitives/charts/line.js +14 -11
- package/dist/primitives/charts/line.js.map +1 -1
- package/dist/primitives/charts/x-axis.d.ts +12 -1
- package/dist/primitives/charts/x-axis.d.ts.map +1 -1
- package/dist/primitives/charts/x-axis.js +96 -20
- package/dist/primitives/charts/x-axis.js.map +1 -1
- package/dist/primitives/charts/y-axis-scales.d.ts +3 -1
- package/dist/primitives/charts/y-axis-scales.d.ts.map +1 -1
- package/dist/primitives/charts/y-axis-scales.js +2 -2
- package/dist/primitives/charts/y-axis-scales.js.map +1 -1
- package/dist/primitives/charts/y-axis.d.ts +5 -0
- package/dist/primitives/charts/y-axis.d.ts.map +1 -1
- package/dist/primitives/charts/y-axis.js +6 -2
- package/dist/primitives/charts/y-axis.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/button.d.ts.map +1 -1
- package/dist/primitives/ui/button.js +4 -2
- package/dist/primitives/ui/button.js.map +1 -1
- package/dist/primitives/ui/card.d.ts.map +1 -1
- package/dist/primitives/ui/card.js +9 -7
- package/dist/primitives/ui/card.js.map +1 -1
- package/dist/primitives/ui/dialog.d.ts +3 -1
- package/dist/primitives/ui/dialog.d.ts.map +1 -1
- package/dist/primitives/ui/dialog.js +5 -4
- package/dist/primitives/ui/dialog.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/select.js +3 -3
- package/dist/primitives/ui/select.js.map +1 -1
- package/dist/primitives/ui/switch.d.ts +2 -2
- package/dist/primitives/ui/switch.d.ts.map +1 -1
- package/dist/primitives/ui/switch.js +2 -2
- package/dist/primitives/ui/switch.js.map +1 -1
- package/dist/primitives/ui/textarea.js +1 -1
- package/dist/primitives/ui/textarea.js.map +1 -1
- package/dist/styles/extensions.css +9 -0
- package/dist/styles/theme.css +1 -1
- package/dist/styles/tokens.css +16 -26
- package/dist/styles/tokens.test.tsx +0 -3
- package/package.json +1 -1
package/ai/component-registry.md
CHANGED
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
- **Skeleton** (`@dodopayments/ui/skeleton`, Feedback): A grey placeholder shown while content loads (Dodo Nest Skeleton), sized like the thing it replaces: `shape="line"`
|
|
73
73
|
- **Slider** (`@dodopayments/ui/slider`, Forms): Picks a number, or a range with two thumbs, by dragging or with the keyboard: the Dodo Nest Slider. A 4px
|
|
74
74
|
- **Spinner** (`@dodopayments/ui/spinner`, Feedback): Loading indicator for a wait with no known layout or progress (Dodo Nest Spinner): a 20 × 20 ring,
|
|
75
|
+
- **Navigation progress** (`@dodopayments/ui/navigation-progress`, Feedback): Navigation progress: a 2px bar in the brand green (Content/Brand-primary) fixed across the very top
|
|
75
76
|
- **Text Shimmer** (`@dodopayments/ui/text-shimmer`, Typography): Text with a highlight sweeping across it, for "in progress" labels such as "Generating report...".
|
|
76
77
|
- **Switch** (`@dodopayments/ui/switch`, Forms): An on/off toggle for settings that take effect immediately. Renders the `Switch` primitive (Base UI): a
|
|
77
78
|
- **Segmented control** (`@dodopayments/ui/segmented-control`, Actions): Switches between 2–3 views or values of the same thing (Dodo Nest Segmented control): a chart range
|
|
@@ -86,6 +87,7 @@
|
|
|
86
87
|
- **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
|
|
87
88
|
- **Milestone** (`@dodopayments/ui/milestone`, Data display): A milestone on the Milestones page (Design File › Merchant Milestones). `state="achieved"` is a reached milestone:
|
|
88
89
|
- **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
|
|
90
|
+
- **Chart share card** (`@dodopayments/ui/chart-share-card`, Data display): An analytics card as an image to share (the dashboard's Analytics and Home, Share): the card at a fixed design
|
|
89
91
|
- **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
|
|
90
92
|
- **Filter Grid** (`@dodopayments/ui/filter-grid`, Data display): Filter chips over a grid of cards, after interior.dev's filter grid
|
|
91
93
|
- **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
|
|
@@ -104,6 +106,7 @@
|
|
|
104
106
|
- **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
107
|
- **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,
|
|
106
108
|
- **Payment Result** (`@dodopayments/ui/payment-result`, Blocks): Receipt card for the page a customer lands on after paying, ported from the checkout status page:
|
|
109
|
+
- **Celebration Dialog** (`@dodopayments/ui/celebration-dialog`, Blocks): The dialog that marks a milestone, as the dashboard shows when setup reaches 100% in live mode: a 296px hero of
|
|
107
110
|
- **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
|
|
108
111
|
- **Payment Method List** (`@dodopayments/ui/payment-method-list`, Blocks): Card listing saved payment methods or bank accounts, after the customer portal's payment methods
|
|
109
112
|
- **Plan Picker** (`@dodopayments/ui/plan-picker`, Blocks): Plan chooser for checkout and change-plan flows, ported from the checkout product collection and
|
|
@@ -45,7 +45,7 @@ One event of an `ActivityTimeline` (Figma `.Timeline event`), rendered as an `li
|
|
|
45
45
|
(a 20px Featured icon in the tone, or a dot) with a 1px line to the next event, the title and
|
|
46
46
|
description, and a `Timestamp` at the trailing end, all starting on the title's line, 12 apart and
|
|
47
47
|
20 above the next event. Below a 28rem row the date sits over the time, right-aligned (Figma
|
|
48
|
-
Breakpoint mobile). Use it inside an `ol`; `ActivityTimeline` does this for you.
|
|
48
|
+
Breakpoint mobile); below an 18rem row (a phone) the time goes under the title and description. Use it inside an `ol`; `ActivityTimeline` does this for you.
|
|
49
49
|
|
|
50
50
|
| Prop | Type | Default | Description |
|
|
51
51
|
| --- | --- | --- | --- |
|
package/ai/components/alert.md
CHANGED
|
@@ -18,7 +18,7 @@ default; pass `role="alert"` when it appears in response to an error the user mu
|
|
|
18
18
|
|
|
19
19
|
| Prop | Type | Default | Description |
|
|
20
20
|
| --- | --- | --- | --- |
|
|
21
|
-
| `action` | `ReactNode` | - | The action: an inline `Link` for inline and page alerts, a secondary `Button` (size `xs`) for the banner. It stays on the first line when the message wraps. |
|
|
21
|
+
| `action` | `ReactNode` | - | The action: an inline `Link` for inline and page alerts, a secondary `Button` (size `xs`) for the banner. It stays on the first line when the message wraps; when the message would get less than 12rem beside it (an inline or page alert in a narrow card), it moves under the message. |
|
|
22
22
|
| `dismissLabel` | `string` | `"Dismiss"` | Accessible label of the dismiss button. |
|
|
23
23
|
| `icon` | `ReactNode` | - | Leading icon. Defaults to the tone's icon; pass `null` to hide it. |
|
|
24
24
|
| `onDismiss` | `(() => void)` | - | Called when the user dismisses the alert. Setting it shows the ✕; the alert fades out over 150ms and is then removed. Page strips cannot be dismissed. |
|
|
@@ -6,7 +6,7 @@ notifications and the account on the right. Below a 672px bar it collapses: a me
|
|
|
6
6
|
search becomes an icon and Games, Milestones or Setup guide, Dodo AI, chat and theme move into a ••• Menu. It has no fill: put it first in the main panel.
|
|
7
7
|
|
|
8
8
|
```tsx
|
|
9
|
-
import { AppTopBar, AppTopBarGamesButton, AppTopBarMilestonesRing } from "@dodopayments/ui/app-top-bar";
|
|
9
|
+
import { AppTopBar, AppTopBarGamesButton, AppTopBarMilestonesRing, AppTopBarSupportItem } from "@dodopayments/ui/app-top-bar";
|
|
10
10
|
```
|
|
11
11
|
|
|
12
12
|
## AppTopBar
|
|
@@ -25,6 +25,7 @@ search becomes an icon and Games, Milestones or Setup guide, Dodo AI, chat and t
|
|
|
25
25
|
| `labels` | `AppTopBarLabels` | - | |
|
|
26
26
|
| `milestonesProgress` | `number` | `0` | Share of milestones done, 0–1: the ring on the Milestones button. |
|
|
27
27
|
| `notifications` | `ReactNode` | - | What the bell opens: the children of a `size="lg"` `PopoverContent` (a `PopoverHeader`, then a `PopoverPanel`), 8 below the bell with right edges aligned. Without it the bell calls `onOpenNotifications`. |
|
|
28
|
+
| `notificationsCount` | `number` | - | Unseen notifications, shown on the bell (99+ past 99) and named in its label. Hidden at 0. |
|
|
28
29
|
| `onOpenAccount` | `(() => void)` | - | |
|
|
29
30
|
| `onOpenAi` | `(() => void)` | - | |
|
|
30
31
|
| `onOpenChat` | `(() => void)` | - | |
|
|
@@ -37,12 +38,13 @@ search becomes an icon and Games, Milestones or Setup guide, Dodo AI, chat and t
|
|
|
37
38
|
| `onToggleTheme` | `((next: AppTopBarTheme) => void)` | - | Called with the theme to switch to when the toggle (or the mobile menu switch) is pressed. |
|
|
38
39
|
| `searchShortcut` | `boolean` | `true` | Whether the `/` key calls `onSearch`. Turn it off when something else owns `/`, or when several bars share a page. |
|
|
39
40
|
| `setupGuideProgress` | `number` | `0` | Share of setup done, 0–1: the ring on the Setup guide button. |
|
|
40
|
-
| `showAi` | `boolean` | `true` | Show the Dodo AI button (violet
|
|
41
|
+
| `showAi` | `boolean` | `true` | Show the Dodo AI button (violet sparkle, Nucleo `add-magic`). |
|
|
41
42
|
| `showGames` | `boolean` | `true` | Show the Dodo Games button. |
|
|
42
43
|
| `showMilestones` | `boolean` | `true` | Show the Milestones button. |
|
|
43
44
|
| `showSetupGuide` | `boolean` | `false` | Show the Setup guide button in the Milestones slot, for a business that has not finished setting up. It takes the place of Milestones (never both). |
|
|
45
|
+
| `support` | `ReactNode` | - | The dashboard's help panel: `AppTopBarSupportItem` rows (Discord, chat, feature requests, docs) in a 300 wide popover over a dot field, 12 below its button with right edges aligned. It replaces the chat button, and stays in the bar on a phone. Without it the chat button calls `onOpenChat`. |
|
|
44
46
|
| `theme` | `AppTopBarTheme` | - | The theme the page shows: the toggle morphs sun → moon for `"dark"`. Pass it with `onToggleTheme` to control it; without it the toggle keeps its own state from `defaultTheme`. |
|
|
45
|
-
| `user` | `AppTopBarUser` | - | Shows the user's avatar instead of the user icon on the account button. |
|
|
47
|
+
| `user` | `AppTopBarUser` | - | Shows the user's avatar instead of the user icon on the account button: a 36px rounded square, as tall as the icon buttons beside it. |
|
|
46
48
|
|
|
47
49
|
## AppTopBarGamesButton
|
|
48
50
|
|
|
@@ -64,6 +66,18 @@ Content/Primary arc from 12 o'clock. Decorative.
|
|
|
64
66
|
| `progress` (required) | `number` | - | Share done, 0–1. |
|
|
65
67
|
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
66
68
|
|
|
69
|
+
## AppTopBarSupportItem
|
|
70
|
+
|
|
71
|
+
One row of the help panel: a bordered secondary row with an icon and a label. A button row closes the panel; an
|
|
72
|
+
`href` row opens its page in a new tab and leaves the panel open, as the dashboard's does.
|
|
73
|
+
|
|
74
|
+
| Prop | Type | Default | Description |
|
|
75
|
+
| --- | --- | --- | --- |
|
|
76
|
+
| `icon` (required) | `ReactNode` | - | Leading 20px Nucleo icon. |
|
|
77
|
+
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
78
|
+
| `href` | `string` | - | Makes the row a link that opens in a new tab, e.g. the docs or the Discord server. |
|
|
79
|
+
| `onClick` | `(() => void)` | - | |
|
|
80
|
+
|
|
67
81
|
## Examples
|
|
68
82
|
|
|
69
83
|
### app-top-bar/callbacks
|
|
@@ -306,3 +320,39 @@ export default function AppTopBarSetupGuide() {
|
|
|
306
320
|
}
|
|
307
321
|
```
|
|
308
322
|
|
|
323
|
+
### app-top-bar/support
|
|
324
|
+
|
|
325
|
+
```tsx
|
|
326
|
+
"use client";
|
|
327
|
+
|
|
328
|
+
import { AppTopBar, AppTopBarSupportItem } from "@dodopayments/ui/app-top-bar";
|
|
329
|
+
import { BrandLogo } from "@dodopayments/ui/brand-logos";
|
|
330
|
+
import { BookOpenIcon, ChatBubbleIcon, LightbulbIcon } from "@dodopayments/ui/icons";
|
|
331
|
+
|
|
332
|
+
export default function AppTopBarSupport() {
|
|
333
|
+
return (
|
|
334
|
+
<div className="w-full">
|
|
335
|
+
<AppTopBar
|
|
336
|
+
// The hero above owns the / key on this page.
|
|
337
|
+
searchShortcut={false}
|
|
338
|
+
support={
|
|
339
|
+
<>
|
|
340
|
+
<AppTopBarSupportItem
|
|
341
|
+
icon={<BrandLogo brand="discord" />}
|
|
342
|
+
href="https://discord.gg/bYqAp4ayYh"
|
|
343
|
+
>
|
|
344
|
+
Join Our Discord Community
|
|
345
|
+
</AppTopBarSupportItem>
|
|
346
|
+
<AppTopBarSupportItem icon={<ChatBubbleIcon />}>Chat Support</AppTopBarSupportItem>
|
|
347
|
+
<AppTopBarSupportItem icon={<LightbulbIcon />}>Feature Requests</AppTopBarSupportItem>
|
|
348
|
+
<AppTopBarSupportItem icon={<BookOpenIcon />} href="https://docs.dodopayments.com">
|
|
349
|
+
Visit Docs
|
|
350
|
+
</AppTopBarSupportItem>
|
|
351
|
+
</>
|
|
352
|
+
}
|
|
353
|
+
/>
|
|
354
|
+
</div>
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
```
|
|
358
|
+
|
|
@@ -32,6 +32,7 @@ labelled by the heading.
|
|
|
32
32
|
| --- | --- | --- | --- |
|
|
33
33
|
| `title` (required) | `ReactNode` | - | Heading of the email and password steps, e.g. "Sign in to Dodo Payments". |
|
|
34
34
|
| `actions` | `readonly AuthCardProviderOption[]` | - | More ways to sign in as secondary buttons at the end of the email and password steps, after "Log in with OTP", e.g. `{ id: "passkey", label: "Sign in with passkey", icon: <KeyIcon /> }`. The `id` is passed to `onActionSelect` and matched against `lastUsedProvider`. |
|
|
35
|
+
| `autoFocus` | `boolean` | `false` | Focus the step's field when the card mounts (the email field on the email step), for a page whose one task is signing in. The card always moves focus when the step changes. |
|
|
35
36
|
| `backLabel` | `ReactNode` | `"Use a different email"` | Label of the back button. |
|
|
36
37
|
| `codeDescription` | `ReactNode` | `"Enter the {codeLength}-digit code we sent to {email}."` | Text under the heading of the code step. |
|
|
37
38
|
| `codeLabel` | `string` | `"Verification code"` | Accessible name of the code field (it has no visible label). |
|
|
@@ -41,6 +42,7 @@ labelled by the heading.
|
|
|
41
42
|
| `description` | `ReactNode` | - | Text under the title on the email and password steps, e.g. "Don't have an account? Sign up". |
|
|
42
43
|
| `dividerLabel` | `ReactNode` | `"Or"` | Text of the divider between `providers` and the email form. |
|
|
43
44
|
| `email` | `string` | - | Email address (controlled). It persists across steps and is quoted on the code and sent steps. |
|
|
45
|
+
| `emailAutoComplete` | `string` | `"email" on the email step, "username" on the password step` | `autocomplete` of the email field, e.g. `"username webauthn"` to list saved passkeys in its autofill (with a conditional WebAuthn request started on load). |
|
|
44
46
|
| `emailLabel` | `ReactNode` | `"Enter your email"` | Label of the email field. |
|
|
45
47
|
| `emailPlaceholder` | `string` | `"you@example.com"` | Placeholder of the email field. |
|
|
46
48
|
| `error` | `ReactNode` | - | Error of the last attempt, e.g. "Incorrect email or password." Shown and announced under the email field, the password field or the code, which are marked invalid (the code field shakes once). It never blocks another attempt; clear it when the user edits the field or tries again. |
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Values per category as bars, on the bklit `BarChart` primitive (visx). Compose it from children:
|
|
4
4
|
one `Bar` per series (`dataKey`), `BarXAxis` (vertical) or `BarYAxis` (horizontal), `ChartGrid`,
|
|
5
|
-
`ChartTooltip`.
|
|
5
|
+
`ChartTooltip`. A vertical chart rounds its value axis up to the `YAxis` `numTicks` (else the `ChartGrid` rows),
|
|
6
|
+
so the top of the plot is a labelled line. Several `Bar`s group side by side; `stacked` stacks them. `orientation="horizontal"`
|
|
6
7
|
puts the categories on the y-axis. `BarSquares` draws a series as square cells, and
|
|
7
8
|
`BarDepthBack` / `BarDepthFront` add a 3D glass look. Rows are objects with a category under
|
|
8
9
|
`xDataKey` (default `"name"`) and a number under each `dataKey`. Bars grow from the baseline on
|
|
@@ -18,7 +19,8 @@ import { BarChart, Bar, BarXAxis, BarYAxis, BarChartLoading, BarLoadingSkeleton,
|
|
|
18
19
|
|
|
19
20
|
Values per category as bars, on the bklit `BarChart` primitive (visx). Compose it from children:
|
|
20
21
|
one `Bar` per series (`dataKey`), `BarXAxis` (vertical) or `BarYAxis` (horizontal), `ChartGrid`,
|
|
21
|
-
`ChartTooltip`.
|
|
22
|
+
`ChartTooltip`. A vertical chart rounds its value axis up to the `YAxis` `numTicks` (else the `ChartGrid` rows),
|
|
23
|
+
so the top of the plot is a labelled line. Several `Bar`s group side by side; `stacked` stacks them. `orientation="horizontal"`
|
|
22
24
|
puts the categories on the y-axis. `BarSquares` draws a series as square cells, and
|
|
23
25
|
`BarDepthBack` / `BarDepthFront` add a 3D glass look. Rows are objects with a category under
|
|
24
26
|
`xDataKey` (default `"name"`) and a number under each `dataKey`. Bars grow from the baseline on
|
|
@@ -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" \| "discord" \| "telegram" \| "notion" \| "framer" \| "figma"` | - | Which brand's mark to draw. |
|
|
19
|
+
| `brand` (required) | `"meta" \| "cursor" \| "close" \| "github" \| "gitlab" \| "terraform" \| "vercel" \| "google-cloud" \| "aws" \| "kubernetes" \| "google-analytics" \| "google-tag-manager" \| "stripe" \| "adyen" \| "dodo-payments" \| "discord" \| "telegram" \| "notion" \| "framer" \| "figma" \| "claude" \| "openai" \| "opencode" \| "vscode" \| "windsurf" \| "slack" \| "microsoft-teams" \| "hubspot" \| "salesforce" \| "resend" \| "sendgrid" \| "loops" \| "customer-io" \| "segment" \| "opentelemetry" \| "zapier" \| "windmill"` | - | 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
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
# Button
|
|
2
2
|
|
|
3
3
|
Triggers an action. Renders the `Button` primitive on Base UI `Button`, which always has button
|
|
4
|
-
semantics. For navigation, do not render a link through `Button`;
|
|
5
|
-
`buttonVariants()`: `<Link href="/x" className={buttonVariants({ variant: "secondary" })}>`.
|
|
4
|
+
semantics. For navigation, do not render a link through `Button`; use `ButtonLink`, or style the
|
|
5
|
+
link itself with `buttonVariants()`: `<Link href="/x" className={buttonVariants({ variant: "secondary" })}>`.
|
|
6
6
|
While `loading`, the label and the spinner face cross-fade in place on a spring (after interior.dev's
|
|
7
7
|
loading button) and the button keeps focus. `result` swaps in a success or error face the same way
|
|
8
|
-
and announces it.
|
|
8
|
+
and announces it. With `labelHidden="narrow"`, a page header, list toolbar or record header action
|
|
9
|
+
shows only its icon on a phone, with its label in a tooltip.
|
|
9
10
|
|
|
10
11
|
```tsx
|
|
11
|
-
import { Button } from "@dodopayments/ui/button";
|
|
12
|
+
import { Button, ButtonLink } from "@dodopayments/ui/button";
|
|
12
13
|
```
|
|
13
14
|
|
|
14
15
|
## Button
|
|
15
16
|
|
|
16
17
|
Triggers an action. Renders the `Button` primitive on Base UI `Button`, which always has button
|
|
17
|
-
semantics. For navigation, do not render a link through `Button`;
|
|
18
|
-
`buttonVariants()`: `<Link href="/x" className={buttonVariants({ variant: "secondary" })}>`.
|
|
18
|
+
semantics. For navigation, do not render a link through `Button`; use `ButtonLink`, or style the
|
|
19
|
+
link itself with `buttonVariants()`: `<Link href="/x" className={buttonVariants({ variant: "secondary" })}>`.
|
|
19
20
|
While `loading`, the label and the spinner face cross-fade in place on a spring (after interior.dev's
|
|
20
21
|
loading button) and the button keeps focus. `result` swaps in a success or error face the same way
|
|
21
|
-
and announces it.
|
|
22
|
+
and announces it. With `labelHidden="narrow"`, a page header, list toolbar or record header action
|
|
23
|
+
shows only its icon on a phone, with its label in a tooltip.
|
|
22
24
|
|
|
23
25
|
| Prop | Type | Default | Description |
|
|
24
26
|
| --- | --- | --- | --- |
|
|
@@ -26,6 +28,7 @@ and announces it.
|
|
|
26
28
|
| `errorText` | `ReactNode` | `"Try again"` | Label shown while `result` is `"error"`. |
|
|
27
29
|
| `icon` | `ReactNode` | - | Icon element (e.g. one from `@dodopayments/ui/icons`) rendered beside the label. |
|
|
28
30
|
| `iconPlacement` | `"left" \| "right"` | - | Which side of the label the icon is placed on. |
|
|
31
|
+
| `labelHidden` | `"narrow"` | - | `"narrow"`: below 42rem of the nearest size container (the `@max-2xl` query of a `PageHeader` or `ListToolbar`; 24rem in a `RecordHeader`), so on a phone, only the icon shows, at the same height. The label stays the button's accessible name, and a tooltip shows it on hover and focus while it is hidden. Outside a size container the label always shows. |
|
|
29
32
|
| `loading` | `boolean` | - | Swaps the label for a spinner and `loadingText`, and marks the button busy. The button stays focusable (`aria-disabled`, not `disabled`) and ignores presses. Pass it (even `false`) on buttons that load: both faces then share one cell, so the button keeps its width. |
|
|
30
33
|
| `loadingText` | `ReactNode` | - | Label shown while `loading` or `progress` is set. Defaults to `children`. |
|
|
31
34
|
| `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`. |
|
|
@@ -36,6 +39,25 @@ and announces it.
|
|
|
36
39
|
|
|
37
40
|
Also accepts Base UI props: `focusableWhenDisabled`, `nativeButton`, `render`.
|
|
38
41
|
|
|
42
|
+
## ButtonLink
|
|
43
|
+
|
|
44
|
+
A link that looks like a `Button`: `buttonVariants()` on an `<a>`, with Button's `icon`,
|
|
45
|
+
`iconPlacement` and `labelHidden`. It stays a link (no `role="button"`), so Ctrl, Cmd or the middle
|
|
46
|
+
button open it in a new tab. Pass a router link through `render`
|
|
47
|
+
(`render={<NextLink href="/products/create" />}`). With `labelHidden="narrow"` it shows only its icon
|
|
48
|
+
in a narrow container, its label stays the accessible name and a tooltip shows it while it is hidden.
|
|
49
|
+
|
|
50
|
+
| Prop | Type | Default | Description |
|
|
51
|
+
| --- | --- | --- | --- |
|
|
52
|
+
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
53
|
+
| `icon` | `ReactNode` | - | Icon element (e.g. one from `@dodopayments/ui/icons`) rendered beside the label. |
|
|
54
|
+
| `iconPlacement` | `"left" \| "right"` | - | Which side of the label the icon is placed on. |
|
|
55
|
+
| `labelHidden` | `"narrow"` | - | `"narrow"`: below 42rem of the nearest size container (the `@max-2xl` query of a `PageHeader` or `ListToolbar`; 24rem in a `RecordHeader`), so on a phone, only the icon shows, at the same height. The label stays the button's accessible name, and a tooltip shows it on hover and focus while it is hidden. Outside a size container the label always shows. |
|
|
56
|
+
| `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`. |
|
|
57
|
+
| `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. |
|
|
58
|
+
|
|
59
|
+
Also accepts Base UI props: `render`.
|
|
60
|
+
|
|
39
61
|
## Examples
|
|
40
62
|
|
|
41
63
|
### button/as-link
|
|
@@ -43,14 +65,27 @@ Also accepts Base UI props: `focusableWhenDisabled`, `nativeButton`, `render`.
|
|
|
43
65
|
```tsx
|
|
44
66
|
"use client";
|
|
45
67
|
|
|
46
|
-
import { buttonVariants } from "@dodopayments/ui/button";
|
|
68
|
+
import { ButtonLink, buttonVariants } from "@dodopayments/ui/button";
|
|
69
|
+
import { PlusIcon } from "@dodopayments/ui/icons";
|
|
47
70
|
import Link from "next/link";
|
|
48
71
|
|
|
49
72
|
export default function ButtonAsLink() {
|
|
50
73
|
return (
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
74
|
+
<div className="flex w-full flex-col gap-4">
|
|
75
|
+
<Link href="#as-link" className={buttonVariants({ variant: "secondary" })}>
|
|
76
|
+
Styled Next.js link
|
|
77
|
+
</Link>
|
|
78
|
+
<div className="@container w-80 max-w-full">
|
|
79
|
+
<ButtonLink
|
|
80
|
+
render={<Link href="#as-link" />}
|
|
81
|
+
icon={<PlusIcon aria-hidden="true" />}
|
|
82
|
+
iconPlacement="left"
|
|
83
|
+
labelHidden="narrow"
|
|
84
|
+
>
|
|
85
|
+
Add product
|
|
86
|
+
</ButtonLink>
|
|
87
|
+
</div>
|
|
88
|
+
</div>
|
|
54
89
|
);
|
|
55
90
|
}
|
|
56
91
|
```
|
|
@@ -119,6 +154,46 @@ export default function CopyButtonVariants() {
|
|
|
119
154
|
}
|
|
120
155
|
```
|
|
121
156
|
|
|
157
|
+
### button/label-hidden
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
"use client";
|
|
161
|
+
|
|
162
|
+
import { Button } from "@dodopayments/ui/button";
|
|
163
|
+
import { DownloadIcon, PlusIcon } from "@dodopayments/ui/icons";
|
|
164
|
+
|
|
165
|
+
function Actions() {
|
|
166
|
+
return (
|
|
167
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
168
|
+
<Button
|
|
169
|
+
variant="secondary"
|
|
170
|
+
icon={<DownloadIcon aria-hidden="true" />}
|
|
171
|
+
iconPlacement="left"
|
|
172
|
+
labelHidden="narrow"
|
|
173
|
+
>
|
|
174
|
+
Export
|
|
175
|
+
</Button>
|
|
176
|
+
<Button icon={<PlusIcon aria-hidden="true" />} iconPlacement="left" labelHidden="narrow">
|
|
177
|
+
Add product
|
|
178
|
+
</Button>
|
|
179
|
+
</div>
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export default function ButtonLabelHidden() {
|
|
184
|
+
return (
|
|
185
|
+
<div className="flex w-full flex-col gap-4">
|
|
186
|
+
<div className="@container w-full">
|
|
187
|
+
<Actions />
|
|
188
|
+
</div>
|
|
189
|
+
<div className="@container w-80 max-w-full">
|
|
190
|
+
<Actions />
|
|
191
|
+
</div>
|
|
192
|
+
</div>
|
|
193
|
+
);
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
122
197
|
### button/loading
|
|
123
198
|
|
|
124
199
|
```tsx
|
package/ai/components/card.md
CHANGED
|
@@ -30,7 +30,8 @@ its action under the title, and the header, a size container, does not widen a c
|
|
|
30
30
|
| `contentClassName` | `string` | - | With the header props: extra classes for the panel that wraps `children`. |
|
|
31
31
|
| `description` | `ReactNode` | - | Supporting text under the title. |
|
|
32
32
|
| `headerClassName` | `string` | - | With the header props: extra classes for the header strip. |
|
|
33
|
-
| `help` | `ReactNode` | - | With `title`:
|
|
33
|
+
| `help` | `ReactNode` | - | With `title`: a secondary description in a Tooltip on a 12px info icon after the title, instead of a line under it (see `CardTitle`). An existing `description` still renders as a line. |
|
|
34
|
+
| `helpLabel` | `string` | `"More information"` | With `help`: accessible name of the info icon button. |
|
|
34
35
|
| `layout` | `"default" \| "full-bleed"` | `"default"` | With the header props: how `children` sit in the panel. `default` keeps the 16px padding, 8 apart; `full-bleed` lets them reach the panel edges (clipped to its 12px radius), for previews, media and tables. |
|
|
35
36
|
| `title` | `ReactNode` | - | Header title. With `title`, `description` or `action` the card draws its own `CardHeader` and puts `children` in the white `CardContent` panel; without them, compose the parts as children. It is wrapped in a `<div>`; pass a heading element (e.g. `<h2>`) when the card starts a section of the page. |
|
|
36
37
|
| `tone` | `"neutral" \| "error"` | `"neutral"` | `neutral`: Surface/Secondary tray with a Border/Primary ring. The section card of every page.<br>`error`: Surface/Error-secondary tray with a Border/Error ring and a Content/Error title: a problem the user must act on (the Verification appeal strip) or the Danger zone. Put a red inline `Link` in `CardAction`. |
|
|
@@ -73,11 +74,13 @@ Also accepts Base UI props: `render`.
|
|
|
73
74
|
## CardTitle
|
|
74
75
|
|
|
75
76
|
Card heading (Heading/Quaternary, Content/Primary; Content/Error on the error tone). Renders a `<div>`; pass
|
|
76
|
-
`render={<h2 />}` (or the level that fits the page outline). `help` adds the info icon with a Tooltip
|
|
77
|
+
`render={<h2 />}` (or the level that fits the page outline). `help` adds the info icon with a Tooltip; it
|
|
78
|
+
follows the title's last word when the title wraps, and the heading's name stays the title (its text is
|
|
79
|
+
`${id}-text` when the title has an `id`, for a section's `aria-labelledby`).
|
|
77
80
|
|
|
78
81
|
| Prop | Type | Default | Description |
|
|
79
82
|
| --- | --- | --- | --- |
|
|
80
|
-
| `help` | `ReactNode` | - |
|
|
83
|
+
| `help` | `ReactNode` | - | A secondary description, shown in a Tooltip on a 12px info icon after the title instead of a line under it. Use it for text that helps but that the title and content already imply; keep `CardDescription` for what the reader must see (a consequence, a requirement, a limit). It is also the icon's accessible description. |
|
|
81
84
|
| `helpLabel` | `string` | `"More information"` | Accessible name of the info icon button. |
|
|
82
85
|
|
|
83
86
|
Also accepts Base UI props: `render`.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Celebration Dialog
|
|
2
|
+
|
|
3
|
+
The dialog that marks a milestone, as the dashboard shows when setup reaches 100% in live mode: a 296px hero of
|
|
4
|
+
moving green silk with `media` over it, confetti falling across the window behind the card, then the title, the
|
|
5
|
+
description and one `action`. No close button: the action, Escape and the scrim all close it. The silk and the
|
|
6
|
+
confetti stop under `prefers-reduced-motion`. Load it lazily where it rarely opens: it ships a WebGL shader.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { CelebrationDialog } from "@dodopayments/ui/celebration-dialog";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## CelebrationDialog
|
|
13
|
+
|
|
14
|
+
The dialog that marks a milestone, as the dashboard shows when setup reaches 100% in live mode: a 296px hero of
|
|
15
|
+
moving green silk with `media` over it, confetti falling across the window behind the card, then the title, the
|
|
16
|
+
description and one `action`. No close button: the action, Escape and the scrim all close it. The silk and the
|
|
17
|
+
confetti stop under `prefers-reduced-motion`. Load it lazily where it rarely opens: it ships a WebGL shader.
|
|
18
|
+
|
|
19
|
+
| Prop | Type | Default | Description |
|
|
20
|
+
| --- | --- | --- | --- |
|
|
21
|
+
| `title` (required) | `ReactNode` | - | The heading, e.g. "You're all set, Ada". Names the dialog. |
|
|
22
|
+
| `action` | `ReactNode` | - | The one way out, e.g. a `Button size="lg"`. It fills the width. |
|
|
23
|
+
| `className` | `string` | - | Classes for the card. |
|
|
24
|
+
| `description` | `ReactNode` | - | One or two sentences under the title, announced with it. |
|
|
25
|
+
| `media` | `ReactNode` | - | Centred over the hero, e.g. a looping seal animation (a muted `<video>`) or a Featured icon. Decorative. |
|
|
26
|
+
|
|
27
|
+
Also accepts Base UI props: `defaultOpen`, `onOpenChange`, `open`.
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### celebration-dialog/basic
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
"use client";
|
|
35
|
+
|
|
36
|
+
import { Button } from "@dodopayments/ui/button";
|
|
37
|
+
import { CelebrationDialog } from "@dodopayments/ui/celebration-dialog";
|
|
38
|
+
import { FeaturedIcon } from "@dodopayments/ui/featured-icon";
|
|
39
|
+
import { CircleCheckIcon } from "@dodopayments/ui/icons";
|
|
40
|
+
import { useState } from "react";
|
|
41
|
+
|
|
42
|
+
export default function CelebrationDialogBasic() {
|
|
43
|
+
const [open, setOpen] = useState(false);
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<>
|
|
47
|
+
<Button variant="secondary" onClick={() => setOpen(true)}>
|
|
48
|
+
Finish setup
|
|
49
|
+
</Button>
|
|
50
|
+
<CelebrationDialog
|
|
51
|
+
open={open}
|
|
52
|
+
onOpenChange={setOpen}
|
|
53
|
+
title="You're all set, Ada!"
|
|
54
|
+
description="You've completed every setup step. You're live and ready to grow."
|
|
55
|
+
media={<FeaturedIcon look="sphere" tone="success" icon={<CircleCheckIcon />} />}
|
|
56
|
+
action={
|
|
57
|
+
<Button size="lg" onClick={() => setOpen(false)}>
|
|
58
|
+
Let's get started
|
|
59
|
+
</Button>
|
|
60
|
+
}
|
|
61
|
+
/>
|
|
62
|
+
</>
|
|
63
|
+
);
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# Chart share card
|
|
2
|
+
|
|
3
|
+
An analytics card as an image to share (the dashboard's Analytics and Home, Share): the card at a fixed design
|
|
4
|
+
width on artwork, the business chip above it and the Dodo Payments lockup with a verified badge below. The card
|
|
5
|
+
follows the theme. Capture this element at its own size, and preview it in a `ScaledFrame`.
|
|
6
|
+
|
|
7
|
+
```tsx
|
|
8
|
+
import { ChartShareCard } from "@dodopayments/ui/chart-share-card";
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## ChartShareCard
|
|
12
|
+
|
|
13
|
+
An analytics card as an image to share (the dashboard's Analytics and Home, Share): the card at a fixed design
|
|
14
|
+
width on artwork, the business chip above it and the Dodo Payments lockup with a verified badge below. The card
|
|
15
|
+
follows the theme. Capture this element at its own size, and preview it in a `ScaledFrame`.
|
|
16
|
+
|
|
17
|
+
| Prop | Type | Default | Description |
|
|
18
|
+
| --- | --- | --- | --- |
|
|
19
|
+
| `background` (required) | `string` | - | The artwork behind the card, an image URL. Decorative. |
|
|
20
|
+
| `verified` (required) | `ReactNode` | - | The word beside the badge under the card, e.g. "Verified". |
|
|
21
|
+
| `backgroundTone` | `"light" \| "dark"` | - | Whether the foot of the artwork is light (a near-black lockup) or dark (a white one), so the lockup stays legible. Default: `"light"`. |
|
|
22
|
+
| `business` | `ChartShareBusiness` | - | The business chip above the card. Leave it out when the merchant turns off "Include business & logo". |
|
|
23
|
+
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
24
|
+
| `wide` | `boolean` | - | 860px for a card whose body is a wide pairing (a map beside its rows); 550px otherwise. |
|
|
25
|
+
|
package/ai/components/chart.md
CHANGED
|
@@ -5,7 +5,7 @@ as its container. Its height comes from the chart's `aspectRatio` or from a heig
|
|
|
5
5
|
(`className="h-48"`). Use it to give a custom visx chart the same accessible frame.
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
|
-
import { ChartFigure, ChartUpdated, Background, ChartBrush, ChartBrushLayout, ChartConfigProvider, ChartGrid, ChartMarkers, MarkerGroup, MarkerTooltipContent, ReferenceArea, SegmentBackground, SegmentLineFrom, SegmentLineTo, useChartConfig, useChart, useActiveMarkers } from "@dodopayments/ui/chart";
|
|
8
|
+
import { ChartFigure, ChartUpdated, Background, ChartBrush, ChartBrushLayout, ChartConfigProvider, ChartGrid, ChartMarkers, MarkerGroup, MarkerTooltipContent, ReferenceArea, SegmentBackground, SegmentLineFrom, SegmentLineTo, XAxis, YAxis, useChartConfig, useChart, useActiveMarkers } from "@dodopayments/ui/chart";
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## ChartFigure
|
|
@@ -245,6 +245,32 @@ A vertical line at the end edge of the active drag selection.
|
|
|
245
245
|
| `strokeWidth` | `number` | - | Stroke width. Default: 1 |
|
|
246
246
|
| `variant` | `SegmentLineVariant` | - | Line style. Default: "dashed" |
|
|
247
247
|
|
|
248
|
+
## XAxis
|
|
249
|
+
|
|
250
|
+
The date or category labels under the plot. It picks evenly spaced ticks that fit the width and
|
|
251
|
+
highlights the hovered label while a tooltip is open.
|
|
252
|
+
|
|
253
|
+
| Prop | Type | Default | Description |
|
|
254
|
+
| --- | --- | --- | --- |
|
|
255
|
+
| `formatLabel` | `((row: Record<string, unknown>) => string)` | - | The label of a tick from its data row, in place of the date: e.g. "Sep 1" for a whole week, or an hour. Ticks are picked and told apart by this label, so a same-day chart labelled by time keeps a tick per time. An empty label leaves that tick out. |
|
|
256
|
+
| `numTicks` | `number` | - | Number of ticks to show (including first and last). Default: 5. A narrow chart shows fewer, so no two labels collide; it always keeps the first and last. |
|
|
257
|
+
| `tickMode` | `"data" \| "domain"` | - | `"data"` - tick labels snap to data rows so crosshair and tooltip stay aligned (default). `"domain"` - evenly spaced ticks across the time domain (may not align with hover). |
|
|
258
|
+
| `tickerHalfWidth` | `number` | - | Width of the date ticker box for fade calculation. Default: 50 |
|
|
259
|
+
|
|
260
|
+
## YAxis
|
|
261
|
+
|
|
262
|
+
The value labels at the left or right edge of the plot, at the same ticks as `ChartGrid`. Pass
|
|
263
|
+
`formatValue` for currency or percentages, and `yAxisId` for a second axis.
|
|
264
|
+
|
|
265
|
+
| Prop | Type | Default | Description |
|
|
266
|
+
| --- | --- | --- | --- |
|
|
267
|
+
| `formatLargeNumbers` | `boolean` | - | Format large numbers (e.g. 1000 as "1k"). Default: true |
|
|
268
|
+
| `formatValue` | `((value: number) => string)` | - | Custom formatter for tick labels (e.g. USD). Overrides formatLargeNumbers when set. |
|
|
269
|
+
| `numTicks` | `number` | - | Approximate tick count hint for `scale.ticks()` (d3). Actual label count may differ. Clamped to {@link Y_AXIS_MIN_TICK_COUNT }–{@link Y_AXIS_MAX_TICK_COUNT }. Default: 5. |
|
|
270
|
+
| `orientation` | `YAxisOrientation` | - | Which side of the chart to render labels. Default: `"left"`. |
|
|
271
|
+
| `tickValues` | `number[]` | - | The exact values to label, such as the ones passed to `ChartGrid` `rowTickValues`, in place of the scale's own; any outside the plot's domain is left out. |
|
|
272
|
+
| `yAxisId` | `string \| number` | - | Scale group id (Recharts `yAxisId`). Default: `"left"`. |
|
|
273
|
+
|
|
248
274
|
## useChartConfig
|
|
249
275
|
|
|
250
276
|
Reads the nearest `ChartConfigProvider` value, or the defaults when there is none.
|
|
@@ -24,11 +24,12 @@ mount, so server and client render the same first frame).
|
|
|
24
24
|
| `copyLabel` | `string` | `"Copy code"` | Accessible name of the copy button. |
|
|
25
25
|
| `copyable` | `boolean` | `true` | Show a copy button that copies `code`. It sits in the header, or in the top-right corner without one. |
|
|
26
26
|
| `defaultLanguage` | `string` | `the first snippet` | With `snippets`: the language shown first when no provider or saved choice applies. |
|
|
27
|
-
| `language` | `string` | - | Language name, exposed as `data-language` on the root. `json`
|
|
27
|
+
| `language` | `string` | - | Language name, exposed as `data-language` on the root. `json`, the shells (`bash`, `sh`, `zsh`), JavaScript, TypeScript and Python are coloured. |
|
|
28
28
|
| `maxHeight` | `string` | `"20rem"` | CSS max-height of the code area. Content beyond it scrolls inside. |
|
|
29
29
|
| `onLanguageChange` | `((language: string) => void)` | - | With `snippets`: called with the language the reader picks. |
|
|
30
30
|
| `overflow` | `"scroll" \| "wrap"` | `"scroll"` | `scroll`: Lines keep their layout and the block scrolls sideways (default). Best for code and JSON payloads.<br>`wrap`: Long lines wrap. Best for narrow panels and prose-like output. |
|
|
31
31
|
| `placeholder` | `string` | - | Shown in Content/Tertiary when `code` is empty. |
|
|
32
|
+
| `sensitive` | `boolean` | - | `code` is a secret, e.g. an API key shown once: the copy button never puts it in a hidden textarea page scripts could read, as CopyButton's `sensitive`. |
|
|
32
33
|
| `showHeader` | `boolean` | `true when `title` is set` | Show the header: the title (or the language, upper-cased) on the left and the copy button on the right. |
|
|
33
34
|
| `snippets` | `readonly CodeBlockSnippet[]` | - | The same example in several languages: the header shows one tab per snippet instead of the title, and the copy button copies the snippet shown. Nothing renders when it is empty. |
|
|
34
35
|
| `storageKey` | `string` | - | With `snippets`: localStorage key that remembers the picked language, shared by every block with the same key on the page. Read after mount (no hydration mismatch). A `CodeBlockProvider` choice wins. |
|
|
@@ -47,8 +47,8 @@ The title of a card section's header: Heading/Quaternary in Content/Primary.
|
|
|
47
47
|
## CollapsibleTrigger
|
|
48
48
|
|
|
49
49
|
The header that opens and closes the content. In the card variant, put a `CollapsibleTitle` and an optional
|
|
50
|
-
`CollapsibleDescription` in it
|
|
51
|
-
button or link.
|
|
50
|
+
`CollapsibleDescription` in it; a `Badge` there sits under the title at its own width. Only put phrasing content
|
|
51
|
+
(text, spans, icons, badges) inside it, never another button or link.
|
|
52
52
|
|
|
53
53
|
| Prop | Type | Default | Description |
|
|
54
54
|
| --- | --- | --- | --- |
|
package/ai/components/command.md
CHANGED
|
@@ -127,7 +127,8 @@ Also accepts Base UI props: `className`, `render`.
|
|
|
127
127
|
The command palette of the dashboard (Dodo Nest Command palette): search the dashboard and jump to a page.
|
|
128
128
|
A 640 wide tray on Surface/Scrim near the top of the screen: the search row with `esc`, the grouped results
|
|
129
129
|
(neutral Featured icon, title, description and a tag, 56 tall, the first selected) or an Empty state, and the
|
|
130
|
-
key hints on the grey strip. `/` opens it; ↑ ↓ move, ↵ opens, esc closes. Built from the `Command` parts.
|
|
130
|
+
key hints on the grey strip. `/` opens it; ↑ ↓ move, ↵ opens, esc closes. Built from the `Command` parts. For
|
|
131
|
+
results a server searches, pass `shouldFilter={false}` and `loading` while they load.
|
|
131
132
|
|
|
132
133
|
| Prop | Type | Default | Description |
|
|
133
134
|
| --- | --- | --- | --- |
|
|
@@ -136,12 +137,14 @@ key hints on the grey strip. `/` opens it; ↑ ↓ move, ↵ opens, esc closes.
|
|
|
136
137
|
| `defaultOpen` | `boolean` | `false` | |
|
|
137
138
|
| `defaultQuery` | `string` | `""` | |
|
|
138
139
|
| `labels` | `CommandPaletteLabels` | - | |
|
|
140
|
+
| `loading` | `boolean` | `false` | Results are on their way: a spinner in the search row, and `labels.loading` in place of the empty state. |
|
|
139
141
|
| `onOpenChange` | `((open: boolean) => void)` | - | |
|
|
140
142
|
| `onQueryChange` | `((query: string) => void)` | - | |
|
|
141
143
|
| `onSelect` | `((item: CommandPaletteItem) => void)` | - | Runs when an item is chosen (click or Enter). By default the palette closes and opens `item.href`. |
|
|
142
144
|
| `open` | `boolean` | - | Whether the palette is open (controlled). |
|
|
143
145
|
| `query` | `string` | - | The search text (controlled). |
|
|
144
146
|
| `shortcut` | `string \| false` | `"/"` | The key that opens the palette when no field has focus; `false` binds nothing. |
|
|
147
|
+
| `shouldFilter` | `boolean` | `true` | `false` shows `groups` as given, in their order, for results the server already matched and ranked to the query. |
|
|
145
148
|
| `showFooter` | `boolean` | `true` | The key hints under the panel. Hidden below `sm` (mobile) whatever this is. |
|
|
146
149
|
|
|
147
150
|
## rankCommandItems
|
|
@@ -23,6 +23,7 @@ such as a total, in a `StatCard`) and pass `periods` for the legend.
|
|
|
23
23
|
| Prop | Type | Default | Description |
|
|
24
24
|
| --- | --- | --- | --- |
|
|
25
25
|
| `items` (required) | `readonly ComparisonBarsItem[]` | - | The rows, in the order to show them (usually the largest first). |
|
|
26
|
+
| `fill` | `boolean` | `false` | Fill a taller parent, such as a card its row neighbour stretched: the rows spread out evenly and the legend sits at the bottom. The parent must be a flex column. |
|
|
26
27
|
| `format` | `((value: number) => string)` | `the number in en-US groups, e.g. "1,240"` | Formats a value for the right column and the tooltip, e.g. a currency formatter. |
|
|
27
28
|
| `labels` | `ComparisonBarsLabels` | - | Texts, for translation. |
|
|
28
29
|
| `loading` | `boolean` | - | Draw skeleton rows and announce `labels.loading`. |
|
|
@@ -49,7 +49,8 @@ the selected rows.
|
|
|
49
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. |
|
|
50
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
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. |
|
|
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. |
|
|
52
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"md"` | `sm`: 36 rows in Body/Secondary with 12 padding, for a table in a narrow side panel such as Dodo AI's.<br>`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. |
|
|
53
|
+
| `storageKey` | `string` | - | Remembers the columns the user chose, in this browser: their visibility (an Edit columns menu), their order and their widths (`columnSizing`) are saved in localStorage under `dodo-ui:data-grid:<storageKey>` and restored on the next visit, before the first paint. Give each table its own key. A saved order that no longer names every column is ignored, and saved entries for removed columns are dropped. Sorting, selection and pages are not saved. |
|
|
53
54
|
|
|
54
55
|
## DataGridColumnHeader
|
|
55
56
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Read-only facts of a record as labelled values grouped in sections, ported from the dashboard's
|
|
4
4
|
payment details panel and payout schedule card: a `Card` with the title, description and action on
|
|
5
5
|
its grey strip and the sections and footer in the white panel, separated by rules, each section a description list (`<dl>`). `layout="grid"` stacks label over
|
|
6
|
-
value in 2 columns (
|
|
6
|
+
value in 2 columns (1 under 20rem, 3 from 28rem); `layout="rows"` puts label and value
|
|
7
7
|
on one divided row. Values are preformatted nodes; empty ones show `emptyValue`, and `hidden`
|
|
8
8
|
items are left out.
|
|
9
9
|
|
|
@@ -16,7 +16,7 @@ import { DetailsPanel } from "@dodopayments/ui/details-panel";
|
|
|
16
16
|
Read-only facts of a record as labelled values grouped in sections, ported from the dashboard's
|
|
17
17
|
payment details panel and payout schedule card: a `Card` with the title, description and action on
|
|
18
18
|
its grey strip and the sections and footer in the white panel, separated by rules, each section a description list (`<dl>`). `layout="grid"` stacks label over
|
|
19
|
-
value in 2 columns (
|
|
19
|
+
value in 2 columns (1 under 20rem, 3 from 28rem); `layout="rows"` puts label and value
|
|
20
20
|
on one divided row. Values are preformatted nodes; empty ones show `emptyValue`, and `hidden`
|
|
21
21
|
items are left out.
|
|
22
22
|
|
|
@@ -27,7 +27,9 @@ items are left out.
|
|
|
27
27
|
| `description` | `ReactNode` | - | Text under the panel heading. |
|
|
28
28
|
| `emptyValue` | `ReactNode` | `"-"` | Shown in place of an empty item `value`. |
|
|
29
29
|
| `footer` | `ReactNode` | - | Content of the row below the sections, e.g. an "Edit billing details" button. |
|
|
30
|
-
| `
|
|
30
|
+
| `help` | `ReactNode` | - | With `title`: a secondary description in a Tooltip on an info icon after the heading, instead of a line under it. See `CardTitle`'s `help`. |
|
|
31
|
+
| `helpLabel` | `string` | `"More information"` | With `help`: accessible name of the info icon button. |
|
|
32
|
+
| `layout` | `DetailsPanelLayout` | `"grid"` | `grid` stacks each label above its value, 1 item per row in a panel under 20rem (a phone), 2 from 20rem and 3 once the panel is at least 28rem wide (container queries on the panel). `rows` puts one item per row, the label at the start and the value at the end, divided by rules. |
|
|
31
33
|
| `title` | `ReactNode` | - | Panel heading, e.g. "Payment details". A titled panel renders a `<section>` labelled by it. |
|
|
32
34
|
| `titleAs` | `"h2" \| "h3" \| "h4"` | `"h2"` | Element of the panel `title`. Section titles use the next level, or this one when the panel has no `title`. |
|
|
33
35
|
| `tone` | `"error" \| "neutral" \| null` | - | |
|
package/ai/components/dialog.md
CHANGED
|
@@ -103,6 +103,7 @@ the dialog reaches its maximum height; the header and the footer strip stay.
|
|
|
103
103
|
|
|
104
104
|
| Prop | Type | Default | Description |
|
|
105
105
|
| --- | --- | --- | --- |
|
|
106
|
+
| `fill` | `boolean` | - | Fill the panel's height (a fixed-height dialog), so a short body can centre itself with `m-auto`. |
|
|
106
107
|
| `scrollFade` | `boolean` | - | |
|
|
107
108
|
|
|
108
109
|
Also accepts Base UI props: `render`.
|