@react-spectrum/label 3.16.9 → 3.16.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2019 Adobe
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -1,6 +1,6 @@
1
1
  var $2d1b5114e5b358b6$exports = require("./HelpText.main.js");
2
2
  var $38a9afbd39356629$exports = require("./Label.main.js");
3
- require("./vars.d514c1fb.css");
3
+ require("./vars.6dc4ca00.css");
4
4
  var $eb2fc0ee655eff6b$exports = require("./fieldlabel_vars_css.main.js");
5
5
  var $bW4vJ$reactspectrumutils = require("@react-spectrum/utils");
6
6
  var $bW4vJ$reactspectrumlayout = require("@react-spectrum/layout");
@@ -36,7 +36,7 @@ $parcel$export(module.exports, "Field", () => $0e5410371a445d59$export$a455218a8
36
36
 
37
37
 
38
38
 
39
- function $0e5410371a445d59$var$Field(props, ref) {
39
+ const $0e5410371a445d59$export$a455218a85c89869 = /*#__PURE__*/ (0, ($parcel$interopDefault($bW4vJ$react))).forwardRef(function Field(props, ref) {
40
40
  let formProps = (0, $bW4vJ$reactspectrumform.useFormProps)(props);
41
41
  let isInForm = formProps !== props;
42
42
  props = formProps;
@@ -111,8 +111,7 @@ function $0e5410371a445d59$var$Field(props, ref) {
111
111
  ref: ref,
112
112
  className: labelWrapperClass
113
113
  }, labelAndContextualHelp, renderChildren());
114
- }
115
- let $0e5410371a445d59$export$a455218a85c89869 = /*#__PURE__*/ (0, ($parcel$interopDefault($bW4vJ$react))).forwardRef($0e5410371a445d59$var$Field);
114
+ });
116
115
 
117
116
 
118
117
  //# sourceMappingURL=Field.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAaD,SAAS,4BAAM,KAAyB,EAAE,GAAqB;IAC7D,IAAI,YAAY,CAAA,GAAA,qCAAW,EAAE;IAC7B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GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/label/src/Field.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 {classNames, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {Flex} from '@react-spectrum/layout';\nimport {HelpText} from './HelpText';\nimport {Label} from './Label';\nimport {LabelPosition, RefObject} from '@react-types/shared';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {mergeProps, useId} from '@react-aria/utils';\nimport React, {ReactNode, Ref} from 'react';\nimport {SpectrumFieldProps} from '@react-types/label';\nimport {useFormProps} from '@react-spectrum/form';\n\nfunction Field(props: SpectrumFieldProps, ref: Ref<HTMLElement>) {\n let formProps = useFormProps(props);\n let isInForm = formProps !== props;\n props = formProps;\n let {\n label,\n labelPosition = 'top' as LabelPosition,\n labelAlign,\n isRequired,\n necessityIndicator,\n includeNecessityIndicatorInAccessibilityName,\n validationState,\n isInvalid,\n description,\n errorMessage = e => e.validationErrors.join(' '),\n validationErrors,\n validationDetails,\n isDisabled,\n showErrorIcon,\n contextualHelp,\n children,\n labelProps = {},\n // Not every component that uses <Field> supports help text.\n descriptionProps = {},\n errorMessageProps = {},\n elementType,\n wrapperClassName,\n wrapperProps = {},\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let errorMessageString: ReactNode = null;\n if (typeof errorMessage === 'function') {\n errorMessageString = isInvalid != null && validationErrors != null && validationDetails != null\n ? errorMessage({\n isInvalid,\n validationErrors,\n validationDetails\n })\n : null;\n } else {\n errorMessageString = errorMessage;\n }\n let hasHelpText = !!description || errorMessageString && (isInvalid || validationState === 'invalid');\n let contextualHelpId = useId();\n\n let fallbackLabelPropsId = useId();\n if (label && contextualHelp && !labelProps.id) {\n labelProps.id = fallbackLabelPropsId;\n }\n\n let labelWrapperClass = classNames(\n labelStyles,\n 'spectrum-Field',\n {\n 'spectrum-Field--positionTop': labelPosition === 'top',\n 'spectrum-Field--positionSide': labelPosition === 'side',\n 'spectrum-Field--alignEnd': labelAlign === 'end',\n 'spectrum-Field--hasContextualHelp': !!props.contextualHelp\n },\n styleProps.className,\n wrapperClassName\n );\n\n children = React.cloneElement(children, mergeProps(children.props as any, {\n className: classNames(\n labelStyles,\n 'spectrum-Field-field'\n )\n }));\n\n let renderHelpText = () => (\n <HelpText\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n description={description}\n errorMessage={errorMessageString}\n validationState={validationState}\n isInvalid={isInvalid}\n isDisabled={isDisabled}\n showErrorIcon={showErrorIcon}\n gridArea={labelStyles.helpText} />\n );\n\n let renderChildren = () => {\n if (labelPosition === 'side') {\n return (\n <Flex direction=\"column\" UNSAFE_className={classNames(labelStyles, 'spectrum-Field-wrapper')}>\n {children}\n {hasHelpText && renderHelpText()}\n </Flex>\n );\n }\n\n return (\n <>\n {children}\n {hasHelpText && renderHelpText()}\n </>\n );\n };\n\n let labelAndContextualHelp = (\n <>\n {label && (\n <Label\n {...labelProps}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n isRequired={isRequired}\n necessityIndicator={necessityIndicator}\n includeNecessityIndicatorInAccessibilityName={includeNecessityIndicatorInAccessibilityName}\n elementType={elementType}>\n {label}\n </Label>\n )}\n {label && contextualHelp &&\n <SlotProvider\n slots={{\n actionButton: {\n UNSAFE_className: classNames(labelStyles, 'spectrum-Field-contextualHelp'),\n id: contextualHelpId,\n 'aria-labelledby': labelProps?.id ? `${labelProps.id} ${contextualHelpId}` : undefined\n }\n }}>\n {contextualHelp}\n </SlotProvider>\n }\n </>\n );\n\n // Need to add an extra wrapper for the label and contextual help if labelPosition is side,\n // so that the table layout works inside forms.\n if (isInForm && labelPosition === 'side' && label && contextualHelp) {\n labelAndContextualHelp = (\n <div className={classNames(labelStyles, 'spectrum-Field-labelCell')}>\n <div className={classNames(labelStyles, 'spectrum-Field-labelWrapper')}>\n {labelAndContextualHelp}\n </div>\n </div>\n );\n }\n\n return (\n (<div\n {...styleProps}\n {...wrapperProps}\n ref={ref as RefObject<HTMLDivElement | null>}\n className={labelWrapperClass}>\n {labelAndContextualHelp}\n {renderChildren()}\n </div>)\n );\n}\n\nlet _Field = React.forwardRef(Field);\nexport {_Field as Field};\n"],"names":[],"version":3,"file":"Field.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAaM,MAAM,0DAAQ,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,MAAM,KAAyB,EAAE,GAAqB;IACnG,IAAI,YAAY,CAAA,GAAA,qCAAW,EAAE;IAC7B,IAAI,WAAW,cAAc;IAC7B,QAAQ;IACR,IAAI,SACF,KAAK,iBACL,gBAAgB,mBAChB,UAAU,cACV,UAAU,sBACV,kBAAkB,gDAClB,4CAA4C,mBAC5C,eAAe,aACf,SAAS,eACT,WAAW,gBACX,eAAe,CAAA,IAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,wBAC5C,gBAAgB,qBAChB,iBAAiB,cACjB,UAAU,iBACV,aAAa,kBACb,cAAc,YACd,QAAQ,cACR,aAAa,CAAC,qBACd,4DAA4D;IAC5D,mBAAmB,CAAC,sBACpB,oBAAoB,CAAC,gBACrB,WAAW,oBACX,gBAAgB,gBAChB,eAAe,CAAC,GAChB,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IACjC,IAAI,qBAAgC;IACpC,IAAI,OAAO,iBAAiB,YAC1B,qBAAqB,aAAa,QAAQ,oBAAoB,QAA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OACZ,QAGJ,SAAS,gCACR,0DAAC,CAAA,GAAA,sCAAW;QACV,OAAO;YACL,cAAc;gBACZ,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAU,GAAG;gBAC1C,IAAI;gBACJ,mBAAmB,CAAA,uBAAA,iCAAA,WAAY,EAAE,IAAG,GAAG,WAAW,EAAE,CAAC,CAAC,EAAE,kBAAkB,GAAG;YAC/E;QACF;OACC;IAMP,2FAA2F;IAC3F,+CAA+C;IACjD,IAAI,YAAY,kBAAkB,UAAU,SAAS,gBACnD,uCACE,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAU,GAAG;qBACtC,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAU,GAAG;OACrC;IAMT,qBACG,0DAAC;QACC,GAAG,UAAU;QACb,GAAG,YAAY;QAChB,KAAK;QACL,WAAW;OACV,wBACA;AAGP","sources":["packages/@react-spectrum/label/src/Field.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 {classNames, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {Flex} from '@react-spectrum/layout';\nimport {HelpText} from './HelpText';\nimport {Label} from './Label';\nimport {LabelPosition, RefObject} from '@react-types/shared';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {mergeProps, useId} from '@react-aria/utils';\nimport React, {ReactNode, Ref} from 'react';\nimport {SpectrumFieldProps} from '@react-types/label';\nimport {useFormProps} from '@react-spectrum/form';\n\nexport const Field = React.forwardRef(function Field(props: SpectrumFieldProps, ref: Ref<HTMLElement>) {\n let formProps = useFormProps(props);\n let isInForm = formProps !== props;\n props = formProps;\n let {\n label,\n labelPosition = 'top' as LabelPosition,\n labelAlign,\n isRequired,\n necessityIndicator,\n includeNecessityIndicatorInAccessibilityName,\n validationState,\n isInvalid,\n description,\n errorMessage = e => e.validationErrors.join(' '),\n validationErrors,\n validationDetails,\n isDisabled,\n showErrorIcon,\n contextualHelp,\n children,\n labelProps = {},\n // Not every component that uses <Field> supports help text.\n descriptionProps = {},\n errorMessageProps = {},\n elementType,\n wrapperClassName,\n wrapperProps = {},\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let errorMessageString: ReactNode = null;\n if (typeof errorMessage === 'function') {\n errorMessageString = isInvalid != null && validationErrors != null && validationDetails != null\n ? errorMessage({\n isInvalid,\n validationErrors,\n validationDetails\n })\n : null;\n } else {\n errorMessageString = errorMessage;\n }\n let hasHelpText = !!description || errorMessageString && (isInvalid || validationState === 'invalid');\n let contextualHelpId = useId();\n\n let fallbackLabelPropsId = useId();\n if (label && contextualHelp && !labelProps.id) {\n labelProps.id = fallbackLabelPropsId;\n }\n\n let labelWrapperClass = classNames(\n labelStyles,\n 'spectrum-Field',\n {\n 'spectrum-Field--positionTop': labelPosition === 'top',\n 'spectrum-Field--positionSide': labelPosition === 'side',\n 'spectrum-Field--alignEnd': labelAlign === 'end',\n 'spectrum-Field--hasContextualHelp': !!props.contextualHelp\n },\n styleProps.className,\n wrapperClassName\n );\n\n children = React.cloneElement(children, mergeProps(children.props as any, {\n className: classNames(\n labelStyles,\n 'spectrum-Field-field'\n )\n }));\n\n let renderHelpText = () => (\n <HelpText\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n description={description}\n errorMessage={errorMessageString}\n validationState={validationState}\n isInvalid={isInvalid}\n isDisabled={isDisabled}\n showErrorIcon={showErrorIcon}\n gridArea={labelStyles.helpText} />\n );\n\n let renderChildren = () => {\n if (labelPosition === 'side') {\n return (\n <Flex direction=\"column\" UNSAFE_className={classNames(labelStyles, 'spectrum-Field-wrapper')}>\n {children}\n {hasHelpText && renderHelpText()}\n </Flex>\n );\n }\n\n return (\n <>\n {children}\n {hasHelpText && renderHelpText()}\n </>\n );\n };\n\n let labelAndContextualHelp = (\n <>\n {label && (\n <Label\n {...labelProps}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n isRequired={isRequired}\n necessityIndicator={necessityIndicator}\n includeNecessityIndicatorInAccessibilityName={includeNecessityIndicatorInAccessibilityName}\n elementType={elementType}>\n {label}\n </Label>\n )}\n {label && contextualHelp &&\n <SlotProvider\n slots={{\n actionButton: {\n UNSAFE_className: classNames(labelStyles, 'spectrum-Field-contextualHelp'),\n id: contextualHelpId,\n 'aria-labelledby': labelProps?.id ? `${labelProps.id} ${contextualHelpId}` : undefined\n }\n }}>\n {contextualHelp}\n </SlotProvider>\n }\n </>\n );\n\n // Need to add an extra wrapper for the label and contextual help if labelPosition is side,\n // so that the table layout works inside forms.\n if (isInForm && labelPosition === 'side' && label && contextualHelp) {\n labelAndContextualHelp = (\n <div className={classNames(labelStyles, 'spectrum-Field-labelCell')}>\n <div className={classNames(labelStyles, 'spectrum-Field-labelWrapper')}>\n {labelAndContextualHelp}\n </div>\n </div>\n );\n }\n\n return (\n (<div\n {...styleProps}\n {...wrapperProps}\n ref={ref as RefObject<HTMLDivElement | null>}\n className={labelWrapperClass}>\n {labelAndContextualHelp}\n {renderChildren()}\n </div>)\n );\n});\n"],"names":[],"version":3,"file":"Field.main.js.map"}
