@fluentui/react-button 0.0.0-nightly-20230317-1454.1 → 0.0.0-nightly-20230321-0440.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (159) hide show
  1. package/CHANGELOG.json +17 -17
  2. package/CHANGELOG.md +11 -11
  3. package/lib/Button.js +1 -1
  4. package/lib/Button.js.map +1 -1
  5. package/lib/CompoundButton.js +1 -1
  6. package/lib/CompoundButton.js.map +1 -1
  7. package/lib/MenuButton.js +1 -1
  8. package/lib/MenuButton.js.map +1 -1
  9. package/lib/SplitButton.js +1 -1
  10. package/lib/SplitButton.js.map +1 -1
  11. package/lib/ToggleButton.js +1 -1
  12. package/lib/ToggleButton.js.map +1 -1
  13. package/lib/components/Button/Button.js +6 -6
  14. package/lib/components/Button/Button.js.map +1 -1
  15. package/lib/components/Button/Button.types.js.map +1 -1
  16. package/lib/components/Button/index.js +4 -4
  17. package/lib/components/Button/index.js.map +1 -1
  18. package/lib/components/Button/renderButton.js +9 -3
  19. package/lib/components/Button/renderButton.js.map +1 -1
  20. package/lib/components/Button/useButton.js +12 -13
  21. package/lib/components/Button/useButton.js.map +1 -1
  22. package/lib/components/Button/useButtonStyles.js +14 -14
  23. package/lib/components/Button/useButtonStyles.js.map +1 -1
  24. package/lib/components/CompoundButton/CompoundButton.js +6 -6
  25. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  26. package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
  27. package/lib/components/CompoundButton/index.js +5 -5
  28. package/lib/components/CompoundButton/index.js.map +1 -1
  29. package/lib/components/CompoundButton/renderCompoundButton.js +13 -3
  30. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  31. package/lib/components/CompoundButton/useCompoundButton.js +8 -8
  32. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  33. package/lib/components/CompoundButton/useCompoundButtonStyles.js +7 -7
  34. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  35. package/lib/components/MenuButton/MenuButton.js +6 -6
  36. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  37. package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
  38. package/lib/components/MenuButton/index.js +5 -5
  39. package/lib/components/MenuButton/index.js.map +1 -1
  40. package/lib/components/MenuButton/renderMenuButton.js +9 -3
  41. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  42. package/lib/components/MenuButton/useMenuButton.js +9 -8
  43. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  44. package/lib/components/MenuButton/useMenuButtonStyles.js +10 -10
  45. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  46. package/lib/components/SplitButton/SplitButton.js +6 -6
  47. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  48. package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
  49. package/lib/components/SplitButton/index.js +5 -5
  50. package/lib/components/SplitButton/index.js.map +1 -1
  51. package/lib/components/SplitButton/renderSplitButton.js +9 -3
  52. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  53. package/lib/components/SplitButton/useSplitButton.js +13 -14
  54. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  55. package/lib/components/SplitButton/useSplitButtonStyles.js +6 -6
  56. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  57. package/lib/components/ToggleButton/ToggleButton.js +6 -6
  58. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  59. package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
  60. package/lib/components/ToggleButton/index.js +5 -5
  61. package/lib/components/ToggleButton/index.js.map +1 -1
  62. package/lib/components/ToggleButton/renderToggleButton.js +1 -1
  63. package/lib/components/ToggleButton/renderToggleButton.js.map +1 -1
  64. package/lib/components/ToggleButton/useToggleButton.js +2 -3
  65. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  66. package/lib/components/ToggleButton/useToggleButtonStyles.js +9 -9
  67. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  68. package/lib/contexts/ButtonContext.js +5 -2
  69. package/lib/contexts/ButtonContext.js.map +1 -1
  70. package/lib/contexts/index.js +1 -1
  71. package/lib/contexts/index.js.map +1 -1
  72. package/lib/index.js +7 -7
  73. package/lib/index.js.map +1 -1
  74. package/lib/utils/index.js +1 -1
  75. package/lib/utils/index.js.map +1 -1
  76. package/lib/utils/useToggleState.js +4 -4
  77. package/lib/utils/useToggleState.js.map +1 -1
  78. package/lib-commonjs/Button.js +4 -5
  79. package/lib-commonjs/Button.js.map +1 -1
  80. package/lib-commonjs/CompoundButton.js +4 -5
  81. package/lib-commonjs/CompoundButton.js.map +1 -1
  82. package/lib-commonjs/MenuButton.js +4 -5
  83. package/lib-commonjs/MenuButton.js.map +1 -1
  84. package/lib-commonjs/SplitButton.js +4 -5
  85. package/lib-commonjs/SplitButton.js.map +1 -1
  86. package/lib-commonjs/ToggleButton.js +4 -5
  87. package/lib-commonjs/ToggleButton.js.map +1 -1
  88. package/lib-commonjs/components/Button/Button.js +21 -19
  89. package/lib-commonjs/components/Button/Button.js.map +1 -1
  90. package/lib-commonjs/components/Button/Button.types.js +2 -3
  91. package/lib-commonjs/components/Button/Button.types.js.map +1 -1
  92. package/lib-commonjs/components/Button/index.js +19 -17
  93. package/lib-commonjs/components/Button/index.js.map +1 -1
  94. package/lib-commonjs/components/Button/renderButton.js +26 -14
  95. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  96. package/lib-commonjs/components/Button/useButton.js +52 -40
  97. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  98. package/lib-commonjs/components/Button/useButtonStyles.js +477 -1135
  99. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
  100. package/lib-commonjs/components/CompoundButton/CompoundButton.js +21 -19
  101. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  102. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js +2 -3
  103. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -1
  104. package/lib-commonjs/components/CompoundButton/index.js +20 -18
  105. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  106. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +30 -14
  107. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  108. package/lib-commonjs/components/CompoundButton/useCompoundButton.js +36 -30
  109. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  110. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +184 -315
  111. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  112. package/lib-commonjs/components/MenuButton/MenuButton.js +22 -19
  113. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  114. package/lib-commonjs/components/MenuButton/MenuButton.types.js +2 -3
  115. package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -1
  116. package/lib-commonjs/components/MenuButton/index.js +20 -18
  117. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  118. package/lib-commonjs/components/MenuButton/renderMenuButton.js +26 -14
  119. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  120. package/lib-commonjs/components/MenuButton/useMenuButton.js +37 -33
  121. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  122. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +106 -166
  123. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  124. package/lib-commonjs/components/SplitButton/SplitButton.js +22 -19
  125. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  126. package/lib-commonjs/components/SplitButton/SplitButton.types.js +2 -3
  127. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
  128. package/lib-commonjs/components/SplitButton/index.js +20 -18
  129. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  130. package/lib-commonjs/components/SplitButton/renderSplitButton.js +22 -13
  131. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  132. package/lib-commonjs/components/SplitButton/useSplitButton.js +79 -66
  133. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  134. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +106 -263
  135. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  136. package/lib-commonjs/components/ToggleButton/ToggleButton.js +21 -19
  137. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  138. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js +2 -3
  139. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -1
  140. package/lib-commonjs/components/ToggleButton/index.js +20 -18
  141. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  142. package/lib-commonjs/components/ToggleButton/renderToggleButton.js +8 -6
  143. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
  144. package/lib-commonjs/components/ToggleButton/useToggleButton.js +16 -14
  145. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  146. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +380 -897
  147. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  148. package/lib-commonjs/contexts/ButtonContext.js +19 -17
  149. package/lib-commonjs/contexts/ButtonContext.js.map +1 -1
  150. package/lib-commonjs/contexts/index.js +4 -5
  151. package/lib-commonjs/contexts/index.js.map +1 -1
  152. package/lib-commonjs/index.js +179 -47
  153. package/lib-commonjs/index.js.map +1 -1
  154. package/lib-commonjs/utils/index.js +4 -5
  155. package/lib-commonjs/utils/index.js.map +1 -1
  156. package/lib-commonjs/utils/useToggleState.js +40 -40
  157. package/lib-commonjs/utils/useToggleState.js.map +1 -1
  158. package/package.json +12 -11
  159. package/.swcrc +0 -39
package/CHANGELOG.json CHANGED
@@ -2,9 +2,9 @@
2
2
  "name": "@fluentui/react-button",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 17 Mar 2023 15:00:12 GMT",
6
- "tag": "@fluentui/react-button_v0.0.0-nightly-20230317-1454.1",
7
- "version": "0.0.0-nightly-20230317-1454.1",
5
+ "date": "Tue, 21 Mar 2023 04:49:53 GMT",
6
+ "tag": "@fluentui/react-button_v0.0.0-nightly-20230321-0440.1",
7
+ "version": "0.0.0-nightly-20230321-0440.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
@@ -16,44 +16,44 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-button",
19
- "comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightly-20230317-1454.1",
20
- "commit": "636275472966fa37b1efc14ac2e70ad32bd39b86"
19
+ "comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightly-20230321-0440.1",
20
+ "commit": "e913db5700c77cb74564f4422c775d52ef302e91"
21
21
  },
22
22
  {
23
23
  "author": "beachball",
24
24
  "package": "@fluentui/react-button",
25
- "comment": "Bump @fluentui/react-aria to v0.0.0-nightly-20230317-1454.1",
26
- "commit": "636275472966fa37b1efc14ac2e70ad32bd39b86"
25
+ "comment": "Bump @fluentui/react-aria to v0.0.0-nightly-20230321-0440.1",
26
+ "commit": "e913db5700c77cb74564f4422c775d52ef302e91"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-button",
31
- "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230317-1454.1",
32
- "commit": "636275472966fa37b1efc14ac2e70ad32bd39b86"
31
+ "comment": "Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230321-0440.1",
32
+ "commit": "e913db5700c77cb74564f4422c775d52ef302e91"
33
33
  },
34
34
  {
35
35
  "author": "beachball",
36
36
  "package": "@fluentui/react-button",
37
- "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20230317-1454.1",
38
- "commit": "636275472966fa37b1efc14ac2e70ad32bd39b86"
37
+ "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20230321-0440.1",
38
+ "commit": "e913db5700c77cb74564f4422c775d52ef302e91"
39
39
  },
40
40
  {
41
41
  "author": "beachball",
42
42
  "package": "@fluentui/react-button",
43
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230317-1454.1",
44
- "commit": "636275472966fa37b1efc14ac2e70ad32bd39b86"
43
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20230321-0440.1",
44
+ "commit": "e913db5700c77cb74564f4422c775d52ef302e91"
45
45
  },
