@bug-on/m3-expressive 1.2.0 → 1.2.2

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 +26 -5
  3. package/dist/buttons.d.ts +26 -5
  4. package/dist/buttons.js +1074 -765
  5. package/dist/buttons.js.map +1 -1
  6. package/dist/buttons.mjs +1066 -765
  7. package/dist/buttons.mjs.map +1 -1
  8. package/dist/core.js +133 -69
  9. package/dist/core.js.map +1 -1
  10. package/dist/core.mjs +133 -69
  11. package/dist/core.mjs.map +1 -1
  12. package/dist/feedback.js +132 -69
  13. package/dist/feedback.js.map +1 -1
  14. package/dist/feedback.mjs +132 -69
  15. package/dist/feedback.mjs.map +1 -1
  16. package/dist/forms.d.mts +2 -2
  17. package/dist/forms.d.ts +2 -2
  18. package/dist/forms.js +74 -9
  19. package/dist/forms.js.map +1 -1
  20. package/dist/forms.mjs +74 -9
  21. package/dist/forms.mjs.map +1 -1
  22. package/dist/{icon-button-D-gs0gfj.d.mts → icon-button-CSsDmuQC.d.mts} +19 -0
  23. package/dist/{icon-button-D-gs0gfj.d.ts → icon-button-CSsDmuQC.d.ts} +19 -0
  24. package/dist/index.d.mts +4 -4
  25. package/dist/index.d.ts +4 -4
  26. package/dist/index.js +2204 -1464
  27. package/dist/index.js.map +1 -1
  28. package/dist/index.mjs +2056 -1324
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/layout.d.mts +18 -1
  31. package/dist/layout.d.ts +18 -1
  32. package/dist/layout.js +80 -15
  33. package/dist/layout.js.map +1 -1
  34. package/dist/layout.mjs +80 -15
  35. package/dist/layout.mjs.map +1 -1
  36. package/dist/navigation.d.mts +134 -9
  37. package/dist/navigation.d.ts +134 -9
  38. package/dist/navigation.js +461 -101
  39. package/dist/navigation.js.map +1 -1
  40. package/dist/navigation.mjs +455 -102
  41. package/dist/navigation.mjs.map +1 -1
  42. package/dist/overlays.js +261 -197
  43. package/dist/overlays.js.map +1 -1
  44. package/dist/overlays.mjs +223 -159
  45. package/dist/overlays.mjs.map +1 -1
  46. package/dist/pickers.js +392 -301
  47. package/dist/pickers.js.map +1 -1
  48. package/dist/pickers.mjs +361 -270
  49. package/dist/pickers.mjs.map +1 -1
  50. package/dist/{split-button-trailing-uncheckable-BkPbiBo3.d.ts → split-button-trailing-uncheckable-C-qQlyZx.d.ts} +118 -25
  51. package/dist/{split-button-trailing-uncheckable-D_PLPb-u.d.mts → split-button-trailing-uncheckable-DHJqNeq_.d.mts} +118 -25
  52. package/dist/{text-field-eAIpz9z1.d.mts → text-field-T4Rg-9Bw.d.mts} +7 -0
  53. package/dist/{text-field-eAIpz9z1.d.ts → text-field-T4Rg-9Bw.d.ts} +7 -0
  54. package/package.json +3 -3
package/dist/overlays.js CHANGED
@@ -3,9 +3,10 @@
3
3
 
4
4
  var RadixDialog = require('@radix-ui/react-dialog');
5
5
  var react = require('motion/react');
6
- var React6 = require('react');
6
+ var React9 = require('react');
7
7
  var clsx = require('clsx');
8
8
  var tailwindMerge = require('tailwind-merge');
9
+ var reactSlot = require('@radix-ui/react-slot');
9
10
  var jsxRuntime = require('react/jsx-runtime');
10
11
  var RadixScrollArea = require('@radix-ui/react-scroll-area');
11
12
  var reactDom = require('react-dom');
@@ -29,7 +30,7 @@ function _interopNamespace(e) {
29
30
  }
30
31
 
31
32
  var RadixDialog__namespace = /*#__PURE__*/_interopNamespace(RadixDialog);
32
- var React6__namespace = /*#__PURE__*/_interopNamespace(React6);
33
+ var React9__namespace = /*#__PURE__*/_interopNamespace(React9);
33
34
  var RadixScrollArea__namespace = /*#__PURE__*/_interopNamespace(RadixScrollArea);
34
35
 
35
36
  var __defProp = Object.defineProperty;
