@fluentui/react-button 1.0.0-beta.8 → 9.0.0-alpha.100

Sign up to get free protection for your applications and to get access to all the features.
Files changed (418) hide show
  1. package/CHANGELOG.json +3258 -1
  2. package/CHANGELOG.md +1247 -2
  3. package/README.md +19 -108
  4. package/dist/demo/index.html +71 -0
  5. package/dist/demo/react-dom.development.js +21413 -0
  6. package/dist/demo/react.development.js +3155 -0
  7. package/dist/react-button.d.ts +130 -355
  8. package/lib/Button.js.map +1 -1
  9. package/lib/CompoundButton.js.map +1 -1
  10. package/lib/MenuButton.js.map +1 -1
  11. package/lib/SplitButton.js.map +1 -1
  12. package/lib/ToggleButton.js.map +1 -1
  13. package/lib/common/isConformant.d.ts +4 -2
  14. package/lib/common/isConformant.js +9 -5
  15. package/lib/common/isConformant.js.map +1 -1
  16. package/lib/components/Button/Button.d.ts +4 -5
  17. package/lib/components/Button/Button.js +8 -9
  18. package/lib/components/Button/Button.js.map +1 -1
  19. package/lib/components/Button/Button.types.d.ts +46 -114
  20. package/lib/components/Button/Button.types.js +1 -0
  21. package/lib/components/Button/Button.types.js.map +1 -1
  22. package/lib/components/Button/index.d.ts +3 -3
  23. package/lib/components/Button/index.js +4 -3
  24. package/lib/components/Button/index.js.map +1 -1
  25. package/lib/components/Button/renderButton.d.ts +2 -2
  26. package/lib/components/Button/renderButton.js +10 -10
  27. package/lib/components/Button/renderButton.js.map +1 -1
  28. package/lib/components/Button/useButton.d.ts +5 -10
  29. package/lib/components/Button/useButton.js +49 -24
  30. package/lib/components/Button/useButton.js.map +1 -1
  31. package/lib/components/Button/useButtonStyles.d.ts +10 -0
  32. package/lib/components/Button/useButtonStyles.js +354 -0
  33. package/lib/components/Button/useButtonStyles.js.map +1 -0
  34. package/lib/components/CompoundButton/CompoundButton.d.ts +4 -5
  35. package/lib/components/CompoundButton/CompoundButton.js +8 -11
  36. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  37. package/lib/components/CompoundButton/CompoundButton.types.d.ts +8 -27
  38. package/lib/components/CompoundButton/CompoundButton.types.js +1 -0
  39. package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
  40. package/lib/components/CompoundButton/index.d.ts +2 -1
  41. package/lib/components/CompoundButton/index.js +3 -1
  42. package/lib/components/CompoundButton/index.js.map +1 -1
  43. package/lib/components/CompoundButton/renderCompoundButton.d.ts +2 -2
  44. package/lib/components/CompoundButton/renderCompoundButton.js +10 -12
  45. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  46. package/lib/components/CompoundButton/useCompoundButton.d.ts +5 -10
  47. package/lib/components/CompoundButton/useCompoundButton.js +25 -28
  48. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  49. package/lib/components/CompoundButton/useCompoundButtonStyles.d.ts +2 -0
  50. package/lib/components/CompoundButton/useCompoundButtonStyles.js +164 -0
  51. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -0
  52. package/lib/components/MenuButton/MenuButton.d.ts +4 -5
  53. package/lib/components/MenuButton/MenuButton.js +8 -21
  54. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  55. package/lib/components/MenuButton/MenuButton.types.d.ts +7 -50
  56. package/lib/components/MenuButton/MenuButton.types.js +1 -0
  57. package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
  58. package/lib/components/MenuButton/index.d.ts +2 -3
  59. package/lib/components/MenuButton/index.js +3 -3
  60. package/lib/components/MenuButton/index.js.map +1 -1
  61. package/lib/components/MenuButton/renderMenuButton.d.ts +2 -4
  62. package/lib/components/MenuButton/renderMenuButton.js +10 -14
  63. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  64. package/lib/components/MenuButton/useMenuButton.d.ts +3 -7
  65. package/lib/components/MenuButton/useMenuButton.js +28 -22
  66. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  67. package/lib/components/MenuButton/useMenuButtonStyles.d.ts +2 -0
  68. package/lib/components/MenuButton/useMenuButtonStyles.js +34 -0
  69. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -0
  70. package/lib/components/SplitButton/SplitButton.d.ts +5 -5
  71. package/lib/components/SplitButton/SplitButton.js +9 -22
  72. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  73. package/lib/components/SplitButton/SplitButton.types.d.ts +12 -28
  74. package/lib/components/SplitButton/SplitButton.types.js +1 -0
  75. package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
  76. package/lib/components/SplitButton/index.d.ts +3 -2
  77. package/lib/components/SplitButton/index.js +3 -1
  78. package/lib/components/SplitButton/index.js.map +1 -1
  79. package/lib/components/SplitButton/renderSplitButton.d.ts +2 -4
  80. package/lib/components/SplitButton/renderSplitButton.js +8 -10
  81. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  82. package/lib/components/SplitButton/useSplitButton.d.ts +5 -7
  83. package/lib/components/SplitButton/useSplitButton.js +69 -47
  84. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  85. package/lib/components/SplitButton/useSplitButtonStyles.d.ts +2 -0
  86. package/lib/components/SplitButton/useSplitButtonStyles.js +77 -0
  87. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -0
  88. package/lib/components/ToggleButton/ToggleButton.d.ts +4 -5
  89. package/lib/components/ToggleButton/ToggleButton.js +8 -11
  90. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  91. package/lib/components/ToggleButton/ToggleButton.types.d.ts +11 -17
  92. package/lib/components/ToggleButton/ToggleButton.types.js +1 -0
  93. package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
  94. package/lib/components/ToggleButton/index.d.ts +3 -3
  95. package/lib/components/ToggleButton/index.js +4 -3
  96. package/lib/components/ToggleButton/index.js.map +1 -1
  97. package/lib/components/ToggleButton/renderToggleButton.d.ts +1 -0
  98. package/lib/components/ToggleButton/renderToggleButton.js +2 -0
  99. package/lib/components/ToggleButton/renderToggleButton.js.map +1 -0
  100. package/lib/components/ToggleButton/useToggleButton.d.ts +8 -5
  101. package/lib/components/ToggleButton/useToggleButton.js +47 -5
  102. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  103. package/lib/components/ToggleButton/useToggleButtonStyles.d.ts +2 -0
  104. package/lib/components/ToggleButton/useToggleButtonStyles.js +190 -0
  105. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -0
  106. package/lib/index.d.ts +0 -1
  107. package/lib/index.js +0 -1
  108. package/lib/index.js.map +1 -1
  109. package/lib/tsdoc-metadata.json +1 -1
  110. package/lib-commonjs/Button.js +7 -2
  111. package/lib-commonjs/Button.js.map +1 -1
  112. package/lib-commonjs/CompoundButton.js +7 -2
  113. package/lib-commonjs/CompoundButton.js.map +1 -1
  114. package/lib-commonjs/MenuButton.js +7 -2
  115. package/lib-commonjs/MenuButton.js.map +1 -1
  116. package/lib-commonjs/SplitButton.js +7 -2
  117. package/lib-commonjs/SplitButton.js.map +1 -1
  118. package/lib-commonjs/ToggleButton.js +7 -2
  119. package/lib-commonjs/ToggleButton.js.map +1 -1
  120. package/lib-commonjs/common/isConformant.d.ts +4 -2
  121. package/lib-commonjs/common/isConformant.js +19 -7
  122. package/lib-commonjs/common/isConformant.js.map +1 -1
  123. package/lib-commonjs/components/Button/Button.d.ts +4 -5
  124. package/lib-commonjs/components/Button/Button.js +20 -12
  125. package/lib-commonjs/components/Button/Button.js.map +1 -1
  126. package/lib-commonjs/components/Button/Button.types.d.ts +46 -114
  127. package/lib-commonjs/components/Button/Button.types.js +4 -1
  128. package/lib-commonjs/components/Button/Button.types.js.map +1 -1
  129. package/lib-commonjs/components/Button/index.d.ts +3 -3
  130. package/lib-commonjs/components/Button/index.js +23 -5
  131. package/lib-commonjs/components/Button/index.js.map +1 -1
  132. package/lib-commonjs/components/Button/renderButton.d.ts +2 -2
  133. package/lib-commonjs/components/Button/renderButton.js +24 -14
  134. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  135. package/lib-commonjs/components/Button/useButton.d.ts +5 -10
  136. package/lib-commonjs/components/Button/useButton.js +59 -25
  137. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  138. package/lib-commonjs/components/Button/useButtonStyles.d.ts +10 -0
  139. package/lib-commonjs/components/Button/useButtonStyles.js +365 -0
  140. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -0
  141. package/lib-commonjs/components/CompoundButton/CompoundButton.d.ts +4 -5
  142. package/lib-commonjs/components/CompoundButton/CompoundButton.js +20 -14
  143. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  144. package/lib-commonjs/components/CompoundButton/CompoundButton.types.d.ts +8 -27
  145. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js +4 -1
  146. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -1
  147. package/lib-commonjs/components/CompoundButton/index.d.ts +2 -1
  148. package/lib-commonjs/components/CompoundButton/index.js +22 -3
  149. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  150. package/lib-commonjs/components/CompoundButton/renderCompoundButton.d.ts +2 -2
  151. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +24 -16
  152. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  153. package/lib-commonjs/components/CompoundButton/useCompoundButton.d.ts +5 -10
  154. package/lib-commonjs/components/CompoundButton/useCompoundButton.js +35 -28
  155. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  156. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.d.ts +2 -0
  157. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +175 -0
  158. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -0
  159. package/lib-commonjs/components/MenuButton/MenuButton.d.ts +4 -5
  160. package/lib-commonjs/components/MenuButton/MenuButton.js +20 -24
  161. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  162. package/lib-commonjs/components/MenuButton/MenuButton.types.d.ts +7 -50
  163. package/lib-commonjs/components/MenuButton/MenuButton.types.js +4 -1
  164. package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -1
  165. package/lib-commonjs/components/MenuButton/index.d.ts +2 -3
  166. package/lib-commonjs/components/MenuButton/index.js +22 -5
  167. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  168. package/lib-commonjs/components/MenuButton/renderMenuButton.d.ts +2 -4
  169. package/lib-commonjs/components/MenuButton/renderMenuButton.js +24 -18
  170. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  171. package/lib-commonjs/components/MenuButton/useMenuButton.d.ts +3 -7
  172. package/lib-commonjs/components/MenuButton/useMenuButton.js +41 -23
  173. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  174. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.d.ts +2 -0
  175. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +44 -0
  176. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -0
  177. package/lib-commonjs/components/SplitButton/SplitButton.d.ts +5 -5
  178. package/lib-commonjs/components/SplitButton/SplitButton.js +21 -25
  179. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  180. package/lib-commonjs/components/SplitButton/SplitButton.types.d.ts +12 -28
  181. package/lib-commonjs/components/SplitButton/SplitButton.types.js +4 -1
  182. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
  183. package/lib-commonjs/components/SplitButton/index.d.ts +3 -2
  184. package/lib-commonjs/components/SplitButton/index.js +22 -3
  185. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  186. package/lib-commonjs/components/SplitButton/renderSplitButton.d.ts +2 -4
  187. package/lib-commonjs/components/SplitButton/renderSplitButton.js +22 -14
  188. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  189. package/lib-commonjs/components/SplitButton/useSplitButton.d.ts +5 -7
  190. package/lib-commonjs/components/SplitButton/useSplitButton.js +81 -48
  191. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  192. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.d.ts +2 -0
  193. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +88 -0
  194. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -0
  195. package/lib-commonjs/components/ToggleButton/ToggleButton.d.ts +4 -5
  196. package/lib-commonjs/components/ToggleButton/ToggleButton.js +20 -14
  197. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  198. package/lib-commonjs/components/ToggleButton/ToggleButton.types.d.ts +11 -17
  199. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js +4 -1
  200. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -1
  201. package/lib-commonjs/components/ToggleButton/index.d.ts +3 -3
  202. package/lib-commonjs/components/ToggleButton/index.js +23 -5
  203. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  204. package/lib-commonjs/components/ToggleButton/renderToggleButton.d.ts +1 -0
  205. package/lib-commonjs/components/ToggleButton/renderToggleButton.js +16 -0
  206. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -0
  207. package/lib-commonjs/components/ToggleButton/useToggleButton.d.ts +8 -5
  208. package/lib-commonjs/components/ToggleButton/useToggleButton.js +60 -7
  209. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  210. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.d.ts +2 -0
  211. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +200 -0
  212. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -0
  213. package/lib-commonjs/index.d.ts +0 -1
  214. package/lib-commonjs/index.js +11 -3
  215. package/lib-commonjs/index.js.map +1 -1
  216. package/package.json +37 -35
  217. package/config/api-extractor.json +0 -3
  218. package/config/pre-copy.json +0 -9
  219. package/config/tests.js +0 -11
  220. package/etc/react-button.api.md +0 -335
  221. package/just.config.ts +0 -3
  222. package/lib/components/Button/useButtonClasses.d.ts +0 -29
  223. package/lib/components/Button/useButtonClasses.js +0 -417
  224. package/lib/components/Button/useButtonClasses.js.map +0 -1
  225. package/lib/components/Button/useButtonState.d.ts +0 -6
  226. package/lib/components/Button/useButtonState.js +0 -28
  227. package/lib/components/Button/useButtonState.js.map +0 -1
  228. package/lib/components/CompoundButton/useCompoundButtonClasses.d.ts +0 -4
  229. package/lib/components/CompoundButton/useCompoundButtonClasses.js +0 -180
  230. package/lib/components/CompoundButton/useCompoundButtonClasses.js.map +0 -1
  231. package/lib/components/MenuButton/useExpanded.d.ts +0 -18
  232. package/lib/components/MenuButton/useExpanded.js +0 -61
  233. package/lib/components/MenuButton/useExpanded.js.map +0 -1
  234. package/lib/components/MenuButton/useMenuButtonClasses.d.ts +0 -3
  235. package/lib/components/MenuButton/useMenuButtonClasses.js +0 -78
  236. package/lib/components/MenuButton/useMenuButtonClasses.js.map +0 -1
  237. package/lib/components/MenuButton/useMenuButtonState.d.ts +0 -2
  238. package/lib/components/MenuButton/useMenuButtonState.js +0 -9
  239. package/lib/components/MenuButton/useMenuButtonState.js.map +0 -1
  240. package/lib/components/SplitButton/useSplitButtonClasses.d.ts +0 -3
  241. package/lib/components/SplitButton/useSplitButtonClasses.js +0 -123
  242. package/lib/components/SplitButton/useSplitButtonClasses.js.map +0 -1
  243. package/lib/components/ToggleButton/useChecked.d.ts +0 -14
  244. package/lib/components/ToggleButton/useChecked.js +0 -25
  245. package/lib/components/ToggleButton/useChecked.js.map +0 -1
  246. package/lib/components/ToggleButton/useToggleButtonClasses.d.ts +0 -3
  247. package/lib/components/ToggleButton/useToggleButtonClasses.js +0 -130
  248. package/lib/components/ToggleButton/useToggleButtonClasses.js.map +0 -1
  249. package/lib/utils/tempTypes.d.ts +0 -33
  250. package/lib/utils/tempTypes.js +0 -4
  251. package/lib/utils/tempTypes.js.map +0 -1
  252. package/lib/version.d.ts +0 -1
  253. package/lib/version.js +0 -5
  254. package/lib/version.js.map +0 -1
  255. package/lib-amd/Button.d.ts +0 -1
  256. package/lib-amd/Button.js +0 -6
  257. package/lib-amd/Button.js.map +0 -1
  258. package/lib-amd/CompoundButton.d.ts +0 -1
  259. package/lib-amd/CompoundButton.js +0 -6
  260. package/lib-amd/CompoundButton.js.map +0 -1
  261. package/lib-amd/MenuButton.d.ts +0 -1
  262. package/lib-amd/MenuButton.js +0 -6
  263. package/lib-amd/MenuButton.js.map +0 -1
  264. package/lib-amd/SplitButton.d.ts +0 -1
  265. package/lib-amd/SplitButton.js +0 -6
  266. package/lib-amd/SplitButton.js.map +0 -1
  267. package/lib-amd/ToggleButton.d.ts +0 -1
  268. package/lib-amd/ToggleButton.js +0 -6
  269. package/lib-amd/ToggleButton.js.map +0 -1
  270. package/lib-amd/common/isConformant.d.ts +0 -2
  271. package/lib-amd/common/isConformant.js +0 -13
  272. package/lib-amd/common/isConformant.js.map +0 -1
  273. package/lib-amd/components/Button/Button.d.ts +0 -7
  274. package/lib-amd/components/Button/Button.js +0 -16
  275. package/lib-amd/components/Button/Button.js.map +0 -1
  276. package/lib-amd/components/Button/Button.types.d.ts +0 -130
  277. package/lib-amd/components/Button/Button.types.js +0 -5
  278. package/lib-amd/components/Button/Button.types.js.map +0 -1
  279. package/lib-amd/components/Button/index.d.ts +0 -5
  280. package/lib-amd/components/Button/index.js +0 -9
  281. package/lib-amd/components/Button/index.js.map +0 -1
  282. package/lib-amd/components/Button/renderButton.d.ts +0 -5
  283. package/lib-amd/components/Button/renderButton.js +0 -17
  284. package/lib-amd/components/Button/renderButton.js.map +0 -1
  285. package/lib-amd/components/Button/useButton.d.ts +0 -13
  286. package/lib-amd/components/Button/useButton.js +0 -28
  287. package/lib-amd/components/Button/useButton.js.map +0 -1
  288. package/lib-amd/components/Button/useButtonClasses.d.ts +0 -29
  289. package/lib-amd/components/Button/useButtonClasses.js +0 -417
  290. package/lib-amd/components/Button/useButtonClasses.js.map +0 -1
  291. package/lib-amd/components/Button/useButtonState.d.ts +0 -6
  292. package/lib-amd/components/Button/useButtonState.js +0 -32
  293. package/lib-amd/components/Button/useButtonState.js.map +0 -1
  294. package/lib-amd/components/CompoundButton/CompoundButton.d.ts +0 -7
  295. package/lib-amd/components/CompoundButton/CompoundButton.js +0 -17
  296. package/lib-amd/components/CompoundButton/CompoundButton.js.map +0 -1
  297. package/lib-amd/components/CompoundButton/CompoundButton.types.d.ts +0 -33
  298. package/lib-amd/components/CompoundButton/CompoundButton.types.js +0 -5
  299. package/lib-amd/components/CompoundButton/CompoundButton.types.js.map +0 -1
  300. package/lib-amd/components/CompoundButton/index.d.ts +0 -4
  301. package/lib-amd/components/CompoundButton/index.js +0 -8
  302. package/lib-amd/components/CompoundButton/index.js.map +0 -1
  303. package/lib-amd/components/CompoundButton/renderCompoundButton.d.ts +0 -5
  304. package/lib-amd/components/CompoundButton/renderCompoundButton.js +0 -19
  305. package/lib-amd/components/CompoundButton/renderCompoundButton.js.map +0 -1
  306. package/lib-amd/components/CompoundButton/useCompoundButton.d.ts +0 -13
  307. package/lib-amd/components/CompoundButton/useCompoundButton.js +0 -32
  308. package/lib-amd/components/CompoundButton/useCompoundButton.js.map +0 -1
  309. package/lib-amd/components/CompoundButton/useCompoundButtonClasses.d.ts +0 -4
  310. package/lib-amd/components/CompoundButton/useCompoundButtonClasses.js +0 -182
  311. package/lib-amd/components/CompoundButton/useCompoundButtonClasses.js.map +0 -1
  312. package/lib-amd/components/MenuButton/MenuButton.d.ts +0 -7
  313. package/lib-amd/components/MenuButton/MenuButton.js +0 -26
  314. package/lib-amd/components/MenuButton/MenuButton.js.map +0 -1
  315. package/lib-amd/components/MenuButton/MenuButton.types.d.ts +0 -54
  316. package/lib-amd/components/MenuButton/MenuButton.types.js +0 -5
  317. package/lib-amd/components/MenuButton/MenuButton.types.js.map +0 -1
  318. package/lib-amd/components/MenuButton/index.d.ts +0 -6
  319. package/lib-amd/components/MenuButton/index.js +0 -10
  320. package/lib-amd/components/MenuButton/index.js.map +0 -1
  321. package/lib-amd/components/MenuButton/renderMenuButton.d.ts +0 -7
  322. package/lib-amd/components/MenuButton/renderMenuButton.js +0 -21
  323. package/lib-amd/components/MenuButton/renderMenuButton.js.map +0 -1
  324. package/lib-amd/components/MenuButton/useExpanded.d.ts +0 -18
  325. package/lib-amd/components/MenuButton/useExpanded.js +0 -62
  326. package/lib-amd/components/MenuButton/useExpanded.js.map +0 -1
  327. package/lib-amd/components/MenuButton/useMenuButton.d.ts +0 -10
  328. package/lib-amd/components/MenuButton/useMenuButton.js +0 -27
  329. package/lib-amd/components/MenuButton/useMenuButton.js.map +0 -1
  330. package/lib-amd/components/MenuButton/useMenuButtonClasses.d.ts +0 -3
  331. package/lib-amd/components/MenuButton/useMenuButtonClasses.js +0 -81
  332. package/lib-amd/components/MenuButton/useMenuButtonClasses.js.map +0 -1
  333. package/lib-amd/components/MenuButton/useMenuButtonState.d.ts +0 -2
  334. package/lib-amd/components/MenuButton/useMenuButtonState.js +0 -11
  335. package/lib-amd/components/MenuButton/useMenuButtonState.js.map +0 -1
  336. package/lib-amd/components/SplitButton/SplitButton.d.ts +0 -7
  337. package/lib-amd/components/SplitButton/SplitButton.js +0 -26
  338. package/lib-amd/components/SplitButton/SplitButton.js.map +0 -1
  339. package/lib-amd/components/SplitButton/SplitButton.types.d.ts +0 -35
  340. package/lib-amd/components/SplitButton/SplitButton.types.js +0 -5
  341. package/lib-amd/components/SplitButton/SplitButton.types.js.map +0 -1
  342. package/lib-amd/components/SplitButton/index.d.ts +0 -4
  343. package/lib-amd/components/SplitButton/index.js +0 -8
  344. package/lib-amd/components/SplitButton/index.js.map +0 -1
  345. package/lib-amd/components/SplitButton/renderSplitButton.d.ts +0 -7
  346. package/lib-amd/components/SplitButton/renderSplitButton.js +0 -17
  347. package/lib-amd/components/SplitButton/renderSplitButton.js.map +0 -1
  348. package/lib-amd/components/SplitButton/useSplitButton.d.ts +0 -10
  349. package/lib-amd/components/SplitButton/useSplitButton.js +0 -50
  350. package/lib-amd/components/SplitButton/useSplitButton.js.map +0 -1
  351. package/lib-amd/components/SplitButton/useSplitButtonClasses.d.ts +0 -3
  352. package/lib-amd/components/SplitButton/useSplitButtonClasses.js +0 -123
  353. package/lib-amd/components/SplitButton/useSplitButtonClasses.js.map +0 -1
  354. package/lib-amd/components/ToggleButton/ToggleButton.d.ts +0 -7
  355. package/lib-amd/components/ToggleButton/ToggleButton.js +0 -17
  356. package/lib-amd/components/ToggleButton/ToggleButton.js.map +0 -1
  357. package/lib-amd/components/ToggleButton/ToggleButton.types.d.ts +0 -25
  358. package/lib-amd/components/ToggleButton/ToggleButton.types.js +0 -5
  359. package/lib-amd/components/ToggleButton/ToggleButton.types.js.map +0 -1
  360. package/lib-amd/components/ToggleButton/index.d.ts +0 -5
  361. package/lib-amd/components/ToggleButton/index.js +0 -9
  362. package/lib-amd/components/ToggleButton/index.js.map +0 -1
  363. package/lib-amd/components/ToggleButton/useChecked.d.ts +0 -14
  364. package/lib-amd/components/ToggleButton/useChecked.js +0 -27
  365. package/lib-amd/components/ToggleButton/useChecked.js.map +0 -1
  366. package/lib-amd/components/ToggleButton/useToggleButton.d.ts +0 -6
  367. package/lib-amd/components/ToggleButton/useToggleButton.js +0 -10
  368. package/lib-amd/components/ToggleButton/useToggleButton.js.map +0 -1
  369. package/lib-amd/components/ToggleButton/useToggleButtonClasses.d.ts +0 -3
  370. package/lib-amd/components/ToggleButton/useToggleButtonClasses.js +0 -132
  371. package/lib-amd/components/ToggleButton/useToggleButtonClasses.js.map +0 -1
  372. package/lib-amd/index.d.ts +0 -6
  373. package/lib-amd/index.js +0 -10
  374. package/lib-amd/index.js.map +0 -1
  375. package/lib-amd/utils/tempTypes.d.ts +0 -33
  376. package/lib-amd/utils/tempTypes.js +0 -8
  377. package/lib-amd/utils/tempTypes.js.map +0 -1
  378. package/lib-amd/version.d.ts +0 -1
  379. package/lib-amd/version.js +0 -6
  380. package/lib-amd/version.js.map +0 -1
  381. package/lib-commonjs/components/Button/useButtonClasses.d.ts +0 -29
  382. package/lib-commonjs/components/Button/useButtonClasses.js +0 -419
  383. package/lib-commonjs/components/Button/useButtonClasses.js.map +0 -1
  384. package/lib-commonjs/components/Button/useButtonState.d.ts +0 -6
  385. package/lib-commonjs/components/Button/useButtonState.js +0 -30
  386. package/lib-commonjs/components/Button/useButtonState.js.map +0 -1
  387. package/lib-commonjs/components/CompoundButton/useCompoundButtonClasses.d.ts +0 -4
  388. package/lib-commonjs/components/CompoundButton/useCompoundButtonClasses.js +0 -182
  389. package/lib-commonjs/components/CompoundButton/useCompoundButtonClasses.js.map +0 -1
  390. package/lib-commonjs/components/MenuButton/useExpanded.d.ts +0 -18
  391. package/lib-commonjs/components/MenuButton/useExpanded.js +0 -63
  392. package/lib-commonjs/components/MenuButton/useExpanded.js.map +0 -1
  393. package/lib-commonjs/components/MenuButton/useMenuButtonClasses.d.ts +0 -3
  394. package/lib-commonjs/components/MenuButton/useMenuButtonClasses.js +0 -80
  395. package/lib-commonjs/components/MenuButton/useMenuButtonClasses.js.map +0 -1
  396. package/lib-commonjs/components/MenuButton/useMenuButtonState.d.ts +0 -2
  397. package/lib-commonjs/components/MenuButton/useMenuButtonState.js +0 -11
  398. package/lib-commonjs/components/MenuButton/useMenuButtonState.js.map +0 -1
  399. package/lib-commonjs/components/SplitButton/useSplitButtonClasses.d.ts +0 -3
  400. package/lib-commonjs/components/SplitButton/useSplitButtonClasses.js +0 -125
  401. package/lib-commonjs/components/SplitButton/useSplitButtonClasses.js.map +0 -1
  402. package/lib-commonjs/components/ToggleButton/useChecked.d.ts +0 -14
  403. package/lib-commonjs/components/ToggleButton/useChecked.js +0 -27
  404. package/lib-commonjs/components/ToggleButton/useChecked.js.map +0 -1
  405. package/lib-commonjs/components/ToggleButton/useToggleButtonClasses.d.ts +0 -3
  406. package/lib-commonjs/components/ToggleButton/useToggleButtonClasses.js +0 -132
  407. package/lib-commonjs/components/ToggleButton/useToggleButtonClasses.js.map +0 -1
  408. package/lib-commonjs/utils/tempTypes.d.ts +0 -33
  409. package/lib-commonjs/utils/tempTypes.js +0 -6
  410. package/lib-commonjs/utils/tempTypes.js.map +0 -1
  411. package/lib-commonjs/version.d.ts +0 -1
  412. package/lib-commonjs/version.js +0 -7
  413. package/lib-commonjs/version.js.map +0 -1
  414. package/src/components/Button/Button.types.ts +0 -166
  415. package/src/components/CompoundButton/CompoundButton.types.ts +0 -37
  416. package/src/components/MenuButton/MenuButton.types.ts +0 -63
  417. package/src/components/SplitButton/SplitButton.types.ts +0 -41
  418. package/src/components/ToggleButton/ToggleButton.types.ts +0 -29
