@fluentui/react-button 9.3.4 → 9.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (214) hide show
  1. package/.swcrc +30 -0
  2. package/CHANGELOG.json +70 -1
  3. package/CHANGELOG.md +20 -2
  4. package/lib/Button.js.map +1 -1
  5. package/lib/CompoundButton.js.map +1 -1
  6. package/lib/MenuButton.js.map +1 -1
  7. package/lib/SplitButton.js.map +1 -1
  8. package/lib/ToggleButton.js.map +1 -1
  9. package/lib/components/Button/Button.js.map +1 -1
  10. package/lib/components/Button/Button.types.js.map +1 -1
  11. package/lib/components/Button/index.js.map +1 -1
  12. package/lib/components/Button/renderButton.js +1 -7
  13. package/lib/components/Button/renderButton.js.map +1 -1
  14. package/lib/components/Button/useButton.js +1 -0
  15. package/lib/components/Button/useButton.js.map +1 -1
  16. package/lib/components/Button/useButtonStyles.js.map +1 -1
  17. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  18. package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
  19. package/lib/components/CompoundButton/index.js.map +1 -1
  20. package/lib/components/CompoundButton/renderCompoundButton.js +1 -11
  21. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  22. package/lib/components/CompoundButton/useCompoundButton.js +3 -2
  23. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  24. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  25. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  26. package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
  27. package/lib/components/MenuButton/index.js.map +1 -1
  28. package/lib/components/MenuButton/renderMenuButton.js +1 -7
  29. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  30. package/lib/components/MenuButton/useMenuButton.js +2 -2
  31. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  32. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  33. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  34. package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
  35. package/lib/components/SplitButton/index.js.map +1 -1
  36. package/lib/components/SplitButton/renderSplitButton.js +1 -7
  37. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  38. package/lib/components/SplitButton/useSplitButton.js +1 -0
  39. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  40. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  41. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  42. package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
  43. package/lib/components/ToggleButton/index.js.map +1 -1
  44. package/lib/components/ToggleButton/renderToggleButton.js.map +1 -1
  45. package/lib/components/ToggleButton/useToggleButton.js +1 -0
  46. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  47. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  48. package/lib/contexts/ButtonContext.js +2 -4
  49. package/lib/contexts/ButtonContext.js.map +1 -1
  50. package/lib/contexts/index.js.map +1 -1
  51. package/lib/index.js.map +1 -1
  52. package/lib/utils/index.js.map +1 -1
  53. package/lib/utils/useToggleState.js.map +1 -1
  54. package/lib-commonjs/Button.js +5 -4
  55. package/lib-commonjs/Button.js.map +1 -1
  56. package/lib-commonjs/CompoundButton.js +5 -4
  57. package/lib-commonjs/CompoundButton.js.map +1 -1
  58. package/lib-commonjs/MenuButton.js +5 -4
  59. package/lib-commonjs/MenuButton.js.map +1 -1
  60. package/lib-commonjs/SplitButton.js +5 -4
  61. package/lib-commonjs/SplitButton.js.map +1 -1
  62. package/lib-commonjs/ToggleButton.js +5 -4
  63. package/lib-commonjs/ToggleButton.js.map +1 -1
  64. package/lib-commonjs/components/Button/Button.js +19 -21
  65. package/lib-commonjs/components/Button/Button.js.map +1 -1
  66. package/lib-commonjs/components/Button/Button.types.js +3 -2
  67. package/lib-commonjs/components/Button/Button.types.js.map +1 -1
  68. package/lib-commonjs/components/Button/index.js +17 -19
  69. package/lib-commonjs/components/Button/index.js.map +1 -1
  70. package/lib-commonjs/components/Button/renderButton.js +14 -26
  71. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  72. package/lib-commonjs/components/Button/useButton.js +40 -52
  73. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  74. package/lib-commonjs/components/Button/useButtonStyles.js +1129 -471
  75. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
  76. package/lib-commonjs/components/CompoundButton/CompoundButton.js +19 -21
  77. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  78. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js +3 -2
  79. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -1
  80. package/lib-commonjs/components/CompoundButton/index.js +18 -20
  81. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  82. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +14 -30
  83. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  84. package/lib-commonjs/components/CompoundButton/useCompoundButton.js +31 -36
  85. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  86. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +315 -184
  87. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  88. package/lib-commonjs/components/MenuButton/MenuButton.js +19 -22
  89. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  90. package/lib-commonjs/components/MenuButton/MenuButton.types.js +3 -2
  91. package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -1
  92. package/lib-commonjs/components/MenuButton/index.js +18 -20
  93. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  94. package/lib-commonjs/components/MenuButton/renderMenuButton.js +14 -26
  95. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  96. package/lib-commonjs/components/MenuButton/useMenuButton.js +34 -37
  97. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  98. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +166 -106
  99. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  100. package/lib-commonjs/components/SplitButton/SplitButton.js +19 -22
  101. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  102. package/lib-commonjs/components/SplitButton/SplitButton.types.js +3 -2
  103. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
  104. package/lib-commonjs/components/SplitButton/index.js +18 -20
  105. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  106. package/lib-commonjs/components/SplitButton/renderSplitButton.js +13 -22
  107. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  108. package/lib-commonjs/components/SplitButton/useSplitButton.js +66 -79
  109. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  110. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +263 -106
  111. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  112. package/lib-commonjs/components/ToggleButton/ToggleButton.js +19 -21
  113. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  114. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js +3 -2
  115. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -1
  116. package/lib-commonjs/components/ToggleButton/index.js +18 -20
  117. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  118. package/lib-commonjs/components/ToggleButton/renderToggleButton.js +6 -8
  119. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
  120. package/lib-commonjs/components/ToggleButton/useToggleButton.js +14 -16
  121. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  122. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +897 -380
  123. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  124. package/lib-commonjs/contexts/ButtonContext.js +18 -19
  125. package/lib-commonjs/contexts/ButtonContext.js.map +1 -1
  126. package/lib-commonjs/contexts/index.js +5 -4
  127. package/lib-commonjs/contexts/index.js.map +1 -1
  128. package/lib-commonjs/index.js +47 -179
  129. package/lib-commonjs/index.js.map +1 -1
  130. package/lib-commonjs/utils/index.js +5 -4
  131. package/lib-commonjs/utils/index.js.map +1 -1
  132. package/lib-commonjs/utils/useToggleState.js +40 -40
  133. package/lib-commonjs/utils/useToggleState.js.map +1 -1
  134. package/package.json +12 -11
  135. package/lib-amd/Button.js +0 -6
  136. package/lib-amd/Button.js.map +0 -1
  137. package/lib-amd/CompoundButton.js +0 -6
  138. package/lib-amd/CompoundButton.js.map +0 -1
  139. package/lib-amd/MenuButton.js +0 -6
  140. package/lib-amd/MenuButton.js.map +0 -1
  141. package/lib-amd/SplitButton.js +0 -6
  142. package/lib-amd/SplitButton.js.map +0 -1
  143. package/lib-amd/ToggleButton.js +0 -6
  144. package/lib-amd/ToggleButton.js.map +0 -1
  145. package/lib-amd/components/Button/Button.js +0 -18
  146. package/lib-amd/components/Button/Button.js.map +0 -1
  147. package/lib-amd/components/Button/Button.types.js +0 -5
  148. package/lib-amd/components/Button/Button.types.js.map +0 -1
  149. package/lib-amd/components/Button/index.js +0 -11
  150. package/lib-amd/components/Button/index.js.map +0 -1
  151. package/lib-amd/components/Button/renderButton.js +0 -18
  152. package/lib-amd/components/Button/renderButton.js.map +0 -1
  153. package/lib-amd/components/Button/useButton.js +0 -41
  154. package/lib-amd/components/Button/useButton.js.map +0 -1
  155. package/lib-amd/components/Button/useButtonStyles.js +0 -227
  156. package/lib-amd/components/Button/useButtonStyles.js.map +0 -1
  157. package/lib-amd/components/CompoundButton/CompoundButton.js +0 -18
  158. package/lib-amd/components/CompoundButton/CompoundButton.js.map +0 -1
  159. package/lib-amd/components/CompoundButton/CompoundButton.types.js +0 -5
  160. package/lib-amd/components/CompoundButton/CompoundButton.types.js.map +0 -1
  161. package/lib-amd/components/CompoundButton/index.js +0 -12
  162. package/lib-amd/components/CompoundButton/index.js.map +0 -1
  163. package/lib-amd/components/CompoundButton/renderCompoundButton.js +0 -20
  164. package/lib-amd/components/CompoundButton/renderCompoundButton.js.map +0 -1
  165. package/lib-amd/components/CompoundButton/useCompoundButton.js +0 -27
  166. package/lib-amd/components/CompoundButton/useCompoundButton.js.map +0 -1
  167. package/lib-amd/components/CompoundButton/useCompoundButtonStyles.js +0 -216
  168. package/lib-amd/components/CompoundButton/useCompoundButtonStyles.js.map +0 -1
  169. package/lib-amd/components/MenuButton/MenuButton.js +0 -19
  170. package/lib-amd/components/MenuButton/MenuButton.js.map +0 -1
  171. package/lib-amd/components/MenuButton/MenuButton.types.js +0 -5
  172. package/lib-amd/components/MenuButton/MenuButton.types.js.map +0 -1
  173. package/lib-amd/components/MenuButton/index.js +0 -12
  174. package/lib-amd/components/MenuButton/index.js.map +0 -1
  175. package/lib-amd/components/MenuButton/renderMenuButton.js +0 -18
  176. package/lib-amd/components/MenuButton/renderMenuButton.js.map +0 -1
  177. package/lib-amd/components/MenuButton/useMenuButton.js +0 -30
  178. package/lib-amd/components/MenuButton/useMenuButton.js.map +0 -1
  179. package/lib-amd/components/MenuButton/useMenuButtonStyles.js +0 -97
  180. package/lib-amd/components/MenuButton/useMenuButtonStyles.js.map +0 -1
  181. package/lib-amd/components/SplitButton/SplitButton.js +0 -19
  182. package/lib-amd/components/SplitButton/SplitButton.js.map +0 -1
  183. package/lib-amd/components/SplitButton/SplitButton.types.js +0 -5
  184. package/lib-amd/components/SplitButton/SplitButton.types.js.map +0 -1
  185. package/lib-amd/components/SplitButton/index.js +0 -12
  186. package/lib-amd/components/SplitButton/index.js.map +0 -1
  187. package/lib-amd/components/SplitButton/renderSplitButton.js +0 -16
  188. package/lib-amd/components/SplitButton/renderSplitButton.js.map +0 -1
  189. package/lib-amd/components/SplitButton/useSplitButton.js +0 -67
  190. package/lib-amd/components/SplitButton/useSplitButton.js.map +0 -1
  191. package/lib-amd/components/SplitButton/useSplitButtonStyles.js +0 -162
  192. package/lib-amd/components/SplitButton/useSplitButtonStyles.js.map +0 -1
  193. package/lib-amd/components/ToggleButton/ToggleButton.js +0 -18
  194. package/lib-amd/components/ToggleButton/ToggleButton.js.map +0 -1
  195. package/lib-amd/components/ToggleButton/ToggleButton.types.js +0 -5
  196. package/lib-amd/components/ToggleButton/ToggleButton.types.js.map +0 -1
  197. package/lib-amd/components/ToggleButton/index.js +0 -12
  198. package/lib-amd/components/ToggleButton/index.js.map +0 -1
  199. package/lib-amd/components/ToggleButton/renderToggleButton.js +0 -7
  200. package/lib-amd/components/ToggleButton/renderToggleButton.js.map +0 -1
  201. package/lib-amd/components/ToggleButton/useToggleButton.js +0 -17
  202. package/lib-amd/components/ToggleButton/useToggleButton.js.map +0 -1
  203. package/lib-amd/components/ToggleButton/useToggleButtonStyles.js +0 -87
  204. package/lib-amd/components/ToggleButton/useToggleButtonStyles.js.map +0 -1
  205. package/lib-amd/contexts/ButtonContext.js +0 -19
  206. package/lib-amd/contexts/ButtonContext.js.map +0 -1
  207. package/lib-amd/contexts/index.js +0 -6
  208. package/lib-amd/contexts/index.js.map +0 -1
  209. package/lib-amd/index.js +0 -34
  210. package/lib-amd/index.js.map +0 -1
  211. package/lib-amd/utils/index.js +0 -6
  212. package/lib-amd/utils/index.js.map +0 -1
  213. package/lib-amd/utils/useToggleState.js +0 -27
  214. package/lib-amd/utils/useToggleState.js.map +0 -1
