@fluentui/react-button 9.0.0-rc.1 → 9.0.0-rc.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (195) hide show
  1. package/CHANGELOG.json +549 -1
  2. package/CHANGELOG.md +321 -172
  3. package/README.md +80 -18
  4. package/dist/{react-button.d.ts → index.d.ts} +42 -37
  5. package/{lib → dist}/tsdoc-metadata.json +0 -0
  6. package/lib/Button.js.map +1 -1
  7. package/lib/CompoundButton.js.map +1 -1
  8. package/lib/MenuButton.js.map +1 -1
  9. package/lib/SplitButton.js.map +1 -1
  10. package/lib/ToggleButton.js.map +1 -1
  11. package/lib/components/Button/Button.js.map +1 -1
  12. package/lib/components/Button/Button.types.js.map +1 -1
  13. package/lib/components/Button/index.js +1 -1
  14. package/lib/components/Button/index.js.map +1 -1
  15. package/lib/components/Button/renderButton.js.map +1 -1
  16. package/lib/components/Button/useButton.js +1 -3
  17. package/lib/components/Button/useButton.js.map +1 -1
  18. package/lib/components/Button/useButtonStyles.js +162 -115
  19. package/lib/components/Button/useButtonStyles.js.map +1 -1
  20. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  21. package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
  22. package/lib/components/CompoundButton/index.js +1 -1
  23. package/lib/components/CompoundButton/index.js.map +1 -1
  24. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  25. package/lib/components/CompoundButton/useCompoundButton.js +7 -2
  26. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  27. package/lib/components/CompoundButton/useCompoundButtonStyles.js +72 -55
  28. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  29. package/lib/components/MenuButton/MenuButton.js +2 -1
  30. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  31. package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
  32. package/lib/components/MenuButton/index.js +1 -1
  33. package/lib/components/MenuButton/index.js.map +1 -1
  34. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  35. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  36. package/lib/components/MenuButton/useMenuButtonStyles.js +34 -14
  37. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  38. package/lib/components/SplitButton/SplitButton.js +1 -1
  39. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  40. package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
  41. package/lib/components/SplitButton/index.js +1 -1
  42. package/lib/components/SplitButton/index.js.map +1 -1
  43. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  44. package/lib/components/SplitButton/useSplitButton.js +17 -8
  45. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  46. package/lib/components/SplitButton/useSplitButtonStyles.js +37 -34
  47. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  48. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  49. package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
  50. package/lib/components/ToggleButton/index.js +1 -1
  51. package/lib/components/ToggleButton/index.js.map +1 -1
  52. package/lib/components/ToggleButton/renderToggleButton.js.map +1 -1
  53. package/lib/components/ToggleButton/useToggleButton.js +3 -41
  54. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  55. package/lib/components/ToggleButton/useToggleButtonStyles.js +122 -61
  56. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  57. package/lib/index.js +6 -5
  58. package/lib/index.js.map +1 -1
  59. package/lib/utils/index.js +2 -0
  60. package/lib/utils/index.js.map +1 -0
  61. package/lib/utils/useToggleState.js +37 -0
  62. package/lib/utils/useToggleState.js.map +1 -0
  63. package/lib-commonjs/Button.js.map +1 -1
  64. package/lib-commonjs/CompoundButton.js.map +1 -1
  65. package/lib-commonjs/MenuButton.js.map +1 -1
  66. package/lib-commonjs/SplitButton.js.map +1 -1
  67. package/lib-commonjs/ToggleButton.js.map +1 -1
  68. package/lib-commonjs/components/Button/Button.js.map +1 -1
  69. package/lib-commonjs/components/Button/Button.types.js.map +1 -1
  70. package/lib-commonjs/components/Button/index.js +3 -3
  71. package/lib-commonjs/components/Button/index.js.map +1 -1
  72. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  73. package/lib-commonjs/components/Button/useButton.js +1 -3
  74. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  75. package/lib-commonjs/components/Button/useButtonStyles.js +164 -116
  76. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
  77. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  78. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -1
  79. package/lib-commonjs/components/CompoundButton/index.js +3 -3
  80. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  81. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  82. package/lib-commonjs/components/CompoundButton/useCompoundButton.js +7 -2
  83. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  84. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +74 -57
  85. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  86. package/lib-commonjs/components/MenuButton/MenuButton.js +2 -1
  87. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  88. package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -1
  89. package/lib-commonjs/components/MenuButton/index.js +3 -3
  90. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  91. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  92. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  93. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +36 -15
  94. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  95. package/lib-commonjs/components/SplitButton/SplitButton.js +1 -1
  96. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  97. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
  98. package/lib-commonjs/components/SplitButton/index.js +3 -3
  99. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  100. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  101. package/lib-commonjs/components/SplitButton/useSplitButton.js +16 -7
  102. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  103. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +38 -35
  104. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  105. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  106. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -1
  107. package/lib-commonjs/components/ToggleButton/index.js +3 -3
  108. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  109. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
  110. package/lib-commonjs/components/ToggleButton/useToggleButton.js +3 -42
  111. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  112. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +127 -63
  113. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  114. package/lib-commonjs/index.js +169 -6
  115. package/lib-commonjs/index.js.map +1 -1
  116. package/lib-commonjs/utils/index.js +10 -0
  117. package/lib-commonjs/utils/index.js.map +1 -0
  118. package/lib-commonjs/utils/useToggleState.js +48 -0
  119. package/lib-commonjs/utils/useToggleState.js.map +1 -0
  120. package/package.json +20 -22
  121. package/dist/demo/index.html +0 -71
  122. package/dist/demo/react-dom.development.js +0 -21413
  123. package/dist/demo/react.development.js +0 -3155
  124. package/lib/Button.d.ts +0 -1
  125. package/lib/CompoundButton.d.ts +0 -1
  126. package/lib/MenuButton.d.ts +0 -1
  127. package/lib/SplitButton.d.ts +0 -1
  128. package/lib/ToggleButton.d.ts +0 -1
  129. package/lib/components/Button/Button.d.ts +0 -6
  130. package/lib/components/Button/Button.types.d.ts +0 -62
  131. package/lib/components/Button/index.d.ts +0 -5
  132. package/lib/components/Button/renderButton.d.ts +0 -5
  133. package/lib/components/Button/useButton.d.ts +0 -8
  134. package/lib/components/Button/useButtonStyles.d.ts +0 -3
  135. package/lib/components/CompoundButton/CompoundButton.d.ts +0 -6
  136. package/lib/components/CompoundButton/CompoundButton.types.d.ts +0 -14
  137. package/lib/components/CompoundButton/index.d.ts +0 -5
  138. package/lib/components/CompoundButton/renderCompoundButton.d.ts +0 -5
  139. package/lib/components/CompoundButton/useCompoundButton.d.ts +0 -8
  140. package/lib/components/CompoundButton/useCompoundButtonStyles.d.ts +0 -3
  141. package/lib/components/MenuButton/MenuButton.d.ts +0 -6
  142. package/lib/components/MenuButton/MenuButton.types.d.ts +0 -10
  143. package/lib/components/MenuButton/index.d.ts +0 -5
  144. package/lib/components/MenuButton/renderMenuButton.d.ts +0 -5
  145. package/lib/components/MenuButton/useMenuButton.d.ts +0 -6
  146. package/lib/components/MenuButton/useMenuButtonStyles.d.ts +0 -3
  147. package/lib/components/SplitButton/SplitButton.d.ts +0 -7
  148. package/lib/components/SplitButton/SplitButton.types.d.ts +0 -21
  149. package/lib/components/SplitButton/index.d.ts +0 -5
  150. package/lib/components/SplitButton/renderSplitButton.d.ts +0 -5
  151. package/lib/components/SplitButton/useSplitButton.d.ts +0 -8
  152. package/lib/components/SplitButton/useSplitButtonStyles.d.ts +0 -3
  153. package/lib/components/ToggleButton/ToggleButton.d.ts +0 -6
  154. package/lib/components/ToggleButton/ToggleButton.types.d.ts +0 -20
  155. package/lib/components/ToggleButton/index.d.ts +0 -5
  156. package/lib/components/ToggleButton/renderToggleButton.d.ts +0 -1
  157. package/lib/components/ToggleButton/useToggleButton.d.ts +0 -9
  158. package/lib/components/ToggleButton/useToggleButtonStyles.d.ts +0 -3
  159. package/lib/index.d.ts +0 -5
  160. package/lib-commonjs/Button.d.ts +0 -1
  161. package/lib-commonjs/CompoundButton.d.ts +0 -1
  162. package/lib-commonjs/MenuButton.d.ts +0 -1
  163. package/lib-commonjs/SplitButton.d.ts +0 -1
  164. package/lib-commonjs/ToggleButton.d.ts +0 -1
  165. package/lib-commonjs/components/Button/Button.d.ts +0 -6
  166. package/lib-commonjs/components/Button/Button.types.d.ts +0 -62
  167. package/lib-commonjs/components/Button/index.d.ts +0 -5
  168. package/lib-commonjs/components/Button/renderButton.d.ts +0 -5
  169. package/lib-commonjs/components/Button/useButton.d.ts +0 -8
  170. package/lib-commonjs/components/Button/useButtonStyles.d.ts +0 -3
  171. package/lib-commonjs/components/CompoundButton/CompoundButton.d.ts +0 -6
  172. package/lib-commonjs/components/CompoundButton/CompoundButton.types.d.ts +0 -14
  173. package/lib-commonjs/components/CompoundButton/index.d.ts +0 -5
  174. package/lib-commonjs/components/CompoundButton/renderCompoundButton.d.ts +0 -5
  175. package/lib-commonjs/components/CompoundButton/useCompoundButton.d.ts +0 -8
  176. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.d.ts +0 -3
  177. package/lib-commonjs/components/MenuButton/MenuButton.d.ts +0 -6
  178. package/lib-commonjs/components/MenuButton/MenuButton.types.d.ts +0 -10
  179. package/lib-commonjs/components/MenuButton/index.d.ts +0 -5
  180. package/lib-commonjs/components/MenuButton/renderMenuButton.d.ts +0 -5
  181. package/lib-commonjs/components/MenuButton/useMenuButton.d.ts +0 -6
  182. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.d.ts +0 -3
  183. package/lib-commonjs/components/SplitButton/SplitButton.d.ts +0 -7
  184. package/lib-commonjs/components/SplitButton/SplitButton.types.d.ts +0 -21
  185. package/lib-commonjs/components/SplitButton/index.d.ts +0 -5
  186. package/lib-commonjs/components/SplitButton/renderSplitButton.d.ts +0 -5
  187. package/lib-commonjs/components/SplitButton/useSplitButton.d.ts +0 -8
  188. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.d.ts +0 -3
  189. package/lib-commonjs/components/ToggleButton/ToggleButton.d.ts +0 -6
  190. package/lib-commonjs/components/ToggleButton/ToggleButton.types.d.ts +0 -20
  191. package/lib-commonjs/components/ToggleButton/index.d.ts +0 -5
  192. package/lib-commonjs/components/ToggleButton/renderToggleButton.d.ts +0 -1
  193. package/lib-commonjs/components/ToggleButton/useToggleButton.d.ts +0 -9
  194. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.d.ts +0 -3
  195. package/lib-commonjs/index.d.ts +0 -5
