beez-ui 0.5.2 → 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 +8 -0
- package/README.md +66 -3
- 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/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js +1 -1
- 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 +13 -5
|
@@ -2,10 +2,12 @@
|
|
|
2
2
|
import { c as _c } from "react/compiler-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Popover as PopoverPrimitive } 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 { jsx as _jsx } from "react/jsx-runtime";
|
|
7
9
|
function Popover(t0) {
|
|
8
|
-
const $ = _c(
|
|
10
|
+
const $ = _c(9);
|
|
9
11
|
let props;
|
|
10
12
|
if ($[0] !== t0) {
|
|
11
13
|
({...props} = t0);
|
|
@@ -14,18 +16,36 @@ function Popover(t0) {
|
|
|
14
16
|
} else {
|
|
15
17
|
props = $[1];
|
|
16
18
|
}
|
|
19
|
+
const [motionOpen, setMotionOpen] = useMotionOpenState(props);
|
|
17
20
|
let t1;
|
|
18
|
-
if ($[2] !== props) {
|
|
21
|
+
if ($[2] !== motionOpen || $[3] !== props || $[4] !== setMotionOpen) {
|
|
19
22
|
t1 = /* @__PURE__ */ _jsx(PopoverPrimitive.Root, {
|
|
20
23
|
"data-slot": "popover",
|
|
21
|
-
...props
|
|
24
|
+
...props,
|
|
25
|
+
open: motionOpen,
|
|
26
|
+
onOpenChange: setMotionOpen
|
|
22
27
|
});
|
|
23
|
-
$[2] =
|
|
24
|
-
$[3] =
|
|
28
|
+
$[2] = motionOpen;
|
|
29
|
+
$[3] = props;
|
|
30
|
+
$[4] = setMotionOpen;
|
|
31
|
+
$[5] = t1;
|
|
25
32
|
} else {
|
|
26
|
-
t1 = $[
|
|
33
|
+
t1 = $[5];
|
|
27
34
|
}
|
|
28
|
-
|
|
35
|
+
let t2;
|
|
36
|
+
if ($[6] !== motionOpen || $[7] !== t1) {
|
|
37
|
+
t2 = /* @__PURE__ */ _jsx(MotionOpenProvider, {
|
|
38
|
+
scope: "popover",
|
|
39
|
+
open: motionOpen,
|
|
40
|
+
children: t1
|
|
41
|
+
});
|
|
42
|
+
$[6] = motionOpen;
|
|
43
|
+
$[7] = t1;
|
|
44
|
+
$[8] = t2;
|
|
45
|
+
} else {
|
|
46
|
+
t2 = $[8];
|
|
47
|
+
}
|
|
48
|
+
return t2;
|
|
29
49
|
}
|
|
30
50
|
function PopoverTrigger(t0) {
|
|
31
51
|
const $ = _c(4);
|
|
@@ -56,7 +76,7 @@ function PopoverTrigger(t0) {
|
|
|
56
76
|
* @returns The styled primitive with its original interaction contract.
|
|
57
77
|
*/
|
|
58
78
|
function PopoverContent(t0) {
|
|
59
|
-
const $ = _c(
|
|
79
|
+
const $ = _c(15);
|
|
60
80
|
let className;
|
|
61
81
|
let props;
|
|
62
82
|
let t1;
|
|
@@ -76,32 +96,53 @@ function PopoverContent(t0) {
|
|
|
76
96
|
}
|
|
77
97
|
const align = t1 === undefined ? "center" : t1;
|
|
78
98
|
const sideOffset = t2 === undefined ? 4 : t2;
|
|
79
|
-
|
|
99
|
+
const t3 = props.forceMount;
|
|
100
|
+
let t4;
|
|
80
101
|
if ($[5] !== className) {
|
|
81
|
-
|
|
102
|
+
t4 = cn("z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden ", className);
|
|
82
103
|
$[5] = className;
|
|
83
|
-
$[6] =
|
|
104
|
+
$[6] = t4;
|
|
84
105
|
} else {
|
|
85
|
-
|
|
106
|
+
t4 = $[6];
|
|
86
107
|
}
|
|
87
|
-
let
|
|
88
|
-
if ($[7] !== align || $[8] !== props || $[9] !== sideOffset || $[10] !==
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
108
|
+
let t5;
|
|
109
|
+
if ($[7] !== align || $[8] !== props || $[9] !== sideOffset || $[10] !== t4) {
|
|
110
|
+
t5 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
111
|
+
kind: "surface",
|
|
112
|
+
children: /* @__PURE__ */ _jsx(PopoverPrimitive.Content, {
|
|
113
|
+
forceMount: true,
|
|
114
|
+
"data-slot": "popover-content",
|
|
115
|
+
align,
|
|
116
|
+
sideOffset,
|
|
117
|
+
className: t4,
|
|
118
|
+
...props
|
|
119
|
+
})
|
|
120
|
+
});
|
|
96
121
|
$[7] = align;
|
|
97
122
|
$[8] = props;
|
|
98
123
|
$[9] = sideOffset;
|
|
99
|
-
$[10] =
|
|
100
|
-
$[11] =
|
|
124
|
+
$[10] = t4;
|
|
125
|
+
$[11] = t5;
|
|
126
|
+
} else {
|
|
127
|
+
t5 = $[11];
|
|
128
|
+
}
|
|
129
|
+
let t6;
|
|
130
|
+
if ($[12] !== props.forceMount || $[13] !== t5) {
|
|
131
|
+
t6 = /* @__PURE__ */ _jsx(PopoverPrimitive.Portal, {
|
|
132
|
+
forceMount: true,
|
|
133
|
+
children: /* @__PURE__ */ _jsx(MotionPresence, {
|
|
134
|
+
scope: "popover",
|
|
135
|
+
forceMount: t3,
|
|
136
|
+
children: t5
|
|
137
|
+
})
|
|
138
|
+
});
|
|
139
|
+
$[12] = props.forceMount;
|
|
140
|
+
$[13] = t5;
|
|
141
|
+
$[14] = t6;
|
|
101
142
|
} else {
|
|
102
|
-
|
|
143
|
+
t6 = $[14];
|
|
103
144
|
}
|
|
104
|
-
return
|
|
145
|
+
return t6;
|
|
105
146
|
}
|
|
106
147
|
function PopoverAnchor(t0) {
|
|
107
148
|
const $ = _c(4);
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { c as _c } from "react/compiler-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { RadioGroup as RadioGroupPrimitive } from "radix-ui";
|
|
5
|
+
import { MotionSlot } from "../motion/motion-slot.js";
|
|
5
6
|
import { cn } from "../lib/utils.js";
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
function RadioGroup(t0) {
|
|
@@ -63,10 +64,13 @@ function RadioGroupItem(t0) {
|
|
|
63
64
|
}
|
|
64
65
|
let t2;
|
|
65
66
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
66
|
-
t2 = /* @__PURE__ */ _jsx(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
67
|
+
t2 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
68
|
+
kind: "selection",
|
|
69
|
+
children: /* @__PURE__ */ _jsx(RadioGroupPrimitive.Indicator, {
|
|
70
|
+
"data-slot": "radio-group-indicator",
|
|
71
|
+
className: "flex size-4 items-center justify-center",
|
|
72
|
+
children: /* @__PURE__ */ _jsx("span", { className: "absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary-foreground" })
|
|
73
|
+
})
|
|
70
74
|
});
|
|
71
75
|
$[5] = t2;
|
|
72
76
|
} else {
|
|
@@ -74,11 +78,14 @@ function RadioGroupItem(t0) {
|
|
|
74
78
|
}
|
|
75
79
|
let t3;
|
|
76
80
|
if ($[6] !== props || $[7] !== t1) {
|
|
77
|
-
t3 = /* @__PURE__ */ _jsx(
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
81
|
+
t3 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
82
|
+
kind: "field",
|
|
83
|
+
children: /* @__PURE__ */ _jsx(RadioGroupPrimitive.Item, {
|
|
84
|
+
"data-slot": "radio-group-item",
|
|
85
|
+
className: t1,
|
|
86
|
+
...props,
|
|
87
|
+
children: t2
|
|
88
|
+
})
|
|
82
89
|
});
|
|
83
90
|
$[6] = props;
|
|
84
91
|
$[7] = t1;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { c as _c } from "react/compiler-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Select as SelectPrimitive } from "radix-ui";
|
|
5
|
+
import { MotionSlot } from "../motion/motion-slot.js";
|
|
5
6
|
import { cn } from "../lib/utils.js";
|
|
6
7
|
import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
|
|
7
8
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -132,12 +133,15 @@ function SelectTrigger(t0) {
|
|
|
132
133
|
}
|
|
133
134
|
let t4;
|
|
134
135
|
if ($[8] !== children || $[9] !== props || $[10] !== size || $[11] !== t2) {
|
|
135
|
-
t4 = /* @__PURE__ */
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
136
|
+
t4 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
137
|
+
kind: "field",
|
|
138
|
+
children: /* @__PURE__ */ _jsxs(SelectPrimitive.Trigger, {
|
|
139
|
+
"data-slot": "select-trigger",
|
|
140
|
+
"data-size": size,
|
|
141
|
+
className: t2,
|
|
142
|
+
...props,
|
|
143
|
+
children: [children, t3]
|
|
144
|
+
})
|
|
141
145
|
});
|
|
142
146
|
$[8] = children;
|
|
143
147
|
$[9] = props;
|
|
@@ -182,7 +186,7 @@ function SelectContent(t0) {
|
|
|
182
186
|
const t4 = position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";
|
|
183
187
|
let t5;
|
|
184
188
|
if ($[6] !== className || $[7] !== t4) {
|
|
185
|
-
t5 = cn("z-50 max-h-(--radix-select-content-available-height) min-w-48 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg text-popover-foreground shadow-md ring-1 ring-foreground/10
|
|
189
|
+
t5 = cn("z-50 max-h-(--radix-select-content-available-height) min-w-48 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg text-popover-foreground shadow-md ring-1 ring-foreground/10 relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!", t4, className);
|
|
186
190
|
$[6] = className;
|
|
187
191
|
$[7] = t4;
|
|
188
192
|
$[8] = t5;
|
|
@@ -228,18 +232,21 @@ function SelectContent(t0) {
|
|
|
228
232
|
}
|
|
229
233
|
let t11;
|
|
230
234
|
if ($[17] !== align || $[18] !== position || $[19] !== props || $[20] !== t3 || $[21] !== t5 || $[22] !== t9) {
|
|
231
|
-
t11 = /* @__PURE__ */ _jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
235
|
+
t11 = /* @__PURE__ */ _jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ _jsx(MotionSlot, {
|
|
236
|
+
kind: "surface",
|
|
237
|
+
children: /* @__PURE__ */ _jsxs(SelectPrimitive.Content, {
|
|
238
|
+
"data-slot": "select-content",
|
|
239
|
+
"data-align-trigger": t3,
|
|
240
|
+
className: t5,
|
|
241
|
+
position,
|
|
242
|
+
align,
|
|
243
|
+
...props,
|
|
244
|
+
children: [
|
|
245
|
+
t6,
|
|
246
|
+
t9,
|
|
247
|
+
t10
|
|
248
|
+
]
|
|
249
|
+
})
|
|
243
250
|
}) });
|
|
244
251
|
$[17] = align;
|
|
245
252
|
$[18] = position;
|
|
@@ -343,11 +350,14 @@ function SelectItem(t0) {
|
|
|
343
350
|
}
|
|
344
351
|
let t4;
|
|
345
352
|
if ($[9] !== props || $[10] !== t1 || $[11] !== t3) {
|
|
346
|
-
t4 = /* @__PURE__ */
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
353
|
+
t4 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
354
|
+
kind: "field",
|
|
355
|
+
children: /* @__PURE__ */ _jsxs(SelectPrimitive.Item, {
|
|
356
|
+
"data-slot": "select-item",
|
|
357
|
+
className: t1,
|
|
358
|
+
...props,
|
|
359
|
+
children: [t2, t3]
|
|
360
|
+
})
|
|
351
361
|
});
|
|
352
362
|
$[9] = props;
|
|
353
363
|
$[10] = t1;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { c as _c } from "react/compiler-runtime";
|
|
3
3
|
import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
|
|
4
|
+
import { MotionSlot } from "../motion/motion-slot.js";
|
|
4
5
|
import { cn } from "../lib/utils.js";
|
|
5
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
7
|
function Separator(t0) {
|
|
@@ -30,11 +31,14 @@ function Separator(t0) {
|
|
|
30
31
|
}
|
|
31
32
|
let t3;
|
|
32
33
|
if ($[6] !== orientation || $[7] !== props || $[8] !== t2) {
|
|
33
|
-
t3 = /* @__PURE__ */ _jsx(
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
t3 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
35
|
+
kind: "fade",
|
|
36
|
+
children: /* @__PURE__ */ _jsx(SeparatorPrimitive, {
|
|
37
|
+
"data-slot": "separator",
|
|
38
|
+
orientation,
|
|
39
|
+
className: t2,
|
|
40
|
+
...props
|
|
41
|
+
})
|
|
38
42
|
});
|
|
39
43
|
$[6] = orientation;
|
|
40
44
|
$[7] = props;
|
package/dist/components/sheet.js
CHANGED
|
@@ -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 SheetPrimitive } 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 Sheet(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 Sheet(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(SheetPrimitive.Root, {
|
|
22
25
|
"data-slot": "sheet",
|
|
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: "sheet",
|
|
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 SheetTrigger(t0) {
|
|
33
53
|
const $ = _c(4);
|
|
@@ -113,7 +133,7 @@ function SheetOverlay(t0) {
|
|
|
113
133
|
}
|
|
114
134
|
let t1;
|
|
115
135
|
if ($[3] !== className) {
|
|
116
|
-
t1 = cn("fixed inset-0 z-50 bg-black/30
|
|
136
|
+
t1 = cn("fixed inset-0 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 SheetOverlay(t0) {
|
|
|
140
160
|
* @returns The styled primitive with its original interaction contract.
|
|
141
161
|
*/
|
|
142
162
|
function SheetContent(t0) {
|
|
143
|
-
const $ = _c(
|
|
163
|
+
const $ = _c(20);
|
|
144
164
|
let children;
|
|
145
165
|
let className;
|
|
146
166
|
let props;
|
|
@@ -163,24 +183,28 @@ function SheetContent(t0) {
|
|
|
163
183
|
}
|
|
164
184
|
const side = t1 === undefined ? "right" : t1;
|
|
165
185
|
const showCloseButton = t2 === undefined ? true : t2;
|
|
166
|
-
|
|
186
|
+
const t3 = props.forceMount;
|
|
187
|
+
let t4;
|
|
167
188
|
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
168
|
-
|
|
169
|
-
|
|
189
|
+
t4 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
190
|
+
kind: "overlay",
|
|
191
|
+
children: /* @__PURE__ */ _jsx(SheetOverlay, { forceMount: true })
|
|
192
|
+
});
|
|
193
|
+
$[6] = t4;
|
|
170
194
|
} else {
|
|
171
|
-
|
|
195
|
+
t4 = $[6];
|
|
172
196
|
}
|
|
173
|
-
let
|
|
197
|
+
let t5;
|
|
174
198
|
if ($[7] !== className) {
|
|
175
|
-
|
|
199
|
+
t5 = cn("fixed z-50 flex flex-col gap-4 overflow-y-auto overscroll-contain data-[side=bottom]:max-h-dvh data-[side=top]:max-h-dvh bg-background bg-clip-padding text-sm shadow-lg transition ease-in-out data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=left]:inset-y-0 data-[side=left]:left-0 data-[side=left]:h-full data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=right]:inset-y-0 data-[side=right]:right-0 data-[side=right]:h-full data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=top]:inset-x-0 data-[side=top]:top-0 data-[side=top]:h-auto data-[side=top]:border-b data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm ", className);
|
|
176
200
|
$[7] = className;
|
|
177
|
-
$[8] =
|
|
201
|
+
$[8] = t5;
|
|
178
202
|
} else {
|
|
179
|
-
|
|
203
|
+
t5 = $[8];
|
|
180
204
|
}
|
|
181
|
-
let
|
|
205
|
+
let t6;
|
|
182
206
|
if ($[9] !== showCloseButton) {
|
|
183
|
-
|
|
207
|
+
t6 = showCloseButton && /* @__PURE__ */ _jsx(SheetPrimitive.Close, {
|
|
184
208
|
"data-slot": "sheet-close",
|
|
185
209
|
asChild: true,
|
|
186
210
|
children: /* @__PURE__ */ _jsxs(Button, {
|
|
@@ -194,29 +218,49 @@ function SheetContent(t0) {
|
|
|
194
218
|
})
|
|
195
219
|
});
|
|
196
220
|
$[9] = showCloseButton;
|
|
197
|
-
$[10] =
|
|
221
|
+
$[10] = t6;
|
|
198
222
|
} else {
|
|
199
|
-
|
|
223
|
+
t6 = $[10];
|
|
200
224
|
}
|
|
201
|
-
let
|
|
202
|
-
if ($[11] !== children || $[12] !== props || $[13] !== side || $[14] !==
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
225
|
+
let t7;
|
|
226
|
+
if ($[11] !== children || $[12] !== props || $[13] !== side || $[14] !== t5 || $[15] !== t6) {
|
|
227
|
+
t7 = /* @__PURE__ */ _jsxs(React.Fragment, { children: [t4, /* @__PURE__ */ _jsx(MotionSlot, {
|
|
228
|
+
kind: "sheet",
|
|
229
|
+
children: /* @__PURE__ */ _jsxs(SheetPrimitive.Content, {
|
|
230
|
+
forceMount: true,
|
|
231
|
+
"data-slot": "sheet-content",
|
|
232
|
+
"data-side": side,
|
|
233
|
+
className: t5,
|
|
234
|
+
...props,
|
|
235
|
+
children: [children, t6]
|
|
236
|
+
})
|
|
209
237
|
})] });
|
|
210
238
|
$[11] = children;
|
|
211
239
|
$[12] = props;
|
|
212
240
|
$[13] = side;
|
|
213
|
-
$[14] =
|
|
214
|
-
$[15] =
|
|
215
|
-
$[16] =
|
|
241
|
+
$[14] = t5;
|
|
242
|
+
$[15] = t6;
|
|
243
|
+
$[16] = t7;
|
|
244
|
+
} else {
|
|
245
|
+
t7 = $[16];
|
|
246
|
+
}
|
|
247
|
+
let t8;
|
|
248
|
+
if ($[17] !== props.forceMount || $[18] !== t7) {
|
|
249
|
+
t8 = /* @__PURE__ */ _jsx(SheetPortal, {
|
|
250
|
+
forceMount: true,
|
|
251
|
+
children: /* @__PURE__ */ _jsx(MotionPresence, {
|
|
252
|
+
scope: "sheet",
|
|
253
|
+
forceMount: t3,
|
|
254
|
+
children: t7
|
|
255
|
+
})
|
|
256
|
+
});
|
|
257
|
+
$[17] = props.forceMount;
|
|
258
|
+
$[18] = t7;
|
|
259
|
+
$[19] = t8;
|
|
216
260
|
} else {
|
|
217
|
-
|
|
261
|
+
t8 = $[19];
|
|
218
262
|
}
|
|
219
|
-
return
|
|
263
|
+
return t8;
|
|
220
264
|
}
|
|
221
265
|
function SheetHeader(t0) {
|
|
222
266
|
const $ = _c(8);
|
|
@@ -5,6 +5,7 @@ import { cva } from "class-variance-authority";
|
|
|
5
5
|
import { Slot } from "radix-ui";
|
|
6
6
|
import { useIsMobile } from "../hooks/use-mobile.js";
|
|
7
7
|
import { useSidebarPersistence, saveSidebarPreference } from "../hooks/use-sidebar-persistence.js";
|
|
8
|
+
import { MotionSlot } from "../motion/motion-slot.js";
|
|
8
9
|
import { cn } from "../lib/utils.js";
|
|
9
10
|
import { SIDEBAR_COOKIE_MAX_AGE, SIDEBAR_COOKIE_NAME } from "../constants/sidebar.js";
|
|
10
11
|
import { Button } from "./button.js";
|
|
@@ -1054,13 +1055,16 @@ function SidebarMenuButton(t0) {
|
|
|
1054
1055
|
}
|
|
1055
1056
|
let t6;
|
|
1056
1057
|
if ($[12] !== Comp || $[13] !== isActive || $[14] !== props || $[15] !== size || $[16] !== t5) {
|
|
1057
|
-
t6 = /* @__PURE__ */ _jsx(
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1058
|
+
t6 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
1059
|
+
kind: "press",
|
|
1060
|
+
children: /* @__PURE__ */ _jsx(Comp, {
|
|
1061
|
+
"data-slot": "sidebar-menu-button",
|
|
1062
|
+
"data-sidebar": "menu-button",
|
|
1063
|
+
"data-size": size,
|
|
1064
|
+
"data-active": isActive,
|
|
1065
|
+
className: t5,
|
|
1066
|
+
...props
|
|
1067
|
+
})
|
|
1064
1068
|
});
|
|
1065
1069
|
$[12] = Comp;
|
|
1066
1070
|
$[13] = isActive;
|
|
@@ -1391,13 +1395,16 @@ function SidebarMenuSubButton(t0) {
|
|
|
1391
1395
|
}
|
|
1392
1396
|
let t5;
|
|
1393
1397
|
if ($[8] !== Comp || $[9] !== isActive || $[10] !== props || $[11] !== size || $[12] !== t4) {
|
|
1394
|
-
t5 = /* @__PURE__ */ _jsx(
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1398
|
+
t5 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
1399
|
+
kind: "press",
|
|
1400
|
+
children: /* @__PURE__ */ _jsx(Comp, {
|
|
1401
|
+
"data-slot": "sidebar-menu-sub-button",
|
|
1402
|
+
"data-sidebar": "menu-sub-button",
|
|
1403
|
+
"data-size": size,
|
|
1404
|
+
"data-active": isActive,
|
|
1405
|
+
className: t4,
|
|
1406
|
+
...props
|
|
1407
|
+
})
|
|
1401
1408
|
});
|
|
1402
1409
|
$[8] = Comp;
|
|
1403
1410
|
$[9] = isActive;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import { MotionSlot } from "../motion/motion-slot.js";
|
|
1
2
|
import { cn } from "../lib/utils.js";
|
|
2
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
4
|
function Skeleton({ className, ...props }) {
|
|
4
|
-
return /* @__PURE__ */ _jsx(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
return /* @__PURE__ */ _jsx(MotionSlot, {
|
|
6
|
+
kind: "skeleton",
|
|
7
|
+
children: /* @__PURE__ */ _jsx("div", {
|
|
8
|
+
"data-slot": "skeleton",
|
|
9
|
+
className: cn("rounded-md bg-muted", className),
|
|
10
|
+
...props
|
|
11
|
+
})
|
|
8
12
|
});
|
|
9
13
|
}
|
|
10
14
|
export { Skeleton };
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
+
import { MotionSlot } from "../../motion/motion-slot.js";
|
|
1
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
const WhatsappIcon = (props) => /* @__PURE__ */ _jsx(
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
fill: "
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
const WhatsappIcon = (props) => /* @__PURE__ */ _jsx(MotionSlot, {
|
|
4
|
+
kind: "icon",
|
|
5
|
+
children: /* @__PURE__ */ _jsx("svg", {
|
|
6
|
+
"data-slot": "whatsapp-icon",
|
|
7
|
+
...props,
|
|
8
|
+
fill: "none",
|
|
9
|
+
viewBox: "0 0 360 362",
|
|
10
|
+
children: /* @__PURE__ */ _jsx("path", {
|
|
11
|
+
fill: "#25D366",
|
|
12
|
+
fillRule: "evenodd",
|
|
13
|
+
d: "M307.546 52.566C273.709 18.684 228.706.017 180.756 0 81.951 0 1.538 80.404 1.504 179.235c-.017 31.594 8.242 62.432 23.928 89.609L0 361.736l95.024-24.925c26.179 14.285 55.659 21.805 85.655 21.814h.077c98.788 0 179.21-80.413 179.244-179.244.017-47.898-18.608-92.926-52.454-126.807v-.008Zm-126.79 275.788h-.06c-26.73-.008-52.952-7.194-75.831-20.765l-5.44-3.231-56.391 14.791 15.05-54.981-3.542-5.638c-14.912-23.721-22.793-51.139-22.776-79.286.035-82.14 66.867-148.973 149.051-148.973 39.793.017 77.198 15.53 105.328 43.695 28.131 28.157 43.61 65.596 43.593 105.398-.035 82.149-66.867 148.982-148.982 148.982v.008Zm81.719-111.577c-4.478-2.243-26.497-13.073-30.606-14.568-4.108-1.496-7.09-2.243-10.073 2.243-2.982 4.487-11.568 14.577-14.181 17.559-2.613 2.991-5.226 3.361-9.704 1.117-4.477-2.243-18.908-6.97-36.02-22.226-13.313-11.878-22.304-26.54-24.916-31.027-2.613-4.486-.275-6.91 1.959-9.136 2.011-2.011 4.478-5.234 6.721-7.847 2.244-2.613 2.983-4.486 4.478-7.469 1.496-2.991.748-5.603-.369-7.847-1.118-2.243-10.073-24.289-13.812-33.253-3.636-8.732-7.331-7.546-10.073-7.692-2.613-.13-5.595-.155-8.586-.155-2.991 0-7.839 1.118-11.947 5.604-4.108 4.486-15.677 15.324-15.677 37.361s16.047 43.344 18.29 46.335c2.243 2.991 31.585 48.225 76.51 67.632 10.684 4.615 19.029 7.374 25.535 9.437 10.727 3.412 20.49 2.931 28.208 1.779 8.604-1.289 26.498-10.838 30.228-21.298 3.73-10.46 3.73-19.433 2.613-21.298-1.117-1.865-4.108-2.991-8.586-5.234l.008-.017Z",
|
|
14
|
+
clipRule: "evenodd"
|
|
15
|
+
})
|
|
11
16
|
})
|
|
12
17
|
});
|
|
13
18
|
export { WhatsappIcon };
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { c as _c } from "react/compiler-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Switch as SwitchPrimitive } from "radix-ui";
|
|
5
|
+
import { MotionSlot } from "../motion/motion-slot.js";
|
|
5
6
|
import { cn } from "../lib/utils.js";
|
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
8
|
function Switch(t0) {
|
|
@@ -31,9 +32,12 @@ function Switch(t0) {
|
|
|
31
32
|
}
|
|
32
33
|
let t3;
|
|
33
34
|
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
34
|
-
t3 = /* @__PURE__ */ _jsx(
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
t3 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
36
|
+
kind: "thumb",
|
|
37
|
+
children: /* @__PURE__ */ _jsx(SwitchPrimitive.Thumb, {
|
|
38
|
+
"data-slot": "switch-thumb",
|
|
39
|
+
className: "pointer-events-none block rounded-full bg-background ring-0 group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"
|
|
40
|
+
})
|
|
37
41
|
});
|
|
38
42
|
$[6] = t3;
|
|
39
43
|
} else {
|
|
@@ -41,12 +45,15 @@ function Switch(t0) {
|
|
|
41
45
|
}
|
|
42
46
|
let t4;
|
|
43
47
|
if ($[7] !== props || $[8] !== size || $[9] !== t2) {
|
|
44
|
-
t4 = /* @__PURE__ */ _jsx(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
t4 = /* @__PURE__ */ _jsx(MotionSlot, {
|
|
49
|
+
kind: "field",
|
|
50
|
+
children: /* @__PURE__ */ _jsx(SwitchPrimitive.Root, {
|
|
51
|
+
"data-slot": "switch",
|
|
52
|
+
"data-size": size,
|
|
53
|
+
className: t2,
|
|
54
|
+
...props,
|
|
55
|
+
children: t3
|
|
56
|
+
})
|
|
50
57
|
});
|
|
51
58
|
$[7] = props;
|
|
52
59
|
$[8] = size;
|