@react-spectrum/form 3.4.0 → 3.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.css +1 -1
- package/dist/main.js +3 -3
- package/dist/main.js.map +1 -1
- package/dist/module.js +3 -3
- package/dist/module.js.map +1 -1
- package/package.json +6 -6
package/dist/main.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[dir=ltr] .spectrum-FieldLabel_d2db1f{text-align:left}[dir=rtl] .spectrum-FieldLabel_d2db1f{text-align:right}.spectrum-FieldLabel_d2db1f{box-sizing:border-box;padding:var(--spectrum-fieldlabel-padding-top,var(--spectrum-global-dimension-size-50))0 var(--spectrum-fieldlabel-padding-bottom,var(--spectrum-global-dimension-size-65));font-size:var(--spectrum-fieldlabel-text-size,var(--spectrum-global-dimension-font-size-75));font-weight:var(--spectrum-fieldlabel-text-font-weight,var(--spectrum-global-font-weight-regular));line-height:var(--spectrum-fieldlabel-text-line-height,var(--spectrum-global-font-line-height-small));vertical-align:top;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto;font-smoothing:subpixel-antialiased;cursor:default;flex:none;display:flex}[dir=ltr] .spectrum-FieldLabel--positionSide_d2db1f{padding-right:var(--spectrum-fieldlabel-side-padding-x,var(--spectrum-global-dimension-size-100))}[dir=rtl] .spectrum-FieldLabel--positionSide_d2db1f{padding-left:var(--spectrum-fieldlabel-side-padding-x,var(--spectrum-global-dimension-size-100))}.spectrum-FieldLabel--positionSide_d2db1f{padding-top:var(--spectrum-fieldlabel-side-padding-top,var(--spectrum-global-dimension-size-100));display:inline-flex}[dir=ltr] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-right:0}[dir=rtl] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-left:0}[dir=ltr] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-left:var(--spectrum-fieldlabel-asterisk-gap,var(--spectrum-global-dimension-size-25))}[dir=rtl] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-right:var(--spectrum-fieldlabel-asterisk-gap,var(--spectrum-global-dimension-size-25))}.spectrum-FieldLabel-requiredIcon_d2db1f{margin-top:var(--spectrum-fieldlabel-asterisk-margin-y,var(--spectrum-global-dimension-size-50));margin-bottom:0}[dir=ltr] .spectrum-FieldLabel--alignEnd_d2db1f{text-align:right}[dir=rtl] .spectrum-FieldLabel--alignEnd_d2db1f{text-align:left}.spectrum-FieldLabel--alignEnd_d2db1f{justify-content:flex-end}.spectrum-Field_d2db1f{--spectrum-field-default-width:var(--spectrum-alias-single-line-width,var(--spectrum-global-dimension-size-2400))}.spectrum-Field_d2db1f.spectrum-Field--positionTop_d2db1f{width:var(--spectrum-field-default-width);flex-direction:column;display:inline-flex}.spectrum-Field_d2db1f.spectrum-Field--positionTop_d2db1f .spectrum-Field-field_d2db1f{width:100%}.spectrum-Field_d2db1f.spectrum-Field--
|
|
1
|
+
[dir=ltr] .spectrum-FieldLabel_d2db1f{text-align:left}[dir=rtl] .spectrum-FieldLabel_d2db1f{text-align:right}.spectrum-FieldLabel_d2db1f{box-sizing:border-box;padding:var(--spectrum-fieldlabel-padding-top,var(--spectrum-global-dimension-size-50))0 var(--spectrum-fieldlabel-padding-bottom,var(--spectrum-global-dimension-size-65));font-size:var(--spectrum-fieldlabel-text-size,var(--spectrum-global-dimension-font-size-75));font-weight:var(--spectrum-fieldlabel-text-font-weight,var(--spectrum-global-font-weight-regular));line-height:var(--spectrum-fieldlabel-text-line-height,var(--spectrum-global-font-line-height-small));vertical-align:top;-webkit-font-smoothing:subpixel-antialiased;-moz-osx-font-smoothing:auto;font-smoothing:subpixel-antialiased;cursor:default;flex:none;display:flex}[dir=ltr] .spectrum-FieldLabel--positionSide_d2db1f{padding-right:var(--spectrum-fieldlabel-side-padding-x,var(--spectrum-global-dimension-size-100))}[dir=rtl] .spectrum-FieldLabel--positionSide_d2db1f{padding-left:var(--spectrum-fieldlabel-side-padding-x,var(--spectrum-global-dimension-size-100))}.spectrum-FieldLabel--positionSide_d2db1f{padding-top:var(--spectrum-fieldlabel-side-padding-top,var(--spectrum-global-dimension-size-100));display:inline-flex}[dir=ltr] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-right:0}[dir=rtl] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-left:0}[dir=ltr] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-left:var(--spectrum-fieldlabel-asterisk-gap,var(--spectrum-global-dimension-size-25))}[dir=rtl] .spectrum-FieldLabel-requiredIcon_d2db1f{margin-right:var(--spectrum-fieldlabel-asterisk-gap,var(--spectrum-global-dimension-size-25))}.spectrum-FieldLabel-requiredIcon_d2db1f{margin-top:var(--spectrum-fieldlabel-asterisk-margin-y,var(--spectrum-global-dimension-size-50));margin-bottom:0}[dir=ltr] .spectrum-FieldLabel--alignEnd_d2db1f{text-align:right}[dir=rtl] .spectrum-FieldLabel--alignEnd_d2db1f{text-align:left}.spectrum-FieldLabel--alignEnd_d2db1f{justify-content:flex-end}.spectrum-Field_d2db1f{--spectrum-field-default-width:var(--spectrum-alias-single-line-width,var(--spectrum-global-dimension-size-2400))}.spectrum-Field_d2db1f.spectrum-Field--positionTop_d2db1f{width:var(--spectrum-field-default-width);flex-direction:column;display:inline-flex}.spectrum-Field_d2db1f.spectrum-Field--positionTop_d2db1f .spectrum-Field-field_d2db1f{width:100%}.spectrum-Field_d2db1f.spectrum-Field--positionSide_d2db1f{align-items:flex-start;display:inline-flex}.spectrum-Field_d2db1f.spectrum-Field--positionSide_d2db1f .spectrum-Field-wrapper_d2db1f{min-width:0;width:var(--spectrum-field-default-width);height:100%;flex:1}.spectrum-Field_d2db1f.spectrum-Field--positionSide_d2db1f .spectrum-Field-wrapper_d2db1f .spectrum-Field-field_d2db1f{width:100%}.spectrum-Field_d2db1f.spectrum-Field--positionSide_d2db1f .spectrum-Field-field_d2db1f{min-width:0;flex:1}[dir=ltr] .spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f{text-align:left}[dir=rtl] .spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f{text-align:right}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f{border-collapse:separate;border-spacing:0 var(--spectrum-global-dimension-size-300);margin:calc(var(--spectrum-global-dimension-size-250)*-1)0;display:table}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f .spectrum-Field_d2db1f{width:100%;display:table-row}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f .spectrum-FieldLabel_d2db1f{display:table-cell}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f .spectrum-Field-wrapper_d2db1f{width:100%}.spectrum-Form_d2db1f.spectrum-Form--positionSide_d2db1f .spectrum-Field-field_d2db1f{width:auto;min-width:var(--spectrum-alias-single-line-width,var(--spectrum-global-dimension-size-2400));display:table-cell}.spectrum-Form_d2db1f.spectrum-Form--positionTop_d2db1f{min-width:var(--spectrum-alias-single-line-width,var(--spectrum-global-dimension-size-2400));flex-direction:column;margin:0;display:flex}.spectrum-Form_d2db1f.spectrum-Form--positionTop_d2db1f>*{margin-top:var(--spectrum-global-dimension-size-100);width:100%}.spectrum-StaticField_d2db1f.spectrum-Field--positionSide_d2db1f{-ms-flex-align:first baseline;align-items:baseline}.spectrum-StaticField_d2db1f.spectrum-Field--positionTop_d2db1f{width:unset}.spectrum-StaticField_d2db1f .spectrum-FieldLabel_d2db1f.spectrum-FieldLabel_d2db1f{padding-top:0}.spectrum-StaticField_d2db1f .spectrum-Field-wrapper_d2db1f.spectrum-Field-wrapper_d2db1f{width:unset}.spectrum-StaticField_d2db1f .spectrum-Field-field_d2db1f{word-break:break-word;overflow:hidden}.spectrum-FieldLabel_d2db1f,.spectrum-Form-itemLabel_d2db1f{color:var(--spectrum-fieldlabel-text-color,var(--spectrum-alias-label-text-color))}.spectrum-FieldLabel_d2db1f.is-disabled_d2db1f,.spectrum-Form-itemLabel_d2db1f.is-disabled_d2db1f{color:var(--spectrum-fieldlabel-text-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-FieldLabel_d2db1f.is-disabled_d2db1f .spectrum-FieldLabel-requiredIcon_d2db1f,.spectrum-Form-itemLabel_d2db1f.is-disabled_d2db1f .spectrum-FieldLabel-requiredIcon_d2db1f{color:var(--spectrum-fieldlabel-asterisk-color-disabled,var(--spectrum-alias-text-color-disabled))}.spectrum-FieldLabel-requiredIcon_d2db1f{color:var(--spectrum-fieldlabel-asterisk-color,var(--spectrum-global-color-gray-600))}
|
package/dist/main.js
CHANGED
|
@@ -26,12 +26,12 @@ $parcel$export($eb2fc0ee655eff6b$exports, "spectrum-FieldLabel--alignEnd", () =>
|
|
|
26
26
|
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field", () => $eb2fc0ee655eff6b$export$f6d480ae1e56eba0, (v) => $eb2fc0ee655eff6b$export$f6d480ae1e56eba0 = v);
|
|
27
27
|
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field--positionTop", () => $eb2fc0ee655eff6b$export$a4ea780a9064d7f9, (v) => $eb2fc0ee655eff6b$export$a4ea780a9064d7f9 = v);
|
|
28
28
|
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field-field", () => $eb2fc0ee655eff6b$export$3ab8a3dc7f0563d, (v) => $eb2fc0ee655eff6b$export$3ab8a3dc7f0563d = v);
|
|
29
|
-
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field-field--multiline", () => $eb2fc0ee655eff6b$export$f58a1e966a92ba5e, (v) => $eb2fc0ee655eff6b$export$f58a1e966a92ba5e = v);
|
|
30
29
|
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field--positionSide", () => $eb2fc0ee655eff6b$export$2963225c91179589, (v) => $eb2fc0ee655eff6b$export$2963225c91179589 = v);
|
|
31
30
|
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Field-wrapper", () => $eb2fc0ee655eff6b$export$127df0b7290eb8ef, (v) => $eb2fc0ee655eff6b$export$127df0b7290eb8ef = v);
|
|
32
31
|
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Form", () => $eb2fc0ee655eff6b$export$94d2bcc94afabd89, (v) => $eb2fc0ee655eff6b$export$94d2bcc94afabd89 = v);
|
|
33
32
|
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Form--positionSide", () => $eb2fc0ee655eff6b$export$7f44db659563c8f4, (v) => $eb2fc0ee655eff6b$export$7f44db659563c8f4 = v);
|
|
34
33
|
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Form--positionTop", () => $eb2fc0ee655eff6b$export$11b8bc81fe551057, (v) => $eb2fc0ee655eff6b$export$11b8bc81fe551057 = v);
|
|
34
|
+
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-StaticField", () => $eb2fc0ee655eff6b$export$a8558488b380a41e, (v) => $eb2fc0ee655eff6b$export$a8558488b380a41e = v);
|
|
35
35
|
$parcel$export($eb2fc0ee655eff6b$exports, "spectrum-Form-itemLabel", () => $eb2fc0ee655eff6b$export$51ec27881a1e3928, (v) => $eb2fc0ee655eff6b$export$51ec27881a1e3928 = v);
|
|
36
36
|
$parcel$export($eb2fc0ee655eff6b$exports, "is-disabled", () => $eb2fc0ee655eff6b$export$d35bc1e505d1ebbf, (v) => $eb2fc0ee655eff6b$export$d35bc1e505d1ebbf = v);
|
|
37
37
|
var $eb2fc0ee655eff6b$export$493d18e796ae054;
|
|
@@ -41,12 +41,12 @@ var $eb2fc0ee655eff6b$export$885efcc08143a987;
|
|
|
41
41
|
var $eb2fc0ee655eff6b$export$f6d480ae1e56eba0;
|
|
42
42
|
var $eb2fc0ee655eff6b$export$a4ea780a9064d7f9;
|
|
43
43
|
var $eb2fc0ee655eff6b$export$3ab8a3dc7f0563d;
|
|
44
|
-
var $eb2fc0ee655eff6b$export$f58a1e966a92ba5e;
|
|
45
44
|
var $eb2fc0ee655eff6b$export$2963225c91179589;
|
|
46
45
|
var $eb2fc0ee655eff6b$export$127df0b7290eb8ef;
|
|
47
46
|
var $eb2fc0ee655eff6b$export$94d2bcc94afabd89;
|
|
48
47
|
var $eb2fc0ee655eff6b$export$7f44db659563c8f4;
|
|
49
48
|
var $eb2fc0ee655eff6b$export$11b8bc81fe551057;
|
|
49
|
+
var $eb2fc0ee655eff6b$export$a8558488b380a41e;
|
|
50
50
|
var $eb2fc0ee655eff6b$export$51ec27881a1e3928;
|
|
51
51
|
var $eb2fc0ee655eff6b$export$d35bc1e505d1ebbf;
|
|
52
52
|
$eb2fc0ee655eff6b$export$493d18e796ae054 = "spectrum-FieldLabel_d2db1f";
|
|
@@ -56,12 +56,12 @@ $eb2fc0ee655eff6b$export$885efcc08143a987 = "spectrum-FieldLabel--alignEnd_d2db1
|
|
|
56
56
|
$eb2fc0ee655eff6b$export$f6d480ae1e56eba0 = "spectrum-Field_d2db1f";
|
|
57
57
|
$eb2fc0ee655eff6b$export$a4ea780a9064d7f9 = "spectrum-Field--positionTop_d2db1f";
|
|
58
58
|
$eb2fc0ee655eff6b$export$3ab8a3dc7f0563d = "spectrum-Field-field_d2db1f";
|
|
59
|
-
$eb2fc0ee655eff6b$export$f58a1e966a92ba5e = "spectrum-Field-field--multiline_d2db1f";
|
|
60
59
|
$eb2fc0ee655eff6b$export$2963225c91179589 = "spectrum-Field--positionSide_d2db1f";
|
|
61
60
|
$eb2fc0ee655eff6b$export$127df0b7290eb8ef = "spectrum-Field-wrapper_d2db1f";
|
|
62
61
|
$eb2fc0ee655eff6b$export$94d2bcc94afabd89 = "spectrum-Form_d2db1f";
|
|
63
62
|
$eb2fc0ee655eff6b$export$7f44db659563c8f4 = "spectrum-Form--positionSide_d2db1f";
|
|
64
63
|
$eb2fc0ee655eff6b$export$11b8bc81fe551057 = "spectrum-Form--positionTop_d2db1f";
|
|
64
|
+
$eb2fc0ee655eff6b$export$a8558488b380a41e = "spectrum-StaticField_d2db1f";
|
|
65
65
|
$eb2fc0ee655eff6b$export$51ec27881a1e3928 = "spectrum-Form-itemLabel_d2db1f";
|
|
66
66
|
$eb2fc0ee655e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H,EAEG,CACH,KAAK,CAAC,yCAAK,iBAAG,sCAAK,CAAC,UAAU,CAAC,0BAAI","sources":["packages/@react-spectrum/form/src/index.ts","packages/@react-spectrum/form/src/Form.tsx","packages/@adobe/spectrum-css-temp/components/fieldlabel/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {useFormProps, Form} from './Form';\nexport type {SpectrumFormProps} from '@react-types/form';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Alignment, DOMRef, LabelPosition, SpectrumLabelableProps} from '@react-types/shared';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React, {useContext} from 'react';\nimport {SpectrumFormProps} from '@react-types/form';\nimport styles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\n\nlet FormContext = React.createContext<SpectrumLabelableProps>({});\nexport function useFormProps<T extends SpectrumLabelableProps>(props: T): T {\n let ctx = useContext(FormContext);\n return {...ctx, ...props};\n}\n\nconst formPropNames = new Set([\n 'action',\n 'autoComplete',\n 'encType',\n 'method',\n 'target',\n 'onSubmit'\n]);\n\nfunction Form(props: SpectrumFormProps, ref: DOMRef<HTMLFormElement>) {\n props = useProviderProps(props);\n let {\n children,\n labelPosition = 'top' as LabelPosition,\n labelAlign = 'start' as Alignment,\n isRequired,\n necessityIndicator,\n isQuiet,\n isEmphasized,\n isDisabled,\n isReadOnly,\n validationState,\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let ctx = {\n labelPosition,\n labelAlign,\n necessityIndicator\n };\n\n return (\n <form\n {...filterDOMProps(otherProps, {labelable: true, propNames: formPropNames})}\n {...styleProps}\n noValidate\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Form',\n {\n 'spectrum-Form--positionSide': labelPosition === 'side',\n 'spectrum-Form--positionTop': labelPosition === 'top'\n },\n styleProps.className\n )\n }>\n <FormContext.Provider value={ctx}>\n <Provider\n isQuiet={isQuiet}\n isEmphasized={isEmphasized}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n validationState={validationState}>\n {children}\n </Provider>\n </FormContext.Provider>\n </form>\n );\n}\n\n/**\n * Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.\n */\nconst _Form = React.forwardRef(Form);\nexport {_Form as Form};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
|
package/dist/module.js
CHANGED
|
@@ -23,12 +23,12 @@ $parcel$export($cd231e464c886c86$exports, "spectrum-FieldLabel--alignEnd", () =>
|
|
|
23
23
|
$parcel$export($cd231e464c886c86$exports, "spectrum-Field", () => $cd231e464c886c86$export$f6d480ae1e56eba0, (v) => $cd231e464c886c86$export$f6d480ae1e56eba0 = v);
|
|
24
24
|
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionTop", () => $cd231e464c886c86$export$a4ea780a9064d7f9, (v) => $cd231e464c886c86$export$a4ea780a9064d7f9 = v);
|
|
25
25
|
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-field", () => $cd231e464c886c86$export$3ab8a3dc7f0563d, (v) => $cd231e464c886c86$export$3ab8a3dc7f0563d = v);
|
|
26
|
-
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-field--multiline", () => $cd231e464c886c86$export$f58a1e966a92ba5e, (v) => $cd231e464c886c86$export$f58a1e966a92ba5e = v);
|
|
27
26
|
$parcel$export($cd231e464c886c86$exports, "spectrum-Field--positionSide", () => $cd231e464c886c86$export$2963225c91179589, (v) => $cd231e464c886c86$export$2963225c91179589 = v);
|
|
28
27
|
$parcel$export($cd231e464c886c86$exports, "spectrum-Field-wrapper", () => $cd231e464c886c86$export$127df0b7290eb8ef, (v) => $cd231e464c886c86$export$127df0b7290eb8ef = v);
|
|
29
28
|
$parcel$export($cd231e464c886c86$exports, "spectrum-Form", () => $cd231e464c886c86$export$94d2bcc94afabd89, (v) => $cd231e464c886c86$export$94d2bcc94afabd89 = v);
|
|
30
29
|
$parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionSide", () => $cd231e464c886c86$export$7f44db659563c8f4, (v) => $cd231e464c886c86$export$7f44db659563c8f4 = v);
|
|
31
30
|
$parcel$export($cd231e464c886c86$exports, "spectrum-Form--positionTop", () => $cd231e464c886c86$export$11b8bc81fe551057, (v) => $cd231e464c886c86$export$11b8bc81fe551057 = v);
|
|
31
|
+
$parcel$export($cd231e464c886c86$exports, "spectrum-StaticField", () => $cd231e464c886c86$export$a8558488b380a41e, (v) => $cd231e464c886c86$export$a8558488b380a41e = v);
|
|
32
32
|
$parcel$export($cd231e464c886c86$exports, "spectrum-Form-itemLabel", () => $cd231e464c886c86$export$51ec27881a1e3928, (v) => $cd231e464c886c86$export$51ec27881a1e3928 = v);
|
|
33
33
|
$parcel$export($cd231e464c886c86$exports, "is-disabled", () => $cd231e464c886c86$export$d35bc1e505d1ebbf, (v) => $cd231e464c886c86$export$d35bc1e505d1ebbf = v);
|
|
34
34
|
var $cd231e464c886c86$export$493d18e796ae054;
|
|
@@ -38,12 +38,12 @@ var $cd231e464c886c86$export$885efcc08143a987;
|
|
|
38
38
|
var $cd231e464c886c86$export$f6d480ae1e56eba0;
|
|
39
39
|
var $cd231e464c886c86$export$a4ea780a9064d7f9;
|
|
40
40
|
var $cd231e464c886c86$export$3ab8a3dc7f0563d;
|
|
41
|
-
var $cd231e464c886c86$export$f58a1e966a92ba5e;
|
|
42
41
|
var $cd231e464c886c86$export$2963225c91179589;
|
|
43
42
|
var $cd231e464c886c86$export$127df0b7290eb8ef;
|
|
44
43
|
var $cd231e464c886c86$export$94d2bcc94afabd89;
|
|
45
44
|
var $cd231e464c886c86$export$7f44db659563c8f4;
|
|
46
45
|
var $cd231e464c886c86$export$11b8bc81fe551057;
|
|
46
|
+
var $cd231e464c886c86$export$a8558488b380a41e;
|
|
47
47
|
var $cd231e464c886c86$export$51ec27881a1e3928;
|
|
48
48
|
var $cd231e464c886c86$export$d35bc1e505d1ebbf;
|
|
49
49
|
$cd231e464c886c86$export$493d18e796ae054 = "spectrum-FieldLabel_d2db1f";
|
|
@@ -53,12 +53,12 @@ $cd231e464c886c86$export$885efcc08143a987 = "spectrum-FieldLabel--alignEnd_d2db1
|
|
|
53
53
|
$cd231e464c886c86$export$f6d480ae1e56eba0 = "spectrum-Field_d2db1f";
|
|
54
54
|
$cd231e464c886c86$export$a4ea780a9064d7f9 = "spectrum-Field--positionTop_d2db1f";
|
|
55
55
|
$cd231e464c886c86$export$3ab8a3dc7f0563d = "spectrum-Field-field_d2db1f";
|
|
56
|
-
$cd231e464c886c86$export$f58a1e966a92ba5e = "spectrum-Field-field--multiline_d2db1f";
|
|
57
56
|
$cd231e464c886c86$export$2963225c91179589 = "spectrum-Field--positionSide_d2db1f";
|
|
58
57
|
$cd231e464c886c86$export$127df0b7290eb8ef = "spectrum-Field-wrapper_d2db1f";
|
|
59
58
|
$cd231e464c886c86$export$94d2bcc94afabd89 = "spectrum-Form_d2db1f";
|
|
60
59
|
$cd231e464c886c86$export$7f44db659563c8f4 = "spectrum-Form--positionSide_d2db1f";
|
|
61
60
|
$cd231e464c886c86$export$11b8bc81fe551057 = "spectrum-Form--positionTop_d2db1f";
|
|
61
|
+
$cd231e464c886c86$export$a8558488b380a41e = "spectrum-StaticField_d2db1f";
|
|
62
62
|
$cd231e464c886c86$export$51ec27881a1e3928 = "spectrum-Form-itemLabel_d2db1f";
|
|
63
63
|
$cd231e464c886c86$export$d35bc1e505d1ebbf = "is-disabled_d2db1f";
|
|
64
64
|
|
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAqC;AACrC,GAAmD;AACnD,GAAkD;AAClD,GAA+C;AAC/C,GAAgC;AAChC,GAA6C;AAC7C,GAAsC;AACtC,
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEAA,GAAqC;AACrC,GAAmD;AACnD,GAAkD;AAClD,GAA+C;AAC/C,GAAgC;AAChC,GAA6C;AAC7C,GAAsC;AACtC,GAA8C;AAC9C,GAAwC;AACxC,GAA+B;AAC/B,GAA6C;AAC7C,GAA4C;AAC5C,GAAsC;AACtC,GAAyC;AACzC,GAA6B;AAd7B,wCAAqC,GAAG,CAA4B;AACpE,yCAAmD,GAAG,CAA0C;AAChG,yCAAkD,GAAG,CAAyC;AAC9F,yCAA+C,GAAG,CAAsC;AACxF,yCAAgC,GAAG,CAAuB;AAC1D,yCAA6C,GAAG,CAAo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I;YAAE,SAAS,EAAE,mCAAa;QAAA,CAAC;WACtE,UAAU;QACd,UAAU,EAAV,IAAU;QACV,GAAG,EAAE,MAAM;QACX,SAAS,EACP,iBAAU,CACR,gEAAM,EACN,CAAe,gBACf,CAAC;YACC,CAA6B,8BAAE,aAAa,KAAK,CAAM;YACvD,CAA4B,6BAAE,aAAa,KAAK,CAAK;QACvD,CAAC,EACD,UAAU,CAAC,SAAS;gDAGvB,iCAAW,CAAC,QAAQ;QAAC,KAAK,EAAE,GAAG;gDAC7B,eAAQ;QACP,OAAO,EAAE,OAAO;QAChB,YAAY,EAAE,YAAY;QAC1B,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,UAAU,EAAE,UAAU;QACtB,eAAe,EAAE,eAAe;OAC/B,QAAQ;AAKnB,CAAC;AAED,EAEG,AAFH;;CAEG,AAFH,EAEG,CACH,KAAK,CAAC,yCAAK,iBAAG,YAAK,CAAC,UAAU,CAAC,0BAAI","sources":["packages/@react-spectrum/form/src/index.ts","packages/@react-spectrum/form/src/Form.tsx","packages/@adobe/spectrum-css-temp/components/fieldlabel/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {useFormProps, Form} from './Form';\nexport type {SpectrumFormProps} from '@react-types/form';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Alignment, DOMRef, LabelPosition, SpectrumLabelableProps} from '@react-types/shared';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {Provider, useProviderProps} from '@react-spectrum/provider';\nimport React, {useContext} from 'react';\nimport {SpectrumFormProps} from '@react-types/form';\nimport styles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\n\nlet FormContext = React.createContext<SpectrumLabelableProps>({});\nexport function useFormProps<T extends SpectrumLabelableProps>(props: T): T {\n let ctx = useContext(FormContext);\n return {...ctx, ...props};\n}\n\nconst formPropNames = new Set([\n 'action',\n 'autoComplete',\n 'encType',\n 'method',\n 'target',\n 'onSubmit'\n]);\n\nfunction Form(props: SpectrumFormProps, ref: DOMRef<HTMLFormElement>) {\n props = useProviderProps(props);\n let {\n children,\n labelPosition = 'top' as LabelPosition,\n labelAlign = 'start' as Alignment,\n isRequired,\n necessityIndicator,\n isQuiet,\n isEmphasized,\n isDisabled,\n isReadOnly,\n validationState,\n ...otherProps\n } = props;\n\n let {styleProps} = useStyleProps(otherProps);\n let domRef = useDOMRef(ref);\n\n let ctx = {\n labelPosition,\n labelAlign,\n necessityIndicator\n };\n\n return (\n <form\n {...filterDOMProps(otherProps, {labelable: true, propNames: formPropNames})}\n {...styleProps}\n noValidate\n ref={domRef}\n className={\n classNames(\n styles,\n 'spectrum-Form',\n {\n 'spectrum-Form--positionSide': labelPosition === 'side',\n 'spectrum-Form--positionTop': labelPosition === 'top'\n },\n styleProps.className\n )\n }>\n <FormContext.Provider value={ctx}>\n <Provider\n isQuiet={isQuiet}\n isEmphasized={isEmphasized}\n isDisabled={isDisabled}\n isReadOnly={isReadOnly}\n isRequired={isRequired}\n validationState={validationState}>\n {children}\n </Provider>\n </FormContext.Provider>\n </form>\n );\n}\n\n/**\n * Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.\n */\nconst _Form = React.forwardRef(Form);\nexport {_Form as Form};\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-spectrum/form",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.1",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@babel/runtime": "^7.6.2",
|
|
35
|
-
"@react-aria/utils": "^3.13.
|
|
36
|
-
"@react-spectrum/utils": "^3.7.
|
|
37
|
-
"@react-types/form": "^3.3.
|
|
38
|
-
"@react-types/shared": "^3.14.
|
|
35
|
+
"@react-aria/utils": "^3.13.3",
|
|
36
|
+
"@react-spectrum/utils": "^3.7.3",
|
|
37
|
+
"@react-types/form": "^3.3.3",
|
|
38
|
+
"@react-types/shared": "^3.14.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@adobe/spectrum-css-temp": "3.0.0-alpha.1"
|
|
@@ -47,5 +47,5 @@
|
|
|
47
47
|
"publishConfig": {
|
|
48
48
|
"access": "public"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "b03ef51e6317547dd0a840f151e59d039b1e1fd3"
|
|
51
51
|
}
|