@react-spectrum/form 3.0.0-nightly-641446f65-240905
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/README.md +3 -0
- package/dist/Form.main.js +96 -0
- package/dist/Form.main.js.map +1 -0
- package/dist/Form.mjs +90 -0
- package/dist/Form.module.js +90 -0
- package/dist/Form.module.js.map +1 -0
- package/dist/fieldlabel_vars_css.main.js +95 -0
- package/dist/fieldlabel_vars_css.main.js.map +1 -0
- package/dist/fieldlabel_vars_css.mjs +97 -0
- package/dist/fieldlabel_vars_css.module.js +97 -0
- package/dist/fieldlabel_vars_css.module.js.map +1 -0
- package/dist/import.mjs +18 -0
- package/dist/main.js +24 -0
- package/dist/main.js.map +1 -0
- package/dist/module.js +18 -0
- package/dist/module.js.map +1 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/vars.fa28e7ec.css +271 -0
- package/dist/vars.fa28e7ec.css.map +1 -0
- package/package.json +57 -0
- package/src/Form.tsx +113 -0
- package/src/index.ts +16 -0
package/README.md
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
require("./vars.fa28e7ec.css");
|
|
2
|
+
var $eb2fc0ee655eff6b$exports = require("./fieldlabel_vars_css.main.js");
|
|
3
|
+
var $7HNeW$reactspectrumutils = require("@react-spectrum/utils");
|
|
4
|
+
var $7HNeW$reactariautils = require("@react-aria/utils");
|
|
5
|
+
var $7HNeW$reactstatelyform = require("@react-stately/form");
|
|
6
|
+
var $7HNeW$reactspectrumprovider = require("@react-spectrum/provider");
|
|
7
|
+
var $7HNeW$react = require("react");
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
function $parcel$interopDefault(a) {
|
|
11
|
+
return a && a.__esModule ? a.default : a;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function $parcel$export(e, n, v, s) {
|
|
15
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
$parcel$export(module.exports, "useFormProps", () => $d981bcab8e24f2f3$export$a6b5be5c6b451665);
|
|
19
|
+
$parcel$export(module.exports, "Form", () => $d981bcab8e24f2f3$export$a7fed597f4b8afd8);
|
|
20
|
+
/*
|
|
21
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
22
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
23
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
24
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
25
|
+
*
|
|
26
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
27
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
28
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
29
|
+
* governing permissions and limitations under the License.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
let $d981bcab8e24f2f3$var$FormContext = /*#__PURE__*/ (0, ($parcel$interopDefault($7HNeW$react))).createContext(null);
|
|
37
|
+
function $d981bcab8e24f2f3$export$a6b5be5c6b451665(props) {
|
|
38
|
+
let ctx = (0, $7HNeW$react.useContext)($d981bcab8e24f2f3$var$FormContext);
|
|
39
|
+
if (ctx) return {
|
|
40
|
+
...ctx,
|
|
41
|
+
...props
|
|
42
|
+
};
|
|
43
|
+
return props;
|
|
44
|
+
}
|
|
45
|
+
const $d981bcab8e24f2f3$var$formPropNames = new Set([
|
|
46
|
+
'action',
|
|
47
|
+
'autoComplete',
|
|
48
|
+
'encType',
|
|
49
|
+
'method',
|
|
50
|
+
'target',
|
|
51
|
+
'onSubmit',
|
|
52
|
+
'onReset',
|
|
53
|
+
'onInvalid'
|
|
54
|
+
]);
|
|
55
|
+
function $d981bcab8e24f2f3$var$Form(props, ref) {
|
|
56
|
+
props = (0, $7HNeW$reactspectrumprovider.useProviderProps)(props);
|
|
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
|
+
let { styleProps: styleProps } = (0, $7HNeW$reactspectrumutils.useStyleProps)(otherProps);
|
|
59
|
+
let domRef = (0, $7HNeW$reactspectrumutils.useDOMRef)(ref);
|
|
60
|
+
let ctx = {
|
|
61
|
+
labelPosition: labelPosition,
|
|
62
|
+
labelAlign: labelAlign,
|
|
63
|
+
necessityIndicator: necessityIndicator,
|
|
64
|
+
validationBehavior: validationBehavior
|
|
65
|
+
};
|
|
66
|
+
return /*#__PURE__*/ (0, ($parcel$interopDefault($7HNeW$react))).createElement("form", {
|
|
67
|
+
...(0, $7HNeW$reactariautils.filterDOMProps)(otherProps, {
|
|
68
|
+
labelable: true,
|
|
69
|
+
propNames: $d981bcab8e24f2f3$var$formPropNames
|
|
70
|
+
}),
|
|
71
|
+
...styleProps,
|
|
72
|
+
noValidate: validationBehavior !== 'native',
|
|
73
|
+
ref: domRef,
|
|
74
|
+
className: (0, $7HNeW$reactspectrumutils.classNames)((0, ($parcel$interopDefault($eb2fc0ee655eff6b$exports))), 'spectrum-Form', {
|
|
75
|
+
'spectrum-Form--positionSide': labelPosition === 'side',
|
|
76
|
+
'spectrum-Form--positionTop': labelPosition === 'top'
|
|
77
|
+
}, styleProps.className)
|
|
78
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($7HNeW$react))).createElement($d981bcab8e24f2f3$var$FormContext.Provider, {
|
|
79
|
+
value: ctx
|
|
80
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($7HNeW$react))).createElement((0, $7HNeW$reactspectrumprovider.Provider), {
|
|
81
|
+
isQuiet: isQuiet,
|
|
82
|
+
isEmphasized: isEmphasized,
|
|
83
|
+
isDisabled: isDisabled,
|
|
84
|
+
isReadOnly: isReadOnly,
|
|
85
|
+
isRequired: isRequired,
|
|
86
|
+
validationState: validationState
|
|
87
|
+
}, /*#__PURE__*/ (0, ($parcel$interopDefault($7HNeW$react))).createElement((0, $7HNeW$reactstatelyform.FormValidationContext).Provider, {
|
|
88
|
+
value: validationErrors || {}
|
|
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);
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
//# sourceMappingURL=Form.main.js.map
|
|
@@ -0,0 +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;AAED,SAAS,2BAAK,KAAwB,EAAE,GAA4B;IAClE,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;AAEA;;CAEC,GACD,MAAM,0DAAQ,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","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\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 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\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":[],"version":3,"file":"Form.main.js.map"}
|
package/dist/Form.mjs
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import "./vars.fa28e7ec.css";
|
|
2
|
+
import $ijGT7$fieldlabel_vars_cssmodulejs from "./fieldlabel_vars_css.mjs";
|
|
3
|
+
import {useStyleProps as $ijGT7$useStyleProps, useDOMRef as $ijGT7$useDOMRef, classNames as $ijGT7$classNames} from "@react-spectrum/utils";
|
|
4
|
+
import {filterDOMProps as $ijGT7$filterDOMProps} from "@react-aria/utils";
|
|
5
|
+
import {FormValidationContext as $ijGT7$FormValidationContext} from "@react-stately/form";
|
|
6
|
+
import {useProviderProps as $ijGT7$useProviderProps, Provider as $ijGT7$Provider} from "@react-spectrum/provider";
|
|
7
|
+
import $ijGT7$react, {useContext as $ijGT7$useContext} from "react";
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
function $parcel$interopDefault(a) {
|
|
11
|
+
return a && a.__esModule ? a.default : a;
|
|
12
|
+
}
|
|
13
|
+
/*
|
|
14
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
15
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
16
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
17
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
*
|
|
19
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
20
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
21
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
22
|
+
* governing permissions and limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
let $ac118ceca79b8650$var$FormContext = /*#__PURE__*/ (0, $ijGT7$react).createContext(null);
|
|
30
|
+
function $ac118ceca79b8650$export$a6b5be5c6b451665(props) {
|
|
31
|
+
let ctx = (0, $ijGT7$useContext)($ac118ceca79b8650$var$FormContext);
|
|
32
|
+
if (ctx) return {
|
|
33
|
+
...ctx,
|
|
34
|
+
...props
|
|
35
|
+
};
|
|
36
|
+
return props;
|
|
37
|
+
}
|
|
38
|
+
const $ac118ceca79b8650$var$formPropNames = new Set([
|
|
39
|
+
'action',
|
|
40
|
+
'autoComplete',
|
|
41
|
+
'encType',
|
|
42
|
+
'method',
|
|
43
|
+
'target',
|
|
44
|
+
'onSubmit',
|
|
45
|
+
'onReset',
|
|
46
|
+
'onInvalid'
|
|
47
|
+
]);
|
|
48
|
+
function $ac118ceca79b8650$var$Form(props, ref) {
|
|
49
|
+
props = (0, $ijGT7$useProviderProps)(props);
|
|
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
|
+
let { styleProps: styleProps } = (0, $ijGT7$useStyleProps)(otherProps);
|
|
52
|
+
let domRef = (0, $ijGT7$useDOMRef)(ref);
|
|
53
|
+
let ctx = {
|
|
54
|
+
labelPosition: labelPosition,
|
|
55
|
+
labelAlign: labelAlign,
|
|
56
|
+
necessityIndicator: necessityIndicator,
|
|
57
|
+
validationBehavior: validationBehavior
|
|
58
|
+
};
|
|
59
|
+
return /*#__PURE__*/ (0, $ijGT7$react).createElement("form", {
|
|
60
|
+
...(0, $ijGT7$filterDOMProps)(otherProps, {
|
|
61
|
+
labelable: true,
|
|
62
|
+
propNames: $ac118ceca79b8650$var$formPropNames
|
|
63
|
+
}),
|
|
64
|
+
...styleProps,
|
|
65
|
+
noValidate: validationBehavior !== 'native',
|
|
66
|
+
ref: domRef,
|
|
67
|
+
className: (0, $ijGT7$classNames)((0, ($parcel$interopDefault($ijGT7$fieldlabel_vars_cssmodulejs))), 'spectrum-Form', {
|
|
68
|
+
'spectrum-Form--positionSide': labelPosition === 'side',
|
|
69
|
+
'spectrum-Form--positionTop': labelPosition === 'top'
|
|
70
|
+
}, styleProps.className)
|
|
71
|
+
}, /*#__PURE__*/ (0, $ijGT7$react).createElement($ac118ceca79b8650$var$FormContext.Provider, {
|
|
72
|
+
value: ctx
|
|
73
|
+
}, /*#__PURE__*/ (0, $ijGT7$react).createElement((0, $ijGT7$Provider), {
|
|
74
|
+
isQuiet: isQuiet,
|
|
75
|
+
isEmphasized: isEmphasized,
|
|
76
|
+
isDisabled: isDisabled,
|
|
77
|
+
isReadOnly: isReadOnly,
|
|
78
|
+
isRequired: isRequired,
|
|
79
|
+
validationState: validationState
|
|
80
|
+
}, /*#__PURE__*/ (0, $ijGT7$react).createElement((0, $ijGT7$FormValidationContext).Provider, {
|
|
81
|
+
value: validationErrors || {}
|
|
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);
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
export {$ac118ceca79b8650$export$a6b5be5c6b451665 as useFormProps, $ac118ceca79b8650$export$a7fed597f4b8afd8 as Form};
|
|
90
|
+
//# sourceMappingURL=Form.module.js.map
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import "./vars.fa28e7ec.css";
|
|
2
|
+
import $ijGT7$fieldlabel_vars_cssmodulejs from "./fieldlabel_vars_css.module.js";
|
|
3
|
+
import {useStyleProps as $ijGT7$useStyleProps, useDOMRef as $ijGT7$useDOMRef, classNames as $ijGT7$classNames} from "@react-spectrum/utils";
|
|
4
|
+
import {filterDOMProps as $ijGT7$filterDOMProps} from "@react-aria/utils";
|
|
5
|
+
import {FormValidationContext as $ijGT7$FormValidationContext} from "@react-stately/form";
|
|
6
|
+
import {useProviderProps as $ijGT7$useProviderProps, Provider as $ijGT7$Provider} from "@react-spectrum/provider";
|
|
7
|
+
import $ijGT7$react, {useContext as $ijGT7$useContext} from "react";
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
function $parcel$interopDefault(a) {
|
|
11
|
+
return a && a.__esModule ? a.default : a;
|
|
12
|
+
}
|
|
13
|
+
/*
|
|
14
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
15
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
16
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
17
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
18
|
+
*
|
|
19
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
20
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
21
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
22
|
+
* governing permissions and limitations under the License.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
let $ac118ceca79b8650$var$FormContext = /*#__PURE__*/ (0, $ijGT7$react).createContext(null);
|
|
30
|
+
function $ac118ceca79b8650$export$a6b5be5c6b451665(props) {
|
|
31
|
+
let ctx = (0, $ijGT7$useContext)($ac118ceca79b8650$var$FormContext);
|
|
32
|
+
if (ctx) return {
|
|
33
|
+
...ctx,
|
|
34
|
+
...props
|
|
35
|
+
};
|
|
36
|
+
return props;
|
|
37
|
+
}
|
|
38
|
+
const $ac118ceca79b8650$var$formPropNames = new Set([
|
|
39
|
+
'action',
|
|
40
|
+
'autoComplete',
|
|
41
|
+
'encType',
|
|
42
|
+
'method',
|
|
43
|
+
'target',
|
|
44
|
+
'onSubmit',
|
|
45
|
+
'onReset',
|
|
46
|
+
'onInvalid'
|
|
47
|
+
]);
|
|
48
|
+
function $ac118ceca79b8650$var$Form(props, ref) {
|
|
49
|
+
props = (0, $ijGT7$useProviderProps)(props);
|
|
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
|
+
let { styleProps: styleProps } = (0, $ijGT7$useStyleProps)(otherProps);
|
|
52
|
+
let domRef = (0, $ijGT7$useDOMRef)(ref);
|
|
53
|
+
let ctx = {
|
|
54
|
+
labelPosition: labelPosition,
|
|
55
|
+
labelAlign: labelAlign,
|
|
56
|
+
necessityIndicator: necessityIndicator,
|
|
57
|
+
validationBehavior: validationBehavior
|
|
58
|
+
};
|
|
59
|
+
return /*#__PURE__*/ (0, $ijGT7$react).createElement("form", {
|
|
60
|
+
...(0, $ijGT7$filterDOMProps)(otherProps, {
|
|
61
|
+
labelable: true,
|
|
62
|
+
propNames: $ac118ceca79b8650$var$formPropNames
|
|
63
|
+
}),
|
|
64
|
+
...styleProps,
|
|
65
|
+
noValidate: validationBehavior !== 'native',
|
|
66
|
+
ref: domRef,
|
|
67
|
+
className: (0, $ijGT7$classNames)((0, ($parcel$interopDefault($ijGT7$fieldlabel_vars_cssmodulejs))), 'spectrum-Form', {
|
|
68
|
+
'spectrum-Form--positionSide': labelPosition === 'side',
|
|
69
|
+
'spectrum-Form--positionTop': labelPosition === 'top'
|
|
70
|
+
}, styleProps.className)
|
|
71
|
+
}, /*#__PURE__*/ (0, $ijGT7$react).createElement($ac118ceca79b8650$var$FormContext.Provider, {
|
|
72
|
+
value: ctx
|
|
73
|
+
}, /*#__PURE__*/ (0, $ijGT7$react).createElement((0, $ijGT7$Provider), {
|
|
74
|
+
isQuiet: isQuiet,
|
|
75
|
+
isEmphasized: isEmphasized,
|
|
76
|
+
isDisabled: isDisabled,
|
|
77
|
+
isReadOnly: isReadOnly,
|
|
78
|
+
isRequired: isRequired,
|
|
79
|
+
validationState: validationState
|
|
80
|
+
}, /*#__PURE__*/ (0, $ijGT7$react).createElement((0, $ijGT7$FormValidationContext).Provider, {
|
|
81
|
+
value: validationErrors || {}
|
|
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);
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
export {$ac118ceca79b8650$export$a6b5be5c6b451665 as useFormProps, $ac118ceca79b8650$export$a7fed597f4b8afd8 as Form};
|
|
90
|
+
//# sourceMappingURL=Form.module.js.map
|
|
@@ -0,0 +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;AAED,SAAS,2BAAK,KAAwB,EAAE,GAA4B;IAClE,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;AAEA;;CAEC,GACD,MAAM,0DAAQ,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","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\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 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\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":[],"version":3,"file":"Form.module.js.map"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
|
|
2
|
+
function $parcel$export(e, n, v, s) {
|
|
3
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
$parcel$export(module.exports, "contextualHelp", () => $eb2fc0ee655eff6b$export$4ba534aba1836d, (v) => $eb2fc0ee655eff6b$export$4ba534aba1836d = v);
|
|
7
|
+
$parcel$export(module.exports, "field", () => $eb2fc0ee655eff6b$export$e0f35d825088c098, (v) => $eb2fc0ee655eff6b$export$e0f35d825088c098 = v);
|
|
8
|
+
$parcel$export(module.exports, "focus-ring", () => $eb2fc0ee655eff6b$export$f39a09f249340e2a, (v) => $eb2fc0ee655eff6b$export$f39a09f249340e2a = v);
|
|
9
|
+
$parcel$export(module.exports, "helpText", () => $eb2fc0ee655eff6b$export$431a3b688422af44, (v) => $eb2fc0ee655eff6b$export$431a3b688422af44 = v);
|
|
10
|
+
$parcel$export(module.exports, "i18nFontFamily", () => $eb2fc0ee655eff6b$export$8c4ee2c50c22c514, (v) => $eb2fc0ee655eff6b$export$8c4ee2c50c22c514 = v);
|
|
11
|
+
$parcel$export(module.exports, "is-disabled", () => $eb2fc0ee655eff6b$export$d35bc1e505d1ebbf, (v) => $eb2fc0ee655eff6b$export$d35bc1e505d1ebbf = v);
|
|
12
|
+
$parcel$export(module.exports, "label", () => $eb2fc0ee655eff6b$export$1237798dc640739a, (v) => $eb2fc0ee655eff6b$export$1237798dc640739a = v);
|
|
13
|
+
$parcel$export(module.exports, "spectrum-Field", () => $eb2fc0ee655eff6b$export$f6d480ae1e56eba0, (v) => $eb2fc0ee655eff6b$export$f6d480ae1e56eba0 = v);
|
|
14
|
+
$parcel$export(module.exports, "spectrum-Field--alignEnd", () => $eb2fc0ee655eff6b$export$5354c9be7ada5f83, (v) => $eb2fc0ee655eff6b$export$5354c9be7ada5f83 = v);
|
|
15
|
+
$parcel$export(module.exports, "spectrum-Field--hasContextualHelp", () => $eb2fc0ee655eff6b$export$9ba23707a252cdd4, (v) => $eb2fc0ee655eff6b$export$9ba23707a252cdd4 = v);
|
|
16
|
+
$parcel$export(module.exports, "spectrum-Field--positionSide", () => $eb2fc0ee655eff6b$export$2963225c91179589, (v) => $eb2fc0ee655eff6b$export$2963225c91179589 = v);
|
|
17
|
+
$parcel$export(module.exports, "spectrum-Field--positionTop", () => $eb2fc0ee655eff6b$export$a4ea780a9064d7f9, (v) => $eb2fc0ee655eff6b$export$a4ea780a9064d7f9 = v);
|
|
18
|
+
$parcel$export(module.exports, "spectrum-Field-contextualHelp", () => $eb2fc0ee655eff6b$export$24fb860d16dd2d3f, (v) => $eb2fc0ee655eff6b$export$24fb860d16dd2d3f = v);
|
|
19
|
+
$parcel$export(module.exports, "spectrum-Field-field", () => $eb2fc0ee655eff6b$export$3ab8a3dc7f0563d, (v) => $eb2fc0ee655eff6b$export$3ab8a3dc7f0563d = v);
|
|
20
|
+
$parcel$export(module.exports, "spectrum-Field-labelCell", () => $eb2fc0ee655eff6b$export$9cde5aecff012641, (v) => $eb2fc0ee655eff6b$export$9cde5aecff012641 = v);
|
|
21
|
+
$parcel$export(module.exports, "spectrum-Field-labelWrapper", () => $eb2fc0ee655eff6b$export$a872a8c78b26c9e0, (v) => $eb2fc0ee655eff6b$export$a872a8c78b26c9e0 = v);
|
|
22
|
+
$parcel$export(module.exports, "spectrum-Field-wrapper", () => $eb2fc0ee655eff6b$export$127df0b7290eb8ef, (v) => $eb2fc0ee655eff6b$export$127df0b7290eb8ef = v);
|
|
23
|
+
$parcel$export(module.exports, "spectrum-FieldLabel", () => $eb2fc0ee655eff6b$export$493d18e796ae054, (v) => $eb2fc0ee655eff6b$export$493d18e796ae054 = v);
|
|
24
|
+
$parcel$export(module.exports, "spectrum-FieldLabel--alignEnd", () => $eb2fc0ee655eff6b$export$885efcc08143a987, (v) => $eb2fc0ee655eff6b$export$885efcc08143a987 = v);
|
|
25
|
+
$parcel$export(module.exports, "spectrum-FieldLabel--positionSide", () => $eb2fc0ee655eff6b$export$9e6f19dc21f22f2e, (v) => $eb2fc0ee655eff6b$export$9e6f19dc21f22f2e = v);
|
|
26
|
+
$parcel$export(module.exports, "spectrum-FieldLabel-requiredIcon", () => $eb2fc0ee655eff6b$export$7c47642c7d46f3c9, (v) => $eb2fc0ee655eff6b$export$7c47642c7d46f3c9 = v);
|
|
27
|
+
$parcel$export(module.exports, "spectrum-FocusRing-ring", () => $eb2fc0ee655eff6b$export$4109102f950813a6, (v) => $eb2fc0ee655eff6b$export$4109102f950813a6 = v);
|
|
28
|
+
$parcel$export(module.exports, "spectrum-FocusRing", () => $eb2fc0ee655eff6b$export$24c7f46a6e3605dd, (v) => $eb2fc0ee655eff6b$export$24c7f46a6e3605dd = v);
|
|
29
|
+
$parcel$export(module.exports, "spectrum-FocusRing--quiet", () => $eb2fc0ee655eff6b$export$2927016961429360, (v) => $eb2fc0ee655eff6b$export$2927016961429360 = v);
|
|
30
|
+
$parcel$export(module.exports, "spectrum-Form", () => $eb2fc0ee655eff6b$export$94d2bcc94afabd89, (v) => $eb2fc0ee655eff6b$export$94d2bcc94afabd89 = v);
|
|
31
|
+
$parcel$export(module.exports, "spectrum-Form--positionSide", () => $eb2fc0ee655eff6b$export$7f44db659563c8f4, (v) => $eb2fc0ee655eff6b$export$7f44db659563c8f4 = v);
|
|
32
|
+
$parcel$export(module.exports, "spectrum-Form--positionTop", () => $eb2fc0ee655eff6b$export$11b8bc81fe551057, (v) => $eb2fc0ee655eff6b$export$11b8bc81fe551057 = v);
|
|
33
|
+
$parcel$export(module.exports, "spectrum-Form-itemLabel", () => $eb2fc0ee655eff6b$export$51ec27881a1e3928, (v) => $eb2fc0ee655eff6b$export$51ec27881a1e3928 = v);
|
|
34
|
+
$parcel$export(module.exports, "spectrum-LabeledValue", () => $eb2fc0ee655eff6b$export$79f9a5e9dd010c8d, (v) => $eb2fc0ee655eff6b$export$79f9a5e9dd010c8d = v);
|
|
35
|
+
var $eb2fc0ee655eff6b$export$4ba534aba1836d;
|
|
36
|
+
var $eb2fc0ee655eff6b$export$e0f35d825088c098;
|
|
37
|
+
var $eb2fc0ee655eff6b$export$f39a09f249340e2a;
|
|
38
|
+
var $eb2fc0ee655eff6b$export$431a3b688422af44;
|
|
39
|
+
var $eb2fc0ee655eff6b$export$8c4ee2c50c22c514;
|
|
40
|
+
var $eb2fc0ee655eff6b$export$d35bc1e505d1ebbf;
|
|
41
|
+
var $eb2fc0ee655eff6b$export$1237798dc640739a;
|
|
42
|
+
var $eb2fc0ee655eff6b$export$f6d480ae1e56eba0;
|
|
43
|
+
var $eb2fc0ee655eff6b$export$5354c9be7ada5f83;
|
|
44
|
+
var $eb2fc0ee655eff6b$export$9ba23707a252cdd4;
|
|
45
|
+
var $eb2fc0ee655eff6b$export$2963225c91179589;
|
|
46
|
+
var $eb2fc0ee655eff6b$export$a4ea780a9064d7f9;
|
|
47
|
+
var $eb2fc0ee655eff6b$export$24fb860d16dd2d3f;
|
|
48
|
+
var $eb2fc0ee655eff6b$export$3ab8a3dc7f0563d;
|
|
49
|
+
var $eb2fc0ee655eff6b$export$9cde5aecff012641;
|
|
50
|
+
var $eb2fc0ee655eff6b$export$a872a8c78b26c9e0;
|
|
51
|
+
var $eb2fc0ee655eff6b$export$127df0b7290eb8ef;
|
|
52
|
+
var $eb2fc0ee655eff6b$export$493d18e796ae054;
|
|
53
|
+
var $eb2fc0ee655eff6b$export$885efcc08143a987;
|
|
54
|
+
var $eb2fc0ee655eff6b$export$9e6f19dc21f22f2e;
|
|
55
|
+
var $eb2fc0ee655eff6b$export$7c47642c7d46f3c9;
|
|
56
|
+
var $eb2fc0ee655eff6b$export$4109102f950813a6;
|
|
57
|
+
var $eb2fc0ee655eff6b$export$24c7f46a6e3605dd;
|
|
58
|
+
var $eb2fc0ee655eff6b$export$2927016961429360;
|
|
59
|
+
var $eb2fc0ee655eff6b$export$94d2bcc94afabd89;
|
|
60
|
+
var $eb2fc0ee655eff6b$export$7f44db659563c8f4;
|
|
61
|
+
var $eb2fc0ee655eff6b$export$11b8bc81fe551057;
|
|
62
|
+
var $eb2fc0ee655eff6b$export$51ec27881a1e3928;
|
|
63
|
+
var $eb2fc0ee655eff6b$export$79f9a5e9dd010c8d;
|
|
64
|
+
$eb2fc0ee655eff6b$export$4ba534aba1836d = `A-HlBa_contextualHelp`;
|
|
65
|
+
$eb2fc0ee655eff6b$export$e0f35d825088c098 = `A-HlBa_field`;
|
|
66
|
+
$eb2fc0ee655eff6b$export$f39a09f249340e2a = `A-HlBa_focus-ring`;
|
|
67
|
+
$eb2fc0ee655eff6b$export$431a3b688422af44 = `A-HlBa_helpText`;
|
|
68
|
+
$eb2fc0ee655eff6b$export$8c4ee2c50c22c514 = `A-HlBa_i18nFontFamily`;
|
|
69
|
+
$eb2fc0ee655eff6b$export$d35bc1e505d1ebbf = `A-HlBa_is-disabled`;
|
|
70
|
+
$eb2fc0ee655eff6b$export$1237798dc640739a = `A-HlBa_label`;
|
|
71
|
+
$eb2fc0ee655eff6b$export$f6d480ae1e56eba0 = `A-HlBa_spectrum-Field`;
|
|
72
|
+
$eb2fc0ee655eff6b$export$5354c9be7ada5f83 = `A-HlBa_spectrum-Field--alignEnd`;
|
|
73
|
+
$eb2fc0ee655eff6b$export$9ba23707a252cdd4 = `A-HlBa_spectrum-Field--hasContextualHelp`;
|
|
74
|
+
$eb2fc0ee655eff6b$export$2963225c91179589 = `A-HlBa_spectrum-Field--positionSide`;
|
|
75
|
+
$eb2fc0ee655eff6b$export$a4ea780a9064d7f9 = `A-HlBa_spectrum-Field--positionTop`;
|
|
76
|
+
$eb2fc0ee655eff6b$export$24fb860d16dd2d3f = `A-HlBa_spectrum-Field-contextualHelp`;
|
|
77
|
+
$eb2fc0ee655eff6b$export$3ab8a3dc7f0563d = `A-HlBa_spectrum-Field-field`;
|
|
78
|
+
$eb2fc0ee655eff6b$export$9cde5aecff012641 = `A-HlBa_spectrum-Field-labelCell`;
|
|
79
|
+
$eb2fc0ee655eff6b$export$a872a8c78b26c9e0 = `A-HlBa_spectrum-Field-labelWrapper`;
|
|
80
|
+
$eb2fc0ee655eff6b$export$127df0b7290eb8ef = `A-HlBa_spectrum-Field-wrapper`;
|
|
81
|
+
$eb2fc0ee655eff6b$export$493d18e796ae054 = `A-HlBa_spectrum-FieldLabel`;
|
|
82
|
+
$eb2fc0ee655eff6b$export$885efcc08143a987 = `A-HlBa_spectrum-FieldLabel--alignEnd`;
|
|
83
|
+
$eb2fc0ee655eff6b$export$9e6f19dc21f22f2e = `A-HlBa_spectrum-FieldLabel--positionSide`;
|
|
84
|
+
$eb2fc0ee655eff6b$export$7c47642c7d46f3c9 = `A-HlBa_spectrum-FieldLabel-requiredIcon`;
|
|
85
|
+
$eb2fc0ee655eff6b$export$4109102f950813a6 = `A-HlBa_spectrum-FocusRing-ring`;
|
|
86
|
+
$eb2fc0ee655eff6b$export$24c7f46a6e3605dd = `A-HlBa_spectrum-FocusRing ${$eb2fc0ee655eff6b$export$4109102f950813a6}`;
|
|
87
|
+
$eb2fc0ee655eff6b$export$2927016961429360 = `A-HlBa_spectrum-FocusRing--quiet`;
|
|
88
|
+
$eb2fc0ee655eff6b$export$94d2bcc94afabd89 = `A-HlBa_spectrum-Form`;
|
|
89
|
+
$eb2fc0ee655eff6b$export$7f44db659563c8f4 = `A-HlBa_spectrum-Form--positionSide`;
|
|
90
|
+
$eb2fc0ee655eff6b$export$11b8bc81fe551057 = `A-HlBa_spectrum-Form--positionTop`;
|
|
91
|
+
$eb2fc0ee655eff6b$export$51ec27881a1e3928 = `A-HlBa_spectrum-Form-itemLabel`;
|
|
92
|
+
$eb2fc0ee655eff6b$export$79f9a5e9dd010c8d = `A-HlBa_spectrum-LabeledValue`;
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
//# sourceMappingURL=fieldlabel_vars_css.main.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AA5BA,0CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA6B,CAAC,eAAe,CAAC;AAC9C,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAA6C,CAAC,+BAA+B,CAAC;AAC9E,4CAAsD,CAAC,wCAAwC,CAAC;AAChG,4CAAiD,CAAC,mCAAmC,CAAC;AACtF,4CAAgD,CAAC,kCAAkC,CAAC;AACpF,4CAAkD,CAAC,oCAAoC,CAAC;AACxF,2CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAA6C,CAAC,+BAA+B,CAAC;AAC9E,4CAAgD,CAAC,kCAAkC,CAAC;AACpF,4CAA2C,CAAC,6BAA6B,CAAC;AAC1E,2CAAwC,CAAC,0BAA0B,CAAC;AACpE,4CAAkD,CAAC,oCAAoC,CAAC;AACxF,4CAAsD,CAAC,wCAAwC,CAAC;AAChG,4CAAqD,CAAC,uCAAuC,CAAC;AAC9F,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAAuC,CAAC,0BAA0B,EAAE,0CAA0C,CAAC;AAC/G,4CAA8C,CAAC,gCAAgC,CAAC;AAChF,4CAAkC,CAAC,oBAAoB,CAAC;AACxD,4CAAgD,CAAC,kCAAkC,CAAC;AACpF,4CAA+C,CAAC,iCAAiC,CAAC;AAClF,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAA0C,CAAC,4BAA4B,CAAC","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":"fieldlabel_vars_css.main.js.map"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
|
|
2
|
+
function $parcel$export(e, n, v, s) {
|
|
3
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
+
}
|
|
5
|
+
var $cd231e464c886c86$exports = {};
|
|
6
|
+
|
|
7
|
+
$parcel$export($cd231e464c886c86$exports, "contextualHelp", () => $cd231e464c886c86$export$4ba534aba1836d, (v) => $cd231e464c886c86$export$4ba534aba1836d = v);
|
|
8
|
+
$parcel$export($cd231e464c886c86$exports, "field", () => $cd231e464c886c86$export$e0f35d825088c098, (v) => $cd231e464c886c86$export$e0f35d825088c098 = v);
|
|
9
|
+
$parcel$export($cd231e464c886c86$exports, "focus-ring", () => $cd231e464c886c86$export$f39a09f249340e2a, (v) => $cd231e464c886c86$export$f39a09f249340e2a = v);
|
|
10
|
+
$parcel$export($cd231e464c886c86$exports, "helpText", () => $cd231e464c886c86$export$431a3b688422af44, (v) => $cd231e464c886c86$export$431a3b688422af44 = v);
|
|
11
|
+
$parcel$export($cd231e464c886c86$exports, "i18nFontFamily", () => $cd231e464c886c86$export$8c4ee2c50c22c514, (v) => $cd231e464c886c86$export$8c4ee2c50c22c514 = v);
|
|
12
|
+
$parcel$export($cd231e464c886c86$exports, "is-disabled", () => $cd231e464c886c86$export$d35bc1e505d1ebbf, (v) => $cd231e464c886c86$export$d35bc1e505d1ebbf = v);
|
|
13
|
+
$parcel$export($cd231e464c886c86$exports, "label", () => $cd231e464c886c86$export$1237798dc640739a, (v) => $cd231e464c886c86$export$1237798dc640739a = v);
|
|
14
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field", () => $cd231e464c886c86$export$f6d480ae1e56eba0, (v) => $cd231e464c886c86$export$f6d480ae1e56eba0 = v);
|
|
15
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--alignEnd", () => $cd231e464c886c86$export$5354c9be7ada5f83, (v) => $cd231e464c886c86$export$5354c9be7ada5f83 = v);
|
|
16
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--hasContextualHelp", () => $cd231e464c886c86$export$9ba23707a252cdd4, (v) => $cd231e464c886c86$export$9ba23707a252cdd4 = v);
|
|
17
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionSide", () => $cd231e464c886c86$export$2963225c91179589, (v) => $cd231e464c886c86$export$2963225c91179589 = v);
|
|
18
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionTop", () => $cd231e464c886c86$export$a4ea780a9064d7f9, (v) => $cd231e464c886c86$export$a4ea780a9064d7f9 = v);
|
|
19
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-contextualHelp", () => $cd231e464c886c86$export$24fb860d16dd2d3f, (v) => $cd231e464c886c86$export$24fb860d16dd2d3f = v);
|
|
20
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-field", () => $cd231e464c886c86$export$3ab8a3dc7f0563d, (v) => $cd231e464c886c86$export$3ab8a3dc7f0563d = v);
|
|
21
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-labelCell", () => $cd231e464c886c86$export$9cde5aecff012641, (v) => $cd231e464c886c86$export$9cde5aecff012641 = v);
|
|
22
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-labelWrapper", () => $cd231e464c886c86$export$a872a8c78b26c9e0, (v) => $cd231e464c886c86$export$a872a8c78b26c9e0 = v);
|
|
23
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-wrapper", () => $cd231e464c886c86$export$127df0b7290eb8ef, (v) => $cd231e464c886c86$export$127df0b7290eb8ef = v);
|
|
24
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel", () => $cd231e464c886c86$export$493d18e796ae054, (v) => $cd231e464c886c86$export$493d18e796ae054 = v);
|
|
25
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--alignEnd", () => $cd231e464c886c86$export$885efcc08143a987, (v) => $cd231e464c886c86$export$885efcc08143a987 = v);
|
|
26
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--positionSide", () => $cd231e464c886c86$export$9e6f19dc21f22f2e, (v) => $cd231e464c886c86$export$9e6f19dc21f22f2e = v);
|
|
27
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel-requiredIcon", () => $cd231e464c886c86$export$7c47642c7d46f3c9, (v) => $cd231e464c886c86$export$7c47642c7d46f3c9 = v);
|
|
28
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FocusRing-ring", () => $cd231e464c886c86$export$4109102f950813a6, (v) => $cd231e464c886c86$export$4109102f950813a6 = v);
|
|
29
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FocusRing", () => $cd231e464c886c86$export$24c7f46a6e3605dd, (v) => $cd231e464c886c86$export$24c7f46a6e3605dd = v);
|
|
30
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FocusRing--quiet", () => $cd231e464c886c86$export$2927016961429360, (v) => $cd231e464c886c86$export$2927016961429360 = v);
|
|
31
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form", () => $cd231e464c886c86$export$94d2bcc94afabd89, (v) => $cd231e464c886c86$export$94d2bcc94afabd89 = v);
|
|
32
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionSide", () => $cd231e464c886c86$export$7f44db659563c8f4, (v) => $cd231e464c886c86$export$7f44db659563c8f4 = v);
|
|
33
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionTop", () => $cd231e464c886c86$export$11b8bc81fe551057, (v) => $cd231e464c886c86$export$11b8bc81fe551057 = v);
|
|
34
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form-itemLabel", () => $cd231e464c886c86$export$51ec27881a1e3928, (v) => $cd231e464c886c86$export$51ec27881a1e3928 = v);
|
|
35
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-LabeledValue", () => $cd231e464c886c86$export$79f9a5e9dd010c8d, (v) => $cd231e464c886c86$export$79f9a5e9dd010c8d = v);
|
|
36
|
+
var $cd231e464c886c86$export$4ba534aba1836d;
|
|
37
|
+
var $cd231e464c886c86$export$e0f35d825088c098;
|
|
38
|
+
var $cd231e464c886c86$export$f39a09f249340e2a;
|
|
39
|
+
var $cd231e464c886c86$export$431a3b688422af44;
|
|
40
|
+
var $cd231e464c886c86$export$8c4ee2c50c22c514;
|
|
41
|
+
var $cd231e464c886c86$export$d35bc1e505d1ebbf;
|
|
42
|
+
var $cd231e464c886c86$export$1237798dc640739a;
|
|
43
|
+
var $cd231e464c886c86$export$f6d480ae1e56eba0;
|
|
44
|
+
var $cd231e464c886c86$export$5354c9be7ada5f83;
|
|
45
|
+
var $cd231e464c886c86$export$9ba23707a252cdd4;
|
|
46
|
+
var $cd231e464c886c86$export$2963225c91179589;
|
|
47
|
+
var $cd231e464c886c86$export$a4ea780a9064d7f9;
|
|
48
|
+
var $cd231e464c886c86$export$24fb860d16dd2d3f;
|
|
49
|
+
var $cd231e464c886c86$export$3ab8a3dc7f0563d;
|
|
50
|
+
var $cd231e464c886c86$export$9cde5aecff012641;
|
|
51
|
+
var $cd231e464c886c86$export$a872a8c78b26c9e0;
|
|
52
|
+
var $cd231e464c886c86$export$127df0b7290eb8ef;
|
|
53
|
+
var $cd231e464c886c86$export$493d18e796ae054;
|
|
54
|
+
var $cd231e464c886c86$export$885efcc08143a987;
|
|
55
|
+
var $cd231e464c886c86$export$9e6f19dc21f22f2e;
|
|
56
|
+
var $cd231e464c886c86$export$7c47642c7d46f3c9;
|
|
57
|
+
var $cd231e464c886c86$export$4109102f950813a6;
|
|
58
|
+
var $cd231e464c886c86$export$24c7f46a6e3605dd;
|
|
59
|
+
var $cd231e464c886c86$export$2927016961429360;
|
|
60
|
+
var $cd231e464c886c86$export$94d2bcc94afabd89;
|
|
61
|
+
var $cd231e464c886c86$export$7f44db659563c8f4;
|
|
62
|
+
var $cd231e464c886c86$export$11b8bc81fe551057;
|
|
63
|
+
var $cd231e464c886c86$export$51ec27881a1e3928;
|
|
64
|
+
var $cd231e464c886c86$export$79f9a5e9dd010c8d;
|
|
65
|
+
$cd231e464c886c86$export$4ba534aba1836d = `A-HlBa_contextualHelp`;
|
|
66
|
+
$cd231e464c886c86$export$e0f35d825088c098 = `A-HlBa_field`;
|
|
67
|
+
$cd231e464c886c86$export$f39a09f249340e2a = `A-HlBa_focus-ring`;
|
|
68
|
+
$cd231e464c886c86$export$431a3b688422af44 = `A-HlBa_helpText`;
|
|
69
|
+
$cd231e464c886c86$export$8c4ee2c50c22c514 = `A-HlBa_i18nFontFamily`;
|
|
70
|
+
$cd231e464c886c86$export$d35bc1e505d1ebbf = `A-HlBa_is-disabled`;
|
|
71
|
+
$cd231e464c886c86$export$1237798dc640739a = `A-HlBa_label`;
|
|
72
|
+
$cd231e464c886c86$export$f6d480ae1e56eba0 = `A-HlBa_spectrum-Field`;
|
|
73
|
+
$cd231e464c886c86$export$5354c9be7ada5f83 = `A-HlBa_spectrum-Field--alignEnd`;
|
|
74
|
+
$cd231e464c886c86$export$9ba23707a252cdd4 = `A-HlBa_spectrum-Field--hasContextualHelp`;
|
|
75
|
+
$cd231e464c886c86$export$2963225c91179589 = `A-HlBa_spectrum-Field--positionSide`;
|
|
76
|
+
$cd231e464c886c86$export$a4ea780a9064d7f9 = `A-HlBa_spectrum-Field--positionTop`;
|
|
77
|
+
$cd231e464c886c86$export$24fb860d16dd2d3f = `A-HlBa_spectrum-Field-contextualHelp`;
|
|
78
|
+
$cd231e464c886c86$export$3ab8a3dc7f0563d = `A-HlBa_spectrum-Field-field`;
|
|
79
|
+
$cd231e464c886c86$export$9cde5aecff012641 = `A-HlBa_spectrum-Field-labelCell`;
|
|
80
|
+
$cd231e464c886c86$export$a872a8c78b26c9e0 = `A-HlBa_spectrum-Field-labelWrapper`;
|
|
81
|
+
$cd231e464c886c86$export$127df0b7290eb8ef = `A-HlBa_spectrum-Field-wrapper`;
|
|
82
|
+
$cd231e464c886c86$export$493d18e796ae054 = `A-HlBa_spectrum-FieldLabel`;
|
|
83
|
+
$cd231e464c886c86$export$885efcc08143a987 = `A-HlBa_spectrum-FieldLabel--alignEnd`;
|
|
84
|
+
$cd231e464c886c86$export$9e6f19dc21f22f2e = `A-HlBa_spectrum-FieldLabel--positionSide`;
|
|
85
|
+
$cd231e464c886c86$export$7c47642c7d46f3c9 = `A-HlBa_spectrum-FieldLabel-requiredIcon`;
|
|
86
|
+
$cd231e464c886c86$export$4109102f950813a6 = `A-HlBa_spectrum-FocusRing-ring`;
|
|
87
|
+
$cd231e464c886c86$export$24c7f46a6e3605dd = `A-HlBa_spectrum-FocusRing ${$cd231e464c886c86$export$4109102f950813a6}`;
|
|
88
|
+
$cd231e464c886c86$export$2927016961429360 = `A-HlBa_spectrum-FocusRing--quiet`;
|
|
89
|
+
$cd231e464c886c86$export$94d2bcc94afabd89 = `A-HlBa_spectrum-Form`;
|
|
90
|
+
$cd231e464c886c86$export$7f44db659563c8f4 = `A-HlBa_spectrum-Form--positionSide`;
|
|
91
|
+
$cd231e464c886c86$export$11b8bc81fe551057 = `A-HlBa_spectrum-Form--positionTop`;
|
|
92
|
+
$cd231e464c886c86$export$51ec27881a1e3928 = `A-HlBa_spectrum-Form-itemLabel`;
|
|
93
|
+
$cd231e464c886c86$export$79f9a5e9dd010c8d = `A-HlBa_spectrum-LabeledValue`;
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
export {$cd231e464c886c86$exports as default};
|
|
97
|
+
//# sourceMappingURL=fieldlabel_vars_css.module.js.map
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
|
|
2
|
+
function $parcel$export(e, n, v, s) {
|
|
3
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
4
|
+
}
|
|
5
|
+
var $cd231e464c886c86$exports = {};
|
|
6
|
+
|
|
7
|
+
$parcel$export($cd231e464c886c86$exports, "contextualHelp", () => $cd231e464c886c86$export$4ba534aba1836d, (v) => $cd231e464c886c86$export$4ba534aba1836d = v);
|
|
8
|
+
$parcel$export($cd231e464c886c86$exports, "field", () => $cd231e464c886c86$export$e0f35d825088c098, (v) => $cd231e464c886c86$export$e0f35d825088c098 = v);
|
|
9
|
+
$parcel$export($cd231e464c886c86$exports, "focus-ring", () => $cd231e464c886c86$export$f39a09f249340e2a, (v) => $cd231e464c886c86$export$f39a09f249340e2a = v);
|
|
10
|
+
$parcel$export($cd231e464c886c86$exports, "helpText", () => $cd231e464c886c86$export$431a3b688422af44, (v) => $cd231e464c886c86$export$431a3b688422af44 = v);
|
|
11
|
+
$parcel$export($cd231e464c886c86$exports, "i18nFontFamily", () => $cd231e464c886c86$export$8c4ee2c50c22c514, (v) => $cd231e464c886c86$export$8c4ee2c50c22c514 = v);
|
|
12
|
+
$parcel$export($cd231e464c886c86$exports, "is-disabled", () => $cd231e464c886c86$export$d35bc1e505d1ebbf, (v) => $cd231e464c886c86$export$d35bc1e505d1ebbf = v);
|
|
13
|
+
$parcel$export($cd231e464c886c86$exports, "label", () => $cd231e464c886c86$export$1237798dc640739a, (v) => $cd231e464c886c86$export$1237798dc640739a = v);
|
|
14
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field", () => $cd231e464c886c86$export$f6d480ae1e56eba0, (v) => $cd231e464c886c86$export$f6d480ae1e56eba0 = v);
|
|
15
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--alignEnd", () => $cd231e464c886c86$export$5354c9be7ada5f83, (v) => $cd231e464c886c86$export$5354c9be7ada5f83 = v);
|
|
16
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--hasContextualHelp", () => $cd231e464c886c86$export$9ba23707a252cdd4, (v) => $cd231e464c886c86$export$9ba23707a252cdd4 = v);
|
|
17
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionSide", () => $cd231e464c886c86$export$2963225c91179589, (v) => $cd231e464c886c86$export$2963225c91179589 = v);
|
|
18
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionTop", () => $cd231e464c886c86$export$a4ea780a9064d7f9, (v) => $cd231e464c886c86$export$a4ea780a9064d7f9 = v);
|
|
19
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-contextualHelp", () => $cd231e464c886c86$export$24fb860d16dd2d3f, (v) => $cd231e464c886c86$export$24fb860d16dd2d3f = v);
|
|
20
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-field", () => $cd231e464c886c86$export$3ab8a3dc7f0563d, (v) => $cd231e464c886c86$export$3ab8a3dc7f0563d = v);
|
|
21
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-labelCell", () => $cd231e464c886c86$export$9cde5aecff012641, (v) => $cd231e464c886c86$export$9cde5aecff012641 = v);
|
|
22
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-labelWrapper", () => $cd231e464c886c86$export$a872a8c78b26c9e0, (v) => $cd231e464c886c86$export$a872a8c78b26c9e0 = v);
|
|
23
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-wrapper", () => $cd231e464c886c86$export$127df0b7290eb8ef, (v) => $cd231e464c886c86$export$127df0b7290eb8ef = v);
|
|
24
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel", () => $cd231e464c886c86$export$493d18e796ae054, (v) => $cd231e464c886c86$export$493d18e796ae054 = v);
|
|
25
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--alignEnd", () => $cd231e464c886c86$export$885efcc08143a987, (v) => $cd231e464c886c86$export$885efcc08143a987 = v);
|
|
26
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--positionSide", () => $cd231e464c886c86$export$9e6f19dc21f22f2e, (v) => $cd231e464c886c86$export$9e6f19dc21f22f2e = v);
|
|
27
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel-requiredIcon", () => $cd231e464c886c86$export$7c47642c7d46f3c9, (v) => $cd231e464c886c86$export$7c47642c7d46f3c9 = v);
|
|
28
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FocusRing-ring", () => $cd231e464c886c86$export$4109102f950813a6, (v) => $cd231e464c886c86$export$4109102f950813a6 = v);
|
|
29
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FocusRing", () => $cd231e464c886c86$export$24c7f46a6e3605dd, (v) => $cd231e464c886c86$export$24c7f46a6e3605dd = v);
|
|
30
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-FocusRing--quiet", () => $cd231e464c886c86$export$2927016961429360, (v) => $cd231e464c886c86$export$2927016961429360 = v);
|
|
31
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form", () => $cd231e464c886c86$export$94d2bcc94afabd89, (v) => $cd231e464c886c86$export$94d2bcc94afabd89 = v);
|
|
32
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionSide", () => $cd231e464c886c86$export$7f44db659563c8f4, (v) => $cd231e464c886c86$export$7f44db659563c8f4 = v);
|
|
33
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionTop", () => $cd231e464c886c86$export$11b8bc81fe551057, (v) => $cd231e464c886c86$export$11b8bc81fe551057 = v);
|
|
34
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-Form-itemLabel", () => $cd231e464c886c86$export$51ec27881a1e3928, (v) => $cd231e464c886c86$export$51ec27881a1e3928 = v);
|
|
35
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-LabeledValue", () => $cd231e464c886c86$export$79f9a5e9dd010c8d, (v) => $cd231e464c886c86$export$79f9a5e9dd010c8d = v);
|
|
36
|
+
var $cd231e464c886c86$export$4ba534aba1836d;
|
|
37
|
+
var $cd231e464c886c86$export$e0f35d825088c098;
|
|
38
|
+
var $cd231e464c886c86$export$f39a09f249340e2a;
|
|
39
|
+
var $cd231e464c886c86$export$431a3b688422af44;
|
|
40
|
+
var $cd231e464c886c86$export$8c4ee2c50c22c514;
|
|
41
|
+
var $cd231e464c886c86$export$d35bc1e505d1ebbf;
|
|
42
|
+
var $cd231e464c886c86$export$1237798dc640739a;
|
|
43
|
+
var $cd231e464c886c86$export$f6d480ae1e56eba0;
|
|
44
|
+
var $cd231e464c886c86$export$5354c9be7ada5f83;
|
|
45
|
+
var $cd231e464c886c86$export$9ba23707a252cdd4;
|
|
46
|
+
var $cd231e464c886c86$export$2963225c91179589;
|
|
47
|
+
var $cd231e464c886c86$export$a4ea780a9064d7f9;
|
|
48
|
+
var $cd231e464c886c86$export$24fb860d16dd2d3f;
|
|
49
|
+
var $cd231e464c886c86$export$3ab8a3dc7f0563d;
|
|
50
|
+
var $cd231e464c886c86$export$9cde5aecff012641;
|
|
51
|
+
var $cd231e464c886c86$export$a872a8c78b26c9e0;
|
|
52
|
+
var $cd231e464c886c86$export$127df0b7290eb8ef;
|
|
53
|
+
var $cd231e464c886c86$export$493d18e796ae054;
|
|
54
|
+
var $cd231e464c886c86$export$885efcc08143a987;
|
|
55
|
+
var $cd231e464c886c86$export$9e6f19dc21f22f2e;
|
|
56
|
+
var $cd231e464c886c86$export$7c47642c7d46f3c9;
|
|
57
|
+
var $cd231e464c886c86$export$4109102f950813a6;
|
|
58
|
+
var $cd231e464c886c86$export$24c7f46a6e3605dd;
|
|
59
|
+
var $cd231e464c886c86$export$2927016961429360;
|
|
60
|
+
var $cd231e464c886c86$export$94d2bcc94afabd89;
|
|
61
|
+
var $cd231e464c886c86$export$7f44db659563c8f4;
|
|
62
|
+
var $cd231e464c886c86$export$11b8bc81fe551057;
|
|
63
|
+
var $cd231e464c886c86$export$51ec27881a1e3928;
|
|
64
|
+
var $cd231e464c886c86$export$79f9a5e9dd010c8d;
|
|
65
|
+
$cd231e464c886c86$export$4ba534aba1836d = `A-HlBa_contextualHelp`;
|
|
66
|
+
$cd231e464c886c86$export$e0f35d825088c098 = `A-HlBa_field`;
|
|
67
|
+
$cd231e464c886c86$export$f39a09f249340e2a = `A-HlBa_focus-ring`;
|
|
68
|
+
$cd231e464c886c86$export$431a3b688422af44 = `A-HlBa_helpText`;
|
|
69
|
+
$cd231e464c886c86$export$8c4ee2c50c22c514 = `A-HlBa_i18nFontFamily`;
|
|
70
|
+
$cd231e464c886c86$export$d35bc1e505d1ebbf = `A-HlBa_is-disabled`;
|
|
71
|
+
$cd231e464c886c86$export$1237798dc640739a = `A-HlBa_label`;
|
|
72
|
+
$cd231e464c886c86$export$f6d480ae1e56eba0 = `A-HlBa_spectrum-Field`;
|
|
73
|
+
$cd231e464c886c86$export$5354c9be7ada5f83 = `A-HlBa_spectrum-Field--alignEnd`;
|
|
74
|
+
$cd231e464c886c86$export$9ba23707a252cdd4 = `A-HlBa_spectrum-Field--hasContextualHelp`;
|
|
75
|
+
$cd231e464c886c86$export$2963225c91179589 = `A-HlBa_spectrum-Field--positionSide`;
|
|
76
|
+
$cd231e464c886c86$export$a4ea780a9064d7f9 = `A-HlBa_spectrum-Field--positionTop`;
|
|
77
|
+
$cd231e464c886c86$export$24fb860d16dd2d3f = `A-HlBa_spectrum-Field-contextualHelp`;
|
|
78
|
+
$cd231e464c886c86$export$3ab8a3dc7f0563d = `A-HlBa_spectrum-Field-field`;
|
|
79
|
+
$cd231e464c886c86$export$9cde5aecff012641 = `A-HlBa_spectrum-Field-labelCell`;
|
|
80
|
+
$cd231e464c886c86$export$a872a8c78b26c9e0 = `A-HlBa_spectrum-Field-labelWrapper`;
|
|
81
|
+
$cd231e464c886c86$export$127df0b7290eb8ef = `A-HlBa_spectrum-Field-wrapper`;
|
|
82
|
+
$cd231e464c886c86$export$493d18e796ae054 = `A-HlBa_spectrum-FieldLabel`;
|
|
83
|
+
$cd231e464c886c86$export$885efcc08143a987 = `A-HlBa_spectrum-FieldLabel--alignEnd`;
|
|
84
|
+
$cd231e464c886c86$export$9e6f19dc21f22f2e = `A-HlBa_spectrum-FieldLabel--positionSide`;
|
|
85
|
+
$cd231e464c886c86$export$7c47642c7d46f3c9 = `A-HlBa_spectrum-FieldLabel-requiredIcon`;
|
|
86
|
+
$cd231e464c886c86$export$4109102f950813a6 = `A-HlBa_spectrum-FocusRing-ring`;
|
|
87
|
+
$cd231e464c886c86$export$24c7f46a6e3605dd = `A-HlBa_spectrum-FocusRing ${$cd231e464c886c86$export$4109102f950813a6}`;
|
|
88
|
+
$cd231e464c886c86$export$2927016961429360 = `A-HlBa_spectrum-FocusRing--quiet`;
|
|
89
|
+
$cd231e464c886c86$export$94d2bcc94afabd89 = `A-HlBa_spectrum-Form`;
|
|
90
|
+
$cd231e464c886c86$export$7f44db659563c8f4 = `A-HlBa_spectrum-Form--positionSide`;
|
|
91
|
+
$cd231e464c886c86$export$11b8bc81fe551057 = `A-HlBa_spectrum-Form--positionTop`;
|
|
92
|
+
$cd231e464c886c86$export$51ec27881a1e3928 = `A-HlBa_spectrum-Form-itemLabel`;
|
|
93
|
+
$cd231e464c886c86$export$79f9a5e9dd010c8d = `A-HlBa_spectrum-LabeledValue`;
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
export {$cd231e464c886c86$exports as default};
|
|
97
|
+
//# sourceMappingURL=fieldlabel_vars_css.module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AA5BA,0CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAA6B,CAAC,eAAe,CAAC;AAC9C,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA0B,CAAC,YAAY,CAAC;AACxC,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAA6C,CAAC,+BAA+B,CAAC;AAC9E,4CAAsD,CAAC,wCAAwC,CAAC;AAChG,4CAAiD,CAAC,mCAAmC,CAAC;AACtF,4CAAgD,CAAC,kCAAkC,CAAC;AACpF,4CAAkD,CAAC,oCAAoC,CAAC;AACxF,2CAAyC,CAAC,2BAA2B,CAAC;AACtE,4CAA6C,CAAC,+BAA+B,CAAC;AAC9E,4CAAgD,CAAC,kCAAkC,CAAC;AACpF,4CAA2C,CAAC,6BAA6B,CAAC;AAC1E,2CAAwC,CAAC,0BAA0B,CAAC;AACpE,4CAAkD,CAAC,oCAAoC,CAAC;AACxF,4CAAsD,CAAC,wCAAwC,CAAC;AAChG,4CAAqD,CAAC,uCAAuC,CAAC;AAC9F,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAAuC,CAAC,0BAA0B,EAAE,0CAA0C,CAAC;AAC/G,4CAA8C,CAAC,gCAAgC,CAAC;AAChF,4CAAkC,CAAC,oBAAoB,CAAC;AACxD,4CAAgD,CAAC,kCAAkC,CAAC;AACpF,4CAA+C,CAAC,iCAAiC,CAAC;AAClF,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAA0C,CAAC,4BAA4B,CAAC","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":"fieldlabel_vars_css.module.js.map"}
|
package/dist/import.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {Form as $ac118ceca79b8650$export$a7fed597f4b8afd8, useFormProps as $ac118ceca79b8650$export$a6b5be5c6b451665} from "./Form.mjs";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/ /// <reference types="css-module-types" />
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export {$ac118ceca79b8650$export$a6b5be5c6b451665 as useFormProps, $ac118ceca79b8650$export$a7fed597f4b8afd8 as Form};
|
|
18
|
+
//# sourceMappingURL=module.js.map
|
package/dist/main.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var $d981bcab8e24f2f3$exports = require("./Form.main.js");
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
function $parcel$export(e, n, v, s) {
|
|
5
|
+
Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
$parcel$export(module.exports, "useFormProps", () => $d981bcab8e24f2f3$exports.useFormProps);
|
|
9
|
+
$parcel$export(module.exports, "Form", () => $d981bcab8e24f2f3$exports.Form);
|
|
10
|
+
/*
|
|
11
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
12
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
13
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
14
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
15
|
+
*
|
|
16
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
17
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
18
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
19
|
+
* governing permissions and limitations under the License.
|
|
20
|
+
*/ /// <reference types="css-module-types" />
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/form/src/index.ts"],"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 {useFormProps, Form} from './Form';\nexport type {SpectrumFormProps} from '@react-types/form';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {Form as $ac118ceca79b8650$export$a7fed597f4b8afd8, useFormProps as $ac118ceca79b8650$export$a6b5be5c6b451665} from "./Form.module.js";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
5
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
*
|
|
9
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
10
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
11
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
12
|
+
* governing permissions and limitations under the License.
|
|
13
|
+
*/ /// <reference types="css-module-types" />
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
export {$ac118ceca79b8650$export$a6b5be5c6b451665 as useFormProps, $ac118ceca79b8650$export$a7fed597f4b8afd8 as Form};
|
|
18
|
+
//# sourceMappingURL=module.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C","sources":["packages/@react-spectrum/form/src/index.ts"],"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 {useFormProps, Form} from './Form';\nexport type {SpectrumFormProps} from '@react-types/form';\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SpectrumLabelableProps, DOMRefValue } from "@react-types/shared";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { SpectrumFormProps } from "@react-types/form";
|
|
4
|
+
export function useFormProps<T extends SpectrumLabelableProps>(props: T): T;
|
|
5
|
+
/**
|
|
6
|
+
* Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.
|
|
7
|
+
*/
|
|
8
|
+
export const Form: React.ForwardRefExoticComponent<SpectrumFormProps & React.RefAttributes<DOMRefValue<HTMLFormElement>>>;
|
|
9
|
+
export type { SpectrumFormProps } from '@react-types/form';
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"mappings":";;;AA0BA,6BAA6B,CAAC,SAAS,sBAAsB,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAO1E;AA2ED;;GAEG;AACH,OAAA,MAAM,4GAA8B,CAAC;AChGrC,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"}
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
.A-HlBa_i18nFontFamily {
|
|
2
|
+
font-synthesis: weight;
|
|
3
|
+
font-family: adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.A-HlBa_i18nFontFamily:lang(ar) {
|
|
7
|
+
font-family: myriad-arabic, adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.A-HlBa_i18nFontFamily:lang(he) {
|
|
11
|
+
font-family: myriad-hebrew, adobe-clean, Source Sans Pro, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Ubuntu, Trebuchet MS, Lucida Grande, sans-serif;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.A-HlBa_i18nFontFamily:lang(zh) {
|
|
15
|
+
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Heiti TC Light, sans-serif;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.A-HlBa_i18nFontFamily:lang(zh-Hans) {
|
|
19
|
+
font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.A-HlBa_i18nFontFamily:lang(zh-Hant) {
|
|
23
|
+
font-family: adobe-clean-han-traditional, source-han-traditional, MingLiu, Microsoft JhengHei UI, Microsoft JhengHei, Heiti TC Light, sans-serif;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.A-HlBa_i18nFontFamily:lang(zh-SG), .A-HlBa_i18nFontFamily:lang(zh-CN) {
|
|
27
|
+
font-family: adobe-clean-han-simplified-c, source-han-simplified-c, SimSun, Heiti SC Light, sans-serif;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.A-HlBa_i18nFontFamily:lang(ko) {
|
|
31
|
+
font-family: adobe-clean-han-korean, source-han-korean, Malgun Gothic, Apple Gothic, sans-serif;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.A-HlBa_i18nFontFamily:lang(ja) {
|
|
35
|
+
font-family: adobe-clean-han-japanese, Hiragino Kaku Gothic ProN, ヒラギノ角ゴ ProN W3, Osaka, YuGothic, Yu Gothic, メイリオ, Meiryo, MS Pゴシック, MS PGothic, sans-serif;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.A-HlBa_spectrum-FocusRing-ring {
|
|
39
|
+
--spectrum-focus-ring-border-radius: var(--spectrum-textfield-border-radius, var(--spectrum-alias-border-radius-regular));
|
|
40
|
+
--spectrum-focus-ring-gap: var(--spectrum-alias-input-focusring-gap);
|
|
41
|
+
--spectrum-focus-ring-size: var(--spectrum-alias-input-focusring-size);
|
|
42
|
+
--spectrum-focus-ring-border-size: 0px;
|
|
43
|
+
--spectrum-focus-ring-color: var(--spectrum-high-contrast-focus-ring-color, var(--spectrum-alias-focus-ring-color, var(--spectrum-alias-focus-color)));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.A-HlBa_spectrum-FocusRing-ring:after {
|
|
47
|
+
border-radius: calc(var(--spectrum-focus-ring-border-radius) + var(--spectrum-focus-ring-gap));
|
|
48
|
+
content: "";
|
|
49
|
+
margin: calc(-1 * var(--spectrum-focus-ring-border-size));
|
|
50
|
+
pointer-events: none;
|
|
51
|
+
transition: box-shadow var(--spectrum-global-animation-duration-100, .13s) ease-out, margin var(--spectrum-global-animation-duration-100, .13s) ease-out;
|
|
52
|
+
display: block;
|
|
53
|
+
position: absolute;
|
|
54
|
+
inset: 0;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.A-HlBa_spectrum-FocusRing.A-HlBa_focus-ring:after {
|
|
58
|
+
margin: calc(var(--spectrum-focus-ring-gap) * -1 - var(--spectrum-focus-ring-border-size));
|
|
59
|
+
box-shadow: 0 0 0 var(--spectrum-focus-ring-size) var(--spectrum-focus-ring-color);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.A-HlBa_spectrum-FocusRing--quiet:after {
|
|
63
|
+
border-radius: 0;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.A-HlBa_spectrum-FocusRing--quiet.A-HlBa_focus-ring:after {
|
|
67
|
+
margin: 0 0 calc(var(--spectrum-focus-ring-gap) * -1 - var(--spectrum-focus-ring-border-size)) 0;
|
|
68
|
+
box-shadow: 0 var(--spectrum-focus-ring-size) 0 var(--spectrum-focus-ring-color);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@media (forced-colors: active) {
|
|
72
|
+
.A-HlBa_spectrum-FocusRing, .A-HlBa_spectrum-FocusRing-ring, .A-HlBa_spectrum-FocusRing--quiet {
|
|
73
|
+
--spectrum-high-contrast-focus-ring-color: Highlight;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:is(.A-HlBa_spectrum-FocusRing, .A-HlBa_spectrum-FocusRing-ring, .A-HlBa_spectrum-FocusRing--quiet):after {
|
|
77
|
+
forced-color-adjust: none;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.A-HlBa_spectrum-FieldLabel {
|
|
82
|
+
box-sizing: border-box;
|
|
83
|
+
padding: var(--spectrum-fieldlabel-padding-top, var(--spectrum-global-dimension-size-50)) 0 var(--spectrum-fieldlabel-padding-bottom, var(--spectrum-global-dimension-size-65));
|
|
84
|
+
font-size: var(--spectrum-fieldlabel-text-size, var(--spectrum-global-dimension-font-size-75));
|
|
85
|
+
font-weight: var(--spectrum-fieldlabel-text-font-weight, var(--spectrum-global-font-weight-regular));
|
|
86
|
+
line-height: var(--spectrum-fieldlabel-text-line-height, var(--spectrum-global-font-line-height-small));
|
|
87
|
+
vertical-align: top;
|
|
88
|
+
-webkit-font-smoothing: subpixel-antialiased;
|
|
89
|
+
-moz-osx-font-smoothing: auto;
|
|
90
|
+
font-smoothing: subpixel-antialiased;
|
|
91
|
+
text-align: start;
|
|
92
|
+
cursor: default;
|
|
93
|
+
flex: none;
|
|
94
|
+
display: flex;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.A-HlBa_spectrum-FieldLabel--positionSide {
|
|
98
|
+
padding-top: var(--spectrum-fieldlabel-side-padding-top, var(--spectrum-global-dimension-size-100));
|
|
99
|
+
padding-inline-end: var(--spectrum-fieldlabel-side-padding-x, var(--spectrum-global-dimension-size-100));
|
|
100
|
+
display: inline-flex;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.A-HlBa_spectrum-FieldLabel-requiredIcon {
|
|
104
|
+
margin-top: var(--spectrum-fieldlabel-asterisk-margin-y, var(--spectrum-global-dimension-size-50));
|
|
105
|
+
margin-inline-end: 0;
|
|
106
|
+
margin-bottom: 0;
|
|
107
|
+
margin-inline-start: var(--spectrum-fieldlabel-asterisk-gap, var(--spectrum-global-dimension-size-25));
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.A-HlBa_spectrum-FieldLabel--alignEnd {
|
|
111
|
+
text-align: end;
|
|
112
|
+
justify-content: flex-end;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.A-HlBa_spectrum-Field {
|
|
116
|
+
--spectrum-field-default-width: var(--spectrum-alias-single-line-width, var(--spectrum-global-dimension-size-2400));
|
|
117
|
+
height: max-content;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.A-HlBa_spectrum-Field .A-HlBa_spectrum-Field-contextualHelp {
|
|
121
|
+
margin-inline-start: var(--spectrum-global-dimension-size-50);
|
|
122
|
+
margin-top: var(--spectrum-global-dimension-size-25);
|
|
123
|
+
grid-area: A-HlBa_contextualHelp;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.A-HlBa_spectrum-Field:where(.A-HlBa_spectrum-Field--positionTop) {
|
|
127
|
+
width: var(--spectrum-field-default-width);
|
|
128
|
+
grid-template: "A-HlBa_label A-HlBa_contextualHelp ."
|
|
129
|
+
"A-HlBa_field A-HlBa_field A-HlBa_field" 1fr
|
|
130
|
+
"A-HlBa_helpText A-HlBa_helpText A-HlBa_helpText"
|
|
131
|
+
/ auto auto minmax(0, 1fr);
|
|
132
|
+
align-content: start;
|
|
133
|
+
display: inline-grid;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.A-HlBa_spectrum-Field:where(.A-HlBa_spectrum-Field--positionTop) .A-HlBa_spectrum-Field-field {
|
|
137
|
+
grid-area: A-HlBa_field;
|
|
138
|
+
width: 100%;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.A-HlBa_spectrum-Field:where(.A-HlBa_spectrum-Field--positionTop).A-HlBa_spectrum-Field--alignEnd {
|
|
142
|
+
grid-template-columns: 1fr auto 0;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.A-HlBa_spectrum-Field:where(.A-HlBa_spectrum-Field--positionTop) .A-HlBa_spectrum-FieldLabel {
|
|
146
|
+
grid-area: A-HlBa_label;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.A-HlBa_spectrum-Field:where(.A-HlBa_spectrum-Field--positionSide) {
|
|
150
|
+
align-items: flex-start;
|
|
151
|
+
display: inline-flex;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.A-HlBa_spectrum-Field:where(.A-HlBa_spectrum-Field--positionSide) .A-HlBa_spectrum-Field-wrapper {
|
|
155
|
+
width: var(--spectrum-field-default-width);
|
|
156
|
+
flex: 1;
|
|
157
|
+
min-width: 0;
|
|
158
|
+
height: 100%;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.A-HlBa_spectrum-Field:where(.A-HlBa_spectrum-Field--positionSide) .A-HlBa_spectrum-Field-wrapper .A-HlBa_spectrum-Field-field {
|
|
162
|
+
width: 100%;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.A-HlBa_spectrum-Field:where(.A-HlBa_spectrum-Field--positionSide) .A-HlBa_spectrum-Field-field {
|
|
166
|
+
flex: 1;
|
|
167
|
+
min-width: 0;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.A-HlBa_spectrum-Field:where(.A-HlBa_spectrum-Field--positionSide) .A-HlBa_spectrum-Field-contextualHelp {
|
|
171
|
+
margin-top: var(--spectrum-global-dimension-size-65);
|
|
172
|
+
margin-inline-end: var(--spectrum-fieldlabel-side-padding-x, var(--spectrum-global-dimension-size-100));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.A-HlBa_spectrum-Field.A-HlBa_spectrum-Field--hasContextualHelp .A-HlBa_spectrum-FieldLabel {
|
|
176
|
+
padding-inline-end: 0;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.A-HlBa_spectrum-Form.A-HlBa_spectrum-Form--positionSide {
|
|
180
|
+
border-collapse: separate;
|
|
181
|
+
border-spacing: 0 var(--spectrum-global-dimension-size-300);
|
|
182
|
+
margin: calc(var(--spectrum-global-dimension-size-250) * -1) 0;
|
|
183
|
+
text-align: start;
|
|
184
|
+
display: table;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
.A-HlBa_spectrum-Form.A-HlBa_spectrum-Form--positionSide .A-HlBa_spectrum-Field {
|
|
188
|
+
width: 100%;
|
|
189
|
+
display: table-row;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.A-HlBa_spectrum-Form.A-HlBa_spectrum-Form--positionSide .A-HlBa_spectrum-Field:not(.A-HlBa_spectrum-Field--hasContextualHelp) .A-HlBa_spectrum-FieldLabel, .A-HlBa_spectrum-Form.A-HlBa_spectrum-Form--positionSide .A-HlBa_spectrum-Field.A-HlBa_spectrum-Field--hasContextualHelp .A-HlBa_spectrum-Field-labelCell {
|
|
193
|
+
display: table-cell;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.A-HlBa_spectrum-Form.A-HlBa_spectrum-Form--positionSide .A-HlBa_spectrum-Field .A-HlBa_spectrum-Field-labelCell {
|
|
197
|
+
vertical-align: top;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
.A-HlBa_spectrum-Form.A-HlBa_spectrum-Form--positionSide .A-HlBa_spectrum-Field.A-HlBa_spectrum-Field--alignEnd .A-HlBa_spectrum-Field-labelCell {
|
|
201
|
+
text-align: end;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
.A-HlBa_spectrum-Form.A-HlBa_spectrum-Form--positionSide .A-HlBa_spectrum-Field .A-HlBa_spectrum-Field-labelWrapper {
|
|
205
|
+
display: inline-flex;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.A-HlBa_spectrum-Form.A-HlBa_spectrum-Form--positionSide .A-HlBa_spectrum-Field .A-HlBa_spectrum-Field-labelWrapper .A-HlBa_spectrum-FieldLabel {
|
|
209
|
+
flex: 1;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.A-HlBa_spectrum-Form.A-HlBa_spectrum-Form--positionSide .A-HlBa_spectrum-Field-wrapper {
|
|
213
|
+
width: 100%;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.A-HlBa_spectrum-Form.A-HlBa_spectrum-Form--positionSide .A-HlBa_spectrum-Field-field {
|
|
217
|
+
min-width: var(--spectrum-alias-single-line-width, var(--spectrum-global-dimension-size-2400));
|
|
218
|
+
width: auto;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.A-HlBa_spectrum-Form.A-HlBa_spectrum-Form--positionTop {
|
|
222
|
+
min-width: var(--spectrum-alias-single-line-width, var(--spectrum-global-dimension-size-2400));
|
|
223
|
+
flex-direction: column;
|
|
224
|
+
margin: 0;
|
|
225
|
+
display: flex;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.A-HlBa_spectrum-Form.A-HlBa_spectrum-Form--positionTop > * {
|
|
229
|
+
margin-top: var(--spectrum-global-dimension-size-100);
|
|
230
|
+
width: 100%;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.A-HlBa_spectrum-LabeledValue.A-HlBa_spectrum-Field--positionSide {
|
|
234
|
+
align-items: baseline;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.A-HlBa_spectrum-LabeledValue.A-HlBa_spectrum-Field--positionSide .A-HlBa_spectrum-Field-contextualHelp {
|
|
238
|
+
top: var(--spectrum-global-dimension-size-40);
|
|
239
|
+
margin-top: var(--spectrum-global-dimension-size-65);
|
|
240
|
+
position: relative;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.A-HlBa_spectrum-LabeledValue.A-HlBa_spectrum-Field--positionTop {
|
|
244
|
+
width: unset;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.A-HlBa_spectrum-LabeledValue .A-HlBa_spectrum-FieldLabel.A-HlBa_spectrum-FieldLabel {
|
|
248
|
+
padding-top: 0;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.A-HlBa_spectrum-LabeledValue .A-HlBa_spectrum-Field-wrapper.A-HlBa_spectrum-Field-wrapper {
|
|
252
|
+
width: unset;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.A-HlBa_spectrum-LabeledValue .A-HlBa_spectrum-Field-field {
|
|
256
|
+
word-break: break-word;
|
|
257
|
+
overflow: hidden;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.A-HlBa_spectrum-LabeledValue .A-HlBa_spectrum-Field-contextualHelp {
|
|
261
|
+
margin-top: calc(-1 * var(--spectrum-global-dimension-size-25));
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.A-HlBa_spectrum-FieldLabel, .A-HlBa_spectrum-Form-itemLabel {
|
|
265
|
+
color: var(--spectrum-fieldlabel-text-color, var(--spectrum-alias-label-text-color));
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
:is(.A-HlBa_spectrum-FieldLabel, .A-HlBa_spectrum-Form-itemLabel).A-HlBa_is-disabled {
|
|
269
|
+
color: var(--spectrum-fieldlabel-text-color-disabled, var(--spectrum-alias-text-color-disabled));
|
|
270
|
+
}
|
|
271
|
+
/*# sourceMappingURL=vars.fa28e7ec.css.map */
|
|
@@ -0,0 +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.fa28e7ec.css.map"}
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@react-spectrum/form",
|
|
3
|
+
"version": "3.0.0-nightly-641446f65-240905",
|
|
4
|
+
"description": "Spectrum UI components in React",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"main": "dist/main.js",
|
|
7
|
+
"module": "dist/module.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
"types": "./dist/types.d.ts",
|
|
10
|
+
"import": "./dist/import.mjs",
|
|
11
|
+
"require": "./dist/main.js"
|
|
12
|
+
},
|
|
13
|
+
"types": "dist/types.d.ts",
|
|
14
|
+
"source": "src/index.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"src"
|
|
18
|
+
],
|
|
19
|
+
"sideEffects": [
|
|
20
|
+
"*.css"
|
|
21
|
+
],
|
|
22
|
+
"targets": {
|
|
23
|
+
"main": {
|
|
24
|
+
"includeNodeModules": [
|
|
25
|
+
"@adobe/spectrum-css-temp"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"module": {
|
|
29
|
+
"includeNodeModules": [
|
|
30
|
+
"@adobe/spectrum-css-temp"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "https://github.com/adobe/react-spectrum"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"@react-aria/utils": "^3.0.0-nightly-641446f65-240905",
|
|
40
|
+
"@react-spectrum/utils": "^3.0.0-nightly-641446f65-240905",
|
|
41
|
+
"@react-stately/form": "^3.0.0-nightly-641446f65-240905",
|
|
42
|
+
"@react-types/form": "^3.0.0-nightly-641446f65-240905",
|
|
43
|
+
"@react-types/shared": "^3.0.0-nightly-641446f65-240905",
|
|
44
|
+
"@swc/helpers": "^0.5.0"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
|
48
|
+
},
|
|
49
|
+
"peerDependencies": {
|
|
50
|
+
"@react-spectrum/provider": "^3.0.0-nightly-641446f65-240905",
|
|
51
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
|
|
52
|
+
},
|
|
53
|
+
"publishConfig": {
|
|
54
|
+
"access": "public"
|
|
55
|
+
},
|
|
56
|
+
"stableVersion": "3.7.8"
|
|
57
|
+
}
|
package/src/Form.tsx
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
import {Alignment, DOMRef, LabelPosition, SpectrumLabelableProps} from '@react-types/shared';
|
|
14
|
+
import {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';
|
|
15
|
+
import {filterDOMProps} from '@react-aria/utils';
|
|
16
|
+
import {FormValidationContext} from '@react-stately/form';
|
|
17
|
+
import {Provider, useProviderProps} from '@react-spectrum/provider';
|
|
18
|
+
import React, {useContext} from 'react';
|
|
19
|
+
import {SpectrumFormProps} from '@react-types/form';
|
|
20
|
+
import styles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';
|
|
21
|
+
|
|
22
|
+
interface FormContextValue extends SpectrumLabelableProps {
|
|
23
|
+
validationBehavior?: 'aria' | 'native'
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
let FormContext = React.createContext<FormContextValue | null>(null);
|
|
27
|
+
export function useFormProps<T extends SpectrumLabelableProps>(props: T): T {
|
|
28
|
+
let ctx = useContext(FormContext);
|
|
29
|
+
if (ctx) {
|
|
30
|
+
return {...ctx, ...props};
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
return props;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const formPropNames = new Set([
|
|
37
|
+
'action',
|
|
38
|
+
'autoComplete',
|
|
39
|
+
'encType',
|
|
40
|
+
'method',
|
|
41
|
+
'target',
|
|
42
|
+
'onSubmit',
|
|
43
|
+
'onReset',
|
|
44
|
+
'onInvalid'
|
|
45
|
+
]);
|
|
46
|
+
|
|
47
|
+
function Form(props: SpectrumFormProps, ref: DOMRef<HTMLFormElement>) {
|
|
48
|
+
props = useProviderProps(props);
|
|
49
|
+
let {
|
|
50
|
+
children,
|
|
51
|
+
labelPosition = 'top' as LabelPosition,
|
|
52
|
+
labelAlign = 'start' as Alignment,
|
|
53
|
+
isRequired,
|
|
54
|
+
necessityIndicator,
|
|
55
|
+
isQuiet,
|
|
56
|
+
isEmphasized,
|
|
57
|
+
isDisabled,
|
|
58
|
+
isReadOnly,
|
|
59
|
+
validationState,
|
|
60
|
+
validationBehavior,
|
|
61
|
+
validationErrors,
|
|
62
|
+
...otherProps
|
|
63
|
+
} = props;
|
|
64
|
+
|
|
65
|
+
let {styleProps} = useStyleProps(otherProps);
|
|
66
|
+
let domRef = useDOMRef(ref);
|
|
67
|
+
|
|
68
|
+
let ctx = {
|
|
69
|
+
labelPosition,
|
|
70
|
+
labelAlign,
|
|
71
|
+
necessityIndicator,
|
|
72
|
+
validationBehavior
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
return (
|
|
76
|
+
<form
|
|
77
|
+
{...filterDOMProps(otherProps, {labelable: true, propNames: formPropNames})}
|
|
78
|
+
{...styleProps}
|
|
79
|
+
noValidate={validationBehavior !== 'native'}
|
|
80
|
+
ref={domRef}
|
|
81
|
+
className={
|
|
82
|
+
classNames(
|
|
83
|
+
styles,
|
|
84
|
+
'spectrum-Form',
|
|
85
|
+
{
|
|
86
|
+
'spectrum-Form--positionSide': labelPosition === 'side',
|
|
87
|
+
'spectrum-Form--positionTop': labelPosition === 'top'
|
|
88
|
+
},
|
|
89
|
+
styleProps.className
|
|
90
|
+
)
|
|
91
|
+
}>
|
|
92
|
+
<FormContext.Provider value={ctx}>
|
|
93
|
+
<Provider
|
|
94
|
+
isQuiet={isQuiet}
|
|
95
|
+
isEmphasized={isEmphasized}
|
|
96
|
+
isDisabled={isDisabled}
|
|
97
|
+
isReadOnly={isReadOnly}
|
|
98
|
+
isRequired={isRequired}
|
|
99
|
+
validationState={validationState}>
|
|
100
|
+
<FormValidationContext.Provider value={validationErrors || {}}>
|
|
101
|
+
{children}
|
|
102
|
+
</FormValidationContext.Provider>
|
|
103
|
+
</Provider>
|
|
104
|
+
</FormContext.Provider>
|
|
105
|
+
</form>
|
|
106
|
+
);
|
|
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};
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
3
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
+
*
|
|
7
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
+
* governing permissions and limitations under the License.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/// <reference types="css-module-types" />
|
|
14
|
+
|
|
15
|
+
export {useFormProps, Form} from './Form';
|
|
16
|
+
export type {SpectrumFormProps} from '@react-types/form';
|