@react-aria/breadcrumbs 3.5.32 → 3.6.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 (197) hide show
  1. package/dist/import.mjs +2 -4
  2. package/dist/main.js +3 -5
  3. package/dist/main.js.map +1 -1
  4. package/dist/module.js +2 -4
  5. package/dist/module.js.map +1 -1
  6. package/dist/types/src/index.d.ts +2 -0
  7. package/package.json +15 -16
  8. package/src/index.ts +3 -5
  9. package/dist/ar-AE.main.js +0 -6
  10. package/dist/ar-AE.main.js.map +0 -1
  11. package/dist/ar-AE.mjs +0 -8
  12. package/dist/ar-AE.module.js +0 -8
  13. package/dist/ar-AE.module.js.map +0 -1
  14. package/dist/bg-BG.main.js +0 -6
  15. package/dist/bg-BG.main.js.map +0 -1
  16. package/dist/bg-BG.mjs +0 -8
  17. package/dist/bg-BG.module.js +0 -8
  18. package/dist/bg-BG.module.js.map +0 -1
  19. package/dist/cs-CZ.main.js +0 -6
  20. package/dist/cs-CZ.main.js.map +0 -1
  21. package/dist/cs-CZ.mjs +0 -8
  22. package/dist/cs-CZ.module.js +0 -8
  23. package/dist/cs-CZ.module.js.map +0 -1
  24. package/dist/da-DK.main.js +0 -6
  25. package/dist/da-DK.main.js.map +0 -1
  26. package/dist/da-DK.mjs +0 -8
  27. package/dist/da-DK.module.js +0 -8
  28. package/dist/da-DK.module.js.map +0 -1
  29. package/dist/de-DE.main.js +0 -6
  30. package/dist/de-DE.main.js.map +0 -1
  31. package/dist/de-DE.mjs +0 -8
  32. package/dist/de-DE.module.js +0 -8
  33. package/dist/de-DE.module.js.map +0 -1
  34. package/dist/el-GR.main.js +0 -6
  35. package/dist/el-GR.main.js.map +0 -1
  36. package/dist/el-GR.mjs +0 -8
  37. package/dist/el-GR.module.js +0 -8
  38. package/dist/el-GR.module.js.map +0 -1
  39. package/dist/en-US.main.js +0 -6
  40. package/dist/en-US.main.js.map +0 -1
  41. package/dist/en-US.mjs +0 -8
  42. package/dist/en-US.module.js +0 -8
  43. package/dist/en-US.module.js.map +0 -1
  44. package/dist/es-ES.main.js +0 -6
  45. package/dist/es-ES.main.js.map +0 -1
  46. package/dist/es-ES.mjs +0 -8
  47. package/dist/es-ES.module.js +0 -8
  48. package/dist/es-ES.module.js.map +0 -1
  49. package/dist/et-EE.main.js +0 -6
  50. package/dist/et-EE.main.js.map +0 -1
  51. package/dist/et-EE.mjs +0 -8
  52. package/dist/et-EE.module.js +0 -8
  53. package/dist/et-EE.module.js.map +0 -1
  54. package/dist/fi-FI.main.js +0 -6
  55. package/dist/fi-FI.main.js.map +0 -1
  56. package/dist/fi-FI.mjs +0 -8
  57. package/dist/fi-FI.module.js +0 -8
  58. package/dist/fi-FI.module.js.map +0 -1
  59. package/dist/fr-FR.main.js +0 -6
  60. package/dist/fr-FR.main.js.map +0 -1
  61. package/dist/fr-FR.mjs +0 -8
  62. package/dist/fr-FR.module.js +0 -8
  63. package/dist/fr-FR.module.js.map +0 -1
  64. package/dist/he-IL.main.js +0 -6
  65. package/dist/he-IL.main.js.map +0 -1
  66. package/dist/he-IL.mjs +0 -8
  67. package/dist/he-IL.module.js +0 -8
  68. package/dist/he-IL.module.js.map +0 -1
  69. package/dist/hr-HR.main.js +0 -6
  70. package/dist/hr-HR.main.js.map +0 -1
  71. package/dist/hr-HR.mjs +0 -8
  72. package/dist/hr-HR.module.js +0 -8
  73. package/dist/hr-HR.module.js.map +0 -1
  74. package/dist/hu-HU.main.js +0 -6
  75. package/dist/hu-HU.main.js.map +0 -1
  76. package/dist/hu-HU.mjs +0 -8
  77. package/dist/hu-HU.module.js +0 -8
  78. package/dist/hu-HU.module.js.map +0 -1
  79. package/dist/intlStrings.main.js +0 -108
  80. package/dist/intlStrings.main.js.map +0 -1
  81. package/dist/intlStrings.mjs +0 -110
  82. package/dist/intlStrings.module.js +0 -110
  83. package/dist/intlStrings.module.js.map +0 -1
  84. package/dist/it-IT.main.js +0 -6
  85. package/dist/it-IT.main.js.map +0 -1
  86. package/dist/it-IT.mjs +0 -8
  87. package/dist/it-IT.module.js +0 -8
  88. package/dist/it-IT.module.js.map +0 -1
  89. package/dist/ja-JP.main.js +0 -6
  90. package/dist/ja-JP.main.js.map +0 -1
  91. package/dist/ja-JP.mjs +0 -8
  92. package/dist/ja-JP.module.js +0 -8
  93. package/dist/ja-JP.module.js.map +0 -1
  94. package/dist/ko-KR.main.js +0 -6
  95. package/dist/ko-KR.main.js.map +0 -1
  96. package/dist/ko-KR.mjs +0 -8
  97. package/dist/ko-KR.module.js +0 -8
  98. package/dist/ko-KR.module.js.map +0 -1
  99. package/dist/lt-LT.main.js +0 -6
  100. package/dist/lt-LT.main.js.map +0 -1
  101. package/dist/lt-LT.mjs +0 -8
  102. package/dist/lt-LT.module.js +0 -8
  103. package/dist/lt-LT.module.js.map +0 -1
  104. package/dist/lv-LV.main.js +0 -6
  105. package/dist/lv-LV.main.js.map +0 -1
  106. package/dist/lv-LV.mjs +0 -8
  107. package/dist/lv-LV.module.js +0 -8
  108. package/dist/lv-LV.module.js.map +0 -1
  109. package/dist/nb-NO.main.js +0 -6
  110. package/dist/nb-NO.main.js.map +0 -1
  111. package/dist/nb-NO.mjs +0 -8
  112. package/dist/nb-NO.module.js +0 -8
  113. package/dist/nb-NO.module.js.map +0 -1
  114. package/dist/nl-NL.main.js +0 -6
  115. package/dist/nl-NL.main.js.map +0 -1
  116. package/dist/nl-NL.mjs +0 -8
  117. package/dist/nl-NL.module.js +0 -8
  118. package/dist/nl-NL.module.js.map +0 -1
  119. package/dist/pl-PL.main.js +0 -6
  120. package/dist/pl-PL.main.js.map +0 -1
  121. package/dist/pl-PL.mjs +0 -8
  122. package/dist/pl-PL.module.js +0 -8
  123. package/dist/pl-PL.module.js.map +0 -1
  124. package/dist/pt-BR.main.js +0 -6
  125. package/dist/pt-BR.main.js.map +0 -1
  126. package/dist/pt-BR.mjs +0 -8
  127. package/dist/pt-BR.module.js +0 -8
  128. package/dist/pt-BR.module.js.map +0 -1
  129. package/dist/pt-PT.main.js +0 -6
  130. package/dist/pt-PT.main.js.map +0 -1
  131. package/dist/pt-PT.mjs +0 -8
  132. package/dist/pt-PT.module.js +0 -8
  133. package/dist/pt-PT.module.js.map +0 -1
  134. package/dist/ro-RO.main.js +0 -6
  135. package/dist/ro-RO.main.js.map +0 -1
  136. package/dist/ro-RO.mjs +0 -8
  137. package/dist/ro-RO.module.js +0 -8
  138. package/dist/ro-RO.module.js.map +0 -1
  139. package/dist/ru-RU.main.js +0 -6
  140. package/dist/ru-RU.main.js.map +0 -1
  141. package/dist/ru-RU.mjs +0 -8
  142. package/dist/ru-RU.module.js +0 -8
  143. package/dist/ru-RU.module.js.map +0 -1
  144. package/dist/sk-SK.main.js +0 -6
  145. package/dist/sk-SK.main.js.map +0 -1
  146. package/dist/sk-SK.mjs +0 -8
  147. package/dist/sk-SK.module.js +0 -8
  148. package/dist/sk-SK.module.js.map +0 -1
  149. package/dist/sl-SI.main.js +0 -6
  150. package/dist/sl-SI.main.js.map +0 -1
  151. package/dist/sl-SI.mjs +0 -8
  152. package/dist/sl-SI.module.js +0 -8
  153. package/dist/sl-SI.module.js.map +0 -1
  154. package/dist/sr-SP.main.js +0 -6
  155. package/dist/sr-SP.main.js.map +0 -1
  156. package/dist/sr-SP.mjs +0 -8
  157. package/dist/sr-SP.module.js +0 -8
  158. package/dist/sr-SP.module.js.map +0 -1
  159. package/dist/sv-SE.main.js +0 -6
  160. package/dist/sv-SE.main.js.map +0 -1
  161. package/dist/sv-SE.mjs +0 -8
  162. package/dist/sv-SE.module.js +0 -8
  163. package/dist/sv-SE.module.js.map +0 -1
  164. package/dist/tr-TR.main.js +0 -6
  165. package/dist/tr-TR.main.js.map +0 -1
  166. package/dist/tr-TR.mjs +0 -8
  167. package/dist/tr-TR.module.js +0 -8
  168. package/dist/tr-TR.module.js.map +0 -1
  169. package/dist/types.d.ts +0 -23
  170. package/dist/types.d.ts.map +0 -1
  171. package/dist/uk-UA.main.js +0 -6
  172. package/dist/uk-UA.main.js.map +0 -1
  173. package/dist/uk-UA.mjs +0 -8
  174. package/dist/uk-UA.module.js +0 -8
  175. package/dist/uk-UA.module.js.map +0 -1
  176. package/dist/useBreadcrumbItem.main.js +0 -45
  177. package/dist/useBreadcrumbItem.main.js.map +0 -1
  178. package/dist/useBreadcrumbItem.mjs +0 -40
  179. package/dist/useBreadcrumbItem.module.js +0 -40
  180. package/dist/useBreadcrumbItem.module.js.map +0 -1
  181. package/dist/useBreadcrumbs.main.js +0 -42
  182. package/dist/useBreadcrumbs.main.js.map +0 -1
  183. package/dist/useBreadcrumbs.mjs +0 -37
  184. package/dist/useBreadcrumbs.module.js +0 -37
  185. package/dist/useBreadcrumbs.module.js.map +0 -1
  186. package/dist/zh-CN.main.js +0 -6
  187. package/dist/zh-CN.main.js.map +0 -1
  188. package/dist/zh-CN.mjs +0 -8
  189. package/dist/zh-CN.module.js +0 -8
  190. package/dist/zh-CN.module.js.map +0 -1
  191. package/dist/zh-TW.main.js +0 -6
  192. package/dist/zh-TW.main.js.map +0 -1
  193. package/dist/zh-TW.mjs +0 -8
  194. package/dist/zh-TW.module.js +0 -8
  195. package/dist/zh-TW.module.js.map +0 -1
  196. package/src/useBreadcrumbItem.ts +0 -56
  197. package/src/useBreadcrumbs.ts +0 -42
