@fluentui/react-button 9.0.0-alpha.10 → 9.0.0-alpha.100

Sign up to get free protection for your applications and to get access to all the features.
Files changed (270) hide show
  1. package/CHANGELOG.json +2418 -1
  2. package/CHANGELOG.md +920 -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 +204 -82
  8. package/lib/Button.js.map +1 -1
  9. package/lib/CompoundButton.d.ts +1 -0
  10. package/lib/CompoundButton.js +2 -0
  11. package/lib/CompoundButton.js.map +1 -0
  12. package/lib/MenuButton.d.ts +1 -0
  13. package/lib/MenuButton.js +2 -0
  14. package/lib/MenuButton.js.map +1 -0
  15. package/lib/SplitButton.d.ts +1 -0
  16. package/lib/SplitButton.js +2 -0
  17. package/lib/SplitButton.js.map +1 -0
  18. package/lib/ToggleButton.d.ts +1 -0
  19. package/lib/ToggleButton.js +2 -0
  20. package/lib/ToggleButton.js.map +1 -0
  21. package/lib/common/isConformant.d.ts +4 -2
  22. package/lib/common/isConformant.js +9 -6
  23. package/lib/common/isConformant.js.map +1 -1
  24. package/lib/components/Button/Button.d.ts +4 -11
  25. package/lib/components/Button/Button.js +7 -16
  26. package/lib/components/Button/Button.js.map +1 -1
  27. package/lib/components/Button/Button.types.d.ts +57 -60
  28. package/lib/components/Button/Button.types.js +1 -0
  29. package/lib/components/Button/Button.types.js.map +1 -1
  30. package/lib/components/Button/index.d.ts +1 -2
  31. package/lib/components/Button/index.js +1 -1
  32. package/lib/components/Button/index.js.map +1 -1
  33. package/lib/components/Button/renderButton.d.ts +2 -2
  34. package/lib/components/Button/renderButton.js +9 -8
  35. package/lib/components/Button/renderButton.js.map +1 -1
  36. package/lib/components/Button/useButton.d.ts +5 -7
  37. package/lib/components/Button/useButton.js +49 -23
  38. package/lib/components/Button/useButton.js.map +1 -1
  39. package/lib/components/Button/useButtonStyles.d.ts +10 -4
  40. package/lib/components/Button/useButtonStyles.js +350 -378
  41. package/lib/components/Button/useButtonStyles.js.map +1 -1
  42. package/lib/components/CompoundButton/CompoundButton.d.ts +6 -0
  43. package/lib/components/CompoundButton/CompoundButton.js +15 -0
  44. package/lib/components/CompoundButton/CompoundButton.js.map +1 -0
  45. package/lib/components/CompoundButton/CompoundButton.types.d.ts +14 -0
  46. package/lib/components/CompoundButton/CompoundButton.types.js +2 -0
  47. package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -0
  48. package/lib/components/CompoundButton/index.d.ts +5 -0
  49. package/lib/components/CompoundButton/index.js +6 -0
  50. package/lib/components/CompoundButton/index.js.map +1 -0
  51. package/lib/components/CompoundButton/renderCompoundButton.d.ts +5 -0
  52. package/lib/components/CompoundButton/renderCompoundButton.js +17 -0
  53. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -0
  54. package/lib/components/CompoundButton/useCompoundButton.d.ts +8 -0
  55. package/lib/components/CompoundButton/useCompoundButton.js +29 -0
  56. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -0
  57. package/lib/components/CompoundButton/useCompoundButtonStyles.d.ts +2 -0
  58. package/lib/components/CompoundButton/useCompoundButtonStyles.js +164 -0
  59. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -0
  60. package/lib/components/MenuButton/MenuButton.d.ts +6 -0
  61. package/lib/components/MenuButton/MenuButton.js +15 -0
  62. package/lib/components/MenuButton/MenuButton.js.map +1 -0
  63. package/lib/components/MenuButton/MenuButton.types.d.ts +11 -0
  64. package/lib/components/MenuButton/MenuButton.types.js +2 -0
  65. package/lib/components/MenuButton/MenuButton.types.js.map +1 -0
  66. package/lib/components/MenuButton/index.d.ts +5 -0
  67. package/lib/components/MenuButton/index.js +6 -0
  68. package/lib/components/MenuButton/index.js.map +1 -0
  69. package/lib/components/MenuButton/renderMenuButton.d.ts +5 -0
  70. package/lib/components/MenuButton/renderMenuButton.js +17 -0
  71. package/lib/components/MenuButton/renderMenuButton.js.map +1 -0
  72. package/lib/components/MenuButton/useMenuButton.d.ts +6 -0
  73. package/lib/components/MenuButton/useMenuButton.js +32 -0
  74. package/lib/components/MenuButton/useMenuButton.js.map +1 -0
  75. package/lib/components/MenuButton/useMenuButtonStyles.d.ts +2 -0
  76. package/lib/components/MenuButton/useMenuButtonStyles.js +34 -0
  77. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -0
  78. package/lib/components/SplitButton/SplitButton.d.ts +7 -0
  79. package/lib/components/SplitButton/SplitButton.js +16 -0
  80. package/lib/components/SplitButton/SplitButton.js.map +1 -0
  81. package/lib/components/SplitButton/SplitButton.types.d.ts +19 -0
  82. package/lib/components/SplitButton/SplitButton.types.js +2 -0
  83. package/lib/components/SplitButton/SplitButton.types.js.map +1 -0
  84. package/lib/components/SplitButton/index.d.ts +5 -0
  85. package/lib/components/SplitButton/index.js +6 -0
  86. package/lib/components/SplitButton/index.js.map +1 -0
  87. package/lib/components/SplitButton/renderSplitButton.d.ts +5 -0
  88. package/lib/components/SplitButton/renderSplitButton.js +15 -0
  89. package/lib/components/SplitButton/renderSplitButton.js.map +1 -0
  90. package/lib/components/SplitButton/useSplitButton.d.ts +8 -0
  91. package/lib/components/SplitButton/useSplitButton.js +73 -0
  92. package/lib/components/SplitButton/useSplitButton.js.map +1 -0
  93. package/lib/components/SplitButton/useSplitButtonStyles.d.ts +2 -0
  94. package/lib/components/SplitButton/useSplitButtonStyles.js +77 -0
  95. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -0
  96. package/lib/components/ToggleButton/ToggleButton.d.ts +6 -0
  97. package/lib/components/ToggleButton/ToggleButton.js +15 -0
  98. package/lib/components/ToggleButton/ToggleButton.js.map +1 -0
  99. package/lib/components/ToggleButton/ToggleButton.types.d.ts +19 -0
  100. package/lib/components/ToggleButton/ToggleButton.types.js +2 -0
  101. package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -0
  102. package/lib/components/ToggleButton/index.d.ts +5 -0
  103. package/lib/components/ToggleButton/index.js +6 -0
  104. package/lib/components/ToggleButton/index.js.map +1 -0
  105. package/lib/components/ToggleButton/renderToggleButton.d.ts +1 -0
  106. package/lib/components/ToggleButton/renderToggleButton.js +2 -0
  107. package/lib/components/ToggleButton/renderToggleButton.js.map +1 -0
  108. package/lib/components/ToggleButton/useToggleButton.d.ts +9 -0
  109. package/lib/components/ToggleButton/useToggleButton.js +50 -0
  110. package/lib/components/ToggleButton/useToggleButton.js.map +1 -0
  111. package/lib/components/ToggleButton/useToggleButtonStyles.d.ts +2 -0
  112. package/lib/components/ToggleButton/useToggleButtonStyles.js +190 -0
  113. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -0
  114. package/lib/index.d.ts +4 -0
  115. package/lib/index.js +4 -0
  116. package/lib/index.js.map +1 -1
  117. package/lib/tsdoc-metadata.json +1 -1
  118. package/lib-commonjs/Button.js +7 -2
  119. package/lib-commonjs/Button.js.map +1 -1
  120. package/lib-commonjs/CompoundButton.d.ts +1 -0
  121. package/lib-commonjs/CompoundButton.js +10 -0
  122. package/lib-commonjs/CompoundButton.js.map +1 -0
  123. package/lib-commonjs/MenuButton.d.ts +1 -0
  124. package/lib-commonjs/MenuButton.js +10 -0
  125. package/lib-commonjs/MenuButton.js.map +1 -0
  126. package/lib-commonjs/SplitButton.d.ts +1 -0
  127. package/lib-commonjs/SplitButton.js +10 -0
  128. package/lib-commonjs/SplitButton.js.map +1 -0
  129. package/lib-commonjs/ToggleButton.d.ts +1 -0
  130. package/lib-commonjs/ToggleButton.js +10 -0
  131. package/lib-commonjs/ToggleButton.js.map +1 -0
  132. package/lib-commonjs/common/isConformant.d.ts +4 -2
  133. package/lib-commonjs/common/isConformant.js +19 -8
  134. package/lib-commonjs/common/isConformant.js.map +1 -1
  135. package/lib-commonjs/components/Button/Button.d.ts +4 -11
  136. package/lib-commonjs/components/Button/Button.js +20 -20
  137. package/lib-commonjs/components/Button/Button.js.map +1 -1
  138. package/lib-commonjs/components/Button/Button.types.d.ts +57 -60
  139. package/lib-commonjs/components/Button/Button.types.js +4 -1
  140. package/lib-commonjs/components/Button/Button.types.js.map +1 -1
  141. package/lib-commonjs/components/Button/index.d.ts +1 -2
  142. package/lib-commonjs/components/Button/index.js +21 -5
  143. package/lib-commonjs/components/Button/index.js.map +1 -1
  144. package/lib-commonjs/components/Button/renderButton.d.ts +2 -2
  145. package/lib-commonjs/components/Button/renderButton.js +24 -13
  146. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  147. package/lib-commonjs/components/Button/useButton.d.ts +5 -7
  148. package/lib-commonjs/components/Button/useButton.js +59 -24
  149. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  150. package/lib-commonjs/components/Button/useButtonStyles.d.ts +10 -4
  151. package/lib-commonjs/components/Button/useButtonStyles.js +360 -379
  152. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
  153. package/lib-commonjs/components/CompoundButton/CompoundButton.d.ts +6 -0
  154. package/lib-commonjs/components/CompoundButton/CompoundButton.js +26 -0
  155. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -0
  156. package/lib-commonjs/components/CompoundButton/CompoundButton.types.d.ts +14 -0
  157. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js +6 -0
  158. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -0
  159. package/lib-commonjs/components/CompoundButton/index.d.ts +5 -0
  160. package/lib-commonjs/components/CompoundButton/index.js +26 -0
  161. package/lib-commonjs/components/CompoundButton/index.js.map +1 -0
  162. package/lib-commonjs/components/CompoundButton/renderCompoundButton.d.ts +5 -0
  163. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +29 -0
  164. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -0
  165. package/lib-commonjs/components/CompoundButton/useCompoundButton.d.ts +8 -0
  166. package/lib-commonjs/components/CompoundButton/useCompoundButton.js +41 -0
  167. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -0
  168. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.d.ts +2 -0
  169. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +175 -0
  170. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -0
  171. package/lib-commonjs/components/MenuButton/MenuButton.d.ts +6 -0
  172. package/lib-commonjs/components/MenuButton/MenuButton.js +26 -0
  173. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -0
  174. package/lib-commonjs/components/MenuButton/MenuButton.types.d.ts +11 -0
  175. package/lib-commonjs/components/MenuButton/MenuButton.types.js +6 -0
  176. package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -0
  177. package/lib-commonjs/components/MenuButton/index.d.ts +5 -0
  178. package/lib-commonjs/components/MenuButton/index.js +26 -0
  179. package/lib-commonjs/components/MenuButton/index.js.map +1 -0
  180. package/lib-commonjs/components/MenuButton/renderMenuButton.d.ts +5 -0
  181. package/lib-commonjs/components/MenuButton/renderMenuButton.js +29 -0
  182. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -0
  183. package/lib-commonjs/components/MenuButton/useMenuButton.d.ts +6 -0
  184. package/lib-commonjs/components/MenuButton/useMenuButton.js +46 -0
  185. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -0
  186. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.d.ts +2 -0
  187. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +44 -0
  188. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -0
  189. package/lib-commonjs/components/SplitButton/SplitButton.d.ts +7 -0
  190. package/lib-commonjs/components/SplitButton/SplitButton.js +27 -0
  191. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -0
  192. package/lib-commonjs/components/SplitButton/SplitButton.types.d.ts +19 -0
  193. package/lib-commonjs/components/SplitButton/SplitButton.types.js +6 -0
  194. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -0
  195. package/lib-commonjs/components/SplitButton/index.d.ts +5 -0
  196. package/lib-commonjs/components/SplitButton/index.js +26 -0
  197. package/lib-commonjs/components/SplitButton/index.js.map +1 -0
  198. package/lib-commonjs/components/SplitButton/renderSplitButton.d.ts +5 -0
  199. package/lib-commonjs/components/SplitButton/renderSplitButton.js +27 -0
  200. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -0
  201. package/lib-commonjs/components/SplitButton/useSplitButton.d.ts +8 -0
  202. package/lib-commonjs/components/SplitButton/useSplitButton.js +86 -0
  203. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -0
  204. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.d.ts +2 -0
  205. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +88 -0
  206. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -0
  207. package/lib-commonjs/components/ToggleButton/ToggleButton.d.ts +6 -0
  208. package/lib-commonjs/components/ToggleButton/ToggleButton.js +26 -0
  209. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -0
  210. package/lib-commonjs/components/ToggleButton/ToggleButton.types.d.ts +19 -0
  211. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js +6 -0
  212. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -0
  213. package/lib-commonjs/components/ToggleButton/index.d.ts +5 -0
  214. package/lib-commonjs/components/ToggleButton/index.js +26 -0
  215. package/lib-commonjs/components/ToggleButton/index.js.map +1 -0
  216. package/lib-commonjs/components/ToggleButton/renderToggleButton.d.ts +1 -0
  217. package/lib-commonjs/components/ToggleButton/renderToggleButton.js +16 -0
  218. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -0
  219. package/lib-commonjs/components/ToggleButton/useToggleButton.d.ts +9 -0
  220. package/lib-commonjs/components/ToggleButton/useToggleButton.js +63 -0
  221. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -0
  222. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.d.ts +2 -0
  223. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +200 -0
  224. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -0
  225. package/lib-commonjs/index.d.ts +4 -0
  226. package/lib-commonjs/index.js +15 -2
  227. package/lib-commonjs/index.js.map +1 -1
  228. package/package.json +21 -14
  229. package/config/api-extractor.json +0 -3
  230. package/config/pre-copy.json +0 -9
  231. package/config/tests.js +0 -6
  232. package/etc/react-button.api.md +0 -104
  233. package/just.config.ts +0 -3
  234. package/lib/components/Button/useButtonState.d.ts +0 -6
  235. package/lib/components/Button/useButtonState.js +0 -45
  236. package/lib/components/Button/useButtonState.js.map +0 -1
  237. package/lib-amd/Button.d.ts +0 -1
  238. package/lib-amd/Button.js +0 -6
  239. package/lib-amd/Button.js.map +0 -1
  240. package/lib-amd/common/isConformant.d.ts +0 -2
  241. package/lib-amd/common/isConformant.js +0 -14
  242. package/lib-amd/common/isConformant.js.map +0 -1
  243. package/lib-amd/components/Button/Button.d.ts +0 -13
  244. package/lib-amd/components/Button/Button.js +0 -24
  245. package/lib-amd/components/Button/Button.js.map +0 -1
  246. package/lib-amd/components/Button/Button.types.d.ts +0 -65
  247. package/lib-amd/components/Button/Button.types.js +0 -5
  248. package/lib-amd/components/Button/Button.types.js.map +0 -1
  249. package/lib-amd/components/Button/index.d.ts +0 -6
  250. package/lib-amd/components/Button/index.js +0 -10
  251. package/lib-amd/components/Button/index.js.map +0 -1
  252. package/lib-amd/components/Button/renderButton.d.ts +0 -5
  253. package/lib-amd/components/Button/renderButton.js +0 -16
  254. package/lib-amd/components/Button/renderButton.js.map +0 -1
  255. package/lib-amd/components/Button/useButton.d.ts +0 -10
  256. package/lib-amd/components/Button/useButton.js +0 -28
  257. package/lib-amd/components/Button/useButton.js.map +0 -1
  258. package/lib-amd/components/Button/useButtonState.d.ts +0 -6
  259. package/lib-amd/components/Button/useButtonState.js +0 -48
  260. package/lib-amd/components/Button/useButtonState.js.map +0 -1
  261. package/lib-amd/components/Button/useButtonStyles.d.ts +0 -4
  262. package/lib-amd/components/Button/useButtonStyles.js +0 -385
  263. package/lib-amd/components/Button/useButtonStyles.js.map +0 -1
  264. package/lib-amd/index.d.ts +0 -1
  265. package/lib-amd/index.js +0 -6
  266. package/lib-amd/index.js.map +0 -1
  267. package/lib-commonjs/components/Button/useButtonState.d.ts +0 -6
  268. package/lib-commonjs/components/Button/useButtonState.js +0 -47
  269. package/lib-commonjs/components/Button/useButtonState.js.map +0 -1
  270. package/src/components/Button/Button.types.ts +0 -120
