@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
|
@@ -26,21 +26,36 @@
|
|
|
26
26
|
display: inline-flex;
|
|
27
27
|
|
|
28
28
|
&:focus-visible {
|
|
29
|
-
outline: var(--button-focus-ring-width, var(--border-width-md)) solid
|
|
29
|
+
outline: var(--button-focus-ring-width, var(--focus-ring-width, var(--border-width-md))) solid
|
|
30
30
|
var(--button-focus-ring-color, var(--color-ring));
|
|
31
31
|
outline-offset: calc(var(--button-focus-ring-offset, var(--button-border-width, var(--border-width-sm))) * -1);
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
&:active:not([data-disabled]) {
|
|
35
|
+
opacity: .9;
|
|
36
|
+
}
|
|
37
|
+
|
|
34
38
|
&[data-disabled] {
|
|
35
39
|
opacity: var(--button-disabled-opacity, var(--opacity-disabled));
|
|
36
40
|
cursor: default;
|
|
37
41
|
pointer-events: none;
|
|
38
42
|
}
|
|
39
43
|
|
|
44
|
+
&[data-loading] {
|
|
45
|
+
cursor: progress;
|
|
46
|
+
}
|
|
47
|
+
|
|
40
48
|
& :where(svg) {
|
|
41
|
-
width: var(--button-icon-size,
|
|
42
|
-
height: var(--button-icon-size,
|
|
49
|
+
width: var(--button-icon-size, var(--spacing-4));
|
|
50
|
+
height: var(--button-icon-size, var(--spacing-4));
|
|
51
|
+
flex-shrink: 0;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
& [data-icon="inline-start"], & [data-icon="inline-end"] {
|
|
43
55
|
flex-shrink: 0;
|
|
56
|
+
justify-content: center;
|
|
57
|
+
align-items: center;
|
|
58
|
+
display: inline-flex;
|
|
44
59
|
}
|
|
45
60
|
|
|
46
61
|
&[data-variant="default"] {
|
|
@@ -50,7 +65,7 @@
|
|
|
50
65
|
|
|
51
66
|
@media (hover: hover) {
|
|
52
67
|
&:not([data-disabled]):hover {
|
|
53
|
-
background-color: var(--button-default-bg-hover, var(--color-
|
|
68
|
+
background-color: var(--button-default-bg-hover, color-mix(in srgb, var(--button-default-bg, var(--color-primary)) 88%, black));
|
|
54
69
|
}
|
|
55
70
|
}
|
|
56
71
|
}
|
|
@@ -82,7 +97,7 @@
|
|
|
82
97
|
&[data-variant="destructive"] {
|
|
83
98
|
border-color: var(--button-destructive-border-color, var(--color-destructive));
|
|
84
99
|
background-color: var(--button-destructive-bg, var(--color-destructive));
|
|
85
|
-
color: var(--button-destructive-color, var(--color-
|
|
100
|
+
color: var(--button-destructive-color, var(--color-destructive-foreground));
|
|
86
101
|
|
|
87
102
|
@media (hover: hover) {
|
|
88
103
|
&:not([data-disabled]):hover {
|
|
@@ -99,7 +114,7 @@
|
|
|
99
114
|
@media (hover: hover) {
|
|
100
115
|
&:not([data-disabled]):hover {
|
|
101
116
|
background-color: var(--button-destructive-outline-bg-hover, var(--color-destructive));
|
|
102
|
-
color: var(--button-destructive-outline-color-hover, var(--button-destructive-color, var(--color-
|
|
117
|
+
color: var(--button-destructive-outline-color-hover, var(--button-destructive-color, var(--color-destructive-foreground)));
|
|
103
118
|
}
|
|
104
119
|
}
|
|
105
120
|
}
|
|
@@ -133,36 +148,36 @@
|
|
|
133
148
|
|
|
134
149
|
&[data-size="xs"] {
|
|
135
150
|
min-height: var(--button-size-xs, var(--size-xs));
|
|
136
|
-
padding-block: var(--button-padding-y-xs,
|
|
137
|
-
padding-inline: var(--button-padding-x-xs,
|
|
151
|
+
padding-block: var(--button-padding-y-xs, var(--spacing-0-5));
|
|
152
|
+
padding-inline: var(--button-padding-x-xs, var(--spacing-2-5));
|
|
138
153
|
font-size: var(--button-font-size-xs, var(--text-xs));
|
|
139
154
|
line-height: var(--button-line-height-xs, var(--line-height-text-xs));
|
|
140
155
|
}
|
|
141
156
|
|
|
142
157
|
&[data-size="sm"] {
|
|
143
158
|
min-height: var(--button-size-sm, var(--size-sm));
|
|
144
|
-
padding-block: var(--button-padding-y-sm,
|
|
145
|
-
padding-inline: var(--button-padding-x-sm,
|
|
159
|
+
padding-block: var(--button-padding-y-sm, var(--spacing-1));
|
|
160
|
+
padding-inline: var(--button-padding-x-sm, var(--spacing-3));
|
|
146
161
|
}
|
|
147
162
|
|
|
148
163
|
&[data-size="md"] {
|
|
149
|
-
min-height: var(--button-size-md, var(--size-
|
|
150
|
-
padding-block: var(--button-padding-y-md,
|
|
151
|
-
padding-inline: var(--button-padding-x-md,
|
|
164
|
+
min-height: var(--button-size-md, var(--size-md));
|
|
165
|
+
padding-block: var(--button-padding-y-md, var(--spacing-1));
|
|
166
|
+
padding-inline: var(--button-padding-x-md, var(--spacing-4));
|
|
152
167
|
}
|
|
153
168
|
|
|
154
169
|
&[data-size="lg"] {
|
|
155
|
-
min-height: var(--button-size-lg, var(--size-
|
|
156
|
-
padding-block: var(--button-padding-y-lg,
|
|
157
|
-
padding-inline: var(--button-padding-x-lg,
|
|
170
|
+
min-height: var(--button-size-lg, var(--size-lg));
|
|
171
|
+
padding-block: var(--button-padding-y-lg, var(--spacing-1-5));
|
|
172
|
+
padding-inline: var(--button-padding-x-lg, var(--spacing-5));
|
|
158
173
|
font-size: var(--button-font-size-lg, var(--text-md));
|
|
159
174
|
line-height: var(--button-line-height-lg, var(--line-height-text-md));
|
|
160
175
|
}
|
|
161
176
|
|
|
162
177
|
&[data-size="xl"] {
|
|
163
|
-
min-height: var(--button-size-xl,
|
|
164
|
-
padding-block: var(--button-padding-y-xl,
|
|
165
|
-
padding-inline: var(--button-padding-x-xl,
|
|
178
|
+
min-height: var(--button-size-xl, var(--size-xl));
|
|
179
|
+
padding-block: var(--button-padding-y-xl, var(--spacing-2));
|
|
180
|
+
padding-inline: var(--button-padding-x-xl, var(--spacing-6));
|
|
166
181
|
font-size: var(--button-font-size-xl, var(--text-lg));
|
|
167
182
|
line-height: var(--button-line-height-xl, var(--line-height-text-lg));
|
|
168
183
|
}
|
|
@@ -179,15 +194,20 @@
|
|
|
179
194
|
}
|
|
180
195
|
|
|
181
196
|
&[data-size="icon-md"] {
|
|
182
|
-
width: var(--button-size-icon-md, var(--size-
|
|
183
|
-
min-width: var(--button-size-icon-md, var(--size-
|
|
184
|
-
height: var(--button-size-icon-md, var(--size-
|
|
197
|
+
width: var(--button-size-icon-md, var(--size-md));
|
|
198
|
+
min-width: var(--button-size-icon-md, var(--size-md));
|
|
199
|
+
height: var(--button-size-icon-md, var(--size-md));
|
|
185
200
|
}
|
|
186
201
|
|
|
187
202
|
&[data-size="icon-lg"] {
|
|
188
|
-
width: var(--button-size-icon-lg, var(--size-
|
|
189
|
-
min-width: var(--button-size-icon-lg, var(--size-
|
|
190
|
-
height: var(--button-size-icon-lg, var(--size-
|
|
203
|
+
width: var(--button-size-icon-lg, var(--size-lg));
|
|
204
|
+
min-width: var(--button-size-icon-lg, var(--size-lg));
|
|
205
|
+
height: var(--button-size-icon-lg, var(--size-lg));
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
&[data-variant="link"] {
|
|
209
|
+
min-height: 0;
|
|
210
|
+
padding-block: 0;
|
|
191
211
|
}
|
|
192
212
|
}
|
|
193
213
|
}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
//#region src/components/button/Button.d.ts
|
|
2
2
|
declare const Button: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
3
|
+
loading?: boolean;
|
|
3
4
|
variant?: "default" | "outline" | "secondary" | "destructive" | "destructive-outline" | "ghost" | "link";
|
|
4
5
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "icon-sm" | "icon-md" | "icon-lg";
|
|
6
|
+
'data-scope'?: string;
|
|
7
|
+
'data-part'?: string;
|
|
5
8
|
'data-slot'?: string;
|
|
6
9
|
} & import("react").RefAttributes<HTMLButtonElement>> & {
|
|
7
10
|
Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
11
|
+
loading?: boolean;
|
|
8
12
|
variant?: "default" | "outline" | "secondary" | "destructive" | "destructive-outline" | "ghost" | "link";
|
|
9
13
|
size?: "xs" | "sm" | "md" | "lg" | "xl" | "icon-sm" | "icon-md" | "icon-lg";
|
|
14
|
+
'data-scope'?: string;
|
|
15
|
+
'data-part'?: string;
|
|
10
16
|
'data-slot'?: string;
|
|
11
17
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
12
18
|
};
|
|
@@ -1,25 +1,30 @@
|
|
|
1
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
2
|
import Button_module_default from "./Button.module.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { ark } from "@ark-ui/react/factory";
|
|
5
4
|
import { clsx } from "clsx";
|
|
6
5
|
import { forwardRef } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/button/Button.tsx
|
|
8
|
-
const ButtonRoot = forwardRef(function ButtonRoot({ asChild, className, disabled, size = "md", type, "data-slot": dataSlot, variant = "default", "aria-disabled": ariaDisabled, ...props }, ref) {
|
|
9
|
-
const
|
|
8
|
+
const ButtonRoot = forwardRef(function ButtonRoot({ asChild, className, disabled, loading = false, size = "md", type, "data-scope": dataScope = "button", "data-part": dataPart = "root", "data-slot": dataSlot, variant = "default", "aria-busy": ariaBusy, "aria-disabled": ariaDisabled, ...props }, ref) {
|
|
9
|
+
const nativeDisabled = asChild ? void 0 : loading || disabled;
|
|
10
|
+
const resolvedAriaBusy = loading ? true : ariaBusy;
|
|
11
|
+
const resolvedAriaDisabled = loading ? true : ariaDisabled;
|
|
12
|
+
const isDisabled = disabled || loading || resolvedAriaDisabled === true || resolvedAriaDisabled === "true";
|
|
10
13
|
return /* @__PURE__ */ jsx(ark.button, {
|
|
11
14
|
ref,
|
|
12
15
|
asChild,
|
|
13
16
|
type: asChild ? type : type ?? "button",
|
|
14
|
-
disabled,
|
|
15
|
-
"aria-
|
|
17
|
+
disabled: nativeDisabled,
|
|
18
|
+
"aria-busy": resolvedAriaBusy,
|
|
19
|
+
"aria-disabled": resolvedAriaDisabled,
|
|
16
20
|
...props,
|
|
17
|
-
"data-scope":
|
|
18
|
-
"data-part":
|
|
21
|
+
"data-scope": dataScope,
|
|
22
|
+
"data-part": dataPart,
|
|
19
23
|
"data-slot": dataSlot ?? "button-root",
|
|
20
24
|
"data-variant": variant,
|
|
21
25
|
"data-size": size,
|
|
22
26
|
"data-disabled": isDisabled ? "" : void 0,
|
|
27
|
+
"data-loading": loading ? "" : void 0,
|
|
23
28
|
className: clsx(Button_module_default.root, normalizeClassName(className))
|
|
24
29
|
});
|
|
25
30
|
});
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@layer ui.components {
|
|
2
2
|
._2rXk6G_root {
|
|
3
|
-
--card-padding-default: var(--card-padding, var(--spacing-6));
|
|
3
|
+
--card-padding-default: var(--card-spacing, var(--card-padding, var(--spacing-6)));
|
|
4
|
+
--card-section-spacing-default: var(--card-spacing, var(--card-body-padding-top, var(--spacing-4)));
|
|
4
5
|
--card-title-font-size-default: var(--card-title-font-size, var(--text-lg));
|
|
5
6
|
--card-title-line-height-default: var(--card-title-line-height, var(--line-height-text-lg));
|
|
6
7
|
box-sizing: border-box;
|
|
@@ -21,13 +22,15 @@
|
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
&[data-size="sm"] {
|
|
24
|
-
--card-padding-default: var(--card-padding-sm, var(--spacing-4));
|
|
25
|
+
--card-padding-default: var(--card-spacing-sm, var(--card-spacing, var(--card-padding-sm, var(--spacing-4))));
|
|
26
|
+
--card-section-spacing-default: var(--card-spacing-sm, var(--card-spacing, var(--card-body-padding-top, var(--spacing-4))));
|
|
25
27
|
--card-title-font-size-default: var(--card-title-font-size-sm, var(--text-md));
|
|
26
28
|
--card-title-line-height-default: var(--card-title-line-height-sm, var(--line-height-text-md));
|
|
27
29
|
}
|
|
28
30
|
|
|
29
31
|
&[data-size="lg"] {
|
|
30
|
-
--card-padding-default: var(--card-padding-lg, var(--spacing-8));
|
|
32
|
+
--card-padding-default: var(--card-spacing-lg, var(--card-spacing, var(--card-padding-lg, var(--spacing-8))));
|
|
33
|
+
--card-section-spacing-default: var(--card-spacing-lg, var(--card-spacing, var(--card-body-padding-top, var(--spacing-4))));
|
|
31
34
|
--card-title-font-size-default: var(--card-title-font-size-lg, var(--text-xl));
|
|
32
35
|
--card-title-line-height-default: var(--card-title-line-height-lg, var(--line-height-text-xl));
|
|
33
36
|
}
|
|
@@ -62,8 +65,21 @@
|
|
|
62
65
|
display: grid;
|
|
63
66
|
}
|
|
64
67
|
|
|
68
|
+
._2rXk6G_media {
|
|
69
|
+
border-start-start-radius: inherit;
|
|
70
|
+
border-start-end-radius: inherit;
|
|
71
|
+
min-width: 0;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
|
|
74
|
+
& > :where(img, picture, video, canvas, svg, iframe) {
|
|
75
|
+
width: 100%;
|
|
76
|
+
max-width: 100%;
|
|
77
|
+
display: block;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
65
81
|
._2rXk6G_body {
|
|
66
|
-
padding-block: var(--card-
|
|
82
|
+
padding-block: var(--card-section-spacing-default) var(--card-padding-default);
|
|
67
83
|
color: var(--card-body-color, var(--color-muted-foreground));
|
|
68
84
|
font-size: var(--card-body-font-size, var(--text-sm));
|
|
69
85
|
line-height: var(--card-body-line-height, var(--line-height-text-sm));
|
|
@@ -140,7 +156,7 @@
|
|
|
140
156
|
}
|
|
141
157
|
|
|
142
158
|
&:focus-visible:after {
|
|
143
|
-
outline: var(--card-focus-ring-width, var(--border-width-md)) solid
|
|
159
|
+
outline: var(--card-focus-ring-width, var(--focus-ring-width, var(--border-width-md))) solid
|
|
144
160
|
var(--card-focus-ring-color, var(--color-ring));
|
|
145
161
|
outline-offset: var(--card-focus-ring-offset, var(--border-width-sm));
|
|
146
162
|
}
|
|
@@ -9,6 +9,7 @@ declare const Card: import("react").ForwardRefExoticComponent<Omit<import("react
|
|
|
9
9
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
10
|
Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
11
|
Body: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
|
+
Media: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
13
|
Footer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
14
|
Title: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
14
15
|
Description: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
2
|
import Card_module_default from "./Card.module.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { ark } from "@ark-ui/react/factory";
|
|
5
4
|
import { clsx } from "clsx";
|
|
6
5
|
import { forwardRef } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/card/Card.tsx
|
|
8
8
|
const CardRoot = forwardRef(function CardRoot({ className, size = "md", variant = "outline", ...props }, ref) {
|
|
9
9
|
return /* @__PURE__ */ jsx(ark.div, {
|
|
@@ -37,6 +37,16 @@ const CardBody = forwardRef(function CardBody({ className, ...props }, ref) {
|
|
|
37
37
|
...props
|
|
38
38
|
});
|
|
39
39
|
});
|
|
40
|
+
const CardMedia = forwardRef(function CardMedia({ className, ...props }, ref) {
|
|
41
|
+
return /* @__PURE__ */ jsx(ark.div, {
|
|
42
|
+
ref,
|
|
43
|
+
"data-scope": "card",
|
|
44
|
+
"data-part": "media",
|
|
45
|
+
"data-slot": "card-media",
|
|
46
|
+
className: clsx(Card_module_default.media, normalizeClassName(className)),
|
|
47
|
+
...props
|
|
48
|
+
});
|
|
49
|
+
});
|
|
40
50
|
const CardFooter = forwardRef(function CardFooter({ className, ...props }, ref) {
|
|
41
51
|
return /* @__PURE__ */ jsx(ark.div, {
|
|
42
52
|
ref,
|
|
@@ -91,6 +101,7 @@ const Card = Object.assign(CardRoot, {
|
|
|
91
101
|
Root: CardRoot,
|
|
92
102
|
Header: CardHeader,
|
|
93
103
|
Body: CardBody,
|
|
104
|
+
Media: CardMedia,
|
|
94
105
|
Footer: CardFooter,
|
|
95
106
|
Title: CardTitle,
|
|
96
107
|
Description: CardDescription,
|
|
@@ -47,6 +47,8 @@
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
.NQiVeG_root[data-orientation="vertical"] > .NQiVeG_itemGroup {
|
|
50
|
+
overscroll-behavior-x: auto;
|
|
51
|
+
overscroll-behavior-y: contain;
|
|
50
52
|
height: 100%;
|
|
51
53
|
}
|
|
52
54
|
|
|
@@ -57,8 +59,8 @@
|
|
|
57
59
|
}
|
|
58
60
|
|
|
59
61
|
.NQiVeG_prevTrigger, .NQiVeG_nextTrigger, .NQiVeG_autoplayTrigger {
|
|
60
|
-
width: var(--carousel-control-size,
|
|
61
|
-
height: var(--carousel-control-size,
|
|
62
|
+
width: var(--carousel-control-size, var(--size-md));
|
|
63
|
+
height: var(--carousel-control-size, var(--size-md));
|
|
62
64
|
border: var(--border-width-sm) solid
|
|
63
65
|
var(--carousel-control-border-color, color-mix(in oklab, var(--color-border) 88%, black 12%));
|
|
64
66
|
border-radius: var(--radius-full);
|
|
@@ -77,8 +79,8 @@
|
|
|
77
79
|
display: inline-flex;
|
|
78
80
|
|
|
79
81
|
& svg {
|
|
80
|
-
width:
|
|
81
|
-
height:
|
|
82
|
+
width: var(--carousel-control-icon-size, var(--spacing-4));
|
|
83
|
+
height: var(--carousel-control-icon-size, var(--spacing-4));
|
|
82
84
|
}
|
|
83
85
|
|
|
84
86
|
&:not(:disabled, [data-disabled]):hover {
|
|
@@ -89,9 +91,9 @@
|
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
&:focus-visible {
|
|
92
|
-
outline: var(--carousel-focus-ring-width, var(--border-width-md))
|
|
93
|
-
var(--carousel-focus-ring-color, var(--color-ring));
|
|
94
|
-
outline-offset: var(--carousel-focus-ring-offset,
|
|
94
|
+
outline: var(--carousel-focus-ring-width, var(--focus-ring-width, var(--border-width-md)))
|
|
95
|
+
solid var(--carousel-focus-ring-color, var(--color-ring));
|
|
96
|
+
outline-offset: var(--carousel-focus-ring-offset, var(--focus-ring-offset));
|
|
95
97
|
}
|
|
96
98
|
|
|
97
99
|
&:is(:disabled, [data-disabled]) {
|
|
@@ -132,8 +134,8 @@
|
|
|
132
134
|
}
|
|
133
135
|
|
|
134
136
|
.NQiVeG_indicator {
|
|
135
|
-
width: var(--carousel-indicator-size,
|
|
136
|
-
height: var(--carousel-indicator-size,
|
|
137
|
+
width: var(--carousel-indicator-size, var(--spacing-2));
|
|
138
|
+
height: var(--carousel-indicator-size, var(--spacing-2));
|
|
137
139
|
border-radius: var(--radius-full);
|
|
138
140
|
background-color: var(--carousel-indicator-bg, color-mix(in oklab, var(--color-muted) 84%, var(--color-background) 16%));
|
|
139
141
|
cursor: pointer;
|
|
@@ -150,13 +152,13 @@
|
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
&:focus-visible {
|
|
153
|
-
outline: var(--carousel-focus-ring-width, var(--border-width-md))
|
|
154
|
-
var(--carousel-focus-ring-color, var(--color-ring));
|
|
155
|
-
outline-offset: var(--carousel-focus-ring-offset,
|
|
155
|
+
outline: var(--carousel-focus-ring-width, var(--focus-ring-width, var(--border-width-md)))
|
|
156
|
+
solid var(--carousel-focus-ring-color, var(--color-ring));
|
|
157
|
+
outline-offset: var(--carousel-focus-ring-offset, var(--focus-ring-offset));
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
&[data-current] {
|
|
159
|
-
width: calc(var(--carousel-indicator-size,
|
|
161
|
+
width: calc(var(--carousel-indicator-size, var(--spacing-2)) * 3);
|
|
160
162
|
background-color: var(--carousel-indicator-bg-current, var(--color-primary));
|
|
161
163
|
opacity: 1;
|
|
162
164
|
}
|
|
@@ -169,17 +171,17 @@
|
|
|
169
171
|
|
|
170
172
|
.NQiVeG_root[data-orientation="vertical"] > .NQiVeG_indicatorGroup .NQiVeG_indicator, .NQiVeG_control[data-orientation="vertical"] > .NQiVeG_indicatorGroup .NQiVeG_indicator {
|
|
171
173
|
&[data-current] {
|
|
172
|
-
width: var(--carousel-indicator-size,
|
|
173
|
-
height: calc(var(--carousel-indicator-size,
|
|
174
|
+
width: var(--carousel-indicator-size, var(--spacing-2));
|
|
175
|
+
height: calc(var(--carousel-indicator-size, var(--spacing-2)) * 3);
|
|
174
176
|
}
|
|
175
177
|
}
|
|
176
178
|
|
|
177
179
|
.NQiVeG_autoplayTrigger {
|
|
178
|
-
min-width:
|
|
180
|
+
min-width: var(--carousel-autoplay-trigger-min-width, calc(var(--size-md) + var(--spacing-3)));
|
|
179
181
|
}
|
|
180
182
|
|
|
181
183
|
.NQiVeG_autoplayIndicator {
|
|
182
|
-
min-width:
|
|
184
|
+
min-width: var(--carousel-autoplay-indicator-min-width, var(--spacing-4));
|
|
183
185
|
font-size: var(--text-xs);
|
|
184
186
|
font-weight: var(--weight-medium);
|
|
185
187
|
line-height: var(--line-height-text-xs);
|
|
@@ -4,6 +4,7 @@ import { Carousel } from "@ark-ui/react/carousel";
|
|
|
4
4
|
declare const Carousel$1: import("react").ForwardRefExoticComponent<Omit<Carousel.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
5
5
|
Root: import("react").ForwardRefExoticComponent<Omit<Carousel.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
6
|
RootProvider: import("react").ForwardRefExoticComponent<Omit<Carousel.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
Context: (props: Carousel.ContextProps) => import("react").ReactNode;
|
|
7
8
|
Control: import("react").ForwardRefExoticComponent<Omit<Carousel.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
9
|
ItemGroup: import("react").ForwardRefExoticComponent<Omit<Carousel.ItemGroupProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
10
|
Item: import("react").ForwardRefExoticComponent<Omit<Carousel.ItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -11,6 +12,9 @@ declare const Carousel$1: import("react").ForwardRefExoticComponent<Omit<Carouse
|
|
|
11
12
|
NextTrigger: import("react").ForwardRefExoticComponent<Omit<Carousel.NextTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
12
13
|
IndicatorGroup: import("react").ForwardRefExoticComponent<Omit<Carousel.IndicatorGroupProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
14
|
Indicator: import("react").ForwardRefExoticComponent<Omit<Carousel.IndicatorProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
|
+
Indicators: import("react").ForwardRefExoticComponent<Omit<Carousel.IndicatorGroupProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
16
|
+
indicatorClassName?: string;
|
|
17
|
+
}, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
18
|
AutoplayTrigger: import("react").ForwardRefExoticComponent<Omit<Carousel.AutoplayTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
15
19
|
AutoplayIndicator: import("react").ForwardRefExoticComponent<Omit<Carousel.AutoplayIndicatorProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
16
20
|
ProgressText: import("react").ForwardRefExoticComponent<Omit<Carousel.ProgressTextProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
@@ -1,9 +1,9 @@
|
|
|
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 Carousel_module_default from "./Carousel.module.js";
|
|
4
|
-
import { jsx } from "react/jsx-runtime";
|
|
5
4
|
import { clsx } from "clsx";
|
|
6
5
|
import { forwardRef } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
import { Carousel } from "@ark-ui/react/carousel";
|
|
8
8
|
//#region src/components/carousel/Carousel.tsx
|
|
9
9
|
const CarouselRoot = forwardRef(function CarouselRoot({ className, ...props }, ref) {
|
|
@@ -86,6 +86,17 @@ const CarouselIndicator = forwardRef(function CarouselIndicator({ className, ...
|
|
|
86
86
|
...props
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
|
+
const CarouselIndicators = forwardRef(function CarouselIndicators({ className, indicatorClassName, ...props }, ref) {
|
|
90
|
+
return /* @__PURE__ */ jsx(Carousel.Context, { children: (api) => /* @__PURE__ */ jsx(CarouselIndicatorGroup, {
|
|
91
|
+
ref,
|
|
92
|
+
className,
|
|
93
|
+
...props,
|
|
94
|
+
children: api.pageSnapPoints.map((_, index) => /* @__PURE__ */ jsx(CarouselIndicator, {
|
|
95
|
+
index,
|
|
96
|
+
className: indicatorClassName
|
|
97
|
+
}, index))
|
|
98
|
+
}) });
|
|
99
|
+
});
|
|
89
100
|
const CarouselAutoplayTrigger = forwardRef(function CarouselAutoplayTrigger({ className, ...props }, ref) {
|
|
90
101
|
return /* @__PURE__ */ jsx(Carousel.AutoplayTrigger, {
|
|
91
102
|
ref,
|
|
@@ -113,6 +124,7 @@ const CarouselProgressText = forwardRef(function CarouselProgressText({ classNam
|
|
|
113
124
|
const Carousel$1 = Object.assign(CarouselRoot, {
|
|
114
125
|
Root: CarouselRoot,
|
|
115
126
|
RootProvider: CarouselRootProvider,
|
|
127
|
+
Context: Carousel.Context,
|
|
116
128
|
Control: CarouselControl,
|
|
117
129
|
ItemGroup: CarouselItemGroup,
|
|
118
130
|
Item: CarouselItem,
|
|
@@ -120,6 +132,7 @@ const Carousel$1 = Object.assign(CarouselRoot, {
|
|
|
120
132
|
NextTrigger: CarouselNextTrigger,
|
|
121
133
|
IndicatorGroup: CarouselIndicatorGroup,
|
|
122
134
|
Indicator: CarouselIndicator,
|
|
135
|
+
Indicators: CarouselIndicators,
|
|
123
136
|
AutoplayTrigger: CarouselAutoplayTrigger,
|
|
124
137
|
AutoplayIndicator: CarouselAutoplayIndicator,
|
|
125
138
|
ProgressText: CarouselProgressText
|
|
@@ -44,14 +44,14 @@
|
|
|
44
44
|
}
|
|
45
45
|
|
|
46
46
|
&[data-focus-visible] {
|
|
47
|
-
outline: var(--checkbox-focus-ring-width, var(--border-width-sm))
|
|
48
|
-
var(--checkbox-focus-ring-color, var(--color-ring));
|
|
47
|
+
outline: var(--checkbox-focus-ring-width, var(--focus-ring-inset-width, var(--border-width-sm)))
|
|
48
|
+
solid var(--checkbox-focus-ring-color, var(--color-ring));
|
|
49
49
|
outline-offset: var(--checkbox-focus-ring-offset, var(--border-width-sm));
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
&[data-invalid] {
|
|
53
53
|
border-color: var(--checkbox-border-color-invalid, var(--color-destructive));
|
|
54
|
-
color: var(--checkbox-color-invalid, var(--color-
|
|
54
|
+
color: var(--checkbox-color-invalid, var(--color-destructive-foreground));
|
|
55
55
|
|
|
56
56
|
&[data-state="checked"], &[data-state="indeterminate"] {
|
|
57
57
|
border-color: var(--checkbox-border-color-invalid, var(--color-destructive));
|
|
@@ -71,28 +71,28 @@
|
|
|
71
71
|
}
|
|
72
72
|
|
|
73
73
|
.NxmH7W_root[data-size="xs"] .NxmH7W_control {
|
|
74
|
-
--_checkbox-size: var(--checkbox-size-xs,
|
|
75
|
-
--_checkbox-icon-size: var(--checkbox-icon-size-xs,
|
|
74
|
+
--_checkbox-size: var(--checkbox-size-xs, var(--spacing-3-5));
|
|
75
|
+
--_checkbox-icon-size: var(--checkbox-icon-size-xs, var(--spacing-2));
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
.NxmH7W_root[data-size="sm"] .NxmH7W_control {
|
|
79
|
-
--_checkbox-size: var(--checkbox-size-sm,
|
|
80
|
-
--_checkbox-icon-size: var(--checkbox-icon-size-sm,
|
|
79
|
+
--_checkbox-size: var(--checkbox-size-sm, var(--spacing-4));
|
|
80
|
+
--_checkbox-icon-size: var(--checkbox-icon-size-sm, var(--spacing-2-5));
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
.NxmH7W_root[data-size="md"] .NxmH7W_control {
|
|
84
|
-
--_checkbox-size: var(--checkbox-size-md,
|
|
85
|
-
--_checkbox-icon-size: var(--checkbox-icon-size-md,
|
|
84
|
+
--_checkbox-size: var(--checkbox-size-md, var(--spacing-5));
|
|
85
|
+
--_checkbox-icon-size: var(--checkbox-icon-size-md, var(--spacing-3));
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
.NxmH7W_root[data-size="lg"] .NxmH7W_control {
|
|
89
|
-
--_checkbox-size: var(--checkbox-size-lg,
|
|
90
|
-
--_checkbox-icon-size: var(--checkbox-icon-size-lg,
|
|
89
|
+
--_checkbox-size: var(--checkbox-size-lg, var(--size-xs));
|
|
90
|
+
--_checkbox-icon-size: var(--checkbox-icon-size-lg, var(--spacing-3-5));
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
.NxmH7W_root[data-size="xl"] .NxmH7W_control {
|
|
94
|
-
--_checkbox-size: var(--checkbox-size-xl,
|
|
95
|
-
--_checkbox-icon-size: var(--checkbox-icon-size-xl,
|
|
94
|
+
--_checkbox-size: var(--checkbox-size-xl, var(--spacing-7));
|
|
95
|
+
--_checkbox-icon-size: var(--checkbox-icon-size-xl, var(--spacing-4));
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
.NxmH7W_indicator {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
|
-
import { Checkbox } from "@ark-ui/react/checkbox";
|
|
2
|
+
import { Checkbox, useCheckbox, useCheckboxGroup } from "@ark-ui/react/checkbox";
|
|
3
3
|
|
|
4
4
|
//#region src/components/checkbox/Checkbox.d.ts
|
|
5
5
|
type CheckboxSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
@@ -14,9 +14,8 @@ declare const Checkbox$1: import("react").ForwardRefExoticComponent<Omit<RootPro
|
|
|
14
14
|
RootProvider: import("react").ForwardRefExoticComponent<Omit<RootProviderProps, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
15
15
|
Control: import("react").ForwardRefExoticComponent<Omit<Checkbox.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
16
|
Indicator: import("react").ForwardRefExoticComponent<Omit<Checkbox.IndicatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
-
HiddenInput: import("react").ForwardRefExoticComponent<Omit<Checkbox.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
18
17
|
Label: import("react").ForwardRefExoticComponent<Omit<Checkbox.LabelProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
19
18
|
Group: import("react").ForwardRefExoticComponent<Omit<Checkbox.GroupProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
19
|
};
|
|
21
20
|
//#endregion
|
|
22
|
-
export { Checkbox$1 as Checkbox };
|
|
21
|
+
export { Checkbox$1 as Checkbox, useCheckbox, useCheckboxGroup };
|
|
@@ -1,35 +1,31 @@
|
|
|
1
|
-
import { CheckIcon, IndeterminateIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
2
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
|
+
import { CheckIcon, IndeterminateIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
3
3
|
import Checkbox_module_default from "./Checkbox.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 { Checkbox, useCheckbox, useCheckboxGroup } from "@ark-ui/react/checkbox";
|
|
8
8
|
//#region src/components/checkbox/Checkbox.tsx
|
|
9
|
-
const CheckboxRoot = forwardRef(function CheckboxRoot({ className, size = "md", ...props }, ref) {
|
|
9
|
+
const CheckboxRoot = forwardRef(function CheckboxRoot({ asChild, children, className, size = "md", ...props }, ref) {
|
|
10
10
|
return /* @__PURE__ */ jsx(Checkbox.Root, {
|
|
11
11
|
ref,
|
|
12
|
+
asChild,
|
|
12
13
|
"data-slot": "checkbox-root",
|
|
13
14
|
"data-size": size,
|
|
14
15
|
className: clsx(Checkbox_module_default.root, normalizeClassName(className)),
|
|
15
|
-
...props
|
|
16
|
+
...props,
|
|
17
|
+
children: withHiddenInput(children, asChild)
|
|
16
18
|
});
|
|
17
19
|
});
|
|
18
|
-
const CheckboxRootProvider = forwardRef(function CheckboxRootProvider({ className, size = "md", ...props }, ref) {
|
|
20
|
+
const CheckboxRootProvider = forwardRef(function CheckboxRootProvider({ asChild, children, className, size = "md", ...props }, ref) {
|
|
19
21
|
return /* @__PURE__ */ jsx(Checkbox.RootProvider, {
|
|
20
22
|
ref,
|
|
23
|
+
asChild,
|
|
21
24
|
"data-slot": "checkbox-root-provider",
|
|
22
25
|
"data-size": size,
|
|
23
26
|
className: clsx(Checkbox_module_default.root, normalizeClassName(className)),
|
|
24
|
-
...props
|
|
25
|
-
|
|
26
|
-
});
|
|
27
|
-
const CheckboxControl = forwardRef(function CheckboxControl({ className, ...props }, ref) {
|
|
28
|
-
return /* @__PURE__ */ jsx(Checkbox.Control, {
|
|
29
|
-
ref,
|
|
30
|
-
"data-slot": "checkbox-control",
|
|
31
|
-
className: clsx(Checkbox_module_default.control, normalizeClassName(className)),
|
|
32
|
-
...props
|
|
27
|
+
...props,
|
|
28
|
+
children: withHiddenInput(children, asChild)
|
|
33
29
|
});
|
|
34
30
|
});
|
|
35
31
|
const CheckboxIndicator = forwardRef(function CheckboxIndicator({ className, children, indeterminate, ...props }, ref) {
|
|
@@ -48,13 +44,21 @@ const CheckboxIndicator = forwardRef(function CheckboxIndicator({ className, chi
|
|
|
48
44
|
})
|
|
49
45
|
});
|
|
50
46
|
});
|
|
51
|
-
const
|
|
52
|
-
return /* @__PURE__ */ jsx(Checkbox.
|
|
47
|
+
const CheckboxControl = forwardRef(function CheckboxControl({ children, className, ...props }, ref) {
|
|
48
|
+
return /* @__PURE__ */ jsx(Checkbox.Control, {
|
|
53
49
|
ref,
|
|
54
|
-
"data-slot": "checkbox-
|
|
55
|
-
|
|
50
|
+
"data-slot": "checkbox-control",
|
|
51
|
+
className: clsx(Checkbox_module_default.control, normalizeClassName(className)),
|
|
52
|
+
...props,
|
|
53
|
+
children: children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(CheckboxIndicator, {}), /* @__PURE__ */ jsx(CheckboxIndicator, { indeterminate: true })] })
|
|
56
54
|
});
|
|
57
55
|
});
|
|
56
|
+
function withHiddenInput(children, asChild) {
|
|
57
|
+
const hiddenInput = /* @__PURE__ */ jsx(Checkbox.HiddenInput, { "data-slot": "checkbox-hidden-input" });
|
|
58
|
+
if (!asChild) return /* @__PURE__ */ jsxs(Fragment$1, { children: [children, hiddenInput] });
|
|
59
|
+
const child = Children.only(children);
|
|
60
|
+
return cloneElement(child, {}, child.props.children, hiddenInput);
|
|
61
|
+
}
|
|
58
62
|
const CheckboxLabel = forwardRef(function CheckboxLabel({ className, ...props }, ref) {
|
|
59
63
|
return /* @__PURE__ */ jsx(Checkbox.Label, {
|
|
60
64
|
ref,
|
|
@@ -76,9 +80,8 @@ const Checkbox$1 = Object.assign(CheckboxRoot, {
|
|
|
76
80
|
RootProvider: CheckboxRootProvider,
|
|
77
81
|
Control: CheckboxControl,
|
|
78
82
|
Indicator: CheckboxIndicator,
|
|
79
|
-
HiddenInput: CheckboxHiddenInput,
|
|
80
83
|
Label: CheckboxLabel,
|
|
81
84
|
Group: CheckboxGroup
|
|
82
85
|
});
|
|
83
86
|
//#endregion
|
|
84
|
-
export { Checkbox$1 as Checkbox };
|
|
87
|
+
export { Checkbox$1 as Checkbox, useCheckbox, useCheckboxGroup };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Checkbox } from "./Checkbox.js";
|
|
2
|
-
export { Checkbox };
|
|
1
|
+
import { Checkbox, useCheckbox, useCheckboxGroup } from "./Checkbox.js";
|
|
2
|
+
export { Checkbox, useCheckbox, useCheckboxGroup };
|