@fluentui/react-button 9.75.0-experimental.css-modules.20261031-810ab07afb.0 → 9.75.1-experimental.positioning-engine.20261103-19efe125d1.0

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 (53) hide show
  1. package/CHANGELOG.md +12 -12
  2. package/README.md +0 -22
  3. package/package.json +10 -13
  4. package/lib/components/Button/Button.module.css +0 -401
  5. package/lib/components/Button/useButtonStyles.styles.css.js +0 -14
  6. package/lib/components/Button/useButtonStyles.styles.css.js.map +0 -1
  7. package/lib/components/Button/useButtonStyles.styles.raw.css.js +0 -14
  8. package/lib/components/Button/useButtonStyles.styles.raw.css.js.map +0 -1
  9. package/lib/components/CompoundButton/CompoundButton.module.css +0 -143
  10. package/lib/components/CompoundButton/useCompoundButtonStyles.styles.css.js +0 -27
  11. package/lib/components/CompoundButton/useCompoundButtonStyles.styles.css.js.map +0 -1
  12. package/lib/components/CompoundButton/useCompoundButtonStyles.styles.raw.css.js +0 -27
  13. package/lib/components/CompoundButton/useCompoundButtonStyles.styles.raw.css.js.map +0 -1
  14. package/lib/components/MenuButton/MenuButton.module.css +0 -75
  15. package/lib/components/MenuButton/useMenuButtonStyles.styles.css.js +0 -26
  16. package/lib/components/MenuButton/useMenuButtonStyles.styles.css.js.map +0 -1
  17. package/lib/components/MenuButton/useMenuButtonStyles.styles.raw.css.js +0 -26
  18. package/lib/components/MenuButton/useMenuButtonStyles.styles.raw.css.js.map +0 -1
  19. package/lib/components/SplitButton/SplitButton.module.css +0 -73
  20. package/lib/components/SplitButton/useSplitButtonStyles.styles.css.js +0 -17
  21. package/lib/components/SplitButton/useSplitButtonStyles.styles.css.js.map +0 -1
  22. package/lib/components/SplitButton/useSplitButtonStyles.styles.raw.css.js +0 -17
  23. package/lib/components/SplitButton/useSplitButtonStyles.styles.raw.css.js.map +0 -1
  24. package/lib/components/ToggleButton/ToggleButton.module.css +0 -234
  25. package/lib/components/ToggleButton/useToggleButtonStyles.styles.css.js +0 -18
  26. package/lib/components/ToggleButton/useToggleButtonStyles.styles.css.js.map +0 -1
  27. package/lib/components/ToggleButton/useToggleButtonStyles.styles.raw.css.js +0 -18
  28. package/lib/components/ToggleButton/useToggleButtonStyles.styles.raw.css.js.map +0 -1
  29. package/lib-commonjs/components/Button/Button.module.css +0 -401
  30. package/lib-commonjs/components/Button/useButtonStyles.styles.css.cjs +0 -33
  31. package/lib-commonjs/components/Button/useButtonStyles.styles.css.cjs.map +0 -1
  32. package/lib-commonjs/components/Button/useButtonStyles.styles.raw.css.cjs +0 -33
  33. package/lib-commonjs/components/Button/useButtonStyles.styles.raw.css.cjs.map +0 -1
  34. package/lib-commonjs/components/CompoundButton/CompoundButton.module.css +0 -143
  35. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.styles.css.cjs +0 -46
  36. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.styles.css.cjs.map +0 -1
  37. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.styles.raw.css.cjs +0 -46
  38. package/lib-commonjs/components/CompoundButton/useCompoundButtonStyles.styles.raw.css.cjs.map +0 -1
  39. package/lib-commonjs/components/MenuButton/MenuButton.module.css +0 -75
  40. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.styles.css.cjs +0 -45
  41. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.styles.css.cjs.map +0 -1
  42. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.styles.raw.css.cjs +0 -45
  43. package/lib-commonjs/components/MenuButton/useMenuButtonStyles.styles.raw.css.cjs.map +0 -1
  44. package/lib-commonjs/components/SplitButton/SplitButton.module.css +0 -73
  45. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.styles.css.cjs +0 -36
  46. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.styles.css.cjs.map +0 -1
  47. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.styles.raw.css.cjs +0 -36
  48. package/lib-commonjs/components/SplitButton/useSplitButtonStyles.styles.raw.css.cjs.map +0 -1
  49. package/lib-commonjs/components/ToggleButton/ToggleButton.module.css +0 -234
  50. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.styles.css.cjs +0 -37
  51. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.styles.css.cjs.map +0 -1
  52. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.styles.raw.css.cjs +0 -37
  53. package/lib-commonjs/components/ToggleButton/useToggleButtonStyles.styles.raw.css.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,24 +1,24 @@