46
46
  {
47
47
  "author": "beachball",
48
48
  "package": "@fluentui/react-button",
49
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230317-1454.1",
50
- "commit": "636275472966fa37b1efc14ac2e70ad32bd39b86"
49
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20230321-0440.1",
50
+ "commit": "e913db5700c77cb74564f4422c775d52ef302e91"
51
51
  },
52
52
  {
53
53
  "author": "beachball",
54
54
  "package": "@fluentui/react-button",
55
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230317-1454.1",
56
- "commit": "636275472966fa37b1efc14ac2e70ad32bd39b86"
55
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230321-0440.1",
56
+ "commit": "e913db5700c77cb74564f4422c775d52ef302e91"
57
57
  }
58
58
  ]
59
59
  }
package/CHANGELOG.md CHANGED
@@ -1,24 +1,24 @@
1
1
  # Change Log - @fluentui/react-button
2
2
 
3
- This log was last generated on Fri, 17 Mar 2023 15:00:12 GMT and should not be manually modified.
3
+ This log was last generated on Tue, 21 Mar 2023 04:49:53 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20230317-1454.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v0.0.0-nightly-20230317-1454.1)
7
+ ## [0.0.0-nightly-20230321-0440.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v0.0.0-nightly-20230321-0440.1)
8
8
 
9
- Fri, 17 Mar 2023 15:00:12 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.3.4..@fluentui/react-button_v0.0.0-nightly-20230317-1454.1)
9
+ Tue, 21 Mar 2023 04:49:53 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.3.4..@fluentui/react-button_v0.0.0-nightly-20230321-0440.1)
11
11
 
12
12
  ### Changes
13
13
 
14
14
  - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by fluentui-internal@service.microsoft.com)
