@fluentui/react-button 0.0.0-nightly0e0cf06c3420211029.1 → 0.0.0-nightly131c59c96120211203.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 (134) hide show
  1. package/CHANGELOG.json +188 -24
  2. package/CHANGELOG.md +50 -14
  3. package/dist/react-button.d.ts +14 -1
  4. package/lib/components/Button/Button.js +2 -2
  5. package/lib/components/Button/Button.js.map +1 -1
  6. package/lib/components/Button/index.d.ts +1 -1
  7. package/lib/components/Button/index.js +1 -1
  8. package/lib/components/Button/index.js.map +1 -1
  9. package/lib/components/Button/renderButton.js +10 -9
  10. package/lib/components/Button/renderButton.js.map +1 -1
  11. package/lib/components/Button/useButton.js +20 -24
  12. package/lib/components/Button/useButton.js.map +1 -1
  13. package/lib/components/Button/useButtonStyles.d.ts +1 -0
  14. package/lib/components/Button/useButtonStyles.js +118 -81
  15. package/lib/components/Button/useButtonStyles.js.map +1 -1
  16. package/lib/components/CompoundButton/CompoundButton.js +2 -2
  17. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  18. package/lib/components/CompoundButton/index.d.ts +1 -1
  19. package/lib/components/CompoundButton/index.js +1 -1
  20. package/lib/components/CompoundButton/index.js.map +1 -1
  21. package/lib/components/CompoundButton/renderCompoundButton.js +10 -9
  22. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  23. package/lib/components/CompoundButton/useCompoundButton.js +8 -8
  24. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  25. package/lib/components/CompoundButton/useCompoundButtonStyles.d.ts +1 -0
  26. package/lib/components/CompoundButton/useCompoundButtonStyles.js +43 -39
  27. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  28. package/lib/components/MenuButton/MenuButton.js +2 -2
  29. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  30. package/lib/components/MenuButton/MenuButton.types.d.ts +5 -1
  31. package/lib/components/MenuButton/index.d.ts +1 -1
  32. package/lib/components/MenuButton/index.js +1 -1
  33. package/lib/components/MenuButton/index.js.map +1 -1
  34. package/lib/components/MenuButton/renderMenuButton.js +10 -9
  35. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  36. package/lib/components/MenuButton/useMenuButton.js +8 -8
  37. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  38. package/lib/components/MenuButton/useMenuButtonStyles.d.ts +1 -0
  39. package/lib/components/MenuButton/useMenuButtonStyles.js +5 -3
  40. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  41. package/lib/components/SplitButton/SplitButton.js +2 -2
  42. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  43. package/lib/components/SplitButton/index.d.ts +1 -1
  44. package/lib/components/SplitButton/index.js +1 -1
  45. package/lib/components/SplitButton/index.js.map +1 -1
  46. package/lib/components/SplitButton/renderSplitButton.js +6 -7
  47. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  48. package/lib/components/SplitButton/useSplitButton.js +41 -45
  49. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  50. package/lib/components/SplitButton/useSplitButtonStyles.d.ts +1 -0
  51. package/lib/components/SplitButton/useSplitButtonStyles.js +36 -33
  52. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  53. package/lib/components/ToggleButton/ToggleButton.js +2 -2
  54. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  55. package/lib/components/ToggleButton/index.d.ts +1 -1
  56. package/lib/components/ToggleButton/index.js +1 -1
  57. package/lib/components/ToggleButton/index.js.map +1 -1
  58. package/lib/components/ToggleButton/useToggleButton.js +27 -29
  59. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  60. package/lib/components/ToggleButton/useToggleButtonStyles.d.ts +1 -0
  61. package/lib/components/ToggleButton/useToggleButtonStyles.js +44 -41
  62. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  63. package/lib-commonjs/Button.js +1 -1
  64. package/lib-commonjs/CompoundButton.js +1 -1
  65. package/lib-commonjs/MenuButton.js +1 -1
  66. package/lib-commonjs/SplitButton.js +1 -1
  67. package/lib-commonjs/ToggleButton.js +1 -1
  68. package/lib-commonjs/components/Button/Button.js +6 -6
  69. package/lib-commonjs/components/Button/Button.js.map +1 -1
  70. package/lib-commonjs/components/Button/index.d.ts +1 -1
  71. package/lib-commonjs/components/Button/index.js +8 -2
  72. package/lib-commonjs/components/Button/index.js.map +1 -1
  73. package/lib-commonjs/components/Button/renderButton.js +12 -12
  74. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  75. package/lib-commonjs/components/Button/useButton.js +22 -26
  76. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  77. package/lib-commonjs/components/Button/useButtonStyles.d.ts +1 -0
  78. package/lib-commonjs/components/Button/useButtonStyles.js +119 -82
  79. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
  80. package/lib-commonjs/components/CompoundButton/CompoundButton.js +6 -6
  81. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  82. package/lib-commonjs/components/CompoundButton/index.d.ts +1 -1
  83. package/lib-commonjs/components/CompoundButton/index.js +8 -2
  84. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  85. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js +12 -12
  86. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  87. package/lib-commonjs/components/CompoundButton/useCompoundButton.js +10 -11
  88. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  89. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.d.ts +1 -0
  90. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +45 -41
  91. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  92. package/lib-commonjs/components/MenuButton/MenuButton.js +6 -6
  93. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  94. package/lib-commonjs/components/MenuButton/MenuButton.types.d.ts +5 -1
  95. package/lib-commonjs/components/MenuButton/index.d.ts +1 -1
  96. package/lib-commonjs/components/MenuButton/index.js +8 -2
  97. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  98. package/lib-commonjs/components/MenuButton/renderMenuButton.js +12 -12
  99. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  100. package/lib-commonjs/components/MenuButton/useMenuButton.js +12 -13
  101. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  102. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.d.ts +1 -0
  103. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js +9 -6
  104. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  105. package/lib-commonjs/components/SplitButton/SplitButton.js +6 -6
  106. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  107. package/lib-commonjs/components/SplitButton/index.d.ts +1 -1
  108. package/lib-commonjs/components/SplitButton/index.js +8 -2
  109. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  110. package/lib-commonjs/components/SplitButton/renderSplitButton.js +8 -10
  111. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  112. package/lib-commonjs/components/SplitButton/useSplitButton.js +44 -49
  113. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  114. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.d.ts +1 -0
  115. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +39 -36
  116. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  117. package/lib-commonjs/components/ToggleButton/ToggleButton.js +6 -6
  118. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  119. package/lib-commonjs/components/ToggleButton/index.d.ts +1 -1
  120. package/lib-commonjs/components/ToggleButton/index.js +8 -2
  121. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  122. package/lib-commonjs/components/ToggleButton/useToggleButton.js +31 -34
  123. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  124. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.d.ts +1 -0
  125. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +47 -43
  126. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  127. package/lib-commonjs/index.js +1 -1
  128. package/package.json +14 -15
  129. package/lib/common/isConformant.d.ts +0 -4
  130. package/lib/common/isConformant.js +0 -13
  131. package/lib/common/isConformant.js.map +0 -1
  132. package/lib-commonjs/common/isConformant.d.ts +0 -4
  133. package/lib-commonjs/common/isConformant.js +0 -24
  134. package/lib-commonjs/common/isConformant.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,84 +2,248 @@
