@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,8 +1,10 @@
|
|
|
1
1
|
@layer ui.components {
|
|
2
|
-
@keyframes
|
|
2
|
+
@keyframes mcW7mG_combobox-content-open {
|
|
3
3
|
from {
|
|
4
|
-
opacity: var(--combobox-content-closed-opacity, 0);
|
|
5
|
-
|
|
4
|
+
opacity: var(--combobox-content-closed-opacity, var(--popup-motion-starting-opacity, 0));
|
|
5
|
+
translate: var(--popup-motion-starting-translate-x, 0)
|
|
6
|
+
var(--popup-motion-starting-translate-y, 0);
|
|
7
|
+
transform: scale(var(--combobox-content-closed-scale, var(--popup-motion-starting-scale, var(--scale-popup))));
|
|
6
8
|
}
|
|
7
9
|
|
|
8
10
|
to {
|
|
@@ -11,19 +13,20 @@
|
|
|
11
13
|
}
|
|
12
14
|
}
|
|
13
15
|
|
|
14
|
-
@keyframes
|
|
16
|
+
@keyframes mcW7mG_combobox-content-closed {
|
|
15
17
|
from {
|
|
16
18
|
opacity: 1;
|
|
17
19
|
transform: scale(1);
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
to {
|
|
21
|
-
opacity: var(--combobox-content-closed-opacity, 0);
|
|
22
|
-
|
|
23
|
+
opacity: var(--combobox-content-closed-opacity, var(--popup-motion-ending-opacity, 0));
|
|
24
|
+
translate: var(--popup-motion-ending-translate-x, 0) var(--popup-motion-ending-translate-y, 0);
|
|
25
|
+
transform: scale(var(--combobox-content-closed-scale, var(--popup-motion-ending-scale, var(--scale-popup))));
|
|
23
26
|
}
|
|
24
27
|
}
|
|
25
28
|
|
|
26
|
-
.
|
|
29
|
+
.mcW7mG_root {
|
|
27
30
|
box-sizing: border-box;
|
|
28
31
|
width: var(--combobox-width, 16rem);
|
|
29
32
|
max-width: var(--combobox-max-width, 100%);
|
|
@@ -34,7 +37,7 @@
|
|
|
34
37
|
display: flex;
|
|
35
38
|
}
|
|
36
39
|
|
|
37
|
-
.
|
|
40
|
+
.mcW7mG_label {
|
|
38
41
|
color: var(--combobox-label-color, var(--combobox-color, var(--color-foreground)));
|
|
39
42
|
font-size: var(--combobox-label-font-size, var(--text-sm));
|
|
40
43
|
font-weight: var(--combobox-label-font-weight, var(--weight-medium));
|
|
@@ -48,7 +51,7 @@
|
|
|
48
51
|
}
|
|
49
52
|
}
|
|
50
53
|
|
|
51
|
-
.
|
|
54
|
+
.mcW7mG_control {
|
|
52
55
|
border: var(--combobox-border-width, var(--border-width-sm)) solid
|
|
53
56
|
var(--combobox-border-color, var(--color-border));
|
|
54
57
|
border-radius: var(--combobox-radius, var(--radius-md));
|
|
@@ -87,21 +90,21 @@
|
|
|
87
90
|
|
|
88
91
|
&:not([data-disabled]) {
|
|
89
92
|
@media (hover: hover) {
|
|
90
|
-
&:hover:not(:has(.
|
|
93
|
+
&:hover:not(:has(.mcW7mG_clearTrigger:hover)) {
|
|
91
94
|
background-color: var(--combobox-bg-hover, var(--color-accent));
|
|
92
95
|
}
|
|
93
96
|
}
|
|
94
97
|
}
|
|
95
98
|
}
|
|
96
99
|
|
|
97
|
-
.
|
|
100
|
+
.mcW7mG_input {
|
|
98
101
|
box-sizing: border-box;
|
|
99
102
|
width: 100%;
|
|
100
103
|
min-width: 0;
|
|
101
104
|
height: var(--combobox-control-height, var(--size-lg));
|
|
102
105
|
border-radius: inherit;
|
|
103
106
|
padding-inline: var(--combobox-input-padding-x-start, .875rem)
|
|
104
|
-
var(--combobox-input-padding-x-end,
|
|
107
|
+
var(--combobox-input-padding-x-end, .875rem);
|
|
105
108
|
color: inherit;
|
|
106
109
|
font: inherit;
|
|
107
110
|
background: none;
|
|
@@ -114,7 +117,15 @@
|
|
|
114
117
|
}
|
|
115
118
|
}
|
|
116
119
|
|
|
117
|
-
.
|
|
120
|
+
.mcW7mG_control:has(.mcW7mG_trigger) .mcW7mG_input {
|
|
121
|
+
padding-inline-end: var(--combobox-input-padding-x-end-with-trigger, 2.75rem);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.mcW7mG_control:has(.mcW7mG_clearTrigger) .mcW7mG_input {
|
|
125
|
+
padding-inline-end: var(--combobox-input-padding-x-end-with-clear, 4.375rem);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.mcW7mG_trigger {
|
|
118
129
|
box-sizing: border-box;
|
|
119
130
|
width: var(--combobox-action-size, 1.5rem);
|
|
120
131
|
height: var(--combobox-action-size, 1.5rem);
|
|
@@ -163,21 +174,35 @@
|
|
|
163
174
|
}
|
|
164
175
|
}
|
|
165
176
|
|
|
166
|
-
.
|
|
177
|
+
.mcW7mG_trigger {
|
|
167
178
|
right: var(--combobox-action-offset-right, .5rem);
|
|
168
179
|
}
|
|
169
180
|
|
|
170
|
-
.
|
|
181
|
+
.mcW7mG_clearTrigger {
|
|
182
|
+
--close-button-size: var(--combobox-action-size, 1.5rem);
|
|
183
|
+
--close-button-icon-size: var(--combobox-icon-size, 1rem);
|
|
184
|
+
--close-button-radius: var(--combobox-action-radius, var(--radius-sm));
|
|
185
|
+
--close-button-bg: var(--combobox-action-bg, transparent);
|
|
186
|
+
--close-button-bg-hover: var(--combobox-action-bg-hover, var(--color-muted));
|
|
187
|
+
--close-button-color: var(--combobox-icon-color, var(--color-muted-foreground));
|
|
188
|
+
--close-button-color-hover: var(--combobox-action-color-hover, var(--color-foreground));
|
|
189
|
+
--close-button-focus-ring-width: var(--combobox-focus-ring-width, var(--border-width-sm));
|
|
190
|
+
--close-button-focus-ring-color: var(--combobox-focus-ring-color, var(--color-ring));
|
|
191
|
+
--close-button-focus-ring-offset: var(--combobox-focus-ring-offset, var(--border-width-sm));
|
|
192
|
+
--close-button-transition: var(--combobox-transition, var(--transition-default));
|
|
193
|
+
top: 50%;
|
|
171
194
|
right: calc(var(--combobox-action-offset-right, .5rem) + var(--combobox-action-size, 1.5rem) +
|
|
172
195
|
var(--combobox-action-gap, .125rem));
|
|
196
|
+
position: absolute;
|
|
197
|
+
transform: translateY(-50%);
|
|
173
198
|
}
|
|
174
199
|
|
|
175
|
-
.
|
|
200
|
+
.mcW7mG_positioner {
|
|
176
201
|
z-index: var(--z-index);
|
|
177
202
|
outline: 0;
|
|
178
203
|
}
|
|
179
204
|
|
|
180
|
-
.
|
|
205
|
+
.mcW7mG_content {
|
|
181
206
|
box-sizing: border-box;
|
|
182
207
|
z-index: calc(var(--z-popup) + var(--layer-index, 0));
|
|
183
208
|
min-width: var(--reference-width);
|
|
@@ -199,15 +224,19 @@
|
|
|
199
224
|
overflow: auto;
|
|
200
225
|
|
|
201
226
|
&[data-state="open"] {
|
|
202
|
-
animation:
|
|
227
|
+
animation: mcW7mG_combobox-content-open
|
|
228
|
+
var(--combobox-transition, var(--popup-motion-duration, var(--duration-normal))
|
|
229
|
+
var(--popup-motion-easing, var(--ease-in-out)));
|
|
203
230
|
}
|
|
204
231
|
|
|
205
232
|
&[data-state="closed"] {
|
|
206
|
-
animation:
|
|
233
|
+
animation: mcW7mG_combobox-content-closed
|
|
234
|
+
var(--combobox-transition, var(--popup-motion-duration, var(--duration-normal))
|
|
235
|
+
var(--popup-motion-easing, var(--ease-in-out)));
|
|
207
236
|
}
|
|
208
237
|
}
|
|
209
238
|
|
|
210
|
-
.
|
|
239
|
+
.mcW7mG_list {
|
|
211
240
|
overscroll-behavior: contain;
|
|
212
241
|
min-height: 0;
|
|
213
242
|
scroll-padding-block: var(--combobox-content-padding-y, var(--spacing-1));
|
|
@@ -221,7 +250,7 @@
|
|
|
221
250
|
}
|
|
222
251
|
}
|
|
223
252
|
|
|
224
|
-
.
|
|
253
|
+
.mcW7mG_empty {
|
|
225
254
|
padding-block: var(--combobox-empty-padding-y, .75rem);
|
|
226
255
|
padding-inline: var(--combobox-empty-padding-x, 1rem);
|
|
227
256
|
color: var(--combobox-empty-color, var(--color-muted-foreground));
|
|
@@ -229,7 +258,7 @@
|
|
|
229
258
|
line-height: var(--combobox-empty-line-height, var(--line-height-text-sm));
|
|
230
259
|
}
|
|
231
260
|
|
|
232
|
-
.
|
|
261
|
+
.mcW7mG_itemGroup {
|
|
233
262
|
flex-direction: column;
|
|
234
263
|
display: flex;
|
|
235
264
|
|
|
@@ -238,7 +267,7 @@
|
|
|
238
267
|
}
|
|
239
268
|
}
|
|
240
269
|
|
|
241
|
-
.
|
|
270
|
+
.mcW7mG_itemGroupLabel {
|
|
242
271
|
z-index: 1;
|
|
243
272
|
padding-block: var(--combobox-item-group-label-padding-y, .35rem);
|
|
244
273
|
padding-inline: var(--combobox-item-group-label-padding-x, .625rem);
|
|
@@ -251,7 +280,7 @@
|
|
|
251
280
|
top: 0;
|
|
252
281
|
}
|
|
253
282
|
|
|
254
|
-
.
|
|
283
|
+
.mcW7mG_item {
|
|
255
284
|
box-sizing: border-box;
|
|
256
285
|
width: calc(100% - var(--combobox-item-inset-x, var(--spacing-2)));
|
|
257
286
|
min-height: var(--combobox-item-min-height, 2rem);
|
|
@@ -291,7 +320,7 @@
|
|
|
291
320
|
}
|
|
292
321
|
}
|
|
293
322
|
|
|
294
|
-
.
|
|
323
|
+
.mcW7mG_itemText {
|
|
295
324
|
text-overflow: ellipsis;
|
|
296
325
|
white-space: nowrap;
|
|
297
326
|
flex: 1;
|
|
@@ -299,7 +328,7 @@
|
|
|
299
328
|
overflow: hidden;
|
|
300
329
|
}
|
|
301
330
|
|
|
302
|
-
.
|
|
331
|
+
.mcW7mG_itemIndicator {
|
|
303
332
|
width: var(--combobox-item-indicator-size, .75rem);
|
|
304
333
|
height: var(--combobox-item-indicator-size, .75rem);
|
|
305
334
|
flex-shrink: 0;
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { OverlayPortalProps } from "../../lib/moduix/overlayPortal.js";
|
|
2
|
-
import {
|
|
2
|
+
import { ComponentProps, ReactNode } from "react";
|
|
3
|
+
import { Combobox, useCombobox, useComboboxContext } from "@ark-ui/react/combobox";
|
|
3
4
|
|
|
4
5
|
//#region src/components/combobox/Combobox.d.ts
|
|
6
|
+
type ComboboxOptionProps = Omit<ComponentProps<typeof Combobox.Item>, 'asChild' | 'children'> & {
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
indicator?: ReactNode | false;
|
|
9
|
+
};
|
|
5
10
|
declare const Combobox$1: Combobox.RootComponent<OverlayPortalProps> & {
|
|
6
11
|
Root: Combobox.RootComponent<OverlayPortalProps>;
|
|
7
12
|
RootProvider: Combobox.RootProviderComponent<OverlayPortalProps>;
|
|
@@ -19,6 +24,8 @@ declare const Combobox$1: Combobox.RootComponent<OverlayPortalProps> & {
|
|
|
19
24
|
Item: import("react").ForwardRefExoticComponent<Omit<Combobox.ItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
25
|
ItemText: import("react").ForwardRefExoticComponent<Omit<Combobox.ItemTextProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
26
|
ItemIndicator: import("react").ForwardRefExoticComponent<Omit<Combobox.ItemIndicatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
27
|
+
Option: import("react").ForwardRefExoticComponent<Omit<ComboboxOptionProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
Context: <T extends unknown>(props: Combobox.ContextProps<T>) => ReactNode;
|
|
22
29
|
};
|
|
23
30
|
//#endregion
|
|
24
|
-
export { Combobox$1 as Combobox };
|
|
31
|
+
export { Combobox$1 as Combobox, useCombobox, useComboboxContext };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { CheckIcon, ChevronUpDownIcon, CloseIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
2
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
|
+
import { CheckIcon, ChevronUpDownIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
3
|
+
import { CloseButton } from "../close-button/CloseButton.js";
|
|
3
4
|
import { OverlayPortal, OverlayPortalProvider } from "../../lib/moduix/overlayPortal.js";
|
|
4
5
|
import Combobox_module_default from "./Combobox.module.js";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import { clsx } from "clsx";
|
|
7
7
|
import { forwardRef } from "react";
|
|
8
|
-
import {
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Combobox, useCombobox, useComboboxContext } from "@ark-ui/react/combobox";
|
|
9
10
|
//#region src/components/combobox/Combobox.tsx
|
|
10
11
|
const ComboboxRoot = forwardRef(function ComboboxRoot({ className, portalled, portalRef, ...props }, ref) {
|
|
11
12
|
return /* @__PURE__ */ jsx(OverlayPortalProvider, {
|
|
@@ -56,13 +57,29 @@ const ComboboxInput = forwardRef(function ComboboxInput({ asChild, className, ..
|
|
|
56
57
|
...props
|
|
57
58
|
});
|
|
58
59
|
});
|
|
59
|
-
const ComboboxClearTrigger = forwardRef(function ComboboxClearTrigger({ className, children, ...props }, ref) {
|
|
60
|
+
const ComboboxClearTrigger = forwardRef(function ComboboxClearTrigger({ asChild, className, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }, ref) {
|
|
61
|
+
const triggerClassName = clsx(Combobox_module_default.clearTrigger, normalizeClassName(className));
|
|
62
|
+
if (asChild) return /* @__PURE__ */ jsx(Combobox.ClearTrigger, {
|
|
63
|
+
ref,
|
|
64
|
+
asChild: true,
|
|
65
|
+
"data-slot": "combobox-clear-trigger",
|
|
66
|
+
className: triggerClassName,
|
|
67
|
+
"aria-label": ariaLabel,
|
|
68
|
+
"aria-labelledby": ariaLabelledBy,
|
|
69
|
+
...props,
|
|
70
|
+
children
|
|
71
|
+
});
|
|
60
72
|
return /* @__PURE__ */ jsx(Combobox.ClearTrigger, {
|
|
61
73
|
ref,
|
|
74
|
+
asChild: true,
|
|
62
75
|
"data-slot": "combobox-clear-trigger",
|
|
63
|
-
className:
|
|
76
|
+
className: triggerClassName,
|
|
64
77
|
...props,
|
|
65
|
-
children:
|
|
78
|
+
children: /* @__PURE__ */ jsx(CloseButton.Root, {
|
|
79
|
+
"aria-label": ariaLabel ?? (ariaLabelledBy == null ? "Clear selection" : void 0),
|
|
80
|
+
"aria-labelledby": ariaLabelledBy,
|
|
81
|
+
children
|
|
82
|
+
})
|
|
66
83
|
});
|
|
67
84
|
});
|
|
68
85
|
const ComboboxTrigger = forwardRef(function ComboboxTrigger({ className, children, ...props }, ref) {
|
|
@@ -147,6 +164,13 @@ const ComboboxItemIndicator = forwardRef(function ComboboxItemIndicator({ classN
|
|
|
147
164
|
children: children ?? /* @__PURE__ */ jsx(CheckIcon, {})
|
|
148
165
|
});
|
|
149
166
|
});
|
|
167
|
+
const ComboboxOption = forwardRef(function ComboboxOption({ children, indicator, ...props }, ref) {
|
|
168
|
+
return /* @__PURE__ */ jsxs(ComboboxItem, {
|
|
169
|
+
ref,
|
|
170
|
+
...props,
|
|
171
|
+
children: [/* @__PURE__ */ jsx(ComboboxItemText, { children }), indicator !== false ? /* @__PURE__ */ jsx(ComboboxItemIndicator, { children: indicator }) : null]
|
|
172
|
+
});
|
|
173
|
+
});
|
|
150
174
|
const Combobox$1 = Object.assign(ComboboxRoot, {
|
|
151
175
|
Root: ComboboxRoot,
|
|
152
176
|
RootProvider: ComboboxRootProvider,
|
|
@@ -163,7 +187,9 @@ const Combobox$1 = Object.assign(ComboboxRoot, {
|
|
|
163
187
|
ItemGroupLabel: ComboboxItemGroupLabel,
|
|
164
188
|
Item: ComboboxItem,
|
|
165
189
|
ItemText: ComboboxItemText,
|
|
166
|
-
ItemIndicator: ComboboxItemIndicator
|
|
190
|
+
ItemIndicator: ComboboxItemIndicator,
|
|
191
|
+
Option: ComboboxOption,
|
|
192
|
+
Context: Combobox.Context
|
|
167
193
|
});
|
|
168
194
|
//#endregion
|
|
169
|
-
export { Combobox$1 as Combobox };
|
|
195
|
+
export { Combobox$1 as Combobox, useCombobox, useComboboxContext };
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import './Combobox.css';
|
|
2
2
|
//#region src/components/combobox/Combobox.module.css
|
|
3
3
|
var Combobox_module_default = {
|
|
4
|
-
"clearTrigger": "
|
|
5
|
-
"combobox-content-closed": "
|
|
6
|
-
"combobox-content-open": "
|
|
7
|
-
"content": "
|
|
8
|
-
"control": "
|
|
9
|
-
"empty": "
|
|
10
|
-
"input": "
|
|
11
|
-
"item": "
|
|
12
|
-
"itemGroup": "
|
|
13
|
-
"itemGroupLabel": "
|
|
14
|
-
"itemIndicator": "
|
|
15
|
-
"itemText": "
|
|
16
|
-
"label": "
|
|
17
|
-
"list": "
|
|
18
|
-
"positioner": "
|
|
19
|
-
"root": "
|
|
20
|
-
"trigger": "
|
|
4
|
+
"clearTrigger": "mcW7mG_clearTrigger",
|
|
5
|
+
"combobox-content-closed": "mcW7mG_combobox-content-closed",
|
|
6
|
+
"combobox-content-open": "mcW7mG_combobox-content-open",
|
|
7
|
+
"content": "mcW7mG_content",
|
|
8
|
+
"control": "mcW7mG_control",
|
|
9
|
+
"empty": "mcW7mG_empty",
|
|
10
|
+
"input": "mcW7mG_input",
|
|
11
|
+
"item": "mcW7mG_item",
|
|
12
|
+
"itemGroup": "mcW7mG_itemGroup",
|
|
13
|
+
"itemGroupLabel": "mcW7mG_itemGroupLabel",
|
|
14
|
+
"itemIndicator": "mcW7mG_itemIndicator",
|
|
15
|
+
"itemText": "mcW7mG_itemText",
|
|
16
|
+
"label": "mcW7mG_label",
|
|
17
|
+
"list": "mcW7mG_list",
|
|
18
|
+
"positioner": "mcW7mG_positioner",
|
|
19
|
+
"root": "mcW7mG_root",
|
|
20
|
+
"trigger": "mcW7mG_trigger"
|
|
21
21
|
};
|
|
22
22
|
//#endregion
|
|
23
23
|
export { Combobox_module_default as default };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Combobox } from "./Combobox.js";
|
|
2
|
-
export { Combobox };
|
|
1
|
+
import { Combobox, useCombobox, useComboboxContext } from "./Combobox.js";
|
|
2
|
+
export { Combobox, useCombobox, useComboboxContext };
|