@react-spectrum/label 3.13.2-nightly.4094 → 3.13.2-nightly.4096

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/import.mjs CHANGED
@@ -74,9 +74,9 @@ $beda4304297005df$export$d31dd875d69daee0 = "spectrum-HelpText--negative_f395de"
74
74
 
75
75
 
76
76
  function $8e50676506611310$var$HelpText(props, ref) {
77
- let { description: description , errorMessage: errorMessage , validationState: validationState , isDisabled: isDisabled , showErrorIcon: showErrorIcon , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = props;
77
+ let { description: description , errorMessage: errorMessage , validationState: validationState , isInvalid: isInvalid , isDisabled: isDisabled , showErrorIcon: showErrorIcon , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = props;
78
78
  let domRef = (0, $6WzO6$useDOMRef)(ref);
79
- let isErrorMessage = errorMessage && validationState === "invalid";
79
+ let isErrorMessage = errorMessage && (isInvalid || validationState === "invalid");
80
80
  let { styleProps: styleProps } = (0, $6WzO6$useStyleProps)(props);
81
81
  return /*#__PURE__*/ (0, $6WzO6$react).createElement("div", {
82
82
  ...styleProps,
@@ -493,10 +493,10 @@ function $b7ca5b4454a2009d$var$Field(props, ref) {
493
493
  let formProps = (0, $6WzO6$useFormProps)(props);
494
494
  let isInForm = formProps !== props;
495
495
  props = formProps;
496
- let { label: label , labelPosition: labelPosition = "top" , labelAlign: labelAlign , isRequired: isRequired , necessityIndicator: necessityIndicator , includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName , validationState: validationState , description: description , errorMessage: errorMessage , isDisabled: isDisabled , showErrorIcon: showErrorIcon , contextualHelp: contextualHelp , children: children , labelProps: labelProps = {} , descriptionProps: // Not every component that uses <Field> supports help text.
496
+ let { label: label , labelPosition: labelPosition = "top" , labelAlign: labelAlign , isRequired: isRequired , necessityIndicator: necessityIndicator , includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName , validationState: validationState , isInvalid: isInvalid , description: description , errorMessage: errorMessage , isDisabled: isDisabled , showErrorIcon: showErrorIcon , contextualHelp: contextualHelp , children: children , labelProps: labelProps = {} , descriptionProps: // Not every component that uses <Field> supports help text.
497
497
  descriptionProps = {} , errorMessageProps: errorMessageProps = {} , elementType: elementType , wrapperClassName: wrapperClassName , wrapperProps: wrapperProps = {} , ...otherProps } = props;
498
498
  let { styleProps: styleProps } = (0, $6WzO6$useStyleProps)(otherProps);
499
- let hasHelpText = !!description || errorMessage && validationState === "invalid";
499
+ let hasHelpText = !!description || errorMessage && (isInvalid || validationState === "invalid");
500
500
  let contextualHelpId = (0, $6WzO6$useId)();
501
501
  let fallbackLabelPropsId = (0, $6WzO6$useId)();
502
502
  if (label && contextualHelp && !labelProps.id) labelProps.id = fallbackLabelPropsId;
@@ -515,6 +515,7 @@ function $b7ca5b4454a2009d$var$Field(props, ref) {
515
515
  description: description,
516
516
  errorMessage: errorMessage,
517
517
  validationState: validationState,
518
+ isInvalid: isInvalid,
518
519
  isDisabled: isDisabled,
519
520
  showErrorIcon: showErrorIcon,
520
521
  gridArea: "helpText"
package/dist/main.js CHANGED
@@ -78,9 +78,9 @@ $680ab92507bf49aa$export$d31dd875d69daee0 = "spectrum-HelpText--negative_f395de"
78
78
 
79
79
 
80
80
  function $2d1b5114e5b358b6$var$HelpText(props, ref) {
81
- let { description: description , errorMessage: errorMessage , validationState: validationState , isDisabled: isDisabled , showErrorIcon: showErrorIcon , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = props;
81
+ let { description: description , errorMessage: errorMessage , validationState: validationState , isInvalid: isInvalid , isDisabled: isDisabled , showErrorIcon: showErrorIcon , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = props;
82
82
  let domRef = (0, $fXO85$reactspectrumutils.useDOMRef)(ref);
83
- let isErrorMessage = errorMessage && validationState === "invalid";
83
+ let isErrorMessage = errorMessage && (isInvalid || validationState === "invalid");
84
84
  let { styleProps: styleProps } = (0, $fXO85$reactspectrumutils.useStyleProps)(props);
85
85
  return /*#__PURE__*/ (0, ($parcel$interopDefault($fXO85$react))).createElement("div", {
86
86
  ...styleProps,
@@ -497,10 +497,10 @@ function $0e5410371a445d59$var$Field(props, ref) {
497
497
  let formProps = (0, $fXO85$reactspectrumform.useFormProps)(props);
498
498
  let isInForm = formProps !== props;
499
499
  props = formProps;
500
- let { label: label , labelPosition: labelPosition = "top" , labelAlign: labelAlign , isRequired: isRequired , necessityIndicator: necessityIndicator , includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName , validationState: validationState , description: description , errorMessage: errorMessage , isDisabled: isDisabled , showErrorIcon: showErrorIcon , contextualHelp: contextualHelp , children: children , labelProps: labelProps = {} , descriptionProps: // Not every component that uses <Field> supports help text.
500
+ let { label: label , labelPosition: labelPosition = "top" , labelAlign: labelAlign , isRequired: isRequired , necessityIndicator: necessityIndicator , includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName , validationState: validationState , isInvalid: isInvalid , description: description , errorMessage: errorMessage , isDisabled: isDisabled , showErrorIcon: showErrorIcon , contextualHelp: contextualHelp , children: children , labelProps: labelProps = {} , descriptionProps: // Not every component that uses <Field> supports help text.
501
501
  descriptionProps = {} , errorMessageProps: errorMessageProps = {} , elementType: elementType , wrapperClassName: wrapperClassName , wrapperProps: wrapperProps = {} , ...otherProps } = props;
502
502
  let { styleProps: styleProps } = (0, $fXO85$reactspectrumutils.useStyleProps)(otherProps);
503
- let hasHelpText = !!description || errorMessage && validationState === "invalid";
503
+ let hasHelpText = !!description || errorMessage && (isInvalid || validationState === "invalid");
504
504
  let contextualHelpId = (0, $fXO85$reactariautils.useId)();
505
505
  let fallbackLabelPropsId = (0, $fXO85$reactariautils.useId)();
506
506
  if (label && contextualHelp && !labelProps.id) labelProps.id = fallbackLabelPropsId;
@@ -519,6 +519,7 @@ function $0e5410371a445d59$var$Field(props, ref) {
519
519
  description: description,
520
520
  errorMessage: errorMessage,
521
521
  validationState: validationState,
522
+ isInvalid: isInvalid,
522
523
  isDisabled: isDisabled,
523
524
  showErrorIcon: showErrorIcon,
524
525
  gridArea: "helpText"
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;ACVD;;;;;;;;;;CAUC;;;;;;;;;;;ACVD,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AALA,4CAAsC;AACtC,4CAAqD;AACrD,4CAA2C;AAC3C,yCAA+C;AAC/C,4CAAgC;AAChC,4CAAgD;;;ADoBhD,SAAS,+BAAS,KAAoB,EAAE,GAA2B;IACjE,IAAI,eACF,YAAW,gBACX,aAAY,mBACZ,gBAAe,cACf,WAAU,iBACV,cAAa,oBACb,iBAAgB,qBAChB,kBAAiB,EAClB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,iBAAiB,gBAAgB,oBAAoB;IACzD,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,qBACE,0DAAC;QACE,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,gEAAK,GACL,qBACA,CAAC,mBAAmB,EAAE,iBAAiB,aAAa,UAAU,CAAC,EAC/D;YAAC,eAAe;QAAU,GAC1B,WAAW;QAEb,KAAK;OACJ,+BACC,sHACG,+BAAiB,0DAAC,CAAA,GAAA,2DAAU;QAAE,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAK,GAAG;sBACpE,0DAAC;QAAK,GAAG,iBAAiB;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAK,GAAG;OACvD,+BAIL,0DAAC;QAAK,GAAG,gBAAgB;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAK,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IAAI,0DAAS,CAAA,GAAA,sCAAI,EAAE,WAAW;","sources":["packages/@react-spectrum/label/src/index.ts","packages/@react-spectrum/label/src/Field.tsx","packages/@react-spectrum/label/src/HelpText.tsx","packages/@adobe/spectrum-css-temp/components/helptext/vars.css","packages/@react-spectrum/label/src/Label.tsx","packages/@react-spectrum/label/src/*.js","packages/@react-spectrum/label/intl/ar-AE.json","packages/@react-spectrum/label/intl/bg-BG.json","packages/@react-spectrum/label/intl/cs-CZ.json","packages/@react-spectrum/label/intl/da-DK.json","packages/@react-spectrum/label/intl/de-DE.json","packages/@react-spectrum/label/intl/el-GR.json","packages/@react-spectrum/label/intl/en-US.json","packages/@react-spectrum/label/intl/es-ES.json","packages/@react-spectrum/label/intl/et-EE.json","packages/@react-spectrum/label/intl/fi-FI.json","packages/@react-spectrum/label/intl/fr-FR.json","packages/@react-spectrum/label/intl/he-IL.json","packages/@react-spectrum/label/intl/hr-HR.json","packages/@react-spectrum/label/intl/hu-HU.json","packages/@react-spectrum/label/intl/it-IT.json","packages/@react-spectrum/label/intl/ja-JP.json","packages/@react-spectrum/label/intl/ko-KR.json","packages/@react-spectrum/label/intl/lt-LT.json","packages/@react-spectrum/label/intl/lv-LV.json","packages/@react-spectrum/label/intl/nb-NO.json","packages/@react-spectrum/label/intl/nl-NL.json","packages/@react-spectrum/label/intl/pl-PL.json","packages/@react-spectrum/label/intl/pt-BR.json","packages/@react-spectrum/label/intl/pt-PT.json","packages/@react-spectrum/label/intl/ro-RO.json","packages/@react-spectrum/label/intl/ru-RU.json","packages/@react-spectrum/label/intl/sk-SK.json","packages/@react-spectrum/label/intl/sl-SI.json","packages/@react-spectrum/label/intl/sr-SP.json","packages/@react-spectrum/label/intl/sv-SE.json","packages/@react-spectrum/label/intl/tr-TR.json","packages/@react-spectrum/label/intl/uk-UA.json","packages/@react-spectrum/label/intl/zh-CN.json","packages/@react-spectrum/label/intl/zh-TW.json","packages/@adobe/spectrum-css-temp/components/fieldlabel/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Field} from './Field';\nexport {Label} from './Label';\nexport {HelpText} from './HelpText';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {Flex} from '@react-spectrum/layout';\nimport {HelpText} from './HelpText';\nimport {Label} from './Label';\nimport {LabelPosition} from '@react-types/shared';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {mergeProps, useId} from '@react-aria/utils';\nimport React, {RefObject} from 'react';\nimport {SpectrumFieldProps} from '@react-types/label';\nimport {useFormProps} from '@react-spectrum/form';\n\nfunction Field(props: SpectrumFieldProps, ref: RefObject<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 description,\n errorMessage,\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 hasHelpText = !!description || errorMessage && 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, {\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={errorMessage}\n validationState={validationState}\n isDisabled={isDisabled}\n showErrorIcon={showErrorIcon}\n gridArea=\"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>}\n className={labelWrapperClass}>\n {labelAndContextualHelp}\n {renderChildren()}\n </div>\n );\n}\n\nlet _Field = React.forwardRef(Field);\nexport {_Field as Field};\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumHelpTextProps, StyleProps} from '@react-types/shared';\nimport React, {HTMLAttributes} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/helptext/vars.css';\n\ninterface HelpTextProps extends SpectrumHelpTextProps, 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}\n\nfunction HelpText(props: HelpTextProps, ref: DOMRef<HTMLDivElement>) {\n let {\n description,\n errorMessage,\n validationState,\n isDisabled,\n showErrorIcon,\n descriptionProps,\n errorMessageProps\n } = props;\n let domRef = useDOMRef(ref);\n let isErrorMessage = errorMessage && 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","/*\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","/*\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);\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","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"(optional)\": \"(اختياري)\",\n \"(required)\": \"(مطلوب)\"\n}\n","{\n \"(optional)\": \"(незадължително)\",\n \"(required)\": \"(задължително)\"\n}\n","{\n \"(optional)\": \"(volitelně)\",\n \"(required)\": \"(požadováno)\"\n}\n","{\n \"(optional)\": \"(valgfrit)\",\n \"(required)\": \"(obligatorisk)\"\n}\n","{\n \"(optional)\": \"(optional)\",\n \"(required)\": \"(erforderlich)\"\n}\n","{\n \"(optional)\": \"(προαιρετικό)\",\n \"(required)\": \"(απαιτείται)\"\n}\n","{\n \"(required)\": \"(required)\",\n \"(optional)\": \"(optional)\"\n}\n","{\n \"(optional)\": \"(opcional)\",\n \"(required)\": \"(obligatorio)\"\n}\n","{\n \"(optional)\": \"(valikuline)\",\n \"(required)\": \"(nõutav)\"\n}\n","{\n \"(optional)\": \"(valinnainen)\",\n \"(required)\": \"(pakollinen)\"\n}\n","{\n \"(optional)\": \"(facultatif)\",\n \"(required)\": \"(requis)\"\n}\n","{\n \"(optional)\": \"(אופציונלי)\",\n \"(required)\": \"(נדרש)\"\n}\n","{\n \"(optional)\": \"(opcionalno)\",\n \"(required)\": \"(obvezno)\"\n}\n","{\n \"(optional)\": \"(opcionális)\",\n \"(required)\": \"(kötelező)\"\n}\n","{\n \"(optional)\": \"(facoltativo)\",\n \"(required)\": \"(obbligatorio)\"\n}\n","{\n \"(optional)\": \"(オプション)\",\n \"(required)\": \"(必須)\"\n}\n","{\n \"(optional)\": \"(선택 사항)\",\n \"(required)\": \"(필수 사항)\"\n}\n","{\n \"(optional)\": \"(pasirenkama)\",\n \"(required)\": \"(privaloma)\"\n}\n","{\n \"(optional)\": \"(neobligāti)\",\n \"(required)\": \"(obligāti)\"\n}\n","{\n \"(optional)\": \"(valgfritt)\",\n \"(required)\": \"(obligatorisk)\"\n}\n","{\n \"(optional)\": \"(optioneel)\",\n \"(required)\": \"(vereist)\"\n}\n","{\n \"(optional)\": \"(opcjonalne)\",\n \"(required)\": \"(wymagane)\"\n}\n","{\n \"(optional)\": \"(opcional)\",\n \"(required)\": \"(obrigatório)\"\n}\n","{\n \"(optional)\": \"(opcional)\",\n \"(required)\": \"(obrigatório)\"\n}\n","{\n \"(optional)\": \"(opţional)\",\n \"(required)\": \"(obligatoriu)\"\n}\n","{\n \"(optional)\": \"(дополнительно)\",\n \"(required)\": \"(обязательно)\"\n}\n","{\n \"(optional)\": \"(nepovinné)\",\n \"(required)\": \"(povinné)\"\n}\n","{\n \"(optional)\": \"(opcijsko)\",\n \"(required)\": \"(obvezno)\"\n}\n","{\n \"(optional)\": \"(opciono)\",\n \"(required)\": \"(obavezno)\"\n}\n","{\n \"(optional)\": \"(valfritt)\",\n \"(required)\": \"(krävs)\"\n}\n","{\n \"(optional)\": \"(isteğe bağlı)\",\n \"(required)\": \"(gerekli)\"\n}\n","{\n \"(optional)\": \"(необов’язково)\",\n \"(required)\": \"(обов’язково)\"\n}\n","{\n \"(optional)\": \"(可选)\",\n \"(required)\": \"(必填)\"\n}\n","{\n \"(optional)\": \"(選填)\",\n \"(required)\": \"(必填)\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;ACVD;;;;;;;;;;CAUC;;;;;;;;;;;ACVD,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AALA,4CAAsC;AACtC,4CAAqD;AACrD,4CAA2C;AAC3C,yCAA+C;AAC/C,4CAAgC;AAChC,4CAAgD;;;ADoBhD,SAAS,+BAAS,KAAoB,EAAE,GAA2B;IACjE,IAAI,eACF,YAAW,gBACX,aAAY,mBACZ,gBAAe,aACf,UAAS,cACT,WAAU,iBACV,cAAa,oBACb,iBAAgB,qBAChB,kBAAiB,EAClB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,iBAAiB,gBAAiB,CAAA,aAAa,oBAAoB,SAAQ;IAC/E,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,qBACE,0DAAC;QACE,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,gEAAK,GACL,qBACA,CAAC,mBAAmB,EAAE,iBAAiB,aAAa,UAAU,CAAC,EAC/D;YAAC,eAAe;QAAU,GAC1B,WAAW;QAEb,KAAK;OACJ,+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AC/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,gEAAU,GAAG;qBACtC,0DAAC;QAAI,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,gEAAU,GAAG;OACrC;IAMT,qBACE,0DAAC;QACE,GAAG,UAAU;QACb,GAAG,YAAY;QAChB,KAAK;QACL,WAAW;OACV,wBACA;AAGP;AAEA,IAAI,0DAAS,CAAA,GAAA,sCAAI,EAAE,WAAW;","sources":["packages/@react-spectrum/label/src/index.ts","packages/@react-spectrum/label/src/Field.tsx","packages/@react-spectrum/label/src/HelpText.tsx","packages/@adobe/spectrum-css-temp/components/helptext/vars.css","packages/@react-spectrum/label/src/Label.tsx","packages/@react-spectrum/label/src/*.js","packages/@react-spectrum/label/intl/ar-AE.json","packages/@react-spectrum/label/intl/bg-BG.json","packages/@react-spectrum/label/intl/cs-CZ.json","packages/@react-spectrum/label/intl/da-DK.json","packages/@react-spectrum/label/intl/de-DE.json","packages/@react-spectrum/label/intl/el-GR.json","packages/@react-spectrum/label/intl/en-US.json","packages/@react-spectrum/label/intl/es-ES.json","packages/@react-spectrum/label/intl/et-EE.json","packages/@react-spectrum/label/intl/fi-FI.json","packages/@react-spectrum/label/intl/fr-FR.json","packages/@react-spectrum/label/intl/he-IL.json","packages/@react-spectrum/label/intl/hr-HR.json","packages/@react-spectrum/label/intl/hu-HU.json","packages/@react-spectrum/label/intl/it-IT.json","packages/@react-spectrum/label/intl/ja-JP.json","packages/@react-spectrum/label/intl/ko-KR.json","packages/@react-spectrum/label/intl/lt-LT.json","packages/@react-spectrum/label/intl/lv-LV.json","packages/@react-spectrum/label/intl/nb-NO.json","packages/@react-spectrum/label/intl/nl-NL.json","packages/@react-spectrum/label/intl/pl-PL.json","packages/@react-spectrum/label/intl/pt-BR.json","packages/@react-spectrum/label/intl/pt-PT.json","packages/@react-spectrum/label/intl/ro-RO.json","packages/@react-spectrum/label/intl/ru-RU.json","packages/@react-spectrum/label/intl/sk-SK.json","packages/@react-spectrum/label/intl/sl-SI.json","packages/@react-spectrum/label/intl/sr-SP.json","packages/@react-spectrum/label/intl/sv-SE.json","packages/@react-spectrum/label/intl/tr-TR.json","packages/@react-spectrum/label/intl/uk-UA.json","packages/@react-spectrum/label/intl/zh-CN.json","packages/@react-spectrum/label/intl/zh-TW.json","packages/@adobe/spectrum-css-temp/components/fieldlabel/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Field} from './Field';\nexport {Label} from './Label';\nexport {HelpText} from './HelpText';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {Flex} from '@react-spectrum/layout';\nimport {HelpText} from './HelpText';\nimport {Label} from './Label';\nimport {LabelPosition} from '@react-types/shared';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {mergeProps, useId} from '@react-aria/utils';\nimport React, {RefObject} from 'react';\nimport {SpectrumFieldProps} from '@react-types/label';\nimport {useFormProps} from '@react-spectrum/form';\n\nfunction Field(props: SpectrumFieldProps, ref: RefObject<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,\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 hasHelpText = !!description || errorMessage && (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, {\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={errorMessage}\n validationState={validationState}\n isInvalid={isInvalid}\n isDisabled={isDisabled}\n showErrorIcon={showErrorIcon}\n gridArea=\"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>}\n className={labelWrapperClass}>\n {labelAndContextualHelp}\n {renderChildren()}\n </div>\n );\n}\n\nlet _Field = React.forwardRef(Field);\nexport {_Field as Field};\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport 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} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/helptext/vars.css';\n\ninterface HelpTextProps extends SpectrumHelpTextProps, Omit<Validation, 'validationState'>, SpectrumFieldValidation, 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}\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","/*\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","/*\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);\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","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"(optional)\": \"(اختياري)\",\n \"(required)\": \"(مطلوب)\"\n}\n","{\n \"(optional)\": \"(незадължително)\",\n \"(required)\": \"(задължително)\"\n}\n","{\n \"(optional)\": \"(volitelně)\",\n \"(required)\": \"(požadováno)\"\n}\n","{\n \"(optional)\": \"(valgfrit)\",\n \"(required)\": \"(obligatorisk)\"\n}\n","{\n \"(optional)\": \"(optional)\",\n \"(required)\": \"(erforderlich)\"\n}\n","{\n \"(optional)\": \"(προαιρετικό)\",\n \"(required)\": \"(απαιτείται)\"\n}\n","{\n \"(required)\": \"(required)\",\n \"(optional)\": \"(optional)\"\n}\n","{\n \"(optional)\": \"(opcional)\",\n \"(required)\": \"(obligatorio)\"\n}\n","{\n \"(optional)\": \"(valikuline)\",\n \"(required)\": \"(nõutav)\"\n}\n","{\n \"(optional)\": \"(valinnainen)\",\n \"(required)\": \"(pakollinen)\"\n}\n","{\n \"(optional)\": \"(facultatif)\",\n \"(required)\": \"(requis)\"\n}\n","{\n \"(optional)\": \"(אופציונלי)\",\n \"(required)\": \"(נדרש)\"\n}\n","{\n \"(optional)\": \"(opcionalno)\",\n \"(required)\": \"(obvezno)\"\n}\n","{\n \"(optional)\": \"(opcionális)\",\n \"(required)\": \"(kötelező)\"\n}\n","{\n \"(optional)\": \"(facoltativo)\",\n \"(required)\": \"(obbligatorio)\"\n}\n","{\n \"(optional)\": \"(オプション)\",\n \"(required)\": \"(必須)\"\n}\n","{\n \"(optional)\": \"(선택 사항)\",\n \"(required)\": \"(필수 사항)\"\n}\n","{\n \"(optional)\": \"(pasirenkama)\",\n \"(required)\": \"(privaloma)\"\n}\n","{\n \"(optional)\": \"(neobligāti)\",\n \"(required)\": \"(obligāti)\"\n}\n","{\n \"(optional)\": \"(valgfritt)\",\n \"(required)\": \"(obligatorisk)\"\n}\n","{\n \"(optional)\": \"(optioneel)\",\n \"(required)\": \"(vereist)\"\n}\n","{\n \"(optional)\": \"(opcjonalne)\",\n \"(required)\": \"(wymagane)\"\n}\n","{\n \"(optional)\": \"(opcional)\",\n \"(required)\": \"(obrigatório)\"\n}\n","{\n \"(optional)\": \"(opcional)\",\n \"(required)\": \"(obrigatório)\"\n}\n","{\n \"(optional)\": \"(opţional)\",\n \"(required)\": \"(obligatoriu)\"\n}\n","{\n \"(optional)\": \"(дополнительно)\",\n \"(required)\": \"(обязательно)\"\n}\n","{\n \"(optional)\": \"(nepovinné)\",\n \"(required)\": \"(povinné)\"\n}\n","{\n \"(optional)\": \"(opcijsko)\",\n \"(required)\": \"(obvezno)\"\n}\n","{\n \"(optional)\": \"(opciono)\",\n \"(required)\": \"(obavezno)\"\n}\n","{\n \"(optional)\": \"(valfritt)\",\n \"(required)\": \"(krävs)\"\n}\n","{\n \"(optional)\": \"(isteğe bağlı)\",\n \"(required)\": \"(gerekli)\"\n}\n","{\n \"(optional)\": \"(необов’язково)\",\n \"(required)\": \"(обов’язково)\"\n}\n","{\n \"(optional)\": \"(可选)\",\n \"(required)\": \"(必填)\"\n}\n","{\n \"(optional)\": \"(選填)\",\n \"(required)\": \"(必填)\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -74,9 +74,9 @@ $beda4304297005df$export$d31dd875d69daee0 = "spectrum-HelpText--negative_f395de"
74
74
 
75
75
 
76
76
  function $8e50676506611310$var$HelpText(props, ref) {
77
- let { description: description , errorMessage: errorMessage , validationState: validationState , isDisabled: isDisabled , showErrorIcon: showErrorIcon , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = props;
77
+ let { description: description , errorMessage: errorMessage , validationState: validationState , isInvalid: isInvalid , isDisabled: isDisabled , showErrorIcon: showErrorIcon , descriptionProps: descriptionProps , errorMessageProps: errorMessageProps } = props;
78
78
  let domRef = (0, $6WzO6$useDOMRef)(ref);
79
- let isErrorMessage = errorMessage && validationState === "invalid";
79
+ let isErrorMessage = errorMessage && (isInvalid || validationState === "invalid");
80
80
  let { styleProps: styleProps } = (0, $6WzO6$useStyleProps)(props);
81
81
  return /*#__PURE__*/ (0, $6WzO6$react).createElement("div", {
82
82
  ...styleProps,
@@ -493,10 +493,10 @@ function $b7ca5b4454a2009d$var$Field(props, ref) {
493
493
  let formProps = (0, $6WzO6$useFormProps)(props);
494
494
  let isInForm = formProps !== props;
495
495
  props = formProps;
496
- let { label: label , labelPosition: labelPosition = "top" , labelAlign: labelAlign , isRequired: isRequired , necessityIndicator: necessityIndicator , includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName , validationState: validationState , description: description , errorMessage: errorMessage , isDisabled: isDisabled , showErrorIcon: showErrorIcon , contextualHelp: contextualHelp , children: children , labelProps: labelProps = {} , descriptionProps: // Not every component that uses <Field> supports help text.
496
+ let { label: label , labelPosition: labelPosition = "top" , labelAlign: labelAlign , isRequired: isRequired , necessityIndicator: necessityIndicator , includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName , validationState: validationState , isInvalid: isInvalid , description: description , errorMessage: errorMessage , isDisabled: isDisabled , showErrorIcon: showErrorIcon , contextualHelp: contextualHelp , children: children , labelProps: labelProps = {} , descriptionProps: // Not every component that uses <Field> supports help text.
497
497
  descriptionProps = {} , errorMessageProps: errorMessageProps = {} , elementType: elementType , wrapperClassName: wrapperClassName , wrapperProps: wrapperProps = {} , ...otherProps } = props;
498
498
  let { styleProps: styleProps } = (0, $6WzO6$useStyleProps)(otherProps);
499
- let hasHelpText = !!description || errorMessage && validationState === "invalid";
499
+ let hasHelpText = !!description || errorMessage && (isInvalid || validationState === "invalid");
500
500
  let contextualHelpId = (0, $6WzO6$useId)();
501
501
  let fallbackLabelPropsId = (0, $6WzO6$useId)();
502
502
  if (label && contextualHelp && !labelProps.id) labelProps.id = fallbackLabelPropsId;
@@ -515,6 +515,7 @@ function $b7ca5b4454a2009d$var$Field(props, ref) {
515
515
  description: description,
516
516
  errorMessage: errorMessage,
517
517
  validationState: validationState,
518
+ isInvalid: isInvalid,
518
519
  isDisabled: isDisabled,
519
520
  showErrorIcon: showErrorIcon,
520
521
  gridArea: "helpText"
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;ACVD;;;;;;;;;;CAUC;;;;;;;;;;;ACVD,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AALA,4CAAsC;AACtC,4CAAqD;AACrD,4CAA2C;AAC3C,yCAA+C;AAC/C,4CAAgC;AAChC,4CAAgD;;;ADoBhD,SAAS,+BAAS,KAAoB,EAAE,GAA2B;IACjE,IAAI,eACF,YAAW,gBACX,aAAY,mBACZ,gBAAe,cACf,WAAU,iBACV,cAAa,oBACb,iBAAgB,qBAChB,kBAAiB,EAClB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,iBAAiB,gBAAgB,oBAAoB;IACzD,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IAEjC,qBACE,gCAAC;QACE,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,gEAAK,GACL,qBACA,CAAC,mBAAmB,EAAE,iBAAiB,aAAa,UAAU,CAAC,EAC/D;YAAC,eAAe;QAAU,GAC1B,WAAW;QAEb,KAAK;OACJ,+BACC,kEACG,+BAAiB,gCAAC,CAAA,GAAA,iCAAU;QAAE,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAK,GAAG;sBACpE,gCAAC;QAAK,GAAG,iBAAiB;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAK,GAAG;OACvD,+BAIL,gCAAC;QAAK,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;QACb,GAAG,YAAY;QAChB,KAAK;QACL,WAAW;OACV,wBACA;AAGP;AAEA,IAAI,0DAAS,CAAA,GAAA,YAAI,EAAE,WAAW;","sources":["packages/@react-spectrum/label/src/index.ts","packages/@react-spectrum/label/src/Field.tsx","packages/@react-spectrum/label/src/HelpText.tsx","packages/@adobe/spectrum-css-temp/components/helptext/vars.css","packages/@react-spectrum/label/src/Label.tsx","packages/@react-spectrum/label/src/*.js","packages/@react-spectrum/label/intl/ar-AE.json","packages/@react-spectrum/label/intl/bg-BG.json","packages/@react-spectrum/label/intl/cs-CZ.json","packages/@react-spectrum/label/intl/da-DK.json","packages/@react-spectrum/label/intl/de-DE.json","packages/@react-spectrum/label/intl/el-GR.json","packages/@react-spectrum/label/intl/en-US.json","packages/@react-spectrum/label/intl/es-ES.json","packages/@react-spectrum/label/intl/et-EE.json","packages/@react-spectrum/label/intl/fi-FI.json","packages/@react-spectrum/label/intl/fr-FR.json","packages/@react-spectrum/label/intl/he-IL.json","packages/@react-spectrum/label/intl/hr-HR.json","packages/@react-spectrum/label/intl/hu-HU.json","packages/@react-spectrum/label/intl/it-IT.json","packages/@react-spectrum/label/intl/ja-JP.json","packages/@react-spectrum/label/intl/ko-KR.json","packages/@react-spectrum/label/intl/lt-LT.json","packages/@react-spectrum/label/intl/lv-LV.json","packages/@react-spectrum/label/intl/nb-NO.json","packages/@react-spectrum/label/intl/nl-NL.json","packages/@react-spectrum/label/intl/pl-PL.json","packages/@react-spectrum/label/intl/pt-BR.json","packages/@react-spectrum/label/intl/pt-PT.json","packages/@react-spectrum/label/intl/ro-RO.json","packages/@react-spectrum/label/intl/ru-RU.json","packages/@react-spectrum/label/intl/sk-SK.json","packages/@react-spectrum/label/intl/sl-SI.json","packages/@react-spectrum/label/intl/sr-SP.json","packages/@react-spectrum/label/intl/sv-SE.json","packages/@react-spectrum/label/intl/tr-TR.json","packages/@react-spectrum/label/intl/uk-UA.json","packages/@react-spectrum/label/intl/zh-CN.json","packages/@react-spectrum/label/intl/zh-TW.json","packages/@adobe/spectrum-css-temp/components/fieldlabel/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Field} from './Field';\nexport {Label} from './Label';\nexport {HelpText} from './HelpText';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {Flex} from '@react-spectrum/layout';\nimport {HelpText} from './HelpText';\nimport {Label} from './Label';\nimport {LabelPosition} from '@react-types/shared';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {mergeProps, useId} from '@react-aria/utils';\nimport React, {RefObject} from 'react';\nimport {SpectrumFieldProps} from '@react-types/label';\nimport {useFormProps} from '@react-spectrum/form';\n\nfunction Field(props: SpectrumFieldProps, ref: RefObject<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 description,\n errorMessage,\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 hasHelpText = !!description || errorMessage && 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, {\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={errorMessage}\n validationState={validationState}\n isDisabled={isDisabled}\n showErrorIcon={showErrorIcon}\n gridArea=\"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>}\n className={labelWrapperClass}>\n {labelAndContextualHelp}\n {renderChildren()}\n </div>\n );\n}\n\nlet _Field = React.forwardRef(Field);\nexport {_Field as Field};\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumHelpTextProps, StyleProps} from '@react-types/shared';\nimport React, {HTMLAttributes} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/helptext/vars.css';\n\ninterface HelpTextProps extends SpectrumHelpTextProps, 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}\n\nfunction HelpText(props: HelpTextProps, ref: DOMRef<HTMLDivElement>) {\n let {\n description,\n errorMessage,\n validationState,\n isDisabled,\n showErrorIcon,\n descriptionProps,\n errorMessageProps\n } = props;\n let domRef = useDOMRef(ref);\n let isErrorMessage = errorMessage && 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","/*\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","/*\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);\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","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"(optional)\": \"(اختياري)\",\n \"(required)\": \"(مطلوب)\"\n}\n","{\n \"(optional)\": \"(незадължително)\",\n \"(required)\": \"(задължително)\"\n}\n","{\n \"(optional)\": \"(volitelně)\",\n \"(required)\": \"(požadováno)\"\n}\n","{\n \"(optional)\": \"(valgfrit)\",\n \"(required)\": \"(obligatorisk)\"\n}\n","{\n \"(optional)\": \"(optional)\",\n \"(required)\": \"(erforderlich)\"\n}\n","{\n \"(optional)\": \"(προαιρετικό)\",\n \"(required)\": \"(απαιτείται)\"\n}\n","{\n \"(required)\": \"(required)\",\n \"(optional)\": \"(optional)\"\n}\n","{\n \"(optional)\": \"(opcional)\",\n \"(required)\": \"(obligatorio)\"\n}\n","{\n \"(optional)\": \"(valikuline)\",\n \"(required)\": \"(nõutav)\"\n}\n","{\n \"(optional)\": \"(valinnainen)\",\n \"(required)\": \"(pakollinen)\"\n}\n","{\n \"(optional)\": \"(facultatif)\",\n \"(required)\": \"(requis)\"\n}\n","{\n \"(optional)\": \"(אופציונלי)\",\n \"(required)\": \"(נדרש)\"\n}\n","{\n \"(optional)\": \"(opcionalno)\",\n \"(required)\": \"(obvezno)\"\n}\n","{\n \"(optional)\": \"(opcionális)\",\n \"(required)\": \"(kötelező)\"\n}\n","{\n \"(optional)\": \"(facoltativo)\",\n \"(required)\": \"(obbligatorio)\"\n}\n","{\n \"(optional)\": \"(オプション)\",\n \"(required)\": \"(必須)\"\n}\n","{\n \"(optional)\": \"(선택 사항)\",\n \"(required)\": \"(필수 사항)\"\n}\n","{\n \"(optional)\": \"(pasirenkama)\",\n \"(required)\": \"(privaloma)\"\n}\n","{\n \"(optional)\": \"(neobligāti)\",\n \"(required)\": \"(obligāti)\"\n}\n","{\n \"(optional)\": \"(valgfritt)\",\n \"(required)\": \"(obligatorisk)\"\n}\n","{\n \"(optional)\": \"(optioneel)\",\n \"(required)\": \"(vereist)\"\n}\n","{\n \"(optional)\": \"(opcjonalne)\",\n \"(required)\": \"(wymagane)\"\n}\n","{\n \"(optional)\": \"(opcional)\",\n \"(required)\": \"(obrigatório)\"\n}\n","{\n \"(optional)\": \"(opcional)\",\n \"(required)\": \"(obrigatório)\"\n}\n","{\n \"(optional)\": \"(opţional)\",\n \"(required)\": \"(obligatoriu)\"\n}\n","{\n \"(optional)\": \"(дополнительно)\",\n \"(required)\": \"(обязательно)\"\n}\n","{\n \"(optional)\": \"(nepovinné)\",\n \"(required)\": \"(povinné)\"\n}\n","{\n \"(optional)\": \"(opcijsko)\",\n \"(required)\": \"(obvezno)\"\n}\n","{\n \"(optional)\": \"(opciono)\",\n \"(required)\": \"(obavezno)\"\n}\n","{\n \"(optional)\": \"(valfritt)\",\n \"(required)\": \"(krävs)\"\n}\n","{\n \"(optional)\": \"(isteğe bağlı)\",\n \"(required)\": \"(gerekli)\"\n}\n","{\n \"(optional)\": \"(необов’язково)\",\n \"(required)\": \"(обов’язково)\"\n}\n","{\n \"(optional)\": \"(可选)\",\n \"(required)\": \"(必填)\"\n}\n","{\n \"(optional)\": \"(選填)\",\n \"(required)\": \"(必填)\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC,GAED,0CAA0C;ACZ1C;;;;;;;;;;CAUC;;ACVD;;;;;;;;;;CAUC;;;;;;;;;;;ACVD,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AACA,IAAA;AALA,4CAAsC;AACtC,4CAAqD;AACrD,4CAA2C;AAC3C,yCAA+C;AAC/C,4CAAgC;AAChC,4CAAgD;;;ADoBhD,SAAS,+BAAS,KAAoB,EAAE,GAA2B;IACjE,IAAI,eACF,YAAW,gBACX,aAAY,mBACZ,gBAAe,aACf,UAAS,cACT,WAAU,iBACV,cAAa,oBACb,iBAAgB,qBAChB,kBAAiB,EAClB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,iBAAiB,gBAAiB,CAAA,aAAa,oBAAoB,SAAQ;IAC/E,IAAI,cAAC,WAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IAEjC,qBACE,gCAAC;QACE,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,gEAAK,GACL,qBACA,CAAC,mBAAmB,EAAE,iBAAiB,aAAa,UAAU,CAAC,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AAE,WAAW,GAAG,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,gEAAU,GAAG;qBACtC,gCAAC;QAAI,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,gEAAU,GAAG;OACrC;IAMT,qBACE,gCAAC;QACE,GAAG,UAAU;QACb,GAAG,YAAY;QAChB,KAAK;QACL,WAAW;OACV,wBACA;AAGP;AAEA,IAAI,0DAAS,CAAA,GAAA,YAAI,EAAE,WAAW;","sources":["packages/@react-spectrum/label/src/index.ts","packages/@react-spectrum/label/src/Field.tsx","packages/@react-spectrum/label/src/HelpText.tsx","packages/@adobe/spectrum-css-temp/components/helptext/vars.css","packages/@react-spectrum/label/src/Label.tsx","packages/@react-spectrum/label/src/*.js","packages/@react-spectrum/label/intl/ar-AE.json","packages/@react-spectrum/label/intl/bg-BG.json","packages/@react-spectrum/label/intl/cs-CZ.json","packages/@react-spectrum/label/intl/da-DK.json","packages/@react-spectrum/label/intl/de-DE.json","packages/@react-spectrum/label/intl/el-GR.json","packages/@react-spectrum/label/intl/en-US.json","packages/@react-spectrum/label/intl/es-ES.json","packages/@react-spectrum/label/intl/et-EE.json","packages/@react-spectrum/label/intl/fi-FI.json","packages/@react-spectrum/label/intl/fr-FR.json","packages/@react-spectrum/label/intl/he-IL.json","packages/@react-spectrum/label/intl/hr-HR.json","packages/@react-spectrum/label/intl/hu-HU.json","packages/@react-spectrum/label/intl/it-IT.json","packages/@react-spectrum/label/intl/ja-JP.json","packages/@react-spectrum/label/intl/ko-KR.json","packages/@react-spectrum/label/intl/lt-LT.json","packages/@react-spectrum/label/intl/lv-LV.json","packages/@react-spectrum/label/intl/nb-NO.json","packages/@react-spectrum/label/intl/nl-NL.json","packages/@react-spectrum/label/intl/pl-PL.json","packages/@react-spectrum/label/intl/pt-BR.json","packages/@react-spectrum/label/intl/pt-PT.json","packages/@react-spectrum/label/intl/ro-RO.json","packages/@react-spectrum/label/intl/ru-RU.json","packages/@react-spectrum/label/intl/sk-SK.json","packages/@react-spectrum/label/intl/sl-SI.json","packages/@react-spectrum/label/intl/sr-SP.json","packages/@react-spectrum/label/intl/sv-SE.json","packages/@react-spectrum/label/intl/tr-TR.json","packages/@react-spectrum/label/intl/uk-UA.json","packages/@react-spectrum/label/intl/zh-CN.json","packages/@react-spectrum/label/intl/zh-TW.json","packages/@adobe/spectrum-css-temp/components/fieldlabel/vars.css"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Field} from './Field';\nexport {Label} from './Label';\nexport {HelpText} from './HelpText';\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {classNames, SlotProvider, useStyleProps} from '@react-spectrum/utils';\nimport {Flex} from '@react-spectrum/layout';\nimport {HelpText} from './HelpText';\nimport {Label} from './Label';\nimport {LabelPosition} from '@react-types/shared';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {mergeProps, useId} from '@react-aria/utils';\nimport React, {RefObject} from 'react';\nimport {SpectrumFieldProps} from '@react-types/label';\nimport {useFormProps} from '@react-spectrum/form';\n\nfunction Field(props: SpectrumFieldProps, ref: RefObject<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,\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 hasHelpText = !!description || errorMessage && (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, {\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={errorMessage}\n validationState={validationState}\n isInvalid={isInvalid}\n isDisabled={isDisabled}\n showErrorIcon={showErrorIcon}\n gridArea=\"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>}\n className={labelWrapperClass}>\n {labelAndContextualHelp}\n {renderChildren()}\n </div>\n );\n}\n\nlet _Field = React.forwardRef(Field);\nexport {_Field as Field};\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport 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} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/helptext/vars.css';\n\ninterface HelpTextProps extends SpectrumHelpTextProps, Omit<Validation, 'validationState'>, SpectrumFieldValidation, 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}\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","/*\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","/*\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);\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","const _temp0 = require(\"../intl/ar-AE.json\");\nconst _temp1 = require(\"../intl/bg-BG.json\");\nconst _temp2 = require(\"../intl/cs-CZ.json\");\nconst _temp3 = require(\"../intl/da-DK.json\");\nconst _temp4 = require(\"../intl/de-DE.json\");\nconst _temp5 = require(\"../intl/el-GR.json\");\nconst _temp6 = require(\"../intl/en-US.json\");\nconst _temp7 = require(\"../intl/es-ES.json\");\nconst _temp8 = require(\"../intl/et-EE.json\");\nconst _temp9 = require(\"../intl/fi-FI.json\");\nconst _temp10 = require(\"../intl/fr-FR.json\");\nconst _temp11 = require(\"../intl/he-IL.json\");\nconst _temp12 = require(\"../intl/hr-HR.json\");\nconst _temp13 = require(\"../intl/hu-HU.json\");\nconst _temp14 = require(\"../intl/it-IT.json\");\nconst _temp15 = require(\"../intl/ja-JP.json\");\nconst _temp16 = require(\"../intl/ko-KR.json\");\nconst _temp17 = require(\"../intl/lt-LT.json\");\nconst _temp18 = require(\"../intl/lv-LV.json\");\nconst _temp19 = require(\"../intl/nb-NO.json\");\nconst _temp20 = require(\"../intl/nl-NL.json\");\nconst _temp21 = require(\"../intl/pl-PL.json\");\nconst _temp22 = require(\"../intl/pt-BR.json\");\nconst _temp23 = require(\"../intl/pt-PT.json\");\nconst _temp24 = require(\"../intl/ro-RO.json\");\nconst _temp25 = require(\"../intl/ru-RU.json\");\nconst _temp26 = require(\"../intl/sk-SK.json\");\nconst _temp27 = require(\"../intl/sl-SI.json\");\nconst _temp28 = require(\"../intl/sr-SP.json\");\nconst _temp29 = require(\"../intl/sv-SE.json\");\nconst _temp30 = require(\"../intl/tr-TR.json\");\nconst _temp31 = require(\"../intl/uk-UA.json\");\nconst _temp32 = require(\"../intl/zh-CN.json\");\nconst _temp33 = require(\"../intl/zh-TW.json\");\nmodule.exports = {\n \"ar-AE\": _temp0,\n \"bg-BG\": _temp1,\n \"cs-CZ\": _temp2,\n \"da-DK\": _temp3,\n \"de-DE\": _temp4,\n \"el-GR\": _temp5,\n \"en-US\": _temp6,\n \"es-ES\": _temp7,\n \"et-EE\": _temp8,\n \"fi-FI\": _temp9,\n \"fr-FR\": _temp10,\n \"he-IL\": _temp11,\n \"hr-HR\": _temp12,\n \"hu-HU\": _temp13,\n \"it-IT\": _temp14,\n \"ja-JP\": _temp15,\n \"ko-KR\": _temp16,\n \"lt-LT\": _temp17,\n \"lv-LV\": _temp18,\n \"nb-NO\": _temp19,\n \"nl-NL\": _temp20,\n \"pl-PL\": _temp21,\n \"pt-BR\": _temp22,\n \"pt-PT\": _temp23,\n \"ro-RO\": _temp24,\n \"ru-RU\": _temp25,\n \"sk-SK\": _temp26,\n \"sl-SI\": _temp27,\n \"sr-SP\": _temp28,\n \"sv-SE\": _temp29,\n \"tr-TR\": _temp30,\n \"uk-UA\": _temp31,\n \"zh-CN\": _temp32,\n \"zh-TW\": _temp33\n}","{\n \"(optional)\": \"(اختياري)\",\n \"(required)\": \"(مطلوب)\"\n}\n","{\n \"(optional)\": \"(незадължително)\",\n \"(required)\": \"(задължително)\"\n}\n","{\n \"(optional)\": \"(volitelně)\",\n \"(required)\": \"(požadováno)\"\n}\n","{\n \"(optional)\": \"(valgfrit)\",\n \"(required)\": \"(obligatorisk)\"\n}\n","{\n \"(optional)\": \"(optional)\",\n \"(required)\": \"(erforderlich)\"\n}\n","{\n \"(optional)\": \"(προαιρετικό)\",\n \"(required)\": \"(απαιτείται)\"\n}\n","{\n \"(required)\": \"(required)\",\n \"(optional)\": \"(optional)\"\n}\n","{\n \"(optional)\": \"(opcional)\",\n \"(required)\": \"(obligatorio)\"\n}\n","{\n \"(optional)\": \"(valikuline)\",\n \"(required)\": \"(nõutav)\"\n}\n","{\n \"(optional)\": \"(valinnainen)\",\n \"(required)\": \"(pakollinen)\"\n}\n","{\n \"(optional)\": \"(facultatif)\",\n \"(required)\": \"(requis)\"\n}\n","{\n \"(optional)\": \"(אופציונלי)\",\n \"(required)\": \"(נדרש)\"\n}\n","{\n \"(optional)\": \"(opcionalno)\",\n \"(required)\": \"(obvezno)\"\n}\n","{\n \"(optional)\": \"(opcionális)\",\n \"(required)\": \"(kötelező)\"\n}\n","{\n \"(optional)\": \"(facoltativo)\",\n \"(required)\": \"(obbligatorio)\"\n}\n","{\n \"(optional)\": \"(オプション)\",\n \"(required)\": \"(必須)\"\n}\n","{\n \"(optional)\": \"(선택 사항)\",\n \"(required)\": \"(필수 사항)\"\n}\n","{\n \"(optional)\": \"(pasirenkama)\",\n \"(required)\": \"(privaloma)\"\n}\n","{\n \"(optional)\": \"(neobligāti)\",\n \"(required)\": \"(obligāti)\"\n}\n","{\n \"(optional)\": \"(valgfritt)\",\n \"(required)\": \"(obligatorisk)\"\n}\n","{\n \"(optional)\": \"(optioneel)\",\n \"(required)\": \"(vereist)\"\n}\n","{\n \"(optional)\": \"(opcjonalne)\",\n \"(required)\": \"(wymagane)\"\n}\n","{\n \"(optional)\": \"(opcional)\",\n \"(required)\": \"(obrigatório)\"\n}\n","{\n \"(optional)\": \"(opcional)\",\n \"(required)\": \"(obrigatório)\"\n}\n","{\n \"(optional)\": \"(opţional)\",\n \"(required)\": \"(obligatoriu)\"\n}\n","{\n \"(optional)\": \"(дополнительно)\",\n \"(required)\": \"(обязательно)\"\n}\n","{\n \"(optional)\": \"(nepovinné)\",\n \"(required)\": \"(povinné)\"\n}\n","{\n \"(optional)\": \"(opcijsko)\",\n \"(required)\": \"(obvezno)\"\n}\n","{\n \"(optional)\": \"(opciono)\",\n \"(required)\": \"(obavezno)\"\n}\n","{\n \"(optional)\": \"(valfritt)\",\n \"(required)\": \"(krävs)\"\n}\n","{\n \"(optional)\": \"(isteğe bağlı)\",\n \"(required)\": \"(gerekli)\"\n}\n","{\n \"(optional)\": \"(необов’язково)\",\n \"(required)\": \"(обов’язково)\"\n}\n","{\n \"(optional)\": \"(可选)\",\n \"(required)\": \"(必填)\"\n}\n","{\n \"(optional)\": \"(選填)\",\n \"(required)\": \"(必填)\"\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"module.js.map"}
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { SpectrumHelpTextProps, StyleProps } from "@react-types/shared";
1
+ import { SpectrumFieldValidation, SpectrumHelpTextProps, StyleProps, Validation } from "@react-types/shared";
2
2
  import React, { HTMLAttributes } from "react";
3
3
  import { SpectrumLabelProps, SpectrumFieldProps } from "@react-types/label";
4
- interface HelpTextProps extends SpectrumHelpTextProps, StyleProps {
4
+ interface HelpTextProps extends SpectrumHelpTextProps, Omit<Validation, 'validationState'>, SpectrumFieldValidation, StyleProps {
5
5
  /** Props for the help text description element. */
6
6
  descriptionProps?: HTMLAttributes<HTMLElement>;
7
7
  /** Props for the help text error message element. */
@@ -1 +1 @@
1
- {"mappings":";;;AAkBA,uBAAwB,SAAQ,qBAAqB,EAAE,UAAU;IAC/D,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,eAAe,WAAW,CAAC,CAAC;IAC/C,qDAAqD;IACrD,iBAAiB,CAAC,EAAE,eAAe,WAAW,CAAC,CAAA;CAChD;AA2CD;;GAEG;AACH,OAAA,MAAM,yIAAsC,CAAC;ACW7C,OAAA,IAAI,6IAAgC,CAAC;ACkFrC,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,qBAAqB,EAAE,IAAI,CAAC,UAAU,EAAE,iBAAiB,CAAC,EAAE,uBAAuB,EAAE,UAAU;IAC7H,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,eAAe,WAAW,CAAC,CAAC;IAC/C,qDAAqD;IACrD,iBAAiB,CAAC,EAAE,eAAe,WAAW,CAAC,CAAA;CAChD;AA4CD;;GAEG;AACH,OAAA,MAAM,yIAAsC,CAAC;ACU7C,OAAA,IAAI,6IAAgC,CAAC;ACoFrC,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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-spectrum/label",
3
- "version": "3.13.2-nightly.4094+8d367e025",
3
+ "version": "3.13.2-nightly.4096+e02d20562",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -36,19 +36,19 @@
36
36
  "url": "https://github.com/adobe/react-spectrum"
37
37
  },
38
38
  "dependencies": {
39
- "@react-aria/i18n": "3.0.0-nightly.2388+8d367e025",
40
- "@react-aria/label": "3.0.0-nightly.2388+8d367e025",
41
- "@react-aria/utils": "3.0.0-nightly.2388+8d367e025",
42
- "@react-spectrum/form": "3.0.0-nightly.2388+8d367e025",
43
- "@react-spectrum/layout": "3.5.5-nightly.4094+8d367e025",
44
- "@react-spectrum/utils": "3.0.0-nightly.2388+8d367e025",
45
- "@react-types/label": "3.0.0-nightly.2388+8d367e025",
46
- "@react-types/shared": "3.0.0-nightly.2388+8d367e025",
47
- "@spectrum-icons/ui": "3.0.0-nightly.2388+8d367e025",
39
+ "@react-aria/i18n": "3.0.0-nightly.2390+e02d20562",
40
+ "@react-aria/label": "3.0.0-nightly.2390+e02d20562",
41
+ "@react-aria/utils": "3.0.0-nightly.2390+e02d20562",
42
+ "@react-spectrum/form": "3.0.0-nightly.2390+e02d20562",
43
+ "@react-spectrum/layout": "3.5.5-nightly.4096+e02d20562",
44
+ "@react-spectrum/utils": "3.0.0-nightly.2390+e02d20562",
45
+ "@react-types/label": "3.0.0-nightly.2390+e02d20562",
46
+ "@react-types/shared": "3.0.0-nightly.2390+e02d20562",
47
+ "@spectrum-icons/ui": "3.0.0-nightly.2390+e02d20562",
48
48
  "@swc/helpers": "^0.5.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@adobe/spectrum-css-temp": "3.0.0-nightly.2388+8d367e025"
51
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.2390+e02d20562"
52
52
  },
53
53
  "peerDependencies": {
54
54
  "@react-spectrum/provider": "^3.0.0",
@@ -57,5 +57,5 @@
57
57
  "publishConfig": {
58
58
  "access": "public"
59
59
  },
60
- "gitHead": "8d367e0253073dcb7700896957e6db073517adab"
60
+ "gitHead": "e02d20562f4f7f24dd31f50ab1a9d93e58d52a05"
61
61
  }
package/src/Field.tsx CHANGED
@@ -33,6 +33,7 @@ function Field(props: SpectrumFieldProps, ref: RefObject<HTMLElement>) {
33
33
  necessityIndicator,
34
34
  includeNecessityIndicatorInAccessibilityName,
35
35
  validationState,
36
+ isInvalid,
36
37
  description,
37
38
  errorMessage,
38
39
  isDisabled,
@@ -49,7 +50,7 @@ function Field(props: SpectrumFieldProps, ref: RefObject<HTMLElement>) {
49
50
  ...otherProps
50
51
  } = props;
51
52
  let {styleProps} = useStyleProps(otherProps);
52
- let hasHelpText = !!description || errorMessage && validationState === 'invalid';
53
+ let hasHelpText = !!description || errorMessage && (isInvalid || validationState === 'invalid');
53
54
  let contextualHelpId = useId();
54
55
 
55
56
  let fallbackLabelPropsId = useId();
@@ -84,6 +85,7 @@ function Field(props: SpectrumFieldProps, ref: RefObject<HTMLElement>) {
84
85
  description={description}
85
86
  errorMessage={errorMessage}
86
87
  validationState={validationState}
88
+ isInvalid={isInvalid}
87
89
  isDisabled={isDisabled}
88
90
  showErrorIcon={showErrorIcon}
89
91
  gridArea="helpText" />
package/src/HelpText.tsx CHANGED
@@ -12,11 +12,11 @@
12
12
 
13
13
  import AlertMedium from '@spectrum-icons/ui/AlertMedium';
14
14
  import {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';
15
- import {DOMRef, SpectrumHelpTextProps, StyleProps} from '@react-types/shared';
15
+ import {DOMRef, SpectrumFieldValidation, SpectrumHelpTextProps, StyleProps, Validation} from '@react-types/shared';
16
16
  import React, {HTMLAttributes} from 'react';
17
17
  import styles from '@adobe/spectrum-css-temp/components/helptext/vars.css';
18
18
 
19
- interface HelpTextProps extends SpectrumHelpTextProps, StyleProps {
19
+ interface HelpTextProps extends SpectrumHelpTextProps, Omit<Validation, 'validationState'>, SpectrumFieldValidation, StyleProps {
20
20
  /** Props for the help text description element. */
21
21
  descriptionProps?: HTMLAttributes<HTMLElement>,
22
22
  /** Props for the help text error message element. */
@@ -28,13 +28,14 @@ function HelpText(props: HelpTextProps, ref: DOMRef<HTMLDivElement>) {
28
28
  description,
29
29
  errorMessage,
30
30
  validationState,
31
+ isInvalid,
31
32
  isDisabled,
32
33
  showErrorIcon,
33
34
  descriptionProps,
34
35
  errorMessageProps
35
36
  } = props;
36
37
  let domRef = useDOMRef(ref);
37
- let isErrorMessage = errorMessage && validationState === 'invalid';
38
+ let isErrorMessage = errorMessage && (isInvalid || validationState === 'invalid');
38
39
  let {styleProps} = useStyleProps(props);
39
40
 
40
41
  return (