beez-ui 0.5.3 → 0.5.5

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.
Files changed (50) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +66 -3
  3. package/dist/components/alert-dialog.js +72 -28
  4. package/dist/components/alert.js +9 -5
  5. package/dist/components/animated-theme-toggler.js +113 -97
  6. package/dist/components/avatar.js +22 -15
  7. package/dist/components/badge.js +9 -5
  8. package/dist/components/button.js +11 -7
  9. package/dist/components/card.js +9 -5
  10. package/dist/components/carousel.js +59 -55
  11. package/dist/components/checkbox.js +16 -9
  12. package/dist/components/dialog.js +77 -33
  13. package/dist/components/dropdown-menu.js +126 -49
  14. package/dist/components/filter-query-bar.js +61 -48
  15. package/dist/components/form.js +16 -9
  16. package/dist/components/highlighter.js +18 -12
  17. package/dist/components/hover-card.js +60 -21
  18. package/dist/components/input-group.js +9 -5
  19. package/dist/components/input.js +9 -5
  20. package/dist/components/label.js +8 -4
  21. package/dist/components/link.d.ts +0 -1
  22. package/dist/components/link.js +28 -20
  23. package/dist/components/popover.js +66 -25
  24. package/dist/components/radio-group.js +16 -9
  25. package/dist/components/select.js +34 -24
  26. package/dist/components/separator.js +9 -5
  27. package/dist/components/sheet.js +78 -34
  28. package/dist/components/sidebar.js +21 -14
  29. package/dist/components/skeleton.js +8 -4
  30. package/dist/components/svgs/whatsappIcon.js +14 -9
  31. package/dist/components/switch.js +16 -9
  32. package/dist/components/table.js +8 -4
  33. package/dist/components/tabs.js +15 -8
  34. package/dist/components/textarea.js +8 -4
  35. package/dist/components/themed-toaster.js +61 -27
  36. package/dist/components/tooltip.js +70 -29
  37. package/dist/components/typing-animation.js +80 -58
  38. package/dist/constants/motion.d.ts +2 -0
  39. package/dist/constants/motion.js +2 -0
  40. package/dist/hooks/use-prefers-reduced-motion.d.ts +2 -0
  41. package/dist/hooks/use-prefers-reduced-motion.js +27 -0
  42. package/dist/motion/motion-slot.d.ts +9 -0
  43. package/dist/motion/motion-slot.js +353 -0
  44. package/dist/motion/presence.d.ts +33 -0
  45. package/dist/motion/presence.js +92 -0
  46. package/dist/motion/tokens.d.ts +13 -0
  47. package/dist/motion/tokens.js +17 -0
  48. package/dist/providers/beez-ui-provider.js +7 -3
  49. package/dist/styles.css +1 -1
  50. package/package.json +12 -4
@@ -2,10 +2,12 @@
2
2
  import { c as _c } from "react/compiler-runtime";
3
3
  import * as React from "react";
