@plasmicpkgs/react-aria 0.0.60 → 0.0.61
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 +34 -24
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +33 -23
- package/dist/react-aria.js.map +1 -1
- package/dist/registerPopover.d.ts +1 -0
- package/package.json +2 -2
- package/skinny/registerComboBox.cjs.js +13 -7
- package/skinny/registerComboBox.cjs.js.map +1 -1
- package/skinny/registerComboBox.esm.js +13 -7
- package/skinny/registerComboBox.esm.js.map +1 -1
- package/skinny/registerPopover.cjs.js +7 -9
- package/skinny/registerPopover.cjs.js.map +1 -1
- package/skinny/registerPopover.d.ts +1 -0
- package/skinny/registerPopover.esm.js +8 -10
- package/skinny/registerPopover.esm.js.map +1 -1
- package/skinny/registerSelect.cjs.js +13 -7
- package/skinny/registerSelect.cjs.js.map +1 -1
- package/skinny/registerSelect.esm.js +13 -7
- package/skinny/registerSelect.esm.js.map +1 -1
package/dist/react-aria.js
CHANGED
|
@@ -2055,16 +2055,17 @@ var __objRest$e = (source, exclude) => {
|
|
|
2055
2055
|
return target;
|
|
2056
2056
|
};
|
|
2057
2057
|
function BasePopover(props) {
|
|
2058
|
+
var _b;
|
|
2058
2059
|
const _a = props, { resetClassName, setControlContextData } = _a, restProps = __objRest$e(_a, ["resetClassName", "setControlContextData"]);
|
|
2059
2060
|
const isStandalone = !React__default.default.useContext(reactAriaComponents.PopoverContext);
|
|
2060
2061
|
const context = React__default.default.useContext(PlasmicPopoverContext);
|
|
2061
|
-
const isInsideSelect = !!React__default.default.useContext(reactAriaComponents.SelectContext);
|
|
2062
2062
|
const triggerRef = React__default.default.useRef(null);
|
|
2063
2063
|
const isEditMode = !!host.usePlasmicCanvasContext();
|
|
2064
|
-
const defaultShouldFlip = isInsideSelect ? false : true;
|
|
2065
2064
|
const mergedProps = utils.mergeProps(
|
|
2066
|
-
{
|
|
2067
|
-
|
|
2065
|
+
{
|
|
2066
|
+
isOpen: context == null ? void 0 : context.isOpen,
|
|
2067
|
+
shouldFlip: context == null ? void 0 : context.defaultShouldFlip
|
|
2068
|
+
},
|
|
2068
2069
|
/**
|
|
2069
2070
|
* isNonModal: Whether the popover is non-modal, i.e. elements outside the popover may be interacted with by assistive technologies. *
|
|
2070
2071
|
*
|
|
@@ -2081,7 +2082,7 @@ function BasePopover(props) {
|
|
|
2081
2082
|
} : null
|
|
2082
2083
|
);
|
|
2083
2084
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
2084
|
-
defaultShouldFlip
|
|
2085
|
+
defaultShouldFlip: (_b = context == null ? void 0 : context.defaultShouldFlip) != null ? _b : true
|
|
2085
2086
|
});
|
|
2086
2087
|
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(reactAriaComponents.Popover, __spreadValues$f({}, mergedProps)));
|
|
2087
2088
|
}
|
|
@@ -2157,10 +2158,7 @@ function registerPopover(loader, overrides) {
|
|
|
2157
2158
|
shouldFlip: {
|
|
2158
2159
|
type: "boolean",
|
|
2159
2160
|
description: "Whether the element should flip its orientation (e.g. top to bottom or left to right) when there is insufficient room for it to render completely.",
|
|
2160
|
-
defaultValueHint: (_props, ctx) =>
|
|
2161
|
-
var _a;
|
|
2162
|
-
return (_a = ctx == null ? void 0 : ctx.defaultShouldFlip) != null ? _a : true;
|
|
2163
|
-
}
|
|
2161
|
+
defaultValueHint: (_props, ctx) => ctx == null ? void 0 : ctx.defaultShouldFlip
|
|
2164
2162
|
},
|
|
2165
2163
|
placement: {
|
|
2166
2164
|
type: "choice",
|
|
@@ -2228,15 +2226,21 @@ function BaseComboBox(props) {
|
|
|
2228
2226
|
});
|
|
2229
2227
|
});
|
|
2230
2228
|
}, []);
|
|
2231
|
-
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.ComboBox, __spreadValues$e({}, rest), /* @__PURE__ */ React__default.default.createElement(
|
|
2232
|
-
|
|
2229
|
+
return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.ComboBox, __spreadValues$e({}, rest), /* @__PURE__ */ React__default.default.createElement(
|
|
2230
|
+
PlasmicPopoverContext.Provider,
|
|
2233
2231
|
{
|
|
2234
|
-
value: {
|
|
2235
|
-
idManager
|
|
2236
|
-
}
|
|
2232
|
+
value: { isOpen, defaultShouldFlip: false }
|
|
2237
2233
|
},
|
|
2238
|
-
/* @__PURE__ */ React__default.default.createElement(
|
|
2239
|
-
|
|
2234
|
+
/* @__PURE__ */ React__default.default.createElement(
|
|
2235
|
+
PlasmicListBoxContext.Provider,
|
|
2236
|
+
{
|
|
2237
|
+
value: {
|
|
2238
|
+
idManager
|
|
2239
|
+
}
|
|
2240
|
+
},
|
|
2241
|
+
/* @__PURE__ */ React__default.default.createElement(PlasmicInputContext.Provider, { value: { isUncontrolled: true } }, children)
|
|
2242
|
+
)
|
|
2243
|
+
));
|
|
2240
2244
|
}
|
|
2241
2245
|
function registerComboBox(loader) {
|
|
2242
2246
|
registerComponentHelper(loader, BaseComboBox, {
|
|
@@ -3102,15 +3106,21 @@ function BaseSelect(props) {
|
|
|
3102
3106
|
"aria-label": ariaLabel,
|
|
3103
3107
|
isOpen: openProp
|
|
3104
3108
|
}, extractPlasmicDataProps(props)),
|
|
3105
|
-
/* @__PURE__ */ React__default.default.createElement(
|
|
3106
|
-
|
|
3109
|
+
/* @__PURE__ */ React__default.default.createElement(
|
|
3110
|
+
PlasmicPopoverContext.Provider,
|
|
3107
3111
|
{
|
|
3108
|
-
value: {
|
|
3109
|
-
idManager
|
|
3110
|
-
}
|
|
3112
|
+
value: { isOpen: openProp, defaultShouldFlip: false }
|
|
3111
3113
|
},
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
+
/* @__PURE__ */ React__default.default.createElement(
|
|
3115
|
+
PlasmicListBoxContext.Provider,
|
|
3116
|
+
{
|
|
3117
|
+
value: {
|
|
3118
|
+
idManager
|
|
3119
|
+
}
|
|
3120
|
+
},
|
|
3121
|
+
children
|
|
3122
|
+
)
|
|
3123
|
+
)
|
|
3114
3124
|
);
|
|
3115
3125
|
}
|
|
3116
3126
|
function registerSelect(loader) {
|