@plasmicpkgs/react-aria 0.0.84 → 0.0.86

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.
Files changed (46) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/react-aria.esm.js +122 -122
  3. package/dist/react-aria.esm.js.map +1 -1
  4. package/dist/react-aria.js +121 -121
  5. package/dist/react-aria.js.map +1 -1
  6. package/dist/registerInput.d.ts +3 -2
  7. package/dist/registerListBox.d.ts +5 -1
  8. package/dist/registerModal.d.ts +1 -0
  9. package/dist/registerSelect.d.ts +1 -1
  10. package/dist/registerTextArea.d.ts +3 -2
  11. package/package.json +2 -2
  12. package/skinny/registerComboBox.cjs.js +19 -24
  13. package/skinny/registerComboBox.cjs.js.map +1 -1
  14. package/skinny/registerComboBox.esm.js +20 -25
  15. package/skinny/registerComboBox.esm.js.map +1 -1
  16. package/skinny/registerInput.cjs.js +26 -43
  17. package/skinny/registerInput.cjs.js.map +1 -1
  18. package/skinny/registerInput.d.ts +3 -2
  19. package/skinny/registerInput.esm.js +27 -44
  20. package/skinny/registerInput.esm.js.map +1 -1
  21. package/skinny/{registerListBox-b47231d8.cjs.js → registerListBox-44088cfc.cjs.js} +23 -4
  22. package/skinny/registerListBox-44088cfc.cjs.js.map +1 -0
  23. package/skinny/{registerListBox-d5efc5da.esm.js → registerListBox-da15518f.esm.js} +24 -5
  24. package/skinny/registerListBox-da15518f.esm.js.map +1 -0
  25. package/skinny/registerListBox.cjs.js +2 -2
  26. package/skinny/registerListBox.d.ts +5 -1
  27. package/skinny/registerListBox.esm.js +2 -2
  28. package/skinny/registerModal.cjs.js +3 -6
  29. package/skinny/registerModal.cjs.js.map +1 -1
  30. package/skinny/registerModal.d.ts +1 -0
  31. package/skinny/registerModal.esm.js +3 -6
  32. package/skinny/registerModal.esm.js.map +1 -1
  33. package/skinny/registerSection.cjs.js +1 -1
  34. package/skinny/registerSection.esm.js +1 -1
  35. package/skinny/registerSelect.cjs.js +22 -8
  36. package/skinny/registerSelect.cjs.js.map +1 -1
  37. package/skinny/registerSelect.d.ts +1 -1
  38. package/skinny/registerSelect.esm.js +23 -9
  39. package/skinny/registerSelect.esm.js.map +1 -1
  40. package/skinny/registerTextArea.cjs.js +22 -29
  41. package/skinny/registerTextArea.cjs.js.map +1 -1
  42. package/skinny/registerTextArea.d.ts +3 -2
  43. package/skinny/registerTextArea.esm.js +23 -30
  44. package/skinny/registerTextArea.esm.js.map +1 -1
  45. package/skinny/registerListBox-b47231d8.cjs.js.map +0 -1
  46. package/skinny/registerListBox-d5efc5da.esm.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import React, { useEffect, useState, useMemo, forwardRef, useImperativeHandle, Component } from 'react';
1
+ import React, { useEffect, useCallback, useState, useMemo, forwardRef, useImperativeHandle, Component } from 'react';
2
2
  import { mergeProps, useFocusable } from 'react-aria';
3
3
  import { Button, Checkbox, Text, Label, CheckboxGroup, Input, ListBoxItem, ListBox, Section, Header, PopoverContext, Popover, ComboBox, ComboBoxStateContext, Heading, ModalOverlay, Modal, Dialog, DialogTrigger, Radio, RadioGroup, Select, SelectStateContext, SelectValue, SliderOutput, SliderThumb, Slider, SliderTrack, Switch, TextArea, TextField, TooltipTrigger, Tooltip } from 'react-aria-components';
4
4
  import { usePlasmicCanvasContext, usePlasmicCanvasComponentInfo } from '@plasmicapp/host';
@@ -554,7 +554,7 @@ const BUTTON_VARIANTS = [
554
554
  "focusVisible",
555
555
  "disabled"
556
556
  ];
