@fluentui/react-tabs 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 (33) hide show
  1. package/CHANGELOG.md +10 -10
  2. package/README.md +0 -8
  3. package/package.json +9 -12
  4. package/lib/components/Tab/Tab.module.css +0 -475
  5. package/lib/components/Tab/TabAnimatedIndicator.module.css +0 -27
  6. package/lib/components/Tab/useTabAnimatedIndicator.styles.css.js +0 -93
  7. package/lib/components/Tab/useTabAnimatedIndicator.styles.css.js.map +0 -1
  8. package/lib/components/Tab/useTabAnimatedIndicator.styles.raw.css.js +0 -93
  9. package/lib/components/Tab/useTabAnimatedIndicator.styles.raw.css.js.map +0 -1
  10. package/lib/components/Tab/useTabStyles.styles.css.js +0 -53
  11. package/lib/components/Tab/useTabStyles.styles.css.js.map +0 -1
  12. package/lib/components/Tab/useTabStyles.styles.raw.css.js +0 -53
  13. package/lib/components/Tab/useTabStyles.styles.raw.css.js.map +0 -1
  14. package/lib/components/TabList/TabList.module.css +0 -27
  15. package/lib/components/TabList/useTabListStyles.styles.css.js +0 -12
  16. package/lib/components/TabList/useTabListStyles.styles.css.js.map +0 -1
  17. package/lib/components/TabList/useTabListStyles.styles.raw.css.js +0 -12
  18. package/lib/components/TabList/useTabListStyles.styles.raw.css.js.map +0 -1
  19. package/lib-commonjs/components/Tab/Tab.module.css +0 -475
  20. package/lib-commonjs/components/Tab/TabAnimatedIndicator.module.css +0 -27
  21. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.styles.css.cjs +0 -103
  22. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.styles.css.cjs.map +0 -1
  23. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.styles.raw.css.cjs +0 -103
  24. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.styles.raw.css.cjs.map +0 -1
  25. package/lib-commonjs/components/Tab/useTabStyles.styles.css.cjs +0 -82
  26. package/lib-commonjs/components/Tab/useTabStyles.styles.css.cjs.map +0 -1
  27. package/lib-commonjs/components/Tab/useTabStyles.styles.raw.css.cjs +0 -82
  28. package/lib-commonjs/components/Tab/useTabStyles.styles.raw.css.cjs.map +0 -1
  29. package/lib-commonjs/components/TabList/TabList.module.css +0 -27
  30. package/lib-commonjs/components/TabList/useTabListStyles.styles.css.cjs +0 -29
  31. package/lib-commonjs/components/TabList/useTabListStyles.styles.css.cjs.map +0 -1
  32. package/lib-commonjs/components/TabList/useTabListStyles.styles.raw.css.cjs +0 -29
  33. package/lib-commonjs/components/TabList/useTabListStyles.styles.raw.css.cjs.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,22 +1,22 @@
1
1
  # Change Log - @fluentui/react-tabs
2
2
 
3
- <!-- This log was last generated on Sat, 31 Oct 2026 11:08:57 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Tue, 03 Nov 2026 14:18:11 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-tabs_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-tabs_v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0)
8
8
 
9
- Sat, 31 Oct 2026 11:08:57 GMT
9
+ Tue, 03 Nov 2026 14:18:11 GMT
10
10
 
11
11
  ### Changes
12
12
 
