@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
|
@@ -40,5 +40,6 @@ field), with the search `ComboboxInput` inside the `ComboboxPopup`.
|
|
|
40
40
|
| `placeholder` | `string` | `"Select a currency"` | Trigger text while nothing is selected. |
|
|
41
41
|
| `required` | `boolean` | - | |
|
|
42
42
|
| `searchPlaceholder` | `string` | `"Search currencies"` | Placeholder and accessible name of the search input in the popup. |
|
|
43
|
+
| `size` | `"default" \| "sm"` | `"default"` | Trigger height: 36, or the compact 28 of `SelectTrigger` `size="sm"`. |
|
|
43
44
|
| `value` | `string \| null` | - | Selected ISO 4217 code (controlled). `null` clears the selection. |
|
|
44
45
|
|
|
@@ -3,7 +3,9 @@
|
|
|
3
3
|
The Dodo Nest Data table, driven by a TanStack Table v8 instance: the column headers on a grey tray,
|
|
4
4
|
the rows (`size` md 48 / lg 64) on the white panel inside it, skeleton rows while `isLoading`, and
|
|
5
5
|
`emptyMessage` centred in the panel when there are no rows. It keeps the table layout at every width:
|
|
6
|
-
a table wider than its container scrolls sideways (the container is then a tab stop).
|
|
6
|
+
a table wider than its container scrolls sideways (the container is then a tab stop). For a phone, give the
|
|
7
|
+
less important columns `meta.priority` 2 or 3 so they hide while the table is narrow, and set `pinFirstColumn`
|
|
8
|
+
to keep the first column in view. It sets
|
|
7
9
|
`aria-sort` on sortable headers and marks selected rows `data-state="selected"`, tinted
|
|
8
10
|
Surface/Secondary as on hover. Sorting, selection and pagination stay in the table
|
|
9
11
|
instance; pair it with `DataGridColumnHeader`, `DataGridRowSelect(All)` and `DataGridPagination`
|
|
@@ -20,7 +22,9 @@ import { DataGrid, DataGridColumnHeader, DataGridPagination, DataGridRowSelect,
|
|
|
20
22
|
The Dodo Nest Data table, driven by a TanStack Table v8 instance: the column headers on a grey tray,
|
|
21
23
|
the rows (`size` md 48 / lg 64) on the white panel inside it, skeleton rows while `isLoading`, and
|
|
22
24
|
`emptyMessage` centred in the panel when there are no rows. It keeps the table layout at every width:
|
|
23
|
-
a table wider than its container scrolls sideways (the container is then a tab stop).
|
|
25
|
+
a table wider than its container scrolls sideways (the container is then a tab stop). For a phone, give the
|
|
26
|
+
less important columns `meta.priority` 2 or 3 so they hide while the table is narrow, and set `pinFirstColumn`
|
|
27
|
+
to keep the first column in view. It sets
|
|
24
28
|
`aria-sort` on sortable headers and marks selected rows `data-state="selected"`, tinted
|
|
25
29
|
Surface/Secondary as on hover. Sorting, selection and pagination stay in the table
|
|
26
30
|
instance; pair it with `DataGridColumnHeader`, `DataGridRowSelect(All)` and `DataGridPagination`
|
|
@@ -44,7 +48,9 @@ the selected rows.
|
|
|
44
48
|
| `loadingRows` | `number` | - | Number of skeleton rows while loading. Defaults to the current page size. |
|
|
45
49
|
| `onRowClick` | `((row: TData) => void)` | - | Called with the row's original data when a row is clicked or activated with Enter/Space. Makes rows focusable. Clicks on buttons, links, inputs, checkboxes and `[data-no-row-click]` elements inside the row are ignored. |
|
|
46
50
|
| `onRowNavigate` | `((href: string, row: TData) => void)` | `Assigns the URL to `window.location`` | Follows a row's link in the same tab, e.g. `(href) => router.push(href)` for client-side routing. |
|
|
47
|
-
| `
|
|
51
|
+
| `pinFirstColumn` | `boolean` | `false` | Keep the first data column in view while a wide table scrolls sideways, next to the checkboxes if there are any, so each row stays identifiable on a phone. The columns passing under it fade. |
|
|
52
|
+
| `size` | `"sm" \| "md" \| "lg"` | `"md"` | `sm`: 36 rows in Body/Secondary with 12 padding, for a table in a narrow side panel such as Dodo AI's.<br>`md`: 48 rows, for one-line cells (the default).<br>`lg`: 64 rows, for a primary cell with a subtitle, a date with its time or an avatar. |
|
|
53
|
+
| `storageKey` | `string` | - | Remembers the columns the user chose, in this browser: their visibility (an Edit columns menu), their order and their widths (`columnSizing`) are saved in localStorage under `dodo-ui:data-grid:<storageKey>` and restored on the next visit, before the first paint. Give each table its own key. A saved order that no longer names every column is ignored, and saved entries for removed columns are dropped. Sorting, selection and pages are not saved. |
|
|
48
54
|
|
|
49
55
|
## DataGridColumnHeader
|
|
50
56
|
|
|
@@ -1700,6 +1706,91 @@ export default function DataGridLoadingEmpty() {
|
|
|
1700
1706
|
}
|
|
1701
1707
|
```
|
|
1702
1708
|
|
|
1709
|
+
### data-grid/phone
|
|
1710
|
+
|
|
1711
|
+
```tsx
|
|
1712
|
+
"use client";
|
|
1713
|
+
|
|
1714
|
+
import { Badge } from "@dodopayments/ui/badge";
|
|
1715
|
+
import { DataGrid } from "@dodopayments/ui/data-grid";
|
|
1716
|
+
import { type ColumnDef, getCoreRowModel, useReactTable } from "@tanstack/react-table";
|
|
1717
|
+
|
|
1718
|
+
interface Payment {
|
|
1719
|
+
id: string;
|
|
1720
|
+
customer: string;
|
|
1721
|
+
method: string;
|
|
1722
|
+
created: string;
|
|
1723
|
+
status: "succeeded" | "failed" | "processing";
|
|
1724
|
+
amount: string;
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
const payments: Payment[] = [
|
|
1728
|
+
{
|
|
1729
|
+
id: "pay_8Hq2Xa",
|
|
1730
|
+
customer: "ada@lovelace.dev",
|
|
1731
|
+
method: "Visa •••• 4242",
|
|
1732
|
+
created: "Nov 26, 09:14",
|
|
1733
|
+
status: "succeeded",
|
|
1734
|
+
amount: "$49.00",
|
|
1735
|
+
},
|
|
1736
|
+
{
|
|
1737
|
+
id: "pay_3Kd9Pm",
|
|
1738
|
+
customer: "grace@hopper.io",
|
|
1739
|
+
method: "UPI",
|
|
1740
|
+
created: "Nov 26, 08:51",
|
|
1741
|
+
status: "processing",
|
|
1742
|
+
amount: "$120.00",
|
|
1743
|
+
},
|
|
1744
|
+
{
|
|
1745
|
+
id: "pay_7Tn4Ws",
|
|
1746
|
+
customer: "alan@turing.org",
|
|
1747
|
+
method: "Mastercard •••• 4444",
|
|
1748
|
+
created: "Nov 25, 22:07",
|
|
1749
|
+
status: "failed",
|
|
1750
|
+
amount: "$19.00",
|
|
1751
|
+
},
|
|
1752
|
+
{
|
|
1753
|
+
id: "pay_1Bz6Lc",
|
|
1754
|
+
customer: "katherine@johnson.space",
|
|
1755
|
+
method: "Apple Pay",
|
|
1756
|
+
created: "Nov 25, 18:30",
|
|
1757
|
+
status: "succeeded",
|
|
1758
|
+
amount: "$240.00",
|
|
1759
|
+
},
|
|
1760
|
+
];
|
|
1761
|
+
|
|
1762
|
+
const columns: ColumnDef<Payment>[] = [
|
|
1763
|
+
{ accessorKey: "id", header: "Payment", meta: { cellClassName: "font-mono" } },
|
|
1764
|
+
{
|
|
1765
|
+
accessorKey: "status",
|
|
1766
|
+
header: "Status",
|
|
1767
|
+
cell: ({ row }) => <Badge status={row.original.status} kind="payment" />,
|
|
1768
|
+
},
|
|
1769
|
+
{ accessorKey: "amount", header: "Amount", meta: { cellClassName: "tabular-nums" } },
|
|
1770
|
+
// Hidden while the table is under 448px wide: a phone.
|
|
1771
|
+
{ accessorKey: "customer", header: "Customer", meta: { priority: 2 } },
|
|
1772
|
+
// Hidden while it is under 672px wide: a phone or a narrow panel.
|
|
1773
|
+
{ accessorKey: "method", header: "Method", meta: { priority: 3 } },
|
|
1774
|
+
{ accessorKey: "created", header: "Created", meta: { priority: 3 } },
|
|
1775
|
+
];
|
|
1776
|
+
|
|
1777
|
+
export default function DataGridPhone() {
|
|
1778
|
+
// eslint-disable-next-line react-hooks/incompatible-library -- TanStack Table returns a mutable instance by design.
|
|
1779
|
+
const table = useReactTable({
|
|
1780
|
+
data: payments,
|
|
1781
|
+
columns,
|
|
1782
|
+
getRowId: (row) => row.id,
|
|
1783
|
+
getCoreRowModel: getCoreRowModel(),
|
|
1784
|
+
});
|
|
1785
|
+
|
|
1786
|
+
return (
|
|
1787
|
+
<div className="w-full min-w-0">
|
|
1788
|
+
<DataGrid table={table} aria-label="Payments" pinFirstColumn />
|
|
1789
|
+
</div>
|
|
1790
|
+
);
|
|
1791
|
+
}
|
|
1792
|
+
```
|
|
1793
|
+
|
|
1703
1794
|
### data-grid/row-hover
|
|
1704
1795
|
|
|
1705
1796
|
```tsx
|
|
@@ -66,7 +66,7 @@ A named shortcut in a range picker's preset list. `range` is evaluated against "
|
|
|
66
66
|
| --- | --- | --- | --- |
|
|
67
67
|
| `label` (required) | `string` | - | Text on the preset button, e.g. "Last 7 days". |
|
|
68
68
|
| `range` (required) | `(today: Date) => CompleteDateRange` | - | Returns the range for the given day. |
|
|
69
|
-
| `messageKey` | `"search" \| "clear" \| "loading" \| "next" \| "cardFieldLabel" \| "cardFieldNumber" \| "cardFieldExpiry" \| "cardFieldCvc" \| "cardFieldName" \| "cardFieldNumberError" \| "cardFieldExpiryError" \| "cardFieldCvcError" \| "cardFieldNameError" \| "billingActionFailed" \| "close" \| "dismiss" \| "spinnerLabel" \| "remove" \| "removeItem" \| "confirm" \| "cancel" \| "retry" \| "tryAgain" \| "back" \| "more" \| "showMore" \| "showLess" \| "selectEmpty" \| "copied" \| "copyFailed" \| "copyToClipboard" \| "loadMoreError" \| "activityTimelineLoading" \| "activityTimelineEmptyTitle" \| "activityTimelineEmptyDescription" \| "activityTimelineErrorTitle" \| "activityTimelineErrorDescription" \| "activityTimelineEnd" \| "autocompleteShowSuggestions" \| "comboboxShowOptions" \| "breadcrumbLabel" \| "codeBlockCopy" \| "codeBlockLabel" \| "dataGridSelectRow" \| "dataGridSelectAll" \| "dataGridSortBy" \| "dataGridSortAscending" \| "dataGridSortDescending" \| "dataGridTime" \| "datePresetToday" \| "datePresetYesterday" \| "datePresetLast7Days" \| "datePresetLast30Days" \| "datePresetThisWeek" \| "datePresetThisMonth" \| "datePresetLastMonth" \| "datePresetMonthToDate" \| "datePresetYearToDate" \| "datePresetLastYear" \| "dateRangeTitle" \| "dateRangePresets" \| "datePickerTitle" \| "datePickerReset" \| "datePickerApply" \| "datePickerStartDate" \| "datePickerEndDate" \| "dateFilterPlaceholder" \| "dateFilterClear" \| "loadMore" \| "loadMoreEnd" \| "paginationLabel" \| "paginationPrevious" \| "paginationNext" \| "paginationFirst" \| "paginationLast" \| "paginationPage" \| "tablePaginationRowsPerPage" \| "tablePaginationViewing" \| "secretFieldReveal" \| "secretFieldCopy" \| "secretFieldRemasked" \| "showMoreLabel" \| "sidebarTitle" \| "sidebarToggle" \| "sidebarCollapse" \| "sidebarExpand" \| "sidebarMode" \| "sidebarModeTest" \| "sidebarModeLive" \| "sidebarSwitchToLive" \| "sidebarSwitchToTest" \| "inputCopy" \| "sheetProgress" \| "statCardIncreased" \| "statCardDecreased" \| "statCardInfo" \| "statCardError" \| "statCardEmpty" \| "statCardNoChange" \| "timestampUtc" \| "timestampRelative" \| "timestampTimestamp" \| "wizardStepsLabel" \| "wizardStepsPosition" \| "progressStep" \| "wizardStepsFinish" \| "wizardStepsComplete" \| "wizardStepsCompleteHint" \| "prorationPreviewLabel" \| "prorationPreviewCurrentPlan" \| "prorationPreviewNewPlan" \| "prorationPreviewCredit" \| "prorationPreviewCharge" \| "prorationPreviewDueToday" \| "prorationPreviewNextInvoice" \| "prorationPreviewEffectiveNow" \| "prorationPreviewEffectivePeriodEnd" \| "codeTabsLabel" \| "walletButtonsPayWith" \| "walletButtonsDivider"` | - | Built-in message that translates `label` under a `LocaleProvider` while `label` is still that message's English default. Custom presets leave it out and show `label` as given; a built-in preset you relabel (`{ ...preset, label: "Past week" }`) shows its new `label` too. |
|
|
69
|
+
| `messageKey` | `"search" \| "clear" \| "loading" \| "next" \| "cardFieldLabel" \| "cardFieldNumber" \| "cardFieldExpiry" \| "cardFieldCvc" \| "cardFieldName" \| "cardFieldNumberError" \| "cardFieldExpiryError" \| "cardFieldCvcError" \| "cardFieldNameError" \| "billingActionFailed" \| "close" \| "dismiss" \| "spinnerLabel" \| "remove" \| "removeItem" \| "confirm" \| "cancel" \| "retry" \| "tryAgain" \| "back" \| "more" \| "showMore" \| "showLess" \| "selectEmpty" \| "copied" \| "copyFailed" \| "copyToClipboard" \| "loadMoreError" \| "activityTimelineLoading" \| "activityTimelineEmptyTitle" \| "activityTimelineEmptyDescription" \| "activityTimelineErrorTitle" \| "activityTimelineErrorDescription" \| "activityTimelineEnd" \| "autocompleteShowSuggestions" \| "comboboxShowOptions" \| "breadcrumbLabel" \| "codeBlockCopy" \| "codeBlockLabel" \| "dataGridSelectRow" \| "dataGridSelectAll" \| "dataGridSortBy" \| "dataGridSortAscending" \| "dataGridSortDescending" \| "dataGridTime" \| "datePresetToday" \| "datePresetYesterday" \| "datePresetLast7Days" \| "datePresetLast30Days" \| "datePresetThisWeek" \| "datePresetThisMonth" \| "datePresetLastMonth" \| "datePresetMonthToDate" \| "datePresetYearToDate" \| "datePresetLastYear" \| "dateRangeTitle" \| "dateRangePresets" \| "datePickerTitle" \| "datePickerReset" \| "datePickerApply" \| "datePickerStartDate" \| "datePickerEndDate" \| "dateFilterPlaceholder" \| "dateFilterClear" \| "loadMore" \| "loadMoreEnd" \| "paginationLabel" \| "paginationPrevious" \| "paginationNext" \| "paginationFirst" \| "paginationLast" \| "paginationPage" \| "tablePaginationRowsPerPage" \| "tablePaginationViewing" \| "secretFieldReveal" \| "secretFieldCopy" \| "secretFieldRemasked" \| "showMoreLabel" \| "sidebarTitle" \| "sidebarToggle" \| "sidebarCollapse" \| "sidebarExpand" \| "sidebarMode" \| "sidebarModeTest" \| "sidebarModeLive" \| "sidebarSwitchToLive" \| "sidebarSwitchToTest" \| "imageCropTitle" \| "imageCropArea" \| "imageCropApply" \| "imageCropKeyboardHint" \| "imageCropFailed" \| "imageCropUnreadable" \| "inputCopy" \| "sheetProgress" \| "statCardIncreased" \| "statCardDecreased" \| "statCardInfo" \| "statCardError" \| "statCardEmpty" \| "statCardNoChange" \| "timestampUtc" \| "timestampRelative" \| "timestampTimestamp" \| "wizardStepsLabel" \| "wizardStepsPosition" \| "progressStep" \| "wizardStepsFinish" \| "wizardStepsComplete" \| "wizardStepsCompleteHint" \| "prorationPreviewLabel" \| "prorationPreviewCurrentPlan" \| "prorationPreviewNewPlan" \| "prorationPreviewCredit" \| "prorationPreviewCharge" \| "prorationPreviewDueToday" \| "prorationPreviewNextInvoice" \| "prorationPreviewEffectiveNow" \| "prorationPreviewEffectivePeriodEnd" \| "codeTabsLabel" \| "walletButtonsPayWith" \| "walletButtonsDivider"` | - | Built-in message that translates `label` under a `LocaleProvider` while `label` is still that message's English default. Custom presets leave it out and show `label` as given; a built-in preset you relabel (`{ ...preset, label: "Past week" }`) shows its new `label` too. |
|
|
70
70
|
|
|
71
71
|
## Examples
|
|
72
72
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Read-only facts of a record as labelled values grouped in sections, ported from the dashboard's
|
|
4
4
|
payment details panel and payout schedule card: a `Card` with the title, description and action on
|
|
5
5
|
its grey strip and the sections and footer in the white panel, separated by rules, each section a description list (`<dl>`). `layout="grid"` stacks label over
|
|
6
|
-
value in 2 columns (
|
|
6
|
+
value in 2 columns (1 under 20rem, 3 from 28rem); `layout="rows"` puts label and value
|
|
7
7
|
on one divided row. Values are preformatted nodes; empty ones show `emptyValue`, and `hidden`
|
|
8
8
|
items are left out.
|
|
9
9
|
|
|
@@ -16,7 +16,7 @@ import { DetailsPanel } from "@dodopayments/ui/details-panel";
|
|
|
16
16
|
Read-only facts of a record as labelled values grouped in sections, ported from the dashboard's
|
|
17
17
|
payment details panel and payout schedule card: a `Card` with the title, description and action on
|
|
18
18
|
its grey strip and the sections and footer in the white panel, separated by rules, each section a description list (`<dl>`). `layout="grid"` stacks label over
|
|
19
|
-
value in 2 columns (
|
|
19
|
+
value in 2 columns (1 under 20rem, 3 from 28rem); `layout="rows"` puts label and value
|
|
20
20
|
on one divided row. Values are preformatted nodes; empty ones show `emptyValue`, and `hidden`
|
|
21
21
|
items are left out.
|
|
22
22
|
|
|
@@ -27,7 +27,9 @@ items are left out.
|
|
|
27
27
|
| `description` | `ReactNode` | - | Text under the panel heading. |
|
|
28
28
|
| `emptyValue` | `ReactNode` | `"-"` | Shown in place of an empty item `value`. |
|
|
29
29
|
| `footer` | `ReactNode` | - | Content of the row below the sections, e.g. an "Edit billing details" button. |
|
|
30
|
-
| `
|
|
30
|
+
| `help` | `ReactNode` | - | With `title`: a secondary description in a Tooltip on an info icon after the heading, instead of a line under it. See `CardTitle`'s `help`. |
|
|
31
|
+
| `helpLabel` | `string` | `"More information"` | With `help`: accessible name of the info icon button. |
|
|
32
|
+
| `layout` | `DetailsPanelLayout` | `"grid"` | `grid` stacks each label above its value, 1 item per row in a panel under 20rem (a phone), 2 from 20rem and 3 once the panel is at least 28rem wide (container queries on the panel). `rows` puts one item per row, the label at the start and the value at the end, divided by rules. |
|
|
31
33
|
| `title` | `ReactNode` | - | Panel heading, e.g. "Payment details". A titled panel renders a `<section>` labelled by it. |
|
|
32
34
|
| `titleAs` | `"h2" \| "h3" \| "h4"` | `"h2"` | Element of the panel `title`. Section titles use the next level, or this one when the panel has no `title`. |
|
|
33
35
|
| `tone` | `"error" \| "neutral" \| null` | - | |
|
package/ai/components/dialog.md
CHANGED
|
@@ -28,12 +28,13 @@ Also accepts Base UI props: `finalFocus`, `initialFocus`, `render`.
|
|
|
28
28
|
|
|
29
29
|
## Dialog
|
|
30
30
|
|
|
31
|
-
Root of a modal dialog, centred on the screen
|
|
32
|
-
`alert` makes it an alert dialog for confirmations.
|
|
31
|
+
Root of a modal dialog, centred on the screen; with `mobileSheet` it is a bottom drawer on a phone. Controls open
|
|
32
|
+
state (`open`/`onOpenChange` or `defaultOpen`). `alert` makes it an alert dialog for confirmations.
|
|
33
33
|
|
|
34
34
|
| Prop | Type | Default | Description |
|
|
35
35
|
| --- | --- | --- | --- |
|
|
36
36
|
| `alert` | `boolean` | `false` | An alert dialog: it interrupts to confirm or acknowledge something (`role="alertdialog"`). Clicking the backdrop does not close it and `DialogContent` has no close button, so always offer an explicit Cancel in the footer. Escape still closes it. `ConfirmDialog` is a ready-made one. |
|
|
37
|
+
| `mobileSheet` | `boolean` | `false` | Below 640px, show the dialog as a bottom drawer: docked to the bottom edge at full width, closed with a swipe down as well as the scrim, Escape and the close button, with the actions sharing the footer row. Off by default: the dialog stays centred at every width. Do not set it when the body has its own drag gesture. An alert dialog is always centred. |
|
|
37
38
|
|
|
38
39
|
Also accepts Base UI props: `actionsRef`, `defaultOpen`, `defaultTriggerId`, `disablePointerDismissal`, `handle`, `modal`, `onOpenChange`, `onOpenChangeComplete`, `open`, `triggerId`.
|
|
39
40
|
|
|
@@ -80,6 +81,7 @@ button), `neutral` or `warning` with the black primary. Decorative: the title sa
|
|
|
80
81
|
| Prop | Type | Default | Description |
|
|
81
82
|
| --- | --- | --- | --- |
|
|
82
83
|
| `icon` (required) | `ReactNode` | - | The icon in the tile, a Nucleo icon (16px at `md`, 12px at `sm`): `<FeaturedIcon icon={<KeyIcon />} />`. |
|
|
84
|
+
| `look` | `"tile" \| "sphere"` | - | `tile`: The rounded square with a soft fill and two borders (the default). `sphere`: The dashboard's glossy round badge in the tone, a white icon on it (44px at `md`, 28px at `sm`), as the verification checklist shows each step. |
|
|
83
85
|
| `size` | `"sm" \| "md" \| null` | - | |
|
|
84
86
|
| `tone` | `"info" \| "success" \| "warning" \| "error" \| "violet" \| "neutral" \| "pink" \| "orange" \| null` | - | |
|
|
85
87
|
|
|
@@ -101,6 +103,7 @@ the dialog reaches its maximum height; the header and the footer strip stay.
|
|
|
101
103
|
|
|
102
104
|
| Prop | Type | Default | Description |
|
|
103
105
|
| --- | --- | --- | --- |
|
|
106
|
+
| `fill` | `boolean` | - | Fill the panel's height (a fixed-height dialog), so a short body can centre itself with `m-auto`. |
|
|
104
107
|
| `scrollFade` | `boolean` | - | |
|
|
105
108
|
|
|
106
109
|
Also accepts Base UI props: `render`.
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
# Drawer
|
|
2
|
+
|
|
3
|
+
The drawer: portal + scrim + popup, docked to the bottom edge with a drag handle and a close button. A grey tray
|
|
4
|
+
with rounded top corners, like Dialog: the title and body in a white panel, the actions on the grey strip. It is
|
|
5
|
+
as tall as its content, up to the screen minus 48, and pads the bottom safe area; a focused field stays above the
|
|
6
|
+
software keyboard. Always include a `DrawerTitle`; lay it out as `DrawerHeader`, `DrawerPanel` and `DrawerFooter`.
|
|
7
|
+
|
|
8
|
+
```tsx
|
|
9
|
+
import { DrawerContent, Drawer, DrawerClose, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPanel, DrawerTitle, DrawerTrigger } from "@dodopayments/ui/drawer";
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## DrawerContent
|
|
13
|
+
|
|
14
|
+
The drawer: portal + scrim + popup, docked to the bottom edge with a drag handle and a close button. A grey tray
|
|
15
|
+
with rounded top corners, like Dialog: the title and body in a white panel, the actions on the grey strip. It is
|
|
16
|
+
as tall as its content, up to the screen minus 48, and pads the bottom safe area; a focused field stays above the
|
|
17
|
+
software keyboard. Always include a `DrawerTitle`; lay it out as `DrawerHeader`, `DrawerPanel` and `DrawerFooter`.
|
|
18
|
+
|
|
19
|
+
| Prop | Type | Default | Description |
|
|
20
|
+
| --- | --- | --- | --- |
|
|
21
|
+
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
22
|
+
| `closeLabel` | `string` | `"Close"` | Accessible label for the close button. |
|
|
23
|
+
| `hideCloseButton` | `boolean` | `false` | Hide the close button. The scrim, Escape and a swipe down still close the drawer. |
|
|
24
|
+
| `hideHandle` | `boolean` | `false` | Hide the drag handle on top. The drawer still closes with a swipe down. |
|
|
25
|
+
| `portalProps` | `DrawerPortalProps` | - | Props for the portal, e.g. a `container` to render the drawer into instead of `document.body`. |
|
|
26
|
+
|
|
27
|
+
Also accepts Base UI props: `finalFocus`, `initialFocus`, `render`.
|
|
28
|
+
|
|
29
|
+
## Drawer
|
|
30
|
+
|
|
31
|
+
Root of a drawer: a modal panel that slides up from the bottom edge and closes with a swipe down, a tap on the
|
|
32
|
+
scrim or Escape (the `Drawer` primitive on Base UI Drawer). Controls open state (`open` / `onOpenChange` or
|
|
33
|
+
`defaultOpen`). `snapPoints` (fractions of the viewport, or px / rem lengths) let it rest at several heights.
|
|
34
|
+
Built for phones: on wide screens use a `Dialog` or a `Sheet`.
|
|
35
|
+
|
|
36
|
+
Also accepts Base UI props: `actionsRef`, `defaultOpen`, `defaultSnapPoint`, `defaultTriggerId`, `disablePointerDismissal`, `handle`, `modal`, `onOpenChange`, `onOpenChangeComplete`, `onSnapPointChange`, `open`, `snapPoint`, `snapPoints`, `snapToSequentialPoints`, `triggerId`.
|
|
37
|
+
|
|
38
|
+
## DrawerClose
|
|
39
|
+
|
|
40
|
+
Closes the drawer. Use `render={<Button variant="secondary" />}` for a footer action.
|
|
41
|
+
|
|
42
|
+
| Prop | Type | Default | Description |
|
|
43
|
+
| --- | --- | --- | --- |
|
|
44
|
+
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
45
|
+
|
|
46
|
+
Also accepts Base UI props: `nativeButton`, `render`.
|
|
47
|
+
|
|
48
|
+
## DrawerDescription
|
|
49
|
+
|
|
50
|
+
One or two lines under the title; becomes the drawer's accessible description.
|
|
51
|
+
|
|
52
|
+
| Prop | Type | Default | Description |
|
|
53
|
+
| --- | --- | --- | --- |
|
|
54
|
+
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
55
|
+
|
|
56
|
+
Also accepts Base UI props: `render`.
|
|
57
|
+
|
|
58
|
+
## DrawerFooter
|
|
59
|
+
|
|
60
|
+
The actions, on the grey strip under the panel. They share the row: cancel first, the primary action last.
|
|
61
|
+
|
|
62
|
+
## DrawerHeader
|
|
63
|
+
|
|
64
|
+
The top of the white panel: `DrawerTitle` and an optional `DrawerDescription`.
|
|
65
|
+
|
|
66
|
+
## DrawerPanel
|
|
67
|
+
|
|
68
|
+
The body of the white panel. It scrolls inside the drawer, under the header and above the footer.
|
|
69
|
+
|
|
70
|
+
| Prop | Type | Default | Description |
|
|
71
|
+
| --- | --- | --- | --- |
|
|
72
|
+
| `scrollFade` | `boolean` | `true` | Fade the content at the edges it scrolls under. |
|
|
73
|
+
|
|
74
|
+
## DrawerTitle
|
|
75
|
+
|
|
76
|
+
The drawer's accessible name. Required.
|
|
77
|
+
|
|
78
|
+
| Prop | Type | Default | Description |
|
|
79
|
+
| --- | --- | --- | --- |
|
|
80
|
+
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
81
|
+
|
|
82
|
+
Also accepts Base UI props: `render`.
|
|
83
|
+
|
|
84
|
+
## DrawerTrigger
|
|
85
|
+
|
|
86
|
+
Opens the drawer. Use `render={<Button />}` to style it as a Dodo button.
|
|
87
|
+
|
|
88
|
+
| Prop | Type | Default | Description |
|
|
89
|
+
| --- | --- | --- | --- |
|
|
90
|
+
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
91
|
+
|
|
92
|
+
Also accepts Base UI props: `handle`, `id`, `nativeButton`, `payload`, `render`.
|
|
93
|
+
|
|
94
|
+
## Examples
|
|
95
|
+
|
|
96
|
+
### drawer/basic
|
|
97
|
+
|
|
98
|
+
```tsx
|
|
99
|
+
"use client";
|
|
100
|
+
|
|
101
|
+
import { Button } from "@dodopayments/ui/button";
|
|
102
|
+
import {
|
|
103
|
+
Drawer,
|
|
104
|
+
DrawerClose,
|
|
105
|
+
DrawerContent,
|
|
106
|
+
DrawerDescription,
|
|
107
|
+
DrawerFooter,
|
|
108
|
+
DrawerHeader,
|
|
109
|
+
DrawerPanel,
|
|
110
|
+
DrawerTitle,
|
|
111
|
+
DrawerTrigger,
|
|
112
|
+
} from "@dodopayments/ui/drawer";
|
|
113
|
+
import { Field, FieldDescription, FieldLabel } from "@dodopayments/ui/field";
|
|
114
|
+
import { Input } from "@dodopayments/ui/input";
|
|
115
|
+
|
|
116
|
+
export default function DrawerBasic() {
|
|
117
|
+
return (
|
|
118
|
+
<Drawer>
|
|
119
|
+
<DrawerTrigger render={<Button variant="secondary" />}>Initiate refund</DrawerTrigger>
|
|
120
|
+
<DrawerContent>
|
|
121
|
+
<DrawerHeader>
|
|
122
|
+
<DrawerTitle>Initiate refund</DrawerTitle>
|
|
123
|
+
<DrawerDescription>Payment pay_7Hq2Xa…Lm3d · $49.00 · Visa •••• 4242</DrawerDescription>
|
|
124
|
+
</DrawerHeader>
|
|
125
|
+
<DrawerPanel>
|
|
126
|
+
<div className="flex flex-col gap-4">
|
|
127
|
+
<Field>
|
|
128
|
+
<FieldLabel>Amount</FieldLabel>
|
|
129
|
+
<Input type="money" currency="USD" defaultValue={4900} />
|
|
130
|
+
</Field>
|
|
131
|
+
<Field>
|
|
132
|
+
<FieldLabel>Reason</FieldLabel>
|
|
133
|
+
<FieldDescription>Shown to the customer on the refund receipt.</FieldDescription>
|
|
134
|
+
<Input placeholder="Duplicate charge" />
|
|
135
|
+
</Field>
|
|
136
|
+
</div>
|
|
137
|
+
</DrawerPanel>
|
|
138
|
+
<DrawerFooter>
|
|
139
|
+
<DrawerClose render={<Button variant="secondary" />}>Cancel</DrawerClose>
|
|
140
|
+
<DrawerClose render={<Button />}>Refund $49.00</DrawerClose>
|
|
141
|
+
</DrawerFooter>
|
|
142
|
+
</DrawerContent>
|
|
143
|
+
</Drawer>
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
### drawer/master
|
|
149
|
+
|
|
150
|
+
```tsx
|
|
151
|
+
"use client";
|
|
152
|
+
|
|
153
|
+
import { Button } from "@dodopayments/ui/button";
|
|
154
|
+
import {
|
|
155
|
+
Drawer,
|
|
156
|
+
DrawerClose,
|
|
157
|
+
DrawerContent,
|
|
158
|
+
DrawerDescription,
|
|
159
|
+
DrawerFooter,
|
|
160
|
+
DrawerHeader,
|
|
161
|
+
DrawerTitle,
|
|
162
|
+
DrawerTrigger,
|
|
163
|
+
} from "@dodopayments/ui/drawer";
|
|
164
|
+
|
|
165
|
+
export default function DrawerMaster() {
|
|
166
|
+
return (
|
|
167
|
+
<Drawer>
|
|
168
|
+
<DrawerTrigger render={<Button variant="secondary" />}>Open drawer</DrawerTrigger>
|
|
169
|
+
<DrawerContent>
|
|
170
|
+
<DrawerHeader>
|
|
171
|
+
<DrawerTitle>Pause subscription?</DrawerTitle>
|
|
172
|
+
<DrawerDescription>
|
|
173
|
+
Billing stops today. The customer keeps access until 14 December.
|
|
174
|
+
</DrawerDescription>
|
|
175
|
+
</DrawerHeader>
|
|
176
|
+
<DrawerFooter>
|
|
177
|
+
<DrawerClose render={<Button variant="secondary" />}>Cancel</DrawerClose>
|
|
178
|
+
<DrawerClose render={<Button variant="warning" />}>Pause</DrawerClose>
|
|
179
|
+
</DrawerFooter>
|
|
180
|
+
</DrawerContent>
|
|
181
|
+
</Drawer>
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
### drawer/nested
|
|
187
|
+
|
|
188
|
+
```tsx
|
|
189
|
+
"use client";
|
|
190
|
+
|
|
191
|
+
import { Button } from "@dodopayments/ui/button";
|
|
192
|
+
import {
|
|
193
|
+
Drawer,
|
|
194
|
+
DrawerClose,
|
|
195
|
+
DrawerContent,
|
|
196
|
+
DrawerDescription,
|
|
197
|
+
DrawerFooter,
|
|
198
|
+
DrawerHeader,
|
|
199
|
+
DrawerTitle,
|
|
200
|
+
DrawerTrigger,
|
|
201
|
+
} from "@dodopayments/ui/drawer";
|
|
202
|
+
|
|
203
|
+
export default function DrawerNested() {
|
|
204
|
+
return (
|
|
205
|
+
<Drawer>
|
|
206
|
+
<DrawerTrigger render={<Button variant="secondary" />}>Cancel subscription</DrawerTrigger>
|
|
207
|
+
<DrawerContent>
|
|
208
|
+
<DrawerHeader>
|
|
209
|
+
<DrawerTitle>Cancel subscription</DrawerTitle>
|
|
210
|
+
<DrawerDescription>
|
|
211
|
+
Pro plan · $49.00 a month. The customer keeps access until 14 December.
|
|
212
|
+
</DrawerDescription>
|
|
213
|
+
</DrawerHeader>
|
|
214
|
+
<DrawerFooter>
|
|
215
|
+
<DrawerClose render={<Button variant="secondary" />}>Keep it</DrawerClose>
|
|
216
|
+
<Drawer>
|
|
217
|
+
<DrawerTrigger render={<Button variant="destructive" />}>Cancel now</DrawerTrigger>
|
|
218
|
+
<DrawerContent>
|
|
219
|
+
<DrawerHeader>
|
|
220
|
+
<DrawerTitle>Cancel right away?</DrawerTitle>
|
|
221
|
+
<DrawerDescription>
|
|
222
|
+
Access ends now and the unused days are not refunded.
|
|
223
|
+
</DrawerDescription>
|
|
224
|
+
</DrawerHeader>
|
|
225
|
+
<DrawerFooter>
|
|
226
|
+
<DrawerClose render={<Button variant="secondary" />}>Back</DrawerClose>
|
|
227
|
+
<DrawerClose render={<Button variant="destructive" />}>Cancel now</DrawerClose>
|
|
228
|
+
</DrawerFooter>
|
|
229
|
+
</DrawerContent>
|
|
230
|
+
</Drawer>
|
|
231
|
+
</DrawerFooter>
|
|
232
|
+
</DrawerContent>
|
|
233
|
+
</Drawer>
|
|
234
|
+
);
|
|
235
|
+
}
|
|
236
|
+
```
|
|
237
|
+
|
|
238
|
+
### drawer/snap-points
|
|
239
|
+
|
|
240
|
+
```tsx
|
|
241
|
+
"use client";
|
|
242
|
+
|
|
243
|
+
import { Button } from "@dodopayments/ui/button";
|
|
244
|
+
import {
|
|
245
|
+
Drawer,
|
|
246
|
+
DrawerContent,
|
|
247
|
+
DrawerDescription,
|
|
248
|
+
DrawerHeader,
|
|
249
|
+
DrawerPanel,
|
|
250
|
+
DrawerTitle,
|
|
251
|
+
DrawerTrigger,
|
|
252
|
+
} from "@dodopayments/ui/drawer";
|
|
253
|
+
|
|
254
|
+
const EVENTS = [
|
|
255
|
+
"payment.succeeded",
|
|
256
|
+
"payment.failed",
|
|
257
|
+
"refund.succeeded",
|
|
258
|
+
"subscription.active",
|
|
259
|
+
"subscription.on_hold",
|
|
260
|
+
"subscription.renewed",
|
|
261
|
+
"subscription.cancelled",
|
|
262
|
+
"dispute.opened",
|
|
263
|
+
"dispute.won",
|
|
264
|
+
"dispute.lost",
|
|
265
|
+
"license_key.created",
|
|
266
|
+
"payout.succeeded",
|
|
267
|
+
];
|
|
268
|
+
|
|
269
|
+
export default function DrawerSnapPoints() {
|
|
270
|
+
return (
|
|
271
|
+
<Drawer snapPoints={[0.5, 1]}>
|
|
272
|
+
<DrawerTrigger render={<Button variant="secondary" />}>Webhook events</DrawerTrigger>
|
|
273
|
+
<DrawerContent>
|
|
274
|
+
<DrawerHeader>
|
|
275
|
+
<DrawerTitle>Webhook events</DrawerTitle>
|
|
276
|
+
<DrawerDescription>Drag up to see the full list.</DrawerDescription>
|
|
277
|
+
</DrawerHeader>
|
|
278
|
+
<DrawerPanel>
|
|
279
|
+
<ul className="flex flex-col gap-3">
|
|
280
|
+
{EVENTS.map((event) => (
|
|
281
|
+
<li key={event} className="text-mono-primary text-foreground">
|
|
282
|
+
{event}
|
|
283
|
+
</li>
|
|
284
|
+
))}
|
|
285
|
+
</ul>
|
|
286
|
+
</DrawerPanel>
|
|
287
|
+
</DrawerContent>
|
|
288
|
+
</Drawer>
|
|
289
|
+
);
|
|
290
|
+
}
|
|
291
|
+
```
|
|
292
|
+
|
package/ai/components/empty.md
CHANGED
|
@@ -23,7 +23,7 @@ The title, description and action rise in one after the other.
|
|
|
23
23
|
| `description` | `ReactNode` | - | What will appear and how to get it, e.g. "Add a bank account to start receiving payouts." |
|
|
24
24
|
| `icon` | `ReactNode` | - | Glyph of the Featured icon above the title, e.g. one from `@dodopayments/ui/icons`. Omit for no icon. |
|
|
25
25
|
| `iconTone` | `"info" \| "success" \| "warning" \| "error" \| "violet" \| "neutral" \| "pink" \| "orange" \| null` | `"neutral"` | Tone of the Featured icon. Keep `neutral` for empty states; use `error` when the content failed to load. |
|
|
26
|
-
| `titleAs` | `"h2" \| "h3" \| "h4" \| "h5" \| "h6" \| "p"` | `"h2"` | Element used for the title. Match the heading outline of the page, or use `"p"` when it must not be a heading. |
|
|
26
|
+
| `titleAs` | `"h1" \| "h2" \| "h3" \| "h4" \| "h5" \| "h6" \| "p"` | `"h2"` | Element used for the title. Match the heading outline of the page (`"h1"` when the empty state is the whole page, e.g. a lost connection), or use `"p"` when it must not be a heading. |
|
|
27
27
|
|
|
28
28
|
Also accepts Base UI props: `render`.
|
|
29
29
|
|
|
@@ -17,6 +17,7 @@ pass `role="img"`, `aria-label` and `aria-hidden={false}`.
|
|
|
17
17
|
| Prop | Type | Default | Description |
|
|
18
18
|
| --- | --- | --- | --- |
|
|
19
19
|
| `icon` (required) | `ReactNode` | - | The icon in the tile, a Nucleo icon (16px at `md`, 12px at `sm`): `<FeaturedIcon icon={<KeyIcon />} />`. |
|
|
20
|
+
| `look` | `"tile" \| "sphere"` | - | `tile`: The rounded square with a soft fill and two borders (the default). `sphere`: The dashboard's glossy round badge in the tone, a white icon on it (44px at `md`, 28px at `sm`), as the verification checklist shows each step. |
|
|
20
21
|
| `size` | `"md" \| "sm"` | `"md"` | `md`: 32px tile with a 16px icon, for cards, dialogs and empty states (the default).<br>`sm`: 20px tile with a 12px icon, the height of a text line, e.g. the events of an `ActivityTimeline`. |
|
|
21
22
|
| `tone` | `"neutral" \| "success" \| "warning" \| "error" \| "info" \| "orange" \| "pink" \| "violet"` | `"neutral"` | `neutral`: Settings link cards, empty states and invite or refund dialogs (the default).<br>`success`: A finished or verified state.<br>`warning`: Something that needs action.<br>`error`: The top of a destructive confirm, or a failure.<br>`info`: Under review, or an archive notice.<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 whose meaning the label already carries. Not a status. |
|
|
22
23
|
|
package/ai/components/field.md
CHANGED
|
@@ -13,7 +13,7 @@ control (a Switch, a 160px Select, a Button) on the trailing side and optional `
|
|
|
13
13
|
`children` is then the control. Without `label`, compose the parts as children.
|
|
14
14
|
|
|
15
15
|
```tsx
|
|
16
|
-
import { Field, FieldControl, FieldDescription, FieldError, FieldLabel } from "@dodopayments/ui/field";
|
|
16
|
+
import { Field, FieldControl, FieldDescription, FieldError, FieldLabel, LabelRequiredIndicator } from "@dodopayments/ui/field";
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
## Field
|
|
@@ -36,11 +36,11 @@ control (a Switch, a 160px Select, a Button) on the trailing side and optional `
|
|
|
36
36
|
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
37
37
|
| `description` | `ReactNode` | - | Helper text under the label (Body/Secondary, Content/Secondary), 2 below it. |
|
|
38
38
|
| `error` | `ReactNode` | - | Error message (Body/Secondary, Content/Error). Setting it marks the field invalid, so the control shows its own error ring. Under the control (vertical); under the text (horizontal), or 8 under the `expanded` content when there is some. Without it, the field still shows the browser's or `validate`'s message. |
|
|
39
|
-
| `expanded` | `ReactNode` | - | Content
|
|
39
|
+
| `expanded` | `ReactNode` | - | Content in the horizontal layout, 12 below the text, in a row 8 apart: what a switch reveals when it is on (an Input and an Edit button), or a row with no switch that edits a value. With a row control (`children`), it spans the whole row under the text and the control (under the control on a phone), and the expanded controls get their own Field, so give them an `aria-label`; without one, it sits under the description and the expanded control is the field's control. Horizontal layout only. |
|
|
40
40
|
| `help` | `ReactNode` | - | Extra detail in a Tooltip on a 12px info icon after the label. Put the explanation in `description`. |
|
|
41
41
|
| `helpLabel` | `string` | `"More information"` | Accessible name of the help icon. |
|
|
42
42
|
| `label` | `ReactNode` | - | The label (Labels/Primary). With it, `Field` draws the Figma layout itself and `children` is the control. Without it, compose the parts (`FieldLabel`, `FieldDescription`, `FieldError`) as children. |
|
|
43
|
-
| `layout` | `"vertical" \| "horizontal"` | `"vertical"` | `vertical`: Label row and description above the control, the error under it, 8 apart. For forms.<br>`horizontal`: Text block (label row, description,
|
|
43
|
+
| `layout` | `"vertical" \| "horizontal"` | `"vertical"` | `vertical`: Label row and description above the control, the error under it, 8 apart. For forms.<br>`horizontal`: Text block (label row, description, error) on the leading side, the control on the trailing side, 16 apart; expanded content under them, across the row. For settings that apply on their own. Stacks below 640px. |
|
|
44
44
|
| `required` | `boolean` | `false` | Shows a red asterisk after the label. It is decorative, so also set `required` on the control. |
|
|
45
45
|
|
|
46
46
|
Also accepts Base UI props: `actionsRef`, `dirty`, `disabled`, `invalid`, `name`, `render`, `touched`, `validate`, `validationDebounceTime`, `validationMode`.
|
|
@@ -66,11 +66,11 @@ Accepts Base UI's `render` prop to swap the rendered element.
|
|
|
66
66
|
| `prefix` | `ReactNode` | - | Inline text before the value in Content/Primary, e.g. `$`. |
|
|
67
67
|
| `prefixSelect` | `ReactNode` | - | A chrome-less select at the start, e.g. the phone country code: pass a `Select` with its `SelectTrigger`. |
|
|
68
68
|
| `shortcut` | `string` | - | A keyboard shortcut shown at the end in a `Kbd`, e.g. `/` on a search field. |
|
|
69
|
-
| `size` | `"lg" \| null` | - | |
|
|
69
|
+
| `size` | `"code" \| "sm" \| "lg" \| null` | - | |
|
|
70
70
|
| `suffix` | `ReactNode` | - | Inline text after the value in Content/Secondary, e.g. `%`. |
|
|
71
71
|
| `suffixSelect` | `ReactNode` | - | A chrome-less select at the end, e.g. the currency: pass a `Select` with its `SelectTrigger`. |
|
|
72
72
|
| `suggestions` | `readonly InputSuggestion[] \| readonly InputSuggestionGroup[]` | - | Suggestions shown in a list under the field while the user types: strings, `{ value, label }` items, or groups (`{ label, items }`). Pass an array (it may be empty, e.g. while async results load) to turn them on. |
|
|
73
|
-
| `suggestionsEmpty` | `ReactNode` | - | Text shown in the list when no suggestion matches, announced politely. Without it the list
|
|
73
|
+
| `suggestionsEmpty` | `ReactNode` | - | Text shown in the list when no suggestion matches, announced politely. Without it the list closes instead. |
|
|
74
74
|
| `suggestionsLoading` | `boolean` | `false` | Shows a spinner and `suggestionsLoadingText` in the list, e.g. while async suggestions load. |
|
|
75
75
|
| `suggestionsLoadingText` | `ReactNode` | `"Loading"` | Text next to the loading spinner. |
|
|
76
76
|
| `suggestionsTrigger` | `boolean` | `false` | With `suggestions`, shows a caret button at the end that opens and closes the list. |
|
|
@@ -117,6 +117,16 @@ Label for the field's control (primitive `FieldLabel`); `htmlFor` is set automat
|
|
|
117
117
|
|
|
118
118
|
Also accepts Base UI props: `nativeLabel`, `render`.
|
|
119
119
|
|
|
120
|
+
## LabelRequiredIndicator
|
|
121
|
+
|
|
122
|
+
Decorative required marker shared by `Label` and `FieldLabel`. Hidden from assistive
|
|
123
|
+
technology: the control's own `required` attribute is what gets announced. Exported for a
|
|
124
|
+
heading over a required group of fields; give it `className="ms-1"` there.
|
|
125
|
+
|
|
126
|
+
| Prop | Type | Default | Description |
|
|
127
|
+
| --- | --- | --- | --- |
|
|
128
|
+
| `className` | `string` | - | Additional Tailwind classes, merged last. |
|
|
129
|
+
|
|
120
130
|
## Examples
|
|
121
131
|
|
|
122
132
|
### field/basic
|
|
@@ -57,7 +57,7 @@ where the dropzone is too large. Picked files are checked as `FileUpload` checks
|
|
|
57
57
|
| `onFilesRejected` | `((rejections: FileUploadRejection[]) => void)` | - | Called with the refused files of each pick and the reason for each. |
|
|
58
58
|
| `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`. |
|
|
59
59
|
| `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. |
|
|
60
|
-
| `size` | `"default" \| "icon" \| "xs" \| "lg" \| "icon-xs" \| "icon-lg" \| null` | - | |
|
|
60
|
+
| `size` | `"default" \| "sm" \| "icon" \| "xs" \| "lg" \| "icon-sm" \| "icon-xs" \| "icon-lg" \| null` | - | |
|
|
61
61
|
| `successText` | `ReactNode` | `"Done"` | Label shown while `result` is `"success"`. |
|
|
62
62
|
| `variant` | `"link" \| "default" \| "warning" \| "secondary" \| "ghost" \| "destructive" \| "wallet" \| "destructive-outline" \| null` | - | |
|
|
63
63
|
|
|
@@ -33,7 +33,7 @@ springs each `d` attribute, so one shape turns into the next. Composes `Button`
|
|
|
33
33
|
| `semantics` | `IconMorphSemantics` | `"label"` | `"label"` names the button after the shown state. `"pressed"` and `"expanded"` also set `aria-pressed` / `aria-expanded` while state 1 shows; pass a fixed `aria-label` with them. |
|
|
34
34
|
| `shapes` | `readonly IconMorphShape[]` | - | Custom states (two or more) on a 24 x 24 grid. Give matching paths the same commands so they interpolate. |
|
|
35
35
|
| `showLabel` | `boolean` | `false` | Shows the state's label beside the icon. The label cross-fades with the icon. |
|
|
36
|
-
| `size` | `"default" \| "icon" \| "xs" \| "lg" \| "icon-xs" \| "icon-lg" \| null` | - | |
|
|
36
|
+
| `size` | `"default" \| "sm" \| "icon" \| "xs" \| "lg" \| "icon-sm" \| "icon-xs" \| "icon-lg" \| null` | - | |
|
|
37
37
|
| `strokeWidth` | `number` | `2` | Stroke width on the 24 x 24 grid. 2 renders as 1.5px at the 18px icon size, like Nucleo outline icons. |
|
|
38
38
|
| `successText` | `ReactNode` | `"Done"` | Label shown while `result` is `"success"`. |
|
|
39
39
|
| `value` | `number \| boolean` | - | The shown state. A boolean maps to 0 / 1. Pass it to control the morph. |
|