1
1
  # Change Log - @fluentui/react-button
2
2
 
3
- <!-- This log was last generated on Sat, 31 Oct 2026 11:09:01 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Tue, 03 Nov 2026 14:18:20 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## [9.75.0-experimental.css-modules.20261031-810ab07afb.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.75.0-experimental.css-modules.20261031-810ab07afb.0)
7
+ ## [9.75.1-experimental.positioning-engine.20261103-19efe125d1.0](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0)
8
8
 
9
- Sat, 31 Oct 2026 11:09:01 GMT
10
- [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.11.3..@fluentui/react-button_v9.75.0-experimental.css-modules.20261031-810ab07afb.0)
9
+ Tue, 03 Nov 2026 14:18:20 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-button_v9.11.3..@fluentui/react-button_v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0)
11
11
 
12
12
  ### Changes
13
13
 
14
- - Release 9.75.0-experimental.css-modules.20261031-810ab07afb ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
15
- - Bump @fluentui/keyboard-keys to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
- - Bump @fluentui/react-aria to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
- - Bump @fluentui/react-jsx-runtime to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
- - Bump @fluentui/react-shared-contexts to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
- - Bump @fluentui/react-tabster to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
20
- - Bump @fluentui/react-theme to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
21
- - Bump @fluentui/react-utilities to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
14
+ - Release 9.75.1-experimental.positioning-engine.20261103-19efe125d1 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by 257645319+office-ogx-auth-helper[bot]@users.noreply.github.com)
15
+ - Bump @fluentui/keyboard-keys to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
16
+ - Bump @fluentui/react-aria to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
17
+ - Bump @fluentui/react-jsx-runtime to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
+ - Bump @fluentui/react-shared-contexts to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
+ - Bump @fluentui/react-tabster to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
20
+ - Bump @fluentui/react-theme to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
21
+ - Bump @fluentui/react-utilities to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
22
22
 
23
23
  ## [9.11.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-button_v9.11.3)
24
24
 
package/README.md CHANGED
@@ -89,28 +89,6 @@ Alternatively, run Storybook locally with:
89
89
  1. `yarn start`
90
90
  2. Select `react-button` from the list.
91
91
 
92
- ### Experimental CSS Modules
93
-
94
- Button, CompoundButton, MenuButton, SplitButton, and ToggleButton have
95
- `use<Component>Styles.css-module.ts` alternatives beside their original Griffel
96
- style hooks. The CSS Module hooks compose Button's shared styles and apply
97
- independent state classes; nested CSS handles state combinations.
98
-
99
- The prototype's component imports select the CSS Module hooks for local testing.
100
- The original Griffel hooks remain available for comparison. CSS Modules use the
101
- `fluentui` cascade layer and FluentProvider's theme custom properties. They require
102
- CSS Modules and native CSS nesting support, or an equivalent bundler transform.
103
- Use headless/CSS-styled icons with their defaults in the same layer:
104
-
105
- ```css
106
- @import url('@fluentui/react-icons/headless/styles.css') layer(fluentui);
107
- ```
108
-
109
- The Nx build copies every `*.module.css` file next to its hook in both `lib` and
110
- `lib-commonjs`. Applications must process these CSS imports and retain CSS side
111
- effects. Browser-based parity checks are required when changing the cascade;
112
- JSDOM hook tests only validate the state-to-class mapping.
113
-
114
92
  ### Specification
