@transferwise/components 0.0.0-experimental-e9526a8 → 0.0.0-experimental-d05d921
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/build/index.esm.js +12 -10
- package/build/index.esm.js.map +1 -1
- package/build/index.js +12 -10
- package/build/index.js.map +1 -1
- package/build/types/common/focusBoundary/FocusBoundary.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/common/bottomSheet/__snapshots__/BottomSheet.spec.tsx.snap +8 -8
- package/src/common/focusBoundary/FocusBoundary.tsx +11 -4
package/build/index.esm.js
CHANGED
|
@@ -1461,19 +1461,21 @@ function getInitials(name) {
|
|
|
1461
1461
|
const FocusBoundary = ({
|
|
1462
1462
|
children
|
|
1463
1463
|
}) => {
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1464
|
+
const wrapperReference = useRef(null);
|
|
1465
|
+
useEffect(() => {
|
|
1466
|
+
wrapperReference.current?.focus({
|
|
1467
|
+
preventScroll: true
|
|
1468
|
+
});
|
|
1469
|
+
}, []);
|
|
1470
|
+
return /*#__PURE__*/jsx("div", {
|
|
1471
|
+
ref: wrapperReference,
|
|
1472
|
+
tabIndex: -1,
|
|
1473
|
+
children: /*#__PURE__*/jsx(FocusScope, {
|
|
1468
1474
|
contain: true,
|
|
1469
1475
|
restoreFocus: true,
|
|
1470
|
-
|
|
1471
|
-
children: /*#__PURE__*/jsx("div", {
|
|
1472
|
-
tabIndex: -1,
|
|
1473
|
-
children: children
|
|
1474
|
-
})
|
|
1476
|
+
children: children
|
|
1475
1477
|
})
|
|
1476
|
-
);
|
|
1478
|
+
});
|
|
1477
1479
|
};
|
|
1478
1480
|
var FocusBoundary$1 = FocusBoundary;
|
|
1479
1481
|
|