beez-ui 2.5.0 → 2.6.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 (92) hide show
  1. package/CHANGELOG.md +63 -0
  2. package/THIRD_PARTY_NOTICES.md +1 -1
  3. package/dist/components/alert-dialog.d.ts +15 -4
  4. package/dist/components/alert-dialog.js +84 -44
  5. package/dist/components/alert.d.ts +30 -9
  6. package/dist/components/alert.js +360 -39
  7. package/dist/components/avatar.d.ts +33 -10
  8. package/dist/components/avatar.js +110 -30
  9. package/dist/components/badge.d.ts +39 -7
  10. package/dist/components/badge.js +348 -24
  11. package/dist/components/calendar.d.ts +29 -2
  12. package/dist/components/calendar.js +1035 -223
  13. package/dist/components/card.d.ts +17 -1
  14. package/dist/components/card.js +34 -8
  15. package/dist/components/carousel.d.ts +29 -2
  16. package/dist/components/carousel.js +471 -90
  17. package/dist/components/checkbox.d.ts +13 -2
  18. package/dist/components/checkbox.js +301 -41
  19. package/dist/components/dialog-surface.d.ts +27 -0
  20. package/dist/components/dialog-surface.js +137 -0
  21. package/dist/components/dialog.d.ts +21 -4
  22. package/dist/components/dialog.js +163 -96
  23. package/dist/components/dropdown-menu.d.ts +30 -16
  24. package/dist/components/dropdown-menu.js +139 -83
  25. package/dist/components/hover-card.d.ts +46 -3
  26. package/dist/components/hover-card.js +423 -60
  27. package/dist/components/pagination.d.ts +32 -14
  28. package/dist/components/pagination.js +136 -59
  29. package/dist/components/popover.d.ts +14 -5
  30. package/dist/components/popover.js +78 -36
  31. package/dist/components/radio-group.d.ts +19 -3
  32. package/dist/components/radio-group.js +400 -57
  33. package/dist/components/select.d.ts +17 -6
  34. package/dist/components/select.js +83 -71
  35. package/dist/components/sheet.js +37 -26
  36. package/dist/components/sidebar.js +11 -0
  37. package/dist/components/skeleton.d.ts +19 -5
  38. package/dist/components/skeleton.js +434 -14
  39. package/dist/components/switch.d.ts +14 -4
  40. package/dist/components/switch.js +424 -40
  41. package/dist/components/tabs.d.ts +38 -5
  42. package/dist/components/tabs.js +564 -97
  43. package/dist/components/themed-toaster.d.ts +6 -2
  44. package/dist/components/themed-toaster.js +80 -50
  45. package/dist/components/tooltip.d.ts +33 -2
  46. package/dist/components/tooltip.js +197 -69
  47. package/dist/constants/alert.d.ts +12 -0
  48. package/dist/constants/alert.js +9 -0
  49. package/dist/constants/avatar.d.ts +10 -0
  50. package/dist/constants/avatar.js +7 -0
  51. package/dist/constants/badge.d.ts +6 -0
  52. package/dist/constants/badge.js +6 -0
  53. package/dist/constants/calendar.d.ts +24 -0
  54. package/dist/constants/calendar.js +22 -0
  55. package/dist/constants/carousel.d.ts +37 -0
  56. package/dist/constants/carousel.js +53 -0
  57. package/dist/constants/checkbox.d.ts +17 -0
  58. package/dist/constants/checkbox.js +17 -0
  59. package/dist/constants/dialog.d.ts +6 -0
  60. package/dist/constants/dialog.js +6 -0
  61. package/dist/constants/dropdown-menu.d.ts +5 -0
  62. package/dist/constants/dropdown-menu.js +5 -0
  63. package/dist/constants/hover-card.d.ts +37 -0
  64. package/dist/constants/hover-card.js +85 -0
  65. package/dist/constants/pagination.d.ts +9 -0
  66. package/dist/constants/pagination.js +9 -0
  67. package/dist/constants/popover.d.ts +7 -0
  68. package/dist/constants/popover.js +39 -0
  69. package/dist/constants/radio-group.d.ts +10 -0
  70. package/dist/constants/radio-group.js +10 -0
  71. package/dist/constants/select.d.ts +3 -0
  72. package/dist/constants/select.js +3 -0
  73. package/dist/constants/skeleton.d.ts +17 -0
  74. package/dist/constants/skeleton.js +17 -0
  75. package/dist/constants/switch.d.ts +44 -0
  76. package/dist/constants/switch.js +49 -0
  77. package/dist/constants/tabs.d.ts +17 -0
  78. package/dist/constants/tabs.js +17 -0
  79. package/dist/constants/toast.d.ts +3 -0
  80. package/dist/constants/toast.js +3 -0
  81. package/dist/constants/tooltip.d.ts +13 -0
  82. package/dist/constants/tooltip.js +52 -0
  83. package/dist/lib/toast-layer.d.ts +24 -0
  84. package/dist/lib/toast-layer.js +76 -0
  85. package/dist/motion/arc-floating-slot.d.ts +40 -0
  86. package/dist/motion/arc-floating-slot.js +167 -0
  87. package/dist/motion/glide-indicator.d.ts +6 -7
  88. package/dist/motion/glide-indicator.js +5 -3
  89. package/dist/motion/overlay-warmth.d.ts +24 -0
  90. package/dist/motion/overlay-warmth.js +70 -0
  91. package/dist/styles.css +1 -1
  92. package/package.json +1 -1
