@fluentui/react-button 9.3.33 → 9.3.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. package/CHANGELOG.json +103 -1
  2. package/CHANGELOG.md +32 -2
  3. package/lib/components/Button/Button.js.map +1 -1
  4. package/lib/components/Button/renderButton.js +9 -3
  5. package/lib/components/Button/renderButton.js.map +1 -1
  6. package/lib/components/Button/useButton.js +4 -3
  7. package/lib/components/Button/useButton.js.map +1 -1
  8. package/lib/components/Button/useButtonStyles.styles.js +5 -5
  9. package/lib/components/Button/useButtonStyles.styles.js.map +1 -1
  10. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  11. package/lib/components/CompoundButton/renderCompoundButton.js +14 -3
  12. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  13. package/lib/components/CompoundButton/useCompoundButton.js +1 -1
  14. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  15. package/lib/components/CompoundButton/useCompoundButtonStyles.styles.js.map +1 -1
  16. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  17. package/lib/components/MenuButton/renderMenuButton.js +10 -3
  18. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  19. package/lib/components/MenuButton/useMenuButton.js +1 -1
  20. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  21. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  22. package/lib/components/SplitButton/renderSplitButton.js +7 -2
  23. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  24. package/lib/components/SplitButton/useSplitButton.js +1 -1
  25. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  26. package/lib/components/SplitButton/useSplitButtonStyles.styles.js.map +1 -1
  27. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  28. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  29. package/lib/components/ToggleButton/useToggleButtonStyles.styles.js.map +1 -1
  30. package/lib/contexts/ButtonContext.js.map +1 -1
  31. package/lib/utils/useToggleState.js +2 -2
  32. package/lib/utils/useToggleState.js.map +1 -1
  33. package/lib-commonjs/Button.js +2 -2
  34. package/lib-commonjs/Button.js.map +1 -1
  35. package/lib-commonjs/CompoundButton.js +2 -2
  36. package/lib-commonjs/CompoundButton.js.map +1 -1
  37. package/lib-commonjs/MenuButton.js +2 -2
  38. package/lib-commonjs/MenuButton.js.map +1 -1
  39. package/lib-commonjs/SplitButton.js +2 -2
  40. package/lib-commonjs/SplitButton.js.map +1 -1
  41. package/lib-commonjs/ToggleButton.js +2 -2
  42. package/lib-commonjs/ToggleButton.js.map +1 -1
  43. package/lib-commonjs/components/Button/Button.js +9 -7
  44. package/lib-commonjs/components/Button/Button.js.map +1 -1
  45. package/lib-commonjs/components/Button/index.js +11 -7
  46. package/lib-commonjs/components/Button/index.js.map +1 -1
  47. package/lib-commonjs/components/Button/renderButton.js +15 -7
  48. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  49. package/lib-commonjs/components/Button/useButton.js +14 -11
  50. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  51. package/lib-commonjs/components/Button/useButtonStyles.styles.js +26 -26
  52. package/lib-commonjs/components/Button/useButtonStyles.styles.js.map +1 -1
  53. package/lib-commonjs/components/CompoundButton/CompoundButton.js +9 -7
  54. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  55. package/lib-commonjs/components/CompoundButton/index.js +12 -8
  56. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  57. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +20 -7
  58. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  59. package/lib-commonjs/components/CompoundButton/useCompoundButton.js +9 -7
  60. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  61. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.styles.js +14 -10
  62. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.styles.js.map +1 -1
  63. package/lib-commonjs/components/MenuButton/MenuButton.js +9 -7
  64. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  65. package/lib-commonjs/components/MenuButton/index.js +12 -8
  66. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  67. package/lib-commonjs/components/MenuButton/renderMenuButton.js +16 -7
  68. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  69. package/lib-commonjs/components/MenuButton/useMenuButton.js +10 -8
  70. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  71. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.styles.js +11 -7
  72. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.styles.js.map +1 -1
  73. package/lib-commonjs/components/SplitButton/SplitButton.js +9 -7
  74. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  75. package/lib-commonjs/components/SplitButton/index.js +12 -8
  76. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  77. package/lib-commonjs/components/SplitButton/renderSplitButton.js +13 -6
  78. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  79. package/lib-commonjs/components/SplitButton/useSplitButton.js +17 -15
  80. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  81. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.styles.js +9 -5
  82. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.styles.js.map +1 -1
  83. package/lib-commonjs/components/ToggleButton/ToggleButton.js +9 -7
  84. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  85. package/lib-commonjs/components/ToggleButton/index.js +12 -8
  86. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  87. package/lib-commonjs/components/ToggleButton/renderToggleButton.js +3 -1
  88. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
  89. package/lib-commonjs/components/ToggleButton/useToggleButton.js +5 -3
  90. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  91. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.styles.js +13 -9
  92. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.styles.js.map +1 -1
  93. package/lib-commonjs/contexts/ButtonContext.js +8 -4
  94. package/lib-commonjs/contexts/ButtonContext.js.map +1 -1
  95. package/lib-commonjs/contexts/index.js +2 -2
  96. package/lib-commonjs/contexts/index.js.map +1 -1
  97. package/lib-commonjs/index.js +89 -33
  98. package/lib-commonjs/index.js.map +1 -1
  99. package/lib-commonjs/utils/index.js +2 -2
  100. package/lib-commonjs/utils/index.js.map +1 -1
  101. package/lib-commonjs/utils/useToggleState.js +10 -8
  102. package/lib-commonjs/utils/useToggleState.js.map +1 -1
  103. package/package.json +13 -13
