beez-ui 2.7.1 → 3.0.1

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 (110) hide show
  1. package/CHANGELOG.md +78 -0
  2. package/README.md +43 -13
  3. package/THIRD_PARTY_NOTICES.md +1 -1
  4. package/dist/components/account-menu.d.ts +4 -3
  5. package/dist/components/account-menu.js +63 -54
  6. package/dist/components/alert.d.ts +15 -15
  7. package/dist/components/alert.js +289 -270
  8. package/dist/components/animated-theme-toggler.js +1 -1
  9. package/dist/components/avatar.d.ts +56 -31
  10. package/dist/components/avatar.js +394 -277
  11. package/dist/components/badge.d.ts +8 -28
  12. package/dist/components/badge.js +55 -108
  13. package/dist/components/calendar.d.ts +36 -26
  14. package/dist/components/calendar.js +132 -1227
  15. package/dist/components/card.d.ts +36 -25
  16. package/dist/components/card.js +895 -72
  17. package/dist/components/carousel.d.ts +63 -47
  18. package/dist/components/carousel.js +496 -777
  19. package/dist/components/data-table.d.ts +5 -4
  20. package/dist/components/data-table.js +7 -6
  21. package/dist/components/dialog-surface.d.ts +23 -1
  22. package/dist/components/dialog-surface.js +99 -3
  23. package/dist/components/dialog.d.ts +80 -45
  24. package/dist/components/dialog.js +258 -503
  25. package/dist/components/dropdown-menu.d.ts +56 -73
  26. package/dist/components/dropdown-menu.js +79 -714
  27. package/dist/components/field.d.ts +3 -1
  28. package/dist/components/field.js +49 -39
  29. package/dist/components/filter-presets-bar.js +2 -2
  30. package/dist/components/filter-query-bar.js +1 -1
  31. package/dist/components/hover-card.d.ts +42 -41
  32. package/dist/components/hover-card.js +57 -483
  33. package/dist/components/pagination.d.ts +53 -31
  34. package/dist/components/pagination.js +176 -412
  35. package/dist/components/popover.d.ts +11 -23
  36. package/dist/components/popover.js +19 -304
  37. package/dist/components/{alert-dialog.d.ts → primitives/alert-dialog.d.ts} +17 -5
  38. package/dist/components/{alert-dialog.js → primitives/alert-dialog.js} +102 -54
  39. package/dist/components/primitives/avatar.d.ts +46 -0
  40. package/dist/components/primitives/avatar.js +268 -0
  41. package/dist/components/primitives/calendar.d.ts +37 -0
  42. package/dist/components/primitives/calendar.js +1250 -0
  43. package/dist/components/primitives/carousel.d.ts +106 -0
  44. package/dist/components/primitives/carousel.js +928 -0
  45. package/dist/components/primitives/dialog.d.ts +62 -0
  46. package/dist/components/primitives/dialog.js +490 -0
  47. package/dist/components/primitives/dropdown-menu-items.d.ts +59 -0
  48. package/dist/components/primitives/dropdown-menu-items.js +265 -0
  49. package/dist/components/primitives/dropdown-menu.d.ts +64 -0
  50. package/dist/components/primitives/dropdown-menu.js +557 -0
  51. package/dist/components/primitives/hover-card.d.ts +50 -0
  52. package/dist/components/primitives/hover-card.js +507 -0
  53. package/dist/components/primitives/pagination.d.ts +65 -0
  54. package/dist/components/primitives/pagination.js +373 -0
  55. package/dist/components/primitives/popover.d.ts +22 -0
  56. package/dist/components/primitives/popover.js +213 -0
  57. package/dist/components/primitives/select.d.ts +36 -0
  58. package/dist/components/primitives/select.js +407 -0
  59. package/dist/components/primitives/tooltip.d.ts +30 -0
  60. package/dist/components/primitives/tooltip.js +277 -0
  61. package/dist/components/radio-group.d.ts +30 -17
  62. package/dist/components/radio-group.js +266 -315
  63. package/dist/components/rich-link-editor.js +1 -1
  64. package/dist/components/select.d.ts +51 -42
  65. package/dist/components/select.js +163 -495
  66. package/dist/components/skeleton.d.ts +16 -15
  67. package/dist/components/skeleton.js +99 -205
  68. package/dist/components/split-button.js +1 -1
  69. package/dist/components/switch.d.ts +3 -6
  70. package/dist/components/switch.js +163 -170
  71. package/dist/components/tabs.d.ts +3 -11
  72. package/dist/components/tabs.js +61 -75
  73. package/dist/components/themed-toaster.d.ts +1 -1
  74. package/dist/components/themed-toaster.js +1 -1
  75. package/dist/components/toaster.d.ts +1 -1
  76. package/dist/components/toaster.js +1 -1
  77. package/dist/components/tooltip.d.ts +36 -31
  78. package/dist/components/tooltip.js +44 -284
  79. package/dist/constants/alert.d.ts +5 -1
  80. package/dist/constants/alert.js +5 -1
  81. package/dist/constants/avatar.d.ts +29 -1
  82. package/dist/constants/avatar.js +25 -0
  83. package/dist/constants/calendar.d.ts +12 -0
  84. package/dist/constants/calendar.js +12 -0
  85. package/dist/constants/card.d.ts +23 -0
  86. package/dist/constants/card.js +20 -0
  87. package/dist/constants/carousel.d.ts +31 -13
  88. package/dist/constants/carousel.js +32 -11
  89. package/dist/constants/dialog.d.ts +6 -1
  90. package/dist/constants/dialog.js +5 -1
  91. package/dist/constants/dropdown-menu.d.ts +2 -2
  92. package/dist/constants/dropdown-menu.js +2 -2
  93. package/dist/constants/pagination.d.ts +13 -2
  94. package/dist/constants/pagination.js +13 -2
  95. package/dist/constants/select.d.ts +4 -2
  96. package/dist/constants/select.js +4 -2
  97. package/dist/constants/switch.d.ts +5 -16
  98. package/dist/constants/switch.js +6 -14
  99. package/dist/hooks/use-today.d.ts +7 -0
  100. package/dist/hooks/use-today.js +50 -0
  101. package/dist/hooks.d.ts +1 -0
  102. package/dist/hooks.js +1 -0
  103. package/dist/index.d.ts +0 -1
  104. package/dist/index.js +0 -1
  105. package/dist/motion/glide-indicator.d.ts +1 -1
  106. package/dist/motion/glide-indicator.js +1 -1
  107. package/dist/motion/presence.d.ts +0 -1
  108. package/dist/motion/presence.js +0 -1
  109. package/dist/styles.css +1 -1
  110. package/package.json +1 -6
