@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/components/input.md
CHANGED
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
The Dodo Nest Input. Lets the merchant type a value: one line (text, search, URLs, phone), several lines
|
|
4
4
|
(`type="textarea"`), a list of chips (`type="chips"`, typed, or picked from `suggestions`), an amount in minor
|
|
5
5
|
units (`type="money"`), a phone number with a country picker (`type="phone"`) or a GSTIN / ABN (`type="tax-id"`). A flat field on the panel: 1px Border/Primary, Radius/Medium,
|
|
6
|
-
a brand ring on focus, a red ring
|
|
7
|
-
is 36 tall; a one-line input can be the compact `size="sm"` (28). A one-line input takes icons, an inline `prefix` / `suffix`,
|
|
8
|
-
a boxed `addon`, `prefixSelect` / `suffixSelect` and a `shortcut`; read-only shows a copy button
|
|
6
|
+
a brand ring on focus, a red ring when invalid (the placeholder stays muted), grey (Surface/Secondary) when read-only. Every Input
|
|
7
|
+
is 36 tall; a one-line input can be the compact `size="sm"` (28), or `size="code"` (56, large centred monospace) for one code read off another screen. A one-line input takes icons, an inline `prefix` / `suffix`,
|
|
8
|
+
a boxed `addon`, `prefixSelect` / `suffixSelect` and a `shortcut`; read-only shows a copy button (`copyable={false}` hides it,
|
|
9
|
+
when the page already offers its own copy action). With
|
|
9
10
|
`suggestions` it suggests values in a list while the user types (an autocomplete; the value stays free text). Inside
|
|
10
11
|
a `Field` it picks up the label, description and validation state.
|
|
11
12
|
|
|
@@ -18,9 +19,10 @@ import { Input, formatTaxId, isValidAbn, isValidGstin, isValidTaxId, normalizeTa
|
|
|
18
19
|
The Dodo Nest Input. Lets the merchant type a value: one line (text, search, URLs, phone), several lines
|
|
19
20
|
(`type="textarea"`), a list of chips (`type="chips"`, typed, or picked from `suggestions`), an amount in minor
|
|
20
21
|
units (`type="money"`), a phone number with a country picker (`type="phone"`) or a GSTIN / ABN (`type="tax-id"`). A flat field on the panel: 1px Border/Primary, Radius/Medium,
|
|
21
|
-
a brand ring on focus, a red ring
|
|
22
|
-
is 36 tall; a one-line input can be the compact `size="sm"` (28). A one-line input takes icons, an inline `prefix` / `suffix`,
|
|
23
|
-
a boxed `addon`, `prefixSelect` / `suffixSelect` and a `shortcut`; read-only shows a copy button
|
|
22
|
+
a brand ring on focus, a red ring when invalid (the placeholder stays muted), grey (Surface/Secondary) when read-only. Every Input
|
|
23
|
+
is 36 tall; a one-line input can be the compact `size="sm"` (28), or `size="code"` (56, large centred monospace) for one code read off another screen. A one-line input takes icons, an inline `prefix` / `suffix`,
|
|
24
|
+
a boxed `addon`, `prefixSelect` / `suffixSelect` and a `shortcut`; read-only shows a copy button (`copyable={false}` hides it,
|
|
25
|
+
when the page already offers its own copy action). With
|
|
24
26
|
`suggestions` it suggests values in a list while the user types (an autocomplete; the value stays free text). Inside
|
|
25
27
|
a `Field` it picks up the label, description and validation state.
|
|
26
28
|
|
|
@@ -219,6 +221,29 @@ export default function InputAsyncSuggestions() {
|
|
|
219
221
|
}
|
|
220
222
|
```
|
|
221
223
|
|
|
224
|
+
### input/code
|
|
225
|
+
|
|
226
|
+
```tsx
|
|
227
|
+
"use client";
|
|
228
|
+
|
|
229
|
+
import { Input } from "@dodopayments/ui/input";
|
|
230
|
+
|
|
231
|
+
export default function InputCode() {
|
|
232
|
+
return (
|
|
233
|
+
<div className="w-full max-w-sm">
|
|
234
|
+
<Input
|
|
235
|
+
size="code"
|
|
236
|
+
aria-label="Device code"
|
|
237
|
+
placeholder="XXXX-XXXX"
|
|
238
|
+
autoCapitalize="characters"
|
|
239
|
+
autoComplete="off"
|
|
240
|
+
spellCheck={false}
|
|
241
|
+
/>
|
|
242
|
+
</div>
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
```
|
|
246
|
+
|
|
222
247
|
### input/compact
|
|
223
248
|
|
|
224
249
|
```tsx
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Top customers by spend (Dodo Nest Leaderboard): a podium of the top three (one joined block of white cells
|
|
4
4
|
with a gold, silver or bronze glow and a ribbon medal, in rank order 1 · 2 · 3), then a ranked list from 4
|
|
5
|
-
down, 12 below.
|
|
5
|
+
down, 12 below. Under 24rem (384px) wide the podium stacks, each place a row with its medal beside the text, so
|
|
6
|
+
the amounts and names read whole. With two customers the third cell is hidden and there is no list; with none it shows the
|
|
6
7
|
empty state; `loading` shows the skeleton. Put it in a `Card`. Compose `LeaderboardPodium`,
|
|
7
8
|
`LeaderboardPodiumCell`, `LeaderboardList` and `LeaderboardRow` for a custom layout.
|
|
8
9
|
|
|
@@ -14,7 +15,8 @@ import { Leaderboard, LeaderboardList, LeaderboardMedal, LeaderboardPodium, Lead
|
|
|
14
15
|
|
|
15
16
|
Top customers by spend (Dodo Nest Leaderboard): a podium of the top three (one joined block of white cells
|
|
16
17
|
with a gold, silver or bronze glow and a ribbon medal, in rank order 1 · 2 · 3), then a ranked list from 4
|
|
17
|
-
down, 12 below.
|
|
18
|
+
down, 12 below. Under 24rem (384px) wide the podium stacks, each place a row with its medal beside the text, so
|
|
19
|
+
the amounts and names read whole. With two customers the third cell is hidden and there is no list; with none it shows the
|
|
18
20
|
empty state; `loading` shows the skeleton. Put it in a `Card`. Compose `LeaderboardPodium`,
|
|
19
21
|
`LeaderboardPodiumCell`, `LeaderboardList` and `LeaderboardRow` for a custom layout.
|
|
20
22
|
|
|
@@ -43,6 +45,7 @@ fixed colours in both modes. Decorative (`alt=""`) unless you pass an `alt`.
|
|
|
43
45
|
|
|
44
46
|
The podium block: one `<ol>` with a 1px Border/Primary ring and Radius/Large that clips its
|
|
45
47
|
`LeaderboardPodiumCell`s, equal width, with 1px dividers between them. Put two or three cells in rank order.
|
|
48
|
+
In a `Leaderboard` under 24rem (384px) wide the cells stack, each a row with its medal beside the text.
|
|
46
49
|
|
|
47
50
|
## LeaderboardPodiumCell
|
|
48
51
|
|
package/ai/components/link.md
CHANGED
|
@@ -24,7 +24,7 @@ keep client-side navigation.
|
|
|
24
24
|
|
|
25
25
|
| Prop | Type | Default | Description |
|
|
26
26
|
| --- | --- | --- | --- |
|
|
27
|
-
| `external` | `boolean` | `false` | Open the link in a new tab (`target="_blank"`, `rel="noopener noreferrer"`), end it with an up-right arrow (it replaces the entity arrow) and append `externalLabel` for screen readers (also appended to `aria-label` when set). |
|
|
27
|
+
| `external` | `boolean` | `false` | Open the link in a new tab (`target="_blank"`, `rel="noopener noreferrer"`), end it with an up-right arrow (it replaces the entity arrow; in running text it wraps with the last word, never alone) and append `externalLabel` for screen readers (also appended to `aria-label` when set). |
|
|
28
28
|
| `externalLabel` | `string` | `"(opens in a new tab)"` | Visually hidden text appended to external links. |
|
|
29
29
|
| `tone` | `"accent" \| "error"` | `"accent"` | `accent`: Content/Accent (Blue 600, Blue 400 in dark). The default.<br>`error`: Content/Error (Red 600, Red 400 in dark), only next to a destructive or warning message. |
|
|
30
30
|
| `variant` | `"inline" \| "entity"` | `"inline"` | `inline`: Underlined words inside a sentence. Takes the sentence's size and line height (Link/Primary in 14, Link/Secondary in 12) and wraps with it. The underline is the link colour at 40% and turns solid on hover.<br>`entity`: Labels/Primary (14) and a 16 trailing arrow, for “View all” and IDs that open a page. No underline until hover, when it fades in under the label. Keeps one line and truncates. |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# List item
|
|
2
2
|
|
|
3
3
|
One line of a list or one small card (Dodo Nest List item): a leading part, the title and description (one line
|
|
4
|
-
each, with an ellipsis) and a trailing part. `layout` is `row` (order lines, settings rows, sessions, saved
|
|
4
|
+
each, with an ellipsis, or whole with `wrap`) and a trailing part. `layout` is `row` (order lines, settings rows, sessions, saved
|
|
5
5
|
payment methods inside a panel; a divider under every row but the last), `card` (side-by-side portal cards, 12
|
|
6
6
|
apart), `tile` (a bordered row tile: add-ons with a quantity, or with `href` / `render` a link with a chevron for a settings index) or `add` (a dashed “Add …” tile that is a button; pass `onClick`). Renders a `<div>` (an `<li>` with
|
|
7
7
|
`render={<li />}`, a link with `render={<a href="…" />}`); the add tile renders a `<button>`. It has no hover or
|
|
@@ -14,7 +14,7 @@ import { ListItem, ListItemPrice, ListItemThumbnail } from "@dodopayments/ui/lis
|
|
|
14
14
|
## ListItem
|
|
15
15
|
|
|
16
16
|
One line of a list or one small card (Dodo Nest List item): a leading part, the title and description (one line
|
|
17
|
-
each, with an ellipsis) and a trailing part. `layout` is `row` (order lines, settings rows, sessions, saved
|
|
17
|
+
each, with an ellipsis, or whole with `wrap`) and a trailing part. `layout` is `row` (order lines, settings rows, sessions, saved
|
|
18
18
|
payment methods inside a panel; a divider under every row but the last), `card` (side-by-side portal cards, 12
|
|
19
19
|
apart), `tile` (a bordered row tile: add-ons with a quantity, or with `href` / `render` a link with a chevron for a settings index) or `add` (a dashed “Add …” tile that is a button; pass `onClick`). Renders a `<div>` (an `<li>` with
|
|
20
20
|
`render={<li />}`, a link with `render={<a href="…" />}`); the add tile renders a `<button>`. It has no hover or
|
|
@@ -22,15 +22,16 @@ selected state: for a choice, use a Radio card.
|
|
|
22
22
|
|
|
23
23
|
| Prop | Type | Default | Description |
|
|
24
24
|
| --- | --- | --- | --- |
|
|
25
|
-
| `title` (required) | `ReactNode` | - | The title, one line with an ellipsis (Labels/Primary)
|
|
25
|
+
| `title` (required) | `ReactNode` | - | The title, one line with an ellipsis (Labels/Primary), or whole with `wrap`. With `layout="add"`, the tile's label. |
|
|
26
26
|
| `corner` | `ReactNode` | - | Card only: a `Badge` or a small `Button` at the top right, opposite the leading part. |
|
|
27
|
-
| `description` | `ReactNode` | - | One line under the title with an ellipsis (Body/Secondary, Content/Secondary)
|
|
27
|
+
| `description` | `ReactNode` | - | One line under the title with an ellipsis (Body/Secondary, Content/Secondary), or whole with `wrap`. |
|
|
28
28
|
| `disabled` | `boolean` | `false` | Tile only: drop the link and the chevron and render a plain `<div>` tile, e.g. for a page that is not available yet. Say why in the description. |
|
|
29
29
|
| `divider` | `boolean` | `true` | Row only: the 1px Border/Primary line under the row. It is always hidden on the last row of its list. |
|
|
30
30
|
| `href` | `string` | - | Tile only: where the tile links to; renders an `<a href>` and adds the chevron. Pass `render` instead for a router link (on a tile, `render` is always the link). |
|
|
31
31
|
| `layout` | `"row" \| "card" \| "tile" \| "add"` | `"row"` | `row`: One line of a list inside a panel or order card: leading · title and description · trailing, padding 12 top and bottom, a divider under it (off on the last row, also when the row sits inside the last `<li>`, e.g. a link row).<br>`card`: A small card for side-by-side portal cards (add-on, saved payment method, offer): leading and corner on top, the text, then the trailing part spread across the bottom.<br>`tile`: A bordered tile laid out as a row: leading · title and description · trailing (add-ons with a quantity). With `href` or `render` the whole tile is one link and ends with a chevron (a settings index); with `disabled` it stays a plain tile.<br>`add`: A dashed “Add …” tile next to cards: a plus icon over the label, the whole tile a button. |
|
|
32
32
|
| `leading` | `ReactNode` | - | The leading part: a `ListItemThumbnail`, a `FeaturedIcon`, an `Avatar` or a payment logo. In a card it sits top left. |
|
|
33
33
|
| `trailing` | `ReactNode` | - | The trailing part: a `ListItemPrice`, a quantity stepper, a `Badge`, a `Button` or a chevron, 8 apart. In a card it spreads across the bottom (e.g. the price and an Add button). |
|
|
34
|
+
| `wrap` | `boolean` | `false` | Wrap the title and description to more lines instead of cutting them with an ellipsis, for text that must read whole (a settings index or a report tile). |
|
|
34
35
|
|
|
35
36
|
Also accepts Base UI props: `render`.
|
|
36
37
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Navigation progress
|
|
2
|
+
|
|
3
|
+
Navigation progress: a 2px bar in the brand green (Content/Brand-primary) fixed across the very top
|
|
4
|
+
of the viewport, above the sidebar, the top bar and any overlay, that tells the user a page is on its
|
|
5
|
+
way. Mount it once in the app shell and drive `active` from the router. It shows only after `delay`,
|
|
6
|
+
creeps towards the end while the page loads, then fills the track and fades out. It is decorative
|
|
7
|
+
(`aria-hidden`), takes no pointer events and never takes focus; under reduced motion it is a still,
|
|
8
|
+
full-width bar.
|
|
9
|
+
|
|
10
|
+
```tsx
|
|
11
|
+
import { NavigationProgress } from "@dodopayments/ui/navigation-progress";
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## NavigationProgress
|
|
15
|
+
|
|
16
|
+
Navigation progress: a 2px bar in the brand green (Content/Brand-primary) fixed across the very top
|
|
17
|
+
of the viewport, above the sidebar, the top bar and any overlay, that tells the user a page is on its
|
|
18
|
+
way. Mount it once in the app shell and drive `active` from the router. It shows only after `delay`,
|
|
19
|
+
creeps towards the end while the page loads, then fills the track and fades out. It is decorative
|
|
20
|
+
(`aria-hidden`), takes no pointer events and never takes focus; under reduced motion it is a still,
|
|
21
|
+
full-width bar.
|
|
22
|
+
|
|
23
|
+
| Prop | Type | Default | Description |
|
|
24
|
+
| --- | --- | --- | --- |
|
|
25
|
+
| `active` (required) | `boolean` | - | A navigation is in flight. Set it when one starts (a link click, a router push, back or forward) and clear it when the new page has rendered. |
|
|
26
|
+
| `delay` | `number` | `150` | Milliseconds a navigation must run before the bar shows, so an instant one never flashes. |
|
|
27
|
+
|
|
28
|
+
## Examples
|
|
29
|
+
|
|
30
|
+
### navigation-progress/basic
|
|
31
|
+
|
|
32
|
+
```tsx
|
|
33
|
+
"use client";
|
|
34
|
+
|
|
35
|
+
import { Button } from "@dodopayments/ui/button";
|
|
36
|
+
import { NavigationProgress } from "@dodopayments/ui/navigation-progress";
|
|
37
|
+
import { useState } from "react";
|
|
38
|
+
|
|
39
|
+
/** Start a navigation to see the bar at the top of the window; finish it to see it fill and fade. */
|
|
40
|
+
export default function NavigationProgressBasic() {
|
|
41
|
+
const [active, setActive] = useState(false);
|
|
42
|
+
return (
|
|
43
|
+
<div className="flex flex-wrap gap-2">
|
|
44
|
+
<NavigationProgress active={active} />
|
|
45
|
+
<Button variant="secondary" disabled={active} onClick={() => setActive(true)}>
|
|
46
|
+
Start navigation
|
|
47
|
+
</Button>
|
|
48
|
+
<Button variant="secondary" disabled={!active} onClick={() => setActive(false)}>
|
|
49
|
+
Finish navigation
|
|
50
|
+
</Button>
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
@@ -5,8 +5,8 @@ raises the description for list and settings pages. Navigation is none (top-leve
|
|
|
5
5
|
`back` (one level up: a secondary 36px icon button before the title) or `breadcrumb` (two or more levels, above
|
|
6
6
|
the title). The title is Heading/Secondary with an optional `help` question icon and a `meta` slot for a status
|
|
7
7
|
Badge or Copyable ID; `actions` holds up to two large Buttons on the right; the `description` sits under the title,
|
|
8
|
-
indented past the back button. Rows are 4 apart. Below 576px (or with `breakpoint="mobile"`) the back button
|
|
9
|
-
|
|
8
|
+
indented past the back button. Rows are 4 apart. Below 576px (or with `breakpoint="mobile"`) the back button stays
|
|
9
|
+
beside the title and the actions move 8 below the description. No fill: put it first on the
|
|
10
10
|
main panel, 24 above the first section.
|
|
11
11
|
|
|
12
12
|
```tsx
|
|
@@ -20,8 +20,8 @@ raises the description for list and settings pages. Navigation is none (top-leve
|
|
|
20
20
|
`back` (one level up: a secondary 36px icon button before the title) or `breadcrumb` (two or more levels, above
|
|
21
21
|
the title). The title is Heading/Secondary with an optional `help` question icon and a `meta` slot for a status
|
|
22
22
|
Badge or Copyable ID; `actions` holds up to two large Buttons on the right; the `description` sits under the title,
|
|
23
|
-
indented past the back button. Rows are 4 apart. Below 576px (or with `breakpoint="mobile"`) the back button
|
|
24
|
-
|
|
23
|
+
indented past the back button. Rows are 4 apart. Below 576px (or with `breakpoint="mobile"`) the back button stays
|
|
24
|
+
beside the title and the actions move 8 below the description. No fill: put it first on the
|
|
25
25
|
main panel, 24 above the first section.
|
|
26
26
|
|
|
27
27
|
| Prop | Type | Default | Description |
|
package/ai/components/popover.md
CHANGED
|
@@ -88,8 +88,10 @@ time, and an unread dot (Surface/Accent-primary). Rows are divided by Border/Pri
|
|
|
88
88
|
| --- | --- | --- | --- |
|
|
89
89
|
| `title` (required) | `ReactNode` | - | What happened (Labels/Primary). |
|
|
90
90
|
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
91
|
+
| `description` | `ReactNode` | - | The notice's body under the title, up to two lines (Body/Secondary). |
|
|
91
92
|
| `icon` | `ReactNode` | - | Leading 16px Nucleo icon in Content/Secondary. |
|
|
92
93
|
| `id` | `ReactNode` | - | The object ID (Mono/Primary). |
|
|
94
|
+
| `onClick` | `(() => void)` | - | Makes the whole row a button, e.g. to open what the notice is about. |
|
|
93
95
|
| `time` | `ReactNode` | - | When it happened (Body/Secondary). |
|
|
94
96
|
| `unread` | `boolean` | `false` | Shows the blue unread dot. |
|
|
95
97
|
| `unreadLabel` | `string` | `"Unread"` | Accessible text for the unread dot. |
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Quantity stepper
|
|
2
2
|
|
|
3
3
|
A whole number between − and + buttons for picking how many of something (Figma: Quantity stepper).
|
|
4
|
-
Two sizes: `default` 24 high like Button xs (28 below `sm`), and `lg` the height of Button lg (36,
|
|
4
|
+
Two sizes: `default` 24 high like Button xs (28 below `sm`), and `lg` the height of Button lg (36,
|
|
5
5
|
shorter in compact density) for a row with a lg button. The value hugs its digits, and at 0 it shows 0.
|
|
6
6
|
Built on the Base UI `NumberField` parts: the value is a number input (`aria-roledescription`
|
|
7
7
|
"Number field") and the single tab stop. ArrowUp / ArrowDown step by `step`, Home / End jump to
|
|
@@ -19,7 +19,7 @@ import { QuantityStepper } from "@dodopayments/ui/quantity-stepper";
|
|
|
19
19
|
## QuantityStepper
|
|
20
20
|
|
|
21
21
|
A whole number between − and + buttons for picking how many of something (Figma: Quantity stepper).
|
|
22
|
-
Two sizes: `default` 24 high like Button xs (28 below `sm`), and `lg` the height of Button lg (36,
|
|
22
|
+
Two sizes: `default` 24 high like Button xs (28 below `sm`), and `lg` the height of Button lg (36,
|
|
23
23
|
shorter in compact density) for a row with a lg button. The value hugs its digits, and at 0 it shows 0.
|
|
24
24
|
Built on the Base UI `NumberField` parts: the value is a number input (`aria-roledescription`
|
|
25
25
|
"Number field") and the single tab stop. ArrowUp / ArrowDown step by `step`, Home / End jump to
|
|
@@ -40,7 +40,7 @@ input shows instead, so typing and arrow-key steps never animate. The animated c
|
|
|
40
40
|
| `incrementLabel` | `string` | `"Increase"` | Accessible name of the + button. |
|
|
41
41
|
| `max` | `number` | - | Largest quantity; the + button is disabled at it. |
|
|
42
42
|
| `min` | `number` | `0` | Smallest quantity; the − button is disabled at it. |
|
|
43
|
-
| `size` | `"default" \| "lg"` | `"default"` | `default`: 24 high (28 below `sm`), like Button xs: buttons 20 (24), value Labels/Secondary. Carts, line items, plan pickers.<br>`lg`: The height of Button lg (`--control-height-lg`: 36,
|
|
43
|
+
| `size` | `"default" \| "lg"` | `"default"` | `default`: 24 high (28 below `sm`), like Button xs: buttons 20 (24), value Labels/Secondary. Carts, line items, plan pickers.<br>`lg`: The height of Button lg (`--control-height-lg`: 36, less in compact density), with Button icon (`--control-height-md`) − and + 2px inside, Button icon sizes and the value in Labels/Primary. Next to a lg button, such as Buy now on a Product card. |
|
|
44
44
|
| `step` | `number` | `1` | Amount each − / + press or ArrowUp / ArrowDown adds or removes. |
|
|
45
45
|
|
|
46
46
|
Also accepts Base UI props: `allowOutOfRange`, `allowWheelScrub`, `defaultValue`, `disabled`, `form`, `id`, `inputRef`, `largeStep`, `name`, `onValueChange`, `onValueCommitted`, `readOnly`, `required`, `value`.
|
|
@@ -4,8 +4,8 @@ Hero of a record's detail page (a payment, customer or subscription), not the pa
|
|
|
4
4
|
`<section>` labelled by the title around a `Card`. It shows optional media, the title (an
|
|
5
5
|
amount or a name) with its status and a subtitle, icon + text facts (`meta`), labelled `chips`
|
|
6
6
|
such as a `CopyableId` and a `Timestamp`, and a `notice` (`CardNotice`) tucked under the card. The actions sit
|
|
7
|
-
beside the heading
|
|
8
|
-
with the title row.
|
|
7
|
+
beside the heading while the heading keeps its own width up to 12rem, even in a narrow pane, and wrap under it when
|
|
8
|
+
they do not fit. The media lines up with the title row.
|
|
9
9
|
|
|
10
10
|
```tsx
|
|
11
11
|
import { RecordHeader } from "@dodopayments/ui/record-header";
|
|
@@ -17,13 +17,13 @@ Hero of a record's detail page (a payment, customer or subscription), not the pa
|
|
|
17
17
|
`<section>` labelled by the title around a `Card`. It shows optional media, the title (an
|
|
18
18
|
amount or a name) with its status and a subtitle, icon + text facts (`meta`), labelled `chips`
|
|
19
19
|
such as a `CopyableId` and a `Timestamp`, and a `notice` (`CardNotice`) tucked under the card. The actions sit
|
|
20
|
-
beside the heading
|
|
21
|
-
with the title row.
|
|
20
|
+
beside the heading while the heading keeps its own width up to 12rem, even in a narrow pane, and wrap under it when
|
|
21
|
+
they do not fit. The media lines up with the title row.
|
|
22
22
|
|
|
23
23
|
| Prop | Type | Default | Description |
|
|
24
24
|
| --- | --- | --- | --- |
|
|
25
25
|
| `title` (required) | `ReactNode` | - | Name of the record, preformatted: the amount of a payment ("$1,240.00") or the name of a customer or product. Also labels the section. |
|
|
26
|
-
| `actions` | `ReactNode` | - | Record actions on the trailing side, e.g. "Invoice" and "Refund" `Button`s. |
|
|
26
|
+
| `actions` | `ReactNode` | - | Record actions on the trailing side, e.g. "Invoice" and "Refund" `Button`s. The header is a size container, so a `Button` with `labelHidden="narrow"` shows only its icon below 24rem of the header (a phone), its label in a tooltip. Beside a detail page's panel on a desktop it keeps its label. |
|
|
27
27
|
| `chips` | `readonly RecordHeaderChipEntry[]` | - | Labelled pills under the facts, e.g. `{ label: "Payment ID", value: <CopyableId value="pay_…" /> }` and a `Timestamp`. `false`, `null` and `undefined` entries are skipped. |
|
|
28
28
|
| `media` | `ReactNode` | - | Leading visual before the title, e.g. an `Avatar` or a product image. |
|
|
29
29
|
| `meta` | `readonly RecordHeaderMetaEntry[]` | - | Short icon + text facts under the heading, e.g. the payment method and the country. `false`, `null` and `undefined` entries are skipped. |
|
|
@@ -34,7 +34,9 @@ renders it. Put it in a `Field`: the label focuses it and the description and er
|
|
|
34
34
|
| `className` | `string` | - | Class names for the frame. |
|
|
35
35
|
| `defaultValue` | `string` | - | Initial markdown when uncontrolled. |
|
|
36
36
|
| `disabled` | `boolean` | - | Turns editing and the toolbar off and dims the editor to 64%. |
|
|
37
|
+
| `hiddenTools` | `readonly RichTextEditorTool[]` | - | Tools to leave out of the strip, e.g. `["strikethrough"]` when the text is shown where strikethrough is not. |
|
|
37
38
|
| `id` | `string` | - | The textbox id. Inside a `Field` the field sets it, so its label focuses the editor. |
|
|
39
|
+
| `input` | `"editor" \| "markdown"` | `"editor"` | What `value` is written in. `"editor"` is markdown with the editor's inline HTML for underline and text colour, which `RichTextContent` renders. `"markdown"` is plain markdown, for a renderer that shows no HTML (an app description): the strip has no underline or colour, inline HTML stays literal text, and inline code, fenced code blocks and single line breaks are kept as written. Read when the editor mounts. |
|
|
38
40
|
| `labels` | `Partial<RichTextEditorLabels>` | - | Override any of the built-in English labels. |
|
|
39
41
|
| `name` | `string` | - | Submits the markdown with a form, through a hidden input of this name. |
|
|
40
42
|
| `onBlur` | `FocusEventHandler<HTMLDivElement>` | - | Focus left the body. The event's `currentTarget` is the body wrapper (`rich-text-editor-content`). |
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Shows content laid out at a fixed size, scaled down to the width the frame has, e.g. a live checkout
|
|
4
4
|
page in an `iframe` beside its settings. The frame keeps the content's aspect ratio and never scales
|
|
5
|
-
it up. The content stays a live page; put a
|
|
5
|
+
it up: content narrower than the frame sits in its middle. The content stays a live page; put a
|
|
6
|
+
cover over it when it should not take clicks.
|
|
6
7
|
|
|
7
8
|
```tsx
|
|
8
9
|
import { ScaledFrame } from "@dodopayments/ui/scaled-frame";
|
|
@@ -12,7 +13,8 @@ import { ScaledFrame } from "@dodopayments/ui/scaled-frame";
|
|
|
12
13
|
|
|
13
14
|
Shows content laid out at a fixed size, scaled down to the width the frame has, e.g. a live checkout
|
|
14
15
|
page in an `iframe` beside its settings. The frame keeps the content's aspect ratio and never scales
|
|
15
|
-
it up. The content stays a live page; put a
|
|
16
|
+
it up: content narrower than the frame sits in its middle. The content stays a live page; put a
|
|
17
|
+
cover over it when it should not take clicks.
|
|
16
18
|
|
|
17
19
|
| Prop | Type | Default | Description |
|
|
18
20
|
| --- | --- | --- | --- |
|
package/ai/components/select.md
CHANGED
|
@@ -18,7 +18,7 @@ borderless 32 trigger that hugs its value, for a language or currency switcher (
|
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
19
|
| `className` | `string` | - | With `multiple` the trigger is the chips field (a box, not a button): `ref`, handlers and data props go to it, and `render` / `nativeButton` do not apply. |
|
|
20
20
|
| `icon` | `ReactNode` | - | An icon before the value (Figma "Show leading icon"), e.g. a Nucleo icon for an integration select, a globe for a language switcher or a `Flag` for a currency (a Flag keeps its 20 × 14). |
|
|
21
|
-
| `size` | `"default" \| "sm"` | `"default"` | `default`: 36 tall
|
|
21
|
+
| `size` | `"default" \| "sm"` | `"default"` | `default`: 36 tall, as in Figma. The default.<br>`sm`: 28 tall: a compact trigger in a dense toolbar or a table filter row, next to an `sm` Input or Button. Not a Figma size. The chips field of `multiple` and the `compact` variant keep their height. |
|
|
22
22
|
| `variant` | `"default" \| "compact"` | `"default"` | `default`: The field: 36 tall, full width, Border/Primary. The default.<br>`compact`: A borderless trigger that hugs a short value, 32 tall: a flag and "USD", a globe and "EN", for language and currency switchers in a header or footer. Labels/Secondary, a 12px caret, Surface/Hover on hover and while open. |
|
|
23
23
|
|
|
24
24
|
Also accepts Base UI props: `disabled`, `nativeButton`, `render`.
|
|
@@ -29,6 +29,8 @@ The Dodo Nest Select (Figma ↳ Select): one field, 36 tall, that opens a list i
|
|
|
29
29
|
value, or several with `multiple` (chips in the field, extras as "+N"); `searchable` adds a search field to the
|
|
30
30
|
list. Pass `items` (`{ value, label }[]`) so `SelectValue` shows the label. A plain Select renders the primitives /
|
|
31
31
|
Base UI `Select`; `searchable` or `multiple` run the Combobox under the same parts, with the same string values.
|
|
32
|
+
A `multiple` field sizes its chips to its own width, so give it a definite width (the default full width, or a
|
|
33
|
+
fixed one); sized to its content (`w-fit`) it would collapse.
|
|
32
34
|
|
|
33
35
|
| Prop | Type | Default | Description |
|
|
34
36
|
| --- | --- | --- | --- |
|
|
@@ -106,7 +108,8 @@ Also accepts Base UI props: `orientation`, `render`.
|
|
|
106
108
|
## SelectValue
|
|
107
109
|
|
|
108
110
|
Shows the selected item's label, or `placeholder` (Content/Tertiary) when empty. With `multiple` it shows the
|
|
109
|
-
chosen options as chips (`.Chip`, with a remove button each) and the rest as "+N"
|
|
111
|
+
chosen options as chips (`.Chip`, with a remove button each) and the rest as "+N", on one line, or wrapped to more
|
|
112
|
+
rows in a field under 18rem.
|
|
110
113
|
|
|
111
114
|
| Prop | Type | Default | Description |
|
|
112
115
|
| --- | --- | --- | --- |
|
|
@@ -20,6 +20,8 @@ dividers, and an optional footer. Renders a `<section>` labelled by its heading.
|
|
|
20
20
|
| `action` | `ReactNode` | - | Control at the top-right of the header, e.g. an "Edit" `Button`. |
|
|
21
21
|
| `description` | `ReactNode` | - | One line under the heading explaining what the section configures. |
|
|
22
22
|
| `footer` | `ReactNode` | - | Row under the settings, e.g. a "Save changes" `Button` for a section that holds a form. |
|
|
23
|
+
| `help` | `ReactNode` | - | A secondary description in a Tooltip on an info icon after the heading, instead of a line under it. See `CardTitle`'s `help`. |
|
|
24
|
+
| `helpLabel` | `string` | `"More information"` | With `help`: accessible name of the info icon button. |
|
|
23
25
|
| `titleAs` | `"h2" \| "h3" \| "h4"` | `"h2"` | Element used for the heading. |
|
|
24
26
|
| `tone` | `"error" \| "neutral" \| null` | - | |
|
|
25
27
|
|
|
@@ -50,6 +52,7 @@ A navigation tile for a settings index page: an icon tile, a title and a descrip
|
|
|
50
52
|
| `disabled` | `boolean` | `false` | Render a non-interactive tile without the chevron, e.g. for a page that is not available yet. |
|
|
51
53
|
| `href` | `string` | - | Where the card links to: renders an `<a href>`. Pass `render` instead for a router link. |
|
|
52
54
|
| `icon` | `ReactNode` | - | Icon in a tile before the title, e.g. a `WalletIcon` from `@dodopayments/ui/icons`. |
|
|
55
|
+
| `wrap` | `boolean` | `false` | Wrap the title and description to more lines instead of cutting them with an ellipsis, for text that must read whole (a settings index or a report tile). |
|
|
53
56
|
|
|
54
57
|
Also accepts Base UI props: `render`.
|
|
55
58
|
|
package/ai/components/sheet.md
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
The sheet (Dodo Nest Sheet): portal + scrim + popup + close button, sliding in from the end of the reading
|
|
4
4
|
direction (the right in LTR). `type="side"` (default) is a grey tray 8 from the screen edges, 400 wide (`size="lg"`:
|
|
5
|
-
560), with the title and close on the grey chin, the body in a white panel that scrolls, and the
|
|
6
|
-
strip; below 400 it fills the screen minus 8 on every side. `type="full"` covers the screen.
|
|
7
|
-
`SheetTitle`; lay it out as `SheetHeader`, `SheetPanel` and `SheetFooter`. Don't stack a sheet over
|
|
8
|
-
a Dialog for a yes / no confirm.
|
|
5
|
+
560, `size="xl"`: 768), with the title and close on the grey chin, the body in a white panel that scrolls, and the
|
|
6
|
+
actions on the grey strip; below 400 it fills the screen minus 8 on every side. `type="full"` covers the screen.
|
|
7
|
+
Always include a `SheetTitle`; lay it out as `SheetHeader`, `SheetPanel` and `SheetFooter`. Don't stack a sheet over
|
|
8
|
+
a sheet, and use a Dialog for a yes / no confirm.
|
|
9
9
|
|
|
10
10
|
```tsx
|
|
11
11
|
import { SheetContent, Sheet, SheetClose, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPanel, SheetPortal, SheetTitle, SheetTrigger } from "@dodopayments/ui/sheet";
|
|
@@ -15,10 +15,10 @@ import { SheetContent, Sheet, SheetClose, SheetDescription, SheetFooter, SheetHe
|
|
|
15
15
|
|
|
16
16
|
The sheet (Dodo Nest Sheet): portal + scrim + popup + close button, sliding in from the end of the reading
|
|
17
17
|
direction (the right in LTR). `type="side"` (default) is a grey tray 8 from the screen edges, 400 wide (`size="lg"`:
|
|
18
|
-
560), with the title and close on the grey chin, the body in a white panel that scrolls, and the
|
|
19
|
-
strip; below 400 it fills the screen minus 8 on every side. `type="full"` covers the screen.
|
|
20
|
-
`SheetTitle`; lay it out as `SheetHeader`, `SheetPanel` and `SheetFooter`. Don't stack a sheet over
|
|
21
|
-
a Dialog for a yes / no confirm.
|
|
18
|
+
560, `size="xl"`: 768), with the title and close on the grey chin, the body in a white panel that scrolls, and the
|
|
19
|
+
actions on the grey strip; below 400 it fills the screen minus 8 on every side. `type="full"` covers the screen.
|
|
20
|
+
Always include a `SheetTitle`; lay it out as `SheetHeader`, `SheetPanel` and `SheetFooter`. Don't stack a sheet over
|
|
21
|
+
a sheet, and use a Dialog for a yes / no confirm.
|
|
22
22
|
|
|
23
23
|
| Prop | Type | Default | Description |
|
|
24
24
|
| --- | --- | --- | --- |
|
|
@@ -26,7 +26,7 @@ a Dialog for a yes / no confirm.
|
|
|
26
26
|
| `closeLabel` | `string` | `"Close"` | Accessible label for the close button. |
|
|
27
27
|
| `hideCloseButton` | `boolean` | `false` | Hide the close button. Keep a visible way to close the sheet, e.g. a `SheetClose`. |
|
|
28
28
|
| `portalProps` | `DialogPortalProps` | - | Props for the portal, e.g. a `container` to render the sheet into instead of `document.body`. |
|
|
29
|
-
| `size` | `"md" \| "lg"` | `"md"` | `md`: 400 wide: short forms and details. The default.<br>`lg`: 560 wide: longer forms. Side sheets only. |
|
|
29
|
+
| `size` | `"md" \| "lg" \| "xl"` | `"md"` | `md`: 400 wide: short forms and details. The default.<br>`lg`: 560 wide: longer forms. Side sheets only.<br>`xl`: 768 wide: a form with a code editor or a long checklist, such as a webhook endpoint. Side sheets only. |
|
|
30
30
|
| `type` | `"side" \| "full"` | `"side"` | `side`: A side panel for a task or record that keeps the page in view: refund, dispute, edit customer, new API key.<br>`full`: Full screen for long multi-step flows (add bank account, verification): back, title, progress and close on top, a 664 column of Card sections, the actions below. |
|
|
31
31
|
|
|
32
32
|
Also accepts Base UI props: `finalFocus`, `initialFocus`, `render`.
|
|
@@ -76,7 +76,7 @@ title (Heading/Tertiary), `progress` and the close button on one row above a rul
|
|
|
76
76
|
| --- | --- | --- | --- |
|
|
77
77
|
| `backLabel` | `string` | `"Back"` | Accessible label of the back button. |
|
|
78
78
|
| `onBack` | `(() => void)` | - | Full screen only: shows a back button before the title and calls this when it is pressed. |
|
|
79
|
-
| `progress` | `number` | - | Full screen only: how far along the flow is (0–100), drawn as a 120 wide Progress bar before the close button. |
|
|
79
|
+
| `progress` | `number` | - | Full screen only: how far along the flow is (0–100), drawn as a 120 wide Progress bar before the close button. Hidden below `sm`, so the title and description get the row on a phone. |
|
|
80
80
|
|
|
81
81
|
Also accepts Base UI props: `render`.
|
|
82
82
|
|
package/ai/components/sidebar.md
CHANGED
|
@@ -23,12 +23,13 @@ menus) and `SidebarFooter` (Developer, Settings and a `SidebarModeSwitch`), insi
|
|
|
23
23
|
## SidebarBusinessSwitcher
|
|
24
24
|
|
|
25
25
|
The business switcher at the top of the sidebar (Figma `.Business switcher`): a 44px white row with a 24px
|
|
26
|
-
avatar, the name (truncates) and an up-down chevron; the same 24px avatar alone on the icon rail. Opens the business Menu
|
|
26
|
+
avatar, the name (truncates), an optional `badge` and an up-down chevron; the same 24px avatar alone on the icon rail. Opens the business Menu
|
|
27
27
|
(`children`) 8px below. Put it in `SidebarHeader`.
|
|
28
28
|
|
|
29
29
|
| Prop | Type | Default | Description |
|
|
30
30
|
| --- | --- | --- | --- |
|
|
31
31
|
| `name` (required) | `string` | - | Name of the current business. Its initials fill the avatar when there is no `logoUrl`. |
|
|
32
|
+
| `badge` | `ReactNode` | - | After the name, e.g. the member's role as a neutral `Badge`. Hidden on the icon rail. |
|
|
32
33
|
| `logoUrl` | `string` | - | Logo of the current business. |
|
|
33
34
|
| `menuClassName` | `string` | `240 wide` | Extra classes for the menu. |
|
|
34
35
|
| `menuContentProps` | `Omit<MenuContentProps, "className" \| "children">` | - | Props for the `MenuContent`, e.g. `finalFocus`. |
|
|
@@ -68,11 +69,12 @@ List of navigation items. Renders `<ul>`.
|
|
|
68
69
|
|
|
69
70
|
The clickable row of a menu item (primitive `SidebarMenuButton`, Figma `.Nav item`): a 20px icon + Body/Primary
|
|
70
71
|
label, 32px tall; a 32px tile on the icon rail. Renders a `<button>`; for navigation pass
|
|
71
|
-
`render={<a href="/payments" />}` (or your router's link).
|
|
72
|
+
`render={<a href="/payments" />}` (or your router's link). `tag` adds a badge at the end of the row, a dot on the rail.
|
|
72
73
|
|
|
73
74
|
| Prop | Type | Default | Description |
|
|
74
75
|
| --- | --- | --- | --- |
|
|
75
76
|
| `isActive` | `boolean` | `false` | Marks the item as the current page: Surface/Tertiary with a Border/Secondary ring, a Content/Primary icon and `aria-current="page"`. |
|
|
77
|
+
| `tag` | `ReactNode` | - | A tag at the end of the row, such as a violet sm `Badge` "New". On the icon rail it leaves the screen (it stays in the item's accessible name) and a 6px violet dot marks the tile's corner instead. |
|
|
76
78
|
| `tooltip` | `ReactNode` | - | Tooltip shown 8px to the side on hover and focus while the sidebar is the icon rail (desktop only). Pass the label. |
|
|
77
79
|
|
|
78
80
|
Also accepts Base UI props: `render`.
|
|
@@ -84,10 +86,12 @@ A menu item that expands to show a sub-menu. Renders `<li>`; compose it from a
|
|
|
84
86
|
The primitives have no sidebar collapsible part; built from the `Collapsible` primitive.
|
|
85
87
|
|
|
86
88
|
Inside a `SidebarProvider` only one sub-menu is open at a time: opening one closes the one that was open.
|
|
87
|
-
`defaultOpen` sets the first state
|
|
89
|
+
`defaultOpen` sets the first state, and `active` opens the one that holds the current page whenever it becomes
|
|
90
|
+
active. Pass `open` to control it yourself; a controlled sub-menu is left out of this.
|
|
88
91
|
|
|
89
92
|
| Prop | Type | Default | Description |
|
|
90
93
|
| --- | --- | --- | --- |
|
|
94
|
+
| `active` | `boolean` | `false` | The sub-menu holds the current page. It opens (closing the others) when it becomes active, also when the page changes from outside the sidebar, and the merchant can still close it. |
|
|
91
95
|
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
92
96
|
|
|
93
97
|
Also accepts Base UI props: `defaultOpen`, `disabled`, `onOpenChange`, `open`.
|
|
@@ -107,12 +111,14 @@ Also accepts Base UI props: `hiddenUntilFound`, `keepMounted`, `render`.
|
|
|
107
111
|
## SidebarMenuCollapsibleTrigger
|
|
108
112
|
|
|
109
113
|
The row that opens and closes a sub-menu: a `SidebarMenuButton` primitive rendered as a `CollapsibleTrigger`
|
|
110
|
-
primitive, with a 12px chevron. The parent stays default while its group is open.
|
|
114
|
+
primitive, with a 12px chevron. The parent stays default while its group is open. `tag` adds a badge before the
|
|
115
|
+
chevron, a dot on the rail.
|
|
111
116
|
|
|
112
117
|
| Prop | Type | Default | Description |
|
|
113
118
|
| --- | --- | --- | --- |
|
|
114
119
|
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
115
120
|
| `isActive` | `boolean` | `false` | Highlights the row, e.g. when the current page is inside the sub-menu. |
|
|
121
|
+
| `tag` | `ReactNode` | - | A tag before the chevron, such as a violet sm `Badge` "New"; a 6px violet dot on the icon rail. |
|
|
116
122
|
| `tooltip` | `ReactNode` | - | Tooltip shown on hover and focus while the sidebar is the icon rail (desktop only). Pass the label. |
|
|
117
123
|
|
|
118
124
|
Also accepts Base UI props: `nativeButton`, `render`.
|
|
@@ -128,11 +134,13 @@ Nested list under a menu item, 6px below it. Hidden on the icon rail. One level
|
|
|
128
134
|
## SidebarMenuSubButton
|
|
129
135
|
|
|
130
136
|
Link row of a sub-menu (primitive `SidebarMenuSubButton`, Figma `.Nav item` sub): a Content/Secondary label
|
|
131
|
-
indented to line up with the parent's label. Renders `<a>`; pass `render` for your router's link.
|
|
137
|
+
indented to line up with the parent's label. Renders `<a>`; pass `render` for your router's link. `tag` adds a badge
|
|
138
|
+
at the end of the row.
|
|
132
139
|
|
|
133
140
|
| Prop | Type | Default | Description |
|
|
134
141
|
| --- | --- | --- | --- |
|
|
135
142
|
| `isActive` | `boolean` | `false` | Marks the sub-item as the current page: Surface/Tertiary, Content/Primary label and `aria-current="page"`. |
|
|
143
|
+
| `tag` | `ReactNode` | - | A tag at the end of the row, such as a violet sm `Badge` "New". Wrap the label in a `<span>` so it truncates. |
|
|
136
144
|
|
|
137
145
|
Also accepts Base UI props: `render`.
|
|
138
146
|
|
|
@@ -22,10 +22,11 @@ label.
|
|
|
22
22
|
|
|
23
23
|
| Prop | Type | Default | Description |
|
|
24
24
|
| --- | --- | --- | --- |
|
|
25
|
-
| `label` (required) | `ReactNode` | - | What the number measures, e.g. "Successful payments". It sits on the grey strip and
|
|
25
|
+
| `label` (required) | `ReactNode` | - | What the number measures, e.g. "Successful payments". It sits on the grey strip in Heading/Tertiary (16px, a step above body text), with `help` right after it. On a narrow card it wraps onto more lines, so it reads whole and `action` keeps its row. |
|
|
26
|
+
| `action` | `ReactNode` | - | Small controls at the end of the label strip, e.g. a ghost `icon-xs` Share button or a compact select. They stay on the label's row: the label wraps to make room (keeping at least a third of the strip), and controls that still do not fit wrap among themselves at the end, never under the label. |
|
|
26
27
|
| `comparison` | `ReactNode` | - | The line under the value, e.g. "vs last 30 days", "+3 added this month" or "Next payout on Oct 21". Without it (and without a trend) the row disappears and the card hugs. |
|
|
27
|
-
| `empty` | `ReactNode` | - | Show the empty state: "-" for the value and the reason under it. `true` shows `labels.empty` ("No data yet"); text or a node is the reason ("Live mode only"). Ignored while `loading` or with an `error`. |
|
|
28
|
-
| `error` | `ReactNode` | - | Show the error state instead of the value: a small
|
|
28
|
+
| `empty` | `ReactNode` | - | Show the empty state: "-" for the value and the reason under it, centred in the panel, with no trend chip. `true` shows `labels.empty` ("No data yet"); text or a node is the reason ("Live mode only"). Ignored while `loading` or with an `error`. |
|
|
29
|
+
| `error` | `ReactNode` | - | Show the error state instead of the value: a small heading with an error icon, and "Try again" with `onRetry`, centred in the panel. `true` shows the default heading; text or a node is the reason, read to screen readers after the heading. Ignored while `loading`. |
|
|
29
30
|
| `flash` | `boolean` | `false` | Flash each change of a number `value` with `ValueFlash`: the new number rolls in and tints success (up) or destructive (down). For live balances and counters. |
|
|
30
31
|
| `footer` | `ReactNode` | - | A quiet line on the grey under the panel, e.g. `<ChartUpdated updatedAt={…} onRefresh={…} />` from `@dodopayments/ui/chart` ("Updated 40 minutes ago" and a refresh button). |
|
|
31
32
|
| `format` | `((value: number) => string)` | - | Formats a number `value` for display, e.g. as currency. Defaults to `String(value)`. |
|
|
@@ -35,7 +36,7 @@ label.
|
|
|
35
36
|
| `layout` | `"card" \| "inline"` | `"card"` | `card`: The Stat card: the label on a grey strip, the number in a white panel, in its own tray.<br>`inline`: A bare stat: the label (Body/Primary, Content/Secondary) over the number, with no tray or panel. For a grouped StatGrid. |
|
|
36
37
|
| `loading` | `boolean` | `false` | Replace the value and the comparison with Skeleton lines and mark the card busy. |
|
|
37
38
|
| `onRetry` | `(() => void)` | - | Shows a retry button in the error state. |
|
|
38
|
-
| `trend` | `StatCardTrend` | - | The change: a success (up) or error (down) chip before the comparison. Show it only with a comparison. |
|
|
39
|
+
| `trend` | `StatCardTrend` | - | The change: a success (up) or error (down) chip before the comparison. Show it only with a comparison. Not shown while `loading`, `empty` or `error`: a change of nothing is noise. |
|
|
39
40
|
| `value` | `ReactNode` | - | The number, formatted in full ("$84,320.50"); the card never abbreviates. Pass a number with `format` so `flash` can animate its changes. Without `flash`, a changed string or number swaps in place: the old value rises out and the new one rises in. An element swaps only with a `valueKey`. |
|
|
40
41
|
| `valueKey` | `string \| number` | - | Identifies an element `value`, such as `<Money amount={x} />`: the value swaps in place when the key changes. An element without a key updates without motion, because it is a new object on every render. String and number values are their own key. |
|
|
41
42
|
|
|
@@ -58,7 +59,7 @@ One label / value row of a `StatCardBreakdown`, the value at the end.
|
|
|
58
59
|
A responsive row of `StatCard`s: a `Grid` of 2, 3 or 4 equal columns, 16 apart, that stacks the cards 12 apart
|
|
59
60
|
when narrow. Cards in a row stretch to the same height, so their panels line up. `layout="group"` puts the stats
|
|
60
61
|
in one `Card` instead (the page summary under a page header): its cards turn inline, side by side with dividers
|
|
61
|
-
between them,
|
|
62
|
+
between them, staying side by side and turning compact when narrow.
|
|
62
63
|
|
|
63
64
|
| Prop | Type | Default | Description |
|
|
64
65
|
| --- | --- | --- | --- |
|
|
@@ -66,7 +67,7 @@ between them, stacked with dividers between rows when narrow.
|
|
|
66
67
|
| `gap` | `"sm" \| "md" \| "xl" \| "2xl" \| "none" \| "xs" \| "lg" \| null` | - | |
|
|
67
68
|
| `heading` | `ReactNode` | - | With `layout="group"`: the title on the card's strip, e.g. "Last 30 days". |
|
|
68
69
|
| `help` | `ReactNode` | - | With `layout="group"` and a `heading`: help text behind an info icon after it. |
|
|
69
|
-
| `layout` | `"cards" \| "group"` | `"cards"` | `cards`: Separate Stat cards, 16 apart (12 apart when they stack).<br>`group`: One Card tray (with an optional `heading`) whose panel lines the stats up as inline stats with dividers between them; they
|
|
70
|
+
| `layout` | `"cards" \| "group"` | `"cards"` | `cards`: Separate Stat cards, 16 apart (12 apart when they stack).<br>`group`: One Card tray (with an optional `heading`) whose panel lines the stats up as inline stats with dividers between them; on a narrow card they stay side by side and turn compact, labels wrapping and numbers on one line; under 16rem (256px) they stack as rows. |
|
|
70
71
|
|
|
71
72
|
Also accepts Base UI props: `render`.
|
|
72
73
|
|
package/ai/components/tabs.md
CHANGED
|
@@ -5,7 +5,7 @@ Pair it with `TabsList`, `TabsTrigger` and `TabsContent`; each `TabsTrigger` sho
|
|
|
5
5
|
`TabsContent` with the same `value`. Renders the `Tabs` primitive (Base UI `Tabs`).
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
|
-
import { Tabs, TabsContent, TabsList, TabsTrigger } from "@dodopayments/ui/tabs";
|
|
8
|
+
import { Tabs, TabsContent, TabsList, TabsPanels, TabsTrigger } from "@dodopayments/ui/tabs";
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
## Tabs
|
|
@@ -33,9 +33,10 @@ Also accepts Base UI props: `value`, `keepMounted`, `render`.
|
|
|
33
33
|
|
|
34
34
|
## TabsList
|
|
35
35
|
|
|
36
|
-
Row of `TabsTrigger`s on the `TabsList` primitive, with its animated active-tab indicator.
|
|
37
|
-
horizontally (scrollbar hidden)
|
|
38
|
-
Give it an `aria-label` describing the
|
|
36
|
+
Row of `TabsTrigger`s on the `TabsList` primitive, with its animated active-tab indicator. When the tabs do not
|
|
37
|
+
fit it scrolls horizontally (scrollbar hidden), fades the side that has more tabs, and keeps the active tab in
|
|
38
|
+
view on mount and on every change, so it stays usable on narrow screens. Give it an `aria-label` describing the
|
|
39
|
+
set of tabs.
|
|
39
40
|
|
|
40
41
|
| Prop | Type | Default | Description |
|
|
41
42
|
| --- | --- | --- | --- |
|
|
@@ -46,6 +47,16 @@ Give it an `aria-label` describing the set of tabs.
|
|
|
46
47
|
|
|
47
48
|
Also accepts Base UI props: `loopFocus`, `render`.
|
|
48
49
|
|
|
50
|
+
## TabsPanels
|
|
51
|
+
|
|
52
|
+
Wraps the `TabsContent`s of tabs whose panels differ in height: it follows the shown panel's height with the fast
|
|
53
|
+
motion (`duration-fast`, `ease-smooth-out`), so whatever sits under the tabs glides instead of jumping. Without
|
|
54
|
+
reduced motion only; the first height is set at once.
|
|
55
|
+
|
|
56
|
+
| Prop | Type | Default | Description |
|
|
57
|
+
| --- | --- | --- | --- |
|
|
58
|
+
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
59
|
+
|
|
49
60
|
## TabsTrigger
|
|
50
61
|
|
|
51
62
|
A tab (primitive `TabsTab`): an optional leading `icon`, the label (truncates at 180px) and an optional `count`.
|
|
@@ -136,7 +136,7 @@ export interface ActivityTimelineItemProps extends Omit<React.ComponentProps<"li
|
|
|
136
136
|
* (a 20px Featured icon in the tone, or a dot) with a 1px line to the next event, the title and
|
|
137
137
|
* description, and a `Timestamp` at the trailing end, all starting on the title's line, 12 apart and
|
|
138
138
|
* 20 above the next event. Below a 28rem row the date sits over the time, right-aligned (Figma
|
|
139
|
-
* Breakpoint mobile). Use it inside an `ol`; `ActivityTimeline` does this for you.
|
|
139
|
+
* 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.
|
|
140
140
|
*/
|
|
141
141
|
export declare function ActivityTimelineItem({ title, description, timestamp, icon, tone, connector, timestampFormat, timestampPlacement, timeZone, onSelect, href, current, className, ...props }: ActivityTimelineItemProps): React.JSX.Element;
|
|
142
142
|
/** Texts of `ActivityTimeline`, for translation. */
|