@moduix/react 2.5.0 → 2.6.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/README.md +65 -86
- package/THIRD_PARTY_NOTICES.md +49 -0
- package/dist/components/accordion/Accordion.js +7 -8
- package/dist/components/alert/Alert.js +6 -7
- package/dist/components/alert/Alert_module.css +3 -16
- package/dist/components/angle-slider/AngleSlider.d.ts +5 -11
- package/dist/components/angle-slider/AngleSlider.js +17 -59
- package/dist/components/aspect-ratio/AspectRatio.js +1 -2
- package/dist/components/aspect-ratio/AspectRatio_module.css +0 -13
- package/dist/components/avatar/Avatar.d.ts +3 -6
- package/dist/components/avatar/Avatar.js +7 -50
- package/dist/components/avatar/Avatar.module.js +1 -2
- package/dist/components/avatar/Avatar_module.css +0 -6
- package/dist/components/badge/Badge.d.ts +2 -2
- package/dist/components/badge/Badge.js +5 -10
- package/dist/components/badge/Badge_module.css +7 -14
- package/dist/components/bleed/Bleed.js +1 -2
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.js +16 -32
- package/dist/components/breadcrumbs/Breadcrumbs_module.css +12 -14
- package/dist/components/button/Button.d.ts +4 -4
- package/dist/components/button/Button.js +1 -2
- package/dist/components/button/Button_module.css +2 -7
- package/dist/components/card/Card.d.ts +15 -15
- package/dist/components/card/Card.js +10 -11
- package/dist/components/card/Card_module.css +1 -17
- package/dist/components/carousel/Carousel.js +12 -13
- package/dist/components/carousel/Carousel_module.css +10 -3
- package/dist/components/chart/Chart.d.ts +9 -8
- package/dist/components/chart/Chart.js +7 -8
- package/dist/components/chart/Chart_module.css +0 -2
- package/dist/components/checkbox/Checkbox.d.ts +3 -2
- package/dist/components/checkbox/Checkbox.js +12 -35
- package/dist/components/clipboard/Clipboard.js +8 -9
- package/dist/components/close-button/CloseButton.js +1 -2
- package/dist/components/close-button/CloseButton_module.css +1 -10
- package/dist/components/collapsible/Collapsible.js +6 -9
- package/dist/components/collapsible/Collapsible_module.css +2 -4
- package/dist/components/color-picker/ColorPicker.d.ts +4 -3
- package/dist/components/color-picker/ColorPicker.js +32 -45
- package/dist/components/color-picker/ColorPicker_module.css +0 -1
- package/dist/components/combobox/Combobox.d.ts +5 -5
- package/dist/components/combobox/Combobox.js +20 -29
- package/dist/components/combobox/Combobox_module.css +0 -1
- package/dist/components/command-palette/CommandPalette.d.ts +7 -18
- package/dist/components/command-palette/CommandPalette.js +51 -78
- package/dist/components/command-palette/CommandPalette_module.css +11 -18
- package/dist/components/container/Container.js +1 -2
- package/dist/components/date-input/DateInput.d.ts +7 -9
- package/dist/components/date-input/DateInput.js +14 -44
- package/dist/components/date-input/DateInput_module.css +0 -1
- package/dist/components/date-picker/DatePicker.d.ts +1 -1
- package/dist/components/date-picker/DatePicker.js +34 -43
- package/dist/components/date-picker/DatePicker.module.js +1 -1
- package/dist/components/date-picker/DatePicker_module.css +14 -4
- package/dist/components/dialog/Dialog.d.ts +1 -1
- package/dist/components/dialog/Dialog.js +11 -12
- package/dist/components/drawer/Drawer.d.ts +6 -3
- package/dist/components/drawer/Drawer.js +33 -24
- package/dist/components/editable/Editable.d.ts +1 -1
- package/dist/components/editable/Editable.js +10 -11
- package/dist/components/empty/Empty.js +6 -7
- package/dist/components/field/Field.js +10 -11
- package/dist/components/fieldset/Fieldset.js +5 -6
- package/dist/components/file-upload/FileUpload.d.ts +3 -2
- package/dist/components/file-upload/FileUpload.js +28 -55
- package/dist/components/file-upload/FileUpload_module.css +4 -13
- package/dist/components/floating-panel/FloatingPanel.d.ts +2 -2
- package/dist/components/floating-panel/FloatingPanel.js +14 -15
- package/dist/components/floating-panel/FloatingPanel_module.css +4 -17
- package/dist/components/heading/Heading.js +1 -2
- package/dist/components/highlight/Highlight.js +1 -2
- package/dist/components/hover-card/HoverCard.d.ts +2 -1
- package/dist/components/hover-card/HoverCard.js +15 -6
- package/dist/components/hover-card/HoverCard.module.js +1 -0
- package/dist/components/hover-card/HoverCard_module.css +18 -3
- package/dist/components/image/Image.js +1 -2
- package/dist/components/image-cropper/ImageCropper.d.ts +1 -1
- package/dist/components/image-cropper/ImageCropper.js +7 -8
- package/dist/components/input/Input.d.ts +4 -4
- package/dist/components/input/Input.js +1 -2
- package/dist/components/input-group/InputGroup.d.ts +5 -5
- package/dist/components/input-group/InputGroup.js +5 -6
- package/dist/components/json-tree-view/JsonTreeView.js +3 -4
- package/dist/components/json-tree-view/JsonTreeView_module.css +26 -10
- package/dist/components/kbd/Kbd.js +2 -3
- package/dist/components/lightbox/Lightbox.d.ts +1 -1
- package/dist/components/lightbox/Lightbox.js +13 -14
- package/dist/components/lightbox/Lightbox_module.css +0 -3
- package/dist/components/list/List.js +2 -3
- package/dist/components/listbox/Listbox.d.ts +5 -5
- package/dist/components/listbox/Listbox.js +19 -25
- package/dist/components/listbox/Listbox.module.js +2 -2
- package/dist/components/listbox/Listbox_module.css +3 -13
- package/dist/components/marquee/Marquee.js +6 -7
- package/dist/components/menu/Menu.d.ts +2 -1
- package/dist/components/menu/Menu.js +34 -41
- package/dist/components/menu/Menu.module.js +1 -1
- package/dist/components/menu/Menu_module.css +8 -8
- package/dist/components/native-select/NativeSelect.js +2 -3
- package/dist/components/native-select/NativeSelect_module.css +0 -1
- package/dist/components/navigation-menu/NavigationMenu.js +17 -36
- package/dist/components/navigation-menu/NavigationMenu.module.js +2 -3
- package/dist/components/navigation-menu/NavigationMenu_module.css +15 -32
- package/dist/components/number-input/NumberInput.js +9 -10
- package/dist/components/pagination/Pagination.js +17 -20
- package/dist/components/pagination/Pagination_module.css +1 -5
- package/dist/components/password-input/PasswordInput.js +7 -8
- package/dist/components/pin-input/PinInput.d.ts +3 -2
- package/dist/components/pin-input/PinInput.js +13 -54
- package/dist/components/popover/Popover.d.ts +5 -3
- package/dist/components/popover/Popover.js +16 -17
- package/dist/components/progress-circular/ProgressCircular.js +8 -9
- package/dist/components/progress-circular/ProgressCircular.module.js +1 -3
- package/dist/components/progress-circular/ProgressCircular_module.css +0 -10
- package/dist/components/progress-linear/ProgressLinear.js +7 -8
- package/dist/components/progress-linear/ProgressLinear.module.js +1 -5
- package/dist/components/progress-linear/ProgressLinear_module.css +0 -20
- package/dist/components/qr-code/QrCode.js +6 -7
- package/dist/components/radio-group/RadioGroup.d.ts +1 -0
- package/dist/components/radio-group/RadioGroup.js +13 -27
- package/dist/components/radio-group/RadioGroup_module.css +0 -1
- package/dist/components/rating-group/RatingGroup.d.ts +1 -0
- package/dist/components/rating-group/RatingGroup.js +12 -29
- package/dist/components/rating-group/RatingGroup_module.css +1 -1
- package/dist/components/scroll-area/ScrollArea.js +7 -8
- package/dist/components/segment-group/SegmentGroup.d.ts +1 -0
- package/dist/components/segment-group/SegmentGroup.js +16 -30
- package/dist/components/segment-group/SegmentGroup_module.css +4 -0
- package/dist/components/select/Select.d.ts +4 -7
- package/dist/components/select/Select.js +36 -86
- package/dist/components/select/Select.module.js +1 -1
- package/dist/components/select/Select_module.css +4 -31
- package/dist/components/separator/Separator.d.ts +6 -6
- package/dist/components/separator/Separator.js +1 -2
- package/dist/components/sidebar/Sidebar.d.ts +24 -22
- package/dist/components/sidebar/Sidebar.js +88 -75
- package/dist/components/sidebar/Sidebar.module.js +2 -3
- package/dist/components/sidebar/Sidebar_module.css +112 -178
- package/dist/components/signature-pad/SignaturePad.d.ts +5 -8
- package/dist/components/signature-pad/SignaturePad.js +17 -46
- package/dist/components/signature-pad/SignaturePad_module.css +0 -1
- package/dist/components/simple-grid/SimpleGrid.js +13 -8
- package/dist/components/skeleton/Skeleton.d.ts +2 -2
- package/dist/components/skeleton/Skeleton.js +1 -2
- package/dist/components/slider/Slider.d.ts +2 -2
- package/dist/components/slider/Slider.js +18 -32
- package/dist/components/spinner/Spinner.d.ts +2 -2
- package/dist/components/spinner/Spinner.js +1 -2
- package/dist/components/split-button/SplitButton.d.ts +4 -4
- package/dist/components/split-button/SplitButton.js +11 -8
- package/dist/components/splitter/Splitter.js +5 -6
- package/dist/components/splitter/Splitter_module.css +2 -10
- package/dist/components/stack/Stack.d.ts +6 -6
- package/dist/components/stack/Stack.js +4 -5
- package/dist/components/stack/Stack_module.css +1 -1
- package/dist/components/steps/Steps.js +12 -13
- package/dist/components/steps/Steps_module.css +2 -3
- package/dist/components/swap/Swap.js +3 -4
- package/dist/components/switch/Switch.d.ts +3 -2
- package/dist/components/switch/Switch.js +12 -35
- package/dist/components/switch/Switch_module.css +0 -1
- package/dist/components/table/Table.d.ts +5 -5
- package/dist/components/table/Table.js +12 -13
- package/dist/components/tabs/Tabs.js +6 -7
- package/dist/components/tabs/Tabs_module.css +5 -10
- package/dist/components/tag/Tag.js +5 -6
- package/dist/components/tag/Tag_module.css +2 -4
- package/dist/components/tags-input/TagsInput.d.ts +3 -3
- package/dist/components/tags-input/TagsInput.js +21 -75
- package/dist/components/tags-input/TagsInput_module.css +0 -1
- package/dist/components/text/Text.js +1 -2
- package/dist/components/textarea/Textarea.js +1 -2
- package/dist/components/timer/Timer.js +7 -8
- package/dist/components/toast/Toast.d.ts +1 -1
- package/dist/components/toast/Toast.js +7 -8
- package/dist/components/toast/Toast_module.css +1 -2
- package/dist/components/toc/Toc.js +10 -11
- package/dist/components/toc/Toc_module.css +2 -2
- package/dist/components/toggle/Toggle.js +2 -3
- package/dist/components/toggle-group/ToggleGroup.d.ts +1 -1
- package/dist/components/toggle-group/ToggleGroup.js +3 -4
- package/dist/components/tooltip/Tooltip.d.ts +1 -1
- package/dist/components/tooltip/Tooltip.js +6 -7
- package/dist/components/tooltip/Tooltip_module.css +1 -1
- package/dist/components/tour/Tour.d.ts +1 -1
- package/dist/components/tour/Tour.js +14 -15
- package/dist/components/tree-view/TreeView.d.ts +4 -4
- package/dist/components/tree-view/TreeView.js +17 -18
- package/dist/components/tree-view/TreeView_module.css +39 -12
- package/dist/components/typeset/Typeset.js +2 -3
- package/dist/components/typeset/Typeset_module.css +300 -159
- package/dist/internal/icons/ui/Icons.d.ts +9 -30
- package/dist/internal/icons/ui/Icons.js +67 -807
- package/dist/internal/icons/ui/index.d.ts +1 -1
- package/dist/styles/animations.css +310 -0
- package/dist/styles/style.css +168 -2
- package/package.json +25 -25
- package/dist/internal/normalizeClassName.d.ts +0 -1
- package/dist/internal/normalizeClassName.js +0 -2
|
@@ -2,7 +2,6 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { ark } from "@ark-ui/react/factory";
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
|
-
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
6
5
|
import Container_module from "./Container.module.js";
|
|
7
6
|
const Container_ContainerRoot = /*#__PURE__*/ forwardRef(function({ size = 'lg', gutter = 'md', className, ...props }, ref) {
|
|
8
7
|
return /*#__PURE__*/ jsx(ark.div, {
|
|
@@ -13,7 +12,7 @@ const Container_ContainerRoot = /*#__PURE__*/ forwardRef(function({ size = 'lg',
|
|
|
13
12
|
"data-slot": "container-root",
|
|
14
13
|
"data-size": size,
|
|
15
14
|
"data-gutter": gutter,
|
|
16
|
-
className: clsx(Container_module.root,
|
|
15
|
+
className: clsx(Container_module.root, className)
|
|
17
16
|
});
|
|
18
17
|
});
|
|
19
18
|
const Container = Object.assign(Container_ContainerRoot, {
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { DateInput as DateInputPrimitive, type DateInputDateValue, useDateInput, useDateInputContext } from '@ark-ui/react/date-input';
|
|
2
|
-
import type { ComponentProps
|
|
3
|
-
type DateInputFormProps = {
|
|
4
|
-
names?: readonly [string, string];
|
|
5
|
-
};
|
|
2
|
+
import type { ComponentProps } from 'react';
|
|
6
3
|
declare function DateInputSeparator({ className, 'aria-hidden': ariaHidden, role, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
|
|
7
|
-
declare const DateInput: import("react").ForwardRefExoticComponent<Omit<DateInputPrimitive.RootProps & import("react").RefAttributes<HTMLDivElement
|
|
8
|
-
Root: import("react").ForwardRefExoticComponent<Omit<DateInputPrimitive.RootProps & import("react").RefAttributes<HTMLDivElement
|
|
9
|
-
RootProvider: import("react").ForwardRefExoticComponent<Omit<DateInputPrimitive.RootProviderProps & import("react").RefAttributes<HTMLDivElement
|
|
4
|
+
declare const DateInput: import("react").ForwardRefExoticComponent<Omit<DateInputPrimitive.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
5
|
+
Root: import("react").ForwardRefExoticComponent<Omit<DateInputPrimitive.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
RootProvider: import("react").ForwardRefExoticComponent<Omit<DateInputPrimitive.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
HiddenInput: import("react").ForwardRefExoticComponent<DateInputPrimitive.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
10
8
|
Label: import("react").ForwardRefExoticComponent<Omit<DateInputPrimitive.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
11
9
|
Control: import("react").ForwardRefExoticComponent<Omit<DateInputPrimitive.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
10
|
SegmentGroup: import("react").ForwardRefExoticComponent<Omit<DateInputPrimitive.SegmentGroupProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
11
|
Segment: import("react").ForwardRefExoticComponent<Omit<DateInputPrimitive.SegmentProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
14
|
-
Segments: import("react").ForwardRefExoticComponent<Omit<Omit<DateInputPrimitive.SegmentGroupProps & import("react").RefAttributes<HTMLDivElement>, "
|
|
12
|
+
Segments: import("react").ForwardRefExoticComponent<Omit<Omit<DateInputPrimitive.SegmentGroupProps & import("react").RefAttributes<HTMLDivElement>, "asChild" | "children">, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
13
|
Separator: typeof DateInputSeparator;
|
|
16
|
-
Context: (props: DateInputPrimitive.ContextProps) => ReactNode;
|
|
14
|
+
Context: (props: DateInputPrimitive.ContextProps) => import("react").ReactNode;
|
|
17
15
|
SegmentContext: (props: DateInputPrimitive.SegmentContextProps) => import("react").JSX.Element[];
|
|
18
16
|
};
|
|
19
17
|
export { DateInput, type DateInputDateValue, useDateInput, useDateInputContext };
|
|
@@ -1,35 +1,30 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { DateInput, useDateInput, useDateInputContext } from "@ark-ui/react/date-input";
|
|
4
4
|
import { clsx } from "clsx";
|
|
5
|
-
import {
|
|
6
|
-
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
5
|
+
import { forwardRef } from "react";
|
|
7
6
|
import DateInput_module from "./DateInput.module.js";
|
|
8
|
-
const DateInput_DateInputRoot = /*#__PURE__*/ forwardRef(function({
|
|
7
|
+
const DateInput_DateInputRoot = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
9
8
|
return /*#__PURE__*/ jsx(DateInput.Root, {
|
|
10
9
|
ref: ref,
|
|
11
10
|
"data-slot": "date-input-root",
|
|
12
|
-
className: clsx(DateInput_module.root,
|
|
13
|
-
|
|
14
|
-
...props,
|
|
15
|
-
children: withHiddenInputs(children, asChild, names)
|
|
11
|
+
className: clsx(DateInput_module.root, className),
|
|
12
|
+
...props
|
|
16
13
|
});
|
|
17
14
|
});
|
|
18
|
-
const DateInput_DateInputRootProvider = /*#__PURE__*/ forwardRef(function({
|
|
15
|
+
const DateInput_DateInputRootProvider = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
19
16
|
return /*#__PURE__*/ jsx(DateInput.RootProvider, {
|
|
20
17
|
ref: ref,
|
|
21
18
|
"data-slot": "date-input-root-provider",
|
|
22
|
-
className: clsx(DateInput_module.root,
|
|
23
|
-
|
|
24
|
-
...props,
|
|
25
|
-
children: withHiddenInputs(children, asChild, names)
|
|
19
|
+
className: clsx(DateInput_module.root, className),
|
|
20
|
+
...props
|
|
26
21
|
});
|
|
27
22
|
});
|
|
28
23
|
const DateInput_DateInputLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
29
24
|
return /*#__PURE__*/ jsx(DateInput.Label, {
|
|
30
25
|
ref: ref,
|
|
31
26
|
"data-slot": "date-input-label",
|
|
32
|
-
className: clsx(DateInput_module.label,
|
|
27
|
+
className: clsx(DateInput_module.label, className),
|
|
33
28
|
...props
|
|
34
29
|
});
|
|
35
30
|
});
|
|
@@ -37,7 +32,7 @@ const DateInput_DateInputControl = /*#__PURE__*/ forwardRef(function({ className
|
|
|
37
32
|
return /*#__PURE__*/ jsx(DateInput.Control, {
|
|
38
33
|
ref: ref,
|
|
39
34
|
"data-slot": "date-input-control",
|
|
40
|
-
className: clsx(DateInput_module.control,
|
|
35
|
+
className: clsx(DateInput_module.control, className),
|
|
41
36
|
...props
|
|
42
37
|
});
|
|
43
38
|
});
|
|
@@ -45,7 +40,7 @@ const DateInput_DateInputSegmentGroup = /*#__PURE__*/ forwardRef(function({ clas
|
|
|
45
40
|
return /*#__PURE__*/ jsx(DateInput.SegmentGroup, {
|
|
46
41
|
ref: ref,
|
|
47
42
|
"data-slot": "date-input-segment-group",
|
|
48
|
-
className: clsx(DateInput_module.segmentGroup,
|
|
43
|
+
className: clsx(DateInput_module.segmentGroup, className),
|
|
49
44
|
...props
|
|
50
45
|
});
|
|
51
46
|
});
|
|
@@ -53,7 +48,7 @@ const DateInput_DateInputSegment = /*#__PURE__*/ forwardRef(function({ className
|
|
|
53
48
|
return /*#__PURE__*/ jsx(DateInput.Segment, {
|
|
54
49
|
ref: ref,
|
|
55
50
|
"data-slot": "date-input-segment",
|
|
56
|
-
className: clsx(DateInput_module.segment,
|
|
51
|
+
className: clsx(DateInput_module.segment, className),
|
|
57
52
|
...props
|
|
58
53
|
});
|
|
59
54
|
});
|
|
@@ -68,44 +63,19 @@ const DateInput_DateInputSegments = /*#__PURE__*/ forwardRef(function(props, ref
|
|
|
68
63
|
})
|
|
69
64
|
});
|
|
70
65
|
});
|
|
71
|
-
function withHiddenInputs(children, asChild, names) {
|
|
72
|
-
const hiddenInputs = /*#__PURE__*/ jsx(DateInputFormInputs, {
|
|
73
|
-
names: names
|
|
74
|
-
});
|
|
75
|
-
if (!asChild) return /*#__PURE__*/ jsxs(Fragment, {
|
|
76
|
-
children: [
|
|
77
|
-
children,
|
|
78
|
-
hiddenInputs
|
|
79
|
-
]
|
|
80
|
-
});
|
|
81
|
-
const child = Children.only(children);
|
|
82
|
-
return /*#__PURE__*/ cloneElement(child, {}, child.props.children, hiddenInputs);
|
|
83
|
-
}
|
|
84
|
-
function DateInputFormInputs({ names }) {
|
|
85
|
-
const dateInput = useDateInputContext();
|
|
86
|
-
const inputCount = Math.max(dateInput.displayValues.length, 1);
|
|
87
|
-
return /*#__PURE__*/ jsx(Fragment, {
|
|
88
|
-
children: Array.from({
|
|
89
|
-
length: inputCount
|
|
90
|
-
}, (_, index)=>/*#__PURE__*/ jsx(DateInput.HiddenInput, {
|
|
91
|
-
index: index,
|
|
92
|
-
name: names?.[index],
|
|
93
|
-
"data-slot": "date-input-hidden-input"
|
|
94
|
-
}, index))
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
66
|
function DateInputSeparator({ className, 'aria-hidden': ariaHidden = true, role = 'presentation', ...props }) {
|
|
98
67
|
return /*#__PURE__*/ jsx("span", {
|
|
99
68
|
"data-slot": "date-input-separator",
|
|
100
69
|
"aria-hidden": ariaHidden,
|
|
101
70
|
role: role,
|
|
102
|
-
className: clsx(DateInput_module.separator,
|
|
71
|
+
className: clsx(DateInput_module.separator, className),
|
|
103
72
|
...props
|
|
104
73
|
});
|
|
105
74
|
}
|
|
106
75
|
const DateInput_DateInput = Object.assign(DateInput_DateInputRoot, {
|
|
107
76
|
Root: DateInput_DateInputRoot,
|
|
108
77
|
RootProvider: DateInput_DateInputRootProvider,
|
|
78
|
+
HiddenInput: DateInput.HiddenInput,
|
|
109
79
|
Label: DateInput_DateInputLabel,
|
|
110
80
|
Control: DateInput_DateInputControl,
|
|
111
81
|
SegmentGroup: DateInput_DateInputSegmentGroup,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useDatePicker, useDatePickerContext, type UseDatePickerReturn } from '@ark-ui/react/date-picker';
|
|
2
2
|
import { DatePicker as DatePickerPrimitive } from '@ark-ui/react/date-picker';
|
|
3
3
|
import type { ComponentProps } from 'react';
|
|
4
|
-
import { type OverlayPortalProps } from '../../internal/overlayPortal';
|
|
4
|
+
import { type OverlayPortalProps } from '../../internal/overlayPortal.js';
|
|
5
5
|
type DatePickerRootProps = ComponentProps<typeof DatePickerPrimitive.Root> & OverlayPortalProps;
|
|
6
6
|
type DatePickerRootProviderProps = ComponentProps<typeof DatePickerPrimitive.RootProvider> & OverlayPortalProps;
|
|
7
7
|
type DatePickerFieldProps = ComponentProps<typeof DatePickerPrimitive.Control> & {
|
|
@@ -6,7 +6,6 @@ import { useFieldsetContext } from "@ark-ui/react/fieldset";
|
|
|
6
6
|
import { clsx } from "clsx";
|
|
7
7
|
import { forwardRef } from "react";
|
|
8
8
|
import { CalendarIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon } from "../../internal/icons/ui/index.js";
|
|
9
|
-
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
10
9
|
import { OverlayPortal, OverlayPortalProvider } from "../../internal/overlayPortal.js";
|
|
11
10
|
import { CloseButton } from "../close-button/index.js";
|
|
12
11
|
import DatePicker_module from "./DatePicker.module.js";
|
|
@@ -19,7 +18,7 @@ const DatePicker_DatePickerRoot = /*#__PURE__*/ forwardRef(function({ className,
|
|
|
19
18
|
children: /*#__PURE__*/ jsx(DatePicker.Root, {
|
|
20
19
|
ref: ref,
|
|
21
20
|
"data-slot": "date-picker-root",
|
|
22
|
-
className: clsx(DatePicker_module.root,
|
|
21
|
+
className: clsx(DatePicker_module.root, className),
|
|
23
22
|
disabled: disabled ?? field?.disabled ?? fieldset?.disabled,
|
|
24
23
|
invalid: invalid ?? field?.invalid ?? fieldset?.invalid,
|
|
25
24
|
lazyMount: lazyMount,
|
|
@@ -37,7 +36,7 @@ const DatePicker_DatePickerRootProvider = /*#__PURE__*/ forwardRef(function({ cl
|
|
|
37
36
|
children: /*#__PURE__*/ jsx(DatePicker.RootProvider, {
|
|
38
37
|
ref: ref,
|
|
39
38
|
"data-slot": "date-picker-root-provider",
|
|
40
|
-
className: clsx(DatePicker_module.root,
|
|
39
|
+
className: clsx(DatePicker_module.root, className),
|
|
41
40
|
lazyMount: lazyMount,
|
|
42
41
|
unmountOnExit: unmountOnExit,
|
|
43
42
|
...props
|
|
@@ -48,7 +47,7 @@ const DatePicker_DatePickerLabel = /*#__PURE__*/ forwardRef(function({ className
|
|
|
48
47
|
return /*#__PURE__*/ jsx(DatePicker.Label, {
|
|
49
48
|
ref: ref,
|
|
50
49
|
"data-slot": "date-picker-label",
|
|
51
|
-
className: clsx(DatePicker_module.label,
|
|
50
|
+
className: clsx(DatePicker_module.label, className),
|
|
52
51
|
...props
|
|
53
52
|
});
|
|
54
53
|
});
|
|
@@ -56,7 +55,7 @@ const DatePicker_DatePickerControl = /*#__PURE__*/ forwardRef(function({ classNa
|
|
|
56
55
|
return /*#__PURE__*/ jsx(DatePicker.Control, {
|
|
57
56
|
ref: ref,
|
|
58
57
|
"data-slot": "date-picker-control",
|
|
59
|
-
className: clsx(DatePicker_module.control,
|
|
58
|
+
className: clsx(DatePicker_module.control, className),
|
|
60
59
|
...props
|
|
61
60
|
});
|
|
62
61
|
});
|
|
@@ -125,7 +124,7 @@ const DatePicker_DatePickerInput = /*#__PURE__*/ forwardRef(function({ className
|
|
|
125
124
|
return /*#__PURE__*/ jsx(DatePicker.Input, {
|
|
126
125
|
ref: ref,
|
|
127
126
|
"data-slot": "date-picker-input",
|
|
128
|
-
className: clsx(DatePicker_module.input,
|
|
127
|
+
className: clsx(DatePicker_module.input, className),
|
|
129
128
|
...props
|
|
130
129
|
});
|
|
131
130
|
});
|
|
@@ -134,34 +133,26 @@ const DatePicker_DatePickerTrigger = /*#__PURE__*/ forwardRef(function({ asChild
|
|
|
134
133
|
ref: ref,
|
|
135
134
|
"data-slot": "date-picker-trigger",
|
|
136
135
|
asChild: asChild,
|
|
137
|
-
className: clsx(!asChild && DatePicker_module.trigger,
|
|
136
|
+
className: clsx(!asChild && DatePicker_module.trigger, className),
|
|
138
137
|
...props,
|
|
139
138
|
children: children ?? /*#__PURE__*/ jsx(CalendarIcon, {})
|
|
140
139
|
});
|
|
141
140
|
});
|
|
142
141
|
const DatePicker_DatePickerClearTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }, ref) {
|
|
143
|
-
const triggerClassName = clsx(DatePicker_module.clearTrigger,
|
|
144
|
-
|
|
142
|
+
const triggerClassName = clsx(DatePicker_module.clearTrigger, className);
|
|
143
|
+
return /*#__PURE__*/ jsx(DatePicker.ClearTrigger, {
|
|
145
144
|
ref: ref,
|
|
146
145
|
asChild: true,
|
|
147
146
|
"data-slot": "date-picker-clear-trigger",
|
|
148
147
|
className: triggerClassName,
|
|
149
|
-
...void 0
|
|
148
|
+
...asChild && void 0 !== ariaLabel ? {
|
|
150
149
|
'aria-label': ariaLabel
|
|
151
|
-
},
|
|
152
|
-
...void 0
|
|
150
|
+
} : {},
|
|
151
|
+
...asChild && void 0 !== ariaLabelledBy ? {
|
|
153
152
|
'aria-labelledby': ariaLabelledBy
|
|
154
|
-
},
|
|
155
|
-
...props,
|
|
156
|
-
children: children
|
|
157
|
-
});
|
|
158
|
-
return /*#__PURE__*/ jsx(DatePicker.ClearTrigger, {
|
|
159
|
-
ref: ref,
|
|
160
|
-
asChild: true,
|
|
161
|
-
"data-slot": "date-picker-clear-trigger",
|
|
162
|
-
className: triggerClassName,
|
|
153
|
+
} : {},
|
|
163
154
|
...props,
|
|
164
|
-
children: /*#__PURE__*/ jsx(CloseButton.Root, {
|
|
155
|
+
children: asChild ? children : /*#__PURE__*/ jsx(CloseButton.Root, {
|
|
165
156
|
...void 0 === ariaLabel ? {} : {
|
|
166
157
|
'aria-label': ariaLabel
|
|
167
158
|
},
|
|
@@ -177,7 +168,7 @@ const DatePicker_DatePickerPositioner = /*#__PURE__*/ forwardRef(function({ clas
|
|
|
177
168
|
children: /*#__PURE__*/ jsx(DatePicker.Positioner, {
|
|
178
169
|
ref: ref,
|
|
179
170
|
"data-slot": "date-picker-positioner",
|
|
180
|
-
className: clsx(DatePicker_module.positioner,
|
|
171
|
+
className: clsx(DatePicker_module.positioner, className),
|
|
181
172
|
...props
|
|
182
173
|
})
|
|
183
174
|
});
|
|
@@ -186,7 +177,7 @@ const DatePicker_DatePickerContent = /*#__PURE__*/ forwardRef(function({ classNa
|
|
|
186
177
|
return /*#__PURE__*/ jsx(DatePicker.Content, {
|
|
187
178
|
ref: ref,
|
|
188
179
|
"data-slot": "date-picker-content",
|
|
189
|
-
className: clsx(DatePicker_module.content,
|
|
180
|
+
className: clsx(DatePicker_module.content, className),
|
|
190
181
|
...props
|
|
191
182
|
});
|
|
192
183
|
});
|
|
@@ -194,7 +185,7 @@ const DatePicker_DatePickerView = /*#__PURE__*/ forwardRef(function({ className,
|
|
|
194
185
|
return /*#__PURE__*/ jsx(DatePicker.View, {
|
|
195
186
|
ref: ref,
|
|
196
187
|
"data-slot": "date-picker-view",
|
|
197
|
-
className: clsx(DatePicker_module.view,
|
|
188
|
+
className: clsx(DatePicker_module.view, className),
|
|
198
189
|
...props
|
|
199
190
|
});
|
|
200
191
|
});
|
|
@@ -202,7 +193,7 @@ const DatePicker_DatePickerViewControl = /*#__PURE__*/ forwardRef(function({ cla
|
|
|
202
193
|
return /*#__PURE__*/ jsx(DatePicker.ViewControl, {
|
|
203
194
|
ref: ref,
|
|
204
195
|
"data-slot": "date-picker-view-control",
|
|
205
|
-
className: clsx(DatePicker_module.viewControl,
|
|
196
|
+
className: clsx(DatePicker_module.viewControl, className),
|
|
206
197
|
...props
|
|
207
198
|
});
|
|
208
199
|
});
|
|
@@ -211,7 +202,7 @@ const DatePicker_DatePickerPrevTrigger = /*#__PURE__*/ forwardRef(function({ asC
|
|
|
211
202
|
ref: ref,
|
|
212
203
|
"data-slot": "date-picker-prev-trigger",
|
|
213
204
|
asChild: asChild,
|
|
214
|
-
className: clsx(!asChild && DatePicker_module.navTrigger,
|
|
205
|
+
className: clsx(!asChild && DatePicker_module.navTrigger, className),
|
|
215
206
|
...props,
|
|
216
207
|
children: children ?? /*#__PURE__*/ jsx(ChevronLeftIcon, {})
|
|
217
208
|
});
|
|
@@ -221,7 +212,7 @@ const DatePicker_DatePickerNextTrigger = /*#__PURE__*/ forwardRef(function({ asC
|
|
|
221
212
|
ref: ref,
|
|
222
213
|
"data-slot": "date-picker-next-trigger",
|
|
223
214
|
asChild: asChild,
|
|
224
|
-
className: clsx(!asChild && DatePicker_module.navTrigger,
|
|
215
|
+
className: clsx(!asChild && DatePicker_module.navTrigger, className),
|
|
225
216
|
...props,
|
|
226
217
|
children: children ?? /*#__PURE__*/ jsx(ChevronRightIcon, {})
|
|
227
218
|
});
|
|
@@ -230,7 +221,7 @@ const DatePicker_DatePickerRangeText = /*#__PURE__*/ forwardRef(function({ class
|
|
|
230
221
|
return /*#__PURE__*/ jsx(DatePicker.RangeText, {
|
|
231
222
|
ref: ref,
|
|
232
223
|
"data-slot": "date-picker-range-text",
|
|
233
|
-
className: clsx(DatePicker_module.rangeText,
|
|
224
|
+
className: clsx(DatePicker_module.rangeText, className),
|
|
234
225
|
...props
|
|
235
226
|
});
|
|
236
227
|
});
|
|
@@ -239,7 +230,7 @@ const DatePicker_DatePickerViewTrigger = /*#__PURE__*/ forwardRef(function({ asC
|
|
|
239
230
|
ref: ref,
|
|
240
231
|
"data-slot": "date-picker-view-trigger",
|
|
241
232
|
asChild: asChild,
|
|
242
|
-
className: clsx(!asChild && DatePicker_module.viewTrigger,
|
|
233
|
+
className: clsx(!asChild && DatePicker_module.viewTrigger, className),
|
|
243
234
|
...props,
|
|
244
235
|
children: children ?? /*#__PURE__*/ jsxs(Fragment, {
|
|
245
236
|
children: [
|
|
@@ -253,7 +244,7 @@ const DatePicker_DatePickerTable = /*#__PURE__*/ forwardRef(function({ className
|
|
|
253
244
|
return /*#__PURE__*/ jsx(DatePicker.Table, {
|
|
254
245
|
ref: ref,
|
|
255
246
|
"data-slot": "date-picker-table",
|
|
256
|
-
className: clsx(DatePicker_module.table,
|
|
247
|
+
className: clsx(DatePicker_module.table, className),
|
|
257
248
|
...props
|
|
258
249
|
});
|
|
259
250
|
});
|
|
@@ -261,7 +252,7 @@ const DatePicker_DatePickerTableHead = /*#__PURE__*/ forwardRef(function({ class
|
|
|
261
252
|
return /*#__PURE__*/ jsx(DatePicker.TableHead, {
|
|
262
253
|
ref: ref,
|
|
263
254
|
"data-slot": "date-picker-table-head",
|
|
264
|
-
className:
|
|
255
|
+
className: className,
|
|
265
256
|
...props
|
|
266
257
|
});
|
|
267
258
|
});
|
|
@@ -269,7 +260,7 @@ const DatePicker_DatePickerTableBody = /*#__PURE__*/ forwardRef(function({ class
|
|
|
269
260
|
return /*#__PURE__*/ jsx(DatePicker.TableBody, {
|
|
270
261
|
ref: ref,
|
|
271
262
|
"data-slot": "date-picker-table-body",
|
|
272
|
-
className:
|
|
263
|
+
className: className,
|
|
273
264
|
...props
|
|
274
265
|
});
|
|
275
266
|
});
|
|
@@ -277,7 +268,7 @@ const DatePicker_DatePickerTableRow = /*#__PURE__*/ forwardRef(function({ classN
|
|
|
277
268
|
return /*#__PURE__*/ jsx(DatePicker.TableRow, {
|
|
278
269
|
ref: ref,
|
|
279
270
|
"data-slot": "date-picker-table-row",
|
|
280
|
-
className:
|
|
271
|
+
className: className,
|
|
281
272
|
...props
|
|
282
273
|
});
|
|
283
274
|
});
|
|
@@ -285,7 +276,7 @@ const DatePicker_DatePickerTableHeader = /*#__PURE__*/ forwardRef(function({ cla
|
|
|
285
276
|
return /*#__PURE__*/ jsx(DatePicker.TableHeader, {
|
|
286
277
|
ref: ref,
|
|
287
278
|
"data-slot": "date-picker-table-header",
|
|
288
|
-
className: clsx(DatePicker_module.tableHeader,
|
|
279
|
+
className: clsx(DatePicker_module.tableHeader, className),
|
|
289
280
|
...props
|
|
290
281
|
});
|
|
291
282
|
});
|
|
@@ -293,7 +284,7 @@ const DatePicker_DatePickerWeekNumberHeaderCell = /*#__PURE__*/ forwardRef(funct
|
|
|
293
284
|
return /*#__PURE__*/ jsx(DatePicker.WeekNumberHeaderCell, {
|
|
294
285
|
ref: ref,
|
|
295
286
|
"data-slot": "date-picker-week-number-header-cell",
|
|
296
|
-
className: clsx(DatePicker_module.tableHeader, DatePicker_module.weekNumberCell,
|
|
287
|
+
className: clsx(DatePicker_module.tableHeader, DatePicker_module.weekNumberCell, className),
|
|
297
288
|
...props
|
|
298
289
|
});
|
|
299
290
|
});
|
|
@@ -301,7 +292,7 @@ const DatePicker_DatePickerWeekNumberCell = /*#__PURE__*/ forwardRef(function({
|
|
|
301
292
|
return /*#__PURE__*/ jsx(DatePicker.WeekNumberCell, {
|
|
302
293
|
ref: ref,
|
|
303
294
|
"data-slot": "date-picker-week-number-cell",
|
|
304
|
-
className: clsx(DatePicker_module.weekNumberCell,
|
|
295
|
+
className: clsx(DatePicker_module.weekNumberCell, className),
|
|
305
296
|
...props
|
|
306
297
|
});
|
|
307
298
|
});
|
|
@@ -309,7 +300,7 @@ const DatePicker_DatePickerTableCell = /*#__PURE__*/ forwardRef(function({ class
|
|
|
309
300
|
return /*#__PURE__*/ jsx(DatePicker.TableCell, {
|
|
310
301
|
ref: ref,
|
|
311
302
|
"data-slot": "date-picker-table-cell",
|
|
312
|
-
className: clsx(DatePicker_module.tableCell,
|
|
303
|
+
className: clsx(DatePicker_module.tableCell, className),
|
|
313
304
|
...props
|
|
314
305
|
});
|
|
315
306
|
});
|
|
@@ -317,7 +308,7 @@ const DatePicker_DatePickerTableCellTrigger = /*#__PURE__*/ forwardRef(function(
|
|
|
317
308
|
return /*#__PURE__*/ jsx(DatePicker.TableCellTrigger, {
|
|
318
309
|
ref: ref,
|
|
319
310
|
"data-slot": "date-picker-table-cell-trigger",
|
|
320
|
-
className: clsx(DatePicker_module.tableCellTrigger,
|
|
311
|
+
className: clsx(DatePicker_module.tableCellTrigger, className),
|
|
321
312
|
...props
|
|
322
313
|
});
|
|
323
314
|
});
|
|
@@ -374,7 +365,7 @@ const DatePicker_DatePickerMonthSelect = /*#__PURE__*/ forwardRef(function({ cla
|
|
|
374
365
|
return /*#__PURE__*/ jsx(DatePicker.MonthSelect, {
|
|
375
366
|
ref: ref,
|
|
376
367
|
"data-slot": "date-picker-month-select",
|
|
377
|
-
className: clsx(DatePicker_module.select,
|
|
368
|
+
className: clsx(DatePicker_module.select, className),
|
|
378
369
|
...props
|
|
379
370
|
});
|
|
380
371
|
});
|
|
@@ -382,7 +373,7 @@ const DatePicker_DatePickerYearSelect = /*#__PURE__*/ forwardRef(function({ clas
|
|
|
382
373
|
return /*#__PURE__*/ jsx(DatePicker.YearSelect, {
|
|
383
374
|
ref: ref,
|
|
384
375
|
"data-slot": "date-picker-year-select",
|
|
385
|
-
className: clsx(DatePicker_module.select,
|
|
376
|
+
className: clsx(DatePicker_module.select, className),
|
|
386
377
|
...props
|
|
387
378
|
});
|
|
388
379
|
});
|
|
@@ -391,7 +382,7 @@ const DatePicker_DatePickerPresetTrigger = /*#__PURE__*/ forwardRef(function({ a
|
|
|
391
382
|
ref: ref,
|
|
392
383
|
"data-slot": "date-picker-preset-trigger",
|
|
393
384
|
asChild: asChild,
|
|
394
|
-
className: clsx(!asChild && DatePicker_module.presetTrigger,
|
|
385
|
+
className: clsx(!asChild && DatePicker_module.presetTrigger, className),
|
|
395
386
|
...props
|
|
396
387
|
});
|
|
397
388
|
});
|
|
@@ -399,7 +390,7 @@ const DatePicker_DatePickerValueText = /*#__PURE__*/ forwardRef(function({ class
|
|
|
399
390
|
return /*#__PURE__*/ jsx(DatePicker.ValueText, {
|
|
400
391
|
ref: ref,
|
|
401
392
|
"data-slot": "date-picker-value-text",
|
|
402
|
-
className: clsx(DatePicker_module.valueText,
|
|
393
|
+
className: clsx(DatePicker_module.valueText, className),
|
|
403
394
|
...props
|
|
404
395
|
});
|
|
405
396
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./DatePicker_module.css";
|
|
2
2
|
const DatePicker_module = {
|
|
3
3
|
root: "root-sgMq4I",
|
|
4
|
+
input: "input-c9DrcO",
|
|
4
5
|
label: "label-o8_6xd",
|
|
5
6
|
control: "control-pfUmnK",
|
|
6
|
-
input: "input-c9DrcO",
|
|
7
7
|
trigger: "trigger-sqKYfh",
|
|
8
8
|
navTrigger: "navTrigger-XCWd0K",
|
|
9
9
|
viewTrigger: "viewTrigger-ZeOJgr",
|
|
@@ -38,6 +38,10 @@
|
|
|
38
38
|
display: inline-flex;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
+
.root-sgMq4I:has(.input-c9DrcO[data-index="1"]) {
|
|
42
|
+
width: var(--moduix-date-picker-width, 24rem);
|
|
43
|
+
}
|
|
44
|
+
|
|
41
45
|
.root-sgMq4I:is([data-disabled], [data-readonly]) {
|
|
42
46
|
opacity: var(--moduix-date-picker-disabled-opacity, var(--moduix-opacity-disabled));
|
|
43
47
|
}
|
|
@@ -111,12 +115,12 @@
|
|
|
111
115
|
cursor: default;
|
|
112
116
|
}
|
|
113
117
|
|
|
114
|
-
.control-pfUmnK:has(.input-c9DrcO
|
|
118
|
+
.control-pfUmnK:has(.input-c9DrcO[data-index="1"]) .input-c9DrcO {
|
|
115
119
|
min-width: min(var(--moduix-date-picker-range-input-min-width, 7.5rem), 100%);
|
|
116
120
|
padding-inline-end: var(--moduix-date-picker-input-padding-x-start, var(--moduix-spacing-3-5));
|
|
117
121
|
}
|
|
118
122
|
|
|
119
|
-
.control-pfUmnK
|
|
123
|
+
.control-pfUmnK .input-c9DrcO[data-index="1"] {
|
|
120
124
|
padding-inline-end: var(--moduix-date-picker-input-padding-x-end, 4.25rem);
|
|
121
125
|
}
|
|
122
126
|
|
|
@@ -191,7 +195,6 @@
|
|
|
191
195
|
--moduix-close-button-focus-ring-width: var(--moduix-date-picker-action-focus-ring-width, var(--moduix-border-width-sm));
|
|
192
196
|
--moduix-close-button-focus-ring-color: var(--moduix-date-picker-focus-ring-color, var(--moduix-color-ring));
|
|
193
197
|
--moduix-close-button-focus-ring-offset: var(--moduix-date-picker-action-focus-ring-offset, 0);
|
|
194
|
-
--moduix-close-button-transition: var(--moduix-date-picker-transition, var(--moduix-transition-default));
|
|
195
198
|
top: 50%;
|
|
196
199
|
position: absolute;
|
|
197
200
|
inset-inline-end: calc(var(--moduix-date-picker-trigger-offset-right, var(--moduix-spacing-2)) +
|
|
@@ -246,7 +249,14 @@
|
|
|
246
249
|
pointer-events: none;
|
|
247
250
|
}
|
|
248
251
|
|
|
249
|
-
|
|
252
|
+
@media (prefers-reduced-motion: reduce) {
|
|
253
|
+
.content-pUiIqD[data-state] {
|
|
254
|
+
animation-duration: 1ms;
|
|
255
|
+
animation-delay: 0s;
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.content-pUiIqD[data-inline] {
|
|
250
260
|
min-width: var(--moduix-date-picker-inline-content-min-width, 18rem);
|
|
251
261
|
box-shadow: var(--moduix-date-picker-inline-content-shadow, none);
|
|
252
262
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Dialog as DialogPrimitive, useDialog, useDialogContext } from '@ark-ui/react/dialog';
|
|
2
2
|
import type { ComponentProps } from 'react';
|
|
3
|
-
import { type OverlayPortalProps } from '../../internal/overlayPortal';
|
|
3
|
+
import { type OverlayPortalProps } from '../../internal/overlayPortal.js';
|
|
4
4
|
type DialogRootProps = ComponentProps<typeof DialogPrimitive.Root> & OverlayPortalProps;
|
|
5
5
|
type DialogRootProviderProps = ComponentProps<typeof DialogPrimitive.RootProvider> & OverlayPortalProps;
|
|
6
6
|
declare function DialogRoot({ lazyMount, portalled, portalRef, unmountOnExit, ...props }: DialogRootProps): import("react").JSX.Element;
|
|
@@ -4,7 +4,6 @@ import { Dialog, useDialog, useDialogContext } from "@ark-ui/react/dialog";
|
|
|
4
4
|
import { ark } from "@ark-ui/react/factory";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
import { forwardRef } from "react";
|
|
7
|
-
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
8
7
|
import { OverlayPortal, OverlayPortalProvider } from "../../internal/overlayPortal.js";
|
|
9
8
|
import { CloseButton } from "../close-button/index.js";
|
|
10
9
|
import Dialog_module from "./Dialog.module.js";
|
|
@@ -36,7 +35,7 @@ const Dialog_DialogTrigger = /*#__PURE__*/ forwardRef(function({ asChild, classN
|
|
|
36
35
|
ref: ref,
|
|
37
36
|
asChild: asChild,
|
|
38
37
|
"data-slot": "dialog-trigger",
|
|
39
|
-
className: clsx(!asChild && Dialog_module.trigger,
|
|
38
|
+
className: clsx(!asChild && Dialog_module.trigger, className),
|
|
40
39
|
...props
|
|
41
40
|
});
|
|
42
41
|
});
|
|
@@ -45,7 +44,7 @@ const Dialog_DialogBackdrop = /*#__PURE__*/ forwardRef(function({ className, ...
|
|
|
45
44
|
children: /*#__PURE__*/ jsx(Dialog.Backdrop, {
|
|
46
45
|
ref: ref,
|
|
47
46
|
"data-slot": "dialog-backdrop",
|
|
48
|
-
className: clsx(Dialog_module.backdrop,
|
|
47
|
+
className: clsx(Dialog_module.backdrop, className),
|
|
49
48
|
...props
|
|
50
49
|
})
|
|
51
50
|
});
|
|
@@ -55,7 +54,7 @@ const Dialog_DialogPositioner = /*#__PURE__*/ forwardRef(function({ className, .
|
|
|
55
54
|
children: /*#__PURE__*/ jsx(Dialog.Positioner, {
|
|
56
55
|
ref: ref,
|
|
57
56
|
"data-slot": "dialog-positioner",
|
|
58
|
-
className: clsx(Dialog_module.positioner,
|
|
57
|
+
className: clsx(Dialog_module.positioner, className),
|
|
59
58
|
...props
|
|
60
59
|
})
|
|
61
60
|
});
|
|
@@ -64,7 +63,7 @@ const Dialog_DialogContent = /*#__PURE__*/ forwardRef(function({ className, ...p
|
|
|
64
63
|
return /*#__PURE__*/ jsx(Dialog.Content, {
|
|
65
64
|
ref: ref,
|
|
66
65
|
"data-slot": "dialog-content",
|
|
67
|
-
className: clsx(Dialog_module.content,
|
|
66
|
+
className: clsx(Dialog_module.content, className),
|
|
68
67
|
...props
|
|
69
68
|
});
|
|
70
69
|
});
|
|
@@ -72,7 +71,7 @@ const Dialog_DialogTitle = /*#__PURE__*/ forwardRef(function({ className, ...pro
|
|
|
72
71
|
return /*#__PURE__*/ jsx(Dialog.Title, {
|
|
73
72
|
ref: ref,
|
|
74
73
|
"data-slot": "dialog-title",
|
|
75
|
-
className: clsx(Dialog_module.title,
|
|
74
|
+
className: clsx(Dialog_module.title, className),
|
|
76
75
|
...props
|
|
77
76
|
});
|
|
78
77
|
});
|
|
@@ -80,7 +79,7 @@ const Dialog_DialogDescription = /*#__PURE__*/ forwardRef(function({ className,
|
|
|
80
79
|
return /*#__PURE__*/ jsx(Dialog.Description, {
|
|
81
80
|
ref: ref,
|
|
82
81
|
"data-slot": "dialog-description",
|
|
83
|
-
className: clsx(Dialog_module.description,
|
|
82
|
+
className: clsx(Dialog_module.description, className),
|
|
84
83
|
...props
|
|
85
84
|
});
|
|
86
85
|
});
|
|
@@ -89,7 +88,7 @@ const Dialog_DialogCloseTrigger = /*#__PURE__*/ forwardRef(function({ asChild, c
|
|
|
89
88
|
ref: ref,
|
|
90
89
|
asChild: asChild,
|
|
91
90
|
"data-slot": "dialog-close-trigger",
|
|
92
|
-
className: clsx(!asChild && Dialog_module.closeTrigger,
|
|
91
|
+
className: clsx(!asChild && Dialog_module.closeTrigger, className),
|
|
93
92
|
...props
|
|
94
93
|
});
|
|
95
94
|
});
|
|
@@ -101,7 +100,7 @@ const Dialog_DialogCloseIcon = /*#__PURE__*/ forwardRef(function({ className, ch
|
|
|
101
100
|
ref: ref,
|
|
102
101
|
"data-slot": "dialog-close-icon",
|
|
103
102
|
"aria-label": ariaLabel,
|
|
104
|
-
className: clsx(Dialog_module.closeIcon,
|
|
103
|
+
className: clsx(Dialog_module.closeIcon, className),
|
|
105
104
|
children: children
|
|
106
105
|
})
|
|
107
106
|
});
|
|
@@ -110,7 +109,7 @@ const Dialog_DialogHeader = /*#__PURE__*/ forwardRef(function({ className, ...pr
|
|
|
110
109
|
return /*#__PURE__*/ jsx(ark.div, {
|
|
111
110
|
ref: ref,
|
|
112
111
|
"data-slot": "dialog-header",
|
|
113
|
-
className: clsx(Dialog_module.header,
|
|
112
|
+
className: clsx(Dialog_module.header, className),
|
|
114
113
|
...props
|
|
115
114
|
});
|
|
116
115
|
});
|
|
@@ -118,7 +117,7 @@ const Dialog_DialogBody = /*#__PURE__*/ forwardRef(function({ className, ...prop
|
|
|
118
117
|
return /*#__PURE__*/ jsx(ark.div, {
|
|
119
118
|
ref: ref,
|
|
120
119
|
"data-slot": "dialog-body",
|
|
121
|
-
className: clsx(Dialog_module.body,
|
|
120
|
+
className: clsx(Dialog_module.body, className),
|
|
122
121
|
...props
|
|
123
122
|
});
|
|
124
123
|
});
|
|
@@ -126,7 +125,7 @@ const Dialog_DialogFooter = /*#__PURE__*/ forwardRef(function({ className, ...pr
|
|
|
126
125
|
return /*#__PURE__*/ jsx(ark.div, {
|
|
127
126
|
ref: ref,
|
|
128
127
|
"data-slot": "dialog-footer",
|
|
129
|
-
className: clsx(Dialog_module.footer,
|
|
128
|
+
className: clsx(Dialog_module.footer, className),
|
|
130
129
|
...props
|
|
131
130
|
});
|
|
132
131
|
});
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { Drawer as DrawerPrimitive, useDrawer, useDrawerContext, useDrawerStackContext } from '@ark-ui/react/drawer';
|
|
2
2
|
import type { ComponentProps } from 'react';
|
|
3
|
-
import { type OverlayPortalProps } from '../../internal/overlayPortal';
|
|
4
|
-
type
|
|
3
|
+
import { type OverlayPortalProps } from '../../internal/overlayPortal.js';
|
|
4
|
+
type DrawerVariant = 'island';
|
|
5
|
+
type DrawerRootProps = ComponentProps<typeof DrawerPrimitive.Root> & OverlayPortalProps & {
|
|
6
|
+
variant?: DrawerVariant;
|
|
7
|
+
};
|
|
5
8
|
type DrawerRootProviderProps = ComponentProps<typeof DrawerPrimitive.RootProvider> & OverlayPortalProps;
|
|
6
9
|
type DrawerContentProps = ComponentProps<typeof DrawerPrimitive.Content> & {
|
|
7
10
|
variant?: 'island';
|
|
8
11
|
};
|
|
9
|
-
declare function DrawerRoot({ lazyMount, portalled, portalRef, unmountOnExit, ...props }: DrawerRootProps): import("react").JSX.Element;
|
|
12
|
+
declare function DrawerRoot({ lazyMount, portalled, portalRef, unmountOnExit, variant, swipeDirection, snapPoints, defaultSnapPoint, ...props }: DrawerRootProps): import("react").JSX.Element;
|
|
10
13
|
declare function DrawerRootProvider({ lazyMount, portalled, portalRef, unmountOnExit, ...props }: DrawerRootProviderProps): import("react").JSX.Element;
|
|
11
14
|
declare const Drawer: typeof DrawerRoot & {
|
|
12
15
|
Root: typeof DrawerRoot;
|