@bug-on/m3-expressive 1.2.6 → 1.3.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 (54) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/buttons.d.mts +3 -3
  3. package/dist/buttons.d.ts +3 -3
  4. package/dist/buttons.js +230 -82
  5. package/dist/buttons.js.map +1 -1
  6. package/dist/buttons.mjs +231 -83
  7. package/dist/buttons.mjs.map +1 -1
  8. package/dist/{core-D4048_K5.d.mts → core-CAU8g2HY.d.mts} +1 -1
  9. package/dist/{core-Bc5Wj_pc.d.ts → core-DRrLnsnJ.d.ts} +1 -1
  10. package/dist/core.d.mts +2 -2
  11. package/dist/core.d.ts +2 -2
  12. package/dist/core.js +300 -152
  13. package/dist/core.js.map +1 -1
  14. package/dist/core.mjs +283 -135
  15. package/dist/core.mjs.map +1 -1
  16. package/dist/feedback.d.mts +40 -6
  17. package/dist/feedback.d.ts +40 -6
  18. package/dist/feedback.js +313 -165
  19. package/dist/feedback.js.map +1 -1
  20. package/dist/feedback.mjs +291 -143
  21. package/dist/feedback.mjs.map +1 -1
  22. package/dist/{icon-button-CSsDmuQC.d.mts → icon-button-CqdQBsRe.d.ts} +11 -5
  23. package/dist/{icon-button-CSsDmuQC.d.ts → icon-button-USJo7AqO.d.mts} +11 -5
  24. package/dist/index.d.mts +6 -6
  25. package/dist/index.d.ts +6 -6
  26. package/dist/index.js +511 -235
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.mjs +511 -236
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/layout.d.mts +1 -1
  31. package/dist/layout.d.ts +1 -1
  32. package/dist/layout.js +221 -105
  33. package/dist/layout.js.map +1 -1
  34. package/dist/layout.mjs +222 -106
  35. package/dist/layout.mjs.map +1 -1
  36. package/dist/{md3-Dty-Qcad.d.mts → md3-D0_Z7IXj.d.mts} +9 -1
  37. package/dist/{md3-Dty-Qcad.d.ts → md3-D0_Z7IXj.d.ts} +9 -1
  38. package/dist/navigation.d.mts +103 -33
  39. package/dist/navigation.d.ts +103 -33
  40. package/dist/navigation.js +507 -199
  41. package/dist/navigation.js.map +1 -1
  42. package/dist/navigation.mjs +508 -201
  43. package/dist/navigation.mjs.map +1 -1
  44. package/dist/overlays.js +354 -206
  45. package/dist/overlays.js.map +1 -1
  46. package/dist/overlays.mjs +317 -169
  47. package/dist/overlays.mjs.map +1 -1
  48. package/dist/pickers.js +362 -214
  49. package/dist/pickers.js.map +1 -1
  50. package/dist/pickers.mjs +330 -182
  51. package/dist/pickers.mjs.map +1 -1
  52. package/dist/{split-button-trailing-uncheckable-DPJL3bO6.d.mts → split-button-trailing-uncheckable-26qlZvKT.d.mts} +10 -7
  53. package/dist/{split-button-trailing-uncheckable--BhNTEJw.d.ts → split-button-trailing-uncheckable-CXUVrH64.d.ts} +10 -7
  54. package/package.json +1 -1
package/dist/overlays.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import * as RadixDialog from '@radix-ui/react-dialog';
3
- import { m, LazyMotion, domMax, useMotionValue, animate, useAnimationFrame, AnimatePresence, useReducedMotion, useTransform } from 'motion/react';
4
- import * as React9 from 'react';
3
+ import { m, useAnimationFrame, LazyMotion, domMax, useMotionValue, animate, AnimatePresence, useReducedMotion, useTransform } from 'motion/react';
4
+ import * as React2 from 'react';
5
5
  import { useState, useRef, useCallback, useMemo, useEffect, useLayoutEffect } from 'react';
6
6
  import { clsx } from 'clsx';
7
7
  import { twMerge } from 'tailwind-merge';