15
- - Bump @fluentui/keyboard-keys to v0.0.0-nightly-20230317-1454.1 ([commit](https://github.com/microsoft/fluentui/commit/636275472966fa37b1efc14ac2e70ad32bd39b86) by beachball)
16
- - Bump @fluentui/react-aria to v0.0.0-nightly-20230317-1454.1 ([commit](https://github.com/microsoft/fluentui/commit/636275472966fa37b1efc14ac2e70ad32bd39b86) by beachball)
17
- - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230317-1454.1 ([commit](https://github.com/microsoft/fluentui/commit/636275472966fa37b1efc14ac2e70ad32bd39b86) by beachball)
18
- - Bump @fluentui/react-tabster to v0.0.0-nightly-20230317-1454.1 ([commit](https://github.com/microsoft/fluentui/commit/636275472966fa37b1efc14ac2e70ad32bd39b86) by beachball)
19
- - Bump @fluentui/react-theme to v0.0.0-nightly-20230317-1454.1 ([commit](https://github.com/microsoft/fluentui/commit/636275472966fa37b1efc14ac2e70ad32bd39b86) by beachball)
20
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20230317-1454.1 ([commit](https://github.com/microsoft/fluentui/commit/636275472966fa37b1efc14ac2e70ad32bd39b86) by beachball)
21
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230317-1454.1 ([commit](https://github.com/microsoft/fluentui/commit/636275472966fa37b1efc14ac2e70ad32bd39b86) by beachball)
15
+ - Bump @fluentui/keyboard-keys to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
16
+ - Bump @fluentui/react-aria to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
17
+ - Bump @fluentui/react-shared-contexts to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
18
+ - Bump @fluentui/react-tabster to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
19
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
20
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
21
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20230321-0440.1 ([commit](https://github.com/microsoft/fluentui/commit/e913db5700c77cb74564f4422c775d52ef302e91) by beachball)
22
22
 
23
23
  ## [9.3.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.3.4)
24
24
 
package/lib/Button.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./components/Button/index";
1
+ export * from './components/Button/index';
2
2
  //# sourceMappingURL=Button.js.map
package/lib/Button.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/Button.tsx"],"sourcesContent":["export * from './components/Button/index';\n"],"mappings":"AAAA,cAAc"}
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-button/src/Button.tsx"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './components/Button/index';\n"]}
@@ -1,2 +1,2 @@
1
- export * from "./components/CompoundButton/index";
1
+ export * from './components/CompoundButton/index';
2
2
  //# sourceMappingURL=CompoundButton.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/CompoundButton.ts"],"sourcesContent":["export * from './components/CompoundButton/index';\n"],"mappings":"AAAA,cAAc"}
1
+ {"version":3,"file":"CompoundButton.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-button/src/CompoundButton.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC","sourcesContent":["export * from './components/CompoundButton/index';\n"]}
package/lib/MenuButton.js CHANGED
@@ -1,2 +1,2 @@
1
- export * from "./components/MenuButton/index";
1
+ export * from './components/MenuButton/index';
2
2
  //# sourceMappingURL=MenuButton.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/MenuButton.ts"],"sourcesContent":["export * from './components/MenuButton/index';\n"],"mappings":"AAAA,cAAc"}
1
+ {"version":3,"file":"MenuButton.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-button/src/MenuButton.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './components/MenuButton/index';\n"]}
@@ -1,2 +1,2 @@
1
- export * from "./components/SplitButton/index";
1
+ export * from './components/SplitButton/index';
2
2
  //# sourceMappingURL=SplitButton.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/SplitButton.ts"],"sourcesContent":["export * from './components/SplitButton/index';\n"],"mappings":"AAAA,cAAc"}
1
+ {"version":3,"file":"SplitButton.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-button/src/SplitButton.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './components/SplitButton/index';\n"]}
@@ -1,2 +1,2 @@
1
- export * from "./components/ToggleButton/index";
1
+ export * from './components/ToggleButton/index';
2
2
  //# sourceMappingURL=ToggleButton.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../src/ToggleButton.ts"],"sourcesContent":["export * from './components/ToggleButton/index';\n"],"mappings":"AAAA,cAAc"}
1
+ {"version":3,"file":"ToggleButton.js","sourceRoot":"","sources":["../../../../../../../packages/react-components/react-button/src/ToggleButton.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC","sourcesContent":["export * from './components/ToggleButton/index';\n"]}
@@ -1,8 +1,8 @@
1
- import * as React from "react";
2
- import { renderButton_unstable } from "./renderButton";
3
- import { useButton_unstable } from "./useButton";
4
- import { useButtonStyles_unstable } from "./useButtonStyles";
5
- import { useCustomStyleHooks_unstable } from "@fluentui/react-shared-contexts";
1
+ import * as React from 'react';
2
+ import { renderButton_unstable } from './renderButton';
3
+ import { useButton_unstable } from './useButton';
4
+ import { useButtonStyles_unstable } from './useButtonStyles';
5
+ import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * Buttons give people a way to trigger an action.
8
8
  */
@@ -17,5 +17,5 @@ export const Button = /*#__PURE__*/React.forwardRef((props, ref) => {
17
17
  // Casting is required due to lack of distributive union to support unions on @types/react
18
18
  });
19
19
 
20
- Button.displayName = "Button";
20
+ Button.displayName = 'Button';
21
21
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","renderButton_unstable","useButton_unstable","useButtonStyles_unstable","useCustomStyleHooks_unstable","Button","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderButton_unstable } from './renderButton';\nimport { useButton_unstable } from './useButton';\nimport { useButtonStyles_unstable } from './useButtonStyles';\nimport type { ButtonProps } from './Button.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Buttons give people a way to trigger an action.\n */\nexport const Button: ForwardRefComponent<ButtonProps> = React.forwardRef((props, ref) => {\n const state = useButton_unstable(props, ref);\n\n useButtonStyles_unstable(state);\n\n const { useButtonStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ButtonProps>;\n\nButton.displayName = 'Button';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,qBAAqB,QAAQ;AACtC,SAASC,kBAAkB,QAAQ;AACnC,SAASC,wBAAwB,QAAQ;AAGzC,SAASC,4BAA4B,QAAQ;AAE7C;;;AAGA,OAAO,MAAMC,MAAA,gBAA2CL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACvF,MAAMC,KAAA,GAAQP,kBAAA,CAAmBK,KAAA,EAAOC,GAAA;EAExCL,wBAAA,CAAyBM,KAAA;EAEzB,MAAM;IAAEN,wBAAA,EAA0BO;EAAe,CAAE,GAAGN,4BAAA;EACtDM,eAAA,CAAgBD,KAAA;EAEhB,OAAOR,qBAAA,CAAsBQ,KAAA;EAC7B;AACF;;AAEAJ,MAAA,CAAOM,WAAW,GAAG"}
1
+ {"version":3,"names":["React","renderButton_unstable","useButton_unstable","useButtonStyles_unstable","useCustomStyleHooks_unstable","Button","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../../../../../../../../../packages/react-components/react-button/src/components/Button/Button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderButton_unstable } from './renderButton';\nimport { useButton_unstable } from './useButton';\nimport { useButtonStyles_unstable } from './useButtonStyles';\nimport type { ButtonProps } from './Button.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * Buttons give people a way to trigger an action.\n */\nexport const Button: ForwardRefComponent<ButtonProps> = React.forwardRef((props, ref) => {\n const state = useButton_unstable(props, ref);\n\n useButtonStyles_unstable(state);\n\n const { useButtonStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<ButtonProps>;\n\nButton.displayName = 'Button';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,qBAAqB,QAAQ,gBAAgB;AACtD,SAASC,kBAAkB,QAAQ,aAAa;AAChD,SAASC,wBAAwB,QAAQ,mBAAmB;AAG5D,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,MAAM,gBAAqCL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACtF,MAAMC,KAAK,GAAGP,kBAAkB,CAACK,KAAK,EAAEC,GAAG,CAAC;EAE5CL,wBAAwB,CAACM,KAAK,CAAC;EAE/B,MAAM;IAAEN,wBAAwB,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EACpFM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOR,qBAAqB,CAACQ,KAAK,CAAC;EACnC;AACF,CAAC,CAAqC;;AAEtCJ,MAAM,CAACM,WAAW,GAAG,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/Button/Button.types.ts"],"sourcesContent":["import type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ButtonSlots = {\n /**\n * Root of the component that renders as either a `<button>` tag or an `<a>` tag.\n */\n root: NonNullable<Slot<ARIAButtonSlotProps<'a'>>>;\n\n /**\n * Icon that renders either before or after the `children` as specified by the `iconPosition` prop.\n */\n icon?: Slot<'span'>;\n};\n\n/**\n * A button supports different sizes.\n */\nexport type ButtonSize = 'small' | 'medium' | 'large';\n\nexport type ButtonProps = ComponentProps<ButtonSlots> & {\n /**\n * A button can have its content and borders styled for greater emphasis or to be subtle.\n * - 'secondary' (default): Gives emphasis to the button in such a way that it indicates a secondary action.\n * - 'primary': Emphasizes the button as a primary action.\n * - 'outline': Removes background styling.\n * - 'subtle': Minimizes emphasis to blend into the background until hovered or focused.\n * - 'transparent': Removes background and border styling.\n *\n * @default 'secondary'\n */\n appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent';\n\n /**\n * When set, allows the button to be focusable even when it has been disabled. This is used in scenarios where it\n * is important to keep a consistent tab order for screen reader and keyboard users. The primary example of this\n * pattern is when the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.\n *\n * @default false\n */\n disabledFocusable?: boolean;\n\n /**\n * A button can show that it cannot be interacted with.\n *\n * @default false\n */\n disabled?: boolean;\n\n /**\n * A button can format its icon to appear before or after its content.\n *\n * @default 'before'\n */\n iconPosition?: 'before' | 'after';\n\n /**\n * A button can be rounded, circular, or square.\n *\n * @default 'rounded'\n */\n shape?: 'rounded' | 'circular' | 'square';\n\n /**\n * A button supports different sizes.\n *\n * @default 'medium'\n */\n size?: ButtonSize;\n};\n\nexport type ButtonState = ComponentState<ButtonSlots> &\n Required<Pick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'iconPosition' | 'shape' | 'size'>> & {\n /**\n * A button can contain only an icon.\n *\n * @default false\n */\n iconOnly: boolean;\n };\n"],"mappings":"AAAA"}
1
+ {"version":3,"file":"Button.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/Button/Button.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ARIAButtonSlotProps } from '@fluentui/react-aria';\nimport type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\nexport type ButtonSlots = {\n /**\n * Root of the component that renders as either a `<button>` tag or an `<a>` tag.\n */\n root: NonNullable<Slot<ARIAButtonSlotProps<'a'>>>;\n\n /**\n * Icon that renders either before or after the `children` as specified by the `iconPosition` prop.\n */\n icon?: Slot<'span'>;\n};\n\n/**\n * A button supports different sizes.\n */\nexport type ButtonSize = 'small' | 'medium' | 'large';\n\nexport type ButtonProps = ComponentProps<ButtonSlots> & {\n /**\n * A button can have its content and borders styled for greater emphasis or to be subtle.\n * - 'secondary' (default): Gives emphasis to the button in such a way that it indicates a secondary action.\n * - 'primary': Emphasizes the button as a primary action.\n * - 'outline': Removes background styling.\n * - 'subtle': Minimizes emphasis to blend into the background until hovered or focused.\n * - 'transparent': Removes background and border styling.\n *\n * @default 'secondary'\n */\n appearance?: 'secondary' | 'primary' | 'outline' | 'subtle' | 'transparent';\n\n /**\n * When set, allows the button to be focusable even when it has been disabled. This is used in scenarios where it\n * is important to keep a consistent tab order for screen reader and keyboard users. The primary example of this\n * pattern is when the disabled button is in a menu or a commandbar and is seldom used for standalone buttons.\n *\n * @default false\n */\n disabledFocusable?: boolean;\n\n /**\n * A button can show that it cannot be interacted with.\n *\n * @default false\n */\n disabled?: boolean;\n\n /**\n * A button can format its icon to appear before or after its content.\n *\n * @default 'before'\n */\n iconPosition?: 'before' | 'after';\n\n /**\n * A button can be rounded, circular, or square.\n *\n * @default 'rounded'\n */\n shape?: 'rounded' | 'circular' | 'square';\n\n /**\n * A button supports different sizes.\n *\n * @default 'medium'\n */\n size?: ButtonSize;\n};\n\nexport type ButtonState = ComponentState<ButtonSlots> &\n Required<Pick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'iconPosition' | 'shape' | 'size'>> & {\n /**\n * A button can contain only an icon.\n *\n * @default false\n */\n iconOnly: boolean;\n };\n"]}
@@ -1,5 +1,5 @@
1
- export * from "./Button";
2
- export * from "./renderButton";
3
- export * from "./useButton";
4
- export { buttonClassNames, useButtonStyles_unstable } from "./useButtonStyles";
1
+ export * from './Button';
2
+ export * from './renderButton';
3
+ export * from './useButton';
4
+ export { buttonClassNames, useButtonStyles_unstable } from './useButtonStyles';
5
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["buttonClassNames","useButtonStyles_unstable"],"sources":["../../../src/components/Button/index.ts"],"sourcesContent":["export * from './Button';\n// Explicit exports to omit ButtonCommons\nexport type { ButtonProps, ButtonSlots, ButtonState } from './Button.types';\nexport * from './renderButton';\nexport * from './useButton';\nexport { buttonClassNames, useButtonStyles_unstable } from './useButtonStyles';\n"],"mappings":"AAAA,cAAc;AAGd,cAAc;AACd,cAAc;AACd,SAASA,gBAAgB,EAAEC,wBAAwB,QAAQ"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/Button/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AAGzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC","sourcesContent":["export * from './Button';\n// Explicit exports to omit ButtonCommons\nexport type { ButtonProps, ButtonSlots, ButtonState } from './Button.types';\nexport * from './renderButton';\nexport * from './useButton';\nexport { buttonClassNames, useButtonStyles_unstable } from './useButtonStyles';\n"]}
@@ -1,5 +1,5 @@
1
- import * as React from "react";
2
- import { getSlots } from "@fluentui/react-utilities";
1
+ import * as React from 'react';
2
+ import { getSlots } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Renders a Button component by passing the state defined props to the appropriate slots.
5
5
  */
@@ -12,6 +12,12 @@ export const renderButton_unstable = state => {
12
12
  iconOnly,
13
13
  iconPosition
14
14
  } = state;
15
- return /*#__PURE__*/React.createElement(slots.root, slotProps.root, iconPosition !== "after" && slots.icon && /*#__PURE__*/React.createElement(slots.icon, slotProps.icon), !iconOnly && state.root.children, iconPosition === "after" && slots.icon && /*#__PURE__*/React.createElement(slots.icon, slotProps.icon));
15
+ return /*#__PURE__*/React.createElement(slots.root, {
16
+ ...slotProps.root
17
+ }, iconPosition !== 'after' && slots.icon && /*#__PURE__*/React.createElement(slots.icon, {
18
+ ...slotProps.icon
19
+ }), !iconOnly && state.root.children, iconPosition === 'after' && slots.icon && /*#__PURE__*/React.createElement(slots.icon, {
20
+ ...slotProps.icon
21
+ }));
16
22
  };
17
23
  //# sourceMappingURL=renderButton.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","getSlots","renderButton_unstable","state","slots","slotProps","iconOnly","iconPosition","createElement","root","icon","children"],"sources":["../../../src/components/Button/renderButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { ButtonSlots, ButtonState } from './Button.types';\n\n/**\n * Renders a Button component by passing the state defined props to the appropriate slots.\n */\nexport const renderButton_unstable = (state: ButtonState) => {\n const { slots, slotProps } = getSlots<ButtonSlots>(state);\n const { iconOnly, iconPosition } = state;\n\n return (\n <slots.root {...slotProps.root}>\n {iconPosition !== 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n {!iconOnly && state.root.children}\n {iconPosition === 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,QAAQ,QAAQ;AAGzB;;;AAGA,OAAO,MAAMC,qBAAA,GAAyBC,KAAA,IAAuB;EAC3D,MAAM;IAAEC,KAAA;IAAOC;EAAS,CAAE,GAAGJ,QAAA,CAAsBE,KAAA;EACnD,MAAM;IAAEG,QAAA;IAAUC;EAAY,CAAE,GAAGJ,KAAA;EAEnC,oBACEH,KAAA,CAAAQ,aAAA,CAACJ,KAAA,CAAMK,IAAI,EAAKJ,SAAA,CAAUI,IAAI,EAC3BF,YAAA,KAAiB,WAAWH,KAAA,CAAMM,IAAI,iBAAIV,KAAA,CAAAQ,aAAA,CAACJ,KAAA,CAAMM,IAAI,EAAKL,SAAA,CAAUK,IAAI,GACxE,CAACJ,QAAA,IAAYH,KAAA,CAAMM,IAAI,CAACE,QAAQ,EAChCJ,YAAA,KAAiB,WAAWH,KAAA,CAAMM,IAAI,iBAAIV,KAAA,CAAAQ,aAAA,CAACJ,KAAA,CAAMM,IAAI,EAAKL,SAAA,CAAUK,IAAI;AAG/E"}
1
+ {"version":3,"names":["React","getSlots","renderButton_unstable","state","slots","slotProps","iconOnly","iconPosition","createElement","root","icon","children"],"sources":["../../../../../../../../../packages/react-components/react-button/src/components/Button/renderButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { ButtonSlots, ButtonState } from './Button.types';\n\n/**\n * Renders a Button component by passing the state defined props to the appropriate slots.\n */\nexport const renderButton_unstable = (state: ButtonState) => {\n const { slots, slotProps } = getSlots<ButtonSlots>(state);\n const { iconOnly, iconPosition } = state;\n\n return (\n <slots.root {...slotProps.root}>\n {iconPosition !== 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n {!iconOnly && state.root.children}\n {iconPosition === 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,QAAQ,QAAQ,2BAA2B;AAGpD;;;AAGA,OAAO,MAAMC,qBAAqB,GAAIC,KAAkB,IAAI;EAC1D,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGJ,QAAQ,CAAcE,KAAK,CAAC;EACzD,MAAM;IAAEG,QAAQ;IAAEC;EAAY,CAAE,GAAGJ,KAAK;EAExC,oBACEH,KAAA,CAAAQ,aAAA,CAACJ,KAAK,CAACK,IAAI;IAAA,GAAKJ,SAAS,CAACI;EAAI,GAC3BF,YAAY,KAAK,OAAO,IAAIH,KAAK,CAACM,IAAI,iBAAIV,KAAA,CAAAQ,aAAA,CAACJ,KAAK,CAACM,IAAI;IAAA,GAAKL,SAAS,CAACK;EAAI,EAAI,EAC5E,CAACJ,QAAQ,IAAIH,KAAK,CAACM,IAAI,CAACE,QAAQ,EAChCJ,YAAY,KAAK,OAAO,IAAIH,KAAK,CAACM,IAAI,iBAAIV,KAAA,CAAAQ,aAAA,CAACJ,KAAK,CAACM,IAAI;IAAA,GAAKL,SAAS,CAACK;EAAI,EAAI,CAClE;AAEjB,CAAC"}
@@ -1,7 +1,6 @@
1
- import * as React from "react";
2
- import { useARIAButtonShorthand } from "@fluentui/react-aria";
3
- import { getNativeElementProps, resolveShorthand } from "@fluentui/react-utilities";
4
- import { useButtonContext } from "../../contexts/ButtonContext";
1
+ import { useARIAButtonShorthand } from '@fluentui/react-aria';
2
+ import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
3
+ import { useButtonContext } from '../../contexts/ButtonContext';
5
4
  /**
6
5
  * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.
7
6
  * @param props - User provided props to the Button component.
@@ -12,14 +11,14 @@ export const useButton_unstable = (props, ref) => {
12
11
  size: contextSize
13
12
  } = useButtonContext();
14
13
  const {
15
- appearance = "secondary",
16
- as = "button",
14
+ appearance = 'secondary',
15
+ as = 'button',
17
16
  disabled = false,
18
17
  disabledFocusable = false,
19
18
  icon,
20
- iconPosition = "before",
21
- shape = "rounded",
22
- size = contextSize ?? "medium"
19
+ iconPosition = 'before',
20
+ shape = 'rounded',
21
+ size = contextSize !== null && contextSize !== void 0 ? contextSize : 'medium'
23
22
  } = props;
24
23
  const iconShorthand = resolveShorthand(icon);
25
24
  return {
@@ -31,17 +30,17 @@ export const useButton_unstable = (props, ref) => {
31
30
  shape,
32
31
  size,
33
32
  // State calculated from a set of props
34
- iconOnly: Boolean(iconShorthand?.children && !props.children),
33
+ iconOnly: Boolean((iconShorthand === null || iconShorthand === void 0 ? void 0 : iconShorthand.children) && !props.children),
35
34
  // Slots definition
36
35
  components: {
37
- root: "button",
38
- icon: "span"
36
+ root: 'button',
37
+ icon: 'span'
39
38
  },
40
39
  root: getNativeElementProps(as, useARIAButtonShorthand(props, {
41
40
  required: true,
42
41
  defaultProps: {
43
42
  ref: ref,
44
- type: "button"
43
+ type: 'button'
45
44
  }
46
45
  })),
47
46
  icon: iconShorthand
@@ -1 +1 @@
1
- {"version":3,"names":["React","useARIAButtonShorthand","getNativeElementProps","resolveShorthand","useButtonContext","useButton_unstable","props","ref","size","contextSize","appearance","as","disabled","disabledFocusable","icon","iconPosition","shape","iconShorthand","iconOnly","Boolean","children","components","root","required","defaultProps","type"],"sources":["../../../src/components/Button/useButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { ARIAButtonSlotProps, useARIAButtonShorthand } from '@fluentui/react-aria';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport { useButtonContext } from '../../contexts/ButtonContext';\nimport type { ButtonProps, ButtonState } from './Button.types';\n\n/**\n * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.\n * @param props - User provided props to the Button component.\n * @param ref - User provided ref to be passed to the Button component.\n */\nexport const useButton_unstable = (\n props: ButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ButtonState => {\n const { size: contextSize } = useButtonContext();\n const {\n appearance = 'secondary',\n as = 'button',\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n shape = 'rounded',\n size = contextSize ?? 'medium',\n } = props;\n const iconShorthand = resolveShorthand(icon);\n\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n\n // State calculated from a set of props\n iconOnly: Boolean(iconShorthand?.children && !props.children),\n\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n },\n\n root: getNativeElementProps(\n as,\n useARIAButtonShorthand<ARIAButtonSlotProps<'a'>>(props, {\n required: true,\n defaultProps: {\n ref: ref as React.Ref<HTMLButtonElement & HTMLAnchorElement>,\n type: 'button',\n },\n }),\n ),\n icon: iconShorthand,\n };\n};\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAA8BC,sBAAsB,QAAQ;AAC5D,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ;AACxD,SAASC,gBAAgB,QAAQ;AAGjC;;;;;AAKA,OAAO,MAAMC,kBAAA,GAAqBA,CAChCC,KAAA,EACAC,GAAA,KACgB;EAChB,MAAM;IAAEC,IAAA,EAAMC;EAAW,CAAE,GAAGL,gBAAA;EAC9B,MAAM;IACJM,UAAA,GAAa;IACbC,EAAA,GAAK;IACLC,QAAA,GAAW,KAAK;IAChBC,iBAAA,GAAoB,KAAK;IACzBC,IAAA;IACAC,YAAA,GAAe;IACfC,KAAA,GAAQ;IACRR,IAAA,GAAOC,WAAA,IAAe;EAAQ,CAC/B,GAAGH,KAAA;EACJ,MAAMW,aAAA,GAAgBd,gBAAA,CAAiBW,IAAA;EAEvC,OAAO;IACL;IACAJ,UAAA;IACAE,QAAA;IACAC,iBAAA;IACAE,YAAA;IACAC,KAAA;IACAR,IAAA;IAEA;IACAU,QAAA,EAAUC,OAAA,CAAQF,aAAA,EAAeG,QAAA,IAAY,CAACd,KAAA,CAAMc,QAAQ;IAE5D;IACAC,UAAA,EAAY;MACVC,IAAA,EAAM;MACNR,IAAA,EAAM;IACR;IAEAQ,IAAA,EAAMpB,qBAAA,CACJS,EAAA,EACAV,sBAAA,CAAiDK,KAAA,EAAO;MACtDiB,QAAA,EAAU,IAAI;MACdC,YAAA,EAAc;QACZjB,GAAA,EAAKA,GAAA;QACLkB,IAAA,EAAM;MACR;IACF;IAEFX,IAAA,EAAMG;EACR;AACF"}
1
+ {"version":3,"names":["useARIAButtonShorthand","getNativeElementProps","resolveShorthand","useButtonContext","useButton_unstable","props","ref","size","contextSize","appearance","as","disabled","disabledFocusable","icon","iconPosition","shape","iconShorthand","iconOnly","Boolean","children","components","root","required","defaultProps","type"],"sources":["../../../../../../../../../packages/react-components/react-button/src/components/Button/useButton.ts"],"sourcesContent":["import * as React from 'react';\nimport { ARIAButtonSlotProps, useARIAButtonShorthand } from '@fluentui/react-aria';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport { useButtonContext } from '../../contexts/ButtonContext';\nimport type { ButtonProps, ButtonState } from './Button.types';\n\n/**\n * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.\n * @param props - User provided props to the Button component.\n * @param ref - User provided ref to be passed to the Button component.\n */\nexport const useButton_unstable = (\n props: ButtonProps,\n ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>,\n): ButtonState => {\n const { size: contextSize } = useButtonContext();\n const {\n appearance = 'secondary',\n as = 'button',\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n shape = 'rounded',\n size = contextSize ?? 'medium',\n } = props;\n const iconShorthand = resolveShorthand(icon);\n\n return {\n // Props passed at the top-level\n appearance,\n disabled,\n disabledFocusable,\n iconPosition,\n shape,\n size,\n\n // State calculated from a set of props\n iconOnly: Boolean(iconShorthand?.children && !props.children),\n\n // Slots definition\n components: {\n root: 'button',\n icon: 'span',\n },\n\n root: getNativeElementProps(\n as,\n useARIAButtonShorthand<ARIAButtonSlotProps<'a'>>(props, {\n required: true,\n defaultProps: {\n ref: ref as React.Ref<HTMLButtonElement & HTMLAnchorElement>,\n type: 'button',\n },\n }),\n ),\n icon: iconShorthand,\n };\n};\n"],"mappings":"AACA,SAA8BA,sBAAsB,QAAQ,sBAAsB;AAClF,SAASC,qBAAqB,EAAEC,gBAAgB,QAAQ,2BAA2B;AACnF,SAASC,gBAAgB,QAAQ,8BAA8B;AAG/D;;;;;AAKA,OAAO,MAAMC,kBAAkB,GAAGA,CAChCC,KAAkB,EAClBC,GAAqD,KACtC;EACf,MAAM;IAAEC,IAAI,EAAEC;EAAW,CAAE,GAAGL,gBAAgB,EAAE;EAChD,MAAM;IACJM,UAAU,GAAG,WAAW;IACxBC,EAAE,GAAG,QAAQ;IACbC,QAAQ,GAAG,KAAK;IAChBC,iBAAiB,GAAG,KAAK;IACzBC,IAAI;IACJC,YAAY,GAAG,QAAQ;IACvBC,KAAK,GAAG,SAAS;IACjBR,IAAI,GAAGC,WAAW,aAAXA,WAAW,cAAXA,WAAW,GAAI;EAAQ,CAC/B,GAAGH,KAAK;EACT,MAAMW,aAAa,GAAGd,gBAAgB,CAACW,IAAI,CAAC;EAE5C,OAAO;IACL;IACAJ,UAAU;IACVE,QAAQ;IACRC,iBAAiB;IACjBE,YAAY;IACZC,KAAK;IACLR,IAAI;IAEJ;IACAU,QAAQ,EAAEC,OAAO,CAAC,CAAAF,aAAa,aAAbA,aAAa,uBAAbA,aAAa,CAAEG,QAAQ,KAAI,CAACd,KAAK,CAACc,QAAQ,CAAC;IAE7D;IACAC,UAAU,EAAE;MACVC,IAAI,EAAE,QAAQ;MACdR,IAAI,EAAE;KACP;IAEDQ,IAAI,EAAEpB,qBAAqB,CACzBS,EAAE,EACFV,sBAAsB,CAA2BK,KAAK,EAAE;MACtDiB,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZjB,GAAG,EAAEA,GAAuD;QAC5DkB,IAAI,EAAE;;KAET,CAAC,CACH;IACDX,IAAI,EAAEG;GACP;AACH,CAAC"}
@@ -1,17 +1,17 @@
1
- import { iconFilledClassName, iconRegularClassName } from "@fluentui/react-icons";
2
- import { createCustomFocusIndicatorStyle } from "@fluentui/react-tabster";
3
- import { tokens } from "@fluentui/react-theme";
4
- import { shorthands, __styles, __resetStyles, mergeClasses } from "@griffel/react";
1
+ import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';
2
+ import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
3
+ import { tokens } from '@fluentui/react-theme';
4
+ import { shorthands, __styles, __resetStyles, mergeClasses } from '@griffel/react';
5
5
  export const buttonClassNames = {
6
- root: "fui-Button",
7
- icon: "fui-Button__icon"
6
+ root: 'fui-Button',
7
+ icon: 'fui-Button__icon'
8
8
  };
9
- const iconSpacingVar = "--fui-Button__icon--spacing";
10
- const buttonSpacingSmall = "3px";
11
- const buttonSpacingSmallWithIcon = "1px";
12
- const buttonSpacingMedium = "5px";
13
- const buttonSpacingLarge = "8px";
14
- const buttonSpacingLargeWithIcon = "7px";
9
+ const iconSpacingVar = '--fui-Button__icon--spacing';
10
+ const buttonSpacingSmall = '3px';
11
+ const buttonSpacingSmallWithIcon = '1px';
12
+ const buttonSpacingMedium = '5px';
13
+ const buttonSpacingLarge = '8px';
14
+ const buttonSpacingLargeWithIcon = '7px';
15
15
  const useRootBaseClassName = /*#__PURE__*/__resetStyles("rsawnvh", "r1eny37h", [".rsawnvh{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;text-decoration-line:none;vertical-align:middle;margin:0;overflow:hidden;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);font-family:var(--fontFamilyBase);outline-style:none;padding:5px var(--spacingHorizontalM);min-width:96px;border-radius:var(--borderRadiusMedium);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase300);transition-duration:var(--durationFaster);transition-property:background,border,color;transition-timing-function:var(--curveEasyEase);}", ".rsawnvh:hover{background-color:var(--colorNeutralBackground1Hover);border-color:var(--colorNeutralStroke1Hover);color:var(--colorNeutralForeground1Hover);cursor:pointer;}", ".rsawnvh:hover .fui-Icon-filled{display:inline;}", ".rsawnvh:hover .fui-Icon-regular{display:none;}", ".rsawnvh:hover:active{background-color:var(--colorNeutralBackground1Pressed);border-color:var(--colorNeutralStroke1Pressed);color:var(--colorNeutralForeground1Pressed);outline-style:none;}", ".rsawnvh:hover:active .fui-Icon-filled{display:inline;}", ".rsawnvh:hover:active .fui-Icon-regular{display:none;}", "@media screen and (prefers-reduced-motion: reduce){.rsawnvh{transition-duration:0.01ms;}}", "@media (forced-colors: active){.rsawnvh:focus{border-color:ButtonText;}.rsawnvh:hover{background-color:HighlightText;border-color:Highlight;color:Highlight;forced-color-adjust:none;}.rsawnvh:hover:active{background-color:HighlightText;border-color:Highlight;color:Highlight;forced-color-adjust:none;}}", ".rsawnvh:focus{outline-style:none;}", ".rsawnvh:focus-visible{outline-style:none;}", ".rsawnvh[data-fui-focus-visible]{border-color:var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);outline:var(--strokeWidthThick) solid var(--colorTransparentStroke);box-shadow:var(--shadow4),0 0 0 2px var(--colorStrokeFocus2);z-index:1;}", ".r1eny37h{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;text-decoration-line:none;vertical-align:middle;margin:0;overflow:hidden;background-color:var(--colorNeutralBackground1);color:var(--colorNeutralForeground1);border:var(--strokeWidthThin) solid var(--colorNeutralStroke1);font-family:var(--fontFamilyBase);outline-style:none;padding:5px var(--spacingHorizontalM);min-width:96px;border-radius:var(--borderRadiusMedium);font-size:var(--fontSizeBase300);font-weight:var(--fontWeightSemibold);line-height:var(--lineHeightBase300);transition-duration:var(--durationFaster);transition-property:background,border,color;transition-timing-function:var(--curveEasyEase);}", ".r1eny37h:hover{background-color:var(--colorNeutralBackground1Hover);border-color:var(--colorNeutralStroke1Hover);color:var(--colorNeutralForeground1Hover);cursor:pointer;}", ".r1eny37h:hover .fui-Icon-filled{display:inline;}", ".r1eny37h:hover .fui-Icon-regular{display:none;}", ".r1eny37h:hover:active{background-color:var(--colorNeutralBackground1Pressed);border-color:var(--colorNeutralStroke1Pressed);color:var(--colorNeutralForeground1Pressed);outline-style:none;}", ".r1eny37h:hover:active .fui-Icon-filled{display:inline;}", ".r1eny37h:hover:active .fui-Icon-regular{display:none;}", "@media screen and (prefers-reduced-motion: reduce){.r1eny37h{transition-duration:0.01ms;}}", "@media (forced-colors: active){.r1eny37h:focus{border-color:ButtonText;}.r1eny37h:hover{background-color:HighlightText;border-color:Highlight;color:Highlight;forced-color-adjust:none;}.r1eny37h:hover:active{background-color:HighlightText;border-color:Highlight;color:Highlight;forced-color-adjust:none;}}", ".r1eny37h:focus{outline-style:none;}", ".r1eny37h:focus-visible{outline-style:none;}", ".r1eny37h[data-fui-focus-visible]{border-color:var(--colorTransparentStroke);border-radius:var(--borderRadiusMedium);outline:var(--strokeWidthThick) solid var(--colorTransparentStroke);box-shadow:var(--shadow4),0 0 0 2px var(--colorStrokeFocus2);z-index:1;}"]);
16
16
  const useIconBaseClassName = /*#__PURE__*/__resetStyles("rywnvv2", null, [".rywnvv2{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;font-size:20px;height:20px;width:20px;--fui-Button__icon--spacing:var(--spacingHorizontalSNudge);}"]);
17
17
  const useRootStyles = /*#__PURE__*/__styles({
@@ -468,11 +468,11 @@ export const useButtonStyles_unstable = state => {
468
468
  shape,
469
469
  size
470
470
  } = state;
471
- state.root.className = mergeClasses(buttonClassNames.root, rootBaseClassName, appearance && rootStyles[appearance], rootStyles[size], icon && size === "small" && rootStyles.smallWithIcon, icon && size === "large" && rootStyles.largeWithIcon, rootStyles[shape],
471
+ state.root.className = mergeClasses(buttonClassNames.root, rootBaseClassName, appearance && rootStyles[appearance], rootStyles[size], icon && size === 'small' && rootStyles.smallWithIcon, icon && size === 'large' && rootStyles.largeWithIcon, rootStyles[shape],
472
472
  // Disabled styles
473
473
  (disabled || disabledFocusable) && rootDisabledStyles.base, (disabled || disabledFocusable) && rootDisabledStyles.highContrast, appearance && (disabled || disabledFocusable) && rootDisabledStyles[appearance],
474
474
  // Focus styles
475
- appearance === "primary" && rootFocusStyles.primary, rootFocusStyles[size], rootFocusStyles[shape],
475
+ appearance === 'primary' && rootFocusStyles.primary, rootFocusStyles[size], rootFocusStyles[shape],
476
476
  // Icon-only styles
477
477
  iconOnly && rootIconOnlyStyles[size],
478
478
  // User provided class name
@@ -1 +1 @@
1
- {"version":3,"names":["iconFilledClassName","iconRegularClassName","createCustomFocusIndicatorStyle","tokens","shorthands","__styles","__resetStyles","mergeClasses","buttonClassNames","root","icon","iconSpacingVar","buttonSpacingSmall","buttonSpacingSmallWithIcon","buttonSpacingMedium","buttonSpacingLarge","buttonSpacingLargeWithIcon","useRootBaseClassName","useIconBaseClassName","useRootStyles","outline","De3pzq","Jwef8y","iro3zm","primary","g2u3we","h3c5rm","B9xav0g","zhjwy3","sj55zd","Bgoe8wy","Bwzppfd","oetu4i","gg5e9n","Bi91k9c","b661bw","Bk6r4ia","B9zn80p","Bpld233","B2d53fq","Bsw6fvg","Bjwas2f","Bn1d65q","Bxeuatn","n51gp8","Bbusuzp","ycbfsm","Bqrx1nm","pgvf35","Bh7lczh","dpv3f4","Bpnjhaq","ze5xyy","g2kj27","Bf756sw","Bow2dr7","Bvhedfk","Gye4lf","pc6evw","secondary","subtle","Bbdnnc7","x3br3k","transparent","circular","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","rounded","square","small","Bf4jedk","z8tnut","z189sj","Byoj8tv","uwmqm3","Be2twd7","Bhrd7zp","Bg96gwp","smallWithIcon","medium","large","largeWithIcon","d","h","m","useRootDisabledStyles","base","Bceei9c","eoavqd","Bk3fhr4","Bmfj8id","c3iz72","em6i61","vm6p8p","highContrast","G867l3","gdbnj","mxns5l","o3nasb","useRootFocusStyles","Brovlpu","B486eqv","kdpuga","Bw81rd7","B6xbmo0","dm238s","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","j6ew2k","f","i","useRootIconOnlyStyles","B2u0y6b","useIconStyles","Bqenvij","a9b677","Bqrlyyl","before","t21cq0","after","Frg6f3","useButtonStyles_unstable","state","rootBaseClassName","iconBaseClassName","rootStyles","rootDisabledStyles","rootFocusStyles","rootIconOnlyStyles","iconStyles","appearance","disabled","disabledFocusable","iconOnly","iconPosition","shape","size","className","children","undefined"],"sources":["../../../src/components/Button/useButtonStyles.ts"],"sourcesContent":["import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { shorthands, makeStyles, makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ButtonSlots, ButtonState } from './Button.types';\n\nexport const buttonClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fui-Button',\n icon: 'fui-Button__icon',\n};\n\nconst iconSpacingVar = '--fui-Button__icon--spacing';\n\nconst buttonSpacingSmall = '3px';\nconst buttonSpacingSmallWithIcon = '1px';\nconst buttonSpacingMedium = '5px';\nconst buttonSpacingLarge = '8px';\nconst buttonSpacingLargeWithIcon = '7px';\n\nconst useRootBaseClassName = makeResetStyles({\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'inline-flex',\n justifyContent: 'center',\n textDecorationLine: 'none',\n verticalAlign: 'middle',\n\n margin: 0,\n overflow: 'hidden',\n\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n\n fontFamily: tokens.fontFamilyBase,\n outlineStyle: 'none',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n borderColor: tokens.colorNeutralStroke1Hover,\n color: tokens.colorNeutralForeground1Hover,\n\n cursor: 'pointer',\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n borderColor: tokens.colorNeutralStroke1Pressed,\n color: tokens.colorNeutralForeground1Pressed,\n\n outlineStyle: 'none',\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n\n padding: `${buttonSpacingMedium} ${tokens.spacingHorizontalM}`,\n minWidth: '96px',\n borderRadius: tokens.borderRadiusMedium,\n\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n lineHeight: tokens.lineHeightBase300,\n\n // Transition styles\n\n transitionDuration: tokens.durationFaster,\n transitionProperty: 'background, border, color',\n transitionTimingFunction: tokens.curveEasyEase,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n },\n\n // High contrast styles\n\n '@media (forced-colors: active)': {\n ':focus': {\n borderColor: 'ButtonText',\n },\n\n ':hover': {\n backgroundColor: 'HighlightText',\n borderColor: 'Highlight',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n\n ':hover:active': {\n backgroundColor: 'HighlightText',\n borderColor: 'Highlight',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n },\n\n // Focus styles\n\n ...createCustomFocusIndicatorStyle({\n borderColor: tokens.colorTransparentStroke,\n borderRadius: tokens.borderRadiusMedium,\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorTransparentStroke}`,\n boxShadow: `\n ${tokens.shadow4},\n 0 0 0 2px ${tokens.colorStrokeFocus2}\n `,\n zIndex: 1,\n }),\n});\n\nconst useIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n\n fontSize: '20px',\n height: '20px',\n width: '20px',\n\n [iconSpacingVar]: tokens.spacingHorizontalSNudge,\n});\n\nconst useRootStyles = makeStyles({\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n },\n },\n primary: {\n backgroundColor: tokens.colorBrandBackground,\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 '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('HighlightText'),\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 },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2,\n\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2Hover,\n\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2Pressed,\n\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2,\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 // Shape variations\n circular: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n rounded: {\n /* The borderRadius rounded styles are handled in the size variations */\n },\n square: {\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n },\n\n // Size variations\n small: {\n minWidth: '64px',\n ...shorthands.padding(buttonSpacingSmall, tokens.spacingHorizontalS),\n\n ...shorthands.borderRadius(buttonSpacingSmall),\n\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n lineHeight: tokens.lineHeightBase200,\n },\n smallWithIcon: {\n paddingBottom: buttonSpacingSmallWithIcon,\n paddingTop: buttonSpacingSmallWithIcon,\n },\n medium: {\n /* defined in base styles */\n },\n large: {\n minWidth: '96px',\n ...shorthands.padding(buttonSpacingLarge, tokens.spacingHorizontalL),\n\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n\n fontSize: tokens.fontSizeBase400,\n fontWeight: tokens.fontWeightSemibold,\n lineHeight: tokens.lineHeightBase400,\n },\n largeWithIcon: {\n paddingBottom: buttonSpacingLargeWithIcon,\n paddingTop: buttonSpacingLargeWithIcon,\n },\n});\n\nconst useRootDisabledStyles = makeStyles({\n // Base styles\n base: {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n [`& .${iconFilledClassName}`]: {\n display: 'none',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline',\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n [`& .${iconFilledClassName}`]: {\n display: 'none',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline',\n },\n },\n },\n\n // High contrast styles\n highContrast: {\n '@media (forced-colors: active)': {\n backgroundColor: 'ButtonFace',\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n\n ':focus': {\n ...shorthands.borderColor('GrayText'),\n },\n\n ':hover': {\n backgroundColor: 'ButtonFace',\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n },\n\n ':hover:active': {\n backgroundColor: 'ButtonFace',\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n },\n },\n },\n\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackground,\n },\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: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n },\n});\n\nconst useRootFocusStyles = makeStyles({\n // Shape variations\n circular: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n }),\n rounded: {\n /* The rounded styles are exactly the same as the base styles. */\n },\n square: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n }),\n\n // Primary styles\n primary: createCustomFocusIndicatorStyle({\n ...shorthands.borderColor(tokens.colorNeutralForegroundOnBrand),\n boxShadow: `${tokens.shadow2}, 0 0 0 2px ${tokens.colorStrokeFocus2}`,\n }),\n\n // Size variations\n small: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusSmall),\n }),\n medium: {\n /* defined in base styles */\n },\n large: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusLarge),\n }),\n});\n\nconst useRootIconOnlyStyles = makeStyles({\n // Size variations\n small: {\n ...shorthands.padding(buttonSpacingSmallWithIcon),\n\n minWidth: '24px',\n maxWidth: '24px',\n },\n medium: {\n ...shorthands.padding(buttonSpacingMedium),\n\n minWidth: '32px',\n maxWidth: '32px',\n },\n large: {\n ...shorthands.padding(buttonSpacingLargeWithIcon),\n\n minWidth: '40px',\n maxWidth: '40px',\n },\n});\n\nconst useIconStyles = makeStyles({\n // Size variations\n small: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n\n [iconSpacingVar]: tokens.spacingHorizontalXS,\n },\n medium: {\n /* defined in base styles */\n },\n large: {\n fontSize: '24px',\n height: '24px',\n width: '24px',\n\n [iconSpacingVar]: tokens.spacingHorizontalSNudge,\n },\n\n // Icon position variations\n before: {\n marginRight: `var(${iconSpacingVar})`,\n },\n after: {\n marginLeft: `var(${iconSpacingVar})`,\n },\n});\n\nexport const useButtonStyles_unstable = (state: ButtonState): ButtonState => {\n const rootBaseClassName = useRootBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n\n const rootStyles = useRootStyles();\n const rootDisabledStyles = useRootDisabledStyles();\n const rootFocusStyles = useRootFocusStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n\n const { appearance, disabled, disabledFocusable, icon, iconOnly, iconPosition, shape, size } = state;\n\n state.root.className = mergeClasses(\n buttonClassNames.root,\n rootBaseClassName,\n\n appearance && rootStyles[appearance],\n\n rootStyles[size],\n icon && size === 'small' && rootStyles.smallWithIcon,\n icon && size === 'large' && rootStyles.largeWithIcon,\n rootStyles[shape],\n\n // Disabled styles\n (disabled || disabledFocusable) && rootDisabledStyles.base,\n (disabled || disabledFocusable) && rootDisabledStyles.highContrast,\n appearance && (disabled || disabledFocusable) && rootDisabledStyles[appearance],\n\n // Focus styles\n appearance === 'primary' && rootFocusStyles.primary,\n rootFocusStyles[size],\n rootFocusStyles[shape],\n\n // Icon-only styles\n iconOnly && rootIconOnlyStyles[size],\n\n // User provided class name\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n buttonClassNames.icon,\n iconBaseClassName,\n state.root.children !== undefined && state.root.children !== null && iconStyles[iconPosition],\n iconStyles[size],\n state.icon.className,\n );\n }\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,mBAAmB,EAAEC,oBAAoB,QAAQ;AAC1D,SAASC,+BAA+B,QAAQ;AAChD,SAASC,MAAM,QAAQ;AACvB,SAASC,UAAU,EAAAC,QAAA,EAAAC,aAAA,EAA+BC,YAAY,QAAQ;AAItE,OAAO,MAAMC,gBAAA,GAAgD;EAC3DC,IAAA,EAAM;EACNC,IAAA,EAAM;AACR;AAEA,MAAMC,cAAA,GAAiB;AAEvB,MAAMC,kBAAA,GAAqB;AAC3B,MAAMC,0BAAA,GAA6B;AACnC,MAAMC,mBAAA,GAAsB;AAC5B,MAAMC,kBAAA,GAAqB;AAC3B,MAAMC,0BAAA,GAA6B;AAEnC,MAAMC,oBAAA,gBAAuBX,aAAA,m+IAoG7B;AAEA,MAAMY,oBAAA,gBAAuBZ,aAAA,waAU7B;AAEA,MAAMa,aAAA,gBAAgBd,QAAA;EAAAe,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,OAAA;IAAAH,MAAA;IAAAI,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAP,MAAA;IAAAQ,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAX,MAAA;IAAAY,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,OAAA;IAAAC,MAAA;IAAAC,MAAA;EAAA;EAAAC,SAAA;EAAA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EACrBsH,iBAAA,EACAF,KAAA,CAAMrH,IAAI,CAACqI,QAAQ,KAAKC,SAAA,IAAajB,KAAA,CAAMrH,IAAI,CAACqI,QAAQ,KAAK,IAAI,IAAIT,UAAU,CAACK,YAAA,CAAa,EAC7FL,UAAU,CAACO,IAAA,CAAK,EAChBd,KAAA,CAAMpH,IAAI,CAACmI,SAAS;EAExB;EAEA,OAAOf,KAAA;AACT"}
1
+ {"version":3,"names":["iconFilledClassName","iconRegularClassName","createCustomFocusIndicatorStyle","tokens","shorthands","__styles","__resetStyles","mergeClasses","buttonClassNames","root","icon","iconSpacingVar","buttonSpacingSmall","buttonSpacingSmallWithIcon","buttonSpacingMedium","buttonSpacingLarge","buttonSpacingLargeWithIcon","useRootBaseClassName","useIconBaseClassName","useRootStyles","outline","De3pzq","Jwef8y","iro3zm","primary","g2u3we","h3c5rm","B9xav0g","zhjwy3","sj55zd","Bgoe8wy","Bwzppfd","oetu4i","gg5e9n","Bi91k9c","b661bw","Bk6r4ia","B9zn80p","Bpld233","B2d53fq","Bsw6fvg","Bjwas2f","Bn1d65q","Bxeuatn","n51gp8","Bbusuzp","ycbfsm","Bqrx1nm","pgvf35","Bh7lczh","dpv3f4","Bpnjhaq","ze5xyy","g2kj27","Bf756sw","Bow2dr7","Bvhedfk","Gye4lf","pc6evw","secondary","subtle","Bbdnnc7","x3br3k","transparent","circular","Bbmb7ep","Beyfa6y","B7oj6ja","Btl43ni","rounded","square","small","Bf4jedk","z8tnut","z189sj","Byoj8tv","uwmqm3","Be2twd7","Bhrd7zp","Bg96gwp","smallWithIcon","medium","large","largeWithIcon","d","h","m","useRootDisabledStyles","base","Bceei9c","eoavqd","Bk3fhr4","Bmfj8id","c3iz72","em6i61","vm6p8p","highContrast","G867l3","gdbnj","mxns5l","o3nasb","useRootFocusStyles","Brovlpu","B486eqv","kdpuga","Bw81rd7","B6xbmo0","dm238s","B8q5s1w","Bci5o5g","n8qw10","Bdrgwmp","j6ew2k","f","i","useRootIconOnlyStyles","B2u0y6b","useIconStyles","Bqenvij","a9b677","Bqrlyyl","before","t21cq0","after","Frg6f3","useButtonStyles_unstable","state","rootBaseClassName","iconBaseClassName","rootStyles","rootDisabledStyles","rootFocusStyles","rootIconOnlyStyles","iconStyles","appearance","disabled","disabledFocusable","iconOnly","iconPosition","shape","size","className","children","undefined"],"sources":["../../../../../../../../../packages/react-components/react-button/src/components/Button/useButtonStyles.ts"],"sourcesContent":["import { iconFilledClassName, iconRegularClassName } from '@fluentui/react-icons';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport { shorthands, makeStyles, makeResetStyles, mergeClasses } from '@griffel/react';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { ButtonSlots, ButtonState } from './Button.types';\n\nexport const buttonClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fui-Button',\n icon: 'fui-Button__icon',\n};\n\nconst iconSpacingVar = '--fui-Button__icon--spacing';\n\nconst buttonSpacingSmall = '3px';\nconst buttonSpacingSmallWithIcon = '1px';\nconst buttonSpacingMedium = '5px';\nconst buttonSpacingLarge = '8px';\nconst buttonSpacingLargeWithIcon = '7px';\n\nconst useRootBaseClassName = makeResetStyles({\n alignItems: 'center',\n boxSizing: 'border-box',\n display: 'inline-flex',\n justifyContent: 'center',\n textDecorationLine: 'none',\n verticalAlign: 'middle',\n\n margin: 0,\n overflow: 'hidden',\n\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n border: `${tokens.strokeWidthThin} solid ${tokens.colorNeutralStroke1}`,\n\n fontFamily: tokens.fontFamilyBase,\n outlineStyle: 'none',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n borderColor: tokens.colorNeutralStroke1Hover,\n color: tokens.colorNeutralForeground1Hover,\n\n cursor: 'pointer',\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n borderColor: tokens.colorNeutralStroke1Pressed,\n color: tokens.colorNeutralForeground1Pressed,\n\n outlineStyle: 'none',\n\n [`& .${iconFilledClassName}`]: {\n display: 'inline',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'none',\n },\n },\n\n padding: `${buttonSpacingMedium} ${tokens.spacingHorizontalM}`,\n minWidth: '96px',\n borderRadius: tokens.borderRadiusMedium,\n\n fontSize: tokens.fontSizeBase300,\n fontWeight: tokens.fontWeightSemibold,\n lineHeight: tokens.lineHeightBase300,\n\n // Transition styles\n\n transitionDuration: tokens.durationFaster,\n transitionProperty: 'background, border, color',\n transitionTimingFunction: tokens.curveEasyEase,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n },\n\n // High contrast styles\n\n '@media (forced-colors: active)': {\n ':focus': {\n borderColor: 'ButtonText',\n },\n\n ':hover': {\n backgroundColor: 'HighlightText',\n borderColor: 'Highlight',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n\n ':hover:active': {\n backgroundColor: 'HighlightText',\n borderColor: 'Highlight',\n color: 'Highlight',\n forcedColorAdjust: 'none',\n },\n },\n\n // Focus styles\n\n ...createCustomFocusIndicatorStyle({\n borderColor: tokens.colorTransparentStroke,\n borderRadius: tokens.borderRadiusMedium,\n outline: `${tokens.strokeWidthThick} solid ${tokens.colorTransparentStroke}`,\n boxShadow: `\n ${tokens.shadow4},\n 0 0 0 2px ${tokens.colorStrokeFocus2}\n `,\n zIndex: 1,\n }),\n});\n\nconst useIconBaseClassName = makeResetStyles({\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n\n fontSize: '20px',\n height: '20px',\n width: '20px',\n\n [iconSpacingVar]: tokens.spacingHorizontalSNudge,\n});\n\nconst useRootStyles = makeStyles({\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n },\n },\n primary: {\n backgroundColor: tokens.colorBrandBackground,\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 '@media (forced-colors: active)': {\n backgroundColor: 'Highlight',\n ...shorthands.borderColor('HighlightText'),\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 },\n secondary: {\n /* The secondary styles are exactly the same as the base styles. */\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2,\n\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2Hover,\n\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandHover,\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2Pressed,\n\n [`& .${buttonClassNames.icon}`]: {\n color: tokens.colorNeutralForeground2BrandPressed,\n },\n },\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n color: tokens.colorNeutralForeground2,\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 // Shape variations\n circular: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n rounded: {\n /* The borderRadius rounded styles are handled in the size variations */\n },\n square: {\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n },\n\n // Size variations\n small: {\n minWidth: '64px',\n ...shorthands.padding(buttonSpacingSmall, tokens.spacingHorizontalS),\n\n ...shorthands.borderRadius(buttonSpacingSmall),\n\n fontSize: tokens.fontSizeBase200,\n fontWeight: tokens.fontWeightRegular,\n lineHeight: tokens.lineHeightBase200,\n },\n smallWithIcon: {\n paddingBottom: buttonSpacingSmallWithIcon,\n paddingTop: buttonSpacingSmallWithIcon,\n },\n medium: {\n /* defined in base styles */\n },\n large: {\n minWidth: '96px',\n ...shorthands.padding(buttonSpacingLarge, tokens.spacingHorizontalL),\n\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n\n fontSize: tokens.fontSizeBase400,\n fontWeight: tokens.fontWeightSemibold,\n lineHeight: tokens.lineHeightBase400,\n },\n largeWithIcon: {\n paddingBottom: buttonSpacingLargeWithIcon,\n paddingTop: buttonSpacingLargeWithIcon,\n },\n});\n\nconst useRootDisabledStyles = makeStyles({\n // Base styles\n base: {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n ':hover': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n [`& .${iconFilledClassName}`]: {\n display: 'none',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline',\n },\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.borderColor(tokens.colorNeutralStrokeDisabled),\n color: tokens.colorNeutralForegroundDisabled,\n\n cursor: 'not-allowed',\n\n [`& .${iconFilledClassName}`]: {\n display: 'none',\n },\n [`& .${iconRegularClassName}`]: {\n display: 'inline',\n },\n },\n },\n\n // High contrast styles\n highContrast: {\n '@media (forced-colors: active)': {\n backgroundColor: 'ButtonFace',\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n\n ':focus': {\n ...shorthands.borderColor('GrayText'),\n },\n\n ':hover': {\n backgroundColor: 'ButtonFace',\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n },\n\n ':hover:active': {\n backgroundColor: 'ButtonFace',\n ...shorthands.borderColor('GrayText'),\n color: 'GrayText',\n },\n },\n },\n\n // Appearance variations\n outline: {\n backgroundColor: tokens.colorTransparentBackground,\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackground,\n },\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: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n\n ':hover': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n\n ':hover:active': {\n backgroundColor: tokens.colorTransparentBackground,\n ...shorthands.borderColor('transparent'),\n },\n },\n});\n\nconst useRootFocusStyles = makeStyles({\n // Shape variations\n circular: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n }),\n rounded: {\n /* The rounded styles are exactly the same as the base styles. */\n },\n square: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusNone),\n }),\n\n // Primary styles\n primary: createCustomFocusIndicatorStyle({\n ...shorthands.borderColor(tokens.colorNeutralForegroundOnBrand),\n boxShadow: `${tokens.shadow2}, 0 0 0 2px ${tokens.colorStrokeFocus2}`,\n }),\n\n // Size variations\n small: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusSmall),\n }),\n medium: {\n /* defined in base styles */\n },\n large: createCustomFocusIndicatorStyle({\n ...shorthands.borderRadius(tokens.borderRadiusLarge),\n }),\n});\n\nconst useRootIconOnlyStyles = makeStyles({\n // Size variations\n small: {\n ...shorthands.padding(buttonSpacingSmallWithIcon),\n\n minWidth: '24px',\n maxWidth: '24px',\n },\n medium: {\n ...shorthands.padding(buttonSpacingMedium),\n\n minWidth: '32px',\n maxWidth: '32px',\n },\n large: {\n ...shorthands.padding(buttonSpacingLargeWithIcon),\n\n minWidth: '40px',\n maxWidth: '40px',\n },\n});\n\nconst useIconStyles = makeStyles({\n // Size variations\n small: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n\n [iconSpacingVar]: tokens.spacingHorizontalXS,\n },\n medium: {\n /* defined in base styles */\n },\n large: {\n fontSize: '24px',\n height: '24px',\n width: '24px',\n\n [iconSpacingVar]: tokens.spacingHorizontalSNudge,\n },\n\n // Icon position variations\n before: {\n marginRight: `var(${iconSpacingVar})`,\n },\n after: {\n marginLeft: `var(${iconSpacingVar})`,\n },\n});\n\nexport const useButtonStyles_unstable = (state: ButtonState): ButtonState => {\n const rootBaseClassName = useRootBaseClassName();\n const iconBaseClassName = useIconBaseClassName();\n\n const rootStyles = useRootStyles();\n const rootDisabledStyles = useRootDisabledStyles();\n const rootFocusStyles = useRootFocusStyles();\n const rootIconOnlyStyles = useRootIconOnlyStyles();\n const iconStyles = useIconStyles();\n\n const { appearance, disabled, disabledFocusable, icon, iconOnly, iconPosition, shape, size } = state;\n\n state.root.className = mergeClasses(\n buttonClassNames.root,\n rootBaseClassName,\n\n appearance && rootStyles[appearance],\n\n rootStyles[size],\n icon && size === 'small' && rootStyles.smallWithIcon,\n icon && size === 'large' && rootStyles.largeWithIcon,\n rootStyles[shape],\n\n // Disabled styles\n (disabled || disabledFocusable) && rootDisabledStyles.base,\n (disabled || disabledFocusable) && rootDisabledStyles.highContrast,\n appearance && (disabled || disabledFocusable) && rootDisabledStyles[appearance],\n\n // Focus styles\n appearance === 'primary' && rootFocusStyles.primary,\n rootFocusStyles[size],\n rootFocusStyles[shape],\n\n // Icon-only styles\n iconOnly && rootIconOnlyStyles[size],\n\n // User provided class name\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(\n buttonClassNames.icon,\n iconBaseClassName,\n state.root.children !== undefined && state.root.children !== null && iconStyles[iconPosition],\n iconStyles[size],\n state.icon.className,\n );\n }\n\n return state;\n};\n"],"mappings":"AAAA,SAASA,mBAAmB,EAAEC,oBAAoB,QAAQ,uBAAuB;AACjF,SAASC,+BAA+B,QAAQ,yBAAyB;AACzE,SAASC,MAAM,QAAQ,uBAAuB;AAC9C,SAASC,UAAU,EAAAC,QAAA,EAAAC,aAAA,EAA+BC,YAAY,QAAQ,gBAAgB;AAItF,OAAO,MAAMC,gBAAgB,GAAgC;EAC3DC,IAAI,EAAE,YAAY;EAClBC,IAAI,EAAE;CACP;AAED,MAAMC,cAAc,GAAG,6BAA6B;AAEpD,MAAMC,kBAAkB,GAAG,KAAK;AAChC,MAAMC,0BAA0B,GAAG,KAAK;AACxC,MAAMC,mBAAmB,GAAG,KAAK;AACjC,MAAMC,kBAAkB,GAAG,KAAK;AAChC,MAAMC,0BAA0B,GAAG,KAAK;AAExC,MAAMC,oBAAoB,gBAAGX,aAAA,m+IAoG3B;AAEF,MAAMY,oBAAoB,gBAAGZ,aAAA,waAU3B;AAEF,MAAMa,aAAa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DtE,IAAI,IAAIkI,IAAI,KAAK,OAAO,IAAIX,UAAU,CAAC9C,aAAa,EACpD8C,UAAU,CAACU,KAAK,CAAC;EAEjB;EACA,CAACJ,QAAQ,IAAIC,iBAAiB,KAAKN,kBAAkB,CAAC1C,IAAI,EAC1D,CAAC+C,QAAQ,IAAIC,iBAAiB,KAAKN,kBAAkB,CAAClC,YAAY,EAClEsC,UAAU,KAAKC,QAAQ,IAAIC,iBAAiB,CAAC,IAAIN,kBAAkB,CAACI,UAAU,CAAC;EAE/E;EACAA,UAAU,KAAK,SAAS,IAAIH,eAAe,CAAC3G,OAAO,EACnD2G,eAAe,CAACS,IAAI,CAAC,EACrBT,eAAe,CAACQ,KAAK,CAAC;EAEtB;EACAF,QAAQ,IAAIL,kBAAkB,CAACQ,IAAI,CAAC;EAEpC;EACAd,KAAK,CAACrH,IAAI,CAACoI,SAAS,CACrB;EAED,IAAIf,KAAK,CAACpH,IAAI,EAAE;IACdoH,KAAK,CAACpH,IAAI,CAACmI,SAAS,GAAGtI,YAAY,CACjCC,gBAAgB,CAACE,IAAI,EACrBsH,iBAAiB,EACjBF,KAAK,CAACrH,IAAI,CAACqI,QAAQ,KAAKC,SAAS,IAAIjB,KAAK,CAACrH,IAAI,CAACqI,QAAQ,KAAK,IAAI,IAAIT,UAAU,CAACK,YAAY,CAAC,EAC7FL,UAAU,CAACO,IAAI,CAAC,EAChBd,KAAK,CAACpH,IAAI,CAACmI,SAAS,CACrB;;EAGH,OAAOf,KAAK;AACd,CAAC"}
@@ -1,8 +1,8 @@
1
- import * as React from "react";
2
- import { renderCompoundButton_unstable } from "./renderCompoundButton";
3
- import { useCompoundButton_unstable } from "./useCompoundButton";
4
- import { useCompoundButtonStyles_unstable } from "./useCompoundButtonStyles";
5
- import { useCustomStyleHooks_unstable } from "@fluentui/react-shared-contexts";
1
+ import * as React from 'react';
2
+ import { renderCompoundButton_unstable } from './renderCompoundButton';
3
+ import { useCompoundButton_unstable } from './useCompoundButton';
4
+ import { useCompoundButtonStyles_unstable } from './useCompoundButtonStyles';
5
+ import { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';
6
6
  /**
7
7
  * CompoundButtons are buttons that can have secondary content that adds extra information to the user.
8
8
  */
@@ -17,5 +17,5 @@ export const CompoundButton = /*#__PURE__*/React.forwardRef((props, ref) => {
17
17
  // Casting is required due to lack of distributive union to support unions on @types/react
18
18
  });
19
19
 
20
- CompoundButton.displayName = "CompoundButton";
20
+ CompoundButton.displayName = 'CompoundButton';
21
21
  //# sourceMappingURL=CompoundButton.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","renderCompoundButton_unstable","useCompoundButton_unstable","useCompoundButtonStyles_unstable","useCustomStyleHooks_unstable","CompoundButton","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../../../src/components/CompoundButton/CompoundButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderCompoundButton_unstable } from './renderCompoundButton';\nimport { useCompoundButton_unstable } from './useCompoundButton';\nimport { useCompoundButtonStyles_unstable } from './useCompoundButtonStyles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { CompoundButtonProps } from './CompoundButton.types';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * CompoundButtons are buttons that can have secondary content that adds extra information to the user.\n */\nexport const CompoundButton: ForwardRefComponent<CompoundButtonProps> = React.forwardRef((props, ref) => {\n const state = useCompoundButton_unstable(props, ref);\n\n useCompoundButtonStyles_unstable(state);\n\n const { useCompoundButtonStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderCompoundButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<CompoundButtonProps>;\n\nCompoundButton.displayName = 'CompoundButton';\n"],"mappings":"AAAA,YAAYA,KAAA,MAAW;AACvB,SAASC,6BAA6B,QAAQ;AAC9C,SAASC,0BAA0B,QAAQ;AAC3C,SAASC,gCAAgC,QAAQ;AAGjD,SAASC,4BAA4B,QAAQ;AAE7C;;;AAGA,OAAO,MAAMC,cAAA,gBAA2DL,KAAA,CAAMM,UAAU,CAAC,CAACC,KAAA,EAAOC,GAAA,KAAQ;EACvG,MAAMC,KAAA,GAAQP,0BAAA,CAA2BK,KAAA,EAAOC,GAAA;EAEhDL,gCAAA,CAAiCM,KAAA;EAEjC,MAAM;IAAEN,gCAAA,EAAkCO;EAAe,CAAE,GAAGN,4BAAA;EAC9DM,eAAA,CAAgBD,KAAA;EAEhB,OAAOR,6BAAA,CAA8BQ,KAAA;EACrC;AACF;;AAEAJ,cAAA,CAAeM,WAAW,GAAG"}
1
+ {"version":3,"names":["React","renderCompoundButton_unstable","useCompoundButton_unstable","useCompoundButtonStyles_unstable","useCustomStyleHooks_unstable","CompoundButton","forwardRef","props","ref","state","useCustomStyles","displayName"],"sources":["../../../../../../../../../packages/react-components/react-button/src/components/CompoundButton/CompoundButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderCompoundButton_unstable } from './renderCompoundButton';\nimport { useCompoundButton_unstable } from './useCompoundButton';\nimport { useCompoundButtonStyles_unstable } from './useCompoundButtonStyles';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\nimport type { CompoundButtonProps } from './CompoundButton.types';\nimport { useCustomStyleHooks_unstable } from '@fluentui/react-shared-contexts';\n\n/**\n * CompoundButtons are buttons that can have secondary content that adds extra information to the user.\n */\nexport const CompoundButton: ForwardRefComponent<CompoundButtonProps> = React.forwardRef((props, ref) => {\n const state = useCompoundButton_unstable(props, ref);\n\n useCompoundButtonStyles_unstable(state);\n\n const { useCompoundButtonStyles_unstable: useCustomStyles } = useCustomStyleHooks_unstable();\n useCustomStyles(state);\n\n return renderCompoundButton_unstable(state);\n // Casting is required due to lack of distributive union to support unions on @types/react\n}) as ForwardRefComponent<CompoundButtonProps>;\n\nCompoundButton.displayName = 'CompoundButton';\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,6BAA6B,QAAQ,wBAAwB;AACtE,SAASC,0BAA0B,QAAQ,qBAAqB;AAChE,SAASC,gCAAgC,QAAQ,2BAA2B;AAG5E,SAASC,4BAA4B,QAAQ,iCAAiC;AAE9E;;;AAGA,OAAO,MAAMC,cAAc,gBAA6CL,KAAK,CAACM,UAAU,CAAC,CAACC,KAAK,EAAEC,GAAG,KAAI;EACtG,MAAMC,KAAK,GAAGP,0BAA0B,CAACK,KAAK,EAAEC,GAAG,CAAC;EAEpDL,gCAAgC,CAACM,KAAK,CAAC;EAEvC,MAAM;IAAEN,gCAAgC,EAAEO;EAAe,CAAE,GAAGN,4BAA4B,EAAE;EAC5FM,eAAe,CAACD,KAAK,CAAC;EAEtB,OAAOR,6BAA6B,CAACQ,KAAK,CAAC;EAC3C;AACF,CAAC,CAA6C;;AAE9CJ,cAAc,CAACM,WAAW,GAAG,gBAAgB"}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/components/CompoundButton/CompoundButton.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\nimport type { ButtonProps, ButtonSlots, ButtonState } from '../Button/Button.types';\n\nexport type CompoundButtonSlots = ButtonSlots & {\n /**\n * Second line of text that describes the action this button takes.\n */\n secondaryContent?: Slot<'span'>;\n\n /**\n * Container that wraps the children and the secondaryContent slot.\n */\n contentContainer: NonNullable<Slot<'span'>>;\n};\n\nexport type CompoundButtonProps = ComponentProps<Partial<CompoundButtonSlots>> &\n Pick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'iconPosition' | 'shape' | 'size'>;\n\nexport type CompoundButtonState = ComponentState<CompoundButtonSlots> &\n Omit<ButtonState, keyof ButtonSlots | 'components'>;\n"],"mappings":"AAAA"}
1
+ {"version":3,"file":"CompoundButton.types.js","sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-button/src/components/CompoundButton/CompoundButton.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 CompoundButtonSlots = ButtonSlots & {\n /**\n * Second line of text that describes the action this button takes.\n */\n secondaryContent?: Slot<'span'>;\n\n /**\n * Container that wraps the children and the secondaryContent slot.\n */\n contentContainer: NonNullable<Slot<'span'>>;\n};\n\nexport type CompoundButtonProps = ComponentProps<Partial<CompoundButtonSlots>> &\n Pick<ButtonProps, 'appearance' | 'disabledFocusable' | 'disabled' | 'iconPosition' | 'shape' | 'size'>;\n\nexport type CompoundButtonState = ComponentState<CompoundButtonSlots> &\n Omit<ButtonState, keyof ButtonSlots | 'components'>;\n"]}