13
- - 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)
14
- - Bump @fluentui/react-context-selector to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
15
- - 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)
16
- - 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)
17
- - Bump @fluentui/react-tabster to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
- - Bump @fluentui/react-theme to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
- - Bump @fluentui/react-utilities to v9.75.0-experimental.css-modules.20261031-810ab07afb.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
13
+ - 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)
14
+ - Bump @fluentui/react-context-selector to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
15
+ - 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)
16
+ - 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)
17
+ - Bump @fluentui/react-tabster to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
18
+ - Bump @fluentui/react-theme to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
19
+ - Bump @fluentui/react-utilities to v9.75.1-experimental.positioning-engine.20261103-19efe125d1.0 ([commit](https://github.com/microsoft/fluentui/commit/undefined) by beachball)
20
20
 
21
21
  ## [9.12.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabs_v9.12.6)
22
22
 
package/README.md CHANGED
@@ -68,11 +68,3 @@ See [SPEC.md](./SPEC.md).
68
68
  ### Migration Guide
69
69
 
70
70
  If you're upgrading to Fluent UI v9 see [MIGRATION.md](./MIGRATION.md) for guidance on updating to the latest Link implementation.
71
-
72
- ## Opt-in CSS Modules styles
73
-
74
- Tab animated indicators have layered CSS Modules alternatives beside their Griffel style hooks.
75
- Resolve the relevant `.styles.js` imports to `.styles.css.js` (and source `.styles`
76
- imports to `.styles.css.ts`) only in an explicitly opted-in bundler configuration.
77
- Keep CSS assets and process the headless icon stylesheet in the `fluentui` layer.
78
- The default component imports and Griffel implementations are unchanged.
package/package.json CHANGED
@@ -1,28 +1,25 @@
1
1
  {
2
2
  "name": "@fluentui/react-tabs",
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 tabs components",
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/react-context-selector": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
18
- "@fluentui/react-jsx-runtime": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
19
- "@fluentui/react-shared-contexts": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
20
- "@fluentui/react-tabster": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
21
- "@fluentui/react-theme": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
22
- "@fluentui/react-utilities": "9.75.0-experimental.css-modules.20261031-810ab07afb.0",
15
+ "@fluentui/react-context-selector": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
16
+ "@fluentui/react-jsx-runtime": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
17
+ "@fluentui/react-shared-contexts": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
18
+ "@fluentui/react-tabster": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
19
+ "@fluentui/react-theme": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
20
+ "@fluentui/react-utilities": "9.75.1-experimental.positioning-engine.20261103-19efe125d1.0",
23
21
  "@griffel/react": "^1.5.32",
24
- "@swc/helpers": "^0.5.1",
25
- "clsx": "^2.1.1"
22
+ "@swc/helpers": "^0.5.1"
26
23
  },
27
24
  "peerDependencies": {
28
25
  "@types/react": ">=16.14.0 <20.0.0",
@@ -1,475 +0,0 @@
1
- @layer fluentui {
2
- /* ---- Root: grid wrapper that holds content + pseudo-element indicators ---- */
3
- .root {
4
- align-items: center;
5
- display: grid;
6
- flex-shrink: 0;
7
- grid-auto-flow: column;
8
- grid-template-columns: auto;
9
- grid-template-rows: auto;
10
- outline-style: none;
11
- position: relative;
12
- }
13
-
14
- /* ---- Button: interactive button layered on the root grid ---- */
15
- .button {
16
- align-items: center;
17
- border: none;
18
- border-radius: var(--borderRadiusMedium);
19
- cursor: pointer;
20
- display: grid;
21
- flex-shrink: 0;
22
- grid-auto-flow: column;
23
- grid-template-columns: auto;
24
- grid-template-rows: auto;
25
- font-family: var(--fontFamilyBase);
26
- line-height: var(--lineHeightBase300);
27
- outline-style: none;
28
- position: relative;
29
- overflow: hidden;
30
- text-transform: none;
31
- }
32
-
33
- /* ---- Orientation (also carries default "medium" padding) ---- */
34
- .horizontal {
35
- justify-content: center;
36
- column-gap: var(--spacingHorizontalSNudge);
37
- padding: var(--spacingVerticalM) var(--spacingHorizontalMNudge);
38
- }
39
- .vertical {
40
- justify-content: start;
41
- column-gap: var(--spacingHorizontalSNudge);
42
- padding: var(--spacingVerticalSNudge) var(--spacingHorizontalMNudge);
43
- }
44
-
45
- /* ---- Size × orientation: padding overrides for small/large ---- */
46
- /* medium is the default, covered by .horizontal/.vertical above */
47
- .small.horizontal {
48
- column-gap: var(--spacingHorizontalXXS);
49
- padding: var(--spacingVerticalSNudge) var(--spacingHorizontalSNudge);
50
- }
51
- .small.vertical {
52
- column-gap: var(--spacingHorizontalXXS);
53
- padding: var(--spacingVerticalXXS) var(--spacingHorizontalSNudge);
54
- }
55
- .large.horizontal {
56
- column-gap: var(--spacingHorizontalSNudge);
57
- padding: var(--spacingVerticalL) var(--spacingHorizontalMNudge);
58
- }
59
- .large.vertical {
60
- column-gap: var(--spacingHorizontalSNudge);
61
- padding: var(--spacingVerticalS) var(--spacingHorizontalMNudge);
62
- }
63
-
64
- /* ---- Appearance: transparent ---- */
65
- .transparent {
66
- background-color: var(--colorTransparentBackground);
67
- }
68
- .transparent:enabled:hover {
69
- background-color: var(--colorTransparentBackgroundHover);
70
- }
71
- .transparent:enabled:active {
72
- background-color: var(--colorTransparentBackgroundPressed);
73
- }
74
-
75
- .transparent :global(.fui-Tab__icon),
76
- .transparent :global(.fui-Tab__content) {
77
- color: var(--colorNeutralForeground2);
78
- }
79
- .transparent:enabled:hover :global(.fui-Tab__icon),
80
- .transparent:enabled:hover :global(.fui-Tab__content) {
81
- color: var(--colorNeutralForeground2Hover);
82
- }
83
- .transparent:enabled:active :global(.fui-Tab__icon),
84
- .transparent:enabled:active :global(.fui-Tab__content) {
85
- color: var(--colorNeutralForeground2Pressed);
86
- }
87
-
88
- /* ---- Appearance: subtle ---- */
89
- .subtle {
90
- background-color: var(--colorSubtleBackground);
91
- }
92
- .subtle:enabled:hover {
93
- background-color: var(--colorSubtleBackgroundHover);
94
- }
95
- .subtle:enabled:active {
96
- background-color: var(--colorSubtleBackgroundPressed);
97
- }
98
-
99
- .subtle :global(.fui-Tab__icon),
100
- .subtle :global(.fui-Tab__content) {
101
- color: var(--colorNeutralForeground2);
102
- }
103
- .subtle:enabled:hover :global(.fui-Tab__icon),
104
- .subtle:enabled:hover :global(.fui-Tab__content) {
105
- color: var(--colorNeutralForeground2Hover);
106
- }
107
- .subtle:enabled:active :global(.fui-Tab__icon),
108
- .subtle:enabled:active :global(.fui-Tab__content) {
109
- color: var(--colorNeutralForeground2Pressed);
110
- }
111
-
112
- /* ---- Selected state colors (non-circular only — guarded below by .circularBase reset) ---- */
113
- .selected :global(.fui-Tab__icon) {
114
- color: var(--colorCompoundBrandForeground1);
115
- }
116
- .selected:enabled:hover :global(.fui-Tab__icon) {
117
- color: var(--colorCompoundBrandForeground1Hover);
118
- }
119
- .selected:enabled:active :global(.fui-Tab__icon) {
120
- color: var(--colorCompoundBrandForeground1Pressed);
121
- }
122
-
123
- .selected :global(.fui-Tab__content) {
124
- color: var(--colorNeutralForeground1);
125
- }
126
- .selected:enabled:hover :global(.fui-Tab__content) {
127
- color: var(--colorNeutralForeground1Hover);
128
- }
129
- .selected:enabled:active :global(.fui-Tab__content) {
130
- color: var(--colorNeutralForeground1Pressed);
131
- }
132
-
133
- /* ---- Disabled ---- */
134
- .disabled {
135
- cursor: not-allowed;
136
- background-color: var(--colorTransparentBackground);
137
- }
138
- .disabled :global(.fui-Tab__icon),
139
- .disabled :global(.fui-Tab__content) {
140
- color: var(--colorNeutralForegroundDisabled);
141
- }
142
-
143
- /* ---- Focus indicator ---- */
144
- .focusBase[data-fui-focus-visible] {
145
- border-color: transparent;
146
- outline-width: var(--strokeWidthThick);
147
- outline-color: transparent;
148
- outline-style: solid;
149
- box-shadow: var(--shadow4), 0 0 0 var(--strokeWidthThick) var(--colorStrokeFocus2);
150
- z-index: 1;
151
- }
152
-
153
- .focusCircular[data-fui-focus-visible] {
154
- border-color: transparent;
155
- outline-width: var(--strokeWidthThick);
156
- outline-color: transparent;
157
- outline-style: solid;
158
- box-shadow: var(--shadow4), 0 0 0 var(--strokeWidthThick) var(--colorStrokeFocus2),
159
- 0 0 0 var(--strokeWidthThin) var(--colorNeutralStrokeOnBrand) inset;
160
- z-index: 1;
161
- }
162
-
163
- /* ---- Pending indicator (::before) ---- */
164
- .pendingBase:hover::before,
165
- .pendingBase:active::before {
166
- background-color: var(--colorNeutralStroke1Hover);
167
- border-radius: var(--borderRadiusCircular);
168
- content: '';
169
- position: absolute;
170
- }
171
- .pendingBase:active::before {
172
- background-color: var(--colorNeutralStroke1Pressed);
173
- }
174
-
175
- @media (forced-colors: active) {
176
- .pendingBase:hover::before,
177
- .pendingBase:active::before {
178
- background-color: Highlight;
179
- }
180
- }
181
-
182
- .pendingDisabled:hover::before,
183
- .pendingDisabled:active::before {
184
- background-color: var(--colorTransparentStroke);
185
- }
186
-
187
- @media (forced-colors: active) {
188
- .pendingDisabled:hover::before,
189
- .pendingDisabled:active::before {
190
- background-color: transparent;
191
- }
192
- }
193
-
194
- /* ---- Active indicator (::after) ---- */
195
- .activeBase::after {
196
- background-color: var(--colorTransparentStroke);
197
- border-radius: var(--borderRadiusCircular);
198
- content: '';
199
- position: absolute;
200
- }
201
- .activeSelected::after {
202
- background-color: var(--colorCompoundBrandStroke);
203
- }
204
- .activeSelected:enabled:hover::after {
205
- background-color: var(--colorCompoundBrandStrokeHover);
206
- }
207
- .activeSelected:enabled:active::after {
208
- background-color: var(--colorCompoundBrandStrokePressed);
209
- }
210
-
211
- @media (forced-colors: active) {
212
- .activeSelected::after,
213
- .activeSelected:enabled:hover::after,
214
- .activeSelected:enabled:active::after {
215
- background-color: ButtonText;
216
- }
217
- }
218
-
219
- .activeDisabled::after {
220
- background-color: var(--colorNeutralForegroundDisabled);
221
- }
222
-
223
- /* ---- Indicator positions: compound size × orientation selectors ---- */
224
- /* Pending (::before) and active (::after) share the same geometry — handled together. */
225
-
226
- /* Medium + horizontal (default via .horizontal baseline; small/large override below) */
227
- .horizontal.pendingBase::before,
228
- .horizontal.activeBase::after {
229
- bottom: 0;
230
- height: var(--strokeWidthThicker);
231
- left: var(--spacingHorizontalM);
232
- right: var(--spacingHorizontalM);
233
- }
234
- /* Medium + vertical */
235
- .vertical.pendingBase::before,
236
- .vertical.activeBase::after {
237
- bottom: var(--spacingVerticalS);
238
- inset-inline-start: 0;
239
- top: var(--spacingVerticalS);
240
- width: var(--strokeWidthThicker);
241
- }
242
- /* Small + horizontal */
243
- .small.horizontal.pendingBase::before,
244
- .small.horizontal.activeBase::after {
245
- bottom: 0;
246
- height: var(--strokeWidthThick);
247
- left: var(--spacingHorizontalSNudge);
248
- right: var(--spacingHorizontalSNudge);
249
- }
250
- /* Small + vertical */
251
- .small.vertical.pendingBase::before,
252
- .small.vertical.activeBase::after {
253
- bottom: var(--spacingVerticalXS);
254
- inset-inline-start: 0;
255
- top: var(--spacingVerticalXS);
256
- width: var(--strokeWidthThicker);
257
- }
258
- /* Large + horizontal: same geometry as medium, no override needed */
259
- /* Large + vertical */
260
- .large.vertical.pendingBase::before,
261
- .large.vertical.activeBase::after {
262
- bottom: var(--spacingVerticalMNudge);
263
- inset-inline-start: 0;
264
- top: var(--spacingVerticalMNudge);
265
- width: var(--strokeWidthThicker);
266
- }
267
-
268
- /* ---- Circular appearance base ---- */
269
- .circularBase {
270
- border-radius: var(--borderRadiusCircular);
271
- border: solid var(--strokeWidthThin) var(--colorTransparentStroke);
272
- }
273
-
274
- /* Reset selected icon/content colors inherited from non-circular .selected rules */
275
- .circularBase :global(.fui-Tab__icon),
276
- .circularBase :global(.fui-Tab__content) {
277
- color: inherit;
278
- }
279
-
280
- /* Circular size padding: compound with .small/.large on the same button element */
281
- .circularBase {
282
- padding-block: calc(var(--spacingVerticalSNudge) - var(--strokeWidthThin));
283
- }
284
- .circularBase.small {
285
- padding-block: calc(var(--spacingVerticalXXS) - var(--strokeWidthThin));
286
- }
287
- .circularBase.large {
288
- padding-block: calc(var(--spacingVerticalS) - var(--strokeWidthThin));
289
- }
290
-
291
- /* ---- Subtle-circular appearance ---- */
292
- .subtleCircular {
293
- background-color: var(--colorSubtleBackground);
294
- color: var(--colorNeutralForeground2);
295
- }
296
- .subtleCircular:enabled:hover {
297
- background-color: var(--colorSubtleBackgroundHover);
298
- border: solid var(--strokeWidthThin) var(--colorNeutralStroke1Hover);
299
- color: var(--colorNeutralForeground2Hover);
300
- }
301
- .subtleCircular:enabled:active {
302
- background-color: var(--colorSubtleBackgroundPressed);
303
- border: solid var(--strokeWidthThin) var(--colorNeutralStroke1Pressed);
304
- color: var(--colorNeutralForeground2Pressed);
305
- }
306
- @media (forced-colors: active) {
307
- .subtleCircular {
308
- border: solid var(--strokeWidthThin) Canvas;
309
- }
310
- }
311
-
312
- /* selected, disabled: compound — CSS handles combinations, hook applies orthogonal classes */
313
- .subtleCircular.selected {
314
- background-color: var(--colorBrandBackground2);
315
- border: solid var(--strokeWidthThin) var(--colorCompoundBrandStroke);
316
- color: var(--colorBrandForeground2);
317
- }
318
- .subtleCircular.selected:enabled:hover {
319
- background-color: var(--colorBrandBackground2Hover);
320
- border: solid var(--strokeWidthThin) var(--colorCompoundBrandStrokeHover);
321
- color: var(--colorBrandForeground2Hover);
322
- }
323
- .subtleCircular.selected:enabled:active {
324
- background-color: var(--colorBrandBackground2Pressed);
325
- border: solid var(--strokeWidthThin) var(--colorCompoundBrandStrokePressed);
326
- color: var(--colorBrandForeground2Pressed);
327
- }
328
- @media (forced-colors: active) {
329
- .subtleCircular.selected {
330
- border: solid var(--strokeWidthThin) Highlight;
331
- }
332
- }
333
-
334
- .subtleCircular.disabled {
335
- background-color: var(--colorSubtleBackground);
336
- color: var(--colorNeutralForegroundDisabled);
337
- }
338
- .subtleCircular.selected.disabled {
339
- background-color: var(--colorNeutralBackgroundDisabled);
340
- border: solid var(--strokeWidthThin) var(--colorNeutralStrokeDisabled);
341
- color: var(--colorNeutralForegroundDisabled);
342
- }
343
-
344
- /* ---- Filled-circular appearance ---- */
345
- .filledCircular {
346
- background-color: var(--colorNeutralBackground3);
347
- color: var(--colorNeutralForeground2);
348
- }
349
- .filledCircular:enabled:hover {
350
- background-color: var(--colorNeutralBackground3Hover);
351
- color: var(--colorNeutralForeground2Hover);
352
- }
353
- .filledCircular:enabled:active {
354
- background-color: var(--colorNeutralBackground3Pressed);
355
- color: var(--colorNeutralForeground2Pressed);
356
- }
357
-
358
- @media (forced-colors: active) {
359
- .filledCircular:enabled:hover {
360
- background-color: Highlight;
361
- forced-color-adjust: none;
362
- }
363
- .filledCircular:enabled:hover :global(.fui-Tab__content),
364
- .filledCircular:enabled:hover :global(.fui-Icon-filled),
365
- .filledCircular:enabled:hover :global(.fui-Icon-regular) {
366
- color: HighlightText;
367
- }
368
- }
369
-
370
- .filledCircular.selected {
371
- background-color: var(--colorBrandBackground);
372
- color: var(--colorNeutralForegroundOnBrand);
373
- }
374
- .filledCircular.selected:enabled:hover {
375
- background-color: var(--colorBrandBackgroundHover);
376
- color: var(--colorNeutralForegroundOnBrand);
377
- }
378
- .filledCircular.selected:enabled:active {
379
- background-color: var(--colorBrandBackgroundPressed);
380
- color: var(--colorNeutralForegroundOnBrand);
381
- }
382
-
383
- @media (forced-colors: active) {
384
- .filledCircular.selected:enabled {
385
- background-color: ButtonText;
386
- }
387
- .filledCircular.selected:enabled :global(.fui-Tab__content) {
388
- color: ButtonFace;
389
- forced-color-adjust: none;
390
- }
391
- .filledCircular.selected:enabled :global(.fui-Tab__icon) {
392
- color: ButtonFace;
393
- }
394
- }
395
-
396
- .filledCircular.disabled {
397
- background-color: var(--colorNeutralBackgroundDisabled);
398
- color: var(--colorNeutralForegroundDisabled);
399
- }
400
- .filledCircular.selected.disabled {
401
- background-color: var(--colorNeutralBackgroundDisabled);
402
- border: solid var(--strokeWidthThin) var(--colorNeutralStrokeDisabled);
403
- color: var(--colorNeutralForegroundDisabled);
404
- }
405
-
406
- /* ---- Icon slot ---- */
407
- .icon {
408
- grid-column-start: 1;
409
- grid-row-start: 1;
410
- align-items: center;
411
- display: inline-flex;
412
- justify-content: center;
413
- overflow: hidden;
414
- font-size: 20px;
415
- height: 20px;
416
- width: 20px;
417
- }
418
-
419
- .icon :global(.fui-Icon-filled) {
420
- display: none;
421
- }
422
- .icon :global(.fui-Icon-regular) {
423
- display: inline;
424
- }
425
-
426
- /* Large tab: bigger icon via descendant selector from the button's .large class */
427
- .large :global(.fui-Tab__icon) {
428
- font-size: 24px;
429
- height: 24px;
430
- width: 24px;
431
- }
432
-
433
- /* Selected state: swap to filled icon variant */
434
- .selected :global(.fui-Tab__icon) :global(.fui-Icon-filled) {
435
- display: inline;
436
- }
437
- .selected :global(.fui-Tab__icon) :global(.fui-Icon-regular) {
438
- display: none;
439
- }
440
-
441
- /* ---- Content slot ---- */
442
- .content {
443
- overflow: hidden;
444
- padding: 0 var(--spacingHorizontalXXS);
445
- font-family: var(--fontFamilyBase);
446
- font-size: var(--fontSizeBase300);
447
- font-weight: var(--fontWeightRegular);
448
- line-height: var(--lineHeightBase300);
449
- }
450
-
451
- /* Selected: semibold (body1Strong). Applies to all tabs including circular. */
452
- .selected :global(.fui-Tab__content) {
453
- font-weight: var(--fontWeightSemibold);
454
- }
455
-
456
- /* Large: bigger font (body2 / subtitle2) via descendant from button's .large class */
457
- .large .content {
458
- font-size: var(--fontSizeBase400);
459
- line-height: var(--lineHeightBase400);
460
- }
461
-
462
- .contentNoIconBefore {
463
- grid-column-start: 1;
464
- grid-row-start: 1;
465
- }
466
- .contentIconBefore {
467
- grid-column-start: 2;
468
- grid-row-start: 1;
469
- }
470
-
471
- .contentPlaceholder {
472
- visibility: hidden;
473
- font-weight: var(--fontWeightSemibold);
474
- }
475
- }
@@ -1,27 +0,0 @@
1
- @layer fluentui {
2
- .base {
3
- overflow: visible;
4
- }
5
- .animated::after {
6
- transition-property: transform;
7
- transition-duration: var(--durationSlow);
8
- transition-timing-function: var(--curveDecelerateMax);
9
- }
10
- .horizontal::after {
11
- transform-origin: left;
12
- transform: translateX(var(--fui-Tab__indicator--offset)) scaleX(var(--fui-Tab__indicator--scale));
13
- }
14
- :global([dir='rtl']) .horizontal::after {
15
- transform-origin: right;
16
- }
17
- .vertical::after {
18
- transform-origin: top;
19
- transform: translateY(var(--fui-Tab__indicator--offset)) scaleY(var(--fui-Tab__indicator--scale));
20
- }
21
- @media (prefers-reduced-motion: reduce) {
22
- .animated::after {
23
- transition-property: none;
24
- transition-duration: 0.01ms;
25
- }
26
- }
27
- }
@@ -1,93 +0,0 @@
1
- 'use client';
2
- import * as React from "react";
3
- import { clsx } from "clsx";
4
- import styles from "./TabAnimatedIndicator.module.css";
5
- import { useTabListContext_unstable } from "../TabList/TabListContext.js";
6
- import { useAnimationFrame } from "@fluentui/react-utilities";
7
- // eslint-disable-next-line @typescript-eslint/naming-convention
8
- const tabIndicatorCssVars_unstable = {
9
- offsetVar: '--fui-Tab__indicator--offset',
10
- scaleVar: '--fui-Tab__indicator--scale'
11
- };
12
- const calculateTabRect = (element)=>{
13
- if (element) {
14
- var _element_parentElement;
15
- const parentRect = ((_element_parentElement = element.parentElement) === null || _element_parentElement === void 0 ? void 0 : _element_parentElement.getBoundingClientRect()) || {
16
- x: 0,
17
- y: 0,
18
- width: 0,
19
- height: 0
20
- };
21
- const tabRect = element.getBoundingClientRect();
22
- return {
23
- x: tabRect.x - parentRect.x,
24
- y: tabRect.y - parentRect.y,
25
- width: tabRect.width,
26
- height: tabRect.height
27
- };
28
- }
29
- return undefined;
30
- };
31
- const getRegisteredTabRect = (registeredTabs, value)=>{
32
- var _registeredTabs_JSON_stringify;
33
- const element = isValueDefined(value) ? (_registeredTabs_JSON_stringify = registeredTabs[JSON.stringify(value)]) === null || _registeredTabs_JSON_stringify === void 0 ? void 0 : _registeredTabs_JSON_stringify.ref.current : undefined;
34
- return element ? calculateTabRect(element) : undefined;
35
- };
36
- // eslint-disable-next-line eqeqeq
37
- const isValueDefined = (value)=>value != null;
38
- /**
39
- * Adds additional styling to the active tab selection indicator to create a sliding animation.
40
- */ export const useTabAnimatedIndicatorStyles_unstable = (state)=>{
41
- const { disabled, selected, vertical } = state;
42
- const [lastAnimatedFrom, setLastAnimatedFrom] = React.useState();
43
- const [animationValues, setAnimationValues] = React.useState({
44
- offset: 0,
45
- scale: 1
46
- });
47
- const getRegisteredTabs = useTabListContext_unstable((ctx)=>ctx.getRegisteredTabs);
48
- const [requestAnimationFrame] = useAnimationFrame();
49
- if (selected) {
50
- const { previousSelectedValue, selectedValue, registeredTabs } = getRegisteredTabs();
51
- if (isValueDefined(previousSelectedValue) && lastAnimatedFrom !== previousSelectedValue) {
52
- const previousSelectedTabRect = getRegisteredTabRect(registeredTabs, previousSelectedValue);
53
- const selectedTabRect = getRegisteredTabRect(registeredTabs, selectedValue);
54
- if (selectedTabRect && previousSelectedTabRect) {
55
- const offset = vertical ? previousSelectedTabRect.y - selectedTabRect.y : previousSelectedTabRect.x - selectedTabRect.x;
56
- const scale = vertical ? previousSelectedTabRect.height / selectedTabRect.height : previousSelectedTabRect.width / selectedTabRect.width;
57
- setAnimationValues({
58
- offset,
59
- scale
60
- });
61
- setLastAnimatedFrom(previousSelectedValue);
62
- // Reset the animation values after the animation is complete
63
- requestAnimationFrame(()=>setAnimationValues({
64
- offset: 0,
65
- scale: 1
66
- }));
67
- }
68
- }
69
- } else if (isValueDefined(lastAnimatedFrom)) {
70
- // need to clear the last animated from so that if this tab is selected again
71
- // from the same previous tab as last time, that animation still happens.
72
- setLastAnimatedFrom(undefined);
73
- }
74
- // do not apply any animation if the tab is disabled
75
- if (disabled) {
76
- return state;
77
- }
78
- // the animation should only happen as the selection indicator returns to its
79
- // original position and not when set at the previous tabs position.
80
- const animating = animationValues.offset === 0 && animationValues.scale === 1;
81
- // eslint-disable-next-line react-hooks/immutability
82
- state.root.className = clsx(selected && styles.base, selected && animating && styles.animated, selected && styles[vertical ? 'vertical' : 'horizontal'], state.root.className);
83
- const rootCssVars = {
84
- [tabIndicatorCssVars_unstable.offsetVar]: `${animationValues.offset}px`,
85
- [tabIndicatorCssVars_unstable.scaleVar]: `${animationValues.scale}`
86
- };
87
- // eslint-disable-next-line react-hooks/immutability
88
- state.root.style = {
89
- ...rootCssVars,
90
- ...state.root.style
91
- };
92
- return state;
93
- };