@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.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect, useState, useMemo, forwardRef, useImperativeHandle, Component } from 'react';
|
|
2
|
-
import { Button, Checkbox, Text, FieldError, Label, CheckboxGroup, Input, ListBoxItem, ListBox, Section, Header, PopoverContext,
|
|
2
|
+
import { Button, Checkbox, Text, FieldError, Label, CheckboxGroup, Input, ListBoxItem, ListBox, Section, Header, PopoverContext, Popover, ComboBox, Heading, ModalOverlay, Modal, Dialog, DialogTrigger, Radio, RadioGroup, Select, SelectValue, SliderOutput, SliderThumb, Slider, SliderTrack, Switch, TextArea, TextField } from 'react-aria-components';
|
|
3
3
|
import registerComponent from '@plasmicapp/host/registerComponent';
|
|
4
4
|
import { mergeProps, useTooltipTrigger } from 'react-aria';
|
|
5
5
|
import { mergeProps as mergeProps$1 } from '@react-aria/utils';
|
|
@@ -2047,16 +2047,17 @@ var __objRest$e = (source, exclude) => {
|
|
|
2047
2047
|
return target;
|
|
2048
2048
|
};
|
|
2049
2049
|
function BasePopover(props) {
|
|
2050
|
+
var _b;
|
|
2050
2051
|
const _a = props, { resetClassName, setControlContextData } = _a, restProps = __objRest$e(_a, ["resetClassName", "setControlContextData"]);
|
|
2051
2052
|
const isStandalone = !React.useContext(PopoverContext);
|
|
2052
2053
|
const context = React.useContext(PlasmicPopoverContext);
|
|
2053
|
-
const isInsideSelect = !!React.useContext(SelectContext);
|
|
2054
2054
|
const triggerRef = React.useRef(null);
|
|
2055
2055
|
const isEditMode = !!usePlasmicCanvasContext();
|
|
2056
|
-
const defaultShouldFlip = isInsideSelect ? false : true;
|
|
2057
2056
|
const mergedProps = mergeProps$1(
|
|
2058
|
-
{
|
|
2059
|
-
|
|
2057
|
+
{
|
|
2058
|
+
isOpen: context == null ? void 0 : context.isOpen,
|
|
2059
|
+
shouldFlip: context == null ? void 0 : context.defaultShouldFlip
|
|
2060
|
+
},
|
|
2060
2061
|
/**
|
|
2061
2062
|
* isNonModal: Whether the popover is non-modal, i.e. elements outside the popover may be interacted with by assistive technologies. *
|
|
2062
2063
|
*
|
|
@@ -2073,7 +2074,7 @@ function BasePopover(props) {
|
|
|
2073
2074
|
} : null
|
|
2074
2075
|
);
|
|
2075
2076
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
2076
|
-
defaultShouldFlip
|
|
2077
|
+
defaultShouldFlip: (_b = context == null ? void 0 : context.defaultShouldFlip) != null ? _b : true
|
|
2077
2078
|
});
|
|
2078
2079
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, isStandalone && /* @__PURE__ */ React.createElement("div", { ref: triggerRef }), /* @__PURE__ */ React.createElement(Popover, __spreadValues$f({}, mergedProps)));
|
|
2079
2080
|
}
|
|
@@ -2149,10 +2150,7 @@ function registerPopover(loader, overrides) {
|
|
|
2149
2150
|
shouldFlip: {
|
|
2150
2151
|
type: "boolean",
|
|
2151
2152
|
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.",
|
|
2152
|
-
defaultValueHint: (_props, ctx) =>
|
|
2153
|
-
var _a;
|
|
2154
|
-
return (_a = ctx == null ? void 0 : ctx.defaultShouldFlip) != null ? _a : true;
|
|
2155
|
-
}
|
|
2153
|
+
defaultValueHint: (_props, ctx) => ctx == null ? void 0 : ctx.defaultShouldFlip
|
|
2156
2154
|
},
|
|
2157
2155
|
placement: {
|
|
2158
2156
|
type: "choice",
|
|
@@ -2220,15 +2218,21 @@ function BaseComboBox(props) {
|
|
|
2220
2218
|
});
|
|
2221
2219
|
});
|
|
2222
2220
|
}, []);
|
|
2223
|
-
return /* @__PURE__ */ React.createElement(ComboBox, __spreadValues$e({}, rest), /* @__PURE__ */ React.createElement(
|
|
2224
|
-
|
|
2221
|
+
return /* @__PURE__ */ React.createElement(ComboBox, __spreadValues$e({}, rest), /* @__PURE__ */ React.createElement(
|
|
2222
|
+
PlasmicPopoverContext.Provider,
|
|
2225
2223
|
{
|
|
2226
|
-
value: {
|
|
2227
|
-
idManager
|
|
2228
|
-
}
|
|
2224
|
+
value: { isOpen, defaultShouldFlip: false }
|
|
2229
2225
|
},
|
|
2230
|
-
/* @__PURE__ */ React.createElement(
|
|
2231
|
-
|
|
2226
|
+
/* @__PURE__ */ React.createElement(
|
|
2227
|
+
PlasmicListBoxContext.Provider,
|
|
2228
|
+
{
|
|
2229
|
+
value: {
|
|
2230
|
+
idManager
|
|
2231
|
+
}
|
|
2232
|
+
},
|
|
2233
|
+
/* @__PURE__ */ React.createElement(PlasmicInputContext.Provider, { value: { isUncontrolled: true } }, children)
|
|
2234
|
+
)
|
|
2235
|
+
));
|
|
2232
2236
|
}
|
|
2233
2237
|
function registerComboBox(loader) {
|
|
2234
2238
|
registerComponentHelper(loader, BaseComboBox, {
|
|
@@ -3094,15 +3098,21 @@ function BaseSelect(props) {
|
|
|
3094
3098
|
"aria-label": ariaLabel,
|
|
3095
3099
|
isOpen: openProp
|
|
3096
3100
|
}, extractPlasmicDataProps(props)),
|
|
3097
|
-
/* @__PURE__ */ React.createElement(
|
|
3098
|
-
|
|
3101
|
+
/* @__PURE__ */ React.createElement(
|
|
3102
|
+
PlasmicPopoverContext.Provider,
|
|
3099
3103
|
{
|
|
3100
|
-
value: {
|
|
3101
|
-
idManager
|
|
3102
|
-
}
|
|
3104
|
+
value: { isOpen: openProp, defaultShouldFlip: false }
|
|
3103
3105
|
},
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
+
/* @__PURE__ */ React.createElement(
|
|
3107
|
+
PlasmicListBoxContext.Provider,
|
|
3108
|
+
{
|
|
3109
|
+
value: {
|
|
3110
|
+
idManager
|
|
3111
|
+
}
|
|
3112
|
+
},
|
|
3113
|
+
children
|
|
3114
|
+
)
|
|
3115
|
+
)
|
|
3106
3116
|
);
|
|
3107
3117
|
}
|
|
3108
3118
|
function registerSelect(loader) {
|