@react-spectrum/label 3.4.1-nightly.2949 → 3.4.1-nightly.2967

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,3 +1,7 @@
1
+ var {
2
+ useFormProps
3
+ } = require("@react-spectrum/form");
4
+
1
5
  var {
2
6
  useProviderProps
3
7
  } = require("@react-spectrum/provider");
@@ -292,6 +296,8 @@ let Label = /*#__PURE__*/_react.forwardRef($cd06bbbaaaccc13eaa9045c$var$Label);
292
296
  exports.Label = Label;
293
297
 
294
298
  function $d2ecd00afec46f6300dcc47dcdc8$var$Field(props, ref) {
299
+ props = useFormProps(props);
300
+
295
301
  let {
296
302
  label,
297
303
  labelPosition = 'top',
@@ -338,20 +344,10 @@ function $d2ecd00afec46f6300dcc47dcdc8$var$Field(props, ref) {
338
344
  showErrorIcon: showErrorIcon
339
345
  });
340
346
 
341
- let renderChildren = () => {
342
- if (hasHelpText) {
343
- if (labelPosition === 'side') {
344
- return /*#__PURE__*/_react.createElement(Flex, {
345
- direction: "column",
346
- UNSAFE_className: classNames($a0bedb1888ff92cb3407d1a60d76e$$interop$default, 'spectrum-Field-wrapper')
347
- }, children, renderHelpText());
348
- }
349
-
350
- return /*#__PURE__*/_react.createElement(_react.Fragment, null, children, renderHelpText());
351
- }
352
-
353
- return children;
354
- };
347
+ let renderChildren = () => /*#__PURE__*/_react.createElement(Flex, {
348
+ direction: "column",
349
+ UNSAFE_className: classNames($a0bedb1888ff92cb3407d1a60d76e$$interop$default, 'spectrum-Field-wrapper')
350
+ }, children, hasHelpText && renderHelpText());
355
351
 
356
352
  return /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersExtends({}, styleProps, {
357
353
  ref: ref,
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SA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,CAAmB/B,QAAnB,EAA6BgC,UAAU,CAAChC,QAAQ,CAACpB,KAAV,kCACzCiC,UADyC;AAE5ChC,IAAAA;AAF4C,KAAvC,CAAP;AAID;;AAED,IAAIsD,KAAM,gBAAGzC,MAAK,CAACC,UAAN,CAAiB8B,uCAAjB,CAAb","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/helptext/vars.css","./packages/@react-spectrum/label/src/HelpText.tsx","./node_modules/@adobe/spectrum-css-temp/components/fieldlabel/vars.css","./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/@react-spectrum/label/src/Label.tsx","./packages/@react-spectrum/label/src/Field.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\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} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumHelpTextProps} 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 {\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\n return (\n <div\n className={classNames(\n styles,\n 'spectrum-HelpText',\n `spectrum-HelpText--${isErrorMessage ? 'negative' : 'neutral'}`,\n {'is-disabled': isDisabled}\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 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","{\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)\": \"(necesario)\"\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\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 {useMessageFormatter} 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 formatMessage = useMessageFormatter(intlMessages);\n let necessityLabel = isRequired ? formatMessage('(required)') : formatMessage('(optional)');\n let icon = (\n <Asterisk\n UNSAFE_className={classNames(styles, 'spectrum-FieldLabel-requiredIcon')}\n aria-label={includeNecessityIndicatorInAccessibilityName ? formatMessage('(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","/*\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, 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} from '@react-aria/utils';\nimport React, {RefObject} from 'react';\nimport {SpectrumFieldProps} from '@react-types/label';\n\nfunction Field(props: SpectrumFieldProps, ref: RefObject<HTMLElement>) {\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 children,\n labelProps,\n // Not every component that uses <Field> supports help text.\n descriptionProps = {},\n errorMessageProps = {},\n elementType,\n wrapperClassName,\n\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let hasHelpText = !!description || errorMessage && validationState === 'invalid';\n\n if (label || hasHelpText) {\n let labelWrapperClass = classNames(\n labelStyles,\n 'spectrum-Field',\n {\n 'spectrum-Field--positionTop': labelPosition === 'top',\n 'spectrum-Field--positionSide': labelPosition === 'side'\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 );\n\n let renderChildren = () => {\n if (hasHelpText) {\n if (labelPosition === 'side') {\n return (\n <Flex direction=\"column\" UNSAFE_className={classNames(labelStyles, 'spectrum-Field-wrapper')}>\n {children}\n {renderHelpText()}\n </Flex>\n );\n }\n\n return (\n <>\n {children}\n {renderHelpText()}\n </>\n );\n }\n\n return children;\n };\n\n return (\n <div\n {...styleProps}\n ref={ref as RefObject<HTMLDivElement>}\n className={labelWrapperClass}>\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 {renderChildren()}\n </div>\n );\n }\n\n return React.cloneElement(children, mergeProps(children.props, {\n ...styleProps,\n ref\n }));\n}\n\nlet _Field = React.forwardRef(Field);\nexport {_Field as Field};\n"],"names":["$parcel$interopDefault","a","__esModule","default","HelpText","props","ref","description","errorMessage","validationState","isDisabled","showErrorIcon","descriptionProps","errorMessageProps","domRef","useDOMRef","isErrorMessage","classNames","_HelpText","React","forwardRef","JSON","parse","Label","useProviderProps","children","labelPosition","labelAlign","isRequired","necessityIndicator","includeNecessityIndicatorInAccessibilityName","htmlFor","for","labelFor","elementType","ElementType","onClick","otherProps","styleProps","useStyleProps","formatMessage","useMessageFormatter","intlMessages","necessityLabel","icon","undefined","labelClassNames","className","filterDOMProps","_Label","Field","label","labelProps","wrapperClassName","hasHelpText","labelWrapperClass","cloneElement","mergeProps","renderHelpText","renderChildren","_Field"],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;;;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./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/helptext/vars.css","./packages/@react-spectrum/label/src/HelpText.tsx","./node_modules/@adobe/spectrum-css-temp/components/fieldlabel/vars.css","./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/@react-spectrum/label/src/Label.tsx","./packages/@react-spectrum/label/src/Field.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\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} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumHelpTextProps} 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 {\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\n return (\n <div\n className={classNames(\n styles,\n 'spectrum-HelpText',\n `spectrum-HelpText--${isErrorMessage ? 'negative' : 'neutral'}`,\n {'is-disabled': isDisabled}\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 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","{\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)\": \"(necesario)\"\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\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 {useMessageFormatter} 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 formatMessage = useMessageFormatter(intlMessages);\n let necessityLabel = isRequired ? formatMessage('(required)') : formatMessage('(optional)');\n let icon = (\n <Asterisk\n UNSAFE_className={classNames(styles, 'spectrum-FieldLabel-requiredIcon')}\n aria-label={includeNecessityIndicatorInAccessibilityName ? formatMessage('(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","/*\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, 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} 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 props = useFormProps(props);\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 children,\n labelProps,\n // Not every component that uses <Field> supports help text.\n descriptionProps = {},\n errorMessageProps = {},\n elementType,\n wrapperClassName,\n\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let hasHelpText = !!description || errorMessage && validationState === 'invalid';\n\n if (label || hasHelpText) {\n let labelWrapperClass = classNames(\n labelStyles,\n 'spectrum-Field',\n {\n 'spectrum-Field--positionTop': labelPosition === 'top',\n 'spectrum-Field--positionSide': labelPosition === 'side'\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 );\n\n let renderChildren = () => (\n <Flex direction=\"column\" UNSAFE_className={classNames(labelStyles, 'spectrum-Field-wrapper')}>\n {children}\n {hasHelpText && renderHelpText()}\n </Flex>\n );\n\n return (\n <div\n {...styleProps}\n ref={ref as RefObject<HTMLDivElement>}\n className={labelWrapperClass}>\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 {renderChildren()}\n </div>\n );\n }\n\n return React.cloneElement(children, mergeProps(children.props, {\n ...styleProps,\n ref\n }));\n}\n\nlet _Field = React.forwardRef(Field);\nexport {_Field as Field};\n"],"names":["$parcel$interopDefault","a","__esModule","default","HelpText","props","ref","description","errorMessage","validationState","isDisabled","showErrorIcon","descriptionProps","errorMessageProps","domRef","useDOMRef","isErrorMessage","classNames","_HelpText","React","forwardRef","JSON","parse","Label","useProviderProps","children","labelPosition","labelAlign","isRequired","necessityIndicator","includeNecessityIndicatorInAccessibilityName","htmlFor","for","labelFor","elementType","ElementType","onClick","otherProps","styleProps","useStyleProps","formatMessage","useMessageFormatter","intlMessages","necessityLabel","icon","undefined","labelClassNames","className","filterDOMProps","_Label","Field","useFormProps","label","labelProps","wrapperClassName","hasHelpText","labelWrapperClass","cloneElement","mergeProps","renderHelpText","renderChildren","_Field"],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { useFormProps } from "@react-spectrum/form";
1
2
  import { useProviderProps } from "@react-spectrum/provider";
2
3
  import { useMessageFormatter } from "@react-aria/i18n";
3
4
  import { filterDOMProps, mergeProps } from "@react-aria/utils";
@@ -264,6 +265,8 @@ function $e5f2e8e117d677abd71f1542812d4fdb$var$Label(props, ref) {
264
265
  export let Label = /*#__PURE__*/_react.forwardRef($e5f2e8e117d677abd71f1542812d4fdb$var$Label);
265
266
 
266
267
  function $fbef05647f50ff84b1b0bb6029f8e$var$Field(props, ref) {
268
+ props = useFormProps(props);
269
+
267
270
  let {
268
271
  label,
269
272
  labelPosition = 'top',
@@ -310,20 +313,10 @@ function $fbef05647f50ff84b1b0bb6029f8e$var$Field(props, ref) {
310
313
  showErrorIcon: showErrorIcon
311
314
  });
312
315
 
313
- let renderChildren = () => {
314
- if (hasHelpText) {
315
- if (labelPosition === 'side') {
316
- return /*#__PURE__*/_react.createElement(Flex, {
317
- direction: "column",
318
- UNSAFE_className: classNames($c9fb1f4220ea2c59cb2e10f0e9828c6e$$interop$default, 'spectrum-Field-wrapper')
319
- }, children, renderHelpText());
320
- }
321
-
322
- return /*#__PURE__*/_react.createElement(_react.Fragment, null, children, renderHelpText());
323
- }
324
-
325
- return children;
326
- };
316
+ let renderChildren = () => /*#__PURE__*/_react.createElement(Flex, {
317
+ direction: "column",
318
+ UNSAFE_className: classNames($c9fb1f4220ea2c59cb2e10f0e9828c6e$$interop$default, 'spectrum-Field-wrapper')
319
+ }, children, hasHelpText && renderHelpText());
327
320
 
328
321
  return /*#__PURE__*/_react.createElement("div", _babelRuntimeHelpersEsmExtends({}, styleProps, {
329
322
  ref: ref,
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;;;ACFD,4CAAiB;AACf,uBAAqB,0BADN;AAEf,sCAAoC,yCAFrB;AAGf,4BAA0B,+BAHX;AAIf,gCAA8B,mCAJf;AAKf,iBAAe,oBALA;AAMf,iCAA+B;AANhB,CAAjB;;;ACyBA,SAASG,8CAAT,CAAkBC,KAAlB,EAAwCC,GAAxC,EAAqE;AACnE,MAAI;AACFC,IAAAA,WADE;AAEFC,IAAAA,YAFE;AAGFC,IAAAA,eAHE;AAIFC,IAAAA,UAJE;AAKFC,IAAAA,aALE;AAMFC,IAAAA,gBANE;AAOFC,IAAAA;AAPE,MAQAR,KARJ;AASA,MAAIS,MAAM,GAAGC,SAAS,CAACT,GAAD,CAAtB;AACA,M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WAAJ,EAAiB;AACf,YAAI5B,aAAa,KAAK,MAAtB,EAA8B;AAC5B,8BACE,qBAAC,IAAD;AAAM,YAAA,SAAS,EAAC,QAAhB;AAAyB,YAAA,gBAAgB,EAAET,UAAU,qDAAc,wBAAd;AAArD,aACGQ,QADH,EAEGiC,cAAc,EAFjB,CADF;AAMD;;AAED,4BACE,4CACGjC,QADH,EAEGiC,cAAc,EAFjB,CADF;AAMD;;AAED,aAAOjC,QAAP;AACD,KApBD;;AAsBA,wBACE,+DACMa,UADN;AAEE,MAAA,GAAG,EAAEhC,GAFP;AAGE,MAAA,SAAS,EAAEiD;AAHb,QAIGJ,KAAK,iBACJ,+DACMC,UADN;AAEE,MAAA,aAAa,EAAE1B,aAFjB;AAGE,MAAA,UAAU,EAAEC,UAHd;AAIE,MAAA,UAAU,EAAEC,UAJd;AAKE,MAAA,kBAAkB,EAAEC,kBALtB;AAME,MAAA,4CAA4C,EAAEC,4CANhD;AAOE,MAAA,WAAW,EAAEI;AAPf,QAQGiB,KARH,CALJ,EAgBGQ,cAAc,EAhBjB,CADF;AAoBD;;AAED,sBAAOxC,MAAK,CAACqC,YAAN,CAAmB/B,QAAnB,EAA6BgC,UAAU,CAAChC,QAAQ,CAACpB,KAAV,qCACzCiC,UADyC;AAE5ChC,IAAAA;AAF4C,KAAvC,CAAP;AAID;;OAED,IAAIsD,KAAM,gBAAGzC,MAAK,CAACC,UAAN,CAAiB8B,wCAAjB,CAAb","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/helptext/vars.css","./packages/@react-spectrum/label/src/HelpText.tsx","./node_modules/@adobe/spectrum-css-temp/components/fieldlabel/vars.css","./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/@react-spectrum/label/src/Label.tsx","./packages/@react-spectrum/label/src/Field.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\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} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumHelpTextProps} 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 {\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\n return (\n <div\n className={classNames(\n styles,\n 'spectrum-HelpText',\n `spectrum-HelpText--${isErrorMessage ? 'negative' : 'neutral'}`,\n {'is-disabled': isDisabled}\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 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","{\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)\": \"(necesario)\"\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\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 {useMessageFormatter} 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 formatMessage = useMessageFormatter(intlMessages);\n let necessityLabel = isRequired ? formatMessage('(required)') : formatMessage('(optional)');\n let icon = (\n <Asterisk\n UNSAFE_className={classNames(styles, 'spectrum-FieldLabel-requiredIcon')}\n aria-label={includeNecessityIndicatorInAccessibilityName ? formatMessage('(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","/*\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, 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} from '@react-aria/utils';\nimport React, {RefObject} from 'react';\nimport {SpectrumFieldProps} from '@react-types/label';\n\nfunction Field(props: SpectrumFieldProps, ref: RefObject<HTMLElement>) {\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 children,\n labelProps,\n // Not every component that uses <Field> supports help text.\n descriptionProps = {},\n errorMessageProps = {},\n elementType,\n wrapperClassName,\n\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let hasHelpText = !!description || errorMessage && validationState === 'invalid';\n\n if (label || hasHelpText) {\n let labelWrapperClass = classNames(\n labelStyles,\n 'spectrum-Field',\n {\n 'spectrum-Field--positionTop': labelPosition === 'top',\n 'spectrum-Field--positionSide': labelPosition === 'side'\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 );\n\n let renderChildren = () => {\n if (hasHelpText) {\n if (labelPosition === 'side') {\n return (\n <Flex direction=\"column\" UNSAFE_className={classNames(labelStyles, 'spectrum-Field-wrapper')}>\n {children}\n {renderHelpText()}\n </Flex>\n );\n }\n\n return (\n <>\n {children}\n {renderHelpText()}\n </>\n );\n }\n\n return children;\n };\n\n return (\n <div\n {...styleProps}\n ref={ref as RefObject<HTMLDivElement>}\n className={labelWrapperClass}>\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 {renderChildren()}\n </div>\n );\n }\n\n return React.cloneElement(children, mergeProps(children.props, {\n ...styleProps,\n ref\n }));\n}\n\nlet _Field = React.forwardRef(Field);\nexport {_Field as Field};\n"],"names":["$parcel$interopDefault","a","__esModule","default","HelpText","props","ref","description","errorMessage","validationState","isDisabled","showErrorIcon","descriptionProps","errorMessageProps","domRef","useDOMRef","isErrorMessage","classNames","_HelpText","React","forwardRef","JSON","parse","Label","useProviderProps","children","labelPosition","labelAlign","isRequired","necessityIndicator","includeNecessityIndicatorInAccessibilityName","htmlFor","for","labelFor","elementType","ElementType","onClick","otherProps","styleProps","useStyleProps","formatMessage","useMessageFormatter","intlMessages","necessityLabel","icon","undefined","labelClassNames","className","filterDOMProps","_Label","Field","label","labelProps","wrapperClassName","hasHelpText","labelWrapperClass","cloneElement","mergeProps","renderHelpText","renderChildren","_Field"],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;AAAA,SAASA,sBAAT,CAAgCC,CAAhC,EAAmC;AACjC,SAAOA,CAAC,IAAIA,CAAC,CAACC,UAAP,GAAoBD,CAAC,CAACE,OAAtB,GAAgCF,CAAvC;AACD;;;;ACFD,4CAAiB;AACf,uBAAqB,0BADN;AAEf,sCAAoC,yCAFrB;AAGf,4BAA0B,+BAHX;AAIf,gCAA8B,mCAJf;AAKf,iBAAe,oBALA;AAMf,iCAA+B;AANhB,CAAjB;;;ACyBA,SAASG,8CAAT,CAAkBC,KAAlB,EAAwCC,GAAxC,EAAqE;AACnE,MAAI;AACFC,IAAAA,WADE;AAEFC,IAAAA,YAFE;AAGFC,IAAAA,eAHE;AAIFC,IAAAA,UAJE;AAKFC,IAAAA,aALE;AAMFC,IAAAA,gBANE;AAOFC,IAAAA;AAPE,MAQAR,KARJ;AASA,MAAIS,MAAM,GAAGC,SAAS,CAACT,GAAD,CAAtB;AACA,MAAIU,cAAc,GAAGR,YAAY,IAAIC,eAAe,KAAK,SAAzD;AAEA,sBACE;AACE,IAAA,SAAS,EAAEQ,UAAU,qDAEnB,mBAFmB,2BAGGD,cAAc,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c,wBAAd;AAArD,OACGQ,QADH,EAEG8B,WAAW,IAAII,cAAc,EAFhC,CADF;;AAOA,wBACE,+DACMrB,UADN;AAEE,MAAA,GAAG,EAAEhC,GAFP;AAGE,MAAA,SAAS,EAAEkD;AAHb,QAIGJ,KAAK,iBACJ,+DACMC,UADN;AAEE,MAAA,aAAa,EAAE3B,aAFjB;AAGE,MAAA,UAAU,EAAEC,UAHd;AAIE,MAAA,UAAU,EAAEC,UAJd;AAKE,MAAA,kBAAkB,EAAEC,kBALtB;AAME,MAAA,4CAA4C,EAAEC,4CANhD;AAOE,MAAA,WAAW,EAAEI;AAPf,QAQGkB,KARH,CALJ,EAgBGQ,cAAc,EAhBjB,CADF;AAoBD;;AAED,sBAAOzC,MAAK,CAACsC,YAAN,CAAmBhC,QAAnB,EAA6BiC,UAAU,CAACjC,QAAQ,CAACpB,KAAV,qCACzCiC,UADyC;AAE5ChC,IAAAA;AAF4C,KAAvC,CAAP;AAID;;OAED,IAAIuD,KAAM,gBAAG1C,MAAK,CAACC,UAAN,CAAiB8B,wCAAjB,CAAb","sources":["./node_modules/@parcel/scope-hoisting/lib/helpers.js","./node_modules/@adobe/spectrum-css-temp/components/helptext/vars.css","./packages/@react-spectrum/label/src/HelpText.tsx","./node_modules/@adobe/spectrum-css-temp/components/fieldlabel/vars.css","./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/@react-spectrum/label/src/Label.tsx","./packages/@react-spectrum/label/src/Field.tsx"],"sourcesContent":["function $parcel$interopDefault(a) {\n return a && a.__esModule ? a.default : a;\n}\n\nfunction $parcel$defineInteropFlag(a) {\n Object.defineProperty(a, '__esModule', {value: true});\n}\n\nfunction $parcel$exportWildcard(dest, source) {\n Object.keys(source).forEach(function(key) {\n if (key === 'default' || key === '__esModule') {\n return;\n }\n\n Object.defineProperty(dest, key, {\n enumerable: true,\n get: function get() {\n return source[key];\n },\n });\n });\n\n return dest;\n}\n\nfunction $parcel$missingModule(name) {\n var err = new Error(\"Cannot find module '\" + name + \"'\");\n err.code = 'MODULE_NOT_FOUND';\n throw err;\n}\n\nvar $parcel$global =\n typeof globalThis !== 'undefined'\n ? globalThis\n : typeof self !== 'undefined'\n ? self\n : typeof window !== 'undefined'\n ? window\n : typeof global !== 'undefined'\n ? global\n : {};\n","/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n@import './index.css';\n@import './skin.css';\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} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumHelpTextProps} 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 {\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\n return (\n <div\n className={classNames(\n styles,\n 'spectrum-HelpText',\n `spectrum-HelpText--${isErrorMessage ? 'negative' : 'neutral'}`,\n {'is-disabled': isDisabled}\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 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","{\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)\": \"(necesario)\"\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\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 {useMessageFormatter} 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 formatMessage = useMessageFormatter(intlMessages);\n let necessityLabel = isRequired ? formatMessage('(required)') : formatMessage('(optional)');\n let icon = (\n <Asterisk\n UNSAFE_className={classNames(styles, 'spectrum-FieldLabel-requiredIcon')}\n aria-label={includeNecessityIndicatorInAccessibilityName ? formatMessage('(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","/*\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, 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} 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 props = useFormProps(props);\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 children,\n labelProps,\n // Not every component that uses <Field> supports help text.\n descriptionProps = {},\n errorMessageProps = {},\n elementType,\n wrapperClassName,\n\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let hasHelpText = !!description || errorMessage && validationState === 'invalid';\n\n if (label || hasHelpText) {\n let labelWrapperClass = classNames(\n labelStyles,\n 'spectrum-Field',\n {\n 'spectrum-Field--positionTop': labelPosition === 'top',\n 'spectrum-Field--positionSide': labelPosition === 'side'\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 );\n\n let renderChildren = () => (\n <Flex direction=\"column\" UNSAFE_className={classNames(labelStyles, 'spectrum-Field-wrapper')}>\n {children}\n {hasHelpText && renderHelpText()}\n </Flex>\n );\n\n return (\n <div\n {...styleProps}\n ref={ref as RefObject<HTMLDivElement>}\n className={labelWrapperClass}>\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 {renderChildren()}\n </div>\n );\n }\n\n return React.cloneElement(children, mergeProps(children.props, {\n ...styleProps,\n ref\n }));\n}\n\nlet _Field = React.forwardRef(Field);\nexport {_Field as Field};\n"],"names":["$parcel$interopDefault","a","__esModule","default","HelpText","props","ref","description","errorMessage","validationState","isDisabled","showErrorIcon","descriptionProps","errorMessageProps","domRef","useDOMRef","isErrorMessage","classNames","_HelpText","React","forwardRef","JSON","parse","Label","useProviderProps","children","labelPosition","labelAlign","isRequired","necessityIndicator","includeNecessityIndicatorInAccessibilityName","htmlFor","for","labelFor","elementType","ElementType","onClick","otherProps","styleProps","useStyleProps","formatMessage","useMessageFormatter","intlMessages","necessityLabel","icon","undefined","labelClassNames","className","filterDOMProps","_Label","Field","useFormProps","label","labelProps","wrapperClassName","hasHelpText","labelWrapperClass","cloneElement","mergeProps","renderHelpText","renderChildren","_Field"],"version":3,"file":"module.js.map"}
@@ -1 +1 @@
1
- {"mappings":"A;A;A;AAkBA,uBAAwB,SAAQ,qBAAqB;IACnD,mDAAmD;IACnD,gBAAgB,EAAE,eAAe,WAAW,CAAC,CAAC;IAC9C,qDAAqD;IACrD,iBAAiB,EAAE,eAAe,WAAW,CAAC,CAAA;CAC/C;AAwCD;A;GAEG;AACH,OAAA,MAAM,yIAAsC,CAAC;ACc7C,OAAA,IAAI,6IAAgC,CAAC;ACgDrC,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"],"sourcesContent":[null,null,null,null],"names":[],"version":3,"file":"types.d.ts.map"}
1
+ {"mappings":"A;A;A;AAkBA,uBAAwB,SAAQ,qBAAqB;IACnD,mDAAmD;IACnD,gBAAgB,EAAE,eAAe,WAAW,CAAC,CAAC;IAC9C,qDAAqD;IACrD,iBAAiB,EAAE,eAAe,WAAW,CAAC,CAAA;CAC/C;AAwCD;A;GAEG;AACH,OAAA,MAAM,yIAAsC,CAAC;ACc7C,OAAA,IAAI,6IAAgC,CAAC;ACmCrC,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"],"sourcesContent":[null,null,null,null],"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.4.1-nightly.2949+ab0323af3",
3
+ "version": "3.4.1-nightly.2967+252940a26",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,17 +32,18 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@react-aria/i18n": "3.0.0-nightly.1263+ab0323af3",
36
- "@react-aria/label": "3.0.0-nightly.1263+ab0323af3",
37
- "@react-aria/utils": "3.0.0-nightly.1263+ab0323af3",
38
- "@react-spectrum/layout": "3.2.2-nightly.2949+ab0323af3",
39
- "@react-spectrum/utils": "3.0.0-nightly.1263+ab0323af3",
40
- "@react-types/label": "3.0.0-nightly.1263+ab0323af3",
41
- "@react-types/shared": "3.0.0-nightly.1263+ab0323af3",
42
- "@spectrum-icons/ui": "3.0.0-nightly.1263+ab0323af3"
35
+ "@react-aria/i18n": "3.0.0-nightly.1281+252940a26",
36
+ "@react-aria/label": "3.0.0-nightly.1281+252940a26",
37
+ "@react-aria/utils": "3.0.0-nightly.1281+252940a26",
38
+ "@react-spectrum/form": "3.0.0-nightly.1281+252940a26",
39
+ "@react-spectrum/layout": "3.2.2-nightly.2967+252940a26",
40
+ "@react-spectrum/utils": "3.0.0-nightly.1281+252940a26",
41
+ "@react-types/label": "3.0.0-nightly.1281+252940a26",
42
+ "@react-types/shared": "3.0.0-nightly.1281+252940a26",
43
+ "@spectrum-icons/ui": "3.0.0-nightly.1281+252940a26"
43
44
  },
44
45
  "devDependencies": {
45
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1263+ab0323af3"
46
+ "@adobe/spectrum-css-temp": "3.0.0-nightly.1281+252940a26"
46
47
  },
47
48
  "peerDependencies": {
48
49
  "@react-spectrum/provider": "^3.0.0",
@@ -51,5 +52,5 @@
51
52
  "publishConfig": {
52
53
  "access": "public"
53
54
  },
54
- "gitHead": "ab0323af3512117c9607304a66a33faf026929c9"
55
+ "gitHead": "252940a267857896b75c988a5cc0ec199e740fcb"
55
56
  }
package/src/Field.tsx CHANGED
@@ -19,8 +19,10 @@ import labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css
19
19
  import {mergeProps} from '@react-aria/utils';
20
20
  import React, {RefObject} from 'react';
21
21
  import {SpectrumFieldProps} from '@react-types/label';
22
+ import {useFormProps} from '@react-spectrum/form';
22
23
 
23
24
  function Field(props: SpectrumFieldProps, ref: RefObject<HTMLElement>) {
25
+ props = useFormProps(props);
24
26
  let {
25
27
  label,
26
28
  labelPosition = 'top' as LabelPosition,
@@ -76,27 +78,12 @@ function Field(props: SpectrumFieldProps, ref: RefObject<HTMLElement>) {
76
78
  showErrorIcon={showErrorIcon} />
77
79
  );
78
80
 
79
- let renderChildren = () => {
80
- if (hasHelpText) {
81
- if (labelPosition === 'side') {
82
- return (
83
- <Flex direction="column" UNSAFE_className={classNames(labelStyles, 'spectrum-Field-wrapper')}>
84
- {children}
85
- {renderHelpText()}
86
- </Flex>
87
- );
88
- }
89
-
90
- return (
91
- <>
92
- {children}
93
- {renderHelpText()}
94
- </>
95
- );
96
- }
97
-
98
- return children;
99
- };
81
+ let renderChildren = () => (
82
+ <Flex direction="column" UNSAFE_className={classNames(labelStyles, 'spectrum-Field-wrapper')}>
83
+ {children}
84
+ {hasHelpText && renderHelpText()}
85
+ </Flex>
86
+ );
100
87
 
101
88
  return (
102
89
  <div