@@ -1,37 +0,0 @@
1
- import $lFxPb$intlStringsmodulejs from "./intlStrings.module.js";
2
- import {filterDOMProps as $lFxPb$filterDOMProps} from "@react-aria/utils";
3
- import {useLocalizedStringFormatter as $lFxPb$useLocalizedStringFormatter} from "@react-aria/i18n";
4
-
5
-
6
- function $parcel$interopDefault(a) {
7
- return a && a.__esModule ? a.default : a;
8
- }
9
- /*
10
- * Copyright 2020 Adobe. All rights reserved.
11
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
12
- * you may not use this file except in compliance with the License. You may obtain a copy
13
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
14
- *
15
- * Unless required by applicable law or agreed to in writing, software distributed under
16
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
17
- * OF ANY KIND, either express or implied. See the License for the specific language
18
- * governing permissions and limitations under the License.
19
- */
20
-
21
-
22
- function $848231d7a2b3998e$export$8cefe241bd876ca0(props) {
23
- let { 'aria-label': ariaLabel, ...otherProps } = props;
24
- let strings = (0, $lFxPb$useLocalizedStringFormatter)((0, ($parcel$interopDefault($lFxPb$intlStringsmodulejs))), '@react-aria/breadcrumbs');
25
- return {
26
- navProps: {
27
- ...(0, $lFxPb$filterDOMProps)(otherProps, {
28
- labelable: true
29
- }),
30
- 'aria-label': ariaLabel || strings.format('breadcrumbs')
31
- }
32
- };
33
- }
34
-
35
-
36
- export {$848231d7a2b3998e$export$8cefe241bd876ca0 as useBreadcrumbs};
37
- //# sourceMappingURL=useBreadcrumbs.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAkBM,SAAS,0CAAe,KAA2B;IACxD,IAAI,EACF,cAAc,SAAS,EACvB,GAAG,YACJ,GAAG;IAEJ,IAAI,UAAU,CAAA,GAAA,kCAA0B,EAAE,CAAA,GAAA,oDAAW,GAAG;IACxD,OAAO;QACL,UAAU;YACR,GAAG,CAAA,GAAA,qBAAa,EAAE,YAAY;gBAAC,WAAW;YAAI,EAAE;YAChD,cAAc,aAAa,QAAQ,MAAM,CAAC;QAC5C;IACF;AACF","sources":["packages/@react-aria/breadcrumbs/src/useBreadcrumbs.ts"],"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 {AriaBreadcrumbsProps} from '@react-types/breadcrumbs';\nimport {DOMAttributes} from '@react-types/shared';\nimport {filterDOMProps} from '@react-aria/utils';\n// @ts-ignore\nimport intlMessages from '../intl/*.json';\nimport {useLocalizedStringFormatter} from '@react-aria/i18n';\n\nexport interface BreadcrumbsAria {\n /** Props for the breadcrumbs navigation element. */\n navProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for a breadcrumbs component.\n * Breadcrumbs display a hierarchy of links to the current page or resource in an application.\n */\nexport function useBreadcrumbs(props: AriaBreadcrumbsProps): BreadcrumbsAria {\n let {\n 'aria-label': ariaLabel,\n ...otherProps\n } = props;\n\n let strings = useLocalizedStringFormatter(intlMessages, '@react-aria/breadcrumbs');\n return {\n navProps: {\n ...filterDOMProps(otherProps, {labelable: true}),\n 'aria-label': ariaLabel || strings.format('breadcrumbs')\n }\n };\n}\n"],"names":[],"version":3,"file":"useBreadcrumbs.module.js.map"}
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- "breadcrumbs": `\u{5BFC}\u{822A}\u{680F}`
3
- };
4
-
5
-
6
- //# sourceMappingURL=zh-CN.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,eAAe,CAAC,wBAAG,CAAC;AACxC","sources":["packages/@react-aria/breadcrumbs/intl/zh-CN.json"],"sourcesContent":["{\n \"breadcrumbs\": \"导航栏\"\n}\n"],"names":[],"version":3,"file":"zh-CN.main.js.map"}
package/dist/zh-CN.mjs DELETED
@@ -1,8 +0,0 @@
1
- var $8d15e736e12d3dfd$exports = {};
2
- $8d15e736e12d3dfd$exports = {
3
- "breadcrumbs": `\u{5BFC}\u{822A}\u{680F}`
4
- };
5
-
6
-
7
- export {$8d15e736e12d3dfd$exports as default};
8
- //# sourceMappingURL=zh-CN.module.js.map
@@ -1,8 +0,0 @@
1
- var $8d15e736e12d3dfd$exports = {};
2
- $8d15e736e12d3dfd$exports = {
3
- "breadcrumbs": `\u{5BFC}\u{822A}\u{680F}`
4
- };
5
-
6
-
7
- export {$8d15e736e12d3dfd$exports as default};
8
- //# sourceMappingURL=zh-CN.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,eAAe,CAAC,wBAAG,CAAC;AACxC","sources":["packages/@react-aria/breadcrumbs/intl/zh-CN.json"],"sourcesContent":["{\n \"breadcrumbs\": \"导航栏\"\n}\n"],"names":[],"version":3,"file":"zh-CN.module.js.map"}
@@ -1,6 +0,0 @@
1
- module.exports = {
2
- "breadcrumbs": `\u{5C0E}\u{89BD}\u{5217}`
3
- };
4
-
5
-
6
- //# sourceMappingURL=zh-TW.main.js.map
@@ -1 +0,0 @@
1
- {"mappings":"AAAA,iBAAiB;IAAG,eAAe,CAAC,wBAAG,CAAC;AACxC","sources":["packages/@react-aria/breadcrumbs/intl/zh-TW.json"],"sourcesContent":["{\n \"breadcrumbs\": \"導覽列\"\n}\n"],"names":[],"version":3,"file":"zh-TW.main.js.map"}
package/dist/zh-TW.mjs DELETED
@@ -1,8 +0,0 @@
1
- var $f8c49dd804b75140$exports = {};
2
- $f8c49dd804b75140$exports = {
3
- "breadcrumbs": `\u{5C0E}\u{89BD}\u{5217}`
4
- };
5
-
6
-
7
- export {$f8c49dd804b75140$exports as default};
8
- //# sourceMappingURL=zh-TW.module.js.map
@@ -1,8 +0,0 @@
1
- var $f8c49dd804b75140$exports = {};
2
- $f8c49dd804b75140$exports = {
3
- "breadcrumbs": `\u{5C0E}\u{89BD}\u{5217}`
4
- };
5
-
6
-
7
- export {$f8c49dd804b75140$exports as default};
8
- //# sourceMappingURL=zh-TW.module.js.map
@@ -1 +0,0 @@
1
- {"mappings":";AAAA,4BAAiB;IAAG,eAAe,CAAC,wBAAG,CAAC;AACxC","sources":["packages/@react-aria/breadcrumbs/intl/zh-TW.json"],"sourcesContent":["{\n \"breadcrumbs\": \"導覽列\"\n}\n"],"names":[],"version":3,"file":"zh-TW.module.js.map"}
@@ -1,56 +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 {AriaBreadcrumbItemProps} from '@react-types/breadcrumbs';
14
- import {DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';
15
- import {useLink} from '@react-aria/link';
16
-
17
- export interface BreadcrumbItemAria {
18
- /** Props for the breadcrumb item link element. */
19
- itemProps: DOMAttributes
20
- }
21
-
22
- /**
23
- * Provides the behavior and accessibility implementation for an in a breadcrumbs component.
24
- * See `useBreadcrumbs` for details about breadcrumbs.
25
- */
26
- export function useBreadcrumbItem(props: AriaBreadcrumbItemProps, ref: RefObject<FocusableElement | null>): BreadcrumbItemAria {
27
- let {
28
- isCurrent,
29
- isDisabled,
30
- 'aria-current': ariaCurrent,
31
- elementType = 'a',
32
- ...otherProps
33
- } = props;
34
-
35
- let {linkProps} = useLink({isDisabled: isDisabled || isCurrent, elementType, ...otherProps}, ref);
36
- let isHeading = /^h[1-6]$/.test(elementType);
37
- let itemProps: DOMAttributes = {};
38
-
39
- if (!isHeading) {
40
- itemProps = linkProps;
41
- }
42
-
43
- if (isCurrent) {
44
- itemProps['aria-current'] = ariaCurrent || 'page';
45
- // isCurrent sets isDisabled === true for the current item,
46
- // so we have to restore the tabIndex in order to support autoFocus.
47
- itemProps.tabIndex = props.autoFocus ? -1 : undefined;
48
- }
49
-
50
- return {
51
- itemProps: {
52
- 'aria-disabled': isDisabled,
53
- ...itemProps
54
- }
55
- };
56
- }
@@ -1,42 +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 {AriaBreadcrumbsProps} from '@react-types/breadcrumbs';
14
- import {DOMAttributes} from '@react-types/shared';
15
- import {filterDOMProps} from '@react-aria/utils';
16
- // @ts-ignore
17
- import intlMessages from '../intl/*.json';
18
- import {useLocalizedStringFormatter} from '@react-aria/i18n';
19
-
20
- export interface BreadcrumbsAria {
21
- /** Props for the breadcrumbs navigation element. */
22
- navProps: DOMAttributes
23
- }
24
-
25
- /**
26
- * Provides the behavior and accessibility implementation for a breadcrumbs component.
27
- * Breadcrumbs display a hierarchy of links to the current page or resource in an application.
28
- */
29
- export function useBreadcrumbs(props: AriaBreadcrumbsProps): BreadcrumbsAria {
30
- let {
31
- 'aria-label': ariaLabel,
32
- ...otherProps
33
- } = props;
34
-
35
- let strings = useLocalizedStringFormatter(intlMessages, '@react-aria/breadcrumbs');
36
- return {
37
- navProps: {
38
- ...filterDOMProps(otherProps, {labelable: true}),
39
- 'aria-label': ariaLabel || strings.format('breadcrumbs')
40
- }
41
- };
42
- }