@bug-on/m3-expressive 1.1.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/dist/buttons.d.mts +3 -3
- package/dist/buttons.d.ts +3 -3
- package/dist/buttons.js +708 -606
- package/dist/buttons.js.map +1 -1
- package/dist/buttons.mjs +707 -605
- package/dist/buttons.mjs.map +1 -1
- package/dist/core-Bc5Wj_pc.d.ts +497 -0
- package/dist/core-D4048_K5.d.mts +497 -0
- package/dist/core.d.mts +6 -422
- package/dist/core.d.ts +6 -422
- package/dist/core.js +223 -129
- package/dist/core.js.map +1 -1
- package/dist/core.mjs +224 -130
- package/dist/core.mjs.map +1 -1
- package/dist/feedback.js +85 -61
- package/dist/feedback.js.map +1 -1
- package/dist/feedback.mjs +85 -61
- package/dist/feedback.mjs.map +1 -1
- package/dist/forms.d.mts +2 -2
- package/dist/forms.d.ts +2 -2
- package/dist/forms.js +70 -8
- package/dist/forms.js.map +1 -1
- package/dist/forms.mjs +70 -8
- package/dist/forms.mjs.map +1 -1
- package/dist/{icon-button-D-gs0gfj.d.mts → icon-button-sSt6PPLg.d.mts} +6 -0
- package/dist/{icon-button-D-gs0gfj.d.ts → icon-button-sSt6PPLg.d.ts} +6 -0
- package/dist/index.css +6 -1
- package/dist/index.d.mts +68 -6
- package/dist/index.d.ts +68 -6
- package/dist/index.js +1177 -580
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1172 -583
- package/dist/index.mjs.map +1 -1
- package/dist/layout.d.mts +18 -1
- package/dist/layout.d.ts +18 -1
- package/dist/layout.js +94 -8
- package/dist/layout.js.map +1 -1
- package/dist/layout.mjs +94 -8
- package/dist/layout.mjs.map +1 -1
- package/dist/{md3-DFhj-NZj.d.mts → md3-Dty-Qcad.d.mts} +7 -1
- package/dist/{md3-DFhj-NZj.d.ts → md3-Dty-Qcad.d.ts} +7 -1
- package/dist/navigation.d.mts +134 -9
- package/dist/navigation.d.ts +134 -9
- package/dist/navigation.js +403 -93
- package/dist/navigation.js.map +1 -1
- package/dist/navigation.mjs +397 -94
- package/dist/navigation.mjs.map +1 -1
- package/dist/overlays.js +214 -189
- package/dist/overlays.js.map +1 -1
- package/dist/overlays.mjs +176 -151
- package/dist/overlays.mjs.map +1 -1
- package/dist/pickers.js +222 -197
- package/dist/pickers.js.map +1 -1
- package/dist/pickers.mjs +189 -164
- package/dist/pickers.mjs.map +1 -1
- package/dist/{split-button-trailing-uncheckable-BRPuTqi1.d.mts → split-button-trailing-uncheckable-BcPD_7uK.d.ts} +73 -7
- package/dist/{split-button-trailing-uncheckable-CjOFCoyW.d.ts → split-button-trailing-uncheckable-DtFJkTFr.d.mts} +73 -7
- package/dist/{text-field-eAIpz9z1.d.mts → text-field-T4Rg-9Bw.d.mts} +7 -0
- package/dist/{text-field-eAIpz9z1.d.ts → text-field-T4Rg-9Bw.d.ts} +7 -0
- package/package.json +4 -4
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
|
|
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
|
|
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 =
|
|
115
|
+
var IndeterminateSvg = React9__namespace.memo(function IndeterminateSvg2({
|
|
115
116
|
size
|
|
116
117
|
}) {
|
|
117
|
-
const [ready, setReady] =
|
|
118
|
-
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
342
|
+
const effectiveAmplitude = React9__namespace.useMemo(
|
|
342
343
|
() => amplitude != null ? amplitude : 1.6 * scaleFactor,
|
|
343
344
|
[amplitude, scaleFactor]
|
|
344
345
|
);
|
|
345
|
-
const effectiveWavelength =
|
|
346
|
+
const effectiveWavelength = React9__namespace.useMemo(
|
|
346
347
|
() => wavelength != null ? wavelength : 15 * scaleFactor,
|
|
347
348
|
[wavelength, scaleFactor]
|
|
348
349
|
);
|
|
349
|
-
const wavyActivePath =
|
|
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 =
|
|
359
|
-
const gapForTrack =
|
|
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] =
|
|
549
|
-
const observerRef =
|
|
550
|
-
const ref =
|
|
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
|
-
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
684
|
+
const titleId = React9__namespace.useId();
|
|
684
685
|
const [containerRef, width] = useContainerWidth();
|
|
685
|
-
const activePathRef =
|
|
686
|
-
const trackPathRef =
|
|
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
|
-
|
|
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 =
|
|
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 =
|
|
902
|
+
const containerRef = React9__namespace.useRef(null);
|
|
902
903
|
const mergedRef = useMergedRef(ref, containerRef);
|
|
903
|
-
const [isRtl, setIsRtl] =
|
|
904
|
-
|
|
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 =
|
|
913
|
-
const svgHeight =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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 =
|
|
1002
|
+
var RippleItem = React9__namespace.memo(function RippleItem2({
|
|
1002
1003
|
ripple,
|
|
1003
1004
|
onDone
|
|
1004
1005
|
}) {
|
|
@@ -1042,8 +1043,8 @@ function Ripple({
|
|
|
1042
1043
|
}
|
|
1043
1044
|
function useRippleState(options = {}) {
|
|
1044
1045
|
const { disabled = false } = options;
|
|
1045
|
-
const [ripples, setRipples] =
|
|
1046
|
-
const onPointerDown =
|
|
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();
|
|
@@ -1057,7 +1058,7 @@ function useRippleState(options = {}) {
|
|
|
1057
1058
|
},
|
|
1058
1059
|
[disabled]
|
|
1059
1060
|
);
|
|
1060
|
-
const removeRipple =
|
|
1061
|
+
const removeRipple = React9__namespace.useCallback((id) => {
|
|
1061
1062
|
setRipples((prev) => prev.filter((r) => r.id !== id));
|
|
1062
1063
|
}, []);
|
|
1063
1064
|
return { ripples, onPointerDown, removeRipple };
|
|
@@ -1265,7 +1266,7 @@ function resolveDisabledBgClass(colorStyle) {
|
|
|
1265
1266
|
}
|
|
1266
1267
|
return "disabled:text-m3-on-surface/[0.38]";
|
|
1267
1268
|
}
|
|
1268
|
-
var IconButtonComponent =
|
|
1269
|
+
var IconButtonComponent = React9__namespace.forwardRef(
|
|
1269
1270
|
(_a, ref) => {
|
|
1270
1271
|
var _b = _a, {
|
|
1271
1272
|
className,
|
|
@@ -1278,6 +1279,7 @@ var IconButtonComponent = React6__namespace.forwardRef(
|
|
|
1278
1279
|
loading = false,
|
|
1279
1280
|
loadingVariant = "loading-indicator",
|
|
1280
1281
|
iconSize,
|
|
1282
|
+
asChild = false,
|
|
1281
1283
|
children,
|
|
1282
1284
|
onClick,
|
|
1283
1285
|
onKeyDown,
|
|
@@ -1293,6 +1295,7 @@ var IconButtonComponent = React6__namespace.forwardRef(
|
|
|
1293
1295
|
"loading",
|
|
1294
1296
|
"loadingVariant",
|
|
1295
1297
|
"iconSize",
|
|
1298
|
+
"asChild",
|
|
1296
1299
|
"children",
|
|
1297
1300
|
"onClick",
|
|
1298
1301
|
"onKeyDown",
|
|
@@ -1301,18 +1304,18 @@ var IconButtonComponent = React6__namespace.forwardRef(
|
|
|
1301
1304
|
var _a2, _b2;
|
|
1302
1305
|
const isToggle = variant === "toggle";
|
|
1303
1306
|
const isSelected = isToggle && !!selected;
|
|
1304
|
-
const resolvedColorClass =
|
|
1307
|
+
const resolvedColorClass = React9__namespace.useMemo(
|
|
1305
1308
|
() => isSelected ? colorStyles[colorStyle].selected : colorStyles[colorStyle].default,
|
|
1306
1309
|
[isSelected, colorStyle]
|
|
1307
1310
|
);
|
|
1308
|
-
const outlineWidthClass =
|
|
1311
|
+
const outlineWidthClass = React9__namespace.useMemo(
|
|
1309
1312
|
() => {
|
|
1310
1313
|
var _a3;
|
|
1311
1314
|
return colorStyle === "outlined" && !isSelected ? (_a3 = SIZE_OUTLINE_WIDTH[size]) != null ? _a3 : "border" : "";
|
|
1312
1315
|
},
|
|
1313
1316
|
[colorStyle, isSelected, size]
|
|
1314
1317
|
);
|
|
1315
|
-
const disabledBgClass =
|
|
1318
|
+
const disabledBgClass = React9__namespace.useMemo(
|
|
1316
1319
|
() => resolveDisabledBgClass(colorStyle),
|
|
1317
1320
|
[colorStyle]
|
|
1318
1321
|
);
|
|
@@ -1333,7 +1336,7 @@ var IconButtonComponent = React6__namespace.forwardRef(
|
|
|
1333
1336
|
const { ripples, onPointerDown, removeRipple } = useRippleState({
|
|
1334
1337
|
disabled: loading
|
|
1335
1338
|
});
|
|
1336
|
-
const handleClick =
|
|
1339
|
+
const handleClick = React9__namespace.useCallback(
|
|
1337
1340
|
(e) => {
|
|
1338
1341
|
if (loading) {
|
|
1339
1342
|
e.preventDefault();
|
|
@@ -1343,7 +1346,7 @@ var IconButtonComponent = React6__namespace.forwardRef(
|
|
|
1343
1346
|
},
|
|
1344
1347
|
[loading, onClick]
|
|
1345
1348
|
);
|
|
1346
|
-
const handleKeyDown =
|
|
1349
|
+
const handleKeyDown = React9__namespace.useCallback(
|
|
1347
1350
|
(e) => {
|
|
1348
1351
|
if (loading) return;
|
|
1349
1352
|
if ((e.key === "Enter" || e.key === " ") && onClick) {
|
|
@@ -1354,7 +1357,87 @@ var IconButtonComponent = React6__namespace.forwardRef(
|
|
|
1354
1357
|
},
|
|
1355
1358
|
[loading, onClick, onKeyDown]
|
|
1356
1359
|
);
|
|
1357
|
-
|
|
1360
|
+
const innerContent = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
1361
|
+
needsTouchTarget && /* @__PURE__ */ jsxRuntime.jsx(TouchTarget, {}),
|
|
1362
|
+
/* @__PURE__ */ jsxRuntime.jsx(Ripple, { ripples, onRippleDone: removeRipple }),
|
|
1363
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "wait", initial: false, children: loading ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1364
|
+
react.m.span,
|
|
1365
|
+
__spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
|
|
1366
|
+
transition: SPRING_TRANSITION,
|
|
1367
|
+
className: cn(
|
|
1368
|
+
"flex items-center justify-center shrink-0",
|
|
1369
|
+
iconSize != null ? void 0 : iconClass
|
|
1370
|
+
),
|
|
1371
|
+
style: isCustomSize ? { width: `${iconSize}px`, height: `${iconSize}px` } : void 0,
|
|
1372
|
+
children: loadingVariant === "loading-indicator" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
1373
|
+
LoadingIndicator,
|
|
1374
|
+
{
|
|
1375
|
+
size: typeof iconPx === "number" ? iconPx : defaultIconPx,
|
|
1376
|
+
color: "currentColor",
|
|
1377
|
+
"aria-label": "Loading"
|
|
1378
|
+
}
|
|
1379
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1380
|
+
ProgressIndicator,
|
|
1381
|
+
{
|
|
1382
|
+
variant: "circular",
|
|
1383
|
+
size: typeof iconPx === "number" ? iconPx : defaultIconPx,
|
|
1384
|
+
color: "currentColor",
|
|
1385
|
+
trackColor: "transparent",
|
|
1386
|
+
"aria-label": "Loading"
|
|
1387
|
+
}
|
|
1388
|
+
)
|
|
1389
|
+
}),
|
|
1390
|
+
"loading"
|
|
1391
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
1392
|
+
react.m.span,
|
|
1393
|
+
__spreadProps(__spreadValues({}, ICON_SPAN_VARIANTS), {
|
|
1394
|
+
transition: SPRING_TRANSITION,
|
|
1395
|
+
"aria-hidden": "true",
|
|
1396
|
+
className: cn(
|
|
1397
|
+
"flex items-center justify-center shrink-0 [&_svg]:w-full [&_svg]:h-full [&_.md-icon]:text-[length:inherit]!",
|
|
1398
|
+
iconSize != null ? void 0 : iconClass
|
|
1399
|
+
),
|
|
1400
|
+
style: {
|
|
1401
|
+
fontSize: typeof iconPx === "number" ? `${iconPx}px` : iconPx,
|
|
1402
|
+
width: isCustomSize ? `${iconSize}px` : void 0,
|
|
1403
|
+
height: isCustomSize ? `${iconSize}px` : void 0
|
|
1404
|
+
},
|
|
1405
|
+
children: asChild ? React9__namespace.Children.only(children).props.children : children
|
|
1406
|
+
}),
|
|
1407
|
+
"content"
|
|
1408
|
+
) })
|
|
1409
|
+
] });
|
|
1410
|
+
const containerClassName = cn(
|
|
1411
|
+
baseIconButtonClasses,
|
|
1412
|
+
resolvedColorClass,
|
|
1413
|
+
outlineWidthClass,
|
|
1414
|
+
disabledBgClass,
|
|
1415
|
+
"overflow-hidden",
|
|
1416
|
+
SIZE_STYLES[size],
|
|
1417
|
+
loading && "pointer-events-none opacity-75 cursor-not-allowed",
|
|
1418
|
+
className
|
|
1419
|
+
);
|
|
1420
|
+
if (asChild) {
|
|
1421
|
+
const child = React9__namespace.Children.only(children);
|
|
1422
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.LazyMotion, { features: react.domMax, strict: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1423
|
+
reactSlot.Slot,
|
|
1424
|
+
__spreadProps(__spreadValues({
|
|
1425
|
+
ref,
|
|
1426
|
+
"aria-pressed": isToggle ? isSelected : void 0,
|
|
1427
|
+
"aria-label": ariaLabel,
|
|
1428
|
+
"aria-busy": loading || void 0,
|
|
1429
|
+
"aria-disabled": loading || restProps.disabled,
|
|
1430
|
+
onClick: handleClick,
|
|
1431
|
+
onPointerDown,
|
|
1432
|
+
onKeyDown: handleKeyDown,
|
|
1433
|
+
style: __spreadProps(__spreadValues({}, style), { borderRadius: `${animateRadius}px` }),
|
|
1434
|
+
className: containerClassName
|
|
1435
|
+
}, restProps), {
|
|
1436
|
+
children: React9__namespace.cloneElement(child, { children: innerContent })
|
|
1437
|
+
})
|
|
1438
|
+
) });
|
|
1439
|
+
}
|
|
1440
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.LazyMotion, { features: react.domMax, strict: true, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1358
1441
|
react.m.button,
|
|
1359
1442
|
__spreadProps(__spreadValues({
|
|
1360
1443
|
ref,
|
|
@@ -1370,79 +1453,21 @@ var IconButtonComponent = React6__namespace.forwardRef(
|
|
|
1370
1453
|
animate: { borderRadius: animateRadius },
|
|
1371
1454
|
whileTap: { borderRadius: pressedRadius },
|
|
1372
1455
|
transition: { borderRadius: SPRING_TRANSITION_FAST },
|
|
1373
|
-
className:
|
|
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
|
-
)
|
|
1456
|
+
className: containerClassName
|
|
1383
1457
|
}, 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
|
-
]
|
|
1458
|
+
children: innerContent
|
|
1434
1459
|
})
|
|
1435
1460
|
) });
|
|
1436
1461
|
}
|
|
1437
1462
|
);
|
|
1438
1463
|
IconButtonComponent.displayName = "IconButton";
|
|
1439
|
-
var IconButton =
|
|
1464
|
+
var IconButton = React9__namespace.memo(IconButtonComponent);
|
|
1440
1465
|
var VARIANT_FONT = {
|
|
1441
1466
|
outlined: "'Material Symbols Outlined'",
|
|
1442
1467
|
rounded: "'Material Symbols Rounded'",
|
|
1443
1468
|
sharp: "'Material Symbols Sharp'"
|
|
1444
1469
|
};
|
|
1445
|
-
var IconComponent =
|
|
1470
|
+
var IconComponent = React9__namespace.forwardRef(
|
|
1446
1471
|
(_a, ref) => {
|
|
1447
1472
|
var _b = _a, {
|
|
1448
1473
|
name,
|
|
@@ -1508,8 +1533,8 @@ var IconComponent = React6__namespace.forwardRef(
|
|
|
1508
1533
|
}
|
|
1509
1534
|
);
|
|
1510
1535
|
IconComponent.displayName = "Icon";
|
|
1511
|
-
var Icon =
|
|
1512
|
-
var ScrollArea =
|
|
1536
|
+
var Icon = React9__namespace.memo(IconComponent);
|
|
1537
|
+
var ScrollArea = React9__namespace.forwardRef(
|
|
1513
1538
|
(_a, ref) => {
|
|
1514
1539
|
var _b = _a, {
|
|
1515
1540
|
className,
|
|
@@ -1530,15 +1555,15 @@ var ScrollArea = React6__namespace.forwardRef(
|
|
|
1530
1555
|
"viewportRef",
|
|
1531
1556
|
"viewportProps"
|
|
1532
1557
|
]);
|
|
1533
|
-
const [isTouchDevice, setIsTouchDevice] =
|
|
1534
|
-
|
|
1558
|
+
const [isTouchDevice, setIsTouchDevice] = React9__namespace.useState(false);
|
|
1559
|
+
React9__namespace.useEffect(() => {
|
|
1535
1560
|
if (typeof window !== "undefined") {
|
|
1536
1561
|
setIsTouchDevice(
|
|
1537
1562
|
"ontouchstart" in window || navigator.maxTouchPoints > 0
|
|
1538
1563
|
);
|
|
1539
1564
|
}
|
|
1540
1565
|
}, []);
|
|
1541
|
-
const resolvedType =
|
|
1566
|
+
const resolvedType = React9__namespace.useMemo(() => {
|
|
1542
1567
|
if (type === "hover" && isTouchDevice) {
|
|
1543
1568
|
return "scroll";
|
|
1544
1569
|
}
|
|
@@ -1589,7 +1614,7 @@ var ScrollArea = React6__namespace.forwardRef(
|
|
|
1589
1614
|
}
|
|
1590
1615
|
);
|
|
1591
1616
|
ScrollArea.displayName = "ScrollArea";
|
|
1592
|
-
var ScrollAreaScrollbar =
|
|
1617
|
+
var ScrollAreaScrollbar = React9__namespace.forwardRef((_a, ref) => {
|
|
1593
1618
|
var _b = _a, { className, orientation = "vertical" } = _b, props = __objRest(_b, ["className", "orientation"]);
|
|
1594
1619
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1595
1620
|
RadixScrollArea__namespace.Scrollbar,
|
|
@@ -1619,7 +1644,7 @@ var ScrollAreaScrollbar = React6__namespace.forwardRef((_a, ref) => {
|
|
|
1619
1644
|
);
|
|
1620
1645
|
});
|
|
1621
1646
|
ScrollAreaScrollbar.displayName = RadixScrollArea__namespace.Scrollbar.displayName;
|
|
1622
|
-
var ScrollAreaCorner =
|
|
1647
|
+
var ScrollAreaCorner = React9__namespace.forwardRef((_a, ref) => {
|
|
1623
1648
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1624
1649
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1625
1650
|
RadixScrollArea__namespace.Corner,
|
|
@@ -1661,9 +1686,9 @@ DialogTrigger.displayName = "DialogTrigger";
|
|
|
1661
1686
|
var DialogPortal = ({
|
|
1662
1687
|
open,
|
|
1663
1688
|
children
|
|
1664
|
-
}) => /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Portal, { forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { children: open ?
|
|
1689
|
+
}) => /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Portal, { forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { children: open ? React9__namespace.Children.toArray(children) : null }) });
|
|
1665
1690
|
DialogPortal.displayName = "DialogPortal";
|
|
1666
|
-
var DialogOverlay =
|
|
1691
|
+
var DialogOverlay = React9__namespace.forwardRef((_a, ref) => {
|
|
1667
1692
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1668
1693
|
return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Overlay, __spreadProps(__spreadValues({ ref, asChild: true }, props), { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1669
1694
|
react.m.div,
|
|
@@ -1674,7 +1699,7 @@ var DialogOverlay = React6__namespace.forwardRef((_a, ref) => {
|
|
|
1674
1699
|
) }));
|
|
1675
1700
|
});
|
|
1676
1701
|
DialogOverlay.displayName = "DialogOverlay";
|
|
1677
|
-
var DialogContent =
|
|
1702
|
+
var DialogContent = React9__namespace.forwardRef((_a, ref) => {
|
|
1678
1703
|
var _b = _a, { className, children, hideCloseButton = false } = _b, props = __objRest(_b, ["className", "children", "hideCloseButton"]);
|
|
1679
1704
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1680
1705
|
RadixDialog__namespace.Content,
|
|
@@ -1714,7 +1739,7 @@ var DialogContent = React6__namespace.forwardRef((_a, ref) => {
|
|
|
1714
1739
|
);
|
|
1715
1740
|
});
|
|
1716
1741
|
DialogContent.displayName = "DialogContent";
|
|
1717
|
-
var DialogIcon =
|
|
1742
|
+
var DialogIcon = React9__namespace.forwardRef((_a, ref) => {
|
|
1718
1743
|
var _b = _a, { className, children } = _b, props = __objRest(_b, ["className", "children"]);
|
|
1719
1744
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1720
1745
|
"div",
|
|
@@ -1737,7 +1762,7 @@ var DialogHeader = (_a) => {
|
|
|
1737
1762
|
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadValues({ className: cn("flex flex-col gap-2 mb-4", className) }, props));
|
|
1738
1763
|
};
|
|
1739
1764
|
DialogHeader.displayName = "DialogHeader";
|
|
1740
|
-
var DialogTitle =
|
|
1765
|
+
var DialogTitle = React9__namespace.forwardRef((_a, ref) => {
|
|
1741
1766
|
var _b = _a, { className, asChild } = _b, props = __objRest(_b, ["className", "asChild"]);
|
|
1742
1767
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1743
1768
|
RadixDialog__namespace.Title,
|
|
@@ -1752,7 +1777,7 @@ var DialogTitle = React6__namespace.forwardRef((_a, ref) => {
|
|
|
1752
1777
|
);
|
|
1753
1778
|
});
|
|
1754
1779
|
DialogTitle.displayName = "DialogTitle";
|
|
1755
|
-
var DialogDescription =
|
|
1780
|
+
var DialogDescription = React9__namespace.forwardRef((_a, ref) => {
|
|
1756
1781
|
var _b = _a, { className, asChild } = _b, props = __objRest(_b, ["className", "asChild"]);
|
|
1757
1782
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1758
1783
|
RadixDialog__namespace.Description,
|
|
@@ -1764,7 +1789,7 @@ var DialogDescription = React6__namespace.forwardRef((_a, ref) => {
|
|
|
1764
1789
|
);
|
|
1765
1790
|
});
|
|
1766
1791
|
DialogDescription.displayName = "DialogDescription";
|
|
1767
|
-
var DialogBody =
|
|
1792
|
+
var DialogBody = React9__namespace.forwardRef((_a, ref) => {
|
|
1768
1793
|
var _b = _a, { className, children, dir } = _b, props = __objRest(_b, ["className", "children", "dir"]);
|
|
1769
1794
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1770
1795
|
ScrollArea,
|
|
@@ -1795,7 +1820,7 @@ var DialogFooter = (_a) => {
|
|
|
1795
1820
|
};
|
|
1796
1821
|
DialogFooter.displayName = "DialogFooter";
|
|
1797
1822
|
var DialogClose = RadixDialog__namespace.Close;
|
|
1798
|
-
var DialogFullScreenContent =
|
|
1823
|
+
var DialogFullScreenContent = React9__namespace.forwardRef(
|
|
1799
1824
|
(_a, ref) => {
|
|
1800
1825
|
var _b = _a, {
|
|
1801
1826
|
className,
|
|
@@ -1892,7 +1917,7 @@ var DrawerPortal = ({
|
|
|
1892
1917
|
open,
|
|
1893
1918
|
children
|
|
1894
1919
|
}) => /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Portal, { forceMount: true, children: /* @__PURE__ */ jsxRuntime.jsx(react.AnimatePresence, { mode: "wait", children: open && children }) });
|
|
1895
|
-
var DrawerOverlay =
|
|
1920
|
+
var DrawerOverlay = React9__namespace.forwardRef((_a, ref) => {
|
|
1896
1921
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1897
1922
|
return /* @__PURE__ */ jsxRuntime.jsx(RadixDialog__namespace.Overlay, __spreadProps(__spreadValues({ ref, asChild: true }, props), { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1898
1923
|
react.m.div,
|
|
@@ -1903,7 +1928,7 @@ var DrawerOverlay = React6__namespace.forwardRef((_a, ref) => {
|
|
|
1903
1928
|
) }));
|
|
1904
1929
|
});
|
|
1905
1930
|
DrawerOverlay.displayName = "DrawerOverlay";
|
|
1906
|
-
var DrawerContent =
|
|
1931
|
+
var DrawerContent = React9__namespace.forwardRef(
|
|
1907
1932
|
(_a, ref) => {
|
|
1908
1933
|
var _b = _a, {
|
|
1909
1934
|
className,
|
|
@@ -1982,7 +2007,7 @@ var DrawerFooter = (_a) => {
|
|
|
1982
2007
|
return /* @__PURE__ */ jsxRuntime.jsx("div", __spreadValues({ className: cn("flex flex-col gap-2 mt-4", className) }, props));
|
|
1983
2008
|
};
|
|
1984
2009
|
DrawerFooter.displayName = "DrawerFooter";
|
|
1985
|
-
var DrawerTitle =
|
|
2010
|
+
var DrawerTitle = React9__namespace.forwardRef((_a, ref) => {
|
|
1986
2011
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
1987
2012
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1988
2013
|
RadixDialog__namespace.Title,
|
|
@@ -1996,7 +2021,7 @@ var DrawerTitle = React6__namespace.forwardRef((_a, ref) => {
|
|
|
1996
2021
|
);
|
|
1997
2022
|
});
|
|
1998
2023
|
DrawerTitle.displayName = "DrawerTitle";
|
|
1999
|
-
var DrawerDescription =
|
|
2024
|
+
var DrawerDescription = React9__namespace.forwardRef((_a, ref) => {
|
|
2000
2025
|
var _b = _a, { className } = _b, props = __objRest(_b, ["className"]);
|
|
2001
2026
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2002
2027
|
RadixDialog__namespace.Description,
|
|
@@ -2008,7 +2033,7 @@ var DrawerDescription = React6__namespace.forwardRef((_a, ref) => {
|
|
|
2008
2033
|
});
|
|
2009
2034
|
DrawerDescription.displayName = "DrawerDescription";
|
|
2010
2035
|
var INDICATOR = "h-1 w-8 rounded-full bg-m3-on-surface-variant/40";
|
|
2011
|
-
var DragHandle =
|
|
2036
|
+
var DragHandle = React9__namespace.forwardRef(
|
|
2012
2037
|
({ className, onCycle, "aria-label": ariaLabel }, ref) => {
|
|
2013
2038
|
const isInteractive = Boolean(onCycle);
|
|
2014
2039
|
if (isInteractive) {
|
|
@@ -2069,7 +2094,7 @@ function buildSideSheetAnim(edge) {
|
|
|
2069
2094
|
};
|
|
2070
2095
|
}
|
|
2071
2096
|
var DEFAULT_SHEET_BG = "bg-m3-surface-container-low";
|
|
2072
|
-
var useIsomorphicLayoutEffect = typeof window !== "undefined" ?
|
|
2097
|
+
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React9.useLayoutEffect : React9.useEffect;
|
|
2073
2098
|
var DISMISS_THRESHOLD = 0.4;
|
|
2074
2099
|
var DISMISS_VELOCITY_THRESHOLD = 600;
|
|
2075
2100
|
var DEFAULT_SAFE_AREA_OFFSET = 56;
|
|
@@ -2118,9 +2143,9 @@ function useBottomSheet({
|
|
|
2118
2143
|
isModal = false,
|
|
2119
2144
|
maxHeight
|
|
2120
2145
|
}) {
|
|
2121
|
-
const [scopeNode, setScopeNode] =
|
|
2122
|
-
const scopeNodeRef =
|
|
2123
|
-
const scope =
|
|
2146
|
+
const [scopeNode, setScopeNode] = React9.useState(null);
|
|
2147
|
+
const scopeNodeRef = React9.useRef(null);
|
|
2148
|
+
const scope = React9.useCallback((node) => {
|
|
2124
2149
|
scopeNodeRef.current = node;
|
|
2125
2150
|
setScopeNode(node);
|
|
2126
2151
|
}, []);
|
|
@@ -2134,13 +2159,13 @@ function useBottomSheet({
|
|
|
2134
2159
|
const y = react.useMotionValue(
|
|
2135
2160
|
typeof window !== "undefined" ? window.visualViewport ? window.visualViewport.height : window.innerHeight : 800
|
|
2136
2161
|
);
|
|
2137
|
-
const [dimensions, setDimensions] =
|
|
2162
|
+
const [dimensions, setDimensions] = React9.useState({
|
|
2138
2163
|
viewportHeight: typeof window !== "undefined" ? window.visualViewport ? window.visualViewport.height : window.innerHeight : 800,
|
|
2139
2164
|
naturalHeight: 0,
|
|
2140
2165
|
safeAreaOffset: DEFAULT_SAFE_AREA_OFFSET
|
|
2141
2166
|
});
|
|
2142
|
-
const hasMeasuredAfterOpen =
|
|
2143
|
-
const measureDimensions =
|
|
2167
|
+
const hasMeasuredAfterOpen = React9.useRef(false);
|
|
2168
|
+
const measureDimensions = React9.useCallback(() => {
|
|
2144
2169
|
const node = scopeNodeRef.current;
|
|
2145
2170
|
if (!node) return;
|
|
2146
2171
|
const viewportHeight2 = window.visualViewport ? window.visualViewport.height : window.innerHeight;
|
|
@@ -2200,7 +2225,7 @@ function useBottomSheet({
|
|
|
2200
2225
|
return () => vv.removeEventListener("resize", handleResize);
|
|
2201
2226
|
}, [isOpen, measureDimensions]);
|
|
2202
2227
|
const { viewportHeight, naturalHeight, safeAreaOffset } = dimensions;
|
|
2203
|
-
const parsedMaxHeight =
|
|
2228
|
+
const parsedMaxHeight = React9.useMemo(() => {
|
|
2204
2229
|
if (!maxHeight) return viewportHeight - safeAreaOffset;
|
|
2205
2230
|
if (maxHeight.endsWith("px")) return parseFloat(maxHeight);
|
|
2206
2231
|
if (maxHeight.endsWith("dvh") || maxHeight.endsWith("vh")) {
|
|
@@ -2211,13 +2236,13 @@ function useBottomSheet({
|
|
|
2211
2236
|
}
|
|
2212
2237
|
return parseFloat(maxHeight) || viewportHeight - safeAreaOffset;
|
|
2213
2238
|
}, [maxHeight, viewportHeight, safeAreaOffset]);
|
|
2214
|
-
const snaps =
|
|
2239
|
+
const snaps = React9.useMemo(() => {
|
|
2215
2240
|
if (snapPoints) return snapPoints;
|
|
2216
2241
|
if (isModal) return ["partiallyExpanded", "full"];
|
|
2217
2242
|
return ["fit"];
|
|
2218
2243
|
}, [snapPoints, isModal]);
|
|
2219
2244
|
const allowsViewportSnapExpansion = snapPoints !== void 0 || snaps.length > 1;
|
|
2220
|
-
const snapHeights =
|
|
2245
|
+
const snapHeights = React9.useMemo(
|
|
2221
2246
|
() => snaps.map(
|
|
2222
2247
|
(snap) => parseSnapPoint(
|
|
2223
2248
|
snap,
|
|
@@ -2237,15 +2262,15 @@ function useBottomSheet({
|
|
|
2237
2262
|
allowsViewportSnapExpansion
|
|
2238
2263
|
]
|
|
2239
2264
|
);
|
|
2240
|
-
const maxSheetHeight =
|
|
2265
|
+
const maxSheetHeight = React9.useMemo(
|
|
2241
2266
|
() => viewportHeight - safeAreaOffset,
|
|
2242
2267
|
[viewportHeight, safeAreaOffset]
|
|
2243
2268
|
);
|
|
2244
|
-
const snapYValues =
|
|
2269
|
+
const snapYValues = React9.useMemo(
|
|
2245
2270
|
() => snapHeights.map((h) => Math.max(0, maxSheetHeight - h)),
|
|
2246
2271
|
[snapHeights, maxSheetHeight]
|
|
2247
2272
|
);
|
|
2248
|
-
const sortedSnaps =
|
|
2273
|
+
const sortedSnaps = React9.useMemo(() => {
|
|
2249
2274
|
const combined = snaps.map((point, idx) => ({
|
|
2250
2275
|
point,
|
|
2251
2276
|
height: snapHeights[idx],
|
|
@@ -2253,31 +2278,31 @@ function useBottomSheet({
|
|
|
2253
2278
|
}));
|
|
2254
2279
|
return combined.sort((a, b) => b.y - a.y);
|
|
2255
2280
|
}, [snaps, snapHeights, snapYValues]);
|
|
2256
|
-
const [activeSnapIndex, setActiveSnapIndex] =
|
|
2257
|
-
const activeSnapPoint =
|
|
2281
|
+
const [activeSnapIndex, setActiveSnapIndex] = React9.useState(0);
|
|
2282
|
+
const activeSnapPoint = React9.useMemo(
|
|
2258
2283
|
() => {
|
|
2259
2284
|
var _a, _b;
|
|
2260
2285
|
return (_b = (_a = sortedSnaps[activeSnapIndex]) == null ? void 0 : _a.point) != null ? _b : "fit";
|
|
2261
2286
|
},
|
|
2262
2287
|
[sortedSnaps, activeSnapIndex]
|
|
2263
2288
|
);
|
|
2264
|
-
const isContentScrollable =
|
|
2289
|
+
const isContentScrollable = React9.useMemo(
|
|
2265
2290
|
() => sortedSnaps.length <= 1 || activeSnapIndex === sortedSnaps.length - 1,
|
|
2266
2291
|
[sortedSnaps, activeSnapIndex]
|
|
2267
2292
|
);
|
|
2268
|
-
const lowestSnapY =
|
|
2293
|
+
const lowestSnapY = React9.useMemo(() => {
|
|
2269
2294
|
var _a, _b;
|
|
2270
2295
|
return (_b = (_a = sortedSnaps[0]) == null ? void 0 : _a.y) != null ? _b : 300;
|
|
2271
2296
|
}, [sortedSnaps]);
|
|
2272
2297
|
const scrimOpacity = react.useTransform(y, [lowestSnapY, maxSheetHeight], [1, 0]);
|
|
2273
|
-
const defaultSnap =
|
|
2298
|
+
const defaultSnap = React9.useMemo(
|
|
2274
2299
|
() => {
|
|
2275
2300
|
var _a;
|
|
2276
2301
|
return (_a = defaultSnapPoint != null ? defaultSnapPoint : snaps[0]) != null ? _a : "fit";
|
|
2277
2302
|
},
|
|
2278
2303
|
[defaultSnapPoint, snaps]
|
|
2279
2304
|
);
|
|
2280
|
-
const prevIsOpen =
|
|
2305
|
+
const prevIsOpen = React9.useRef(isOpen);
|
|
2281
2306
|
useIsomorphicLayoutEffect(() => {
|
|
2282
2307
|
if (isOpen && !prevIsOpen.current) {
|
|
2283
2308
|
y.set(viewportHeight);
|
|
@@ -2294,7 +2319,7 @@ function useBottomSheet({
|
|
|
2294
2319
|
}
|
|
2295
2320
|
prevIsOpen.current = isOpen;
|
|
2296
2321
|
}, [isOpen, y, viewportHeight, sortedSnaps, defaultSnap]);
|
|
2297
|
-
|
|
2322
|
+
React9.useEffect(() => {
|
|
2298
2323
|
var _a;
|
|
2299
2324
|
if (!isOpen || sortedSnaps.length === 0 || naturalHeight === 0) return;
|
|
2300
2325
|
if (!hasMeasuredAfterOpen.current) return;
|
|
@@ -2302,7 +2327,7 @@ function useBottomSheet({
|
|
|
2302
2327
|
if (targetY === void 0) return;
|
|
2303
2328
|
void react.animate(y, targetY, { type: "spring", stiffness: 300, damping: 30 });
|
|
2304
2329
|
}, [isOpen, sortedSnaps, activeSnapIndex, y, naturalHeight]);
|
|
2305
|
-
const snapTo =
|
|
2330
|
+
const snapTo = React9.useCallback(
|
|
2306
2331
|
(snapPoint) => {
|
|
2307
2332
|
const idx = sortedSnaps.findIndex((s) => s.point === snapPoint);
|
|
2308
2333
|
if (idx === -1) return;
|
|
@@ -2316,7 +2341,7 @@ function useBottomSheet({
|
|
|
2316
2341
|
},
|
|
2317
2342
|
[sortedSnaps, y, onSnapChange]
|
|
2318
2343
|
);
|
|
2319
|
-
const cycleSnapPoint =
|
|
2344
|
+
const cycleSnapPoint = React9.useCallback(() => {
|
|
2320
2345
|
const nextIdx = activeSnapIndex + 1;
|
|
2321
2346
|
if (nextIdx >= sortedSnaps.length) {
|
|
2322
2347
|
onClose();
|
|
@@ -2330,7 +2355,7 @@ function useBottomSheet({
|
|
|
2330
2355
|
onSnapChange == null ? void 0 : onSnapChange(sortedSnaps[nextIdx].point);
|
|
2331
2356
|
}
|
|
2332
2357
|
}, [activeSnapIndex, sortedSnaps, y, onClose, onSnapChange]);
|
|
2333
|
-
const dragConstraints =
|
|
2358
|
+
const dragConstraints = React9.useMemo(
|
|
2334
2359
|
() => {
|
|
2335
2360
|
var _a, _b;
|
|
2336
2361
|
return {
|
|
@@ -2340,7 +2365,7 @@ function useBottomSheet({
|
|
|
2340
2365
|
},
|
|
2341
2366
|
[sortedSnaps, viewportHeight]
|
|
2342
2367
|
);
|
|
2343
|
-
|
|
2368
|
+
React9.useEffect(() => {
|
|
2344
2369
|
if (!isOpen || !gesturesEnabled || !scopeNode) return;
|
|
2345
2370
|
const node = scopeNode;
|
|
2346
2371
|
const viewport = node.querySelector(
|
|
@@ -2561,7 +2586,7 @@ function resolveMaxHeight(maxHeight, snapPoints) {
|
|
|
2561
2586
|
return ABSOLUTE_MAX_HEIGHT;
|
|
2562
2587
|
return maxHeight;
|
|
2563
2588
|
}
|
|
2564
|
-
var BottomSheet =
|
|
2589
|
+
var BottomSheet = React9__namespace.forwardRef(
|
|
2565
2590
|
({
|
|
2566
2591
|
isOpen,
|
|
2567
2592
|
onClose,
|
|
@@ -2594,27 +2619,27 @@ var BottomSheet = React6__namespace.forwardRef(
|
|
|
2594
2619
|
isModal: false,
|
|
2595
2620
|
maxHeight: resolveMaxHeight(maxHeight, snapPoints)
|
|
2596
2621
|
});
|
|
2597
|
-
|
|
2622
|
+
React9__namespace.useEffect(() => {
|
|
2598
2623
|
const node = scope.current;
|
|
2599
2624
|
if (node) {
|
|
2600
2625
|
node.snapTo = snapTo;
|
|
2601
2626
|
}
|
|
2602
2627
|
}, [snapTo, scope]);
|
|
2603
|
-
const [mounted, setMounted] =
|
|
2604
|
-
|
|
2628
|
+
const [mounted, setMounted] = React9__namespace.useState(false);
|
|
2629
|
+
React9__namespace.useEffect(() => {
|
|
2605
2630
|
setMounted(true);
|
|
2606
2631
|
}, []);
|
|
2607
|
-
const resolvedDividers =
|
|
2632
|
+
const resolvedDividers = React9__namespace.useMemo(
|
|
2608
2633
|
() => resolveDividers(divider),
|
|
2609
2634
|
[divider]
|
|
2610
2635
|
);
|
|
2611
|
-
const resolvedSheetMaxWidth =
|
|
2636
|
+
const resolvedSheetMaxWidth = React9__namespace.useMemo(() => {
|
|
2612
2637
|
if (sheetMaxWidth === void 0)
|
|
2613
2638
|
return "var(--m3-bottom-sheet-max-width, 640px)";
|
|
2614
2639
|
if (typeof sheetMaxWidth === "number") return `${sheetMaxWidth}px`;
|
|
2615
2640
|
return sheetMaxWidth;
|
|
2616
2641
|
}, [sheetMaxWidth]);
|
|
2617
|
-
const mergedRef =
|
|
2642
|
+
const mergedRef = React9__namespace.useCallback(
|
|
2618
2643
|
(node) => {
|
|
2619
2644
|
scope(node);
|
|
2620
2645
|
if (typeof ref === "function") ref(node);
|
|
@@ -2698,7 +2723,7 @@ var SCRIM_ANIM = {
|
|
|
2698
2723
|
},
|
|
2699
2724
|
exit: { opacity: 0, transition: { duration: 0.18, ease: "easeIn" } }
|
|
2700
2725
|
};
|
|
2701
|
-
var Scrim =
|
|
2726
|
+
var Scrim = React9__namespace.forwardRef(
|
|
2702
2727
|
({ onClick, className, style }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2703
2728
|
react.m.div,
|
|
2704
2729
|
__spreadValues({
|
|
@@ -2730,7 +2755,7 @@ function resolveSheetMaxWidth(value) {
|
|
|
2730
2755
|
if (typeof value === "number") return `${value}px`;
|
|
2731
2756
|
return value;
|
|
2732
2757
|
}
|
|
2733
|
-
var BottomSheetModal =
|
|
2758
|
+
var BottomSheetModal = React9__namespace.forwardRef(
|
|
2734
2759
|
({
|
|
2735
2760
|
isOpen,
|
|
2736
2761
|
onClose,
|
|
@@ -2769,21 +2794,21 @@ var BottomSheetModal = React6__namespace.forwardRef(
|
|
|
2769
2794
|
isModal: true,
|
|
2770
2795
|
maxHeight: resolveMaxHeight2(maxHeight, snapPoints)
|
|
2771
2796
|
});
|
|
2772
|
-
|
|
2797
|
+
React9__namespace.useEffect(() => {
|
|
2773
2798
|
const node = scope.current;
|
|
2774
2799
|
if (node) {
|
|
2775
2800
|
node.snapTo = snapTo;
|
|
2776
2801
|
}
|
|
2777
2802
|
}, [snapTo, scope]);
|
|
2778
|
-
const resolvedDividers =
|
|
2803
|
+
const resolvedDividers = React9__namespace.useMemo(
|
|
2779
2804
|
() => resolveDividers(divider),
|
|
2780
2805
|
[divider]
|
|
2781
2806
|
);
|
|
2782
|
-
const resolvedSheetMaxWidth =
|
|
2807
|
+
const resolvedSheetMaxWidth = React9__namespace.useMemo(
|
|
2783
2808
|
() => resolveSheetMaxWidth(sheetMaxWidth),
|
|
2784
2809
|
[sheetMaxWidth]
|
|
2785
2810
|
);
|
|
2786
|
-
const mergedRef =
|
|
2811
|
+
const mergedRef = React9__namespace.useCallback(
|
|
2787
2812
|
(node) => {
|
|
2788
2813
|
scope(node);
|
|
2789
2814
|
if (typeof ref === "function") ref(node);
|
|
@@ -2882,17 +2907,17 @@ function useBottomSheetScaffold({
|
|
|
2882
2907
|
onStateChange,
|
|
2883
2908
|
initialState = "partiallyExpanded"
|
|
2884
2909
|
} = {}) {
|
|
2885
|
-
const [containerHeight, setContainerHeight] =
|
|
2910
|
+
const [containerHeight, setContainerHeight] = React9.useState(
|
|
2886
2911
|
typeof window !== "undefined" ? window.innerHeight : 800
|
|
2887
2912
|
);
|
|
2888
|
-
const containerNodeRef =
|
|
2889
|
-
const containerRef =
|
|
2913
|
+
const containerNodeRef = React9.useRef(null);
|
|
2914
|
+
const containerRef = React9.useCallback((node) => {
|
|
2890
2915
|
containerNodeRef.current = node;
|
|
2891
2916
|
if (node) {
|
|
2892
2917
|
setContainerHeight(node.offsetHeight || window.innerHeight);
|
|
2893
2918
|
}
|
|
2894
2919
|
}, []);
|
|
2895
|
-
|
|
2920
|
+
React9.useEffect(() => {
|
|
2896
2921
|
const node = containerNodeRef.current;
|
|
2897
2922
|
if (!node) return;
|
|
2898
2923
|
const observer = new ResizeObserver(() => {
|
|
@@ -2904,34 +2929,34 @@ function useBottomSheetScaffold({
|
|
|
2904
2929
|
const expandedY = 0;
|
|
2905
2930
|
const partialY = containerHeight - peekHeight;
|
|
2906
2931
|
const y = react.useMotionValue(initialState === "expanded" ? expandedY : partialY);
|
|
2907
|
-
const [sheetState, setSheetState] =
|
|
2932
|
+
const [sheetState, setSheetState] = React9.useState(
|
|
2908
2933
|
initialState
|
|
2909
2934
|
);
|
|
2910
|
-
const [isScrollDisablingDrag, setIsScrollDisablingDrag] =
|
|
2935
|
+
const [isScrollDisablingDrag, setIsScrollDisablingDrag] = React9.useState(false);
|
|
2911
2936
|
const isDragEnabled = swipeEnabled && !isScrollDisablingDrag;
|
|
2912
|
-
const dragConstraints =
|
|
2937
|
+
const dragConstraints = React9.useMemo(
|
|
2913
2938
|
() => ({ top: 0, bottom: partialY }),
|
|
2914
2939
|
[partialY]
|
|
2915
2940
|
);
|
|
2916
|
-
|
|
2941
|
+
React9.useEffect(() => {
|
|
2917
2942
|
const targetY = sheetState === "expanded" ? 0 : partialY;
|
|
2918
2943
|
void react.animate(y, targetY, SPRING);
|
|
2919
2944
|
}, [partialY, sheetState, y]);
|
|
2920
|
-
const expand =
|
|
2945
|
+
const expand = React9.useCallback(() => {
|
|
2921
2946
|
setSheetState("expanded");
|
|
2922
2947
|
void react.animate(y, 0, SPRING);
|
|
2923
2948
|
onStateChange == null ? void 0 : onStateChange("expanded");
|
|
2924
2949
|
}, [y, onStateChange]);
|
|
2925
|
-
const partialExpand =
|
|
2950
|
+
const partialExpand = React9.useCallback(() => {
|
|
2926
2951
|
setSheetState("partiallyExpanded");
|
|
2927
2952
|
void react.animate(y, partialY, SPRING);
|
|
2928
2953
|
onStateChange == null ? void 0 : onStateChange("partiallyExpanded");
|
|
2929
2954
|
}, [y, partialY, onStateChange]);
|
|
2930
|
-
const toggle =
|
|
2955
|
+
const toggle = React9.useCallback(() => {
|
|
2931
2956
|
if (sheetState === "expanded") partialExpand();
|
|
2932
2957
|
else expand();
|
|
2933
2958
|
}, [sheetState, expand, partialExpand]);
|
|
2934
|
-
const handleDragEnd =
|
|
2959
|
+
const handleDragEnd = React9.useCallback(
|
|
2935
2960
|
(_event, info) => {
|
|
2936
2961
|
const rawY = y.get();
|
|
2937
2962
|
let velocity = info.velocity.y;
|
|
@@ -2956,7 +2981,7 @@ function useBottomSheetScaffold({
|
|
|
2956
2981
|
},
|
|
2957
2982
|
[y, partialY, expand, partialExpand]
|
|
2958
2983
|
);
|
|
2959
|
-
const handleContentScroll =
|
|
2984
|
+
const handleContentScroll = React9.useCallback(
|
|
2960
2985
|
(e) => {
|
|
2961
2986
|
if (sheetState !== "expanded") {
|
|
2962
2987
|
e.currentTarget.scrollTop = 0;
|
|
@@ -2982,7 +3007,7 @@ function useBottomSheetScaffold({
|
|
|
2982
3007
|
containerRef
|
|
2983
3008
|
};
|
|
2984
3009
|
}
|
|
2985
|
-
var BottomSheetScaffold =
|
|
3010
|
+
var BottomSheetScaffold = React9__namespace.forwardRef(
|
|
2986
3011
|
({
|
|
2987
3012
|
sheetContent,
|
|
2988
3013
|
children,
|
|
@@ -3011,13 +3036,13 @@ var BottomSheetScaffold = React6__namespace.forwardRef(
|
|
|
3011
3036
|
onStateChange: onSheetStateChange,
|
|
3012
3037
|
initialState: initialSheetState
|
|
3013
3038
|
});
|
|
3014
|
-
const resolvedSheetMaxWidth =
|
|
3039
|
+
const resolvedSheetMaxWidth = React9__namespace.useMemo(() => {
|
|
3015
3040
|
if (sheetMaxWidth === void 0)
|
|
3016
3041
|
return "var(--m3-bottom-sheet-max-width, 640px)";
|
|
3017
3042
|
if (typeof sheetMaxWidth === "number") return `${sheetMaxWidth}px`;
|
|
3018
3043
|
return sheetMaxWidth;
|
|
3019
3044
|
}, [sheetMaxWidth]);
|
|
3020
|
-
const mergedRef =
|
|
3045
|
+
const mergedRef = React9__namespace.useCallback(
|
|
3021
3046
|
(node) => {
|
|
3022
3047
|
containerRef(node);
|
|
3023
3048
|
if (typeof ref === "function") ref(node);
|
|
@@ -3025,7 +3050,7 @@ var BottomSheetScaffold = React6__namespace.forwardRef(
|
|
|
3025
3050
|
},
|
|
3026
3051
|
[containerRef, ref]
|
|
3027
3052
|
);
|
|
3028
|
-
const resolvedDragHandle =
|
|
3053
|
+
const resolvedDragHandle = React9__namespace.useMemo(() => {
|
|
3029
3054
|
if (sheetDragHandle === null) return null;
|
|
3030
3055
|
if (sheetDragHandle !== void 0) return sheetDragHandle;
|
|
3031
3056
|
return /* @__PURE__ */ jsxRuntime.jsx(DragHandle, { onCycle: toggle });
|
|
@@ -3088,7 +3113,7 @@ var BottomSheetScaffold = React6__namespace.forwardRef(
|
|
|
3088
3113
|
);
|
|
3089
3114
|
BottomSheetScaffold.displayName = "BottomSheetScaffold";
|
|
3090
3115
|
var COPLANAR_TRANSITION = `margin ${getMotionTransitionCSS("default", "spatial")}`;
|
|
3091
|
-
var SideSheet =
|
|
3116
|
+
var SideSheet = React9__namespace.forwardRef(
|
|
3092
3117
|
({
|
|
3093
3118
|
isOpen,
|
|
3094
3119
|
children,
|
|
@@ -3104,16 +3129,16 @@ var SideSheet = React6__namespace.forwardRef(
|
|
|
3104
3129
|
divider,
|
|
3105
3130
|
scrollAreaProps
|
|
3106
3131
|
}, ref) => {
|
|
3107
|
-
const sheetAnim =
|
|
3108
|
-
const [mounted, setMounted] =
|
|
3109
|
-
|
|
3132
|
+
const sheetAnim = React9__namespace.useMemo(() => buildSideSheetAnim(edge), [edge]);
|
|
3133
|
+
const [mounted, setMounted] = React9__namespace.useState(false);
|
|
3134
|
+
React9__namespace.useEffect(() => {
|
|
3110
3135
|
setMounted(true);
|
|
3111
3136
|
}, []);
|
|
3112
|
-
const resolvedDividers =
|
|
3137
|
+
const resolvedDividers = React9__namespace.useMemo(
|
|
3113
3138
|
() => resolveDividers(divider),
|
|
3114
3139
|
[divider]
|
|
3115
3140
|
);
|
|
3116
|
-
|
|
3141
|
+
React9__namespace.useEffect(() => {
|
|
3117
3142
|
const sibling = coplanarSiblingRef == null ? void 0 : coplanarSiblingRef.current;
|
|
3118
3143
|
if (!sibling) return;
|
|
3119
3144
|
sibling.style.transition = COPLANAR_TRANSITION;
|
|
@@ -3177,7 +3202,7 @@ var SideSheet = React6__namespace.forwardRef(
|
|
|
3177
3202
|
}
|
|
3178
3203
|
);
|
|
3179
3204
|
SideSheet.displayName = "SideSheet";
|
|
3180
|
-
var SideSheetModal =
|
|
3205
|
+
var SideSheetModal = React9__namespace.forwardRef(
|
|
3181
3206
|
({
|
|
3182
3207
|
isOpen,
|
|
3183
3208
|
onClose,
|
|
@@ -3192,8 +3217,8 @@ var SideSheetModal = React6__namespace.forwardRef(
|
|
|
3192
3217
|
divider,
|
|
3193
3218
|
scrollAreaProps
|
|
3194
3219
|
}, ref) => {
|
|
3195
|
-
const sheetAnim =
|
|
3196
|
-
const resolvedDividers =
|
|
3220
|
+
const sheetAnim = React9__namespace.useMemo(() => buildSideSheetAnim(edge), [edge]);
|
|
3221
|
+
const resolvedDividers = React9__namespace.useMemo(
|
|
3197
3222
|
() => resolveDividers(divider),
|
|
3198
3223
|
[divider]
|
|
3199
3224
|
);
|