@react-spectrum/label 3.16.22 → 3.17.0

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.
Files changed (217) hide show
  1. package/dist/import.mjs +4 -4
  2. package/dist/main.js +6 -6
  3. package/dist/main.js.map +1 -1
  4. package/dist/module.js +4 -4
  5. package/dist/module.js.map +1 -1
  6. package/dist/types/src/index.d.ts +5 -0
  7. package/package.json +12 -32
  8. package/src/index.ts +6 -3
  9. package/dist/Field.main.js +0 -117
  10. package/dist/Field.main.js.map +0 -1
  11. package/dist/Field.mjs +0 -112
  12. package/dist/Field.module.js +0 -112
  13. package/dist/Field.module.js.map +0 -1
  14. package/dist/HelpText.main.js +0 -54
  15. package/dist/HelpText.main.js.map +0 -1
  16. package/dist/HelpText.mjs +0 -49
  17. package/dist/HelpText.module.js +0 -49
  18. package/dist/HelpText.module.js.map +0 -1
  19. package/dist/Label.main.js +0 -67
  20. package/dist/Label.main.js.map +0 -1
  21. package/dist/Label.mjs +0 -62
  22. package/dist/Label.module.js +0 -62
  23. package/dist/Label.module.js.map +0 -1
  24. package/dist/ar-AE.main.js +0 -7
  25. package/dist/ar-AE.main.js.map +0 -1
  26. package/dist/ar-AE.mjs +0 -9
  27. package/dist/ar-AE.module.js +0 -9
  28. package/dist/ar-AE.module.js.map +0 -1
  29. package/dist/bg-BG.main.js +0 -7
  30. package/dist/bg-BG.main.js.map +0 -1
  31. package/dist/bg-BG.mjs +0 -9
  32. package/dist/bg-BG.module.js +0 -9
  33. package/dist/bg-BG.module.js.map +0 -1
  34. package/dist/cs-CZ.main.js +0 -7
  35. package/dist/cs-CZ.main.js.map +0 -1
  36. package/dist/cs-CZ.mjs +0 -9
  37. package/dist/cs-CZ.module.js +0 -9
  38. package/dist/cs-CZ.module.js.map +0 -1
  39. package/dist/da-DK.main.js +0 -7
  40. package/dist/da-DK.main.js.map +0 -1
  41. package/dist/da-DK.mjs +0 -9
  42. package/dist/da-DK.module.js +0 -9
  43. package/dist/da-DK.module.js.map +0 -1
  44. package/dist/de-DE.main.js +0 -7
  45. package/dist/de-DE.main.js.map +0 -1
  46. package/dist/de-DE.mjs +0 -9
  47. package/dist/de-DE.module.js +0 -9
  48. package/dist/de-DE.module.js.map +0 -1
  49. package/dist/el-GR.main.js +0 -7
  50. package/dist/el-GR.main.js.map +0 -1
  51. package/dist/el-GR.mjs +0 -9
  52. package/dist/el-GR.module.js +0 -9
  53. package/dist/el-GR.module.js.map +0 -1
  54. package/dist/en-US.main.js +0 -7
  55. package/dist/en-US.main.js.map +0 -1
  56. package/dist/en-US.mjs +0 -9
  57. package/dist/en-US.module.js +0 -9
  58. package/dist/en-US.module.js.map +0 -1
  59. package/dist/es-ES.main.js +0 -7
  60. package/dist/es-ES.main.js.map +0 -1
  61. package/dist/es-ES.mjs +0 -9
  62. package/dist/es-ES.module.js +0 -9
  63. package/dist/es-ES.module.js.map +0 -1
  64. package/dist/et-EE.main.js +0 -7
  65. package/dist/et-EE.main.js.map +0 -1
  66. package/dist/et-EE.mjs +0 -9
  67. package/dist/et-EE.module.js +0 -9
  68. package/dist/et-EE.module.js.map +0 -1
  69. package/dist/fi-FI.main.js +0 -7
  70. package/dist/fi-FI.main.js.map +0 -1
  71. package/dist/fi-FI.mjs +0 -9
  72. package/dist/fi-FI.module.js +0 -9
  73. package/dist/fi-FI.module.js.map +0 -1
  74. package/dist/fieldlabel_vars_css.main.js +0 -95
  75. package/dist/fieldlabel_vars_css.main.js.map +0 -1
  76. package/dist/fieldlabel_vars_css.mjs +0 -97
  77. package/dist/fieldlabel_vars_css.module.js +0 -97
  78. package/dist/fieldlabel_vars_css.module.js.map +0 -1
  79. package/dist/fr-FR.main.js +0 -7
  80. package/dist/fr-FR.main.js.map +0 -1
  81. package/dist/fr-FR.mjs +0 -9
  82. package/dist/fr-FR.module.js +0 -9
  83. package/dist/fr-FR.module.js.map +0 -1
  84. package/dist/he-IL.main.js +0 -7
  85. package/dist/he-IL.main.js.map +0 -1
  86. package/dist/he-IL.mjs +0 -9
  87. package/dist/he-IL.module.js +0 -9
  88. package/dist/he-IL.module.js.map +0 -1
  89. package/dist/helptext_vars_css.main.js +0 -41
  90. package/dist/helptext_vars_css.main.js.map +0 -1
  91. package/dist/helptext_vars_css.mjs +0 -43
  92. package/dist/helptext_vars_css.module.js +0 -43
  93. package/dist/helptext_vars_css.module.js.map +0 -1
  94. package/dist/hr-HR.main.js +0 -7
  95. package/dist/hr-HR.main.js.map +0 -1
  96. package/dist/hr-HR.mjs +0 -9
  97. package/dist/hr-HR.module.js +0 -9
  98. package/dist/hr-HR.module.js.map +0 -1
  99. package/dist/hu-HU.main.js +0 -7
  100. package/dist/hu-HU.main.js.map +0 -1
  101. package/dist/hu-HU.mjs +0 -9
  102. package/dist/hu-HU.module.js +0 -9
  103. package/dist/hu-HU.module.js.map +0 -1
  104. package/dist/intlStrings.main.js +0 -108
  105. package/dist/intlStrings.main.js.map +0 -1
  106. package/dist/intlStrings.mjs +0 -110
  107. package/dist/intlStrings.module.js +0 -110
  108. package/dist/intlStrings.module.js.map +0 -1
  109. package/dist/it-IT.main.js +0 -7
  110. package/dist/it-IT.main.js.map +0 -1
  111. package/dist/it-IT.mjs +0 -9
  112. package/dist/it-IT.module.js +0 -9
  113. package/dist/it-IT.module.js.map +0 -1
  114. package/dist/ja-JP.main.js +0 -7
  115. package/dist/ja-JP.main.js.map +0 -1
  116. package/dist/ja-JP.mjs +0 -9
  117. package/dist/ja-JP.module.js +0 -9
  118. package/dist/ja-JP.module.js.map +0 -1
  119. package/dist/ko-KR.main.js +0 -7
  120. package/dist/ko-KR.main.js.map +0 -1
  121. package/dist/ko-KR.mjs +0 -9
  122. package/dist/ko-KR.module.js +0 -9
  123. package/dist/ko-KR.module.js.map +0 -1
  124. package/dist/label.16985598.css +0 -117
  125. package/dist/label.16985598.css.map +0 -1
  126. package/dist/label.fb8aa6a3.css +0 -271
  127. package/dist/label.fb8aa6a3.css.map +0 -1
  128. package/dist/lt-LT.main.js +0 -7
  129. package/dist/lt-LT.main.js.map +0 -1
  130. package/dist/lt-LT.mjs +0 -9
  131. package/dist/lt-LT.module.js +0 -9
  132. package/dist/lt-LT.module.js.map +0 -1
  133. package/dist/lv-LV.main.js +0 -7
  134. package/dist/lv-LV.main.js.map +0 -1
  135. package/dist/lv-LV.mjs +0 -9
  136. package/dist/lv-LV.module.js +0 -9
  137. package/dist/lv-LV.module.js.map +0 -1
  138. package/dist/nb-NO.main.js +0 -7
  139. package/dist/nb-NO.main.js.map +0 -1
  140. package/dist/nb-NO.mjs +0 -9
  141. package/dist/nb-NO.module.js +0 -9
  142. package/dist/nb-NO.module.js.map +0 -1
  143. package/dist/nl-NL.main.js +0 -7
  144. package/dist/nl-NL.main.js.map +0 -1
  145. package/dist/nl-NL.mjs +0 -9
  146. package/dist/nl-NL.module.js +0 -9
  147. package/dist/nl-NL.module.js.map +0 -1
  148. package/dist/pl-PL.main.js +0 -7
  149. package/dist/pl-PL.main.js.map +0 -1
  150. package/dist/pl-PL.mjs +0 -9
  151. package/dist/pl-PL.module.js +0 -9
  152. package/dist/pl-PL.module.js.map +0 -1
  153. package/dist/pt-BR.main.js +0 -7
  154. package/dist/pt-BR.main.js.map +0 -1
  155. package/dist/pt-BR.mjs +0 -9
  156. package/dist/pt-BR.module.js +0 -9
  157. package/dist/pt-BR.module.js.map +0 -1
  158. package/dist/pt-PT.main.js +0 -7
  159. package/dist/pt-PT.main.js.map +0 -1
  160. package/dist/pt-PT.mjs +0 -9
  161. package/dist/pt-PT.module.js +0 -9
  162. package/dist/pt-PT.module.js.map +0 -1
  163. package/dist/ro-RO.main.js +0 -7
  164. package/dist/ro-RO.main.js.map +0 -1
  165. package/dist/ro-RO.mjs +0 -9
  166. package/dist/ro-RO.module.js +0 -9
  167. package/dist/ro-RO.module.js.map +0 -1
  168. package/dist/ru-RU.main.js +0 -7
  169. package/dist/ru-RU.main.js.map +0 -1
  170. package/dist/ru-RU.mjs +0 -9
  171. package/dist/ru-RU.module.js +0 -9
  172. package/dist/ru-RU.module.js.map +0 -1
  173. package/dist/sk-SK.main.js +0 -7
  174. package/dist/sk-SK.main.js.map +0 -1
  175. package/dist/sk-SK.mjs +0 -9
  176. package/dist/sk-SK.module.js +0 -9
  177. package/dist/sk-SK.module.js.map +0 -1
  178. package/dist/sl-SI.main.js +0 -7
  179. package/dist/sl-SI.main.js.map +0 -1
  180. package/dist/sl-SI.mjs +0 -9
  181. package/dist/sl-SI.module.js +0 -9
  182. package/dist/sl-SI.module.js.map +0 -1
  183. package/dist/sr-SP.main.js +0 -7
  184. package/dist/sr-SP.main.js.map +0 -1
  185. package/dist/sr-SP.mjs +0 -9
  186. package/dist/sr-SP.module.js +0 -9
  187. package/dist/sr-SP.module.js.map +0 -1
  188. package/dist/sv-SE.main.js +0 -7
  189. package/dist/sv-SE.main.js.map +0 -1
  190. package/dist/sv-SE.mjs +0 -9
  191. package/dist/sv-SE.module.js +0 -9
  192. package/dist/sv-SE.module.js.map +0 -1
  193. package/dist/tr-TR.main.js +0 -7
  194. package/dist/tr-TR.main.js.map +0 -1
  195. package/dist/tr-TR.mjs +0 -9
  196. package/dist/tr-TR.module.js +0 -9
  197. package/dist/tr-TR.module.js.map +0 -1
  198. package/dist/types.d.ts +0 -19
  199. package/dist/types.d.ts.map +0 -1
  200. package/dist/uk-UA.main.js +0 -7
  201. package/dist/uk-UA.main.js.map +0 -1
  202. package/dist/uk-UA.mjs +0 -9
  203. package/dist/uk-UA.module.js +0 -9
  204. package/dist/uk-UA.module.js.map +0 -1
  205. package/dist/zh-CN.main.js +0 -7
  206. package/dist/zh-CN.main.js.map +0 -1
  207. package/dist/zh-CN.mjs +0 -9
  208. package/dist/zh-CN.module.js +0 -9
  209. package/dist/zh-CN.module.js.map +0 -1
  210. package/dist/zh-TW.main.js +0 -7
  211. package/dist/zh-TW.main.js.map +0 -1
  212. package/dist/zh-TW.mjs +0 -9
  213. package/dist/zh-TW.module.js +0 -9
  214. package/dist/zh-TW.module.js.map +0 -1
  215. package/src/Field.tsx +0 -177
  216. package/src/HelpText.tsx +0 -71
  217. package/src/Label.tsx +0 -79
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAoBM,MAAM,0DAAW,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,SAAS,KAAoB,EAAE,GAA2B;IAC1G,IAAI,eACF,WAAW,gBACX,YAAY,mBACZ,eAAe,aACf,SAAS,cACT,UAAU,iBACV,aAAa,oBACb,gBAAgB,qBAChB,iBAAiB,EAClB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,iBAAiB,gBAAiB,CAAA,aAAa,oBAAoB,SAAQ;IAC/E,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,qBACE,0DAAC;QACE,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,oCAAS,EAClB,CAAA,GAAA,mDAAK,GACL,qBACA,CAAC,mBAAmB,EAAE,iBAAiB,aAAa,WAAW,EAC/D;YAAC,eAAe;QAAU,GAC1B,WAAW,SAAS;QAEtB,KAAK;OACJ,+BACC,sHACG,+BAAiB,0DAAC,CAAA,GAAA,2DAAU;QAAE,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;sBACpE,0DAAC;QAAK,GAAG,iBAAiB;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OACvD,+BAIL,0DAAC;QAAK,GAAG,gBAAgB;QAAE,WAAW,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;OACtD;AAKX","sources":["packages/@react-spectrum/label/src/HelpText.tsx"],"sourcesContent":["/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumFieldValidation, SpectrumHelpTextProps, StyleProps, Validation} from '@react-types/shared';\nimport React, {HTMLAttributes, ReactNode} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/helptext/vars.css';\n\ninterface HelpTextProps extends Omit<SpectrumHelpTextProps, 'errorMessage'>, Omit<Validation<any>, 'validationState'>, SpectrumFieldValidation<any>, StyleProps {\n /** Props for the help text description element. */\n descriptionProps?: HTMLAttributes<HTMLElement>,\n /** Props for the help text error message element. */\n errorMessageProps?: HTMLAttributes<HTMLElement>,\n /** An error message for the field. */\n errorMessage?: ReactNode\n}\n\n/**\n * Help text provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms.\n */\nexport const HelpText = React.forwardRef(function HelpText(props: HelpTextProps, ref: DOMRef<HTMLDivElement>) {\n let {\n description,\n errorMessage,\n validationState,\n isInvalid,\n isDisabled,\n showErrorIcon,\n descriptionProps,\n errorMessageProps\n } = props;\n let domRef = useDOMRef(ref);\n let isErrorMessage = errorMessage && (isInvalid || validationState === 'invalid');\n let {styleProps} = useStyleProps(props);\n\n return (\n <div\n {...styleProps}\n className={classNames(\n styles,\n 'spectrum-HelpText',\n `spectrum-HelpText--${isErrorMessage ? 'negative' : 'neutral'}`,\n {'is-disabled': isDisabled},\n styleProps.className\n )}\n ref={domRef}>\n {isErrorMessage ? (\n <>\n {showErrorIcon && <AlertMedium UNSAFE_className={classNames(styles, 'spectrum-HelpText-validationIcon')} />}\n <div {...errorMessageProps} className={classNames(styles, 'spectrum-HelpText-text')}>\n {errorMessage}\n </div>\n </>\n ) : (\n <div {...descriptionProps} className={classNames(styles, 'spectrum-HelpText-text')}>\n {description}\n </div>\n )}\n </div>\n );\n});\n"],"names":[],"version":3,"file":"HelpText.main.js.map"}
package/dist/HelpText.mjs DELETED
@@ -1,49 +0,0 @@
1
- import "./label.16985598.css";
2
- import $huWmf$helptext_vars_cssmodulejs from "./helptext_vars_css.mjs";
3
- import $huWmf$spectrumiconsuiAlertMedium from "@spectrum-icons/ui/AlertMedium";
4
- import {useDOMRef as $huWmf$useDOMRef, useStyleProps as $huWmf$useStyleProps, classNames as $huWmf$classNames} from "@react-spectrum/utils";
5
- import $huWmf$react from "react";
6
-
7
-
8
- function $parcel$interopDefault(a) {
9
- return a && a.__esModule ? a.default : a;
10
- }
11
- /*
12
- * Copyright 2021 Adobe. All rights reserved.
13
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
14
- * you may not use this file except in compliance with the License. You may obtain a copy
15
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
16
- *
17
- * Unless required by applicable law or agreed to in writing, software distributed under
18
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
19
- * OF ANY KIND, either express or implied. See the License for the specific language
20
- * governing permissions and limitations under the License.
21
- */
22
-
23
-
24
-
25
- const $8e50676506611310$export$a67c0bc59081311a = /*#__PURE__*/ (0, $huWmf$react).forwardRef(function HelpText(props, ref) {
26
- let { description: description, errorMessage: errorMessage, validationState: validationState, isInvalid: isInvalid, isDisabled: isDisabled, showErrorIcon: showErrorIcon, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = props;
27
- let domRef = (0, $huWmf$useDOMRef)(ref);
28
- let isErrorMessage = errorMessage && (isInvalid || validationState === 'invalid');
29
- let { styleProps: styleProps } = (0, $huWmf$useStyleProps)(props);
30
- return /*#__PURE__*/ (0, $huWmf$react).createElement("div", {
31
- ...styleProps,
32
- className: (0, $huWmf$classNames)((0, ($parcel$interopDefault($huWmf$helptext_vars_cssmodulejs))), 'spectrum-HelpText', `spectrum-HelpText--${isErrorMessage ? 'negative' : 'neutral'}`, {
33
- 'is-disabled': isDisabled
34
- }, styleProps.className),
35
- ref: domRef
36
- }, isErrorMessage ? /*#__PURE__*/ (0, $huWmf$react).createElement((0, $huWmf$react).Fragment, null, showErrorIcon && /*#__PURE__*/ (0, $huWmf$react).createElement((0, $huWmf$spectrumiconsuiAlertMedium), {
37
- UNSAFE_className: (0, $huWmf$classNames)((0, ($parcel$interopDefault($huWmf$helptext_vars_cssmodulejs))), 'spectrum-HelpText-validationIcon')
38
- }), /*#__PURE__*/ (0, $huWmf$react).createElement("div", {
39
- ...errorMessageProps,
40
- className: (0, $huWmf$classNames)((0, ($parcel$interopDefault($huWmf$helptext_vars_cssmodulejs))), 'spectrum-HelpText-text')
41
- }, errorMessage)) : /*#__PURE__*/ (0, $huWmf$react).createElement("div", {
42
- ...descriptionProps,
43
- className: (0, $huWmf$classNames)((0, ($parcel$interopDefault($huWmf$helptext_vars_cssmodulejs))), 'spectrum-HelpText-text')
44
- }, description));
45
- });
46
-
47
-
48
- export {$8e50676506611310$export$a67c0bc59081311a as HelpText};
49
- //# sourceMappingURL=HelpText.module.js.map
@@ -1,49 +0,0 @@
1
- import "./label.16985598.css";
2
- import $huWmf$helptext_vars_cssmodulejs from "./helptext_vars_css.module.js";
3
- import $huWmf$spectrumiconsuiAlertMedium from "@spectrum-icons/ui/AlertMedium";
4
- import {useDOMRef as $huWmf$useDOMRef, useStyleProps as $huWmf$useStyleProps, classNames as $huWmf$classNames} from "@react-spectrum/utils";
5
- import $huWmf$react from "react";
6
-
7
-
8
- function $parcel$interopDefault(a) {
9
- return a && a.__esModule ? a.default : a;
10
- }
11
- /*
12
- * Copyright 2021 Adobe. All rights reserved.
13
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
14
- * you may not use this file except in compliance with the License. You may obtain a copy
15
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
16
- *
17
- * Unless required by applicable law or agreed to in writing, software distributed under
18
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
19
- * OF ANY KIND, either express or implied. See the License for the specific language
20
- * governing permissions and limitations under the License.
21
- */
22
-
23
-
24
-
25
- const $8e50676506611310$export$a67c0bc59081311a = /*#__PURE__*/ (0, $huWmf$react).forwardRef(function HelpText(props, ref) {
26
- let { description: description, errorMessage: errorMessage, validationState: validationState, isInvalid: isInvalid, isDisabled: isDisabled, showErrorIcon: showErrorIcon, descriptionProps: descriptionProps, errorMessageProps: errorMessageProps } = props;
27
- let domRef = (0, $huWmf$useDOMRef)(ref);
28
- let isErrorMessage = errorMessage && (isInvalid || validationState === 'invalid');
29
- let { styleProps: styleProps } = (0, $huWmf$useStyleProps)(props);
30
- return /*#__PURE__*/ (0, $huWmf$react).createElement("div", {
31
- ...styleProps,
32
- className: (0, $huWmf$classNames)((0, ($parcel$interopDefault($huWmf$helptext_vars_cssmodulejs))), 'spectrum-HelpText', `spectrum-HelpText--${isErrorMessage ? 'negative' : 'neutral'}`, {
33
- 'is-disabled': isDisabled
34
- }, styleProps.className),
35
- ref: domRef
36
- }, isErrorMessage ? /*#__PURE__*/ (0, $huWmf$react).createElement((0, $huWmf$react).Fragment, null, showErrorIcon && /*#__PURE__*/ (0, $huWmf$react).createElement((0, $huWmf$spectrumiconsuiAlertMedium), {
37
- UNSAFE_className: (0, $huWmf$classNames)((0, ($parcel$interopDefault($huWmf$helptext_vars_cssmodulejs))), 'spectrum-HelpText-validationIcon')
38
- }), /*#__PURE__*/ (0, $huWmf$react).createElement("div", {
39
- ...errorMessageProps,
40
- className: (0, $huWmf$classNames)((0, ($parcel$interopDefault($huWmf$helptext_vars_cssmodulejs))), 'spectrum-HelpText-text')
41
- }, errorMessage)) : /*#__PURE__*/ (0, $huWmf$react).createElement("div", {
42
- ...descriptionProps,
43
- className: (0, $huWmf$classNames)((0, ($parcel$interopDefault($huWmf$helptext_vars_cssmodulejs))), 'spectrum-HelpText-text')
44
- }, description));
45
- });
46
-
47
-
48
- export {$8e50676506611310$export$a67c0bc59081311a as HelpText};
49
- //# sourceMappingURL=HelpText.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;AAoBM,MAAM,0DAAW,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,SAAS,KAAoB,EAAE,GAA2B;IAC1G,IAAI,eACF,WAAW,gBACX,YAAY,mBACZ,eAAe,aACf,SAAS,cACT,UAAU,iBACV,aAAa,oBACb,gBAAgB,qBAChB,iBAAiB,EAClB,GAAG;IACJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,iBAAiB,gBAAiB,CAAA,aAAa,oBAAoB,SAAQ;IAC/E,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IAEjC,qBACE,gCAAC;QACE,GAAG,UAAU;QACd,WAAW,CAAA,GAAA,iBAAS,EAClB,CAAA,GAAA,0DAAK,GACL,qBACA,CAAC,mBAAmB,EAAE,iBAAiB,aAAa,WAAW,EAC/D;YAAC,eAAe;QAAU,GAC1B,WAAW,SAAS;QAEtB,KAAK;OACJ,+BACC,kEACG,+BAAiB,gCAAC,CAAA,GAAA,iCAAU;QAAE,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;sBACpE,gCAAC;QAAK,GAAG,iBAAiB;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;OACvD,+BAIL,gCAAC;QAAK,GAAG,gBAAgB;QAAE,WAAW,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,0DAAK,GAAG;OACtD;AAKX","sources":["packages/@react-spectrum/label/src/HelpText.tsx"],"sourcesContent":["/*\n * Copyright 2021 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport AlertMedium from '@spectrum-icons/ui/AlertMedium';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef, SpectrumFieldValidation, SpectrumHelpTextProps, StyleProps, Validation} from '@react-types/shared';\nimport React, {HTMLAttributes, ReactNode} from 'react';\nimport styles from '@adobe/spectrum-css-temp/components/helptext/vars.css';\n\ninterface HelpTextProps extends Omit<SpectrumHelpTextProps, 'errorMessage'>, Omit<Validation<any>, 'validationState'>, SpectrumFieldValidation<any>, StyleProps {\n /** Props for the help text description element. */\n descriptionProps?: HTMLAttributes<HTMLElement>,\n /** Props for the help text error message element. */\n errorMessageProps?: HTMLAttributes<HTMLElement>,\n /** An error message for the field. */\n errorMessage?: ReactNode\n}\n\n/**\n * Help text provides either an informative description or an error message that gives more context about what a user needs to input. It's commonly used in forms.\n */\nexport const HelpText = React.forwardRef(function HelpText(props: HelpTextProps, ref: DOMRef<HTMLDivElement>) {\n let {\n description,\n errorMessage,\n validationState,\n isInvalid,\n isDisabled,\n showErrorIcon,\n descriptionProps,\n errorMessageProps\n } = props;\n let domRef = useDOMRef(ref);\n let isErrorMessage = errorMessage && (isInvalid || validationState === 'invalid');\n let {styleProps} = useStyleProps(props);\n\n return (\n <div\n {...styleProps}\n className={classNames(\n styles,\n 'spectrum-HelpText',\n `spectrum-HelpText--${isErrorMessage ? 'negative' : 'neutral'}`,\n {'is-disabled': isDisabled},\n styleProps.className\n )}\n ref={domRef}>\n {isErrorMessage ? (\n <>\n {showErrorIcon && <AlertMedium UNSAFE_className={classNames(styles, 'spectrum-HelpText-validationIcon')} />}\n <div {...errorMessageProps} className={classNames(styles, 'spectrum-HelpText-text')}>\n {errorMessage}\n </div>\n </>\n ) : (\n <div {...descriptionProps} className={classNames(styles, 'spectrum-HelpText-text')}>\n {description}\n </div>\n )}\n </div>\n );\n});\n"],"names":[],"version":3,"file":"HelpText.module.js.map"}
@@ -1,67 +0,0 @@
1
- var $503911526ad50850$exports = require("./intlStrings.main.js");
2
- require("./label.fb8aa6a3.css");
3
- var $eb2fc0ee655eff6b$exports = require("./fieldlabel_vars_css.main.js");
4
- var $cF5V3$spectrumiconsuiAsterisk = require("@spectrum-icons/ui/Asterisk");
5
- var $cF5V3$reactspectrumutils = require("@react-spectrum/utils");
6
- var $cF5V3$reactariautils = require("@react-aria/utils");
7
- var $cF5V3$react = require("react");
8
- var $cF5V3$reactariai18n = require("@react-aria/i18n");
9
- var $cF5V3$reactspectrumprovider = require("@react-spectrum/provider");
10
-
11
-
12
- function $parcel$interopDefault(a) {
13
- return a && a.__esModule ? a.default : a;
14
- }
15
-
16
- function $parcel$export(e, n, v, s) {
17
- Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
18
- }
19
-
20
- $parcel$export(module.exports, "Label", () => $38a9afbd39356629$export$b04be29aa201d4f5);
21
- /*
22
- * Copyright 2020 Adobe. All rights reserved.
23
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
24
- * you may not use this file except in compliance with the License. You may obtain a copy
25
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
26
- *
27
- * Unless required by applicable law or agreed to in writing, software distributed under
28
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
29
- * OF ANY KIND, either express or implied. See the License for the specific language
30
- * governing permissions and limitations under the License.
31
- */
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
- const $38a9afbd39356629$export$b04be29aa201d4f5 = /*#__PURE__*/ (0, ($parcel$interopDefault($cF5V3$react))).forwardRef(function Label(props, ref) {
40
- props = (0, $cF5V3$reactspectrumprovider.useProviderProps)(props);
41
- let { children: children, labelPosition: labelPosition = 'top', labelAlign: labelAlign = labelPosition === 'side' ? 'start' : null, isRequired: isRequired, necessityIndicator: necessityIndicator = isRequired != null ? 'icon' : null, includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName = false, htmlFor: htmlFor, for: labelFor, elementType: ElementType = 'label', onClick: onClick, ...otherProps } = props;
42
- let domRef = (0, $cF5V3$reactspectrumutils.useDOMRef)(ref);
43
- let { styleProps: styleProps } = (0, $cF5V3$reactspectrumutils.useStyleProps)(otherProps);
44
- let stringFormatter = (0, $cF5V3$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($503911526ad50850$exports))), '@react-spectrum/label');
45
- let necessityLabel = isRequired ? stringFormatter.format('(required)') : stringFormatter.format('(optional)');
46
- let icon = /*#__PURE__*/ (0, ($parcel$interopDefault($cF5V3$react))).createElement((0, ($parcel$interopDefault($cF5V3$spectrumiconsuiAsterisk))), {
47
- UNSAFE_className: (0, $cF5V3$reactspectrumutils.classNames)((0, ($parcel$interopDefault($eb2fc0ee655eff6b$exports))), 'spectrum-FieldLabel-requiredIcon'),
48
- "aria-label": includeNecessityIndicatorInAccessibilityName ? stringFormatter.format('(required)') : undefined
49
- });
50
- let labelClassNames = (0, $cF5V3$reactspectrumutils.classNames)((0, ($parcel$interopDefault($eb2fc0ee655eff6b$exports))), 'spectrum-FieldLabel', {
51
- 'spectrum-FieldLabel--positionSide': labelPosition === 'side',
52
- 'spectrum-FieldLabel--alignEnd': labelAlign === 'end'
53
- }, styleProps.className);
54
- return /*#__PURE__*/ (0, ($parcel$interopDefault($cF5V3$react))).createElement(ElementType, {
55
- ...(0, $cF5V3$reactariautils.filterDOMProps)(otherProps),
56
- ...styleProps,
57
- onClick: onClick,
58
- ref: domRef,
59
- className: labelClassNames,
60
- htmlFor: ElementType === 'label' ? labelFor || htmlFor : undefined
61
- }, children, (necessityIndicator === 'label' || necessityIndicator === 'icon' && isRequired) && ' \u200b', necessityIndicator === 'label' && /*#__PURE__*/ (0, ($parcel$interopDefault($cF5V3$react))).createElement("span", {
62
- "aria-hidden": !includeNecessityIndicatorInAccessibilityName ? isRequired : undefined
63
- }, necessityLabel), necessityIndicator === 'icon' && isRequired && icon);
64
- });
65
-
66
-
67
- //# sourceMappingURL=Label.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAcM,MAAM,0DAAQ,CAAA,GAAA,sCAAI,EAAE,UAAU,CAAC,SAAS,MAAM,KAAyB,EAAE,GAA6B;IAC3G,QAAQ,CAAA,GAAA,6CAAe,EAAE;IACzB,IAAI,YACF,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,kBAAkB,SAAS,UAAU,kBAClD,UAAU,sBACV,qBAAqB,cAAc,OAAO,SAAS,oDACnD,+CAA+C,gBAC/C,OAAO,EACP,KAAK,QAAQ,EACb,aAAa,cAAc,OAAO,WAClC,OAAO,EACP,GAAG,YACJ,GAAG;IAEJ,IAAI,SAAS,CAAA,GAAA,mCAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,uCAAY,EAAE;IAEjC,IAAI,kBAAkB,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IAChE,IAAI,iBAAiB,aAAa,gBAAgB,MAAM,CAAC,gBAAgB,gBAAgB,MAAM,CAAC;IAChG,IAAI,qBACF,0DAAC,CAAA,GAAA,wDAAO;QACN,kBAAkB,CAAA,GAAA,oCAAS,EAAE,CAAA,GAAA,mDAAK,GAAG;QACrC,cAAY,+CAA+C,gBAAgB,MAAM,CAAC,gBAAgB;;IAGtG,IAAI,kBAAkB,CAAA,GAAA,oCAAS,EAC7B,CAAA,GAAA,mDAAK,GACL,uBACA;QACE,qCAAqC,kBAAkB;QACvD,iCAAiC,eAAe;IAClD,GACA,WAAW,SAAS;IAGtB,qBACE,0DAAC;QACE,GAAG,CAAA,GAAA,oCAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACd,SAAS;QACT,KAAK;QACL,WAAW;QACX,SAAS,gBAAgB,UAAU,YAAY,UAAU;OACxD,UACA,AAAC,CAAA,uBAAuB,WAAY,uBAAuB,UAAU,UAAU,KAAM,WAIrF,uBAAuB,yBAAW,0DAAC;QAAK,eAAa,CAAC,+CAA+C,aAAa;OAAY,iBAC9H,uBAAuB,UAAU,cAAc;AAGtD","sources":["packages/@react-spectrum/label/src/Label.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport Asterisk from '@spectrum-icons/ui/Asterisk';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React from 'react';\nimport {SpectrumLabelProps} from '@react-types/label';\nimport styles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nexport const Label = React.forwardRef(function Label(props: SpectrumLabelProps, ref: DOMRef<HTMLLabelElement>) {\n props = useProviderProps(props);\n let {\n children,\n labelPosition = 'top',\n labelAlign = labelPosition === 'side' ? 'start' : null,\n isRequired,\n necessityIndicator = isRequired != null ? 'icon' : null,\n includeNecessityIndicatorInAccessibilityName = false,\n htmlFor,\n for: labelFor,\n elementType: ElementType = 'label',\n onClick,\n ...otherProps\n } = props;\n\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/label');\n let necessityLabel = isRequired ? stringFormatter.format('(required)') : stringFormatter.format('(optional)');\n let icon = (\n <Asterisk\n UNSAFE_className={classNames(styles, 'spectrum-FieldLabel-requiredIcon')}\n aria-label={includeNecessityIndicatorInAccessibilityName ? stringFormatter.format('(required)') : undefined} />\n );\n\n let labelClassNames = classNames(\n styles,\n 'spectrum-FieldLabel',\n {\n 'spectrum-FieldLabel--positionSide': labelPosition === 'side',\n 'spectrum-FieldLabel--alignEnd': labelAlign === 'end'\n },\n styleProps.className\n );\n\n return (\n <ElementType\n {...filterDOMProps(otherProps)}\n {...styleProps}\n onClick={onClick}\n ref={domRef}\n className={labelClassNames}\n htmlFor={ElementType === 'label' ? labelFor || htmlFor : undefined}>\n {children}\n {(necessityIndicator === 'label' || (necessityIndicator === 'icon' && isRequired)) && ' \\u200b'}\n {/* necessityLabel is hidden to screen readers if the field is required because\n * aria-required is set on the field in that case. That will already be announced,\n * so no need to duplicate it here. If optional, we do want it to be announced here. */}\n {necessityIndicator === 'label' && <span aria-hidden={!includeNecessityIndicatorInAccessibilityName ? isRequired : undefined}>{necessityLabel}</span>}\n {necessityIndicator === 'icon' && isRequired && icon}\n </ElementType>\n );\n});\n"],"names":[],"version":3,"file":"Label.main.js.map"}
package/dist/Label.mjs DELETED
@@ -1,62 +0,0 @@
1
- import $fTVpI$intlStringsmodulejs from "./intlStrings.mjs";
2
- import "./label.fb8aa6a3.css";
3
- import $fTVpI$fieldlabel_vars_cssmodulejs from "./fieldlabel_vars_css.mjs";
4
- import $fTVpI$spectrumiconsuiAsterisk from "@spectrum-icons/ui/Asterisk";
5
- import {useDOMRef as $fTVpI$useDOMRef, useStyleProps as $fTVpI$useStyleProps, classNames as $fTVpI$classNames} from "@react-spectrum/utils";
6
- import {filterDOMProps as $fTVpI$filterDOMProps} from "@react-aria/utils";
7
- import $fTVpI$react from "react";
8
- import {useLocalizedStringFormatter as $fTVpI$useLocalizedStringFormatter} from "@react-aria/i18n";
9
- import {useProviderProps as $fTVpI$useProviderProps} from "@react-spectrum/provider";
10
-
11
-
12
- function $parcel$interopDefault(a) {
13
- return a && a.__esModule ? a.default : a;
14
- }
15
- /*
16
- * Copyright 2020 Adobe. All rights reserved.
17
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
- * you may not use this file except in compliance with the License. You may obtain a copy
19
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
- *
21
- * Unless required by applicable law or agreed to in writing, software distributed under
22
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
- * OF ANY KIND, either express or implied. See the License for the specific language
24
- * governing permissions and limitations under the License.
25
- */
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
- const $00af9ba397a66f43$export$b04be29aa201d4f5 = /*#__PURE__*/ (0, $fTVpI$react).forwardRef(function Label(props, ref) {
34
- props = (0, $fTVpI$useProviderProps)(props);
35
- let { children: children, labelPosition: labelPosition = 'top', labelAlign: labelAlign = labelPosition === 'side' ? 'start' : null, isRequired: isRequired, necessityIndicator: necessityIndicator = isRequired != null ? 'icon' : null, includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName = false, htmlFor: htmlFor, for: labelFor, elementType: ElementType = 'label', onClick: onClick, ...otherProps } = props;
36
- let domRef = (0, $fTVpI$useDOMRef)(ref);
37
- let { styleProps: styleProps } = (0, $fTVpI$useStyleProps)(otherProps);
38
- let stringFormatter = (0, $fTVpI$useLocalizedStringFormatter)((0, ($parcel$interopDefault($fTVpI$intlStringsmodulejs))), '@react-spectrum/label');
39
- let necessityLabel = isRequired ? stringFormatter.format('(required)') : stringFormatter.format('(optional)');
40
- let icon = /*#__PURE__*/ (0, $fTVpI$react).createElement((0, $fTVpI$spectrumiconsuiAsterisk), {
41
- UNSAFE_className: (0, $fTVpI$classNames)((0, ($parcel$interopDefault($fTVpI$fieldlabel_vars_cssmodulejs))), 'spectrum-FieldLabel-requiredIcon'),
42
- "aria-label": includeNecessityIndicatorInAccessibilityName ? stringFormatter.format('(required)') : undefined
43
- });
44
- let labelClassNames = (0, $fTVpI$classNames)((0, ($parcel$interopDefault($fTVpI$fieldlabel_vars_cssmodulejs))), 'spectrum-FieldLabel', {
45
- 'spectrum-FieldLabel--positionSide': labelPosition === 'side',
46
- 'spectrum-FieldLabel--alignEnd': labelAlign === 'end'
47
- }, styleProps.className);
48
- return /*#__PURE__*/ (0, $fTVpI$react).createElement(ElementType, {
49
- ...(0, $fTVpI$filterDOMProps)(otherProps),
50
- ...styleProps,
51
- onClick: onClick,
52
- ref: domRef,
53
- className: labelClassNames,
54
- htmlFor: ElementType === 'label' ? labelFor || htmlFor : undefined
55
- }, children, (necessityIndicator === 'label' || necessityIndicator === 'icon' && isRequired) && ' \u200b', necessityIndicator === 'label' && /*#__PURE__*/ (0, $fTVpI$react).createElement("span", {
56
- "aria-hidden": !includeNecessityIndicatorInAccessibilityName ? isRequired : undefined
57
- }, necessityLabel), necessityIndicator === 'icon' && isRequired && icon);
58
- });
59
-
60
-
61
- export {$00af9ba397a66f43$export$b04be29aa201d4f5 as Label};
62
- //# sourceMappingURL=Label.module.js.map
@@ -1,62 +0,0 @@
1
- import $fTVpI$intlStringsmodulejs from "./intlStrings.module.js";
2
- import "./label.fb8aa6a3.css";
3
- import $fTVpI$fieldlabel_vars_cssmodulejs from "./fieldlabel_vars_css.module.js";
4
- import $fTVpI$spectrumiconsuiAsterisk from "@spectrum-icons/ui/Asterisk";
5
- import {useDOMRef as $fTVpI$useDOMRef, useStyleProps as $fTVpI$useStyleProps, classNames as $fTVpI$classNames} from "@react-spectrum/utils";
6
- import {filterDOMProps as $fTVpI$filterDOMProps} from "@react-aria/utils";
7
- import $fTVpI$react from "react";
8
- import {useLocalizedStringFormatter as $fTVpI$useLocalizedStringFormatter} from "@react-aria/i18n";
9
- import {useProviderProps as $fTVpI$useProviderProps} from "@react-spectrum/provider";
10
-
11
-
12
- function $parcel$interopDefault(a) {
13
- return a && a.__esModule ? a.default : a;
14
- }
15
- /*
16
- * Copyright 2020 Adobe. All rights reserved.
17
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
18
- * you may not use this file except in compliance with the License. You may obtain a copy
19
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
20
- *
21
- * Unless required by applicable law or agreed to in writing, software distributed under
22
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
23
- * OF ANY KIND, either express or implied. See the License for the specific language
24
- * governing permissions and limitations under the License.
25
- */
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
- const $00af9ba397a66f43$export$b04be29aa201d4f5 = /*#__PURE__*/ (0, $fTVpI$react).forwardRef(function Label(props, ref) {
34
- props = (0, $fTVpI$useProviderProps)(props);
35
- let { children: children, labelPosition: labelPosition = 'top', labelAlign: labelAlign = labelPosition === 'side' ? 'start' : null, isRequired: isRequired, necessityIndicator: necessityIndicator = isRequired != null ? 'icon' : null, includeNecessityIndicatorInAccessibilityName: includeNecessityIndicatorInAccessibilityName = false, htmlFor: htmlFor, for: labelFor, elementType: ElementType = 'label', onClick: onClick, ...otherProps } = props;
36
- let domRef = (0, $fTVpI$useDOMRef)(ref);
37
- let { styleProps: styleProps } = (0, $fTVpI$useStyleProps)(otherProps);
38
- let stringFormatter = (0, $fTVpI$useLocalizedStringFormatter)((0, ($parcel$interopDefault($fTVpI$intlStringsmodulejs))), '@react-spectrum/label');
39
- let necessityLabel = isRequired ? stringFormatter.format('(required)') : stringFormatter.format('(optional)');
40
- let icon = /*#__PURE__*/ (0, $fTVpI$react).createElement((0, $fTVpI$spectrumiconsuiAsterisk), {
41
- UNSAFE_className: (0, $fTVpI$classNames)((0, ($parcel$interopDefault($fTVpI$fieldlabel_vars_cssmodulejs))), 'spectrum-FieldLabel-requiredIcon'),
42
- "aria-label": includeNecessityIndicatorInAccessibilityName ? stringFormatter.format('(required)') : undefined
43
- });
44
- let labelClassNames = (0, $fTVpI$classNames)((0, ($parcel$interopDefault($fTVpI$fieldlabel_vars_cssmodulejs))), 'spectrum-FieldLabel', {
45
- 'spectrum-FieldLabel--positionSide': labelPosition === 'side',
46
- 'spectrum-FieldLabel--alignEnd': labelAlign === 'end'
47
- }, styleProps.className);
48
- return /*#__PURE__*/ (0, $fTVpI$react).createElement(ElementType, {
49
- ...(0, $fTVpI$filterDOMProps)(otherProps),
50
- ...styleProps,
51
- onClick: onClick,
52
- ref: domRef,
53
- className: labelClassNames,
54
- htmlFor: ElementType === 'label' ? labelFor || htmlFor : undefined
55
- }, children, (necessityIndicator === 'label' || necessityIndicator === 'icon' && isRequired) && ' \u200b', necessityIndicator === 'label' && /*#__PURE__*/ (0, $fTVpI$react).createElement("span", {
56
- "aria-hidden": !includeNecessityIndicatorInAccessibilityName ? isRequired : undefined
57
- }, necessityLabel), necessityIndicator === 'icon' && isRequired && icon);
58
- });
59
-
60
-
61
- export {$00af9ba397a66f43$export$b04be29aa201d4f5 as Label};
62
- //# sourceMappingURL=Label.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;;;;;;AAcM,MAAM,0DAAQ,CAAA,GAAA,YAAI,EAAE,UAAU,CAAC,SAAS,MAAM,KAAyB,EAAE,GAA6B;IAC3G,QAAQ,CAAA,GAAA,uBAAe,EAAE;IACzB,IAAI,YACF,QAAQ,iBACR,gBAAgB,mBAChB,aAAa,kBAAkB,SAAS,UAAU,kBAClD,UAAU,sBACV,qBAAqB,cAAc,OAAO,SAAS,oDACnD,+CAA+C,gBAC/C,OAAO,EACP,KAAK,QAAQ,EACb,aAAa,cAAc,OAAO,WAClC,OAAO,EACP,GAAG,YACJ,GAAG;IAEJ,IAAI,SAAS,CAAA,GAAA,gBAAQ,EAAE;IACvB,IAAI,cAAC,UAAU,EAAC,GAAG,CAAA,GAAA,oBAAY,EAAE;IAEjC,IAAI,kBAAkB,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,oDAAW,GAAG;IAChE,IAAI,iBAAiB,aAAa,gBAAgB,MAAM,CAAC,gBAAgB,gBAAgB,MAAM,CAAC;IAChG,IAAI,qBACF,gCAAC,CAAA,GAAA,8BAAO;QACN,kBAAkB,CAAA,GAAA,iBAAS,EAAE,CAAA,GAAA,4DAAK,GAAG;QACrC,cAAY,+CAA+C,gBAAgB,MAAM,CAAC,gBAAgB;;IAGtG,IAAI,kBAAkB,CAAA,GAAA,iBAAS,EAC7B,CAAA,GAAA,4DAAK,GACL,uBACA;QACE,qCAAqC,kBAAkB;QACvD,iCAAiC,eAAe;IAClD,GACA,WAAW,SAAS;IAGtB,qBACE,gCAAC;QACE,GAAG,CAAA,GAAA,qBAAa,EAAE,WAAW;QAC7B,GAAG,UAAU;QACd,SAAS;QACT,KAAK;QACL,WAAW;QACX,SAAS,gBAAgB,UAAU,YAAY,UAAU;OACxD,UACA,AAAC,CAAA,uBAAuB,WAAY,uBAAuB,UAAU,UAAU,KAAM,WAIrF,uBAAuB,yBAAW,gCAAC;QAAK,eAAa,CAAC,+CAA+C,aAAa;OAAY,iBAC9H,uBAAuB,UAAU,cAAc;AAGtD","sources":["packages/@react-spectrum/label/src/Label.tsx"],"sourcesContent":["/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport Asterisk from '@spectrum-icons/ui/Asterisk';\nimport {classNames, useDOMRef, useStyleProps} from '@react-spectrum/utils';\nimport {DOMRef} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport React from 'react';\nimport {SpectrumLabelProps} from '@react-types/label';\nimport styles from '@adobe/spectrum-css-temp/components/fieldlabel/vars.css';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\nimport {useProviderProps} from '@react-spectrum/provider';\n\nexport const Label = React.forwardRef(function Label(props: SpectrumLabelProps, ref: DOMRef<HTMLLabelElement>) {\n props = useProviderProps(props);\n let {\n children,\n labelPosition = 'top',\n labelAlign = labelPosition === 'side' ? 'start' : null,\n isRequired,\n necessityIndicator = isRequired != null ? 'icon' : null,\n includeNecessityIndicatorInAccessibilityName = false,\n htmlFor,\n for: labelFor,\n elementType: ElementType = 'label',\n onClick,\n ...otherProps\n } = props;\n\n let domRef = useDOMRef(ref);\n let {styleProps} = useStyleProps(otherProps);\n\n let stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-spectrum/label');\n let necessityLabel = isRequired ? stringFormatter.format('(required)') : stringFormatter.format('(optional)');\n let icon = (\n <Asterisk\n UNSAFE_className={classNames(styles, 'spectrum-FieldLabel-requiredIcon')}\n aria-label={includeNecessityIndicatorInAccessibilityName ? stringFormatter.format('(required)') : undefined} />\n );\n\n let labelClassNames = classNames(\n styles,\n 'spectrum-FieldLabel',\n {\n 'spectrum-FieldLabel--positionSide': labelPosition === 'side',\n 'spectrum-FieldLabel--alignEnd': labelAlign === 'end'\n },\n styleProps.className\n );\n\n return (\n <ElementType\n {...filterDOMProps(otherProps)}\n {...styleProps}\n onClick={onClick}\n ref={domRef}\n className={labelClassNames}\n htmlFor={ElementType === 'label' ? labelFor || htmlFor : undefined}>\n {children}\n {(necessityIndicator === 'label' || (necessityIndicator === 'icon' && isRequired)) && ' \\u200b'}\n {/* necessityLabel is hidden to screen readers if the field is required because\n * aria-required is set on the field in that case. That will already be announced,\n * so no need to duplicate it here. If optional, we do want it to be announced here. */}\n {necessityIndicator === 'label' && <span aria-hidden={!includeNecessityIndicatorInAccessibilityName ? isRequired : undefined}>{necessityLabel}</span>}\n {necessityIndicator === 'icon' && isRequired && icon}\n </ElementType>\n );\n});\n"],"names":[],"version":3,"file":"Label.module.js.map"}
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- "(optional)": `(\u{627}\u{62E}\u{62A}\u{64A}\u{627}\u{631}\u{64A})`,
3
- "(required)": `(\u{645}\u{637}\u{644}\u{648}\u{628})`
4
- };
5
-
6
-
7
- //# sourceMappingURL=ar-AE.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,cAAc,CAAC,mDAAS,CAAC;IAC3C,cAAc,CAAC,qCAAO,CAAC;AACzB","sources":["packages/@react-spectrum/label/intl/ar-AE.json"],"sourcesContent":["{\n \"(optional)\": \"(اختياري)\",\n \"(required)\": \"(مطلوب)\"\n}\n"],"names":[],"version":3,"file":"ar-AE.main.js.map"}
package/dist/ar-AE.mjs DELETED
@@ -1,9 +0,0 @@
1
- var $dfe96401c0c81db3$exports = {};
2
- $dfe96401c0c81db3$exports = {
3
- "(optional)": `(\u{627}\u{62E}\u{62A}\u{64A}\u{627}\u{631}\u{64A})`,
4
- "(required)": `(\u{645}\u{637}\u{644}\u{648}\u{628})`
5
- };
6
-
7
-
8
- export {$dfe96401c0c81db3$exports as default};
9
- //# sourceMappingURL=ar-AE.module.js.map
@@ -1,9 +0,0 @@
1
- var $dfe96401c0c81db3$exports = {};
2
- $dfe96401c0c81db3$exports = {
3
- "(optional)": `(\u{627}\u{62E}\u{62A}\u{64A}\u{627}\u{631}\u{64A})`,
4
- "(required)": `(\u{645}\u{637}\u{644}\u{648}\u{628})`
5
- };
6
-
7
-
8
- export {$dfe96401c0c81db3$exports as default};
9
- //# sourceMappingURL=ar-AE.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,cAAc,CAAC,mDAAS,CAAC;IAC3C,cAAc,CAAC,qCAAO,CAAC;AACzB","sources":["packages/@react-spectrum/label/intl/ar-AE.json"],"sourcesContent":["{\n \"(optional)\": \"(اختياري)\",\n \"(required)\": \"(مطلوب)\"\n}\n"],"names":[],"version":3,"file":"ar-AE.module.js.map"}
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- "(optional)": `(\u{43D}\u{435}\u{437}\u{430}\u{434}\u{44A}\u{43B}\u{436}\u{438}\u{442}\u{435}\u{43B}\u{43D}\u{43E})`,
3
- "(required)": `(\u{437}\u{430}\u{434}\u{44A}\u{43B}\u{436}\u{438}\u{442}\u{435}\u{43B}\u{43D}\u{43E})`
4
- };
5
-
6
-
7
- //# sourceMappingURL=bg-BG.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,cAAc,CAAC,oGAAgB,CAAC;IAClD,cAAc,CAAC,sFAAc,CAAC;AAChC","sources":["packages/@react-spectrum/label/intl/bg-BG.json"],"sourcesContent":["{\n \"(optional)\": \"(незадължително)\",\n \"(required)\": \"(задължително)\"\n}\n"],"names":[],"version":3,"file":"bg-BG.main.js.map"}
package/dist/bg-BG.mjs DELETED
@@ -1,9 +0,0 @@
1
- var $f504605657ece833$exports = {};
2
- $f504605657ece833$exports = {
3
- "(optional)": `(\u{43D}\u{435}\u{437}\u{430}\u{434}\u{44A}\u{43B}\u{436}\u{438}\u{442}\u{435}\u{43B}\u{43D}\u{43E})`,
4
- "(required)": `(\u{437}\u{430}\u{434}\u{44A}\u{43B}\u{436}\u{438}\u{442}\u{435}\u{43B}\u{43D}\u{43E})`
5
- };
6
-
7
-
8
- export {$f504605657ece833$exports as default};
9
- //# sourceMappingURL=bg-BG.module.js.map
@@ -1,9 +0,0 @@
1
- var $f504605657ece833$exports = {};
2
- $f504605657ece833$exports = {
3
- "(optional)": `(\u{43D}\u{435}\u{437}\u{430}\u{434}\u{44A}\u{43B}\u{436}\u{438}\u{442}\u{435}\u{43B}\u{43D}\u{43E})`,
4
- "(required)": `(\u{437}\u{430}\u{434}\u{44A}\u{43B}\u{436}\u{438}\u{442}\u{435}\u{43B}\u{43D}\u{43E})`
5
- };
6
-
7
-
8
- export {$f504605657ece833$exports as default};
9
- //# sourceMappingURL=bg-BG.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,cAAc,CAAC,oGAAgB,CAAC;IAClD,cAAc,CAAC,sFAAc,CAAC;AAChC","sources":["packages/@react-spectrum/label/intl/bg-BG.json"],"sourcesContent":["{\n \"(optional)\": \"(незадължително)\",\n \"(required)\": \"(задължително)\"\n}\n"],"names":[],"version":3,"file":"bg-BG.module.js.map"}
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- "(optional)": `(voliteln\u{11B})`,
3
- "(required)": `(po\u{17E}adov\xe1no)`
4
- };
5
-
6
-
7
- //# sourceMappingURL=cs-CZ.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,cAAc,CAAC,iBAAW,CAAC;IAC7C,cAAc,CAAC,qBAAY,CAAC;AAC9B","sources":["packages/@react-spectrum/label/intl/cs-CZ.json"],"sourcesContent":["{\n \"(optional)\": \"(volitelně)\",\n \"(required)\": \"(požadováno)\"\n}\n"],"names":[],"version":3,"file":"cs-CZ.main.js.map"}
package/dist/cs-CZ.mjs DELETED
@@ -1,9 +0,0 @@
1
- var $ed0ab9e7c53f9351$exports = {};
2
- $ed0ab9e7c53f9351$exports = {
3
- "(optional)": `(voliteln\u{11B})`,
4
- "(required)": `(po\u{17E}adov\xe1no)`
5
- };
6
-
7
-
8
- export {$ed0ab9e7c53f9351$exports as default};
9
- //# sourceMappingURL=cs-CZ.module.js.map
@@ -1,9 +0,0 @@
1
- var $ed0ab9e7c53f9351$exports = {};
2
- $ed0ab9e7c53f9351$exports = {
3
- "(optional)": `(voliteln\u{11B})`,
4
- "(required)": `(po\u{17E}adov\xe1no)`
5
- };
6
-
7
-
8
- export {$ed0ab9e7c53f9351$exports as default};
9
- //# sourceMappingURL=cs-CZ.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,cAAc,CAAC,iBAAW,CAAC;IAC7C,cAAc,CAAC,qBAAY,CAAC;AAC9B","sources":["packages/@react-spectrum/label/intl/cs-CZ.json"],"sourcesContent":["{\n \"(optional)\": \"(volitelně)\",\n \"(required)\": \"(požadováno)\"\n}\n"],"names":[],"version":3,"file":"cs-CZ.module.js.map"}
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- "(optional)": `(valgfrit)`,
3
- "(required)": `(obligatorisk)`
4
- };
5
-
6
-
7
- //# sourceMappingURL=da-DK.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,cAAc,CAAC,UAAU,CAAC;IAC5C,cAAc,CAAC,cAAc,CAAC;AAChC","sources":["packages/@react-spectrum/label/intl/da-DK.json"],"sourcesContent":["{\n \"(optional)\": \"(valgfrit)\",\n \"(required)\": \"(obligatorisk)\"\n}\n"],"names":[],"version":3,"file":"da-DK.main.js.map"}
package/dist/da-DK.mjs DELETED
@@ -1,9 +0,0 @@
1
- var $59d9df99e04ee555$exports = {};
2
- $59d9df99e04ee555$exports = {
3
- "(optional)": `(valgfrit)`,
4
- "(required)": `(obligatorisk)`
5
- };
6
-
7
-
8
- export {$59d9df99e04ee555$exports as default};
9
- //# sourceMappingURL=da-DK.module.js.map
@@ -1,9 +0,0 @@
1
- var $59d9df99e04ee555$exports = {};
2
- $59d9df99e04ee555$exports = {
3
- "(optional)": `(valgfrit)`,
4
- "(required)": `(obligatorisk)`
5
- };
6
-
7
-
8
- export {$59d9df99e04ee555$exports as default};
9
- //# sourceMappingURL=da-DK.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,cAAc,CAAC,UAAU,CAAC;IAC5C,cAAc,CAAC,cAAc,CAAC;AAChC","sources":["packages/@react-spectrum/label/intl/da-DK.json"],"sourcesContent":["{\n \"(optional)\": \"(valgfrit)\",\n \"(required)\": \"(obligatorisk)\"\n}\n"],"names":[],"version":3,"file":"da-DK.module.js.map"}
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- "(optional)": `(optional)`,
3
- "(required)": `(erforderlich)`
4
- };
5
-
6
-
7
- //# sourceMappingURL=de-DE.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,cAAc,CAAC,UAAU,CAAC;IAC5C,cAAc,CAAC,cAAc,CAAC;AAChC","sources":["packages/@react-spectrum/label/intl/de-DE.json"],"sourcesContent":["{\n \"(optional)\": \"(optional)\",\n \"(required)\": \"(erforderlich)\"\n}\n"],"names":[],"version":3,"file":"de-DE.main.js.map"}
package/dist/de-DE.mjs DELETED
@@ -1,9 +0,0 @@
1
- var $c5df0169c370d169$exports = {};
2
- $c5df0169c370d169$exports = {
3
- "(optional)": `(optional)`,
4
- "(required)": `(erforderlich)`
5
- };
6
-
7
-
8
- export {$c5df0169c370d169$exports as default};
9
- //# sourceMappingURL=de-DE.module.js.map
@@ -1,9 +0,0 @@
1
- var $c5df0169c370d169$exports = {};
2
- $c5df0169c370d169$exports = {
3
- "(optional)": `(optional)`,
4
- "(required)": `(erforderlich)`
5
- };
6
-
7
-
8
- export {$c5df0169c370d169$exports as default};
9
- //# sourceMappingURL=de-DE.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,cAAc,CAAC,UAAU,CAAC;IAC5C,cAAc,CAAC,cAAc,CAAC;AAChC","sources":["packages/@react-spectrum/label/intl/de-DE.json"],"sourcesContent":["{\n \"(optional)\": \"(optional)\",\n \"(required)\": \"(erforderlich)\"\n}\n"],"names":[],"version":3,"file":"de-DE.module.js.map"}
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- "(optional)": `(\u{3C0}\u{3C1}\u{3BF}\u{3B1}\u{3B9}\u{3C1}\u{3B5}\u{3C4}\u{3B9}\u{3BA}\u{3CC})`,
3
- "(required)": `(\u{3B1}\u{3C0}\u{3B1}\u{3B9}\u{3C4}\u{3B5}\u{3AF}\u{3C4}\u{3B1}\u{3B9})`
4
- };
5
-
6
-
7
- //# sourceMappingURL=el-GR.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,cAAc,CAAC,+EAAa,CAAC;IAC/C,cAAc,CAAC,wEAAY,CAAC;AAC9B","sources":["packages/@react-spectrum/label/intl/el-GR.json"],"sourcesContent":["{\n \"(optional)\": \"(προαιρετικό)\",\n \"(required)\": \"(απαιτείται)\"\n}\n"],"names":[],"version":3,"file":"el-GR.main.js.map"}
package/dist/el-GR.mjs DELETED
@@ -1,9 +0,0 @@
1
- var $3c9af509a01a8d08$exports = {};
2
- $3c9af509a01a8d08$exports = {
3
- "(optional)": `(\u{3C0}\u{3C1}\u{3BF}\u{3B1}\u{3B9}\u{3C1}\u{3B5}\u{3C4}\u{3B9}\u{3BA}\u{3CC})`,
4
- "(required)": `(\u{3B1}\u{3C0}\u{3B1}\u{3B9}\u{3C4}\u{3B5}\u{3AF}\u{3C4}\u{3B1}\u{3B9})`
5
- };
6
-
7
-
8
- export {$3c9af509a01a8d08$exports as default};
9
- //# sourceMappingURL=el-GR.module.js.map
@@ -1,9 +0,0 @@
1
- var $3c9af509a01a8d08$exports = {};
2
- $3c9af509a01a8d08$exports = {
3
- "(optional)": `(\u{3C0}\u{3C1}\u{3BF}\u{3B1}\u{3B9}\u{3C1}\u{3B5}\u{3C4}\u{3B9}\u{3BA}\u{3CC})`,
4
- "(required)": `(\u{3B1}\u{3C0}\u{3B1}\u{3B9}\u{3C4}\u{3B5}\u{3AF}\u{3C4}\u{3B1}\u{3B9})`
5
- };
6
-
7
-
8
- export {$3c9af509a01a8d08$exports as default};
9
- //# sourceMappingURL=el-GR.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,cAAc,CAAC,+EAAa,CAAC;IAC/C,cAAc,CAAC,wEAAY,CAAC;AAC9B","sources":["packages/@react-spectrum/label/intl/el-GR.json"],"sourcesContent":["{\n \"(optional)\": \"(προαιρετικό)\",\n \"(required)\": \"(απαιτείται)\"\n}\n"],"names":[],"version":3,"file":"el-GR.module.js.map"}
@@ -1,7 +0,0 @@
1
- module.exports = {
2
- "(required)": `(required)`,
3
- "(optional)": `(optional)`
4
- };
5
-
6
-
7
- //# sourceMappingURL=en-US.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,cAAc,CAAC,UAAU,CAAC;IAC5C,cAAc,CAAC,UAAU,CAAC;AAC5B","sources":["packages/@react-spectrum/label/intl/en-US.json"],"sourcesContent":["{\n \"(required)\": \"(required)\",\n \"(optional)\": \"(optional)\"\n}\n"],"names":[],"version":3,"file":"en-US.main.js.map"}
package/dist/en-US.mjs DELETED
@@ -1,9 +0,0 @@
1
- var $aa36476f91664a08$exports = {};
2
- $aa36476f91664a08$exports = {
3
- "(required)": `(required)`,
4
- "(optional)": `(optional)`
5
- };
6
-
7
-
8
- export {$aa36476f91664a08$exports as default};
9
- //# sourceMappingURL=en-US.module.js.map
@@ -1,9 +0,0 @@
1
- var $aa36476f91664a08$exports = {};
2
- $aa36476f91664a08$exports = {
3
- "(required)": `(required)`,
4
- "(optional)": `(optional)`
5
- };
6
-
7
-
8
- export {$aa36476f91664a08$exports as default};
9
- //# sourceMappingURL=en-US.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,cAAc,CAAC,UAAU,CAAC;IAC5C,cAAc,CAAC,UAAU,CAAC;AAC5B","sources":["packages/@react-spectrum/label/intl/en-US.json"],"sourcesContent":["{\n \"(required)\": \"(required)\",\n \"(optional)\": \"(optional)\"\n}\n"],"names":[],"version":3,"file":"en-US.module.js.map"}