@@ -1,7 +1,14 @@
1
1
  "use client";
2
2
  import { c as _c } from "react/compiler-runtime";
3
+ /**
4
+ * Arc's Select (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md) as beez-ui's composable Radix select:
5
+ * Arc's trigger, whose hover, press and open states answer in color only so the anchored list never shifts, and its
6
+ * raised list with option rows and an end check, on Arc's tokens. It keeps every subcomponent, prop and `data-slot`
7
+ * of the previous API and beez-ui's option entrance, check pop and chevron rotation.
8
+ */
3
9
  import * as React from "react";
4
10
  import { Select as SelectPrimitive } from "radix-ui";
11
+ import { SELECT_COLLISION_PADDING_PX } from "../constants/select.js";
5
12
  import { GlideSlot } from "../motion/glide-slot.js";
6
13
  import { MotionSlot } from "../motion/motion-slot.js";
7
14
  import { cn } from "../lib/utils.js";
@@ -45,7 +52,7 @@ function SelectGroup(t0) {
45
52
  }
46
53
  let t1;
47
54
  if ($[3] !== className) {
48
- t1 = cn("scroll-my-1 p-1", className);
55
+ t1 = cn("scroll-my-1.5", className);
49
56
  $[3] = className;
50
57
  $[4] = t1;
51
58
  } else {
@@ -90,8 +97,10 @@ function SelectValue(t0) {
90
97
  return t1;
91
98
  }
92
99
  /**
93
- * Renders compact default and small selection controls.
94
- * @param props - Primitive properties and optional consumer overrides.
100
+ * Renders Arc's selection control: `default` matches the height of `Input` and `Button`, `sm` their small size.
101
+ * Hover only answers on fine pointers, keyboard focus draws the shared outline, and `aria-invalid` turns the border
102
+ * to the danger color.
103
+ * @param props - Primitive properties, the `size` and optional consumer overrides.
95
104
  * @returns The styled primitive with its original interaction contract.
96
105
  */
97
106
  function SelectTrigger(t0) {
@@ -116,7 +125,7 @@ function SelectTrigger(t0) {
116
125
  const size = t1 === undefined ? "default" : t1;
117
126
  let t2;
118
127
  if ($[5] !== className) {
119
- t2 = cn("flex w-fit items-center justify-between gap-1.5 rounded-lg border data-[state=open]:*:data-[slot=select-icon]:rotate-180 border-input bg-transparent py-2 pr-2 pl-2.5 text-sm whitespace-nowrap transition-[color,background-color,border-color,box-shadow] outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className);
128
+ t2 = cn("flex w-fit cursor-pointer items-center justify-between gap-3 rounded-(--radius-control) border border-border bg-surface px-3 text-left text-sm whitespace-nowrap text-foreground outline-none select-none transition-[color,background-color,border-color,box-shadow] duration-(--duration-fast) ease-(--ease-standard) motion-reduce:transition-none hover-fine:not-disabled:not-aria-invalid:border-border-strong hover-fine:not-disabled:bg-surface-muted active:not-disabled:not-aria-invalid:border-border-strong active:not-disabled:bg-surface-muted data-[state=open]:not-aria-invalid:border-border-strong data-[state=open]:bg-surface-muted focus-visible:not-aria-invalid:border-border-strong disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-danger data-placeholder:text-text-muted data-[size=default]:min-h-(--control-height-md) data-[size=sm]:min-h-(--control-height-sm) data-[state=open]:*:data-[slot=select-icon]:rotate-180 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className);
120
129
  $[5] = className;
121
130
  $[6] = t2;
122
131
  } else {
@@ -130,7 +139,8 @@ function SelectTrigger(t0) {
130
139
  kind: "rotate",
131
140
  children: /* @__PURE__ */ _jsx(ChevronDownIcon, {
132
141
  "data-slot": "select-icon",
133
- className: "pointer-events-none size-4 text-muted-foreground"
142
+ strokeWidth: 1.75,
143
+ className: "pointer-events-none size-4 text-text-muted"
134
144
  })
135
145
  })
136
146
  });
@@ -161,117 +171,115 @@ function SelectTrigger(t0) {
161
171
  return t4;
162
172
  }
163
173
  /**
164
- * Keeps selection options readable with a twelve-rem minimum width.
174
+ * Renders Arc's raised option list, at least twelve rem wide so options stay readable. With `position="popper"` it
175
+ * grows from the trigger edge, matches the trigger width, keeps 12px from the viewport edges and caps its height at
176
+ * 20rem.
165
177
  * @param props - Primitive properties and optional consumer overrides.
166
178
  * @returns The styled primitive with its original interaction contract.
167
179
  */
168
180
  function SelectContent(t0) {
169
- const $ = _c(24);
181
+ const $ = _c(23);
170
182
  let children;
171
183
  let className;
172
184
  let props;
173
185
  let t1;
174
186
  let t2;
187
+ let t3;
175
188
  if ($[0] !== t0) {
176
- ({className, children, position: t1, align: t2, ...props} = t0);
189
+ ({className, children, position: t1, align: t2, collisionPadding: t3, ...props} = t0);
177
190
  $[0] = t0;
178
191
  $[1] = children;
179
192
  $[2] = className;
180
193
  $[3] = props;
181
194
  $[4] = t1;
182
195
  $[5] = t2;
196
+ $[6] = t3;
183
197
  } else {
184
198
  children = $[1];
185
199
  className = $[2];
186
200
  props = $[3];
187
201
  t1 = $[4];
188
202
  t2 = $[5];
203
+ t3 = $[6];
189
204
  }
190
205
  const position = t1 === undefined ? "item-aligned" : t1;
191
206
  const align = t2 === undefined ? "center" : t2;
192
- const t3 = position === "item-aligned";
193
- const t4 = position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";
194
- let t5;
195
- if ($[6] !== className || $[7] !== t4) {
196
- t5 = cn("z-50 max-h-(--radix-select-content-available-height) min-w-48 origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg text-popover-foreground shadow-md ring-1 ring-foreground/10 relative bg-popover/70 before:pointer-events-none before:absolute before:inset-0 before:-z-1 before:rounded-[inherit] before:backdrop-blur-2xl before:backdrop-saturate-150 **:data-[slot$=-item]:focus:bg-foreground/10 **:data-[slot$=-item]:data-highlighted:bg-foreground/10 **:data-[slot$=-separator]:bg-foreground/5 **:data-[slot$=-trigger]:focus:bg-foreground/10 **:data-[slot$=-trigger]:aria-expanded:bg-foreground/10! **:data-[variant=destructive]:focus:bg-foreground/10! **:data-[variant=destructive]:text-accent-foreground! **:data-[variant=destructive]:**:text-accent-foreground!", t4, className);
197
- $[6] = className;
198
- $[7] = t4;
199
- $[8] = t5;
200
- } else {
201
- t5 = $[8];
202
- }
207
+ const collisionPadding = t3 === undefined ? SELECT_COLLISION_PADDING_PX : t3;
208
+ const t4 = position === "item-aligned";
209
+ const t5 = position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1";
203
210
  let t6;
204
- if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
205
- t6 = /* @__PURE__ */ _jsx(SelectScrollUpButton, {});
211
+ if ($[7] !== className || $[8] !== t5) {
212
+ 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);
213
+ $[7] = className;
214
+ $[8] = t5;
206
215
  $[9] = t6;
207
216
  } else {
208
217
  t6 = $[9];
209
218
  }
210
- const t7 = position === "popper" && "";
211
- let t8;
212
- if ($[10] !== t7) {
213
- t8 = cn("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)", t7);
219
+ let t7;
220
+ if ($[10] === Symbol.for("react.memo_cache_sentinel")) {
221
+ t7 = /* @__PURE__ */ _jsx(SelectScrollUpButton, {});
214
222
  $[10] = t7;
215
- $[11] = t8;
216
223
  } else {
217
- t8 = $[11];
224
+ t7 = $[10];
218
225
  }
219
- let t9;
220
- if ($[12] !== children || $[13] !== position || $[14] !== t8) {
221
- t9 = /* @__PURE__ */ _jsx(SelectPrimitive.Viewport, {
226
+ let t8;
227
+ if ($[11] !== children || $[12] !== position) {
228
+ t8 = /* @__PURE__ */ _jsx(SelectPrimitive.Viewport, {
222
229
  "data-position": position,
223
- className: t8,
230
+ className: "py-0.5 data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)",
224
231
  children
225
232
  });
226
- $[12] = children;
227
- $[13] = position;
228
- $[14] = t8;
229
- $[15] = t9;
233
+ $[11] = children;
234
+ $[12] = position;
235
+ $[13] = t8;
230
236
  } else {
231
- t9 = $[15];
237
+ t8 = $[13];
232
238
  }
233
- let t10;
234
- if ($[16] === Symbol.for("react.memo_cache_sentinel")) {
235
- t10 = /* @__PURE__ */ _jsx(SelectScrollDownButton, {});
236
- $[16] = t10;
239
+ let t9;
240
+ if ($[14] === Symbol.for("react.memo_cache_sentinel")) {
241
+ t9 = /* @__PURE__ */ _jsx(SelectScrollDownButton, {});
242
+ $[14] = t9;
237
243
  } else {
238
- t10 = $[16];
244
+ t9 = $[14];
239
245
  }
240
- let t11;
241
- if ($[17] !== align || $[18] !== position || $[19] !== props || $[20] !== t3 || $[21] !== t5 || $[22] !== t9) {
242
- t11 = /* @__PURE__ */ _jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ _jsx(MotionSlot, {
246
+ let t10;
247
+ if ($[15] !== align || $[16] !== collisionPadding || $[17] !== position || $[18] !== props || $[19] !== t4 || $[20] !== t6 || $[21] !== t8) {
248
+ t10 = /* @__PURE__ */ _jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ _jsx(MotionSlot, {
243
249
  kind: "surface",
244
250
  children: /* @__PURE__ */ _jsx(GlideSlot, {
245
251
  preset: "menu",
246
252
  children: /* @__PURE__ */ _jsxs(SelectPrimitive.Content, {
247
253
  "data-slot": "select-content",
248
- "data-align-trigger": t3,
249
- className: t5,
254
+ "data-align-trigger": t4,
255
+ className: t6,
250
256
  position,
251
257
  align,
258
+ collisionPadding,
252
259
  ...props,
253
260
  children: [
254
- t6,
255
- t9,
256
- t10
261
+ t7,
262
+ t8,
263
+ t9
257
264
  ]
258
265
  })
259
266
  })
260
267
  }) });
261
- $[17] = align;
262
- $[18] = position;
263
- $[19] = props;
264
- $[20] = t3;
265
- $[21] = t5;
266
- $[22] = t9;
267
- $[23] = t11;
268
- } else {
269
- t11 = $[23];
270
- }
271
- return t11;
268
+ $[15] = align;
269
+ $[16] = collisionPadding;
270
+ $[17] = position;
271
+ $[18] = props;
272
+ $[19] = t4;
273
+ $[20] = t6;
274
+ $[21] = t8;
275
+ $[22] = t10;
276
+ } else {
277
+ t10 = $[22];
278
+ }
279
+ return t10;
272
280
  }
273
281
  /**
274
- * Renders compact option group labels.
282
+ * Renders a muted option group label aligned with the option text.
275
283
  * @param props - Primitive properties and optional consumer overrides.
276
284
  * @returns The styled primitive with its original interaction contract.
277
285
  */
@@ -290,7 +298,7 @@ function SelectLabel(t0) {
290
298
  }
291
299
  let t1;
292
300
  if ($[3] !== className) {
293
- t1 = cn("px-1.5 py-1 text-xs text-muted-foreground", className);
301
+ t1 = cn("px-[11px] py-1.5 text-xs font-medium text-text-muted", className);
294
302
  $[3] = className;
295
303
  $[4] = t1;
296
304
  } else {
@@ -312,7 +320,8 @@ function SelectLabel(t0) {
312
320
  return t2;
313
321
  }
314
322
  /**
315
- * Renders compact options while retaining selection and disabled semantics.
323
+ * Renders Arc's option row: 36px tall, a muted fill when highlighted and the check of the chosen option at the end,
324
+ * while retaining selection and disabled semantics.
316
325
  * @param props - Primitive properties and optional consumer overrides.
317
326
  * @returns The styled primitive with its original interaction contract.
318
327
  */
@@ -334,7 +343,7 @@ function SelectItem(t0) {
334
343
  }
335
344
  let t1;
336
345
  if ($[4] !== className) {
337
- t1 = cn("relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className);
346
+ t1 = cn("relative flex min-h-9 w-full cursor-default items-center gap-1.5 rounded-[calc(var(--radius-control)-4px)] py-1 pr-[34px] pl-[11px] text-sm text-foreground outline-hidden select-none transition-colors duration-(--duration-instant) ease-(--ease-standard) motion-reduce:transition-none data-highlighted:bg-surface-muted data-disabled:pointer-events-none data-disabled:opacity-45 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className);
338
347
  $[4] = className;
339
348
  $[5] = t1;
340
349
  } else {
@@ -343,10 +352,13 @@ function SelectItem(t0) {
343
352
  let t2;
344
353
  if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
345
354
  t2 = /* @__PURE__ */ _jsx("span", {
346
- className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center",
355
+ className: "pointer-events-none absolute right-2.5 flex size-4 items-center justify-center text-foreground",
347
356
  children: /* @__PURE__ */ _jsx(MotionSlot, {
348
357
  kind: "item-check",
349
- children: /* @__PURE__ */ _jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ _jsx(CheckIcon, { className: "pointer-events-none" }) })
358
+ children: /* @__PURE__ */ _jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ _jsx(CheckIcon, {
359
+ strokeWidth: 1.75,
360
+ className: "pointer-events-none"
361
+ }) })
350
362
  })
351
363
  });
352
364
  $[6] = t2;
@@ -396,7 +408,7 @@ function SelectSeparator(t0) {
396
408
  }
397
409
  let t1;
398
410
  if ($[3] !== className) {
399
- t1 = cn("pointer-events-none -mx-1 my-1 h-px bg-border", className);
411
+ t1 = cn("pointer-events-none -mx-1.5 my-1 h-px bg-border-subtle", className);
400
412
  $[3] = className;
401
413
  $[4] = t1;
402
414
  } else {
@@ -432,7 +444,7 @@ function SelectScrollUpButton(t0) {
432
444
  }
433
445
  let t1;
434
446
  if ($[3] !== className) {
435
- t1 = cn("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className);
447
+ t1 = cn("z-10 flex h-7 cursor-default items-center justify-center bg-surface-raised text-text-muted [&_svg:not([class*='size-'])]:size-4", className);
436
448
  $[3] = className;
437
449
  $[4] = t1;
438
450
  } else {
@@ -440,7 +452,7 @@ function SelectScrollUpButton(t0) {
440
452
  }
441
453
  let t2;
442
454
  if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
443
- t2 = /* @__PURE__ */ _jsx(ChevronUpIcon, {});
455
+ t2 = /* @__PURE__ */ _jsx(ChevronUpIcon, { strokeWidth: 1.75 });
444
456
  $[5] = t2;
445
457
  } else {
446
458
  t2 = $[5];
@@ -476,7 +488,7 @@ function SelectScrollDownButton(t0) {
476
488
  }
477
489
  let t1;
478
490
  if ($[3] !== className) {
479
- t1 = cn("z-10 flex cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4", className);
491
+ t1 = cn("z-10 flex h-7 cursor-default items-center justify-center bg-surface-raised text-text-muted [&_svg:not([class*='size-'])]:size-4", className);
480
492
  $[3] = className;
481
493
  $[4] = t1;
482
494
  } else {
@@ -484,7 +496,7 @@ function SelectScrollDownButton(t0) {
484
496
  }
485
497
  let t2;
486
498
  if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
487
- t2 = /* @__PURE__ */ _jsx(ChevronDownIcon, {});
499
+ t2 = /* @__PURE__ */ _jsx(ChevronDownIcon, { strokeWidth: 1.75 });
488
500
  $[5] = t2;
489
501
  } else {
490
502
  t2 = $[5];
@@ -5,6 +5,7 @@ import { Dialog as SheetPrimitive } from "radix-ui";
5
5
  import { MotionSlot } from "../motion/motion-slot.js";
6
6
  import { MotionPresence, MotionOpenProvider, useMotionOpenState } from "../motion/presence.js";
7
7
  import { cn } from "../lib/utils.js";
8
+ import { keepOpenOnToastInteraction } from "../lib/toast-layer.js";
8
9
  import { ControlButton } from "./control-button.js";
9
10
  import { XIcon } from "lucide-react";
10
11
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -160,7 +161,7 @@ function SheetOverlay(t0) {
160
161
  * @returns The styled primitive with its original interaction contract.
161
162
  */
162
163
  function SheetContent(t0) {
163
- const $ = _c(20);
164
+ const $ = _c(23);
164
165
  let children;
165
166
  let className;
166
167
  let props;
@@ -203,8 +204,16 @@ function SheetContent(t0) {
203
204
  t5 = $[8];
204
205
  }
205
206
  let t6;
206
- if ($[9] !== showCloseButton) {
207
- t6 = showCloseButton && /* @__PURE__ */ _jsx(SheetPrimitive.Close, {
207
+ if ($[9] !== props.onInteractOutside) {
208
+ t6 = keepOpenOnToastInteraction(props.onInteractOutside);
209
+ $[9] = props.onInteractOutside;
210
+ $[10] = t6;
211
+ } else {
212
+ t6 = $[10];
213
+ }
214
+ let t7;
215
+ if ($[11] !== showCloseButton) {
216
+ t7 = showCloseButton && /* @__PURE__ */ _jsx(SheetPrimitive.Close, {
208
217
  "data-slot": "sheet-close",
209
218
  asChild: true,
210
219
  children: /* @__PURE__ */ _jsx(MotionSlot, {
@@ -220,14 +229,14 @@ function SheetContent(t0) {
220
229
  })
221
230
  })
222
231
  });
223
- $[9] = showCloseButton;
224
- $[10] = t6;
232
+ $[11] = showCloseButton;
233
+ $[12] = t7;
225
234
  } else {
226
- t6 = $[10];
235
+ t7 = $[12];
227
236
  }
228
- let t7;
229
- if ($[11] !== children || $[12] !== props || $[13] !== side || $[14] !== t5 || $[15] !== t6) {
230
- t7 = /* @__PURE__ */ _jsxs(React.Fragment, { children: [t4, /* @__PURE__ */ _jsx(MotionSlot, {
237
+ let t8;
238
+ if ($[13] !== children || $[14] !== props || $[15] !== side || $[16] !== t5 || $[17] !== t6 || $[18] !== t7) {
239
+ t8 = /* @__PURE__ */ _jsxs(React.Fragment, { children: [t4, /* @__PURE__ */ _jsx(MotionSlot, {
231
240
  kind: "sheet",
232
241
  children: /* @__PURE__ */ _jsxs(SheetPrimitive.Content, {
233
242
  forceMount: true,
@@ -235,35 +244,37 @@ function SheetContent(t0) {
235
244
  "data-side": side,
236
245
  className: t5,
237
246
  ...props,
238
- children: [children, t6]
247
+ onInteractOutside: t6,
248
+ children: [children, t7]
239
249
  })
240
250
  })] });
241
- $[11] = children;
242
- $[12] = props;
243
- $[13] = side;
244
- $[14] = t5;
245
- $[15] = t6;
246
- $[16] = t7;
251
+ $[13] = children;
252
+ $[14] = props;
253
+ $[15] = side;
254
+ $[16] = t5;
255
+ $[17] = t6;
256
+ $[18] = t7;
257
+ $[19] = t8;
247
258
  } else {
248
- t7 = $[16];
259
+ t8 = $[19];
249
260
  }
250
- let t8;
251
- if ($[17] !== props.forceMount || $[18] !== t7) {
252
- t8 = /* @__PURE__ */ _jsx(SheetPortal, {
261
+ let t9;
262
+ if ($[20] !== props.forceMount || $[21] !== t8) {
263
+ t9 = /* @__PURE__ */ _jsx(SheetPortal, {
253
264
  forceMount: true,
254
265
  children: /* @__PURE__ */ _jsx(MotionPresence, {
255
266
  scope: "sheet",
256
267
  forceMount: t3,
257
- children: t7
268
+ children: t8
258
269
  })
259
270
  });
260
- $[17] = props.forceMount;
261
- $[18] = t7;
262
- $[19] = t8;
271
+ $[20] = props.forceMount;
272
+ $[21] = t8;
273
+ $[22] = t9;
263
274
  } else {
264
- t8 = $[19];
275
+ t9 = $[22];
265
276
  }
266
- return t8;
277
+ return t9;
267
278
  }
268
279
  function SheetHeader(t0) {
269
280
  const $ = _c(8);
@@ -404,15 +404,22 @@ function MobileSidebar(t0) {
404
404
  const previousBodyStyles = {
405
405
  left: body.style.left,
406
406
  overflow: body.style.overflow,
407
+ paddingRight: body.style.paddingRight,
407
408
  position: body.style.position,
408
409
  right: body.style.right,
409
410
  top: body.style.top
410
411
  };
412
+ const clientWidthBeforeLock = document.documentElement.clientWidth;
413
+ const bodyPaddingRight = Number.parseFloat(getComputedStyle(body).paddingRight) || 0;
411
414
  body.style.position = "fixed";
412
415
  body.style.top = `-${scrollY}px`;
413
416
  body.style.left = "0";
414
417
  body.style.right = "0";
415
418
  body.style.overflow = "hidden";
419
+ const scrollbarWidth = document.documentElement.clientWidth - clientWidthBeforeLock;
420
+ if (scrollbarWidth > 0) {
421
+ body.style.paddingRight = `${bodyPaddingRight + scrollbarWidth}px`;
422
+ }
416
423
  const restoreTriggerFocus = () => triggerRef.current?.focus({ preventScroll: true });
417
424
  const focusFrame = requestAnimationFrame(() => {
418
425
  const firstFocusable = panelRef.current?.querySelector(FOCUSABLE_SELECTOR);
@@ -425,6 +432,7 @@ function MobileSidebar(t0) {
425
432
  body.style.left = previousBodyStyles.left;
426
433
  body.style.right = previousBodyStyles.right;
427
434
  body.style.overflow = previousBodyStyles.overflow;
435
+ body.style.paddingRight = previousBodyStyles.paddingRight;
428
436
  window.scrollTo(0, scrollY);
429
437
  restoreTriggerFocus();
430
438
  };
@@ -447,6 +455,9 @@ function MobileSidebar(t0) {
447
455
  let t5;
448
456
  if ($[7] !== setOpenMobile) {
449
457
  t5 = (event) => {
458
+ if (event.defaultPrevented || !panelRef.current?.contains(event.target)) {
459
+ return;
460
+ }
450
461
  if (event.key === "Escape") {
451
462
  event.preventDefault();
452
463
  setOpenMobile(false);
@@ -1,8 +1,22 @@
1
+ import type { ComponentProps } from "react";
2
+ export type SkeletonProps = ComponentProps<"div"> & {
3
+ /** Draws Arc's composed placeholder with this many text lines, from 1 to 6. */
4
+ lines?: number;
5
+ /** Adds a round avatar block before the lines of the composed placeholder. */
6
+ avatar?: boolean;
7
+ /** Accessible name of the composed placeholder; defaults to "Cargando contenido". */
8
+ label?: string;
9
+ /**
10
+ * Turns the skeleton into Arc's reveal: while true it shows the composed placeholder, and once false it crossfades
11
+ * into `children` while the height springs to the content's size.
12
+ */
13
+ loading?: boolean;
14
+ };
1
15
  /**
2
- * Placeholder with a soft shine that sweeps across it while content loads.
3
- * The shine rests outside the box, so reduced motion shows a plain muted block.
4
- * @param props - Native div properties and optional consumer overrides.
5
- * @returns The placeholder element with its loading animation.
16
+ * Reserves space while content loads. Without Arc's props it is a bare block sized by `className`; with `lines` or
17
+ * `avatar` it draws Arc's composed placeholder; with `loading` it reveals `children` once loading finishes.
18
+ * @param props - Optional placeholder shape, label and loading state, plus native div attributes.
19
+ * @returns The placeholder, or the reveal frame when `loading` is set.
6
20
  */
7
- declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): import("react").JSX.Element;
21
+ declare function Skeleton({ lines, avatar, label, loading, className, children, ...props }: SkeletonProps): import("react").JSX.Element;
8
22
  export { Skeleton };