@react-spectrum/label 3.7.1-nightly.3426 → 3.7.1

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
@@ -8,7 +8,6 @@ var $fXO85$spectrumiconsuiAlertMedium = require("@spectrum-icons/ui/AlertMedium"
8
8
  var $fXO85$spectrumiconsuiAsterisk = require("@spectrum-icons/ui/Asterisk");
9
9
  var $fXO85$reactariai18n = require("@react-aria/i18n");
10
10
  var $fXO85$reactspectrumprovider = require("@react-spectrum/provider");
11
- var $fXO85$internationalizeddate = require("@internationalized/date");
12
11
 
13
12
  function $parcel$export(e, n, v, s) {
14
13
  Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
@@ -20,7 +19,6 @@ function $parcel$interopDefault(a) {
20
19
  $parcel$export(module.exports, "Field", () => $0e5410371a445d59$export$a455218a85c89869);
21
20
  $parcel$export(module.exports, "Label", () => $38a9afbd39356629$export$b04be29aa201d4f5);
22
21
  $parcel$export(module.exports, "HelpText", () => $2d1b5114e5b358b6$export$a67c0bc59081311a);
23
- $parcel$export(module.exports, "StaticField", () => $61b6854a7ac8b62b$export$fb26128f9ef12ff9);
24
22
 
25
23
 
26
24
 
@@ -504,90 +502,4 @@ let $0e5410371a445d59$export$a455218a85c89869 = /*#__PURE__*/ ($parcel$interopDe
504
502
 
505
503
 
506
504
 
507
-
508
-
509
-
510
-
511
-
512
-
513
- function $61b6854a7ac8b62b$var$StaticField(props, ref) {
514
- let { value: value , formatOptions: formatOptions , labelPosition: labelPosition , labelAlign: labelAlign , label: label , ...otherProps } = props;
515
- let { styleProps: styleProps } = $fXO85$reactspectrumutils.useStyleProps(otherProps);
516
- let labelWrapperClass = $fXO85$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($eb2fc0ee655eff6b$exports)), 'spectrum-Field', {
517
- 'spectrum-Field--positionTop': labelPosition === 'top',
518
- 'spectrum-Field--positionSide': labelPosition === 'side'
519
- });
520
- return(/*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).createElement("div", {
521
- ...$fXO85$reactariautils.filterDOMProps(props),
522
- ...styleProps,
523
- className: $fXO85$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($eb2fc0ee655eff6b$exports)), 'spectrum-StaticField', {
524
- [labelWrapperClass]: label
525
- }, styleProps.className),
526
- ref: ref
527
- }, props.label && /*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).createElement($38a9afbd39356629$export$b04be29aa201d4f5, {
528
- labelPosition: labelPosition,
529
- labelAlign: labelAlign,
530
- elementType: "span"
531
- }, props.label), /*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).createElement("div", {
532
- className: $fXO85$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($eb2fc0ee655eff6b$exports)), 'spectrum-Field-wrapper')
533
- }, /*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).createElement("div", {
534
- className: $fXO85$reactspectrumutils.classNames((/*@__PURE__*/$parcel$interopDefault($eb2fc0ee655eff6b$exports)), 'spectrum-Field-field')
535
- }, Array.isArray(value) && // @ts-ignore
536
- /*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).createElement($61b6854a7ac8b62b$var$FormattedStringList, {
537
- value: value,
538
- formatOptions: formatOptions
539
- }), typeof value === 'object' && 'start' in value && typeof value.start === 'number' && typeof value.end === 'number' && /*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).createElement($61b6854a7ac8b62b$var$FormattedNumber, {
540
- value: value,
541
- formatOptions: formatOptions
542
- }), typeof value === 'object' && 'start' in value && typeof value.start !== 'number' && typeof value.end !== 'number' && /*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).createElement($61b6854a7ac8b62b$var$FormattedDate, {
543
- value: value,
544
- formatOptions: formatOptions
545
- }), typeof value === 'number' && /*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).createElement($61b6854a7ac8b62b$var$FormattedNumber, {
546
- value: value,
547
- formatOptions: formatOptions
548
- }), (typeof value === 'object' && ('calendar' in value || 'hour' in value) || value instanceof Date) && /*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).createElement($61b6854a7ac8b62b$var$FormattedDate, {
549
- value: value,
550
- formatOptions: formatOptions
551
- }), typeof value === 'string' && value))));
552
- }
553
- function $61b6854a7ac8b62b$var$FormattedStringList(props) {
554
- let stringFormatter = $fXO85$reactariai18n.useListFormatter(props.formatOptions);
555
- return(/*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).createElement(($parcel$interopDefault($fXO85$react)).Fragment, null, stringFormatter.format(props.value)));
556
- }
557
- function $61b6854a7ac8b62b$var$FormattedNumber(props) {
558
- let numberFormatter = $fXO85$reactariai18n.useNumberFormatter(props.formatOptions);
559
- let value = props.value;
560
- if (typeof value === 'object') return(/*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).createElement(($parcel$interopDefault($fXO85$react)).Fragment, null, numberFormatter.formatRange(value.start, value.end)));
561
- return(/*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).createElement(($parcel$interopDefault($fXO85$react)).Fragment, null, numberFormatter.format(value)));
562
- }
563
- function $61b6854a7ac8b62b$var$FormattedDate(props) {
564
- let dateFormatter = $fXO85$reactariai18n.useDateFormatter(props.formatOptions);
565
- let value = props.value;
566
- let timeZone = dateFormatter.resolvedOptions().timeZone || $fXO85$internationalizeddate.getLocalTimeZone();
567
- let final;
568
- if ('start' in value && 'end' in value) {
569
- let start = value.start;
570
- let end = value.end;
571
- start = $61b6854a7ac8b62b$var$convertDateTime(start, timeZone);
572
- end = $61b6854a7ac8b62b$var$convertDateTime(end, timeZone);
573
- return(/*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).createElement(($parcel$interopDefault($fXO85$react)).Fragment, null, dateFormatter.formatRange(start, end)));
574
- }
575
- final = $61b6854a7ac8b62b$var$convertDateTime(value, timeZone);
576
- return(/*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).createElement(($parcel$interopDefault($fXO85$react)).Fragment, null, dateFormatter.format(final)));
577
- }
578
- function $61b6854a7ac8b62b$var$convertDateTime(value, timeZone) {
579
- if ('timeZone' in value) return value.toDate();
580
- else if ('calendar' in value) return value.toDate(timeZone);
581
- else if (!(value instanceof Date)) return $61b6854a7ac8b62b$var$convertValue(value).toDate(timeZone);
582
- return value;
583
- }
584
- function $61b6854a7ac8b62b$var$convertValue(value) {
585
- let date = $fXO85$internationalizeddate.today($fXO85$internationalizeddate.getLocalTimeZone());
586
- return $fXO85$internationalizeddate.toCalendarDateTime(date, value);
587
- }
588
- let $61b6854a7ac8b62b$export$fb26128f9ef12ff9 = /*#__PURE__*/ ($parcel$interopDefault($fXO85$react)).forwardRef($61b6854a7ac8b62b$var$StaticField);
589
-
590
-
591
-
592
-
593
505
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGAA,GAAmC;AACnC,GAAkD;AAClD,GAAwC;AACxC,GAA4C;AAC5C,GAA6B;AAC7B,GAA6C;AAL7C,yCAAmC,GAAG,CAA0B;AAChE,yCAAkD,GAAG,CAAyC;AAC9F,yCAAwC,GAAG,CAA+B;AAC1E,sCAA4C,GAAG,CAAmC;AAClF,yCAA6B,GAAG,CAAoB;AACpD,yCAA6C,GAAG,CAAoC;;;SDoB3E,8BAAQ,CAAC,KAAoB,EAAE,GAA2B,EAAE,CAAC;IACpE,GAAG,CAAC,CAAC,cACH,WAAW,iBACX,YAAY,oBACZ,eAAe,eACf,UAAU,kBACV,aAAa,qBACb,gBAAgB,sBAChB,iBAAiB,EACnB,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,MAAM,GAAG,mCAAS,CAAC,GAAG;IAC1B,GAAG,CAAC,cAAc,GAAG,YAAY,IAAI,eAAe,KAAK,CAAS;IAClE,GAAG,CAAC,CAAC,aAAA,UAAU,EAAA,CAAC,GAAG,uCAAa,CAAC,KAAK;IAEtC,MAAM,oEACH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ACrB,MAAM,CAAC,KAAK,CAAC,MAAM;SACd,EAAE,EAAE,CAAU,aAAI,KAAK,EAC5B,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ;SACvB,EAAE,IAAI,KAAK,YAAY,IAAI,GAChC,MAAM,CAAC,kCAAY,CAAC,KAAK,EAAE,MAAM,CAAC,QAAQ;IAG5C,MAAM,CAAC,KAAK;AACd,CAAC;SAEQ,kCAAY,CAAC,KAAW,EAAE,CAAC;IAClC,GAAG,CAAC,IAAI,GAAG,kCAAK,CAAC,6CAAgB;IAEjC,MAAM,CAAC,+CAAkB,CAAC,IAAI,EAAE,KAAK;AACvC,CAAC;AAED,GAAG,CAAC,yCAAY,iBAAG,sCAAK,CAAC,UAAU,CAAC,iCAAW;;","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/intl/*.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","packages/@react-spectrum/label/src/StaticField.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Field} from './Field';\nexport {Label} from './Label';\nexport {HelpText} from './HelpText';\nexport {StaticField} from './StaticField';\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, mergeRefs} from '@react-aria/utils';\nimport React, {ForwardedRef, ReactElement, RefObject, useCallback} 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 let mergedRefs = useMergeRefs((children as ReactElement & {ref: RefObject<HTMLElement>}).ref, ref);\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 (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 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: mergedRefs\n }));\n}\n\nfunction useMergeRefs<T>(...refs: ForwardedRef<T>[]): (instance: (T | null)) => void {\n return useCallback(\n mergeRefs(...refs) as (instance: (T | null)) => void,\n [...refs]\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(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./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)\": \"(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\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 type {AriaLabelingProps, DOMProps, RangeValue, SpectrumLabelableProps, StyleProps} from '@react-types/shared';\nimport {CalendarDate, CalendarDateTime, getLocalTimeZone, Time, toCalendarDateTime, today, ZonedDateTime} from '@internationalized/date';\nimport {classNames} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {Label} from './Label';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport React, {RefObject} from 'react';\nimport {useDateFormatter, useListFormatter, useNumberFormatter} from '@react-aria/i18n';\nimport {useStyleProps} from '@react-spectrum/utils';\n\ninterface StaticFieldBaseProps extends DOMProps, StyleProps, Omit<SpectrumLabelableProps, 'necessityIndicator' | 'isRequired'>, AriaLabelingProps {}\n\ntype NumberValue = number | RangeValue<number>;\ninterface NumberProps<T extends NumberValue> {\n value: T,\n formatOptions?: Intl.NumberFormatOptions\n}\n\ntype DateTime = Date | CalendarDate | CalendarDateTime | ZonedDateTime | Time;\ntype RangeDateTime = RangeValue<DateTime>;\ntype DateTimeValue = DateTime | RangeDateTime;\ninterface DateProps<T extends DateTimeValue> {\n value: T,\n formatOptions?: Intl.DateTimeFormatOptions\n}\n\ninterface StringProps<T extends string> {\n value: T,\n formatOptions?: never\n}\n\ninterface StringListProps<T extends string[]> {\n value: T,\n // @ts-ignore\n formatOptions?: Intl.ListFormatOptions\n}\n\ntype StaticFieldProps<T> =\n T extends NumberValue ? NumberProps<T> :\n T extends DateTimeValue ? DateProps<T> :\n T extends string[] ? StringListProps<T> :\n T extends string ? StringProps<T> :\n never;\n\nexport type SpectrumStaticFieldTypes = string[] | string | Date | CalendarDate | CalendarDateTime | ZonedDateTime | Time | number | RangeValue<number> | RangeValue<DateTime>;\nexport type SpectrumStaticFieldProps<T> = StaticFieldProps<T> & StaticFieldBaseProps;\n\nfunction StaticField<T extends SpectrumStaticFieldTypes>(props: SpectrumStaticFieldProps<T>, ref: RefObject<HTMLDivElement>) {\n let {\n value,\n formatOptions,\n labelPosition,\n labelAlign,\n label,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let labelWrapperClass = classNames(\n labelStyles,\n 'spectrum-Field',\n {\n 'spectrum-Field--positionTop': labelPosition === 'top',\n 'spectrum-Field--positionSide': labelPosition === 'side'\n }\n );\n\n return (\n <div\n {...filterDOMProps(props)}\n {...styleProps}\n className={classNames(labelStyles, 'spectrum-StaticField', {[labelWrapperClass]: label}, styleProps.className)}\n ref={ref}>\n {props.label &&\n <Label\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n elementType=\"span\">\n {props.label}\n </Label>}\n <div\n className={classNames(labelStyles, 'spectrum-Field-wrapper')}>\n <div\n className={classNames(labelStyles, 'spectrum-Field-field')}>\n {Array.isArray(value) && \n // @ts-ignore\n <FormattedStringList value={value} formatOptions={formatOptions as Intl.ListFormatOptions} />}\n\n {typeof value === 'object' && 'start' in value && typeof value.start === 'number' && typeof value.end === 'number' && \n <FormattedNumber value={value as NumberValue} formatOptions={formatOptions as Intl.NumberFormatOptions} />}\n\n {typeof value === 'object' && 'start' in value && typeof value.start !== 'number' && typeof value.end !== 'number' && \n <FormattedDate value={value as DateTimeValue} formatOptions={formatOptions as Intl.DateTimeFormatOptions} />}\n\n {typeof value === 'number' && \n <FormattedNumber value={value} formatOptions={formatOptions as Intl.NumberFormatOptions} />}\n\n {(typeof value === 'object' && ('calendar' in value || 'hour' in value) || (value instanceof Date)) &&\n <FormattedDate value={value} formatOptions={formatOptions as Intl.DateTimeFormatOptions} />}\n\n {typeof value === 'string' && \n value}\n </div>\n </div>\n </div>\n );\n}\n\nfunction FormattedStringList<T extends string[]>(props: StringListProps<T>) {\n let stringFormatter = useListFormatter(props.formatOptions); \n\n return (\n <>{stringFormatter.format(props.value)}</>\n );\n}\n\nfunction FormattedNumber<T extends NumberValue>(props: NumberProps<T>) {\n let numberFormatter = useNumberFormatter(props.formatOptions); \n let value = props.value;\n\n if (typeof value === 'object') {\n return <>{numberFormatter.formatRange(value.start, value.end)}</>;\n }\n\n return <>{numberFormatter.format(value)}</>;\n}\n\nfunction FormattedDate<T extends DateTimeValue>(props: DateProps<T>) {\n let dateFormatter = useDateFormatter(props.formatOptions);\n let value = props.value;\n let timeZone = dateFormatter.resolvedOptions().timeZone || getLocalTimeZone();\n let final;\n\n if ('start' in value && 'end' in value) {\n let start = value.start;\n let end = value.end;\n\n start = convertDateTime(start, timeZone);\n end = convertDateTime(end, timeZone);\n\n return <>{dateFormatter.formatRange(start, end)}</>;\n }\n\n final = convertDateTime(value, timeZone);\n return <>{dateFormatter.format(final)}</>;\n}\n\nfunction convertDateTime(value: DateTime, timeZone: any) {\n if ('timeZone' in value) {\n return value.toDate();\n } else if ('calendar' in value) {\n return value.toDate(timeZone);\n } else if (!(value instanceof Date)) { \n return convertValue(value).toDate(timeZone);\n }\n\n return value;\n}\n\nfunction convertValue(value: Time) {\n let date = today(getLocalTimeZone());\n\n return toCalendarDateTime(date, value);\n}\n\nlet _StaticField = React.forwardRef(StaticField);\nexport {_StaticField as StaticField};\n"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"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AC,2BAAK","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/intl/*.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, 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, mergeRefs} from '@react-aria/utils';\nimport React, {ForwardedRef, ReactElement, RefObject, useCallback} 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 let mergedRefs = useMergeRefs((children as ReactElement & {ref: RefObject<HTMLElement>}).ref, ref);\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 (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 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: mergedRefs\n }));\n}\n\nfunction useMergeRefs<T>(...refs: ForwardedRef<T>[]): (instance: (T | null)) => void {\n return useCallback(\n mergeRefs(...refs) as (instance: (T | null)) => void,\n [...refs]\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(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./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)\": \"(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\n@import './index.css';\n@import './skin.css';\n"],"names":[],"version":3,"file":"main.js.map"}
package/dist/module.js CHANGED
@@ -6,9 +6,8 @@ import $6WzO6$react, {useCallback as $6WzO6$useCallback} from "react";
6
6
  import {useFormProps as $6WzO6$useFormProps} from "@react-spectrum/form";
7
7
  import $6WzO6$spectrumiconsuiAlertMedium from "@spectrum-icons/ui/AlertMedium";
8
8
  import $6WzO6$spectrumiconsuiAsterisk from "@spectrum-icons/ui/Asterisk";
9
- import {useLocalizedStringFormatter as $6WzO6$useLocalizedStringFormatter, useListFormatter as $6WzO6$useListFormatter, useNumberFormatter as $6WzO6$useNumberFormatter, useDateFormatter as $6WzO6$useDateFormatter} from "@react-aria/i18n";
9
+ import {useLocalizedStringFormatter as $6WzO6$useLocalizedStringFormatter} from "@react-aria/i18n";
10
10
  import {useProviderProps as $6WzO6$useProviderProps} from "@react-spectrum/provider";
11
- import {getLocalTimeZone as $6WzO6$getLocalTimeZone, today as $6WzO6$today, toCalendarDateTime as $6WzO6$toCalendarDateTime} from "@internationalized/date";
12
11
 
13
12
  function $parcel$interopDefault(a) {
14
13
  return a && a.__esModule ? a.default : a;
@@ -499,91 +498,5 @@ let $b7ca5b4454a2009d$export$a455218a85c89869 = /*#__PURE__*/ $6WzO6$react.forwa
499
498
 
500
499
 
501
500
 
502
-
503
-
504
-
505
-
506
-
507
-
508
- function $2700b77784776a4f$var$StaticField(props, ref) {
509
- let { value: value , formatOptions: formatOptions , labelPosition: labelPosition , labelAlign: labelAlign , label: label , ...otherProps } = props;
510
- let { styleProps: styleProps } = $6WzO6$useStyleProps(otherProps);
511
- let labelWrapperClass = $6WzO6$classNames((/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports)), 'spectrum-Field', {
512
- 'spectrum-Field--positionTop': labelPosition === 'top',
513
- 'spectrum-Field--positionSide': labelPosition === 'side'
514
- });
515
- return(/*#__PURE__*/ $6WzO6$react.createElement("div", {
516
- ...$6WzO6$filterDOMProps(props),
517
- ...styleProps,
518
- className: $6WzO6$classNames((/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports)), 'spectrum-StaticField', {
519
- [labelWrapperClass]: label
520
- }, styleProps.className),
521
- ref: ref
522
- }, props.label && /*#__PURE__*/ $6WzO6$react.createElement($00af9ba397a66f43$export$b04be29aa201d4f5, {
523
- labelPosition: labelPosition,
524
- labelAlign: labelAlign,
525
- elementType: "span"
526
- }, props.label), /*#__PURE__*/ $6WzO6$react.createElement("div", {
527
- className: $6WzO6$classNames((/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports)), 'spectrum-Field-wrapper')
528
- }, /*#__PURE__*/ $6WzO6$react.createElement("div", {
529
- className: $6WzO6$classNames((/*@__PURE__*/$parcel$interopDefault($cd231e464c886c86$exports)), 'spectrum-Field-field')
530
- }, Array.isArray(value) && // @ts-ignore
531
- /*#__PURE__*/ $6WzO6$react.createElement($2700b77784776a4f$var$FormattedStringList, {
532
- value: value,
533
- formatOptions: formatOptions
534
- }), typeof value === 'object' && 'start' in value && typeof value.start === 'number' && typeof value.end === 'number' && /*#__PURE__*/ $6WzO6$react.createElement($2700b77784776a4f$var$FormattedNumber, {
535
- value: value,
536
- formatOptions: formatOptions
537
- }), typeof value === 'object' && 'start' in value && typeof value.start !== 'number' && typeof value.end !== 'number' && /*#__PURE__*/ $6WzO6$react.createElement($2700b77784776a4f$var$FormattedDate, {
538
- value: value,
539
- formatOptions: formatOptions
540
- }), typeof value === 'number' && /*#__PURE__*/ $6WzO6$react.createElement($2700b77784776a4f$var$FormattedNumber, {
541
- value: value,
542
- formatOptions: formatOptions
543
- }), (typeof value === 'object' && ('calendar' in value || 'hour' in value) || value instanceof Date) && /*#__PURE__*/ $6WzO6$react.createElement($2700b77784776a4f$var$FormattedDate, {
544
- value: value,
545
- formatOptions: formatOptions
546
- }), typeof value === 'string' && value))));
547
- }
548
- function $2700b77784776a4f$var$FormattedStringList(props) {
549
- let stringFormatter = $6WzO6$useListFormatter(props.formatOptions);
550
- return(/*#__PURE__*/ $6WzO6$react.createElement($6WzO6$react.Fragment, null, stringFormatter.format(props.value)));
551
- }
552
- function $2700b77784776a4f$var$FormattedNumber(props) {
553
- let numberFormatter = $6WzO6$useNumberFormatter(props.formatOptions);
554
- let value = props.value;
555
- if (typeof value === 'object') return(/*#__PURE__*/ $6WzO6$react.createElement($6WzO6$react.Fragment, null, numberFormatter.formatRange(value.start, value.end)));
556
- return(/*#__PURE__*/ $6WzO6$react.createElement($6WzO6$react.Fragment, null, numberFormatter.format(value)));
557
- }
558
- function $2700b77784776a4f$var$FormattedDate(props) {
559
- let dateFormatter = $6WzO6$useDateFormatter(props.formatOptions);
560
- let value = props.value;
561
- let timeZone = dateFormatter.resolvedOptions().timeZone || $6WzO6$getLocalTimeZone();
562
- let final;
563
- if ('start' in value && 'end' in value) {
564
- let start = value.start;
565
- let end = value.end;
566
- start = $2700b77784776a4f$var$convertDateTime(start, timeZone);
567
- end = $2700b77784776a4f$var$convertDateTime(end, timeZone);
568
- return(/*#__PURE__*/ $6WzO6$react.createElement($6WzO6$react.Fragment, null, dateFormatter.formatRange(start, end)));
569
- }
570
- final = $2700b77784776a4f$var$convertDateTime(value, timeZone);
571
- return(/*#__PURE__*/ $6WzO6$react.createElement($6WzO6$react.Fragment, null, dateFormatter.format(final)));
572
- }
573
- function $2700b77784776a4f$var$convertDateTime(value, timeZone) {
574
- if ('timeZone' in value) return value.toDate();
575
- else if ('calendar' in value) return value.toDate(timeZone);
576
- else if (!(value instanceof Date)) return $2700b77784776a4f$var$convertValue(value).toDate(timeZone);
577
- return value;
578
- }
579
- function $2700b77784776a4f$var$convertValue(value) {
580
- let date = $6WzO6$today($6WzO6$getLocalTimeZone());
581
- return $6WzO6$toCalendarDateTime(date, value);
582
- }
583
- let $2700b77784776a4f$export$fb26128f9ef12ff9 = /*#__PURE__*/ $6WzO6$react.forwardRef($2700b77784776a4f$var$StaticField);
584
-
585
-
586
-
587
-
588
- export {$b7ca5b4454a2009d$export$a455218a85c89869 as Field, $00af9ba397a66f43$export$b04be29aa201d4f5 as Label, $8e50676506611310$export$a67c0bc59081311a as HelpText, $2700b77784776a4f$export$fb26128f9ef12ff9 as StaticField};
501
+ export {$b7ca5b4454a2009d$export$a455218a85c89869 as Field, $00af9ba397a66f43$export$b04be29aa201d4f5 as Label, $8e50676506611310$export$a67c0bc59081311a as HelpText};
589
502
  //# sourceMappingURL=module.js.map
