@react-aria/breadcrumbs 3.5.13 → 3.5.15
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/types.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { AriaBreadcrumbItemProps, AriaBreadcrumbsProps } from "@react-types/breadcrumbs";
|
|
2
|
-
import { DOMAttributes, FocusableElement } from "@react-types/shared";
|
|
3
|
-
import { RefObject } from "react";
|
|
2
|
+
import { DOMAttributes, FocusableElement, RefObject } from "@react-types/shared";
|
|
4
3
|
export interface BreadcrumbItemAria {
|
|
5
4
|
/** Props for the breadcrumb item link element. */
|
|
6
5
|
itemProps: DOMAttributes;
|
|
@@ -9,7 +8,7 @@ export interface BreadcrumbItemAria {
|
|
|
9
8
|
* Provides the behavior and accessibility implementation for an in a breadcrumbs component.
|
|
10
9
|
* See `useBreadcrumbs` for details about breadcrumbs.
|
|
11
10
|
*/
|
|
12
|
-
export function useBreadcrumbItem(props: AriaBreadcrumbItemProps, ref: RefObject<FocusableElement>): BreadcrumbItemAria;
|
|
11
|
+
export function useBreadcrumbItem(props: AriaBreadcrumbItemProps, ref: RefObject<FocusableElement | null>): BreadcrumbItemAria;
|
|
13
12
|
export interface BreadcrumbsAria {
|
|
14
13
|
/** Props for the breadcrumbs navigation element. */
|
|
15
14
|
navProps: DOMAttributes;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;AAgBA;IACE,kDAAkD;IAClD,SAAS,EAAE,aAAa,CAAA;CACzB;AAED;;;GAGG;AACH,kCAAkC,KAAK,EAAE,uBAAuB,EAAE,GAAG,EAAE,UAAU,gBAAgB,GAAG,IAAI,CAAC,GAAG,kBAAkB,CA8B7H;ACpCD;IACE,oDAAoD;IACpD,QAAQ,EAAE,aAAa,CAAA;CACxB;AAED;;;GAGG;AACH,+BAA+B,KAAK,EAAE,oBAAoB,GAAG,eAAe,CAa3E;AC5BD,YAAY,EAAC,uBAAuB,EAAE,oBAAoB,EAAC,MAAM,0BAA0B,CAAC","sources":["packages/@react-aria/breadcrumbs/src/packages/@react-aria/breadcrumbs/src/useBreadcrumbItem.ts","packages/@react-aria/breadcrumbs/src/packages/@react-aria/breadcrumbs/src/useBreadcrumbs.ts","packages/@react-aria/breadcrumbs/src/packages/@react-aria/breadcrumbs/src/index.ts","packages/@react-aria/breadcrumbs/src/index.ts"],"sourcesContent":[null,null,null,"/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nexport {useBreadcrumbItem} from './useBreadcrumbItem';\nexport {useBreadcrumbs} from './useBreadcrumbs';\nexport type {AriaBreadcrumbItemProps, AriaBreadcrumbsProps} from '@react-types/breadcrumbs';\nexport type {BreadcrumbItemAria} from './useBreadcrumbItem';\nexport type {BreadcrumbsAria} from './useBreadcrumbs';\n"],"names":[],"version":3,"file":"types.d.ts.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;
|
|
1
|
+
{"mappings":";;;;;;;;AAAA;;;;;;;;;;CAUC;AAeM,SAAS,0CAAkB,KAA8B,EAAE,GAAuC;IACvG,IAAI,aACF,SAAS,cACT,UAAU,EACV,gBAAgB,WAAW,eAC3B,cAAc,KACd,GAAG,YACJ,GAAG;IAEJ,IAAI,aAAC,SAAS,EAAC,GAAG,CAAA,GAAA,4BAAM,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, RefObject} from '@react-types/shared';\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 | null>): 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.main.js.map"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;AAAA;;;;;;;;;;CAUC;
|
|
1
|
+
{"mappings":";;AAAA;;;;;;;;;;CAUC;AAeM,SAAS,0CAAkB,KAA8B,EAAE,GAAuC;IACvG,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, RefObject} from '@react-types/shared';\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 | null>): 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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-aria/breadcrumbs",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.15",
|
|
4
4
|
"description": "Spectrum UI components in React",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "dist/main.js",
|
|
@@ -22,18 +22,18 @@
|
|
|
22
22
|
"url": "https://github.com/adobe/react-spectrum"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@react-aria/i18n": "^3.
|
|
26
|
-
"@react-aria/link": "^3.7.
|
|
27
|
-
"@react-aria/utils": "^3.
|
|
28
|
-
"@react-types/breadcrumbs": "^3.7.
|
|
29
|
-
"@react-types/shared": "^3.
|
|
25
|
+
"@react-aria/i18n": "^3.12.1",
|
|
26
|
+
"@react-aria/link": "^3.7.3",
|
|
27
|
+
"@react-aria/utils": "^3.25.1",
|
|
28
|
+
"@react-types/breadcrumbs": "^3.7.7",
|
|
29
|
+
"@react-types/shared": "^3.24.1",
|
|
30
30
|
"@swc/helpers": "^0.5.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0"
|
|
33
|
+
"react": "^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0"
|
|
34
34
|
},
|
|
35
35
|
"publishConfig": {
|
|
36
36
|
"access": "public"
|
|
37
37
|
},
|
|
38
|
-
"gitHead": "
|
|
38
|
+
"gitHead": "f0aa6aacee60af265dc8994b9274ccf072a850aa"
|
|
39
39
|
}
|
package/src/useBreadcrumbItem.ts
CHANGED
|
@@ -11,8 +11,7 @@
|
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import {AriaBreadcrumbItemProps} from '@react-types/breadcrumbs';
|
|
14
|
-
import {DOMAttributes, FocusableElement} from '@react-types/shared';
|
|
15
|
-
import {RefObject} from 'react';
|
|
14
|
+
import {DOMAttributes, FocusableElement, RefObject} from '@react-types/shared';
|
|
16
15
|
import {useLink} from '@react-aria/link';
|
|
17
16
|
|
|
18
17
|
export interface BreadcrumbItemAria {
|
|
@@ -24,7 +23,7 @@ export interface BreadcrumbItemAria {
|
|
|
24
23
|
* Provides the behavior and accessibility implementation for an in a breadcrumbs component.
|
|
25
24
|
* See `useBreadcrumbs` for details about breadcrumbs.
|
|
26
25
|
*/
|
|
27
|
-
export function useBreadcrumbItem(props: AriaBreadcrumbItemProps, ref: RefObject<FocusableElement>): BreadcrumbItemAria {
|
|
26
|
+
export function useBreadcrumbItem(props: AriaBreadcrumbItemProps, ref: RefObject<FocusableElement | null>): BreadcrumbItemAria {
|
|
28
27
|
let {
|
|
29
28
|
isCurrent,
|
|
30
29
|
isDisabled,
|