@react-spectrum/textfield 3.14.4 → 3.15.0

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 (210) hide show
  1. package/dist/import.mjs +4 -4
  2. package/dist/main.js +6 -6
  3. package/dist/main.js.map +1 -1
  4. package/dist/module.js +4 -4
  5. package/dist/module.js.map +1 -1
  6. package/dist/types/src/index.d.ts +5 -0
  7. package/package.json +12 -37
  8. package/src/index.ts +6 -4
  9. package/dist/TextArea.main.js +0 -103
  10. package/dist/TextArea.main.js.map +0 -1
  11. package/dist/TextArea.mjs +0 -94
  12. package/dist/TextArea.module.js +0 -94
  13. package/dist/TextArea.module.js.map +0 -1
  14. package/dist/TextField.main.js +0 -55
  15. package/dist/TextField.main.js.map +0 -1
  16. package/dist/TextField.mjs +0 -46
  17. package/dist/TextField.module.js +0 -46
  18. package/dist/TextField.module.js.map +0 -1
  19. package/dist/TextFieldBase.main.js +0 -124
  20. package/dist/TextFieldBase.main.js.map +0 -1
  21. package/dist/TextFieldBase.mjs +0 -119
  22. package/dist/TextFieldBase.module.js +0 -119
  23. package/dist/TextFieldBase.module.js.map +0 -1
  24. package/dist/ar-AE.main.js +0 -6
  25. package/dist/ar-AE.main.js.map +0 -1
  26. package/dist/ar-AE.mjs +0 -8
  27. package/dist/ar-AE.module.js +0 -8
  28. package/dist/ar-AE.module.js.map +0 -1
  29. package/dist/bg-BG.main.js +0 -6
  30. package/dist/bg-BG.main.js.map +0 -1
  31. package/dist/bg-BG.mjs +0 -8
  32. package/dist/bg-BG.module.js +0 -8
  33. package/dist/bg-BG.module.js.map +0 -1
  34. package/dist/cs-CZ.main.js +0 -6
  35. package/dist/cs-CZ.main.js.map +0 -1
  36. package/dist/cs-CZ.mjs +0 -8
  37. package/dist/cs-CZ.module.js +0 -8
  38. package/dist/cs-CZ.module.js.map +0 -1
  39. package/dist/da-DK.main.js +0 -6
  40. package/dist/da-DK.main.js.map +0 -1
  41. package/dist/da-DK.mjs +0 -8
  42. package/dist/da-DK.module.js +0 -8
  43. package/dist/da-DK.module.js.map +0 -1
  44. package/dist/de-DE.main.js +0 -6
  45. package/dist/de-DE.main.js.map +0 -1
  46. package/dist/de-DE.mjs +0 -8
  47. package/dist/de-DE.module.js +0 -8
  48. package/dist/de-DE.module.js.map +0 -1
  49. package/dist/el-GR.main.js +0 -6
  50. package/dist/el-GR.main.js.map +0 -1
  51. package/dist/el-GR.mjs +0 -8
  52. package/dist/el-GR.module.js +0 -8
  53. package/dist/el-GR.module.js.map +0 -1
  54. package/dist/en-US.main.js +0 -6
  55. package/dist/en-US.main.js.map +0 -1
  56. package/dist/en-US.mjs +0 -8
  57. package/dist/en-US.module.js +0 -8
  58. package/dist/en-US.module.js.map +0 -1
  59. package/dist/es-ES.main.js +0 -6
  60. package/dist/es-ES.main.js.map +0 -1
  61. package/dist/es-ES.mjs +0 -8
  62. package/dist/es-ES.module.js +0 -8
  63. package/dist/es-ES.module.js.map +0 -1
  64. package/dist/et-EE.main.js +0 -6
  65. package/dist/et-EE.main.js.map +0 -1
  66. package/dist/et-EE.mjs +0 -8
  67. package/dist/et-EE.module.js +0 -8
  68. package/dist/et-EE.module.js.map +0 -1
  69. package/dist/fi-FI.main.js +0 -6
  70. package/dist/fi-FI.main.js.map +0 -1
  71. package/dist/fi-FI.mjs +0 -8
  72. package/dist/fi-FI.module.js +0 -8
  73. package/dist/fi-FI.module.js.map +0 -1
  74. package/dist/fr-FR.main.js +0 -6
  75. package/dist/fr-FR.main.js.map +0 -1
  76. package/dist/fr-FR.mjs +0 -8
  77. package/dist/fr-FR.module.js +0 -8
  78. package/dist/fr-FR.module.js.map +0 -1
  79. package/dist/he-IL.main.js +0 -6
  80. package/dist/he-IL.main.js.map +0 -1
  81. package/dist/he-IL.mjs +0 -8
  82. package/dist/he-IL.module.js +0 -8
  83. package/dist/he-IL.module.js.map +0 -1
  84. package/dist/hr-HR.main.js +0 -6
  85. package/dist/hr-HR.main.js.map +0 -1
  86. package/dist/hr-HR.mjs +0 -8
  87. package/dist/hr-HR.module.js +0 -8
  88. package/dist/hr-HR.module.js.map +0 -1
  89. package/dist/hu-HU.main.js +0 -6
  90. package/dist/hu-HU.main.js.map +0 -1
  91. package/dist/hu-HU.mjs +0 -8
  92. package/dist/hu-HU.module.js +0 -8
  93. package/dist/hu-HU.module.js.map +0 -1
  94. package/dist/intlStrings.main.js +0 -108
  95. package/dist/intlStrings.main.js.map +0 -1
  96. package/dist/intlStrings.mjs +0 -110
  97. package/dist/intlStrings.module.js +0 -110
  98. package/dist/intlStrings.module.js.map +0 -1
  99. package/dist/it-IT.main.js +0 -6
  100. package/dist/it-IT.main.js.map +0 -1
  101. package/dist/it-IT.mjs +0 -8
  102. package/dist/it-IT.module.js +0 -8
  103. package/dist/it-IT.module.js.map +0 -1
  104. package/dist/ja-JP.main.js +0 -6
  105. package/dist/ja-JP.main.js.map +0 -1
  106. package/dist/ja-JP.mjs +0 -8
  107. package/dist/ja-JP.module.js +0 -8
  108. package/dist/ja-JP.module.js.map +0 -1
  109. package/dist/ko-KR.main.js +0 -6
  110. package/dist/ko-KR.main.js.map +0 -1
  111. package/dist/ko-KR.mjs +0 -8
  112. package/dist/ko-KR.module.js +0 -8
  113. package/dist/ko-KR.module.js.map +0 -1
  114. package/dist/lt-LT.main.js +0 -6
  115. package/dist/lt-LT.main.js.map +0 -1
  116. package/dist/lt-LT.mjs +0 -8
  117. package/dist/lt-LT.module.js +0 -8
  118. package/dist/lt-LT.module.js.map +0 -1
  119. package/dist/lv-LV.main.js +0 -6
  120. package/dist/lv-LV.main.js.map +0 -1
  121. package/dist/lv-LV.mjs +0 -8
  122. package/dist/lv-LV.module.js +0 -8
  123. package/dist/lv-LV.module.js.map +0 -1
  124. package/dist/nb-NO.main.js +0 -6
  125. package/dist/nb-NO.main.js.map +0 -1
  126. package/dist/nb-NO.mjs +0 -8
  127. package/dist/nb-NO.module.js +0 -8
  128. package/dist/nb-NO.module.js.map +0 -1
  129. package/dist/nl-NL.main.js +0 -6
  130. package/dist/nl-NL.main.js.map +0 -1
  131. package/dist/nl-NL.mjs +0 -8
  132. package/dist/nl-NL.module.js +0 -8
  133. package/dist/nl-NL.module.js.map +0 -1
  134. package/dist/pl-PL.main.js +0 -6
  135. package/dist/pl-PL.main.js.map +0 -1
  136. package/dist/pl-PL.mjs +0 -8
  137. package/dist/pl-PL.module.js +0 -8
  138. package/dist/pl-PL.module.js.map +0 -1
  139. package/dist/pt-BR.main.js +0 -6
  140. package/dist/pt-BR.main.js.map +0 -1
  141. package/dist/pt-BR.mjs +0 -8
  142. package/dist/pt-BR.module.js +0 -8
  143. package/dist/pt-BR.module.js.map +0 -1
  144. package/dist/pt-PT.main.js +0 -6
  145. package/dist/pt-PT.main.js.map +0 -1
  146. package/dist/pt-PT.mjs +0 -8
  147. package/dist/pt-PT.module.js +0 -8
  148. package/dist/pt-PT.module.js.map +0 -1
  149. package/dist/ro-RO.main.js +0 -6
  150. package/dist/ro-RO.main.js.map +0 -1
  151. package/dist/ro-RO.mjs +0 -8
  152. package/dist/ro-RO.module.js +0 -8
  153. package/dist/ro-RO.module.js.map +0 -1
  154. package/dist/ru-RU.main.js +0 -6
  155. package/dist/ru-RU.main.js.map +0 -1
  156. package/dist/ru-RU.mjs +0 -8
  157. package/dist/ru-RU.module.js +0 -8
  158. package/dist/ru-RU.module.js.map +0 -1
  159. package/dist/sk-SK.main.js +0 -6
  160. package/dist/sk-SK.main.js.map +0 -1
  161. package/dist/sk-SK.mjs +0 -8
  162. package/dist/sk-SK.module.js +0 -8
  163. package/dist/sk-SK.module.js.map +0 -1
  164. package/dist/sl-SI.main.js +0 -6
  165. package/dist/sl-SI.main.js.map +0 -1
  166. package/dist/sl-SI.mjs +0 -8
  167. package/dist/sl-SI.module.js +0 -8
  168. package/dist/sl-SI.module.js.map +0 -1
  169. package/dist/sr-SP.main.js +0 -6
  170. package/dist/sr-SP.main.js.map +0 -1
  171. package/dist/sr-SP.mjs +0 -8
  172. package/dist/sr-SP.module.js +0 -8
  173. package/dist/sr-SP.module.js.map +0 -1
  174. package/dist/sv-SE.main.js +0 -6
  175. package/dist/sv-SE.main.js.map +0 -1
  176. package/dist/sv-SE.mjs +0 -8
  177. package/dist/sv-SE.module.js +0 -8
  178. package/dist/sv-SE.module.js.map +0 -1
  179. package/dist/textfield.54643fd6.css +0 -550
  180. package/dist/textfield.54643fd6.css.map +0 -1
  181. package/dist/textfield_vars_css.main.js +0 -74
  182. package/dist/textfield_vars_css.main.js.map +0 -1
  183. package/dist/textfield_vars_css.mjs +0 -76
  184. package/dist/textfield_vars_css.module.js +0 -76
  185. package/dist/textfield_vars_css.module.js.map +0 -1
  186. package/dist/tr-TR.main.js +0 -6
  187. package/dist/tr-TR.main.js.map +0 -1
  188. package/dist/tr-TR.mjs +0 -8
  189. package/dist/tr-TR.module.js +0 -8
  190. package/dist/tr-TR.module.js.map +0 -1
  191. package/dist/types.d.ts +0 -33
  192. package/dist/types.d.ts.map +0 -1
  193. package/dist/uk-UA.main.js +0 -6
  194. package/dist/uk-UA.main.js.map +0 -1
  195. package/dist/uk-UA.mjs +0 -8
  196. package/dist/uk-UA.module.js +0 -8
  197. package/dist/uk-UA.module.js.map +0 -1
  198. package/dist/zh-CN.main.js +0 -6
  199. package/dist/zh-CN.main.js.map +0 -1
  200. package/dist/zh-CN.mjs +0 -8
  201. package/dist/zh-CN.module.js +0 -8
  202. package/dist/zh-CN.module.js.map +0 -1
  203. package/dist/zh-TW.main.js +0 -6
  204. package/dist/zh-TW.main.js.map +0 -1
  205. package/dist/zh-TW.mjs +0 -8
  206. package/dist/zh-TW.module.js +0 -8
  207. package/dist/zh-TW.module.js.map +0 -1
  208. package/src/TextArea.tsx +0 -98
  209. package/src/TextField.tsx +0 -47
  210. package/src/TextFieldBase.tsx +0 -182