package/dist/Field.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {HelpText as $8e50676506611310$export$a67c0bc59081311a} from "./HelpText.mjs";
2
2
  import {Label as $00af9ba397a66f43$export$b04be29aa201d4f5} from "./Label.mjs";
3
- import "./vars.d514c1fb.css";
3
+ import "./vars.6dc4ca00.css";
4
4
  import $c6ZG4$fieldlabel_vars_cssmodulejs from "./fieldlabel_vars_css.mjs";
5
5
  import {useStyleProps as $c6ZG4$useStyleProps, classNames as $c6ZG4$classNames, SlotProvider as $c6ZG4$SlotProvider} from "@react-spectrum/utils";
6
6
  import {Flex as $c6ZG4$Flex} from "@react-spectrum/layout";
@@ -30,7 +30,7 @@ function $parcel$interopDefault(a) {
30
30
 
31
31
 
32
32
 
33
- function $b7ca5b4454a2009d$var$Field(props, ref) {
33
+ const $b7ca5b4454a2009d$export$a455218a85c89869 = /*#__PURE__*/ (0, $c6ZG4$react).forwardRef(function Field(props, ref) {
34
34
  let formProps = (0, $c6ZG4$useFormProps)(props);
35
35
  let isInForm = formProps !== props;
36
36
  props = formProps;
@@ -105,8 +105,7 @@ function $b7ca5b4454a2009d$var$Field(props, ref) {
105
105
  ref: ref,
106
106
  className: labelWrapperClass
107
107
  }, labelAndContextualHelp, renderChildren());
108
- }
109
- let $b7ca5b4454a2009d$export$a455218a85c89869 = /*#__PURE__*/ (0, $c6ZG4$react).forwardRef($b7ca5b4454a2009d$var$Field);
108
+ });
110
109
 
111
110
 
112
111
  export {$b7ca5b4454a2009d$export$a455218a85c89869 as Field};
@@ -1,6 +1,6 @@
1
1
  import {HelpText as $8e50676506611310$export$a67c0bc59081311a} from "./HelpText.module.js";
2
2
  import {Label as $00af9ba397a66f43$export$b04be29aa201d4f5} from "./Label.module.js";
3
- import "./vars.d514c1fb.css";
3
+ import "./vars.6dc4ca00.css";
4
4
  import $c6ZG4$fieldlabel_vars_cssmodulejs from "./fieldlabel_vars_css.module.js";
5
5
  import {useStyleProps as $c6ZG4$useStyleProps, classNames as $c6ZG4$classNames, SlotProvider as $c6ZG4$SlotProvider} from "@react-spectrum/utils";
6
6
  import {Flex as $c6ZG4$Flex} from "@react-spectrum/layout";
@@ -30,7 +30,7 @@ function $parcel$interopDefault(a) {
30
30
 
31
31
 
32
32
 
33
- function $b7ca5b4454a2009d$var$Field(props, ref) {
33
+ const $b7ca5b4454a2009d$export$a455218a85c89869 = /*#__PURE__*/ (0, $c6ZG4$react).forwardRef(function Field(props, ref) {
34
34
  let formProps = (0, $c6ZG4$useFormProps)(props);
35
35
  let isInForm = formProps !== props;
36
36
  props = formProps;
@@ -105,8 +105,7 @@ function $b7ca5b4454a2009d$var$Field(props, ref) {
105
105
  ref: ref,
106
106
  className: labelWrapperClass
107
107
  }, labelAndContextualHelp, renderChildren());
108
- }
109
- let $b7ca5b4454a2009d$export$a455218a85c89869 = /*#__PURE__*/ (0, $c6ZG4$react).forwardRef($b7ca5b4454a2009d$var$Field);
108
+ });
110
109
 
111
110
 
