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

Sign up to get free protection for your applications and to get access to all the features.
Files changed (190) hide show
  1. package/CHANGELOG.json +475 -1
  2. package/CHANGELOG.md +297 -172
  3. package/dist/{react-button.d.ts → index.d.ts} +67 -31
  4. package/{lib → dist}/tsdoc-metadata.json +0 -0
  5. package/lib/Button.js.map +1 -1
  6. package/lib/CompoundButton.js.map +1 -1
  7. package/lib/MenuButton.js.map +1 -1
  8. package/lib/SplitButton.js.map +1 -1
  9. package/lib/ToggleButton.js.map +1 -1
  10. package/lib/components/Button/Button.js.map +1 -1
  11. package/lib/components/Button/Button.types.js.map +1 -1
  12. package/lib/components/Button/index.js +3 -1
  13. package/lib/components/Button/index.js.map +1 -1
  14. package/lib/components/Button/renderButton.js.map +1 -1
  15. package/lib/components/Button/useButton.js +2 -1
  16. package/lib/components/Button/useButton.js.map +1 -1
  17. package/lib/components/Button/useButtonStyles.js +155 -97
  18. package/lib/components/Button/useButtonStyles.js.map +1 -1
  19. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  20. package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
  21. package/lib/components/CompoundButton/index.js +3 -1
  22. package/lib/components/CompoundButton/index.js.map +1 -1
  23. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  24. package/lib/components/CompoundButton/useCompoundButton.js +7 -2
  25. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  26. package/lib/components/CompoundButton/useCompoundButtonStyles.js +77 -55
  27. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  28. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  29. package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
  30. package/lib/components/MenuButton/index.js +3 -1
  31. package/lib/components/MenuButton/index.js.map +1 -1
  32. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  33. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  34. package/lib/components/MenuButton/useMenuButtonStyles.js +39 -14
  35. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  36. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  37. package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
  38. package/lib/components/SplitButton/index.js +3 -1
  39. package/lib/components/SplitButton/index.js.map +1 -1
  40. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  41. package/lib/components/SplitButton/useSplitButton.js +18 -5
  42. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  43. package/lib/components/SplitButton/useSplitButtonStyles.js +40 -27
  44. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  45. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  46. package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
  47. package/lib/components/ToggleButton/index.js +3 -1
  48. package/lib/components/ToggleButton/index.js.map +1 -1
  49. package/lib/components/ToggleButton/renderToggleButton.js.map +1 -1
  50. package/lib/components/ToggleButton/useToggleButton.js +3 -41
  51. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  52. package/lib/components/ToggleButton/useToggleButtonStyles.js +85 -60
  53. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  54. package/lib/index.js +11 -5
  55. package/lib/index.js.map +1 -1
  56. package/lib/utils/index.js +2 -0
  57. package/lib/utils/index.js.map +1 -0
  58. package/lib/utils/useToggleState.js +37 -0
  59. package/lib/utils/useToggleState.js.map +1 -0
  60. package/lib-commonjs/Button.js.map +1 -1
  61. package/lib-commonjs/CompoundButton.js.map +1 -1
  62. package/lib-commonjs/MenuButton.js.map +1 -1
  63. package/lib-commonjs/SplitButton.js.map +1 -1
  64. package/lib-commonjs/ToggleButton.js.map +1 -1
  65. package/lib-commonjs/components/Button/Button.js.map +1 -1
  66. package/lib-commonjs/components/Button/Button.types.js.map +1 -1
  67. package/lib-commonjs/components/Button/index.js +9 -1
  68. package/lib-commonjs/components/Button/index.js.map +1 -1
  69. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  70. package/lib-commonjs/components/Button/useButton.js +2 -1
  71. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  72. package/lib-commonjs/components/Button/useButtonStyles.js +157 -98
  73. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
  74. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  75. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -1
  76. package/lib-commonjs/components/CompoundButton/index.js +9 -1
  77. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  78. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  79. package/lib-commonjs/components/CompoundButton/useCompoundButton.js +7 -2
  80. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  81. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +79 -57
  82. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  83. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  84. package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -1
  85. package/lib-commonjs/components/MenuButton/index.js +9 -1
  86. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  87. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  88. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  89. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +41 -15
  90. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  91. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  92. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
  93. package/lib-commonjs/components/SplitButton/index.js +9 -1
  94. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  95. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  96. package/lib-commonjs/components/SplitButton/useSplitButton.js +17 -4
  97. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  98. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +41 -28
  99. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  100. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  101. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -1
  102. package/lib-commonjs/components/ToggleButton/index.js +9 -1
  103. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  104. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
  105. package/lib-commonjs/components/ToggleButton/useToggleButton.js +3 -42
  106. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  107. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +89 -62
  108. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  109. package/lib-commonjs/index.js +204 -6
  110. package/lib-commonjs/index.js.map +1 -1
  111. package/lib-commonjs/utils/index.js +10 -0
  112. package/lib-commonjs/utils/index.js.map +1 -0
  113. package/lib-commonjs/utils/useToggleState.js +48 -0
  114. package/lib-commonjs/utils/useToggleState.js.map +1 -0
  115. package/package.json +20 -22
  116. package/dist/demo/index.html +0 -71
  117. package/dist/demo/react-dom.development.js +0 -21413
  118. package/dist/demo/react.development.js +0 -3155
  119. package/lib/Button.d.ts +0 -1
  120. package/lib/CompoundButton.d.ts +0 -1
  121. package/lib/MenuButton.d.ts +0 -1
  122. package/lib/SplitButton.d.ts +0 -1
  123. package/lib/ToggleButton.d.ts +0 -1
  124. package/lib/components/Button/Button.d.ts +0 -6
  125. package/lib/components/Button/Button.types.d.ts +0 -62
  126. package/lib/components/Button/index.d.ts +0 -5
  127. package/lib/components/Button/renderButton.d.ts +0 -5
  128. package/lib/components/Button/useButton.d.ts +0 -8
  129. package/lib/components/Button/useButtonStyles.d.ts +0 -3
  130. package/lib/components/CompoundButton/CompoundButton.d.ts +0 -6
  131. package/lib/components/CompoundButton/CompoundButton.types.d.ts +0 -14
  132. package/lib/components/CompoundButton/index.d.ts +0 -5
  133. package/lib/components/CompoundButton/renderCompoundButton.d.ts +0 -5
  134. package/lib/components/CompoundButton/useCompoundButton.d.ts +0 -8
  135. package/lib/components/CompoundButton/useCompoundButtonStyles.d.ts +0 -3
  136. package/lib/components/MenuButton/MenuButton.d.ts +0 -6
  137. package/lib/components/MenuButton/MenuButton.types.d.ts +0 -10
  138. package/lib/components/MenuButton/index.d.ts +0 -5
  139. package/lib/components/MenuButton/renderMenuButton.d.ts +0 -5
  140. package/lib/components/MenuButton/useMenuButton.d.ts +0 -6
  141. package/lib/components/MenuButton/useMenuButtonStyles.d.ts +0 -3
  142. package/lib/components/SplitButton/SplitButton.d.ts +0 -7
  143. package/lib/components/SplitButton/SplitButton.types.d.ts +0 -21
  144. package/lib/components/SplitButton/index.d.ts +0 -5
  145. package/lib/components/SplitButton/renderSplitButton.d.ts +0 -5
  146. package/lib/components/SplitButton/useSplitButton.d.ts +0 -8
  147. package/lib/components/SplitButton/useSplitButtonStyles.d.ts +0 -3
  148. package/lib/components/ToggleButton/ToggleButton.d.ts +0 -6
  149. package/lib/components/ToggleButton/ToggleButton.types.d.ts +0 -20
  150. package/lib/components/ToggleButton/index.d.ts +0 -5
  151. package/lib/components/ToggleButton/renderToggleButton.d.ts +0 -1
  152. package/lib/components/ToggleButton/useToggleButton.d.ts +0 -9
  153. package/lib/components/ToggleButton/useToggleButtonStyles.d.ts +0 -3
  154. package/lib/index.d.ts +0 -5
  155. package/lib-commonjs/Button.d.ts +0 -1
  156. package/lib-commonjs/CompoundButton.d.ts +0 -1
  157. package/lib-commonjs/MenuButton.d.ts +0 -1
  158. package/lib-commonjs/SplitButton.d.ts +0 -1
  159. package/lib-commonjs/ToggleButton.d.ts +0 -1
  160. package/lib-commonjs/components/Button/Button.d.ts +0 -6
  161. package/lib-commonjs/components/Button/Button.types.d.ts +0 -62
  162. package/lib-commonjs/components/Button/index.d.ts +0 -5
  163. package/lib-commonjs/components/Button/renderButton.d.ts +0 -5
  164. package/lib-commonjs/components/Button/useButton.d.ts +0 -8
  165. package/lib-commonjs/components/Button/useButtonStyles.d.ts +0 -3
  166. package/lib-commonjs/components/CompoundButton/CompoundButton.d.ts +0 -6
  167. package/lib-commonjs/components/CompoundButton/CompoundButton.types.d.ts +0 -14
  168. package/lib-commonjs/components/CompoundButton/index.d.ts +0 -5
  169. package/lib-commonjs/components/CompoundButton/renderCompoundButton.d.ts +0 -5
  170. package/lib-commonjs/components/CompoundButton/useCompoundButton.d.ts +0 -8
  171. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.d.ts +0 -3
  172. package/lib-commonjs/components/MenuButton/MenuButton.d.ts +0 -6
  173. package/lib-commonjs/components/MenuButton/MenuButton.types.d.ts +0 -10
  174. package/lib-commonjs/components/MenuButton/index.d.ts +0 -5
  175. package/lib-commonjs/components/MenuButton/renderMenuButton.d.ts +0 -5
  176. package/lib-commonjs/components/MenuButton/useMenuButton.d.ts +0 -6
  177. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.d.ts +0 -3
  178. package/lib-commonjs/components/SplitButton/SplitButton.d.ts +0 -7
  179. package/lib-commonjs/components/SplitButton/SplitButton.types.d.ts +0 -21
  180. package/lib-commonjs/components/SplitButton/index.d.ts +0 -5
  181. package/lib-commonjs/components/SplitButton/renderSplitButton.d.ts +0 -5
  182. package/lib-commonjs/components/SplitButton/useSplitButton.d.ts +0 -8
  183. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.d.ts +0 -3
  184. package/lib-commonjs/components/ToggleButton/ToggleButton.d.ts +0 -6
  185. package/lib-commonjs/components/ToggleButton/ToggleButton.types.d.ts +0 -20
  186. package/lib-commonjs/components/ToggleButton/index.d.ts +0 -5
  187. package/lib-commonjs/components/ToggleButton/renderToggleButton.d.ts +0 -1
  188. package/lib-commonjs/components/ToggleButton/useToggleButton.d.ts +0 -9
  189. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.d.ts +0 -3
  190. package/lib-commonjs/index.d.ts +0 -5
