beez-ui 3.0.1 → 4.0.0

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 (56) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/README.md +45 -47
  3. package/dist/components/account-menu.js +1 -1
  4. package/dist/components/alert.js +3 -7
  5. package/dist/components/animated-collapse.js +51 -38
  6. package/dist/components/animated-list-item.js +33 -34
  7. package/dist/components/animated-theme-toggler.d.ts +5 -1
  8. package/dist/components/animated-theme-toggler.js +75 -120
  9. package/dist/components/badge.js +7 -11
  10. package/dist/components/card.js +13 -16
  11. package/dist/components/dialog-surface.js +8 -21
  12. package/dist/components/filter-query-bar.js +7 -11
  13. package/dist/components/input-group.js +5 -9
  14. package/dist/components/input.js +8 -12
  15. package/dist/components/label.js +4 -8
  16. package/dist/components/link.d.ts +1 -0
  17. package/dist/components/link.js +2 -16
  18. package/dist/components/presence-swap.d.ts +1 -1
  19. package/dist/components/presence-swap.js +44 -32
  20. package/dist/components/primitives/avatar.js +6 -9
  21. package/dist/components/primitives/dropdown-menu.d.ts +2 -2
  22. package/dist/components/primitives/dropdown-menu.js +8 -5
  23. package/dist/components/primitives/select.d.ts +2 -1
  24. package/dist/components/primitives/select.js +104 -83
  25. package/dist/components/reaction-button.d.ts +5 -6
  26. package/dist/components/reaction-button.js +139 -75
  27. package/dist/components/rich-link-editor.js +1 -1
  28. package/dist/components/separator.js +5 -9
  29. package/dist/components/sheet.js +8 -11
  30. package/dist/components/sidebar.d.ts +6 -6
  31. package/dist/components/sidebar.js +221 -184
  32. package/dist/components/svgs/whatsappIcon.js +10 -14
  33. package/dist/components/table.js +4 -8
  34. package/dist/components/textarea.js +7 -11
  35. package/dist/components/themed-toaster.js +28 -62
  36. package/dist/constants/dropdown-menu.d.ts +6 -1
  37. package/dist/constants/dropdown-menu.js +33 -1
  38. package/dist/constants/popover.js +2 -8
  39. package/dist/constants/select.d.ts +3 -1
  40. package/dist/constants/select.js +30 -1
  41. package/dist/motion/arc-tokens.d.ts +6 -0
  42. package/dist/motion/arc-tokens.js +6 -0
  43. package/dist/motion/glide-indicator.d.ts +6 -21
  44. package/dist/motion/glide-indicator.js +8 -17
  45. package/dist/motion/motion-slot.d.ts +6 -3
  46. package/dist/motion/motion-slot.js +100 -411
  47. package/dist/motion/presence.d.ts +8 -0
  48. package/dist/motion/presence.js +11 -1
  49. package/dist/motion/surface-keyframes.d.ts +2 -2
  50. package/dist/motion/surface-keyframes.js +40 -141
  51. package/dist/motion/tokens.d.ts +10 -114
  52. package/dist/motion/tokens.js +11 -116
  53. package/dist/styles.css +1 -1
  54. package/package.json +1 -1
  55. package/dist/motion/shared-layout-bg.d.ts +0 -16
  56. package/dist/motion/shared-layout-bg.js +0 -181
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import { c as _c } from "react/compiler-runtime";
3
3
  /**
4
- * Animated application sidebar adapted from beui.dev/components/motion/animated-sidebar: the rail
5
- * morphs its width with a spring, labels fade out of the icon rail, a shared pill follows the
6
- * hovered and active items, submenus unfold with a stagger, and small screens get a focus-trapped
7
- * sheet. Links route through the `BeezUIProvider` adapter and the open state keeps the
4
+ * Application sidebar on the motion of Arc's sidebar rail: the rail springs its width without
5
+ * overshoot, labels fade and drift out of the icon rail, the active item's highlight glides between
6
+ * items, hovered items only change color, submenus open their height on the smooth spring, and
7
+ * small screens get a focus-trapped sheet that slides in from its edge. Links route through the `BeezUIProvider` adapter and the open state keeps the
8
8
  * `sidebar_state` cookie contract read by server entrypoints.
9
9
  */
10
10
  import * as React from "react";
11
11
  import { ChevronRight, PanelLeftIcon } from "lucide-react";
