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,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(4);
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] = props;
26
- $[3] = t1;
30
+ $[2] = motionOpen;
31
+ $[3] = props;
32
+ $[4] = setMotionOpen;
33
+ $[5] = t1;
27
34
  } else {
28
- t1 = $[3];
35
+ t1 = $[5];
29
36
  }
30
- return t1;
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 duration-100 supports-backdrop-filter:backdrop-blur-md data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0", className);
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(17);
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
- let t3;
186
+ const t3 = props.forceMount;
187
+ let t4;
167
188
  if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
168
- t3 = /* @__PURE__ */ _jsx(SheetOverlay, {});
169
- $[6] = t3;
189
+ t4 = /* @__PURE__ */ _jsx(MotionSlot, {
190
+ kind: "overlay",
191
+ children: /* @__PURE__ */ _jsx(SheetOverlay, { forceMount: true })
192
+ });
193
+ $[6] = t4;
170
194
  } else {
171
- t3 = $[6];
195
+ t4 = $[6];
172
196
  }
173
- let t4;
197
+ let t5;
174
198
  if ($[7] !== className) {
175
- t4 = 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 duration-200 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 data-open:animate-in data-open:fade-in-0 data-[side=bottom]:data-open:slide-in-from-bottom-10 data-[side=left]:data-open:slide-in-from-left-10 data-[side=right]:data-open:slide-in-from-right-10 data-[side=top]:data-open:slide-in-from-top-10 data-closed:animate-out data-closed:fade-out-0 data-[side=bottom]:data-closed:slide-out-to-bottom-10 data-[side=left]:data-closed:slide-out-to-left-10 data-[side=right]:data-closed:slide-out-to-right-10 data-[side=top]:data-closed:slide-out-to-top-10", className);
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] = t4;
201
+ $[8] = t5;
178
202
  } else {
179
- t4 = $[8];
203
+ t5 = $[8];
180
204
  }