@@ -1,98 +1,114 @@
1
- import { shorthands, mergeClasses, __styles } from '@griffel/react';
2
1
  import { tokens } from '@fluentui/react-theme';
2
+ import { shorthands, mergeClasses, __styles } from '@griffel/react';
3
3
  import { useButtonStyles_unstable } from '../Button/useButtonStyles';
4
- export const compoundButtonClassName = 'fui-CompoundButton';
5
- const CompoundButtonClassNames = {
6
- secondaryContent: `${compoundButtonClassName}-secondaryContent`
4
+ export const compoundButtonClassNames = {
5
+ root: 'fui-CompoundButton',
6
+ icon: 'fui-CompoundButton__icon',
7
+ contentContainer: 'fui-CompoundButton__contentContainer',
8
+ secondaryContent: 'fui-CompoundButton__secondaryContent'
7
9
  };
10
+ /**
11
+ * @deprecated Use `compoundButtonClassName.root` instead.
12
+ */
13
+
14
+ export const compoundButtonClassName = compoundButtonClassNames.root;
8
15
 
9
16
  const useRootStyles = /*#__PURE__*/__styles({
10
17
  "base": {
11
- "i8kkvl": "f4akndk",
12
- "Belr9w4": "fe5j3v",
13
18
  "Bqenvij": "f11ysow2",
14
- "Bma4kx5": "f900oq5",
15
- "l15nfm": "f8rpug0",
16
- "n4n7rj": "fre7xro"
19
+ "B2u0y6b": "fheyfof",
20
+ "J657lq": "f1um431h",
21
+ "Jlnjib": "fte7hqw",
22
+ "Bc29nj9": "f1yh8ef3"
23
+ },
24
+ "highContrast": {
25
+ "pu7qz5": "fi3u9nm",
26
+ "B10010i": "f1tdgb9w"
17
27
  },
18
28
  "outline": {},
19
29
  "primary": {
20
- "Bma4kx5": "f1ur7rb7",
21
- "l15nfm": "f1itoici",
22
- "n4n7rj": "f1uen3ov"
30
+ "J657lq": "foe7gw6",
31
+ "Jlnjib": "fvxlz81",
32
+ "Bc29nj9": "f1c2mdy"
23
33
  },
34
+ "secondary": {},
24
35
  "subtle": {
25
- "Bma4kx5": "f900oq5",
26
- "l15nfm": "f1l9nom2",
27
- "n4n7rj": "fvjq8kx"
36
+ "J657lq": "f1um431h",
37
+ "Jlnjib": "f1wn9xqz",
38
+ "Bc29nj9": "f1a8q4d0"
28
39
  },
29
40
  "transparent": {
30
- "Bma4kx5": "f900oq5",
31
- "l15nfm": "f1l9nom2",
32
- "n4n7rj": "fvjq8kx"
41
+ "J657lq": "f1um431h",
42
+ "Jlnjib": "f1wn9xqz",
43
+ "Bc29nj9": "f1a8q4d0"
33
44
  },
34
45
  "small": {
35
- "z8tnut": "fp9bwmr",
36
- "z189sj": ["f19lj068", "f177v4lu"],
37
- "Byoj8tv": "f1fow5ox",
38
- "uwmqm3": ["f177v4lu", "f19lj068"],
46
+ "z8tnut": "f17mpqex",
47
+ "z189sj": ["f1vdfbxk", "f1f5gg8d"],
48
+ "Byoj8tv": "f1quwm26",
49
+ "uwmqm3": ["f1f5gg8d", "f1vdfbxk"],
39
50
  "Be2twd7": "fkhj508",
40
51
  "Bg96gwp": "f1i3iumi"
41
52
  },
42
53
  "medium": {
43
54
  "z8tnut": "fbtff6s",
44
- "z189sj": ["f11qrl6u", "fjlbh76"],
45
- "Byoj8tv": "fp67ikv",
46
- "uwmqm3": ["fjlbh76", "f11qrl6u"],
55
+ "z189sj": ["fw5db7e", "f1uw59to"],
56
+ "Byoj8tv": "flw3t2g",
57
+ "uwmqm3": ["f1uw59to", "fw5db7e"],
47
58
  "Be2twd7": "fkhj508",
48
59
  "Bg96gwp": "f1i3iumi"
49
60
  },
50
61
  "large": {
51
62
  "z8tnut": "fm4bm3s",
52
- "z189sj": ["f1gbmcue", "f1rh9g5y"],
53
- "Byoj8tv": "fe2my4m",
54
- "uwmqm3": ["f1rh9g5y", "f1gbmcue"],
63
+ "z189sj": ["fjodcmx", "fhx4nu"],
64
+ "Byoj8tv": "fdt8xvx",
65
+ "uwmqm3": ["fhx4nu", "fjodcmx"],
55
66
  "Be2twd7": "fod5ikn",
56
67
  "Bg96gwp": "faaz57k"
57
68
  },
58
69
  "disabled": {
59
- "Bma4kx5": "fj9njph",
60
- "l15nfm": "fr13fpv",
61
- "n4n7rj": "f1xrf5v0"
70
+ "J657lq": "f1rlv8bf",
71
+ "Jlnjib": "fd1dbtm",
72
+ "Bc29nj9": "f1vqmdmi"
73
+ },
74
+ "disabledHighContrast": {
75
+ "B8ia98v": "f1csacz4",
76
+ "pu7qz5": "f1s5tkfe",
77
+ "B10010i": "fs0rda3"
62
78
  }
63
79
  }, {
64
- "d": [".f4akndk{-webkit-column-gap:12px;column-gap:12px;}", ".fe5j3v{row-gap:12px;}", ".f11ysow2{height:auto;}", ".f900oq5 .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2);}", ".f1ur7rb7 .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".fp9bwmr{padding-top:8px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f1fow5ox{padding-bottom:10px;}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fbtff6s{padding-top:14px;}", ".f11qrl6u{padding-right:12px;}", ".fjlbh76{padding-left:12px;}", ".fp67ikv{padding-bottom:16px;}", ".fm4bm3s{padding-top:18px;}", ".f1gbmcue{padding-right:16px;}", ".f1rh9g5y{padding-left:16px;}", ".fe2my4m{padding-bottom:20px;}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".fj9njph .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
65
- "h": [".f8rpug0:hover .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2Hover);}", ".f1itoici:hover .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".f1l9nom2:hover .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2BrandHover);}", ".fr13fpv:hover .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
66
- "a": [".fre7xro:active .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2Pressed);}", ".f1uen3ov:active .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".fvjq8kx:active .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForeground2BrandPressed);}", ".f1xrf5v0:active .fui-CompoundButton-secondaryContent{color:var(--colorNeutralForegroundDisabled);}"]
80
+ "d": [".f11ysow2{height:auto;}", ".fheyfof{max-width:unset;}", ".f1um431h .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2);}", ".foe7gw6 .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".f1quwm26{padding-bottom:var(--spacingHorizontalMNudge);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".fbtff6s{padding-top:14px;}", ".fw5db7e{padding-right:var(--spacingHorizontalM);}", ".f1uw59to{padding-left:var(--spacingHorizontalM);}", ".flw3t2g{padding-bottom:var(--spacingHorizontalL);}", ".fm4bm3s{padding-top:18px;}", ".fjodcmx{padding-right:var(--spacingHorizontalL);}", ".fhx4nu{padding-left:var(--spacingHorizontalL);}", ".fdt8xvx{padding-bottom:var(--spacingHorizontalXL);}", ".fod5ikn{font-size:var(--fontSizeBase400);}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".f1rlv8bf .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
81
+ "h": [".fte7hqw:hover .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2Hover);}", ".f1yh8ef3:hover:active .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2Pressed);}", ".fvxlz81:hover .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".f1c2mdy:hover:active .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundOnBrand);}", ".f1wn9xqz:hover .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2BrandHover);}", ".f1a8q4d0:hover:active .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForeground2BrandPressed);}", ".fd1dbtm:hover .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundDisabled);}", ".f1vqmdmi:hover:active .fui-CompoundButton__secondaryContent{color:var(--colorNeutralForegroundDisabled);}"],
82
+ "t": ["@media (forced-colors: active){.fi3u9nm:hover .fui-CompoundButton__secondaryContent{color:Highlight;}}", "@media (forced-colors: active){.f1tdgb9w:hover:active .fui-CompoundButton__secondaryContent{color:Highlight;}}", "@media (forced-colors: active){.f1csacz4 .fui-CompoundButton__secondaryContent{color:GrayText;}}", "@media (forced-colors: active){.f1s5tkfe:hover .fui-CompoundButton__secondaryContent{color:GrayText;}}", "@media (forced-colors: active){.fs0rda3:hover:active .fui-CompoundButton__secondaryContent{color:GrayText;}}"]
67
83
  });
