@fluentui/react-tabs 9.0.0-beta.9 → 9.0.0-rc.2
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.json +236 -6
- package/CHANGELOG.md +73 -10
- package/dist/{react-tabs.d.ts → index.d.ts} +46 -51
- package/{lib → dist}/tsdoc-metadata.json +0 -0
- package/lib/components/Tab/Tab.types.js.map +1 -1
- package/lib/components/Tab/useTab.js +3 -0
- package/lib/components/Tab/useTab.js.map +1 -1
- package/lib/components/Tab/useTabAnimatedIndicator.js +6 -6
- package/lib/components/Tab/useTabAnimatedIndicator.js.map +1 -1
- package/lib/components/Tab/useTabStyles.js +114 -176
- package/lib/components/Tab/useTabStyles.js.map +1 -1
- package/lib/components/TabList/TabList.types.js.map +1 -1
- package/lib/components/TabList/useTabList.js +2 -1
- package/lib/components/TabList/useTabList.js.map +1 -1
- package/lib/components/TabList/useTabListStyles.js +9 -2
- package/lib/components/TabList/useTabListStyles.js.map +1 -1
- package/lib-commonjs/components/Tab/useTab.js +3 -0
- package/lib-commonjs/components/Tab/useTab.js.map +1 -1
- package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js +7 -7
- package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js.map +1 -1
- package/lib-commonjs/components/Tab/useTabStyles.js +113 -176
- package/lib-commonjs/components/Tab/useTabStyles.js.map +1 -1
- package/lib-commonjs/components/TabList/useTabList.js +2 -1
- package/lib-commonjs/components/TabList/useTabList.js.map +1 -1
- package/lib-commonjs/components/TabList/useTabListStyles.js +9 -2
- package/lib-commonjs/components/TabList/useTabListStyles.js.map +1 -1
- package/package.json +11 -11
- package/lib/Tab.d.ts +0 -1
- package/lib/TabList.d.ts +0 -1
- package/lib/components/Tab/Tab.d.ts +0 -6
- package/lib/components/Tab/Tab.types.d.ts +0 -61
- package/lib/components/Tab/index.d.ts +0 -6
- package/lib/components/Tab/renderTab.d.ts +0 -5
- package/lib/components/Tab/useTab.d.ts +0 -12
- package/lib/components/Tab/useTabAnimatedIndicator.d.ts +0 -5
- package/lib/components/Tab/useTabStyles.d.ts +0 -8
- package/lib/components/TabList/TabList.d.ts +0 -6
- package/lib/components/TabList/TabList.types.d.ts +0 -104
- package/lib/components/TabList/TabListContext.d.ts +0 -3
- package/lib/components/TabList/index.d.ts +0 -5
- package/lib/components/TabList/renderTabList.d.ts +0 -5
- package/lib/components/TabList/useTabList.d.ts +0 -12
- package/lib/components/TabList/useTabListContextValues.d.ts +0 -2
- package/lib/components/TabList/useTabListStyles.d.ts +0 -8
- package/lib/index.d.ts +0 -4
- package/lib/tab.constants.d.ts +0 -62
- package/lib/tab.constants.js +0 -68
- package/lib/tab.constants.js.map +0 -1
- package/lib-commonjs/Tab.d.ts +0 -1
- package/lib-commonjs/TabList.d.ts +0 -1
- package/lib-commonjs/components/Tab/Tab.d.ts +0 -6
- package/lib-commonjs/components/Tab/Tab.types.d.ts +0 -61
- package/lib-commonjs/components/Tab/index.d.ts +0 -6
- package/lib-commonjs/components/Tab/renderTab.d.ts +0 -5
- package/lib-commonjs/components/Tab/useTab.d.ts +0 -12
- package/lib-commonjs/components/Tab/useTabAnimatedIndicator.d.ts +0 -5
- package/lib-commonjs/components/Tab/useTabStyles.d.ts +0 -8
- package/lib-commonjs/components/TabList/TabList.d.ts +0 -6
- package/lib-commonjs/components/TabList/TabList.types.d.ts +0 -104
- package/lib-commonjs/components/TabList/TabListContext.d.ts +0 -3
- package/lib-commonjs/components/TabList/index.d.ts +0 -5
- package/lib-commonjs/components/TabList/renderTabList.d.ts +0 -5
- package/lib-commonjs/components/TabList/useTabList.d.ts +0 -12
- package/lib-commonjs/components/TabList/useTabListContextValues.d.ts +0 -2
- package/lib-commonjs/components/TabList/useTabListStyles.d.ts +0 -8
- package/lib-commonjs/index.d.ts +0 -4
- package/lib-commonjs/tab.constants.d.ts +0 -62
- package/lib-commonjs/tab.constants.js +0 -75
- package/lib-commonjs/tab.constants.js.map +0 -1
|
@@ -11,8 +11,6 @@ const react_tabster_1 = /*#__PURE__*/require("@fluentui/react-tabster");
|
|
|
11
11
|
|
|
12
12
|
const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
|
|
13
13
|
|
|
14
|
-
const tab_constants_1 = /*#__PURE__*/require("../../tab.constants");
|
|
15
|
-
|
|
16
14
|
const useTabAnimatedIndicator_1 = /*#__PURE__*/require("./useTabAnimatedIndicator");
|
|
17
15
|
|
|
18
16
|
exports.tabClassNames = {
|
|
@@ -44,8 +42,11 @@ const useRootStyles = /*#__PURE__*/react_1.__styles({
|
|
|
44
42
|
"Bn0qgzm": "fqdk4by",
|
|
45
43
|
"ibv6hh": ["f1rvrf73", "f1358rze"],
|
|
46
44
|
"Bceei9c": "f1k6fduh",
|
|
47
|
-
"mc9l5x": "
|
|
48
|
-
"
|
|
45
|
+
"mc9l5x": "f13qh94s",
|
|
46
|
+
"Bnnss6s": "fi64zpg",
|
|
47
|
+
"Bxotwcr": "f1u07yai",
|
|
48
|
+
"Budl1dq": "frn2hmy",
|
|
49
|
+
"wkccdc": "f1olsevy",
|
|
49
50
|
"Bahqtrf": "fk6fouc",
|
|
50
51
|
"Bg96gwp": "f1i3iumi",
|
|
51
52
|
"oeaueh": "f1s6fcnf",
|
|
@@ -54,36 +55,39 @@ const useRootStyles = /*#__PURE__*/react_1.__styles({
|
|
|
54
55
|
"Bmxbyg5": "f1sil6mw",
|
|
55
56
|
"B9bfxx9": "f1cxpek8"
|
|
56
57
|
},
|
|
58
|
+
"horizontal": {
|
|
59
|
+
"Brf1p80": "f4d9j23"
|
|
60
|
+
},
|
|
61
|
+
"vertical": {
|
|
62
|
+
"Brf1p80": "f1s9ku6b"
|
|
63
|
+
},
|
|
57
64
|
"mediumHorizontal": {
|
|
58
|
-
"i8kkvl": "
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"uwmqm3": ["frdkuqy", "f81rol6"]
|
|
65
|
+
"i8kkvl": "f1rjii52",
|
|
66
|
+
"z8tnut": "f5yzyt",
|
|
67
|
+
"z189sj": ["f11gcy0p", "f1ng84yb"],
|
|
68
|
+
"Byoj8tv": "fx3omr",
|
|
69
|
+
"uwmqm3": ["f1ng84yb", "f11gcy0p"]
|
|
64
70
|
},
|
|
65
71
|
"mediumVertical": {
|
|
66
|
-
"i8kkvl": "
|
|
67
|
-
"
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
71
|
-
"Byoj8tv": "f1d7kygh",
|
|
72
|
-
"uwmqm3": ["frdkuqy", "f81rol6"]
|
|
72
|
+
"i8kkvl": "f1rjii52",
|
|
73
|
+
"z8tnut": "fp2oml8",
|
|
74
|
+
"z189sj": ["f11gcy0p", "f1ng84yb"],
|
|
75
|
+
"Byoj8tv": "f1tdddsa",
|
|
76
|
+
"uwmqm3": ["f1ng84yb", "f11gcy0p"]
|
|
73
77
|
},
|
|
74
78
|
"smallHorizontal": {
|
|
75
|
-
"i8kkvl": "
|
|
76
|
-
"z8tnut": "
|
|
77
|
-
"z189sj": ["
|
|
78
|
-
"Byoj8tv": "
|
|
79
|
-
"uwmqm3": ["
|
|
79
|
+
"i8kkvl": "f14mj54c",
|
|
80
|
+
"z8tnut": "fp2oml8",
|
|
81
|
+
"z189sj": ["fdw0yi8", "fk8j09s"],
|
|
82
|
+
"Byoj8tv": "f1tdddsa",
|
|
83
|
+
"uwmqm3": ["fk8j09s", "fdw0yi8"]
|
|
80
84
|
},
|
|
81
85
|
"smallVertical": {
|
|
82
|
-
"i8kkvl": "
|
|
83
|
-
"z8tnut": "
|
|
84
|
-
"z189sj": ["
|
|
85
|
-
"Byoj8tv": "
|
|
86
|
-
"uwmqm3": ["
|
|
86
|
+
"i8kkvl": "f14mj54c",
|
|
87
|
+
"z8tnut": "fclwglc",
|
|
88
|
+
"z189sj": ["fdw0yi8", "fk8j09s"],
|
|
89
|
+
"Byoj8tv": "fywfov9",
|
|
90
|
+
"uwmqm3": ["fk8j09s", "fdw0yi8"]
|
|
87
91
|
},
|
|
88
92
|
"transparent": {
|
|
89
93
|
"De3pzq": "f1c21dwh",
|
|
@@ -122,7 +126,7 @@ const useRootStyles = /*#__PURE__*/react_1.__styles({
|
|
|
122
126
|
"a4hkcw": "fhklyu5"
|
|
123
127
|
}
|
|
124
128
|
}, {
|
|
125
|
-
"d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fwhevhj{border-top-color:none;}", ".f61n433{border-right-color:none;}", ".f1q8l70w{border-left-color:none;}", ".fv1dfc8{border-bottom-color:none;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".fre7gi1{border-top-width:0;}", ".f1358rze{border-right-width:0;}", ".f1rvrf73{border-left-width:0;}", ".fqdk4by{border-bottom-width:0;}", ".f1k6fduh{cursor:pointer;}", ".
|
|
129
|
+
"d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".fwhevhj{border-top-color:none;}", ".f61n433{border-right-color:none;}", ".f1q8l70w{border-left-color:none;}", ".fv1dfc8{border-bottom-color:none;}", ".f1aa9q02{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f16jpd5f{border-bottom-left-radius:var(--borderRadiusMedium);}", ".f1jar5jt{border-top-right-radius:var(--borderRadiusMedium);}", ".fyu767a{border-top-left-radius:var(--borderRadiusMedium);}", ".fre7gi1{border-top-width:0;}", ".f1358rze{border-right-width:0;}", ".f1rvrf73{border-left-width:0;}", ".fqdk4by{border-bottom-width:0;}", ".f1k6fduh{cursor:pointer;}", ".f13qh94s{display:grid;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f1u07yai{grid-auto-flow:column;}", ".frn2hmy{grid-template-columns:auto;}", ".f1olsevy{grid-template-rows:auto;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1s6fcnf{outline-style:none;}", ".f10pi13n{position:relative;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f1cxpek8{text-transform:none;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1s9ku6b{-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:start;justify-content:start;}", ".f1rjii52{-webkit-column-gap:var(--spacingHorizontalSNudge);column-gap:var(--spacingHorizontalSNudge);}", ".f5yzyt{padding-top:var(--spacingVerticalM);}", ".f11gcy0p{padding-right:var(--spacingHorizontalMNudge);}", ".f1ng84yb{padding-left:var(--spacingHorizontalMNudge);}", ".fx3omr{padding-bottom:var(--spacingVerticalM);}", ".fp2oml8{padding-top:var(--spacingVerticalSNudge);}", ".f1tdddsa{padding-bottom:var(--spacingVerticalSNudge);}", ".f14mj54c{-webkit-column-gap:var(--spacingHorizontalXXS);column-gap:var(--spacingHorizontalXXS);}", ".fdw0yi8{padding-right:var(--spacingHorizontalSNudge);}", ".fk8j09s{padding-left:var(--spacingHorizontalSNudge);}", ".fclwglc{padding-top:var(--spacingVerticalXXS);}", ".fywfov9{padding-bottom:var(--spacingVerticalXXS);}", ".f1c21dwh{background-color:var(--colorTransparentBackground);}", ".fmmjozx .fui-Tab__icon{color:var(--colorNeutralForeground2);}", ".fpkze5g .fui-Tab__content{color:var(--colorNeutralForeground2);}", ".fhovq9v{background-color:var(--colorSubtleBackground);}", ".fato7r6 .fui-Tab__icon{color:var(--colorNeutralForegroundDisabled);}", ".fao1bnu .fui-Tab__content{color:var(--colorNeutralForegroundDisabled);}", ".fdrzuqr{cursor:not-allowed;}", ".f1cadz5z .fui-Tab__icon{color:var(--colorCompoundBrandForeground1);}", ".ffplhdr .fui-Tab__content{color:var(--colorNeutralForeground1);}"],
|
|
126
130
|
"h": [".fjxutwb:hover{background-color:var(--colorTransparentBackgroundHover);}", ".f1mfqf41:hover .fui-Tab__icon{color:var(--colorNeutralForeground2Hover);}", ".f149wc3x:hover .fui-Tab__content{color:var(--colorNeutralForeground2Hover);}", ".f1t94bn6:hover{background-color:var(--colorSubtleBackgroundHover);}", ".f1ck17l:hover .fui-Tab__icon{color:var(--colorCompoundBrandForeground1Hover);}", ".ffth601:hover .fui-Tab__content{color:var(--colorNeutralForeground1Hover);}"],
|
|
127
131
|
"a": [".fophhak:active{background-color:var(--colorTransparentBackgroundPressed);}", ".f10aiid4:active .fui-Tab__icon{color:var(--colorNeutralForeground2Pressed);}", ".fjioou7:active .fui-Tab__content{color:var(--colorNeutralForeground2Pressed);}", ".f1wfn5kd:active{background-color:var(--colorSubtleBackgroundPressed);}", ".f42ak0g:active .fui-Tab__icon{color:var(--colorCompoundBrandForeground1Pressed);}", ".fhklyu5:active .fui-Tab__content{color:var(--colorNeutralForeground1Pressed);}"]
|
|
128
132
|
});
|
|
@@ -155,178 +159,109 @@ const useFocusStyles = /*#__PURE__*/react_1.__styles({
|
|
|
155
159
|
|
|
156
160
|
const usePendingIndicatorStyles = /*#__PURE__*/react_1.__styles({
|
|
157
161
|
"base": {
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
"
|
|
163
|
-
"
|
|
164
|
-
"
|
|
165
|
-
"
|
|
166
|
-
"
|
|
167
|
-
"
|
|
168
|
-
"
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
"
|
|
172
|
-
"
|
|
173
|
-
"
|
|
174
|
-
"Br1f9q3": "f1ppf73u",
|
|
175
|
-
"Bh9m8uq": "fkgvshs",
|
|
176
|
-
"f79n2v": ["f9ce8dc", "f1m8imsn"],
|
|
177
|
-
"zvkrb6": "fxkorn8",
|
|
178
|
-
"y3supe": ["f1m8imsn", "f9ce8dc"],
|
|
179
|
-
"Bcbdomo": "f1bb2bd5",
|
|
180
|
-
"gg7wqr": ["fyhhhxy", "flt5dqy"],
|
|
181
|
-
"Ixc8c": "fw019zk",
|
|
182
|
-
"B1ltu2w": ["flt5dqy", "fyhhhxy"],
|
|
183
|
-
"B2yjemk": ["f7c36j8", "f1tzhx6f"],
|
|
184
|
-
"Bph9bk4": ["f1tzhx6f", "f7c36j8"],
|
|
185
|
-
"utwc0c": ["f15ne2sm", "f18vik6r"],
|
|
186
|
-
"B5rxhlh": ["f18vik6r", "f15ne2sm"],
|
|
187
|
-
"Bseepjv": "f2sk4z1",
|
|
188
|
-
"Iy3360": "frq4ova",
|
|
189
|
-
"Dlf1w5": "f416fxa"
|
|
162
|
+
"az7l2e": "fhw179n",
|
|
163
|
+
"Bv4n3vi": ["f10y1uxy", "f6aiuy0"],
|
|
164
|
+
"vqofr": ["f6aiuy0", "f10y1uxy"],
|
|
165
|
+
"B0uxbk8": ["f1kfpfnu", "f1dx5wco"],
|
|
166
|
+
"Bgqb9hq": ["f1dx5wco", "f1kfpfnu"],
|
|
167
|
+
"amg5m6": "f1kmhr4c",
|
|
168
|
+
"zkfqfm": "fl1ydde",
|
|
169
|
+
"Bkydozb": "f1y7maxz",
|
|
170
|
+
"vzq8l0": ["f105swax", "fscdmel"],
|
|
171
|
+
"Bka2azo": ["fscdmel", "f105swax"],
|
|
172
|
+
"Br4ovkg": ["f1tkcw1w", "f1u11x8o"],
|
|
173
|
+
"csmgbd": ["f1u11x8o", "f1tkcw1w"],
|
|
174
|
+
"y36c18": "f16cxu0",
|
|
175
|
+
"B1ctymy": "f1nwgacf",
|
|
176
|
+
"Bgvrrv0": "f15ovonk",
|
|
177
|
+
"ddr6p5": "fvje46l"
|
|
190
178
|
},
|
|
191
179
|
"disabled": {
|
|
192
|
-
"
|
|
193
|
-
"
|
|
194
|
-
"pnx8oc": "f5s0kyi",
|
|
195
|
-
"Btzsvkb": ["fgjfpko", "f1ojwtdc"],
|
|
196
|
-
"Bcbdomo": "f1dodv9r",
|
|
197
|
-
"gg7wqr": ["f1shuycv", "f19t3g6y"],
|
|
198
|
-
"Ixc8c": "f6psttw",
|
|
199
|
-
"B1ltu2w": ["f19t3g6y", "f1shuycv"]
|
|
180
|
+
"az7l2e": "f1ut20fw",
|
|
181
|
+
"Bkydozb": "fhrzcfn"
|
|
200
182
|
},
|
|
201
183
|
"mediumHorizontal": {
|
|
202
|
-
"
|
|
203
|
-
"
|
|
204
|
-
"
|
|
205
|
-
"
|
|
206
|
-
"Bcasopp": ["f1ro2kyx", "f1cquro8"],
|
|
207
|
-
"Bbc2r3f": "fvqq5f6",
|
|
208
|
-
"Byque4d": ["frssmbg", "fxzecjq"],
|
|
209
|
-
"qd6xl9": ["fxzecjq", "frssmbg"]
|
|
184
|
+
"lawp4y": "fchca7p",
|
|
185
|
+
"Baz25je": "f1s2r9ax",
|
|
186
|
+
"Fbdkly": ["f1o0nnkk", "fxb7rol"],
|
|
187
|
+
"mdwyqc": ["fxb7rol", "f1o0nnkk"]
|
|
210
188
|
},
|
|
211
189
|
"mediumVertical": {
|
|
212
|
-
"
|
|
213
|
-
"
|
|
214
|
-
"
|
|
215
|
-
"
|
|
216
|
-
"Bcasopp": ["f1ro2kyx", "f1cquro8"],
|
|
217
|
-
"Byque4d": ["f1t0u0az", "fmlx6bj"],
|
|
218
|
-
"Bf8kmfk": "f1itw4t3",
|
|
219
|
-
"Bdn98qo": "f1382oex"
|
|
190
|
+
"lawp4y": "f17jracn",
|
|
191
|
+
"Fbdkly": ["f1fzr1x6", "f1f351id"],
|
|
192
|
+
"Bciustq": "f117lcb2",
|
|
193
|
+
"Ccq8qp": "f1aij3q"
|
|
220
194
|
},
|
|
221
195
|
"smallHorizontal": {
|
|
222
|
-
"
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"
|
|
226
|
-
"Bcasopp": ["f1uj4yfi", "f14ip387"],
|
|
227
|
-
"Bbc2r3f": "f1y1nr8p",
|
|
228
|
-
"Byque4d": ["f1i98inn", "fadekk3"],
|
|
229
|
-
"qd6xl9": ["fadekk3", "f1i98inn"]
|
|
196
|
+
"lawp4y": "fchca7p",
|
|
197
|
+
"Baz25je": "f1r53b5e",
|
|
198
|
+
"Fbdkly": ["f1s6rxz5", "fo35v8s"],
|
|
199
|
+
"mdwyqc": ["fo35v8s", "f1s6rxz5"]
|
|
230
200
|
},
|
|
231
201
|
"smallVertical": {
|
|
232
|
-
"
|
|
233
|
-
"
|
|
234
|
-
"
|
|
235
|
-
"
|
|
236
|
-
"Bcasopp": ["f1ro2kyx", "f1cquro8"],
|
|
237
|
-
"Byque4d": ["f1t0u0az", "fmlx6bj"],
|
|
238
|
-
"Bf8kmfk": "f1q0qvio",
|
|
239
|
-
"Bdn98qo": "f1382oex"
|
|
202
|
+
"lawp4y": "fze4zud",
|
|
203
|
+
"Fbdkly": ["f1fzr1x6", "f1f351id"],
|
|
204
|
+
"Bciustq": "fdp32p8",
|
|
205
|
+
"Ccq8qp": "f1aij3q"
|
|
240
206
|
}
|
|
241
207
|
}, {
|
|
242
|
-
"h": [".
|
|
243
|
-
"a": [".
|
|
244
|
-
"
|
|
208
|
+
"h": [".fhw179n:hover::before{background-color:var(--colorNeutralStroke1Hover);}", ".f10y1uxy:hover::before{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f6aiuy0:hover::before{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1kfpfnu:hover::before{border-top-right-radius:var(--borderRadiusCircular);}", ".f1dx5wco:hover::before{border-top-left-radius:var(--borderRadiusCircular);}", ".f1kmhr4c:hover::before{content:\"\";}", ".fl1ydde:hover::before{position:absolute;}", ".f1ut20fw:hover::before{background-color:var(--colorTransparentStroke);}"],
|
|
209
|
+
"a": [".f1y7maxz:active::before{background-color:var(--colorNeutralStroke1Pressed);}", ".f105swax:active::before{border-bottom-right-radius:var(--borderRadiusCircular);}", ".fscdmel:active::before{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1tkcw1w:active::before{border-top-right-radius:var(--borderRadiusCircular);}", ".f1u11x8o:active::before{border-top-left-radius:var(--borderRadiusCircular);}", ".f16cxu0:active::before{content:\"\";}", ".f1nwgacf:active::before{position:absolute;}", ".fhrzcfn:active::before{background-color:var(--colorTransparentStroke);}"],
|
|
210
|
+
"t": ["@media (forced-colors: active){.f15ovonk:hover::before{background-color:Highlight;}}", "@media (forced-colors: active){.fvje46l:active::before{background-color:Highlight;}}"],
|
|
211
|
+
"d": [".fchca7p::before{bottom:0;}", ".f1s2r9ax::before{height:var(--strokeWidthThicker);}", ".f1o0nnkk::before{left:var(--spacingHorizontalM);}", ".fxb7rol::before{right:var(--spacingHorizontalM);}", ".f17jracn::before{bottom:var(--spacingVerticalS);}", ".f1fzr1x6::before{left:0;}", ".f1f351id::before{right:0;}", ".f117lcb2::before{top:var(--spacingVerticalS);}", ".f1aij3q::before{width:var(--strokeWidthThicker);}", ".f1r53b5e::before{height:var(--strokeWidthThick);}", ".f1s6rxz5::before{left:var(--spacingHorizontalSNudge);}", ".fo35v8s::before{right:var(--spacingHorizontalSNudge);}", ".fze4zud::before{bottom:var(--spacingVerticalXS);}", ".fdp32p8::before{top:var(--spacingVerticalXS);}"]
|
|
245
212
|
});
|
|
246
213
|
|
|
247
214
|
const useActiveIndicatorStyles = /*#__PURE__*/react_1.__styles({
|
|
248
215
|
"base": {
|
|
249
|
-
"
|
|
250
|
-
"
|
|
251
|
-
"
|
|
252
|
-
"
|
|
253
|
-
"
|
|
254
|
-
"
|
|
255
|
-
"
|
|
256
|
-
"
|
|
257
|
-
"frdscb": ["fc4gh2t", "flndy84"],
|
|
258
|
-
"B9nohqn": ["flndy84", "fc4gh2t"],
|
|
259
|
-
"B1dhsta": ["fxgx2h0", "fh20ihy"],
|
|
260
|
-
"Bjdmjzx": ["fh20ihy", "fxgx2h0"],
|
|
261
|
-
"oqd9ik": "ffdc0f3",
|
|
262
|
-
"Bs6t6z0": "fqc6z8f",
|
|
263
|
-
"Hdbjpj": "f11ef69",
|
|
264
|
-
"Bunff0j": "fs357bs"
|
|
216
|
+
"Bjyk6c5": "f1rp0jgh",
|
|
217
|
+
"B3778ie": ["fprarqb", "f14vs0nd"],
|
|
218
|
+
"d9w3h3": ["f14vs0nd", "fprarqb"],
|
|
219
|
+
"Bl18szs": ["f1gtfqs9", "f18zvfd9"],
|
|
220
|
+
"B4j8arr": ["f18zvfd9", "f1gtfqs9"],
|
|
221
|
+
"Bsft5z2": "f13zj6fq",
|
|
222
|
+
"E3zdtr": "f1mdlcz9",
|
|
223
|
+
"t2ki1e": "ffmd2fr"
|
|
265
224
|
},
|
|
266
225
|
"selected": {
|
|
267
|
-
"
|
|
268
|
-
"
|
|
269
|
-
"
|
|
270
|
-
"
|
|
271
|
-
"
|
|
272
|
-
"
|
|
273
|
-
"Bkmnrzr": "f16a8na0",
|
|
274
|
-
"jjqiyg": ["f10rdlzq", "fz4itc5"],
|
|
275
|
-
"wo4o56": "fn9ghnu",
|
|
276
|
-
"Bm7x6ru": ["faeqx0n", "fyxlcfc"],
|
|
277
|
-
"id6p2d": "f1i10yqr",
|
|
278
|
-
"obzwb3": ["fyxlcfc", "faeqx0n"]
|
|
226
|
+
"Bjyk6c5": "f1ksivud",
|
|
227
|
+
"Glksuk": "f1eytvvh",
|
|
228
|
+
"Blzl0y7": "fuaa9s",
|
|
229
|
+
"f7digc": "fy7ktjt",
|
|
230
|
+
"Biqphg1": "f16tp0gf",
|
|
231
|
+
"Bntoloa": "fj0yp7j"
|
|
279
232
|
},
|
|
280
233
|
"disabled": {
|
|
281
|
-
"
|
|
282
|
-
"B13j16c": ["f1sie595", "f68ecio"],
|
|
283
|
-
"Bk8j60v": "f17l895u",
|
|
284
|
-
"Bpbi4o9": ["f68ecio", "f1sie595"]
|
|
234
|
+
"Bjyk6c5": "f13lkzet"
|
|
285
235
|
},
|
|
286
236
|
"mediumHorizontal": {
|
|
287
|
-
"
|
|
288
|
-
"
|
|
289
|
-
"
|
|
290
|
-
"
|
|
291
|
-
"exdlgl": ["f18ezp6p", "f6x7jdz"],
|
|
292
|
-
"mpb1vu": "f11eg72r",
|
|
293
|
-
"jc51t6": ["fohqjvh", "f3if56i"],
|
|
294
|
-
"cnmfks": ["f3if56i", "fohqjvh"]
|
|
237
|
+
"By385i5": "fo72kxq",
|
|
238
|
+
"Dlnsje": "f1vx7lu8",
|
|
239
|
+
"Eqx8gd": ["fna7m5n", "f1oxpfwv"],
|
|
240
|
+
"B1piin3": ["f1oxpfwv", "fna7m5n"]
|
|
295
241
|
},
|
|
296
242
|
"mediumVertical": {
|
|
297
|
-
"
|
|
298
|
-
"
|
|
299
|
-
"
|
|
300
|
-
"
|
|
301
|
-
"exdlgl": ["f18ezp6p", "f6x7jdz"],
|
|
302
|
-
"jc51t6": ["f1cvlmu2", "f15lyva8"],
|
|
303
|
-
"u6d25": "f1lbpgiz",
|
|
304
|
-
"Biobvvw": "fqauqbq"
|
|
243
|
+
"By385i5": "fipylg0",
|
|
244
|
+
"Eqx8gd": ["f1n6gb5g", "f15yvnhg"],
|
|
245
|
+
"bn5sak": "fqchiol",
|
|
246
|
+
"a2br6o": "f1o25lip"
|
|
305
247
|
},
|
|
306
248
|
"smallHorizontal": {
|
|
307
|
-
"
|
|
308
|
-
"
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
"exdlgl": ["f11og0us", "fyhqs13"],
|
|
312
|
-
"mpb1vu": "f4hj4m7",
|
|
313
|
-
"jc51t6": ["f1i8k3s6", "fy447wy"],
|
|
314
|
-
"cnmfks": ["fy447wy", "f1i8k3s6"]
|
|
249
|
+
"By385i5": "fo72kxq",
|
|
250
|
+
"Dlnsje": "f9bb2ob",
|
|
251
|
+
"Eqx8gd": ["f1q70ajw", "f18rbzdx"],
|
|
252
|
+
"B1piin3": ["f18rbzdx", "f1q70ajw"]
|
|
315
253
|
},
|
|
316
254
|
"smallVertical": {
|
|
317
|
-
"
|
|
318
|
-
"
|
|
319
|
-
"
|
|
320
|
-
"
|
|
321
|
-
"exdlgl": ["f18ezp6p", "f6x7jdz"],
|
|
322
|
-
"jc51t6": ["f1cvlmu2", "f15lyva8"],
|
|
323
|
-
"u6d25": "f1vmyuyf",
|
|
324
|
-
"Biobvvw": "fqauqbq"
|
|
255
|
+
"By385i5": "fqbue9b",
|
|
256
|
+
"Eqx8gd": ["f1n6gb5g", "f15yvnhg"],
|
|
257
|
+
"bn5sak": "fk1klkt",
|
|
258
|
+
"a2br6o": "f1o25lip"
|
|
325
259
|
}
|
|
326
260
|
}, {
|
|
327
|
-
"d": [".
|
|
328
|
-
"h": [".
|
|
329
|
-
"a": [".
|
|
261
|
+
"d": [".f1rp0jgh::after{background-color:var(--colorTransparentStroke);}", ".fprarqb::after{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f14vs0nd::after{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1gtfqs9::after{border-top-right-radius:var(--borderRadiusCircular);}", ".f18zvfd9::after{border-top-left-radius:var(--borderRadiusCircular);}", ".f13zj6fq::after{content:\"\";}", ".f1mdlcz9::after{position:absolute;}", ".ffmd2fr::after{z-index:1;}", ".f1ksivud::after{background-color:var(--colorCompoundBrandStroke);}", ".f13lkzet::after{background-color:var(--colorNeutralForegroundDisabled);}", ".fo72kxq::after{bottom:0;}", ".f1vx7lu8::after{height:var(--strokeWidthThicker);}", ".fna7m5n::after{left:var(--spacingHorizontalM);}", ".f1oxpfwv::after{right:var(--spacingHorizontalM);}", ".fipylg0::after{bottom:var(--spacingVerticalS);}", ".f1n6gb5g::after{left:0;}", ".f15yvnhg::after{right:0;}", ".fqchiol::after{top:var(--spacingVerticalS);}", ".f1o25lip::after{width:var(--strokeWidthThicker);}", ".f9bb2ob::after{height:var(--strokeWidthThick);}", ".f1q70ajw::after{left:var(--spacingHorizontalSNudge);}", ".f18rbzdx::after{right:var(--spacingHorizontalSNudge);}", ".fqbue9b::after{bottom:var(--spacingVerticalXS);}", ".fk1klkt::after{top:var(--spacingVerticalXS);}"],
|
|
262
|
+
"h": [".f1eytvvh:hover::after{background-color:var(--colorCompoundBrandStrokeHover);}"],
|
|
263
|
+
"a": [".fuaa9s:active::after{background-color:var(--colorCompoundBrandStrokePressed);}"],
|
|
264
|
+
"t": ["@media (forced-colors: active){.fy7ktjt::after{background-color:ButtonText;}}", "@media (forced-colors: active){.f16tp0gf:hover::after{background-color:ButtonText;}}", "@media (forced-colors: active){.fj0yp7j:active::after{background-color:ButtonText;}}"]
|
|
330
265
|
});
|
|
331
266
|
/**
|
|
332
267
|
* Styles for the icon slot.
|
|
@@ -361,23 +296,25 @@ const useIconStyles = /*#__PURE__*/react_1.__styles({
|
|
|
361
296
|
|
|
362
297
|
const useContentStyles = /*#__PURE__*/react_1.__styles({
|
|
363
298
|
"base": {
|
|
299
|
+
"Bahqtrf": "fk6fouc",
|
|
364
300
|
"Be2twd7": "fkhj508",
|
|
365
301
|
"Bhrd7zp": "figsok6",
|
|
366
302
|
"Bg96gwp": "f1i3iumi",
|
|
367
303
|
"B68tc82": "f1p9o1ba",
|
|
368
304
|
"Bmxbyg5": "f1sil6mw",
|
|
369
|
-
"z8tnut": "
|
|
370
|
-
"z189sj": ["
|
|
371
|
-
"Byoj8tv": "
|
|
372
|
-
"uwmqm3": ["
|
|
305
|
+
"z8tnut": "fztplxc",
|
|
306
|
+
"z189sj": ["ffczdla", "fgiv446"],
|
|
307
|
+
"Byoj8tv": "f9g1xly",
|
|
308
|
+
"uwmqm3": ["fgiv446", "ffczdla"]
|
|
373
309
|
},
|
|
374
310
|
"selected": {
|
|
311
|
+
"Bahqtrf": "fk6fouc",
|
|
375
312
|
"Be2twd7": "fkhj508",
|
|
376
313
|
"Bhrd7zp": "fl43uef",
|
|
377
314
|
"Bg96gwp": "f1i3iumi"
|
|
378
315
|
}
|
|
379
316
|
}, {
|
|
380
|
-
"d": [".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".
|
|
317
|
+
"d": [".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".fztplxc{padding-top:var(--spacingVerticalNone);}", ".ffczdla{padding-right:var(--spacingHorizontalXXS);}", ".fgiv446{padding-left:var(--spacingHorizontalXXS);}", ".f9g1xly{padding-bottom:var(--spacingVerticalNone);}", ".fl43uef{font-weight:var(--fontWeightSemibold);}"]
|
|
381
318
|
});
|
|
382
319
|
/**
|
|
383
320
|
* Apply styling to the Tab slots based on the state
|
|
@@ -398,7 +335,7 @@ const useTabStyles_unstable = state => {
|
|
|
398
335
|
size,
|
|
399
336
|
vertical
|
|
400
337
|
} = state;
|
|
401
|
-
state.root.className = react_1.mergeClasses(exports.tabClassNames.root, rootStyles.base, size !== 'small' && (vertical ? rootStyles.mediumVertical : rootStyles.mediumHorizontal), size === 'small' && (vertical ? rootStyles.smallVertical : rootStyles.smallHorizontal), focusStyles.base, !disabled && appearance === 'subtle' && rootStyles.subtle, !disabled && appearance === 'transparent' && rootStyles.transparent, !disabled && selected && rootStyles.selected, disabled && rootStyles.disabled, // pending indicator (before pseudo element)
|
|
338
|
+
state.root.className = react_1.mergeClasses(exports.tabClassNames.root, rootStyles.base, vertical ? rootStyles.vertical : rootStyles.horizontal, size !== 'small' && (vertical ? rootStyles.mediumVertical : rootStyles.mediumHorizontal), size === 'small' && (vertical ? rootStyles.smallVertical : rootStyles.smallHorizontal), focusStyles.base, !disabled && appearance === 'subtle' && rootStyles.subtle, !disabled && appearance === 'transparent' && rootStyles.transparent, !disabled && selected && rootStyles.selected, disabled && rootStyles.disabled, // pending indicator (before pseudo element)
|
|
402
339
|
pendingIndicatorStyles.base, size !== 'small' && (vertical ? pendingIndicatorStyles.mediumVertical : pendingIndicatorStyles.mediumHorizontal), size === 'small' && (vertical ? pendingIndicatorStyles.smallVertical : pendingIndicatorStyles.smallHorizontal), disabled && pendingIndicatorStyles.disabled, // active indicator (after pseudo element)
|
|
403
340
|
selected && activeIndicatorStyles.base, selected && !disabled && activeIndicatorStyles.selected, selected && size !== 'small' && (vertical ? activeIndicatorStyles.mediumVertical : activeIndicatorStyles.mediumHorizontal), selected && size === 'small' && (vertical ? activeIndicatorStyles.smallVertical : activeIndicatorStyles.smallHorizontal), selected && disabled && activeIndicatorStyles.disabled, state.root.className);
|
|
404
341
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/Tab/useTabStyles.ts"],"names":[],"mappings":";;;;;;;AAEA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,qBAAA,CAAA;;AAOA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEa,OAAA,CAAA,aAAA,GAA0C;AACrD,EAAA,IAAI,EAAE,SAD+C;AAErD,EAAA,IAAI,EAAE,eAF+C;AAGrD,EAAA,OAAO,EAAE;AAH4C,CAA1C,C,CAMb;;AACa,OAAA,CAAA,YAAA,GAAe,OAAA,CAAA,aAAA,CAAc,IAA7B;AAEb;;AAEG;;AACH;;AACA,MAAM,aAAa,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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I,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,OAAA,CAAA,aAAA,CAAc,IAA3B,EAAiC,UAAU,CAAC,IAA5C,EAAkD,UAAU,CAAC,IAAD,CAA5D,EAAoE,KAAK,CAAC,IAAN,CAAW,SAA/E,CAAvB;AACD;;AAED,EAAA,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,OAAA,CAAA,YAAA,CACxB,OAAA,CAAA,aAAA,CAAc,OADU,EAExB,aAAa,CAAC,IAFU,EAGxB,QAAQ,IAAI,aAAa,CAAC,QAHF,EAIxB,KAAK,CAAC,OAAN,CAAc,SAJU,CAA1B;AAOA,EAAA,yBAAA,CAAA,sCAAA,CAAuC,KAAvC;AAEA,SAAO,KAAP;AACD,CAtDM;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourcesContent":["import type { TabSlots, TabState } from './Tab.types';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens } from '@fluentui/react-theme';\nimport {\n pendingContentSizeTokens,\n pendingSpacingTokens,\n tabIndicatorPadding,\n tabIndicatorStrokeWidths,\n} from '../../tab.constants';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTabAnimatedIndicatorStyles_unstable } from './useTabAnimatedIndicator';\n\nexport const tabClassNames: SlotClassNames<TabSlots> = {\n root: 'fui-Tab',\n icon: 'fui-Tab__icon',\n content: 'fui-Tab__content',\n};\n\n// TODO temporary export to pass conformance test.\nexport const tabClassName = tabClassNames.root;\n\n/**\n * Styles for the root slot\n */\n/* eslint-disable @typescript-eslint/naming-convention */\nconst useRootStyles = makeStyles({\n base: {\n alignItems: 'center',\n ...shorthands.borderColor('none'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ...shorthands.borderWidth(0),\n cursor: 'pointer',\n display: 'flex',\n flexDirection: 'row',\n fontFamily: tokens.fontFamilyBase,\n lineHeight: tokens.lineHeightBase300,\n outlineStyle: 'none',\n position: 'relative',\n ...shorthands.overflow('hidden'),\n textTransform: 'none',\n },\n mediumHorizontal: {\n columnGap: pendingSpacingTokens.sNudge,\n justifyContent: 'center',\n ...shorthands.padding(pendingSpacingTokens.m, pendingSpacingTokens.mNudge),\n },\n mediumVertical: {\n columnGap: pendingSpacingTokens.sNudge,\n justifyContent: 'flex-start',\n minWidth: '120px',\n ...shorthands.padding(pendingSpacingTokens.sNudge, pendingSpacingTokens.mNudge),\n },\n smallHorizontal: {\n columnGap: pendingSpacingTokens.xxs,\n ...shorthands.padding(pendingSpacingTokens.sNudge, pendingSpacingTokens.sNudge),\n },\n smallVertical: {\n columnGap: pendingSpacingTokens.xxs,\n ...shorthands.padding(pendingSpacingTokens.xxs, pendingSpacingTokens.sNudge),\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n },\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n },\n '& .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2,\n },\n ':hover .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2Pressed,\n },\n '& .fui-Tab__content': {\n color: tokens.colorNeutralForeground2,\n },\n ':hover .fui-Tab__content': {\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active .fui-Tab__content': {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n },\n '& .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2,\n },\n ':hover .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2Pressed,\n },\n '& .fui-Tab__content': {\n color: tokens.colorNeutralForeground2,\n },\n ':hover .fui-Tab__content': {\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active .fui-Tab__content': {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n disabled: {\n backgroundColor: tokens.colorTransparentBackground,\n\n '& .fui-Tab__icon': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n '& .fui-Tab__content': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n cursor: 'not-allowed',\n },\n selected: {\n '& .fui-Tab__icon': {\n color: tokens.colorCompoundBrandForeground1,\n },\n ':hover .fui-Tab__icon': {\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n ':active .fui-Tab__icon': {\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n '& .fui-Tab__content': {\n color: tokens.colorNeutralForeground1,\n },\n ':hover .fui-Tab__content': {\n color: tokens.colorNeutralForeground1Hover,\n },\n ':active .fui-Tab__content': {\n color: tokens.colorNeutralForeground1Pressed,\n },\n },\n});\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/**\n * Focus styles for the root slot\n */\nconst useFocusStyles = makeStyles({\n // Tab creates a custom focus indicator because the default focus indicator\n // is applied using an :after pseudo-element on the root. Since the selection\n // indicator uses an :after pseudo-element on the root, there is a conflict.\n base: createCustomFocusIndicatorStyle({\n ...shorthands.borderColor('transparent'),\n outlineWidth: tokens.strokeWidthThick,\n outlineColor: 'transparent',\n outlineStyle: 'solid',\n boxShadow: `\n ${tokens.shadow4},\n 0 0 0 ${tokens.strokeWidthThick} ${tokens.colorStrokeFocus2}\n `,\n zIndex: 1,\n }),\n});\n\n/** Indicator styles for when pending selection */\nconst usePendingIndicatorStyles = makeStyles({\n base: {\n ':hover:before': {\n backgroundColor: 'none',\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderColor(tokens.colorNeutralStroke1Hover),\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n },\n ':active:before': {\n backgroundColor: 'none',\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed),\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n },\n },\n disabled: {\n ':hover:before': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n ':active:before': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n },\n },\n mediumHorizontal: {\n ':before': {\n bottom: 0,\n ...shorthands.borderWidth(`calc(${tabIndicatorStrokeWidths.mediumHorizontal} / 2.0)`),\n height: tabIndicatorStrokeWidths.mediumHorizontal,\n left: tabIndicatorPadding.mediumHorizontal,\n right: tabIndicatorPadding.mediumHorizontal,\n },\n },\n mediumVertical: {\n ':before': {\n bottom: tabIndicatorPadding.mediumVertical,\n ...shorthands.borderWidth(`calc(${tabIndicatorStrokeWidths.mediumVertical} / 2.0)`),\n left: 0,\n top: tabIndicatorPadding.mediumVertical,\n width: tabIndicatorStrokeWidths.mediumVertical,\n },\n },\n smallHorizontal: {\n ':before': {\n bottom: 0,\n ...shorthands.borderWidth(`calc(${tabIndicatorStrokeWidths.smallHorizontal} / 2.0)`),\n height: tabIndicatorStrokeWidths.smallHorizontal,\n left: tabIndicatorPadding.smallHorizontal,\n right: tabIndicatorPadding.smallHorizontal,\n },\n },\n smallVertical: {\n ':before': {\n bottom: tabIndicatorPadding.smallVertical,\n ...shorthands.borderWidth(`calc(${tabIndicatorStrokeWidths.smallVertical} / 2.0)`),\n left: 0,\n top: tabIndicatorPadding.smallVertical,\n width: tabIndicatorStrokeWidths.smallVertical,\n },\n },\n});\n\nconst useActiveIndicatorStyles = makeStyles({\n base: {\n ':after': {\n ...shorthands.borderColor(tokens.colorTransparentStroke),\n ...shorthands.borderStyle('solid'),\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n zIndex: 1,\n },\n },\n selected: {\n ':after': {\n ...shorthands.borderColor(tokens.colorCompoundBrandStroke),\n },\n ':hover:after': {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokeHover),\n },\n ':active:after': {\n ...shorthands.borderColor(tokens.colorCompoundBrandStrokePressed),\n },\n },\n disabled: {\n ':after': {\n ...shorthands.borderColor(tokens.colorNeutralForegroundDisabled),\n },\n },\n mediumHorizontal: {\n ':after': {\n bottom: '0',\n ...shorthands.borderWidth(`calc(${tabIndicatorStrokeWidths.mediumHorizontal} / 2.0)`),\n height: tabIndicatorStrokeWidths.mediumHorizontal,\n left: tabIndicatorPadding.mediumHorizontal,\n right: tabIndicatorPadding.mediumHorizontal,\n },\n },\n mediumVertical: {\n ':after': {\n bottom: tabIndicatorPadding.mediumVertical,\n ...shorthands.borderWidth(`calc(${tabIndicatorStrokeWidths.mediumVertical} / 2.0)`),\n left: 0,\n top: tabIndicatorPadding.mediumVertical,\n width: tabIndicatorStrokeWidths.mediumVertical,\n },\n },\n smallHorizontal: {\n ':after': {\n bottom: 0,\n ...shorthands.borderWidth(`calc(${tabIndicatorStrokeWidths.smallHorizontal} / 2.0)`),\n height: tabIndicatorStrokeWidths.smallHorizontal,\n left: tabIndicatorPadding.smallHorizontal,\n right: tabIndicatorPadding.smallHorizontal,\n },\n },\n smallVertical: {\n ':after': {\n bottom: tabIndicatorPadding.smallVertical,\n ...shorthands.borderWidth(`calc(${tabIndicatorStrokeWidths.smallVertical} / 2.0)`),\n left: '0',\n top: tabIndicatorPadding.smallVertical,\n width: tabIndicatorStrokeWidths.smallVertical,\n },\n },\n});\n\n/**\n * Styles for the icon slot.\n */\nconst useIconStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n ...shorthands.overflow('hidden'),\n },\n // per design, the small and medium font sizes are the same.\n // the size prop only affects spacing.\n small: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n medium: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n});\n\n/**\n * Styles for the content slot (children)\n */\nconst useContentStyles = makeStyles({\n base: {\n ...pendingContentSizeTokens.body1,\n ...shorthands.overflow('hidden'),\n // content padding is the same for medium & small, horiztonal & vertical\n ...shorthands.padding(0, pendingSpacingTokens.xxs),\n },\n selected: {\n ...pendingContentSizeTokens.body1Strong,\n },\n});\n\n/**\n * Apply styling to the Tab slots based on the state\n */\nexport const useTabStyles_unstable = (state: TabState): TabState => {\n const rootStyles = useRootStyles();\n const focusStyles = useFocusStyles();\n const pendingIndicatorStyles = usePendingIndicatorStyles();\n const activeIndicatorStyles = useActiveIndicatorStyles();\n const iconStyles = useIconStyles();\n const contentStyles = useContentStyles();\n\n const { appearance, disabled, selected, size, vertical } = state;\n\n state.root.className = mergeClasses(\n tabClassNames.root,\n rootStyles.base,\n size !== 'small' && (vertical ? rootStyles.mediumVertical : rootStyles.mediumHorizontal),\n size === 'small' && (vertical ? rootStyles.smallVertical : rootStyles.smallHorizontal),\n focusStyles.base,\n !disabled && appearance === 'subtle' && rootStyles.subtle,\n !disabled && appearance === 'transparent' && rootStyles.transparent,\n !disabled && selected && rootStyles.selected,\n disabled && rootStyles.disabled,\n\n // pending indicator (before pseudo element)\n pendingIndicatorStyles.base,\n size !== 'small' && (vertical ? pendingIndicatorStyles.mediumVertical : pendingIndicatorStyles.mediumHorizontal),\n size === 'small' && (vertical ? pendingIndicatorStyles.smallVertical : pendingIndicatorStyles.smallHorizontal),\n disabled && pendingIndicatorStyles.disabled,\n\n // active indicator (after pseudo element)\n selected && activeIndicatorStyles.base,\n selected && !disabled && activeIndicatorStyles.selected,\n selected &&\n size !== 'small' &&\n (vertical ? activeIndicatorStyles.mediumVertical : activeIndicatorStyles.mediumHorizontal),\n selected &&\n size === 'small' &&\n (vertical ? activeIndicatorStyles.smallVertical : activeIndicatorStyles.smallHorizontal),\n selected && disabled && activeIndicatorStyles.disabled,\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(tabClassNames.icon, iconStyles.base, iconStyles[size], state.icon.className);\n }\n\n state.content.className = mergeClasses(\n tabClassNames.content,\n contentStyles.base,\n selected && contentStyles.selected,\n state.content.className,\n );\n\n useTabAnimatedIndicatorStyles_unstable(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
1
|
+
{"version":3,"sources":["components/Tab/useTabStyles.ts"],"names":[],"mappings":";;;;;;;AAEA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AAEA,MAAA,yBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAEa,OAAA,CAAA,aAAA,GAA0C;AACrD,EAAA,IAAI,EAAE,SAD+C;AAErD,EAAA,IAAI,EAAE,eAF+C;AAGrD,EAAA,OAAO,EAAE;AAH4C,CAA1C,C,CAMb;;AACa,OAAA,CAAA,YAAA,GAAe,OAAA,CAAA,aAAA,CAAc,IAA7B;AAEb;;AAEG;;AACH;;AACA,MAAM,aAAa,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourcesContent":["import type { TabSlots, TabState } from './Tab.types';\n\nimport { makeStyles, mergeClasses, shorthands } from '@griffel/react';\nimport { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { SlotClassNames } from '@fluentui/react-utilities';\nimport { useTabAnimatedIndicatorStyles_unstable } from './useTabAnimatedIndicator';\n\nexport const tabClassNames: SlotClassNames<TabSlots> = {\n root: 'fui-Tab',\n icon: 'fui-Tab__icon',\n content: 'fui-Tab__content',\n};\n\n// TODO temporary export to pass conformance test.\nexport const tabClassName = tabClassNames.root;\n\n/**\n * Styles for the root slot\n */\n/* eslint-disable @typescript-eslint/naming-convention */\nconst useRootStyles = makeStyles({\n base: {\n alignItems: 'center',\n ...shorthands.borderColor('none'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ...shorthands.borderWidth(0),\n cursor: 'pointer',\n display: 'grid',\n flexShrink: 0,\n gridAutoFlow: 'column',\n gridTemplateColumns: 'auto',\n gridTemplateRows: 'auto',\n fontFamily: tokens.fontFamilyBase,\n lineHeight: tokens.lineHeightBase300,\n outlineStyle: 'none',\n position: 'relative',\n ...shorthands.overflow('hidden'),\n textTransform: 'none',\n },\n horizontal: {\n justifyContent: 'center',\n },\n vertical: {\n justifyContent: 'start',\n },\n mediumHorizontal: {\n columnGap: tokens.spacingHorizontalSNudge,\n ...shorthands.padding(tokens.spacingVerticalM, tokens.spacingHorizontalMNudge),\n },\n mediumVertical: {\n // horizontal spacing is deliberate. This is the gap between icon and content.\n columnGap: tokens.spacingHorizontalSNudge,\n ...shorthands.padding(tokens.spacingVerticalSNudge, tokens.spacingHorizontalMNudge),\n },\n smallHorizontal: {\n columnGap: tokens.spacingHorizontalXXS,\n ...shorthands.padding(tokens.spacingVerticalSNudge, tokens.spacingHorizontalSNudge),\n },\n smallVertical: {\n // horizontal spacing is deliberate. This is the gap between icon and content.\n columnGap: tokens.spacingHorizontalXXS,\n ...shorthands.padding(tokens.spacingVerticalXXS, tokens.spacingHorizontalSNudge),\n },\n transparent: {\n backgroundColor: tokens.colorTransparentBackground,\n ':hover': {\n backgroundColor: tokens.colorTransparentBackgroundHover,\n },\n ':active': {\n backgroundColor: tokens.colorTransparentBackgroundPressed,\n },\n '& .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2,\n },\n ':hover .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2Pressed,\n },\n '& .fui-Tab__content': {\n color: tokens.colorNeutralForeground2,\n },\n ':hover .fui-Tab__content': {\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active .fui-Tab__content': {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n subtle: {\n backgroundColor: tokens.colorSubtleBackground,\n ':hover': {\n backgroundColor: tokens.colorSubtleBackgroundHover,\n },\n ':active': {\n backgroundColor: tokens.colorSubtleBackgroundPressed,\n },\n '& .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2,\n },\n ':hover .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active .fui-Tab__icon': {\n color: tokens.colorNeutralForeground2Pressed,\n },\n '& .fui-Tab__content': {\n color: tokens.colorNeutralForeground2,\n },\n ':hover .fui-Tab__content': {\n color: tokens.colorNeutralForeground2Hover,\n },\n ':active .fui-Tab__content': {\n color: tokens.colorNeutralForeground2Pressed,\n },\n },\n disabled: {\n backgroundColor: tokens.colorTransparentBackground,\n\n '& .fui-Tab__icon': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n '& .fui-Tab__content': {\n color: tokens.colorNeutralForegroundDisabled,\n },\n cursor: 'not-allowed',\n },\n selected: {\n '& .fui-Tab__icon': {\n color: tokens.colorCompoundBrandForeground1,\n },\n ':hover .fui-Tab__icon': {\n color: tokens.colorCompoundBrandForeground1Hover,\n },\n ':active .fui-Tab__icon': {\n color: tokens.colorCompoundBrandForeground1Pressed,\n },\n '& .fui-Tab__content': {\n color: tokens.colorNeutralForeground1,\n },\n ':hover .fui-Tab__content': {\n color: tokens.colorNeutralForeground1Hover,\n },\n ':active .fui-Tab__content': {\n color: tokens.colorNeutralForeground1Pressed,\n },\n },\n});\n/* eslint-enable @typescript-eslint/naming-convention */\n\n/**\n * Focus styles for the root slot\n */\nconst useFocusStyles = makeStyles({\n // Tab creates a custom focus indicator because the default focus indicator\n // is applied using an ::after pseudo-element on the root. Since the selection\n // indicator uses an ::after pseudo-element on the root, there is a conflict.\n base: createCustomFocusIndicatorStyle({\n ...shorthands.borderColor('transparent'),\n outlineWidth: tokens.strokeWidthThick,\n outlineColor: 'transparent',\n outlineStyle: 'solid',\n boxShadow: `\n ${tokens.shadow4},\n 0 0 0 ${tokens.strokeWidthThick} ${tokens.colorStrokeFocus2}\n `,\n zIndex: 1,\n }),\n});\n\n/** Indicator styles for when pending selection */\nconst usePendingIndicatorStyles = makeStyles({\n base: {\n ':hover::before': {\n backgroundColor: tokens.colorNeutralStroke1Hover,\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n content: '\"\"',\n position: 'absolute',\n },\n ':active::before': {\n backgroundColor: tokens.colorNeutralStroke1Pressed,\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n content: '\"\"',\n position: 'absolute',\n },\n '@media (forced-colors: active)': {\n ':hover::before': {\n backgroundColor: 'Highlight',\n },\n ':active::before': {\n backgroundColor: 'Highlight',\n },\n },\n },\n disabled: {\n ':hover::before': {\n backgroundColor: tokens.colorTransparentStroke,\n },\n ':active::before': {\n backgroundColor: tokens.colorTransparentStroke,\n },\n },\n mediumHorizontal: {\n '::before': {\n bottom: 0,\n height: tokens.strokeWidthThicker,\n left: tokens.spacingHorizontalM,\n right: tokens.spacingHorizontalM,\n },\n },\n mediumVertical: {\n '::before': {\n bottom: tokens.spacingVerticalS,\n left: 0,\n top: tokens.spacingVerticalS,\n width: tokens.strokeWidthThicker,\n },\n },\n smallHorizontal: {\n '::before': {\n bottom: 0,\n height: tokens.strokeWidthThick,\n left: tokens.spacingHorizontalSNudge,\n right: tokens.spacingHorizontalSNudge,\n },\n },\n smallVertical: {\n '::before': {\n bottom: tokens.spacingVerticalXS,\n left: 0,\n top: tokens.spacingVerticalXS,\n width: tokens.strokeWidthThicker,\n },\n },\n});\n\nconst useActiveIndicatorStyles = makeStyles({\n base: {\n '::after': {\n backgroundColor: tokens.colorTransparentStroke,\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n content: '\"\"',\n position: 'absolute',\n zIndex: 1,\n },\n },\n selected: {\n '::after': {\n backgroundColor: tokens.colorCompoundBrandStroke,\n },\n ':hover::after': {\n backgroundColor: tokens.colorCompoundBrandStrokeHover,\n },\n ':active::after': {\n backgroundColor: tokens.colorCompoundBrandStrokePressed,\n },\n '@media (forced-colors: active)': {\n '::after': {\n backgroundColor: 'ButtonText',\n },\n ':hover::after': {\n backgroundColor: 'ButtonText',\n },\n ':active::after': {\n backgroundColor: 'ButtonText',\n },\n },\n },\n disabled: {\n '::after': {\n backgroundColor: tokens.colorNeutralForegroundDisabled,\n },\n },\n mediumHorizontal: {\n '::after': {\n bottom: '0',\n height: tokens.strokeWidthThicker,\n left: tokens.spacingHorizontalM,\n right: tokens.spacingHorizontalM,\n },\n },\n mediumVertical: {\n '::after': {\n bottom: tokens.spacingVerticalS,\n left: 0,\n top: tokens.spacingVerticalS,\n width: tokens.strokeWidthThicker,\n },\n },\n smallHorizontal: {\n '::after': {\n bottom: 0,\n height: tokens.strokeWidthThick,\n left: tokens.spacingHorizontalSNudge,\n right: tokens.spacingHorizontalSNudge,\n },\n },\n smallVertical: {\n '::after': {\n bottom: tokens.spacingVerticalXS,\n left: '0',\n top: tokens.spacingVerticalXS,\n width: tokens.strokeWidthThicker,\n },\n },\n});\n\n/**\n * Styles for the icon slot.\n */\nconst useIconStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'inline-flex',\n justifyContent: 'center',\n ...shorthands.overflow('hidden'),\n },\n // per design, the small and medium font sizes are the same.\n // the size prop only affects spacing.\n small: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n medium: {\n fontSize: '20px',\n height: '20px',\n width: '20px',\n },\n});\n\n/**\n * Styles for the content slot (children)\n */\nconst useContentStyles = makeStyles({\n base: {\n ...typographyStyles.body1,\n ...shorthands.overflow('hidden'),\n // content padding is the same for medium & small, horiztonal & vertical\n ...shorthands.padding(tokens.spacingVerticalNone, tokens.spacingHorizontalXXS),\n },\n selected: {\n ...typographyStyles.body1Strong,\n },\n});\n\n/**\n * Apply styling to the Tab slots based on the state\n */\nexport const useTabStyles_unstable = (state: TabState): TabState => {\n const rootStyles = useRootStyles();\n const focusStyles = useFocusStyles();\n const pendingIndicatorStyles = usePendingIndicatorStyles();\n const activeIndicatorStyles = useActiveIndicatorStyles();\n const iconStyles = useIconStyles();\n const contentStyles = useContentStyles();\n\n const { appearance, disabled, selected, size, vertical } = state;\n\n state.root.className = mergeClasses(\n tabClassNames.root,\n rootStyles.base,\n vertical ? rootStyles.vertical : rootStyles.horizontal,\n size !== 'small' && (vertical ? rootStyles.mediumVertical : rootStyles.mediumHorizontal),\n size === 'small' && (vertical ? rootStyles.smallVertical : rootStyles.smallHorizontal),\n focusStyles.base,\n !disabled && appearance === 'subtle' && rootStyles.subtle,\n !disabled && appearance === 'transparent' && rootStyles.transparent,\n !disabled && selected && rootStyles.selected,\n disabled && rootStyles.disabled,\n\n // pending indicator (before pseudo element)\n pendingIndicatorStyles.base,\n size !== 'small' && (vertical ? pendingIndicatorStyles.mediumVertical : pendingIndicatorStyles.mediumHorizontal),\n size === 'small' && (vertical ? pendingIndicatorStyles.smallVertical : pendingIndicatorStyles.smallHorizontal),\n disabled && pendingIndicatorStyles.disabled,\n\n // active indicator (after pseudo element)\n selected && activeIndicatorStyles.base,\n selected && !disabled && activeIndicatorStyles.selected,\n selected &&\n size !== 'small' &&\n (vertical ? activeIndicatorStyles.mediumVertical : activeIndicatorStyles.mediumHorizontal),\n selected &&\n size === 'small' &&\n (vertical ? activeIndicatorStyles.smallVertical : activeIndicatorStyles.smallHorizontal),\n selected && disabled && activeIndicatorStyles.disabled,\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(tabClassNames.icon, iconStyles.base, iconStyles[size], state.icon.className);\n }\n\n state.content.className = mergeClasses(\n tabClassNames.content,\n contentStyles.base,\n selected && contentStyles.selected,\n state.content.className,\n );\n\n useTabAnimatedIndicatorStyles_unstable(state);\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -32,7 +32,8 @@ const useTabList_unstable = (props, ref) => {
|
|
|
32
32
|
const innerRef = React.useRef(null);
|
|
33
33
|
const focusAttributes = react_tabster_1.useArrowNavigationGroup({
|
|
34
34
|
circular: true,
|
|
35
|
-
axis: vertical ? 'vertical' : 'horizontal'
|
|
35
|
+
axis: vertical ? 'vertical' : 'horizontal',
|
|
36
|
+
memorizeCurrent: true
|
|
36
37
|
});
|
|
37
38
|
const [selectedValue, setSelectedValue] = react_utilities_1.useControllableState({
|
|
38
39
|
state: props.selectedValue,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TabList/useTabList.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AASA;;;;;;;;AAQG;;;AACI,MAAM,mBAAmB,GAAG,CAAC,KAAD,EAAsB,GAAtB,KAAmE;AACpG,QAAM;AAAE,IAAA,UAAU,GAAG,aAAf;AAA8B,IAAA,QAAQ,GAAG,KAAzC;AAAgD,IAAA,WAAhD;AAA6D,IAAA,IAAI,GAAG,QAApE;AAA8E,IAAA,QAAQ,GAAG;AAAzF,MAAmG,KAAzG;AAEA,QAAM,QAAQ,GAAG,KAAK,CAAC,MAAN,CAA0B,IAA1B,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A,CAAc,GAAd,EAAmB,QAAnB,CAD4B;AAEjC,MAAA,IAAI,EAAE,SAF2B;AAGjC,SAAG,eAH8B;AAIjC,SAAG;AAJ8B,KAA7B,CAJD;AAUL,IAAA,UAVK;AAWL,IAAA,QAXK;AAYL,IAAA,aAZK;AAaL,IAAA,IAbK;AAcL,IAAA,QAdK;AAeL,IAAA,UAfK;AAgBL,IAAA,YAhBK;AAiBL,IAAA,QAjBK;AAkBL,IAAA;AAlBK,GAAP;AAoBD,CAxEM;;AAAM,OAAA,CAAA,mBAAA,GAAmB,mBAAnB","sourcesContent":["import * as React from 'react';\nimport { useArrowNavigationGroup } from '@fluentui/react-tabster';\nimport {\n getNativeElementProps,\n useControllableState,\n useEventCallback,\n useMergedRefs,\n} from '@fluentui/react-utilities';\nimport type { TabRegisterData, SelectTabData, SelectTabEvent, TabListProps, TabListState } from './TabList.types';\nimport { TabValue } from '../Tab/Tab.types';\n\n/**\n * Create the state required to render TabList.\n *\n * The returned state can be modified with hooks such as useTabListStyles_unstable,\n * before being passed to renderTabList_unstable.\n *\n * @param props - props from this instance of TabList\n * @param ref - reference to root HTMLElement of TabList\n */\nexport const useTabList_unstable = (props: TabListProps, ref: React.Ref<HTMLElement>): TabListState => {\n const { appearance = 'transparent', disabled = false, onTabSelect, size = 'medium', vertical = false } = props;\n\n const innerRef = React.useRef<HTMLElement>(null);\n\n const focusAttributes = useArrowNavigationGroup({\n circular: true,\n axis: vertical ? 'vertical' : 'horizontal',\n memorizeCurrent: true,\n });\n\n const [selectedValue, setSelectedValue] = useControllableState({\n state: props.selectedValue,\n defaultState: props.defaultSelectedValue,\n initialState: undefined,\n });\n\n // considered usePrevious, but it is sensitive to re-renders\n // this could cause the previous to move to current in the case where the tab list re-renders.\n // these refs avoid getRegisteredTabs changing when selectedValue changes and causing\n // renders for tabs that have not changed.\n const currentSelectedValue = React.useRef<TabValue | undefined>(undefined);\n const previousSelectedValue = React.useRef<TabValue | undefined>(undefined);\n\n React.useEffect(() => {\n previousSelectedValue.current = currentSelectedValue.current;\n currentSelectedValue.current = selectedValue;\n }, [selectedValue]);\n\n const onSelect = useEventCallback((event: SelectTabEvent, data: SelectTabData) => {\n setSelectedValue(data.value);\n onTabSelect?.(event, data);\n });\n\n const registeredTabs = React.useRef<Record<string, TabRegisterData>>({});\n\n const onRegister = useEventCallback((data: TabRegisterData) => {\n registeredTabs.current[JSON.stringify(data.value)] = data;\n });\n\n const onUnregister = useEventCallback((data: TabRegisterData) => {\n delete registeredTabs.current[JSON.stringify(data.value)];\n });\n\n const getRegisteredTabs = React.useCallback(() => {\n return {\n selectedValue: currentSelectedValue.current,\n previousSelectedValue: previousSelectedValue.current,\n registeredTabs: registeredTabs.current,\n };\n }, []);\n\n return {\n components: {\n root: 'div',\n },\n root: getNativeElementProps('div', {\n ref: useMergedRefs(ref, innerRef),\n role: 'tablist',\n ...focusAttributes,\n ...props,\n }),\n appearance,\n disabled,\n selectedValue,\n size,\n vertical,\n onRegister,\n onUnregister,\n onSelect,\n getRegisteredTabs,\n };\n};\n"],"sourceRoot":"../src/"}
|
|
@@ -20,13 +20,20 @@ const useStyles = /*#__PURE__*/react_1.__styles({
|
|
|
20
20
|
"root": {
|
|
21
21
|
"mc9l5x": "f22iagw",
|
|
22
22
|
"Beiy3e4": "f1063pyq",
|
|
23
|
+
"Bnnss6s": "fi64zpg",
|
|
24
|
+
"Eh141a": "flvyvdh",
|
|
23
25
|
"qhf8xq": "f10pi13n"
|
|
24
26
|
},
|
|
27
|
+
"horizontal": {
|
|
28
|
+
"Bt984gj": "f1q9h2pe",
|
|
29
|
+
"Beiy3e4": "f1063pyq"
|
|
30
|
+
},
|
|
25
31
|
"vertical": {
|
|
32
|
+
"Bt984gj": "f1q9h2pe",
|
|
26
33
|
"Beiy3e4": "f1vx9l62"
|
|
27
34
|
}
|
|
28
35
|
}, {
|
|
29
|
-
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".f10pi13n{position:relative;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}"]
|
|
36
|
+
"d": [".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".flvyvdh{-webkit-box-flex-wrap:nowrap;-webkit-flex-wrap:nowrap;-ms-flex-wrap:nowrap;flex-wrap:nowrap;}", ".f10pi13n{position:relative;}", ".f1q9h2pe{-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;}", ".f1vx9l62{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}"]
|
|
30
37
|
});
|
|
31
38
|
/**
|
|
32
39
|
* Apply styling to the TabList slots based on the state
|
|
@@ -38,7 +45,7 @@ const useTabListStyles_unstable = state => {
|
|
|
38
45
|
vertical
|
|
39
46
|
} = state;
|
|
40
47
|
const styles = useStyles();
|
|
41
|
-
state.root.className = react_1.mergeClasses(exports.tabListClassName, styles.root, vertical
|
|
48
|
+
state.root.className = react_1.mergeClasses(exports.tabListClassName, styles.root, vertical ? styles.vertical : styles.horizontal, state.root.className);
|
|
42
49
|
return state;
|
|
43
50
|
};
|
|
44
51
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["components/TabList/useTabListStyles.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGa,OAAA,CAAA,iBAAA,GAAkD;AAC7D,EAAA,IAAI,EAAE;AADuD,CAAlD,C,CAIb;;AACa,OAAA,CAAA,gBAAA,GAAmB,OAAA,CAAA,iBAAA,CAAkB,IAArC;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;
|
|
1
|
+
{"version":3,"sources":["components/TabList/useTabListStyles.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGa,OAAA,CAAA,iBAAA,GAAkD;AAC7D,EAAA,IAAI,EAAE;AADuD,CAAlD,C,CAIb;;AACa,OAAA,CAAA,gBAAA,GAAmB,OAAA,CAAA,iBAAA,CAAkB,IAArC;AAEb;;AAEG;;AACH,MAAM,SAAS,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AAkBA;;AAEG;;;AACI,MAAM,yBAAyB,GAAI,KAAD,IAAsC;AAC7E,QAAM;AAAE,IAAA;AAAF,MAAe,KAArB;AAEA,QAAM,MAAM,GAAG,SAAS,EAAxB;AAEA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CACrB,OAAA,CAAA,gBADqB,EAErB,MAAM,CAAC,IAFc,EAGrB,QAAQ,GAAG,MAAM,CAAC,QAAV,GAAqB,MAAM,CAAC,UAHf,EAIrB,KAAK,CAAC,IAAN,CAAW,SAJU,CAAvB;AAOA,SAAO,KAAP;AACD,CAbM;;AAAM,OAAA,CAAA,yBAAA,GAAyB,yBAAzB","sourcesContent":["import { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeStyles, mergeClasses } from '@griffel/react';\nimport type { TabListSlots, TabListState } from './TabList.types';\n\nexport const tabListClassNames: SlotClassNames<TabListSlots> = {\n root: 'fui-TabList',\n};\n\n// TODO temporary export to pass conformance test.\nexport const tabListClassName = tabListClassNames.root;\n\n/**\n * Styles for the root slot\n */\nconst useStyles = makeStyles({\n root: {\n display: 'flex',\n flexDirection: 'row',\n flexShrink: 0,\n flexWrap: 'nowrap',\n position: 'relative',\n },\n horizontal: {\n alignItems: 'stretch',\n flexDirection: 'row',\n },\n vertical: {\n alignItems: 'stretch',\n flexDirection: 'column',\n },\n});\n\n/**\n * Apply styling to the TabList slots based on the state\n */\nexport const useTabListStyles_unstable = (state: TabListState): TabListState => {\n const { vertical } = state;\n\n const styles = useStyles();\n\n state.root.className = mergeClasses(\n tabListClassName,\n styles.root,\n vertical ? styles.vertical : styles.horizontal,\n state.root.className,\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
|