@dodopayments/ui 1.5.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 +1595 -133
- package/ai/component-registry.md +6 -1
- 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/badge.md +24 -0
- package/ai/components/bar-chart.md +4 -2
- package/ai/components/brand-logos.md +1 -1
- package/ai/components/button.md +110 -12
- 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 +3 -3
- package/ai/components/color-input.md +1 -1
- package/ai/components/command.md +4 -1
- package/ai/components/comparison-bars.md +1 -0
- package/ai/components/country-select.md +1 -0
- package/ai/components/currency-select.md +1 -0
- package/ai/components/data-grid.md +94 -3
- package/ai/components/date-picker.md +1 -1
- package/ai/components/details-panel.md +5 -3
- package/ai/components/dialog.md +5 -2
- package/ai/components/drawer.md +292 -0
- package/ai/components/empty.md +1 -1
- package/ai/components/featured-icon.md +1 -0
- package/ai/components/field.md +15 -5
- package/ai/components/file-upload.md +1 -1
- package/ai/components/icon-morph.md +1 -1
- package/ai/components/image-crop.md +89 -0
- package/ai/components/input-group.md +1 -1
- package/ai/components/input.md +72 -6
- package/ai/components/invoice-document.md +182 -0
- 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/load-more.md +1 -1
- package/ai/components/logo.md +1 -1
- package/ai/components/menu.md +10 -9
- package/ai/components/milestone.md +1 -1
- package/ai/components/navigation-progress.md +55 -0
- package/ai/components/new-items-pill.md +1 -1
- package/ai/components/page-header.md +4 -4
- package/ai/components/payment-logos.md +1 -1
- package/ai/components/popover.md +4 -1
- package/ai/components/quantity-stepper.md +3 -3
- package/ai/components/record-header.md +5 -5
- package/ai/components/reorder-list.md +45 -0
- package/ai/components/rich-text-editor.md +2 -0
- package/ai/components/scaled-frame.md +5 -3
- package/ai/components/select.md +33 -3
- package/ai/components/settings-section.md +3 -0
- package/ai/components/setup-guide.md +1 -1
- package/ai/components/sheet.md +10 -10
- package/ai/components/sidebar.md +15 -7
- package/ai/components/stat-card.md +7 -6
- package/ai/components/tabs.md +54 -4
- package/ai/components/test-mode-banner.md +4 -1
- package/ai/components/timestamp.md +11 -2
- package/ai/components/timezone-select.md +1 -0
- package/ai/skills/dodo-design/SKILL.md +15 -6
- 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/badge/badge.d.ts +12 -0
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +23 -4
- package/dist/components/badge/badge.js.map +1 -1
- package/dist/components/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 +116 -1
- package/dist/components/brand-logos/brand-artwork.d.ts.map +1 -1
- package/dist/components/brand-logos/brand-artwork.js +116 -1
- 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 +52 -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 +41 -6
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +79 -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-notice.d.ts.map +1 -1
- package/dist/components/card/card-notice.js +1 -1
- package/dist/components/card/card-notice.js.map +1 -1
- package/dist/components/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 +23 -4
- 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/country-select/country-select.d.ts +6 -1
- package/dist/components/country-select/country-select.d.ts.map +1 -1
- package/dist/components/country-select/country-select.js +2 -2
- package/dist/components/country-select/country-select.js.map +1 -1
- package/dist/components/currency-select/currency-select.d.ts +6 -1
- package/dist/components/currency-select/currency-select.d.ts.map +1 -1
- package/dist/components/currency-select/currency-select.js +2 -2
- package/dist/components/currency-select/currency-select.js.map +1 -1
- package/dist/components/data-grid/bulk-actions.js +2 -2
- package/dist/components/data-grid/bulk-actions.js.map +1 -1
- package/dist/components/data-grid/data-grid.d.ts +32 -2
- package/dist/components/data-grid/data-grid.d.ts.map +1 -1
- package/dist/components/data-grid/data-grid.js +193 -13
- 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 +4 -4
- 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/dialog/dialog.d.ts +12 -4
- package/dist/components/dialog/dialog.d.ts.map +1 -1
- package/dist/components/dialog/dialog.js +46 -7
- package/dist/components/dialog/dialog.js.map +1 -1
- package/dist/components/drawer/drawer.d.ts +73 -0
- package/dist/components/drawer/drawer.d.ts.map +1 -0
- package/dist/components/drawer/drawer.js +56 -0
- package/dist/components/drawer/drawer.js.map +1 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/index.d.ts.map +1 -0
- package/dist/components/drawer/index.js +2 -0
- package/dist/components/drawer/index.js.map +1 -0
- package/dist/components/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/featured-icon/featured-icon.d.ts +103 -1
- package/dist/components/featured-icon/featured-icon.d.ts.map +1 -1
- package/dist/components/featured-icon/featured-icon.js +61 -3
- package/dist/components/featured-icon/featured-icon.js.map +1 -1
- package/dist/components/featured-icon/index.d.ts +1 -1
- package/dist/components/featured-icon/index.d.ts.map +1 -1
- package/dist/components/featured-icon/index.js +1 -1
- package/dist/components/featured-icon/index.js.map +1 -1
- package/dist/components/featured-icon/sphere.d.ts +7 -0
- package/dist/components/featured-icon/sphere.d.ts.map +1 -0
- package/dist/components/featured-icon/sphere.js +29 -0
- package/dist/components/featured-icon/sphere.js.map +1 -0
- package/dist/components/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/file-upload/file-upload.js +1 -1
- package/dist/components/file-upload/file-upload.js.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/image-crop/crop-math.d.ts +28 -0
- package/dist/components/image-crop/crop-math.d.ts.map +1 -0
- package/dist/components/image-crop/crop-math.js +53 -0
- package/dist/components/image-crop/crop-math.js.map +1 -0
- package/dist/components/image-crop/image-crop.d.ts +31 -0
- package/dist/components/image-crop/image-crop.d.ts.map +1 -0
- package/dist/components/image-crop/image-crop.js +165 -0
- package/dist/components/image-crop/image-crop.js.map +1 -0
- package/dist/components/image-crop/index.d.ts +2 -0
- package/dist/components/image-crop/index.d.ts.map +1 -0
- package/dist/components/image-crop/index.js +2 -0
- package/dist/components/image-crop/index.js.map +1 -0
- package/dist/components/input/input-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 +27 -8
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +28 -9
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/input-group/input-group.d.ts +2 -2
- package/dist/components/input-group/input-group.d.ts.map +1 -1
- package/dist/components/input-group/input-group.js +1 -1
- package/dist/components/input-group/input-group.js.map +1 -1
- package/dist/components/invoice-document/index.d.ts +2 -0
- package/dist/components/invoice-document/index.d.ts.map +1 -0
- package/dist/components/invoice-document/index.js +2 -0
- package/dist/components/invoice-document/index.js.map +1 -0
- package/dist/components/invoice-document/invoice-document.d.ts +180 -0
- package/dist/components/invoice-document/invoice-document.d.ts.map +1 -0
- package/dist/components/invoice-document/invoice-document.js +58 -0
- package/dist/components/invoice-document/invoice-document.js.map +1 -0
- package/dist/components/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 +12 -6
- package/dist/components/list-item/list-item.d.ts.map +1 -1
- package/dist/components/list-item/list-item.js +5 -5
- package/dist/components/list-item/list-item.js.map +1 -1
- package/dist/components/list-toolbar/list-toolbar-date-range.js +1 -1
- package/dist/components/list-toolbar/list-toolbar-date-range.js.map +1 -1
- package/dist/components/list-toolbar/list-toolbar.js +1 -1
- package/dist/components/list-toolbar/list-toolbar.js.map +1 -1
- package/dist/components/logo/logo.d.ts +5 -1
- package/dist/components/logo/logo.d.ts.map +1 -1
- package/dist/components/logo/logo.js +7 -3
- package/dist/components/logo/logo.js.map +1 -1
- package/dist/components/menu/menu.d.ts +10 -9
- package/dist/components/menu/menu.d.ts.map +1 -1
- package/dist/components/menu/menu.js +5 -4
- package/dist/components/menu/menu.js.map +1 -1
- package/dist/components/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 +9 -13
- package/dist/components/page-header/page-header.js.map +1 -1
- package/dist/components/pagination/pagination.d.ts.map +1 -1
- package/dist/components/pagination/pagination.js +4 -2
- package/dist/components/pagination/pagination.js.map +1 -1
- package/dist/components/payment-logos/artwork/link.d.ts +2 -0
- package/dist/components/payment-logos/artwork/link.d.ts.map +1 -0
- package/dist/components/payment-logos/artwork/link.js +5 -0
- package/dist/components/payment-logos/artwork/link.js.map +1 -0
- package/dist/components/payment-logos/payment-logos.d.ts +1 -1
- package/dist/components/payment-logos/payment-logos.d.ts.map +1 -1
- package/dist/components/payment-logos/payment-logos.js +3 -0
- package/dist/components/payment-logos/payment-logos.js.map +1 -1
- package/dist/components/popover/popover.d.ts +12 -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 +3 -3
- 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 +7 -5
- 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/reorder-list/reorder-list.d.ts +11 -2
- package/dist/components/reorder-list/reorder-list.d.ts.map +1 -1
- package/dist/components/reorder-list/reorder-list.js +39 -16
- package/dist/components/reorder-list/reorder-list.js.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.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 +8 -3
- package/dist/components/scaled-frame/scaled-frame.d.ts.map +1 -1
- package/dist/components/scaled-frame/scaled-frame.js +27 -2
- package/dist/components/scaled-frame/scaled-frame.js.map +1 -1
- package/dist/components/segmented-control/segmented-control.d.ts +2 -2
- package/dist/components/segmented-control/segmented-control.d.ts.map +1 -1
- package/dist/components/segmented-control/segmented-control.js +10 -2
- package/dist/components/segmented-control/segmented-control.js.map +1 -1
- package/dist/components/select/select.d.ts +25 -4
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +34 -14
- 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 +32 -12
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar.js +38 -19
- 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 +7 -7
- 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/subscription-card/subscription-card.js +1 -1
- package/dist/components/subscription-card/subscription-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 +47 -6
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +108 -9
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/components/test-mode-banner/test-mode-banner.d.ts.map +1 -1
- package/dist/components/test-mode-banner/test-mode-banner.js +3 -2
- package/dist/components/test-mode-banner/test-mode-banner.js.map +1 -1
- package/dist/components/timestamp/index.d.ts +1 -1
- package/dist/components/timestamp/index.d.ts.map +1 -1
- package/dist/components/timestamp/index.js +1 -1
- package/dist/components/timestamp/index.js.map +1 -1
- package/dist/components/timestamp/timestamp.d.ts +12 -2
- package/dist/components/timestamp/timestamp.d.ts.map +1 -1
- package/dist/components/timestamp/timestamp.js +11 -1
- package/dist/components/timestamp/timestamp.js.map +1 -1
- package/dist/components/timezone-select/timezone-select.d.ts +6 -1
- package/dist/components/timezone-select/timezone-select.d.ts.map +1 -1
- package/dist/components/timezone-select/timezone-select.js +2 -2
- package/dist/components/timezone-select/timezone-select.js.map +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/icons/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 +21 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +21 -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/arrow-turn-right.d.ts +3 -0
- package/dist/icons/ui/arrow-turn-right.d.ts.map +1 -0
- package/dist/icons/ui/arrow-turn-right.js +5 -0
- package/dist/icons/ui/arrow-turn-right.js.map +1 -0
- package/dist/icons/ui/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 +3 -0
- package/dist/icons/ui/box-glyph.d.ts.map +1 -0
- package/dist/icons/ui/box-glyph.js +5 -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 +3 -0
- package/dist/icons/ui/circle-check-glyph.d.ts.map +1 -0
- package/dist/icons/ui/circle-check-glyph.js +5 -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/crop.d.ts +3 -0
- package/dist/icons/ui/crop.d.ts.map +1 -0
- package/dist/icons/ui/crop.js +5 -0
- package/dist/icons/ui/crop.js.map +1 -0
- package/dist/icons/ui/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 +3 -0
- package/dist/icons/ui/greek-temple-glyph.d.ts.map +1 -0
- package/dist/icons/ui/greek-temple-glyph.js +5 -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 +3 -0
- package/dist/icons/ui/hourglass-glyph.d.ts.map +1 -0
- package/dist/icons/ui/hourglass-glyph.js +5 -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 +3 -0
- package/dist/icons/ui/shop-glyph.d.ts.map +1 -0
- package/dist/icons/ui/shop-glyph.js +5 -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 +3 -0
- package/dist/icons/ui/triangle-warning-glyph.d.ts.map +1 -0
- package/dist/icons/ui/triangle-warning-glyph.js +5 -0
- package/dist/icons/ui/triangle-warning-glyph.js.map +1 -0
- package/dist/icons/ui/user-glyph.d.ts +3 -0
- package/dist/icons/ui/user-glyph.d.ts.map +1 -0
- package/dist/icons/ui/user-glyph.js +5 -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 +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/locale-messages.d.ts +8 -0
- package/dist/lib/locale-messages.d.ts.map +1 -1
- package/dist/lib/locale-messages.js +9 -0
- package/dist/lib/locale-messages.js.map +1 -1
- package/dist/locales/ar.d.ts.map +1 -1
- package/dist/locales/ar.js +6 -0
- package/dist/locales/ar.js.map +1 -1
- package/dist/locales/de.d.ts.map +1 -1
- package/dist/locales/de.js +6 -0
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/es.d.ts.map +1 -1
- package/dist/locales/es.js +6 -0
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/fr.d.ts.map +1 -1
- package/dist/locales/fr.js +6 -0
- package/dist/locales/fr.js.map +1 -1
- package/dist/locales/he.d.ts.map +1 -1
- package/dist/locales/he.js +6 -0
- package/dist/locales/he.js.map +1 -1
- package/dist/locales/hi.d.ts.map +1 -1
- package/dist/locales/hi.js +6 -0
- package/dist/locales/hi.js.map +1 -1
- package/dist/locales/ja.d.ts.map +1 -1
- package/dist/locales/ja.js +6 -0
- package/dist/locales/ja.js.map +1 -1
- package/dist/locales/pt-BR.d.ts.map +1 -1
- package/dist/locales/pt-BR.js +6 -0
- package/dist/locales/pt-BR.js.map +1 -1
- package/dist/locales/zh-CN.d.ts.map +1 -1
- package/dist/locales/zh-CN.js +6 -0
- package/dist/locales/zh-CN.js.map +1 -1
- package/dist/primitives/charts/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/gauge.js +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/hooks/use-media-query.d.ts +1 -1
- package/dist/primitives/hooks/use-media-query.js +1 -1
- package/dist/primitives/lib/mobile-sheet.d.ts +25 -0
- package/dist/primitives/lib/mobile-sheet.d.ts.map +1 -0
- package/dist/primitives/lib/mobile-sheet.js +28 -0
- package/dist/primitives/lib/mobile-sheet.js.map +1 -0
- package/dist/primitives/lib/segmented-control.d.ts +8 -2
- package/dist/primitives/lib/segmented-control.d.ts.map +1 -1
- package/dist/primitives/lib/segmented-control.js +8 -2
- package/dist/primitives/lib/segmented-control.js.map +1 -1
- package/dist/primitives/ui/button.d.ts +1 -1
- package/dist/primitives/ui/button.d.ts.map +1 -1
- package/dist/primitives/ui/button.js +7 -3
- package/dist/primitives/ui/button.js.map +1 -1
- package/dist/primitives/ui/calendar.d.ts.map +1 -1
- package/dist/primitives/ui/calendar.js +4 -2
- package/dist/primitives/ui/calendar.js.map +1 -1
- package/dist/primitives/ui/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/checkbox.d.ts.map +1 -1
- package/dist/primitives/ui/checkbox.js +3 -1
- package/dist/primitives/ui/checkbox.js.map +1 -1
- package/dist/primitives/ui/combobox.js +2 -2
- package/dist/primitives/ui/combobox.js.map +1 -1
- package/dist/primitives/ui/dialog.d.ts +10 -1
- package/dist/primitives/ui/dialog.d.ts.map +1 -1
- package/dist/primitives/ui/dialog.js +14 -3
- package/dist/primitives/ui/dialog.js.map +1 -1
- package/dist/primitives/ui/drawer.d.ts +1 -2
- package/dist/primitives/ui/drawer.d.ts.map +1 -1
- package/dist/primitives/ui/drawer.js +30 -14
- package/dist/primitives/ui/drawer.js.map +1 -1
- package/dist/primitives/ui/input-group.d.ts.map +1 -1
- package/dist/primitives/ui/input-group.js +4 -1
- package/dist/primitives/ui/input-group.js.map +1 -1
- package/dist/primitives/ui/input.js +2 -2
- package/dist/primitives/ui/input.js.map +1 -1
- package/dist/primitives/ui/menu.d.ts.map +1 -1
- package/dist/primitives/ui/menu.js +15 -16
- package/dist/primitives/ui/menu.js.map +1 -1
- package/dist/primitives/ui/number-field.js +1 -1
- package/dist/primitives/ui/number-field.js.map +1 -1
- package/dist/primitives/ui/otp-field.js +2 -2
- package/dist/primitives/ui/otp-field.js.map +1 -1
- package/dist/primitives/ui/popover.d.ts +3 -1
- package/dist/primitives/ui/popover.d.ts.map +1 -1
- package/dist/primitives/ui/popover.js +11 -5
- package/dist/primitives/ui/popover.js.map +1 -1
- package/dist/primitives/ui/radio-group.js +1 -1
- package/dist/primitives/ui/radio-group.js.map +1 -1
- package/dist/primitives/ui/select.d.ts +7 -3
- package/dist/primitives/ui/select.d.ts.map +1 -1
- package/dist/primitives/ui/select.js +16 -7
- package/dist/primitives/ui/select.js.map +1 -1
- package/dist/primitives/ui/sheet.d.ts.map +1 -1
- package/dist/primitives/ui/sheet.js +4 -3
- package/dist/primitives/ui/sheet.js.map +1 -1
- package/dist/primitives/ui/sidebar.js +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/tabs.d.ts.map +1 -1
- package/dist/primitives/ui/tabs.js +1 -1
- package/dist/primitives/ui/tabs.js.map +1 -1
- package/dist/primitives/ui/textarea.js +2 -2
- package/dist/primitives/ui/textarea.js.map +1 -1
- package/dist/styles/motion.test.tsx +15 -0
- package/dist/styles/theme.css +5 -1
- package/dist/styles/tokens.css +72 -39
- package/dist/styles/tokens.test.tsx +137 -7
- package/dist/theme/css.js +4 -4
- package/dist/theme/css.js.map +1 -1
- package/package.json +1 -1
package/ai/component-registry.md
CHANGED
|
@@ -40,12 +40,14 @@
|
|
|
40
40
|
- **Collapsible** (`@dodopayments/ui/collapsible`, Layout): Shows and hides a section of content: the `Collapsible` primitive on Base UI `Collapsible`. Compose it
|
|
41
41
|
- **Scaled frame** (`@dodopayments/ui/scaled-frame`, Layout): Shows content laid out at a fixed size, scaled down to the width the frame has, e.g. a live checkout
|
|
42
42
|
- **Dialog** (`@dodopayments/ui/dialog`, Overlays): The dialog (Dodo Nest Dialog): portal + scrim + a grey tray around a white panel, with the close button
|
|
43
|
+
- **Drawer** (`@dodopayments/ui/drawer`, Overlays): The drawer: portal + scrim + popup, docked to the bottom edge with a drag handle and a close button. A grey tray
|
|
43
44
|
- **Direction Provider** (`@dodopayments/ui/direction-provider`, Utilities): Sets the reading direction for every component inside: keyboard navigation (arrow keys in menus,
|
|
44
45
|
- **Empty** (`@dodopayments/ui/empty`, Feedback): What a page, card or table shows when there is nothing yet (Dodo Nest Empty state): an optional Featured icon
|
|
45
46
|
- **Field** (`@dodopayments/ui/field`, Forms): Groups a label, description, control and error message and wires them together: the label and
|
|
46
47
|
- **Form** (`@dodopayments/ui/form`, Forms): Native `<form>` (the `Form` primitive on Base UI `Form`) that validates the `Field`s inside it on submit.
|
|
47
48
|
- **Form field** (`@dodopayments/ui/form-field`, Forms): react-hook-form adapter for `Field`. Registers the field through RHF's `Controller` and renders
|
|
48
49
|
- **File Upload** (`@dodopayments/ui/file-upload`, Forms): Dropzone for picking files: click (or Enter / Space) opens the file picker, and files can be
|
|
50
|
+
- **Image Crop** (`@dodopayments/ui/image-crop`, Forms): Crops a picked image before it is uploaded, as the dashboard's image fields do (main's ImageUpload): the
|
|
49
51
|
- **Grid** (`@dodopayments/ui/grid`, Layout): Composite (the primitives have no Grid): layout only, on the Tailwind spacing scale.
|
|
50
52
|
- **Copyable ID** (`@dodopayments/ui/copyable-id`, Data display): An ID or secret the merchant can copy, in Geist Mono 12: the Dodo Nest Copyable ID. `inline` (default) for rails,
|
|
51
53
|
- **Money** (`@dodopayments/ui/money`, Data display): A formatted amount from integer minor units and an ISO 4217 code: the decimals follow the
|
|
@@ -64,12 +66,13 @@
|
|
|
64
66
|
- **Pagination** (`@dodopayments/ui/pagination`, Navigation): Moves through the rows of a table (Dodo Nest Pagination): an optional "Rows per page" select, the
|
|
65
67
|
- **App top bar** (`@dodopayments/ui/app-top-bar`, Navigation): The bar at the top of every dashboard page (Dodo Nest App top bar): search on the left (opens the Command
|
|
66
68
|
- **Radio Group** (`@dodopayments/ui/radio-group`, Forms): A set of mutually exclusive options: exactly one `Radio` can be selected. Built on the primitives
|
|
67
|
-
- **Select** (`@dodopayments/ui/select`, Forms): The field (Figma `container`) that opens the list: put a `SelectValue` inside.
|
|
69
|
+
- **Select** (`@dodopayments/ui/select`, Forms): The field (Figma `container`) that opens the list: put a `SelectValue` inside. 36 tall, or 28 with `size="sm"`; the caret turns up
|
|
68
70
|
- **Sheet** (`@dodopayments/ui/sheet`, Overlays): The sheet (Dodo Nest Sheet): portal + scrim + popup + close button, sliding in from the end of the reading
|
|
69
71
|
- **Sidebar** (`@dodopayments/ui/sidebar`, Navigation): The app sidebar (Dodo Nest Sidebar), on the `Sidebar` primitive. From 1024px it docks to the start edge (the
|
|
70
72
|
- **Skeleton** (`@dodopayments/ui/skeleton`, Feedback): A grey placeholder shown while content loads (Dodo Nest Skeleton), sized like the thing it replaces: `shape="line"`
|
|
71
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
|
|
72
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
|
|
73
76
|
- **Text Shimmer** (`@dodopayments/ui/text-shimmer`, Typography): Text with a highlight sweeping across it, for "in progress" labels such as "Generating report...".
|
|
74
77
|
- **Switch** (`@dodopayments/ui/switch`, Forms): An on/off toggle for settings that take effect immediately. Renders the `Switch` primitive (Base UI): a
|
|
75
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
|
|
@@ -84,6 +87,7 @@
|
|
|
84
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
|
|
85
88
|
- **Milestone** (`@dodopayments/ui/milestone`, Data display): A milestone on the Milestones page (Design File › Merchant Milestones). `state="achieved"` is a reached milestone:
|
|
86
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
|
|
87
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
|
|
88
92
|
- **Filter Grid** (`@dodopayments/ui/filter-grid`, Data display): Filter chips over a grid of cards, after interior.dev's filter grid
|
|
89
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
|
|
@@ -100,6 +104,7 @@
|
|
|
100
104
|
- **Page header** (`@dodopayments/ui/page-header`, Navigation): The title row at the top of every dashboard page (Dodo Nest Page header). `size="sm"` shrinks the title and
|
|
101
105
|
- **Order Summary** (`@dodopayments/ui/order-summary`, Blocks): Checkout order summary, ported from the checkout and the customer portal: product rows
|
|
102
106
|
- **Details Panel** (`@dodopayments/ui/details-panel`, Blocks): Read-only facts of a record as labelled values grouped in sections, ported from the dashboard's
|
|
107
|
+
- **Invoice Document** (`@dodopayments/ui/invoice-document`, Blocks): An invoice as its PDF prints, ported from the dashboard's invoice preview: A4 at 72 dpi (595 wide,
|
|
103
108
|
- **Payment Result** (`@dodopayments/ui/payment-result`, Blocks): Receipt card for the page a customer lands on after paying, ported from the checkout status page:
|
|
104
109
|
- **Subscription Card** (`@dodopayments/ui/subscription-card`, Blocks): A customer's subscription in the customer portal: name, add-ons and business, the payment method in the top
|
|
105
110
|
- **Payment Method List** (`@dodopayments/ui/payment-method-list`, Blocks): Card listing saved payment methods or bank accounts, after the customer portal's payment methods
|
|
@@ -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. |
|
package/ai/components/badge.md
CHANGED
|
@@ -23,6 +23,7 @@ icon come from the status map, and a later status change swaps the label in with
|
|
|
23
23
|
| `labels` | `Readonly<Record<string, string \| undefined>>` | - | Labels keyed by raw status, e.g. translations: `{ succeeded: "Erfolgreich" }`. Only with `status`. |
|
|
24
24
|
| `layout` | `"default" \| "icon"` | `"default"` | `default`: Text pill, optionally with a status dot or a trailing icon.<br>`icon`: Square pill wrapping a single icon. |
|
|
25
25
|
| `leadingIcon` | `ReactNode` | - | An icon before the label (Figma "Show leading icon"), 12px, e.g. a clock on a session timer or a card on a payment method chip. Decorative: the label names the badge. Replaces the `dot`. |
|
|
26
|
+
| `size` | `"md" \| "sm"` | `"md"` | `md`: 22px tall, as in Figma. The default.<br>`sm`: 18px tall with 6px inline padding: a compact pill for a dense table row or next to `sm` controls. Not a Figma size. |
|
|
26
27
|
| `status` | `"succeeded" \| "failed" \| "cancelled" \| "expired" \| "processing" \| "requires_customer_action" \| "requires_payment_method" \| "requires_merchant_action" \| "requires_confirmation" \| "requires_capture" \| "partially_captured" \| "partially_captured_and_capturable" \| "active" \| "pending" \| "on_hold" \| "paused" \| "scheduled_for_cancellation" \| "review" \| "partial" \| "full" \| "pre_dispute" \| "dispute" \| "pre_arbitration" \| "dispute_opened" \| "dispute_expired" \| "dispute_accepted" \| "dispute_cancelled" \| "dispute_challenged" \| "dispute_won" \| "dispute_lost" \| (string & Record<never, never>) \| null` | - | Raw status from the Dodo Payments API, e.g. `succeeded`, `on_hold` or `partial`. Picks the tone and the label (`children` replaces the label, e.g. with a translation). Unknown statuses render neutral with a readable label; `null`, `""` and a passed `undefined` (`status={row.status}` with no status yet) render "No status". When it changes, the tone crossfades and the new label swaps in. |
|
|
27
28
|
| `tone` | `"neutral" \| "success" \| "warning" \| "error" \| "info" \| "orange" \| "pink" \| "violet"` | `"neutral"` | `neutral`: Neutral status or metadata (draft, test mode), and category labels in a table column.<br>`success`: Success states: paid, active, succeeded.<br>`warning`: Pending or attention states: processing, requires action, on hold.<br>`error`: Failure states: failed, declined, cancelled.<br>`info`: Informational states: scheduled, upcoming, in review.<br>`orange`: A category or highlight whose meaning the label already carries. Not a status.<br>`pink`: A category or highlight whose meaning the label already carries. Not a status.<br>`violet`: A category or highlight, such as a product or plan type. Not a status. |
|
|
28
29
|
| `trailingIcon` | `"info"` | - | An icon after the label. `info` is a circle-info icon; wrap the badge in a `Tooltip` to explain it. |
|
|
@@ -60,6 +61,29 @@ neutral tone, no icon and its prettified raw value.
|
|
|
60
61
|
|
|
61
62
|
## Examples
|
|
62
63
|
|
|
64
|
+
### badge/compact
|
|
65
|
+
|
|
66
|
+
```tsx
|
|
67
|
+
"use client";
|
|
68
|
+
|
|
69
|
+
import { Badge } from "@dodopayments/ui/badge";
|
|
70
|
+
|
|
71
|
+
export default function BadgeCompact() {
|
|
72
|
+
return (
|
|
73
|
+
<>
|
|
74
|
+
<Badge size="sm" tone="success">
|
|
75
|
+
Active
|
|
76
|
+
</Badge>
|
|
77
|
+
<Badge size="sm" tone="warning" dot>
|
|
78
|
+
Past due
|
|
79
|
+
</Badge>
|
|
80
|
+
<Badge size="sm">Test mode</Badge>
|
|
81
|
+
<Badge tone="success">Active</Badge>
|
|
82
|
+
</>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
63
87
|
### badge/icon
|
|
64
88
|
|
|
65
89
|
```tsx
|
|
@@ -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"` | - | 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,16 +28,36 @@ 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`. |
|
|
32
35
|
| `result` | `"success" \| "error" \| null` | - | Outcome of the last action, after interior.dev's loading button. `"success"` swaps the label for a check and `successText`, `"error"` for a warning icon and `errorText`; `null` shows the label. The outcome is announced through a polite live region. Pass it (even `null`) on buttons that report an outcome, so every face shares one cell from the first render. Clear it yourself, e.g. after 1.4s. With `result`, `Button` renders the button and a sibling status element, so do not pass a `Button` with `result` as the `render` element of another component. |
|
|
33
|
-
| `size` | `"xs" \| "default" \| "lg" \| "icon" \| "icon-xs" \| "icon-lg"` | `"lg"` | `xs`: 28px tall (24px from `sm`), Figma `sm`: dense toolbars, strip actions and inline actions.<br>`default`: 36px tall (32px from `sm`): a compact control when a design asks for one. Not a Figma size; prefer `lg`.<br>`lg`: 40px tall (36px from `sm`), Figma `lg`, the default: page, form, dialog and card actions, next to an Input.<br>`icon`: Square icon-only button at the default height. Requires `aria-label`.<br>`icon-xs`: Square icon-only button at `xs` height. Requires `aria-label`.<br>`icon-lg`: Square icon-only button at `lg` height. Requires `aria-label`. |
|
|
36
|
+
| `size` | `"xs" \| "sm" \| "default" \| "lg" \| "icon" \| "icon-sm" \| "icon-xs" \| "icon-lg"` | `"lg"` | `xs`: 28px tall (24px from `sm`), Figma `sm`: dense toolbars, strip actions and inline actions.<br>`sm`: 32px tall (28px from `sm`): a compact action in a dense toolbar, a table filter row or next to an `sm` Input. Not a Figma size.<br>`default`: 36px tall (32px from `sm`): a compact control when a design asks for one. Not a Figma size; prefer `lg`.<br>`lg`: 40px tall (36px from `sm`), Figma `lg`, the default: page, form, dialog and card actions, next to an Input.<br>`icon`: Square icon-only button at the default height. Requires `aria-label`.<br>`icon-sm`: Square icon-only button at `sm` height. Requires `aria-label`.<br>`icon-xs`: Square icon-only button at `xs` height. Requires `aria-label`.<br>`icon-lg`: Square icon-only button at `lg` height. Requires `aria-label`. |
|
|
34
37
|
| `successText` | `ReactNode` | `"Done"` | Label shown while `result` is `"success"`. |
|
|
35
38
|
| `variant` | `"default" \| "secondary" \| "ghost" \| "destructive" \| "warning" \| "wallet" \| "destructive-outline" \| "link"` | `"default"` | `default`: Primary action (Figma Button primary): a dark gradient with white text, white in dark mode. Use it for the one main action of a view, form or dialog.<br>`secondary`: Tactile light button (Figma Button secondary). The default for most actions in forms, toolbars and dialogs.<br>`ghost`: No chrome until hover (Figma Button ghost). Use for icon buttons and dense UI.<br>`destructive`: Irreversible or dangerous actions such as delete or revoke (Figma Button destructive): a red gradient with white text.<br>`warning`: Confirms an action that needs attention but can be undone, such as pause (Figma Button warning): an amber gradient with white text.<br>`wallet`: Express checkout (Apple Pay, Google Pay): the wallet brands' black button, white in dark mode, holding the wallet's `WalletLogo` (20 tall). Name it with `aria-label` ("Pay with Apple Pay"). `WalletButtons` lays out a row of them.<br>`destructive-outline`: Bordered destructive action where a solid red button is too loud, e.g. in a row of actions.<br>`link`: Looks like an inline link (link colour, underlined; the underline turns solid on hover) but behaves as a button. |
|
|
36
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,50 @@ 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>
|
|
89
|
+
);
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### button/compact
|
|
94
|
+
|
|
95
|
+
```tsx
|
|
96
|
+
"use client";
|
|
97
|
+
|
|
98
|
+
import { Button } from "@dodopayments/ui/button";
|
|
99
|
+
import { FilterIcon, PlusIcon } from "@dodopayments/ui/icons";
|
|
100
|
+
|
|
101
|
+
export default function ButtonCompact() {
|
|
102
|
+
return (
|
|
103
|
+
<div className="flex flex-wrap items-center gap-2">
|
|
104
|
+
<Button size="sm" variant="secondary" icon={<FilterIcon aria-hidden />} iconPlacement="left">
|
|
105
|
+
Filter
|
|
106
|
+
</Button>
|
|
107
|
+
<Button size="sm">Export</Button>
|
|
108
|
+
<Button size="icon-sm" variant="secondary" aria-label="Add a column">
|
|
109
|
+
<PlusIcon />
|
|
110
|
+
</Button>
|
|
111
|
+
</div>
|
|
54
112
|
);
|
|
55
113
|
}
|
|
56
114
|
```
|
|
@@ -96,6 +154,46 @@ export default function CopyButtonVariants() {
|
|
|
96
154
|
}
|
|
97
155
|
```
|
|
98
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
|
+
|
|
99
197
|
### button/loading
|
|
100
198
|
|
|
101
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
|
| --- | --- | --- | --- |
|
|
@@ -77,7 +77,7 @@ animation.
|
|
|
77
77
|
| `moreLabel` | `string` | `"Show more"` | Button text while collapsed. |
|
|
78
78
|
| `onOpenChange` | `((open: boolean) => void)` | - | Called with the next state when the user toggles it. |
|
|
79
79
|
| `open` | `boolean` | - | Whether the text is expanded. Pass it to control the component. |
|
|
80
|
-
| `size` | `"default" \| "icon" \| "xs" \| "lg" \| "icon-xs" \| "icon-lg" \| null` | - | |
|
|
80
|
+
| `size` | `"default" \| "sm" \| "icon" \| "xs" \| "lg" \| "icon-sm" \| "icon-xs" \| "icon-lg" \| null` | - | |
|
|
81
81
|
| `variant` | `"link" \| "default" \| "warning" \| "secondary" \| "ghost" \| "destructive" \| "wallet" \| "destructive-outline" \| null` | - | |
|
|
82
82
|
|
|
83
83
|
## useShowMore
|
|
@@ -24,7 +24,7 @@ picking black from empty fires no change: type it instead.
|
|
|
24
24
|
| `nativeInput` | `boolean` | - | |
|
|
25
25
|
| `onValueChange` | `((value: string) => void)` | - | Called with the typed text, or with the `#rrggbb` the native picker chose. |
|
|
26
26
|
| `pickerLabel` | `string` | - | Accessible name of the native colour picker behind the swatch. |
|
|
27
|
-
| `size` | `"lg"` | `"lg"` | Input height, as `Input` (`DODO_INPUT_VARIANTS`):
|
|
27
|
+
| `size` | `"sm" \| "lg"` | `"lg"` | Input height, as `Input` (`DODO_INPUT_VARIANTS`): `lg` 36 or the compact `sm` 28. |
|
|
28
28
|
| `unstyled` | `boolean` | - | |
|
|
29
29
|
|
|
30
30
|
Also accepts Base UI props: `render`.
|
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`. |
|
|
@@ -36,6 +36,7 @@ field), with the search `ComboboxInput` inside the `ComboboxPopup`.
|
|
|
36
36
|
| `placeholder` | `string` | `"Select a country"` | Trigger text while nothing is selected. |
|
|
37
37
|
| `required` | `boolean` | - | |
|
|
38
38
|
| `searchPlaceholder` | `string` | `"Search countries"` | Placeholder and accessible name of the search input in the popup. |
|
|
39
|
+
| `size` | `"default" \| "sm"` | `"default"` | Trigger height: 36, or the compact 28 of `SelectTrigger` `size="sm"`. |
|
|
39
40
|
| `value` | `string \| null` | - | Selected ISO 3166-1 alpha-2 code (controlled). `null` clears the selection. |
|
|
40
41
|
|
|
41
42
|
## Examples
|