@fluentui/react-button 0.0.0-nightly-20220715-0418.1 → 0.0.0-nightly-20221007-1528.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 (95) hide show
  1. package/CHANGELOG.json +190 -16
  2. package/CHANGELOG.md +65 -11
  3. package/dist/index.d.ts +1 -1
  4. package/lib/Button.js.map +1 -1
  5. package/lib/CompoundButton.js.map +1 -1
  6. package/lib/MenuButton.js.map +1 -1
  7. package/lib/SplitButton.js.map +1 -1
  8. package/lib/ToggleButton.js.map +1 -1
  9. package/lib/components/Button/Button.js.map +1 -1
  10. package/lib/components/Button/Button.types.js.map +1 -1
  11. package/lib/components/Button/index.js.map +1 -1
  12. package/lib/components/Button/renderButton.js.map +1 -1
  13. package/lib/components/Button/useButton.js +4 -6
  14. package/lib/components/Button/useButton.js.map +1 -1
  15. package/lib/components/Button/useButtonStyles.js +86 -69
  16. package/lib/components/Button/useButtonStyles.js.map +1 -1
  17. package/lib/components/CompoundButton/CompoundButton.js.map +1 -1
  18. package/lib/components/CompoundButton/CompoundButton.types.js.map +1 -1
  19. package/lib/components/CompoundButton/index.js.map +1 -1
  20. package/lib/components/CompoundButton/renderCompoundButton.js.map +1 -1
  21. package/lib/components/CompoundButton/useCompoundButton.js.map +1 -1
  22. package/lib/components/CompoundButton/useCompoundButtonStyles.js +3 -4
  23. package/lib/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  24. package/lib/components/MenuButton/MenuButton.js.map +1 -1
  25. package/lib/components/MenuButton/MenuButton.types.js.map +1 -1
  26. package/lib/components/MenuButton/index.js.map +1 -1
  27. package/lib/components/MenuButton/renderMenuButton.js.map +1 -1
  28. package/lib/components/MenuButton/useMenuButton.js +3 -0
  29. package/lib/components/MenuButton/useMenuButton.js.map +1 -1
  30. package/lib/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  31. package/lib/components/SplitButton/SplitButton.js.map +1 -1
  32. package/lib/components/SplitButton/SplitButton.types.js.map +1 -1
  33. package/lib/components/SplitButton/index.js.map +1 -1
  34. package/lib/components/SplitButton/renderSplitButton.js.map +1 -1
  35. package/lib/components/SplitButton/useSplitButton.js.map +1 -1
  36. package/lib/components/SplitButton/useSplitButtonStyles.js +18 -15
  37. package/lib/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  38. package/lib/components/ToggleButton/ToggleButton.js.map +1 -1
  39. package/lib/components/ToggleButton/ToggleButton.types.js.map +1 -1
  40. package/lib/components/ToggleButton/index.js.map +1 -1
  41. package/lib/components/ToggleButton/renderToggleButton.js.map +1 -1
  42. package/lib/components/ToggleButton/useToggleButton.js.map +1 -1
  43. package/lib/components/ToggleButton/useToggleButtonStyles.js +52 -34
  44. package/lib/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  45. package/lib/index.js.map +1 -1
  46. package/lib/utils/index.js.map +1 -1
  47. package/lib/utils/useToggleState.js +2 -2
  48. package/lib/utils/useToggleState.js.map +1 -1
  49. package/lib-commonjs/Button.js.map +1 -1
  50. package/lib-commonjs/CompoundButton.js.map +1 -1
  51. package/lib-commonjs/MenuButton.js.map +1 -1
  52. package/lib-commonjs/SplitButton.js.map +1 -1
  53. package/lib-commonjs/ToggleButton.js.map +1 -1
  54. package/lib-commonjs/components/Button/Button.js.map +1 -1
  55. package/lib-commonjs/components/Button/Button.types.js.map +1 -1
  56. package/lib-commonjs/components/Button/index.js.map +1 -1
  57. package/lib-commonjs/components/Button/renderButton.js.map +1 -1
  58. package/lib-commonjs/components/Button/useButton.js +3 -5
  59. package/lib-commonjs/components/Button/useButton.js.map +1 -1
  60. package/lib-commonjs/components/Button/useButtonStyles.js +86 -69
  61. package/lib-commonjs/components/Button/useButtonStyles.js.map +1 -1
  62. package/lib-commonjs/components/CompoundButton/CompoundButton.js.map +1 -1
  63. package/lib-commonjs/components/CompoundButton/CompoundButton.types.js.map +1 -1
  64. package/lib-commonjs/components/CompoundButton/index.js.map +1 -1
  65. package/lib-commonjs/components/CompoundButton/renderCompoundButton.js.map +1 -1
  66. package/lib-commonjs/components/CompoundButton/useCompoundButton.js.map +1 -1
  67. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js +3 -4
  68. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.js.map +1 -1
  69. package/lib-commonjs/components/MenuButton/MenuButton.js.map +1 -1
  70. package/lib-commonjs/components/MenuButton/MenuButton.types.js.map +1 -1
  71. package/lib-commonjs/components/MenuButton/index.js.map +1 -1
  72. package/lib-commonjs/components/MenuButton/renderMenuButton.js.map +1 -1
  73. package/lib-commonjs/components/MenuButton/useMenuButton.js +3 -0
  74. package/lib-commonjs/components/MenuButton/useMenuButton.js.map +1 -1
  75. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.js.map +1 -1
  76. package/lib-commonjs/components/SplitButton/SplitButton.js.map +1 -1
  77. package/lib-commonjs/components/SplitButton/SplitButton.types.js.map +1 -1
  78. package/lib-commonjs/components/SplitButton/index.js.map +1 -1
  79. package/lib-commonjs/components/SplitButton/renderSplitButton.js.map +1 -1
  80. package/lib-commonjs/components/SplitButton/useSplitButton.js.map +1 -1
  81. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js +18 -15
  82. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.js.map +1 -1
  83. package/lib-commonjs/components/ToggleButton/ToggleButton.js.map +1 -1
  84. package/lib-commonjs/components/ToggleButton/ToggleButton.types.js.map +1 -1
  85. package/lib-commonjs/components/ToggleButton/index.js.map +1 -1
  86. package/lib-commonjs/components/ToggleButton/renderToggleButton.js.map +1 -1
  87. package/lib-commonjs/components/ToggleButton/useToggleButton.js.map +1 -1
  88. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js +54 -37
  89. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.js.map +1 -1
  90. package/lib-commonjs/index.js.map +1 -1
  91. package/lib-commonjs/utils/index.js.map +1 -1
  92. package/lib-commonjs/utils/useToggleState.js +1 -1
  93. package/lib-commonjs/utils/useToggleState.js.map +1 -1
  94. package/package.json +11 -15
  95. package/dist/tsdoc-metadata.json +0 -11
