@deque/cauldron-react 4.4.0-canary.f8ca4e9b → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/index.js +11 -0
  2. package/package.json +2 -2
package/lib/index.js CHANGED
@@ -8019,6 +8019,17 @@ function useSharedRef(ref) {
8019
8019
  var LoaderOverlay = React.forwardRef(function (_a, ref) {
8020
8020
  var className = _a.className, variant = _a.variant, label = _a.label, children = _a.children, focusOnInitialRender = _a.focusOnInitialRender, _b = _a.focusTrap, focusTrap = _b === void 0 ? false : _b, other = tslib.__rest(_a, ["className", "variant", "label", "children", "focusOnInitialRender", "focusTrap"]);
8021
8021
  var overlayRef = useSharedRef(ref);
8022
+ React.useEffect(function () {
8023
+ var isolator = overlayRef.current
8024
+ ? new AriaIsolate(overlayRef.current)
8025
+ : null;
8026
+ if (isolator) {
8027
+ focusTrap ? isolator.activate() : isolator.deactivate();
8028
+ }
8029
+ return function () {
8030
+ isolator === null || isolator === void 0 ? void 0 : isolator.deactivate();
8031
+ };
8032
+ }, [focusTrap, overlayRef.current]);
8022
8033
  React.useEffect(function () {
8023
8034
  if (!!focusOnInitialRender && overlayRef.current) {
8024
8035
  setTimeout(function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deque/cauldron-react",
3
- "version": "4.4.0-canary.f8ca4e9b",
3
+ "version": "4.5.0",
4
4
  "description": "Fully accessible react components library for Deque Cauldron",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -124,4 +124,4 @@
124
124
  "\\.svg$": "<rootDir>/__tests__/svgMock.js"
125
125
  }
126
126
  }
127
- }
127
+ }