@@ -1,26 +1,26 @@
1
1
  import { __styles, mergeClasses } from '@griffel/react';
2
2
  import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
3
3
  import { tokens } from '@fluentui/react-theme';
4
- export const splitButtonClassName = 'fui-SplitButton';
5
- const SplitButtonClassNames = {
6
- primaryActionButton: `${splitButtonClassName}-primaryActionButton`,
7
- menuButton: `${splitButtonClassName}-menuButton`
4
+ export const splitButtonClassNames = {
5
+ root: 'fui-SplitButton',
6
+ menuButton: 'fui-SplitButton__menuButton',
7
+ primaryActionButton: 'fui-SplitButton__primaryActionButton'
8
8
  };
9
9
 
10
10
  const useFocusStyles = /*#__PURE__*/__styles({
11
11
  "primaryActionButton": {
12
- "B486eqv": "f2hkw1w",
12
+ "Brovlpu": "ftqa4ok",
13
13
  "Bmrpcm6": ["fub8a6s", "f1g41uvt"],
14
14
  "B8j0l6": ["f58hr3h", "f1u1mnrj"]
15
15
  },
16
16
  "menuButton": {
17
- "B486eqv": "f2hkw1w",
17
+ "Brovlpu": "ftqa4ok",
18
18
  "Bviepcv": ["fy9hclh", "f549e1y"],
19
19
  "Beswxhl": ["f1g41uvt", "fub8a6s"],
20
20
  "Ekyhi": ["f1u1mnrj", "f58hr3h"]
21
21
  }
22
22
  }, {
23
- "i": [".f2hkw1w:focus-visible{outline-style:none;}"],
23
+ "f": [".ftqa4ok:focus{outline-style:none;}"],
24
24
  "d": ["[data-keyboard-nav] .fub8a6s:focus{border-top-right-radius:0;}", "[data-keyboard-nav] .f1g41uvt:focus{border-top-left-radius:0;}", "[data-keyboard-nav] .f58hr3h:focus{border-bottom-right-radius:0;}", "[data-keyboard-nav] .f1u1mnrj:focus{border-bottom-left-radius:0;}", "[data-keyboard-nav] .fy9hclh:focus{border-left-width:0;}", "[data-keyboard-nav] .f549e1y:focus{border-right-width:0;}"]
25
25
  });
26
26
 
@@ -30,43 +30,47 @@ const useRootStyles = /*#__PURE__*/__styles({
30
30
  "Brf1p80": "fsxf2b5",
31
31
  "qhf8xq": "f10pi13n",
32
32
  "ha4doy": "fmrv4ls",
33
- "mfjwoh": ["fwj9yvy", "f1lzjiju"],
34
- "ibxugx": ["f1a35zaw", "f1l6wyf7"],
35
- "Bqvcgfq": ["f104opbk", "f147sopj"],
36
- "Baxitl6": ["fxs6g7p", "f1moly3t"],
37
- "zkjfwm": ["f1m1y7kk", "ff82swa"]
38
- },
39
- "block": {
40
- "a9b677": "fly5x3f"
33
+ "kn2xc0": ["f14uur2j", "fc1btbj"],
34
+ "Bs76p8a": ["fye5tvs", "fc597qq"],
35
+ "cuxpm9": ["f1e8brtx", "fr36rk3"],
36
+ "Biffepf": ["fxp12j1", "f1m6nt2y"],
37
+ "Defnvf": ["fr7y8no", "f1dn0c6m"],
38
+ "z0pv9t": "f1hvqvul"
41
39
  },
42
40
  "outline": {},
43
41
  "primary": {
44
- "Bt6mj9": ["fptrtw7", "f51449u"],
45
- "xhdd7j": ["f1n4yg8a", "fbebbjo"],
46
- "Jxu9b0": ["fnmoi2n", "f1l3povx"]
42
+ "B1l9wao": ["f12j1tfo", "f1ufkr8r"],
43
+ "lcnrd8": ["f17lyyco", "f151o42i"],
44
+ "Brbpp8k": ["f1nb07eg", "fg8a8qi"]
47
45
  },
46
+ "secondary": {},
48
47
  "subtle": {
49
- "Bt6mj9": ["fh2ci0", "f1us00qf"],
50
- "xhdd7j": ["fj8butq", "fkv8iz"],
51
- "Jxu9b0": ["fjmcta", "fm99moz"]
48
+ "B1l9wao": ["f1ysqkm5", "f10nbrj"],
49
+ "lcnrd8": ["fn44ryq", "fwhhltr"],
50
+ "Brbpp8k": ["fg8lp5p", "f1p6hj0a"]
52
51
  },
53
52
  "transparent": {
54
- "Bt6mj9": ["fh2ci0", "f1us00qf"],
55
- "xhdd7j": ["fj8butq", "fkv8iz"],
56
- "Jxu9b0": ["fjmcta", "fm99moz"]
53
+ "B1l9wao": ["f1ysqkm5", "f10nbrj"],
54
+ "lcnrd8": ["fn44ryq", "fwhhltr"],
55
+ "Brbpp8k": ["fg8lp5p", "f1p6hj0a"]
57
56
  },
58
57
  "circular": {},
59
58
  "rounded": {},
60
59
  "square": {},
61
60
  "disabled": {
62
- "Bt6mj9": ["f1gu8nb8", "f7r8m4m"],
63
- "xhdd7j": ["f3cl9o2", "f12vilfs"],
64
- "Jxu9b0": ["f1lpnjjp", "f8nirj0"]
61
+ "B1l9wao": ["f10xrnr8", "f15nylwb"],
62
+ "lcnrd8": ["f11fwhjz", "f18vtcsx"],
63
+ "Brbpp8k": ["f31btwb", "fzgm9gq"]
64
+ },
65
+ "disabledHighContrast": {
66
+ "Bcsxniv": ["fj2q5vi", "f13tct40"],
67
+ "tl7e51": ["fb2mzc7", "f179dhpp"],
68
+ "mba178": ["f1ma39qa", "f1nzpdru"]
65
69
  }
66
70
  }, {
67
- "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;}", ".fwj9yvy .fui-SplitButton-primaryActionButton{border-top-right-radius:0;}", ".f1lzjiju .fui-SplitButton-primaryActionButton{border-top-left-radius:0;}", ".f1a35zaw .fui-SplitButton-primaryActionButton{border-bottom-right-radius:0;}", ".f1l6wyf7 .fui-SplitButton-primaryActionButton{border-bottom-left-radius:0;}", ".f104opbk .fui-SplitButton-menuButton{border-left-width:0;}", ".f147sopj .fui-SplitButton-menuButton{border-right-width:0;}", ".fxs6g7p .fui-SplitButton-menuButton{border-top-left-radius:0;}", ".f1moly3t .fui-SplitButton-menuButton{border-top-right-radius:0;}", ".f1m1y7kk .fui-SplitButton-menuButton{border-bottom-left-radius:0;}", ".ff82swa .fui-SplitButton-menuButton{border-bottom-right-radius:0;}", ".fly5x3f{width:100%;}", ".fptrtw7 .fui-SplitButton-primaryActionButton{border-right-color:var(--colorNeutralForegroundInverted);}", ".f51449u .fui-SplitButton-primaryActionButton{border-left-color:var(--colorNeutralForegroundInverted);}", ".fh2ci0 .fui-SplitButton-primaryActionButton{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1us00qf .fui-SplitButton-primaryActionButton{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1gu8nb8 .fui-SplitButton-primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f7r8m4m .fui-SplitButton-primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}"],
68
- "h": [".f1n4yg8a:hover .fui-SplitButton-primaryActionButton{border-right-color:var(--colorNeutralForegroundInverted);}", ".fbebbjo:hover .fui-SplitButton-primaryActionButton{border-left-color:var(--colorNeutralForegroundInverted);}", ".fj8butq:hover .fui-SplitButton-primaryActionButton{border-right-color:var(--colorNeutralStroke1Hover);}", ".fkv8iz:hover .fui-SplitButton-primaryActionButton{border-left-color:var(--colorNeutralStroke1Hover);}", ".f3cl9o2:hover .fui-SplitButton-primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f12vilfs:hover .fui-SplitButton-primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}"],
69
- "a": [".fnmoi2n:active .fui-SplitButton-primaryActionButton{border-right-color:var(--colorNeutralForegroundInverted);}", ".f1l3povx:active .fui-SplitButton-primaryActionButton{border-left-color:var(--colorNeutralForegroundInverted);}", ".fjmcta:active .fui-SplitButton-primaryActionButton{border-right-color:var(--colorNeutralStroke1Hover);}", ".fm99moz:active .fui-SplitButton-primaryActionButton{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1lpnjjp:active .fui-SplitButton-primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f8nirj0:active .fui-SplitButton-primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}"]
71
+ "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;}", ".f14uur2j .fui-SplitButton__primaryActionButton{border-top-right-radius:0;}", ".fc1btbj .fui-SplitButton__primaryActionButton{border-top-left-radius:0;}", ".fye5tvs .fui-SplitButton__primaryActionButton{border-bottom-right-radius:0;}", ".fc597qq .fui-SplitButton__primaryActionButton{border-bottom-left-radius:0;}", ".f1e8brtx .fui-SplitButton__menuButton{border-left-width:0;}", ".fr36rk3 .fui-SplitButton__menuButton{border-right-width:0;}", ".fxp12j1 .fui-SplitButton__menuButton{border-top-left-radius:0;}", ".f1m6nt2y .fui-SplitButton__menuButton{border-top-right-radius:0;}", ".fr7y8no .fui-SplitButton__menuButton{border-bottom-left-radius:0;}", ".f1dn0c6m .fui-SplitButton__menuButton{border-bottom-right-radius:0;}", ".f1hvqvul .fui-SplitButton__menuButton{min-width:0;}", ".f12j1tfo .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralForegroundInverted);}", ".f1ufkr8r .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralForegroundInverted);}", ".f1ysqkm5 .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStroke1Hover);}", ".f10nbrj .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStroke1Hover);}", ".f10xrnr8 .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f15nylwb .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}"],
72
+ "h": [".f17lyyco:hover .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralForegroundInverted);}", ".f151o42i:hover .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralForegroundInverted);}", ".f1nb07eg:hover:active .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralForegroundInverted);}", ".fg8a8qi:hover:active .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralForegroundInverted);}", ".fn44ryq:hover .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStroke1Hover);}", ".fwhhltr:hover .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStroke1Hover);}", ".fg8lp5p:hover:active .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStroke1Hover);}", ".f1p6hj0a:hover:active .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStroke1Hover);}", ".f11fwhjz:hover .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f18vtcsx:hover .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f31btwb:hover:active .fui-SplitButton__primaryActionButton{border-right-color:var(--colorNeutralStrokeDisabled);}", ".fzgm9gq:hover:active .fui-SplitButton__primaryActionButton{border-left-color:var(--colorNeutralStrokeDisabled);}"],
73
+ "t": ["@media (forced-colors: active){.fj2q5vi .fui-SplitButton__primaryActionButton{border-right-color:GrayText;}.f13tct40 .fui-SplitButton__primaryActionButton{border-left-color:GrayText;}}", "@media (forced-colors: active){.fb2mzc7:hover .fui-SplitButton__primaryActionButton{border-right-color:GrayText;}.f179dhpp:hover .fui-SplitButton__primaryActionButton{border-left-color:GrayText;}}", "@media (forced-colors: active){.f1ma39qa:hover:active .fui-SplitButton__primaryActionButton{border-right-color:GrayText;}.f1nzpdru:hover:active .fui-SplitButton__primaryActionButton{border-left-color:GrayText;}}"]
70
74
  });