112
111
  export {$b7ca5b4454a2009d$export$a455218a85c89869 as Field};
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAaD,SAAS,4BAAM,KAAyB,EAAE,GAAqB;IAC7D,IAAI,YAAY,CAAA,GAAA,mBAAW,EAAE;IAC7B,IAAI,WAAW,cAAc;IAC7B,QAAQ;IACR,IAAI,SACF,KAAK,iBACL,gBAAgB,mBAChB,UAAU,cACV,UAAU,sBACV,kBAAkB,gDAClB,4CAA4C,mBAC5C,eAAe,aACf,SAAS,eACT,WAAW,gBACX,eAAe,CAAA,IAAK,EAAE,gBAAgB,CAAC,IAAI,CAAC,wBAC5C,gBAAgB,qBAChB,iBAAiB,cACjB,UAAU,iBACV,aAAa,kBACb,cAAc,YACd,QAAQ,cACR,aAAa,CAAC,qBACd,4DAA4D;IAC5D,mBAAmB,CAAC,sBACpB,oBAAoB,CAAC,gBACrB,WAAW,oBACX,gBAAgB,gBAChB,eAAe,CAAC,GAChB,GAAG,YACJ,GAAG;IACJ,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IACjC,IAAI,qBAAgC;IACpC,IAAI,OAAO,iBAAiB,YAC1B,qBAAqB,aAAa,QAAQ,oBAAoB,QAAQ,qBAAqB,OACvF,aAAa;mBACb;0BACA;2BACA;IACF,KACE;SAEJ,qBAAqB;IAEvB,IAAI,cAAc,CAAC,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AA,iBAAS,EAAE,CAAA,GAAA,4DAAU,GAAG;gBAC1C,IAAI;gBACJ,mBAAmB,CAAA,uBAAA,iCAAA,WAAY,EAAE,IAAG,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,EAAE,iBAAiB,CAAC,GAAG;YAC/E;QACF;OACC;IAMP,2FAA2F;IAC3F,+CAA+C;IACjD,IAAI,YAAY,kBAAkB,UAAU,SAAS,gBACnD,uCACE,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAU,GAAG;qBACtC,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAU,GAAG;OACrC;IAMT,qBACG,gCAAC;QACC,GAAG,UAAU;QACb,GAAG,YAAY;QAChB,KAAK;QACL,WAAW;OACV,wBACA;AAGP;AAEA,IAAI,0DAAS,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/label/src/Field.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 {classNames, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {Flex} from '@react-spectrum/layout';\nimport {HelpText} from './HelpText';\nimport {Label} from './Label';\nimport {LabelPosition, RefObject} from '@react-types/shared';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {mergeProps, useId} from '@react-aria/utils';\nimport React, {ReactNode, Ref} from 'react';\nimport {SpectrumFieldProps} from '@react-types/label';\nimport {useFormProps} from '@react-spectrum/form';\n\nfunction Field(props: SpectrumFieldProps, ref: Ref<HTMLElement>) {\n let formProps = useFormProps(props);\n let isInForm = formProps !== props;\n props = formProps;\n let {\n label,\n labelPosition = 'top' as LabelPosition,\n labelAlign,\n isRequired,\n necessityIndicator,\n includeNecessityIndicatorInAccessibilityName,\n validationState,\n isInvalid,\n description,\n errorMessage = e => e.validationErrors.join(' '),\n validationErrors,\n validationDetails,\n isDisabled,\n showErrorIcon,\n contextualHelp,\n children,\n labelProps = {},\n // Not every component that uses <Field> supports help text.\n descriptionProps = {},\n errorMessageProps = {},\n elementType,\n wrapperClassName,\n wrapperProps = {},\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let errorMessageString: ReactNode = null;\n if (typeof errorMessage === 'function') {\n errorMessageString = isInvalid != null && validationErrors != null && validationDetails != null\n ? errorMessage({\n isInvalid,\n validationErrors,\n validationDetails\n })\n : null;\n } else {\n errorMessageString = errorMessage;\n }\n let hasHelpText = !!description || errorMessageString && (isInvalid || validationState === 'invalid');\n let contextualHelpId = useId();\n\n let fallbackLabelPropsId = useId();\n if (label && contextualHelp && !labelProps.id) {\n labelProps.id = fallbackLabelPropsId;\n }\n\n let labelWrapperClass = classNames(\n labelStyles,\n 'spectrum-Field',\n {\n 'spectrum-Field--positionTop': labelPosition === 'top',\n 'spectrum-Field--positionSide': labelPosition === 'side',\n 'spectrum-Field--alignEnd': labelAlign === 'end',\n 'spectrum-Field--hasContextualHelp': !!props.contextualHelp\n },\n styleProps.className,\n wrapperClassName\n );\n\n children = React.cloneElement(children, mergeProps(children.props as any, {\n className: classNames(\n labelStyles,\n 'spectrum-Field-field'\n )\n }));\n\n let renderHelpText = () => (\n <HelpText\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n description={description}\n errorMessage={errorMessageString}\n validationState={validationState}\n isInvalid={isInvalid}\n isDisabled={isDisabled}\n showErrorIcon={showErrorIcon}\n gridArea={labelStyles.helpText} />\n );\n\n let renderChildren = () => {\n if (labelPosition === 'side') {\n return (\n <Flex direction=\"column\" UNSAFE_className={classNames(labelStyles, 'spectrum-Field-wrapper')}>\n {children}\n {hasHelpText && renderHelpText()}\n </Flex>\n );\n }\n\n return (\n <>\n {children}\n {hasHelpText && renderHelpText()}\n </>\n );\n };\n\n let labelAndContextualHelp = (\n <>\n {label && (\n <Label\n {...labelProps}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n isRequired={isRequired}\n necessityIndicator={necessityIndicator}\n includeNecessityIndicatorInAccessibilityName={includeNecessityIndicatorInAccessibilityName}\n elementType={elementType}>\n {label}\n </Label>\n )}\n {label && contextualHelp &&\n <SlotProvider\n slots={{\n actionButton: {\n UNSAFE_className: classNames(labelStyles, 'spectrum-Field-contextualHelp'),\n id: contextualHelpId,\n 'aria-labelledby': labelProps?.id ? `${labelProps.id} ${contextualHelpId}` : undefined\n }\n }}>\n {contextualHelp}\n </SlotProvider>\n }\n </>\n );\n\n // Need to add an extra wrapper for the label and contextual help if labelPosition is side,\n // so that the table layout works inside forms.\n if (isInForm && labelPosition === 'side' && label && contextualHelp) {\n labelAndContextualHelp = (\n <div className={classNames(labelStyles, 'spectrum-Field-labelCell')}>\n <div className={classNames(labelStyles, 'spectrum-Field-labelWrapper')}>\n {labelAndContextualHelp}\n </div>\n </div>\n );\n }\n\n return (\n (<div\n {...styleProps}\n {...wrapperProps}\n ref={ref as RefObject<HTMLDivElement | null>}\n className={labelWrapperClass}>\n {labelAndContextualHelp}\n {renderChildren()}\n </div>)\n );\n}\n\nlet _Field = React.forwardRef(Field);\nexport {_Field as Field};\n"],"names":[],"version":3,"file":"Field.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAaM,MAAM,0DAAQ,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,MAAM,KAAyB,EAAE,GAAqB;IACnG,IAAI,YAAY,CAAA,GAAA,mBAAW,EAAE;IAC7B,IAAI,WAAW,cAAc;IAC7B,QAAQ;IACR,IAAI,SACF,KAAK,iBAC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CAAC,CAAA,GAAA,yCAAO;YACN,kBAAkB;YAClB,mBAAmB;YACnB,aAAa;YACb,cAAc;YACd,iBAAiB;YACjB,WAAW;YACX,YAAY;YACZ,eAAe;YACf,UAAU,CAAA,GAAA,4DAAU,EAAE,QAAQ;;IAGlC,IAAI,iBAAiB;QACnB,IAAI,kBAAkB,QACpB,qBACE,gCAAC,CAAA,GAAA,WAAG;YAAE,WAAU;YAAS,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAU,GAAG;WAChE,UACA,eAAe;QAKtB,qBACE,kEACG,UACA,eAAe;IAGtB;IAEA,IAAI,uCACF,kEACG,uBACC,gCAAC,CAAA,GAAA,yCAAI;QACF,GAAG,UAAU;QACd,eAAe;QACf,YAAY;QACZ,YAAY;QACZ,oBAAoB;QACpB,8CAA8C;QAC9C,aAAa;OACZ,QAGJ,SAAS,gCACR,gCAAC,CAAA,GAAA,mBAAW;QACV,OAAO;YACL,cAAc;gBACZ,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAU,GAAG;gBAC1C,IAAI;gBACJ,mBAAmB,CAAA,uBAAA,iCAAA,WAAY,EAAE,IAAG,GAAG,WAAW,EAAE,CAAC,CAAC,EAAE,kBAAkB,GAAG;YAC/E;QACF;OACC;IAMP,2FAA2F;IAC3F,+CAA+C;IACjD,IAAI,YAAY,kBAAkB,UAAU,SAAS,gBACnD,uCACE,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAU,GAAG;qBACtC,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAU,GAAG;OACrC;IAMT,qBACG,gCAAC;QACC,GAAG,UAAU;QACb,GAAG,YAAY;QAChB,KAAK;QACL,WAAW;OACV,wBACA;AAGP","sources":["packages/@react-spectrum/label/src/Field.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 {classNames, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {Flex} from '@react-spectrum/layout';\nimport {HelpText} from './HelpText';\nimport {Label} from './Label';\nimport {LabelPosition, RefObject} from '@react-types/shared';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {mergeProps, useId} from '@react-aria/utils';\nimport React, {ReactNode, Ref} from 'react';\nimport {SpectrumFieldProps} from '@react-types/label';\nimport {useFormProps} from '@react-spectrum/form';\n\nexport const Field = React.forwardRef(function Field(props: SpectrumFieldProps, ref: Ref<HTMLElement>) {\n let formProps = useFormProps(props);\n let isInForm = formProps !== props;\n props = formProps;\n let {\n label,\n labelPosition = 'top' as LabelPosition,\n labelAlign,\n isRequired,\n necessityIndicator,\n includeNecessityIndicatorInAccessibilityName,\n validationState,\n isInvalid,\n description,\n errorMessage = e => e.validationErrors.join(' '),\n validationErrors,\n validationDetails,\n isDisabled,\n showErrorIcon,\n contextualHelp,\n children,\n labelProps = {},\n // Not every component that uses <Field> supports help text.\n descriptionProps = {},\n errorMessageProps = {},\n elementType,\n wrapperClassName,\n wrapperProps = {},\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let errorMessageString: ReactNode = null;\n if (typeof errorMessage === 'function') {\n errorMessageString = isInvalid != null && validationErrors != null && validationDetails != null\n ? errorMessage({\n isInvalid,\n validationErrors,\n validationDetails\n })\n : null;\n } else {\n errorMessageString = errorMessage;\n }\n let hasHelpText = !!description || errorMessageString && (isInvalid || validationState === 'invalid');\n let contextualHelpId = useId();\n\n let fallbackLabelPropsId = useId();\n if (label && contextualHelp && !labelProps.id) {\n labelProps.id = fallbackLabelPropsId;\n }\n\n let labelWrapperClass = classNames(\n labelStyles,\n 'spectrum-Field',\n {\n 'spectrum-Field--positionTop': labelPosition === 'top',\n 'spectrum-Field--positionSide': labelPosition === 'side',\n 'spectrum-Field--alignEnd': labelAlign === 'end',\n 'spectrum-Field--hasContextualHelp': !!props.contextualHelp\n },\n styleProps.className,\n wrapperClassName\n );\n\n children = React.cloneElement(children, mergeProps(children.props as any, {\n className: classNames(\n labelStyles,\n 'spectrum-Field-field'\n )\n }));\n\n let renderHelpText = () => (\n <HelpText\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n description={description}\n errorMessage={errorMessageString}\n validationState={validationState}\n isInvalid={isInvalid}\n isDisabled={isDisabled}\n showErrorIcon={showErrorIcon}\n gridArea={labelStyles.helpText} />\n );\n\n let renderChildren = () => {\n if (labelPosition === 'side') {\n return (\n <Flex direction=\"column\" UNSAFE_className={classNames(labelStyles, 'spectrum-Field-wrapper')}>\n {children}\n {hasHelpText && renderHelpText()}\n </Flex>\n );\n }\n\n return (\n <>\n {children}\n {hasHelpText && renderHelpText()}\n </>\n );\n };\n\n let labelAndContextualHelp = (\n <>\n {label && (\n <Label\n {...labelProps}\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n isRequired={isRequired}\n necessityIndicator={necessityIndicator}\n includeNecessityIndicatorInAccessibilityName={includeNecessityIndicatorInAccessibilityName}\n elementType={elementType}>\n {label}\n </Label>\n )}\n {label && contextualHelp &&\n <SlotProvider\n slots={{\n actionButton: {\n UNSAFE_className: classNames(labelStyles, 'spectrum-Field-contextualHelp'),\n id: contextualHelpId,\n 'aria-labelledby': labelProps?.id ? `${labelProps.id} ${contextualHelpId}` : undefined\n }\n }}>\n {contextualHelp}\n </SlotProvider>\n }\n </>\n );\n\n // Need to add an extra wrapper for the label and contextual help if labelPosition is side,\n // so that the table layout works inside forms.\n if (isInForm && labelPosition === 'side' && label && contextualHelp) {\n labelAndContextualHelp = (\n <div className={classNames(labelStyles, 'spectrum-Field-labelCell')}>\n <div className={classNames(labelStyles, 'spectrum-Field-labelWrapper')}>\n {labelAndContextualHelp}\n </div>\n </div>\n );\n }\n\n return (\n (<div\n {...styleProps}\n {...wrapperProps}\n ref={ref as RefObject<HTMLDivElement | null>}\n className={labelWrapperClass}>\n {labelAndContextualHelp}\n {renderChildren()}\n </div>)\n );\n});\n"],"names":[],"version":3,"file":"Field.module.js.map"}
@@ -28,7 +28,7 @@ $parcel$export(module.exports, "HelpText", () => $2d1b5114e5b358b6$export$a67c0b
28
28
 
29
29
 
30
30
 
31
- function $2d1b5114e5b358b6$var$HelpText(props, ref) {
31
+ const $2d1b5114e5b358b6$export$a67c0bc59081311a = /*#__PURE__*/ (0, ($parcel$interopDefault($7UMJk$react))).forwardRef(function HelpText(props, ref) {
32
32
  let { description: description, errorMessage: errorMessage, validationState: validationState, isInvalid: isInvalid, isDisabled: isDisabled, showErrorIcon: showErrorIcon, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = props;
33
33
  let domRef = (0, $7UMJk$reactspectrumutils.useDOMRef)(ref);
34
34
  let isErrorMessage = errorMessage && (isInvalid || validationState === 'invalid');
@@ -48,10 +48,7 @@ function $2d1b5114e5b358b6$var$HelpText(props, ref) {
48
48
  ...descriptionProps,
49
49
  className: (0, $7UMJk$reactspectrumutils.classNames)((0, ($parcel$interopDefault($680ab92507bf49aa$exports))), 'spectrum-HelpText-text')
50
50
  }, description));
51
- }
52
- /**
53
- * Help text provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms.
54
- */ const $2d1b5114e5b358b6$export$a67c0bc59081311a = /*#__PURE__*/ (0, ($parcel$interopDefault($7UMJk$react))).forwardRef($2d1b5114e5b358b6$var$HelpText);
51
+ });
55
52
 
56
53
 
57
54
  //# sourceMappingURL=HelpText.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAiBD,SAAS,+BAAS,KAAoB,EAAE,GAA2B;IACjE,IAAI,eACF,WAAW,gBACX,YAAY,mBACZ,eAAe,aACf,SAAS,cACT,UAAU,iBACV,aAAa,oBACb,gBAAgB,qBAChB,iBAAiB,EAClB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,iBAAiB,gBAAiB,CAAA,aAAa,oBAAoB,SAAQ;IAC/E,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,qBACE,0DAAC;QACE,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,qBACA,CAAC,mBAAmB,EAAE,iBAAiB,aAAa,UAAU,CAAC,EAC/D;YAAC,eAAe;QAAU,GAC1B,WAAW,SAAS;QAEtB,KAAK;OACJ,+BACC,sHACG,+BAAiB,0DAAC,CAAA,GAAA,2DAAU;QAAE,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;sBACpE,0DAAC;QAAK,GAAG,iBAAiB;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OACvD,+BAIL,0DAAC;QAAK,GAAG,gBAAgB;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OACtD;AAKX;AAEA;;CAEC,GACD,MAAM,0DAAY,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/label/src/HelpText.tsx"],"sourcesContent":["/*\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 AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumFieldValidation, SpectrumHelpTextProps, StyleProps, Validation} from '@react-types/shared';\nimport React, {HTMLAttributes, ReactNode} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/helptext/vars.css';\n\ninterface HelpTextProps extends Omit<SpectrumHelpTextProps, 'errorMessage'>, Omit<Validation<any>, 'validationState'>, SpectrumFieldValidation<any>, StyleProps {\n /** Props for the help text description element. */\n descriptionProps?: HTMLAttributes<HTMLElement>,\n /** Props for the help text error message element. */\n errorMessageProps?: HTMLAttributes<HTMLElement>,\n /** An error message for the field. */\n errorMessage?: ReactNode\n}\n\nfunction HelpText(props: HelpTextProps, ref: DOMRef<HTMLDivElement>) {\n let {\n description,\n errorMessage,\n validationState,\n isInvalid,\n isDisabled,\n showErrorIcon,\n descriptionProps,\n errorMessageProps\n } = props;\n let domRef = useDOMRef(ref);\n let isErrorMessage = errorMessage && (isInvalid || validationState === 'invalid');\n let {styleProps} = useStyleProps(props);\n\n return (\n <div\n {...styleProps}\n className={classNames(\n styles,\n 'spectrum-HelpText',\n `spectrum-HelpText--${isErrorMessage ? 'negative' : 'neutral'}`,\n {'is-disabled': isDisabled},\n styleProps.className\n )}\n ref={domRef}>\n {isErrorMessage ? (\n <>\n {showErrorIcon && <AlertMedium UNSAFE_className={classNames(styles, 'spectrum-HelpText-validationIcon')} />}\n <div {...errorMessageProps} className={classNames(styles, 'spectrum-HelpText-text')}>\n {errorMessage}\n </div>\n </>\n ) : (\n <div {...descriptionProps} className={classNames(styles, 'spectrum-HelpText-text')}>\n {description}\n </div>\n )}\n </div>\n );\n}\n\n/**\n * Help text provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms.\n */\nconst _HelpText = React.forwardRef(HelpText);\nexport {_HelpText as HelpText};\n"],"names":[],"version":3,"file":"HelpText.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAoBM,MAAM,0DAAW,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,SAAS,KAAoB,EAAE,GAA2B;IAC1G,IAAI,eACF,WAAW,gBACX,YAAY,mBACZ,eAAe,aACf,SAAS,cACT,UAAU,iBACV,aAAa,oBACb,gBAAgB,qBAChB,iBAAiB,EAClB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,iBAAiB,gBAAiB,CAAA,aAAa,oBAAoB,SAAQ;IAC/E,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,qBACE,0DAAC;QACE,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,qBACA,CAAC,mBAAmB,EAAE,iBAAiB,aAAa,WAAW,EAC/D;YAAC,eAAe;QAAU,GAC1B,WAAW,SAAS;QAEtB,KAAK;OACJ,+BACC,sHACG,+BAAiB,0DAAC,CAAA,GAAA,2DAAU;QAAE,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;sBACpE,0DAAC;QAAK,GAAG,iBAAiB;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OACvD,+BAIL,0DAAC;QAAK,GAAG,gBAAgB;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OACtD;AAKX","sources":["packages/@react-spectrum/label/src/HelpText.tsx"],"sourcesContent":["/*\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 AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumFieldValidation, SpectrumHelpTextProps, StyleProps, Validation} from '@react-types/shared';\nimport React, {HTMLAttributes, ReactNode} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/helptext/vars.css';\n\ninterface HelpTextProps extends Omit<SpectrumHelpTextProps, 'errorMessage'>, Omit<Validation<any>, 'validationState'>, SpectrumFieldValidation<any>, StyleProps {\n /** Props for the help text description element. */\n descriptionProps?: HTMLAttributes<HTMLElement>,\n /** Props for the help text error message element. */\n errorMessageProps?: HTMLAttributes<HTMLElement>,\n /** An error message for the field. */\n errorMessage?: ReactNode\n}\n\n/**\n * Help text provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms.\n */\nexport const HelpText = React.forwardRef(function HelpText(props: HelpTextProps, ref: DOMRef<HTMLDivElement>) {\n let {\n description,\n errorMessage,\n validationState,\n isInvalid,\n isDisabled,\n showErrorIcon,\n descriptionProps,\n errorMessageProps\n } = props;\n let domRef = useDOMRef(ref);\n let isErrorMessage = errorMessage && (isInvalid || validationState === 'invalid');\n let {styleProps} = useStyleProps(props);\n\n return (\n <div\n {...styleProps}\n className={classNames(\n styles,\n 'spectrum-HelpText',\n `spectrum-HelpText--${isErrorMessage ? 'negative' : 'neutral'}`,\n {'is-disabled': isDisabled},\n styleProps.className\n )}\n ref={domRef}>\n {isErrorMessage ? (\n <>\n {showErrorIcon && <AlertMedium UNSAFE_className={classNames(styles, 'spectrum-HelpText-validationIcon')} />}\n <div {...errorMessageProps} className={classNames(styles, 'spectrum-HelpText-text')}>\n {errorMessage}\n </div>\n </>\n ) : (\n <div {...descriptionProps} className={classNames(styles, 'spectrum-HelpText-text')}>\n {description}\n </div>\n )}\n </div>\n );\n});\n"],"names":[],"version":3,"file":"HelpText.main.js.map"}
package/dist/HelpText.mjs CHANGED
@@ -22,7 +22,7 @@ function $parcel$interopDefault(a) {
22
22
 
23
23
 
24
24
 
25
- function $8e50676506611310$var$HelpText(props, ref) {
25
+ const $8e50676506611310$export$a67c0bc59081311a = /*#__PURE__*/ (0, $huWmf$react).forwardRef(function HelpText(props, ref) {
26
26
  let { description: description, errorMessage: errorMessage, validationState: validationState, isInvalid: isInvalid, isDisabled: isDisabled, showErrorIcon: showErrorIcon, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = props;
27
27
  let domRef = (0, $huWmf$useDOMRef)(ref);
28
28
  let isErrorMessage = errorMessage && (isInvalid || validationState === 'invalid');
@@ -42,10 +42,7 @@ function $8e50676506611310$var$HelpText(props, ref) {
42
42
  ...descriptionProps,
43
43
  className: (0, $huWmf$classNames)((0, ($parcel$interopDefault($huWmf$helptext_vars_cssmodulejs))), 'spectrum-HelpText-text')
44
44
  }, description));
45
- }
46
- /**
47
- * Help text provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms.
48
- */ const $8e50676506611310$export$a67c0bc59081311a = /*#__PURE__*/ (0, $huWmf$react).forwardRef($8e50676506611310$var$HelpText);
45
+ });
49
46
 
50
47
 
51
48
  export {$8e50676506611310$export$a67c0bc59081311a as HelpText};
@@ -22,7 +22,7 @@ function $parcel$interopDefault(a) {
22
22
 
23
23
 
24
24
 
25
- function $8e50676506611310$var$HelpText(props, ref) {
25
+ const $8e50676506611310$export$a67c0bc59081311a = /*#__PURE__*/ (0, $huWmf$react).forwardRef(function HelpText(props, ref) {
26
26
  let { description: description, errorMessage: errorMessage, validationState: validationState, isInvalid: isInvalid, isDisabled: isDisabled, showErrorIcon: showErrorIcon, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = props;
27
27
  let domRef = (0, $huWmf$useDOMRef)(ref);
28
28
  let isErrorMessage = errorMessage && (isInvalid || validationState === 'invalid');
@@ -42,10 +42,7 @@ function $8e50676506611310$var$HelpText(props, ref) {
42
42
  ...descriptionProps,
43
43
  className: (0, $huWmf$classNames)((0, ($parcel$interopDefault($huWmf$helptext_vars_cssmodulejs))), 'spectrum-HelpText-text')
44
44
  }, description));
45
- }
46
- /**
47
- * Help text provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms.
48
- */ const $8e50676506611310$export$a67c0bc59081311a = /*#__PURE__*/ (0, $huWmf$react).forwardRef($8e50676506611310$var$HelpText);
45
+ });
49
46
 
50
47
 
51
48
  export {$8e50676506611310$export$a67c0bc59081311a as HelpText};
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAiBD,SAAS,+BAAS,KAAoB,EAAE,GAA2B;IACjE,IAAI,eACF,WAAW,gBACX,YAAY,mBACZ,eAAe,aACf,SAAS,cACT,UAAU,iBACV,aAAa,oBACb,gBAAgB,qBAChB,iBAAiB,EAClB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,iBAAiB,gBAAiB,CAAA,aAAa,oBAAoB,SAAQ;IAC/E,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IAEjC,qBACE,gCAAC;QACE,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,0DAAK,GACL,qBACA,CAAC,mBAAmB,EAAE,iBAAiB,aAAa,UAAU,CAAC,EAC/D;YAAC,eAAe;QAAU,GAC1B,WAAW,SAAS;QAEtB,KAAK;OACJ,+BACC,kEACG,+BAAiB,gCAAC,CAAA,GAAA,iCAAU;QAAE,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;sBACpE,gCAAC;QAAK,GAAG,iBAAiB;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;OACvD,+BAIL,gCAAC;QAAK,GAAG,gBAAgB;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;OACtD;AAKX;AAEA;;CAEC,GACD,MAAM,0DAAY,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/label/src/HelpText.tsx"],"sourcesContent":["/*\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 AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumFieldValidation, SpectrumHelpTextProps, StyleProps, Validation} from '@react-types/shared';\nimport React, {HTMLAttributes, ReactNode} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/helptext/vars.css';\n\ninterface HelpTextProps extends Omit<SpectrumHelpTextProps, 'errorMessage'>, Omit<Validation<any>, 'validationState'>, SpectrumFieldValidation<any>, StyleProps {\n /** Props for the help text description element. */\n descriptionProps?: HTMLAttributes<HTMLElement>,\n /** Props for the help text error message element. */\n errorMessageProps?: HTMLAttributes<HTMLElement>,\n /** An error message for the field. */\n errorMessage?: ReactNode\n}\n\nfunction HelpText(props: HelpTextProps, ref: DOMRef<HTMLDivElement>) {\n let {\n description,\n errorMessage,\n validationState,\n isInvalid,\n isDisabled,\n showErrorIcon,\n descriptionProps,\n errorMessageProps\n } = props;\n let domRef = useDOMRef(ref);\n let isErrorMessage = errorMessage && (isInvalid || validationState === 'invalid');\n let {styleProps} = useStyleProps(props);\n\n return (\n <div\n {...styleProps}\n className={classNames(\n styles,\n 'spectrum-HelpText',\n `spectrum-HelpText--${isErrorMessage ? 'negative' : 'neutral'}`,\n {'is-disabled': isDisabled},\n styleProps.className\n )}\n ref={domRef}>\n {isErrorMessage ? (\n <>\n {showErrorIcon && <AlertMedium UNSAFE_className={classNames(styles, 'spectrum-HelpText-validationIcon')} />}\n <div {...errorMessageProps} className={classNames(styles, 'spectrum-HelpText-text')}>\n {errorMessage}\n </div>\n </>\n ) : (\n <div {...descriptionProps} className={classNames(styles, 'spectrum-HelpText-text')}>\n {description}\n </div>\n )}\n </div>\n );\n}\n\n/**\n * Help text provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms.\n */\nconst _HelpText = React.forwardRef(HelpText);\nexport {_HelpText as HelpText};\n"],"names":[],"version":3,"file":"HelpText.module.js.map"}
1
+ {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAoBM,MAAM,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,SAAS,KAAoB,EAAE,GAA2B;IAC1G,IAAI,eACF,WAAW,gBACX,YAAY,mBACZ,eAAe,aACf,SAAS,cACT,UAAU,iBACV,aAAa,oBACb,gBAAgB,qBAChB,iBAAiB,EAClB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,iBAAiB,gBAAiB,CAAA,aAAa,oBAAoB,SAAQ;IAC/E,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IAEjC,qBACE,gCAAC;QACE,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,0DAAK,GACL,qBACA,CAAC,mBAAmB,EAAE,iBAAiB,aAAa,WAAW,EAC/D;YAAC,eAAe;QAAU,GAC1B,WAAW,SAAS;QAEtB,KAAK;OACJ,+BACC,kEACG,+BAAiB,gCAAC,CAAA,GAAA,iCAAU;QAAE,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;sBACpE,gCAAC;QAAK,GAAG,iBAAiB;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;OACvD,+BAIL,gCAAC;QAAK,GAAG,gBAAgB;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;OACtD;AAKX","sources":["packages/@react-spectrum/label/src/HelpText.tsx"],"sourcesContent":["/*\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 AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumFieldValidation, SpectrumHelpTextProps, StyleProps, Validation} from '@react-types/shared';\nimport React, {HTMLAttributes, ReactNode} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/helptext/vars.css';\n\ninterface HelpTextProps extends Omit<SpectrumHelpTextProps, 'errorMessage'>, Omit<Validation<any>, 'validationState'>, SpectrumFieldValidation<any>, StyleProps {\n /** Props for the help text description element. */\n descriptionProps?: HTMLAttributes<HTMLElement>,\n /** Props for the help text error message element. */\n errorMessageProps?: HTMLAttributes<HTMLElement>,\n /** An error message for the field. */\n errorMessage?: ReactNode\n}\n\n/**\n * Help text provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms.\n */\nexport const HelpText = React.forwardRef(function HelpText(props: HelpTextProps, ref: DOMRef<HTMLDivElement>) {\n let {\n description,\n errorMessage,\n validationState,\n isInvalid,\n isDisabled,\n showErrorIcon,\n descriptionProps,\n errorMessageProps\n } = props;\n let domRef = useDOMRef(ref);\n let isErrorMessage = errorMessage && (isInvalid || validationState === 'invalid');\n let {styleProps} = useStyleProps(props);\n\n return (\n <div\n {...styleProps}\n className={classNames(\n styles,\n 'spectrum-HelpText',\n `spectrum-HelpText--${isErrorMessage ? 'negative' : 'neutral'}`,\n {'is-disabled': isDisabled},\n styleProps.className\n )}\n ref={domRef}>\n {isErrorMessage ? (\n <>\n {showErrorIcon && <AlertMedium UNSAFE_className={classNames(styles, 'spectrum-HelpText-validationIcon')} />}\n <div {...errorMessageProps} className={classNames(styles, 'spectrum-HelpText-text')}>\n {errorMessage}\n </div>\n </>\n ) : (\n <div {...descriptionProps} className={classNames(styles, 'spectrum-HelpText-text')}>\n {description}\n </div>\n )}\n </div>\n );\n});\n"],"names":[],"version":3,"file":"HelpText.module.js.map"}
@@ -1,5 +1,5 @@
1
1
  var $503911526ad50850$exports = require("./intlStrings.main.js");
2
- require("./vars.d514c1fb.css");
2
+ require("./vars.6dc4ca00.css");
3
3
  var $eb2fc0ee655eff6b$exports = require("./fieldlabel_vars_css.main.js");
4
4
  var $cF5V3$spectrumiconsuiAsterisk = require("@spectrum-icons/ui/Asterisk");
5
5
  var $cF5V3$reactspectrumutils = require("@react-spectrum/utils");
@@ -36,7 +36,7 @@ $parcel$export(module.exports, "Label", () => $38a9afbd39356629$export$b04be29aa
36
36
 
37
37
 
38
38
 
39
- function $38a9afbd39356629$var$Label(props, ref) {
39
+ const $38a9afbd39356629$export$b04be29aa201d4f5 = /*#__PURE__*/ (0, ($parcel$interopDefault($cF5V3$react))).forwardRef(function Label(props, ref) {
40
40
  props = (0, $cF5V3$reactspectrumprovider.useProviderProps)(props);
41
41
  let { children: children, labelPosition: labelPosition = 'top', labelAlign: labelAlign = labelPosition === 'side' ? 'start' : null, isRequired: isRequired, necessityIndicator: necessityIndicator = isRequired != null ? 'icon' : null, includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName = false, htmlFor: htmlFor, for: labelFor, elementType: ElementType = 'label', onClick: onClick, ...otherProps } = props;
42
42
  let domRef = (0, $cF5V3$reactspectrumutils.useDOMRef)(ref);
@@ -61,8 +61,7 @@ function $38a9afbd39356629$var$Label(props, ref) {
61
61
  }, children, (necessityIndicator === 'label' || necessityIndicator === 'icon' && isRequired) && ' \u200b', necessityIndicator === 'label' && /*#__PURE__*/ (0, ($parcel$interopDefault($cF5V3$react))).createElement("span", {
62
62
  "aria-hidden": !includeNecessityIndicatorInAccessibilityName ? isRequired : undefined
63
63
  }, necessityLabel), necessityIndicator === 'icon' && isRequired && icon);
64
- }
65
- let $38a9afbd39356629$export$b04be29aa201d4f5 = /*#__PURE__*/ (0, ($parcel$interopDefault($cF5V3$react))).forwardRef($38a9afbd39356629$var$Label);
64
+ });
66
65
 
67
66
 
68
67
  //# sourceMappingURL=Label.main.js.map
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAcD,SAAS,4BAAM,KAAyB,EAAE,GAA6B;IACrE,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,YACF,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,kBAAkB,SAAS,UAAU,kBAClD,UAAU,sBACV,qBAAqB,cAAc,OAAO,SAAS,oDACnD,+CAA+C,gBAC/C,OAAO,EACP,KAAK,QAAQ,EACb,aAAa,cAAc,OAAO,WAClC,OAAO,EACP,GAAG,YACJ,GAAG;IAEJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,iBAAiB,aAAa,gBAAgB,MAAM,CAAC,gBAAgB,gBAAgB,MAAM,CAAC;IAChG,IAAI,qBACF,0DAAC,CAAA,GAAA,wDAAO;QACN,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QACrC,cAAY,+CAA+C,gBAAgB,MAAM,CAAC,gBAAgB;;IAGtG,IAAI,kBAAkB,CAAA,GAAA,oCAAS,EAC7B,CAAA,GAAA,mDAAK,GACL,uBACA;QACE,qCAAqC,kBAAkB;QACvD,iCAAiC,eAAe;IAClD,GACA,WAAW,SAAS;IAGtB,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACd,SAAS;QACT,KAAK;QACL,WAAW;QACX,SAAS,gBAAgB,UAAU,YAAY,UAAU;OACxD,UACA,AAAC,CAAA,uBAAuB,WAAY,uBAAuB,UAAU,UAAU,KAAM,WAIrF,uBAAuB,yBAAW,0DAAC;QAAK,eAAa,CAAC,+CAA+C,aAAa;OAAY,iBAC9H,uBAAuB,UAAU,cAAc;AAGtD;AAEA,IAAI,0DAAS,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/label/src/Label.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 Asterisk from '@spectrum-icons/ui/Asterisk';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React from 'react';\nimport {SpectrumLabelProps} from '@react-types/label';\nimport styles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction Label(props: SpectrumLabelProps, ref: DOMRef<HTMLLabelElement>) {\n props = useProviderProps(props);\n let {\n children,\n labelPosition = 'top',\n labelAlign = labelPosition === 'side' ? 'start' : null,\n isRequired,\n necessityIndicator = isRequired != null ? 'icon' : null,\n includeNecessityIndicatorInAccessibilityName = false,\n htmlFor,\n for: labelFor,\n elementType: ElementType = 'label',\n onClick,\n ...otherProps\n } = props;\n\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/label');\n let necessityLabel = isRequired ? stringFormatter.format('(required)') : stringFormatter.format('(optional)');\n let icon = (\n <Asterisk\n UNSAFE_className={classNames(styles, 'spectrum-FieldLabel-requiredIcon')}\n aria-label={includeNecessityIndicatorInAccessibilityName ? stringFormatter.format('(required)') : undefined} />\n );\n\n let labelClassNames = classNames(\n styles,\n 'spectrum-FieldLabel',\n {\n 'spectrum-FieldLabel--positionSide': labelPosition === 'side',\n 'spectrum-FieldLabel--alignEnd': labelAlign === 'end'\n },\n styleProps.className\n );\n\n return (\n <ElementType\n {...filterDOMProps(otherProps)}\n {...styleProps}\n onClick={onClick}\n ref={domRef}\n className={labelClassNames}\n htmlFor={ElementType === 'label' ? labelFor || htmlFor : undefined}>\n {children}\n {(necessityIndicator === 'label' || (necessityIndicator === 'icon' && isRequired)) && ' \\u200b'}\n {/* necessityLabel is hidden to screen readers if the field is required because\n * aria-required is set on the field in that case. That will already be announced,\n * so no need to duplicate it here. If optional, we do want it to be announced here. */}\n {necessityIndicator === 'label' && <span aria-hidden={!includeNecessityIndicatorInAccessibilityName ? isRequired : undefined}>{necessityLabel}</span>}\n {necessityIndicator === 'icon' && isRequired && icon}\n </ElementType>\n );\n}\n\nlet _Label = React.forwardRef(Label);\nexport {_Label as Label};\n"],"names":[],"version":3,"file":"Label.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAcM,MAAM,0DAAQ,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,MAAM,KAAyB,EAAE,GAA6B;IAC3G,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,YACF,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,kBAAkB,SAAS,UAAU,kBAClD,UAAU,sBACV,qBAAqB,cAAc,OAAO,SAAS,oDACnD,+CAA+C,gBAC/C,OAAO,EACP,KAAK,QAAQ,EACb,aAAa,cAAc,OAAO,WAClC,OAAO,EACP,GAAG,YACJ,GAAG;IAEJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,iBAAiB,aAAa,gBAAgB,MAAM,CAAC,gBAAgB,gBAAgB,MAAM,CAAC;IAChG,IAAI,qBACF,0DAAC,CAAA,GAAA,wDAAO;QACN,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QACrC,cAAY,+CAA+C,gBAAgB,MAAM,CAAC,gBAAgB;;IAGtG,IAAI,kBAAkB,CAAA,GAAA,oCAAS,EAC7B,CAAA,GAAA,mDAAK,GACL,uBACA;QACE,qCAAqC,kBAAkB;QACvD,iCAAiC,eAAe;IAClD,GACA,WAAW,SAAS;IAGtB,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACd,SAAS;QACT,KAAK;QACL,WAAW;QACX,SAAS,gBAAgB,UAAU,YAAY,UAAU;OACxD,UACA,AAAC,CAAA,uBAAuB,WAAY,uBAAuB,UAAU,UAAU,KAAM,WAIrF,uBAAuB,yBAAW,0DAAC;QAAK,eAAa,CAAC,+CAA+C,aAAa;OAAY,iBAC9H,uBAAuB,UAAU,cAAc;AAGtD","sources":["packages/@react-spectrum/label/src/Label.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 Asterisk from '@spectrum-icons/ui/Asterisk';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React from 'react';\nimport {SpectrumLabelProps} from '@react-types/label';\nimport styles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nexport const Label = React.forwardRef(function Label(props: SpectrumLabelProps, ref: DOMRef<HTMLLabelElement>) {\n props = useProviderProps(props);\n let {\n children,\n labelPosition = 'top',\n labelAlign = labelPosition === 'side' ? 'start' : null,\n isRequired,\n necessityIndicator = isRequired != null ? 'icon' : null,\n includeNecessityIndicatorInAccessibilityName = false,\n htmlFor,\n for: labelFor,\n elementType: ElementType = 'label',\n onClick,\n ...otherProps\n } = props;\n\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/label');\n let necessityLabel = isRequired ? stringFormatter.format('(required)') : stringFormatter.format('(optional)');\n let icon = (\n <Asterisk\n UNSAFE_className={classNames(styles, 'spectrum-FieldLabel-requiredIcon')}\n aria-label={includeNecessityIndicatorInAccessibilityName ? stringFormatter.format('(required)') : undefined} />\n );\n\n let labelClassNames = classNames(\n styles,\n 'spectrum-FieldLabel',\n {\n 'spectrum-FieldLabel--positionSide': labelPosition === 'side',\n 'spectrum-FieldLabel--alignEnd': labelAlign === 'end'\n },\n styleProps.className\n );\n\n return (\n <ElementType\n {...filterDOMProps(otherProps)}\n {...styleProps}\n onClick={onClick}\n ref={domRef}\n className={labelClassNames}\n htmlFor={ElementType === 'label' ? labelFor || htmlFor : undefined}>\n {children}\n {(necessityIndicator === 'label' || (necessityIndicator === 'icon' && isRequired)) && ' \\u200b'}\n {/* necessityLabel is hidden to screen readers if the field is required because\n * aria-required is set on the field in that case. That will already be announced,\n * so no need to duplicate it here. If optional, we do want it to be announced here. */}\n {necessityIndicator === 'label' && <span aria-hidden={!includeNecessityIndicatorInAccessibilityName ? isRequired : undefined}>{necessityLabel}</span>}\n {necessityIndicator === 'icon' && isRequired && icon}\n </ElementType>\n );\n});\n"],"names":[],"version":3,"file":"Label.main.js.map"}
package/dist/Label.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import $fTVpI$intlStringsmodulejs from "./intlStrings.mjs";
2
- import "./vars.d514c1fb.css";
2
+ import "./vars.6dc4ca00.css";
3
3
  import $fTVpI$fieldlabel_vars_cssmodulejs from "./fieldlabel_vars_css.mjs";
