@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.
- package/dist/ar-AE.mjs +1 -1
- package/dist/bg-BG.mjs +1 -1
- package/dist/cs-CZ.mjs +1 -1
- package/dist/da-DK.mjs +1 -1
- package/dist/de-DE.mjs +1 -1
- package/dist/el-GR.mjs +1 -1
- package/dist/en-US.mjs +1 -1
- package/dist/es-ES.mjs +1 -1
- package/dist/et-EE.mjs +1 -1
- package/dist/fi-FI.mjs +1 -1
- package/dist/fr-FR.mjs +1 -1
- package/dist/he-IL.mjs +1 -1
- package/dist/hr-HR.mjs +1 -1
- package/dist/hu-HU.mjs +1 -1
- package/dist/import.mjs +2 -174
- package/dist/intlStrings.main.js +108 -0
- package/dist/intlStrings.main.js.map +1 -0
- package/dist/intlStrings.mjs +110 -0
- package/dist/intlStrings.module.js +110 -0
- package/dist/intlStrings.module.js.map +1 -0
- package/dist/it-IT.mjs +1 -1
- package/dist/ja-JP.mjs +1 -1
- package/dist/ko-KR.mjs +1 -1
- package/dist/lt-LT.mjs +1 -1
- package/dist/lv-LV.mjs +1 -1
- package/dist/main.js +4 -176
- package/dist/main.js.map +1 -1
- package/dist/module.js +2 -174
- package/dist/module.js.map +1 -1
- package/dist/nb-NO.mjs +1 -1
- package/dist/nl-NL.mjs +1 -1
- package/dist/pl-PL.mjs +1 -1
- package/dist/pt-BR.mjs +1 -1
- package/dist/pt-PT.mjs +1 -1
- package/dist/ro-RO.mjs +1 -1
- package/dist/ru-RU.mjs +1 -1
- package/dist/sk-SK.mjs +1 -1
- package/dist/sl-SI.mjs +1 -1
- package/dist/sr-SP.mjs +1 -1
- package/dist/sv-SE.mjs +1 -1
- package/dist/tr-TR.mjs +1 -1
- package/dist/uk-UA.mjs +1 -1
- package/dist/useBreadcrumbItem.main.js +45 -0
- package/dist/useBreadcrumbItem.main.js.map +1 -0
- package/dist/useBreadcrumbItem.mjs +40 -0
- package/dist/useBreadcrumbItem.module.js +40 -0
- package/dist/useBreadcrumbItem.module.js.map +1 -0
- package/dist/useBreadcrumbs.main.js +42 -0
- package/dist/useBreadcrumbs.main.js.map +1 -0
- package/dist/useBreadcrumbs.mjs +37 -0
- package/dist/useBreadcrumbs.module.js +37 -0
- package/dist/useBreadcrumbs.module.js.map +1 -0
- package/dist/zh-CN.mjs +1 -1
- package/dist/zh-TW.mjs +1 -1
- 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
package/dist/zh-TW.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/breadcrumbs",
|
|
3
|
-
"version": "3.5.
|
|
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.
|
|
26
|
-
"@react-aria/link": "^3.
|
|
27
|
-
"@react-aria/utils": "^3.
|
|
28
|
-
"@react-types/breadcrumbs": "^3.7.
|
|
29
|
-
"@react-types/shared": "^3.
|
|
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": "
|
|
38
|
+
"gitHead": "f645f29edc1322153fd60af4640cbcab1d992dbd"
|
|
39
39
|
}
|