beez-ui 2.7.0 → 3.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 (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 +267 -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 +2 -2
  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 +24 -1
  82. package/dist/constants/avatar.js +19 -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
@@ -1,22 +1,23 @@
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. */
1
+ import type { ReactNode } from "react";
2
+ export type SkeletonProps = {
3
+ /** Accessible name of the loading status; defaults to "Cargando contenido". */
4
+ label?: string;
5
+ /** Number of text lines, clamped to 1-6; defaults to 3. */
4
6
  lines?: number;
5
- /** Adds a round avatar block before the lines of the composed placeholder. */
7
+ /** Adds a round avatar block before the lines. */
6
8
  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
- */
9
+ /** Content to reveal once loading finishes; with children the placeholder crossfades into them. */
10
+ children?: ReactNode;
11
+ /** Keeps the placeholder visible while true (the default). Only used together with `children`. */
13
12
  loading?: boolean;
13
+ /** Classes for the outer element: the placeholder, or the reveal frame when there are children. */
14
+ className?: string;
14
15
  };
15
16
  /**
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.
17
+ * Reserves space while content loads. Without children it draws Arc's placeholder, three text lines by default; with
18
+ * children it shows that placeholder while `loading` and then crossfades into them.
19
+ * @param props - Placeholder shape, accessible label, loading state and classes.
20
+ * @returns The placeholder, or the reveal frame when there are children.
20
21
  */
21
- declare function Skeleton({ lines, avatar, label, loading, className, children, ...props }: SkeletonProps): import("react").JSX.Element;
22
+ declare function Skeleton({ label, lines, avatar, children, loading, className, }: SkeletonProps): import("react").JSX.Element;
22
23
  export { Skeleton };
@@ -2,9 +2,10 @@
2
2
  import { c as _c } from "react/compiler-runtime";
3
3
  /**
4
4
  * Arc's Skeleton (https://uiarc.dev, MIT License, see THIRD_PARTY_NOTICES.md): placeholders that reserve space while
5
- * content loads, with a calm, finite pulse that ripples down the blocks and rests after about 20 seconds. Besides the
6
- * bare block it renders Arc's composed placeholder (`lines`, `avatar`) and its reveal, which crossfades into the
7
- * content while the height springs to its new size (`loading` with children).
5
+ * content loads, with a calm, finite pulse that ripples down the blocks and rests after about 20 seconds. It draws
6
+ * Arc's placeholder of text lines and an optional avatar, and with children its reveal, which crossfades into the
7
+ * content while the height springs to its new size. Like Arc, it only draws lines and an avatar: other shapes are
8
+ * built by the consumer.
8
9
  */
9
10
  import { useEffect, useLayoutEffect, useRef } from "react";
10
11
  import { AnimatePresence, animate, motion, useIsPresent } from "motion/react";
@@ -75,93 +76,72 @@ function useMorphHeight(contentRef, busy, reduceMotion) {
75
76
  }
76
77
  /** Arc's composed placeholder: an optional avatar and a column of lines, announced once as a busy status. */
77
78
  function SkeletonPlaceholder(t0) {
78
- const $ = _c(21);
79
- let avatar;
80
- let className;
81
- let label;
82
- let lines;
83
- let props;
84
- if ($[0] !== t0) {
85
- ({lines, avatar, label, className, ...props} = t0);
86
- $[0] = t0;
87
- $[1] = avatar;
88
- $[2] = className;
89
- $[3] = label;
90
- $[4] = lines;
91
- $[5] = props;
92
- } else {
93
- avatar = $[1];
94
- className = $[2];
95
- label = $[3];
96
- lines = $[4];
97
- props = $[5];
98
- }
79
+ const $ = _c(14);
80
+ const { lines, avatar, label, className } = t0;
99
81
  const lineCount = Math.min(Math.max(Math.floor(lines), SKELETON_LINE_LIMITS.min), SKELETON_LINE_LIMITS.max);
100
82
  const firstLineIndex = avatar ? 1 : 0;
101
83
  let t1;
102
- if ($[6] !== className) {
84
+ if ($[0] !== className) {
103
85
  t1 = cn("flex w-full min-w-0 items-start gap-(--space-4)", className);
104
- $[6] = className;
105
- $[7] = t1;
86
+ $[0] = className;
87
+ $[1] = t1;
106
88
  } else {
107
- t1 = $[7];
89
+ t1 = $[1];
108
90
  }
109
91
  let t2;
110
- if ($[8] !== avatar) {
92
+ if ($[2] !== avatar) {
111
93
  t2 = avatar ? /* @__PURE__ */ _jsx("span", {
112
94
  "data-slot": "skeleton",
113
95
  "aria-hidden": "true",
114
96
  className: cn(blockClassName, "size-(--control-height-md) flex-none rounded-(--radius-pill)")
115
97
  }) : null;
116
- $[8] = avatar;
117
- $[9] = t2;
98
+ $[2] = avatar;
99
+ $[3] = t2;
118
100
  } else {
119
- t2 = $[9];
101
+ t2 = $[3];
120
102
  }
121
103
  let t3;
122
- if ($[10] !== firstLineIndex || $[11] !== lineCount) {
104
+ if ($[4] !== firstLineIndex || $[5] !== lineCount) {
123
105
  let t4;
124
- if ($[13] !== firstLineIndex) {
106
+ if ($[7] !== firstLineIndex) {
125
107
  t4 = (_, lineIndex) => /* @__PURE__ */ _jsx("span", {
126
108
  "data-slot": "skeleton",
127
109
  className: cn(blockClassName, "h-(--space-3) w-full first:h-(--space-4) first:w-[48%] last:not-first:w-[72%]"),
128
110
  style: { "--index": lineIndex + firstLineIndex }
129
111
  }, lineIndex);
130
- $[13] = firstLineIndex;
131
- $[14] = t4;
112
+ $[7] = firstLineIndex;
113
+ $[8] = t4;
132
114
  } else {
133
- t4 = $[14];
115
+ t4 = $[8];
134
116
  }
135
117
  t3 = /* @__PURE__ */ _jsx("span", {
136
118
  "aria-hidden": "true",
137
119
  className: "grid flex-1 gap-(--space-3) pt-(--space-1)",
138
120
  children: Array.from({ length: lineCount }, t4)
139
121
  });
140
- $[10] = firstLineIndex;
141
- $[11] = lineCount;
142
- $[12] = t3;
122
+ $[4] = firstLineIndex;
123
+ $[5] = lineCount;
124
+ $[6] = t3;
143
125
  } else {
144
- t3 = $[12];
126
+ t3 = $[6];
145
127
  }
146
128
  let t4;
147
- if ($[15] !== label || $[16] !== props || $[17] !== t1 || $[18] !== t2 || $[19] !== t3) {
129
+ if ($[9] !== label || $[10] !== t1 || $[11] !== t2 || $[12] !== t3) {
148
130
  t4 = /* @__PURE__ */ _jsxs("div", {
149
131
  "data-slot": "skeleton-placeholder",
150
132
  role: "status",
151
133
  "aria-label": label,
152
134
  "aria-busy": "true",
153
135
  className: t1,
154
- ...props,
155
136
  children: [t2, t3]
156
137
  });
157
- $[15] = label;
158
- $[16] = props;
159
- $[17] = t1;
160
- $[18] = t2;
161
- $[19] = t3;
162
- $[20] = t4;
138
+ $[9] = label;
139
+ $[10] = t1;
140
+ $[11] = t2;
141
+ $[12] = t3;
142
+ $[13] = t4;
163
143
  } else {
164
- t4 = $[20];
144
+ t4 = $[13];
165
145
  }
166
146
  return t4;
167
147
  }
@@ -205,47 +185,24 @@ function SkeletonBranch(t0) {
205
185
  }
206
186
  /** Arc's reveal: the placeholder crossfades into the content while the frame springs to the new height. */
207
187
  function SkeletonReveal(t0) {
208
- const $ = _c(21);
209
- let children;
210
- let className;
211
- let loading;
212
- let placeholder;
213
- let props;
214
- let style;
215
- if ($[0] !== t0) {
216
- ({loading, placeholder, children, className, style, ...props} = t0);
217
- $[0] = t0;
218
- $[1] = children;
219
- $[2] = className;
220
- $[3] = loading;
221
- $[4] = placeholder;
222
- $[5] = props;
223
- $[6] = style;
224
- } else {
225
- children = $[1];
226
- className = $[2];
227
- loading = $[3];
228
- placeholder = $[4];
229
- props = $[5];
230
- style = $[6];
231
- }
188
+ const $ = _c(12);
189
+ const { loading, placeholder, children, className } = t0;
232
190
  const reduceMotion = usePrefersReducedMotion();
233
191
  const contentRef = useRef(null);
234
192
  useMorphHeight(contentRef, loading, reduceMotion);
235
193
  const t1 = reduceMotion ? ARC_DURATION.instant : ARC_DURATION.fast;
236
194
  let t2;
237
- if ($[7] !== t1) {
195
+ if ($[0] !== t1) {
238
196
  t2 = { duration: t1 };
239
- $[7] = t1;
240
- $[8] = t2;
197
+ $[0] = t1;
198
+ $[1] = t2;
241
199
  } else {
242
- t2 = $[8];
200
+ t2 = $[1];
243
201
  }
244
202
  const exitTransition = t2;
245
- const t3 = props;
246
- let t4;
247
- if ($[9] !== children || $[10] !== exitTransition || $[11] !== loading || $[12] !== placeholder || $[13] !== reduceMotion) {
248
- t4 = /* @__PURE__ */ _jsx("div", {
203
+ let t3;
204
+ if ($[2] !== children || $[3] !== exitTransition || $[4] !== loading || $[5] !== placeholder || $[6] !== reduceMotion) {
205
+ t3 = /* @__PURE__ */ _jsx("div", {
249
206
  ref: contentRef,
250
207
  className: "relative flow-root",
251
208
  children: /* @__PURE__ */ _jsx(AnimatePresence, {
@@ -284,156 +241,93 @@ function SkeletonReveal(t0) {
284
241
  }, "content")
285
242
  })
286
243
  });
287
- $[9] = children;
288
- $[10] = exitTransition;
289
- $[11] = loading;
290
- $[12] = placeholder;
291
- $[13] = reduceMotion;
292
- $[14] = t4;
244
+ $[2] = children;
245
+ $[3] = exitTransition;
246
+ $[4] = loading;
247
+ $[5] = placeholder;
248
+ $[6] = reduceMotion;
249
+ $[7] = t3;
293
250
  } else {
294
- t4 = $[14];
251
+ t3 = $[7];
295
252
  }
296
- let t5;
297
- if ($[15] !== className || $[16] !== loading || $[17] !== style || $[18] !== t3 || $[19] !== t4) {
298
- t5 = /* @__PURE__ */ _jsx(motion.div, {
253
+ let t4;
254
+ if ($[8] !== className || $[9] !== loading || $[10] !== t3) {
255
+ t4 = /* @__PURE__ */ _jsx("div", {
299
256
  "data-slot": "skeleton-reveal",
300
257
  "aria-busy": loading,
301
258
  className,
302
- ...t3,
303
- style,
304
- children: t4
259
+ children: t3
305
260
  });
306
- $[15] = className;
307
- $[16] = loading;
308
- $[17] = style;
309
- $[18] = t3;
310
- $[19] = t4;
311
- $[20] = t5;
261
+ $[8] = className;
262
+ $[9] = loading;
263
+ $[10] = t3;
264
+ $[11] = t4;
312
265
  } else {
313
- t5 = $[20];
266
+ t4 = $[11];
314
267
  }
315
- return t5;
268
+ return t4;
316
269
  }
317
270
  /**
318
- * Reserves space while content loads. Without Arc's props it is a bare block sized by `className`; with `lines` or
319
- * `avatar` it draws Arc's composed placeholder; with `loading` it reveals `children` once loading finishes.
320
- * @param props - Optional placeholder shape, label and loading state, plus native div attributes.
321
- * @returns The placeholder, or the reveal frame when `loading` is set.
271
+ * Reserves space while content loads. Without children it draws Arc's placeholder, three text lines by default; with
272
+ * children it shows that placeholder while `loading` and then crossfades into them.
273
+ * @param props - Placeholder shape, accessible label, loading state and classes.
274
+ * @returns The placeholder, or the reveal frame when there are children.
322
275
  */
323
276
  function Skeleton(t0) {
324
- const $ = _c(30);
325
- let avatar;
326
- let children;
327
- let className;
328
- let lines;
329
- let loading;
330
- let props;
331
- let t1;
332
- if ($[0] !== t0) {
333
- ({lines, avatar, label: t1, loading, className, children, ...props} = t0);
334
- $[0] = t0;
335
- $[1] = avatar;
336
- $[2] = children;
337
- $[3] = className;
338
- $[4] = lines;
339
- $[5] = loading;
340
- $[6] = props;
341
- $[7] = t1;
342
- } else {
343
- avatar = $[1];
344
- children = $[2];
345
- className = $[3];
346
- lines = $[4];
347
- loading = $[5];
348
- props = $[6];
349
- t1 = $[7];
350
- }
277
+ const $ = _c(14);
278
+ const { label: t1, lines: t2, avatar: t3, children, loading: t4, className } = t0;
351
279
  const label = t1 === undefined ? SKELETON_DEFAULT_LABEL : t1;
352
- const t2 = lines ?? SKELETON_DEFAULT_LINES;
353
- const t3 = avatar ?? false;
354
- let t4;
355
- if ($[8] !== label || $[9] !== t2 || $[10] !== t3) {
356
- t4 = {
357
- lines: t2,
358
- avatar: t3,
359
- label
360
- };
361
- $[8] = label;
362
- $[9] = t2;
363
- $[10] = t3;
364
- $[11] = t4;
365
- } else {
366
- t4 = $[11];
367
- }
368
- const shape = t4;
369
- if (loading !== undefined) {
280
+ const lines = t2 === undefined ? SKELETON_DEFAULT_LINES : t2;
281
+ const avatar = t3 === undefined ? false : t3;
282
+ const loading = t4 === undefined ? true : t4;
283
+ if (children === undefined) {
370
284
  let t5;
371
- if ($[12] !== shape) {
372
- t5 = /* @__PURE__ */ _jsx(SkeletonPlaceholder, { ...shape });
373
- $[12] = shape;
374
- $[13] = t5;
375
- } else {
376
- t5 = $[13];
377
- }
378
- let t6;
379
- if ($[14] !== children || $[15] !== className || $[16] !== loading || $[17] !== props || $[18] !== t5) {
380
- t6 = /* @__PURE__ */ _jsx(SkeletonReveal, {
381
- loading,
382
- placeholder: t5,
383
- className,
384
- ...props,
385
- children
386
- });
387
- $[14] = children;
388
- $[15] = className;
389
- $[16] = loading;
390
- $[17] = props;
391
- $[18] = t5;
392
- $[19] = t6;
393
- } else {
394
- t6 = $[19];
395
- }
396
- return t6;
397
- }
398
- if (lines !== undefined || avatar) {
399
- let t5;
400
- if ($[20] !== className || $[21] !== props || $[22] !== shape) {
285
+ if ($[0] !== avatar || $[1] !== className || $[2] !== label || $[3] !== lines) {
401
286
  t5 = /* @__PURE__ */ _jsx(SkeletonPlaceholder, {
402
- ...shape,
403
- className,
404
- ...props
287
+ lines,
288
+ avatar,
289
+ label,
290
+ className
405
291
  });
406
- $[20] = className;
407
- $[21] = props;
408
- $[22] = shape;
409
- $[23] = t5;
292
+ $[0] = avatar;
293
+ $[1] = className;
294
+ $[2] = label;
295
+ $[3] = lines;
296
+ $[4] = t5;
410
297
  } else {
411
- t5 = $[23];
298
+ t5 = $[4];
412
299
  }
413
300
  return t5;
414
301
  }
415
302
  let t5;
416
- if ($[24] !== className) {
417
- t5 = cn(blockClassName, className);
418
- $[24] = className;
419
- $[25] = t5;
303
+ if ($[5] !== avatar || $[6] !== label || $[7] !== lines) {
304
+ t5 = /* @__PURE__ */ _jsx(SkeletonPlaceholder, {
305
+ lines,
306
+ avatar,
307
+ label
308
+ });
309
+ $[5] = avatar;
310
+ $[6] = label;
311
+ $[7] = lines;
312
+ $[8] = t5;
420
313
  } else {
421
- t5 = $[25];
314
+ t5 = $[8];
422
315
  }
423
316
  let t6;
424
- if ($[26] !== children || $[27] !== props || $[28] !== t5) {
425
- t6 = /* @__PURE__ */ _jsx("div", {
426
- "data-slot": "skeleton",
427
- className: t5,
428
- ...props,
317
+ if ($[9] !== children || $[10] !== className || $[11] !== loading || $[12] !== t5) {
318
+ t6 = /* @__PURE__ */ _jsx(SkeletonReveal, {
319
+ loading,
320
+ placeholder: t5,
321
+ className,
429
322
  children
430
323
  });
431
- $[26] = children;
432
- $[27] = props;
433
- $[28] = t5;
434
- $[29] = t6;
324
+ $[9] = children;
325
+ $[10] = className;
326
+ $[11] = loading;
327
+ $[12] = t5;
328
+ $[13] = t6;
435
329
  } else {
436
- t6 = $[29];
330
+ t6 = $[13];
437
331
  }
438
332
  return t6;
439
333
  }
@@ -14,7 +14,7 @@ import { cn } from "../lib/utils.js";
14
14
  import { ARC_ICON_ENTER as iconEnter, ARC_ICON_EXIT as iconExit, ARC_ICON_TRANSITION as iconTransition, ARC_REDUCED_ENTER as reducedEnter, ARC_REDUCED_EXIT as reducedExit, ARC_REDUCED_TRANSITION as reducedTransition, ARC_SWAP_REST as restState } from "../motion/arc-swap.js";
15
15
  import { useMorphWidth } from "../motion/use-morph-width.js";
16
16
  import { Button } from "./button.js";
17
- import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "./dropdown-menu.js";
17
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "./primitives/dropdown-menu.js";
18
18
  import { MorphText } from "./morph-text.js";
19
19
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
20
20
  /**
@@ -1,16 +1,13 @@
1
1
  import type { ComponentProps } from "react";
2
2
  import { Switch as SwitchPrimitive } from "radix-ui";
3
- import type { SwitchSize } from "../constants/switch.js";
4
3
  export type SwitchProps = ComponentProps<typeof SwitchPrimitive.Root> & {
5
- /** Track size: Arc's 42 by 24 track (`default`) or a compact one for dense rows (`sm`). */
6
- size?: SwitchSize;
7
- /** Visible text rendered inside the control, after the track; it also names the switch. */
4
+ /** Visible text rendered inside the control, after the track; also its `aria-label` when none is passed. */
8
5
  label?: string;
9
6
  };
10
7
  /**
11
8
  * A binary setting that applies at once, controlled or uncontrolled like Radix's switch.
12
- * @param switchProps - Every Radix switch prop, including `ref`, plus the Arc `size` and `label`.
9
+ * @param switchProps - Every Radix switch prop, including `ref`, plus Arc's `label`.
13
10
  * @returns The switch button, with its label inside when one is passed.
14
11
  */
15
- declare function Switch({ className, size, label, checked, defaultChecked, onCheckedChange, onPointerDown, onPointerUp, onPointerLeave, onPointerCancel, onKeyDown, onKeyUp, onBlur, disabled, "aria-label": ariaLabel, ...props }: SwitchProps): import("react").JSX.Element;
12
+ declare function Switch({ className, label, checked, defaultChecked, onCheckedChange, onPointerDown, onPointerUp, onPointerLeave, onPointerCancel, onKeyDown, onKeyUp, onBlur, disabled, "aria-label": ariaLabel, ...props }: SwitchProps): import("react").JSX.Element;
16
13
  export { Switch };