4
4
  import $fTVpI$spectrumiconsuiAsterisk from "@spectrum-icons/ui/Asterisk";
5
5
  import {useDOMRef as $fTVpI$useDOMRef, useStyleProps as $fTVpI$useStyleProps, classNames as $fTVpI$classNames} from "@react-spectrum/utils";
@@ -30,7 +30,7 @@ function $parcel$interopDefault(a) {
30
30
 
31
31
 
32
32
 
33
- function $00af9ba397a66f43$var$Label(props, ref) {
33
+ const $00af9ba397a66f43$export$b04be29aa201d4f5 = /*#__PURE__*/ (0, $fTVpI$react).forwardRef(function Label(props, ref) {
34
34
  props = (0, $fTVpI$useProviderProps)(props);
35
35
  let { children: children, labelPosition: labelPosition = 'top', labelAlign: labelAlign = labelPosition === 'side' ? 'start' : null, isRequired: isRequired, necessityIndicator: necessityIndicator = isRequired != null ? 'icon' : null, includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName = false, htmlFor: htmlFor, for: labelFor, elementType: ElementType = 'label', onClick: onClick, ...otherProps } = props;
36
36
  let domRef = (0, $fTVpI$useDOMRef)(ref);
@@ -55,8 +55,7 @@ function $00af9ba397a66f43$var$Label(props, ref) {
55
55
  }, children, (necessityIndicator === 'label' || necessityIndicator === 'icon' && isRequired) && ' \u200b', necessityIndicator === 'label' && /*#__PURE__*/ (0, $fTVpI$react).createElement("span", {
56
56
  "aria-hidden": !includeNecessityIndicatorInAccessibilityName ? isRequired : undefined
57
57
  }, necessityLabel), necessityIndicator === 'icon' && isRequired && icon);
58
- }
59
- let $00af9ba397a66f43$export$b04be29aa201d4f5 = /*#__PURE__*/ (0, $fTVpI$react).forwardRef($00af9ba397a66f43$var$Label);
58
+ });
60
59
 
