@moduix/react 1.1.0 → 2.0.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 +16 -16
- package/dist/components/accordion/Accordion.css +21 -14
- package/dist/components/accordion/Accordion.d.ts +3 -2
- package/dist/components/accordion/Accordion.js +17 -5
- package/dist/components/accordion/Accordion.module.js +10 -9
- package/dist/components/accordion/index.d.ts +2 -2
- package/dist/components/alert/Alert.css +24 -10
- package/dist/components/alert/Alert.d.ts +5 -3
- package/dist/components/alert/Alert.js +17 -5
- package/dist/components/alert/Alert.module.js +6 -5
- package/dist/components/angle-slider/AngleSlider.css +8 -8
- package/dist/components/angle-slider/AngleSlider.d.ts +18 -2
- package/dist/components/angle-slider/AngleSlider.js +34 -18
- package/dist/components/angle-slider/AngleSlider.module.js +7 -7
- package/dist/components/angle-slider/index.d.ts +2 -2
- package/dist/components/aspect-ratio/AspectRatio.css +4 -2
- package/dist/components/aspect-ratio/AspectRatio.js +2 -2
- package/dist/components/aspect-ratio/AspectRatio.module.js +1 -1
- package/dist/components/avatar/Avatar.css +3 -3
- package/dist/components/avatar/Avatar.d.ts +6 -3
- package/dist/components/avatar/Avatar.js +12 -5
- package/dist/components/avatar/Avatar.module.js +3 -3
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/badge/Badge.css +46 -3
- package/dist/components/badge/Badge.d.ts +2 -2
- package/dist/components/badge/Badge.js +1 -1
- package/dist/components/badge/Badge.module.js +2 -2
- package/dist/components/bleed/Bleed.css +1 -1
- package/dist/components/bleed/Bleed.d.ts +6 -4
- package/dist/components/bleed/Bleed.js +3 -3
- package/dist/components/bleed/Bleed.module.js +1 -1
- package/dist/components/breadcrumbs/Breadcrumbs.css +17 -11
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +18 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js +18 -4
- package/dist/components/breadcrumbs/Breadcrumbs.module.js +8 -7
- package/dist/components/breadcrumbs/index.d.ts +2 -0
- package/dist/components/button/Button.css +22 -2
- package/dist/components/button/Button.d.ts +6 -0
- package/dist/components/button/Button.js +12 -7
- package/dist/components/button/Button.module.js +1 -1
- package/dist/components/card/Card.css +29 -13
- package/dist/components/card/Card.d.ts +1 -0
- package/dist/components/card/Card.js +12 -1
- package/dist/components/card/Card.module.js +9 -8
- package/dist/components/carousel/Carousel.css +20 -18
- package/dist/components/carousel/Carousel.d.ts +4 -0
- package/dist/components/carousel/Carousel.js +15 -2
- package/dist/components/carousel/Carousel.module.js +12 -12
- package/dist/components/checkbox/Checkbox.css +11 -11
- package/dist/components/checkbox/Checkbox.d.ts +2 -3
- package/dist/components/checkbox/Checkbox.js +25 -22
- package/dist/components/checkbox/Checkbox.module.js +6 -6
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/clipboard/Clipboard.css +8 -8
- package/dist/components/clipboard/Clipboard.d.ts +2 -0
- package/dist/components/clipboard/Clipboard.js +15 -4
- package/dist/components/clipboard/Clipboard.module.js +8 -8
- package/dist/components/close-button/CloseButton.css +1 -1
- package/dist/components/close-button/CloseButton.d.ts +12 -2
- package/dist/components/close-button/CloseButton.js +9 -9
- package/dist/components/close-button/CloseButton.module.js +1 -1
- package/dist/components/collapsible/Collapsible.css +17 -10
- package/dist/components/collapsible/Collapsible.d.ts +3 -2
- package/dist/components/collapsible/Collapsible.js +18 -6
- package/dist/components/collapsible/Collapsible.module.js +7 -6
- package/dist/components/collapsible/index.d.ts +2 -2
- package/dist/components/color-picker/ColorPicker.css +63 -34
- package/dist/components/color-picker/ColorPicker.d.ts +3 -3
- package/dist/components/color-picker/ColorPicker.js +78 -27
- package/dist/components/color-picker/ColorPicker.module.js +28 -27
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/combobox/Combobox.css +55 -26
- package/dist/components/combobox/Combobox.d.ts +9 -2
- package/dist/components/combobox/Combobox.js +34 -8
- package/dist/components/combobox/Combobox.module.js +17 -17
- package/dist/components/combobox/index.d.ts +2 -2
- package/dist/components/command-palette/CommandPalette.css +80 -114
- package/dist/components/command-palette/CommandPalette.d.ts +13 -3
- package/dist/components/command-palette/CommandPalette.js +54 -43
- package/dist/components/command-palette/CommandPalette.module.js +35 -37
- package/dist/components/container/Container.css +1 -1
- package/dist/components/container/Container.js +1 -1
- package/dist/components/container/Container.module.js +1 -1
- package/dist/components/date-input/DateInput.css +9 -7
- package/dist/components/date-input/DateInput.d.ts +12 -7
- package/dist/components/date-input/DateInput.js +35 -14
- package/dist/components/date-input/DateInput.module.js +6 -6
- package/dist/components/date-input/index.d.ts +2 -2
- package/dist/components/date-picker/DatePicker.css +68 -40
- package/dist/components/date-picker/DatePicker.d.ts +30 -2
- package/dist/components/date-picker/DatePicker.js +94 -9
- package/dist/components/date-picker/DatePicker.module.js +23 -23
- package/dist/components/date-picker/index.d.ts +2 -2
- package/dist/components/dialog/Dialog.css +31 -27
- package/dist/components/dialog/Dialog.d.ts +2 -2
- package/dist/components/dialog/Dialog.js +3 -3
- package/dist/components/dialog/Dialog.module.js +15 -15
- package/dist/components/dialog/index.d.ts +2 -2
- package/dist/components/drawer/Drawer.css +40 -40
- package/dist/components/drawer/Drawer.d.ts +2 -2
- package/dist/components/drawer/Drawer.js +3 -3
- package/dist/components/drawer/Drawer.module.js +26 -26
- package/dist/components/drawer/index.d.ts +2 -2
- package/dist/components/editable/Editable.css +10 -10
- package/dist/components/editable/Editable.d.ts +9 -2
- package/dist/components/editable/Editable.js +14 -5
- package/dist/components/editable/Editable.module.js +7 -7
- package/dist/components/editable/index.d.ts +2 -2
- package/dist/components/empty/Empty.css +6 -6
- package/dist/components/empty/Empty.js +1 -1
- package/dist/components/empty/Empty.module.js +6 -6
- package/dist/components/field/Field.css +8 -12
- package/dist/components/field/Field.d.ts +3 -2
- package/dist/components/field/Field.js +6 -5
- package/dist/components/field/Field.module.js +8 -9
- package/dist/components/field/index.d.ts +2 -2
- package/dist/components/fieldset/Fieldset.css +6 -6
- package/dist/components/fieldset/Fieldset.d.ts +2 -2
- package/dist/components/fieldset/Fieldset.js +3 -3
- package/dist/components/fieldset/Fieldset.module.js +4 -4
- package/dist/components/fieldset/index.d.ts +2 -2
- package/dist/components/file-upload/FileUpload.css +97 -24
- package/dist/components/file-upload/FileUpload.d.ts +22 -5
- package/dist/components/file-upload/FileUpload.js +79 -21
- package/dist/components/file-upload/FileUpload.module.js +16 -13
- package/dist/components/file-upload/index.d.ts +2 -2
- package/dist/components/floating-panel/FloatingPanel.css +28 -24
- package/dist/components/floating-panel/FloatingPanel.d.ts +11 -3
- package/dist/components/floating-panel/FloatingPanel.js +15 -9
- package/dist/components/floating-panel/FloatingPanel.module.js +14 -14
- package/dist/components/heading/Heading.css +1 -1
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/heading/Heading.module.js +1 -1
- package/dist/components/highlight/Highlight.css +1 -1
- package/dist/components/highlight/Highlight.js +1 -1
- package/dist/components/highlight/Highlight.module.js +1 -1
- package/dist/components/hover-card/HoverCard.css +21 -17
- package/dist/components/hover-card/HoverCard.d.ts +3 -2
- package/dist/components/hover-card/HoverCard.js +5 -4
- package/dist/components/hover-card/HoverCard.module.js +7 -7
- package/dist/components/hover-card/index.d.ts +2 -2
- package/dist/components/image/Image.css +7 -0
- package/dist/components/image/Image.d.ts +12 -0
- package/dist/components/image/Image.js +28 -0
- package/dist/components/image/Image.module.js +5 -0
- package/dist/components/image/index.d.ts +2 -0
- package/dist/components/image-cropper/ImageCropper.css +6 -6
- package/dist/components/image-cropper/ImageCropper.d.ts +7 -2
- package/dist/components/image-cropper/ImageCropper.js +25 -3
- package/dist/components/image-cropper/ImageCropper.module.js +6 -6
- package/dist/components/image-cropper/index.d.ts +2 -2
- package/dist/components/input/Input.css +1 -1
- package/dist/components/input/Input.js +1 -1
- package/dist/components/input/Input.module.js +1 -1
- package/dist/components/input-group/InputGroup.css +6 -6
- package/dist/components/input-group/InputGroup.d.ts +3 -0
- package/dist/components/input-group/InputGroup.js +1 -1
- package/dist/components/input-group/InputGroup.module.js +5 -5
- package/dist/components/kbd/Kbd.css +2 -2
- package/dist/components/kbd/Kbd.js +1 -1
- package/dist/components/kbd/Kbd.module.js +2 -2
- package/dist/components/lightbox/Lightbox.css +30 -28
- package/dist/components/lightbox/Lightbox.d.ts +4 -2
- package/dist/components/lightbox/Lightbox.js +9 -7
- package/dist/components/lightbox/Lightbox.module.js +16 -16
- package/dist/components/lightbox/index.d.ts +2 -2
- package/dist/components/list/List.css +1 -1
- package/dist/components/list/List.js +1 -1
- package/dist/components/list/List.module.js +1 -1
- package/dist/components/listbox/Listbox.css +76 -17
- package/dist/components/listbox/Listbox.d.ts +14 -2
- package/dist/components/listbox/Listbox.js +41 -5
- package/dist/components/listbox/Listbox.module.js +17 -14
- package/dist/components/listbox/index.d.ts +2 -2
- package/dist/components/marquee/Marquee.css +10 -10
- package/dist/components/marquee/Marquee.d.ts +2 -1
- package/dist/components/marquee/Marquee.js +4 -3
- package/dist/components/marquee/Marquee.module.js +7 -7
- package/dist/components/marquee/index.d.ts +2 -2
- package/dist/components/menu/Menu.css +46 -40
- package/dist/components/menu/Menu.d.ts +3 -2
- package/dist/components/menu/Menu.js +6 -5
- package/dist/components/menu/Menu.module.js +27 -27
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/native-select/NativeSelect.css +5 -5
- package/dist/components/native-select/NativeSelect.d.ts +6 -2
- package/dist/components/native-select/NativeSelect.js +5 -4
- package/dist/components/native-select/NativeSelect.module.js +3 -3
- package/dist/components/number-input/NumberInput.css +11 -17
- package/dist/components/number-input/NumberInput.d.ts +7 -2
- package/dist/components/number-input/NumberInput.js +17 -4
- package/dist/components/number-input/NumberInput.module.js +8 -8
- package/dist/components/number-input/index.d.ts +2 -2
- package/dist/components/pagination/Pagination.css +8 -8
- package/dist/components/pagination/Pagination.d.ts +4 -0
- package/dist/components/pagination/Pagination.js +13 -4
- package/dist/components/pagination/Pagination.module.js +6 -6
- package/dist/components/password-input/PasswordInput.css +7 -7
- package/dist/components/password-input/PasswordInput.d.ts +4 -0
- package/dist/components/password-input/PasswordInput.js +10 -2
- package/dist/components/password-input/PasswordInput.module.js +6 -6
- package/dist/components/pin-input/PinInput.css +5 -5
- package/dist/components/pin-input/PinInput.d.ts +6 -1
- package/dist/components/pin-input/PinInput.js +25 -16
- package/dist/components/pin-input/PinInput.module.js +5 -5
- package/dist/components/popover/Popover.css +33 -24
- package/dist/components/popover/Popover.js +1 -1
- package/dist/components/popover/Popover.module.js +14 -14
- package/dist/components/progress-circular/ProgressCircular.css +8 -8
- package/dist/components/progress-circular/ProgressCircular.d.ts +6 -0
- package/dist/components/progress-circular/ProgressCircular.js +14 -3
- package/dist/components/progress-circular/ProgressCircular.module.js +8 -8
- package/dist/components/progress-linear/ProgressLinear.css +8 -8
- package/dist/components/progress-linear/ProgressLinear.d.ts +3 -0
- package/dist/components/progress-linear/ProgressLinear.js +6 -3
- package/dist/components/progress-linear/ProgressLinear.module.js +8 -8
- package/dist/components/qr-code/QrCode.css +13 -12
- package/dist/components/qr-code/QrCode.d.ts +2 -2
- package/dist/components/qr-code/QrCode.js +3 -3
- package/dist/components/qr-code/QrCode.module.js +5 -5
- package/dist/components/qr-code/index.d.ts +2 -2
- package/dist/components/radio-group/RadioGroup.css +6 -6
- package/dist/components/radio-group/RadioGroup.d.ts +8 -4
- package/dist/components/radio-group/RadioGroup.js +22 -14
- package/dist/components/radio-group/RadioGroup.module.js +6 -6
- package/dist/components/radio-group/index.d.ts +2 -2
- package/dist/components/rating-group/RatingGroup.css +14 -14
- package/dist/components/rating-group/RatingGroup.d.ts +11 -4
- package/dist/components/rating-group/RatingGroup.js +29 -18
- package/dist/components/rating-group/RatingGroup.module.js +7 -7
- package/dist/components/rating-group/index.d.ts +2 -2
- package/dist/components/scroll-area/ScrollArea.css +14 -9
- package/dist/components/scroll-area/ScrollArea.d.ts +3 -0
- package/dist/components/scroll-area/ScrollArea.js +9 -6
- package/dist/components/scroll-area/ScrollArea.module.js +6 -6
- package/dist/components/segment-group/SegmentGroup.css +6 -6
- package/dist/components/segment-group/SegmentGroup.d.ts +13 -3
- package/dist/components/segment-group/SegmentGroup.js +23 -15
- package/dist/components/segment-group/SegmentGroup.module.js +6 -6
- package/dist/components/segment-group/index.d.ts +2 -2
- package/dist/components/select/Select.css +49 -40
- package/dist/components/select/Select.d.ts +18 -4
- package/dist/components/select/Select.js +65 -20
- package/dist/components/select/Select.module.js +21 -21
- package/dist/components/separator/Separator.css +1 -1
- package/dist/components/separator/Separator.js +1 -1
- package/dist/components/separator/Separator.module.js +1 -1
- package/dist/components/sidebar/Sidebar.css +169 -32
- package/dist/components/sidebar/Sidebar.d.ts +26 -0
- package/dist/components/sidebar/Sidebar.js +105 -13
- package/dist/components/sidebar/Sidebar.module.js +23 -17
- package/dist/components/signature-pad/SignaturePad.css +18 -47
- package/dist/components/signature-pad/SignaturePad.d.ts +14 -6
- package/dist/components/signature-pad/SignaturePad.js +56 -17
- package/dist/components/signature-pad/SignaturePad.module.js +6 -6
- package/dist/components/signature-pad/index.d.ts +2 -2
- package/dist/components/simple-grid/SimpleGrid.js +3 -3
- package/dist/components/skeleton/Skeleton.css +1 -1
- package/dist/components/skeleton/Skeleton.js +1 -1
- package/dist/components/skeleton/Skeleton.module.js +1 -1
- package/dist/components/slider/Slider.css +16 -14
- package/dist/components/slider/Slider.d.ts +12 -3
- package/dist/components/slider/Slider.js +24 -15
- package/dist/components/slider/Slider.module.js +10 -10
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/spinner/Spinner.css +9 -9
- package/dist/components/spinner/Spinner.js +2 -2
- package/dist/components/spinner/Spinner.module.js +3 -3
- package/dist/components/split-button/SplitButton.css +9 -9
- package/dist/components/split-button/SplitButton.d.ts +1 -1
- package/dist/components/split-button/SplitButton.js +3 -4
- package/dist/components/split-button/SplitButton.module.js +3 -3
- package/dist/components/splitter/Splitter.css +27 -22
- package/dist/components/splitter/Splitter.d.ts +2 -2
- package/dist/components/splitter/Splitter.js +12 -11
- package/dist/components/splitter/Splitter.module.js +4 -4
- package/dist/components/splitter/index.d.ts +2 -2
- package/dist/components/stack/Stack.css +2 -2
- package/dist/components/stack/Stack.d.ts +1 -3
- package/dist/components/stack/Stack.js +4 -6
- package/dist/components/stack/Stack.module.js +1 -1
- package/dist/components/steps/Steps.css +14 -14
- package/dist/components/steps/Steps.d.ts +2 -1
- package/dist/components/steps/Steps.js +5 -4
- package/dist/components/steps/Steps.module.js +11 -11
- package/dist/components/swap/Swap.css +45 -0
- package/dist/components/swap/Swap.d.ts +11 -0
- package/dist/components/swap/Swap.js +39 -0
- package/dist/components/swap/Swap.module.js +11 -0
- package/dist/components/swap/index.d.ts +2 -0
- package/dist/components/switch/Switch.css +11 -11
- package/dist/components/switch/Switch.d.ts +4 -4
- package/dist/components/switch/Switch.js +19 -16
- package/dist/components/switch/Switch.module.js +4 -4
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/table/Table.css +18 -18
- package/dist/components/table/Table.js +3 -2
- package/dist/components/table/Table.module.js +11 -12
- package/dist/components/tabs/Tabs.css +12 -10
- package/dist/components/tabs/Tabs.d.ts +3 -2
- package/dist/components/tabs/Tabs.js +5 -4
- package/dist/components/tabs/Tabs.module.js +5 -5
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tag/Tag.css +16 -46
- package/dist/components/tag/Tag.js +7 -20
- package/dist/components/tag/Tag.module.js +5 -5
- package/dist/components/tags-input/TagsInput.css +13 -50
- package/dist/components/tags-input/TagsInput.d.ts +7 -4
- package/dist/components/tags-input/TagsInput.js +33 -21
- package/dist/components/tags-input/TagsInput.module.js +10 -10
- package/dist/components/tags-input/index.d.ts +2 -2
- package/dist/components/text/Text.css +1 -1
- package/dist/components/text/Text.d.ts +2 -2
- package/dist/components/text/Text.js +1 -1
- package/dist/components/text/Text.module.js +1 -1
- package/dist/components/textarea/Textarea.css +7 -7
- package/dist/components/textarea/Textarea.js +1 -1
- package/dist/components/textarea/Textarea.module.js +1 -1
- package/dist/components/timer/Timer.css +6 -6
- package/dist/components/timer/Timer.d.ts +14 -2
- package/dist/components/timer/Timer.js +13 -5
- package/dist/components/timer/Timer.module.js +6 -6
- package/dist/components/timer/index.d.ts +2 -2
- package/dist/components/toast/Toast.css +8 -8
- package/dist/components/toast/Toast.d.ts +3 -1
- package/dist/components/toast/Toast.js +11 -2
- package/dist/components/toast/Toast.module.js +6 -6
- package/dist/components/toggle/Toggle.css +5 -5
- package/dist/components/toggle/Toggle.d.ts +3 -2
- package/dist/components/toggle/Toggle.js +5 -4
- package/dist/components/toggle/Toggle.module.js +2 -2
- package/dist/components/toggle/index.d.ts +2 -2
- package/dist/components/toggle-group/ToggleGroup.css +3 -3
- package/dist/components/toggle-group/ToggleGroup.d.ts +3 -2
- package/dist/components/toggle-group/ToggleGroup.js +4 -3
- package/dist/components/toggle-group/ToggleGroup.module.js +2 -2
- package/dist/components/toggle-group/index.d.ts +2 -2
- package/dist/components/tooltip/Tooltip.css +21 -17
- package/dist/components/tooltip/Tooltip.d.ts +3 -2
- package/dist/components/tooltip/Tooltip.js +10 -3
- package/dist/components/tooltip/Tooltip.module.js +7 -7
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tour/Tour.css +42 -37
- package/dist/components/tour/Tour.d.ts +6 -0
- package/dist/components/tour/Tour.js +8 -1
- package/dist/components/tour/Tour.module.js +17 -17
- package/dist/components/tree-view/TreeView.css +22 -22
- package/dist/components/tree-view/TreeView.d.ts +2 -2
- package/dist/components/tree-view/TreeView.js +4 -4
- package/dist/components/tree-view/TreeView.module.js +20 -20
- package/dist/components/tree-view/index.d.ts +2 -2
- package/dist/index.d.ts +40 -39
- package/dist/index.js +40 -39
- package/dist/lib/moduix/icons/ui/Icons.d.ts +1 -45
- package/dist/lib/moduix/icons/ui/Icons.js +36 -263
- package/dist/lib/moduix/icons/ui/index.d.ts +2 -2
- package/dist/lib/moduix/overlayPortal.js +1 -1
- package/package.json +4 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@layer ui.components {
|
|
2
|
-
.
|
|
2
|
+
.Jh_n9a_root {
|
|
3
3
|
gap: var(--rating-group-root-gap, var(--spacing-1));
|
|
4
4
|
color: var(--rating-group-color, var(--color-muted-foreground));
|
|
5
5
|
flex-direction: column;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.
|
|
29
|
+
.Jh_n9a_label {
|
|
30
30
|
color: var(--rating-group-label-color, var(--color-foreground));
|
|
31
31
|
font-size: var(--rating-group-label-font-size, var(--text-sm));
|
|
32
32
|
font-weight: var(--rating-group-label-font-weight, var(--weight-semibold));
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.
|
|
41
|
+
.Jh_n9a_control {
|
|
42
42
|
align-items: center;
|
|
43
43
|
gap: var(--rating-group-gap, var(--spacing-1));
|
|
44
44
|
display: inline-flex;
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
.
|
|
51
|
+
.Jh_n9a_item {
|
|
52
52
|
border-radius: var(--radius-sm);
|
|
53
53
|
color: inherit;
|
|
54
54
|
cursor: pointer;
|
|
@@ -72,13 +72,13 @@
|
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
&:focus-visible {
|
|
75
|
-
outline: var(--rating-group-focus-ring-width,
|
|
76
|
-
var(--rating-group-focus-ring-color,
|
|
77
|
-
outline-offset: var(--rating-group-focus-ring-offset,
|
|
75
|
+
outline: var(--rating-group-focus-ring-width, 0) solid
|
|
76
|
+
var(--rating-group-focus-ring-color, transparent);
|
|
77
|
+
outline-offset: var(--rating-group-focus-ring-offset, 0);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
.
|
|
81
|
+
.Jh_n9a_itemIndicator {
|
|
82
82
|
width: var(--_rating-group-icon-size, var(--rating-group-icon-size-md, 1.25rem));
|
|
83
83
|
height: var(--_rating-group-icon-size, var(--rating-group-icon-size-md, 1.25rem));
|
|
84
84
|
color: var(--rating-group-active-color, var(--color-primary));
|
|
@@ -97,24 +97,24 @@
|
|
|
97
97
|
flex: none;
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
-
&[data-half] .
|
|
100
|
+
&[data-half] .Jh_n9a_iconFg {
|
|
101
101
|
clip-path: inset(0 50% 0 0);
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
&:not([data-highlighted]) .
|
|
104
|
+
&:not([data-highlighted]) .Jh_n9a_iconFg {
|
|
105
105
|
clip-path: inset(0 100% 0 0);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
.
|
|
109
|
+
.Jh_n9a_item[data-half] .Jh_n9a_iconFg {
|
|
110
110
|
clip-path: inset(0 50% 0 0);
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.
|
|
113
|
+
.Jh_n9a_item:not([data-highlighted]) .Jh_n9a_iconFg {
|
|
114
114
|
clip-path: inset(0 100% 0 0);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
|
-
.
|
|
117
|
+
.Jh_n9a_iconBg {
|
|
118
118
|
color: var(--rating-group-color, var(--color-muted-foreground));
|
|
119
119
|
fill: #0000;
|
|
120
120
|
stroke: currentColor;
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
inset: 0;
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
.
|
|
125
|
+
.Jh_n9a_iconFg {
|
|
126
126
|
color: var(--rating-group-active-color, var(--color-primary));
|
|
127
127
|
fill: currentColor;
|
|
128
128
|
stroke: currentColor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentProps } from "react";
|
|
2
|
-
import { RatingGroup } from "@ark-ui/react/rating-group";
|
|
1
|
+
import { ComponentProps, ReactNode } from "react";
|
|
2
|
+
import { RatingGroup, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext } from "@ark-ui/react/rating-group";
|
|
3
3
|
|
|
4
4
|
//#region src/components/rating-group/RatingGroup.d.ts
|
|
5
5
|
type RatingGroupSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -10,14 +10,21 @@ type RatingGroupRootProviderProps = ComponentProps<typeof RatingGroup.RootProvid
|
|
|
10
10
|
size?: RatingGroupSize;
|
|
11
11
|
};
|
|
12
12
|
type RatingGroupItemIndicatorProps = ComponentProps<'span'>;
|
|
13
|
+
declare function RatingGroupItems({
|
|
14
|
+
children
|
|
15
|
+
}: {
|
|
16
|
+
children?: ReactNode;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
13
18
|
declare const RatingGroup$1: import("react").ForwardRefExoticComponent<Omit<RatingGroupRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
14
19
|
Root: import("react").ForwardRefExoticComponent<Omit<RatingGroupRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
20
|
RootProvider: import("react").ForwardRefExoticComponent<Omit<RatingGroupRootProviderProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
+
Context: (props: RatingGroup.ContextProps) => ReactNode;
|
|
16
22
|
Label: import("react").ForwardRefExoticComponent<Omit<RatingGroup.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
17
23
|
Control: import("react").ForwardRefExoticComponent<Omit<RatingGroup.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
24
|
Item: import("react").ForwardRefExoticComponent<Omit<RatingGroup.ItemProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
25
|
+
ItemContext: (props: RatingGroup.ItemContextProps) => ReactNode;
|
|
19
26
|
ItemIndicator: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
20
|
-
|
|
27
|
+
Items: typeof RatingGroupItems;
|
|
21
28
|
};
|
|
22
29
|
//#endregion
|
|
23
|
-
export { RatingGroup$1 as RatingGroup, type RatingGroupItemIndicatorProps, type RatingGroupRootProps, type RatingGroupRootProviderProps, type RatingGroupSize };
|
|
30
|
+
export { RatingGroup$1 as RatingGroup, type RatingGroupItemIndicatorProps, type RatingGroupRootProps, type RatingGroupRootProviderProps, type RatingGroupSize, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext };
|
|
@@ -1,27 +1,31 @@
|
|
|
1
|
-
import { RatingStarIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
2
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
|
+
import { RatingStarIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
3
3
|
import RatingGroup_module_default from "./RatingGroup.module.js";
|
|
4
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { clsx } from "clsx";
|
|
6
|
-
import { forwardRef } from "react";
|
|
7
|
-
import {
|
|
5
|
+
import { Children, cloneElement, forwardRef } from "react";
|
|
6
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { RatingGroup, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext } from "@ark-ui/react/rating-group";
|
|
8
8
|
//#region src/components/rating-group/RatingGroup.tsx
|
|
9
|
-
const RatingGroupRoot = forwardRef(function RatingGroupRoot({ className, size = "md", ...props }, ref) {
|
|
9
|
+
const RatingGroupRoot = forwardRef(function RatingGroupRoot({ asChild, children, className, size = "md", ...props }, ref) {
|
|
10
10
|
return /* @__PURE__ */ jsx(RatingGroup.Root, {
|
|
11
11
|
ref,
|
|
12
|
+
asChild,
|
|
12
13
|
"data-slot": "rating-group-root",
|
|
13
14
|
"data-size": size,
|
|
14
15
|
className: clsx(RatingGroup_module_default.root, normalizeClassName(className)),
|
|
15
|
-
...props
|
|
16
|
+
...props,
|
|
17
|
+
children: withHiddenInput(children, asChild)
|
|
16
18
|
});
|
|
17
19
|
});
|
|
18
|
-
const RatingGroupRootProvider = forwardRef(function RatingGroupRootProvider({ className, size = "md", ...props }, ref) {
|
|
20
|
+
const RatingGroupRootProvider = forwardRef(function RatingGroupRootProvider({ asChild, children, className, size = "md", ...props }, ref) {
|
|
19
21
|
return /* @__PURE__ */ jsx(RatingGroup.RootProvider, {
|
|
20
22
|
ref,
|
|
23
|
+
asChild,
|
|
21
24
|
"data-slot": "rating-group-root-provider",
|
|
22
25
|
"data-size": size,
|
|
23
26
|
className: clsx(RatingGroup_module_default.root, normalizeClassName(className)),
|
|
24
|
-
...props
|
|
27
|
+
...props,
|
|
28
|
+
children: withHiddenInput(children, asChild)
|
|
25
29
|
});
|
|
26
30
|
});
|
|
27
31
|
const RatingGroupLabel = forwardRef(function RatingGroupLabel({ className, ...props }, ref) {
|
|
@@ -57,7 +61,7 @@ const RatingGroupItemIndicator = forwardRef(function RatingGroupItemIndicator({
|
|
|
57
61
|
"data-highlighted": highlighted ? "" : void 0,
|
|
58
62
|
className: clsx(RatingGroup_module_default.itemIndicator, normalizeClassName(className)),
|
|
59
63
|
...props,
|
|
60
|
-
children: children ?? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(RatingStarIcon, {
|
|
64
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(RatingStarIcon, {
|
|
61
65
|
"data-slot": "rating-group-item-indicator-bg",
|
|
62
66
|
className: RatingGroup_module_default.iconBg
|
|
63
67
|
}), /* @__PURE__ */ jsx(RatingStarIcon, {
|
|
@@ -66,21 +70,28 @@ const RatingGroupItemIndicator = forwardRef(function RatingGroupItemIndicator({
|
|
|
66
70
|
})] })
|
|
67
71
|
});
|
|
68
72
|
});
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
})
|
|
73
|
+
function withHiddenInput(children, asChild) {
|
|
74
|
+
const hiddenInput = /* @__PURE__ */ jsx(RatingGroup.HiddenInput, { "data-slot": "rating-group-hidden-input" });
|
|
75
|
+
if (!asChild) return /* @__PURE__ */ jsxs(Fragment$1, { children: [children, hiddenInput] });
|
|
76
|
+
const child = Children.only(children);
|
|
77
|
+
return cloneElement(child, {}, child.props.children, hiddenInput);
|
|
78
|
+
}
|
|
79
|
+
function RatingGroupItems({ children }) {
|
|
80
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(RatingGroup.Context, { children: ({ items }) => items.map((item) => /* @__PURE__ */ jsx(RatingGroupItem, {
|
|
81
|
+
index: item,
|
|
82
|
+
children: children ?? /* @__PURE__ */ jsx(RatingGroupItemIndicator, {})
|
|
83
|
+
}, item)) }) });
|
|
84
|
+
}
|
|
76
85
|
const RatingGroup$1 = Object.assign(RatingGroupRoot, {
|
|
77
86
|
Root: RatingGroupRoot,
|
|
78
87
|
RootProvider: RatingGroupRootProvider,
|
|
88
|
+
Context: RatingGroup.Context,
|
|
79
89
|
Label: RatingGroupLabel,
|
|
80
90
|
Control: RatingGroupControl,
|
|
81
91
|
Item: RatingGroupItem,
|
|
92
|
+
ItemContext: RatingGroup.ItemContext,
|
|
82
93
|
ItemIndicator: RatingGroupItemIndicator,
|
|
83
|
-
|
|
94
|
+
Items: RatingGroupItems
|
|
84
95
|
});
|
|
85
96
|
//#endregion
|
|
86
|
-
export { RatingGroup$1 as RatingGroup };
|
|
97
|
+
export { RatingGroup$1 as RatingGroup, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext };
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import './RatingGroup.css';
|
|
2
2
|
//#region src/components/rating-group/RatingGroup.module.css
|
|
3
3
|
var RatingGroup_module_default = {
|
|
4
|
-
"control": "
|
|
5
|
-
"iconBg": "
|
|
6
|
-
"iconFg": "
|
|
7
|
-
"item": "
|
|
8
|
-
"itemIndicator": "
|
|
9
|
-
"label": "
|
|
10
|
-
"root": "
|
|
4
|
+
"control": "Jh_n9a_control",
|
|
5
|
+
"iconBg": "Jh_n9a_iconBg",
|
|
6
|
+
"iconFg": "Jh_n9a_iconFg",
|
|
7
|
+
"item": "Jh_n9a_item",
|
|
8
|
+
"itemIndicator": "Jh_n9a_itemIndicator",
|
|
9
|
+
"label": "Jh_n9a_label",
|
|
10
|
+
"root": "Jh_n9a_root"
|
|
11
11
|
};
|
|
12
12
|
//#endregion
|
|
13
13
|
export { RatingGroup_module_default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { RatingGroup, RatingGroupItemIndicatorProps, RatingGroupRootProps, RatingGroupRootProviderProps, RatingGroupSize } from "./RatingGroup.js";
|
|
2
|
-
export { RatingGroup, type RatingGroupItemIndicatorProps, type RatingGroupRootProps, type RatingGroupRootProviderProps, type RatingGroupSize };
|
|
1
|
+
import { RatingGroup, RatingGroupItemIndicatorProps, RatingGroupRootProps, RatingGroupRootProviderProps, RatingGroupSize, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext } from "./RatingGroup.js";
|
|
2
|
+
export { RatingGroup, type RatingGroupItemIndicatorProps, type RatingGroupRootProps, type RatingGroupRootProviderProps, type RatingGroupSize, useRatingGroup, useRatingGroupContext, useRatingGroupItemContext };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@layer ui.components {
|
|
2
|
-
.
|
|
2
|
+
.xqtLha_root {
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
width: var(--scroll-area-width, 100%);
|
|
5
5
|
height: var(--scroll-area-height, 100%);
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
position: relative;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
.
|
|
12
|
+
.xqtLha_viewport {
|
|
13
13
|
box-sizing: border-box;
|
|
14
14
|
border-radius: var(--scroll-area-radius, var(--radius-md));
|
|
15
15
|
background-color: var(--scroll-area-bg, transparent);
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
display: none;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
.
|
|
38
|
+
.xqtLha_root[data-fade] & {
|
|
39
39
|
mask-image: var(--_scroll-area-block-fade-mask);
|
|
40
40
|
mask-repeat: no-repeat;
|
|
41
41
|
}
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
.
|
|
50
|
+
.xqtLha_content {
|
|
51
51
|
box-sizing: border-box;
|
|
52
52
|
padding: var(--scroll-area-content-padding, 0);
|
|
53
53
|
display: block;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
.
|
|
56
|
+
.xqtLha_scrollbar {
|
|
57
57
|
--_scroll-area-scrollbar-margin: var(--scroll-area-scrollbar-margin, var(--spacing-1));
|
|
58
58
|
--_scroll-area-scrollbar-hit-area-size: var(--scroll-area-scrollbar-hit-area-size, var(--spacing-5));
|
|
59
59
|
box-sizing: border-box;
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
user-select: none;
|
|
66
66
|
touch-action: none;
|
|
67
67
|
transition: opacity var(--scroll-area-transition, var(--transition-default)),
|
|
68
|
-
width var(--scroll-area-transition, var(--transition-
|
|
69
|
-
height var(--scroll-area-transition, var(--transition-
|
|
68
|
+
width var(--scroll-area-thumb-hover-transition, var(--transition-fast)),
|
|
69
|
+
height var(--scroll-area-thumb-hover-transition, var(--transition-fast));
|
|
70
70
|
justify-content: center;
|
|
71
71
|
display: flex;
|
|
72
72
|
position: absolute;
|
|
@@ -137,9 +137,14 @@
|
|
|
137
137
|
&[data-scrolling] {
|
|
138
138
|
transition-duration: 0s;
|
|
139
139
|
}
|
|
140
|
+
|
|
141
|
+
.xqtLha_root[data-variant="always"] & {
|
|
142
|
+
opacity: var(--scroll-area-scrollbar-visible-opacity, 1);
|
|
143
|
+
pointer-events: auto;
|
|
144
|
+
}
|
|
140
145
|
}
|
|
141
146
|
|
|
142
|
-
.
|
|
147
|
+
.xqtLha_thumb {
|
|
143
148
|
box-sizing: border-box;
|
|
144
149
|
border-radius: var(--scroll-area-thumb-radius, var(--radius-full));
|
|
145
150
|
background-color: var(--scroll-area-thumb-bg, var(--color-border));
|
|
@@ -155,7 +160,7 @@
|
|
|
155
160
|
}
|
|
156
161
|
}
|
|
157
162
|
|
|
158
|
-
.
|
|
163
|
+
.xqtLha_corner {
|
|
159
164
|
box-sizing: border-box;
|
|
160
165
|
background-color: var(--scroll-area-corner-bg, var(--scroll-area-scrollbar-bg, transparent));
|
|
161
166
|
}
|
|
@@ -4,9 +4,11 @@ import { ScrollArea } from "@ark-ui/react/scroll-area";
|
|
|
4
4
|
//#region src/components/scroll-area/ScrollArea.d.ts
|
|
5
5
|
type ModuixScrollAreaRootProps = ComponentProps<typeof ScrollArea.Root> & {
|
|
6
6
|
fade?: boolean;
|
|
7
|
+
variant?: 'hover' | 'always';
|
|
7
8
|
};
|
|
8
9
|
type ModuixScrollAreaRootProviderProps = ComponentProps<typeof ScrollArea.RootProvider> & {
|
|
9
10
|
fade?: boolean;
|
|
11
|
+
variant?: 'hover' | 'always';
|
|
10
12
|
};
|
|
11
13
|
declare const ScrollArea$1: import("react").ForwardRefExoticComponent<Omit<ModuixScrollAreaRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
12
14
|
Root: import("react").ForwardRefExoticComponent<Omit<ModuixScrollAreaRootProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -16,6 +18,7 @@ declare const ScrollArea$1: import("react").ForwardRefExoticComponent<Omit<Modui
|
|
|
16
18
|
Scrollbar: import("react").ForwardRefExoticComponent<Omit<ScrollArea.ScrollbarProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
19
|
Thumb: import("react").ForwardRefExoticComponent<Omit<ScrollArea.ThumbProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
20
|
Corner: import("react").ForwardRefExoticComponent<Omit<ScrollArea.CornerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
+
useScrollArea: (props?: import("@ark-ui/react/scroll-area").UseScrollAreaProps) => import("@ark-ui/react/scroll-area").UseScrollAreaReturn;
|
|
19
22
|
};
|
|
20
23
|
//#endregion
|
|
21
24
|
export { type ModuixScrollAreaRootProps, type ModuixScrollAreaRootProviderProps, ScrollArea$1 as ScrollArea };
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
2
|
import ScrollArea_module_default from "./ScrollArea.module.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
5
4
|
import { forwardRef } from "react";
|
|
6
|
-
import {
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { ScrollArea, useScrollArea } from "@ark-ui/react/scroll-area";
|
|
7
7
|
//#region src/components/scroll-area/ScrollArea.tsx
|
|
8
|
-
const ScrollAreaRoot = forwardRef(function ScrollAreaRoot({ className, fade, ...props }, ref) {
|
|
8
|
+
const ScrollAreaRoot = forwardRef(function ScrollAreaRoot({ className, fade, variant = "hover", ...props }, ref) {
|
|
9
9
|
return /* @__PURE__ */ jsx(ScrollArea.Root, {
|
|
10
10
|
ref,
|
|
11
11
|
"data-slot": "scroll-area-root",
|
|
12
12
|
"data-fade": fade ? "" : void 0,
|
|
13
|
+
"data-variant": variant,
|
|
13
14
|
className: clsx(ScrollArea_module_default.root, normalizeClassName(className)),
|
|
14
15
|
...props
|
|
15
16
|
});
|
|
16
17
|
});
|
|
17
|
-
const ScrollAreaRootProvider = forwardRef(function ScrollAreaRootProvider({ className, fade, ...props }, ref) {
|
|
18
|
+
const ScrollAreaRootProvider = forwardRef(function ScrollAreaRootProvider({ className, fade, variant = "hover", ...props }, ref) {
|
|
18
19
|
return /* @__PURE__ */ jsx(ScrollArea.RootProvider, {
|
|
19
20
|
ref,
|
|
20
21
|
"data-slot": "scroll-area-root-provider",
|
|
21
22
|
"data-fade": fade ? "" : void 0,
|
|
23
|
+
"data-variant": variant,
|
|
22
24
|
className: clsx(ScrollArea_module_default.root, normalizeClassName(className)),
|
|
23
25
|
...props
|
|
24
26
|
});
|
|
@@ -70,7 +72,8 @@ const ScrollArea$1 = Object.assign(ScrollAreaRoot, {
|
|
|
70
72
|
Content: ScrollAreaContent,
|
|
71
73
|
Scrollbar: ScrollAreaScrollbar,
|
|
72
74
|
Thumb: ScrollAreaThumb,
|
|
73
|
-
Corner: ScrollAreaCorner
|
|
75
|
+
Corner: ScrollAreaCorner,
|
|
76
|
+
useScrollArea
|
|
74
77
|
});
|
|
75
78
|
//#endregion
|
|
76
|
-
export { ScrollArea$1 as ScrollArea };
|
|
79
|
+
export { ScrollArea$1 as ScrollArea, useScrollArea };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import './ScrollArea.css';
|
|
2
2
|
//#region src/components/scroll-area/ScrollArea.module.css
|
|
3
3
|
var ScrollArea_module_default = {
|
|
4
|
-
"content": "
|
|
5
|
-
"corner": "
|
|
6
|
-
"root": "
|
|
7
|
-
"scrollbar": "
|
|
8
|
-
"thumb": "
|
|
9
|
-
"viewport": "
|
|
4
|
+
"content": "xqtLha_content",
|
|
5
|
+
"corner": "xqtLha_corner",
|
|
6
|
+
"root": "xqtLha_root",
|
|
7
|
+
"scrollbar": "xqtLha_scrollbar",
|
|
8
|
+
"thumb": "xqtLha_thumb",
|
|
9
|
+
"viewport": "xqtLha_viewport"
|
|
10
10
|
};
|
|
11
11
|
//#endregion
|
|
12
12
|
export { ScrollArea_module_default as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
@layer ui.components {
|
|
2
|
-
.
|
|
2
|
+
._3r0tBa_root {
|
|
3
3
|
box-sizing: border-box;
|
|
4
4
|
isolation: isolate;
|
|
5
5
|
max-width: var(--segment-group-max-width, 100%);
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
.
|
|
31
|
+
._3r0tBa_label {
|
|
32
32
|
z-index: 1;
|
|
33
33
|
color: var(--segment-group-label-color, var(--segment-group-color, var(--color-foreground)));
|
|
34
34
|
font-size: var(--segment-group-label-font-size, var(--text-sm));
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
position: relative;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
.
|
|
41
|
+
._3r0tBa_item {
|
|
42
42
|
box-sizing: border-box;
|
|
43
43
|
z-index: 1;
|
|
44
44
|
justify-content: center;
|
|
@@ -94,16 +94,16 @@
|
|
|
94
94
|
}
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
.
|
|
97
|
+
._3r0tBa_itemControl {
|
|
98
98
|
display: none;
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
.
|
|
101
|
+
._3r0tBa_itemText {
|
|
102
102
|
z-index: 1;
|
|
103
103
|
position: relative;
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
.
|
|
106
|
+
._3r0tBa_indicator {
|
|
107
107
|
--transition-duration: var(--segment-group-indicator-transition-duration, var(--duration-normal));
|
|
108
108
|
--transition-timing-function: var(--segment-group-indicator-transition-timing-function, var(--ease-in-out));
|
|
109
109
|
z-index: 0;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { SegmentGroup, useSegmentGroup } from "@ark-ui/react/segment-group";
|
|
2
3
|
|
|
3
4
|
//#region src/components/segment-group/SegmentGroup.d.ts
|
|
5
|
+
declare function SegmentGroupItems({
|
|
6
|
+
items
|
|
7
|
+
}: {
|
|
8
|
+
items: readonly {
|
|
9
|
+
value: string;
|
|
10
|
+
label: ReactNode;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}[];
|
|
13
|
+
}): import("react").JSX.Element[];
|
|
4
14
|
declare const SegmentGroup$1: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
5
15
|
Root: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
16
|
RootProvider: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -8,8 +18,8 @@ declare const SegmentGroup$1: import("react").ForwardRefExoticComponent<Omit<Seg
|
|
|
8
18
|
Item: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.ItemProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
9
19
|
ItemControl: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.ItemControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
20
|
ItemText: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.ItemTextProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
11
|
-
ItemHiddenInput: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.ItemHiddenInputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
12
21
|
Indicator: import("react").ForwardRefExoticComponent<Omit<SegmentGroup.IndicatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
Items: typeof SegmentGroupItems;
|
|
13
23
|
};
|
|
14
24
|
//#endregion
|
|
15
|
-
export { SegmentGroup$1 as SegmentGroup };
|
|
25
|
+
export { SegmentGroup$1 as SegmentGroup, useSegmentGroup };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
2
|
import SegmentGroup_module_default from "./SegmentGroup.module.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
|
-
import {
|
|
4
|
+
import { Children, cloneElement, forwardRef } from "react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { SegmentGroup, useSegmentGroup } from "@ark-ui/react/segment-group";
|
|
7
7
|
//#region src/components/segment-group/SegmentGroup.tsx
|
|
8
8
|
const SegmentGroupRoot = forwardRef(function SegmentGroupRoot({ className, orientation = "horizontal", ...props }, ref) {
|
|
9
9
|
return /* @__PURE__ */ jsx(SegmentGroup.Root, {
|
|
@@ -30,12 +30,14 @@ const SegmentGroupLabel = forwardRef(function SegmentGroupLabel({ className, ...
|
|
|
30
30
|
...props
|
|
31
31
|
});
|
|
32
32
|
});
|
|
33
|
-
const SegmentGroupItem = forwardRef(function SegmentGroupItem({ className, ...props }, ref) {
|
|
33
|
+
const SegmentGroupItem = forwardRef(function SegmentGroupItem({ asChild, children, className, ...props }, ref) {
|
|
34
34
|
return /* @__PURE__ */ jsx(SegmentGroup.Item, {
|
|
35
35
|
ref,
|
|
36
|
+
asChild,
|
|
36
37
|
"data-slot": "segment-group-item",
|
|
37
38
|
className: clsx(SegmentGroup_module_default.item, normalizeClassName(className)),
|
|
38
|
-
...props
|
|
39
|
+
...props,
|
|
40
|
+
children: withItemHiddenInput(children, asChild)
|
|
39
41
|
});
|
|
40
42
|
});
|
|
41
43
|
const SegmentGroupItemControl = forwardRef(function SegmentGroupItemControl({ className, ...props }, ref) {
|
|
@@ -54,13 +56,12 @@ const SegmentGroupItemText = forwardRef(function SegmentGroupItemText({ classNam
|
|
|
54
56
|
...props
|
|
55
57
|
});
|
|
56
58
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
});
|
|
59
|
+
function withItemHiddenInput(children, asChild) {
|
|
60
|
+
const hiddenInput = /* @__PURE__ */ jsx(SegmentGroup.ItemHiddenInput, { "data-slot": "segment-group-item-hidden-input" });
|
|
61
|
+
if (!asChild) return /* @__PURE__ */ jsxs(Fragment$1, { children: [children, hiddenInput] });
|
|
62
|
+
const child = Children.only(children);
|
|
63
|
+
return cloneElement(child, {}, child.props.children, hiddenInput);
|
|
64
|
+
}
|
|
64
65
|
const SegmentGroupIndicator = forwardRef(function SegmentGroupIndicator({ className, ...props }, ref) {
|
|
65
66
|
return /* @__PURE__ */ jsx(SegmentGroup.Indicator, {
|
|
66
67
|
ref,
|
|
@@ -69,6 +70,13 @@ const SegmentGroupIndicator = forwardRef(function SegmentGroupIndicator({ classN
|
|
|
69
70
|
...props
|
|
70
71
|
});
|
|
71
72
|
});
|
|
73
|
+
function SegmentGroupItems({ items }) {
|
|
74
|
+
return items.map(({ value, label, disabled }) => /* @__PURE__ */ jsxs(SegmentGroupItem, {
|
|
75
|
+
value,
|
|
76
|
+
disabled,
|
|
77
|
+
children: [/* @__PURE__ */ jsx(SegmentGroupItemText, { children: label }), /* @__PURE__ */ jsx(SegmentGroupItemControl, {})]
|
|
78
|
+
}, value));
|
|
79
|
+
}
|
|
72
80
|
const SegmentGroup$1 = Object.assign(SegmentGroupRoot, {
|
|
73
81
|
Root: SegmentGroupRoot,
|
|
74
82
|
RootProvider: SegmentGroupRootProvider,
|
|
@@ -76,8 +84,8 @@ const SegmentGroup$1 = Object.assign(SegmentGroupRoot, {
|
|
|
76
84
|
Item: SegmentGroupItem,
|
|
77
85
|
ItemControl: SegmentGroupItemControl,
|
|
78
86
|
ItemText: SegmentGroupItemText,
|
|
79
|
-
|
|
80
|
-
|
|
87
|
+
Indicator: SegmentGroupIndicator,
|
|
88
|
+
Items: SegmentGroupItems
|
|
81
89
|
});
|
|
82
90
|
//#endregion
|
|
83
|
-
export { SegmentGroup$1 as SegmentGroup };
|
|
91
|
+
export { SegmentGroup$1 as SegmentGroup, useSegmentGroup };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import './SegmentGroup.css';
|
|
2
2
|
//#region src/components/segment-group/SegmentGroup.module.css
|
|
3
3
|
var SegmentGroup_module_default = {
|
|
4
|
-
"indicator": "
|
|
5
|
-
"item": "
|
|
6
|
-
"itemControl": "
|
|
7
|
-
"itemText": "
|
|
8
|
-
"label": "
|
|
9
|
-
"root": "
|
|
4
|
+
"indicator": "_3r0tBa_indicator",
|
|
5
|
+
"item": "_3r0tBa_item",
|
|
6
|
+
"itemControl": "_3r0tBa_itemControl",
|
|
7
|
+
"itemText": "_3r0tBa_itemText",
|
|
8
|
+
"label": "_3r0tBa_label",
|
|
9
|
+
"root": "_3r0tBa_root"
|
|
10
10
|
};
|
|
11
11
|
//#endregion
|
|
12
12
|
export { SegmentGroup_module_default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SegmentGroup } from "./SegmentGroup.js";
|
|
2
|
-
export { SegmentGroup };
|
|
1
|
+
import { SegmentGroup, useSegmentGroup } from "./SegmentGroup.js";
|
|
2
|
+
export { SegmentGroup, useSegmentGroup };
|