@react-spectrum/form 3.2.2 → 3.2.6

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/main.css CHANGED
@@ -1,2 +1 @@
1
- [dir=ltr] ._spectrum-FieldLabel_36b9b{text-align:left}[dir=rtl] ._spectrum-FieldLabel_36b9b{text-align:right}._spectrum-FieldLabel_36b9b{display:-ms-flexbox;display:flex;-ms-flex:0 0 auto;flex:0 0 auto;box-sizing:border-box;padding:var(--spectrum-global-dimension-size-50) 0 var(--spectrum-global-dimension-size-65);font-size:var(--spectrum-global-dimension-font-size-75);font-weight:var(--spectrum-global-font-weight-regular,400);line-height:var(--spectrum-global-font-line-height-small,1.3);vertical-align:top;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto;font-smoothing:subpixel-antialiased;cursor:default}[dir=ltr] ._spectrum-FieldLabel--positionSide_36b9b{padding-right:var(--spectrum-global-dimension-size-100)}[dir=rtl] ._spectrum-FieldLabel--positionSide_36b9b{padding-left:var(--spectrum-global-dimension-size-100)}._spectrum-FieldLabel--positionSide_36b9b{display:-ms-inline-flexbox;display:inline-flex;padding-top:var(--spectrum-global-dimension-size-100)}[dir=ltr] ._spectrum-FieldLabel-requiredIcon_36b9b{margin-right:0}[dir=rtl] ._spectrum-FieldLabel-requiredIcon_36b9b{margin-left:0}[dir=ltr] ._spectrum-FieldLabel-requiredIcon_36b9b{margin-left:var(--spectrum-global-dimension-size-25)}[dir=rtl] ._spectrum-FieldLabel-requiredIcon_36b9b{margin-right:var(--spectrum-global-dimension-size-25)}._spectrum-FieldLabel-requiredIcon_36b9b{margin-top:var(--spectrum-global-dimension-size-50);margin-bottom:0}[dir=ltr] ._spectrum-FieldLabel--alignEnd_36b9b{text-align:right}[dir=rtl] ._spectrum-FieldLabel--alignEnd_36b9b{text-align:left}._spectrum-FieldLabel--alignEnd_36b9b{-ms-flex-pack:end;justify-content:flex-end}._spectrum-Field_36b9b{--spectrum-field-default-width:var(--spectrum-global-dimension-size-2400)}._spectrum-Field_36b9b._spectrum-Field--positionTop_36b9b{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-direction:column;flex-direction:column;width:var(--spectrum-field-default-width)}._spectrum-Field_36b9b._spectrum-Field--positionTop_36b9b ._spectrum-Field-field_36b9b{width:100%}._spectrum-Field_36b9b._spectrum-Field--positionTop_36b9b ._spectrum-Field-field--multiline_36b9b{-ms-flex:1 1 auto;flex:1 1 auto}._spectrum-Field_36b9b._spectrum-Field--positionSide_36b9b{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:start;align-items:flex-start}._spectrum-Field_36b9b._spectrum-Field--positionSide_36b9b ._spectrum-Field-field_36b9b{-ms-flex:1;flex:1}._spectrum-Field_36b9b._spectrum-Field--positionSide_36b9b ._spectrum-Field-field--multiline_36b9b{height:100%}[dir=ltr] ._spectrum-Form_36b9b._spectrum-Form--positionSide_36b9b{text-align:left}[dir=rtl] ._spectrum-Form_36b9b._spectrum-Form--positionSide_36b9b{text-align:right}._spectrum-Form_36b9b._spectrum-Form--positionSide_36b9b{display:table;border-collapse:initial;border-spacing:0 var(--spectrum-global-dimension-size-300);margin:calc(var(--spectrum-global-dimension-size-250) * -1) 0}._spectrum-Form_36b9b._spectrum-Form--positionSide_36b9b ._spectrum-Field_36b9b{display:table-row;width:100%}._spectrum-Form_36b9b._spectrum-Form--positionSide_36b9b ._spectrum-FieldLabel_36b9b{display:table-cell}._spectrum-Form_36b9b._spectrum-Form--positionSide_36b9b ._spectrum-Field-field_36b9b{display:table-cell;width:auto;min-width:var(--spectrum-global-dimension-size-2400)}._spectrum-Form_36b9b._spectrum-Form--positionTop_36b9b{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:0;min-width:var(--spectrum-global-dimension-size-2400)}._spectrum-Form_36b9b._spectrum-Form--positionTop_36b9b>*{margin-top:var(--spectrum-global-dimension-size-100);width:100%}._spectrum-FieldLabel_36b9b,._spectrum-Form-itemLabel_36b9b{color:var(--spectrum-alias-label-text-color,var(--spectrum-global-color-gray-700))}._spectrum-FieldLabel_36b9b._is-disabled_36b9b,._spectrum-FieldLabel_36b9b._is-disabled_36b9b ._spectrum-FieldLabel-requiredIcon_36b9b,._spectrum-Form-itemLabel_36b9b._is-disabled_36b9b,._spectrum-Form-itemLabel_36b9b._is-disabled_36b9b ._spectrum-FieldLabel-requiredIcon_36b9b{color:var(--spectrum-alias-text-color-disabled,var(--spectrum-global-color-gray-500))}._spectrum-FieldLabel-requiredIcon_36b9b{color:var(--spectrum-global-color-gray-600)}
2
- /*# sourceMappingURL=main.css.map */
1
+ [dir=ltr] .spectrum-FieldLabel_d2db1f{text-align:left}[dir=rtl] .spectrum-FieldLabel_d2db1f{text-align:right}.spectrum-FieldLabel_d2db1f{box-sizing:border-box;padding:var(--spectrum-fieldlabel-padding-top,var(--spectrum-global-dimension-size-50))0 var(--spectrum-fieldlabel-padding-bottom,var(--spectrum-global-dimension-size-65));font-size:var(--spectrum-fieldlabel-text-size,var(--spectrum-global-dimension-font-size-75));font-weight:var(--spectrum-fieldlabel-text-font-weight,var(--spectrum-global-font-weight-regular));line-height:var(--spectrum-fieldlabel-text-line-height,var(--spectrum-global-font-line-height-small));vertical-align:top;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto;font-smoothing:subpixel-antialiased;cursor:default;flex:none;display:flex}[dir=ltr] .spectrum-FieldLabel--positionSide_d2db1f{padding-right:var(--spectrum-fieldlabel-side-padding-x,var(--spectrum-global-dimension-size-100))}[dir=rtl] .spectrum-FieldLabel--positionSide_d2db1f{padding-left:var(--spectrum-fieldlabel-side-padding-x,var(--spectrum-global-dimension-size-100))}.spectrum-FieldLabel--positionSide_d2db1f{padding-top:var(--spectrum-fieldlabel-side-padding-top,var(--spectrum-global-dimension-size-100));display:inline-flex}[dir=ltr] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-right:0}[dir=rtl] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-left:0}[dir=ltr] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-left:var(--spectrum-fieldlabel-asterisk-gap,var(--spectrum-global-dimension-size-25))}[dir=rtl] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-right:var(--spectrum-fieldlabel-asterisk-gap,var(--spectrum-global-dimension-size-25))}.spectrum-FieldLabel-requiredIcon_d2db1f{margin-top:var(--spectrum-fieldlabel-asterisk-margin-y,var(--spectrum-global-dimension-size-50));margin-bottom:0}[dir=ltr] .spectrum-FieldLabel--alignEnd_d2db1f{text-align:right}[dir=rtl] .spectrum-FieldLabel--alignEnd_d2db1f{text-align:left}.spectrum-FieldLabel--alignEnd_d2db1f{justify-content:flex-end}.spectrum-Field_d2db1f{--spectrum-field-default-width:var(--spectrum-alias-single-line-width,var(--spectrum-global-dimension-size-2400))}.spectrum-Field_d2db1f.spectrum-Field--positionTop_d2db1f{width:var(--spectrum-field-default-width);flex-direction:column;display:inline-flex}.spectrum-Field_d2db1f.spectrum-Field--positionTop_d2db1f .spectrum-Field-field_d2db1f{width:100%}.spectrum-Field_d2db1f.spectrum-Field--positionTop_d2db1f .spectrum-Field-field--multiline_d2db1f{flex:auto}.spectrum-Field_d2db1f.spectrum-Field--positionSide_d2db1f{align-items:flex-start;display:inline-flex}.spectrum-Field_d2db1f.spectrum-Field--positionSide_d2db1f .spectrum-Field-wrapper_d2db1f{min-width:0;width:var(--spectrum-field-default-width);flex:1}.spectrum-Field_d2db1f.spectrum-Field--positionSide_d2db1f .spectrum-Field-wrapper_d2db1f .spectrum-Field-field_d2db1f{width:100%}.spectrum-Field_d2db1f.spectrum-Field--positionSide_d2db1f .spectrum-Field-field_d2db1f{min-width:0;flex:1}.spectrum-Field_d2db1f.spectrum-Field--positionSide_d2db1f .spectrum-Field-field--multiline_d2db1f{height:100%}[dir=ltr] .spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f{text-align:left}[dir=rtl] .spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f{text-align:right}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f{border-collapse:separate;border-spacing:0 var(--spectrum-global-dimension-size-300);margin:calc(var(--spectrum-global-dimension-size-250)*-1)0;display:table}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f .spectrum-Field_d2db1f{width:100%;display:table-row}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f .spectrum-FieldLabel_d2db1f{display:table-cell}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f .spectrum-Field-wrapper_d2db1f{width:100%}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f .spectrum-Field-field_d2db1f{width:auto;min-width:var(--spectrum-alias-single-line-width,var(--spectrum-global-dimension-size-2400));display:table-cell}.spectrum-Form_d2db1f.spectrum-Form--positionTop_d2db1f{min-width:var(--spectrum-alias-single-line-width,var(--spectrum-global-dimension-size-2400));flex-direction:column;margin:0;display:flex}.spectrum-Form_d2db1f.spectrum-Form--positionTop_d2db1f>*{margin-top:var(--spectrum-global-dimension-size-100);width:100%}.spectrum-FieldLabel_d2db1f,.spectrum-Form-itemLabel_d2db1f{color:var(--spectrum-fieldlabel-text-color,var(--spectrum-alias-label-text-color))}.spectrum-FieldLabel_d2db1f.is-disabled_d2db1f,.spectrum-Form-itemLabel_d2db1f.is-disabled_d2db1f{color:var(--spectrum-fieldlabel-text-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-FieldLabel_d2db1f.is-disabled_d2db1f .spectrum-FieldLabel-requiredIcon_d2db1f,.spectrum-Form-itemLabel_d2db1f.is-disabled_d2db1f .spectrum-FieldLabel-requiredIcon_d2db1f{color:var(--spectrum-fieldlabel-asterisk-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-FieldLabel-requiredIcon_d2db1f{color:var(--spectrum-fieldlabel-asterisk-color,var(--spectrum-global-color-gray-600))}
package/dist/main.js CHANGED
@@ -1,118 +1,144 @@
1
- var _react2 = require("react");
2
-
3
- var _react = $parcel$interopDefault(_react2);
4
-
5
- var {
6
- useContext
7
- } = _react2;
8
-
9
- var {
10
- Provider,
11
- useProviderProps
12
- } = require("@react-spectrum/provider");
13
-
14
- var {
15
- filterDOMProps
16
- } = require("@react-aria/utils");
17
-
18
- var {
19
- classNames,
20
- useDOMRef,
21
- useStyleProps
22
- } = require("@react-spectrum/utils");
23
-
24
- var _babelRuntimeHelpersExtends = $parcel$interopDefault(require("@babel/runtime/helpers/extends"));
25
-
26
- var _babelRuntimeHelpersObjectWithoutPropertiesLoose = $parcel$interopDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
27
-
28
1
  require("./main.css");
29
-
2
+ var $etHtu$reactspectrumutils = require("@react-spectrum/utils");
3
+ var $etHtu$reactariautils = require("@react-aria/utils");
4
+ var $etHtu$reactspectrumprovider = require("@react-spectrum/provider");
5
+ var $etHtu$react = require("react");
6
+
7
+ function $parcel$exportWildcard(dest, source) {
8
+ Object.keys(source).forEach(function(key) {
9
+ if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
10
+ return;
11
+ }
12
+
13
+ Object.defineProperty(dest, key, {
14
+ enumerable: true,
15
+ get: function get() {
16
+ return source[key];
17
+ }
18
+ });
19
+ });
20
+
21
+ return dest;
22
+ }
30
23
  function $parcel$interopDefault(a) {
31
24
  return a && a.__esModule ? a.default : a;
32
25
  }
33
-
34
- // ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/fieldlabel/vars.css
35
- var $a0bedb1888ff92cb3407d1a60d76e$exports = {};
36
- $a0bedb1888ff92cb3407d1a60d76e$exports = {
37
- "spectrum-FieldLabel": "_spectrum-FieldLabel_36b9b",
38
- "spectrum-FieldLabel--positionSide": "_spectrum-FieldLabel--positionSide_36b9b",
39
- "spectrum-FieldLabel-requiredIcon": "_spectrum-FieldLabel-requiredIcon_36b9b",
40
- "spectrum-FieldLabel--alignEnd": "_spectrum-FieldLabel--alignEnd_36b9b",
41
- "spectrum-Field": "_spectrum-Field_36b9b",
42
- "spectrum-Field--positionTop": "_spectrum-Field--positionTop_36b9b",
43
- "spectrum-Field-field": "_spectrum-Field-field_36b9b",
44
- "spectrum-Field-field--multiline": "_spectrum-Field-field--multiline_36b9b",
45
- "spectrum-Field--positionSide": "_spectrum-Field--positionSide_36b9b",
46
- "spectrum-Form": "_spectrum-Form_36b9b",
47
- "spectrum-Form--positionSide": "_spectrum-Form--positionSide_36b9b",
48
- "spectrum-Form--positionTop": "_spectrum-Form--positionTop_36b9b",
49
- "spectrum-Form-itemLabel": "_spectrum-Form-itemLabel_36b9b",
50
- "is-disabled": "_is-disabled_36b9b"
51
- };
52
-
53
- let $a04c1031b5e1cab168e087a6837ba8be$var$FormContext = /*#__PURE__*/_react.createContext({});
54
-
55
- function useFormProps(props) {
56
- let ctx = useContext($a04c1031b5e1cab168e087a6837ba8be$var$FormContext);
57
- return _babelRuntimeHelpersExtends({}, ctx, props);
26
+ function $parcel$export(e, n, v, s) {
27
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
58
28
  }
59
-
60
- exports.useFormProps = useFormProps;
61
- const $a04c1031b5e1cab168e087a6837ba8be$var$formPropNames = new Set(['action', 'autoComplete', 'encType', 'method', 'target', 'onSubmit']);
62
- var $a0bedb1888ff92cb3407d1a60d76e$$interop$default = $parcel$interopDefault($a0bedb1888ff92cb3407d1a60d76e$exports);
63
-
64
- function $a04c1031b5e1cab168e087a6837ba8be$var$Form(props, ref) {
65
- props = useProviderProps(props);
66
-
67
- let {
68
- children,
69
- labelPosition = 'top',
70
- labelAlign = 'start',
71
- isRequired,
72
- necessityIndicator,
73
- isQuiet,
74
- isEmphasized,
75
- isDisabled,
76
- isReadOnly,
77
- validationState
78
- } = props,
79
- otherProps = _babelRuntimeHelpersObjectWithoutPropertiesLoose(props, ["children", "labelPosition", "labelAlign", "isRequired", "necessityIndicator", "isQuiet", "isEmphasized", "isDisabled", "isReadOnly", "validationState"]);
80
-
81
- let {
82
- styleProps
83
- } = useStyleProps(otherProps);
84
- let domRef = useDOMRef(ref);
85
- let ctx = {
86
- labelPosition,
87
- labelAlign,
88
- necessityIndicator
89
- };
90
- return /*#__PURE__*/_react.createElement("form", _babelRuntimeHelpersExtends({}, filterDOMProps(otherProps, {
91
- labelable: true,
92
- propNames: $a04c1031b5e1cab168e087a6837ba8be$var$formPropNames
93
- }), styleProps, {
94
- ref: domRef,
95
- className: classNames($a0bedb1888ff92cb3407d1a60d76e$$interop$default, 'spectrum-Form', {
96
- 'spectrum-Form--positionSide': labelPosition === 'side',
97
- 'spectrum-Form--positionTop': labelPosition === 'top'
98
- }, styleProps.className)
99
- }), /*#__PURE__*/_react.createElement($a04c1031b5e1cab168e087a6837ba8be$var$FormContext.Provider, {
100
- value: ctx
101
- }, /*#__PURE__*/_react.createElement(Provider, {
102
- isQuiet: isQuiet,
103
- isEmphasized: isEmphasized,
104
- isDisabled: isDisabled,
105
- isReadOnly: isReadOnly,
106
- isRequired: isRequired,
107
- validationState: validationState
108
- }, children)));
29
+ var $8f20d6b8c0818d0b$exports = {};
30
+
31
+ $parcel$export($8f20d6b8c0818d0b$exports, "useFormProps", () => $8f20d6b8c0818d0b$export$a6b5be5c6b451665);
32
+ $parcel$export($8f20d6b8c0818d0b$exports, "Form", () => $8f20d6b8c0818d0b$export$a7fed597f4b8afd8);
33
+
34
+
35
+
36
+
37
+ var $0043d8d062ef413c$exports = {};
38
+
39
+ $parcel$export($0043d8d062ef413c$exports, "spectrum-FieldLabel", () => $0043d8d062ef413c$export$493d18e796ae054, (v) => $0043d8d062ef413c$export$493d18e796ae054 = v);
40
+ $parcel$export($0043d8d062ef413c$exports, "spectrum-FieldLabel--positionSide", () => $0043d8d062ef413c$export$9e6f19dc21f22f2e, (v) => $0043d8d062ef413c$export$9e6f19dc21f22f2e = v);
41
+ $parcel$export($0043d8d062ef413c$exports, "spectrum-FieldLabel-requiredIcon", () => $0043d8d062ef413c$export$7c47642c7d46f3c9, (v) => $0043d8d062ef413c$export$7c47642c7d46f3c9 = v);
42
+ $parcel$export($0043d8d062ef413c$exports, "spectrum-FieldLabel--alignEnd", () => $0043d8d062ef413c$export$885efcc08143a987, (v) => $0043d8d062ef413c$export$885efcc08143a987 = v);
43
+ $parcel$export($0043d8d062ef413c$exports, "spectrum-Field", () => $0043d8d062ef413c$export$f6d480ae1e56eba0, (v) => $0043d8d062ef413c$export$f6d480ae1e56eba0 = v);
44
+ $parcel$export($0043d8d062ef413c$exports, "spectrum-Field--positionTop", () => $0043d8d062ef413c$export$a4ea780a9064d7f9, (v) => $0043d8d062ef413c$export$a4ea780a9064d7f9 = v);
45
+ $parcel$export($0043d8d062ef413c$exports, "spectrum-Field-field", () => $0043d8d062ef413c$export$3ab8a3dc7f0563d, (v) => $0043d8d062ef413c$export$3ab8a3dc7f0563d = v);
46
+ $parcel$export($0043d8d062ef413c$exports, "spectrum-Field-field--multiline", () => $0043d8d062ef413c$export$f58a1e966a92ba5e, (v) => $0043d8d062ef413c$export$f58a1e966a92ba5e = v);
47
+ $parcel$export($0043d8d062ef413c$exports, "spectrum-Field--positionSide", () => $0043d8d062ef413c$export$2963225c91179589, (v) => $0043d8d062ef413c$export$2963225c91179589 = v);
48
+ $parcel$export($0043d8d062ef413c$exports, "spectrum-Field-wrapper", () => $0043d8d062ef413c$export$127df0b7290eb8ef, (v) => $0043d8d062ef413c$export$127df0b7290eb8ef = v);
49
+ $parcel$export($0043d8d062ef413c$exports, "spectrum-Form", () => $0043d8d062ef413c$export$94d2bcc94afabd89, (v) => $0043d8d062ef413c$export$94d2bcc94afabd89 = v);
50
+ $parcel$export($0043d8d062ef413c$exports, "spectrum-Form--positionSide", () => $0043d8d062ef413c$export$7f44db659563c8f4, (v) => $0043d8d062ef413c$export$7f44db659563c8f4 = v);
51
+ $parcel$export($0043d8d062ef413c$exports, "spectrum-Form--positionTop", () => $0043d8d062ef413c$export$11b8bc81fe551057, (v) => $0043d8d062ef413c$export$11b8bc81fe551057 = v);
52
+ $parcel$export($0043d8d062ef413c$exports, "spectrum-Form-itemLabel", () => $0043d8d062ef413c$export$51ec27881a1e3928, (v) => $0043d8d062ef413c$export$51ec27881a1e3928 = v);
53
+ $parcel$export($0043d8d062ef413c$exports, "is-disabled", () => $0043d8d062ef413c$export$d35bc1e505d1ebbf, (v) => $0043d8d062ef413c$export$d35bc1e505d1ebbf = v);
54
+ var $0043d8d062ef413c$export$493d18e796ae054;
55
+ var $0043d8d062ef413c$export$9e6f19dc21f22f2e;
56
+ var $0043d8d062ef413c$export$7c47642c7d46f3c9;
57
+ var $0043d8d062ef413c$export$885efcc08143a987;
58
+ var $0043d8d062ef413c$export$f6d480ae1e56eba0;
59
+ var $0043d8d062ef413c$export$a4ea780a9064d7f9;
60
+ var $0043d8d062ef413c$export$3ab8a3dc7f0563d;
61
+ var $0043d8d062ef413c$export$f58a1e966a92ba5e;
62
+ var $0043d8d062ef413c$export$2963225c91179589;
63
+ var $0043d8d062ef413c$export$127df0b7290eb8ef;
64
+ var $0043d8d062ef413c$export$94d2bcc94afabd89;
65
+ var $0043d8d062ef413c$export$7f44db659563c8f4;
66
+ var $0043d8d062ef413c$export$11b8bc81fe551057;
67
+ var $0043d8d062ef413c$export$51ec27881a1e3928;
68
+ var $0043d8d062ef413c$export$d35bc1e505d1ebbf;
69
+ $0043d8d062ef413c$export$493d18e796ae054 = "spectrum-FieldLabel_d2db1f";
70
+ $0043d8d062ef413c$export$9e6f19dc21f22f2e = "spectrum-FieldLabel--positionSide_d2db1f";
71
+ $0043d8d062ef413c$export$7c47642c7d46f3c9 = "spectrum-FieldLabel-requiredIcon_d2db1f";
72
+ $0043d8d062ef413c$export$885efcc08143a987 = "spectrum-FieldLabel--alignEnd_d2db1f";
73
+ $0043d8d062ef413c$export$f6d480ae1e56eba0 = "spectrum-Field_d2db1f";
74
+ $0043d8d062ef413c$export$a4ea780a9064d7f9 = "spectrum-Field--positionTop_d2db1f";
75
+ $0043d8d062ef413c$export$3ab8a3dc7f0563d = "spectrum-Field-field_d2db1f";
76
+ $0043d8d062ef413c$export$f58a1e966a92ba5e = "spectrum-Field-field--multiline_d2db1f";
77
+ $0043d8d062ef413c$export$2963225c91179589 = "spectrum-Field--positionSide_d2db1f";
78
+ $0043d8d062ef413c$export$127df0b7290eb8ef = "spectrum-Field-wrapper_d2db1f";
79
+ $0043d8d062ef413c$export$94d2bcc94afabd89 = "spectrum-Form_d2db1f";
80
+ $0043d8d062ef413c$export$7f44db659563c8f4 = "spectrum-Form--positionSide_d2db1f";
81
+ $0043d8d062ef413c$export$11b8bc81fe551057 = "spectrum-Form--positionTop_d2db1f";
82
+ $0043d8d062ef413c$export$51ec27881a1e3928 = "spectrum-Form-itemLabel_d2db1f";
83
+ $0043d8d062ef413c$export$d35bc1e505d1ebbf = "is-disabled_d2db1f";
84
+
85
+
86
+ let $8f20d6b8c0818d0b$var$FormContext = /*#__PURE__*/ ($parcel$interopDefault($etHtu$react)).createContext({
87
+ });
88
+ function $8f20d6b8c0818d0b$export$a6b5be5c6b451665(props) {
89
+ let ctx = $etHtu$react.useContext($8f20d6b8c0818d0b$var$FormContext);
90
+ return {
91
+ ...ctx,
92
+ ...props
93
+ };
94
+ }
95
+ const $8f20d6b8c0818d0b$var$formPropNames = new Set([
96
+ 'action',
97
+ 'autoComplete',
98
+ 'encType',
99
+ 'method',
100
+ 'target',
101
+ 'onSubmit'
102
+ ]);
103
+ function $8f20d6b8c0818d0b$var$Form(props, ref) {
104
+ props = $etHtu$reactspectrumprovider.useProviderProps(props);
105
+ 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;
106
+ let { styleProps: styleProps } = $etHtu$reactspectrumutils.useStyleProps(otherProps);
107
+ let domRef = $etHtu$reactspectrumutils.useDOMRef(ref);
108
+ let ctx = {
109
+ labelPosition: labelPosition,
110
+ labelAlign: labelAlign,
111
+ necessityIndicator: necessityIndicator
112
+ };
113
+ return(/*#__PURE__*/ ($parcel$interopDefault($etHtu$react)).createElement("form", {
114
+ ...$etHtu$reactariautils.filterDOMProps(otherProps, {
115
+ labelable: true,
116
+ propNames: $8f20d6b8c0818d0b$var$formPropNames
117
+ }),
118
+ ...styleProps,
119
+ noValidate: true,
120
+ ref: domRef,
121
+ className: $etHtu$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($0043d8d062ef413c$exports)), 'spectrum-Form', {
122
+ 'spectrum-Form--positionSide': labelPosition === 'side',
123
+ 'spectrum-Form--positionTop': labelPosition === 'top'
124
+ }, styleProps.className)
125
+ }, /*#__PURE__*/ ($parcel$interopDefault($etHtu$react)).createElement($8f20d6b8c0818d0b$var$FormContext.Provider, {
126
+ value: ctx
127
+ }, /*#__PURE__*/ ($parcel$interopDefault($etHtu$react)).createElement($etHtu$reactspectrumprovider.Provider, {
128
+ isQuiet: isQuiet,
129
+ isEmphasized: isEmphasized,
130
+ isDisabled: isDisabled,
131
+ isReadOnly: isReadOnly,
132
+ isRequired: isRequired,
133
+ validationState: validationState
134
+ }, children))));
109
135
  }
110
136
  /**
111
137
  * Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.
112
- */
138
+ */ const $8f20d6b8c0818d0b$export$a7fed597f4b8afd8 = /*#__PURE__*/ ($parcel$interopDefault($etHtu$react)).forwardRef($8f20d6b8c0818d0b$var$Form);
139
+
113
140
 
141
+ $parcel$exportWildcard(module.exports, $8f20d6b8c0818d0b$exports);
114
142
 
115
- const Form = /*#__PURE__*/_react.forwardRef($a04c1031b5e1cab168e087a6837ba8be$var$Form);
116
143
 
117
- exports.Form = Form;
118
144
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC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S,CAAChB,GAAD,CAAtB;AAEA,MAAIL,GAAG,GAAG;AACRQ,IAAAA,aADQ;AAERC,IAAAA,UAFQ;AAGRE,IAAAA;AAHQ,GAAV;AAMA,sBACE,6DACMW,cAAc,CAACL,UAAD,EAAa;AAACM,IAAAA,SAAS,EAAE,IAAZ;AAAkBC,IAAAA,SAAS,EAAEtB;AAA7B,GAAb,CADpB,EAEMgB,UAFN;AAGE,IAAA,GAAG,EAAEE,MAHP;AAIE,IAAA,SAAS,EACPK,UAAU,kDAER,eAFQ,EAGR;AACE,qCAA+BjB,aAAa,KAAK,MADnD;AAEE,oCAA8BA,aAAa,KAAK;AAFlD,KAHQ,EAORU,UAAU,CAACQ,SAPH;AALd,mBAeE,qBAAC,iDAAD,CAAa,QAAb;AAAsB,IAAA,KAAK,EAAE1B;AAA7B,kBACE,qBAAC,QAAD;AACE,IAAA,OAAO,EAAEY,OADX;AAEE,IAAA,YAAY,EAAEC,YAFhB;AAGE,IAAA,UAAU,EAAEC,UAHd;AAIE,IAAA,UAAU,EAAEC,UAJd;AAKE,IAAA,UAAU,EAAEL,UALd;AAME,IAAA,eAAe,EAAEM;AANnB,KAOGT,QAPH,CADF,CAfF,CADF;AA6BD;AAED;;;;;AAGA,MAAMoB,IAAK,gBAAG/B,MAAK,CAACgC,UAAN,CAAiBxB,0CAAjB,CAAd","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/fieldlabel/vars.css","./packages/@react-spectrum/form/src/Form.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {Alignment, DOMRef, LabelPosition, SpectrumLabelableProps} from '@react-types/shared';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React, {useContext} from 'react';\nimport {SpectrumFormProps} from '@react-types/form';\nimport styles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\n\nlet FormContext = React.createContext<SpectrumLabelableProps>({});\nexport function useFormProps<T extends SpectrumLabelableProps>(props: T): T {\n let ctx = useContext(FormContext);\n return {...ctx, ...props};\n}\n\nconst formPropNames = new Set([\n 'action',\n 'autoComplete',\n 'encType',\n 'method',\n 'target',\n 'onSubmit'\n]);\n\nfunction Form(props: SpectrumFormProps, ref: DOMRef<HTMLFormElement>) {\n props = useProviderProps(props);\n let {\n children,\n labelPosition = 'top' as LabelPosition,\n labelAlign = 'start' as Alignment,\n isRequired,\n necessityIndicator,\n isQuiet,\n isEmphasized,\n isDisabled,\n isReadOnly,\n validationState,\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let ctx = {\n labelPosition,\n labelAlign,\n necessityIndicator\n };\n\n return (\n <form\n {...filterDOMProps(otherProps, {labelable: true, propNames: formPropNames})}\n {...styleProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Form',\n {\n 'spectrum-Form--positionSide': labelPosition === 'side',\n 'spectrum-Form--positionTop': labelPosition === 'top'\n },\n styleProps.className\n )\n }>\n <FormContext.Provider value={ctx}>\n <Provider\n isQuiet={isQuiet}\n isEmphasized={isEmphasized}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n validationState={validationState}>\n {children}\n </Provider>\n </FormContext.Provider>\n </form>\n );\n}\n\n/**\n * Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.\n */\nconst _Form = React.forwardRef(Form);\nexport {_Form as Form};\n"],"names":["$parcel$interopDefault","a","__esModule","default","FormContext","React","createContext","useFormProps","props","ctx","useContext","formPropNames","Set","Form","ref","useProviderProps","children","labelPosition","labelAlign","isRequired","necessityIndicator","isQuiet","isEmphasized","isDisabled","isReadOnly","validationState","otherProps","styleProps","useStyleProps","domRef","useDOMRef","filterDOMProps","labelable","propNames","classNames","className","_Form","forwardRef"],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAqC;AACrC,GAAmD;AACnD,GAAkD;AAClD,GAA+C;AAC/C,GAAgC;AAChC,GAA6C;AAC7C,GAAsC;AACtC,GAAiD;AACjD,GAA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,EAAA,CAAC,GAAG,uCAAa,CAAC,UAAU;IAC3C,GAAG,CAAC,MAAM,GAAG,mCAAS,CAAC,GAAG;IAE1B,GAAG,CAAC,GAAG,GAAG,CAAC;uBACT,aAAa;oBACb,UAAU;4BACV,kBAAkB;IACpB,CAAC;IAED,MAAM,oEACH,CAAI;WACC,oCAAc,CAAC,UAAU,EAAE,CAAC;YAAA,SAAS,EAAE,IAAI;YAAE,SAAS,EAAE,mCAAa;QAAA,CAAC;WACtE,UAAU;QACd,UAAU,EAAV,IAAU;QACV,GAAG,EAAE,MAAM;QACX,SAAS,EACP,oCAAU,CACR,gEAAM,EACN,CAAe,gBACf,CAAC;YACC,CAA6B,8BAAE,aAAa,KAAK,CAAM;YACvD,CAA4B,6BAAE,aAAa,KAAK,CAAK;QACvD,CAAC,EACD,UAAU,CAAC,SAAS;0EAGvB,iCAAW,CAAC,QAAQ;QAAC,KAAK,EAAE,GAAG;0EAC7B,qCAAQ;QACP,OAAO,EAAE,OAAO;QAChB,YAAY,EAAE,YAAY;QAC1B,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,eAAe,EAAE,eAAe;OAC/B,QAAQ;AAKnB,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAK,iBAAG,sCAAK,CAAC,UAAU,CAAC,0BAAI","sources":["packages/@react-spectrum/form/src/index.ts","packages/@react-spectrum/form/src/Form.tsx","packages/@adobe/spectrum-css-temp/components/fieldlabel/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Form';\n","/*\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 {Alignment, DOMRef, LabelPosition, SpectrumLabelableProps} from '@react-types/shared';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React, {useContext} from 'react';\nimport {SpectrumFormProps} from '@react-types/form';\nimport styles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\n\nlet FormContext = React.createContext<SpectrumLabelableProps>({});\nexport function useFormProps<T extends SpectrumLabelableProps>(props: T): T {\n let ctx = useContext(FormContext);\n return {...ctx, ...props};\n}\n\nconst formPropNames = new Set([\n 'action',\n 'autoComplete',\n 'encType',\n 'method',\n 'target',\n 'onSubmit'\n]);\n\nfunction Form(props: SpectrumFormProps, ref: DOMRef<HTMLFormElement>) {\n props = useProviderProps(props);\n let {\n children,\n labelPosition = 'top' as LabelPosition,\n labelAlign = 'start' as Alignment,\n isRequired,\n necessityIndicator,\n isQuiet,\n isEmphasized,\n isDisabled,\n isReadOnly,\n validationState,\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let ctx = {\n labelPosition,\n labelAlign,\n necessityIndicator\n };\n\n return (\n <form\n {...filterDOMProps(otherProps, {labelable: true, propNames: formPropNames})}\n {...styleProps}\n noValidate\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Form',\n {\n 'spectrum-Form--positionSide': labelPosition === 'side',\n 'spectrum-Form--positionTop': labelPosition === 'top'\n },\n styleProps.className\n )\n }>\n <FormContext.Provider value={ctx}>\n <Provider\n isQuiet={isQuiet}\n isEmphasized={isEmphasized}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n validationState={validationState}>\n {children}\n </Provider>\n </FormContext.Provider>\n </form>\n );\n}\n\n/**\n * Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.\n */\nconst _Form = React.forwardRef(Form);\nexport {_Form as Form};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,93 +1,128 @@
1
- import _react, { useContext } from "react";
2
- import { Provider, useProviderProps } from "@react-spectrum/provider";
3
- import { filterDOMProps } from "@react-aria/utils";
4
- import { classNames, useDOMRef, useStyleProps } from "@react-spectrum/utils";
5
- import _babelRuntimeHelpersEsmExtends from "@babel/runtime/helpers/esm/extends";
6
- import _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
7
1
  import "./main.css";
2
+ import {useStyleProps as $8Y8y4$useStyleProps, useDOMRef as $8Y8y4$useDOMRef, classNames as $8Y8y4$classNames} from "@react-spectrum/utils";
3
+ import {filterDOMProps as $8Y8y4$filterDOMProps} from "@react-aria/utils";
4
+ import {useProviderProps as $8Y8y4$useProviderProps, Provider as $8Y8y4$Provider} from "@react-spectrum/provider";
5
+ import $8Y8y4$react, {useContext as $8Y8y4$useContext} from "react";
8
6
 
9
7
  function $parcel$interopDefault(a) {
10
8
  return a && a.__esModule ? a.default : a;
11
9
  }
10
+ function $parcel$export(e, n, v, s) {
11
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
12
+ }
13
+ var $a5eb5d835477bd21$exports = {};
12
14
 
13
- // ASSET: /Users/govett/dev/react-spectrum-v3/node_modules/@adobe/spectrum-css-temp/components/fieldlabel/vars.css
14
- var $c9fb1f4220ea2c59cb2e10f0e9828c6e$exports = {};
15
- $c9fb1f4220ea2c59cb2e10f0e9828c6e$exports = {
16
- "spectrum-FieldLabel": "_spectrum-FieldLabel_36b9b",
17
- "spectrum-FieldLabel--positionSide": "_spectrum-FieldLabel--positionSide_36b9b",
18
- "spectrum-FieldLabel-requiredIcon": "_spectrum-FieldLabel-requiredIcon_36b9b",
19
- "spectrum-FieldLabel--alignEnd": "_spectrum-FieldLabel--alignEnd_36b9b",
20
- "spectrum-Field": "_spectrum-Field_36b9b",
21
- "spectrum-Field--positionTop": "_spectrum-Field--positionTop_36b9b",
22
- "spectrum-Field-field": "_spectrum-Field-field_36b9b",
23
- "spectrum-Field-field--multiline": "_spectrum-Field-field--multiline_36b9b",
24
- "spectrum-Field--positionSide": "_spectrum-Field--positionSide_36b9b",
25
- "spectrum-Form": "_spectrum-Form_36b9b",
26
- "spectrum-Form--positionSide": "_spectrum-Form--positionSide_36b9b",
27
- "spectrum-Form--positionTop": "_spectrum-Form--positionTop_36b9b",
28
- "spectrum-Form-itemLabel": "_spectrum-Form-itemLabel_36b9b",
29
- "is-disabled": "_is-disabled_36b9b"
30
- };
15
+ $parcel$export($a5eb5d835477bd21$exports, "useFormProps", () => $a5eb5d835477bd21$export$a6b5be5c6b451665);
16
+ $parcel$export($a5eb5d835477bd21$exports, "Form", () => $a5eb5d835477bd21$export$a7fed597f4b8afd8);
31
17
 
32
- let $d618213cd07bac427c632ce5c90d7$var$FormContext = /*#__PURE__*/_react.createContext({});
33
18
 
34
- export function useFormProps(props) {
35
- let ctx = useContext($d618213cd07bac427c632ce5c90d7$var$FormContext);
36
- return _babelRuntimeHelpersEsmExtends({}, ctx, props);
37
- }
38
- const $d618213cd07bac427c632ce5c90d7$var$formPropNames = new Set(['action', 'autoComplete', 'encType', 'method', 'target', 'onSubmit']);
39
- var $c9fb1f4220ea2c59cb2e10f0e9828c6e$$interop$default = $parcel$interopDefault($c9fb1f4220ea2c59cb2e10f0e9828c6e$exports);
40
19
 
41
- function $d618213cd07bac427c632ce5c90d7$var$Form(props, ref) {
42
- props = useProviderProps(props);
43
20
 
44
- let {
45
- children,
46
- labelPosition = 'top',
47
- labelAlign = 'start',
48
- isRequired,
49
- necessityIndicator,
50
- isQuiet,
51
- isEmphasized,
52
- isDisabled,
53
- isReadOnly,
54
- validationState
55
- } = props,
56
- otherProps = _babelRuntimeHelpersEsmObjectWithoutPropertiesLoose(props, ["children", "labelPosition", "labelAlign", "isRequired", "necessityIndicator", "isQuiet", "isEmphasized", "isDisabled", "isReadOnly", "validationState"]);
21
+ var $4a84444d5a56ab41$exports = {};
22
+
23
+ $parcel$export($4a84444d5a56ab41$exports, "spectrum-FieldLabel", () => $4a84444d5a56ab41$export$493d18e796ae054, (v) => $4a84444d5a56ab41$export$493d18e796ae054 = v);
24
+ $parcel$export($4a84444d5a56ab41$exports, "spectrum-FieldLabel--positionSide", () => $4a84444d5a56ab41$export$9e6f19dc21f22f2e, (v) => $4a84444d5a56ab41$export$9e6f19dc21f22f2e = v);
25
+ $parcel$export($4a84444d5a56ab41$exports, "spectrum-FieldLabel-requiredIcon", () => $4a84444d5a56ab41$export$7c47642c7d46f3c9, (v) => $4a84444d5a56ab41$export$7c47642c7d46f3c9 = v);
26
+ $parcel$export($4a84444d5a56ab41$exports, "spectrum-FieldLabel--alignEnd", () => $4a84444d5a56ab41$export$885efcc08143a987, (v) => $4a84444d5a56ab41$export$885efcc08143a987 = v);
27
+ $parcel$export($4a84444d5a56ab41$exports, "spectrum-Field", () => $4a84444d5a56ab41$export$f6d480ae1e56eba0, (v) => $4a84444d5a56ab41$export$f6d480ae1e56eba0 = v);
28
+ $parcel$export($4a84444d5a56ab41$exports, "spectrum-Field--positionTop", () => $4a84444d5a56ab41$export$a4ea780a9064d7f9, (v) => $4a84444d5a56ab41$export$a4ea780a9064d7f9 = v);
29
+ $parcel$export($4a84444d5a56ab41$exports, "spectrum-Field-field", () => $4a84444d5a56ab41$export$3ab8a3dc7f0563d, (v) => $4a84444d5a56ab41$export$3ab8a3dc7f0563d = v);
30
+ $parcel$export($4a84444d5a56ab41$exports, "spectrum-Field-field--multiline", () => $4a84444d5a56ab41$export$f58a1e966a92ba5e, (v) => $4a84444d5a56ab41$export$f58a1e966a92ba5e = v);
31
+ $parcel$export($4a84444d5a56ab41$exports, "spectrum-Field--positionSide", () => $4a84444d5a56ab41$export$2963225c91179589, (v) => $4a84444d5a56ab41$export$2963225c91179589 = v);
32
+ $parcel$export($4a84444d5a56ab41$exports, "spectrum-Field-wrapper", () => $4a84444d5a56ab41$export$127df0b7290eb8ef, (v) => $4a84444d5a56ab41$export$127df0b7290eb8ef = v);
33
+ $parcel$export($4a84444d5a56ab41$exports, "spectrum-Form", () => $4a84444d5a56ab41$export$94d2bcc94afabd89, (v) => $4a84444d5a56ab41$export$94d2bcc94afabd89 = v);
34
+ $parcel$export($4a84444d5a56ab41$exports, "spectrum-Form--positionSide", () => $4a84444d5a56ab41$export$7f44db659563c8f4, (v) => $4a84444d5a56ab41$export$7f44db659563c8f4 = v);
35
+ $parcel$export($4a84444d5a56ab41$exports, "spectrum-Form--positionTop", () => $4a84444d5a56ab41$export$11b8bc81fe551057, (v) => $4a84444d5a56ab41$export$11b8bc81fe551057 = v);
36
+ $parcel$export($4a84444d5a56ab41$exports, "spectrum-Form-itemLabel", () => $4a84444d5a56ab41$export$51ec27881a1e3928, (v) => $4a84444d5a56ab41$export$51ec27881a1e3928 = v);
37
+ $parcel$export($4a84444d5a56ab41$exports, "is-disabled", () => $4a84444d5a56ab41$export$d35bc1e505d1ebbf, (v) => $4a84444d5a56ab41$export$d35bc1e505d1ebbf = v);
38
+ var $4a84444d5a56ab41$export$493d18e796ae054;
39
+ var $4a84444d5a56ab41$export$9e6f19dc21f22f2e;
40
+ var $4a84444d5a56ab41$export$7c47642c7d46f3c9;
41
+ var $4a84444d5a56ab41$export$885efcc08143a987;
42
+ var $4a84444d5a56ab41$export$f6d480ae1e56eba0;
43
+ var $4a84444d5a56ab41$export$a4ea780a9064d7f9;
44
+ var $4a84444d5a56ab41$export$3ab8a3dc7f0563d;
45
+ var $4a84444d5a56ab41$export$f58a1e966a92ba5e;
46
+ var $4a84444d5a56ab41$export$2963225c91179589;
47
+ var $4a84444d5a56ab41$export$127df0b7290eb8ef;
48
+ var $4a84444d5a56ab41$export$94d2bcc94afabd89;
49
+ var $4a84444d5a56ab41$export$7f44db659563c8f4;
50
+ var $4a84444d5a56ab41$export$11b8bc81fe551057;
51
+ var $4a84444d5a56ab41$export$51ec27881a1e3928;
52
+ var $4a84444d5a56ab41$export$d35bc1e505d1ebbf;
53
+ $4a84444d5a56ab41$export$493d18e796ae054 = "spectrum-FieldLabel_d2db1f";
54
+ $4a84444d5a56ab41$export$9e6f19dc21f22f2e = "spectrum-FieldLabel--positionSide_d2db1f";
55
+ $4a84444d5a56ab41$export$7c47642c7d46f3c9 = "spectrum-FieldLabel-requiredIcon_d2db1f";
56
+ $4a84444d5a56ab41$export$885efcc08143a987 = "spectrum-FieldLabel--alignEnd_d2db1f";
57
+ $4a84444d5a56ab41$export$f6d480ae1e56eba0 = "spectrum-Field_d2db1f";
58
+ $4a84444d5a56ab41$export$a4ea780a9064d7f9 = "spectrum-Field--positionTop_d2db1f";
59
+ $4a84444d5a56ab41$export$3ab8a3dc7f0563d = "spectrum-Field-field_d2db1f";
60
+ $4a84444d5a56ab41$export$f58a1e966a92ba5e = "spectrum-Field-field--multiline_d2db1f";
61
+ $4a84444d5a56ab41$export$2963225c91179589 = "spectrum-Field--positionSide_d2db1f";
62
+ $4a84444d5a56ab41$export$127df0b7290eb8ef = "spectrum-Field-wrapper_d2db1f";
63
+ $4a84444d5a56ab41$export$94d2bcc94afabd89 = "spectrum-Form_d2db1f";
64
+ $4a84444d5a56ab41$export$7f44db659563c8f4 = "spectrum-Form--positionSide_d2db1f";
65
+ $4a84444d5a56ab41$export$11b8bc81fe551057 = "spectrum-Form--positionTop_d2db1f";
66
+ $4a84444d5a56ab41$export$51ec27881a1e3928 = "spectrum-Form-itemLabel_d2db1f";
67
+ $4a84444d5a56ab41$export$d35bc1e505d1ebbf = "is-disabled_d2db1f";
68
+
57
69
 
58
- let {
59
- styleProps
60
- } = useStyleProps(otherProps);
61
- let domRef = useDOMRef(ref);
62
- let ctx = {
63
- labelPosition,
64
- labelAlign,
65
- necessityIndicator
66
- };
67
- return /*#__PURE__*/_react.createElement("form", _babelRuntimeHelpersEsmExtends({}, filterDOMProps(otherProps, {
68
- labelable: true,
69
- propNames: $d618213cd07bac427c632ce5c90d7$var$formPropNames
70
- }), styleProps, {
71
- ref: domRef,
72
- className: classNames($c9fb1f4220ea2c59cb2e10f0e9828c6e$$interop$default, 'spectrum-Form', {
73
- 'spectrum-Form--positionSide': labelPosition === 'side',
74
- 'spectrum-Form--positionTop': labelPosition === 'top'
75
- }, styleProps.className)
76
- }), /*#__PURE__*/_react.createElement($d618213cd07bac427c632ce5c90d7$var$FormContext.Provider, {
77
- value: ctx
78
- }, /*#__PURE__*/_react.createElement(Provider, {
79
- isQuiet: isQuiet,
80
- isEmphasized: isEmphasized,
81
- isDisabled: isDisabled,
82
- isReadOnly: isReadOnly,
83
- isRequired: isRequired,
84
- validationState: validationState
85
- }, children)));
70
+ let $a5eb5d835477bd21$var$FormContext = /*#__PURE__*/ $8Y8y4$react.createContext({
71
+ });
72
+ function $a5eb5d835477bd21$export$a6b5be5c6b451665(props) {
73
+ let ctx = $8Y8y4$useContext($a5eb5d835477bd21$var$FormContext);
74
+ return {
75
+ ...ctx,
76
+ ...props
77
+ };
78
+ }
79
+ const $a5eb5d835477bd21$var$formPropNames = new Set([
80
+ 'action',
81
+ 'autoComplete',
82
+ 'encType',
83
+ 'method',
84
+ 'target',
85
+ 'onSubmit'
86
+ ]);
87
+ function $a5eb5d835477bd21$var$Form(props, ref) {
88
+ props = $8Y8y4$useProviderProps(props);
89
+ 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;
90
+ let { styleProps: styleProps } = $8Y8y4$useStyleProps(otherProps);
91
+ let domRef = $8Y8y4$useDOMRef(ref);
92
+ let ctx = {
93
+ labelPosition: labelPosition,
94
+ labelAlign: labelAlign,
95
+ necessityIndicator: necessityIndicator
96
+ };
97
+ return(/*#__PURE__*/ $8Y8y4$react.createElement("form", {
98
+ ...$8Y8y4$filterDOMProps(otherProps, {
99
+ labelable: true,
100
+ propNames: $a5eb5d835477bd21$var$formPropNames
101
+ }),
102
+ ...styleProps,
103
+ noValidate: true,
104
+ ref: domRef,
105
+ className: $8Y8y4$classNames((/*@__PURE__*/$parcel$interopDefault($4a84444d5a56ab41$exports)), 'spectrum-Form', {
106
+ 'spectrum-Form--positionSide': labelPosition === 'side',
107
+ 'spectrum-Form--positionTop': labelPosition === 'top'
108
+ }, styleProps.className)
109
+ }, /*#__PURE__*/ $8Y8y4$react.createElement($a5eb5d835477bd21$var$FormContext.Provider, {
110
+ value: ctx
111
+ }, /*#__PURE__*/ $8Y8y4$react.createElement($8Y8y4$Provider, {
112
+ isQuiet: isQuiet,
113
+ isEmphasized: isEmphasized,
114
+ isDisabled: isDisabled,
115
+ isReadOnly: isReadOnly,
116
+ isRequired: isRequired,
117
+ validationState: validationState
118
+ }, children))));
86
119
  }
87
120
  /**
88
121
  * Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.
89
- */
122
+ */ const $a5eb5d835477bd21$export$a7fed597f4b8afd8 = /*#__PURE__*/ $8Y8y4$react.forwardRef($a5eb5d835477bd21$var$Form);
123
+
124
+
90
125
 
91
126
 
92
- export const Form = /*#__PURE__*/_react.forwardRef($d618213cd07bac427c632ce5c90d7$var$Form);
127
+ export {$a5eb5d835477bd21$export$a6b5be5c6b451665 as useFormProps, $a5eb5d835477bd21$export$a7fed597f4b8afd8 as Form};
93
128
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;;;ACFD,4CAAiB;AACf,yBAAuB,4BADR;AAEf,uCAAqC,0CAFtB;AAGf,sCAAoC,yCAHrB;AAIf,mCAAiC,sCAJlB;AAKf,oBAAkB,uBALH;AAMf,iCAA+B,oCANhB;AAOf,0BAAwB,6BAPT;AAQf,qCAAmC,wCARpB;AASf,kCAAgC,qCATjB;AAUf,mBAAiB,sBAVF;AAWf,iCAA+B,oCAXhB;AAYf,gCAA8B,mCAZf;AAaf,6BAA2B,gCAbZ;AAcf,iBAAe;AAdA,CAAjB;;ACoBA,IAAIG,8CAAW,gBAAGC,MAAK,CAACC,aAAN,CAA4C,EAA5C,CAAlB;;OACO,SAASC,YAAT,CAAwDC,KAAxD,EAAqE;AAC1E,MAAIC,GAAG,GAAGC,UAAU,CAACN,8CAAD,CAApB;AACA,4CAAWK,GAAX,EAAmBD,KAAnB;AACD;AAED,MAAMG,gDAAa,GAAG,IAAIC,GAAJ,CAAQ,CAC5B,QAD4B,EAE5B,cAF4B,EAG5B,SAH4B,EAI5B,QAJ4B,EAK5B,QAL4B,EAM5B,UAN4B,CAAR,CAAtB;;;AASA,SAASC,uCAAT,CAAcL,KAAd,EAAwCM,GAAxC,EAAsE;AACpEN,EAAAA,KAAK,GAAGO,gBAAgB,CAACP,KAAD,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modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/fieldlabel/vars.css","./packages/@react-spectrum/form/src/Form.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n","/*\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 {Alignment, DOMRef, LabelPosition, SpectrumLabelableProps} from '@react-types/shared';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React, {useContext} from 'react';\nimport {SpectrumFormProps} from '@react-types/form';\nimport styles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\n\nlet FormContext = React.createContext<SpectrumLabelableProps>({});\nexport function useFormProps<T extends SpectrumLabelableProps>(props: T): T {\n let ctx = useContext(FormContext);\n return {...ctx, ...props};\n}\n\nconst formPropNames = new Set([\n 'action',\n 'autoComplete',\n 'encType',\n 'method',\n 'target',\n 'onSubmit'\n]);\n\nfunction Form(props: SpectrumFormProps, ref: DOMRef<HTMLFormElement>) {\n props = useProviderProps(props);\n let {\n children,\n labelPosition = 'top' as LabelPosition,\n labelAlign = 'start' as Alignment,\n isRequired,\n necessityIndicator,\n isQuiet,\n isEmphasized,\n isDisabled,\n isReadOnly,\n validationState,\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let ctx = {\n labelPosition,\n labelAlign,\n necessityIndicator\n };\n\n return (\n <form\n {...filterDOMProps(otherProps, {labelable: true, propNames: formPropNames})}\n {...styleProps}\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Form',\n {\n 'spectrum-Form--positionSide': labelPosition === 'side',\n 'spectrum-Form--positionTop': labelPosition === 'top'\n },\n styleProps.className\n )\n }>\n <FormContext.Provider value={ctx}>\n <Provider\n isQuiet={isQuiet}\n isEmphasized={isEmphasized}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n validationState={validationState}>\n {children}\n </Provider>\n </FormContext.Provider>\n </form>\n );\n}\n\n/**\n * Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.\n */\nconst _Form = React.forwardRef(Form);\nexport {_Form as Form};\n"],"names":["$parcel$interopDefault","a","__esModule","default","FormContext","React","createContext","useFormProps","props","ctx","useContext","formPropNames","Set","Form","ref","useProviderProps","children","labelPosition","labelAlign","isRequired","necessityIndicator","isQuiet","isEmphasized","isDisabled","isReadOnly","validationState","otherProps","styleProps","useStyleProps","domRef","useDOMRef","filterDOMProps","labelable","propNames","classNames","className","_Form","forwardRef"],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAqC;AACrC,GAAmD;AACnD,GAAkD;AAClD,GAA+C;AAC/C,GAAgC;AAChC,GAA6C;AAC7C,GAAsC;AACtC,GAAiD;AACjD,GAA8C;AAC9C,GAAwC;AACxC,GAA+B;AAC/B,GAA6C;AAC7C,GAA4C;AAC5C,GAAyC;AACzC,GAA6B;AAd7B,wCAAqC,GAAG,CAA4B;AACpE,yCAAmD,GAAG,CAA0C;AAChG,yCAAkD,GAAG,CAAyC;AAC9F,yCAA+C,GAAG,CAAsC;AACxF,yCAAgC,GAAG,CAAuB;AAC1D,yCAA6C,GAAG,CAAoC;AACpF,wCAAsC,GAAG,CAA6B;AACtE,yCAAiD,GAAG,CAAwC;AAC5F,yCAA8C,GAAG,CAAqC;AACtF,yCAAwC,GAAG,CAA+B;AAC1E,yCAA+B,GAAG,CAAsB;AACxD,yCAA6C,GAAG,CAAoC;AACpF,yCAA4C,GAAG,CAAmC;AAClF,yCAAyC,GAAG,CAAgC;AAC5E,yCAA6B,GAAG,CAAoB;;;ADMpD,GAAG,CAAC,iCAAW,iBAAG,YAAK,CAAC,aAAa,CAAyB,CAAC;AAAA,CAAC;SAChD,yCAAY,CAAmC,KAAQ,EAAK,CAAC;IAC3E,GAAG,CAAC,GAAG,GAAG,iBAAU,CAAC,iCAAW;IAChC,MAAM,CAAC,CAAC;WAAG,GAAG;WAAK,KAAK;IAAA,CAAC;AAC3B,CAAC;AAED,KAAK,CAAC,mCAAa,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;IAC7B,CAAQ;IACR,CAAc;IACd,CAAS;IACT,CAAQ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sources":["packages/@react-spectrum/form/src/index.ts","packages/@react-spectrum/form/src/Form.tsx","packages/@adobe/spectrum-css-temp/components/fieldlabel/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport * from './Form';\n","/*\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 {Alignment, DOMRef, LabelPosition, SpectrumLabelableProps} from '@react-types/shared';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React, {useContext} from 'react';\nimport {SpectrumFormProps} from '@react-types/form';\nimport styles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\n\nlet FormContext = React.createContext<SpectrumLabelableProps>({});\nexport function useFormProps<T extends SpectrumLabelableProps>(props: T): T {\n let ctx = useContext(FormContext);\n return {...ctx, ...props};\n}\n\nconst formPropNames = new Set([\n 'action',\n 'autoComplete',\n 'encType',\n 'method',\n 'target',\n 'onSubmit'\n]);\n\nfunction Form(props: SpectrumFormProps, ref: DOMRef<HTMLFormElement>) {\n props = useProviderProps(props);\n let {\n children,\n labelPosition = 'top' as LabelPosition,\n labelAlign = 'start' as Alignment,\n isRequired,\n necessityIndicator,\n isQuiet,\n isEmphasized,\n isDisabled,\n isReadOnly,\n validationState,\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let ctx = {\n labelPosition,\n labelAlign,\n necessityIndicator\n };\n\n return (\n <form\n {...filterDOMProps(otherProps, {labelable: true, propNames: formPropNames})}\n {...styleProps}\n noValidate\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Form',\n {\n 'spectrum-Form--positionSide': labelPosition === 'side',\n 'spectrum-Form--positionTop': labelPosition === 'top'\n },\n styleProps.className\n )\n }>\n <FormContext.Provider value={ctx}>\n <Provider\n isQuiet={isQuiet}\n isEmphasized={isEmphasized}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n validationState={validationState}>\n {children}\n </Provider>\n </FormContext.Provider>\n </form>\n );\n}\n\n/**\n * Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.\n */\nconst _Form = React.forwardRef(Form);\nexport {_Form as Form};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -1 +1 @@
1
- {"mappings":"A;A;A;AAqBA,6BAA6B,CAAC,SAAS,sBAAsB,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAG1E;AAmED;A;GAEG;AACH,OAAA,MAAM,0IAA8B,CAAC","sources":["./packages/@react-spectrum/form/src/packages/@react-spectrum/form/src/Form.tsx","./packages/@react-spectrum/form/src/packages/@react-spectrum/form/src/index.ts"],"sourcesContent":[null,null],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;AAqBA,6BAA6B,CAAC,SAAS,sBAAsB,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAG1E;AAoED;;GAEG;AACH,OAAA,MAAM,0IAA8B,CAAC","sources":["packages/@react-spectrum/form/src/packages/@react-spectrum/form/src/Form.tsx","packages/@react-spectrum/form/src/packages/@react-spectrum/form/src/index.ts","packages/@react-spectrum/form/src/index.ts"],"sourcesContent":[null,null,"/*\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 * from './Form';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/form",
3
- "version": "3.2.2",
3
+ "version": "3.2.6",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,20 +32,20 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/utils": "^3.8.0",
36
- "@react-spectrum/utils": "^3.5.2",
37
- "@react-types/form": "^3.2.1",
38
- "@react-types/shared": "^3.6.0"
35
+ "@react-aria/utils": "^3.11.2",
36
+ "@react-spectrum/utils": "^3.6.5",
37
+ "@react-types/form": "^3.2.4",
38
+ "@react-types/shared": "^3.11.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
42
42
  },
43
43
  "peerDependencies": {
44
- "@react-spectrum/provider": "^3.0.0-rc.1",
44
+ "@react-spectrum/provider": "^3.0.0",
45
45
  "react": "^16.8.0 || ^17.0.0-rc.1"
46
46
  },
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "3aae08e7d8a75382bedcddac7c86107e40db9296"
50
+ "gitHead": "404d41859b7d6f56201d7fc01bd9f22ae3512937"
51
51
  }
package/src/Form.tsx CHANGED
@@ -62,6 +62,7 @@ function Form(props: SpectrumFormProps, ref: DOMRef<HTMLFormElement>) {
62
62
  <form
63
63
  {...filterDOMProps(otherProps, {labelable: true, propNames: formPropNames})}
64
64
  {...styleProps}
65
+ noValidate
65
66
  ref={domRef}
66
67
  className={
67
68
  classNames(
package/dist/main.css.map DELETED
@@ -1 +0,0 @@
1
- {"mappings":"AAoBA,sCAiBE,eAGF,CApBA,sCAiBE,gBAGF,CApBA,4BACE,mBAAa,CAAb,YAAa,CACb,iBAAc,CAAd,aAAc,CAEd,qBAAsB,CAEtB,2FAA2F,CAE3F,uDAA+C,CAC/C,0DAAwD,CACxD,6DAAwD,CAExD,kBAAmB,CAEnB,2CAA4C,CAC5C,4BAA6B,CAC7B,mCAAoC,CAGpC,cACF,CAEA,oDAGE,uDACF,CAJA,oDAGE,sDACF,CAJA,0CACE,0BAAoB,CAApB,mBAAoB,CACpB,qDAEF,CAEA,mDAEE,cAGF,CALA,mDAEE,aAGF,CALA,mDAIE,oDACF,CALA,mDAIE,qDACF,CALA,yCACE,mDAAwD,CAExD,eAEF,CAEA,gDAEE,gBACF,CAHA,gDAEE,eACF,CAHA,sCACE,iBAAyB,CAAzB,wBAEF,CAMA,uBACE,yEA+BF,CA7BE,0DACE,0BAAoB,CAApB,mBAAoB,CACpB,yBAAsB,CAAtB,qBAAsB,CACtB,yCAUF,CARE,uFAEE,UACF,CAEA,kGACE,iBAAc,CAAd,aACF,CAKF,2DACE,0BAAoB,CAApB,mBAAoB,CACpB,oBAAuB,CAAvB,sBASF,CAPE,wFACE,UAAO,CAAP,MACF,CAEA,mGACE,WACF,CAWF,mEAKE,eAgBF,CArBA,mEAKE,gBAgBF,CArBA,yDACE,aAAc,CACd,uBAAyB,CACzB,0DAAwD,CACxD,6DAiBF,CAdE,gFACE,iBAAkB,CAClB,UACF,CAEA,qFACE,kBACF,CAEA,sFACE,kBAAmB,CACnB,UAAW,CACX,oDACF,CAIF,wDACE,mBAAa,CAAb,YAAa,CACb,yBAAsB,CAAtB,qBAAsB,CACtB,QAAS,CACT,oDASF,CAJE,0DACE,oDAA6C,CAC7C,UACF,CCjIJ,4DAEE,kFASF,CAJI,sRACE,qFACF,CAGJ,yCACE,2CACF","sources":["./node_modules/@adobe/spectrum-css-temp/components/fieldlabel/index.css","./node_modules/@adobe/spectrum-css-temp/components/fieldlabel/skin.css"],"sourcesContent":["/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n@import '../commons/index.css';\n\n:root {\n --spectrum-tableform-border-spacing: 0 var(--spectrum-global-dimension-size-300);\n --spectrum-tableform-margin: calc(var(--spectrum-global-dimension-size-250) * -1) 0;\n --spectrum-fieldlabel-margin: var(--spectrum-global-dimension-size-100);\n}\n\n.spectrum-FieldLabel {\n display: flex;\n flex: 0 0 auto;\n\n box-sizing: border-box;\n\n padding: var(--spectrum-fieldlabel-padding-top) 0 var(--spectrum-fieldlabel-padding-bottom);\n\n font-size: var(--spectrum-fieldlabel-text-size);\n font-weight: var(--spectrum-fieldlabel-text-font-weight);\n line-height: var(--spectrum-fieldlabel-text-line-height);\n\n vertical-align: top;\n\n -webkit-font-smoothing: subpixel-antialiased;\n -moz-osx-font-smoothing: auto;\n font-smoothing: subpixel-antialiased;\n text-align: start;\n\n cursor: default; /* match native labels even if not using a <label> element */\n}\n\n.spectrum-FieldLabel--positionSide {\n display: inline-flex;\n padding-top: var(--spectrum-fieldlabel-side-padding-top);\n padding-inline-end: var(--spectrum-fieldlabel-side-padding-x);\n}\n\n.spectrum-FieldLabel-requiredIcon {\n margin-top: var(--spectrum-fieldlabel-asterisk-margin-y);\n margin-inline-end: 0;\n margin-bottom: 0;\n margin-inline-start: var(--spectrum-fieldlabel-asterisk-gap);\n}\n\n.spectrum-FieldLabel--alignEnd {\n justify-content: flex-end; /* labelPosition=top case */\n text-align: end; /* labelPosition=side case */\n}\n\n/* A Field is a wrapper for a FieldLabel and a field component (e.g. textfield).\n * By default, labels are placed above the field. Fields have a default width, and the\n * label will wrap within this width. The width of the whole field can be overridden by the user,\n * and this causes both the label and inner field to resize as well. */\n.spectrum-Field {\n --spectrum-field-default-width: var(--spectrum-component-single-line-width);\n\n &.spectrum-Field--positionTop {\n display: inline-flex;\n flex-direction: column;\n width: var(--spectrum-field-default-width);\n\n .spectrum-Field-field {\n /* If the user overrides the width of the field, propagate to the inner component */\n width: 100%;\n }\n\n .spectrum-Field-field--multiline {\n flex: 1 1 auto;\n }\n }\n\n /* The side label variant of Field is inline, and fills as much space as needed\n * by default. If an explicit width is set, then the field flexes to fill available space. */\n &.spectrum-Field--positionSide {\n display: inline-flex;\n align-items: flex-start;\n\n .spectrum-Field-field {\n flex: 1;\n }\n\n .spectrum-Field-field--multiline {\n height: 100%;\n }\n }\n}\n\n/* topdoc\n{{ form/index.yml }}\n*/\n\n.spectrum-Form {\n /* With labelPosition=side, we override field layout to use a CSS table\n * so that all the labels and fields line up automatically. */\n &.spectrum-Form--positionSide {\n display: table;\n border-collapse: separate;\n border-spacing: var(--spectrum-tableform-border-spacing);\n margin: var(--spectrum-tableform-margin);\n text-align: start;\n\n .spectrum-Field {\n display: table-row;\n width: 100%;\n }\n\n .spectrum-FieldLabel {\n display: table-cell;\n }\n\n .spectrum-Field-field {\n display: table-cell;\n width: auto;\n min-width: var(--spectrum-component-single-line-width);\n }\n }\n\n /* With labelPosition=top, we use a normal flex stack */\n &.spectrum-Form--positionTop {\n display: flex;\n flex-direction: column;\n margin: 0;\n min-width: var(--spectrum-component-single-line-width);\n\n /* Users may want to make multiple fields appear next to each other.\n * We want to ensure that all items inside the form get the proper\n * margin and widths applied, even if wrapped in extra divs for example. */\n > * {\n margin-top: var(--spectrum-fieldlabel-margin);\n width: 100%;\n }\n }\n}\n","/*\nCopyright 2019 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\n\n.spectrum-FieldLabel,\n.spectrum-Form-itemLabel {\n color: var(--spectrum-fieldlabel-text-color);\n\n &.is-disabled {\n color: var(--spectrum-fieldlabel-text-color-disabled);\n\n .spectrum-FieldLabel-requiredIcon {\n color: var(--spectrum-fieldlabel-asterisk-color-disabled);\n }\n }\n}\n.spectrum-FieldLabel-requiredIcon {\n color: var(--spectrum-fieldlabel-asterisk-color);\n}\n"],"names":[],"version":3,"file":"main.css.map"}