68
84
 
69
85
  const useRootIconOnlyStyles = /*#__PURE__*/__styles({
70
86
  "small": {
71
- "z8tnut": "f10ra9hq",
72
- "z189sj": ["f8wuabp", "fycuoez"],
73
- "Byoj8tv": "f1y2xyjm",
74
- "uwmqm3": ["fycuoez", "f8wuabp"],
87
+ "z8tnut": "f1x4af0m",
88
+ "z189sj": ["f7x41pl", "fruq291"],
89
+ "Byoj8tv": "fd55psn",
90
+ "uwmqm3": ["fruq291", "f7x41pl"],
75
91
  "B2u0y6b": "ft5vyj6",
76
92
  "Bf4jedk": "f17suaiq"
77
93
  },
78
94
  "medium": {
79
- "z8tnut": "f1xp5gbu",
80
- "z189sj": ["f1sgzk6v", "f1bg5zqg"],
81
- "Byoj8tv": "f1d7kygh",
82
- "uwmqm3": ["f1bg5zqg", "f1sgzk6v"],
95
+ "z8tnut": "f16k8034",
96
+ "z189sj": ["fdw0yi8", "fk8j09s"],
97
+ "Byoj8tv": "f1angvds",
98
+ "uwmqm3": ["fk8j09s", "fdw0yi8"],
83
99
  "B2u0y6b": "fdczgix",
84
100
  "Bf4jedk": "fjdcg9m"
85
101
  },
86
102
  "large": {
87
- "z8tnut": "fp9bwmr",
88
- "z189sj": ["f19lj068", "f177v4lu"],
89
- "Byoj8tv": "f150uoa4",
90
- "uwmqm3": ["f177v4lu", "f19lj068"],
103
+ "z8tnut": "f17mpqex",
104
+ "z189sj": ["f1vdfbxk", "f1f5gg8d"],
105
+ "Byoj8tv": "fdvome7",
106
+ "uwmqm3": ["f1f5gg8d", "f1vdfbxk"],
91
107
  "B2u0y6b": "fww51uw",
92
108
  "Bf4jedk": "f1qhsl2h"
93
109
  }
94
110
  }, {
95
- "d": [".f10ra9hq{padding-top:4px;}", ".f8wuabp{padding-right:4px;}", ".fycuoez{padding-left:4px;}", ".f1y2xyjm{padding-bottom:4px;}", ".ft5vyj6{max-width:48px;}", ".f17suaiq{min-width:48px;}", ".f1xp5gbu{padding-top:6px;}", ".f1sgzk6v{padding-right:6px;}", ".f1bg5zqg{padding-left:6px;}", ".f1d7kygh{padding-bottom:6px;}", ".fdczgix{max-width:52px;}", ".fjdcg9m{min-width:52px;}", ".fp9bwmr{padding-top:8px;}", ".f19lj068{padding-right:8px;}", ".f177v4lu{padding-left:8px;}", ".f150uoa4{padding-bottom:8px;}", ".fww51uw{max-width:56px;}", ".f1qhsl2h{min-width:56px;}"]
111
+ "d": [".f1x4af0m{padding-top:var(--spacingHorizontalXS);}", ".f7x41pl{padding-right:var(--spacingHorizontalXS);}", ".fruq291{padding-left:var(--spacingHorizontalXS);}", ".fd55psn{padding-bottom:var(--spacingHorizontalXS);}", ".ft5vyj6{max-width:48px;}", ".f17suaiq{min-width:48px;}", ".f16k8034{padding-top:var(--spacingHorizontalSNudge);}", ".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}", ".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}", ".f1angvds{padding-bottom:var(--spacingHorizontalSNudge);}", ".fdczgix{max-width:52px;}", ".fjdcg9m{min-width:52px;}", ".f17mpqex{padding-top:var(--spacingHorizontalS);}", ".f1vdfbxk{padding-right:var(--spacingHorizontalS);}", ".f1f5gg8d{padding-left:var(--spacingHorizontalS);}", ".fdvome7{padding-bottom:var(--spacingHorizontalS);}", ".fww51uw{max-width:56px;}", ".f1qhsl2h{min-width:56px;}"]
96
112
  });
97
113
 