@@ -9,39 +9,95 @@ function _export(target, all) {
9
9
  });
10
10
  }
11
11
  _export(exports, {
12
- Button: ()=>_button.Button,
13
- buttonClassNames: ()=>_button.buttonClassNames,
14
- renderButton_unstable: ()=>_button.renderButton_unstable,
15
- useButtonStyles_unstable: ()=>_button.useButtonStyles_unstable,
16
- useButton_unstable: ()=>_button.useButton_unstable,
17
- CompoundButton: ()=>_compoundButton.CompoundButton,
18
- compoundButtonClassNames: ()=>_compoundButton.compoundButtonClassNames,
19
- renderCompoundButton_unstable: ()=>_compoundButton.renderCompoundButton_unstable,
20
- useCompoundButtonStyles_unstable: ()=>_compoundButton.useCompoundButtonStyles_unstable,
21
- useCompoundButton_unstable: ()=>_compoundButton.useCompoundButton_unstable,
22
- MenuButton: ()=>_menuButton.MenuButton,
23
- menuButtonClassNames: ()=>_menuButton.menuButtonClassNames,
24
- renderMenuButton_unstable: ()=>_menuButton.renderMenuButton_unstable,
25
- useMenuButtonStyles_unstable: ()=>_menuButton.useMenuButtonStyles_unstable,
26
- useMenuButton_unstable: ()=>_menuButton.useMenuButton_unstable,
27
- SplitButton: ()=>_splitButton.SplitButton,
28
- renderSplitButton_unstable: ()=>_splitButton.renderSplitButton_unstable,
29
- splitButtonClassNames: ()=>_splitButton.splitButtonClassNames,
30
- useSplitButtonStyles_unstable: ()=>_splitButton.useSplitButtonStyles_unstable,
31
- useSplitButton_unstable: ()=>_splitButton.useSplitButton_unstable,
32
- ToggleButton: ()=>_toggleButton.ToggleButton,
33
- renderToggleButton_unstable: ()=>_toggleButton.renderToggleButton_unstable,
34
- toggleButtonClassNames: ()=>_toggleButton.toggleButtonClassNames,
35
- useToggleButtonStyles_unstable: ()=>_toggleButton.useToggleButtonStyles_unstable,
36
- useToggleButton_unstable: ()=>_toggleButton.useToggleButton_unstable,
37
- useToggleState: ()=>_index.useToggleState,
38
- ButtonContextProvider: ()=>_index1.ButtonContextProvider,
39
- useButtonContext: ()=>_index1.useButtonContext
12
+ Button: function() {
13
+ return _Button.Button;
14
+ },
15
+ buttonClassNames: function() {
16
+ return _Button.buttonClassNames;
17
+ },
18
+ renderButton_unstable: function() {
19
+ return _Button.renderButton_unstable;
20
+ },
21
+ useButtonStyles_unstable: function() {
22
+ return _Button.useButtonStyles_unstable;
23
+ },
24
+ useButton_unstable: function() {
25
+ return _Button.useButton_unstable;
26
+ },
27
+ CompoundButton: function() {
28
+ return _CompoundButton.CompoundButton;
29
+ },
30
+ compoundButtonClassNames: function() {
31
+ return _CompoundButton.compoundButtonClassNames;
32
+ },
33
+ renderCompoundButton_unstable: function() {
34
+ return _CompoundButton.renderCompoundButton_unstable;
35
+ },
36
+ useCompoundButtonStyles_unstable: function() {
37
+ return _CompoundButton.useCompoundButtonStyles_unstable;
38
+ },
39
+ useCompoundButton_unstable: function() {
40
+ return _CompoundButton.useCompoundButton_unstable;
41
+ },
42
+ MenuButton: function() {
43
+ return _MenuButton.MenuButton;
44
+ },
45
+ menuButtonClassNames: function() {
46
+ return _MenuButton.menuButtonClassNames;
47
+ },
48
+ renderMenuButton_unstable: function() {
49
+ return _MenuButton.renderMenuButton_unstable;
50
+ },
51
+ useMenuButtonStyles_unstable: function() {
52
+ return _MenuButton.useMenuButtonStyles_unstable;
53
+ },
54
+ useMenuButton_unstable: function() {
55
+ return _MenuButton.useMenuButton_unstable;
56
+ },
57
+ SplitButton: function() {
58
+ return _SplitButton.SplitButton;
59
+ },
60
+ renderSplitButton_unstable: function() {
61
+ return _SplitButton.renderSplitButton_unstable;
62
+ },
63
+ splitButtonClassNames: function() {
64
+ return _SplitButton.splitButtonClassNames;
65
+ },
66
+ useSplitButtonStyles_unstable: function() {
67
+ return _SplitButton.useSplitButtonStyles_unstable;
68
+ },
69
+ useSplitButton_unstable: function() {
70
+ return _SplitButton.useSplitButton_unstable;
71
+ },
72
+ ToggleButton: function() {
73
+ return _ToggleButton.ToggleButton;
74
+ },
75
+ renderToggleButton_unstable: function() {
76
+ return _ToggleButton.renderToggleButton_unstable;
77
+ },
78
+ toggleButtonClassNames: function() {
79
+ return _ToggleButton.toggleButtonClassNames;
80
+ },
81
+ useToggleButtonStyles_unstable: function() {
82
+ return _ToggleButton.useToggleButtonStyles_unstable;
83
+ },
84
+ useToggleButton_unstable: function() {
85
+ return _ToggleButton.useToggleButton_unstable;
86
+ },
87
+ useToggleState: function() {
88
+ return _index.useToggleState;
89
+ },
90
+ ButtonContextProvider: function() {
91
+ return _index1.ButtonContextProvider;
92
+ },
93
+ useButtonContext: function() {
94
+ return _index1.useButtonContext;
95
+ }
40
96
  });