61
60
 
62
61
  export {$00af9ba397a66f43$export$b04be29aa201d4f5 as Label};
@@ -1,5 +1,5 @@
1
1
  import $fTVpI$intlStringsmodulejs from "./intlStrings.module.js";
2
- import "./vars.d514c1fb.css";
2
+ import "./vars.6dc4ca00.css";
3
3
  import $fTVpI$fieldlabel_vars_cssmodulejs from "./fieldlabel_vars_css.module.js";
4
4
  import $fTVpI$spectrumiconsuiAsterisk from "@spectrum-icons/ui/Asterisk";
5
5
  import {useDOMRef as $fTVpI$useDOMRef, useStyleProps as $fTVpI$useStyleProps, classNames as $fTVpI$classNames} from "@react-spectrum/utils";
@@ -30,7 +30,7 @@ function $parcel$interopDefault(a) {
30
30
 
31
31
 
32
32
 
33
- function $00af9ba397a66f43$var$Label(props, ref) {
33
+ const $00af9ba397a66f43$export$b04be29aa201d4f5 = /*#__PURE__*/ (0, $fTVpI$react).forwardRef(function Label(props, ref) {
34
34
  props = (0, $fTVpI$useProviderProps)(props);
35
35
  let { children: children, labelPosition: labelPosition = 'top', labelAlign: labelAlign = labelPosition === 'side' ? 'start' : null, isRequired: isRequired, necessityIndicator: necessityIndicator = isRequired != null ? 'icon' : null, includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName = false, htmlFor: htmlFor, for: labelFor, elementType: ElementType = 'label', onClick: onClick, ...otherProps } = props;
36
36
  let domRef = (0, $fTVpI$useDOMRef)(ref);
@@ -55,8 +55,7 @@ function $00af9ba397a66f43$var$Label(props, ref) {
55
55
  }, children, (necessityIndicator === 'label' || necessityIndicator === 'icon' && isRequired) && ' \u200b', necessityIndicator === 'label' && /*#__PURE__*/ (0, $fTVpI$react).createElement("span", {
56
56
  "aria-hidden": !includeNecessityIndicatorInAccessibilityName ? isRequired : undefined
57
57
  }, necessityLabel), necessityIndicator === 'icon' && isRequired && icon);
58
- }
59
- let $00af9ba397a66f43$export$b04be29aa201d4f5 = /*#__PURE__*/ (0, $fTVpI$react).forwardRef($00af9ba397a66f43$var$Label);
58
+ });
60
59
 