98
114
  const useIconStyles = /*#__PURE__*/__styles({
@@ -100,9 +116,15 @@ const useIconStyles = /*#__PURE__*/__styles({
100
116
  "Be2twd7": "fndrnj9",
101
117
  "Bqenvij": "fbhnoac",
102
118
  "a9b677": "feqmc2u"
119
+ },
120
+ "before": {
121
+ "t21cq0": ["fkujibs", "f199hnxi"]
122
+ },
123
+ "after": {
124
+ "Frg6f3": ["f199hnxi", "fkujibs"]
103
125
  }
104
126
  }, {
105
- "d": [".fndrnj9{font-size:40px;}", ".fbhnoac{height:40px;}", ".feqmc2u{width:40px;}"]
127
+ "d": [".fndrnj9{font-size:40px;}", ".fbhnoac{height:40px;}", ".feqmc2u{width:40px;}", ".fkujibs{margin-right:var(--spacingHorizontalM);}", ".f199hnxi{margin-left:var(--spacingHorizontalM);}"]
106
128
  });
107
129
 
108
130
  const useContentContainerStyles = /*#__PURE__*/__styles({
@@ -144,22 +166,22 @@ export const useCompoundButtonStyles_unstable = state => {
144
166
  disabled,
145
167
  disabledFocusable,
146
168
  iconOnly,
169
+ iconPosition,
147
170
  size
148
171
  } = state;
149
- state.root.className = mergeClasses(compoundButtonClassName, // Root styles
150
- rootStyles.base, appearance && rootStyles[appearance], rootStyles[size], // Disabled styles
151
- (disabled || disabledFocusable) && rootStyles.disabled, // Icon-only styles
172
+ state.root.className = mergeClasses(compoundButtonClassNames.root, // Root styles
173
+ rootStyles.base, rootStyles.highContrast, appearance && rootStyles[appearance], rootStyles[size], // Disabled styles
174
+ (disabled || disabledFocusable) && rootStyles.disabled, (disabled || disabledFocusable) && rootStyles.disabledHighContrast, // Icon-only styles
152
175
  iconOnly && rootIconOnlyStyles[size], // User provided class name
153
176
  state.root.className);
177
+ state.contentContainer.className = mergeClasses(compoundButtonClassNames.contentContainer, contentContainerStyles.base, state.contentContainer.className);
154
178
 
155
179
  if (state.icon) {
156
- state.icon.className = mergeClasses(iconStyles.base, state.icon.className);
180
+ state.icon.className = mergeClasses(compoundButtonClassNames.icon, iconStyles.base, state.root.children !== undefined && state.root.children !== null && iconStyles[iconPosition], state.icon.className);
157
181
  }
158
182
 
159
- state.contentContainer.className = mergeClasses(contentContainerStyles.base, state.contentContainer.className);
160
-
161
183
  if (state.secondaryContent) {
162
- state.secondaryContent.className = mergeClasses(CompoundButtonClassNames.secondaryContent, secondaryContentStyles.base, secondaryContentStyles[size], state.secondaryContent.className);
184
+ state.secondaryContent.className = mergeClasses(compoundButtonClassNames.secondaryContent, secondaryContentStyles.base, secondaryContentStyles[size], state.secondaryContent.className);
163
185
  }
164
186
 
165
187
  useButtonStyles_unstable(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/CompoundButton/useCompoundButtonStyles.ts"],"names":[],"mappings":"AAAA,SAAS,UAAT,EAAqB,YAArB,kBAAqD,gBAArD;AACA,SAAS,MAAT,QAAuB,uBAAvB;AACA,SAAS,wBAAT,QAAyC,2BAAzC;AAGA,OAAO,MAAM,uBAAuB,GAAG,oBAAhC;AAEP,MAAM,wBAAwB,GAAG;AAC/B,EAAA,gBAAgB,EAAE,GAAG,uBAAuB;AADb,CAAjC;;AAIA,MAAM,aAAa,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,EAAtB;;AAwHA,MAAM,qBAAqB,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;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C,UAAU,CAAC,YALsB,EAMjC,UAAU,IAAI,UAAU,CAAC,UAAD,CANS,EAOjC,UAAU,CAAC,IAAD,CAPuB,EASjC;AACA,GAAC,QAAQ,IAAI,iBAAb,KAAmC,UAAU,CAAC,QAVb,EAWjC,CAAC,QAAQ,IAAI,iBAAb,KAAmC,UAAU,CAAC,oBAXb,EAajC;AACA,EAAA,QAAQ,IAAI,kBAAkB,CAAC,IAAD,CAdG,EAgBjC;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAjBsB,CAAnC;AAoBA,EAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,YAAY,CAC7C,wBAAwB,CAAC,gBADoB,EAE7C,sBAAsB,CAAC,IAFsB,EAG7C,KAAK,CAAC,gBAAN,CAAuB,SAHsB,CAA/C;;AAMA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,wBAAwB,CAAC,IADQ,EAEjC,UAAU,CAAC,IAFsB,EAGjC,KAAK,CAAC,IAAN,CAAW,QAAX,KAAwB,SAAxB,IAAqC,KAAK,CAAC,IAAN,CAAW,QAAX,KAAwB,IAA7D,IAAqE,UAAU,CAAC,YAAD,CAH9C,EAIjC,KAAK,CAAC,IAAN,CAAW,SAJsB,CAAnC;AAMD;;AAED,MAAI,KAAK,CAAC,gBAAV,EAA4B;AAC1B,IAAA,KAAK,CAAC,gBAAN,CAAuB,SAAvB,GAAmC,YAAY,CAC7C,wBAAwB,CAAC,gBADoB,EAE7C,sBAAsB,CAAC,IAFsB,EAG7C,sBAAsB,CAAC,IAAD,CAHuB,EAI7C,KAAK,CAAC,gBAAN,CAAuB,SAJsB,CAA/C;AAMD;;AAED,EAAA,wBAAwB,CAAC,KAAD,CAAxB;AAEA,SAAO,KAAP;AACD,CAxDM","sourcesContent":["import { 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 { CompoundButtonSlots, CompoundButtonState } from './CompoundButton.types';\n\nexport const compoundButtonClassNames: SlotClassNames<CompoundButtonSlots> = {\n root: 'fui-CompoundButton',\n icon: 'fui-CompoundButton__icon',\n contentContainer: 'fui-CompoundButton__contentContainer',\n secondaryContent: 'fui-CompoundButton__secondaryContent',\n};\n\n/**\n * @deprecated Use `compoundButtonClassName.root` instead.\n */\nexport const compoundButtonClassName = compoundButtonClassNames.root;\n\nconst useRootStyles = makeStyles({\n // Base styles\n base: {\n height: 'auto',\n maxWidth: 'unset',\n\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Hover,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n },\n\n // High contrast styles\n highContrast: {\n '@media (forced-colors: active)': {\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Highlight',\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'Highlight',\n },\n },\n },\n },\n\n // Appearance variations\n outline: {\n /* No styles */\n },\n primary: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundOnBrand,\n },\n },\n },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n },\n transparent: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n },\n\n // Size variations\n small: {\n ...shorthands.padding(\n tokens.spacingHorizontalS,\n tokens.spacingHorizontalS,\n tokens.spacingHorizontalMNudge,\n tokens.spacingHorizontalS,\n ),\n\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n medium: {\n ...shorthands.padding('14px', tokens.spacingHorizontalM, tokens.spacingHorizontalL, tokens.spacingHorizontalM),\n\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n },\n large: {\n ...shorthands.padding('18px', tokens.spacingHorizontalL, tokens.spacingHorizontalXL, tokens.spacingHorizontalL),\n\n fontSize: tokens.fontSizeBase400,\n lineHeight: tokens.lineHeightBase400,\n },\n\n // Disabled styles\n disabled: {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n },\n },\n\n // Disabled high contrast styles\n disabledHighContrast: {\n '@media (forced-colors: active)': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText',\n },\n\n ':hover': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText',\n },\n },\n\n ':hover:active': {\n [`& .${compoundButtonClassNames.secondaryContent}`]: {\n color: 'GrayText',\n },\n },\n },\n },\n});\n\nconst useRootIconOnlyStyles = makeStyles({\n // Size variations\n small: {\n ...shorthands.padding(tokens.spacingHorizontalXS),\n\n maxWidth: '48px',\n minWidth: '48px',\n },\n medium: {\n ...shorthands.padding(tokens.spacingHorizontalSNudge),\n\n maxWidth: '52px',\n minWidth: '52px',\n },\n large: {\n ...shorthands.padding(tokens.spacingHorizontalS),\n\n maxWidth: '56px',\n minWidth: '56px',\n },\n});\n\nconst useIconStyles = makeStyles({\n // Base styles\n base: {\n fontSize: '40px',\n height: '40px',\n width: '40px',\n },\n\n // Icon position variations\n before: {\n marginRight: tokens.spacingHorizontalM,\n },\n after: {\n marginLeft: tokens.spacingHorizontalM,\n },\n});\n\nconst useContentContainerStyles = makeStyles({\n // Base styles\n base: {\n display: 'flex',\n flexDirection: 'column',\n textAlign: 'left',\n },\n});\n\nconst useSecondaryContentStyles = makeStyles({\n // Base styles\n base: {\n lineHeight: '100%',\n fontWeight: tokens.fontWeightRegular,\n },\n\n // Size variations\n small: {\n fontSize: tokens.fontSizeBase200,\n },\n medium: {\n fontSize: tokens.fontSizeBase200,\n },\n large: {\n fontSize: tokens.fontSizeBase300,\n },\n});\n\nexport const useCompoundButtonStyles_unstable = (state: CompoundButtonState): CompoundButtonState => {\n const rootStyles = useRootStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n const contentContainerStyles = useContentContainerStyles();\n const secondaryContentStyles = useSecondaryContentStyles();\n\n const { appearance, disabled, disabledFocusable, iconOnly, iconPosition, size } = state;\n\n state.root.className = mergeClasses(\n compoundButtonClassNames.root,\n\n // Root styles\n rootStyles.base,\n rootStyles.highContrast,\n appearance && rootStyles[appearance],\n rootStyles[size],\n\n // Disabled styles\n (disabled || disabledFocusable) && rootStyles.disabled,\n (disabled || disabledFocusable) && rootStyles.disabledHighContrast,\n\n // Icon-only styles\n iconOnly && rootIconOnlyStyles[size],\n\n // User provided class name\n state.root.className,\n );\n\n state.contentContainer.className = mergeClasses(\n compoundButtonClassNames.contentContainer,\n contentContainerStyles.base,\n state.contentContainer.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n compoundButtonClassNames.icon,\n iconStyles.base,\n state.root.children !== undefined && state.root.children !== null && iconStyles[iconPosition],\n state.icon.className,\n );\n }\n\n if (state.secondaryContent) {\n state.secondaryContent.className = mergeClasses(\n compoundButtonClassNames.secondaryContent,\n secondaryContentStyles.base,\n secondaryContentStyles[size],\n state.secondaryContent.className,\n );\n }\n\n useButtonStyles_unstable(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuButton/MenuButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,yBAAT,QAA0C,oBAA1C;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AACA,SAAS,4BAAT,QAA6C,uBAA7C;AAIA;;AAEG;;AACH,OAAO,MAAM,UAAU,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC9F,QAAM,KAAK,GAAG,sBAAsB,CAAC,KAAD,EAAQ,GAAR,CAApC;AAEA,EAAA,4BAA4B,CAAC,KAAD,CAA5B;AAEA,SAAO,yBAAyB,CAAC,KAAD,CAAhC,CAL8F,CAM9F;AACD,CAP+D,CAAzD;AASP,UAAU,CAAC,WAAX,GAAyB,YAAzB","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuButton/MenuButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,yBAAT,QAA0C,oBAA1C;AACA,SAAS,sBAAT,QAAuC,iBAAvC;AACA,SAAS,4BAAT,QAA6C,uBAA7C;AAIA;;AAEG;;AACH,OAAO,MAAM,UAAU,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAC9F,QAAM,KAAK,GAAG,sBAAsB,CAAC,KAAD,EAAQ,GAAR,CAApC;AAEA,EAAA,4BAA4B,CAAC,KAAD,CAA5B;AAEA,SAAO,yBAAyB,CAAC,KAAD,CAAhC,CAL8F,CAM9F;AACD,CAP+D,CAAzD;AASP,UAAU,CAAC,WAAX,GAAyB,YAAzB","sourcesContent":["import * as React from 'react';\nimport { renderMenuButton_unstable } from './renderMenuButton';\nimport { useMenuButton_unstable } from './useMenuButton';\nimport { useMenuButtonStyles_unstable } from './useMenuButtonStyles';\nimport type { MenuButtonProps } from './MenuButton.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * MenuButtons are buttons that handle opening and closing a menu when they are triggered.\n */\nexport const MenuButton: ForwardRefComponent<MenuButtonProps> = React.forwardRef((props, ref) => {\n const state = useMenuButton_unstable(props, ref);\n\n useMenuButtonStyles_unstable(state);\n\n return renderMenuButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<MenuButtonProps>;\n\nMenuButton.displayName = 'MenuButton';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuButton.types.js","sourceRoot":"","sources":["../../../src/components/MenuButton/MenuButton.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"MenuButton.types.js","sourceRoot":"../src/","sources":["components/MenuButton/MenuButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ButtonProps, ButtonSlots, ButtonState } from '../Button/Button.types';\n\nexport type MenuButtonSlots = ButtonSlots & {\n /**\n * Menu icon that indicates that this button has a menu that can be expanded.\n */\n menuIcon?: Slot<'span'>;\n};\n\nexport type MenuButtonProps = ComponentProps<MenuButtonSlots> &\n Pick<ButtonProps, 'appearance' | 'block' | 'disabledFocusable' | 'disabled' | 'shape' | 'size'>;\n\nexport type MenuButtonState = ComponentState<MenuButtonSlots> &\n Omit<ButtonState, keyof ButtonSlots | 'components' | 'iconPosition'>;\n"]}
@@ -2,5 +2,7 @@ export * from './MenuButton.types';
2
2
  export * from './MenuButton';
3
3
  export * from './renderMenuButton';
4
4
  export * from './useMenuButton';
5
- export { menuButtonClassName, useMenuButtonStyles_unstable } from './useMenuButtonStyles';
5
+ export {
6
+ /* eslint-disable-next-line deprecation/deprecation */
7
+ menuButtonClassName, menuButtonClassNames, useMenuButtonStyles_unstable } from './useMenuButtonStyles';
6
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/MenuButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"sources":["components/MenuButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAd;AACA,cAAc,cAAd;AACA,cAAc,oBAAd;AACA,cAAc,iBAAd;AACA;AACE;AACA,mBAFF,EAGE,oBAHF,EAIE,4BAJF,QAKO,uBALP","sourcesContent":["export * from './MenuButton.types';\nexport * from './MenuButton';\nexport * from './renderMenuButton';\nexport * from './useMenuButton';\nexport {\n /* eslint-disable-next-line deprecation/deprecation */\n menuButtonClassName,\n menuButtonClassNames,\n useMenuButtonStyles_unstable,\n} from './useMenuButtonStyles';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuButton/renderMenuButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,yBAAyB,GAAI,KAAD,IAA2B;A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,CAAC;AAAf,GAAX,CADjB,EAEG,CAAC,QAAD,IAAa,SAAS,CAAC,IAAV,CAAe,QAF/B,EAGG,CAAC,CAAC,QAAD,IAAa,EAAC,IAAI,KAAA,IAAJ,IAAA,IAAI,KAAA,KAAA,CAAJ,GAAI,KAAA,CAAJ,GAAA,IAAI,CAAE,QAAP,CAAd,KAAkC,KAAK,CAAC,QAAxC,iBAAoD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,QAAP,EAAe,EAAA,GAAK,SAAS,CAAC;AAAf,GAAf,CAHvD,CADF;AAOD,CAXM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { MenuButtonSlots, MenuButtonState } from './MenuButton.types';\n\n/**\n * Renders a MenuButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderMenuButton_unstable = (state: MenuButtonState) => {\n const { slots, slotProps } = getSlots<MenuButtonSlots>(state);\n const { icon, iconOnly } = state;\n\n return (\n <slots.root {...slotProps.root}>\n {slots.icon && <slots.icon {...slotProps.icon} />}\n {!iconOnly && slotProps.root.children}\n {(!iconOnly || !icon?.children) && slots.menuIcon && <slots.menuIcon {...slotProps.menuIcon} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuButton/useMenuButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,kBAAT,QAAmC,uBAAnC;AACA,SAAS,gBAAT,QAAiC,2BAAjC;AACA,SAAS,kBAAT,QAAmC,iBAAnC;AAGA;;AAEG;;AACH,OAAO,MAAM,sBAAsB,GAAG,CACpC;AAAE,EAAA,QAAF;AAAY,KAAG;AAAf,CADoC,EAEpC,GAFoC,KAGjB;AACnB,QAAM,WAAW,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAtC;AACA,SAAO,EACL;AACA,OAAG,WAFE;AAIL;AACA,IAAA,QAAQ,EAAE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cesContent":["import * as React from 'react';\nimport { ChevronDownRegular } from '@fluentui/react-icons';\nimport { resolveShorthand } from '@fluentui/react-utilities';\nimport { useButton_unstable } from '../Button/index';\nimport type { MenuButtonProps, MenuButtonState } from './MenuButton.types';\n\n/**\n * Given user props, returns the final state for a MenuButton.\n */\nexport const useMenuButton_unstable = (\n { menuIcon, ...props }: MenuButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): MenuButtonState => {\n const buttonState = useButton_unstable(props, ref);\n return {\n // Button state\n ...buttonState,\n\n // State calculated from a set of props\n iconOnly: Boolean(!props.children),\n\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n menuIcon: 'span',\n },\n\n menuIcon: resolveShorthand(menuIcon, {\n defaultProps: {\n children: <ChevronDownRegular />,\n },\n required: true,\n }),\n };\n};\n"],"sourceRoot":"../src/"}
@@ -1,36 +1,61 @@
1
1
  import { mergeClasses, __styles } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
2
3
  import { useButtonStyles_unstable } from '../Button/useButtonStyles';
3
- export const menuButtonClassName = 'fui-MenuButton';
4
+ export const menuButtonClassNames = {
5
+ root: 'fui-MenuButton',
6
+ icon: 'fui-MenuButton__icon',
7
+ menuIcon: 'fui-MenuButton__menuIcon'
8
+ };
9
+ /**
10
+ * @deprecated Use `menuButtonClassName.root` instead.
11
+ */
12
+
13
+ export const menuButtonClassName = menuButtonClassNames.root;
4
14
 
5
15
  const useMenuIconStyles = /*#__PURE__*/__styles({
16
+ "base": {
17
+ "Bg96gwp": "fez10in"
18
+ },
6
19
  "small": {
7
- "Be2twd7": "fe5j1ua",
8
- "Bqenvij": "fjamq6b",
9
- "a9b677": "f64fuq3"
20
+ "Be2twd7": "f1ugzwwg",
21
+ "Bqenvij": "fvblgha",
22
+ "Bg96gwp": "fwrc4pm",
23
+ "a9b677": "frx94fk"
10
24
  },
11
25
  "medium": {
12
- "Be2twd7": "fe5j1ua",
13
- "Bqenvij": "fjamq6b",
14
- "a9b677": "f64fuq3"
26
+ "Be2twd7": "f1ugzwwg",
27
+ "Bqenvij": "fvblgha",
28
+ "Bg96gwp": "fwrc4pm",
29
+ "a9b677": "frx94fk"
15
30
  },
16
31
  "large": {
17
- "Be2twd7": "f1rt2boy",
18
- "Bqenvij": "frvgh55",
19
- "a9b677": "fq4mcun"
32
+ "Be2twd7": "f4ybsrx",
33
+ "Bqenvij": "fd461yt",
34
+ "Bg96gwp": "faaz57k",
35
+ "a9b677": "fjw5fx7"
36
+ },
37
+ "notIconOnly": {
38
+ "Frg6f3": ["fbyavb5", "fm0x6gh"]
20
39
  }
21
40
  }, {
22
- "d": [".fe5j1ua{font-size:20px;}", ".fjamq6b{height:20px;}", ".f64fuq3{width:20px;}", ".f1rt2boy{font-size:24px;}", ".frvgh55{height:24px;}", ".fq4mcun{width:24px;}"]
41
+ "d": [".fez10in{line-height:0;}", ".f1ugzwwg{font-size:12px;}", ".fvblgha{height:12px;}", ".fwrc4pm{line-height:var(--lineHeightBase200);}", ".frx94fk{width:12px;}", ".f4ybsrx{font-size:16px;}", ".fd461yt{height:16px;}", ".faaz57k{line-height:var(--lineHeightBase400);}", ".fjw5fx7{width:16px;}", ".fbyavb5{margin-left:var(--spacingHorizontalXS);}", ".fm0x6gh{margin-right:var(--spacingHorizontalXS);}"]
23
42
  });
24
43
 
25
44
  export const useMenuButtonStyles_unstable = state => {
26
45
  const menuIconStyles = useMenuIconStyles();
27
- state.root.className = mergeClasses(menuButtonClassName, state.root.className);
46
+ state.root.className = mergeClasses(menuButtonClassNames.root, state.root.className);
47
+
48
+ if (state.icon) {
49
+ state.icon.className = mergeClasses(menuButtonClassNames.icon, state.icon.className);
50
+ }
28
51
 
29
52
  if (state.menuIcon) {
30
- state.menuIcon.className = mergeClasses(menuIconStyles[state.size], state.menuIcon.className);
53
+ state.menuIcon.className = mergeClasses(menuButtonClassNames.menuIcon, menuIconStyles.base, menuIconStyles[state.size], !state.iconOnly && menuIconStyles.notIconOnly, state.menuIcon.className);
31
54
  }
32
55
 
33
- useButtonStyles_unstable(state);
56
+ useButtonStyles_unstable({ ...state,
57
+ iconPosition: 'before'
58
+ });
34
59
  return state;
35
60
  };
36
61
  //# sourceMappingURL=useMenuButtonStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/MenuButton/useMenuButtonStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,gBAAzC;AAEA,SAAS,wBAAT,QAAyC,2BAAzC;AAGA,OAAO,MAAM,mBAAmB,GAAG,gBAA5B;;AAEP,MAAM,iBAAiB,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAA1B;;AAmBA,OAAO,MAAM,4BAA4B,GAAI,KAAD,IAA4C;AACtF,QAAM,cAAc,GAAG,iBAAiB,EAAxC;AAEA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,mBAAD,EAAsB,KAAK,CAAC,IAAN,CAAW,SAAjC,CAAnC;;AAEA,MAAI,KAAK,CAAC,QAAV,EAAoB;AAClB,IAAA,KAAK,CAAC,QAAN,CAAe,SAAf,GAA2B,YAAY,CAAC,cAAc,CAAC,KAAK,CAAC,IAAP,CAAf,EAA6B,KAAK,CAAC,QAAN,CAAe,SAA5C,CAAvC;AACD;;AAED,EAAA,wBAAwB,CAAC,KAAD,CAAxB;AAEA,SAAO,KAAP;AACD,CAZM","sourceRoot":""}
1
+ {"version":3,"sources":["components/MenuButton/useMenuButtonStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,gBAAzC;AACA,SAAS,MAAT,QAAuB,uBAAvB;AACA,SAAS,wBAAT,QAAyC,2BAAzC;AAIA,OAAO,MAAM,oBAAoB,GAAoC;AACnE,EAAA,IAAI,EAAE,gBAD6D;AAEnE,EAAA,IAAI,EAAE,sBAF6D;AAGnE,EAAA,QAAQ,EAAE;AAHyD,CAA9D;AAMP;;AAEG;;AACH,OAAO,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,IAAjD;;AAEP,MAAM,iBAAiB,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,EAA1B;;AA+BA,OAAO,MAAM,4BAA4B,GAAI,KAAD,IAA4C;AACtF,QAAM,cAAc,GAAG,iBAAiB,EAAxC;AAEA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAoB,CAAC,IAAtB,EAA4B,KAAK,CAAC,IAAN,CAAW,SAAvC,CAAnC;;AAEA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,oBAAoB,CAAC,IAAtB,EAA4B,KAAK,CAAC,IAAN,CAAW,SAAvC,CAAnC;AACD;;AAED,MAAI,KAAK,CAAC,QAAV,EAAoB;AAClB,IAAA,KAAK,CAAC,QAAN,CAAe,SAAf,GAA2B,YAAY,CACrC,oBAAoB,CAAC,QADgB,EAErC,cAAc,CAAC,IAFsB,EAGrC,cAAc,CAAC,KAAK,CAAC,IAAP,CAHuB,EAIrC,CAAC,KAAK,CAAC,QAAP,IAAmB,cAAc,CAAC,WAJG,EAKrC,KAAK,CAAC,QAAN,CAAe,SALsB,CAAvC;AAOD;;AAED,EAAA,wBAAwB,CAAC,EAAE,GAAG,KAAL;AAAY,IAAA,YAAY,EAAE;AAA1B,GAAD,CAAxB;AAEA,SAAO,KAAP;AACD,CAtBM","sourcesContent":["import { mergeClasses, makeStyles } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { useButtonStyles_unstable } from '../Button/useButtonStyles';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { MenuButtonSlots, MenuButtonState } from './MenuButton.types';\n\nexport const menuButtonClassNames: SlotClassNames<MenuButtonSlots> = {\n root: 'fui-MenuButton',\n icon: 'fui-MenuButton__icon',\n menuIcon: 'fui-MenuButton__menuIcon',\n};\n\n/**\n * @deprecated Use `menuButtonClassName.root` instead.\n */\nexport const menuButtonClassName = menuButtonClassNames.root;\n\nconst useMenuIconStyles = makeStyles({\n base: {\n lineHeight: 0,\n },\n\n // Size appearance\n small: {\n fontSize: '12px',\n height: '12px',\n lineHeight: tokens.lineHeightBase200,\n width: '12px',\n },\n medium: {\n fontSize: '12px',\n height: '12px',\n lineHeight: tokens.lineHeightBase200,\n width: '12px',\n },\n large: {\n fontSize: '16px',\n height: '16px',\n lineHeight: tokens.lineHeightBase400,\n width: '16px',\n },\n\n // Not-icon only\n notIconOnly: {\n marginLeft: tokens.spacingHorizontalXS,\n },\n});\n\nexport const useMenuButtonStyles_unstable = (state: MenuButtonState): MenuButtonState => {\n const menuIconStyles = useMenuIconStyles();\n\n state.root.className = mergeClasses(menuButtonClassNames.root, state.root.className);\n\n if (state.icon) {\n state.icon.className = mergeClasses(menuButtonClassNames.icon, state.icon.className);\n }\n\n if (state.menuIcon) {\n state.menuIcon.className = mergeClasses(\n menuButtonClassNames.menuIcon,\n menuIconStyles.base,\n menuIconStyles[state.size],\n !state.iconOnly && menuIconStyles.notIconOnly,\n state.menuIcon.className,\n );\n }\n\n useButtonStyles_unstable({ ...state, iconPosition: 'before' });\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SplitButton/SplitButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AAIA;;;AAGG;;AACH,OAAO,MAAM,WAAW,gBAA0C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAChG,QAAM,KAAK,GAAG,uBAAuB,CAAC,KAAD,EAAQ,GAAR,CAArC;AAEA,EAAA,6BAA6B,CAAC,KAAD,CAA7B;AAEA,SAAO,0BAA0B,CAAC,KAAD,CAAjC,CALgG,CAMhG;AACD,CAPiE,CAA3D;AASP,WAAW,CAAC,WAAZ,GAA0B,aAA1B","sourceRoot":""}
1
+ {"version":3,"sources":["components/SplitButton/SplitButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,0BAAT,QAA2C,qBAA3C;AACA,SAAS,uBAAT,QAAwC,kBAAxC;AACA,SAAS,6BAAT,QAA8C,wBAA9C;AAIA;;;AAGG;;AACH,OAAO,MAAM,WAAW,gBAA0C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AAChG,QAAM,KAAK,GAAG,uBAAuB,CAAC,KAAD,EAAQ,GAAR,CAArC;AAEA,EAAA,6BAA6B,CAAC,KAAD,CAA7B;AAEA,SAAO,0BAA0B,CAAC,KAAD,CAAjC,CALgG,CAMhG;AACD,CAPiE,CAA3D;AASP,WAAW,CAAC,WAAZ,GAA0B,aAA1B","sourcesContent":["import * as React from 'react';\nimport { renderSplitButton_unstable } from './renderSplitButton';\nimport { useSplitButton_unstable } from './useSplitButton';\nimport { useSplitButtonStyles_unstable } from './useSplitButtonStyles';\nimport type { SplitButtonProps } from './SplitButton.types';\nimport { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * SplitButtons are a grouping of two interactive surfaces where the interacting with the first one triggers a primary\n * action, while interacting with the second one opens a menu with secondary actions.\n */\nexport const SplitButton: ForwardRefComponent<SplitButtonProps> = React.forwardRef((props, ref) => {\n const state = useSplitButton_unstable(props, ref);\n\n useSplitButtonStyles_unstable(state);\n\n return renderSplitButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<SplitButtonProps>;\n\nSplitButton.displayName = 'SplitButton';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"file":"SplitButton.types.js","sourceRoot":"","sources":["../../../src/components/SplitButton/SplitButton.types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"SplitButton.types.js","sourceRoot":"../src/","sources":["components/SplitButton/SplitButton.types.ts"],"names":[],"mappings":"","sourcesContent":["import { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ButtonProps, ButtonState } from '../Button/Button.types';\nimport type { MenuButtonProps, MenuButtonState } from '../MenuButton/MenuButton.types';\n\nexport type SplitButtonSlots = {\n /**\n * Root of the component that wraps the primary action button and menu button.\n */\n root: NonNullable<Slot<'div'>>;\n\n /**\n * Button that opens menu with secondary actions in SplitButton.\n */\n menuButton?: Slot<typeof MenuButton>;\n /**\n * Button to perform primary action in SplitButton.\n */\n primaryActionButton?: Slot<typeof Button>;\n};\n\nexport type SplitButtonProps = ComponentProps<SplitButtonSlots> &\n Omit<ButtonProps, 'root'> &\n Omit<MenuButtonProps, 'root'>;\n\nexport type SplitButtonState = ComponentState<SplitButtonSlots> &\n Omit<ButtonState, 'components' | 'iconOnly' | 'root'> &\n Omit<MenuButtonState, 'components' | 'iconOnly' | 'root'>;\n"]}
@@ -2,5 +2,7 @@ export * from './SplitButton';
2
2
  export * from './SplitButton.types';
3
3
  export * from './renderSplitButton';
4
4
  export * from './useSplitButton';
5
- export { splitButtonClassName, useSplitButtonStyles_unstable } from './useSplitButtonStyles';
5
+ export {
6
+ /* eslint-disable-next-line deprecation/deprecation */
7
+ splitButtonClassName, splitButtonClassNames, useSplitButtonStyles_unstable } from './useSplitButtonStyles';
6
8
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/SplitButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,MAAM,wBAAwB,CAAC"}
1
+ {"version":3,"sources":["components/SplitButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAd;AACA,cAAc,qBAAd;AACA,cAAc,qBAAd;AACA,cAAc,kBAAd;AACA;AACE;AACA,oBAFF,EAGE,qBAHF,EAIE,6BAJF,QAKO,wBALP","sourcesContent":["export * from './SplitButton';\nexport * from './SplitButton.types';\nexport * from './renderSplitButton';\nexport * from './useSplitButton';\nexport {\n /* eslint-disable-next-line deprecation/deprecation */\n splitButtonClassName,\n splitButtonClassNames,\n useSplitButtonStyles_unstable,\n} from './useSplitButtonStyles';\n"],"sourceRoot":"../src/"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SplitButton/renderSplitButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAA4B;AACpE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAmB,KAAnB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,mBAAN,iBAA6B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,mBAAP,EAA0B,EAAA,GAAK,SAAS,CAAC;AAAf,GAA1B,CADhC,EAEG,KAAK,CAAC,UAAN,iBAAoB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,UAAP,EAAiB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAjB,CAFvB,CADF;AAMD,CATM","sourceRoot":""}
1
+ {"version":3,"sources":["components/SplitButton/renderSplitButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,0BAA0B,GAAI,KAAD,IAA4B;AACpE,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAmB,KAAnB,CAArC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,EACG,KAAK,CAAC,mBAAN,iBAA6B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,mBAAP,EAA0B,EAAA,GAAK,SAAS,CAAC;AAAf,GAA1B,CADhC,EAEG,KAAK,CAAC,UAAN,iBAAoB,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,UAAP,EAAiB,EAAA,GAAK,SAAS,CAAC;AAAf,GAAjB,CAFvB,CADF;AAMD,CATM","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { SplitButtonSlots, SplitButtonState } from './SplitButton.types';\n\n/**\n * Renders a SplitButton component by passing the state defined props to the appropriate slots.\n */\nexport const renderSplitButton_unstable = (state: SplitButtonState) => {\n const { slots, slotProps } = getSlots<SplitButtonSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {slots.primaryActionButton && <slots.primaryActionButton {...slotProps.primaryActionButton} />}\n {slots.menuButton && <slots.menuButton {...slotProps.menuButton} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -1,4 +1,4 @@
1
- import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
1
+ import { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';
2
2
  import { Button } from '../Button/Button';
3
3
  import { MenuButton } from '../MenuButton/MenuButton';
4
4
  /**
@@ -9,7 +9,8 @@ import { MenuButton } from '../MenuButton/MenuButton';
9
9
 
10
10
  export const useSplitButton_unstable = (props, ref) => {
11
11
  const {
12
- appearance,
12
+ appearance = 'secondary',
13
+ // eslint-disable-next-line deprecation/deprecation
13
14
  block = false,
14
15
  children,
15
16
  disabled = false,
@@ -17,18 +18,22 @@ export const useSplitButton_unstable = (props, ref) => {
17
18
  icon,
18
19
  iconPosition = 'before',
19
20
  menuButton,
21
+ menuIcon,
20
22
  primaryActionButton,
21
23
  shape = 'rounded',
22
24
  size = 'medium'
23
25
  } = props;
26
+ const baseId = useId('splitButton-');
24
27
  const menuButtonShorthand = resolveShorthand(menuButton, {
25
28
  defaultProps: {
26
29
  appearance,
27
30
  disabled,
28
31
  disabledFocusable,
32
+ menuIcon,
29
33
  shape,
30
34
  size
31
- }
35
+ },
36
+ required: true
32
37
  });
33
38
  const primaryActionButtonShorthand = resolveShorthand(primaryActionButton, {
34
39
  defaultProps: {
@@ -39,10 +44,18 @@ export const useSplitButton_unstable = (props, ref) => {
39
44
  disabledFocusable,
40
45
  icon,
41
46
  iconPosition,
47
+ id: baseId + '__primaryActionButton',
42
48
  shape,
43
49
  size
44
- }
45
- });
50
+ },
51
+ required: true
52
+ }); // Resolve menu button's aria-labelledby to be labelled by the primary action button if not a label was not provided
53
+ // by the user.
54
+
55
+ if (menuButtonShorthand && primaryActionButtonShorthand && !menuButtonShorthand['aria-label'] && !menuButtonShorthand['aria-labelledby']) {
56
+ menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;
57
+ }
58
+
46
59
  return {
47
60
  // Props passed at the top-level
48
61
  appearance,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SplitButton/useSplitButton.ts"],"names":[],"mappings":"AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AACA,SAAS,MAAT,QAAuB,kBAAvB;AACA,SAAS,UAAT,QAA2B,0BAA3B;AAGA;;;;AAIG;;AACH,OAAO,MAAM,uBAAuB,GAAG,CACrC,KADqC,EAErC,GAFqC,KAGjB;AACpB,QAAM;AACJ,IAAA,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pB;AACA;;AACA,MACE,mBAAmB,IACnB,4BADA,IAEA,CAAC,mBAAmB,CAAC,YAAD,CAFpB,IAGA,CAAC,mBAAmB,CAAC,iBAAD,CAJtB,EAKE;AACA,IAAA,mBAAmB,CAAC,iBAAD,CAAnB,GAAyC,4BAA4B,CAAC,EAAtE;AACD;;AAED,SAAO;AACL;AACA,IAAA,UAFK;AAGL,IAAA,KAHK;AAIL,IAAA,QAJK;AAKL,IAAA,iBALK;AAML,IAAA,YANK;AAOL,IAAA,KAPK;AAQL,IAAA,IARK;AAUL;AACA,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,UAAU,EAAE,UAFF;AAGV,MAAA,mBAAmB,EAAE;AAHX,KAXP;AAiBL,IAAA,IAAI,EAAE,qBAAqB,CAAC,KAAD,EAAQ;AAAE,MAAA,GAAF;AAAO,SAAG;AAAV,KAAR,CAjBtB;AAkBL,IAAA,UAAU,EAAE,mBAlBP;AAmBL,IAAA,mBAAmB,EAAE;AAnBhB,GAAP;AAqBD,CAlFM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useId } from '@fluentui/react-utilities';\nimport { Button } from '../Button/Button';\nimport { MenuButton } from '../MenuButton/MenuButton';\nimport type { SplitButtonProps, SplitButtonState } from './SplitButton.types';\n\n/**\n * Given user props, defines default props for the SplitButton and returns processed state.\n * @param props - User provided props to the SplitButton component.\n * @param ref - User provided ref to be passed to the SplitButton component.\n */\nexport const useSplitButton_unstable = (\n props: SplitButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): SplitButtonState => {\n const {\n appearance = 'secondary',\n // eslint-disable-next-line deprecation/deprecation\n block = false,\n children,\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n menuButton,\n menuIcon,\n primaryActionButton,\n shape = 'rounded',\n size = 'medium',\n } = props;\n\n const baseId = useId('splitButton-');\n\n const menuButtonShorthand = resolveShorthand(menuButton, {\n defaultProps: {\n appearance,\n disabled,\n disabledFocusable,\n menuIcon,\n shape,\n size,\n },\n required: true,\n });\n\n const primaryActionButtonShorthand = resolveShorthand(primaryActionButton, {\n defaultProps: {\n appearance,\n block,\n children,\n disabled,\n disabledFocusable,\n icon,\n iconPosition,\n id: baseId + '__primaryActionButton',\n shape,\n size,\n },\n required: true,\n });\n\n // Resolve menu button's aria-labelledby to be labelled by the primary action button if not a label was not provided\n // by the user.\n if (\n menuButtonShorthand &&\n primaryActionButtonShorthand &&\n !menuButtonShorthand['aria-label'] &&\n !menuButtonShorthand['aria-labelledby']\n ) {\n menuButtonShorthand['aria-labelledby'] = primaryActionButtonShorthand.id;\n }\n\n return {\n // Props passed at the top-level\n appearance,\n block,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n\n // Slots definition\n components: {\n root: 'div',\n menuButton: MenuButton,\n primaryActionButton: Button,\n },\n\n root: getNativeElementProps('div', { ref, ...props }),\n menuButton: menuButtonShorthand,\n primaryActionButton: primaryActionButtonShorthand,\n };\n};\n"],"sourceRoot":"../src/"}