41
- const _button = require("./Button");
42
- const _compoundButton = require("./CompoundButton");
43
- const _menuButton = require("./MenuButton");
44
- const _splitButton = require("./SplitButton");
45
- const _toggleButton = require("./ToggleButton");
97
+ const _Button = require("./Button");
98
+ const _CompoundButton = require("./CompoundButton");
99
+ const _MenuButton = require("./MenuButton");
100
+ const _SplitButton = require("./SplitButton");
101
+ const _ToggleButton = require("./ToggleButton");
46
102
  const _index = require("./utils/index");
47
103
  const _index1 = require("./contexts/index");
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export { Button, buttonClassNames, renderButton_unstable, useButtonStyles_unstable, useButton_unstable } from './Button';\nexport { CompoundButton, compoundButtonClassNames, renderCompoundButton_unstable, useCompoundButtonStyles_unstable, useCompoundButton_unstable } from './CompoundButton';\nexport { MenuButton, menuButtonClassNames, renderMenuButton_unstable, useMenuButtonStyles_unstable, useMenuButton_unstable } from './MenuButton';\nexport { SplitButton, renderSplitButton_unstable, splitButtonClassNames, useSplitButtonStyles_unstable, useSplitButton_unstable } from './SplitButton';\nexport { ToggleButton, renderToggleButton_unstable, toggleButtonClassNames, useToggleButtonStyles_unstable, useToggleButton_unstable } from './ToggleButton';\nexport { useToggleState } from './utils/index';\nexport { ButtonContextProvider, useButtonContext } from './contexts/index';\n"],"names":["Button","buttonClassNames","renderButton_unstable","useButtonStyles_unstable","useButton_unstable","CompoundButton","compoundButtonClassNames","renderCompoundButton_unstable","useCompoundButtonStyles_unstable","useCompoundButton_unstable","MenuButton","menuButtonClassNames","renderMenuButton_unstable","useMenuButtonStyles_unstable","useMenuButton_unstable","SplitButton","renderSplitButton_unstable","splitButtonClassNames","useSplitButtonStyles_unstable","useSplitButton_unstable","ToggleButton","renderToggleButton_unstable","toggleButtonClassNames","useToggleButtonStyles_unstable","useToggleButton_unstable","useToggleState","ButtonContextProvider","useButtonContext"],"mappings":";;;;;;;;;;;IAASA,MAAM,MAANA,cAAM;IAAEC,gBAAgB,MAAhBA,wBAAgB;IAAEC,qBAAqB,MAArBA,6BAAqB;IAAEC,wBAAwB,MAAxBA,gCAAwB;IAAEC,kBAAkB,MAAlBA,0BAAkB;IAC7FC,cAAc,MAAdA,8BAAc;IAAEC,wBAAwB,MAAxBA,wCAAwB;IAAEC,6BAA6B,MAA7BA,6CAA6B;IAAEC,gCAAgC,MAAhCA,gDAAgC;IAAEC,0BAA0B,MAA1BA,0CAA0B;IACrIC,UAAU,MAAVA,sBAAU;IAAEC,oBAAoB,MAApBA,gCAAoB;IAAEC,yBAAyB,MAAzBA,qCAAyB;IAAEC,4BAA4B,MAA5BA,wCAA4B;IAAEC,sBAAsB,MAAtBA,kCAAsB;IACjHC,WAAW,MAAXA,wBAAW;IAAEC,0BAA0B,MAA1BA,uCAA0B;IAAEC,qBAAqB,MAArBA,kCAAqB;IAAEC,6BAA6B,MAA7BA,0CAA6B;IAAEC,uBAAuB,MAAvBA,oCAAuB;IACtHC,YAAY,MAAZA,0BAAY;IAAEC,2BAA2B,MAA3BA,yCAA2B;IAAEC,sBAAsB,MAAtBA,oCAAsB;IAAEC,8BAA8B,MAA9BA,4CAA8B;IAAEC,wBAAwB,MAAxBA,sCAAwB;IAC3HC,cAAc,MAAdA,qBAAc;IACdC,qBAAqB,MAArBA,6BAAqB;IAAEC,gBAAgB,MAAhBA,wBAAgB;;wBAN8D;gCACwC;4BACpB;6BACK;8BACK;uBAC7G;wBACyB"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export { Button, buttonClassNames, renderButton_unstable, useButtonStyles_unstable, useButton_unstable } from './Button';\nexport { CompoundButton, compoundButtonClassNames, renderCompoundButton_unstable, useCompoundButtonStyles_unstable, useCompoundButton_unstable } from './CompoundButton';\nexport { MenuButton, menuButtonClassNames, renderMenuButton_unstable, useMenuButtonStyles_unstable, useMenuButton_unstable } from './MenuButton';\nexport { SplitButton, renderSplitButton_unstable, splitButtonClassNames, useSplitButtonStyles_unstable, useSplitButton_unstable } from './SplitButton';\nexport { ToggleButton, renderToggleButton_unstable, toggleButtonClassNames, useToggleButtonStyles_unstable, useToggleButton_unstable } from './ToggleButton';\nexport { useToggleState } from './utils/index';\nexport { ButtonContextProvider, useButtonContext } from './contexts/index';\n"],"names":["Button","buttonClassNames","renderButton_unstable","useButtonStyles_unstable","useButton_unstable","CompoundButton","compoundButtonClassNames","renderCompoundButton_unstable","useCompoundButtonStyles_unstable","useCompoundButton_unstable","MenuButton","menuButtonClassNames","renderMenuButton_unstable","useMenuButtonStyles_unstable","useMenuButton_unstable","SplitButton","renderSplitButton_unstable","splitButtonClassNames","useSplitButtonStyles_unstable","useSplitButton_unstable","ToggleButton","renderToggleButton_unstable","toggleButtonClassNames","useToggleButtonStyles_unstable","useToggleButton_unstable","useToggleState","ButtonContextProvider","useButtonContext"],"mappings":";;;;;;;;;;;IAASA,MAAM;eAANA,cAAM;;IAAEC,gBAAgB;eAAhBA,wBAAgB;;IAAEC,qBAAqB;eAArBA,6BAAqB;;IAAEC,wBAAwB;eAAxBA,gCAAwB;;IAAEC,kBAAkB;eAAlBA,0BAAkB;;IAC7FC,cAAc;eAAdA,8BAAc;;IAAEC,wBAAwB;eAAxBA,wCAAwB;;IAAEC,6BAA6B;eAA7BA,6CAA6B;;IAAEC,gCAAgC;eAAhCA,gDAAgC;;IAAEC,0BAA0B;eAA1BA,0CAA0B;;IACrIC,UAAU;eAAVA,sBAAU;;IAAEC,oBAAoB;eAApBA,gCAAoB;;IAAEC,yBAAyB;eAAzBA,qCAAyB;;IAAEC,4BAA4B;eAA5BA,wCAA4B;;IAAEC,sBAAsB;eAAtBA,kCAAsB;;IACjHC,WAAW;eAAXA,wBAAW;;IAAEC,0BAA0B;eAA1BA,uCAA0B;;IAAEC,qBAAqB;eAArBA,kCAAqB;;IAAEC,6BAA6B;eAA7BA,0CAA6B;;IAAEC,uBAAuB;eAAvBA,oCAAuB;;IACtHC,YAAY;eAAZA,0BAAY;;IAAEC,2BAA2B;eAA3BA,yCAA2B;;IAAEC,sBAAsB;eAAtBA,oCAAsB;;IAAEC,8BAA8B;eAA9BA,4CAA8B;;IAAEC,wBAAwB;eAAxBA,sCAAwB;;IAC3HC,cAAc;eAAdA,qBAAc;;IACdC,qBAAqB;eAArBA,6BAAqB;;IAAEC,gBAAgB;eAAhBA,wBAAgB;;;wBAN8D;gCACwC;4BACpB;6BACK;8BACK;uBAC7G;wBACyB"}
@@ -2,5 +2,5 @@
2
2
  Object.defineProperty(exports, "__esModule", {
3
3
  value: true
4
4
  });
