@moduix/react-tailwind 1.0.0 → 1.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/dist/components/accordion/Accordion.js +13 -13
- package/dist/components/alert/Alert.js +12 -12
- package/dist/components/angle-slider/AngleSlider.js +16 -16
- package/dist/components/avatar/Avatar.js +7 -7
- package/dist/components/bleed/Bleed.js +1 -1
- package/dist/components/card/Card.js +33 -33
- package/dist/components/carousel/Carousel.d.ts +1 -1
- package/dist/components/carousel/Carousel.js +22 -22
- package/dist/components/chart/Chart.js +18 -18
- package/dist/components/checkbox/Checkbox.js +12 -12
- package/dist/components/clipboard/Clipboard.js +19 -18
- package/dist/components/collapsible/Collapsible.js +11 -11
- package/dist/components/color-picker/ColorPicker.js +47 -47
- package/dist/components/combobox/Combobox.js +31 -31
- package/dist/components/command-palette/CommandPalette.js +48 -48
- package/dist/components/container/Container.js +5 -5
- package/dist/components/date-input/DateInput.js +14 -14
- package/dist/components/date-picker/DatePicker.js +51 -51
- package/dist/components/dialog/Dialog.js +20 -20
- package/dist/components/drawer/Drawer.js +30 -30
- package/dist/components/editable/Editable.js +17 -17
- package/dist/components/empty/Empty.js +13 -13
- package/dist/components/field/Field.js +19 -19
- package/dist/components/file-upload/FileUpload.js +28 -28
- package/dist/components/floating-panel/FloatingPanel.d.ts +1 -1
- package/dist/components/floating-panel/FloatingPanel.js +22 -22
- package/dist/components/floating-panel/index.d.ts +1 -0
- package/dist/components/hover-card/HoverCard.d.ts +1 -1
- package/dist/components/hover-card/HoverCard.js +11 -11
- package/dist/components/image-cropper/ImageCropper.js +14 -14
- package/dist/components/input-group/InputGroup.js +1 -1
- package/dist/components/lightbox/Lightbox.js +25 -25
- package/dist/components/listbox/Listbox.js +31 -31
- package/dist/components/marquee/Marquee.js +12 -12
- package/dist/components/menu/Menu.js +42 -42
- package/dist/components/navigation-menu/NavigationMenu.js +24 -24
- package/dist/components/number-input/NumberInput.js +16 -16
- package/dist/components/pagination/Pagination.js +11 -11
- package/dist/components/password-input/PasswordInput.js +13 -13
- package/dist/components/pin-input/PinInput.js +11 -11
- package/dist/components/popover/Popover.js +25 -25
- package/dist/components/progress-circular/ProgressCircular.js +16 -16
- package/dist/components/progress-linear/ProgressLinear.js +14 -14
- package/dist/components/qr-code/QrCode.js +12 -12
- package/dist/components/radio-group/RadioGroup.js +14 -14
- package/dist/components/rating-group/RatingGroup.js +11 -11
- package/dist/components/segment-group/SegmentGroup.js +14 -14
- package/dist/components/select/Select.js +33 -33
- package/dist/components/sidebar/Sidebar.js +51 -44
- package/dist/components/signature-pad/SignaturePad.js +11 -11
- package/dist/components/slider/Slider.js +22 -22
- package/dist/components/split-button/SplitButton.d.ts +6 -6
- package/dist/components/split-button/SplitButton.js +17 -13
- package/dist/components/splitter/Splitter.js +9 -9
- package/dist/components/steps/Steps.js +23 -23
- package/dist/components/swap/Swap.js +6 -6
- package/dist/components/switch/Switch.js +9 -9
- package/dist/components/table/Table.js +23 -23
- package/dist/components/tabs/Tabs.js +12 -12
- package/dist/components/tags-input/TagsInput.js +20 -20
- package/dist/components/timer/Timer.js +14 -14
- package/dist/components/toast/Toast.js +8 -8
- package/dist/components/toc/Toc.js +19 -19
- package/dist/components/toggle/Toggle.js +4 -4
- package/dist/components/tooltip/Tooltip.js +11 -11
- package/dist/components/tour/Tour.js +26 -26
- package/dist/components/tree-view/TreeView.js +30 -30
- package/dist/styles/animations.css +8 -8
- package/package.json +1 -1
|
@@ -13,12 +13,12 @@ const Select_SelectRoot = /*#__PURE__*/ forwardRef(function({ asChild, children,
|
|
|
13
13
|
portalRef: portalRef,
|
|
14
14
|
children: /*#__PURE__*/ jsx(Select.Root, {
|
|
15
15
|
ref: ref,
|
|
16
|
-
"data-slot": "select-root",
|
|
17
16
|
className: cn('flex w-56 max-w-full min-w-0 flex-col gap-1.5 text-foreground', className),
|
|
18
17
|
asChild: asChild,
|
|
19
18
|
lazyMount: lazyMount,
|
|
20
19
|
unmountOnExit: unmountOnExit,
|
|
21
20
|
...props,
|
|
21
|
+
"data-slot": "select-root",
|
|
22
22
|
children: children
|
|
23
23
|
})
|
|
24
24
|
});
|
|
@@ -29,12 +29,12 @@ const Select_SelectRootProvider = /*#__PURE__*/ forwardRef(function({ asChild, c
|
|
|
29
29
|
portalRef: portalRef,
|
|
30
30
|
children: /*#__PURE__*/ jsx(Select.RootProvider, {
|
|
31
31
|
ref: ref,
|
|
32
|
-
"data-slot": "select-root-provider",
|
|
33
32
|
className: cn('flex w-56 max-w-full min-w-0 flex-col gap-1.5 text-foreground', className),
|
|
34
33
|
asChild: asChild,
|
|
35
34
|
lazyMount: lazyMount,
|
|
36
35
|
unmountOnExit: unmountOnExit,
|
|
37
36
|
...props,
|
|
37
|
+
"data-slot": "select-root-provider",
|
|
38
38
|
children: children
|
|
39
39
|
})
|
|
40
40
|
});
|
|
@@ -42,45 +42,45 @@ const Select_SelectRootProvider = /*#__PURE__*/ forwardRef(function({ asChild, c
|
|
|
42
42
|
const Select_SelectLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
43
43
|
return /*#__PURE__*/ jsx(Select.Label, {
|
|
44
44
|
ref: ref,
|
|
45
|
-
"data-slot": "select-label",
|
|
46
45
|
className: cn('inline-flex items-center text-sm font-medium text-foreground select-none data-disabled:opacity-50', className),
|
|
47
|
-
...props
|
|
46
|
+
...props,
|
|
47
|
+
"data-slot": "select-label"
|
|
48
48
|
});
|
|
49
49
|
});
|
|
50
50
|
const Select_SelectControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
51
51
|
return /*#__PURE__*/ jsx(Select.Control, {
|
|
52
52
|
ref: ref,
|
|
53
|
-
"data-slot": "select-control",
|
|
54
53
|
className: cn('group/select-control relative flex w-full min-w-0 items-center text-foreground data-disabled:opacity-50', className),
|
|
55
|
-
...props
|
|
54
|
+
...props,
|
|
55
|
+
"data-slot": "select-control"
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
const Select_SelectTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, ...props }, ref) {
|
|
59
59
|
return /*#__PURE__*/ jsx(Select.Trigger, {
|
|
60
60
|
ref: ref,
|
|
61
|
-
"data-slot": "select-trigger",
|
|
62
61
|
asChild: asChild,
|
|
63
62
|
className: cn(!asChild && 'peer/select-trigger relative inline-flex h-control-md w-full min-w-0 cursor-pointer items-center justify-start rounded-md border border-border bg-background px-3.5 pe-[2.875rem] text-start text-inherit outline-1 -outline-offset-1 outline-transparent transition-[background-color,border-color,outline-color] duration-200 ease-in-out select-none [font:inherit] group-has-[>[data-slot=select-clear-trigger]:not([hidden])]/select-control:pe-[4.25rem] group-data-invalid/select-control:border-destructive group-data-invalid/select-control:outline-destructive focus-visible:border-ring focus-visible:outline-ring disabled:cursor-default data-disabled:cursor-default data-placeholder-shown:text-muted-foreground data-[state=open]:border-ring data-[state=open]:outline-ring motion-reduce:transition-none', className),
|
|
64
|
-
...props
|
|
63
|
+
...props,
|
|
64
|
+
"data-slot": "select-trigger"
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
67
|
const Select_SelectValueText = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
68
68
|
return /*#__PURE__*/ jsx(Select.ValueText, {
|
|
69
69
|
ref: ref,
|
|
70
|
-
"data-slot": "select-value-text",
|
|
71
70
|
className: cn('min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap', className),
|
|
72
|
-
...props
|
|
71
|
+
...props,
|
|
72
|
+
"data-slot": "select-value-text"
|
|
73
73
|
});
|
|
74
74
|
});
|
|
75
75
|
const Select_SelectClearTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }, ref) {
|
|
76
76
|
return /*#__PURE__*/ jsx(Select.ClearTrigger, {
|
|
77
77
|
ref: ref,
|
|
78
78
|
asChild: true,
|
|
79
|
-
"data-slot": "select-clear-trigger",
|
|
80
79
|
className: cn('pointer-events-auto absolute inset-y-0 end-[2.125rem] my-auto size-control-xs transition-[background-color,color,opacity] duration-200 ease-in-out focus-visible:outline-1 focus-visible:outline-offset-1 motion-reduce:transition-none [&>svg]:size-4', className),
|
|
81
80
|
"aria-label": asChild ? ariaLabel : void 0,
|
|
82
81
|
"aria-labelledby": asChild ? ariaLabelledBy : void 0,
|
|
83
82
|
...props,
|
|
83
|
+
"data-slot": "select-clear-trigger",
|
|
84
84
|
children: asChild ? children : /*#__PURE__*/ jsx(CloseButton.Root, {
|
|
85
85
|
"aria-label": ariaLabel ?? (null == ariaLabelledBy ? 'Clear selection' : void 0),
|
|
86
86
|
"aria-labelledby": ariaLabelledBy,
|
|
@@ -91,9 +91,9 @@ const Select_SelectClearTrigger = /*#__PURE__*/ forwardRef(function({ asChild, c
|
|
|
91
91
|
const Select_SelectIndicator = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
|
|
92
92
|
return /*#__PURE__*/ jsx(Select.Indicator, {
|
|
93
93
|
ref: ref,
|
|
94
|
-
"data-slot": "select-indicator",
|
|
95
94
|
className: cn('pointer-events-none inline-flex size-control-xs shrink-0 items-center justify-center rounded-sm bg-transparent leading-none text-muted-foreground transition-[background-color,color,opacity] duration-200 ease-in-out peer-[:not([disabled]):not([data-disabled]):hover]/select-trigger:bg-muted peer-[:not([disabled]):not([data-disabled]):hover]/select-trigger:text-foreground motion-reduce:transition-none [&>svg]:block [&>svg]:size-4', className),
|
|
96
95
|
...props,
|
|
96
|
+
"data-slot": "select-indicator",
|
|
97
97
|
children: children ?? /*#__PURE__*/ jsx(ChevronUpDownIcon, {})
|
|
98
98
|
});
|
|
99
99
|
});
|
|
@@ -121,91 +121,91 @@ const Select_SelectPositioner = /*#__PURE__*/ forwardRef(function({ className, .
|
|
|
121
121
|
return /*#__PURE__*/ jsx(OverlayPortal, {
|
|
122
122
|
children: /*#__PURE__*/ jsx(Select.Positioner, {
|
|
123
123
|
ref: ref,
|
|
124
|
-
"data-slot": "select-positioner",
|
|
125
124
|
className: cn('z-[var(--z-index)] outline-0', className),
|
|
126
|
-
...props
|
|
125
|
+
...props,
|
|
126
|
+
"data-slot": "select-positioner"
|
|
127
127
|
})
|
|
128
128
|
});
|
|
129
129
|
});
|
|
130
130
|
const Select_SelectContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
131
131
|
return /*#__PURE__*/ jsx(Select.Content, {
|
|
132
132
|
ref: ref,
|
|
133
|
-
"data-slot": "select-content",
|
|
134
133
|
className: cn('z-[calc(60+var(--layer-index,0))] flex max-h-[min(24rem,var(--available-height))] max-w-[var(--available-width)] min-w-[var(--reference-width)] origin-[var(--transform-origin)] scroll-py-1 flex-col overflow-auto overscroll-contain rounded-md border border-border bg-popover py-1 text-popover-foreground shadow-lg outline-0 data-[state=closed]:pointer-events-none data-[state=closed]:animate-moduix-menu-closed data-[state=open]:animate-moduix-menu-open motion-reduce:animate-none', className),
|
|
135
|
-
...props
|
|
134
|
+
...props,
|
|
135
|
+
"data-slot": "select-content"
|
|
136
136
|
});
|
|
137
137
|
});
|
|
138
138
|
const Select_SelectList = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
139
139
|
return /*#__PURE__*/ jsx(Select.List, {
|
|
140
140
|
ref: ref,
|
|
141
|
-
"data-slot": "select-list",
|
|
142
141
|
className: cn('flex min-h-0 scroll-py-1 flex-col overflow-y-auto overscroll-contain outline-0', className),
|
|
143
|
-
...props
|
|
142
|
+
...props,
|
|
143
|
+
"data-slot": "select-list"
|
|
144
144
|
});
|
|
145
145
|
});
|
|
146
146
|
const Select_SelectItemGroup = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
147
147
|
return /*#__PURE__*/ jsx(Select.ItemGroup, {
|
|
148
148
|
ref: ref,
|
|
149
|
-
"data-slot": "select-item-group",
|
|
150
149
|
className: cn('flex flex-col [&+&]:mt-2', className),
|
|
151
|
-
...props
|
|
150
|
+
...props,
|
|
151
|
+
"data-slot": "select-item-group"
|
|
152
152
|
});
|
|
153
153
|
});
|
|
154
154
|
const Select_SelectItemGroupLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
155
155
|
return /*#__PURE__*/ jsx(Select.ItemGroupLabel, {
|
|
156
156
|
ref: ref,
|
|
157
|
-
"data-slot": "select-item-group-label",
|
|
158
157
|
className: cn('px-2.5 py-1 text-xs font-normal text-muted-foreground', className),
|
|
159
|
-
...props
|
|
158
|
+
...props,
|
|
159
|
+
"data-slot": "select-item-group-label"
|
|
160
160
|
});
|
|
161
161
|
});
|
|
162
162
|
const Select_SelectItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
163
163
|
return /*#__PURE__*/ jsx(Select.Item, {
|
|
164
164
|
ref: ref,
|
|
165
|
-
"data-slot": "select-item",
|
|
166
165
|
className: cn('relative mx-1 flex min-h-control-sm w-[calc(100%-0.5rem)] cursor-default items-center justify-between gap-2 rounded-sm bg-transparent px-3 py-1 text-sm text-popover-foreground outline-0 select-none data-disabled:pointer-events-none data-disabled:text-muted-foreground data-disabled:opacity-50 data-highlighted:bg-accent data-highlighted:text-accent-foreground', className),
|
|
167
|
-
...props
|
|
166
|
+
...props,
|
|
167
|
+
"data-slot": "select-item"
|
|
168
168
|
});
|
|
169
169
|
});
|
|
170
170
|
const Select_SelectItemText = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
171
171
|
return /*#__PURE__*/ jsx(Select.ItemText, {
|
|
172
172
|
ref: ref,
|
|
173
|
-
"data-slot": "select-item-text",
|
|
174
173
|
className: cn('min-w-0 flex-1 overflow-hidden text-ellipsis whitespace-nowrap', className),
|
|
175
|
-
...props
|
|
174
|
+
...props,
|
|
175
|
+
"data-slot": "select-item-text"
|
|
176
176
|
});
|
|
177
177
|
});
|
|
178
178
|
const Select_SelectItemIndicator = /*#__PURE__*/ forwardRef(function({ className, children, ...props }, ref) {
|
|
179
179
|
return /*#__PURE__*/ jsx(Select.ItemIndicator, {
|
|
180
180
|
ref: ref,
|
|
181
|
-
"data-slot": "select-item-indicator",
|
|
182
181
|
className: cn('inline-flex size-3.5 shrink-0 items-center justify-center [&>svg]:size-3', className),
|
|
183
182
|
...props,
|
|
183
|
+
"data-slot": "select-item-indicator",
|
|
184
184
|
children: children ?? /*#__PURE__*/ jsx(CheckIcon, {})
|
|
185
185
|
});
|
|
186
186
|
});
|
|
187
187
|
const Select_SelectItemTextContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
188
188
|
return /*#__PURE__*/ jsx(ark.span, {
|
|
189
189
|
ref: ref,
|
|
190
|
-
"data-slot": "select-item-text-content",
|
|
191
190
|
className: cn('inline-flex max-w-full min-w-0 items-center gap-2 align-top', className),
|
|
192
|
-
...props
|
|
191
|
+
...props,
|
|
192
|
+
"data-slot": "select-item-text-content"
|
|
193
193
|
});
|
|
194
194
|
});
|
|
195
195
|
const Select_SelectItemTextIcon = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
196
196
|
return /*#__PURE__*/ jsx(ark.span, {
|
|
197
197
|
ref: ref,
|
|
198
|
-
"data-slot": "select-item-text-icon",
|
|
199
198
|
className: cn('inline-flex size-4 shrink-0 items-center justify-center', className),
|
|
200
|
-
...props
|
|
199
|
+
...props,
|
|
200
|
+
"data-slot": "select-item-text-icon"
|
|
201
201
|
});
|
|
202
202
|
});
|
|
203
203
|
const Select_SelectItemTextLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
204
204
|
return /*#__PURE__*/ jsx(ark.span, {
|
|
205
205
|
ref: ref,
|
|
206
|
-
"data-slot": "select-item-text-label",
|
|
207
206
|
className: cn('min-w-0 overflow-hidden text-ellipsis whitespace-nowrap', className),
|
|
208
|
-
...props
|
|
207
|
+
...props,
|
|
208
|
+
"data-slot": "select-item-text-label"
|
|
209
209
|
});
|
|
210
210
|
});
|
|
211
211
|
const Select_Select = Object.assign(Select_SelectRoot, {
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ark } from "@ark-ui/react/factory";
|
|
4
|
+
import { Splitter } from "@ark-ui/react/splitter";
|
|
4
5
|
import { createContext, forwardRef, useContext } from "react";
|
|
5
6
|
import { cn } from "../../internal/cn.js";
|
|
6
7
|
import { ChevronLeftIcon } from "../../internal/icons/ui/index.js";
|
|
7
8
|
import { Input } from "../input/index.js";
|
|
8
9
|
import { Separator } from "../separator/index.js";
|
|
9
|
-
import { Splitter, useSplitterContext } from "../splitter/index.js";
|
|
10
|
+
import { Splitter as index_js_Splitter, useSplitterContext } from "../splitter/index.js";
|
|
10
11
|
import { Tooltip } from "../tooltip/index.js";
|
|
11
12
|
const sidebarPanel = {
|
|
12
13
|
id: 'sidebar',
|
|
@@ -51,7 +52,7 @@ function toggleSidebarPanel(splitter, panelId) {
|
|
|
51
52
|
if (splitter.isPanelCollapsed(panelId)) return void splitter.expandPanel(panelId);
|
|
52
53
|
splitter.collapsePanel(panelId);
|
|
53
54
|
}
|
|
54
|
-
const Sidebar_SidebarRoot = /*#__PURE__*/ forwardRef(function({ className, defaultSize, panelId = 'sidebar', side = 'left', ...props }, ref) {
|
|
55
|
+
const Sidebar_SidebarRoot = /*#__PURE__*/ forwardRef(function({ className, defaultSize, panelId = 'sidebar', side = 'left', style, ...props }, ref) {
|
|
55
56
|
return /*#__PURE__*/ jsx(SidebarConfigContext.Provider, {
|
|
56
57
|
value: {
|
|
57
58
|
panelId,
|
|
@@ -65,7 +66,12 @@ const Sidebar_SidebarRoot = /*#__PURE__*/ forwardRef(function({ className, defau
|
|
|
65
66
|
orientation: "horizontal",
|
|
66
67
|
"data-side": side,
|
|
67
68
|
"data-slot": "sidebar-root",
|
|
68
|
-
className: cn('isolate h-dvh min-h-96 w-full min-w-0 rounded-none border border-border bg-background text-foreground shadow-none', className)
|
|
69
|
+
className: cn('group/splitter relative box-border h-112 min-h-0 w-full min-w-0 rounded-md border border-border bg-card text-foreground shadow-sm data-dragging:cursor-col-resize data-dragging:data-[orientation=vertical]:cursor-row-resize', 'isolate h-dvh min-h-96 w-full min-w-0 rounded-none border border-border bg-background text-foreground shadow-none', className),
|
|
70
|
+
style: {
|
|
71
|
+
width: void 0,
|
|
72
|
+
height: void 0,
|
|
73
|
+
...style
|
|
74
|
+
}
|
|
69
75
|
})
|
|
70
76
|
});
|
|
71
77
|
});
|
|
@@ -91,7 +97,7 @@ const Sidebar_SidebarPanel = /*#__PURE__*/ forwardRef(function({ className, ...p
|
|
|
91
97
|
"data-side": config.side,
|
|
92
98
|
"data-slot": "sidebar-panel",
|
|
93
99
|
"data-state": collapsed ? 'collapsed' : 'expanded',
|
|
94
|
-
className: cn('group/sidebar-panel @container/sidebar-panel relative flex min-h-0 min-w-0 flex-col overflow-hidden bg-card p-0 text-card-foreground transition-colors duration-200 ease-in-out motion-reduce:transition-none', className)
|
|
100
|
+
className: cn('box-border min-h-50 min-w-0 overflow-auto rounded-none border-0 border-border bg-card p-4 text-card-foreground shadow-none group-data-[orientation=vertical]/splitter:min-h-0 data-dragging:select-none', 'group/sidebar-panel @container/sidebar-panel relative flex min-h-0 min-w-0 flex-col overflow-hidden bg-card p-0 text-card-foreground transition-colors duration-200 ease-in-out motion-reduce:transition-none', className)
|
|
95
101
|
});
|
|
96
102
|
});
|
|
97
103
|
const Sidebar_SidebarInset = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -102,21 +108,22 @@ const Sidebar_SidebarInset = /*#__PURE__*/ forwardRef(function({ className, ...p
|
|
|
102
108
|
id: "content",
|
|
103
109
|
"data-side": side,
|
|
104
110
|
"data-slot": "sidebar-inset",
|
|
105
|
-
className: cn('relative min-w-0 overflow-auto bg-background p-0 text-foreground', className)
|
|
111
|
+
className: cn('box-border min-h-50 min-w-0 overflow-auto rounded-none border-0 border-border bg-card p-4 text-card-foreground shadow-none group-data-[orientation=vertical]/splitter:min-h-0 data-dragging:select-none', 'relative min-w-0 overflow-auto bg-background p-0 text-foreground', className)
|
|
106
112
|
});
|
|
107
113
|
});
|
|
108
|
-
const Sidebar_SidebarResizeTrigger = /*#__PURE__*/ forwardRef(function({ children, className, 'aria-label': ariaLabel = 'Resize sidebar', ...props }, ref) {
|
|
114
|
+
const Sidebar_SidebarResizeTrigger = /*#__PURE__*/ forwardRef(function({ asChild, children, className, 'aria-label': ariaLabel = 'Resize sidebar', ...props }, ref) {
|
|
109
115
|
const { panelId, side } = useContext(SidebarConfigContext);
|
|
110
116
|
const id = 'left' === side ? `${panelId}:content` : `content:${panelId}`;
|
|
111
117
|
return /*#__PURE__*/ jsx(Splitter.ResizeTrigger, {
|
|
112
118
|
...props,
|
|
113
119
|
ref: ref,
|
|
120
|
+
asChild: asChild,
|
|
114
121
|
id: id,
|
|
115
122
|
"aria-label": ariaLabel,
|
|
116
123
|
"data-side": side,
|
|
117
124
|
"data-slot": "sidebar-resize-trigger",
|
|
118
|
-
className: cn('z-2', className),
|
|
119
|
-
children: children
|
|
125
|
+
className: cn("group/trigger relative z-1 box-border flex w-px min-w-px cursor-col-resize appearance-none items-center justify-center border-0 bg-transparent p-0 outline-0 transition-opacity duration-200 ease-in-out before:absolute before:h-full before:w-[0.5px] before:rounded-full before:bg-border before:transition-[background-color] before:duration-200 before:ease-in-out before:content-[''] after:absolute after:z-1 after:h-full after:w-2.5 after:content-[''] data-disabled:cursor-default data-disabled:opacity-50 data-dragging:before:bg-muted-foreground/40 data-[orientation=vertical]:h-px data-[orientation=vertical]:min-h-px data-[orientation=vertical]:w-full data-[orientation=vertical]:min-w-0 data-[orientation=vertical]:cursor-row-resize data-[orientation=vertical]:before:h-[0.5px] data-[orientation=vertical]:before:w-full data-[orientation=vertical]:after:h-2.5 data-[orientation=vertical]:after:w-full [@media(hover:hover)]:[&:not(:disabled):not([data-disabled]):hover]:before:bg-muted-foreground/40", 'z-2', className),
|
|
126
|
+
children: void 0 !== children || asChild ? children : /*#__PURE__*/ jsx(index_js_Splitter.ResizeTriggerIndicator, {})
|
|
120
127
|
});
|
|
121
128
|
});
|
|
122
129
|
const Sidebar_SidebarTrigger = /*#__PURE__*/ forwardRef(function({ className, children, onClick, type = 'button', 'aria-label': ariaLabel = 'Toggle sidebar', ...props }, ref) {
|
|
@@ -136,11 +143,11 @@ const Sidebar_SidebarTrigger = /*#__PURE__*/ forwardRef(function({ className, ch
|
|
|
136
143
|
"data-scope": "sidebar",
|
|
137
144
|
"data-part": "trigger",
|
|
138
145
|
"data-side": config.side,
|
|
139
|
-
"data-slot": "sidebar-trigger",
|
|
140
146
|
"data-state": collapsed ? 'collapsed' : 'expanded',
|
|
141
147
|
className: cn('relative z-4 -mx-3.5 inline-flex size-7 flex-none translate-y-10 cursor-pointer items-center justify-center rounded-full border border-border bg-background p-0 text-muted-foreground shadow-sm outline-0 transition-[background-color,color,box-shadow] duration-200 ease-in-out', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 motion-reduce:transition-none', '[&>svg]:size-4 [&>svg]:transition-transform [&>svg]:duration-200 [&>svg]:ease-in-out data-[side=left]:data-[state=collapsed]:[&>svg]:rotate-180 data-[side=right]:data-[state=expanded]:[&>svg]:rotate-180', 'hover:bg-accent hover:text-accent-foreground', className),
|
|
142
148
|
onClick: handleClick,
|
|
143
149
|
...props,
|
|
150
|
+
"data-slot": "sidebar-trigger",
|
|
144
151
|
children: children ?? /*#__PURE__*/ jsx(ChevronLeftIcon, {})
|
|
145
152
|
});
|
|
146
153
|
});
|
|
@@ -149,9 +156,9 @@ const Sidebar_SidebarLabel = /*#__PURE__*/ forwardRef(function({ className, ...p
|
|
|
149
156
|
ref: ref,
|
|
150
157
|
"data-scope": "sidebar",
|
|
151
158
|
"data-part": "label",
|
|
152
|
-
"data-slot": "sidebar-label",
|
|
153
159
|
className: cn('min-w-0 truncate group-data-[state=collapsed]/sidebar-panel:sr-only', className),
|
|
154
|
-
...props
|
|
160
|
+
...props,
|
|
161
|
+
"data-slot": "sidebar-label"
|
|
155
162
|
});
|
|
156
163
|
});
|
|
157
164
|
const Sidebar_SidebarHeader = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -159,9 +166,9 @@ const Sidebar_SidebarHeader = /*#__PURE__*/ forwardRef(function({ className, ...
|
|
|
159
166
|
ref: ref,
|
|
160
167
|
"data-scope": "sidebar",
|
|
161
168
|
"data-part": "header",
|
|
162
|
-
"data-slot": "sidebar-header",
|
|
163
169
|
className: cn('flex flex-none items-center gap-2 p-3 group-data-[state=collapsed]/sidebar-panel:justify-center group-data-[state=collapsed]/sidebar-panel:px-1 [&>*:only-child]:w-full group-data-[state=collapsed]/sidebar-panel:[&>*:only-child]:w-auto', className),
|
|
164
|
-
...props
|
|
170
|
+
...props,
|
|
171
|
+
"data-slot": "sidebar-header"
|
|
165
172
|
});
|
|
166
173
|
});
|
|
167
174
|
const Sidebar_SidebarContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -169,9 +176,9 @@ const Sidebar_SidebarContent = /*#__PURE__*/ forwardRef(function({ className, ..
|
|
|
169
176
|
ref: ref,
|
|
170
177
|
"data-scope": "sidebar",
|
|
171
178
|
"data-part": "content",
|
|
172
|
-
"data-slot": "sidebar-content",
|
|
173
179
|
className: cn('flex min-h-0 flex-auto [scrollbar-gutter:stable] flex-col overflow-auto overscroll-contain group-data-[state=collapsed]/sidebar-panel:[scrollbar-width:none] group-data-[state=collapsed]/sidebar-panel:[scrollbar-gutter:auto] group-data-[state=collapsed]/sidebar-panel:overflow-x-hidden group-data-[state=collapsed]/sidebar-panel:overflow-y-auto', className),
|
|
174
|
-
...props
|
|
180
|
+
...props,
|
|
181
|
+
"data-slot": "sidebar-content"
|
|
175
182
|
});
|
|
176
183
|
});
|
|
177
184
|
const Sidebar_SidebarExpandedContent = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -180,9 +187,9 @@ const Sidebar_SidebarExpandedContent = /*#__PURE__*/ forwardRef(function({ class
|
|
|
180
187
|
ref: ref,
|
|
181
188
|
"data-scope": "sidebar",
|
|
182
189
|
"data-part": "expanded-content",
|
|
183
|
-
"data-slot": "sidebar-expanded-content",
|
|
184
190
|
className: className,
|
|
185
191
|
...props,
|
|
192
|
+
"data-slot": "sidebar-expanded-content",
|
|
186
193
|
hidden: collapsed
|
|
187
194
|
});
|
|
188
195
|
});
|
|
@@ -192,9 +199,9 @@ const Sidebar_SidebarCollapsedContent = /*#__PURE__*/ forwardRef(function({ clas
|
|
|
192
199
|
ref: ref,
|
|
193
200
|
"data-scope": "sidebar",
|
|
194
201
|
"data-part": "collapsed-content",
|
|
195
|
-
"data-slot": "sidebar-collapsed-content",
|
|
196
202
|
className: className,
|
|
197
203
|
...props,
|
|
204
|
+
"data-slot": "sidebar-collapsed-content",
|
|
198
205
|
hidden: !collapsed
|
|
199
206
|
});
|
|
200
207
|
});
|
|
@@ -203,9 +210,9 @@ const Sidebar_SidebarFooter = /*#__PURE__*/ forwardRef(function({ className, ...
|
|
|
203
210
|
ref: ref,
|
|
204
211
|
"data-scope": "sidebar",
|
|
205
212
|
"data-part": "footer",
|
|
206
|
-
"data-slot": "sidebar-footer",
|
|
207
213
|
className: cn('flex flex-none items-center gap-2 p-3 group-data-[state=collapsed]/sidebar-panel:justify-center group-data-[state=collapsed]/sidebar-panel:px-1', className),
|
|
208
|
-
...props
|
|
214
|
+
...props,
|
|
215
|
+
"data-slot": "sidebar-footer"
|
|
209
216
|
});
|
|
210
217
|
});
|
|
211
218
|
const Sidebar_SidebarGroup = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -213,9 +220,9 @@ const Sidebar_SidebarGroup = /*#__PURE__*/ forwardRef(function({ className, ...p
|
|
|
213
220
|
ref: ref,
|
|
214
221
|
"data-scope": "sidebar",
|
|
215
222
|
"data-part": "group",
|
|
216
|
-
"data-slot": "sidebar-group",
|
|
217
223
|
className: cn('flex flex-col gap-1 p-3 group-data-[state=collapsed]/sidebar-panel:px-1', className),
|
|
218
|
-
...props
|
|
224
|
+
...props,
|
|
225
|
+
"data-slot": "sidebar-group"
|
|
219
226
|
});
|
|
220
227
|
});
|
|
221
228
|
const Sidebar_SidebarGroupHeader = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -223,9 +230,9 @@ const Sidebar_SidebarGroupHeader = /*#__PURE__*/ forwardRef(function({ className
|
|
|
223
230
|
ref: ref,
|
|
224
231
|
"data-scope": "sidebar",
|
|
225
232
|
"data-part": "group-header",
|
|
226
|
-
"data-slot": "sidebar-group-header",
|
|
227
233
|
className: cn('flex min-w-0 items-center gap-2', className),
|
|
228
|
-
...props
|
|
234
|
+
...props,
|
|
235
|
+
"data-slot": "sidebar-group-header"
|
|
229
236
|
});
|
|
230
237
|
});
|
|
231
238
|
const Sidebar_SidebarGroupLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -233,9 +240,9 @@ const Sidebar_SidebarGroupLabel = /*#__PURE__*/ forwardRef(function({ className,
|
|
|
233
240
|
ref: ref,
|
|
234
241
|
"data-scope": "sidebar",
|
|
235
242
|
"data-part": "group-label",
|
|
236
|
-
"data-slot": "sidebar-group-label",
|
|
237
243
|
className: cn('min-w-0 flex-1 truncate px-2 text-xs leading-4 font-medium text-muted-foreground group-data-[state=collapsed]/sidebar-panel:sr-only', className),
|
|
238
|
-
...props
|
|
244
|
+
...props,
|
|
245
|
+
"data-slot": "sidebar-group-label"
|
|
239
246
|
});
|
|
240
247
|
});
|
|
241
248
|
const Sidebar_SidebarGroupAction = /*#__PURE__*/ forwardRef(function({ className, type = 'button', ...props }, ref) {
|
|
@@ -244,9 +251,9 @@ const Sidebar_SidebarGroupAction = /*#__PURE__*/ forwardRef(function({ className
|
|
|
244
251
|
type: type,
|
|
245
252
|
"data-scope": "sidebar",
|
|
246
253
|
"data-part": "group-action",
|
|
247
|
-
"data-slot": "sidebar-group-action",
|
|
248
254
|
className: cn('focus-visible:outline-offset-0.5 me-2 inline-flex size-control-xs flex-none cursor-pointer items-center justify-center rounded-md p-0 text-muted-foreground outline-0 transition-colors duration-200 ease-in-out hover:bg-accent hover:text-accent-foreground focus-visible:outline-2 focus-visible:outline-ring motion-reduce:transition-none @max-[7rem]:hidden [&>svg]:size-4', className),
|
|
249
|
-
...props
|
|
255
|
+
...props,
|
|
256
|
+
"data-slot": "sidebar-group-action"
|
|
250
257
|
});
|
|
251
258
|
});
|
|
252
259
|
const Sidebar_SidebarNavigationList = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -254,9 +261,9 @@ const Sidebar_SidebarNavigationList = /*#__PURE__*/ forwardRef(function({ classN
|
|
|
254
261
|
ref: ref,
|
|
255
262
|
"data-scope": "sidebar",
|
|
256
263
|
"data-part": "navigation-list",
|
|
257
|
-
"data-slot": "sidebar-navigation-list",
|
|
258
264
|
className: cn('flex w-full min-w-0 flex-col gap-1', className),
|
|
259
|
-
...props
|
|
265
|
+
...props,
|
|
266
|
+
"data-slot": "sidebar-navigation-list"
|
|
260
267
|
});
|
|
261
268
|
});
|
|
262
269
|
const Sidebar_SidebarNavigationItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -264,9 +271,9 @@ const Sidebar_SidebarNavigationItem = /*#__PURE__*/ forwardRef(function({ classN
|
|
|
264
271
|
ref: ref,
|
|
265
272
|
"data-scope": "sidebar",
|
|
266
273
|
"data-part": "navigation-item",
|
|
267
|
-
"data-slot": "sidebar-navigation-item",
|
|
268
274
|
className: cn('relative min-w-0', className),
|
|
269
|
-
...props
|
|
275
|
+
...props,
|
|
276
|
+
"data-slot": "sidebar-navigation-item"
|
|
270
277
|
});
|
|
271
278
|
});
|
|
272
279
|
const Sidebar_SidebarNavigationButton = /*#__PURE__*/ forwardRef(function({ active = false, className, size = 'md', type = 'button', 'aria-current': ariaCurrent, ...props }, ref) {
|
|
@@ -276,11 +283,11 @@ const Sidebar_SidebarNavigationButton = /*#__PURE__*/ forwardRef(function({ acti
|
|
|
276
283
|
"aria-current": ariaCurrent ?? (active ? 'page' : void 0),
|
|
277
284
|
"data-scope": "sidebar",
|
|
278
285
|
"data-part": "navigation-button",
|
|
279
|
-
"data-slot": "sidebar-navigation-button",
|
|
280
286
|
"data-active": active ? '' : void 0,
|
|
281
287
|
"data-size": size,
|
|
282
288
|
className: cn('flex w-full min-w-0 cursor-pointer items-center gap-2 overflow-hidden rounded-md px-2 py-1 text-start text-sm leading-5 text-ellipsis whitespace-nowrap text-card-foreground outline-0 transition-colors duration-200 ease-in-out has-[+_[data-slot=sidebar-navigation-badge]]:pe-10 @max-[7rem]:has-[+_[data-slot=sidebar-navigation-badge]]:pe-2', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-accent data-active:font-medium data-active:text-accent-foreground motion-reduce:transition-none [&:not(:disabled):not([aria-disabled=true])]:hover:bg-accent [&:not(:disabled):not([aria-disabled=true])]:hover:text-accent-foreground', 'group-data-[state=collapsed]/sidebar-panel:mx-auto group-data-[state=collapsed]/sidebar-panel:min-h-control-md group-data-[state=collapsed]/sidebar-panel:w-control-md group-data-[state=collapsed]/sidebar-panel:justify-center group-data-[state=collapsed]/sidebar-panel:bg-transparent group-data-[state=collapsed]/sidebar-panel:px-0 group-data-[state=collapsed]/sidebar-panel:hover:bg-transparent', '[&>[data-sidebar-icon]]:shrink-0 [&>span:last-child]:min-w-0 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', '[&>[data-scope=select][data-part=indicator]]:ms-auto @max-[7rem]:[&>[data-scope=select][data-part=indicator]]:hidden', '[&>[data-slot=collapsible-indicator]]:ms-auto [&>[data-slot=collapsible-indicator]]:size-control-xs @max-[7rem]:[&>[data-slot=collapsible-indicator]]:hidden [&>[data-slot=collapsible-indicator]>svg]:size-3', '[&>[data-slot=menu-indicator]]:ms-auto [&>[data-slot=menu-indicator]]:size-control-xs [&>[data-slot=menu-indicator]]:leading-none [&>[data-slot=menu-indicator]]:text-muted-foreground @max-[7rem]:[&>[data-slot=menu-indicator]]:hidden [&>[data-slot=menu-indicator]>svg]:block [&>[data-slot=menu-indicator]>svg]:size-4', 'sm' === size && 'min-h-control-sm text-xs', 'md' === size && 'min-h-control-md', 'lg' === size && 'min-h-control-lg', className),
|
|
283
|
-
...props
|
|
289
|
+
...props,
|
|
290
|
+
"data-slot": "sidebar-navigation-button"
|
|
284
291
|
});
|
|
285
292
|
});
|
|
286
293
|
const Sidebar_SidebarNavigationBadge = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -288,9 +295,9 @@ const Sidebar_SidebarNavigationBadge = /*#__PURE__*/ forwardRef(function({ class
|
|
|
288
295
|
ref: ref,
|
|
289
296
|
"data-scope": "sidebar",
|
|
290
297
|
"data-part": "navigation-badge",
|
|
291
|
-
"data-slot": "sidebar-navigation-badge",
|
|
292
298
|
className: cn('pointer-events-none absolute end-2.5 top-1/2 z-1 box-border inline-grid size-5 -translate-y-1/2 place-items-center rounded-full bg-primary p-0 text-[0.5625rem] leading-none font-medium text-primary-foreground tabular-nums @max-[7rem]:hidden', className),
|
|
293
|
-
...props
|
|
299
|
+
...props,
|
|
300
|
+
"data-slot": "sidebar-navigation-badge"
|
|
294
301
|
});
|
|
295
302
|
});
|
|
296
303
|
const Sidebar_SidebarNavigationSubList = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -298,9 +305,9 @@ const Sidebar_SidebarNavigationSubList = /*#__PURE__*/ forwardRef(function({ cla
|
|
|
298
305
|
ref: ref,
|
|
299
306
|
"data-scope": "sidebar",
|
|
300
307
|
"data-part": "navigation-sub-list",
|
|
301
|
-
"data-slot": "sidebar-navigation-sub-list",
|
|
302
308
|
className: cn('ms-4 mt-1 flex w-auto min-w-0 flex-col gap-1 border-s border-border ps-2 group-data-[state=collapsed]/sidebar-panel:hidden', className),
|
|
303
|
-
...props
|
|
309
|
+
...props,
|
|
310
|
+
"data-slot": "sidebar-navigation-sub-list"
|
|
304
311
|
});
|
|
305
312
|
});
|
|
306
313
|
const Sidebar_SidebarNavigationSubItem = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
@@ -308,9 +315,9 @@ const Sidebar_SidebarNavigationSubItem = /*#__PURE__*/ forwardRef(function({ cla
|
|
|
308
315
|
ref: ref,
|
|
309
316
|
"data-scope": "sidebar",
|
|
310
317
|
"data-part": "navigation-sub-item",
|
|
311
|
-
"data-slot": "sidebar-navigation-sub-item",
|
|
312
318
|
className: cn('relative min-w-0', className),
|
|
313
|
-
...props
|
|
319
|
+
...props,
|
|
320
|
+
"data-slot": "sidebar-navigation-sub-item"
|
|
314
321
|
});
|
|
315
322
|
});
|
|
316
323
|
const Sidebar_SidebarNavigationSubButton = /*#__PURE__*/ forwardRef(function({ active = false, children, className, 'aria-current': ariaCurrent, ...props }, ref) {
|
|
@@ -319,10 +326,10 @@ const Sidebar_SidebarNavigationSubButton = /*#__PURE__*/ forwardRef(function({ a
|
|
|
319
326
|
"aria-current": ariaCurrent ?? (active ? 'page' : void 0),
|
|
320
327
|
"data-scope": "sidebar",
|
|
321
328
|
"data-part": "navigation-sub-button",
|
|
322
|
-
"data-slot": "sidebar-navigation-sub-button",
|
|
323
329
|
"data-active": active ? '' : void 0,
|
|
324
330
|
className: cn('flex min-h-control-sm w-full min-w-0 cursor-pointer items-center gap-2 overflow-hidden rounded-md px-2 text-start text-sm leading-5 text-ellipsis whitespace-nowrap text-card-foreground outline-0 transition-[background-color,border-color,color,box-shadow] duration-200 ease-in-out has-[+_[data-slot=sidebar-navigation-badge]]:pe-10 @max-[7rem]:has-[+_[data-slot=sidebar-navigation-badge]]:pe-2', 'focus-visible:outline-offset-0.5 focus-visible:outline-2 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-active:bg-accent data-active:font-medium data-active:text-accent-foreground motion-reduce:transition-none [&:not(:disabled):not([aria-disabled=true])]:hover:bg-accent [&:not(:disabled):not([aria-disabled=true])]:hover:text-accent-foreground', '[&>[data-sidebar-icon]]:shrink-0 [&>span:last-child]:min-w-0 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0', className),
|
|
325
331
|
...props,
|
|
332
|
+
"data-slot": "sidebar-navigation-sub-button",
|
|
326
333
|
children: 'string' == typeof children ? /*#__PURE__*/ jsx("span", {
|
|
327
334
|
"data-slot": "sidebar-navigation-sub-label",
|
|
328
335
|
children: children
|
|
@@ -357,17 +364,17 @@ const Sidebar_SidebarTooltip = function({ children, content, openDelay = 200, cl
|
|
|
357
364
|
const Sidebar_SidebarInput = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
358
365
|
return /*#__PURE__*/ jsx(Input.Root, {
|
|
359
366
|
ref: ref,
|
|
360
|
-
"data-slot": "sidebar-input",
|
|
361
367
|
className: cn('w-full group-data-[state=collapsed]/sidebar-panel:hidden', className),
|
|
362
|
-
...props
|
|
368
|
+
...props,
|
|
369
|
+
"data-slot": "sidebar-input"
|
|
363
370
|
});
|
|
364
371
|
});
|
|
365
372
|
const Sidebar_SidebarSeparator = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
366
373
|
return /*#__PURE__*/ jsx(Separator.Root, {
|
|
367
374
|
ref: ref,
|
|
368
|
-
"data-slot": "sidebar-separator",
|
|
369
375
|
className: cn('border-border', className),
|
|
370
|
-
...props
|
|
376
|
+
...props,
|
|
377
|
+
"data-slot": "sidebar-separator"
|
|
371
378
|
});
|
|
372
379
|
});
|
|
373
380
|
const Sidebar = Object.assign(Sidebar_SidebarRoot, {
|
|
@@ -15,10 +15,10 @@ const SignaturePad_SignaturePadRoot = /*#__PURE__*/ forwardRef(function({ asChil
|
|
|
15
15
|
value: readOnly,
|
|
16
16
|
children: /*#__PURE__*/ jsx(SignaturePad.Root, {
|
|
17
17
|
ref: ref,
|
|
18
|
-
"data-slot": "signature-pad-root",
|
|
19
18
|
className: cn('box-border inline-flex w-70 max-w-full flex-col gap-2 text-foreground data-disabled:opacity-50', className),
|
|
20
19
|
asChild: asChild,
|
|
21
20
|
...props,
|
|
21
|
+
"data-slot": "signature-pad-root",
|
|
22
22
|
children: children
|
|
23
23
|
})
|
|
24
24
|
});
|
|
@@ -29,10 +29,10 @@ const SignaturePad_SignaturePadRootProvider = /*#__PURE__*/ forwardRef(function(
|
|
|
29
29
|
value: readOnly,
|
|
30
30
|
children: /*#__PURE__*/ jsx(SignaturePad.RootProvider, {
|
|
31
31
|
ref: ref,
|
|
32
|
-
"data-slot": "signature-pad-root-provider",
|
|
33
32
|
className: cn('box-border inline-flex w-70 max-w-full flex-col gap-2 text-foreground data-disabled:opacity-50', className),
|
|
34
33
|
asChild: asChild,
|
|
35
34
|
...props,
|
|
35
|
+
"data-slot": "signature-pad-root-provider",
|
|
36
36
|
children: children
|
|
37
37
|
})
|
|
38
38
|
});
|
|
@@ -40,33 +40,33 @@ const SignaturePad_SignaturePadRootProvider = /*#__PURE__*/ forwardRef(function(
|
|
|
40
40
|
const SignaturePad_SignaturePadLabel = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
41
41
|
return /*#__PURE__*/ jsx(SignaturePad.Label, {
|
|
42
42
|
ref: ref,
|
|
43
|
-
"data-slot": "signature-pad-label",
|
|
44
43
|
className: cn('text-sm leading-5 font-medium text-foreground select-none', className),
|
|
45
|
-
...props
|
|
44
|
+
...props,
|
|
45
|
+
"data-slot": "signature-pad-label"
|
|
46
46
|
});
|
|
47
47
|
});
|
|
48
48
|
const SignaturePad_SignaturePadControl = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
49
49
|
return /*#__PURE__*/ jsx(SignaturePad.Control, {
|
|
50
50
|
ref: ref,
|
|
51
|
-
"data-slot": "signature-pad-control",
|
|
52
51
|
className: cn('box-border h-40 min-h-40 w-full min-w-0 overflow-hidden rounded-md border border-border bg-background text-foreground shadow-sm transition-[border-color,box-shadow,opacity] duration-200 ease-in-out outline-none focus-visible:border-ring focus-visible:ring-2 focus-visible:ring-ring data-disabled:cursor-not-allowed motion-reduce:transition-none', className),
|
|
53
|
-
...props
|
|
52
|
+
...props,
|
|
53
|
+
"data-slot": "signature-pad-control"
|
|
54
54
|
});
|
|
55
55
|
});
|
|
56
56
|
const SignaturePad_SignaturePadSegment = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
57
57
|
return /*#__PURE__*/ jsx(SignaturePad.Segment, {
|
|
58
58
|
ref: ref,
|
|
59
|
-
"data-slot": "signature-pad-segment",
|
|
60
59
|
className: cn('fill-current', className),
|
|
61
|
-
...props
|
|
60
|
+
...props,
|
|
61
|
+
"data-slot": "signature-pad-segment"
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
const SignaturePad_SignaturePadGuide = /*#__PURE__*/ forwardRef(function({ className, ...props }, ref) {
|
|
65
65
|
return /*#__PURE__*/ jsx(SignaturePad.Guide, {
|
|
66
66
|
ref: ref,
|
|
67
|
-
"data-slot": "signature-pad-guide",
|
|
68
67
|
className: cn('pointer-events-none absolute start-6 end-6 bottom-8 border-b border-dashed border-border', className),
|
|
69
|
-
...props
|
|
68
|
+
...props,
|
|
69
|
+
"data-slot": "signature-pad-guide"
|
|
70
70
|
});
|
|
71
71
|
});
|
|
72
72
|
const SignaturePad_SignaturePadClearTrigger = /*#__PURE__*/ forwardRef(function({ asChild, className, children, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, ...props }, ref) {
|
|
@@ -75,11 +75,11 @@ const SignaturePad_SignaturePadClearTrigger = /*#__PURE__*/ forwardRef(function(
|
|
|
75
75
|
return /*#__PURE__*/ jsx(SignaturePad.ClearTrigger, {
|
|
76
76
|
ref: ref,
|
|
77
77
|
asChild: true,
|
|
78
|
-
"data-slot": "signature-pad-clear-trigger",
|
|
79
78
|
className: triggerClassName,
|
|
80
79
|
"aria-label": asChild ? ariaLabel : void 0,
|
|
81
80
|
"aria-labelledby": asChild ? ariaLabelledBy : void 0,
|
|
82
81
|
...props,
|
|
82
|
+
"data-slot": "signature-pad-clear-trigger",
|
|
83
83
|
disabled: readOnly || props.disabled,
|
|
84
84
|
children: asChild ? children : /*#__PURE__*/ jsx(CloseButton.Root, {
|
|
85
85
|
"aria-label": ariaLabel,
|