@plasmicpkgs/react-aria 0.0.60 → 0.0.62
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 +40 -26
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +39 -25
- package/dist/react-aria.js.map +1 -1
- package/dist/registerPopover.d.ts +1 -0
- package/package.json +2 -2
- package/skinny/{common-41a8c2ce.esm.js → common-0c4336fe.esm.js} +7 -3
- package/skinny/common-0c4336fe.esm.js.map +1 -0
- package/skinny/{common-3a916199.cjs.js → common-2e984ab4.cjs.js} +7 -3
- package/skinny/common-2e984ab4.cjs.js.map +1 -0
- package/skinny/registerButton.cjs.js +1 -1
- package/skinny/registerButton.esm.js +1 -1
- package/skinny/registerCheckbox.cjs.js +1 -1
- package/skinny/registerCheckbox.esm.js +1 -1
- package/skinny/registerCheckboxGroup.cjs.js +1 -1
- package/skinny/registerCheckboxGroup.esm.js +1 -1
- package/skinny/registerComboBox.cjs.js +14 -8
- package/skinny/registerComboBox.cjs.js.map +1 -1
- package/skinny/registerComboBox.esm.js +14 -8
- package/skinny/registerComboBox.esm.js.map +1 -1
- package/skinny/registerDialogTrigger.cjs.js +1 -1
- package/skinny/registerDialogTrigger.esm.js +1 -1
- package/skinny/registerInput.cjs.js +1 -1
- package/skinny/registerInput.esm.js +1 -1
- package/skinny/registerModal.cjs.js +1 -1
- package/skinny/registerModal.esm.js +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/registerRadio.cjs.js +1 -1
- package/skinny/registerRadio.esm.js +1 -1
- package/skinny/registerRadioGroup.cjs.js +1 -1
- package/skinny/registerRadioGroup.esm.js +1 -1
- package/skinny/registerSelect.cjs.js +14 -8
- package/skinny/registerSelect.cjs.js.map +1 -1
- package/skinny/registerSelect.esm.js +14 -8
- package/skinny/registerSelect.esm.js.map +1 -1
- package/skinny/registerSlider.cjs.js +1 -1
- package/skinny/registerSlider.esm.js +1 -1
- package/skinny/registerSliderThumb.cjs.js +1 -1
- package/skinny/registerSliderThumb.esm.js +1 -1
- package/skinny/registerSwitch.cjs.js +1 -1
- package/skinny/registerSwitch.esm.js +1 -1
- package/skinny/registerTextArea.cjs.js +1 -1
- package/skinny/registerTextArea.esm.js +1 -1
- package/skinny/registerTextField.cjs.js +1 -1
- package/skinny/registerTextField.esm.js +1 -1
- package/skinny/common-3a916199.cjs.js.map +0 -1
- package/skinny/common-41a8c2ce.esm.js.map +0 -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';
|
|
@@ -103,7 +103,9 @@ function createNameProp() {
|
|
|
103
103
|
type: "string",
|
|
104
104
|
description: "Name for this field if it is part of a form",
|
|
105
105
|
displayName: "Form field key",
|
|
106
|
-
hidden: hasParent,
|
|
106
|
+
// hidden: hasParent,
|
|
107
|
+
hidden: () => true,
|
|
108
|
+
// hiding required prop until the release of Aria Forms
|
|
107
109
|
advanced: true
|
|
108
110
|
};
|
|
109
111
|
}
|
|
@@ -133,7 +135,9 @@ function createRequiredProp(componentName) {
|
|
|
133
135
|
description: `Whether user input is required on the ${componentName} before form submission.`,
|
|
134
136
|
defaultValueHint: false,
|
|
135
137
|
advanced: true,
|
|
136
|
-
hidden: hasParent
|
|
138
|
+
// hidden: hasParent,
|
|
139
|
+
hidden: () => true
|
|
140
|
+
// hiding required prop until the release of Aria Forms
|
|
137
141
|
};
|
|
138
142
|
}
|
|
139
143
|
function createAutoFocusProp(componentName) {
|
|
@@ -2047,16 +2051,17 @@ var __objRest$e = (source, exclude) => {
|
|
|
2047
2051
|
return target;
|
|
2048
2052
|
};
|
|
2049
2053
|
function BasePopover(props) {
|
|
2054
|
+
var _b;
|
|
2050
2055
|
const _a = props, { resetClassName, setControlContextData } = _a, restProps = __objRest$e(_a, ["resetClassName", "setControlContextData"]);
|
|
2051
2056
|
const isStandalone = !React.useContext(PopoverContext);
|
|
2052
2057
|
const context = React.useContext(PlasmicPopoverContext);
|
|
2053
|
-
const isInsideSelect = !!React.useContext(SelectContext);
|
|
2054
2058
|
const triggerRef = React.useRef(null);
|
|
2055
2059
|
const isEditMode = !!usePlasmicCanvasContext();
|
|
2056
|
-
const defaultShouldFlip = isInsideSelect ? false : true;
|
|
2057
2060
|
const mergedProps = mergeProps$1(
|
|
2058
|
-
{
|
|
2059
|
-
|
|
2061
|
+
{
|
|
2062
|
+
isOpen: context == null ? void 0 : context.isOpen,
|
|
2063
|
+
shouldFlip: context == null ? void 0 : context.defaultShouldFlip
|
|
2064
|
+
},
|
|
2060
2065
|
/**
|
|
2061
2066
|
* isNonModal: Whether the popover is non-modal, i.e. elements outside the popover may be interacted with by assistive technologies. *
|
|
2062
2067
|
*
|
|
@@ -2073,7 +2078,7 @@ function BasePopover(props) {
|
|
|
2073
2078
|
} : null
|
|
2074
2079
|
);
|
|
2075
2080
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
2076
|
-
defaultShouldFlip
|
|
2081
|
+
defaultShouldFlip: (_b = context == null ? void 0 : context.defaultShouldFlip) != null ? _b : true
|
|
2077
2082
|
});
|
|
2078
2083
|
return /* @__PURE__ */ React.createElement(React.Fragment, null, isStandalone && /* @__PURE__ */ React.createElement("div", { ref: triggerRef }), /* @__PURE__ */ React.createElement(Popover, __spreadValues$f({}, mergedProps)));
|
|
2079
2084
|
}
|
|
@@ -2149,10 +2154,7 @@ function registerPopover(loader, overrides) {
|
|
|
2149
2154
|
shouldFlip: {
|
|
2150
2155
|
type: "boolean",
|
|
2151
2156
|
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
|
-
}
|
|
2157
|
+
defaultValueHint: (_props, ctx) => ctx == null ? void 0 : ctx.defaultShouldFlip
|
|
2156
2158
|
},
|
|
2157
2159
|
placement: {
|
|
2158
2160
|
type: "choice",
|
|
@@ -2220,15 +2222,21 @@ function BaseComboBox(props) {
|
|
|
2220
2222
|
});
|
|
2221
2223
|
});
|
|
2222
2224
|
}, []);
|
|
2223
|
-
return /* @__PURE__ */ React.createElement(ComboBox, __spreadValues$e({}, rest), /* @__PURE__ */ React.createElement(
|
|
2224
|
-
|
|
2225
|
+
return /* @__PURE__ */ React.createElement(ComboBox, __spreadValues$e({}, rest), /* @__PURE__ */ React.createElement(
|
|
2226
|
+
PlasmicPopoverContext.Provider,
|
|
2225
2227
|
{
|
|
2226
|
-
value: {
|
|
2227
|
-
idManager
|
|
2228
|
-
}
|
|
2228
|
+
value: { isOpen, defaultShouldFlip: false }
|
|
2229
2229
|
},
|
|
2230
|
-
/* @__PURE__ */ React.createElement(
|
|
2231
|
-
|
|
2230
|
+
/* @__PURE__ */ React.createElement(
|
|
2231
|
+
PlasmicListBoxContext.Provider,
|
|
2232
|
+
{
|
|
2233
|
+
value: {
|
|
2234
|
+
idManager
|
|
2235
|
+
}
|
|
2236
|
+
},
|
|
2237
|
+
/* @__PURE__ */ React.createElement(PlasmicInputContext.Provider, { value: { isUncontrolled: true } }, children)
|
|
2238
|
+
)
|
|
2239
|
+
));
|
|
2232
2240
|
}
|
|
2233
2241
|
function registerComboBox(loader) {
|
|
2234
2242
|
registerComponentHelper(loader, BaseComboBox, {
|
|
@@ -3094,15 +3102,21 @@ function BaseSelect(props) {
|
|
|
3094
3102
|
"aria-label": ariaLabel,
|
|
3095
3103
|
isOpen: openProp
|
|
3096
3104
|
}, extractPlasmicDataProps(props)),
|
|
3097
|
-
/* @__PURE__ */ React.createElement(
|
|
3098
|
-
|
|
3105
|
+
/* @__PURE__ */ React.createElement(
|
|
3106
|
+
PlasmicPopoverContext.Provider,
|
|
3099
3107
|
{
|
|
3100
|
-
value: {
|
|
3101
|
-
idManager
|
|
3102
|
-
}
|
|
3108
|
+
value: { isOpen: openProp, defaultShouldFlip: false }
|
|
3103
3109
|
},
|
|
3104
|
-
|
|
3105
|
-
|
|
3110
|
+
/* @__PURE__ */ React.createElement(
|
|
3111
|
+
PlasmicListBoxContext.Provider,
|
|
3112
|
+
{
|
|
3113
|
+
value: {
|
|
3114
|
+
idManager
|
|
3115
|
+
}
|
|
3116
|
+
},
|
|
3117
|
+
children
|
|
3118
|
+
)
|
|
3119
|
+
)
|
|
3106
3120
|
);
|
|
3107
3121
|
}
|
|
3108
3122
|
function registerSelect(loader) {
|