71
75
 
72
76
  export const useSplitButtonStyles_unstable = state => {
@@ -74,18 +78,17 @@ export const useSplitButtonStyles_unstable = state => {
74
78
  const focusStyles = useFocusStyles();
75
79
  const {
76
80
  appearance,
77
- block,
78
81
  disabled,
79
82
  disabledFocusable
80
83
  } = state;
81
- state.root.className = mergeClasses(splitButtonClassName, rootStyles.base, block && rootStyles.block, appearance && rootStyles[appearance], (disabled || disabledFocusable) && rootStyles.disabled, state.root.className);
84
+ state.root.className = mergeClasses(splitButtonClassNames.root, rootStyles.base, appearance && rootStyles[appearance], (disabled || disabledFocusable) && rootStyles.disabled, (disabled || disabledFocusable) && rootStyles.disabledHighContrast, state.root.className);
82
85
 
83
86
  if (state.menuButton) {
84
- state.menuButton.className = mergeClasses(SplitButtonClassNames.menuButton, focusStyles.menuButton, state.menuButton.className);
87
+ state.menuButton.className = mergeClasses(splitButtonClassNames.menuButton, focusStyles.menuButton, state.menuButton.className);
85
88
  }
86
89
 
87
90
  if (state.primaryActionButton) {
88
- state.primaryActionButton.className = mergeClasses(SplitButtonClassNames.primaryActionButton, focusStyles.primaryActionButton, state.primaryActionButton.className);
91
+ state.primaryActionButton.className = mergeClasses(splitButtonClassNames.primaryActionButton, focusStyles.primaryActionButton, state.primaryActionButton.className);
89
92
  }
90
93
 
91
94
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SplitButton/useSplitButtonStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,QAAyC,gBAAzC;AACA,SAAS,+BAAT,QAAgD,yBAAhD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AAGA,OAAO,MAAM,oBAAoB,GAAG,iBAA7B;AAEP,MAAM,qBAAqB,GAAG;AAC5B,EAAA,mBAAmB,EAAE,GAAG,oBAAoB,sBADhB;AAE5B,EAAA,UAAU,EAAE,GAAG,oBAAoB;AAFP,CAA9B;;AAKA,MAAM,cAAc,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAvB;;AAaA,MAAM,aAAa,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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AY,CACvC,qBAAqB,CAAC,UADiB,EAEvC,WAAW,CAAC,UAF2B,EAGvC,KAAK,CAAC,UAAN,CAAiB,SAHsB,CAAzC;AAKD;;AAED,MAAI,KAAK,CAAC,mBAAV,EAA+B;AAC7B,IAAA,KAAK,CAAC,mBAAN,CAA0B,SAA1B,GAAsC,YAAY,CAChD,qBAAqB,CAAC,mBAD0B,EAEhD,WAAW,CAAC,mBAFoC,EAGhD,KAAK,CAAC,mBAAN,CAA0B,SAHsB,CAAlD;AAKD;;AAED,SAAO,KAAP;AACD,CAhCM","sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { SplitButtonSlots, SplitButtonState } from './SplitButton.types';\n\nexport const splitButtonClassNames: SlotClassNames<SplitButtonSlots> = {\n root: 'fui-SplitButton',\n menuButton: 'fui-SplitButton__menuButton',\n primaryActionButton: 'fui-SplitButton__primaryActionButton',\n};\n\nconst useFocusStyles = makeStyles({\n primaryActionButton: createCustomFocusIndicatorStyle({\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n }),\n\n menuButton: createCustomFocusIndicatorStyle({\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n }),\n});\n\nconst useRootStyles = makeStyles({\n // Base styles\n base: {\n display: 'inline-flex',\n justifyContent: 'stretch',\n position: 'relative',\n verticalAlign: 'middle',\n\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderTopRightRadius: 0,\n borderBottomRightRadius: 0,\n },\n\n [`& .${splitButtonClassNames.menuButton}`]: {\n borderLeftWidth: 0,\n borderTopLeftRadius: 0,\n borderBottomLeftRadius: 0,\n minWidth: 0,\n },\n },\n\n // Appearance variations\n outline: {\n /* No styles */\n },\n primary: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralForegroundInverted,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralForegroundInverted,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralForegroundInverted,\n },\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n },\n },\n transparent: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStroke1Hover,\n },\n },\n },\n\n // Shape variations\n circular: {},\n rounded: {},\n square: {},\n\n // Disabled styles\n disabled: {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: tokens.colorNeutralStrokeDisabled,\n },\n },\n },\n\n // Disabled high contrast styles\n disabledHighContrast: {\n '@media (forced-colors: active)': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'GrayText',\n },\n\n ':hover': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'GrayText',\n },\n },\n\n ':hover:active': {\n [`& .${splitButtonClassNames.primaryActionButton}`]: {\n borderRightColor: 'GrayText',\n },\n },\n },\n },\n});\n\nexport const useSplitButtonStyles_unstable = (state: SplitButtonState): SplitButtonState => {\n const rootStyles = useRootStyles();\n const focusStyles = useFocusStyles();\n\n const { appearance, disabled, disabledFocusable } = state;\n\n state.root.className = mergeClasses(\n splitButtonClassNames.root,\n rootStyles.base,\n appearance && rootStyles[appearance],\n (disabled || disabledFocusable) && rootStyles.disabled,\n (disabled || disabledFocusable) && rootStyles.disabledHighContrast,\n state.root.className,\n );\n\n if (state.menuButton) {\n state.menuButton.className = mergeClasses(\n splitButtonClassNames.menuButton,\n focusStyles.menuButton,\n state.menuButton.className,\n );\n }\n\n if (state.primaryActionButton) {\n state.primaryActionButton.className = mergeClasses(\n splitButtonClassNames.primaryActionButton,\n focusStyles.primaryActionButton,\n state.primaryActionButton.className,\n );\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ToggleButton/ToggleButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AAIA;;AAEG;;AACH,OAAO,MAAM,YAAY,gBAA2C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAClG,QAAM,KAAK,GAAG,wBAAwB,CAAC,KAAD,EAAQ,GAAR,CAAtC;AAEA,EAAA,8BAA8B,CAAC,KAAD,CAA9B;AAEA,SAAO,2BAA2B,CAAC,KAAD,CAAlC,CALkG,CAMlG;AACD,CAPmE,CAA7D;AASP,YAAY,CAAC,WAAb,GAA2B,cAA3B","sourceRoot":""}
1
+ {"version":3,"sources":["components/ToggleButton/ToggleButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,2BAAT,QAA4C,sBAA5C;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AAIA;;AAEG;;AACH,OAAO,MAAM,YAAY,gBAA2C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAClG,QAAM,KAAK,GAAG,wBAAwB,CAAC,KAAD,EAAQ,GAAR,CAAtC;AAEA,EAAA,8BAA8B,CAAC,KAAD,CAA9B;AAEA,SAAO,2BAA2B,CAAC,KAAD,CAAlC,CALkG,CAMlG;AACD,CAPmE,CAA7D;AASP,YAAY,CAAC,WAAb,GAA2B,cAA3B","sourcesContent":["import * as React from 'react';\nimport { renderToggleButton_unstable } from './renderToggleButton';\nimport { useToggleButton_unstable } from './useToggleButton';\nimport { useToggleButtonStyles_unstable } from './useToggleButtonStyles';\nimport type { ToggleButtonProps } from './ToggleButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * ToggleButtons are buttons that toggle between two defined states when triggered.\n */\nexport const ToggleButton: ForwardRefComponent<ToggleButtonProps> = React.forwardRef((props, ref) => {\n const state = useToggleButton_unstable(props, ref);\n\n useToggleButtonStyles_unstable(state);\n\n return renderToggleButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ToggleButtonProps>;\n\nToggleButton.displayName = 'ToggleButton';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleButton.types.js","sourceRoot":"","sources":["../../../src/components/ToggleButton/ToggleButton.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"ToggleButton.types.js","sourceRoot":"../src/","sources":["components/ToggleButton/ToggleButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ButtonProps, ButtonState } from '../Button/Button.types';\n\nexport type ToggleButtonProps = ButtonProps & {\n /**\n * Defines whether the `ToggleButton` is initially in a checked state or not when rendered.\n *\n * @default false\n */\n defaultChecked?: boolean;\n\n /**\n * Defines the controlled checked state of the `ToggleButton`.\n * If passed, `ToggleButton` ignores the `defaultChecked` property.\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 * @default false\n */\n checked?: boolean;\n};\n\nexport type ToggleButtonState = ButtonState & Required<Pick<ToggleButtonProps, 'checked'>>;\n"]}
@@ -2,5 +2,5 @@ export * from './ToggleButton';
2
2
  export * from './ToggleButton.types';
3
3
  export * from './renderToggleButton';
4
4
  export * from './useToggleButton';
5
- export { toggleButtonClassName, useToggleButtonStyles_unstable } from './useToggleButtonStyles';
5
+ export { toggleButtonClassNames, useToggleButtonStyles_unstable } from './useToggleButtonStyles';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ToggleButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/ToggleButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,OAAO,EAAE,sBAAsB,EAAE,8BAA8B,EAAE,MAAM,yBAAyB,CAAC","sourcesContent":["export * from './ToggleButton';\nexport * from './ToggleButton.types';\nexport * from './renderToggleButton';\nexport * from './useToggleButton';\nexport { toggleButtonClassNames, useToggleButtonStyles_unstable } from './useToggleButtonStyles';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"renderToggleButton.js","sourceRoot":"","sources":["../../../src/components/ToggleButton/renderToggleButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"file":"renderToggleButton.js","sourceRoot":"../src/","sources":["components/ToggleButton/renderToggleButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,IAAI,2BAA2B,EAAE,MAAM,wBAAwB,CAAC","sourcesContent":["export { renderButton_unstable as renderToggleButton_unstable } from '../Button/renderButton';\n"]}
@@ -1,5 +1,4 @@
1
- import { useControllableState } from '@fluentui/react-utilities';
2
- import * as React from 'react';
1
+ import { useToggleState } from '../../utils/useToggleState';
3
2
  import { useButton_unstable } from '../Button/useButton';
4
3
  /**
5
4
  * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns
@@ -8,45 +7,8 @@ import { useButton_unstable } from '../Button/useButton';
8
7
  * @param ref - User provided ref to be passed to the ToggleButton component.
9
8
  */
10
9
 
11
- export const useToggleButton_unstable = ({
12
- checked,
13
- defaultChecked,
14
- ...props
15
- }, ref) => {
16
- const {
17
- disabled,
18
- disabledFocusable
19
- } = props;
10
+ export const useToggleButton_unstable = (props, ref) => {
20
11
  const buttonState = useButton_unstable(props, ref);
21
- const {
22
- role,
23
- onClick
24
- } = buttonState.root;
25
- const [checkedValue, setCheckedValue] = useControllableState({
26
- state: checked,
27
- defaultState: defaultChecked,
28
- initialState: false
29
- });
30
- const isCheckboxTypeRole = role === 'menuitemcheckbox' || role === 'checkbox';
31
- return { // Button state
32
- ...buttonState,
33
- // State calculated from a set of props
34
- checked: checkedValue,
35
- // Slots definition
36
- root: { ...buttonState.root,
37
- [isCheckboxTypeRole ? 'aria-checked' : 'aria-pressed']: !disabled && !disabledFocusable && checkedValue,
38
- onClick: React.useCallback(ev => {
39
- if (onClick) {
40
- onClick(ev);
41
-
42
- if (ev.defaultPrevented) {
43
- return;
44
- }
45
- }
46
-
47
- setCheckedValue(!checkedValue);
48
- }, [checkedValue, setCheckedValue, onClick])
49
- }
50
- };
12
+ return useToggleState(props, buttonState);
51
13
  };
52
14
  //# sourceMappingURL=useToggleButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ToggleButton/useToggleButton.ts"],"names":[],"mappings":"AAAA,SAAS,oBAAT,QAAqC,2BAArC;AACA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,kBAAT,QAAmC,qBAAnC;AAGA;;;;;AAKG;;AACH,OAAO,MAAM,wBAAwB,GAAG,CACtC;AAAE,EAAA,OAAF;AAAW,EAAA,cAAX;AAA2B,KAAG;AAA9B,CADsC,EAEtC,GAFsC,KAGjB;AACrB,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA;AAAZ,MAAkC,KAAxC;AACA,QAAM,WAAW,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAtC;AACA,QAAM;AAAE,IAAA,IAAF;AAAQ,IAAA;AAAR,MAAoB,WAAW,CAAC,IAAtC;AAEA,QAAM,CAAC,YAAD,EAAe,eAAf,IAAkC,oBAAoB,CAAC;AAC3D,IAAA,KAAK,EAAE,OADoD;AAE3D,IAAA,YAAY,EAAE,cAF6C;AAG3D,IAAA,YAAY,EAAE;AAH6C,GAAD,CAA5D;AAMA,QAAM,kBAAkB,GAAG,IAAI,KAAK,kBAAT,IAA+B,IAAI,KAAK,UAAnE;AAEA,SAAO,EACL;AACA,OAAG,WAFE;AAIL;AACA,IAAA,OAAO,EAAE,YALJ;AAOL;AACA,IAAA,IAAI,EAAE,EACJ,GAAG,WAAW,CAAC,IADX;AAEJ,OAAC,kBAAkB,GAAG,cAAH,GAAoB,cAAvC,GAAwD,CAAC,QAAD,IAAa,CAAC,iBAAd,IAAmC,YAFvF;AAGJ,MAAA,OAAO,EAAE,KAAK,CAAC,WAAN,CACP,EAAE,IAAG;AACH,YAAI,OAAJ,EAAa;AACX,UAAA,OAAO,CAAC,EAAD,CAAP;;AAEA,cAAI,EAAE,CAAC,gBAAP,EAAyB;AACvB;AACD;AACF;;AAED,QAAA,eAAe,CAAC,CAAC,YAAF,CAAf;AACD,OAXM,EAYP,CAAC,YAAD,EAAe,eAAf,EAAgC,OAAhC,CAZO;AAHL;AARD,GAAP;AA2BD,CA3CM","sourceRoot":""}
1
+ {"version":3,"sources":["components/ToggleButton/useToggleButton.ts"],"names":[],"mappings":"AACA,SAAS,cAAT,QAA+B,4BAA/B;AACA,SAAS,kBAAT,QAAmC,qBAAnC;AAGA;;;;;AAKG;;AACH,OAAO,MAAM,wBAAwB,GAAG,CACtC,KADsC,EAEtC,GAFsC,KAGjB;AACrB,QAAM,WAAW,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAtC;AAEA,SAAO,cAAc,CAAC,KAAD,EAAQ,WAAR,CAArB;AACD,CAPM","sourcesContent":["import * as React from 'react';\nimport { useToggleState } from '../../utils/useToggleState';\nimport { useButton_unstable } from '../Button/useButton';\nimport type { ToggleButtonProps, ToggleButtonState } from './ToggleButton.types';\n\n/**\n * Given user props, defines default props for the ToggleButton, calls useButtonState and useChecked, and returns\n * processed state.\n * @param props - User provided props to the ToggleButton component.\n * @param ref - User provided ref to be passed to the ToggleButton component.\n */\nexport const useToggleButton_unstable = (\n props: ToggleButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ToggleButtonState => {\n const buttonState = useButton_unstable(props, ref);\n\n return useToggleState(props, buttonState);\n};\n"],"sourceRoot":"../src/"}
@@ -1,37 +1,93 @@
1
- import { shorthands, mergeClasses, __styles } from '@griffel/react';
1
+ import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';
2
+ import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
2
3
  import { tokens } from '@fluentui/react-theme';
4
+ import { shorthands, mergeClasses, __styles } from '@griffel/react';
3
5
  import { useButtonStyles_unstable } from '../Button/useButtonStyles';
4
- export const toggleButtonClassName = 'fui-ToggleButton';
5
-
6
- const useCheckedStyles = /*#__PURE__*/__styles({
6
+ export const toggleButtonClassNames = {
7
+ root: 'fui-ToggleButton',
8
+ icon: 'fui-ToggleButton__icon'
9
+ };
10
+ export const useCheckedStyles = /*#__PURE__*/__styles({
7
11
  "base": {
8
12
  "De3pzq": "f1nfm20t",
9
13
  "g2u3we": "fj3muxo",
10
14
  "h3c5rm": ["f1akhkt", "f1lxtadh"],
11
15
  "B9xav0g": "f1aperda",
12
16
  "zhjwy3": ["f1lxtadh", "f1akhkt"],
13
- "sj55zd": "f19n0e5",
17
+ "sj55zd": "f14nttnl",
14
18
  "B4j52fo": "f192inf7",
15
19
  "Bekrc4i": ["f5tn483", "f1ojsxk5"],
16
20
  "Bn0qgzm": "f1vxd6vx",
17
21
  "ibv6hh": ["f1ojsxk5", "f5tn483"],
22
+ "D0sxk3": "fxoiby5",
23
+ "t6yez3": "f15q0o9g",
18
24
  "Jwef8y": "f1knas48",
19
25
  "Bgoe8wy": "fvcxoqz",
20
26
  "Bwzppfd": ["f1ub3y4t", "f1m52nbi"],
21
27
  "oetu4i": "f1xlaoq0",
22
28
  "gg5e9n": ["f1m52nbi", "f1ub3y4t"],
23
- "Bi91k9c": "fax3udt",
24
- "ecr2s2": "fb40n2d",
25
- "B6oc9vd": "fvs00aa",
26
- "ak43y8": ["f1assf6x", "f4ruux4"],
27
- "wmxk5l": "fumykes",
28
- "B50zh58": ["f4ruux4", "f1assf6x"],
29
- "lj723h": "f1r2dosr"
29
+ "Bi91k9c": "feu1g3u",
30
+ "iro3zm": "f141de4g",
31
+ "b661bw": "f11v6sdu",
32
+ "Bk6r4ia": ["f9yn8i4", "f1ajwf28"],
33
+ "B9zn80p": "f1uwu36w",
34
+ "Bpld233": ["f1ajwf28", "f9yn8i4"],
35
+ "B2d53fq": "f9olfzr"
36
+ },
37
+ "highContrast": {
38
+ "Bsw6fvg": "f1rirnrt",
39
+ "Bjwas2f": "f132fbg1",
40
+ "Bn1d65q": ["f1ene5x0", "fzbc999"],
41
+ "Bxeuatn": "f6jgcol",
42
+ "n51gp8": ["fzbc999", "f1ene5x0"],
43
+ "Bbusuzp": "f1lkg8j3",
44
+ "ycbfsm": "fkc42ay",
45
+ "Bqrx1nm": "fq7113v",
46
+ "pgvf35": "ff1wgvm",
47
+ "Bh7lczh": ["fiob0tu", "f1x4h75k"],
48
+ "dpv3f4": "f1j6scgf",
49
+ "Bpnjhaq": ["f1x4h75k", "fiob0tu"],
50
+ "ze5xyy": "f4xjyn1",
51
+ "g2kj27": "fbgcvur",
52
+ "Bf756sw": "f1ks1yx8",
53
+ "Bow2dr7": ["f1o6qegi", "fmxjhhp"],
54
+ "Bvhedfk": "fcnxywj",
55
+ "Gye4lf": ["fmxjhhp", "f1o6qegi"],
56
+ "pc6evw": "f9ddjv3",
57
+ "G867l3": "fr7nen4",
58
+ "gdbnj": ["f10aq6ld", "fq8rgo9"],
59
+ "mxns5l": "f1md2qq2",
60
+ "o3nasb": ["fq8rgo9", "f10aq6ld"]
61
+ },
62
+ "highContrastFocusStyles": {
63
+ "Brovlpu": "ftqa4ok",
64
+ "rkqiyj": "f12vviyd",
65
+ "Bs3nqqt": ["f8ccjn4", "f1kizmkg"],
66
+ "B4mky7d": "f14ges4w",
67
+ "Bviepcv": ["f1kizmkg", "f8ccjn4"],
68
+ "Bc28wk5": "flnfwa4",
69
+ "w1edd7": ["fuav46a", "fcnogh1"],
70
+ "Ba8awiv": "f19zilzp",
71
+ "I50xcx": ["fcnogh1", "fuav46a"],
72
+ "Bnmjwt4": "f4h99gy",
73
+ "Jopkrh": ["f4u9xa3", "f1uetw7i"],
74
+ "hhrs2v": "fnkqhj8",
75
+ "B7jbng7": ["f1uetw7i", "f4u9xa3"],
76
+ "Bh48x57": "f1kn9aoz"
30
77
  },
31
78
  "outline": {
32
79
  "De3pzq": "f1q9pm1r",
80
+ "B4j52fo": "fgx37oo",
81
+ "Bekrc4i": ["f130t4y6", "f1efpmoh"],
82
+ "Bn0qgzm": "fv51ejd",
83
+ "ibv6hh": ["f1efpmoh", "f130t4y6"],
33
84
  "Jwef8y": "fjxutwb",
34
- "ecr2s2": "fophhak"
85
+ "iro3zm": "fwiml72",
86
+ "Brovlpu": "ftqa4ok",
87
+ "Bnmjwt4": "f1d6g2h1",
88
+ "Jopkrh": ["fs8i4z6", "fgzizio"],
89
+ "hhrs2v": "fajrl09",
90
+ "B7jbng7": ["fgzizio", "fs8i4z6"]
35
91
  },
36
92
  "primary": {
37
93
  "De3pzq": "f8w4g0q",
@@ -46,13 +102,14 @@ const useCheckedStyles = /*#__PURE__*/__styles({
46
102
  "oetu4i": "f1ukrpxl",
47
103
  "gg5e9n": ["fecsdlb", "fr80ssc"],
48
104
  "Bi91k9c": "f1rq72xc",
49
- "ecr2s2": "fsp1bjw",
50
- "B6oc9vd": "ff472gp",
51
- "ak43y8": ["f4yyc7m", "ft2aflc"],
52
- "wmxk5l": "fggejwh",
53
- "B50zh58": ["ft2aflc", "f4yyc7m"],
54
- "lj723h": "f18otbis"
105
+ "iro3zm": "fnp9lpt",
106
+ "b661bw": "f1h0usnq",
107
+ "Bk6r4ia": ["fs4ktlq", "fx2bmrt"],
108
+ "B9zn80p": "f16h9ulv",
109
+ "Bpld233": ["fx2bmrt", "fs4ktlq"],
110
+ "B2d53fq": "f1d6v5y2"
55
111
  },
112
+ "secondary": {},
56
113
  "subtle": {
57
114
  "De3pzq": "fq5gl1p",
58
115
  "g2u3we": "f1p3nwhy",
@@ -66,12 +123,12 @@ const useCheckedStyles = /*#__PURE__*/__styles({
66
123
  "oetu4i": "f1ukrpxl",
67
124
  "gg5e9n": ["fecsdlb", "fr80ssc"],
68
125
  "Bi91k9c": "f139oj5f",
69
- "ecr2s2": "f1wfn5kd",
70
- "B6oc9vd": "ff472gp",
71
- "ak43y8": ["f4yyc7m", "ft2aflc"],
72
- "wmxk5l": "fggejwh",
73
- "B50zh58": ["ft2aflc", "f4yyc7m"],
74
- "lj723h": "f19au66r"
126
+ "iro3zm": "fsv2rcd",
127
+ "b661bw": "f1h0usnq",
128
+ "Bk6r4ia": ["fs4ktlq", "fx2bmrt"],
129
+ "B9zn80p": "f16h9ulv",
130
+ "Bpld233": ["fx2bmrt", "fs4ktlq"],
131
+ "B2d53fq": "f1fg1p5m"
75
132
  },
76
133
  "transparent": {
77
134
  "De3pzq": "f1q9pm1r",
@@ -86,20 +143,20 @@ const useCheckedStyles = /*#__PURE__*/__styles({
86
143
  "oetu4i": "f1ukrpxl",
87
144
  "gg5e9n": ["fecsdlb", "fr80ssc"],
88
145
  "Bi91k9c": "f139oj5f",
89
- "ecr2s2": "fophhak",
90
- "B6oc9vd": "ff472gp",
91
- "ak43y8": ["f4yyc7m", "ft2aflc"],
92
- "wmxk5l": "fggejwh",
93
- "B50zh58": ["ft2aflc", "f4yyc7m"],
94
- "lj723h": "f19au66r"
146
+ "iro3zm": "fwiml72",
147
+ "b661bw": "f1h0usnq",
148
+ "Bk6r4ia": ["fs4ktlq", "fx2bmrt"],
149
+ "B9zn80p": "f16h9ulv",
150
+ "Bpld233": ["fx2bmrt", "fs4ktlq"],
151
+ "B2d53fq": "f1fg1p5m"
95
152
  }
96
153
  }, {
97
- "d": [".f1nfm20t{background-color: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);}", ".f1q9pm1r{background-color:var(--colorTransparentBackgroundSelected);}", ".f8w4g0q{background-color: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);}", ".fq5gl1p{background-color:var(--colorSubtleBackgroundSelected);}", ".f1qj7y59{color:var(--colorNeutralForeground2BrandSelected);}"],
98
- "h": [".f1knas48:hover{background-color: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);}", ".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}", ".f15wkkf3:hover{background-color: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);}", ".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".f139oj5f:hover{color:var(--colorNeutralForeground2BrandHover);}"],
99
- "a": [".fb40n2d:active{background-color: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);}", ".fophhak:active{background-color:var(--colorTransparentBackgroundPressed);}", ".fsp1bjw:active{background-color: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);}", ".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f19au66r:active{color:var(--colorNeutralForeground2BrandPressed);}"]
154
+ "d": [".f1nfm20t{background-color: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);}", ".f14nttnl{color:var(--colorNeutralForeground1Selected);}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fxoiby5 .fui-Icon-filled{display:inline;}", ".f15q0o9g .fui-Icon-regular{display:none;}", "[data-keyboard-nav] .f12vviyd:focus{border-top-width:1px;}", "[data-keyboard-nav] .f8ccjn4:focus{border-right-width:1px;}", "[data-keyboard-nav] .f1kizmkg:focus{border-left-width:1px;}", "[data-keyboard-nav] .f14ges4w:focus{border-bottom-width:1px;}", "[data-keyboard-nav] .flnfwa4:focus{border-top-style:solid;}", "[data-keyboard-nav] .fuav46a:focus{border-right-style:solid;}", "[data-keyboard-nav] .fcnogh1:focus{border-left-style:solid;}", "[data-keyboard-nav] .f19zilzp:focus{border-bottom-style:solid;}", "[data-keyboard-nav] .f4h99gy:focus{border-top-color:HighlightText;}", "[data-keyboard-nav] .f4u9xa3:focus{border-right-color:HighlightText;}", "[data-keyboard-nav] .f1uetw7i:focus{border-left-color:HighlightText;}", "[data-keyboard-nav] .fnkqhj8:focus{border-bottom-color:HighlightText;}", "[data-keyboard-nav] .f1kn9aoz:focus{outline-color:Highlight;}", ".f1q9pm1r{background-color:var(--colorTransparentBackgroundSelected);}", ".fgx37oo{border-top-width:var(--strokeWidthThicker);}", ".f130t4y6{border-right-width:var(--strokeWidthThicker);}", ".f1efpmoh{border-left-width:var(--strokeWidthThicker);}", ".fv51ejd{border-bottom-width:var(--strokeWidthThicker);}", "[data-keyboard-nav] .f1d6g2h1:focus{border-top-color:var(--colorNeutralStroke1);}", "[data-keyboard-nav] .fs8i4z6:focus{border-right-color:var(--colorNeutralStroke1);}", "[data-keyboard-nav] .fgzizio:focus{border-left-color:var(--colorNeutralStroke1);}", "[data-keyboard-nav] .fajrl09:focus{border-bottom-color:var(--colorNeutralStroke1);}", ".f8w4g0q{background-color: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);}", ".fq5gl1p{background-color:var(--colorSubtleBackgroundSelected);}", ".f1qj7y59{color:var(--colorNeutralForeground2BrandSelected);}"],
155
+ "h": [".f1knas48:hover{background-color: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);}", ".feu1g3u:hover{color:var(--colorNeutralForeground1Hover);}", ".f141de4g:hover:active{background-color:var(--colorNeutralBackground1Pressed);}", ".f11v6sdu:hover:active{border-top-color:var(--colorNeutralStroke1Pressed);}", ".f9yn8i4:hover:active{border-right-color:var(--colorNeutralStroke1Pressed);}", ".f1ajwf28:hover:active{border-left-color:var(--colorNeutralStroke1Pressed);}", ".f1uwu36w:hover:active{border-bottom-color:var(--colorNeutralStroke1Pressed);}", ".f9olfzr:hover:active{color:var(--colorNeutralForeground1Pressed);}", ".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}", ".fwiml72:hover:active{background-color:var(--colorTransparentBackgroundPressed);}", ".f15wkkf3:hover{background-color: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);}", ".fnp9lpt:hover:active{background-color:var(--colorBrandBackgroundPressed);}", ".f1h0usnq:hover:active{border-top-color:transparent;}", ".fs4ktlq:hover:active{border-right-color:transparent;}", ".fx2bmrt:hover:active{border-left-color:transparent;}", ".f16h9ulv:hover:active{border-bottom-color:transparent;}", ".f1d6v5y2:hover:active{color:var(--colorNeutralForegroundOnBrand);}", ".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".f139oj5f:hover{color:var(--colorNeutralForeground2BrandHover);}", ".fsv2rcd:hover:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f1fg1p5m:hover:active{color:var(--colorNeutralForeground2BrandPressed);}"],
156
+ "t": ["@media (forced-colors: active){.f1rirnrt{background-color:Highlight;}}", "@media (forced-colors: active){.f132fbg1{border-top-color:Highlight;}}", "@media (forced-colors: active){.f1ene5x0{border-right-color:Highlight;}.fzbc999{border-left-color:Highlight;}}", "@media (forced-colors: active){.f6jgcol{border-bottom-color:Highlight;}}", "@media (forced-colors: active){.fzbc999{border-left-color:Highlight;}.f1ene5x0{border-right-color:Highlight;}}", "@media (forced-colors: active){.f1lkg8j3{color:HighlightText;}}", "@media (forced-colors: active){.fkc42ay{forced-color-adjust:none;}}", "@media (forced-colors: active){.fq7113v:hover{background-color:HighlightText;}}", "@media (forced-colors: active){.ff1wgvm:hover{border-top-color:Highlight;}}", "@media (forced-colors: active){.fiob0tu:hover{border-right-color:Highlight;}.f1x4h75k:hover{border-left-color:Highlight;}}", "@media (forced-colors: active){.f1j6scgf:hover{border-bottom-color:Highlight;}}", "@media (forced-colors: active){.f1x4h75k:hover{border-left-color:Highlight;}.fiob0tu:hover{border-right-color:Highlight;}}", "@media (forced-colors: active){.f4xjyn1:hover{color:Highlight;}}", "@media (forced-colors: active){.fbgcvur:hover:active{background-color:HighlightText;}}", "@media (forced-colors: active){.f1ks1yx8:hover:active{border-top-color:Highlight;}}", "@media (forced-colors: active){.f1o6qegi:hover:active{border-right-color:Highlight;}.fmxjhhp:hover:active{border-left-color:Highlight;}}", "@media (forced-colors: active){.fcnxywj:hover:active{border-bottom-color:Highlight;}}", "@media (forced-colors: active){.fmxjhhp:hover:active{border-left-color:Highlight;}.f1o6qegi:hover:active{border-right-color:Highlight;}}", "@media (forced-colors: active){.f9ddjv3:hover:active{color:Highlight;}}", "@media (forced-colors: active){.fr7nen4:focus{border-top-color:Highlight;}}", "@media (forced-colors: active){.f10aq6ld:focus{border-right-color:Highlight;}.fq8rgo9:focus{border-left-color:Highlight;}}", "@media (forced-colors: active){.f1md2qq2:focus{border-bottom-color:Highlight;}}", "@media (forced-colors: active){.fq8rgo9:focus{border-left-color:Highlight;}.f10aq6ld:focus{border-right-color:Highlight;}}"],
157
+ "f": [".ftqa4ok:focus{outline-style:none;}"]
100
158
  });
101
-
102
- const useDisabledStyles = /*#__PURE__*/__styles({
159
+ export const useDisabledStyles = /*#__PURE__*/__styles({
103
160
  "base": {
104
161
  "De3pzq": "f1bg9a2p",
105
162
  "g2u3we": "f1jj8ep1",
@@ -113,12 +170,12 @@ const useDisabledStyles = /*#__PURE__*/__styles({
113
170
  "oetu4i": "f1jnshp0",
114
171
  "gg5e9n": ["f18rmfxp", "f1gwvigk"],
115
172
  "Bi91k9c": "fvgxktp",
116
- "ecr2s2": "f1ryyzvn",
117
- "B6oc9vd": "fdi4vxw",
118
- "ak43y8": ["f4ryxzl", "fkdgpbx"],
119
- "wmxk5l": "fcmhn06",
120
- "B50zh58": ["fkdgpbx", "f4ryxzl"],
121
- "lj723h": "f19wldhg"
173
+ "iro3zm": "f1t6o4dc",
174
+ "b661bw": "f10ztigi",
175
+ "Bk6r4ia": ["f1ft5sdu", "f1gzf82w"],
176
+ "B9zn80p": "f12zbtn2",
177
+ "Bpld233": ["f1gzf82w", "f1ft5sdu"],
178
+ "B2d53fq": "fcvwxyo"
122
179
  },
123
180
  "outline": {},
124
181
  "primary": {
@@ -130,11 +187,12 @@ const useDisabledStyles = /*#__PURE__*/__styles({
130
187
  "Bwzppfd": ["fr80ssc", "fecsdlb"],
131
188
  "oetu4i": "f1ukrpxl",
132
189
  "gg5e9n": ["fecsdlb", "fr80ssc"],
133
- "B6oc9vd": "ff472gp",
134
- "ak43y8": ["f4yyc7m", "ft2aflc"],
135
- "wmxk5l": "fggejwh",
136
- "B50zh58": ["ft2aflc", "f4yyc7m"]
190
+ "b661bw": "f1h0usnq",
191
+ "Bk6r4ia": ["fs4ktlq", "fx2bmrt"],
192
+ "B9zn80p": "f16h9ulv",
193
+ "Bpld233": ["fx2bmrt", "fs4ktlq"]
137
194
  },
195
+ "secondary": {},
138
196
  "subtle": {
139
197
  "De3pzq": "f3rmtva",
140
198
  "g2u3we": "f1p3nwhy",
@@ -146,11 +204,11 @@ const useDisabledStyles = /*#__PURE__*/__styles({
146
204
  "Bwzppfd": ["fr80ssc", "fecsdlb"],
147
205
  "oetu4i": "f1ukrpxl",
148
206
  "gg5e9n": ["fecsdlb", "fr80ssc"],
149
- "ecr2s2": "f1rot6hk",
150
- "B6oc9vd": "ff472gp",
151
- "ak43y8": ["f4yyc7m", "ft2aflc"],
152
- "wmxk5l": "fggejwh",
153
- "B50zh58": ["ft2aflc", "f4yyc7m"]
207
+ "iro3zm": "fvaszet",
208
+ "b661bw": "f1h0usnq",
209
+ "Bk6r4ia": ["fs4ktlq", "fx2bmrt"],
210
+ "B9zn80p": "f16h9ulv",
211
+ "Bpld233": ["fx2bmrt", "fs4ktlq"]
154
212
  },
155
213
  "transparent": {
156
214
  "De3pzq": "f3rmtva",
@@ -163,18 +221,16 @@ const useDisabledStyles = /*#__PURE__*/__styles({
163
221
  "Bwzppfd": ["fr80ssc", "fecsdlb"],
164
222
  "oetu4i": "f1ukrpxl",
165
223
  "gg5e9n": ["fecsdlb", "fr80ssc"],
166
- "ecr2s2": "f1rot6hk",
167
- "B6oc9vd": "ff472gp",
168
- "ak43y8": ["f4yyc7m", "ft2aflc"],
169
- "wmxk5l": "fggejwh",
170
- "B50zh58": ["ft2aflc", "f4yyc7m"]
224
+ "iro3zm": "fvaszet",
225
+ "b661bw": "f1h0usnq",
226
+ "Bk6r4ia": ["fs4ktlq", "fx2bmrt"],
227
+ "B9zn80p": "f16h9ulv",
228
+ "Bpld233": ["fx2bmrt", "fs4ktlq"]
171
229
  }
172
230
  }, {
173
231
  "d": [".f1bg9a2p{background-color: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;}", ".f3rmtva{background-color:transparent;}"],
174
- "h": [".f1falr9n:hover{background-color: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;}", ".f1cio4g9:hover{background-color:transparent;}"],
175
- "a": [".f1ryyzvn:active{background-color: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;}", ".f1rot6hk:active{background-color:transparent;}"]
232
+ "h": [".f1falr9n:hover{background-color: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);}", ".f1t6o4dc:hover:active{background-color:var(--colorNeutralBackgroundDisabled);}", ".f10ztigi:hover:active{border-top-color:var(--colorNeutralStrokeDisabled);}", ".f1ft5sdu:hover:active{border-right-color:var(--colorNeutralStrokeDisabled);}", ".f1gzf82w:hover:active{border-left-color:var(--colorNeutralStrokeDisabled);}", ".f12zbtn2:hover:active{border-bottom-color:var(--colorNeutralStrokeDisabled);}", ".fcvwxyo:hover:active{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;}", ".f1h0usnq:hover:active{border-top-color:transparent;}", ".fs4ktlq:hover:active{border-right-color:transparent;}", ".fx2bmrt:hover:active{border-left-color:transparent;}", ".f16h9ulv:hover:active{border-bottom-color:transparent;}", ".f1cio4g9:hover{background-color:transparent;}", ".fvaszet:hover:active{background-color:transparent;}"]
176
233
  });
177
-
178
234
  export const useToggleButtonStyles_unstable = state => {
179
235
  const checkedStyles = useCheckedStyles();
180
236
  const disabledStyles = useDisabledStyles();
@@ -184,10 +240,15 @@ export const useToggleButtonStyles_unstable = state => {
184
240
  disabled,
185
241
  disabledFocusable
186
242
  } = state;
187
- state.root.className = mergeClasses(toggleButtonClassName, // Checked styles
188
- checked && checkedStyles.base, appearance && checked && checkedStyles[appearance], // Disabled styles
243
+ state.root.className = mergeClasses(toggleButtonClassNames.root, // Checked styles
244
+ checked && checkedStyles.base, checked && checkedStyles.highContrast, appearance && checked && checkedStyles[appearance], // Disabled styles
189
245
  (disabled || disabledFocusable) && disabledStyles.base, appearance && (disabled || disabledFocusable) && disabledStyles[appearance], // User provided class name
190
246
  state.root.className);
247
+
248
+ if (state.icon) {
249
+ state.icon.className = mergeClasses(toggleButtonClassNames.icon, state.icon.className);
250
+ }
251
+
191
252
  useButtonStyles_unstable(state);
192
253
  return state;
193
254
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ToggleButton/useToggleButtonStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AACA,SAAS,wBAAT,QAAyC,2BAAzC;AAGA,OAAO,MAAM,qBAAqB,GAAG,kBAA9B;;AAEP,MAAM,gBAAgB,gBAAG;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;A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AAI,iBAAjB,CAAV,IAAiD,cAAc,CAAC,UAAD,CAV9B,EAYjC;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAbsB,CAAnC;;AAgBA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,sBAAsB,CAAC,IAAxB,EAA8B,KAAK,CAAC,IAAN,CAAW,SAAzC,CAAnC;AACD;;AAED,EAAA,wBAAwB,CAAC,KAAD,CAAxB;AAEA,SAAO,KAAP;AACD,CA7BM","sourcesContent":["import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { shorthands, mergeClasses, makeStyles } from '@griffel/react';\nimport { useButtonStyles_unstable } from '../Button/useButtonStyles';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ButtonSlots } from '../Button/Button.types';\nimport type { ToggleButtonState } from './ToggleButton.types';\n\nexport const toggleButtonClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fui-ToggleButton',\n icon: 'fui-ToggleButton__icon',\n};\n\nexport const useCheckedStyles = makeStyles({\n // Base styles\n base: {\n backgroundColor: tokens.colorNeutralBackground1Selected,\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n color: tokens.colorNeutralForeground1Selected,\n\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n color: tokens.colorNeutralForeground1Hover,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n color: tokens.colorNeutralForeground1Pressed,\n },\n },\n\n // High contrast styles\n highContrast: {\n '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('Highlight'),\n color: 'HighlightText',\n forcedColorAdjust: 'none',\n\n ':hover': {\n backgroundColor: 'HighlightText',\n ...shorthands.borderColor('Highlight'),\n color: 'Highlight',\n },\n\n ':hover:active': {\n backgroundColor: 'HighlightText',\n ...shorthands.borderColor('Highlight'),\n color: 'Highlight',\n },\n\n ':focus': {\n ...shorthands.borderColor('Highlight'),\n },\n },\n },\n highContrastFocusStyles: createCustomFocusIndicatorStyle({\n ...shorthands.border('1px', 'solid', 'HighlightText'),\n outlineColor: 'Highlight',\n }),\n\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackgroundSelected,\n ...shorthands.borderWidth(tokens.strokeWidthThicker),\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n },\n\n ...createCustomFocusIndicatorStyle({\n ...shorthands.borderColor(tokens.colorNeutralStroke1),\n }),\n },\n primary: {\n backgroundColor: tokens.colorBrandBackgroundSelected,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand,\n\n ':hover': {\n backgroundColor: tokens.colorBrandBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorBrandBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackgroundSelected,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandSelected,\n\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandHover,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackgroundSelected,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandSelected,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandHover,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n});\n\nexport const useDisabledStyles = makeStyles({\n // Base styles\n base: {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n // Appearance variations\n outline: {\n /* No styles */\n },\n primary: {\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n ...shorthands.borderColor('transparent'),\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n backgroundColor: 'transparent',\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n backgroundColor: 'transparent',\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n backgroundColor: 'transparent',\n ...shorthands.borderColor('transparent'),\n },\n },\n transparent: {\n backgroundColor: 'transparent',\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n backgroundColor: 'transparent',\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n backgroundColor: 'transparent',\n ...shorthands.borderColor('transparent'),\n },\n },\n});\n\nexport const useToggleButtonStyles_unstable = (state: ToggleButtonState): ToggleButtonState => {\n const checkedStyles = useCheckedStyles();\n const disabledStyles = useDisabledStyles();\n\n const { appearance, checked, disabled, disabledFocusable } = state;\n\n state.root.className = mergeClasses(\n toggleButtonClassNames.root,\n\n // Checked styles\n checked && checkedStyles.base,\n checked && checkedStyles.highContrast,\n appearance && checked && checkedStyles[appearance],\n\n // Disabled styles\n (disabled || disabledFocusable) && disabledStyles.base,\n appearance && (disabled || disabledFocusable) && disabledStyles[appearance],\n\n // User provided class name\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(toggleButtonClassNames.icon, state.icon.className);\n }\n\n useButtonStyles_unstable(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}