beez-ui 3.0.0 → 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 (58) hide show
  1. package/CHANGELOG.md +32 -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 +8 -10
  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/avatar.d.ts +6 -1
  37. package/dist/constants/avatar.js +6 -0
  38. package/dist/constants/dropdown-menu.d.ts +6 -1
  39. package/dist/constants/dropdown-menu.js +33 -1
  40. package/dist/constants/popover.js +2 -8
  41. package/dist/constants/select.d.ts +3 -1
  42. package/dist/constants/select.js +30 -1
  43. package/dist/motion/arc-tokens.d.ts +6 -0
  44. package/dist/motion/arc-tokens.js +6 -0
  45. package/dist/motion/glide-indicator.d.ts +6 -21
  46. package/dist/motion/glide-indicator.js +8 -17
  47. package/dist/motion/motion-slot.d.ts +6 -3
  48. package/dist/motion/motion-slot.js +100 -411
  49. package/dist/motion/presence.d.ts +8 -0
  50. package/dist/motion/presence.js +11 -1
  51. package/dist/motion/surface-keyframes.d.ts +2 -2
  52. package/dist/motion/surface-keyframes.js +40 -141
  53. package/dist/motion/tokens.d.ts +10 -114
  54. package/dist/motion/tokens.js +11 -116
  55. package/dist/styles.css +1 -1
  56. package/package.json +1 -1
  57. package/dist/motion/shared-layout-bg.d.ts +0 -16
  58. package/dist/motion/shared-layout-bg.js +0 -181
@@ -5,8 +5,13 @@ import { useState } from "react";
5
5
  import { AnimatePresence, motion, useIsPresent } from "motion/react";
6
6
  import { usePrefersReducedMotion } from "../hooks/use-prefers-reduced-motion.js";
7
7
  import { cn } from "../lib/utils.js";
8
- import { MOTION_CONTENT_DISTANCE, MOTION_EASE, MOTION_TIMING } from "../motion/tokens.js";
8
+ import { ARC_BLUR } from "../motion/arc-tokens.js";
9
+ import { MOTION_EASE, MOTION_EASE_STANDARD, MOTION_TIMING } from "../motion/tokens.js";
9
10
  import { jsx as _jsx } from "react/jsx-runtime";