115
93
 
116
94
  See [SPEC.md](./src/components/Button/SPEC.md).
package/package.json CHANGED
@@ -1,30 +1,27 @@
1
1
  {
2
2
  "name": "@fluentui/react-button",
3
- "version": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
3
+ "version": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
4
4
  "description": "Fluent UI React Button component.",
5
5
  "main": "lib-commonjs/index.cjs",
6
6
  "module": "lib/index.js",
7
7
  "typings": "./dist/index.d.ts",
8
- "sideEffects": [
9
- "**/*.css"
10
- ],
8
+ "sideEffects": false,
11
9
  "repository": {
12
10
  "type": "git",
13
11
  "url": "https://github.com/microsoft/fluentui"
14
12
  },
15
13
  "license": "MIT",
16
14
  "dependencies": {
17
- "@fluentui/keyboard-keys": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
18
- "@fluentui/react-aria": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
15
+ "@fluentui/keyboard-keys": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
16
+ "@fluentui/react-aria": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
19
17
  "@fluentui/react-icons": "^2.0.245",
20
- "@fluentui/react-jsx-runtime": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
21
- "@fluentui/react-shared-contexts": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
22
- "@fluentui/react-tabster": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
23
- "@fluentui/react-theme": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
24
- "@fluentui/react-utilities": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
18
+ "@fluentui/react-jsx-runtime": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
19
+ "@fluentui/react-shared-contexts": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
20
+ "@fluentui/react-tabster": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
21
+ "@fluentui/react-theme": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
22
+ "@fluentui/react-utilities": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
25
23
  "@griffel/react": "^1.5.32",
26
- "@swc/helpers": "^0.5.1",
27
- "clsx": "^2.1.1"
24
+ "@swc/helpers": "^0.5.1"
28
25
  },
29
26
  "peerDependencies": {
30
27
  "@types/react": ">=16.14.0 <20.0.0",
@@ -1,401 +0,0 @@
1
- @layer fluentui {
2
- .root {
3
- align-items: center;
4
- box-sizing: border-box;
5
- display: inline-flex;
6
- justify-content: center;
7
- text-decoration-line: none;
8
- vertical-align: middle;
9
- margin: 0;
10
- overflow: hidden;
11
- background-color: var(--colorNeutralBackground1);
12
- color: var(--colorNeutralForeground1);
13
- border: var(--strokeWidthThin) solid var(--colorNeutralStroke1);
14
- font-family: var(--fontFamilyBase);
15
- outline-style: none;
16
- transition-duration: var(--durationFaster);
17
- transition-property: background, border, color;
18
- transition-timing-function: var(--curveEasyEase);
19
- }
20
-
21
- .root:hover {
22
- background-color: var(--colorNeutralBackground1Hover);
23
- border-color: var(--colorNeutralStroke1Hover);
24
- color: var(--colorNeutralForeground1Hover);
25
- cursor: pointer;
26
- }
27
-
28
- .root:hover:active,
29
- .root:active:focus-visible {
30
- background-color: var(--colorNeutralBackground1Pressed);
31
- border-color: var(--colorNeutralStroke1Pressed);
32
- color: var(--colorNeutralForeground1Pressed);
33
- outline-style: none;
34
- }
35
-
36
- @media screen and (prefers-reduced-motion: reduce) {
37
- .root {
38
- transition-duration: 0.01ms;
39
- }
40
- }
41
-
42
- .root[data-fui-focus-visible] {
43
- border-color: var(--colorStrokeFocus2);
44
- border-radius: var(--borderRadiusMedium);
45
- border-width: var(--strokeWidthThin);
46
- outline: var(--strokeWidthThick) solid var(--colorTransparentStroke);
47
- box-shadow: 0 0 0 var(--strokeWidthThin) var(--colorStrokeFocus2) inset;
48
- z-index: 1;
49
- }
50
-
51
- .secondary {
52
- background-color: var(--colorNeutralBackground1);
53
- }
54
-
55
- .outline {
56
- background-color: var(--colorTransparentBackground);
57
- }
58
-
59
- .outline:hover {
60
- background-color: var(--colorTransparentBackgroundHover);
61
- }
62
-
63
- .outline:hover:active,
64
- .outline:active:focus-visible {
65
- background-color: var(--colorTransparentBackgroundPressed);
66
- }
67
-
68
- .primary {
69
- background-color: var(--colorBrandBackground);
70
- border-color: transparent;
71
- color: var(--colorNeutralForegroundOnBrand);
72
- }
73
-
74
- .primary:hover {
75
- background-color: var(--colorBrandBackgroundHover);
76
- border-color: transparent;
77
- color: var(--colorNeutralForegroundOnBrand);
78
- }
79
-
80
- .primary:hover:active,
81
- .primary:active:focus-visible {
82
- background-color: var(--colorBrandBackgroundPressed);
83
- border-color: transparent;
84
- color: var(--colorNeutralForegroundOnBrand);
85
- }
86
-
87
- .subtle {
88
- background-color: var(--colorSubtleBackground);
89
- border-color: transparent;
90
- color: var(--colorNeutralForeground2);
91
- }
92
-
93
- .subtle:hover {
94
- background-color: var(--colorSubtleBackgroundHover);
95
- border-color: transparent;
96
- color: var(--colorNeutralForeground2Hover);
97
- }
98
-
99
- .subtle:hover:active,
100
- .subtle:active:focus-visible {
101
- background-color: var(--colorSubtleBackgroundPressed);
102
- border-color: transparent;
103
- color: var(--colorNeutralForeground2Pressed);
104
- }
105
-
106
- .subtle:hover :global(.fui-Button__icon) {
107
- color: var(--colorNeutralForeground2BrandHover);
108
- }
109
-
110
- .subtle:hover:active :global(.fui-Button__icon),
111
- .subtle:active:focus-visible :global(.fui-Button__icon) {
112
- color: var(--colorNeutralForeground2BrandPressed);
113
- }
114
-
115
- .transparent {
116
- background-color: var(--colorTransparentBackground);
117
- border-color: transparent;
118
- color: var(--colorNeutralForeground2);
119
- }
120
-
121
- .transparent:hover {
122
- background-color: var(--colorTransparentBackgroundHover);
123
- border-color: transparent;
124
- color: var(--colorNeutralForeground2BrandHover);
125
- }
126
-
127
- .transparent:hover:active,
128
- .transparent:active:focus-visible {
129
- background-color: var(--colorTransparentBackgroundPressed);
130
- border-color: transparent;
131
- color: var(--colorNeutralForeground2BrandPressed);
132
- }
133
-
134
- .subtle:hover :global(.fui-Icon-filled),
135
- .subtle:hover:active :global(.fui-Icon-filled),
136
- .subtle:active:focus-visible :global(.fui-Icon-filled),
137
- .transparent:hover :global(.fui-Icon-filled),
138
- .transparent:hover:active :global(.fui-Icon-filled),
139
- .transparent:active:focus-visible :global(.fui-Icon-filled) {
140
- display: inline;
141
- }
142
-
143
- .subtle:hover :global(.fui-Icon-regular),
144
- .subtle:hover:active :global(.fui-Icon-regular),
145
- .subtle:active:focus-visible :global(.fui-Icon-regular),
146
- .transparent:hover :global(.fui-Icon-regular),
147
- .transparent:hover:active :global(.fui-Icon-regular),
148
- .transparent:active:focus-visible :global(.fui-Icon-regular) {
149
- display: none;
150
- }
151
-
152
- .small {
153
- min-width: calc(var(--spacingHorizontalXXXL) * 2);
154
- padding: calc(var(--spacingVerticalXS) - var(--strokeWidthThin)) var(--spacingHorizontalS);
155
- font-size: var(--fontSizeBase200);
156
- font-weight: var(--fontWeightRegular);
157
- line-height: var(--lineHeightBase200);
158
-
159
- .icon {
160
- --fui-Button__icon--spacing: var(--spacingHorizontalXS);
161
- }
162
-
163
- &:where(.withIcon) {
164
- padding-top: var(--strokeWidthThin);
165
- padding-bottom: var(--strokeWidthThin);
166
- }
167
- }
168
-
169
- .medium {
170
- padding: calc(var(--spacingVerticalSNudge) - var(--strokeWidthThin)) var(--spacingHorizontalM);
171
- min-width: calc(var(--spacingHorizontalXXXL) * 3);
172
- font-size: var(--fontSizeBase300);
173
- font-weight: var(--fontWeightSemibold);
174
- line-height: var(--lineHeightBase300);
175
- }
176
-
177
- .large {
178
- min-width: calc(var(--spacingHorizontalXXXL) * 3);
179
- padding: var(--spacingVerticalS) var(--spacingHorizontalL);
180
- font-size: var(--fontSizeBase400);
181
- font-weight: var(--fontWeightSemibold);
182
- line-height: var(--lineHeightBase400);
183
-
184
- .icon {
185
- font-size: var(--fontSizeBase600);
186
- height: var(--fontSizeBase600);
187
- width: var(--fontSizeBase600);
188
- }
189
-
190
- &:where(.withIcon) {
191
- padding-top: calc(var(--spacingVerticalS) - var(--strokeWidthThin));
192
- padding-bottom: calc(var(--spacingVerticalS) - var(--strokeWidthThin));
193
- }
194
- }
195
-
196
- .rounded {
197
- border-radius: var(--borderRadiusMedium);
198
- }
199
-
200
- .circular {
201
- border-radius: var(--borderRadiusCircular);
202
- }
203
-
204
- .square {
205
- border-radius: var(--borderRadiusNone);
206
- }
207
-
208
- .disabled,
209
- .disabled:hover,
210
- .disabled:hover:active,
211
- .disabled:active:focus-visible {
212
- background-color: var(--colorNeutralBackgroundDisabled);
213
- border-color: var(--colorNeutralStrokeDisabled);
214
- color: var(--colorNeutralForegroundDisabled);
215
- cursor: not-allowed;
216
- }
217
-
218
- .disabled :global(.fui-Button__icon),
219
- .disabled:hover :global(.fui-Button__icon),
220
- .disabled:hover:active :global(.fui-Button__icon),
221
- .disabled:active:focus-visible :global(.fui-Button__icon) {
222
- color: var(--colorNeutralForegroundDisabled);
223
- }
224
-
225
- .disabled:hover :global(.fui-Icon-filled),
226
- .disabled:hover:active :global(.fui-Icon-filled),
227
- .disabled:active:focus-visible :global(.fui-Icon-filled) {
228
- display: none;
229
- }
230
-
231
- .disabled:hover :global(.fui-Icon-regular),
232
- .disabled:hover:active :global(.fui-Icon-regular),
233
- .disabled:active:focus-visible :global(.fui-Icon-regular) {
234
- display: inline;
235
- }
236
-
237
- .disabled {
238
- &:where(.outline, .subtle, .transparent) {
239
- &,
240
- &:hover,
241
- &:hover:active,
242
- &:active:focus-visible {
243
- background-color: var(--colorTransparentBackground);
244
- }
245
- }
246
-
247
- &:where(.primary, .subtle, .transparent) {
248
- &,
249
- &:hover,
250
- &:hover:active,
251
- &:active:focus-visible {
252
- border-color: transparent;
253
- }
254
- }
255
- }
256
-
257
- .primary[data-fui-focus-visible] {
258
- border-color: var(--colorStrokeFocus2);
259
- box-shadow: var(--shadow2), 0 0 0 var(--strokeWidthThin) var(--colorStrokeFocus2) inset,
260
- 0 0 0 var(--strokeWidthThick) var(--colorNeutralForegroundOnBrand) inset;
261
- }
262
-
263
- .primary[data-fui-focus-visible]:hover {
264
- border-color: var(--colorStrokeFocus2);
265
- box-shadow: var(--shadow2), 0 0 0 var(--strokeWidthThin) var(--colorStrokeFocus2) inset;
266
- }
267
-
268
- /* Firefox needs an extra quarter of the default thin stroke at some zoom levels. */
269
- @supports (-moz-appearance: button) {
270
- .root[data-fui-focus-visible] {
271
- box-shadow: 0 0 0 calc(var(--strokeWidthThin) * 1.25) var(--colorStrokeFocus2) inset;
272
- }
273
-
274
- .primary[data-fui-focus-visible] {
275
- box-shadow: var(--shadow2), 0 0 0 calc(var(--strokeWidthThin) * 1.25) var(--colorStrokeFocus2) inset,
276
- 0 0 0 var(--strokeWidthThick) var(--colorNeutralForegroundOnBrand) inset;
277
- }
278
-
279
- .primary[data-fui-focus-visible]:hover {
280
- box-shadow: var(--shadow2), 0 0 0 calc(var(--strokeWidthThin) * 1.25) var(--colorStrokeFocus2) inset;
281
- }
282
- }
283
-
284
- .small[data-fui-focus-visible] {
285
- border-radius: var(--borderRadiusSmall);
286
- }
287
-
288
- .large[data-fui-focus-visible] {
289
- border-radius: var(--borderRadiusLarge);
290
- }
291
-
292
- .circular[data-fui-focus-visible] {
293
- border-radius: var(--borderRadiusCircular);
294
- }
295
-
296
- .square[data-fui-focus-visible] {
297
- border-radius: var(--borderRadiusNone);
298
- }
299
-
300
- .iconOnly {
301
- padding: calc(var(--spacingVerticalSNudge) - var(--strokeWidthThin));
302
- min-width: var(--spacingHorizontalXXXL);
303
- max-width: var(--spacingHorizontalXXXL);
304
-
305
- &:where(.small) {
306
- padding: var(--strokeWidthThin);
307
- min-width: var(--spacingHorizontalXXL);
308
- max-width: var(--spacingHorizontalXXL);
309
- }
310
-
311
- &:where(.large) {
312
- padding: calc(var(--spacingVerticalS) - var(--strokeWidthThin));
313
- min-width: calc(var(--spacingHorizontalXL) * 2);
314
- max-width: calc(var(--spacingHorizontalXL) * 2);
315
- }
316
- }
317
-
318
- .icon {
319
- align-items: center;
320
- display: inline-flex;
321
- justify-content: center;
322
- font-size: var(--fontSizeBase500);
323
- height: var(--fontSizeBase500);
324
- width: var(--fontSizeBase500);
325
- --fui-Button__icon--spacing: var(--spacingHorizontalSNudge);
326
- }
327
-
328
- .before {
329
- margin-inline-end: var(--fui-Button__icon--spacing);
330
- }
331
-
332
- .after {
333
- margin-inline-start: var(--fui-Button__icon--spacing);
334
- }
335
-
336
- @media (forced-colors: active) {
337
- .root:focus {
338
- border-color: ButtonText;
339
- }
340
-
341
- .root:hover,
342
- .root:hover:active,
343
- .root:active:focus-visible {
344
- background-color: HighlightText;
345
- border-color: Highlight;
346
- color: Highlight;
347
- forced-color-adjust: none;
348
- }
349
-
350
- .primary {
351
- background-color: Highlight;
352
- border-color: HighlightText;
353
- color: HighlightText;
354
- forced-color-adjust: none;
355
- }
356
-
357
- .primary:hover,
358
- .primary:hover:active,
359
- .primary:active:focus-visible {
360
- background-color: HighlightText;
361
- border-color: Highlight;
362
- color: Highlight;
363
- }
364
-
365
- .subtle:hover,
366
- .subtle:hover:active,
367
- .subtle:active:focus-visible,
368
- .subtle:hover :global(.fui-Button__icon),
369
- .subtle:hover:active :global(.fui-Button__icon),
370
- .subtle:active:focus-visible :global(.fui-Button__icon) {
371
- color: Highlight;
372
- }
373
-
374
- .transparent:hover,
375
- .transparent:hover:active,
376
- .transparent:active:focus-visible {
377
- background-color: var(--colorTransparentBackground);
378
- color: Highlight;
379
- }
380
-
381
- .disabled,
382
- .disabled:hover,
383
- .disabled:hover:active,
384
- .disabled:active:focus-visible {
385
- background-color: ButtonFace;
386
- border-color: GrayText;
387
- color: GrayText;
388
- }
389
-
390
- .disabled:focus {
391
- border-color: GrayText;
392
- }
393
-
394
- .disabled :global(.fui-Button__icon),
395
- .disabled:hover :global(.fui-Button__icon),
396
- .disabled:hover:active :global(.fui-Button__icon),
397
- .disabled:active:focus-visible :global(.fui-Button__icon) {
398
- color: GrayText;
399
- }
400
- }
401
- }
@@ -1,14 +0,0 @@
1
- import { clsx } from "clsx";
2
- import styles from "./Button.module.css";
3
- export const buttonClassNames = {
4
- root: 'fui-Button',
5
- icon: 'fui-Button__icon'
6
- };
7
- export const useButtonStyles_unstable = (state)=>{
8
- const { appearance, disabled, disabledFocusable, icon, iconOnly, iconPosition, shape, size } = state;
9
- state.root.className = clsx(buttonClassNames.root, styles.root, styles[appearance], styles[size], styles[shape], icon && styles.withIcon, (disabled || disabledFocusable) && styles.disabled, iconOnly && styles.iconOnly, state.root.className);
10
- if (state.icon) {
11
- state.icon.className = clsx(buttonClassNames.icon, styles.icon, !!state.root.children && styles[iconPosition], state.icon.className);
12
- }
13
- return state;
14
- };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Button/useButtonStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport styles from './Button.module.css';\nimport type { ButtonSlots, ButtonState } from './Button.types';\n\nexport const buttonClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fui-Button',\n icon: 'fui-Button__icon',\n};\n\nexport const useButtonStyles_unstable = (state: ButtonState): ButtonState => {\n const { appearance, disabled, disabledFocusable, icon, iconOnly, iconPosition, shape, size } = state;\n\n state.root.className = clsx(\n buttonClassNames.root,\n styles.root,\n styles[appearance],\n styles[size],\n styles[shape],\n icon && styles.withIcon,\n (disabled || disabledFocusable) && styles.disabled,\n iconOnly && styles.iconOnly,\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = clsx(\n buttonClassNames.icon,\n styles.icon,\n !!state.root.children && styles[iconPosition],\n state.icon.className,\n );\n }\n\n return state;\n};\n"],"names":["clsx","styles","buttonClassNames","root","icon","useButtonStyles_unstable","state","appearance","disabled","disabledFocusable","iconOnly","iconPosition","shape","size","className","withIcon","children"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAE5B,OAAOC,YAAY,sBAAsB;AAGzC,OAAO,MAAMC,mBAAgD;IAC3DC,MAAM;IACNC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,2BAA2B,CAACC;IACvC,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,iBAAiB,EAAEL,IAAI,EAAEM,QAAQ,EAAEC,YAAY,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP;IAE/FA,MAAMH,IAAI,CAACW,SAAS,GAAGd,KACrBE,iBAAiBC,IAAI,EACrBF,OAAOE,IAAI,EACXF,MAAM,CAACM,WAAW,EAClBN,MAAM,CAACY,KAAK,EACZZ,MAAM,CAACW,MAAM,EACbR,QAAQH,OAAOc,QAAQ,EACvB,AAACP,CAAAA,YAAYC,iBAAgB,KAAMR,OAAOO,QAAQ,EAClDE,YAAYT,OAAOS,QAAQ,EAC3BJ,MAAMH,IAAI,CAACW,SAAS;IAGtB,IAAIR,MAAMF,IAAI,EAAE;QACdE,MAAMF,IAAI,CAACU,SAAS,GAAGd,KACrBE,iBAAiBE,IAAI,EACrBH,OAAOG,IAAI,EACX,CAAC,CAACE,MAAMH,IAAI,CAACa,QAAQ,IAAIf,MAAM,CAACU,aAAa,EAC7CL,MAAMF,IAAI,CAACU,SAAS;IAExB;IAEA,OAAOR;AACT,EAAE"}
@@ -1,14 +0,0 @@
1
- import { clsx } from "clsx";
2
- import styles from "./Button.module.css";
3
- export const buttonClassNames = {
4
- root: 'fui-Button',
5
- icon: 'fui-Button__icon'
6
- };
7
- export const useButtonStyles_unstable = (state)=>{
8
- const { appearance, disabled, disabledFocusable, icon, iconOnly, iconPosition, shape, size } = state;
9
- state.root.className = clsx(buttonClassNames.root, styles.root, styles[appearance], styles[size], styles[shape], icon && styles.withIcon, (disabled || disabledFocusable) && styles.disabled, iconOnly && styles.iconOnly, state.root.className);
10
- if (state.icon) {
11
- state.icon.className = clsx(buttonClassNames.icon, styles.icon, !!state.root.children && styles[iconPosition], state.icon.className);
12
- }
13
- return state;
14
- };
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/Button/useButtonStyles.styles.css.ts"],"sourcesContent":["import { clsx } from 'clsx';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport styles from './Button.module.css';\nimport type { ButtonSlots, ButtonState } from './Button.types';\n\nexport const buttonClassNames: SlotClassNames<ButtonSlots> = {\n root: 'fui-Button',\n icon: 'fui-Button__icon',\n};\n\nexport const useButtonStyles_unstable = (state: ButtonState): ButtonState => {\n const { appearance, disabled, disabledFocusable, icon, iconOnly, iconPosition, shape, size } = state;\n\n state.root.className = clsx(\n buttonClassNames.root,\n styles.root,\n styles[appearance],\n styles[size],\n styles[shape],\n icon && styles.withIcon,\n (disabled || disabledFocusable) && styles.disabled,\n iconOnly && styles.iconOnly,\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = clsx(\n buttonClassNames.icon,\n styles.icon,\n !!state.root.children && styles[iconPosition],\n state.icon.className,\n );\n }\n\n return state;\n};\n"],"names":["clsx","styles","buttonClassNames","root","icon","useButtonStyles_unstable","state","appearance","disabled","disabledFocusable","iconOnly","iconPosition","shape","size","className","withIcon","children"],"mappings":"AAAA,SAASA,IAAI,QAAQ,OAAO;AAE5B,OAAOC,YAAY,sBAAsB;AAGzC,OAAO,MAAMC,mBAAgD;IAC3DC,MAAM;IACNC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,2BAA2B,CAACC;IACvC,MAAM,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,iBAAiB,EAAEL,IAAI,EAAEM,QAAQ,EAAEC,YAAY,EAAEC,KAAK,EAAEC,IAAI,EAAE,GAAGP;IAE/FA,MAAMH,IAAI,CAACW,SAAS,GAAGd,KACrBE,iBAAiBC,IAAI,EACrBF,OAAOE,IAAI,EACXF,MAAM,CAACM,WAAW,EAClBN,MAAM,CAACY,KAAK,EACZZ,MAAM,CAACW,MAAM,EACbR,QAAQH,OAAOc,QAAQ,EACvB,AAACP,CAAAA,YAAYC,iBAAgB,KAAMR,OAAOO,QAAQ,EAClDE,YAAYT,OAAOS,QAAQ,EAC3BJ,MAAMH,IAAI,CAACW,SAAS;IAGtB,IAAIR,MAAMF,IAAI,EAAE;QACdE,MAAMF,IAAI,CAACU,SAAS,GAAGd,KACrBE,iBAAiBE,IAAI,EACrBH,OAAOG,IAAI,EACX,CAAC,CAACE,MAAMH,IAAI,CAACa,QAAQ,IAAIf,MAAM,CAACU,aAAa,EAC7CL,MAAMF,IAAI,CAACU,SAAS;IAExB;IAEA,OAAOR;AACT,EAAE"}