61
60
 
62
61
  export {$00af9ba397a66f43$export$b04be29aa201d4f5 as Label};
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAcD,SAAS,4BAAM,KAAyB,EAAE,GAA6B;IACrE,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,YACF,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,kBAAkB,SAAS,UAAU,kBAClD,UAAU,sBACV,qBAAqB,cAAc,OAAO,SAAS,oDACnD,+CAA+C,gBAC/C,OAAO,EACP,KAAK,QAAQ,EACb,aAAa,cAAc,OAAO,WAClC,OAAO,EACP,GAAG,YACJ,GAAG;IAEJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IAEjC,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,oDAAW,GAAG;IAChE,IAAI,iBAAiB,aAAa,gBAAgB,MAAM,CAAC,gBAAgB,gBAAgB,MAAM,CAAC;IAChG,IAAI,qBACF,gCAAC,CAAA,GAAA,8BAAO;QACN,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAK,GAAG;QACrC,cAAY,+CAA+C,gBAAgB,MAAM,CAAC,gBAAgB;;IAGtG,IAAI,kBAAkB,CAAA,GAAA,iBAAS,EAC7B,CAAA,GAAA,4DAAK,GACL,uBACA;QACE,qCAAqC,kBAAkB;QACvD,iCAAiC,eAAe;IAClD,GACA,WAAW,SAAS;IAGtB,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACd,SAAS;QACT,KAAK;QACL,WAAW;QACX,SAAS,gBAAgB,UAAU,YAAY,UAAU;OACxD,UACA,AAAC,CAAA,uBAAuB,WAAY,uBAAuB,UAAU,UAAU,KAAM,WAIrF,uBAAuB,yBAAW,gCAAC;QAAK,eAAa,CAAC,+CAA+C,aAAa;OAAY,iBAC9H,uBAAuB,UAAU,cAAc;AAGtD;AAEA,IAAI,0DAAS,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC","sources":["packages/@react-spectrum/label/src/Label.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 Asterisk from '@spectrum-icons/ui/Asterisk';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React from 'react';\nimport {SpectrumLabelProps} from '@react-types/label';\nimport styles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nfunction Label(props: SpectrumLabelProps, ref: DOMRef<HTMLLabelElement>) {\n props = useProviderProps(props);\n let {\n children,\n labelPosition = 'top',\n labelAlign = labelPosition === 'side' ? 'start' : null,\n isRequired,\n necessityIndicator = isRequired != null ? 'icon' : null,\n includeNecessityIndicatorInAccessibilityName = false,\n htmlFor,\n for: labelFor,\n elementType: ElementType = 'label',\n onClick,\n ...otherProps\n } = props;\n\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/label');\n let necessityLabel = isRequired ? stringFormatter.format('(required)') : stringFormatter.format('(optional)');\n let icon = (\n <Asterisk\n UNSAFE_className={classNames(styles, 'spectrum-FieldLabel-requiredIcon')}\n aria-label={includeNecessityIndicatorInAccessibilityName ? stringFormatter.format('(required)') : undefined} />\n );\n\n let labelClassNames = classNames(\n styles,\n 'spectrum-FieldLabel',\n {\n 'spectrum-FieldLabel--positionSide': labelPosition === 'side',\n 'spectrum-FieldLabel--alignEnd': labelAlign === 'end'\n },\n styleProps.className\n );\n\n return (\n <ElementType\n {...filterDOMProps(otherProps)}\n {...styleProps}\n onClick={onClick}\n ref={domRef}\n className={labelClassNames}\n htmlFor={ElementType === 'label' ? labelFor || htmlFor : undefined}>\n {children}\n {(necessityIndicator === 'label' || (necessityIndicator === 'icon' && isRequired)) && ' \\u200b'}\n {/* necessityLabel is hidden to screen readers if the field is required because\n * aria-required is set on the field in that case. That will already be announced,\n * so no need to duplicate it here. If optional, we do want it to be announced here. */}\n {necessityIndicator === 'label' && <span aria-hidden={!includeNecessityIndicatorInAccessibilityName ? isRequired : undefined}>{necessityLabel}</span>}\n {necessityIndicator === 'icon' && isRequired && icon}\n </ElementType>\n );\n}\n\nlet _Label = React.forwardRef(Label);\nexport {_Label as Label};\n"],"names":[],"version":3,"file":"Label.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAcM,MAAM,0DAAQ,CA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label.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 Asterisk from '@spectrum-icons/ui/Asterisk';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React from 'react';\nimport {SpectrumLabelProps} from '@react-types/label';\nimport styles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nexport const Label = React.forwardRef(function Label(props: SpectrumLabelProps, ref: DOMRef<HTMLLabelElement>) {\n props = useProviderProps(props);\n let {\n children,\n labelPosition = 'top',\n labelAlign = labelPosition === 'side' ? 'start' : null,\n isRequired,\n necessityIndicator = isRequired != null ? 'icon' : null,\n includeNecessityIndicatorInAccessibilityName = false,\n htmlFor,\n for: labelFor,\n elementType: ElementType = 'label',\n onClick,\n ...otherProps\n } = props;\n\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/label');\n let necessityLabel = isRequired ? stringFormatter.format('(required)') : stringFormatter.format('(optional)');\n let icon = (\n <Asterisk\n UNSAFE_className={classNames(styles, 'spectrum-FieldLabel-requiredIcon')}\n aria-label={includeNecessityIndicatorInAccessibilityName ? stringFormatter.format('(required)') : undefined} />\n );\n\n let labelClassNames = classNames(\n styles,\n 'spectrum-FieldLabel',\n {\n 'spectrum-FieldLabel--positionSide': labelPosition === 'side',\n 'spectrum-FieldLabel--alignEnd': labelAlign === 'end'\n },\n styleProps.className\n );\n\n return (\n <ElementType\n {...filterDOMProps(otherProps)}\n {...styleProps}\n onClick={onClick}\n ref={domRef}\n className={labelClassNames}\n htmlFor={ElementType === 'label' ? labelFor || htmlFor : undefined}>\n {children}\n {(necessityIndicator === 'label' || (necessityIndicator === 'icon' && isRequired)) && ' \\u200b'}\n {/* necessityLabel is hidden to screen readers if the field is required because\n * aria-required is set on the field in that case. That will already be announced,\n * so no need to duplicate it here. If optional, we do want it to be announced here. */}\n {necessityIndicator === 'label' && <span aria-hidden={!includeNecessityIndicatorInAccessibilityName ? isRequired : undefined}>{necessityLabel}</span>}\n {necessityIndicator === 'icon' && isRequired && icon}\n </ElementType>\n );\n});\n"],"names":[],"version":3,"file":"Label.module.js.map"}
@@ -1 +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"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA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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"}
@@ -1 +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"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA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@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"}
@@ -1 +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;AAVA,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAAuC,CAAC,0BAA0B,EAAE,0CAA0C,CAAC;AAC/G,4CAA8C,CAAC,gCAAgC,CAAC;AAChF,4CAAsC,CAAC,wBAAwB,CAAC;AAChE,4CAAgD,CAAC,kCAAkC,CAAC;AACpF,yCAA+C,CAAC,iCAAiC,CAAC;AAClF,4CAA2C,CAAC,6BAA6B,CAAC;AAC1E,4CAAqD,CAAC,uCAAuC,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/helptext/vars.css"],"sourcesContent":["/*\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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"helptext_vars_css.main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAVA,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAAuC,CAAC,0BAA0B,EAAE,2CAA2C;AAC/G,4CAA8C,CAAC,gCAAgC,CAAC;AAChF,4CAAsC,CAAC,wBAAwB,CAAC;AAChE,4CAAgD,CAAC,kCAAkC,CAAC;AACpF,yCAA+C,CAAC,iCAAiC,CAAC;AAClF,4CAA2C,CAAC,6BAA6B,CAAC;AAC1E,4CAAqD,CAAC,uCAAuC,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/helptext/vars.css"],"sourcesContent":["/*\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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"helptext_vars_css.main.js.map"}
@@ -1 +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;AAVA,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAAuC,CAAC,0BAA0B,EAAE,0CAA0C,CAAC;AAC/G,4CAA8C,CAAC,gCAAgC,CAAC;AAChF,4CAAsC,CAAC,wBAAwB,CAAC;AAChE,4CAAgD,CAAC,kCAAkC,CAAC;AACpF,yCAA+C,CAAC,iCAAiC,CAAC;AAClF,4CAA2C,CAAC,6BAA6B,CAAC;AAC1E,4CAAqD,CAAC,uCAAuC,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/helptext/vars.css"],"sourcesContent":["/*\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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"helptext_vars_css.module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;AAAA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AAVA,4CAA+B,CAAC,iBAAiB,CAAC;AAClD,4CAAmC,CAAC,qBAAqB,CAAC;AAC1D,4CAAgC,CAAC,kBAAkB,CAAC;AACpD,4CAA4C,CAAC,8BAA8B,CAAC;AAC5E,4CAAuC,CAAC,0BAA0B,EAAE,2CAA2C;AAC/G,4CAA8C,CAAC,gCAAgC,CAAC;AAChF,4CAAsC,CAAC,wBAAwB,CAAC;AAChE,4CAAgD,CAAC,kCAAkC,CAAC;AACpF,yCAA+C,CAAC,iCAAiC,CAAC;AAClF,4CAA2C,CAAC,6BAA6B,CAAC;AAC1E,4CAAqD,CAAC,uCAAuC,CAAC","sources":["packages/@adobe/spectrum-css-temp/components/helptext/vars.css"],"sourcesContent":["/*\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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"helptext_vars_css.module.js.map"}
package/dist/types.d.ts CHANGED
@@ -13,7 +13,7 @@ interface HelpTextProps extends Omit<SpectrumHelpTextProps, 'errorMessage'>, Omi
13
13
  * Help text provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms.
14
14
  */
