@react-spectrum/label 3.16.10 → 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.
@@ -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":"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","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":"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","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":"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","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":"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","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,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;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,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;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,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,MAAM,KAAyB,EAAE,GAA6B;IAC3G,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","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.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.10",
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.4",
40
- "@react-aria/utils": "^3.26.0",
41
- "@react-spectrum/form": "^3.7.10",
42
- "@react-spectrum/layout": "^3.6.10",
43
- "@react-spectrum/utils": "^3.12.0",
44
- "@react-types/label": "^3.9.7",
45
- "@react-types/shared": "^3.26.0",
46
- "@spectrum-icons/ui": "^3.6.11",
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,10 +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-rc.1"
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
- "gitHead": "71f0ef23053f9e03ee7e97df736e8b083e006849"
60
+ "gitHead": "09e7f44bebdc9d89122926b2b439a0a38a2814ea"
60
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
+ });