@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
|
+
._3sukta_root {
|
|
3
3
|
--splitter-width: var(--sidebar-width, 100%);
|
|
4
4
|
--splitter-height: var(--sidebar-height, 100dvh);
|
|
5
5
|
--splitter-min-height: var(--sidebar-min-height, 24rem);
|
|
@@ -11,38 +11,36 @@
|
|
|
11
11
|
--splitter-panel-padding: 0;
|
|
12
12
|
--splitter-panel-min-height: 0;
|
|
13
13
|
--splitter-resize-trigger-line-color: var(--sidebar-border-color, var(--color-border));
|
|
14
|
-
--splitter-resize-trigger-line-color-hover: var(--sidebar-resize-color-hover, color-mix(in oklab, var(--color-border) 72%, var(--color-muted-foreground)));
|
|
15
|
-
--splitter-resize-trigger-line-color-focus: var(--sidebar-resize-color-focus, color-mix(in oklab, var(--color-border) 72%, var(--color-muted-foreground)));
|
|
16
|
-
--splitter-resize-trigger-line-color-dragging: var(--sidebar-resize-color-dragging, color-mix(in oklab, var(--color-border) 72%, var(--color-muted-foreground)));
|
|
17
14
|
--splitter-resize-trigger-size: var(--sidebar-resize-hit-area, .75rem);
|
|
18
15
|
isolation: isolate;
|
|
19
16
|
}
|
|
20
17
|
|
|
21
|
-
.
|
|
18
|
+
._3sukta_panel {
|
|
22
19
|
background-color: var(--sidebar-bg, var(--color-card));
|
|
23
20
|
color: var(--sidebar-color, var(--color-card-foreground));
|
|
24
21
|
transition: background-color var(--sidebar-transition, var(--transition-default)),
|
|
25
22
|
color var(--sidebar-transition, var(--transition-default));
|
|
26
23
|
flex-direction: column;
|
|
27
24
|
display: flex;
|
|
25
|
+
position: relative;
|
|
28
26
|
overflow: hidden;
|
|
29
27
|
|
|
30
28
|
&[data-state="collapsed"] {
|
|
31
|
-
& .
|
|
29
|
+
& ._3sukta_header, & ._3sukta_footer, & ._3sukta_group {
|
|
32
30
|
padding-inline: var(--sidebar-collapsed-padding-x, var(--spacing-1));
|
|
33
31
|
}
|
|
34
32
|
|
|
35
|
-
& .
|
|
33
|
+
& ._3sukta_header, & ._3sukta_footer {
|
|
36
34
|
justify-content: center;
|
|
37
35
|
}
|
|
38
36
|
|
|
39
|
-
& .
|
|
37
|
+
& ._3sukta_content {
|
|
40
38
|
scrollbar-gutter: auto;
|
|
41
39
|
scrollbar-width: none;
|
|
42
|
-
overflow: hidden;
|
|
40
|
+
overflow: hidden auto;
|
|
43
41
|
}
|
|
44
42
|
|
|
45
|
-
& .
|
|
43
|
+
& ._3sukta_label, & ._3sukta_groupLabel {
|
|
46
44
|
white-space: nowrap;
|
|
47
45
|
clip-path: inset(50%);
|
|
48
46
|
border: 0;
|
|
@@ -54,11 +52,11 @@
|
|
|
54
52
|
overflow: hidden;
|
|
55
53
|
}
|
|
56
54
|
|
|
57
|
-
& .
|
|
55
|
+
& ._3sukta_menuSub, & ._3sukta_groupAction, & ._3sukta_menuAction, & ._3sukta_menuBadge {
|
|
58
56
|
display: none;
|
|
59
57
|
}
|
|
60
58
|
|
|
61
|
-
& .
|
|
59
|
+
& ._3sukta_menuButton {
|
|
62
60
|
width: var(--sidebar-collapsed-item-size, var(--size-md));
|
|
63
61
|
min-height: var(--sidebar-collapsed-item-size, var(--size-md));
|
|
64
62
|
box-shadow: none;
|
|
@@ -85,7 +83,7 @@
|
|
|
85
83
|
}
|
|
86
84
|
}
|
|
87
85
|
|
|
88
|
-
.
|
|
86
|
+
._3sukta_inset {
|
|
89
87
|
background-color: var(--sidebar-inset-bg, var(--color-background));
|
|
90
88
|
min-width: 0;
|
|
91
89
|
color: var(--sidebar-inset-color, var(--color-foreground));
|
|
@@ -93,11 +91,11 @@
|
|
|
93
91
|
overflow: auto;
|
|
94
92
|
}
|
|
95
93
|
|
|
96
|
-
.
|
|
94
|
+
._3sukta_resizeTrigger {
|
|
97
95
|
z-index: 2;
|
|
98
96
|
}
|
|
99
97
|
|
|
100
|
-
.
|
|
98
|
+
._3sukta_trigger {
|
|
101
99
|
box-sizing: border-box;
|
|
102
100
|
width: var(--sidebar-trigger-size, 1.75rem);
|
|
103
101
|
min-width: var(--sidebar-trigger-size, 1.75rem);
|
|
@@ -141,7 +139,7 @@
|
|
|
141
139
|
}
|
|
142
140
|
}
|
|
143
141
|
|
|
144
|
-
.
|
|
142
|
+
._3sukta_trigger {
|
|
145
143
|
z-index: 4;
|
|
146
144
|
margin-block-start: var(--sidebar-trigger-offset-y, var(--spacing-4));
|
|
147
145
|
margin-inline: calc(var(--sidebar-trigger-size, 1.75rem) * -.5);
|
|
@@ -162,11 +160,11 @@
|
|
|
162
160
|
}
|
|
163
161
|
}
|
|
164
162
|
|
|
165
|
-
.
|
|
163
|
+
._3sukta_label {
|
|
166
164
|
min-width: 0;
|
|
167
165
|
}
|
|
168
166
|
|
|
169
|
-
.
|
|
167
|
+
._3sukta_header, ._3sukta_footer {
|
|
170
168
|
align-items: center;
|
|
171
169
|
gap: var(--sidebar-gap, var(--spacing-2));
|
|
172
170
|
padding: var(--sidebar-header-footer-padding, var(--spacing-3));
|
|
@@ -174,17 +172,17 @@
|
|
|
174
172
|
display: flex;
|
|
175
173
|
}
|
|
176
174
|
|
|
177
|
-
.
|
|
175
|
+
._3sukta_header {
|
|
178
176
|
border-block-end: var(--sidebar-section-border-width, 0) solid
|
|
179
177
|
var(--sidebar-border-color, var(--color-border));
|
|
180
178
|
}
|
|
181
179
|
|
|
182
|
-
.
|
|
180
|
+
._3sukta_footer {
|
|
183
181
|
border-block-start: var(--sidebar-section-border-width, 0) solid
|
|
184
182
|
var(--sidebar-border-color, var(--color-border));
|
|
185
183
|
}
|
|
186
184
|
|
|
187
|
-
.
|
|
185
|
+
._3sukta_content {
|
|
188
186
|
overscroll-behavior: contain;
|
|
189
187
|
scrollbar-gutter: stable;
|
|
190
188
|
flex-direction: column;
|
|
@@ -194,15 +192,14 @@
|
|
|
194
192
|
overflow: auto;
|
|
195
193
|
}
|
|
196
194
|
|
|
197
|
-
.
|
|
195
|
+
._3sukta_group {
|
|
198
196
|
gap: var(--sidebar-group-gap, var(--spacing-1));
|
|
199
197
|
padding: var(--sidebar-group-padding, var(--spacing-3));
|
|
200
198
|
flex-direction: column;
|
|
201
199
|
display: flex;
|
|
202
|
-
position: relative;
|
|
203
200
|
}
|
|
204
201
|
|
|
205
|
-
.
|
|
202
|
+
._3sukta_groupLabel {
|
|
206
203
|
min-width: 0;
|
|
207
204
|
padding-inline: var(--sidebar-group-label-padding-x, var(--spacing-2));
|
|
208
205
|
color: var(--sidebar-muted-color, var(--color-muted-foreground));
|
|
@@ -213,7 +210,67 @@
|
|
|
213
210
|
margin: 0;
|
|
214
211
|
}
|
|
215
212
|
|
|
216
|
-
.
|
|
213
|
+
._3sukta_groupAction {
|
|
214
|
+
width: var(--sidebar-group-action-size, 1.5rem);
|
|
215
|
+
height: var(--sidebar-group-action-size, 1.5rem);
|
|
216
|
+
border-radius: var(--sidebar-menu-button-radius, var(--radius-md));
|
|
217
|
+
color: var(--sidebar-muted-color, var(--color-muted-foreground));
|
|
218
|
+
appearance: none;
|
|
219
|
+
cursor: pointer;
|
|
220
|
+
transition: background-color var(--sidebar-transition, var(--transition-default)),
|
|
221
|
+
color var(--sidebar-transition, var(--transition-default));
|
|
222
|
+
background-color: #0000;
|
|
223
|
+
border: 0;
|
|
224
|
+
justify-content: center;
|
|
225
|
+
align-items: center;
|
|
226
|
+
padding: 0;
|
|
227
|
+
display: inline-flex;
|
|
228
|
+
|
|
229
|
+
& > svg {
|
|
230
|
+
width: var(--sidebar-icon-size, 1rem);
|
|
231
|
+
height: var(--sidebar-icon-size, 1rem);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
&:focus-visible {
|
|
235
|
+
outline: var(--sidebar-focus-ring-width, var(--border-width-md)) solid
|
|
236
|
+
var(--sidebar-focus-ring-color, var(--color-ring));
|
|
237
|
+
outline-offset: var(--sidebar-focus-ring-offset, var(--spacing-1));
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
@media (hover: hover) {
|
|
241
|
+
&:hover {
|
|
242
|
+
background-color: var(--sidebar-accent-bg, var(--color-accent));
|
|
243
|
+
color: var(--sidebar-accent-color, var(--color-accent-foreground));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
._3sukta_group:has(._3sukta_groupAction) {
|
|
249
|
+
column-gap: var(--sidebar-gap, var(--spacing-2));
|
|
250
|
+
row-gap: var(--sidebar-group-gap, var(--spacing-1));
|
|
251
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
252
|
+
display: grid;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
._3sukta_group:has(._3sukta_groupAction) ._3sukta_groupLabel {
|
|
256
|
+
grid-column: 1;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
._3sukta_group:has(._3sukta_groupAction) ._3sukta_groupAction {
|
|
260
|
+
grid-column: 2;
|
|
261
|
+
align-self: center;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
._3sukta_groupContent {
|
|
265
|
+
width: 100%;
|
|
266
|
+
min-width: 0;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
._3sukta_group:has(._3sukta_groupAction) ._3sukta_groupContent {
|
|
270
|
+
grid-column: 1 / -1;
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
._3sukta_menu, ._3sukta_menuSub {
|
|
217
274
|
gap: var(--sidebar-menu-gap, var(--spacing-1));
|
|
218
275
|
flex-direction: column;
|
|
219
276
|
width: 100%;
|
|
@@ -224,12 +281,12 @@
|
|
|
224
281
|
display: flex;
|
|
225
282
|
}
|
|
226
283
|
|
|
227
|
-
.
|
|
284
|
+
._3sukta_menuItem, ._3sukta_menuSubItem {
|
|
228
285
|
min-width: 0;
|
|
229
286
|
position: relative;
|
|
230
287
|
}
|
|
231
288
|
|
|
232
|
-
.
|
|
289
|
+
._3sukta_menuButton, ._3sukta_menuSubButton {
|
|
233
290
|
box-sizing: border-box;
|
|
234
291
|
border: var(--sidebar-menu-button-border-width, 0) solid transparent;
|
|
235
292
|
border-radius: var(--sidebar-menu-button-radius, var(--radius-md));
|
|
@@ -291,7 +348,7 @@
|
|
|
291
348
|
}
|
|
292
349
|
}
|
|
293
350
|
|
|
294
|
-
.
|
|
351
|
+
._3sukta_menuButton {
|
|
295
352
|
gap: var(--sidebar-menu-button-gap, var(--spacing-2));
|
|
296
353
|
min-height: var(--sidebar-menu-button-height, var(--size-md));
|
|
297
354
|
padding-block: var(--sidebar-menu-button-padding-y, var(--spacing-1));
|
|
@@ -313,11 +370,83 @@
|
|
|
313
370
|
}
|
|
314
371
|
}
|
|
315
372
|
|
|
316
|
-
.
|
|
373
|
+
._3sukta_panel ._3sukta_menuButton {
|
|
317
374
|
justify-content: flex-start;
|
|
318
375
|
}
|
|
319
376
|
|
|
320
|
-
.
|
|
377
|
+
._3sukta_menuAction {
|
|
378
|
+
z-index: 1;
|
|
379
|
+
width: var(--sidebar-menu-action-size, 1.5rem);
|
|
380
|
+
height: var(--sidebar-menu-action-size, 1.5rem);
|
|
381
|
+
border-radius: var(--sidebar-menu-button-radius, var(--radius-md));
|
|
382
|
+
color: var(--sidebar-muted-color, var(--color-muted-foreground));
|
|
383
|
+
appearance: none;
|
|
384
|
+
cursor: pointer;
|
|
385
|
+
transition: background-color var(--sidebar-transition, var(--transition-default)),
|
|
386
|
+
color var(--sidebar-transition, var(--transition-default));
|
|
387
|
+
background-color: #0000;
|
|
388
|
+
border: 0;
|
|
389
|
+
justify-content: center;
|
|
390
|
+
align-items: center;
|
|
391
|
+
padding: 0;
|
|
392
|
+
display: inline-flex;
|
|
393
|
+
position: absolute;
|
|
394
|
+
inset-block-start: calc((var(--sidebar-menu-button-height, var(--size-md)) - var(--sidebar-menu-action-size, 1.5rem)) /
|
|
395
|
+
2);
|
|
396
|
+
inset-inline-end: var(--sidebar-menu-button-padding-x, var(--spacing-2));
|
|
397
|
+
|
|
398
|
+
& > svg {
|
|
399
|
+
width: var(--sidebar-icon-size, 1rem);
|
|
400
|
+
height: var(--sidebar-icon-size, 1rem);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
&:focus-visible {
|
|
404
|
+
outline: var(--sidebar-focus-ring-width, var(--border-width-md)) solid
|
|
405
|
+
var(--sidebar-focus-ring-color, var(--color-ring));
|
|
406
|
+
outline-offset: var(--sidebar-focus-ring-offset, var(--spacing-1));
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
@media (hover: hover) {
|
|
410
|
+
&:hover {
|
|
411
|
+
background-color: var(--sidebar-accent-bg, var(--color-accent));
|
|
412
|
+
color: var(--sidebar-accent-color, var(--color-accent-foreground));
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
._3sukta_menuBadge {
|
|
418
|
+
z-index: 1;
|
|
419
|
+
min-width: var(--sidebar-menu-badge-min-width, 1.5rem);
|
|
420
|
+
min-height: var(--sidebar-menu-badge-min-width, 1.5rem);
|
|
421
|
+
padding-inline: var(--sidebar-menu-badge-padding-x, var(--spacing-1));
|
|
422
|
+
border-radius: var(--radius-full);
|
|
423
|
+
background-color: var(--sidebar-accent-bg, var(--color-accent));
|
|
424
|
+
color: var(--sidebar-accent-color, var(--color-accent-foreground));
|
|
425
|
+
font-size: var(--text-xs);
|
|
426
|
+
font-variant-numeric: tabular-nums;
|
|
427
|
+
justify-content: center;
|
|
428
|
+
align-items: center;
|
|
429
|
+
line-height: 1;
|
|
430
|
+
display: inline-flex;
|
|
431
|
+
position: absolute;
|
|
432
|
+
inset-block-start: calc((var(--sidebar-menu-button-height, var(--size-md)) -
|
|
433
|
+
var(--sidebar-menu-badge-min-width, 1.5rem)) /
|
|
434
|
+
2);
|
|
435
|
+
inset-inline-end: var(--sidebar-menu-button-padding-x, var(--spacing-2));
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
._3sukta_menuItem:has(._3sukta_menuAction) ._3sukta_menuButton, ._3sukta_menuItem:has(._3sukta_menuBadge) ._3sukta_menuButton {
|
|
439
|
+
padding-inline-end: calc(var(--sidebar-menu-action-size, 1.5rem) +
|
|
440
|
+
var(--sidebar-menu-button-padding-x, var(--spacing-2)) * 2);
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
._3sukta_panel[data-state="collapsed"] ._3sukta_menuItem:has(._3sukta_menuAction) ._3sukta_menuButton, ._3sukta_panel[data-state="collapsed"] ._3sukta_menuItem:has(._3sukta_menuBadge) ._3sukta_menuButton {
|
|
444
|
+
padding-inline-end: 0;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
._3sukta_menuSub {
|
|
448
|
+
box-sizing: border-box;
|
|
449
|
+
width: auto;
|
|
321
450
|
border-inline-start: var(--sidebar-menu-sub-border-width, var(--border-width-sm)) solid
|
|
322
451
|
var(--sidebar-border-color, var(--color-border));
|
|
323
452
|
margin-block-start: var(--sidebar-menu-sub-margin-y, var(--spacing-1));
|
|
@@ -325,7 +454,7 @@
|
|
|
325
454
|
padding-inline-start: var(--sidebar-menu-sub-padding-x, var(--spacing-2));
|
|
326
455
|
}
|
|
327
456
|
|
|
328
|
-
.
|
|
457
|
+
._3sukta_menuSubButton {
|
|
329
458
|
gap: var(--sidebar-menu-sub-button-gap, var(--spacing-2));
|
|
330
459
|
min-height: var(--sidebar-menu-sub-button-height, var(--size-sm));
|
|
331
460
|
padding-inline: var(--sidebar-menu-sub-button-padding-x, var(--spacing-2));
|
|
@@ -333,8 +462,16 @@
|
|
|
333
462
|
line-height: var(--sidebar-menu-sub-button-line-height, var(--line-height-text-sm));
|
|
334
463
|
}
|
|
335
464
|
|
|
465
|
+
._3sukta_input {
|
|
466
|
+
width: 100%;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
._3sukta_separator {
|
|
470
|
+
--separator-color: var(--sidebar-border-color, var(--color-border));
|
|
471
|
+
}
|
|
472
|
+
|
|
336
473
|
@media (prefers-reduced-motion: reduce) {
|
|
337
|
-
.
|
|
474
|
+
._3sukta_panel, ._3sukta_trigger, ._3sukta_groupAction, ._3sukta_menuButton, ._3sukta_menuAction, ._3sukta_menuSubButton {
|
|
338
475
|
transition: none;
|
|
339
476
|
}
|
|
340
477
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Splitter } from "../splitter/Splitter.js";
|
|
2
|
+
import { Tooltip } from "../tooltip/Tooltip.js";
|
|
2
3
|
import { ComponentProps } from "react";
|
|
3
4
|
|
|
4
5
|
//#region src/components/sidebar/Sidebar.d.ts
|
|
@@ -27,17 +28,42 @@ declare const Sidebar: import("react").ForwardRefExoticComponent<Omit<SidebarRoo
|
|
|
27
28
|
ResizeTrigger: import("react").ForwardRefExoticComponent<Omit<SidebarResizeTriggerProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
28
29
|
Trigger: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
29
30
|
Label: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
31
|
+
Input: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("@ark-ui/react/field").FieldInputProps & import("react").RefAttributes<HTMLInputElement>, "size"> & {
|
|
32
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl";
|
|
33
|
+
htmlSize?: ComponentProps<"input">["size"];
|
|
34
|
+
}, "ref"> & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
30
35
|
Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLElement>>;
|
|
31
36
|
Content: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
32
37
|
Footer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLElement>>;
|
|
38
|
+
Separator: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
39
|
+
orientation?: "horizontal" | "vertical";
|
|
40
|
+
size?: "xs" | "sm" | "md" | "lg";
|
|
41
|
+
variant?: "solid" | "dashed" | "dotted";
|
|
42
|
+
} & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
33
43
|
Group: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLElement>>;
|
|
34
44
|
GroupLabel: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
45
|
+
GroupAction: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
46
|
+
GroupContent: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
35
47
|
Menu: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
36
48
|
MenuItem: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
49
|
+
Tooltip: ({
|
|
50
|
+
children,
|
|
51
|
+
content,
|
|
52
|
+
openDelay,
|
|
53
|
+
closeDelay,
|
|
54
|
+
positioning,
|
|
55
|
+
...props
|
|
56
|
+
}: Omit<ComponentProps<typeof Tooltip>, "children" | "disabled" | "positioning"> & {
|
|
57
|
+
children: ComponentProps<typeof Tooltip.Trigger>["children"];
|
|
58
|
+
content: ComponentProps<typeof Tooltip.Content>["children"];
|
|
59
|
+
positioning?: ComponentProps<typeof Tooltip>["positioning"];
|
|
60
|
+
}) => import("react").JSX.Element;
|
|
37
61
|
MenuButton: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
38
62
|
active?: boolean;
|
|
39
63
|
size?: "sm" | "md" | "lg";
|
|
40
64
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
65
|
+
MenuAction: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
66
|
+
MenuBadge: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
41
67
|
MenuSub: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLUListElement>, HTMLUListElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
42
68
|
MenuSubItem: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
43
69
|
MenuSubButton: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { ChevronLeftIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
2
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
3
|
-
import {
|
|
2
|
+
import { ChevronLeftIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
3
|
+
import { Input } from "../input/Input.js";
|
|
4
|
+
import { Separator } from "../separator/Separator.js";
|
|
5
|
+
import { Splitter, useSplitterContext } from "../splitter/Splitter.js";
|
|
6
|
+
import { Tooltip } from "../tooltip/Tooltip.js";
|
|
4
7
|
import Sidebar_module_default from "./Sidebar.module.js";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
8
|
import { ark } from "@ark-ui/react/factory";
|
|
7
9
|
import { clsx } from "clsx";
|
|
8
10
|
import { createContext, forwardRef, useContext } from "react";
|
|
9
|
-
import {
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
12
|
//#region src/components/sidebar/Sidebar.tsx
|
|
11
13
|
const sidebarPanel = {
|
|
12
14
|
id: "sidebar",
|
|
@@ -30,6 +32,12 @@ function getDefaultSidebarSize(side) {
|
|
|
30
32
|
defaultSize[1] = "16rem";
|
|
31
33
|
return defaultSize;
|
|
32
34
|
}
|
|
35
|
+
function getDefaultPanels(side, panelId) {
|
|
36
|
+
return defaultPanelsBySide[side].map((panel) => panel.id === "sidebar" ? {
|
|
37
|
+
...panel,
|
|
38
|
+
id: panelId
|
|
39
|
+
} : panel);
|
|
40
|
+
}
|
|
33
41
|
function toggleSidebarPanel(splitter, panelId) {
|
|
34
42
|
if (splitter.isPanelCollapsed(panelId)) {
|
|
35
43
|
splitter.expandPanel(panelId);
|
|
@@ -43,10 +51,10 @@ const SidebarRoot = forwardRef(function SidebarRoot({ className, panels, default
|
|
|
43
51
|
panelId,
|
|
44
52
|
side
|
|
45
53
|
},
|
|
46
|
-
children: /* @__PURE__ */ jsx(Splitter
|
|
54
|
+
children: /* @__PURE__ */ jsx(Splitter.Root, {
|
|
47
55
|
...props,
|
|
48
56
|
ref,
|
|
49
|
-
panels: panels ??
|
|
57
|
+
panels: panels ?? getDefaultPanels(side, panelId),
|
|
50
58
|
defaultSize: defaultSize ?? getDefaultSidebarSize(side),
|
|
51
59
|
orientation: "horizontal",
|
|
52
60
|
"data-side": side,
|
|
@@ -71,7 +79,7 @@ const SidebarPanel = forwardRef(function SidebarPanel({ className, id, ...props
|
|
|
71
79
|
const splitter = useSplitterContext();
|
|
72
80
|
const panelId = id ?? config.panelId;
|
|
73
81
|
const collapsed = splitter.isPanelCollapsed(panelId);
|
|
74
|
-
return /* @__PURE__ */ jsx(Splitter
|
|
82
|
+
return /* @__PURE__ */ jsx(Splitter.Panel, {
|
|
75
83
|
...props,
|
|
76
84
|
ref,
|
|
77
85
|
id: panelId,
|
|
@@ -83,7 +91,7 @@ const SidebarPanel = forwardRef(function SidebarPanel({ className, id, ...props
|
|
|
83
91
|
});
|
|
84
92
|
const SidebarInset = forwardRef(function SidebarInset({ className, id = "content", ...props }, ref) {
|
|
85
93
|
const { side } = useContext(SidebarConfigContext);
|
|
86
|
-
return /* @__PURE__ */ jsx(Splitter
|
|
94
|
+
return /* @__PURE__ */ jsx(Splitter.Panel, {
|
|
87
95
|
ref,
|
|
88
96
|
id,
|
|
89
97
|
"data-side": side,
|
|
@@ -92,17 +100,18 @@ const SidebarInset = forwardRef(function SidebarInset({ className, id = "content
|
|
|
92
100
|
...props
|
|
93
101
|
});
|
|
94
102
|
});
|
|
95
|
-
const SidebarResizeTrigger = forwardRef(function SidebarResizeTrigger({ className, id, "aria-label": ariaLabel = "Resize sidebar", ...props }, ref) {
|
|
96
|
-
const { side } = useContext(SidebarConfigContext);
|
|
97
|
-
const resolvedId = id ?? (side === "left" ?
|
|
98
|
-
return /* @__PURE__ */ jsx(Splitter
|
|
103
|
+
const SidebarResizeTrigger = forwardRef(function SidebarResizeTrigger({ children, className, id, "aria-label": ariaLabel = "Resize sidebar", ...props }, ref) {
|
|
104
|
+
const { panelId, side } = useContext(SidebarConfigContext);
|
|
105
|
+
const resolvedId = id ?? (side === "left" ? `${panelId}:content` : `content:${panelId}`);
|
|
106
|
+
return /* @__PURE__ */ jsx(Splitter.ResizeTrigger, {
|
|
99
107
|
...props,
|
|
100
108
|
ref,
|
|
101
109
|
id: resolvedId,
|
|
102
110
|
"aria-label": ariaLabel,
|
|
103
111
|
"data-side": side,
|
|
104
112
|
"data-slot": "sidebar-resize-trigger",
|
|
105
|
-
className: clsx(Sidebar_module_default.resizeTrigger, normalizeClassName(className))
|
|
113
|
+
className: clsx(Sidebar_module_default.resizeTrigger, normalizeClassName(className)),
|
|
114
|
+
children: children === void 0 ? null : children
|
|
106
115
|
});
|
|
107
116
|
});
|
|
108
117
|
const SidebarTrigger = forwardRef(function SidebarTrigger({ className, children, onClick, type = "button", "aria-label": ariaLabel = "Toggle sidebar", ...props }, ref) {
|
|
@@ -190,6 +199,27 @@ const SidebarGroupLabel = forwardRef(function SidebarGroupLabel({ className, ...
|
|
|
190
199
|
...props
|
|
191
200
|
});
|
|
192
201
|
});
|
|
202
|
+
const SidebarGroupAction = forwardRef(function SidebarGroupAction({ className, type = "button", ...props }, ref) {
|
|
203
|
+
return /* @__PURE__ */ jsx(ark.button, {
|
|
204
|
+
ref,
|
|
205
|
+
type,
|
|
206
|
+
"data-scope": "sidebar",
|
|
207
|
+
"data-part": "group-action",
|
|
208
|
+
"data-slot": "sidebar-group-action",
|
|
209
|
+
className: clsx(Sidebar_module_default.groupAction, normalizeClassName(className)),
|
|
210
|
+
...props
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
const SidebarGroupContent = forwardRef(function SidebarGroupContent({ className, ...props }, ref) {
|
|
214
|
+
return /* @__PURE__ */ jsx(ark.div, {
|
|
215
|
+
ref,
|
|
216
|
+
"data-scope": "sidebar",
|
|
217
|
+
"data-part": "group-content",
|
|
218
|
+
"data-slot": "sidebar-group-content",
|
|
219
|
+
className: clsx(Sidebar_module_default.groupContent, normalizeClassName(className)),
|
|
220
|
+
...props
|
|
221
|
+
});
|
|
222
|
+
});
|
|
193
223
|
const SidebarMenu = forwardRef(function SidebarMenu({ className, ...props }, ref) {
|
|
194
224
|
return /* @__PURE__ */ jsx(ark.ul, {
|
|
195
225
|
ref,
|
|
@@ -224,6 +254,27 @@ const SidebarMenuButton = forwardRef(function SidebarMenuButton({ active = false
|
|
|
224
254
|
...props
|
|
225
255
|
});
|
|
226
256
|
});
|
|
257
|
+
const SidebarMenuAction = forwardRef(function SidebarMenuAction({ className, type = "button", ...props }, ref) {
|
|
258
|
+
return /* @__PURE__ */ jsx(ark.button, {
|
|
259
|
+
ref,
|
|
260
|
+
type,
|
|
261
|
+
"data-scope": "sidebar",
|
|
262
|
+
"data-part": "menu-action",
|
|
263
|
+
"data-slot": "sidebar-menu-action",
|
|
264
|
+
className: clsx(Sidebar_module_default.menuAction, normalizeClassName(className)),
|
|
265
|
+
...props
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
const SidebarMenuBadge = forwardRef(function SidebarMenuBadge({ className, ...props }, ref) {
|
|
269
|
+
return /* @__PURE__ */ jsx(ark.div, {
|
|
270
|
+
ref,
|
|
271
|
+
"data-scope": "sidebar",
|
|
272
|
+
"data-part": "menu-badge",
|
|
273
|
+
"data-slot": "sidebar-menu-badge",
|
|
274
|
+
className: clsx(Sidebar_module_default.menuBadge, normalizeClassName(className)),
|
|
275
|
+
...props
|
|
276
|
+
});
|
|
277
|
+
});
|
|
227
278
|
const SidebarMenuSub = forwardRef(function SidebarMenuSub({ className, ...props }, ref) {
|
|
228
279
|
return /* @__PURE__ */ jsx(ark.ul, {
|
|
229
280
|
ref,
|
|
@@ -256,6 +307,40 @@ const SidebarMenuSubButton = forwardRef(function SidebarMenuSubButton({ active =
|
|
|
256
307
|
...props
|
|
257
308
|
});
|
|
258
309
|
});
|
|
310
|
+
const SidebarTooltip = function SidebarTooltip({ children, content, openDelay = 200, closeDelay = 0, positioning, ...props }) {
|
|
311
|
+
const { collapsed, side } = useSidebar();
|
|
312
|
+
return /* @__PURE__ */ jsxs(Tooltip, {
|
|
313
|
+
...props,
|
|
314
|
+
openDelay,
|
|
315
|
+
closeDelay,
|
|
316
|
+
disabled: !collapsed,
|
|
317
|
+
positioning: {
|
|
318
|
+
placement: side === "left" ? "right" : "left",
|
|
319
|
+
gutter: 8,
|
|
320
|
+
...positioning
|
|
321
|
+
},
|
|
322
|
+
children: [/* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
323
|
+
asChild: true,
|
|
324
|
+
children
|
|
325
|
+
}), /* @__PURE__ */ jsx(Tooltip.Positioner, { children: /* @__PURE__ */ jsx(Tooltip.Content, { children: content }) })]
|
|
326
|
+
});
|
|
327
|
+
};
|
|
328
|
+
const SidebarInput = forwardRef(function SidebarInput({ className, ...props }, ref) {
|
|
329
|
+
return /* @__PURE__ */ jsx(Input.Root, {
|
|
330
|
+
ref,
|
|
331
|
+
"data-slot": "sidebar-input",
|
|
332
|
+
className: clsx(Sidebar_module_default.input, normalizeClassName(className)),
|
|
333
|
+
...props
|
|
334
|
+
});
|
|
335
|
+
});
|
|
336
|
+
const SidebarSeparator = forwardRef(function SidebarSeparator({ className, ...props }, ref) {
|
|
337
|
+
return /* @__PURE__ */ jsx(Separator.Root, {
|
|
338
|
+
ref,
|
|
339
|
+
"data-slot": "sidebar-separator",
|
|
340
|
+
className: clsx(Sidebar_module_default.separator, normalizeClassName(className)),
|
|
341
|
+
...props
|
|
342
|
+
});
|
|
343
|
+
});
|
|
259
344
|
const Sidebar = Object.assign(SidebarRoot, {
|
|
260
345
|
Root: SidebarRoot,
|
|
261
346
|
Panel: SidebarPanel,
|
|
@@ -263,14 +348,21 @@ const Sidebar = Object.assign(SidebarRoot, {
|
|
|
263
348
|
ResizeTrigger: SidebarResizeTrigger,
|
|
264
349
|
Trigger: SidebarTrigger,
|
|
265
350
|
Label: SidebarLabel,
|
|
351
|
+
Input: SidebarInput,
|
|
266
352
|
Header: SidebarHeader,
|
|
267
353
|
Content: SidebarContent,
|
|
268
354
|
Footer: SidebarFooter,
|
|
355
|
+
Separator: SidebarSeparator,
|
|
269
356
|
Group: SidebarGroup,
|
|
270
357
|
GroupLabel: SidebarGroupLabel,
|
|
358
|
+
GroupAction: SidebarGroupAction,
|
|
359
|
+
GroupContent: SidebarGroupContent,
|
|
271
360
|
Menu: SidebarMenu,
|
|
272
361
|
MenuItem: SidebarMenuItem,
|
|
362
|
+
Tooltip: SidebarTooltip,
|
|
273
363
|
MenuButton: SidebarMenuButton,
|
|
364
|
+
MenuAction: SidebarMenuAction,
|
|
365
|
+
MenuBadge: SidebarMenuBadge,
|
|
274
366
|
MenuSub: SidebarMenuSub,
|
|
275
367
|
MenuSubItem: SidebarMenuSubItem,
|
|
276
368
|
MenuSubButton: SidebarMenuSubButton
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
import './Sidebar.css';
|
|
2
2
|
//#region src/components/sidebar/Sidebar.module.css
|
|
3
3
|
var Sidebar_module_default = {
|
|
4
|
-
"content": "
|
|
5
|
-
"footer": "
|
|
6
|
-
"group": "
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
4
|
+
"content": "_3sukta_content",
|
|
5
|
+
"footer": "_3sukta_footer",
|
|
6
|
+
"group": "_3sukta_group",
|
|
7
|
+
"groupAction": "_3sukta_groupAction",
|
|
8
|
+
"groupContent": "_3sukta_groupContent",
|
|
9
|
+
"groupLabel": "_3sukta_groupLabel",
|
|
10
|
+
"header": "_3sukta_header",
|
|
11
|
+
"input": "_3sukta_input",
|
|
12
|
+
"inset": "_3sukta_inset",
|
|
13
|
+
"label": "_3sukta_label",
|
|
14
|
+
"menu": "_3sukta_menu",
|
|
15
|
+
"menuAction": "_3sukta_menuAction",
|
|
16
|
+
"menuBadge": "_3sukta_menuBadge",
|
|
17
|
+
"menuButton": "_3sukta_menuButton",
|
|
18
|
+
"menuItem": "_3sukta_menuItem",
|
|
19
|
+
"menuSub": "_3sukta_menuSub",
|
|
20
|
+
"menuSubButton": "_3sukta_menuSubButton",
|
|
21
|
+
"menuSubItem": "_3sukta_menuSubItem",
|
|
22
|
+
"panel": "_3sukta_panel",
|
|
23
|
+
"resizeTrigger": "_3sukta_resizeTrigger",
|
|
24
|
+
"root": "_3sukta_root",
|
|
25
|
+
"separator": "_3sukta_separator",
|
|
26
|
+
"trigger": "_3sukta_trigger"
|
|
21
27
|
};
|
|
22
28
|
//#endregion
|
|
23
29
|
export { Sidebar_module_default as default };
|