2
2
  "name": "@fluentui/react-button",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 29 Oct 2021 06:39:56 GMT",
6
- "tag": "@fluentui/react-button_v0.0.0-nightly0e0cf06c3420211029.1",
7
- "version": "0.0.0-nightly0e0cf06c3420211029.1",
5
+ "date": "Fri, 03 Dec 2021 04:13:20 GMT",
6
+ "tag": "@fluentui/react-button_v0.0.0-nightly131c59c96120211203.1",
7
+ "version": "0.0.0-nightly131c59c96120211203.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
11
11
  "author": "email not defined",
12
12
  "package": "@fluentui/react-button",
13
- "commit": "3535f78f7af73f13f2c1e7470293fb5e592866de",
13
+ "commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b",
14
14
  "comment": "Release nightly v9"
15
15
  },
16
+ {
17
+ "author": "olfedias@microsoft.com",
18
+ "package": "@fluentui/react-button",
19
+ "commit": "54118b29fde686ef15fe95a3a97f3fd7edca34a3",
20
+ "comment": "update styles to not use CSS shorthands"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@fluentui/react-button",
25
+ "comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightly131c59c96120211203.1",
26
+ "commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@fluentui/react-button",
31
+ "comment": "Bump @fluentui/react-aria to v0.0.0-nightly131c59c96120211203.1",
32
+ "commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@fluentui/react-button",
37
+ "comment": "Bump @fluentui/react-make-styles to v0.0.0-nightly131c59c96120211203.1",
38
+ "commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@fluentui/react-button",
43
+ "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly131c59c96120211203.1",
44
+ "commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@fluentui/react-button",
49
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly131c59c96120211203.1",
50
+ "commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@fluentui/react-button",
55
+ "comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightly131c59c96120211203.1",
56
+ "commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
57
+ },
58
+ {
59
+ "author": "beachball",
60
+ "package": "@fluentui/react-button",
61
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightly131c59c96120211203.1",
62
+ "commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
63
+ },
64
+ {
65
+ "author": "beachball",
66
+ "package": "@fluentui/react-button",
67
+ "comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightly131c59c96120211203.1",
68
+ "commit": "6fe1f0a081835b662f3c880d6405724d3abc4c0b"
69
+ }
70
+ ],
71
+ "none": [
72
+ {
73
+ "author": "tkrasniqi@microsoft.com",
74
+ "package": "@fluentui/react-button",
75
+ "commit": "ca886fed17b4a73b9bb3b5a9e54d143062cbfa99",
76
+ "comment": "Migration to new tsconfig"
77
+ }
78
+ ]
79
+ }
80
+ },
81
+ {
82
+ "date": "Thu, 25 Nov 2021 08:34:12 GMT",
83
+ "tag": "@fluentui/react-button_v9.0.0-beta.5",
84
+ "version": "9.0.0-beta.5",
85
+ "comments": {
86
+ "prerelease": [
16
87
  {
17
88
  "author": "Humberto.Morimoto@microsoft.com",
18
89
  "package": "@fluentui/react-button",
19
- "commit": "0e0cf06c34f78d54db4468a602a17b0a5a30ac87",
20
- "comment": "Fixing incomplete comment."
90
+ "commit": "8825574c42f414c26f9d49238be02ca7dcb44cfe",
91
+ "comment": "MenuButton: Removing tight coupling with Menu by replicating type locally."
92
+ },
93
+ {
94
+ "author": "ololubek@microsoft.com",
95
+ "package": "@fluentui/react-button",
96
+ "commit": "ecab13cfd6ac22657020db8f86eb89f952b0f953",
97
+ "comment": "update react-icons dependency"
21
98
  },
22
99
  {
23
100
  "author": "beachball",
24
101
  "package": "@fluentui/react-button",
25
- "comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightly0e0cf06c3420211029.1",
26
- "commit": "3535f78f7af73f13f2c1e7470293fb5e592866de"
102
+ "comment": "Bump @fluentui/react-aria to v9.0.0-beta.4",
103
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
27
104
  },
28
105
  {
29
106
  "author": "beachball",
30
107
  "package": "@fluentui/react-button",
31
- "comment": "Bump @fluentui/react-aria to v0.0.0-nightly0e0cf06c3420211029.1",
32
- "commit": "3535f78f7af73f13f2c1e7470293fb5e592866de"
108
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.4",
109
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
33
110
  },
34
111
  {
35
112
  "author": "beachball",
36
113
  "package": "@fluentui/react-button",
37
- "comment": "Bump @fluentui/react-make-styles to v0.0.0-nightly0e0cf06c3420211029.1",
38
- "commit": "3535f78f7af73f13f2c1e7470293fb5e592866de"
114
+ "comment": "Bump @fluentui/react-tabster to v9.0.0-beta.5",
115
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
39
116
  },
40
117
  {
41
118
  "author": "beachball",
42
119
  "package": "@fluentui/react-button",
43
- "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly0e0cf06c3420211029.1",
44
- "commit": "3535f78f7af73f13f2c1e7470293fb5e592866de"
120
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-beta.4",
121
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
45
122
  },
46
123
  {
47
124
  "author": "beachball",
48
125
  "package": "@fluentui/react-button",
49
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly0e0cf06c3420211029.1",
50
- "commit": "3535f78f7af73f13f2c1e7470293fb5e592866de"
126
+ "comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.4",
127
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
51
128
  },
52
129
  {
53
130
  "author": "beachball",
54
131
  "package": "@fluentui/react-button",
55
- "comment": "Bump @fluentui/babel-make-styles to v0.0.0-nightly0e0cf06c3420211029.1",
56
- "commit": "3535f78f7af73f13f2c1e7470293fb5e592866de"
132
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4",
133
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
57
134
  },
58
135
  {
59
136
  "author": "beachball",
60
137
  "package": "@fluentui/react-button",
61
- "comment": "Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightly0e0cf06c3420211029.1",
62
- "commit": "3535f78f7af73f13f2c1e7470293fb5e592866de"
138
+ "comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.4",
139
+ "commit": "48d236ac53a4950fabc3ddd52f91dac93ca0195b"
140
+ }
141
+ ]
142
+ }
143
+ },
144
+ {
145
+ "date": "Fri, 12 Nov 2021 13:25:16 GMT",
146
+ "tag": "@fluentui/react-button_v9.0.0-beta.4",
147
+ "version": "9.0.0-beta.4",
148
+ "comments": {
149
+ "prerelease": [
150
+ {
151
+ "author": "olfedias@microsoft.com",
152
+ "package": "@fluentui/react-button",
153
+ "commit": "7eb7d2daebaa11dbdcd555b0b962407013a7ca80",
154
+ "comment": "export static classes for components"
155
+ },
156
+ {
157
+ "author": "gcox@microsoft.com",
158
+ "package": "@fluentui/react-button",
159
+ "commit": "c9bd5b5a02ae94a8239ce1b56cac2f0d0dbd3586",
160
+ "comment": "Updated beta and RC components to ES2019"
161
+ },
162
+ {
163
+ "author": "Humberto.Morimoto@microsoft.com",
164
+ "package": "@fluentui/react-button",
165
+ "commit": "a4ea9b6227d2f634f85b40fe4cec10e4c391244b",
166
+ "comment": "react-button: Removing use of enzyme in the converged package."
167
+ },
168
+ {
169
+ "author": "Humberto.Morimoto@microsoft.com",
170
+ "package": "@fluentui/react-button",
171
+ "commit": "0e0cf06c34f78d54db4468a602a17b0a5a30ac87",
172
+ "comment": "Fixing incomplete comment."
173
+ },
174
+ {
175
+ "author": "beachball",
176
+ "package": "@fluentui/react-button",
177
+ "comment": "Bump @fluentui/react-aria to v9.0.0-beta.3",
178
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
179
+ },
180
+ {
181
+ "author": "beachball",
182
+ "package": "@fluentui/react-button",
183
+ "comment": "Bump @fluentui/react-make-styles to v9.0.0-beta.3",
184
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
63
185
  },
64
186
  {
65
187
  "author": "beachball",
66
188
  "package": "@fluentui/react-button",
67
- "comment": "Bump @fluentui/react-conformance-make-styles to v0.0.0-nightly0e0cf06c3420211029.1",
68
- "commit": "3535f78f7af73f13f2c1e7470293fb5e592866de"
189
+ "comment": "Bump @fluentui/react-tabster to v9.0.0-beta.4",
190
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
69
191
  },
70
192
  {
71
193
  "author": "beachball",
72
194
  "package": "@fluentui/react-button",
73
- "comment": "Bump @fluentui/react-menu to v0.0.0-nightly0e0cf06c3420211029.1",
74
- "commit": "3535f78f7af73f13f2c1e7470293fb5e592866de"
195
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-beta.3",
196
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
197
+ },
198
+ {
199
+ "author": "beachball",
200
+ "package": "@fluentui/react-button",
201
+ "comment": "Bump @fluentui/babel-make-styles to v9.0.0-beta.3",
202
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
203
+ },
204
+ {
205
+ "author": "beachball",
206
+ "package": "@fluentui/react-button",
207
+ "comment": "Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3",
208
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
209
+ },
210
+ {
211
+ "author": "beachball",
212
+ "package": "@fluentui/react-button",
213
+ "comment": "Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.3",
214
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
215
+ },
216
+ {
217
+ "author": "beachball",
218
+ "package": "@fluentui/react-button",
219
+ "comment": "Bump @fluentui/react-menu to v9.0.0-beta.4",
220
+ "commit": "742342e52c65066f779232e4e1302fedf0dd460d"
75
221
  }
76
222
  ],
77
223
  "none": [
224
+ {
225
+ "author": "mgodbolt@microsoft.com",
226
+ "package": "@fluentui/react-button",
227
+ "commit": "d28932cc68561cf46a56a4300b6e18d7de8af14b",
228
+ "comment": "adding toggle and split button docs"
229
+ },
78
230
  {
79
231
  "author": "mgodbolt@microsoft.com",
80
232
  "package": "@fluentui/react-button",
81
233
  "commit": "7fafe76eb2c09f9d17a03c11ba73729d91ef411e",
82
234
  "comment": "update docs descriptions"
235
+ },
236
+ {
237
+ "author": "mgodbolt@microsoft.com",
238
+ "package": "@fluentui/react-button",
239
+ "commit": "73857e89e8c403370ba723415121f2ce1e530fff",
240
+ "comment": "add docs for menu and compound button"
241
+ },
242
+ {
243
+ "author": "lingfangao@hotmail.com",
244
+ "package": "@fluentui/react-button",
245
+ "commit": "00f70581480b536e723fb69edf0ae617beac4807",
246
+ "comment": "Remove beta release tag"
83
247
  }
84
248
  ]
85
249
  }
package/CHANGELOG.md CHANGED
@@ -1,27 +1,63 @@
1
1
  # Change Log - @fluentui/react-button
2
2
 
3
- This log was last generated on Fri, 29 Oct 2021 06:39:56 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 03 Dec 2021 04:13:20 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly0e0cf06c3420211029.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v0.0.0-nightly0e0cf06c3420211029.1)
7
+ ## [0.0.0-nightly131c59c96120211203.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v0.0.0-nightly131c59c96120211203.1)
8
8
 