@@ -1,382 +1,354 @@
1
- import { ax, makeStylesCompat } from '@fluentui/react-make-styles';
2
- // TODO: These are named in design specs but not hoisted to global/alias yet.
1
+ import { __styles, mergeClasses } from '@fluentui/react-make-styles';
2
+ import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster'; // TODO: These are named in design specs but not hoisted to global/alias yet.
3
3
  // We're tracking these here to determine how we can hoist them.
4
- var buttonSpacing = {
5
- smallest: '2px',
6
- smaller: '4px',
7
- small: '6px',
8
- medium: '8px',
9
- large: '12px',
10
- larger: '16px',
4
+
5
+ export var buttonSpacing = {
6
+ smallest: '2px',
7
+ smaller: '4px',
8
+ small: '6px',
9
+ medium: '8px',
10
+ large: '12px',
11
+ larger: '16px'
11
12
  };
12
- // We do not want a combinatorial explosion of component variables for variants (bg, bgPrimary, etc)
13
- // We want a fixed interface of variables for a given component and to alter those between variants
14
- export var makeButtonTokens = function (theme) { return ({
15
- base: {
16
- // TODO: these are not in the global/alias theme currently
17
- // When they are shown in the token UI, we need to make it clear there is no global/alias mapping support
18
- height: '32px',
19
- paddingX: buttonSpacing.large,
20
- paddingY: '0',
21
- minWidth: '96px',
22
- maxWidth: '280px',
23
- color: theme.alias.color.neutral.neutralForeground1,
24
- content2Color: theme.alias.color.neutral.neutralForeground2,
25
- background: theme.alias.color.neutral.neutralBackground1,
26
- backgroundPressed: theme.alias.color.neutral.neutralBackground1,
27
- borderRadius: theme.global.borderRadius.medium,
28
- borderWidth: theme.global.strokeWidth.thin,
29
- borderColor: theme.alias.color.neutral.neutralStroke1,
30
- backgroundHover: theme.alias.color.neutral.neutralBackground1Hover,
31
- borderColorHover: theme.alias.color.neutral.neutralStroke1Hover,
32
- backgroundActive: theme.alias.color.neutral.neutralBackground1Pressed,
33
- borderColorActive: theme.alias.color.neutral.neutralStroke1Pressed,
34
- fontWeight: theme.global.type.fontWeights.semibold,
35
- fontSize: theme.global.type.fontSizes.base[300],
36
- lineHeight: theme.global.type.lineHeights.base[300],
37
- iconSpacing: buttonSpacing.small,
38
- iconWidth: '20px',
39
- iconHeight: '20px',
40
- },
41
- disabled: {
42
- background: theme.alias.color.neutral.neutralBackgroundDisabled,
43
- borderColor: theme.alias.color.neutral.neutralStrokeDisabled,
44
- color: theme.alias.color.neutral.neutralForegroundDisabled,
45
- content2Color: theme.alias.color.neutral.neutralForegroundDisabled,
46
- },
47
- small: {
48
- paddingX: buttonSpacing.medium,
49
- borderRadius: theme.global.borderRadius.small,
50
- // TODO: design spec says minWidth "can be toggled off", consider prop like compact?
51
- minWidth: '64px',
52
- height: '24px',
53
- fontSize: theme.global.type.fontSizes.base[200],
54
- lineHeight: theme.global.type.fontSizes.base[200],
55
- fontWeight: theme.global.type.fontWeights.regular,
56
- },
57
- large: {
58
- paddingX: buttonSpacing.larger,
59
- height: '40px',
60
- borderRadius: theme.global.borderRadius.medium,
61
- fontSize: theme.global.type.fontSizes.base[400],
62
- // TODO: 24px is not on the global ramp of line heights
63
- // 22px = theme.global.type.lineHeights.base[400]
64
- // 28px = theme.global.type.lineHeights.base[500]
65
- lineHeight: '24px',
66
- iconWidth: '24px',
67
- iconHeight: '24px',
68
- iconSpacing: buttonSpacing.small,
69
- },
70
- // TODO: Would be ideal to automate a check to ensure when a variant is accessed, all the tokens are accessed as well.
71
- // If not, it means there is cruft in the variant tokens definition.
72
- // All tokens in a variant should be mapped to some style property.
73
- iconOnly: {
74
- paddingX: buttonSpacing.small,
75
- paddingY: buttonSpacing.small,
76
- minWidth: '32px',
77
- maxWidth: '32px',
78
- },
79
- // TODO: combinatorial "variants" is wrong, we already have iconOnly and small.
80
- // we essentially need to update component token mappings based on variant matchers.
81
- // fow the sake of progress for now, we're extending variants to have combinations.
82
- iconOnlySmall: {
83
- paddingX: buttonSpacing.smallest,
84
- paddingY: buttonSpacing.smallest,
85
- borderRadius: theme.global.borderRadius.small,
86
- minWidth: '24px',
87
- maxWidth: '24px',
88
- },
89
- iconOnlyLarge: {
90
- paddingX: buttonSpacing.small,
91
- paddingY: buttonSpacing.small,
92
- borderRadius: theme.global.borderRadius.medium,
93
- minWidth: '40px',
94
- maxWidth: '40px',
95
- },
96
- primary: {
97
- color: theme.alias.color.neutral.neutralForegroundInvertedAccessible,
98
- background: theme.alias.color.brand.brandBackground,
99
- borderColor: 'transparent',
100
- borderColorHover: 'transparent',
101
- borderColorActive: 'transparent',
102
- backgroundHover: theme.alias.color.brand.brandBackgroundHover,
103
- backgroundPressed: theme.alias.color.brand.brandBackgroundPressed,
104
- // TODO: spec calls out "shadow 4 __brand__", are we missing tokens?
105
- shadow: theme.alias.shadow.shadow4,
106
- // TODO: spec calls out "shadow 2 __darker__", are we missing tokens?
107
- shadowPressed: theme.alias.shadow.shadow2,
108
- },
109
- primaryDisabled: {
110
- background: theme.alias.color.neutral.neutralBackgroundDisabled,
111
- // borderColor: theme.alias.color.neutral.neutralStrokeDisabled,
112
- color: theme.alias.color.neutral.neutralForegroundDisabled,
113
- content2Color: theme.alias.color.neutral.neutralForegroundDisabled,
114
- shadow: 'none',
115
- shadowPressed: 'none',
116
- },
117
- }); };
118
- var useRootStyles = makeStylesCompat([
119
- [
120
- null,
121
- function (theme) {
122
- var buttonTokens = makeButtonTokens(theme);
123
- return {
124
- display: 'inline-flex',
125
- alignItems: 'center',
126
- justifyContent: 'center',
127
- // TODO: remove unsafe property: https://caniuse.com/?search=gap
128
- gap: buttonTokens.base.iconSpacing,
129
- // // TODO: 1) ask designers what our vertical align strategy is
130
- // // 2) enforce with conformance for inline elements
131
- verticalAlign: 'text-bottom',
132
- margin: 0,
133
- padding: buttonTokens.base.paddingY + " " + buttonTokens.base.paddingX,
134
- height: buttonTokens.base.height,
135
- minWidth: buttonTokens.base.minWidth,
136
- maxWidth: buttonTokens.base.maxWidth,
137
- color: buttonTokens.base.color,
138
- borderStyle: 'solid',
139
- borderRadius: buttonTokens.base.borderRadius,
140
- borderWidth: buttonTokens.base.borderWidth,
141
- borderColor: buttonTokens.base.borderColor,
142
- background: buttonTokens.base.background,
143
- outline: 'none',
144
- ':hover': {
145
- background: buttonTokens.base.backgroundHover,
146
- borderColor: buttonTokens.base.borderColorHover,
147
- cursor: 'pointer',
148
- },
149
- ':active': {
150
- background: buttonTokens.base.backgroundActive,
151
- borderColor: buttonTokens.base.borderColorActive,
152
- outline: 'none',
153
- },
154
- };
155
- },
156
- ],
157
- [
158
- function (_a) {
159
- var size = _a.size;
160
- return size === 'small';
161
- },
162
- function (theme) {
163
- var buttonTokens = makeButtonTokens(theme);
164
- return {
165
- padding: buttonTokens.small.paddingX + " " + buttonTokens.small.paddingY,
166
- minWidth: buttonTokens.small.minWidth,
167
- height: buttonTokens.small.height,
168
- borderRadius: buttonTokens.small.borderRadius,
169
- };
170
- },
171
- ],
172
- [
173
- function (_a) {
174
- var size = _a.size;
175
- return size === 'large';
176
- },
177
- function (theme) {
178
- var buttonTokens = makeButtonTokens(theme);
179
- return {
180
- gap: buttonTokens.large.iconSpacing,
181
- padding: buttonTokens.large.paddingX + " " + buttonTokens.large.paddingY,
182
- height: buttonTokens.large.height,
183
- borderRadius: buttonTokens.large.borderRadius,
184
- };
185
- },
186
- ],
187
- [
188
- function (_a) {
189
- var disabled = _a.disabled;
190
- return disabled;
191
- },
192
- function (theme) {
193
- var buttonTokens = makeButtonTokens(theme);
194
- return {
195
- background: buttonTokens.disabled.background,
196
- borderColor: buttonTokens.disabled.borderColor,
197
- color: buttonTokens.disabled.color,
198
- ':hover': {
199
- background: buttonTokens.disabled.background,
200
- borderColor: buttonTokens.disabled.borderColor,
201
- cursor: 'default',
202
- },
203
- ':active': {
204
- background: buttonTokens.disabled.background,
205
- borderColor: buttonTokens.disabled.borderColor,
206
- },
207
- };
208
- },
209
- ],
210
- [
211
- function (_a) {
212
- var primary = _a.primary;
213
- return primary;
214
- },
215
- function (theme) {
216
- var buttonTokens = makeButtonTokens(theme);
217
- return {
218
- background: buttonTokens.primary.background,
219
- color: buttonTokens.primary.color,
220
- borderColor: buttonTokens.primary.borderColor,
221
- // TODO: spec calls out "shadow 4 __darker__", are we missing tokens?
222
- boxShadow: buttonTokens.primary.shadow,
223
- ':hover': {
224
- background: buttonTokens.primary.backgroundHover,
225
- borderColor: buttonTokens.primary.borderColorHover,
226
- },
227
- ':active': {
228
- background: buttonTokens.primary.backgroundPressed,
229
- // TODO: spec calls out "shadow 2 __darker__", are we missing tokens?
230
- boxShadow: buttonTokens.primary.shadow,
231
- borderColor: buttonTokens.primary.borderColorActive,
232
- },
233
- };
234
- },
235
- ],
236
- [
237
- function (_a) {
238
- var primary = _a.primary, disabled = _a.disabled;
239
- return primary && disabled;
240
- },
241
- function (theme) {
242
- var buttonTokens = makeButtonTokens(theme);
243
- return {
244
- background: buttonTokens.primaryDisabled.background,
245
- color: buttonTokens.primaryDisabled.color,
246
- boxShadow: buttonTokens.primaryDisabled.shadow,
247
- ':hover': {
248
- background: buttonTokens.primaryDisabled.background,
249
- cursor: 'default',
250
- },
251
- ':active': {
252
- boxShadow: buttonTokens.primaryDisabled.shadowPressed,
253
- },
254
- };
255
- },
256
- ],
257
- [
258
- function (_a) {
259
- var iconOnly = _a.iconOnly;
260
- return iconOnly;
261
- },
262
- function (theme) {
263
- var buttonTokens = makeButtonTokens(theme);
264
- return {
265
- padding: buttonTokens.iconOnly.paddingX,
266
- minWidth: buttonTokens.iconOnly.minWidth,
267
- maxWidth: buttonTokens.iconOnly.maxWidth,
268
- };
269
- },
270
- ],
271
- [
272
- function (_a) {
273
- var iconOnly = _a.iconOnly, size = _a.size;
274
- return iconOnly && size === 'small';
275
- },
276
- function (theme) {
277
- var buttonTokens = makeButtonTokens(theme);
278
- return {
279
- padding: buttonTokens.iconOnlySmall.paddingX + " " + buttonTokens.iconOnlySmall.paddingY,
280
- minWidth: buttonTokens.iconOnlySmall.minWidth,
281
- maxWidth: buttonTokens.iconOnlySmall.maxWidth,
282
- borderRadius: buttonTokens.iconOnlySmall.borderRadius,
283
- };
284
- },
285
- ],
286
- [
287
- function (_a) {
288
- var iconOnly = _a.iconOnly, size = _a.size;
289
- return iconOnly && size === 'large';
290
- },
291
- function (theme) {
292
- var buttonTokens = makeButtonTokens(theme);
293
- return {
294
- padding: buttonTokens.iconOnlyLarge.paddingX + " " + buttonTokens.iconOnlyLarge.paddingY,
295
- minWidth: buttonTokens.iconOnlyLarge.minWidth,
296
- maxWidth: buttonTokens.iconOnlyLarge.maxWidth,
297
- borderRadius: buttonTokens.iconOnlyLarge.borderRadius,
298
- };
299
- },
300
- ],
301
- ]);
302
- var useChildrenStyles = makeStylesCompat([
303
- [
304
- null,
305
- function (theme) {
306
- var buttonTokens = makeButtonTokens(theme);
307
- return {
308
- textOverflow: 'ellipsis',
309
- overflow: 'hidden',
310
- whiteSpace: 'nowrap',
311
- // TODO: This is "Body, Strong (?)" token in the design spec (14px size, 20px line, semibold weight)
312
- // There are some type aliases in the figma not in our theme as well, not sure if this maps to alias or not
313
- fontWeight: buttonTokens.base.fontWeight,
314
- fontSize: buttonTokens.base.fontSize,
315
- lineHeight: buttonTokens.base.lineHeight,
316
- };
317
- },
318
- ],
319
- [
320
- function (_a) {
321
- var size = _a.size;
322
- return size === 'small';
323
- },
324
- function (theme) {
325
- var buttonTokens = makeButtonTokens(theme);
326
- return {
327
- fontSize: buttonTokens.small.fontSize,
328
- fontWeight: buttonTokens.small.fontWeight,
329
- lineHeight: buttonTokens.small.lineHeight,
330
- };
331
- },
332
- ],
333
- [
334
- function (_a) {
335
- var size = _a.size;
336
- return size === 'large';
337
- },
338
- function (theme) {
339
- var buttonTokens = makeButtonTokens(theme);
340
- return {
341
- fontSize: buttonTokens.large.fontSize,
342
- lineHeight: buttonTokens.large.lineHeight,
343
- };
344
- },
345
- ],
346
- ]);
347
- var useIconStyles = makeStylesCompat([
348
- [
349
- null,
350
- function (theme) {
351
- var buttonTokens = makeButtonTokens(theme);
352
- return {
353
- display: 'inline-flex',
354
- alignItems: 'center',
355
- justifyContent: 'center',
356
- height: buttonTokens.base.iconHeight,
357
- width: buttonTokens.base.iconWidth,
358
- };
359
- },
360
- ],
361
- [
362
- function (_a) {
363
- var size = _a.size;
364
- return size === 'large';
365
- },
366
- function (theme) {
367
- var buttonTokens = makeButtonTokens(theme);
368
- return {
369
- width: buttonTokens.large.iconWidth,
370
- height: buttonTokens.large.iconHeight,
371
- };
372
- },
373
- ],
374
- ]);
375
- export var useButtonStyles = function (state, selectors) {
376
- state.className = ax(state.className, useRootStyles(selectors));
377
- state.children = state.children || { className: '' };
378
- state.icon = state.icon || { className: '' };
379
- state.children.className = ax(state.children.className, useChildrenStyles(selectors));
380
- state.icon.className = ax(state.icon.className, useIconStyles(selectors));
13
+
14
+ var useRootStyles = /*#__PURE__*/__styles({
15
+ "base": {
16
+ "Bt984gj": "f122n59",
17
+ "mc9l5x": "ftuwxu6",
18
+ "Brf1p80": "f4d9j23",
19
+ "ha4doy": "fmrv4ls",
20
+ "B6of3ja": "f1hu3pq6",
21
+ "t21cq0": ["f11qmguv", "f1tyq0we"],
22
+ "jrapky": "f19f4twv",
23
+ "Frg6f3": ["f1tyq0we", "f11qmguv"],
24
+ "B2u0y6b": "f1n52uh2",
25
+ "Bpg54ce": "f1a3p1vp",
26
+ "ygn44y": "f1cmbuwj",
27
+ "Huce71": "fz5stix",
28
+ "ayd6f0": "fcm7iae",
29
+ "sj55zd": "f19n0e5",
30
+ "g2u3we": "fj3muxo",
31
+ "h3c5rm": ["f1akhkt", "f1lxtadh"],
32
+ "B9xav0g": "f1aperda",
33
+ "zhjwy3": ["f1lxtadh", "f1akhkt"],
34
+ "icvyot": "fzkkow9",
35
+ "vrafjx": ["fcdblym", "fjik90z"],
36
+ "oivjwe": "fg706s2",
37
+ "wvpqe5": ["fjik90z", "fcdblym"],
38
+ "B4j52fo": "f192inf7",
39
+ "Bekrc4i": ["f5tn483", "f1ojsxk5"],
40
+ "Bn0qgzm": "f1vxd6vx",
41
+ "ibv6hh": ["f1ojsxk5", "f5tn483"],
42
+ "Bahqtrf": "fk6fouc",
43
+ "oeaueh": "f1s6fcnf",
44
+ "v4pbla": "f56u8ty",
45
+ "Bgoe8wy": "fvcxoqz",
46
+ "Bwzppfd": ["f1ub3y4t", "f1m52nbi"],
47
+ "oetu4i": "f1xlaoq0",
48
+ "gg5e9n": ["f1m52nbi", "f1ub3y4t"],
49
+ "Bi91k9c": "fax3udt",
50
+ "eoavqd": "f8491dx",
51
+ "vv34bc": "fzgy25m",
52
+ "B6oc9vd": "fvs00aa",
53
+ "ak43y8": ["f1assf6x", "f4ruux4"],
54
+ "wmxk5l": "fumykes",
55
+ "B50zh58": ["f4ruux4", "f1assf6x"],
56
+ "lj723h": "f1r2dosr",
57
+ "zwc60e": "fb0xa7e"
58
+ },
59
+ "block": {
60
+ "B2u0y6b": "f6dzj5z",
61
+ "a9b677": "fly5x3f"
62
+ },
63
+ "outline": {
64
+ "ayd6f0": "f1gjiv6l",
65
+ "v4pbla": "f62j56f",
66
+ "vv34bc": "flt377r"
67
+ },
68
+ "primary": {
69
+ "ayd6f0": "f1tdnksq",
70
+ "g2u3we": "f1p3nwhy",
71
+ "h3c5rm": ["f11589ue", "f1pdflbu"],
72
+ "B9xav0g": "f1q5o8ev",
73
+ "zhjwy3": ["f1pdflbu", "f11589ue"],
74
+ "sj55zd": "f1phragk",
75
+ "v4pbla": "f1fitrdm",
76
+ "Bgoe8wy": "f1s2uweq",
77
+ "Bwzppfd": ["fr80ssc", "fecsdlb"],
78
+ "oetu4i": "f1ukrpxl",
79
+ "gg5e9n": ["fecsdlb", "fr80ssc"],
80
+ "Bi91k9c": "f1rq72xc",
81
+ "vv34bc": "f4ihffn",
82
+ "B6oc9vd": "ff472gp",
83
+ "ak43y8": ["f4yyc7m", "ft2aflc"],
84
+ "wmxk5l": "fggejwh",
85
+ "B50zh58": ["ft2aflc", "f4yyc7m"],
86
+ "lj723h": "f18otbis"
87
+ },
88
+ "subtle": {
89
+ "ayd6f0": "f11q0hf9",
90
+ "g2u3we": "f1p3nwhy",
91
+ "h3c5rm": ["f11589ue", "f1pdflbu"],
92
+ "B9xav0g": "f1q5o8ev",
93
+ "zhjwy3": ["f1pdflbu", "f11589ue"],
94
+ "sj55zd": "fkfq4zb",
95
+ "v4pbla": "f4wzgrt",
96
+ "Bgoe8wy": "f1s2uweq",
97
+ "Bwzppfd": ["fr80ssc", "fecsdlb"],
98
+ "oetu4i": "f1ukrpxl",
99
+ "gg5e9n": ["fecsdlb", "fr80ssc"],
100
+ "Bi91k9c": "f139oj5f",
101
+ "vv34bc": "f1be4e1d",
102
+ "B6oc9vd": "ff472gp",
103
+ "ak43y8": ["f4yyc7m", "ft2aflc"],
104
+ "wmxk5l": "fggejwh",
105
+ "B50zh58": ["ft2aflc", "f4yyc7m"],
106
+ "lj723h": "f19au66r"
107
+ },
108
+ "transparent": {
109
+ "ayd6f0": "f1gjiv6l",
110
+ "g2u3we": "f1p3nwhy",
111
+ "h3c5rm": ["f11589ue", "f1pdflbu"],
112
+ "B9xav0g": "f1q5o8ev",
113
+ "zhjwy3": ["f1pdflbu", "f11589ue"],
114
+ "sj55zd": "fkfq4zb",
115
+ "v4pbla": "f62j56f",
116
+ "Bgoe8wy": "f1s2uweq",
117
+ "Bwzppfd": ["fr80ssc", "fecsdlb"],
118
+ "oetu4i": "f1ukrpxl",
119
+ "gg5e9n": ["fecsdlb", "fr80ssc"],
120
+ "Bi91k9c": "f139oj5f",
121
+ "vv34bc": "flt377r",
122
+ "B6oc9vd": "ff472gp",
123
+ "ak43y8": ["f4yyc7m", "ft2aflc"],
124
+ "wmxk5l": "fggejwh",
125
+ "B50zh58": ["ft2aflc", "f4yyc7m"],
126
+ "lj723h": "f19au66r"
127
+ },
128
+ "circular": {
129
+ "Dimara": "f44lkw9"
130
+ },
131
+ "rounded": {},
132
+ "square": {
133
+ "Dimara": "f1fabniw"
134
+ },
135
+ "small": {
136
+ "rmohyg": "f4xv25i",
137
+ "z8tnut": "f1g0x7ka",
138
+ "z189sj": ["f19lj068", "f177v4lu"],
139
+ "Byoj8tv": "f1qch9an",
140
+ "uwmqm3": ["f177v4lu", "f19lj068"],
141
+ "Bqenvij": "frvgh55",
142
+ "Bf4jedk": "fh7ncta",
143
+ "Dimara": "fq9zq91",
144
+ "Be2twd7": "fy9rknc",
145
+ "Bhrd7zp": "figsok6",
146
+ "Bg96gwp": "fwrc4pm"
147
+ },
148
+ "medium": {
149
+ "rmohyg": "f19jf40t",
150
+ "z8tnut": "f1g0x7ka",
151
+ "z189sj": ["f11qrl6u", "fjlbh76"],
152
+ "Byoj8tv": "f1qch9an",
153
+ "uwmqm3": ["fjlbh76", "f11qrl6u"],
154
+ "Bqenvij": "f1d2rq10",
155
+ "Bf4jedk": "f14es27b",
156
+ "Dimara": "ft85np5",
157
+ "Be2twd7": "fkhj508",
158
+ "Bhrd7zp": "fl43uef",
159
+ "Bg96gwp": "f1i3iumi"
160
+ },
161
+ "large": {
162
+ "rmohyg": "f19jf40t",
163
+ "z8tnut": "f1g0x7ka",
164
+ "z189sj": ["f1gbmcue", "f1rh9g5y"],
165
+ "Byoj8tv": "f1qch9an",
166
+ "uwmqm3": ["f1rh9g5y", "f1gbmcue"],
167
+ "Bqenvij": "fbhnoac",
168
+ "Bf4jedk": "f14es27b",
169
+ "Dimara": "ft85np5",
170
+ "Be2twd7": "fod5ikn",
171
+ "Bhrd7zp": "fl43uef",
172
+ "Bg96gwp": "faaz57k"
173
+ }
174
+ }, {
175
+ "d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".fmrv4ls{vertical-align:middle;}", ".f1hu3pq6{margin-top:0;}", ".f11qmguv{margin-right:0;}", ".f1tyq0we{margin-left:0;}", ".f19f4twv{margin-bottom:0;}", ".f1n52uh2{max-width:280px;}", ".f1a3p1vp{overflow:hidden;}", ".f1cmbuwj{text-overflow:ellipsis;}", ".fz5stix{white-space:nowrap;}", ".fcm7iae{background:var(--colorNeutralBackground1);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fj3muxo{border-top-color:var(--colorNeutralStroke1);}", ".f1akhkt{border-right-color:var(--colorNeutralStroke1);}", ".f1lxtadh{border-left-color:var(--colorNeutralStroke1);}", ".f1aperda{border-bottom-color:var(--colorNeutralStroke1);}", ".fzkkow9{border-top-style:solid;}", ".fcdblym{border-right-style:solid;}", ".fjik90z{border-left-style:solid;}", ".fg706s2{border-bottom-style:solid;}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1s6fcnf{outline-style:none;}", ".f6dzj5z{max-width:100%;}", ".fly5x3f{width:100%;}", ".f1gjiv6l{background:var(--colorTransparentBackground);}", ".f1tdnksq{background:var(--colorBrandBackground);}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f1phragk{color:var(--colorNeutralForegroundOnBrand);}", ".f11q0hf9{background:var(--colorSubtleBackground);}", ".fkfq4zb{color:var(--colorNeutralForeground2);}", ".f44lkw9{border-radius:var(--borderRadiusCircular);}", ".f1fabniw{border-radius:var(--borderRadiusNone);}", ".f4xv25i{gap:4px;}", ".f1g0x7ka{padding-top:0;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f1qch9an{padding-bottom:0;}", ".frvgh55{height:24px;}", ".fh7ncta{min-width:64px;}", ".fq9zq91{border-radius:var(--borderRadiusSmall);}", ".fy9rknc{font-size:var(--fontSizeBase200);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".f19jf40t{gap:6px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".f1d2rq10{height:32px;}", ".f14es27b{min-width:96px;}", ".ft85np5{border-radius:var(--borderRadiusMedium);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1gbmcue{padding-right:16px;}", ".f1rh9g5y{padding-left:16px;}", ".fbhnoac{height:40px;}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}"],
176
+ "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);}", ".f8491dx:hover{cursor:pointer;}", ".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);}"],
177
+ "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);}", ".fb0xa7e:active{outline-style:none;}", ".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);}"]
178
+ });
179
+
180
+ var useRootDisabledStyles = /*#__PURE__*/__styles({
181
+ "base": {
182
+ "ayd6f0": "fqst6tg",
183
+ "g2u3we": "f1jj8ep1",
184
+ "h3c5rm": ["f15xbau", "fy0fskl"],
185
+ "B9xav0g": "f4ikngz",
186
+ "zhjwy3": ["fy0fskl", "f15xbau"],
187
+ "sj55zd": "f1s2aq7o",
188
+ "Bceei9c": "fdrzuqr",
189
+ "v4pbla": "f1nil5o8",
190
+ "Bgoe8wy": "f12mpcsy",
191
+ "Bwzppfd": ["f1gwvigk", "f18rmfxp"],
192
+ "oetu4i": "f1jnshp0",
193
+ "gg5e9n": ["f18rmfxp", "f1gwvigk"],
194
+ "Bi91k9c": "fvgxktp",
195
+ "eoavqd": "fphbwmw",
196
+ "vv34bc": "fkqx3al",
197
+ "B6oc9vd": "fdi4vxw",
198
+ "ak43y8": ["f4ryxzl", "fkdgpbx"],
199
+ "wmxk5l": "fcmhn06",
200
+ "B50zh58": ["fkdgpbx", "f4ryxzl"],
201
+ "lj723h": "f19wldhg",
202
+ "Bwh3duv": "fq67hom"
203
+ },
204
+ "outline": {
205
+ "ayd6f0": "f1gjiv6l",
206
+ "v4pbla": "f62j56f",
207
+ "vv34bc": "flt377r"
208
+ },
209
+ "primary": {
210
+ "g2u3we": "f1p3nwhy",
211
+ "h3c5rm": ["f11589ue", "f1pdflbu"],
212
+ "B9xav0g": "f1q5o8ev",
213
+ "zhjwy3": ["f1pdflbu", "f11589ue"],
214
+ "Bgoe8wy": "f1s2uweq",
215
+ "Bwzppfd": ["fr80ssc", "fecsdlb"],
216
+ "oetu4i": "f1ukrpxl",
217
+ "gg5e9n": ["fecsdlb", "fr80ssc"],
218
+ "B6oc9vd": "ff472gp",
219
+ "ak43y8": ["f4yyc7m", "ft2aflc"],
220
+ "wmxk5l": "fggejwh",
221
+ "B50zh58": ["ft2aflc", "f4yyc7m"]
222
+ },
223
+ "subtle": {
224
+ "ayd6f0": "f1k2sg7s",
225
+ "g2u3we": "f1p3nwhy",
226
+ "h3c5rm": ["f11589ue", "f1pdflbu"],
227
+ "B9xav0g": "f1q5o8ev",
228
+ "zhjwy3": ["f1pdflbu", "f11589ue"],
229
+ "v4pbla": "f1vc35iv",
230
+ "Bgoe8wy": "f1s2uweq",
231
+ "Bwzppfd": ["fr80ssc", "fecsdlb"],
232
+ "oetu4i": "f1ukrpxl",
233
+ "gg5e9n": ["fecsdlb", "fr80ssc"],
234
+ "vv34bc": "f17oliv9",
235
+ "B6oc9vd": "ff472gp",
236
+ "ak43y8": ["f4yyc7m", "ft2aflc"],
237
+ "wmxk5l": "fggejwh",
238
+ "B50zh58": ["ft2aflc", "f4yyc7m"]
239
+ },
240
+ "transparent": {
241
+ "ayd6f0": "f1k2sg7s",
242
+ "g2u3we": "f1p3nwhy",
243
+ "h3c5rm": ["f11589ue", "f1pdflbu"],
244
+ "B9xav0g": "f1q5o8ev",
245
+ "zhjwy3": ["f1pdflbu", "f11589ue"],
246
+ "v4pbla": "f1vc35iv",
247
+ "Bgoe8wy": "f1s2uweq",
248
+ "Bwzppfd": ["fr80ssc", "fecsdlb"],
249
+ "oetu4i": "f1ukrpxl",
250
+ "gg5e9n": ["fecsdlb", "fr80ssc"],
251
+ "vv34bc": "f17oliv9",
252
+ "B6oc9vd": "ff472gp",
253
+ "ak43y8": ["f4yyc7m", "ft2aflc"],
254
+ "wmxk5l": "fggejwh",
255
+ "B50zh58": ["ft2aflc", "f4yyc7m"]
256
+ }
257
+ }, {
258
+ "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);}", ".fdrzuqr{cursor:not-allowed;}", ".f1gjiv6l{background:var(--colorTransparentBackground);}", ".f1p3nwhy{border-top-color:transparent;}", ".f11589ue{border-right-color:transparent;}", ".f1pdflbu{border-left-color:transparent;}", ".f1q5o8ev{border-bottom-color:transparent;}", ".f1k2sg7s{background:none;}"],
259
+ "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);}", ".fphbwmw:hover{cursor:not-allowed;}", ".f62j56f:hover{background:var(--colorTransparentBackgroundHover);}", ".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;}"],
260
+ "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);}", ".fq67hom:active{cursor:not-allowed;}", ".flt377r:active{background:var(--colorTransparentBackgroundPressed);}", ".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;}"]
261
+ });
262
+
263
+ var useRootFocusStyles = /*#__PURE__*/__styles({
264
+ "base": {},
265
+ "circular": {},
266
+ "rounded": {},
267
+ "primary": {},
268
+ "square": {},
269
+ "small": {},
270
+ "medium": {},
271
+ "large": {}
272
+ }, {});
273
+
274
+ var useRootIconOnlyStyles = /*#__PURE__*/__styles({
275
+ "small": {
276
+ "z8tnut": "f10ra9hq",
277
+ "z189sj": ["f8wuabp", "fycuoez"],
278
+ "Byoj8tv": "f1y2xyjm",
279
+ "uwmqm3": ["fycuoez", "f8wuabp"],
280
+ "Bf4jedk": "f107v6xj",
281
+ "B2u0y6b": "f17iyk3w"
282
+ },
283
+ "medium": {
284
+ "z8tnut": "f10ra9hq",
285
+ "z189sj": ["f8wuabp", "fycuoez"],
286
+ "Byoj8tv": "f1y2xyjm",
287
+ "uwmqm3": ["fycuoez", "f8wuabp"],
288
+ "Bf4jedk": "fwbmr0d",
289
+ "B2u0y6b": "f44c6la"
290
+ },
291
+ "large": {
292
+ "z8tnut": "f1xp5gbu",
293
+ "z189sj": ["f1sgzk6v", "f1bg5zqg"],
294
+ "Byoj8tv": "f1d7kygh",
295
+ "uwmqm3": ["f1bg5zqg", "f1sgzk6v"],
296
+ "Bf4jedk": "f12clzc2",
297
+ "B2u0y6b": "fjy1crr"
298
+ }
299
+ }, {
300
+ "d": [".f10ra9hq{padding-top:4px;}", ".f8wuabp{padding-right:4px;}", ".fycuoez{padding-left:4px;}", ".f1y2xyjm{padding-bottom:4px;}", ".f107v6xj{min-width:28px;}", ".f17iyk3w{max-width:28px;}", ".fwbmr0d{min-width:32px;}", ".f44c6la{max-width:32px;}", ".f1xp5gbu{padding-top:6px;}", ".f1sgzk6v{padding-right:6px;}", ".f1bg5zqg{padding-left:6px;}", ".f1d7kygh{padding-bottom:6px;}", ".f12clzc2{min-width:40px;}", ".fjy1crr{max-width:40px;}"]
301
+ });
302
+
303
+ var useIconStyles = /*#__PURE__*/__styles({
304
+ "base": {
305
+ "Bt984gj": "f122n59",
306
+ "mc9l5x": "ftuwxu6",
307
+ "Brf1p80": "f4d9j23"
308
+ },
309
+ "small": {
310
+ "Be2twd7": "fe5j1ua",
311
+ "Bqenvij": "fjamq6b",
312
+ "a9b677": "f64fuq3"
313
+ },
314
+ "medium": {
315
+ "Be2twd7": "fe5j1ua",
316
+ "Bqenvij": "fjamq6b",
317
+ "a9b677": "f64fuq3"
318
+ },
319
+ "large": {
320
+ "Be2twd7": "f1rt2boy",
321
+ "Bqenvij": "frvgh55",
322
+ "a9b677": "fq4mcun"
323
+ }
324
+ }, {
325
+ "d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".fe5j1ua{font-size:20px;}", ".fjamq6b{height:20px;}", ".f64fuq3{width:20px;}", ".f1rt2boy{font-size:24px;}", ".frvgh55{height:24px;}", ".fq4mcun{width:24px;}"]
326
+ });
327
+
328
+ export var useButtonStyles = function (state) {
329
+ var rootStyles = useRootStyles();
330
+ var rootDisabledStyles = useRootDisabledStyles();
331
+ var rootFocusStyles = useRootFocusStyles();
332
+ var rootIconOnlyStyles = useRootIconOnlyStyles();
333
+ var iconStyles = useIconStyles();
334
+ var appearance = state.appearance,
335
+ block = state.block,
336
+ disabled = state.disabled,
337
+ disabledFocusable = state.disabledFocusable,
338
+ iconOnly = state.iconOnly,
339
+ shape = state.shape,
340
+ size = state.size;
341
+ state.root.className = mergeClasses( // Root styles
342
+ rootStyles.base, block && rootStyles.block, appearance && rootStyles[appearance], rootStyles[size], rootStyles[shape], // Disabled styles
343
+ (disabled || disabledFocusable) && rootDisabledStyles.base, appearance && (disabled || disabledFocusable) && rootDisabledStyles[appearance], // Focus styles
344
+ rootFocusStyles.base, appearance === 'primary' && rootFocusStyles.primary, rootFocusStyles[size], rootFocusStyles[shape], // Icon-only styles
345
+ iconOnly && rootIconOnlyStyles[size], // User provided class name
346
+ state.root.className);
347
+
348
+ if (state.icon) {
349
+ state.icon.className = mergeClasses(iconStyles.base, iconStyles[size], state.icon.className);
350
+ }
351
+
352
+ return state;
381
353
  };
382
354
  //# sourceMappingURL=useButtonStyles.js.map