@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,67 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { DndContext, KeyboardSensor, PointerSensor, TouchSensor, closestCenter, useSensor, useSensors } from "@dnd-kit/core";
|
|
5
|
+
import { restrictToParentElement, restrictToVerticalAxis } from "@dnd-kit/modifiers";
|
|
6
|
+
import { SortableContext, arrayMove, sortableKeyboardCoordinates, useSortable, verticalListSortingStrategy } from "@dnd-kit/sortable";
|
|
7
|
+
import { CSS } from "@dnd-kit/utilities";
|
|
8
|
+
//#region src/components/sortable-list.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Vertical drag-and-drop sortable list built on @dnd-kit. Pointer, touch and
|
|
11
|
+
* keyboard sensors are wired up; dragging is constrained to the vertical axis
|
|
12
|
+
* within the list. The consumer owns row markup and decides which element is
|
|
13
|
+
* the handle via the `handle` argument of `renderItem`.
|
|
14
|
+
*/
|
|
15
|
+
function SortableList({ items, getItemId, onReorder, renderItem, className }) {
|
|
16
|
+
const ids = items.map(getItemId);
|
|
17
|
+
const sensors = useSensors(useSensor(PointerSensor, { activationConstraint: { distance: 5 } }), useSensor(TouchSensor, { activationConstraint: {
|
|
18
|
+
delay: 150,
|
|
19
|
+
tolerance: 5
|
|
20
|
+
} }), useSensor(KeyboardSensor, { coordinateGetter: sortableKeyboardCoordinates }));
|
|
21
|
+
const handleDragEnd = (event) => {
|
|
22
|
+
const { active, over } = event;
|
|
23
|
+
if (!over || active.id === over.id) return;
|
|
24
|
+
const oldIndex = ids.indexOf(String(active.id));
|
|
25
|
+
const newIndex = ids.indexOf(String(over.id));
|
|
26
|
+
if (oldIndex < 0 || newIndex < 0) return;
|
|
27
|
+
onReorder(arrayMove(items, oldIndex, newIndex));
|
|
28
|
+
};
|
|
29
|
+
return /* @__PURE__ */ jsx(DndContext, {
|
|
30
|
+
sensors,
|
|
31
|
+
collisionDetection: closestCenter,
|
|
32
|
+
modifiers: [restrictToVerticalAxis, restrictToParentElement],
|
|
33
|
+
onDragEnd: handleDragEnd,
|
|
34
|
+
children: /* @__PURE__ */ jsx(SortableContext, {
|
|
35
|
+
items: ids,
|
|
36
|
+
strategy: verticalListSortingStrategy,
|
|
37
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
38
|
+
className: cn("flex flex-col gap-2", className),
|
|
39
|
+
children: items.map((item, index) => /* @__PURE__ */ jsx(SortableRow, {
|
|
40
|
+
id: getItemId(item),
|
|
41
|
+
children: (handle) => renderItem(item, handle, index)
|
|
42
|
+
}, getItemId(item)))
|
|
43
|
+
})
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
function SortableRow({ id, children }) {
|
|
48
|
+
const { attributes, listeners, setNodeRef, setActivatorNodeRef, transform, transition, isDragging } = useSortable({ id });
|
|
49
|
+
return /* @__PURE__ */ jsx("div", {
|
|
50
|
+
ref: setNodeRef,
|
|
51
|
+
style: {
|
|
52
|
+
transform: CSS.Transform.toString(transform),
|
|
53
|
+
transition
|
|
54
|
+
},
|
|
55
|
+
className: cn(isDragging && "relative z-10"),
|
|
56
|
+
children: children({
|
|
57
|
+
ref: setActivatorNodeRef,
|
|
58
|
+
attributes,
|
|
59
|
+
listeners,
|
|
60
|
+
isDragging
|
|
61
|
+
})
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { SortableList };
|
|
66
|
+
|
|
67
|
+
//# sourceMappingURL=sortable-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sortable-list.js","names":[],"sources":["../../src/components/sortable-list.tsx"],"sourcesContent":["import {\n DndContext,\n type DragEndEvent,\n KeyboardSensor,\n PointerSensor,\n TouchSensor,\n closestCenter,\n useSensor,\n useSensors,\n} from '@dnd-kit/core'\nimport {\n restrictToParentElement,\n restrictToVerticalAxis,\n} from '@dnd-kit/modifiers'\nimport {\n SortableContext,\n arrayMove,\n sortableKeyboardCoordinates,\n useSortable,\n verticalListSortingStrategy,\n} from '@dnd-kit/sortable'\nimport { CSS } from '@dnd-kit/utilities'\nimport type { ReactNode } from 'react'\nimport { cn } from '../utils/cn'\n\ntype SortableHookResult = ReturnType<typeof useSortable>\n\n/**\n * Props to spread onto the element that should start a drag (the handle).\n * Attach `ref`, `attributes`, and `listeners` to a focusable element such as a\n * button to make it the drag handle; `isDragging` reflects the row's state.\n */\nexport interface SortableDragHandle {\n ref: SortableHookResult['setActivatorNodeRef']\n attributes: SortableHookResult['attributes']\n listeners: SortableHookResult['listeners']\n isDragging: boolean\n}\n\nexport interface SortableListProps<T> {\n items: T[]\n /** Stable unique id for an item. */\n getItemId: (item: T) => string\n /** Called with the reordered items after a drag completes. */\n onReorder: (items: T[]) => void\n /** Render a single row. Spread `handle` onto the drag-handle element. */\n renderItem: (item: T, handle: SortableDragHandle, index: number) => ReactNode\n /** Classes for the list container (defaults to a vertical flex with gap). */\n className?: string\n}\n\n/**\n * Vertical drag-and-drop sortable list built on @dnd-kit. Pointer, touch and\n * keyboard sensors are wired up; dragging is constrained to the vertical axis\n * within the list. The consumer owns row markup and decides which element is\n * the handle via the `handle` argument of `renderItem`.\n */\nexport function SortableList<T>({\n items,\n getItemId,\n onReorder,\n renderItem,\n className,\n}: SortableListProps<T>) {\n const ids = items.map(getItemId)\n\n const sensors = useSensors(\n useSensor(PointerSensor, { activationConstraint: { distance: 5 } }),\n useSensor(TouchSensor, {\n activationConstraint: { delay: 150, tolerance: 5 },\n }),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n }),\n )\n\n const handleDragEnd = (event: DragEndEvent) => {\n const { active, over } = event\n if (!over || active.id === over.id) return\n const oldIndex = ids.indexOf(String(active.id))\n const newIndex = ids.indexOf(String(over.id))\n if (oldIndex < 0 || newIndex < 0) return\n onReorder(arrayMove(items, oldIndex, newIndex))\n }\n\n return (\n <DndContext\n sensors={sensors}\n collisionDetection={closestCenter}\n modifiers={[restrictToVerticalAxis, restrictToParentElement]}\n onDragEnd={handleDragEnd}\n >\n <SortableContext items={ids} strategy={verticalListSortingStrategy}>\n <div className={cn('flex flex-col gap-2', className)}>\n {items.map((item, index) => (\n <SortableRow key={getItemId(item)} id={getItemId(item)}>\n {(handle) => renderItem(item, handle, index)}\n </SortableRow>\n ))}\n </div>\n </SortableContext>\n </DndContext>\n )\n}\n\ninterface SortableRowProps {\n id: string\n children: (handle: SortableDragHandle) => ReactNode\n}\n\nfunction SortableRow({ id, children }: SortableRowProps) {\n const {\n attributes,\n listeners,\n setNodeRef,\n setActivatorNodeRef,\n transform,\n transition,\n isDragging,\n } = useSortable({ id })\n\n const style = {\n transform: CSS.Transform.toString(transform),\n transition,\n }\n\n return (\n <div\n ref={setNodeRef}\n style={style}\n className={cn(isDragging && 'relative z-10')}\n >\n {children({\n ref: setActivatorNodeRef,\n attributes,\n listeners,\n isDragging,\n })}\n </div>\n )\n}\n"],"mappings":";;;;;;;;;;;;;;AAyDA,SAAgB,aAAgB,EAC9B,OACA,WACA,WACA,YACA,aACuB;CACvB,MAAM,MAAM,MAAM,IAAI,UAAU;CAEhC,MAAM,UAAU,WACd,UAAU,eAAe,EAAE,sBAAsB,EAAE,UAAU,GAAG,EAAE,CAAC,EACnE,UAAU,aAAa,EACrB,sBAAsB;EAAE,OAAO;EAAK,WAAW;EAAG,EACnD,CAAC,EACF,UAAU,gBAAgB,EACxB,kBAAkB,6BACnB,CAAC,CACH;CAED,MAAM,iBAAiB,UAAwB;EAC7C,MAAM,EAAE,QAAQ,SAAS;AACzB,MAAI,CAAC,QAAQ,OAAO,OAAO,KAAK,GAAI;EACpC,MAAM,WAAW,IAAI,QAAQ,OAAO,OAAO,GAAG,CAAC;EAC/C,MAAM,WAAW,IAAI,QAAQ,OAAO,KAAK,GAAG,CAAC;AAC7C,MAAI,WAAW,KAAK,WAAW,EAAG;AAClC,YAAU,UAAU,OAAO,UAAU,SAAS,CAAC;;AAGjD,QACE,oBAAC,YAAD;EACW;EACT,oBAAoB;EACpB,WAAW,CAAC,wBAAwB,wBAAwB;EAC5D,WAAW;YAEX,oBAAC,iBAAD;GAAiB,OAAO;GAAK,UAAU;aACrC,oBAAC,OAAD;IAAK,WAAW,GAAG,uBAAuB,UAAU;cACjD,MAAM,KAAK,MAAM,UAChB,oBAAC,aAAD;KAAmC,IAAI,UAAU,KAAK;gBAClD,WAAW,WAAW,MAAM,QAAQ,MAAM;KAChC,EAFI,UAAU,KAAK,CAEnB,CACd;IACE,CAAA;GACU,CAAA;EACP,CAAA;;AASjB,SAAS,YAAY,EAAE,IAAI,YAA8B;CACvD,MAAM,EACJ,YACA,WACA,YACA,qBACA,WACA,YACA,eACE,YAAY,EAAE,IAAI,CAAC;AAOvB,QACE,oBAAC,OAAD;EACE,KAAK;EACL,OAAO;GAPT,WAAW,IAAI,UAAU,SAAS,UAAU;GAC5C;GAMc;EACZ,WAAW,GAAG,cAAc,gBAAgB;YAE3C,SAAS;GACR,KAAK;GACL;GACA;GACA;GACD,CAAC;EACE,CAAA"}
|
|
@@ -0,0 +1,42 @@
|
|
|
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 cnfast = require("cnfast");
|
|
8
|
+
//#region src/components/spinner.tsx
|
|
9
|
+
const sizeClasses = {
|
|
10
|
+
sm: "size-4",
|
|
11
|
+
default: "size-6",
|
|
12
|
+
lg: "size-8"
|
|
13
|
+
};
|
|
14
|
+
const Spinner = react.forwardRef(({ className, size = "default", label = "Loading", ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
15
|
+
className: (0, cnfast.cn)("inline-flex text-spark-9", sizeClasses[size], className),
|
|
16
|
+
"data-slot": "spinner",
|
|
17
|
+
ref,
|
|
18
|
+
role: "status",
|
|
19
|
+
...props,
|
|
20
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
21
|
+
className: "sr-only",
|
|
22
|
+
children: label
|
|
23
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
24
|
+
className: "size-full animate-spin [animation-duration:.65s] motion-reduce:animate-none",
|
|
25
|
+
fill: "none",
|
|
26
|
+
viewBox: "0 0 24 24",
|
|
27
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
28
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
29
|
+
d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",
|
|
30
|
+
fill: "currentColor",
|
|
31
|
+
opacity: ".25"
|
|
32
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
33
|
+
d: "M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z",
|
|
34
|
+
fill: "currentColor"
|
|
35
|
+
})]
|
|
36
|
+
})]
|
|
37
|
+
}));
|
|
38
|
+
Spinner.displayName = "Spinner";
|
|
39
|
+
//#endregion
|
|
40
|
+
exports.Spinner = Spinner;
|
|
41
|
+
|
|
42
|
+
//# sourceMappingURL=spinner.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.cjs","names":["React"],"sources":["../../src/components/spinner.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cn } from '../utils/cn'\n\ninterface SpinnerProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Size variant */\n size?: 'sm' | 'default' | 'lg'\n /** Screen-reader announcement */\n label?: string\n}\n\nconst sizeClasses = {\n sm: 'size-4',\n default: 'size-6',\n lg: 'size-8',\n} as const\n\nconst Spinner = React.forwardRef<HTMLDivElement, SpinnerProps>(\n ({ className, size = 'default', label = 'Loading', ...props }, ref) => (\n // color + size live on the wrapper so className can override them (svg inherits via currentColor/size-full)\n <div\n className={cn('inline-flex text-spark-9', sizeClasses[size], className)}\n data-slot=\"spinner\"\n ref={ref}\n role=\"status\"\n {...props}\n >\n <span className=\"sr-only\">{label}</span>\n {/* CSS animation (not the ECP loader's SMIL): respects prefers-reduced-motion\n and stays off the main thread; the 0.65s speed matches ECP */}\n <svg\n className=\"size-full animate-spin [animation-duration:.65s] motion-reduce:animate-none\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z\"\n fill=\"currentColor\"\n opacity=\".25\"\n />\n <path\n d=\"M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z\"\n fill=\"currentColor\"\n />\n </svg>\n </div>\n ),\n)\n\nSpinner.displayName = 'Spinner'\n\nexport { Spinner }\nexport type { SpinnerProps }\n"],"mappings":";;;;;;;;AAUA,MAAM,cAAc;CAClB,IAAI;CACJ,SAAS;CACT,IAAI;CACL;AAED,MAAM,UAAUA,MAAM,YACnB,EAAE,WAAW,OAAO,WAAW,QAAQ,WAAW,GAAG,SAAS,QAE7D,iBAAA,GAAA,kBAAA,MAAC,OAAD;CACE,YAAA,GAAA,OAAA,IAAc,4BAA4B,YAAY,OAAO,UAAU;CACvE,aAAU;CACL;CACL,MAAK;CACL,GAAI;WALN,CAOE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EAAM,WAAU;YAAW;EAAa,CAAA,EAGxC,iBAAA,GAAA,kBAAA,MAAC,OAAD;EACE,WAAU;EACV,MAAK;EACL,SAAQ;EACR,OAAM;YAJR,CAME,iBAAA,GAAA,kBAAA,KAAC,QAAD;GACE,GAAE;GACF,MAAK;GACL,SAAQ;GACR,CAAA,EACF,iBAAA,GAAA,kBAAA,KAAC,QAAD;GACE,GAAE;GACF,MAAK;GACL,CAAA,CACE;IACF;GAET;AAED,QAAQ,cAAc"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/spinner.d.ts
|
|
6
|
+
interface SpinnerProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
/** Size variant */
|
|
8
|
+
size?: 'sm' | 'default' | 'lg';
|
|
9
|
+
/** Screen-reader announcement */
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const Spinner: React$1.ForwardRefExoticComponent<SpinnerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Spinner, type SpinnerProps };
|
|
15
|
+
//# sourceMappingURL=spinner.d.cts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/spinner.d.ts
|
|
6
|
+
interface SpinnerProps extends React$1.HTMLAttributes<HTMLDivElement> {
|
|
7
|
+
/** Size variant */
|
|
8
|
+
size?: 'sm' | 'default' | 'lg';
|
|
9
|
+
/** Screen-reader announcement */
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const Spinner: React$1.ForwardRefExoticComponent<SpinnerProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Spinner, type SpinnerProps };
|
|
15
|
+
//# sourceMappingURL=spinner.d.ts.map
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/spinner.tsx
|
|
6
|
+
const sizeClasses = {
|
|
7
|
+
sm: "size-4",
|
|
8
|
+
default: "size-6",
|
|
9
|
+
lg: "size-8"
|
|
10
|
+
};
|
|
11
|
+
const Spinner = React$1.forwardRef(({ className, size = "default", label = "Loading", ...props }, ref) => /* @__PURE__ */ jsxs("div", {
|
|
12
|
+
className: cn("inline-flex text-spark-9", sizeClasses[size], className),
|
|
13
|
+
"data-slot": "spinner",
|
|
14
|
+
ref,
|
|
15
|
+
role: "status",
|
|
16
|
+
...props,
|
|
17
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
18
|
+
className: "sr-only",
|
|
19
|
+
children: label
|
|
20
|
+
}), /* @__PURE__ */ jsxs("svg", {
|
|
21
|
+
className: "size-full animate-spin [animation-duration:.65s] motion-reduce:animate-none",
|
|
22
|
+
fill: "none",
|
|
23
|
+
viewBox: "0 0 24 24",
|
|
24
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
+
children: [/* @__PURE__ */ jsx("path", {
|
|
26
|
+
d: "M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z",
|
|
27
|
+
fill: "currentColor",
|
|
28
|
+
opacity: ".25"
|
|
29
|
+
}), /* @__PURE__ */ jsx("path", {
|
|
30
|
+
d: "M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z",
|
|
31
|
+
fill: "currentColor"
|
|
32
|
+
})]
|
|
33
|
+
})]
|
|
34
|
+
}));
|
|
35
|
+
Spinner.displayName = "Spinner";
|
|
36
|
+
//#endregion
|
|
37
|
+
export { Spinner };
|
|
38
|
+
|
|
39
|
+
//# sourceMappingURL=spinner.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"spinner.js","names":["React"],"sources":["../../src/components/spinner.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cn } from '../utils/cn'\n\ninterface SpinnerProps extends React.HTMLAttributes<HTMLDivElement> {\n /** Size variant */\n size?: 'sm' | 'default' | 'lg'\n /** Screen-reader announcement */\n label?: string\n}\n\nconst sizeClasses = {\n sm: 'size-4',\n default: 'size-6',\n lg: 'size-8',\n} as const\n\nconst Spinner = React.forwardRef<HTMLDivElement, SpinnerProps>(\n ({ className, size = 'default', label = 'Loading', ...props }, ref) => (\n // color + size live on the wrapper so className can override them (svg inherits via currentColor/size-full)\n <div\n className={cn('inline-flex text-spark-9', sizeClasses[size], className)}\n data-slot=\"spinner\"\n ref={ref}\n role=\"status\"\n {...props}\n >\n <span className=\"sr-only\">{label}</span>\n {/* CSS animation (not the ECP loader's SMIL): respects prefers-reduced-motion\n and stays off the main thread; the 0.65s speed matches ECP */}\n <svg\n className=\"size-full animate-spin [animation-duration:.65s] motion-reduce:animate-none\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n d=\"M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z\"\n fill=\"currentColor\"\n opacity=\".25\"\n />\n <path\n d=\"M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z\"\n fill=\"currentColor\"\n />\n </svg>\n </div>\n ),\n)\n\nSpinner.displayName = 'Spinner'\n\nexport { Spinner }\nexport type { SpinnerProps }\n"],"mappings":";;;;;AAUA,MAAM,cAAc;CAClB,IAAI;CACJ,SAAS;CACT,IAAI;CACL;AAED,MAAM,UAAUA,QAAM,YACnB,EAAE,WAAW,OAAO,WAAW,QAAQ,WAAW,GAAG,SAAS,QAE7D,qBAAC,OAAD;CACE,WAAW,GAAG,4BAA4B,YAAY,OAAO,UAAU;CACvE,aAAU;CACL;CACL,MAAK;CACL,GAAI;WALN,CAOE,oBAAC,QAAD;EAAM,WAAU;YAAW;EAAa,CAAA,EAGxC,qBAAC,OAAD;EACE,WAAU;EACV,MAAK;EACL,SAAQ;EACR,OAAM;YAJR,CAME,oBAAC,QAAD;GACE,GAAE;GACF,MAAK;GACL,SAAQ;GACR,CAAA,EACF,oBAAC,QAAD;GACE,GAAE;GACF,MAAK;GACL,CAAA,CACE;IACF;GAET;AAED,QAAQ,cAAc"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
require("../chunk-aJGBMT86.cjs");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let cnfast = require("cnfast");
|
|
6
|
+
//#region src/components/stat-card.tsx
|
|
7
|
+
const StatCardContainer = ({ className, ...rest }) => {
|
|
8
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
9
|
+
className: (0, cnfast.cn)("flex w-full flex-col gap-3 p-4 text-left", className),
|
|
10
|
+
...rest
|
|
11
|
+
});
|
|
12
|
+
};
|
|
13
|
+
const StatCardLabel = ({ className, ...rest }) => {
|
|
14
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
15
|
+
className: (0, cnfast.cn)("text-xs font-medium text-gray-light", className),
|
|
16
|
+
...rest
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
const StatCardContent = ({ className, ...rest }) => {
|
|
20
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
21
|
+
className: (0, cnfast.cn)("flex items-end justify-between gap-px", className),
|
|
22
|
+
...rest
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
const StatCardValueContainer = ({ className, ...rest }) => {
|
|
26
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
27
|
+
className: (0, cnfast.cn)("flex flex-col gap-0.5", className),
|
|
28
|
+
...rest
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
const StatCardValue = ({ className, ...rest }) => {
|
|
32
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
33
|
+
className: (0, cnfast.cn)("text-lg font-bold text-gray tabular-nums", className),
|
|
34
|
+
...rest
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
const StatCardSecondaryValue = ({ className, ...rest }) => {
|
|
38
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
39
|
+
className: (0, cnfast.cn)("text-xs text-gray-light", className),
|
|
40
|
+
...rest
|
|
41
|
+
});
|
|
42
|
+
};
|
|
43
|
+
const StatCardIcon = ({ className, ...rest }) => {
|
|
44
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
45
|
+
className: (0, cnfast.cn)(`flex size-10 shrink-0 items-center justify-center rounded-xl`, className),
|
|
46
|
+
...rest
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
//#endregion
|
|
50
|
+
exports.StatCardContainer = StatCardContainer;
|
|
51
|
+
exports.StatCardContent = StatCardContent;
|
|
52
|
+
exports.StatCardIcon = StatCardIcon;
|
|
53
|
+
exports.StatCardLabel = StatCardLabel;
|
|
54
|
+
exports.StatCardSecondaryValue = StatCardSecondaryValue;
|
|
55
|
+
exports.StatCardValue = StatCardValue;
|
|
56
|
+
exports.StatCardValueContainer = StatCardValueContainer;
|
|
57
|
+
|
|
58
|
+
//# sourceMappingURL=stat-card.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stat-card.cjs","names":[],"sources":["../../src/components/stat-card.tsx"],"sourcesContent":["import { cn } from '../utils/cn'\n\nconst StatCardContainer = ({\n className,\n ...rest\n}: React.ComponentProps<'div'>) => {\n return (\n <div\n className={cn('flex w-full flex-col gap-3 p-4 text-left', className)}\n {...rest}\n />\n )\n}\n\nconst StatCardLabel = ({\n className,\n ...rest\n}: React.ComponentProps<'span'>) => {\n return (\n <span\n className={cn('text-xs font-medium text-gray-light', className)}\n {...rest}\n />\n )\n}\n\nconst StatCardContent = ({\n className,\n ...rest\n}: React.ComponentProps<'div'>) => {\n return (\n <div\n className={cn('flex items-end justify-between gap-px', className)}\n {...rest}\n />\n )\n}\n\nconst StatCardValueContainer = ({\n className,\n ...rest\n}: React.ComponentProps<'div'>) => {\n return <div className={cn('flex flex-col gap-0.5', className)} {...rest} />\n}\n\nconst StatCardValue = ({\n className,\n ...rest\n}: React.ComponentProps<'span'>) => {\n return (\n <span\n className={cn('text-lg font-bold text-gray tabular-nums', className)}\n {...rest}\n />\n )\n}\n\nconst StatCardSecondaryValue = ({\n className,\n ...rest\n}: React.ComponentProps<'span'>) => {\n return <span className={cn('text-xs text-gray-light', className)} {...rest} />\n}\n\nconst StatCardIcon = ({ className, ...rest }: React.ComponentProps<'div'>) => {\n return (\n <div\n className={cn(\n `flex size-10 shrink-0 items-center justify-center rounded-xl`,\n className,\n )}\n {...rest}\n />\n )\n}\n\nexport {\n StatCardContainer,\n StatCardLabel,\n StatCardContent,\n StatCardValueContainer,\n StatCardValue,\n StatCardSecondaryValue,\n StatCardIcon,\n}\n"],"mappings":";;;;;;AAEA,MAAM,qBAAqB,EACzB,WACA,GAAG,WAC8B;AACjC,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,YAAA,GAAA,OAAA,IAAc,4CAA4C,UAAU;EACpE,GAAI;EACJ,CAAA;;AAIN,MAAM,iBAAiB,EACrB,WACA,GAAG,WAC+B;AAClC,QACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,YAAA,GAAA,OAAA,IAAc,uCAAuC,UAAU;EAC/D,GAAI;EACJ,CAAA;;AAIN,MAAM,mBAAmB,EACvB,WACA,GAAG,WAC8B;AACjC,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,YAAA,GAAA,OAAA,IAAc,yCAAyC,UAAU;EACjE,GAAI;EACJ,CAAA;;AAIN,MAAM,0BAA0B,EAC9B,WACA,GAAG,WAC8B;AACjC,QAAO,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,YAAA,GAAA,OAAA,IAAc,yBAAyB,UAAU;EAAE,GAAI;EAAQ,CAAA;;AAG7E,MAAM,iBAAiB,EACrB,WACA,GAAG,WAC+B;AAClC,QACE,iBAAA,GAAA,kBAAA,KAAC,QAAD;EACE,YAAA,GAAA,OAAA,IAAc,4CAA4C,UAAU;EACpE,GAAI;EACJ,CAAA;;AAIN,MAAM,0BAA0B,EAC9B,WACA,GAAG,WAC+B;AAClC,QAAO,iBAAA,GAAA,kBAAA,KAAC,QAAD;EAAM,YAAA,GAAA,OAAA,IAAc,2BAA2B,UAAU;EAAE,GAAI;EAAQ,CAAA;;AAGhF,MAAM,gBAAgB,EAAE,WAAW,GAAG,WAAwC;AAC5E,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EACE,YAAA,GAAA,OAAA,IACE,gEACA,UACD;EACD,GAAI;EACJ,CAAA"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/stat-card.d.ts
|
|
6
|
+
declare const StatCardContainer: ({
|
|
7
|
+
className,
|
|
8
|
+
...rest
|
|
9
|
+
}: React.ComponentProps<"div">) => _$react_jsx_runtime0.JSX.Element;
|
|
10
|
+
declare const StatCardLabel: ({
|
|
11
|
+
className,
|
|
12
|
+
...rest
|
|
13
|
+
}: React.ComponentProps<"span">) => _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
declare const StatCardContent: ({
|
|
15
|
+
className,
|
|
16
|
+
...rest
|
|
17
|
+
}: React.ComponentProps<"div">) => _$react_jsx_runtime0.JSX.Element;
|
|
18
|
+
declare const StatCardValueContainer: ({
|
|
19
|
+
className,
|
|
20
|
+
...rest
|
|
21
|
+
}: React.ComponentProps<"div">) => _$react_jsx_runtime0.JSX.Element;
|
|
22
|
+
declare const StatCardValue: ({
|
|
23
|
+
className,
|
|
24
|
+
...rest
|
|
25
|
+
}: React.ComponentProps<"span">) => _$react_jsx_runtime0.JSX.Element;
|
|
26
|
+
declare const StatCardSecondaryValue: ({
|
|
27
|
+
className,
|
|
28
|
+
...rest
|
|
29
|
+
}: React.ComponentProps<"span">) => _$react_jsx_runtime0.JSX.Element;
|
|
30
|
+
declare const StatCardIcon: ({
|
|
31
|
+
className,
|
|
32
|
+
...rest
|
|
33
|
+
}: React.ComponentProps<"div">) => _$react_jsx_runtime0.JSX.Element;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { StatCardContainer, StatCardContent, StatCardIcon, StatCardLabel, StatCardSecondaryValue, StatCardValue, StatCardValueContainer };
|
|
36
|
+
//# sourceMappingURL=stat-card.d.cts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region src/components/stat-card.d.ts
|
|
6
|
+
declare const StatCardContainer: ({
|
|
7
|
+
className,
|
|
8
|
+
...rest
|
|
9
|
+
}: React.ComponentProps<"div">) => _$react_jsx_runtime0.JSX.Element;
|
|
10
|
+
declare const StatCardLabel: ({
|
|
11
|
+
className,
|
|
12
|
+
...rest
|
|
13
|
+
}: React.ComponentProps<"span">) => _$react_jsx_runtime0.JSX.Element;
|
|
14
|
+
declare const StatCardContent: ({
|
|
15
|
+
className,
|
|
16
|
+
...rest
|
|
17
|
+
}: React.ComponentProps<"div">) => _$react_jsx_runtime0.JSX.Element;
|
|
18
|
+
declare const StatCardValueContainer: ({
|
|
19
|
+
className,
|
|
20
|
+
...rest
|
|
21
|
+
}: React.ComponentProps<"div">) => _$react_jsx_runtime0.JSX.Element;
|
|
22
|
+
declare const StatCardValue: ({
|
|
23
|
+
className,
|
|
24
|
+
...rest
|
|
25
|
+
}: React.ComponentProps<"span">) => _$react_jsx_runtime0.JSX.Element;
|
|
26
|
+
declare const StatCardSecondaryValue: ({
|
|
27
|
+
className,
|
|
28
|
+
...rest
|
|
29
|
+
}: React.ComponentProps<"span">) => _$react_jsx_runtime0.JSX.Element;
|
|
30
|
+
declare const StatCardIcon: ({
|
|
31
|
+
className,
|
|
32
|
+
...rest
|
|
33
|
+
}: React.ComponentProps<"div">) => _$react_jsx_runtime0.JSX.Element;
|
|
34
|
+
//#endregion
|
|
35
|
+
export { StatCardContainer, StatCardContent, StatCardIcon, StatCardLabel, StatCardSecondaryValue, StatCardValue, StatCardValueContainer };
|
|
36
|
+
//# sourceMappingURL=stat-card.d.ts.map
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/stat-card.tsx
|
|
5
|
+
const StatCardContainer = ({ className, ...rest }) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", {
|
|
7
|
+
className: cn("flex w-full flex-col gap-3 p-4 text-left", className),
|
|
8
|
+
...rest
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
const StatCardLabel = ({ className, ...rest }) => {
|
|
12
|
+
return /* @__PURE__ */ jsx("span", {
|
|
13
|
+
className: cn("text-xs font-medium text-gray-light", className),
|
|
14
|
+
...rest
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
const StatCardContent = ({ className, ...rest }) => {
|
|
18
|
+
return /* @__PURE__ */ jsx("div", {
|
|
19
|
+
className: cn("flex items-end justify-between gap-px", className),
|
|
20
|
+
...rest
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
const StatCardValueContainer = ({ className, ...rest }) => {
|
|
24
|
+
return /* @__PURE__ */ jsx("div", {
|
|
25
|
+
className: cn("flex flex-col gap-0.5", className),
|
|
26
|
+
...rest
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
const StatCardValue = ({ className, ...rest }) => {
|
|
30
|
+
return /* @__PURE__ */ jsx("span", {
|
|
31
|
+
className: cn("text-lg font-bold text-gray tabular-nums", className),
|
|
32
|
+
...rest
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
const StatCardSecondaryValue = ({ className, ...rest }) => {
|
|
36
|
+
return /* @__PURE__ */ jsx("span", {
|
|
37
|
+
className: cn("text-xs text-gray-light", className),
|
|
38
|
+
...rest
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const StatCardIcon = ({ className, ...rest }) => {
|
|
42
|
+
return /* @__PURE__ */ jsx("div", {
|
|
43
|
+
className: cn(`flex size-10 shrink-0 items-center justify-center rounded-xl`, className),
|
|
44
|
+
...rest
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
//#endregion
|
|
48
|
+
export { StatCardContainer, StatCardContent, StatCardIcon, StatCardLabel, StatCardSecondaryValue, StatCardValue, StatCardValueContainer };
|
|
49
|
+
|
|
50
|
+
//# sourceMappingURL=stat-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stat-card.js","names":[],"sources":["../../src/components/stat-card.tsx"],"sourcesContent":["import { cn } from '../utils/cn'\n\nconst StatCardContainer = ({\n className,\n ...rest\n}: React.ComponentProps<'div'>) => {\n return (\n <div\n className={cn('flex w-full flex-col gap-3 p-4 text-left', className)}\n {...rest}\n />\n )\n}\n\nconst StatCardLabel = ({\n className,\n ...rest\n}: React.ComponentProps<'span'>) => {\n return (\n <span\n className={cn('text-xs font-medium text-gray-light', className)}\n {...rest}\n />\n )\n}\n\nconst StatCardContent = ({\n className,\n ...rest\n}: React.ComponentProps<'div'>) => {\n return (\n <div\n className={cn('flex items-end justify-between gap-px', className)}\n {...rest}\n />\n )\n}\n\nconst StatCardValueContainer = ({\n className,\n ...rest\n}: React.ComponentProps<'div'>) => {\n return <div className={cn('flex flex-col gap-0.5', className)} {...rest} />\n}\n\nconst StatCardValue = ({\n className,\n ...rest\n}: React.ComponentProps<'span'>) => {\n return (\n <span\n className={cn('text-lg font-bold text-gray tabular-nums', className)}\n {...rest}\n />\n )\n}\n\nconst StatCardSecondaryValue = ({\n className,\n ...rest\n}: React.ComponentProps<'span'>) => {\n return <span className={cn('text-xs text-gray-light', className)} {...rest} />\n}\n\nconst StatCardIcon = ({ className, ...rest }: React.ComponentProps<'div'>) => {\n return (\n <div\n className={cn(\n `flex size-10 shrink-0 items-center justify-center rounded-xl`,\n className,\n )}\n {...rest}\n />\n )\n}\n\nexport {\n StatCardContainer,\n StatCardLabel,\n StatCardContent,\n StatCardValueContainer,\n StatCardValue,\n StatCardSecondaryValue,\n StatCardIcon,\n}\n"],"mappings":";;;;AAEA,MAAM,qBAAqB,EACzB,WACA,GAAG,WAC8B;AACjC,QACE,oBAAC,OAAD;EACE,WAAW,GAAG,4CAA4C,UAAU;EACpE,GAAI;EACJ,CAAA;;AAIN,MAAM,iBAAiB,EACrB,WACA,GAAG,WAC+B;AAClC,QACE,oBAAC,QAAD;EACE,WAAW,GAAG,uCAAuC,UAAU;EAC/D,GAAI;EACJ,CAAA;;AAIN,MAAM,mBAAmB,EACvB,WACA,GAAG,WAC8B;AACjC,QACE,oBAAC,OAAD;EACE,WAAW,GAAG,yCAAyC,UAAU;EACjE,GAAI;EACJ,CAAA;;AAIN,MAAM,0BAA0B,EAC9B,WACA,GAAG,WAC8B;AACjC,QAAO,oBAAC,OAAD;EAAK,WAAW,GAAG,yBAAyB,UAAU;EAAE,GAAI;EAAQ,CAAA;;AAG7E,MAAM,iBAAiB,EACrB,WACA,GAAG,WAC+B;AAClC,QACE,oBAAC,QAAD;EACE,WAAW,GAAG,4CAA4C,UAAU;EACpE,GAAI;EACJ,CAAA;;AAIN,MAAM,0BAA0B,EAC9B,WACA,GAAG,WAC+B;AAClC,QAAO,oBAAC,QAAD;EAAM,WAAW,GAAG,2BAA2B,UAAU;EAAE,GAAI;EAAQ,CAAA;;AAGhF,MAAM,gBAAgB,EAAE,WAAW,GAAG,WAAwC;AAC5E,QACE,oBAAC,OAAD;EACE,WAAW,GACT,gEACA,UACD;EACD,GAAI;EACJ,CAAA"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const require_chunk = require("../chunk-aJGBMT86.cjs");
|
|
4
|
+
const require_icons_material_symbol = require("../icons/material-symbol.cjs");
|
|
5
|
+
let react = require("react");
|
|
6
|
+
react = require_chunk.__toESM(react);
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let cnfast = require("cnfast");
|
|
9
|
+
//#region src/components/stepper.tsx
|
|
10
|
+
const Stepper = react.forwardRef(({ value, onValueChange, onValueCommit, min = 0, max = 100, step = 1, formatValue = (v) => String(v), disabled, className, commitDelayMs = 400, "aria-label": ariaLabel, decreaseLabel = "Decrease", increaseLabel = "Increase" }, ref) => {
|
|
11
|
+
const commitTimerRef = react.useRef(null);
|
|
12
|
+
react.useEffect(() => () => {
|
|
13
|
+
if (commitTimerRef.current) clearTimeout(commitTimerRef.current);
|
|
14
|
+
}, []);
|
|
15
|
+
const scheduleCommit = (next) => {
|
|
16
|
+
if (!onValueCommit) return;
|
|
17
|
+
if (commitTimerRef.current) clearTimeout(commitTimerRef.current);
|
|
18
|
+
commitTimerRef.current = setTimeout(() => {
|
|
19
|
+
commitTimerRef.current = null;
|
|
20
|
+
onValueCommit(next);
|
|
21
|
+
}, commitDelayMs);
|
|
22
|
+
};
|
|
23
|
+
const decrement = () => {
|
|
24
|
+
const next = Math.max(min, value - step);
|
|
25
|
+
if (next !== value) {
|
|
26
|
+
onValueChange(next);
|
|
27
|
+
scheduleCommit(next);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const increment = () => {
|
|
31
|
+
const next = Math.min(max, value + step);
|
|
32
|
+
if (next !== value) {
|
|
33
|
+
onValueChange(next);
|
|
34
|
+
scheduleCommit(next);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const atMin = value <= min;
|
|
38
|
+
const atMax = value >= max;
|
|
39
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
40
|
+
ref,
|
|
41
|
+
role: "group",
|
|
42
|
+
"aria-label": ariaLabel,
|
|
43
|
+
className: (0, cnfast.cn)("inline-flex h-12 w-full items-center justify-between rounded-xl bg-base-gray-soft px-2", className),
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
46
|
+
type: "button",
|
|
47
|
+
"aria-label": decreaseLabel,
|
|
48
|
+
onClick: decrement,
|
|
49
|
+
disabled: disabled || atMin,
|
|
50
|
+
className: "inline-flex size-8 items-center justify-center rounded-md text-gray transition-colors hover:bg-slate-a3 disabled:opacity-40 disabled:hover:bg-transparent",
|
|
51
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_material_symbol.MaterialSymbol, {
|
|
52
|
+
className: "text-[16px]",
|
|
53
|
+
name: "chevron_left"
|
|
54
|
+
})
|
|
55
|
+
}),
|
|
56
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
57
|
+
className: "text-base font-semibold text-gray tabular-nums select-none",
|
|
58
|
+
"aria-live": "polite",
|
|
59
|
+
children: formatValue(value)
|
|
60
|
+
}),
|
|
61
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
62
|
+
type: "button",
|
|
63
|
+
"aria-label": increaseLabel,
|
|
64
|
+
onClick: increment,
|
|
65
|
+
disabled: disabled || atMax,
|
|
66
|
+
className: "inline-flex size-8 items-center justify-center rounded-md text-gray transition-colors hover:bg-slate-a3 disabled:opacity-40 disabled:hover:bg-transparent",
|
|
67
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icons_material_symbol.MaterialSymbol, {
|
|
68
|
+
className: "text-[16px]",
|
|
69
|
+
name: "chevron_right"
|
|
70
|
+
})
|
|
71
|
+
})
|
|
72
|
+
]
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
Stepper.displayName = "Stepper";
|
|
76
|
+
//#endregion
|
|
77
|
+
exports.Stepper = Stepper;
|
|
78
|
+
|
|
79
|
+
//# sourceMappingURL=stepper.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stepper.cjs","names":["React","MaterialSymbol"],"sources":["../../src/components/stepper.tsx"],"sourcesContent":["import * as React from 'react'\nimport { MaterialSymbol } from '../icons/material-symbol'\nimport { cn } from '../utils/cn'\n\ninterface StepperProps {\n value: number\n onValueChange: (value: number) => void\n /**\n * Fires once after the user stops interacting (default: 400ms after the last\n * click). Use this for side effects like persisting the value, so rapid\n * clicks don't fan out into a request per click.\n */\n onValueCommit?: (value: number) => void\n min?: number\n max?: number\n step?: number\n formatValue?: (value: number) => string\n disabled?: boolean\n className?: string\n /** Delay (ms) after the last click before `onValueCommit` fires. */\n commitDelayMs?: number\n /** Accessible label, e.g. \"Sunshare percentage\". */\n 'aria-label'?: string\n /** Accessible label for the decrement button. Defaults to `\"Decrease\"`. */\n decreaseLabel?: string\n /** Accessible label for the increment button. Defaults to `\"Increase\"`. */\n increaseLabel?: string\n}\n\nconst Stepper = React.forwardRef<HTMLDivElement, StepperProps>(\n (\n {\n value,\n onValueChange,\n onValueCommit,\n min = 0,\n max = 100,\n step = 1,\n formatValue = (v) => String(v),\n disabled,\n className,\n commitDelayMs = 400,\n 'aria-label': ariaLabel,\n decreaseLabel = 'Decrease',\n increaseLabel = 'Increase',\n },\n ref,\n ) => {\n const commitTimerRef = React.useRef<ReturnType<typeof setTimeout> | null>(\n null,\n )\n\n React.useEffect(\n () => () => {\n if (commitTimerRef.current) clearTimeout(commitTimerRef.current)\n },\n [],\n )\n\n const scheduleCommit = (next: number) => {\n if (!onValueCommit) return\n if (commitTimerRef.current) clearTimeout(commitTimerRef.current)\n commitTimerRef.current = setTimeout(() => {\n commitTimerRef.current = null\n onValueCommit(next)\n }, commitDelayMs)\n }\n\n const decrement = () => {\n const next = Math.max(min, value - step)\n if (next !== value) {\n onValueChange(next)\n scheduleCommit(next)\n }\n }\n const increment = () => {\n const next = Math.min(max, value + step)\n if (next !== value) {\n onValueChange(next)\n scheduleCommit(next)\n }\n }\n\n const atMin = value <= min\n const atMax = value >= max\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-label={ariaLabel}\n className={cn(\n 'inline-flex h-12 w-full items-center justify-between rounded-xl bg-base-gray-soft px-2',\n className,\n )}\n >\n <button\n type=\"button\"\n aria-label={decreaseLabel}\n onClick={decrement}\n disabled={disabled || atMin}\n className=\"inline-flex size-8 items-center justify-center rounded-md text-gray transition-colors hover:bg-slate-a3 disabled:opacity-40 disabled:hover:bg-transparent\"\n >\n <MaterialSymbol className=\"text-[16px]\" name=\"chevron_left\" />\n </button>\n <span\n className=\"text-base font-semibold text-gray tabular-nums select-none\"\n aria-live=\"polite\"\n >\n {formatValue(value)}\n </span>\n <button\n type=\"button\"\n aria-label={increaseLabel}\n onClick={increment}\n disabled={disabled || atMax}\n className=\"inline-flex size-8 items-center justify-center rounded-md text-gray transition-colors hover:bg-slate-a3 disabled:opacity-40 disabled:hover:bg-transparent\"\n >\n <MaterialSymbol className=\"text-[16px]\" name=\"chevron_right\" />\n </button>\n </div>\n )\n },\n)\n\nStepper.displayName = 'Stepper'\n\nexport { Stepper }\nexport type { StepperProps }\n"],"mappings":";;;;;;;;;AA6BA,MAAM,UAAUA,MAAM,YAElB,EACE,OACA,eACA,eACA,MAAM,GACN,MAAM,KACN,OAAO,GACP,eAAe,MAAM,OAAO,EAAE,EAC9B,UACA,WACA,gBAAgB,KAChB,cAAc,WACd,gBAAgB,YAChB,gBAAgB,cAElB,QACG;CACH,MAAM,iBAAiBA,MAAM,OAC3B,KACD;AAED,OAAM,sBACQ;AACV,MAAI,eAAe,QAAS,cAAa,eAAe,QAAQ;IAElE,EAAE,CACH;CAED,MAAM,kBAAkB,SAAiB;AACvC,MAAI,CAAC,cAAe;AACpB,MAAI,eAAe,QAAS,cAAa,eAAe,QAAQ;AAChE,iBAAe,UAAU,iBAAiB;AACxC,kBAAe,UAAU;AACzB,iBAAc,KAAK;KAClB,cAAc;;CAGnB,MAAM,kBAAkB;EACtB,MAAM,OAAO,KAAK,IAAI,KAAK,QAAQ,KAAK;AACxC,MAAI,SAAS,OAAO;AAClB,iBAAc,KAAK;AACnB,kBAAe,KAAK;;;CAGxB,MAAM,kBAAkB;EACtB,MAAM,OAAO,KAAK,IAAI,KAAK,QAAQ,KAAK;AACxC,MAAI,SAAS,OAAO;AAClB,iBAAc,KAAK;AACnB,kBAAe,KAAK;;;CAIxB,MAAM,QAAQ,SAAS;CACvB,MAAM,QAAQ,SAAS;AAEvB,QACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EACO;EACL,MAAK;EACL,cAAY;EACZ,YAAA,GAAA,OAAA,IACE,0FACA,UACD;YAPH;GASE,iBAAA,GAAA,kBAAA,KAAC,UAAD;IACE,MAAK;IACL,cAAY;IACZ,SAAS;IACT,UAAU,YAAY;IACtB,WAAU;cAEV,iBAAA,GAAA,kBAAA,KAACC,8BAAAA,gBAAD;KAAgB,WAAU;KAAc,MAAK;KAAiB,CAAA;IACvD,CAAA;GACT,iBAAA,GAAA,kBAAA,KAAC,QAAD;IACE,WAAU;IACV,aAAU;cAET,YAAY,MAAM;IACd,CAAA;GACP,iBAAA,GAAA,kBAAA,KAAC,UAAD;IACE,MAAK;IACL,cAAY;IACZ,SAAS;IACT,UAAU,YAAY;IACtB,WAAU;cAEV,iBAAA,GAAA,kBAAA,KAACA,8BAAAA,gBAAD;KAAgB,WAAU;KAAc,MAAK;KAAkB,CAAA;IACxD,CAAA;GACL;;EAGX;AAED,QAAQ,cAAc"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/stepper.d.ts
|
|
6
|
+
interface StepperProps {
|
|
7
|
+
value: number;
|
|
8
|
+
onValueChange: (value: number) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Fires once after the user stops interacting (default: 400ms after the last
|
|
11
|
+
* click). Use this for side effects like persisting the value, so rapid
|
|
12
|
+
* clicks don't fan out into a request per click.
|
|
13
|
+
*/
|
|
14
|
+
onValueCommit?: (value: number) => void;
|
|
15
|
+
min?: number;
|
|
16
|
+
max?: number;
|
|
17
|
+
step?: number;
|
|
18
|
+
formatValue?: (value: number) => string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Delay (ms) after the last click before `onValueCommit` fires. */
|
|
22
|
+
commitDelayMs?: number;
|
|
23
|
+
/** Accessible label, e.g. "Sunshare percentage". */
|
|
24
|
+
'aria-label'?: string;
|
|
25
|
+
/** Accessible label for the decrement button. Defaults to `"Decrease"`. */
|
|
26
|
+
decreaseLabel?: string;
|
|
27
|
+
/** Accessible label for the increment button. Defaults to `"Increase"`. */
|
|
28
|
+
increaseLabel?: string;
|
|
29
|
+
}
|
|
30
|
+
declare const Stepper: React$1.ForwardRefExoticComponent<StepperProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { Stepper, type StepperProps };
|
|
33
|
+
//# sourceMappingURL=stepper.d.cts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
|
|
5
|
+
//#region src/components/stepper.d.ts
|
|
6
|
+
interface StepperProps {
|
|
7
|
+
value: number;
|
|
8
|
+
onValueChange: (value: number) => void;
|
|
9
|
+
/**
|
|
10
|
+
* Fires once after the user stops interacting (default: 400ms after the last
|
|
11
|
+
* click). Use this for side effects like persisting the value, so rapid
|
|
12
|
+
* clicks don't fan out into a request per click.
|
|
13
|
+
*/
|
|
14
|
+
onValueCommit?: (value: number) => void;
|
|
15
|
+
min?: number;
|
|
16
|
+
max?: number;
|
|
17
|
+
step?: number;
|
|
18
|
+
formatValue?: (value: number) => string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
/** Delay (ms) after the last click before `onValueCommit` fires. */
|
|
22
|
+
commitDelayMs?: number;
|
|
23
|
+
/** Accessible label, e.g. "Sunshare percentage". */
|
|
24
|
+
'aria-label'?: string;
|
|
25
|
+
/** Accessible label for the decrement button. Defaults to `"Decrease"`. */
|
|
26
|
+
decreaseLabel?: string;
|
|
27
|
+
/** Accessible label for the increment button. Defaults to `"Increase"`. */
|
|
28
|
+
increaseLabel?: string;
|
|
29
|
+
}
|
|
30
|
+
declare const Stepper: React$1.ForwardRefExoticComponent<StepperProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { Stepper, type StepperProps };
|
|
33
|
+
//# sourceMappingURL=stepper.d.ts.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { MaterialSymbol } from "../icons/material-symbol.js";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/stepper.tsx
|
|
7
|
+
const Stepper = React$1.forwardRef(({ value, onValueChange, onValueCommit, min = 0, max = 100, step = 1, formatValue = (v) => String(v), disabled, className, commitDelayMs = 400, "aria-label": ariaLabel, decreaseLabel = "Decrease", increaseLabel = "Increase" }, ref) => {
|
|
8
|
+
const commitTimerRef = React$1.useRef(null);
|
|
9
|
+
React$1.useEffect(() => () => {
|
|
10
|
+
if (commitTimerRef.current) clearTimeout(commitTimerRef.current);
|
|
11
|
+
}, []);
|
|
12
|
+
const scheduleCommit = (next) => {
|
|
13
|
+
if (!onValueCommit) return;
|
|
14
|
+
if (commitTimerRef.current) clearTimeout(commitTimerRef.current);
|
|
15
|
+
commitTimerRef.current = setTimeout(() => {
|
|
16
|
+
commitTimerRef.current = null;
|
|
17
|
+
onValueCommit(next);
|
|
18
|
+
}, commitDelayMs);
|
|
19
|
+
};
|
|
20
|
+
const decrement = () => {
|
|
21
|
+
const next = Math.max(min, value - step);
|
|
22
|
+
if (next !== value) {
|
|
23
|
+
onValueChange(next);
|
|
24
|
+
scheduleCommit(next);
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const increment = () => {
|
|
28
|
+
const next = Math.min(max, value + step);
|
|
29
|
+
if (next !== value) {
|
|
30
|
+
onValueChange(next);
|
|
31
|
+
scheduleCommit(next);
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
const atMin = value <= min;
|
|
35
|
+
const atMax = value >= max;
|
|
36
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
37
|
+
ref,
|
|
38
|
+
role: "group",
|
|
39
|
+
"aria-label": ariaLabel,
|
|
40
|
+
className: cn("inline-flex h-12 w-full items-center justify-between rounded-xl bg-base-gray-soft px-2", className),
|
|
41
|
+
children: [
|
|
42
|
+
/* @__PURE__ */ jsx("button", {
|
|
43
|
+
type: "button",
|
|
44
|
+
"aria-label": decreaseLabel,
|
|
45
|
+
onClick: decrement,
|
|
46
|
+
disabled: disabled || atMin,
|
|
47
|
+
className: "inline-flex size-8 items-center justify-center rounded-md text-gray transition-colors hover:bg-slate-a3 disabled:opacity-40 disabled:hover:bg-transparent",
|
|
48
|
+
children: /* @__PURE__ */ jsx(MaterialSymbol, {
|
|
49
|
+
className: "text-[16px]",
|
|
50
|
+
name: "chevron_left"
|
|
51
|
+
})
|
|
52
|
+
}),
|
|
53
|
+
/* @__PURE__ */ jsx("span", {
|
|
54
|
+
className: "text-base font-semibold text-gray tabular-nums select-none",
|
|
55
|
+
"aria-live": "polite",
|
|
56
|
+
children: formatValue(value)
|
|
57
|
+
}),
|
|
58
|
+
/* @__PURE__ */ jsx("button", {
|
|
59
|
+
type: "button",
|
|
60
|
+
"aria-label": increaseLabel,
|
|
61
|
+
onClick: increment,
|
|
62
|
+
disabled: disabled || atMax,
|
|
63
|
+
className: "inline-flex size-8 items-center justify-center rounded-md text-gray transition-colors hover:bg-slate-a3 disabled:opacity-40 disabled:hover:bg-transparent",
|
|
64
|
+
children: /* @__PURE__ */ jsx(MaterialSymbol, {
|
|
65
|
+
className: "text-[16px]",
|
|
66
|
+
name: "chevron_right"
|
|
67
|
+
})
|
|
68
|
+
})
|
|
69
|
+
]
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
Stepper.displayName = "Stepper";
|
|
73
|
+
//#endregion
|
|
74
|
+
export { Stepper };
|
|
75
|
+
|
|
76
|
+
//# sourceMappingURL=stepper.js.map
|