@fluentui/react-breadcrumb 9.4.5 → 9.4.6
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/CHANGELOG.md +19 -2
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/lib/components/BreadcrumbButton/BreadcrumbButton.types.js.map +1 -1
- package/lib/components/BreadcrumbButton/useBreadcrumbButton.js +1 -1
- package/lib/components/BreadcrumbButton/useBreadcrumbButton.js.map +1 -1
- package/lib-commonjs/components/BreadcrumbButton/BreadcrumbButton.types.cjs.map +1 -1
- package/lib-commonjs/components/BreadcrumbButton/useBreadcrumbButton.cjs +1 -1
- package/lib-commonjs/components/BreadcrumbButton/useBreadcrumbButton.cjs.map +1 -1
- package/package.json +14 -11
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,29 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-breadcrumb
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Mon, 21 Sep 2026 16:12:52 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.4.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-breadcrumb_v9.4.6)
|
|
8
|
+
|
|
9
|
+
Mon, 21 Sep 2026 16:12:52 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-breadcrumb_v9.4.5..@fluentui/react-breadcrumb_v9.4.6)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- fix: make BreadcrumbButtonBaseProps distribute over the ARIA button union so the anchor arm's href stays assignable ([PR #36663](https://github.com/microsoft/fluentui/pull/36663) by array.knight@gmail.com)
|
|
15
|
+
- fix: remove unused react-dom and @types/react-dom peer dependencies, mark @types/react as optional ([PR #36559](https://github.com/microsoft/fluentui/pull/36559) by martinhochel@microsoft.com)
|
|
16
|
+
- Bump @fluentui/react-aria to v9.17.15 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
17
|
+
- Bump @fluentui/react-button to v9.11.1 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
18
|
+
- Bump @fluentui/react-jsx-runtime to v9.4.6 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
19
|
+
- Bump @fluentui/react-link to v9.8.5 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
20
|
+
- Bump @fluentui/react-shared-contexts to v9.26.4 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
21
|
+
- Bump @fluentui/react-tabster to v9.26.18 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
22
|
+
- Bump @fluentui/react-utilities to v9.26.7 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
|
|
23
|
+
|
|
7
24
|
## [9.4.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-breadcrumb_v9.4.5)
|
|
8
25
|
|
|
9
|
-
Tue, 11 Aug 2026 17:
|
|
26
|
+
Tue, 11 Aug 2026 17:20:14 GMT
|
|
10
27
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-breadcrumb_v9.4.4..@fluentui/react-breadcrumb_v9.4.5)
|
|
11
28
|
|
|
12
29
|
### Patches
|
package/dist/index.d.cts
CHANGED
|
@@ -3,6 +3,7 @@ import type { ButtonSlots } from '@fluentui/react-button';
|
|
|
3
3
|
import type { ButtonState } from '@fluentui/react-button';
|
|
4
4
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
5
5
|
import type { ComponentState } from '@fluentui/react-utilities';
|
|
6
|
+
import type { DistributiveOmit } from '@fluentui/react-utilities';
|
|
6
7
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
7
8
|
import type { JSXElement } from '@fluentui/react-utilities';
|
|
8
9
|
import * as React_2 from 'react';
|
|
@@ -24,7 +25,7 @@ export declare type BreadcrumbBaseState = Omit<BreadcrumbState, 'size'>;
|
|
|
24
25
|
*/
|
|
25
26
|
export declare const BreadcrumbButton: ForwardRefComponent<BreadcrumbButtonProps>;
|
|
26
27
|
|
|
27
|
-
export declare type BreadcrumbButtonBaseProps =
|
|
28
|
+
export declare type BreadcrumbButtonBaseProps = DistributiveOmit<BreadcrumbButtonProps, 'size'>;
|
|
28
29
|
|
|
29
30
|
export declare type BreadcrumbButtonBaseState = Omit<BreadcrumbButtonState, 'appearance' | 'size' | 'shape'>;
|
|
30
31
|
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { ButtonSlots } from '@fluentui/react-button';
|
|
|
3
3
|
import type { ButtonState } from '@fluentui/react-button';
|
|
4
4
|
import type { ComponentProps } from '@fluentui/react-utilities';
|
|
5
5
|
import type { ComponentState } from '@fluentui/react-utilities';
|
|
6
|
+
import type { DistributiveOmit } from '@fluentui/react-utilities';
|
|
6
7
|
import type { ForwardRefComponent } from '@fluentui/react-utilities';
|
|
7
8
|
import type { JSXElement } from '@fluentui/react-utilities';
|
|
8
9
|
import * as React_2 from 'react';
|
|
@@ -24,7 +25,7 @@ export declare type BreadcrumbBaseState = Omit<BreadcrumbState, 'size'>;
|
|
|
24
25
|
*/
|
|
25
26
|
export declare const BreadcrumbButton: ForwardRefComponent<BreadcrumbButtonProps>;
|
|
26
27
|
|
|
27
|
-
export declare type BreadcrumbButtonBaseProps =
|
|
28
|
+
export declare type BreadcrumbButtonBaseProps = DistributiveOmit<BreadcrumbButtonProps, 'size'>;
|
|
28
29
|
|
|
29
30
|
export declare type BreadcrumbButtonBaseState = Omit<BreadcrumbButtonState, 'appearance' | 'size' | 'shape'>;
|
|
30
31
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/BreadcrumbButton/BreadcrumbButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { ButtonProps, ButtonSlots, ButtonState } from '@fluentui/react-button';\nimport type { BreadcrumbProps } from '../Breadcrumb/Breadcrumb.types';\n\nexport type BreadcrumbButtonSlots = ButtonSlots;\n\n/**\n * BreadcrumbButton Props\n */\nexport type BreadcrumbButtonProps = ComponentProps<BreadcrumbButtonSlots> &\n Pick<BreadcrumbProps, 'size'> &\n Pick<ButtonProps, 'disabled' | 'disabledFocusable'> & {\n /**\n * Defines current sate of BreadcrumbButton.\n *\n * @default false\n */\n current?: boolean;\n };\n\n/**\n * State used in rendering BreadcrumbButton\n */\nexport type BreadcrumbButtonState = ComponentState<BreadcrumbButtonSlots> &\n Omit<ButtonState, keyof ButtonSlots | 'components'> &\n Required<Pick<BreadcrumbButtonProps, 'current' | 'size'>>;\n\nexport type BreadcrumbButtonBaseProps =
|
|
1
|
+
{"version":3,"sources":["../src/components/BreadcrumbButton/BreadcrumbButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, DistributiveOmit } from '@fluentui/react-utilities';\nimport type { ButtonProps, ButtonSlots, ButtonState } from '@fluentui/react-button';\nimport type { BreadcrumbProps } from '../Breadcrumb/Breadcrumb.types';\n\nexport type BreadcrumbButtonSlots = ButtonSlots;\n\n/**\n * BreadcrumbButton Props\n */\nexport type BreadcrumbButtonProps = ComponentProps<BreadcrumbButtonSlots> &\n Pick<BreadcrumbProps, 'size'> &\n Pick<ButtonProps, 'disabled' | 'disabledFocusable'> & {\n /**\n * Defines current sate of BreadcrumbButton.\n *\n * @default false\n */\n current?: boolean;\n };\n\n/**\n * State used in rendering BreadcrumbButton\n */\nexport type BreadcrumbButtonState = ComponentState<BreadcrumbButtonSlots> &\n Omit<ButtonState, keyof ButtonSlots | 'components'> &\n Required<Pick<BreadcrumbButtonProps, 'current' | 'size'>>;\n\nexport type BreadcrumbButtonBaseProps = DistributiveOmit<BreadcrumbButtonProps, 'size'>;\n\nexport type BreadcrumbButtonBaseState = Omit<BreadcrumbButtonState, 'appearance' | 'size' | 'shape'>;\n"],"names":[],"mappings":"AA6BA,WAAqG"}
|
|
@@ -27,7 +27,7 @@ import { useBreadcrumbContext_unstable } from "../Breadcrumb/BreadcrumbContext.j
|
|
|
27
27
|
* @param ref - reference to root HTMLElement of BreadcrumbButton
|
|
28
28
|
*/ export const useBreadcrumbButtonBase_unstable = (props, ref)=>{
|
|
29
29
|
const { current = false, as, ...rest } = props;
|
|
30
|
-
const controlType =
|
|
30
|
+
const controlType = as !== null && as !== void 0 ? as : props.href ? 'a' : 'button';
|
|
31
31
|
var _props_ariacurrent, _props_ariadisabled;
|
|
32
32
|
const buttonState = useButtonBase_unstable({
|
|
33
33
|
role: undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/BreadcrumbButton/useBreadcrumbButton.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport type { ARIAButtonProps } from '@fluentui/react-aria';\nimport { useButtonBase_unstable } from '@fluentui/react-button';\nimport type { ButtonBaseProps } from '@fluentui/react-button';\nimport { useBreadcrumbContext_unstable } from '../Breadcrumb/BreadcrumbContext';\nimport type {\n BreadcrumbButtonBaseProps,\n BreadcrumbButtonBaseState,\n BreadcrumbButtonProps,\n BreadcrumbButtonState,\n} from './BreadcrumbButton.types';\n\n/**\n * Create the state required to render BreadcrumbButton.\n *\n * The returned state can be modified with hooks such as useBreadcrumbButtonStyles_unstable,\n * before being passed to renderBreadcrumbButton_unstable.\n *\n * @param props - props from this instance of BreadcrumbButton\n * @param ref - reference to root HTMLElement of BreadcrumbButton\n */\nexport const useBreadcrumbButton_unstable = (\n props: BreadcrumbButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): BreadcrumbButtonState => {\n const { size } = useBreadcrumbContext_unstable();\n const state = useBreadcrumbButtonBase_unstable(props, ref);\n\n return {\n appearance: 'subtle',\n size,\n shape: 'rounded',\n ...state,\n };\n};\n\n/**\n * Base hook for BreadcrumbButton component, which manages state related to button behavior,\n * ARIA attributes (aria-current, aria-disabled), and slot structure without design props.\n *\n * @param props - props from this instance of BreadcrumbButton\n * @param ref - reference to root HTMLElement of BreadcrumbButton\n */\nexport const useBreadcrumbButtonBase_unstable = (\n props: BreadcrumbButtonBaseProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): BreadcrumbButtonBaseState => {\n const { current = false, as, ...rest } = props;\n\n const controlType = as ?? (props as ARIAButtonProps<'a'>).href ? 'a' : 'button';\n\n const buttonState = useButtonBase_unstable(\n {\n role: undefined,\n type: undefined,\n as: controlType,\n iconPosition: 'before',\n 'aria-current': current ? props['aria-current'] ?? 'page' : undefined,\n 'aria-disabled': current ? props['aria-disabled'] ?? true : undefined,\n ...rest,\n } as ButtonBaseProps,\n ref,\n );\n\n return {\n ...buttonState,\n current,\n };\n};\n"],"names":["useButtonBase_unstable","useBreadcrumbContext_unstable","useBreadcrumbButton_unstable","props","ref","size","state","useBreadcrumbButtonBase_unstable","appearance","shape","current","as","rest","controlType","href","buttonState","role","undefined","type","iconPosition"],"mappings":"AAAA;AAIA,SAASA,sBAAsB,QAAQ,yBAAyB;AAEhE,SAASC,6BAA6B,QAAQ,qCAAkC;AAQhF;;;;;;;;CAQC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC;IAEA,MAAM,EAAEC,IAAI,EAAE,GAAGJ;IACjB,MAAMK,QAAQC,iCAAiCJ,OAAOC;IAEtD,OAAO;QACLI,YAAY;QACZH;QACAI,OAAO;QACP,GAAGH,KAAK;IACV;AACF,EAAE;AAEF;;;;;;CAMC,GACD,OAAO,MAAMC,mCAAmC,CAC9CJ,OACAC;IAEA,MAAM,EAAEM,UAAU,KAAK,EAAEC,EAAE,EAAE,GAAGC,MAAM,GAAGT;IAEzC,MAAMU,cAAcF,
|
|
1
|
+
{"version":3,"sources":["../src/components/BreadcrumbButton/useBreadcrumbButton.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport type { ARIAButtonProps } from '@fluentui/react-aria';\nimport { useButtonBase_unstable } from '@fluentui/react-button';\nimport type { ButtonBaseProps } from '@fluentui/react-button';\nimport { useBreadcrumbContext_unstable } from '../Breadcrumb/BreadcrumbContext';\nimport type {\n BreadcrumbButtonBaseProps,\n BreadcrumbButtonBaseState,\n BreadcrumbButtonProps,\n BreadcrumbButtonState,\n} from './BreadcrumbButton.types';\n\n/**\n * Create the state required to render BreadcrumbButton.\n *\n * The returned state can be modified with hooks such as useBreadcrumbButtonStyles_unstable,\n * before being passed to renderBreadcrumbButton_unstable.\n *\n * @param props - props from this instance of BreadcrumbButton\n * @param ref - reference to root HTMLElement of BreadcrumbButton\n */\nexport const useBreadcrumbButton_unstable = (\n props: BreadcrumbButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): BreadcrumbButtonState => {\n const { size } = useBreadcrumbContext_unstable();\n const state = useBreadcrumbButtonBase_unstable(props, ref);\n\n return {\n appearance: 'subtle',\n size,\n shape: 'rounded',\n ...state,\n };\n};\n\n/**\n * Base hook for BreadcrumbButton component, which manages state related to button behavior,\n * ARIA attributes (aria-current, aria-disabled), and slot structure without design props.\n *\n * @param props - props from this instance of BreadcrumbButton\n * @param ref - reference to root HTMLElement of BreadcrumbButton\n */\nexport const useBreadcrumbButtonBase_unstable = (\n props: BreadcrumbButtonBaseProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): BreadcrumbButtonBaseState => {\n const { current = false, as, ...rest } = props;\n\n const controlType = as ?? ((props as ARIAButtonProps<'a'>).href ? 'a' : 'button');\n\n const buttonState = useButtonBase_unstable(\n {\n role: undefined,\n type: undefined,\n as: controlType,\n iconPosition: 'before',\n 'aria-current': current ? props['aria-current'] ?? 'page' : undefined,\n 'aria-disabled': current ? props['aria-disabled'] ?? true : undefined,\n ...rest,\n } as ButtonBaseProps,\n ref,\n );\n\n return {\n ...buttonState,\n current,\n };\n};\n"],"names":["useButtonBase_unstable","useBreadcrumbContext_unstable","useBreadcrumbButton_unstable","props","ref","size","state","useBreadcrumbButtonBase_unstable","appearance","shape","current","as","rest","controlType","href","buttonState","role","undefined","type","iconPosition"],"mappings":"AAAA;AAIA,SAASA,sBAAsB,QAAQ,yBAAyB;AAEhE,SAASC,6BAA6B,QAAQ,qCAAkC;AAQhF;;;;;;;;CAQC,GACD,OAAO,MAAMC,+BAA+B,CAC1CC,OACAC;IAEA,MAAM,EAAEC,IAAI,EAAE,GAAGJ;IACjB,MAAMK,QAAQC,iCAAiCJ,OAAOC;IAEtD,OAAO;QACLI,YAAY;QACZH;QACAI,OAAO;QACP,GAAGH,KAAK;IACV;AACF,EAAE;AAEF;;;;;;CAMC,GACD,OAAO,MAAMC,mCAAmC,CAC9CJ,OACAC;IAEA,MAAM,EAAEM,UAAU,KAAK,EAAEC,EAAE,EAAE,GAAGC,MAAM,GAAGT;IAEzC,MAAMU,cAAcF,eAAAA,gBAAAA,KAAO,AAACR,MAA+BW,IAAI,GAAG,MAAM;QAQ1CX,oBACCA;IAP/B,MAAMY,cAAcf,uBAClB;QACEgB,MAAMC;QACNC,MAAMD;QACNN,IAAIE;QACJM,cAAc;QACd,gBAAgBT,UAAUP,CAAAA,qBAAAA,KAAK,CAAC,eAAe,cAArBA,gCAAAA,qBAAyB,SAASc;QAC5D,iBAAiBP,UAAUP,CAAAA,sBAAAA,KAAK,CAAC,gBAAgB,cAAtBA,iCAAAA,sBAA0B,OAAOc;QAC5D,GAAGL,IAAI;IACT,GACAR;IAGF,OAAO;QACL,GAAGW,WAAW;QACdL;IACF;AACF,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/BreadcrumbButton/BreadcrumbButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';\nimport type { ButtonProps, ButtonSlots, ButtonState } from '@fluentui/react-button';\nimport type { BreadcrumbProps } from '../Breadcrumb/Breadcrumb.types';\n\nexport type BreadcrumbButtonSlots = ButtonSlots;\n\n/**\n * BreadcrumbButton Props\n */\nexport type BreadcrumbButtonProps = ComponentProps<BreadcrumbButtonSlots> &\n Pick<BreadcrumbProps, 'size'> &\n Pick<ButtonProps, 'disabled' | 'disabledFocusable'> & {\n /**\n * Defines current sate of BreadcrumbButton.\n *\n * @default false\n */\n current?: boolean;\n };\n\n/**\n * State used in rendering BreadcrumbButton\n */\nexport type BreadcrumbButtonState = ComponentState<BreadcrumbButtonSlots> &\n Omit<ButtonState, keyof ButtonSlots | 'components'> &\n Required<Pick<BreadcrumbButtonProps, 'current' | 'size'>>;\n\nexport type BreadcrumbButtonBaseProps =
|
|
1
|
+
{"version":3,"sources":["../src/components/BreadcrumbButton/BreadcrumbButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, DistributiveOmit } from '@fluentui/react-utilities';\nimport type { ButtonProps, ButtonSlots, ButtonState } from '@fluentui/react-button';\nimport type { BreadcrumbProps } from '../Breadcrumb/Breadcrumb.types';\n\nexport type BreadcrumbButtonSlots = ButtonSlots;\n\n/**\n * BreadcrumbButton Props\n */\nexport type BreadcrumbButtonProps = ComponentProps<BreadcrumbButtonSlots> &\n Pick<BreadcrumbProps, 'size'> &\n Pick<ButtonProps, 'disabled' | 'disabledFocusable'> & {\n /**\n * Defines current sate of BreadcrumbButton.\n *\n * @default false\n */\n current?: boolean;\n };\n\n/**\n * State used in rendering BreadcrumbButton\n */\nexport type BreadcrumbButtonState = ComponentState<BreadcrumbButtonSlots> &\n Omit<ButtonState, keyof ButtonSlots | 'components'> &\n Required<Pick<BreadcrumbButtonProps, 'current' | 'size'>>;\n\nexport type BreadcrumbButtonBaseProps = DistributiveOmit<BreadcrumbButtonProps, 'size'>;\n\nexport type BreadcrumbButtonBaseState = Omit<BreadcrumbButtonState, 'appearance' | 'size' | 'shape'>;\n"],"names":[],"mappings":""}
|
|
@@ -31,7 +31,7 @@ const useBreadcrumbButton_unstable = (props, ref)=>{
|
|
|
31
31
|
};
|
|
32
32
|
const useBreadcrumbButtonBase_unstable = (props, ref)=>{
|
|
33
33
|
const { current = false, as, ...rest } = props;
|
|
34
|
-
const controlType =
|
|
34
|
+
const controlType = as !== null && as !== void 0 ? as : props.href ? 'a' : 'button';
|
|
35
35
|
var _props_ariacurrent, _props_ariadisabled;
|
|
36
36
|
const buttonState = (0, _reactbutton.useButtonBase_unstable)({
|
|
37
37
|
role: undefined,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/BreadcrumbButton/useBreadcrumbButton.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport type { ARIAButtonProps } from '@fluentui/react-aria';\nimport { useButtonBase_unstable } from '@fluentui/react-button';\nimport type { ButtonBaseProps } from '@fluentui/react-button';\nimport { useBreadcrumbContext_unstable } from '../Breadcrumb/BreadcrumbContext';\nimport type {\n BreadcrumbButtonBaseProps,\n BreadcrumbButtonBaseState,\n BreadcrumbButtonProps,\n BreadcrumbButtonState,\n} from './BreadcrumbButton.types';\n\n/**\n * Create the state required to render BreadcrumbButton.\n *\n * The returned state can be modified with hooks such as useBreadcrumbButtonStyles_unstable,\n * before being passed to renderBreadcrumbButton_unstable.\n *\n * @param props - props from this instance of BreadcrumbButton\n * @param ref - reference to root HTMLElement of BreadcrumbButton\n */\nexport const useBreadcrumbButton_unstable = (\n props: BreadcrumbButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): BreadcrumbButtonState => {\n const { size } = useBreadcrumbContext_unstable();\n const state = useBreadcrumbButtonBase_unstable(props, ref);\n\n return {\n appearance: 'subtle',\n size,\n shape: 'rounded',\n ...state,\n };\n};\n\n/**\n * Base hook for BreadcrumbButton component, which manages state related to button behavior,\n * ARIA attributes (aria-current, aria-disabled), and slot structure without design props.\n *\n * @param props - props from this instance of BreadcrumbButton\n * @param ref - reference to root HTMLElement of BreadcrumbButton\n */\nexport const useBreadcrumbButtonBase_unstable = (\n props: BreadcrumbButtonBaseProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): BreadcrumbButtonBaseState => {\n const { current = false, as, ...rest } = props;\n\n const controlType = as ?? (props as ARIAButtonProps<'a'>).href ? 'a' : 'button';\n\n const buttonState = useButtonBase_unstable(\n {\n role: undefined,\n type: undefined,\n as: controlType,\n iconPosition: 'before',\n 'aria-current': current ? props['aria-current'] ?? 'page' : undefined,\n 'aria-disabled': current ? props['aria-disabled'] ?? true : undefined,\n ...rest,\n } as ButtonBaseProps,\n ref,\n );\n\n return {\n ...buttonState,\n current,\n };\n};\n"],"names":["useButtonBase_unstable","useBreadcrumbContext_unstable","useBreadcrumbButton_unstable","props","ref","size","state","useBreadcrumbButtonBase_unstable","appearance","shape","current","as","rest","controlType","href","buttonState","role","undefined","type","iconPosition"],"mappings":"AAAA;;;;;;;;;;;;IA6CaO,gCAAAA;;;gCAtBAL;;;;6BAnB0B,yBAAyB;mCAElB,qCAAkC;AAiBzE,MAAMA,+BAA+B,CAC1CC,OACAC;IAEA,MAAM,EAAEC,IAAI,EAAE,OAAGJ,gDAAAA;IACjB,MAAMK,QAAQC,iCAAiCJ,OAAOC;IAEtD,OAAO;QACLI,YAAY;QACZH;QACAI,OAAO;QACP,GAAGH,KAAK;IACV;AACF,EAAE;AASK,yCAAyC,CAC9CH,OACAC;IAEA,MAAM,EAAEM,UAAU,KAAK,EAAEC,EAAE,EAAE,GAAGC,MAAM,GAAGT;IAEzC,MAAMU,cAAcF,
|
|
1
|
+
{"version":3,"sources":["../src/components/BreadcrumbButton/useBreadcrumbButton.ts"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport type { ARIAButtonProps } from '@fluentui/react-aria';\nimport { useButtonBase_unstable } from '@fluentui/react-button';\nimport type { ButtonBaseProps } from '@fluentui/react-button';\nimport { useBreadcrumbContext_unstable } from '../Breadcrumb/BreadcrumbContext';\nimport type {\n BreadcrumbButtonBaseProps,\n BreadcrumbButtonBaseState,\n BreadcrumbButtonProps,\n BreadcrumbButtonState,\n} from './BreadcrumbButton.types';\n\n/**\n * Create the state required to render BreadcrumbButton.\n *\n * The returned state can be modified with hooks such as useBreadcrumbButtonStyles_unstable,\n * before being passed to renderBreadcrumbButton_unstable.\n *\n * @param props - props from this instance of BreadcrumbButton\n * @param ref - reference to root HTMLElement of BreadcrumbButton\n */\nexport const useBreadcrumbButton_unstable = (\n props: BreadcrumbButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): BreadcrumbButtonState => {\n const { size } = useBreadcrumbContext_unstable();\n const state = useBreadcrumbButtonBase_unstable(props, ref);\n\n return {\n appearance: 'subtle',\n size,\n shape: 'rounded',\n ...state,\n };\n};\n\n/**\n * Base hook for BreadcrumbButton component, which manages state related to button behavior,\n * ARIA attributes (aria-current, aria-disabled), and slot structure without design props.\n *\n * @param props - props from this instance of BreadcrumbButton\n * @param ref - reference to root HTMLElement of BreadcrumbButton\n */\nexport const useBreadcrumbButtonBase_unstable = (\n props: BreadcrumbButtonBaseProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): BreadcrumbButtonBaseState => {\n const { current = false, as, ...rest } = props;\n\n const controlType = as ?? ((props as ARIAButtonProps<'a'>).href ? 'a' : 'button');\n\n const buttonState = useButtonBase_unstable(\n {\n role: undefined,\n type: undefined,\n as: controlType,\n iconPosition: 'before',\n 'aria-current': current ? props['aria-current'] ?? 'page' : undefined,\n 'aria-disabled': current ? props['aria-disabled'] ?? true : undefined,\n ...rest,\n } as ButtonBaseProps,\n ref,\n );\n\n return {\n ...buttonState,\n current,\n };\n};\n"],"names":["useButtonBase_unstable","useBreadcrumbContext_unstable","useBreadcrumbButton_unstable","props","ref","size","state","useBreadcrumbButtonBase_unstable","appearance","shape","current","as","rest","controlType","href","buttonState","role","undefined","type","iconPosition"],"mappings":"AAAA;;;;;;;;;;;;IA6CaO,gCAAAA;;;gCAtBAL;;;;6BAnB0B,yBAAyB;mCAElB,qCAAkC;AAiBzE,MAAMA,+BAA+B,CAC1CC,OACAC;IAEA,MAAM,EAAEC,IAAI,EAAE,OAAGJ,gDAAAA;IACjB,MAAMK,QAAQC,iCAAiCJ,OAAOC;IAEtD,OAAO;QACLI,YAAY;QACZH;QACAI,OAAO;QACP,GAAGH,KAAK;IACV;AACF,EAAE;AASK,yCAAyC,CAC9CH,OACAC;IAEA,MAAM,EAAEM,UAAU,KAAK,EAAEC,EAAE,EAAE,GAAGC,MAAM,GAAGT;IAEzC,MAAMU,cAAcF,OAAAA,QAAAA,OAAAA,KAAAA,IAAAA,KAAQR,MAA+BW,IAAI,GAAG,MAAM;QAQ1CX,oBACCA;IAP/B,MAAMY,cAAcf,uCAAAA,EAClB;QACEgB,MAAMC;QACNC,MAAMD;QACNN,IAAIE;QACJM,cAAc;QACd,gBAAgBT,UAAUP,CAAAA,qBAAAA,KAAK,CAAC,eAAA,AAAe,MAAA,QAArBA,uBAAAA,KAAAA,IAAAA,qBAAyB,SAASc;QAC5D,iBAAiBP,UAAUP,CAAAA,sBAAAA,KAAK,CAAC,gBAAA,AAAgB,MAAA,QAAtBA,wBAAAA,KAAAA,IAAAA,sBAA0B,OAAOc;QAC5D,GAAGL,IAAI;IACT,GACAR;IAGF,OAAO;QACL,GAAGW,WAAW;QACdL;IACF;AACF,EAAE"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-breadcrumb",
|
|
3
|
-
"version": "9.4.
|
|
3
|
+
"version": "9.4.6",
|
|
4
4
|
"description": "Breadcrumb component for Fluent UI React.",
|
|
5
5
|
"main": "lib-commonjs/index.cjs",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -12,23 +12,26 @@
|
|
|
12
12
|
},
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@fluentui/react-aria": "^9.17.
|
|
16
|
-
"@fluentui/react-button": "^9.11.
|
|
15
|
+
"@fluentui/react-aria": "^9.17.15",
|
|
16
|
+
"@fluentui/react-button": "^9.11.1",
|
|
17
17
|
"@fluentui/react-icons": "^2.0.245",
|
|
18
|
-
"@fluentui/react-jsx-runtime": "^9.4.
|
|
19
|
-
"@fluentui/react-link": "^9.8.
|
|
20
|
-
"@fluentui/react-shared-contexts": "^9.26.
|
|
21
|
-
"@fluentui/react-tabster": "^9.26.
|
|
18
|
+
"@fluentui/react-jsx-runtime": "^9.4.6",
|
|
19
|
+
"@fluentui/react-link": "^9.8.5",
|
|
20
|
+
"@fluentui/react-shared-contexts": "^9.26.4",
|
|
21
|
+
"@fluentui/react-tabster": "^9.26.18",
|
|
22
22
|
"@fluentui/react-theme": "^9.2.2",
|
|
23
|
-
"@fluentui/react-utilities": "^9.26.
|
|
23
|
+
"@fluentui/react-utilities": "^9.26.7",
|
|
24
24
|
"@griffel/react": "^1.5.32",
|
|
25
25
|
"@swc/helpers": "^0.5.1"
|
|
26
26
|
},
|
|
27
27
|
"peerDependencies": {
|
|
28
28
|
"@types/react": ">=16.14.0 <20.0.0",
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
"react": ">=16.14.0 <20.0.0"
|
|
30
|
+
},
|
|
31
|
+
"peerDependenciesMeta": {
|
|
32
|
+
"@types/react": {
|
|
33
|
+
"optional": true
|
|
34
|
+
}
|
|
32
35
|
},
|
|
33
36
|
"beachball": {
|
|
34
37
|
"disallowedChangeTypes": [
|