5
- const _exportStar = require("@swc/helpers/lib/_export_star.js").default;
6
- _exportStar(require("./useToggleState"), exports);
5
+ const _export_star = require("@swc/helpers/_/_export_star");
6
+ _export_star._(require("./useToggleState"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["index.js"],"sourcesContent":["export * from './useToggleState';\n"],"names":[],"mappings":";;;;;oBAAc"}
1
+ {"version":3,"sources":["index.js"],"sourcesContent":["export * from './useToggleState';\n"],"names":[],"mappings":";;;;;uBAAc"}
@@ -4,15 +4,17 @@ Object.defineProperty(exports, "__esModule", {
4
4
  });
5
5
  Object.defineProperty(exports, "useToggleState", {
6
6
  enumerable: true,
7
- get: ()=>useToggleState
7
+ get: function() {
8
+ return useToggleState;
9
+ }
8
10
  });
9
- const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
- const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
- const _reactUtilities = require("@fluentui/react-utilities");
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _reactutilities = require("@fluentui/react-utilities");
12
14
  function useToggleState(props, state) {
13
- const { checked , defaultChecked , disabled , disabledFocusable } = props;
14
- const { onClick , role } = state.root;
15
- const [checkedValue, setCheckedValue] = (0, _reactUtilities.useControllableState)({
15
+ const { checked, defaultChecked, disabled, disabledFocusable } = props;
16
+ const { onClick, role } = state.root;
17
+ const [checkedValue, setCheckedValue] = (0, _reactutilities.useControllableState)({
16
18
  state: checked,
17
19
  defaultState: defaultChecked,
18
20
  initialState: false
@@ -37,7 +39,7 @@ function useToggleState(props, state) {
37
39
  root: {
38
40
  ...state.root,
39
41
  [isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed']: checkedValue,
40
- onClick: (0, _reactUtilities.useEventCallback)((0, _reactUtilities.mergeCallbacks)(onClick, onToggleClick))
42
+ onClick: (0, _reactutilities.useEventCallback)((0, _reactutilities.mergeCallbacks)(onClick, onToggleClick))
41
43
  }
42
44
  };
43
45
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["useToggleState.js"],"sourcesContent":["import * as React from 'react';\nimport { mergeCallbacks, useControllableState, useEventCallback } from '@fluentui/react-utilities';\nexport function useToggleState(props, state) {\n const { checked , defaultChecked , disabled , disabledFocusable } = props;\n const { onClick , role } = state.root;\n const [checkedValue, setCheckedValue] = useControllableState({\n state: checked,\n defaultState: defaultChecked,\n initialState: false\n });\n const isCheckboxTypeRole = role === 'menuitemcheckbox' || role === 'checkbox';\n const onToggleClick = React.useCallback((ev)=>{\n if (!disabled && !disabledFocusable) {\n if (ev.defaultPrevented) {\n return;\n }\n setCheckedValue(!checkedValue);\n }\n }, [\n checkedValue,\n disabled,\n disabledFocusable,\n setCheckedValue\n ]);\n return {\n ...state,\n checked: checkedValue,\n root: {\n ...state.root,\n [isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed']: checkedValue,\n onClick: useEventCallback(mergeCallbacks(onClick, onToggleClick))\n }\n };\n}\n"],"names":["useToggleState","props","state","checked","defaultChecked","disabled","disabledFocusable","onClick","role","root","checkedValue","setCheckedValue","useControllableState","defaultState","initialState","isCheckboxTypeRole","onToggleClick","React","useCallback","ev","defaultPrevented","useEventCallback","mergeCallbacks"],"mappings":";;;;+BAEgBA;;aAAAA;;;6DAFO;gCACgD;AAChE,SAASA,eAAeC,KAAK,EAAEC,KAAK,EAAE;IACzC,MAAM,EAAEC,QAAO,EAAGC,eAAc,EAAGC,SAAQ,EAAGC,kBAAiB,EAAG,GAAGL;IACrE,MAAM,EAAEM,QAAO,EAAGC,KAAI,EAAG,GAAGN,MAAMO,IAAI;IACtC,MAAM,CAACC,cAAcC,gBAAgB,GAAGC,IAAAA,oCAAoB,EAAC;QACzDV,OAAOC;QACPU,cAAcT;QACdU,cAAc,KAAK;IACvB;IACA,MAAMC,qBAAqBP,SAAS,sBAAsBA,SAAS;IACnE,MAAMQ,gBAAgBC,OAAMC,WAAW,CAAC,CAACC,KAAK;QAC1C,IAAI,CAACd,YAAY,CAACC,mBAAmB;YACjC,IAAIa,GAAGC,gBAAgB,EAAE;gBACrB;YACJ,CAAC;YACDT,gBAAgB,CAACD;QACrB,CAAC;IACL,GAAG;QACCA;QACAL;QACAC;QACAK;KACH;IACD,OAAO;QACH,GAAGT,KAAK;QACRC,SAASO;QACTD,MAAM;YACF,GAAGP,MAAMO,IAAI;YACb,CAACM,qBAAqB,iBAAiB,cAAc,CAAC,EAAEL;YACxDH,SAASc,IAAAA,gCAAgB,EAACC,IAAAA,8BAAc,EAACf,SAASS;QACtD;IACJ;AACJ"}
1
+ {"version":3,"sources":["useToggleState.js"],"sourcesContent":["import * as React from 'react';\nimport { mergeCallbacks, useControllableState, useEventCallback } from '@fluentui/react-utilities';\nexport function useToggleState(props, state) {\n const { checked, defaultChecked, disabled, disabledFocusable } = props;\n const { onClick, role } = state.root;\n const [checkedValue, setCheckedValue] = useControllableState({\n state: checked,\n defaultState: defaultChecked,\n initialState: false\n });\n const isCheckboxTypeRole = role === 'menuitemcheckbox' || role === 'checkbox';\n const onToggleClick = React.useCallback((ev)=>{\n if (!disabled && !disabledFocusable) {\n if (ev.defaultPrevented) {\n return;\n }\n setCheckedValue(!checkedValue);\n }\n }, [\n checkedValue,\n disabled,\n disabledFocusable,\n setCheckedValue\n ]);\n return {\n ...state,\n checked: checkedValue,\n root: {\n ...state.root,\n [isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed']: checkedValue,\n onClick: useEventCallback(mergeCallbacks(onClick, onToggleClick))\n }\n };\n}\n"],"names":["useToggleState","props","state","checked","defaultChecked","disabled","disabledFocusable","onClick","role","root","checkedValue","setCheckedValue","useControllableState","defaultState","initialState","isCheckboxTypeRole","onToggleClick","React","useCallback","ev","defaultPrevented","useEventCallback","mergeCallbacks"],"mappings":";;;;+BAEgBA;;;eAAAA;;;;iEAFO;gCACgD;AAChE,SAASA,eAAeC,KAAK,EAAEC,KAAK;IACvC,MAAM,EAAEC,OAAO,EAAEC,cAAc,EAAEC,QAAQ,EAAEC,iBAAiB,EAAE,GAAGL;IACjE,MAAM,EAAEM,OAAO,EAAEC,IAAI,EAAE,GAAGN,MAAMO,IAAI;IACpC,MAAM,CAACC,cAAcC,gBAAgB,GAAGC,IAAAA,oCAAoB,EAAC;QACzDV,OAAOC;QACPU,cAAcT;QACdU,cAAc;IAClB;IACA,MAAMC,qBAAqBP,SAAS,sBAAsBA,SAAS;IACnE,MAAMQ,gBAAgBC,OAAMC,WAAW,CAAC,CAACC;QACrC,IAAI,CAACd,YAAY,CAACC,mBAAmB;YACjC,IAAIa,GAAGC,gBAAgB,EAAE;gBACrB;YACJ;YACAT,gBAAgB,CAACD;QACrB;IACJ,GAAG;QACCA;QACAL;QACAC;QACAK;KACH;IACD,OAAO;QACH,GAAGT,KAAK;QACRC,SAASO;QACTD,MAAM;YACF,GAAGP,MAAMO,IAAI;YACb,CAACM,qBAAqB,iBAAiB,eAAe,EAAEL;YACxDH,SAASc,IAAAA,gCAAgB,EAACC,IAAAA,8BAAc,EAACf,SAASS;QACtD;IACJ;AACJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-button",
3
- "version": "9.3.33",
3
+ "version": "9.3.35",
4
4
  "description": "Fluent UI React Button component.",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -34,22 +34,22 @@
34
34
  "@fluentui/scripts-tasks": "*"
35
35
  },
36
36
  "dependencies": {
37
- "@fluentui/keyboard-keys": "^9.0.3",
38
- "@fluentui/react-aria": "^9.3.32",
37
+ "@fluentui/keyboard-keys": "^9.0.4",
38
+ "@fluentui/react-aria": "^9.3.34",
39
39
  "@fluentui/react-icons": "^2.0.207",
40
- "@fluentui/react-jsx-runtime": "^9.0.2",
41
- "@fluentui/react-shared-contexts": "^9.7.2",
42
- "@fluentui/react-tabster": "^9.12.4",
43
- "@fluentui/react-theme": "^9.1.11",
44
- "@fluentui/react-utilities": "^9.12.0",
40
+ "@fluentui/react-jsx-runtime": "^9.0.4",
41
+ "@fluentui/react-shared-contexts": "^9.7.3",
42
+ "@fluentui/react-tabster": "^9.12.6",
43
+ "@fluentui/react-theme": "^9.1.12",
44
+ "@fluentui/react-utilities": "^9.13.1",
45
45
  "@griffel/react": "^1.5.14",
46
- "@swc/helpers": "^0.4.14"
46
+ "@swc/helpers": "^0.5.1"
47
47
  },
48
48
  "peerDependencies": {
49
- "@types/react": ">=16.8.0 <19.0.0",
50
- "@types/react-dom": ">=16.8.0 <19.0.0",
51
- "react": ">=16.8.0 <19.0.0",
52
- "react-dom": ">=16.8.0 <19.0.0"
49
+ "@types/react": ">=16.14.0 <19.0.0",
50
+ "@types/react-dom": ">=16.14.0 <19.0.0",
51
+ "react": ">=16.14.0 <19.0.0",
52
+ "react-dom": ">=16.14.0 <19.0.0"
53
53
  },
54
54
  "beachball": {
55
55
  "disallowedChangeTypes": [