@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
|
@@ -6,8 +6,6 @@ const ProgressCircular_module = {
|
|
|
6
6
|
circle: "circle-xQo3V2",
|
|
7
7
|
circleTrack: "circleTrack-zcLGCi",
|
|
8
8
|
circleRange: "circleRange-IITheJ",
|
|
9
|
-
view: "view-MEKkjf"
|
|
10
|
-
"progress-circular-indeterminate": "progress-circular-indeterminate-cw44cR",
|
|
11
|
-
progressCircularIndeterminate: "progress-circular-indeterminate-cw44cR"
|
|
9
|
+
view: "view-MEKkjf"
|
|
12
10
|
};
|
|
13
11
|
export default ProgressCircular_module;
|
|
@@ -2,13 +2,12 @@ import { jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Progress, useProgress, useProgressContext } from "@ark-ui/react/progress";
|
|
3
3
|
import { clsx } from "clsx";
|
|
4
4
|
import { forwardRef } from "react";
|
|
5
|
-
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
6
5
|
import ProgressLinear_module from "./ProgressLinear.module.js";
|
|
7
6
|
const ProgressLinear_ProgressLinearRoot = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
8
7
|
return /*#__PURE__*/ jsx(Progress.Root, {
|
|
9
8
|
ref: ref,
|
|
10
9
|
"data-slot": "progress-linear-root",
|
|
11
|
-
className: clsx(ProgressLinear_module.root,
|
|
10
|
+
className: clsx(ProgressLinear_module.root, className),
|
|
12
11
|
...props
|
|
13
12
|
});
|
|
14
13
|
});
|
|
@@ -16,7 +15,7 @@ const ProgressLinear_ProgressLinearRootProvider = /*#__PURE__*/ forwardRef(funct
|
|
|
16
15
|
return /*#__PURE__*/ jsx(Progress.RootProvider, {
|
|
17
16
|
ref: ref,
|
|
18
17
|
"data-slot": "progress-linear-root-provider",
|
|
19
|
-
className: clsx(ProgressLinear_module.root,
|
|
18
|
+
className: clsx(ProgressLinear_module.root, className),
|
|
20
19
|
...props
|
|
21
20
|
});
|
|
22
21
|
});
|
|
@@ -24,7 +23,7 @@ const ProgressLinear_ProgressLinearLabel = /*#__PURE__*/ forwardRef(function({ c
|
|
|
24
23
|
return /*#__PURE__*/ jsx(Progress.Label, {
|
|
25
24
|
ref: ref,
|
|
26
25
|
"data-slot": "progress-linear-label",
|
|
27
|
-
className: clsx(ProgressLinear_module.label,
|
|
26
|
+
className: clsx(ProgressLinear_module.label, className),
|
|
28
27
|
...props
|
|
29
28
|
});
|
|
30
29
|
});
|
|
@@ -32,7 +31,7 @@ const ProgressLinear_ProgressLinearValueText = /*#__PURE__*/ forwardRef(function
|
|
|
32
31
|
return /*#__PURE__*/ jsx(Progress.ValueText, {
|
|
33
32
|
ref: ref,
|
|
34
33
|
"data-slot": "progress-linear-value-text",
|
|
35
|
-
className: clsx(ProgressLinear_module.valueText,
|
|
34
|
+
className: clsx(ProgressLinear_module.valueText, className),
|
|
36
35
|
...props
|
|
37
36
|
});
|
|
38
37
|
});
|
|
@@ -40,7 +39,7 @@ const ProgressLinear_ProgressLinearTrack = /*#__PURE__*/ forwardRef(function({ c
|
|
|
40
39
|
return /*#__PURE__*/ jsx(Progress.Track, {
|
|
41
40
|
ref: ref,
|
|
42
41
|
"data-slot": "progress-linear-track",
|
|
43
|
-
className: clsx(ProgressLinear_module.track,
|
|
42
|
+
className: clsx(ProgressLinear_module.track, className),
|
|
44
43
|
...props
|
|
45
44
|
});
|
|
46
45
|
});
|
|
@@ -48,7 +47,7 @@ const ProgressLinear_ProgressLinearRange = /*#__PURE__*/ forwardRef(function({ c
|
|
|
48
47
|
return /*#__PURE__*/ jsx(Progress.Range, {
|
|
49
48
|
ref: ref,
|
|
50
49
|
"data-slot": "progress-linear-range",
|
|
51
|
-
className: clsx(ProgressLinear_module.range,
|
|
50
|
+
className: clsx(ProgressLinear_module.range, className),
|
|
52
51
|
...props
|
|
53
52
|
});
|
|
54
53
|
});
|
|
@@ -56,7 +55,7 @@ const ProgressLinear_ProgressLinearView = /*#__PURE__*/ forwardRef(function({ cl
|
|
|
56
55
|
return /*#__PURE__*/ jsx(Progress.View, {
|
|
57
56
|
ref: ref,
|
|
58
57
|
"data-slot": "progress-linear-view",
|
|
59
|
-
className: clsx(ProgressLinear_module.view,
|
|
58
|
+
className: clsx(ProgressLinear_module.view, className),
|
|
60
59
|
...props
|
|
61
60
|
});
|
|
62
61
|
});
|
|
@@ -5,10 +5,6 @@ const ProgressLinear_module = {
|
|
|
5
5
|
valueText: "valueText-tmx0si",
|
|
6
6
|
track: "track-o7p8iH",
|
|
7
7
|
range: "range-A5c8GJ",
|
|
8
|
-
view: "view-KoQ_CZ"
|
|
9
|
-
"progress-linear-indeterminate": "progress-linear-indeterminate-MpsSj8",
|
|
10
|
-
progressLinearIndeterminate: "progress-linear-indeterminate-MpsSj8",
|
|
11
|
-
"progress-linear-indeterminate-vertical": "progress-linear-indeterminate-vertical-ynw1oD",
|
|
12
|
-
progressLinearIndeterminateVertical: "progress-linear-indeterminate-vertical-ynw1oD"
|
|
8
|
+
view: "view-KoQ_CZ"
|
|
13
9
|
};
|
|
14
10
|
export default ProgressLinear_module;
|
|
@@ -96,25 +96,5 @@
|
|
|
96
96
|
.view-KoQ_CZ {
|
|
97
97
|
display: contents;
|
|
98
98
|
}
|
|
99
|
-
|
|
100
|
-
@keyframes progress-linear-indeterminate-MpsSj8 {
|
|
101
|
-
from {
|
|
102
|
-
transform: translateX(-100%);
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
to {
|
|
106
|
-
transform: translateX(300%);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
@keyframes progress-linear-indeterminate-vertical-ynw1oD {
|
|
111
|
-
from {
|
|
112
|
-
transform: translateY(100%);
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
to {
|
|
116
|
-
transform: translateY(-300%);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
99
|
}
|
|
120
100
|
|
|
@@ -3,13 +3,12 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { QrCode, useQrCode, useQrCodeContext } from "@ark-ui/react/qr-code";
|
|
4
4
|
import { clsx } from "clsx";
|
|
5
5
|
import { forwardRef } from "react";
|
|
6
|
-
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
7
6
|
import QrCode_module from "./QrCode.module.js";
|
|
8
7
|
const QrCode_QrCodeRoot = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
9
8
|
return /*#__PURE__*/ jsx(QrCode.Root, {
|
|
10
9
|
ref: ref,
|
|
11
10
|
"data-slot": "qr-code-root",
|
|
12
|
-
className: clsx(QrCode_module.root,
|
|
11
|
+
className: clsx(QrCode_module.root, className),
|
|
13
12
|
...props
|
|
14
13
|
});
|
|
15
14
|
});
|
|
@@ -17,7 +16,7 @@ const QrCode_QrCodeRootProvider = /*#__PURE__*/ forwardRef(function({ className,
|
|
|
17
16
|
return /*#__PURE__*/ jsx(QrCode.RootProvider, {
|
|
18
17
|
ref: ref,
|
|
19
18
|
"data-slot": "qr-code-root-provider",
|
|
20
|
-
className: clsx(QrCode_module.root,
|
|
19
|
+
className: clsx(QrCode_module.root, className),
|
|
21
20
|
...props
|
|
22
21
|
});
|
|
23
22
|
});
|
|
@@ -25,7 +24,7 @@ const QrCode_QrCodeFrame = /*#__PURE__*/ forwardRef(function({ className, ...pro
|
|
|
25
24
|
return /*#__PURE__*/ jsx(QrCode.Frame, {
|
|
26
25
|
ref: ref,
|
|
27
26
|
"data-slot": "qr-code-frame",
|
|
28
|
-
className: clsx(QrCode_module.frame,
|
|
27
|
+
className: clsx(QrCode_module.frame, className),
|
|
29
28
|
...props
|
|
30
29
|
});
|
|
31
30
|
});
|
|
@@ -33,7 +32,7 @@ const QrCode_QrCodePattern = /*#__PURE__*/ forwardRef(function({ className, ...p
|
|
|
33
32
|
return /*#__PURE__*/ jsx(QrCode.Pattern, {
|
|
34
33
|
ref: ref,
|
|
35
34
|
"data-slot": "qr-code-pattern",
|
|
36
|
-
className: clsx(QrCode_module.pattern,
|
|
35
|
+
className: clsx(QrCode_module.pattern, className),
|
|
37
36
|
...props
|
|
38
37
|
});
|
|
39
38
|
});
|
|
@@ -41,7 +40,7 @@ const QrCode_QrCodeOverlay = /*#__PURE__*/ forwardRef(function({ className, ...p
|
|
|
41
40
|
return /*#__PURE__*/ jsx(QrCode.Overlay, {
|
|
42
41
|
ref: ref,
|
|
43
42
|
"data-slot": "qr-code-overlay",
|
|
44
|
-
className: clsx(QrCode_module.overlay,
|
|
43
|
+
className: clsx(QrCode_module.overlay, className),
|
|
45
44
|
...props
|
|
46
45
|
});
|
|
47
46
|
});
|
|
@@ -49,7 +48,7 @@ const QrCode_QrCodeDownloadTrigger = /*#__PURE__*/ forwardRef(function({ classNa
|
|
|
49
48
|
return /*#__PURE__*/ jsx(QrCode.DownloadTrigger, {
|
|
50
49
|
ref: ref,
|
|
51
50
|
"data-slot": "qr-code-download-trigger",
|
|
52
|
-
className: clsx(QrCode_module.downloadTrigger,
|
|
51
|
+
className: clsx(QrCode_module.downloadTrigger, className),
|
|
53
52
|
...props
|
|
54
53
|
});
|
|
55
54
|
});
|
|
@@ -15,6 +15,7 @@ declare const RadioGroup: import("react").ForwardRefExoticComponent<Omit<RadioGr
|
|
|
15
15
|
ItemContext: (props: import("@ark-ui/react/radio-group").RadioGroupItemContextProps) => ReactNode;
|
|
16
16
|
Label: import("react").ForwardRefExoticComponent<Omit<RadioGroupPrimitive.LabelProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
17
17
|
Item: import("react").ForwardRefExoticComponent<Omit<RadioGroupPrimitive.ItemProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
18
|
+
ItemHiddenInput: import("react").ForwardRefExoticComponent<RadioGroupPrimitive.ItemHiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
18
19
|
Option: import("react").ForwardRefExoticComponent<Omit<RadioGroupOptionProps, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
19
20
|
ItemControl: import("react").ForwardRefExoticComponent<Omit<RadioGroupItemControlProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
21
|
ItemText: import("react").ForwardRefExoticComponent<Omit<RadioGroupPrimitive.ItemTextProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { RadioGroup, useRadioGroup, useRadioGroupContext, useRadioGroupItemContext } from "@ark-ui/react/radio-group";
|
|
4
4
|
import { clsx } from "clsx";
|
|
5
|
-
import {
|
|
6
|
-
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
5
|
+
import { forwardRef } from "react";
|
|
7
6
|
import RadioGroup_module from "./RadioGroup.module.js";
|
|
8
7
|
const RadioGroup_RadioGroupRoot = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
9
8
|
return /*#__PURE__*/ jsx(RadioGroup.Root, {
|
|
10
9
|
ref: ref,
|
|
11
10
|
"data-slot": "radio-group-root",
|
|
12
|
-
className: clsx(RadioGroup_module.root,
|
|
11
|
+
className: clsx(RadioGroup_module.root, className),
|
|
13
12
|
...props
|
|
14
13
|
});
|
|
15
14
|
});
|
|
@@ -17,7 +16,7 @@ const RadioGroup_RadioGroupRootProvider = /*#__PURE__*/ forwardRef(function({ cl
|
|
|
17
16
|
return /*#__PURE__*/ jsx(RadioGroup.RootProvider, {
|
|
18
17
|
ref: ref,
|
|
19
18
|
"data-slot": "radio-group-root-provider",
|
|
20
|
-
className: clsx(RadioGroup_module.root,
|
|
19
|
+
className: clsx(RadioGroup_module.root, className),
|
|
21
20
|
...props
|
|
22
21
|
});
|
|
23
22
|
});
|
|
@@ -25,18 +24,16 @@ const RadioGroup_RadioGroupLabel = /*#__PURE__*/ forwardRef(function({ className
|
|
|
25
24
|
return /*#__PURE__*/ jsx(RadioGroup.Label, {
|
|
26
25
|
ref: ref,
|
|
27
26
|
"data-slot": "radio-group-label",
|
|
28
|
-
className: clsx(RadioGroup_module.label,
|
|
27
|
+
className: clsx(RadioGroup_module.label, className),
|
|
29
28
|
...props
|
|
30
29
|
});
|
|
31
30
|
});
|
|
32
|
-
const RadioGroup_RadioGroupItem = /*#__PURE__*/ forwardRef(function({
|
|
31
|
+
const RadioGroup_RadioGroupItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
33
32
|
return /*#__PURE__*/ jsx(RadioGroup.Item, {
|
|
34
33
|
ref: ref,
|
|
35
|
-
asChild: asChild,
|
|
36
34
|
"data-slot": "radio-group-item",
|
|
37
|
-
className: clsx(RadioGroup_module.item,
|
|
38
|
-
...props
|
|
39
|
-
children: withItemHiddenInput(children, asChild)
|
|
35
|
+
className: clsx(RadioGroup_module.item, className),
|
|
36
|
+
...props
|
|
40
37
|
});
|
|
41
38
|
});
|
|
42
39
|
const RadioGroup_RadioGroupOption = /*#__PURE__*/ forwardRef(function({ children, size, ...props }, ref) {
|
|
@@ -44,6 +41,7 @@ const RadioGroup_RadioGroupOption = /*#__PURE__*/ forwardRef(function({ children
|
|
|
44
41
|
ref: ref,
|
|
45
42
|
...props,
|
|
46
43
|
children: [
|
|
44
|
+
/*#__PURE__*/ jsx(RadioGroup.ItemHiddenInput, {}),
|
|
47
45
|
/*#__PURE__*/ jsx(RadioGroup_RadioGroupItemControl, {
|
|
48
46
|
size: size
|
|
49
47
|
}),
|
|
@@ -58,7 +56,7 @@ const RadioGroup_RadioGroupItemControl = /*#__PURE__*/ forwardRef(function({ cla
|
|
|
58
56
|
ref: ref,
|
|
59
57
|
"data-slot": "radio-group-item-control",
|
|
60
58
|
"data-size": size,
|
|
61
|
-
className: clsx(RadioGroup_module.itemControl,
|
|
59
|
+
className: clsx(RadioGroup_module.itemControl, className),
|
|
62
60
|
...props
|
|
63
61
|
});
|
|
64
62
|
});
|
|
@@ -66,28 +64,15 @@ const RadioGroup_RadioGroupItemText = /*#__PURE__*/ forwardRef(function({ classN
|
|
|
66
64
|
return /*#__PURE__*/ jsx(RadioGroup.ItemText, {
|
|
67
65
|
ref: ref,
|
|
68
66
|
"data-slot": "radio-group-item-text",
|
|
69
|
-
className: clsx(RadioGroup_module.itemText,
|
|
67
|
+
className: clsx(RadioGroup_module.itemText, className),
|
|
70
68
|
...props
|
|
71
69
|
});
|
|
72
70
|
});
|
|
73
|
-
function withItemHiddenInput(children, asChild) {
|
|
74
|
-
const hiddenInput = /*#__PURE__*/ jsx(RadioGroup.ItemHiddenInput, {
|
|
75
|
-
"data-slot": "radio-group-item-hidden-input"
|
|
76
|
-
});
|
|
77
|
-
if (!asChild) return /*#__PURE__*/ jsxs(Fragment, {
|
|
78
|
-
children: [
|
|
79
|
-
children,
|
|
80
|
-
hiddenInput
|
|
81
|
-
]
|
|
82
|
-
});
|
|
83
|
-
const child = Children.only(children);
|
|
84
|
-
return /*#__PURE__*/ cloneElement(child, {}, child.props.children, hiddenInput);
|
|
85
|
-
}
|
|
86
71
|
const RadioGroup_RadioGroupIndicator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
87
72
|
return /*#__PURE__*/ jsx(RadioGroup.Indicator, {
|
|
88
73
|
ref: ref,
|
|
89
74
|
"data-slot": "radio-group-indicator",
|
|
90
|
-
className: clsx(RadioGroup_module.indicator,
|
|
75
|
+
className: clsx(RadioGroup_module.indicator, className),
|
|
91
76
|
...props
|
|
92
77
|
});
|
|
93
78
|
});
|
|
@@ -98,6 +83,7 @@ const RadioGroup_RadioGroup = Object.assign(RadioGroup_RadioGroupRoot, {
|
|
|
98
83
|
ItemContext: RadioGroup.ItemContext,
|
|
99
84
|
Label: RadioGroup_RadioGroupLabel,
|
|
100
85
|
Item: RadioGroup_RadioGroupItem,
|
|
86
|
+
ItemHiddenInput: RadioGroup.ItemHiddenInput,
|
|
101
87
|
Option: RadioGroup_RadioGroupOption,
|
|
102
88
|
ItemControl: RadioGroup_RadioGroupItemControl,
|
|
103
89
|
ItemText: RadioGroup_RadioGroupItemText,
|
|
@@ -15,6 +15,7 @@ declare const RatingGroup: import("react").ForwardRefExoticComponent<Omit<Rating
|
|
|
15
15
|
Root: import("react").ForwardRefExoticComponent<Omit<RatingGroupRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
16
|
RootProvider: import("react").ForwardRefExoticComponent<Omit<RatingGroupRootProviderProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
17
|
Context: (props: RatingGroupPrimitive.ContextProps) => ReactNode;
|
|
18
|
+
HiddenInput: import("react").ForwardRefExoticComponent<RatingGroupPrimitive.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
18
19
|
Label: import("react").ForwardRefExoticComponent<Omit<RatingGroupPrimitive.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
19
20
|
Control: import("react").ForwardRefExoticComponent<Omit<RatingGroupPrimitive.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
21
|
Item: import("react").ForwardRefExoticComponent<Omit<RatingGroupPrimitive.ItemProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -2,37 +2,32 @@
|
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { RatingGroup, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext } from "@ark-ui/react/rating-group";
|
|
4
4
|
import { clsx } from "clsx";
|
|
5
|
-
import {
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
6
|
import { RatingStarIcon } from "../../internal/icons/ui/index.js";
|
|
7
|
-
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
8
7
|
import RatingGroup_module from "./RatingGroup.module.js";
|
|
9
|
-
const RatingGroup_RatingGroupRoot = /*#__PURE__*/ forwardRef(function({
|
|
8
|
+
const RatingGroup_RatingGroupRoot = /*#__PURE__*/ forwardRef(function({ className, size = 'md', ...props }, ref) {
|
|
10
9
|
return /*#__PURE__*/ jsx(RatingGroup.Root, {
|
|
11
10
|
ref: ref,
|
|
12
|
-
asChild: asChild,
|
|
13
11
|
"data-slot": "rating-group-root",
|
|
14
12
|
"data-size": size,
|
|
15
|
-
className: clsx(RatingGroup_module.root,
|
|
16
|
-
...props
|
|
17
|
-
children: withHiddenInput(children, asChild)
|
|
13
|
+
className: clsx(RatingGroup_module.root, className),
|
|
14
|
+
...props
|
|
18
15
|
});
|
|
19
16
|
});
|
|
20
|
-
const RatingGroup_RatingGroupRootProvider = /*#__PURE__*/ forwardRef(function({
|
|
17
|
+
const RatingGroup_RatingGroupRootProvider = /*#__PURE__*/ forwardRef(function({ className, size = 'md', ...props }, ref) {
|
|
21
18
|
return /*#__PURE__*/ jsx(RatingGroup.RootProvider, {
|
|
22
19
|
ref: ref,
|
|
23
|
-
asChild: asChild,
|
|
24
20
|
"data-slot": "rating-group-root-provider",
|
|
25
21
|
"data-size": size,
|
|
26
|
-
className: clsx(RatingGroup_module.root,
|
|
27
|
-
...props
|
|
28
|
-
children: withHiddenInput(children, asChild)
|
|
22
|
+
className: clsx(RatingGroup_module.root, className),
|
|
23
|
+
...props
|
|
29
24
|
});
|
|
30
25
|
});
|
|
31
26
|
const RatingGroup_RatingGroupLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
32
27
|
return /*#__PURE__*/ jsx(RatingGroup.Label, {
|
|
33
28
|
ref: ref,
|
|
34
29
|
"data-slot": "rating-group-label",
|
|
35
|
-
className: clsx(RatingGroup_module.label,
|
|
30
|
+
className: clsx(RatingGroup_module.label, className),
|
|
36
31
|
...props
|
|
37
32
|
});
|
|
38
33
|
});
|
|
@@ -40,7 +35,7 @@ const RatingGroup_RatingGroupControl = /*#__PURE__*/ forwardRef(function({ class
|
|
|
40
35
|
return /*#__PURE__*/ jsx(RatingGroup.Control, {
|
|
41
36
|
ref: ref,
|
|
42
37
|
"data-slot": "rating-group-control",
|
|
43
|
-
className: clsx(RatingGroup_module.control,
|
|
38
|
+
className: clsx(RatingGroup_module.control, className),
|
|
44
39
|
...props
|
|
45
40
|
});
|
|
46
41
|
});
|
|
@@ -48,7 +43,7 @@ const RatingGroup_RatingGroupItem = /*#__PURE__*/ forwardRef(function({ classNam
|
|
|
48
43
|
return /*#__PURE__*/ jsx(RatingGroup.Item, {
|
|
49
44
|
ref: ref,
|
|
50
45
|
"data-slot": "rating-group-item",
|
|
51
|
-
className: clsx(RatingGroup_module.item,
|
|
46
|
+
className: clsx(RatingGroup_module.item, className),
|
|
52
47
|
...props
|
|
53
48
|
});
|
|
54
49
|
});
|
|
@@ -59,7 +54,7 @@ const RatingGroup_RatingGroupItemIndicator = /*#__PURE__*/ forwardRef(function({
|
|
|
59
54
|
"data-slot": "rating-group-item-indicator",
|
|
60
55
|
"data-half": half ? '' : void 0,
|
|
61
56
|
"data-highlighted": highlighted ? '' : void 0,
|
|
62
|
-
className: clsx(RatingGroup_module.itemIndicator,
|
|
57
|
+
className: clsx(RatingGroup_module.itemIndicator, className),
|
|
63
58
|
...props,
|
|
64
59
|
children: children ?? /*#__PURE__*/ jsxs(Fragment, {
|
|
65
60
|
children: [
|
|
@@ -75,19 +70,6 @@ const RatingGroup_RatingGroupItemIndicator = /*#__PURE__*/ forwardRef(function({
|
|
|
75
70
|
})
|
|
76
71
|
});
|
|
77
72
|
});
|
|
78
|
-
function withHiddenInput(children, asChild) {
|
|
79
|
-
const hiddenInput = /*#__PURE__*/ jsx(RatingGroup.HiddenInput, {
|
|
80
|
-
"data-slot": "rating-group-hidden-input"
|
|
81
|
-
});
|
|
82
|
-
if (!asChild) return /*#__PURE__*/ jsxs(Fragment, {
|
|
83
|
-
children: [
|
|
84
|
-
children,
|
|
85
|
-
hiddenInput
|
|
86
|
-
]
|
|
87
|
-
});
|
|
88
|
-
const child = Children.only(children);
|
|
89
|
-
return /*#__PURE__*/ cloneElement(child, {}, child.props.children, hiddenInput);
|
|
90
|
-
}
|
|
91
73
|
function RatingGroupItems({ children }) {
|
|
92
74
|
return /*#__PURE__*/ jsx(Fragment, {
|
|
93
75
|
children: /*#__PURE__*/ jsx(RatingGroup.Context, {
|
|
@@ -102,6 +84,7 @@ const RatingGroup_RatingGroup = Object.assign(RatingGroup_RatingGroupRoot, {
|
|
|
102
84
|
Root: RatingGroup_RatingGroupRoot,
|
|
103
85
|
RootProvider: RatingGroup_RatingGroupRootProvider,
|
|
104
86
|
Context: RatingGroup.Context,
|
|
87
|
+
HiddenInput: RatingGroup.HiddenInput,
|
|
105
88
|
Label: RatingGroup_RatingGroupLabel,
|
|
106
89
|
Control: RatingGroup_RatingGroupControl,
|
|
107
90
|
Item: RatingGroup_RatingGroupItem,
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
pointer-events: none;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
.item-KSLnDf[data-focus-visible]
|
|
76
|
+
.item-KSLnDf[data-focus-visible] {
|
|
77
77
|
outline: var(--moduix-rating-group-focus-ring-width, var(--moduix-focus-ring-inset-width, var(--moduix-border-width-sm)))
|
|
78
78
|
solid var(--moduix-rating-group-focus-ring-color, var(--moduix-color-ring));
|
|
79
79
|
outline-offset: var(--moduix-rating-group-focus-ring-offset, var(--moduix-border-width-sm));
|
|
@@ -3,7 +3,6 @@ import { jsx } from "react/jsx-runtime";
|
|
|
3
3
|
import { ScrollArea, useScrollArea, useScrollAreaContext } from "@ark-ui/react/scroll-area";
|
|
4
4
|
import { clsx } from "clsx";
|
|
5
5
|
import { forwardRef } from "react";
|
|
6
|
-
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
7
6
|
import ScrollArea_module from "./ScrollArea.module.js";
|
|
8
7
|
const ScrollArea_ScrollAreaRoot = /*#__PURE__*/ forwardRef(function({ className, fade, variant = 'hover', ...props }, ref) {
|
|
9
8
|
return /*#__PURE__*/ jsx(ScrollArea.Root, {
|
|
@@ -12,7 +11,7 @@ const ScrollArea_ScrollAreaRoot = /*#__PURE__*/ forwardRef(function({ className,
|
|
|
12
11
|
"data-slot": "scroll-area-root",
|
|
13
12
|
"data-fade": fade ? '' : void 0,
|
|
14
13
|
"data-variant": variant,
|
|
15
|
-
className: clsx(ScrollArea_module.root,
|
|
14
|
+
className: clsx(ScrollArea_module.root, className)
|
|
16
15
|
});
|
|
17
16
|
});
|
|
18
17
|
const ScrollArea_ScrollAreaRootProvider = /*#__PURE__*/ forwardRef(function({ className, fade, variant = 'hover', ...props }, ref) {
|
|
@@ -22,7 +21,7 @@ const ScrollArea_ScrollAreaRootProvider = /*#__PURE__*/ forwardRef(function({ cl
|
|
|
22
21
|
"data-slot": "scroll-area-root-provider",
|
|
23
22
|
"data-fade": fade ? '' : void 0,
|
|
24
23
|
"data-variant": variant,
|
|
25
|
-
className: clsx(ScrollArea_module.root,
|
|
24
|
+
className: clsx(ScrollArea_module.root, className)
|
|
26
25
|
});
|
|
27
26
|
});
|
|
28
27
|
const ScrollArea_ScrollAreaViewport = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -30,7 +29,7 @@ const ScrollArea_ScrollAreaViewport = /*#__PURE__*/ forwardRef(function({ classN
|
|
|
30
29
|
ref: ref,
|
|
31
30
|
...props,
|
|
32
31
|
"data-slot": "scroll-area-viewport",
|
|
33
|
-
className: clsx(ScrollArea_module.viewport,
|
|
32
|
+
className: clsx(ScrollArea_module.viewport, className)
|
|
34
33
|
});
|
|
35
34
|
});
|
|
36
35
|
const ScrollArea_ScrollAreaContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -38,7 +37,7 @@ const ScrollArea_ScrollAreaContent = /*#__PURE__*/ forwardRef(function({ classNa
|
|
|
38
37
|
ref: ref,
|
|
39
38
|
...props,
|
|
40
39
|
"data-slot": "scroll-area-content",
|
|
41
|
-
className: clsx(ScrollArea_module.content,
|
|
40
|
+
className: clsx(ScrollArea_module.content, className)
|
|
42
41
|
});
|
|
43
42
|
});
|
|
44
43
|
const ScrollArea_ScrollAreaScrollbar = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -46,7 +45,7 @@ const ScrollArea_ScrollAreaScrollbar = /*#__PURE__*/ forwardRef(function({ class
|
|
|
46
45
|
ref: ref,
|
|
47
46
|
...props,
|
|
48
47
|
"data-slot": "scroll-area-scrollbar",
|
|
49
|
-
className: clsx(ScrollArea_module.scrollbar,
|
|
48
|
+
className: clsx(ScrollArea_module.scrollbar, className)
|
|
50
49
|
});
|
|
51
50
|
});
|
|
52
51
|
const ScrollArea_ScrollAreaThumb = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -54,7 +53,7 @@ const ScrollArea_ScrollAreaThumb = /*#__PURE__*/ forwardRef(function({ className
|
|
|
54
53
|
ref: ref,
|
|
55
54
|
...props,
|
|
56
55
|
"data-slot": "scroll-area-thumb",
|
|
57
|
-
className: clsx(ScrollArea_module.thumb,
|
|
56
|
+
className: clsx(ScrollArea_module.thumb, className)
|
|
58
57
|
});
|
|
59
58
|
});
|
|
60
59
|
const ScrollArea_ScrollAreaCorner = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -62,7 +61,7 @@ const ScrollArea_ScrollAreaCorner = /*#__PURE__*/ forwardRef(function({ classNam
|
|
|
62
61
|
ref: ref,
|
|
63
62
|
...props,
|
|
64
63
|
"data-slot": "scroll-area-corner",
|
|
65
|
-
className: clsx(ScrollArea_module.corner,
|
|
64
|
+
className: clsx(ScrollArea_module.corner, className)
|
|
66
65
|
});
|
|
67
66
|
});
|
|
68
67
|
const ScrollArea_ScrollArea = Object.assign(ScrollArea_ScrollAreaRoot, {
|
|
@@ -16,6 +16,7 @@ declare const SegmentGroup: import("react").ForwardRefExoticComponent<Omit<Segme
|
|
|
16
16
|
ItemContext: (props: SegmentGroupPrimitive.ItemContextProps) => ReactNode;
|
|
17
17
|
Label: import("react").ForwardRefExoticComponent<Omit<SegmentGroupPrimitive.LabelProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
18
18
|
Item: import("react").ForwardRefExoticComponent<Omit<SegmentGroupPrimitive.ItemProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
19
|
+
ItemHiddenInput: import("react").ForwardRefExoticComponent<SegmentGroupPrimitive.ItemHiddenInputProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
19
20
|
ItemControl: import("react").ForwardRefExoticComponent<Omit<SegmentGroupPrimitive.ItemControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
21
|
ItemText: import("react").ForwardRefExoticComponent<Omit<SegmentGroupPrimitive.ItemTextProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
21
22
|
Indicator: import("react").ForwardRefExoticComponent<Omit<SegmentGroupPrimitive.IndicatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,11 +1,10 @@
|
|
|
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 { useFieldsetContext } from "@ark-ui/react/fieldset";
|
|
5
5
|
import { SegmentGroup, useSegmentGroup, useSegmentGroupContext, useSegmentGroupItemContext } from "@ark-ui/react/segment-group";
|
|
6
6
|
import { clsx } from "clsx";
|
|
7
|
-
import {
|
|
8
|
-
import { normalizeClassName } from "../../internal/normalizeClassName.js";
|
|
7
|
+
import { forwardRef } from "react";
|
|
9
8
|
import SegmentGroup_module from "./SegmentGroup.module.js";
|
|
10
9
|
function omitUndefined(props) {
|
|
11
10
|
return Object.fromEntries(Object.entries(props).filter(([, value])=>void 0 !== value));
|
|
@@ -22,7 +21,7 @@ function SegmentGroup_useSegmentGroup(props) {
|
|
|
22
21
|
});
|
|
23
22
|
}
|
|
24
23
|
const SegmentGroup_SegmentGroupRoot = /*#__PURE__*/ forwardRef(function({ className, defaultValue, disabled, form, id, ids, invalid, name, onValueChange, orientation = 'horizontal', readOnly, required, value, ...props }, ref) {
|
|
25
|
-
const segmentGroup = SegmentGroup_useSegmentGroup(
|
|
24
|
+
const segmentGroup = SegmentGroup_useSegmentGroup({
|
|
26
25
|
defaultValue,
|
|
27
26
|
disabled,
|
|
28
27
|
form,
|
|
@@ -35,12 +34,12 @@ const SegmentGroup_SegmentGroupRoot = /*#__PURE__*/ forwardRef(function({ classN
|
|
|
35
34
|
readOnly,
|
|
36
35
|
required,
|
|
37
36
|
value
|
|
38
|
-
})
|
|
37
|
+
});
|
|
39
38
|
return /*#__PURE__*/ jsx(SegmentGroup.RootProvider, {
|
|
40
39
|
ref: ref,
|
|
41
40
|
value: segmentGroup,
|
|
42
41
|
"data-slot": "segment-group-root",
|
|
43
|
-
className: clsx(SegmentGroup_module.root,
|
|
42
|
+
className: clsx(SegmentGroup_module.root, className),
|
|
44
43
|
...props
|
|
45
44
|
});
|
|
46
45
|
});
|
|
@@ -48,7 +47,7 @@ const SegmentGroup_SegmentGroupRootProvider = /*#__PURE__*/ forwardRef(function(
|
|
|
48
47
|
return /*#__PURE__*/ jsx(SegmentGroup.RootProvider, {
|
|
49
48
|
ref: ref,
|
|
50
49
|
"data-slot": "segment-group-root-provider",
|
|
51
|
-
className: clsx(SegmentGroup_module.root,
|
|
50
|
+
className: clsx(SegmentGroup_module.root, className),
|
|
52
51
|
...props
|
|
53
52
|
});
|
|
54
53
|
});
|
|
@@ -56,25 +55,23 @@ const SegmentGroup_SegmentGroupLabel = /*#__PURE__*/ forwardRef(function({ class
|
|
|
56
55
|
return /*#__PURE__*/ jsx(SegmentGroup.Label, {
|
|
57
56
|
ref: ref,
|
|
58
57
|
"data-slot": "segment-group-label",
|
|
59
|
-
className: clsx(SegmentGroup_module.label,
|
|
58
|
+
className: clsx(SegmentGroup_module.label, className),
|
|
60
59
|
...props
|
|
61
60
|
});
|
|
62
61
|
});
|
|
63
|
-
const SegmentGroup_SegmentGroupItem = /*#__PURE__*/ forwardRef(function({
|
|
62
|
+
const SegmentGroup_SegmentGroupItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
64
63
|
return /*#__PURE__*/ jsx(SegmentGroup.Item, {
|
|
65
64
|
ref: ref,
|
|
66
|
-
asChild: asChild,
|
|
67
65
|
"data-slot": "segment-group-item",
|
|
68
|
-
className: clsx(SegmentGroup_module.item,
|
|
69
|
-
...props
|
|
70
|
-
children: withItemHiddenInput(children, asChild)
|
|
66
|
+
className: clsx(SegmentGroup_module.item, className),
|
|
67
|
+
...props
|
|
71
68
|
});
|
|
72
69
|
});
|
|
73
70
|
const SegmentGroup_SegmentGroupItemControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
74
71
|
return /*#__PURE__*/ jsx(SegmentGroup.ItemControl, {
|
|
75
72
|
ref: ref,
|
|
76
73
|
"data-slot": "segment-group-item-control",
|
|
77
|
-
className: clsx(SegmentGroup_module.itemControl,
|
|
74
|
+
className: clsx(SegmentGroup_module.itemControl, className),
|
|
78
75
|
...props
|
|
79
76
|
});
|
|
80
77
|
});
|
|
@@ -82,28 +79,15 @@ const SegmentGroup_SegmentGroupItemText = /*#__PURE__*/ forwardRef(function({ cl
|
|
|
82
79
|
return /*#__PURE__*/ jsx(SegmentGroup.ItemText, {
|
|
83
80
|
ref: ref,
|
|
84
81
|
"data-slot": "segment-group-item-text",
|
|
85
|
-
className: clsx(SegmentGroup_module.itemText,
|
|
82
|
+
className: clsx(SegmentGroup_module.itemText, className),
|
|
86
83
|
...props
|
|
87
84
|
});
|
|
88
85
|
});
|
|
89
|
-
function withItemHiddenInput(children, asChild) {
|
|
90
|
-
const hiddenInput = /*#__PURE__*/ jsx(SegmentGroup.ItemHiddenInput, {
|
|
91
|
-
"data-slot": "segment-group-item-hidden-input"
|
|
92
|
-
});
|
|
93
|
-
if (!asChild) return /*#__PURE__*/ jsxs(Fragment, {
|
|
94
|
-
children: [
|
|
95
|
-
children,
|
|
96
|
-
hiddenInput
|
|
97
|
-
]
|
|
98
|
-
});
|
|
99
|
-
const child = Children.only(children);
|
|
100
|
-
return /*#__PURE__*/ cloneElement(child, {}, child.props.children, hiddenInput);
|
|
101
|
-
}
|
|
102
86
|
const SegmentGroup_SegmentGroupIndicator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
103
87
|
return /*#__PURE__*/ jsx(SegmentGroup.Indicator, {
|
|
104
88
|
ref: ref,
|
|
105
89
|
"data-slot": "segment-group-indicator",
|
|
106
|
-
className: clsx(SegmentGroup_module.indicator,
|
|
90
|
+
className: clsx(SegmentGroup_module.indicator, className),
|
|
107
91
|
...props
|
|
108
92
|
});
|
|
109
93
|
});
|
|
@@ -115,7 +99,8 @@ function SegmentGroupItems({ items }) {
|
|
|
115
99
|
/*#__PURE__*/ jsx(SegmentGroup_SegmentGroupItemText, {
|
|
116
100
|
children: label
|
|
117
101
|
}),
|
|
118
|
-
/*#__PURE__*/ jsx(SegmentGroup_SegmentGroupItemControl, {})
|
|
102
|
+
/*#__PURE__*/ jsx(SegmentGroup_SegmentGroupItemControl, {}),
|
|
103
|
+
/*#__PURE__*/ jsx(SegmentGroup.ItemHiddenInput, {})
|
|
119
104
|
]
|
|
120
105
|
}, value));
|
|
121
106
|
}
|
|
@@ -126,6 +111,7 @@ const SegmentGroup_SegmentGroup = Object.assign(SegmentGroup_SegmentGroupRoot, {
|
|
|
126
111
|
ItemContext: SegmentGroup.ItemContext,
|
|
127
112
|
Label: SegmentGroup_SegmentGroupLabel,
|
|
128
113
|
Item: SegmentGroup_SegmentGroupItem,
|
|
114
|
+
ItemHiddenInput: SegmentGroup.ItemHiddenInput,
|
|
129
115
|
ItemControl: SegmentGroup_SegmentGroupItemControl,
|
|
130
116
|
ItemText: SegmentGroup_SegmentGroupItemText,
|
|
131
117
|
Indicator: SegmentGroup_SegmentGroupIndicator,
|
|
@@ -71,6 +71,10 @@
|
|
|
71
71
|
.item-YWqgii:hover:not([data-readonly], [data-disabled]) {
|
|
72
72
|
color: var(--moduix-segment-group-item-color-hover, var(--moduix-color-foreground));
|
|
73
73
|
}
|
|
74
|
+
|
|
75
|
+
.item-YWqgii:hover:not([data-readonly], [data-disabled])[data-state="checked"] {
|
|
76
|
+
color: var(--moduix-segment-group-item-color-hover, var(--moduix-segment-group-item-color-checked, var(--moduix-color-foreground)));
|
|
77
|
+
}
|
|
74
78
|
}
|
|
75
79
|
|
|
76
80
|
.item-YWqgii[data-state="checked"] {
|