@@ -0,0 +1,373 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ import { cva } from "class-variance-authority";
4
+ import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
5
+ import { usePrefersReducedMotion } from "../../hooks/use-prefers-reduced-motion.js";
6
+ import { cn } from "../../lib/utils.js";
7
+ import { useArcPress } from "../../motion/arc-press.js";
8
+ import { GlideSlot } from "../../motion/glide-slot.js";
9
+ import { useAttachedElement } from "../../motion/use-attached-element.js";
10
+ import { Link } from "../link.js";
11
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
12
+ /**
13
+ * Landmark that holds the page controls.
14
+ * @param props - Native `nav` attributes; the caller names it with `aria-label`.
15
+ * @returns The navigation landmark.
16
+ */
17
+ function PaginationRoot(t0) {
18
+ const $ = _c(8);
19
+ let className;
20
+ let props;
21
+ if ($[0] !== t0) {
22
+ ({className, ...props} = t0);
23
+ $[0] = t0;
24
+ $[1] = className;
25
+ $[2] = props;
26
+ } else {
27
+ className = $[1];
28
+ props = $[2];
29
+ }
30
+ let t1;
31
+ if ($[3] !== className) {
32
+ t1 = cn("mx-auto flex w-full justify-center", className);
33
+ $[3] = className;
34
+ $[4] = t1;
35
+ } else {
36
+ t1 = $[4];
37
+ }
38
+ let t2;
39
+ if ($[5] !== props || $[6] !== t1) {
40
+ t2 = /* @__PURE__ */ _jsx("nav", {
41
+ "data-slot": "pagination",
42
+ className: t1,
43
+ ...props
44
+ });
45
+ $[5] = props;
46
+ $[6] = t1;
47
+ $[7] = t2;
48
+ } else {
49
+ t2 = $[7];
50
+ }
51
+ return t2;
52
+ }
53
+ /** Lists page controls; the current page's mark glides to the newly selected page. */
54
+ function PaginationContent(t0) {
55
+ const $ = _c(8);
56
+ let className;
57
+ let props;
58
+ if ($[0] !== t0) {
59
+ ({className, ...props} = t0);
60
+ $[0] = t0;
61
+ $[1] = className;
62
+ $[2] = props;
63
+ } else {
64
+ className = $[1];
65
+ props = $[2];
66
+ }
67
+ let t1;
68
+ if ($[3] !== className) {
69
+ t1 = cn("flex flex-wrap items-center gap-(--space-1)", className);
70
+ $[3] = className;
71
+ $[4] = t1;
72
+ } else {
73
+ t1 = $[4];
74
+ }
75
+ let t2;
76
+ if ($[5] !== props || $[6] !== t1) {
77
+ t2 = /* @__PURE__ */ _jsx(GlideSlot, {
78
+ preset: "pagination",
79
+ children: /* @__PURE__ */ _jsx("ul", {
80
+ "data-slot": "pagination-content",
81
+ className: t1,
82
+ ...props
83
+ })
84
+ });
85
+ $[5] = props;
86
+ $[6] = t1;
87
+ $[7] = t2;
88
+ } else {
89
+ t2 = $[7];
90
+ }
91
+ return t2;
92
+ }
93
+ function PaginationItem(t0) {
94
+ const $ = _c(4);
95
+ let props;
96
+ if ($[0] !== t0) {
97
+ ({...props} = t0);
98
+ $[0] = t0;
99
+ $[1] = props;
100
+ } else {
101
+ props = $[1];
102
+ }
103
+ let t1;
104
+ if ($[2] !== props) {
105
+ t1 = /* @__PURE__ */ _jsx("li", {
106
+ "data-slot": "pagination-item",
107
+ ...props
108
+ });
109
+ $[2] = props;
110
+ $[3] = t1;
111
+ } else {
112
+ t1 = $[3];
113
+ }
114
+ return t1;
115
+ }
116
+ /**
117
+ * Arc's page control: a control-height square for numbers, padded for labelled arrows. The current page draws the
118
+ * raised mark (border, surface and resting shadow) that the glide copies while it travels.
119
+ */
120
+ const paginationControlVariants = cva("relative inline-flex h-(--control-height-sm) min-w-(--control-height-sm) shrink-0 cursor-pointer items-center justify-center gap-1 rounded-(--radius-control) border border-transparent bg-transparent font-sans text-xs font-medium whitespace-nowrap text-text-secondary tabular-nums no-underline [-webkit-tap-highlight-color:transparent] transition-[color,background-color,border-color,box-shadow,opacity] duration-(--duration-fast) ease-(--ease-standard) select-none motion-reduce:transition-none hover-fine:bg-surface-muted hover-fine:text-foreground aria-[current=page]:border-border aria-[current=page]:bg-surface aria-[current=page]:text-foreground aria-[current=page]:shadow-(--shadow-resting) aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
121
+ variants: { size: {
122
+ page: "px-0",
123
+ step: "px-(--space-3)"
124
+ } },
125
+ defaultVariants: { size: "page" }
126
+ });
127
+ /**
128
+ * Builds the attributes common to every control.
129
+ * @param state - Whether the control is current or disabled, and its size.
130
+ * @param className - Consumer classes.
131
+ * @returns Attributes for the link or the button.
132
+ */
133
+ function controlAttributes({ isActive, disabled, size = "page" }, className) {
134
+ return {
135
+ "aria-current": isActive ? "page" : undefined,
136
+ "aria-disabled": disabled ? true : undefined,
137
+ "data-slot": "pagination-link",
138
+ "data-active": isActive,
139
+ "data-size": size,
140
+ className: cn(paginationControlVariants({ size }), className)
141
+ };
142
+ }
143
+ /**
144
+ * Wraps a click handler so a disabled control cancels the click before the native anchor, the router adapter (both
145
+ * skip prevented clicks) or the consumer acts on it.
146
+ * @param disabled - Whether the control is disabled.
147
+ * @param onClick - Consumer click handler.
148
+ * @returns The guarded handler.
149
+ */
150
+ function guardDisabledClick(disabled, onClick) {
151
+ return (event) => {
152
+ if (disabled) {
153
+ event.preventDefault();
154
+ return;
155
+ }
156
+ onClick?.(event);
157
+ };
158
+ }
159
+ /**
160
+ * One page, rendered through the provider's `Link` adapter or the `component` passed to it. Disabled, it never
161
+ * navigates, whether clicked or activated with Enter, and `onClick` is not called.
162
+ * @param props - Control state and link props.
163
+ * @returns The page link.
164
+ */
165
+ function PaginationLink(t0) {
166
+ const $ = _c(19);
167
+ let className;
168
+ let disabled;
169
+ let isActive;
170
+ let onClick;
171
+ let props;
172
+ let size;
173
+ if ($[0] !== t0) {
174
+ ({className, isActive, disabled, size, onClick, ...props} = t0);
175
+ $[0] = t0;
176
+ $[1] = className;
177
+ $[2] = disabled;
178
+ $[3] = isActive;
179
+ $[4] = onClick;
180
+ $[5] = props;
181
+ $[6] = size;
182
+ } else {
183
+ className = $[1];
184
+ disabled = $[2];
185
+ isActive = $[3];
186
+ onClick = $[4];
187
+ props = $[5];
188
+ size = $[6];
189
+ }
190
+ let t1;
191
+ if ($[7] !== className || $[8] !== disabled || $[9] !== isActive || $[10] !== size) {
192
+ t1 = controlAttributes({
193
+ isActive,
194
+ disabled,
195
+ size
196
+ }, className);
197
+ $[7] = className;
198
+ $[8] = disabled;
199
+ $[9] = isActive;
200
+ $[10] = size;
201
+ $[11] = t1;
202
+ } else {
203
+ t1 = $[11];
204
+ }
205
+ let t2;
206
+ if ($[12] !== disabled || $[13] !== onClick) {
207
+ t2 = guardDisabledClick(disabled, onClick);
208
+ $[12] = disabled;
209
+ $[13] = onClick;
210
+ $[14] = t2;
211
+ } else {
212
+ t2 = $[14];
213
+ }
214
+ let t3;
215
+ if ($[15] !== props || $[16] !== t1 || $[17] !== t2) {
216
+ t3 = /* @__PURE__ */ _jsx(Link, {
217
+ ...t1,
218
+ ...props,
219
+ onClick: t2
220
+ });
221
+ $[15] = props;
222
+ $[16] = t1;
223
+ $[17] = t2;
224
+ $[18] = t3;
225
+ } else {
226
+ t3 = $[18];
227
+ }
228
+ return t3;
229
+ }
230
+ /**
231
+ * One page as a button, for pagination kept in state. Disabled, it stays focusable and `onClick` is not called.
232
+ * @param props - Control state and button props.
233
+ * @returns The page button.
234
+ */
235
+ function PaginationButton(t0) {
236
+ const $ = _c(21);
237
+ let className;
238
+ let disabled;
239
+ let isActive;
240
+ let onClick;
241
+ let props;
242
+ let size;
243
+ let t1;
244
+ if ($[0] !== t0) {
245
+ ({className, isActive, disabled, size, onClick, type: t1, ...props} = t0);
246
+ $[0] = t0;
247
+ $[1] = className;
248
+ $[2] = disabled;
249
+ $[3] = isActive;
250
+ $[4] = onClick;
251
+ $[5] = props;
252
+ $[6] = size;
253
+ $[7] = t1;
254
+ } else {
255
+ className = $[1];
256
+ disabled = $[2];
257
+ isActive = $[3];
258
+ onClick = $[4];
259
+ props = $[5];
260
+ size = $[6];
261
+ t1 = $[7];
262
+ }
263
+ const type = t1 === undefined ? "button" : t1;
264
+ let t2;
265
+ if ($[8] !== className || $[9] !== disabled || $[10] !== isActive || $[11] !== size) {
266
+ t2 = controlAttributes({
267
+ isActive,
268
+ disabled,
269
+ size
270
+ }, className);
271
+ $[8] = className;
272
+ $[9] = disabled;
273
+ $[10] = isActive;
274
+ $[11] = size;
275
+ $[12] = t2;
276
+ } else {
277
+ t2 = $[12];
278
+ }
279
+ let t3;
280
+ if ($[13] !== disabled || $[14] !== onClick) {
281
+ t3 = guardDisabledClick(disabled, onClick);
282
+ $[13] = disabled;
283
+ $[14] = onClick;
284
+ $[15] = t3;
285
+ } else {
286
+ t3 = $[15];
287
+ }
288
+ let t4;
289
+ if ($[16] !== props || $[17] !== t2 || $[18] !== t3 || $[19] !== type) {
290
+ t4 = /* @__PURE__ */ _jsx("button", {
291
+ type,
292
+ ...t2,
293
+ ...props,
294
+ onClick: t3
295
+ });
296
+ $[16] = props;
297
+ $[17] = t2;
298
+ $[18] = t3;
299
+ $[19] = type;
300
+ $[20] = t4;
301
+ } else {
302
+ t4 = $[20];
303
+ }
304
+ return t4;
305
+ }
306
+ /**
307
+ * A previous or next arrow: Arc presses it in, while page numbers stay still and let the mark travel.
308
+ * @param props - Direction, copy, destination and state.
309
+ * @returns The arrow link or button.
310
+ */
311
+ function PaginationStep(t0) {
312
+ const $ = _c(11);
313
+ const { direction, text, label, href, disabled, onClick } = t0;
314
+ const reduceMotion = usePrefersReducedMotion();
315
+ const [element, attach] = useAttachedElement(undefined);
316
+ useArcPress(element, !reduceMotion);
317
+ let t1;
318
+ if ($[0] !== direction || $[1] !== text) {
319
+ t1 = direction === "previous" ? /* @__PURE__ */ _jsxs(_Fragment, { children: [/* @__PURE__ */ _jsx(ChevronLeftIcon, {
320
+ "data-icon": "inline-start",
321
+ "aria-hidden": "true"
322
+ }), /* @__PURE__ */ _jsx("span", {
323
+ className: "hidden sm:block",
324
+ children: text
325
+ })] }) : /* @__PURE__ */ _jsxs(_Fragment, { children: [/* @__PURE__ */ _jsx("span", {
326
+ className: "hidden sm:block",
327
+ children: text
328
+ }), /* @__PURE__ */ _jsx(ChevronRightIcon, {
329
+ "data-icon": "inline-end",
330
+ "aria-hidden": "true"
331
+ })] });
332
+ $[0] = direction;
333
+ $[1] = text;
334
+ $[2] = t1;
335
+ } else {
336
+ t1 = $[2];
337
+ }
338
+ const content = t1;
339
+ const className = direction === "previous" ? "pl-(--space-2)" : "pr-(--space-2)";
340
+ let t2;
341
+ if ($[3] !== attach || $[4] !== className || $[5] !== content || $[6] !== disabled || $[7] !== href || $[8] !== label || $[9] !== onClick) {
342
+ t2 = href === undefined ? /* @__PURE__ */ _jsx(PaginationButton, {
343
+ ref: attach,
344
+ size: "step",
345
+ "aria-label": label,
346
+ className,
347
+ disabled,
348
+ onClick,
349
+ children: content
350
+ }) : /* @__PURE__ */ _jsx(PaginationLink, {
351
+ ref: attach,
352
+ size: "step",
353
+ href,
354
+ "aria-label": label,
355
+ className,
356
+ disabled,
357
+ onClick,
358
+ children: content
359
+ });
360
+ $[3] = attach;
361
+ $[4] = className;
362
+ $[5] = content;
363
+ $[6] = disabled;
364
+ $[7] = href;
365
+ $[8] = label;
366
+ $[9] = onClick;
367
+ $[10] = t2;
368
+ } else {
369
+ t2 = $[10];
370
+ }
371
+ return t2;
372
+ }
373
+ export { PaginationButton, PaginationContent, PaginationItem, PaginationLink, PaginationRoot, PaginationStep };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Internal primitive of Arc's Popover (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): a raised panel with
3
+ * Arc's panel radius and floating shadow that starts a few pixels toward its trigger and settles on a spring, leaving
4
+ * faster than it arrives. Internal: the Radix composition, including `PopoverAnchor`, behind the public `Popover` and
5
+ * beez-ui's composite components; the package does not export it.
6
+ */
7
+ import * as React from "react";
8
+ import { Popover as PopoverPrimitive } from "radix-ui";
9
+ declare function Popover({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Root>): React.JSX.Element;
10
+ declare function PopoverTrigger({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Trigger>): React.JSX.Element;
11
+ /** Closes the popover that contains it, such as a "Listo" or "Cancelar" button inside the panel. */
12
+ declare function PopoverClose({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Close>): React.JSX.Element;
13
+ /**
14
+ * Renders Arc's panel: raised surface, hairline border, panel radius and floating shadow, kept inside the viewport.
15
+ * Content taller than the room left on the placed side scrolls inside the panel instead of running off screen.
16
+ * @param props - Radix content properties. `align` defaults to `center`, `sideOffset` to 6px and `collisionPadding`
17
+ * to 10px.
18
+ * @returns The portaled panel.
19
+ */
20
+ declare function PopoverContent({ className, align, sideOffset, collisionPadding, ...props }: React.ComponentProps<typeof PopoverPrimitive.Content>): React.JSX.Element;
21
+ declare function PopoverAnchor({ ...props }: React.ComponentProps<typeof PopoverPrimitive.Anchor>): React.JSX.Element;
22
+ export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };
@@ -0,0 +1,213 @@
1
+ "use client";
2
+ import { c as _c } from "react/compiler-runtime";
3
+ /**
4
+ * Internal primitive of Arc's Popover (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): a raised panel with
5
+ * Arc's panel radius and floating shadow that starts a few pixels toward its trigger and settles on a spring, leaving
6
+ * faster than it arrives. Internal: the Radix composition, including `PopoverAnchor`, behind the public `Popover` and
7
+ * beez-ui's composite components; the package does not export it.
8
+ */
9
+ import * as React from "react";
10
+ import { Popover as PopoverPrimitive } from "radix-ui";
11
+ import { ArcFloatingSlot } from "../../motion/arc-floating-slot.js";
12
+ import { MotionPresence, MotionOpenProvider, useMotionOpenState } from "../../motion/presence.js";
13
+ import { cn } from "../../lib/utils.js";
14
+ import { POPOVER_COLLISION_PADDING_PX, POPOVER_MOTION, POPOVER_SIDE_OFFSET_PX } from "../../constants/popover.js";
15
+ import { jsx as _jsx } from "react/jsx-runtime";
16
+ function Popover(t0) {
17
+ const $ = _c(9);
18
+ let props;
19
+ if ($[0] !== t0) {
20
+ ({...props} = t0);
21
+ $[0] = t0;
22
+ $[1] = props;
23
+ } else {
24
+ props = $[1];
25
+ }
26
+ const [motionOpen, setMotionOpen] = useMotionOpenState(props);
27
+ let t1;
28
+ if ($[2] !== motionOpen || $[3] !== props || $[4] !== setMotionOpen) {
29
+ t1 = /* @__PURE__ */ _jsx(PopoverPrimitive.Root, {
30
+ "data-slot": "popover",
31
+ ...props,
32
+ open: motionOpen,
33
+ onOpenChange: setMotionOpen
34
+ });
35
+ $[2] = motionOpen;
36
+ $[3] = props;
37
+ $[4] = setMotionOpen;
38
+ $[5] = t1;
39
+ } else {
40
+ t1 = $[5];
41
+ }
42
+ let t2;
43
+ if ($[6] !== motionOpen || $[7] !== t1) {
44
+ t2 = /* @__PURE__ */ _jsx(MotionOpenProvider, {
45
+ scope: "popover",
46
+ open: motionOpen,
47
+ children: t1
48
+ });
49
+ $[6] = motionOpen;
50
+ $[7] = t1;
51
+ $[8] = t2;
52
+ } else {
53
+ t2 = $[8];
54
+ }
55
+ return t2;
56
+ }
57
+ function PopoverTrigger(t0) {
58
+ const $ = _c(4);
59
+ let props;
60
+ if ($[0] !== t0) {
61
+ ({...props} = t0);
62
+ $[0] = t0;
63
+ $[1] = props;
64
+ } else {
65
+ props = $[1];
66
+ }
67
+ let t1;
68
+ if ($[2] !== props) {
69
+ t1 = /* @__PURE__ */ _jsx(PopoverPrimitive.Trigger, {
70
+ "data-slot": "popover-trigger",
71
+ ...props
72
+ });
73
+ $[2] = props;
74
+ $[3] = t1;
75
+ } else {
76
+ t1 = $[3];
77
+ }
78
+ return t1;
79
+ }
80
+ /** Closes the popover that contains it, such as a "Listo" or "Cancelar" button inside the panel. */
81
+ function PopoverClose(t0) {
82
+ const $ = _c(4);
83
+ let props;
84
+ if ($[0] !== t0) {
85
+ ({...props} = t0);
86
+ $[0] = t0;
87
+ $[1] = props;
88
+ } else {
89
+ props = $[1];
90
+ }
91
+ let t1;
92
+ if ($[2] !== props) {
93
+ t1 = /* @__PURE__ */ _jsx(PopoverPrimitive.Close, {
94
+ "data-slot": "popover-close",
95
+ ...props
96
+ });
97
+ $[2] = props;
98
+ $[3] = t1;
99
+ } else {
100
+ t1 = $[3];
101
+ }
102
+ return t1;
103
+ }
104
+ /** Every popover enters and leaves on the same path. */
105
+ function resolvePopoverMotion() {
106
+ return POPOVER_MOTION;
107
+ }
108
+ /**
109
+ * Renders Arc's panel: raised surface, hairline border, panel radius and floating shadow, kept inside the viewport.
110
+ * Content taller than the room left on the placed side scrolls inside the panel instead of running off screen.
111
+ * @param props - Radix content properties. `align` defaults to `center`, `sideOffset` to 6px and `collisionPadding`
112
+ * to 10px.
113
+ * @returns The portaled panel.
114
+ */
115
+ function PopoverContent(t0) {
116
+ const $ = _c(17);
117
+ let className;
118
+ let props;
119
+ let t1;
120
+ let t2;
121
+ let t3;
122
+ if ($[0] !== t0) {
123
+ ({className, align: t1, sideOffset: t2, collisionPadding: t3, ...props} = t0);
124
+ $[0] = t0;
125
+ $[1] = className;
126
+ $[2] = props;
127
+ $[3] = t1;
128
+ $[4] = t2;
129
+ $[5] = t3;
130
+ } else {
131
+ className = $[1];
132
+ props = $[2];
133
+ t1 = $[3];
134
+ t2 = $[4];
135
+ t3 = $[5];
136
+ }
137
+ const align = t1 === undefined ? "center" : t1;
138
+ const sideOffset = t2 === undefined ? POPOVER_SIDE_OFFSET_PX : t2;
139
+ const collisionPadding = t3 === undefined ? POPOVER_COLLISION_PADDING_PX : t3;
140
+ const t4 = props.forceMount;
141
+ let t5;
142
+ if ($[6] !== className) {
143
+ t5 = cn("z-50 flex max-h-(--radix-popover-content-available-height) w-72 max-w-[calc(100vw-20px)] origin-(--radix-popover-content-transform-origin) flex-col gap-2.5 overflow-y-auto overscroll-contain *:shrink-0 rounded-(--radius-panel) border border-border bg-surface-raised p-(--space-4) text-sm leading-(--leading-body) text-foreground shadow-(--shadow-floating) outline-hidden", className);
144
+ $[6] = className;
145
+ $[7] = t5;
146
+ } else {
147
+ t5 = $[7];
148
+ }
149
+ let t6;
150
+ if ($[8] !== align || $[9] !== collisionPadding || $[10] !== props || $[11] !== sideOffset || $[12] !== t5) {
151
+ t6 = /* @__PURE__ */ _jsx(ArcFloatingSlot, {
152
+ motion: resolvePopoverMotion,
153
+ children: /* @__PURE__ */ _jsx(PopoverPrimitive.Content, {
154
+ forceMount: true,
155
+ "data-slot": "popover-content",
156
+ align,
157
+ sideOffset,
158
+ collisionPadding,
159
+ className: t5,
160
+ ...props
161
+ })
162
+ });
163
+ $[8] = align;
164
+ $[9] = collisionPadding;
165
+ $[10] = props;
166
+ $[11] = sideOffset;
167
+ $[12] = t5;
168
+ $[13] = t6;
169
+ } else {
170
+ t6 = $[13];
171
+ }
172
+ let t7;
173
+ if ($[14] !== props.forceMount || $[15] !== t6) {
174
+ t7 = /* @__PURE__ */ _jsx(PopoverPrimitive.Portal, {
175
+ forceMount: true,
176
+ children: /* @__PURE__ */ _jsx(MotionPresence, {
177
+ scope: "popover",
178
+ forceMount: t4,
179
+ children: t6
180
+ })
181
+ });
182
+ $[14] = props.forceMount;
183
+ $[15] = t6;
184
+ $[16] = t7;
185
+ } else {
186
+ t7 = $[16];
187
+ }
188
+ return t7;
189
+ }
190
+ function PopoverAnchor(t0) {
191
+ const $ = _c(4);
192
+ let props;
193
+ if ($[0] !== t0) {
194
+ ({...props} = t0);
195
+ $[0] = t0;
196
+ $[1] = props;
197
+ } else {
198
+ props = $[1];
199
+ }
200
+ let t1;
201
+ if ($[2] !== props) {
202
+ t1 = /* @__PURE__ */ _jsx(PopoverPrimitive.Anchor, {
203
+ "data-slot": "popover-anchor",
204
+ ...props
205
+ });
206
+ $[2] = props;
207
+ $[3] = t1;
208
+ } else {
209
+ t1 = $[3];
210
+ }
211
+ return t1;
212
+ }
213
+ export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Internal primitive of Arc's Select (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): Arc's trigger, whose
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.
5
+ * Internal: the Radix composition behind the public closed `Select`; the package does not export it.
6
+ */
7
+ import * as React from "react";
8
+ import { Select as SelectPrimitive } from "radix-ui";
9
+ declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): React.JSX.Element;
10
+ declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): React.JSX.Element;
11
+ /**
12
+ * Renders Arc's selection control: `default` matches the height of `Input` and `Button`, `sm` their small size.
13
+ * Hover only answers on fine pointers, keyboard focus draws the shared outline, and `aria-invalid` turns the border
14
+ * to the danger color.
15
+ * @param props - Primitive properties, the `size` and optional consumer overrides.
16
+ * @returns The styled primitive with its original interaction contract.
17
+ */
18
+ declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
19
+ size?: "sm" | "default";
20
+ }): React.JSX.Element;
21
+ /**
22
+ * Renders Arc's raised option list, at least twelve rem wide so options stay readable. With `position="popper"` it
23
+ * grows from the trigger edge, matches the trigger width up to min(24rem, 100vw minus 20px), keeps 12px from the
24
+ * viewport edges and caps its height at 20rem.
25
+ * @param props - Primitive properties and optional consumer overrides.
26
+ * @returns The styled primitive with its original interaction contract.
27
+ */
28
+ declare function SelectContent({ className, children, position, align, collisionPadding, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): React.JSX.Element;
29
+ /**
30
+ * Renders Arc's option row: 36px tall, a muted fill when highlighted and the check of the chosen option at the end,
31
+ * while retaining selection and disabled semantics.
32
+ * @param props - Primitive properties and optional consumer overrides.
33
+ * @returns The styled primitive with its original interaction contract.
34
+ */
35
+ declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): React.JSX.Element;
36
+ export { Select, SelectContent, SelectItem, SelectTrigger, SelectValue };