@fluentui/react-tabs 9.74.7-experimental.cli-api.20261006-ccaa611d58.0 → 9.75.0-experimental.css-modules.20261031-810ab07afb.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.
- package/CHANGELOG.md +35 -11
- package/README.md +8 -0
- package/lib/components/Tab/Tab.js.map +1 -1
- package/lib/components/Tab/Tab.module.css +475 -0
- package/lib/components/Tab/Tab.types.js.map +1 -1
- package/lib/components/Tab/TabAnimatedIndicator.module.css +27 -0
- package/lib/components/Tab/index.js.map +1 -1
- package/lib/components/Tab/renderTab.js +2 -2
- package/lib/components/Tab/renderTab.js.map +1 -1
- package/lib/components/Tab/useTab.js.map +1 -1
- package/lib/components/Tab/useTabAnimatedIndicator.styles.css.js +93 -0
- package/lib/components/Tab/useTabAnimatedIndicator.styles.css.js.map +1 -0
- package/lib/components/Tab/useTabAnimatedIndicator.styles.raw.css.js +93 -0
- package/lib/components/Tab/useTabAnimatedIndicator.styles.raw.css.js.map +1 -0
- package/lib/components/Tab/useTabAnimatedIndicator.styles.raw.js.map +1 -1
- package/lib/components/Tab/useTabStyles.styles.css.js +53 -0
- package/lib/components/Tab/useTabStyles.styles.css.js.map +1 -0
- package/lib/components/Tab/useTabStyles.styles.raw.css.js +53 -0
- package/lib/components/Tab/useTabStyles.styles.raw.css.js.map +1 -0
- package/lib/components/Tab/useTabStyles.styles.raw.js.map +1 -1
- package/lib/components/TabList/TabList.js.map +1 -1
- package/lib/components/TabList/TabList.module.css +27 -0
- package/lib/components/TabList/TabList.types.js.map +1 -1
- package/lib/components/TabList/TabListContext.js.map +1 -1
- package/lib/components/TabList/index.js.map +1 -1
- package/lib/components/TabList/renderTabList.js +2 -2
- package/lib/components/TabList/renderTabList.js.map +1 -1
- package/lib/components/TabList/useTabList.js.map +1 -1
- package/lib/components/TabList/useTabListContextValues.js.map +1 -1
- package/lib/components/TabList/useTabListStyles.styles.css.js +12 -0
- package/lib/components/TabList/useTabListStyles.styles.css.js.map +1 -0
- package/lib/components/TabList/useTabListStyles.styles.raw.css.js +12 -0
- package/lib/components/TabList/useTabListStyles.styles.raw.css.js.map +1 -0
- package/lib/components/TabList/useTabListStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/Tab.cjs +12 -12
- package/lib-commonjs/Tab.cjs.map +1 -1
- package/lib-commonjs/TabList.cjs +12 -12
- package/lib-commonjs/TabList.cjs.map +1 -1
- package/lib-commonjs/components/Tab/Tab.cjs.map +1 -1
- package/lib-commonjs/components/Tab/Tab.module.css +475 -0
- package/lib-commonjs/components/Tab/Tab.types.cjs.map +1 -1
- package/lib-commonjs/components/Tab/TabAnimatedIndicator.module.css +27 -0
- package/lib-commonjs/components/Tab/index.cjs +13 -13
- package/lib-commonjs/components/Tab/index.cjs.map +1 -1
- package/lib-commonjs/components/Tab/renderTab.cjs.map +1 -1
- package/lib-commonjs/components/Tab/useTab.cjs +4 -4
- package/lib-commonjs/components/Tab/useTab.cjs.map +1 -1
- package/lib-commonjs/components/Tab/useTabAnimatedIndicator.styles.css.cjs +103 -0
- package/lib-commonjs/components/Tab/useTabAnimatedIndicator.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/Tab/useTabAnimatedIndicator.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Tab/useTabAnimatedIndicator.styles.raw.css.cjs +103 -0
- package/lib-commonjs/components/Tab/useTabAnimatedIndicator.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/Tab/useTabStyles.styles.cjs +7 -7
- package/lib-commonjs/components/Tab/useTabStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/Tab/useTabStyles.styles.css.cjs +82 -0
- package/lib-commonjs/components/Tab/useTabStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/Tab/useTabStyles.styles.raw.cjs +7 -7
- package/lib-commonjs/components/Tab/useTabStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/Tab/useTabStyles.styles.raw.css.cjs +82 -0
- package/lib-commonjs/components/Tab/useTabStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/components/TabList/TabList.cjs.map +1 -1
- package/lib-commonjs/components/TabList/TabList.module.css +27 -0
- package/lib-commonjs/components/TabList/TabList.types.cjs.map +1 -1
- package/lib-commonjs/components/TabList/TabListContext.cjs +4 -4
- package/lib-commonjs/components/TabList/TabListContext.cjs.map +1 -1
- package/lib-commonjs/components/TabList/index.cjs +12 -12
- package/lib-commonjs/components/TabList/index.cjs.map +1 -1
- package/lib-commonjs/components/TabList/renderTabList.cjs.map +1 -1
- package/lib-commonjs/components/TabList/useTabList.cjs +4 -4
- package/lib-commonjs/components/TabList/useTabList.cjs.map +1 -1
- package/lib-commonjs/components/TabList/useTabListContextValues.cjs.map +1 -1
- package/lib-commonjs/components/TabList/useTabListStyles.styles.cjs +3 -3
- package/lib-commonjs/components/TabList/useTabListStyles.styles.cjs.map +1 -1
- package/lib-commonjs/components/TabList/useTabListStyles.styles.css.cjs +29 -0
- package/lib-commonjs/components/TabList/useTabListStyles.styles.css.cjs.map +1 -0
- package/lib-commonjs/components/TabList/useTabListStyles.styles.raw.cjs +3 -3
- package/lib-commonjs/components/TabList/useTabListStyles.styles.raw.cjs.map +1 -1
- package/lib-commonjs/components/TabList/useTabListStyles.styles.raw.css.cjs +29 -0
- package/lib-commonjs/components/TabList/useTabListStyles.styles.raw.css.cjs.map +1 -0
- package/lib-commonjs/index.cjs +22 -22
- package/lib-commonjs/index.cjs.map +1 -1
- package/package.json +14 -14
- package/dist/metadata/api/api-root.json +0 -1
- package/dist/metadata/index.json +0 -1
|
@@ -0,0 +1,475 @@
|
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Tab/Tab.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Any value that identifies a specific tab.\n */\nexport type TabValue = unknown;\n\nexport type TabSlots = {\n /**\n * Root of the component.\n */\n root: Slot<'button'>;\n\n /**\n * Icon that renders before the content.\n */\n icon?: Slot<'span'>;\n\n /**\n * Component children are placed in this slot\n * Avoid using the `children` property in this slot in favour of Component children whenever possible.\n */\n content: NonNullable<Slot<'span'>>;\n};\n\nexport type TabInternalSlots = TabSlots & {\n contentReservedSpace?: Slot<'span'>;\n};\n\n/**\n * Tab Props\n */\nexport type TabProps = Omit<ComponentProps<Partial<TabSlots>>, 'content' | 'value'> &\n Pick<Partial<TabSlots>, 'content'> & {\n /**\n * A tab can be set to disable interaction.\n * @default false\n */\n disabled?: boolean;\n /**\n * The value that identifies this tab when selected.\n */\n value: TabValue;\n };\n\nexport type TabBaseProps = Omit<TabProps, 'contentReservedSpace'>;\n\n/**\n * State used in rendering Tab\n */\nexport type TabState = ComponentState<TabInternalSlots> &\n Pick<TabProps, 'value'> &\n Required<Pick<TabProps, 'disabled'>> & {\n /**\n * A tab supports 'transparent', 'subtle', `subtle-circular` and `filled-circular` appearance.\n */\n appearance?: 'transparent' | 'subtle' | 'subtle-circular' | 'filled-circular';\n\n /**\n * A tab can have only an icon slot filled and no content.\n */\n iconOnly: boolean;\n /**\n * If this tab is selected\n */\n selected: boolean;\n /**\n * When defined, tab content with selected style is rendered hidden to reserve space.\n * This keeps consistent content size between unselected and selected states.\n *\n * @deprecated - use `contentReservedSpace` internal slot instead.\n */\n contentReservedSpaceClassName?: string;\n /**\n * A tab can be either 'small', 'medium', or 'large' size.\n */\n size: 'small' | 'medium' | 'large';\n /**\n * A tab can arrange its content based on if the tabs in the list are arranged vertically.\n */\n vertical: boolean;\n };\n\nexport type TabBaseState = Omit<TabState, 'appearance' | 'size' | 'contentReservedSpace'>;\n"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
}
|
|
@@ -5,44 +5,44 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
function _export(target, all) {
|
|
6
6
|
for(var name in all)Object.defineProperty(target, name, {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: all
|
|
8
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
_export(exports, {
|
|
12
|
-
Tab
|
|
12
|
+
get Tab () {
|
|
13
13
|
return _Tab.Tab;
|
|
14
14
|
},
|
|
15
|
-
renderTab_unstable
|
|
15
|
+
get renderTab_unstable () {
|
|
16
16
|
return _renderTab.renderTab_unstable;
|
|
17
17
|
},
|
|
18
|
-
tabClassNames
|
|
18
|
+
get tabClassNames () {
|
|
19
19
|
return _useTabStylesstyles.tabClassNames;
|
|
20
20
|
},
|
|
21
|
-
tabReservedSpaceClassNames
|
|
21
|
+
get tabReservedSpaceClassNames () {
|
|
22
22
|
return _useTabStylesstyles.tabReservedSpaceClassNames;
|
|
23
23
|
},
|
|
24
|
-
useTabA11yBehavior_unstable
|
|
24
|
+
get useTabA11yBehavior_unstable () {
|
|
25
25
|
return _useTab.useTabA11yBehavior_unstable;
|
|
26
26
|
},
|
|
27
|
-
useTabAnimatedIndicatorStyles_unstable
|
|
27
|
+
get useTabAnimatedIndicatorStyles_unstable () {
|
|
28
28
|
return _useTabAnimatedIndicatorstyles.useTabAnimatedIndicatorStyles_unstable;
|
|
29
29
|
},
|
|
30
|
-
useTabBase_unstable
|
|
30
|
+
get useTabBase_unstable () {
|
|
31
31
|
return _useTab.useTabBase_unstable;
|
|
32
32
|
},
|
|
33
|
-
useTabButtonStyles_unstable
|
|
33
|
+
get useTabButtonStyles_unstable () {
|
|
34
34
|
return _useTabStylesstyles.useTabButtonStyles_unstable;
|
|
35
35
|
},
|
|
36
|
-
useTabContentStyles_unstable
|
|
36
|
+
get useTabContentStyles_unstable () {
|
|
37
37
|
return _useTabStylesstyles.useTabContentStyles_unstable;
|
|
38
38
|
},
|
|
39
|
-
useTabIndicatorStyles_unstable
|
|
39
|
+
get useTabIndicatorStyles_unstable () {
|
|
40
40
|
return _useTabStylesstyles.useTabIndicatorStyles_unstable;
|
|
41
41
|
},
|
|
42
|
-
useTabStyles_unstable
|
|
42
|
+
get useTabStyles_unstable () {
|
|
43
43
|
return _useTabStylesstyles.useTabStyles_unstable;
|
|
44
44
|
},
|
|
45
|
-
useTab_unstable
|
|
45
|
+
get useTab_unstable () {
|
|
46
46
|
return _useTab.useTab_unstable;
|
|
47
47
|
}
|
|
48
48
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Tab/index.ts"],"sourcesContent":["export { Tab } from './Tab';\nexport type { TabInternalSlots, TabBaseProps, TabProps, TabSlots, TabBaseState, TabState, TabValue } from './Tab.types';\nexport { renderTab_unstable } from './renderTab';\nexport { useTab_unstable, useTabBase_unstable, useTabA11yBehavior_unstable } from './useTab';\nexport {\n tabClassNames,\n tabReservedSpaceClassNames,\n useTabButtonStyles_unstable,\n useTabContentStyles_unstable,\n useTabIndicatorStyles_unstable,\n useTabStyles_unstable,\n} from './useTabStyles.styles';\nexport { useTabAnimatedIndicatorStyles_unstable } from './useTabAnimatedIndicator.styles';\n"],"names":["Tab","renderTab_unstable","useTab_unstable","useTabBase_unstable","useTabA11yBehavior_unstable","tabClassNames","tabReservedSpaceClassNames","useTabButtonStyles_unstable","useTabContentStyles_unstable","useTabIndicatorStyles_unstable","useTabStyles_unstable","useTabAnimatedIndicatorStyles_unstable"],"mappings":";;;;;;;;;;;QAASA;uBAAG;;;eAEHC,6BAAkB;;;eAGzBI,iCAAa;;;eACbC,8CAA0B;;;eAHmBF,mCAA2B;;;eASjEO,qEAAsC;;;eATrBR,2BAAmB;;;eAI3CI,+CAA2B;;;eAC3BC,gDAA4B;;;eAC5BC,kDAA8B;;;eAC9BC,yCAAqB;;;eAPdR,uBAAe;;;qBAHJ,WAAQ;2BAEO,iBAAc;wBACiC,cAAW;oCAQtF,2BAAwB;+CACwB,sCAAmC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Tab/renderTab.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\nimport { assertSlots } from '@fluentui/react-utilities';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport type { TabBaseState, TabInternalSlots } from './Tab.types';\n\n/**\n * Render the final JSX of Tab\n */\nexport const renderTab_unstable = (state: TabBaseState): JSXElement => {\n assertSlots<TabInternalSlots>(state);\n\n return (\n <state.root>\n {state.icon && <state.icon />}\n {!state.iconOnly && <state.content />}\n {state.contentReservedSpace && <state.contentReservedSpace />}\n </state.root>\n );\n};\n"],"names":["assertSlots","renderTab_unstable","state","root","icon","iconOnly","content","contentReservedSpace"],"mappings":";;;;+BASaC;;;;;;;gCARb,gDAAiD,GACjD,SAASD,WAAW,QAAQ,4BAA4B;AAOjD,2BAA2B,CAACE;QACjCF,2BAAAA,EAA8BE;IAE9B,OAAA,WAAA,OACE,gBAAA,EAACA,MAAMC,IAAI,EAAA;;YACRD,MAAME,IAAI,IAAA,WAAA,OAAI,eAAA,EAACF,MAAME,IAAI,EAAA,CAAA;YACzB,CAACF,MAAMG,QAAQ,IAAA,WAAA,OAAI,eAAA,EAACH,MAAMI,OAAO,EAAA,CAAA;YACjCJ,MAAMK,oBAAoB,IAAA,WAAA,OAAI,eAAA,EAACL,MAAMK,oBAAoB,EAAA,CAAA;;;AAGhE,EAAE"}
|
|
@@ -6,17 +6,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
function _export(target, all) {
|
|
7
7
|
for(var name in all)Object.defineProperty(target, name, {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: all
|
|
9
|
+
get: Object.getOwnPropertyDescriptor(all, name).get
|
|
10
10
|
});
|
|
11
11
|
}
|
|
12
12
|
_export(exports, {
|
|
13
|
-
useTabA11yBehavior_unstable
|
|
13
|
+
get useTabA11yBehavior_unstable () {
|
|
14
14
|
return useTabA11yBehavior_unstable;
|
|
15
15
|
},
|
|
16
|
-
useTabBase_unstable
|
|
16
|
+
get useTabBase_unstable () {
|
|
17
17
|
return useTabBase_unstable;
|
|
18
18
|
},
|
|
19
|
-
useTab_unstable
|
|
19
|
+
get useTab_unstable () {
|
|
20
20
|
return useTab_unstable;
|
|
21
21
|
}
|
|
22
22
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/Tab/useTab.ts"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { type TabsterDOMAttribute, useTabsterAttributes } from '@fluentui/react-tabster';\nimport { mergeCallbacks, useEventCallback, useMergedRefs, slot, omit } from '@fluentui/react-utilities';\nimport type { TabProps, TabState, TabBaseProps, TabBaseState } from './Tab.types';\nimport { useTabListContext_unstable } from '../TabList';\nimport type { SelectTabEvent } from '../TabList';\n\n/**\n * Create the state required to render Tab.\n *\n * The returned state can be modified with hooks such as useTabStyles_unstable,\n * before being passed to renderTab_unstable.\n *\n * @param props - props from this instance of Tab\n * @param ref - reference to root HTMLElement of Tab\n */\nexport const useTab_unstable = (props: TabProps, ref: React.Ref<HTMLElement>): TabState => {\n const { content } = props;\n\n const state = useTabBase_unstable(props, ref);\n const focusAttributes = useTabA11yBehavior_unstable(state);\n\n const appearance = useTabListContext_unstable(ctx => ctx.appearance);\n const reserveSelectedTabSpace = useTabListContext_unstable(ctx => ctx.reserveSelectedTabSpace);\n const size = useTabListContext_unstable(ctx => ctx.size ?? 'medium');\n\n const contentReservedSpace: typeof content =\n content && typeof content === 'object' ? omit(content, ['ref' as keyof typeof content]) : content;\n\n return {\n ...state,\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n components: { ...state.components, contentReservedSpace: 'span' },\n root: {\n ...focusAttributes,\n ...state.root,\n },\n contentReservedSpace: slot.optional(contentReservedSpace, {\n renderByDefault: !state.selected && !state.iconOnly && reserveSelectedTabSpace,\n defaultProps: { children: props.children },\n elementType: 'span',\n }),\n appearance,\n size,\n };\n};\n\n/**\n * Create the based state required to render Tab without design specifics and focus attributes.\n *\n * @param props - props from this instance of Tab\n * @param ref - reference to root HTMLElement of Tab\n */\nexport const useTabBase_unstable = (props: TabBaseProps, ref: React.Ref<HTMLElement>): TabBaseState => {\n const { content, disabled: tabDisabled = false, icon, onClick, onFocus, value, ...rest } = props;\n\n const selectTabOnFocus = useTabListContext_unstable(ctx => ctx.selectTabOnFocus);\n const listDisabled = useTabListContext_unstable(ctx => ctx.disabled);\n const selected = useTabListContext_unstable(ctx => ctx.selectedValue === value);\n const onRegister = useTabListContext_unstable(ctx => ctx.onRegister);\n const onUnregister = useTabListContext_unstable(ctx => ctx.onUnregister);\n const onSelect = useTabListContext_unstable(ctx => ctx.onSelect);\n const vertical = useTabListContext_unstable(ctx => !!ctx.vertical);\n const disabled = listDisabled || tabDisabled;\n\n const innerRef = React.useRef<HTMLElement>(null);\n const onSelectCallback = (event: SelectTabEvent) => onSelect(event, { value });\n const onTabClick = useEventCallback(mergeCallbacks(onClick, onSelectCallback));\n const onTabFocus = useEventCallback(mergeCallbacks(onFocus, onSelectCallback));\n\n React.useEffect(() => {\n onRegister({\n value,\n ref: innerRef,\n });\n\n return () => {\n onUnregister({ value, ref: innerRef });\n };\n }, [onRegister, onUnregister, innerRef, value]);\n\n const iconSlot = slot.optional(icon, { elementType: 'span' });\n const contentSlot = slot.always(content, {\n defaultProps: { children: props.children },\n elementType: 'span',\n });\n const iconOnly = Boolean(iconSlot?.children && !contentSlot.children);\n return {\n components: { root: 'button', icon: 'span', content: 'span', contentReservedSpace: 'span' },\n root: slot.always(\n {\n ref: useMergedRefs(ref, innerRef),\n role: 'tab',\n type: 'button',\n // aria-selected undefined indicates it is not selectable\n // according to https://www.w3.org/TR/wai-aria-1.1/#aria-selected\n 'aria-selected': disabled ? undefined : (`${selected}` as 'true' | 'false'),\n value,\n ...rest,\n disabled,\n onClick: onTabClick,\n onFocus: selectTabOnFocus ? onTabFocus : onFocus,\n },\n { elementType: 'button' },\n ) as TabBaseState['root'],\n icon: iconSlot,\n iconOnly,\n content: contentSlot,\n disabled,\n selected,\n value,\n vertical,\n };\n};\n\n/**\n * Hook to return a11y attributes to a Tab based on selected state.\n * Should be applied on the button with role=\"tab\".\n *\n * @param selected - whether the Tab is selected\n * @returns Tabster DOM attributes\n */\nexport const useTabA11yBehavior_unstable = ({ selected }: Pick<TabBaseState, 'selected'>): TabsterDOMAttribute => {\n return useTabsterAttributes({\n focusable: { isDefault: selected },\n });\n};\n"],"names":["React","useTabsterAttributes","mergeCallbacks","useEventCallback","useMergedRefs","slot","omit","useTabListContext_unstable","useTab_unstable","props","ref","content","state","useTabBase_unstable","focusAttributes","useTabA11yBehavior_unstable","appearance","ctx","reserveSelectedTabSpace","size","contentReservedSpace","components","root","optional","renderByDefault","selected","iconOnly","defaultProps","children","elementType","disabled","tabDisabled","icon","onClick","onFocus","value","rest","selectTabOnFocus","listDisabled","selectedValue","onRegister","onUnregister","onSelect","vertical","innerRef","useRef","onSelectCallback","event","onTabClick","onTabFocus","useEffect","iconSlot","contentSlot","always","Boolean","role","type","undefined","focusable","isDefault"],"mappings":"AAAA;;;;;;;;;;;;;;;QAuDaa;;;QArCAL;;;;;iEAhBU,QAAQ;8BACgC,0BAA0B;gCACb,4BAA4B;uBAE7D,sBAAa;AAYjD,wBAAwB,CAACC,OAAiBC;IAC/C,MAAM,EAAEC,OAAO,EAAE,GAAGF;IAEpB,MAAMG,QAAQC,oBAAoBJ,OAAOC;IACzC,MAAMI,kBAAkBC,4BAA4BH;IAEpD,MAAMI,iBAAaT,iCAAAA,EAA2BU,CAAAA,MAAOA,IAAID,UAAU;IACnE,MAAME,8BAA0BX,iCAAAA,EAA2BU,CAAAA,MAAOA,IAAIC,uBAAuB;IAC7F,MAAMC,WAAOZ,iCAAAA,EAA2BU,CAAAA;YAAOA;gBAAAA,YAAAA,IAAIE,IAAAA,AAAI,MAAA,QAARF,cAAAA,KAAAA,IAAAA,YAAY;;IAE3D,MAAMG,uBACJT,WAAW,OAAOA,YAAY,eAAWL,oBAAAA,EAAKK,SAAS;QAAC;KAA8B,IAAIA;IAE5F,OAAO;QACL,GAAGC,KAAK;QACR,4DAA4D;QAC5DS,YAAY;YAAE,GAAGT,MAAMS,UAAU;YAAED,sBAAsB;QAAO;QAChEE,MAAM;YACJ,GAAGR,eAAe;YAClB,GAAGF,MAAMU,IAAI;QACf;QACAF,sBAAsBf,oBAAAA,CAAKkB,QAAQ,CAACH,sBAAsB;YACxDI,iBAAiB,CAACZ,MAAMa,QAAQ,IAAI,CAACb,MAAMc,QAAQ,IAAIR;YACvDS,cAAc;gBAAEC,UAAUnB,MAAMmB,QAAQ;YAAC;YACzCC,aAAa;QACf;QACAb;QACAG;IACF;AACF,EAAE;AAQK,4BAA4B,CAACV,OAAqBC;IACvD,MAAM,EAAEC,OAAO,EAAEmB,UAAUC,cAAc,KAAK,EAAEC,IAAI,EAAEC,OAAO,EAAEC,OAAO,EAAEC,KAAK,EAAE,GAAGC,MAAM,GAAG3B;IAE3F,MAAM4B,uBAAmB9B,iCAAAA,EAA2BU,CAAAA,MAAOA,IAAIoB,gBAAgB;IAC/E,MAAMC,mBAAe/B,iCAAAA,EAA2BU,CAAAA,MAAOA,IAAIa,QAAQ;IACnE,MAAML,eAAWlB,iCAAAA,EAA2BU,CAAAA,MAAOA,IAAIsB,aAAa,KAAKJ;IACzE,MAAMK,iBAAajC,iCAAAA,EAA2BU,CAAAA,MAAOA,IAAIuB,UAAU;IACnE,MAAMC,mBAAelC,iCAAAA,EAA2BU,CAAAA,MAAOA,IAAIwB,YAAY;IACvE,MAAMC,eAAWnC,iCAAAA,EAA2BU,CAAAA,MAAOA,IAAIyB,QAAQ;IAC/D,MAAMC,eAAWpC,iCAAAA,EAA2BU,CAAAA,MAAO,CAAC,CAACA,IAAI0B,QAAQ;IACjE,MAAMb,WAAWQ,gBAAgBP;IAEjC,MAAMa,WAAW5C,OAAM6C,MAAM,CAAc;IAC3C,MAAMC,mBAAmB,CAACC,QAA0BL,SAASK,OAAO;YAAEZ;QAAM;IAC5E,MAAMa,iBAAa7C,gCAAAA,EAAiBD,kCAAAA,EAAe+B,SAASa;IAC5D,MAAMG,iBAAa9C,gCAAAA,MAAiBD,8BAAAA,EAAegC,SAASY;IAE5D9C,OAAMkD,SAAS,CAAC;QACdV,WAAW;YACTL;YACAzB,KAAKkC;QACP;QAEA,OAAO;YACLH,aAAa;gBAAEN;gBAAOzB,KAAKkC;YAAS;QACtC;IACF,GAAG;QAACJ;QAAYC;QAAcG;QAAUT;KAAM;IAE9C,MAAMgB,WAAW9C,oBAAAA,CAAKkB,QAAQ,CAACS,MAAM;QAAEH,aAAa;IAAO;IAC3D,MAAMuB,cAAc/C,oBAAAA,CAAKgD,MAAM,CAAC1C,SAAS;QACvCgB,cAAc;YAAEC,UAAUnB,MAAMmB,QAAQ;QAAC;QACzCC,aAAa;IACf;IACA,MAAMH,WAAW4B,QAAQH,CAAAA,aAAAA,QAAAA,aAAAA,KAAAA,IAAAA,KAAAA,IAAAA,SAAUvB,QAAAA,AAAQ,KAAI,CAACwB,YAAYxB,QAAQ;IACpE,OAAO;QACLP,YAAY;YAAEC,MAAM;YAAUU,MAAM;YAAQrB,SAAS;YAAQS,sBAAsB;QAAO;QAC1FE,MAAMjB,oBAAAA,CAAKgD,MAAM,CACf;YACE3C,SAAKN,6BAAAA,EAAcM,KAAKkC;YACxBW,MAAM;YACNC,MAAM;YACN,yDAAyD;YACzD,iEAAiE;YACjE,iBAAiB1B,WAAW2B,YAAa,GAAGhC,UAAU;YACtDU;YACA,GAAGC,IAAI;YACPN;YACAG,SAASe;YACTd,SAASG,mBAAmBY,aAAaf;QAC3C,GACA;YAAEL,aAAa;QAAS;QAE1BG,MAAMmB;QACNzB;QACAf,SAASyC;QACTtB;QACAL;QACAU;QACAQ;IACF;AACF,EAAE;AASK,MAAM5B,8BAA8B,CAAC,EAAEU,QAAQ,EAAkC;IACtF,WAAOxB,kCAAAA,EAAqB;QAC1ByD,WAAW;YAAEC,WAAWlC;QAAS;IACnC;AACF,EAAE"}
|