11
+ /** Arc's swap: new content rises a third of a line out of a soft blur; old content leaves upward. */
12
+ const SWAP_RISE = "0.3em";
13
+ const SWAP_ENTER_BLUR = `blur(${ARC_BLUR.soft}px)`;
14
+ const SWAP_EXIT_BLUR = `blur(${ARC_BLUR.subtle}px)`;
10
15
  const PRESENCE_SWAP_ELEMENTS = {
11
16
  div: motion.div,
12
17
  span: motion.span
@@ -18,68 +23,75 @@ const PRESENCE_SWAP_ELEMENTS = {
18
23
  * @returns The animated state.
19
24
  */
20
25
  function PresenceSwapItem(t0) {
21
- const $ = _c(14);
26
+ const $ = _c(16);
22
27
  const { as, className, children } = t0;
23
28
  const MotionElement = PRESENCE_SWAP_ELEMENTS[as];
24
29
  const isPresent = useIsPresent();
25
30
  const [isMountedExiting] = useState(!isPresent);
26
31
  const shouldReduceMotion = usePrefersReducedMotion();
27
- const distance = shouldReduceMotion ? 0 : MOTION_CONTENT_DISTANCE;
32
+ const rise = shouldReduceMotion ? 0 : SWAP_RISE;
33
+ const enterBlur = shouldReduceMotion ? "blur(0px)" : SWAP_ENTER_BLUR;
34
+ const exitBlur = shouldReduceMotion ? "blur(0px)" : SWAP_EXIT_BLUR;
28
35
  if (isMountedExiting) {
29
36
  return null;
30
37
  }
31
38
  const t1 = isPresent ? undefined : true;
32
39
  const t2 = !isPresent || undefined;
33
40
  let t3;
34
- if ($[0] !== distance) {
41
+ if ($[0] !== enterBlur || $[1] !== rise) {
35
42
  t3 = {
36
43
  opacity: 0,
37
- y: distance
44
+ y: rise,
45
+ filter: enterBlur
38
46
  };
39
- $[0] = distance;
40
- $[1] = t3;
47
+ $[0] = enterBlur;
48
+ $[1] = rise;
49
+ $[2] = t3;
41
50
  } else {
42
- t3 = $[1];
51
+ t3 = $[2];
43
52
  }
44
53
  let t4;
45
- if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
54
+ if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
46
55
  t4 = {
47
56
  opacity: 1,
48
57
  y: 0,
58
+ filter: "blur(0px)",
49
59
  transition: {
50
60
  duration: MOTION_TIMING.enter,
51
61
  ease: MOTION_EASE
52
62
  }
53
63
  };
54
- $[2] = t4;
64
+ $[3] = t4;
55
65
  } else {
56
- t4 = $[2];
66
+ t4 = $[3];
57
67
  }
58
- const t5 = -distance;
68
+ const t5 = shouldReduceMotion ? 0 : `-${SWAP_RISE}`;
59
69
  let t6;
60
- if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
70
+ if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
61
71
  t6 = {
62
- duration: MOTION_TIMING.exit,
63
- ease: MOTION_EASE
72
+ duration: MOTION_TIMING.fast,
73
+ ease: MOTION_EASE_STANDARD
64
74
  };
65
- $[3] = t6;
75
+ $[4] = t6;
66
76
  } else {
67
- t6 = $[3];
77
+ t6 = $[4];
68
78
  }
69
79
  let t7;
70
- if ($[4] !== t5) {
80
+ if ($[5] !== exitBlur || $[6] !== t5) {
71
81
  t7 = {
72
82
  opacity: 0,
73
83
  y: t5,
84
+ filter: exitBlur,
74
85
  transition: t6
75
86
  };
76
- $[4] = t5;
77
- $[5] = t7;
87
+ $[5] = exitBlur;
88
+ $[6] = t5;
89
+ $[7] = t7;
78
90
  } else {
79
- t7 = $[5];
91
+ t7 = $[7];
80
92
  }
81
93
  let t8;
82
- if ($[6] !== MotionElement || $[7] !== children || $[8] !== className || $[9] !== t1 || $[10] !== t2 || $[11] !== t3 || $[12] !== t7) {
94
+ if ($[8] !== MotionElement || $[9] !== children || $[10] !== className || $[11] !== t1 || $[12] !== t2 || $[13] !== t3 || $[14] !== t7) {
83
95
  t8 = /* @__PURE__ */ _jsx(MotionElement, {
84
96
  "data-slot": "presence-swap",
85
97
  "aria-hidden": t1,
@@ -90,16 +102,16 @@ function PresenceSwapItem(t0) {
90
102
  exit: t7,
91
103
  children
92
104
  });
93
- $[6] = MotionElement;
94
- $[7] = children;
95
- $[8] = className;
96
- $[9] = t1;
97
- $[10] = t2;
98
- $[11] = t3;
99
- $[12] = t7;
100
- $[13] = t8;
105
+ $[8] = MotionElement;
106
+ $[9] = children;
107
+ $[10] = className;
108
+ $[11] = t1;
109
+ $[12] = t2;
110
+ $[13] = t3;
111
+ $[14] = t7;
112
+ $[15] = t8;
101
113
  } else {
102
- t8 = $[13];
114
+ t8 = $[15];
103
115
  }
104
116
  return t8;
105
117
  }
@@ -145,7 +157,7 @@ function usePresenceSwapKey(presenceKey) {
145
157
  return `${current.generation}:${presenceKey}`;
146
158
  }
147
159
  /**
148
- * Swaps keyed content with a short lift-and-fade; the first render is not animated.
160
+ * Swaps keyed content with Arc's swap (a short rise out of a blur); the first render is not animated.
149
161
  * @param props - Key identifying the current state and its content.
150
162
  * @returns The animated content.
151
163
  */
@@ -2,7 +2,7 @@
2
2
  import { c as _c } from "react/compiler-runtime";
3
3
  import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
4
4
  import { AnimatePresence, motion } from "motion/react";
5
- import { AVATAR_STATUS_HIDDEN_SCALE } from "../../constants/avatar.js";
5
+ import { AVATAR_IMAGE_REFERRER_POLICY, AVATAR_STATUS_HIDDEN_SCALE } from "../../constants/avatar.js";
6
6
  import { usePrefersReducedMotion } from "../../hooks/use-prefers-reduced-motion.js";
7
7
  import { cn } from "../../lib/utils.js";
8
8
  import { ARC_DURATION, ARC_SPRING_SNAPPY } from "../../motion/arc-tokens.js";
@@ -89,15 +89,12 @@ function AvatarRoot(t0) {
89
89
  }
90
90
  let t5;
91
91
  if ($[13] !== children || $[14] !== props || $[15] !== size || $[16] !== t2 || $[17] !== t4) {
92
- t5 = /* @__PURE__ */ _jsx(MotionSlot, {
93
- kind: "fade",
94
- children: /* @__PURE__ */ _jsxs(AvatarPrimitive.Root, {
95
- "data-slot": "avatar",
96
- "data-size": size,
97
- className: t2,
98
- ...props,
99
- children: [children, t4]
100
- })
92
+ t5 = /* @__PURE__ */ _jsxs(AvatarPrimitive.Root, {
93
+ "data-slot": "avatar",
94
+ "data-size": size,
95
+ className: t2,
96
+ ...props,
97
+ children: [children, t4]
101
98
  });
102
99
  $[13] = children;
103
100
  $[14] = props;
@@ -168,6 +165,7 @@ function AvatarImage(t0) {
168
165
  src: t5,
169
166
  loading: "lazy",
170
167
  decoding: "async",
168
+ referrerPolicy: AVATAR_IMAGE_REFERRER_POLICY,
171
169
  ...props
172
170
  })
173
171
  });
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Internal primitive of Arc's Dropdown menu (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): Arc's raised
3
- * panel, item rows, danger tone, separators, placement defaults and staggered item entrance on its tokens, with
4
- * beez-ui's reveal from the trigger edge and the highlight that glides between items with the keyboard. Internal: the
3
+ * panel, item rows, danger tone, separators, placement defaults and Arc's motion: the panel grows from the trigger
4
+ * edge, items rise in staggered, and the highlight glides for the pointer and jumps for the keyboard. Internal: the
5
5
  * Radix composition behind the public closed `DropdownMenu` and beez-ui's composite components; the package does not
6
6
  * export it.
7
7
  */
@@ -2,20 +2,23 @@
2
2
  import { c as _c } from "react/compiler-runtime";
3
3
  /**
4
4
  * Internal primitive of Arc's Dropdown menu (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): Arc's raised
5
- * panel, item rows, danger tone, separators, placement defaults and staggered item entrance on its tokens, with
6
- * beez-ui's reveal from the trigger edge and the highlight that glides between items with the keyboard. Internal: the
5
+ * panel, item rows, danger tone, separators, placement defaults and Arc's motion: the panel grows from the trigger
6
+ * edge, items rise in staggered, and the highlight glides for the pointer and jumps for the keyboard. Internal: the
7
7
  * Radix composition behind the public closed `DropdownMenu` and beez-ui's composite components; the package does not
8
8
  * export it.
9
9
  */
10
10
  import * as React from "react";
11
11
  import { DropdownMenu as DropdownMenuPrimitive } from "radix-ui";
12
- import { DROPDOWN_MENU_COLLISION_PADDING_PX, DROPDOWN_MENU_SIDE_OFFSET_PX } from "../../constants/dropdown-menu.js";
12
+ import { DROPDOWN_MENU_COLLISION_PADDING_PX, DROPDOWN_MENU_MOTION, DROPDOWN_MENU_SIDE_OFFSET_PX } from "../../constants/dropdown-menu.js";
13
13
  import { GlideSlot } from "../../motion/glide-slot.js";
14
+ import { ArcFloatingSlot } from "../../motion/arc-floating-slot.js";
14
15
  import { MotionSlot } from "../../motion/motion-slot.js";
15
16
  import { MotionPresence, MotionOpenProvider, useMotionOpenState } from "../../motion/presence.js";
16
17
  import { cn } from "../../lib/utils.js";
17
18
  import { CheckIcon } from "lucide-react";
18
19
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
+ /** Arc's menu always enters and leaves the same way. */
21
+ const resolveDropdownMenuMotion = () => DROPDOWN_MENU_MOTION;
19
22
  /**
20
23
  * Arc's menu panel on its tokens. It also sets the direction its items rise in from (`--menu-item-offset-*`, toward
21
24
  * the trigger).
@@ -162,8 +165,8 @@ function DropdownMenuContent(t0) {
162
165
  }
163
166
  let t8;
164
167
  if ($[12] !== align || $[13] !== collisionPadding || $[14] !== loop || $[15] !== props || $[16] !== sideOffset || $[17] !== stopClickAtPanel || $[18] !== t7) {
165
- t8 = /* @__PURE__ */ _jsx(MotionSlot, {
166
- kind: "surface",
168
+ t8 = /* @__PURE__ */ _jsx(ArcFloatingSlot, {
169
+ motion: resolveDropdownMenuMotion,
167
170
  children: /* @__PURE__ */ _jsx(GlideSlot, {
168
171
  preset: "menu",
169
172
  children: /* @__PURE__ */ _jsx(DropdownMenuPrimitive.Content, {
@@ -1,7 +1,8 @@
1
1
  /**
2
2
  * Internal primitive of Arc's Select (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): Arc's trigger, whose
3
3
  * hover, press and open states answer in color only so the anchored list never shifts, and its raised list with
4
- * option rows and an end check, on Arc's tokens, with beez-ui's option entrance, check pop and chevron rotation.
4
+ * option rows and an end check, on Arc's tokens and Arc's motion: the list grows from the trigger edge, the check
5
+ * of the chosen option sharpens in, and the chevron turns on the CSS spring.
5
6
  * Internal: the Radix composition behind the public closed `Select`; the package does not export it.
6
7
  */
7
8
  import * as React from "react";
@@ -3,19 +3,23 @@ import { c as _c } from "react/compiler-runtime";
3
3
  /**
4
4
  * Internal primitive of Arc's Select (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): Arc's trigger, whose
5
5
  * hover, press and open states answer in color only so the anchored list never shifts, and its raised list with
6
- * option rows and an end check, on Arc's tokens, with beez-ui's option entrance, check pop and chevron rotation.
6
+ * option rows and an end check, on Arc's tokens and Arc's motion: the list grows from the trigger edge, the check
7
+ * of the chosen option sharpens in, and the chevron turns on the CSS spring.
7
8
  * Internal: the Radix composition behind the public closed `Select`; the package does not export it.
8
9
  */
9
10
  import * as React from "react";
10
11
  import { Select as SelectPrimitive } from "radix-ui";
11
- import { SELECT_COLLISION_PADDING_PX } from "../../constants/select.js";
12
- import { GlideSlot } from "../../motion/glide-slot.js";
12
+ import { SELECT_COLLISION_PADDING_PX, SELECT_MOTION } from "../../constants/select.js";
13
+ import { ArcFloatingSlot } from "../../motion/arc-floating-slot.js";
13
14
  import { MotionSlot } from "../../motion/motion-slot.js";
15
+ import { MotionOpenProvider, useMotionOpen, useMotionOpenState } from "../../motion/presence.js";
14
16
  import { cn } from "../../lib/utils.js";
15
17
  import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from "lucide-react";
16
18
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
+ /** Arc's option list always enters and leaves the same way. */
20
+ const resolveSelectMotion = () => SELECT_MOTION;
17
21
  function Select(t0) {
18
- const $ = _c(4);
22
+ const $ = _c(9);
19
23
  let props;
20
24
  if ($[0] !== t0) {
21
25
  ({...props} = t0);
@@ -24,18 +28,36 @@ function Select(t0) {
24
28
  } else {
25
29
  props = $[1];
26
30
  }
31
+ const [motionOpen, setMotionOpen] = useMotionOpenState(props);
27
32
  let t1;
28
- if ($[2] !== props) {
33
+ if ($[2] !== motionOpen || $[3] !== props || $[4] !== setMotionOpen) {
29
34
  t1 = /* @__PURE__ */ _jsx(SelectPrimitive.Root, {
30
35
  "data-slot": "select",
31
- ...props
36
+ ...props,
37
+ open: motionOpen,
38
+ onOpenChange: setMotionOpen
32
39
  });
33
- $[2] = props;
34
- $[3] = t1;
40
+ $[2] = motionOpen;
41
+ $[3] = props;
42
+ $[4] = setMotionOpen;
43
+ $[5] = t1;
35
44
  } else {
36
- t1 = $[3];
45
+ t1 = $[5];
37
46
  }
38
- return t1;
47
+ let t2;
48
+ if ($[6] !== motionOpen || $[7] !== t1) {
49
+ t2 = /* @__PURE__ */ _jsx(MotionOpenProvider, {
50
+ scope: "select",
51
+ open: motionOpen,
52
+ children: t1
53
+ });
54
+ $[6] = motionOpen;
55
+ $[7] = t1;
56
+ $[8] = t2;
57
+ } else {
58
+ t2 = $[8];
59
+ }
60
+ return t2;
39
61
  }
40
62
  function SelectValue(t0) {
41
63
  const $ = _c(4);
@@ -99,13 +121,10 @@ function SelectTrigger(t0) {
99
121
  if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
100
122
  t3 = /* @__PURE__ */ _jsx(SelectPrimitive.Icon, {
101
123
  asChild: true,
102
- children: /* @__PURE__ */ _jsx(MotionSlot, {
103
- kind: "rotate",
104
- children: /* @__PURE__ */ _jsx(ChevronDownIcon, {
105
- "data-slot": "select-icon",
106
- strokeWidth: 1.75,
107
- className: "pointer-events-none size-4 text-text-muted"
108
- })
124
+ children: /* @__PURE__ */ _jsx(ChevronDownIcon, {
125
+ "data-slot": "select-icon",
126
+ strokeWidth: 1.75,
127
+ className: "pointer-events-none size-4 text-text-muted transition-[rotate] duration-(--duration-spring) ease-(--ease-spring) motion-reduce:transition-none"
109
128
  })
110
129
  });
111
130
  $[7] = t3;
@@ -114,15 +133,12 @@ function SelectTrigger(t0) {
114
133
  }
115
134
  let t4;
116
135
  if ($[8] !== children || $[9] !== props || $[10] !== size || $[11] !== t2) {
117
- t4 = /* @__PURE__ */ _jsx(MotionSlot, {
118
- kind: "field",
119
- children: /* @__PURE__ */ _jsxs(SelectPrimitive.Trigger, {
120
- "data-slot": "select-trigger",
121
- "data-size": size,
122
- className: t2,
123
- ...props,
124
- children: [children, t3]
125
- })
136
+ t4 = /* @__PURE__ */ _jsxs(SelectPrimitive.Trigger, {
137
+ "data-slot": "select-trigger",
138
+ "data-size": size,
139
+ className: t2,
140
+ ...props,
141
+ children: [children, t3]
126
142
  });
127
143
  $[8] = children;
128
144
  $[9] = props;
@@ -142,7 +158,7 @@ function SelectTrigger(t0) {
142
158
  * @returns The styled primitive with its original interaction contract.
143
159
  */
144
160
  function SelectContent(t0) {
145
- const $ = _c(23);
161
+ const $ = _c(26);
146
162
  let children;
147
163
  let className;
148
164
  let props;
@@ -169,78 +185,86 @@ function SelectContent(t0) {
169
185
  const position = t1 === undefined ? "item-aligned" : t1;
170
186
  const align = t2 === undefined ? "center" : t2;
171
187
  const collisionPadding = t3 === undefined ? SELECT_COLLISION_PADDING_PX : t3;
172
- const t4 = position === "item-aligned";
173
- const t5 = position === "popper" && "w-(--radix-select-trigger-width) max-w-[min(24rem,calc(100vw-20px))] data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";
174
- let t6;
175
- if ($[7] !== className || $[8] !== t5) {
176
- t6 = cn("relative z-50 max-h-[min(20rem,var(--radix-select-content-available-height))] min-w-48 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[calc(var(--radius-control)+2px)] border border-border bg-surface-raised p-1.5 text-foreground shadow-(--shadow-floating)", t5, className);
188
+ const open = useMotionOpen("select");
189
+ const t4 = open ? "open" : "closed";
190
+ const t5 = position === "item-aligned";
191
+ const t6 = position === "popper" && "w-(--radix-select-trigger-width) max-w-[min(24rem,calc(100vw-20px))] data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";
192
+ let t7;
193
+ if ($[7] !== className || $[8] !== t6) {
194
+ t7 = cn("relative z-50 max-h-[min(20rem,var(--radix-select-content-available-height))] min-w-48 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-[calc(var(--radius-control)+2px)] border border-border bg-surface-raised p-1.5 text-foreground shadow-(--shadow-floating)", t6, className);
177
195
  $[7] = className;
178
- $[8] = t5;
179
- $[9] = t6;
196
+ $[8] = t6;
197
+ $[9] = t7;
180
198
  } else {
181
- t6 = $[9];
199
+ t7 = $[9];
182
200
  }
183
- let t7;
201
+ let t8;
184
202
  if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
185
- t7 = /* @__PURE__ */ _jsx(SelectScrollUpButton, {});
186
- $[10] = t7;
203
+ t8 = /* @__PURE__ */ _jsx(SelectScrollUpButton, {});
204
+ $[10] = t8;
187
205
  } else {
188
- t7 = $[10];
206
+ t8 = $[10];
189
207
  }
190
- let t8;
208
+ let t9;
191
209
  if ($[11] !== children || $[12] !== position) {
192
- t8 = /* @__PURE__ */ _jsx(SelectPrimitive.Viewport, {
210
+ t9 = /* @__PURE__ */ _jsx(SelectPrimitive.Viewport, {
193
211
  "data-position": position,
194
212
  className: "py-0.5 data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full",
195
213
  children
196
214
  });
197
215
  $[11] = children;
198
216
  $[12] = position;
199
- $[13] = t8;
217
+ $[13] = t9;
200
218
  } else {
201
- t8 = $[13];
219
+ t9 = $[13];
202
220
  }
203
- let t9;
221
+ let t10;
204
222
  if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
205
- t9 = /* @__PURE__ */ _jsx(SelectScrollDownButton, {});
206
- $[14] = t9;
223
+ t10 = /* @__PURE__ */ _jsx(SelectScrollDownButton, {});
224
+ $[14] = t10;
207
225
  } else {
208
- t9 = $[14];
226
+ t10 = $[14];
209
227
  }
210
- let t10;
211
- if ($[15] !== align || $[16] !== collisionPadding || $[17] !== position || $[18] !== props || $[19] !== t4 || $[20] !== t6 || $[21] !== t8) {
212
- t10 = /* @__PURE__ */ _jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ _jsx(MotionSlot, {
213
- kind: "surface",
214
- children: /* @__PURE__ */ _jsx(GlideSlot, {
215
- preset: "menu",
216
- children: /* @__PURE__ */ _jsxs(SelectPrimitive.Content, {
217
- "data-slot": "select-content",
218
- "data-align-trigger": t4,
219
- className: t6,
220
- position,
221
- align,
222
- collisionPadding,
223
- ...props,
224
- children: [
225
- t7,
226
- t8,
227
- t9
228
- ]
229
- })
230
- })
231
- }) });
228
+ let t11;
229
+ if ($[15] !== align || $[16] !== collisionPadding || $[17] !== position || $[18] !== props || $[19] !== t5 || $[20] !== t7 || $[21] !== t9) {
230
+ t11 = /* @__PURE__ */ _jsxs(SelectPrimitive.Content, {
231
+ "data-slot": "select-content",
232
+ "data-align-trigger": t5,
233
+ className: t7,
234
+ position,
235
+ align,
236
+ collisionPadding,
237
+ ...props,
238
+ children: [
239
+ t8,
240
+ t9,
241
+ t10
242
+ ]
243
+ });
232
244
  $[15] = align;
233
245
  $[16] = collisionPadding;
234
246
  $[17] = position;
235
247
  $[18] = props;
236
- $[19] = t4;
237
- $[20] = t6;
238
- $[21] = t8;
239
- $[22] = t10;
248
+ $[19] = t5;
249
+ $[20] = t7;
250
+ $[21] = t9;
251
+ $[22] = t11;
240
252
  } else {
241
- t10 = $[22];
253
+ t11 = $[22];
242
254
  }
243
- return t10;
255
+ let t12;
256
+ if ($[23] !== t11 || $[24] !== t4) {
257
+ t12 = /* @__PURE__ */ _jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ _jsx(ArcFloatingSlot, {
258
+ motion: resolveSelectMotion,
259
+ children: t11
260
+ }, t4) });
261
+ $[23] = t11;
262
+ $[24] = t4;
263
+ $[25] = t12;
264
+ } else {
265
+ t12 = $[25];
266
+ }
267
+ return t12;
244
268
  }
245
269
  /**
246
270
  * Renders Arc's option row: 36px tall, a muted fill when highlighted and the check of the chosen option at the end,
@@ -298,14 +322,11 @@ function SelectItem(t0) {
298
322
  }
299
323
  let t4;
300
324
  if ($[9] !== props || $[10] !== t1 || $[11] !== t3) {
301
- t4 = /* @__PURE__ */ _jsx(MotionSlot, {
302
- kind: "list-item",
303
- children: /* @__PURE__ */ _jsxs(SelectPrimitive.Item, {
304
- "data-slot": "select-item",
305
- className: t1,
306
- ...props,
307
- children: [t2, t3]
308
- })
325
+ t4 = /* @__PURE__ */ _jsxs(SelectPrimitive.Item, {
326
+ "data-slot": "select-item",
327
+ className: t1,
328
+ ...props,
329
+ children: [t2, t3]
309
330
  });
310
331
  $[9] = props;
311
332
  $[10] = t1;
@@ -1,8 +1,8 @@
1
1
  /**
2
- * Toggle for likes and similar reactions: the icon pops when the viewer reacts and the counter
3
- * rolls in the direction of the change. The (optimistic) reaction state is owned by the caller.
2
+ * Toggle for likes and similar reactions: the icon gets Arc's kick (https://uiarc.dev, MIT License, see
3
+ * THIRD_PARTY_NOTICES.md) when the viewer reacts and the counter rolls in the direction of the change. The (optimistic) reaction state is owned by the caller.
4
4
  */
5
- import type { ComponentType, MouseEvent, SVGProps } from "react";
5
+ import { type ComponentType, type MouseEvent, type SVGProps } from "react";
6
6
  export interface ReactionButtonProps {
7
7
  /** Accessible name, including the current count (for example "Me gusta 3"). */
8
8
  ariaLabel: string;
@@ -22,9 +22,8 @@ export interface ReactionButtonProps {
22
22
  className?: string;
23
23
  }
24
24
  /**
25
- * Renders an outline toggle button exposing its state with `aria-pressed`. The icon starts at
26
- * rest (`initial={false}`), so server-rendered and already-active reactions never pop on load;
27
- * only a change to active does, and not at all with reduced motion.
25
+ * Renders an outline toggle button exposing its state with `aria-pressed`. Server-rendered and already-active
26
+ * reactions never kick on load; only a change to active does, and not at all with reduced motion.
28
27
  * @param props - Accessible name, state, count, click handler and optional icon.
29
28
  * @returns The reaction button.
30
29
  */