9
- Fri, 29 Oct 2021 06:39:56 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.0.0-beta.3..@fluentui/react-button_v0.0.0-nightly0e0cf06c3420211029.1)
9
+ Fri, 03 Dec 2021 04:13:20 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.0.0-beta.5..@fluentui/react-button_v0.0.0-nightly131c59c96120211203.1)
11
11
 
12
12
  ### Changes
13
13
 
14
- - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by email not defined)
14
+ - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by email not defined)
15
+ - update styles to not use CSS shorthands ([PR #20815](https://github.com/microsoft/fluentui/pull/20815) by olfedias@microsoft.com)
16
+ - Bump @fluentui/keyboard-keys to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
17
+ - Bump @fluentui/react-aria to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
18
+ - Bump @fluentui/react-make-styles to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
19
+ - Bump @fluentui/react-tabster to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
20
+ - Bump @fluentui/react-utilities to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
21
+ - Bump @fluentui/babel-make-styles to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
22
+ - Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
23
+ - Bump @fluentui/react-conformance-make-styles to v0.0.0-nightly131c59c96120211203.1 ([commit](https://github.com/microsoft/fluentui/commit/6fe1f0a081835b662f3c880d6405724d3abc4c0b) by beachball)
24
+
25
+ ## [9.0.0-beta.5](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.0.0-beta.5)
26
+
27
+ Thu, 25 Nov 2021 08:34:12 GMT
28
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.0.0-beta.4..@fluentui/react-button_v9.0.0-beta.5)
29
+
30
+ ### Changes
31
+
32
+ - MenuButton: Removing tight coupling with Menu by replicating type locally. ([PR #20635](https://github.com/microsoft/fluentui/pull/20635) by Humberto.Morimoto@microsoft.com)
33
+ - update react-icons dependency ([PR #20563](https://github.com/microsoft/fluentui/pull/20563) by ololubek@microsoft.com)
34
+ - Bump @fluentui/react-aria to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
35
+ - Bump @fluentui/react-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
36
+ - Bump @fluentui/react-tabster to v9.0.0-beta.5 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
37
+ - Bump @fluentui/react-utilities to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
38
+ - Bump @fluentui/babel-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
39
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
40
+ - Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.4 ([PR #20762](https://github.com/microsoft/fluentui/pull/20762) by beachball)
41
+
42
+ ## [9.0.0-beta.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.0.0-beta.4)
43
+
44
+ Fri, 12 Nov 2021 13:25:16 GMT
45
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.0.0-beta.3..@fluentui/react-button_v9.0.0-beta.4)
46
+
47
+ ### Changes
48
+
49
+ - export static classes for components ([PR #20454](https://github.com/microsoft/fluentui/pull/20454) by olfedias@microsoft.com)
50
+ - Updated beta and RC components to ES2019 ([PR #20405](https://github.com/microsoft/fluentui/pull/20405) by gcox@microsoft.com)
51
+ - react-button: Removing use of enzyme in the converged package. ([PR #20342](https://github.com/microsoft/fluentui/pull/20342) by Humberto.Morimoto@microsoft.com)
15
52
  - Fixing incomplete comment. ([PR #20273](https://github.com/microsoft/fluentui/pull/20273) by Humberto.Morimoto@microsoft.com)
16
- - Bump @fluentui/keyboard-keys to v0.0.0-nightly0e0cf06c3420211029.1 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by beachball)
17
- - Bump @fluentui/react-aria to v0.0.0-nightly0e0cf06c3420211029.1 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by beachball)
18
- - Bump @fluentui/react-make-styles to v0.0.0-nightly0e0cf06c3420211029.1 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by beachball)
19
- - Bump @fluentui/react-tabster to v0.0.0-nightly0e0cf06c3420211029.1 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by beachball)
20
- - Bump @fluentui/react-utilities to v0.0.0-nightly0e0cf06c3420211029.1 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by beachball)
21
- - Bump @fluentui/babel-make-styles to v0.0.0-nightly0e0cf06c3420211029.1 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by beachball)
22
- - Bump @fluentui/jest-serializer-make-styles to v0.0.0-nightly0e0cf06c3420211029.1 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by beachball)
23
- - Bump @fluentui/react-conformance-make-styles to v0.0.0-nightly0e0cf06c3420211029.1 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by beachball)
24
- - Bump @fluentui/react-menu to v0.0.0-nightly0e0cf06c3420211029.1 ([commit](https://github.com/microsoft/fluentui/commit/3535f78f7af73f13f2c1e7470293fb5e592866de) by beachball)
53
+ - Bump @fluentui/react-aria to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
54
+ - Bump @fluentui/react-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
55
+ - Bump @fluentui/react-tabster to v9.0.0-beta.4 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
56
+ - Bump @fluentui/react-utilities to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
57
+ - Bump @fluentui/babel-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
58
+ - Bump @fluentui/jest-serializer-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
59
+ - Bump @fluentui/react-conformance-make-styles to v9.0.0-beta.3 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
60
+ - Bump @fluentui/react-menu to v9.0.0-beta.4 ([PR #20583](https://github.com/microsoft/fluentui/pull/20583) by beachball)
25
61
 
26
62
  ## [9.0.0-beta.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.0.0-beta.3)
27
63
 
@@ -3,7 +3,6 @@ import type { ComponentProps } from '@fluentui/react-utilities';
3
3
  import type { ComponentState } from '@fluentui/react-utilities';
4
4
  import { ForwardRefComponent } from '@fluentui/react-utilities';
5
5
  import type { IntrinsicShorthandProps } from '@fluentui/react-utilities';
6
- import type { MenuTriggerChildProps } from '@fluentui/react-menu';
7
6
  import type { ObjectShorthandProps } from '@fluentui/react-utilities';
8
7
  import * as React_2 from 'react';
9
8
 
@@ -12,6 +11,8 @@ import * as React_2 from 'react';
12
11
  */
13
12
  export declare const Button: ForwardRefComponent<ButtonProps>;
14
13
 
14
+ export declare const buttonClassName = "fui-Button";
15
+
15
16
  export declare type ButtonCommons = {
16
17
  /**
17
18
  * A button can have its content and borders styled for greater emphasis or to be subtle.
@@ -81,6 +82,8 @@ export declare type ButtonState = ComponentState<ButtonSlots> & ButtonCommons &
81
82
  */
82
83
  export declare const CompoundButton: ForwardRefComponent<CompoundButtonProps>;
83
84
 
85
+ export declare const compoundButtonClassName = "fui-CompoundButton";
86
+
84
87
  export declare type CompoundButtonProps = ComponentProps<CompoundButtonSlots> & Partial<ButtonCommons>;
85
88
 
86
89
  export declare type CompoundButtonSlots = ButtonSlots & {
@@ -101,6 +104,8 @@ export declare type CompoundButtonState = ComponentState<CompoundButtonSlots> &
101
104
  */
102
105
  export declare const MenuButton: ForwardRefComponent<MenuButtonProps>;
103
106
 
107
+ export declare const menuButtonClassName = "fui-MenuButton";
108
+
104
109
  export declare type MenuButtonProps = ComponentProps<MenuButtonSlots> & Partial<Omit<ButtonCommons, 'iconPosition'>> & Partial<MenuTriggerChildProps>;
105
110
 
106
111
  export declare type MenuButtonSlots = ButtonSlots & {
@@ -112,6 +117,10 @@ export declare type MenuButtonSlots = ButtonSlots & {
112
117
 
113
118
  export declare type MenuButtonState = ComponentState<MenuButtonSlots> & Omit<ButtonState, keyof ButtonSlots | 'components' | 'iconPosition'>;
114
119
 
120
+ declare type MenuTriggerChildProps = Pick<React_2.HTMLAttributes<HTMLElement>, 'onClick' | 'onMouseEnter' | 'onMouseLeave' | 'onContextMenu' | 'onKeyDown' | 'aria-haspopup' | 'aria-expanded' | 'id'> & {
121
+ ref?: React_2.Ref<never>;
122
+ };
123
+
115
124
  /**
116
125
  * Renders a Button component by passing the state defined props to the appropriate slots.
117
126
  */
@@ -140,6 +149,8 @@ export declare const renderSplitButton: (state: SplitButtonState) => JSX.Element
140
149
  */
141
150
  export declare const SplitButton: ForwardRefComponent<SplitButtonProps>;
142
151
 
152
+ export declare const splitButtonClassName = "fui-SplitButton";
153
+
143
154
  export declare type SplitButtonProps = ComponentProps<SplitButtonSlots> & Omit<ButtonProps, 'root'> & Omit<MenuButtonProps, 'root'>;
144
155
 
145
156
  export declare type SplitButtonSlots = {
@@ -164,6 +175,8 @@ export declare type SplitButtonState = ComponentState<SplitButtonSlots> & Omit<B
164
175
  */
165
176
  export declare const ToggleButton: ForwardRefComponent<ToggleButtonProps>;
166
177
 
178
+ export declare const toggleButtonClassName = "fui-ToggleButton";
179
+
167
180
  export declare type ToggleButtonCommons = {
168
181
  /**
169
182
  * Defines the controlled checked state of the `ToggleButton`.
@@ -6,8 +6,8 @@ import { useButtonStyles } from './useButtonStyles';
6
6
  * Buttons give people a way to trigger an action.
7
7
  */
8
8
 
9
- export var Button = /*#__PURE__*/React.forwardRef(function (props, ref) {
10
- var state = useButton(props, ref);
9
+ export const Button = /*#__PURE__*/React.forwardRef((props, ref) => {
10
+ const state = useButton(props, ref);
11
11
  useButtonStyles(state);
12
12
  return renderButton(state); // Casting is required due to lack of distributive union to support unions on @types/react
13
13
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,YAAT,QAA6B,gBAA7B;AACA,SAAS,SAAT,QAA0B,aAA1B;AACA,SAAS,eAAT,QAAgC,mBAAhC;AAIA;;AAEG;;AACH,OAAO,IAAM,MAAM,gBAAqC,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AAClF,MAAM,KAAK,GAAG,SAAS,CAAC,KAAD,EAAQ,GAAR,CAAvB;AAEA,EAAA,eAAe,CAAC,KAAD,CAAf;AAEA,SAAO,YAAY,CAAC,KAAD,CAAnB,CALkF,CAMlF;AACD,CAPuD,CAAjD;AASP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,YAAT,QAA6B,gBAA7B;AACA,SAAS,SAAT,QAA0B,aAA1B;AACA,SAAS,eAAT,QAAgC,mBAAhC;AAIA;;AAEG;;AACH,OAAO,MAAM,MAAM,gBAAqC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACtF,QAAM,KAAK,GAAG,SAAS,CAAC,KAAD,EAAQ,GAAR,CAAvB;AAEA,EAAA,eAAe,CAAC,KAAD,CAAf;AAEA,SAAO,YAAY,CAAC,KAAD,CAAnB,CALsF,CAMtF;AACD,CAPuD,CAAjD;AASP,MAAM,CAAC,WAAP,GAAqB,QAArB","sourceRoot":""}
@@ -2,4 +2,4 @@ export * from './Button';
2
2
  export * from './Button.types';
3
3
  export * from './renderButton';
4
4
  export * from './useButton';
5
- export { useButtonStyles } from './useButtonStyles';
5
+ export { buttonClassName, useButtonStyles } from './useButtonStyles';
@@ -2,5 +2,5 @@ export * from './Button';
2
2
  export * from './Button.types';
3
3
  export * from './renderButton';
4
4
  export * from './useButton';
5
- export { useButtonStyles } from './useButtonStyles';
5
+ export { buttonClassName, useButtonStyles } from './useButtonStyles';
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Button/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Button/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,aAAa,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
@@ -1,17 +1,18 @@
1
- import { __assign } from "tslib";
2
1
  import * as React from 'react';
3
2
  import { getSlots } from '@fluentui/react-utilities';
4
3
  /**
5
4
  * Renders a Button component by passing the state defined props to the appropriate slots.
6
5
  */
7
6
 
8
- export var renderButton = function (state) {
9
- var _a = getSlots(state, ['root', 'icon']),
10
- slots = _a.slots,
11
- slotProps = _a.slotProps;
12
-
13
- var iconOnly = state.iconOnly,
14
- iconPosition = state.iconPosition;
15
- return /*#__PURE__*/React.createElement(slots.root, __assign({}, slotProps.root), iconPosition !== 'after' && /*#__PURE__*/React.createElement(slots.icon, __assign({}, slotProps.icon)), !iconOnly && state.root.children, iconPosition === 'after' && /*#__PURE__*/React.createElement(slots.icon, __assign({}, slotProps.icon)));
7
+ export const renderButton = state => {
8
+ const {
9
+ slots,
10
+ slotProps
11
+ } = getSlots(state, ['root', 'icon']);
12
+ const {
13
+ iconOnly,
14
+ iconPosition
15
+ } = state;
16
+ return /*#__PURE__*/React.createElement(slots.root, Object.assign({}, slotProps.root), iconPosition !== 'after' && /*#__PURE__*/React.createElement(slots.icon, Object.assign({}, slotProps.icon)), !iconOnly && state.root.children, iconPosition === 'after' && /*#__PURE__*/React.createElement(slots.icon, Object.assign({}, slotProps.icon)));
16
17
  };
17
18
  //# sourceMappingURL=renderButton.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Button/renderButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,IAAM,YAAY,GAAG,UAAC,KAAD,EAAmB;AACvC,MAAA,EAAA,GAAuB,QAAQ,CAAc,KAAd,EAAqB,CAAC,MAAD,EAAS,MAAT,CAArB,CAA/B;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AACE,MAAA,QAAQ,GAAmB,KAAK,CAAxB,QAAR;AAAA,MAAU,YAAY,GAAK,KAAK,CAAV,YAAtB;AAER,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,YAAY,KAAK,OAAjB,iBAA4B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAD/B,EAEG,CAAC,QAAD,IAAa,KAAK,CAAC,IAAN,CAAW,QAF3B,EAGG,YAAY,KAAK,OAAjB,iBAA4B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAH/B,CADF;AAOD,CAXM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Button/renderButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,YAAY,GAAI,KAAD,IAAuB;AACjD,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,QAAQ,CAAc,KAAd,EAAqB,CAAC,MAAD,EAAS,MAAT,CAArB,CAArC;AACA,QAAM;AAAE,IAAA,QAAF;AAAY,IAAA;AAAZ,MAA6B,KAAnC;AAEA,sBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,YAAY,KAAK,OAAjB,iBAA4B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAD/B,EAEG,CAAC,QAAD,IAAa,KAAK,CAAC,IAAN,CAAW,QAF3B,EAGG,YAAY,KAAK,OAAjB,iBAA4B,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAH/B,CADF;AAOD,CAXM","sourceRoot":""}
@@ -6,32 +6,28 @@ import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utiliti
6
6
  * @param ref - User provided ref to be passed to the Button component.
7
7
  */
8
8
 
9
- export var useButton = function (props, ref) {
10
- var appearance = props.appearance,
11
- as = props.as,
12
- _a = props.block,
13
- block = _a === void 0 ? false : _a,
14
- _b = props.disabled,
15
- disabled = _b === void 0 ? false : _b,
16
- _c = props.disabledFocusable,
17
- disabledFocusable = _c === void 0 ? false : _c,
18
- icon = props.icon,
19
- _d = props.iconPosition,
20
- iconPosition = _d === void 0 ? 'before' : _d,
21
- _e = props.shape,
22
- shape = _e === void 0 ? 'rounded' : _e,
23
- _f = props.size,
24
- size = _f === void 0 ? 'medium' : _f;
25
- var iconShorthand = resolveShorthand(icon);
9
+ export const useButton = (props, ref) => {
10
+ const {
11
+ appearance,
12
+ as,
13
+ block = false,
14
+ disabled = false,
15
+ disabledFocusable = false,
16
+ icon,
17
+ iconPosition = 'before',
18
+ shape = 'rounded',
19
+ size = 'medium'
20
+ } = props;
21
+ const iconShorthand = resolveShorthand(icon);
26
22
  return {
27
23
  // Props passed at the top-level
28
- appearance: appearance,
29
- block: block,
30
- disabled: disabled,
31
- disabledFocusable: disabledFocusable,
32
- iconPosition: iconPosition,
33
- shape: shape,
34
- size: size,
24
+ appearance,
25
+ block,
26
+ disabled,
27
+ disabledFocusable,
28
+ iconPosition,
29
+ shape,
30
+ size,
35
31
  // State calculated from a set of props
36
32
  iconOnly: Boolean((iconShorthand === null || iconShorthand === void 0 ? void 0 : iconShorthand.children) && !props.children),
37
33
  // Slots definition
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Button/useButton.ts"],"names":[],"mappings":"AACA,SAAS,aAAT,QAA8B,sBAA9B;AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;;;AAIG;;AACH,OAAO,IAAM,SAAS,GAAG,UAAC,KAAD,EAAqB,GAArB,EAA0E;AAE/F,MAAA,UAAU,GASR,KAAK,CATG,UAAV;AAAA,MACA,EAAE,GAQA,KAAK,CARL,EADF;AAAA,MAEA,EAAA,GAOE,KAAK,CAPM,KAFb;AAAA,MAEA,KAAK,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,KAAH,GAAQ,EAFb;AAAA,MAGA,EAAA,GAME,KAAK,CANS,QAHhB;AAAA,MAGA,QAAQ,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,KAAH,GAAQ,EAHhB;AAAA,MAIA,EAAA,GAKE,KAAK,CALkB,iBAJzB;AAAA,MAIA,iBAAiB,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,KAAH,GAAQ,EAJzB;AAAA,MAKA,IAAI,GAIF,KAAK,CAJH,IALJ;AAAA,MAMA,EAAA,GAGE,KAAK,CAHgB,YANvB;AAAA,MAMA,YAAY,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,QAAH,GAAW,EANvB;AAAA,MAOA,EAAA,GAEE,KAAK,CAFU,KAPjB;AAAA,MAOA,KAAK,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,SAAH,GAAY,EAPjB;AAAA,MAQA,EAAA,GACE,KAAK,CADQ,IARf;AAAA,MAQA,IAAI,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,QAAH,GAAW,EARf;AAUF,MAAM,aAAa,GAAG,gBAAgB,CAAC,IAAD,CAAtC;AAEA,SAAO;AACL;AACA,IAAA,UAAU,EAAA,UAFL;AAGL,IAAA,KAAK,EAAA,KAHA;AAIL,IAAA,QAAQ,EAAA,QAJH;AAKL,IAAA,iBAAiB,EAAA,iBALZ;AAML,IAAA,YAAY,EAAA,YANP;AAOL,IAAA,KAAK,EAAA,KAPA;AAQL,IAAA,IAAI,EAAA,IARC;AAUL;AACA,IAAA,QAAQ,EAAE,OAAO,CAAC,CAAA,aAAa,KAAA,IAAb,IAAA,aAAa,KAAA,KAAA,CAAb,GAAa,KAAA,CAAb,GAAA,aAAa,CAAE,QAAf,KAA2B,CAAC,KAAK,CAAC,QAAnC,CAXZ;AAaL;AACA,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,QADI;AAEV,MAAA,IAAI,EAAE;AAFI,KAdP;AAmBL,IAAA,IAAI,EAAE,qBAAqB,CACzB,EAAE,IAAI,QADmB,EAEzB,aAAa,CAAC,KAAD,EAAQ;AACnB,MAAA,QAAQ,EAAE,IADS;AAEnB,MAAA,YAAY,EAAE;AACZ;AACA,QAAA,GAAG,EAAE,GAFO;AAGZ,QAAA,IAAI,EAAE;AAHM;AAFK,KAAR,CAFY,CAnBtB;AA8BL,IAAA,IAAI,EAAE;AA9BD,GAAP;AAgCD,CA9CM","sourceRoot":""}
1
+ {"version":3,"sources":["../../../src/components/Button/useButton.ts"],"names":[],"mappings":"AACA,SAAS,aAAT,QAA8B,sBAA9B;AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;;;AAIG;;AACH,OAAO,MAAM,SAAS,GAAG,CAAC,KAAD,EAAqB,GAArB,KAA2F;AAClH,QAAM;AACJ,IAAA,UADI;AAEJ,IAAA,EAFI;AAGJ,IAAA,KAAK,GAAG,KAHJ;AAIJ,IAAA,QAAQ,GAAG,KAJP;AAKJ,IAAA,iBAAiB,GAAG,KALhB;AAMJ,IAAA,IANI;AAOJ,IAAA,YAAY,GAAG,QAPX;AAQJ,IAAA,KAAK,GAAG,SARJ;AASJ,IAAA,IAAI,GAAG;AATH,MAUF,KAVJ;AAWA,QAAM,aAAa,GAAG,gBAAgB,CAAC,IAAD,CAAtC;AAEA,SAAO;AACL;AACA,IAAA,UAFK;AAGL,IAAA,KAHK;AAIL,IAAA,QAJK;AAKL,IAAA,iBALK;AAML,IAAA,YANK;AAOL,IAAA,KAPK;AAQL,IAAA,IARK;AAUL;AACA,IAAA,QAAQ,EAAE,OAAO,CAAC,CAAA,aAAa,KAAA,IAAb,IAAA,aAAa,KAAA,KAAA,CAAb,GAAa,KAAA,CAAb,GAAA,aAAa,CAAE,QAAf,KAA2B,CAAC,KAAK,CAAC,QAAnC,CAXZ;AAaL;AACA,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,QADI;AAEV,MAAA,IAAI,EAAE;AAFI,KAdP;AAmBL,IAAA,IAAI,EAAE,qBAAqB,CACzB,EAAE,IAAI,QADmB,EAEzB,aAAa,CAAC,KAAD,EAAQ;AACnB,MAAA,QAAQ,EAAE,IADS;AAEnB,MAAA,YAAY,EAAE;AACZ;AACA,QAAA,GAAG,EAAE,GAFO;AAGZ,QAAA,IAAI,EAAE;AAHM;AAFK,KAAR,CAFY,CAnBtB;AA8BL,IAAA,IAAI,EAAE;AA9BD,GAAP;AAgCD,CA9CM","sourceRoot":""}
@@ -1,4 +1,5 @@
1
1
  import type { ButtonState } from './Button.types';
2
+ export declare const buttonClassName = "fui-Button";
2
3
  export declare const buttonSpacing: {
3
4
  smallest: string;
4
5
  smaller: string;