@react-spectrum/textfield 3.0.0-nightly.2519 → 3.0.0-nightly.2534
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/import.mjs +116 -77
- package/dist/main.js +116 -77
- package/dist/main.js.map +1 -1
- package/dist/module.js +116 -77
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +2 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +16 -15
- package/src/TextArea.tsx +5 -6
- package/src/TextField.tsx +4 -5
- package/src/TextFieldBase.tsx +3 -3
package/dist/import.mjs
CHANGED
@@ -2,6 +2,7 @@ import "./main.css";
|
|
2
2
|
import {useLayoutEffect as $evhxb$useLayoutEffect, chain as $evhxb$chain, mergeProps as $evhxb$mergeProps} from "@react-aria/utils";
|
3
3
|
import $evhxb$react, {useRef as $evhxb$useRef, useCallback as $evhxb$useCallback, useImperativeHandle as $evhxb$useImperativeHandle, cloneElement as $evhxb$cloneElement, forwardRef as $evhxb$forwardRef} from "react";
|
4
4
|
import {useControlledState as $evhxb$useControlledState} from "@react-stately/utils";
|
5
|
+
import {useFormProps as $evhxb$useFormProps} from "@react-spectrum/form";
|
5
6
|
import {useProviderProps as $evhxb$useProviderProps} from "@react-spectrum/provider";
|
6
7
|
import {useTextField as $evhxb$useTextField} from "@react-aria/textfield";
|
7
8
|
import $evhxb$spectrumiconsuiAlertMedium from "@spectrum-icons/ui/AlertMedium";
|
@@ -11,75 +12,72 @@ import {Field as $evhxb$Field} from "@react-spectrum/label";
|
|
11
12
|
import {useFocusRing as $evhxb$useFocusRing} from "@react-aria/focus";
|
12
13
|
import {useHover as $evhxb$useHover} from "@react-aria/interactions";
|
13
14
|
|
14
|
-
|
15
|
-
return a && a.__esModule ? a.default : a;
|
16
|
-
}
|
15
|
+
|
17
16
|
function $parcel$export(e, n, v, s) {
|
18
17
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
19
18
|
}
|
20
|
-
/*
|
21
|
-
* Copyright 2020 Adobe. All rights reserved.
|
22
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
23
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
24
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
25
|
-
*
|
26
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
27
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
28
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
29
|
-
* governing permissions and limitations under the License.
|
30
|
-
*/ /// <reference types="css-module-types" />
|
31
|
-
/*
|
32
|
-
* Copyright 2020 Adobe. All rights reserved.
|
33
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
34
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
35
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
36
|
-
*
|
37
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
38
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
39
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
40
|
-
* governing permissions and limitations under the License.
|
41
|
-
*/
|
42
19
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
47
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
48
|
-
*
|
49
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
50
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
51
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
52
|
-
* governing permissions and limitations under the License.
|
53
|
-
*/
|
20
|
+
function $parcel$interopDefault(a) {
|
21
|
+
return a && a.__esModule ? a.default : a;
|
22
|
+
}
|
54
23
|
|
24
|
+
var $parcel$global = globalThis;
|
25
|
+
|
26
|
+
var $parcel$modules = {};
|
27
|
+
var $parcel$inits = {};
|
55
28
|
|
29
|
+
var parcelRequire = $parcel$global["parcelRequire7f0c"];
|
56
30
|
|
31
|
+
if (parcelRequire == null) {
|
32
|
+
parcelRequire = function(id) {
|
33
|
+
if (id in $parcel$modules) {
|
34
|
+
return $parcel$modules[id].exports;
|
35
|
+
}
|
36
|
+
if (id in $parcel$inits) {
|
37
|
+
var init = $parcel$inits[id];
|
38
|
+
delete $parcel$inits[id];
|
39
|
+
var module = {id: id, exports: {}};
|
40
|
+
$parcel$modules[id] = module;
|
41
|
+
init.call(module.exports, module, module.exports);
|
42
|
+
return module.exports;
|
43
|
+
}
|
44
|
+
var err = new Error("Cannot find module '" + id + "'");
|
45
|
+
err.code = 'MODULE_NOT_FOUND';
|
46
|
+
throw err;
|
47
|
+
};
|
57
48
|
|
49
|
+
parcelRequire.register = function register(id, init) {
|
50
|
+
$parcel$inits[id] = init;
|
51
|
+
};
|
58
52
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
$parcel$export(
|
66
|
-
$parcel$export(
|
67
|
-
$parcel$export(
|
68
|
-
$parcel$export(
|
69
|
-
$parcel$export(
|
70
|
-
$parcel$export(
|
71
|
-
$parcel$export(
|
72
|
-
$parcel$export(
|
73
|
-
$parcel$export(
|
74
|
-
$parcel$export(
|
75
|
-
$parcel$export(
|
76
|
-
$parcel$export(
|
77
|
-
$parcel$export(
|
78
|
-
$parcel$export(
|
79
|
-
$parcel$export(
|
80
|
-
$parcel$export(
|
81
|
-
$parcel$export(
|
82
|
-
$parcel$export(
|
53
|
+
$parcel$global["parcelRequire7f0c"] = parcelRequire;
|
54
|
+
}
|
55
|
+
|
56
|
+
var parcelRegister = parcelRequire.register;
|
57
|
+
parcelRegister("gALTu", function(module, exports) {
|
58
|
+
|
59
|
+
$parcel$export(module.exports, "focus-ring", () => $c14528ddc146317f$export$f39a09f249340e2a, (v) => $c14528ddc146317f$export$f39a09f249340e2a = v);
|
60
|
+
$parcel$export(module.exports, "i18nFontFamily", () => $c14528ddc146317f$export$8c4ee2c50c22c514, (v) => $c14528ddc146317f$export$8c4ee2c50c22c514 = v);
|
61
|
+
$parcel$export(module.exports, "is-disabled", () => $c14528ddc146317f$export$d35bc1e505d1ebbf, (v) => $c14528ddc146317f$export$d35bc1e505d1ebbf = v);
|
62
|
+
$parcel$export(module.exports, "is-focused", () => $c14528ddc146317f$export$e7dc768d35940237, (v) => $c14528ddc146317f$export$e7dc768d35940237 = v);
|
63
|
+
$parcel$export(module.exports, "is-hovered", () => $c14528ddc146317f$export$b8813cd5d7824ce7, (v) => $c14528ddc146317f$export$b8813cd5d7824ce7 = v);
|
64
|
+
$parcel$export(module.exports, "is-placeholder", () => $c14528ddc146317f$export$e5b2f5233e4e5194, (v) => $c14528ddc146317f$export$e5b2f5233e4e5194 = v);
|
65
|
+
$parcel$export(module.exports, "spectrum-FocusRing-ring", () => $c14528ddc146317f$export$4109102f950813a6, (v) => $c14528ddc146317f$export$4109102f950813a6 = v);
|
66
|
+
$parcel$export(module.exports, "spectrum-FocusRing", () => $c14528ddc146317f$export$24c7f46a6e3605dd, (v) => $c14528ddc146317f$export$24c7f46a6e3605dd = v);
|
67
|
+
$parcel$export(module.exports, "spectrum-FocusRing--quiet", () => $c14528ddc146317f$export$2927016961429360, (v) => $c14528ddc146317f$export$2927016961429360 = v);
|
68
|
+
$parcel$export(module.exports, "spectrum-Textfield", () => $c14528ddc146317f$export$2c8a10299d8b3418, (v) => $c14528ddc146317f$export$2c8a10299d8b3418 = v);
|
69
|
+
$parcel$export(module.exports, "spectrum-Textfield--invalid", () => $c14528ddc146317f$export$58e50b10d30123df, (v) => $c14528ddc146317f$export$58e50b10d30123df = v);
|
70
|
+
$parcel$export(module.exports, "spectrum-Textfield--loadable", () => $c14528ddc146317f$export$14fd30fea6f1348c, (v) => $c14528ddc146317f$export$14fd30fea6f1348c = v);
|
71
|
+
$parcel$export(module.exports, "spectrum-Textfield--multiline", () => $c14528ddc146317f$export$9699f1c538a448a0, (v) => $c14528ddc146317f$export$9699f1c538a448a0 = v);
|
72
|
+
$parcel$export(module.exports, "spectrum-Textfield--quiet", () => $c14528ddc146317f$export$bffd5e3d61a81737, (v) => $c14528ddc146317f$export$bffd5e3d61a81737 = v);
|
73
|
+
$parcel$export(module.exports, "spectrum-Textfield--valid", () => $c14528ddc146317f$export$c2abbc3f970170b7, (v) => $c14528ddc146317f$export$c2abbc3f970170b7 = v);
|
74
|
+
$parcel$export(module.exports, "spectrum-Textfield-circleLoader", () => $c14528ddc146317f$export$82a249fb4d6127, (v) => $c14528ddc146317f$export$82a249fb4d6127 = v);
|
75
|
+
$parcel$export(module.exports, "spectrum-Textfield-icon", () => $c14528ddc146317f$export$222d1ccd1870be1d, (v) => $c14528ddc146317f$export$222d1ccd1870be1d = v);
|
76
|
+
$parcel$export(module.exports, "spectrum-Textfield-input", () => $c14528ddc146317f$export$1ac009feb2b0bd0c, (v) => $c14528ddc146317f$export$1ac009feb2b0bd0c = v);
|
77
|
+
$parcel$export(module.exports, "spectrum-Textfield-inputIcon", () => $c14528ddc146317f$export$c1cdcaa5fe76a871, (v) => $c14528ddc146317f$export$c1cdcaa5fe76a871 = v);
|
78
|
+
$parcel$export(module.exports, "spectrum-Textfield-validationIcon", () => $c14528ddc146317f$export$cf0ead5b44db0da3, (v) => $c14528ddc146317f$export$cf0ead5b44db0da3 = v);
|
79
|
+
$parcel$export(module.exports, "spectrum-Textfield-wrapper", () => $c14528ddc146317f$export$dd1165e0e6012973, (v) => $c14528ddc146317f$export$dd1165e0e6012973 = v);
|
80
|
+
$parcel$export(module.exports, "spectrum-Textfield-wrapper--quiet", () => $c14528ddc146317f$export$9fcb3d6af94a9d12, (v) => $c14528ddc146317f$export$9fcb3d6af94a9d12 = v);
|
83
81
|
var $c14528ddc146317f$export$f39a09f249340e2a;
|
84
82
|
var $c14528ddc146317f$export$8c4ee2c50c22c514;
|
85
83
|
var $c14528ddc146317f$export$d35bc1e505d1ebbf;
|
@@ -125,11 +123,53 @@ $c14528ddc146317f$export$cf0ead5b44db0da3 = `YO3Nla_spectrum-Textfield-validatio
|
|
125
123
|
$c14528ddc146317f$export$dd1165e0e6012973 = `YO3Nla_spectrum-Textfield-wrapper`;
|
126
124
|
$c14528ddc146317f$export$9fcb3d6af94a9d12 = `YO3Nla_spectrum-Textfield-wrapper--quiet`;
|
127
125
|
|
126
|
+
});
|
127
|
+
|
128
|
+
/*
|
129
|
+
* Copyright 2020 Adobe. All rights reserved.
|
130
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
131
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
132
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
133
|
+
*
|
134
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
135
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
136
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
137
|
+
* governing permissions and limitations under the License.
|
138
|
+
*/ /// <reference types="css-module-types" />
|
139
|
+
/*
|
140
|
+
* Copyright 2020 Adobe. All rights reserved.
|
141
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
142
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
143
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
144
|
+
*
|
145
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
146
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
147
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
148
|
+
* governing permissions and limitations under the License.
|
149
|
+
*/
|
150
|
+
|
151
|
+
/*
|
152
|
+
* Copyright 2020 Adobe. All rights reserved.
|
153
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
154
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
155
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
156
|
+
*
|
157
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
158
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
159
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
160
|
+
* governing permissions and limitations under the License.
|
161
|
+
*/
|
162
|
+
|
163
|
+
|
128
164
|
|
129
165
|
|
130
166
|
|
167
|
+
|
168
|
+
var $gALTu = parcelRequire("gALTu");
|
169
|
+
|
170
|
+
|
131
171
|
function $599adb75312e6492$var$TextFieldBase(props, ref) {
|
132
|
-
let { validationState: validationState, 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;
|
172
|
+
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;
|
133
173
|
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $evhxb$useHover)({
|
134
174
|
isDisabled: isDisabled
|
135
175
|
});
|
@@ -149,7 +189,7 @@ function $599adb75312e6492$var$TextFieldBase(props, ref) {
|
|
149
189
|
let ElementType = multiLine ? "textarea" : "input";
|
150
190
|
let isInvalid = validationState === "invalid" && !isDisabled;
|
151
191
|
if (icon) {
|
152
|
-
let UNSAFE_className = (0, $evhxb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($
|
192
|
+
let UNSAFE_className = (0, $evhxb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($gALTu))), icon.props && icon.props.UNSAFE_className, "spectrum-Textfield-icon");
|
153
193
|
icon = /*#__PURE__*/ (0, $evhxb$cloneElement)(icon, {
|
154
194
|
UNSAFE_className: UNSAFE_className,
|
155
195
|
size: "S"
|
@@ -157,14 +197,14 @@ function $599adb75312e6492$var$TextFieldBase(props, ref) {
|
|
157
197
|
}
|
158
198
|
let validationIcon = isInvalid ? /*#__PURE__*/ (0, $evhxb$react).createElement((0, $evhxb$spectrumiconsuiAlertMedium), null) : /*#__PURE__*/ (0, $evhxb$react).createElement((0, $evhxb$spectrumiconsuiCheckmarkMedium), null);
|
159
199
|
let validation = /*#__PURE__*/ (0, $evhxb$cloneElement)(validationIcon, {
|
160
|
-
UNSAFE_className: (0, $evhxb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($
|
200
|
+
UNSAFE_className: (0, $evhxb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($gALTu))), "spectrum-Textfield-validationIcon", validationIconClassName)
|
161
201
|
});
|
162
202
|
let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $evhxb$useFocusRing)({
|
163
203
|
isTextInput: true,
|
164
204
|
autoFocus: autoFocus
|
165
205
|
});
|
166
206
|
let textField = /*#__PURE__*/ (0, $evhxb$react).createElement("div", {
|
167
|
-
className: (0, $evhxb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($
|
207
|
+
className: (0, $evhxb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($gALTu))), "spectrum-Textfield", {
|
168
208
|
"spectrum-Textfield--invalid": isInvalid,
|
169
209
|
"spectrum-Textfield--valid": validationState === "valid" && !isDisabled,
|
170
210
|
"spectrum-Textfield--loadable": loadingIndicator,
|
@@ -176,7 +216,7 @@ function $599adb75312e6492$var$TextFieldBase(props, ref) {
|
|
176
216
|
...(0, $evhxb$mergeProps)(inputProps, hoverProps, focusProps),
|
177
217
|
ref: inputRef,
|
178
218
|
rows: multiLine ? 1 : undefined,
|
179
|
-
className: (0, $evhxb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($
|
219
|
+
className: (0, $evhxb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($gALTu))), "spectrum-Textfield-input", {
|
180
220
|
"spectrum-Textfield-inputIcon": icon,
|
181
221
|
"is-hovered": isHovered
|
182
222
|
}, inputClassName)
|
@@ -186,7 +226,7 @@ function $599adb75312e6492$var$TextFieldBase(props, ref) {
|
|
186
226
|
labelProps: labelProps,
|
187
227
|
descriptionProps: descriptionProps,
|
188
228
|
errorMessageProps: errorMessageProps,
|
189
|
-
wrapperClassName: (0, $evhxb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($
|
229
|
+
wrapperClassName: (0, $evhxb$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($gALTu))), "spectrum-Textfield-wrapper", {
|
190
230
|
"spectrum-Textfield-wrapper--quiet": isQuiet
|
191
231
|
}),
|
192
232
|
showErrorIcon: false,
|
@@ -199,11 +239,14 @@ const $599adb75312e6492$export$d22444a338b6e3c2 = /*#__PURE__*/ (0, $evhxb$forwa
|
|
199
239
|
|
200
240
|
|
201
241
|
|
242
|
+
|
202
243
|
function $cc187bf91f8eea73$var$TextArea(props, ref) {
|
203
244
|
props = (0, $evhxb$useProviderProps)(props);
|
245
|
+
props = (0, $evhxb$useFormProps)(props);
|
204
246
|
let { isDisabled: isDisabled = false, isQuiet: isQuiet = false, isReadOnly: isReadOnly = false, isRequired: isRequired = false, onChange: onChange, ...otherProps } = props;
|
247
|
+
var _props_defaultValue;
|
205
248
|
// not in stately because this is so we know when to re-measure, which is a spectrum design
|
206
|
-
let [inputValue, setInputValue] = (0, $evhxb$useControlledState)(props.value, props.defaultValue, ()=>{});
|
249
|
+
let [inputValue, setInputValue] = (0, $evhxb$useControlledState)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : "", ()=>{});
|
207
250
|
let inputRef = (0, $evhxb$useRef)(null);
|
208
251
|
let onHeightChange = (0, $evhxb$useCallback)(()=>{
|
209
252
|
// Quiet textareas always grow based on their text content.
|
@@ -237,7 +280,7 @@ function $cc187bf91f8eea73$var$TextArea(props, ref) {
|
|
237
280
|
inputRef
|
238
281
|
]);
|
239
282
|
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");
|
240
|
-
let
|
283
|
+
let result = (0, $evhxb$useTextField)({
|
241
284
|
...props,
|
242
285
|
onChange: (0, $evhxb$chain)(onChange, setInputValue),
|
243
286
|
inputElementType: "textarea"
|
@@ -246,10 +289,7 @@ function $cc187bf91f8eea73$var$TextArea(props, ref) {
|
|
246
289
|
...otherProps,
|
247
290
|
ref: ref,
|
248
291
|
inputRef: inputRef,
|
249
|
-
|
250
|
-
inputProps: inputProps,
|
251
|
-
descriptionProps: descriptionProps,
|
252
|
-
errorMessageProps: errorMessageProps,
|
292
|
+
...result,
|
253
293
|
multiLine: true,
|
254
294
|
isDisabled: isDisabled,
|
255
295
|
isQuiet: isQuiet,
|
@@ -278,17 +318,16 @@ function $cc187bf91f8eea73$var$TextArea(props, ref) {
|
|
278
318
|
|
279
319
|
|
280
320
|
|
321
|
+
|
281
322
|
function $265457f9427aa380$var$TextField(props, ref) {
|
282
323
|
props = (0, $evhxb$useProviderProps)(props);
|
324
|
+
props = (0, $evhxb$useFormProps)(props);
|
283
325
|
let inputRef = (0, $evhxb$useRef)(null);
|
284
|
-
let
|
326
|
+
let result = (0, $evhxb$useTextField)(props, inputRef);
|
285
327
|
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");
|
286
328
|
return /*#__PURE__*/ (0, $evhxb$react).createElement((0, $599adb75312e6492$export$d22444a338b6e3c2), {
|
287
329
|
...props,
|
288
|
-
|
289
|
-
inputProps: inputProps,
|
290
|
-
descriptionProps: descriptionProps,
|
291
|
-
errorMessageProps: errorMessageProps,
|
330
|
+
...result,
|
292
331
|
ref: ref,
|
293
332
|
inputRef: inputRef
|
294
333
|
});
|
package/dist/main.js
CHANGED
@@ -2,6 +2,7 @@ require("./main.css");
|
|
2
2
|
var $74aPB$reactariautils = require("@react-aria/utils");
|
3
3
|
var $74aPB$react = require("react");
|
4
4
|
var $74aPB$reactstatelyutils = require("@react-stately/utils");
|
5
|
+
var $74aPB$reactspectrumform = require("@react-spectrum/form");
|
5
6
|
var $74aPB$reactspectrumprovider = require("@react-spectrum/provider");
|
6
7
|
var $74aPB$reactariatextfield = require("@react-aria/textfield");
|
7
8
|
var $74aPB$spectrumiconsuiAlertMedium = require("@spectrum-icons/ui/AlertMedium");
|
@@ -11,79 +12,72 @@ var $74aPB$reactspectrumlabel = require("@react-spectrum/label");
|
|
11
12
|
var $74aPB$reactariafocus = require("@react-aria/focus");
|
12
13
|
var $74aPB$reactariainteractions = require("@react-aria/interactions");
|
13
14
|
|
15
|
+
|
14
16
|
function $parcel$export(e, n, v, s) {
|
15
17
|
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
16
18
|
}
|
19
|
+
|
17
20
|
function $parcel$interopDefault(a) {
|
18
21
|
return a && a.__esModule ? a.default : a;
|
19
22
|
}
|
20
23
|
|
21
|
-
$parcel$
|
22
|
-
|
23
|
-
$parcel$
|
24
|
-
|
25
|
-
* Copyright 2020 Adobe. All rights reserved.
|
26
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
27
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
28
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
29
|
-
*
|
30
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
31
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
32
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
33
|
-
* governing permissions and limitations under the License.
|
34
|
-
*/ /// <reference types="css-module-types" />
|
35
|
-
/*
|
36
|
-
* Copyright 2020 Adobe. All rights reserved.
|
37
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
38
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
39
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
40
|
-
*
|
41
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
42
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
43
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
44
|
-
* governing permissions and limitations under the License.
|
45
|
-
*/
|
24
|
+
var $parcel$global = globalThis;
|
25
|
+
|
26
|
+
var $parcel$modules = {};
|
27
|
+
var $parcel$inits = {};
|
46
28
|
|
47
|
-
|
48
|
-
* Copyright 2020 Adobe. All rights reserved.
|
49
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
50
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
51
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
52
|
-
*
|
53
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
54
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
55
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
56
|
-
* governing permissions and limitations under the License.
|
57
|
-
*/
|
29
|
+
var parcelRequire = $parcel$global["parcelRequire7f0c"];
|
58
30
|
|
31
|
+
if (parcelRequire == null) {
|
32
|
+
parcelRequire = function(id) {
|
33
|
+
if (id in $parcel$modules) {
|
34
|
+
return $parcel$modules[id].exports;
|
35
|
+
}
|
36
|
+
if (id in $parcel$inits) {
|
37
|
+
var init = $parcel$inits[id];
|
38
|
+
delete $parcel$inits[id];
|
39
|
+
var module = {id: id, exports: {}};
|
40
|
+
$parcel$modules[id] = module;
|
41
|
+
init.call(module.exports, module, module.exports);
|
42
|
+
return module.exports;
|
43
|
+
}
|
44
|
+
var err = new Error("Cannot find module '" + id + "'");
|
45
|
+
err.code = 'MODULE_NOT_FOUND';
|
46
|
+
throw err;
|
47
|
+
};
|
59
48
|
|
49
|
+
parcelRequire.register = function register(id, init) {
|
50
|
+
$parcel$inits[id] = init;
|
51
|
+
};
|
60
52
|
|
53
|
+
$parcel$global["parcelRequire7f0c"] = parcelRequire;
|
54
|
+
}
|
61
55
|
|
56
|
+
var parcelRegister = parcelRequire.register;
|
57
|
+
parcelRegister("5yTyQ", function(module, exports) {
|
62
58
|
|
63
|
-
|
64
|
-
|
65
|
-
$parcel$export(
|
66
|
-
$parcel$export(
|
67
|
-
$parcel$export(
|
68
|
-
$parcel$export(
|
69
|
-
$parcel$export(
|
70
|
-
$parcel$export(
|
71
|
-
$parcel$export(
|
72
|
-
$parcel$export(
|
73
|
-
$parcel$export(
|
74
|
-
$parcel$export(
|
75
|
-
$parcel$export(
|
76
|
-
$parcel$export(
|
77
|
-
$parcel$export(
|
78
|
-
$parcel$export(
|
79
|
-
$parcel$export(
|
80
|
-
$parcel$export(
|
81
|
-
$parcel$export(
|
82
|
-
$parcel$export(
|
83
|
-
$parcel$export(
|
84
|
-
$parcel$export(
|
85
|
-
$parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield-wrapper", () => $40cb3a00c193680f$export$dd1165e0e6012973, (v) => $40cb3a00c193680f$export$dd1165e0e6012973 = v);
|
86
|
-
$parcel$export($40cb3a00c193680f$exports, "spectrum-Textfield-wrapper--quiet", () => $40cb3a00c193680f$export$9fcb3d6af94a9d12, (v) => $40cb3a00c193680f$export$9fcb3d6af94a9d12 = v);
|
59
|
+
$parcel$export(module.exports, "focus-ring", () => $40cb3a00c193680f$export$f39a09f249340e2a, (v) => $40cb3a00c193680f$export$f39a09f249340e2a = v);
|
60
|
+
$parcel$export(module.exports, "i18nFontFamily", () => $40cb3a00c193680f$export$8c4ee2c50c22c514, (v) => $40cb3a00c193680f$export$8c4ee2c50c22c514 = v);
|
61
|
+
$parcel$export(module.exports, "is-disabled", () => $40cb3a00c193680f$export$d35bc1e505d1ebbf, (v) => $40cb3a00c193680f$export$d35bc1e505d1ebbf = v);
|
62
|
+
$parcel$export(module.exports, "is-focused", () => $40cb3a00c193680f$export$e7dc768d35940237, (v) => $40cb3a00c193680f$export$e7dc768d35940237 = v);
|
63
|
+
$parcel$export(module.exports, "is-hovered", () => $40cb3a00c193680f$export$b8813cd5d7824ce7, (v) => $40cb3a00c193680f$export$b8813cd5d7824ce7 = v);
|
64
|
+
$parcel$export(module.exports, "is-placeholder", () => $40cb3a00c193680f$export$e5b2f5233e4e5194, (v) => $40cb3a00c193680f$export$e5b2f5233e4e5194 = v);
|
65
|
+
$parcel$export(module.exports, "spectrum-FocusRing-ring", () => $40cb3a00c193680f$export$4109102f950813a6, (v) => $40cb3a00c193680f$export$4109102f950813a6 = v);
|
66
|
+
$parcel$export(module.exports, "spectrum-FocusRing", () => $40cb3a00c193680f$export$24c7f46a6e3605dd, (v) => $40cb3a00c193680f$export$24c7f46a6e3605dd = v);
|
67
|
+
$parcel$export(module.exports, "spectrum-FocusRing--quiet", () => $40cb3a00c193680f$export$2927016961429360, (v) => $40cb3a00c193680f$export$2927016961429360 = v);
|
68
|
+
$parcel$export(module.exports, "spectrum-Textfield", () => $40cb3a00c193680f$export$2c8a10299d8b3418, (v) => $40cb3a00c193680f$export$2c8a10299d8b3418 = v);
|
69
|
+
$parcel$export(module.exports, "spectrum-Textfield--invalid", () => $40cb3a00c193680f$export$58e50b10d30123df, (v) => $40cb3a00c193680f$export$58e50b10d30123df = v);
|
70
|
+
$parcel$export(module.exports, "spectrum-Textfield--loadable", () => $40cb3a00c193680f$export$14fd30fea6f1348c, (v) => $40cb3a00c193680f$export$14fd30fea6f1348c = v);
|
71
|
+
$parcel$export(module.exports, "spectrum-Textfield--multiline", () => $40cb3a00c193680f$export$9699f1c538a448a0, (v) => $40cb3a00c193680f$export$9699f1c538a448a0 = v);
|
72
|
+
$parcel$export(module.exports, "spectrum-Textfield--quiet", () => $40cb3a00c193680f$export$bffd5e3d61a81737, (v) => $40cb3a00c193680f$export$bffd5e3d61a81737 = v);
|
73
|
+
$parcel$export(module.exports, "spectrum-Textfield--valid", () => $40cb3a00c193680f$export$c2abbc3f970170b7, (v) => $40cb3a00c193680f$export$c2abbc3f970170b7 = v);
|
74
|
+
$parcel$export(module.exports, "spectrum-Textfield-circleLoader", () => $40cb3a00c193680f$export$82a249fb4d6127, (v) => $40cb3a00c193680f$export$82a249fb4d6127 = v);
|
75
|
+
$parcel$export(module.exports, "spectrum-Textfield-icon", () => $40cb3a00c193680f$export$222d1ccd1870be1d, (v) => $40cb3a00c193680f$export$222d1ccd1870be1d = v);
|
76
|
+
$parcel$export(module.exports, "spectrum-Textfield-input", () => $40cb3a00c193680f$export$1ac009feb2b0bd0c, (v) => $40cb3a00c193680f$export$1ac009feb2b0bd0c = v);
|
77
|
+
$parcel$export(module.exports, "spectrum-Textfield-inputIcon", () => $40cb3a00c193680f$export$c1cdcaa5fe76a871, (v) => $40cb3a00c193680f$export$c1cdcaa5fe76a871 = v);
|
78
|
+
$parcel$export(module.exports, "spectrum-Textfield-validationIcon", () => $40cb3a00c193680f$export$cf0ead5b44db0da3, (v) => $40cb3a00c193680f$export$cf0ead5b44db0da3 = v);
|
79
|
+
$parcel$export(module.exports, "spectrum-Textfield-wrapper", () => $40cb3a00c193680f$export$dd1165e0e6012973, (v) => $40cb3a00c193680f$export$dd1165e0e6012973 = v);
|
80
|
+
$parcel$export(module.exports, "spectrum-Textfield-wrapper--quiet", () => $40cb3a00c193680f$export$9fcb3d6af94a9d12, (v) => $40cb3a00c193680f$export$9fcb3d6af94a9d12 = v);
|
87
81
|
var $40cb3a00c193680f$export$f39a09f249340e2a;
|
88
82
|
var $40cb3a00c193680f$export$8c4ee2c50c22c514;
|
89
83
|
var $40cb3a00c193680f$export$d35bc1e505d1ebbf;
|
@@ -129,11 +123,57 @@ $40cb3a00c193680f$export$cf0ead5b44db0da3 = `YO3Nla_spectrum-Textfield-validatio
|
|
129
123
|
$40cb3a00c193680f$export$dd1165e0e6012973 = `YO3Nla_spectrum-Textfield-wrapper`;
|
130
124
|
$40cb3a00c193680f$export$9fcb3d6af94a9d12 = `YO3Nla_spectrum-Textfield-wrapper--quiet`;
|
131
125
|
|
126
|
+
});
|
127
|
+
|
128
|
+
|
129
|
+
$parcel$export(module.exports, "TextArea", () => $eec649e464f3832d$export$f5c9f3c2c4054eec);
|
130
|
+
$parcel$export(module.exports, "TextField", () => $34fd51d50eb4b056$export$2c73285ae9390cec);
|
131
|
+
$parcel$export(module.exports, "TextFieldBase", () => $86793250183ac29e$export$d22444a338b6e3c2);
|
132
|
+
/*
|
133
|
+
* Copyright 2020 Adobe. All rights reserved.
|
134
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
135
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
136
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
137
|
+
*
|
138
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
139
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
140
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
141
|
+
* governing permissions and limitations under the License.
|
142
|
+
*/ /// <reference types="css-module-types" />
|
143
|
+
/*
|
144
|
+
* Copyright 2020 Adobe. All rights reserved.
|
145
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
146
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
147
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
148
|
+
*
|
149
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
150
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
151
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
152
|
+
* governing permissions and limitations under the License.
|
153
|
+
*/
|
154
|
+
|
155
|
+
/*
|
156
|
+
* Copyright 2020 Adobe. All rights reserved.
|
157
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
158
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
159
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
160
|
+
*
|
161
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
162
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
163
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
164
|
+
* governing permissions and limitations under the License.
|
165
|
+
*/
|
166
|
+
|
167
|
+
|
132
168
|
|
133
169
|
|
134
170
|
|
171
|
+
|
172
|
+
var $5yTyQ = parcelRequire("5yTyQ");
|
173
|
+
|
174
|
+
|
135
175
|
function $86793250183ac29e$var$TextFieldBase(props, ref) {
|
136
|
-
let { validationState: validationState, 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;
|
176
|
+
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;
|
137
177
|
let { hoverProps: hoverProps, isHovered: isHovered } = (0, $74aPB$reactariainteractions.useHover)({
|
138
178
|
isDisabled: isDisabled
|
139
179
|
});
|
@@ -153,7 +193,7 @@ function $86793250183ac29e$var$TextFieldBase(props, ref) {
|
|
153
193
|
let ElementType = multiLine ? "textarea" : "input";
|
154
194
|
let isInvalid = validationState === "invalid" && !isDisabled;
|
155
195
|
if (icon) {
|
156
|
-
let UNSAFE_className = (0, $74aPB$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($
|
196
|
+
let UNSAFE_className = (0, $74aPB$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5yTyQ))), icon.props && icon.props.UNSAFE_className, "spectrum-Textfield-icon");
|
157
197
|
icon = /*#__PURE__*/ (0, $74aPB$react.cloneElement)(icon, {
|
158
198
|
UNSAFE_className: UNSAFE_className,
|
159
199
|
size: "S"
|
@@ -161,14 +201,14 @@ function $86793250183ac29e$var$TextFieldBase(props, ref) {
|
|
161
201
|
}
|
162
202
|
let validationIcon = isInvalid ? /*#__PURE__*/ (0, ($parcel$interopDefault($74aPB$react))).createElement((0, ($parcel$interopDefault($74aPB$spectrumiconsuiAlertMedium))), null) : /*#__PURE__*/ (0, ($parcel$interopDefault($74aPB$react))).createElement((0, ($parcel$interopDefault($74aPB$spectrumiconsuiCheckmarkMedium))), null);
|
163
203
|
let validation = /*#__PURE__*/ (0, $74aPB$react.cloneElement)(validationIcon, {
|
164
|
-
UNSAFE_className: (0, $74aPB$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($
|
204
|
+
UNSAFE_className: (0, $74aPB$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5yTyQ))), "spectrum-Textfield-validationIcon", validationIconClassName)
|
165
205
|
});
|
166
206
|
let { focusProps: focusProps, isFocusVisible: isFocusVisible } = (0, $74aPB$reactariafocus.useFocusRing)({
|
167
207
|
isTextInput: true,
|
168
208
|
autoFocus: autoFocus
|
169
209
|
});
|
170
210
|
let textField = /*#__PURE__*/ (0, ($parcel$interopDefault($74aPB$react))).createElement("div", {
|
171
|
-
className: (0, $74aPB$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($
|
211
|
+
className: (0, $74aPB$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5yTyQ))), "spectrum-Textfield", {
|
172
212
|
"spectrum-Textfield--invalid": isInvalid,
|
173
213
|
"spectrum-Textfield--valid": validationState === "valid" && !isDisabled,
|
174
214
|
"spectrum-Textfield--loadable": loadingIndicator,
|
@@ -180,7 +220,7 @@ function $86793250183ac29e$var$TextFieldBase(props, ref) {
|
|
180
220
|
...(0, $74aPB$reactariautils.mergeProps)(inputProps, hoverProps, focusProps),
|
181
221
|
ref: inputRef,
|
182
222
|
rows: multiLine ? 1 : undefined,
|
183
|
-
className: (0, $74aPB$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($
|
223
|
+
className: (0, $74aPB$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5yTyQ))), "spectrum-Textfield-input", {
|
184
224
|
"spectrum-Textfield-inputIcon": icon,
|
185
225
|
"is-hovered": isHovered
|
186
226
|
}, inputClassName)
|
@@ -190,7 +230,7 @@ function $86793250183ac29e$var$TextFieldBase(props, ref) {
|
|
190
230
|
labelProps: labelProps,
|
191
231
|
descriptionProps: descriptionProps,
|
192
232
|
errorMessageProps: errorMessageProps,
|
193
|
-
wrapperClassName: (0, $74aPB$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($
|
233
|
+
wrapperClassName: (0, $74aPB$reactspectrumutils.classNames)((0, (/*@__PURE__*/$parcel$interopDefault($5yTyQ))), "spectrum-Textfield-wrapper", {
|
194
234
|
"spectrum-Textfield-wrapper--quiet": isQuiet
|
195
235
|
}),
|
196
236
|
showErrorIcon: false,
|
@@ -203,11 +243,14 @@ const $86793250183ac29e$export$d22444a338b6e3c2 = /*#__PURE__*/ (0, $74aPB$react
|
|
203
243
|
|
204
244
|
|
205
245
|
|
246
|
+
|
206
247
|
function $eec649e464f3832d$var$TextArea(props, ref) {
|
207
248
|
props = (0, $74aPB$reactspectrumprovider.useProviderProps)(props);
|
249
|
+
props = (0, $74aPB$reactspectrumform.useFormProps)(props);
|
208
250
|
let { isDisabled: isDisabled = false, isQuiet: isQuiet = false, isReadOnly: isReadOnly = false, isRequired: isRequired = false, onChange: onChange, ...otherProps } = props;
|
251
|
+
var _props_defaultValue;
|
209
252
|
// not in stately because this is so we know when to re-measure, which is a spectrum design
|
210
|
-
let [inputValue, setInputValue] = (0, $74aPB$reactstatelyutils.useControlledState)(props.value, props.defaultValue, ()=>{});
|
253
|
+
let [inputValue, setInputValue] = (0, $74aPB$reactstatelyutils.useControlledState)(props.value, (_props_defaultValue = props.defaultValue) !== null && _props_defaultValue !== void 0 ? _props_defaultValue : "", ()=>{});
|
211
254
|
let inputRef = (0, $74aPB$react.useRef)(null);
|
212
255
|
let onHeightChange = (0, $74aPB$react.useCallback)(()=>{
|
213
256
|
// Quiet textareas always grow based on their text content.
|
@@ -241,7 +284,7 @@ function $eec649e464f3832d$var$TextArea(props, ref) {
|
|
241
284
|
inputRef
|
242
285
|
]);
|
243
286
|
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");
|
244
|
-
let
|
287
|
+
let result = (0, $74aPB$reactariatextfield.useTextField)({
|
245
288
|
...props,
|
246
289
|
onChange: (0, $74aPB$reactariautils.chain)(onChange, setInputValue),
|
247
290
|
inputElementType: "textarea"
|
@@ -250,10 +293,7 @@ function $eec649e464f3832d$var$TextArea(props, ref) {
|
|
250
293
|
...otherProps,
|
251
294
|
ref: ref,
|
252
295
|
inputRef: inputRef,
|
253
|
-
|
254
|
-
inputProps: inputProps,
|
255
|
-
descriptionProps: descriptionProps,
|
256
|
-
errorMessageProps: errorMessageProps,
|
296
|
+
...result,
|
257
297
|
multiLine: true,
|
258
298
|
isDisabled: isDisabled,
|
259
299
|
isQuiet: isQuiet,
|
@@ -282,17 +322,16 @@ function $eec649e464f3832d$var$TextArea(props, ref) {
|
|
282
322
|
|
283
323
|
|
284
324
|
|
325
|
+
|
285
326
|
function $34fd51d50eb4b056$var$TextField(props, ref) {
|
286
327
|
props = (0, $74aPB$reactspectrumprovider.useProviderProps)(props);
|
328
|
+
props = (0, $74aPB$reactspectrumform.useFormProps)(props);
|
287
329
|
let inputRef = (0, $74aPB$react.useRef)(null);
|
288
|
-
let
|
330
|
+
let result = (0, $74aPB$reactariatextfield.useTextField)(props, inputRef);
|
289
331
|
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");
|
290
332
|
return /*#__PURE__*/ (0, ($parcel$interopDefault($74aPB$react))).createElement((0, $86793250183ac29e$export$d22444a338b6e3c2), {
|
291
333
|
...props,
|
292
|
-
|
293
|
-
inputProps: inputProps,
|
294
|
-
descriptionProps: descriptionProps,
|
295
|
-
errorMessageProps: errorMessageProps,
|
334
|
+
...result,
|
296
335
|
ref: ref,
|
297
336
|
inputRef: inputRef
|
298
337
|
});
|