557
- const { variants: variants$f, withObservedValues: withObservedValues$d } = pickAriaComponentVariants(BUTTON_VARIANTS);
557
+ const { variants: variants$g, withObservedValues: withObservedValues$d } = pickAriaComponentVariants(BUTTON_VARIANTS);
558
558
  const BaseButton = React.forwardRef(function BaseButtonInner(props, ref) {
559
559
  const _a = props, { submitsForm, resetsForm, children, plasmicUpdateVariant } = _a, rest = __objRest$m(_a, ["submitsForm", "resetsForm", "children", "plasmicUpdateVariant"]);
560
560
  const type = submitsForm ? "submit" : resetsForm ? "reset" : "button";
@@ -584,7 +584,7 @@ function registerButton(loader, overrides) {
584
584
  displayName: "Aria Button",
585
585
  importPath: "@plasmicpkgs/react-aria/skinny/registerButton",
586
586
  importName: "BaseButton",
587
- variants: variants$f,
587
+ variants: variants$g,
588
588
  defaultStyles: {
589
589
  borderWidth: "1px",
590
590
  borderStyle: "solid",
@@ -689,7 +689,7 @@ const CHECKBOX_VARIANTS = [
689
689
  "readonly",
690
690
  "selected"
691
691
  ];
692
- const { variants: variants$e, withObservedValues: withObservedValues$c } = pickAriaComponentVariants(CHECKBOX_VARIANTS);
692
+ const { variants: variants$f, withObservedValues: withObservedValues$c } = pickAriaComponentVariants(CHECKBOX_VARIANTS);
693
693
  function BaseCheckbox(props) {
694
694
  const _a = props, { children, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$l(_a, ["children", "plasmicUpdateVariant", "setControlContextData"]);
695
695
  const contextProps = React.useContext(PlasmicCheckboxGroupContext);
@@ -776,7 +776,7 @@ function registerCheckbox(loader, overrides) {
776
776
  displayName: "Aria Checkbox",
777
777
  importPath: "@plasmicpkgs/react-aria/skinny/registerCheckbox",
778
778
  importName: "BaseCheckbox",
779
- variants: variants$e,
779
+ variants: variants$f,
780
780
  props: __spreadProps$e(__spreadValues$o({}, getCommonProps("checkbox", [
781
781
  "name",
782
782
  "isDisabled",
@@ -1042,7 +1042,7 @@ var __objRest$i = (source, exclude) => {
1042
1042
  return target;
1043
1043
  };
1044
1044
  const CHECKBOX_GROUP_VARIANTS = ["disabled", "readonly"];
1045
- const { variants: variants$d, withObservedValues: withObservedValues$b } = pickAriaComponentVariants(
1045
+ const { variants: variants$e, withObservedValues: withObservedValues$b } = pickAriaComponentVariants(
1046
1046
  CHECKBOX_GROUP_VARIANTS
1047
1047
  );
1048
1048
  function BaseCheckboxGroup(props) {
@@ -1070,7 +1070,7 @@ function registerCheckboxGroup(loader, overrides) {
1070
1070
  displayName: "Aria Checkbox Group",
1071
1071
  importPath: "@plasmicpkgs/react-aria/skinny/registerCheckboxGroup",
1072
1072
  importName: "BaseCheckboxGroup",
1073
- variants: variants$d,
1073
+ variants: variants$e,
1074
1074
  props: __spreadProps$a(__spreadValues$k({}, getCommonProps("checkbox group", [
1075
1075
  "name",
1076
1076
  "isDisabled",
@@ -1266,10 +1266,11 @@ var __objRest$h = (source, exclude) => {
1266
1266
  };
1267
1267
  const INPUT_VARIANTS = [
1268
1268
  "focused",
1269
+ "focusVisible",
1269
1270
  "hovered",
1270
1271
  "disabled"
1271
1272
  ];
1272
- const { variants: variants$c } = pickAriaComponentVariants(INPUT_VARIANTS);
1273
+ const { variants: variants$d } = pickAriaComponentVariants(INPUT_VARIANTS);
1273
1274
  const inputHelpers$1 = {
1274
1275
  states: {
1275
1276
  value: {
@@ -1280,65 +1281,47 @@ const inputHelpers$1 = {
1280
1281
  }
1281
1282
  };
1282
1283
  function BaseInput(props) {
1283
- var _b;
1284
1284
  const _a = props, {
1285
1285
  plasmicUpdateVariant,
1286
1286
  setControlContextData,
1287
- disabled,
1288
1287
  autoComplete,
1289
- value
1288
+ value,
1289
+ className
1290
1290
  } = _a, rest = __objRest$h(_a, [
1291
1291
  "plasmicUpdateVariant",
1292
1292
  "setControlContextData",
1293
- "disabled",
1294
1293
  "autoComplete",
1295
- "value"
1294
+ "value",
1295
+ "className"
1296
1296
  ]);
1297
1297
  const textFieldContext = React.useContext(PlasmicTextFieldContext);
1298
1298
  const context = React.useContext(PlasmicInputContext);
1299
1299
  setControlContextData == null ? void 0 : setControlContextData({
1300
1300
  parent: textFieldContext
1301
1301
  });
1302
- const mergedProps = mergeProps(
1303
- rest,
1304
- {
1305
- value: (context == null ? void 0 : context.isUncontrolled) ? void 0 : value
1302
+ const classNameProp = useCallback(
1303
+ ({
1304
+ isDisabled,
1305
+ isFocusVisible,
1306
+ isFocused,
1307
+ isHovered
1308
+ }) => {
1309
+ plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
1310
+ disabled: isDisabled,
1311
+ focused: isFocused,
1312
+ focusVisible: isFocusVisible,
1313
+ hovered: isHovered
1314
+ });
1315
+ return className != null ? className : "";
1306
1316
  },
1307
- {
1308
- /**
1309
- * While react-aria internally does the merging of the disabled prop,
1310
- * we need to explicity do it here, because react-aria does it behind the scenes,
1311
- * whereas we need the calculated value of the disabled prop to be able to update the "disabled" CC variant.
1312
- * */
1313
- disabled: (_b = textFieldContext == null ? void 0 : textFieldContext.isDisabled) != null ? _b : disabled
1314
- }
1315
- );
1316
- useEffect(() => {
1317
- plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
1318
- disabled: mergedProps.disabled
1319
- });
1320
- }, [mergedProps.disabled, plasmicUpdateVariant]);
1321
- return /* @__PURE__ */ React.createElement(
1322
- Input,
1323
- __spreadValues$j({
1324
- autoComplete: resolveAutoComplete(autoComplete),
1325
- onHoverChange: (isHovered) => {
1326
- plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
1327
- hovered: isHovered
1328
- });
1329
- },
1330
- onFocus: () => {
1331
- plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
1332
- focused: true
1333
- });
1334
- },
1335
- onBlur: () => {
1336
- plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
1337
- focused: false
1338
- });
1339
- }
1340
- }, mergedProps)
1317
+ [className, plasmicUpdateVariant]
1341
1318
  );
1319
+ const mergedProps = mergeProps(rest, {
1320
+ value: (context == null ? void 0 : context.isUncontrolled) ? void 0 : value,
1321
+ autoComplete: resolveAutoComplete(autoComplete),
1322
+ className: classNameProp
1323
+ });
1324
+ return /* @__PURE__ */ React.createElement(Input, __spreadValues$j({}, mergedProps));
1342
1325
  }
1343
1326
  const INPUT_COMPONENT_NAME = makeComponentName("input");
1344
1327
  function registerInput(loader, overrides) {
@@ -1350,7 +1333,7 @@ function registerInput(loader, overrides) {
1350
1333
  displayName: "Aria Input",
1351
1334
  importPath: "@plasmicpkgs/react-aria/skinny/registerInput",
1352
1335
  importName: "BaseInput",
1353
- variants: variants$c,
1336
+ variants: variants$d,
1354
1337
  defaultStyles: {
1355
1338
  width: "300px",
1356
1339
  borderWidth: "1px",
@@ -1442,7 +1425,7 @@ const LIST_BOX_ITEM_VARIANTS = [
1442
1425
  "selected",
1443
1426
  "disabled"
1444
1427
  ];
1445
- const { variants: variants$b, withObservedValues: withObservedValues$a } = pickAriaComponentVariants(
1428
+ const { variants: variants$c, withObservedValues: withObservedValues$a } = pickAriaComponentVariants(
1446
1429
  LIST_BOX_ITEM_VARIANTS
1447
1430
  );
1448
1431
  function BaseListBoxItem(props) {
@@ -1548,7 +1531,7 @@ function registerListBoxItem(loader, overrides) {
1548
1531
  displayName: "Aria ListBoxItem",
1549
1532
  importPath: "@plasmicpkgs/react-aria/skinny/registerListBoxItem",
1550
1533
  importName: "BaseListBoxItem",
1551
- variants: variants$b,
1534
+ variants: variants$c,
1552
1535
  props: {
1553
1536
  id: {
1554
1537
  type: "string",
@@ -1684,6 +1667,8 @@ var __objRest$e = (source, exclude) => {
1684
1667
  }
1685
1668
  return target;
1686
1669
  };
1670
+ const LISTBOX_VARIANTS = ["focused", "focusVisible"];
1671
+ const { variants: variants$b } = pickAriaComponentVariants(LISTBOX_VARIANTS);
1687
1672
  const listboxHelpers = {
1688
1673
  states: {
1689
1674
  selectedValue: {
@@ -1700,13 +1685,17 @@ function BaseListBox(props) {
1700
1685
  const _a = props, {
1701
1686
  setControlContextData,
1702
1687
  children,
1688
+ className,
1703
1689
  selectedKeys,
1704
- defaultSelectedKeys
1690
+ defaultSelectedKeys,
1691
+ plasmicUpdateVariant
1705
1692
  } = _a, rest = __objRest$e(_a, [
1706
1693
  "setControlContextData",
1707
1694
  "children",
1695
+ "className",
1708
1696
  "selectedKeys",
1709
- "defaultSelectedKeys"
1697
+ "defaultSelectedKeys",
1698
+ "plasmicUpdateVariant"
1710
1699
  ]);
1711
1700
  const context = React.useContext(PlasmicListBoxContext);
1712
1701
  const isStandalone = !context;
@@ -1729,11 +1718,22 @@ function BaseListBox(props) {
1729
1718
  setIds(_ids);
1730
1719
  });
1731
1720
  }, []);
1721
+ const classNameProp = useCallback(
1722
+ ({ isFocusVisible, isFocused }) => {
1723
+ plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
1724
+ focused: isFocused,
1725
+ focusVisible: isFocusVisible
1726
+ });
1727
+ return className != null ? className : "";
1728
+ },
1729
+ [className, plasmicUpdateVariant]
1730
+ );
1732
1731
  const listbox = /* @__PURE__ */ React.createElement(
1733
1732
  ListBox,
1734
1733
  __spreadValues$g({
1735
1734
  selectedKeys: normalizeSelectedKeys(selectedKeys),
1736
- defaultSelectedKeys: normalizeSelectedKeys(defaultSelectedKeys)
1735
+ defaultSelectedKeys: normalizeSelectedKeys(defaultSelectedKeys),
1736
+ className: classNameProp
1737
1737
  }, rest),
1738
1738
  children
1739
1739
  );
@@ -1815,6 +1815,7 @@ function registerListBox(loader, overrides) {
1815
1815
  displayName: "Aria ListBox",
1816
1816
  importPath: "@plasmicpkgs/react-aria/skinny/registerListBox",
1817
1817
  importName: "BaseListBox",
1818
+ variants: variants$b,
1818
1819
  defaultStyles: {
1819
1820
  width: "250px",
1820
1821
  borderWidth: "1px",
@@ -2159,16 +2160,23 @@ function BaseComboBox(props) {
2159
2160
  setControlContextData,
2160
2161
  plasmicUpdateVariant,
2161
2162
  className,
2162
- isDisabled,
2163
2163
  isOpen: _isOpen
2164
2164
  } = _a, rest = __objRest$c(_a, [
2165
2165
  "children",
2166
2166
  "setControlContextData",
2167
2167
  "plasmicUpdateVariant",
2168
2168
  "className",
2169
- "isDisabled",
2170
2169
  "isOpen"
2171
2170
  ]);
2171
+ const classNameProp = useCallback(
2172
+ ({ isDisabled }) => {
2173
+ plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
2174
+ disabled: isDisabled
2175
+ });
2176
+ return className != null ? className : "";
2177
+ },
2178
+ [className, plasmicUpdateVariant]
2179
+ );
2172
2180
  const idManager = useMemo(() => new ListBoxItemIdManager(), []);
2173
2181
  useEffect(() => {
2174
2182
  idManager.subscribe((ids) => {
@@ -2177,27 +2185,15 @@ function BaseComboBox(props) {
2177
2185
  });
2178
2186
  });
2179
2187
  }, []);
2180
- useEffect(() => {
2181
- plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
2182
- disabled: isDisabled
2183
- });
2184
- }, [isDisabled, plasmicUpdateVariant]);
2185
- return /* @__PURE__ */ React.createElement(
2186
- ComboBox,
2187
- __spreadValues$e({
2188
- isDisabled,
2189
- className
2190
- }, rest),
2191
- /* @__PURE__ */ React.createElement(PlasmicPopoverTriggerContext.Provider, { value: true }, /* @__PURE__ */ React.createElement(
2192
- PlasmicListBoxContext.Provider,
2193
- {
2194
- value: {
2195
- idManager
2196
- }
2197
- },
2198
- /* @__PURE__ */ React.createElement(PlasmicInputContext.Provider, { value: { isUncontrolled: true } }, /* @__PURE__ */ React.createElement(ComboboxAutoOpen, __spreadValues$e({}, props)), children)
2199
- ))
2200
- );
2188
+ return /* @__PURE__ */ React.createElement(ComboBox, __spreadValues$e({ className: classNameProp }, rest), /* @__PURE__ */ React.createElement(PlasmicPopoverTriggerContext.Provider, { value: true }, /* @__PURE__ */ React.createElement(
2189
+ PlasmicListBoxContext.Provider,
2190
+ {
2191
+ value: {
2192
+ idManager
2193
+ }
2194
+ },
2195
+ /* @__PURE__ */ React.createElement(PlasmicInputContext.Provider, { value: { isUncontrolled: true } }, /* @__PURE__ */ React.createElement(ComboboxAutoOpen, __spreadValues$e({}, props)), children)
2196
+ )));
2201
2197
  }
2202
2198
  function registerComboBox(loader) {
2203
2199
  registerComponentHelper(loader, BaseComboBox, {
@@ -2447,9 +2443,6 @@ var __objRest$a = (source, exclude) => {
2447
2443
  }
2448
2444
  return target;
2449
2445
  };
2450
- const INLINE_STYLES = {
2451
- outline: "none"
2452
- };
2453
2446
  const BaseModal = forwardRef(
2454
2447
  function BaseModalInner(props, ref) {
2455
2448
  var _b, _c, _d;
@@ -2499,14 +2492,14 @@ const BaseModal = forwardRef(
2499
2492
  (_a2 = mergedProps.onOpenChange) == null ? void 0 : _a2.call(mergedProps, true);
2500
2493
  }
2501
2494
  }));
2502
- const bodyInCanvas = /* @__PURE__ */ React.createElement("div", { style: INLINE_STYLES }, children);
2503
- const bodyInPreview = /* @__PURE__ */ React.createElement(Dialog, { style: INLINE_STYLES }, children);
2495
+ const dialogInCanvas = /* @__PURE__ */ React.createElement("div", { className }, children);
2496
+ const dialog = /* @__PURE__ */ React.createElement(Dialog, { className }, children);
2504
2497
  return /* @__PURE__ */ React.createElement(
2505
2498
  ModalOverlay,
2506
2499
  __spreadProps$8(__spreadValues$c({}, mergedProps), {
2507
2500
  className: `${resetClassName} ${modalOverlayClass}`
2508
2501
  }),
2509
- /* @__PURE__ */ React.createElement(Modal, { className }, canvasCtx ? bodyInCanvas : bodyInPreview)
2502
+ /* @__PURE__ */ React.createElement(Modal, null, canvasCtx ? dialogInCanvas : dialog)
2510
2503
  );
2511
2504
  }
2512
2505
  );
@@ -3068,7 +3061,11 @@ const BaseSelectValue = (props) => {
3068
3061
  return /* @__PURE__ */ React.createElement(SelectValue, { className }, ({ isPlaceholder, selectedText }) => /* @__PURE__ */ React.createElement(React.Fragment, null, isPlaceholder ? placeholder : selectedText));
3069
3062
  };
3070
3063
  const SELECT_NAME = makeComponentName("select");
3071
- const SELECT_VARIANTS = ["disabled"];
3064
+ const SELECT_VARIANTS = [
3065
+ "focused",
3066
+ "focusVisible",
3067
+ "disabled"
3068
+ ];
3072
3069
  const { variants: SELECT_VARIANTS_DATA } = pickAriaComponentVariants(SELECT_VARIANTS);
3073
3070
  function BaseSelect(props) {
3074
3071
  const {
@@ -3093,11 +3090,21 @@ function BaseSelect(props) {
3093
3090
  });
3094
3091
  });
3095
3092
  }, []);
3096
- useEffect(() => {
3097
- plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
3098
- disabled: isDisabled
3099
- });
3100
- }, [isDisabled, plasmicUpdateVariant]);
3093
+ const classNameProp = useCallback(
3094
+ ({
3095
+ isDisabled: isDisabled2,
3096
+ isFocusVisible,
3097
+ isFocused
3098
+ }) => {
3099
+ plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
3100
+ disabled: isDisabled2,
3101
+ focused: isFocused,
3102
+ focusVisible: isFocusVisible
3103
+ });
3104
+ return className != null ? className : "";
3105
+ },
3106
+ [className, plasmicUpdateVariant]
3107
+ );
3101
3108
  return /* @__PURE__ */ React.createElement(
3102
3109
  Select,
3103
3110
  __spreadValues$8({
@@ -3105,7 +3112,7 @@ function BaseSelect(props) {
3105
3112
  onSelectionChange,
3106
3113
  onOpenChange,
3107
3114
  isDisabled,
3108
- className,
3115
+ className: classNameProp,
3109
3116
  style,
3110
3117
  name,
3111
3118
  disabledKeys,
@@ -4185,6 +4192,7 @@ var __objRest$1 = (source, exclude) => {
4185
4192
  };
4186
4193
  const TEXTAREA_VARIANTS = [
4187
4194
  "focused",
4195
+ "focusVisible",
4188
4196
  "hovered",
4189
4197
  "disabled"
4190
4198
  ];
@@ -4199,40 +4207,32 @@ const inputHelpers = {
4199
4207
  }
4200
4208
  };
4201
4209
  function BaseTextArea(props) {
4202
- var _b;
4203
- const _a = props, { disabled, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$1(_a, ["disabled", "plasmicUpdateVariant", "setControlContextData"]);
4210
+ const _a = props, { className, plasmicUpdateVariant, setControlContextData } = _a, rest = __objRest$1(_a, ["className", "plasmicUpdateVariant", "setControlContextData"]);
4204
4211
  const textFieldContext = React.useContext(PlasmicTextFieldContext);
4205
- const mergedProps = mergeProps(rest, {
4206
- disabled: (_b = textFieldContext == null ? void 0 : textFieldContext.isDisabled) != null ? _b : disabled
4207
- });
4208
- useEffect(() => {
4209
- plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
4210
- disabled: mergedProps.disabled
4211
- });
4212
- }, [mergedProps.disabled, plasmicUpdateVariant]);
4213
4212
  setControlContextData == null ? void 0 : setControlContextData({
4214
4213
  parent: textFieldContext
4215
4214
  });
4216
- return /* @__PURE__ */ React.createElement(
4217
- TextArea,
4218
- __spreadValues$2({
4219
- onFocus: () => {
4220
- plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
4221
- focused: true
4222
- });
4223
- },
4224
- onBlur: () => {
4225
- plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
4226
- focused: false
4227
- });
4228
- },
4229
- onHoverChange: (isHovered) => {
4230
- plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
4231
- hovered: isHovered
4232
- });
4233
- }
4234
- }, mergedProps)
4215
+ const classNameProp = useCallback(
4216
+ ({
4217
+ isDisabled,
4218
+ isFocusVisible,
4219
+ isFocused,
4220
+ isHovered
4221
+ }) => {
4222
+ plasmicUpdateVariant == null ? void 0 : plasmicUpdateVariant({
4223
+ disabled: isDisabled,
4224
+ focused: isFocused,
4225
+ focusVisible: isFocusVisible,
4226
+ hovered: isHovered
4227
+ });
4228
+ return className != null ? className : "";
4229
+ },
4230
+ [className, plasmicUpdateVariant]
4235
4231
  );
4232
+ const mergedProps = mergeProps(rest, {
4233
+ className: classNameProp
4234
+ });
4235
+ return /* @__PURE__ */ React.createElement(TextArea, __spreadValues$2({}, mergedProps));
4236
4236
  }
4237
4237
  function registerTextArea(loader, overrides) {
4238
4238
  registerComponentHelper(