beez-ui 0.5.3 → 0.5.4
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/CHANGELOG.md +4 -0
- package/README.md +63 -2
- package/dist/components/alert-dialog.js +72 -28
- package/dist/components/alert.js +9 -5
- package/dist/components/animated-theme-toggler.js +113 -97
- package/dist/components/avatar.js +22 -15
- package/dist/components/badge.js +9 -5
- package/dist/components/button.js +11 -7
- package/dist/components/card.js +9 -5
- package/dist/components/carousel.js +59 -55
- package/dist/components/checkbox.js +16 -9
- package/dist/components/dialog.js +77 -33
- package/dist/components/dropdown-menu.js +126 -49
- package/dist/components/form.js +16 -9
- package/dist/components/highlighter.js +18 -12
- package/dist/components/hover-card.js +60 -21
- package/dist/components/input-group.js +9 -5
- package/dist/components/input.js +9 -5
- package/dist/components/label.js +8 -4
- package/dist/components/link.d.ts +0 -1
- package/dist/components/link.js +28 -20
- package/dist/components/popover.js +66 -25
- package/dist/components/radio-group.js +16 -9
- package/dist/components/select.js +34 -24
- package/dist/components/separator.js +9 -5
- package/dist/components/sheet.js +78 -34
- package/dist/components/sidebar.js +21 -14
- package/dist/components/skeleton.js +8 -4
- package/dist/components/svgs/whatsappIcon.js +14 -9
- package/dist/components/switch.js +16 -9
- package/dist/components/table.js +8 -4
- package/dist/components/tabs.js +15 -8
- package/dist/components/textarea.js +8 -4
- package/dist/components/themed-toaster.js +61 -27
- package/dist/components/tooltip.js +70 -29
- package/dist/components/typing-animation.js +80 -58
- package/dist/constants/motion.d.ts +2 -0
- package/dist/constants/motion.js +2 -0
- package/dist/hooks/use-prefers-reduced-motion.d.ts +2 -0
- package/dist/hooks/use-prefers-reduced-motion.js +27 -0
- package/dist/motion/motion-slot.d.ts +9 -0
- package/dist/motion/motion-slot.js +353 -0
- package/dist/motion/presence.d.ts +33 -0
- package/dist/motion/presence.js +92 -0
- package/dist/motion/tokens.d.ts +13 -0
- package/dist/motion/tokens.js +17 -0
- package/dist/providers/beez-ui-provider.js +7 -3
- package/dist/styles.css +1 -1
- package/package.json +12 -4
|
@@ -3,9 +3,10 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
3
3
|
import { Button as ButtonPrimitive } from "@base-ui/react/button";
|
|
4
4
|
import { cva } from "class-variance-authority";
|
|
5
5
|
import { Slot } from "radix-ui";
|
|
6
|
+
import { MotionSlot } from "../motion/motion-slot.js";
|
|
6
7
|
import { cn } from "../lib/utils.js";
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
-
const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50
|
|
9
|
+
const buttonVariants = cva("group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
9
10
|
variants: {
|
|
10
11
|
variant: {
|
|
11
12
|
default: "bg-primary text-primary-foreground hover:bg-primary/80",
|
|
@@ -73,12 +74,15 @@ function Button(t0) {
|
|
|
73
74
|
}
|
|
74
75
|
let t5;
|
|
75
76
|
if ($[10] !== Comp || $[11] !== props || $[12] !== size || $[13] !== t4 || $[14] !== variant) {
|
|
76
|
-
t5 = /* @__PURE__ */ _jsx(
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
t5 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
78
|
+
kind: "press",
|
|
79
|
+
children: /* @__PURE__ */ _jsx(Comp, {
|
|
80
|
+
"data-slot": "button",
|
|
81
|
+
"data-variant": variant,
|
|
82
|
+
"data-size": size,
|
|
83
|
+
className: t4,
|
|
84
|
+
...props
|
|
85
|
+
})
|
|
82
86
|
});
|
|
83
87
|
$[10] = Comp;
|
|
84
88
|
$[11] = props;
|
package/dist/components/card.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { MotionSlot } from "../motion/motion-slot.js";
|
|
2
3
|
import { cn } from "../lib/utils.js";
|
|
3
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
5
|
function Card({ className, size = "default", ...props }) {
|
|
5
|
-
return /* @__PURE__ */ _jsx(
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
return /* @__PURE__ */ _jsx(MotionSlot, {
|
|
7
|
+
kind: "card",
|
|
8
|
+
children: /* @__PURE__ */ _jsx("div", {
|
|
9
|
+
"data-slot": "card",
|
|
10
|
+
"data-size": size,
|
|
11
|
+
className: cn("group/card flex flex-col gap-4 overflow-hidden rounded-xl bg-card py-4 text-sm text-card-foreground ring-1 ring-foreground/10 has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:gap-3 data-[size=sm]:py-3 data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl", className),
|
|
12
|
+
...props
|
|
13
|
+
})
|
|
10
14
|
});
|
|
11
15
|
}
|
|
12
16
|
function CardHeader({ className, ...props }) {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { c as _c } from "react/compiler-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import useEmblaCarousel from "embla-carousel-react";
|
|
5
|
+
import { usePrefersReducedMotion } from "../hooks/use-prefers-reduced-motion.js";
|
|
5
6
|
import { cn } from "../lib/utils.js";
|
|
6
7
|
import { Button } from "./button.js";
|
|
7
8
|
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
@@ -15,7 +16,7 @@ function useCarousel() {
|
|
|
15
16
|
return context;
|
|
16
17
|
}
|
|
17
18
|
function Carousel(t0) {
|
|
18
|
-
const $ = _c(
|
|
19
|
+
const $ = _c(47);
|
|
19
20
|
let children;
|
|
20
21
|
let className;
|
|
21
22
|
let opts;
|
|
@@ -43,6 +44,7 @@ function Carousel(t0) {
|
|
|
43
44
|
t1 = $[7];
|
|
44
45
|
}
|
|
45
46
|
const orientation = t1 === undefined ? "horizontal" : t1;
|
|
47
|
+
const shouldReduceMotion = usePrefersReducedMotion();
|
|
46
48
|
const t2 = orientation === "horizontal" ? "x" : "y";
|
|
47
49
|
let t3;
|
|
48
50
|
if ($[8] !== opts || $[9] !== t2) {
|
|
@@ -74,29 +76,31 @@ function Carousel(t0) {
|
|
|
74
76
|
}
|
|
75
77
|
const onSelect = t4;
|
|
76
78
|
let t5;
|
|
77
|
-
if ($[12] !== api) {
|
|
79
|
+
if ($[12] !== api || $[13] !== shouldReduceMotion) {
|
|
78
80
|
t5 = () => {
|
|
79
|
-
api?.scrollPrev();
|
|
81
|
+
api?.scrollPrev(shouldReduceMotion);
|
|
80
82
|
};
|
|
81
83
|
$[12] = api;
|
|
82
|
-
$[13] =
|
|
84
|
+
$[13] = shouldReduceMotion;
|
|
85
|
+
$[14] = t5;
|
|
83
86
|
} else {
|
|
84
|
-
t5 = $[
|
|
87
|
+
t5 = $[14];
|
|
85
88
|
}
|
|
86
89
|
const scrollPrev = t5;
|
|
87
90
|
let t6;
|
|
88
|
-
if ($[
|
|
91
|
+
if ($[15] !== api || $[16] !== shouldReduceMotion) {
|
|
89
92
|
t6 = () => {
|
|
90
|
-
api?.scrollNext();
|
|
93
|
+
api?.scrollNext(shouldReduceMotion);
|
|
91
94
|
};
|
|
92
|
-
$[
|
|
93
|
-
$[
|
|
95
|
+
$[15] = api;
|
|
96
|
+
$[16] = shouldReduceMotion;
|
|
97
|
+
$[17] = t6;
|
|
94
98
|
} else {
|
|
95
|
-
t6 = $[
|
|
99
|
+
t6 = $[17];
|
|
96
100
|
}
|
|
97
101
|
const scrollNext = t6;
|
|
98
102
|
let t7;
|
|
99
|
-
if ($[
|
|
103
|
+
if ($[18] !== scrollNext || $[19] !== scrollPrev) {
|
|
100
104
|
t7 = (event) => {
|
|
101
105
|
if (event.key === "ArrowLeft") {
|
|
102
106
|
event.preventDefault();
|
|
@@ -108,16 +112,16 @@ function Carousel(t0) {
|
|
|
108
112
|
}
|
|
109
113
|
}
|
|
110
114
|
};
|
|
111
|
-
$[
|
|
112
|
-
$[
|
|
113
|
-
$[
|
|
115
|
+
$[18] = scrollNext;
|
|
116
|
+
$[19] = scrollPrev;
|
|
117
|
+
$[20] = t7;
|
|
114
118
|
} else {
|
|
115
|
-
t7 = $[
|
|
119
|
+
t7 = $[20];
|
|
116
120
|
}
|
|
117
121
|
const handleKeyDown = t7;
|
|
118
122
|
let t8;
|
|
119
123
|
let t9;
|
|
120
|
-
if ($[
|
|
124
|
+
if ($[21] !== api || $[22] !== setApi) {
|
|
121
125
|
t8 = () => {
|
|
122
126
|
if (!api || !setApi) {
|
|
123
127
|
return;
|
|
@@ -125,18 +129,18 @@ function Carousel(t0) {
|
|
|
125
129
|
setApi(api);
|
|
126
130
|
};
|
|
127
131
|
t9 = [api, setApi];
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
131
|
-
$[
|
|
132
|
+
$[21] = api;
|
|
133
|
+
$[22] = setApi;
|
|
134
|
+
$[23] = t8;
|
|
135
|
+
$[24] = t9;
|
|
132
136
|
} else {
|
|
133
|
-
t8 = $[
|
|
134
|
-
t9 = $[
|
|
137
|
+
t8 = $[23];
|
|
138
|
+
t9 = $[24];
|
|
135
139
|
}
|
|
136
140
|
React.useEffect(t8, t9);
|
|
137
141
|
let t10;
|
|
138
142
|
let t11;
|
|
139
|
-
if ($[
|
|
143
|
+
if ($[25] !== api) {
|
|
140
144
|
t10 = () => {
|
|
141
145
|
if (!api) {
|
|
142
146
|
return;
|
|
@@ -156,17 +160,17 @@ function Carousel(t0) {
|
|
|
156
160
|
};
|
|
157
161
|
};
|
|
158
162
|
t11 = [api, onSelect];
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
163
|
+
$[25] = api;
|
|
164
|
+
$[26] = t10;
|
|
165
|
+
$[27] = t11;
|
|
162
166
|
} else {
|
|
163
|
-
t10 = $[
|
|
164
|
-
t11 = $[
|
|
167
|
+
t10 = $[26];
|
|
168
|
+
t11 = $[27];
|
|
165
169
|
}
|
|
166
170
|
React.useEffect(t10, t11);
|
|
167
171
|
const t12 = orientation || (opts?.axis === "y" ? "vertical" : "horizontal");
|
|
168
172
|
let t13;
|
|
169
|
-
if ($[
|
|
173
|
+
if ($[28] !== api || $[29] !== canScrollNext || $[30] !== canScrollPrev || $[31] !== carouselRef || $[32] !== opts || $[33] !== scrollNext || $[34] !== scrollPrev || $[35] !== t12) {
|
|
170
174
|
t13 = {
|
|
171
175
|
carouselRef,
|
|
172
176
|
api,
|
|
@@ -177,28 +181,28 @@ function Carousel(t0) {
|
|
|
177
181
|
canScrollPrev,
|
|
178
182
|
canScrollNext
|
|
179
183
|
};
|
|
180
|
-
$[
|
|
181
|
-
$[
|
|
182
|
-
$[
|
|
183
|
-
$[
|
|
184
|
-
$[
|
|
185
|
-
$[
|
|
186
|
-
$[
|
|
187
|
-
$[
|
|
188
|
-
$[
|
|
184
|
+
$[28] = api;
|
|
185
|
+
$[29] = canScrollNext;
|
|
186
|
+
$[30] = canScrollPrev;
|
|
187
|
+
$[31] = carouselRef;
|
|
188
|
+
$[32] = opts;
|
|
189
|
+
$[33] = scrollNext;
|
|
190
|
+
$[34] = scrollPrev;
|
|
191
|
+
$[35] = t12;
|
|
192
|
+
$[36] = t13;
|
|
189
193
|
} else {
|
|
190
|
-
t13 = $[
|
|
194
|
+
t13 = $[36];
|
|
191
195
|
}
|
|
192
196
|
let t14;
|
|
193
|
-
if ($[
|
|
197
|
+
if ($[37] !== className) {
|
|
194
198
|
t14 = cn("relative", className);
|
|
195
|
-
$[
|
|
196
|
-
$[
|
|
199
|
+
$[37] = className;
|
|
200
|
+
$[38] = t14;
|
|
197
201
|
} else {
|
|
198
|
-
t14 = $[
|
|
202
|
+
t14 = $[38];
|
|
199
203
|
}
|
|
200
204
|
let t15;
|
|
201
|
-
if ($[
|
|
205
|
+
if ($[39] !== children || $[40] !== handleKeyDown || $[41] !== props || $[42] !== t14) {
|
|
202
206
|
t15 = /* @__PURE__ */ _jsx("div", {
|
|
203
207
|
onKeyDownCapture: handleKeyDown,
|
|
204
208
|
className: t14,
|
|
@@ -208,25 +212,25 @@ function Carousel(t0) {
|
|
|
208
212
|
...props,
|
|
209
213
|
children
|
|
210
214
|
});
|
|
211
|
-
$[
|
|
212
|
-
$[
|
|
213
|
-
$[
|
|
214
|
-
$[
|
|
215
|
-
$[
|
|
215
|
+
$[39] = children;
|
|
216
|
+
$[40] = handleKeyDown;
|
|
217
|
+
$[41] = props;
|
|
218
|
+
$[42] = t14;
|
|
219
|
+
$[43] = t15;
|
|
216
220
|
} else {
|
|
217
|
-
t15 = $[
|
|
221
|
+
t15 = $[43];
|
|
218
222
|
}
|
|
219
223
|
let t16;
|
|
220
|
-
if ($[
|
|
224
|
+
if ($[44] !== t13 || $[45] !== t15) {
|
|
221
225
|
t16 = /* @__PURE__ */ _jsx(CarouselContext.Provider, {
|
|
222
226
|
value: t13,
|
|
223
227
|
children: t15
|
|
224
228
|
});
|
|
225
|
-
$[
|
|
226
|
-
$[
|
|
227
|
-
$[
|
|
229
|
+
$[44] = t13;
|
|
230
|
+
$[45] = t15;
|
|
231
|
+
$[46] = t16;
|
|
228
232
|
} else {
|
|
229
|
-
t16 = $[
|
|
233
|
+
t16 = $[46];
|
|
230
234
|
}
|
|
231
235
|
return t16;
|
|
232
236
|
}
|
|
@@ -3,6 +3,7 @@ import { c as _c } from "react/compiler-runtime";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Checkbox as CheckboxPrimitive } from "radix-ui";
|
|
5
5
|
import { CheckIcon } from "lucide-react";
|
|
6
|
+
import { MotionSlot } from "../motion/motion-slot.js";
|
|
6
7
|
import { cn } from "../lib/utils.js";
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
9
|
function Checkbox(t0) {
|
|
@@ -28,10 +29,13 @@ function Checkbox(t0) {
|
|
|
28
29
|
}
|
|
29
30
|
let t2;
|
|
30
31
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
31
|
-
t2 = /* @__PURE__ */ _jsx(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
t2 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
33
|
+
kind: "selection",
|
|
34
|
+
children: /* @__PURE__ */ _jsx(CheckboxPrimitive.Indicator, {
|
|
35
|
+
"data-slot": "checkbox-indicator",
|
|
36
|
+
className: "grid place-content-center text-current transition-none [&>svg]:size-3.5",
|
|
37
|
+
children: /* @__PURE__ */ _jsx(CheckIcon, {})
|
|
38
|
+
})
|
|
35
39
|
});
|
|
36
40
|
$[5] = t2;
|
|
37
41
|
} else {
|
|
@@ -39,11 +43,14 @@ function Checkbox(t0) {
|
|
|
39
43
|
}
|
|
40
44
|
let t3;
|
|
41
45
|
if ($[6] !== props || $[7] !== t1) {
|
|
42
|
-
t3 = /* @__PURE__ */ _jsx(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
t3 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
47
|
+
kind: "field",
|
|
48
|
+
children: /* @__PURE__ */ _jsx(CheckboxPrimitive.Root, {
|
|
49
|
+
"data-slot": "checkbox",
|
|
50
|
+
className: t1,
|
|
51
|
+
...props,
|
|
52
|
+
children: t2
|
|
53
|
+
})
|
|
47
54
|
});
|
|
48
55
|
$[6] = props;
|
|
49
56
|
$[7] = t1;
|
|
@@ -2,12 +2,14 @@
|
|
|
2
2
|
import { c as _c } from "react/compiler-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Dialog as DialogPrimitive } from "radix-ui";
|
|
5
|
+
import { MotionSlot } from "../motion/motion-slot.js";
|
|
6
|
+
import { MotionPresence, MotionOpenProvider, useMotionOpenState } from "../motion/presence.js";
|
|
5
7
|
import { cn } from "../lib/utils.js";
|
|
6
8
|
import { Button } from "./button.js";
|
|
7
9
|
import { XIcon } from "lucide-react";
|
|
8
10
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
11
|
function Dialog(t0) {
|
|
10
|
-
const $ = _c(
|
|
12
|
+
const $ = _c(9);
|
|
11
13
|
let props;
|
|
12
14
|
if ($[0] !== t0) {
|
|
13
15
|
({...props} = t0);
|
|
@@ -16,18 +18,36 @@ function Dialog(t0) {
|
|
|
16
18
|
} else {
|
|
17
19
|
props = $[1];
|
|
18
20
|
}
|
|
21
|
+
const [motionOpen, setMotionOpen] = useMotionOpenState(props);
|
|
19
22
|
let t1;
|
|
20
|
-
if ($[2] !== props) {
|
|
23
|
+
if ($[2] !== motionOpen || $[3] !== props || $[4] !== setMotionOpen) {
|
|
21
24
|
t1 = /* @__PURE__ */ _jsx(DialogPrimitive.Root, {
|
|
22
25
|
"data-slot": "dialog",
|
|
23
|
-
...props
|
|
26
|
+
...props,
|
|
27
|
+
open: motionOpen,
|
|
28
|
+
onOpenChange: setMotionOpen
|
|
24
29
|
});
|
|
25
|
-
$[2] =
|
|
26
|
-
$[3] =
|
|
30
|
+
$[2] = motionOpen;
|
|
31
|
+
$[3] = props;
|
|
32
|
+
$[4] = setMotionOpen;
|
|
33
|
+
$[5] = t1;
|
|
27
34
|
} else {
|
|
28
|
-
t1 = $[
|
|
35
|
+
t1 = $[5];
|
|
29
36
|
}
|
|
30
|
-
|
|
37
|
+
let t2;
|
|
38
|
+
if ($[6] !== motionOpen || $[7] !== t1) {
|
|
39
|
+
t2 = /* @__PURE__ */ _jsx(MotionOpenProvider, {
|
|
40
|
+
scope: "dialog",
|
|
41
|
+
open: motionOpen,
|
|
42
|
+
children: t1
|
|
43
|
+
});
|
|
44
|
+
$[6] = motionOpen;
|
|
45
|
+
$[7] = t1;
|
|
46
|
+
$[8] = t2;
|
|
47
|
+
} else {
|
|
48
|
+
t2 = $[8];
|
|
49
|
+
}
|
|
50
|
+
return t2;
|
|
31
51
|
}
|
|
32
52
|
function DialogTrigger(t0) {
|
|
33
53
|
const $ = _c(4);
|
|
@@ -113,7 +133,7 @@ function DialogOverlay(t0) {
|
|
|
113
133
|
}
|
|
114
134
|
let t1;
|
|
115
135
|
if ($[3] !== className) {
|
|
116
|
-
t1 = cn("fixed inset-0 isolate z-50 bg-black/30
|
|
136
|
+
t1 = cn("fixed inset-0 isolate z-50 bg-black/30 supports-backdrop-filter:backdrop-blur-md ", className);
|
|
117
137
|
$[3] = className;
|
|
118
138
|
$[4] = t1;
|
|
119
139
|
} else {
|
|
@@ -140,7 +160,7 @@ function DialogOverlay(t0) {
|
|
|
140
160
|
* @returns The styled primitive with its original interaction contract.
|
|
141
161
|
*/
|
|
142
162
|
function DialogContent(t0) {
|
|
143
|
-
const $ = _c(
|
|
163
|
+
const $ = _c(18);
|
|
144
164
|
let children;
|
|
145
165
|
let className;
|
|
146
166
|
let props;
|
|
@@ -159,24 +179,28 @@ function DialogContent(t0) {
|
|
|
159
179
|
t1 = $[4];
|
|
160
180
|
}
|
|
161
181
|
const showCloseButton = t1 === undefined ? true : t1;
|
|
162
|
-
|
|
182
|
+
const t2 = props.forceMount;
|
|
183
|
+
let t3;
|
|
163
184
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
164
|
-
|
|
165
|
-
|
|
185
|
+
t3 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
186
|
+
kind: "overlay",
|
|
187
|
+
children: /* @__PURE__ */ _jsx(DialogOverlay, { forceMount: true })
|
|
188
|
+
});
|
|
189
|
+
$[5] = t3;
|
|
166
190
|
} else {
|
|
167
|
-
|
|
191
|
+
t3 = $[5];
|
|
168
192
|
}
|
|
169
|
-
let
|
|
193
|
+
let t4;
|
|
170
194
|
if ($[6] !== className) {
|
|
171
|
-
|
|
195
|
+
t4 = cn("fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] max-h-[calc(100svh-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 overflow-y-auto rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 outline-none sm:max-w-sm ", className);
|
|
172
196
|
$[6] = className;
|
|
173
|
-
$[7] =
|
|
197
|
+
$[7] = t4;
|
|
174
198
|
} else {
|
|
175
|
-
|
|
199
|
+
t4 = $[7];
|
|
176
200
|
}
|
|
177
|
-
let
|
|
201
|
+
let t5;
|
|
178
202
|
if ($[8] !== showCloseButton) {
|
|
179
|
-
|
|
203
|
+
t5 = showCloseButton && /* @__PURE__ */ _jsx(DialogPrimitive.Close, {
|
|
180
204
|
"data-slot": "dialog-close",
|
|
181
205
|
asChild: true,
|
|
182
206
|
children: /* @__PURE__ */ _jsxs(Button, {
|
|
@@ -190,27 +214,47 @@ function DialogContent(t0) {
|
|
|
190
214
|
})
|
|
191
215
|
});
|
|
192
216
|
$[8] = showCloseButton;
|
|
193
|
-
$[9] =
|
|
217
|
+
$[9] = t5;
|
|
194
218
|
} else {
|
|
195
|
-
|
|
219
|
+
t5 = $[9];
|
|
196
220
|
}
|
|
197
|
-
let
|
|
198
|
-
if ($[10] !== children || $[11] !== props || $[12] !==
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
221
|
+
let t6;
|
|
222
|
+
if ($[10] !== children || $[11] !== props || $[12] !== t4 || $[13] !== t5) {
|
|
223
|
+
t6 = /* @__PURE__ */ _jsxs(React.Fragment, { children: [t3, /* @__PURE__ */ _jsx(MotionSlot, {
|
|
224
|
+
kind: "dialog",
|
|
225
|
+
children: /* @__PURE__ */ _jsxs(DialogPrimitive.Content, {
|
|
226
|
+
forceMount: true,
|
|
227
|
+
"data-slot": "dialog-content",
|
|
228
|
+
className: t4,
|
|
229
|
+
...props,
|
|
230
|
+
children: [children, t5]
|
|
231
|
+
})
|
|
204
232
|
})] });
|
|
205
233
|
$[10] = children;
|
|
206
234
|
$[11] = props;
|
|
207
|
-
$[12] =
|
|
208
|
-
$[13] =
|
|
209
|
-
$[14] =
|
|
235
|
+
$[12] = t4;
|
|
236
|
+
$[13] = t5;
|
|
237
|
+
$[14] = t6;
|
|
238
|
+
} else {
|
|
239
|
+
t6 = $[14];
|
|
240
|
+
}
|
|
241
|
+
let t7;
|
|
242
|
+
if ($[15] !== props.forceMount || $[16] !== t6) {
|
|
243
|
+
t7 = /* @__PURE__ */ _jsx(DialogPortal, {
|
|
244
|
+
forceMount: true,
|
|
245
|
+
children: /* @__PURE__ */ _jsx(MotionPresence, {
|
|
246
|
+
scope: "dialog",
|
|
247
|
+
forceMount: t2,
|
|
248
|
+
children: t6
|
|
249
|
+
})
|
|
250
|
+
});
|
|
251
|
+
$[15] = props.forceMount;
|
|
252
|
+
$[16] = t6;
|
|
253
|
+
$[17] = t7;
|
|
210
254
|
} else {
|
|
211
|
-
|
|
255
|
+
t7 = $[17];
|
|
212
256
|
}
|
|
213
|
-
return
|
|
257
|
+
return t7;
|
|
214
258
|
}
|
|
215
259
|
function DialogHeader(t0) {
|
|
216
260
|
const $ = _c(8);
|