12
12
  import { Slot } from "radix-ui";
13
- import { AnimatePresence, motion } from "motion/react";
13
+ import { AnimatePresence, motion, PresenceContext } from "motion/react";
14
14
  import { createPortal } from "react-dom";
15
15
  import { useIsHydrated } from "../hooks/use-is-hydrated.js";
16
16
  import { useIsMobile } from "../hooks/use-mobile.js";
@@ -18,84 +18,63 @@ import { usePrefersReducedMotion } from "../hooks/use-prefers-reduced-motion.js"
18
18
  import { saveSidebarCookie, saveSidebarPreference, useSidebarPersistence } from "../hooks/use-sidebar-persistence.js";
19
19
  import { SIDEBAR_COOKIE_MAX_AGE, SIDEBAR_COOKIE_NAME } from "../constants/sidebar.js";
20
20
  import { cn } from "../lib/utils.js";
21
- import { MotionSlot } from "../motion/motion-slot.js";
22
- import { SharedLayoutBg } from "../motion/shared-layout-bg.js";
23
- import { MOTION_EASE, MOTION_EASE_DRAWER, MOTION_LIST_ITEM_DISTANCE, MOTION_TIMING, SPRING_LAYOUT, SPRING_PANEL } from "../motion/tokens.js";
21
+ import { MOTION_EASE, MOTION_EASE_STANDARD, MOTION_TIMING, SPRING_CHEVRON, SPRING_LAYOUT, SPRING_PANEL } from "../motion/tokens.js";
24
22
  import { Link } from "./link.js";
25
23
  import { SidebarPanelContext } from "./sidebar-panel-context.js";
26
24
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
27
- import { createElement as _createElement } from "react";
28
25
  const SIDEBAR_WIDTH = "16rem";
29
26
  const SIDEBAR_WIDTH_ICON = "4.25rem";
30
27
  const SIDEBAR_WIDTH_MOBILE = "18rem";
31
28
  const SIDEBAR_KEYBOARD_SHORTCUT = "b";
32
29
  const EXTERNAL_LINK_TARGET = "_blank";
33
30
  const EXTERNAL_LINK_REL = "noreferrer noopener";
34
- /** Distance, in pixels, labels and chevrons drift while fading out of the icon rail. */
35
- const SIDEBAR_LABEL_DRIFT_PX = 4;
31
+ /** Distance, in pixels, labels and chevrons drift while fading out of the icon rail (Arc). */
32
+ const SIDEBAR_LABEL_DRIFT_PX = 6;
36
33
  /** Chevron rotation, in degrees, of an expanded group. */
37
34
  const SIDEBAR_CHEVRON_EXPANDED_DEGREES = 90;
