@datum-cloud/datum-ui 0.6.0-alpha.b817c77 → 0.6.0-alpha.b8a44ac
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/README.md +3 -0
- package/dist/combobox/index.mjs +2 -0
- package/dist/combobox-cKTFK4uN.mjs +96 -0
- package/dist/components/features/combobox/combobox.d.ts +27 -0
- package/dist/components/features/combobox/combobox.d.ts.map +1 -0
- package/dist/components/features/combobox/index.d.ts +3 -0
- package/dist/components/features/combobox/index.d.ts.map +1 -0
- package/dist/components/features/combobox/types.d.ts +78 -0
- package/dist/components/features/combobox/types.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/date-time-picker.d.ts +9 -0
- package/dist/components/features/date-time-picker/date-time-picker.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/index.d.ts +3 -0
- package/dist/components/features/date-time-picker/index.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/types.d.ts +53 -0
- package/dist/components/features/date-time-picker/types.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/utils/format.d.ts +13 -0
- package/dist/components/features/date-time-picker/utils/format.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/utils/index.d.ts +3 -0
- package/dist/components/features/date-time-picker/utils/index.d.ts.map +1 -0
- package/dist/components/features/date-time-picker/utils/timezone.d.ts +23 -0
- package/dist/components/features/date-time-picker/utils/timezone.d.ts.map +1 -0
- package/dist/components/features/form/adapter-types.d.ts +20 -0
- package/dist/components/features/form/adapter-types.d.ts.map +1 -1
- package/dist/components/features/form/adapters/conform/conform-adapter.d.ts.map +1 -1
- package/dist/components/features/form/adapters/rhf/rhf-adapter.d.ts.map +1 -1
- package/dist/components/features/form/components/form-autosearch.d.ts +25 -0
- package/dist/components/features/form/components/form-autosearch.d.ts.map +1 -0
- package/dist/components/features/form/components/form-combobox.d.ts +76 -0
- package/dist/components/features/form/components/form-combobox.d.ts.map +1 -0
- package/dist/components/features/form/components/form-copy-box.d.ts +3 -0
- package/dist/components/features/form/components/form-copy-box.d.ts.map +1 -1
- package/dist/components/features/form/components/form-custom.d.ts.map +1 -1
- package/dist/components/features/form/components/form-date-picker.d.ts +38 -0
- package/dist/components/features/form/components/form-date-picker.d.ts.map +1 -0
- package/dist/components/features/form/components/form-date-time-picker.d.ts +37 -0
- package/dist/components/features/form/components/form-date-time-picker.d.ts.map +1 -0
- package/dist/components/features/form/components/form-dialog.d.ts.map +1 -1
- package/dist/components/features/form/components/form-radio-group.d.ts.map +1 -1
- package/dist/components/features/form/components/form-root.d.ts.map +1 -1
- package/dist/components/features/form/components/form-time-picker.d.ts +21 -0
- package/dist/components/features/form/components/form-time-picker.d.ts.map +1 -0
- package/dist/components/features/form/components/form-transfer.d.ts +37 -0
- package/dist/components/features/form/components/form-transfer.d.ts.map +1 -0
- package/dist/components/features/form/components/index.d.ts +7 -1
- package/dist/components/features/form/components/index.d.ts.map +1 -1
- package/dist/components/features/form/components/stepper/form-stepper.d.ts.map +1 -1
- package/dist/components/features/form/hooks/index.d.ts +1 -1
- package/dist/components/features/form/hooks/index.d.ts.map +1 -1
- package/dist/components/features/form/hooks/use-form-state.d.ts +36 -0
- package/dist/components/features/form/hooks/use-form-state.d.ts.map +1 -0
- package/dist/components/features/form/index.d.ts +39 -21
- package/dist/components/features/form/index.d.ts.map +1 -1
- package/dist/components/features/form/stepper/index.d.ts +17 -0
- package/dist/components/features/form/stepper/index.d.ts.map +1 -0
- package/dist/components/features/form/types/index.d.ts +36 -0
- package/dist/components/features/form/types/index.d.ts.map +1 -1
- package/dist/components/features/form/utils/get-field-constraints.d.ts +23 -1
- package/dist/components/features/form/utils/get-field-constraints.d.ts.map +1 -1
- package/dist/components/features/form/utils/get-schema-defaults.d.ts +24 -0
- package/dist/components/features/form/utils/get-schema-defaults.d.ts.map +1 -0
- package/dist/components/features/form/utils/zod-helpers.d.ts +12 -0
- package/dist/components/features/form/utils/zod-helpers.d.ts.map +1 -0
- package/dist/components/features/time-picker/index.d.ts +3 -0
- package/dist/components/features/time-picker/index.d.ts.map +1 -0
- package/dist/components/features/time-picker/time-picker.d.ts +22 -0
- package/dist/components/features/time-picker/time-picker.d.ts.map +1 -0
- package/dist/components/features/time-picker/types.d.ts +31 -0
- package/dist/components/features/time-picker/types.d.ts.map +1 -0
- package/dist/components/features/transfer/components/index.d.ts +9 -0
- package/dist/components/features/transfer/components/index.d.ts.map +1 -0
- package/dist/components/features/transfer/components/transfer-group.d.ts +7 -0
- package/dist/components/features/transfer/components/transfer-group.d.ts.map +1 -0
- package/dist/components/features/transfer/components/transfer-item.d.ts +10 -0
- package/dist/components/features/transfer/components/transfer-item.d.ts.map +1 -0
- package/dist/components/features/transfer/components/transfer-panel.d.ts +18 -0
- package/dist/components/features/transfer/components/transfer-panel.d.ts.map +1 -0
- package/dist/components/features/transfer/components/transfer-search.d.ts +9 -0
- package/dist/components/features/transfer/components/transfer-search.d.ts.map +1 -0
- package/dist/components/features/transfer/hooks/use-transfer-dnd.d.ts +26 -0
- package/dist/components/features/transfer/hooks/use-transfer-dnd.d.ts.map +1 -0
- package/dist/components/features/transfer/hooks/use-transfer-state.d.ts +20 -0
- package/dist/components/features/transfer/hooks/use-transfer-state.d.ts.map +1 -0
- package/dist/components/features/transfer/index.d.ts +3 -0
- package/dist/components/features/transfer/index.d.ts.map +1 -0
- package/dist/components/features/transfer/transfer.d.ts +6 -0
- package/dist/components/features/transfer/transfer.d.ts.map +1 -0
- package/dist/components/features/transfer/types.d.ts +69 -0
- package/dist/components/features/transfer/types.d.ts.map +1 -0
- package/dist/date-picker/index.mjs +1 -1
- package/dist/date-time-picker/index.mjs +2 -0
- package/dist/date-time-picker-Dy2jrJoN.mjs +175 -0
- package/dist/form/adapters/conform/index.mjs +102 -12
- package/dist/form/adapters/rhf/index.mjs +112 -26
- package/dist/form/index.mjs +3 -3
- package/dist/form/stepper/index.mjs +541 -0
- package/dist/form-context-Ccxm-wqL.mjs +17 -0
- package/dist/{form-BE1xBne4.mjs → form-mlNLKaB5.mjs} +350 -592
- package/dist/{get-field-constraints-BPMW8VvY.mjs → get-field-constraints-BicgDkfH.mjs} +19 -16
- package/dist/grid/index.mjs +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/index.mjs +14 -14
- package/dist/input-number/index.mjs +1 -1
- package/dist/map/index.mjs +1 -1
- package/dist/{map-Cw7u8r6E.mjs → map-CWIQ-eql.mjs} +1 -1
- package/dist/more-actions/index.mjs +1 -1
- package/dist/page-title/index.mjs +1 -1
- package/dist/stepper/index.mjs +1 -320
- package/dist/stepper-DvIOp0hh.mjs +321 -0
- package/dist/tag-input/index.mjs +1 -1
- package/dist/task-queue/index.mjs +1 -1
- package/dist/time-picker/index.mjs +2 -0
- package/dist/time-picker-BoF7pZZ2.mjs +43 -0
- package/dist/transfer/index.mjs +2 -0
- package/dist/transfer-B2n8pgEQ.mjs +260 -0
- package/package.json +37 -1
- /package/dist/{adapter-context-B7L2ucTr.mjs → adapter-context-rWveHhDd.mjs} +0 -0
- /package/dist/{col-YBbQ5wlb.mjs → col-1T0Q3SlH.mjs} +0 -0
- /package/dist/{hooks-DYjN7lvC.mjs → hooks-D8r2M2U6.mjs} +0 -0
- /package/dist/{input-number-DEjXG2I6.mjs → input-number-a7uydAsw.mjs} +0 -0
- /package/dist/{map-leaflet-imports-D6nTEOIh.mjs → map-leaflet-imports-CRSKA79m.mjs} +0 -0
- /package/dist/{more-actions-BNQ2yfWZ.mjs → more-actions-ILnEZq_E.mjs} +0 -0
- /package/dist/{page-title-CNiRNZ7p.mjs → page-title-ChsnpBiH.mjs} +0 -0
- /package/dist/{tag-input-BKed-cul.mjs → tag-input-T9cUX9-G.mjs} +0 -0
- /package/dist/{task-queue-dropdown-Di_Wjspz.mjs → task-queue-dropdown-Wcbj-f0V.mjs} +0 -0
- /package/dist/{to-api-format-Cq4prffn.mjs → to-api-format-Bh3c01gr.mjs} +0 -0
- /package/dist/{use-copy-to-clipboard-BGdTmkFV.mjs → use-copy-to-clipboard-uNeeVHC4.mjs} +0 -0
|
@@ -1,16 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* Extract field-level constraints from a Zod schema.
|
|
4
|
-
* Works with ZodObject, ZodIntersection (from .and()), and ZodPipe (from .transform()).
|
|
5
|
-
* Used by both Conform and RHF adapters to determine required fields.
|
|
6
|
-
*/
|
|
7
|
-
function getFieldConstraints(schema) {
|
|
8
|
-
const shape = getObjectShape(schema);
|
|
9
|
-
if (!shape) return {};
|
|
10
|
-
const constraints = {};
|
|
11
|
-
for (const [key, fieldSchema] of Object.entries(shape)) constraints[key] = { required: isRequired(fieldSchema) };
|
|
12
|
-
return constraints;
|
|
13
|
-
}
|
|
1
|
+
import "zod";
|
|
2
|
+
//#region src/components/features/form/utils/zod-helpers.ts
|
|
14
3
|
/**
|
|
15
4
|
* Extract the shape from a ZodObject, ZodIntersection, or ZodPipe.
|
|
16
5
|
* Uses Zod v4's `def.type` discriminant.
|
|
@@ -28,13 +17,27 @@ function getObjectShape(schema) {
|
|
|
28
17
|
const leftShape = getObjectShape(intersectionDef.left);
|
|
29
18
|
const rightShape = getObjectShape(intersectionDef.right);
|
|
30
19
|
return {
|
|
31
|
-
...leftShape,
|
|
32
|
-
...rightShape
|
|
20
|
+
...leftShape ?? {},
|
|
21
|
+
...rightShape ?? {}
|
|
33
22
|
};
|
|
34
23
|
}
|
|
35
24
|
if (def.type === "pipe") return getObjectShape(def.in);
|
|
36
25
|
return null;
|
|
37
26
|
}
|
|
27
|
+
//#endregion
|
|
28
|
+
//#region src/components/features/form/utils/get-field-constraints.ts
|
|
29
|
+
/**
|
|
30
|
+
* Extract field-level constraints from a Zod schema.
|
|
31
|
+
* Works with ZodObject, ZodIntersection (from .and()), and ZodPipe (from .transform()).
|
|
32
|
+
* Used by both Conform and RHF adapters to determine required fields.
|
|
33
|
+
*/
|
|
34
|
+
function getFieldConstraints(schema) {
|
|
35
|
+
const shape = getObjectShape(schema);
|
|
36
|
+
if (!shape) return {};
|
|
37
|
+
const constraints = {};
|
|
38
|
+
for (const [key, fieldSchema] of Object.entries(shape)) constraints[key] = { required: isRequired(fieldSchema) };
|
|
39
|
+
return constraints;
|
|
40
|
+
}
|
|
38
41
|
/**
|
|
39
42
|
* Determine if a Zod field type is required.
|
|
40
43
|
* Optional, nullable, and default-wrapped types are not required.
|
|
@@ -45,4 +48,4 @@ function isRequired(schema) {
|
|
|
45
48
|
return true;
|
|
46
49
|
}
|
|
47
50
|
//#endregion
|
|
48
|
-
export { getFieldConstraints as t };
|
|
51
|
+
export { getObjectShape as n, getFieldConstraints as t };
|
package/dist/grid/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as getResponsiveValue, c as GRID_COLUMNS, d as RESPONSIVE_MAP, i as getGutter, l as GRID_PREFIX, n as Row, o as registerMediaQuery, r as RowContext, s as GRID_BREAKPOINTS, t as Col, u as RESPONSIVE_ARRAY } from "../col-
|
|
1
|
+
import { a as getResponsiveValue, c as GRID_COLUMNS, d as RESPONSIVE_MAP, i as getGutter, l as GRID_PREFIX, n as Row, o as registerMediaQuery, r as RowContext, s as GRID_BREAKPOINTS, t as Col, u as RESPONSIVE_ARRAY } from "../col-1T0Q3SlH.mjs";
|
|
2
2
|
export { Col, GRID_BREAKPOINTS, GRID_COLUMNS, GRID_PREFIX, RESPONSIVE_ARRAY, RESPONSIVE_MAP, Row, RowContext, getGutter, getResponsiveValue, registerMediaQuery };
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as useCopyToClipboard } from "../use-copy-to-clipboard-
|
|
2
|
-
import { t as useDebounce } from "../hooks-
|
|
1
|
+
import { t as useCopyToClipboard } from "../use-copy-to-clipboard-uNeeVHC4.mjs";
|
|
2
|
+
import { t as useDebounce } from "../hooks-D8r2M2U6.mjs";
|
|
3
3
|
export { useCopyToClipboard, useDebounce };
|
package/dist/index.mjs
CHANGED
|
@@ -21,7 +21,7 @@ import { n as HoverCardContent, r as HoverCardTrigger, t as HoverCard } from "./
|
|
|
21
21
|
import { t as Input } from "./input-FKGqZypx.mjs";
|
|
22
22
|
import { a as InputGroupText, i as InputGroupInput, n as InputGroupAddon, o as InputGroupTextarea, r as InputGroupButton, t as InputGroup } from "./input-group-DDtz-RT7.mjs";
|
|
23
23
|
import { t as Label } from "./label-cnAhY-ej.mjs";
|
|
24
|
-
import { A as useLeaflet, C as MapPolyline, D as MapTileLayer, E as MapSearchControl, O as MapTooltip, S as MapPolygon, T as MapRectangle, _ as MapLayers, a as MapDrawCircle, b as MapMarker, c as MapDrawEdit, d as MapDrawPolyline, f as MapDrawRectangle, g as MapLayerGroup, h as MapFullscreenControl, i as MapControlContainer, j as PlaceAutocomplete, k as MapZoomControl, l as MapDrawMarker, m as MapFeatureGroup, n as MapCircle, o as MapDrawControl, p as MapDrawUndo, r as MapCircleMarker, s as MapDrawDelete, t as Map, u as MapDrawPolygon, v as MapLayersControl, w as MapPopup, x as MapMarkerClusterGroup, y as MapLocateControl } from "./map-
|
|
24
|
+
import { A as useLeaflet, C as MapPolyline, D as MapTileLayer, E as MapSearchControl, O as MapTooltip, S as MapPolygon, T as MapRectangle, _ as MapLayers, a as MapDrawCircle, b as MapMarker, c as MapDrawEdit, d as MapDrawPolyline, f as MapDrawRectangle, g as MapLayerGroup, h as MapFullscreenControl, i as MapControlContainer, j as PlaceAutocomplete, k as MapZoomControl, l as MapDrawMarker, m as MapFeatureGroup, n as MapCircle, o as MapDrawControl, p as MapDrawUndo, r as MapCircleMarker, s as MapDrawDelete, t as Map, u as MapDrawPolygon, v as MapLayersControl, w as MapPopup, x as MapMarkerClusterGroup, y as MapLocateControl } from "./map-CWIQ-eql.mjs";
|
|
25
25
|
import { t as Spinner } from "./spinner-OyOf9-Yu.mjs";
|
|
26
26
|
import { i as PopoverTrigger, n as PopoverAnchor, r as PopoverContent, t as Popover } from "./popover-FJAcbYoH.mjs";
|
|
27
27
|
import { n as RadioGroupItem, t as RadioGroup } from "./radio-group-CiITR0LO.mjs";
|
|
@@ -49,19 +49,19 @@ import { n as Toaster, t as useToast } from "./toast-DpxlFNNx.mjs";
|
|
|
49
49
|
import { a as DropdownMenuItem, c as DropdownMenuRadioGroup, d as DropdownMenuShortcut, f as DropdownMenuSub, h as DropdownMenuTrigger, i as DropdownMenuGroup, l as DropdownMenuRadioItem, m as DropdownMenuSubTrigger, n as DropdownMenuCheckboxItem, o as DropdownMenuLabel, p as DropdownMenuSubContent, r as DropdownMenuContent, s as DropdownMenuPortal, t as DropdownMenu, u as DropdownMenuSeparator } from "./dropdown-DZiAt-jS.mjs";
|
|
50
50
|
import { i as FileInputButton, n as DropzoneContent, r as DropzoneEmptyState, t as Dropzone } from "./dropzone-ogtpQ4fy.mjs";
|
|
51
51
|
import { t as EmptyContent } from "./empty-content-C63GPJ5d.mjs";
|
|
52
|
-
import { A as
|
|
53
|
-
import { t as useCopyToClipboard } from "./use-copy-to-clipboard-
|
|
54
|
-
import { n as useAdapter, t as FormAdapterProvider } from "./adapter-context-
|
|
55
|
-
import { defineStepper } from "./stepper/index.mjs";
|
|
52
|
+
import { A as FormCheckbox, C as FormDialog, D as FormCustom, E as FormDatePicker, M as FormAutosearch, N as FormAutocomplete, O as FormCopyBox, S as FormError, T as FormDateTimePicker, _ as FormRadioGroup, a as useField, b as FormFieldArray, c as useWatchAll, d as FormTextarea, f as FormSwitch, g as FormRoot, h as FormSelectItem, i as useFieldContext, j as FormButton, k as FormCombobox, l as FormTransfer, m as FormSelect, n as useFormState, o as FormWhen, p as FormSubmit, r as useFormContext, s as useWatch, t as Form, u as FormTimePicker, v as FormRadioItem, w as FormDescription, x as FormField, y as FormInput } from "./form-mlNLKaB5.mjs";
|
|
53
|
+
import { t as useCopyToClipboard } from "./use-copy-to-clipboard-uNeeVHC4.mjs";
|
|
54
|
+
import { n as useAdapter, t as FormAdapterProvider } from "./adapter-context-rWveHhDd.mjs";
|
|
56
55
|
import { InputWithAddons } from "./input-with-addons/index.mjs";
|
|
57
|
-
import { a as getResponsiveValue, c as GRID_COLUMNS, d as RESPONSIVE_MAP, i as getGutter, l as GRID_PREFIX, n as Row, o as registerMediaQuery, r as RowContext, s as GRID_BREAKPOINTS, t as Col, u as RESPONSIVE_ARRAY } from "./col-
|
|
58
|
-
import { t as InputNumber } from "./input-number-
|
|
59
|
-
import { t as MoreActions } from "./more-actions-
|
|
56
|
+
import { a as getResponsiveValue, c as GRID_COLUMNS, d as RESPONSIVE_MAP, i as getGutter, l as GRID_PREFIX, n as Row, o as registerMediaQuery, r as RowContext, s as GRID_BREAKPOINTS, t as Col, u as RESPONSIVE_ARRAY } from "./col-1T0Q3SlH.mjs";
|
|
57
|
+
import { t as InputNumber } from "./input-number-a7uydAsw.mjs";
|
|
58
|
+
import { t as MoreActions } from "./more-actions-ILnEZq_E.mjs";
|
|
60
59
|
import { configureProgress, startProgress, stopProgress } from "./nprogress/index.mjs";
|
|
61
|
-
import { t as PageTitle } from "./page-title-
|
|
62
|
-
import { t as
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import { t as
|
|
60
|
+
import { t as PageTitle } from "./page-title-ChsnpBiH.mjs";
|
|
61
|
+
import { t as defineStepper } from "./stepper-DvIOp0hh.mjs";
|
|
62
|
+
import { t as TagsInput } from "./tag-input-T9cUX9-G.mjs";
|
|
63
|
+
import { _ as RedisTaskStorage, a as TaskPanelItem, b as createProjectMetadata, c as TaskPanelHeader, d as useCurrentScope, f as useTasksWithLabels, g as detectStorage, h as TaskQueue, i as TaskPanel, l as getContextLabel, m as TaskQueueProvider, n as TaskSummaryDialog, o as TaskPanelCounter, p as useTaskQueue, r as TaskQueueTrigger, s as TaskPanelActions, t as TaskQueueDropdown, u as matchesCurrentScope, v as LocalTaskStorage, x as createUserMetadata, y as createOrgMetadata } from "./task-queue-dropdown-Wcbj-f0V.mjs";
|
|
64
|
+
import { C as utcToLocalInputString, S as utcStringToZonedDate, _ as getBrowserTimezone, a as formatTimeRangeDisplay, b as getTimezoneOffset, c as getPresetByKey, d as TimezoneSelector, f as QuickRangesPanel, g as formatUtcForDisplay, h as formatTimezoneLabel, i as formatSingleTimeDisplay, l as getPresetByShortcut, m as createTimezoneOption, n as TimeRangePicker, o as DEFAULT_PRESETS, p as CustomRangePanel, r as formatDateForInput, s as getDefaultPreset, t as toApiTimeRange, u as getPresetRange, v as getDefaultTimezoneOptions, w as zonedDateToUtcString, x as localInputStringToUtc, y as getShortTimezoneDisplay } from "./to-api-format-Bh3c01gr.mjs";
|
|
65
|
+
import { t as useDebounce } from "./hooks-D8r2M2U6.mjs";
|
|
66
66
|
import "./utils/index.mjs";
|
|
67
|
-
export { CustomRangePanel as AbsoluteRangePanel, CustomRangePanel, Alert, AlertDescription, AlertTitle, AppNavigation, Autocomplete, Avatar, AvatarFallback, AvatarImage, AvatarStack, Badge, Blockquote, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDatePicker, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, ClientOnly, CloseIcon, Code, CodeEditor, CodeEditorTabs, Col, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_PRESETS, Dialog, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneContent, DropzoneEmptyState, EmptyContent, FileInputButton, Form, FormAdapterProvider, FormAutocomplete, FormButton, FormCheckbox, FormCopyBox, FormCustom, FormDescription, FormDialog, FormError, FormField, FormFieldArray, FormInput, FormRadioGroup, FormRadioItem, FormRoot, FormSelect, FormSelectItem,
|
|
67
|
+
export { CustomRangePanel as AbsoluteRangePanel, CustomRangePanel, Alert, AlertDescription, AlertTitle, AppNavigation, Autocomplete, Avatar, AvatarFallback, AvatarImage, AvatarStack, Badge, Blockquote, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Calendar, CalendarDatePicker, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, ClientOnly, CloseIcon, Code, CodeEditor, CodeEditorTabs, Col, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, DEFAULT_PRESETS, Dialog, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Dropzone, DropzoneContent, DropzoneEmptyState, EmptyContent, FileInputButton, Form, FormAdapterProvider, FormAutocomplete, FormAutosearch, FormButton, FormCheckbox, FormCombobox, FormCopyBox, FormCustom, FormDatePicker, FormDateTimePicker, FormDescription, FormDialog, FormError, FormField, FormFieldArray, FormInput, FormRadioGroup, FormRadioItem, FormRoot, FormSelect, FormSelectItem, FormSubmit, FormSwitch, FormTextarea, FormTimePicker, FormTransfer, FormWhen, GRID_BREAKPOINTS, GRID_COLUMNS, GRID_PREFIX, HoverCard, HoverCardContent, HoverCardTrigger, Icon, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, InputNumber, InputWithAddons, Label, Link, LinkButton, List, ListItem, LoaderOverlay, LocalTaskStorage, Map, MapCircle, MapCircleMarker, MapControlContainer, MapDrawCircle, MapDrawControl, MapDrawDelete, MapDrawEdit, MapDrawMarker, MapDrawPolygon, MapDrawPolyline, MapDrawRectangle, MapDrawUndo, MapFeatureGroup, MapFullscreenControl, MapLayerGroup, MapLayers, MapLayersControl, MapLocateControl, MapMarker, MapMarkerClusterGroup, MapPolygon, MapPolyline, MapPopup, MapRectangle, MapSearchControl, MapTileLayer, MapTooltip, MapZoomControl, MoreActions, NavMenu, PageTitle, Paragraph, PlaceAutocomplete, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, QuickRangesPanel, RESPONSIVE_ARRAY, RESPONSIVE_MAP, RadioGroup, RadioGroupItem, RedisTaskStorage, Row, RowContext, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Spinner, SpinnerIcon, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsLinkTrigger, TabsList, TabsTrigger, TagsInput, TaskPanel, TaskPanelActions, TaskPanelCounter, TaskPanelHeader, TaskPanelItem, TaskQueue, TaskQueueDropdown, TaskQueueProvider, TaskQueueTrigger, TaskSummaryDialog, Text, Textarea, ThemeProvider, ThemeScript, TimeRangePicker, TimezoneSelector, Title, Toaster, Tooltip, VisuallyHidden, avatarStackVariants, badgeVariants, buttonGroupVariants, buttonVariants, cn, configureProgress, createCodeEditorSchema, createOrgMetadata, createProjectMetadata, createTimezoneOption, createUserMetadata, defineStepper, detectStorage, formatDateForInput, formatJson, formatSingleTimeDisplay, formatTimeRangeDisplay, formatTimezoneLabel, formatUtcForDisplay, formatYaml, getBrowserTimezone, getContextLabel, getDefaultPreset, getDefaultTimezoneOptions, getGutter, getPresetByKey, getPresetByShortcut, getPresetRange, getResponsiveValue, getShortTimezoneDisplay, getTimezoneOffset, isValidJson, isValidYaml, jsonSchema, jsonToYaml, localInputStringToUtc, matchesCurrentScope, paragraphVariants, registerMediaQuery, startProgress, stopProgress, textVariants, titleVariants, toApiTimeRange, toast, useAdapter, useCopyToClipboard, useCurrentScope, useDebounce, useField, useFieldContext, useFormContext, useFormState, useLeaflet, useSidebar, useTaskQueue, useTasksWithLabels, useTheme, useToast, useWatch, useWatchAll, utcStringToZonedDate, utcToLocalInputString, yamlSchema, yamlToJson, zonedDateToUtcString };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as InputNumber } from "../input-number-
|
|
1
|
+
import { t as InputNumber } from "../input-number-a7uydAsw.mjs";
|
|
2
2
|
export { InputNumber };
|
package/dist/map/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as useLeaflet, C as MapPolyline, D as MapTileLayer, E as MapSearchControl, O as MapTooltip, S as MapPolygon, T as MapRectangle, _ as MapLayers, a as MapDrawCircle, b as MapMarker, c as MapDrawEdit, d as MapDrawPolyline, f as MapDrawRectangle, g as MapLayerGroup, h as MapFullscreenControl, i as MapControlContainer, j as PlaceAutocomplete, k as MapZoomControl, l as MapDrawMarker, m as MapFeatureGroup, n as MapCircle, o as MapDrawControl, p as MapDrawUndo, r as MapCircleMarker, s as MapDrawDelete, t as Map, u as MapDrawPolygon, v as MapLayersControl, w as MapPopup, x as MapMarkerClusterGroup, y as MapLocateControl } from "../map-
|
|
1
|
+
import { A as useLeaflet, C as MapPolyline, D as MapTileLayer, E as MapSearchControl, O as MapTooltip, S as MapPolygon, T as MapRectangle, _ as MapLayers, a as MapDrawCircle, b as MapMarker, c as MapDrawEdit, d as MapDrawPolyline, f as MapDrawRectangle, g as MapLayerGroup, h as MapFullscreenControl, i as MapControlContainer, j as PlaceAutocomplete, k as MapZoomControl, l as MapDrawMarker, m as MapFeatureGroup, n as MapCircle, o as MapDrawControl, p as MapDrawUndo, r as MapCircleMarker, s as MapDrawDelete, t as Map, u as MapDrawPolygon, v as MapLayersControl, w as MapPopup, x as MapMarkerClusterGroup, y as MapLocateControl } from "../map-CWIQ-eql.mjs";
|
|
2
2
|
export { Map, MapCircle, MapCircleMarker, MapControlContainer, MapDrawCircle, MapDrawControl, MapDrawDelete, MapDrawEdit, MapDrawMarker, MapDrawPolygon, MapDrawPolyline, MapDrawRectangle, MapDrawUndo, MapFeatureGroup, MapFullscreenControl, MapLayerGroup, MapLayers, MapLayersControl, MapLocateControl, MapMarker, MapMarkerClusterGroup, MapPolygon, MapPolyline, MapPopup, MapRectangle, MapSearchControl, MapTileLayer, MapTooltip, MapZoomControl, PlaceAutocomplete, useLeaflet };
|
|
@@ -225,7 +225,7 @@ function PlaceAutocomplete({ debounceMs = 300, lang, limit = 5, bbox, lat, lon,
|
|
|
225
225
|
//#region ../shadcn/ui/map.tsx
|
|
226
226
|
let _useMap;
|
|
227
227
|
let _useMapEvents;
|
|
228
|
-
if (typeof window !== "undefined") import("./map-leaflet-imports-
|
|
228
|
+
if (typeof window !== "undefined") import("./map-leaflet-imports-CRSKA79m.mjs").then((mod) => {
|
|
229
229
|
_useMap = mod.useMap;
|
|
230
230
|
_useMapEvents = mod.useMapEvents;
|
|
231
231
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as MoreActions } from "../more-actions-
|
|
1
|
+
import { t as MoreActions } from "../more-actions-ILnEZq_E.mjs";
|
|
2
2
|
export { MoreActions };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PageTitle } from "../page-title-
|
|
1
|
+
import { t as PageTitle } from "../page-title-ChsnpBiH.mjs";
|
|
2
2
|
export { PageTitle };
|
package/dist/stepper/index.mjs
CHANGED
|
@@ -1,321 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import { t as Button } from "../button-D3RrsMfQ.mjs";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
|
-
import * as React$1 from "react";
|
|
5
|
-
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
7
|
-
import * as Stepperize from "@stepperize/react";
|
|
8
|
-
//#region src/components/features/stepper/stepper.tsx
|
|
9
|
-
const StepperContext = React$1.createContext(null);
|
|
10
|
-
function useStepperProvider() {
|
|
11
|
-
const context = React$1.use(StepperContext);
|
|
12
|
-
if (!context) throw new Error("useStepper must be used within a StepperProvider.");
|
|
13
|
-
return context;
|
|
14
|
-
}
|
|
15
|
-
const classForNavigationList = cva("flex gap-2", { variants: { variant: {
|
|
16
|
-
horizontal: "flex-row items-center justify-between",
|
|
17
|
-
vertical: "flex-col",
|
|
18
|
-
circle: "flex-row items-center justify-between"
|
|
19
|
-
} } });
|
|
20
|
-
const classForSeparator = cva([
|
|
21
|
-
"bg-muted",
|
|
22
|
-
"data-[state=completed]:bg-primary data-[disabled]:opacity-50",
|
|
23
|
-
"transition-all duration-300 ease-in-out"
|
|
24
|
-
], { variants: {
|
|
25
|
-
orientation: {
|
|
26
|
-
horizontal: "h-0.5 flex-1",
|
|
27
|
-
vertical: "h-full w-0.5"
|
|
28
|
-
},
|
|
29
|
-
labelOrientation: { vertical: "absolute left-[calc(50%+30px)] right-[calc(-50%+20px)] top-5 block shrink-0" }
|
|
30
|
-
} });
|
|
31
|
-
function defineStepper(...steps) {
|
|
32
|
-
const { Scoped, useStepper, steps: stepList, Stepper: StepperizePrimitives } = Stepperize.defineStepper(...steps);
|
|
33
|
-
const StepperContainer = ({ children, className, ...props }) => {
|
|
34
|
-
const methods = useStepper();
|
|
35
|
-
return /* @__PURE__ */ jsx("div", {
|
|
36
|
-
"date-component": "stepper",
|
|
37
|
-
className: cn("w-full", className),
|
|
38
|
-
...props,
|
|
39
|
-
children: typeof children === "function" ? children({ methods }) : children
|
|
40
|
-
});
|
|
41
|
-
};
|
|
42
|
-
return {
|
|
43
|
-
steps: stepList,
|
|
44
|
-
useStepper,
|
|
45
|
-
Stepper: {
|
|
46
|
-
...StepperizePrimitives,
|
|
47
|
-
Provider: ({ variant = "horizontal", labelOrientation = "horizontal", tracking = false, children, className, ...props }) => {
|
|
48
|
-
return /* @__PURE__ */ jsx(StepperContext, {
|
|
49
|
-
value: {
|
|
50
|
-
variant,
|
|
51
|
-
labelOrientation,
|
|
52
|
-
tracking
|
|
53
|
-
},
|
|
54
|
-
children: /* @__PURE__ */ jsx(Scoped, {
|
|
55
|
-
initialStep: props.initialStep,
|
|
56
|
-
initialMetadata: props.initialMetadata,
|
|
57
|
-
children: /* @__PURE__ */ jsx(StepperContainer, {
|
|
58
|
-
className,
|
|
59
|
-
...props,
|
|
60
|
-
children
|
|
61
|
-
})
|
|
62
|
-
})
|
|
63
|
-
});
|
|
64
|
-
},
|
|
65
|
-
Navigation: ({ children, "aria-label": ariaLabel = "Stepper Navigation", ...props }) => {
|
|
66
|
-
const { variant } = useStepperProvider();
|
|
67
|
-
return /* @__PURE__ */ jsx("nav", {
|
|
68
|
-
"date-component": "stepper-navigation",
|
|
69
|
-
"aria-label": ariaLabel,
|
|
70
|
-
role: "tablist",
|
|
71
|
-
...props,
|
|
72
|
-
children: /* @__PURE__ */ jsx("ol", {
|
|
73
|
-
"date-component": "stepper-navigation-list",
|
|
74
|
-
className: classForNavigationList({ variant }),
|
|
75
|
-
children
|
|
76
|
-
})
|
|
77
|
-
});
|
|
78
|
-
},
|
|
79
|
-
Step: ({ children, className, icon, ...props }) => {
|
|
80
|
-
const { variant, labelOrientation } = useStepperProvider();
|
|
81
|
-
const stepper = useStepper();
|
|
82
|
-
const steps = stepList;
|
|
83
|
-
const stepIndex = stepper.lookup.getIndex(props.of);
|
|
84
|
-
const step = steps[stepIndex];
|
|
85
|
-
const currentIndex = stepper.lookup.getIndex(stepper.state.current.data.id);
|
|
86
|
-
const isLast = stepper.lookup.getLast().id === props.of;
|
|
87
|
-
const isActive = stepper.state.current.data.id === props.of;
|
|
88
|
-
const dataState = getStepState(currentIndex, stepIndex);
|
|
89
|
-
const childMap = useStepChildren(children);
|
|
90
|
-
const title = childMap.get("title");
|
|
91
|
-
const description = childMap.get("description");
|
|
92
|
-
const panel = childMap.get("panel");
|
|
93
|
-
if (variant === "circle") return /* @__PURE__ */ jsxs("li", {
|
|
94
|
-
"date-component": "stepper-step",
|
|
95
|
-
className: cn("flex shrink-0 items-center gap-4 rounded-md transition-colors", className),
|
|
96
|
-
children: [/* @__PURE__ */ jsx(CircleStepIndicator, {
|
|
97
|
-
currentStep: stepIndex + 1,
|
|
98
|
-
totalSteps: steps.length
|
|
99
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
100
|
-
"date-component": "stepper-step-content",
|
|
101
|
-
className: "flex flex-col items-start gap-1",
|
|
102
|
-
children: [title, description]
|
|
103
|
-
})]
|
|
104
|
-
});
|
|
105
|
-
return /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
106
|
-
/* @__PURE__ */ jsxs("li", {
|
|
107
|
-
"date-component": "stepper-step",
|
|
108
|
-
className: cn([
|
|
109
|
-
"group peer relative flex items-center gap-2",
|
|
110
|
-
"data-[variant=vertical]:flex-row",
|
|
111
|
-
"data-[label-orientation=vertical]:w-full",
|
|
112
|
-
"data-[label-orientation=vertical]:flex-col",
|
|
113
|
-
"data-[label-orientation=vertical]:justify-center"
|
|
114
|
-
]),
|
|
115
|
-
"data-variant": variant,
|
|
116
|
-
"data-label-orientation": labelOrientation,
|
|
117
|
-
"data-state": dataState,
|
|
118
|
-
"data-disabled": props.disabled,
|
|
119
|
-
children: [
|
|
120
|
-
/* @__PURE__ */ jsx(Button, {
|
|
121
|
-
id: `step-${step.id}`,
|
|
122
|
-
"date-component": "stepper-step-indicator",
|
|
123
|
-
type: "button",
|
|
124
|
-
role: "tab",
|
|
125
|
-
tabIndex: dataState !== "inactive" ? 0 : -1,
|
|
126
|
-
className: cn("rounded-full", className),
|
|
127
|
-
variant: dataState !== "inactive" ? "default" : "secondary",
|
|
128
|
-
size: "icon",
|
|
129
|
-
"aria-controls": `step-panel-${props.of}`,
|
|
130
|
-
"aria-current": isActive ? "step" : void 0,
|
|
131
|
-
"aria-posinset": stepIndex + 1,
|
|
132
|
-
"aria-setsize": steps.length,
|
|
133
|
-
"aria-selected": isActive,
|
|
134
|
-
onKeyDown: (e) => onStepKeyDown(e, stepper.lookup.getNext(props.of), stepper.lookup.getPrev(props.of)),
|
|
135
|
-
...props,
|
|
136
|
-
children: icon ?? stepIndex + 1
|
|
137
|
-
}),
|
|
138
|
-
variant === "horizontal" && labelOrientation === "vertical" && /* @__PURE__ */ jsx(StepperSeparator, {
|
|
139
|
-
orientation: "horizontal",
|
|
140
|
-
labelOrientation,
|
|
141
|
-
isLast,
|
|
142
|
-
state: dataState,
|
|
143
|
-
disabled: props.disabled
|
|
144
|
-
}),
|
|
145
|
-
/* @__PURE__ */ jsxs("div", {
|
|
146
|
-
"date-component": "stepper-step-content",
|
|
147
|
-
className: "flex flex-col items-start",
|
|
148
|
-
children: [title, description]
|
|
149
|
-
})
|
|
150
|
-
]
|
|
151
|
-
}),
|
|
152
|
-
variant === "horizontal" && labelOrientation === "horizontal" && /* @__PURE__ */ jsx(StepperSeparator, {
|
|
153
|
-
orientation: "horizontal",
|
|
154
|
-
isLast,
|
|
155
|
-
state: dataState,
|
|
156
|
-
disabled: props.disabled
|
|
157
|
-
}),
|
|
158
|
-
variant === "vertical" && /* @__PURE__ */ jsxs("div", {
|
|
159
|
-
className: "flex gap-4",
|
|
160
|
-
children: [!isLast && /* @__PURE__ */ jsx("div", {
|
|
161
|
-
className: "flex justify-center ps-[calc(var(--spacing)_*_4.5_-_1px)]",
|
|
162
|
-
children: /* @__PURE__ */ jsx(StepperSeparator, {
|
|
163
|
-
orientation: "vertical",
|
|
164
|
-
isLast,
|
|
165
|
-
state: dataState,
|
|
166
|
-
disabled: props.disabled
|
|
167
|
-
})
|
|
168
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
169
|
-
className: "my-3 flex-1 ps-4",
|
|
170
|
-
children: panel
|
|
171
|
-
})]
|
|
172
|
-
})
|
|
173
|
-
] });
|
|
174
|
-
},
|
|
175
|
-
Title,
|
|
176
|
-
Description,
|
|
177
|
-
Panel: ({ children, asChild, ...props }) => {
|
|
178
|
-
const Comp = asChild ? Slot : "div";
|
|
179
|
-
const { tracking } = useStepperProvider();
|
|
180
|
-
return /* @__PURE__ */ jsx(Comp, {
|
|
181
|
-
"date-component": "stepper-step-panel",
|
|
182
|
-
ref: (node) => scrollIntoStepperPanel(node, tracking),
|
|
183
|
-
...props,
|
|
184
|
-
children
|
|
185
|
-
});
|
|
186
|
-
},
|
|
187
|
-
Controls: ({ children, className, asChild, ...props }) => {
|
|
188
|
-
return /* @__PURE__ */ jsx(asChild ? Slot : "div", {
|
|
189
|
-
"date-component": "stepper-controls",
|
|
190
|
-
className: cn("flex justify-end gap-4", className),
|
|
191
|
-
...props,
|
|
192
|
-
children
|
|
193
|
-
});
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
function Title({ children, className, asChild, ...props }) {
|
|
199
|
-
return /* @__PURE__ */ jsx(asChild ? Slot : "h4", {
|
|
200
|
-
"date-component": "stepper-step-title",
|
|
201
|
-
className: cn("text-base font-medium", className),
|
|
202
|
-
...props,
|
|
203
|
-
children
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
function Description({ children, className, asChild, ...props }) {
|
|
207
|
-
return /* @__PURE__ */ jsx(asChild ? Slot : "p", {
|
|
208
|
-
"date-component": "stepper-step-description",
|
|
209
|
-
className: cn("text-muted-foreground text-sm", className),
|
|
210
|
-
...props,
|
|
211
|
-
children
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
function StepperSeparator({ orientation, isLast, labelOrientation, state, disabled }) {
|
|
215
|
-
if (isLast) return null;
|
|
216
|
-
return /* @__PURE__ */ jsx("div", {
|
|
217
|
-
"date-component": "stepper-separator",
|
|
218
|
-
"data-orientation": orientation,
|
|
219
|
-
"data-state": state,
|
|
220
|
-
"data-disabled": disabled,
|
|
221
|
-
role: "separator",
|
|
222
|
-
tabIndex: -1,
|
|
223
|
-
className: classForSeparator({
|
|
224
|
-
orientation,
|
|
225
|
-
labelOrientation
|
|
226
|
-
})
|
|
227
|
-
});
|
|
228
|
-
}
|
|
229
|
-
function CircleStepIndicator({ currentStep, totalSteps, size = 80, strokeWidth = 6 }) {
|
|
230
|
-
const radius = (size - strokeWidth) / 2;
|
|
231
|
-
const circumference = radius * 2 * Math.PI;
|
|
232
|
-
const dashOffset = circumference - circumference * (currentStep / totalSteps * 100) / 100;
|
|
233
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
234
|
-
"date-component": "stepper-step-indicator",
|
|
235
|
-
role: "progressbar",
|
|
236
|
-
"aria-valuenow": currentStep,
|
|
237
|
-
"aria-valuemin": 1,
|
|
238
|
-
"aria-valuemax": totalSteps,
|
|
239
|
-
tabIndex: -1,
|
|
240
|
-
className: "relative inline-flex items-center justify-center",
|
|
241
|
-
children: [/* @__PURE__ */ jsxs("svg", {
|
|
242
|
-
width: size,
|
|
243
|
-
height: size,
|
|
244
|
-
children: [
|
|
245
|
-
/* @__PURE__ */ jsx("title", { children: "Step Indicator" }),
|
|
246
|
-
/* @__PURE__ */ jsx("circle", {
|
|
247
|
-
cx: size / 2,
|
|
248
|
-
cy: size / 2,
|
|
249
|
-
r: radius,
|
|
250
|
-
fill: "none",
|
|
251
|
-
stroke: "currentColor",
|
|
252
|
-
strokeWidth,
|
|
253
|
-
className: "text-muted-foreground"
|
|
254
|
-
}),
|
|
255
|
-
/* @__PURE__ */ jsx("circle", {
|
|
256
|
-
cx: size / 2,
|
|
257
|
-
cy: size / 2,
|
|
258
|
-
r: radius,
|
|
259
|
-
fill: "none",
|
|
260
|
-
stroke: "currentColor",
|
|
261
|
-
strokeWidth,
|
|
262
|
-
strokeDasharray: circumference,
|
|
263
|
-
strokeDashoffset: dashOffset,
|
|
264
|
-
className: "text-primary transition-all duration-300 ease-in-out",
|
|
265
|
-
transform: `rotate(-90 ${size / 2} ${size / 2})`
|
|
266
|
-
})
|
|
267
|
-
]
|
|
268
|
-
}), /* @__PURE__ */ jsx("div", {
|
|
269
|
-
className: "absolute inset-0 flex items-center justify-center",
|
|
270
|
-
children: /* @__PURE__ */ jsxs("span", {
|
|
271
|
-
className: "text-sm font-medium",
|
|
272
|
-
"aria-live": "polite",
|
|
273
|
-
children: [
|
|
274
|
-
currentStep,
|
|
275
|
-
" ",
|
|
276
|
-
"of",
|
|
277
|
-
totalSteps
|
|
278
|
-
]
|
|
279
|
-
})
|
|
280
|
-
})]
|
|
281
|
-
});
|
|
282
|
-
}
|
|
283
|
-
function scrollIntoStepperPanel(node, tracking) {
|
|
284
|
-
if (tracking) node?.scrollIntoView({
|
|
285
|
-
behavior: "smooth",
|
|
286
|
-
block: "center"
|
|
287
|
-
});
|
|
288
|
-
}
|
|
289
|
-
function useStepChildren(children) {
|
|
290
|
-
return React$1.useMemo(() => extractChildren(children), [children]);
|
|
291
|
-
}
|
|
292
|
-
function extractChildren(children) {
|
|
293
|
-
const childrenArray = React$1.Children.toArray(children);
|
|
294
|
-
const map = /* @__PURE__ */ new Map();
|
|
295
|
-
for (const child of childrenArray) if (React$1.isValidElement(child)) if (child.type === Title) map.set("title", child);
|
|
296
|
-
else if (child.type === Description) map.set("description", child);
|
|
297
|
-
else map.set("panel", child);
|
|
298
|
-
return map;
|
|
299
|
-
}
|
|
300
|
-
function onStepKeyDown(e, nextStep, prevStep) {
|
|
301
|
-
const { key } = e;
|
|
302
|
-
const directions = {
|
|
303
|
-
next: ["ArrowRight", "ArrowDown"],
|
|
304
|
-
prev: ["ArrowLeft", "ArrowUp"]
|
|
305
|
-
};
|
|
306
|
-
if (directions.next.includes(key) || directions.prev.includes(key)) {
|
|
307
|
-
const direction = directions.next.includes(key) ? "next" : "prev";
|
|
308
|
-
const step = direction === "next" ? nextStep : prevStep;
|
|
309
|
-
if (!step) return;
|
|
310
|
-
const stepElement = document.getElementById(`step-${step.id}`);
|
|
311
|
-
if (!stepElement) return;
|
|
312
|
-
if (stepElement.parentElement?.getAttribute("data-state") !== "inactive" || direction === "prev") stepElement.focus();
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
function getStepState(currentIndex, stepIndex) {
|
|
316
|
-
if (currentIndex === stepIndex) return "active";
|
|
317
|
-
if (currentIndex > stepIndex) return "completed";
|
|
318
|
-
return "inactive";
|
|
319
|
-
}
|
|
320
|
-
//#endregion
|
|
1
|
+
import { t as defineStepper } from "../stepper-DvIOp0hh.mjs";
|
|
321
2
|
export { defineStepper };
|