@fluentui/react-button 9.3.41 → 9.3.44

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,156 @@
2
2
  "name": "@fluentui/react-button",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 20 Sep 2023 17:40:42 GMT",
5
+ "date": "Mon, 02 Oct 2023 08:53:03 GMT",
6
+ "tag": "@fluentui/react-button_v9.3.44",
7
+ "version": "9.3.44",
8
+ "comments": {
9
+ "none": [
10
+ {
11
+ "author": "Humberto.Morimoto@microsoft.com",
12
+ "package": "@fluentui/react-button",
13
+ "commit": "d54dc8a1c10f8123413fe018e607cee9cffe2199",
14
+ "comment": "docs: Adding example of how to pass on click to primaryActionButton slot in the Default story for SplitButton."
15
+ }
16
+ ],
17
+ "patch": [
18
+ {
19
+ "author": "beachball",
20
+ "package": "@fluentui/react-button",
21
+ "comment": "Bump @fluentui/react-shared-contexts to v9.9.2",
22
+ "commit": "18ddec93bdb85a009bc1392058c52b2ea336340e"
23
+ },
24
+ {
25
+ "author": "beachball",
26
+ "package": "@fluentui/react-button",
27
+ "comment": "Bump @fluentui/react-tabster to v9.13.2",
28
+ "commit": "18ddec93bdb85a009bc1392058c52b2ea336340e"
29
+ }
30
+ ]
31
+ }
32
+ },
33
+ {
34
+ "date": "Tue, 26 Sep 2023 17:49:03 GMT",
35
+ "tag": "@fluentui/react-button_v9.3.43",
36
+ "version": "9.3.43",
37
+ "comments": {
38
+ "patch": [
39
+ {
40
+ "author": "yuanboxue@microsoft.com",
41
+ "package": "@fluentui/react-button",
42
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d",
43
+ "comment": "chore: trigger manual version bump after broken release"
44
+ },
45
+ {
46
+ "author": "beachball",
47
+ "package": "@fluentui/react-button",
48
+ "comment": "Bump @fluentui/keyboard-keys to v9.0.6",
49
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
50
+ },
51
+ {
52
+ "author": "beachball",
53
+ "package": "@fluentui/react-button",
54
+ "comment": "Bump @fluentui/react-aria to v9.3.38",
55
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
56
+ },
57
+ {
58
+ "author": "beachball",
59
+ "package": "@fluentui/react-button",
60
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.12",
61
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
62
+ },
63
+ {
64
+ "author": "beachball",
65
+ "package": "@fluentui/react-button",
66
+ "comment": "Bump @fluentui/react-shared-contexts to v9.9.1",
67
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
68
+ },
69
+ {
70
+ "author": "beachball",
71
+ "package": "@fluentui/react-button",
72
+ "comment": "Bump @fluentui/react-tabster to v9.13.1",
73
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
74
+ },
75
+ {
76
+ "author": "beachball",
77
+ "package": "@fluentui/react-button",
78
+ "comment": "Bump @fluentui/react-theme to v9.1.14",
79
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
80
+ },
81
+ {
82
+ "author": "beachball",
83
+ "package": "@fluentui/react-button",
84
+ "comment": "Bump @fluentui/react-utilities to v9.13.5",
85
+ "commit": "05a23f6f5f331841c9ac9fb63764440c543f791d"
86
+ }
87
+ ]
88
+ }
89
+ },
90
+ {
91
+ "date": "Tue, 26 Sep 2023 15:32:04 GMT",
92
+ "tag": "@fluentui/react-button_v9.3.42",
93
+ "version": "9.3.42",
94
+ "comments": {
95
+ "patch": [
96
+ {
97
+ "author": "martinhochel@microsoft.com",
98
+ "package": "@fluentui/react-button",
99
+ "commit": "e61473fa10195f6ebf2308205c1e72e91b711831",
100
+ "comment": "fix: bump swc core to mitigate transpilation memory leaks"
101
+ },
102
+ {
103
+ "author": "ololubek@microsoft.com",
104
+ "package": "@fluentui/react-button",
105
+ "commit": "a31e7394d9f169bc5aa55430a22cdc65425a1b49",
106
+ "comment": "chore: Update react-icons version to pick up IconDirectionContextProvider updated export"
107
+ },
108
+ {
109
+ "author": "beachball",
110
+ "package": "@fluentui/react-button",
111
+ "comment": "Bump @fluentui/keyboard-keys to v9.0.5",
112
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
113
+ },
114
+ {
115
+ "author": "beachball",
116
+ "package": "@fluentui/react-button",
117
+ "comment": "Bump @fluentui/react-aria to v9.3.37",
118
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
119
+ },
120
+ {
121
+ "author": "beachball",
122
+ "package": "@fluentui/react-button",
123
+ "comment": "Bump @fluentui/react-jsx-runtime to v9.0.11",
124
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
125
+ },
126
+ {
127
+ "author": "beachball",
128
+ "package": "@fluentui/react-button",
129
+ "comment": "Bump @fluentui/react-shared-contexts to v9.9.0",
130
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
131
+ },
132
+ {
133
+ "author": "beachball",
134
+ "package": "@fluentui/react-button",
135
+ "comment": "Bump @fluentui/react-tabster to v9.13.0",
136
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
137
+ },
138
+ {
139
+ "author": "beachball",
140
+ "package": "@fluentui/react-button",
141
+ "comment": "Bump @fluentui/react-theme to v9.1.13",
142
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
143
+ },
144
+ {
145
+ "author": "beachball",
146
+ "package": "@fluentui/react-button",
147
+ "comment": "Bump @fluentui/react-utilities to v9.13.4",
148
+ "commit": "e16520437e10cd824ac254dd797e32762b5de72d"
149
+ }
150
+ ]
151
+ }
152
+ },
153
+ {
154
+ "date": "Wed, 20 Sep 2023 17:47:35 GMT",
6
155
  "tag": "@fluentui/react-button_v9.3.41",
7
156
  "version": "9.3.41",
8
157
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,55 @@
1
1
  # Change Log - @fluentui/react-button
2
2
 
3
- This log was last generated on Wed, 20 Sep 2023 17:40:42 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 02 Oct 2023 08:53:03 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.3.44](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.3.44)
8
+
9
+ Mon, 02 Oct 2023 08:53:03 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.3.43..@fluentui/react-button_v9.3.44)
11
+
12
+ ### Patches
13
+
14
+ - Bump @fluentui/react-shared-contexts to v9.9.2 ([PR #29351](https://github.com/microsoft/fluentui/pull/29351) by beachball)
15
+ - Bump @fluentui/react-tabster to v9.13.2 ([PR #29351](https://github.com/microsoft/fluentui/pull/29351) by beachball)
16
+
17
+ ## [9.3.43](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.3.43)
18
+
19
+ Tue, 26 Sep 2023 17:49:03 GMT
20
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.3.42..@fluentui/react-button_v9.3.43)
21
+
22
+ ### Patches
23
+
24
+ - chore: trigger manual version bump after broken release ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by yuanboxue@microsoft.com)
25
+ - Bump @fluentui/keyboard-keys to v9.0.6 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
26
+ - Bump @fluentui/react-aria to v9.3.38 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
27
+ - Bump @fluentui/react-jsx-runtime to v9.0.12 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
28
+ - Bump @fluentui/react-shared-contexts to v9.9.1 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
29
+ - Bump @fluentui/react-tabster to v9.13.1 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
30
+ - Bump @fluentui/react-theme to v9.1.14 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
31
+ - Bump @fluentui/react-utilities to v9.13.5 ([PR #29303](https://github.com/microsoft/fluentui/pull/29303) by beachball)
32
+
33
+ ## [9.3.42](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.3.42)
34
+
35
+ Tue, 26 Sep 2023 15:32:04 GMT
36
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.3.41..@fluentui/react-button_v9.3.42)
37
+
38
+ ### Patches
39
+
40
+ - fix: bump swc core to mitigate transpilation memory leaks ([PR #29253](https://github.com/microsoft/fluentui/pull/29253) by martinhochel@microsoft.com)
41
+ - chore: Update react-icons version to pick up IconDirectionContextProvider updated export ([PR #29151](https://github.com/microsoft/fluentui/pull/29151) by ololubek@microsoft.com)
42
+ - Bump @fluentui/keyboard-keys to v9.0.5 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
43
+ - Bump @fluentui/react-aria to v9.3.37 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
44
+ - Bump @fluentui/react-jsx-runtime to v9.0.11 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
45
+ - Bump @fluentui/react-shared-contexts to v9.9.0 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
46
+ - Bump @fluentui/react-tabster to v9.13.0 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
47
+ - Bump @fluentui/react-theme to v9.1.13 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
48
+ - Bump @fluentui/react-utilities to v9.13.4 ([PR #29300](https://github.com/microsoft/fluentui/pull/29300) by beachball)
49
+
7
50
  ## [9.3.41](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.3.41)
8
51
 
9
- Wed, 20 Sep 2023 17:40:42 GMT
52
+ Wed, 20 Sep 2023 17:47:35 GMT
10
53
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.3.40..@fluentui/react-button_v9.3.41)
11
54
 
12
55
  ### Patches
@@ -7,7 +7,6 @@ import { useButtonContext } from '../../contexts/ButtonContext';
7
7
  * @param props - User provided props to the Button component.
8
8
  * @param ref - User provided ref to be passed to the Button component.
9
9
  */ export const useButton_unstable = (props, ref)=>{
10
- var _iconShorthand;
11
10
  const { size: contextSize } = useButtonContext();
12
11
  const { appearance = 'secondary', as = 'button', disabled = false, disabledFocusable = false, icon, iconPosition = 'before', shape = 'rounded', size = contextSize !== null && contextSize !== void 0 ? contextSize : 'medium' } = props;
13
12
  const iconShorthand = slot.optional(icon, {
@@ -21,7 +20,7 @@ import { useButtonContext } from '../../contexts/ButtonContext';
21
20
  iconPosition,
22
21
  shape,
23
22
  size,
24
- iconOnly: Boolean(((_iconShorthand = iconShorthand) === null || _iconShorthand === void 0 ? void 0 : _iconShorthand.children) && !props.children),
23
+ iconOnly: Boolean((iconShorthand === null || iconShorthand === void 0 ? void 0 : iconShorthand.children) && !props.children),
25
24
  components: {
26
25
  root: 'button',
27
26
  icon: 'span'
@@ -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","iconShorthand","size","contextSize","appearance","as","disabled","disabledFocusable","icon","iconPosition","shape","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;QAsBoBC;IApBpB,MAAM,EAAEC,MAAMC,WAAW,EAAE,GAAGN;IAC9B,MAAM,EACJO,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,GAAGJ;IACJ,MAAME,gBAAgBL,KAAKe,QAAQ,CAACH,MAAM;QAAEI,aAAa;IAAO;IAChE,OAAO;QACL,gCAAgC;QAChCR;QACAE;QACAC;QACAE;QACAC;QACAR;QACAW,UAAUC,QAAQb,EAAAA,iBAAAA,2BAAAA,qCAAAA,eAAec,QAAQ,KAAI,CAAChB,MAAMgB,QAAQ;QAC5DC,YAAY;YAAEC,MAAM;YAAUT,MAAM;QAAO;QAC3CS,MAAMrB,KAAKsB,MAAM,CACfvB,sBACEU,IACAX,uBAAiDK,OAAO;YACtDoB,UAAU;YACVC,cAAc;gBACZpB,KAAKA;gBACLqB,MAAM;YACR;QACF,KAEF;YAAET,aAAa;QAAS;QAE1BJ,MAAMP;IACR;AACF,EAAE"}
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"}
@@ -3,14 +3,13 @@ import { assertSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Renders a MenuButton component by passing the state defined props to the appropriate slots.
5
5
  */ export const renderMenuButton_unstable = (state)=>{
6
- var _icon;
7
6
  assertSlots(state);
8
7
  const { icon, iconOnly } = state;
9
8
  return /*#__PURE__*/ _jsxs(state.root, {
10
9
  children: [
11
10
  state.icon && /*#__PURE__*/ _jsx(state.icon, {}),
12
11
  !iconOnly && state.root.children,
13
- (!iconOnly || !((_icon = icon) === null || _icon === void 0 ? void 0 : _icon.children)) && state.menuIcon && /*#__PURE__*/ _jsx(state.menuIcon, {})
12
+ (!iconOnly || !(icon === null || icon === void 0 ? void 0 : icon.children)) && state.menuIcon && /*#__PURE__*/ _jsx(state.menuIcon, {})
14
13
  ]
15
14
  });
16
15
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderMenuButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { MenuButtonSlots, MenuButtonState } from './MenuButton.types';\n\n/**\n * Renders a MenuButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderMenuButton_unstable = (state: MenuButtonState) => {\n assertSlots<MenuButtonSlots>(state);\n const { icon, iconOnly } = state;\n\n return (\n <state.root>\n {state.icon && <state.icon />}\n {!iconOnly && state.root.children}\n {(!iconOnly || !icon?.children) && state.menuIcon && <state.menuIcon />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderMenuButton_unstable","state","icon","iconOnly","root","children","menuIcon"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC;QAQpBC;IAPpBH,YAA6BE;IAC7B,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGF;IAE3B,qBACE,MAACA,MAAMG,IAAI;;YACRH,MAAMC,IAAI,kBAAI,KAACD,MAAMC,IAAI;YACzB,CAACC,YAAYF,MAAMG,IAAI,CAACC,QAAQ;YAC/B,CAAA,CAACF,YAAY,GAACD,QAAAA,kBAAAA,4BAAAA,MAAMG,QAAQ,CAAD,KAAMJ,MAAMK,QAAQ,kBAAI,KAACL,MAAMK,QAAQ;;;AAG1E,EAAE"}
1
+ {"version":3,"sources":["renderMenuButton.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { MenuButtonSlots, MenuButtonState } from './MenuButton.types';\n\n/**\n * Renders a MenuButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderMenuButton_unstable = (state: MenuButtonState) => {\n assertSlots<MenuButtonSlots>(state);\n const { icon, iconOnly } = state;\n\n return (\n <state.root>\n {state.icon && <state.icon />}\n {!iconOnly && state.root.children}\n {(!iconOnly || !icon?.children) && state.menuIcon && <state.menuIcon />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderMenuButton_unstable","state","icon","iconOnly","root","children","menuIcon"],"mappings":"AAAA,0BAA0B,GAC1B,iDAAiD;AAEjD,SAASA,WAAW,QAAQ,4BAA4B;AAGxD;;CAEC,GACD,OAAO,MAAMC,4BAA4B,CAACC;IACxCF,YAA6BE;IAC7B,MAAM,EAAEC,IAAI,EAAEC,QAAQ,EAAE,GAAGF;IAE3B,qBACE,MAACA,MAAMG,IAAI;;YACRH,MAAMC,IAAI,kBAAI,KAACD,MAAMC,IAAI;YACzB,CAACC,YAAYF,MAAMG,IAAI,CAACC,QAAQ;YAC/B,CAAA,CAACF,YAAY,EAACD,iBAAAA,2BAAAA,KAAMG,QAAQ,CAAD,KAAMJ,MAAMK,QAAQ,kBAAI,KAACL,MAAMK,QAAQ;;;AAG1E,EAAE"}
@@ -35,8 +35,9 @@ import { MenuButton } from '../MenuButton/MenuButton';
35
35
  },
36
36
  renderByDefault: true,
37
37
  elementType: Button
38
- }); // Resolve menu button's aria-labelledby to be labelled by the primary action button if not a label was not provided
39
- // by the user.
38
+ });
39
+ // Resolve menu button's aria-labelledby to be labelled by the primary action button if no label was provided by the
40
+ // user.
40
41
  if (menuButtonShorthand && primaryActionButtonShorthand && !menuButtonShorthand['aria-label'] && !menuButtonShorthand['aria-labelledby']) {
41
42
  menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;
42
43
  }
@@ -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 }); // Resolve menu button's aria-labelledby to be labelled by the primary action button if not a label was not provided\n // by the user.\n if (\n menuButtonShorthand &&\n primaryActionButtonShorthand &&\n !menuButtonShorthand['aria-label'] &&\n !menuButtonShorthand['aria-labelledby']\n ) {\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, // 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,IAAI,oHAAoH;IACxH,eAAe;IACf,IACEiB,uBACAK,gCACA,CAACL,mBAAmB,CAAC,aAAa,IAClC,CAACA,mBAAmB,CAAC,kBAAkB,EACvC;QACAA,mBAAmB,CAAC,kBAAkB,GAAGK,6BAA6BC,EAAE;IAC1E;IACA,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 { 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"}
@@ -5,8 +5,10 @@ const buttonContextDefaultValue = {};
5
5
  * @internal
6
6
  * Internal context provider used to update default values between internal components
7
7
  */ export const ButtonContextProvider = buttonContext.Provider;
8
- var _React_useContext;
9
8
  /**
10
9
  * @internal
11
10
  * Internal context hook used to update default values between internal components
12
- */ export const useButtonContext = ()=>(_React_useContext = React.useContext(buttonContext)) !== null && _React_useContext !== void 0 ? _React_useContext : buttonContextDefaultValue;
11
+ */ export const useButtonContext = ()=>{
12
+ var _React_useContext;
13
+ return (_React_useContext = React.useContext(buttonContext)) !== null && _React_useContext !== void 0 ? _React_useContext : buttonContextDefaultValue;
14
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["ButtonContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { ButtonSize } from '../components/Button/Button.types';\n\nconst buttonContext = React.createContext<ButtonContextValue | undefined>(undefined);\n\n/**\n * @internal\n * Internal context value used to update default values between internal components\n */\nexport interface ButtonContextValue {\n size?: ButtonSize;\n}\n\nconst buttonContextDefaultValue: ButtonContextValue = {};\n\n/**\n * @internal\n * Internal context provider used to update default values between internal components\n */\nexport const ButtonContextProvider = buttonContext.Provider;\n\n/**\n * @internal\n * Internal context hook used to update default values between internal components\n */\nexport const useButtonContext = () => React.useContext(buttonContext) ?? buttonContextDefaultValue;\n"],"names":["React","buttonContext","createContext","undefined","buttonContextDefaultValue","ButtonContextProvider","Provider","useButtonContext","useContext"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,gBAAgBD,MAAME,aAAa,CAAiCC;AAU1E,MAAMC,4BAAgD,CAAC;AAEvD;;;CAGC,GACD,OAAO,MAAMC,wBAAwBJ,cAAcK,QAAQ,CAAC;IAMtBN;AAJtC;;;CAGC,GACD,OAAO,MAAMO,mBAAmB,IAAMP,CAAAA,oBAAAA,MAAMQ,UAAU,CAACP,4BAAjBD,+BAAAA,oBAAmCI,0BAA0B"}
1
+ {"version":3,"sources":["ButtonContext.ts"],"sourcesContent":["import * as React from 'react';\nimport { ButtonSize } from '../components/Button/Button.types';\n\nconst buttonContext = React.createContext<ButtonContextValue | undefined>(undefined);\n\n/**\n * @internal\n * Internal context value used to update default values between internal components\n */\nexport interface ButtonContextValue {\n size?: ButtonSize;\n}\n\nconst buttonContextDefaultValue: ButtonContextValue = {};\n\n/**\n * @internal\n * Internal context provider used to update default values between internal components\n */\nexport const ButtonContextProvider = buttonContext.Provider;\n\n/**\n * @internal\n * Internal context hook used to update default values between internal components\n */\nexport const useButtonContext = () => React.useContext(buttonContext) ?? buttonContextDefaultValue;\n"],"names":["React","buttonContext","createContext","undefined","buttonContextDefaultValue","ButtonContextProvider","Provider","useButtonContext","useContext"],"mappings":"AAAA,YAAYA,WAAW,QAAQ;AAG/B,MAAMC,gBAAgBD,MAAME,aAAa,CAAiCC;AAU1E,MAAMC,4BAAgD,CAAC;AAEvD;;;CAGC,GACD,OAAO,MAAMC,wBAAwBJ,cAAcK,QAAQ,CAAC;AAE5D;;;CAGC,GACD,OAAO,MAAMC,mBAAmB;QAAMP;WAAAA,CAAAA,oBAAAA,MAAMQ,UAAU,CAACP,4BAAjBD,+BAAAA,oBAAmCI;AAAwB,EAAE"}
@@ -14,7 +14,6 @@ const _reactaria = require("@fluentui/react-aria");
14
14
  const _reactutilities = require("@fluentui/react-utilities");
15
15
  const _ButtonContext = require("../../contexts/ButtonContext");
16
16
  const useButton_unstable = (props, ref)=>{
17
- var _iconShorthand;
18
17
  const { size: contextSize } = (0, _ButtonContext.useButtonContext)();
19
18
  const { appearance = 'secondary', as = 'button', disabled = false, disabledFocusable = false, icon, iconPosition = 'before', shape = 'rounded', size = contextSize !== null && contextSize !== void 0 ? contextSize : 'medium' } = props;
20
19
  const iconShorthand = _reactutilities.slot.optional(icon, {
@@ -28,7 +27,7 @@ const useButton_unstable = (props, ref)=>{
28
27
  iconPosition,
29
28
  shape,
30
29
  size,
31
- iconOnly: Boolean(((_iconShorthand = iconShorthand) === null || _iconShorthand === void 0 ? void 0 : _iconShorthand.children) && !props.children),
30
+ iconOnly: Boolean((iconShorthand === null || iconShorthand === void 0 ? void 0 : iconShorthand.children) && !props.children),
32
31
  components: {
33
32
  root: 'button',
34
33
  icon: 'span'
@@ -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 var _iconShorthand;\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 = 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","_iconShorthand","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,IAAIC;IACJ,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,GAAGJ;IACnO,MAAMa,gBAAgBC,oBAAI,CAACC,QAAQ,CAACL,MAAM;QACtCM,aAAa;IACjB;IACA,OAAO;QACH,gCAAgC;QAChCV;QACAE;QACAC;QACAE;QACAC;QACAT;QACAc,UAAUC,QAAQ,AAAC,CAAA,AAAChB,CAAAA,iBAAiBW,aAAY,MAAO,QAAQX,mBAAmB,KAAK,IAAI,KAAK,IAAIA,eAAeiB,QAAQ,AAAD,KAAM,CAACnB,MAAMmB,QAAQ;QAChJC,YAAY;YACRC,MAAM;YACNX,MAAM;QACV;QACAW,MAAMP,oBAAI,CAACQ,MAAM,CAACC,IAAAA,qCAAqB,EAAChB,IAAIiB,IAAAA,iCAAsB,EAACxB,OAAO;YACtEyB,UAAU;YACVC,cAAc;gBACVzB,KAAKA;gBACL0B,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 { 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"}
@@ -11,14 +11,13 @@ Object.defineProperty(exports, "renderMenuButton_unstable", {
11
11
  const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
12
  const _reactutilities = require("@fluentui/react-utilities");
13
13
  const renderMenuButton_unstable = (state)=>{
14
- var _icon;
15
14
  (0, _reactutilities.assertSlots)(state);
16
15
  const { icon, iconOnly } = state;
17
16
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
18
17
  children: [
19
18
  state.icon && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.icon, {}),
20
19
  !iconOnly && state.root.children,
21
- (!iconOnly || !((_icon = icon) === null || _icon === void 0 ? void 0 : _icon.children)) && state.menuIcon && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.menuIcon, {})
20
+ (!iconOnly || !(icon === null || icon === void 0 ? void 0 : icon.children)) && state.menuIcon && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.menuIcon, {})
22
21
  ]
23
22
  });
24
23
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["renderMenuButton.js"],"sourcesContent":[" import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Renders a MenuButton component by passing the state defined props to the appropriate slots.\n */ export const renderMenuButton_unstable = (state)=>{\n var _icon;\n assertSlots(state);\n const { icon, iconOnly } = state;\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n state.icon && /*#__PURE__*/ _jsx(state.icon, {}),\n !iconOnly && state.root.children,\n (!iconOnly || !((_icon = icon) === null || _icon === void 0 ? void 0 : _icon.children)) && state.menuIcon && /*#__PURE__*/ _jsx(state.menuIcon, {})\n ]\n });\n};\n"],"names":["renderMenuButton_unstable","state","_icon","assertSlots","icon","iconOnly","_jsxs","root","children","_jsx","menuIcon"],"mappings":";;;;+BAIiBA;;;eAAAA;;;4BAJ4B;gCACjB;AAGjB,MAAMA,4BAA4B,CAACC;IAC1C,IAAIC;IACJC,IAAAA,2BAAW,EAACF;IACZ,MAAM,EAAEG,IAAI,EAAEC,QAAQ,EAAE,GAAGJ;IAC3B,OAAO,WAAW,GAAGK,IAAAA,gBAAK,EAACL,MAAMM,IAAI,EAAE;QACnCC,UAAU;YACNP,MAAMG,IAAI,IAAI,WAAW,GAAGK,IAAAA,eAAI,EAACR,MAAMG,IAAI,EAAE,CAAC;YAC9C,CAACC,YAAYJ,MAAMM,IAAI,CAACC,QAAQ;YAC/B,CAAA,CAACH,YAAY,CAAE,CAAA,AAACH,CAAAA,QAAQE,IAAG,MAAO,QAAQF,UAAU,KAAK,IAAI,KAAK,IAAIA,MAAMM,QAAQ,AAAD,CAAC,KAAMP,MAAMS,QAAQ,IAAI,WAAW,GAAGD,IAAAA,eAAI,EAACR,MAAMS,QAAQ,EAAE,CAAC;SACpJ;IACL;AACJ"}
1
+ {"version":3,"sources":["renderMenuButton.js"],"sourcesContent":[" import { jsx as _jsx, jsxs as _jsxs } from \"@fluentui/react-jsx-runtime/jsx-runtime\";\nimport { assertSlots } from '@fluentui/react-utilities';\n/**\n * Renders a MenuButton component by passing the state defined props to the appropriate slots.\n */ export const renderMenuButton_unstable = (state)=>{\n assertSlots(state);\n const { icon, iconOnly } = state;\n return /*#__PURE__*/ _jsxs(state.root, {\n children: [\n state.icon && /*#__PURE__*/ _jsx(state.icon, {}),\n !iconOnly && state.root.children,\n (!iconOnly || !(icon === null || icon === void 0 ? void 0 : icon.children)) && state.menuIcon && /*#__PURE__*/ _jsx(state.menuIcon, {})\n ]\n });\n};\n"],"names":["renderMenuButton_unstable","state","assertSlots","icon","iconOnly","_jsxs","root","children","_jsx","menuIcon"],"mappings":";;;;+BAIiBA;;;eAAAA;;;4BAJ4B;gCACjB;AAGjB,MAAMA,4BAA4B,CAACC;IAC1CC,IAAAA,2BAAW,EAACD;IACZ,MAAM,EAAEE,IAAI,EAAEC,QAAQ,EAAE,GAAGH;IAC3B,OAAO,WAAW,GAAGI,IAAAA,gBAAK,EAACJ,MAAMK,IAAI,EAAE;QACnCC,UAAU;YACNN,MAAME,IAAI,IAAI,WAAW,GAAGK,IAAAA,eAAI,EAACP,MAAME,IAAI,EAAE,CAAC;YAC9C,CAACC,YAAYH,MAAMK,IAAI,CAACC,QAAQ;YAC/B,CAAA,CAACH,YAAY,CAAED,CAAAA,SAAS,QAAQA,SAAS,KAAK,IAAI,KAAK,IAAIA,KAAKI,QAAQ,AAAD,CAAC,KAAMN,MAAMQ,QAAQ,IAAI,WAAW,GAAGD,IAAAA,eAAI,EAACP,MAAMQ,QAAQ,EAAE,CAAC;SACxI;IACL;AACJ"}
@@ -42,8 +42,9 @@ const useSplitButton_unstable = (props, ref)=>{
42
42
  },
43
43
  renderByDefault: true,
44
44
  elementType: _Button.Button
45
- }); // Resolve menu button's aria-labelledby to be labelled by the primary action button if not a label was not provided
46
- // by the user.
45
+ });
46
+ // Resolve menu button's aria-labelledby to be labelled by the primary action button if no label was provided by the
47
+ // user.
47
48
  if (menuButtonShorthand && primaryActionButtonShorthand && !menuButtonShorthand['aria-label'] && !menuButtonShorthand['aria-labelledby']) {
48
49
  menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;
49
50
  }
@@ -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 }); // Resolve menu button's aria-labelledby to be labelled by the primary action button if not a label was not provided\n // by the 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,IAAI,oHAAoH;IACxH,eAAe;IACf,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 { 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"}
@@ -21,5 +21,7 @@ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
21
21
  const buttonContext = /*#__PURE__*/ _react.createContext(undefined);
22
22
  const buttonContextDefaultValue = {};
23
23
  const ButtonContextProvider = buttonContext.Provider;
24
- var _React_useContext;
25
- const useButtonContext = ()=>(_React_useContext = _react.useContext(buttonContext)) !== null && _React_useContext !== void 0 ? _React_useContext : buttonContextDefaultValue;
24
+ const useButtonContext = ()=>{
25
+ var _React_useContext;
26
+ return (_React_useContext = _react.useContext(buttonContext)) !== null && _React_useContext !== void 0 ? _React_useContext : buttonContextDefaultValue;
27
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["ButtonContext.js"],"sourcesContent":["import * as React from 'react';\nconst buttonContext = React.createContext(undefined);\nconst buttonContextDefaultValue = {};\n/**\n * @internal\n * Internal context provider used to update default values between internal components\n */ export const ButtonContextProvider = buttonContext.Provider;\nvar _React_useContext;\n/**\n * @internal\n * Internal context hook used to update default values between internal components\n */ export const useButtonContext = ()=>(_React_useContext = React.useContext(buttonContext)) !== null && _React_useContext !== void 0 ? _React_useContext : buttonContextDefaultValue;\n"],"names":["ButtonContextProvider","useButtonContext","buttonContext","React","createContext","undefined","buttonContextDefaultValue","Provider","_React_useContext","useContext"],"mappings":";;;;;;;;;;;IAMiBA,qBAAqB;eAArBA;;IAKAC,gBAAgB;eAAhBA;;;;iEAXM;AACvB,MAAMC,8BAAgBC,OAAMC,aAAa,CAACC;AAC1C,MAAMC,4BAA4B,CAAC;AAIxB,MAAMN,wBAAwBE,cAAcK,QAAQ;AAC/D,IAAIC;AAIO,MAAMP,mBAAmB,IAAI,AAACO,CAAAA,oBAAoBL,OAAMM,UAAU,CAACP,cAAa,MAAO,QAAQM,sBAAsB,KAAK,IAAIA,oBAAoBF"}
1
+ {"version":3,"sources":["ButtonContext.js"],"sourcesContent":["import * as React from 'react';\nconst buttonContext = React.createContext(undefined);\nconst buttonContextDefaultValue = {};\n/**\n * @internal\n * Internal context provider used to update default values between internal components\n */ export const ButtonContextProvider = buttonContext.Provider;\n/**\n * @internal\n * Internal context hook used to update default values between internal components\n */ export const useButtonContext = ()=>{\n var _React_useContext;\n return (_React_useContext = React.useContext(buttonContext)) !== null && _React_useContext !== void 0 ? _React_useContext : buttonContextDefaultValue;\n};\n"],"names":["ButtonContextProvider","useButtonContext","buttonContext","React","createContext","undefined","buttonContextDefaultValue","Provider","_React_useContext","useContext"],"mappings":";;;;;;;;;;;IAMiBA,qBAAqB;eAArBA;;IAIAC,gBAAgB;eAAhBA;;;;iEAVM;AACvB,MAAMC,8BAAgBC,OAAMC,aAAa,CAACC;AAC1C,MAAMC,4BAA4B,CAAC;AAIxB,MAAMN,wBAAwBE,cAAcK,QAAQ;AAIpD,MAAMN,mBAAmB;IAChC,IAAIO;IACJ,OAAO,AAACA,CAAAA,oBAAoBL,OAAMM,UAAU,CAACP,cAAa,MAAO,QAAQM,sBAAsB,KAAK,IAAIA,oBAAoBF;AAChI"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-button",
3
- "version": "9.3.41",
3
+ "version": "9.3.44",
4
4
  "description": "Fluent UI React Button component.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -34,14 +34,14 @@
34
34
  "@fluentui/scripts-tasks": "*"
35
35
  },
36
36
  "dependencies": {
37
- "@fluentui/keyboard-keys": "^9.0.4",
38
- "@fluentui/react-aria": "^9.3.36",
39
- "@fluentui/react-icons": "^2.0.207",
40
- "@fluentui/react-jsx-runtime": "^9.0.10",
41
- "@fluentui/react-shared-contexts": "^9.8.1",
42
- "@fluentui/react-tabster": "^9.12.11",
43
- "@fluentui/react-theme": "^9.1.12",
44
- "@fluentui/react-utilities": "^9.13.3",
37
+ "@fluentui/keyboard-keys": "^9.0.6",
38
+ "@fluentui/react-aria": "^9.3.38",
39
+ "@fluentui/react-icons": "^2.0.217",
40
+ "@fluentui/react-jsx-runtime": "^9.0.12",
41
+ "@fluentui/react-shared-contexts": "^9.9.2",
42
+ "@fluentui/react-tabster": "^9.13.2",
43
+ "@fluentui/react-theme": "^9.1.14",
44
+ "@fluentui/react-utilities": "^9.13.5",
45
45
  "@griffel/react": "^1.5.14",
46
46
  "@swc/helpers": "^0.5.1"
47
47
  },