@@ -1,20 +1,18 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "useToggleButton_unstable", {
6
+ enumerable: true,
7
+ get: ()=>useToggleButton_unstable
5
8
  });
6
- exports.useToggleButton_unstable = void 0;
7
- const useToggleState_1 = /*#__PURE__*/require("../../utils/useToggleState");
8
- const useButton_1 = /*#__PURE__*/require("../Button/useButton");
9
- /**
10
- * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns
11
- * processed state.
12
- * @param props - User provided props to the ToggleButton component.
13
- * @param ref - User provided ref to be passed to the ToggleButton component.
14
- */
15
- const useToggleButton_unstable = (props, ref) => {
16
- const buttonState = useButton_1.useButton_unstable(props, ref);
17
- return useToggleState_1.useToggleState(props, buttonState);
18
- };
19
- exports.useToggleButton_unstable = useToggleButton_unstable;
9
+ const _interopRequireWildcard = require("@swc/helpers/lib/_interop_require_wildcard.js").default;
10
+ const _react = /*#__PURE__*/ _interopRequireWildcard(require("react"));
11
+ const _useToggleState = require("../../utils/useToggleState");
12
+ const _useButton = require("../Button/useButton");
13
+ const useToggleButton_unstable = (props, ref)=>{
14
+ const buttonState = (0, _useButton.useButton_unstable)(props, ref);
15
+ return (0, _useToggleState.useToggleState)(props, buttonState);
16
+ }; //# sourceMappingURL=useToggleButton.js.map
17
+
20
18
  //# sourceMappingURL=useToggleButton.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useToggleState_1","require","useButton_1","useToggleButton_unstable","props","ref","buttonState","useButton_unstable","useToggleState","exports"],"sources":["../src/packages/react-components/react-button/src/components/ToggleButton/useToggleButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { useToggleState } from '../../utils/useToggleState';\nimport { useButton_unstable } from '../Button/useButton';\nimport type { ToggleButtonProps, ToggleButtonState } from './ToggleButton.types';\n\n/**\n * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns\n * processed state.\n * @param props - User provided props to the ToggleButton component.\n * @param ref - User provided ref to be passed to the ToggleButton component.\n */\nexport const useToggleButton_unstable = (\n props: ToggleButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ToggleButtonState => {\n const buttonState = useButton_unstable(props, ref);\n\n return useToggleState(props, buttonState);\n};\n"],"mappings":";;;;;;AACA,MAAAA,gBAAA,gBAAAC,OAAA;AACA,MAAAC,WAAA,gBAAAD,OAAA;AAGA;;;;;;AAMO,MAAME,wBAAwB,GAAGA,CACtCC,KAAwB,EACxBC,GAAqD,KAChC;EACrB,MAAMC,WAAW,GAAGJ,WAAA,CAAAK,kBAAkB,CAACH,KAAK,EAAEC,GAAG,CAAC;EAElD,OAAOL,gBAAA,CAAAQ,cAAc,CAACJ,KAAK,EAAEE,WAAW,CAAC;AAC3C,CAAC;AAPYG,OAAA,CAAAN,wBAAwB,GAAAA,wBAAA"}
1
+ {"version":3,"sources":["../../../lib/components/ToggleButton/useToggleButton.js"],"sourcesContent":["import * as React from 'react';\nimport { useToggleState } from '../../utils/useToggleState';\nimport { useButton_unstable } from '../Button/useButton';\n/**\n * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns\n * processed state.\n * @param props - User provided props to the ToggleButton component.\n * @param ref - User provided ref to be passed to the ToggleButton component.\n */\nexport const useToggleButton_unstable = (props, ref) => {\n const buttonState = useButton_unstable(props, ref);\n return useToggleState(props, buttonState);\n};\n//# sourceMappingURL=useToggleButton.js.map"],"names":["useToggleButton_unstable","props","ref","buttonState","useButton_unstable","useToggleState"],"mappings":";;;;+BASaA;;aAAAA;;;6DATU;gCACQ;2BACI;AAO5B,MAAMA,2BAA2B,CAACC,OAAOC,MAAQ;IACtD,MAAMC,cAAcC,IAAAA,6BAAkB,EAACH,OAAOC;IAC9C,OAAOG,IAAAA,8BAAc,EAACJ,OAAOE;AAC/B,GACA,2CAA2C"}