@react-aria/label 3.2.1 → 3.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,82 +1,94 @@
1
- var {
2
- useId,
3
- useLabels,
4
- mergeProps,
5
- useSlotId
6
- } = require("@react-aria/utils");
1
+ var $aJbEv$reactariautils = require("@react-aria/utils");
7
2
 
8
- /**
9
- * Provides the accessibility implementation for labels and their associated elements.
10
- * Labels provide context for user inputs.
11
- * @param props - The props for labels and fields.
12
- */
13
- function useLabel(props) {
14
- let {
15
- id,
16
- label,
17
- 'aria-labelledby': ariaLabelledby,
18
- 'aria-label': ariaLabel,
19
- labelElementType = 'label'
20
- } = props;
21
- id = useId(id);
22
- let labelId = useId();
23
- let labelProps = {};
24
-
25
- if (label) {
26
- ariaLabelledby = ariaLabelledby ? ariaLabelledby + " " + labelId : labelId;
27
- labelProps = {
28
- id: labelId,
29
- htmlFor: labelElementType === 'label' ? id : undefined
30
- };
31
- } else if (!ariaLabelledby && !ariaLabel) {
32
- console.warn('If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility');
33
- }
3
+ function $parcel$exportWildcard(dest, source) {
4
+ Object.keys(source).forEach(function(key) {
5
+ if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) {
6
+ return;
7
+ }
34
8
 
35
- let fieldProps = useLabels({
36
- id,
37
- 'aria-label': ariaLabel,
38
- 'aria-labelledby': ariaLabelledby
9
+ Object.defineProperty(dest, key, {
10
+ enumerable: true,
11
+ get: function get() {
12
+ return source[key];
13
+ }
14
+ });
39
15
  });
40
- return {
41
- labelProps,
42
- fieldProps
43
- };
16
+
17
+ return dest;
18
+ }
19
+ function $parcel$export(e, n, v, s) {
20
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
44
21
  }
22
+ var $aac2cbf1da32ab7a$exports = {};
45
23
 
46
- exports.useLabel = useLabel;
24
+ $parcel$export($aac2cbf1da32ab7a$exports, "useField", () => $aac2cbf1da32ab7a$export$294aa081a6c6f55d);
25
+ var $773550019cadc987$exports = {};
47
26
 
48
- /**
49
- * Provides the accessibility implementation for input fields.
50
- * Fields accept user input, gain context from their label, and may display a description or error message.
51
- * @param props - Props for the Field.
52
- */
53
- function useField(props) {
54
- let {
55
- description,
56
- errorMessage,
57
- validationState
58
- } = props;
59
- let {
60
- labelProps,
61
- fieldProps
62
- } = useLabel(props);
63
- let descriptionId = useSlotId([Boolean(description), Boolean(errorMessage), validationState]);
64
- let errorMessageId = useSlotId([Boolean(description), Boolean(errorMessage), validationState]);
65
- fieldProps = mergeProps(fieldProps, {
66
- 'aria-describedby': [descriptionId, // Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268
67
- errorMessageId, props['aria-describedby']].filter(Boolean).join(' ') || undefined
68
- });
69
- return {
70
- labelProps,
71
- fieldProps,
72
- descriptionProps: {
73
- id: descriptionId
74
- },
75
- errorMessageProps: {
76
- id: errorMessageId
77
- }
78
- };
27
+ $parcel$export($773550019cadc987$exports, "useLabel", () => $773550019cadc987$export$8467354a121f1b9f);
28
+
29
+ function $773550019cadc987$export$8467354a121f1b9f(props) {
30
+ let { id: id , label: label , 'aria-labelledby': ariaLabelledby , 'aria-label': ariaLabel , labelElementType: labelElementType = 'label' } = props;
31
+ id = $aJbEv$reactariautils.useId(id);
32
+ let labelId = $aJbEv$reactariautils.useId();
33
+ let labelProps = {
34
+ };
35
+ if (label) {
36
+ ariaLabelledby = ariaLabelledby ? `${ariaLabelledby} ${labelId}` : labelId;
37
+ labelProps = {
38
+ id: labelId,
39
+ htmlFor: labelElementType === 'label' ? id : undefined
40
+ };
41
+ } else if (!ariaLabelledby && !ariaLabel) console.warn('If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility');
42
+ let fieldProps = $aJbEv$reactariautils.useLabels({
43
+ id: id,
44
+ 'aria-label': ariaLabel,
45
+ 'aria-labelledby': ariaLabelledby
46
+ });
47
+ return {
48
+ labelProps: labelProps,
49
+ fieldProps: fieldProps
50
+ };
79
51
  }
80
52
 
81
- exports.useField = useField;
53
+
54
+
55
+ function $aac2cbf1da32ab7a$export$294aa081a6c6f55d(props) {
56
+ let { description: description , errorMessage: errorMessage , validationState: validationState } = props;
57
+ let { labelProps: labelProps , fieldProps: fieldProps } = $773550019cadc987$export$8467354a121f1b9f(props);
58
+ let descriptionId = $aJbEv$reactariautils.useSlotId([
59
+ Boolean(description),
60
+ Boolean(errorMessage),
61
+ validationState
62
+ ]);
63
+ let errorMessageId = $aJbEv$reactariautils.useSlotId([
64
+ Boolean(description),
65
+ Boolean(errorMessage),
66
+ validationState
67
+ ]);
68
+ fieldProps = $aJbEv$reactariautils.mergeProps(fieldProps, {
69
+ 'aria-describedby': [
70
+ descriptionId,
71
+ // Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268
72
+ errorMessageId,
73
+ props['aria-describedby']
74
+ ].filter(Boolean).join(' ') || undefined
75
+ });
76
+ return {
77
+ labelProps: labelProps,
78
+ fieldProps: fieldProps,
79
+ descriptionProps: {
80
+ id: descriptionId
81
+ },
82
+ errorMessageProps: {
83
+ id: errorMessageId
84
+ }
85
+ };
86
+ }
87
+
88
+
89
+
90
+ $parcel$exportWildcard(module.exports, $aac2cbf1da32ab7a$exports);
91
+ $parcel$exportWildcard(module.exports, $773550019cadc987$exports);
92
+
93
+
82
94
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;AA+BA;;;;;AAKO,SAASA,QAAT,CAAkBC,KAAlB,EAAoD;AACzD,MAAI;AACFC,IAAAA,EADE;AAEFC,IAAAA,KAFE;AAGF,uBAAmBC,cAHjB;AAIF,kBAAcC,SAJZ;AAKFC,IAAAA,gBAAgB,GAAG;AALjB,MAMAL,KANJ;AAQAC,EAAAA,EAAE,GAAGK,KAAK,CAACL,EAAD,CAAV;AACA,MAAIM,OAAO,GAAGD,KAAK,EAAnB;AACA,MAAIE,UAAU,GAAG,EAAjB;;AACA,MAAIN,KAAJ,EAAW;AACTC,IAAAA,cAAc,GAAGA,cAAc,GAAMA,cAAN,SAAwBI,OAAxB,GAAoCA,OAAnE;AACAC,IAAAA,UAAU,GAAG;AACXP,MAAAA,EAAE,EAAEM,OADO;AAEXE,MAAAA,OAAO,EAAEJ,gBAAgB,KAAK,OAArB,GAA+BJ,EAA/B,GAAoCS;AAFlC,KAAb;AAID,GAND,MAMO,IAAI,CAACP,cAAD,IAAmB,CAACC,SAAxB,EAAmC;AACxCO,IAAAA,OAAO,CAACC,IAAR,CAAa,sHAAb;AACD;;AAED,MAAIC,UAAU,GAAGC,SAAS,CAAC;AACzBb,IAAAA,EADyB;AAEzB,kBAAcG,SAFW;AAGzB,uBAAmBD;AAHM,GAAD,CAA1B;AAMA,SAAO;AACLK,IAAAA,UADK;AAELK,IAAAA;AAFK,GAAP;AAID;;;;AC1CD;;;;;AAKO,SAASE,QAAT,CAAkBf,KAAlB,EAAoD;AACzD,MAAI;AAACgB,IAAAA,WAAD;AAAcC,IAAAA,YAAd;AAA4BC,IAAAA;AAA5B,MAA+ClB,KAAnD;AACA,MAAI;AAACQ,IAAAA,UAAD;AAAaK,IAAAA;AAAb,MAA2B,SAASb,KAAT,CAA/B;AAEA,MAAImB,aAAa,GAAGC,SAAS,CAAC,CAACC,OAAO,CAACL,WAAD,CAAR,EAAuBK,OAAO,CAACJ,YAAD,CAA9B,EAA8CC,eAA9C,CAAD,CAA7B;AACA,MAAII,cAAc,GAAGF,SAAS,CAAC,CAACC,OAAO,CAACL,WAAD,CAAR,EAAuBK,OAAO,CAACJ,YAAD,CAA9B,EAA8CC,eAA9C,CAAD,CAA9B;AAEAL,EAAAA,UAAU,GAAGU,UAAU,CAACV,UAAD,EAAa;AAClC,wBAAoB,CAClBM,aADkB,EAElB;AACAG,IAAAA,cAHkB,EAIlBtB,KAAK,CAAC,kBAAD,CAJa,EAKlBwB,MALkB,CAKXH,OALW,EAKFI,IALE,CAKG,GALH,KAKWf;AANG,GAAb,CAAvB;AASA,SAAO;AACLF,IAAAA,UADK;AAELK,IAAAA,UAFK;AAGLa,IAAAA,gBAAgB,EAAE;AAChBzB,MAAAA,EAAE,EAAEkB;AADY,KAHb;AAMLQ,IAAAA,iBAAiB,EAAE;AACjB1B,MAAAA,EAAE,EAAEqB;AADa;AANd,GAAP;AAUD","sources":["./packages/@react-aria/label/src/useLabel.ts","./packages/@react-aria/label/src/useField.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\nimport {AriaLabelingProps, DOMProps, LabelableProps} from '@react-types/shared';\nimport {ElementType, LabelHTMLAttributes} from 'react';\nimport {useId, useLabels} from '@react-aria/utils';\n\nexport interface LabelAriaProps extends LabelableProps, DOMProps, AriaLabelingProps {\n /**\n * The HTML element used to render the label, e.g. 'label', or 'span'.\n * @default 'label'\n */\n labelElementType?: ElementType\n}\n\nexport interface LabelAria {\n /** Props to apply to the label container element. */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props to apply to the field container element being labeled. */\n fieldProps: AriaLabelingProps & DOMProps\n}\n\n/**\n * Provides the accessibility implementation for labels and their associated elements.\n * Labels provide context for user inputs.\n * @param props - The props for labels and fields.\n */\nexport function useLabel(props: LabelAriaProps): LabelAria {\n let {\n id,\n label,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n labelElementType = 'label'\n } = props;\n\n id = useId(id);\n let labelId = useId();\n let labelProps = {};\n if (label) {\n ariaLabelledby = ariaLabelledby ? `${ariaLabelledby} ${labelId}` : labelId;\n labelProps = {\n id: labelId,\n htmlFor: labelElementType === 'label' ? id : undefined\n };\n } else if (!ariaLabelledby && !ariaLabel) {\n console.warn('If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility');\n }\n\n let fieldProps = useLabels({\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby\n });\n\n return {\n labelProps,\n fieldProps\n };\n}\n","/*\n * Copyright 2021 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 {HelpTextProps, Validation} from '@react-types/shared';\nimport {HTMLAttributes} from 'react';\nimport {LabelAria, LabelAriaProps, useLabel} from './useLabel';\nimport {mergeProps, useSlotId} from '@react-aria/utils';\n\ninterface AriaFieldProps extends LabelAriaProps, HelpTextProps, Omit<Validation, 'isRequired'> {}\n\nexport interface FieldAria extends LabelAria {\n /** Props for the description element, if any. */\n descriptionProps: HTMLAttributes<HTMLElement>,\n /** Props for the error message element, if any. */\n errorMessageProps: HTMLAttributes<HTMLElement>\n}\n\n/**\n * Provides the accessibility implementation for input fields.\n * Fields accept user input, gain context from their label, and may display a description or error message.\n * @param props - Props for the Field.\n */\nexport function useField(props: AriaFieldProps): FieldAria {\n let {description, errorMessage, validationState} = props;\n let {labelProps, fieldProps} = useLabel(props);\n\n let descriptionId = useSlotId([Boolean(description), Boolean(errorMessage), validationState]);\n let errorMessageId = useSlotId([Boolean(description), Boolean(errorMessage), validationState]);\n\n fieldProps = mergeProps(fieldProps, {\n 'aria-describedby': [\n descriptionId,\n // Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268\n errorMessageId,\n props['aria-describedby']\n ].filter(Boolean).join(' ') || undefined\n });\n\n return {\n labelProps,\n fieldProps,\n descriptionProps: {\n id: descriptionId\n },\n errorMessageProps: {\n id: errorMessageId\n }\n };\n}\n"],"names":["useLabel","props","id","label","ariaLabelledby","ariaLabel","labelElementType","useId","labelId","labelProps","htmlFor","undefined","console","warn","fieldProps","useLabels","useField","description","errorMessage","validationState","descriptionId","useSlotId","Boolean","errorMessageId","mergeProps","filter","join","descriptionProps","errorMessageProps"],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;SEoCgB,yCAAQ,CAAC,KAAqB,EAAa,CAAC;IAC1D,GAAG,CAAC,CAAC,KACH,EAAE,UACF,KAAK,GACL,CAAiB,kBAAE,cAAc,GACjC,CAAY,aAAE,SAAS,qBACvB,gBAAgB,GAAG,CAAO,QAC5B,CAAC,GAAG,KAAK;IAET,EAAE,GAAG,2BAAK,CAAC,EAAE;IACb,GAAG,CAAC,OAAO,GAAG,2BAAK;IACnB,GAAG,CAAC,UAAU,GAAG,CAAC;IAAA,CAAC;IACnB,EAAE,EAAE,KAAK,EAAE,CAAC;QACV,cAAc,GAAG,cAAc,MAAM,cAAc,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO;QAC1E,UAAU,GAAG,CAAC;YACZ,EAAE,EAAE,OAAO;YACX,OAAO,EAAE,gBAAgB,KAAK,CAAO,SAAG,EAAE,GAAG,SAAS;QACxD,CAAC;IACH,CAAC,MAAM,EAAE,GAAG,cAAc,KAAK,SAAS,EACtC,OAAO,CAAC,IAAI,CAAC,CAAsH;IAGrI,GAAG,CAAC,UAAU,GAAG,+BAAS,CAAC,CAAC;YAC1B,EAAE;QACF,CAAY,aAAE,SAAS;QACvB,CAAiB,kBAAE,cAAc;IACnC,CAAC;IAED,MAAM,CAAC,CAAC;oBACN,UAAU;oBACV,UAAU;IACZ,CAAC;AACH,CAAC;;;;SDrCe,yCAAQ,CAAC,KAAqB,EAAa,CAAC;IAC1D,GAAG,CAAC,CAAC,cAAA,WAAW,iBAAE,YAAY,oBAAE,eAAe,EAAA,CAAC,GAAG,KAAK;IACxD,GAAG,CAAC,CAAC,aAAA,UAAU,eAAE,UAAU,EAAA,CAAC,GAAG,yCAAQ,CAAC,KAAK;IAE7C,GAAG,CAAC,aAAa,GAAG,+BAAS,CAAC,CAAC;QAAA,OAAO,CAAC,WAAW;QAAG,OAAO,CAAC,YAAY;QAAG,eAAe;IAAA,CAAC;IAC5F,GAAG,CAAC,cAAc,GAAG,+BAAS,CAAC,CAAC;QAAA,OAAO,CAAC,WAAW;QAAG,OAAO,CAAC,YAAY;QAAG,eAAe;IAAA,CAAC;IAE7F,UAAU,GAAG,gCAAU,CAAC,UAAU,EAAE,CAAC;QACnC,CAAkB,mBAAE,CAAC;YACnB,aAAa;YACb,EAA0L,AAA1L,wLAA0L;YAC1L,cAAc;YACd,KAAK,CAAC,CAAkB;QAC1B,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAG,OAAK,SAAS;IAC1C,CAAC;IAED,MAAM,CAAC,CAAC;oBACN,UAAU;oBACV,UAAU;QACV,gBAAgB,EAAE,CAAC;YACjB,EAAE,EAAE,aAAa;QACnB,CAAC;QACD,iBAAiB,EAAE,CAAC;YAClB,EAAE,EAAE,cAAc;QACpB,CAAC;IACH,CAAC;AACH,CAAC","sources":["packages/@react-aria/label/src/index.ts","packages/@react-aria/label/src/useField.ts","packages/@react-aria/label/src/useLabel.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\nexport * from './useField';\nexport * from './useLabel';\n","/*\n * Copyright 2021 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 {HelpTextProps, Validation} from '@react-types/shared';\nimport {HTMLAttributes} from 'react';\nimport {LabelAria, LabelAriaProps, useLabel} from './useLabel';\nimport {mergeProps, useSlotId} from '@react-aria/utils';\n\ninterface AriaFieldProps extends LabelAriaProps, HelpTextProps, Omit<Validation, 'isRequired'> {}\n\nexport interface FieldAria extends LabelAria {\n /** Props for the description element, if any. */\n descriptionProps: HTMLAttributes<HTMLElement>,\n /** Props for the error message element, if any. */\n errorMessageProps: HTMLAttributes<HTMLElement>\n}\n\n/**\n * Provides the accessibility implementation for input fields.\n * Fields accept user input, gain context from their label, and may display a description or error message.\n * @param props - Props for the Field.\n */\nexport function useField(props: AriaFieldProps): FieldAria {\n let {description, errorMessage, validationState} = props;\n let {labelProps, fieldProps} = useLabel(props);\n\n let descriptionId = useSlotId([Boolean(description), Boolean(errorMessage), validationState]);\n let errorMessageId = useSlotId([Boolean(description), Boolean(errorMessage), validationState]);\n\n fieldProps = mergeProps(fieldProps, {\n 'aria-describedby': [\n descriptionId,\n // Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268\n errorMessageId,\n props['aria-describedby']\n ].filter(Boolean).join(' ') || undefined\n });\n\n return {\n labelProps,\n fieldProps,\n descriptionProps: {\n id: descriptionId\n },\n errorMessageProps: {\n id: errorMessageId\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, LabelableProps} from '@react-types/shared';\nimport {ElementType, LabelHTMLAttributes} from 'react';\nimport {useId, useLabels} from '@react-aria/utils';\n\nexport interface LabelAriaProps extends LabelableProps, DOMProps, AriaLabelingProps {\n /**\n * The HTML element used to render the label, e.g. 'label', or 'span'.\n * @default 'label'\n */\n labelElementType?: ElementType\n}\n\nexport interface LabelAria {\n /** Props to apply to the label container element. */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props to apply to the field container element being labeled. */\n fieldProps: AriaLabelingProps & DOMProps\n}\n\n/**\n * Provides the accessibility implementation for labels and their associated elements.\n * Labels provide context for user inputs.\n * @param props - The props for labels and fields.\n */\nexport function useLabel(props: LabelAriaProps): LabelAria {\n let {\n id,\n label,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n labelElementType = 'label'\n } = props;\n\n id = useId(id);\n let labelId = useId();\n let labelProps = {};\n if (label) {\n ariaLabelledby = ariaLabelledby ? `${ariaLabelledby} ${labelId}` : labelId;\n labelProps = {\n id: labelId,\n htmlFor: labelElementType === 'label' ? id : undefined\n };\n } else if (!ariaLabelledby && !ariaLabel) {\n console.warn('If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility');\n }\n\n let fieldProps = useLabels({\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby\n });\n\n return {\n labelProps,\n fieldProps\n };\n}\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,73 +1,77 @@
1
- import { useId, useLabels, mergeProps, useSlotId } from "@react-aria/utils";
1
+ import {useSlotId as $5Odon$useSlotId, mergeProps as $5Odon$mergeProps, useId as $5Odon$useId, useLabels as $5Odon$useLabels} from "@react-aria/utils";
2
2
 
3
- /**
4
- * Provides the accessibility implementation for labels and their associated elements.
5
- * Labels provide context for user inputs.
6
- * @param props - The props for labels and fields.
7
- */
8
- export function useLabel(props) {
9
- let {
10
- id,
11
- label,
12
- 'aria-labelledby': ariaLabelledby,
13
- 'aria-label': ariaLabel,
14
- labelElementType = 'label'
15
- } = props;
16
- id = useId(id);
17
- let labelId = useId();
18
- let labelProps = {};
3
+ function $parcel$export(e, n, v, s) {
4
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
5
+ }
6
+ var $c796961545123cf9$exports = {};
19
7
 
20
- if (label) {
21
- ariaLabelledby = ariaLabelledby ? ariaLabelledby + " " + labelId : labelId;
22
- labelProps = {
23
- id: labelId,
24
- htmlFor: labelElementType === 'label' ? id : undefined
25
- };
26
- } else if (!ariaLabelledby && !ariaLabel) {
27
- console.warn('If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility');
28
- }
8
+ $parcel$export($c796961545123cf9$exports, "useField", () => $c796961545123cf9$export$294aa081a6c6f55d);
9
+ var $a25d9b7703051f71$exports = {};
29
10
 
30
- let fieldProps = useLabels({
31
- id,
32
- 'aria-label': ariaLabel,
33
- 'aria-labelledby': ariaLabelledby
34
- });
35
- return {
36
- labelProps,
37
- fieldProps
38
- };
11
+ $parcel$export($a25d9b7703051f71$exports, "useLabel", () => $a25d9b7703051f71$export$8467354a121f1b9f);
12
+
13
+ function $a25d9b7703051f71$export$8467354a121f1b9f(props) {
14
+ let { id: id , label: label , 'aria-labelledby': ariaLabelledby , 'aria-label': ariaLabel , labelElementType: labelElementType = 'label' } = props;
15
+ id = $5Odon$useId(id);
16
+ let labelId = $5Odon$useId();
17
+ let labelProps = {
18
+ };
19
+ if (label) {
20
+ ariaLabelledby = ariaLabelledby ? `${ariaLabelledby} ${labelId}` : labelId;
21
+ labelProps = {
22
+ id: labelId,
23
+ htmlFor: labelElementType === 'label' ? id : undefined
24
+ };
25
+ } else if (!ariaLabelledby && !ariaLabel) console.warn('If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility');
26
+ let fieldProps = $5Odon$useLabels({
27
+ id: id,
28
+ 'aria-label': ariaLabel,
29
+ 'aria-labelledby': ariaLabelledby
30
+ });
31
+ return {
32
+ labelProps: labelProps,
33
+ fieldProps: fieldProps
34
+ };
39
35
  }
40
36
 
41
- /**
42
- * Provides the accessibility implementation for input fields.
43
- * Fields accept user input, gain context from their label, and may display a description or error message.
44
- * @param props - Props for the Field.
45
- */
46
- export function useField(props) {
47
- let {
48
- description,
49
- errorMessage,
50
- validationState
51
- } = props;
52
- let {
53
- labelProps,
54
- fieldProps
55
- } = useLabel(props);
56
- let descriptionId = useSlotId([Boolean(description), Boolean(errorMessage), validationState]);
57
- let errorMessageId = useSlotId([Boolean(description), Boolean(errorMessage), validationState]);
58
- fieldProps = mergeProps(fieldProps, {
59
- 'aria-describedby': [descriptionId, // Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268
60
- errorMessageId, props['aria-describedby']].filter(Boolean).join(' ') || undefined
61
- });
62
- return {
63
- labelProps,
64
- fieldProps,
65
- descriptionProps: {
66
- id: descriptionId
67
- },
68
- errorMessageProps: {
69
- id: errorMessageId
70
- }
71
- };
37
+
38
+
39
+ function $c796961545123cf9$export$294aa081a6c6f55d(props) {
40
+ let { description: description , errorMessage: errorMessage , validationState: validationState } = props;
41
+ let { labelProps: labelProps , fieldProps: fieldProps } = $a25d9b7703051f71$export$8467354a121f1b9f(props);
42
+ let descriptionId = $5Odon$useSlotId([
43
+ Boolean(description),
44
+ Boolean(errorMessage),
45
+ validationState
46
+ ]);
47
+ let errorMessageId = $5Odon$useSlotId([
48
+ Boolean(description),
49
+ Boolean(errorMessage),
50
+ validationState
51
+ ]);
52
+ fieldProps = $5Odon$mergeProps(fieldProps, {
53
+ 'aria-describedby': [
54
+ descriptionId,
55
+ // Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268
56
+ errorMessageId,
57
+ props['aria-describedby']
58
+ ].filter(Boolean).join(' ') || undefined
59
+ });
60
+ return {
61
+ labelProps: labelProps,
62
+ fieldProps: fieldProps,
63
+ descriptionProps: {
64
+ id: descriptionId
65
+ },
66
+ errorMessageProps: {
67
+ id: errorMessageId
68
+ }
69
+ };
72
70
  }
71
+
72
+
73
+
74
+
75
+
76
+ export {$c796961545123cf9$export$294aa081a6c6f55d as useField, $a25d9b7703051f71$export$8467354a121f1b9f as useLabel};
73
77
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
1
- {"mappings":";;AA+BA;;;;;OAKO,SAASA,QAAT,CAAkBC,KAAlB,EAAoD;AACzD,MAAI;AACFC,IAAAA,EADE;AAEFC,IAAAA,KAFE;AAGF,uBAAmBC,cAHjB;AAIF,kBAAcC,SAJZ;AAKFC,IAAAA,gBAAgB,GAAG;AALjB,MAMAL,KANJ;AAQAC,EAAAA,EAAE,GAAGK,KAAK,CAACL,EAAD,CAAV;AACA,MAAIM,OAAO,GAAGD,KAAK,EAAnB;AACA,MAAIE,UAAU,GAAG,EAAjB;;AACA,MAAIN,KAAJ,EAAW;AACTC,IAAAA,cAAc,GAAGA,cAAc,GAAMA,cAAN,SAAwBI,OAAxB,GAAoCA,OAAnE;AACAC,IAAAA,UAAU,GAAG;AACXP,MAAAA,EAAE,EAAEM,OADO;AAEXE,MAAAA,OAAO,EAAEJ,gBAAgB,KAAK,OAArB,GAA+BJ,EAA/B,GAAoCS;AAFlC,KAAb;AAID,GAND,MAMO,IAAI,CAACP,cAAD,IAAmB,CAACC,SAAxB,EAAmC;AACxCO,IAAAA,OAAO,CAACC,IAAR,CAAa,sHAAb;AACD;;AAED,MAAIC,UAAU,GAAGC,SAAS,CAAC;AACzBb,IAAAA,EADyB;AAEzB,kBAAcG,SAFW;AAGzB,uBAAmBD;AAHM,GAAD,CAA1B;AAMA,SAAO;AACLK,IAAAA,UADK;AAELK,IAAAA;AAFK,GAAP;AAID;;AC1CD;;;;;OAKO,SAASE,QAAT,CAAkBf,KAAlB,EAAoD;AACzD,MAAI;AAACgB,IAAAA,WAAD;AAAcC,IAAAA,YAAd;AAA4BC,IAAAA;AAA5B,MAA+ClB,KAAnD;AACA,MAAI;AAACQ,IAAAA,UAAD;AAAaK,IAAAA;AAAb,MAA2B,SAASb,KAAT,CAA/B;AAEA,MAAImB,aAAa,GAAGC,SAAS,CAAC,CAACC,OAAO,CAACL,WAAD,CAAR,EAAuBK,OAAO,CAACJ,YAAD,CAA9B,EAA8CC,eAA9C,CAAD,CAA7B;AACA,MAAII,cAAc,GAAGF,SAAS,CAAC,CAACC,OAAO,CAACL,WAAD,CAAR,EAAuBK,OAAO,CAACJ,YAAD,CAA9B,EAA8CC,eAA9C,CAAD,CAA9B;AAEAL,EAAAA,UAAU,GAAGU,UAAU,CAACV,UAAD,EAAa;AAClC,wBAAoB,CAClBM,aADkB,EAElB;AACAG,IAAAA,cAHkB,EAIlBtB,KAAK,CAAC,kBAAD,CAJa,EAKlBwB,MALkB,CAKXH,OALW,EAKFI,IALE,CAKG,GALH,KAKWf;AANG,GAAb,CAAvB;AASA,SAAO;AACLF,IAAAA,UADK;AAELK,IAAAA,UAFK;AAGLa,IAAAA,gBAAgB,EAAE;AAChBzB,MAAAA,EAAE,EAAEkB;AADY,KAHb;AAMLQ,IAAAA,iBAAiB,EAAE;AACjB1B,MAAAA,EAAE,EAAEqB;AADa;AANd,GAAP;AAUD","sources":["./packages/@react-aria/label/src/useLabel.ts","./packages/@react-aria/label/src/useField.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\nimport {AriaLabelingProps, DOMProps, LabelableProps} from '@react-types/shared';\nimport {ElementType, LabelHTMLAttributes} from 'react';\nimport {useId, useLabels} from '@react-aria/utils';\n\nexport interface LabelAriaProps extends LabelableProps, DOMProps, AriaLabelingProps {\n /**\n * The HTML element used to render the label, e.g. 'label', or 'span'.\n * @default 'label'\n */\n labelElementType?: ElementType\n}\n\nexport interface LabelAria {\n /** Props to apply to the label container element. */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props to apply to the field container element being labeled. */\n fieldProps: AriaLabelingProps & DOMProps\n}\n\n/**\n * Provides the accessibility implementation for labels and their associated elements.\n * Labels provide context for user inputs.\n * @param props - The props for labels and fields.\n */\nexport function useLabel(props: LabelAriaProps): LabelAria {\n let {\n id,\n label,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n labelElementType = 'label'\n } = props;\n\n id = useId(id);\n let labelId = useId();\n let labelProps = {};\n if (label) {\n ariaLabelledby = ariaLabelledby ? `${ariaLabelledby} ${labelId}` : labelId;\n labelProps = {\n id: labelId,\n htmlFor: labelElementType === 'label' ? id : undefined\n };\n } else if (!ariaLabelledby && !ariaLabel) {\n console.warn('If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility');\n }\n\n let fieldProps = useLabels({\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby\n });\n\n return {\n labelProps,\n fieldProps\n };\n}\n","/*\n * Copyright 2021 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 {HelpTextProps, Validation} from '@react-types/shared';\nimport {HTMLAttributes} from 'react';\nimport {LabelAria, LabelAriaProps, useLabel} from './useLabel';\nimport {mergeProps, useSlotId} from '@react-aria/utils';\n\ninterface AriaFieldProps extends LabelAriaProps, HelpTextProps, Omit<Validation, 'isRequired'> {}\n\nexport interface FieldAria extends LabelAria {\n /** Props for the description element, if any. */\n descriptionProps: HTMLAttributes<HTMLElement>,\n /** Props for the error message element, if any. */\n errorMessageProps: HTMLAttributes<HTMLElement>\n}\n\n/**\n * Provides the accessibility implementation for input fields.\n * Fields accept user input, gain context from their label, and may display a description or error message.\n * @param props - Props for the Field.\n */\nexport function useField(props: AriaFieldProps): FieldAria {\n let {description, errorMessage, validationState} = props;\n let {labelProps, fieldProps} = useLabel(props);\n\n let descriptionId = useSlotId([Boolean(description), Boolean(errorMessage), validationState]);\n let errorMessageId = useSlotId([Boolean(description), Boolean(errorMessage), validationState]);\n\n fieldProps = mergeProps(fieldProps, {\n 'aria-describedby': [\n descriptionId,\n // Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268\n errorMessageId,\n props['aria-describedby']\n ].filter(Boolean).join(' ') || undefined\n });\n\n return {\n labelProps,\n fieldProps,\n descriptionProps: {\n id: descriptionId\n },\n errorMessageProps: {\n id: errorMessageId\n }\n };\n}\n"],"names":["useLabel","props","id","label","ariaLabelledby","ariaLabel","labelElementType","useId","labelId","labelProps","htmlFor","undefined","console","warn","fieldProps","useLabels","useField","description","errorMessage","validationState","descriptionId","useSlotId","Boolean","errorMessageId","mergeProps","filter","join","descriptionProps","errorMessageProps"],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;SEoCgB,yCAAQ,CAAC,KAAqB,EAAa,CAAC;IAC1D,GAAG,CAAC,CAAC,KACH,EAAE,UACF,KAAK,GACL,CAAiB,kBAAE,cAAc,GACjC,CAAY,aAAE,SAAS,qBACvB,gBAAgB,GAAG,CAAO,QAC5B,CAAC,GAAG,KAAK;IAET,EAAE,GAAG,YAAK,CAAC,EAAE;IACb,GAAG,CAAC,OAAO,GAAG,YAAK;IACnB,GAAG,CAAC,UAAU,GAAG,CAAC;IAAA,CAAC;IACnB,EAAE,EAAE,KAAK,EAAE,CAAC;QACV,cAAc,GAAG,cAAc,MAAM,cAAc,CAAC,CAAC,EAAE,OAAO,KAAK,OAAO;QAC1E,UAAU,GAAG,CAAC;YACZ,EAAE,EAAE,OAAO;YACX,OAAO,EAAE,gBAAgB,KAAK,CAAO,SAAG,EAAE,GAAG,SAAS;QACxD,CAAC;IACH,CAAC,MAAM,EAAE,GAAG,cAAc,KAAK,SAAS,EACtC,OAAO,CAAC,IAAI,CAAC,CAAsH;IAGrI,GAAG,CAAC,UAAU,GAAG,gBAAS,CAAC,CAAC;YAC1B,EAAE;QACF,CAAY,aAAE,SAAS;QACvB,CAAiB,kBAAE,cAAc;IACnC,CAAC;IAED,MAAM,CAAC,CAAC;oBACN,UAAU;oBACV,UAAU;IACZ,CAAC;AACH,CAAC;;;;SDrCe,yCAAQ,CAAC,KAAqB,EAAa,CAAC;IAC1D,GAAG,CAAC,CAAC,cAAA,WAAW,iBAAE,YAAY,oBAAE,eAAe,EAAA,CAAC,GAAG,KAAK;IACxD,GAAG,CAAC,CAAC,aAAA,UAAU,eAAE,UAAU,EAAA,CAAC,GAAG,yCAAQ,CAAC,KAAK;IAE7C,GAAG,CAAC,aAAa,GAAG,gBAAS,CAAC,CAAC;QAAA,OAAO,CAAC,WAAW;QAAG,OAAO,CAAC,YAAY;QAAG,eAAe;IAAA,CAAC;IAC5F,GAAG,CAAC,cAAc,GAAG,gBAAS,CAAC,CAAC;QAAA,OAAO,CAAC,WAAW;QAAG,OAAO,CAAC,YAAY;QAAG,eAAe;IAAA,CAAC;IAE7F,UAAU,GAAG,iBAAU,CAAC,UAAU,EAAE,CAAC;QACnC,CAAkB,mBAAE,CAAC;YACnB,aAAa;YACb,EAA0L,AAA1L,wLAA0L;YAC1L,cAAc;YACd,KAAK,CAAC,CAAkB;QAC1B,CAAC,CAAC,MAAM,CAAC,OAAO,EAAE,IAAI,CAAC,CAAG,OAAK,SAAS;IAC1C,CAAC;IAED,MAAM,CAAC,CAAC;oBACN,UAAU;oBACV,UAAU;QACV,gBAAgB,EAAE,CAAC;YACjB,EAAE,EAAE,aAAa;QACnB,CAAC;QACD,iBAAiB,EAAE,CAAC;YAClB,EAAE,EAAE,cAAc;QACpB,CAAC;IACH,CAAC;AACH,CAAC","sources":["packages/@react-aria/label/src/index.ts","packages/@react-aria/label/src/useField.ts","packages/@react-aria/label/src/useLabel.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\nexport * from './useField';\nexport * from './useLabel';\n","/*\n * Copyright 2021 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 {HelpTextProps, Validation} from '@react-types/shared';\nimport {HTMLAttributes} from 'react';\nimport {LabelAria, LabelAriaProps, useLabel} from './useLabel';\nimport {mergeProps, useSlotId} from '@react-aria/utils';\n\ninterface AriaFieldProps extends LabelAriaProps, HelpTextProps, Omit<Validation, 'isRequired'> {}\n\nexport interface FieldAria extends LabelAria {\n /** Props for the description element, if any. */\n descriptionProps: HTMLAttributes<HTMLElement>,\n /** Props for the error message element, if any. */\n errorMessageProps: HTMLAttributes<HTMLElement>\n}\n\n/**\n * Provides the accessibility implementation for input fields.\n * Fields accept user input, gain context from their label, and may display a description or error message.\n * @param props - Props for the Field.\n */\nexport function useField(props: AriaFieldProps): FieldAria {\n let {description, errorMessage, validationState} = props;\n let {labelProps, fieldProps} = useLabel(props);\n\n let descriptionId = useSlotId([Boolean(description), Boolean(errorMessage), validationState]);\n let errorMessageId = useSlotId([Boolean(description), Boolean(errorMessage), validationState]);\n\n fieldProps = mergeProps(fieldProps, {\n 'aria-describedby': [\n descriptionId,\n // Use aria-describedby for error message because aria-errormessage is unsupported using VoiceOver or NVDA. See https://github.com/adobe/react-spectrum/issues/1346#issuecomment-740136268\n errorMessageId,\n props['aria-describedby']\n ].filter(Boolean).join(' ') || undefined\n });\n\n return {\n labelProps,\n fieldProps,\n descriptionProps: {\n id: descriptionId\n },\n errorMessageProps: {\n id: errorMessageId\n }\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {AriaLabelingProps, DOMProps, LabelableProps} from '@react-types/shared';\nimport {ElementType, LabelHTMLAttributes} from 'react';\nimport {useId, useLabels} from '@react-aria/utils';\n\nexport interface LabelAriaProps extends LabelableProps, DOMProps, AriaLabelingProps {\n /**\n * The HTML element used to render the label, e.g. 'label', or 'span'.\n * @default 'label'\n */\n labelElementType?: ElementType\n}\n\nexport interface LabelAria {\n /** Props to apply to the label container element. */\n labelProps: LabelHTMLAttributes<HTMLLabelElement>,\n /** Props to apply to the field container element being labeled. */\n fieldProps: AriaLabelingProps & DOMProps\n}\n\n/**\n * Provides the accessibility implementation for labels and their associated elements.\n * Labels provide context for user inputs.\n * @param props - The props for labels and fields.\n */\nexport function useLabel(props: LabelAriaProps): LabelAria {\n let {\n id,\n label,\n 'aria-labelledby': ariaLabelledby,\n 'aria-label': ariaLabel,\n labelElementType = 'label'\n } = props;\n\n id = useId(id);\n let labelId = useId();\n let labelProps = {};\n if (label) {\n ariaLabelledby = ariaLabelledby ? `${ariaLabelledby} ${labelId}` : labelId;\n labelProps = {\n id: labelId,\n htmlFor: labelElementType === 'label' ? id : undefined\n };\n } else if (!ariaLabelledby && !ariaLabel) {\n console.warn('If you do not provide a visible label, you must specify an aria-label or aria-labelledby attribute for accessibility');\n }\n\n let fieldProps = useLabels({\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby\n });\n\n return {\n labelProps,\n fieldProps\n };\n}\n"],"names":[],"version":3,"file":"module.js.map"}
@@ -1 +1 @@
1
- {"mappings":"A;A;AAgBA,+BAAgC,SAAQ,cAAc,EAAE,QAAQ,EAAE,iBAAiB;IACjF;A;A;OAGG;IACH,gBAAgB,CAAC,EAAE,WAAW,CAAA;CAC/B;AAED;IACE,qDAAqD;IACrD,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,mEAAmE;IACnE,UAAU,EAAE,iBAAiB,GAAG,QAAQ,CAAA;CACzC;AAED;A;A;A;GAIG;AACH,yBAAyB,KAAK,EAAE,cAAc,GAAG,SAAS,CAgCzD;ACnDD,wBAAyB,SAAQ,cAAc,EAAE,aAAa,EAAE,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC;CAAG;AAEjG,0BAA2B,SAAQ,SAAS;IAC1C,iDAAiD;IACjD,gBAAgB,EAAE,eAAe,WAAW,CAAC,CAAC;IAC9C,mDAAmD;IACnD,iBAAiB,EAAE,eAAe,WAAW,CAAC,CAAA;CAC/C;AAED;A;A;A;GAIG;AACH,yBAAyB,KAAK,EAAE,cAAc,GAAG,SAAS,CA0BzD","sources":["./packages/@react-aria/label/src/packages/@react-aria/label/src/useLabel.ts","./packages/@react-aria/label/src/packages/@react-aria/label/src/useField.ts","./packages/@react-aria/label/src/packages/@react-aria/label/src/index.ts"],"sourcesContent":[null,null,null],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;AAgBA,+BAAgC,SAAQ,cAAc,EAAE,QAAQ,EAAE,iBAAiB;IACjF;;;OAGG;IACH,gBAAgB,CAAC,EAAE,WAAW,CAAA;CAC/B;AAED;IACE,qDAAqD;IACrD,UAAU,EAAE,oBAAoB,gBAAgB,CAAC,CAAC;IAClD,mEAAmE;IACnE,UAAU,EAAE,iBAAiB,GAAG,QAAQ,CAAA;CACzC;AAED;;;;GAIG;AACH,yBAAyB,KAAK,EAAE,cAAc,GAAG,SAAS,CAgCzD;ACnDD,wBAAyB,SAAQ,cAAc,EAAE,aAAa,EAAE,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC;CAAG;AAEjG,0BAA2B,SAAQ,SAAS;IAC1C,iDAAiD;IACjD,gBAAgB,EAAE,eAAe,WAAW,CAAC,CAAC;IAC9C,mDAAmD;IACnD,iBAAiB,EAAE,eAAe,WAAW,CAAC,CAAA;CAC/C;AAED;;;;GAIG;AACH,yBAAyB,KAAK,EAAE,cAAc,GAAG,SAAS,CA0BzD","sources":["packages/@react-aria/label/src/packages/@react-aria/label/src/useLabel.ts","packages/@react-aria/label/src/packages/@react-aria/label/src/useField.ts","packages/@react-aria/label/src/packages/@react-aria/label/src/index.ts","packages/@react-aria/label/src/index.ts"],"sourcesContent":[null,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\nexport * from './useField';\nexport * from './useLabel';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/label",
3
- "version": "3.2.1",
3
+ "version": "3.2.2",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -18,9 +18,9 @@
18
18
  },
19
19
  "dependencies": {
20
20
  "@babel/runtime": "^7.6.2",
21
- "@react-aria/utils": "^3.10.0",
22
- "@react-types/label": "^3.5.0",
23
- "@react-types/shared": "^3.10.0"
21
+ "@react-aria/utils": "^3.11.1",
22
+ "@react-types/label": "^3.5.1",
23
+ "@react-types/shared": "^3.11.0"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "react": "^16.8.0 || ^17.0.0-rc.1"
@@ -28,5 +28,5 @@
28
28
  "publishConfig": {
29
29
  "access": "public"
30
30
  },
31
- "gitHead": "896eabe5521a0349a675c4773ed7629addd4b8c4"
31
+ "gitHead": "54c2366c4f31bd4bf619126131cd583c12972acc"
32
32
  }