@plasmicpkgs/react-aria 0.0.94 → 0.0.95
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/dist/.tsbuildinfo +1 -1
- package/dist/react-aria.esm.js +4 -2
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +4 -2
- package/dist/react-aria.js.map +1 -1
- package/package.json +2 -2
- package/skinny/registerPopover.cjs.js +4 -2
- package/skinny/registerPopover.cjs.js.map +1 -1
- package/skinny/registerPopover.esm.js +5 -3
- package/skinny/registerPopover.esm.js.map +1 -1
package/dist/react-aria.js
CHANGED
|
@@ -2158,6 +2158,8 @@ function BasePopover(props) {
|
|
|
2158
2158
|
const triggerRef = React__default.default.useRef(null);
|
|
2159
2159
|
const canvasContext = host.usePlasmicCanvasContext();
|
|
2160
2160
|
const matchTriggerWidthProp = hasTrigger && matchTriggerWidth;
|
|
2161
|
+
const dialogTriggerContext = React__default.default.useContext(PlasmicDialogTriggerContext);
|
|
2162
|
+
const shouldTrapFocus = !canvasContext && !!dialogTriggerContext;
|
|
2161
2163
|
const _b = utils.mergeProps(
|
|
2162
2164
|
{
|
|
2163
2165
|
// isNonModal: Whether the popover is non-modal, i.e. elements outside the popover may be interacted with by assistive technologies.
|
|
@@ -2180,7 +2182,7 @@ function BasePopover(props) {
|
|
|
2180
2182
|
canMatchTriggerWidth: hasTrigger
|
|
2181
2183
|
});
|
|
2182
2184
|
}, [hasTrigger, setControlContextData]);
|
|
2183
|
-
const
|
|
2185
|
+
const withoutDialog = /* @__PURE__ */ React__default.default.createElement("div", null, children);
|
|
2184
2186
|
const dialog = /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.Dialog, null, children);
|
|
2185
2187
|
return /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, isStandalone && /* @__PURE__ */ React__default.default.createElement("div", { ref: triggerRef }), /* @__PURE__ */ React__default.default.createElement(
|
|
2186
2188
|
reactAriaComponents.Popover,
|
|
@@ -2188,7 +2190,7 @@ function BasePopover(props) {
|
|
|
2188
2190
|
style: __spreadValues$g(__spreadValues$g({}, matchTriggerWidthProp ? { width: `var(--trigger-width)` } : {}), COMMON_STYLES)
|
|
2189
2191
|
}, mergedProps),
|
|
2190
2192
|
({ placement }) => withObservedValues$a(
|
|
2191
|
-
|
|
2193
|
+
shouldTrapFocus ? dialog : withoutDialog,
|
|
2192
2194
|
{
|
|
2193
2195
|
placementTop: placement === "top",
|
|
2194
2196
|
placementBottom: placement === "bottom",
|