@epilot/spark-ui 1.0.0-alpha.2 → 1.0.0-alpha.4
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 +7 -1
- package/dist/chunk-aJGBMT86.cjs +29 -0
- package/dist/components/accordion.cjs +57 -0
- package/dist/components/accordion.cjs.map +1 -0
- package/dist/components/accordion.d.cts +45 -0
- package/dist/components/accordion.d.ts +45 -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 +63 -0
- package/dist/components/alert-dialog.d.ts +63 -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 +67 -0
- package/dist/components/attachment.d.ts +67 -0
- package/dist/components/attachment.js +108 -0
- package/dist/components/attachment.js.map +1 -0
- package/dist/components/badge.cjs +20 -0
- package/dist/components/badge.cjs.map +1 -0
- package/dist/components/badge.d.cts +12 -0
- package/dist/components/badge.d.ts +12 -0
- package/dist/components/badge.js +17 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/bar-chart.cjs +520 -0
- package/dist/components/bar-chart.cjs.map +1 -0
- package/dist/components/bar-chart.d.cts +88 -0
- package/dist/components/bar-chart.d.ts +88 -0
- package/dist/components/bar-chart.js +518 -0
- package/dist/components/bar-chart.js.map +1 -0
- package/dist/components/battery-progress-row.cjs +140 -0
- package/dist/components/battery-progress-row.cjs.map +1 -0
- package/dist/components/battery-progress-row.d.cts +78 -0
- package/dist/components/battery-progress-row.d.ts +78 -0
- package/dist/components/battery-progress-row.js +129 -0
- package/dist/components/battery-progress-row.js.map +1 -0
- package/dist/components/breadcrumbs.cjs +65 -0
- package/dist/components/breadcrumbs.cjs.map +1 -0
- package/dist/components/breadcrumbs.d.cts +44 -0
- package/dist/components/breadcrumbs.d.ts +44 -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 +41 -0
- package/dist/components/bubble.d.ts +41 -0
- package/dist/components/bubble.js +78 -0
- package/dist/components/bubble.js.map +1 -0
- package/dist/components/button.cjs +54 -0
- package/dist/components/button.cjs.map +1 -0
- package/dist/components/button.d.cts +42 -0
- package/dist/components/button.d.ts +42 -0
- package/dist/components/button.js +50 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.cjs +58 -0
- package/dist/components/calendar.cjs.map +1 -0
- package/dist/components/calendar.d.cts +17 -0
- package/dist/components/calendar.d.ts +17 -0
- package/dist/components/calendar.js +55 -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 +39 -0
- package/dist/components/callout.d.ts +39 -0
- package/dist/components/callout.js +88 -0
- package/dist/components/callout.js.map +1 -0
- package/dist/components/card.cjs +86 -0
- package/dist/components/card.cjs.map +1 -0
- package/dist/components/card.d.cts +28 -0
- package/dist/components/card.d.ts +28 -0
- package/dist/components/card.js +76 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/chart.cjs +93 -0
- package/dist/components/chart.cjs.map +1 -0
- package/dist/components/chart.d.cts +83 -0
- package/dist/components/chart.d.ts +83 -0
- package/dist/components/chart.js +88 -0
- package/dist/components/chart.js.map +1 -0
- package/dist/components/checkbox.cjs +37 -0
- package/dist/components/checkbox.cjs.map +1 -0
- package/dist/components/checkbox.d.cts +22 -0
- package/dist/components/checkbox.d.ts +22 -0
- package/dist/components/checkbox.js +34 -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 +38 -0
- package/dist/components/circular-gauge.d.ts +38 -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 +71 -0
- package/dist/components/device-card.d.ts +71 -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 +45 -0
- package/dist/components/dialog.d.ts +45 -0
- package/dist/components/dialog.js +103 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/donut-chart.cjs +71 -0
- package/dist/components/donut-chart.cjs.map +1 -0
- package/dist/components/donut-chart.d.cts +22 -0
- package/dist/components/donut-chart.d.ts +22 -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 +46 -0
- package/dist/components/drawer.d.ts +46 -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 +93 -0
- package/dist/components/dropdown-menu.d.ts +93 -0
- package/dist/components/dropdown-menu.js +148 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/empty-state.cjs +35 -0
- package/dist/components/empty-state.cjs.map +1 -0
- package/dist/components/empty-state.d.cts +22 -0
- package/dist/components/empty-state.d.ts +22 -0
- package/dist/components/empty-state.js +33 -0
- package/dist/components/empty-state.js.map +1 -0
- package/dist/components/energy-bar-chart.cjs +24 -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 +81 -0
- package/dist/components/energy-breakdown.cjs.map +1 -0
- package/dist/components/energy-breakdown.d.cts +26 -0
- package/dist/components/energy-breakdown.d.ts +26 -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 +64 -0
- package/dist/components/energy-history-chart.cjs.map +1 -0
- package/dist/components/energy-history-chart.d.cts +66 -0
- package/dist/components/energy-history-chart.d.ts +66 -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 +56 -0
- package/dist/components/feed-in-hero.cjs.map +1 -0
- package/dist/components/feed-in-hero.d.cts +33 -0
- package/dist/components/feed-in-hero.d.ts +33 -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 +104 -0
- package/dist/components/field.d.ts +104 -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 +27 -0
- package/dist/components/icon.d.ts +27 -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 +20 -0
- package/dist/components/info-block.d.ts +20 -0
- package/dist/components/info-block.js +65 -0
- package/dist/components/info-block.js.map +1 -0
- package/dist/components/input-group.cjs +164 -0
- package/dist/components/input-group.cjs.map +1 -0
- package/dist/components/input-group.d.cts +32 -0
- package/dist/components/input-group.d.ts +32 -0
- package/dist/components/input-group.js +158 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input-otp.cjs +113 -0
- package/dist/components/input-otp.cjs.map +1 -0
- package/dist/components/input-otp.d.cts +22 -0
- package/dist/components/input-otp.d.ts +22 -0
- package/dist/components/input-otp.js +111 -0
- package/dist/components/input-otp.js.map +1 -0
- package/dist/components/input.cjs +112 -0
- package/dist/components/input.cjs.map +1 -0
- package/dist/components/input.d.cts +21 -0
- package/dist/components/input.d.ts +21 -0
- package/dist/components/input.js +109 -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 +15 -0
- package/dist/components/layout.cjs.map +1 -0
- package/dist/components/layout.d.cts +12 -0
- package/dist/components/layout.d.ts +13 -0
- package/dist/components/layout.js +14 -0
- package/dist/components/layout.js.map +1 -0
- package/dist/components/line-chart.cjs +350 -0
- package/dist/components/line-chart.cjs.map +1 -0
- package/dist/components/line-chart.d.cts +78 -0
- package/dist/components/line-chart.d.ts +78 -0
- package/dist/components/line-chart.js +347 -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 +72 -0
- package/dist/components/list.d.ts +72 -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 +29 -0
- package/dist/components/marker.d.ts +29 -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 +39 -0
- package/dist/components/message-scroller.d.ts +39 -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 +36 -0
- package/dist/components/message.d.ts +36 -0
- package/dist/components/message.js +52 -0
- package/dist/components/message.js.map +1 -0
- package/dist/components/metering-row.cjs +43 -0
- package/dist/components/metering-row.cjs.map +1 -0
- package/dist/components/metering-row.d.cts +32 -0
- package/dist/components/metering-row.d.ts +32 -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 +87 -0
- package/dist/components/money-saved-block.cjs.map +1 -0
- package/dist/components/money-saved-block.d.cts +57 -0
- package/dist/components/money-saved-block.d.ts +57 -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 +36 -0
- package/dist/components/on-off-button.cjs.map +1 -0
- package/dist/components/on-off-button.d.cts +20 -0
- package/dist/components/on-off-button.d.ts +20 -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 +68 -0
- package/dist/components/onboarding-layout.cjs.map +1 -0
- package/dist/components/onboarding-layout.d.cts +46 -0
- package/dist/components/onboarding-layout.d.ts +46 -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 +26 -0
- package/dist/components/page-header.d.ts +26 -0
- package/dist/components/page-header.js +44 -0
- package/dist/components/page-header.js.map +1 -0
- package/dist/components/page-spinner.cjs +19 -0
- package/dist/components/page-spinner.cjs.map +1 -0
- package/dist/components/page-spinner.d.cts +14 -0
- package/dist/components/page-spinner.d.ts +14 -0
- package/dist/components/page-spinner.js +17 -0
- package/dist/components/page-spinner.js.map +1 -0
- package/dist/components/period-tabs.cjs +79 -0
- package/dist/components/period-tabs.cjs.map +1 -0
- package/dist/components/period-tabs.d.cts +51 -0
- package/dist/components/period-tabs.d.ts +51 -0
- package/dist/components/period-tabs.js +73 -0
- package/dist/components/period-tabs.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 +29 -0
- package/dist/components/popover.d.ts +29 -0
- package/dist/components/popover.js +56 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/power-history-chart.cjs +335 -0
- package/dist/components/power-history-chart.cjs.map +1 -0
- package/dist/components/power-history-chart.d.cts +63 -0
- package/dist/components/power-history-chart.d.ts +63 -0
- package/dist/components/power-history-chart.js +332 -0
- package/dist/components/power-history-chart.js.map +1 -0
- package/dist/components/power-history.cjs +115 -0
- package/dist/components/power-history.cjs.map +1 -0
- package/dist/components/power-history.d.cts +42 -0
- package/dist/components/power-history.d.ts +43 -0
- package/dist/components/power-history.js +114 -0
- package/dist/components/power-history.js.map +1 -0
- package/dist/components/power-network.cjs +530 -0
- package/dist/components/power-network.cjs.map +1 -0
- package/dist/components/power-network.d.cts +77 -0
- package/dist/components/power-network.d.ts +77 -0
- package/dist/components/power-network.js +523 -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 +69 -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 +65 -0
- package/dist/components/radio-card-group.js.map +1 -0
- package/dist/components/radio.cjs +34 -0
- package/dist/components/radio.cjs.map +1 -0
- package/dist/components/radio.d.cts +21 -0
- package/dist/components/radio.d.ts +21 -0
- package/dist/components/radio.js +30 -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 +29 -0
- package/dist/components/reparent.d.ts +29 -0
- package/dist/components/reparent.js +49 -0
- package/dist/components/reparent.js.map +1 -0
- package/dist/components/sankey-chart.cjs +188 -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 +26 -0
- package/dist/components/scroll-area.d.ts +26 -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 +33 -0
- package/dist/components/segmented-control.d.ts +33 -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 +63 -0
- package/dist/components/select.d.ts +63 -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 +39 -0
- package/dist/components/series-legend.cjs.map +1 -0
- package/dist/components/series-legend.d.cts +31 -0
- package/dist/components/series-legend.d.ts +31 -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 +46 -0
- package/dist/components/sheet.d.ts +46 -0
- package/dist/components/sheet.js +90 -0
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/skeleton.cjs +24 -0
- package/dist/components/skeleton.cjs.map +1 -0
- package/dist/components/skeleton.d.cts +24 -0
- package/dist/components/skeleton.d.ts +24 -0
- package/dist/components/skeleton.js +21 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.cjs +276 -0
- package/dist/components/slider.cjs.map +1 -0
- package/dist/components/slider.d.cts +150 -0
- package/dist/components/slider.d.ts +150 -0
- package/dist/components/slider.js +266 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/smart-toggle-button.cjs +28 -0
- package/dist/components/smart-toggle-button.cjs.map +1 -0
- package/dist/components/smart-toggle-button.d.cts +18 -0
- package/dist/components/smart-toggle-button.d.ts +18 -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 +106 -0
- package/dist/components/solar-forecast-chart.cjs.map +1 -0
- package/dist/components/solar-forecast-chart.d.cts +69 -0
- package/dist/components/solar-forecast-chart.d.ts +69 -0
- package/dist/components/solar-forecast-chart.js +100 -0
- package/dist/components/solar-forecast-chart.js.map +1 -0
- package/dist/components/sortable-list.cjs +69 -0
- package/dist/components/sortable-list.cjs.map +1 -0
- package/dist/components/sortable-list.d.cts +46 -0
- package/dist/components/sortable-list.d.ts +46 -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 +58 -0
- package/dist/components/stat-card.cjs.map +1 -0
- package/dist/components/stat-card.d.cts +36 -0
- package/dist/components/stat-card.d.ts +36 -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 +22 -0
- package/dist/components/switch.cjs.map +1 -0
- package/dist/components/switch.d.cts +28 -0
- package/dist/components/switch.d.ts +28 -0
- package/dist/components/switch.js +20 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/tabs.cjs +175 -0
- package/dist/components/tabs.cjs.map +1 -0
- package/dist/components/tabs.d.cts +45 -0
- package/dist/components/tabs.d.ts +45 -0
- package/dist/components/tabs.js +167 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/theme.cjs +6 -0
- package/dist/components/theme.d.cts +38 -0
- package/dist/components/theme.d.ts +38 -0
- package/dist/components/theme.js +4 -0
- package/dist/components/thumbnail.cjs +54 -0
- package/dist/components/thumbnail.cjs.map +1 -0
- package/dist/components/thumbnail.d.cts +34 -0
- package/dist/components/thumbnail.d.ts +34 -0
- package/dist/components/thumbnail.js +51 -0
- package/dist/components/thumbnail.js.map +1 -0
- package/dist/components/time-picker.cjs +55 -0
- package/dist/components/time-picker.cjs.map +1 -0
- package/dist/components/time-picker.d.cts +41 -0
- package/dist/components/time-picker.d.ts +41 -0
- package/dist/components/time-picker.js +51 -0
- package/dist/components/time-picker.js.map +1 -0
- package/dist/components/toast.cjs +99 -0
- package/dist/components/toast.cjs.map +1 -0
- package/dist/components/toast.d.cts +18 -0
- package/dist/components/toast.d.ts +18 -0
- package/dist/components/toast.js +95 -0
- package/dist/components/toast.js.map +1 -0
- package/dist/components/tooltip.cjs +75 -0
- package/dist/components/tooltip.cjs.map +1 -0
- package/dist/components/tooltip.d.cts +47 -0
- package/dist/components/tooltip.d.ts +47 -0
- package/dist/components/tooltip.js +67 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/typography.cjs +52 -0
- package/dist/components/typography.cjs.map +1 -0
- package/dist/components/typography.d.cts +32 -0
- package/dist/components/typography.d.ts +32 -0
- package/dist/components/typography.js +45 -0
- package/dist/components/typography.js.map +1 -0
- package/dist/hooks/use-container-width.cjs +22 -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/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 +105 -0
- package/dist/icons/material-symbol.cjs.map +1 -0
- package/dist/icons/material-symbol.d.cts +23 -0
- package/dist/icons/material-symbol.d.ts +23 -0
- package/dist/icons/material-symbol.js +100 -0
- package/dist/icons/material-symbol.js.map +1 -0
- package/dist/input-box-variants-BMDdwvqg.cjs +40 -0
- package/dist/input-box-variants-BMDdwvqg.cjs.map +1 -0
- package/dist/input-box-variants-Dr1K7uYE.js +28 -0
- package/dist/input-box-variants-Dr1K7uYE.js.map +1 -0
- package/dist/number-flow-DMJouddg.d.cts +15 -0
- package/dist/number-flow-DSbucQ_K.d.ts +15 -0
- package/dist/styles/index.css +260 -0
- package/dist/styles/internal.css +5 -0
- package/dist/styles/material-symbol.css +22 -0
- package/dist/styles/spark-default.css +888 -0
- package/dist/styles/theme.css +620 -0
- package/dist/styles/utilities.css +557 -0
- package/dist/theme-C19BbKfO.js +574 -0
- package/dist/theme-C19BbKfO.js.map +1 -0
- package/dist/theme-CfFWrMEF.cjs +592 -0
- package/dist/theme-CfFWrMEF.cjs.map +1 -0
- package/dist/theme-types-DoROIXpi.d.ts +30 -0
- package/dist/theme-types-r20EJfEC.d.cts +30 -0
- package/dist/tones-DjgKOX3s.d.cts +8 -0
- package/dist/tones-DyCkL71h.d.ts +8 -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 +43 -0
- package/dist/utils/chart-scale.cjs.map +1 -0
- package/dist/utils/chart-scale.d.cts +22 -0
- package/dist/utils/chart-scale.d.ts +22 -0
- package/dist/utils/chart-scale.js +41 -0
- package/dist/utils/chart-scale.js.map +1 -0
- package/dist/utils/cn.cjs +10 -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 +78 -63
- package/dist/index.cjs +0 -1631
- package/dist/index.cjs.map +0 -1
- package/dist/index.css +0 -1
- package/dist/index.d.cts +0 -299
- package/dist/index.d.ts +0 -299
- package/dist/index.js +0 -1518
- package/dist/index.js.map +0 -1
- package/dist/styles.js +0 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import * as _$react from "react";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
+
|
|
7
|
+
//#region src/components/breadcrumbs.d.ts
|
|
8
|
+
declare const Breadcrumbs: ({
|
|
9
|
+
className,
|
|
10
|
+
"aria-label": ariaLabel,
|
|
11
|
+
...rest
|
|
12
|
+
}: React.ComponentProps<"nav">) => _$react_jsx_runtime0.JSX.Element;
|
|
13
|
+
declare const BreadcrumbsList: ({
|
|
14
|
+
className,
|
|
15
|
+
...rest
|
|
16
|
+
}: React.ComponentProps<"ol">) => _$react_jsx_runtime0.JSX.Element;
|
|
17
|
+
declare const BreadcrumbsItem: ({
|
|
18
|
+
className,
|
|
19
|
+
...rest
|
|
20
|
+
}: React.ComponentProps<"li">) => _$react_jsx_runtime0.JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* Link inside a breadcrumb. Pass `render` to render any router-specific link
|
|
23
|
+
* component (TanStack `Link`, Next `Link`, plain `<a>`, …) and inherit the
|
|
24
|
+
* breadcrumb link styling. Without `render` it renders as a plain anchor.
|
|
25
|
+
*/
|
|
26
|
+
declare const BreadcrumbsLink: ({
|
|
27
|
+
className,
|
|
28
|
+
render,
|
|
29
|
+
...rest
|
|
30
|
+
}: useRender.ComponentProps<"a">) => _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
|
|
31
|
+
/** Current page marker — the trailing breadcrumb the user is on. */
|
|
32
|
+
declare const BreadcrumbsPage: ({
|
|
33
|
+
className,
|
|
34
|
+
...rest
|
|
35
|
+
}: React.ComponentProps<"span">) => _$react_jsx_runtime0.JSX.Element;
|
|
36
|
+
/** Visual separator between breadcrumb items. Defaults to "/". */
|
|
37
|
+
declare const BreadcrumbsSeparator: ({
|
|
38
|
+
children,
|
|
39
|
+
className,
|
|
40
|
+
...rest
|
|
41
|
+
}: React.ComponentProps<"span">) => _$react_jsx_runtime0.JSX.Element;
|
|
42
|
+
//#endregion
|
|
43
|
+
export { Breadcrumbs, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsList, BreadcrumbsPage, BreadcrumbsSeparator };
|
|
44
|
+
//# sourceMappingURL=breadcrumbs.d.cts.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as _$react from "react";
|
|
4
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
6
|
+
|
|
7
|
+
//#region src/components/breadcrumbs.d.ts
|
|
8
|
+
declare const Breadcrumbs: ({
|
|
9
|
+
className,
|
|
10
|
+
"aria-label": ariaLabel,
|
|
11
|
+
...rest
|
|
12
|
+
}: React.ComponentProps<"nav">) => _$react_jsx_runtime0.JSX.Element;
|
|
13
|
+
declare const BreadcrumbsList: ({
|
|
14
|
+
className,
|
|
15
|
+
...rest
|
|
16
|
+
}: React.ComponentProps<"ol">) => _$react_jsx_runtime0.JSX.Element;
|
|
17
|
+
declare const BreadcrumbsItem: ({
|
|
18
|
+
className,
|
|
19
|
+
...rest
|
|
20
|
+
}: React.ComponentProps<"li">) => _$react_jsx_runtime0.JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* Link inside a breadcrumb. Pass `render` to render any router-specific link
|
|
23
|
+
* component (TanStack `Link`, Next `Link`, plain `<a>`, …) and inherit the
|
|
24
|
+
* breadcrumb link styling. Without `render` it renders as a plain anchor.
|
|
25
|
+
*/
|
|
26
|
+
declare const BreadcrumbsLink: ({
|
|
27
|
+
className,
|
|
28
|
+
render,
|
|
29
|
+
...rest
|
|
30
|
+
}: useRender.ComponentProps<"a">) => _$react.ReactElement<unknown, string | _$react.JSXElementConstructor<any>>;
|
|
31
|
+
/** Current page marker — the trailing breadcrumb the user is on. */
|
|
32
|
+
declare const BreadcrumbsPage: ({
|
|
33
|
+
className,
|
|
34
|
+
...rest
|
|
35
|
+
}: React.ComponentProps<"span">) => _$react_jsx_runtime0.JSX.Element;
|
|
36
|
+
/** Visual separator between breadcrumb items. Defaults to "/". */
|
|
37
|
+
declare const BreadcrumbsSeparator: ({
|
|
38
|
+
children,
|
|
39
|
+
className,
|
|
40
|
+
...rest
|
|
41
|
+
}: React.ComponentProps<"span">) => _$react_jsx_runtime0.JSX.Element;
|
|
42
|
+
//#endregion
|
|
43
|
+
export { Breadcrumbs, BreadcrumbsItem, BreadcrumbsLink, BreadcrumbsList, BreadcrumbsPage, BreadcrumbsSeparator };
|
|
44
|
+
//# 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("transition-colors hover:text-gray", 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 { className: cn('transition-colors hover:text-gray', className) },\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;AACjC,QAAO,oBAAC,OAAD;EAAK,cAAY;EAAW,WAAW,GAAG,UAAU;EAAE,GAAI;EAAQ,CAAA;;AAG3E,MAAM,mBAAmB,EACvB,WACA,GAAG,WAC6B;AAChC,QACE,oBAAC,MAAD;EACE,WAAW,GACT,+DACA,UACD;EACD,GAAI;EACJ,CAAA;;AAIN,MAAM,mBAAmB,EACvB,WACA,GAAG,WAC6B;AAChC,QAAO,oBAAC,MAAD;EAAI,WAAW,GAAG,6BAA6B,UAAU;EAAE,GAAI;EAAQ,CAAA;;;;;;;AAQhF,MAAM,mBAAmB,EACvB,WACA,QACA,GAAG,WACgC;AACnC,QAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WACL,EAAE,WAAW,GAAG,qCAAqC,UAAU,EAAE,EACjE,KACD;EACF,CAAC;;;AAIJ,MAAM,mBAAmB,EACvB,WACA,GAAG,WAC+B;AAClC,QACE,oBAAC,QAAD;EACE,gBAAa;EACb,WAAW,GAAG,yBAAyB,UAAU;EACjD,GAAI;EACJ,CAAA;;;AAKN,MAAM,wBAAwB,EAC5B,UACA,WACA,GAAG,WAC+B;AAClC,QACE,oBAAC,QAAD;EAAM,eAAY;EAAO,WAAW,GAAG,UAAU;EAAE,GAAI;YACpD,YAAY;EACR,CAAA"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const require_chunk = require("../chunk-aJGBMT86.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;AACzE,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,YAAA,GAAA,OAAA,IAAc,+BAA+B,UAAU;EACvD,GAAI;EACJ,CAAA;;AASN,MAAM,kBAAA,GAAA,yBAAA,KACJ,yKACA;CACE,UAAU,EACR,SAAS;EACP,SACE;EACF,WACE;EACF,OACE;EACF,QACE;EACF,SACE;EACF,OACE;EACF,aACE;EACH,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CACF;AAED,SAAS,OAAO,EACd,UAAU,WACV,QAAQ,SACR,WACA,GAAG,SAIA;AACH,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,gBAAc;EACd,cAAY;EACZ,YAAA,GAAA,OAAA,IAAc,eAAe,EAAE,SAAS,CAAC,EAAE,UAAU;EACrD,GAAI;EACJ,CAAA;;AAMN,SAAS,cAAc,EACrB,WACA,QACA,GAAG,SAC+B;AAClC,SAAA,GAAA,0BAAA,WAAiB;EACf,gBAAgB;EAChB;EACA,QAAA,GAAA,2BAAA,YACE;GACE,aAAa;GACb,YAAA,GAAA,OAAA,IACE,qWACA,UACD;GACF,EACD,MACD;EACF,CAAC;;AAGJ,MAAM,2BAAA,GAAA,yBAAA,KACJ,wJACA;CACE,UAAU;EACR,MAAM;GACJ,KAAK;GACL,QAAQ;GACT;EACD,OAAO;GACL,OAAO;GACP,KAAK;GACN;EACF;CACD,iBAAiB;EACf,MAAM;EACN,OAAO;EACR;CACF,CACF;AAED,SAAS,gBAAgB,EACvB,OAAO,UACP,QAAQ,OACR,WACA,GAAG,SAIF;AACD,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,aAAU;EACV,cAAY;EACZ,aAAW;EACX,YAAA,GAAA,OAAA,IAAc,wBAAwB;GAAE;GAAM;GAAO,CAAC,EAAE,UAAU;EAClE,GAAI;EACJ,CAAA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
6
|
+
import { VariantProps } from "class-variance-authority";
|
|
7
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
8
|
+
|
|
9
|
+
//#region src/components/bubble.d.ts
|
|
10
|
+
declare function BubbleGroup({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}: React$1.ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
declare const bubbleVariants: (props?: ({
|
|
15
|
+
variant?: "secondary" | "destructive" | "default" | "muted" | "tinted" | "outline" | "ghost" | null | undefined;
|
|
16
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
17
|
+
declare function Bubble({
|
|
18
|
+
variant,
|
|
19
|
+
align,
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
22
|
+
}: React$1.ComponentProps<'div'> & VariantProps<typeof bubbleVariants> & {
|
|
23
|
+
align?: 'start' | 'end';
|
|
24
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
25
|
+
declare function BubbleContent({
|
|
26
|
+
className,
|
|
27
|
+
render,
|
|
28
|
+
...props
|
|
29
|
+
}: useRender.ComponentProps<'div'>): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
|
|
30
|
+
declare function BubbleReactions({
|
|
31
|
+
side,
|
|
32
|
+
align,
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}: React$1.ComponentProps<'div'> & {
|
|
36
|
+
align?: 'start' | 'end';
|
|
37
|
+
side?: 'top' | 'bottom';
|
|
38
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Bubble, BubbleContent, BubbleGroup, BubbleReactions };
|
|
41
|
+
//# sourceMappingURL=bubble.d.cts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import { VariantProps } from "class-variance-authority";
|
|
6
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
7
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
8
|
+
|
|
9
|
+
//#region src/components/bubble.d.ts
|
|
10
|
+
declare function BubbleGroup({
|
|
11
|
+
className,
|
|
12
|
+
...props
|
|
13
|
+
}: React$1.ComponentProps<'div'>): _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
declare const bubbleVariants: (props?: ({
|
|
15
|
+
variant?: "secondary" | "destructive" | "default" | "muted" | "tinted" | "outline" | "ghost" | null | undefined;
|
|
16
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
17
|
+
declare function Bubble({
|
|
18
|
+
variant,
|
|
19
|
+
align,
|
|
20
|
+
className,
|
|
21
|
+
...props
|
|
22
|
+
}: React$1.ComponentProps<'div'> & VariantProps<typeof bubbleVariants> & {
|
|
23
|
+
align?: 'start' | 'end';
|
|
24
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
25
|
+
declare function BubbleContent({
|
|
26
|
+
className,
|
|
27
|
+
render,
|
|
28
|
+
...props
|
|
29
|
+
}: useRender.ComponentProps<'div'>): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
|
|
30
|
+
declare function BubbleReactions({
|
|
31
|
+
side,
|
|
32
|
+
align,
|
|
33
|
+
className,
|
|
34
|
+
...props
|
|
35
|
+
}: React$1.ComponentProps<'div'> & {
|
|
36
|
+
align?: 'start' | 'end';
|
|
37
|
+
side?: 'top' | 'bottom';
|
|
38
|
+
}): _$react_jsx_runtime0.JSX.Element;
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Bubble, BubbleContent, BubbleGroup, BubbleReactions };
|
|
41
|
+
//# 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;AACzE,QACE,oBAAC,OAAD;EACE,aAAU;EACV,WAAW,GAAG,+BAA+B,UAAU;EACvD,GAAI;EACJ,CAAA;;AASN,MAAM,iBAAiB,IACrB,yKACA;CACE,UAAU,EACR,SAAS;EACP,SACE;EACF,WACE;EACF,OACE;EACF,QACE;EACF,SACE;EACF,OACE;EACF,aACE;EACH,EACF;CACD,iBAAiB,EACf,SAAS,WACV;CACF,CACF;AAED,SAAS,OAAO,EACd,UAAU,WACV,QAAQ,SACR,WACA,GAAG,SAIA;AACH,QACE,oBAAC,OAAD;EACE,aAAU;EACV,gBAAc;EACd,cAAY;EACZ,WAAW,GAAG,eAAe,EAAE,SAAS,CAAC,EAAE,UAAU;EACrD,GAAI;EACJ,CAAA;;AAMN,SAAS,cAAc,EACrB,WACA,QACA,GAAG,SAC+B;AAClC,QAAO,UAAU;EACf,gBAAgB;EAChB;EACA,OAAO,WACL;GACE,aAAa;GACb,WAAW,GACT,qWACA,UACD;GACF,EACD,MACD;EACF,CAAC;;AAGJ,MAAM,0BAA0B,IAC9B,wJACA;CACE,UAAU;EACR,MAAM;GACJ,KAAK;GACL,QAAQ;GACT;EACD,OAAO;GACL,OAAO;GACP,KAAK;GACN;EACF;CACD,iBAAiB;EACf,MAAM;EACN,OAAO;EACR;CACF,CACF;AAED,SAAS,gBAAgB,EACvB,OAAO,UACP,QAAQ,OACR,WACA,GAAG,SAIF;AACD,QACE,oBAAC,OAAD;EACE,aAAU;EACV,cAAY;EACZ,aAAW;EACX,WAAW,GAAG,wBAAwB;GAAE;GAAM;GAAO,CAAC,EAAE,UAAU;EAClE,GAAI;EACJ,CAAA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const require_chunk = require("../chunk-aJGBMT86.cjs");
|
|
5
|
+
let react = require("react");
|
|
6
|
+
react = require_chunk.__toESM(react);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let _base_ui_react_button = require("@base-ui/react/button");
|
|
9
|
+
let class_variance_authority = require("class-variance-authority");
|
|
10
|
+
let cnfast = require("cnfast");
|
|
11
|
+
//#region src/components/button.tsx
|
|
12
|
+
const buttonVariants = (0, class_variance_authority.cva)("group/button inline-flex cursor-pointer items-center justify-center gap-2 rounded-[max(var(--spark-rounded-md),var(--spark-rounded-full))] text-base font-medium whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:shrink-0", {
|
|
13
|
+
variants: {
|
|
14
|
+
variant: {
|
|
15
|
+
primary: "bg-(--spark-style-bg,var(--spark-9)) text-(--spark-style-fg,var(--spark-contrast)) hover:bg-(--spark-style-bg-hover,var(--spark-10))",
|
|
16
|
+
secondary: "bg-gray-2 text-gray-a11 shadow-[inset_0_0_0_1px_var(--color-gray-a7)] hover:bg-gray-a3",
|
|
17
|
+
tertiary: "bg-transparent text-gray-a11 hover:bg-gray-a3",
|
|
18
|
+
bare: "rounded-none! text-gray-12 outline-hidden!",
|
|
19
|
+
destructive: "bg-red-a3 text-red-a11 hover:bg-red-a4 focus-visible:ring-base-error-solid"
|
|
20
|
+
},
|
|
21
|
+
color: {
|
|
22
|
+
accent: "",
|
|
23
|
+
neutral: "",
|
|
24
|
+
danger: "focus-visible:ring-base-error-solid"
|
|
25
|
+
},
|
|
26
|
+
size: {
|
|
27
|
+
small: "h-9 px-3 text-sm [&_svg:not([class*=size-])]:size-4",
|
|
28
|
+
default: "h-10 px-3 [&_svg:not([class*=size-])]:size-5",
|
|
29
|
+
medium: "h-11 px-4 [&_svg:not([class*=size-])]:size-6",
|
|
30
|
+
"icon-small": "size-9 [&_svg:not([class*=size-])]:size-4",
|
|
31
|
+
icon: "size-10 [&_svg:not([class*=size-])]:size-5",
|
|
32
|
+
"icon-medium": "size-11 [&_svg:not([class*=size-])]:size-6"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: { size: "default" }
|
|
36
|
+
});
|
|
37
|
+
const buttonRecipe = "bg-(--spark-style-bg,var(--spark-9)) text-(--spark-style-fg,var(--spark-contrast)) hover:bg-(--spark-style-bg-hover,var(--spark-10)) shadow-[inset_0_0_0_var(--spark-style-border-width,1px)_var(--spark-style-border,transparent)]";
|
|
38
|
+
function Button({ className, styleVariant, color, size, variant: _variant, ...props }) {
|
|
39
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_button.Button, {
|
|
40
|
+
"data-style": styleVariant !== void 0 || color !== void 0 ? styleVariant ?? "solid" : void 0,
|
|
41
|
+
"data-accent-color": color === "neutral" ? "gray" : color === "danger" ? "red" : void 0,
|
|
42
|
+
className: (0, cnfast.cn)(buttonVariants({
|
|
43
|
+
size,
|
|
44
|
+
color
|
|
45
|
+
}), buttonRecipe, className),
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
Button.displayName = "Button";
|
|
50
|
+
//#endregion
|
|
51
|
+
exports.Button = Button;
|
|
52
|
+
exports.buttonVariants = buttonVariants;
|
|
53
|
+
|
|
54
|
+
//# sourceMappingURL=button.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"button.cjs","names":["ButtonPrimitive"],"sources":["../../src/components/button.tsx"],"sourcesContent":["'use client'\n\nimport { Button as ButtonPrimitive } from '@base-ui/react/button'\nimport { cva, type VariantProps } from 'class-variance-authority'\nimport * as React from 'react'\nimport type { SparkButtonColor, SparkStyle } from '../lib/theme-types'\nimport { cn } from '../utils/cn'\n\nconst buttonVariants = cva(\n 'group/button inline-flex cursor-pointer items-center justify-center gap-2 rounded-[max(var(--spark-rounded-md),var(--spark-rounded-full))] text-base font-medium whitespace-nowrap transition-colors focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none [&_svg]:pointer-events-none [&_svg]:shrink-0',\n {\n variants: {\n // Class-only axis, kept only for callers of `buttonVariants()` that style a\n // non-<Button> element (e.g. react-day-picker `classNames`, dialog/sheet close\n // Xs). The <Button> component never uses it — it applies `buttonRecipe` + `data-*`\n // attributes instead. These strings mirror the style/color defaults so class-only\n // callers get the same look.\n variant: {\n primary:\n 'bg-(--spark-style-bg,var(--spark-9)) text-(--spark-style-fg,var(--spark-contrast)) hover:bg-(--spark-style-bg-hover,var(--spark-10))',\n secondary:\n 'bg-gray-2 text-gray-a11 shadow-[inset_0_0_0_1px_var(--color-gray-a7)] hover:bg-gray-a3',\n tertiary: 'bg-transparent text-gray-a11 hover:bg-gray-a3',\n bare: 'rounded-none! text-gray-12 outline-hidden!',\n destructive:\n 'bg-red-a3 text-red-a11 hover:bg-red-a4 focus-visible:ring-base-error-solid',\n },\n // bg/text/border flow through CSS vars set by [data-accent-color]; only the\n // focus ring differs per color, so it's the only class this axis carries.\n color: {\n accent: '',\n neutral: '',\n danger: 'focus-visible:ring-base-error-solid',\n },\n size: {\n small: 'h-9 px-3 text-sm [&_svg:not([class*=size-])]:size-4',\n default: 'h-10 px-3 [&_svg:not([class*=size-])]:size-5',\n medium: 'h-11 px-4 [&_svg:not([class*=size-])]:size-6',\n 'icon-small': 'size-9 [&_svg:not([class*=size-])]:size-4',\n icon: 'size-10 [&_svg:not([class*=size-])]:size-5',\n 'icon-medium': 'size-11 [&_svg:not([class*=size-])]:size-6',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n },\n)\n\n// The recipe the <Button> component applies for the style/color API. It reads the shared\n// `--spark-style-*` tokens (set by [data-style], re-pointed to neutral/danger by\n// [data-accent-color]); the 1px inset shadow renders the border without the geometry\n// shift a real border adds (transparent when `--spark-style-border` is unset).\nconst buttonRecipe =\n 'bg-(--spark-style-bg,var(--spark-9)) text-(--spark-style-fg,var(--spark-contrast)) hover:bg-(--spark-style-bg-hover,var(--spark-10)) shadow-[inset_0_0_0_var(--spark-style-border-width,1px)_var(--spark-style-border,transparent)]'\n\nexport interface ButtonProps\n extends\n React.ComponentProps<typeof ButtonPrimitive>,\n Omit<VariantProps<typeof buttonVariants>, 'variant' | 'color'> {\n /** Visual weight. Overrides the ambient theme style ([data-style]) for this button. */\n styleVariant?: SparkStyle\n /** Which scale paints the button; `neutral`/`danger` re-point the accent scale. */\n color?: SparkButtonColor\n /**\n * @deprecated Not a `<Button>` prop and silently ignored -- use `styleVariant`\n * (`solid | soft | surface | ghost | outline`) and `color`\n * (`accent | neutral | danger`) instead. The `variant` axis on\n * `buttonVariants` exists only for class-string callers.\n */\n variant?: never\n}\n\n// `render` replaces the old `asChild`: pass the element to render (e.g. a\n// router <Link/>) plus `nativeButton={false}`; Base UI merges props and maps\n// `disabled` to aria semantics on non-button elements.\nfunction Button({\n className,\n styleVariant,\n color,\n size,\n // deprecated no-op (see ButtonProps) -- kept out of the DOM spread\n variant: _variant,\n ...props\n}: ButtonProps) {\n // With no style/color the button emits no style attrs, so it follows the\n // ambient [data-style] + high-contrast cascade (CSS fallback = solid accent).\n // Setting `color` alone pins `solid`: [data-accent-color] re-points --spark-*,\n // but --spark-style-* resolve on the element declaring [data-style], so the\n // button must re-declare its own [data-style] for the re-point to take effect.\n const hasLook = styleVariant !== undefined || color !== undefined\n const dataStyle = hasLook ? (styleVariant ?? 'solid') : undefined\n const dataAccentColor =\n color === 'neutral' ? 'gray' : color === 'danger' ? 'red' : undefined\n\n return (\n <ButtonPrimitive\n data-style={dataStyle}\n data-accent-color={dataAccentColor}\n className={cn(buttonVariants({ size, color }), buttonRecipe, className)}\n {...props}\n />\n )\n}\n\nButton.displayName = 'Button'\n\nexport { Button, buttonVariants }\n"],"mappings":";;;;;;;;;;;AAQA,MAAM,kBAAA,GAAA,yBAAA,KACJ,6cACA;CACE,UAAU;EAMR,SAAS;GACP,SACE;GACF,WACE;GACF,UAAU;GACV,MAAM;GACN,aACE;GACH;EAGD,OAAO;GACL,QAAQ;GACR,SAAS;GACT,QAAQ;GACT;EACD,MAAM;GACJ,OAAO;GACP,SAAS;GACT,QAAQ;GACR,cAAc;GACd,MAAM;GACN,eAAe;GAChB;EACF;CACD,iBAAiB,EACf,MAAM,WACP;CACF,CACF;AAMD,MAAM,eACJ;AAsBF,SAAS,OAAO,EACd,WACA,cACA,OACA,MAEA,SAAS,UACT,GAAG,SACW;AAWd,QACE,iBAAA,GAAA,kBAAA,KAACA,sBAAAA,QAAD;EACE,cAPY,iBAAiB,KAAA,KAAa,UAAU,KAAA,IAC3B,gBAAgB,UAAW,KAAA;EAOpD,qBALF,UAAU,YAAY,SAAS,UAAU,WAAW,QAAQ,KAAA;EAM1D,YAAA,GAAA,OAAA,IAAc,eAAe;GAAE;GAAM;GAAO,CAAC,EAAE,cAAc,UAAU;EACvE,GAAI;EACJ,CAAA;;AAIN,OAAO,cAAc"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { d as SparkStyle, t as SparkButtonColor } from "../theme-types-r20EJfEC.cjs";
|
|
4
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
|
+
import * as React$1 from "react";
|
|
6
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
7
|
+
import { Button as Button$1 } from "@base-ui/react/button";
|
|
8
|
+
import { VariantProps } from "class-variance-authority";
|
|
9
|
+
|
|
10
|
+
//#region src/components/button.d.ts
|
|
11
|
+
declare const buttonVariants: (props?: ({
|
|
12
|
+
variant?: "primary" | "secondary" | "tertiary" | "bare" | "destructive" | null | undefined;
|
|
13
|
+
color?: "accent" | "neutral" | "danger" | null | undefined;
|
|
14
|
+
size?: "small" | "default" | "medium" | "icon-small" | "icon" | "icon-medium" | null | undefined;
|
|
15
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
16
|
+
interface ButtonProps extends React$1.ComponentProps<typeof Button$1>, Omit<VariantProps<typeof buttonVariants>, 'variant' | 'color'> {
|
|
17
|
+
/** Visual weight. Overrides the ambient theme style ([data-style]) for this button. */
|
|
18
|
+
styleVariant?: SparkStyle;
|
|
19
|
+
/** Which scale paints the button; `neutral`/`danger` re-point the accent scale. */
|
|
20
|
+
color?: SparkButtonColor;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Not a `<Button>` prop and silently ignored -- use `styleVariant`
|
|
23
|
+
* (`solid | soft | surface | ghost | outline`) and `color`
|
|
24
|
+
* (`accent | neutral | danger`) instead. The `variant` axis on
|
|
25
|
+
* `buttonVariants` exists only for class-string callers.
|
|
26
|
+
*/
|
|
27
|
+
variant?: never;
|
|
28
|
+
}
|
|
29
|
+
declare function Button({
|
|
30
|
+
className,
|
|
31
|
+
styleVariant,
|
|
32
|
+
color,
|
|
33
|
+
size,
|
|
34
|
+
variant: _variant,
|
|
35
|
+
...props
|
|
36
|
+
}: ButtonProps): _$react_jsx_runtime0.JSX.Element;
|
|
37
|
+
declare namespace Button {
|
|
38
|
+
var displayName: string;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Button, ButtonProps, buttonVariants };
|
|
42
|
+
//# sourceMappingURL=button.d.cts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { d as SparkStyle, t as SparkButtonColor } from "../theme-types-DoROIXpi.js";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
|
+
import { Button as Button$1 } from "@base-ui/react/button";
|
|
7
|
+
import { VariantProps } from "class-variance-authority";
|
|
8
|
+
import * as _$class_variance_authority_types0 from "class-variance-authority/types";
|
|
9
|
+
|
|
10
|
+
//#region src/components/button.d.ts
|
|
11
|
+
declare const buttonVariants: (props?: ({
|
|
12
|
+
variant?: "primary" | "secondary" | "tertiary" | "bare" | "destructive" | null | undefined;
|
|
13
|
+
color?: "accent" | "neutral" | "danger" | null | undefined;
|
|
14
|
+
size?: "small" | "default" | "medium" | "icon-small" | "icon" | "icon-medium" | null | undefined;
|
|
15
|
+
} & _$class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
16
|
+
interface ButtonProps extends React$1.ComponentProps<typeof Button$1>, Omit<VariantProps<typeof buttonVariants>, 'variant' | 'color'> {
|
|
17
|
+
/** Visual weight. Overrides the ambient theme style ([data-style]) for this button. */
|
|
18
|
+
styleVariant?: SparkStyle;
|
|
19
|
+
/** Which scale paints the button; `neutral`/`danger` re-point the accent scale. */
|
|
20
|
+
color?: SparkButtonColor;
|
|
21
|
+
/**
|
|
22
|
+
* @deprecated Not a `<Button>` prop and silently ignored -- use `styleVariant`
|
|
23
|
+
* (`solid | soft | surface | ghost | outline`) and `color`
|
|
24
|
+
* (`accent | neutral | danger`) instead. The `variant` axis on
|
|
25
|
+
* `buttonVariants` exists only for class-string callers.
|
|
26
|
+
*/
|
|
27
|
+
variant?: never;
|
|
28
|
+
}
|
|
29
|
+
declare function Button({
|
|
30
|
+
className,
|
|
31
|
+
styleVariant,
|
|
32
|
+
color,
|
|
33
|
+
size,
|
|
34
|
+
variant: _variant,
|
|
35
|
+
...props
|
|
36
|
+
}: ButtonProps): _$react_jsx_runtime0.JSX.Element;
|
|
37
|
+
declare namespace Button {
|
|
38
|
+
var displayName: string;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { Button, ButtonProps, buttonVariants };
|
|
42
|
+
//# sourceMappingURL=button.d.ts.map
|