@@ -89,11 +89,11 @@ var ROTATE_KEY_SPLINES = [
89
89
  var ROTATE_VALUES = "0 24 24; 154 24 24; 309 24 24; 463 24 24; 617 24 24; 771 24 24; 926 24 24; 1080 24 24";
90
90
  var DETERMINATE_CIRCLE = "M24 7 C34.49 7 41 13.51 41 24 C41 34.49 34.49 41 24 41 C13.51 41 7 34.49 7 24 C7 13.51 13.51 7 24 7 Z";
91
91
  var DETERMINATE_SOFT_BURST = "M20.9 10.4 21.4 9.5 21.9 8.7 22.5 7.8 23.2 7.2 24.2 7 25.1 7.4 25.7 8.1 26.2 9 26.8 9.8 27.3 10.6 28.1 11.2 29 11.3 30 11 30.9 10.6 31.8 10.3 32.8 9.9 33.7 10 34.5 10.6 34.9 11.5 34.8 12.5 34.8 13.5 34.7 14.5 34.7 15.5 35.2 16.3 36 16.8 37 17.1 37.9 17.3 38.9 17.5 39.8 17.9 40.4 18.7 40.5 19.7 40 20.5 39.4 21.3 38.7 22 38.1 22.8 37.6 23.7 37.7 24.6 38.3 25.5 38.9 26.2 39.6 27 40.2 27.7 40.5 28.7 40.3 29.6 39.5 30.3 38.6 30.6 37.6 30.8 36.7 31 35.7 31.3 35 31.9 34.6 32.8 34.7 33.8 34.8 34.8 34.9 35.8 34.8 36.8 34.3 37.6 33.4 38.1 32.4 38 31.5 37.6 30.6 37.2 29.7 36.9 28.7 36.6 27.8 36.9 27.1 37.6 26.6 38.5 26.1 39.3 25.5 40.2 24.8 40.8 23.8 41 22.9 40.6 22.3 39.9 21.8 39 21.2 38.2 20.7 37.4 19.9 36.8 19 36.7 18 37 17.1 37.4 16.2 37.7 15.2 38.1 14.3 38 13.5 37.4 13.1 36.5 13.2 35.5 13.2 34.5 13.3 33.5 13.3 32.5 12.8 31.7 12 31.2 11 31 10.1 30.7 9.1 30.5 8.2 30.1 7.6 29.3 7.5 28.3 8 27.5 8.7 26.7 9.3 26 9.9 25.2 10.4 24.3 10.3 23.4 9.7 22.5 9.1 21.8 8.4 21 7.8 20.3 7.5 19.3 7.7 18.4 8.5 17.7 9.4 17.4 10.4 17.2 11.3 17 12.3 16.7 13 16.1 13.4 15.2 13.3 14.2 13.2 13.2 13.1 12.2 13.2 11.2 13.7 10.4 14.6 9.9 15.6 10 16.5 10.4 17.4 10.8 18.3 11.1 19.3 11.4 20.2 11.1Z";
92
- var IndeterminateSvg = React9.memo(function IndeterminateSvg2({
92
+ var IndeterminateSvg = React2.memo(function IndeterminateSvg2({
93
93
  size
94
94
  }) {
95
- const [ready, setReady] = React9.useState(false);
96
- React9.useEffect(() => {
95
+ const [ready, setReady] = React2.useState(false);
96
+ React2.useEffect(() => {
97
97
  const raf = requestAnimationFrame(() => setReady(true));
98
98
  return () => cancelAnimationFrame(raf);
99
99
  }, []);
@@ -138,7 +138,7 @@ var IndeterminateSvg = React9.memo(function IndeterminateSvg2({
138
138
  }
139
139
  );
140
140
  });
141
- var DeterminateSvg = React9.memo(function DeterminateSvg2({
141
+ var DeterminateSvg = React2.memo(function DeterminateSvg2({
142
142
  size,
143
143
  progress
144
144
  }) {
@@ -163,7 +163,7 @@ var DeterminateSvg = React9.memo(function DeterminateSvg2({
163
163
  }
164
164
  );
165
165
  });
166
- var LoadingIndicator = React9.forwardRef(
166
+ var LoadingIndicator = React2.forwardRef(
167
167
  (_a, ref) => {
168
168
  var _b = _a, {
169
169
  variant = "uncontained",
@@ -258,7 +258,7 @@ function generateWavyCircularPath(center, radius, amplitude, wavelength) {
258
258
  if (i === 0) d += `M ${xAt(t0).toFixed(2)} ${yAt(t0).toFixed(2)}`;
259
259
  d += ` C ${cp1x.toFixed(2)} ${cp1y.toFixed(2)}, ${cp2x.toFixed(2)} ${cp2y.toFixed(2)}, ${xAt(t1).toFixed(2)} ${yAt(t1).toFixed(2)}`;
260
260
  }
261
- return d;
261
+ return `${d} Z`;
262
262
  }
263
263
  function getSinePath(startX, endX, phase, wl, amp) {
264
264
  if (startX >= endX) return "";
@@ -290,7 +290,15 @@ function getSinePath(startX, endX, phase, wl, amp) {
290
290
  }
291
291
  return d;
292
292
  }
293
- var CircularProgress = React9.forwardRef(
293
+ var GLOBAL_ROTATION_DURATION = 6e3;
294
+ var GLOBAL_ROTATION_TARGET = 1080;
295
+ var ADDITIONAL_ROTATION_CYCLE = 1500;
296
+ var ADDITIONAL_ROTATION_STEP = 90;
297
+ var ADDITIONAL_ROTATION_EASE_DURATION = 500;
298
+ var DEFAULT_MIN_PROGRESS = 0.1;
299
+ var DEFAULT_MAX_PROGRESS = 0.8;
300
+ var PROGRESS_CYCLE_DURATION = 1500;
301
+ var CircularProgress = React2.forwardRef(
294
302
  (_a, ref) => {
295
303
  var _b = _a, {
296
304
  value,
@@ -303,6 +311,10 @@ var CircularProgress = React9.forwardRef(
303
311
  crawlerSpeed = 1,
304
312
  color,
305
313
  trackColor,
314
+ showTrack = "auto",
315
+ minProgress = DEFAULT_MIN_PROGRESS,
316
+ maxProgress = DEFAULT_MAX_PROGRESS,
317
+ amplitudeRange,
306
318
  className,
307
319
  "aria-label": ariaLabel
308
320
  } = _b, restProps = __objRest(_b, [
@@ -316,6 +328,10 @@ var CircularProgress = React9.forwardRef(
316
328
  "crawlerSpeed",
317
329
  "color",
318
330
  "trackColor",
331
+ "showTrack",
332
+ "minProgress",
333
+ "maxProgress",
334
+ "amplitudeRange",
319
335
  "className",
320
336
  "aria-label"
321
337
  ]);
@@ -326,17 +342,22 @@ var CircularProgress = React9.forwardRef(
326
342
  const activeColor = color || "var(--md-sys-color-indicator-active)";
327
343
  const bgTrackColor = trackColor || "var(--md-sys-color-indicator-track)";
328
344
  const isWavy = shape === "wavy";
345
+ const shouldShowIndeterminateTrack = showTrack === "auto" ? isWavy : showTrack;
329
346
  const BASELINE_SIZE = 48;
330
347
  const scaleFactor = size / BASELINE_SIZE;
331
- const effectiveAmplitude = React9.useMemo(
348
+ const effectiveAmplitude = React2.useMemo(
332
349
  () => amplitude != null ? amplitude : 1.6 * scaleFactor,
333
350
  [amplitude, scaleFactor]
334
351
  );
335
- const effectiveWavelength = React9.useMemo(
352
+ const effectiveWavelength = React2.useMemo(
336
353
  () => wavelength != null ? wavelength : 15 * scaleFactor,
337
354
  [wavelength, scaleFactor]
338
355
  );
339
- const wavyActivePath = React9.useMemo(
356
+ const resolvedAmplitudeRange = React2.useMemo(
357
+ () => amplitudeRange != null ? amplitudeRange : [0, effectiveAmplitude],
358
+ [amplitudeRange, effectiveAmplitude]
359
+ );
360
+ const wavyActivePath = React2.useMemo(
340
361
  () => isWavy ? generateWavyCircularPath(
341
362
  center,
342
363
  radius,
@@ -345,8 +366,8 @@ var CircularProgress = React9.forwardRef(
345
366
  ) : null,
346
367
  [isWavy, center, radius, effectiveAmplitude, effectiveWavelength]
347
368
  );
348
- const circumference = React9.useMemo(() => 2 * Math.PI * radius, [radius]);
349
- const gapForTrack = React9.useMemo(
369
+ const circumference = React2.useMemo(() => 2 * Math.PI * radius, [radius]);
370
+ const gapForTrack = React2.useMemo(
350
371
  () => (gapSize + trackHeight) / circumference,
351
372
  [gapSize, trackHeight, circumference]
352
373
  );
@@ -355,6 +376,145 @@ var CircularProgress = React9.forwardRef(
355
376
  const trackLength = isDeterminate ? Math.max(1e-3, 1 - activeAngularFraction - 2 * gapForTrack) : 1;
356
377
  const ActiveCircleElem = m.circle;
357
378
  const ActivePathElem = m.path;
379
+ const indeterminateSvgRef = React2.useRef(null);
380
+ const indeterminateTrackRef = React2.useRef(null);
381
+ const indeterminateActiveRef = React2.useRef(null);
382
+ const indeterminateWavyTrackPathRef = React2.useRef(null);
383
+ const indeterminateWavyActivePathRef = React2.useRef(null);
384
+ const cachedPathLengthRef = React2.useRef(0);
385
+ React2.useLayoutEffect(() => {
386
+ if (!isWavy || !wavyActivePath) {
387
+ cachedPathLengthRef.current = circumference;
388
+ return;
389
+ }
390
+ const el = indeterminateActiveRef.current;
391
+ if (el && "getTotalLength" in el) {
392
+ try {
393
+ const len = el.getTotalLength();
394
+ if (len > 0) {
395
+ cachedPathLengthRef.current = len;
396
+ return;
397
+ }
398
+ } catch (e) {
399
+ }
400
+ }
401
+ cachedPathLengthRef.current = circumference;
402
+ }, [isWavy, circumference, wavyActivePath]);
403
+ useAnimationFrame((time) => {
404
+ if (isDeterminate) return;
405
+ const safeCrawlerSpeed = Math.max(0.1, crawlerSpeed);
406
+ const scaledTime = time * safeCrawlerSpeed;
407
+ const globalCycle = scaledTime % GLOBAL_ROTATION_DURATION;
408
+ const globalAngle = globalCycle / GLOBAL_ROTATION_DURATION * GLOBAL_ROTATION_TARGET;
409
+ const additionalFullCycles = Math.floor(
410
+ scaledTime / ADDITIONAL_ROTATION_CYCLE
411
+ );
412
+ const additionalCycleTime = scaledTime % ADDITIONAL_ROTATION_CYCLE;
413
+ const additionalEaseT = Math.min(
414
+ 1,
415
+ additionalCycleTime / ADDITIONAL_ROTATION_EASE_DURATION
416
+ );
417
+ const additionalAngle = (additionalFullCycles + easeInOutCubic(additionalEaseT)) * ADDITIONAL_ROTATION_STEP;
418
+ const totalRotation = globalAngle + additionalAngle;
419
+ if (indeterminateSvgRef.current) {
420
+ indeterminateSvgRef.current.style.transform = `rotate(${totalRotation - 90}deg)`;
421
+ }
422
+ const progressFullCycle = PROGRESS_CYCLE_DURATION * 2;
423
+ const progressCycleTime = scaledTime % progressFullCycle;
424
+ let progress;
425
+ if (progressCycleTime < PROGRESS_CYCLE_DURATION) {
426
+ const t = progressCycleTime / PROGRESS_CYCLE_DURATION;
427
+ progress = minProgress + (maxProgress - minProgress) * easeInOutCubic(t);
428
+ } else {
429
+ const t = (progressCycleTime - PROGRESS_CYCLE_DURATION) / PROGRESS_CYCLE_DURATION;
430
+ progress = maxProgress - (maxProgress - minProgress) * easeInOutCubic(t);
431
+ }
432
+ if (isWavy) {
433
+ const amplitudeT = (progress - minProgress) / (maxProgress - minProgress);
434
+ const currentAmplitude = resolvedAmplitudeRange[0] + (resolvedAmplitudeRange[1] - resolvedAmplitudeRange[0]) * amplitudeT;
435
+ const dynamicPath = generateWavyCircularPath(
436
+ center,
437
+ radius,
438
+ currentAmplitude,
439
+ effectiveWavelength
440
+ );
441
+ if (indeterminateWavyActivePathRef.current) {
442
+ indeterminateWavyActivePathRef.current.setAttribute("d", dynamicPath);
443
+ }
444
+ if (indeterminateWavyTrackPathRef.current) {
445
+ indeterminateWavyTrackPathRef.current.setAttribute("d", dynamicPath);
446
+ }
447
+ const pathEl = indeterminateWavyActivePathRef.current;
448
+ let totalLen = cachedPathLengthRef.current || circumference;
449
+ if (pathEl) {
450
+ try {
451
+ const len = pathEl.getTotalLength();
452
+ if (len > 0) totalLen = len;
453
+ } catch (e) {
454
+ }
455
+ }
456
+ const gapFrac = (gapSize + trackHeight) / totalLen;
457
+ const activeLen = totalLen * progress;
458
+ const activeOff = 0;
459
+ if (indeterminateWavyActivePathRef.current) {
460
+ indeterminateWavyActivePathRef.current.setAttribute(
461
+ "stroke-dasharray",
462
+ `${activeLen} ${totalLen}`
463
+ );
464
+ indeterminateWavyActivePathRef.current.setAttribute(
465
+ "stroke-dashoffset",
466
+ `${activeOff}`
467
+ );
468
+ }
469
+ if (shouldShowIndeterminateTrack && indeterminateWavyTrackPathRef.current) {
470
+ const trackStartFrac = progress + gapFrac;
471
+ const trackLen = Math.max(
472
+ 1e-3,
473
+ totalLen * (1 - progress - 2 * gapFrac)
474
+ );
475
+ const trackOff = -totalLen * trackStartFrac;
476
+ indeterminateWavyTrackPathRef.current.setAttribute(
477
+ "stroke-dasharray",
478
+ `${trackLen} ${totalLen}`
479
+ );
480
+ indeterminateWavyTrackPathRef.current.setAttribute(
481
+ "stroke-dashoffset",
482
+ `${trackOff}`
483
+ );
484
+ }
485
+ } else {
486
+ const totalLen = circumference;
487
+ const activeLen = totalLen * progress;
488
+ const activeOff = 0;
489
+ if (indeterminateActiveRef.current) {
490
+ indeterminateActiveRef.current.setAttribute(
491
+ "stroke-dasharray",
492
+ `${activeLen} ${totalLen}`
493
+ );
494
+ indeterminateActiveRef.current.setAttribute(
495
+ "stroke-dashoffset",
496
+ `${activeOff}`
497
+ );
498
+ }
499
+ if (shouldShowIndeterminateTrack && indeterminateTrackRef.current) {
500
+ const gapFrac = (gapSize + trackHeight) / totalLen;
501
+ const trackStartFrac = progress + gapFrac;
502
+ const trackLen = Math.max(
503
+ 1e-3,
504
+ totalLen * (1 - progress - 2 * gapFrac)
505
+ );
506
+ const trackOff = -totalLen * trackStartFrac;
507
+ indeterminateTrackRef.current.setAttribute(
508
+ "stroke-dasharray",
509
+ `${trackLen} ${totalLen}`
510
+ );
511
+ indeterminateTrackRef.current.setAttribute(
512
+ "stroke-dashoffset",
513
+ `${trackOff}`
514
+ );
515
+ }
516
+ }
517
+ });
358
518
  return /* @__PURE__ */ jsx(
359
519
  "div",
360
520
  __spreadProps(__spreadValues({
@@ -431,9 +591,10 @@ var CircularProgress = React9.forwardRef(
431
591
  ]
432
592
  }
433
593
  ),
434
- !isDeterminate && /* @__PURE__ */ jsxs(
435
- m.svg,
594
+ !isDeterminate && /* @__PURE__ */ jsx(
595
+ "svg",
436
596
  {
597
+ ref: indeterminateSvgRef,
437
598
  width: size,
438
599
  height: size,
439
600
  viewBox: `0 0 ${size} ${size}`,
@@ -442,84 +603,60 @@ var CircularProgress = React9.forwardRef(
442
603
  position: "absolute",
443
604
  inset: 0,
444
605
  overflow: "visible",
445
- transformOrigin: "center"
446
- },
447
- animate: { rotate: [0, 360] },
448
- transition: {
449
- duration: 2 / Math.max(0.1, crawlerSpeed),
450
- repeat: Number.POSITIVE_INFINITY,
451
- ease: "linear"
606
+ transformOrigin: "center",
607
+ transform: "rotate(-90deg)"
452
608
  },
453
- children: [
454
- /* @__PURE__ */ jsx(
455
- m.circle,
609
+ children: isWavy ? /* @__PURE__ */ jsxs(Fragment, { children: [
610
+ shouldShowIndeterminateTrack && /* @__PURE__ */ jsx(
611
+ "path",
456
612
  {
457
- cx: center,
458
- cy: center,
459
- r: radius,
613
+ ref: indeterminateWavyTrackPathRef,
614
+ d: wavyActivePath != null ? wavyActivePath : "",
460
615
  fill: "none",
461
616
  stroke: bgTrackColor,
462
617
  strokeWidth: trackHeight,
463
- strokeLinecap: "round",
464
- animate: {
465
- pathLength: [
466
- Math.max(1e-3, 0.9 - 2 * gapForTrack),
467
- Math.max(1e-3, 0.25 - 2 * gapForTrack),
468
- Math.max(1e-3, 0.9 - 2 * gapForTrack)
469
- ],
470
- pathOffset: [
471
- 0.1 + gapForTrack,
472
- 0.75 + gapForTrack,
473
- 0.1 + gapForTrack
474
- ]
475
- },
476
- transition: {
477
- duration: 2 / Math.max(0.1, crawlerSpeed),
478
- repeat: Number.POSITIVE_INFINITY,
479
- ease: [0.4, 0, 0.2, 1]
480
- }
618
+ strokeLinecap: "round"
481
619
  }
482
620
  ),
483
- isWavy ? /* @__PURE__ */ jsx(
484
- ActivePathElem,
621
+ /* @__PURE__ */ jsx(
622
+ "path",
485
623
  {
624
+ ref: indeterminateWavyActivePathRef,
486
625
  d: wavyActivePath != null ? wavyActivePath : "",
487
626
  fill: "none",
488
627
  stroke: activeColor,
489
628
  strokeWidth: trackHeight,
490
- strokeLinecap: "round",
491
- animate: {
492
- pathLength: [0.1, 0.75, 0.1],
493
- pathOffset: [0, 0.65, 1]
494
- },
495
- transition: {
496
- duration: 2 / Math.max(0.1, crawlerSpeed),
497
- repeat: Number.POSITIVE_INFINITY,
498
- ease: [0.4, 0, 0.2, 1]
499
- }
629
+ strokeLinecap: "round"
500
630
  }
501
- ) : /* @__PURE__ */ jsx(
502
- ActiveCircleElem,
631
+ )
632
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
633
+ shouldShowIndeterminateTrack && /* @__PURE__ */ jsx(
634
+ "circle",
503
635
  {
636
+ ref: indeterminateTrackRef,
637
+ cx: center,
638
+ cy: center,
639
+ r: radius,
640
+ fill: "none",
641
+ stroke: bgTrackColor,
642
+ strokeWidth: trackHeight,
643
+ strokeLinecap: "round"
644
+ }
645
+ ),
646
+ /* @__PURE__ */ jsx(
647
+ "circle",
648
+ {
649
+ ref: indeterminateActiveRef,
504
650
  cx: center,
505
651
  cy: center,
506
652
  r: radius,
507
653
  fill: "none",
508
654
  stroke: activeColor,
509
655
  strokeWidth: trackHeight,
510
- strokeLinecap: "round",
511
- animate: {
512
- pathLength: [0.1, 0.75, 0.1],
513
- pathOffset: [0, 0.65, 1]
514
- },
515
- transition: {
516
- duration: 2 / Math.max(0.1, crawlerSpeed),
517
- repeat: Number.POSITIVE_INFINITY,
518
- ease: [0.4, 0, 0.2, 1]
519
- }
656
+ strokeLinecap: "round"
520
657
  }
521
658
  )
522
- ]
659
+ ] })
523
660
  }
524
661
  )
525
662
  ] })
@@ -529,9 +666,9 @@ var CircularProgress = React9.forwardRef(
529
666
  );
530
667
  CircularProgress.displayName = "CircularProgress";
531
668
  function useContainerWidth() {
532
- const [width, setWidth] = React9.useState(0);
533
- const observerRef = React9.useRef(null);
534
- const ref = React9.useCallback((node) => {
669
+ const [width, setWidth] = React2.useState(0);
670
+ const observerRef = React2.useRef(null);
671
+ const ref = React2.useCallback((node) => {
535
672
  if (observerRef.current) {
536
673
  observerRef.current.disconnect();
537
674
  observerRef.current = null;
@@ -545,7 +682,7 @@ function useContainerWidth() {
545
682
  observerRef.current = obs;
546
683
  }
547
684
  }, []);
548
- React9.useEffect(() => {
685
+ React2.useEffect(() => {
549
686
  return () => {
550
687
  if (observerRef.current) {
551
688
  observerRef.current.disconnect();
@@ -555,7 +692,7 @@ function useContainerWidth() {
555
692
  return [ref, width];
556
693
  }
557
694
  function useMergedRef(...refs) {
558
- return React9.useCallback(
695
+ return React2.useCallback(
559
696
  (node) => {
560
697
  for (const ref of refs) {
561
698
  if (typeof ref === "function") {
@@ -569,7 +706,7 @@ function useMergedRef(...refs) {
569
706
  [refs]
570
707
  );
571
708
  }
572
- var FlatLinearTrack = React9.memo(function FlatLinearTrack2({
709
+ var FlatLinearTrack = React2.memo(function FlatLinearTrack2({
573
710
  trackHeight,
574
711
  activeColor,
575
712
  trackColor,
@@ -645,7 +782,7 @@ var FlatLinearTrack = React9.memo(function FlatLinearTrack2({
645
782
  }
646
783
  );
647
784
  });
648
- var WavyLinearTrack = React9.memo(function WavyLinearTrack2({
785
+ var WavyLinearTrack = React2.memo(function WavyLinearTrack2({
649
786
  trackHeight,
650
787
  svgHeight,
651
788
  amplitude,
@@ -664,13 +801,13 @@ var WavyLinearTrack = React9.memo(function WavyLinearTrack2({
664
801
  }) {
665
802
  const isDeterminate = typeof value === "number";
666
803
  const clampedValue = isDeterminate ? Math.max(0, Math.min(100, value)) : 100;
667
- const titleId = React9.useId();
804
+ const titleId = React2.useId();
668
805
  const [containerRef, width] = useContainerWidth();
669
- const activePathRef = React9.useRef(null);
670
- const trackPathRef = React9.useRef(null);
806
+ const activePathRef = React2.useRef(null);
807
+ const trackPathRef = React2.useRef(null);
671
808
  const amplitudeMV = useMotionValue(amplitude);
672
809
  const fractionMV = useMotionValue(isDeterminate ? clampedValue / 100 : 1);
673
- React9.useEffect(() => {
810
+ React2.useEffect(() => {
674
811
  if (isDeterminate) {
675
812
  const fraction = clampedValue / 100;
676
813
  let targetAmp = amplitude;
@@ -725,7 +862,7 @@ var WavyLinearTrack = React9.memo(function WavyLinearTrack2({
725
862
  currentAmp
726
863
  );
727
864
  } else if (fraction === 0) {
728
- activePathD = `M ${capWidth} 0 L ${capWidth + 0.01} 0`;
865
+ activePathD = "";
729
866
  }
730
867
  const trackStart = adjHead + totalGap;
731
868
  if (trackStart < width - capWidth) {
@@ -757,20 +894,20 @@ var WavyLinearTrack = React9.memo(function WavyLinearTrack2({
757
894
  activeLines.push({ tail: l1T, head: l1H });
758
895
  activeLines.push({ tail: l2T, head: l2H });
759
896
  }
760
- const segments = activeLines.map((line) => {
761
- const barTail = line.tail * width;
762
- const barHead = line.head * width;
897
+ const activeSegments = activeLines.map((line) => {
898
+ const rawTail = line.tail * width;
899
+ const rawHead = line.head * width;
763
900
  const adjTail = Math.max(
764
901
  capWidth,
765
- Math.min(width - capWidth, barTail)
902
+ Math.min(width - capWidth, rawTail)
766
903
  );
767
904
  const adjHead = Math.max(
768
905
  capWidth,
769
- Math.min(width - capWidth, barHead)
906
+ Math.min(width - capWidth, rawHead)
770
907
  );
771
908
  return { adjTail, adjHead };
772
909
  }).filter((seg) => seg.adjHead - seg.adjTail > 0.1);
773
- activePathD = segments.map(
910
+ activePathD = activeSegments.map(
774
911
  (seg) => getSinePath(
775
912
  seg.adjTail,
776
913
  seg.adjHead,
@@ -779,13 +916,24 @@ var WavyLinearTrack = React9.memo(function WavyLinearTrack2({
779
916
  currentAmp
780
917
  )
781
918
  ).join(" ");
919
+ const validActiveLines = activeLines.filter(
920
+ (line) => line.head > line.tail && line.head * width > 0 && line.tail * width < width
921
+ ).sort((a, b) => a.tail - b.tail);
782
922
  let currentTrackX = capWidth;
783
- for (const seg of segments) {
784
- const trackEnd = seg.adjTail - totalGap;
923
+ for (const line of validActiveLines) {
924
+ const blockStart = line.tail * width - totalGap;
925
+ const blockEnd = line.head * width + totalGap;
926
+ const trackEnd = Math.min(width - capWidth, blockStart);
785
927
  if (trackEnd > currentTrackX) {
786
- trackD += `${getSinePath(currentTrackX, trackEnd, phase, activeWavelength, trackAmp)} `;
928
+ trackD += `${getSinePath(
929
+ currentTrackX,
930
+ trackEnd,
931
+ phase,
932
+ activeWavelength,
933
+ trackAmp
934
+ )} `;
787
935
  }
788
- currentTrackX = Math.max(currentTrackX, seg.adjHead + totalGap);
936
+ currentTrackX = Math.max(currentTrackX, blockEnd);
789
937
  }
790
938
  if (currentTrackX < width - capWidth) {
791
939
  trackD += getSinePath(
@@ -798,9 +946,9 @@ var WavyLinearTrack = React9.memo(function WavyLinearTrack2({
798
946
  }
799
947
  }
800
948
  if (activePathRef.current)
801
- activePathRef.current.setAttribute("d", activePathD);
949
+ activePathRef.current.setAttribute("d", activePathD || "");
802
950
  if (trackPathRef.current)
803
- trackPathRef.current.setAttribute("d", trackD.trim());
951
+ trackPathRef.current.setAttribute("d", trackD.trim() || "");
804
952
  });
805
953
  return /* @__PURE__ */ jsx(
806
954
  "div",
@@ -847,7 +995,7 @@ var WavyLinearTrack = React9.memo(function WavyLinearTrack2({
847
995
  }
848
996
  );
849
997
  });
850
- var LinearProgress = React9.forwardRef(
998
+ var LinearProgress = React2.forwardRef(
851
999
  (_a, ref) => {
852
1000
  var _b = _a, {
853
1001
  value,
@@ -888,10 +1036,10 @@ var LinearProgress = React9.forwardRef(
888
1036
  ]);
889
1037
  const isDeterminate = value !== void 0;
890
1038
  const clampedValue = isDeterminate ? Math.min(100, Math.max(0, value)) : 0;
891
- const containerRef = React9.useRef(null);
1039
+ const containerRef = React2.useRef(null);
892
1040
  const mergedRef = useMergedRef(ref, containerRef);
893
- const [isRtl, setIsRtl] = React9.useState(false);
894
- React9.useEffect(() => {
1041
+ const [isRtl, setIsRtl] = React2.useState(false);
1042
+ React2.useEffect(() => {
895
1043
  if (containerRef.current) {
896
1044
  const dir = getComputedStyle(containerRef.current).direction;
897
1045
  setIsRtl(dir === "rtl");
@@ -899,16 +1047,16 @@ var LinearProgress = React9.forwardRef(
899
1047
  }, []);
900
1048
  const resolvedTrackShape = trackShape != null ? trackShape : shape;
901
1049
  const isWavy = shape === "wavy" || resolvedTrackShape === "wavy";
902
- const effectiveAmplitude = React9.useMemo(() => amplitude != null ? amplitude : 3, [amplitude]);
903
- const svgHeight = React9.useMemo(
1050
+ const effectiveAmplitude = React2.useMemo(() => amplitude != null ? amplitude : 3, [amplitude]);
1051
+ const svgHeight = React2.useMemo(
904
1052
  () => isWavy ? trackHeight + effectiveAmplitude * 2 : trackHeight,
905
1053
  [isWavy, trackHeight, effectiveAmplitude]
906
1054
  );
907
- const shouldShowStop = React9.useMemo(
1055
+ const shouldShowStop = React2.useMemo(
908
1056
  () => isDeterminate && resolvedTrackShape === "flat" && showStopIndicator !== false,
909
1057
  [isDeterminate, resolvedTrackShape, showStopIndicator]
910
1058
  );
911
- const stopSize = React9.useMemo(
1059
+ const stopSize = React2.useMemo(
912
1060
  () => Math.max(2, trackHeight > 4 ? 4 : trackHeight / 2),
913
1061
  [trackHeight]
914
1062
  );
@@ -983,14 +1131,14 @@ var LinearProgress = React9.forwardRef(
983
1131
  }
984
1132
  );
985
1133
  LinearProgress.displayName = "LinearProgress";
986
- var ProgressIndicator = React9.forwardRef((props, ref) => {
1134
+ var ProgressIndicator = React2.forwardRef((props, ref) => {
987
1135
  if (props.variant === "circular") {
988
1136
  return /* @__PURE__ */ jsx(CircularProgress, __spreadValues({ ref }, props));
989
1137
  }
990
1138
  return /* @__PURE__ */ jsx(LinearProgress, __spreadValues({ ref }, props));
991
1139
  });
992
1140
  ProgressIndicator.displayName = "ProgressIndicator";
993
- var RippleItem = React9.memo(function RippleItem2({
1141
+ var RippleItem = React2.memo(function RippleItem2({
994
1142
  ripple,
995
1143
  onDone
996
1144
  }) {
@@ -1034,8 +1182,8 @@ function Ripple({
1034
1182
  }
1035
1183
  function useRippleState(options = {}) {
1036
1184
  const { disabled = false } = options;
1037
- const [ripples, setRipples] = React9.useState([]);
1038
- const onPointerDown = React9.useCallback(
1185
+ const [ripples, setRipples] = React2.useState([]);
1186
+ const onPointerDown = React2.useCallback(
1039
1187
  (e) => {
1040
1188
  if (disabled) return;
1041
1189
  const rect = e.currentTarget.getBoundingClientRect();
@@ -1052,7 +1200,7 @@ function useRippleState(options = {}) {
1052
1200
  },
1053
1201
  [disabled]
1054
1202
  );
1055
- const removeRipple = React9.useCallback((id) => {
1203
+ const removeRipple = React2.useCallback((id) => {
1056
1204
  setRipples((prev) => prev.filter((r) => r.id !== id));
1057
1205
  }, []);
1058
1206
  return { ripples, onPointerDown, removeRipple };
@@ -1287,7 +1435,7 @@ function resolveDisabledBgClass(colorStyle) {
1287
1435
  }
1288
1436
  return "disabled:text-m3-on-surface/[0.38]";
1289
1437
  }
1290
- var IconButtonComponent = React9.forwardRef(
1438
+ var IconButtonComponent = React2.forwardRef(
1291
1439
  (_a, ref) => {
1292
1440
  var _b = _a, {
1293
1441
  className,
@@ -1295,7 +1443,7 @@ var IconButtonComponent = React9.forwardRef(
1295
1443
  variant = "default",
1296
1444
  colorStyle = "standard",
1297
1445
  size = "sm",
1298
- widthVariant = "default",
1446
+ width = "default",
1299
1447
  shape = "round",
1300
1448
  selected,
1301
1449
  selectedIcon,
@@ -1313,7 +1461,7 @@ var IconButtonComponent = React9.forwardRef(
1313
1461
  "variant",
1314
1462
  "colorStyle",
1315
1463
  "size",
1316
- "widthVariant",
1464
+ "width",
1317
1465
  "shape",
1318
1466
  "selected",
1319
1467
  "selectedIcon",
@@ -1329,18 +1477,18 @@ var IconButtonComponent = React9.forwardRef(
1329
1477
  var _a2, _b2, _c, _d, _e;
1330
1478
  const isToggle = variant === "toggle";
1331
1479
  const isSelected = isToggle && !!selected;
1332
- const resolvedColorClass = React9.useMemo(
1480
+ const resolvedColorClass = React2.useMemo(
1333
1481
  () => isSelected ? colorStyles[colorStyle].selected : colorStyles[colorStyle].default,
1334
1482
  [isSelected, colorStyle]
1335
1483
  );
1336
- const outlineWidthClass = React9.useMemo(
1484
+ const outlineWidthClass = React2.useMemo(
1337
1485
  () => {
1338
1486
  var _a3;
1339
1487
  return colorStyle === "outlined" && !isSelected ? (_a3 = SIZE_OUTLINE_WIDTH[size]) != null ? _a3 : "border" : "";
1340
1488
  },
1341
1489
  [colorStyle, isSelected, size]
1342
1490
  );
1343
- const disabledBgClass = React9.useMemo(
1491
+ const disabledBgClass = React2.useMemo(
1344
1492
  () => resolveDisabledBgClass(colorStyle),
1345
1493
  [colorStyle]
1346
1494
  );
@@ -1358,12 +1506,12 @@ var IconButtonComponent = React9.forwardRef(
1358
1506
  const iconPx = iconSize != null ? iconSize : defaultIconPx;
1359
1507
  const isCustomSize = iconSize != null && iconSize !== "inherit";
1360
1508
  const heightClass = (_c = SIZE_HEIGHT_STYLES[size]) != null ? _c : SIZE_HEIGHT_STYLES.sm;
1361
- const widthClass = (_e = ((_d = WIDTH_SIZE_STYLES[size]) != null ? _d : WIDTH_SIZE_STYLES.sm)[widthVariant]) != null ? _e : WIDTH_SIZE_STYLES.sm.default;
1509
+ const widthClass = (_e = ((_d = WIDTH_SIZE_STYLES[size]) != null ? _d : WIDTH_SIZE_STYLES.sm)[width]) != null ? _e : WIDTH_SIZE_STYLES.sm.default;
1362
1510
  const needsTouchTarget = size === "xs" || size === "sm";
1363
1511
  const { ripples, onPointerDown, removeRipple } = useRippleState({
1364
1512
  disabled: loading
1365
1513
  });
1366
- const handleClick = React9.useCallback(
1514
+ const handleClick = React2.useCallback(
1367
1515
  (e) => {
1368
1516
  if (loading) {
1369
1517
  e.preventDefault();
@@ -1373,7 +1521,7 @@ var IconButtonComponent = React9.forwardRef(
1373
1521
  },
1374
1522
  [loading, onClick]
1375
1523
  );
1376
- const handleKeyDown = React9.useCallback(
1524
+ const handleKeyDown = React2.useCallback(
1377
1525
  (e) => {
1378
1526
  if (loading) return;
1379
1527
  if ((e.key === "Enter" || e.key === " ") && onClick) {
@@ -1429,7 +1577,7 @@ var IconButtonComponent = React9.forwardRef(
1429
1577
  width: isCustomSize ? `${iconSize}px` : void 0,
1430
1578
  height: isCustomSize ? `${iconSize}px` : void 0
1431
1579
  },
1432
- children: isSelected && selectedIcon ? selectedIcon : asChild ? React9.Children.only(children).props.children : children
1580
+ children: isSelected && selectedIcon ? selectedIcon : asChild ? React2.Children.only(children).props.children : children
1433
1581
  }),
1434
1582
  isSelected && selectedIcon ? "selected-content" : "content"
1435
1583
  ) })
@@ -1446,7 +1594,7 @@ var IconButtonComponent = React9.forwardRef(
1446
1594
  className
1447
1595
  );
1448
1596
  if (asChild) {
1449
- const child = React9.Children.only(children);
1597
+ const child = React2.Children.only(children);
1450
1598
  return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: true, children: /* @__PURE__ */ jsx(
1451
1599
  Slot,
1452
1600
  __spreadProps(__spreadValues({
@@ -1463,7 +1611,7 @@ var IconButtonComponent = React9.forwardRef(
1463
1611
  }),
1464
1612
  className: containerClassName
1465
1613
  }, restProps), {
1466
- children: React9.cloneElement(child, { children: innerContent })
1614
+ children: React2.cloneElement(child, { children: innerContent })
1467
1615
  })
1468
1616
  ) });
1469
1617
  }
@@ -1491,13 +1639,13 @@ var IconButtonComponent = React9.forwardRef(
1491
1639
  }
1492
1640
  );
1493
1641
  IconButtonComponent.displayName = "IconButton";
1494
- var IconButton = React9.memo(IconButtonComponent);
1642
+ var IconButton = React2.memo(IconButtonComponent);
1495
1643
  var VARIANT_FONT = {
1496
1644
  outlined: "'Material Symbols Outlined'",
1497
1645
  rounded: "'Material Symbols Rounded'",
1498
1646
  sharp: "'Material Symbols Sharp'"
1499
1647
  };
1500
- var IconComponent = React9.forwardRef(
1648
+ var IconComponent = React2.forwardRef(
1501
1649
  (_a, ref) => {
1502
1650
  var _b = _a, {
1503
1651
  name,
@@ -1563,8 +1711,8 @@ var IconComponent = React9.forwardRef(
1563
1711
  }
1564
1712
  );
1565
1713
  IconComponent.displayName = "Icon";
1566
- var Icon = React9.memo(IconComponent);
1567
- var ScrollArea = React9.forwardRef(
1714
+ var Icon = React2.memo(IconComponent);
1715
+ var ScrollArea = React2.forwardRef(
1568
1716
  (_a, ref) => {
1569
1717
  var _b = _a, {
1570
1718
  className,
@@ -1585,15 +1733,15 @@ var ScrollArea = React9.forwardRef(
1585
1733
  "viewportRef",
1586
1734
  "viewportProps"
1587
1735
  ]);
1588
- const [isTouchDevice, setIsTouchDevice] = React9.useState(false);
1589
- React9.useEffect(() => {
1736
+ const [isTouchDevice, setIsTouchDevice] = React2.useState(false);
1737
+ React2.useEffect(() => {
1590
1738
  if (typeof window !== "undefined") {
1591
1739
  setIsTouchDevice(
1592
1740
  "ontouchstart" in window || navigator.maxTouchPoints > 0
1593
1741
  );
1594
1742
  }
1595
1743
  }, []);
1596
- const resolvedType = React9.useMemo(() => {
1744
+ const resolvedType = React2.useMemo(() => {
1597
1745
  if (type === "hover" && isTouchDevice) {
1598
1746
  return "scroll";
1599
1747
  }
@@ -1644,7 +1792,7 @@ var ScrollArea = React9.forwardRef(
1644
1792
  }
1645
1793
  );
1646
1794
  ScrollArea.displayName = "ScrollArea";
1647
- var ScrollAreaScrollbar = React9.forwardRef((_a, ref) => {
1795
+ var ScrollAreaScrollbar = React2.forwardRef((_a, ref) => {
1648
1796
  var _b = _a, { className, orientation = "vertical" } = _b, props = __objRest(_b, ["className", "orientation"]);
1649
1797
  return /* @__PURE__ */ jsx(
1650
1798
  RadixScrollArea.Scrollbar,
@@ -1674,7 +1822,7 @@ var ScrollAreaScrollbar = React9.forwardRef((_a, ref) => {
1674
1822
  );
1675
1823
  });
1676
1824
  ScrollAreaScrollbar.displayName = RadixScrollArea.Scrollbar.displayName;
1677
- var ScrollAreaCorner = React9.forwardRef((_a, ref) => {
1825
+ var ScrollAreaCorner = React2.forwardRef((_a, ref) => {
1678
1826
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1679
1827
  return /* @__PURE__ */ jsx(
1680
1828
  RadixScrollArea.Corner,
@@ -1716,9 +1864,9 @@ DialogTrigger.displayName = "DialogTrigger";
1716
1864
  var DialogPortal = ({
1717
1865
  open,
1718
1866
  children
1719
- }) => /* @__PURE__ */ jsx(RadixDialog.Portal, { forceMount: true, children: /* @__PURE__ */ jsx(AnimatePresence, { children: open ? React9.Children.toArray(children) : null }) });
1867
+ }) => /* @__PURE__ */ jsx(RadixDialog.Portal, { forceMount: true, children: /* @__PURE__ */ jsx(AnimatePresence, { children: open ? React2.Children.toArray(children) : null }) });
1720
1868
  DialogPortal.displayName = "DialogPortal";
1721
- var DialogOverlay = React9.forwardRef((_a, ref) => {
1869
+ var DialogOverlay = React2.forwardRef((_a, ref) => {
1722
1870
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1723
1871
  return /* @__PURE__ */ jsx(RadixDialog.Overlay, __spreadProps(__spreadValues({ ref, asChild: true }, props), { children: /* @__PURE__ */ jsx(
1724
1872
  m.div,
@@ -1729,7 +1877,7 @@ var DialogOverlay = React9.forwardRef((_a, ref) => {
1729
1877
  ) }));
1730
1878
  });
1731
1879
  DialogOverlay.displayName = "DialogOverlay";
1732
- var DialogContent = React9.forwardRef((_a, ref) => {
1880
+ var DialogContent = React2.forwardRef((_a, ref) => {
1733
1881
  var _b = _a, { className, children, hideCloseButton = false } = _b, props = __objRest(_b, ["className", "children", "hideCloseButton"]);
1734
1882
  return /* @__PURE__ */ jsx(
1735
1883
  RadixDialog.Content,
@@ -1769,7 +1917,7 @@ var DialogContent = React9.forwardRef((_a, ref) => {
1769
1917
  );
1770
1918
  });
1771
1919
  DialogContent.displayName = "DialogContent";
1772
- var DialogIcon = React9.forwardRef((_a, ref) => {
1920
+ var DialogIcon = React2.forwardRef((_a, ref) => {
1773
1921
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
1774
1922
  return /* @__PURE__ */ jsx(
1775
1923
  "div",
@@ -1792,7 +1940,7 @@ var DialogHeader = (_a) => {
1792
1940
  return /* @__PURE__ */ jsx("div", __spreadValues({ className: cn("flex flex-col gap-2 mb-4", className) }, props));
1793
1941
  };
1794
1942
  DialogHeader.displayName = "DialogHeader";
1795
- var DialogTitle = React9.forwardRef((_a, ref) => {
1943
+ var DialogTitle = React2.forwardRef((_a, ref) => {
1796
1944
  var _b = _a, { className, asChild } = _b, props = __objRest(_b, ["className", "asChild"]);
1797
1945
  return /* @__PURE__ */ jsx(
1798
1946
  RadixDialog.Title,
@@ -1807,7 +1955,7 @@ var DialogTitle = React9.forwardRef((_a, ref) => {
1807
1955
  );
1808
1956
  });
1809
1957
  DialogTitle.displayName = "DialogTitle";
1810
- var DialogDescription = React9.forwardRef((_a, ref) => {
1958
+ var DialogDescription = React2.forwardRef((_a, ref) => {
1811
1959
  var _b = _a, { className, asChild } = _b, props = __objRest(_b, ["className", "asChild"]);
1812
1960
  return /* @__PURE__ */ jsx(
1813
1961
  RadixDialog.Description,
@@ -1819,7 +1967,7 @@ var DialogDescription = React9.forwardRef((_a, ref) => {
1819
1967
  );
1820
1968
  });
1821
1969
  DialogDescription.displayName = "DialogDescription";
1822
- var DialogBody = React9.forwardRef((_a, ref) => {
1970
+ var DialogBody = React2.forwardRef((_a, ref) => {
1823
1971
  var _b = _a, { className, children, dir } = _b, props = __objRest(_b, ["className", "children", "dir"]);
1824
1972
  return /* @__PURE__ */ jsx(
1825
1973
  ScrollArea,
@@ -1850,7 +1998,7 @@ var DialogFooter = (_a) => {
1850
1998
  };
1851
1999
  DialogFooter.displayName = "DialogFooter";
1852
2000
  var DialogClose = RadixDialog.Close;
1853
- var DialogFullScreenContent = React9.forwardRef(
2001
+ var DialogFullScreenContent = React2.forwardRef(
1854
2002
  (_a, ref) => {
1855
2003
  var _b = _a, {
1856
2004
  className,
@@ -1947,7 +2095,7 @@ var DrawerPortal = ({
1947
2095
  open,
1948
2096
  children
1949
2097
  }) => /* @__PURE__ */ jsx(RadixDialog.Portal, { forceMount: true, children: /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: open && children }) });
1950
- var DrawerOverlay = React9.forwardRef((_a, ref) => {
2098
+ var DrawerOverlay = React2.forwardRef((_a, ref) => {
1951
2099
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1952
2100
  return /* @__PURE__ */ jsx(RadixDialog.Overlay, __spreadProps(__spreadValues({ ref, asChild: true }, props), { children: /* @__PURE__ */ jsx(
1953
2101
  m.div,
@@ -1958,7 +2106,7 @@ var DrawerOverlay = React9.forwardRef((_a, ref) => {
1958
2106
  ) }));
1959
2107
  });
1960
2108
  DrawerOverlay.displayName = "DrawerOverlay";
1961
- var DrawerContent = React9.forwardRef(
2109
+ var DrawerContent = React2.forwardRef(
1962
2110
  (_a, ref) => {
1963
2111
  var _b = _a, {
1964
2112
  className,
@@ -2037,7 +2185,7 @@ var DrawerFooter = (_a) => {
2037
2185
  return /* @__PURE__ */ jsx("div", __spreadValues({ className: cn("flex flex-col gap-2 mt-4", className) }, props));
2038
2186
  };
2039
2187
  DrawerFooter.displayName = "DrawerFooter";
2040
- var DrawerTitle = React9.forwardRef((_a, ref) => {
2188
+ var DrawerTitle = React2.forwardRef((_a, ref) => {
2041
2189
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2042
2190
  return /* @__PURE__ */ jsx(
2043
2191
  RadixDialog.Title,
@@ -2051,7 +2199,7 @@ var DrawerTitle = React9.forwardRef((_a, ref) => {
2051
2199
  );
2052
2200
  });
2053
2201
  DrawerTitle.displayName = "DrawerTitle";
2054
- var DrawerDescription = React9.forwardRef((_a, ref) => {
2202
+ var DrawerDescription = React2.forwardRef((_a, ref) => {
2055
2203
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2056
2204
  return /* @__PURE__ */ jsx(
2057
2205
  RadixDialog.Description,
@@ -2063,7 +2211,7 @@ var DrawerDescription = React9.forwardRef((_a, ref) => {
2063
2211
  });
2064
2212
  DrawerDescription.displayName = "DrawerDescription";
2065
2213
  var INDICATOR = "h-1 w-8 rounded-full bg-m3-on-surface-variant/40";
2066
- var DragHandle = React9.forwardRef(
2214
+ var DragHandle = React2.forwardRef(
2067
2215
  ({ className, onCycle, "aria-label": ariaLabel }, ref) => {
2068
2216
  const isInteractive = Boolean(onCycle);
2069
2217
  if (isInteractive) {
@@ -2616,7 +2764,7 @@ function resolveMaxHeight(maxHeight, snapPoints) {
2616
2764
  return ABSOLUTE_MAX_HEIGHT;
2617
2765
  return maxHeight;
2618
2766
  }
2619
- var BottomSheet = React9.forwardRef(
2767
+ var BottomSheet = React2.forwardRef(
2620
2768
  ({
2621
2769
  isOpen,
2622
2770
  onClose,
@@ -2649,27 +2797,27 @@ var BottomSheet = React9.forwardRef(
2649
2797
  isModal: false,
2650
2798
  maxHeight: resolveMaxHeight(maxHeight, snapPoints)
2651
2799
  });
2652
- React9.useEffect(() => {
2800
+ React2.useEffect(() => {
2653
2801
  const node = scope.current;
2654
2802
  if (node) {
2655
2803
  node.snapTo = snapTo;
2656
2804
  }
2657
2805
  }, [snapTo, scope]);
2658
- const [mounted, setMounted] = React9.useState(false);
2659
- React9.useEffect(() => {
2806
+ const [mounted, setMounted] = React2.useState(false);
2807
+ React2.useEffect(() => {
2660
2808
  setMounted(true);
2661
2809
  }, []);
2662
- const resolvedDividers = React9.useMemo(
2810
+ const resolvedDividers = React2.useMemo(
2663
2811
  () => resolveDividers(divider),
2664
2812
  [divider]
2665
2813
  );
2666
- const resolvedSheetMaxWidth = React9.useMemo(() => {
2814
+ const resolvedSheetMaxWidth = React2.useMemo(() => {
2667
2815
  if (sheetMaxWidth === void 0)
2668
2816
  return "var(--m3-bottom-sheet-max-width, 640px)";
2669
2817
  if (typeof sheetMaxWidth === "number") return `${sheetMaxWidth}px`;
2670
2818
  return sheetMaxWidth;
2671
2819
  }, [sheetMaxWidth]);
2672
- const mergedRef = React9.useCallback(
2820
+ const mergedRef = React2.useCallback(
2673
2821
  (node) => {
2674
2822
  scope(node);
2675
2823
  if (typeof ref === "function") ref(node);
@@ -2753,7 +2901,7 @@ var SCRIM_ANIM = {
2753
2901
  },
2754
2902
  exit: { opacity: 0, transition: { duration: 0.18, ease: "easeIn" } }
2755
2903
  };
2756
- var Scrim = React9.forwardRef(
2904
+ var Scrim = React2.forwardRef(
2757
2905
  ({ onClick, className, style }, ref) => /* @__PURE__ */ jsx(
2758
2906
  m.div,
2759
2907
  __spreadValues({
@@ -2785,7 +2933,7 @@ function resolveSheetMaxWidth(value) {
2785
2933
  if (typeof value === "number") return `${value}px`;
2786
2934
  return value;
2787
2935
  }
2788
- var BottomSheetModal = React9.forwardRef(
2936
+ var BottomSheetModal = React2.forwardRef(
2789
2937
  ({
2790
2938
  isOpen,
2791
2939
  onClose,
@@ -2824,21 +2972,21 @@ var BottomSheetModal = React9.forwardRef(
2824
2972
  isModal: true,
2825
2973
  maxHeight: resolveMaxHeight2(maxHeight, snapPoints)
2826
2974
  });
2827
- React9.useEffect(() => {
2975
+ React2.useEffect(() => {
2828
2976
  const node = scope.current;
2829
2977
  if (node) {
2830
2978
  node.snapTo = snapTo;
2831
2979
  }
2832
2980
  }, [snapTo, scope]);
2833
- const resolvedDividers = React9.useMemo(
2981
+ const resolvedDividers = React2.useMemo(
2834
2982
  () => resolveDividers(divider),
2835
2983
  [divider]
2836
2984
  );
2837
- const resolvedSheetMaxWidth = React9.useMemo(
2985
+ const resolvedSheetMaxWidth = React2.useMemo(
2838
2986
  () => resolveSheetMaxWidth(sheetMaxWidth),
2839
2987
  [sheetMaxWidth]
2840
2988
  );
2841
- const mergedRef = React9.useCallback(
2989
+ const mergedRef = React2.useCallback(
2842
2990
  (node) => {
2843
2991
  scope(node);
2844
2992
  if (typeof ref === "function") ref(node);
@@ -3037,7 +3185,7 @@ function useBottomSheetScaffold({
3037
3185
  containerRef
3038
3186
  };
3039
3187
  }
3040
- var BottomSheetScaffold = React9.forwardRef(
3188
+ var BottomSheetScaffold = React2.forwardRef(
3041
3189
  ({
3042
3190
  sheetContent,
3043
3191
  children,
@@ -3066,13 +3214,13 @@ var BottomSheetScaffold = React9.forwardRef(
3066
3214
  onStateChange: onSheetStateChange,
3067
3215
  initialState: initialSheetState
3068
3216
  });
3069
- const resolvedSheetMaxWidth = React9.useMemo(() => {
3217
+ const resolvedSheetMaxWidth = React2.useMemo(() => {
3070
3218
  if (sheetMaxWidth === void 0)
3071
3219
  return "var(--m3-bottom-sheet-max-width, 640px)";
3072
3220
  if (typeof sheetMaxWidth === "number") return `${sheetMaxWidth}px`;
3073
3221
  return sheetMaxWidth;
3074
3222
  }, [sheetMaxWidth]);
3075
- const mergedRef = React9.useCallback(
3223
+ const mergedRef = React2.useCallback(
3076
3224
  (node) => {
3077
3225
  containerRef(node);
3078
3226
  if (typeof ref === "function") ref(node);
@@ -3080,7 +3228,7 @@ var BottomSheetScaffold = React9.forwardRef(
3080
3228
  },
3081
3229
  [containerRef, ref]
3082
3230
  );
3083
- const resolvedDragHandle = React9.useMemo(() => {
3231
+ const resolvedDragHandle = React2.useMemo(() => {
3084
3232
  if (sheetDragHandle === null) return null;
3085
3233
  if (sheetDragHandle !== void 0) return sheetDragHandle;
3086
3234
  return /* @__PURE__ */ jsx(DragHandle, { onCycle: toggle });
@@ -3143,7 +3291,7 @@ var BottomSheetScaffold = React9.forwardRef(
3143
3291
  );
3144
3292
  BottomSheetScaffold.displayName = "BottomSheetScaffold";
3145
3293
  var COPLANAR_TRANSITION = `margin ${getMotionTransitionCSS("default", "spatial")}`;
3146
- var SideSheet = React9.forwardRef(
3294
+ var SideSheet = React2.forwardRef(
3147
3295
  ({
3148
3296
  isOpen,
3149
3297
  children,
@@ -3159,16 +3307,16 @@ var SideSheet = React9.forwardRef(
3159
3307
  divider,
3160
3308
  scrollAreaProps
3161
3309
  }, ref) => {
3162
- const sheetAnim = React9.useMemo(() => buildSideSheetAnim(edge), [edge]);
3163
- const [mounted, setMounted] = React9.useState(false);
3164
- React9.useEffect(() => {
3310
+ const sheetAnim = React2.useMemo(() => buildSideSheetAnim(edge), [edge]);
3311
+ const [mounted, setMounted] = React2.useState(false);
3312
+ React2.useEffect(() => {
3165
3313
  setMounted(true);
3166
3314
  }, []);
3167
- const resolvedDividers = React9.useMemo(
3315
+ const resolvedDividers = React2.useMemo(
3168
3316
  () => resolveDividers(divider),
3169
3317
  [divider]
3170
3318
  );
3171
- React9.useEffect(() => {
3319
+ React2.useEffect(() => {
3172
3320
  const sibling = coplanarSiblingRef == null ? void 0 : coplanarSiblingRef.current;
3173
3321
  if (!sibling) return;
3174
3322
  sibling.style.transition = COPLANAR_TRANSITION;
@@ -3232,7 +3380,7 @@ var SideSheet = React9.forwardRef(
3232
3380
  }
3233
3381
  );
3234
3382
  SideSheet.displayName = "SideSheet";
3235
- var SideSheetModal = React9.forwardRef(
3383
+ var SideSheetModal = React2.forwardRef(
3236
3384
  ({
3237
3385
  isOpen,
3238
3386
  onClose,
@@ -3247,8 +3395,8 @@ var SideSheetModal = React9.forwardRef(
3247
3395
  divider,
3248
3396
  scrollAreaProps
3249
3397
  }, ref) => {
3250
- const sheetAnim = React9.useMemo(() => buildSideSheetAnim(edge), [edge]);
3251
- const resolvedDividers = React9.useMemo(
3398
+ const sheetAnim = React2.useMemo(() => buildSideSheetAnim(edge), [edge]);
3399
+ const resolvedDividers = React2.useMemo(
3252
3400
  () => resolveDividers(divider),
3253
3401
  [divider]
3254
3402
  );