@moduix/react 1.1.1 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -16
- package/dist/components/accordion/Accordion.css +8 -1
- 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 +19 -5
- 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.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 +44 -1
- 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 +7 -1
- 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 +21 -1
- package/dist/components/button/Button.d.ts +6 -0
- package/dist/components/button/Button.js +12 -7
- package/dist/components/card/Card.css +20 -4
- 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 +2 -0
- package/dist/components/carousel/Carousel.d.ts +4 -0
- package/dist/components/carousel/Carousel.js +15 -2
- 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 +1 -1
- package/dist/components/clipboard/Clipboard.d.ts +2 -0
- package/dist/components/clipboard/Clipboard.js +15 -4
- 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 +9 -2
- 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 +35 -6
- 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 +37 -8
- 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 +40 -74
- 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 +3 -1
- 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 +41 -13
- 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 +14 -10
- 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.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.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.js +1 -1
- package/dist/components/field/Field.css +0 -4
- 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 +81 -8
- 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 +14 -10
- package/dist/components/floating-panel/FloatingPanel.d.ts +11 -3
- package/dist/components/floating-panel/FloatingPanel.js +15 -9
- package/dist/components/heading/Heading.js +1 -1
- package/dist/components/highlight/Highlight.js +1 -1
- package/dist/components/hover-card/HoverCard.css +14 -10
- 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.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.js +1 -1
- package/dist/components/input-group/InputGroup.d.ts +3 -0
- package/dist/components/input-group/InputGroup.js +1 -1
- package/dist/components/kbd/Kbd.js +1 -1
- package/dist/components/lightbox/Lightbox.css +12 -10
- 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 +60 -1
- 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 +14 -8
- 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.d.ts +6 -2
- package/dist/components/native-select/NativeSelect.js +5 -4
- package/dist/components/number-input/NumberInput.css +0 -6
- 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.d.ts +4 -0
- package/dist/components/pagination/Pagination.js +13 -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.d.ts +6 -1
- package/dist/components/pin-input/PinInput.js +25 -16
- package/dist/components/popover/Popover.css +20 -11
- package/dist/components/popover/Popover.js +1 -1
- 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.d.ts +3 -0
- package/dist/components/progress-linear/ProgressLinear.js +6 -3
- package/dist/components/qr-code/QrCode.css +3 -2
- 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.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 +3 -3
- 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 +7 -2
- 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.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 +24 -15
- package/dist/components/select/Select.d.ts +18 -4
- package/dist/components/select/Select.js +65 -20
- package/dist/components/separator/Separator.js +1 -1
- package/dist/components/sidebar/Sidebar.css +144 -4
- 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 +12 -41
- 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.js +1 -1
- package/dist/components/slider/Slider.css +6 -4
- 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.js +2 -2
- 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 +13 -12
- 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.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 +2 -2
- 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 +3 -1
- 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 +12 -42
- package/dist/components/tag/Tag.js +7 -20
- package/dist/components/tags-input/TagsInput.css +3 -40
- 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.js +1 -1
- 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.d.ts +3 -1
- package/dist/components/toast/Toast.js +11 -2
- package/dist/components/toggle/Toggle.css +3 -3
- 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 +14 -10
- 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 +23 -18
- package/dist/components/tour/Tour.d.ts +6 -0
- package/dist/components/tour/Tour.js +8 -1
- package/dist/components/tree-view/TreeView.css +1 -1
- 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/index.d.ts +40 -39
- package/dist/index.js +40 -39
- package/dist/lib/moduix/icons/ui/Icons.d.ts +1 -45
- package/dist/lib/moduix/icons/ui/Icons.js +36 -263
- package/dist/lib/moduix/icons/ui/index.d.ts +2 -2
- package/dist/lib/moduix/overlayPortal.js +1 -1
- package/package.json +4 -3
|
@@ -4,11 +4,16 @@ var Sidebar_module_default = {
|
|
|
4
4
|
"content": "_3sukta_content",
|
|
5
5
|
"footer": "_3sukta_footer",
|
|
6
6
|
"group": "_3sukta_group",
|
|
7
|
+
"groupAction": "_3sukta_groupAction",
|
|
8
|
+
"groupContent": "_3sukta_groupContent",
|
|
7
9
|
"groupLabel": "_3sukta_groupLabel",
|
|
8
10
|
"header": "_3sukta_header",
|
|
11
|
+
"input": "_3sukta_input",
|
|
9
12
|
"inset": "_3sukta_inset",
|
|
10
13
|
"label": "_3sukta_label",
|
|
11
14
|
"menu": "_3sukta_menu",
|
|
15
|
+
"menuAction": "_3sukta_menuAction",
|
|
16
|
+
"menuBadge": "_3sukta_menuBadge",
|
|
12
17
|
"menuButton": "_3sukta_menuButton",
|
|
13
18
|
"menuItem": "_3sukta_menuItem",
|
|
14
19
|
"menuSub": "_3sukta_menuSub",
|
|
@@ -17,6 +22,7 @@ var Sidebar_module_default = {
|
|
|
17
22
|
"panel": "_3sukta_panel",
|
|
18
23
|
"resizeTrigger": "_3sukta_resizeTrigger",
|
|
19
24
|
"root": "_3sukta_root",
|
|
25
|
+
"separator": "_3sukta_separator",
|
|
20
26
|
"trigger": "_3sukta_trigger"
|
|
21
27
|
};
|
|
22
28
|
//#endregion
|
|
@@ -75,49 +75,20 @@
|
|
|
75
75
|
._wse8a_clearTrigger {
|
|
76
76
|
top: var(--signature-pad-clear-trigger-offset, var(--spacing-2));
|
|
77
77
|
right: var(--signature-pad-clear-trigger-offset, var(--spacing-2));
|
|
78
|
-
box-sizing: border-box;
|
|
79
|
-
width: var(--signature-pad-clear-trigger-size, var(--size-md));
|
|
80
|
-
height: var(--signature-pad-clear-trigger-size, var(--size-md));
|
|
81
78
|
border: var(--signature-pad-clear-trigger-border-width, 0) solid
|
|
82
79
|
var(--signature-pad-clear-trigger-border-color, transparent);
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
line-height: 0;
|
|
96
|
-
display: inline-flex;
|
|
80
|
+
--close-button-size: var(--signature-pad-clear-trigger-size, var(--size-md));
|
|
81
|
+
--close-button-radius: var(--signature-pad-clear-trigger-radius, var(--radius-sm));
|
|
82
|
+
--close-button-bg: var(--signature-pad-clear-trigger-bg, transparent);
|
|
83
|
+
--close-button-bg-hover: var(--signature-pad-clear-trigger-bg-hover, var(--color-accent));
|
|
84
|
+
--close-button-color: var(--signature-pad-clear-trigger-color, var(--color-muted-foreground));
|
|
85
|
+
--close-button-color-hover: var(--signature-pad-clear-trigger-color-hover, var(--color-foreground));
|
|
86
|
+
--close-button-icon-size: var(--signature-pad-clear-trigger-icon-size, 1rem);
|
|
87
|
+
--close-button-transition: var(--signature-pad-transition, var(--transition-default));
|
|
88
|
+
--close-button-focus-ring-width: var(--signature-pad-clear-trigger-focus-ring-width, var(--border-width-md));
|
|
89
|
+
--close-button-focus-ring-color: var(--signature-pad-clear-trigger-focus-ring-color, var(--color-ring));
|
|
90
|
+
--close-button-focus-ring-offset: var(--signature-pad-clear-trigger-focus-ring-offset, var(--spacing-1));
|
|
91
|
+
--close-button-disabled-opacity: var(--signature-pad-disabled-opacity, var(--opacity-disabled));
|
|
97
92
|
position: absolute;
|
|
98
93
|
}
|
|
99
|
-
|
|
100
|
-
._wse8a_clearTrigger :where(svg) {
|
|
101
|
-
width: var(--signature-pad-clear-trigger-icon-size, 1rem);
|
|
102
|
-
height: var(--signature-pad-clear-trigger-icon-size, 1rem);
|
|
103
|
-
flex-shrink: 0;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
@media (hover: hover) {
|
|
107
|
-
._wse8a_clearTrigger:hover:not(:disabled, [data-disabled]) {
|
|
108
|
-
background-color: var(--signature-pad-clear-trigger-bg-hover, var(--color-accent));
|
|
109
|
-
color: var(--signature-pad-clear-trigger-color-hover, var(--color-foreground));
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
._wse8a_clearTrigger:focus-visible {
|
|
114
|
-
outline: var(--signature-pad-clear-trigger-focus-ring-width, var(--border-width-md)) solid
|
|
115
|
-
var(--signature-pad-clear-trigger-focus-ring-color, var(--color-ring));
|
|
116
|
-
outline-offset: var(--signature-pad-clear-trigger-focus-ring-offset, var(--spacing-1));
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
._wse8a_clearTrigger:disabled, ._wse8a_clearTrigger[data-disabled] {
|
|
120
|
-
pointer-events: none;
|
|
121
|
-
opacity: var(--signature-pad-disabled-opacity, var(--opacity-disabled));
|
|
122
|
-
}
|
|
123
94
|
}
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import { SignaturePad, useSignaturePad } from "@ark-ui/react/signature-pad";
|
|
1
|
+
import { SignaturePad, useSignaturePad, useSignaturePadContext } from "@ark-ui/react/signature-pad";
|
|
2
2
|
|
|
3
3
|
//#region src/components/signature-pad/SignaturePad.d.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
type SignaturePadFormProps = {
|
|
5
|
+
getFormValue?: (paths: string[]) => string;
|
|
6
|
+
};
|
|
7
|
+
declare function SignaturePadCanvas({
|
|
8
|
+
className
|
|
9
|
+
}: {
|
|
10
|
+
className?: string;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
declare const SignaturePad$1: import("react").ForwardRefExoticComponent<Omit<SignaturePad.RootProps & import("react").RefAttributes<HTMLDivElement> & SignaturePadFormProps, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
13
|
+
Root: import("react").ForwardRefExoticComponent<Omit<SignaturePad.RootProps & import("react").RefAttributes<HTMLDivElement> & SignaturePadFormProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
RootProvider: import("react").ForwardRefExoticComponent<Omit<SignaturePad.RootProviderProps & import("react").RefAttributes<HTMLDivElement> & SignaturePadFormProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
15
|
Label: import("react").ForwardRefExoticComponent<Omit<SignaturePad.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
8
16
|
Control: import("react").ForwardRefExoticComponent<Omit<SignaturePad.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
Canvas: typeof SignaturePadCanvas;
|
|
9
18
|
Segment: import("react").ForwardRefExoticComponent<Omit<SignaturePad.SegmentProps & import("react").RefAttributes<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
|
|
10
19
|
Guide: import("react").ForwardRefExoticComponent<Omit<SignaturePad.GuideProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
20
|
ClearTrigger: import("react").ForwardRefExoticComponent<Omit<SignaturePad.ClearTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
12
|
-
HiddenInput: import("react").ForwardRefExoticComponent<Omit<SignaturePad.HiddenInputProps & import("react").RefAttributes<HTMLInputElement>, "ref"> & import("react").RefAttributes<HTMLInputElement>>;
|
|
13
21
|
};
|
|
14
22
|
//#endregion
|
|
15
|
-
export { SignaturePad$1 as SignaturePad, useSignaturePad };
|
|
23
|
+
export { SignaturePad$1 as SignaturePad, useSignaturePad, useSignaturePadContext };
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
|
+
import { RotateCcwIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
3
|
+
import { CloseButton } from "../close-button/CloseButton.js";
|
|
2
4
|
import SignaturePad_module_default from "./SignaturePad.module.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
5
|
import { clsx } from "clsx";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
|
-
import {
|
|
6
|
+
import { Children, cloneElement, forwardRef } from "react";
|
|
7
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { SignaturePad, useSignaturePad, useSignaturePadContext } from "@ark-ui/react/signature-pad";
|
|
7
9
|
//#region src/components/signature-pad/SignaturePad.tsx
|
|
8
|
-
const SignaturePadRoot = forwardRef(function SignaturePadRoot({ className, ...props }, ref) {
|
|
10
|
+
const SignaturePadRoot = forwardRef(function SignaturePadRoot({ asChild, children, className, getFormValue, ...props }, ref) {
|
|
9
11
|
return /* @__PURE__ */ jsx(SignaturePad.Root, {
|
|
10
12
|
ref,
|
|
11
13
|
"data-slot": "signature-pad-root",
|
|
12
14
|
className: clsx(SignaturePad_module_default.root, normalizeClassName(className)),
|
|
13
|
-
|
|
15
|
+
asChild,
|
|
16
|
+
...props,
|
|
17
|
+
children: withHiddenInput(children, asChild, getFormValue)
|
|
14
18
|
});
|
|
15
19
|
});
|
|
16
|
-
const SignaturePadRootProvider = forwardRef(function SignaturePadRootProvider({ className, ...props }, ref) {
|
|
20
|
+
const SignaturePadRootProvider = forwardRef(function SignaturePadRootProvider({ asChild, children, className, getFormValue, ...props }, ref) {
|
|
17
21
|
return /* @__PURE__ */ jsx(SignaturePad.RootProvider, {
|
|
18
22
|
ref,
|
|
19
23
|
"data-slot": "signature-pad-root-provider",
|
|
20
24
|
className: clsx(SignaturePad_module_default.root, normalizeClassName(className)),
|
|
21
|
-
|
|
25
|
+
asChild,
|
|
26
|
+
...props,
|
|
27
|
+
children: withHiddenInput(children, asChild, getFormValue)
|
|
22
28
|
});
|
|
23
29
|
});
|
|
24
30
|
const SignaturePadLabel = forwardRef(function SignaturePadLabel({ className, ...props }, ref) {
|
|
@@ -53,30 +59,63 @@ const SignaturePadGuide = forwardRef(function SignaturePadGuide({ className, ...
|
|
|
53
59
|
...props
|
|
54
60
|
});
|
|
55
61
|
});
|
|
56
|
-
const SignaturePadClearTrigger = forwardRef(function SignaturePadClearTrigger({ className, ...props }, ref) {
|
|
62
|
+
const SignaturePadClearTrigger = forwardRef(function SignaturePadClearTrigger({ asChild, className, children, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, ...props }, ref) {
|
|
63
|
+
const triggerClassName = clsx(SignaturePad_module_default.clearTrigger, normalizeClassName(className));
|
|
64
|
+
if (asChild) return /* @__PURE__ */ jsx(SignaturePad.ClearTrigger, {
|
|
65
|
+
ref,
|
|
66
|
+
asChild: true,
|
|
67
|
+
"data-slot": "signature-pad-clear-trigger",
|
|
68
|
+
className: triggerClassName,
|
|
69
|
+
"aria-label": ariaLabel,
|
|
70
|
+
"aria-labelledby": ariaLabelledBy,
|
|
71
|
+
...props,
|
|
72
|
+
children
|
|
73
|
+
});
|
|
57
74
|
return /* @__PURE__ */ jsx(SignaturePad.ClearTrigger, {
|
|
58
75
|
ref,
|
|
76
|
+
asChild: true,
|
|
59
77
|
"data-slot": "signature-pad-clear-trigger",
|
|
60
|
-
className:
|
|
61
|
-
...props
|
|
78
|
+
className: triggerClassName,
|
|
79
|
+
...props,
|
|
80
|
+
children: /* @__PURE__ */ jsx(CloseButton.Root, {
|
|
81
|
+
"aria-label": ariaLabel,
|
|
82
|
+
"aria-labelledby": ariaLabelledBy,
|
|
83
|
+
children: children ?? /* @__PURE__ */ jsx(RotateCcwIcon, { "aria-hidden": "true" })
|
|
84
|
+
})
|
|
62
85
|
});
|
|
63
86
|
});
|
|
64
|
-
|
|
87
|
+
function withHiddenInput(children, asChild, getFormValue) {
|
|
88
|
+
const hiddenInput = /* @__PURE__ */ jsx(SignaturePadFormInput, { getFormValue });
|
|
89
|
+
if (!asChild) return /* @__PURE__ */ jsxs(Fragment$1, { children: [children, hiddenInput] });
|
|
90
|
+
const child = Children.only(children);
|
|
91
|
+
return cloneElement(child, {}, child.props.children, hiddenInput);
|
|
92
|
+
}
|
|
93
|
+
function SignaturePadFormInput({ getFormValue }) {
|
|
94
|
+
const signaturePad = useSignaturePadContext();
|
|
65
95
|
return /* @__PURE__ */ jsx(SignaturePad.HiddenInput, {
|
|
66
|
-
ref,
|
|
67
96
|
"data-slot": "signature-pad-hidden-input",
|
|
68
|
-
|
|
97
|
+
value: getFormValue?.(signaturePad.paths) ?? signaturePad.paths.join(" ")
|
|
69
98
|
});
|
|
70
|
-
}
|
|
99
|
+
}
|
|
100
|
+
function SignaturePadCanvas({ className }) {
|
|
101
|
+
return /* @__PURE__ */ jsxs(SignaturePadControl, {
|
|
102
|
+
className,
|
|
103
|
+
children: [
|
|
104
|
+
/* @__PURE__ */ jsx(SignaturePadSegment, {}),
|
|
105
|
+
/* @__PURE__ */ jsx(SignaturePadClearTrigger, { children: /* @__PURE__ */ jsx(RotateCcwIcon, { "aria-hidden": "true" }) }),
|
|
106
|
+
/* @__PURE__ */ jsx(SignaturePadGuide, {})
|
|
107
|
+
]
|
|
108
|
+
});
|
|
109
|
+
}
|
|
71
110
|
const SignaturePad$1 = Object.assign(SignaturePadRoot, {
|
|
72
111
|
Root: SignaturePadRoot,
|
|
73
112
|
RootProvider: SignaturePadRootProvider,
|
|
74
113
|
Label: SignaturePadLabel,
|
|
75
114
|
Control: SignaturePadControl,
|
|
115
|
+
Canvas: SignaturePadCanvas,
|
|
76
116
|
Segment: SignaturePadSegment,
|
|
77
117
|
Guide: SignaturePadGuide,
|
|
78
|
-
ClearTrigger: SignaturePadClearTrigger
|
|
79
|
-
HiddenInput: SignaturePadHiddenInput
|
|
118
|
+
ClearTrigger: SignaturePadClearTrigger
|
|
80
119
|
});
|
|
81
120
|
//#endregion
|
|
82
|
-
export { SignaturePad$1 as SignaturePad, useSignaturePad };
|
|
121
|
+
export { SignaturePad$1 as SignaturePad, useSignaturePad, useSignaturePadContext };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { SignaturePad, useSignaturePad } from "./SignaturePad.js";
|
|
2
|
-
export { SignaturePad, useSignaturePad };
|
|
1
|
+
import { SignaturePad, useSignaturePad, useSignaturePadContext } from "./SignaturePad.js";
|
|
2
|
+
export { SignaturePad, useSignaturePad, useSignaturePadContext };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
|
-
import { jsx } from "react/jsx-runtime";
|
|
3
2
|
import { ark } from "@ark-ui/react/factory";
|
|
4
3
|
import { clsx } from "clsx";
|
|
5
4
|
import { forwardRef } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
//#region src/components/simple-grid/SimpleGrid.tsx
|
|
7
7
|
const SimpleGridRoot = forwardRef(function SimpleGridRoot({ asChild, className, style, columns, minChildWidth, gap, rowGap, columnGap, ...props }, ref) {
|
|
8
8
|
let gridTemplateColumns = "minmax(0, 1fr)";
|
|
@@ -10,12 +10,12 @@ const SimpleGridRoot = forwardRef(function SimpleGridRoot({ asChild, className,
|
|
|
10
10
|
if (minChildWidth != null) gridTemplateColumns = `repeat(auto-fit, minmax(min(100%, ${typeof minChildWidth === "number" ? `${minChildWidth}px` : minChildWidth}), 1fr))`;
|
|
11
11
|
const rootStyle = {
|
|
12
12
|
display: "grid",
|
|
13
|
-
gridTemplateColumns
|
|
14
|
-
...style
|
|
13
|
+
gridTemplateColumns
|
|
15
14
|
};
|
|
16
15
|
if (gap != null) rootStyle.gap = gap;
|
|
17
16
|
if (rowGap != null) rootStyle.rowGap = rowGap;
|
|
18
17
|
if (columnGap != null) rootStyle.columnGap = columnGap;
|
|
18
|
+
Object.assign(rootStyle, style);
|
|
19
19
|
return /* @__PURE__ */ jsx(ark.div, {
|
|
20
20
|
...props,
|
|
21
21
|
ref,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
2
|
import Skeleton_module_default from "./Skeleton.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/skeleton/Skeleton.tsx
|
|
8
8
|
const toCssValue = (value) => typeof value === "number" ? `${value}px` : value;
|
|
9
9
|
const SkeletonRoot = forwardRef(function SkeletonRoot({ "aria-hidden": ariaHidden, asChild, borderRadius, boxSize, className, height, loading = true, style, variant = "pulse", width, ...props }, ref) {
|
|
@@ -102,13 +102,15 @@
|
|
|
102
102
|
align-items: center;
|
|
103
103
|
display: flex;
|
|
104
104
|
|
|
105
|
-
|
|
105
|
+
&[data-dragging] {
|
|
106
106
|
border-color: var(--slider-focus-ring-color, var(--color-ring));
|
|
107
|
-
box-shadow: 0 0 0 var(--border-width-sm) var(--slider-focus-ring-color, var(--color-ring))
|
|
107
|
+
box-shadow: 0 0 0 var(--border-width-sm) var(--slider-focus-ring-color, var(--color-ring)),
|
|
108
|
+
var(--slider-thumb-shadow-dragging, var(--shadow-md));
|
|
108
109
|
}
|
|
109
110
|
|
|
110
|
-
|
|
111
|
-
|
|
111
|
+
&:focus-visible {
|
|
112
|
+
border-color: var(--slider-focus-ring-color, var(--color-ring));
|
|
113
|
+
box-shadow: 0 0 0 var(--border-width-sm) var(--slider-focus-ring-color, var(--color-ring));
|
|
112
114
|
}
|
|
113
115
|
|
|
114
116
|
&[data-disabled] {
|
|
@@ -1,19 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { Slider, useSlider, useSliderContext } from "@ark-ui/react/slider";
|
|
2
3
|
|
|
3
4
|
//#region src/components/slider/Slider.d.ts
|
|
5
|
+
declare function SliderThumbs({
|
|
6
|
+
className
|
|
7
|
+
}: {
|
|
8
|
+
className?: string;
|
|
9
|
+
}): import("react").JSX.Element[];
|
|
4
10
|
declare const Slider$1: import("react").ForwardRefExoticComponent<Omit<Slider.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
5
11
|
Root: import("react").ForwardRefExoticComponent<Omit<Slider.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
12
|
RootProvider: import("react").ForwardRefExoticComponent<Omit<Slider.RootProviderProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
Context: (props: Slider.ContextProps) => ReactNode;
|
|
14
|
+
useSlider: (props?: import("@ark-ui/react/slider").UseSliderProps) => import("@ark-ui/react/slider").UseSliderReturn;
|
|
15
|
+
useSliderContext: () => import("@ark-ui/react/slider").UseSliderContext;
|
|
7
16
|
Label: import("react").ForwardRefExoticComponent<Omit<Slider.LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & import("react").RefAttributes<HTMLLabelElement>>;
|
|
8
17
|
ValueText: import("react").ForwardRefExoticComponent<Omit<Slider.ValueTextProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
18
|
Control: import("react").ForwardRefExoticComponent<Omit<Slider.ControlProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
19
|
Track: import("react").ForwardRefExoticComponent<Omit<Slider.TrackProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
20
|
Range: import("react").ForwardRefExoticComponent<Omit<Slider.RangeProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
12
21
|
Thumb: import("react").ForwardRefExoticComponent<Omit<Slider.ThumbProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
-
|
|
22
|
+
Thumbs: typeof SliderThumbs;
|
|
14
23
|
MarkerGroup: import("react").ForwardRefExoticComponent<Omit<Slider.MarkerGroupProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
24
|
Marker: import("react").ForwardRefExoticComponent<Omit<Slider.MarkerProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
16
25
|
DraggingIndicator: import("react").ForwardRefExoticComponent<Omit<Slider.DraggingIndicatorProps & import("react").RefAttributes<HTMLSpanElement>, "ref"> & import("react").RefAttributes<HTMLSpanElement>>;
|
|
17
26
|
};
|
|
18
27
|
//#endregion
|
|
19
|
-
export { Slider$1 as Slider };
|
|
28
|
+
export { Slider$1 as Slider, useSlider, useSliderContext };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
2
|
import Slider_module_default from "./Slider.module.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
5
|
-
import { forwardRef } from "react";
|
|
6
|
-
import {
|
|
4
|
+
import { Children, cloneElement, forwardRef } from "react";
|
|
5
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Slider, useSlider, useSliderContext } from "@ark-ui/react/slider";
|
|
7
7
|
//#region src/components/slider/Slider.tsx
|
|
8
8
|
const SliderRoot = forwardRef(function SliderRoot({ className, ...props }, ref) {
|
|
9
9
|
return /* @__PURE__ */ jsx(Slider.Root, {
|
|
@@ -61,22 +61,28 @@ const SliderRange = forwardRef(function SliderRange({ className, ...props }, ref
|
|
|
61
61
|
...props
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
|
-
const SliderThumb = forwardRef(function SliderThumb({ className, ...props }, ref) {
|
|
64
|
+
const SliderThumb = forwardRef(function SliderThumb({ asChild, children, className, ...props }, ref) {
|
|
65
65
|
return /* @__PURE__ */ jsx(Slider.Thumb, {
|
|
66
66
|
ref,
|
|
67
|
+
asChild,
|
|
67
68
|
"data-slot": "slider-thumb",
|
|
68
69
|
className: clsx(Slider_module_default.thumb, normalizeClassName(className)),
|
|
69
|
-
...props
|
|
70
|
-
|
|
71
|
-
});
|
|
72
|
-
const SliderHiddenInput = forwardRef(function SliderHiddenInput({ className, ...props }, ref) {
|
|
73
|
-
return /* @__PURE__ */ jsx(Slider.HiddenInput, {
|
|
74
|
-
ref,
|
|
75
|
-
"data-slot": "slider-hidden-input",
|
|
76
|
-
className: normalizeClassName(className),
|
|
77
|
-
...props
|
|
70
|
+
...props,
|
|
71
|
+
children: withHiddenInput(children, asChild)
|
|
78
72
|
});
|
|
79
73
|
});
|
|
74
|
+
function withHiddenInput(children, asChild) {
|
|
75
|
+
const hiddenInput = /* @__PURE__ */ jsx(Slider.HiddenInput, { "data-slot": "slider-hidden-input" });
|
|
76
|
+
if (!asChild) return /* @__PURE__ */ jsxs(Fragment$1, { children: [children, hiddenInput] });
|
|
77
|
+
const child = Children.only(children);
|
|
78
|
+
return cloneElement(child, {}, child.props.children, hiddenInput);
|
|
79
|
+
}
|
|
80
|
+
function SliderThumbs({ className }) {
|
|
81
|
+
return useSliderContext().value.map((_, index) => /* @__PURE__ */ jsx(SliderThumb, {
|
|
82
|
+
index,
|
|
83
|
+
className
|
|
84
|
+
}, index));
|
|
85
|
+
}
|
|
80
86
|
const SliderMarkerGroup = forwardRef(function SliderMarkerGroup({ className, ...props }, ref) {
|
|
81
87
|
return /* @__PURE__ */ jsx(Slider.MarkerGroup, {
|
|
82
88
|
ref,
|
|
@@ -104,16 +110,19 @@ const SliderDraggingIndicator = forwardRef(function SliderDraggingIndicator({ cl
|
|
|
104
110
|
const Slider$1 = Object.assign(SliderRoot, {
|
|
105
111
|
Root: SliderRoot,
|
|
106
112
|
RootProvider: SliderRootProvider,
|
|
113
|
+
Context: Slider.Context,
|
|
114
|
+
useSlider,
|
|
115
|
+
useSliderContext,
|
|
107
116
|
Label: SliderLabel,
|
|
108
117
|
ValueText: SliderValueText,
|
|
109
118
|
Control: SliderControl,
|
|
110
119
|
Track: SliderTrack,
|
|
111
120
|
Range: SliderRange,
|
|
112
121
|
Thumb: SliderThumb,
|
|
113
|
-
|
|
122
|
+
Thumbs: SliderThumbs,
|
|
114
123
|
MarkerGroup: SliderMarkerGroup,
|
|
115
124
|
Marker: SliderMarker,
|
|
116
125
|
DraggingIndicator: SliderDraggingIndicator
|
|
117
126
|
});
|
|
118
127
|
//#endregion
|
|
119
|
-
export { Slider$1 as Slider };
|
|
128
|
+
export { Slider$1 as Slider, useSlider, useSliderContext };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Slider } from "./Slider.js";
|
|
2
|
-
export { Slider };
|
|
1
|
+
import { Slider, useSlider, useSliderContext } from "./Slider.js";
|
|
2
|
+
export { Slider, useSlider, useSliderContext };
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
2
|
import Spinner_module_default from "./Spinner.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/spinner/Spinner.tsx
|
|
8
8
|
const SpinnerRoot = forwardRef(function SpinnerRoot({ asChild, children, className, decorative = false, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, size = "md", ...props }, ref) {
|
|
9
9
|
const accessibleLabel = decorative ? void 0 : ariaLabel ?? (ariaLabelledBy ? void 0 : "Loading");
|
|
10
10
|
return /* @__PURE__ */ jsx(ark.span, {
|
|
11
11
|
ref,
|
|
12
12
|
asChild,
|
|
13
|
+
...props,
|
|
13
14
|
"data-scope": "spinner",
|
|
14
15
|
"data-part": "root",
|
|
15
16
|
"data-slot": "spinner-root",
|
|
@@ -19,7 +20,6 @@ const SpinnerRoot = forwardRef(function SpinnerRoot({ asChild, children, classNa
|
|
|
19
20
|
"aria-label": accessibleLabel,
|
|
20
21
|
"aria-labelledby": decorative ? void 0 : ariaLabelledBy,
|
|
21
22
|
className: clsx(Spinner_module_default.root, normalizeClassName(className)),
|
|
22
|
-
...props,
|
|
23
23
|
children: asChild ? children : /* @__PURE__ */ jsx("span", {
|
|
24
24
|
"data-scope": "spinner",
|
|
25
25
|
"data-part": "indicator",
|
|
@@ -11,7 +11,7 @@ type SplitButtonActionProps = Omit<ButtonProps, 'size' | 'variant'> & {
|
|
|
11
11
|
size?: SplitButtonSize;
|
|
12
12
|
variant?: SplitButtonVariant;
|
|
13
13
|
};
|
|
14
|
-
type SplitButtonTriggerProps = ComponentProps<typeof Menu.Trigger> & {
|
|
14
|
+
type SplitButtonTriggerProps = Omit<ComponentProps<typeof Menu.Trigger>, 'asChild'> & {
|
|
15
15
|
size?: SplitButtonSize;
|
|
16
16
|
variant?: SplitButtonVariant;
|
|
17
17
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
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 { Button } from "../button/Button.js";
|
|
4
4
|
import { Menu } from "../menu/Menu.js";
|
|
5
5
|
import SplitButton_module_default from "./SplitButton.module.js";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
6
|
import { clsx } from "clsx";
|
|
8
7
|
import { createContext, forwardRef, useContext } from "react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
9
9
|
//#region src/components/split-button/SplitButton.tsx
|
|
10
10
|
const SplitButtonContext = createContext(null);
|
|
11
11
|
function useSplitButtonContext(componentName) {
|
|
@@ -48,7 +48,7 @@ const SplitButtonAction = forwardRef(function SplitButtonAction({ className, siz
|
|
|
48
48
|
...props
|
|
49
49
|
});
|
|
50
50
|
});
|
|
51
|
-
const SplitButtonTrigger = forwardRef(function SplitButtonTrigger({
|
|
51
|
+
const SplitButtonTrigger = forwardRef(function SplitButtonTrigger({ children, className, size, variant, "aria-label": ariaLabel, ...props }, ref) {
|
|
52
52
|
const context = useSplitButtonContext("SplitButton.Trigger");
|
|
53
53
|
const isIconOnly = children == null;
|
|
54
54
|
return /* @__PURE__ */ jsx(Menu.Trigger, {
|
|
@@ -59,7 +59,6 @@ const SplitButtonTrigger = forwardRef(function SplitButtonTrigger({ asChild, chi
|
|
|
59
59
|
className: clsx(SplitButton_module_default.trigger, normalizeClassName(className)),
|
|
60
60
|
...props,
|
|
61
61
|
children: /* @__PURE__ */ jsx(Button, {
|
|
62
|
-
asChild,
|
|
63
62
|
size: size ?? context.size,
|
|
64
63
|
variant: variant ?? context.variant,
|
|
65
64
|
children: children ?? /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
position: relative;
|
|
69
69
|
|
|
70
70
|
&:before {
|
|
71
|
-
width: var(--splitter-resize-trigger-line-
|
|
71
|
+
width: var(--splitter-resize-trigger-line-thickness, .5px);
|
|
72
72
|
height: var(--splitter-resize-trigger-line-length, 100%);
|
|
73
73
|
border-radius: var(--splitter-resize-trigger-line-radius, var(--radius-full));
|
|
74
74
|
background-color: var(--splitter-resize-trigger-line-color, var(--color-border));
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
|
|
96
96
|
&:before {
|
|
97
97
|
width: var(--splitter-resize-trigger-line-length, 100%);
|
|
98
|
-
height: var(--splitter-resize-trigger-line-
|
|
98
|
+
height: var(--splitter-resize-trigger-line-thickness, .5px);
|
|
99
99
|
}
|
|
100
100
|
|
|
101
101
|
&:after {
|
|
@@ -104,12 +104,6 @@
|
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
&:focus-visible {
|
|
108
|
-
&:before {
|
|
109
|
-
background-color: var(--splitter-resize-trigger-line-color-focus, var(--splitter-resize-trigger-line-color, var(--color-border)));
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
107
|
&[data-dragging] {
|
|
114
108
|
&:before {
|
|
115
109
|
background-color: var(--splitter-resize-trigger-line-color-dragging, color-mix(in oklab,
|
|
@@ -146,7 +140,8 @@
|
|
|
146
140
|
box-shadow: var(--splitter-resize-trigger-indicator-shadow, var(--shadow-sm));
|
|
147
141
|
pointer-events: none;
|
|
148
142
|
transition: border-color var(--splitter-transition, var(--transition-default)),
|
|
149
|
-
box-shadow var(--splitter-transition, var(--transition-default))
|
|
143
|
+
box-shadow var(--splitter-transition, var(--transition-default)),
|
|
144
|
+
transform var(--splitter-transition, var(--transition-default));
|
|
150
145
|
position: absolute;
|
|
151
146
|
inset-block-start: 50%;
|
|
152
147
|
inset-inline-start: 50%;
|
|
@@ -161,11 +156,17 @@
|
|
|
161
156
|
.qnjB1q_resizeTrigger[data-dragging] .qnjB1q_resizeTriggerIndicator {
|
|
162
157
|
border-color: var(--splitter-resize-trigger-indicator-border-color-dragging, var(--splitter-resize-trigger-indicator-border-color, var(--color-border)));
|
|
163
158
|
background-color: var(--splitter-resize-trigger-indicator-bg-dragging, var(--splitter-resize-trigger-indicator-bg, var(--color-background)));
|
|
164
|
-
box-shadow: var(--splitter-resize-trigger-indicator-shadow-dragging, var(--
|
|
159
|
+
box-shadow: var(--splitter-resize-trigger-indicator-shadow-dragging, var(--shadow-md));
|
|
160
|
+
transform: translate(-50%, -50%) scale(1.08);
|
|
165
161
|
}
|
|
166
162
|
|
|
167
|
-
|
|
168
|
-
|
|
163
|
+
@media (hover: hover) {
|
|
164
|
+
.qnjB1q_resizeTrigger:hover:not(:disabled, [data-disabled]) .qnjB1q_resizeTriggerIndicator {
|
|
165
|
+
border-color: var(--splitter-resize-trigger-indicator-border-color-hover, color-mix(in oklab,
|
|
166
|
+
var(--splitter-resize-trigger-indicator-border-color, var(--color-border)) 72%,
|
|
167
|
+
var(--color-muted-foreground)));
|
|
168
|
+
box-shadow: var(--splitter-resize-trigger-indicator-shadow-hover, var(--shadow-md));
|
|
169
|
+
}
|
|
169
170
|
}
|
|
170
171
|
|
|
171
172
|
.qnjB1q_resizeTrigger[data-disabled] .qnjB1q_resizeTriggerIndicator {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Splitter } from "@ark-ui/react/splitter";
|
|
1
|
+
import { Splitter, SplitterPanelData, createSplitterRegistry, useSplitter, useSplitterContext } from "@ark-ui/react/splitter";
|
|
2
2
|
|
|
3
3
|
//#region src/components/splitter/Splitter.d.ts
|
|
4
4
|
declare const Splitter$1: import("react").ForwardRefExoticComponent<Omit<Splitter.RootProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>> & {
|
|
@@ -9,4 +9,4 @@ declare const Splitter$1: import("react").ForwardRefExoticComponent<Omit<Splitte
|
|
|
9
9
|
ResizeTriggerIndicator: import("react").ForwardRefExoticComponent<Omit<Splitter.ResizeTriggerIndicatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
10
10
|
};
|
|
11
11
|
//#endregion
|
|
12
|
-
export { Splitter$1 as Splitter };
|
|
12
|
+
export { Splitter$1 as Splitter, type SplitterPanelData, createSplitterRegistry, useSplitter, useSplitterContext };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
2
2
|
import Splitter_module_default from "./Splitter.module.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
import { clsx } from "clsx";
|
|
5
4
|
import { forwardRef } from "react";
|
|
6
|
-
import {
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
import { Splitter, createSplitterRegistry, useSplitter, useSplitterContext } from "@ark-ui/react/splitter";
|
|
7
7
|
//#region src/components/splitter/Splitter.tsx
|
|
8
8
|
const rootStyle = {
|
|
9
9
|
width: "var(--splitter-width, 100%)",
|
|
@@ -41,14 +41,6 @@ const SplitterPanel = forwardRef(function SplitterPanel({ className, ...props },
|
|
|
41
41
|
...props
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
|
-
const SplitterResizeTrigger = forwardRef(function SplitterResizeTrigger({ className, ...props }, ref) {
|
|
45
|
-
return /* @__PURE__ */ jsx(Splitter.ResizeTrigger, {
|
|
46
|
-
ref,
|
|
47
|
-
"data-slot": "splitter-resize-trigger",
|
|
48
|
-
className: clsx(Splitter_module_default.resizeTrigger, normalizeClassName(className)),
|
|
49
|
-
...props
|
|
50
|
-
});
|
|
51
|
-
});
|
|
52
44
|
const SplitterResizeTriggerIndicator = forwardRef(function SplitterResizeTriggerIndicator({ className, ...props }, ref) {
|
|
53
45
|
return /* @__PURE__ */ jsx(Splitter.ResizeTriggerIndicator, {
|
|
54
46
|
ref,
|
|
@@ -57,6 +49,15 @@ const SplitterResizeTriggerIndicator = forwardRef(function SplitterResizeTrigger
|
|
|
57
49
|
...props
|
|
58
50
|
});
|
|
59
51
|
});
|
|
52
|
+
const SplitterResizeTrigger = forwardRef(function SplitterResizeTrigger({ children, className, ...props }, ref) {
|
|
53
|
+
return /* @__PURE__ */ jsx(Splitter.ResizeTrigger, {
|
|
54
|
+
ref,
|
|
55
|
+
"data-slot": "splitter-resize-trigger",
|
|
56
|
+
className: clsx(Splitter_module_default.resizeTrigger, normalizeClassName(className)),
|
|
57
|
+
...props,
|
|
58
|
+
children: children === void 0 ? /* @__PURE__ */ jsx(SplitterResizeTriggerIndicator, {}) : children
|
|
59
|
+
});
|
|
60
|
+
});
|
|
60
61
|
const Splitter$1 = Object.assign(SplitterRoot, {
|
|
61
62
|
Root: SplitterRoot,
|
|
62
63
|
RootProvider: SplitterRootProvider,
|
|
@@ -65,4 +66,4 @@ const Splitter$1 = Object.assign(SplitterRoot, {
|
|
|
65
66
|
ResizeTriggerIndicator: SplitterResizeTriggerIndicator
|
|
66
67
|
});
|
|
67
68
|
//#endregion
|
|
68
|
-
export { Splitter$1 as Splitter };
|
|
69
|
+
export { Splitter$1 as Splitter, createSplitterRegistry, useSplitter, useSplitterContext };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Splitter } from "./Splitter.js";
|
|
2
|
-
export { Splitter };
|
|
1
|
+
import { Splitter, SplitterPanelData, createSplitterRegistry, useSplitter, useSplitterContext } from "./Splitter.js";
|
|
2
|
+
export { Splitter, type SplitterPanelData, createSplitterRegistry, useSplitter, useSplitterContext };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties
|
|
1
|
+
import { CSSProperties } from "react";
|
|
2
2
|
|
|
3
3
|
//#region src/components/stack/Stack.d.ts
|
|
4
4
|
type StackDirection = 'row' | 'column';
|
|
@@ -12,7 +12,6 @@ declare const Stack: import("react").ForwardRefExoticComponent<Omit<import("reac
|
|
|
12
12
|
justify?: CSSProperties["justifyContent"];
|
|
13
13
|
wrap?: CSSProperties["flexWrap"];
|
|
14
14
|
fill?: boolean;
|
|
15
|
-
separator?: ReactNode;
|
|
16
15
|
} & import("react").RefAttributes<HTMLDivElement>> & {
|
|
17
16
|
Root: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("@ark-ui/react/factory").PolymorphicProps & {
|
|
18
17
|
direction?: StackDirection | {
|
|
@@ -24,7 +23,6 @@ declare const Stack: import("react").ForwardRefExoticComponent<Omit<import("reac
|
|
|
24
23
|
justify?: CSSProperties["justifyContent"];
|
|
25
24
|
wrap?: CSSProperties["flexWrap"];
|
|
26
25
|
fill?: boolean;
|
|
27
|
-
separator?: ReactNode;
|
|
28
26
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
29
27
|
};
|
|
30
28
|
//#endregion
|