@react-aria/breadcrumbs 3.5.11 → 3.5.12

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 (55) hide show
  1. package/dist/ar-AE.mjs +1 -1
  2. package/dist/bg-BG.mjs +1 -1
  3. package/dist/cs-CZ.mjs +1 -1
  4. package/dist/da-DK.mjs +1 -1
  5. package/dist/de-DE.mjs +1 -1
  6. package/dist/el-GR.mjs +1 -1
  7. package/dist/en-US.mjs +1 -1
  8. package/dist/es-ES.mjs +1 -1
  9. package/dist/et-EE.mjs +1 -1
  10. package/dist/fi-FI.mjs +1 -1
  11. package/dist/fr-FR.mjs +1 -1
  12. package/dist/he-IL.mjs +1 -1
  13. package/dist/hr-HR.mjs +1 -1
  14. package/dist/hu-HU.mjs +1 -1
  15. package/dist/import.mjs +2 -174
  16. package/dist/intlStrings.main.js +108 -0
  17. package/dist/intlStrings.main.js.map +1 -0
  18. package/dist/intlStrings.mjs +110 -0
  19. package/dist/intlStrings.module.js +110 -0
  20. package/dist/intlStrings.module.js.map +1 -0
  21. package/dist/it-IT.mjs +1 -1
  22. package/dist/ja-JP.mjs +1 -1
  23. package/dist/ko-KR.mjs +1 -1
  24. package/dist/lt-LT.mjs +1 -1
  25. package/dist/lv-LV.mjs +1 -1
  26. package/dist/main.js +4 -176
  27. package/dist/main.js.map +1 -1
  28. package/dist/module.js +2 -174
  29. package/dist/module.js.map +1 -1
  30. package/dist/nb-NO.mjs +1 -1
  31. package/dist/nl-NL.mjs +1 -1
  32. package/dist/pl-PL.mjs +1 -1
  33. package/dist/pt-BR.mjs +1 -1
  34. package/dist/pt-PT.mjs +1 -1
  35. package/dist/ro-RO.mjs +1 -1
  36. package/dist/ru-RU.mjs +1 -1
  37. package/dist/sk-SK.mjs +1 -1
  38. package/dist/sl-SI.mjs +1 -1
  39. package/dist/sr-SP.mjs +1 -1
  40. package/dist/sv-SE.mjs +1 -1
  41. package/dist/tr-TR.mjs +1 -1
  42. package/dist/uk-UA.mjs +1 -1
  43. package/dist/useBreadcrumbItem.main.js +45 -0
  44. package/dist/useBreadcrumbItem.main.js.map +1 -0
  45. package/dist/useBreadcrumbItem.mjs +40 -0
  46. package/dist/useBreadcrumbItem.module.js +40 -0
  47. package/dist/useBreadcrumbItem.module.js.map +1 -0
  48. package/dist/useBreadcrumbs.main.js +42 -0
  49. package/dist/useBreadcrumbs.main.js.map +1 -0
  50. package/dist/useBreadcrumbs.mjs +37 -0
  51. package/dist/useBreadcrumbs.module.js +37 -0
  52. package/dist/useBreadcrumbs.module.js.map +1 -0
  53. package/dist/zh-CN.mjs +1 -1
  54. package/dist/zh-TW.mjs +1 -1
  55. package/package.json +7 -7