4
4
  import { HoverCard as HoverCardPrimitive } 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 HoverCard(t0) {
8
- const $ = _c(4);
10
+ const $ = _c(9);
9
11
  let props;
10
12
  if ($[0] !== t0) {
11
13
  ({...props} = t0);
@@ -14,18 +16,36 @@ function HoverCard(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(HoverCardPrimitive.Root, {
20
23
  "data-slot": "hover-card",
21
- ...props
24
+ ...props,
25
+ open: motionOpen,
26
+ onOpenChange: setMotionOpen
22
27
  });
23
- $[2] = props;
24
- $[3] = t1;
28
+ $[2] = motionOpen;
29
+ $[3] = props;
30
+ $[4] = setMotionOpen;
31
+ $[5] = t1;
25
32
  } else {
26
- t1 = $[3];
33
+ t1 = $[5];
27
34
  }
28
- return t1;
35
+ let t2;
36
+ if ($[6] !== motionOpen || $[7] !== t1) {
37
+ t2 = /* @__PURE__ */ _jsx(MotionOpenProvider, {
38
+ scope: "hover-card",
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 HoverCardTrigger(t0) {
31
51
  const $ = _c(4);
@@ -51,7 +71,7 @@ function HoverCardTrigger(t0) {
51
71
  return t1;
52
72
  }
53
73
  function HoverCardContent(t0) {
54
- const $ = _c(12);
74
+ const $ = _c(15);
55
75
  let className;
56
76
  let props;
57
77
  let t1;
@@ -71,34 +91,53 @@ function HoverCardContent(t0) {
71
91
  }
72
92
  const align = t1 === undefined ? "center" : t1;
73
93
  const sideOffset = t2 === undefined ? 4 : t2;
74
- let t3;
94
+ const t3 = props.forceMount;
95
+ let t4;
75
96
  if ($[5] !== className) {
76
- t3 = cn("z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-lg bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className);
97
+ t4 = cn("z-50 w-64 origin-(--radix-hover-card-content-transform-origin) rounded-lg bg-popover p-4 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 outline-hidden ", className);
77
98
  $[5] = className;
78
- $[6] = t3;
99
+ $[6] = t4;
79
100
  } else {
80
- t3 = $[6];
101
+ t4 = $[6];
81
102
  }
82
- let t4;
83
- if ($[7] !== align || $[8] !== props || $[9] !== sideOffset || $[10] !== t3) {
84
- t4 = /* @__PURE__ */ _jsx(HoverCardPrimitive.Portal, {
85
- "data-slot": "hover-card-portal",
103
+ let t5;
104
+ if ($[7] !== align || $[8] !== props || $[9] !== sideOffset || $[10] !== t4) {
105
+ t5 = /* @__PURE__ */ _jsx(MotionSlot, {
106
+ kind: "surface",
86
107
  children: /* @__PURE__ */ _jsx(HoverCardPrimitive.Content, {
108
+ forceMount: true,
87
109
  "data-slot": "hover-card-content",
88
110
  align,
89
111
  sideOffset,
90
- className: t3,
112
+ className: t4,
91
113
  ...props
92
114
  })
93
115
  });
94
116
  $[7] = align;
95
117
  $[8] = props;
96
118
  $[9] = sideOffset;
97
- $[10] = t3;
98
- $[11] = t4;
119
+ $[10] = t4;
120
+ $[11] = t5;
121
+ } else {
122
+ t5 = $[11];
123
+ }
124
+ let t6;
125
+ if ($[12] !== props.forceMount || $[13] !== t5) {
126
+ t6 = /* @__PURE__ */ _jsx(HoverCardPrimitive.Portal, {
127
+ "data-slot": "hover-card-portal",
128
+ forceMount: true,
129
+ children: /* @__PURE__ */ _jsx(MotionPresence, {
130
+ scope: "hover-card",
131
+ forceMount: t3,
132
+ children: t5
133
+ })
134
+ });
135
+ $[12] = props.forceMount;
136
+ $[13] = t5;
137
+ $[14] = t6;
99
138
  } else {
100
- t4 = $[11];
139
+ t6 = $[14];
101
140
  }
102
- return t4;
141
+ return t6;
103
142
  }
104
143
  export { HoverCard, HoverCardTrigger, HoverCardContent };
@@ -2,6 +2,7 @@
2
2
  import { c as _c } from "react/compiler-runtime";
3
3
  import * as React from "react";
4
4
  import { cva } from "class-variance-authority";
5
+ import { MotionSlot } from "../motion/motion-slot.js";
5
6
  import { cn } from "../lib/utils.js";
6
7
  import { Button } from "./button.js";
7
8
  import { Input } from "./input.js";
@@ -30,11 +31,14 @@ function InputGroup(t0) {
30
31
  }
31
32
  let t2;
32
33
  if ($[5] !== props || $[6] !== t1) {
33
- t2 = /* @__PURE__ */ _jsx("div", {
34
- "data-slot": "input-group",
35
- role: "group",
36
- className: t1,
37
- ...props
34
+ t2 = /* @__PURE__ */ _jsx(MotionSlot, {
35
+ kind: "field",
36
+ children: /* @__PURE__ */ _jsx("div", {
37
+ "data-slot": "input-group",
38
+ role: "group",
39
+ className: t1,
40
+ ...props
41
+ })
38
42
  });
39
43
  $[5] = props;
40
44
  $[6] = t1;
@@ -1,13 +1,17 @@
1
1
  import * as React from "react";
2
2
  import { Input as InputPrimitive } from "@base-ui/react/input";
3
+ import { MotionSlot } from "../motion/motion-slot.js";
3
4
  import { cn } from "../lib/utils.js";
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
5
6
  function Input({ className, type, ...props }) {
6
- return /* @__PURE__ */ _jsx(InputPrimitive, {
7
- type,
8
- "data-slot": "input",
9
- className: cn("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
10
- ...props
7
+ return /* @__PURE__ */ _jsx(MotionSlot, {
8
+ kind: "field",
9
+ children: /* @__PURE__ */ _jsx(InputPrimitive, {
10
+ type,
11
+ "data-slot": "input",
12
+ className: cn("h-8 w-full min-w-0 rounded-lg border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40", className),
13
+ ...props
14
+ })
11
15
  });
12
16
  }
13
17
  export { Input };
@@ -2,6 +2,7 @@
2
2
  import { c as _c } from "react/compiler-runtime";
3
3
  import * as React from "react";
4
4
  import { Label as LabelPrimitive } 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 Label(t0) {
@@ -27,10 +28,13 @@ function Label(t0) {
27
28
  }
28
29
  let t2;
29
30
  if ($[5] !== props || $[6] !== t1) {
30
- t2 = /* @__PURE__ */ _jsx(LabelPrimitive.Root, {
31
- "data-slot": "label",
32
- className: t1,
33
- ...props
31
+ t2 = /* @__PURE__ */ _jsx(MotionSlot, {
32
+ kind: "field",
33
+ children: /* @__PURE__ */ _jsx(LabelPrimitive.Root, {
34
+ "data-slot": "label",
35
+ className: t1,
36
+ ...props
37
+ })
34
38
  });
35
39
  $[5] = props;
36
40
  $[6] = t1;
@@ -1,4 +1,3 @@
1
- /** Selects the configured routing adapter while keeping a native anchor fallback. */
2
1
  import type { ComponentType } from "react";
3
2
  import { type BeezLinkProps } from "../providers/beez-ui-provider.js";
4
3
  /** Shares native link props and explicit per-link navigation overrides. */
@@ -1,10 +1,12 @@
1
1
  "use client";
2
2
  import { c as _c } from "react/compiler-runtime";
3
+ /** Selects the configured routing adapter while keeping a native anchor fallback. */
4
+ import { MotionSlot } from "../motion/motion-slot.js";
3
5
  import { useBeezUIComponents } from "../providers/beez-ui-provider.js";
4
6
  import { jsx as _jsx } from "react/jsx-runtime";
5
7
  /** Uses the provider's adapter and excludes framework hints from native DOM attributes. */
6
8
  export function Link(t0) {
7
- const $ = _c(10);
9
+ const $ = _c(11);
8
10
  let component;
9
11
  let prefetch;
10
12
  let props;
@@ -21,29 +23,35 @@ export function Link(t0) {
21
23
  }
22
24
  const adapters = useBeezUIComponents();
23
25
  const Component = component ?? adapters.Link;
24
- if (!Component || Component === "a") {
25
- let t1;
26
- if ($[4] !== props) {
27
- t1 = /* @__PURE__ */ _jsx("a", { ...props });
28
- $[4] = props;
29
- $[5] = t1;
30
- } else {
31
- t1 = $[5];
32
- }
33
- return t1;
34
- }
35
26
  let t1;
36
- if ($[6] !== Component || $[7] !== prefetch || $[8] !== props) {
37
- t1 = /* @__PURE__ */ _jsx(Component, {
27
+ if ($[4] !== Component || $[5] !== prefetch || $[6] !== props) {
28
+ t1 = !Component || Component === "a" ? /* @__PURE__ */ _jsx("a", {
29
+ "data-slot": "link",
30
+ ...props
31
+ }) : /* @__PURE__ */ _jsx(Component, {
32
+ "data-slot": "link",
38
33
  ...props,
39
34
  prefetch
40
35
  });
41
- $[6] = Component;
42
- $[7] = prefetch;
43
- $[8] = props;
44
- $[9] = t1;
36
+ $[4] = Component;
37
+ $[5] = prefetch;
38
+ $[6] = props;
39
+ $[7] = t1;
40
+ } else {
41
+ t1 = $[7];
42
+ }
43
+ const link = t1;
44
+ let t2;
45
+ if ($[8] !== link || $[9] !== props) {
46
+ t2 = "data-slot" in props ? link : /* @__PURE__ */ _jsx(MotionSlot, {
47
+ kind: "link",
48
+ children: link
49
+ });
50
+ $[8] = link;
51
+ $[9] = props;
52
+ $[10] = t2;
45
53
  } else {
46
- t1 = $[9];
54
+ t2 = $[10];
47
55
  }
48
- return t1;
56
+ return t2;
49
57
  }
@@ -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(4);
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] = props;
24
- $[3] = t1;
28
+ $[2] = motionOpen;
29
+ $[3] = props;
30
+ $[4] = setMotionOpen;
31
+ $[5] = t1;
25
32
  } else {
26
- t1 = $[3];
33
+ t1 = $[5];
27
34
  }
28
- return t1;
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(12);
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
- let t3;
99
+ const t3 = props.forceMount;
100
+ let t4;
80
101
  if ($[5] !== className) {
81
- t3 = 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 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95", className);
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] = t3;
104
+ $[6] = t4;
84
105
  } else {
85
- t3 = $[6];
106
+ t4 = $[6];
86
107
  }
87
- let t4;
88
- if ($[7] !== align || $[8] !== props || $[9] !== sideOffset || $[10] !== t3) {
89
- t4 = /* @__PURE__ */ _jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ _jsx(PopoverPrimitive.Content, {
90
- "data-slot": "popover-content",
91
- align,
92
- sideOffset,
93
- className: t3,
94
- ...props
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] = t3;
100
- $[11] = t4;
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
- t4 = $[11];
143
+ t6 = $[14];
103
144
  }
104
- return t4;
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(RadioGroupPrimitive.Indicator, {
67
- "data-slot": "radio-group-indicator",
68
- className: "flex size-4 items-center justify-center",
69
- 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" })
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(RadioGroupPrimitive.Item, {
78
- "data-slot": "radio-group-item",
79
- className: t1,
80
- ...props,
81
- children: t2
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__ */ _jsxs(SelectPrimitive.Trigger, {
136
- "data-slot": "select-trigger",
137
- "data-size": size,
138
- className: t2,
139
- ...props,
140
- children: [children, t3]
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 duration-100 data-[align-trigger=true]:animate-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 animate-none! 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);
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__ */ _jsxs(SelectPrimitive.Content, {
232
- "data-slot": "select-content",
233
- "data-align-trigger": t3,
234
- className: t5,
235
- position,
236
- align,
237
- ...props,
238
- children: [
239
- t6,
240
- t9,
241
- t10
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__ */ _jsxs(SelectPrimitive.Item, {
347
- "data-slot": "select-item",
348
- className: t1,
349
- ...props,
350
- children: [t2, t3]
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(SeparatorPrimitive, {
34
- "data-slot": "separator",
35
- orientation,
36
- className: t2,
37
- ...props
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;