38
- /** Blur, in pixels, submenu items shed as they unfold. */
39
- const SIDEBAR_SUBMENU_ITEM_BLUR_PX = 3;
40
- const PANEL_TRANSITION = {
41
- duration: .36,
42
- ease: MOTION_EASE_DRAWER
35
+ /** Arc's sidebar sheet slides in and out on the smooth spring. */
36
+ const PANEL_TRANSITION = SPRING_PANEL;
37
+ /** Arc's scrim fades on the standard duration. */
38
+ const SCRIM_TRANSITION = {
39
+ duration: MOTION_TIMING.standard,
40
+ ease: MOTION_EASE
43
41
  };
44
42
  /**
45
43
  * The desktop rail settles at a hard zero-width boundary, and its width reports the panel state. Arc's smooth spring
46
44
  * is critically damped, so it cannot overshoot, pause against that boundary and snap back during the final frame.
47
45
  */
48
46
  const SIDEBAR_MORPH_TRANSITION = SPRING_PANEL;
47
+ /** Arc's labels come back once the rail has mostly opened. */
49
48
  const LABEL_ENTER_TRANSITION = {
50
- duration: MOTION_TIMING.message,
51
- delay: .08,
49
+ duration: MOTION_TIMING.standard,
50
+ delay: .1,
52
51
  ease: MOTION_EASE
53
52
  };
53
+ /** Arc's labels leave quickly, before the rail finishes folding. */
54
54
  const LABEL_EXIT_TRANSITION = {
55
- duration: MOTION_TIMING.exit,
56
- ease: MOTION_EASE
55
+ duration: .14,
56
+ ease: MOTION_EASE_STANDARD
57
57
  };
58
58
  const REDUCED_TRANSITION = {
59
59
  duration: .16,
60
60
  ease: MOTION_EASE
61
61
  };
62
62
  const INSTANT_TRANSITION = { duration: 0 };
63
- const SUBMENU_VARIANTS = {
64
- closed: {
65
- opacity: 0,
66
- clipPath: "inset(0 0 100% 0 round 8px)",
67
- transition: {
68
- duration: MOTION_TIMING.fast,
69
- ease: MOTION_EASE,
70
- staggerChildren: .025,
71
- staggerDirection: -1
72
- }
73
- },
74
- open: {
75
- opacity: 1,
76
- clipPath: "inset(0 0 0% 0 round 8px)",
77
- transition: {
78
- duration: MOTION_TIMING.message,
79
- delayChildren: MOTION_TIMING.listStagger,
80
- ease: MOTION_EASE,
81
- staggerChildren: .045
82
- }
63
+ /** Arc's submenu opens its height on the smooth spring while its items fade in just behind it. */
64
+ const SUBMENU_OPEN_TRANSITION = {
65
+ height: SPRING_PANEL,
66
+ opacity: {
67
+ duration: MOTION_TIMING.standard,
68
+ delay: .06,
69
+ ease: MOTION_EASE
83
70
  }
84
71
  };
85
- const SUBMENU_ITEM_VARIANTS = {
86
- closed: {
87
- opacity: 0,
88
- y: -MOTION_LIST_ITEM_DISTANCE,
89
- filter: `blur(${SIDEBAR_SUBMENU_ITEM_BLUR_PX}px)`
90
- },
91
- open: {
92
- opacity: 1,
93
- y: 0,
94
- filter: "blur(0px)",
95
- transition: {
96
- duration: MOTION_TIMING.enter,
97
- ease: MOTION_EASE
98
- }
72
+ /** Arc's submenu folds on the same spring and fades out faster than it came in. */
73
+ const SUBMENU_CLOSE_TRANSITION = {
74
+ height: SPRING_PANEL,
75
+ opacity: {
76
+ duration: .14,
77
+ ease: MOTION_EASE_STANDARD
99
78
  }
100
79
  };
101
80
  const FOCUSABLE_SELECTOR = [
@@ -504,170 +483,171 @@ function MobileSidebar(t0) {
504
483
  } else {
505
484
  t10 = $[12];
506
485
  }
507
- let t11;
486
+ const t11 = reduce ? REDUCED_TRANSITION : SCRIM_TRANSITION;
487
+ let t12;
508
488
  if ($[13] !== setOpenMobile) {
509
- t11 = () => setOpenMobile(false);
489
+ t12 = () => setOpenMobile(false);
510
490
  $[13] = setOpenMobile;
511
- $[14] = t11;
491
+ $[14] = t12;
512
492
  } else {
513
- t11 = $[14];
493
+ t12 = $[14];
514
494
  }
515
- const t12 = openMobile ? "pointer-events-auto" : "pointer-events-none";
516
- let t13;
517
- if ($[15] !== t12) {
518
- t13 = cn("fixed inset-0 bg-black/40", t12);
519
- $[15] = t12;
520
- $[16] = t13;
495
+ const t13 = openMobile ? "pointer-events-auto" : "pointer-events-none";
496
+ let t14;
497
+ if ($[15] !== t13) {
498
+ t14 = cn("fixed inset-0 bg-black/40", t13);
499
+ $[15] = t13;
500
+ $[16] = t14;
521
501
  } else {
522
- t13 = $[16];
502
+ t14 = $[16];
523
503
  }
524
- let t14;
525
- if ($[17] !== t10 || $[18] !== t11 || $[19] !== t13 || $[20] !== t8 || $[21] !== transition) {
526
- t14 = /* @__PURE__ */ _jsx(motion.button, {
504
+ let t15;
505
+ if ($[17] !== t10 || $[18] !== t11 || $[19] !== t12 || $[20] !== t14 || $[21] !== t8) {
506
+ t15 = /* @__PURE__ */ _jsx(motion.button, {
527
507
  type: "button",
528
508
  "aria-label": "Close sidebar",
529
509
  "data-slot": "sidebar-overlay",
530
510
  tabIndex: t8,
531
511
  initial: false,
532
512
  animate: t10,
533
- transition,
534
- onClick: t11,
535
- className: t13
513
+ transition: t11,
514
+ onClick: t12,
515
+ className: t14
536
516
  });
537
517
  $[17] = t10;
538
518
  $[18] = t11;
539
- $[19] = t13;
540
- $[20] = t8;
541
- $[21] = transition;
542
- $[22] = t14;
519
+ $[19] = t12;
520
+ $[20] = t14;
521
+ $[21] = t8;
522
+ $[22] = t15;
543
523
  } else {
544
- t14 = $[22];
524
+ t15 = $[22];
545
525
  }
546
- const t15 = !openMobile;
547
526
  const t16 = !openMobile;
548
- const t17 = openMobile ? "expanded" : "collapsed";
549
- const t18 = reduce ? openMobile ? 1 : 0 : 1;
550
- const t19 = reduce ? 0 : openMobile ? "0%" : closedOffset;
551
- let t20;
552
- if ($[23] !== t18 || $[24] !== t19) {
553
- t20 = {
554
- opacity: t18,
555
- x: t19
527
+ const t17 = !openMobile;
528
+ const t18 = openMobile ? "expanded" : "collapsed";
529
+ const t19 = reduce ? openMobile ? 1 : 0 : 1;
530
+ const t20 = reduce ? 0 : openMobile ? "0%" : closedOffset;
531
+ let t21;
532
+ if ($[23] !== t19 || $[24] !== t20) {
533
+ t21 = {
534
+ opacity: t19,
535
+ x: t20
556
536
  };
557
- $[23] = t18;
558
- $[24] = t19;
559
- $[25] = t20;
537
+ $[23] = t19;
538
+ $[24] = t20;
539
+ $[25] = t21;
560
540
  } else {
561
- t20 = $[25];
541
+ t21 = $[25];
562
542
  }
563
- let t21;
543
+ let t22;
564
544
  if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
565
- t21 = () => {
545
+ t22 = () => {
566
546
  if (!openMobileRef.current) {
567
547
  setHidden(true);
568
548
  }
569
549
  };
570
- $[26] = t21;
550
+ $[26] = t22;
571
551
  } else {
572
- t21 = $[26];
552
+ t22 = $[26];
573
553
  }
574
- let t22;
554
+ let t23;
575
555
  if ($[27] !== mobileWidth) {
576
- t22 = { "--sidebar-width-mobile": mobileWidth };
556
+ t23 = { "--sidebar-width-mobile": mobileWidth };
577
557
  $[27] = mobileWidth;
578
- $[28] = t22;
558
+ $[28] = t23;
579
559
  } else {
580
- t22 = $[28];
560
+ t23 = $[28];
581
561
  }
582
- const t23 = t22;
583
- const t24 = side === "left" ? "left-0 border-r" : "right-0 border-l";
584
- const t25 = !openMobile && "pointer-events-none";
585
- let t26;
586
- if ($[29] !== className || $[30] !== t24 || $[31] !== t25) {
587
- t26 = cn("pointer-events-auto fixed inset-y-0 flex h-dvh w-(--sidebar-width-mobile) max-w-[88vw] flex-col overflow-hidden outline-none", "border-sidebar-border bg-sidebar text-sidebar-foreground shadow-2xl will-change-transform", t24, t25, className);
562
+ const t24 = t23;
563
+ const t25 = side === "left" ? "left-0 border-r" : "right-0 border-l";
564
+ const t26 = !openMobile && "pointer-events-none";
565
+ let t27;
566
+ if ($[29] !== className || $[30] !== t25 || $[31] !== t26) {
567
+ t27 = cn("pointer-events-auto fixed inset-y-0 flex h-dvh w-(--sidebar-width-mobile) max-w-[88vw] flex-col overflow-hidden outline-none", "border-sidebar-border bg-sidebar text-sidebar-foreground shadow-2xl will-change-transform", t25, t26, className);
588
568
  $[29] = className;
589
- $[30] = t24;
590
- $[31] = t25;
591
- $[32] = t26;
569
+ $[30] = t25;
570
+ $[31] = t26;
571
+ $[32] = t27;
592
572
  } else {
593
- t26 = $[32];
573
+ t27 = $[32];
594
574
  }
595
- let t27;
575
+ let t28;
596
576
  if ($[33] !== side) {
597
- t27 = {
577
+ t28 = {
598
578
  collapsed: false,
599
579
  collapsible: "none",
600
580
  side
601
581
  };
602
582
  $[33] = side;
603
- $[34] = t27;
583
+ $[34] = t28;
604
584
  } else {
605
- t27 = $[34];
585
+ t28 = $[34];
606
586
  }
607
- let t28;
608
- if ($[35] !== children || $[36] !== t27) {
609
- t28 = /* @__PURE__ */ _jsx(SidebarPanelContext.Provider, {
610
- value: t27,
587
+ let t29;
588
+ if ($[35] !== children || $[36] !== t28) {
589
+ t29 = /* @__PURE__ */ _jsx(SidebarPanelContext.Provider, {
590
+ value: t28,
611
591
  children
612
592
  });
613
593
  $[35] = children;
614
- $[36] = t27;
615
- $[37] = t28;
594
+ $[36] = t28;
595
+ $[37] = t29;
616
596
  } else {
617
- t28 = $[37];
597
+ t29 = $[37];
618
598
  }
619
- let t29;
620
- if ($[38] !== ariaLabel || $[39] !== side || $[40] !== t15 || $[41] !== t16 || $[42] !== t17 || $[43] !== t20 || $[44] !== t23 || $[45] !== t26 || $[46] !== t28 || $[47] !== transition || $[48] !== trapFocus) {
621
- t29 = /* @__PURE__ */ _jsx(motion.div, {
599
+ let t30;
600
+ if ($[38] !== ariaLabel || $[39] !== side || $[40] !== t16 || $[41] !== t17 || $[42] !== t18 || $[43] !== t21 || $[44] !== t24 || $[45] !== t27 || $[46] !== t29 || $[47] !== transition || $[48] !== trapFocus) {
601
+ t30 = /* @__PURE__ */ _jsx(motion.div, {
622
602
  ref: panelRef,
623
603
  role: "dialog",
624
604
  "aria-modal": "true",
625
605
  "aria-label": ariaLabel,
626
- "aria-hidden": t15,
627
- inert: t16,
606
+ "aria-hidden": t16,
607
+ inert: t17,
628
608
  tabIndex: -1,
629
609
  "data-slot": "sidebar",
630
610
  "data-mobile": "true",
631
- "data-state": t17,
611
+ "data-state": t18,
632
612
  "data-side": side,
633
613
  initial: false,
634
- animate: t20,
614
+ animate: t21,
635
615
  transition,
636
- onAnimationComplete: t21,
616
+ onAnimationComplete: t22,
637
617
  onKeyDown: trapFocus,
638
- style: t23,
639
- className: t26,
640
- children: t28
618
+ style: t24,
619
+ className: t27,
620
+ children: t29
641
621
  });
642
622
  $[38] = ariaLabel;
643
623
  $[39] = side;
644
- $[40] = t15;
645
- $[41] = t16;
646
- $[42] = t17;
647
- $[43] = t20;
648
- $[44] = t23;
649
- $[45] = t26;
650
- $[46] = t28;
624
+ $[40] = t16;
625
+ $[41] = t17;
626
+ $[42] = t18;
627
+ $[43] = t21;
628
+ $[44] = t24;
629
+ $[45] = t27;
630
+ $[46] = t29;
651
631
  $[47] = transition;
652
632
  $[48] = trapFocus;
653
- $[49] = t29;
633
+ $[49] = t30;
654
634
  } else {
655
- t29 = $[49];
635
+ t30 = $[49];
656
636
  }
657
- let t30;
658
- if ($[50] !== t14 || $[51] !== t29 || $[52] !== t7) {
659
- t30 = createPortal(/* @__PURE__ */ _jsxs("div", {
637
+ let t31;
638
+ if ($[50] !== t15 || $[51] !== t30 || $[52] !== t7) {
639
+ t31 = createPortal(/* @__PURE__ */ _jsxs("div", {
660
640
  className: t7,
661
- children: [t14, t29]
641
+ children: [t15, t30]
662
642
  }), document.body);
663
- $[50] = t14;
664
- $[51] = t29;
643
+ $[50] = t15;
644
+ $[51] = t30;
665
645
  $[52] = t7;
666
- $[53] = t30;
646
+ $[53] = t31;
667
647
  } else {
668
- t30 = $[53];
648
+ t31 = $[53];
669
649
  }
670
- return t30;
650
+ return t31;
671
651
  }
672
652
  /**
673
653
  * Renders the sidebar: a width-morphing rail on desktop and a sheet on small screens.
@@ -1448,7 +1428,7 @@ function SidebarGroupContent(t0) {
1448
1428
  }
1449
1429
  return t2;
1450
1430
  }
1451
- /** Menu list whose items share a hover pill that glides between them. */
1431
+ /** Menu list; hovered items answer in color, as in Arc's sidebar rail. */
1452
1432
  function SidebarMenu(t0) {
1453
1433
  const $ = _c(8);
1454
1434
  let className;
@@ -1472,11 +1452,8 @@ function SidebarMenu(t0) {
1472
1452
  }
1473
1453
  let t2;
1474
1454
  if ($[5] !== props || $[6] !== t1) {
1475
- t2 = /* @__PURE__ */ _jsx(SharedLayoutBg, {
1455
+ t2 = /* @__PURE__ */ _jsx("ul", {
1476
1456
  ...props,
1477
- inset: 0,
1478
- pillClassName: "rounded-xl bg-sidebar-accent/70",
1479
- pillContainerClassName: "inset-y-auto top-0 h-9",
1480
1457
  "data-slot": "sidebar-menu",
1481
1458
  className: t1
1482
1459
  });
@@ -1513,8 +1490,6 @@ function SidebarMenuItem(t0) {
1513
1490
  if ($[5] !== props || $[6] !== t1) {
1514
1491
  t2 = /* @__PURE__ */ _jsx(motion.li, {
1515
1492
  ...props,
1516
- layout: "position",
1517
- transition: SPRING_LAYOUT,
1518
1493
  "data-slot": "sidebar-menu-item",
1519
1494
  className: t1
1520
1495
  });
@@ -1527,7 +1502,85 @@ function SidebarMenuItem(t0) {
1527
1502
  return t2;
1528
1503
  }
1529
1504
  /**
1530
- * Nested list that unfolds with a clip and staggered items.
1505
+ * Height-animated wrapper of an open submenu. It clips overflow only while the height or the fade
1506
+ * runs, so the outward focus ring of its items is not cut once the submenu settles.
1507
+ * @param props - Reduced motion flag and the submenu list.
1508
+ * @returns The animated wrapper.
1509
+ */
1510
+ function SidebarMenuSubRegion(t0) {
1511
+ const $ = _c(14);
1512
+ const { reduce, children } = t0;
1513
+ const isMountedWithoutEntrance = React.useContext(PresenceContext)?.initial === false;
1514
+ const [isSettled, setIsSettled] = React.useState(isMountedWithoutEntrance);
1515
+ let t1;
1516
+ let t2;
1517
+ let t3;
1518
+ let t4;
1519
+ if ($[0] !== reduce) {
1520
+ t1 = reduce ? { opacity: 0 } : {
1521
+ height: 0,
1522
+ opacity: 0
1523
+ };
1524
+ t2 = reduce ? { opacity: 1 } : {
1525
+ height: "auto",
1526
+ opacity: 1,
1527
+ transition: SUBMENU_OPEN_TRANSITION
1528
+ };
1529
+ t3 = reduce ? { opacity: 0 } : {
1530
+ height: 0,
1531
+ opacity: 0,
1532
+ transition: SUBMENU_CLOSE_TRANSITION
1533
+ };
1534
+ t4 = reduce ? { duration: MOTION_TIMING.exit } : undefined;
1535
+ $[0] = reduce;
1536
+ $[1] = t1;
1537
+ $[2] = t2;
1538
+ $[3] = t3;
1539
+ $[4] = t4;
1540
+ } else {
1541
+ t1 = $[1];
1542
+ t2 = $[2];
1543
+ t3 = $[3];
1544
+ t4 = $[4];
1545
+ }
1546
+ const t5 = isSettled ? "overflow-visible" : "overflow-hidden";
1547
+ let t6;
1548
+ let t7;
1549
+ if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
1550
+ t6 = () => setIsSettled(false);
1551
+ t7 = () => setIsSettled(true);
1552
+ $[5] = t6;
1553
+ $[6] = t7;
1554
+ } else {
1555
+ t6 = $[5];
1556
+ t7 = $[6];
1557
+ }
1558
+ let t8;
1559
+ if ($[7] !== children || $[8] !== t1 || $[9] !== t2 || $[10] !== t3 || $[11] !== t4 || $[12] !== t5) {
1560
+ t8 = /* @__PURE__ */ _jsx(motion.div, {
1561
+ initial: t1,
1562
+ animate: t2,
1563
+ exit: t3,
1564
+ transition: t4,
1565
+ className: t5,
1566
+ onAnimationStart: t6,
1567
+ onAnimationComplete: t7,
1568
+ children
1569
+ });
1570
+ $[7] = children;
1571
+ $[8] = t1;
1572
+ $[9] = t2;
1573
+ $[10] = t3;
1574
+ $[11] = t4;
1575
+ $[12] = t5;
1576
+ $[13] = t8;
1577
+ } else {
1578
+ t8 = $[13];
1579
+ }
1580
+ return t8;
1581
+ }
1582
+ /**
1583
+ * Nested list that opens its height on Arc's smooth spring.
1531
1584
  * @param props - Open state and motion-enabled list attributes.
1532
1585
  * @returns The submenu while open and the sidebar is expanded.
1533
1586
  */
@@ -1554,17 +1607,15 @@ function SidebarMenuSub(t0) {
1554
1607
  const panel = useSidebarPanel();
1555
1608
  let t1;
1556
1609
  if ($[5] !== children || $[6] !== className || $[7] !== context || $[8] !== open || $[9] !== panel || $[10] !== props) {
1557
- t1 = open && !panel.collapsed ? /* @__PURE__ */ _createElement(motion.ul, {
1558
- ...props,
1559
- key: "sidebar-submenu",
1560
- variants: context.reduce ? undefined : SUBMENU_VARIANTS,
1561
- initial: context.reduce ? false : "closed",
1562
- animate: context.reduce ? { opacity: 1 } : "open",
1563
- exit: context.reduce ? { opacity: 0 } : "closed",
1564
- transition: context.reduce ? { duration: MOTION_TIMING.exit } : undefined,
1565
- "data-slot": "sidebar-menu-sub",
1566
- className: cn("relative mt-1 ml-5 flex min-w-0 flex-col gap-0.5 border-l border-sidebar-border pl-3", className)
1567
- }, children) : null;
1610
+ t1 = open && !panel.collapsed ? /* @__PURE__ */ _jsx(SidebarMenuSubRegion, {
1611
+ reduce: context.reduce,
1612
+ children: /* @__PURE__ */ _jsx(motion.ul, {
1613
+ ...props,
1614
+ "data-slot": "sidebar-menu-sub",
1615
+ className: cn("relative mt-1 ml-5 flex min-w-0 flex-col gap-0.5 border-l border-sidebar-border pl-3", className),
1616
+ children
1617
+ })
1618
+ }, "sidebar-submenu") : null;
1568
1619
  $[5] = children;
1569
1620
  $[6] = className;
1570
1621
  $[7] = context;
@@ -1579,7 +1630,6 @@ function SidebarMenuSub(t0) {
1579
1630
  if ($[12] !== t1) {
1580
1631
  t2 = /* @__PURE__ */ _jsx(AnimatePresence, {
1581
1632
  initial: false,
1582
- mode: "popLayout",
1583
1633
  children: t1
1584
1634
  });
1585
1635
  $[12] = t1;
@@ -1614,7 +1664,6 @@ function SidebarMenuSubItem(t0) {
1614
1664
  if ($[5] !== props || $[6] !== t1) {
1615
1665
  t2 = /* @__PURE__ */ _jsx(motion.li, {
1616
1666
  ...props,
1617
- variants: SUBMENU_ITEM_VARIANTS,
1618
1667
  "data-slot": "sidebar-menu-sub-item",
1619
1668
  className: t1
1620
1669
  });
@@ -1628,7 +1677,7 @@ function SidebarMenuSubItem(t0) {
1628
1677
  }
1629
1678
  /** Renders a menu action as a routed link or a button, both with the subtle press feedback. */
1630
1679
  function SidebarPressable(t0) {
1631
- const $ = _c(19);
1680
+ const $ = _c(16);
1632
1681
  const { slot, href, disabled, target, rel, isActive, ariaExpanded, ariaLabel, title, className, children, onClick } = t0;
1633
1682
  const t1 = isActive ? "page" : undefined;
1634
1683
  let t2;
@@ -1683,19 +1732,7 @@ function SidebarPressable(t0) {
1683
1732
  t3 = $[15];
1684
1733
  }
1685
1734
  const element = t3;
1686
- let t4;
1687
- if ($[16] !== disabled || $[17] !== element) {
1688
- t4 = disabled ? element : /* @__PURE__ */ _jsx(MotionSlot, {
1689
- kind: "subtle-press",
1690
- children: element
1691
- });
1692
- $[16] = disabled;
1693
- $[17] = element;
1694
- $[18] = t4;
1695
- } else {
1696
- t4 = $[18];
1697
- }
1698
- return t4;
1735
+ return element;
1699
1736
  }
1700
1737
  /**
1701
1738
  * Submenu entry; shows a dot when no icon is given.
@@ -1847,7 +1884,7 @@ function SidebarMenuButton(t0) {
1847
1884
  const t5 = disabled && "cursor-not-allowed opacity-40";
1848
1885
  let t6;
1849
1886
  if ($[7] !== className || $[8] !== t4 || $[9] !== t5) {
1850
- t6 = cn("relative flex min-h-9 w-full min-w-0 items-center gap-2.5 overflow-hidden rounded-xl px-3 text-left text-sm font-medium outline-none", "text-sidebar-foreground/70 transition-colors hover:text-sidebar-accent-foreground", "focus-visible:bg-sidebar-accent/70 focus-visible:ring-2 focus-visible:ring-sidebar-ring", t4, t5, className);
1887
+ t6 = cn("relative flex min-h-9 w-full min-w-0 items-center gap-2.5 overflow-hidden rounded-xl px-3 text-left text-sm font-medium outline-none", "text-sidebar-foreground/70 transition-colors hover:text-sidebar-accent-foreground hover-fine:bg-sidebar-accent/70", "focus-visible:bg-sidebar-accent/70 focus-visible:ring-2 focus-visible:ring-sidebar-ring", t4, t5, className);
1851
1888
  $[7] = className;
1852
1889
  $[8] = t4;
1853
1890
  $[9] = t5;
@@ -1948,7 +1985,7 @@ function SidebarMenuButton(t0) {
1948
1985
  rotate: ariaExpanded ? SIDEBAR_CHEVRON_EXPANDED_DEGREES : 0,
1949
1986
  x: panel.collapsed ? SIDEBAR_LABEL_DRIFT_PX : 0
1950
1987
  },
1951
- transition: context.reduce ? INSTANT_TRANSITION : SPRING_LAYOUT,
1988
+ transition: context.reduce ? INSTANT_TRANSITION : SPRING_CHEVRON,
1952
1989
  className: "relative z-10 grid size-4 shrink-0 place-items-center text-sidebar-foreground/70",
1953
1990
  children: /* @__PURE__ */ _jsx(ChevronRight, { className: "size-3.5" })
1954
1991
  }) : null;
@@ -1,18 +1,14 @@
1
- import { MotionSlot } from "../../motion/motion-slot.js";
2
1
  import { jsx as _jsx } from "react/jsx-runtime";
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
- })
2
+ const WhatsappIcon = (props) => /* @__PURE__ */ _jsx("svg", {
3
+ "data-slot": "whatsapp-icon",
4
+ ...props,
5
+ fill: "none",
6
+ viewBox: "0 0 360 362",
7
+ children: /* @__PURE__ */ _jsx("path", {
8
+ fill: "#25D366",
9
+ fillRule: "evenodd",
10
+ 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",
11
+ clipRule: "evenodd"
16
12
  })
17
13
  });
18
14
  export { WhatsappIcon };
@@ -1,7 +1,6 @@
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";
5
4
  import { cn } from "../lib/utils.js";
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
7
6
  function Table(t0) {
@@ -175,13 +174,10 @@ function TableRow(t0) {
175
174
  }
176
175
  let t2;
177
176
  if ($[5] !== props || $[6] !== t1) {
178
- t2 = /* @__PURE__ */ _jsx(MotionSlot, {
179
- kind: "row",
180
- children: /* @__PURE__ */ _jsx("tr", {
181
- "data-slot": "table-row",
182
- className: t1,
183
- ...props
184
- })
177
+ t2 = /* @__PURE__ */ _jsx("tr", {
178
+ "data-slot": "table-row",
179
+ className: t1,
180
+ ...props
185
181
  });
186
182
  $[5] = props;
187
183
  $[6] = t1;