@moduix/react 2.5.1 → 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 +24 -3
- 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 +7 -0
- 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 +5 -2
- 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 -2
- 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 +16 -16
- package/dist/components/sidebar/Sidebar.js +35 -48
- 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 +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 +23 -23
- package/dist/internal/normalizeClassName.d.ts +0 -1
- package/dist/internal/normalizeClassName.js +0 -2
|
@@ -1,16 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useFieldContext } from "@ark-ui/react/field";
|
|
4
4
|
import { SignaturePad, useSignaturePad, useSignaturePadContext } from "@ark-ui/react/signature-pad";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
|
-
import {
|
|
6
|
+
import { createContext, forwardRef, useContext } from "react";
|
|
7
7
|
import { RotateCcwIcon } from "../../internal/icons/ui/index.js";
|
|
8
|
-
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
9
8
|
import { CloseButton } from "../close-button/index.js";
|
|
10
9
|
import SignaturePad_module from "./SignaturePad.module.js";
|
|
11
10
|
const SignaturePadReadOnlyContext = /*#__PURE__*/ createContext(false);
|
|
12
11
|
const signaturePadReadOnly = Symbol();
|
|
13
|
-
const SignaturePad_SignaturePadRoot = /*#__PURE__*/ forwardRef(function({ asChild, children, className,
|
|
12
|
+
const SignaturePad_SignaturePadRoot = /*#__PURE__*/ forwardRef(function({ asChild, children, className, ...props }, ref) {
|
|
14
13
|
const field = useFieldContext();
|
|
15
14
|
const readOnly = props.readOnly ?? field?.readOnly ?? false;
|
|
16
15
|
return /*#__PURE__*/ jsx(SignaturePadReadOnlyContext.Provider, {
|
|
@@ -18,24 +17,24 @@ const SignaturePad_SignaturePadRoot = /*#__PURE__*/ forwardRef(function({ asChil
|
|
|
18
17
|
children: /*#__PURE__*/ jsx(SignaturePad.Root, {
|
|
19
18
|
ref: ref,
|
|
20
19
|
"data-slot": "signature-pad-root",
|
|
21
|
-
className: clsx(SignaturePad_module.root,
|
|
20
|
+
className: clsx(SignaturePad_module.root, className),
|
|
22
21
|
asChild: asChild,
|
|
23
22
|
...props,
|
|
24
|
-
children:
|
|
23
|
+
children: children
|
|
25
24
|
})
|
|
26
25
|
});
|
|
27
26
|
});
|
|
28
|
-
const SignaturePad_SignaturePadRootProvider = /*#__PURE__*/ forwardRef(function({ asChild, children, className,
|
|
27
|
+
const SignaturePad_SignaturePadRootProvider = /*#__PURE__*/ forwardRef(function({ asChild, children, className, ...props }, ref) {
|
|
29
28
|
const readOnly = props.value[signaturePadReadOnly] ?? false;
|
|
30
29
|
return /*#__PURE__*/ jsx(SignaturePadReadOnlyContext.Provider, {
|
|
31
30
|
value: readOnly,
|
|
32
31
|
children: /*#__PURE__*/ jsx(SignaturePad.RootProvider, {
|
|
33
32
|
ref: ref,
|
|
34
33
|
"data-slot": "signature-pad-root-provider",
|
|
35
|
-
className: clsx(SignaturePad_module.root,
|
|
34
|
+
className: clsx(SignaturePad_module.root, className),
|
|
36
35
|
asChild: asChild,
|
|
37
36
|
...props,
|
|
38
|
-
children:
|
|
37
|
+
children: children
|
|
39
38
|
})
|
|
40
39
|
});
|
|
41
40
|
});
|
|
@@ -43,7 +42,7 @@ const SignaturePad_SignaturePadLabel = /*#__PURE__*/ forwardRef(function({ class
|
|
|
43
42
|
return /*#__PURE__*/ jsx(SignaturePad.Label, {
|
|
44
43
|
ref: ref,
|
|
45
44
|
"data-slot": "signature-pad-label",
|
|
46
|
-
className: clsx(SignaturePad_module.label,
|
|
45
|
+
className: clsx(SignaturePad_module.label, className),
|
|
47
46
|
...props
|
|
48
47
|
});
|
|
49
48
|
});
|
|
@@ -51,7 +50,7 @@ const SignaturePad_SignaturePadControl = /*#__PURE__*/ forwardRef(function({ cla
|
|
|
51
50
|
return /*#__PURE__*/ jsx(SignaturePad.Control, {
|
|
52
51
|
ref: ref,
|
|
53
52
|
"data-slot": "signature-pad-control",
|
|
54
|
-
className: clsx(SignaturePad_module.control,
|
|
53
|
+
className: clsx(SignaturePad_module.control, className),
|
|
55
54
|
...props
|
|
56
55
|
});
|
|
57
56
|
});
|
|
@@ -59,7 +58,7 @@ const SignaturePad_SignaturePadSegment = /*#__PURE__*/ forwardRef(function({ cla
|
|
|
59
58
|
return /*#__PURE__*/ jsx(SignaturePad.Segment, {
|
|
60
59
|
ref: ref,
|
|
61
60
|
"data-slot": "signature-pad-segment",
|
|
62
|
-
className: clsx(SignaturePad_module.segment,
|
|
61
|
+
className: clsx(SignaturePad_module.segment, className),
|
|
63
62
|
...props
|
|
64
63
|
});
|
|
65
64
|
});
|
|
@@ -67,32 +66,23 @@ const SignaturePad_SignaturePadGuide = /*#__PURE__*/ forwardRef(function({ class
|
|
|
67
66
|
return /*#__PURE__*/ jsx(SignaturePad.Guide, {
|
|
68
67
|
ref: ref,
|
|
69
68
|
"data-slot": "signature-pad-guide",
|
|
70
|
-
className: clsx(SignaturePad_module.guide,
|
|
69
|
+
className: clsx(SignaturePad_module.guide, className),
|
|
71
70
|
...props
|
|
72
71
|
});
|
|
73
72
|
});
|
|
74
73
|
const SignaturePad_SignaturePadClearTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }, ref) {
|
|
75
74
|
const readOnly = useContext(SignaturePadReadOnlyContext);
|
|
76
|
-
const triggerClassName = clsx(SignaturePad_module.clearTrigger,
|
|
77
|
-
if (asChild) return /*#__PURE__*/ jsx(SignaturePad.ClearTrigger, {
|
|
78
|
-
ref: ref,
|
|
79
|
-
asChild: true,
|
|
80
|
-
"data-slot": "signature-pad-clear-trigger",
|
|
81
|
-
className: triggerClassName,
|
|
82
|
-
"aria-label": ariaLabel,
|
|
83
|
-
"aria-labelledby": ariaLabelledBy,
|
|
84
|
-
...props,
|
|
85
|
-
disabled: readOnly || props.disabled,
|
|
86
|
-
children: children
|
|
87
|
-
});
|
|
75
|
+
const triggerClassName = clsx(SignaturePad_module.clearTrigger, className);
|
|
88
76
|
return /*#__PURE__*/ jsx(SignaturePad.ClearTrigger, {
|
|
89
77
|
ref: ref,
|
|
90
78
|
asChild: true,
|
|
91
79
|
"data-slot": "signature-pad-clear-trigger",
|
|
92
80
|
className: triggerClassName,
|
|
81
|
+
"aria-label": asChild ? ariaLabel : void 0,
|
|
82
|
+
"aria-labelledby": asChild ? ariaLabelledBy : void 0,
|
|
93
83
|
...props,
|
|
94
84
|
disabled: readOnly || props.disabled,
|
|
95
|
-
children: /*#__PURE__*/ jsx(CloseButton.Root, {
|
|
85
|
+
children: asChild ? children : /*#__PURE__*/ jsx(CloseButton.Root, {
|
|
96
86
|
"aria-label": ariaLabel,
|
|
97
87
|
"aria-labelledby": ariaLabelledBy,
|
|
98
88
|
children: children ?? /*#__PURE__*/ jsx(RotateCcwIcon, {
|
|
@@ -101,26 +91,6 @@ const SignaturePad_SignaturePadClearTrigger = /*#__PURE__*/ forwardRef(function(
|
|
|
101
91
|
})
|
|
102
92
|
});
|
|
103
93
|
});
|
|
104
|
-
function withHiddenInput(children, asChild, getFormValue) {
|
|
105
|
-
const hiddenInput = /*#__PURE__*/ jsx(SignaturePadFormInput, {
|
|
106
|
-
getFormValue: getFormValue
|
|
107
|
-
});
|
|
108
|
-
if (!asChild) return /*#__PURE__*/ jsxs(Fragment, {
|
|
109
|
-
children: [
|
|
110
|
-
children,
|
|
111
|
-
hiddenInput
|
|
112
|
-
]
|
|
113
|
-
});
|
|
114
|
-
const child = Children.only(children);
|
|
115
|
-
return /*#__PURE__*/ cloneElement(child, {}, child.props.children, hiddenInput);
|
|
116
|
-
}
|
|
117
|
-
function SignaturePadFormInput({ getFormValue }) {
|
|
118
|
-
const signaturePad = useSignaturePadContext();
|
|
119
|
-
return /*#__PURE__*/ jsx(SignaturePad.HiddenInput, {
|
|
120
|
-
"data-slot": "signature-pad-hidden-input",
|
|
121
|
-
value: getFormValue?.(signaturePad.paths) ?? signaturePad.paths.join(' ')
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
94
|
const SignaturePad_SignaturePadCanvas = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
125
95
|
return /*#__PURE__*/ jsxs(SignaturePad_SignaturePadControl, {
|
|
126
96
|
ref: ref,
|
|
@@ -150,6 +120,7 @@ const SignaturePad_SignaturePad = Object.assign(SignaturePad_SignaturePadRoot, {
|
|
|
150
120
|
Root: SignaturePad_SignaturePadRoot,
|
|
151
121
|
RootProvider: SignaturePad_SignaturePadRootProvider,
|
|
152
122
|
Context: SignaturePad.Context,
|
|
123
|
+
HiddenInput: SignaturePad.HiddenInput,
|
|
153
124
|
Label: SignaturePad_SignaturePadLabel,
|
|
154
125
|
Control: SignaturePad_SignaturePadControl,
|
|
155
126
|
Canvas: SignaturePad_SignaturePadCanvas,
|
|
@@ -77,7 +77,6 @@
|
|
|
77
77
|
--moduix-close-button-color: var(--moduix-signature-pad-clear-trigger-color, var(--moduix-color-muted-foreground));
|
|
78
78
|
--moduix-close-button-color-hover: var(--moduix-signature-pad-clear-trigger-color-hover, var(--moduix-color-foreground));
|
|
79
79
|
--moduix-close-button-icon-size: var(--moduix-signature-pad-clear-trigger-icon-size, var(--moduix-spacing-4));
|
|
80
|
-
--moduix-close-button-transition: var(--moduix-signature-pad-transition, var(--moduix-transition-default));
|
|
81
80
|
--moduix-close-button-focus-ring-width: var(--moduix-signature-pad-clear-trigger-focus-ring-width, var(--moduix-focus-ring-width, var(--moduix-border-width-md)));
|
|
82
81
|
--moduix-close-button-focus-ring-color: var(--moduix-signature-pad-clear-trigger-focus-ring-color, var(--moduix-color-ring));
|
|
83
82
|
--moduix-close-button-focus-ring-offset: var(--moduix-signature-pad-clear-trigger-focus-ring-offset, var(--moduix-spacing-1));
|
|
@@ -2,9 +2,8 @@ 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
|
const SimpleGrid_SimpleGridRoot = /*#__PURE__*/ forwardRef(function({ asChild, className, style, columns, minChildWidth, gap, rowGap, columnGap, ...props }, ref) {
|
|
7
|
-
if (null != columns && (!Number.
|
|
6
|
+
if (null != columns && (!Number.isInteger(columns) || columns <= 0)) throw new Error('SimpleGrid `columns` must be a finite positive integer.');
|
|
8
7
|
if ('number' == typeof minChildWidth && (!Number.isFinite(minChildWidth) || minChildWidth < 0)) throw new Error('SimpleGrid `minChildWidth` must be a finite non-negative number.');
|
|
9
8
|
let gridTemplateColumns = 'minmax(0, 1fr)';
|
|
10
9
|
if (null != columns) gridTemplateColumns = `repeat(${columns}, minmax(0, 1fr))`;
|
|
@@ -14,12 +13,18 @@ const SimpleGrid_SimpleGridRoot = /*#__PURE__*/ forwardRef(function({ asChild, c
|
|
|
14
13
|
}
|
|
15
14
|
const rootStyle = {
|
|
16
15
|
display: 'grid',
|
|
17
|
-
gridTemplateColumns
|
|
16
|
+
gridTemplateColumns,
|
|
17
|
+
...null == gap ? {} : {
|
|
18
|
+
gap
|
|
19
|
+
},
|
|
20
|
+
...null == rowGap ? {} : {
|
|
21
|
+
rowGap
|
|
22
|
+
},
|
|
23
|
+
...null == columnGap ? {} : {
|
|
24
|
+
columnGap
|
|
25
|
+
},
|
|
26
|
+
...style
|
|
18
27
|
};
|
|
19
|
-
if (null != gap) rootStyle.gap = gap;
|
|
20
|
-
if (null != rowGap) rootStyle.rowGap = rowGap;
|
|
21
|
-
if (null != columnGap) rootStyle.columnGap = columnGap;
|
|
22
|
-
Object.assign(rootStyle, style);
|
|
23
28
|
return /*#__PURE__*/ jsx(ark.div, {
|
|
24
29
|
...props,
|
|
25
30
|
ref: ref,
|
|
@@ -27,7 +32,7 @@ const SimpleGrid_SimpleGridRoot = /*#__PURE__*/ forwardRef(function({ asChild, c
|
|
|
27
32
|
"data-scope": "simple-grid",
|
|
28
33
|
"data-part": "root",
|
|
29
34
|
"data-slot": "simple-grid-root",
|
|
30
|
-
className: clsx(
|
|
35
|
+
className: clsx(className),
|
|
31
36
|
style: rootStyle
|
|
32
37
|
});
|
|
33
38
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare const Skeleton: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
2
2
|
loading?: boolean;
|
|
3
|
-
variant?:
|
|
3
|
+
variant?: 'pulse' | 'none';
|
|
4
4
|
width?: number | string;
|
|
5
5
|
height?: number | string;
|
|
6
6
|
boxSize?: number | string;
|
|
@@ -8,7 +8,7 @@ declare const Skeleton: import("react").ForwardRefExoticComponent<Omit<import("r
|
|
|
8
8
|
} & import("react").RefAttributes<HTMLDivElement>> & {
|
|
9
9
|
Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
10
10
|
loading?: boolean;
|
|
11
|
-
variant?:
|
|
11
|
+
variant?: 'pulse' | 'none';
|
|
12
12
|
width?: number | string;
|
|
13
13
|
height?: number | string;
|
|
14
14
|
boxSize?: number | string;
|
|
@@ -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 Skeleton_module from "./Skeleton.module.js";
|
|
7
6
|
const toCssValue = (value)=>'number' == typeof value ? `${value}px` : value;
|
|
8
7
|
const Skeleton_SkeletonRoot = /*#__PURE__*/ forwardRef(function({ 'aria-hidden': ariaHidden, asChild, borderRadius, boxSize, className, height, loading = true, style, variant = 'pulse', width, ...props }, ref) {
|
|
@@ -17,7 +16,7 @@ const Skeleton_SkeletonRoot = /*#__PURE__*/ forwardRef(function({ 'aria-hidden':
|
|
|
17
16
|
"data-loading": loading ? '' : void 0,
|
|
18
17
|
"data-variant": variant,
|
|
19
18
|
"aria-hidden": ariaHidden ?? (loading ? true : void 0),
|
|
20
|
-
className: clsx(Skeleton_module.root,
|
|
19
|
+
className: clsx(Skeleton_module.root, className),
|
|
21
20
|
style: {
|
|
22
21
|
width: toCssValue(width ?? boxSize),
|
|
23
22
|
height: toCssValue(height ?? boxSize),
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { Slider as SliderPrimitive, useSlider, useSliderContext } from '@ark-ui/react/slider';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
2
|
declare function SliderThumbs({ className }: {
|
|
4
3
|
className?: string;
|
|
5
4
|
}): import("react").JSX.Element[];
|
|
6
5
|
declare const Slider: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
7
6
|
Root: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
7
|
RootProvider: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
-
Context: (props: SliderPrimitive.ContextProps) => ReactNode;
|
|
8
|
+
Context: (props: SliderPrimitive.ContextProps) => import("react").ReactNode;
|
|
10
9
|
useSlider: (props?: import("@ark-ui/react/slider").UseSliderProps) => import("@ark-ui/react/slider").UseSliderReturn;
|
|
11
10
|
useSliderContext: () => import("@ark-ui/react/slider").UseSliderContext;
|
|
12
11
|
Label: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
13
12
|
ValueText: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.ValueTextProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
13
|
Control: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
HiddenInput: import("react").ForwardRefExoticComponent<SliderPrimitive.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
15
15
|
Track: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.TrackProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
16
|
Range: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.RangeProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
17
|
Thumb: import("react").ForwardRefExoticComponent<Omit<SliderPrimitive.ThumbProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,16 +1,15 @@
|
|
|
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
10
|
"data-slot": "slider-root",
|
|
12
11
|
"data-readonly": readOnly ? '' : void 0,
|
|
13
|
-
className: clsx(Slider_module.root,
|
|
12
|
+
className: clsx(Slider_module.root, className),
|
|
14
13
|
readOnly: readOnly,
|
|
15
14
|
...props
|
|
16
15
|
});
|
|
@@ -19,7 +18,7 @@ const Slider_SliderRootProvider = /*#__PURE__*/ forwardRef(function({ className,
|
|
|
19
18
|
return /*#__PURE__*/ jsx(Slider.RootProvider, {
|
|
20
19
|
ref: ref,
|
|
21
20
|
"data-slot": "slider-root-provider",
|
|
22
|
-
className: clsx(Slider_module.root,
|
|
21
|
+
className: clsx(Slider_module.root, className),
|
|
23
22
|
...props
|
|
24
23
|
});
|
|
25
24
|
});
|
|
@@ -27,7 +26,7 @@ const Slider_SliderLabel = /*#__PURE__*/ forwardRef(function({ className, ...pro
|
|
|
27
26
|
return /*#__PURE__*/ jsx(Slider.Label, {
|
|
28
27
|
ref: ref,
|
|
29
28
|
"data-slot": "slider-label",
|
|
30
|
-
className: clsx(Slider_module.label,
|
|
29
|
+
className: clsx(Slider_module.label, className),
|
|
31
30
|
...props
|
|
32
31
|
});
|
|
33
32
|
});
|
|
@@ -35,7 +34,7 @@ const Slider_SliderValueText = /*#__PURE__*/ forwardRef(function({ className, ..
|
|
|
35
34
|
return /*#__PURE__*/ jsx(Slider.ValueText, {
|
|
36
35
|
ref: ref,
|
|
37
36
|
"data-slot": "slider-value-text",
|
|
38
|
-
className: clsx(Slider_module.valueText,
|
|
37
|
+
className: clsx(Slider_module.valueText, className),
|
|
39
38
|
...props
|
|
40
39
|
});
|
|
41
40
|
});
|
|
@@ -43,7 +42,7 @@ const Slider_SliderControl = /*#__PURE__*/ forwardRef(function({ className, ...p
|
|
|
43
42
|
return /*#__PURE__*/ jsx(Slider.Control, {
|
|
44
43
|
ref: ref,
|
|
45
44
|
"data-slot": "slider-control",
|
|
46
|
-
className: clsx(Slider_module.control,
|
|
45
|
+
className: clsx(Slider_module.control, className),
|
|
47
46
|
...props
|
|
48
47
|
});
|
|
49
48
|
});
|
|
@@ -51,7 +50,7 @@ const Slider_SliderTrack = /*#__PURE__*/ forwardRef(function({ className, ...pro
|
|
|
51
50
|
return /*#__PURE__*/ jsx(Slider.Track, {
|
|
52
51
|
ref: ref,
|
|
53
52
|
"data-slot": "slider-track",
|
|
54
|
-
className: clsx(Slider_module.track,
|
|
53
|
+
className: clsx(Slider_module.track, className),
|
|
55
54
|
...props
|
|
56
55
|
});
|
|
57
56
|
});
|
|
@@ -59,45 +58,31 @@ const Slider_SliderRange = /*#__PURE__*/ forwardRef(function({ className, ...pro
|
|
|
59
58
|
return /*#__PURE__*/ jsx(Slider.Range, {
|
|
60
59
|
ref: ref,
|
|
61
60
|
"data-slot": "slider-range",
|
|
62
|
-
className: clsx(Slider_module.range,
|
|
61
|
+
className: clsx(Slider_module.range, className),
|
|
63
62
|
...props
|
|
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
|
-
asChild: asChild,
|
|
70
68
|
"data-slot": "slider-thumb",
|
|
71
|
-
className: clsx(Slider_module.thumb,
|
|
72
|
-
...props
|
|
73
|
-
children: withHiddenInput(children, asChild)
|
|
69
|
+
className: clsx(Slider_module.thumb, className),
|
|
70
|
+
...props
|
|
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
84
|
"data-slot": "slider-marker-group",
|
|
100
|
-
className: clsx(Slider_module.markerGroup,
|
|
85
|
+
className: clsx(Slider_module.markerGroup, className),
|
|
101
86
|
...props
|
|
102
87
|
});
|
|
103
88
|
});
|
|
@@ -105,7 +90,7 @@ const Slider_SliderMarker = /*#__PURE__*/ forwardRef(function({ className, ...pr
|
|
|
105
90
|
return /*#__PURE__*/ jsx(Slider.Marker, {
|
|
106
91
|
ref: ref,
|
|
107
92
|
"data-slot": "slider-marker",
|
|
108
|
-
className: clsx(Slider_module.marker,
|
|
93
|
+
className: clsx(Slider_module.marker, className),
|
|
109
94
|
...props
|
|
110
95
|
});
|
|
111
96
|
});
|
|
@@ -113,7 +98,7 @@ const Slider_SliderDraggingIndicator = /*#__PURE__*/ forwardRef(function({ class
|
|
|
113
98
|
return /*#__PURE__*/ jsx(Slider.DraggingIndicator, {
|
|
114
99
|
ref: ref,
|
|
115
100
|
"data-slot": "slider-dragging-indicator",
|
|
116
|
-
className: clsx(Slider_module.draggingIndicator,
|
|
101
|
+
className: clsx(Slider_module.draggingIndicator, className),
|
|
117
102
|
...props
|
|
118
103
|
});
|
|
119
104
|
});
|
|
@@ -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
1
|
import { type ComponentProps, type ReactNode } from 'react';
|
|
2
|
-
import { Button } from '../button';
|
|
3
|
-
import { Menu } from '../menu';
|
|
2
|
+
import { Button } from '../button/index.js';
|
|
3
|
+
import { Menu } from '../menu/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'>;
|
|
@@ -12,7 +12,7 @@ type SplitButtonTriggerProps = Omit<ComponentProps<typeof Menu.Trigger>, 'asChil
|
|
|
12
12
|
size?: SplitButtonSize;
|
|
13
13
|
variant?: SplitButtonVariant;
|
|
14
14
|
};
|
|
15
|
-
declare const SplitButton: import("react").ForwardRefExoticComponent<Omit<import("@ark-ui/react/menu").MenuRootProps & import("../../internal/overlayPortal").OverlayPortalProps, "children"> & {
|
|
15
|
+
declare const SplitButton: import("react").ForwardRefExoticComponent<Omit<import("@ark-ui/react/menu").MenuRootProps & 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<import("@ark-ui/react/menu").MenuRootProps & import("../../internal/overlayPortal").OverlayPortalProps, "children"> & {
|
|
23
|
+
Root: import("react").ForwardRefExoticComponent<Omit<import("@ark-ui/react/menu").MenuRootProps & import("../../internal/overlayPortal.js").OverlayPortalProps, "children"> & {
|
|
24
24
|
'aria-label'?: string;
|
|
25
25
|
'aria-labelledby'?: string;
|
|
26
26
|
children?: ReactNode;
|
|
@@ -3,7 +3,6 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
4
|
import { createContext, forwardRef, useContext } from "react";
|
|
5
5
|
import { ChevronDownIcon } from "../../internal/icons/ui/index.js";
|
|
6
|
-
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
7
6
|
import { Button } from "../button/index.js";
|
|
8
7
|
import { Menu } from "../menu/index.js";
|
|
9
8
|
import SplitButton_module from "./SplitButton.module.js";
|
|
@@ -34,7 +33,7 @@ const SplitButton_SplitButtonRoot = /*#__PURE__*/ forwardRef(function({ children
|
|
|
34
33
|
"data-scope": "split-button",
|
|
35
34
|
"data-part": "root",
|
|
36
35
|
"data-slot": "split-button-root",
|
|
37
|
-
className: clsx(SplitButton_module.root,
|
|
36
|
+
className: clsx(SplitButton_module.root, className),
|
|
38
37
|
children: children
|
|
39
38
|
})
|
|
40
39
|
})
|
|
@@ -47,7 +46,7 @@ const SplitButton_SplitButtonAction = /*#__PURE__*/ forwardRef(function({ classN
|
|
|
47
46
|
"data-slot": "split-button-action",
|
|
48
47
|
size: size ?? context.size,
|
|
49
48
|
variant: variant ?? context.variant,
|
|
50
|
-
className: clsx(SplitButton_module.action,
|
|
49
|
+
className: clsx(SplitButton_module.action, className),
|
|
51
50
|
...props
|
|
52
51
|
});
|
|
53
52
|
});
|
|
@@ -59,7 +58,7 @@ const SplitButton_SplitButtonTrigger = /*#__PURE__*/ forwardRef(function({ child
|
|
|
59
58
|
asChild: true,
|
|
60
59
|
"data-slot": "split-button-trigger",
|
|
61
60
|
"aria-label": isIconOnly ? ariaLabel ?? 'More actions' : ariaLabel,
|
|
62
|
-
className: clsx(SplitButton_module.trigger,
|
|
61
|
+
className: clsx(SplitButton_module.trigger, className),
|
|
63
62
|
...props,
|
|
64
63
|
children: /*#__PURE__*/ jsx(Button, {
|
|
65
64
|
size: size ?? context.size,
|
|
@@ -72,16 +71,20 @@ const SplitButton_SplitButtonPositioner = /*#__PURE__*/ forwardRef(function({ cl
|
|
|
72
71
|
return /*#__PURE__*/ jsx(Menu.Positioner, {
|
|
73
72
|
ref: ref,
|
|
74
73
|
"data-slot": "split-button-positioner",
|
|
75
|
-
className:
|
|
74
|
+
className: className,
|
|
76
75
|
...props
|
|
77
76
|
});
|
|
78
77
|
});
|
|
79
|
-
const SplitButton_SplitButtonContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
78
|
+
const SplitButton_SplitButtonContent = /*#__PURE__*/ forwardRef(function({ asChild, children, className, ...props }, ref) {
|
|
80
79
|
return /*#__PURE__*/ jsx(Menu.Content, {
|
|
81
80
|
ref: ref,
|
|
81
|
+
asChild: asChild,
|
|
82
82
|
"data-slot": "split-button-content",
|
|
83
|
-
className:
|
|
84
|
-
...props
|
|
83
|
+
className: className,
|
|
84
|
+
...props,
|
|
85
|
+
children: asChild ? children : /*#__PURE__*/ jsx(Menu.Viewport, {
|
|
86
|
+
children: children
|
|
87
|
+
})
|
|
85
88
|
});
|
|
86
89
|
});
|
|
87
90
|
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%)',
|
|
@@ -12,7 +11,7 @@ const Splitter_SplitterRoot = /*#__PURE__*/ forwardRef(function({ className, sty
|
|
|
12
11
|
return /*#__PURE__*/ jsx(Splitter.Root, {
|
|
13
12
|
ref: ref,
|
|
14
13
|
"data-slot": "splitter-root",
|
|
15
|
-
className: clsx(Splitter_module.root,
|
|
14
|
+
className: clsx(Splitter_module.root, className),
|
|
16
15
|
style: {
|
|
17
16
|
...rootStyle,
|
|
18
17
|
...style
|
|
@@ -24,7 +23,7 @@ const Splitter_SplitterRootProvider = /*#__PURE__*/ forwardRef(function({ classN
|
|
|
24
23
|
return /*#__PURE__*/ jsx(Splitter.RootProvider, {
|
|
25
24
|
ref: ref,
|
|
26
25
|
"data-slot": "splitter-root-provider",
|
|
27
|
-
className: clsx(Splitter_module.root,
|
|
26
|
+
className: clsx(Splitter_module.root, className),
|
|
28
27
|
style: {
|
|
29
28
|
...rootStyle,
|
|
30
29
|
...style
|
|
@@ -36,7 +35,7 @@ const Splitter_SplitterPanel = /*#__PURE__*/ forwardRef(function({ className, ..
|
|
|
36
35
|
return /*#__PURE__*/ jsx(Splitter.Panel, {
|
|
37
36
|
ref: ref,
|
|
38
37
|
"data-slot": "splitter-panel",
|
|
39
|
-
className: clsx(Splitter_module.panel,
|
|
38
|
+
className: clsx(Splitter_module.panel, className),
|
|
40
39
|
...props
|
|
41
40
|
});
|
|
42
41
|
});
|
|
@@ -44,7 +43,7 @@ const Splitter_SplitterResizeTriggerIndicator = /*#__PURE__*/ forwardRef(functio
|
|
|
44
43
|
return /*#__PURE__*/ jsx(Splitter.ResizeTriggerIndicator, {
|
|
45
44
|
ref: ref,
|
|
46
45
|
"data-slot": "splitter-resize-trigger-indicator",
|
|
47
|
-
className: clsx(Splitter_module.resizeTriggerIndicator,
|
|
46
|
+
className: clsx(Splitter_module.resizeTriggerIndicator, className),
|
|
48
47
|
...props
|
|
49
48
|
});
|
|
50
49
|
});
|
|
@@ -53,7 +52,7 @@ const Splitter_SplitterResizeTrigger = /*#__PURE__*/ forwardRef(function({ asChi
|
|
|
53
52
|
ref: ref,
|
|
54
53
|
asChild: asChild,
|
|
55
54
|
"data-slot": "splitter-resize-trigger",
|
|
56
|
-
className: clsx(Splitter_module.resizeTrigger,
|
|
55
|
+
className: clsx(Splitter_module.resizeTrigger, className),
|
|
57
56
|
...props,
|
|
58
57
|
children: void 0 !== children || asChild ? children : /*#__PURE__*/ jsx(Splitter_SplitterResizeTriggerIndicator, {})
|
|
59
58
|
});
|
|
@@ -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
|
};
|