@@ -1,417 +0,0 @@
1
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2
- import { __assign } from "tslib";
3
- /* eslint-disable @typescript-eslint/naming-convention */
4
- import { makeVariantClasses } from '@fluentui/react-theme-provider';
5
- import { EdgeChromiumHighContrastSelector } from '@fluentui/style-utilities';
6
- var GlobalClassNames = {
7
- root: 'ms-Button',
8
- icon: 'ms-Button-icon',
9
- };
10
- export var ButtonSizeVariants = {
11
- size_smallest: {
12
- height: 'var(--button-size-smallest)',
13
- minHeight: 'var(--button-size-smallest)',
14
- },
15
- size_smaller: {
16
- height: 'var(--button-size-smaller)',
17
- minHeight: 'var(--button-size-smaller)',
18
- },
19
- size_small: {
20
- height: 'var(--button-size-small)',
21
- minHeight: 'var(--button-size-small)',
22
- },
23
- size_large: {
24
- height: 'var(--button-size-large)',
25
- minHeight: 'var(--button-size-large)',
26
- },
27
- size_larger: {
28
- height: 'var(--button-size-larger)',
29
- minHeight: 'var(--button-size-larger)',
30
- },
31
- size_largest: {
32
- height: 'var(--button-size-largest)',
33
- minHeight: 'var(--button-size-largest)',
34
- },
35
- };
36
- export var useButtonClasses = makeVariantClasses({
37
- name: 'Button',
38
- prefix: '--button',
39
- styles: {
40
- root: [
41
- GlobalClassNames.root,
42
- (_a = {
43
- cursor: 'pointer',
44
- alignItems: 'center',
45
- borderStyle: 'solid',
46
- display: 'inline-flex',
47
- justifyContent: 'center',
48
- outline: 'none',
49
- position: 'relative',
50
- userSelect: 'none',
51
- boxSizing: 'border-box',
52
- verticalAlign: 'middle',
53
- textDecoration: 'none',
54
- background: 'var(--button-background)',
55
- color: 'var(--button-contentColor)',
56
- borderColor: 'var(--button-borderColor)',
57
- borderTopLeftRadius: 'var(--button-borderTopLeftRadius, var(--button-borderRadius))',
58
- borderTopRightRadius: 'var(--button-borderTopRightRadius, var(--button-borderRadius))',
59
- borderBottomLeftRadius: 'var(--button-borderBottomLeftRadius, var(--button-borderRadius))',
60
- borderBottomRightRadius: 'var(--button-borderBottomRightRadius, var(--button-borderRadius))',
61
- borderLeftWidth: 'var(--button-borderLeftWidth, var(--button-borderWidth))',
62
- borderRightWidth: 'var(--button-borderRightWidth, var(--button-borderWidth))',
63
- borderTopWidth: 'var(--button-borderTopWidth, var(--button-borderWidth))',
64
- borderBottomWidth: 'var(--button-borderBottomWidth, var(--button-borderWidth))',
65
- boxShadow: 'var(--button-boxShadow)',
66
- width: 'var(--button-width)',
67
- maxWidth: 'var(--button-maxWidth)',
68
- minWidth: 'var(--button-minWidth)',
69
- height: 'var(--button-height)',
70
- minHeight: 'var(--button-minHeight)',
71
- paddingLeft: 'var(--button-paddingLeft)',
72
- paddingRight: 'var(--button-paddingRight)',
73
- paddingTop: 'var(--button-paddingTop)',
74
- paddingBottom: 'var(--button-paddingBottom)',
75
- transition: 'var(--button-transition)',
76
- whiteSpace: 'var(--button-whiteSpace)',
77
- fontFamily: 'var(--button-fontFamily)',
78
- fontSize: 'var(--button-fontSize)',
79
- fontWeight: 'var(--button-fontWeight)',
80
- WebkitFontSmoothing: 'antialiased',
81
- MozOsxFontSmoothing: 'grayscale',
82
- ':global(.ms-Fabric--isFocusVisible) &:focus::after': (_b = {
83
- content: '""',
84
- position: 'absolute',
85
- left: -1,
86
- right: -1,
87
- top: -1,
88
- bottom: -1,
89
- borderWidth: 'var(--button-focusWidth, 2px)',
90
- borderStyle: 'solid',
91
- borderColor: 'var(--button-focusColor, black)',
92
- borderTopLeftRadius: 'var(--button-borderTopLeftRadius, var(--button-borderRadius))',
93
- borderTopRightRadius: 'var(--button-borderTopRightRadius, var(--button-borderRadius))',
94
- borderBottomLeftRadius: 'var(--button-borderBottomLeftRadius, var(--button-borderRadius))',
95
- borderBottomRightRadius: 'var(--button-borderBottomRightRadius, var(--button-borderRadius))',
96
- boxShadow: '0 0 0 var(--button-focusInnerWidth, 1px) var(--button-focusInnerColor, white) inset',
97
- zIndex: 1
98
- },
99
- _b[EdgeChromiumHighContrastSelector] = {
100
- borderColor: 'var(--button-highContrast-focusColor)',
101
- boxShadow: '0 0 0 var(--button-focusInnerWidth, 1px) var(--button-highContrast-focusInnerColor) inset',
102
- },
103
- _b)
104
- },
105
- _a['& > *:not(:first-child)'] = {
106
- marginLeft: 'var(--button-contentGap)',
107
- },
108
- _a[EdgeChromiumHighContrastSelector] = (_c = {
109
- forcedColorAdjust: 'var(--button-forcedColorAdjust)',
110
- background: 'var(--button-highContrast-background)',
111
- borderColor: 'var(--button-highContrast-borderColor)',
112
- color: 'var(--button-highContrast-contentColor)'
113
- },
114
- _c["." + GlobalClassNames.icon] = {
115
- color: 'var(--button-highContrast-iconColor)',
116
- },
117
- _c),
118
- _a['&:hover'] = (_d = {
119
- background: 'var(--button-hovered-background, var(--button-background))',
120
- color: 'var(--button-hovered-contentColor, var(--button-contentColor))',
121
- borderColor: 'var(--button-hovered-borderColor, var(--button-borderColor))',
122
- boxShadow: 'var(--button-hovered-boxShadow, var(--button-boxShadow))'
123
- },
124
- _d["." + GlobalClassNames.icon] = {
125
- color: 'var(--button-hovered-iconColor, var(--button-iconColor))',
126
- },
127
- _d[EdgeChromiumHighContrastSelector] = (_e = {
128
- background: 'var(--button-highContrast-hovered-background, var(--button-highContrast-background))',
129
- borderColor: 'var(--button-highContrast-hovered-borderColor, var(--button-highContrast-borderColor))',
130
- color: 'var(--button-highContrast-hovered-contentColor, var(--button-highContrast-contentColor))'
131
- },
132
- _e["." + GlobalClassNames.icon] = {
133
- color: 'var(--button-highContrast-hovered-iconColor, --button-highContrast-iconColor)',
134
- },
135
- _e),
136
- _d),
137
- _a['&:active'] = (_f = {
138
- background: 'var(--button-pressed-background, var(--button-hovered-background))',
139
- color: 'var(--button-pressed-contentColor, var(--button-hovered-contentColor, var(--button-contentColor)))',
140
- borderColor: 'var(--button-pressed-borderColor, var(--button-hovered-borderColor, var(--button-borderColor)))',
141
- boxShadow: 'var(--button-pressed-boxShadow, var(--button-hovered-boxShadow, var(--button-boxShadow)))',
142
- transform: 'var(--button-pressed-transform)',
143
- transition: 'var(--button-pressed-transition)'
144
- },
145
- _f["." + GlobalClassNames.icon] = {
146
- color: 'var(--button-pressed-iconColor, var(--button-iconColor))',
147
- },
148
- _f[EdgeChromiumHighContrastSelector] = (_g = {
149
- background: 'var(--button-highContrast-pressed-background, ' +
150
- 'var(--button-highContrast-hovered-background, ' +
151
- 'var(--button-highContrast-background)))',
152
- borderColor: 'var(--button-highContrast-pressed-borderColor, ' +
153
- 'var(--button-highContrast-hovered-borderColor, ' +
154
- 'var(--button-highContrast-borderColor)))',
155
- color: 'var(--button-highContrast-pressed-contentColor, ' +
156
- 'var(--button-highContrast-hovered-contentColor, ' +
157
- 'var(--button-highContarst-contentColor)))'
158
- },
159
- _g["." + GlobalClassNames.icon] = {
160
- color: 'var(--button-highContrast-pressed-iconColor, ' +
161
- 'var(--button-highContrast-hovered-iconColor, ' +
162
- 'var(--button-highContrast-iconColor)))',
163
- },
164
- _g),
165
- _f),
166
- _a['&[aria-disabled=true]'] = (_h = {
167
- pointerEvents: 'none',
168
- opacity: 'var(--button-disabled-opacity)',
169
- backgroundColor: 'var(--button-disabled-background)',
170
- color: 'var(--button-disabled-contentColor)',
171
- borderColor: 'var(--button-disabled-borderColor)',
172
- boxShadow: 'var(--button-disabled-boxShadow)'
173
- },
174
- _h["." + GlobalClassNames.icon] = {
175
- color: 'var(--button-disabled-iconColor)',
176
- },
177
- _h[EdgeChromiumHighContrastSelector] = (_j = {
178
- background: 'var(--button-highContrast-disabled-background, var(--button-highContrast-background))',
179
- borderColor: 'var(--button-highContrast-disabled-borderColor, var(--button-highContrast-borderColor))',
180
- color: 'var(--button-highContrast-disabled-contentColor, var(--button-highContrast-contentColor))'
181
- },
182
- _j["." + GlobalClassNames.icon] = {
183
- color: 'var(--button-highContrast-disabled-iconColor, --button-highContrast-iconColor)',
184
- },
185
- _j),
186
- _h),
187
- _a),
188
- ],
189
- icon: [
190
- GlobalClassNames.icon,
191
- {
192
- color: 'var(--button-iconColor)',
193
- display: 'flex',
194
- flexShrink: 0,
195
- alignItems: 'center',
196
- justifyContent: 'center',
197
- width: 'var(--button-iconSize)',
198
- height: 'var(--button-iconSize)',
199
- fontSize: 'var(--button-iconSize, inherit)',
200
- fontWeight: 'normal',
201
- lineHeight: '1',
202
- },
203
- ],
204
- content: {
205
- lineHeight: '1',
206
- },
207
- },
208
- variants: function (theme) {
209
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13;
210
- var fonts = theme.fonts, effects = theme.effects, palette = theme.palette, semanticColors = theme.semanticColors;
211
- return __assign({ root: {
212
- size: {
213
- smallest: '24px',
214
- smaller: '24px',
215
- small: '24px',
216
- regular: '32px',
217
- large: '40px',
218
- larger: '48px',
219
- largest: '64px',
220
- },
221
- // Sizing tokens
222
- iconSize: (_b = (_a = fonts) === null || _a === void 0 ? void 0 : _a.mediumPlus) === null || _b === void 0 ? void 0 : _b.fontSize,
223
- borderWidth: '1px',
224
- boxShadow: 'none',
225
- borderRadius: (_c = effects) === null || _c === void 0 ? void 0 : _c.roundedCorner2,
226
- paddingLeft: '20px',
227
- paddingRight: '20px',
228
- paddingTop: '0',
229
- paddingBottom: '0',
230
- margin: '0',
231
- width: 'auto',
232
- minWidth: '96px',
233
- maxWidth: '280px',
234
- minHeight: 'var(--button-size-regular)',
235
- contentGap: '8px',
236
- // Font tokens
237
- fontWeight: '600',
238
- fontSize: (_e = (_d = fonts) === null || _d === void 0 ? void 0 : _d.medium) === null || _e === void 0 ? void 0 : _e.fontSize,
239
- fontFamily: (_g = (_f = fonts) === null || _f === void 0 ? void 0 : _f.medium) === null || _g === void 0 ? void 0 : _g.fontFamily,
240
- // Color tokens
241
- focusColor: (_h = palette) === null || _h === void 0 ? void 0 : _h.black,
242
- focusInnerColor: (_j = palette) === null || _j === void 0 ? void 0 : _j.white,
243
- background: (_k = semanticColors) === null || _k === void 0 ? void 0 : _k.buttonBackground,
244
- borderColor: (_l = semanticColors) === null || _l === void 0 ? void 0 : _l.buttonBorder,
245
- contentColor: (_m = semanticColors) === null || _m === void 0 ? void 0 : _m.buttonText,
246
- iconColor: 'inherit',
247
- hovered: {
248
- background: (_o = semanticColors) === null || _o === void 0 ? void 0 : _o.buttonBackgroundHovered,
249
- contentColor: (_p = semanticColors) === null || _p === void 0 ? void 0 : _p.buttonTextHovered,
250
- },
251
- pressed: {
252
- background: (_q = semanticColors) === null || _q === void 0 ? void 0 : _q.buttonBackgroundPressed,
253
- contentColor: (_r = semanticColors) === null || _r === void 0 ? void 0 : _r.buttonTextPressed,
254
- },
255
- disabled: {
256
- background: (_s = semanticColors) === null || _s === void 0 ? void 0 : _s.buttonBackgroundDisabled,
257
- borderColor: (_t = semanticColors) === null || _t === void 0 ? void 0 : _t.buttonBorderDisabled,
258
- contentColor: (_u = semanticColors) === null || _u === void 0 ? void 0 : _u.buttonTextDisabled,
259
- },
260
- highContrast: {
261
- borderColor: 'WindowText',
262
- contentColor: 'WindowText',
263
- iconColor: 'WindowText',
264
- hovered: {
265
- borderColor: 'Highlight',
266
- contentColor: 'Highlight',
267
- iconColor: 'Highlight',
268
- },
269
- pressed: {
270
- borderColor: 'Highlight',
271
- contentColor: 'WindowText',
272
- iconColor: 'WindowText',
273
- },
274
- disabled: {
275
- background: 'Window',
276
- borderColor: 'GrayText',
277
- contentColor: 'GrayText',
278
- iconColor: 'GrayText',
279
- },
280
- },
281
- }, circular: {
282
- borderRadius: '50000px',
283
- }, block: {
284
- width: '100%',
285
- maxWidth: 'none',
286
- }, iconOnly: {
287
- minWidth: 'var(--button-height)',
288
- width: 'var(--button-height, var(--button-minHeight))',
289
- paddingTop: '0',
290
- paddingBottom: '0',
291
- paddingLeft: '0',
292
- paddingRight: '0',
293
- }, primary: {
294
- background: 'var(--color-brand-background)',
295
- borderColor: 'var(--color-brand-borderColor)',
296
- contentColor: 'var(--color-brand-contentColor)',
297
- iconColor: 'inherit',
298
- forcedColorAdjust: 'none',
299
- hovered: {
300
- background: 'var(--color-brand-hovered-background)',
301
- borderColor: 'var(--color-brand-hovered-borderColor)',
302
- contentColor: 'var(--color-brand-hovered-contentColor)',
303
- },
304
- pressed: {
305
- background: 'var(--color-brand-pressed-background)',
306
- borderColor: 'var(--color-brand-pressed-borderColor)',
307
- contentColor: 'var(--color-brand-pressed-contentColor)',
308
- },
309
- highContrast: {
310
- background: 'WindowText',
311
- borderColor: 'WindowText',
312
- contentColor: 'Window',
313
- focusColor: 'WindowText',
314
- focusInnerColor: 'Window',
315
- iconColor: 'Window',
316
- hovered: {
317
- background: 'Highlight',
318
- borderColor: 'Highlight',
319
- contentColor: 'Window',
320
- iconColor: 'Window',
321
- },
322
- pressed: {
323
- background: 'WindowText',
324
- borderColor: 'WindowText',
325
- contentColor: 'Window',
326
- iconColor: 'Window',
327
- },
328
- disabled: {
329
- background: 'Window',
330
- borderColor: 'GrayText',
331
- contentColor: 'GrayText',
332
- iconColor: 'GrayText',
333
- },
334
- },
335
- },
336
- // TODO: no references to palette.
337
- ghost: {
338
- background: 'transparent',
339
- borderColor: 'transparent',
340
- contentColor: (_v = palette) === null || _v === void 0 ? void 0 : _v.neutralPrimary,
341
- fontWeight: 'normal',
342
- iconColor: (_w = palette) === null || _w === void 0 ? void 0 : _w.themeDarkAlt,
343
- forcedColorAdjust: 'none',
344
- disabled: {
345
- background: (_x = semanticColors) === null || _x === void 0 ? void 0 : _x.disabledBackground,
346
- contentColor: (_y = palette) === null || _y === void 0 ? void 0 : _y.neutralTertiary,
347
- iconColor: 'inherit',
348
- },
349
- expanded: {
350
- contentColor: (_z = palette) === null || _z === void 0 ? void 0 : _z.themePrimary,
351
- },
352
- focused: {
353
- contentColor: (_0 = palette) === null || _0 === void 0 ? void 0 : _0.neutralPrimary,
354
- iconColor: (_1 = palette) === null || _1 === void 0 ? void 0 : _1.themeDarkAlt,
355
- },
356
- hovered: {
357
- background: (_2 = palette) === null || _2 === void 0 ? void 0 : _2.neutralLighter,
358
- contentColor: (_3 = palette) === null || _3 === void 0 ? void 0 : _3.themePrimary,
359
- iconColor: (_4 = palette) === null || _4 === void 0 ? void 0 : _4.themePrimary,
360
- },
361
- pressed: {
362
- background: (_5 = palette) === null || _5 === void 0 ? void 0 : _5.neutralLight,
363
- contentColor: (_6 = palette) === null || _6 === void 0 ? void 0 : _6.black,
364
- iconColor: (_7 = palette) === null || _7 === void 0 ? void 0 : _7.themeDarker,
365
- },
366
- highContrast: {
367
- background: 'Window',
368
- borderColor: 'transparent',
369
- contentColor: 'WindowText',
370
- iconColor: 'WindowText',
371
- hovered: {
372
- background: 'Window',
373
- borderColor: 'transparent',
374
- contentColor: 'Highlight',
375
- iconColor: 'Highlight',
376
- },
377
- pressed: {
378
- background: 'Window',
379
- borderColor: 'transparent',
380
- contentColor: 'Highlight',
381
- iconColor: 'Highlight',
382
- },
383
- disabled: {
384
- background: 'Window',
385
- borderColor: 'transparent',
386
- contentColor: 'GrayText',
387
- iconColor: 'GrayText',
388
- },
389
- },
390
- },
391
- // TODO: no references to palette.
392
- transparent: {
393
- background: 'transparent',
394
- borderColor: 'transparent',
395
- contentColor: (_8 = palette) === null || _8 === void 0 ? void 0 : _8.neutralPrimary,
396
- fontWeight: 'normal',
397
- iconColor: (_9 = palette) === null || _9 === void 0 ? void 0 : _9.themeDarkAlt,
398
- disabled: {
399
- background: 'transparent',
400
- borderColor: 'transparent',
401
- contentColor: palette.neutralTertiary,
402
- iconColor: 'inherit',
403
- },
404
- hovered: {
405
- background: 'transparent',
406
- contentColor: (_10 = palette) === null || _10 === void 0 ? void 0 : _10.themePrimary,
407
- iconColor: (_11 = palette) === null || _11 === void 0 ? void 0 : _11.themePrimary,
408
- },
409
- pressed: {
410
- background: 'transparent',
411
- contentColor: (_12 = palette) === null || _12 === void 0 ? void 0 : _12.black,
412
- iconColor: (_13 = palette) === null || _13 === void 0 ? void 0 : _13.themeDarker,
413
- },
414
- } }, ButtonSizeVariants);
415
- },
416
- });
417
- //# sourceMappingURL=useButtonClasses.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useButtonClasses.js","sourceRoot":"../src/","sources":["components/Button/useButtonClasses.ts"],"names":[],"mappings":";;AAAA,yDAAyD;AACzD,OAAO,EAAE,kBAAkB,EAAS,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,2BAA2B,CAAC;AAG7E,IAAM,gBAAgB,GAAG;IACvB,IAAI,EAAE,WAAW;IACjB,IAAI,EAAE,gBAAgB;CACvB,CAAC;AAEF,MAAM,CAAC,IAAM,kBAAkB,GAAG;IAChC,aAAa,EAAE;QACb,MAAM,EAAE,6BAA6B;QACrC,SAAS,EAAE,6BAA6B;KACzC;IAED,YAAY,EAAE;QACZ,MAAM,EAAE,4BAA4B;QACpC,SAAS,EAAE,4BAA4B;KACxC;IAED,UAAU,EAAE;QACV,MAAM,EAAE,0BAA0B;QAClC,SAAS,EAAE,0BAA0B;KACtC;IAED,UAAU,EAAE;QACV,MAAM,EAAE,0BAA0B;QAClC,SAAS,EAAE,0BAA0B;KACtC;IAED,WAAW,EAAE;QACX,MAAM,EAAE,2BAA2B;QACnC,SAAS,EAAE,2BAA2B;KACvC;IAED,YAAY,EAAE;QACZ,MAAM,EAAE,4BAA4B;QACpC,SAAS,EAAE,4BAA4B;KACxC;CACF,CAAC;AAEF,MAAM,CAAC,IAAM,gBAAgB,GAAG,kBAAkB,CAA8B;IAC9E,IAAI,EAAE,QAAQ;IACd,MAAM,EAAE,UAAU;IAElB,MAAM,EAAE;QACN,IAAI,EAAE;YACJ,gBAAgB,CAAC,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BACzB,YAAY,SAAE,OAAO,4CAAE,YAAY;oBACnC,SAAS,SAAE,OAAO,4CAAE,YAAY;iBACjC;gBAED,OAAO,EAAE;oBACP,UAAU,EAAE,aAAa;oBACzB,YAAY,SAAE,OAAO,4CAAE,KAAK;oBAC5B,SAAS,SAAE,OAAO,4CAAE,WAAW;iBAChC;aACF,IAEE,kBAAkB,EACrB;IACJ,CAAC;CACF,CAAC,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { makeVariantClasses, Theme } from '@fluentui/react-theme-provider';\nimport { EdgeChromiumHighContrastSelector } from '@fluentui/style-utilities';\nimport { ButtonState, ButtonVariants } from './Button.types';\n\nconst GlobalClassNames = {\n root: 'ms-Button',\n icon: 'ms-Button-icon',\n};\n\nexport const ButtonSizeVariants = {\n size_smallest: {\n height: 'var(--button-size-smallest)',\n minHeight: 'var(--button-size-smallest)',\n },\n\n size_smaller: {\n height: 'var(--button-size-smaller)',\n minHeight: 'var(--button-size-smaller)',\n },\n\n size_small: {\n height: 'var(--button-size-small)',\n minHeight: 'var(--button-size-small)',\n },\n\n size_large: {\n height: 'var(--button-size-large)',\n minHeight: 'var(--button-size-large)',\n },\n\n size_larger: {\n height: 'var(--button-size-larger)',\n minHeight: 'var(--button-size-larger)',\n },\n\n size_largest: {\n height: 'var(--button-size-largest)',\n minHeight: 'var(--button-size-largest)',\n },\n};\n\nexport const useButtonClasses = makeVariantClasses<ButtonState, ButtonVariants>({\n name: 'Button',\n prefix: '--button',\n\n styles: {\n root: [\n GlobalClassNames.root,\n {\n cursor: 'pointer',\n alignItems: 'center',\n borderStyle: 'solid',\n display: 'inline-flex',\n justifyContent: 'center',\n outline: 'none',\n position: 'relative',\n userSelect: 'none',\n boxSizing: 'border-box',\n verticalAlign: 'middle',\n textDecoration: 'none',\n background: 'var(--button-background)',\n color: 'var(--button-contentColor)',\n\n borderColor: 'var(--button-borderColor)',\n borderTopLeftRadius: 'var(--button-borderTopLeftRadius, var(--button-borderRadius))',\n borderTopRightRadius: 'var(--button-borderTopRightRadius, var(--button-borderRadius))',\n borderBottomLeftRadius: 'var(--button-borderBottomLeftRadius, var(--button-borderRadius))',\n borderBottomRightRadius: 'var(--button-borderBottomRightRadius, var(--button-borderRadius))',\n borderLeftWidth: 'var(--button-borderLeftWidth, var(--button-borderWidth))',\n borderRightWidth: 'var(--button-borderRightWidth, var(--button-borderWidth))',\n borderTopWidth: 'var(--button-borderTopWidth, var(--button-borderWidth))',\n borderBottomWidth: 'var(--button-borderBottomWidth, var(--button-borderWidth))',\n boxShadow: 'var(--button-boxShadow)',\n\n width: 'var(--button-width)',\n maxWidth: 'var(--button-maxWidth)',\n minWidth: 'var(--button-minWidth)',\n height: 'var(--button-height)',\n minHeight: 'var(--button-minHeight)',\n\n paddingLeft: 'var(--button-paddingLeft)',\n paddingRight: 'var(--button-paddingRight)',\n paddingTop: 'var(--button-paddingTop)',\n paddingBottom: 'var(--button-paddingBottom)',\n\n transition: 'var(--button-transition)',\n whiteSpace: 'var(--button-whiteSpace)',\n\n fontFamily: 'var(--button-fontFamily)',\n fontSize: 'var(--button-fontSize)',\n fontWeight: 'var(--button-fontWeight)',\n WebkitFontSmoothing: 'antialiased',\n MozOsxFontSmoothing: 'grayscale',\n\n ':global(.ms-Fabric--isFocusVisible) &:focus::after': {\n content: '\"\"',\n position: 'absolute',\n left: -1,\n right: -1,\n top: -1,\n bottom: -1,\n borderWidth: 'var(--button-focusWidth, 2px)',\n borderStyle: 'solid',\n borderColor: 'var(--button-focusColor, black)',\n borderTopLeftRadius: 'var(--button-borderTopLeftRadius, var(--button-borderRadius))',\n borderTopRightRadius: 'var(--button-borderTopRightRadius, var(--button-borderRadius))',\n borderBottomLeftRadius: 'var(--button-borderBottomLeftRadius, var(--button-borderRadius))',\n borderBottomRightRadius: 'var(--button-borderBottomRightRadius, var(--button-borderRadius))',\n boxShadow: '0 0 0 var(--button-focusInnerWidth, 1px) var(--button-focusInnerColor, white) inset',\n zIndex: 1,\n\n [EdgeChromiumHighContrastSelector]: {\n borderColor: 'var(--button-highContrast-focusColor)',\n boxShadow: '0 0 0 var(--button-focusInnerWidth, 1px) var(--button-highContrast-focusInnerColor) inset',\n },\n },\n\n ['& > *:not(:first-child)']: {\n marginLeft: 'var(--button-contentGap)',\n },\n\n [EdgeChromiumHighContrastSelector]: {\n forcedColorAdjust: 'var(--button-forcedColorAdjust)',\n\n background: 'var(--button-highContrast-background)',\n borderColor: 'var(--button-highContrast-borderColor)',\n color: 'var(--button-highContrast-contentColor)',\n\n [`.${GlobalClassNames.icon}`]: {\n color: 'var(--button-highContrast-iconColor)',\n },\n },\n\n '&:hover': {\n background: 'var(--button-hovered-background, var(--button-background))',\n color: 'var(--button-hovered-contentColor, var(--button-contentColor))',\n borderColor: 'var(--button-hovered-borderColor, var(--button-borderColor))',\n boxShadow: 'var(--button-hovered-boxShadow, var(--button-boxShadow))',\n\n [`.${GlobalClassNames.icon}`]: {\n color: 'var(--button-hovered-iconColor, var(--button-iconColor))',\n },\n\n [EdgeChromiumHighContrastSelector]: {\n background: 'var(--button-highContrast-hovered-background, var(--button-highContrast-background))',\n borderColor: 'var(--button-highContrast-hovered-borderColor, var(--button-highContrast-borderColor))',\n color: 'var(--button-highContrast-hovered-contentColor, var(--button-highContrast-contentColor))',\n [`.${GlobalClassNames.icon}`]: {\n color: 'var(--button-highContrast-hovered-iconColor, --button-highContrast-iconColor)',\n },\n },\n },\n\n '&:active': {\n background: 'var(--button-pressed-background, var(--button-hovered-background))',\n color: 'var(--button-pressed-contentColor, var(--button-hovered-contentColor, var(--button-contentColor)))',\n borderColor:\n 'var(--button-pressed-borderColor, var(--button-hovered-borderColor, var(--button-borderColor)))',\n boxShadow: 'var(--button-pressed-boxShadow, var(--button-hovered-boxShadow, var(--button-boxShadow)))',\n\n transform: 'var(--button-pressed-transform)',\n transition: 'var(--button-pressed-transition)',\n\n [`.${GlobalClassNames.icon}`]: {\n color: 'var(--button-pressed-iconColor, var(--button-iconColor))',\n },\n\n [EdgeChromiumHighContrastSelector]: {\n background:\n 'var(--button-highContrast-pressed-background, ' +\n 'var(--button-highContrast-hovered-background, ' +\n 'var(--button-highContrast-background)))',\n borderColor:\n 'var(--button-highContrast-pressed-borderColor, ' +\n 'var(--button-highContrast-hovered-borderColor, ' +\n 'var(--button-highContrast-borderColor)))',\n color:\n 'var(--button-highContrast-pressed-contentColor, ' +\n 'var(--button-highContrast-hovered-contentColor, ' +\n 'var(--button-highContarst-contentColor)))',\n [`.${GlobalClassNames.icon}`]: {\n color:\n 'var(--button-highContrast-pressed-iconColor, ' +\n 'var(--button-highContrast-hovered-iconColor, ' +\n 'var(--button-highContrast-iconColor)))',\n },\n },\n },\n\n '&[aria-disabled=true]': {\n pointerEvents: 'none',\n opacity: 'var(--button-disabled-opacity)',\n backgroundColor: 'var(--button-disabled-background)',\n color: 'var(--button-disabled-contentColor)',\n borderColor: 'var(--button-disabled-borderColor)',\n boxShadow: 'var(--button-disabled-boxShadow)',\n\n [`.${GlobalClassNames.icon}`]: {\n color: 'var(--button-disabled-iconColor)',\n },\n\n [EdgeChromiumHighContrastSelector]: {\n background: 'var(--button-highContrast-disabled-background, var(--button-highContrast-background))',\n borderColor: 'var(--button-highContrast-disabled-borderColor, var(--button-highContrast-borderColor))',\n color: 'var(--button-highContrast-disabled-contentColor, var(--button-highContrast-contentColor))',\n [`.${GlobalClassNames.icon}`]: {\n color: 'var(--button-highContrast-disabled-iconColor, --button-highContrast-iconColor)',\n },\n },\n },\n },\n ],\n\n icon: [\n GlobalClassNames.icon,\n {\n color: 'var(--button-iconColor)',\n display: 'flex',\n flexShrink: 0,\n alignItems: 'center',\n justifyContent: 'center',\n width: 'var(--button-iconSize)',\n height: 'var(--button-iconSize)',\n fontSize: 'var(--button-iconSize, inherit)',\n fontWeight: 'normal',\n lineHeight: '1',\n },\n ],\n\n content: {\n lineHeight: '1',\n },\n },\n\n variants: (theme: Theme): ButtonVariants => {\n const { fonts, effects, palette, semanticColors } = theme;\n\n return {\n root: {\n size: {\n smallest: '24px',\n smaller: '24px',\n small: '24px',\n regular: '32px',\n large: '40px',\n larger: '48px',\n largest: '64px',\n },\n\n // Sizing tokens\n iconSize: fonts?.mediumPlus?.fontSize as string,\n borderWidth: '1px',\n boxShadow: 'none',\n borderRadius: effects?.roundedCorner2,\n paddingLeft: '20px',\n paddingRight: '20px',\n paddingTop: '0',\n paddingBottom: '0',\n margin: '0',\n width: 'auto',\n minWidth: '96px',\n maxWidth: '280px',\n minHeight: 'var(--button-size-regular)',\n contentGap: '8px',\n\n // Font tokens\n fontWeight: '600',\n fontSize: fonts?.medium?.fontSize as string,\n fontFamily: fonts?.medium?.fontFamily,\n\n // Color tokens\n focusColor: palette?.black,\n focusInnerColor: palette?.white,\n background: semanticColors?.buttonBackground,\n borderColor: semanticColors?.buttonBorder,\n contentColor: semanticColors?.buttonText,\n iconColor: 'inherit',\n\n hovered: {\n background: semanticColors?.buttonBackgroundHovered,\n contentColor: semanticColors?.buttonTextHovered,\n },\n\n pressed: {\n background: semanticColors?.buttonBackgroundPressed,\n contentColor: semanticColors?.buttonTextPressed,\n },\n\n disabled: {\n background: semanticColors?.buttonBackgroundDisabled,\n borderColor: semanticColors?.buttonBorderDisabled,\n contentColor: semanticColors?.buttonTextDisabled,\n },\n\n highContrast: {\n borderColor: 'WindowText',\n contentColor: 'WindowText',\n iconColor: 'WindowText',\n\n hovered: {\n borderColor: 'Highlight',\n contentColor: 'Highlight',\n iconColor: 'Highlight',\n },\n\n pressed: {\n borderColor: 'Highlight',\n contentColor: 'WindowText',\n iconColor: 'WindowText',\n },\n\n disabled: {\n background: 'Window',\n borderColor: 'GrayText',\n contentColor: 'GrayText',\n iconColor: 'GrayText',\n },\n },\n },\n\n circular: {\n borderRadius: '50000px',\n },\n\n block: {\n width: '100%',\n maxWidth: 'none',\n },\n\n iconOnly: {\n minWidth: 'var(--button-height)',\n width: 'var(--button-height, var(--button-minHeight))',\n paddingTop: '0',\n paddingBottom: '0',\n paddingLeft: '0',\n paddingRight: '0',\n },\n\n primary: {\n background: 'var(--color-brand-background)',\n borderColor: 'var(--color-brand-borderColor)',\n contentColor: 'var(--color-brand-contentColor)',\n iconColor: 'inherit',\n forcedColorAdjust: 'none',\n\n hovered: {\n background: 'var(--color-brand-hovered-background)',\n borderColor: 'var(--color-brand-hovered-borderColor)',\n contentColor: 'var(--color-brand-hovered-contentColor)',\n },\n\n pressed: {\n background: 'var(--color-brand-pressed-background)',\n borderColor: 'var(--color-brand-pressed-borderColor)',\n contentColor: 'var(--color-brand-pressed-contentColor)',\n },\n\n highContrast: {\n background: 'WindowText',\n borderColor: 'WindowText',\n contentColor: 'Window',\n focusColor: 'WindowText',\n focusInnerColor: 'Window',\n iconColor: 'Window',\n\n hovered: {\n background: 'Highlight',\n borderColor: 'Highlight',\n contentColor: 'Window',\n iconColor: 'Window',\n },\n\n pressed: {\n background: 'WindowText',\n borderColor: 'WindowText',\n contentColor: 'Window',\n iconColor: 'Window',\n },\n\n disabled: {\n background: 'Window',\n borderColor: 'GrayText',\n contentColor: 'GrayText',\n iconColor: 'GrayText',\n },\n },\n },\n\n // TODO: no references to palette.\n ghost: {\n background: 'transparent',\n borderColor: 'transparent',\n contentColor: palette?.neutralPrimary,\n fontWeight: 'normal',\n iconColor: palette?.themeDarkAlt,\n forcedColorAdjust: 'none',\n\n disabled: {\n background: semanticColors?.disabledBackground,\n contentColor: palette?.neutralTertiary,\n iconColor: 'inherit',\n },\n\n expanded: {\n contentColor: palette?.themePrimary,\n },\n\n focused: {\n contentColor: palette?.neutralPrimary,\n iconColor: palette?.themeDarkAlt,\n },\n\n hovered: {\n background: palette?.neutralLighter,\n contentColor: palette?.themePrimary,\n iconColor: palette?.themePrimary,\n },\n\n pressed: {\n background: palette?.neutralLight,\n contentColor: palette?.black,\n iconColor: palette?.themeDarker,\n },\n\n highContrast: {\n background: 'Window',\n borderColor: 'transparent',\n contentColor: 'WindowText',\n iconColor: 'WindowText',\n\n hovered: {\n background: 'Window',\n borderColor: 'transparent',\n contentColor: 'Highlight',\n iconColor: 'Highlight',\n },\n\n pressed: {\n background: 'Window',\n borderColor: 'transparent',\n contentColor: 'Highlight',\n iconColor: 'Highlight',\n },\n\n disabled: {\n background: 'Window',\n borderColor: 'transparent',\n contentColor: 'GrayText',\n iconColor: 'GrayText',\n },\n },\n },\n\n // TODO: no references to palette.\n transparent: {\n background: 'transparent',\n borderColor: 'transparent',\n contentColor: palette?.neutralPrimary,\n fontWeight: 'normal',\n iconColor: palette?.themeDarkAlt,\n\n disabled: {\n background: 'transparent',\n borderColor: 'transparent',\n contentColor: palette.neutralTertiary,\n iconColor: 'inherit',\n },\n\n hovered: {\n background: 'transparent',\n contentColor: palette?.themePrimary,\n iconColor: palette?.themePrimary,\n },\n\n pressed: {\n background: 'transparent',\n contentColor: palette?.black,\n iconColor: palette?.themeDarker,\n },\n },\n\n ...ButtonSizeVariants,\n };\n },\n});\n"]}
@@ -1,6 +0,0 @@
1
- import { ButtonState } from './Button.types';
2
- /**
3
- * The useButton hook processes the Button draft state.
4
- * @param draftState - Button draft state to mutate.
5
- */
6
- export declare const useButtonState: (draftState: ButtonState) => void;
@@ -1,28 +0,0 @@
1
- /**
2
- * The useButton hook processes the Button draft state.
3
- * @param draftState - Button draft state to mutate.
4
- */
5
- export var useButtonState = function (draftState) {
6
- // Update the button's tab-index, keyboard handling, and aria attributes.
7
- if (draftState.as !== 'button') {
8
- draftState.role = 'button';
9
- if (draftState.as !== 'a') {
10
- var onKeyDown_1 = draftState.onKeyDown, onClick_1 = draftState.onClick;
11
- draftState['data-isFocusable'] = true;
12
- draftState.tabIndex = 0;
13
- draftState.onKeyDown = function (ev) {
14
- if (onKeyDown_1) {
15
- onKeyDown_1(ev);
16
- }
17
- if (!ev.defaultPrevented && onClick_1 && (ev.which === 20 || ev.which === 13)) {
18
- // Translate the keydown enter/space to a click.
19
- ev.preventDefault();
20
- ev.stopPropagation();
21
- ev.target.click();
22
- }
23
- };
24
- }
25
- }
26
- draftState.disabled = draftState['aria-disabled'] = draftState.disabled || draftState.loading;
27
- };
28
- //# sourceMappingURL=useButtonState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useButtonState.js","sourceRoot":"../src/","sources":["components/Button/useButtonState.ts"],"names":[],"mappings":"AAGA;;;GAGG;AACH,MAAM,CAAC,IAAM,cAAc,GAAG,UAAC,UAAuB;IACpD,yEAAyE;IACzE,IAAI,UAAU,CAAC,EAAE,KAAK,QAAQ,EAAE;QAC9B,UAAU,CAAC,IAAI,GAAG,QAAQ,CAAC;QAE3B,IAAI,UAAU,CAAC,EAAE,KAAK,GAAG,EAAE;YACjB,IAAA,kCAAS,EAAE,8BAAO,CAAgB;YAE1C,UAAU,CAAC,kBAAkB,CAAC,GAAG,IAAI,CAAC;YACtC,UAAU,CAAC,QAAQ,GAAG,CAAC,CAAC;YAExB,UAAU,CAAC,SAAS,GAAG,UAAC,EAAoC;gBAC1D,IAAI,WAAS,EAAE;oBACb,WAAS,CAAC,EAAE,CAAC,CAAC;iBACf;gBAED,IAAI,CAAC,EAAE,CAAC,gBAAgB,IAAI,SAAO,IAAI,CAAC,EAAE,CAAC,KAAK,KAAK,EAAE,IAAI,EAAE,CAAC,KAAK,KAAK,EAAE,CAAC,EAAE;oBAC3E,gDAAgD;oBAChD,EAAE,CAAC,cAAc,EAAE,CAAC;oBACpB,EAAE,CAAC,eAAe,EAAE,CAAC;oBAEpB,EAAE,CAAC,MAAsB,CAAC,KAAK,EAAE,CAAC;iBACpC;YACH,CAAC,CAAC;SACH;KACF;IAED,UAAU,CAAC,QAAQ,GAAG,UAAU,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC,QAAQ,IAAI,UAAU,CAAC,OAAO,CAAC;AAChG,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { ButtonState } from './Button.types';\n\n/**\n * The useButton hook processes the Button draft state.\n * @param draftState - Button draft state to mutate.\n */\nexport const useButtonState = (draftState: ButtonState) => {\n // Update the button's tab-index, keyboard handling, and aria attributes.\n if (draftState.as !== 'button') {\n draftState.role = 'button';\n\n if (draftState.as !== 'a') {\n const { onKeyDown, onClick } = draftState;\n\n draftState['data-isFocusable'] = true;\n draftState.tabIndex = 0;\n\n draftState.onKeyDown = (ev: React.KeyboardEvent<HTMLElement>) => {\n if (onKeyDown) {\n onKeyDown(ev);\n }\n\n if (!ev.defaultPrevented && onClick && (ev.which === 20 || ev.which === 13)) {\n // Translate the keydown enter/space to a click.\n ev.preventDefault();\n ev.stopPropagation();\n\n (ev.target as HTMLElement).click();\n }\n };\n }\n }\n\n draftState.disabled = draftState['aria-disabled'] = draftState.disabled || draftState.loading;\n};\n"]}
@@ -1,4 +0,0 @@
1
- import { Theme } from '@fluentui/react-theme-provider';
2
- import { CompoundButtonState } from './CompoundButton.types';
3
- export declare const useClasses: (state: CompoundButtonState, theme?: Theme | undefined, renderer?: import("@fluentui/react-theme-provider").StyleRenderer | undefined) => void;
4
- export declare const useCompoundButtonClasses: (state: CompoundButtonState) => void;