@@ -111,11 +112,11 @@ var ROTATE_KEY_SPLINES = [
111
112
  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";
112
113
  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";
113
114
  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";
114
- var IndeterminateSvg = React6__namespace.memo(function IndeterminateSvg2({
115
+ var IndeterminateSvg = React9__namespace.memo(function IndeterminateSvg2({
115
116
  size
116
117
  }) {
117
- const [ready, setReady] = React6__namespace.useState(false);
118
- React6__namespace.useEffect(() => {
118
+ const [ready, setReady] = React9__namespace.useState(false);
119
+ React9__namespace.useEffect(() => {
119
120
  const raf = requestAnimationFrame(() => setReady(true));
120
121
  return () => cancelAnimationFrame(raf);
121
122
  }, []);
@@ -160,7 +161,7 @@ var IndeterminateSvg = React6__namespace.memo(function IndeterminateSvg2({
160
161
  }
161
162
  );
162
163
  });
163
- var DeterminateSvg = React6__namespace.memo(function DeterminateSvg2({
164
+ var DeterminateSvg = React9__namespace.memo(function DeterminateSvg2({
164
165
  size,
165
166
  progress
166
167
  }) {
@@ -185,7 +186,7 @@ var DeterminateSvg = React6__namespace.memo(function DeterminateSvg2({
185
186
  }
186
187
  );
187
188
  });
188
- var LoadingIndicator = React6__namespace.forwardRef(
189
+ var LoadingIndicator = React9__namespace.forwardRef(
189
190
  (_a, ref) => {
190
191
  var _b = _a, {
191
192
  variant = "uncontained",
@@ -300,7 +301,7 @@ function getSinePath(startX, endX, phase, wl, amp) {
300
301
  d += ` L ${endX.toFixed(2)} ${yEnd.toFixed(2)}`;
301
302
  return d;
302
303
  }
303
- var CircularProgress = React6__namespace.forwardRef(
304
+ var CircularProgress = React9__namespace.forwardRef(
304
305
  (_a, ref) => {
305
306
  var _b = _a, {
306
307
  value,
@@ -338,15 +339,15 @@ var CircularProgress = React6__namespace.forwardRef(
338
339
  const isWavy = shape === "wavy";
339
340
  const BASELINE_SIZE = 48;
340
341
  const scaleFactor = size / BASELINE_SIZE;
341
- const effectiveAmplitude = React6__namespace.useMemo(
342
+ const effectiveAmplitude = React9__namespace.useMemo(
342
343
  () => amplitude != null ? amplitude : 1.6 * scaleFactor,
343
344
  [amplitude, scaleFactor]
344
345
  );
345
- const effectiveWavelength = React6__namespace.useMemo(
346
+ const effectiveWavelength = React9__namespace.useMemo(
346
347
  () => wavelength != null ? wavelength : 15 * scaleFactor,
347
348
  [wavelength, scaleFactor]
348
349
  );
349
- const wavyActivePath = React6__namespace.useMemo(
350
+ const wavyActivePath = React9__namespace.useMemo(
350
351
  () => isWavy ? generateWavyCircularPath(
351
352
  center,
352
353
  radius,
@@ -355,8 +356,8 @@ var CircularProgress = React6__namespace.forwardRef(
355
356
  ) : null,
356
357
  [isWavy, center, radius, effectiveAmplitude, effectiveWavelength]
357
358
  );
358
- const circumference = React6__namespace.useMemo(() => 2 * Math.PI * radius, [radius]);
359
- const gapForTrack = React6__namespace.useMemo(
359
+ const circumference = React9__namespace.useMemo(() => 2 * Math.PI * radius, [radius]);
360
+ const gapForTrack = React9__namespace.useMemo(
360
361
  () => (gapSize + trackHeight) / circumference,
361
362
  [gapSize, trackHeight, circumference]
362
363
  );
@@ -545,9 +546,9 @@ var CircularProgress = React6__namespace.forwardRef(
545
546
  );
546
547
  CircularProgress.displayName = "CircularProgress";
547
548
  function useContainerWidth() {
548
- const [width, setWidth] = React6__namespace.useState(0);
549
- const observerRef = React6__namespace.useRef(null);
550
- const ref = React6__namespace.useCallback((node) => {
549
+ const [width, setWidth] = React9__namespace.useState(0);
550
+ const observerRef = React9__namespace.useRef(null);
551
+ const ref = React9__namespace.useCallback((node) => {
551
552
  if (observerRef.current) {
552
553
  observerRef.current.disconnect();
553
554
  observerRef.current = null;
@@ -561,7 +562,7 @@ function useContainerWidth() {
561
562
  observerRef.current = obs;
562
563
  }
563
564
  }, []);
564
- React6__namespace.useEffect(() => {
565
+ React9__namespace.useEffect(() => {
565
566
  return () => {
566
567
  if (observerRef.current) {
567
568
  observerRef.current.disconnect();
@@ -571,7 +572,7 @@ function useContainerWidth() {
571
572
  return [ref, width];
572
573
  }
573
574
  function useMergedRef(...refs) {
574
- return React6__namespace.useCallback(
575
+ return React9__namespace.useCallback(
575
576
  (node) => {
576
577
  for (const ref of refs) {
577
578
  if (typeof ref === "function") {
@@ -585,7 +586,7 @@ function useMergedRef(...refs) {
585
586
  [refs]
586
587
  );
587
588
  }
588
- var FlatLinearTrack = React6__namespace.memo(function FlatLinearTrack2({
589
+ var FlatLinearTrack = React9__namespace.memo(function FlatLinearTrack2({
589
590
  trackHeight,
590
591
  activeColor,
591
592
  trackColor,
@@ -661,7 +662,7 @@ var FlatLinearTrack = React6__namespace.memo(function FlatLinearTrack2({
661
662
  }
662
663
  );
663
664
  });
664
- var WavyLinearTrack = React6__namespace.memo(function WavyLinearTrack2({
665
+ var WavyLinearTrack = React9__namespace.memo(function WavyLinearTrack2({
665
666
  trackHeight,
666
667
  svgHeight,
667
668
  amplitude,
@@ -680,13 +681,13 @@ var WavyLinearTrack = React6__namespace.memo(function WavyLinearTrack2({
680
681
  }) {
681
682
  const isDeterminate = typeof value === "number";
682
683
  const clampedValue = isDeterminate ? Math.max(0, Math.min(100, value)) : 100;
683
- const titleId = React6__namespace.useId();
684
+ const titleId = React9__namespace.useId();
684
685
  const [containerRef, width] = useContainerWidth();
685
- const activePathRef = React6__namespace.useRef(null);
686
- const trackPathRef = React6__namespace.useRef(null);
686
+ const activePathRef = React9__namespace.useRef(null);
687
+ const trackPathRef = React9__namespace.useRef(null);
687
688
  const amplitudeMV = react.useMotionValue(amplitude);
688
689
  const fractionMV = react.useMotionValue(isDeterminate ? clampedValue / 100 : 1);
689
- React6__namespace.useEffect(() => {
690
+ React9__namespace.useEffect(() => {
690
691
  if (isDeterminate) {
691
692
  const fraction = clampedValue / 100;
692
693
  let targetAmp = amplitude;
@@ -857,7 +858,7 @@ var WavyLinearTrack = React6__namespace.memo(function WavyLinearTrack2({
857
858
  }
858
859
  );
859
860
  });
860
- var LinearProgress = React6__namespace.forwardRef(
861
+ var LinearProgress = React9__namespace.forwardRef(
861
862
  (_a, ref) => {
862
863
  var _b = _a, {
863
864
  value,
@@ -898,10 +899,10 @@ var LinearProgress = React6__namespace.forwardRef(
898
899
  ]);
899
900
  const isDeterminate = value !== void 0;
900
901
  const clampedValue = isDeterminate ? Math.min(100, Math.max(0, value)) : 0;
901
- const containerRef = React6__namespace.useRef(null);
902
+ const containerRef = React9__namespace.useRef(null);
902
903
  const mergedRef = useMergedRef(ref, containerRef);
903
- const [isRtl, setIsRtl] = React6__namespace.useState(false);
904
- React6__namespace.useEffect(() => {
904
+ const [isRtl, setIsRtl] = React9__namespace.useState(false);
905
+ React9__namespace.useEffect(() => {
905
906
  if (containerRef.current) {
906
907
  const dir = getComputedStyle(containerRef.current).direction;
907
908
  setIsRtl(dir === "rtl");
@@ -909,16 +910,16 @@ var LinearProgress = React6__namespace.forwardRef(
909
910
  }, []);
910
911
  const isWavy = shape === "wavy";
911
912
  const resolvedTrackShape = trackShape != null ? trackShape : shape;
912
- const effectiveAmplitude = React6__namespace.useMemo(() => amplitude != null ? amplitude : 3, [amplitude]);
913
- const svgHeight = React6__namespace.useMemo(
913
+ const effectiveAmplitude = React9__namespace.useMemo(() => amplitude != null ? amplitude : 3, [amplitude]);
914
+ const svgHeight = React9__namespace.useMemo(
914
915
  () => isWavy ? trackHeight + effectiveAmplitude * 2 : trackHeight,
915
916
  [isWavy, trackHeight, effectiveAmplitude]
916
917
  );
917
- const shouldShowStop = React6__namespace.useMemo(
918
+ const shouldShowStop = React9__namespace.useMemo(
918
919
  () => isDeterminate && resolvedTrackShape === "flat" && (showStopIndicator === true || showStopIndicator === "auto" && isDeterminate),
919
920
  [isDeterminate, resolvedTrackShape, showStopIndicator]
920
921
  );
921
- const stopSize = React6__namespace.useMemo(
922
+ const stopSize = React9__namespace.useMemo(
922
923
  () => Math.max(2, trackHeight > 4 ? 4 : trackHeight / 2),
923
924
  [trackHeight]
924
925
  );
@@ -991,14 +992,14 @@ var LinearProgress = React6__namespace.forwardRef(
991
992
  }
992
993
  );
993
994
  LinearProgress.displayName = "LinearProgress";
994
- var ProgressIndicator = React6__namespace.forwardRef((props, ref) => {
995
+ var ProgressIndicator = React9__namespace.forwardRef((props, ref) => {
995
996
  if (props.variant === "circular") {
996
997
  return /* @__PURE__ */ jsxRuntime.jsx(CircularProgress, __spreadValues({ ref }, props));
997
998
  }
998
999
  return /* @__PURE__ */ jsxRuntime.jsx(LinearProgress, __spreadValues({ ref }, props));
999
1000
  });
1000
1001
  ProgressIndicator.displayName = "ProgressIndicator";
1001
- var RippleItem = React6__namespace.memo(function RippleItem2({
1002
+ var RippleItem = React9__namespace.memo(function RippleItem2({
1002
1003
  ripple,
1003
1004
  onDone
1004
1005
  }) {
@@ -1042,14 +1043,17 @@ function Ripple({
1042
1043
  }
1043
1044
  function useRippleState(options = {}) {
1044
1045
  const { disabled = false } = options;
1045
- const [ripples, setRipples] = React6__namespace.useState([]);
1046
- const onPointerDown = React6__namespace.useCallback(
1046
+ const [ripples, setRipples] = React9__namespace.useState([]);
1047
+ const onPointerDown = React9__namespace.useCallback(
1047
1048
  (e) => {
1048
1049
  if (disabled) return;
1049
1050
  const rect = e.currentTarget.getBoundingClientRect();
1050
1051
  const x = e.clientX - rect.left;
1051
1052
  const y = e.clientY - rect.top;
1052
- const rippleSize = Math.hypot(rect.width, rect.height) * 2;
1053
+ const rippleSize = Math.max(
1054
+ Math.hypot(rect.width, rect.height) * 2.5,
1055
+ 320
1056
+ );
1053
1057
  setRipples((prev) => [
1054
1058
  ...prev,
1055
1059
  { id: Date.now(), x, y, size: rippleSize }
@@ -1057,7 +1061,7 @@ function useRippleState(options = {}) {
1057
1061
  },
1058
1062
  [disabled]
1059
1063
  );
1060
- const removeRipple = React6__namespace.useCallback((id) => {
1064
+ const removeRipple = React9__namespace.useCallback((id) => {
1061
1065
  setRipples((prev) => prev.filter((r) => r.id !== id));
1062
1066
  }, []);
1063
1067
  return { ripples, onPointerDown, removeRipple };
@@ -1167,12 +1171,39 @@ function TouchTarget() {
1167
1171
  }
1168
1172
  );
1169
1173
  }
1170
- var SIZE_STYLES = {
1171
- xs: "h-8 w-8",
1172
- sm: "h-10 w-10",
1173
- md: "h-14 w-14",
1174
- lg: "h-24 w-24",
1175
- xl: "h-[8.5rem] w-[8.5rem]"
1174
+ var SIZE_HEIGHT_STYLES = {
1175
+ xs: "h-8",
1176
+ sm: "h-10",
1177
+ md: "h-14",
1178
+ lg: "h-24",
1179
+ xl: "h-[8.5rem]"
1180
+ };
1181
+ var WIDTH_SIZE_STYLES = {
1182
+ xs: {
1183
+ default: "w-8",
1184
+ narrow: "w-8",
1185
+ wide: "w-12"
1186
+ },
1187
+ sm: {
1188
+ default: "w-10",
1189
+ narrow: "w-12",
1190
+ wide: "w-[3.25rem]"
1191
+ },
1192
+ md: {
1193
+ default: "w-14",
1194
+ narrow: "w-12",
1195
+ wide: "w-[4.5rem]"
1196
+ },
1197
+ lg: {
1198
+ default: "w-24",
1199
+ narrow: "w-16",
1200
+ wide: "w-32"
1201
+ },
1202
+ xl: {
1203
+ default: "w-[8.5rem]",
1204
+ narrow: "w-[6.5rem]",
1205
+ wide: "w-[11.5rem]"
1206
+ }
1176
1207
  };
1177
1208
  var SIZE_ICON = {
1178
1209
  xs: { cls: "size-5", px: 20 },
@@ -1265,7 +1296,7 @@ function resolveDisabledBgClass(colorStyle) {
1265
1296
  }
1266
1297
  return "disabled:text-m3-on-surface/[0.38]";
1267
1298
  }
1268
- var IconButtonComponent = React6__namespace.forwardRef(
1299
+ var IconButtonComponent = React9__namespace.forwardRef(
1269
1300
  (_a, ref) => {
1270
1301
  var _b = _a, {
1271
1302
  className,
@@ -1273,11 +1304,14 @@ var IconButtonComponent = React6__namespace.forwardRef(
1273
1304
  variant = "default",
1274
1305
  colorStyle = "standard",
1275
1306
  size = "sm",
1307
+ widthVariant = "default",
1276
1308
  shape = "round",
1277
1309
  selected,
1310
+ selectedIcon,
1278
1311
  loading = false,
1279
1312
  loadingVariant = "loading-indicator",
1280
1313
  iconSize,
1314
+ asChild = false,
1281
1315
  children,
1282
1316
  onClick,
1283
1317
  onKeyDown,
@@ -1288,31 +1322,34 @@ var IconButtonComponent = React6__namespace.forwardRef(
1288
1322
  "variant",
1289
1323
  "colorStyle",
1290
1324
  "size",
1325
+ "widthVariant",
1291
1326
  "shape",
1292
1327
  "selected",
1328
+ "selectedIcon",
1293
1329
  "loading",
1294
1330
  "loadingVariant",
1295
1331
  "iconSize",
1332
+ "asChild",
1296
1333
  "children",
1297
1334
  "onClick",
1298
1335
  "onKeyDown",
1299
1336
  "aria-label"
1300
1337
  ]);
1301
- var _a2, _b2;
1338
+ var _a2, _b2, _c, _d, _e;
1302
1339
  const isToggle = variant === "toggle";
1303
1340
  const isSelected = isToggle && !!selected;
1304
- const resolvedColorClass = React6__namespace.useMemo(
1341
+ const resolvedColorClass = React9__namespace.useMemo(
1305
1342
  () => isSelected ? colorStyles[colorStyle].selected : colorStyles[colorStyle].default,
1306
1343
  [isSelected, colorStyle]
1307
1344
  );
1308
- const outlineWidthClass = React6__namespace.useMemo(
1345
+ const outlineWidthClass = React9__namespace.useMemo(
1309
1346
  () => {
1310
1347
  var _a3;
1311
1348
  return colorStyle === "outlined" && !isSelected ? (_a3 = SIZE_OUTLINE_WIDTH[size]) != null ? _a3 : "border" : "";
1312
1349
  },
1313
1350
  [colorStyle, isSelected, size]
1314
1351
  );
1315
- const disabledBgClass = React6__namespace.useMemo(
1352
+ const disabledBgClass = React9__namespace.useMemo(
1316
1353
  () => resolveDisabledBgClass(colorStyle),
1317
1354
  [colorStyle]
1318
1355
  );
@@ -1329,11 +1366,13 @@ var IconButtonComponent = React6__namespace.forwardRef(
1329
1366
  const defaultIconPx = sizeIcon.px;
1330
1367
  const iconPx = iconSize != null ? iconSize : defaultIconPx;
1331
1368
  const isCustomSize = iconSize != null && iconSize !== "inherit";
1369
+ const heightClass = (_c = SIZE_HEIGHT_STYLES[size]) != null ? _c : SIZE_HEIGHT_STYLES.sm;
1370
+ const widthClass = (_e = ((_d = WIDTH_SIZE_STYLES[size]) != null ? _d : WIDTH_SIZE_STYLES.sm)[widthVariant]) != null ? _e : WIDTH_SIZE_STYLES.sm.default;
1332
1371
  const needsTouchTarget = size === "xs" || size === "sm";
1333
1372
  const { ripples, onPointerDown, removeRipple } = useRippleState({
1334
1373
  disabled: loading
1335
1374
  });
1336
- const handleClick = React6__namespace.useCallback(
1375
+ const handleClick = React9__namespace.useCallback(
1337
1376
  (e) => {
1338
1377
  if (loading) {
1339
1378
  e.preventDefault();
@@ -1343,7 +1382,7 @@ var IconButtonComponent = React6__namespace.forwardRef(
1343
1382
  },
1344
1383
  [loading, onClick]
1345
1384
  );
1346
- const handleKeyDown = React6__namespace.useCallback(
1385
+ const handleKeyDown = React9__namespace.useCallback(
1347
1386
  (e) => {
1348
1387
  if (loading) return;
1349
1388
  if ((e.key === "Enter" || e.key === " ") && onClick) {
@@ -1354,7 +1393,90 @@ var IconButtonComponent = React6__namespace.forwardRef(
1354
1393
  },
1355
1394
  [loading, onClick, onKeyDown]
1356
1395
  );
1357
- return /* @__PURE__ */ jsxRuntime.jsx(react.LazyMotion, { features: react.domMax, strict: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
1396
+ const innerContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1397
+ needsTouchTarget && /* @__PURE__ */ jsxRuntime.jsx(TouchTarget, {}),
1398
+ /* @__PURE__ */ jsxRuntime.jsx(Ripple, { ripples, onRippleDone: removeRipple }),
1399
+ /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "wait", initial: false, children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
1400
+ react.m.span,
1401
+ __spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
1402
+ transition: SPRING_TRANSITION,
1403
+ className: cn(
1404
+ "flex items-center justify-center shrink-0",
1405
+ iconSize != null ? void 0 : iconClass
1406
+ ),
1407
+ style: isCustomSize ? { width: `${iconSize}px`, height: `${iconSize}px` } : void 0,
1408
+ children: loadingVariant === "loading-indicator" ? /* @__PURE__ */ jsxRuntime.jsx(
1409
+ LoadingIndicator,
1410
+ {
1411
+ size: typeof iconPx === "number" ? iconPx : defaultIconPx,
1412
+ color: "currentColor",
1413
+ "aria-label": "Loading"
1414
+ }
1415
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1416
+ ProgressIndicator,
1417
+ {
1418
+ variant: "circular",
1419
+ size: typeof iconPx === "number" ? iconPx : defaultIconPx,
1420
+ color: "currentColor",
1421
+ trackColor: "transparent",
1422
+ "aria-label": "Loading"
1423
+ }
1424
+ )
1425
+ }),
1426
+ "loading"
1427
+ ) : /* @__PURE__ */ jsxRuntime.jsx(
1428
+ react.m.span,
1429
+ __spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
1430
+ transition: SPRING_TRANSITION,
1431
+ "aria-hidden": "true",
1432
+ className: cn(
1433
+ "flex items-center justify-center shrink-0 [&_svg]:w-full [&_svg]:h-full [&_.md-icon]:text-[length:inherit]",
1434
+ iconSize != null ? void 0 : iconClass
1435
+ ),
1436
+ style: {
1437
+ fontSize: typeof iconPx === "number" ? `${iconPx}px` : iconPx,
1438
+ width: isCustomSize ? `${iconSize}px` : void 0,
1439
+ height: isCustomSize ? `${iconSize}px` : void 0
1440
+ },
1441
+ children: isSelected && selectedIcon ? selectedIcon : asChild ? React9__namespace.Children.only(children).props.children : children
1442
+ }),
1443
+ isSelected && selectedIcon ? "selected-content" : "content"
1444
+ ) })
1445
+ ] });
1446
+ const containerClassName = cn(
1447
+ baseIconButtonClasses,
1448
+ resolvedColorClass,
1449
+ outlineWidthClass,
1450
+ disabledBgClass,
1451
+ "overflow-hidden",
1452
+ heightClass,
1453
+ widthClass,
1454
+ loading && "pointer-events-none opacity-75 cursor-not-allowed",
1455
+ className
1456
+ );
1457
+ if (asChild) {
1458
+ const child = React9__namespace.Children.only(children);
1459
+ return /* @__PURE__ */ jsxRuntime.jsx(react.LazyMotion, { features: react.domMax, strict: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1460
+ reactSlot.Slot,
1461
+ __spreadProps(__spreadValues({
1462
+ ref,
1463
+ "aria-pressed": isToggle ? isSelected : void 0,
1464
+ "aria-label": ariaLabel,
1465
+ "aria-busy": loading || void 0,
1466
+ "aria-disabled": loading || restProps.disabled,
1467
+ onClick: handleClick,
1468
+ onPointerDown,
1469
+ onKeyDown: handleKeyDown,
1470
+ style: __spreadProps(__spreadValues({}, style), {
1471
+ borderRadius: `${animateRadius}px`
1472
+ }),
1473
+ className: containerClassName
1474
+ }, restProps), {
1475
+ children: React9__namespace.cloneElement(child, { children: innerContent })
1476
+ })
1477
+ ) });
1478
+ }
1479
+ return /* @__PURE__ */ jsxRuntime.jsx(react.LazyMotion, { features: react.domMax, strict: true, children: /* @__PURE__ */ jsxRuntime.jsx(
1358
1480
  react.m.button,
1359
1481
  __spreadProps(__spreadValues({
1360
1482
  ref,
@@ -1370,79 +1492,21 @@ var IconButtonComponent = React6__namespace.forwardRef(
1370
1492
  animate: { borderRadius: animateRadius },
1371
1493
  whileTap: { borderRadius: pressedRadius },
1372
1494
  transition: { borderRadius: SPRING_TRANSITION_FAST },
1373
- className: cn(
1374
- baseIconButtonClasses,
1375
- resolvedColorClass,
1376
- outlineWidthClass,
1377
- disabledBgClass,
1378
- "overflow-hidden",
1379
- SIZE_STYLES[size],
1380
- loading && "pointer-events-none opacity-75 cursor-not-allowed",
1381
- className
1382
- )
1495
+ className: containerClassName
1383
1496
  }, restProps), {
1384
- children: [
1385
- needsTouchTarget && /* @__PURE__ */ jsxRuntime.jsx(TouchTarget, {}),
1386
- /* @__PURE__ */ jsxRuntime.jsx(Ripple, { ripples, onRippleDone: removeRipple }),
1387
- /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "wait", initial: false, children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
1388
- react.m.span,
1389
- __spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
1390
- transition: SPRING_TRANSITION,
1391
- className: cn(
1392
- "flex items-center justify-center shrink-0",
1393
- iconSize != null ? void 0 : iconClass
1394
- ),
1395
- style: isCustomSize ? { width: `${iconSize}px`, height: `${iconSize}px` } : void 0,
1396
- children: loadingVariant === "loading-indicator" ? /* @__PURE__ */ jsxRuntime.jsx(
1397
- LoadingIndicator,
1398
- {
1399
- size: typeof iconPx === "number" ? iconPx : defaultIconPx,
1400
- color: "currentColor",
1401
- "aria-label": "Loading"
1402
- }
1403
- ) : /* @__PURE__ */ jsxRuntime.jsx(
1404
- ProgressIndicator,
1405
- {
1406
- variant: "circular",
1407
- size: typeof iconPx === "number" ? iconPx : defaultIconPx,
1408
- color: "currentColor",
1409
- trackColor: "transparent",
1410
- "aria-label": "Loading"
1411
- }
1412
- )
1413
- }),
1414
- "loading"
1415
- ) : /* @__PURE__ */ jsxRuntime.jsx(
1416
- react.m.span,
1417
- __spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
1418
- transition: SPRING_TRANSITION,
1419
- "aria-hidden": "true",
1420
- className: cn(
1421
- "flex items-center justify-center shrink-0 [&_svg]:w-full [&_svg]:h-full [&_.md-icon]:text-[length:inherit]!",
1422
- iconSize != null ? void 0 : iconClass
1423
- ),
1424
- style: {
1425
- fontSize: typeof iconPx === "number" ? `${iconPx}px` : iconPx,
1426
- width: isCustomSize ? `${iconSize}px` : void 0,
1427
- height: isCustomSize ? `${iconSize}px` : void 0
1428
- },
1429
- children
1430
- }),
1431
- "content"
1432
- ) })
1433
- ]
1497
+ children: innerContent
1434
1498
  })
1435
1499
  ) });
1436
1500
  }
1437
1501
  );
1438
1502
  IconButtonComponent.displayName = "IconButton";
1439
- var IconButton = React6__namespace.memo(IconButtonComponent);
1503
+ var IconButton = React9__namespace.memo(IconButtonComponent);
1440
1504
  var VARIANT_FONT = {
1441
1505
  outlined: "'Material Symbols Outlined'",
1442
1506
  rounded: "'Material Symbols Rounded'",
1443
1507
  sharp: "'Material Symbols Sharp'"
1444
1508
  };
1445
- var IconComponent = React6__namespace.forwardRef(
1509
+ var IconComponent = React9__namespace.forwardRef(
1446
1510
  (_a, ref) => {
1447
1511
  var _b = _a, {
1448
1512
  name,
@@ -1508,8 +1572,8 @@ var IconComponent = React6__namespace.forwardRef(
1508
1572
  }
1509
1573
  );
1510
1574
  IconComponent.displayName = "Icon";
1511
- var Icon = React6__namespace.memo(IconComponent);
1512
- var ScrollArea = React6__namespace.forwardRef(
1575
+ var Icon = React9__namespace.memo(IconComponent);
1576
+ var ScrollArea = React9__namespace.forwardRef(
1513
1577
  (_a, ref) => {
1514
1578
  var _b = _a, {
1515
1579
  className,
@@ -1530,15 +1594,15 @@ var ScrollArea = React6__namespace.forwardRef(
1530
1594
  "viewportRef",
1531
1595
  "viewportProps"
1532
1596
  ]);
1533
- const [isTouchDevice, setIsTouchDevice] = React6__namespace.useState(false);
1534
- React6__namespace.useEffect(() => {
1597
+ const [isTouchDevice, setIsTouchDevice] = React9__namespace.useState(false);
1598
+ React9__namespace.useEffect(() => {
1535
1599
  if (typeof window !== "undefined") {
1536
1600
  setIsTouchDevice(
1537
1601
  "ontouchstart" in window || navigator.maxTouchPoints > 0
1538
1602
  );
1539
1603
  }
1540
1604
  }, []);
1541
- const resolvedType = React6__namespace.useMemo(() => {
1605
+ const resolvedType = React9__namespace.useMemo(() => {
1542
1606
  if (type === "hover" && isTouchDevice) {
1543
1607
  return "scroll";
1544
1608
  }
@@ -1589,7 +1653,7 @@ var ScrollArea = React6__namespace.forwardRef(
1589
1653
  }
1590
1654
  );
1591
1655
  ScrollArea.displayName = "ScrollArea";
1592
- var ScrollAreaScrollbar = React6__namespace.forwardRef((_a, ref) => {
1656
+ var ScrollAreaScrollbar = React9__namespace.forwardRef((_a, ref) => {
1593
1657
  var _b = _a, { className, orientation = "vertical" } = _b, props = __objRest(_b, ["className", "orientation"]);
1594
1658
  return /* @__PURE__ */ jsxRuntime.jsx(
1595
1659
  RadixScrollArea__namespace.Scrollbar,
@@ -1619,7 +1683,7 @@ var ScrollAreaScrollbar = React6__namespace.forwardRef((_a, ref) => {
1619
1683
  );
1620
1684
  });
1621
1685
  ScrollAreaScrollbar.displayName = RadixScrollArea__namespace.Scrollbar.displayName;
1622
- var ScrollAreaCorner = React6__namespace.forwardRef((_a, ref) => {
1686
+ var ScrollAreaCorner = React9__namespace.forwardRef((_a, ref) => {
1623
1687
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1624
1688
  return /* @__PURE__ */ jsxRuntime.jsx(
1625
1689
  RadixScrollArea__namespace.Corner,
@@ -1661,9 +1725,9 @@ DialogTrigger.displayName = "DialogTrigger";
1661
1725
  var DialogPortal = ({
1662
1726
  open,
1663
1727
  children
1664
- }) => /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Portal, { forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { children: open ? React6__namespace.Children.toArray(children) : null }) });
1728
+ }) => /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Portal, { forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { children: open ? React9__namespace.Children.toArray(children) : null }) });
1665
1729
  DialogPortal.displayName = "DialogPortal";
1666
- var DialogOverlay = React6__namespace.forwardRef((_a, ref) => {
1730
+ var DialogOverlay = React9__namespace.forwardRef((_a, ref) => {
1667
1731
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1668
1732
  return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Overlay, __spreadProps(__spreadValues({ ref, asChild: true }, props), { children: /* @__PURE__ */ jsxRuntime.jsx(
1669
1733
  react.m.div,
@@ -1674,7 +1738,7 @@ var DialogOverlay = React6__namespace.forwardRef((_a, ref) => {
1674
1738
  ) }));
1675
1739
  });
1676
1740
  DialogOverlay.displayName = "DialogOverlay";
1677
- var DialogContent = React6__namespace.forwardRef((_a, ref) => {
1741
+ var DialogContent = React9__namespace.forwardRef((_a, ref) => {
1678
1742
  var _b = _a, { className, children, hideCloseButton = false } = _b, props = __objRest(_b, ["className", "children", "hideCloseButton"]);
1679
1743
  return /* @__PURE__ */ jsxRuntime.jsx(
1680
1744
  RadixDialog__namespace.Content,
@@ -1714,7 +1778,7 @@ var DialogContent = React6__namespace.forwardRef((_a, ref) => {
1714
1778
  );
1715
1779
  });
1716
1780
  DialogContent.displayName = "DialogContent";
1717
- var DialogIcon = React6__namespace.forwardRef((_a, ref) => {
1781
+ var DialogIcon = React9__namespace.forwardRef((_a, ref) => {
1718
1782
  var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
1719
1783
  return /* @__PURE__ */ jsxRuntime.jsx(
1720
1784
  "div",
@@ -1737,7 +1801,7 @@ var DialogHeader = (_a) => {
1737
1801
  return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadValues({ className: cn("flex flex-col gap-2 mb-4", className) }, props));
1738
1802
  };
1739
1803
  DialogHeader.displayName = "DialogHeader";
1740
- var DialogTitle = React6__namespace.forwardRef((_a, ref) => {
1804
+ var DialogTitle = React9__namespace.forwardRef((_a, ref) => {
1741
1805
  var _b = _a, { className, asChild } = _b, props = __objRest(_b, ["className", "asChild"]);
1742
1806
  return /* @__PURE__ */ jsxRuntime.jsx(
1743
1807
  RadixDialog__namespace.Title,
@@ -1752,7 +1816,7 @@ var DialogTitle = React6__namespace.forwardRef((_a, ref) => {
1752
1816
  );
1753
1817
  });
1754
1818
  DialogTitle.displayName = "DialogTitle";
1755
- var DialogDescription = React6__namespace.forwardRef((_a, ref) => {
1819
+ var DialogDescription = React9__namespace.forwardRef((_a, ref) => {
1756
1820
  var _b = _a, { className, asChild } = _b, props = __objRest(_b, ["className", "asChild"]);
1757
1821
  return /* @__PURE__ */ jsxRuntime.jsx(
1758
1822
  RadixDialog__namespace.Description,
@@ -1764,7 +1828,7 @@ var DialogDescription = React6__namespace.forwardRef((_a, ref) => {
1764
1828
  );
1765
1829
  });
1766
1830
  DialogDescription.displayName = "DialogDescription";
1767
- var DialogBody = React6__namespace.forwardRef((_a, ref) => {
1831
+ var DialogBody = React9__namespace.forwardRef((_a, ref) => {
1768
1832
  var _b = _a, { className, children, dir } = _b, props = __objRest(_b, ["className", "children", "dir"]);
1769
1833
  return /* @__PURE__ */ jsxRuntime.jsx(
1770
1834
  ScrollArea,
@@ -1795,7 +1859,7 @@ var DialogFooter = (_a) => {
1795
1859
  };
1796
1860
  DialogFooter.displayName = "DialogFooter";
1797
1861
  var DialogClose = RadixDialog__namespace.Close;
1798
- var DialogFullScreenContent = React6__namespace.forwardRef(
1862
+ var DialogFullScreenContent = React9__namespace.forwardRef(
1799
1863
  (_a, ref) => {
1800
1864
  var _b = _a, {
1801
1865
  className,
@@ -1892,7 +1956,7 @@ var DrawerPortal = ({
1892
1956
  open,
1893
1957
  children
1894
1958
  }) => /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Portal, { forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "wait", children: open && children }) });
1895
- var DrawerOverlay = React6__namespace.forwardRef((_a, ref) => {
1959
+ var DrawerOverlay = React9__namespace.forwardRef((_a, ref) => {
1896
1960
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1897
1961
  return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Overlay, __spreadProps(__spreadValues({ ref, asChild: true }, props), { children: /* @__PURE__ */ jsxRuntime.jsx(
1898
1962
  react.m.div,
@@ -1903,7 +1967,7 @@ var DrawerOverlay = React6__namespace.forwardRef((_a, ref) => {
1903
1967
  ) }));
1904
1968
  });
1905
1969
  DrawerOverlay.displayName = "DrawerOverlay";
1906
- var DrawerContent = React6__namespace.forwardRef(
1970
+ var DrawerContent = React9__namespace.forwardRef(
1907
1971
  (_a, ref) => {
1908
1972
  var _b = _a, {
1909
1973
  className,
@@ -1982,7 +2046,7 @@ var DrawerFooter = (_a) => {
1982
2046
  return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadValues({ className: cn("flex flex-col gap-2 mt-4", className) }, props));
1983
2047
  };
1984
2048
  DrawerFooter.displayName = "DrawerFooter";
1985
- var DrawerTitle = React6__namespace.forwardRef((_a, ref) => {
2049
+ var DrawerTitle = React9__namespace.forwardRef((_a, ref) => {
1986
2050
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
1987
2051
  return /* @__PURE__ */ jsxRuntime.jsx(
1988
2052
  RadixDialog__namespace.Title,
@@ -1996,7 +2060,7 @@ var DrawerTitle = React6__namespace.forwardRef((_a, ref) => {
1996
2060
  );
1997
2061
  });
1998
2062
  DrawerTitle.displayName = "DrawerTitle";
1999
- var DrawerDescription = React6__namespace.forwardRef((_a, ref) => {
2063
+ var DrawerDescription = React9__namespace.forwardRef((_a, ref) => {
2000
2064
  var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
2001
2065
  return /* @__PURE__ */ jsxRuntime.jsx(
2002
2066
  RadixDialog__namespace.Description,
@@ -2008,7 +2072,7 @@ var DrawerDescription = React6__namespace.forwardRef((_a, ref) => {
2008
2072
  });
2009
2073
  DrawerDescription.displayName = "DrawerDescription";
2010
2074
  var INDICATOR = "h-1 w-8 rounded-full bg-m3-on-surface-variant/40";
2011
- var DragHandle = React6__namespace.forwardRef(
2075
+ var DragHandle = React9__namespace.forwardRef(
2012
2076
  ({ className, onCycle, "aria-label": ariaLabel }, ref) => {
2013
2077
  const isInteractive = Boolean(onCycle);
2014
2078
  if (isInteractive) {
@@ -2069,7 +2133,7 @@ function buildSideSheetAnim(edge) {
2069
2133
  };
2070
2134
  }
2071
2135
  var DEFAULT_SHEET_BG = "bg-m3-surface-container-low";
2072
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React6.useLayoutEffect : React6.useEffect;
2136
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React9.useLayoutEffect : React9.useEffect;
2073
2137
  var DISMISS_THRESHOLD = 0.4;
2074
2138
  var DISMISS_VELOCITY_THRESHOLD = 600;
2075
2139
  var DEFAULT_SAFE_AREA_OFFSET = 56;
@@ -2118,9 +2182,9 @@ function useBottomSheet({
2118
2182
  isModal = false,
2119
2183
  maxHeight
2120
2184
  }) {
2121
- const [scopeNode, setScopeNode] = React6.useState(null);
2122
- const scopeNodeRef = React6.useRef(null);
2123
- const scope = React6.useCallback((node) => {
2185
+ const [scopeNode, setScopeNode] = React9.useState(null);
2186
+ const scopeNodeRef = React9.useRef(null);
2187
+ const scope = React9.useCallback((node) => {
2124
2188
  scopeNodeRef.current = node;
2125
2189
  setScopeNode(node);
2126
2190
  }, []);
@@ -2134,13 +2198,13 @@ function useBottomSheet({
2134
2198
  const y = react.useMotionValue(
2135
2199
  typeof window !== "undefined" ? window.visualViewport ? window.visualViewport.height : window.innerHeight : 800
2136
2200
  );
2137
- const [dimensions, setDimensions] = React6.useState({
2201
+ const [dimensions, setDimensions] = React9.useState({
2138
2202
  viewportHeight: typeof window !== "undefined" ? window.visualViewport ? window.visualViewport.height : window.innerHeight : 800,
2139
2203
  naturalHeight: 0,
2140
2204
  safeAreaOffset: DEFAULT_SAFE_AREA_OFFSET
2141
2205
  });
2142
- const hasMeasuredAfterOpen = React6.useRef(false);
2143
- const measureDimensions = React6.useCallback(() => {
2206
+ const hasMeasuredAfterOpen = React9.useRef(false);
2207
+ const measureDimensions = React9.useCallback(() => {
2144
2208
  const node = scopeNodeRef.current;
2145
2209
  if (!node) return;
2146
2210
  const viewportHeight2 = window.visualViewport ? window.visualViewport.height : window.innerHeight;
@@ -2200,7 +2264,7 @@ function useBottomSheet({
2200
2264
  return () => vv.removeEventListener("resize", handleResize);
2201
2265
  }, [isOpen, measureDimensions]);
2202
2266
  const { viewportHeight, naturalHeight, safeAreaOffset } = dimensions;
2203
- const parsedMaxHeight = React6.useMemo(() => {
2267
+ const parsedMaxHeight = React9.useMemo(() => {
2204
2268
  if (!maxHeight) return viewportHeight - safeAreaOffset;
2205
2269
  if (maxHeight.endsWith("px")) return parseFloat(maxHeight);
2206
2270
  if (maxHeight.endsWith("dvh") || maxHeight.endsWith("vh")) {
@@ -2211,13 +2275,13 @@ function useBottomSheet({
2211
2275
  }
2212
2276
  return parseFloat(maxHeight) || viewportHeight - safeAreaOffset;
2213
2277
  }, [maxHeight, viewportHeight, safeAreaOffset]);
2214
- const snaps = React6.useMemo(() => {
2278
+ const snaps = React9.useMemo(() => {
2215
2279
  if (snapPoints) return snapPoints;
2216
2280
  if (isModal) return ["partiallyExpanded", "full"];
2217
2281
  return ["fit"];
2218
2282
  }, [snapPoints, isModal]);
2219
2283
  const allowsViewportSnapExpansion = snapPoints !== void 0 || snaps.length > 1;
2220
- const snapHeights = React6.useMemo(
2284
+ const snapHeights = React9.useMemo(
2221
2285
  () => snaps.map(
2222
2286
  (snap) => parseSnapPoint(
2223
2287
  snap,
@@ -2237,15 +2301,15 @@ function useBottomSheet({
2237
2301
  allowsViewportSnapExpansion
2238
2302
  ]
2239
2303
  );
2240
- const maxSheetHeight = React6.useMemo(
2304
+ const maxSheetHeight = React9.useMemo(
2241
2305
  () => viewportHeight - safeAreaOffset,
2242
2306
  [viewportHeight, safeAreaOffset]
2243
2307
  );
2244
- const snapYValues = React6.useMemo(
2308
+ const snapYValues = React9.useMemo(
2245
2309
  () => snapHeights.map((h) => Math.max(0, maxSheetHeight - h)),
2246
2310
  [snapHeights, maxSheetHeight]
2247
2311
  );
2248
- const sortedSnaps = React6.useMemo(() => {
2312
+ const sortedSnaps = React9.useMemo(() => {
2249
2313
  const combined = snaps.map((point, idx) => ({
2250
2314
  point,
2251
2315
  height: snapHeights[idx],
@@ -2253,31 +2317,31 @@ function useBottomSheet({
2253
2317
  }));
2254
2318
  return combined.sort((a, b) => b.y - a.y);
2255
2319
  }, [snaps, snapHeights, snapYValues]);
2256
- const [activeSnapIndex, setActiveSnapIndex] = React6.useState(0);
2257
- const activeSnapPoint = React6.useMemo(
2320
+ const [activeSnapIndex, setActiveSnapIndex] = React9.useState(0);
2321
+ const activeSnapPoint = React9.useMemo(
2258
2322
  () => {
2259
2323
  var _a, _b;
2260
2324
  return (_b = (_a = sortedSnaps[activeSnapIndex]) == null ? void 0 : _a.point) != null ? _b : "fit";
2261
2325
  },
2262
2326
  [sortedSnaps, activeSnapIndex]
2263
2327
  );
2264
- const isContentScrollable = React6.useMemo(
2328
+ const isContentScrollable = React9.useMemo(
2265
2329
  () => sortedSnaps.length <= 1 || activeSnapIndex === sortedSnaps.length - 1,
2266
2330
  [sortedSnaps, activeSnapIndex]
2267
2331
  );
2268
- const lowestSnapY = React6.useMemo(() => {
2332
+ const lowestSnapY = React9.useMemo(() => {
2269
2333
  var _a, _b;
2270
2334
  return (_b = (_a = sortedSnaps[0]) == null ? void 0 : _a.y) != null ? _b : 300;
2271
2335
  }, [sortedSnaps]);
2272
2336
  const scrimOpacity = react.useTransform(y, [lowestSnapY, maxSheetHeight], [1, 0]);
2273
- const defaultSnap = React6.useMemo(
2337
+ const defaultSnap = React9.useMemo(
2274
2338
  () => {
2275
2339
  var _a;
2276
2340
  return (_a = defaultSnapPoint != null ? defaultSnapPoint : snaps[0]) != null ? _a : "fit";
2277
2341
  },
2278
2342
  [defaultSnapPoint, snaps]
2279
2343
  );
2280
- const prevIsOpen = React6.useRef(isOpen);
2344
+ const prevIsOpen = React9.useRef(isOpen);
2281
2345
  useIsomorphicLayoutEffect(() => {
2282
2346
  if (isOpen && !prevIsOpen.current) {
2283
2347
  y.set(viewportHeight);
@@ -2294,7 +2358,7 @@ function useBottomSheet({
2294
2358
  }
2295
2359
  prevIsOpen.current = isOpen;
2296
2360
  }, [isOpen, y, viewportHeight, sortedSnaps, defaultSnap]);
2297
- React6.useEffect(() => {
2361
+ React9.useEffect(() => {
2298
2362
  var _a;
2299
2363
  if (!isOpen || sortedSnaps.length === 0 || naturalHeight === 0) return;
2300
2364
  if (!hasMeasuredAfterOpen.current) return;
@@ -2302,7 +2366,7 @@ function useBottomSheet({
2302
2366
  if (targetY === void 0) return;
2303
2367
  void react.animate(y, targetY, { type: "spring", stiffness: 300, damping: 30 });
2304
2368
  }, [isOpen, sortedSnaps, activeSnapIndex, y, naturalHeight]);
2305
- const snapTo = React6.useCallback(
2369
+ const snapTo = React9.useCallback(
2306
2370
  (snapPoint) => {
2307
2371
  const idx = sortedSnaps.findIndex((s) => s.point === snapPoint);
2308
2372
  if (idx === -1) return;
@@ -2316,7 +2380,7 @@ function useBottomSheet({
2316
2380
  },
2317
2381
  [sortedSnaps, y, onSnapChange]
2318
2382
  );
2319
- const cycleSnapPoint = React6.useCallback(() => {
2383
+ const cycleSnapPoint = React9.useCallback(() => {
2320
2384
  const nextIdx = activeSnapIndex + 1;
2321
2385
  if (nextIdx >= sortedSnaps.length) {
2322
2386
  onClose();
@@ -2330,7 +2394,7 @@ function useBottomSheet({
2330
2394
  onSnapChange == null ? void 0 : onSnapChange(sortedSnaps[nextIdx].point);
2331
2395
  }
2332
2396
  }, [activeSnapIndex, sortedSnaps, y, onClose, onSnapChange]);
2333
- const dragConstraints = React6.useMemo(
2397
+ const dragConstraints = React9.useMemo(
2334
2398
  () => {
2335
2399
  var _a, _b;
2336
2400
  return {
@@ -2340,7 +2404,7 @@ function useBottomSheet({
2340
2404
  },
2341
2405
  [sortedSnaps, viewportHeight]
2342
2406
  );
2343
- React6.useEffect(() => {
2407
+ React9.useEffect(() => {
2344
2408
  if (!isOpen || !gesturesEnabled || !scopeNode) return;
2345
2409
  const node = scopeNode;
2346
2410
  const viewport = node.querySelector(
@@ -2561,7 +2625,7 @@ function resolveMaxHeight(maxHeight, snapPoints) {
2561
2625
  return ABSOLUTE_MAX_HEIGHT;
2562
2626
  return maxHeight;
2563
2627
  }
2564
- var BottomSheet = React6__namespace.forwardRef(
2628
+ var BottomSheet = React9__namespace.forwardRef(
2565
2629
  ({
2566
2630
  isOpen,
2567
2631
  onClose,
@@ -2594,27 +2658,27 @@ var BottomSheet = React6__namespace.forwardRef(
2594
2658
  isModal: false,
2595
2659
  maxHeight: resolveMaxHeight(maxHeight, snapPoints)
2596
2660
  });
2597
- React6__namespace.useEffect(() => {
2661
+ React9__namespace.useEffect(() => {
2598
2662
  const node = scope.current;
2599
2663
  if (node) {
2600
2664
  node.snapTo = snapTo;
2601
2665
  }
2602
2666
  }, [snapTo, scope]);
2603
- const [mounted, setMounted] = React6__namespace.useState(false);
2604
- React6__namespace.useEffect(() => {
2667
+ const [mounted, setMounted] = React9__namespace.useState(false);
2668
+ React9__namespace.useEffect(() => {
2605
2669
  setMounted(true);
2606
2670
  }, []);
2607
- const resolvedDividers = React6__namespace.useMemo(
2671
+ const resolvedDividers = React9__namespace.useMemo(
2608
2672
  () => resolveDividers(divider),
2609
2673
  [divider]
2610
2674
  );
2611
- const resolvedSheetMaxWidth = React6__namespace.useMemo(() => {
2675
+ const resolvedSheetMaxWidth = React9__namespace.useMemo(() => {
2612
2676
  if (sheetMaxWidth === void 0)
2613
2677
  return "var(--m3-bottom-sheet-max-width, 640px)";
2614
2678
  if (typeof sheetMaxWidth === "number") return `${sheetMaxWidth}px`;
2615
2679
  return sheetMaxWidth;
2616
2680
  }, [sheetMaxWidth]);
2617
- const mergedRef = React6__namespace.useCallback(
2681
+ const mergedRef = React9__namespace.useCallback(
2618
2682
  (node) => {
2619
2683
  scope(node);
2620
2684
  if (typeof ref === "function") ref(node);
@@ -2698,7 +2762,7 @@ var SCRIM_ANIM = {
2698
2762
  },
2699
2763
  exit: { opacity: 0, transition: { duration: 0.18, ease: "easeIn" } }
2700
2764
  };
2701
- var Scrim = React6__namespace.forwardRef(
2765
+ var Scrim = React9__namespace.forwardRef(
2702
2766
  ({ onClick, className, style }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
2703
2767
  react.m.div,
2704
2768
  __spreadValues({
@@ -2730,7 +2794,7 @@ function resolveSheetMaxWidth(value) {
2730
2794
  if (typeof value === "number") return `${value}px`;
2731
2795
  return value;
2732
2796
  }
2733
- var BottomSheetModal = React6__namespace.forwardRef(
2797
+ var BottomSheetModal = React9__namespace.forwardRef(
2734
2798
  ({
2735
2799
  isOpen,
2736
2800
  onClose,
@@ -2769,21 +2833,21 @@ var BottomSheetModal = React6__namespace.forwardRef(
2769
2833
  isModal: true,
2770
2834
  maxHeight: resolveMaxHeight2(maxHeight, snapPoints)
2771
2835
  });
2772
- React6__namespace.useEffect(() => {
2836
+ React9__namespace.useEffect(() => {
2773
2837
  const node = scope.current;
2774
2838
  if (node) {
2775
2839
  node.snapTo = snapTo;
2776
2840
  }
2777
2841
  }, [snapTo, scope]);
2778
- const resolvedDividers = React6__namespace.useMemo(
2842
+ const resolvedDividers = React9__namespace.useMemo(
2779
2843
  () => resolveDividers(divider),
2780
2844
  [divider]
2781
2845
  );
2782
- const resolvedSheetMaxWidth = React6__namespace.useMemo(
2846
+ const resolvedSheetMaxWidth = React9__namespace.useMemo(
2783
2847
  () => resolveSheetMaxWidth(sheetMaxWidth),
2784
2848
  [sheetMaxWidth]
2785
2849
  );
2786
- const mergedRef = React6__namespace.useCallback(
2850
+ const mergedRef = React9__namespace.useCallback(
2787
2851
  (node) => {
2788
2852
  scope(node);
2789
2853
  if (typeof ref === "function") ref(node);
@@ -2882,17 +2946,17 @@ function useBottomSheetScaffold({
2882
2946
  onStateChange,
2883
2947
  initialState = "partiallyExpanded"
2884
2948
  } = {}) {
2885
- const [containerHeight, setContainerHeight] = React6.useState(
2949
+ const [containerHeight, setContainerHeight] = React9.useState(
2886
2950
  typeof window !== "undefined" ? window.innerHeight : 800
2887
2951
  );
2888
- const containerNodeRef = React6.useRef(null);
2889
- const containerRef = React6.useCallback((node) => {
2952
+ const containerNodeRef = React9.useRef(null);
2953
+ const containerRef = React9.useCallback((node) => {
2890
2954
  containerNodeRef.current = node;
2891
2955
  if (node) {
2892
2956
  setContainerHeight(node.offsetHeight || window.innerHeight);
2893
2957
  }
2894
2958
  }, []);
2895
- React6.useEffect(() => {
2959
+ React9.useEffect(() => {
2896
2960
  const node = containerNodeRef.current;
2897
2961
  if (!node) return;
2898
2962
  const observer = new ResizeObserver(() => {
@@ -2904,34 +2968,34 @@ function useBottomSheetScaffold({
2904
2968
  const expandedY = 0;
2905
2969
  const partialY = containerHeight - peekHeight;
2906
2970
  const y = react.useMotionValue(initialState === "expanded" ? expandedY : partialY);
2907
- const [sheetState, setSheetState] = React6.useState(
2971
+ const [sheetState, setSheetState] = React9.useState(
2908
2972
  initialState
2909
2973
  );
2910
- const [isScrollDisablingDrag, setIsScrollDisablingDrag] = React6.useState(false);
2974
+ const [isScrollDisablingDrag, setIsScrollDisablingDrag] = React9.useState(false);
2911
2975
  const isDragEnabled = swipeEnabled && !isScrollDisablingDrag;
2912
- const dragConstraints = React6.useMemo(
2976
+ const dragConstraints = React9.useMemo(
2913
2977
  () => ({ top: 0, bottom: partialY }),
2914
2978
  [partialY]
2915
2979
  );
2916
- React6.useEffect(() => {
2980
+ React9.useEffect(() => {
2917
2981
  const targetY = sheetState === "expanded" ? 0 : partialY;
2918
2982
  void react.animate(y, targetY, SPRING);
2919
2983
  }, [partialY, sheetState, y]);
2920
- const expand = React6.useCallback(() => {
2984
+ const expand = React9.useCallback(() => {
2921
2985
  setSheetState("expanded");
2922
2986
  void react.animate(y, 0, SPRING);
2923
2987
  onStateChange == null ? void 0 : onStateChange("expanded");
2924
2988
  }, [y, onStateChange]);
2925
- const partialExpand = React6.useCallback(() => {
2989
+ const partialExpand = React9.useCallback(() => {
2926
2990
  setSheetState("partiallyExpanded");
2927
2991
  void react.animate(y, partialY, SPRING);
2928
2992
  onStateChange == null ? void 0 : onStateChange("partiallyExpanded");
2929
2993
  }, [y, partialY, onStateChange]);
2930
- const toggle = React6.useCallback(() => {
2994
+ const toggle = React9.useCallback(() => {
2931
2995
  if (sheetState === "expanded") partialExpand();
2932
2996
  else expand();
2933
2997
  }, [sheetState, expand, partialExpand]);
2934
- const handleDragEnd = React6.useCallback(
2998
+ const handleDragEnd = React9.useCallback(
2935
2999
  (_event, info) => {
2936
3000
  const rawY = y.get();
2937
3001
  let velocity = info.velocity.y;
@@ -2956,7 +3020,7 @@ function useBottomSheetScaffold({
2956
3020
  },
2957
3021
  [y, partialY, expand, partialExpand]
2958
3022
  );
2959
- const handleContentScroll = React6.useCallback(
3023
+ const handleContentScroll = React9.useCallback(
2960
3024
  (e) => {
2961
3025
  if (sheetState !== "expanded") {
2962
3026
  e.currentTarget.scrollTop = 0;
@@ -2982,7 +3046,7 @@ function useBottomSheetScaffold({
2982
3046
  containerRef
2983
3047
  };
2984
3048
  }
2985
- var BottomSheetScaffold = React6__namespace.forwardRef(
3049
+ var BottomSheetScaffold = React9__namespace.forwardRef(
2986
3050
  ({
2987
3051
  sheetContent,
2988
3052
  children,
@@ -3011,13 +3075,13 @@ var BottomSheetScaffold = React6__namespace.forwardRef(
3011
3075
  onStateChange: onSheetStateChange,
3012
3076
  initialState: initialSheetState
3013
3077
  });
3014
- const resolvedSheetMaxWidth = React6__namespace.useMemo(() => {
3078
+ const resolvedSheetMaxWidth = React9__namespace.useMemo(() => {
3015
3079
  if (sheetMaxWidth === void 0)
3016
3080
  return "var(--m3-bottom-sheet-max-width, 640px)";
3017
3081
  if (typeof sheetMaxWidth === "number") return `${sheetMaxWidth}px`;
3018
3082
  return sheetMaxWidth;
3019
3083
  }, [sheetMaxWidth]);
3020
- const mergedRef = React6__namespace.useCallback(
3084
+ const mergedRef = React9__namespace.useCallback(
3021
3085
  (node) => {
3022
3086
  containerRef(node);
3023
3087
  if (typeof ref === "function") ref(node);
@@ -3025,7 +3089,7 @@ var BottomSheetScaffold = React6__namespace.forwardRef(
3025
3089
  },
3026
3090
  [containerRef, ref]
3027
3091
  );
3028
- const resolvedDragHandle = React6__namespace.useMemo(() => {
3092
+ const resolvedDragHandle = React9__namespace.useMemo(() => {
3029
3093
  if (sheetDragHandle === null) return null;
3030
3094
  if (sheetDragHandle !== void 0) return sheetDragHandle;
3031
3095
  return /* @__PURE__ */ jsxRuntime.jsx(DragHandle, { onCycle: toggle });
@@ -3088,7 +3152,7 @@ var BottomSheetScaffold = React6__namespace.forwardRef(
3088
3152
  );
3089
3153
  BottomSheetScaffold.displayName = "BottomSheetScaffold";
3090
3154
  var COPLANAR_TRANSITION = `margin ${getMotionTransitionCSS("default", "spatial")}`;
3091
- var SideSheet = React6__namespace.forwardRef(
3155
+ var SideSheet = React9__namespace.forwardRef(
3092
3156
  ({
3093
3157
  isOpen,
3094
3158
  children,
@@ -3104,16 +3168,16 @@ var SideSheet = React6__namespace.forwardRef(
3104
3168
  divider,
3105
3169
  scrollAreaProps
3106
3170
  }, ref) => {
3107
- const sheetAnim = React6__namespace.useMemo(() => buildSideSheetAnim(edge), [edge]);
3108
- const [mounted, setMounted] = React6__namespace.useState(false);
3109
- React6__namespace.useEffect(() => {
3171
+ const sheetAnim = React9__namespace.useMemo(() => buildSideSheetAnim(edge), [edge]);
3172
+ const [mounted, setMounted] = React9__namespace.useState(false);
3173
+ React9__namespace.useEffect(() => {
3110
3174
  setMounted(true);
3111
3175
  }, []);
3112
- const resolvedDividers = React6__namespace.useMemo(
3176
+ const resolvedDividers = React9__namespace.useMemo(
3113
3177
  () => resolveDividers(divider),
3114
3178
  [divider]
3115
3179
  );
3116
- React6__namespace.useEffect(() => {
3180
+ React9__namespace.useEffect(() => {
3117
3181
  const sibling = coplanarSiblingRef == null ? void 0 : coplanarSiblingRef.current;
3118
3182
  if (!sibling) return;
3119
3183
  sibling.style.transition = COPLANAR_TRANSITION;
@@ -3177,7 +3241,7 @@ var SideSheet = React6__namespace.forwardRef(
3177
3241
  }
3178
3242
  );
3179
3243
  SideSheet.displayName = "SideSheet";
3180
- var SideSheetModal = React6__namespace.forwardRef(
3244
+ var SideSheetModal = React9__namespace.forwardRef(
3181
3245
  ({
3182
3246
  isOpen,
3183
3247
  onClose,
@@ -3192,8 +3256,8 @@ var SideSheetModal = React6__namespace.forwardRef(
3192
3256
  divider,
3193
3257
  scrollAreaProps
3194
3258
  }, ref) => {
3195
- const sheetAnim = React6__namespace.useMemo(() => buildSideSheetAnim(edge), [edge]);
3196
- const resolvedDividers = React6__namespace.useMemo(
3259
+ const sheetAnim = React9__namespace.useMemo(() => buildSideSheetAnim(edge), [edge]);
3260
+ const resolvedDividers = React9__namespace.useMemo(
3197
3261
  () => resolveDividers(divider),
3198
3262
  [divider]
3199
3263
  );