@moduix/solid-tailwind 1.0.0 → 1.1.1
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 +19 -13
- package/dist/components/accordion/Accordion.jsx +7 -7
- package/dist/components/alert/Alert.js +19 -13
- package/dist/components/alert/Alert.jsx +7 -7
- package/dist/components/angle-slider/AngleSlider.d.ts +2 -6
- package/dist/components/angle-slider/AngleSlider.js +21 -16
- package/dist/components/angle-slider/AngleSlider.jsx +10 -11
- package/dist/components/avatar/Avatar.js +10 -7
- package/dist/components/avatar/Avatar.jsx +6 -6
- package/dist/components/bleed/Bleed.js +1 -1
- package/dist/components/bleed/Bleed.jsx +1 -1
- package/dist/components/button/Button.js +1 -6
- package/dist/components/button/Button.jsx +2 -4
- package/dist/components/card/Card.js +54 -44
- package/dist/components/card/Card.jsx +12 -12
- package/dist/components/carousel/Carousel.d.ts +1 -1
- package/dist/components/carousel/Carousel.js +32 -23
- package/dist/components/carousel/Carousel.jsx +12 -13
- package/dist/components/checkbox/Checkbox.js +16 -14
- package/dist/components/checkbox/Checkbox.jsx +6 -6
- package/dist/components/clipboard/Clipboard.js +28 -17
- package/dist/components/clipboard/Clipboard.jsx +12 -11
- package/dist/components/collapsible/Collapsible.js +16 -11
- package/dist/components/collapsible/Collapsible.jsx +6 -6
- package/dist/components/color-picker/ColorPicker.js +69 -48
- package/dist/components/color-picker/ColorPicker.jsx +28 -28
- package/dist/components/combobox/Combobox.js +44 -31
- package/dist/components/combobox/Combobox.jsx +18 -18
- package/dist/components/command-palette/CommandPalette.js +72 -53
- package/dist/components/command-palette/CommandPalette.jsx +29 -32
- package/dist/components/container/Container.js +5 -5
- package/dist/components/container/Container.jsx +5 -5
- package/dist/components/date-input/DateInput.js +18 -12
- package/dist/components/date-input/DateInput.jsx +7 -7
- package/dist/components/date-picker/DatePicker.js +73 -51
- package/dist/components/date-picker/DatePicker.jsx +29 -29
- package/dist/components/dialog/Dialog.js +30 -20
- package/dist/components/dialog/Dialog.jsx +10 -10
- package/dist/components/drawer/Drawer.js +45 -30
- package/dist/components/drawer/Drawer.jsx +15 -15
- package/dist/components/editable/Editable.js +24 -17
- package/dist/components/editable/Editable.jsx +10 -10
- package/dist/components/empty/Empty.js +1 -1
- package/dist/components/empty/Empty.jsx +1 -1
- package/dist/components/file-upload/FileUpload.js +39 -28
- package/dist/components/file-upload/FileUpload.jsx +17 -17
- package/dist/components/floating-panel/FloatingPanel.js +35 -23
- package/dist/components/floating-panel/FloatingPanel.jsx +12 -12
- package/dist/components/hover-card/HoverCard.js +16 -11
- package/dist/components/hover-card/HoverCard.jsx +6 -6
- package/dist/components/image-cropper/ImageCropper.js +21 -14
- package/dist/components/image-cropper/ImageCropper.jsx +7 -7
- package/dist/components/input-group/InputGroup.js +3 -2
- package/dist/components/input-group/InputGroup.jsx +3 -2
- package/dist/components/json-tree-view/JsonTreeView.js +1 -1
- package/dist/components/json-tree-view/JsonTreeView.jsx +1 -1
- package/dist/components/lightbox/Lightbox.d.ts +1 -0
- package/dist/components/lightbox/Lightbox.js +41 -27
- package/dist/components/lightbox/Lightbox.jsx +13 -12
- package/dist/components/listbox/Listbox.js +48 -32
- package/dist/components/listbox/Listbox.jsx +17 -17
- package/dist/components/marquee/Marquee.js +18 -12
- package/dist/components/marquee/Marquee.jsx +9 -9
- package/dist/components/menu/Menu.js +66 -44
- package/dist/components/menu/Menu.jsx +28 -28
- package/dist/components/navigation-menu/NavigationMenu.js +36 -24
- package/dist/components/navigation-menu/NavigationMenu.jsx +12 -12
- package/dist/components/number-input/NumberInput.js +19 -14
- package/dist/components/number-input/NumberInput.jsx +9 -9
- package/dist/components/pagination/Pagination.js +10 -9
- package/dist/components/pagination/Pagination.jsx +8 -8
- package/dist/components/password-input/PasswordInput.js +16 -11
- package/dist/components/password-input/PasswordInput.jsx +6 -6
- package/dist/components/pin-input/PinInput.js +15 -10
- package/dist/components/pin-input/PinInput.jsx +6 -6
- package/dist/components/popover/Popover.js +37 -25
- package/dist/components/popover/Popover.jsx +13 -13
- package/dist/components/progress-circular/ProgressCircular.js +18 -13
- package/dist/components/progress-circular/ProgressCircular.jsx +8 -8
- package/dist/components/progress-linear/ProgressLinear.js +17 -12
- package/dist/components/progress-linear/ProgressLinear.jsx +7 -7
- package/dist/components/qr-code/QrCode.js +8 -7
- package/dist/components/qr-code/QrCode.jsx +6 -6
- package/dist/components/rating-group/RatingGroup.js +15 -10
- package/dist/components/rating-group/RatingGroup.jsx +6 -6
- package/dist/components/segment-group/SegmentGroup.js +17 -12
- package/dist/components/segment-group/SegmentGroup.jsx +7 -7
- package/dist/components/select/Select.js +50 -35
- package/dist/components/select/Select.jsx +20 -20
- package/dist/components/sidebar/Sidebar.js +72 -43
- package/dist/components/sidebar/Sidebar.jsx +34 -27
- package/dist/components/signature-pad/SignaturePad.js +16 -12
- package/dist/components/signature-pad/SignaturePad.jsx +8 -8
- package/dist/components/slider/Slider.js +29 -20
- package/dist/components/slider/Slider.jsx +11 -11
- package/dist/components/split-button/SplitButton.d.ts +4 -3
- package/dist/components/split-button/SplitButton.js +20 -9
- package/dist/components/split-button/SplitButton.jsx +13 -7
- package/dist/components/splitter/Splitter.js +13 -9
- package/dist/components/splitter/Splitter.jsx +5 -5
- package/dist/components/steps/Steps.js +34 -23
- package/dist/components/steps/Steps.jsx +12 -12
- package/dist/components/swap/Swap.js +9 -6
- package/dist/components/swap/Swap.jsx +3 -3
- package/dist/components/switch/Switch.js +9 -7
- package/dist/components/switch/Switch.jsx +5 -5
- package/dist/components/tabs/Tabs.js +18 -12
- package/dist/components/tabs/Tabs.jsx +6 -6
- package/dist/components/tags-input/TagsInput.js +28 -20
- package/dist/components/tags-input/TagsInput.jsx +12 -12
- package/dist/components/timer/Timer.js +21 -14
- package/dist/components/timer/Timer.jsx +7 -7
- package/dist/components/toast/Toast.js +11 -9
- package/dist/components/toast/Toast.jsx +7 -7
- package/dist/components/toc/Toc.js +31 -20
- package/dist/components/toc/Toc.jsx +10 -10
- package/dist/components/tooltip/Tooltip.js +13 -9
- package/dist/components/tooltip/Tooltip.jsx +5 -5
- package/dist/components/tour/Tour.js +38 -26
- package/dist/components/tour/Tour.jsx +13 -13
- package/dist/components/tree-view/TreeView.js +39 -28
- package/dist/components/tree-view/TreeView.jsx +17 -17
- package/dist/styles/animations.css +8 -8
- package/package.json +10 -11
|
@@ -101,11 +101,12 @@ function DrawerTrigger(props) {
|
|
|
101
101
|
get asChild () {
|
|
102
102
|
return local.asChild;
|
|
103
103
|
},
|
|
104
|
-
"data-slot": "drawer-trigger",
|
|
105
104
|
get ["class"] () {
|
|
106
105
|
return cn(!local.asChild && 'box-border inline-flex min-h-control-md cursor-pointer items-center justify-center rounded-md border border-border bg-background px-3.5 py-1 text-md leading-6 text-foreground transition-[background-color,border-color,color] duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 motion-reduce:transition-none [@media(hover:hover)]:hover:bg-accent', local.class);
|
|
107
106
|
}
|
|
108
|
-
}, others
|
|
107
|
+
}, others, {
|
|
108
|
+
"data-slot": "drawer-trigger"
|
|
109
|
+
}));
|
|
109
110
|
}
|
|
110
111
|
function DrawerBackdrop(props) {
|
|
111
112
|
const [local, others] = splitProps(props, [
|
|
@@ -114,11 +115,12 @@ function DrawerBackdrop(props) {
|
|
|
114
115
|
return createComponent(OverlayPortal, {
|
|
115
116
|
get children () {
|
|
116
117
|
return createComponent(Drawer.Backdrop, mergeProps({
|
|
117
|
-
"data-slot": "drawer-backdrop",
|
|
118
118
|
get ["class"] () {
|
|
119
119
|
return cn('fixed inset-0 z-[calc(40+var(--layer-index,0))] min-h-dvh bg-overlay backdrop-blur-xs [transition:opacity_calc(var(--drawer-swipe-strength,1)*450ms)_ease-out,backdrop-filter_calc(var(--drawer-swipe-strength,1)*450ms)_ease-out] data-[state=closed]:animate-moduix-drawer-backdrop-out data-[state=open]:animate-moduix-drawer-backdrop-in data-[state=open]:data-swiping:[transition-duration:0s] motion-reduce:[transition-duration:1ms] motion-reduce:[animation-delay:0ms] motion-reduce:[animation-duration:1ms] [&[hidden]:has(~[data-slot=drawer-positioner]:not([hidden]))]:block', local.class);
|
|
120
120
|
}
|
|
121
|
-
}, others
|
|
121
|
+
}, others, {
|
|
122
|
+
"data-slot": "drawer-backdrop"
|
|
123
|
+
}));
|
|
122
124
|
}
|
|
123
125
|
});
|
|
124
126
|
}
|
|
@@ -129,11 +131,12 @@ function DrawerPositioner(props) {
|
|
|
129
131
|
return createComponent(OverlayPortal, {
|
|
130
132
|
get children () {
|
|
131
133
|
return createComponent(Drawer.Positioner, mergeProps({
|
|
132
|
-
"data-slot": "drawer-positioner",
|
|
133
134
|
get ["class"] () {
|
|
134
135
|
return cn('fixed inset-0 z-[calc(50+var(--layer-index,0))] box-border flex items-end justify-center overflow-hidden overscroll-contain p-0 has-[>[data-slot=drawer-content][data-variant=island]]:pt-[max(1rem,env(safe-area-inset-top,0px))] has-[>[data-slot=drawer-content][data-variant=island]]:pr-[max(1rem,env(safe-area-inset-right,0px))] has-[>[data-slot=drawer-content][data-variant=island]]:pb-[max(1rem,env(safe-area-inset-bottom,0px))] has-[>[data-slot=drawer-content][data-variant=island]]:pl-[max(1rem,env(safe-area-inset-left,0px))] data-[swipe-direction=left]:items-stretch data-[swipe-direction=left]:justify-start data-[swipe-direction=right]:items-stretch data-[swipe-direction=right]:justify-end data-[swipe-direction=up]:items-start [&:not([hidden])_[data-slot=drawer-content][hidden]]:flex', local.class);
|
|
135
136
|
}
|
|
136
|
-
}, others
|
|
137
|
+
}, others, {
|
|
138
|
+
"data-slot": "drawer-positioner"
|
|
139
|
+
}));
|
|
137
140
|
}
|
|
138
141
|
});
|
|
139
142
|
}
|
|
@@ -145,7 +148,6 @@ function DrawerContent(props) {
|
|
|
145
148
|
]);
|
|
146
149
|
const rootVariant = useContext(DrawerVariantContext);
|
|
147
150
|
return createComponent(Drawer.Content, mergeProps({
|
|
148
|
-
"data-slot": "drawer-content",
|
|
149
151
|
get ["data-variant"] () {
|
|
150
152
|
return local.variant ?? rootVariant;
|
|
151
153
|
},
|
|
@@ -155,51 +157,57 @@ function DrawerContent(props) {
|
|
|
155
157
|
get draggable () {
|
|
156
158
|
return local.draggable ?? true;
|
|
157
159
|
}
|
|
158
|
-
}, others
|
|
160
|
+
}, others, {
|
|
161
|
+
"data-slot": "drawer-content"
|
|
162
|
+
}));
|
|
159
163
|
}
|
|
160
164
|
function DrawerGrabber(props) {
|
|
161
165
|
const [local, others] = splitProps(props, [
|
|
162
166
|
'class'
|
|
163
167
|
]);
|
|
164
168
|
return createComponent(Drawer.Grabber, mergeProps({
|
|
165
|
-
"data-slot": "drawer-grabber",
|
|
166
169
|
get ["class"] () {
|
|
167
170
|
return cn('group/grabber flex w-full shrink-0 cursor-grab items-center justify-center pb-1 select-none group-data-[swipe-direction=left]/drawer:hidden group-data-[swipe-direction=right]/drawer:hidden active:cursor-grabbing', local.class);
|
|
168
171
|
}
|
|
169
|
-
}, others
|
|
172
|
+
}, others, {
|
|
173
|
+
"data-slot": "drawer-grabber"
|
|
174
|
+
}));
|
|
170
175
|
}
|
|
171
176
|
function DrawerGrabberIndicator(props) {
|
|
172
177
|
const [local, others] = splitProps(props, [
|
|
173
178
|
'class'
|
|
174
179
|
]);
|
|
175
180
|
return createComponent(Drawer.GrabberIndicator, mergeProps({
|
|
176
|
-
"data-slot": "drawer-grabber-indicator",
|
|
177
181
|
get ["class"] () {
|
|
178
182
|
return cn('h-1 w-12 rounded-full bg-muted-foreground opacity-[0.45] transition-[background-color,opacity] duration-200 ease-in-out motion-reduce:transition-none [@media(hover:hover)]:group-hover/grabber:opacity-70', local.class);
|
|
179
183
|
}
|
|
180
|
-
}, others
|
|
184
|
+
}, others, {
|
|
185
|
+
"data-slot": "drawer-grabber-indicator"
|
|
186
|
+
}));
|
|
181
187
|
}
|
|
182
188
|
function DrawerTitle(props) {
|
|
183
189
|
const [local, others] = splitProps(props, [
|
|
184
190
|
'class'
|
|
185
191
|
]);
|
|
186
192
|
return createComponent(Drawer.Title, mergeProps({
|
|
187
|
-
"data-slot": "drawer-title",
|
|
188
193
|
get ["class"] () {
|
|
189
194
|
return cn('text-lg font-semibold text-popover-foreground', local.class);
|
|
190
195
|
}
|
|
191
|
-
}, others
|
|
196
|
+
}, others, {
|
|
197
|
+
"data-slot": "drawer-title"
|
|
198
|
+
}));
|
|
192
199
|
}
|
|
193
200
|
function DrawerDescription(props) {
|
|
194
201
|
const [local, others] = splitProps(props, [
|
|
195
202
|
'class'
|
|
196
203
|
]);
|
|
197
204
|
return createComponent(Drawer.Description, mergeProps({
|
|
198
|
-
"data-slot": "drawer-description",
|
|
199
205
|
get ["class"] () {
|
|
200
206
|
return cn('text-md leading-6 text-muted-foreground', local.class);
|
|
201
207
|
}
|
|
202
|
-
}, others
|
|
208
|
+
}, others, {
|
|
209
|
+
"data-slot": "drawer-description"
|
|
210
|
+
}));
|
|
203
211
|
}
|
|
204
212
|
function DrawerCloseTrigger(props) {
|
|
205
213
|
const [local, others] = splitProps(props, [
|
|
@@ -210,11 +218,12 @@ function DrawerCloseTrigger(props) {
|
|
|
210
218
|
get asChild () {
|
|
211
219
|
return local.asChild;
|
|
212
220
|
},
|
|
213
|
-
"data-slot": "drawer-close-trigger",
|
|
214
221
|
get ["class"] () {
|
|
215
222
|
return cn(!local.asChild && 'box-border inline-flex min-h-control-md cursor-pointer items-center justify-center rounded-md border border-border bg-background px-3.5 py-1 text-md leading-6 text-foreground transition-[background-color,border-color,color] duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 motion-reduce:transition-none [@media(hover:hover)]:hover:bg-accent', local.class);
|
|
216
223
|
}
|
|
217
|
-
}, others
|
|
224
|
+
}, others, {
|
|
225
|
+
"data-slot": "drawer-close-trigger"
|
|
226
|
+
}));
|
|
218
227
|
}
|
|
219
228
|
function DrawerCloseIcon(props) {
|
|
220
229
|
const [local, others] = splitProps(props, [
|
|
@@ -247,66 +256,72 @@ function DrawerSwipeArea(props) {
|
|
|
247
256
|
'class'
|
|
248
257
|
]);
|
|
249
258
|
return createComponent(Drawer.SwipeArea, mergeProps({
|
|
250
|
-
"data-slot": "drawer-swipe-area",
|
|
251
259
|
get ["class"] () {
|
|
252
260
|
return cn('fixed z-50 touch-none data-disabled:pointer-events-none data-[swipe-direction=down]:start-0 data-[swipe-direction=down]:end-0 data-[swipe-direction=down]:top-0 data-[swipe-direction=down]:h-10 data-[swipe-direction=left]:end-0 data-[swipe-direction=left]:top-0 data-[swipe-direction=left]:bottom-0 data-[swipe-direction=left]:w-10 data-[swipe-direction=right]:start-0 data-[swipe-direction=right]:top-0 data-[swipe-direction=right]:bottom-0 data-[swipe-direction=right]:w-10 data-[swipe-direction=up]:start-0 data-[swipe-direction=up]:end-0 data-[swipe-direction=up]:bottom-0 data-[swipe-direction=up]:h-10', local.class);
|
|
253
261
|
}
|
|
254
|
-
}, others
|
|
262
|
+
}, others, {
|
|
263
|
+
"data-slot": "drawer-swipe-area"
|
|
264
|
+
}));
|
|
255
265
|
}
|
|
256
266
|
function DrawerIndent(props) {
|
|
257
267
|
const [local, others] = splitProps(props, [
|
|
258
268
|
'class'
|
|
259
269
|
]);
|
|
260
270
|
return createComponent(Drawer.Indent, mergeProps({
|
|
261
|
-
"data-slot": "drawer-indent",
|
|
262
271
|
get ["class"] () {
|
|
263
272
|
return cn('relative origin-top [translate:0_0] [scale:1] transition-[transform,border-radius] duration-[450ms] ease-spring data-active:[translate:0_calc(8px*(1-var(--drawer-swipe-progress,0)))] data-active:[scale:calc(0.97+(1-0.97)*var(--drawer-swipe-progress,0))] data-active:rounded-t-lg data-active:rounded-b-none motion-reduce:[transition-duration:1ms]', local.class);
|
|
264
273
|
}
|
|
265
|
-
}, others
|
|
274
|
+
}, others, {
|
|
275
|
+
"data-slot": "drawer-indent"
|
|
276
|
+
}));
|
|
266
277
|
}
|
|
267
278
|
function DrawerIndentBackground(props) {
|
|
268
279
|
const [local, others] = splitProps(props, [
|
|
269
280
|
'class'
|
|
270
281
|
]);
|
|
271
282
|
return createComponent(Drawer.IndentBackground, mergeProps({
|
|
272
|
-
"data-slot": "drawer-indent-background",
|
|
273
283
|
get ["class"] () {
|
|
274
284
|
return cn('pointer-events-none absolute inset-0 bg-foreground opacity-0 transition-opacity duration-[450ms] ease-spring data-active:opacity-[calc(1-var(--drawer-swipe-progress,0))] motion-reduce:[transition-duration:1ms]', local.class);
|
|
275
285
|
}
|
|
276
|
-
}, others
|
|
286
|
+
}, others, {
|
|
287
|
+
"data-slot": "drawer-indent-background"
|
|
288
|
+
}));
|
|
277
289
|
}
|
|
278
290
|
function DrawerHeader(props) {
|
|
279
291
|
const [local, others] = splitProps(props, [
|
|
280
292
|
'class'
|
|
281
293
|
]);
|
|
282
294
|
return createComponent(ark.div, mergeProps({
|
|
283
|
-
"data-slot": "drawer-header",
|
|
284
295
|
get ["class"] () {
|
|
285
296
|
return cn("grid grid-cols-[minmax(0,1fr)_auto] items-start gap-1 [&>[data-slot='drawer-close-icon']]:col-start-2 [&>[data-slot='drawer-close-icon']]:justify-self-end [&>[data-slot='drawer-close-trigger']]:col-start-2 [&>[data-slot='drawer-close-trigger']]:justify-self-end [&>[data-slot='drawer-description']]:col-span-2 [&>[data-slot='drawer-title']]:col-start-1", local.class);
|
|
286
297
|
}
|
|
287
|
-
}, others
|
|
298
|
+
}, others, {
|
|
299
|
+
"data-slot": "drawer-header"
|
|
300
|
+
}));
|
|
288
301
|
}
|
|
289
302
|
function DrawerBody(props) {
|
|
290
303
|
const [local, others] = splitProps(props, [
|
|
291
304
|
'class'
|
|
292
305
|
]);
|
|
293
306
|
return createComponent(ark.div, mergeProps({
|
|
294
|
-
"data-slot": "drawer-body",
|
|
295
307
|
get ["class"] () {
|
|
296
308
|
return cn('mt-4 min-h-0 overflow-y-auto text-md leading-6 text-muted-foreground', local.class);
|
|
297
309
|
}
|
|
298
|
-
}, others
|
|
310
|
+
}, others, {
|
|
311
|
+
"data-slot": "drawer-body"
|
|
312
|
+
}));
|
|
299
313
|
}
|
|
300
314
|
function DrawerFooter(props) {
|
|
301
315
|
const [local, others] = splitProps(props, [
|
|
302
316
|
'class'
|
|
303
317
|
]);
|
|
304
318
|
return createComponent(ark.div, mergeProps({
|
|
305
|
-
"data-slot": "drawer-footer",
|
|
306
319
|
get ["class"] () {
|
|
307
320
|
return cn('mt-6 flex justify-end gap-2', local.class);
|
|
308
321
|
}
|
|
309
|
-
}, others
|
|
322
|
+
}, others, {
|
|
323
|
+
"data-slot": "drawer-footer"
|
|
324
|
+
}));
|
|
310
325
|
}
|
|
311
326
|
const Drawer_Drawer = Object.assign(DrawerRoot, {
|
|
312
327
|
Root: DrawerRoot,
|
|
@@ -48,14 +48,14 @@ function DrawerTrigger(props) {
|
|
|
48
48
|
'asChild',
|
|
49
49
|
'class'
|
|
50
50
|
]);
|
|
51
|
-
return <Drawer.Trigger asChild={local.asChild}
|
|
51
|
+
return <Drawer.Trigger asChild={local.asChild} class={cn(!local.asChild && 'box-border inline-flex min-h-control-md cursor-pointer items-center justify-center rounded-md border border-border bg-background px-3.5 py-1 text-md leading-6 text-foreground transition-[background-color,border-color,color] duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 motion-reduce:transition-none [@media(hover:hover)]:hover:bg-accent', local.class)} {...others} data-slot="drawer-trigger"/>;
|
|
52
52
|
}
|
|
53
53
|
function DrawerBackdrop(props) {
|
|
54
54
|
const [local, others] = splitProps(props, [
|
|
55
55
|
'class'
|
|
56
56
|
]);
|
|
57
57
|
return <OverlayPortal>
|
|
58
|
-
<Drawer.Backdrop
|
|
58
|
+
<Drawer.Backdrop class={cn('fixed inset-0 z-[calc(40+var(--layer-index,0))] min-h-dvh bg-overlay backdrop-blur-xs [transition:opacity_calc(var(--drawer-swipe-strength,1)*450ms)_ease-out,backdrop-filter_calc(var(--drawer-swipe-strength,1)*450ms)_ease-out] data-[state=closed]:animate-moduix-drawer-backdrop-out data-[state=open]:animate-moduix-drawer-backdrop-in data-[state=open]:data-swiping:[transition-duration:0s] motion-reduce:[transition-duration:1ms] motion-reduce:[animation-delay:0ms] motion-reduce:[animation-duration:1ms] [&[hidden]:has(~[data-slot=drawer-positioner]:not([hidden]))]:block', local.class)} {...others} data-slot="drawer-backdrop"/>
|
|
59
59
|
</OverlayPortal>;
|
|
60
60
|
}
|
|
61
61
|
function DrawerPositioner(props) {
|
|
@@ -63,7 +63,7 @@ function DrawerPositioner(props) {
|
|
|
63
63
|
'class'
|
|
64
64
|
]);
|
|
65
65
|
return <OverlayPortal>
|
|
66
|
-
<Drawer.Positioner
|
|
66
|
+
<Drawer.Positioner class={cn('fixed inset-0 z-[calc(50+var(--layer-index,0))] box-border flex items-end justify-center overflow-hidden overscroll-contain p-0 has-[>[data-slot=drawer-content][data-variant=island]]:pt-[max(1rem,env(safe-area-inset-top,0px))] has-[>[data-slot=drawer-content][data-variant=island]]:pr-[max(1rem,env(safe-area-inset-right,0px))] has-[>[data-slot=drawer-content][data-variant=island]]:pb-[max(1rem,env(safe-area-inset-bottom,0px))] has-[>[data-slot=drawer-content][data-variant=island]]:pl-[max(1rem,env(safe-area-inset-left,0px))] data-[swipe-direction=left]:items-stretch data-[swipe-direction=left]:justify-start data-[swipe-direction=right]:items-stretch data-[swipe-direction=right]:justify-end data-[swipe-direction=up]:items-start [&:not([hidden])_[data-slot=drawer-content][hidden]]:flex', local.class)} {...others} data-slot="drawer-positioner"/>
|
|
67
67
|
</OverlayPortal>;
|
|
68
68
|
}
|
|
69
69
|
function DrawerContent(props) {
|
|
@@ -73,38 +73,38 @@ function DrawerContent(props) {
|
|
|
73
73
|
'variant'
|
|
74
74
|
]);
|
|
75
75
|
const rootVariant = useContext(DrawerVariantContext);
|
|
76
|
-
return <Drawer.Content data-
|
|
76
|
+
return <Drawer.Content data-variant={local.variant ?? rootVariant} class={cn("group/drawer relative box-border flex h-full max-h-[80dvh] w-full max-w-[100vw] origin-bottom [translate:0_0] [scale:1] flex-col overscroll-contain rounded-t-xl rounded-b-none border border-border bg-popover px-6 pt-3 pb-[calc(1rem+env(safe-area-inset-bottom,0px))] text-popover-foreground shadow-lg outline-0 [transition:transform_calc(var(--drawer-swipe-strength,1)*450ms)_cubic-bezier(0,0,0.2,1),scale_450ms_cubic-bezier(0.32,0.72,0,1),translate_450ms_cubic-bezier(0.32,0.72,0,1)] after:pointer-events-none after:absolute after:inset-x-0 after:top-full after:h-control-xl after:bg-inherit after:content-[''] data-dragging:select-none data-nested-drawer-swiping:[transition-duration:0s] data-[nested-drawer-open]:[scale:calc(1-0.05*var(--nested-drawers,0))] data-[state=closed]:animate-moduix-drawer-content-out-down data-[state=open]:animate-moduix-drawer-content-in-down data-[state=open]:data-swiping:[transition-duration:0s] data-[swipe-direction=down]:data-[nested-drawer-open]:[translate:0_calc(-1*40px*var(--nested-drawers,0))] data-[swipe-direction=left]:h-full data-[swipe-direction=left]:max-h-none data-[swipe-direction=left]:w-[min(22rem,calc(100vw-2rem))] data-[swipe-direction=left]:origin-left data-[swipe-direction=left]:rounded-s-none data-[swipe-direction=left]:rounded-e-xl data-[swipe-direction=left]:p-6 data-[swipe-direction=left]:after:inset-x-auto data-[swipe-direction=left]:after:inset-y-0 data-[swipe-direction=left]:after:top-0 data-[swipe-direction=left]:after:right-full data-[swipe-direction=left]:after:h-auto data-[swipe-direction=left]:after:w-control-xl data-[swipe-direction=left]:data-[nested-drawer-open]:[translate:calc(40px*var(--nested-drawers,0))_0] data-[swipe-direction=left]:data-[state=closed]:animate-moduix-drawer-content-out-left data-[swipe-direction=left]:data-[state=open]:animate-moduix-drawer-content-in-left data-[swipe-direction=right]:h-full data-[swipe-direction=right]:max-h-none data-[swipe-direction=right]:w-[min(22rem,calc(100vw-2rem))] data-[swipe-direction=right]:origin-right data-[swipe-direction=right]:rounded-s-xl data-[swipe-direction=right]:rounded-e-none data-[swipe-direction=right]:p-6 data-[swipe-direction=right]:after:inset-x-auto data-[swipe-direction=right]:after:inset-y-0 data-[swipe-direction=right]:after:top-0 data-[swipe-direction=right]:after:left-full data-[swipe-direction=right]:after:h-auto data-[swipe-direction=right]:after:w-control-xl data-[swipe-direction=right]:data-[nested-drawer-open]:[translate:calc(-1*40px*var(--nested-drawers,0))_0] data-[swipe-direction=right]:data-[state=closed]:animate-moduix-drawer-content-out-right data-[swipe-direction=right]:data-[state=open]:animate-moduix-drawer-content-in-right data-[swipe-direction=up]:origin-top data-[swipe-direction=up]:rounded-t-none data-[swipe-direction=up]:rounded-b-xl data-[swipe-direction=up]:pt-[calc(1rem+env(safe-area-inset-top,0px))] data-[swipe-direction=up]:pb-4 data-[swipe-direction=up]:after:top-auto data-[swipe-direction=up]:after:bottom-full data-[swipe-direction=up]:data-[nested-drawer-open]:[translate:0_calc(40px*var(--nested-drawers,0))] data-[swipe-direction=up]:data-[state=closed]:animate-moduix-drawer-content-out-up data-[swipe-direction=up]:data-[state=open]:animate-moduix-drawer-content-in-up data-[variant=island]:rounded-xl data-[variant=island]:after:hidden motion-reduce:[transition-duration:1ms] motion-reduce:[animation-delay:0ms] motion-reduce:[animation-duration:1ms]", local.class)} draggable={local.draggable ?? true} {...others} data-slot="drawer-content"/>;
|
|
77
77
|
}
|
|
78
78
|
function DrawerGrabber(props) {
|
|
79
79
|
const [local, others] = splitProps(props, [
|
|
80
80
|
'class'
|
|
81
81
|
]);
|
|
82
|
-
return <Drawer.Grabber
|
|
82
|
+
return <Drawer.Grabber class={cn('group/grabber flex w-full shrink-0 cursor-grab items-center justify-center pb-1 select-none group-data-[swipe-direction=left]/drawer:hidden group-data-[swipe-direction=right]/drawer:hidden active:cursor-grabbing', local.class)} {...others} data-slot="drawer-grabber"/>;
|
|
83
83
|
}
|
|
84
84
|
function DrawerGrabberIndicator(props) {
|
|
85
85
|
const [local, others] = splitProps(props, [
|
|
86
86
|
'class'
|
|
87
87
|
]);
|
|
88
|
-
return <Drawer.GrabberIndicator
|
|
88
|
+
return <Drawer.GrabberIndicator class={cn('h-1 w-12 rounded-full bg-muted-foreground opacity-[0.45] transition-[background-color,opacity] duration-200 ease-in-out motion-reduce:transition-none [@media(hover:hover)]:group-hover/grabber:opacity-70', local.class)} {...others} data-slot="drawer-grabber-indicator"/>;
|
|
89
89
|
}
|
|
90
90
|
function DrawerTitle(props) {
|
|
91
91
|
const [local, others] = splitProps(props, [
|
|
92
92
|
'class'
|
|
93
93
|
]);
|
|
94
|
-
return <Drawer.Title
|
|
94
|
+
return <Drawer.Title class={cn('text-lg font-semibold text-popover-foreground', local.class)} {...others} data-slot="drawer-title"/>;
|
|
95
95
|
}
|
|
96
96
|
function DrawerDescription(props) {
|
|
97
97
|
const [local, others] = splitProps(props, [
|
|
98
98
|
'class'
|
|
99
99
|
]);
|
|
100
|
-
return <Drawer.Description
|
|
100
|
+
return <Drawer.Description class={cn('text-md leading-6 text-muted-foreground', local.class)} {...others} data-slot="drawer-description"/>;
|
|
101
101
|
}
|
|
102
102
|
function DrawerCloseTrigger(props) {
|
|
103
103
|
const [local, others] = splitProps(props, [
|
|
104
104
|
'asChild',
|
|
105
105
|
'class'
|
|
106
106
|
]);
|
|
107
|
-
return <Drawer.CloseTrigger asChild={local.asChild}
|
|
107
|
+
return <Drawer.CloseTrigger asChild={local.asChild} class={cn(!local.asChild && 'box-border inline-flex min-h-control-md cursor-pointer items-center justify-center rounded-md border border-border bg-background px-3.5 py-1 text-md leading-6 text-foreground transition-[background-color,border-color,color] duration-200 ease-in-out select-none focus-visible:outline-1 focus-visible:-outline-offset-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 motion-reduce:transition-none [@media(hover:hover)]:hover:bg-accent', local.class)} {...others} data-slot="drawer-close-trigger"/>;
|
|
108
108
|
}
|
|
109
109
|
function DrawerCloseIcon(props) {
|
|
110
110
|
const [local, others] = splitProps(props, [
|
|
@@ -122,37 +122,37 @@ function DrawerSwipeArea(props) {
|
|
|
122
122
|
const [local, others] = splitProps(props, [
|
|
123
123
|
'class'
|
|
124
124
|
]);
|
|
125
|
-
return <Drawer.SwipeArea
|
|
125
|
+
return <Drawer.SwipeArea class={cn('fixed z-50 touch-none data-disabled:pointer-events-none data-[swipe-direction=down]:start-0 data-[swipe-direction=down]:end-0 data-[swipe-direction=down]:top-0 data-[swipe-direction=down]:h-10 data-[swipe-direction=left]:end-0 data-[swipe-direction=left]:top-0 data-[swipe-direction=left]:bottom-0 data-[swipe-direction=left]:w-10 data-[swipe-direction=right]:start-0 data-[swipe-direction=right]:top-0 data-[swipe-direction=right]:bottom-0 data-[swipe-direction=right]:w-10 data-[swipe-direction=up]:start-0 data-[swipe-direction=up]:end-0 data-[swipe-direction=up]:bottom-0 data-[swipe-direction=up]:h-10', local.class)} {...others} data-slot="drawer-swipe-area"/>;
|
|
126
126
|
}
|
|
127
127
|
function DrawerIndent(props) {
|
|
128
128
|
const [local, others] = splitProps(props, [
|
|
129
129
|
'class'
|
|
130
130
|
]);
|
|
131
|
-
return <Drawer.Indent
|
|
131
|
+
return <Drawer.Indent class={cn('relative origin-top [translate:0_0] [scale:1] transition-[transform,border-radius] duration-[450ms] ease-spring data-active:[translate:0_calc(8px*(1-var(--drawer-swipe-progress,0)))] data-active:[scale:calc(0.97+(1-0.97)*var(--drawer-swipe-progress,0))] data-active:rounded-t-lg data-active:rounded-b-none motion-reduce:[transition-duration:1ms]', local.class)} {...others} data-slot="drawer-indent"/>;
|
|
132
132
|
}
|
|
133
133
|
function DrawerIndentBackground(props) {
|
|
134
134
|
const [local, others] = splitProps(props, [
|
|
135
135
|
'class'
|
|
136
136
|
]);
|
|
137
|
-
return <Drawer.IndentBackground
|
|
137
|
+
return <Drawer.IndentBackground class={cn('pointer-events-none absolute inset-0 bg-foreground opacity-0 transition-opacity duration-[450ms] ease-spring data-active:opacity-[calc(1-var(--drawer-swipe-progress,0))] motion-reduce:[transition-duration:1ms]', local.class)} {...others} data-slot="drawer-indent-background"/>;
|
|
138
138
|
}
|
|
139
139
|
function DrawerHeader(props) {
|
|
140
140
|
const [local, others] = splitProps(props, [
|
|
141
141
|
'class'
|
|
142
142
|
]);
|
|
143
|
-
return <ark.div
|
|
143
|
+
return <ark.div class={cn("grid grid-cols-[minmax(0,1fr)_auto] items-start gap-1 [&>[data-slot='drawer-close-icon']]:col-start-2 [&>[data-slot='drawer-close-icon']]:justify-self-end [&>[data-slot='drawer-close-trigger']]:col-start-2 [&>[data-slot='drawer-close-trigger']]:justify-self-end [&>[data-slot='drawer-description']]:col-span-2 [&>[data-slot='drawer-title']]:col-start-1", local.class)} {...others} data-slot="drawer-header"/>;
|
|
144
144
|
}
|
|
145
145
|
function DrawerBody(props) {
|
|
146
146
|
const [local, others] = splitProps(props, [
|
|
147
147
|
'class'
|
|
148
148
|
]);
|
|
149
|
-
return <ark.div
|
|
149
|
+
return <ark.div class={cn('mt-4 min-h-0 overflow-y-auto text-md leading-6 text-muted-foreground', local.class)} {...others} data-slot="drawer-body"/>;
|
|
150
150
|
}
|
|
151
151
|
function DrawerFooter(props) {
|
|
152
152
|
const [local, others] = splitProps(props, [
|
|
153
153
|
'class'
|
|
154
154
|
]);
|
|
155
|
-
return <ark.div
|
|
155
|
+
return <ark.div class={cn('mt-6 flex justify-end gap-2', local.class)} {...others} data-slot="drawer-footer"/>;
|
|
156
156
|
}
|
|
157
157
|
const Drawer_Drawer = Object.assign(DrawerRoot, {
|
|
158
158
|
Root: DrawerRoot,
|
|
@@ -9,80 +9,87 @@ function EditableRoot(props) {
|
|
|
9
9
|
'class'
|
|
10
10
|
]);
|
|
11
11
|
return createComponent(Editable.Root, mergeProps({
|
|
12
|
-
"data-slot": "editable-root",
|
|
13
12
|
get activationMode () {
|
|
14
13
|
return local.activationMode ?? 'dblclick';
|
|
15
14
|
},
|
|
16
15
|
get ["class"] () {
|
|
17
16
|
return cn('box-border inline-grid max-w-full grid-cols-[minmax(0,1fr)_auto] items-center gap-1 text-foreground has-[[data-disabled]]:opacity-50', local.class);
|
|
18
17
|
}
|
|
19
|
-
}, others
|
|
18
|
+
}, others, {
|
|
19
|
+
"data-slot": "editable-root"
|
|
20
|
+
}));
|
|
20
21
|
}
|
|
21
22
|
function EditableRootProvider(props) {
|
|
22
23
|
const [local, others] = splitProps(props, [
|
|
23
24
|
'class'
|
|
24
25
|
]);
|
|
25
26
|
return createComponent(Editable.RootProvider, mergeProps({
|
|
26
|
-
"data-slot": "editable-root-provider",
|
|
27
27
|
get ["class"] () {
|
|
28
28
|
return cn('box-border inline-grid max-w-full grid-cols-[minmax(0,1fr)_auto] items-center gap-1 text-foreground has-[[data-disabled]]:opacity-50', local.class);
|
|
29
29
|
}
|
|
30
|
-
}, others
|
|
30
|
+
}, others, {
|
|
31
|
+
"data-slot": "editable-root-provider"
|
|
32
|
+
}));
|
|
31
33
|
}
|
|
32
34
|
function EditableLabel(props) {
|
|
33
35
|
const [local, others] = splitProps(props, [
|
|
34
36
|
'class'
|
|
35
37
|
]);
|
|
36
38
|
return createComponent(Editable.Label, mergeProps({
|
|
37
|
-
"data-slot": "editable-label",
|
|
38
39
|
get ["class"] () {
|
|
39
40
|
return cn('col-span-full inline-flex items-center gap-1 text-sm leading-5 font-medium text-foreground data-invalid:text-destructive', local.class);
|
|
40
41
|
}
|
|
41
|
-
}, others
|
|
42
|
+
}, others, {
|
|
43
|
+
"data-slot": "editable-label"
|
|
44
|
+
}));
|
|
42
45
|
}
|
|
43
46
|
function EditableArea(props) {
|
|
44
47
|
const [local, others] = splitProps(props, [
|
|
45
48
|
'class'
|
|
46
49
|
]);
|
|
47
50
|
return createComponent(Editable.Area, mergeProps({
|
|
48
|
-
"data-slot": "editable-area",
|
|
49
51
|
get ["class"] () {
|
|
50
52
|
return cn('col-start-1 box-border inline-flex min-h-control-md w-full min-w-0 items-center rounded-md border border-border bg-background px-3.5 py-1 text-foreground outline-1 -outline-offset-1 outline-transparent transition-[border-color,outline-color,opacity] duration-200 ease-in-out has-[[aria-invalid=true]]:border-destructive has-[[data-invalid]]:border-destructive data-disabled:pointer-events-none data-focus:outline-ring data-focus:has-[[aria-invalid=true]]:outline-destructive data-focus:has-[[data-invalid]]:outline-destructive motion-reduce:transition-none', local.class);
|
|
51
53
|
}
|
|
52
|
-
}, others
|
|
54
|
+
}, others, {
|
|
55
|
+
"data-slot": "editable-area"
|
|
56
|
+
}));
|
|
53
57
|
}
|
|
54
58
|
function EditableInput(props) {
|
|
55
59
|
const [local, others] = splitProps(props, [
|
|
56
60
|
'class'
|
|
57
61
|
]);
|
|
58
62
|
return createComponent(Editable.Input, mergeProps({
|
|
59
|
-
"data-slot": "editable-input",
|
|
60
63
|
get ["class"] () {
|
|
61
64
|
return cn('box-border block w-full min-w-0 appearance-none bg-transparent text-md leading-6 text-inherit outline-0 placeholder:text-muted-foreground [&:is(textarea)]:min-h-24 [&:is(textarea)]:resize-y', local.class);
|
|
62
65
|
}
|
|
63
|
-
}, others
|
|
66
|
+
}, others, {
|
|
67
|
+
"data-slot": "editable-input"
|
|
68
|
+
}));
|
|
64
69
|
}
|
|
65
70
|
function EditablePreview(props) {
|
|
66
71
|
const [local, others] = splitProps(props, [
|
|
67
72
|
'class'
|
|
68
73
|
]);
|
|
69
74
|
return createComponent(Editable.Preview, mergeProps({
|
|
70
|
-
"data-slot": "editable-preview",
|
|
71
75
|
get ["class"] () {
|
|
72
76
|
return cn('box-border block min-h-[1lh] w-full min-w-0 cursor-text bg-transparent text-md leading-6 text-inherit outline-0 aria-readonly:cursor-default data-disabled:cursor-default data-readonly:cursor-default data-[placeholder-shown]:text-muted-foreground', local.class);
|
|
73
77
|
}
|
|
74
|
-
}, others
|
|
78
|
+
}, others, {
|
|
79
|
+
"data-slot": "editable-preview"
|
|
80
|
+
}));
|
|
75
81
|
}
|
|
76
82
|
function EditableControl(props) {
|
|
77
83
|
const [local, others] = splitProps(props, [
|
|
78
84
|
'class'
|
|
79
85
|
]);
|
|
80
86
|
return createComponent(Editable.Control, mergeProps({
|
|
81
|
-
"data-slot": "editable-control",
|
|
82
87
|
get ["class"] () {
|
|
83
88
|
return cn('col-start-2 inline-flex items-center gap-1 self-center', local.class);
|
|
84
89
|
}
|
|
85
|
-
}, others
|
|
90
|
+
}, others, {
|
|
91
|
+
"data-slot": "editable-control"
|
|
92
|
+
}));
|
|
86
93
|
}
|
|
87
94
|
function EditableEditTrigger(props) {
|
|
88
95
|
const [local, others] = splitProps(props, [
|
|
@@ -91,11 +98,11 @@ function EditableEditTrigger(props) {
|
|
|
91
98
|
]);
|
|
92
99
|
const resolvedChildren = children(()=>local.children);
|
|
93
100
|
return createComponent(Editable.EditTrigger, mergeProps({
|
|
94
|
-
"data-slot": "editable-edit-trigger",
|
|
95
101
|
get ["class"] () {
|
|
96
102
|
return cn('box-border inline-flex size-control-md shrink-0 cursor-pointer items-center justify-center rounded-sm border border-border bg-background text-foreground outline-1 -outline-offset-1 outline-transparent transition-[background-color,border-color,color,outline-color,opacity] duration-200 ease-in-out focus-visible:outline-ring active:bg-accent disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 data-focus:outline-ring motion-reduce:transition-none [&>svg]:size-3.5 [&>svg]:shrink-0 [@media(hover:hover)]:hover:bg-accent', local.class);
|
|
97
103
|
}
|
|
98
104
|
}, others, {
|
|
105
|
+
"data-slot": "editable-edit-trigger",
|
|
99
106
|
get children () {
|
|
100
107
|
return resolvedChildren() ?? createComponent(PencilIcon, {});
|
|
101
108
|
}
|
|
@@ -108,11 +115,11 @@ function EditableSubmitTrigger(props) {
|
|
|
108
115
|
]);
|
|
109
116
|
const resolvedChildren = children(()=>local.children);
|
|
110
117
|
return createComponent(Editable.SubmitTrigger, mergeProps({
|
|
111
|
-
"data-slot": "editable-submit-trigger",
|
|
112
118
|
get ["class"] () {
|
|
113
119
|
return cn('box-border inline-flex size-control-md shrink-0 cursor-pointer items-center justify-center rounded-sm border border-border bg-background text-foreground outline-1 -outline-offset-1 outline-transparent transition-[background-color,border-color,color,outline-color,opacity] duration-200 ease-in-out focus-visible:outline-ring active:bg-accent disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 data-focus:outline-ring motion-reduce:transition-none [&>svg]:size-3.5 [&>svg]:shrink-0 [@media(hover:hover)]:hover:bg-accent', local.class);
|
|
114
120
|
}
|
|
115
121
|
}, others, {
|
|
122
|
+
"data-slot": "editable-submit-trigger",
|
|
116
123
|
get children () {
|
|
117
124
|
return resolvedChildren() ?? createComponent(CheckIcon, {});
|
|
118
125
|
}
|
|
@@ -125,11 +132,11 @@ function EditableCancelTrigger(props) {
|
|
|
125
132
|
]);
|
|
126
133
|
const resolvedChildren = children(()=>local.children);
|
|
127
134
|
return createComponent(Editable.CancelTrigger, mergeProps({
|
|
128
|
-
"data-slot": "editable-cancel-trigger",
|
|
129
135
|
get ["class"] () {
|
|
130
136
|
return cn('box-border inline-flex size-control-md shrink-0 cursor-pointer items-center justify-center rounded-sm border border-border bg-background text-foreground outline-1 -outline-offset-1 outline-transparent transition-[background-color,border-color,color,outline-color,opacity] duration-200 ease-in-out focus-visible:outline-ring active:bg-accent disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 data-focus:outline-ring motion-reduce:transition-none [&>svg]:size-3.5 [&>svg]:shrink-0 [@media(hover:hover)]:hover:bg-accent', local.class);
|
|
131
137
|
}
|
|
132
138
|
}, others, {
|
|
139
|
+
"data-slot": "editable-cancel-trigger",
|
|
133
140
|
get children () {
|
|
134
141
|
return resolvedChildren() ?? createComponent(CloseIcon, {});
|
|
135
142
|
}
|
|
@@ -7,43 +7,43 @@ function EditableRoot(props) {
|
|
|
7
7
|
'activationMode',
|
|
8
8
|
'class'
|
|
9
9
|
]);
|
|
10
|
-
return <Editable.Root
|
|
10
|
+
return <Editable.Root activationMode={local.activationMode ?? 'dblclick'} class={cn('box-border inline-grid max-w-full grid-cols-[minmax(0,1fr)_auto] items-center gap-1 text-foreground has-[[data-disabled]]:opacity-50', local.class)} {...others} data-slot="editable-root"/>;
|
|
11
11
|
}
|
|
12
12
|
function EditableRootProvider(props) {
|
|
13
13
|
const [local, others] = splitProps(props, [
|
|
14
14
|
'class'
|
|
15
15
|
]);
|
|
16
|
-
return <Editable.RootProvider
|
|
16
|
+
return <Editable.RootProvider class={cn('box-border inline-grid max-w-full grid-cols-[minmax(0,1fr)_auto] items-center gap-1 text-foreground has-[[data-disabled]]:opacity-50', local.class)} {...others} data-slot="editable-root-provider"/>;
|
|
17
17
|
}
|
|
18
18
|
function EditableLabel(props) {
|
|
19
19
|
const [local, others] = splitProps(props, [
|
|
20
20
|
'class'
|
|
21
21
|
]);
|
|
22
|
-
return <Editable.Label
|
|
22
|
+
return <Editable.Label class={cn('col-span-full inline-flex items-center gap-1 text-sm leading-5 font-medium text-foreground data-invalid:text-destructive', local.class)} {...others} data-slot="editable-label"/>;
|
|
23
23
|
}
|
|
24
24
|
function EditableArea(props) {
|
|
25
25
|
const [local, others] = splitProps(props, [
|
|
26
26
|
'class'
|
|
27
27
|
]);
|
|
28
|
-
return <Editable.Area
|
|
28
|
+
return <Editable.Area class={cn('col-start-1 box-border inline-flex min-h-control-md w-full min-w-0 items-center rounded-md border border-border bg-background px-3.5 py-1 text-foreground outline-1 -outline-offset-1 outline-transparent transition-[border-color,outline-color,opacity] duration-200 ease-in-out has-[[aria-invalid=true]]:border-destructive has-[[data-invalid]]:border-destructive data-disabled:pointer-events-none data-focus:outline-ring data-focus:has-[[aria-invalid=true]]:outline-destructive data-focus:has-[[data-invalid]]:outline-destructive motion-reduce:transition-none', local.class)} {...others} data-slot="editable-area"/>;
|
|
29
29
|
}
|
|
30
30
|
function EditableInput(props) {
|
|
31
31
|
const [local, others] = splitProps(props, [
|
|
32
32
|
'class'
|
|
33
33
|
]);
|
|
34
|
-
return <Editable.Input
|
|
34
|
+
return <Editable.Input class={cn('box-border block w-full min-w-0 appearance-none bg-transparent text-md leading-6 text-inherit outline-0 placeholder:text-muted-foreground [&:is(textarea)]:min-h-24 [&:is(textarea)]:resize-y', local.class)} {...others} data-slot="editable-input"/>;
|
|
35
35
|
}
|
|
36
36
|
function EditablePreview(props) {
|
|
37
37
|
const [local, others] = splitProps(props, [
|
|
38
38
|
'class'
|
|
39
39
|
]);
|
|
40
|
-
return <Editable.Preview
|
|
40
|
+
return <Editable.Preview class={cn('box-border block min-h-[1lh] w-full min-w-0 cursor-text bg-transparent text-md leading-6 text-inherit outline-0 aria-readonly:cursor-default data-disabled:cursor-default data-readonly:cursor-default data-[placeholder-shown]:text-muted-foreground', local.class)} {...others} data-slot="editable-preview"/>;
|
|
41
41
|
}
|
|
42
42
|
function EditableControl(props) {
|
|
43
43
|
const [local, others] = splitProps(props, [
|
|
44
44
|
'class'
|
|
45
45
|
]);
|
|
46
|
-
return <Editable.Control
|
|
46
|
+
return <Editable.Control class={cn('col-start-2 inline-flex items-center gap-1 self-center', local.class)} {...others} data-slot="editable-control"/>;
|
|
47
47
|
}
|
|
48
48
|
function EditableEditTrigger(props) {
|
|
49
49
|
const [local, others] = splitProps(props, [
|
|
@@ -51,7 +51,7 @@ function EditableEditTrigger(props) {
|
|
|
51
51
|
'class'
|
|
52
52
|
]);
|
|
53
53
|
const resolvedChildren = children(()=>local.children);
|
|
54
|
-
return <Editable.EditTrigger
|
|
54
|
+
return <Editable.EditTrigger class={cn('box-border inline-flex size-control-md shrink-0 cursor-pointer items-center justify-center rounded-sm border border-border bg-background text-foreground outline-1 -outline-offset-1 outline-transparent transition-[background-color,border-color,color,outline-color,opacity] duration-200 ease-in-out focus-visible:outline-ring active:bg-accent disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 data-focus:outline-ring motion-reduce:transition-none [&>svg]:size-3.5 [&>svg]:shrink-0 [@media(hover:hover)]:hover:bg-accent', local.class)} {...others} data-slot="editable-edit-trigger">
|
|
55
55
|
{resolvedChildren() ?? <PencilIcon/>}
|
|
56
56
|
</Editable.EditTrigger>;
|
|
57
57
|
}
|
|
@@ -61,7 +61,7 @@ function EditableSubmitTrigger(props) {
|
|
|
61
61
|
'class'
|
|
62
62
|
]);
|
|
63
63
|
const resolvedChildren = children(()=>local.children);
|
|
64
|
-
return <Editable.SubmitTrigger
|
|
64
|
+
return <Editable.SubmitTrigger class={cn('box-border inline-flex size-control-md shrink-0 cursor-pointer items-center justify-center rounded-sm border border-border bg-background text-foreground outline-1 -outline-offset-1 outline-transparent transition-[background-color,border-color,color,outline-color,opacity] duration-200 ease-in-out focus-visible:outline-ring active:bg-accent disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 data-focus:outline-ring motion-reduce:transition-none [&>svg]:size-3.5 [&>svg]:shrink-0 [@media(hover:hover)]:hover:bg-accent', local.class)} {...others} data-slot="editable-submit-trigger">
|
|
65
65
|
{resolvedChildren() ?? <CheckIcon/>}
|
|
66
66
|
</Editable.SubmitTrigger>;
|
|
67
67
|
}
|
|
@@ -71,7 +71,7 @@ function EditableCancelTrigger(props) {
|
|
|
71
71
|
'class'
|
|
72
72
|
]);
|
|
73
73
|
const resolvedChildren = children(()=>local.children);
|
|
74
|
-
return <Editable.CancelTrigger
|
|
74
|
+
return <Editable.CancelTrigger class={cn('box-border inline-flex size-control-md shrink-0 cursor-pointer items-center justify-center rounded-sm border border-border bg-background text-foreground outline-1 -outline-offset-1 outline-transparent transition-[background-color,border-color,color,outline-color,opacity] duration-200 ease-in-out focus-visible:outline-ring active:bg-accent disabled:pointer-events-none disabled:opacity-50 data-disabled:pointer-events-none data-disabled:opacity-50 data-focus:outline-ring motion-reduce:transition-none [&>svg]:size-3.5 [&>svg]:shrink-0 [@media(hover:hover)]:hover:bg-accent', local.class)} {...others} data-slot="editable-cancel-trigger">
|
|
75
75
|
{resolvedChildren() ?? <CloseIcon/>}
|
|
76
76
|
</Editable.CancelTrigger>;
|
|
77
77
|
}
|
|
@@ -16,7 +16,7 @@ function EmptyRoot(props) {
|
|
|
16
16
|
"data-part": "root",
|
|
17
17
|
"data-slot": "empty-root",
|
|
18
18
|
get ["class"] () {
|
|
19
|
-
return cn('grid w-full min-w-0 justify-items-center gap-4 rounded-xl border border-border bg-card p-8 text-center text-card-foreground', local.class);
|
|
19
|
+
return cn('grid w-full min-w-0 justify-items-center gap-4 rounded-xl border border-border bg-[color-mix(in_oklab,var(--color-card)_92%,var(--color-muted))] p-8 text-center text-card-foreground', local.class);
|
|
20
20
|
}
|
|
21
21
|
}));
|
|
22
22
|
}
|
|
@@ -6,7 +6,7 @@ function EmptyRoot(props) {
|
|
|
6
6
|
'asChild',
|
|
7
7
|
'class'
|
|
8
8
|
]);
|
|
9
|
-
return <ark.div asChild={local.asChild} {...others} data-scope="empty" data-part="root" data-slot="empty-root" class={cn('grid w-full min-w-0 justify-items-center gap-4 rounded-xl border border-border bg-card p-8 text-center text-card-foreground', local.class)}/>;
|
|
9
|
+
return <ark.div asChild={local.asChild} {...others} data-scope="empty" data-part="root" data-slot="empty-root" class={cn('grid w-full min-w-0 justify-items-center gap-4 rounded-xl border border-border bg-[color-mix(in_oklab,var(--color-card)_92%,var(--color-muted))] p-8 text-center text-card-foreground', local.class)}/>;
|
|
10
10
|
}
|
|
11
11
|
function EmptyIcon(props) {
|
|
12
12
|
const [local, others] = splitProps(props, [
|