@epilot/spark-ui 0.31.1 → 0.32.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/button-B_RNHEc7.d.ts +52 -0
- package/dist/button-DBcEcIMk.d.cts +52 -0
- package/dist/cn-DzRH6EW_.d.cts +4 -0
- package/dist/cn-DzRH6EW_.d.ts +4 -0
- package/dist/components/accordion.cjs +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert-dialog.cjs +1 -1
- package/dist/components/alert-dialog.d.cts +1 -1
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/attachment.cjs +2 -2
- package/dist/components/attachment.d.cts +3 -3
- package/dist/components/attachment.d.ts +3 -3
- package/dist/components/attachment.js +2 -2
- package/dist/components/autocomplete.cjs +9 -7
- package/dist/components/autocomplete.cjs.map +1 -1
- package/dist/components/autocomplete.d.cts +4 -10
- package/dist/components/autocomplete.d.ts +4 -10
- package/dist/components/autocomplete.js +9 -7
- package/dist/components/autocomplete.js.map +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge.cjs +1 -1
- package/dist/components/badge.js +2 -2
- package/dist/components/banner.cjs +1 -1
- package/dist/components/banner.js +1 -1
- package/dist/components/bar-chart.cjs +1 -1
- package/dist/components/bar-chart.js +2 -2
- package/dist/components/box.cjs +2 -2
- package/dist/components/box.cjs.map +1 -1
- package/dist/components/box.js +3 -3
- package/dist/components/box.js.map +1 -1
- package/dist/components/breadcrumbs.cjs +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/bubble.cjs +2 -2
- package/dist/components/bubble.d.cts +2 -2
- package/dist/components/bubble.d.ts +2 -2
- package/dist/components/bubble.js +2 -2
- package/dist/components/button-group.cjs +1 -1
- package/dist/components/button-group.js +2 -2
- package/dist/components/button.cjs +13 -30
- package/dist/components/button.cjs.map +1 -1
- package/dist/components/button.d.cts +3 -36
- package/dist/components/button.d.ts +3 -36
- package/dist/components/button.js +14 -31
- package/dist/components/button.js.map +1 -1
- package/dist/components/calendar.cjs +32 -4
- package/dist/components/calendar.cjs.map +1 -1
- package/dist/components/calendar.d.cts +2 -2
- package/dist/components/calendar.d.ts +2 -2
- package/dist/components/calendar.js +34 -6
- package/dist/components/calendar.js.map +1 -1
- package/dist/components/callout.cjs +1 -1
- package/dist/components/callout.d.cts +1 -1
- package/dist/components/callout.d.ts +1 -1
- package/dist/components/callout.js +1 -1
- package/dist/components/card.cjs +6 -5
- package/dist/components/card.cjs.map +1 -1
- package/dist/components/card.d.cts +9 -8
- package/dist/components/card.d.ts +9 -8
- package/dist/components/card.js +7 -6
- package/dist/components/card.js.map +1 -1
- package/dist/components/checkbox-card.cjs +157 -65
- package/dist/components/checkbox-card.cjs.map +1 -1
- package/dist/components/checkbox-card.d.cts +38 -18
- package/dist/components/checkbox-card.d.ts +38 -18
- package/dist/components/checkbox-card.js +155 -66
- package/dist/components/checkbox-card.js.map +1 -1
- package/dist/components/checkbox-group.cjs +1 -1
- package/dist/components/checkbox-group.js +2 -2
- package/dist/components/checkbox.cjs +5 -18
- package/dist/components/checkbox.cjs.map +1 -1
- package/dist/components/checkbox.js +7 -20
- package/dist/components/checkbox.js.map +1 -1
- package/dist/components/combobox.cjs +2 -1
- package/dist/components/combobox.cjs.map +1 -1
- package/dist/components/combobox.js +2 -1
- package/dist/components/combobox.js.map +1 -1
- package/dist/components/dialog.cjs +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/drawer.cjs +1 -1
- package/dist/components/drawer.js +1 -1
- package/dist/components/dropdown-menu.cjs +1 -1
- package/dist/components/dropdown-menu.js +1 -1
- package/dist/components/dropzone.cjs +224 -0
- package/dist/components/dropzone.cjs.map +1 -0
- package/dist/components/dropzone.d.cts +66 -0
- package/dist/components/dropzone.d.ts +66 -0
- package/dist/components/dropzone.js +215 -0
- package/dist/components/dropzone.js.map +1 -0
- package/dist/components/empty-state.cjs +1 -1
- package/dist/components/empty-state.d.cts +1 -1
- package/dist/components/empty-state.d.ts +1 -1
- package/dist/components/empty-state.js +1 -1
- package/dist/components/entity-card.cjs +1 -1
- package/dist/components/entity-card.js +1 -1
- package/dist/components/field.cjs +69 -11
- package/dist/components/field.cjs.map +1 -1
- package/dist/components/field.d.cts +16 -3
- package/dist/components/field.d.ts +16 -3
- package/dist/components/field.js +68 -11
- package/dist/components/field.js.map +1 -1
- package/dist/components/hero-metric.cjs +1 -1
- package/dist/components/hero-metric.js +1 -1
- package/dist/components/icon.js +1 -1
- package/dist/components/image-carousel.cjs +183 -0
- package/dist/components/image-carousel.cjs.map +1 -0
- package/dist/components/image-carousel.d.cts +54 -0
- package/dist/components/image-carousel.d.ts +54 -0
- package/dist/components/image-carousel.js +174 -0
- package/dist/components/image-carousel.js.map +1 -0
- package/dist/components/info-block.cjs +1 -1
- package/dist/components/info-block.d.cts +1 -1
- package/dist/components/info-block.d.ts +1 -1
- package/dist/components/info-block.js +1 -1
- package/dist/components/input-date-time.cjs +16 -202
- package/dist/components/input-date-time.cjs.map +1 -1
- package/dist/components/input-date-time.d.cts +14 -31
- package/dist/components/input-date-time.d.ts +14 -31
- package/dist/components/input-date-time.js +15 -202
- package/dist/components/input-date-time.js.map +1 -1
- package/dist/components/input-date.cjs +14 -146
- package/dist/components/input-date.cjs.map +1 -1
- package/dist/components/input-date.d.cts +11 -19
- package/dist/components/input-date.d.ts +11 -19
- package/dist/components/input-date.js +13 -146
- package/dist/components/input-date.js.map +1 -1
- package/dist/components/input-group.cjs +4 -3
- package/dist/components/input-group.cjs.map +1 -1
- package/dist/components/input-group.d.cts +2 -30
- package/dist/components/input-group.d.ts +2 -30
- package/dist/components/input-group.js +3 -2
- package/dist/components/input-group.js.map +1 -1
- package/dist/components/input-otp.cjs +3 -3
- package/dist/components/input-otp.cjs.map +1 -1
- package/dist/components/input-otp.js +3 -3
- package/dist/components/input-otp.js.map +1 -1
- package/dist/components/input.cjs +4 -2
- package/dist/components/input.cjs.map +1 -1
- package/dist/components/input.d.cts +2 -12
- package/dist/components/input.d.ts +2 -12
- package/dist/components/input.js +4 -2
- package/dist/components/input.js.map +1 -1
- package/dist/components/line-chart.cjs +2 -2
- package/dist/components/line-chart.js +3 -3
- package/dist/components/list.cjs +2 -2
- package/dist/components/list.js +2 -2
- package/dist/components/marker.cjs +2 -2
- package/dist/components/marker.d.cts +1 -1
- package/dist/components/marker.d.ts +1 -1
- package/dist/components/marker.js +2 -2
- package/dist/components/message-scroller.cjs +1 -1
- package/dist/components/message-scroller.d.cts +1 -1
- package/dist/components/message-scroller.d.ts +1 -1
- package/dist/components/message-scroller.js +2 -2
- package/dist/components/page-header.cjs +1 -1
- package/dist/components/page-header.d.cts +2 -2
- package/dist/components/page-header.d.ts +2 -2
- package/dist/components/page-header.js +1 -1
- package/dist/components/pagination.cjs +124 -0
- package/dist/components/pagination.cjs.map +1 -0
- package/dist/components/pagination.d.cts +42 -0
- package/dist/components/pagination.d.ts +42 -0
- package/dist/components/pagination.js +115 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/period-tabs.cjs +1 -1
- package/dist/components/period-tabs.d.cts +1 -1
- package/dist/components/period-tabs.d.ts +1 -1
- package/dist/components/period-tabs.js +1 -1
- package/dist/components/pill.cjs +43 -24
- package/dist/components/pill.cjs.map +1 -1
- package/dist/components/pill.d.cts +13 -3
- package/dist/components/pill.d.ts +13 -3
- package/dist/components/pill.js +44 -26
- package/dist/components/pill.js.map +1 -1
- package/dist/components/popover.cjs +1 -1
- package/dist/components/popover.d.cts +2 -29
- package/dist/components/popover.d.ts +2 -29
- package/dist/components/popover.js +1 -1
- package/dist/components/power-history-chart.cjs +2 -2
- package/dist/components/power-history-chart.js +3 -3
- package/dist/components/power-network.cjs +1 -1
- package/dist/components/power-network.js +2 -2
- package/dist/components/progress.cjs +126 -13
- package/dist/components/progress.cjs.map +1 -1
- package/dist/components/progress.d.cts +19 -10
- package/dist/components/progress.d.ts +19 -10
- package/dist/components/progress.js +126 -15
- package/dist/components/progress.js.map +1 -1
- package/dist/components/radio-card-group.cjs +137 -70
- package/dist/components/radio-card-group.cjs.map +1 -1
- package/dist/components/radio-card-group.d.cts +37 -15
- package/dist/components/radio-card-group.d.ts +37 -15
- package/dist/components/radio-card-group.js +135 -71
- package/dist/components/radio-card-group.js.map +1 -1
- package/dist/components/radio.cjs +1 -1
- package/dist/components/radio.js +2 -2
- package/dist/components/schedule-list.cjs +1 -1
- package/dist/components/schedule-list.js +1 -1
- package/dist/components/select.cjs +11 -4
- package/dist/components/select.cjs.map +1 -1
- package/dist/components/select.d.cts +1 -0
- package/dist/components/select.d.ts +1 -0
- package/dist/components/select.js +11 -4
- package/dist/components/select.js.map +1 -1
- package/dist/components/separator.cjs +1 -1
- package/dist/components/separator.js +1 -1
- package/dist/components/sheet.cjs +1 -1
- package/dist/components/sheet.js +1 -1
- package/dist/components/skeleton.cjs +1 -1
- package/dist/components/skeleton.js +1 -1
- package/dist/components/solar-forecast-chart.js +1 -1
- package/dist/components/spark-home.js +1 -1
- package/dist/components/step-indicator.cjs +128 -0
- package/dist/components/step-indicator.cjs.map +1 -0
- package/dist/components/step-indicator.d.cts +25 -0
- package/dist/components/step-indicator.d.ts +25 -0
- package/dist/components/step-indicator.js +124 -0
- package/dist/components/step-indicator.js.map +1 -0
- package/dist/components/stepper.cjs +3 -2
- package/dist/components/stepper.cjs.map +1 -1
- package/dist/components/stepper.d.cts +1 -2
- package/dist/components/stepper.d.ts +1 -2
- package/dist/components/stepper.js +3 -2
- package/dist/components/stepper.js.map +1 -1
- package/dist/components/switch-group.cjs +1 -1
- package/dist/components/switch-group.js +2 -2
- package/dist/components/switch.js +1 -1
- package/dist/components/table.cjs +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.cjs +3 -3
- package/dist/components/tabs.cjs.map +1 -1
- package/dist/components/tabs.js +2 -2
- package/dist/components/tabs.js.map +1 -1
- package/dist/components/textarea.cjs +8 -2
- package/dist/components/textarea.cjs.map +1 -1
- package/dist/components/textarea.js +8 -2
- package/dist/components/textarea.js.map +1 -1
- package/dist/components/theme.cjs +1 -1
- package/dist/components/theme.js +2 -2
- package/dist/components/time-picker.cjs +3 -38
- package/dist/components/time-picker.cjs.map +1 -1
- package/dist/components/time-picker.js +1 -36
- package/dist/components/time-picker.js.map +1 -1
- package/dist/components/toast.cjs +1 -1
- package/dist/components/toast.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.d.cts +1 -1
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip.cjs +3 -2
- package/dist/components/tooltip.cjs.map +1 -1
- package/dist/components/tooltip.d.cts +3 -2
- package/dist/components/tooltip.d.ts +3 -2
- package/dist/components/tooltip.js +3 -2
- package/dist/components/tooltip.js.map +1 -1
- package/dist/components/trace.cjs +1 -1
- package/dist/components/trace.js +1 -1
- package/dist/hooks/use-isomorphic-layout-effect.cjs +9 -0
- package/dist/hooks/use-isomorphic-layout-effect.cjs.map +1 -0
- package/dist/hooks/use-isomorphic-layout-effect.d.cts +9 -0
- package/dist/hooks/use-isomorphic-layout-effect.d.ts +9 -0
- package/dist/hooks/use-isomorphic-layout-effect.js +8 -0
- package/dist/hooks/use-isomorphic-layout-effect.js.map +1 -0
- package/dist/input-BZFPU-j4.d.cts +14 -0
- package/dist/input-group-5lh67qyY.d.cts +32 -0
- package/dist/input-group-Bc9_sPPN.d.ts +32 -0
- package/dist/input-zB3zmz9J.d.ts +14 -0
- package/dist/lib/accent-theme.cjs +46 -22
- package/dist/lib/accent-theme.cjs.map +1 -1
- package/dist/lib/accent-theme.js +26 -1
- package/dist/lib/accent-theme.js.map +1 -1
- package/dist/lib/calendar-field.cjs +11 -0
- package/dist/lib/calendar-field.cjs.map +1 -0
- package/dist/lib/calendar-field.d.cts +18 -0
- package/dist/lib/calendar-field.d.ts +18 -0
- package/dist/lib/calendar-field.js +8 -0
- package/dist/lib/calendar-field.js.map +1 -0
- package/dist/lib/calendar-lists.cjs +86 -97
- package/dist/lib/calendar-lists.cjs.map +1 -1
- package/dist/lib/calendar-lists.d.cts +30 -2
- package/dist/lib/calendar-lists.d.ts +30 -2
- package/dist/lib/calendar-lists.js +85 -97
- package/dist/lib/calendar-lists.js.map +1 -1
- package/dist/lib/card-control.cjs +18 -0
- package/dist/lib/card-control.cjs.map +1 -0
- package/dist/lib/card-control.d.cts +10 -0
- package/dist/lib/card-control.d.ts +10 -0
- package/dist/lib/card-control.js +17 -0
- package/dist/lib/card-control.js.map +1 -0
- package/dist/lib/checkbox-box.cjs +30 -0
- package/dist/lib/checkbox-box.cjs.map +1 -0
- package/dist/lib/checkbox-box.d.cts +13 -0
- package/dist/lib/checkbox-box.d.ts +13 -0
- package/dist/lib/checkbox-box.js +27 -0
- package/dist/lib/checkbox-box.js.map +1 -0
- package/dist/lib/container-chrome.cjs +8 -1
- package/dist/lib/container-chrome.cjs.map +1 -1
- package/dist/lib/container-chrome.d.cts +4 -2
- package/dist/lib/container-chrome.d.ts +4 -2
- package/dist/lib/container-chrome.js +8 -2
- package/dist/lib/container-chrome.js.map +1 -1
- package/dist/lib/date-field-input.cjs +121 -0
- package/dist/lib/date-field-input.cjs.map +1 -0
- package/dist/lib/date-field-input.d.cts +14 -0
- package/dist/lib/date-field-input.d.ts +14 -0
- package/dist/lib/date-field-input.js +118 -0
- package/dist/lib/date-field-input.js.map +1 -0
- package/dist/lib/date-field-time-list.cjs +81 -0
- package/dist/lib/date-field-time-list.cjs.map +1 -0
- package/dist/lib/date-field-time-list.d.cts +18 -0
- package/dist/lib/date-field-time-list.d.ts +18 -0
- package/dist/lib/date-field-time-list.js +77 -0
- package/dist/lib/date-field-time-list.js.map +1 -0
- package/dist/lib/date-field.cjs +183 -0
- package/dist/lib/date-field.cjs.map +1 -0
- package/dist/lib/date-field.d.cts +76 -0
- package/dist/lib/date-field.d.ts +76 -0
- package/dist/lib/date-field.js +177 -0
- package/dist/lib/date-field.js.map +1 -0
- package/dist/lib/date-time-mask.cjs +148 -102
- package/dist/lib/date-time-mask.cjs.map +1 -1
- package/dist/lib/date-time-mask.d.cts +21 -3
- package/dist/lib/date-time-mask.d.ts +21 -3
- package/dist/lib/date-time-mask.js +142 -103
- package/dist/lib/date-time-mask.js.map +1 -1
- package/dist/lib/generate-radix-colors.cjs +64 -5
- package/dist/lib/generate-radix-colors.cjs.map +1 -1
- package/dist/lib/generate-radix-colors.js +61 -1
- package/dist/lib/generate-radix-colors.js.map +1 -1
- package/dist/lib/input-box-variants.cjs +3 -3
- package/dist/lib/input-box-variants.cjs.map +1 -1
- package/dist/lib/input-box-variants.d.cts +1 -1
- package/dist/lib/input-box-variants.d.ts +1 -1
- package/dist/lib/input-box-variants.js +3 -3
- package/dist/lib/input-box-variants.js.map +1 -1
- package/dist/lib/mask-hint.cjs +15 -0
- package/dist/lib/mask-hint.cjs.map +1 -0
- package/dist/lib/mask-hint.d.cts +10 -0
- package/dist/lib/mask-hint.d.ts +10 -0
- package/dist/lib/mask-hint.js +14 -0
- package/dist/lib/mask-hint.js.map +1 -0
- package/dist/lib/option-list.cjs +71 -0
- package/dist/lib/option-list.cjs.map +1 -0
- package/dist/lib/option-list.d.cts +4 -0
- package/dist/lib/option-list.d.ts +4 -0
- package/dist/lib/option-list.js +67 -0
- package/dist/lib/option-list.js.map +1 -0
- package/dist/lib/time-grid.cjs +34 -0
- package/dist/lib/time-grid.cjs.map +1 -0
- package/dist/lib/time-grid.d.cts +9 -0
- package/dist/lib/time-grid.d.ts +9 -0
- package/dist/lib/time-grid.js +31 -0
- package/dist/lib/time-grid.js.map +1 -0
- package/dist/lib/toggle-group-context.d.cts +1 -1
- package/dist/lib/toggle-group-context.d.ts +1 -1
- package/dist/option-list-CxhR_DGq.d.cts +34 -0
- package/dist/option-list-CxhR_DGq.d.ts +34 -0
- package/dist/popover-DmcqNOkO.d.cts +31 -0
- package/dist/popover-DmcqNOkO.d.ts +31 -0
- package/dist/styles/spark-default.css +21 -0
- package/dist/styles/theme.css +2 -1
- package/dist/utils/cn.d.cts +1 -1
- package/dist/utils/cn.d.ts +1 -1
- package/package.json +3 -3
- package/dist/calendar-lists-CTby2kR5.d.cts +0 -27
- package/dist/calendar-lists-DoloqsCN.d.ts +0 -27
- package/dist/lib/calendar-day-button.cjs +0 -23
- package/dist/lib/calendar-day-button.cjs.map +0 -1
- package/dist/lib/calendar-day-button.d.cts +0 -14
- package/dist/lib/calendar-day-button.d.ts +0 -14
- package/dist/lib/calendar-day-button.js +0 -20
- package/dist/lib/calendar-day-button.js.map +0 -1
- package/dist/lib/input-date-parts.cjs +0 -155
- package/dist/lib/input-date-parts.cjs.map +0 -1
- package/dist/lib/input-date-parts.d.cts +0 -53
- package/dist/lib/input-date-parts.d.ts +0 -53
- package/dist/lib/input-date-parts.js +0 -148
- package/dist/lib/input-date-parts.js.map +0 -1
- package/dist/lib/scroll-within.cjs +0 -27
- package/dist/lib/scroll-within.cjs.map +0 -1
- package/dist/lib/scroll-within.d.cts +0 -14
- package/dist/lib/scroll-within.d.ts +0 -14
- package/dist/lib/scroll-within.js +0 -25
- package/dist/lib/scroll-within.js.map +0 -1
|
@@ -1,31 +1,4 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
6
|
-
|
|
7
|
-
//#region src/components/popover.d.ts
|
|
8
|
-
declare function Popover(props: React$1.ComponentProps<typeof Popover$1.Root>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
declare function PopoverTrigger(props: React$1.ComponentProps<typeof Popover$1.Trigger>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
declare function PopoverClose(props: React$1.ComponentProps<typeof Popover$1.Close>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
/** Anchors the popover to this element instead of the trigger. Pass `render` to
|
|
12
|
-
* wrap an existing element (was radix `asChild`). */
|
|
13
|
-
declare function PopoverAnchor({
|
|
14
|
-
render,
|
|
15
|
-
...props
|
|
16
|
-
}: useRender.ComponentProps<'div'>): React$1.ReactElement<unknown, string | React$1.JSXElementConstructor<any>>;
|
|
17
|
-
type PopoverContentProps = React$1.ComponentProps<typeof Popover$1.Popup> & Pick<Popover$1.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset' | 'anchor' | 'collisionAvoidance'> & Pick<Popover$1.Portal.Props, 'container'>;
|
|
18
|
-
declare function PopoverContent({
|
|
19
|
-
className,
|
|
20
|
-
align,
|
|
21
|
-
sideOffset,
|
|
22
|
-
side,
|
|
23
|
-
alignOffset,
|
|
24
|
-
anchor,
|
|
25
|
-
collisionAvoidance,
|
|
26
|
-
container,
|
|
27
|
-
...props
|
|
28
|
-
}: PopoverContentProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
//#endregion
|
|
30
|
-
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };
|
|
31
|
-
//# sourceMappingURL=popover.d.ts.map
|
|
3
|
+
import { a as PopoverTrigger, i as PopoverContent, n as PopoverAnchor, r as PopoverClose, t as Popover } from "../popover-DmcqNOkO.js";
|
|
4
|
+
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
import { PortalTheme } from "./theme.js";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
5
|
import { mergeProps } from "@base-ui/react/merge-props";
|
|
7
6
|
import { useRender } from "@base-ui/react/use-render";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import { Popover as Popover$1 } from "@base-ui/react/popover";
|
|
9
9
|
//#region src/components/popover.tsx
|
|
10
10
|
const PopoverAnchorContext = React$1.createContext(null);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
4
|
-
const require_hooks_use_chart_zoom = require("../hooks/use-chart-zoom.cjs");
|
|
5
|
-
const require_hooks_use_reduced_motion = require("../hooks/use-reduced-motion.cjs");
|
|
6
4
|
require("../utils/chars.cjs");
|
|
7
5
|
const require_utils_format = require("../utils/format.cjs");
|
|
8
6
|
const require_utils_chart_scale = require("../utils/chart-scale.cjs");
|
|
9
7
|
const require_utils_chart_time_ticks = require("../utils/chart-time-ticks.cjs");
|
|
8
|
+
const require_hooks_use_chart_zoom = require("../hooks/use-chart-zoom.cjs");
|
|
9
|
+
const require_hooks_use_reduced_motion = require("../hooks/use-reduced-motion.cjs");
|
|
10
10
|
const require_components_chart = require("./chart.cjs");
|
|
11
11
|
const require_components_series_legend = require("./series-legend.cjs");
|
|
12
12
|
const require_components_typography = require("./typography.cjs");
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useAnimatedChartDomain, useChartZoom } from "../hooks/use-chart-zoom.js";
|
|
3
|
-
import { useReducedMotion } from "../hooks/use-reduced-motion.js";
|
|
4
|
-
import { cn } from "../utils/cn.js";
|
|
5
2
|
import "../utils/chars.js";
|
|
6
3
|
import { twoDecimalFormat } from "../utils/format.js";
|
|
7
4
|
import { buildYAxisScale, formatYAxisTick, measureYAxisGutter } from "../utils/chart-scale.js";
|
|
8
5
|
import { buildTimeTicks } from "../utils/chart-time-ticks.js";
|
|
6
|
+
import { cn } from "../utils/cn.js";
|
|
7
|
+
import { useAnimatedChartDomain, useChartZoom } from "../hooks/use-chart-zoom.js";
|
|
8
|
+
import { useReducedMotion } from "../hooks/use-reduced-motion.js";
|
|
9
9
|
import { ChartTooltipCard, ChartZoomResetButton, clampTooltipPosition, useMeasuredSize } from "./chart.js";
|
|
10
10
|
import { SeriesLegend } from "./series-legend.js";
|
|
11
11
|
import { SectionTitle } from "./typography.js";
|
|
@@ -5,8 +5,8 @@ const require_components_skeleton = require("./skeleton.cjs");
|
|
|
5
5
|
const require_components_typography = require("./typography.cjs");
|
|
6
6
|
const require_components_number_flow = require("./number-flow.cjs");
|
|
7
7
|
let react = require("react");
|
|
8
|
-
let react_jsx_runtime = require("react/jsx-runtime");
|
|
9
8
|
let _epilot_spark_icons = require("@epilot/spark-icons");
|
|
9
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
let cn = require("cn");
|
|
11
11
|
//#region src/components/power-network.tsx
|
|
12
12
|
const SOURCE_VARIANTS = {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { useReducedMotion } from "../hooks/use-reduced-motion.js";
|
|
3
2
|
import { cn } from "../utils/cn.js";
|
|
3
|
+
import { useReducedMotion } from "../hooks/use-reduced-motion.js";
|
|
4
4
|
import { Skeleton } from "./skeleton.js";
|
|
5
5
|
import { SectionTitle } from "./typography.js";
|
|
6
6
|
import NumberFlow from "./number-flow.js";
|
|
7
7
|
import { createContext, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
8
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
8
|
import { Home } from "@epilot/spark-icons";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
10
|
//#region src/components/power-network.tsx
|
|
11
11
|
const SOURCE_VARIANTS = {
|
|
12
12
|
grid: {
|
|
@@ -4,31 +4,144 @@ const require_chunk = require("../chunk-DY84GLCh.cjs");
|
|
|
4
4
|
let react = require("react");
|
|
5
5
|
react = require_chunk.__toESM(react);
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let _base_ui_react_progress = require("@base-ui/react/progress");
|
|
7
8
|
let cn = require("cn");
|
|
8
9
|
//#region src/components/progress.tsx
|
|
10
|
+
const ProgressValueTextContext = react.createContext(null);
|
|
9
11
|
const sizeClasses = {
|
|
10
12
|
sm: "h-1",
|
|
11
13
|
default: "h-2",
|
|
12
14
|
lg: "h-3"
|
|
13
15
|
};
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
16
|
+
const ringSizes = {
|
|
17
|
+
sm: {
|
|
18
|
+
diameter: 16,
|
|
19
|
+
stroke: 2
|
|
20
|
+
},
|
|
21
|
+
default: {
|
|
22
|
+
diameter: 20,
|
|
23
|
+
stroke: 2.5
|
|
24
|
+
},
|
|
25
|
+
lg: {
|
|
26
|
+
diameter: 40,
|
|
27
|
+
stroke: 4
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
const fillMotion = "duration-[250ms] ease-[var(--ease-move,cubic-bezier(0.645,0.045,0.355,1))]";
|
|
31
|
+
function fractionOf(value, min, max) {
|
|
32
|
+
if (max <= min) return 0;
|
|
33
|
+
return Math.min(1, Math.max(0, (value - min) / (max - min)));
|
|
34
|
+
}
|
|
35
|
+
function percentOfRange(min, max, locale) {
|
|
36
|
+
const percent = new Intl.NumberFormat(locale, { style: "percent" });
|
|
37
|
+
return (_formatted, value) => percent.format(fractionOf(value ?? min, min, max));
|
|
38
|
+
}
|
|
39
|
+
function Ring({ fraction, size }) {
|
|
40
|
+
const { diameter, stroke } = ringSizes[size];
|
|
41
|
+
const radius = (diameter - stroke) / 2;
|
|
42
|
+
const center = diameter / 2;
|
|
43
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_progress.Progress.Track, {
|
|
44
|
+
"data-slot": "progress-track",
|
|
45
|
+
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", {
|
|
46
|
+
"aria-hidden": "true",
|
|
47
|
+
className: "order-first shrink-0 -rotate-90",
|
|
48
|
+
fill: "none",
|
|
49
|
+
height: diameter,
|
|
50
|
+
viewBox: `0 0 ${diameter} ${diameter}`,
|
|
51
|
+
width: diameter
|
|
52
|
+
}),
|
|
53
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
54
|
+
className: "stroke-gray-a4",
|
|
55
|
+
cx: center,
|
|
56
|
+
cy: center,
|
|
57
|
+
r: radius,
|
|
58
|
+
strokeWidth: stroke
|
|
59
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_progress.Progress.Indicator, {
|
|
60
|
+
"data-slot": "progress-indicator",
|
|
61
|
+
render: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
62
|
+
className: (0, cn.cn)("stroke-(--spark-style-bg,var(--color-primary)) transition-[stroke-dashoffset] motion-reduce:transition-none", fillMotion),
|
|
63
|
+
cx: center,
|
|
64
|
+
cy: center,
|
|
65
|
+
r: radius,
|
|
66
|
+
pathLength: 1,
|
|
67
|
+
strokeDasharray: 1,
|
|
68
|
+
strokeDashoffset: 1 - fraction,
|
|
69
|
+
strokeLinecap: "round",
|
|
70
|
+
strokeWidth: stroke,
|
|
71
|
+
visibility: fraction === 0 ? "hidden" : void 0
|
|
72
|
+
})
|
|
73
|
+
})]
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
function Bar({ fraction, size }) {
|
|
77
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_progress.Progress.Track, {
|
|
78
|
+
"data-slot": "progress-track",
|
|
79
|
+
className: (0, cn.cn)("col-span-2 block w-full overflow-hidden rounded-full bg-gray-a4", sizeClasses[size]),
|
|
80
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_progress.Progress.Indicator, {
|
|
81
|
+
"data-slot": "progress-indicator",
|
|
82
|
+
className: (0, cn.cn)("block h-full origin-left rounded-full bg-(--spark-style-bg,var(--color-primary)) transition-transform motion-reduce:transition-none rtl:origin-right", fillMotion),
|
|
83
|
+
style: {
|
|
84
|
+
width: "100%",
|
|
85
|
+
transform: `scaleX(${fraction})`
|
|
86
|
+
}
|
|
87
|
+
})
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
const Progress = react.forwardRef(({ className, value, min = 0, max = 100, size = "default", shape = "linear", format, locale, getAriaValueText, children, ...props }, ref) => {
|
|
91
|
+
const fraction = fractionOf(value, min, max);
|
|
92
|
+
const circular = shape === "circular";
|
|
93
|
+
const valueText = react.useMemo(() => format ? (formatted, raw) => formatted ?? String(raw) : percentOfRange(min, max, locale), [
|
|
94
|
+
format,
|
|
95
|
+
locale,
|
|
96
|
+
min,
|
|
97
|
+
max
|
|
98
|
+
]);
|
|
99
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressValueTextContext.Provider, {
|
|
100
|
+
value: valueText,
|
|
101
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_progress.Progress.Root, {
|
|
102
|
+
ref,
|
|
103
|
+
"data-slot": "progress",
|
|
104
|
+
"data-shape": shape,
|
|
105
|
+
value,
|
|
106
|
+
min,
|
|
107
|
+
max,
|
|
108
|
+
format,
|
|
109
|
+
locale,
|
|
110
|
+
getAriaValueText: getAriaValueText ?? valueText,
|
|
111
|
+
className: (0, cn.cn)(circular ? "inline-flex shrink-0 items-center gap-2" : "grid w-full grid-cols-[minmax(0,1fr)_auto] items-baseline gap-x-2 gap-y-1.5", className),
|
|
112
|
+
...props,
|
|
113
|
+
children: [children, circular ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Ring, {
|
|
114
|
+
fraction,
|
|
115
|
+
size
|
|
116
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Bar, {
|
|
117
|
+
fraction,
|
|
118
|
+
size
|
|
119
|
+
})]
|
|
27
120
|
})
|
|
28
121
|
});
|
|
29
122
|
});
|
|
30
123
|
Progress.displayName = "Progress";
|
|
124
|
+
const ProgressLabel = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_progress.Progress.Label, {
|
|
125
|
+
ref,
|
|
126
|
+
"data-slot": "progress-label",
|
|
127
|
+
className: (0, cn.cn)("col-start-1 min-w-0 text-sm text-gray", className),
|
|
128
|
+
...props
|
|
129
|
+
}));
|
|
130
|
+
ProgressLabel.displayName = "ProgressLabel";
|
|
131
|
+
const ProgressValue = react.forwardRef(({ className, children, ...props }, ref) => {
|
|
132
|
+
const valueText = react.useContext(ProgressValueTextContext);
|
|
133
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_progress.Progress.Value, {
|
|
134
|
+
ref,
|
|
135
|
+
"data-slot": "progress-value",
|
|
136
|
+
className: (0, cn.cn)("col-start-2 justify-self-end text-sm text-gray tabular-nums", className),
|
|
137
|
+
...props,
|
|
138
|
+
children: children ?? valueText ?? void 0
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
ProgressValue.displayName = "ProgressValue";
|
|
31
142
|
//#endregion
|
|
32
143
|
exports.Progress = Progress;
|
|
144
|
+
exports.ProgressLabel = ProgressLabel;
|
|
145
|
+
exports.ProgressValue = ProgressValue;
|
|
33
146
|
|
|
34
147
|
//# sourceMappingURL=progress.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.cjs","names":["React"],"sources":["../../src/components/progress.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cn } from '../utils/cn'\n\nexport
|
|
1
|
+
{"version":3,"file":"progress.cjs","names":["React","ProgressPrimitive"],"sources":["../../src/components/progress.tsx"],"sourcesContent":["import { Progress as ProgressPrimitive } from '@base-ui/react/progress'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\n\ntype ProgressSize = 'sm' | 'default' | 'lg'\n\ntype ValueText = (formatted: string | null, value: number | null) => string\n\nexport type ProgressProps = Omit<\n ProgressPrimitive.Root.Props,\n 'value' | 'className' | 'style'\n> & {\n className?: string\n style?: React.CSSProperties\n /** Current value, between `min` (default 0) and `max` (default 100). */\n value: number\n /** Bar height, or ring diameter when `shape=\"circular\"`. */\n size?: ProgressSize\n /** `linear` (default) is a bar across its container; `circular` is a ring that fills clockwise from 12 o'clock. */\n shape?: 'linear' | 'circular'\n}\n\nconst ProgressValueTextContext = React.createContext<ValueText | null>(null)\n\nconst sizeClasses = {\n sm: 'h-1',\n default: 'h-2',\n lg: 'h-3',\n} as const\n\nconst ringSizes: Record<ProgressSize, { diameter: number; stroke: number }> = {\n sm: { diameter: 16, stroke: 2 },\n default: { diameter: 20, stroke: 2.5 },\n lg: { diameter: 40, stroke: 4 },\n}\n\nconst fillMotion =\n 'duration-[250ms] ease-[var(--ease-move,cubic-bezier(0.645,0.045,0.355,1))]'\n\nfunction fractionOf(value: number, min: number, max: number) {\n if (max <= min) return 0\n return Math.min(1, Math.max(0, (value - min) / (max - min)))\n}\n\n// Base UI reads `value` as a percentage unless `format` is set; show the share of the range\nfunction percentOfRange(\n min: number,\n max: number,\n locale?: Intl.LocalesArgument,\n): ValueText {\n const percent = new Intl.NumberFormat(locale, { style: 'percent' })\n return (_formatted, value) =>\n percent.format(fractionOf(value ?? min, min, max))\n}\n\nfunction Ring({ fraction, size }: { fraction: number; size: ProgressSize }) {\n const { diameter, stroke } = ringSizes[size]\n const radius = (diameter - stroke) / 2\n const center = diameter / 2\n return (\n <ProgressPrimitive.Track\n data-slot=\"progress-track\"\n render={\n <svg\n aria-hidden=\"true\"\n className=\"order-first shrink-0 -rotate-90\"\n fill=\"none\"\n height={diameter}\n viewBox={`0 0 ${diameter} ${diameter}`}\n width={diameter}\n />\n }\n >\n <circle\n className=\"stroke-gray-a4\"\n cx={center}\n cy={center}\n r={radius}\n strokeWidth={stroke}\n />\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n render={\n <circle\n className={cn(\n 'stroke-(--spark-style-bg,var(--color-primary)) transition-[stroke-dashoffset] motion-reduce:transition-none',\n fillMotion,\n )}\n cx={center}\n cy={center}\n r={radius}\n pathLength={1}\n strokeDasharray={1}\n strokeDashoffset={1 - fraction}\n strokeLinecap=\"round\"\n strokeWidth={stroke}\n // a round cap on a zero-length dash still paints a dot\n visibility={fraction === 0 ? 'hidden' : undefined}\n />\n }\n />\n </ProgressPrimitive.Track>\n )\n}\n\nfunction Bar({ fraction, size }: { fraction: number; size: ProgressSize }) {\n return (\n <ProgressPrimitive.Track\n data-slot=\"progress-track\"\n className={cn(\n 'col-span-2 block w-full overflow-hidden rounded-full bg-gray-a4',\n sizeClasses[size],\n )}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className={cn(\n 'block h-full origin-left rounded-full bg-(--spark-style-bg,var(--color-primary)) transition-transform motion-reduce:transition-none rtl:origin-right',\n fillMotion,\n )}\n // a transform, not Base UI's width, so the fill animates off the layout path\n style={{ width: '100%', transform: `scaleX(${fraction})` }}\n />\n </ProgressPrimitive.Track>\n )\n}\n\nconst Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n (\n {\n className,\n value,\n min = 0,\n max = 100,\n size = 'default',\n shape = 'linear',\n format,\n locale,\n getAriaValueText,\n children,\n ...props\n },\n ref,\n ) => {\n const fraction = fractionOf(value, min, max)\n const circular = shape === 'circular'\n const valueText = React.useMemo<ValueText>(\n () =>\n format\n ? (formatted, raw) => formatted ?? String(raw)\n : percentOfRange(min, max, locale),\n [format, locale, min, max],\n )\n\n return (\n <ProgressValueTextContext.Provider value={valueText}>\n <ProgressPrimitive.Root\n ref={ref}\n data-slot=\"progress\"\n data-shape={shape}\n value={value}\n min={min}\n max={max}\n format={format}\n locale={locale}\n getAriaValueText={getAriaValueText ?? valueText}\n className={cn(\n circular\n ? 'inline-flex shrink-0 items-center gap-2'\n : 'grid w-full grid-cols-[minmax(0,1fr)_auto] items-baseline gap-x-2 gap-y-1.5',\n className,\n )}\n {...props}\n >\n {children}\n {circular ? (\n <Ring fraction={fraction} size={size} />\n ) : (\n <Bar fraction={fraction} size={size} />\n )}\n </ProgressPrimitive.Root>\n </ProgressValueTextContext.Provider>\n )\n },\n)\n\nProgress.displayName = 'Progress'\n\ntype ProgressLabelProps = Omit<ProgressPrimitive.Label.Props, 'className'> & {\n className?: string\n}\n\nconst ProgressLabel = React.forwardRef<HTMLSpanElement, ProgressLabelProps>(\n ({ className, ...props }, ref) => (\n <ProgressPrimitive.Label\n ref={ref}\n data-slot=\"progress-label\"\n className={cn('col-start-1 min-w-0 text-sm text-gray', className)}\n {...props}\n />\n ),\n)\n\nProgressLabel.displayName = 'ProgressLabel'\n\ntype ProgressValueProps = Omit<ProgressPrimitive.Value.Props, 'className'> & {\n className?: string\n}\n\nconst ProgressValue = React.forwardRef<HTMLSpanElement, ProgressValueProps>(\n ({ className, children, ...props }, ref) => {\n const valueText = React.useContext(ProgressValueTextContext)\n return (\n <ProgressPrimitive.Value\n ref={ref}\n data-slot=\"progress-value\"\n className={cn(\n 'col-start-2 justify-self-end text-sm text-gray tabular-nums',\n className,\n )}\n {...props}\n >\n {children ?? valueText ?? undefined}\n </ProgressPrimitive.Value>\n )\n },\n)\n\nProgressValue.displayName = 'ProgressValue'\n\nexport { Progress, ProgressLabel, ProgressValue }\nexport type { ProgressLabelProps, ProgressValueProps }\n"],"mappings":";;;;;;;;;AAsBA,MAAM,2BAA2BA,MAAM,cAAgC,IAAI;AAE3E,MAAM,cAAc;CAClB,IAAI;CACJ,SAAS;CACT,IAAI;AACN;AAEA,MAAM,YAAwE;CAC5E,IAAI;EAAE,UAAU;EAAI,QAAQ;CAAE;CAC9B,SAAS;EAAE,UAAU;EAAI,QAAQ;CAAI;CACrC,IAAI;EAAE,UAAU;EAAI,QAAQ;CAAE;AAChC;AAEA,MAAM,aACJ;AAEF,SAAS,WAAW,OAAe,KAAa,KAAa;CAC3D,IAAI,OAAO,KAAK,OAAO;CACvB,OAAO,KAAK,IAAI,GAAG,KAAK,IAAI,IAAI,QAAQ,QAAQ,MAAM,IAAI,CAAC;AAC7D;AAGA,SAAS,eACP,KACA,KACA,QACW;CACX,MAAM,UAAU,IAAI,KAAK,aAAa,QAAQ,EAAE,OAAO,UAAU,CAAC;CAClE,QAAQ,YAAY,UAClB,QAAQ,OAA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CACF;AAEA,cAAc,cAAc"}
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import * as React$1 from "react";
|
|
4
|
+
import { Progress as Progress$1 } from "@base-ui/react/progress";
|
|
4
5
|
|
|
5
6
|
//#region src/components/progress.d.ts
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
declare const Progress: React$1.ForwardRefExoticComponent<ProgressProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
type ProgressSize = 'sm' | 'default' | 'lg';
|
|
8
|
+
type ProgressProps = Omit<Progress$1.Root.Props, 'value' | 'className' | 'style'> & {
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React$1.CSSProperties; /** Current value, between `min` (default 0) and `max` (default 100). */
|
|
11
|
+
value: number; /** Bar height, or ring diameter when `shape="circular"`. */
|
|
12
|
+
size?: ProgressSize; /** `linear` (default) is a bar across its container; `circular` is a ring that fills clockwise from 12 o'clock. */
|
|
13
|
+
shape?: 'linear' | 'circular';
|
|
14
|
+
};
|
|
15
|
+
declare const Progress: React$1.ForwardRefExoticComponent<Omit<ProgressProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
type ProgressLabelProps = Omit<Progress$1.Label.Props, 'className'> & {
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const ProgressLabel: React$1.ForwardRefExoticComponent<Omit<ProgressLabelProps, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
20
|
+
type ProgressValueProps = Omit<Progress$1.Value.Props, 'className'> & {
|
|
21
|
+
className?: string;
|
|
22
|
+
};
|
|
23
|
+
declare const ProgressValue: React$1.ForwardRefExoticComponent<Omit<ProgressValueProps, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
15
24
|
//#endregion
|
|
16
|
-
export { Progress, ProgressProps };
|
|
25
|
+
export { Progress, ProgressLabel, type ProgressLabelProps, ProgressProps, ProgressValue, type ProgressValueProps };
|
|
17
26
|
//# sourceMappingURL=progress.d.cts.map
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import * as React$1 from "react";
|
|
4
|
+
import { Progress as Progress$1 } from "@base-ui/react/progress";
|
|
4
5
|
|
|
5
6
|
//#region src/components/progress.d.ts
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
declare const Progress: React$1.ForwardRefExoticComponent<ProgressProps & React$1.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
type ProgressSize = 'sm' | 'default' | 'lg';
|
|
8
|
+
type ProgressProps = Omit<Progress$1.Root.Props, 'value' | 'className' | 'style'> & {
|
|
9
|
+
className?: string;
|
|
10
|
+
style?: React$1.CSSProperties; /** Current value, between `min` (default 0) and `max` (default 100). */
|
|
11
|
+
value: number; /** Bar height, or ring diameter when `shape="circular"`. */
|
|
12
|
+
size?: ProgressSize; /** `linear` (default) is a bar across its container; `circular` is a ring that fills clockwise from 12 o'clock. */
|
|
13
|
+
shape?: 'linear' | 'circular';
|
|
14
|
+
};
|
|
15
|
+
declare const Progress: React$1.ForwardRefExoticComponent<Omit<ProgressProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
type ProgressLabelProps = Omit<Progress$1.Label.Props, 'className'> & {
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
declare const ProgressLabel: React$1.ForwardRefExoticComponent<Omit<ProgressLabelProps, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
20
|
+
type ProgressValueProps = Omit<Progress$1.Value.Props, 'className'> & {
|
|
21
|
+
className?: string;
|
|
22
|
+
};
|
|
23
|
+
declare const ProgressValue: React$1.ForwardRefExoticComponent<Omit<ProgressValueProps, "ref"> & React$1.RefAttributes<HTMLSpanElement>>;
|
|
15
24
|
//#endregion
|
|
16
|
-
export { Progress, ProgressProps };
|
|
25
|
+
export { Progress, ProgressLabel, type ProgressLabelProps, ProgressProps, ProgressValue, type ProgressValueProps };
|
|
17
26
|
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -1,31 +1,142 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn } from "../utils/cn.js";
|
|
3
3
|
import * as React$1 from "react";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Progress as Progress$1 } from "@base-ui/react/progress";
|
|
5
6
|
//#region src/components/progress.tsx
|
|
7
|
+
const ProgressValueTextContext = React$1.createContext(null);
|
|
6
8
|
const sizeClasses = {
|
|
7
9
|
sm: "h-1",
|
|
8
10
|
default: "h-2",
|
|
9
11
|
lg: "h-3"
|
|
10
12
|
};
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
13
|
+
const ringSizes = {
|
|
14
|
+
sm: {
|
|
15
|
+
diameter: 16,
|
|
16
|
+
stroke: 2
|
|
17
|
+
},
|
|
18
|
+
default: {
|
|
19
|
+
diameter: 20,
|
|
20
|
+
stroke: 2.5
|
|
21
|
+
},
|
|
22
|
+
lg: {
|
|
23
|
+
diameter: 40,
|
|
24
|
+
stroke: 4
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
const fillMotion = "duration-[250ms] ease-[var(--ease-move,cubic-bezier(0.645,0.045,0.355,1))]";
|
|
28
|
+
function fractionOf(value, min, max) {
|
|
29
|
+
if (max <= min) return 0;
|
|
30
|
+
return Math.min(1, Math.max(0, (value - min) / (max - min)));
|
|
31
|
+
}
|
|
32
|
+
function percentOfRange(min, max, locale) {
|
|
33
|
+
const percent = new Intl.NumberFormat(locale, { style: "percent" });
|
|
34
|
+
return (_formatted, value) => percent.format(fractionOf(value ?? min, min, max));
|
|
35
|
+
}
|
|
36
|
+
function Ring({ fraction, size }) {
|
|
37
|
+
const { diameter, stroke } = ringSizes[size];
|
|
38
|
+
const radius = (diameter - stroke) / 2;
|
|
39
|
+
const center = diameter / 2;
|
|
40
|
+
return /* @__PURE__ */ jsxs(Progress$1.Track, {
|
|
41
|
+
"data-slot": "progress-track",
|
|
42
|
+
render: /* @__PURE__ */ jsx("svg", {
|
|
43
|
+
"aria-hidden": "true",
|
|
44
|
+
className: "order-first shrink-0 -rotate-90",
|
|
45
|
+
fill: "none",
|
|
46
|
+
height: diameter,
|
|
47
|
+
viewBox: `0 0 ${diameter} ${diameter}`,
|
|
48
|
+
width: diameter
|
|
49
|
+
}),
|
|
50
|
+
children: [/* @__PURE__ */ jsx("circle", {
|
|
51
|
+
className: "stroke-gray-a4",
|
|
52
|
+
cx: center,
|
|
53
|
+
cy: center,
|
|
54
|
+
r: radius,
|
|
55
|
+
strokeWidth: stroke
|
|
56
|
+
}), /* @__PURE__ */ jsx(Progress$1.Indicator, {
|
|
57
|
+
"data-slot": "progress-indicator",
|
|
58
|
+
render: /* @__PURE__ */ jsx("circle", {
|
|
59
|
+
className: cn("stroke-(--spark-style-bg,var(--color-primary)) transition-[stroke-dashoffset] motion-reduce:transition-none", fillMotion),
|
|
60
|
+
cx: center,
|
|
61
|
+
cy: center,
|
|
62
|
+
r: radius,
|
|
63
|
+
pathLength: 1,
|
|
64
|
+
strokeDasharray: 1,
|
|
65
|
+
strokeDashoffset: 1 - fraction,
|
|
66
|
+
strokeLinecap: "round",
|
|
67
|
+
strokeWidth: stroke,
|
|
68
|
+
visibility: fraction === 0 ? "hidden" : void 0
|
|
69
|
+
})
|
|
70
|
+
})]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function Bar({ fraction, size }) {
|
|
74
|
+
return /* @__PURE__ */ jsx(Progress$1.Track, {
|
|
75
|
+
"data-slot": "progress-track",
|
|
76
|
+
className: cn("col-span-2 block w-full overflow-hidden rounded-full bg-gray-a4", sizeClasses[size]),
|
|
77
|
+
children: /* @__PURE__ */ jsx(Progress$1.Indicator, {
|
|
78
|
+
"data-slot": "progress-indicator",
|
|
79
|
+
className: cn("block h-full origin-left rounded-full bg-(--spark-style-bg,var(--color-primary)) transition-transform motion-reduce:transition-none rtl:origin-right", fillMotion),
|
|
80
|
+
style: {
|
|
81
|
+
width: "100%",
|
|
82
|
+
transform: `scaleX(${fraction})`
|
|
83
|
+
}
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
const Progress = React$1.forwardRef(({ className, value, min = 0, max = 100, size = "default", shape = "linear", format, locale, getAriaValueText, children, ...props }, ref) => {
|
|
88
|
+
const fraction = fractionOf(value, min, max);
|
|
89
|
+
const circular = shape === "circular";
|
|
90
|
+
const valueText = React$1.useMemo(() => format ? (formatted, raw) => formatted ?? String(raw) : percentOfRange(min, max, locale), [
|
|
91
|
+
format,
|
|
92
|
+
locale,
|
|
93
|
+
min,
|
|
94
|
+
max
|
|
95
|
+
]);
|
|
96
|
+
return /* @__PURE__ */ jsx(ProgressValueTextContext.Provider, {
|
|
97
|
+
value: valueText,
|
|
98
|
+
children: /* @__PURE__ */ jsxs(Progress$1.Root, {
|
|
99
|
+
ref,
|
|
100
|
+
"data-slot": "progress",
|
|
101
|
+
"data-shape": shape,
|
|
102
|
+
value,
|
|
103
|
+
min,
|
|
104
|
+
max,
|
|
105
|
+
format,
|
|
106
|
+
locale,
|
|
107
|
+
getAriaValueText: getAriaValueText ?? valueText,
|
|
108
|
+
className: cn(circular ? "inline-flex shrink-0 items-center gap-2" : "grid w-full grid-cols-[minmax(0,1fr)_auto] items-baseline gap-x-2 gap-y-1.5", className),
|
|
109
|
+
...props,
|
|
110
|
+
children: [children, circular ? /* @__PURE__ */ jsx(Ring, {
|
|
111
|
+
fraction,
|
|
112
|
+
size
|
|
113
|
+
}) : /* @__PURE__ */ jsx(Bar, {
|
|
114
|
+
fraction,
|
|
115
|
+
size
|
|
116
|
+
})]
|
|
24
117
|
})
|
|
25
118
|
});
|
|
26
119
|
});
|
|
27
120
|
Progress.displayName = "Progress";
|
|
121
|
+
const ProgressLabel = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Progress$1.Label, {
|
|
122
|
+
ref,
|
|
123
|
+
"data-slot": "progress-label",
|
|
124
|
+
className: cn("col-start-1 min-w-0 text-sm text-gray", className),
|
|
125
|
+
...props
|
|
126
|
+
}));
|
|
127
|
+
ProgressLabel.displayName = "ProgressLabel";
|
|
128
|
+
const ProgressValue = React$1.forwardRef(({ className, children, ...props }, ref) => {
|
|
129
|
+
const valueText = React$1.useContext(ProgressValueTextContext);
|
|
130
|
+
return /* @__PURE__ */ jsx(Progress$1.Value, {
|
|
131
|
+
ref,
|
|
132
|
+
"data-slot": "progress-value",
|
|
133
|
+
className: cn("col-start-2 justify-self-end text-sm text-gray tabular-nums", className),
|
|
134
|
+
...props,
|
|
135
|
+
children: children ?? valueText ?? void 0
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
ProgressValue.displayName = "ProgressValue";
|
|
28
139
|
//#endregion
|
|
29
|
-
export { Progress };
|
|
140
|
+
export { Progress, ProgressLabel, ProgressValue };
|
|
30
141
|
|
|
31
142
|
//# sourceMappingURL=progress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"progress.js","names":["React"],"sources":["../../src/components/progress.tsx"],"sourcesContent":["import * as React from 'react'\nimport { cn } from '../utils/cn'\n\nexport
|
|
1
|
+
{"version":3,"file":"progress.js","names":["React","ProgressPrimitive"],"sources":["../../src/components/progress.tsx"],"sourcesContent":["import { Progress as ProgressPrimitive } from '@base-ui/react/progress'\nimport * as React from 'react'\nimport { cn } from '../utils/cn'\n\ntype ProgressSize = 'sm' | 'default' | 'lg'\n\ntype ValueText = (formatted: string | null, value: number | null) => string\n\nexport type ProgressProps = Omit<\n ProgressPrimitive.Root.Props,\n 'value' | 'className' | 'style'\n> & {\n className?: string\n style?: React.CSSProperties\n /** Current value, between `min` (default 0) and `max` (default 100). */\n value: number\n /** Bar height, or ring diameter when `shape=\"circular\"`. */\n size?: ProgressSize\n /** `linear` (default) is a bar across its container; `circular` is a ring that fills clockwise from 12 o'clock. */\n shape?: 'linear' | 'circular'\n}\n\nconst ProgressValueTextContext = React.createContext<ValueText | null>(null)\n\nconst sizeClasses = {\n sm: 'h-1',\n default: 'h-2',\n lg: 'h-3',\n} as const\n\nconst ringSizes: Record<ProgressSize, { diameter: number; stroke: number }> = {\n sm: { diameter: 16, stroke: 2 },\n default: { diameter: 20, stroke: 2.5 },\n lg: { diameter: 40, stroke: 4 },\n}\n\nconst fillMotion =\n 'duration-[250ms] ease-[var(--ease-move,cubic-bezier(0.645,0.045,0.355,1))]'\n\nfunction fractionOf(value: number, min: number, max: number) {\n if (max <= min) return 0\n return Math.min(1, Math.max(0, (value - min) / (max - min)))\n}\n\n// Base UI reads `value` as a percentage unless `format` is set; show the share of the range\nfunction percentOfRange(\n min: number,\n max: number,\n locale?: Intl.LocalesArgument,\n): ValueText {\n const percent = new Intl.NumberFormat(locale, { style: 'percent' })\n return (_formatted, value) =>\n percent.format(fractionOf(value ?? min, min, max))\n}\n\nfunction Ring({ fraction, size }: { fraction: number; size: ProgressSize }) {\n const { diameter, stroke } = ringSizes[size]\n const radius = (diameter - stroke) / 2\n const center = diameter / 2\n return (\n <ProgressPrimitive.Track\n data-slot=\"progress-track\"\n render={\n <svg\n aria-hidden=\"true\"\n className=\"order-first shrink-0 -rotate-90\"\n fill=\"none\"\n height={diameter}\n viewBox={`0 0 ${diameter} ${diameter}`}\n width={diameter}\n />\n }\n >\n <circle\n className=\"stroke-gray-a4\"\n cx={center}\n cy={center}\n r={radius}\n strokeWidth={stroke}\n />\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n render={\n <circle\n className={cn(\n 'stroke-(--spark-style-bg,var(--color-primary)) transition-[stroke-dashoffset] motion-reduce:transition-none',\n fillMotion,\n )}\n cx={center}\n cy={center}\n r={radius}\n pathLength={1}\n strokeDasharray={1}\n strokeDashoffset={1 - fraction}\n strokeLinecap=\"round\"\n strokeWidth={stroke}\n // a round cap on a zero-length dash still paints a dot\n visibility={fraction === 0 ? 'hidden' : undefined}\n />\n }\n />\n </ProgressPrimitive.Track>\n )\n}\n\nfunction Bar({ fraction, size }: { fraction: number; size: ProgressSize }) {\n return (\n <ProgressPrimitive.Track\n data-slot=\"progress-track\"\n className={cn(\n 'col-span-2 block w-full overflow-hidden rounded-full bg-gray-a4',\n sizeClasses[size],\n )}\n >\n <ProgressPrimitive.Indicator\n data-slot=\"progress-indicator\"\n className={cn(\n 'block h-full origin-left rounded-full bg-(--spark-style-bg,var(--color-primary)) transition-transform motion-reduce:transition-none rtl:origin-right',\n fillMotion,\n )}\n // a transform, not Base UI's width, so the fill animates off the layout path\n style={{ width: '100%', transform: `scaleX(${fraction})` }}\n />\n </ProgressPrimitive.Track>\n )\n}\n\nconst Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n (\n {\n className,\n value,\n min = 0,\n max = 100,\n size = 'default',\n shape = 'linear',\n format,\n locale,\n getAriaValueText,\n children,\n ...props\n },\n ref,\n ) => {\n const fraction = fractionOf(value, min, max)\n const circular = shape === 'circular'\n const valueText = React.useMemo<ValueText>(\n () =>\n format\n ? (formatted, raw) => formatted ?? String(raw)\n : percentOfRange(min, max, locale),\n [format, locale, min, max],\n )\n\n return (\n <ProgressValueTextContext.Provider value={valueText}>\n <ProgressPrimitive.Root\n ref={ref}\n data-slot=\"progress\"\n data-shape={shape}\n value={value}\n min={min}\n max={max}\n format={format}\n locale={locale}\n getAriaValueText={getAriaValueText ?? valueText}\n className={cn(\n circular\n ? 'inline-flex shrink-0 items-center gap-2'\n : 'grid w-full grid-cols-[minmax(0,1fr)_auto] items-baseline gap-x-2 gap-y-1.5',\n className,\n )}\n {...props}\n >\n {children}\n {circular ? (\n <Ring fraction={fraction} size={size} />\n ) : (\n <Bar fraction={fraction} size={size} />\n )}\n </ProgressPrimitive.Root>\n </ProgressValueTextContext.Provider>\n )\n },\n)\n\nProgress.displayName = 'Progress'\n\ntype ProgressLabelProps = Omit<ProgressPrimitive.Label.Props, 'className'> & {\n className?: string\n}\n\nconst ProgressLabel = React.forwardRef<HTMLSpanElement, ProgressLabelProps>(\n ({ className, ...props }, ref) => (\n <ProgressPrimitive.Label\n ref={ref}\n data-slot=\"progress-label\"\n className={cn('col-start-1 min-w-0 text-sm text-gray', className)}\n {...props}\n />\n ),\n)\n\nProgressLabel.displayName = 'ProgressLabel'\n\ntype ProgressValueProps = Omit<ProgressPrimitive.Value.Props, 'className'> & {\n className?: string\n}\n\nconst ProgressValue = React.forwardRef<HTMLSpanElement, ProgressValueProps>(\n ({ className, children, ...props }, ref) => {\n const valueText = React.useContext(ProgressValueTextContext)\n return (\n <ProgressPrimitive.Value\n ref={ref}\n data-slot=\"progress-value\"\n className={cn(\n 'col-start-2 justify-self-end text-sm text-gray tabular-nums',\n className,\n )}\n {...props}\n >\n {children ?? valueText ?? undefined}\n </ProgressPrimitive.Value>\n )\n },\n)\n\nProgressValue.displayName = 'ProgressValue'\n\nexport { Progress, ProgressLabel, ProgressValue }\nexport type { ProgressLabelProps, ProgressValueProps }\n"],"mappings":";;;;;;AAsBA,MAAM,2BAA2BA,QAAM,cAAgC,IAAI;AAE3E,MAAM,cAAc;CAClB,IAAI;CACJ,SAAS;CACT,IAAI;AACN;AAEA,MAAM,YAAwE;CAC5E,IAAI;EAAE,UAAU;EAAI,QAAQ;CAAE;CAC9B,SAAS;EAAE,UAAU;EAAI,QAAQ;CAAI;CACrC,IAAI;EAAE,UAAU;EAAI,QAAQ;CAAE;AAChC;AAEA,MAAM,aACJ;AAEF,SAAS,WAAW,OAAe,KAAa,KAAa;CAC3D,IAAI,OAAO,KAAK,OAAO;C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