@@ -0,0 +1,40 @@
1
+ import {useLink as $iYMrm$useLink} from "@react-aria/link";
2
+
3
+ /*
4
+ * Copyright 2020 Adobe. All rights reserved.
5
+ * This file is licensed to you under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License. You may obtain a copy
7
+ * of the License at http://www.apache.org/licenses/LICENSE-2.0
8
+ *
9
+ * Unless required by applicable law or agreed to in writing, software distributed under
10
+ * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
11
+ * OF ANY KIND, either express or implied. See the License for the specific language
12
+ * governing permissions and limitations under the License.
13
+ */
14
+ function $dafd15390222438a$export$452b38fce62c9384(props, ref) {
15
+ let { isCurrent: isCurrent, isDisabled: isDisabled, "aria-current": ariaCurrent, elementType: elementType = "a", ...otherProps } = props;
16
+ let { linkProps: linkProps } = (0, $iYMrm$useLink)({
17
+ isDisabled: isDisabled || isCurrent,
18
+ elementType: elementType,
19
+ ...otherProps
20
+ }, ref);
21
+ let isHeading = /^h[1-6]$/.test(elementType);
22
+ let itemProps = {};
23
+ if (!isHeading) itemProps = linkProps;
24
+ if (isCurrent) {
25
+ itemProps["aria-current"] = ariaCurrent || "page";
26
+ // isCurrent sets isDisabled === true for the current item,
27
+ // so we have to restore the tabIndex in order to support autoFocus.
28
+ itemProps.tabIndex = props.autoFocus ? -1 : undefined;
29
+ }
30
+ return {
31
+ itemProps: {
32
+ "aria-disabled": isDisabled,
33
+ ...itemProps
34
+ }
35
+ };
36
+ }
37
+
38
+
39
+ export {$dafd15390222438a$export$452b38fce62c9384 as useBreadcrumbItem};
40
+ //# sourceMappingURL=useBreadcrumbItem.module.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;AAAA;;;;;;;;;;CAUC;AAgBM,SAAS,0CAAkB,KAA8B,EAAE,GAAgC;IAChG,IAAI,aACF,SAAS,cACT,UAAU,EACV,gBAAgB,WAAW,eAC3B,cAAc,KACd,GAAG,YACJ,GAAG;IAEJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,cAAM,EAAE;QAAC,YAAY,cAAc;qBAAW;QAAa,GAAG,UAAU;IAAA,GAAG;IAC7F,IAAI,YAAY,WAAW,IAAI,CAAC;IAChC,IAAI,YAA2B,CAAC;IAEhC,IAAI,CAAC,WACH,YAAY;IAGd,IAAI,WAAW;QACb,SAAS,CAAC,eAAe,GAAG,eAAe;QAC3C,2DAA2D;QAC3D,oEAAoE;QACpE,UAAU,QAAQ,GAAG,MAAM,SAAS,GAAG,KAAK;IAC9C;IAEA,OAAO;QACL,WAAW;YACT,iBAAiB;YACjB,GAAG,SAAS;QACd;IACF;AACF","sources":["packages/@react-aria/breadcrumbs/src/useBreadcrumbItem.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 {AriaBreadcrumbItemProps} from '@react-types/breadcrumbs';\nimport {DOMAttributes, FocusableElement} from '@react-types/shared';\nimport {RefObject} from 'react';\nimport {useLink} from '@react-aria/link';\n\nexport interface BreadcrumbItemAria {\n /** Props for the breadcrumb item link element. */\n itemProps: DOMAttributes\n}\n\n/**\n * Provides the behavior and accessibility implementation for an in a breadcrumbs component.\n * See `useBreadcrumbs` for details about breadcrumbs.\n */\nexport function useBreadcrumbItem(props: AriaBreadcrumbItemProps, ref: RefObject<FocusableElement>): BreadcrumbItemAria {\n let {\n isCurrent,\n isDisabled,\n 'aria-current': ariaCurrent,\n elementType = 'a',\n ...otherProps\n } = props;\n\n let {linkProps} = useLink({isDisabled: isDisabled || isCurrent, elementType, ...otherProps}, ref);\n let isHeading = /^h[1-6]$/.test(elementType);\n let itemProps: DOMAttributes = {};\n\n if (!isHeading) {\n itemProps = linkProps;\n }\n\n if (isCurrent) {\n itemProps['aria-current'] = ariaCurrent || 'page';\n // isCurrent sets isDisabled === true for the current item,\n // so we have to restore the tabIndex in order to support autoFocus.\n itemProps.tabIndex = props.autoFocus ? -1 : undefined;\n }\n\n return {\n itemProps: {\n 'aria-disabled': isDisabled,\n ...itemProps\n }\n };\n}\n"],"names":[],"version":3,"file":"useBreadcrumbItem.module.js.map"}
@@ -0,0 +1,42 @@
1
+ var $907e591fa8a9456d$exports = require("./intlStrings.main.js");
2
+ var $3qDYu$reactariautils = require("@react-aria/utils");
3
+ var $3qDYu$reactariai18n = require("@react-aria/i18n");
4
+
5
+
6
+ function $parcel$interopDefault(a) {
7
+ return a && a.__esModule ? a.default : a;
8
+ }
9
+
10
+ function $parcel$export(e, n, v, s) {
11
+ Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true});
12
+ }
13
+
14
+ $parcel$export(module.exports, "useBreadcrumbs", () => $2b6c6844f922ad13$export$8cefe241bd876ca0);
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
+ function $2b6c6844f922ad13$export$8cefe241bd876ca0(props) {
29
+ let { "aria-label": ariaLabel, ...otherProps } = props;
30
+ let strings = (0, $3qDYu$reactariai18n.useLocalizedStringFormatter)((0, ($parcel$interopDefault($907e591fa8a9456d$exports))), "@react-aria/breadcrumbs");
31
+ return {
32
+ navProps: {
33
+ ...(0, $3qDYu$reactariautils.filterDOMProps)(otherProps, {
34
+ labelable: true
35
+ }),
36
+ "aria-label": ariaLabel || strings.format("breadcrumbs")
37
+ }
38
+ };
39
+ }
40
+
41
+
42
+ //# sourceMappingURL=useBreadcrumbs.main.js.map
@@ -0,0 +1 @@
1
+ {"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;;;;CAUC;;;AAkBM,SAAS,0CAAe,KAA2B;IACxD,IAAI,EACF,cAAc,SAAS,EACvB,GAAG,YACJ,GAAG;IAEJ,IAAI,UAAU,CAAA,GAAA,gDAA0B,EAAE,CAAA,GAAA,mDAAW,GAAG;IACxD,OAAO;QACL,UAAU;YACR,GAAG,CAAA,GAAA,oCAAa,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.main.js.map"}
@@ -0,0 +1,37 @@
1
+ import $lFxPb$intlStringsmodulejs from "./intlStrings.mjs";
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.mjs.map
@@ -0,0 +1,37 @@
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
@@ -0,0 +1 @@
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"}
package/dist/zh-CN.mjs CHANGED
@@ -5,4 +5,4 @@ $8d15e736e12d3dfd$exports = {
5
5
 
6
6
 
7
7
  export {$8d15e736e12d3dfd$exports as default};
8
- //# sourceMappingURL=zh-CN.module.js.map
8
+ //# sourceMappingURL=zh-CN.mjs.map
package/dist/zh-TW.mjs CHANGED
@@ -5,4 +5,4 @@ $f8c49dd804b75140$exports = {
5
5
 
6
6
 
7
7
  export {$f8c49dd804b75140$exports as default};
8
- //# sourceMappingURL=zh-TW.module.js.map
8
+ //# sourceMappingURL=zh-TW.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-aria/breadcrumbs",
3
- "version": "3.5.11",
3
+ "version": "3.5.12",
4
4
  "description": "Spectrum UI components in React",
5
5
  "license": "Apache-2.0",
6
6
  "main": "dist/main.js",
@@ -22,11 +22,11 @@
22
22
  "url": "https://github.com/adobe/react-spectrum"
23
23
  },
24
24
  "dependencies": {
25
- "@react-aria/i18n": "^3.10.2",
26
- "@react-aria/link": "^3.6.5",
27
- "@react-aria/utils": "^3.23.2",
28
- "@react-types/breadcrumbs": "^3.7.3",
29
- "@react-types/shared": "^3.22.1",
25
+ "@react-aria/i18n": "^3.11.0",
26
+ "@react-aria/link": "^3.7.0",
27
+ "@react-aria/utils": "^3.24.0",
28
+ "@react-types/breadcrumbs": "^3.7.4",
29
+ "@react-types/shared": "^3.23.0",
30
30
  "@swc/helpers": "^0.5.0"
31
31
  },
32
32
  "peerDependencies": {
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "de9f84a22583fc741c29b341d14cd35ef4cca161"
38
+ "gitHead": "f645f29edc1322153fd60af4640cbcab1d992dbd"
39
39
  }