15
15
  export const HelpText: React.ForwardRefExoticComponent<HelpTextProps & React.RefAttributes<DOMRefValue<HTMLDivElement>>>;
16
- export let Label: React.ForwardRefExoticComponent<SpectrumLabelProps & React.RefAttributes<DOMRefValue<HTMLLabelElement>>>;
17
- export let Field: React.ForwardRefExoticComponent<SpectrumFieldProps & React.RefAttributes<HTMLElement>>;
16
+ export const Label: React.ForwardRefExoticComponent<SpectrumLabelProps & React.RefAttributes<DOMRefValue<HTMLLabelElement>>>;
17
+ export const Field: React.ForwardRefExoticComponent<SpectrumFieldProps & React.RefAttributes<HTMLElement>>;
18
18
 
19
19
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"mappings":";;;AAkBA,uBAAwB,SAAQ,IAAI,CAAC,qBAAqB,EAAE,cAAc,CAAC,EAAE,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,iBAAiB,CAAC,EAAE,wBAAwB,GAAG,CAAC,EAAE,UAAU;IAC7J,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,eAAe,WAAW,CAAC,CAAC;IAC/C,qDAAqD;IACrD,iBAAiB,CAAC,EAAE,eAAe,WAAW,CAAC,CAAC;IAChD,sCAAsC;IACtC,YAAY,CAAC,EAAE,SAAS,CAAA;CACzB;AA4CD;;GAEG;AACH,OAAA,MAAM,2GAAsC,CAAC;ACQ7C,OAAA,IAAI,+GAAgC,CAAC;ACkGrC,OAAA,IAAI,6FAAgC,CAAC","sources":["packages/@react-spectrum/label/src/packages/@react-spectrum/label/src/HelpText.tsx","packages/@react-spectrum/label/src/packages/@react-spectrum/label/src/Label.tsx","packages/@react-spectrum/label/src/packages/@react-spectrum/label/src/Field.tsx","packages/@react-spectrum/label/src/packages/@react-spectrum/label/src/index.ts","packages/@react-spectrum/label/src/index.ts"],"sourcesContent":[null,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\n/// <reference types=\"css-module-types\" />\n\nexport {Field} from './Field';\nexport {Label} from './Label';\nexport {HelpText} from './HelpText';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":";;;AAkBA,uBAAwB,SAAQ,IAAI,CAAC,qBAAqB,EAAE,cAAc,CAAC,EAAE,IAAI,CAAC,WAAW,GAAG,CAAC,EAAE,iBAAiB,CAAC,EAAE,wBAAwB,GAAG,CAAC,EAAE,UAAU;IAC7J,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,eAAe,WAAW,CAAC,CAAC;IAC/C,qDAAqD;IACrD,iBAAiB,CAAC,EAAE,eAAe,WAAW,CAAC,CAAC;IAChD,sCAAsC;IACtC,YAAY,CAAC,EAAE,SAAS,CAAA;CACzB;AAED;;GAEG;AACH,OAAO,MAAM,2GAwCX,CAAC;AC9CH,OAAO,MAAM,+GAsDX,CAAC;ACvDH,OAAO,MAAM,6FAyJX,CAAC","sources":["packages/@react-spectrum/label/src/packages/@react-spectrum/label/src/HelpText.tsx","packages/@react-spectrum/label/src/packages/@react-spectrum/label/src/Label.tsx","packages/@react-spectrum/label/src/packages/@react-spectrum/label/src/Field.tsx","packages/@react-spectrum/label/src/packages/@react-spectrum/label/src/index.ts","packages/@react-spectrum/label/src/index.ts"],"sourcesContent":[null,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\n/// <reference types=\"css-module-types\" />\n\nexport {Field} from './Field';\nexport {Label} from './Label';\nexport {HelpText} from './HelpText';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
@@ -152,9 +152,9 @@
152
152
  }
