@react-spectrum/form 3.5.2 → 3.6.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.
- package/dist/import.mjs +160 -0
- package/package.json +11 -6
package/dist/import.mjs
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import "./main.css";
|
|
2
|
+
import {useStyleProps as $011V3$useStyleProps, useDOMRef as $011V3$useDOMRef, classNames as $011V3$classNames} from "@react-spectrum/utils";
|
|
3
|
+
import {filterDOMProps as $011V3$filterDOMProps} from "@react-aria/utils";
|
|
4
|
+
import {useProviderProps as $011V3$useProviderProps, Provider as $011V3$Provider} from "@react-spectrum/provider";
|
|
5
|
+
import $011V3$react, {useContext as $011V3$useContext} from "react";
|
|
6
|
+
|
|
7
|
+
function $parcel$interopDefault(a) {
|
|
8
|
+
return a && a.__esModule ? a.default : a;
|
|
9
|
+
}
|
|
10
|
+
function $parcel$export(e, n, v, s) {
|
|
11
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
12
|
+
}
|
|
13
|
+
/*
|
|
14
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
15
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
16
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
17
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
*
|
|
19
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
20
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
21
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
22
|
+
* governing permissions and limitations under the License.
|
|
23
|
+
*/ /// <reference types="css-module-types" />
|
|
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
|
+
*/
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
var $cd231e464c886c86$exports = {};
|
|
39
|
+
|
|
40
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel", () => $cd231e464c886c86$export$493d18e796ae054, (v) => $cd231e464c886c86$export$493d18e796ae054 = v);
|
|
41
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--positionSide", () => $cd231e464c886c86$export$9e6f19dc21f22f2e, (v) => $cd231e464c886c86$export$9e6f19dc21f22f2e = v);
|
|
42
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel-requiredIcon", () => $cd231e464c886c86$export$7c47642c7d46f3c9, (v) => $cd231e464c886c86$export$7c47642c7d46f3c9 = v);
|
|
43
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--alignEnd", () => $cd231e464c886c86$export$885efcc08143a987, (v) => $cd231e464c886c86$export$885efcc08143a987 = v);
|
|
44
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field", () => $cd231e464c886c86$export$f6d480ae1e56eba0, (v) => $cd231e464c886c86$export$f6d480ae1e56eba0 = v);
|
|
45
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-contextualHelp", () => $cd231e464c886c86$export$24fb860d16dd2d3f, (v) => $cd231e464c886c86$export$24fb860d16dd2d3f = v);
|
|
46
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionTop", () => $cd231e464c886c86$export$a4ea780a9064d7f9, (v) => $cd231e464c886c86$export$a4ea780a9064d7f9 = v);
|
|
47
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-field", () => $cd231e464c886c86$export$3ab8a3dc7f0563d, (v) => $cd231e464c886c86$export$3ab8a3dc7f0563d = v);
|
|
48
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--alignEnd", () => $cd231e464c886c86$export$5354c9be7ada5f83, (v) => $cd231e464c886c86$export$5354c9be7ada5f83 = v);
|
|
49
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionSide", () => $cd231e464c886c86$export$2963225c91179589, (v) => $cd231e464c886c86$export$2963225c91179589 = v);
|
|
50
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-wrapper", () => $cd231e464c886c86$export$127df0b7290eb8ef, (v) => $cd231e464c886c86$export$127df0b7290eb8ef = v);
|
|
51
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--hasContextualHelp", () => $cd231e464c886c86$export$9ba23707a252cdd4, (v) => $cd231e464c886c86$export$9ba23707a252cdd4 = v);
|
|
52
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form", () => $cd231e464c886c86$export$94d2bcc94afabd89, (v) => $cd231e464c886c86$export$94d2bcc94afabd89 = v);
|
|
53
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionSide", () => $cd231e464c886c86$export$7f44db659563c8f4, (v) => $cd231e464c886c86$export$7f44db659563c8f4 = v);
|
|
54
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-labelCell", () => $cd231e464c886c86$export$9cde5aecff012641, (v) => $cd231e464c886c86$export$9cde5aecff012641 = v);
|
|
55
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-labelWrapper", () => $cd231e464c886c86$export$a872a8c78b26c9e0, (v) => $cd231e464c886c86$export$a872a8c78b26c9e0 = v);
|
|
56
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionTop", () => $cd231e464c886c86$export$11b8bc81fe551057, (v) => $cd231e464c886c86$export$11b8bc81fe551057 = v);
|
|
57
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-LabeledValue", () => $cd231e464c886c86$export$79f9a5e9dd010c8d, (v) => $cd231e464c886c86$export$79f9a5e9dd010c8d = v);
|
|
58
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form-itemLabel", () => $cd231e464c886c86$export$51ec27881a1e3928, (v) => $cd231e464c886c86$export$51ec27881a1e3928 = v);
|
|
59
|
+
$parcel$export($cd231e464c886c86$exports, "is-disabled", () => $cd231e464c886c86$export$d35bc1e505d1ebbf, (v) => $cd231e464c886c86$export$d35bc1e505d1ebbf = v);
|
|
60
|
+
var $cd231e464c886c86$export$493d18e796ae054;
|
|
61
|
+
var $cd231e464c886c86$export$9e6f19dc21f22f2e;
|
|
62
|
+
var $cd231e464c886c86$export$7c47642c7d46f3c9;
|
|
63
|
+
var $cd231e464c886c86$export$885efcc08143a987;
|
|
64
|
+
var $cd231e464c886c86$export$f6d480ae1e56eba0;
|
|
65
|
+
var $cd231e464c886c86$export$24fb860d16dd2d3f;
|
|
66
|
+
var $cd231e464c886c86$export$a4ea780a9064d7f9;
|
|
67
|
+
var $cd231e464c886c86$export$3ab8a3dc7f0563d;
|
|
68
|
+
var $cd231e464c886c86$export$5354c9be7ada5f83;
|
|
69
|
+
var $cd231e464c886c86$export$2963225c91179589;
|
|
70
|
+
var $cd231e464c886c86$export$127df0b7290eb8ef;
|
|
71
|
+
var $cd231e464c886c86$export$9ba23707a252cdd4;
|
|
72
|
+
var $cd231e464c886c86$export$94d2bcc94afabd89;
|
|
73
|
+
var $cd231e464c886c86$export$7f44db659563c8f4;
|
|
74
|
+
var $cd231e464c886c86$export$9cde5aecff012641;
|
|
75
|
+
var $cd231e464c886c86$export$a872a8c78b26c9e0;
|
|
76
|
+
var $cd231e464c886c86$export$11b8bc81fe551057;
|
|
77
|
+
var $cd231e464c886c86$export$79f9a5e9dd010c8d;
|
|
78
|
+
var $cd231e464c886c86$export$51ec27881a1e3928;
|
|
79
|
+
var $cd231e464c886c86$export$d35bc1e505d1ebbf;
|
|
80
|
+
$cd231e464c886c86$export$493d18e796ae054 = "spectrum-FieldLabel_d2db1f";
|
|
81
|
+
$cd231e464c886c86$export$9e6f19dc21f22f2e = "spectrum-FieldLabel--positionSide_d2db1f";
|
|
82
|
+
$cd231e464c886c86$export$7c47642c7d46f3c9 = "spectrum-FieldLabel-requiredIcon_d2db1f";
|
|
83
|
+
$cd231e464c886c86$export$885efcc08143a987 = "spectrum-FieldLabel--alignEnd_d2db1f";
|
|
84
|
+
$cd231e464c886c86$export$f6d480ae1e56eba0 = "spectrum-Field_d2db1f";
|
|
85
|
+
$cd231e464c886c86$export$24fb860d16dd2d3f = "spectrum-Field-contextualHelp_d2db1f";
|
|
86
|
+
$cd231e464c886c86$export$a4ea780a9064d7f9 = "spectrum-Field--positionTop_d2db1f";
|
|
87
|
+
$cd231e464c886c86$export$3ab8a3dc7f0563d = "spectrum-Field-field_d2db1f";
|
|
88
|
+
$cd231e464c886c86$export$5354c9be7ada5f83 = "spectrum-Field--alignEnd_d2db1f";
|
|
89
|
+
$cd231e464c886c86$export$2963225c91179589 = "spectrum-Field--positionSide_d2db1f";
|
|
90
|
+
$cd231e464c886c86$export$127df0b7290eb8ef = "spectrum-Field-wrapper_d2db1f";
|
|
91
|
+
$cd231e464c886c86$export$9ba23707a252cdd4 = "spectrum-Field--hasContextualHelp_d2db1f";
|
|
92
|
+
$cd231e464c886c86$export$94d2bcc94afabd89 = "spectrum-Form_d2db1f";
|
|
93
|
+
$cd231e464c886c86$export$7f44db659563c8f4 = "spectrum-Form--positionSide_d2db1f";
|
|
94
|
+
$cd231e464c886c86$export$9cde5aecff012641 = "spectrum-Field-labelCell_d2db1f";
|
|
95
|
+
$cd231e464c886c86$export$a872a8c78b26c9e0 = "spectrum-Field-labelWrapper_d2db1f";
|
|
96
|
+
$cd231e464c886c86$export$11b8bc81fe551057 = "spectrum-Form--positionTop_d2db1f";
|
|
97
|
+
$cd231e464c886c86$export$79f9a5e9dd010c8d = "spectrum-LabeledValue_d2db1f";
|
|
98
|
+
$cd231e464c886c86$export$51ec27881a1e3928 = "spectrum-Form-itemLabel_d2db1f";
|
|
99
|
+
$cd231e464c886c86$export$d35bc1e505d1ebbf = "is-disabled_d2db1f";
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
let $ac118ceca79b8650$var$FormContext = /*#__PURE__*/ (0, $011V3$react).createContext(null);
|
|
103
|
+
function $ac118ceca79b8650$export$a6b5be5c6b451665(props) {
|
|
104
|
+
let ctx = (0, $011V3$useContext)($ac118ceca79b8650$var$FormContext);
|
|
105
|
+
if (ctx) return {
|
|
106
|
+
...ctx,
|
|
107
|
+
...props
|
|
108
|
+
};
|
|
109
|
+
return props;
|
|
110
|
+
}
|
|
111
|
+
const $ac118ceca79b8650$var$formPropNames = new Set([
|
|
112
|
+
"action",
|
|
113
|
+
"autoComplete",
|
|
114
|
+
"encType",
|
|
115
|
+
"method",
|
|
116
|
+
"target",
|
|
117
|
+
"onSubmit"
|
|
118
|
+
]);
|
|
119
|
+
function $ac118ceca79b8650$var$Form(props, ref) {
|
|
120
|
+
props = (0, $011V3$useProviderProps)(props);
|
|
121
|
+
let { children: children , labelPosition: labelPosition = "top" , labelAlign: labelAlign = "start" , isRequired: isRequired , necessityIndicator: necessityIndicator , isQuiet: isQuiet , isEmphasized: isEmphasized , isDisabled: isDisabled , isReadOnly: isReadOnly , validationState: validationState , ...otherProps } = props;
|
|
122
|
+
let { styleProps: styleProps } = (0, $011V3$useStyleProps)(otherProps);
|
|
123
|
+
let domRef = (0, $011V3$useDOMRef)(ref);
|
|
124
|
+
let ctx = {
|
|
125
|
+
labelPosition: labelPosition,
|
|
126
|
+
labelAlign: labelAlign,
|
|
127
|
+
necessityIndicator: necessityIndicator
|
|
128
|
+
};
|
|
129
|
+
return /*#__PURE__*/ (0, $011V3$react).createElement("form", {
|
|
130
|
+
...(0, $011V3$filterDOMProps)(otherProps, {
|
|
131
|
+
labelable: true,
|
|
132
|
+
propNames: $ac118ceca79b8650$var$formPropNames
|
|
133
|
+
}),
|
|
134
|
+
...styleProps,
|
|
135
|
+
noValidate: true,
|
|
136
|
+
ref: domRef,
|
|
137
|
+
className: (0, $011V3$classNames)((0, (/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports))), "spectrum-Form", {
|
|
138
|
+
"spectrum-Form--positionSide": labelPosition === "side",
|
|
139
|
+
"spectrum-Form--positionTop": labelPosition === "top"
|
|
140
|
+
}, styleProps.className)
|
|
141
|
+
}, /*#__PURE__*/ (0, $011V3$react).createElement($ac118ceca79b8650$var$FormContext.Provider, {
|
|
142
|
+
value: ctx
|
|
143
|
+
}, /*#__PURE__*/ (0, $011V3$react).createElement((0, $011V3$Provider), {
|
|
144
|
+
isQuiet: isQuiet,
|
|
145
|
+
isEmphasized: isEmphasized,
|
|
146
|
+
isDisabled: isDisabled,
|
|
147
|
+
isReadOnly: isReadOnly,
|
|
148
|
+
isRequired: isRequired,
|
|
149
|
+
validationState: validationState
|
|
150
|
+
}, children)));
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.
|
|
154
|
+
*/ const $ac118ceca79b8650$export$a7fed597f4b8afd8 = /*#__PURE__*/ (0, $011V3$react).forwardRef($ac118ceca79b8650$var$Form);
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
export {$ac118ceca79b8650$export$a6b5be5c6b451665 as useFormProps, $ac118ceca79b8650$export$a7fed597f4b8afd8 as Form};
|
|
160
|
+
//# sourceMappingURL=module.js.map
|
package/package.json
CHANGED
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/form",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.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
|
+
"exports": {
|
|
9
|
+
"types": "./dist/types.d.ts",
|
|
10
|
+
"import": "./dist/import.mjs",
|
|
11
|
+
"require": "./dist/main.js"
|
|
12
|
+
},
|
|
8
13
|
"types": "dist/types.d.ts",
|
|
9
14
|
"source": "src/index.ts",
|
|
10
15
|
"files": [
|
|
@@ -31,10 +36,10 @@
|
|
|
31
36
|
"url": "https://github.com/adobe/react-spectrum"
|
|
32
37
|
},
|
|
33
38
|
"dependencies": {
|
|
34
|
-
"@react-aria/utils": "^3.
|
|
35
|
-
"@react-spectrum/utils": "^3.
|
|
36
|
-
"@react-types/form": "^3.4.
|
|
37
|
-
"@react-types/shared": "^3.
|
|
39
|
+
"@react-aria/utils": "^3.15.0",
|
|
40
|
+
"@react-spectrum/utils": "^3.9.0",
|
|
41
|
+
"@react-types/form": "^3.4.2",
|
|
42
|
+
"@react-types/shared": "^3.17.0",
|
|
38
43
|
"@swc/helpers": "^0.4.14"
|
|
39
44
|
},
|
|
40
45
|
"devDependencies": {
|
|
@@ -47,5 +52,5 @@
|
|
|
47
52
|
"publishConfig": {
|
|
48
53
|
"access": "public"
|
|
49
54
|
},
|
|
50
|
-
"gitHead": "
|
|
55
|
+
"gitHead": "a0efee84aa178cb1a202951dfd6d8de02b292307"
|
|
51
56
|
}
|