@@ -1 +1 @@
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src/HelpText.tsx","packages/@adobe/spectrum-css-temp/components/helptext/vars.css","packages/@react-spectrum/label/src/Label.tsx","packages/@react-spectrum/label/intl/*.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","packages/@react-spectrum/label/src/StaticField.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n/// <reference types=\"css-module-types\" />\n\nexport {Field} from './Field';\nexport {Label} from './Label';\nexport {HelpText} from './HelpText';\nexport {StaticField} from './StaticField';\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, mergeRefs} from '@react-aria/utils';\nimport React, {ForwardedRef, ReactElement, RefObject, useCallback} 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 let mergedRefs = useMergeRefs((children as ReactElement & {ref: RefObject<HTMLElement>}).ref, ref);\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 (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 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: mergedRefs\n }));\n}\n\nfunction useMergeRefs<T>(...refs: ForwardedRef<T>[]): (instance: (T | null)) => void {\n return useCallback(\n mergeRefs(...refs) as (instance: (T | null)) => void,\n [...refs]\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(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./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)\": \"(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\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 type {AriaLabelingProps, DOMProps, RangeValue, SpectrumLabelableProps, StyleProps} from '@react-types/shared';\nimport {CalendarDate, CalendarDateTime, getLocalTimeZone, Time, toCalendarDateTime, today, ZonedDateTime} from '@internationalized/date';\nimport {classNames} from '@react-spectrum/utils';\nimport {filterDOMProps} from '@react-aria/utils';\nimport {Label} from './Label';\nimport labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport React, {RefObject} from 'react';\nimport {useDateFormatter, useListFormatter, useNumberFormatter} from '@react-aria/i18n';\nimport {useStyleProps} from '@react-spectrum/utils';\n\ninterface StaticFieldBaseProps extends DOMProps, StyleProps, Omit<SpectrumLabelableProps, 'necessityIndicator' | 'isRequired'>, AriaLabelingProps {}\n\ntype NumberValue = number | RangeValue<number>;\ninterface NumberProps<T extends NumberValue> {\n value: T,\n formatOptions?: Intl.NumberFormatOptions\n}\n\ntype DateTime = Date | CalendarDate | CalendarDateTime | ZonedDateTime | Time;\ntype RangeDateTime = RangeValue<DateTime>;\ntype DateTimeValue = DateTime | RangeDateTime;\ninterface DateProps<T extends DateTimeValue> {\n value: T,\n formatOptions?: Intl.DateTimeFormatOptions\n}\n\ninterface StringProps<T extends string> {\n value: T,\n formatOptions?: never\n}\n\ninterface StringListProps<T extends string[]> {\n value: T,\n // @ts-ignore\n formatOptions?: Intl.ListFormatOptions\n}\n\ntype StaticFieldProps<T> =\n T extends NumberValue ? NumberProps<T> :\n T extends DateTimeValue ? DateProps<T> :\n T extends string[] ? StringListProps<T> :\n T extends string ? StringProps<T> :\n never;\n\nexport type SpectrumStaticFieldTypes = string[] | string | Date | CalendarDate | CalendarDateTime | ZonedDateTime | Time | number | RangeValue<number> | RangeValue<DateTime>;\nexport type SpectrumStaticFieldProps<T> = StaticFieldProps<T> & StaticFieldBaseProps;\n\nfunction StaticField<T extends SpectrumStaticFieldTypes>(props: SpectrumStaticFieldProps<T>, ref: RefObject<HTMLDivElement>) {\n let {\n value,\n formatOptions,\n labelPosition,\n labelAlign,\n label,\n ...otherProps\n } = props;\n let {styleProps} = useStyleProps(otherProps);\n let labelWrapperClass = classNames(\n labelStyles,\n 'spectrum-Field',\n {\n 'spectrum-Field--positionTop': labelPosition === 'top',\n 'spectrum-Field--positionSide': labelPosition === 'side'\n }\n );\n\n return (\n <div\n {...filterDOMProps(props)}\n {...styleProps}\n className={classNames(labelStyles, 'spectrum-StaticField', {[labelWrapperClass]: label}, styleProps.className)}\n ref={ref}>\n {props.label &&\n <Label\n labelPosition={labelPosition}\n labelAlign={labelAlign}\n elementType=\"span\">\n {props.label}\n </Label>}\n <div\n className={classNames(labelStyles, 'spectrum-Field-wrapper')}>\n <div\n className={classNames(labelStyles, 'spectrum-Field-field')}>\n {Array.isArray(value) && \n // @ts-ignore\n <FormattedStringList value={value} formatOptions={formatOptions as Intl.ListFormatOptions} />}\n\n {typeof value === 'object' && 'start' in value && typeof value.start === 'number' && typeof value.end === 'number' && \n <FormattedNumber value={value as NumberValue} formatOptions={formatOptions as Intl.NumberFormatOptions} />}\n\n {typeof value === 'object' && 'start' in value && typeof value.start !== 'number' && typeof value.end !== 'number' && \n <FormattedDate value={value as DateTimeValue} formatOptions={formatOptions as Intl.DateTimeFormatOptions} />}\n\n {typeof value === 'number' && \n <FormattedNumber value={value} formatOptions={formatOptions as Intl.NumberFormatOptions} />}\n\n {(typeof value === 'object' && ('calendar' in value || 'hour' in value) || (value instanceof Date)) &&\n <FormattedDate value={value} formatOptions={formatOptions as Intl.DateTimeFormatOptions} />}\n\n {typeof value === 'string' && \n value}\n </div>\n </div>\n </div>\n );\n}\n\nfunction FormattedStringList<T extends string[]>(props: StringListProps<T>) {\n let stringFormatter = useListFormatter(props.formatOptions); \n\n return (\n <>{stringFormatter.format(props.value)}</>\n );\n}\n\nfunction FormattedNumber<T extends NumberValue>(props: NumberProps<T>) {\n let numberFormatter = useNumberFormatter(props.formatOptions); \n let value = props.value;\n\n if (typeof value === 'object') {\n return <>{numberFormatter.formatRange(value.start, value.end)}</>;\n }\n\n return <>{numberFormatter.format(value)}</>;\n}\n\nfunction FormattedDate<T extends DateTimeValue>(props: DateProps<T>) {\n let dateFormatter = useDateFormatter(props.formatOptions);\n let value = props.value;\n let timeZone = dateFormatter.resolvedOptions().timeZone || getLocalTimeZone();\n let final;\n\n if ('start' in value && 'end' in value) {\n let start = value.start;\n let end = value.end;\n\n start = convertDateTime(start, timeZone);\n end = convertDateTime(end, timeZone);\n\n return <>{dateFormatter.formatRange(start, end)}</>;\n }\n\n final = convertDateTime(value, timeZone);\n return <>{dateFormatter.format(final)}</>;\n}\n\nfunction convertDateTime(value: DateTime, timeZone: any) {\n if ('timeZone' in value) {\n return value.toDate();\n } else if ('calendar' in value) {\n return value.toDate(timeZone);\n } else if (!(value instanceof Date)) { \n return convertValue(value).toDate(timeZone);\n }\n\n return value;\n}\n\nfunction convertValue(value: Time) {\n let date = today(getLocalTimeZone());\n\n return toCalendarDateTime(date, value);\n}\n\nlet _StaticField = React.forwardRef(StaticField);\nexport {_StaticField as StaticField};\n"],"names":[],"version":3,"file":"module.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AGAA,GAAmC;AACnC,GAAkD;AAClD,GAAwC;AACxC,GAA4C;AAC5C,GAA6B;AAC7B,GAA6C;AAL7C,yCAAmC,GAAG,CAA0B;AAChE,yCAAkD,GAAG,CAAyC;AAC9F,yCAAwC,GAAG,CAA+B;AAC1E,sCAA4C,GAAG,CAAmC;AAClF,yCAA6B,GAAG,CAAoB;AACpD,yCAA6C,GAAG,CAAoC;;;SDoB3E,8BAAQ,CAAC,KAAoB,EAAE,GAA2B,EAAE,CAAC;IACpE,GAAG,CAAC,CAAC,cACH,WAAW,iBACX,YAAY,oBACZ,eAAe,eACf,UAAU,kBACV,aAAa,qBACb,gBAAgB,sBAChB,iBAAiB,EACnB,CAAC,GAAG,KAAK;IACT,GAAG,CAAC,MAAM,GAAG,gBAAS,CAAC,GAAG;IAC1B,GAA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;QAGpC,CAAC;QAED,MAAM,0CACH,CAAG;eACE,UAAU;YACd,GAAG,EAAE,GAAG;YACR,SAAS,EAAE,iBAAiB;WAC3B,KAAK,6CACH,yCAAK;eACA,UAAU;YACd,aAAa,EAAE,aAAa;YAC5B,UAAU,EAAE,UAAU;YACtB,UAAU,EAAE,UAAU;YACtB,kBAAkB,EAAE,kBAAkB;YACtC,4CAA4C,EAAE,4CAA4C;YAC1F,WAAW,EAAE,WAAW;WACvB,KAAK,GAGT,cAAc;IAGrB,CAAC;IAED,MAAM,eAAC,YAAK,CAAC,YAAY,CAAC,QAAQ,EAAE,iBAAU,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;WAC3D,UAAU;QACb,GAAG,EAAE,UAAU;IACjB,CAAC;AACH,CAAC;SAEQ,kCAAY,IAAO,IAAI,EAAqD,CAAC;IACpF,MAAM,CAAC,kBAAW,CAChB,gBAAS,IAAI,IAAI,GACjB,CAAC;WAAG,IAAI;IAAA,CAAC;AAEb,CAAC;AAED,GAAG,CAAC,yCAAM,iBAAG,YAAK,CAAC,UAAU,CAAC,2BAAK","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/intl/*.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, 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, mergeRefs} from '@react-aria/utils';\nimport React, {ForwardedRef, ReactElement, RefObject, useCallback} 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 let mergedRefs = useMergeRefs((children as ReactElement & {ref: RefObject<HTMLElement>}).ref, ref);\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 (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 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: mergedRefs\n }));\n}\n\nfunction useMergeRefs<T>(...refs: ForwardedRef<T>[]): (instance: (T | null)) => void {\n return useCallback(\n mergeRefs(...refs) as (instance: (T | null)) => void,\n [...refs]\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(\"./ar-AE.json\");\nconst _temp1 = require(\"./bg-BG.json\");\nconst _temp2 = require(\"./cs-CZ.json\");\nconst _temp3 = require(\"./da-DK.json\");\nconst _temp4 = require(\"./de-DE.json\");\nconst _temp5 = require(\"./el-GR.json\");\nconst _temp6 = require(\"./en-US.json\");\nconst _temp7 = require(\"./es-ES.json\");\nconst _temp8 = require(\"./et-EE.json\");\nconst _temp9 = require(\"./fi-FI.json\");\nconst _temp10 = require(\"./fr-FR.json\");\nconst _temp11 = require(\"./he-IL.json\");\nconst _temp12 = require(\"./hr-HR.json\");\nconst _temp13 = require(\"./hu-HU.json\");\nconst _temp14 = require(\"./it-IT.json\");\nconst _temp15 = require(\"./ja-JP.json\");\nconst _temp16 = require(\"./ko-KR.json\");\nconst _temp17 = require(\"./lt-LT.json\");\nconst _temp18 = require(\"./lv-LV.json\");\nconst _temp19 = require(\"./nb-NO.json\");\nconst _temp20 = require(\"./nl-NL.json\");\nconst _temp21 = require(\"./pl-PL.json\");\nconst _temp22 = require(\"./pt-BR.json\");\nconst _temp23 = require(\"./pt-PT.json\");\nconst _temp24 = require(\"./ro-RO.json\");\nconst _temp25 = require(\"./ru-RU.json\");\nconst _temp26 = require(\"./sk-SK.json\");\nconst _temp27 = require(\"./sl-SI.json\");\nconst _temp28 = require(\"./sr-SP.json\");\nconst _temp29 = require(\"./sv-SE.json\");\nconst _temp30 = require(\"./tr-TR.json\");\nconst _temp31 = require(\"./uk-UA.json\");\nconst _temp32 = require(\"./zh-CN.json\");\nconst _temp33 = require(\"./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)\": \"(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\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,6 @@
1
- import { SpectrumHelpTextProps, StyleProps, AriaLabelingProps, DOMProps, RangeValue, SpectrumLabelableProps } from "@react-types/shared";
1
+ import { SpectrumHelpTextProps, StyleProps } from "@react-types/shared";
2
2
  import React, { HTMLAttributes } from "react";
3
3
  import { SpectrumLabelProps, SpectrumFieldProps } from "@react-types/label";
4
- import { CalendarDate, CalendarDateTime, Time, ZonedDateTime } from "@internationalized/date";
5
4
  interface HelpTextProps extends SpectrumHelpTextProps, StyleProps {
6
5
  /** Props for the help text description element. */
