@react-spectrum/textfield 3.12.0 → 3.12.1

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.
@@ -39,7 +39,7 @@ function $eec649e464f3832d$var$TextArea(props, ref) {
39
39
  let { isDisabled: isDisabled = false, isQuiet: isQuiet = false, isReadOnly: isReadOnly = false, isRequired: isRequired = false, onChange: onChange, ...otherProps } = props;
40
40
  var _props_defaultValue;
41
41
  // not in stately because this is so we know when to re-measure, which is a spectrum design
42
- let [inputValue, setInputValue] = (0, $5VIId$reactstatelyutils.useControlledState)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : "", ()=>{});
42
+ let [inputValue, setInputValue] = (0, $5VIId$reactstatelyutils.useControlledState)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : '', ()=>{});
43
43
  let inputRef = (0, $5VIId$react.useRef)(null);
44
44
  let onHeightChange = (0, $5VIId$react.useCallback)(()=>{
45
45
  // Quiet textareas always grow based on their text content.
@@ -51,10 +51,10 @@ function $eec649e464f3832d$var$TextArea(props, ref) {
51
51
  // Firefox scroll position is lost when overflow: 'hidden' is applied so we skip applying it.
52
52
  // The measure/applied height is also incorrect/reset if we turn on and off
53
53
  // overflow: hidden in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1787062
54
- let isFirefox = "MozAppearance" in input.style;
55
- if (!isFirefox) input.style.overflow = "hidden";
56
- input.style.alignSelf = "start";
57
- input.style.height = "auto";
54
+ let isFirefox = 'MozAppearance' in input.style;
55
+ if (!isFirefox) input.style.overflow = 'hidden';
56
+ input.style.alignSelf = 'start';
57
+ input.style.height = 'auto';
58
58
  // offsetHeight - clientHeight accounts for the border/padding.
59
59
  input.style.height = `${input.scrollHeight + (input.offsetHeight - input.clientHeight)}px`;
60
60
  input.style.overflow = prevOverflow;
@@ -72,11 +72,11 @@ function $eec649e464f3832d$var$TextArea(props, ref) {
72
72
  inputValue,
73
73
  inputRef
74
74
  ]);
75
- if (props.placeholder) console.warn("Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextArea.html#help-text");
75
+ if (props.placeholder) console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextArea.html#help-text');
76
76
  let result = (0, $5VIId$reactariatextfield.useTextField)({
77
77
  ...props,
78
78
  onChange: (0, $5VIId$reactariautils.chain)(onChange, setInputValue),
79
- inputElementType: "textarea"
79
+ inputElementType: 'textarea'
80
80
  }, inputRef);
81
81
  return /*#__PURE__*/ (0, ($parcel$interopDefault($5VIId$react))).createElement((0, $86793250183ac29e$exports.TextFieldBase), {
82
82
  ...otherProps,
package/dist/TextArea.mjs CHANGED
@@ -29,7 +29,7 @@ function $cc187bf91f8eea73$var$TextArea(props, ref) {
29
29
  let { isDisabled: isDisabled = false, isQuiet: isQuiet = false, isReadOnly: isReadOnly = false, isRequired: isRequired = false, onChange: onChange, ...otherProps } = props;
30
30
  var _props_defaultValue;
31
31
  // not in stately because this is so we know when to re-measure, which is a spectrum design
32
- let [inputValue, setInputValue] = (0, $hi3T0$useControlledState)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : "", ()=>{});
32
+ let [inputValue, setInputValue] = (0, $hi3T0$useControlledState)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : '', ()=>{});
33
33
  let inputRef = (0, $hi3T0$useRef)(null);
34
34
  let onHeightChange = (0, $hi3T0$useCallback)(()=>{
35
35
  // Quiet textareas always grow based on their text content.
@@ -41,10 +41,10 @@ function $cc187bf91f8eea73$var$TextArea(props, ref) {
41
41
  // Firefox scroll position is lost when overflow: 'hidden' is applied so we skip applying it.
42
42
  // The measure/applied height is also incorrect/reset if we turn on and off
43
43
  // overflow: hidden in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1787062
44
- let isFirefox = "MozAppearance" in input.style;
45
- if (!isFirefox) input.style.overflow = "hidden";
46
- input.style.alignSelf = "start";
47
- input.style.height = "auto";
44
+ let isFirefox = 'MozAppearance' in input.style;
45
+ if (!isFirefox) input.style.overflow = 'hidden';
46
+ input.style.alignSelf = 'start';
47
+ input.style.height = 'auto';
48
48
  // offsetHeight - clientHeight accounts for the border/padding.
49
49
  input.style.height = `${input.scrollHeight + (input.offsetHeight - input.clientHeight)}px`;
50
50
  input.style.overflow = prevOverflow;
@@ -62,11 +62,11 @@ function $cc187bf91f8eea73$var$TextArea(props, ref) {
62
62
  inputValue,
63
63
  inputRef
64
64
  ]);
65
- if (props.placeholder) console.warn("Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextArea.html#help-text");
65
+ if (props.placeholder) console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextArea.html#help-text');
66
66
  let result = (0, $hi3T0$useTextField)({
67
67
  ...props,
68
68
  onChange: (0, $hi3T0$chain)(onChange, setInputValue),
69
- inputElementType: "textarea"
69
+ inputElementType: 'textarea'
70
70
  }, inputRef);
71
71
  return /*#__PURE__*/ (0, $hi3T0$react).createElement((0, $599adb75312e6492$export$d22444a338b6e3c2), {
72
72
  ...otherProps,
@@ -88,4 +88,4 @@ function $cc187bf91f8eea73$var$TextArea(props, ref) {
88
88
 
89
89
 
90
90
  export {$cc187bf91f8eea73$export$f5c9f3c2c4054eec as TextArea};
91
- //# sourceMappingURL=TextArea.mjs.map
91
+ //# sourceMappingURL=TextArea.module.js.map
@@ -29,7 +29,7 @@ function $cc187bf91f8eea73$var$TextArea(props, ref) {
29
29
  let { isDisabled: isDisabled = false, isQuiet: isQuiet = false, isReadOnly: isReadOnly = false, isRequired: isRequired = false, onChange: onChange, ...otherProps } = props;
30
30
  var _props_defaultValue;
31
31
  // not in stately because this is so we know when to re-measure, which is a spectrum design
32
- let [inputValue, setInputValue] = (0, $hi3T0$useControlledState)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : "", ()=>{});
32
+ let [inputValue, setInputValue] = (0, $hi3T0$useControlledState)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : '', ()=>{});
33
33
  let inputRef = (0, $hi3T0$useRef)(null);
34
34
  let onHeightChange = (0, $hi3T0$useCallback)(()=>{
35
35
  // Quiet textareas always grow based on their text content.
@@ -41,10 +41,10 @@ function $cc187bf91f8eea73$var$TextArea(props, ref) {
41
41
  // Firefox scroll position is lost when overflow: 'hidden' is applied so we skip applying it.
42
42
  // The measure/applied height is also incorrect/reset if we turn on and off
43
43
  // overflow: hidden in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1787062
44
- let isFirefox = "MozAppearance" in input.style;
45
- if (!isFirefox) input.style.overflow = "hidden";
46
- input.style.alignSelf = "start";
47
- input.style.height = "auto";
44
+ let isFirefox = 'MozAppearance' in input.style;
45
+ if (!isFirefox) input.style.overflow = 'hidden';
46
+ input.style.alignSelf = 'start';
47
+ input.style.height = 'auto';
48
48
  // offsetHeight - clientHeight accounts for the border/padding.
49
49
  input.style.height = `${input.scrollHeight + (input.offsetHeight - input.clientHeight)}px`;
50
50
  input.style.overflow = prevOverflow;
@@ -62,11 +62,11 @@ function $cc187bf91f8eea73$var$TextArea(props, ref) {
62
62
  inputValue,
63
63
  inputRef
64
64
  ]);
65
- if (props.placeholder) console.warn("Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextArea.html#help-text");
65
+ if (props.placeholder) console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextArea.html#help-text');
66
66
  let result = (0, $hi3T0$useTextField)({
67
67
  ...props,
68
68
  onChange: (0, $hi3T0$chain)(onChange, setInputValue),
69
- inputElementType: "textarea"
69
+ inputElementType: 'textarea'
70
70
  }, inputRef);
71
71
  return /*#__PURE__*/ (0, $hi3T0$react).createElement((0, $599adb75312e6492$export$d22444a338b6e3c2), {
72
72
  ...otherProps,
@@ -34,7 +34,7 @@ function $34fd51d50eb4b056$var$TextField(props, ref) {
34
34
  props = (0, $em8OD$reactspectrumform.useFormProps)(props);
35
35
  let inputRef = (0, $em8OD$react.useRef)(null);
36
36
  let result = (0, $em8OD$reactariatextfield.useTextField)(props, inputRef);
37
- if (props.placeholder) console.warn("Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextField.html#help-text");
37
+ if (props.placeholder) console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextField.html#help-text');
38
38
  return /*#__PURE__*/ (0, ($parcel$interopDefault($em8OD$react))).createElement((0, $86793250183ac29e$exports.TextFieldBase), {
39
39
  ...props,
40
40
  ...result,
@@ -24,7 +24,7 @@ function $265457f9427aa380$var$TextField(props, ref) {
24
24
  props = (0, $9R76J$useFormProps)(props);
25
25
  let inputRef = (0, $9R76J$useRef)(null);
26
26
  let result = (0, $9R76J$useTextField)(props, inputRef);
27
- if (props.placeholder) console.warn("Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextField.html#help-text");
27
+ if (props.placeholder) console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextField.html#help-text');
28
28
  return /*#__PURE__*/ (0, $9R76J$react).createElement((0, $599adb75312e6492$export$d22444a338b6e3c2), {
29
29
  ...props,
30
30
  ...result,
@@ -40,4 +40,4 @@ function $265457f9427aa380$var$TextField(props, ref) {
40
40
 
41
41
 
42
42
  export {$265457f9427aa380$export$2c73285ae9390cec as TextField};
43
- //# sourceMappingURL=TextField.mjs.map
43
+ //# sourceMappingURL=TextField.module.js.map
@@ -24,7 +24,7 @@ function $265457f9427aa380$var$TextField(props, ref) {
24
24
  props = (0, $9R76J$useFormProps)(props);
25
25
  let inputRef = (0, $9R76J$useRef)(null);
26
26
  let result = (0, $9R76J$useTextField)(props, inputRef);
27
- if (props.placeholder) console.warn("Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextField.html#help-text");
27
+ if (props.placeholder) console.warn('Placeholders are deprecated due to accessibility issues. Please use help text instead. See the docs for details: https://react-spectrum.adobe.com/react-spectrum/TextField.html#help-text');
28
28
  return /*#__PURE__*/ (0, $9R76J$react).createElement((0, $599adb75312e6492$export$d22444a338b6e3c2), {
29
29
  ...props,
30
30
  ...result,
@@ -39,7 +39,7 @@ $parcel$export(module.exports, "TextFieldBase", () => $86793250183ac29e$export$d
39
39
 
40
40
 
41
41
  function $86793250183ac29e$var$TextFieldBase(props, ref) {
42
- let { validationState: validationState = props.isInvalid ? "invalid" : null, icon: icon, isQuiet: isQuiet = false, isDisabled: isDisabled, multiLine: multiLine, autoFocus: autoFocus, inputClassName: inputClassName, wrapperChildren: wrapperChildren, labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, inputRef: userInputRef, isLoading: isLoading, loadingIndicator: loadingIndicator, validationIconClassName: validationIconClassName, disableFocusRing: disableFocusRing } = props;
42
+ let { validationState: validationState = props.isInvalid ? 'invalid' : null, icon: icon, isQuiet: isQuiet = false, isDisabled: isDisabled, multiLine: multiLine, autoFocus: autoFocus, inputClassName: inputClassName, wrapperChildren: wrapperChildren, labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, inputRef: userInputRef, isLoading: isLoading, loadingIndicator: loadingIndicator, validationIconClassName: validationIconClassName, disableFocusRing: disableFocusRing } = props;
43
43
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $fWjzu$reactariainteractions.useHover)({
44
44
  isDisabled: isDisabled
45
45
  });
@@ -56,39 +56,39 @@ function $86793250183ac29e$var$TextFieldBase(props, ref) {
56
56
  return inputRef.current;
57
57
  }
58
58
  }));
59
- let ElementType = multiLine ? "textarea" : "input";
60
- let isInvalid = validationState === "invalid" && !isDisabled;
59
+ let ElementType = multiLine ? 'textarea' : 'input';
60
+ let isInvalid = validationState === 'invalid' && !isDisabled;
61
61
  if (icon) {
62
- let UNSAFE_className = (0, $fWjzu$reactspectrumutils.classNames)((0, ($parcel$interopDefault($40cb3a00c193680f$exports))), icon.props && icon.props.UNSAFE_className, "spectrum-Textfield-icon");
62
+ let UNSAFE_className = (0, $fWjzu$reactspectrumutils.classNames)((0, ($parcel$interopDefault($40cb3a00c193680f$exports))), icon.props && icon.props.UNSAFE_className, 'spectrum-Textfield-icon');
63
63
  icon = /*#__PURE__*/ (0, $fWjzu$react.cloneElement)(icon, {
64
64
  UNSAFE_className: UNSAFE_className,
65
- size: "S"
65
+ size: 'S'
66
66
  });
67
67
  }
68
68
  let validationIcon = isInvalid ? /*#__PURE__*/ (0, ($parcel$interopDefault($fWjzu$react))).createElement((0, ($parcel$interopDefault($fWjzu$spectrumiconsuiAlertMedium))), null) : /*#__PURE__*/ (0, ($parcel$interopDefault($fWjzu$react))).createElement((0, ($parcel$interopDefault($fWjzu$spectrumiconsuiCheckmarkMedium))), null);
69
69
  let validation = /*#__PURE__*/ (0, $fWjzu$react.cloneElement)(validationIcon, {
70
- UNSAFE_className: (0, $fWjzu$reactspectrumutils.classNames)((0, ($parcel$interopDefault($40cb3a00c193680f$exports))), "spectrum-Textfield-validationIcon", validationIconClassName)
70
+ UNSAFE_className: (0, $fWjzu$reactspectrumutils.classNames)((0, ($parcel$interopDefault($40cb3a00c193680f$exports))), 'spectrum-Textfield-validationIcon', validationIconClassName)
71
71
  });
72
72
  let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $fWjzu$reactariafocus.useFocusRing)({
73
73
  isTextInput: true,
74
74
  autoFocus: autoFocus
75
75
  });
76
76
  let textField = /*#__PURE__*/ (0, ($parcel$interopDefault($fWjzu$react))).createElement("div", {
77
- className: (0, $fWjzu$reactspectrumutils.classNames)((0, ($parcel$interopDefault($40cb3a00c193680f$exports))), "spectrum-Textfield", {
78
- "spectrum-Textfield--invalid": isInvalid,
79
- "spectrum-Textfield--valid": validationState === "valid" && !isDisabled,
80
- "spectrum-Textfield--loadable": loadingIndicator,
81
- "spectrum-Textfield--quiet": isQuiet,
82
- "spectrum-Textfield--multiline": multiLine,
83
- "focus-ring": !disableFocusRing && isFocusVisible
77
+ className: (0, $fWjzu$reactspectrumutils.classNames)((0, ($parcel$interopDefault($40cb3a00c193680f$exports))), 'spectrum-Textfield', {
78
+ 'spectrum-Textfield--invalid': isInvalid,
79
+ 'spectrum-Textfield--valid': validationState === 'valid' && !isDisabled,
80
+ 'spectrum-Textfield--loadable': loadingIndicator,
81
+ 'spectrum-Textfield--quiet': isQuiet,
82
+ 'spectrum-Textfield--multiline': multiLine,
83
+ 'focus-ring': !disableFocusRing && isFocusVisible
84
84
  })
85
85
  }, /*#__PURE__*/ (0, ($parcel$interopDefault($fWjzu$react))).createElement(ElementType, {
86
86
  ...(0, $fWjzu$reactariautils.mergeProps)(inputProps, hoverProps, focusProps),
87
87
  ref: inputRef,
88
88
  rows: multiLine ? 1 : undefined,
89
- className: (0, $fWjzu$reactspectrumutils.classNames)((0, ($parcel$interopDefault($40cb3a00c193680f$exports))), "spectrum-Textfield-input", {
90
- "spectrum-Textfield-inputIcon": icon,
91
- "is-hovered": isHovered
89
+ className: (0, $fWjzu$reactspectrumutils.classNames)((0, ($parcel$interopDefault($40cb3a00c193680f$exports))), 'spectrum-Textfield-input', {
90
+ 'spectrum-Textfield-inputIcon': icon,
91
+ 'is-hovered': isHovered
92
92
  }, inputClassName)
93
93
  }), icon, validationState && !isLoading && !isDisabled ? validation : null, isLoading && loadingIndicator, wrapperChildren);
94
94
  return /*#__PURE__*/ (0, ($parcel$interopDefault($fWjzu$react))).createElement((0, $fWjzu$reactspectrumlabel.Field), {
@@ -96,8 +96,8 @@ function $86793250183ac29e$var$TextFieldBase(props, ref) {
96
96
  labelProps: labelProps,
97
97
  descriptionProps: descriptionProps,
98
98
  errorMessageProps: errorMessageProps,
99
- wrapperClassName: (0, $fWjzu$reactspectrumutils.classNames)((0, ($parcel$interopDefault($40cb3a00c193680f$exports))), "spectrum-Textfield-wrapper", {
100
- "spectrum-Textfield-wrapper--quiet": isQuiet
99
+ wrapperClassName: (0, $fWjzu$reactspectrumutils.classNames)((0, ($parcel$interopDefault($40cb3a00c193680f$exports))), 'spectrum-Textfield-wrapper', {
100
+ 'spectrum-Textfield-wrapper--quiet': isQuiet
101
101
  }),
102
102
  showErrorIcon: false,
103
103
  ref: domRef
@@ -33,7 +33,7 @@ function $parcel$interopDefault(a) {
33
33
 
34
34
 
35
35
  function $599adb75312e6492$var$TextFieldBase(props, ref) {
36
- let { validationState: validationState = props.isInvalid ? "invalid" : null, icon: icon, isQuiet: isQuiet = false, isDisabled: isDisabled, multiLine: multiLine, autoFocus: autoFocus, inputClassName: inputClassName, wrapperChildren: wrapperChildren, labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, inputRef: userInputRef, isLoading: isLoading, loadingIndicator: loadingIndicator, validationIconClassName: validationIconClassName, disableFocusRing: disableFocusRing } = props;
36
+ let { validationState: validationState = props.isInvalid ? 'invalid' : null, icon: icon, isQuiet: isQuiet = false, isDisabled: isDisabled, multiLine: multiLine, autoFocus: autoFocus, inputClassName: inputClassName, wrapperChildren: wrapperChildren, labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, inputRef: userInputRef, isLoading: isLoading, loadingIndicator: loadingIndicator, validationIconClassName: validationIconClassName, disableFocusRing: disableFocusRing } = props;
37
37
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $264pK$useHover)({
38
38
  isDisabled: isDisabled
39
39
  });
@@ -50,39 +50,39 @@ function $599adb75312e6492$var$TextFieldBase(props, ref) {
50
50
  return inputRef.current;
51
51
  }
52
52
  }));
53
- let ElementType = multiLine ? "textarea" : "input";
54
- let isInvalid = validationState === "invalid" && !isDisabled;
53
+ let ElementType = multiLine ? 'textarea' : 'input';
54
+ let isInvalid = validationState === 'invalid' && !isDisabled;
55
55
  if (icon) {
56
- let UNSAFE_className = (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), icon.props && icon.props.UNSAFE_className, "spectrum-Textfield-icon");
56
+ let UNSAFE_className = (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), icon.props && icon.props.UNSAFE_className, 'spectrum-Textfield-icon');
57
57
  icon = /*#__PURE__*/ (0, $264pK$cloneElement)(icon, {
58
58
  UNSAFE_className: UNSAFE_className,
59
- size: "S"
59
+ size: 'S'
60
60
  });
61
61
  }
62
62
  let validationIcon = isInvalid ? /*#__PURE__*/ (0, $264pK$react).createElement((0, $264pK$spectrumiconsuiAlertMedium), null) : /*#__PURE__*/ (0, $264pK$react).createElement((0, $264pK$spectrumiconsuiCheckmarkMedium), null);
63
63
  let validation = /*#__PURE__*/ (0, $264pK$cloneElement)(validationIcon, {
64
- UNSAFE_className: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), "spectrum-Textfield-validationIcon", validationIconClassName)
64
+ UNSAFE_className: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), 'spectrum-Textfield-validationIcon', validationIconClassName)
65
65
  });
66
66
  let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $264pK$useFocusRing)({
67
67
  isTextInput: true,
68
68
  autoFocus: autoFocus
69
69
  });
70
70
  let textField = /*#__PURE__*/ (0, $264pK$react).createElement("div", {
71
- className: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), "spectrum-Textfield", {
72
- "spectrum-Textfield--invalid": isInvalid,
73
- "spectrum-Textfield--valid": validationState === "valid" && !isDisabled,
74
- "spectrum-Textfield--loadable": loadingIndicator,
75
- "spectrum-Textfield--quiet": isQuiet,
76
- "spectrum-Textfield--multiline": multiLine,
77
- "focus-ring": !disableFocusRing && isFocusVisible
71
+ className: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), 'spectrum-Textfield', {
72
+ 'spectrum-Textfield--invalid': isInvalid,
73
+ 'spectrum-Textfield--valid': validationState === 'valid' && !isDisabled,
74
+ 'spectrum-Textfield--loadable': loadingIndicator,
75
+ 'spectrum-Textfield--quiet': isQuiet,
76
+ 'spectrum-Textfield--multiline': multiLine,
77
+ 'focus-ring': !disableFocusRing && isFocusVisible
78
78
  })
79
79
  }, /*#__PURE__*/ (0, $264pK$react).createElement(ElementType, {
80
80
  ...(0, $264pK$mergeProps)(inputProps, hoverProps, focusProps),
81
81
  ref: inputRef,
82
82
  rows: multiLine ? 1 : undefined,
83
- className: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), "spectrum-Textfield-input", {
84
- "spectrum-Textfield-inputIcon": icon,
85
- "is-hovered": isHovered
83
+ className: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), 'spectrum-Textfield-input', {
84
+ 'spectrum-Textfield-inputIcon': icon,
85
+ 'is-hovered': isHovered
86
86
  }, inputClassName)
87
87
  }), icon, validationState && !isLoading && !isDisabled ? validation : null, isLoading && loadingIndicator, wrapperChildren);
88
88
  return /*#__PURE__*/ (0, $264pK$react).createElement((0, $264pK$Field), {
@@ -90,8 +90,8 @@ function $599adb75312e6492$var$TextFieldBase(props, ref) {
90
90
  labelProps: labelProps,
91
91
  descriptionProps: descriptionProps,
92
92
  errorMessageProps: errorMessageProps,
93
- wrapperClassName: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), "spectrum-Textfield-wrapper", {
94
- "spectrum-Textfield-wrapper--quiet": isQuiet
93
+ wrapperClassName: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), 'spectrum-Textfield-wrapper', {
94
+ 'spectrum-Textfield-wrapper--quiet': isQuiet
95
95
  }),
96
96
  showErrorIcon: false,
97
97
  ref: domRef
@@ -101,4 +101,4 @@ const $599adb75312e6492$export$d22444a338b6e3c2 = /*#__PURE__*/ (0, $264pK$forwa
101
101
 
102
102
 
103
103
  export {$599adb75312e6492$export$d22444a338b6e3c2 as TextFieldBase};
104
- //# sourceMappingURL=TextFieldBase.mjs.map
104
+ //# sourceMappingURL=TextFieldBase.module.js.map
@@ -33,7 +33,7 @@ function $parcel$interopDefault(a) {
33
33
 
34
34
 
35
35
  function $599adb75312e6492$var$TextFieldBase(props, ref) {
36
- let { validationState: validationState = props.isInvalid ? "invalid" : null, icon: icon, isQuiet: isQuiet = false, isDisabled: isDisabled, multiLine: multiLine, autoFocus: autoFocus, inputClassName: inputClassName, wrapperChildren: wrapperChildren, labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, inputRef: userInputRef, isLoading: isLoading, loadingIndicator: loadingIndicator, validationIconClassName: validationIconClassName, disableFocusRing: disableFocusRing } = props;
36
+ let { validationState: validationState = props.isInvalid ? 'invalid' : null, icon: icon, isQuiet: isQuiet = false, isDisabled: isDisabled, multiLine: multiLine, autoFocus: autoFocus, inputClassName: inputClassName, wrapperChildren: wrapperChildren, labelProps: labelProps, inputProps: inputProps, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps, inputRef: userInputRef, isLoading: isLoading, loadingIndicator: loadingIndicator, validationIconClassName: validationIconClassName, disableFocusRing: disableFocusRing } = props;
37
37
  let { hoverProps: hoverProps, isHovered: isHovered } = (0, $264pK$useHover)({
38
38
  isDisabled: isDisabled
39
39
  });
@@ -50,39 +50,39 @@ function $599adb75312e6492$var$TextFieldBase(props, ref) {
50
50
  return inputRef.current;
51
51
  }
52
52
  }));
53
- let ElementType = multiLine ? "textarea" : "input";
54
- let isInvalid = validationState === "invalid" && !isDisabled;
53
+ let ElementType = multiLine ? 'textarea' : 'input';
54
+ let isInvalid = validationState === 'invalid' && !isDisabled;
55
55
  if (icon) {
56
- let UNSAFE_className = (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), icon.props && icon.props.UNSAFE_className, "spectrum-Textfield-icon");
56
+ let UNSAFE_className = (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), icon.props && icon.props.UNSAFE_className, 'spectrum-Textfield-icon');
57
57
  icon = /*#__PURE__*/ (0, $264pK$cloneElement)(icon, {
58
58
  UNSAFE_className: UNSAFE_className,
59
- size: "S"
59
+ size: 'S'
60
60
  });
61
61
  }
62
62
  let validationIcon = isInvalid ? /*#__PURE__*/ (0, $264pK$react).createElement((0, $264pK$spectrumiconsuiAlertMedium), null) : /*#__PURE__*/ (0, $264pK$react).createElement((0, $264pK$spectrumiconsuiCheckmarkMedium), null);
63
63
  let validation = /*#__PURE__*/ (0, $264pK$cloneElement)(validationIcon, {
64
- UNSAFE_className: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), "spectrum-Textfield-validationIcon", validationIconClassName)
64
+ UNSAFE_className: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), 'spectrum-Textfield-validationIcon', validationIconClassName)
65
65
  });
66
66
  let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $264pK$useFocusRing)({
67
67
  isTextInput: true,
68
68
  autoFocus: autoFocus
69
69
  });
70
70
  let textField = /*#__PURE__*/ (0, $264pK$react).createElement("div", {
71
- className: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), "spectrum-Textfield", {
72
- "spectrum-Textfield--invalid": isInvalid,
73
- "spectrum-Textfield--valid": validationState === "valid" && !isDisabled,
74
- "spectrum-Textfield--loadable": loadingIndicator,
75
- "spectrum-Textfield--quiet": isQuiet,
76
- "spectrum-Textfield--multiline": multiLine,
77
- "focus-ring": !disableFocusRing && isFocusVisible
71
+ className: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), 'spectrum-Textfield', {
72
+ 'spectrum-Textfield--invalid': isInvalid,
73
+ 'spectrum-Textfield--valid': validationState === 'valid' && !isDisabled,
74
+ 'spectrum-Textfield--loadable': loadingIndicator,
75
+ 'spectrum-Textfield--quiet': isQuiet,
76
+ 'spectrum-Textfield--multiline': multiLine,
77
+ 'focus-ring': !disableFocusRing && isFocusVisible
78
78
  })
79
79
  }, /*#__PURE__*/ (0, $264pK$react).createElement(ElementType, {
80
80
  ...(0, $264pK$mergeProps)(inputProps, hoverProps, focusProps),
81
81
  ref: inputRef,
82
82
  rows: multiLine ? 1 : undefined,
83
- className: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), "spectrum-Textfield-input", {
84
- "spectrum-Textfield-inputIcon": icon,
85
- "is-hovered": isHovered
83
+ className: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), 'spectrum-Textfield-input', {
84
+ 'spectrum-Textfield-inputIcon': icon,
85
+ 'is-hovered': isHovered
86
86
  }, inputClassName)
87
87
  }), icon, validationState && !isLoading && !isDisabled ? validation : null, isLoading && loadingIndicator, wrapperChildren);
88
88
  return /*#__PURE__*/ (0, $264pK$react).createElement((0, $264pK$Field), {
@@ -90,8 +90,8 @@ function $599adb75312e6492$var$TextFieldBase(props, ref) {
90
90
  labelProps: labelProps,
91
91
  descriptionProps: descriptionProps,
92
92
  errorMessageProps: errorMessageProps,
93
- wrapperClassName: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), "spectrum-Textfield-wrapper", {
94
- "spectrum-Textfield-wrapper--quiet": isQuiet
93
+ wrapperClassName: (0, $264pK$classNames)((0, ($parcel$interopDefault($264pK$textfield_vars_cssmodulejs))), 'spectrum-Textfield-wrapper', {
94
+ 'spectrum-Textfield-wrapper--quiet': isQuiet
95
95
  }),
96
96
  showErrorIcon: false,
97
97
  ref: domRef
@@ -73,4 +73,4 @@ $c14528ddc146317f$export$9fcb3d6af94a9d12 = `YO3Nla_spectrum-Textfield-wrapper--
73
73
 
74
74
 
75
75
  export {$c14528ddc146317f$exports as default};
76
- //# sourceMappingURL=textfield_vars_css.mjs.map
76
+ //# sourceMappingURL=textfield_vars_css.module.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/textfield",
3
- "version": "3.12.0",
3
+ "version": "3.12.1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,17 +36,17 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/focus": "^3.17.0",
40
- "@react-aria/interactions": "^3.21.2",
41
- "@react-aria/textfield": "^3.14.4",
42
- "@react-aria/utils": "^3.24.0",
43
- "@react-spectrum/form": "^3.7.5",
44
- "@react-spectrum/label": "^3.16.5",
45
- "@react-spectrum/utils": "^3.11.6",
46
- "@react-stately/utils": "^3.10.0",
47
- "@react-types/shared": "^3.23.0",
48
- "@react-types/textfield": "^3.9.2",
49
- "@spectrum-icons/ui": "^3.6.6",
39
+ "@react-aria/focus": "^3.17.1",
40
+ "@react-aria/interactions": "^3.21.3",
41
+ "@react-aria/textfield": "^3.14.5",
42
+ "@react-aria/utils": "^3.24.1",
43
+ "@react-spectrum/form": "^3.7.6",
44
+ "@react-spectrum/label": "^3.16.6",
45
+ "@react-spectrum/utils": "^3.11.7",
46
+ "@react-stately/utils": "^3.10.1",
47
+ "@react-types/shared": "^3.23.1",
48
+ "@react-types/textfield": "^3.9.3",
49
+ "@spectrum-icons/ui": "^3.6.7",
50
50
  "@swc/helpers": "^0.5.0"
51
51
  },
52
52
  "devDependencies": {
@@ -60,5 +60,5 @@
60
60
  "publishConfig": {
61
61
  "access": "public"
62
62
  },
63
- "gitHead": "f645f29edc1322153fd60af4640cbcab1d992dbd"
63
+ "gitHead": "b77d7d594dff4dcfb5359bffbcfd18142b146433"
64
64
  }