@moduix/react 1.1.1 → 2.1.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 +105 -177
- package/dist/components/accordion/Accordion.css +12 -5
- package/dist/components/accordion/Accordion.d.ts +3 -2
- package/dist/components/accordion/Accordion.js +17 -5
- package/dist/components/accordion/Accordion.module.js +1 -0
- 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 +1 -0
- package/dist/components/angle-slider/AngleSlider.css +9 -9
- package/dist/components/angle-slider/AngleSlider.d.ts +18 -2
- package/dist/components/angle-slider/AngleSlider.js +34 -18
- package/dist/components/angle-slider/index.d.ts +2 -2
- package/dist/components/aspect-ratio/AspectRatio.css +3 -1
- package/dist/components/aspect-ratio/AspectRatio.js +2 -2
- package/dist/components/avatar/Avatar.d.ts +6 -3
- package/dist/components/avatar/Avatar.js +12 -5
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/badge/Badge.css +52 -8
- package/dist/components/badge/Badge.d.ts +2 -2
- package/dist/components/badge/Badge.js +1 -1
- package/dist/components/bleed/Bleed.d.ts +6 -4
- package/dist/components/bleed/Bleed.js +3 -3
- package/dist/components/breadcrumbs/Breadcrumbs.css +13 -6
- package/dist/components/breadcrumbs/Breadcrumbs.d.ts +18 -0
- package/dist/components/breadcrumbs/Breadcrumbs.js +18 -4
- package/dist/components/breadcrumbs/Breadcrumbs.module.js +2 -1
- package/dist/components/breadcrumbs/index.d.ts +2 -0
- package/dist/components/button/Button.css +45 -25
- package/dist/components/button/Button.d.ts +6 -0
- package/dist/components/button/Button.js +12 -7
- package/dist/components/card/Card.css +21 -5
- package/dist/components/card/Card.d.ts +1 -0
- package/dist/components/card/Card.js +12 -1
- package/dist/components/card/Card.module.js +1 -0
- package/dist/components/carousel/Carousel.css +19 -17
- package/dist/components/carousel/Carousel.d.ts +4 -0
- package/dist/components/carousel/Carousel.js +15 -2
- package/dist/components/checkbox/Checkbox.css +13 -13
- package/dist/components/checkbox/Checkbox.d.ts +2 -3
- package/dist/components/checkbox/Checkbox.js +25 -22
- package/dist/components/checkbox/index.d.ts +2 -2
- package/dist/components/clipboard/Clipboard.css +11 -11
- package/dist/components/clipboard/Clipboard.d.ts +2 -0
- package/dist/components/clipboard/Clipboard.js +15 -4
- package/dist/components/close-button/CloseButton.css +7 -7
- package/dist/components/close-button/CloseButton.d.ts +12 -2
- package/dist/components/close-button/CloseButton.js +9 -9
- package/dist/components/collapsible/Collapsible.css +13 -6
- package/dist/components/collapsible/Collapsible.d.ts +3 -2
- package/dist/components/collapsible/Collapsible.js +18 -6
- package/dist/components/collapsible/Collapsible.module.js +1 -0
- package/dist/components/collapsible/index.d.ts +2 -2
- package/dist/components/color-picker/ColorPicker.css +63 -27
- 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 +1 -0
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/combobox/Combobox.css +69 -53
- package/dist/components/combobox/Combobox.d.ts +9 -2
- package/dist/components/combobox/Combobox.js +34 -8
- package/dist/components/combobox/index.d.ts +2 -2
- package/dist/components/command-palette/CommandPalette.css +67 -100
- 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 +0 -2
- package/dist/components/container/Container.js +1 -1
- package/dist/components/date-input/DateInput.css +8 -5
- package/dist/components/date-input/DateInput.d.ts +12 -7
- package/dist/components/date-input/DateInput.js +35 -14
- package/dist/components/date-input/index.d.ts +2 -2
- package/dist/components/date-picker/DatePicker.css +78 -57
- package/dist/components/date-picker/DatePicker.d.ts +30 -2
- package/dist/components/date-picker/DatePicker.js +94 -9
- package/dist/components/date-picker/index.d.ts +2 -2
- package/dist/components/dialog/Dialog.css +19 -14
- package/dist/components/dialog/Dialog.d.ts +2 -2
- package/dist/components/dialog/Dialog.js +3 -3
- package/dist/components/dialog/index.d.ts +2 -2
- package/dist/components/drawer/Drawer.css +6 -5
- package/dist/components/drawer/Drawer.d.ts +2 -2
- package/dist/components/drawer/Drawer.js +3 -3
- package/dist/components/drawer/index.d.ts +2 -2
- package/dist/components/editable/Editable.css +12 -10
- package/dist/components/editable/Editable.d.ts +9 -2
- package/dist/components/editable/Editable.js +14 -5
- package/dist/components/editable/index.d.ts +2 -2
- package/dist/components/empty/Empty.css +2 -2
- package/dist/components/empty/Empty.js +1 -1
- package/dist/components/field/Field.css +6 -8
- package/dist/components/field/Field.d.ts +3 -2
- package/dist/components/field/Field.js +6 -5
- package/dist/components/field/Field.module.js +0 -1
- package/dist/components/field/index.d.ts +2 -2
- package/dist/components/fieldset/Fieldset.d.ts +2 -2
- package/dist/components/fieldset/Fieldset.js +3 -3
- package/dist/components/fieldset/index.d.ts +2 -2
- package/dist/components/file-upload/FileUpload.css +96 -23
- 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 +3 -0
- package/dist/components/file-upload/index.d.ts +2 -2
- package/dist/components/floating-panel/FloatingPanel.css +44 -40
- package/dist/components/floating-panel/FloatingPanel.d.ts +10 -2
- package/dist/components/floating-panel/FloatingPanel.js +15 -9
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/highlight/Highlight.css +1 -1
- package/dist/components/highlight/Highlight.js +1 -1
- package/dist/components/hover-card/HoverCard.css +19 -15
- package/dist/components/hover-card/HoverCard.d.ts +3 -2
- package/dist/components/hover-card/HoverCard.js +5 -4
- 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 +15 -11
- package/dist/components/image-cropper/ImageCropper.d.ts +7 -2
- package/dist/components/image-cropper/ImageCropper.js +25 -3
- package/dist/components/image-cropper/index.d.ts +2 -2
- package/dist/components/input/Input.css +9 -9
- package/dist/components/input/Input.js +1 -1
- package/dist/components/input-group/InputGroup.css +29 -29
- package/dist/components/input-group/InputGroup.d.ts +3 -0
- package/dist/components/input-group/InputGroup.js +1 -1
- package/dist/components/kbd/Kbd.css +2 -2
- package/dist/components/kbd/Kbd.js +1 -1
- package/dist/components/lightbox/Lightbox.css +19 -17
- package/dist/components/lightbox/Lightbox.d.ts +4 -2
- package/dist/components/lightbox/Lightbox.js +9 -7
- package/dist/components/lightbox/index.d.ts +2 -2
- package/dist/components/list/List.js +1 -1
- package/dist/components/listbox/Listbox.css +87 -26
- package/dist/components/listbox/Listbox.d.ts +14 -2
- package/dist/components/listbox/Listbox.js +41 -5
- package/dist/components/listbox/Listbox.module.js +3 -0
- package/dist/components/listbox/index.d.ts +2 -2
- package/dist/components/marquee/Marquee.d.ts +2 -1
- package/dist/components/marquee/Marquee.js +4 -3
- package/dist/components/marquee/index.d.ts +2 -2
- package/dist/components/menu/Menu.css +54 -45
- package/dist/components/menu/Menu.d.ts +3 -2
- package/dist/components/menu/Menu.js +6 -5
- package/dist/components/menu/index.d.ts +2 -2
- package/dist/components/native-select/NativeSelect.css +17 -12
- package/dist/components/native-select/NativeSelect.d.ts +6 -2
- package/dist/components/native-select/NativeSelect.js +5 -4
- package/dist/components/number-input/NumberInput.css +17 -24
- package/dist/components/number-input/NumberInput.d.ts +7 -2
- package/dist/components/number-input/NumberInput.js +17 -4
- package/dist/components/number-input/index.d.ts +2 -2
- package/dist/components/pagination/Pagination.css +11 -11
- package/dist/components/pagination/Pagination.d.ts +4 -0
- package/dist/components/pagination/Pagination.js +13 -4
- package/dist/components/password-input/PasswordInput.css +4 -4
- package/dist/components/password-input/PasswordInput.d.ts +4 -0
- package/dist/components/password-input/PasswordInput.js +10 -2
- package/dist/components/pin-input/PinInput.css +6 -6
- package/dist/components/pin-input/PinInput.d.ts +6 -1
- package/dist/components/pin-input/PinInput.js +25 -16
- package/dist/components/popover/Popover.css +29 -19
- package/dist/components/popover/Popover.js +1 -1
- package/dist/components/progress-circular/ProgressCircular.css +2 -2
- package/dist/components/progress-circular/ProgressCircular.d.ts +6 -0
- package/dist/components/progress-circular/ProgressCircular.js +14 -3
- package/dist/components/progress-linear/ProgressLinear.css +1 -1
- package/dist/components/progress-linear/ProgressLinear.d.ts +3 -0
- package/dist/components/progress-linear/ProgressLinear.js +6 -3
- package/dist/components/qr-code/QrCode.css +10 -9
- package/dist/components/qr-code/QrCode.d.ts +2 -2
- package/dist/components/qr-code/QrCode.js +3 -3
- package/dist/components/qr-code/index.d.ts +2 -2
- package/dist/components/radio-group/RadioGroup.css +12 -12
- package/dist/components/radio-group/RadioGroup.d.ts +8 -4
- package/dist/components/radio-group/RadioGroup.js +22 -14
- package/dist/components/radio-group/index.d.ts +2 -2
- package/dist/components/rating-group/RatingGroup.css +10 -10
- package/dist/components/rating-group/RatingGroup.d.ts +11 -4
- package/dist/components/rating-group/RatingGroup.js +29 -18
- package/dist/components/rating-group/index.d.ts +2 -2
- package/dist/components/scroll-area/ScrollArea.css +12 -7
- package/dist/components/scroll-area/ScrollArea.d.ts +3 -0
- package/dist/components/scroll-area/ScrollArea.js +9 -6
- package/dist/components/segment-group/SegmentGroup.css +4 -4
- package/dist/components/segment-group/SegmentGroup.d.ts +13 -3
- package/dist/components/segment-group/SegmentGroup.js +23 -15
- package/dist/components/segment-group/index.d.ts +2 -2
- package/dist/components/select/Select.css +81 -55
- package/dist/components/select/Select.d.ts +18 -4
- package/dist/components/select/Select.js +65 -20
- package/dist/components/separator/Separator.css +6 -6
- package/dist/components/separator/Separator.js +1 -1
- package/dist/components/sidebar/Sidebar.css +161 -20
- package/dist/components/sidebar/Sidebar.d.ts +26 -0
- package/dist/components/sidebar/Sidebar.js +105 -13
- package/dist/components/sidebar/Sidebar.module.js +6 -0
- package/dist/components/signature-pad/SignaturePad.css +17 -45
- package/dist/components/signature-pad/SignaturePad.d.ts +14 -6
- package/dist/components/signature-pad/SignaturePad.js +56 -17
- 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/slider/Slider.css +17 -13
- package/dist/components/slider/Slider.d.ts +12 -3
- package/dist/components/slider/Slider.js +24 -15
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/spinner/Spinner.css +5 -5
- package/dist/components/spinner/Spinner.js +2 -2
- package/dist/components/split-button/SplitButton.css +10 -10
- package/dist/components/split-button/SplitButton.d.ts +1 -1
- package/dist/components/split-button/SplitButton.js +3 -4
- package/dist/components/splitter/Splitter.css +19 -18
- package/dist/components/splitter/Splitter.d.ts +2 -2
- package/dist/components/splitter/Splitter.js +12 -11
- package/dist/components/splitter/index.d.ts +2 -2
- package/dist/components/stack/Stack.d.ts +1 -3
- package/dist/components/stack/Stack.js +4 -6
- package/dist/components/steps/Steps.css +20 -19
- package/dist/components/steps/Steps.d.ts +2 -1
- package/dist/components/steps/Steps.js +5 -4
- 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 +17 -17
- package/dist/components/switch/Switch.d.ts +4 -4
- package/dist/components/switch/Switch.js +19 -16
- package/dist/components/switch/index.d.ts +2 -2
- package/dist/components/table/Table.css +3 -3
- package/dist/components/table/Table.js +3 -2
- package/dist/components/table/Table.module.js +0 -1
- package/dist/components/tabs/Tabs.css +22 -20
- package/dist/components/tabs/Tabs.d.ts +3 -2
- package/dist/components/tabs/Tabs.js +5 -4
- package/dist/components/tabs/index.d.ts +2 -2
- package/dist/components/tag/Tag.css +23 -53
- package/dist/components/tag/Tag.js +7 -20
- package/dist/components/tags-input/TagsInput.css +19 -55
- package/dist/components/tags-input/TagsInput.d.ts +7 -4
- package/dist/components/tags-input/TagsInput.js +33 -21
- package/dist/components/tags-input/index.d.ts +2 -2
- package/dist/components/text/Text.d.ts +2 -2
- package/dist/components/text/Text.js +1 -1
- package/dist/components/textarea/Textarea.css +4 -3
- package/dist/components/textarea/Textarea.js +1 -1
- package/dist/components/timer/Timer.css +7 -7
- package/dist/components/timer/Timer.d.ts +14 -2
- package/dist/components/timer/Timer.js +13 -5
- package/dist/components/timer/index.d.ts +2 -2
- package/dist/components/toast/Toast.css +16 -15
- package/dist/components/toast/Toast.d.ts +3 -1
- package/dist/components/toast/Toast.js +11 -2
- package/dist/components/toggle/Toggle.css +23 -23
- package/dist/components/toggle/Toggle.d.ts +3 -2
- package/dist/components/toggle/Toggle.js +5 -4
- package/dist/components/toggle/index.d.ts +2 -2
- package/dist/components/toggle-group/ToggleGroup.d.ts +3 -2
- package/dist/components/toggle-group/ToggleGroup.js +4 -3
- package/dist/components/toggle-group/index.d.ts +2 -2
- package/dist/components/tooltip/Tooltip.css +23 -18
- package/dist/components/tooltip/Tooltip.d.ts +3 -2
- package/dist/components/tooltip/Tooltip.js +10 -3
- package/dist/components/tooltip/index.d.ts +2 -2
- package/dist/components/tour/Tour.css +37 -32
- package/dist/components/tour/Tour.d.ts +6 -0
- package/dist/components/tour/Tour.js +8 -1
- package/dist/components/tree-view/TreeView.css +24 -21
- package/dist/components/tree-view/TreeView.d.ts +2 -2
- package/dist/components/tree-view/TreeView.js +4 -4
- package/dist/components/tree-view/index.d.ts +2 -2
- package/dist/components/typeset/Typeset.css +317 -0
- package/dist/components/typeset/Typeset.d.ts +7 -0
- package/dist/components/typeset/Typeset.js +33 -0
- package/dist/components/typeset/Typeset.module.js +8 -0
- package/dist/index.d.ts +42 -39
- package/dist/index.js +42 -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/dist/lib/moduix/presets/contrast.css +65 -0
- package/dist/lib/moduix/presets/dense.css +78 -0
- package/dist/lib/moduix/presets/soft.css +77 -0
- package/dist/lib/moduix/styles/reset.css +33 -0
- package/dist/lib/moduix/styles/style.css +17 -4
- package/dist/presets/contrast.d.ts +1 -0
- package/dist/presets/contrast.js +1 -0
- package/dist/presets/dense.d.ts +1 -0
- package/dist/presets/dense.js +1 -0
- package/dist/presets/soft.d.ts +1 -0
- package/dist/presets/soft.js +1 -0
- package/package.json +7 -3
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
width: var(--select-width, 14rem);
|
|
13
13
|
max-width: var(--select-max-width, 100%);
|
|
14
14
|
min-width: 0;
|
|
15
|
-
height: var(--select-control-height, var(--size-
|
|
15
|
+
height: var(--select-control-height, var(--size-md));
|
|
16
16
|
border: var(--select-border-width, var(--border-width-sm)) solid
|
|
17
17
|
var(--select-border-color, var(--color-border));
|
|
18
18
|
border-radius: var(--select-radius, var(--radius-md));
|
|
@@ -20,8 +20,9 @@
|
|
|
20
20
|
background-color: var(--select-bg, var(--color-background));
|
|
21
21
|
color: var(--select-color, var(--color-foreground));
|
|
22
22
|
font: inherit;
|
|
23
|
-
outline: var(--select-focus-ring-width, var(--border-width-sm))
|
|
24
|
-
|
|
23
|
+
outline: var(--select-focus-ring-width, var(--focus-ring-inset-width, var(--border-width-sm)))
|
|
24
|
+
solid transparent;
|
|
25
|
+
outline-offset: calc(var(--select-focus-ring-width, var(--focus-ring-inset-width, var(--border-width-sm))) * -1);
|
|
25
26
|
cursor: pointer;
|
|
26
27
|
transition: background-color var(--select-transition, var(--transition-default)),
|
|
27
28
|
border-color var(--select-transition, var(--transition-default)),
|
|
@@ -55,14 +56,6 @@
|
|
|
55
56
|
appearance: auto;
|
|
56
57
|
}
|
|
57
58
|
|
|
58
|
-
&:not(:disabled, [data-disabled]) {
|
|
59
|
-
@media (hover: hover) {
|
|
60
|
-
&:hover {
|
|
61
|
-
background-color: var(--select-bg-hover, var(--color-accent));
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
59
|
@media (forced-colors: active) {
|
|
67
60
|
appearance: auto;
|
|
68
61
|
padding-inline-end: var(--select-trigger-padding-x-start, var(--spacing-3));
|
|
@@ -73,14 +66,19 @@
|
|
|
73
66
|
top: 50%;
|
|
74
67
|
width: var(--select-action-size, var(--spacing-6));
|
|
75
68
|
height: var(--select-action-size, var(--spacing-6));
|
|
69
|
+
border-radius: var(--select-action-radius, var(--radius-sm));
|
|
70
|
+
background: var(--select-action-bg, transparent);
|
|
76
71
|
color: var(--select-icon-color, var(--color-muted-foreground));
|
|
77
72
|
pointer-events: none;
|
|
73
|
+
transition: background-color var(--select-transition, var(--transition-default)),
|
|
74
|
+
color var(--select-transition, var(--transition-default)),
|
|
75
|
+
opacity var(--select-transition, var(--transition-default));
|
|
78
76
|
justify-content: center;
|
|
79
77
|
align-items: center;
|
|
80
78
|
line-height: 0;
|
|
81
79
|
display: inline-flex;
|
|
82
80
|
position: absolute;
|
|
83
|
-
inset-inline-end: var(--select-action-offset-right, var(--spacing-
|
|
81
|
+
inset-inline-end: var(--select-action-offset-right, var(--spacing-2));
|
|
84
82
|
transform: translateY(-50%);
|
|
85
83
|
|
|
86
84
|
& > svg {
|
|
@@ -98,6 +96,13 @@
|
|
|
98
96
|
opacity: var(--select-disabled-opacity, var(--opacity-disabled));
|
|
99
97
|
}
|
|
100
98
|
|
|
99
|
+
.mei8Eq_root:not(:disabled, [data-disabled]):hover + .mei8Eq_indicator {
|
|
100
|
+
@media (hover: hover) {
|
|
101
|
+
background-color: var(--select-action-bg-hover, var(--color-muted));
|
|
102
|
+
color: var(--select-action-color-hover, var(--color-foreground));
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
101
106
|
.mei8Eq_root:is([multiple], [size]:not([size="1"])) + .mei8Eq_indicator {
|
|
102
107
|
display: none;
|
|
103
108
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
1
2
|
import { Field } from "@ark-ui/react/field";
|
|
2
3
|
|
|
3
4
|
//#region src/components/native-select/NativeSelect.d.ts
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
type NativeSelectRootProps = ComponentProps<typeof Field.Select> & {
|
|
6
|
+
controlProps?: ComponentProps<'span'>;
|
|
7
|
+
};
|
|
8
|
+
declare const NativeSelect: import("react").ForwardRefExoticComponent<Omit<NativeSelectRootProps, "ref"> & import("react").RefAttributes<HTMLSelectElement>> & {
|
|
9
|
+
Root: import("react").ForwardRefExoticComponent<Omit<NativeSelectRootProps, "ref"> & import("react").RefAttributes<HTMLSelectElement>>;
|
|
6
10
|
};
|
|
7
11
|
//#endregion
|
|
8
12
|
export { NativeSelect };
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { ChevronDownIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
2
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
|
+
import { ChevronDownIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
3
3
|
import NativeSelect_module_default from "./NativeSelect.module.js";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { clsx } from "clsx";
|
|
6
5
|
import { forwardRef } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Field } from "@ark-ui/react/field";
|
|
8
8
|
//#region src/components/native-select/NativeSelect.tsx
|
|
9
|
-
const NativeSelectRoot = forwardRef(function NativeSelectRoot({ className, ...props }, ref) {
|
|
9
|
+
const NativeSelectRoot = forwardRef(function NativeSelectRoot({ className, controlProps, ...props }, ref) {
|
|
10
10
|
return /* @__PURE__ */ jsxs("span", {
|
|
11
|
+
...controlProps,
|
|
11
12
|
"data-scope": "native-select",
|
|
12
13
|
"data-part": "control",
|
|
13
14
|
"data-slot": "native-select-control",
|
|
14
|
-
className: NativeSelect_module_default.control,
|
|
15
|
+
className: clsx(NativeSelect_module_default.control, normalizeClassName(controlProps?.className)),
|
|
15
16
|
children: [/* @__PURE__ */ jsx(Field.Select, {
|
|
16
17
|
...props,
|
|
17
18
|
ref,
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
|
|
30
30
|
&[data-disabled] {
|
|
31
31
|
cursor: default;
|
|
32
|
-
opacity: var(--number-input-disabled-opacity, var(--opacity-disabled));
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
|
|
@@ -39,11 +38,11 @@
|
|
|
39
38
|
}
|
|
40
39
|
|
|
41
40
|
.ZjEX8G_decrementTrigger, .ZjEX8G_incrementTrigger {
|
|
42
|
-
--_number-input-focus-ring-width: var(--number-input-focus-ring-width, var(--number-input-border-width, var(--border-width-sm)));
|
|
41
|
+
--_number-input-focus-ring-width: var(--number-input-focus-ring-width, var(--number-input-border-width, var(--focus-ring-inset-width, var(--border-width-sm))));
|
|
43
42
|
box-sizing: border-box;
|
|
44
|
-
width: var(--number-input-control-height, var(--size-
|
|
45
|
-
min-width: var(--number-input-control-height, var(--size-
|
|
46
|
-
height: var(--number-input-control-height, var(--size-
|
|
43
|
+
width: var(--number-input-control-height, var(--size-md));
|
|
44
|
+
min-width: var(--number-input-control-height, var(--size-md));
|
|
45
|
+
height: var(--number-input-control-height, var(--size-md));
|
|
47
46
|
border: var(--number-input-border-width, var(--border-width-sm))
|
|
48
47
|
var(--number-input-border-style, solid) var(--number-input-border-color, var(--color-border));
|
|
49
48
|
background-color: var(--number-input-button-bg, var(--color-background));
|
|
@@ -79,7 +78,6 @@
|
|
|
79
78
|
}
|
|
80
79
|
|
|
81
80
|
&:is([data-disabled], :disabled) {
|
|
82
|
-
opacity: var(--number-input-disabled-opacity, var(--opacity-disabled));
|
|
83
81
|
pointer-events: none;
|
|
84
82
|
}
|
|
85
83
|
|
|
@@ -88,35 +86,35 @@
|
|
|
88
86
|
}
|
|
89
87
|
|
|
90
88
|
& > svg {
|
|
91
|
-
width: var(--number-input-icon-size,
|
|
92
|
-
height: var(--number-input-icon-size,
|
|
89
|
+
width: var(--number-input-icon-size, var(--spacing-3-5));
|
|
90
|
+
height: var(--number-input-icon-size, var(--spacing-3-5));
|
|
93
91
|
flex-shrink: 0;
|
|
94
92
|
}
|
|
95
93
|
}
|
|
96
94
|
|
|
97
95
|
.ZjEX8G_decrementTrigger {
|
|
98
|
-
border-
|
|
99
|
-
|
|
100
|
-
border-
|
|
96
|
+
border-inline-end: 0;
|
|
97
|
+
border-start-start-radius: var(--number-input-radius, var(--radius-md));
|
|
98
|
+
border-end-start-radius: var(--number-input-radius, var(--radius-md));
|
|
101
99
|
}
|
|
102
100
|
|
|
103
101
|
.ZjEX8G_incrementTrigger {
|
|
104
|
-
border-
|
|
105
|
-
|
|
106
|
-
border-
|
|
102
|
+
border-inline-start: 0;
|
|
103
|
+
border-start-end-radius: var(--number-input-radius, var(--radius-md));
|
|
104
|
+
border-end-end-radius: var(--number-input-radius, var(--radius-md));
|
|
107
105
|
}
|
|
108
106
|
|
|
109
107
|
.ZjEX8G_input {
|
|
110
|
-
--_number-input-focus-ring-width: var(--number-input-focus-ring-width, var(--number-input-border-width, var(--border-width-sm)));
|
|
108
|
+
--_number-input-focus-ring-width: var(--number-input-focus-ring-width, var(--number-input-border-width, var(--focus-ring-inset-width, var(--border-width-sm))));
|
|
111
109
|
box-sizing: border-box;
|
|
112
110
|
width: var(--number-input-input-width, 6rem);
|
|
113
|
-
height: var(--number-input-control-height, var(--size-
|
|
111
|
+
height: var(--number-input-control-height, var(--size-md));
|
|
114
112
|
border-top: var(--number-input-border-width, var(--border-width-sm))
|
|
115
113
|
var(--number-input-border-style, solid) var(--number-input-border-color, var(--color-border));
|
|
116
114
|
border-bottom: var(--number-input-border-width, var(--border-width-sm))
|
|
117
115
|
var(--number-input-border-style, solid) var(--number-input-border-color, var(--color-border));
|
|
118
|
-
padding: var(--number-input-input-padding-y,
|
|
119
|
-
var(--number-input-input-padding-x,
|
|
116
|
+
padding: var(--number-input-input-padding-y, var(--spacing-1))
|
|
117
|
+
var(--number-input-input-padding-x, var(--spacing-3));
|
|
120
118
|
background-color: var(--number-input-input-bg, var(--color-background));
|
|
121
119
|
color: var(--number-input-input-color, var(--color-foreground));
|
|
122
120
|
font: inherit;
|
|
@@ -129,8 +127,7 @@
|
|
|
129
127
|
transition: border-color var(--transition-default),
|
|
130
128
|
outline-color var(--transition-default),
|
|
131
129
|
opacity var(--transition-default);
|
|
132
|
-
border-
|
|
133
|
-
border-right: 0;
|
|
130
|
+
border-inline: 0;
|
|
134
131
|
border-radius: 0;
|
|
135
132
|
margin: 0;
|
|
136
133
|
|
|
@@ -147,10 +144,6 @@
|
|
|
147
144
|
outline-color: var(--number-input-border-color-invalid, var(--color-destructive));
|
|
148
145
|
}
|
|
149
146
|
}
|
|
150
|
-
|
|
151
|
-
&:is([data-disabled], :disabled) {
|
|
152
|
-
opacity: var(--number-input-disabled-opacity, var(--opacity-disabled));
|
|
153
|
-
}
|
|
154
147
|
}
|
|
155
148
|
|
|
156
149
|
.ZjEX8G_valueText {
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
import { NumberInput, useNumberInput, useNumberInputContext } from "@ark-ui/react/number-input";
|
|
2
3
|
|
|
3
4
|
//#region src/components/number-input/NumberInput.d.ts
|
|
5
|
+
declare const NumberInputControl: import("react").ForwardRefExoticComponent<Omit<NumberInput.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
type NumberInputFieldProps = Omit<ComponentProps<typeof NumberInputControl>, 'asChild' | 'children'>;
|
|
4
7
|
declare const NumberInput$1: import("react").ForwardRefExoticComponent<Omit<NumberInput.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
5
8
|
Root: import("react").ForwardRefExoticComponent<Omit<NumberInput.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
9
|
RootProvider: import("react").ForwardRefExoticComponent<Omit<NumberInput.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Context: (props: NumberInput.ContextProps) => import("react").ReactNode;
|
|
7
11
|
Label: import("react").ForwardRefExoticComponent<Omit<NumberInput.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
8
12
|
Scrubber: import("react").ForwardRefExoticComponent<Omit<NumberInput.ScrubberProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
13
|
Control: import("react").ForwardRefExoticComponent<Omit<NumberInput.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Field: import("react").ForwardRefExoticComponent<Omit<NumberInputFieldProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
15
|
DecrementTrigger: import("react").ForwardRefExoticComponent<Omit<NumberInput.DecrementTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
11
16
|
Input: import("react").ForwardRefExoticComponent<Omit<NumberInput.InputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
12
17
|
IncrementTrigger: import("react").ForwardRefExoticComponent<Omit<NumberInput.IncrementTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
18
|
ValueText: import("react").ForwardRefExoticComponent<Omit<NumberInput.ValueTextProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
14
19
|
};
|
|
15
20
|
//#endregion
|
|
16
|
-
export { NumberInput$1 as NumberInput };
|
|
21
|
+
export { NumberInput$1 as NumberInput, useNumberInput, useNumberInputContext };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MinusIcon, PlusIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
2
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
|
+
import { MinusIcon, PlusIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
3
3
|
import NumberInput_module_default from "./NumberInput.module.js";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { clsx } from "clsx";
|
|
6
5
|
import { forwardRef } from "react";
|
|
7
|
-
import {
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { NumberInput, useNumberInput, useNumberInputContext } from "@ark-ui/react/number-input";
|
|
8
8
|
//#region src/components/number-input/NumberInput.tsx
|
|
9
9
|
const NumberInputRoot = forwardRef(function NumberInputRoot({ className, ...props }, ref) {
|
|
10
10
|
return /* @__PURE__ */ jsx(NumberInput.Root, {
|
|
@@ -80,16 +80,29 @@ const NumberInputValueText = forwardRef(function NumberInputValueText({ classNam
|
|
|
80
80
|
...props
|
|
81
81
|
});
|
|
82
82
|
});
|
|
83
|
+
const NumberInputField = forwardRef(function NumberInputField(props, ref) {
|
|
84
|
+
return /* @__PURE__ */ jsxs(NumberInputControl, {
|
|
85
|
+
ref,
|
|
86
|
+
...props,
|
|
87
|
+
children: [
|
|
88
|
+
/* @__PURE__ */ jsx(NumberInputDecrementTrigger, {}),
|
|
89
|
+
/* @__PURE__ */ jsx(NumberInputInput, {}),
|
|
90
|
+
/* @__PURE__ */ jsx(NumberInputIncrementTrigger, {})
|
|
91
|
+
]
|
|
92
|
+
});
|
|
93
|
+
});
|
|
83
94
|
const NumberInput$1 = Object.assign(NumberInputRoot, {
|
|
84
95
|
Root: NumberInputRoot,
|
|
85
96
|
RootProvider: NumberInputRootProvider,
|
|
97
|
+
Context: NumberInput.Context,
|
|
86
98
|
Label: NumberInputLabel,
|
|
87
99
|
Scrubber: NumberInputScrubber,
|
|
88
100
|
Control: NumberInputControl,
|
|
101
|
+
Field: NumberInputField,
|
|
89
102
|
DecrementTrigger: NumberInputDecrementTrigger,
|
|
90
103
|
Input: NumberInputInput,
|
|
91
104
|
IncrementTrigger: NumberInputIncrementTrigger,
|
|
92
105
|
ValueText: NumberInputValueText
|
|
93
106
|
});
|
|
94
107
|
//#endregion
|
|
95
|
-
export { NumberInput$1 as NumberInput };
|
|
108
|
+
export { NumberInput$1 as NumberInput, useNumberInput, useNumberInputContext };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { NumberInput } from "./NumberInput.js";
|
|
2
|
-
export { NumberInput };
|
|
1
|
+
import { NumberInput, useNumberInput, useNumberInputContext } from "./NumberInput.js";
|
|
2
|
+
export { NumberInput, useNumberInput, useNumberInputContext };
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
.djsvna_item, .djsvna_trigger, .djsvna_ellipsis {
|
|
10
10
|
box-sizing: border-box;
|
|
11
|
-
min-width: var(--pagination-item-size, var(--size-
|
|
12
|
-
height: var(--pagination-item-size, var(--size-
|
|
11
|
+
min-width: var(--pagination-item-size, var(--size-md));
|
|
12
|
+
height: var(--pagination-item-size, var(--size-md));
|
|
13
13
|
border-radius: var(--pagination-item-radius, var(--radius-md));
|
|
14
14
|
font-size: var(--pagination-font-size, var(--text-sm));
|
|
15
15
|
font-weight: var(--pagination-font-weight, var(--weight-medium));
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
gap: var(--pagination-trigger-gap, var(--spacing-2));
|
|
26
26
|
border: var(--pagination-item-border-width, var(--border-width-sm)) solid
|
|
27
27
|
var(--pagination-item-border-color, var(--color-border));
|
|
28
|
-
padding-inline: var(--pagination-item-padding-inline,
|
|
28
|
+
padding-inline: var(--pagination-item-padding-inline, var(--spacing-3));
|
|
29
29
|
background-color: var(--pagination-item-bg, var(--color-background));
|
|
30
30
|
color: var(--pagination-item-color, var(--color-foreground));
|
|
31
31
|
user-select: none;
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
&:focus-visible, &[data-focus] {
|
|
47
|
-
outline: var(--pagination-focus-ring-width, var(--border-width-md))
|
|
48
|
-
var(--pagination-focus-ring-color, var(--color-ring));
|
|
49
|
-
outline-offset: var(--pagination-focus-ring-offset, -
|
|
47
|
+
outline: var(--pagination-focus-ring-width, var(--focus-ring-width, var(--border-width-md)))
|
|
48
|
+
solid var(--pagination-focus-ring-color, var(--color-ring));
|
|
49
|
+
outline-offset: var(--pagination-focus-ring-offset, var(--focus-ring-inset-offset));
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
&:is([data-disabled], :disabled) {
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
& svg {
|
|
58
|
-
width: var(--pagination-icon-size,
|
|
59
|
-
height: var(--pagination-icon-size,
|
|
58
|
+
width: var(--pagination-icon-size, var(--spacing-4));
|
|
59
|
+
height: var(--pagination-icon-size, var(--spacing-4));
|
|
60
60
|
flex-shrink: 0;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
.djsvna_trigger {
|
|
77
|
-
padding-inline: max(var(--pagination-item-padding-inline,
|
|
77
|
+
padding-inline: max(var(--pagination-item-padding-inline, var(--spacing-3)), var(--spacing-3));
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
.djsvna_iconTrigger {
|
|
81
|
-
width: var(--pagination-item-size, var(--size-
|
|
81
|
+
width: var(--pagination-item-size, var(--size-md));
|
|
82
82
|
padding-inline: 0;
|
|
83
83
|
}
|
|
84
84
|
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
display: inline-flex;
|
|
94
94
|
|
|
95
95
|
& svg + svg {
|
|
96
|
-
margin-inline-start: calc(var(--pagination-icon-size,
|
|
96
|
+
margin-inline-start: calc(var(--pagination-icon-size, var(--spacing-4)) * -.5);
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Pagination } from "@ark-ui/react/pagination";
|
|
2
2
|
|
|
3
3
|
//#region src/components/pagination/Pagination.d.ts
|
|
4
|
+
declare function PaginationItems(): import("react").JSX.Element;
|
|
4
5
|
declare const Pagination$1: import("react").ForwardRefExoticComponent<Omit<Pagination.RootProps & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>> & {
|
|
5
6
|
Root: import("react").ForwardRefExoticComponent<Omit<Pagination.RootProps & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
6
7
|
RootProvider: import("react").ForwardRefExoticComponent<Omit<Pagination.RootProviderProps & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -11,6 +12,9 @@ declare const Pagination$1: import("react").ForwardRefExoticComponent<Omit<Pagin
|
|
|
11
12
|
FirstTrigger: import("react").ForwardRefExoticComponent<Omit<Pagination.FirstTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
12
13
|
LastTrigger: import("react").ForwardRefExoticComponent<Omit<Pagination.LastTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
14
|
Context: (props: Pagination.ContextProps) => import("react").ReactNode;
|
|
15
|
+
Items: typeof PaginationItems;
|
|
16
|
+
usePagination: (props?: import("@ark-ui/react/pagination").UsePaginationProps) => import("@ark-ui/react/pagination").UsePaginationReturn;
|
|
17
|
+
usePaginationContext: () => import("@ark-ui/react/pagination").UsePaginationContext;
|
|
14
18
|
};
|
|
15
19
|
//#endregion
|
|
16
20
|
export { Pagination$1 as Pagination };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ChevronLeftIcon, ChevronRightIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
2
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
|
+
import { ChevronLeftIcon, ChevronRightIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
3
3
|
import Pagination_module_default from "./Pagination.module.js";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
4
|
import { clsx } from "clsx";
|
|
6
5
|
import { forwardRef } from "react";
|
|
7
|
-
import {
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Pagination, usePagination, usePaginationContext } from "@ark-ui/react/pagination";
|
|
8
8
|
//#region src/components/pagination/Pagination.tsx
|
|
9
9
|
const PaginationRoot = forwardRef(function PaginationRoot({ "aria-label": ariaLabel = "Pagination", className, ...props }, ref) {
|
|
10
10
|
return /* @__PURE__ */ jsx(Pagination.Root, {
|
|
@@ -86,6 +86,12 @@ const PaginationLastTrigger = forwardRef(function PaginationLastTrigger({ classN
|
|
|
86
86
|
});
|
|
87
87
|
});
|
|
88
88
|
const PaginationContext = Pagination.Context;
|
|
89
|
+
function PaginationItems() {
|
|
90
|
+
return /* @__PURE__ */ jsx(PaginationContext, { children: (pagination) => pagination.pages.map((page, index) => page.type === "page" ? /* @__PURE__ */ jsx(PaginationItem, {
|
|
91
|
+
...page,
|
|
92
|
+
children: page.value
|
|
93
|
+
}, index) : /* @__PURE__ */ jsx(PaginationEllipsis, { index }, index)) });
|
|
94
|
+
}
|
|
89
95
|
const Pagination$1 = Object.assign(PaginationRoot, {
|
|
90
96
|
Root: PaginationRoot,
|
|
91
97
|
RootProvider: PaginationRootProvider,
|
|
@@ -95,7 +101,10 @@ const Pagination$1 = Object.assign(PaginationRoot, {
|
|
|
95
101
|
NextTrigger: PaginationNextTrigger,
|
|
96
102
|
FirstTrigger: PaginationFirstTrigger,
|
|
97
103
|
LastTrigger: PaginationLastTrigger,
|
|
98
|
-
Context: PaginationContext
|
|
104
|
+
Context: PaginationContext,
|
|
105
|
+
Items: PaginationItems,
|
|
106
|
+
usePagination,
|
|
107
|
+
usePaginationContext
|
|
99
108
|
});
|
|
100
109
|
//#endregion
|
|
101
110
|
export { Pagination$1 as Pagination };
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
._8wEG0G_control {
|
|
31
31
|
box-sizing: border-box;
|
|
32
32
|
width: 100%;
|
|
33
|
-
min-height: var(--password-input-height, var(--input-height, var(--input-height-md, var(--size-
|
|
33
|
+
min-height: var(--password-input-height, var(--input-height, var(--input-height-md, var(--size-md))));
|
|
34
34
|
border: var(--input-border-width, var(--border-width-sm)) var(--input-border-style, solid)
|
|
35
35
|
var(--password-input-border-color, var(--input-border-color, var(--color-border)));
|
|
36
36
|
border-radius: var(--password-input-radius, var(--input-radius, var(--radius-md)));
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
box-sizing: border-box;
|
|
73
73
|
min-width: 0;
|
|
74
74
|
min-height: 0;
|
|
75
|
-
padding: var(--password-input-padding-y, var(--input-padding-y, var(--input-padding-y-md, var(--spacing-
|
|
75
|
+
padding: var(--password-input-padding-y, var(--input-padding-y, var(--input-padding-y-md, var(--spacing-1))))
|
|
76
76
|
var(--password-input-padding-x, var(--input-padding-x, var(--input-padding-x-md, var(--spacing-3))));
|
|
77
77
|
color: var(--password-input-color, var(--input-color, var(--color-foreground)));
|
|
78
78
|
font: inherit;
|
|
@@ -144,8 +144,8 @@
|
|
|
144
144
|
display: inline-flex;
|
|
145
145
|
|
|
146
146
|
& svg {
|
|
147
|
-
width: var(--password-input-icon-size, var(--button-icon-size,
|
|
148
|
-
height: var(--password-input-icon-size, var(--button-icon-size,
|
|
147
|
+
width: var(--password-input-icon-size, var(--button-icon-size, var(--spacing-4)));
|
|
148
|
+
height: var(--password-input-icon-size, var(--button-icon-size, var(--spacing-4)));
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
151
|
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
1
2
|
import { PasswordInput, usePasswordInput } from "@ark-ui/react/password-input";
|
|
2
3
|
|
|
3
4
|
//#region src/components/password-input/PasswordInput.d.ts
|
|
5
|
+
declare const PasswordInputControl: import("react").ForwardRefExoticComponent<Omit<PasswordInput.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
type PasswordInputFieldProps = Omit<ComponentProps<typeof PasswordInputControl>, 'asChild' | 'children'>;
|
|
4
7
|
declare const PasswordInput$1: import("react").ForwardRefExoticComponent<Omit<PasswordInput.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
5
8
|
Root: import("react").ForwardRefExoticComponent<Omit<PasswordInput.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
9
|
RootProvider: import("react").ForwardRefExoticComponent<Omit<PasswordInput.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
10
|
Label: import("react").ForwardRefExoticComponent<Omit<PasswordInput.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
8
11
|
Control: import("react").ForwardRefExoticComponent<Omit<PasswordInput.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
Field: import("react").ForwardRefExoticComponent<Omit<PasswordInputFieldProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
13
|
Input: import("react").ForwardRefExoticComponent<Omit<PasswordInput.InputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
10
14
|
VisibilityTrigger: import("react").ForwardRefExoticComponent<Omit<PasswordInput.VisibilityTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
11
15
|
Indicator: import("react").ForwardRefExoticComponent<Omit<PasswordInput.IndicatorProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { EyeClosedIcon, EyeIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
2
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
|
+
import { EyeClosedIcon, EyeIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
3
3
|
import PasswordInput_module_default from "./PasswordInput.module.js";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { clsx } from "clsx";
|
|
6
5
|
import { forwardRef } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { PasswordInput, usePasswordInput } from "@ark-ui/react/password-input";
|
|
8
8
|
//#region src/components/password-input/PasswordInput.tsx
|
|
9
9
|
const PasswordInputRoot = forwardRef(function PasswordInputRoot({ className, ...props }, ref) {
|
|
@@ -64,11 +64,19 @@ const PasswordInputIndicator = forwardRef(function PasswordInputIndicator({ clas
|
|
|
64
64
|
children: children ?? /* @__PURE__ */ jsx(EyeIcon, {})
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
|
+
const PasswordInputField = forwardRef(function PasswordInputField(props, ref) {
|
|
68
|
+
return /* @__PURE__ */ jsxs(PasswordInputControl, {
|
|
69
|
+
ref,
|
|
70
|
+
...props,
|
|
71
|
+
children: [/* @__PURE__ */ jsx(PasswordInputInput, {}), /* @__PURE__ */ jsx(PasswordInputVisibilityTrigger, { children: /* @__PURE__ */ jsx(PasswordInputIndicator, {}) })]
|
|
72
|
+
});
|
|
73
|
+
});
|
|
67
74
|
const PasswordInput$1 = Object.assign(PasswordInputRoot, {
|
|
68
75
|
Root: PasswordInputRoot,
|
|
69
76
|
RootProvider: PasswordInputRootProvider,
|
|
70
77
|
Label: PasswordInputLabel,
|
|
71
78
|
Control: PasswordInputControl,
|
|
79
|
+
Field: PasswordInputField,
|
|
72
80
|
Input: PasswordInputInput,
|
|
73
81
|
VisibilityTrigger: PasswordInputVisibilityTrigger,
|
|
74
82
|
Indicator: PasswordInputIndicator
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
|
|
28
28
|
.d_HHPW_input {
|
|
29
29
|
box-sizing: border-box;
|
|
30
|
-
width: var(--pin-input-input-width, var(--pin-input-input-size,
|
|
31
|
-
height: var(--pin-input-input-height, var(--pin-input-input-size,
|
|
30
|
+
width: var(--pin-input-input-width, var(--pin-input-input-size, var(--size-md)));
|
|
31
|
+
height: var(--pin-input-input-height, var(--pin-input-input-size, var(--size-md)));
|
|
32
32
|
border: var(--pin-input-border-width, var(--border-width-sm)) solid
|
|
33
33
|
var(--pin-input-border-color, var(--color-border));
|
|
34
34
|
border-radius: var(--pin-input-radius, var(--radius-md));
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
line-height: var(--pin-input-line-height, var(--line-height-text-lg));
|
|
43
43
|
text-align: center;
|
|
44
44
|
font-variant-numeric: tabular-nums;
|
|
45
|
-
outline: var(--pin-input-focus-ring-width, var(--pin-input-border-width, var(--border-width-sm)))
|
|
45
|
+
outline: var(--pin-input-focus-ring-width, var(--pin-input-border-width, var(--focus-ring-inset-width, var(--border-width-sm))))
|
|
46
46
|
solid transparent;
|
|
47
|
-
outline-offset: var(--pin-input-focus-ring-offset, -
|
|
47
|
+
outline-offset: var(--pin-input-focus-ring-offset, var(--focus-ring-inset-offset));
|
|
48
48
|
transition: border-color var(--pin-input-transition, var(--transition-default)),
|
|
49
49
|
outline-color var(--pin-input-transition, var(--transition-default)),
|
|
50
50
|
background-color var(--pin-input-transition, var(--transition-default));
|
|
@@ -77,8 +77,8 @@
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
.d_HHPW_separator {
|
|
80
|
-
width: var(--pin-input-separator-width, var(--pin-input-separator-size,
|
|
81
|
-
height: var(--pin-input-separator-height, var(--pin-input-separator-size,
|
|
80
|
+
width: var(--pin-input-separator-width, var(--pin-input-separator-size, var(--spacing-4)));
|
|
81
|
+
height: var(--pin-input-separator-height, var(--pin-input-separator-size, var(--spacing-4)));
|
|
82
82
|
color: var(--pin-input-separator-color, var(--color-muted-foreground));
|
|
83
83
|
pointer-events: none;
|
|
84
84
|
flex: none;
|
|
@@ -2,6 +2,11 @@ import { ComponentProps } from "react";
|
|
|
2
2
|
import { PinInput, UsePinInputProps } from "@ark-ui/react/pin-input";
|
|
3
3
|
|
|
4
4
|
//#region src/components/pin-input/PinInput.d.ts
|
|
5
|
+
declare function PinInputInputs({
|
|
6
|
+
className
|
|
7
|
+
}: {
|
|
8
|
+
className?: string;
|
|
9
|
+
}): import("react").JSX.Element[];
|
|
5
10
|
declare function PinInputSeparator({
|
|
6
11
|
className,
|
|
7
12
|
'aria-hidden': ariaHidden,
|
|
@@ -16,7 +21,7 @@ declare const PinInput$1: import("react").ForwardRefExoticComponent<Omit<PinInpu
|
|
|
16
21
|
Label: import("react").ForwardRefExoticComponent<Omit<PinInput.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
17
22
|
Control: import("react").ForwardRefExoticComponent<Omit<PinInput.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
23
|
Input: import("react").ForwardRefExoticComponent<Omit<PinInput.InputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
19
|
-
|
|
24
|
+
Inputs: typeof PinInputInputs;
|
|
20
25
|
Separator: typeof PinInputSeparator;
|
|
21
26
|
};
|
|
22
27
|
//#endregion
|
|
@@ -1,28 +1,31 @@
|
|
|
1
|
-
import { SeparatorMarkIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
2
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
|
+
import { SeparatorMarkIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
3
3
|
import PinInput_module_default from "./PinInput.module.js";
|
|
4
|
-
import { jsx } 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 { PinInput, usePinInput, usePinInputContext } from "@ark-ui/react/pin-input";
|
|
8
8
|
//#region src/components/pin-input/PinInput.tsx
|
|
9
|
-
const PinInputRoot = forwardRef(function PinInputRoot({ children, className, count, placeholder = "", ...props }, ref) {
|
|
9
|
+
const PinInputRoot = forwardRef(function PinInputRoot({ asChild, children, className, count, placeholder = "", ...props }, ref) {
|
|
10
10
|
return /* @__PURE__ */ jsx(PinInput.Root, {
|
|
11
11
|
ref,
|
|
12
|
+
asChild,
|
|
12
13
|
"data-slot": "pin-input-root",
|
|
13
14
|
className: clsx(PinInput_module_default.root, normalizeClassName(className)),
|
|
14
15
|
count,
|
|
15
16
|
placeholder,
|
|
16
17
|
...props,
|
|
17
|
-
children
|
|
18
|
+
children: withHiddenInput(children, asChild)
|
|
18
19
|
});
|
|
19
20
|
});
|
|
20
|
-
const PinInputRootProvider = forwardRef(function PinInputRootProvider({ className, ...props }, ref) {
|
|
21
|
+
const PinInputRootProvider = forwardRef(function PinInputRootProvider({ asChild, children, className, ...props }, ref) {
|
|
21
22
|
return /* @__PURE__ */ jsx(PinInput.RootProvider, {
|
|
22
23
|
ref,
|
|
24
|
+
asChild,
|
|
23
25
|
"data-slot": "pin-input-root-provider",
|
|
24
26
|
className: clsx(PinInput_module_default.root, normalizeClassName(className)),
|
|
25
|
-
...props
|
|
27
|
+
...props,
|
|
28
|
+
children: withHiddenInput(children, asChild)
|
|
26
29
|
});
|
|
27
30
|
});
|
|
28
31
|
const PinInputLabel = forwardRef(function PinInputLabel({ className, ...props }, ref) {
|
|
@@ -49,13 +52,19 @@ const PinInputInput = forwardRef(function PinInputInput({ className, ...props },
|
|
|
49
52
|
...props
|
|
50
53
|
});
|
|
51
54
|
});
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
});
|
|
58
|
-
}
|
|
55
|
+
function PinInputInputs({ className }) {
|
|
56
|
+
const { items } = usePinInputContext();
|
|
57
|
+
return items.map((index) => /* @__PURE__ */ jsx(PinInputInput, {
|
|
58
|
+
index,
|
|
59
|
+
className
|
|
60
|
+
}, index));
|
|
61
|
+
}
|
|
62
|
+
function withHiddenInput(children, asChild) {
|
|
63
|
+
const hiddenInput = /* @__PURE__ */ jsx(PinInput.HiddenInput, { "data-slot": "pin-input-hidden-input" });
|
|
64
|
+
if (!asChild) return /* @__PURE__ */ jsxs(Fragment$1, { children: [children, hiddenInput] });
|
|
65
|
+
const child = Children.only(children);
|
|
66
|
+
return cloneElement(child, {}, child.props.children, hiddenInput);
|
|
67
|
+
}
|
|
59
68
|
function PinInputSeparator({ className, "aria-hidden": ariaHidden = true, role = "presentation", children, ...props }) {
|
|
60
69
|
return /* @__PURE__ */ jsx("span", {
|
|
61
70
|
"data-slot": "pin-input-separator",
|
|
@@ -78,7 +87,7 @@ const PinInput$1 = Object.assign(PinInputRoot, {
|
|
|
78
87
|
Label: PinInputLabel,
|
|
79
88
|
Control: PinInputControl,
|
|
80
89
|
Input: PinInputInput,
|
|
81
|
-
|
|
90
|
+
Inputs: PinInputInputs,
|
|
82
91
|
Separator: PinInputSeparator
|
|
83
92
|
});
|
|
84
93
|
//#endregion
|