7
6
  descriptionProps?: HTMLAttributes<HTMLElement>;
@@ -14,31 +13,5 @@ interface HelpTextProps extends SpectrumHelpTextProps, StyleProps {
14
13
  export const HelpText: React.ForwardRefExoticComponent<HelpTextProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLDivElement>>>;
15
14
  export let Label: React.ForwardRefExoticComponent<SpectrumLabelProps & React.RefAttributes<import("@react-types/shared").DOMRefValue<HTMLLabelElement>>>;
16
15
  export let Field: React.ForwardRefExoticComponent<SpectrumFieldProps & React.RefAttributes<HTMLElement>>;
17
- interface StaticFieldBaseProps extends DOMProps, StyleProps, Omit<SpectrumLabelableProps, 'necessityIndicator' | 'isRequired'>, AriaLabelingProps {
18
- }
19
- type NumberValue = number | RangeValue<number>;
20
- interface NumberProps<T extends NumberValue> {
21
- value: T;
22
- formatOptions?: Intl.NumberFormatOptions;
23
- }
24
- type DateTime = Date | CalendarDate | CalendarDateTime | ZonedDateTime | Time;
25
- type RangeDateTime = RangeValue<DateTime>;
26
- type DateTimeValue = DateTime | RangeDateTime;
27
- interface DateProps<T extends DateTimeValue> {
28
- value: T;
29
- formatOptions?: Intl.DateTimeFormatOptions;
30
- }
31
- interface StringProps<T extends string> {
32
- value: T;
33
- formatOptions?: never;
34
- }
35
- interface StringListProps<T extends string[]> {
36
- value: T;
37
- formatOptions?: Intl.ListFormatOptions;
38
- }
39
- type StaticFieldProps<T> = T extends NumberValue ? NumberProps<T> : T extends DateTimeValue ? DateProps<T> : T extends string[] ? StringListProps<T> : T extends string ? StringProps<T> : never;
40
- type SpectrumStaticFieldTypes = string[] | string | Date | CalendarDate | CalendarDateTime | ZonedDateTime | Time | number | RangeValue<number> | RangeValue<DateTime>;
41
- type SpectrumStaticFieldProps<T> = StaticFieldProps<T> & StaticFieldBaseProps;
42
- export let StaticField: React.ForwardRefExoticComponent<SpectrumStaticFieldProps<SpectrumStaticFieldTypes> & React.RefAttributes<HTMLDivElement>>;
43
16
 
44
17
  //# sourceMappingURL=types.d.ts.map
@@ -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;ACsDrC,OAAA,IAAI,6FAAgC,CAAC;AChHrC,8BAA+B,SAAQ,QAAQ,EAAE,UAAU,EAAE,IAAI,CAAC,sBAAsB,EAAE,oBAAo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ages/@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/StaticField.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,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';\nexport {StaticField} from './StaticField';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
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;ACsDrC,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.7.1-nightly.3426+c03dc85b8",
3
+ "version": "3.7.1",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -32,19 +32,18 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@babel/runtime": "^7.6.2",
35
- "@internationalized/date": "3.0.2-nightly.3426+c03dc85b8",
36
- "@react-aria/i18n": "3.0.0-nightly.1726+c03dc85b8",
37
- "@react-aria/label": "3.0.0-nightly.1726+c03dc85b8",
38
- "@react-aria/utils": "3.0.0-nightly.1726+c03dc85b8",
39
- "@react-spectrum/form": "3.0.0-nightly.1726+c03dc85b8",
40
- "@react-spectrum/layout": "3.4.1-nightly.3426+c03dc85b8",
41
- "@react-spectrum/utils": "3.0.0-nightly.1726+c03dc85b8",
42
- "@react-types/label": "3.0.0-nightly.1726+c03dc85b8",
43
- "@react-types/shared": "3.0.0-nightly.1726+c03dc85b8",
44
- "@spectrum-icons/ui": "3.0.0-nightly.1726+c03dc85b8"
35
+ "@react-aria/i18n": "^3.6.0",
36
+ "@react-aria/label": "^3.4.1",
37
+ "@react-aria/utils": "^3.13.3",
38
+ "@react-spectrum/form": "^3.4.1",
39
+ "@react-spectrum/layout": "^3.4.1",
40
+ "@react-spectrum/utils": "^3.7.3",
41
+ "@react-types/label": "^3.6.3",
42
+ "@react-types/shared": "^3.14.1",
43
+ "@spectrum-icons/ui": "^3.3.2"
45
44
  },
