@plasmicpkgs/react-aria 0.0.93 → 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.
@@ -938,7 +938,8 @@ function registerCheckbox(loader, overrides) {
938
938
  uncontrolledProp: "defaultSelected",
939
939
  description: "Whether the checkbox should be selected by default",
940
940
  defaultValueHint: false,
941
- defaultValue: false
941
+ defaultValue: false,
942
+ hidden: hasParent
942
943
  },
943
944
  isIndeterminate: {
944
945
  displayName: "Indeterminate",
@@ -2149,6 +2150,8 @@ function BasePopover(props) {
2149
2150
  const triggerRef = React.useRef(null);
2150
2151
  const canvasContext = usePlasmicCanvasContext();
2151
2152
  const matchTriggerWidthProp = hasTrigger && matchTriggerWidth;
2153
+ const dialogTriggerContext = React.useContext(PlasmicDialogTriggerContext);
2154
+ const shouldTrapFocus = !canvasContext && !!dialogTriggerContext;
2152
2155
  const _b = mergeProps$1(
2153
2156
  {
2154
2157
  // isNonModal: Whether the popover is non-modal, i.e. elements outside the popover may be interacted with by assistive technologies.
@@ -2171,7 +2174,7 @@ function BasePopover(props) {
2171
2174
  canMatchTriggerWidth: hasTrigger
2172
2175
  });
2173
2176
  }, [hasTrigger, setControlContextData]);
2174
- const dialogInCanvas = /* @__PURE__ */ React.createElement("div", null, children);
2177
+ const withoutDialog = /* @__PURE__ */ React.createElement("div", null, children);
2175
2178
  const dialog = /* @__PURE__ */ React.createElement(Dialog, null, children);
2176
2179
  return /* @__PURE__ */ React.createElement(React.Fragment, null, isStandalone && /* @__PURE__ */ React.createElement("div", { ref: triggerRef }), /* @__PURE__ */ React.createElement(
2177
2180
  Popover,
@@ -2179,7 +2182,7 @@ function BasePopover(props) {
2179
2182
  style: __spreadValues$g(__spreadValues$g({}, matchTriggerWidthProp ? { width: `var(--trigger-width)` } : {}), COMMON_STYLES)
2180
2183
  }, mergedProps),
2181
2184
  ({ placement }) => withObservedValues$a(
2182
- canvasContext || isStandalone ? dialogInCanvas : dialog,
2185
+ shouldTrapFocus ? dialog : withoutDialog,
2183
2186
  {
2184
2187
  placementTop: placement === "top",
2185
2188
  placementBottom: placement === "bottom",