@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
|
@@ -1,12 +1,14 @@
|
|
|
1
|
-
import { ChevronLeftIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
2
1
|
import { normalizeClassName } from "../../lib/moduix/normalizeClassName.js";
|
|
3
|
-
import {
|
|
2
|
+
import { ChevronLeftIcon } from "../../lib/moduix/icons/ui/Icons.js";
|
|
3
|
+
import { Input } from "../input/Input.js";
|
|
4
|
+
import { Separator } from "../separator/Separator.js";
|
|
5
|
+
import { Splitter, useSplitterContext } from "../splitter/Splitter.js";
|
|
6
|
+
import { Tooltip } from "../tooltip/Tooltip.js";
|
|
4
7
|
import Sidebar_module_default from "./Sidebar.module.js";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
8
|
import { ark } from "@ark-ui/react/factory";
|
|
7
9
|
import { clsx } from "clsx";
|
|
8
10
|
import { createContext, forwardRef, useContext } from "react";
|
|
9
|
-
import {
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
12
|
//#region src/components/sidebar/Sidebar.tsx
|
|
11
13
|
const sidebarPanel = {
|
|
12
14
|
id: "sidebar",
|
|
@@ -30,6 +32,12 @@ function getDefaultSidebarSize(side) {
|
|
|
30
32
|
defaultSize[1] = "16rem";
|
|
31
33
|
return defaultSize;
|
|
32
34
|
}
|
|
35
|
+
function getDefaultPanels(side, panelId) {
|
|
36
|
+
return defaultPanelsBySide[side].map((panel) => panel.id === "sidebar" ? {
|
|
37
|
+
...panel,
|
|
38
|
+
id: panelId
|
|
39
|
+
} : panel);
|
|
40
|
+
}
|
|
33
41
|
function toggleSidebarPanel(splitter, panelId) {
|
|
34
42
|
if (splitter.isPanelCollapsed(panelId)) {
|
|
35
43
|
splitter.expandPanel(panelId);
|
|
@@ -43,10 +51,10 @@ const SidebarRoot = forwardRef(function SidebarRoot({ className, panels, default
|
|
|
43
51
|
panelId,
|
|
44
52
|
side
|
|
45
53
|
},
|
|
46
|
-
children: /* @__PURE__ */ jsx(Splitter
|
|
54
|
+
children: /* @__PURE__ */ jsx(Splitter.Root, {
|
|
47
55
|
...props,
|
|
48
56
|
ref,
|
|
49
|
-
panels: panels ??
|
|
57
|
+
panels: panels ?? getDefaultPanels(side, panelId),
|
|
50
58
|
defaultSize: defaultSize ?? getDefaultSidebarSize(side),
|
|
51
59
|
orientation: "horizontal",
|
|
52
60
|
"data-side": side,
|
|
@@ -71,7 +79,7 @@ const SidebarPanel = forwardRef(function SidebarPanel({ className, id, ...props
|
|
|
71
79
|
const splitter = useSplitterContext();
|
|
72
80
|
const panelId = id ?? config.panelId;
|
|
73
81
|
const collapsed = splitter.isPanelCollapsed(panelId);
|
|
74
|
-
return /* @__PURE__ */ jsx(Splitter
|
|
82
|
+
return /* @__PURE__ */ jsx(Splitter.Panel, {
|
|
75
83
|
...props,
|
|
76
84
|
ref,
|
|
77
85
|
id: panelId,
|
|
@@ -83,7 +91,7 @@ const SidebarPanel = forwardRef(function SidebarPanel({ className, id, ...props
|
|
|
83
91
|
});
|
|
84
92
|
const SidebarInset = forwardRef(function SidebarInset({ className, id = "content", ...props }, ref) {
|
|
85
93
|
const { side } = useContext(SidebarConfigContext);
|
|
86
|
-
return /* @__PURE__ */ jsx(Splitter
|
|
94
|
+
return /* @__PURE__ */ jsx(Splitter.Panel, {
|
|
87
95
|
ref,
|
|
88
96
|
id,
|
|
89
97
|
"data-side": side,
|
|
@@ -92,17 +100,18 @@ const SidebarInset = forwardRef(function SidebarInset({ className, id = "content
|
|
|
92
100
|
...props
|
|
93
101
|
});
|
|
94
102
|
});
|
|
95
|
-
const SidebarResizeTrigger = forwardRef(function SidebarResizeTrigger({ className, id, "aria-label": ariaLabel = "Resize sidebar", ...props }, ref) {
|
|
96
|
-
const { side } = useContext(SidebarConfigContext);
|
|
97
|
-
const resolvedId = id ?? (side === "left" ?
|
|
98
|
-
return /* @__PURE__ */ jsx(Splitter
|
|
103
|
+
const SidebarResizeTrigger = forwardRef(function SidebarResizeTrigger({ children, className, id, "aria-label": ariaLabel = "Resize sidebar", ...props }, ref) {
|
|
104
|
+
const { panelId, side } = useContext(SidebarConfigContext);
|
|
105
|
+
const resolvedId = id ?? (side === "left" ? `${panelId}:content` : `content:${panelId}`);
|
|
106
|
+
return /* @__PURE__ */ jsx(Splitter.ResizeTrigger, {
|
|
99
107
|
...props,
|
|
100
108
|
ref,
|
|
101
109
|
id: resolvedId,
|
|
102
110
|
"aria-label": ariaLabel,
|
|
103
111
|
"data-side": side,
|
|
104
112
|
"data-slot": "sidebar-resize-trigger",
|
|
105
|
-
className: clsx(Sidebar_module_default.resizeTrigger, normalizeClassName(className))
|
|
113
|
+
className: clsx(Sidebar_module_default.resizeTrigger, normalizeClassName(className)),
|
|
114
|
+
children: children === void 0 ? null : children
|
|
106
115
|
});
|
|
107
116
|
});
|
|
108
117
|
const SidebarTrigger = forwardRef(function SidebarTrigger({ className, children, onClick, type = "button", "aria-label": ariaLabel = "Toggle sidebar", ...props }, ref) {
|
|
@@ -190,6 +199,27 @@ const SidebarGroupLabel = forwardRef(function SidebarGroupLabel({ className, ...
|
|
|
190
199
|
...props
|
|
191
200
|
});
|
|
192
201
|
});
|
|
202
|
+
const SidebarGroupAction = forwardRef(function SidebarGroupAction({ className, type = "button", ...props }, ref) {
|
|
203
|
+
return /* @__PURE__ */ jsx(ark.button, {
|
|
204
|
+
ref,
|
|
205
|
+
type,
|
|
206
|
+
"data-scope": "sidebar",
|
|
207
|
+
"data-part": "group-action",
|
|
208
|
+
"data-slot": "sidebar-group-action",
|
|
209
|
+
className: clsx(Sidebar_module_default.groupAction, normalizeClassName(className)),
|
|
210
|
+
...props
|
|
211
|
+
});
|
|
212
|
+
});
|
|
213
|
+
const SidebarGroupContent = forwardRef(function SidebarGroupContent({ className, ...props }, ref) {
|
|
214
|
+
return /* @__PURE__ */ jsx(ark.div, {
|
|
215
|
+
ref,
|
|
216
|
+
"data-scope": "sidebar",
|
|
217
|
+
"data-part": "group-content",
|
|
218
|
+
"data-slot": "sidebar-group-content",
|
|
219
|
+
className: clsx(Sidebar_module_default.groupContent, normalizeClassName(className)),
|
|
220
|
+
...props
|
|
221
|
+
});
|
|
222
|
+
});
|
|
193
223
|
const SidebarMenu = forwardRef(function SidebarMenu({ className, ...props }, ref) {
|
|
194
224
|
return /* @__PURE__ */ jsx(ark.ul, {
|
|
195
225
|
ref,
|
|
@@ -224,6 +254,27 @@ const SidebarMenuButton = forwardRef(function SidebarMenuButton({ active = false
|
|
|
224
254
|
...props
|
|
225
255
|
});
|
|
226
256
|
});
|
|
257
|
+
const SidebarMenuAction = forwardRef(function SidebarMenuAction({ className, type = "button", ...props }, ref) {
|
|
258
|
+
return /* @__PURE__ */ jsx(ark.button, {
|
|
259
|
+
ref,
|
|
260
|
+
type,
|
|
261
|
+
"data-scope": "sidebar",
|
|
262
|
+
"data-part": "menu-action",
|
|
263
|
+
"data-slot": "sidebar-menu-action",
|
|
264
|
+
className: clsx(Sidebar_module_default.menuAction, normalizeClassName(className)),
|
|
265
|
+
...props
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
const SidebarMenuBadge = forwardRef(function SidebarMenuBadge({ className, ...props }, ref) {
|
|
269
|
+
return /* @__PURE__ */ jsx(ark.div, {
|
|
270
|
+
ref,
|
|
271
|
+
"data-scope": "sidebar",
|
|
272
|
+
"data-part": "menu-badge",
|
|
273
|
+
"data-slot": "sidebar-menu-badge",
|
|
274
|
+
className: clsx(Sidebar_module_default.menuBadge, normalizeClassName(className)),
|
|
275
|
+
...props
|
|
276
|
+
});
|
|
277
|
+
});
|
|
227
278
|
const SidebarMenuSub = forwardRef(function SidebarMenuSub({ className, ...props }, ref) {
|
|
228
279
|
return /* @__PURE__ */ jsx(ark.ul, {
|
|
229
280
|
ref,
|
|
@@ -256,6 +307,40 @@ const SidebarMenuSubButton = forwardRef(function SidebarMenuSubButton({ active =
|
|
|
256
307
|
...props
|
|
257
308
|
});
|
|
258
309
|
});
|
|
310
|
+
const SidebarTooltip = function SidebarTooltip({ children, content, openDelay = 200, closeDelay = 0, positioning, ...props }) {
|
|
311
|
+
const { collapsed, side } = useSidebar();
|
|
312
|
+
return /* @__PURE__ */ jsxs(Tooltip, {
|
|
313
|
+
...props,
|
|
314
|
+
openDelay,
|
|
315
|
+
closeDelay,
|
|
316
|
+
disabled: !collapsed,
|
|
317
|
+
positioning: {
|
|
318
|
+
placement: side === "left" ? "right" : "left",
|
|
319
|
+
gutter: 8,
|
|
320
|
+
...positioning
|
|
321
|
+
},
|
|
322
|
+
children: [/* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
323
|
+
asChild: true,
|
|
324
|
+
children
|
|
325
|
+
}), /* @__PURE__ */ jsx(Tooltip.Positioner, { children: /* @__PURE__ */ jsx(Tooltip.Content, { children: content }) })]
|
|
326
|
+
});
|
|
327
|
+
};
|
|
328
|
+
const SidebarInput = forwardRef(function SidebarInput({ className, ...props }, ref) {
|
|
329
|
+
return /* @__PURE__ */ jsx(Input.Root, {
|
|
330
|
+
ref,
|
|
331
|
+
"data-slot": "sidebar-input",
|
|
332
|
+
className: clsx(Sidebar_module_default.input, normalizeClassName(className)),
|
|
333
|
+
...props
|
|
334
|
+
});
|
|
335
|
+
});
|
|
336
|
+
const SidebarSeparator = forwardRef(function SidebarSeparator({ className, ...props }, ref) {
|
|
337
|
+
return /* @__PURE__ */ jsx(Separator.Root, {
|
|
338
|
+
ref,
|
|
339
|
+
"data-slot": "sidebar-separator",
|
|
340
|
+
className: clsx(Sidebar_module_default.separator, normalizeClassName(className)),
|
|
341
|
+
...props
|
|
342
|
+
});
|
|
343
|
+
});
|
|
259
344
|
const Sidebar = Object.assign(SidebarRoot, {
|
|
260
345
|
Root: SidebarRoot,
|
|
261
346
|
Panel: SidebarPanel,
|
|
@@ -263,14 +348,21 @@ const Sidebar = Object.assign(SidebarRoot, {
|
|
|
263
348
|
ResizeTrigger: SidebarResizeTrigger,
|
|
264
349
|
Trigger: SidebarTrigger,
|
|
265
350
|
Label: SidebarLabel,
|
|
351
|
+
Input: SidebarInput,
|
|
266
352
|
Header: SidebarHeader,
|
|
267
353
|
Content: SidebarContent,
|
|
268
354
|
Footer: SidebarFooter,
|
|
355
|
+
Separator: SidebarSeparator,
|
|
269
356
|
Group: SidebarGroup,
|
|
270
357
|
GroupLabel: SidebarGroupLabel,
|
|
358
|
+
GroupAction: SidebarGroupAction,
|
|
359
|
+
GroupContent: SidebarGroupContent,
|
|
271
360
|
Menu: SidebarMenu,
|
|
272
361
|
MenuItem: SidebarMenuItem,
|
|
362
|
+
Tooltip: SidebarTooltip,
|
|
273
363
|
MenuButton: SidebarMenuButton,
|
|
364
|
+
MenuAction: SidebarMenuAction,
|
|
365
|
+
MenuBadge: SidebarMenuBadge,
|
|
274
366
|
MenuSub: SidebarMenuSub,
|
|
275
367
|
MenuSubItem: SidebarMenuSubItem,
|
|
276
368
|
MenuSubButton: SidebarMenuSubButton
|
|
@@ -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
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
|
|
50
50
|
&:focus-visible {
|
|
51
51
|
border-color: var(--signature-pad-focus-border-color, var(--color-ring));
|
|
52
|
-
box-shadow: 0 0 0
|
|
52
|
+
box-shadow: 0 0 0
|
|
53
|
+
var(--signature-pad-focus-ring-width, var(--focus-ring-width, var(--border-width-md)))
|
|
53
54
|
var(--signature-pad-focus-ring-color, var(--color-ring));
|
|
54
55
|
}
|
|
55
56
|
}
|
|
@@ -59,13 +60,13 @@
|
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
._wse8a_guide {
|
|
62
|
-
|
|
63
|
+
inset-inline-end: var(--signature-pad-guide-inset-x, var(--spacing-6));
|
|
63
64
|
bottom: var(--signature-pad-guide-bottom, var(--spacing-8));
|
|
64
|
-
left: var(--signature-pad-guide-inset-x, var(--spacing-6));
|
|
65
65
|
border-bottom: var(--signature-pad-guide-border-width, var(--border-width-sm)) dashed
|
|
66
66
|
var(--signature-pad-guide-color, var(--color-border));
|
|
67
67
|
pointer-events: none;
|
|
68
68
|
position: absolute;
|
|
69
|
+
inset-inline-start: var(--signature-pad-guide-inset-x, var(--spacing-6));
|
|
69
70
|
|
|
70
71
|
&[data-disabled] {
|
|
71
72
|
opacity: var(--signature-pad-disabled-opacity, var(--opacity-disabled));
|
|
@@ -74,50 +75,21 @@
|
|
|
74
75
|
|
|
75
76
|
._wse8a_clearTrigger {
|
|
76
77
|
top: var(--signature-pad-clear-trigger-offset, var(--spacing-2));
|
|
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, var(--spacing-4));
|
|
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(--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
|
-
|
|
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));
|
|
93
|
+
inset-inline-end: var(--signature-pad-clear-trigger-offset, var(--spacing-2));
|
|
122
94
|
}
|
|
123
95
|
}
|
|
@@ -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,
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
overflow: hidden;
|
|
7
7
|
|
|
8
8
|
&[data-state="loading"] {
|
|
9
|
-
height:
|
|
9
|
+
height: var(--skeleton-height, var(--spacing-4));
|
|
10
10
|
animation: var(--skeleton-animation, var(--animation-pulse));
|
|
11
11
|
background: var(--skeleton-bg, color-mix(in oklab, var(--color-muted-foreground) 18%, var(--color-background)));
|
|
12
12
|
color: #0000;
|
|
@@ -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) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
@layer ui.components {
|
|
2
2
|
.NN9-IW_root {
|
|
3
3
|
box-sizing: border-box;
|
|
4
|
-
gap: var(--slider-gap,
|
|
4
|
+
gap: var(--slider-gap, var(--spacing-2));
|
|
5
5
|
width: var(--slider-width, 12rem);
|
|
6
6
|
color: var(--slider-color, var(--color-foreground));
|
|
7
7
|
flex-direction: column;
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
.NN9-IW_control {
|
|
38
38
|
box-sizing: border-box;
|
|
39
39
|
width: 100%;
|
|
40
|
-
min-height: var(--slider-control-size,
|
|
40
|
+
min-height: var(--slider-control-size, var(--spacing-5));
|
|
41
41
|
touch-action: none;
|
|
42
42
|
user-select: none;
|
|
43
43
|
cursor: pointer;
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
position: relative;
|
|
47
47
|
|
|
48
48
|
&[data-orientation="vertical"] {
|
|
49
|
-
width: var(--slider-control-size,
|
|
49
|
+
width: var(--slider-control-size, var(--spacing-5));
|
|
50
50
|
flex-direction: column;
|
|
51
51
|
height: 100%;
|
|
52
52
|
min-height: 0;
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
|
|
60
60
|
.NN9-IW_track {
|
|
61
61
|
width: 100%;
|
|
62
|
-
height: var(--slider-track-size,
|
|
62
|
+
height: var(--slider-track-size, var(--spacing-1-5));
|
|
63
63
|
border-radius: var(--slider-track-radius, var(--radius-full));
|
|
64
64
|
background-color: var(--slider-track-bg, var(--color-muted));
|
|
65
65
|
box-shadow: inset 0 0 0 var(--slider-track-border-width, var(--border-width-sm))
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
overflow: hidden;
|
|
70
70
|
|
|
71
71
|
&[data-orientation="vertical"] {
|
|
72
|
-
width: var(--slider-track-size,
|
|
72
|
+
width: var(--slider-track-size, var(--spacing-1-5));
|
|
73
73
|
height: 100%;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
|
|
87
87
|
.NN9-IW_thumb {
|
|
88
88
|
box-sizing: border-box;
|
|
89
|
-
width: var(--slider-thumb-size,
|
|
90
|
-
height: var(--slider-thumb-size,
|
|
89
|
+
width: var(--slider-thumb-size, var(--spacing-4));
|
|
90
|
+
height: var(--slider-thumb-size, var(--spacing-4));
|
|
91
91
|
border: var(--slider-thumb-border-width, var(--border-width-sm)) solid
|
|
92
92
|
var(--slider-thumb-border-color, var(--color-border));
|
|
93
93
|
border-radius: var(--slider-thumb-radius, var(--radius-full));
|
|
@@ -102,13 +102,17 @@
|
|
|
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(--
|
|
107
|
+
box-shadow: 0 0 0 var(--focus-ring-inset-width, var(--border-width-sm))
|
|
108
|
+
var(--slider-focus-ring-color, var(--color-ring)),
|
|
109
|
+
var(--slider-thumb-shadow-dragging, var(--shadow-md));
|
|
108
110
|
}
|
|
109
111
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
&:focus-visible {
|
|
113
|
+
border-color: var(--slider-focus-ring-color, var(--color-ring));
|
|
114
|
+
box-shadow: 0 0 0 var(--focus-ring-inset-width, var(--border-width-sm))
|
|
115
|
+
var(--slider-focus-ring-color, var(--color-ring));
|
|
112
116
|
}
|
|
113
117
|
|
|
114
118
|
&[data-disabled] {
|
|
@@ -149,8 +153,8 @@
|
|
|
149
153
|
position: relative;
|
|
150
154
|
|
|
151
155
|
&:before {
|
|
152
|
-
width: var(--slider-marker-dot-size,
|
|
153
|
-
height: var(--slider-marker-dot-size,
|
|
156
|
+
width: var(--slider-marker-dot-size, var(--spacing-1));
|
|
157
|
+
height: var(--slider-marker-dot-size, var(--spacing-1));
|
|
154
158
|
border-radius: var(--radius-full);
|
|
155
159
|
background-color: var(--slider-marker-dot-bg, var(--color-border));
|
|
156
160
|
content: "";
|
|
@@ -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 };
|