@epilot/spark-ui 0.10.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/LICENSE +201 -0
- package/NOTICE +2 -0
- package/README.md +32 -0
- package/dist/chunk-DY84GLCh.cjs +29 -0
- package/dist/components/accordion.cjs +57 -0
- package/dist/components/accordion.cjs.map +1 -0
- package/dist/components/accordion.d.cts +44 -0
- package/dist/components/accordion.d.ts +44 -0
- package/dist/components/accordion.js +51 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/alert-dialog.cjs +137 -0
- package/dist/components/alert-dialog.cjs.map +1 -0
- package/dist/components/alert-dialog.d.cts +62 -0
- package/dist/components/alert-dialog.d.ts +62 -0
- package/dist/components/alert-dialog.js +123 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/attachment.cjs +119 -0
- package/dist/components/attachment.cjs.map +1 -0
- package/dist/components/attachment.d.cts +65 -0
- package/dist/components/attachment.d.ts +65 -0
- package/dist/components/attachment.js +108 -0
- package/dist/components/attachment.js.map +1 -0
- package/dist/components/avatar.cjs +56 -0
- package/dist/components/avatar.cjs.map +1 -0
- package/dist/components/avatar.d.cts +26 -0
- package/dist/components/avatar.d.ts +26 -0
- package/dist/components/avatar.js +52 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.cjs +25 -0
- package/dist/components/badge.cjs.map +1 -0
- package/dist/components/badge.d.cts +16 -0
- package/dist/components/badge.d.ts +16 -0
- package/dist/components/badge.js +22 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/bar-chart.cjs +584 -0
- package/dist/components/bar-chart.cjs.map +1 -0
- package/dist/components/bar-chart.d.cts +102 -0
- package/dist/components/bar-chart.d.ts +102 -0
- package/dist/components/bar-chart.js +583 -0
- package/dist/components/bar-chart.js.map +1 -0
- package/dist/components/battery-progress-row.cjs +133 -0
- package/dist/components/battery-progress-row.cjs.map +1 -0
- package/dist/components/battery-progress-row.d.cts +77 -0
- package/dist/components/battery-progress-row.d.ts +77 -0
- package/dist/components/battery-progress-row.js +123 -0
- package/dist/components/battery-progress-row.js.map +1 -0
- package/dist/components/breadcrumbs.cjs +64 -0
- package/dist/components/breadcrumbs.cjs.map +1 -0
- package/dist/components/breadcrumbs.d.cts +42 -0
- package/dist/components/breadcrumbs.d.ts +42 -0
- package/dist/components/breadcrumbs.js +58 -0
- package/dist/components/breadcrumbs.js.map +1 -0
- package/dist/components/bubble.cjs +84 -0
- package/dist/components/bubble.cjs.map +1 -0
- package/dist/components/bubble.d.cts +39 -0
- package/dist/components/bubble.d.ts +39 -0
- package/dist/components/bubble.js +78 -0
- package/dist/components/bubble.js.map +1 -0
- package/dist/components/button-group.cjs +72 -0
- package/dist/components/button-group.cjs.map +1 -0
- package/dist/components/button-group.d.cts +29 -0
- package/dist/components/button-group.d.ts +29 -0
- package/dist/components/button-group.js +64 -0
- package/dist/components/button-group.js.map +1 -0
- package/dist/components/button.cjs +58 -0
- package/dist/components/button.cjs.map +1 -0
- package/dist/components/button.d.cts +29 -0
- package/dist/components/button.d.ts +29 -0
- package/dist/components/button.js +54 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.cjs +59 -0
- package/dist/components/calendar.cjs.map +1 -0
- package/dist/components/calendar.d.cts +20 -0
- package/dist/components/calendar.d.ts +20 -0
- package/dist/components/calendar.js +56 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/callout.cjs +95 -0
- package/dist/components/callout.cjs.map +1 -0
- package/dist/components/callout.d.cts +42 -0
- package/dist/components/callout.d.ts +42 -0
- package/dist/components/callout.js +88 -0
- package/dist/components/callout.js.map +1 -0
- package/dist/components/card.cjs +100 -0
- package/dist/components/card.cjs.map +1 -0
- package/dist/components/card.d.cts +34 -0
- package/dist/components/card.d.ts +34 -0
- package/dist/components/card.js +90 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/chart.cjs +110 -0
- package/dist/components/chart.cjs.map +1 -0
- package/dist/components/chart.d.cts +92 -0
- package/dist/components/chart.d.ts +92 -0
- package/dist/components/chart.js +104 -0
- package/dist/components/chart.js.map +1 -0
- package/dist/components/checkbox.cjs +44 -0
- package/dist/components/checkbox.cjs.map +1 -0
- package/dist/components/checkbox.d.cts +26 -0
- package/dist/components/checkbox.d.ts +26 -0
- package/dist/components/checkbox.js +41 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/circular-gauge.cjs +74 -0
- package/dist/components/circular-gauge.cjs.map +1 -0
- package/dist/components/circular-gauge.d.cts +37 -0
- package/dist/components/circular-gauge.d.ts +37 -0
- package/dist/components/circular-gauge.js +71 -0
- package/dist/components/circular-gauge.js.map +1 -0
- package/dist/components/day-of-week-picker.cjs +123 -0
- package/dist/components/day-of-week-picker.cjs.map +1 -0
- package/dist/components/day-of-week-picker.d.cts +39 -0
- package/dist/components/day-of-week-picker.d.ts +39 -0
- package/dist/components/day-of-week-picker.js +119 -0
- package/dist/components/day-of-week-picker.js.map +1 -0
- package/dist/components/device-card.cjs +118 -0
- package/dist/components/device-card.cjs.map +1 -0
- package/dist/components/device-card.d.cts +70 -0
- package/dist/components/device-card.d.ts +70 -0
- package/dist/components/device-card.js +104 -0
- package/dist/components/device-card.js.map +1 -0
- package/dist/components/dialog.cjs +115 -0
- package/dist/components/dialog.cjs.map +1 -0
- package/dist/components/dialog.d.cts +44 -0
- package/dist/components/dialog.d.ts +44 -0
- package/dist/components/dialog.js +103 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/donut-chart.cjs +70 -0
- package/dist/components/donut-chart.cjs.map +1 -0
- package/dist/components/donut-chart.d.cts +20 -0
- package/dist/components/donut-chart.d.ts +20 -0
- package/dist/components/donut-chart.js +69 -0
- package/dist/components/donut-chart.js.map +1 -0
- package/dist/components/drawer.cjs +95 -0
- package/dist/components/drawer.cjs.map +1 -0
- package/dist/components/drawer.d.cts +45 -0
- package/dist/components/drawer.d.ts +45 -0
- package/dist/components/drawer.js +83 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown-menu.cjs +165 -0
- package/dist/components/dropdown-menu.cjs.map +1 -0
- package/dist/components/dropdown-menu.d.cts +92 -0
- package/dist/components/dropdown-menu.d.ts +92 -0
- package/dist/components/dropdown-menu.js +148 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/empty-state.cjs +41 -0
- package/dist/components/empty-state.cjs.map +1 -0
- package/dist/components/empty-state.d.cts +26 -0
- package/dist/components/empty-state.d.ts +26 -0
- package/dist/components/empty-state.js +41 -0
- package/dist/components/empty-state.js.map +1 -0
- package/dist/components/energy-bar-chart.cjs +23 -0
- package/dist/components/energy-bar-chart.cjs.map +1 -0
- package/dist/components/energy-bar-chart.d.cts +43 -0
- package/dist/components/energy-bar-chart.d.ts +43 -0
- package/dist/components/energy-bar-chart.js +22 -0
- package/dist/components/energy-bar-chart.js.map +1 -0
- package/dist/components/energy-breakdown.cjs +80 -0
- package/dist/components/energy-breakdown.cjs.map +1 -0
- package/dist/components/energy-breakdown.d.cts +24 -0
- package/dist/components/energy-breakdown.d.ts +24 -0
- package/dist/components/energy-breakdown.js +79 -0
- package/dist/components/energy-breakdown.js.map +1 -0
- package/dist/components/energy-history-chart.cjs +63 -0
- package/dist/components/energy-history-chart.cjs.map +1 -0
- package/dist/components/energy-history-chart.d.cts +64 -0
- package/dist/components/energy-history-chart.d.ts +64 -0
- package/dist/components/energy-history-chart.js +62 -0
- package/dist/components/energy-history-chart.js.map +1 -0
- package/dist/components/feed-in-hero.cjs +55 -0
- package/dist/components/feed-in-hero.cjs.map +1 -0
- package/dist/components/feed-in-hero.d.cts +32 -0
- package/dist/components/feed-in-hero.d.ts +32 -0
- package/dist/components/feed-in-hero.js +51 -0
- package/dist/components/feed-in-hero.js.map +1 -0
- package/dist/components/field.cjs +257 -0
- package/dist/components/field.cjs.map +1 -0
- package/dist/components/field.d.cts +103 -0
- package/dist/components/field.d.ts +103 -0
- package/dist/components/field.js +243 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/icon.cjs +35 -0
- package/dist/components/icon.cjs.map +1 -0
- package/dist/components/icon.d.cts +26 -0
- package/dist/components/icon.d.ts +26 -0
- package/dist/components/icon.js +32 -0
- package/dist/components/icon.js.map +1 -0
- package/dist/components/info-block.cjs +75 -0
- package/dist/components/info-block.cjs.map +1 -0
- package/dist/components/info-block.d.cts +19 -0
- package/dist/components/info-block.d.ts +19 -0
- package/dist/components/info-block.js +65 -0
- package/dist/components/info-block.js.map +1 -0
- package/dist/components/input-group.cjs +165 -0
- package/dist/components/input-group.cjs.map +1 -0
- package/dist/components/input-group.d.cts +27 -0
- package/dist/components/input-group.d.ts +27 -0
- package/dist/components/input-group.js +159 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input-otp.cjs +112 -0
- package/dist/components/input-otp.cjs.map +1 -0
- package/dist/components/input-otp.d.cts +24 -0
- package/dist/components/input-otp.d.ts +24 -0
- package/dist/components/input-otp.js +111 -0
- package/dist/components/input-otp.js.map +1 -0
- package/dist/components/input.cjs +113 -0
- package/dist/components/input.cjs.map +1 -0
- package/dist/components/input.d.cts +14 -0
- package/dist/components/input.d.ts +14 -0
- package/dist/components/input.js +110 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/label.cjs +18 -0
- package/dist/components/label.cjs.map +1 -0
- package/dist/components/label.d.cts +10 -0
- package/dist/components/label.d.ts +10 -0
- package/dist/components/label.js +15 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/layout.cjs +14 -0
- package/dist/components/layout.cjs.map +1 -0
- package/dist/components/layout.d.cts +11 -0
- package/dist/components/layout.d.ts +12 -0
- package/dist/components/layout.js +14 -0
- package/dist/components/layout.js.map +1 -0
- package/dist/components/line-chart.cjs +538 -0
- package/dist/components/line-chart.cjs.map +1 -0
- package/dist/components/line-chart.d.cts +90 -0
- package/dist/components/line-chart.d.ts +90 -0
- package/dist/components/line-chart.js +536 -0
- package/dist/components/line-chart.js.map +1 -0
- package/dist/components/list.cjs +132 -0
- package/dist/components/list.cjs.map +1 -0
- package/dist/components/list.d.cts +71 -0
- package/dist/components/list.d.ts +71 -0
- package/dist/components/list.js +122 -0
- package/dist/components/list.js.map +1 -0
- package/dist/components/marker.cjs +52 -0
- package/dist/components/marker.cjs.map +1 -0
- package/dist/components/marker.d.cts +27 -0
- package/dist/components/marker.d.ts +27 -0
- package/dist/components/marker.js +46 -0
- package/dist/components/marker.js.map +1 -0
- package/dist/components/message-scroller.cjs +73 -0
- package/dist/components/message-scroller.cjs.map +1 -0
- package/dist/components/message-scroller.d.cts +38 -0
- package/dist/components/message-scroller.d.ts +38 -0
- package/dist/components/message-scroller.js +62 -0
- package/dist/components/message-scroller.js.map +1 -0
- package/dist/components/message.cjs +60 -0
- package/dist/components/message.cjs.map +1 -0
- package/dist/components/message.d.cts +35 -0
- package/dist/components/message.d.ts +35 -0
- package/dist/components/message.js +52 -0
- package/dist/components/message.js.map +1 -0
- package/dist/components/metering-row.cjs +42 -0
- package/dist/components/metering-row.cjs.map +1 -0
- package/dist/components/metering-row.d.cts +31 -0
- package/dist/components/metering-row.d.ts +31 -0
- package/dist/components/metering-row.js +38 -0
- package/dist/components/metering-row.js.map +1 -0
- package/dist/components/money-saved-block.cjs +86 -0
- package/dist/components/money-saved-block.cjs.map +1 -0
- package/dist/components/money-saved-block.d.cts +55 -0
- package/dist/components/money-saved-block.d.ts +55 -0
- package/dist/components/money-saved-block.js +79 -0
- package/dist/components/money-saved-block.js.map +1 -0
- package/dist/components/number-flow.cjs +44 -0
- package/dist/components/number-flow.cjs.map +1 -0
- package/dist/components/number-flow.d.cts +4 -0
- package/dist/components/number-flow.d.ts +4 -0
- package/dist/components/number-flow.js +42 -0
- package/dist/components/number-flow.js.map +1 -0
- package/dist/components/on-off-button.cjs +35 -0
- package/dist/components/on-off-button.cjs.map +1 -0
- package/dist/components/on-off-button.d.cts +18 -0
- package/dist/components/on-off-button.d.ts +18 -0
- package/dist/components/on-off-button.js +34 -0
- package/dist/components/on-off-button.js.map +1 -0
- package/dist/components/onboarding-layout.cjs +67 -0
- package/dist/components/onboarding-layout.cjs.map +1 -0
- package/dist/components/onboarding-layout.d.cts +44 -0
- package/dist/components/onboarding-layout.d.ts +44 -0
- package/dist/components/onboarding-layout.js +60 -0
- package/dist/components/onboarding-layout.js.map +1 -0
- package/dist/components/page-header.cjs +50 -0
- package/dist/components/page-header.cjs.map +1 -0
- package/dist/components/page-header.d.cts +25 -0
- package/dist/components/page-header.d.ts +25 -0
- package/dist/components/page-header.js +44 -0
- package/dist/components/page-header.js.map +1 -0
- package/dist/components/page-spinner.cjs +18 -0
- package/dist/components/page-spinner.cjs.map +1 -0
- package/dist/components/page-spinner.d.cts +12 -0
- package/dist/components/page-spinner.d.ts +12 -0
- package/dist/components/page-spinner.js +17 -0
- package/dist/components/page-spinner.js.map +1 -0
- package/dist/components/period-tabs.cjs +78 -0
- package/dist/components/period-tabs.cjs.map +1 -0
- package/dist/components/period-tabs.d.cts +50 -0
- package/dist/components/period-tabs.d.ts +50 -0
- package/dist/components/period-tabs.js +73 -0
- package/dist/components/period-tabs.js.map +1 -0
- package/dist/components/pill.cjs +62 -0
- package/dist/components/pill.cjs.map +1 -0
- package/dist/components/pill.d.cts +29 -0
- package/dist/components/pill.d.ts +29 -0
- package/dist/components/pill.js +59 -0
- package/dist/components/pill.js.map +1 -0
- package/dist/components/popover.cjs +62 -0
- package/dist/components/popover.cjs.map +1 -0
- package/dist/components/popover.d.cts +28 -0
- package/dist/components/popover.d.ts +28 -0
- package/dist/components/popover.js +56 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/power-history-chart.cjs +498 -0
- package/dist/components/power-history-chart.cjs.map +1 -0
- package/dist/components/power-history-chart.d.cts +71 -0
- package/dist/components/power-history-chart.d.ts +71 -0
- package/dist/components/power-history-chart.js +496 -0
- package/dist/components/power-history-chart.js.map +1 -0
- package/dist/components/power-history.cjs +114 -0
- package/dist/components/power-history.cjs.map +1 -0
- package/dist/components/power-history.d.cts +40 -0
- package/dist/components/power-history.d.ts +41 -0
- package/dist/components/power-history.js +114 -0
- package/dist/components/power-history.js.map +1 -0
- package/dist/components/power-network.cjs +562 -0
- package/dist/components/power-network.cjs.map +1 -0
- package/dist/components/power-network.d.cts +80 -0
- package/dist/components/power-network.d.ts +80 -0
- package/dist/components/power-network.js +556 -0
- package/dist/components/power-network.js.map +1 -0
- package/dist/components/progress.cjs +34 -0
- package/dist/components/progress.cjs.map +1 -0
- package/dist/components/progress.d.cts +17 -0
- package/dist/components/progress.d.ts +17 -0
- package/dist/components/progress.js +31 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/radio-card-group.cjs +94 -0
- package/dist/components/radio-card-group.cjs.map +1 -0
- package/dist/components/radio-card-group.d.cts +21 -0
- package/dist/components/radio-card-group.d.ts +21 -0
- package/dist/components/radio-card-group.js +90 -0
- package/dist/components/radio-card-group.js.map +1 -0
- package/dist/components/radio.cjs +41 -0
- package/dist/components/radio.cjs.map +1 -0
- package/dist/components/radio.d.cts +32 -0
- package/dist/components/radio.d.ts +32 -0
- package/dist/components/radio.js +37 -0
- package/dist/components/radio.js.map +1 -0
- package/dist/components/reparent.cjs +55 -0
- package/dist/components/reparent.cjs.map +1 -0
- package/dist/components/reparent.d.cts +28 -0
- package/dist/components/reparent.d.ts +28 -0
- package/dist/components/reparent.js +49 -0
- package/dist/components/reparent.js.map +1 -0
- package/dist/components/sankey-chart.cjs +187 -0
- package/dist/components/sankey-chart.cjs.map +1 -0
- package/dist/components/sankey-chart.d.cts +66 -0
- package/dist/components/sankey-chart.d.ts +66 -0
- package/dist/components/sankey-chart.js +185 -0
- package/dist/components/sankey-chart.js.map +1 -0
- package/dist/components/schedule-editor.cjs +82 -0
- package/dist/components/schedule-editor.cjs.map +1 -0
- package/dist/components/schedule-editor.d.cts +25 -0
- package/dist/components/schedule-editor.d.ts +25 -0
- package/dist/components/schedule-editor.js +72 -0
- package/dist/components/schedule-editor.js.map +1 -0
- package/dist/components/schedule-list.cjs +110 -0
- package/dist/components/schedule-list.cjs.map +1 -0
- package/dist/components/schedule-list.d.cts +29 -0
- package/dist/components/schedule-list.d.ts +29 -0
- package/dist/components/schedule-list.js +99 -0
- package/dist/components/schedule-list.js.map +1 -0
- package/dist/components/scroll-area.cjs +53 -0
- package/dist/components/scroll-area.cjs.map +1 -0
- package/dist/components/scroll-area.d.cts +24 -0
- package/dist/components/scroll-area.d.ts +24 -0
- package/dist/components/scroll-area.js +44 -0
- package/dist/components/scroll-area.js.map +1 -0
- package/dist/components/segmented-control.cjs +44 -0
- package/dist/components/segmented-control.cjs.map +1 -0
- package/dist/components/segmented-control.d.cts +32 -0
- package/dist/components/segmented-control.d.ts +32 -0
- package/dist/components/segmented-control.js +40 -0
- package/dist/components/segmented-control.js.map +1 -0
- package/dist/components/select.cjs +136 -0
- package/dist/components/select.cjs.map +1 -0
- package/dist/components/select.d.cts +62 -0
- package/dist/components/select.d.ts +62 -0
- package/dist/components/select.js +124 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.cjs +38 -0
- package/dist/components/separator.cjs.map +1 -0
- package/dist/components/separator.d.cts +13 -0
- package/dist/components/separator.d.ts +13 -0
- package/dist/components/separator.js +35 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/series-legend.cjs +38 -0
- package/dist/components/series-legend.cjs.map +1 -0
- package/dist/components/series-legend.d.cts +29 -0
- package/dist/components/series-legend.d.ts +29 -0
- package/dist/components/series-legend.js +37 -0
- package/dist/components/series-legend.js.map +1 -0
- package/dist/components/sheet.cjs +102 -0
- package/dist/components/sheet.cjs.map +1 -0
- package/dist/components/sheet.d.cts +45 -0
- package/dist/components/sheet.d.ts +45 -0
- package/dist/components/sheet.js +90 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/skeleton.cjs +23 -0
- package/dist/components/skeleton.cjs.map +1 -0
- package/dist/components/skeleton.d.cts +23 -0
- package/dist/components/skeleton.d.ts +23 -0
- package/dist/components/skeleton.js +21 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.cjs +263 -0
- package/dist/components/slider.cjs.map +1 -0
- package/dist/components/slider.d.cts +136 -0
- package/dist/components/slider.d.ts +136 -0
- package/dist/components/slider.js +253 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/smart-toggle-button.cjs +27 -0
- package/dist/components/smart-toggle-button.cjs.map +1 -0
- package/dist/components/smart-toggle-button.d.cts +16 -0
- package/dist/components/smart-toggle-button.d.ts +16 -0
- package/dist/components/smart-toggle-button.js +26 -0
- package/dist/components/smart-toggle-button.js.map +1 -0
- package/dist/components/solar-forecast-chart.cjs +109 -0
- package/dist/components/solar-forecast-chart.cjs.map +1 -0
- package/dist/components/solar-forecast-chart.d.cts +77 -0
- package/dist/components/solar-forecast-chart.d.ts +77 -0
- package/dist/components/solar-forecast-chart.js +104 -0
- package/dist/components/solar-forecast-chart.js.map +1 -0
- package/dist/components/sortable-list.cjs +68 -0
- package/dist/components/sortable-list.cjs.map +1 -0
- package/dist/components/sortable-list.d.cts +45 -0
- package/dist/components/sortable-list.d.ts +45 -0
- package/dist/components/sortable-list.js +67 -0
- package/dist/components/sortable-list.js.map +1 -0
- package/dist/components/spinner.cjs +42 -0
- package/dist/components/spinner.cjs.map +1 -0
- package/dist/components/spinner.d.cts +15 -0
- package/dist/components/spinner.d.ts +15 -0
- package/dist/components/spinner.js +39 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/stat-card.cjs +57 -0
- package/dist/components/stat-card.cjs.map +1 -0
- package/dist/components/stat-card.d.cts +34 -0
- package/dist/components/stat-card.d.ts +34 -0
- package/dist/components/stat-card.js +50 -0
- package/dist/components/stat-card.js.map +1 -0
- package/dist/components/stepper.cjs +79 -0
- package/dist/components/stepper.cjs.map +1 -0
- package/dist/components/stepper.d.cts +33 -0
- package/dist/components/stepper.d.ts +33 -0
- package/dist/components/stepper.js +76 -0
- package/dist/components/stepper.js.map +1 -0
- package/dist/components/switch.cjs +26 -0
- package/dist/components/switch.cjs.map +1 -0
- package/dist/components/switch.d.cts +32 -0
- package/dist/components/switch.d.ts +32 -0
- package/dist/components/switch.js +25 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/tabs.cjs +178 -0
- package/dist/components/tabs.cjs.map +1 -0
- package/dist/components/tabs.d.cts +44 -0
- package/dist/components/tabs.d.ts +44 -0
- package/dist/components/tabs.js +170 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.cjs +128 -0
- package/dist/components/textarea.cjs.map +1 -0
- package/dist/components/textarea.d.cts +15 -0
- package/dist/components/textarea.d.ts +15 -0
- package/dist/components/textarea.js +125 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/theme.cjs +122 -0
- package/dist/components/theme.cjs.map +1 -0
- package/dist/components/theme.d.cts +36 -0
- package/dist/components/theme.d.ts +36 -0
- package/dist/components/theme.js +118 -0
- package/dist/components/theme.js.map +1 -0
- package/dist/components/thumbnail.cjs +54 -0
- package/dist/components/thumbnail.cjs.map +1 -0
- package/dist/components/thumbnail.d.cts +33 -0
- package/dist/components/thumbnail.d.ts +33 -0
- package/dist/components/thumbnail.js +51 -0
- package/dist/components/thumbnail.js.map +1 -0
- package/dist/components/time-picker.cjs +105 -0
- package/dist/components/time-picker.cjs.map +1 -0
- package/dist/components/time-picker.d.cts +43 -0
- package/dist/components/time-picker.d.ts +43 -0
- package/dist/components/time-picker.js +101 -0
- package/dist/components/time-picker.js.map +1 -0
- package/dist/components/toast.cjs +192 -0
- package/dist/components/toast.cjs.map +1 -0
- package/dist/components/toast.d.cts +59 -0
- package/dist/components/toast.d.ts +59 -0
- package/dist/components/toast.js +188 -0
- package/dist/components/toast.js.map +1 -0
- package/dist/components/tooltip.cjs +85 -0
- package/dist/components/tooltip.cjs.map +1 -0
- package/dist/components/tooltip.d.cts +48 -0
- package/dist/components/tooltip.d.ts +48 -0
- package/dist/components/tooltip.js +77 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/typography.cjs +51 -0
- package/dist/components/typography.cjs.map +1 -0
- package/dist/components/typography.d.cts +30 -0
- package/dist/components/typography.d.ts +30 -0
- package/dist/components/typography.js +45 -0
- package/dist/components/typography.js.map +1 -0
- package/dist/generate-radix-colors-Bw-RYaV4.d.cts +33 -0
- package/dist/generate-radix-colors-Bw-RYaV4.d.ts +33 -0
- package/dist/hooks/use-chart-zoom.cjs +236 -0
- package/dist/hooks/use-chart-zoom.cjs.map +1 -0
- package/dist/hooks/use-chart-zoom.d.cts +53 -0
- package/dist/hooks/use-chart-zoom.d.ts +53 -0
- package/dist/hooks/use-chart-zoom.js +234 -0
- package/dist/hooks/use-chart-zoom.js.map +1 -0
- package/dist/hooks/use-container-width.cjs +21 -0
- package/dist/hooks/use-container-width.cjs.map +1 -0
- package/dist/hooks/use-container-width.d.cts +7 -0
- package/dist/hooks/use-container-width.d.ts +7 -0
- package/dist/hooks/use-container-width.js +20 -0
- package/dist/hooks/use-container-width.js.map +1 -0
- package/dist/hooks/use-reduced-motion.cjs +21 -0
- package/dist/hooks/use-reduced-motion.cjs.map +1 -0
- package/dist/hooks/use-reduced-motion.d.cts +7 -0
- package/dist/hooks/use-reduced-motion.d.ts +7 -0
- package/dist/hooks/use-reduced-motion.js +20 -0
- package/dist/hooks/use-reduced-motion.js.map +1 -0
- package/dist/icons/index.cjs +7 -0
- package/dist/icons/index.d.cts +4 -0
- package/dist/icons/index.d.ts +4 -0
- package/dist/icons/index.js +3 -0
- package/dist/icons/material-symbol.cjs +104 -0
- package/dist/icons/material-symbol.cjs.map +1 -0
- package/dist/icons/material-symbol.d.cts +21 -0
- package/dist/icons/material-symbol.d.ts +21 -0
- package/dist/icons/material-symbol.js +100 -0
- package/dist/icons/material-symbol.js.map +1 -0
- package/dist/lib/accent-colors.cjs +14 -0
- package/dist/lib/accent-colors.cjs.map +1 -0
- package/dist/lib/accent-colors.d.cts +8 -0
- package/dist/lib/accent-colors.d.ts +8 -0
- package/dist/lib/accent-colors.js +13 -0
- package/dist/lib/accent-colors.js.map +1 -0
- package/dist/lib/accent-theme.cjs +130 -0
- package/dist/lib/accent-theme.cjs.map +1 -0
- package/dist/lib/accent-theme.d.cts +35 -0
- package/dist/lib/accent-theme.d.ts +35 -0
- package/dist/lib/accent-theme.js +122 -0
- package/dist/lib/accent-theme.js.map +1 -0
- package/dist/lib/generate-radix-colors.cjs +364 -0
- package/dist/lib/generate-radix-colors.cjs.map +1 -0
- package/dist/lib/generate-radix-colors.d.cts +4 -0
- package/dist/lib/generate-radix-colors.d.ts +4 -0
- package/dist/lib/generate-radix-colors.js +357 -0
- package/dist/lib/generate-radix-colors.js.map +1 -0
- package/dist/lib/input-box-variants.cjs +30 -0
- package/dist/lib/input-box-variants.cjs.map +1 -0
- package/dist/lib/input-box-variants.d.cts +10 -0
- package/dist/lib/input-box-variants.d.ts +10 -0
- package/dist/lib/input-box-variants.js +28 -0
- package/dist/lib/input-box-variants.js.map +1 -0
- package/dist/lib/theme-types.cjs +1 -0
- package/dist/lib/theme-types.d.cts +4 -0
- package/dist/lib/theme-types.d.ts +4 -0
- package/dist/lib/theme-types.js +2 -0
- package/dist/lib/tones.cjs +14 -0
- package/dist/lib/tones.cjs.map +1 -0
- package/dist/lib/tones.d.cts +8 -0
- package/dist/lib/tones.d.ts +8 -0
- package/dist/lib/tones.js +13 -0
- package/dist/lib/tones.js.map +1 -0
- package/dist/number-flow-Bch81ixZ.d.cts +14 -0
- package/dist/number-flow-Bch81ixZ.d.ts +14 -0
- package/dist/styles/index.css +447 -0
- package/dist/styles/internal.css +5 -0
- package/dist/styles/material-symbol.css +22 -0
- package/dist/styles/spark-default.css +980 -0
- package/dist/styles/theme.css +623 -0
- package/dist/styles/utilities.css +557 -0
- package/dist/theme-types-8wjgiNA_.d.cts +29 -0
- package/dist/theme-types-8wjgiNA_.d.ts +29 -0
- package/dist/utils/build-sankey-nodes.cjs +72 -0
- package/dist/utils/build-sankey-nodes.cjs.map +1 -0
- package/dist/utils/build-sankey-nodes.d.cts +27 -0
- package/dist/utils/build-sankey-nodes.d.ts +27 -0
- package/dist/utils/build-sankey-nodes.js +71 -0
- package/dist/utils/build-sankey-nodes.js.map +1 -0
- package/dist/utils/chars.cjs +18 -0
- package/dist/utils/chars.cjs.map +1 -0
- package/dist/utils/chars.d.cts +10 -0
- package/dist/utils/chars.d.ts +10 -0
- package/dist/utils/chars.js +14 -0
- package/dist/utils/chars.js.map +1 -0
- package/dist/utils/chart-scale.cjs +54 -0
- package/dist/utils/chart-scale.cjs.map +1 -0
- package/dist/utils/chart-scale.d.cts +29 -0
- package/dist/utils/chart-scale.d.ts +29 -0
- package/dist/utils/chart-scale.js +51 -0
- package/dist/utils/chart-scale.js.map +1 -0
- package/dist/utils/chart-time-ticks.cjs +35 -0
- package/dist/utils/chart-time-ticks.cjs.map +1 -0
- package/dist/utils/chart-time-ticks.d.cts +7 -0
- package/dist/utils/chart-time-ticks.d.ts +7 -0
- package/dist/utils/chart-time-ticks.js +34 -0
- package/dist/utils/chart-time-ticks.js.map +1 -0
- package/dist/utils/chart-zoom.cjs +84 -0
- package/dist/utils/chart-zoom.cjs.map +1 -0
- package/dist/utils/chart-zoom.d.cts +14 -0
- package/dist/utils/chart-zoom.d.ts +14 -0
- package/dist/utils/chart-zoom.js +77 -0
- package/dist/utils/chart-zoom.js.map +1 -0
- package/dist/utils/cn.cjs +9 -0
- package/dist/utils/cn.d.cts +4 -0
- package/dist/utils/cn.d.ts +4 -0
- package/dist/utils/cn.js +3 -0
- package/dist/utils/date-mask.cjs +45 -0
- package/dist/utils/date-mask.cjs.map +1 -0
- package/dist/utils/date-mask.d.cts +17 -0
- package/dist/utils/date-mask.d.ts +17 -0
- package/dist/utils/date-mask.js +41 -0
- package/dist/utils/date-mask.js.map +1 -0
- package/dist/utils/format.cjs +57 -0
- package/dist/utils/format.cjs.map +1 -0
- package/dist/utils/format.d.cts +23 -0
- package/dist/utils/format.d.ts +23 -0
- package/dist/utils/format.js +47 -0
- package/dist/utils/format.js.map +1 -0
- package/package.json +109 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
|
|
5
|
+
//#region src/components/breadcrumbs.d.ts
|
|
6
|
+
declare const Breadcrumbs: ({
|
|
7
|
+
className,
|
|
8
|
+
"aria-label": ariaLabel,
|
|
9
|
+
...rest
|
|
10
|
+
}: React.ComponentProps<"nav">) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const BreadcrumbsList: ({
|
|
12
|
+
className,
|
|
13
|
+
...rest
|
|
14
|
+
}: React.ComponentProps<"ol">) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const BreadcrumbsItem: ({
|
|
16
|
+
className,
|
|
17
|
+
...rest
|
|
18
|
+
}: React.ComponentProps<"li">) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Link inside a breadcrumb. Pass `render` to render any router-specific link
|
|
21
|
+
* component (TanStack `Link`, Next `Link`, plain `<a>`, …) and inherit the
|
|
22
|
+
* breadcrumb link styling. Without `render` it renders as a plain anchor.
|
|
23
|
+
*/
|
|
24
|
+
declare const BreadcrumbsLink: ({
|
|
25
|
+
className,
|
|
26
|
+
render,
|
|
27
|
+
...rest
|
|
28
|
+
}: useRender.ComponentProps<"a">) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
29
|
+
/** Current page marker — the trailing breadcrumb the user is on. */
|
|
30
|
+
declare const BreadcrumbsPage: ({
|
|
31
|
+
className,
|
|
32
|
+
...rest
|
|
33
|
+
}: React.ComponentProps<"span">) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
/** Visual separator between breadcrumb items. Defaults to "/". */
|
|
35
|
+
declare const BreadcrumbsSeparator: ({
|
|
36
|
+
children,
|
|
37
|
+
className,
|
|
38
|
+
...rest
|
|
39
|
+
}: React.ComponentProps<"span">) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Breadcrumbs, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsList, BreadcrumbsPage, BreadcrumbsSeparator };
|
|
42
|
+
//# sourceMappingURL=breadcrumbs.d.cts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
4
|
+
|
|
5
|
+
//#region src/components/breadcrumbs.d.ts
|
|
6
|
+
declare const Breadcrumbs: ({
|
|
7
|
+
className,
|
|
8
|
+
"aria-label": ariaLabel,
|
|
9
|
+
...rest
|
|
10
|
+
}: React.ComponentProps<"nav">) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const BreadcrumbsList: ({
|
|
12
|
+
className,
|
|
13
|
+
...rest
|
|
14
|
+
}: React.ComponentProps<"ol">) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare const BreadcrumbsItem: ({
|
|
16
|
+
className,
|
|
17
|
+
...rest
|
|
18
|
+
}: React.ComponentProps<"li">) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Link inside a breadcrumb. Pass `render` to render any router-specific link
|
|
21
|
+
* component (TanStack `Link`, Next `Link`, plain `<a>`, …) and inherit the
|
|
22
|
+
* breadcrumb link styling. Without `render` it renders as a plain anchor.
|
|
23
|
+
*/
|
|
24
|
+
declare const BreadcrumbsLink: ({
|
|
25
|
+
className,
|
|
26
|
+
render,
|
|
27
|
+
...rest
|
|
28
|
+
}: useRender.ComponentProps<"a">) => import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
29
|
+
/** Current page marker — the trailing breadcrumb the user is on. */
|
|
30
|
+
declare const BreadcrumbsPage: ({
|
|
31
|
+
className,
|
|
32
|
+
...rest
|
|
33
|
+
}: React.ComponentProps<"span">) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
/** Visual separator between breadcrumb items. Defaults to "/". */
|
|
35
|
+
declare const BreadcrumbsSeparator: ({
|
|
36
|
+
children,
|
|
37
|
+
className,
|
|
38
|
+
...rest
|
|
39
|
+
}: React.ComponentProps<"span">) => import("react/jsx-runtime").JSX.Element;
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Breadcrumbs, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsList, BreadcrumbsPage, BreadcrumbsSeparator };
|
|
42
|
+
//# sourceMappingURL=breadcrumbs.d.ts.map
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
+
//#region src/components/breadcrumbs.tsx
|
|
7
|
+
const Breadcrumbs = ({ className, "aria-label": ariaLabel = "Breadcrumb", ...rest }) => {
|
|
8
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
9
|
+
"aria-label": ariaLabel,
|
|
10
|
+
className: cn(className),
|
|
11
|
+
...rest
|
|
12
|
+
});
|
|
13
|
+
};
|
|
14
|
+
const BreadcrumbsList = ({ className, ...rest }) => {
|
|
15
|
+
return /* @__PURE__ */ jsx("ol", {
|
|
16
|
+
className: cn("flex flex-wrap items-center gap-1.5 text-sm text-gray-light", className),
|
|
17
|
+
...rest
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
const BreadcrumbsItem = ({ className, ...rest }) => {
|
|
21
|
+
return /* @__PURE__ */ jsx("li", {
|
|
22
|
+
className: cn("flex items-center gap-1.5", className),
|
|
23
|
+
...rest
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Link inside a breadcrumb. Pass `render` to render any router-specific link
|
|
28
|
+
* component (TanStack `Link`, Next `Link`, plain `<a>`, …) and inherit the
|
|
29
|
+
* breadcrumb link styling. Without `render` it renders as a plain anchor.
|
|
30
|
+
*/
|
|
31
|
+
const BreadcrumbsLink = ({ className, render, ...rest }) => {
|
|
32
|
+
return useRender({
|
|
33
|
+
defaultTagName: "a",
|
|
34
|
+
render,
|
|
35
|
+
props: mergeProps({ className: cn("rounded-xs transition-colors hover:text-gray focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden", className) }, rest)
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
/** Current page marker — the trailing breadcrumb the user is on. */
|
|
39
|
+
const BreadcrumbsPage = ({ className, ...rest }) => {
|
|
40
|
+
return /* @__PURE__ */ jsx("span", {
|
|
41
|
+
"aria-current": "page",
|
|
42
|
+
className: cn("font-medium text-gray", className),
|
|
43
|
+
...rest
|
|
44
|
+
});
|
|
45
|
+
};
|
|
46
|
+
/** Visual separator between breadcrumb items. Defaults to "/". */
|
|
47
|
+
const BreadcrumbsSeparator = ({ children, className, ...rest }) => {
|
|
48
|
+
return /* @__PURE__ */ jsx("span", {
|
|
49
|
+
"aria-hidden": "true",
|
|
50
|
+
className: cn(className),
|
|
51
|
+
...rest,
|
|
52
|
+
children: children ?? "/"
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
//#endregion
|
|
56
|
+
export { Breadcrumbs, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsList, BreadcrumbsPage, BreadcrumbsSeparator };
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=breadcrumbs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"breadcrumbs.js","names":[],"sources":["../../src/components/breadcrumbs.tsx"],"sourcesContent":["import { mergeProps } from '@base-ui/react/merge-props'\nimport { useRender } from '@base-ui/react/use-render'\nimport { cn } from '../utils/cn'\n\nconst Breadcrumbs = ({\n className,\n 'aria-label': ariaLabel = 'Breadcrumb',\n ...rest\n}: React.ComponentProps<'nav'>) => {\n return <nav aria-label={ariaLabel} className={cn(className)} {...rest} />\n}\n\nconst BreadcrumbsList = ({\n className,\n ...rest\n}: React.ComponentProps<'ol'>) => {\n return (\n <ol\n className={cn(\n 'flex flex-wrap items-center gap-1.5 text-sm text-gray-light',\n className,\n )}\n {...rest}\n />\n )\n}\n\nconst BreadcrumbsItem = ({\n className,\n ...rest\n}: React.ComponentProps<'li'>) => {\n return <li className={cn('flex items-center gap-1.5', className)} {...rest} />\n}\n\n/**\n * Link inside a breadcrumb. Pass `render` to render any router-specific link\n * component (TanStack `Link`, Next `Link`, plain `<a>`, …) and inherit the\n * breadcrumb link styling. Without `render` it renders as a plain anchor.\n */\nconst BreadcrumbsLink = ({\n className,\n render,\n ...rest\n}: useRender.ComponentProps<'a'>) => {\n return useRender({\n defaultTagName: 'a',\n render,\n props: mergeProps<'a'>(\n {\n className: cn(\n 'rounded-xs transition-colors hover:text-gray focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden',\n className,\n ),\n },\n rest,\n ),\n })\n}\n\n/** Current page marker — the trailing breadcrumb the user is on. */\nconst BreadcrumbsPage = ({\n className,\n ...rest\n}: React.ComponentProps<'span'>) => {\n return (\n <span\n aria-current=\"page\"\n className={cn('font-medium text-gray', className)}\n {...rest}\n />\n )\n}\n\n/** Visual separator between breadcrumb items. Defaults to \"/\". */\nconst BreadcrumbsSeparator = ({\n children,\n className,\n ...rest\n}: React.ComponentProps<'span'>) => {\n return (\n <span aria-hidden=\"true\" className={cn(className)} {...rest}>\n {children ?? '/'}\n </span>\n )\n}\n\nexport {\n Breadcrumbs,\n BreadcrumbsList,\n BreadcrumbsItem,\n BreadcrumbsLink,\n BreadcrumbsPage,\n BreadcrumbsSeparator,\n}\n"],"mappings":";;;;;;AAIA,MAAM,eAAe,EACnB,WACA,cAAc,YAAY,cAC1B,GAAG,WAC8B;CACjC,OAAO,oBAAC,OAAD;EAAK,cAAY;EAAW,WAAW,GAAG,SAAS;EAAG,GAAI;CAAO,CAAA;AAC1E;AAEA,MAAM,mBAAmB,EACvB,WACA,GAAG,WAC6B;CAChC,OACE,oBAAC,MAAD;EACE,WAAW,GACT,+DACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAEA,MAAM,mBAAmB,EACvB,WACA,GAAG,WAC6B;CAChC,OAAO,oBAAC,MAAD;EAAI,WAAW,GAAG,6BAA6B,SAAS;EAAG,GAAI;CAAO,CAAA;AAC/E;;;;;;AAOA,MAAM,mBAAmB,EACvB,WACA,QACA,GAAG,WACgC;CACnC,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WACL,EACE,WAAW,GACT,8HACA,SACF,EACF,GACA,IACF;CACF,CAAC;AACH;;AAGA,MAAM,mBAAmB,EACvB,WACA,GAAG,WAC+B;CAClC,OACE,oBAAC,QAAD;EACE,gBAAa;EACb,WAAW,GAAG,yBAAyB,SAAS;EAChD,GAAI;CACL,CAAA;AAEL;;AAGA,MAAM,wBAAwB,EAC5B,UACA,WACA,GAAG,WAC+B;CAClC,OACE,oBAAC,QAAD;EAAM,eAAY;EAAO,WAAW,GAAG,SAAS;EAAG,GAAI;YACpD,YAAY;CACT,CAAA;AAEV"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
4
|
+
let react = require("react");
|
|
5
|
+
react = require_chunk.__toESM(react);
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let class_variance_authority = require("class-variance-authority");
|
|
8
|
+
let _base_ui_react_merge_props = require("@base-ui/react/merge-props");
|
|
9
|
+
let _base_ui_react_use_render = require("@base-ui/react/use-render");
|
|
10
|
+
let cnfast = require("cnfast");
|
|
11
|
+
//#region src/components/bubble.tsx
|
|
12
|
+
function BubbleGroup({ className, ...props }) {
|
|
13
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
14
|
+
"data-slot": "bubble-group",
|
|
15
|
+
className: (0, cnfast.cn)("flex min-w-0 flex-col gap-2", className),
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
const bubbleVariants = (0, class_variance_authority.cva)("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full", {
|
|
20
|
+
variants: { variant: {
|
|
21
|
+
default: "*:data-[slot=bubble-content]:bg-spark-9 *:data-[slot=bubble-content]:text-spark-contrast [&>[data-slot=bubble-content]:is(button,a):hover]:bg-spark-10",
|
|
22
|
+
secondary: "*:data-[slot=bubble-content]:bg-gray-2 *:data-[slot=bubble-content]:text-gray [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a3",
|
|
23
|
+
muted: "*:data-[slot=bubble-content]:bg-gray-a3 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a4",
|
|
24
|
+
tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--spark-9)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-gray dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--spark-9)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--spark-9)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--spark-9)_0.35_calc(c*0.5)_h)]",
|
|
25
|
+
outline: "*:data-[slot=bubble-content]:border-gray *:data-[slot=bubble-content]:bg-gray-2 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a3 [&>[data-slot=bubble-content]:is(button,a):hover]:text-gray dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a4",
|
|
26
|
+
ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a3 [&>[data-slot=bubble-content]:is(button,a):hover]:text-gray dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a2",
|
|
27
|
+
destructive: "*:data-[slot=bubble-content]:bg-red-a3 *:data-[slot=bubble-content]:text-error dark:*:data-[slot=bubble-content]:bg-red-a4 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-red-a4 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-red-a5"
|
|
28
|
+
} },
|
|
29
|
+
defaultVariants: { variant: "default" }
|
|
30
|
+
});
|
|
31
|
+
function Bubble({ variant = "default", align = "start", className, ...props }) {
|
|
32
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
33
|
+
"data-slot": "bubble",
|
|
34
|
+
"data-variant": variant,
|
|
35
|
+
"data-align": align,
|
|
36
|
+
className: (0, cnfast.cn)(bubbleVariants({ variant }), className),
|
|
37
|
+
...props
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
function BubbleContent({ className, render, ...props }) {
|
|
41
|
+
return (0, _base_ui_react_use_render.useRender)({
|
|
42
|
+
defaultTagName: "div",
|
|
43
|
+
render,
|
|
44
|
+
props: (0, _base_ui_react_merge_props.mergeProps)({
|
|
45
|
+
"data-slot": "bubble-content",
|
|
46
|
+
className: (0, cnfast.cn)("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-spark-a7 [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-spark-a7/50", className)
|
|
47
|
+
}, props)
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
const bubbleReactionsVariants = (0, class_variance_authority.cva)("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-gray-3 px-1.5 py-0.5 text-sm ring-3 ring-gray-2 has-[button]:p-0", {
|
|
51
|
+
variants: {
|
|
52
|
+
side: {
|
|
53
|
+
top: "top-0 -translate-y-3/4",
|
|
54
|
+
bottom: "bottom-0 translate-y-3/4"
|
|
55
|
+
},
|
|
56
|
+
align: {
|
|
57
|
+
start: "left-3",
|
|
58
|
+
end: "right-3"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
defaultVariants: {
|
|
62
|
+
side: "bottom",
|
|
63
|
+
align: "end"
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
function BubbleReactions({ side = "bottom", align = "end", className, ...props }) {
|
|
67
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
68
|
+
"data-slot": "bubble-reactions",
|
|
69
|
+
"data-align": align,
|
|
70
|
+
"data-side": side,
|
|
71
|
+
className: (0, cnfast.cn)(bubbleReactionsVariants({
|
|
72
|
+
side,
|
|
73
|
+
align
|
|
74
|
+
}), className),
|
|
75
|
+
...props
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
exports.Bubble = Bubble;
|
|
80
|
+
exports.BubbleContent = BubbleContent;
|
|
81
|
+
exports.BubbleGroup = BubbleGroup;
|
|
82
|
+
exports.BubbleReactions = BubbleReactions;
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=bubble.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bubble.cjs","names":[],"sources":["../../src/components/bubble.tsx"],"sourcesContent":["import { mergeProps } from '@base-ui/react/merge-props'\nimport { useRender } from '@base-ui/react/use-render'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\n\nfunction BubbleGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"bubble-group\"\n className={cn('flex min-w-0 flex-col gap-2', className)}\n {...props}\n />\n )\n}\n\n// Each variant paints the nested [data-slot=bubble-content] surface (and its\n// interactive hover when the content is a button/anchor). Colours read spark\n// scales: accent (spark-9) for the sender's own bubbles, the neutral gray scale\n// for received/muted, and the red scale for destructive. `tinted` derives a\n// soft accent tint via oklch(from var(--spark-9) …) so it tracks the accent knob.\nconst bubbleVariants = cva(\n 'group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full',\n {\n variants: {\n variant: {\n default:\n '*:data-[slot=bubble-content]:bg-spark-9 *:data-[slot=bubble-content]:text-spark-contrast [&>[data-slot=bubble-content]:is(button,a):hover]:bg-spark-10',\n secondary:\n '*:data-[slot=bubble-content]:bg-gray-2 *:data-[slot=bubble-content]:text-gray [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a3',\n muted:\n '*:data-[slot=bubble-content]:bg-gray-a3 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a4',\n tinted:\n '*:data-[slot=bubble-content]:bg-[oklch(from_var(--spark-9)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-gray dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--spark-9)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--spark-9)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--spark-9)_0.35_calc(c*0.5)_h)]',\n outline:\n '*:data-[slot=bubble-content]:border-gray *:data-[slot=bubble-content]:bg-gray-2 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a3 [&>[data-slot=bubble-content]:is(button,a):hover]:text-gray dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a4',\n ghost:\n 'border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a3 [&>[data-slot=bubble-content]:is(button,a):hover]:text-gray dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a2',\n destructive:\n '*:data-[slot=bubble-content]:bg-red-a3 *:data-[slot=bubble-content]:text-error dark:*:data-[slot=bubble-content]:bg-red-a4 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-red-a4 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-red-a5',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n)\n\nfunction Bubble({\n variant = 'default',\n align = 'start',\n className,\n ...props\n}: React.ComponentProps<'div'> &\n VariantProps<typeof bubbleVariants> & {\n align?: 'start' | 'end'\n }) {\n return (\n <div\n data-slot=\"bubble\"\n data-variant={variant}\n data-align={align}\n className={cn(bubbleVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\n// `render` replaces radix `asChild`: pass an element (button, anchor, …) to make\n// the surface interactive; Base UI's useRender merges props onto it.\nfunction BubbleContent({\n className,\n render,\n ...props\n}: useRender.ComponentProps<'div'>) {\n return useRender({\n defaultTagName: 'div',\n render,\n props: mergeProps<'div'>(\n {\n 'data-slot': 'bubble-content',\n className: cn(\n 'w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-spark-a7 [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-spark-a7/50',\n className,\n ),\n } as React.ComponentProps<'div'>,\n props,\n ),\n })\n}\n\nconst bubbleReactionsVariants = cva(\n 'absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-gray-3 px-1.5 py-0.5 text-sm ring-3 ring-gray-2 has-[button]:p-0',\n {\n variants: {\n side: {\n top: 'top-0 -translate-y-3/4',\n bottom: 'bottom-0 translate-y-3/4',\n },\n align: {\n start: 'left-3',\n end: 'right-3',\n },\n },\n defaultVariants: {\n side: 'bottom',\n align: 'end',\n },\n },\n)\n\nfunction BubbleReactions({\n side = 'bottom',\n align = 'end',\n className,\n ...props\n}: React.ComponentProps<'div'> & {\n align?: 'start' | 'end'\n side?: 'top' | 'bottom'\n}) {\n return (\n <div\n data-slot=\"bubble-reactions\"\n data-align={align}\n data-side={side}\n className={cn(bubbleReactionsVariants({ side, align }), className)}\n {...props}\n />\n )\n}\n\nexport { Bubble, BubbleContent, BubbleGroup, BubbleReactions }\n"],"mappings":";;;;;;;;;;;AAMA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,YAAA,GAAA,OAAA,IAAc,+BAA+B,SAAS;EACtD,GAAI;CACL,CAAA;AAEL;AAOA,MAAM,kBAAA,GAAA,yBAAA,KACJ,yKACA;CACE,UAAU,EACR,SAAS;EACP,SACE;EACF,WACE;EACF,OACE;EACF,QACE;EACF,SACE;EACF,OACE;EACF,aACE;CACJ,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CACF;AAEA,SAAS,OAAO,EACd,UAAU,WACV,QAAQ,SACR,WACA,GAAG,SAIA;CACH,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,gBAAc;EACd,cAAY;EACZ,YAAA,GAAA,OAAA,IAAc,eAAe,EAAE,QAAQ,CAAC,GAAG,SAAS;EACpD,GAAI;CACL,CAAA;AAEL;AAIA,SAAS,cAAc,EACrB,WACA,QACA,GAAG,SAC+B;CAClC,QAAA,GAAA,0BAAA,WAAiB;EACf,gBAAgB;EAChB;EACA,QAAA,GAAA,2BAAA,YACE;GACE,aAAa;GACb,YAAA,GAAA,OAAA,IACE,qWACA,SACF;EACF,GACA,KACF;CACF,CAAC;AACH;AAEA,MAAM,2BAAA,GAAA,yBAAA,KACJ,wJACA;CACE,UAAU;EACR,MAAM;GACJ,KAAK;GACL,QAAQ;EACV;EACA,OAAO;GACL,OAAO;GACP,KAAK;EACP;CACF;CACA,iBAAiB;EACf,MAAM;EACN,OAAO;CACT;AACF,CACF;AAEA,SAAS,gBAAgB,EACvB,OAAO,UACP,QAAQ,OACR,WACA,GAAG,SAIF;CACD,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,cAAY;EACZ,aAAW;EACX,YAAA,GAAA,OAAA,IAAc,wBAAwB;GAAE;GAAM;EAAM,CAAC,GAAG,SAAS;EACjE,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
+
|
|
7
|
+
//#region src/components/bubble.d.ts
|
|
8
|
+
declare function BubbleGroup({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: React$1.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const bubbleVariants: (props?: ({
|
|
13
|
+
variant?: "default" | "secondary" | "muted" | "tinted" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
+
declare function Bubble({
|
|
16
|
+
variant,
|
|
17
|
+
align,
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}: React$1.ComponentProps<'div'> & VariantProps<typeof bubbleVariants> & {
|
|
21
|
+
align?: 'start' | 'end';
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function BubbleContent({
|
|
24
|
+
className,
|
|
25
|
+
render,
|
|
26
|
+
...props
|
|
27
|
+
}: useRender.ComponentProps<'div'>): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
|
|
28
|
+
declare function BubbleReactions({
|
|
29
|
+
side,
|
|
30
|
+
align,
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: React$1.ComponentProps<'div'> & {
|
|
34
|
+
align?: 'start' | 'end';
|
|
35
|
+
side?: 'top' | 'bottom';
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Bubble, BubbleContent, BubbleGroup, BubbleReactions };
|
|
39
|
+
//# sourceMappingURL=bubble.d.cts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
+
|
|
7
|
+
//#region src/components/bubble.d.ts
|
|
8
|
+
declare function BubbleGroup({
|
|
9
|
+
className,
|
|
10
|
+
...props
|
|
11
|
+
}: React$1.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const bubbleVariants: (props?: ({
|
|
13
|
+
variant?: "default" | "secondary" | "muted" | "tinted" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
+
declare function Bubble({
|
|
16
|
+
variant,
|
|
17
|
+
align,
|
|
18
|
+
className,
|
|
19
|
+
...props
|
|
20
|
+
}: React$1.ComponentProps<'div'> & VariantProps<typeof bubbleVariants> & {
|
|
21
|
+
align?: 'start' | 'end';
|
|
22
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function BubbleContent({
|
|
24
|
+
className,
|
|
25
|
+
render,
|
|
26
|
+
...props
|
|
27
|
+
}: useRender.ComponentProps<'div'>): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
|
|
28
|
+
declare function BubbleReactions({
|
|
29
|
+
side,
|
|
30
|
+
align,
|
|
31
|
+
className,
|
|
32
|
+
...props
|
|
33
|
+
}: React$1.ComponentProps<'div'> & {
|
|
34
|
+
align?: 'start' | 'end';
|
|
35
|
+
side?: 'top' | 'bottom';
|
|
36
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
//#endregion
|
|
38
|
+
export { Bubble, BubbleContent, BubbleGroup, BubbleReactions };
|
|
39
|
+
//# sourceMappingURL=bubble.d.ts.map
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { cva } from "class-variance-authority";
|
|
6
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
7
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
8
|
+
//#region src/components/bubble.tsx
|
|
9
|
+
function BubbleGroup({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx("div", {
|
|
11
|
+
"data-slot": "bubble-group",
|
|
12
|
+
className: cn("flex min-w-0 flex-col gap-2", className),
|
|
13
|
+
...props
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
const bubbleVariants = cva("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full", {
|
|
17
|
+
variants: { variant: {
|
|
18
|
+
default: "*:data-[slot=bubble-content]:bg-spark-9 *:data-[slot=bubble-content]:text-spark-contrast [&>[data-slot=bubble-content]:is(button,a):hover]:bg-spark-10",
|
|
19
|
+
secondary: "*:data-[slot=bubble-content]:bg-gray-2 *:data-[slot=bubble-content]:text-gray [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a3",
|
|
20
|
+
muted: "*:data-[slot=bubble-content]:bg-gray-a3 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a4",
|
|
21
|
+
tinted: "*:data-[slot=bubble-content]:bg-[oklch(from_var(--spark-9)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-gray dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--spark-9)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--spark-9)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--spark-9)_0.35_calc(c*0.5)_h)]",
|
|
22
|
+
outline: "*:data-[slot=bubble-content]:border-gray *:data-[slot=bubble-content]:bg-gray-2 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a3 [&>[data-slot=bubble-content]:is(button,a):hover]:text-gray dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a4",
|
|
23
|
+
ghost: "border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a3 [&>[data-slot=bubble-content]:is(button,a):hover]:text-gray dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a2",
|
|
24
|
+
destructive: "*:data-[slot=bubble-content]:bg-red-a3 *:data-[slot=bubble-content]:text-error dark:*:data-[slot=bubble-content]:bg-red-a4 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-red-a4 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-red-a5"
|
|
25
|
+
} },
|
|
26
|
+
defaultVariants: { variant: "default" }
|
|
27
|
+
});
|
|
28
|
+
function Bubble({ variant = "default", align = "start", className, ...props }) {
|
|
29
|
+
return /* @__PURE__ */ jsx("div", {
|
|
30
|
+
"data-slot": "bubble",
|
|
31
|
+
"data-variant": variant,
|
|
32
|
+
"data-align": align,
|
|
33
|
+
className: cn(bubbleVariants({ variant }), className),
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function BubbleContent({ className, render, ...props }) {
|
|
38
|
+
return useRender({
|
|
39
|
+
defaultTagName: "div",
|
|
40
|
+
render,
|
|
41
|
+
props: mergeProps({
|
|
42
|
+
"data-slot": "bubble-content",
|
|
43
|
+
className: cn("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-spark-a7 [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-spark-a7/50", className)
|
|
44
|
+
}, props)
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
const bubbleReactionsVariants = cva("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-gray-3 px-1.5 py-0.5 text-sm ring-3 ring-gray-2 has-[button]:p-0", {
|
|
48
|
+
variants: {
|
|
49
|
+
side: {
|
|
50
|
+
top: "top-0 -translate-y-3/4",
|
|
51
|
+
bottom: "bottom-0 translate-y-3/4"
|
|
52
|
+
},
|
|
53
|
+
align: {
|
|
54
|
+
start: "left-3",
|
|
55
|
+
end: "right-3"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
defaultVariants: {
|
|
59
|
+
side: "bottom",
|
|
60
|
+
align: "end"
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
function BubbleReactions({ side = "bottom", align = "end", className, ...props }) {
|
|
64
|
+
return /* @__PURE__ */ jsx("div", {
|
|
65
|
+
"data-slot": "bubble-reactions",
|
|
66
|
+
"data-align": align,
|
|
67
|
+
"data-side": side,
|
|
68
|
+
className: cn(bubbleReactionsVariants({
|
|
69
|
+
side,
|
|
70
|
+
align
|
|
71
|
+
}), className),
|
|
72
|
+
...props
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { Bubble, BubbleContent, BubbleGroup, BubbleReactions };
|
|
77
|
+
|
|
78
|
+
//# sourceMappingURL=bubble.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bubble.js","names":[],"sources":["../../src/components/bubble.tsx"],"sourcesContent":["import { mergeProps } from '@base-ui/react/merge-props'\nimport { useRender } from '@base-ui/react/use-render'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\n\nfunction BubbleGroup({ className, ...props }: React.ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"bubble-group\"\n className={cn('flex min-w-0 flex-col gap-2', className)}\n {...props}\n />\n )\n}\n\n// Each variant paints the nested [data-slot=bubble-content] surface (and its\n// interactive hover when the content is a button/anchor). Colours read spark\n// scales: accent (spark-9) for the sender's own bubbles, the neutral gray scale\n// for received/muted, and the red scale for destructive. `tinted` derives a\n// soft accent tint via oklch(from var(--spark-9) …) so it tracks the accent knob.\nconst bubbleVariants = cva(\n 'group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full',\n {\n variants: {\n variant: {\n default:\n '*:data-[slot=bubble-content]:bg-spark-9 *:data-[slot=bubble-content]:text-spark-contrast [&>[data-slot=bubble-content]:is(button,a):hover]:bg-spark-10',\n secondary:\n '*:data-[slot=bubble-content]:bg-gray-2 *:data-[slot=bubble-content]:text-gray [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a3',\n muted:\n '*:data-[slot=bubble-content]:bg-gray-a3 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a4',\n tinted:\n '*:data-[slot=bubble-content]:bg-[oklch(from_var(--spark-9)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-gray dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--spark-9)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--spark-9)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--spark-9)_0.35_calc(c*0.5)_h)]',\n outline:\n '*:data-[slot=bubble-content]:border-gray *:data-[slot=bubble-content]:bg-gray-2 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a3 [&>[data-slot=bubble-content]:is(button,a):hover]:text-gray dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a4',\n ghost:\n 'border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a3 [&>[data-slot=bubble-content]:is(button,a):hover]:text-gray dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-gray-a2',\n destructive:\n '*:data-[slot=bubble-content]:bg-red-a3 *:data-[slot=bubble-content]:text-error dark:*:data-[slot=bubble-content]:bg-red-a4 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-red-a4 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-red-a5',\n },\n },\n defaultVariants: {\n variant: 'default',\n },\n },\n)\n\nfunction Bubble({\n variant = 'default',\n align = 'start',\n className,\n ...props\n}: React.ComponentProps<'div'> &\n VariantProps<typeof bubbleVariants> & {\n align?: 'start' | 'end'\n }) {\n return (\n <div\n data-slot=\"bubble\"\n data-variant={variant}\n data-align={align}\n className={cn(bubbleVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\n// `render` replaces radix `asChild`: pass an element (button, anchor, …) to make\n// the surface interactive; Base UI's useRender merges props onto it.\nfunction BubbleContent({\n className,\n render,\n ...props\n}: useRender.ComponentProps<'div'>) {\n return useRender({\n defaultTagName: 'div',\n render,\n props: mergeProps<'div'>(\n {\n 'data-slot': 'bubble-content',\n className: cn(\n 'w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-spark-a7 [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-spark-a7/50',\n className,\n ),\n } as React.ComponentProps<'div'>,\n props,\n ),\n })\n}\n\nconst bubbleReactionsVariants = cva(\n 'absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-gray-3 px-1.5 py-0.5 text-sm ring-3 ring-gray-2 has-[button]:p-0',\n {\n variants: {\n side: {\n top: 'top-0 -translate-y-3/4',\n bottom: 'bottom-0 translate-y-3/4',\n },\n align: {\n start: 'left-3',\n end: 'right-3',\n },\n },\n defaultVariants: {\n side: 'bottom',\n align: 'end',\n },\n },\n)\n\nfunction BubbleReactions({\n side = 'bottom',\n align = 'end',\n className,\n ...props\n}: React.ComponentProps<'div'> & {\n align?: 'start' | 'end'\n side?: 'top' | 'bottom'\n}) {\n return (\n <div\n data-slot=\"bubble-reactions\"\n data-align={align}\n data-side={side}\n className={cn(bubbleReactionsVariants({ side, align }), className)}\n {...props}\n />\n )\n}\n\nexport { Bubble, BubbleContent, BubbleGroup, BubbleReactions }\n"],"mappings":";;;;;;;;AAMA,SAAS,YAAY,EAAE,WAAW,GAAG,SAAsC;CACzE,OACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,+BAA+B,SAAS;EACtD,GAAI;CACL,CAAA;AAEL;AAOA,MAAM,iBAAiB,IACrB,yKACA;CACE,UAAU,EACR,SAAS;EACP,SACE;EACF,WACE;EACF,OACE;EACF,QACE;EACF,SACE;EACF,OACE;EACF,aACE;CACJ,EACF;CACA,iBAAiB,EACf,SAAS,UACX;AACF,CACF;AAEA,SAAS,OAAO,EACd,UAAU,WACV,QAAQ,SACR,WACA,GAAG,SAIA;CACH,OACE,oBAAC,OAAD;EACE,aAAU;EACV,gBAAc;EACd,cAAY;EACZ,WAAW,GAAG,eAAe,EAAE,QAAQ,CAAC,GAAG,SAAS;EACpD,GAAI;CACL,CAAA;AAEL;AAIA,SAAS,cAAc,EACrB,WACA,QACA,GAAG,SAC+B;CAClC,OAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WACL;GACE,aAAa;GACb,WAAW,GACT,qWACA,SACF;EACF,GACA,KACF;CACF,CAAC;AACH;AAEA,MAAM,0BAA0B,IAC9B,wJACA;CACE,UAAU;EACR,MAAM;GACJ,KAAK;GACL,QAAQ;EACV;EACA,OAAO;GACL,OAAO;GACP,KAAK;EACP;CACF;CACA,iBAAiB;EACf,MAAM;EACN,OAAO;CACT;AACF,CACF;AAEA,SAAS,gBAAgB,EACvB,OAAO,UACP,QAAQ,OACR,WACA,GAAG,SAIF;CACD,OACE,oBAAC,OAAD;EACE,aAAU;EACV,cAAY;EACZ,aAAW;EACX,WAAW,GAAG,wBAAwB;GAAE;GAAM;EAAM,CAAC,GAAG,SAAS;EACjE,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
5
|
+
const require_lib_accent_colors = require("../lib/accent-colors.cjs");
|
|
6
|
+
let react = require("react");
|
|
7
|
+
react = require_chunk.__toESM(react);
|
|
8
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
|
+
let _base_ui_react_button = require("@base-ui/react/button");
|
|
10
|
+
let cnfast = require("cnfast");
|
|
11
|
+
//#region src/components/button-group.tsx
|
|
12
|
+
const buttonGroupRecipe = "bg-(--spark-style-bg,var(--spark-9)) text-(--spark-style-fg,var(--spark-contrast)) shadow-[inset_0_0_0_var(--spark-style-border-width,1px)_var(--spark-style-border,transparent)]";
|
|
13
|
+
function buttonGroupSizeClasses(size) {
|
|
14
|
+
return size === "small" ? "h-9 text-sm [&_svg:not([class*=size-])]:size-4" : "h-10 text-base [&_svg:not([class*=size-])]:size-5";
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A layout group, not a toolbar: segments are independent tab stops in DOM
|
|
18
|
+
* order (no roving tabindex). Pass `aria-label` when segments don't
|
|
19
|
+
* self-describe (e.g. icon-only segments). For a fully-rounded status pill,
|
|
20
|
+
* use `ButtonGroupPill` instead.
|
|
21
|
+
*/
|
|
22
|
+
const ButtonGroup = react.forwardRef(function ButtonGroup({ className, styleVariant = "soft", color = "neutral", size = "default", ...props }, ref) {
|
|
23
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
24
|
+
"data-slot": "button-group",
|
|
25
|
+
role: "group",
|
|
26
|
+
"data-style": styleVariant,
|
|
27
|
+
"data-accent-color": require_lib_accent_colors.accentByColor[color],
|
|
28
|
+
className: (0, cnfast.cn)("isolate inline-flex items-stretch overflow-hidden rounded-[max(var(--spark-rounded-md),var(--spark-rounded-full))]", buttonGroupSizeClasses(size), buttonGroupRecipe, className),
|
|
29
|
+
ref,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
});
|
|
33
|
+
ButtonGroup.displayName = "ButtonGroup";
|
|
34
|
+
const ButtonGroupButton = react.forwardRef(function ButtonGroupButton({ className, render, nativeButton, ...props }, ref) {
|
|
35
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_button.Button, {
|
|
36
|
+
"data-slot": "button-group-button",
|
|
37
|
+
nativeButton: nativeButton ?? render === void 0,
|
|
38
|
+
render,
|
|
39
|
+
className: (0, cnfast.cn)("inline-flex cursor-pointer items-center gap-2 px-3 font-medium whitespace-nowrap", "transition-colors hover:bg-(--spark-style-bg-hover) motion-reduce:transition-none", "focus-visible:inset-ring-2 focus-visible:outline-hidden", "disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50", "[&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
40
|
+
ref,
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
});
|
|
44
|
+
ButtonGroupButton.displayName = "ButtonGroupButton";
|
|
45
|
+
const ButtonGroupText = react.forwardRef(function ButtonGroupText({ className, ...props }, ref) {
|
|
46
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
47
|
+
"data-slot": "button-group-text",
|
|
48
|
+
className: (0, cnfast.cn)("inline-flex items-center gap-2 px-3 font-medium whitespace-nowrap select-none", "[&_svg]:pointer-events-none [&_svg]:shrink-0", className),
|
|
49
|
+
ref,
|
|
50
|
+
...props
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
ButtonGroupText.displayName = "ButtonGroupText";
|
|
54
|
+
const ButtonGroupSeparator = react.forwardRef(function ButtonGroupSeparator({ className, ...props }, ref) {
|
|
55
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
56
|
+
"data-slot": "button-group-separator",
|
|
57
|
+
"aria-hidden": "true",
|
|
58
|
+
className: (0, cnfast.cn)("h-4 w-px shrink-0 self-center bg-current opacity-25", className),
|
|
59
|
+
ref,
|
|
60
|
+
...props
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
ButtonGroupSeparator.displayName = "ButtonGroupSeparator";
|
|
64
|
+
//#endregion
|
|
65
|
+
exports.ButtonGroup = ButtonGroup;
|
|
66
|
+
exports.ButtonGroupButton = ButtonGroupButton;
|
|
67
|
+
exports.ButtonGroupSeparator = ButtonGroupSeparator;
|
|
68
|
+
exports.ButtonGroupText = ButtonGroupText;
|
|
69
|
+
exports.buttonGroupRecipe = buttonGroupRecipe;
|
|
70
|
+
exports.buttonGroupSizeClasses = buttonGroupSizeClasses;
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=button-group.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button-group.cjs","names":["React","accentByColor","ButtonPrimitive"],"sources":["../../src/components/button-group.tsx"],"sourcesContent":["'use client'\n\nimport { Button as ButtonPrimitive } from '@base-ui/react/button'\nimport * as React from 'react'\nimport { accentByColor } from '../lib/accent-colors'\nimport type { SparkAccentColor } from '../lib/accent-colors'\nimport type { SparkStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\n\n// Button's chrome recipe (`buttonRecipe` in button.tsx), minus its `hover:`\n// half -- hover belongs on segments, not the shared group chrome. Shared with\n// button-group-pill.tsx.\nexport const buttonGroupRecipe =\n 'bg-(--spark-style-bg,var(--spark-9)) text-(--spark-style-fg,var(--spark-contrast)) shadow-[inset_0_0_0_var(--spark-style-border-width,1px)_var(--spark-style-border,transparent)]'\n\nexport function buttonGroupSizeClasses(size: 'small' | 'default') {\n return size === 'small'\n ? 'h-9 text-sm [&_svg:not([class*=size-])]:size-4'\n : 'h-10 text-base [&_svg:not([class*=size-])]:size-5'\n}\n\ninterface ButtonGroupProps extends React.HTMLAttributes<HTMLDivElement> {\n styleVariant?: SparkStyle\n color?: SparkAccentColor\n size?: 'small' | 'default'\n}\n\n/**\n * A layout group, not a toolbar: segments are independent tab stops in DOM\n * order (no roving tabindex). Pass `aria-label` when segments don't\n * self-describe (e.g. icon-only segments). For a fully-rounded status pill,\n * use `ButtonGroupPill` instead.\n */\nconst ButtonGroup = React.forwardRef<HTMLDivElement, ButtonGroupProps>(\n function ButtonGroup(\n {\n className,\n styleVariant = 'soft',\n color = 'neutral',\n size = 'default',\n ...props\n },\n ref,\n ) {\n return (\n <div\n data-slot=\"button-group\"\n role=\"group\"\n data-style={styleVariant}\n data-accent-color={accentByColor[color]}\n className={cn(\n 'isolate inline-flex items-stretch overflow-hidden rounded-[max(var(--spark-rounded-md),var(--spark-rounded-full))]',\n buttonGroupSizeClasses(size),\n buttonGroupRecipe,\n className,\n )}\n ref={ref}\n {...props}\n />\n )\n },\n)\n\nButtonGroup.displayName = 'ButtonGroup'\n\ninterface ButtonGroupButtonProps extends Omit<\n React.ComponentProps<typeof ButtonPrimitive>,\n 'ref'\n> {}\n\nconst ButtonGroupButton = React.forwardRef<\n HTMLButtonElement,\n ButtonGroupButtonProps\n>(function ButtonGroupButton(\n { className, render, nativeButton, ...props },\n ref,\n) {\n return (\n <ButtonPrimitive\n data-slot=\"button-group-button\"\n nativeButton={nativeButton ?? render === undefined}\n render={render}\n className={cn(\n 'inline-flex cursor-pointer items-center gap-2 px-3 font-medium whitespace-nowrap',\n 'transition-colors hover:bg-(--spark-style-bg-hover) motion-reduce:transition-none',\n 'focus-visible:inset-ring-2 focus-visible:outline-hidden',\n 'disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n className,\n )}\n ref={ref}\n {...props}\n />\n )\n})\n\nButtonGroupButton.displayName = 'ButtonGroupButton'\n\nconst ButtonGroupText = React.forwardRef<\n HTMLSpanElement,\n React.HTMLAttributes<HTMLSpanElement>\n>(function ButtonGroupText({ className, ...props }, ref) {\n return (\n <span\n data-slot=\"button-group-text\"\n className={cn(\n 'inline-flex items-center gap-2 px-3 font-medium whitespace-nowrap select-none',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n className,\n )}\n ref={ref}\n {...props}\n />\n )\n})\n\nButtonGroupText.displayName = 'ButtonGroupText'\n\nconst ButtonGroupSeparator = React.forwardRef<\n HTMLDivElement,\n React.HTMLAttributes<HTMLDivElement>\n>(function ButtonGroupSeparator({ className, ...props }, ref) {\n return (\n <div\n data-slot=\"button-group-separator\"\n aria-hidden=\"true\"\n className={cn(\n 'h-4 w-px shrink-0 self-center bg-current opacity-25',\n className,\n )}\n ref={ref}\n {...props}\n />\n )\n})\n\nButtonGroupSeparator.displayName = 'ButtonGroupSeparator'\n\nexport { ButtonGroup, ButtonGroupButton, ButtonGroupSeparator, ButtonGroupText }\nexport type { ButtonGroupProps, ButtonGroupButtonProps }\n"],"mappings":";;;;;;;;;;;AAYA,MAAa,oBACX;AAEF,SAAgB,uBAAuB,MAA2B;CAChE,OAAO,SAAS,UACZ,mDACA;AACN;;;;;;;AAcA,MAAM,cAAcA,MAAM,WACxB,SAAS,YACP,EACE,WACA,eAAe,QACf,QAAQ,WACR,OAAO,WACP,GAAG,SAEL,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,MAAK;EACL,cAAY;EACZ,qBAAmBC,0BAAAA,cAAc;EACjC,YAAA,GAAA,OAAA,IACE,sHACA,uBAAuB,IAAI,GAC3B,mBACA,SACF;EACK;EACL,GAAI;CACL,CAAA;AAEL,CACF;AAEA,YAAY,cAAc;AAO1B,MAAM,oBAAoBD,MAAM,WAG9B,SAAS,kBACT,EAAE,WAAW,QAAQ,cAAc,GAAG,SACtC,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,KAACE,sBAAAA,QAAD;EACE,aAAU;EACV,cAAc,gBAAgB,WAAW,KAAA;EACjC;EACR,YAAA,GAAA,OAAA,IACE,oFACA,qFACA,2DACA,+GACA,gDACA,SACF;EACK;EACL,GAAI;CACL,CAAA;AAEL,CAAC;AAED,kBAAkB,cAAc;AAEhC,MAAM,kBAAkBF,MAAM,WAG5B,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACvD,OACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,aAAU;EACV,YAAA,GAAA,OAAA,IACE,iFACA,gDACA,SACF;EACK;EACL,GAAI;CACL,CAAA;AAEL,CAAC;AAED,gBAAgB,cAAc;AAE9B,MAAM,uBAAuBA,MAAM,WAGjC,SAAS,qBAAqB,EAAE,WAAW,GAAG,SAAS,KAAK;CAC5D,OACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,eAAY;EACZ,YAAA,GAAA,OAAA,IACE,uDACA,SACF;EACK;EACL,GAAI;CACL,CAAA;AAEL,CAAC;AAED,qBAAqB,cAAc"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { u as SparkStyle } from "../theme-types-8wjgiNA_.cjs";
|
|
4
|
+
import { SparkAccentColor } from "../lib/accent-colors.cjs";
|
|
5
|
+
import * as React$1 from "react";
|
|
6
|
+
import { Button } from "@base-ui/react/button";
|
|
7
|
+
|
|
8
|
+
//#region src/components/button-group.d.ts
|
|
9
|
+
declare const buttonGroupRecipe = "bg-(--spark-style-bg,var(--spark-9)) text-(--spark-style-fg,var(--spark-contrast)) shadow-[inset_0_0_0_var(--spark-style-border-width,1px)_var(--spark-style-border,transparent)]";
|
|
10
|
+
declare function buttonGroupSizeClasses(size: 'small' | 'default'): "h-9 text-sm [&_svg:not([class*=size-])]:size-4" | "h-10 text-base [&_svg:not([class*=size-])]:size-5";
|
|
11
|
+
interface ButtonGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
styleVariant?: SparkStyle;
|
|
13
|
+
color?: SparkAccentColor;
|
|
14
|
+
size?: 'small' | 'default';
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A layout group, not a toolbar: segments are independent tab stops in DOM
|
|
18
|
+
* order (no roving tabindex). Pass `aria-label` when segments don't
|
|
19
|
+
* self-describe (e.g. icon-only segments). For a fully-rounded status pill,
|
|
20
|
+
* use `ButtonGroupPill` instead.
|
|
21
|
+
*/
|
|
22
|
+
declare const ButtonGroup: React$1.ForwardRefExoticComponent<ButtonGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
interface ButtonGroupButtonProps extends Omit<React$1.ComponentProps<typeof Button>, 'ref'> {}
|
|
24
|
+
declare const ButtonGroupButton: React$1.ForwardRefExoticComponent<ButtonGroupButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
25
|
+
declare const ButtonGroupText: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLSpanElement> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
26
|
+
declare const ButtonGroupSeparator: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { ButtonGroup, ButtonGroupButton, type ButtonGroupButtonProps, type ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, buttonGroupRecipe, buttonGroupSizeClasses };
|
|
29
|
+
//# sourceMappingURL=button-group.d.cts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { u as SparkStyle } from "../theme-types-8wjgiNA_.js";
|
|
4
|
+
import { SparkAccentColor } from "../lib/accent-colors.js";
|
|
5
|
+
import * as React$1 from "react";
|
|
6
|
+
import { Button } from "@base-ui/react/button";
|
|
7
|
+
|
|
8
|
+
//#region src/components/button-group.d.ts
|
|
9
|
+
declare const buttonGroupRecipe = "bg-(--spark-style-bg,var(--spark-9)) text-(--spark-style-fg,var(--spark-contrast)) shadow-[inset_0_0_0_var(--spark-style-border-width,1px)_var(--spark-style-border,transparent)]";
|
|
10
|
+
declare function buttonGroupSizeClasses(size: 'small' | 'default'): "h-9 text-sm [&_svg:not([class*=size-])]:size-4" | "h-10 text-base [&_svg:not([class*=size-])]:size-5";
|
|
11
|
+
interface ButtonGroupProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
12
|
+
styleVariant?: SparkStyle;
|
|
13
|
+
color?: SparkAccentColor;
|
|
14
|
+
size?: 'small' | 'default';
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A layout group, not a toolbar: segments are independent tab stops in DOM
|
|
18
|
+
* order (no roving tabindex). Pass `aria-label` when segments don't
|
|
19
|
+
* self-describe (e.g. icon-only segments). For a fully-rounded status pill,
|
|
20
|
+
* use `ButtonGroupPill` instead.
|
|
21
|
+
*/
|
|
22
|
+
declare const ButtonGroup: React$1.ForwardRefExoticComponent<ButtonGroupProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
interface ButtonGroupButtonProps extends Omit<React$1.ComponentProps<typeof Button>, 'ref'> {}
|
|
24
|
+
declare const ButtonGroupButton: React$1.ForwardRefExoticComponent<ButtonGroupButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
25
|
+
declare const ButtonGroupText: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLSpanElement> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
26
|
+
declare const ButtonGroupSeparator: React$1.ForwardRefExoticComponent<React$1.HTMLAttributes<HTMLDivElement> & React$1.RefAttributes<HTMLDivElement>>;
|
|
27
|
+
//#endregion
|
|
28
|
+
export { ButtonGroup, ButtonGroupButton, type ButtonGroupButtonProps, type ButtonGroupProps, ButtonGroupSeparator, ButtonGroupText, buttonGroupRecipe, buttonGroupSizeClasses };
|
|
29
|
+
//# sourceMappingURL=button-group.d.ts.map
|