package/dist/import.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import {TextArea as $cc187bf91f8eea73$export$f5c9f3c2c4054eec} from "./TextArea.mjs";
2
- import {TextField as $265457f9427aa380$export$2c73285ae9390cec} from "./TextField.mjs";
3
- import {TextFieldBase as $599adb75312e6492$export$d22444a338b6e3c2} from "./TextFieldBase.mjs";
1
+ import {TextArea as $8a23995ae20d097c$re_export$TextArea} from "@adobe/react-spectrum/TextArea";
2
+ import {TextField as $8a23995ae20d097c$re_export$TextField} from "@adobe/react-spectrum/TextField";
3
+ import {TextFieldBase as $8a23995ae20d097c$re_export$TextFieldBase} from "@adobe/react-spectrum/private/textfield/TextFieldBase";
4
4
 
5
5
  /*
6
6
  * Copyright 2020 Adobe. All rights reserved.
@@ -18,5 +18,5 @@ import {TextFieldBase as $599adb75312e6492$export$d22444a338b6e3c2} from "./Text
18
18
 
19
19
 
20
20
 
21
- export {$cc187bf91f8eea73$export$f5c9f3c2c4054eec as TextArea, $265457f9427aa380$export$2c73285ae9390cec as TextField, $599adb75312e6492$export$d22444a338b6e3c2 as TextFieldBase};
21
+ export {$8a23995ae20d097c$re_export$TextArea as TextArea, $8a23995ae20d097c$re_export$TextField as TextField, $8a23995ae20d097c$re_export$TextFieldBase as TextFieldBase};
22
22
  //# sourceMappingURL=module.js.map
package/dist/main.js CHANGED
@@ -1,15 +1,15 @@
1
- var $eec649e464f3832d$exports = require("./TextArea.main.js");
2
- var $34fd51d50eb4b056$exports = require("./TextField.main.js");
3
- var $86793250183ac29e$exports = require("./TextFieldBase.main.js");
1
+ var $j3ieA$adobereactspectrumTextArea = require("@adobe/react-spectrum/TextArea");
2
+ var $j3ieA$adobereactspectrumTextField = require("@adobe/react-spectrum/TextField");
3
+ var $j3ieA$adobereactspectrumprivatetextfieldTextFieldBase = require("@adobe/react-spectrum/private/textfield/TextFieldBase");
4
4
 
5
5
 
6
6
  function $parcel$export(e, n, v, s) {
7
7
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
8
8
  }
9
9
 
10
- $parcel$export(module.exports, "TextArea", () => $eec649e464f3832d$exports.TextArea);
11
- $parcel$export(module.exports, "TextField", () => $34fd51d50eb4b056$exports.TextField);
12
- $parcel$export(module.exports, "TextFieldBase", () => $86793250183ac29e$exports.TextFieldBase);
10
+ $parcel$export(module.exports, "TextArea", function () { return $j3ieA$adobereactspectrumTextArea.TextArea; });
11
+ $parcel$export(module.exports, "TextField", function () { return $j3ieA$adobereactspectrumTextField.TextField; });
12
+ $parcel$export(module.exports, "TextFieldBase", function () { return $j3ieA$adobereactspectrumprivatetextfieldTextFieldBase.TextFieldBase; });
13
13
  /*
14
14
  * Copyright 2020 Adobe. All rights reserved.
15
15
  * This file is licensed to you under the Apache License, Version 2.0 (the "License");
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/textfield/src/index.ts"],"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/// <reference types=\"css-module-types\" />\n\nexport {TextArea} from './TextArea';\nexport {TextField} from './TextField';\nexport {TextFieldBase} from './TextFieldBase';\nexport type {SpectrumTextFieldProps, SpectrumTextAreaProps} from '@react-types/textfield';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/textfield/src/index.ts"],"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/// <reference types=\"css-module-types\" />\n\nexport {TextArea} from '@adobe/react-spectrum/TextArea';\n\nexport {TextField} from '@adobe/react-spectrum/TextField';\nexport {TextFieldBase} from '@adobe/react-spectrum/private/textfield/TextFieldBase';\nexport type {SpectrumTextFieldProps, TextFieldRef} from '@adobe/react-spectrum/TextField';\nexport type {SpectrumTextAreaProps} from '@adobe/react-spectrum/TextArea';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,6 +1,6 @@
1
- import {TextArea as $cc187bf91f8eea73$export$f5c9f3c2c4054eec} from "./TextArea.module.js";
2
- import {TextField as $265457f9427aa380$export$2c73285ae9390cec} from "./TextField.module.js";
3
- import {TextFieldBase as $599adb75312e6492$export$d22444a338b6e3c2} from "./TextFieldBase.module.js";
1
+ import {TextArea as $8a23995ae20d097c$re_export$TextArea} from "@adobe/react-spectrum/TextArea";
2
+ import {TextField as $8a23995ae20d097c$re_export$TextField} from "@adobe/react-spectrum/TextField";
3
+ import {TextFieldBase as $8a23995ae20d097c$re_export$TextFieldBase} from "@adobe/react-spectrum/private/textfield/TextFieldBase";
4
4
 
5
5
  /*
6
6
  * Copyright 2020 Adobe. All rights reserved.
@@ -18,5 +18,5 @@ import {TextFieldBase as $599adb75312e6492$export$d22444a338b6e3c2} from "./Text
18
18
 
19
19
 
20
20
 
21
- export {$cc187bf91f8eea73$export$f5c9f3c2c4054eec as TextArea, $265457f9427aa380$export$2c73285ae9390cec as TextField, $599adb75312e6492$export$d22444a338b6e3c2 as TextFieldBase};
21
+ export {$8a23995ae20d097c$re_export$TextArea as TextArea, $8a23995ae20d097c$re_export$TextField as TextField, $8a23995ae20d097c$re_export$TextFieldBase as TextFieldBase};
22
22
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/textfield/src/index.ts"],"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/// <reference types=\"css-module-types\" />\n\nexport {TextArea} from './TextArea';\nexport {TextField} from './TextField';\nexport {TextFieldBase} from './TextFieldBase';\nexport type {SpectrumTextFieldProps, SpectrumTextAreaProps} from '@react-types/textfield';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/textfield/src/index.ts"],"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/// <reference types=\"css-module-types\" />\n\nexport {TextArea} from '@adobe/react-spectrum/TextArea';\n\nexport {TextField} from '@adobe/react-spectrum/TextField';\nexport {TextFieldBase} from '@adobe/react-spectrum/private/textfield/TextFieldBase';\nexport type {SpectrumTextFieldProps, TextFieldRef} from '@adobe/react-spectrum/TextField';\nexport type {SpectrumTextAreaProps} from '@adobe/react-spectrum/TextArea';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -0,0 +1,5 @@
1
+ export { TextArea } from '@adobe/react-spectrum/TextArea';
2
+ export { TextField } from '@adobe/react-spectrum/TextField';
3
+ export { TextFieldBase } from '@adobe/react-spectrum/private/textfield/TextFieldBase';
4
+ export type { SpectrumTextFieldProps, TextFieldRef } from '@adobe/react-spectrum/TextField';
5
+ export type { SpectrumTextAreaProps } from '@adobe/react-spectrum/TextArea';
package/package.json CHANGED
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "@react-spectrum/textfield",
3
- "version": "3.14.4",
3
+ "version": "3.15.0",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
7
7
  "module": "dist/module.js",
8
8
  "exports": {
9
- "source": "./src/index.ts",
10
- "types": [
11
- "./dist/types.d.ts",
12
- "./src/index.ts"
13
- ],
14
- "import": "./dist/import.mjs",
15
- "require": "./dist/main.js"
9
+ ".": {
10
+ "source": "./src/index.ts",
11
+ "types": "./dist/types/src/index.d.ts",
12
+ "import": "./dist/import.mjs",
13
+ "require": "./dist/main.js"
14
+ },
15
+ "./package.json": "./package.json"
16
16
  },
17
- "types": "dist/types.d.ts",
17
+ "types": "dist/types/src/index.d.ts",
18
18
  "source": "src/index.ts",
19
19
  "files": [
20
20
  "dist",
@@ -24,47 +24,22 @@
24
24
  "*.css"
25
25
  ],
26
26
  "targets": {
27
- "main": {
28
- "includeNodeModules": [
29
- "@adobe/spectrum-css-temp"
30
- ]
31
- },
32
- "module": {
33
- "includeNodeModules": [
34
- "@adobe/spectrum-css-temp"
35
- ]
36
- }
27
+ "types": false
37
28
  },
38
29
  "repository": {
39
30
  "type": "git",
40
31
  "url": "https://github.com/adobe/react-spectrum"
41
32
  },
42
33
  "dependencies": {
43
- "@react-aria/focus": "^3.21.4",
44
- "@react-aria/i18n": "^3.12.15",
45
- "@react-aria/interactions": "^3.27.0",
46
- "@react-aria/textfield": "^3.18.4",
47
- "@react-aria/utils": "^3.33.0",
48
- "@react-spectrum/form": "^3.7.21",
49
- "@react-spectrum/label": "^3.16.21",
50
- "@react-spectrum/utils": "^3.12.11",
51
- "@react-stately/utils": "^3.11.0",
52
- "@react-types/shared": "^3.33.0",
53
- "@react-types/textfield": "^3.12.7",
54
- "@spectrum-icons/ui": "^3.6.22",
34
+ "@adobe/react-spectrum": "3.47.0",
55
35
  "@swc/helpers": "^0.5.0"
56
36
  },
57
- "devDependencies": {
58
- "@adobe/spectrum-css-temp": "3.0.0-alpha.1",
59
- "@spectrum-icons/workflow": "^4.0.0"
60
- },
61
37
  "peerDependencies": {
62
- "@react-spectrum/provider": "^3.0.0",
63
38
  "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
64
39
  "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
65
40
  },
66
41
  "publishConfig": {
67
42
  "access": "public"
68
43
  },
69
- "gitHead": "66e51757606b43a89ed02c574ca24517323a2ab9"
44
+ "gitHead": "a6999bdf494a2e9c0381a5881908328bdd22ddae"
70
45
  }
package/src/index.ts CHANGED
@@ -12,7 +12,9 @@
12
12
 
13
13
  /// <reference types="css-module-types" />
14
14
 
15
- export {TextArea} from './TextArea';
16
- export {TextField} from './TextField';
17
- export {TextFieldBase} from './TextFieldBase';
18
- export type {SpectrumTextFieldProps, SpectrumTextAreaProps} from '@react-types/textfield';
15
+ export {TextArea} from '@adobe/react-spectrum/TextArea';
16
+
17
+ export {TextField} from '@adobe/react-spectrum/TextField';
18
+ export {TextFieldBase} from '@adobe/react-spectrum/private/textfield/TextFieldBase';
19
+ export type {SpectrumTextFieldProps, TextFieldRef} from '@adobe/react-spectrum/TextField';
20
+ export type {SpectrumTextAreaProps} from '@adobe/react-spectrum/TextArea';
@@ -1,103 +0,0 @@
1
- var $86793250183ac29e$exports = require("./TextFieldBase.main.js");
2
- var $5VIId$reactariautils = require("@react-aria/utils");
3
- var $5VIId$react = require("react");
4
- var $5VIId$reactstatelyutils = require("@react-stately/utils");
5
- var $5VIId$reactspectrumform = require("@react-spectrum/form");
6
- var $5VIId$reactspectrumprovider = require("@react-spectrum/provider");
7
- var $5VIId$reactariatextfield = require("@react-aria/textfield");
8
-
9
-
10
- function $parcel$interopDefault(a) {
11
- return a && a.__esModule ? a.default : a;
12
- }
13
-
14
- function $parcel$export(e, n, v, s) {
15
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
16
- }
17
-
18
- $parcel$export(module.exports, "TextArea", () => $eec649e464f3832d$export$f5c9f3c2c4054eec);
19
- /*
20
- * Copyright 2020 Adobe. All rights reserved.
21
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
22
- * you may not use this file except in compliance with the License. You may obtain a copy
23
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
24
- *
25
- * Unless required by applicable law or agreed to in writing, software distributed under
26
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
27
- * OF ANY KIND, either express or implied. See the License for the specific language
28
- * governing permissions and limitations under the License.
29
- */
30
-
31
-
32
-
33
-
34
-
35
-
36
- const $eec649e464f3832d$export$f5c9f3c2c4054eec = /*#__PURE__*/ (0, ($parcel$interopDefault($5VIId$react))).forwardRef(function TextArea(props, ref) {
37
- props = (0, $5VIId$reactspectrumprovider.useProviderProps)(props);
38
- props = (0, $5VIId$reactspectrumform.useFormProps)(props);
39
- let { isDisabled: isDisabled = false, isQuiet: isQuiet = false, isReadOnly: isReadOnly = false, isRequired: isRequired = false, onChange: onChange, ...otherProps } = props;
40
- var _props_defaultValue;
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 : '', ()=>{});
43
- let inputRef = (0, $5VIId$react.useRef)(null);
44
- let onHeightChange = (0, $5VIId$react.useCallback)(()=>{
45
- // Quiet textareas always grow based on their text content.
46
- // Standard textareas also grow by default, unless an explicit height is set.
47
- if ((isQuiet || !props.height) && inputRef.current) {
48
- let input = inputRef.current;
49
- let prevAlignment = input.style.alignSelf;
50
- let prevOverflow = input.style.overflow;
51
- // Firefox scroll position is lost when overflow: 'hidden' is applied so we skip applying it.
52
- // The measure/applied height is also incorrect/reset if we turn on and off
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';
58
- // offsetHeight - clientHeight accounts for the border/padding.
59
- input.style.height = `${input.scrollHeight + (input.offsetHeight - input.clientHeight)}px`;
60
- input.style.overflow = prevOverflow;
61
- input.style.alignSelf = prevAlignment;
62
- }
63
- }, [
64
- isQuiet,
65
- inputRef,
66
- props.height
67
- ]);
68
- (0, $5VIId$reactariautils.useLayoutEffect)(()=>{
69
- if (inputRef.current) onHeightChange();
70
- }, [
71
- onHeightChange,
72
- inputValue,
73
- inputRef
74
- ]);
75
- let hasWarned = (0, $5VIId$react.useRef)(false);
76
- (0, $5VIId$react.useEffect)(()=>{
77
- if (props.placeholder && !hasWarned.current && process.env.NODE_ENV !== 'production') {
78
- 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');
79
- hasWarned.current = true;
80
- }
81
- }, [
82
- props.placeholder
83
- ]);
84
- let result = (0, $5VIId$reactariatextfield.useTextField)({
85
- ...props,
86
- onChange: (0, $5VIId$reactariautils.chain)(onChange, setInputValue),
87
- inputElementType: 'textarea'
88
- }, inputRef);
89
- return /*#__PURE__*/ (0, ($parcel$interopDefault($5VIId$react))).createElement((0, $86793250183ac29e$exports.TextFieldBase), {
90
- ...otherProps,
91
- ref: ref,
92
- inputRef: inputRef,
93
- ...result,
94
- multiLine: true,
95
- isDisabled: isDisabled,
96
- isQuiet: isQuiet,
97
- isReadOnly: isReadOnly,
98
- isRequired: isRequired
99
- });
100
- });
101
-
102
-
103
- //# sourceMappingURL=TextArea.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAgBM,MAAM,0DAAW,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,SAAS,KAA4B,EAAE,GAA2C;IAClI,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,qCAAW,EAAE;IACrB,IAAI,cACF,aAAa,gBACb,UAAU,mBACV,aAAa,mBACb,aAAa,iBACb,QAAQ,EACR,GAAG,YACJ,GAAG;QAG8D;IADlE,2FAA2F;IAC3F,IAAI,CAAC,YAAY,cAAc,GAAG,CAAA,GAAA,2CAAiB,EAAE,MAAM,KAAK,EAAE,CAAA,sBAAA,MAAM,YAAY,cAAlB,iCAAA,sBAAsB,IAAI,KAAO;IACnG,IAAI,WAAW,CAAA,GAAA,mBAAK,EAAuB;IAE3C,IAAI,iBAAiB,CAAA,GAAA,wBAAU,EAAE;QAC/B,2DAA2D;QAC3D,6EAA6E;QAC7E,IAAI,AAAC,CAAA,WAAW,CAAC,MAAM,MAAM,AAAD,KAAM,SAAS,OAAO,EAAE;YAClD,IAAI,QAAQ,SAAS,OAAO;YAC5B,IAAI,gBAAgB,MAAM,KAAK,CAAC,SAAS;YACzC,IAAI,eAAe,MAAM,KAAK,CAAC,QAAQ;YACvC,6FAA6F;YAC7F,2EAA2E;YAC3E,mFAAmF;YACnF,IAAI,YAAY,mBAAmB,MAAM,KAAK;YAC9C,IAAI,CAAC,WACH,MAAM,KAAK,CAAC,QAAQ,GAAG;YAEzB,MAAM,KAAK,CAAC,SAAS,GAAG;YACxB,MAAM,KAAK,CAAC,MAAM,GAAG;YACrB,+DAA+D;YAC/D,MAAM,KAAK,CAAC,MAAM,GAAG,GAAG,MAAM,YAAY,GAAI,CAAA,MAAM,YAAY,GAAG,MAAM,YAAY,AAAD,EAAG,EAAE,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,qCAAc,EAAE;QACd,IAAI,SAAS,OAAO,EAClB;IAEJ,GAAG;QAAC;QAAgB;QAAY;KAAS;IAEzC,IAAI,YAAY,CAAA,GAAA,mBAAK,EAAE;IACvB,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,MAAM,WAAW,IAAI,CAAC,UAAU,OAAO,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAAc;YACpF,QAAQ,IAAI,CAAC;YACb,UAAU,OAAO,GAAG;QACtB;IACF,GAAG;QAAC,MAAM,WAAW;KAAC;IAEtB,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, useEffect, 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 let hasWarned = useRef(false);\n useEffect(() => {\n if (props.placeholder && !hasWarned.current && 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 hasWarned.current = true;\n }\n }, [props.placeholder]);\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 DELETED
@@ -1,94 +0,0 @@
1
- import {TextFieldBase as $599adb75312e6492$export$d22444a338b6e3c2} from "./TextFieldBase.mjs";
2
- import {useLayoutEffect as $hi3T0$useLayoutEffect, chain as $hi3T0$chain} from "@react-aria/utils";
3
- import $hi3T0$react, {useRef as $hi3T0$useRef, useCallback as $hi3T0$useCallback, useEffect as $hi3T0$useEffect} from "react";
4
- import {useControlledState as $hi3T0$useControlledState} from "@react-stately/utils";
5
- import {useFormProps as $hi3T0$useFormProps} from "@react-spectrum/form";
6
- import {useProviderProps as $hi3T0$useProviderProps} from "@react-spectrum/provider";
7
- import {useTextField as $hi3T0$useTextField} from "@react-aria/textfield";
8
-
9
- /*
10
- * Copyright 2020 Adobe. All rights reserved.
11
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
12
- * you may not use this file except in compliance with the License. You may obtain a copy
13
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software distributed under
16
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
17
- * OF ANY KIND, either express or implied. See the License for the specific language
18
- * governing permissions and limitations under the License.
19
- */
20
-
21
-
22
-
23
-
24
-
25
-
26
- const $cc187bf91f8eea73$export$f5c9f3c2c4054eec = /*#__PURE__*/ (0, $hi3T0$react).forwardRef(function TextArea(props, ref) {
27
- props = (0, $hi3T0$useProviderProps)(props);
28
- props = (0, $hi3T0$useFormProps)(props);
29
- let { isDisabled: isDisabled = false, isQuiet: isQuiet = false, isReadOnly: isReadOnly = false, isRequired: isRequired = false, onChange: onChange, ...otherProps } = props;
30
- var _props_defaultValue;
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 : '', ()=>{});
33
- let inputRef = (0, $hi3T0$useRef)(null);
34
- let onHeightChange = (0, $hi3T0$useCallback)(()=>{
35
- // Quiet textareas always grow based on their text content.
36
- // Standard textareas also grow by default, unless an explicit height is set.
37
- if ((isQuiet || !props.height) && inputRef.current) {
38
- let input = inputRef.current;
39
- let prevAlignment = input.style.alignSelf;
40
- let prevOverflow = input.style.overflow;
41
- // Firefox scroll position is lost when overflow: 'hidden' is applied so we skip applying it.
42
- // The measure/applied height is also incorrect/reset if we turn on and off
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';
48
- // offsetHeight - clientHeight accounts for the border/padding.
49
- input.style.height = `${input.scrollHeight + (input.offsetHeight - input.clientHeight)}px`;
50
- input.style.overflow = prevOverflow;
51
- input.style.alignSelf = prevAlignment;
52
- }
53
- }, [
54
- isQuiet,
55
- inputRef,
56
- props.height
57
- ]);
58
- (0, $hi3T0$useLayoutEffect)(()=>{
59
- if (inputRef.current) onHeightChange();
60
- }, [
61
- onHeightChange,
62
- inputValue,
63
- inputRef
64
- ]);
65
- let hasWarned = (0, $hi3T0$useRef)(false);
66
- (0, $hi3T0$useEffect)(()=>{
67
- if (props.placeholder && !hasWarned.current && process.env.NODE_ENV !== 'production') {
68
- 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');
69
- hasWarned.current = true;
70
- }
71
- }, [
72
- props.placeholder
73
- ]);
74
- let result = (0, $hi3T0$useTextField)({
75
- ...props,
76
- onChange: (0, $hi3T0$chain)(onChange, setInputValue),
77
- inputElementType: 'textarea'
78
- }, inputRef);
79
- return /*#__PURE__*/ (0, $hi3T0$react).createElement((0, $599adb75312e6492$export$d22444a338b6e3c2), {
80
- ...otherProps,
81
- ref: ref,
82
- inputRef: inputRef,
83
- ...result,
84
- multiLine: true,
85
- isDisabled: isDisabled,
86
- isQuiet: isQuiet,
87
- isReadOnly: isReadOnly,
88
- isRequired: isRequired
89
- });
90
- });
91
-
92
-
93
- export {$cc187bf91f8eea73$export$f5c9f3c2c4054eec as TextArea};
94
- //# sourceMappingURL=TextArea.module.js.map
@@ -1,94 +0,0 @@
1
- import {TextFieldBase as $599adb75312e6492$export$d22444a338b6e3c2} from "./TextFieldBase.module.js";
2
- import {useLayoutEffect as $hi3T0$useLayoutEffect, chain as $hi3T0$chain} from "@react-aria/utils";
3
- import $hi3T0$react, {useRef as $hi3T0$useRef, useCallback as $hi3T0$useCallback, useEffect as $hi3T0$useEffect} from "react";
4
- import {useControlledState as $hi3T0$useControlledState} from "@react-stately/utils";
5
- import {useFormProps as $hi3T0$useFormProps} from "@react-spectrum/form";
6
- import {useProviderProps as $hi3T0$useProviderProps} from "@react-spectrum/provider";
7
- import {useTextField as $hi3T0$useTextField} from "@react-aria/textfield";
8
-
9
- /*
10
- * Copyright 2020 Adobe. All rights reserved.
11
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
12
- * you may not use this file except in compliance with the License. You may obtain a copy
13
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software distributed under
16
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
17
- * OF ANY KIND, either express or implied. See the License for the specific language
18
- * governing permissions and limitations under the License.
19
- */
20
-
21
-
22
-
23
-
24
-
25
-
26
- const $cc187bf91f8eea73$export$f5c9f3c2c4054eec = /*#__PURE__*/ (0, $hi3T0$react).forwardRef(function TextArea(props, ref) {
27
- props = (0, $hi3T0$useProviderProps)(props);
28
- props = (0, $hi3T0$useFormProps)(props);
29
- let { isDisabled: isDisabled = false, isQuiet: isQuiet = false, isReadOnly: isReadOnly = false, isRequired: isRequired = false, onChange: onChange, ...otherProps } = props;
30
- var _props_defaultValue;
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 : '', ()=>{});
33
- let inputRef = (0, $hi3T0$useRef)(null);
34
- let onHeightChange = (0, $hi3T0$useCallback)(()=>{
35
- // Quiet textareas always grow based on their text content.
36
- // Standard textareas also grow by default, unless an explicit height is set.
37
- if ((isQuiet || !props.height) && inputRef.current) {
38
- let input = inputRef.current;
39
- let prevAlignment = input.style.alignSelf;
40
- let prevOverflow = input.style.overflow;
41
- // Firefox scroll position is lost when overflow: 'hidden' is applied so we skip applying it.
42
- // The measure/applied height is also incorrect/reset if we turn on and off
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';
48
- // offsetHeight - clientHeight accounts for the border/padding.
49
- input.style.height = `${input.scrollHeight + (input.offsetHeight - input.clientHeight)}px`;
50
- input.style.overflow = prevOverflow;
51
- input.style.alignSelf = prevAlignment;
52
- }
53
- }, [
54
- isQuiet,
55
- inputRef,
56
- props.height
57
- ]);
58
- (0, $hi3T0$useLayoutEffect)(()=>{
59
- if (inputRef.current) onHeightChange();
60
- }, [
61
- onHeightChange,
62
- inputValue,
63
- inputRef
64
- ]);
65
- let hasWarned = (0, $hi3T0$useRef)(false);
66
- (0, $hi3T0$useEffect)(()=>{
67
- if (props.placeholder && !hasWarned.current && process.env.NODE_ENV !== 'production') {
68
- 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');
69
- hasWarned.current = true;
70
- }
71
- }, [
72
- props.placeholder
73
- ]);
74
- let result = (0, $hi3T0$useTextField)({
75
- ...props,
76
- onChange: (0, $hi3T0$chain)(onChange, setInputValue),
77
- inputElementType: 'textarea'
78
- }, inputRef);
79
- return /*#__PURE__*/ (0, $hi3T0$react).createElement((0, $599adb75312e6492$export$d22444a338b6e3c2), {
80
- ...otherProps,
81
- ref: ref,
82
- inputRef: inputRef,
83
- ...result,
84
- multiLine: true,
85
- isDisabled: isDisabled,
86
- isQuiet: isQuiet,
87
- isReadOnly: isReadOnly,
88
- isRequired: isRequired
89
- });
90
- });
91
-
92
-
93
- export {$cc187bf91f8eea73$export$f5c9f3c2c4054eec as TextArea};
94
- //# sourceMappingURL=TextArea.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;AAgBM,MAAM,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,SAAS,KAA4B,EAAE,GAA2C;IAClI,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,QAAQ,CAAA,GAAA,mBAAW,EAAE;IACrB,IAAI,cACF,aAAa,gBACb,UAAU,mBACV,aAAa,mBACb,aAAa,iBACb,QAAQ,EACR,GAAG,YACJ,GAAG;QAG8D;IADlE,2FAA2F;IAC3F,IAAI,CAAC,YAAY,cAAc,GAAG,CAAA,GAAA,yBAAiB,EAAE,MAAM,KAAK,EAAE,CAAA,sBAAA,MAAM,YAAY,cAAlB,iCAAA,sBAAsB,IAAI,KAAO;IACnG,IAAI,WAAW,CAAA,GAAA,aAAK,EAAuB;IAE3C,IAAI,iBAAiB,CAAA,GAAA,kBAAU,EAAE;QAC/B,2DAA2D;QAC3D,6EAA6E;QAC7E,IAAI,AAAC,CAAA,WAAW,CAAC,MAAM,MAAM,AAAD,KAAM,SAAS,OAAO,EAAE;YAClD,IAAI,QAAQ,SAAS,OAAO;YAC5B,IAAI,gBAAgB,MAAM,KAAK,CAAC,SAAS;YACzC,IAAI,eAAe,MAAM,KAAK,CAAC,QAAQ;YACvC,6FAA6F;YAC7F,2EAA2E;YAC3E,mFAAmF;YACnF,IAAI,YAAY,mBAAmB,MAAM,KAAK;YAC9C,IAAI,CAAC,WACH,MAAM,KAAK,CAAC,QAAQ,GAAG;YAEzB,MAAM,KAAK,CAAC,SAAS,GAAG;YACxB,MAAM,KAAK,CAAC,MAAM,GAAG;YACrB,+DAA+D;YAC/D,MAAM,KAAK,CAAC,MAAM,GAAG,GAAG,MAAM,YAAY,GAAI,CAAA,MAAM,YAAY,GAAG,MAAM,YAAY,AAAD,EAAG,EAAE,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,YAAY,CAAA,GAAA,aAAK,EAAE;IACvB,CAAA,GAAA,gBAAQ,EAAE;QACR,IAAI,MAAM,WAAW,IAAI,CAAC,UAAU,OAAO,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAAc;YACpF,QAAQ,IAAI,CAAC;YACb,UAAU,OAAO,GAAG;QACtB;IACF,GAAG;QAAC,MAAM,WAAW;KAAC;IAEtB,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, useEffect, 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 let hasWarned = useRef(false);\n useEffect(() => {\n if (props.placeholder && !hasWarned.current && 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 hasWarned.current = true;\n }\n }, [props.placeholder]);\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"}
@@ -1,55 +0,0 @@
1
- var $86793250183ac29e$exports = require("./TextFieldBase.main.js");
2
- var $em8OD$react = require("react");
3
- var $em8OD$reactspectrumform = require("@react-spectrum/form");
4
- var $em8OD$reactspectrumprovider = require("@react-spectrum/provider");
5
- var $em8OD$reactariatextfield = require("@react-aria/textfield");
6
-
7
-
8
- function $parcel$interopDefault(a) {
9
- return a && a.__esModule ? a.default : a;
10
- }
11
-
12
- function $parcel$export(e, n, v, s) {
13
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
14
- }
15
-
16
- $parcel$export(module.exports, "TextField", () => $34fd51d50eb4b056$export$2c73285ae9390cec);
17
- /*
18
- * Copyright 2020 Adobe. All rights reserved.
19
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
20
- * you may not use this file except in compliance with the License. You may obtain a copy
21
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
22
- *
23
- * Unless required by applicable law or agreed to in writing, software distributed under
24
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
25
- * OF ANY KIND, either express or implied. See the License for the specific language
26
- * governing permissions and limitations under the License.
27
- */
28
-
29
-
30
-
31
-
32
- const $34fd51d50eb4b056$export$2c73285ae9390cec = /*#__PURE__*/ (0, $em8OD$react.forwardRef)(function TextField(props, ref) {
33
- props = (0, $em8OD$reactspectrumprovider.useProviderProps)(props);
34
- props = (0, $em8OD$reactspectrumform.useFormProps)(props);
35
- let inputRef = (0, $em8OD$react.useRef)(null);
36
- let result = (0, $em8OD$reactariatextfield.useTextField)(props, inputRef);
37
- let hasWarned = (0, $em8OD$react.useRef)(false);
38
- (0, $em8OD$react.useEffect)(()=>{
39
- if (props.placeholder && !hasWarned.current && process.env.NODE_ENV !== 'production') {
40
- 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');
41
- hasWarned.current = true;
42
- }
43
- }, [
44
- props.placeholder
45
- ]);
46
- return /*#__PURE__*/ (0, ($parcel$interopDefault($em8OD$react))).createElement((0, $86793250183ac29e$exports.TextFieldBase), {
47
- ...props,
48
- ...result,
49
- ref: ref,
50
- inputRef: inputRef
51
- });
52
- });
53
-
54
-
55
- //# sourceMappingURL=TextField.main.js.map
@@ -1 +0,0 @@
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,YAAY,CAAA,GAAA,mBAAK,EAAE;IACvB,CAAA,GAAA,sBAAQ,EAAE;QACR,IAAI,MAAM,WAAW,IAAI,CAAC,UAAU,OAAO,IAAI,QAAQ,GAAG,CAAC,QAAQ,KAAK,cAAc;YACpF,QAAQ,IAAI,CAAC;YACb,UAAU,OAAO,GAAG;QACtB;IACF,GAAG;QAAC,MAAM,WAAW;KAAC;IAEtB,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, useEffect, 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 let hasWarned = useRef(false);\n useEffect(() => {\n if (props.placeholder && !hasWarned.current && 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 hasWarned.current = true;\n }\n }, [props.placeholder]);\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"}
@@ -1,46 +0,0 @@
1
- import {TextFieldBase as $599adb75312e6492$export$d22444a338b6e3c2} from "./TextFieldBase.mjs";
2
- import $9R76J$react, {forwardRef as $9R76J$forwardRef, useRef as $9R76J$useRef, useEffect as $9R76J$useEffect} from "react";
3
- import {useFormProps as $9R76J$useFormProps} from "@react-spectrum/form";
4
- import {useProviderProps as $9R76J$useProviderProps} from "@react-spectrum/provider";
5
- import {useTextField as $9R76J$useTextField} from "@react-aria/textfield";
6
-
7
- /*
8
- * Copyright 2020 Adobe. All rights reserved.
9
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
10
- * you may not use this file except in compliance with the License. You may obtain a copy
11
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software distributed under
14
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
15
- * OF ANY KIND, either express or implied. See the License for the specific language
16
- * governing permissions and limitations under the License.
17
- */
18
-
19
-
20
-
21
-
22
- const $265457f9427aa380$export$2c73285ae9390cec = /*#__PURE__*/ (0, $9R76J$forwardRef)(function TextField(props, ref) {
23
- props = (0, $9R76J$useProviderProps)(props);
24
- props = (0, $9R76J$useFormProps)(props);
25
- let inputRef = (0, $9R76J$useRef)(null);
26
- let result = (0, $9R76J$useTextField)(props, inputRef);
27
- let hasWarned = (0, $9R76J$useRef)(false);
28
- (0, $9R76J$useEffect)(()=>{
29
- if (props.placeholder && !hasWarned.current && process.env.NODE_ENV !== 'production') {
30
- 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');
31
- hasWarned.current = true;
32
- }
33
- }, [
34
- props.placeholder
35
- ]);
36
- return /*#__PURE__*/ (0, $9R76J$react).createElement((0, $599adb75312e6492$export$d22444a338b6e3c2), {
37
- ...props,
38
- ...result,
39
- ref: ref,
40
- inputRef: inputRef
41
- });
42
- });
43
-
44
-
45
- export {$265457f9427aa380$export$2c73285ae9390cec as TextField};
46
- //# sourceMappingURL=TextField.module.js.map