181
- let t5;
205
+ let t6;
182
206
  if ($[9] !== showCloseButton) {
183
- t5 = showCloseButton && /* @__PURE__ */ _jsx(SheetPrimitive.Close, {
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] = t5;
221
+ $[10] = t6;
198
222
  } else {
199
- t5 = $[10];
223
+ t6 = $[10];
200
224
  }
201
- let t6;
202
- if ($[11] !== children || $[12] !== props || $[13] !== side || $[14] !== t4 || $[15] !== t5) {
203
- t6 = /* @__PURE__ */ _jsxs(SheetPortal, { children: [t3, /* @__PURE__ */ _jsxs(SheetPrimitive.Content, {
204
- "data-slot": "sheet-content",
205
- "data-side": side,
206
- className: t4,
207
- ...props,
208
- children: [children, t5]
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] = t4;
214
- $[15] = t5;
215
- $[16] = t6;
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
- t6 = $[16];
261
+ t8 = $[19];
218
262
  }
219
- return t6;
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(Comp, {
1058
- "data-slot": "sidebar-menu-button",
1059
- "data-sidebar": "menu-button",
1060
- "data-size": size,
1061
- "data-active": isActive,
1062
- className: t5,
1063
- ...props
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(Comp, {
1395
- "data-slot": "sidebar-menu-sub-button",
1396
- "data-sidebar": "menu-sub-button",
1397
- "data-size": size,
1398
- "data-active": isActive,
1399
- className: t4,
1400
- ...props
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("div", {
5
- "data-slot": "skeleton",
6
- className: cn("animate-pulse rounded-md bg-muted", className),
7
- ...props
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("svg", {
3
- ...props,
4
- fill: "none",
5
- viewBox: "0 0 360 362",
6
- children: /* @__PURE__ */ _jsx("path", {
7
- fill: "#25D366",
8
- fillRule: "evenodd",
9
- 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",
10
- clipRule: "evenodd"
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(SwitchPrimitive.Thumb, {
35
- "data-slot": "switch-thumb",
36
- className: "pointer-events-none block rounded-full bg-background ring-0 transition-transform 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"
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(SwitchPrimitive.Root, {
45
- "data-slot": "switch",
46
- "data-size": size,
47
- className: t2,
48
- ...props,
49
- children: t3
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;
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { c as _c } from "react/compiler-runtime";
3
3
  import * as React from "react";
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 Table(t0) {
@@ -174,10 +175,13 @@ function TableRow(t0) {
174
175
  }
175
176
  let t2;
176
177
  if ($[5] !== props || $[6] !== t1) {
177
- t2 = /* @__PURE__ */ _jsx("tr", {
178
- "data-slot": "table-row",
179
- className: t1,
180
- ...props
178
+ t2 = /* @__PURE__ */ _jsx(MotionSlot, {
179
+ kind: "row",
180
+ children: /* @__PURE__ */ _jsx("tr", {
181
+ "data-slot": "table-row",
182
+ className: t1,
183
+ ...props
184
+ })
181
185
  });
182
186
  $[5] = props;
183
187
  $[6] = t1;
@@ -3,6 +3,7 @@ import { c as _c } from "react/compiler-runtime";
3
3
  import * as React from "react";
4
4
  import { cva } from "class-variance-authority";
5
5
  import { Tabs as TabsPrimitive } 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
9
  function Tabs(t0) {
@@ -120,10 +121,13 @@ function TabsTrigger(t0) {
120
121
  }
121
122
  let t2;
122
123
  if ($[5] !== props || $[6] !== t1) {
123
- t2 = /* @__PURE__ */ _jsx(TabsPrimitive.Trigger, {
124
- "data-slot": "tabs-trigger",
125
- className: t1,
126
- ...props
124
+ t2 = /* @__PURE__ */ _jsx(MotionSlot, {
125
+ kind: "press",
126
+ children: /* @__PURE__ */ _jsx(TabsPrimitive.Trigger, {
127
+ "data-slot": "tabs-trigger",
128
+ className: t1,
129
+ ...props
130
+ })
127
131
  });
128
132
  $[5] = props;
129
133
  $[6] = t1;
@@ -156,10 +160,13 @@ function TabsContent(t0) {
156
160
  }
157
161
  let t2;
158
162
  if ($[5] !== props || $[6] !== t1) {
159
- t2 = /* @__PURE__ */ _jsx(TabsPrimitive.Content, {
160
- "data-slot": "tabs-content",
161
- className: t1,
162
- ...props
163
+ t2 = /* @__PURE__ */ _jsx(MotionSlot, {
164
+ kind: "fade",
165
+ children: /* @__PURE__ */ _jsx(TabsPrimitive.Content, {
166
+ "data-slot": "tabs-content",
167
+ className: t1,
168
+ ...props
169
+ })
163
170
  });
164
171
  $[5] = props;
165
172
  $[6] = t1;
@@ -1,4 +1,5 @@
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
  /**
@@ -7,10 +8,13 @@ import { jsx as _jsx } from "react/jsx-runtime";
7
8
  * @returns The styled primitive with its original interaction contract.
8
9
  */
9
10
  function Textarea({ className, ...props }) {
10
- return /* @__PURE__ */ _jsx("textarea", {
11
- "data-slot": "textarea",
12
- className: cn("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 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
11
+ return /* @__PURE__ */ _jsx(MotionSlot, {
12
+ kind: "field",
13
+ children: /* @__PURE__ */ _jsx("textarea", {
14
+ "data-slot": "textarea",
15
+ className: cn("flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 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),
16
+ ...props
17
+ })
14
18
  });
15
19
  }
16
20
  export { Textarea };
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import { c as _c } from "react/compiler-runtime";
3
+ import { MotionSlot } from "../motion/motion-slot.js";
3
4
  import { Toaster as Sonner } from "sonner";
4
5
  import { useTheme } from "next-themes";
5
6
  import { CircleCheck, Info, TriangleAlert, OctagonAlert, Loader } from "lucide-react";
6
7
  import { jsx as _jsx } from "react/jsx-runtime";
7
8
  /** Renders shared notification styling using the consumer's resolved theme. */
8
9
  const ThemedToaster = (t0) => {
9
- const $ = _c(9);
10
+ const $ = _c(12);
10
11
  let props;
11
12
  let theme;
12
13
  if ($[0] !== t0) {
@@ -21,50 +22,83 @@ const ThemedToaster = (t0) => {
21
22
  const { resolvedTheme } = useTheme();
22
23
  const activeTheme = theme ?? (resolvedTheme === "dark" ? "dark" : "light");
23
24
  let t1;
24
- let t2;
25
25
  if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
26
- t1 = {
27
- success: /* @__PURE__ */ _jsx(CircleCheck, { className: "size-4" }),
28
- info: /* @__PURE__ */ _jsx(Info, { className: "size-4" }),
29
- warning: /* @__PURE__ */ _jsx(TriangleAlert, { className: "size-4" }),
30
- error: /* @__PURE__ */ _jsx(OctagonAlert, { className: "size-4" }),
31
- loading: /* @__PURE__ */ _jsx(Loader, { className: "size-4 animate-spin" })
32
- };
33
- t2 = {
34
- "--normal-bg": "var(--popover)",
35
- "--normal-text": "var(--popover-foreground)",
36
- "--normal-border": "var(--border)",
37
- "--border-radius": "var(--radius)"
38
- };
26
+ t1 = /* @__PURE__ */ _jsx(MotionSlot, {
27
+ kind: "selection",
28
+ children: /* @__PURE__ */ _jsx(CircleCheck, { className: "size-4" })
29
+ });
39
30
  $[3] = t1;
40
- $[4] = t2;
41
31
  } else {
42
32
  t1 = $[3];
33
+ }
34
+ let t2;
35
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
36
+ t2 = /* @__PURE__ */ _jsx(MotionSlot, {
37
+ kind: "selection",
38
+ children: /* @__PURE__ */ _jsx(Info, { className: "size-4" })
39
+ });
40
+ $[4] = t2;
41
+ } else {
43
42
  t2 = $[4];
44
43
  }
45
44
  let t3;
46
45
  if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
47
- t3 = { classNames: { toast: "cn-toast" } };
46
+ t3 = /* @__PURE__ */ _jsx(MotionSlot, {
47
+ kind: "selection",
48
+ children: /* @__PURE__ */ _jsx(TriangleAlert, { className: "size-4" })
49
+ });
48
50
  $[5] = t3;
49
51
  } else {
50
52
  t3 = $[5];
51
53
  }
52
54
  let t4;
53
- if ($[6] !== activeTheme || $[7] !== props) {
54
- t4 = /* @__PURE__ */ _jsx(Sonner, {
55
+ let t5;
56
+ if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
57
+ t4 = {
58
+ success: t1,
59
+ info: t2,
60
+ warning: t3,
61
+ error: /* @__PURE__ */ _jsx(MotionSlot, {
62
+ kind: "selection",
63
+ children: /* @__PURE__ */ _jsx(OctagonAlert, { className: "size-4" })
64
+ }),
65
+ loading: /* @__PURE__ */ _jsx(Loader, { className: "size-4 animate-spin" })
66
+ };
67
+ t5 = {
68
+ "--normal-bg": "var(--popover)",
69
+ "--normal-text": "var(--popover-foreground)",
70
+ "--normal-border": "var(--border)",
71
+ "--border-radius": "var(--radius)"
72
+ };
73
+ $[6] = t4;
74
+ $[7] = t5;
75
+ } else {
76
+ t4 = $[6];
77
+ t5 = $[7];
78
+ }
79
+ let t6;
80
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
81
+ t6 = { classNames: { toast: "cn-toast" } };
82
+ $[8] = t6;
83
+ } else {
84
+ t6 = $[8];
85
+ }
86
+ let t7;
87
+ if ($[9] !== activeTheme || $[10] !== props) {
88
+ t7 = /* @__PURE__ */ _jsx(Sonner, {
55
89
  theme: activeTheme,
56
90
  className: "toaster group",
57
- icons: t1,
58
- style: t2,
59
- toastOptions: t3,
91
+ icons: t4,
92
+ style: t5,
93
+ toastOptions: t6,
60
94
  ...props
61
95
  });
62
- $[6] = activeTheme;
63
- $[7] = props;
64
- $[8] = t4;
96
+ $[9] = activeTheme;
97
+ $[10] = props;
98
+ $[11] = t7;
65
99
  } else {
66
- t4 = $[8];
100
+ t7 = $[11];
67
101
  }
68
- return t4;
102
+ return t7;
69
103
  };
70
104
  export { ThemedToaster };