@react-spectrum/textfield 3.13.0 → 3.13.2
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/TextArea.main.js +1 -1
- package/dist/TextArea.main.js.map +1 -1
- package/dist/TextArea.mjs +1 -1
- package/dist/TextArea.module.js +1 -1
- package/dist/TextArea.module.js.map +1 -1
- package/dist/TextField.main.js +1 -1
- package/dist/TextField.main.js.map +1 -1
- package/dist/TextField.mjs +1 -1
- package/dist/TextField.module.js +1 -1
- package/dist/TextField.module.js.map +1 -1
- package/dist/TextFieldBase.main.js +1 -1
- package/dist/TextFieldBase.mjs +1 -1
- package/dist/TextFieldBase.module.js +1 -1
- package/dist/{vars.ff531137.css → textfield.54643fd6.css} +1 -1
- package/dist/{vars.ff531137.css.map → textfield.54643fd6.css.map} +1 -1
- package/package.json +13 -13
- package/src/TextArea.tsx +1 -1
- package/src/TextField.tsx +1 -1
package/dist/TextArea.main.js
CHANGED
@@ -72,7 +72,7 @@ const $eec649e464f3832d$export$f5c9f3c2c4054eec = /*#__PURE__*/ (0, ($parcel$int
|
|
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 && process.env.NODE_ENV !== 'production') 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),
|
@@ -1 +1 @@
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAgBM,MAAM,0DAAW,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,S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F,MAAM,KAAK,CAAC,QAAQ,GAAG;YACvB,MAAM,KAAK,CAAC,SAAS,GAAG;QAC1B;IACF,GAAG;QAAC;QAAS;QAAU,MAAM,MAAM;KAAC;IAEpC,CAAA,GAAA,qCAAc,EAAE;QACd,IAAI,SAAS,OAAO,EAClB;IAEJ,GAAG;QAAC;QAAgB;QAAY;KAAS;IAEzC,IAAI,MAAM,WAAW,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAChD,QAAQ,IAAI,CAAC;IAGf,IAAI,SAAS,CAAA,GAAA,sCAAW,EAAE;QACxB,GAAG,KAAK;QACR,UAAU,CAAA,GAAA,2BAAI,EAAE,UAAU;QAC1B,kBAAkB;IACpB,GAAG;IAEH,qBACE,0DAAC,CAAA,GAAA,uCAAY;QACV,GAAG,UAAU;QACd,KAAK;QACL,UAAU;QACT,GAAG,MAAM;QACV,WAAA;QACA,YAAY;QACZ,SAAS;QACT,YAAY;QACZ,YAAY;;AAElB","sources":["packages/@react-spectrum/textfield/src/TextArea.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain, useLayoutEffect} from '@react-aria/utils';\nimport React, {Ref, useCallback, useRef} from 'react';\nimport {SpectrumTextAreaProps, SpectrumTextFieldBaseProps, TextFieldRef} from '@react-types/textfield';\nimport {TextFieldBase} from './TextFieldBase';\nimport {useControlledState} from '@react-stately/utils';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useTextField} from '@react-aria/textfield';\n\n/**\n * TextAreas are multiline text inputs, useful for cases where users have\n * a sizable amount of text to enter. They allow for all customizations that\n * are available to text fields.\n */\nexport const TextArea = React.forwardRef(function TextArea(props: SpectrumTextAreaProps, ref: Ref<TextFieldRef<HTMLTextAreaElement>>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n isDisabled = false,\n isQuiet = false,\n isReadOnly = false,\n isRequired = false,\n onChange,\n ...otherProps\n } = props;\n\n // not in stately because this is so we know when to re-measure, which is a spectrum design\n let [inputValue, setInputValue] = useControlledState(props.value, props.defaultValue ?? '', () => {});\n let inputRef = useRef<HTMLTextAreaElement>(null);\n\n let onHeightChange = useCallback(() => {\n // Quiet textareas always grow based on their text content.\n // Standard textareas also grow by default, unless an explicit height is set.\n if ((isQuiet || !props.height) && inputRef.current) {\n let input = inputRef.current;\n let prevAlignment = input.style.alignSelf;\n let prevOverflow = input.style.overflow;\n // Firefox scroll position is lost when overflow: 'hidden' is applied so we skip applying it.\n // The measure/applied height is also incorrect/reset if we turn on and off\n // overflow: hidden in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1787062\n let isFirefox = 'MozAppearance' in input.style;\n if (!isFirefox) {\n input.style.overflow = 'hidden';\n }\n input.style.alignSelf = 'start';\n input.style.height = 'auto';\n // offsetHeight - clientHeight accounts for the border/padding.\n input.style.height = `${input.scrollHeight + (input.offsetHeight - input.clientHeight)}px`;\n input.style.overflow = prevOverflow;\n input.style.alignSelf = prevAlignment;\n }\n }, [isQuiet, inputRef, props.height]);\n\n useLayoutEffect(() => {\n if (inputRef.current) {\n onHeightChange();\n }\n }, [onHeightChange, inputValue, inputRef]);\n\n if (props.placeholder && process.env.NODE_ENV !== 'production') {\n 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');\n }\n\n let result = useTextField({\n ...props,\n onChange: chain(onChange, setInputValue),\n inputElementType: 'textarea'\n }, inputRef);\n\n return (\n <TextFieldBase\n {...otherProps as SpectrumTextFieldBaseProps}\n ref={ref}\n inputRef={inputRef}\n {...result}\n multiLine\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n isReadOnly={isReadOnly}\n isRequired={isRequired} />\n );\n});\n"],"names":[],"version":3,"file":"TextArea.main.js.map"}
|
package/dist/TextArea.mjs
CHANGED
@@ -62,7 +62,7 @@ const $cc187bf91f8eea73$export$f5c9f3c2c4054eec = /*#__PURE__*/ (0, $hi3T0$react
|
|
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 && process.env.NODE_ENV !== 'production') 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),
|
package/dist/TextArea.module.js
CHANGED
@@ -62,7 +62,7 @@ const $cc187bf91f8eea73$export$f5c9f3c2c4054eec = /*#__PURE__*/ (0, $hi3T0$react
|
|
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 && process.env.NODE_ENV !== 'production') 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),
|
@@ -1 +1 @@
|
|
1
|
-
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAgBM,MAAM,0DAAW,CAAA,GA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E,CAAC;YAC1F,MAAM,KAAK,CAAC,QAAQ,GAAG;YACvB,MAAM,KAAK,CAAC,SAAS,GAAG;QAC1B;IACF,GAAG;QAAC;QAAS;QAAU,MAAM,MAAM;KAAC;IAEpC,CAAA,GAAA,sBAAc,EAAE;QACd,IAAI,SAAS,OAAO,EAClB;IAEJ,GAAG;QAAC;QAAgB;QAAY;KAAS;IAEzC,IAAI,MAAM,WAAW,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAChD,QAAQ,IAAI,CAAC;IAGf,IAAI,SAAS,CAAA,GAAA,mBAAW,EAAE;QACxB,GAAG,KAAK;QACR,UAAU,CAAA,GAAA,YAAI,EAAE,UAAU;QAC1B,kBAAkB;IACpB,GAAG;IAEH,qBACE,gCAAC,CAAA,GAAA,yCAAY;QACV,GAAG,UAAU;QACd,KAAK;QACL,UAAU;QACT,GAAG,MAAM;QACV,WAAA;QACA,YAAY;QACZ,SAAS;QACT,YAAY;QACZ,YAAY;;AAElB","sources":["packages/@react-spectrum/textfield/src/TextArea.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {chain, useLayoutEffect} from '@react-aria/utils';\nimport React, {Ref, useCallback, useRef} from 'react';\nimport {SpectrumTextAreaProps, SpectrumTextFieldBaseProps, TextFieldRef} from '@react-types/textfield';\nimport {TextFieldBase} from './TextFieldBase';\nimport {useControlledState} from '@react-stately/utils';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useTextField} from '@react-aria/textfield';\n\n/**\n * TextAreas are multiline text inputs, useful for cases where users have\n * a sizable amount of text to enter. They allow for all customizations that\n * are available to text fields.\n */\nexport const TextArea = React.forwardRef(function TextArea(props: SpectrumTextAreaProps, ref: Ref<TextFieldRef<HTMLTextAreaElement>>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n let {\n isDisabled = false,\n isQuiet = false,\n isReadOnly = false,\n isRequired = false,\n onChange,\n ...otherProps\n } = props;\n\n // not in stately because this is so we know when to re-measure, which is a spectrum design\n let [inputValue, setInputValue] = useControlledState(props.value, props.defaultValue ?? '', () => {});\n let inputRef = useRef<HTMLTextAreaElement>(null);\n\n let onHeightChange = useCallback(() => {\n // Quiet textareas always grow based on their text content.\n // Standard textareas also grow by default, unless an explicit height is set.\n if ((isQuiet || !props.height) && inputRef.current) {\n let input = inputRef.current;\n let prevAlignment = input.style.alignSelf;\n let prevOverflow = input.style.overflow;\n // Firefox scroll position is lost when overflow: 'hidden' is applied so we skip applying it.\n // The measure/applied height is also incorrect/reset if we turn on and off\n // overflow: hidden in Firefox https://bugzilla.mozilla.org/show_bug.cgi?id=1787062\n let isFirefox = 'MozAppearance' in input.style;\n if (!isFirefox) {\n input.style.overflow = 'hidden';\n }\n input.style.alignSelf = 'start';\n input.style.height = 'auto';\n // offsetHeight - clientHeight accounts for the border/padding.\n input.style.height = `${input.scrollHeight + (input.offsetHeight - input.clientHeight)}px`;\n input.style.overflow = prevOverflow;\n input.style.alignSelf = prevAlignment;\n }\n }, [isQuiet, inputRef, props.height]);\n\n useLayoutEffect(() => {\n if (inputRef.current) {\n onHeightChange();\n }\n }, [onHeightChange, inputValue, inputRef]);\n\n if (props.placeholder && process.env.NODE_ENV !== 'production') {\n 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');\n }\n\n let result = useTextField({\n ...props,\n onChange: chain(onChange, setInputValue),\n inputElementType: 'textarea'\n }, inputRef);\n\n return (\n <TextFieldBase\n {...otherProps as SpectrumTextFieldBaseProps}\n ref={ref}\n inputRef={inputRef}\n {...result}\n multiLine\n isDisabled={isDisabled}\n isQuiet={isQuiet}\n isReadOnly={isReadOnly}\n isRequired={isRequired} />\n );\n});\n"],"names":[],"version":3,"file":"TextArea.module.js.map"}
|
package/dist/TextField.main.js
CHANGED
@@ -34,7 +34,7 @@ const $34fd51d50eb4b056$export$2c73285ae9390cec = /*#__PURE__*/ (0, $em8OD$react
|
|
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 && process.env.NODE_ENV !== 'production') 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,
|
@@ -1 +1 @@
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcM,MAAM,0DAAY,CAAA,GAAA,uBAAS,EAAE,SAAS,UAAU,KAA6B,EAAE,GAAsB;IAC1G,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,qCAAW,EAAE;IAErB,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAoB;IACxC,IAAI,SAAS,CAAA,GAAA,sCAAW,EAAE,OAAO;IAEjC,IAAI,MAAM,WAAW,
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcM,MAAM,0DAAY,CAAA,GAAA,uBAAS,EAAE,SAAS,UAAU,KAA6B,EAAE,GAAsB;IAC1G,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,qCAAW,EAAE;IAErB,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAoB;IACxC,IAAI,SAAS,CAAA,GAAA,sCAAW,EAAE,OAAO;IAEjC,IAAI,MAAM,WAAW,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAChD,QAAQ,IAAI,CAAC;IAGf,qBACE,0DAAC,CAAA,GAAA,uCAAY;QACV,GAAG,KAAK;QACR,GAAG,MAAM;QACV,KAAK;QACL,UAAU;;AAEhB","sources":["packages/@react-spectrum/textfield/src/TextField.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport React, {forwardRef, Ref, useRef} from 'react';\nimport {SpectrumTextFieldProps, TextFieldRef} from '@react-types/textfield';\nimport {TextFieldBase} from './TextFieldBase';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useTextField} from '@react-aria/textfield';\n\n/**\n * TextFields are text inputs that allow users to input custom text entries\n * with a keyboard. Various decorations can be displayed around the field to\n * communicate the entry requirements.\n */\nexport const TextField = forwardRef(function TextField(props: SpectrumTextFieldProps, ref: Ref<TextFieldRef>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n\n let inputRef = useRef<HTMLInputElement>(null);\n let result = useTextField(props, inputRef);\n\n if (props.placeholder && process.env.NODE_ENV !== 'production') {\n 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');\n }\n\n return (\n <TextFieldBase\n {...props}\n {...result}\n ref={ref}\n inputRef={inputRef} />\n );\n});\n"],"names":[],"version":3,"file":"TextField.main.js.map"}
|
package/dist/TextField.mjs
CHANGED
@@ -24,7 +24,7 @@ const $265457f9427aa380$export$2c73285ae9390cec = /*#__PURE__*/ (0, $9R76J$forwa
|
|
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 && process.env.NODE_ENV !== 'production') 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,
|
package/dist/TextField.module.js
CHANGED
@@ -24,7 +24,7 @@ const $265457f9427aa380$export$2c73285ae9390cec = /*#__PURE__*/ (0, $9R76J$forwa
|
|
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 && process.env.NODE_ENV !== 'production') 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,
|
@@ -1 +1 @@
|
|
1
|
-
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcM,MAAM,0DAAY,CAAA,GAAA,iBAAS,EAAE,SAAS,UAAU,KAA6B,EAAE,GAAsB;IAC1G,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,mBAAW,EAAE;IAErB,IAAI,WAAW,CAAA,GAAA,aAAK,EAAoB;IACxC,IAAI,SAAS,CAAA,GAAA,mBAAW,EAAE,OAAO;IAEjC,IAAI,MAAM,WAAW,
|
1
|
+
{"mappings":";;;;;;AAAA;;;;;;;;;;CAUC;;;;;AAcM,MAAM,0DAAY,CAAA,GAAA,iBAAS,EAAE,SAAS,UAAU,KAA6B,EAAE,GAAsB;IAC1G,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,mBAAW,EAAE;IAErB,IAAI,WAAW,CAAA,GAAA,aAAK,EAAoB;IACxC,IAAI,SAAS,CAAA,GAAA,mBAAW,EAAE,OAAO;IAEjC,IAAI,MAAM,WAAW,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAChD,QAAQ,IAAI,CAAC;IAGf,qBACE,gCAAC,CAAA,GAAA,yCAAY;QACV,GAAG,KAAK;QACR,GAAG,MAAM;QACV,KAAK;QACL,UAAU;;AAEhB","sources":["packages/@react-spectrum/textfield/src/TextField.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport React, {forwardRef, Ref, useRef} from 'react';\nimport {SpectrumTextFieldProps, TextFieldRef} from '@react-types/textfield';\nimport {TextFieldBase} from './TextFieldBase';\nimport {useFormProps} from '@react-spectrum/form';\nimport {useProviderProps} from '@react-spectrum/provider';\nimport {useTextField} from '@react-aria/textfield';\n\n/**\n * TextFields are text inputs that allow users to input custom text entries\n * with a keyboard. Various decorations can be displayed around the field to\n * communicate the entry requirements.\n */\nexport const TextField = forwardRef(function TextField(props: SpectrumTextFieldProps, ref: Ref<TextFieldRef>) {\n props = useProviderProps(props);\n props = useFormProps(props);\n\n let inputRef = useRef<HTMLInputElement>(null);\n let result = useTextField(props, inputRef);\n\n if (props.placeholder && process.env.NODE_ENV !== 'production') {\n 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');\n }\n\n return (\n <TextFieldBase\n {...props}\n {...result}\n ref={ref}\n inputRef={inputRef} />\n );\n});\n"],"names":[],"version":3,"file":"TextField.module.js.map"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require("./
|
1
|
+
require("./textfield.54643fd6.css");
|
2
2
|
var $40cb3a00c193680f$exports = require("./textfield_vars_css.main.js");
|
3
3
|
var $fWjzu$spectrumiconsuiAlertMedium = require("@spectrum-icons/ui/AlertMedium");
|
4
4
|
var $fWjzu$spectrumiconsuiCheckmarkMedium = require("@spectrum-icons/ui/CheckmarkMedium");
|
package/dist/TextFieldBase.mjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import "./
|
1
|
+
import "./textfield.54643fd6.css";
|
2
2
|
import $264pK$textfield_vars_cssmodulejs from "./textfield_vars_css.mjs";
|
3
3
|
import $264pK$spectrumiconsuiAlertMedium from "@spectrum-icons/ui/AlertMedium";
|
4
4
|
import $264pK$spectrumiconsuiCheckmarkMedium from "@spectrum-icons/ui/CheckmarkMedium";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import "./
|
1
|
+
import "./textfield.54643fd6.css";
|
2
2
|
import $264pK$textfield_vars_cssmodulejs from "./textfield_vars_css.module.js";
|
3
3
|
import $264pK$spectrumiconsuiAlertMedium from "@spectrum-icons/ui/AlertMedium";
|
4
4
|
import $264pK$spectrumiconsuiCheckmarkMedium from "@spectrum-icons/ui/CheckmarkMedium";
|
@@ -1 +1 @@
|
|
1
|
-
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;AAQE;;;;;;AAWF;;;;;;;;;;;;;;;;;;;;AA4CE;;;;;;;;AAYA;;;;;;;AAWE;;;;AAIA;;;;AAJA;;;;AAIA;;;;AAJA;;;;AAIA;;;;AAJA;;;;AAIA;;;;AAJA;;;;AAIA;;;;AAMA;;;;AAKF;;;;;AAME;;;;AAQF;;;;;AAOA;;;;;AAAA;;;;;AAOA;;;;AAIA;;;;;;;;AAUA;;;;;;;AASA;;;;AAIA;;;;AASF;;;;AAIA;;;;;AAKE;;;;AAIA;;;;;AAME;;;;AAOJ;;;;;;;;AAUE;;;;AAKF;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAOA;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AASA;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAaA;;;;AASE;;;;AAIE;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAKF;;;;;AAQF;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAME;;;;AAiBF;;;;;;AAKE;;;;AAKA;;;;;AAIE;;;;AAMF;;;;;;AAKE;;;;AAMF;;;;AAME;;;;;AAMF;;;;;;;AASE;;;;AAKA;;;;AAdF;;;;;;;AASE;;;;AAKA;;;;AAKF;;;;AAGE;;;;AAcE;;;;;AAOJ;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAME;;;;;AAMF;;;;;AAOF;;;;AAGE;;;;AAIA;;;;AAIA;;;;AAME;;;;;AASA;;;;AASJ;;;;AAIA;;;;AAKF;EACE;;;;;;;;;;;;EAUE;;;;;EAKE;;;;;;EAKE","sources":["packages/@adobe/spectrum-css-temp/components/textfield/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"
|
1
|
+
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;AAQE;;;;;;AAWF;;;;;;;;;;;;;;;;;;;;AA4CE;;;;;;;;AAYA;;;;;;;AAWE;;;;AAIA;;;;AAJA;;;;AAIA;;;;AAJA;;;;AAIA;;;;AAJA;;;;AAIA;;;;AAJA;;;;AAIA;;;;AAMA;;;;AAKF;;;;;AAME;;;;AAQF;;;;;AAOA;;;;;AAAA;;;;;AAOA;;;;AAIA;;;;;;;;AAUA;;;;;;;AASA;;;;AAIA;;;;AASF;;;;AAIA;;;;;AAKE;;;;AAIA;;;;;AAME;;;;AAOJ;;;;;;;;AAUE;;;;AAKF;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAOA;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AASA;;;;;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAaA;;;;AASE;;;;AAIE;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAKF;;;;;AAQF;;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAAA;;;;AAME;;;;AAiBF;;;;;;AAKE;;;;AAKA;;;;;AAIE;;;;AAMF;;;;;;AAKE;;;;AAMF;;;;AAME;;;;;AAMF;;;;;;;AASE;;;;AAKA;;;;AAdF;;;;;;;AASE;;;;AAKA;;;;AAKF;;;;AAGE;;;;AAcE;;;;;AAOJ;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAME;;;;;AAMF;;;;;AAOF;;;;AAGE;;;;AAIA;;;;AAIA;;;;AAME;;;;;AASA;;;;AASJ;;;;AAIA;;;;AAKF;EACE;;;;;;;;;;;;EAUE;;;;;EAKE;;;;;;EAKE","sources":["packages/@adobe/spectrum-css-temp/components/textfield/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"textfield.54643fd6.css.map"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@react-spectrum/textfield",
|
3
|
-
"version": "3.13.
|
3
|
+
"version": "3.13.2",
|
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.20.
|
40
|
-
"@react-aria/interactions": "^3.
|
41
|
-
"@react-aria/textfield": "^3.17.
|
42
|
-
"@react-aria/utils": "^3.28.
|
43
|
-
"@react-spectrum/form": "^3.7.
|
44
|
-
"@react-spectrum/label": "^3.16.
|
45
|
-
"@react-spectrum/utils": "^3.12.
|
46
|
-
"@react-stately/utils": "^3.10.
|
47
|
-
"@react-types/shared": "^3.
|
48
|
-
"@react-types/textfield": "^3.12.
|
49
|
-
"@spectrum-icons/ui": "^3.6.
|
39
|
+
"@react-aria/focus": "^3.20.2",
|
40
|
+
"@react-aria/interactions": "^3.25.0",
|
41
|
+
"@react-aria/textfield": "^3.17.2",
|
42
|
+
"@react-aria/utils": "^3.28.2",
|
43
|
+
"@react-spectrum/form": "^3.7.14",
|
44
|
+
"@react-spectrum/label": "^3.16.14",
|
45
|
+
"@react-spectrum/utils": "^3.12.4",
|
46
|
+
"@react-stately/utils": "^3.10.6",
|
47
|
+
"@react-types/shared": "^3.29.0",
|
48
|
+
"@react-types/textfield": "^3.12.1",
|
49
|
+
"@spectrum-icons/ui": "^3.6.15",
|
50
50
|
"@swc/helpers": "^0.5.0"
|
51
51
|
},
|
52
52
|
"devDependencies": {
|
@@ -61,5 +61,5 @@
|
|
61
61
|
"publishConfig": {
|
62
62
|
"access": "public"
|
63
63
|
},
|
64
|
-
"gitHead": "
|
64
|
+
"gitHead": "9b66d270572f482948afee95622a85cdf68ed408"
|
65
65
|
}
|
package/src/TextArea.tsx
CHANGED
@@ -69,7 +69,7 @@ export const TextArea = React.forwardRef(function TextArea(props: SpectrumTextAr
|
|
69
69
|
}
|
70
70
|
}, [onHeightChange, inputValue, inputRef]);
|
71
71
|
|
72
|
-
if (props.placeholder) {
|
72
|
+
if (props.placeholder && process.env.NODE_ENV !== 'production') {
|
73
73
|
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');
|
74
74
|
}
|
75
75
|
|
package/src/TextField.tsx
CHANGED
@@ -29,7 +29,7 @@ export const TextField = forwardRef(function TextField(props: SpectrumTextFieldP
|
|
29
29
|
let inputRef = useRef<HTMLInputElement>(null);
|
30
30
|
let result = useTextField(props, inputRef);
|
31
31
|
|
32
|
-
if (props.placeholder) {
|
32
|
+
if (props.placeholder && process.env.NODE_ENV !== 'production') {
|
33
33
|
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');
|
34
34
|
}
|
35
35
|
|