@moduix/react 2.5.1 → 2.7.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 +24 -3
- package/THIRD_PARTY_NOTICES.md +49 -0
- package/dist/components/accordion/Accordion.js +20 -21
- package/dist/components/alert/Alert.js +18 -19
- 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 +29 -71
- 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 +14 -57
- 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 -8
- package/dist/components/card/Card.d.ts +15 -15
- package/dist/components/card/Card.js +30 -31
- package/dist/components/card/Card_module.css +2 -18
- package/dist/components/carousel/Carousel.d.ts +1 -1
- package/dist/components/carousel/Carousel.js +34 -35
- package/dist/components/carousel/Carousel_module.css +7 -0
- package/dist/components/chart/Chart.d.ts +9 -8
- package/dist/components/chart/Chart.js +21 -22
- package/dist/components/chart/Chart_module.css +0 -2
- package/dist/components/checkbox/Checkbox.d.ts +3 -2
- package/dist/components/checkbox/Checkbox.js +20 -43
- package/dist/components/clipboard/Clipboard.js +27 -27
- 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 +17 -20
- 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 +79 -92
- 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 +51 -60
- 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 +99 -126
- package/dist/components/command-palette/CommandPalette_module.css +11 -18
- package/dist/components/container/Container.js +1 -2
- package/dist/components/container/Container_module.css +1 -1
- package/dist/components/date-input/DateInput.d.ts +7 -9
- package/dist/components/date-input/DateInput.js +24 -54
- 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 +84 -93
- package/dist/components/date-picker/DatePicker.module.js +1 -1
- package/dist/components/date-picker/DatePicker_module.css +5 -2
- package/dist/components/dialog/Dialog.d.ts +1 -1
- package/dist/components/dialog/Dialog.js +31 -32
- package/dist/components/drawer/Drawer.d.ts +6 -3
- package/dist/components/drawer/Drawer.js +63 -54
- package/dist/components/editable/Editable.d.ts +1 -1
- package/dist/components/editable/Editable.js +27 -28
- package/dist/components/empty/Empty.js +18 -19
- package/dist/components/field/Field.js +29 -30
- package/dist/components/fieldset/Fieldset.js +15 -16
- package/dist/components/file-upload/FileUpload.d.ts +3 -2
- package/dist/components/file-upload/FileUpload.js +52 -79
- package/dist/components/file-upload/FileUpload_module.css +4 -13
- package/dist/components/floating-panel/FloatingPanel.d.ts +3 -3
- package/dist/components/floating-panel/FloatingPanel.js +36 -37
- package/dist/components/floating-panel/FloatingPanel_module.css +4 -17
- package/dist/components/floating-panel/index.d.ts +1 -0
- package/dist/components/heading/Heading.js +1 -2
- package/dist/components/highlight/Highlight.js +1 -2
- package/dist/components/hover-card/HoverCard.d.ts +3 -2
- package/dist/components/hover-card/HoverCard.js +24 -15
- package/dist/components/hover-card/HoverCard.module.js +1 -0
- package/dist/components/hover-card/HoverCard_module.css +18 -3
- package/dist/components/hover-card/index.d.ts +1 -0
- 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 +21 -22
- 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 +6 -7
- package/dist/components/lightbox/Lightbox.d.ts +1 -1
- package/dist/components/lightbox/Lightbox.js +38 -39
- package/dist/components/lightbox/Lightbox_module.css +0 -2
- package/dist/components/list/List.js +2 -3
- package/dist/components/listbox/Listbox.d.ts +5 -5
- package/dist/components/listbox/Listbox.js +50 -56
- package/dist/components/listbox/Listbox.module.js +2 -2
- package/dist/components/listbox/Listbox_module.css +3 -13
- package/dist/components/marquee/Marquee.js +18 -19
- package/dist/components/menu/Menu.d.ts +2 -1
- package/dist/components/menu/Menu.js +72 -79
- 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 +39 -58
- 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 +25 -26
- package/dist/components/pagination/Pagination.js +28 -31
- package/dist/components/pagination/Pagination_module.css +1 -5
- package/dist/components/password-input/PasswordInput.js +20 -21
- package/dist/components/pin-input/PinInput.d.ts +3 -2
- package/dist/components/pin-input/PinInput.js +20 -61
- package/dist/components/popover/Popover.d.ts +5 -3
- package/dist/components/popover/Popover.js +41 -42
- package/dist/components/progress-circular/ProgressCircular.js +24 -25
- 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 +21 -22
- 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 +18 -19
- package/dist/components/radio-group/RadioGroup.d.ts +1 -0
- package/dist/components/radio-group/RadioGroup.js +25 -39
- 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 +19 -36
- 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 +28 -42
- 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 +69 -119
- 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 +16 -16
- package/dist/components/sidebar/Sidebar.js +81 -86
- package/dist/components/sidebar/Sidebar.module.js +2 -3
- package/dist/components/sidebar/Sidebar_module.css +62 -158
- package/dist/components/signature-pad/SignaturePad.d.ts +5 -8
- package/dist/components/signature-pad/SignaturePad.js +28 -57
- 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 +38 -52
- 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 +7 -7
- package/dist/components/split-button/SplitButton.js +25 -17
- package/dist/components/splitter/Splitter.js +14 -15
- 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 +35 -36
- package/dist/components/steps/Steps_module.css +2 -3
- package/dist/components/swap/Swap.js +9 -10
- package/dist/components/switch/Switch.d.ts +3 -2
- package/dist/components/switch/Switch.js +17 -40
- package/dist/components/switch/Switch_module.css +0 -1
- package/dist/components/table/Table.d.ts +5 -5
- package/dist/components/table/Table.js +35 -36
- package/dist/components/tabs/Tabs.js +18 -19
- 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 +37 -91
- 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 +21 -22
- package/dist/components/toast/Toast.d.ts +1 -1
- package/dist/components/toast/Toast.js +15 -16
- package/dist/components/toast/Toast_module.css +1 -2
- package/dist/components/toc/Toc.js +29 -30
- package/dist/components/toc/Toc_module.css +2 -2
- package/dist/components/toggle/Toggle.js +6 -7
- 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 +17 -18
- package/dist/components/tooltip/Tooltip_module.css +1 -1
- package/dist/components/tour/Tour.d.ts +1 -1
- package/dist/components/tour/Tour.js +39 -40
- package/dist/components/tree-view/TreeView.d.ts +4 -4
- package/dist/components/tree-view/TreeView.js +47 -48
- 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 +23 -23
- package/dist/internal/normalizeClassName.d.ts +0 -1
- package/dist/internal/normalizeClassName.js +0 -2
|
@@ -1,120 +1,105 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
import { Slider, useSlider, useSliderContext } from "@ark-ui/react/slider";
|
|
4
4
|
import { clsx } from "clsx";
|
|
5
|
-
import {
|
|
6
|
-
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
5
|
+
import { forwardRef } from "react";
|
|
7
6
|
import Slider_module from "./Slider.module.js";
|
|
8
7
|
const Slider_SliderRoot = /*#__PURE__*/ forwardRef(function({ className, readOnly, ...props }, ref) {
|
|
9
8
|
return /*#__PURE__*/ jsx(Slider.Root, {
|
|
10
9
|
ref: ref,
|
|
11
|
-
"data-slot": "slider-root",
|
|
12
10
|
"data-readonly": readOnly ? '' : void 0,
|
|
13
|
-
className: clsx(Slider_module.root,
|
|
11
|
+
className: clsx(Slider_module.root, className),
|
|
14
12
|
readOnly: readOnly,
|
|
15
|
-
...props
|
|
13
|
+
...props,
|
|
14
|
+
"data-slot": "slider-root"
|
|
16
15
|
});
|
|
17
16
|
});
|
|
18
17
|
const Slider_SliderRootProvider = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
19
18
|
return /*#__PURE__*/ jsx(Slider.RootProvider, {
|
|
20
19
|
ref: ref,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
className: clsx(Slider_module.root, className),
|
|
21
|
+
...props,
|
|
22
|
+
"data-slot": "slider-root-provider"
|
|
24
23
|
});
|
|
25
24
|
});
|
|
26
25
|
const Slider_SliderLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
27
26
|
return /*#__PURE__*/ jsx(Slider.Label, {
|
|
28
27
|
ref: ref,
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
28
|
+
className: clsx(Slider_module.label, className),
|
|
29
|
+
...props,
|
|
30
|
+
"data-slot": "slider-label"
|
|
32
31
|
});
|
|
33
32
|
});
|
|
34
33
|
const Slider_SliderValueText = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
35
34
|
return /*#__PURE__*/ jsx(Slider.ValueText, {
|
|
36
35
|
ref: ref,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
className: clsx(Slider_module.valueText, className),
|
|
37
|
+
...props,
|
|
38
|
+
"data-slot": "slider-value-text"
|
|
40
39
|
});
|
|
41
40
|
});
|
|
42
41
|
const Slider_SliderControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
43
42
|
return /*#__PURE__*/ jsx(Slider.Control, {
|
|
44
43
|
ref: ref,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
className: clsx(Slider_module.control, className),
|
|
45
|
+
...props,
|
|
46
|
+
"data-slot": "slider-control"
|
|
48
47
|
});
|
|
49
48
|
});
|
|
50
49
|
const Slider_SliderTrack = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
51
50
|
return /*#__PURE__*/ jsx(Slider.Track, {
|
|
52
51
|
ref: ref,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
52
|
+
className: clsx(Slider_module.track, className),
|
|
53
|
+
...props,
|
|
54
|
+
"data-slot": "slider-track"
|
|
56
55
|
});
|
|
57
56
|
});
|
|
58
57
|
const Slider_SliderRange = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
59
58
|
return /*#__PURE__*/ jsx(Slider.Range, {
|
|
60
59
|
ref: ref,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
60
|
+
className: clsx(Slider_module.range, className),
|
|
61
|
+
...props,
|
|
62
|
+
"data-slot": "slider-range"
|
|
64
63
|
});
|
|
65
64
|
});
|
|
66
|
-
const Slider_SliderThumb = /*#__PURE__*/ forwardRef(function({
|
|
65
|
+
const Slider_SliderThumb = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
67
66
|
return /*#__PURE__*/ jsx(Slider.Thumb, {
|
|
68
67
|
ref: ref,
|
|
69
|
-
|
|
70
|
-
"data-slot": "slider-thumb",
|
|
71
|
-
className: clsx(Slider_module.thumb, normalizeClassName(className)),
|
|
68
|
+
className: clsx(Slider_module.thumb, className),
|
|
72
69
|
...props,
|
|
73
|
-
|
|
70
|
+
"data-slot": "slider-thumb"
|
|
74
71
|
});
|
|
75
72
|
});
|
|
76
|
-
function withHiddenInput(children, asChild) {
|
|
77
|
-
const hiddenInput = /*#__PURE__*/ jsx(Slider.HiddenInput, {
|
|
78
|
-
"data-slot": "slider-hidden-input"
|
|
79
|
-
});
|
|
80
|
-
if (!asChild) return /*#__PURE__*/ jsxs(Fragment, {
|
|
81
|
-
children: [
|
|
82
|
-
children,
|
|
83
|
-
hiddenInput
|
|
84
|
-
]
|
|
85
|
-
});
|
|
86
|
-
const child = Children.only(children);
|
|
87
|
-
return /*#__PURE__*/ cloneElement(child, {}, child.props.children, hiddenInput);
|
|
88
|
-
}
|
|
89
73
|
function SliderThumbs({ className }) {
|
|
90
74
|
const slider = useSliderContext();
|
|
91
75
|
return slider.value.map((_, index)=>/*#__PURE__*/ jsx(Slider_SliderThumb, {
|
|
92
76
|
index: index,
|
|
93
|
-
className: className
|
|
77
|
+
className: className,
|
|
78
|
+
children: /*#__PURE__*/ jsx(Slider.HiddenInput, {})
|
|
94
79
|
}, index));
|
|
95
80
|
}
|
|
96
81
|
const Slider_SliderMarkerGroup = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
97
82
|
return /*#__PURE__*/ jsx(Slider.MarkerGroup, {
|
|
98
83
|
ref: ref,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
84
|
+
className: clsx(Slider_module.markerGroup, className),
|
|
85
|
+
...props,
|
|
86
|
+
"data-slot": "slider-marker-group"
|
|
102
87
|
});
|
|
103
88
|
});
|
|
104
89
|
const Slider_SliderMarker = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
105
90
|
return /*#__PURE__*/ jsx(Slider.Marker, {
|
|
106
91
|
ref: ref,
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
92
|
+
className: clsx(Slider_module.marker, className),
|
|
93
|
+
...props,
|
|
94
|
+
"data-slot": "slider-marker"
|
|
110
95
|
});
|
|
111
96
|
});
|
|
112
97
|
const Slider_SliderDraggingIndicator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
113
98
|
return /*#__PURE__*/ jsx(Slider.DraggingIndicator, {
|
|
114
99
|
ref: ref,
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
100
|
+
className: clsx(Slider_module.draggingIndicator, className),
|
|
101
|
+
...props,
|
|
102
|
+
"data-slot": "slider-dragging-indicator"
|
|
118
103
|
});
|
|
119
104
|
});
|
|
120
105
|
const Slider_Slider = Object.assign(Slider_SliderRoot, {
|
|
@@ -126,6 +111,7 @@ const Slider_Slider = Object.assign(Slider_SliderRoot, {
|
|
|
126
111
|
Label: Slider_SliderLabel,
|
|
127
112
|
ValueText: Slider_SliderValueText,
|
|
128
113
|
Control: Slider_SliderControl,
|
|
114
|
+
HiddenInput: Slider.HiddenInput,
|
|
129
115
|
Track: Slider_SliderTrack,
|
|
130
116
|
Range: Slider_SliderRange,
|
|
131
117
|
Thumb: Slider_SliderThumb,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
declare const Spinner: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
2
|
-
size?:
|
|
2
|
+
size?: 'inherit' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
3
|
decorative?: boolean;
|
|
4
4
|
} & import("react").RefAttributes<HTMLSpanElement>> & {
|
|
5
5
|
Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
6
|
-
size?:
|
|
6
|
+
size?: 'inherit' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
7
7
|
decorative?: boolean;
|
|
8
8
|
} & import("react").RefAttributes<HTMLSpanElement>>;
|
|
9
9
|
};
|
|
@@ -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 Spinner_module from "./Spinner.module.js";
|
|
7
6
|
const Spinner_SpinnerRoot = /*#__PURE__*/ forwardRef(function({ asChild, children, className, decorative = false, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, size = 'md', ...props }, ref) {
|
|
8
7
|
const accessibleLabel = decorative ? void 0 : ariaLabel ?? (ariaLabelledBy ? void 0 : 'Loading');
|
|
@@ -18,7 +17,7 @@ const Spinner_SpinnerRoot = /*#__PURE__*/ forwardRef(function({ asChild, childre
|
|
|
18
17
|
"aria-hidden": decorative && !asChild ? true : void 0,
|
|
19
18
|
"aria-label": accessibleLabel,
|
|
20
19
|
"aria-labelledby": decorative ? void 0 : ariaLabelledBy,
|
|
21
|
-
className: clsx(Spinner_module.root,
|
|
20
|
+
className: clsx(Spinner_module.root, className),
|
|
22
21
|
children: asChild ? children : /*#__PURE__*/ jsx("span", {
|
|
23
22
|
"data-scope": "spinner",
|
|
24
23
|
"data-part": "indicator",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { Menu as MenuPrimitive } from '@ark-ui/react/menu';
|
|
1
2
|
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
-
import { Button } from '../button';
|
|
3
|
-
import { Menu } from '../menu';
|
|
3
|
+
import { Button } from '../button/index.js';
|
|
4
4
|
type ButtonProps = ComponentProps<typeof Button>;
|
|
5
5
|
type SplitButtonVariant = Exclude<NonNullable<ButtonProps['variant']>, 'link'>;
|
|
6
6
|
type SplitButtonSize = Exclude<NonNullable<ButtonProps['size']>, 'icon-sm' | 'icon-md' | 'icon-lg'>;
|
|
@@ -8,11 +8,11 @@ type SplitButtonActionProps = Omit<ButtonProps, 'size' | 'variant'> & {
|
|
|
8
8
|
size?: SplitButtonSize;
|
|
9
9
|
variant?: SplitButtonVariant;
|
|
10
10
|
};
|
|
11
|
-
type SplitButtonTriggerProps = Omit<ComponentProps<typeof
|
|
11
|
+
type SplitButtonTriggerProps = Omit<ComponentProps<typeof MenuPrimitive.Trigger>, 'asChild'> & {
|
|
12
12
|
size?: SplitButtonSize;
|
|
13
13
|
variant?: SplitButtonVariant;
|
|
14
14
|
};
|
|
15
|
-
declare const SplitButton: import("react").ForwardRefExoticComponent<Omit<
|
|
15
|
+
declare const SplitButton: import("react").ForwardRefExoticComponent<Omit<MenuPrimitive.RootProps & import("../../internal/overlayPortal.js").OverlayPortalProps, "children"> & {
|
|
16
16
|
'aria-label'?: string;
|
|
17
17
|
'aria-labelledby'?: string;
|
|
18
18
|
children?: ReactNode;
|
|
@@ -20,7 +20,7 @@ declare const SplitButton: import("react").ForwardRefExoticComponent<Omit<import
|
|
|
20
20
|
size?: SplitButtonSize;
|
|
21
21
|
variant?: SplitButtonVariant;
|
|
22
22
|
} & import("react").RefAttributes<HTMLDivElement>> & {
|
|
23
|
-
Root: import("react").ForwardRefExoticComponent<Omit<
|
|
23
|
+
Root: import("react").ForwardRefExoticComponent<Omit<MenuPrimitive.RootProps & import("../../internal/overlayPortal.js").OverlayPortalProps, "children"> & {
|
|
24
24
|
'aria-label'?: string;
|
|
25
25
|
'aria-labelledby'?: string;
|
|
26
26
|
children?: ReactNode;
|
|
@@ -30,7 +30,7 @@ declare const SplitButton: import("react").ForwardRefExoticComponent<Omit<import
|
|
|
30
30
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
31
|
Action: import("react").ForwardRefExoticComponent<Omit<SplitButtonActionProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
32
32
|
Trigger: import("react").ForwardRefExoticComponent<Omit<SplitButtonTriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
33
|
-
Positioner: import("react").ForwardRefExoticComponent<Omit<
|
|
34
|
-
Content: import("react").ForwardRefExoticComponent<Omit<
|
|
33
|
+
Positioner: import("react").ForwardRefExoticComponent<Omit<MenuPrimitive.PositionerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
Content: import("react").ForwardRefExoticComponent<Omit<MenuPrimitive.ContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
35
35
|
};
|
|
36
36
|
export { SplitButton };
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Menu } from "@ark-ui/react/menu";
|
|
3
4
|
import { clsx } from "clsx";
|
|
4
5
|
import { createContext, forwardRef, useContext } from "react";
|
|
5
6
|
import { ChevronDownIcon } from "../../internal/icons/ui/index.js";
|
|
6
|
-
import {
|
|
7
|
+
import { OverlayPortal } from "../../internal/overlayPortal.js";
|
|
7
8
|
import { Button } from "../button/index.js";
|
|
8
|
-
import { Menu } from "../menu/index.js";
|
|
9
|
+
import { Menu as index_js_Menu } from "../menu/index.js";
|
|
10
|
+
import Menu_module from "../menu/Menu.module.js";
|
|
9
11
|
import SplitButton_module from "./SplitButton.module.js";
|
|
10
12
|
const SplitButtonContext = /*#__PURE__*/ createContext(null);
|
|
11
13
|
function useSplitButtonContext(componentName) {
|
|
@@ -19,7 +21,7 @@ const SplitButton_SplitButtonRoot = /*#__PURE__*/ forwardRef(function({ children
|
|
|
19
21
|
size,
|
|
20
22
|
variant
|
|
21
23
|
},
|
|
22
|
-
children: /*#__PURE__*/ jsx(
|
|
24
|
+
children: /*#__PURE__*/ jsx(index_js_Menu.Root, {
|
|
23
25
|
positioning: {
|
|
24
26
|
placement: 'bottom-end',
|
|
25
27
|
gutter: 4,
|
|
@@ -34,7 +36,7 @@ const SplitButton_SplitButtonRoot = /*#__PURE__*/ forwardRef(function({ children
|
|
|
34
36
|
"data-scope": "split-button",
|
|
35
37
|
"data-part": "root",
|
|
36
38
|
"data-slot": "split-button-root",
|
|
37
|
-
className: clsx(SplitButton_module.root,
|
|
39
|
+
className: clsx(SplitButton_module.root, className),
|
|
38
40
|
children: children
|
|
39
41
|
})
|
|
40
42
|
})
|
|
@@ -44,11 +46,11 @@ const SplitButton_SplitButtonAction = /*#__PURE__*/ forwardRef(function({ classN
|
|
|
44
46
|
const context = useSplitButtonContext('SplitButton.Action');
|
|
45
47
|
return /*#__PURE__*/ jsx(Button, {
|
|
46
48
|
ref: ref,
|
|
47
|
-
"data-slot": "split-button-action",
|
|
48
49
|
size: size ?? context.size,
|
|
49
50
|
variant: variant ?? context.variant,
|
|
50
|
-
className: clsx(SplitButton_module.action,
|
|
51
|
-
...props
|
|
51
|
+
className: clsx(SplitButton_module.action, className),
|
|
52
|
+
...props,
|
|
53
|
+
"data-slot": "split-button-action"
|
|
52
54
|
});
|
|
53
55
|
});
|
|
54
56
|
const SplitButton_SplitButtonTrigger = /*#__PURE__*/ forwardRef(function({ children, className, size, variant, 'aria-label': ariaLabel, ...props }, ref) {
|
|
@@ -57,10 +59,10 @@ const SplitButton_SplitButtonTrigger = /*#__PURE__*/ forwardRef(function({ child
|
|
|
57
59
|
return /*#__PURE__*/ jsx(Menu.Trigger, {
|
|
58
60
|
ref: ref,
|
|
59
61
|
asChild: true,
|
|
60
|
-
"data-slot": "split-button-trigger",
|
|
61
62
|
"aria-label": isIconOnly ? ariaLabel ?? 'More actions' : ariaLabel,
|
|
62
|
-
className: clsx(SplitButton_module.trigger,
|
|
63
|
+
className: clsx(SplitButton_module.trigger, className),
|
|
63
64
|
...props,
|
|
65
|
+
"data-slot": "split-button-trigger",
|
|
64
66
|
children: /*#__PURE__*/ jsx(Button, {
|
|
65
67
|
size: size ?? context.size,
|
|
66
68
|
variant: variant ?? context.variant,
|
|
@@ -69,19 +71,25 @@ const SplitButton_SplitButtonTrigger = /*#__PURE__*/ forwardRef(function({ child
|
|
|
69
71
|
});
|
|
70
72
|
});
|
|
71
73
|
const SplitButton_SplitButtonPositioner = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
72
|
-
return /*#__PURE__*/ jsx(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
74
|
+
return /*#__PURE__*/ jsx(OverlayPortal, {
|
|
75
|
+
children: /*#__PURE__*/ jsx(Menu.Positioner, {
|
|
76
|
+
ref: ref,
|
|
77
|
+
className: clsx(Menu_module.positioner, className),
|
|
78
|
+
...props,
|
|
79
|
+
"data-slot": "split-button-positioner"
|
|
80
|
+
})
|
|
77
81
|
});
|
|
78
82
|
});
|
|
79
|
-
const SplitButton_SplitButtonContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
83
|
+
const SplitButton_SplitButtonContent = /*#__PURE__*/ forwardRef(function({ asChild, children, className, ...props }, ref) {
|
|
80
84
|
return /*#__PURE__*/ jsx(Menu.Content, {
|
|
81
85
|
ref: ref,
|
|
86
|
+
asChild: asChild,
|
|
87
|
+
className: clsx(Menu_module.content, className),
|
|
88
|
+
...props,
|
|
82
89
|
"data-slot": "split-button-content",
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
children: asChild ? children : /*#__PURE__*/ jsx(index_js_Menu.Viewport, {
|
|
91
|
+
children: children
|
|
92
|
+
})
|
|
85
93
|
});
|
|
86
94
|
});
|
|
87
95
|
const SplitButton = Object.assign(SplitButton_SplitButtonRoot, {
|
|
@@ -2,7 +2,6 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Splitter, createSplitterRegistry, useSplitter, useSplitterContext } from "@ark-ui/react/splitter";
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
|
-
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
6
5
|
import Splitter_module from "./Splitter.module.js";
|
|
7
6
|
const rootStyle = {
|
|
8
7
|
width: 'var(--moduix-splitter-width, 100%)',
|
|
@@ -11,50 +10,50 @@ const rootStyle = {
|
|
|
11
10
|
const Splitter_SplitterRoot = /*#__PURE__*/ forwardRef(function({ className, style, ...props }, ref) {
|
|
12
11
|
return /*#__PURE__*/ jsx(Splitter.Root, {
|
|
13
12
|
ref: ref,
|
|
14
|
-
|
|
15
|
-
className: clsx(Splitter_module.root, normalizeClassName(className)),
|
|
13
|
+
className: clsx(Splitter_module.root, className),
|
|
16
14
|
style: {
|
|
17
15
|
...rootStyle,
|
|
18
16
|
...style
|
|
19
17
|
},
|
|
20
|
-
...props
|
|
18
|
+
...props,
|
|
19
|
+
"data-slot": "splitter-root"
|
|
21
20
|
});
|
|
22
21
|
});
|
|
23
22
|
const Splitter_SplitterRootProvider = /*#__PURE__*/ forwardRef(function({ className, style, ...props }, ref) {
|
|
24
23
|
return /*#__PURE__*/ jsx(Splitter.RootProvider, {
|
|
25
24
|
ref: ref,
|
|
26
|
-
|
|
27
|
-
className: clsx(Splitter_module.root, normalizeClassName(className)),
|
|
25
|
+
className: clsx(Splitter_module.root, className),
|
|
28
26
|
style: {
|
|
29
27
|
...rootStyle,
|
|
30
28
|
...style
|
|
31
29
|
},
|
|
32
|
-
...props
|
|
30
|
+
...props,
|
|
31
|
+
"data-slot": "splitter-root-provider"
|
|
33
32
|
});
|
|
34
33
|
});
|
|
35
34
|
const Splitter_SplitterPanel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
36
35
|
return /*#__PURE__*/ jsx(Splitter.Panel, {
|
|
37
36
|
ref: ref,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
className: clsx(Splitter_module.panel, className),
|
|
38
|
+
...props,
|
|
39
|
+
"data-slot": "splitter-panel"
|
|
41
40
|
});
|
|
42
41
|
});
|
|
43
42
|
const Splitter_SplitterResizeTriggerIndicator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
44
43
|
return /*#__PURE__*/ jsx(Splitter.ResizeTriggerIndicator, {
|
|
45
44
|
ref: ref,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
className: clsx(Splitter_module.resizeTriggerIndicator, className),
|
|
46
|
+
...props,
|
|
47
|
+
"data-slot": "splitter-resize-trigger-indicator"
|
|
49
48
|
});
|
|
50
49
|
});
|
|
51
50
|
const Splitter_SplitterResizeTrigger = /*#__PURE__*/ forwardRef(function({ asChild, children, className, ...props }, ref) {
|
|
52
51
|
return /*#__PURE__*/ jsx(Splitter.ResizeTrigger, {
|
|
53
52
|
ref: ref,
|
|
54
53
|
asChild: asChild,
|
|
55
|
-
|
|
56
|
-
className: clsx(Splitter_module.resizeTrigger, normalizeClassName(className)),
|
|
54
|
+
className: clsx(Splitter_module.resizeTrigger, className),
|
|
57
55
|
...props,
|
|
56
|
+
"data-slot": "splitter-resize-trigger",
|
|
58
57
|
children: void 0 !== children || asChild ? children : /*#__PURE__*/ jsx(Splitter_SplitterResizeTriggerIndicator, {})
|
|
59
58
|
});
|
|
60
59
|
});
|
|
@@ -9,13 +9,7 @@
|
|
|
9
9
|
background-color: var(--moduix-splitter-bg, var(--moduix-color-card));
|
|
10
10
|
color: var(--moduix-splitter-color, var(--moduix-color-foreground));
|
|
11
11
|
box-shadow: var(--moduix-splitter-shadow, var(--moduix-shadow-sm));
|
|
12
|
-
display: flex;
|
|
13
12
|
position: relative;
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.root-qJovVx[data-orientation="vertical"] {
|
|
18
|
-
flex-direction: column;
|
|
19
13
|
}
|
|
20
14
|
|
|
21
15
|
.root-qJovVx[data-dragging] {
|
|
@@ -52,13 +46,11 @@
|
|
|
52
46
|
.resizeTrigger-RVtsVR {
|
|
53
47
|
z-index: 1;
|
|
54
48
|
box-sizing: border-box;
|
|
55
|
-
flex: 0 0 var(--moduix-splitter-resize-trigger-line-size, 1px);
|
|
56
49
|
width: var(--moduix-splitter-resize-trigger-line-size, 1px);
|
|
57
50
|
min-width: var(--moduix-splitter-resize-trigger-line-size, 1px);
|
|
58
51
|
background-color: var(--moduix-splitter-resize-trigger-bg, transparent);
|
|
59
52
|
appearance: none;
|
|
60
53
|
cursor: col-resize;
|
|
61
|
-
touch-action: none;
|
|
62
54
|
transition: opacity var(--moduix-splitter-transition, var(--moduix-transition-default));
|
|
63
55
|
border: 0;
|
|
64
56
|
outline: 0;
|
|
@@ -75,8 +67,8 @@
|
|
|
75
67
|
border-radius: var(--moduix-splitter-resize-trigger-line-radius, var(--moduix-radius-full));
|
|
76
68
|
background-color: var(--moduix-splitter-resize-trigger-line-color, var(--moduix-color-border));
|
|
77
69
|
content: "";
|
|
78
|
-
transition: background-color
|
|
79
|
-
|
|
70
|
+
transition: background-color
|
|
71
|
+
var(--moduix-splitter-transition, var(--moduix-transition-default));
|
|
80
72
|
position: absolute;
|
|
81
73
|
}
|
|
82
74
|
|
|
@@ -6,9 +6,9 @@ declare const Stack: import("react").ForwardRefExoticComponent<Omit<import("reac
|
|
|
6
6
|
desktop?: StackDirection;
|
|
7
7
|
};
|
|
8
8
|
gap?: number | string;
|
|
9
|
-
align?: CSSProperties[
|
|
10
|
-
justify?: CSSProperties[
|
|
11
|
-
wrap?: CSSProperties[
|
|
9
|
+
align?: CSSProperties['alignItems'];
|
|
10
|
+
justify?: CSSProperties['justifyContent'];
|
|
11
|
+
wrap?: CSSProperties['flexWrap'];
|
|
12
12
|
fill?: boolean;
|
|
13
13
|
} & import("react").RefAttributes<HTMLElement>> & {
|
|
14
14
|
Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
@@ -17,9 +17,9 @@ declare const Stack: import("react").ForwardRefExoticComponent<Omit<import("reac
|
|
|
17
17
|
desktop?: StackDirection;
|
|
18
18
|
};
|
|
19
19
|
gap?: number | string;
|
|
20
|
-
align?: CSSProperties[
|
|
21
|
-
justify?: CSSProperties[
|
|
22
|
-
wrap?: CSSProperties[
|
|
20
|
+
align?: CSSProperties['alignItems'];
|
|
21
|
+
justify?: CSSProperties['justifyContent'];
|
|
22
|
+
wrap?: CSSProperties['flexWrap'];
|
|
23
23
|
fill?: boolean;
|
|
24
24
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
25
25
|
};
|
|
@@ -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 Stack_module from "./Stack.module.js";
|
|
7
6
|
const Stack_StackRoot = /*#__PURE__*/ forwardRef(function({ asChild, children, className, style, direction, gap, align, justify, wrap, fill, ...props }, ref) {
|
|
8
7
|
const mobileDirection = 'string' == typeof direction ? direction : direction?.mobile ?? direction?.desktop;
|
|
@@ -14,11 +13,11 @@ const Stack_StackRoot = /*#__PURE__*/ forwardRef(function({ asChild, children, c
|
|
|
14
13
|
"data-scope": "stack",
|
|
15
14
|
"data-part": "root",
|
|
16
15
|
"data-slot": "stack-root",
|
|
17
|
-
className: clsx(Stack_module.root,
|
|
16
|
+
className: clsx(Stack_module.root, className),
|
|
18
17
|
style: {
|
|
19
|
-
'--moduix-stack-direction-desktop': desktopDirection,
|
|
20
|
-
'--moduix-stack-direction-mobile': mobileDirection,
|
|
21
|
-
'--moduix-stack-flex': null == fill ? void 0 : fill ? '1 1 0' : 'initial',
|
|
18
|
+
'--moduix-stack-direction-desktop': desktopDirection ?? 'column',
|
|
19
|
+
'--moduix-stack-direction-mobile': mobileDirection ?? 'column',
|
|
20
|
+
'--moduix-stack-flex': null == fill ? void 0 : fill ? '1 1 0%' : 'initial',
|
|
22
21
|
gap,
|
|
23
22
|
alignItems: align,
|
|
24
23
|
justifyContent: justify,
|