package/CHANGELOG.json CHANGED
@@ -2,13 +2,13 @@
2
2
  "name": "@fluentui/react-button",
3
3
  "entries": [
4
4
  {
5
- "date": "Fri, 15 Jul 2022 04:31:39 GMT",
6
- "tag": "@fluentui/react-button_v0.0.0-nightly-20220715-0418.1",
7
- "version": "0.0.0-nightly-20220715-0418.1",
5
+ "date": "Fri, 07 Oct 2022 15:34:51 GMT",
6
+ "tag": "@fluentui/react-button_v0.0.0-nightly-20221007-1528.1",
7
+ "version": "0.0.0-nightly-20221007-1528.1",
8
8
  "comments": {
9
9
  "prerelease": [
10
10
  {
11
- "author": "email not defined",
11
+ "author": "fluentui-internal@service.microsoft.com",
12
12
  "package": "@fluentui/react-button",
13
13
  "commit": "not available",
14
14
  "comment": "Release nightly v9"
@@ -16,38 +16,212 @@
16
16
  {
17
17
  "author": "beachball",
18
18
  "package": "@fluentui/react-button",
19
- "comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightly-20220715-0418.1",
20
- "commit": "e1949f7a18e758e415b4740eda5f84bb8ae19e02"
19
+ "comment": "Bump @fluentui/keyboard-keys to v0.0.0-nightly-20221007-1528.1",
20
+ "commit": "827197046ec2b195a8997fadbb514a5693234e6b"
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-20220715-0418.1",
26
- "commit": "e1949f7a18e758e415b4740eda5f84bb8ae19e02"
25
+ "comment": "Bump @fluentui/react-aria to v0.0.0-nightly-20221007-1528.1",
26
+ "commit": "827197046ec2b195a8997fadbb514a5693234e6b"
27
27
  },
28
28
  {
29
29
  "author": "beachball",
30
30
  "package": "@fluentui/react-button",
31
- "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20220715-0418.1",
32
- "commit": "e1949f7a18e758e415b4740eda5f84bb8ae19e02"
31
+ "comment": "Bump @fluentui/react-tabster to v0.0.0-nightly-20221007-1528.1",
32
+ "commit": "827197046ec2b195a8997fadbb514a5693234e6b"
33
33
  },
34
34
  {
35
35
  "author": "beachball",
36
36
  "package": "@fluentui/react-button",
37
- "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20220715-0418.1",
38
- "commit": "e1949f7a18e758e415b4740eda5f84bb8ae19e02"
37
+ "comment": "Bump @fluentui/react-theme to v0.0.0-nightly-20221007-1528.1",
38
+ "commit": "827197046ec2b195a8997fadbb514a5693234e6b"
39
39
  },
40
40
  {
41
41
  "author": "beachball",
42
42
  "package": "@fluentui/react-button",
43
- "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20220715-0418.1",
44
- "commit": "e1949f7a18e758e415b4740eda5f84bb8ae19e02"
43
+ "comment": "Bump @fluentui/react-utilities to v0.0.0-nightly-20221007-1528.1",
44
+ "commit": "827197046ec2b195a8997fadbb514a5693234e6b"
45
45
  },
46
46
  {
47
47
  "author": "beachball",
48
48
  "package": "@fluentui/react-button",
49
- "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220715-0418.1",
50
- "commit": "e1949f7a18e758e415b4740eda5f84bb8ae19e02"
49
+ "comment": "Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20221007-1528.1",
50
+ "commit": "827197046ec2b195a8997fadbb514a5693234e6b"
51
+ }
52
+ ]
53
+ }
54
+ },
55
+ {
56
+ "date": "Mon, 03 Oct 2022 22:24:42 GMT",
57
+ "tag": "@fluentui/react-button_v9.1.3",
58
+ "version": "9.1.3",
59
+ "comments": {
60
+ "patch": [
61
+ {
62
+ "author": "beachball",
63
+ "package": "@fluentui/react-button",
64
+ "comment": "Bump @fluentui/react-aria to v9.2.1",
65
+ "commit": "67a8c98b8d53cd2fa14d668cf639b867b68ad18a"
66
+ },
67
+ {
68
+ "author": "beachball",
69
+ "package": "@fluentui/react-button",
70
+ "comment": "Bump @fluentui/react-tabster to v9.1.2",
71
+ "commit": "67a8c98b8d53cd2fa14d668cf639b867b68ad18a"
72
+ }
73
+ ]
74
+ }
75
+ },
76
+ {
77
+ "date": "Tue, 20 Sep 2022 20:55:45 GMT",
78
+ "tag": "@fluentui/react-button_v9.1.2",
79
+ "version": "9.1.2",
80
+ "comments": {
81
+ "patch": [
82
+ {
83
+ "author": "beachball",
84
+ "package": "@fluentui/react-button",
85
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.14",
86
+ "commit": "4ceba844c804a2f49b0465389100e7a3dabf116e"
87
+ }
88
+ ]
89
+ }
90
+ },
91
+ {
92
+ "date": "Thu, 15 Sep 2022 09:49:56 GMT",
93
+ "tag": "@fluentui/react-button_v9.1.1",
94
+ "version": "9.1.1",
95
+ "comments": {
96
+ "patch": [
97
+ {
98
+ "author": "humberto_makoto@hotmail.com",
99
+ "package": "@fluentui/react-button",
100
+ "commit": "17b9063802b28bf7f4b1c4d439623819ad8940fa",
101
+ "comment": "fix: Adding 'aria-expanded=false' to collapsed MenuButtons."
102
+ },
103
+ {
104
+ "author": "makotom@microsoft.com",
105
+ "package": "@fluentui/react-button",
106
+ "commit": "6bc03a4e9ee815da750466f9dc2d25df1373f3e9",
107
+ "comment": "chore: Remove max-width style from Button components."
108
+ },
109
+ {
110
+ "author": "humberto_makoto@hotmail.com",
111
+ "package": "@fluentui/react-button",
112
+ "commit": "ef3ea2307fd97c893eded2164d96f1f56e378fd3",
113
+ "comment": "chore: Cleaning up tokens in Button components so they better adhere to the design spec."
114
+ },
115
+ {
116
+ "author": "humberto_makoto@hotmail.com",
117
+ "package": "@fluentui/react-button",
118
+ "commit": "28f55597050bcdd293e57e7d1fdc87802150c59d",
119
+ "comment": "fix: Wrapping long text in Button components."
120
+ },
121
+ {
122
+ "author": "behowell@microsoft.com",
123
+ "package": "@fluentui/react-button",
124
+ "commit": "e598325b985cad3e5057f00893e0176416edd292",
125
+ "comment": "refactor: Replace useMergedEventCallbacks utility with mergeCallbacks"
126
+ },
127
+ {
128
+ "author": "olfedias@microsoft.com",
129
+ "package": "@fluentui/react-button",
130
+ "commit": "e610024474cfe5d45f61501a8b6a21daf4c794a2",
131
+ "comment": "chore: Update Griffel to latest version"
132
+ },
133
+ {
134
+ "author": "beachball",
135
+ "package": "@fluentui/react-button",
136
+ "comment": "Bump @fluentui/react-aria to v9.2.0",
137
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
138
+ },
139
+ {
140
+ "author": "beachball",
141
+ "package": "@fluentui/react-button",
142
+ "comment": "Bump @fluentui/react-tabster to v9.1.1",
143
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
144
+ },
145
+ {
146
+ "author": "beachball",
147
+ "package": "@fluentui/react-button",
148
+ "comment": "Bump @fluentui/react-theme to v9.1.0",
149
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
150
+ },
151
+ {
152
+ "author": "beachball",
153
+ "package": "@fluentui/react-button",
154
+ "comment": "Bump @fluentui/react-utilities to v9.1.0",
155
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
156
+ },
157
+ {
158
+ "author": "beachball",
159
+ "package": "@fluentui/react-button",
160
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13",
161
+ "commit": "a33448fe4a0f4117686c378f80b893d1406d95a8"
162
+ }
163
+ ],
164
+ "none": [
165
+ {
166
+ "author": "martinhochel@microsoft.com",
167
+ "package": "@fluentui/react-button",
168
+ "commit": "e6cf183695d6d67a24e038c49a876224e5ed35e5",
169
+ "comment": "chore: update package scaffold"
170
+ },
171
+ {
172
+ "author": "makotom@microsoft.com",
173
+ "package": "@fluentui/react-button",
174
+ "commit": "e176621e71d595c6d17655c108db0b73eb9ec188",
175
+ "comment": "chore: Removing CompoundButtonAsToggleButton story since it was using non-exported functions."
176
+ }
177
+ ]
178
+ }
179
+ },
180
+ {
181
+ "date": "Wed, 03 Aug 2022 16:03:39 GMT",
182
+ "tag": "@fluentui/react-button_v9.1.0",
183
+ "version": "9.1.0",
184
+ "comments": {
185
+ "minor": [
186
+ {
187
+ "author": "bernardo.sunderhus@gmail.com",
188
+ "package": "@fluentui/react-button",
189
+ "commit": "1293f53f79ea1dc7429f77e174b2dfdaffa99558",
190
+ "comment": "chore: Updates Button to use useARIAButton over useARIAButtonShorthand"
191
+ },
192
+ {
193
+ "author": "beachball",
194
+ "package": "@fluentui/react-button",
195
+ "comment": "Bump @fluentui/react-aria to v9.1.0",
196
+ "commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
197
+ },
198
+ {
199
+ "author": "beachball",
200
+ "package": "@fluentui/react-button",
201
+ "comment": "Bump @fluentui/react-tabster to v9.1.0",
202
+ "commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
203
+ },
204
+ {
205
+ "author": "beachball",
206
+ "package": "@fluentui/react-button",
207
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12",
208
+ "commit": "ee4a8be0d0831a6615f878f98db6a97cc61a802d"
209
+ }
210
+ ],
211
+ "none": [
212
+ {
213
+ "author": "lingfangao@hotmail.com",
214
+ "package": "@fluentui/react-button",
215
+ "commit": "99cc385631d04a76ee10ebc143cb9fecd99640b6",
216
+ "comment": "chore: Add `prerelease` as disallowed changetype for 9.0.0 packages"
217
+ }
218
+ ],
219
+ "patch": [
220
+ {
221
+ "author": "miroslav.stastny@microsoft.com",
222
+ "package": "@fluentui/react-button",
223
+ "commit": "08563664778fd80284561d3c9d254307a0a32362",
224
+ "comment": "chore: Bump Griffel dependencies"
51
225
  }
52
226
  ]
53
227
  }
package/CHANGELOG.md CHANGED
@@ -1,23 +1,77 @@
1
1
  # Change Log - @fluentui/react-button
2
2
 
3
- This log was last generated on Fri, 15 Jul 2022 04:31:39 GMT and should not be manually modified.
3
+ This log was last generated on Fri, 07 Oct 2022 15:34:51 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [0.0.0-nightly-20220715-0418.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v0.0.0-nightly-20220715-0418.1)
7
+ ## [0.0.0-nightly-20221007-1528.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v0.0.0-nightly-20221007-1528.1)
8
8
 
9
- Fri, 15 Jul 2022 04:31:39 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.0.3..@fluentui/react-button_v0.0.0-nightly-20220715-0418.1)
9
+ Fri, 07 Oct 2022 15:34:51 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.1.3..@fluentui/react-button_v0.0.0-nightly-20221007-1528.1)
11
11
 
12
12
  ### Changes
13
13
 
14
- - Release nightly v9 ([commit](https://github.com/microsoft/fluentui/commit/not available) by email not defined)
15
- - Bump @fluentui/keyboard-keys to v0.0.0-nightly-20220715-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/e1949f7a18e758e415b4740eda5f84bb8ae19e02) by beachball)
16
- - Bump @fluentui/react-aria to v0.0.0-nightly-20220715-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/e1949f7a18e758e415b4740eda5f84bb8ae19e02) by beachball)
17
- - Bump @fluentui/react-tabster to v0.0.0-nightly-20220715-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/e1949f7a18e758e415b4740eda5f84bb8ae19e02) by beachball)
18
- - Bump @fluentui/react-theme to v0.0.0-nightly-20220715-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/e1949f7a18e758e415b4740eda5f84bb8ae19e02) by beachball)
19
- - Bump @fluentui/react-utilities to v0.0.0-nightly-20220715-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/e1949f7a18e758e415b4740eda5f84bb8ae19e02) by beachball)
20
- - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20220715-0418.1 ([commit](https://github.com/microsoft/fluentui/commit/e1949f7a18e758e415b4740eda5f84bb8ae19e02) by beachball)
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-20221007-1528.1 ([commit](https://github.com/microsoft/fluentui/commit/827197046ec2b195a8997fadbb514a5693234e6b) by beachball)
16
+ - Bump @fluentui/react-aria to v0.0.0-nightly-20221007-1528.1 ([commit](https://github.com/microsoft/fluentui/commit/827197046ec2b195a8997fadbb514a5693234e6b) by beachball)
17
+ - Bump @fluentui/react-tabster to v0.0.0-nightly-20221007-1528.1 ([commit](https://github.com/microsoft/fluentui/commit/827197046ec2b195a8997fadbb514a5693234e6b) by beachball)
18
+ - Bump @fluentui/react-theme to v0.0.0-nightly-20221007-1528.1 ([commit](https://github.com/microsoft/fluentui/commit/827197046ec2b195a8997fadbb514a5693234e6b) by beachball)
19
+ - Bump @fluentui/react-utilities to v0.0.0-nightly-20221007-1528.1 ([commit](https://github.com/microsoft/fluentui/commit/827197046ec2b195a8997fadbb514a5693234e6b) by beachball)
20
+ - Bump @fluentui/react-conformance-griffel to v0.0.0-nightly-20221007-1528.1 ([commit](https://github.com/microsoft/fluentui/commit/827197046ec2b195a8997fadbb514a5693234e6b) by beachball)
21
+
22
+ ## [9.1.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.1.3)
23
+
24
+ Mon, 03 Oct 2022 22:24:42 GMT
25
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.1.2..@fluentui/react-button_v9.1.3)
26
+
27
+ ### Patches
28
+
29
+ - Bump @fluentui/react-aria to v9.2.1 ([PR #25055](https://github.com/microsoft/fluentui/pull/25055) by beachball)
30
+ - Bump @fluentui/react-tabster to v9.1.2 ([PR #25055](https://github.com/microsoft/fluentui/pull/25055) by beachball)
31
+
32
+ ## [9.1.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.1.2)
33
+
34
+ Tue, 20 Sep 2022 20:55:45 GMT
35
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.1.1..@fluentui/react-button_v9.1.2)
36
+
37
+ ### Patches
38
+
39
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.14 ([PR #24869](https://github.com/microsoft/fluentui/pull/24869) by beachball)
40
+
41
+ ## [9.1.1](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.1.1)
42
+
43
+ Thu, 15 Sep 2022 09:49:56 GMT
44
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.1.0..@fluentui/react-button_v9.1.1)
45
+
46
+ ### Patches
47
+
48
+ - fix: Adding 'aria-expanded=false' to collapsed MenuButtons. ([PR #24782](https://github.com/microsoft/fluentui/pull/24782) by humberto_makoto@hotmail.com)
49
+ - chore: Remove max-width style from Button components. ([PR #24647](https://github.com/microsoft/fluentui/pull/24647) by makotom@microsoft.com)
50
+ - chore: Cleaning up tokens in Button components so they better adhere to the design spec. ([PR #24732](https://github.com/microsoft/fluentui/pull/24732) by humberto_makoto@hotmail.com)
51
+ - fix: Wrapping long text in Button components. ([PR #24682](https://github.com/microsoft/fluentui/pull/24682) by humberto_makoto@hotmail.com)
52
+ - refactor: Replace useMergedEventCallbacks utility with mergeCallbacks ([PR #24152](https://github.com/microsoft/fluentui/pull/24152) by behowell@microsoft.com)
53
+ - chore: Update Griffel to latest version ([PR #24221](https://github.com/microsoft/fluentui/pull/24221) by olfedias@microsoft.com)
54
+ - Bump @fluentui/react-aria to v9.2.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
55
+ - Bump @fluentui/react-tabster to v9.1.1 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
56
+ - Bump @fluentui/react-theme to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
57
+ - Bump @fluentui/react-utilities to v9.1.0 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
58
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.13 ([PR #24808](https://github.com/microsoft/fluentui/pull/24808) by beachball)
59
+
60
+ ## [9.1.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.1.0)
61
+
62
+ Wed, 03 Aug 2022 16:03:39 GMT
63
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.0.3..@fluentui/react-button_v9.1.0)
64
+
65
+ ### Minor changes
66
+
67
+ - chore: Updates Button to use useARIAButton over useARIAButtonShorthand ([PR #24032](https://github.com/microsoft/fluentui/pull/24032) by bernardo.sunderhus@gmail.com)
68
+ - Bump @fluentui/react-aria to v9.1.0 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
69
+ - Bump @fluentui/react-tabster to v9.1.0 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
70
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.12 ([PR #24131](https://github.com/microsoft/fluentui/pull/24131) by beachball)
71
+
72
+ ### Patches
73
+
74
+ - chore: Bump Griffel dependencies ([PR #24114](https://github.com/microsoft/fluentui/pull/24114) by miroslav.stastny@microsoft.com)
21
75
 
22
76
  ## [9.0.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.0.3)
23
77
 
package/dist/index.d.ts CHANGED
@@ -65,7 +65,7 @@ export declare type ButtonSlots = {
65
65
  /**
66
66
  * Root of the component that renders as either a `<button>` tag or an `<a>` tag.
67
67
  */
68
- root: NonNullable<Slot<ARIAButtonSlotProps>>;
68
+ root: NonNullable<Slot<ARIAButtonSlotProps<'a'>>>;
69
69
  /**
70
70
  * Icon that renders either before or after the `children` as specified by the `iconPosition` prop.
71
71
  */
package/lib/Button.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sourceRoot":"../src/","sources":["Button.tsx"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './components/Button/index';\n"]}
1
+ {"version":3,"file":"Button.js","sourceRoot":"","sources":["../src/Button.tsx"],"names":[],"mappings":"AAAA,cAAc,2BAA2B,CAAC","sourcesContent":["export * from './components/Button/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CompoundButton.js","sourceRoot":"../src/","sources":["CompoundButton.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC","sourcesContent":["export * from './components/CompoundButton/index';\n"]}
1
+ {"version":3,"file":"CompoundButton.js","sourceRoot":"","sources":["../src/CompoundButton.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC","sourcesContent":["export * from './components/CompoundButton/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"MenuButton.js","sourceRoot":"../src/","sources":["MenuButton.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './components/MenuButton/index';\n"]}
1
+ {"version":3,"file":"MenuButton.js","sourceRoot":"","sources":["../src/MenuButton.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC","sourcesContent":["export * from './components/MenuButton/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SplitButton.js","sourceRoot":"../src/","sources":["SplitButton.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './components/SplitButton/index';\n"]}
1
+ {"version":3,"file":"SplitButton.js","sourceRoot":"","sources":["../src/SplitButton.ts"],"names":[],"mappings":"AAAA,cAAc,gCAAgC,CAAC","sourcesContent":["export * from './components/SplitButton/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleButton.js","sourceRoot":"../src/","sources":["ToggleButton.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC","sourcesContent":["export * from './components/ToggleButton/index';\n"]}
1
+ {"version":3,"file":"ToggleButton.js","sourceRoot":"","sources":["../src/ToggleButton.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC","sourcesContent":["export * from './components/ToggleButton/index';\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,kBAAT,QAAmC,aAAnC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AAIA;;AAEG;;AACH,OAAO,MAAM,MAAM,gBAAqC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACtF,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAhC;EAEA,wBAAwB,CAAC,KAAD,CAAxB;EAEA,OAAO,qBAAqB,CAAC,KAAD,CAA5B,CALsF,CAMtF;AACD,CAPuD,CAAjD;AASP,MAAM,CAAC,WAAP,GAAqB,QAArB","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';\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 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"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,QAAsC,gBAAtC;AACA,SAAS,kBAAT,QAAmC,aAAnC;AACA,SAAS,wBAAT,QAAyC,mBAAzC;AAIA;;AAEG;;AACH,OAAO,MAAM,MAAM,gBAAqC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;EACtF,MAAM,KAAK,GAAG,kBAAkB,CAAC,KAAD,EAAQ,GAAR,CAAhC;EAEA,wBAAwB,CAAC,KAAD,CAAxB;EAEA,OAAO,qBAAqB,CAAC,KAAD,CAA5B,CALsF,CAMtF;AACD,CAPuD,CAAjD;AASP,MAAM,CAAC,WAAP,GAAqB,QAArB","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';\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 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"],"sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.types.js","sourceRoot":"../src/","sources":["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>>;\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\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?: 'small' | 'medium' | 'large';\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
+ {"version":3,"file":"Button.types.js","sourceRoot":"","sources":["../../../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\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?: 'small' | 'medium' | 'large';\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 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["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
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../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 +1 @@
1
- {"version":3,"sources":["components/Button/renderButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,QAAT,QAAyB,2BAAzB;AAGA;;AAEG;;AACH,OAAO,MAAM,qBAAqB,GAAI,KAAD,IAAuB;EAC1D,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAc,KAAd,CAArC;EACA,MAAM;IAAE,QAAF;IAAY;EAAZ,IAA6B,KAAnC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,YAAY,KAAK,OAAjB,IAA4B,KAAK,CAAC,IAAlC,iBAA0C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAD7C,EAEG,CAAC,QAAD,IAAa,KAAK,CAAC,IAAN,CAAW,QAF3B,EAGG,YAAY,KAAK,OAAjB,IAA4B,KAAK,CAAC,IAAlC,iBAA0C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAH7C,CADF;AAOD,CAXM","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"],"sourceRoot":"../src/"}
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,qBAAqB,GAAI,KAAD,IAAuB;EAC1D,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAAc,KAAd,CAArC;EACA,MAAM;IAAE,QAAF;IAAY;EAAZ,IAA6B,KAAnC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,EACG,YAAY,KAAK,OAAjB,IAA4B,KAAK,CAAC,IAAlC,iBAA0C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAD7C,EAEG,CAAC,QAAD,IAAa,KAAK,CAAC,IAAN,CAAW,QAF3B,EAGG,YAAY,KAAK,OAAjB,IAA4B,KAAK,CAAC,IAAlC,iBAA0C,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;EAAf,CAAX,CAH7C,CADF;AAOD,CAXM","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"],"sourceRoot":""}
@@ -1,4 +1,4 @@
1
- import { useARIAButton } from '@fluentui/react-aria';
1
+ import { useARIAButtonShorthand } from '@fluentui/react-aria';
2
2
  import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';
3
3
  /**
4
4
  * Given user props, defines default props for the Button, calls useButtonState, and returns processed state.
@@ -9,7 +9,7 @@ import { getNativeElementProps, resolveShorthand } from '@fluentui/react-utiliti
9
9
  export const useButton_unstable = (props, ref) => {
10
10
  const {
11
11
  appearance = 'secondary',
12
- as,
12
+ as = 'button',
13
13
  disabled = false,
14
14
  disabledFocusable = false,
15
15
  icon,
@@ -33,13 +33,11 @@ export const useButton_unstable = (props, ref) => {
33
33
  root: 'button',
34
34
  icon: 'span'
35
35
  },
36
- root: getNativeElementProps(as || 'button', useARIAButton(props, {
36
+ root: getNativeElementProps(as, useARIAButtonShorthand(props, {
37
37
  required: true,
38
38
  defaultProps: {
39
- // useARIAButton isn't working with React.Ref<HTMLButtonElement | HTMLAnchorElement>
40
39
  ref: ref,
41
- type: 'button' // This is added because the default for type is 'submit'
42
-
40
+ type: 'button'
43
41
  }
44
42
  })),
45
43
  icon: iconShorthand
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Button/useButton.ts"],"names":[],"mappings":"AACA,SAAS,aAAT,QAA8B,sBAA9B;AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAIA;;;;AAIG;;AACH,OAAO,MAAM,kBAAkB,GAAG,CAChC,KADgC,EAEhC,GAFgC,KAGjB;EACf,MAAM;IACJ,UAAU,GAAG,WADT;IAEJ,EAFI;IAGJ,QAAQ,GAAG,KAHP;IAIJ,iBAAiB,GAAG,KAJhB;IAKJ,IALI;IAMJ,YAAY,GAAG,QANX;IAOJ,KAAK,GAAG,SAPJ;IAQJ,IAAI,GAAG;EARH,IASF,KATJ;EAUA,MAAM,aAAa,GAAG,gBAAgB,CAAC,IAAD,CAAtC;EAEA,OAAO;IACL;IACA,UAFK;IAGL,QAHK;IAIL,iBAJK;IAKL,YALK;IAML,KANK;IAOL,IAPK;IASL;IACA,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,CAVZ;IAYL;IACA,UAAU,EAAE;MACV,IAAI,EAAE,QADI;MAEV,IAAI,EAAE;IAFI,CAbP;IAkBL,IAAI,EAAE,qBAAqB,CACzB,EAAE,IAAI,QADmB,EAEzB,aAAa,CAAsB,KAAtB,EAA6B;MACxC,QAAQ,EAAE,IAD8B;MAExC,YAAY,EAAE;QACZ;QACA,GAAG,EAAE,GAFO;QAGZ,IAAI,EAAE,QAHM,CAGI;;MAHJ;IAF0B,CAA7B,CAFY,CAlBtB;IA6BL,IAAI,EAAE;EA7BD,CAAP;AA+BD,CA/CM","sourcesContent":["import * as React from 'react';\nimport { useARIAButton } from '@fluentui/react-aria';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { ARIAButtonSlotProps } from '@fluentui/react-aria';\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 {\n appearance = 'secondary',\n as,\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n shape = 'rounded',\n size = '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 || 'button',\n useARIAButton<ARIAButtonSlotProps>(props, {\n required: true,\n defaultProps: {\n // useARIAButton isn't working with React.Ref<HTMLButtonElement | HTMLAnchorElement>\n ref: ref as React.Ref<HTMLButtonElement>,\n type: 'button', // This is added because the default for type is 'submit'\n },\n }),\n ),\n icon: iconShorthand,\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Button/useButton.ts"],"names":[],"mappings":"AACA,SAA8B,sBAA9B,QAA4D,sBAA5D;AACA,SAAS,qBAAT,EAAgC,gBAAhC,QAAwD,2BAAxD;AAGA;;;;AAIG;;AACH,OAAO,MAAM,kBAAkB,GAAG,CAChC,KADgC,EAEhC,GAFgC,KAGjB;EACf,MAAM;IACJ,UAAU,GAAG,WADT;IAEJ,EAAE,GAAG,QAFD;IAGJ,QAAQ,GAAG,KAHP;IAIJ,iBAAiB,GAAG,KAJhB;IAKJ,IALI;IAMJ,YAAY,GAAG,QANX;IAOJ,KAAK,GAAG,SAPJ;IAQJ,IAAI,GAAG;EARH,IASF,KATJ;EAUA,MAAM,aAAa,GAAG,gBAAgB,CAAC,IAAD,CAAtC;EAEA,OAAO;IACL;IACA,UAFK;IAGL,QAHK;IAIL,iBAJK;IAKL,YALK;IAML,KANK;IAOL,IAPK;IASL;IACA,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,CAVZ;IAYL;IACA,UAAU,EAAE;MACV,IAAI,EAAE,QADI;MAEV,IAAI,EAAE;IAFI,CAbP;IAkBL,IAAI,EAAE,qBAAqB,CACzB,EADyB,EAEzB,sBAAsB,CAA2B,KAA3B,EAAkC;MACtD,QAAQ,EAAE,IAD4C;MAEtD,YAAY,EAAE;QACZ,GAAG,EAAE,GADO;QAEZ,IAAI,EAAE;MAFM;IAFwC,CAAlC,CAFG,CAlBtB;IA4BL,IAAI,EAAE;EA5BD,CAAP;AA8BD,CA9CM","sourcesContent":["import * as React from 'react';\nimport { ARIAButtonSlotProps, useARIAButtonShorthand } from '@fluentui/react-aria';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\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 {\n appearance = 'secondary',\n as = 'button',\n disabled = false,\n disabledFocusable = false,\n icon,\n iconPosition = 'before',\n shape = 'rounded',\n size = '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"],"sourceRoot":""}