153
153
 
154
154
  .jIQVGq_spectrum-Field:where(.jIQVGq_spectrum-Field--positionSide) .jIQVGq_spectrum-Field-wrapper {
155
+ min-width: 0;
155
156
  width: var(--spectrum-field-default-width);
156
157
  flex: 1;
157
- min-width: 0;
158
158
  height: 100%;
159
159
  }
160
160
 
@@ -214,8 +214,8 @@
214
214
  }
215
215
 
216
216
  .jIQVGq_spectrum-Form.jIQVGq_spectrum-Form--positionSide .jIQVGq_spectrum-Field-field {
217
- min-width: var(--spectrum-alias-single-line-width, var(--spectrum-global-dimension-size-2400));
218
217
  width: auto;
218
+ min-width: var(--spectrum-alias-single-line-width, var(--spectrum-global-dimension-size-2400));
219
219
  }
220
220
 
221
221
  .jIQVGq_spectrum-Form.jIQVGq_spectrum-Form--positionTop {
@@ -268,4 +268,4 @@
268
268
  :is(.jIQVGq_spectrum-FieldLabel, .jIQVGq_spectrum-Form-itemLabel).jIQVGq_is-disabled {
269
269
  color: var(--spectrum-fieldlabel-text-color-disabled, var(--spectrum-alias-text-color-disabled));
270
270
  }
271
- /*# sourceMappingURL=vars.d514c1fb.css.map */
271
+ /*# sourceMappingURL=vars.6dc4ca00.css.map */
@@ -1 +1 @@
1
- {"mappings":"AA4DA;;;;;AAIE;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAIA;;;;AAQA;;;;AAIA;;;;AAKF;;;;;;;;AAOE;;;;;;;;;;;AAqBE;;;;;AAQF;;;;AAKE;;;;;AAOJ;EACE;;;;EAIE;;;;;AAMJ;;;;;;;;;;;;;;;;AAsBA;;;;;;AAMA;;;;;;;AAOA;;;;;AAUA;;;;;AAIE;;;;;;AAMA;;;;;;;;;;AAUE;;;;;AAMA;;;;AAIA;;;;AAOF;;;;;AAKE;;;;;;;AAaE;;;;AAMF;;;;;AAKA;;;;;AAOA;;;;AAaF;;;;;;;;AAOE;;;;;AAME;;;;AAKA;;;;AAKA;;;;AAKA;;;;AAGE;;;;AAMJ;;;;AAIA;;;;;AAOF;;;;;;;AASE;;;;;AASF;;;;AAGE;;;;;;AAOF;;;;AAIA;;;;AAIA;;;;AAIA;;;;;AAKA;;;;AAkBF;;;;AAIE","sources":["packages/@adobe/spectrum-css-temp/components/fieldlabel/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"vars.d514c1fb.css.map"}
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.6dc4ca00.css.map"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/label",
3
- "version": "3.16.9",
3
+ "version": "3.16.11",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,14 +36,14 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/i18n": "^3.12.3",
40
- "@react-aria/utils": "^3.25.3",
41
- "@react-spectrum/form": "^3.7.9",
42
- "@react-spectrum/layout": "^3.6.9",
43
- "@react-spectrum/utils": "^3.11.11",
44
- "@react-types/label": "^3.9.6",
45
- "@react-types/shared": "^3.25.0",
46
- "@spectrum-icons/ui": "^3.6.10",
39
+ "@react-aria/i18n": "^3.12.5",
40
+ "@react-aria/utils": "^3.27.0",
41
+ "@react-spectrum/form": "^3.7.11",
42
+ "@react-spectrum/layout": "^3.6.11",
43
+ "@react-spectrum/utils": "^3.12.1",
44
+ "@react-types/label": "^3.9.8",
45
+ "@react-types/shared": "^3.27.0",
46
+ "@spectrum-icons/ui": "^3.6.12",
47
47
  "@swc/helpers": "^0.5.0"
48
48
  },
49
49
  "devDependencies": {
@@ -51,9 +51,11 @@
51
51
  },
52
52
  "peerDependencies": {
53
53
  "@react-spectrum/provider": "^3.0.0",
54
- "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
54
+ "react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1",
55
+ "react-dom": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1"
55
56
  },
56
57
  "publishConfig": {
57
58
  "access": "public"
58
- }
59
- }
59
+ },
60
+ "gitHead": "09e7f44bebdc9d89122926b2b439a0a38a2814ea"
61
+ }
package/src/Field.tsx CHANGED
@@ -21,7 +21,7 @@ import React, {ReactNode, Ref} from 'react';
21
21
  import {SpectrumFieldProps} from '@react-types/label';
22
22
  import {useFormProps} from '@react-spectrum/form';
23
23
 
24
- function Field(props: SpectrumFieldProps, ref: Ref<HTMLElement>) {
24
+ export const Field = React.forwardRef(function Field(props: SpectrumFieldProps, ref: Ref<HTMLElement>) {
25
25
  let formProps = useFormProps(props);
26
26
  let isInForm = formProps !== props;
27
27
  props = formProps;
@@ -174,7 +174,4 @@ function Field(props: SpectrumFieldProps, ref: Ref<HTMLElement>) {
174
174
  {renderChildren()}
175
175
  </div>)
176
176
  );
177
- }
178
-
179
- let _Field = React.forwardRef(Field);
180
- export {_Field as Field};
177
+ });
package/src/HelpText.tsx CHANGED
@@ -25,7 +25,10 @@ interface HelpTextProps extends Omit<SpectrumHelpTextProps, 'errorMessage'>, Omi
25
25
  errorMessage?: ReactNode
26
26
  }
27
27
 
28
- function HelpText(props: HelpTextProps, ref: DOMRef<HTMLDivElement>) {
28
+ /**
29
+ * Help text provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms.
30
+ */
31
+ export const HelpText = React.forwardRef(function HelpText(props: HelpTextProps, ref: DOMRef<HTMLDivElement>) {
29
32
  let {
30
33
  description,
31
34
  errorMessage,
@@ -65,10 +68,4 @@ function HelpText(props: HelpTextProps, ref: DOMRef<HTMLDivElement>) {
65
68
  )}
66
69
  </div>
67
70
  );
68
- }
69
-
70
- /**
71
- * Help text provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms.
72
- */
73
- const _HelpText = React.forwardRef(HelpText);
74
- export {_HelpText as HelpText};
71
+ });
package/src/Label.tsx CHANGED
@@ -22,7 +22,7 @@ import styles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';
22
22
  import {useLocalizedStringFormatter} from '@react-aria/i18n';
23
23
  import {useProviderProps} from '@react-spectrum/provider';
24
24
 
25
- function Label(props: SpectrumLabelProps, ref: DOMRef<HTMLLabelElement>) {
25
+ export const Label = React.forwardRef(function Label(props: SpectrumLabelProps, ref: DOMRef<HTMLLabelElement>) {
26
26
  props = useProviderProps(props);
27
27
  let {
28
28
  children,
@@ -76,7 +76,4 @@ function Label(props: SpectrumLabelProps, ref: DOMRef<HTMLLabelElement>) {
76
76
  {necessityIndicator === 'icon' && isRequired && icon}
77
77
  </ElementType>
78
78
  );
79
- }
80
-
81
- let _Label = React.forwardRef(Label);
82
- export {_Label as Label};
79
+ });