@dodopayments/ui 1.6.0 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ai/component-registry.json +667 -65
- package/ai/component-registry.md +2 -0
- package/ai/components/activity-timeline.md +1 -1
- package/ai/components/alert.md +1 -1
- package/ai/components/app-top-bar.md +51 -1
- package/ai/components/auth-card.md +2 -0
- package/ai/components/bar-chart.md +4 -2
- package/ai/components/brand-logos.md +1 -1
- package/ai/components/button.md +86 -11
- package/ai/components/card.md +6 -3
- package/ai/components/chart-share-card.md +25 -0
- package/ai/components/chart.md +27 -1
- package/ai/components/code-block.md +1 -1
- package/ai/components/collapsible.md +2 -2
- package/ai/components/command.md +4 -1
- package/ai/components/comparison-bars.md +1 -0
- package/ai/components/data-grid.md +2 -1
- package/ai/components/details-panel.md +5 -3
- package/ai/components/dialog.md +1 -0
- package/ai/components/empty.md +1 -1
- package/ai/components/field.md +15 -5
- package/ai/components/input.md +31 -6
- package/ai/components/leaderboard.md +5 -2
- package/ai/components/link.md +1 -1
- package/ai/components/list-item.md +5 -4
- package/ai/components/navigation-progress.md +55 -0
- package/ai/components/page-header.md +4 -4
- package/ai/components/popover.md +2 -0
- package/ai/components/quantity-stepper.md +3 -3
- package/ai/components/record-header.md +5 -5
- package/ai/components/rich-text-editor.md +2 -0
- package/ai/components/scaled-frame.md +4 -2
- package/ai/components/select.md +5 -2
- package/ai/components/settings-section.md +3 -0
- package/ai/components/sheet.md +10 -10
- package/ai/components/sidebar.md +13 -5
- package/ai/components/stat-card.md +7 -6
- package/ai/components/tabs.md +15 -4
- package/dist/components/activity-timeline/activity-timeline.d.ts +1 -1
- package/dist/components/activity-timeline/activity-timeline.js +2 -2
- package/dist/components/activity-timeline/activity-timeline.js.map +1 -1
- package/dist/components/alert/alert.d.ts +2 -1
- package/dist/components/alert/alert.d.ts.map +1 -1
- package/dist/components/alert/alert.js +1 -1
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/app-top-bar/app-top-bar.d.ts +27 -1
- package/dist/components/app-top-bar/app-top-bar.d.ts.map +1 -1
- package/dist/components/app-top-bar/app-top-bar.js +37 -11
- package/dist/components/app-top-bar/app-top-bar.js.map +1 -1
- package/dist/components/app-top-bar/index.d.ts +1 -1
- package/dist/components/app-top-bar/index.d.ts.map +1 -1
- package/dist/components/app-top-bar/index.js +1 -1
- package/dist/components/app-top-bar/index.js.map +1 -1
- package/dist/components/auth-card/auth-card.d.ts +13 -1
- package/dist/components/auth-card/auth-card.d.ts.map +1 -1
- package/dist/components/auth-card/auth-card.js +5 -5
- package/dist/components/auth-card/auth-card.js.map +1 -1
- package/dist/components/badge/badge-status.d.ts +3 -3
- package/dist/components/badge/badge-status.js +3 -3
- package/dist/components/badge/badge-status.js.map +1 -1
- package/dist/components/bar-chart/bar-chart.d.ts +2 -1
- package/dist/components/bar-chart/bar-chart.d.ts.map +1 -1
- package/dist/components/bar-chart/bar-chart.js +2 -1
- package/dist/components/bar-chart/bar-chart.js.map +1 -1
- package/dist/components/brand-logos/brand-artwork.d.ts +89 -3
- package/dist/components/brand-logos/brand-artwork.d.ts.map +1 -1
- package/dist/components/brand-logos/brand-artwork.js +89 -3
- package/dist/components/brand-logos/brand-artwork.js.map +1 -1
- package/dist/components/brand-logos/brand-logos.d.ts +5 -2
- package/dist/components/brand-logos/brand-logos.d.ts.map +1 -1
- package/dist/components/brand-logos/brand-logos.js +42 -2
- package/dist/components/brand-logos/brand-logos.js.map +1 -1
- package/dist/components/button/button-narrow-label.d.ts +11 -0
- package/dist/components/button/button-narrow-label.d.ts.map +1 -0
- package/dist/components/button/button-narrow-label.js +22 -0
- package/dist/components/button/button-narrow-label.js.map +1 -0
- package/dist/components/button/button.d.ts +29 -6
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +71 -14
- package/dist/components/button/button.js.map +1 -1
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/button/index.d.ts.map +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/card/card.d.ts +16 -5
- package/dist/components/card/card.d.ts.map +1 -1
- package/dist/components/card/card.js +13 -4
- package/dist/components/card/card.js.map +1 -1
- package/dist/components/chart-share-card/chart-share-card.d.ts +31 -0
- package/dist/components/chart-share-card/chart-share-card.d.ts.map +1 -0
- package/dist/components/chart-share-card/chart-share-card.js +15 -0
- package/dist/components/chart-share-card/chart-share-card.js.map +1 -0
- package/dist/components/chart-share-card/index.d.ts +2 -0
- package/dist/components/chart-share-card/index.d.ts.map +1 -0
- package/dist/components/chart-share-card/index.js +2 -0
- package/dist/components/chart-share-card/index.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +1 -1
- package/dist/components/code-block/code-block.d.ts.map +1 -1
- package/dist/components/code-block/code-block.js +20 -3
- package/dist/components/code-block/code-block.js.map +1 -1
- package/dist/components/code-block/highlight-shell.d.ts +9 -0
- package/dist/components/code-block/highlight-shell.d.ts.map +1 -0
- package/dist/components/code-block/highlight-shell.js +53 -0
- package/dist/components/code-block/highlight-shell.js.map +1 -0
- package/dist/components/collapsible/collapsible.d.ts +2 -2
- package/dist/components/collapsible/collapsible.js +4 -4
- package/dist/components/collapsible/collapsible.js.map +1 -1
- package/dist/components/command/command-palette.d.ts +15 -2
- package/dist/components/command/command-palette.d.ts.map +1 -1
- package/dist/components/command/command-palette.js +8 -5
- package/dist/components/command/command-palette.js.map +1 -1
- package/dist/components/comparison-bars/comparison-bars.d.ts +13 -2
- package/dist/components/comparison-bars/comparison-bars.d.ts.map +1 -1
- package/dist/components/comparison-bars/comparison-bars.js +3 -3
- package/dist/components/comparison-bars/comparison-bars.js.map +1 -1
- package/dist/components/data-grid/data-grid.d.ts +16 -1
- package/dist/components/data-grid/data-grid.d.ts.map +1 -1
- package/dist/components/data-grid/data-grid.js +94 -4
- package/dist/components/data-grid/data-grid.js.map +1 -1
- package/dist/components/date-picker/date-picker.d.ts +5 -0
- package/dist/components/date-picker/date-picker.d.ts.map +1 -1
- package/dist/components/date-picker/date-picker.js +2 -2
- package/dist/components/date-picker/date-picker.js.map +1 -1
- package/dist/components/details-panel/details-panel.d.ts +11 -4
- package/dist/components/details-panel/details-panel.d.ts.map +1 -1
- package/dist/components/details-panel/details-panel.js +13 -12
- package/dist/components/details-panel/details-panel.js.map +1 -1
- package/dist/components/empty/empty.d.ts +3 -2
- package/dist/components/empty/empty.d.ts.map +1 -1
- package/dist/components/empty/empty.js.map +1 -1
- package/dist/components/field/field.d.ts +8 -6
- package/dist/components/field/field.d.ts.map +1 -1
- package/dist/components/field/field.js +15 -7
- package/dist/components/field/field.js.map +1 -1
- package/dist/components/field/index.d.ts +1 -0
- package/dist/components/field/index.d.ts.map +1 -1
- package/dist/components/field/index.js +1 -0
- package/dist/components/field/index.js.map +1 -1
- package/dist/components/field/label.d.ts +2 -1
- package/dist/components/field/label.d.ts.map +1 -1
- package/dist/components/field/label.js +2 -1
- package/dist/components/field/label.js.map +1 -1
- package/dist/components/file-upload/file-upload.d.ts +1 -1
- package/dist/components/file-upload/file-upload.d.ts.map +1 -1
- package/dist/components/icon-morph/icon-morph.d.ts +1 -1
- package/dist/components/icon-morph/icon-morph.d.ts.map +1 -1
- package/dist/components/icon-morph/icon-morph.js.map +1 -1
- package/dist/components/input/input-suggestions.d.ts +1 -1
- package/dist/components/input/input-suggestions.d.ts.map +1 -1
- package/dist/components/input/input-suggestions.js +21 -4
- package/dist/components/input/input-suggestions.js.map +1 -1
- package/dist/components/input/input.d.ts +21 -8
- package/dist/components/input/input.d.ts.map +1 -1
- package/dist/components/input/input.js +18 -8
- package/dist/components/input/input.js.map +1 -1
- package/dist/components/input-group/input-group.d.ts +1 -1
- package/dist/components/input-group/input-group.d.ts.map +1 -1
- package/dist/components/leaderboard/leaderboard.d.ts +3 -1
- package/dist/components/leaderboard/leaderboard.d.ts.map +1 -1
- package/dist/components/leaderboard/leaderboard.js +7 -5
- package/dist/components/leaderboard/leaderboard.js.map +1 -1
- package/dist/components/link/link.d.ts +4 -3
- package/dist/components/link/link.d.ts.map +1 -1
- package/dist/components/link/link.js +21 -2
- package/dist/components/link/link.js.map +1 -1
- package/dist/components/list-item/list-item.d.ts +10 -4
- package/dist/components/list-item/list-item.d.ts.map +1 -1
- package/dist/components/list-item/list-item.js +4 -4
- package/dist/components/list-item/list-item.js.map +1 -1
- package/dist/components/list-toolbar/list-toolbar.js +1 -1
- package/dist/components/list-toolbar/list-toolbar.js.map +1 -1
- package/dist/components/milestone/milestone.js +1 -1
- package/dist/components/milestone/milestone.js.map +1 -1
- package/dist/components/money/money.d.ts.map +1 -1
- package/dist/components/money/money.js +3 -3
- package/dist/components/money/money.js.map +1 -1
- package/dist/components/navigation-progress/index.d.ts +2 -0
- package/dist/components/navigation-progress/index.d.ts.map +1 -0
- package/dist/components/navigation-progress/index.js +2 -0
- package/dist/components/navigation-progress/index.js.map +1 -0
- package/dist/components/navigation-progress/navigation-progress.d.ts +23 -0
- package/dist/components/navigation-progress/navigation-progress.d.ts.map +1 -0
- package/dist/components/navigation-progress/navigation-progress.js +53 -0
- package/dist/components/navigation-progress/navigation-progress.js.map +1 -0
- package/dist/components/page-header/page-header.d.ts +3 -3
- package/dist/components/page-header/page-header.d.ts.map +1 -1
- package/dist/components/page-header/page-header.js +5 -8
- package/dist/components/page-header/page-header.js.map +1 -1
- package/dist/components/popover/popover.d.ts +5 -1
- package/dist/components/popover/popover.d.ts.map +1 -1
- package/dist/components/popover/popover.js +4 -2
- package/dist/components/popover/popover.js.map +1 -1
- package/dist/components/quantity-stepper/quantity-stepper.d.ts +3 -3
- package/dist/components/quantity-stepper/quantity-stepper.js +2 -2
- package/dist/components/quantity-stepper/quantity-stepper.js.map +1 -1
- package/dist/components/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/radio-group/radio-group.js +6 -4
- package/dist/components/radio-group/radio-group.js.map +1 -1
- package/dist/components/record-header/record-header.d.ts +7 -3
- package/dist/components/record-header/record-header.d.ts.map +1 -1
- package/dist/components/record-header/record-header.js +11 -3
- package/dist/components/record-header/record-header.js.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +13 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.js +17 -9
- package/dist/components/rich-text-editor/rich-text-editor.js.map +1 -1
- package/dist/components/rich-text-editor/rich-text-extensions.d.ts +5 -2
- package/dist/components/rich-text-editor/rich-text-extensions.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-extensions.js +43 -5
- package/dist/components/rich-text-editor/rich-text-extensions.js.map +1 -1
- package/dist/components/rich-text-editor/rich-text-markdown.d.ts +9 -3
- package/dist/components/rich-text-editor/rich-text-markdown.d.ts.map +1 -1
- package/dist/components/rich-text-editor/rich-text-markdown.js +134 -44
- package/dist/components/rich-text-editor/rich-text-markdown.js.map +1 -1
- package/dist/components/scaled-frame/scaled-frame.d.ts +2 -1
- package/dist/components/scaled-frame/scaled-frame.d.ts.map +1 -1
- package/dist/components/scaled-frame/scaled-frame.js +8 -2
- package/dist/components/scaled-frame/scaled-frame.js.map +1 -1
- package/dist/components/select/select.d.ts +6 -3
- package/dist/components/select/select.d.ts.map +1 -1
- package/dist/components/select/select.js +12 -7
- package/dist/components/select/select.js.map +1 -1
- package/dist/components/settings-section/settings-section.d.ts +8 -1
- package/dist/components/settings-section/settings-section.d.ts.map +1 -1
- package/dist/components/settings-section/settings-section.js +8 -8
- package/dist/components/settings-section/settings-section.js.map +1 -1
- package/dist/components/setup-guide/setup-guide.d.ts +2 -2
- package/dist/components/setup-guide/setup-guide.js +2 -2
- package/dist/components/setup-guide/setup-guide.js.map +1 -1
- package/dist/components/sheet/sheet.d.ts +16 -5
- package/dist/components/sheet/sheet.d.ts.map +1 -1
- package/dist/components/sheet/sheet.js +9 -5
- package/dist/components/sheet/sheet.js.map +1 -1
- package/dist/components/sidebar/sidebar.d.ts +30 -10
- package/dist/components/sidebar/sidebar.d.ts.map +1 -1
- package/dist/components/sidebar/sidebar.js +36 -17
- package/dist/components/sidebar/sidebar.js.map +1 -1
- package/dist/components/skeleton/page-skeleton.js +1 -1
- package/dist/components/skeleton/page-skeleton.js.map +1 -1
- package/dist/components/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/skeleton/skeleton.js +1 -1
- package/dist/components/skeleton/skeleton.js.map +1 -1
- package/dist/components/stat-card/stat-card.d.ts +24 -10
- package/dist/components/stat-card/stat-card.d.ts.map +1 -1
- package/dist/components/stat-card/stat-card.js +27 -18
- package/dist/components/stat-card/stat-card.js.map +1 -1
- package/dist/components/tabs/index.d.ts +1 -1
- package/dist/components/tabs/index.d.ts.map +1 -1
- package/dist/components/tabs/index.js +1 -1
- package/dist/components/tabs/index.js.map +1 -1
- package/dist/components/tabs/tabs.d.ts +18 -6
- package/dist/components/tabs/tabs.d.ts.map +1 -1
- package/dist/components/tabs/tabs.js +96 -7
- package/dist/components/tabs/tabs.js.map +1 -1
- package/dist/icons/flags/basque.d.ts.map +1 -0
- package/dist/icons/flags/basque.js.map +1 -0
- package/dist/icons/flags/canary-islands.d.ts.map +1 -0
- package/dist/icons/flags/canary-islands.js.map +1 -0
- package/dist/icons/flags/england.d.ts.map +1 -0
- package/dist/icons/flags/england.js.map +1 -0
- package/dist/icons/flags/hawaii.d.ts.map +1 -0
- package/dist/icons/flags/hawaii.js.map +1 -0
- package/dist/icons/flags/kurdistan.d.ts.map +1 -0
- package/dist/icons/flags/kurdistan.js.map +1 -0
- package/dist/icons/flags/netherlands-antilles.d.ts.map +1 -0
- package/dist/icons/flags/netherlands-antilles.js.map +1 -0
- package/dist/icons/flags/northen-ireland.d.ts.map +1 -0
- package/dist/icons/flags/northen-ireland.js.map +1 -0
- package/dist/icons/flags/scotland.d.ts.map +1 -0
- package/dist/icons/flags/scotland.js.map +1 -0
- package/dist/icons/flags/wales.d.ts.map +1 -0
- package/dist/icons/flags/wales.js.map +1 -0
- package/dist/icons/index.d.ts +12 -0
- package/dist/icons/index.d.ts.map +1 -0
- package/dist/icons/index.js +12 -0
- package/dist/icons/index.js.map +1 -0
- package/dist/icons/ui/ai-agents.d.ts +3 -0
- package/dist/icons/ui/ai-agents.d.ts.map +1 -0
- package/dist/icons/ui/ai-agents.js +5 -0
- package/dist/icons/ui/ai-agents.js.map +1 -0
- package/dist/icons/ui/archive.d.ts.map +1 -0
- package/dist/icons/ui/archive.js.map +1 -0
- package/dist/icons/ui/arrow-door-out-3.d.ts.map +1 -0
- package/dist/icons/ui/arrow-door-out-3.js.map +1 -0
- package/dist/icons/ui/arrow-door-out.d.ts.map +1 -0
- package/dist/icons/ui/arrow-door-out.js.map +1 -0
- package/dist/icons/ui/arrow-left.d.ts.map +1 -0
- package/dist/icons/ui/arrow-left.js.map +1 -0
- package/dist/icons/ui/arrows-transaction.d.ts.map +1 -0
- package/dist/icons/ui/arrows-transaction.js.map +1 -0
- package/dist/icons/ui/bell-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/bell-outline-duo.js.map +1 -0
- package/dist/icons/ui/bolt.d.ts.map +1 -0
- package/dist/icons/ui/bolt.js.map +1 -0
- package/dist/icons/ui/book-open.d.ts +3 -0
- package/dist/icons/ui/book-open.d.ts.map +1 -0
- package/dist/icons/ui/book-open.js +5 -0
- package/dist/icons/ui/book-open.js.map +1 -0
- package/dist/icons/ui/box-glyph.d.ts.map +1 -0
- package/dist/icons/ui/box-glyph.js.map +1 -0
- package/dist/icons/ui/box-plus.d.ts.map +1 -0
- package/dist/icons/ui/box-plus.js.map +1 -0
- package/dist/icons/ui/chart-pie.d.ts.map +1 -0
- package/dist/icons/ui/chart-pie.js.map +1 -0
- package/dist/icons/ui/chat-bubble-writing.d.ts +3 -0
- package/dist/icons/ui/chat-bubble-writing.d.ts.map +1 -0
- package/dist/icons/ui/chat-bubble-writing.js +5 -0
- package/dist/icons/ui/chat-bubble-writing.js.map +1 -0
- package/dist/icons/ui/check-glyph-12.d.ts.map +1 -0
- package/dist/icons/ui/check-glyph-12.js.map +1 -0
- package/dist/icons/ui/circle-check-glyph.d.ts.map +1 -0
- package/dist/icons/ui/circle-check-glyph.js.map +1 -0
- package/dist/icons/ui/circle-user-check.d.ts.map +1 -0
- package/dist/icons/ui/circle-user-check.js.map +1 -0
- package/dist/icons/ui/coins.d.ts.map +1 -0
- package/dist/icons/ui/coins.js.map +1 -0
- package/dist/icons/ui/dots-vertical.d.ts.map +1 -0
- package/dist/icons/ui/dots-vertical.js.map +1 -0
- package/dist/icons/ui/fingerprint.d.ts.map +1 -0
- package/dist/icons/ui/fingerprint.js.map +1 -0
- package/dist/icons/ui/flask.d.ts.map +1 -0
- package/dist/icons/ui/flask.js.map +1 -0
- package/dist/icons/ui/gear.d.ts.map +1 -0
- package/dist/icons/ui/gear.js.map +1 -0
- package/dist/icons/ui/greek-temple-glyph.d.ts.map +1 -0
- package/dist/icons/ui/greek-temple-glyph.js.map +1 -0
- package/dist/icons/ui/greek-temple.d.ts.map +1 -0
- package/dist/icons/ui/greek-temple.js.map +1 -0
- package/dist/icons/ui/grid.d.ts +3 -0
- package/dist/icons/ui/grid.d.ts.map +1 -0
- package/dist/icons/ui/grid.js +5 -0
- package/dist/icons/ui/grid.js.map +1 -0
- package/dist/icons/ui/heart-glyph.d.ts.map +1 -0
- package/dist/icons/ui/heart-glyph.js.map +1 -0
- package/dist/icons/ui/heart.d.ts.map +1 -0
- package/dist/icons/ui/heart.js.map +1 -0
- package/dist/icons/ui/hourglass-glyph.d.ts.map +1 -0
- package/dist/icons/ui/hourglass-glyph.js.map +1 -0
- package/dist/icons/ui/house.d.ts.map +1 -0
- package/dist/icons/ui/house.js.map +1 -0
- package/dist/icons/ui/key.d.ts.map +1 -0
- package/dist/icons/ui/key.js.map +1 -0
- package/dist/icons/ui/lightbulb.d.ts +3 -0
- package/dist/icons/ui/lightbulb.d.ts.map +1 -0
- package/dist/icons/ui/lightbulb.js +5 -0
- package/dist/icons/ui/lightbulb.js.map +1 -0
- package/dist/icons/ui/link.d.ts +3 -0
- package/dist/icons/ui/link.d.ts.map +1 -0
- package/dist/icons/ui/link.js +5 -0
- package/dist/icons/ui/link.js.map +1 -0
- package/dist/icons/ui/media-pause.d.ts +3 -0
- package/dist/icons/ui/media-pause.d.ts.map +1 -0
- package/dist/icons/ui/media-pause.js +5 -0
- package/dist/icons/ui/media-pause.js.map +1 -0
- package/dist/icons/ui/media-play.d.ts +3 -0
- package/dist/icons/ui/media-play.d.ts.map +1 -0
- package/dist/icons/ui/media-play.js +5 -0
- package/dist/icons/ui/media-play.js.map +1 -0
- package/dist/icons/ui/money-bill.d.ts.map +1 -0
- package/dist/icons/ui/money-bill.js.map +1 -0
- package/dist/icons/ui/money-bills.d.ts.map +1 -0
- package/dist/icons/ui/money-bills.js.map +1 -0
- package/dist/icons/ui/money-refund.d.ts.map +1 -0
- package/dist/icons/ui/money-refund.js.map +1 -0
- package/dist/icons/ui/monitor.d.ts.map +1 -0
- package/dist/icons/ui/monitor.js.map +1 -0
- package/dist/icons/ui/moon.d.ts.map +1 -0
- package/dist/icons/ui/moon.js.map +1 -0
- package/dist/icons/ui/paper-plane.d.ts +3 -0
- package/dist/icons/ui/paper-plane.d.ts.map +1 -0
- package/dist/icons/ui/paper-plane.js +5 -0
- package/dist/icons/ui/paper-plane.js.map +1 -0
- package/dist/icons/ui/pencil.d.ts.map +1 -0
- package/dist/icons/ui/pencil.js.map +1 -0
- package/dist/icons/ui/print.d.ts +3 -0
- package/dist/icons/ui/print.d.ts.map +1 -0
- package/dist/icons/ui/print.js +5 -0
- package/dist/icons/ui/print.js.map +1 -0
- package/dist/icons/ui/refresh-clockwise.d.ts.map +1 -0
- package/dist/icons/ui/refresh-clockwise.js.map +1 -0
- package/dist/icons/ui/report.d.ts.map +1 -0
- package/dist/icons/ui/report.js.map +1 -0
- package/dist/icons/ui/shield-check.d.ts.map +1 -0
- package/dist/icons/ui/shield-check.js.map +1 -0
- package/dist/icons/ui/shop-glyph.d.ts.map +1 -0
- package/dist/icons/ui/shop-glyph.js.map +1 -0
- package/dist/icons/ui/sliders.d.ts.map +1 -0
- package/dist/icons/ui/sliders.js.map +1 -0
- package/dist/icons/ui/star-glyph-duo.d.ts.map +1 -0
- package/dist/icons/ui/star-glyph-duo.js.map +1 -0
- package/dist/icons/ui/star-glyph.d.ts.map +1 -0
- package/dist/icons/ui/star-glyph.js.map +1 -0
- package/dist/icons/ui/star-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/star-outline-duo.js.map +1 -0
- package/dist/icons/ui/star.d.ts.map +1 -0
- package/dist/icons/ui/star.js.map +1 -0
- package/dist/icons/ui/sun.d.ts.map +1 -0
- package/dist/icons/ui/sun.js.map +1 -0
- package/dist/icons/ui/terminal.d.ts.map +1 -0
- package/dist/icons/ui/terminal.js.map +1 -0
- package/dist/icons/ui/text-align-center.d.ts.map +1 -0
- package/dist/icons/ui/text-align-center.js.map +1 -0
- package/dist/icons/ui/text-align-left.d.ts.map +1 -0
- package/dist/icons/ui/text-align-left.js.map +1 -0
- package/dist/icons/ui/text-align-right.d.ts.map +1 -0
- package/dist/icons/ui/text-align-right.js.map +1 -0
- package/dist/icons/ui/ticket.d.ts.map +1 -0
- package/dist/icons/ui/ticket.js.map +1 -0
- package/dist/icons/ui/trash-2.d.ts.map +1 -0
- package/dist/icons/ui/trash-2.js.map +1 -0
- package/dist/icons/ui/triangle-warning-glyph.d.ts.map +1 -0
- package/dist/icons/ui/triangle-warning-glyph.js.map +1 -0
- package/dist/icons/ui/user-glyph.d.ts.map +1 -0
- package/dist/icons/ui/user-glyph.js.map +1 -0
- package/dist/icons/ui/user-plus.d.ts +3 -0
- package/dist/icons/ui/user-plus.d.ts.map +1 -0
- package/dist/icons/ui/user-plus.js +5 -0
- package/dist/icons/ui/user-plus.js.map +1 -0
- package/dist/icons/ui/users.d.ts.map +1 -0
- package/dist/icons/ui/users.js.map +1 -0
- package/dist/icons/ui/wallet-outline-duo.d.ts.map +1 -0
- package/dist/icons/ui/wallet-outline-duo.js.map +1 -0
- package/dist/icons/ui/wallet.d.ts.map +1 -0
- package/dist/icons/ui/wallet.js.map +1 -0
- package/dist/icons/ui/wand-sparkle.d.ts.map +1 -0
- package/dist/icons/ui/wand-sparkle.js.map +1 -0
- package/dist/icons/ui/wifi-off.d.ts +3 -0
- package/dist/icons/ui/wifi-off.d.ts.map +1 -0
- package/dist/icons/ui/wifi-off.js +5 -0
- package/dist/icons/ui/wifi-off.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/primitives/charts/bar-chart.d.ts.map +1 -1
- package/dist/primitives/charts/bar-chart.js +33 -3
- package/dist/primitives/charts/bar-chart.js.map +1 -1
- package/dist/primitives/charts/line.d.ts.map +1 -1
- package/dist/primitives/charts/line.js +14 -11
- package/dist/primitives/charts/line.js.map +1 -1
- package/dist/primitives/charts/x-axis.d.ts +12 -1
- package/dist/primitives/charts/x-axis.d.ts.map +1 -1
- package/dist/primitives/charts/x-axis.js +96 -20
- package/dist/primitives/charts/x-axis.js.map +1 -1
- package/dist/primitives/charts/y-axis-scales.d.ts +3 -1
- package/dist/primitives/charts/y-axis-scales.d.ts.map +1 -1
- package/dist/primitives/charts/y-axis-scales.js +2 -2
- package/dist/primitives/charts/y-axis-scales.js.map +1 -1
- package/dist/primitives/charts/y-axis.d.ts +5 -0
- package/dist/primitives/charts/y-axis.d.ts.map +1 -1
- package/dist/primitives/charts/y-axis.js +6 -2
- package/dist/primitives/charts/y-axis.js.map +1 -1
- package/dist/primitives/ui/button.d.ts.map +1 -1
- package/dist/primitives/ui/button.js +4 -2
- package/dist/primitives/ui/button.js.map +1 -1
- package/dist/primitives/ui/card.d.ts.map +1 -1
- package/dist/primitives/ui/card.js +9 -7
- package/dist/primitives/ui/card.js.map +1 -1
- package/dist/primitives/ui/dialog.d.ts +3 -1
- package/dist/primitives/ui/dialog.d.ts.map +1 -1
- package/dist/primitives/ui/dialog.js +3 -3
- package/dist/primitives/ui/dialog.js.map +1 -1
- package/dist/primitives/ui/input.js +1 -1
- package/dist/primitives/ui/input.js.map +1 -1
- package/dist/primitives/ui/select.js +3 -3
- package/dist/primitives/ui/select.js.map +1 -1
- package/dist/primitives/ui/switch.d.ts +2 -2
- package/dist/primitives/ui/switch.d.ts.map +1 -1
- package/dist/primitives/ui/switch.js +2 -2
- package/dist/primitives/ui/switch.js.map +1 -1
- package/dist/primitives/ui/textarea.js +1 -1
- package/dist/primitives/ui/textarea.js.map +1 -1
- package/dist/styles/theme.css +1 -1
- package/dist/styles/tokens.css +16 -26
- package/dist/styles/tokens.test.tsx +0 -3
- package/package.json +1 -1
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
2
3
|
import { cn } from "../../lib/cn.js";
|
|
3
4
|
import { BRAND_ARTWORK } from "./brand-artwork.js";
|
|
4
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* The brands with a mark: CI, cloud and hosting providers, analytics tags, payment processors, community apps, AI
|
|
7
|
+
* coding agents and webhook integrations.
|
|
8
|
+
*/
|
|
5
9
|
export const BRANDS = [
|
|
6
10
|
"github",
|
|
7
11
|
"gitlab",
|
|
@@ -21,6 +25,23 @@ export const BRANDS = [
|
|
|
21
25
|
"notion",
|
|
22
26
|
"framer",
|
|
23
27
|
"figma",
|
|
28
|
+
"claude",
|
|
29
|
+
"cursor",
|
|
30
|
+
"openai",
|
|
31
|
+
"opencode",
|
|
32
|
+
"slack",
|
|
33
|
+
"microsoft-teams",
|
|
34
|
+
"hubspot",
|
|
35
|
+
"salesforce",
|
|
36
|
+
"close",
|
|
37
|
+
"resend",
|
|
38
|
+
"sendgrid",
|
|
39
|
+
"loops",
|
|
40
|
+
"customer-io",
|
|
41
|
+
"segment",
|
|
42
|
+
"opentelemetry",
|
|
43
|
+
"zapier",
|
|
44
|
+
"windmill",
|
|
24
45
|
];
|
|
25
46
|
/** The brand's name, for an accessible label. */
|
|
26
47
|
export const BRAND_NAMES = {
|
|
@@ -42,6 +63,23 @@ export const BRAND_NAMES = {
|
|
|
42
63
|
notion: "Notion",
|
|
43
64
|
framer: "Framer",
|
|
44
65
|
figma: "Figma",
|
|
66
|
+
claude: "Claude",
|
|
67
|
+
cursor: "Cursor",
|
|
68
|
+
openai: "OpenAI",
|
|
69
|
+
opencode: "OpenCode",
|
|
70
|
+
slack: "Slack",
|
|
71
|
+
"microsoft-teams": "Microsoft Teams",
|
|
72
|
+
hubspot: "HubSpot",
|
|
73
|
+
salesforce: "Salesforce",
|
|
74
|
+
close: "Close",
|
|
75
|
+
resend: "Resend",
|
|
76
|
+
sendgrid: "SendGrid",
|
|
77
|
+
loops: "Loops",
|
|
78
|
+
"customer-io": "Customer.io",
|
|
79
|
+
segment: "Segment",
|
|
80
|
+
opentelemetry: "OpenTelemetry",
|
|
81
|
+
zapier: "Zapier",
|
|
82
|
+
windmill: "Windmill",
|
|
45
83
|
};
|
|
46
84
|
/**
|
|
47
85
|
* A brand's mark at 16px (size it with `size-*`), e.g. the provider type of a workload identity provider. Black or
|
|
@@ -50,6 +88,8 @@ export const BRAND_NAMES = {
|
|
|
50
88
|
*/
|
|
51
89
|
export function BrandLogo({ brand, label, className, ...props }) {
|
|
52
90
|
const art = BRAND_ARTWORK[brand];
|
|
53
|
-
|
|
91
|
+
// Gradient ids are per mark drawn: a duplicate id would point every copy at the first, which may be hidden.
|
|
92
|
+
const id = `brand-${useId().replace(/[^\w-]/g, "")}`;
|
|
93
|
+
return (_jsx("svg", { "data-slot": "brand-logo", "data-brand": brand, viewBox: art.viewBox, fill: art.fill, ...(label ? { role: "img", "aria-label": label } : { "aria-hidden": true }), className: cn("size-4 shrink-0", className), ...props, children: typeof art.paths === "function" ? art.paths(id) : art.paths }));
|
|
54
94
|
}
|
|
55
95
|
//# sourceMappingURL=brand-logos.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brand-logos.js","sourceRoot":"","sources":["../../../src/components/brand-logos/brand-logos.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AAEpD
|
|
1
|
+
{"version":3,"file":"brand-logos.js","sourceRoot":"","sources":["../../../src/components/brand-logos/brand-logos.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AAEpD;;;GAGG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG;IACpB,QAAQ;IACR,QAAQ;IACR,WAAW;IACX,QAAQ;IACR,cAAc;IACd,KAAK;IACL,YAAY;IACZ,kBAAkB;IAClB,oBAAoB;IACpB,MAAM;IACN,QAAQ;IACR,OAAO;IACP,eAAe;IACf,SAAS;IACT,UAAU;IACV,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,OAAO;IACP,iBAAiB;IACjB,SAAS;IACT,YAAY;IACZ,OAAO;IACP,QAAQ;IACR,UAAU;IACV,OAAO;IACP,aAAa;IACb,SAAS;IACT,eAAe;IACf,QAAQ;IACR,UAAU;CACF,CAAC;AAKX,iDAAiD;AACjD,MAAM,CAAC,MAAM,WAAW,GAAoC;IAC1D,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,cAAc,EAAE,cAAc;IAC9B,GAAG,EAAE,KAAK;IACV,UAAU,EAAE,YAAY;IACxB,kBAAkB,EAAE,kBAAkB;IACtC,oBAAoB,EAAE,oBAAoB;IAC1C,IAAI,EAAE,MAAM;IACZ,MAAM,EAAE,QAAQ;IAChB,KAAK,EAAE,OAAO;IACd,eAAe,EAAE,eAAe;IAChC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C,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,GACxD,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/** Wraps `trigger` in a tooltip of `label` that opens only while the container query hides `labelText`. */
|
|
3
|
+
export declare function NarrowLabelTooltip({ trigger, label, labelText, focusId, refocusRef, }: {
|
|
4
|
+
trigger: React.ReactElement;
|
|
5
|
+
label: React.ReactNode;
|
|
6
|
+
labelText: React.RefObject<HTMLSpanElement | null>;
|
|
7
|
+
/** The `data-narrow-label` the trigger carries, and whether the button it replaces held focus. */
|
|
8
|
+
focusId: string;
|
|
9
|
+
refocusRef: React.RefObject<boolean>;
|
|
10
|
+
}): React.JSX.Element;
|
|
11
|
+
//# sourceMappingURL=button-narrow-label.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-narrow-label.d.ts","sourceRoot":"","sources":["../../../src/components/button/button-narrow-label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,2GAA2G;AAC3G,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,KAAK,EACL,SAAS,EACT,OAAO,EACP,UAAU,GACX,EAAE;IACD,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,SAAS,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,GAAG,IAAI,CAAC,CAAC;IACnD,kGAAkG;IAClG,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;CACtC,qBAsBA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip/tooltip.js";
|
|
5
|
+
/** Wraps `trigger` in a tooltip of `label` that opens only while the container query hides `labelText`. */
|
|
6
|
+
export function NarrowLabelTooltip({ trigger, label, labelText, focusId, refocusRef, }) {
|
|
7
|
+
const [open, setOpen] = React.useState(false);
|
|
8
|
+
// The loaded trigger replaces the fallback button; give focus back if the user was on it.
|
|
9
|
+
React.useLayoutEffect(() => {
|
|
10
|
+
if (!refocusRef.current)
|
|
11
|
+
return;
|
|
12
|
+
refocusRef.current = false;
|
|
13
|
+
document
|
|
14
|
+
.querySelector(`[data-narrow-label="${CSS.escape(focusId)}"]`)
|
|
15
|
+
?.focus({ preventScroll: true });
|
|
16
|
+
}, [focusId, refocusRef]);
|
|
17
|
+
return (_jsxs(Tooltip, { open: open, onOpenChange: (next) => {
|
|
18
|
+
// The sr-only label is 1px wide.
|
|
19
|
+
setOpen(next && (labelText.current?.getBoundingClientRect().width ?? 0) <= 1);
|
|
20
|
+
}, children: [_jsx(TooltipTrigger, { render: trigger }), _jsx(TooltipContent, { children: label })] }));
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=button-narrow-label.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-narrow-label.js","sourceRoot":"","sources":["../../../src/components/button/button-narrow-label.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,uBAAwB,CAAC;AAEjF,2GAA2G;AAC3G,MAAM,UAAU,kBAAkB,CAAC,EACjC,OAAO,EACP,KAAK,EACL,SAAS,EACT,OAAO,EACP,UAAU,GAQX;IACC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9C,0FAA0F;IAC1F,KAAK,CAAC,eAAe,CAAC,GAAG,EAAE;QACzB,IAAI,CAAC,UAAU,CAAC,OAAO;YAAE,OAAO;QAChC,UAAU,CAAC,OAAO,GAAG,KAAK,CAAC;QAC3B,QAAQ;aACL,aAAa,CAAc,uBAAuB,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC;YAC3E,EAAE,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;IACrC,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC;IAC1B,OAAO,CACL,MAAC,OAAO,IACN,IAAI,EAAE,IAAI,EACV,YAAY,EAAE,CAAC,IAAI,EAAE,EAAE;YACrB,iCAAiC;YACjC,OAAO,CAAC,IAAI,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,qBAAqB,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;QAChF,CAAC,aAED,KAAC,cAAc,IAAC,MAAM,EAAE,OAAO,GAAI,EACnC,KAAC,cAAc,cAAE,KAAK,GAAkB,IAChC,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Button as BaseButton } from "@base-ui/react/button";
|
|
2
|
-
import
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
import { type VariantSelection } from "../../lib/variants.ts";
|
|
4
5
|
/** Each value maps to the `Button` primitive `variant` / `size` it renders. */
|
|
5
6
|
export declare const DODO_BUTTON_VARIANTS: {
|
|
@@ -111,7 +112,8 @@ export declare const DODO_BUTTON_DEFAULT_VARIANTS: {
|
|
|
111
112
|
type ButtonVariantSelection = VariantSelection<typeof DODO_BUTTON_VARIANTS>;
|
|
112
113
|
/**
|
|
113
114
|
* Button classes for elements that are not buttons, e.g. links:
|
|
114
|
-
* `<Link href="/x" className={buttonVariants({ variant: "secondary" })}>`.
|
|
115
|
+
* `<Link href="/x" className={buttonVariants({ variant: "secondary" })}>`. A link with an icon whose
|
|
116
|
+
* label hides on a phone is a `ButtonLink`.
|
|
115
117
|
*/
|
|
116
118
|
export declare function buttonVariants(selection?: ButtonVariantSelection, className?: string): string;
|
|
117
119
|
type BaseButtonProps = Omit<BaseButton.Props, "className" | "children">;
|
|
@@ -156,20 +158,41 @@ interface ButtonWithIcon {
|
|
|
156
158
|
icon: React.ReactNode;
|
|
157
159
|
/** Which side of the label the icon is placed on. */
|
|
158
160
|
iconPlacement: "left" | "right";
|
|
161
|
+
/**
|
|
162
|
+
* `"narrow"`: below 42rem of the nearest size container (the `@max-2xl` query of a `PageHeader` or
|
|
163
|
+
* `ListToolbar`; 24rem in a `RecordHeader`), so on a phone, only the icon shows, at the same height. The label stays
|
|
164
|
+
* the button's accessible name, and a tooltip shows it on hover and focus while it is hidden. Outside a
|
|
165
|
+
* size container the label always shows.
|
|
166
|
+
*/
|
|
167
|
+
labelHidden?: "narrow";
|
|
159
168
|
}
|
|
160
169
|
interface ButtonWithoutIcon {
|
|
161
170
|
icon?: never;
|
|
162
171
|
iconPlacement?: never;
|
|
172
|
+
labelHidden?: never;
|
|
163
173
|
}
|
|
164
174
|
export type ButtonProps = BaseButtonProps & ButtonOwnProps & (ButtonWithIcon | ButtonWithoutIcon);
|
|
175
|
+
export type ButtonLinkProps = Omit<useRender.ComponentProps<"a">, "className" | "children"> & ButtonVariantSelection & {
|
|
176
|
+
className?: string;
|
|
177
|
+
children?: React.ReactNode;
|
|
178
|
+
} & (ButtonWithIcon | ButtonWithoutIcon);
|
|
179
|
+
/**
|
|
180
|
+
* A link that looks like a `Button`: `buttonVariants()` on an `<a>`, with Button's `icon`,
|
|
181
|
+
* `iconPlacement` and `labelHidden`. It stays a link (no `role="button"`), so Ctrl, Cmd or the middle
|
|
182
|
+
* button open it in a new tab. Pass a router link through `render`
|
|
183
|
+
* (`render={<NextLink href="/products/create" />}`). With `labelHidden="narrow"` it shows only its icon
|
|
184
|
+
* in a narrow container, its label stays the accessible name and a tooltip shows it while it is hidden.
|
|
185
|
+
*/
|
|
186
|
+
export declare function ButtonLink({ className, variant, size, icon, iconPlacement, labelHidden, render, children, ...props }: ButtonLinkProps): React.JSX.Element;
|
|
165
187
|
/**
|
|
166
188
|
* Triggers an action. Renders the `Button` primitive on Base UI `Button`, which always has button
|
|
167
|
-
* semantics. For navigation, do not render a link through `Button`;
|
|
168
|
-
* `buttonVariants()`: `<Link href="/x" className={buttonVariants({ variant: "secondary" })}>`.
|
|
189
|
+
* semantics. For navigation, do not render a link through `Button`; use `ButtonLink`, or style the
|
|
190
|
+
* link itself with `buttonVariants()`: `<Link href="/x" className={buttonVariants({ variant: "secondary" })}>`.
|
|
169
191
|
* While `loading`, the label and the spinner face cross-fade in place on a spring (after interior.dev's
|
|
170
192
|
* loading button) and the button keeps focus. `result` swaps in a success or error face the same way
|
|
171
|
-
* and announces it.
|
|
193
|
+
* and announces it. With `labelHidden="narrow"`, a page header, list toolbar or record header action
|
|
194
|
+
* shows only its icon on a phone, with its label in a tooltip.
|
|
172
195
|
*/
|
|
173
|
-
export declare function Button({ className, variant, size, icon, iconPlacement, loading, progress, loadingText, result, successText, errorText, disabled, focusableWhenDisabled, children, render, ...props }: ButtonProps): React.JSX.Element;
|
|
196
|
+
export declare function Button({ className, variant, size, icon, iconPlacement, labelHidden, loading, progress, loadingText, result, successText, errorText, disabled, focusableWhenDisabled, children, render, ...props }: ButtonProps): React.JSX.Element;
|
|
174
197
|
export {};
|
|
175
198
|
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAE7D,OAAO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D,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,QAAQ,CAAC;CACxB;AAED,UAAU,iBAAiB;IACzB,IAAI,CAAC,EAAE,KAAK,CAAC;IACb,aAAa,CAAC,EAAE,KAAK,CAAC;IACtB,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB;AAED,MAAM,MAAM,WAAW,GAAG,eAAe,GAAG,cAAc,GAAG,CAAC,cAAc,GAAG,iBAAiB,CAAC,CAAC;AAmDlG,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,WAAW,GAAG,UAAU,CAAC,GACzF,sBAAsB,GAAG;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,GAAG,CAAC,cAAc,GAAG,iBAAiB,CAAC,CAAC;AAE3C;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,aAAa,EACb,WAAW,EACX,MAAM,EACN,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,eAAe,qBAqBjB;AAED;;;;;;;;GAQG;AACH,wBAAgB,MAAM,CAAC,EACrB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,aAAa,EACb,WAAW,EACX,OAAO,EACP,QAAe,EACf,WAAW,EACX,MAAM,EACN,WAAoB,EACpB,SAAuB,EACvB,QAAQ,EACR,qBAAqB,EACrB,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACT,EAAE,WAAW,qBAgMb"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Button as BaseButton } from "@base-ui/react/button";
|
|
4
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
6
|
import { LazyMotion, useReducedMotion } from "motion/react";
|
|
5
7
|
import * as m from "motion/react-m";
|
|
6
8
|
import { CheckIcon } from "../../icons/ui/check.js";
|
|
7
9
|
import { CircleWarningIcon } from "../../icons/ui/circle-warning.js";
|
|
10
|
+
import * as React from "react";
|
|
8
11
|
import { Button as PrimitiveButton, buttonVariants as primitiveButtonVariants, } from "../../primitives/ui/button.js";
|
|
9
12
|
import { Spinner } from "../../primitives/ui/spinner.js";
|
|
10
13
|
import { cn } from "../../lib/cn.js";
|
|
@@ -90,22 +93,63 @@ const buttonPrimitiveProps = createPrimitiveVariants({
|
|
|
90
93
|
});
|
|
91
94
|
/**
|
|
92
95
|
* Button classes for elements that are not buttons, e.g. links:
|
|
93
|
-
* `<Link href="/x" className={buttonVariants({ variant: "secondary" })}>`.
|
|
96
|
+
* `<Link href="/x" className={buttonVariants({ variant: "secondary" })}>`. A link with an icon whose
|
|
97
|
+
* label hides on a phone is a `ButtonLink`.
|
|
94
98
|
*/
|
|
95
99
|
export function buttonVariants(selection = {}, className) {
|
|
96
100
|
const { props } = buttonPrimitiveProps(selection);
|
|
97
101
|
return primitiveButtonVariants({ ...props, className });
|
|
98
102
|
}
|
|
103
|
+
/**
|
|
104
|
+
* The narrow label's tooltip (Tooltip and its Floating UI positioning) loads only when a `labelHidden` button renders,
|
|
105
|
+
* so a Button without it does not carry Tooltip. Until it loads, the button renders alone.
|
|
106
|
+
*/
|
|
107
|
+
const NarrowLabelTooltip = React.lazy(() => import("./button-narrow-label.js").then((module) => ({ default: module.NarrowLabelTooltip })));
|
|
108
|
+
/** Notes, as the fallback button leaves, whether it held focus, so the loaded trigger can take it back. */
|
|
109
|
+
function FocusCarrier({ id, refocusRef, children, }) {
|
|
110
|
+
React.useLayoutEffect(() => () => {
|
|
111
|
+
refocusRef.current = document.activeElement?.getAttribute("data-narrow-label") === id;
|
|
112
|
+
}, [id, refocusRef]);
|
|
113
|
+
return children;
|
|
114
|
+
}
|
|
115
|
+
function NarrowLabel({ trigger, ...props }) {
|
|
116
|
+
const id = React.useId();
|
|
117
|
+
const refocusRef = React.useRef(false);
|
|
118
|
+
const tagged = React.cloneElement(trigger, {
|
|
119
|
+
"data-narrow-label": id,
|
|
120
|
+
});
|
|
121
|
+
return (_jsx(React.Suspense, { fallback: _jsx(FocusCarrier, { id: id, refocusRef: refocusRef, children: tagged }), children: _jsx(NarrowLabelTooltip, { ...props, trigger: tagged, focusId: id, refocusRef: refocusRef }) }));
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* A link that looks like a `Button`: `buttonVariants()` on an `<a>`, with Button's `icon`,
|
|
125
|
+
* `iconPlacement` and `labelHidden`. It stays a link (no `role="button"`), so Ctrl, Cmd or the middle
|
|
126
|
+
* button open it in a new tab. Pass a router link through `render`
|
|
127
|
+
* (`render={<NextLink href="/products/create" />}`). With `labelHidden="narrow"` it shows only its icon
|
|
128
|
+
* in a narrow container, its label stays the accessible name and a tooltip shows it while it is hidden.
|
|
129
|
+
*/
|
|
130
|
+
export function ButtonLink({ className, variant, size, icon, iconPlacement, labelHidden, render, children, ...props }) {
|
|
131
|
+
const labelText = React.useRef(null);
|
|
132
|
+
const ownProps = {
|
|
133
|
+
"data-slot": "button-link",
|
|
134
|
+
className: buttonVariants({ variant, size }, className),
|
|
135
|
+
children: (_jsxs(_Fragment, { children: [icon && iconPlacement === "left" ? icon : null, labelHidden ? (_jsx("span", { ref: labelText, "data-slot": "button-label-text", className: "@max-2xl:sr-only", children: children })) : (children), icon && iconPlacement === "right" ? icon : null] })),
|
|
136
|
+
};
|
|
137
|
+
const link = useRender({ defaultTagName: "a", render, props: mergeProps(ownProps, props) });
|
|
138
|
+
return labelHidden ? _jsx(NarrowLabel, { trigger: link, label: children, labelText: labelText }) : link;
|
|
139
|
+
}
|
|
99
140
|
/**
|
|
100
141
|
* Triggers an action. Renders the `Button` primitive on Base UI `Button`, which always has button
|
|
101
|
-
* semantics. For navigation, do not render a link through `Button`;
|
|
102
|
-
* `buttonVariants()`: `<Link href="/x" className={buttonVariants({ variant: "secondary" })}>`.
|
|
142
|
+
* semantics. For navigation, do not render a link through `Button`; use `ButtonLink`, or style the
|
|
143
|
+
* link itself with `buttonVariants()`: `<Link href="/x" className={buttonVariants({ variant: "secondary" })}>`.
|
|
103
144
|
* While `loading`, the label and the spinner face cross-fade in place on a spring (after interior.dev's
|
|
104
145
|
* loading button) and the button keeps focus. `result` swaps in a success or error face the same way
|
|
105
|
-
* and announces it.
|
|
146
|
+
* and announces it. With `labelHidden="narrow"`, a page header, list toolbar or record header action
|
|
147
|
+
* shows only its icon on a phone, with its label in a tooltip.
|
|
106
148
|
*/
|
|
107
|
-
export function Button({ className, variant, size, icon, iconPlacement, loading, progress = null, loadingText, result, successText = "Done", errorText = "Try again", disabled, focusableWhenDisabled, children, render, ...props }) {
|
|
149
|
+
export function Button({ className, variant, size, icon, iconPlacement, labelHidden, loading, progress = null, loadingText, result, successText = "Done", errorText = "Try again", disabled, focusableWhenDisabled, children, render, ...props }) {
|
|
108
150
|
const reduceMotion = useReducedMotion();
|
|
151
|
+
const labelText = React.useRef(null);
|
|
152
|
+
const hideable = (text, ref) => labelHidden && text !== null && text !== undefined ? (_jsx("span", { ref: ref, "data-slot": "button-label-text", className: "@max-2xl:sr-only", children: text })) : (text);
|
|
109
153
|
const showProgress = typeof progress === "number" && !Number.isNaN(progress);
|
|
110
154
|
const clamped = showProgress ? Math.max(0, Math.min(100, progress)) : 0;
|
|
111
155
|
const spinning = loading === true && !showProgress;
|
|
@@ -119,24 +163,37 @@ export function Button({ className, variant, size, icon, iconPlacement, loading,
|
|
|
119
163
|
// Each face is its own flex row, so it repeats the gap the primitive size gives the button.
|
|
120
164
|
const primitiveSize = primitive.props.size;
|
|
121
165
|
const faceGap = primitiveSize === "xs" ? "gap-1" : primitiveSize === "sm" ? "gap-1.5" : "gap-2";
|
|
166
|
+
// An icon-only button has no room for its icon beside the spinner, so the spinner stands in for it.
|
|
167
|
+
const loadingFace = loadingText ?? (primitiveSize?.startsWith("icon") ? null : children);
|
|
122
168
|
// Success and error colours lack contrast on solid fills, so those keep the button text colour.
|
|
123
169
|
const resolvedVariant = variant ?? DODO_BUTTON_DEFAULT_VARIANTS.variant;
|
|
124
170
|
const onSolidFill = resolvedVariant === "default" ||
|
|
125
171
|
resolvedVariant === "destructive" ||
|
|
126
172
|
resolvedVariant === "warning";
|
|
127
|
-
//
|
|
128
|
-
// truncating label shrink
|
|
129
|
-
const faceClasses = cn("inline-flex min-w-
|
|
130
|
-
|
|
173
|
+
// The faces and their grid inherit the Button's min-width: a button squeezed below its label (`min-w-0` on the
|
|
174
|
+
// Button) lets a truncating label shrink, and any other keeps its widest face's width, even in a `w-px` table cell.
|
|
175
|
+
const faceClasses = cn("inline-flex min-w-[inherit] max-w-full items-center justify-center whitespace-nowrap", faceGap);
|
|
176
|
+
// The tooltip names the face on show, so an error reads its error text and progress its own text.
|
|
177
|
+
const faceLabel = showProgress
|
|
178
|
+
? (loadingText ?? children)
|
|
179
|
+
: outcome === "error"
|
|
180
|
+
? errorText
|
|
181
|
+
: outcome === "success"
|
|
182
|
+
? successText
|
|
183
|
+
: spinning
|
|
184
|
+
? (loadingFace ?? children)
|
|
185
|
+
: children;
|
|
186
|
+
const label = (_jsxs(_Fragment, { children: [icon && iconPlacement === "left" ? icon : null, hideable(children, labelText), icon && iconPlacement === "right" ? icon : null] }));
|
|
131
187
|
const button = (_jsx(PrimitiveButton, { "data-slot": "button", ...primitive.props, "data-busy": busy || undefined, "data-result": outcome ?? undefined,
|
|
132
188
|
// Busy buttons stay focusable, so a keyboard user's focus is not dropped when they press Enter.
|
|
133
|
-
disabled: busy || disabled, "aria-disabled": ((busy || focusableWhenDisabled) && (busy || disabled)) || undefined, "aria-busy": busy || undefined, className: cn(MOTION_PRESS_CLASSES, primitive.className, showProgress && "overflow-hidden", className), render: _jsx(BaseButton, { ...props, focusableWhenDisabled: busy || focusableWhenDisabled, render: render }), children: showProgress ? (_jsxs(_Fragment, { children: [_jsx(LazyMotion, { features: loadDomAnimation, strict: true, children: _jsx(m.span, { "aria-hidden": "true", "data-slot": "button-progress", className: "absolute inset-0 bg-current/16", initial: false, animate: { clipPath: `inset(0 ${String(100 - clamped)}% 0 0)` }, transition: { type: "spring", stiffness: 90, damping: 20, mass: 0.5 } }) }), _jsxs("span", { "data-slot": "button-progress-label", className: "relative inline-flex items-center gap-2", children: [loadingText ?? children, _jsxs("span", { className: "tabular-nums", children: [Math.round(clamped), "%"] })] })] })) : withFaces ? (_jsx(LazyMotion, { features: loadDomAnimation, strict: true, children: _jsxs("span", { "data-slot": "button-faces", className: "grid min-w-
|
|
189
|
+
disabled: busy || disabled, "aria-disabled": ((busy || focusableWhenDisabled) && (busy || disabled)) || undefined, "aria-busy": busy || undefined, className: cn(MOTION_PRESS_CLASSES, primitive.className, showProgress && "overflow-hidden", className), render: _jsx(BaseButton, { ...props, focusableWhenDisabled: busy || focusableWhenDisabled, render: render }), children: showProgress ? (_jsxs(_Fragment, { children: [_jsx(LazyMotion, { features: loadDomAnimation, strict: true, children: _jsx(m.span, { "aria-hidden": "true", "data-slot": "button-progress", className: "absolute inset-0 bg-current/16", initial: false, animate: { clipPath: `inset(0 ${String(100 - clamped)}% 0 0)` }, transition: { type: "spring", stiffness: 90, damping: 20, mass: 0.5 } }) }), _jsxs("span", { "data-slot": "button-progress-label", className: "relative inline-flex items-center gap-2", children: [hideable(loadingText ?? children, labelText), _jsxs("span", { className: "tabular-nums", children: [Math.round(clamped), "%"] })] })] })) : withFaces ? (_jsx(LazyMotion, { features: loadDomAnimation, strict: true, children: _jsxs("span", { "data-slot": "button-faces", className: "grid min-w-[inherit] place-items-center *:col-start-1 *:row-start-1", children: [_jsx(m.span, { "data-slot": "button-label", "aria-hidden": spinning || outcome !== null || undefined, className: faceClasses, initial: false, animate: motionFaceState(!spinning && outcome === null), transition: fade, children: label }), loading === undefined ? null : (_jsxs(m.span, { "data-slot": "button-loading", "aria-hidden": !spinning || undefined,
|
|
134
190
|
// The hidden face stays mounted to reserve its width; stop its spinner so idle buttons
|
|
135
191
|
// (`loading={false}`) do not each run an invisible infinite animation.
|
|
136
|
-
className: cn(faceClasses, !spinning && "[&_.animate-spin]:animate-none"), initial: false, animate: motionFaceState(spinning), transition: fade, children: [_jsx(Spinner, { "aria-hidden": "true", "aria-label": undefined, role: undefined, "data-slot": "button-loading-indicator" }),
|
|
192
|
+
className: cn(faceClasses, !spinning && "[&_.animate-spin]:animate-none"), initial: false, animate: motionFaceState(spinning), transition: fade, children: [_jsx(Spinner, { "aria-hidden": "true", "aria-label": undefined, role: undefined, "data-slot": "button-loading-indicator" }), hideable(loadingFace)] })), result === undefined ? null : (_jsxs(_Fragment, { children: [_jsxs(m.span, { "data-slot": "button-success", "aria-hidden": outcome !== "success" || undefined, className: cn(faceClasses, !onSolidFill && "text-success-foreground"), initial: false, animate: motionFaceState(outcome === "success"), transition: fade, children: [_jsx(CheckIcon, { "aria-hidden": "true" }), hideable(successText)] }), _jsxs(m.span, { "data-slot": "button-error", "aria-hidden": outcome !== "error" || undefined, className: cn(faceClasses, !onSolidFill && "text-destructive-foreground"), initial: false, animate: motionFaceState(outcome === "error"), transition: fade, children: [_jsx(CircleWarningIcon, { "aria-hidden": "true" }), hideable(errorText)] })] }))] }) })) : (label) }));
|
|
193
|
+
const control = labelHidden ? (_jsx(NarrowLabel, { trigger: button, label: faceLabel, labelText: labelText })) : (button);
|
|
137
194
|
// Only buttons that report an outcome render the live region, so other buttons stay one element.
|
|
138
195
|
if (result === undefined)
|
|
139
|
-
return
|
|
140
|
-
return (_jsxs(_Fragment, { children: [
|
|
196
|
+
return control;
|
|
197
|
+
return (_jsxs(_Fragment, { children: [control, _jsx("span", { "data-slot": "button-status", role: "status", "aria-live": "polite", className: "sr-only", children: outcome === "success" ? successText : outcome === "error" ? errorText : "" })] }));
|
|
141
198
|
}
|
|
142
199
|
//# sourceMappingURL=button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAmB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"button.js","sourceRoot":"","sources":["../../../src/components/button/button.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,UAAU,EAAmB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAC7E,OAAO,KAAK,CAAC,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,MAAM,IAAI,eAAe,EACzB,cAAc,IAAI,uBAAuB,GAC1C,MAAM,+BAAgC,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,gCAAiC,CAAC;AAC1D,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3F,OAAO,EAAE,uBAAuB,EAAy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MAAM,GAAG,EACvC,QAAQ,CAAC,SAAS,CAAC,IACb,IACR,CACJ,IACI,GACI,CACd,CAAC,CAAC,CAAC,CACF,KAAK,CACN,GACe,CACnB,CAAC;IAEF,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,CAAC,CAC5B,KAAC,WAAW,IAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,GAAI,CACzE,CAAC,CAAC,CAAC,CACF,MAAM,CACP,CAAC;IAEF,iGAAiG;IACjG,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC;IACzC,OAAO,CACL,8BACG,OAAO,EACR,4BAAgB,eAAe,EAAC,IAAI,EAAC,QAAQ,eAAW,QAAQ,EAAC,SAAS,EAAC,SAAS,YACjF,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GACtE,IACN,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Button, type ButtonProps, buttonVariants, DODO_BUTTON_DEFAULT_VARIANTS, DODO_BUTTON_VARIANTS, } from "./button.tsx";
|
|
1
|
+
export { Button, ButtonLink, type ButtonLinkProps, type ButtonProps, buttonVariants, DODO_BUTTON_DEFAULT_VARIANTS, DODO_BUTTON_VARIANTS, } from "./button.tsx";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,KAAK,WAAW,EAChB,cAAc,EACd,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,cAAc,EACd,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,cAAc,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { Button, buttonVariants, DODO_BUTTON_DEFAULT_VARIANTS, DODO_BUTTON_VARIANTS, } from "./button.js";
|
|
1
|
+
export { Button, ButtonLink, buttonVariants, DODO_BUTTON_DEFAULT_VARIANTS, DODO_BUTTON_VARIANTS, } from "./button.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/button/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,UAAU,EAGV,cAAc,EACd,4BAA4B,EAC5B,oBAAoB,GACrB,MAAM,aAAc,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { useRender } from "@base-ui/react/use-render";
|
|
2
|
-
import
|
|
2
|
+
import * as React from "react";
|
|
3
3
|
import { type VariantSelection } from "../../lib/variants.ts";
|
|
4
4
|
/**
|
|
5
5
|
* Card tones (Dodo Nest 2.0 › Card). Both are the Direction 1 tray: a grey Surface/Secondary tray with a 1px
|
|
@@ -50,8 +50,13 @@ export interface CardProps extends Omit<CardRootProps, "title"> {
|
|
|
50
50
|
* `<div>`; pass a heading element (e.g. `<h2>`) when the card starts a section of the page.
|
|
51
51
|
*/
|
|
52
52
|
title?: React.ReactNode;
|
|
53
|
-
/**
|
|
53
|
+
/**
|
|
54
|
+
* With `title`: a secondary description in a Tooltip on a 12px info icon after the title, instead of a line
|
|
55
|
+
* under it (see `CardTitle`). An existing `description` still renders as a line.
|
|
56
|
+
*/
|
|
54
57
|
help?: React.ReactNode;
|
|
58
|
+
/** With `help`: accessible name of the info icon button. @default "More information" */
|
|
59
|
+
helpLabel?: string;
|
|
55
60
|
/** Supporting text under the title. */
|
|
56
61
|
description?: React.ReactNode;
|
|
57
62
|
/** The small control on the right of the header strip, e.g. a secondary `xs` button. */
|
|
@@ -89,7 +94,7 @@ export type CardFooterProps = useRender.ComponentProps<"div">;
|
|
|
89
94
|
* Give a card a definite width (a grid cell, `w-full`, a `max-w-*` column): below about 20rem the header moves
|
|
90
95
|
* its action under the title, and the header, a size container, does not widen a card that shrinks to fit.
|
|
91
96
|
*/
|
|
92
|
-
export declare function Card({ className, tone, title, help, description, action, layout, headerClassName, contentClassName, children, ...props }: CardProps): React.JSX.Element;
|
|
97
|
+
export declare function Card({ className, tone, title, help, helpLabel, description, action, layout, headerClassName, contentClassName, children, ...props }: CardProps): React.JSX.Element;
|
|
93
98
|
/**
|
|
94
99
|
* The header strip on the grey tray (at least 40 tall, padding 8/8/8/16, so the title lines up with the panel content): `CardTitle` and an optional
|
|
95
100
|
* `CardDescription` on the left, an optional `CardAction` on the right.
|
|
@@ -97,14 +102,20 @@ export declare function Card({ className, tone, title, help, description, action
|
|
|
97
102
|
export declare function CardHeader(props: CardHeaderProps): React.JSX.Element;
|
|
98
103
|
/** Props of {@link CardTitle}. */
|
|
99
104
|
export interface CardTitleWithHelpProps extends CardTitleProps {
|
|
100
|
-
/**
|
|
105
|
+
/**
|
|
106
|
+
* A secondary description, shown in a Tooltip on a 12px info icon after the title instead of a line under it.
|
|
107
|
+
* Use it for text that helps but that the title and content already imply; keep `CardDescription` for what
|
|
108
|
+
* the reader must see (a consequence, a requirement, a limit). It is also the icon's accessible description.
|
|
109
|
+
*/
|
|
101
110
|
help?: React.ReactNode;
|
|
102
111
|
/** Accessible name of the info icon button. @default "More information" */
|
|
103
112
|
helpLabel?: string;
|
|
104
113
|
}
|
|
105
114
|
/**
|
|
106
115
|
* Card heading (Heading/Quaternary, Content/Primary; Content/Error on the error tone). Renders a `<div>`; pass
|
|
107
|
-
* `render={<h2 />}` (or the level that fits the page outline). `help` adds the info icon with a Tooltip
|
|
116
|
+
* `render={<h2 />}` (or the level that fits the page outline). `help` adds the info icon with a Tooltip; it
|
|
117
|
+
* follows the title's last word when the title wraps, and the heading's name stays the title (its text is
|
|
118
|
+
* `${id}-text` when the title has an `id`, for a section's `aria-labelledby`).
|
|
108
119
|
*/
|
|
109
120
|
export declare function CardTitle({ help, helpLabel, children, ...props }: CardTitleWithHelpProps): React.JSX.Element;
|
|
110
121
|
/** One line under the title (Body/Secondary, Content/Secondary). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,KAAK,
|
|
1
|
+
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,OAAO,EAAkB,KAAK,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;CAarB,CAAC;AAEX,yBAAyB;AACzB,eAAO,MAAM,0BAA0B;;CAA+B,CAAC;AAEvE,0GAA0G;AAC1G,eAAO,MAAM,YAAY;;;;;;;;;;;EAIvB,CAAC;AAEH,qFAAqF;AACrF,QAAA,MAAM,mBAAmB;;;CAGf,CAAC;AAEX,6GAA6G;AAC7G,MAAM,WAAW,aACf,SAAQ,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,EACrC,gBAAgB,CAAC,OAAO,kBAAkB,CAAC;CAAG;AAElD,6EAA6E;AAC7E,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,aAAa,EAAE,O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kCX;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,qBAEhD;AAED,kCAAkC;AAClC,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D;;;;OAIG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,2EAA2E;IAC3E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,SAA8B,EAC9B,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,sBAAsB,qBA0CxB;AAED,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,qBAE1D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,qBAEhD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,gBAAgB,qBAElD;AAED,+HAA+H;AAC/H,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,qBAEhD"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
3
4
|
import { CardAction as PrimitiveCardAction, Card as PrimitiveCard, CardDescription as PrimitiveCardDescription, CardFooter as PrimitiveCardFooter, CardHeader as PrimitiveCardHeader, CardPanel as PrimitiveCardPanel, CardTitle as PrimitiveCardTitle, } from "../../primitives/ui/card.js";
|
|
4
5
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../tooltip/tooltip.js";
|
|
5
6
|
import { CircleInfoIcon } from "../../icons/ui/circle-info.js";
|
|
@@ -45,10 +46,10 @@ const CARD_LAYOUT_CLASSES = {
|
|
|
45
46
|
* Give a card a definite width (a grid cell, `w-full`, a `max-w-*` column): below about 20rem the header moves
|
|
46
47
|
* its action under the title, and the header, a size container, does not widen a card that shrinks to fit.
|
|
47
48
|
*/
|
|
48
|
-
export function Card({ className, tone, title, help, description, action, layout = "default", headerClassName, contentClassName, children, ...props }) {
|
|
49
|
+
export function Card({ className, tone, title, help, helpLabel, description, action, layout = "default", headerClassName, contentClassName, children, ...props }) {
|
|
49
50
|
const resolved = tone ?? DODO_CARD_DEFAULT_VARIANTS.tone;
|
|
50
51
|
const fromProps = hasContent(title) || hasContent(description) || hasContent(action);
|
|
51
|
-
return (_jsx(PrimitiveCard, { "data-slot": "card", "data-tone": resolved, className: cardVariants({ tone: resolved }, className), ...props, children: fromProps ? (_jsxs(_Fragment, { children: [_jsxs(CardHeader, { className: headerClassName, children: [_jsxs("div", { "data-slot": "card-heading", className: "flex min-w-0 flex-col gap-0.5", children: [hasContent(title) ? _jsx(CardTitle, { help: help, children: title }) : null, hasContent(description) ? _jsx(CardDescription, { children: description }) : null] }), hasContent(action) ? _jsx(CardAction, { children: action }) : null] }), hasContent(children) ? (_jsx(CardContent, { className: cn(CARD_LAYOUT_CLASSES[layout], contentClassName), children: children })) : null] })) : (children) }));
|
|
52
|
+
return (_jsx(PrimitiveCard, { "data-slot": "card", "data-tone": resolved, className: cardVariants({ tone: resolved }, className), ...props, children: fromProps ? (_jsxs(_Fragment, { children: [_jsxs(CardHeader, { className: headerClassName, children: [_jsxs("div", { "data-slot": "card-heading", className: "flex min-w-0 flex-col gap-0.5", children: [hasContent(title) ? (_jsx(CardTitle, { help: help, helpLabel: helpLabel, children: title })) : null, hasContent(description) ? _jsx(CardDescription, { children: description }) : null] }), hasContent(action) ? _jsx(CardAction, { children: action }) : null] }), hasContent(children) ? (_jsx(CardContent, { className: cn(CARD_LAYOUT_CLASSES[layout], contentClassName), children: children })) : null] })) : (children) }));
|
|
52
53
|
}
|
|
53
54
|
/**
|
|
54
55
|
* The header strip on the grey tray (at least 40 tall, padding 8/8/8/16, so the title lines up with the panel content): `CardTitle` and an optional
|
|
@@ -59,10 +60,18 @@ export function CardHeader(props) {
|
|
|
59
60
|
}
|
|
60
61
|
/**
|
|
61
62
|
* Card heading (Heading/Quaternary, Content/Primary; Content/Error on the error tone). Renders a `<div>`; pass
|
|
62
|
-
* `render={<h2 />}` (or the level that fits the page outline). `help` adds the info icon with a Tooltip
|
|
63
|
+
* `render={<h2 />}` (or the level that fits the page outline). `help` adds the info icon with a Tooltip; it
|
|
64
|
+
* follows the title's last word when the title wraps, and the heading's name stays the title (its text is
|
|
65
|
+
* `${id}-text` when the title has an `id`, for a section's `aria-labelledby`).
|
|
63
66
|
*/
|
|
64
67
|
export function CardTitle({ help, helpLabel = "More information", children, ...props }) {
|
|
65
|
-
|
|
68
|
+
const generatedId = React.useId();
|
|
69
|
+
if (!hasContent(help)) {
|
|
70
|
+
return (_jsx(PrimitiveCardTitle, { "data-slot": "card-title", ...props, children: children }));
|
|
71
|
+
}
|
|
72
|
+
const textId = props.id ? `${props.id}-text` : `${generatedId}-text`;
|
|
73
|
+
const helpId = `${generatedId}-help`;
|
|
74
|
+
return (_jsx(PrimitiveCardTitle, { "data-slot": "card-title", "aria-labelledby": textId, ...props, children: _jsxs("span", { "data-slot": "card-title-heading", className: "min-w-0 whitespace-nowrap", children: [_jsx("span", { "data-slot": "card-title-text", id: textId, className: "whitespace-normal *:inline", children: children }), "\u2060", _jsxs(Tooltip, { supportMobileTap: true, children: [_jsx(TooltipTrigger, { render: _jsx("button", { type: "button", "data-slot": "card-help", "aria-label": helpLabel, "aria-describedby": helpId, className: "-my-1.5 -ms-0.5 -me-1.5 inline-flex size-6 shrink-0 items-center justify-center rounded-full align-middle text-muted-foreground outline-none in-data-[tone=error]:text-destructive-foreground focus-visible:*:rounded-full focus-visible:*:inset-ring focus-visible:*:inset-ring-brand-border focus-visible:*:ring-2 focus-visible:*:ring-brand-subtle" }), children: _jsx(CircleInfoIcon, { "aria-hidden": "true", className: "size-3" }) }), _jsx(TooltipContent, { children: help })] }), _jsx("span", { id: helpId, hidden: true, children: help })] }) }));
|
|
66
75
|
}
|
|
67
76
|
/** One line under the title (Body/Secondary, Content/Secondary). */
|
|
68
77
|
export function CardDescription(props) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;
|
|
1
|
+
{"version":3,"file":"card.js","sourceRoot":"","sources":["../../../src/components/card/card.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,UAAU,IAAI,mBAAmB,EACjC,IAAI,IAAI,aAAa,EACrB,eAAe,IAAI,wBAAwB,EAC3C,UAAU,IAAI,mBAAmB,EACjC,UAAU,IAAI,mBAAmB,EACjC,SAAS,IAAI,kBAAkB,EAC/B,SAAS,IAAI,kBAAkB,GAChC,MAAM,6BAA8B,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,uBAAwB,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,cAAc,EAAyB,MAAM,uBAAuB,CAAC;AAE9E;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE;QACJ,OAAO,EAAE;YACP,OAAO,EAAE,EAAE;YACX,WAAW,EACT,oFAAoF;SACvF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,EAAE;YACX,WAAW,EACT,8MAA8M;SACjN;KACF;CACO,CAAC;AAEX,yBAAyB;AACzB,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,IAAI,EAAE,SAAS,EAAW,CAAC;AAEvE,0GAA0G;AAC1G,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;IACzC,IAAI,EAAE,EAAE;IACR,QAAQ,EAAE,kBAAkB;IAC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YAGJ,KAAC,cAAc,mBAAa,MAAM,EAAC,SAAS,EAAC,QAAQ,GAAG,GACzC,EACjB,KAAC,cAAc,cAAE,IAAI,GAAkB,IAC/B,EACV,eAAM,EAAE,EAAE,MAAM,EAAE,MAAM,kBACrB,IAAI,GACA,IACF,GACY,CACtB,CAAC;AACJ,CAAC;AAED,oEAAoE;AACpE,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,OAAO,KAAC,wBAAwB,iBAAW,kBAAkB,KAAK,KAAK,GAAI,CAAC;AAC9E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,OAAO,KAAC,mBAAmB,iBAAW,aAAa,KAAK,KAAK,GAAI,CAAC;AACpE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,WAAW,CAAC,KAAuB;IACjD,OAAO,KAAC,kBAAkB,iBAAW,cAAc,KAAK,KAAK,GAAI,CAAC;AACpE,CAAC;AAED,+HAA+H;AAC/H,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,OAAO,KAAC,mBAAmB,iBAAW,aAAa,KAAK,KAAK,GAAI,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
export interface ChartShareBusiness {
|
|
3
|
+
name: string;
|
|
4
|
+
/** Logo image URL; the initials show until it loads or when it fails. */
|
|
5
|
+
imageUrl?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ChartShareCardProps extends Omit<React.ComponentProps<"div">, "title"> {
|
|
8
|
+
className?: string;
|
|
9
|
+
/** The artwork behind the card, an image URL. Decorative. */
|
|
10
|
+
background: string;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the foot of the artwork is light (a near-black lockup) or dark (a white one), so the lockup stays legible.
|
|
13
|
+
* Default: `"light"`.
|
|
14
|
+
*/
|
|
15
|
+
backgroundTone?: "light" | "dark";
|
|
16
|
+
/** The business chip above the card. Leave it out when the merchant turns off "Include business & logo". */
|
|
17
|
+
business?: ChartShareBusiness;
|
|
18
|
+
/** The word beside the badge under the card, e.g. "Verified". */
|
|
19
|
+
verified: React.ReactNode;
|
|
20
|
+
/** 860px for a card whose body is a wide pairing (a map beside its rows); 550px otherwise. */
|
|
21
|
+
wide?: boolean;
|
|
22
|
+
/** The analytics card being shared, drawn without its share button. */
|
|
23
|
+
children: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* An analytics card as an image to share (the dashboard's Analytics and Home, Share): the card at a fixed design
|
|
27
|
+
* width on artwork, the business chip above it and the Dodo Payments lockup with a verified badge below. The card
|
|
28
|
+
* follows the theme. Capture this element at its own size, and preview it in a `ScaledFrame`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function ChartShareCard({ className, background, backgroundTone, business, verified, wide, children, ...props }: ChartShareCardProps): React.JSX.Element;
|
|
31
|
+
//# sourceMappingURL=chart-share-card.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chart-share-card.d.ts","sourceRoot":"","sources":["../../../src/components/chart-share-card/chart-share-card.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAMpC,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,yEAAyE;IACzE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACrF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6DAA6D;IAC7D,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAClC,4GAA4G;IAC5G,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B,iEAAiE;IACjE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,8FAA8F;IAC9F,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uEAAuE;IACvE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,UAAU,EACV,cAAwB,EACxB,QAAQ,EACR,QAAQ,EACR,IAAY,EACZ,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,mBAAmB,qBAqDrB"}
|