@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.
@@ -2280,6 +2280,8 @@ var __objRest$d = (source, exclude) => {
2280
2280
  return target;
2281
2281
  };
2282
2282
  const COMBOBOX_NAME = makeComponentName("combobox");
2283
+ const COMBOBOX_VARIANTS = ["disabled"];
2284
+ const { variants: COMBOBOX_VARIANTS_DATA } = pickAriaComponentVariants(COMBOBOX_VARIANTS);
2283
2285
  function ComboboxAutoOpen(props) {
2284
2286
  var _a;
2285
2287
  const { open, close } = (_a = React__default.default.useContext(reactAriaComponents.ComboBoxStateContext)) != null ? _a : {};
@@ -2290,10 +2292,16 @@ function BaseComboBox(props) {
2290
2292
  const _a = props, {
2291
2293
  children,
2292
2294
  setControlContextData,
2295
+ plasmicUpdateVariant,
2296
+ className,
2297
+ isDisabled,
2293
2298
  isOpen: _isOpen
2294
2299
  } = _a, rest = __objRest$d(_a, [
2295
2300
  "children",
2296
2301
  "setControlContextData",
2302
+ "plasmicUpdateVariant",
2303
+ "className",
2304
+ "isDisabled",
2297
2305
  "isOpen"
2298
2306
  ]);
2299
2307
  const idManager = React.useMemo(() => new ListBoxItemIdManager(), []);
@@ -2304,15 +2312,27 @@ function BaseComboBox(props) {
2304
2312
  });
2305
2313
  });
2306
2314
  }, []);
2307
- return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.ComboBox, __spreadValues$e({}, rest), /* @__PURE__ */ React__default.default.createElement(PlasmicPopoverContext.Provider, { value: {} }, /* @__PURE__ */ React__default.default.createElement(
2308
- PlasmicListBoxContext.Provider,
2309
- {
2310
- value: {
2311
- idManager
2312
- }
2313
- },
2314
- /* @__PURE__ */ React__default.default.createElement(PlasmicInputContext.Provider, { value: { isUncontrolled: true } }, /* @__PURE__ */ React__default.default.createElement(ComboboxAutoOpen, __spreadValues$e({}, props)), children)
2315
- )));
2315
+ React.useEffect(() => {
2316
+ plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
2317
+ disabled: isDisabled
2318
+ });
2319
+ }, [isDisabled, plasmicUpdateVariant]);
2320
+ return /* @__PURE__ */ React__default.default.createElement(
2321
+ reactAriaComponents.ComboBox,
2322
+ __spreadValues$e({
2323
+ isDisabled,
2324
+ className
2325
+ }, rest),
2326
+ /* @__PURE__ */ React__default.default.createElement(PlasmicPopoverContext.Provider, { value: {} }, /* @__PURE__ */ React__default.default.createElement(
2327
+ PlasmicListBoxContext.Provider,
2328
+ {
2329
+ value: {
2330
+ idManager
2331
+ }
2332
+ },
2333
+ /* @__PURE__ */ React__default.default.createElement(PlasmicInputContext.Provider, { value: { isUncontrolled: true } }, /* @__PURE__ */ React__default.default.createElement(ComboboxAutoOpen, __spreadValues$e({}, props)), children)
2334
+ ))
2335
+ );
2316
2336
  }
2317
2337
  function registerComboBox(loader) {
2318
2338
  registerComponentHelper(loader, BaseComboBox, {
@@ -2320,6 +2340,7 @@ function registerComboBox(loader) {
2320
2340
  displayName: "Aria ComboBox",
2321
2341
  importPath: "@plasmicpkgs/react-aria/skinny/registerComboBox",
2322
2342
  importName: "BaseComboBox",
2343
+ variants: COMBOBOX_VARIANTS_DATA,
2323
2344
  props: __spreadProps$9(__spreadValues$e({}, getCommonProps("ComboBox", [
2324
2345
  "name",
2325
2346
  "aria-label",
@@ -3166,6 +3187,8 @@ const BaseSelectValue = (props) => {
3166
3187
  return /* @__PURE__ */ React__default.default.createElement(reactAriaComponents.SelectValue, { className }, ({ isPlaceholder, selectedText }) => /* @__PURE__ */ React__default.default.createElement(React__default.default.Fragment, null, isPlaceholder ? placeholder : selectedText));
3167
3188
  };
3168
3189
  const SELECT_NAME = makeComponentName("select");
3190
+ const SELECT_VARIANTS = ["disabled"];
3191
+ const { variants: SELECT_VARIANTS_DATA } = pickAriaComponentVariants(SELECT_VARIANTS);
3169
3192
  function BaseSelect(props) {
3170
3193
  const {
3171
3194
  selectedKey,
@@ -3179,9 +3202,10 @@ function BaseSelect(props) {
3179
3202
  disabledKeys,
3180
3203
  name,
3181
3204
  setControlContextData,
3205
+ plasmicUpdateVariant,
3182
3206
  "aria-label": ariaLabel
3183
3207
  } = props;
3184
- let idManager = React.useMemo(() => new ListBoxItemIdManager(), []);
3208
+ const idManager = React.useMemo(() => new ListBoxItemIdManager(), []);
3185
3209
  React.useEffect(() => {
3186
3210
  idManager.subscribe((ids) => {
3187
3211
  setControlContextData == null ? void 0 : setControlContextData({
@@ -3189,6 +3213,11 @@ function BaseSelect(props) {
3189
3213
  });
3190
3214
  });
3191
3215
  }, []);
3216
+ React.useEffect(() => {
3217
+ plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
3218
+ disabled: isDisabled
3219
+ });
3220
+ }, [isDisabled, plasmicUpdateVariant]);
3192
3221
  return /* @__PURE__ */ React__default.default.createElement(
3193
3222
  reactAriaComponents.Select,
3194
3223
  __spreadValues$8({
@@ -3245,6 +3274,7 @@ function registerSelect(loader) {
3245
3274
  displayName: "Aria Select",
3246
3275
  importPath: "@plasmicpkgs/react-aria/skinny/registerSelect",
3247
3276
  importName: "BaseSelect",
3277
+ variants: SELECT_VARIANTS_DATA,
3248
3278
  props: __spreadProps$4(__spreadValues$8({}, getCommonProps("Select", [
3249
3279
  "name",
3250
3280
  "aria-label",