@fluentui/react-button 9.3.49 → 9.3.50

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,46 @@
2
2
  "name": "@fluentui/react-button",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 12 Oct 2023 14:52:32 GMT",
5
+ "date": "Wed, 18 Oct 2023 17:47:31 GMT",
6
+ "tag": "@fluentui/react-button_v9.3.50",
7
+ "version": "9.3.50",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "bernardo.sunderhus@gmail.com",
12
+ "package": "@fluentui/react-button",
13
+ "commit": "967882a55a7333effea42e4c24a64e8547309116",
14
+ "comment": "chore: migrate from getNativeElementProps to getIntrinsicElementProps"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@fluentui/react-button",
19
+ "comment": "Bump @fluentui/react-aria to v9.3.43",
20
+ "commit": "c0d3065982e1646c54ba00c1d524248b792dbcad"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-button",
25
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.18",
26
+ "commit": "c0d3065982e1646c54ba00c1d524248b792dbcad"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-button",
31
+ "comment": "Bump @fluentui/react-tabster to v9.14.0",
32
+ "commit": "c0d3065982e1646c54ba00c1d524248b792dbcad"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-button",
37
+ "comment": "Bump @fluentui/react-utilities to v9.15.1",
38
+ "commit": "c0d3065982e1646c54ba00c1d524248b792dbcad"
39
+ }
40
+ ]
41
+ }
42
+ },
43
+ {
44
+ "date": "Thu, 12 Oct 2023 14:55:42 GMT",
6
45
  "tag": "@fluentui/react-button_v9.3.49",
7
46
  "version": "9.3.49",
8
47
  "comments": {
@@ -17,7 +56,7 @@
17
56
  "author": "beachball",
18
57
  "package": "@fluentui/react-button",
19
58
  "comment": "Bump @fluentui/react-jsx-runtime to v9.0.17",
20
- "commit": "1a52f5b27e2f71f7257c470bc9c7552ea5e07867"
59
+ "commit": "8178c3cae60005bc21137aa1f3e766e18cdb4a30"
21
60
  }
22
61
  ]
23
62
  }
package/CHANGELOG.md CHANGED
@@ -1,18 +1,31 @@
1
1
  # Change Log - @fluentui/react-button
2
2
 
