@react-spectrum/form 3.7.10 → 3.7.11
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/Form.main.js +3 -6
- package/dist/Form.main.js.map +1 -1
- package/dist/Form.mjs +3 -6
- package/dist/Form.module.js +3 -6
- package/dist/Form.module.js.map +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/{vars.29ab4906.css → vars.0b4b4e4a.css} +3 -3
- package/dist/{vars.29ab4906.css.map → vars.0b4b4e4a.css.map} +1 -1
- package/package.json +9 -8
- package/src/Form.tsx +5 -8
package/dist/Form.main.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require("./vars.
|
|
1
|
+
require("./vars.0b4b4e4a.css");
|
|
2
2
|
var $eb2fc0ee655eff6b$exports = require("./fieldlabel_vars_css.main.js");
|
|
3
3
|
var $7HNeW$reactspectrumutils = require("@react-spectrum/utils");
|
|
4
4
|
var $7HNeW$reactariautils = require("@react-aria/utils");
|
|
@@ -52,7 +52,7 @@ const $d981bcab8e24f2f3$var$formPropNames = new Set([
|
|
|
52
52
|
'onReset',
|
|
53
53
|
'onInvalid'
|
|
54
54
|
]);
|
|
55
|
-
|
|
55
|
+
const $d981bcab8e24f2f3$export$a7fed597f4b8afd8 = /*#__PURE__*/ (0, ($parcel$interopDefault($7HNeW$react))).forwardRef(function Form(props, ref) {
|
|
56
56
|
props = (0, $7HNeW$reactspectrumprovider.useProviderProps)(props);
|
|
57
57
|
let { children: children, labelPosition: labelPosition = 'top', labelAlign: labelAlign = 'start', isRequired: isRequired, necessityIndicator: necessityIndicator, isQuiet: isQuiet, isEmphasized: isEmphasized, isDisabled: isDisabled, isReadOnly: isReadOnly, validationState: validationState, validationBehavior: validationBehavior, validationErrors: validationErrors, ...otherProps } = props;
|
|
58
58
|
let { styleProps: styleProps } = (0, $7HNeW$reactspectrumutils.useStyleProps)(otherProps);
|
|
@@ -87,10 +87,7 @@ function $d981bcab8e24f2f3$var$Form(props, ref) {
|
|
|
87
87
|
}, /*#__PURE__*/ (0, ($parcel$interopDefault($7HNeW$react))).createElement((0, $7HNeW$reactstatelyform.FormValidationContext).Provider, {
|
|
88
88
|
value: validationErrors || {}
|
|
89
89
|
}, children))));
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.
|
|
93
|
-
*/ const $d981bcab8e24f2f3$export$a7fed597f4b8afd8 = /*#__PURE__*/ (0, ($parcel$interopDefault($7HNeW$react))).forwardRef($d981bcab8e24f2f3$var$Form);
|
|
90
|
+
});
|
|
94
91
|
|
|
95
92
|
|
|
96
93
|
//# sourceMappingURL=Form.main.js.map
|
package/dist/Form.main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAeD,IAAI,kDAAc,CAAA,GAAA,sCAAI,EAAE,aAAa,CAA0B;AACxD,SAAS,0CAA+C,KAAQ;IACrE,IAAI,MAAM,CAAA,GAAA,uBAAS,EAAE;IACrB,IAAI,KACF,OAAO;QAAC,GAAG,GAAG;QAAE,GAAG,KAAK;IAAA;IAG1B,OAAO;AACT;AAEA,MAAM,sCAAgB,IAAI,IAAI;IAC5B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAeD,IAAI,kDAAc,CAAA,GAAA,sCAAI,EAAE,aAAa,CAA0B;AACxD,SAAS,0CAA+C,KAAQ;IACrE,IAAI,MAAM,CAAA,GAAA,uBAAS,EAAE;IACrB,IAAI,KACF,OAAO;QAAC,GAAG,GAAG;QAAE,GAAG,KAAK;IAAA;IAG1B,OAAO;AACT;AAEA,MAAM,sCAAgB,IAAI,IAAI;IAC5B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAKM,MAAM,0DAAO,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,KAAK,KAAwB,EAAE,GAA4B;IACvG,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,YACF,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,qBACb,UAAU,sBACV,kBAAkB,WAClB,OAAO,gBACP,YAAY,cACZ,UAAU,cACV,UAAU,mBACV,eAAe,sBACf,kBAAkB,oBAClB,gBAAgB,EAChB,GAAG,YACJ,GAAG;IAEJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IAEvB,IAAI,MAAM;uBACR;oBACA;4BACA;4BACA;IACF;IAEA,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,YAAY;YAAC,WAAW;YAAM,WAAW;QAAa,EAAE;QAC1E,GAAG,UAAU;QACd,YAAY,uBAAuB;QACnC,KAAK;QACL,WACE,CAAA,GAAA,oCAAS,EACP,CAAA,GAAA,mDAAK,GACL,iBACA;YACE,+BAA+B,kBAAkB;YACjD,8BAA8B,kBAAkB;QAClD,GACA,WAAW,SAAS;qBAGxB,0DAAC,kCAAY,QAAQ;QAAC,OAAO;qBAC3B,0DAAC,CAAA,GAAA,qCAAO;QACN,SAAS;QACT,cAAc;QACd,YAAY;QACZ,YAAY;QACZ,YAAY;QACZ,iBAAiB;qBACjB,0DAAC,CAAA,GAAA,6CAAoB,EAAE,QAAQ;QAAC,OAAO,oBAAoB,CAAC;OACzD;AAMb","sources":["packages/@react-spectrum/form/src/Form.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Alignment, DOMRef, LabelPosition, SpectrumLabelableProps} from '@react-types/shared';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {FormValidationContext} from '@react-stately/form';\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\ninterface FormContextValue extends SpectrumLabelableProps {\n validationBehavior?: 'aria' | 'native'\n}\n\nlet FormContext = React.createContext<FormContextValue | null>(null);\nexport function useFormProps<T extends SpectrumLabelableProps>(props: T): T {\n let ctx = useContext(FormContext);\n if (ctx) {\n return {...ctx, ...props};\n }\n\n return props;\n}\n\nconst formPropNames = new Set([\n 'action',\n 'autoComplete',\n 'encType',\n 'method',\n 'target',\n 'onSubmit',\n 'onReset',\n 'onInvalid'\n]);\n\n/**\n * Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.\n */\nexport const Form = React.forwardRef(function 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 validationBehavior,\n validationErrors,\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 validationBehavior\n };\n\n return (\n <form\n {...filterDOMProps(otherProps, {labelable: true, propNames: formPropNames})}\n {...styleProps}\n noValidate={validationBehavior !== 'native'}\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 <FormValidationContext.Provider value={validationErrors || {}}>\n {children}\n </FormValidationContext.Provider>\n </Provider>\n </FormContext.Provider>\n </form>\n );\n});\n"],"names":[],"version":3,"file":"Form.main.js.map"}
|
package/dist/Form.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./vars.
|
|
1
|
+
import "./vars.0b4b4e4a.css";
|
|
2
2
|
import $ijGT7$fieldlabel_vars_cssmodulejs from "./fieldlabel_vars_css.mjs";
|
|
3
3
|
import {useStyleProps as $ijGT7$useStyleProps, useDOMRef as $ijGT7$useDOMRef, classNames as $ijGT7$classNames} from "@react-spectrum/utils";
|
|
4
4
|
import {filterDOMProps as $ijGT7$filterDOMProps} from "@react-aria/utils";
|
|
@@ -45,7 +45,7 @@ const $ac118ceca79b8650$var$formPropNames = new Set([
|
|
|
45
45
|
'onReset',
|
|
46
46
|
'onInvalid'
|
|
47
47
|
]);
|
|
48
|
-
|
|
48
|
+
const $ac118ceca79b8650$export$a7fed597f4b8afd8 = /*#__PURE__*/ (0, $ijGT7$react).forwardRef(function Form(props, ref) {
|
|
49
49
|
props = (0, $ijGT7$useProviderProps)(props);
|
|
50
50
|
let { children: children, labelPosition: labelPosition = 'top', labelAlign: labelAlign = 'start', isRequired: isRequired, necessityIndicator: necessityIndicator, isQuiet: isQuiet, isEmphasized: isEmphasized, isDisabled: isDisabled, isReadOnly: isReadOnly, validationState: validationState, validationBehavior: validationBehavior, validationErrors: validationErrors, ...otherProps } = props;
|
|
51
51
|
let { styleProps: styleProps } = (0, $ijGT7$useStyleProps)(otherProps);
|
|
@@ -80,10 +80,7 @@ function $ac118ceca79b8650$var$Form(props, ref) {
|
|
|
80
80
|
}, /*#__PURE__*/ (0, $ijGT7$react).createElement((0, $ijGT7$FormValidationContext).Provider, {
|
|
81
81
|
value: validationErrors || {}
|
|
82
82
|
}, children))));
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.
|
|
86
|
-
*/ const $ac118ceca79b8650$export$a7fed597f4b8afd8 = /*#__PURE__*/ (0, $ijGT7$react).forwardRef($ac118ceca79b8650$var$Form);
|
|
83
|
+
});
|
|
87
84
|
|
|
88
85
|
|
|
89
86
|
export {$ac118ceca79b8650$export$a6b5be5c6b451665 as useFormProps, $ac118ceca79b8650$export$a7fed597f4b8afd8 as Form};
|
package/dist/Form.module.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./vars.
|
|
1
|
+
import "./vars.0b4b4e4a.css";
|
|
2
2
|
import $ijGT7$fieldlabel_vars_cssmodulejs from "./fieldlabel_vars_css.module.js";
|
|
3
3
|
import {useStyleProps as $ijGT7$useStyleProps, useDOMRef as $ijGT7$useDOMRef, classNames as $ijGT7$classNames} from "@react-spectrum/utils";
|
|
4
4
|
import {filterDOMProps as $ijGT7$filterDOMProps} from "@react-aria/utils";
|
|
@@ -45,7 +45,7 @@ const $ac118ceca79b8650$var$formPropNames = new Set([
|
|
|
45
45
|
'onReset',
|
|
46
46
|
'onInvalid'
|
|
47
47
|
]);
|
|
48
|
-
|
|
48
|
+
const $ac118ceca79b8650$export$a7fed597f4b8afd8 = /*#__PURE__*/ (0, $ijGT7$react).forwardRef(function Form(props, ref) {
|
|
49
49
|
props = (0, $ijGT7$useProviderProps)(props);
|
|
50
50
|
let { children: children, labelPosition: labelPosition = 'top', labelAlign: labelAlign = 'start', isRequired: isRequired, necessityIndicator: necessityIndicator, isQuiet: isQuiet, isEmphasized: isEmphasized, isDisabled: isDisabled, isReadOnly: isReadOnly, validationState: validationState, validationBehavior: validationBehavior, validationErrors: validationErrors, ...otherProps } = props;
|
|
51
51
|
let { styleProps: styleProps } = (0, $ijGT7$useStyleProps)(otherProps);
|
|
@@ -80,10 +80,7 @@ function $ac118ceca79b8650$var$Form(props, ref) {
|
|
|
80
80
|
}, /*#__PURE__*/ (0, $ijGT7$react).createElement((0, $ijGT7$FormValidationContext).Provider, {
|
|
81
81
|
value: validationErrors || {}
|
|
82
82
|
}, children))));
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.
|
|
86
|
-
*/ const $ac118ceca79b8650$export$a7fed597f4b8afd8 = /*#__PURE__*/ (0, $ijGT7$react).forwardRef($ac118ceca79b8650$var$Form);
|
|
83
|
+
});
|
|
87
84
|
|
|
88
85
|
|
|
89
86
|
export {$ac118ceca79b8650$export$a6b5be5c6b451665 as useFormProps, $ac118ceca79b8650$export$a7fed597f4b8afd8 as Form};
|
package/dist/Form.module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAeD,IAAI,kDAAc,CAAA,GAAA,YAAI,EAAE,aAAa,CAA0B;AACxD,SAAS,0CAA+C,KAAQ;IACrE,IAAI,MAAM,CAAA,GAAA,iBAAS,EAAE;IACrB,IAAI,KACF,OAAO;QAAC,GAAG,GAAG;QAAE,GAAG,KAAK;IAAA;IAG1B,OAAO;AACT;AAEA,MAAM,sCAAgB,IAAI,IAAI;IAC5B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;
|
|
1
|
+
{"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;AAeD,IAAI,kDAAc,CAAA,GAAA,YAAI,EAAE,aAAa,CAA0B;AACxD,SAAS,0CAA+C,KAAQ;IACrE,IAAI,MAAM,CAAA,GAAA,iBAAS,EAAE;IACrB,IAAI,KACF,OAAO;QAAC,GAAG,GAAG;QAAE,GAAG,KAAK;IAAA;IAG1B,OAAO;AACT;AAEA,MAAM,sCAAgB,IAAI,IAAI;IAC5B;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAKM,MAAM,0DAAO,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,KAAK,KAAwB,EAAE,GAA4B;IACvG,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,YACF,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,qBACb,UAAU,sBACV,kBAAkB,WAClB,OAAO,gBACP,YAAY,cACZ,UAAU,cACV,UAAU,mBACV,eAAe,sBACf,kBAAkB,oBAClB,gBAAgB,EAChB,GAAG,YACJ,GAAG;IAEJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IAEvB,IAAI,MAAM;uBACR;oBACA;4BACA;4BACA;IACF;IAEA,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAa,EAAE,YAAY;YAAC,WAAW;YAAM,WAAW;QAAa,EAAE;QAC1E,GAAG,UAAU;QACd,YAAY,uBAAuB;QACnC,KAAK;QACL,WACE,CAAA,GAAA,iBAAS,EACP,CAAA,GAAA,4DAAK,GACL,iBACA;YACE,+BAA+B,kBAAkB;YACjD,8BAA8B,kBAAkB;QAClD,GACA,WAAW,SAAS;qBAGxB,gCAAC,kCAAY,QAAQ;QAAC,OAAO;qBAC3B,gCAAC,CAAA,GAAA,eAAO;QACN,SAAS;QACT,cAAc;QACd,YAAY;QACZ,YAAY;QACZ,YAAY;QACZ,iBAAiB;qBACjB,gCAAC,CAAA,GAAA,4BAAoB,EAAE,QAAQ;QAAC,OAAO,oBAAoB,CAAC;OACzD;AAMb","sources":["packages/@react-spectrum/form/src/Form.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Alignment, DOMRef, LabelPosition, SpectrumLabelableProps} from '@react-types/shared';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {FormValidationContext} from '@react-stately/form';\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\ninterface FormContextValue extends SpectrumLabelableProps {\n validationBehavior?: 'aria' | 'native'\n}\n\nlet FormContext = React.createContext<FormContextValue | null>(null);\nexport function useFormProps<T extends SpectrumLabelableProps>(props: T): T {\n let ctx = useContext(FormContext);\n if (ctx) {\n return {...ctx, ...props};\n }\n\n return props;\n}\n\nconst formPropNames = new Set([\n 'action',\n 'autoComplete',\n 'encType',\n 'method',\n 'target',\n 'onSubmit',\n 'onReset',\n 'onInvalid'\n]);\n\n/**\n * Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.\n */\nexport const Form = React.forwardRef(function 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 validationBehavior,\n validationErrors,\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 validationBehavior\n };\n\n return (\n <form\n {...filterDOMProps(otherProps, {labelable: true, propNames: formPropNames})}\n {...styleProps}\n noValidate={validationBehavior !== 'native'}\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 <FormValidationContext.Provider value={validationErrors || {}}>\n {children}\n </FormValidationContext.Provider>\n </Provider>\n </FormContext.Provider>\n </form>\n );\n});\n"],"names":[],"version":3,"file":"Form.module.js.map"}
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;AA0BA,6BAA6B,CAAC,SAAS,sBAAsB,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAO1E;
|
|
1
|
+
{"mappings":";;;AA0BA,6BAA6B,CAAC,SAAS,sBAAsB,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAO1E;AAaD;;GAEG;AACH,OAAO,MAAM,4GA4DX,CAAC;AC9FH,YAAY,EAAC,iBAAiB,EAAC,MAAM,mBAAmB,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 {useFormProps, Form} from './Form';\nexport type {SpectrumFormProps} from '@react-types/form';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
|
@@ -152,9 +152,9 @@
|
|
|
152
152
|
}
|
|
153
153
|
|
|
154
154
|
.jIQVGq_spectrum-Field:where(.jIQVGq_spectrum-Field--positionSide) .jIQVGq_spectrum-Field-wrapper {
|
|
155
|
+
min-width: 0;
|
|
155
156
|
width: var(--spectrum-field-default-width);
|
|
156
157
|
flex: 1;
|
|
157
|
-
min-width: 0;
|
|
158
158
|
height: 100%;
|
|
159
159
|
}
|
|
160
160
|
|
|
@@ -214,8 +214,8 @@
|
|
|
214
214
|
}
|
|
215
215
|
|
|
216
216
|
.jIQVGq_spectrum-Form.jIQVGq_spectrum-Form--positionSide .jIQVGq_spectrum-Field-field {
|
|
217
|
-
min-width: var(--spectrum-alias-single-line-width, var(--spectrum-global-dimension-size-2400));
|
|
218
217
|
width: auto;
|
|
218
|
+
min-width: var(--spectrum-alias-single-line-width, var(--spectrum-global-dimension-size-2400));
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
.jIQVGq_spectrum-Form.jIQVGq_spectrum-Form--positionTop {
|
|
@@ -268,4 +268,4 @@
|
|
|
268
268
|
:is(.jIQVGq_spectrum-FieldLabel, .jIQVGq_spectrum-Form-itemLabel).jIQVGq_is-disabled {
|
|
269
269
|
color: var(--spectrum-fieldlabel-text-color-disabled, var(--spectrum-alias-text-color-disabled));
|
|
270
270
|
}
|
|
271
|
-
/*# sourceMappingURL=vars.
|
|
271
|
+
/*# sourceMappingURL=vars.0b4b4e4a.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;;;;;;;;;AAsBA;;;;;;AAMA;;;;;;;AAOA;;;;;AAUA;;;;;AAIE;;;;;;AAMA;;;;;;;;;;AAUE;;;;;AAMA;;;;AAIA;;;;AAOF;;;;;AAKE;;;;;;;AAaE;;;;AAMF;;;;;AAKA;;;;;AAOA;;;;AAaF;;;;;;;;AAOE;;;;;AAME;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAGE;;;;AAMJ;;;;AAIA;;;;;AAOF;;;;;;;AASE;;;;;AASF;;;;AAGE;;;;;;AAOF;;;;AAIA;;;;AAIA;;;;AAIA;;;;;AAKA;;;;AAkBF;;;;AAIE","sources":["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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.
|
|
1
|
+
{"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;;;;;;;;;AAsBA;;;;;;AAMA;;;;;;;AAOA;;;;;AAUA;;;;;AAIE;;;;;;AAMA;;;;;;;;;;AAUE;;;;;AAMA;;;;AAIA;;;;AAOF;;;;;AAKE;;;;;;;AAaE;;;;AAMF;;;;;AAKA;;;;;AAOA;;;;AAaF;;;;;;;;AAOE;;;;;AAME;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAGE;;;;AAMJ;;;;AAIA;;;;;AAOF;;;;;;;AASE;;;;;AASF;;;;AAGE;;;;;;AAOF;;;;AAIA;;;;AAIA;;;;AAIA;;;;;AAKA;;;;AAkBF;;;;AAIE","sources":["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@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.0b4b4e4a.css.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/form",
|
|
3
|
-
"version": "3.7.
|
|
3
|
+
"version": "3.7.11",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
"url": "https://github.com/adobe/react-spectrum"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@react-aria/utils": "^3.
|
|
40
|
-
"@react-spectrum/utils": "^3.12.
|
|
41
|
-
"@react-stately/form": "^3.1.
|
|
42
|
-
"@react-types/form": "^3.7.
|
|
43
|
-
"@react-types/shared": "^3.
|
|
39
|
+
"@react-aria/utils": "^3.27.0",
|
|
40
|
+
"@react-spectrum/utils": "^3.12.1",
|
|
41
|
+
"@react-stately/form": "^3.1.1",
|
|
42
|
+
"@react-types/form": "^3.7.9",
|
|
43
|
+
"@react-types/shared": "^3.27.0",
|
|
44
44
|
"@swc/helpers": "^0.5.0"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -48,10 +48,11 @@
|
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@react-spectrum/provider": "^3.0.0",
|
|
51
|
-
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
51
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
|
|
52
|
+
"react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
|
|
52
53
|
},
|
|
53
54
|
"publishConfig": {
|
|
54
55
|
"access": "public"
|
|
55
56
|
},
|
|
56
|
-
"gitHead": "
|
|
57
|
+
"gitHead": "09e7f44bebdc9d89122926b2b439a0a38a2814ea"
|
|
57
58
|
}
|
package/src/Form.tsx
CHANGED
|
@@ -44,7 +44,10 @@ const formPropNames = new Set([
|
|
|
44
44
|
'onInvalid'
|
|
45
45
|
]);
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
/**
|
|
48
|
+
* Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.
|
|
49
|
+
*/
|
|
50
|
+
export const Form = React.forwardRef(function Form(props: SpectrumFormProps, ref: DOMRef<HTMLFormElement>) {
|
|
48
51
|
props = useProviderProps(props);
|
|
49
52
|
let {
|
|
50
53
|
children,
|
|
@@ -104,10 +107,4 @@ function Form(props: SpectrumFormProps, ref: DOMRef<HTMLFormElement>) {
|
|
|
104
107
|
</FormContext.Provider>
|
|
105
108
|
</form>
|
|
106
109
|
);
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.
|
|
111
|
-
*/
|
|
112
|
-
const _Form = React.forwardRef(Form);
|
|
113
|
-
export {_Form as Form};
|
|
110
|
+
});
|