@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
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useSplitButtonStyles = void 0;
7
+
8
+ var react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
9
+
10
+ var react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
11
+
12
+ var SplitButtonClassNames = {
13
+ primaryActionButton: 'SplitButton-primaryActionButton',
14
+ menuButton: 'SplitButton-menuButton'
15
+ };
16
+
17
+ var useFocusStyles = /*#__PURE__*/react_make_styles_1.__styles({
18
+ "primaryActionButton": {},
19
+ "menuButton": {}
20
+ }, {});
21
+
22
+ var useRootStyles = /*#__PURE__*/react_make_styles_1.__styles({
23
+ "base": {
24
+ "mc9l5x": "ftuwxu6",
25
+ "Brf1p80": "fsxf2b5",
26
+ "qhf8xq": "f10pi13n",
27
+ "ha4doy": "fmrv4ls",
28
+ "ipgm0c": ["f178uykt", "f90yzzo"],
29
+ "B6cuk21": ["f1bxd3c5", "f1ekv84t"],
30
+ "bajz6s": ["fnux5s6", "f5nfhee"],
31
+ "Bzqncq": ["f19wc9x7", "f5bevrs"],
32
+ "Flt4rd": ["f1wefiyg", "f1leuqsa"]
33
+ },
34
+ "block": {
35
+ "a9b677": "fly5x3f"
36
+ },
37
+ "outline": {},
38
+ "primary": {
39
+ "Bxrr62k": ["f8z1slf", "f1qj10op"],
40
+ "wqijrc": ["fmrqvvu", "fu0z9tm"],
41
+ "Bsk9mq6": ["f1naws84", "f1ry7auu"]
42
+ },
43
+ "subtle": {
44
+ "Bxrr62k": ["f1xobncs", "f1xirlzn"],
45
+ "wqijrc": ["f1hmsn3f", "fi0rm9z"],
46
+ "Bsk9mq6": ["fam4u78", "f1hqq1j6"]
47
+ },
48
+ "transparent": {
49
+ "Bxrr62k": ["f1xobncs", "f1xirlzn"],
50
+ "wqijrc": ["f1hmsn3f", "fi0rm9z"],
51
+ "Bsk9mq6": ["fam4u78", "f1hqq1j6"]
52
+ },
53
+ "circular": {},
54
+ "rounded": {},
55
+ "square": {},
56
+ "disabled": {
57
+ "Bxrr62k": ["f11wzqjl", "f1a5dzic"],
58
+ "wqijrc": ["fhk4lgh", "f1r7ztp2"],
59
+ "Bsk9mq6": ["f1ot7jx6", "f1qvd61g"]
60
+ }
61
+ }, {
62
+ "d": [".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".fsxf2b5{-webkit-box-pack:stretch;-ms-flex-pack:stretch;-webkit-justify-content:stretch;justify-content:stretch;}", ".f10pi13n{position:relative;}", ".fmrv4ls{vertical-align:middle;}", ".f178uykt .SplitButton-primaryActionButton{border-top-right-radius:0;}", ".f90yzzo .SplitButton-primaryActionButton{border-top-left-radius:0;}", ".f1bxd3c5 .SplitButton-primaryActionButton{border-bottom-right-radius:0;}", ".f1ekv84t .SplitButton-primaryActionButton{border-bottom-left-radius:0;}", ".fnux5s6 .SplitButton-menuButton{border-left-width:0;}", ".f5nfhee .SplitButton-menuButton{border-right-width:0;}", ".f19wc9x7 .SplitButton-menuButton{border-top-left-radius:0;}", ".f5bevrs .SplitButton-menuButton{border-top-right-radius:0;}", ".f1wefiyg .SplitButton-menuButton{border-bottom-left-radius:0;}", ".f1leuqsa .SplitButton-menuButton{border-bottom-right-radius:0;}", ".fly5x3f{width:100%;}", ".f8z1slf .SplitButton-primaryActionButton{border-right-color:var(--colorNeutralForegroundInverted);}", ".f1qj10op .SplitButton-primaryActionButton{border-left-color:var(--colorNeutralForegroundInverted);}", ".f1xobncs .SplitButton-primaryActionButton{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1xirlzn .SplitButton-primaryActionButton{border-left-color:var(--colorNeutralStroke1Hover);}", ".f11wzqjl .SplitButton-primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f1a5dzic .SplitButton-primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}"],
63
+ "h": [".fmrqvvu:hover .SplitButton-primaryActionButton{border-right-color:var(--colorNeutralForegroundInverted);}", ".fu0z9tm:hover .SplitButton-primaryActionButton{border-left-color:var(--colorNeutralForegroundInverted);}", ".f1hmsn3f:hover .SplitButton-primaryActionButton{border-right-color:var(--colorNeutralStroke1Hover);}", ".fi0rm9z:hover .SplitButton-primaryActionButton{border-left-color:var(--colorNeutralStroke1Hover);}", ".fhk4lgh:hover .SplitButton-primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f1r7ztp2:hover .SplitButton-primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}"],
64
+ "a": [".f1naws84:active .SplitButton-primaryActionButton{border-right-color:var(--colorNeutralForegroundInverted);}", ".f1ry7auu:active .SplitButton-primaryActionButton{border-left-color:var(--colorNeutralForegroundInverted);}", ".fam4u78:active .SplitButton-primaryActionButton{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1hqq1j6:active .SplitButton-primaryActionButton{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1ot7jx6:active .SplitButton-primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f1qvd61g:active .SplitButton-primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}"]
65
+ });
66
+
67
+ var useSplitButtonStyles = function (state) {
68
+ var rootStyles = useRootStyles();
69
+ var focusStyles = useFocusStyles();
70
+ var appearance = state.appearance,
71
+ block = state.block,
72
+ disabled = state.disabled,
73
+ disabledFocusable = state.disabledFocusable;
74
+ state.root.className = react_make_styles_1.mergeClasses(rootStyles.base, block && rootStyles.block, appearance && rootStyles[appearance], (disabled || disabledFocusable) && rootStyles.disabled, state.root.className);
75
+
76
+ if (state.menuButton) {
77
+ state.menuButton.className = react_make_styles_1.mergeClasses(SplitButtonClassNames.menuButton, focusStyles.menuButton, state.menuButton.className);
78
+ }
79
+
80
+ if (state.primaryActionButton) {
81
+ state.primaryActionButton.className = react_make_styles_1.mergeClasses(SplitButtonClassNames.primaryActionButton, focusStyles.primaryActionButton, state.primaryActionButton.className);
82
+ }
83
+
84
+ return state;
85
+ };
86
+
87
+ exports.useSplitButtonStyles = useSplitButtonStyles;
88
+ //# sourceMappingURL=useSplitButtonStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/SplitButton/useSplitButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAGA,IAAM,qBAAqB,GAAG;AAC5B,EAAA,mBAAmB,EAAE,iCADO;AAE5B,EAAA,UAAU,EAAE;AAFgB,CAA9B;;AAKA,IAAM,cAAc,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA,MAAvB;;AAaA,IAAM,aAAa,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAtB;;AAgHO,IAAM,oBAAoB,GAAG,UAAC,KAAD,EAAwB;AAC1D,MAAM,UAAU,GAAG,aAAa,EAAhC;AACA,MAAM,WAAW,GAAG,cAAc,EAAlC;AAEQ,MAAA,UAAU,GAAyC,KAAK,CAA9C,UAAV;AAAA,MAAY,KAAK,GAAkC,KAAK,CAAvC,KAAjB;AAAA,MAAmB,QAAQ,GAAwB,KAAK,CAA7B,QAA3B;AAAA,MAA6B,iBAAiB,GAAK,KAAK,CAAV,iBAA9C;AAER,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,CACrB,UAAU,CAAC,IADU,EAErB,KAAK,IAAI,UAAU,CAAC,KAFC,EAGrB,UAAU,IAAI,UAAU,CAAC,UAAD,CAHH,EAIrB,CAAC,QAAQ,IAAI,iBAAb,KAAmC,UAAU,CAAC,QAJzB,EAKrB,KAAK,CAAC,IAAN,CAAW,SALU,CAAvB;;AAQA,MAAI,KAAK,CAAC,UAAV,EAAsB;AACpB,IAAA,KAAK,CAAC,UAAN,CAAiB,SAAjB,GAA6B,mBAAA,CAAA,YAAA,CAC3B,qBAAqB,CAAC,UADK,EAE3B,WAAW,CAAC,UAFe,EAG3B,KAAK,CAAC,UAAN,CAAiB,SAHU,CAA7B;AAKD;;AAED,MAAI,KAAK,CAAC,mBAAV,EAA+B;AAC7B,IAAA,KAAK,CAAC,mBAAN,CAA0B,SAA1B,GAAsC,mBAAA,CAAA,YAAA,CACpC,qBAAqB,CAAC,mBADc,EAEpC,WAAW,CAAC,mBAFwB,EAGpC,KAAK,CAAC,mBAAN,CAA0B,SAHU,CAAtC;AAKD;;AAED,SAAO,KAAP;AACD,CA/BM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourceRoot":""}
@@ -1,7 +1,6 @@
1
- import * as React from 'react';
2
- import { ToggleButtonProps } from './ToggleButton.types';
1
+ import type { ToggleButtonProps } from './ToggleButton.types';
2
+ import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
3
  /**
4
- * Define a styled ToggleButton, using the `useToggleButton` hook.
5
- * {@docCategory Button}
4
+ * ToggleButtons are buttons that toggle between two defined states when triggered.
6
5
  */
7
- export declare const ToggleButton: React.ForwardRefExoticComponent<Pick<ToggleButtonProps, string | number> & React.RefAttributes<HTMLElement>>;
6
+ export declare const ToggleButton: ForwardRefComponent<ToggleButtonProps>;
@@ -1,20 +1,26 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var React = require("react");
4
- var useToggleButton_1 = require("./useToggleButton");
5
- var react_theme_provider_1 = require("@fluentui/react-theme-provider");
6
- var useButtonClasses_1 = require("../Button/useButtonClasses");
7
- var useToggleButtonClasses_1 = require("./useToggleButtonClasses");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ToggleButton = void 0;
7
+
8
+ var React = /*#__PURE__*/require("react");
9
+
10
+ var renderToggleButton_1 = /*#__PURE__*/require("./renderToggleButton");
11
+
12
+ var useToggleButton_1 = /*#__PURE__*/require("./useToggleButton");
13
+
14
+ var useToggleButtonStyles_1 = /*#__PURE__*/require("./useToggleButtonStyles");
8
15
  /**
9
- * Define a styled ToggleButton, using the `useToggleButton` hook.
10
- * {@docCategory Button}
16
+ * ToggleButtons are buttons that toggle between two defined states when triggered.
11
17
  */
12
- exports.ToggleButton = React.forwardRef(function (props, ref) {
13
- var _a = useToggleButton_1.useToggleButton(props, ref), render = _a.render, state = _a.state;
14
- useButtonClasses_1.useButtonClasses(state);
15
- useToggleButtonClasses_1.useToggleButtonClasses(state);
16
- react_theme_provider_1.useInlineTokens(state, '--button');
17
- return render(state);
18
+
19
+
20
+ exports.ToggleButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
21
+ var state = useToggleButton_1.useToggleButton(props, ref);
22
+ useToggleButtonStyles_1.useToggleButtonStyles(state);
23
+ return renderToggleButton_1.renderToggleButton(state); // Casting is required due to lack of distributive union to support unions on @types/react
18
24
  });
19
25
  exports.ToggleButton.displayName = 'ToggleButton';
20
26
  //# sourceMappingURL=ToggleButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleButton.js","sourceRoot":"../src/","sources":["components/ToggleButton/ToggleButton.tsx"],"names":[],"mappings":";;AAAA,6BAA+B;AAE/B,qDAAoD;AACpD,uEAAiE;AACjE,+DAA8D;AAC9D,mEAAkE;AAElE;;;GAGG;AACU,QAAA,YAAY,GAAG,KAAK,CAAC,UAAU,CAAiC,UAAC,KAAK,EAAE,GAAG;IAChF,IAAA,kDAA+C,EAA7C,kBAAM,EAAE,gBAAqC,CAAC;IAEtD,mCAAgB,CAAC,KAAK,CAAC,CAAC;IACxB,+CAAsB,CAAC,KAAK,CAAC,CAAC;IAC9B,sCAAe,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAEnC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;AACvB,CAAC,CAAC,CAAC;AAEH,oBAAY,CAAC,WAAW,GAAG,cAAc,CAAC","sourcesContent":["import * as React from 'react';\nimport { ToggleButtonProps } from './ToggleButton.types';\nimport { useToggleButton } from './useToggleButton';\nimport { useInlineTokens } from '@fluentui/react-theme-provider';\nimport { useButtonClasses } from '../Button/useButtonClasses';\nimport { useToggleButtonClasses } from './useToggleButtonClasses';\n\n/**\n * Define a styled ToggleButton, using the `useToggleButton` hook.\n * {@docCategory Button}\n */\nexport const ToggleButton = React.forwardRef<HTMLElement, ToggleButtonProps>((props, ref) => {\n const { render, state } = useToggleButton(props, ref);\n\n useButtonClasses(state);\n useToggleButtonClasses(state);\n useInlineTokens(state, '--button');\n\n return render(state);\n});\n\nToggleButton.displayName = 'ToggleButton';\n"]}
1
+ {"version":3,"sources":["../../../src/components/ToggleButton/ToggleButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,oBAAA,gBAAA,OAAA,CAAA,sBAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AACA,IAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,YAAA,gBAAuD,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AAC9F,MAAM,KAAK,GAAG,iBAAA,CAAA,eAAA,CAAgB,KAAhB,EAAuB,GAAvB,CAAd;AAEA,EAAA,uBAAA,CAAA,qBAAA,CAAsB,KAAtB;AAEA,SAAO,oBAAA,CAAA,kBAAA,CAAmB,KAAnB,CAAP,CAL8F,CAM9F;AACD,CAPmE,CAAvD;AASb,OAAA,CAAA,YAAA,CAAa,WAAb,GAA2B,cAA3B","sourceRoot":""}
@@ -1,25 +1,19 @@
1
- import { ButtonProps, ButtonTokens, ButtonVariants } from '../Button/Button.types';
2
- /**
3
- * {@docCategory Button}
4
- */
5
- export interface ToggleButtonProps extends ButtonProps {
1
+ import type { ButtonProps, ButtonState } from '../Button/Button.types';
2
+ export declare type ToggleButtonCommons = {
6
3
  /**
7
4
  * Defines the controlled checked state of the `ToggleButton`.
8
- * Mutually exclusive to `defaultChecked`.
5
+ * If passed, `ToggleButton` ignores the `defaultChecked` property.
9
6
  * This should only be used if the checked state is to be controlled at a higher level and there is a plan to pass the
10
7
  * correct value based on handling `onClick` events and re-rendering.
8
+ * @default false
11
9
  */
12
- checked?: boolean;
10
+ checked: boolean;
11
+ };
12
+ export declare type ToggleButtonProps = ButtonProps & Partial<ToggleButtonCommons> & {
13
13
  /**
14
- * Defines whether the `ToggleButton` is inititally in a checked state or not when rendered.
15
- * Mutually exclusive to `checked`.
14
+ * Defines whether the `ToggleButton` is initially in a checked state or not when rendered.
15
+ * @default false
16
16
  */
17
17
  defaultChecked?: boolean;
18
- }
19
- /**
20
- * {@docCategory Button}
21
- */
22
- export interface ToggleButtonState extends ToggleButtonProps {
23
- }
24
- export declare type ToggleButtonTokens = ButtonTokens;
25
- export declare type ToggleButtonVariants = ButtonVariants<ToggleButtonTokens>;
18
+ };
19
+ export declare type ToggleButtonState = ButtonState & ToggleButtonCommons;
@@ -1,3 +1,6 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
3
6
  //# sourceMappingURL=ToggleButton.types.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleButton.types.js","sourceRoot":"../src/","sources":["components/ToggleButton/ToggleButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import { ButtonProps, ButtonTokens, ButtonVariants } from '../Button/Button.types';\n\n/**\n * {@docCategory Button}\n */\nexport interface ToggleButtonProps extends ButtonProps {\n /**\n * Defines the controlled checked state of the `ToggleButton`.\n * Mutually exclusive to `defaultChecked`.\n * This should only be used if the checked state is to be controlled at a higher level and there is a plan to pass the\n * correct value based on handling `onClick` events and re-rendering.\n */\n checked?: boolean;\n\n /**\n * Defines whether the `ToggleButton` is inititally in a checked state or not when rendered.\n * Mutually exclusive to `checked`.\n */\n defaultChecked?: boolean;\n}\n\n/**\n * {@docCategory Button}\n */\nexport interface ToggleButtonState extends ToggleButtonProps {}\n\nexport type ToggleButtonTokens = ButtonTokens;\n\nexport type ToggleButtonVariants = ButtonVariants<ToggleButtonTokens>;\n"]}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
@@ -1,5 +1,5 @@
1
+ export * from './ToggleButton';
1
2
  export * from './ToggleButton.types';
3
+ export * from './renderToggleButton';
2
4
  export * from './useToggleButton';
3
- export * from './useToggleButtonClasses';
4
- export * from './ToggleButton';
5
- export * from './useChecked';
5
+ export { useToggleButtonStyles } from './useToggleButtonStyles';
@@ -1,8 +1,26 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./useToggleButton"), exports);
5
- tslib_1.__exportStar(require("./useToggleButtonClasses"), exports);
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useToggleButtonStyles = void 0;
7
+
8
+ var tslib_1 = /*#__PURE__*/require("tslib");
9
+
6
10
  tslib_1.__exportStar(require("./ToggleButton"), exports);
7
- tslib_1.__exportStar(require("./useChecked"), exports);
11
+
12
+ tslib_1.__exportStar(require("./ToggleButton.types"), exports);
13
+
14
+ tslib_1.__exportStar(require("./renderToggleButton"), exports);
15
+
16
+ tslib_1.__exportStar(require("./useToggleButton"), exports);
17
+
18
+ var useToggleButtonStyles_1 = /*#__PURE__*/require("./useToggleButtonStyles");
19
+
20
+ Object.defineProperty(exports, "useToggleButtonStyles", {
21
+ enumerable: true,
22
+ get: function () {
23
+ return useToggleButtonStyles_1.useToggleButtonStyles;
24
+ }
25
+ });
8
26
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/ToggleButton/index.ts"],"names":[],"mappings":";;;AACA,4DAAkC;AAClC,mEAAyC;AACzC,yDAA+B;AAC/B,uDAA6B","sourcesContent":["export * from './ToggleButton.types';\nexport * from './useToggleButton';\nexport * from './useToggleButtonClasses';\nexport * from './ToggleButton';\nexport * from './useChecked';\n"]}
1
+ {"version":3,"sources":["../../../src/components/ToggleButton/index.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,IAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,uBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,uBAAA,CAAA,qBAAA;AAAqB;AAArB,CAAA","sourceRoot":""}
@@ -0,0 +1 @@
1
+ export { renderButton as renderToggleButton } from '../Button/renderButton';
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.renderToggleButton = void 0;
7
+
8
+ var renderButton_1 = /*#__PURE__*/require("../Button/renderButton");
9
+
10
+ Object.defineProperty(exports, "renderToggleButton", {
11
+ enumerable: true,
12
+ get: function () {
13
+ return renderButton_1.renderButton;
14
+ }
15
+ });
16
+ //# sourceMappingURL=renderToggleButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/ToggleButton/renderToggleButton.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,cAAA,gBAAA,OAAA,CAAA,wBAAA,CAAA;;AAAS,MAAA,CAAA,cAAA,CAAA,OAAA,EAAA,oBAAA,EAAA;AAAA,EAAA,UAAA,EAAA,IAAA;AAAA,EAAA,GAAA,EAAA,YAAA;AAAA,WAAA,cAAA,CAAA,YAAA;AAAY;AAAZ,CAAA","sourceRoot":""}
@@ -1,6 +1,9 @@
1
1
  import * as React from 'react';
2
- import { ToggleButtonProps } from './ToggleButton.types';
3
- export declare const useToggleButton: (props: ToggleButtonProps, ref: React.Ref<HTMLElement>, defaultProps?: ToggleButtonProps | undefined) => {
4
- state: Record<string, any>;
5
- render: (state: import("../Button").ButtonState) => JSX.Element;
6
- };
2
+ import type { ToggleButtonProps, ToggleButtonState } from './ToggleButton.types';
3
+ /**
4
+ * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns
5
+ * processed state.
6
+ * @param props - User provided props to the ToggleButton component.
7
+ * @param ref - User provided ref to be passed to the ToggleButton component.
8
+ */
9
+ export declare const useToggleButton: ({ checked, defaultChecked, ...props }: ToggleButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) => ToggleButtonState;
@@ -1,10 +1,63 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var useButton_1 = require("../Button/useButton");
4
- var useChecked_1 = require("./useChecked");
5
- exports.useToggleButton = function (props, ref, defaultProps) {
6
- var buttonDefinition = useButton_1.useButton(props, ref, defaultProps);
7
- useChecked_1.useChecked(buttonDefinition.state);
8
- return buttonDefinition;
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useToggleButton = void 0;
7
+
8
+ var tslib_1 = /*#__PURE__*/require("tslib");
9
+
10
+ var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
+
12
+ var React = /*#__PURE__*/require("react");
13
+
14
+ var useButton_1 = /*#__PURE__*/require("../Button/useButton");
15
+ /**
16
+ * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns
17
+ * processed state.
18
+ * @param props - User provided props to the ToggleButton component.
19
+ * @param ref - User provided ref to be passed to the ToggleButton component.
20
+ */
21
+
22
+
23
+ var useToggleButton = function (_a, ref) {
24
+ var _b;
25
+
26
+ var checked = _a.checked,
27
+ defaultChecked = _a.defaultChecked,
28
+ props = tslib_1.__rest(_a, ["checked", "defaultChecked"]);
29
+
30
+ var buttonState = useButton_1.useButton(props, ref);
31
+ var _c = buttonState.root,
32
+ role = _c.role,
33
+ onClick = _c.onClick;
34
+
35
+ var _d = react_utilities_1.useControllableState({
36
+ state: checked,
37
+ defaultState: defaultChecked,
38
+ initialState: false
39
+ }),
40
+ checkedValue = _d[0],
41
+ setCheckedValue = _d[1];
42
+
43
+ var isCheckboxTypeRole = role === 'menuitemcheckbox' || role === 'checkbox';
44
+ return tslib_1.__assign(tslib_1.__assign({}, buttonState), {
45
+ // State calculated from a set of props
46
+ checked: checkedValue,
47
+ // Slots definition
48
+ root: tslib_1.__assign(tslib_1.__assign({}, buttonState.root), (_b = {}, _b[isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed'] = !!checkedValue, _b.onClick = React.useCallback(function (ev) {
49
+ if (onClick) {
50
+ onClick(ev);
51
+
52
+ if (ev.defaultPrevented) {
53
+ return;
54
+ }
55
+ }
56
+
57
+ setCheckedValue(!checkedValue);
58
+ }, [checkedValue, setCheckedValue, onClick]), _b))
59
+ });
9
60
  };
61
+
62
+ exports.useToggleButton = useToggleButton;
10
63
  //# sourceMappingURL=useToggleButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"useToggleButton.js","sourceRoot":"../src/","sources":["components/ToggleButton/useToggleButton.tsx"],"names":[],"mappings":";;AACA,iDAAgD;AAEhD,2CAA0C;AAE7B,QAAA,eAAe,GAAG,UAC7B,KAAwB,EACxB,GAA2B,EAC3B,YAAgC;IAEhC,IAAM,gBAAgB,GAAG,qBAAS,CAAC,KAAK,EAAE,GAAG,EAAE,YAAY,CAAC,CAAC;IAE7D,uBAAU,CAAC,gBAAgB,CAAC,KAA0B,CAAC,CAAC;IAExD,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC","sourcesContent":["import * as React from 'react';\nimport { useButton } from '../Button/useButton';\nimport { ToggleButtonProps } from './ToggleButton.types';\nimport { useChecked } from './useChecked';\n\nexport const useToggleButton = (\n props: ToggleButtonProps,\n ref: React.Ref<HTMLElement>,\n defaultProps?: ToggleButtonProps,\n) => {\n const buttonDefinition = useButton(props, ref, defaultProps);\n\n useChecked(buttonDefinition.state as ToggleButtonProps);\n\n return buttonDefinition;\n};\n"]}
1
+ {"version":3,"sources":["../../../src/components/ToggleButton/useToggleButton.ts"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,WAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;AAGA;;;;;AAKG;;;AACI,IAAM,eAAe,GAAG,UAC7B,EAD6B,EAE7B,GAF6B,EAEwB;;;AADnD,MAAA,OAAO,GAAA,EAAA,CAAA,OAAP;AAAA,MAAS,cAAc,GAAA,EAAA,CAAA,cAAvB;AAAA,MAA4B,KAAK,GAAA,OAAA,CAAA,MAAA,CAAA,EAAA,EAAnC,CAAA,SAAA,EAAA,gBAAA,CAAmC,CAAjC;;AAGF,MAAM,WAAW,GAAG,WAAA,CAAA,SAAA,CAAU,KAAV,EAAiB,GAAjB,CAApB;AACM,MAAA,EAAA,GAAoB,WAAW,CAAC,IAAhC;AAAA,MAAE,IAAI,GAAA,EAAA,CAAA,IAAN;AAAA,MAAQ,OAAO,GAAA,EAAA,CAAA,OAAf;;AAEA,MAAA,EAAA,GAAkC,iBAAA,CAAA,oBAAA,CAAqB;AAC3D,IAAA,KAAK,EAAE,OADoD;AAE3D,IAAA,YAAY,EAAE,cAF6C;AAG3D,IAAA,YAAY,EAAE;AAH6C,GAArB,CAAlC;AAAA,MAAC,YAAY,GAAA,EAAA,CAAA,CAAA,CAAb;AAAA,MAAe,eAAe,GAAA,EAAA,CAAA,CAAA,CAA9B;;AAMN,MAAM,kBAAkB,GAAG,IAAI,KAAK,kBAAT,IAA+B,IAAI,KAAK,UAAnE;AAEA,SAAA,OAAA,CAAA,QAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,EAEK,WAFL,CAAA,EAEgB;AAEd;AACA,IAAA,OAAO,EAAE,YAHK;AAKd;AACA,IAAA,IAAI,EAAA,OAAA,CAAA,QAAA,CAAA,OAAA,CAAA,QAAA,CAAA,EAAA,EACC,WAAW,CAAC,IADb,CAAA,GACiB,EAAA,GAAA,EAAA,EAAA,EAAA,CAClB,kBAAkB,GAAG,cAAH,GAAoB,cADpB,CAAA,GACqC,CAAC,CAAC,YADvC,EAEnB,EAAA,CAAA,OAAA,GAAS,KAAK,CAAC,WAAN,CACP,UAAA,EAAA,EAAE;AACA,UAAI,OAAJ,EAAa;AACX,QAAA,OAAO,CAAC,EAAD,CAAP;;AAEA,YAAI,EAAE,CAAC,gBAAP,EAAyB;AACvB;AACD;AACF;;AAED,MAAA,eAAe,CAAC,CAAC,YAAF,CAAf;AACD,KAXM,EAYP,CAAC,YAAD,EAAe,eAAf,EAAgC,OAAhC,CAZO,CAFU,EAelB,EAhBC;AANU,GAFhB,CAAA;AA2BD,CA1CM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf","sourceRoot":""}
@@ -0,0 +1,2 @@
1
+ import type { ToggleButtonState } from './ToggleButton.types';
2
+ export declare const useToggleButtonStyles: (state: ToggleButtonState) => ToggleButtonState;
@@ -0,0 +1,200 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useToggleButtonStyles = void 0;
7
+
8
+ var react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
9
+
10
+ var useButtonStyles_1 = /*#__PURE__*/require("../Button/useButtonStyles");
11
+
12
+ var useCheckedStyles = /*#__PURE__*/react_make_styles_1.__styles({
13
+ "base": {
14
+ "ayd6f0": "fg85c1j",
15
+ "g2u3we": "fj3muxo",
16
+ "h3c5rm": ["f1akhkt", "f1lxtadh"],
17
+ "B9xav0g": "f1aperda",
18
+ "zhjwy3": ["f1lxtadh", "f1akhkt"],
19
+ "sj55zd": "f19n0e5",
20
+ "B4j52fo": "f192inf7",
21
+ "Bekrc4i": ["f5tn483", "f1ojsxk5"],
22
+ "Bn0qgzm": "f1vxd6vx",
23
+ "ibv6hh": ["f1ojsxk5", "f5tn483"],
24
+ "v4pbla": "f56u8ty",
25
+ "Bgoe8wy": "fvcxoqz",
26
+ "Bwzppfd": ["f1ub3y4t", "f1m52nbi"],
27
+ "oetu4i": "f1xlaoq0",
28
+ "gg5e9n": ["f1m52nbi", "f1ub3y4t"],
29
+ "Bi91k9c": "fax3udt",
30
+ "vv34bc": "fzgy25m",
31
+ "B6oc9vd": "fvs00aa",
32
+ "ak43y8": ["f1assf6x", "f4ruux4"],
33
+ "wmxk5l": "fumykes",
34
+ "B50zh58": ["f4ruux4", "f1assf6x"],
35
+ "lj723h": "f1r2dosr"
36
+ },
37
+ "outline": {
38
+ "ayd6f0": "f6r4cvw",
39
+ "v4pbla": "f62j56f",
40
+ "vv34bc": "flt377r"
41
+ },
42
+ "primary": {
43
+ "ayd6f0": "fvinvdn",
44
+ "g2u3we": "f1p3nwhy",
45
+ "h3c5rm": ["f11589ue", "f1pdflbu"],
46
+ "B9xav0g": "f1q5o8ev",
47
+ "zhjwy3": ["f1pdflbu", "f11589ue"],
48
+ "sj55zd": "f1phragk",
49
+ "v4pbla": "f1fitrdm",
50
+ "Bgoe8wy": "f1s2uweq",
51
+ "Bwzppfd": ["fr80ssc", "fecsdlb"],
52
+ "oetu4i": "f1ukrpxl",
53
+ "gg5e9n": ["fecsdlb", "fr80ssc"],
54
+ "Bi91k9c": "f1rq72xc",
55
+ "vv34bc": "f4ihffn",
56
+ "B6oc9vd": "ff472gp",
57
+ "ak43y8": ["f4yyc7m", "ft2aflc"],
58
+ "wmxk5l": "fggejwh",
59
+ "B50zh58": ["ft2aflc", "f4yyc7m"],
60
+ "lj723h": "f18otbis"
61
+ },
62
+ "subtle": {
63
+ "ayd6f0": "f1n839y3",
64
+ "g2u3we": "f1p3nwhy",
65
+ "h3c5rm": ["f11589ue", "f1pdflbu"],
66
+ "B9xav0g": "f1q5o8ev",
67
+ "zhjwy3": ["f1pdflbu", "f11589ue"],
68
+ "sj55zd": "f1qj7y59",
69
+ "v4pbla": "f4wzgrt",
70
+ "Bgoe8wy": "f1s2uweq",
71
+ "Bwzppfd": ["fr80ssc", "fecsdlb"],
72
+ "oetu4i": "f1ukrpxl",
73
+ "gg5e9n": ["fecsdlb", "fr80ssc"],
74
+ "Bi91k9c": "f139oj5f",
75
+ "vv34bc": "f1be4e1d",
76
+ "B6oc9vd": "ff472gp",
77
+ "ak43y8": ["f4yyc7m", "ft2aflc"],
78
+ "wmxk5l": "fggejwh",
79
+ "B50zh58": ["ft2aflc", "f4yyc7m"],
80
+ "lj723h": "f19au66r"
81
+ },
82
+ "transparent": {
83
+ "ayd6f0": "f6r4cvw",
84
+ "g2u3we": "f1p3nwhy",
85
+ "h3c5rm": ["f11589ue", "f1pdflbu"],
86
+ "B9xav0g": "f1q5o8ev",
87
+ "zhjwy3": ["f1pdflbu", "f11589ue"],
88
+ "sj55zd": "f1qj7y59",
89
+ "v4pbla": "f62j56f",
90
+ "Bgoe8wy": "f1s2uweq",
91
+ "Bwzppfd": ["fr80ssc", "fecsdlb"],
92
+ "oetu4i": "f1ukrpxl",
93
+ "gg5e9n": ["fecsdlb", "fr80ssc"],
94
+ "Bi91k9c": "f139oj5f",
95
+ "vv34bc": "flt377r",
96
+ "B6oc9vd": "ff472gp",
97
+ "ak43y8": ["f4yyc7m", "ft2aflc"],
98
+ "wmxk5l": "fggejwh",
99
+ "B50zh58": ["ft2aflc", "f4yyc7m"],
100
+ "lj723h": "f19au66r"
101
+ }
102
+ }, {
103
+ "d": [".fg85c1j{background:var(--colorNeutralBackground1Selected);}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".f6r4cvw{background:var(--colorTransparentBackgroundSelected);}", ".fvinvdn{background:var(--colorBrandBackgroundSelected);}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", ".f1n839y3{background:var(--colorSubtleBackgroundSelected);}", ".f1qj7y59{color:var(--colorNeutralForeground2BrandSelected);}"],
104
+ "h": [".f56u8ty:hover{background:var(--colorNeutralBackground1Hover);}", ".fvcxoqz:hover{border-top-color:var(--colorNeutralStroke1Hover);}", ".f1ub3y4t:hover{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1m52nbi:hover{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1xlaoq0:hover{border-bottom-color:var(--colorNeutralStroke1Hover);}", ".fax3udt:hover{color:var(--colorNeutralForeground1);}", ".f62j56f:hover{background:var(--colorTransparentBackgroundHover);}", ".f1fitrdm:hover{background:var(--colorBrandBackgroundHover);}", ".f1s2uweq:hover{border-top-color:transparent;}", ".fr80ssc:hover{border-right-color:transparent;}", ".fecsdlb:hover{border-left-color:transparent;}", ".f1ukrpxl:hover{border-bottom-color:transparent;}", ".f1rq72xc:hover{color:var(--colorNeutralForegroundOnBrand);}", ".f4wzgrt:hover{background:var(--colorSubtleBackgroundHover);}", ".f139oj5f:hover{color:var(--colorNeutralForeground2BrandHover);}"],
105
+ "a": [".fzgy25m:active{background:var(--colorNeutralBackground1Pressed);}", ".fvs00aa:active{border-top-color:var(--colorNeutralStroke1Pressed);}", ".f1assf6x:active{border-right-color:var(--colorNeutralStroke1Pressed);}", ".f4ruux4:active{border-left-color:var(--colorNeutralStroke1Pressed);}", ".fumykes:active{border-bottom-color:var(--colorNeutralStroke1Pressed);}", ".f1r2dosr:active{color:var(--colorNeutralForeground1);}", ".flt377r:active{background:var(--colorTransparentBackgroundPressed);}", ".f4ihffn:active{background:var(--colorBrandBackgroundPressed);}", ".ff472gp:active{border-top-color:transparent;}", ".f4yyc7m:active{border-right-color:transparent;}", ".ft2aflc:active{border-left-color:transparent;}", ".fggejwh:active{border-bottom-color:transparent;}", ".f18otbis:active{color:var(--colorNeutralForegroundOnBrand);}", ".f1be4e1d:active{background:var(--colorSubtleBackgroundPressed);}", ".f19au66r:active{color:var(--colorNeutralForeground2BrandPressed);}"]
106
+ });
107
+
108
+ var useDisabledStyles = /*#__PURE__*/react_make_styles_1.__styles({
109
+ "base": {
110
+ "ayd6f0": "fqst6tg",
111
+ "g2u3we": "f1jj8ep1",
112
+ "h3c5rm": ["f15xbau", "fy0fskl"],
113
+ "B9xav0g": "f4ikngz",
114
+ "zhjwy3": ["fy0fskl", "f15xbau"],
115
+ "sj55zd": "f1s2aq7o",
116
+ "v4pbla": "f1nil5o8",
117
+ "Bgoe8wy": "f12mpcsy",
118
+ "Bwzppfd": ["f1gwvigk", "f18rmfxp"],
119
+ "oetu4i": "f1jnshp0",
120
+ "gg5e9n": ["f18rmfxp", "f1gwvigk"],
121
+ "Bi91k9c": "fvgxktp",
122
+ "vv34bc": "fkqx3al",
123
+ "B6oc9vd": "fdi4vxw",
124
+ "ak43y8": ["f4ryxzl", "fkdgpbx"],
125
+ "wmxk5l": "fcmhn06",
126
+ "B50zh58": ["fkdgpbx", "f4ryxzl"],
127
+ "lj723h": "f19wldhg"
128
+ },
129
+ "outline": {},
130
+ "primary": {
131
+ "g2u3we": "f1p3nwhy",
132
+ "h3c5rm": ["f11589ue", "f1pdflbu"],
133
+ "B9xav0g": "f1q5o8ev",
134
+ "zhjwy3": ["f1pdflbu", "f11589ue"],
135
+ "Bgoe8wy": "f1s2uweq",
136
+ "Bwzppfd": ["fr80ssc", "fecsdlb"],
137
+ "oetu4i": "f1ukrpxl",
138
+ "gg5e9n": ["fecsdlb", "fr80ssc"],
139
+ "B6oc9vd": "ff472gp",
140
+ "ak43y8": ["f4yyc7m", "ft2aflc"],
141
+ "wmxk5l": "fggejwh",
142
+ "B50zh58": ["ft2aflc", "f4yyc7m"]
143
+ },
144
+ "subtle": {
145
+ "ayd6f0": "f1k2sg7s",
146
+ "g2u3we": "f1p3nwhy",
147
+ "h3c5rm": ["f11589ue", "f1pdflbu"],
148
+ "B9xav0g": "f1q5o8ev",
149
+ "zhjwy3": ["f1pdflbu", "f11589ue"],
150
+ "v4pbla": "f1vc35iv",
151
+ "Bgoe8wy": "f1s2uweq",
152
+ "Bwzppfd": ["fr80ssc", "fecsdlb"],
153
+ "oetu4i": "f1ukrpxl",
154
+ "gg5e9n": ["fecsdlb", "fr80ssc"],
155
+ "vv34bc": "f17oliv9",
156
+ "B6oc9vd": "ff472gp",
157
+ "ak43y8": ["f4yyc7m", "ft2aflc"],
158
+ "wmxk5l": "fggejwh",
159
+ "B50zh58": ["ft2aflc", "f4yyc7m"]
160
+ },
161
+ "transparent": {
162
+ "ayd6f0": "f1k2sg7s",
163
+ "g2u3we": "f1p3nwhy",
164
+ "h3c5rm": ["f11589ue", "f1pdflbu"],
165
+ "B9xav0g": "f1q5o8ev",
166
+ "zhjwy3": ["f1pdflbu", "f11589ue"],
167
+ "v4pbla": "f1vc35iv",
168
+ "Bgoe8wy": "f1s2uweq",
169
+ "Bwzppfd": ["fr80ssc", "fecsdlb"],
170
+ "oetu4i": "f1ukrpxl",
171
+ "gg5e9n": ["fecsdlb", "fr80ssc"],
172
+ "vv34bc": "f17oliv9",
173
+ "B6oc9vd": "ff472gp",
174
+ "ak43y8": ["f4yyc7m", "ft2aflc"],
175
+ "wmxk5l": "fggejwh",
176
+ "B50zh58": ["ft2aflc", "f4yyc7m"]
177
+ }
178
+ }, {
179
+ "d": [".fqst6tg{background:var(--colorNeutralBackgroundDisabled);}", ".f1jj8ep1{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f15xbau{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fy0fskl{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f4ikngz{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".f1s2aq7o{color:var(--colorNeutralForegroundDisabled);}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f1k2sg7s{background:none;}"],
180
+ "h": [".f1nil5o8:hover{background:var(--colorNeutralBackgroundDisabled);}", ".f12mpcsy:hover{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f1gwvigk:hover{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f18rmfxp:hover{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f1jnshp0:hover{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".fvgxktp:hover{color:var(--colorNeutralForegroundDisabled);}", ".f1s2uweq:hover{border-top-color:transparent;}", ".fr80ssc:hover{border-right-color:transparent;}", ".fecsdlb:hover{border-left-color:transparent;}", ".f1ukrpxl:hover{border-bottom-color:transparent;}", ".f1vc35iv:hover{background:none;}"],
181
+ "a": [".fkqx3al:active{background:var(--colorNeutralBackgroundDisabled);}", ".fdi4vxw:active{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f4ryxzl:active{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fkdgpbx:active{border-left-color:var(--colorNeutralStrokeDisabled);}", ".fcmhn06:active{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".f19wldhg:active{color:var(--colorNeutralForegroundDisabled);}", ".ff472gp:active{border-top-color:transparent;}", ".f4yyc7m:active{border-right-color:transparent;}", ".ft2aflc:active{border-left-color:transparent;}", ".fggejwh:active{border-bottom-color:transparent;}", ".f17oliv9:active{background:none;}"]
182
+ });
183
+
184
+ var useToggleButtonStyles = function (state) {
185
+ var checkedStyles = useCheckedStyles();
186
+ var disabledStyles = useDisabledStyles();
187
+ var appearance = state.appearance,
188
+ checked = state.checked,
189
+ disabled = state.disabled,
190
+ disabledFocusable = state.disabledFocusable;
191
+ state.root.className = react_make_styles_1.mergeClasses( // Checked styles
192
+ checked && checkedStyles.base, appearance && checked && checkedStyles[appearance], // Disabled styles
193
+ (disabled || disabledFocusable) && disabledStyles.base, appearance && (disabled || disabledFocusable) && disabledStyles[appearance], // User provided class name
194
+ state.root.className);
195
+ useButtonStyles_1.useButtonStyles(state);
196
+ return state;
197
+ };
198
+
199
+ exports.useToggleButtonStyles = useToggleButtonStyles;
200
+ //# sourceMappingURL=useToggleButtonStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/ToggleButton/useToggleButtonStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGA,IAAM,gBAAgB,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAzB;;AAuFA,IAAM,iBAAiB,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAA1B;;AAiEO,IAAM,qBAAqB,GAAG,UAAC,KAAD,EAAyB;AAC5D,MAAM,aAAa,GAAG,gBAAgB,EAAtC;AACA,MAAM,cAAc,GAAG,iBAAiB,EAAxC;AAEQ,MAAA,UAAU,GAA2C,KAAK,CAAhD,UAAV;AAAA,MAAY,OAAO,GAAkC,KAAK,CAAvC,OAAnB;AAAA,MAAqB,QAAQ,GAAwB,KAAK,CAA7B,QAA7B;AAAA,MAA+B,iBAAiB,GAAK,KAAK,CAAV,iBAAhD;AAER,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,EACrB;AACA,EAAA,OAAO,IAAI,aAAa,CAAC,IAFJ,EAGrB,UAAU,IAAI,OAAd,IAAyB,aAAa,CAAC,UAAD,CAHjB,EAKrB;AACA,GAAC,QAAQ,IAAI,iBAAb,KAAmC,cAAc,CAAC,IAN7B,EAOrB,UAAU,KAAK,QAAQ,IAAI,iBAAjB,CAAV,IAAiD,cAAc,CAAC,UAAD,CAP1C,EASrB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAVU,CAAvB;AAaA,EAAA,iBAAA,CAAA,eAAA,CAAgB,KAAhB;AAEA,SAAO,KAAP;AACD,CAtBM;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourceRoot":""}
@@ -1,4 +1,3 @@
1
- import './version';
2
1
  export * from './Button';
3
2
  export * from './CompoundButton';
4
3
  export * from './MenuButton';
@@ -1,10 +1,18 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- var tslib_1 = require("tslib");
4
- require("./version");
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+
7
+ var tslib_1 = /*#__PURE__*/require("tslib");
8
+
5
9
  tslib_1.__exportStar(require("./Button"), exports);
10
+
6
11
  tslib_1.__exportStar(require("./CompoundButton"), exports);
12
+
7
13
  tslib_1.__exportStar(require("./MenuButton"), exports);
14
+
8
15
  tslib_1.__exportStar(require("./SplitButton"), exports);
16
+
9
17
  tslib_1.__exportStar(require("./ToggleButton"), exports);
10
18
  //# sourceMappingURL=index.js.map