@react-spectrum/form 3.0.0-nightly.1242 → 3.0.0-nightly.1254

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.js CHANGED
@@ -92,6 +92,7 @@ function $a04c1031b5e1cab168e087a6837ba8be$var$Form(props, ref) {
92
92
  labelable: true,
93
93
  propNames: $a04c1031b5e1cab168e087a6837ba8be$var$formPropNames
94
94
  }), styleProps, {
95
+ noValidate: true,
95
96
  ref: domRef,
96
97
  className: classNames($a0bedb1888ff92cb3407d1a60d76e$$interop$default, 'spectrum-Form', {
97
98
  'spectrum-Form--positionSide': labelPosition === 'side',
package/dist/main.js.map CHANGED
@@ -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,yCAAiB;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,4BAA0B,+BAVX;AAWf,mBAAiB,sBAXF;AAYf,iCAA+B,oCAZhB;AAaf,gCAA8B,mCAbf;AAcf,6BAA2B,gCAdZ;AAef,iBAAe;AAfA,CAAjB;;ACoBA,IAAIG,iDAAW,gBAAGC,MAAK,CAACC,aAAN,CAA4C,EAA5C,CAAlB;;AACO,SAASC,YAAT,CAAwDC,KAAxD,EAAqE;AAC1E,MAAIC,GAAG,GAAGC,UAAU,CAACN,iDAAD,CAApB;AACA,yCAAWK,GAAX,EAAmBD,KAAnB;AACD;;;AAED,MAAMG,mDAAa,GAAG,IAAIC,GAAJ,CAAQ,C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AU,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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;;;ACFD,yCAAiB;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,4BAA0B,+BAVX;AAWf,mBAAiB,sBAXF;AAYf,iCAA+B,oCAZhB;AAaf,gCAA8B,mCAbf;AAcf,6BAA2B,gCAdZ;AAef,iBAAe;AAfA,CAAjB;;ACoBA,IAAIG,iDAAW,gBAAGC,MAAK,CAACC,aAAN,CAA4C,EAA5C,CAAlB;;AACO,SAASC,YAAT,CAAwDC,KAAxD,EAAqE;AAC1E,MAAIC,GAAG,GAAGC,UAAU,CAACN,iDAAD,CAApB;AACA,yCAAWK,GAAX,EAAmBD,KAAnB;AACD;;;AAED,MAAMG,mDAAa,GAAG,IAAIC,GAAJ,CAAQ,CAC5B,QAD4B,EAE5B,cAF4B,EAG5B,SAH4B,EAI5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E,IAAA,UAAU,EAAEL,UALd;AAME,IAAA,eAAe,EAAEM;AANnB,KAOGT,QAPH,CADF,CAhBF,CADF;AA8BD;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 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"],"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"}
package/dist/module.js CHANGED
@@ -69,6 +69,7 @@ function $d618213cd07bac427c632ce5c90d7$var$Form(props, ref) {
69
69
  labelable: true,
70
70
  propNames: $d618213cd07bac427c632ce5c90d7$var$formPropNames
71
71
  }), styleProps, {
72
+ noValidate: true,
72
73
  ref: domRef,
73
74
  className: classNames($c9fb1f4220ea2c59cb2e10f0e9828c6e$$interop$default, 'spectrum-Form', {
74
75
  'spectrum-Form--positionSide': labelPosition === 'side',
@@ -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,4BAA0B,+BAVX;AAWf,mBAAiB,sBAXF;AAYf,iCAA+B,oCAZhB;AAaf,gCAA8B,mCAbf;AAcf,6BAA2B,gCAdZ;AAef,iBAAe;AAfA,CAAjB;;ACoBA,IAAIG,8CAAW,gBAAGC,MAAK,CAAC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AACQ,SAPH;AALd,mBAeE,qBAAC,8CAAD,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;;;;;OAGA,MAAMoB,IAAK,gBAAG/B,MAAK,CAACgC,UAAN,CAAiBxB,uCAAjB,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":"module.js.map"}
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,4BAA0B,+BAVX;AAWf,mBAAiB,sBAXF;AAYf,iCAA+B,oCAZhB;AAaf,gCAA8B,mCAbf;AAcf,6BAA2B,gCAdZ;AAef,iBAAe;AAfA,CAAjB;;ACoBA,IAAIG,8CAAW,gBAAGC,MAAK,CAACC,aAAN,CAA4C,EAA5C,CAAlB;;OACO,SAASC,YAAT,CAAwDC,KAAxD,EAAqE;AAC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b;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,CAhBF,CADF;AA8BD;AAED;;;;;OAGA,MAAMoB,IAAK,gBAAG/B,MAAK,CAACgC,UAAN,CAAiBxB,uCAAjB,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 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"],"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 +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":"A;A;A;AAqBA,6BAA6B,CAAC,SAAS,sBAAsB,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAG1E;AAoED;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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/form",
3
- "version": "3.0.0-nightly.1242+9397d0262",
3
+ "version": "3.0.0-nightly.1254+1543be1d9",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,13 +32,13 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/utils": "3.0.0-nightly.1242+9397d0262",
36
- "@react-spectrum/utils": "3.0.0-nightly.1242+9397d0262",
37
- "@react-types/form": "3.2.3-nightly.2928+9397d0262",
38
- "@react-types/shared": "3.0.0-nightly.1242+9397d0262"
35
+ "@react-aria/utils": "3.0.0-nightly.1254+1543be1d9",
36
+ "@react-spectrum/utils": "3.0.0-nightly.1254+1543be1d9",
37
+ "@react-types/form": "3.2.3-nightly.2940+1543be1d9",
38
+ "@react-types/shared": "3.0.0-nightly.1254+1543be1d9"
39
39
  },
40
40
  "devDependencies": {
41
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1242+9397d0262"
41
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.1254+1543be1d9"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@react-spectrum/provider": "^3.0.0",
@@ -47,5 +47,5 @@
47
47
  "publishConfig": {
48
48
  "access": "public"
49
49
  },
50
- "gitHead": "9397d0262111f7207cb1ee2cbdda86cd5d180298"
50
+ "gitHead": "1543be1d9ff156188aa9c9f6e07006800cd8e9ff"
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(