@dodopayments/ui 1.6.0 → 1.7.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 +667 -65
- package/ai/component-registry.md +2 -0
- package/ai/components/activity-timeline.md +1 -1
- package/ai/components/alert.md +1 -1
- package/ai/components/app-top-bar.md +51 -1
- 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/chart-share-card.md +25 -0
- package/ai/components/chart.md +27 -1
- package/ai/components/code-block.md +1 -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 +13 -5
- 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 +27 -1
- package/dist/components/app-top-bar/app-top-bar.d.ts.map +1 -1
- package/dist/components/app-top-bar/app-top-bar.js +37 -11
- 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 +89 -3
- package/dist/components/brand-logos/brand-artwork.d.ts.map +1 -1
- package/dist/components/brand-logos/brand-artwork.js +89 -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 +42 -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/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 +1 -1
- package/dist/components/code-block/code-block.d.ts.map +1 -1
- package/dist/components/code-block/code-block.js +20 -3
- package/dist/components/code-block/code-block.js.map +1 -1
- 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/sidebar.d.ts +30 -10
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar.js +36 -17
- 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 +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -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/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 +3 -3
- 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/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
|
|
@@ -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)` | - | |
|
|
@@ -41,6 +42,7 @@ search becomes an icon and Games, Milestones or Setup guide, Dodo AI, chat and t
|
|
|
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
47
|
| `user` | `AppTopBarUser` | - | Shows the user's avatar instead of the user icon on the account button. |
|
|
46
48
|
|
|
@@ -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" \| "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,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,7 +24,7 @@ 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` and the shells (`bash`, `sh`, `zsh`) 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. |
|
|
@@ -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`.
|
package/ai/components/empty.md
CHANGED
|
@@ -23,7 +23,7 @@ The title, description and action rise in one after the other.
|
|
|
23
23
|
| `description` | `ReactNode` | - | What will appear and how to get it, e.g. "Add a bank account to start receiving payouts." |
|
|
24
24
|
| `icon` | `ReactNode` | - | Glyph of the Featured icon above the title, e.g. one from `@dodopayments/ui/icons`. Omit for no icon. |
|
|
25
25
|
| `iconTone` | `"info" \| "success" \| "warning" \| "error" \| "violet" \| "neutral" \| "pink" \| "orange" \| null` | `"neutral"` | Tone of the Featured icon. Keep `neutral` for empty states; use `error` when the content failed to load. |
|
|
26
|
-
| `titleAs` | `"h2" \| "h3" \| "h4" \| "h5" \| "h6" \| "p"` | `"h2"` | Element used for the title. Match the heading outline of the page, or use `"p"` when it must not be a heading. |
|
|
26
|
+
| `titleAs` | `"h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6" \| "p"` | `"h2"` | Element used for the title. Match the heading outline of the page (`"h1"` when the empty state is the whole page, e.g. a lost connection), or use `"p"` when it must not be a heading. |
|
|
27
27
|
|
|
28
28
|
Also accepts Base UI props: `render`.
|
|
29
29
|
|
package/ai/components/field.md
CHANGED
|
@@ -13,7 +13,7 @@ control (a Switch, a 160px Select, a Button) on the trailing side and optional `
|
|
|
13
13
|
`children` is then the control. Without `label`, compose the parts as children.
|
|
14
14
|
|
|
15
15
|
```tsx
|
|
16
|
-
import { Field, FieldControl, FieldDescription, FieldError, FieldLabel } from "@dodopayments/ui/field";
|
|
16
|
+
import { Field, FieldControl, FieldDescription, FieldError, FieldLabel, LabelRequiredIndicator } from "@dodopayments/ui/field";
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Field
|
|
@@ -36,11 +36,11 @@ control (a Switch, a 160px Select, a Button) on the trailing side and optional `
|
|
|
36
36
|
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
37
37
|
| `description` | `ReactNode` | - | Helper text under the label (Body/Secondary, Content/Secondary), 2 below it. |
|
|
38
38
|
| `error` | `ReactNode` | - | Error message (Body/Secondary, Content/Error). Setting it marks the field invalid, so the control shows its own error ring. Under the control (vertical); under the text (horizontal), or 8 under the `expanded` content when there is some. Without it, the field still shows the browser's or `validate`'s message. |
|
|
39
|
-
| `expanded` | `ReactNode` | - | Content
|
|
39
|
+
| `expanded` | `ReactNode` | - | Content in the horizontal layout, 12 below the text, in a row 8 apart: what a switch reveals when it is on (an Input and an Edit button), or a row with no switch that edits a value. With a row control (`children`), it spans the whole row under the text and the control (under the control on a phone), and the expanded controls get their own Field, so give them an `aria-label`; without one, it sits under the description and the expanded control is the field's control. Horizontal layout only. |
|
|
40
40
|
| `help` | `ReactNode` | - | Extra detail in a Tooltip on a 12px info icon after the label. Put the explanation in `description`. |
|
|
41
41
|
| `helpLabel` | `string` | `"More information"` | Accessible name of the help icon. |
|
|
42
42
|
| `label` | `ReactNode` | - | The label (Labels/Primary). With it, `Field` draws the Figma layout itself and `children` is the control. Without it, compose the parts (`FieldLabel`, `FieldDescription`, `FieldError`) as children. |
|
|
43
|
-
| `layout` | `"vertical" \| "horizontal"` | `"vertical"` | `vertical`: Label row and description above the control, the error under it, 8 apart. For forms.<br>`horizontal`: Text block (label row, description,
|
|
43
|
+
| `layout` | `"vertical" \| "horizontal"` | `"vertical"` | `vertical`: Label row and description above the control, the error under it, 8 apart. For forms.<br>`horizontal`: Text block (label row, description, error) on the leading side, the control on the trailing side, 16 apart; expanded content under them, across the row. For settings that apply on their own. Stacks below 640px. |
|
|
44
44
|
| `required` | `boolean` | `false` | Shows a red asterisk after the label. It is decorative, so also set `required` on the control. |
|
|
45
45
|
|
|
46
46
|
Also accepts Base UI props: `actionsRef`, `dirty`, `disabled`, `invalid`, `name`, `render`, `touched`, `validate`, `validationDebounceTime`, `validationMode`.
|
|
@@ -66,11 +66,11 @@ Accepts Base UI's `render` prop to swap the rendered element.
|
|
|
66
66
|
| `prefix` | `ReactNode` | - | Inline text before the value in Content/Primary, e.g. `$`. |
|
|
67
67
|
| `prefixSelect` | `ReactNode` | - | A chrome-less select at the start, e.g. the phone country code: pass a `Select` with its `SelectTrigger`. |
|
|
68
68
|
| `shortcut` | `string` | - | A keyboard shortcut shown at the end in a `Kbd`, e.g. `/` on a search field. |
|
|
69
|
-
| `size` | `"sm" \| "lg" \| null` | - | |
|
|
69
|
+
| `size` | `"code" \| "sm" \| "lg" \| null` | - | |
|
|
70
70
|
| `suffix` | `ReactNode` | - | Inline text after the value in Content/Secondary, e.g. `%`. |
|
|
71
71
|
| `suffixSelect` | `ReactNode` | - | A chrome-less select at the end, e.g. the currency: pass a `Select` with its `SelectTrigger`. |
|
|
72
72
|
| `suggestions` | `readonly InputSuggestion[] \| readonly InputSuggestionGroup[]` | - | Suggestions shown in a list under the field while the user types: strings, `{ value, label }` items, or groups (`{ label, items }`). Pass an array (it may be empty, e.g. while async results load) to turn them on. |
|
|
73
|
-
| `suggestionsEmpty` | `ReactNode` | - | Text shown in the list when no suggestion matches, announced politely. Without it the list
|
|
73
|
+
| `suggestionsEmpty` | `ReactNode` | - | Text shown in the list when no suggestion matches, announced politely. Without it the list closes instead. |
|
|
74
74
|
| `suggestionsLoading` | `boolean` | `false` | Shows a spinner and `suggestionsLoadingText` in the list, e.g. while async suggestions load. |
|
|
75
75
|
| `suggestionsLoadingText` | `ReactNode` | `"Loading"` | Text next to the loading spinner. |
|
|
76
76
|
| `suggestionsTrigger` | `boolean` | `false` | With `suggestions`, shows a caret button at the end that opens and closes the list. |
|
|
@@ -117,6 +117,16 @@ Label for the field's control (primitive `FieldLabel`); `htmlFor` is set automat
|
|
|
117
117
|
|
|
118
118
|
Also accepts Base UI props: `nativeLabel`, `render`.
|
|
119
119
|
|
|
120
|
+
## LabelRequiredIndicator
|
|
121
|
+
|
|
122
|
+
Decorative required marker shared by `Label` and `FieldLabel`. Hidden from assistive
|
|
123
|
+
technology: the control's own `required` attribute is what gets announced. Exported for a
|
|
124
|
+
heading over a required group of fields; give it `className="ms-1"` there.
|
|
125
|
+
|
|
126
|
+
| Prop | Type | Default | Description |
|
|
127
|
+
| --- | --- | --- | --- |
|
|
128
|
+
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
129
|
+
|
|
120
130
|
## Examples
|
|
121
131
|
|
|
122
132
|
### field/basic
|