@plasmicpkgs/react-aria 0.0.73 → 0.0.74
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 -10
- package/dist/react-aria.esm.js.map +1 -1
- package/dist/react-aria.js +40 -10
- package/dist/react-aria.js.map +1 -1
- package/dist/registerComboBox.d.ts +5 -1
- package/dist/registerSelect.d.ts +5 -1
- package/package.json +2 -2
- package/skinny/registerComboBox.cjs.js +31 -10
- package/skinny/registerComboBox.cjs.js.map +1 -1
- package/skinny/registerComboBox.d.ts +5 -1
- package/skinny/registerComboBox.esm.js +31 -10
- package/skinny/registerComboBox.esm.js.map +1 -1
- package/skinny/registerSelect.cjs.js +11 -2
- package/skinny/registerSelect.cjs.js.map +1 -1
- package/skinny/registerSelect.d.ts +5 -1
- package/skinny/registerSelect.esm.js +11 -2
- package/skinny/registerSelect.esm.js.map +1 -1
package/dist/react-aria.esm.js
CHANGED
|
@@ -2272,6 +2272,8 @@ var __objRest$d = (source, exclude) => {
|
|
|
2272
2272
|
return target;
|
|
2273
2273
|
};
|
|
2274
2274
|
const COMBOBOX_NAME = makeComponentName("combobox");
|
|
2275
|
+
const COMBOBOX_VARIANTS = ["disabled"];
|
|
2276
|
+
const { variants: COMBOBOX_VARIANTS_DATA } = pickAriaComponentVariants(COMBOBOX_VARIANTS);
|
|
2275
2277
|
function ComboboxAutoOpen(props) {
|
|
2276
2278
|
var _a;
|
|
2277
2279
|
const { open, close } = (_a = React.useContext(ComboBoxStateContext)) != null ? _a : {};
|
|
@@ -2282,10 +2284,16 @@ function BaseComboBox(props) {
|
|
|
2282
2284
|
const _a = props, {
|
|
2283
2285
|
children,
|
|
2284
2286
|
setControlContextData,
|
|
2287
|
+
plasmicUpdateVariant,
|
|
2288
|
+
className,
|
|
2289
|
+
isDisabled,
|
|
2285
2290
|
isOpen: _isOpen
|
|
2286
2291
|
} = _a, rest = __objRest$d(_a, [
|
|
2287
2292
|
"children",
|
|
2288
2293
|
"setControlContextData",
|
|
2294
|
+
"plasmicUpdateVariant",
|
|
2295
|
+
"className",
|
|
2296
|
+
"isDisabled",
|
|
2289
2297
|
"isOpen"
|
|
2290
2298
|
]);
|
|
2291
2299
|
const idManager = useMemo(() => new ListBoxItemIdManager(), []);
|
|
@@ -2296,15 +2304,27 @@ function BaseComboBox(props) {
|
|
|
2296
2304
|
});
|
|
2297
2305
|
});
|
|
2298
2306
|
}, []);
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2307
|
+
useEffect(() => {
|
|
2308
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
2309
|
+
disabled: isDisabled
|
|
2310
|
+
});
|
|
2311
|
+
}, [isDisabled, plasmicUpdateVariant]);
|
|
2312
|
+
return /* @__PURE__ */ React.createElement(
|
|
2313
|
+
ComboBox,
|
|
2314
|
+
__spreadValues$e({
|
|
2315
|
+
isDisabled,
|
|
2316
|
+
className
|
|
2317
|
+
}, rest),
|
|
2318
|
+
/* @__PURE__ */ React.createElement(PlasmicPopoverContext.Provider, { value: {} }, /* @__PURE__ */ React.createElement(
|
|
2319
|
+
PlasmicListBoxContext.Provider,
|
|
2320
|
+
{
|
|
2321
|
+
value: {
|
|
2322
|
+
idManager
|
|
2323
|
+
}
|
|
2324
|
+
},
|
|
2325
|
+
/* @__PURE__ */ React.createElement(PlasmicInputContext.Provider, { value: { isUncontrolled: true } }, /* @__PURE__ */ React.createElement(ComboboxAutoOpen, __spreadValues$e({}, props)), children)
|
|
2326
|
+
))
|
|
2327
|
+
);
|
|
2308
2328
|
}
|
|
2309
2329
|
function registerComboBox(loader) {
|
|
2310
2330
|
registerComponentHelper(loader, BaseComboBox, {
|
|
@@ -2312,6 +2332,7 @@ function registerComboBox(loader) {
|
|
|
2312
2332
|
displayName: "Aria ComboBox",
|
|
2313
2333
|
importPath: "@plasmicpkgs/react-aria/skinny/registerComboBox",
|
|
2314
2334
|
importName: "BaseComboBox",
|
|
2335
|
+
variants: COMBOBOX_VARIANTS_DATA,
|
|
2315
2336
|
props: __spreadProps$9(__spreadValues$e({}, getCommonProps("ComboBox", [
|
|
2316
2337
|
"name",
|
|
2317
2338
|
"aria-label",
|
|
@@ -3158,6 +3179,8 @@ const BaseSelectValue = (props) => {
|
|
|
3158
3179
|
return /* @__PURE__ */ React.createElement(SelectValue, { className }, ({ isPlaceholder, selectedText }) => /* @__PURE__ */ React.createElement(React.Fragment, null, isPlaceholder ? placeholder : selectedText));
|
|
3159
3180
|
};
|
|
3160
3181
|
const SELECT_NAME = makeComponentName("select");
|
|
3182
|
+
const SELECT_VARIANTS = ["disabled"];
|
|
3183
|
+
const { variants: SELECT_VARIANTS_DATA } = pickAriaComponentVariants(SELECT_VARIANTS);
|
|
3161
3184
|
function BaseSelect(props) {
|
|
3162
3185
|
const {
|
|
3163
3186
|
selectedKey,
|
|
@@ -3171,9 +3194,10 @@ function BaseSelect(props) {
|
|
|
3171
3194
|
disabledKeys,
|
|
3172
3195
|
name,
|
|
3173
3196
|
setControlContextData,
|
|
3197
|
+
plasmicUpdateVariant,
|
|
3174
3198
|
"aria-label": ariaLabel
|
|
3175
3199
|
} = props;
|
|
3176
|
-
|
|
3200
|
+
const idManager = useMemo(() => new ListBoxItemIdManager(), []);
|
|
3177
3201
|
useEffect(() => {
|
|
3178
3202
|
idManager.subscribe((ids) => {
|
|
3179
3203
|
setControlContextData == null ? void 0 : setControlContextData({
|
|
@@ -3181,6 +3205,11 @@ function BaseSelect(props) {
|
|
|
3181
3205
|
});
|
|
3182
3206
|
});
|
|
3183
3207
|
}, []);
|
|
3208
|
+
useEffect(() => {
|
|
3209
|
+
plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
|
|
3210
|
+
disabled: isDisabled
|
|
3211
|
+
});
|
|
3212
|
+
}, [isDisabled, plasmicUpdateVariant]);
|
|
3184
3213
|
return /* @__PURE__ */ React.createElement(
|
|
3185
3214
|
Select,
|
|
3186
3215
|
__spreadValues$8({
|
|
@@ -3237,6 +3266,7 @@ function registerSelect(loader) {
|
|
|
3237
3266
|
displayName: "Aria Select",
|
|
3238
3267
|
importPath: "@plasmicpkgs/react-aria/skinny/registerSelect",
|
|
3239
3268
|
importName: "BaseSelect",
|
|
3269
|
+
variants: SELECT_VARIANTS_DATA,
|
|
3240
3270
|
props: __spreadProps$4(__spreadValues$8({}, getCommonProps("Select", [
|
|
3241
3271
|
"name",
|
|
3242
3272
|
"aria-label",
|