46
45
  "devDependencies": {
47
- "@adobe/spectrum-css-temp": "3.0.0-nightly.1726+c03dc85b8"
46
+ "@adobe/spectrum-css-temp": "3.0.0-alpha.1"
48
47
  },
49
48
  "peerDependencies": {
50
49
  "@react-spectrum/provider": "^3.0.0",
@@ -53,5 +52,5 @@
53
52
  "publishConfig": {
54
53
  "access": "public"
55
54
  },
56
- "gitHead": "c03dc85b859e335eafcd32087c7ab8b3f49afc23"
55
+ "gitHead": "b03ef51e6317547dd0a840f151e59d039b1e1fd3"
57
56
  }
package/src/index.ts CHANGED
@@ -15,4 +15,3 @@
15
15
  export {Field} from './Field';
16
16
  export {Label} from './Label';
17
17
  export {HelpText} from './HelpText';
18
- export {StaticField} from './StaticField';
@@ -1,178 +0,0 @@
1
- /*
2
- * Copyright 2020 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
-
13
- import type {AriaLabelingProps, DOMProps, RangeValue, SpectrumLabelableProps, StyleProps} from '@react-types/shared';
14
- import {CalendarDate, CalendarDateTime, getLocalTimeZone, Time, toCalendarDateTime, today, ZonedDateTime} from '@internationalized/date';
15
- import {classNames} from '@react-spectrum/utils';
16
- import {filterDOMProps} from '@react-aria/utils';
17
- import {Label} from './Label';
18
- import labelStyles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';
19
- import React, {RefObject} from 'react';
20
- import {useDateFormatter, useListFormatter, useNumberFormatter} from '@react-aria/i18n';
21
- import {useStyleProps} from '@react-spectrum/utils';
22
-
23
- interface StaticFieldBaseProps extends DOMProps, StyleProps, Omit<SpectrumLabelableProps, 'necessityIndicator' | 'isRequired'>, AriaLabelingProps {}
24
-
25
- type NumberValue = number | RangeValue<number>;
26
- interface NumberProps<T extends NumberValue> {
27
- value: T,
28
- formatOptions?: Intl.NumberFormatOptions
29
- }
30
-
31
- type DateTime = Date | CalendarDate | CalendarDateTime | ZonedDateTime | Time;
32
- type RangeDateTime = RangeValue<DateTime>;
33
- type DateTimeValue = DateTime | RangeDateTime;
34
- interface DateProps<T extends DateTimeValue> {
35
- value: T,
36
- formatOptions?: Intl.DateTimeFormatOptions
37
- }
38
-
39
- interface StringProps<T extends string> {
40
- value: T,
41
- formatOptions?: never
42
- }
43
-
44
- interface StringListProps<T extends string[]> {
45
- value: T,
46
- // @ts-ignore
47
- formatOptions?: Intl.ListFormatOptions
48
- }
49
-
50
- type StaticFieldProps<T> =
51
- T extends NumberValue ? NumberProps<T> :
52
- T extends DateTimeValue ? DateProps<T> :
53
- T extends string[] ? StringListProps<T> :
54
- T extends string ? StringProps<T> :
55
- never;
56
-
57
- export type SpectrumStaticFieldTypes = string[] | string | Date | CalendarDate | CalendarDateTime | ZonedDateTime | Time | number | RangeValue<number> | RangeValue<DateTime>;
58
- export type SpectrumStaticFieldProps<T> = StaticFieldProps<T> & StaticFieldBaseProps;
59
-
60
- function StaticField<T extends SpectrumStaticFieldTypes>(props: SpectrumStaticFieldProps<T>, ref: RefObject<HTMLDivElement>) {
61
- let {
62
- value,
63
- formatOptions,
64
- labelPosition,
65
- labelAlign,
66
- label,
67
- ...otherProps
68
- } = props;
69
- let {styleProps} = useStyleProps(otherProps);
70
- let labelWrapperClass = classNames(
71
- labelStyles,
72
- 'spectrum-Field',
73
- {
74
- 'spectrum-Field--positionTop': labelPosition === 'top',
75
- 'spectrum-Field--positionSide': labelPosition === 'side'
76
- }
77
- );
78
-
79
- return (
80
- <div
81
- {...filterDOMProps(props)}
82
- {...styleProps}
83
- className={classNames(labelStyles, 'spectrum-StaticField', {[labelWrapperClass]: label}, styleProps.className)}
84
- ref={ref}>
85
- {props.label &&
86
- <Label
87
- labelPosition={labelPosition}
88
- labelAlign={labelAlign}
89
- elementType="span">
90
- {props.label}
91
- </Label>}
92
- <div
93
- className={classNames(labelStyles, 'spectrum-Field-wrapper')}>
94
- <div
95
- className={classNames(labelStyles, 'spectrum-Field-field')}>
96
- {Array.isArray(value) &&
97
- // @ts-ignore
98
- <FormattedStringList value={value} formatOptions={formatOptions as Intl.ListFormatOptions} />}
99
-
100
- {typeof value === 'object' && 'start' in value && typeof value.start === 'number' && typeof value.end === 'number' &&
101
- <FormattedNumber value={value as NumberValue} formatOptions={formatOptions as Intl.NumberFormatOptions} />}
102
-
103
- {typeof value === 'object' && 'start' in value && typeof value.start !== 'number' && typeof value.end !== 'number' &&
104
- <FormattedDate value={value as DateTimeValue} formatOptions={formatOptions as Intl.DateTimeFormatOptions} />}
105
-
106
- {typeof value === 'number' &&
107
- <FormattedNumber value={value} formatOptions={formatOptions as Intl.NumberFormatOptions} />}
108
-
109
- {(typeof value === 'object' && ('calendar' in value || 'hour' in value) || (value instanceof Date)) &&
110
- <FormattedDate value={value} formatOptions={formatOptions as Intl.DateTimeFormatOptions} />}
111
-
112
- {typeof value === 'string' &&
113
- value}
114
- </div>
115
- </div>
116
- </div>
117
- );
118
- }
119
-
120
- function FormattedStringList<T extends string[]>(props: StringListProps<T>) {
121
- let stringFormatter = useListFormatter(props.formatOptions);
122
-
123
- return (
124
- <>{stringFormatter.format(props.value)}</>
125
- );
126
- }
127
-
128
- function FormattedNumber<T extends NumberValue>(props: NumberProps<T>) {
129
- let numberFormatter = useNumberFormatter(props.formatOptions);
130
- let value = props.value;
131
-
132
- if (typeof value === 'object') {
133
- return <>{numberFormatter.formatRange(value.start, value.end)}</>;
134
- }
135
-
136
- return <>{numberFormatter.format(value)}</>;
137
- }
138
-
139
- function FormattedDate<T extends DateTimeValue>(props: DateProps<T>) {
140
- let dateFormatter = useDateFormatter(props.formatOptions);
141
- let value = props.value;
142
- let timeZone = dateFormatter.resolvedOptions().timeZone || getLocalTimeZone();
143
- let final;
144
-
145
- if ('start' in value && 'end' in value) {
146
- let start = value.start;
147
- let end = value.end;
148
-
149
- start = convertDateTime(start, timeZone);
150
- end = convertDateTime(end, timeZone);
151
-
152
- return <>{dateFormatter.formatRange(start, end)}</>;
153
- }
154
-
155
- final = convertDateTime(value, timeZone);
156
- return <>{dateFormatter.format(final)}</>;
157
- }
158
-
159
- function convertDateTime(value: DateTime, timeZone: any) {
160
- if ('timeZone' in value) {
161
- return value.toDate();
162
- } else if ('calendar' in value) {
163
- return value.toDate(timeZone);
164
- } else if (!(value instanceof Date)) {
165
- return convertValue(value).toDate(timeZone);
166
- }
167
-
168
- return value;
169
- }
170
-
171
- function convertValue(value: Time) {
172
- let date = today(getLocalTimeZone());
173
-
174
- return toCalendarDateTime(date, value);
175
- }
176
-
177
- let _StaticField = React.forwardRef(StaticField);
178
- export {_StaticField as StaticField};