@fluentui/react-button 9.3.43 → 9.3.44
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +30 -1
- package/CHANGELOG.md +12 -2
- package/lib/components/SplitButton/useSplitButton.js +3 -2
- package/lib/components/SplitButton/useSplitButton.js.map +1 -1
- package/lib-commonjs/components/SplitButton/useSplitButton.js +3 -2
- package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.json
CHANGED
@@ -2,7 +2,36 @@
|
|
2
2
|
"name": "@fluentui/react-button",
|
3
3
|
"entries": [
|
4
4
|
{
|
5
|
-
"date": "
|
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",
|
6
35
|
"tag": "@fluentui/react-button_v9.3.43",
|
7
36
|
"version": "9.3.43",
|
8
37
|
"comments": {
|
package/CHANGELOG.md
CHANGED
@@ -1,12 +1,22 @@
|
|
1
1
|
# Change Log - @fluentui/react-button
|
2
2
|
|
3
|
-
This log was last generated on
|
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
|
+
|
7
17
|
## [9.3.43](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.3.43)
|
8
18
|
|
9
|
-
Tue, 26 Sep 2023 17:
|
19
|
+
Tue, 26 Sep 2023 17:49:03 GMT
|
10
20
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.3.42..@fluentui/react-button_v9.3.43)
|
11
21
|
|
12
22
|
### Patches
|
@@ -35,8 +35,9 @@ import { MenuButton } from '../MenuButton/MenuButton';
|
|
35
35
|
},
|
36
36
|
renderByDefault: true,
|
37
37
|
elementType: Button
|
38
|
-
});
|
39
|
-
// by the
|
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 })
|
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"}
|
@@ -42,8 +42,9 @@ const useSplitButton_unstable = (props, ref)=>{
|
|
42
42
|
},
|
43
43
|
renderByDefault: true,
|
44
44
|
elementType: _Button.Button
|
45
|
-
});
|
46
|
-
// by the
|
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 })
|
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"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-button",
|
3
|
-
"version": "9.3.
|
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",
|
@@ -38,8 +38,8 @@
|
|
38
38
|
"@fluentui/react-aria": "^9.3.38",
|
39
39
|
"@fluentui/react-icons": "^2.0.217",
|
40
40
|
"@fluentui/react-jsx-runtime": "^9.0.12",
|
41
|
-
"@fluentui/react-shared-contexts": "^9.9.
|
42
|
-
"@fluentui/react-tabster": "^9.13.
|
41
|
+
"@fluentui/react-shared-contexts": "^9.9.2",
|
42
|
+
"@fluentui/react-tabster": "^9.13.2",
|
43
43
|
"@fluentui/react-theme": "^9.1.14",
|
44
44
|
"@fluentui/react-utilities": "^9.13.5",
|
45
45
|
"@griffel/react": "^1.5.14",
|