3
- This log was last generated on Thu, 12 Oct 2023 14:52:32 GMT and should not be manually modified.
3
+ This log was last generated on Wed, 18 Oct 2023 17:47:31 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.3.50](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.3.50)
8
+
9
+ Wed, 18 Oct 2023 17:47:31 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.3.49..@fluentui/react-button_v9.3.50)
11
+
12
+ ### Patches
13
+
14
+ - chore: migrate from getNativeElementProps to getIntrinsicElementProps ([PR #29499](https://github.com/microsoft/fluentui/pull/29499) by bernardo.sunderhus@gmail.com)
15
+ - Bump @fluentui/react-aria to v9.3.43 ([PR #29560](https://github.com/microsoft/fluentui/pull/29560) by beachball)
16
+ - Bump @fluentui/react-jsx-runtime to v9.0.18 ([PR #29560](https://github.com/microsoft/fluentui/pull/29560) by beachball)
17
+ - Bump @fluentui/react-tabster to v9.14.0 ([PR #29560](https://github.com/microsoft/fluentui/pull/29560) by beachball)
18
+ - Bump @fluentui/react-utilities to v9.15.1 ([PR #29560](https://github.com/microsoft/fluentui/pull/29560) by beachball)
19
+
7
20
  ## [9.3.49](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.3.49)
8
21
 
9
- Thu, 12 Oct 2023 14:52:32 GMT
22
+ Thu, 12 Oct 2023 14:55:42 GMT
10
23
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.3.48..@fluentui/react-button_v9.3.49)
11
24
 
12
25
  ### Patches
13
26
 
14
27
  - fix: Transparent buttons visible in teams high contrast mode ([PR #29497](https://github.com/microsoft/fluentui/pull/29497) by lingfangao@hotmail.com)
15
- - Bump @fluentui/react-jsx-runtime to v9.0.17 ([PR #29488](https://github.com/microsoft/fluentui/pull/29488) by beachball)
28
+ - Bump @fluentui/react-jsx-runtime to v9.0.17 ([PR #29513](https://github.com/microsoft/fluentui/pull/29513) by beachball)
16
29
 
17
30
  ## [9.3.48](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.3.48)
18
31
 
package/dist/index.d.ts CHANGED
@@ -171,7 +171,7 @@ export declare const SplitButton: ForwardRefComponent<SplitButtonProps>;
171
171
 
172
172
  export declare const splitButtonClassNames: SlotClassNames<SplitButtonSlots>;
173
173
 
174
- export declare type SplitButtonProps = ComponentProps<SplitButtonSlots> & Omit<ButtonProps, 'root'> & Omit<MenuButtonProps, 'root'>;
174
+ export declare type SplitButtonProps = ComponentProps<SplitButtonSlots> & Omit<ButtonProps, 'root' | 'as'> & Omit<MenuButtonProps, 'root' | 'as'>;
175
175
 
176
176
  export declare type SplitButtonSlots = {
177
177
  /**
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { useARIAButtonShorthand } from '@fluentui/react-aria';
3
- import { getNativeElementProps, slot } from '@fluentui/react-utilities';
3
+ import { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';
4
4
  import { useButtonContext } from '../../contexts/ButtonContext';
5
5
  /**
6
6
  * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.
@@ -25,7 +25,7 @@ import { useButtonContext } from '../../contexts/ButtonContext';
25
25
  root: 'button',
26
26
  icon: 'span'
27
27
  },
28
- root: slot.always(getNativeElementProps(as, useARIAButtonShorthand(props, {
28
+ root: slot.always(getIntrinsicElementProps(as, useARIAButtonShorthand(props, {
29
29
  required: true,
30
30
  defaultProps: {
31
31
  ref: ref,
@@ -1 +1 @@
1
- {"version":3,"sources":["useButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { ARIAButtonSlotProps, useARIAButtonShorthand } from '@fluentui/react-aria';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { useButtonContext } from '../../contexts/ButtonContext';\nimport type { ButtonProps, ButtonState } from './Button.types';\n\n/**\n * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.\n * @param props - User provided props to the Button component.\n * @param ref - User provided ref to be passed to the Button component.\n */\nexport const useButton_unstable = (\n props: ButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ButtonState => {\n const { size: contextSize } = useButtonContext();\n const {\n appearance = 'secondary',\n as = 'button',\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n shape = 'rounded',\n size = contextSize ?? 'medium',\n } = props;\n const iconShorthand = slot.optional(icon, { elementType: 'span' });\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size, // State calculated from a set of props\n iconOnly: Boolean(iconShorthand?.children && !props.children), // Slots definition\n components: { root: 'button', icon: 'span' },\n root: slot.always(\n getNativeElementProps(\n as,\n useARIAButtonShorthand<ARIAButtonSlotProps<'a'>>(props, {\n required: true,\n defaultProps: {\n ref: ref as React.Ref<HTMLButtonElement & HTMLAnchorElement>,\n type: 'button',\n },\n }),\n ),\n { elementType: 'button' },\n ),\n icon: iconShorthand,\n };\n};\n"],"names":["React","useARIAButtonShorthand","getNativeElementProps","slot","useButtonContext","useButton_unstable","props","ref","size","contextSize","appearance","as","disabled","disabledFocusable","icon","iconPosition","shape","iconShorthand","optional","elementType","iconOnly","Boolean","children","components","root","always","required","defaultProps","type"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAA8BC,sBAAsB,QAAQ,uBAAuB;AACnF,SAASC,qBAAqB,EAAEC,IAAI,QAAQ,4BAA4B;AACxE,SAASC,gBAAgB,QAAQ,+BAA+B;AAGhE;;;;CAIC,GACD,OAAO,MAAMC,qBAAqB,CAChCC,OACAC;IAEA,MAAM,EAAEC,MAAMC,WAAW,EAAE,GAAGL;IAC9B,MAAM,EACJM,aAAa,WAAW,EACxBC,KAAK,QAAQ,EACbC,WAAW,KAAK,EAChBC,oBAAoB,KAAK,EACzBC,IAAI,EACJC,eAAe,QAAQ,EACvBC,QAAQ,SAAS,EACjBR,OAAOC,wBAAAA,yBAAAA,cAAe,QAAQ,EAC/B,GAAGH;IACJ,MAAMW,gBAAgBd,KAAKe,QAAQ,CAACJ,MAAM;QAAEK,aAAa;IAAO;IAChE,OAAO;QACL,gCAAgC;QAChCT;QACAE;QACAC;QACAE;QACAC;QACAR;QACAY,UAAUC,QAAQJ,CAAAA,0BAAAA,oCAAAA,cAAeK,QAAQ,KAAI,CAAChB,MAAMgB,QAAQ;QAC5DC,YAAY;YAAEC,MAAM;YAAUV,MAAM;QAAO;QAC3CU,MAAMrB,KAAKsB,MAAM,CACfvB,sBACES,IACAV,uBAAiDK,OAAO;YACtDoB,UAAU;YACVC,cAAc;gBACZpB,KAAKA;gBACLqB,MAAM;YACR;QACF,KAEF;YAAET,aAAa;QAAS;QAE1BL,MAAMG;IACR;AACF,EAAE"}
1
+ {"version":3,"sources":["useButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { ARIAButtonSlotProps, useARIAButtonShorthand } from '@fluentui/react-aria';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { useButtonContext } from '../../contexts/ButtonContext';\nimport type { ButtonProps, ButtonState } from './Button.types';\n\n/**\n * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.\n * @param props - User provided props to the Button component.\n * @param ref - User provided ref to be passed to the Button component.\n */\nexport const useButton_unstable = (\n props: ButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ButtonState => {\n const { size: contextSize } = useButtonContext();\n const {\n appearance = 'secondary',\n as = 'button',\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n shape = 'rounded',\n size = contextSize ?? 'medium',\n } = props;\n const iconShorthand = slot.optional(icon, { elementType: 'span' });\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size, // State calculated from a set of props\n iconOnly: Boolean(iconShorthand?.children && !props.children), // Slots definition\n components: { root: 'button', icon: 'span' },\n root: slot.always(\n getIntrinsicElementProps(\n as,\n useARIAButtonShorthand<ARIAButtonSlotProps<'a'>>(props, {\n required: true,\n defaultProps: {\n ref: ref as React.Ref<HTMLButtonElement & HTMLAnchorElement>,\n type: 'button',\n },\n }),\n ),\n { elementType: 'button' },\n ),\n icon: iconShorthand,\n };\n};\n"],"names":["React","useARIAButtonShorthand","getIntrinsicElementProps","slot","useButtonContext","useButton_unstable","props","ref","size","contextSize","appearance","as","disabled","disabledFocusable","icon","iconPosition","shape","iconShorthand","optional","elementType","iconOnly","Boolean","children","components","root","always","required","defaultProps","type"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAA8BC,sBAAsB,QAAQ,uBAAuB;AACnF,SAASC,wBAAwB,EAAEC,IAAI,QAAQ,4BAA4B;AAC3E,SAASC,gBAAgB,QAAQ,+BAA+B;AAGhE;;;;CAIC,GACD,OAAO,MAAMC,qBAAqB,CAChCC,OACAC;IAEA,MAAM,EAAEC,MAAMC,WAAW,EAAE,GAAGL;IAC9B,MAAM,EACJM,aAAa,WAAW,EACxBC,KAAK,QAAQ,EACbC,WAAW,KAAK,EAChBC,oBAAoB,KAAK,EACzBC,IAAI,EACJC,eAAe,QAAQ,EACvBC,QAAQ,SAAS,EACjBR,OAAOC,wBAAAA,yBAAAA,cAAe,QAAQ,EAC/B,GAAGH;IACJ,MAAMW,gBAAgBd,KAAKe,QAAQ,CAACJ,MAAM;QAAEK,aAAa;IAAO;IAChE,OAAO;QACL,gCAAgC;QAChCT;QACAE;QACAC;QACAE;QACAC;QACAR;QACAY,UAAUC,QAAQJ,CAAAA,0BAAAA,oCAAAA,cAAeK,QAAQ,KAAI,CAAChB,MAAMgB,QAAQ;QAC5DC,YAAY;YAAEC,MAAM;YAAUV,MAAM;QAAO;QAC3CU,MAAMrB,KAAKsB,MAAM,CACfvB,yBACES,IACAV,uBAAiDK,OAAO;YACtDoB,UAAU;YACVC,cAAc;gBACZpB,KAAKA;gBACLqB,MAAM;YACR;QACF,KAEF;YAAET,aAAa;QAAS;QAE1BL,MAAMG;IACR;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["SplitButton.types.ts"],"sourcesContent":["import { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ButtonProps, ButtonState } from '../Button/Button.types';\nimport type { MenuButtonProps, MenuButtonState } from '../MenuButton/MenuButton.types';\n\nexport type SplitButtonSlots = {\n /**\n * Root of the component that wraps the primary action button and menu button.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Button that opens menu with secondary actions in SplitButton.\n */\n menuButton?: Slot<typeof MenuButton>;\n /**\n * Button to perform primary action in SplitButton.\n */\n primaryActionButton?: Slot<typeof Button>;\n};\n\nexport type SplitButtonProps = ComponentProps<SplitButtonSlots> &\n Omit<ButtonProps, 'root'> &\n Omit<MenuButtonProps, 'root'>;\n\nexport type SplitButtonState = ComponentState<SplitButtonSlots> &\n Omit<ButtonState, 'components' | 'iconOnly' | 'root'> &\n Omit<MenuButtonState, 'components' | 'iconOnly' | 'root'>;\n"],"names":[],"mappings":"AAAA,WA4B4D"}
1
+ {"version":3,"sources":["SplitButton.types.ts"],"sourcesContent":["import { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ButtonProps, ButtonState } from '../Button/Button.types';\nimport type { MenuButtonProps, MenuButtonState } from '../MenuButton/MenuButton.types';\n\nexport type SplitButtonSlots = {\n /**\n * Root of the component that wraps the primary action button and menu button.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Button that opens menu with secondary actions in SplitButton.\n */\n menuButton?: Slot<typeof MenuButton>;\n /**\n * Button to perform primary action in SplitButton.\n */\n primaryActionButton?: Slot<typeof Button>;\n};\n\nexport type SplitButtonProps = ComponentProps<SplitButtonSlots> &\n Omit<ButtonProps, 'root' | 'as'> &\n Omit<MenuButtonProps, 'root' | 'as'>;\n\nexport type SplitButtonState = ComponentState<SplitButtonSlots> &\n Omit<ButtonState, 'components' | 'iconOnly' | 'root'> &\n Omit<MenuButtonState, 'components' | 'iconOnly' | 'root'>;\n"],"names":[],"mappings":"AAAA,WA4B4D"}
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { getNativeElementProps, useId, slot } from '@fluentui/react-utilities';
2
+ import { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';
3
3
  import { Button } from '../Button/Button';
4
4
  import { MenuButton } from '../MenuButton/MenuButton';
5
5
  /**
@@ -54,7 +54,7 @@ import { MenuButton } from '../MenuButton/MenuButton';
54
54
  menuButton: MenuButton,
55
55
  primaryActionButton: Button
56
56
  },
57
- root: slot.always(getNativeElementProps('div', {
57
+ root: slot.always(getIntrinsicElementProps('div', {
58
58
  ref,
59
59
  ...props
60
60
  }), {
@@ -1 +1 @@
1
- {"version":3,"sources":["useSplitButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useId, slot } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { SplitButtonProps, SplitButtonState } from './SplitButton.types';\n\n/**\n * Given user props, defines default props for the SplitButton and returns processed state.\n * @param props - User provided props to the SplitButton component.\n * @param ref - User provided ref to be passed to the SplitButton component.\n */\nexport const useSplitButton_unstable = (\n props: SplitButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): SplitButtonState => {\n const {\n appearance = 'secondary',\n children,\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n menuButton,\n menuIcon,\n primaryActionButton,\n shape = 'rounded',\n size = 'medium',\n } = props;\n\n const baseId = useId('splitButton-');\n\n const menuButtonShorthand = slot.optional(menuButton, {\n defaultProps: {\n appearance,\n disabled,\n disabledFocusable,\n menuIcon,\n shape,\n size,\n },\n renderByDefault: true,\n elementType: MenuButton,\n });\n const primaryActionButtonShorthand = slot.optional(primaryActionButton, {\n defaultProps: {\n appearance,\n children,\n disabled,\n disabledFocusable,\n icon,\n iconPosition,\n id: baseId + '__primaryActionButton',\n shape,\n size,\n },\n renderByDefault: true,\n elementType: Button,\n });\n\n // Resolve menu button's aria-labelledby to be labelled by the primary action button if no label was provided by the\n // user.\n if (\n menuButtonShorthand &&\n primaryActionButtonShorthand &&\n !menuButtonShorthand['aria-label'] &&\n !menuButtonShorthand['aria-labelledby']\n ) {\n menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;\n }\n\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size, // Slots definition\n components: { root: 'div', menuButton: MenuButton, primaryActionButton: Button },\n root: slot.always(getNativeElementProps('div', { ref, ...props }), { elementType: 'div' }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand,\n };\n};\n"],"names":["React","getNativeElementProps","useId","slot","Button","MenuButton","useSplitButton_unstable","props","ref","appearance","children","disabled","disabledFocusable","icon","iconPosition","menuButton","menuIcon","primaryActionButton","shape","size","baseId","menuButtonShorthand","optional","defaultProps","renderByDefault","elementType","primaryActionButtonShorthand","id","components","root","always"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,qBAAqB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAC/E,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,UAAU,QAAQ,2BAA2B;AAGtD;;;;CAIC,GACD,OAAO,MAAMC,0BAA0B,CACrCC,OACAC;IAEA,MAAM,EACJC,aAAa,WAAW,EACxBC,QAAQ,EACRC,WAAW,KAAK,EAChBC,oBAAoB,KAAK,EACzBC,IAAI,EACJC,eAAe,QAAQ,EACvBC,UAAU,EACVC,QAAQ,EACRC,mBAAmB,EACnBC,QAAQ,SAAS,EACjBC,OAAO,QAAQ,EAChB,GAAGZ;IAEJ,MAAMa,SAASlB,MAAM;IAErB,MAAMmB,sBAAsBlB,KAAKmB,QAAQ,CAACP,YAAY;QACpDQ,cAAc;YACZd;YACAE;YACAC;YACAI;YACAE;YACAC;QACF;QACAK,iBAAiB;QACjBC,aAAapB;IACf;IACA,MAAMqB,+BAA+BvB,KAAKmB,QAAQ,CAACL,qBAAqB;QACtEM,cAAc;YACZd;YACAC;YACAC;YACAC;YACAC;YACAC;YACAa,IAAIP,SAAS;YACbF;YACAC;QACF;QACAK,iBAAiB;QACjBC,aAAarB;IACf;IAEA,oHAAoH;IACpH,QAAQ;IACR,IACEiB,uBACAK,gCACA,CAACL,mBAAmB,CAAC,aAAa,IAClC,CAACA,mBAAmB,CAAC,kBAAkB,EACvC;QACAA,mBAAmB,CAAC,kBAAkB,GAAGK,6BAA6BC,EAAE;IAC1E;IAEA,OAAO;QACL,gCAAgC;QAChClB;QACAE;QACAC;QACAE;QACAI;QACAC;QACAS,YAAY;YAAEC,MAAM;YAAOd,YAAYV;YAAYY,qBAAqBb;QAAO;QAC/EyB,MAAM1B,KAAK2B,MAAM,CAAC7B,sBAAsB,OAAO;YAAEO;YAAK,GAAGD,KAAK;QAAC,IAAI;YAAEkB,aAAa;QAAM;QACxFV,YAAYM;QACZJ,qBAAqBS;IACvB;AACF,EAAE"}
1
+ {"version":3,"sources":["useSplitButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { SplitButtonProps, SplitButtonState } from './SplitButton.types';\n\n/**\n * Given user props, defines default props for the SplitButton and returns processed state.\n * @param props - User provided props to the SplitButton component.\n * @param ref - User provided ref to be passed to the SplitButton component.\n */\nexport const useSplitButton_unstable = (\n props: SplitButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): SplitButtonState => {\n const {\n appearance = 'secondary',\n children,\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n menuButton,\n menuIcon,\n primaryActionButton,\n shape = 'rounded',\n size = 'medium',\n } = props;\n const baseId = useId('splitButton-');\n\n const menuButtonShorthand = slot.optional(menuButton, {\n defaultProps: {\n appearance,\n disabled,\n disabledFocusable,\n menuIcon,\n shape,\n size,\n },\n renderByDefault: true,\n elementType: MenuButton,\n });\n const primaryActionButtonShorthand = slot.optional(primaryActionButton, {\n defaultProps: {\n appearance,\n children,\n disabled,\n disabledFocusable,\n icon,\n iconPosition,\n id: baseId + '__primaryActionButton',\n shape,\n size,\n },\n renderByDefault: true,\n elementType: Button,\n });\n\n // Resolve menu button's aria-labelledby to be labelled by the primary action button if no label was provided by the\n // user.\n if (\n menuButtonShorthand &&\n primaryActionButtonShorthand &&\n !menuButtonShorthand['aria-label'] &&\n !menuButtonShorthand['aria-labelledby']\n ) {\n menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;\n }\n\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size, // Slots definition\n components: { root: 'div', menuButton: MenuButton, primaryActionButton: Button },\n root: slot.always(getIntrinsicElementProps('div', { ref, ...props }), { elementType: 'div' }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand,\n };\n};\n"],"names":["React","getIntrinsicElementProps","useId","slot","Button","MenuButton","useSplitButton_unstable","props","ref","appearance","children","disabled","disabledFocusable","icon","iconPosition","menuButton","menuIcon","primaryActionButton","shape","size","baseId","menuButtonShorthand","optional","defaultProps","renderByDefault","elementType","primaryActionButtonShorthand","id","components","root","always"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAC/B,SAASC,wBAAwB,EAAEC,KAAK,EAAEC,IAAI,QAAQ,4BAA4B;AAClF,SAASC,MAAM,QAAQ,mBAAmB;AAC1C,SAASC,UAAU,QAAQ,2BAA2B;AAGtD;;;;CAIC,GACD,OAAO,MAAMC,0BAA0B,CACrCC,OACAC;IAEA,MAAM,EACJC,aAAa,WAAW,EACxBC,QAAQ,EACRC,WAAW,KAAK,EAChBC,oBAAoB,KAAK,EACzBC,IAAI,EACJC,eAAe,QAAQ,EACvBC,UAAU,EACVC,QAAQ,EACRC,mBAAmB,EACnBC,QAAQ,SAAS,EACjBC,OAAO,QAAQ,EAChB,GAAGZ;IACJ,MAAMa,SAASlB,MAAM;IAErB,MAAMmB,sBAAsBlB,KAAKmB,QAAQ,CAACP,YAAY;QACpDQ,cAAc;YACZd;YACAE;YACAC;YACAI;YACAE;YACAC;QACF;QACAK,iBAAiB;QACjBC,aAAapB;IACf;IACA,MAAMqB,+BAA+BvB,KAAKmB,QAAQ,CAACL,qBAAqB;QACtEM,cAAc;YACZd;YACAC;YACAC;YACAC;YACAC;YACAC;YACAa,IAAIP,SAAS;YACbF;YACAC;QACF;QACAK,iBAAiB;QACjBC,aAAarB;IACf;IAEA,oHAAoH;IACpH,QAAQ;IACR,IACEiB,uBACAK,gCACA,CAACL,mBAAmB,CAAC,aAAa,IAClC,CAACA,mBAAmB,CAAC,kBAAkB,EACvC;QACAA,mBAAmB,CAAC,kBAAkB,GAAGK,6BAA6BC,EAAE;IAC1E;IAEA,OAAO;QACL,gCAAgC;QAChClB;QACAE;QACAC;QACAE;QACAI;QACAC;QACAS,YAAY;YAAEC,MAAM;YAAOd,YAAYV;YAAYY,qBAAqBb;QAAO;QAC/EyB,MAAM1B,KAAK2B,MAAM,CAAC7B,yBAAyB,OAAO;YAAEO;YAAK,GAAGD,KAAK;QAAC,IAAI;YAAEkB,aAAa;QAAM;QAC3FV,YAAYM;QACZJ,qBAAqBS;IACvB;AACF,EAAE"}
@@ -32,7 +32,7 @@ const useButton_unstable = (props, ref)=>{
32
32
  root: 'button',
33
33
  icon: 'span'
34
34
  },
35
- root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)(as, (0, _reactaria.useARIAButtonShorthand)(props, {
35
+ root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)(as, (0, _reactaria.useARIAButtonShorthand)(props, {
36
36
  required: true,
37
37
  defaultProps: {
38
38
  ref: ref,
@@ -1 +1 @@
1
- {"version":3,"sources":["useButton.js"],"sourcesContent":["import * as React from 'react';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\nimport { getNativeElementProps, slot } from '@fluentui/react-utilities';\nimport { useButtonContext } from '../../contexts/ButtonContext';\n/**\n * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.\n * @param props - User provided props to the Button component.\n * @param ref - User provided ref to be passed to the Button component.\n */ export const useButton_unstable = (props, ref)=>{\n const { size: contextSize } = useButtonContext();\n const { appearance = 'secondary', as = 'button', disabled = false, disabledFocusable = false, icon, iconPosition = 'before', shape = 'rounded', size = contextSize !== null && contextSize !== void 0 ? contextSize : 'medium' } = props;\n const iconShorthand = slot.optional(icon, {\n elementType: 'span'\n });\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n iconOnly: Boolean((iconShorthand === null || iconShorthand === void 0 ? void 0 : iconShorthand.children) && !props.children),\n components: {\n root: 'button',\n icon: 'span'\n },\n root: slot.always(getNativeElementProps(as, useARIAButtonShorthand(props, {\n required: true,\n defaultProps: {\n ref: ref,\n type: 'button'\n }\n })), {\n elementType: 'button'\n }),\n icon: iconShorthand\n };\n};\n"],"names":["useButton_unstable","props","ref","size","contextSize","useButtonContext","appearance","as","disabled","disabledFocusable","icon","iconPosition","shape","iconShorthand","slot","optional","elementType","iconOnly","Boolean","children","components","root","always","getNativeElementProps","useARIAButtonShorthand","required","defaultProps","type"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;2BACgB;gCACK;+BACX;AAKtB,MAAMA,qBAAqB,CAACC,OAAOC;IAC1C,MAAM,EAAEC,MAAMC,WAAW,EAAE,GAAGC,IAAAA,+BAAgB;IAC9C,MAAM,EAAEC,aAAa,WAAW,EAAEC,KAAK,QAAQ,EAAEC,WAAW,KAAK,EAAEC,oBAAoB,KAAK,EAAEC,IAAI,EAAEC,eAAe,QAAQ,EAAEC,QAAQ,SAAS,EAAET,OAAOC,gBAAgB,QAAQA,gBAAgB,KAAK,IAAIA,cAAc,QAAQ,EAAE,GAAGH;IACnO,MAAMY,gBAAgBC,oBAAI,CAACC,QAAQ,CAACL,MAAM;QACtCM,aAAa;IACjB;IACA,OAAO;QACH,gCAAgC;QAChCV;QACAE;QACAC;QACAE;QACAC;QACAT;QACAc,UAAUC,QAAQ,AAACL,CAAAA,kBAAkB,QAAQA,kBAAkB,KAAK,IAAI,KAAK,IAAIA,cAAcM,QAAQ,AAAD,KAAM,CAAClB,MAAMkB,QAAQ;QAC3HC,YAAY;YACRC,MAAM;YACNX,MAAM;QACV;QACAW,MAAMP,oBAAI,CAACQ,MAAM,CAACC,IAAAA,qCAAqB,EAAChB,IAAIiB,IAAAA,iCAAsB,EAACvB,OAAO;YACtEwB,UAAU;YACVC,cAAc;gBACVxB,KAAKA;gBACLyB,MAAM;YACV;QACJ,KAAK;YACDX,aAAa;QACjB;QACAN,MAAMG;IACV;AACJ"}
1
+ {"version":3,"sources":["useButton.js"],"sourcesContent":["import * as React from 'react';\nimport { useARIAButtonShorthand } from '@fluentui/react-aria';\nimport { getIntrinsicElementProps, slot } from '@fluentui/react-utilities';\nimport { useButtonContext } from '../../contexts/ButtonContext';\n/**\n * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.\n * @param props - User provided props to the Button component.\n * @param ref - User provided ref to be passed to the Button component.\n */ export const useButton_unstable = (props, ref)=>{\n const { size: contextSize } = useButtonContext();\n const { appearance = 'secondary', as = 'button', disabled = false, disabledFocusable = false, icon, iconPosition = 'before', shape = 'rounded', size = contextSize !== null && contextSize !== void 0 ? contextSize : 'medium' } = props;\n const iconShorthand = slot.optional(icon, {\n elementType: 'span'\n });\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n iconOnly: Boolean((iconShorthand === null || iconShorthand === void 0 ? void 0 : iconShorthand.children) && !props.children),\n components: {\n root: 'button',\n icon: 'span'\n },\n root: slot.always(getIntrinsicElementProps(as, useARIAButtonShorthand(props, {\n required: true,\n defaultProps: {\n ref: ref,\n type: 'button'\n }\n })), {\n elementType: 'button'\n }),\n icon: iconShorthand\n };\n};\n"],"names":["useButton_unstable","props","ref","size","contextSize","useButtonContext","appearance","as","disabled","disabledFocusable","icon","iconPosition","shape","iconShorthand","slot","optional","elementType","iconOnly","Boolean","children","components","root","always","getIntrinsicElementProps","useARIAButtonShorthand","required","defaultProps","type"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;2BACgB;gCACQ;+BACd;AAKtB,MAAMA,qBAAqB,CAACC,OAAOC;IAC1C,MAAM,EAAEC,MAAMC,WAAW,EAAE,GAAGC,IAAAA,+BAAgB;IAC9C,MAAM,EAAEC,aAAa,WAAW,EAAEC,KAAK,QAAQ,EAAEC,WAAW,KAAK,EAAEC,oBAAoB,KAAK,EAAEC,IAAI,EAAEC,eAAe,QAAQ,EAAEC,QAAQ,SAAS,EAAET,OAAOC,gBAAgB,QAAQA,gBAAgB,KAAK,IAAIA,cAAc,QAAQ,EAAE,GAAGH;IACnO,MAAMY,gBAAgBC,oBAAI,CAACC,QAAQ,CAACL,MAAM;QACtCM,aAAa;IACjB;IACA,OAAO;QACH,gCAAgC;QAChCV;QACAE;QACAC;QACAE;QACAC;QACAT;QACAc,UAAUC,QAAQ,AAACL,CAAAA,kBAAkB,QAAQA,kBAAkB,KAAK,IAAI,KAAK,IAAIA,cAAcM,QAAQ,AAAD,KAAM,CAAClB,MAAMkB,QAAQ;QAC3HC,YAAY;YACRC,MAAM;YACNX,MAAM;QACV;QACAW,MAAMP,oBAAI,CAACQ,MAAM,CAACC,IAAAA,wCAAwB,EAAChB,IAAIiB,IAAAA,iCAAsB,EAACvB,OAAO;YACzEwB,UAAU;YACVC,cAAc;gBACVxB,KAAKA;gBACLyB,MAAM;YACV;QACJ,KAAK;YACDX,aAAa;QACjB;QACAN,MAAMG;IACV;AACJ"}
@@ -61,7 +61,7 @@ const useSplitButton_unstable = (props, ref)=>{
61
61
  menuButton: _MenuButton.MenuButton,
62
62
  primaryActionButton: _Button.Button
63
63
  },
64
- root: _reactutilities.slot.always((0, _reactutilities.getNativeElementProps)('div', {
64
+ root: _reactutilities.slot.always((0, _reactutilities.getIntrinsicElementProps)('div', {
65
65
  ref,
66
66
  ...props
67
67
  }), {
@@ -1 +1 @@
1
- {"version":3,"sources":["useSplitButton.js"],"sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, useId, slot } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\n/**\n * Given user props, defines default props for the SplitButton and returns processed state.\n * @param props - User provided props to the SplitButton component.\n * @param ref - User provided ref to be passed to the SplitButton component.\n */ export const useSplitButton_unstable = (props, ref)=>{\n const { appearance = 'secondary', children, disabled = false, disabledFocusable = false, icon, iconPosition = 'before', menuButton, menuIcon, primaryActionButton, shape = 'rounded', size = 'medium' } = props;\n const baseId = useId('splitButton-');\n const menuButtonShorthand = slot.optional(menuButton, {\n defaultProps: {\n appearance,\n disabled,\n disabledFocusable,\n menuIcon,\n shape,\n size\n },\n renderByDefault: true,\n elementType: MenuButton\n });\n const primaryActionButtonShorthand = slot.optional(primaryActionButton, {\n defaultProps: {\n appearance,\n children,\n disabled,\n disabledFocusable,\n icon,\n iconPosition,\n id: baseId + '__primaryActionButton',\n shape,\n size\n },\n renderByDefault: true,\n elementType: Button\n });\n // Resolve menu button's aria-labelledby to be labelled by the primary action button if no label was provided by the\n // user.\n if (menuButtonShorthand && primaryActionButtonShorthand && !menuButtonShorthand['aria-label'] && !menuButtonShorthand['aria-labelledby']) {\n menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;\n }\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n components: {\n root: 'div',\n menuButton: MenuButton,\n primaryActionButton: Button\n },\n root: slot.always(getNativeElementProps('div', {\n ref,\n ...props\n }), {\n elementType: 'div'\n }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand\n };\n};\n"],"names":["useSplitButton_unstable","props","ref","appearance","children","disabled","disabledFocusable","icon","iconPosition","menuButton","menuIcon","primaryActionButton","shape","size","baseId","useId","menuButtonShorthand","slot","optional","defaultProps","renderByDefault","elementType","MenuButton","primaryActionButtonShorthand","id","Button","components","root","always","getNativeElementProps"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;gCAC4B;wBAC5B;4BACI;AAKhB,MAAMA,0BAA0B,CAACC,OAAOC;IAC/C,MAAM,EAAEC,aAAa,WAAW,EAAEC,QAAQ,EAAEC,WAAW,KAAK,EAAEC,oBAAoB,KAAK,EAAEC,IAAI,EAAEC,eAAe,QAAQ,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,mBAAmB,EAAEC,QAAQ,SAAS,EAAEC,OAAO,QAAQ,EAAE,GAAGZ;IAC1M,MAAMa,SAASC,IAAAA,qBAAK,EAAC;IACrB,MAAMC,sBAAsBC,oBAAI,CAACC,QAAQ,CAACT,YAAY;QAClDU,cAAc;YACVhB;YACAE;YACAC;YACAI;YACAE;YACAC;QACJ;QACAO,iBAAiB;QACjBC,aAAaC,sBAAU;IAC3B;IACA,MAAMC,+BAA+BN,oBAAI,CAACC,QAAQ,CAACP,qBAAqB;QACpEQ,cAAc;YACVhB;YACAC;YACAC;YACAC;YACAC;YACAC;YACAgB,IAAIV,SAAS;YACbF;YACAC;QACJ;QACAO,iBAAiB;QACjBC,aAAaI,cAAM;IACvB;IACA,oHAAoH;IACpH,QAAQ;IACR,IAAIT,uBAAuBO,gCAAgC,CAACP,mBAAmB,CAAC,aAAa,IAAI,CAACA,mBAAmB,CAAC,kBAAkB,EAAE;QACtIA,mBAAmB,CAAC,kBAAkB,GAAGO,6BAA6BC,EAAE;IAC5E;IACA,OAAO;QACH,gCAAgC;QAChCrB;QACAE;QACAC;QACAE;QACAI;QACAC;QACAa,YAAY;YACRC,MAAM;YACNlB,YAAYa,sBAAU;YACtBX,qBAAqBc,cAAM;QAC/B;QACAE,MAAMV,oBAAI,CAACW,MAAM,CAACC,IAAAA,qCAAqB,EAAC,OAAO;YAC3C3B;YACA,GAAGD,KAAK;QACZ,IAAI;YACAoB,aAAa;QACjB;QACAZ,YAAYO;QACZL,qBAAqBY;IACzB;AACJ"}
1
+ {"version":3,"sources":["useSplitButton.js"],"sourcesContent":["import * as React from 'react';\nimport { getIntrinsicElementProps, useId, slot } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\n/**\n * Given user props, defines default props for the SplitButton and returns processed state.\n * @param props - User provided props to the SplitButton component.\n * @param ref - User provided ref to be passed to the SplitButton component.\n */ export const useSplitButton_unstable = (props, ref)=>{\n const { appearance = 'secondary', children, disabled = false, disabledFocusable = false, icon, iconPosition = 'before', menuButton, menuIcon, primaryActionButton, shape = 'rounded', size = 'medium' } = props;\n const baseId = useId('splitButton-');\n const menuButtonShorthand = slot.optional(menuButton, {\n defaultProps: {\n appearance,\n disabled,\n disabledFocusable,\n menuIcon,\n shape,\n size\n },\n renderByDefault: true,\n elementType: MenuButton\n });\n const primaryActionButtonShorthand = slot.optional(primaryActionButton, {\n defaultProps: {\n appearance,\n children,\n disabled,\n disabledFocusable,\n icon,\n iconPosition,\n id: baseId + '__primaryActionButton',\n shape,\n size\n },\n renderByDefault: true,\n elementType: Button\n });\n // Resolve menu button's aria-labelledby to be labelled by the primary action button if no label was provided by the\n // user.\n if (menuButtonShorthand && primaryActionButtonShorthand && !menuButtonShorthand['aria-label'] && !menuButtonShorthand['aria-labelledby']) {\n menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;\n }\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n components: {\n root: 'div',\n menuButton: MenuButton,\n primaryActionButton: Button\n },\n root: slot.always(getIntrinsicElementProps('div', {\n ref,\n ...props\n }), {\n elementType: 'div'\n }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand\n };\n};\n"],"names":["useSplitButton_unstable","props","ref","appearance","children","disabled","disabledFocusable","icon","iconPosition","menuButton","menuIcon","primaryActionButton","shape","size","baseId","useId","menuButtonShorthand","slot","optional","defaultProps","renderByDefault","elementType","MenuButton","primaryActionButtonShorthand","id","Button","components","root","always","getIntrinsicElementProps"],"mappings":";;;;+BAQiBA;;;eAAAA;;;;iEARM;gCAC+B;wBAC/B;4BACI;AAKhB,MAAMA,0BAA0B,CAACC,OAAOC;IAC/C,MAAM,EAAEC,aAAa,WAAW,EAAEC,QAAQ,EAAEC,WAAW,KAAK,EAAEC,oBAAoB,KAAK,EAAEC,IAAI,EAAEC,eAAe,QAAQ,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,mBAAmB,EAAEC,QAAQ,SAAS,EAAEC,OAAO,QAAQ,EAAE,GAAGZ;IAC1M,MAAMa,SAASC,IAAAA,qBAAK,EAAC;IACrB,MAAMC,sBAAsBC,oBAAI,CAACC,QAAQ,CAACT,YAAY;QAClDU,cAAc;YACVhB;YACAE;YACAC;YACAI;YACAE;YACAC;QACJ;QACAO,iBAAiB;QACjBC,aAAaC,sBAAU;IAC3B;IACA,MAAMC,+BAA+BN,oBAAI,CAACC,QAAQ,CAACP,qBAAqB;QACpEQ,cAAc;YACVhB;YACAC;YACAC;YACAC;YACAC;YACAC;YACAgB,IAAIV,SAAS;YACbF;YACAC;QACJ;QACAO,iBAAiB;QACjBC,aAAaI,cAAM;IACvB;IACA,oHAAoH;IACpH,QAAQ;IACR,IAAIT,uBAAuBO,gCAAgC,CAACP,mBAAmB,CAAC,aAAa,IAAI,CAACA,mBAAmB,CAAC,kBAAkB,EAAE;QACtIA,mBAAmB,CAAC,kBAAkB,GAAGO,6BAA6BC,EAAE;IAC5E;IACA,OAAO;QACH,gCAAgC;QAChCrB;QACAE;QACAC;QACAE;QACAI;QACAC;QACAa,YAAY;YACRC,MAAM;YACNlB,YAAYa,sBAAU;YACtBX,qBAAqBc,cAAM;QAC/B;QACAE,MAAMV,oBAAI,CAACW,MAAM,CAACC,IAAAA,wCAAwB,EAAC,OAAO;YAC9C3B;YACA,GAAGD,KAAK;QACZ,IAAI;YACAoB,aAAa;QACjB;QACAZ,YAAYO;QACZL,qBAAqBY;IACzB;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-button",
3
- "version": "9.3.49",
3
+ "version": "9.3.50",
4
4
  "description": "Fluent UI React Button component.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -35,13 +35,13 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@fluentui/keyboard-keys": "^9.0.6",
38
- "@fluentui/react-aria": "^9.3.42",
38
+ "@fluentui/react-aria": "^9.3.43",
39
39
  "@fluentui/react-icons": "^2.0.217",
40
- "@fluentui/react-jsx-runtime": "^9.0.17",
40
+ "@fluentui/react-jsx-runtime": "^9.0.18",
41
41
  "@fluentui/react-shared-contexts": "^9.10.0",
42
- "@fluentui/react-tabster": "^9.13.6",
42
+ "@fluentui/react-tabster": "^9.14.0",
43
43
  "@fluentui/react-theme": "^9.1.14",
44
- "@fluentui/react-utilities": "^9.15.0",
44
+ "@fluentui/react-utilities": "^9.15.1",
45
45
  "@griffel/react": "^1.5.14",
46
46
  "@swc/helpers": "^0.5.1"
47
47
  },