@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.js
CHANGED
|
@@ -1494,19 +1494,21 @@ function getInitials(name) {
|
|
|
1494
1494
|
const FocusBoundary = ({
|
|
1495
1495
|
children
|
|
1496
1496
|
}) => {
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1497
|
+
const wrapperReference = React.useRef(null);
|
|
1498
|
+
React.useEffect(() => {
|
|
1499
|
+
wrapperReference.current?.focus({
|
|
1500
|
+
preventScroll: true
|
|
1501
|
+
});
|
|
1502
|
+
}, []);
|
|
1503
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1504
|
+
ref: wrapperReference,
|
|
1505
|
+
tabIndex: -1,
|
|
1506
|
+
children: /*#__PURE__*/jsxRuntime.jsx(focus.FocusScope, {
|
|
1501
1507
|
contain: true,
|
|
1502
1508
|
restoreFocus: true,
|
|
1503
|
-
|
|
1504
|
-
children: /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1505
|
-
tabIndex: -1,
|
|
1506
|
-
children: children
|
|
1507
|
-
})
|
|
1509
|
+
children: children
|
|
1508
1510
|
})
|
|
1509
|
-
);
|
|
1511
|
+
});
|
|
1510
1512
|
};
|
|
1511
1513
|
var FocusBoundary$1 = FocusBoundary;
|
|
1512
1514
|
|