@fluentui/react-tabs 9.0.0-beta.6 → 9.0.0-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/CHANGELOG.json +180 -1
  2. package/CHANGELOG.md +49 -2
  3. package/dist/react-tabs.d.ts +48 -36
  4. package/lib/components/Tab/Tab.types.d.ts +14 -5
  5. package/lib/components/Tab/Tab.types.js.map +1 -1
  6. package/lib/components/Tab/index.d.ts +1 -0
  7. package/lib/components/Tab/index.js +1 -0
  8. package/lib/components/Tab/index.js.map +1 -1
  9. package/lib/components/Tab/renderTab.js +1 -2
  10. package/lib/components/Tab/renderTab.js.map +1 -1
  11. package/lib/components/Tab/useTab.js +25 -29
  12. package/lib/components/Tab/useTab.js.map +1 -1
  13. package/lib/components/Tab/useTabAnimatedIndicator.d.ts +5 -0
  14. package/lib/components/Tab/useTabAnimatedIndicator.js +134 -0
  15. package/lib/components/Tab/useTabAnimatedIndicator.js.map +1 -0
  16. package/lib/components/Tab/useTabStyles.d.ts +4 -2
  17. package/lib/components/Tab/useTabStyles.js +280 -84
  18. package/lib/components/Tab/useTabStyles.js.map +1 -1
  19. package/lib/components/TabList/TabList.types.d.ts +21 -16
  20. package/lib/components/TabList/TabList.types.js.map +1 -1
  21. package/lib/components/TabList/TabListContext.js +6 -0
  22. package/lib/components/TabList/TabListContext.js.map +1 -1
  23. package/lib/components/TabList/renderTabList.js +0 -1
  24. package/lib/components/TabList/renderTabList.js.map +1 -1
  25. package/lib/components/TabList/useTabList.js +26 -51
  26. package/lib/components/TabList/useTabList.js.map +1 -1
  27. package/lib/components/TabList/useTabListContextValues.js +4 -0
  28. package/lib/components/TabList/useTabListContextValues.js.map +1 -1
  29. package/lib/components/TabList/useTabListStyles.d.ts +4 -5
  30. package/lib/components/TabList/useTabListStyles.js +8 -90
  31. package/lib/components/TabList/useTabListStyles.js.map +1 -1
  32. package/lib/index.d.ts +4 -2
  33. package/lib/index.js +2 -2
  34. package/lib/index.js.map +1 -1
  35. package/lib/tab.constants.d.ts +59 -12
  36. package/lib/tab.constants.js +64 -13
  37. package/lib/tab.constants.js.map +1 -1
  38. package/lib-commonjs/components/Tab/Tab.types.d.ts +14 -5
  39. package/lib-commonjs/components/Tab/index.d.ts +1 -0
  40. package/lib-commonjs/components/Tab/index.js +2 -0
  41. package/lib-commonjs/components/Tab/index.js.map +1 -1
  42. package/lib-commonjs/components/Tab/renderTab.js +1 -2
  43. package/lib-commonjs/components/Tab/renderTab.js.map +1 -1
  44. package/lib-commonjs/components/Tab/useTab.js +25 -29
  45. package/lib-commonjs/components/Tab/useTab.js.map +1 -1
  46. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.d.ts +5 -0
  47. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js +148 -0
  48. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js.map +1 -0
  49. package/lib-commonjs/components/Tab/useTabStyles.d.ts +4 -2
  50. package/lib-commonjs/components/Tab/useTabStyles.js +281 -84
  51. package/lib-commonjs/components/Tab/useTabStyles.js.map +1 -1
  52. package/lib-commonjs/components/TabList/TabList.types.d.ts +21 -16
  53. package/lib-commonjs/components/TabList/TabListContext.js +6 -0
  54. package/lib-commonjs/components/TabList/TabListContext.js.map +1 -1
  55. package/lib-commonjs/components/TabList/renderTabList.js +0 -1
  56. package/lib-commonjs/components/TabList/renderTabList.js.map +1 -1
  57. package/lib-commonjs/components/TabList/useTabList.js +25 -50
  58. package/lib-commonjs/components/TabList/useTabList.js.map +1 -1
  59. package/lib-commonjs/components/TabList/useTabListContextValues.js +4 -0
  60. package/lib-commonjs/components/TabList/useTabListContextValues.js.map +1 -1
  61. package/lib-commonjs/components/TabList/useTabListStyles.d.ts +4 -5
  62. package/lib-commonjs/components/TabList/useTabListStyles.js +7 -92
  63. package/lib-commonjs/components/TabList/useTabListStyles.js.map +1 -1
  64. package/lib-commonjs/index.d.ts +4 -2
  65. package/lib-commonjs/index.js +76 -3
  66. package/lib-commonjs/index.js.map +1 -1
  67. package/lib-commonjs/tab.constants.d.ts +59 -12
  68. package/lib-commonjs/tab.constants.js +66 -14
  69. package/lib-commonjs/tab.constants.js.map +1 -1
  70. package/package.json +16 -17
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useTabStyles_unstable = exports.tabClassName = void 0;
6
+ exports.useTabStyles_unstable = exports.tabClassName = exports.tabClassNames = void 0;
7
7
 
8
8
  const react_1 = /*#__PURE__*/require("@griffel/react");
9
9
 
@@ -13,14 +13,24 @@ const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
13
13
 
14
14
  const tab_constants_1 = /*#__PURE__*/require("../../tab.constants");
15
15
 
16
- exports.tabClassName = 'fui-Tab';
16
+ const useTabAnimatedIndicator_1 = /*#__PURE__*/require("./useTabAnimatedIndicator");
17
+
18
+ exports.tabClassNames = {
19
+ root: 'fui-Tab',
20
+ icon: 'fui-Tab__icon',
21
+ content: 'fui-Tab__content'
22
+ }; // TODO temporary export to pass conformance test.
23
+
24
+ exports.tabClassName = exports.tabClassNames.root;
17
25
  /**
18
26
  * Styles for the root slot
19
27
  */
20
28
 
29
+ /* eslint-disable @typescript-eslint/naming-convention */
30
+
21
31
  const useRootStyles = /*#__PURE__*/react_1.__styles({
22
32
  "base": {
23
- "De3pzq": "flu3bqm",
33
+ "Bt984gj": "f122n59",
24
34
  "g2u3we": "fwhevhj",
25
35
  "h3c5rm": ["f61n433", "f1q8l70w"],
26
36
  "B9xav0g": "fv1dfc8",
@@ -29,47 +39,95 @@ const useRootStyles = /*#__PURE__*/react_1.__styles({
29
39
  "Beyfa6y": ["f16jpd5f", "f1aa9q02"],
30
40
  "B7oj6ja": ["f1jar5jt", "fyu767a"],
31
41
  "Btl43ni": ["fyu767a", "f1jar5jt"],
32
- "B4j52fo": "f192inf7",
33
- "Bekrc4i": ["f5tn483", "f1ojsxk5"],
34
- "Bn0qgzm": "f1vxd6vx",
35
- "ibv6hh": ["f1ojsxk5", "f5tn483"],
36
- "i8kkvl": "fgfbwa2",
42
+ "B4j52fo": "fre7gi1",
43
+ "Bekrc4i": ["f1358rze", "f1rvrf73"],
44
+ "Bn0qgzm": "fqdk4by",
45
+ "ibv6hh": ["f1rvrf73", "f1358rze"],
37
46
  "Bceei9c": "f1k6fduh",
38
47
  "mc9l5x": "f22iagw",
39
48
  "Beiy3e4": "f1063pyq",
40
49
  "Bahqtrf": "fk6fouc",
41
- "Be2twd7": "fkhj508",
42
50
  "Bg96gwp": "f1i3iumi",
43
- "z8tnut": "f1809wu7",
44
- "z189sj": ["f81rol6", "frdkuqy"],
45
- "Byoj8tv": "f1fow5ox",
46
- "uwmqm3": ["frdkuqy", "f81rol6"],
51
+ "oeaueh": "f1s6fcnf",
47
52
  "qhf8xq": "f10pi13n",
48
53
  "B68tc82": "f1p9o1ba",
49
- "Bmxbyg5": "f1sil6mw"
54
+ "Bmxbyg5": "f1sil6mw",
55
+ "B9bfxx9": "f1cxpek8"
50
56
  },
51
- "horizontal": {
52
- "Bt984gj": "f122n59",
53
- "Brf1p80": "f4d9j23"
57
+ "mediumHorizontal": {
58
+ "i8kkvl": "fgfbwa2",
59
+ "Brf1p80": "f4d9j23",
60
+ "z8tnut": "f1kcqot9",
61
+ "z189sj": ["f81rol6", "frdkuqy"],
62
+ "Byoj8tv": "fpe6lb7",
63
+ "uwmqm3": ["frdkuqy", "f81rol6"]
54
64
  },
55
- "vertical": {
56
- "Bt984gj": "f122n59",
57
- "Brf1p80": "fbhxue7"
65
+ "mediumVertical": {
66
+ "i8kkvl": "fgfbwa2",
67
+ "Brf1p80": "fbhxue7",
68
+ "Bf4jedk": "fyvtabn",
69
+ "z8tnut": "f1xp5gbu",
70
+ "z189sj": ["f81rol6", "frdkuqy"],
71
+ "Byoj8tv": "f1d7kygh",
72
+ "uwmqm3": ["frdkuqy", "f81rol6"]
58
73
  },
59
- "small": {
74
+ "smallHorizontal": {
75
+ "i8kkvl": "f16mnhsx",
60
76
  "z8tnut": "f1xp5gbu",
61
77
  "z189sj": ["f1sgzk6v", "f1bg5zqg"],
62
78
  "Byoj8tv": "f1d7kygh",
63
- "uwmqm3": ["f1bg5zqg", "f1sgzk6v"],
64
- "i8kkvl": "f16mnhsx"
79
+ "uwmqm3": ["f1bg5zqg", "f1sgzk6v"]
80
+ },
81
+ "smallVertical": {
82
+ "i8kkvl": "f16mnhsx",
83
+ "z8tnut": "fq1loh5",
84
+ "z189sj": ["f1sgzk6v", "f1bg5zqg"],
85
+ "Byoj8tv": "futqtb8",
86
+ "uwmqm3": ["f1bg5zqg", "f1sgzk6v"]
87
+ },
88
+ "transparent": {
89
+ "De3pzq": "f1c21dwh",
90
+ "Jwef8y": "fjxutwb",
91
+ "ecr2s2": "fophhak",
92
+ "Bptxc3x": "fmmjozx",
93
+ "B076xvk": "f1mfqf41",
94
+ "q9r9w5": "f10aiid4",
95
+ "cl4aha": "fpkze5g",
96
+ "Bk452zc": "f149wc3x",
97
+ "a4hkcw": "fjioou7"
65
98
  },
66
99
  "subtle": {
67
- "Jwef8y": "f1knas48"
100
+ "De3pzq": "fhovq9v",
101
+ "Jwef8y": "f1t94bn6",
102
+ "ecr2s2": "f1wfn5kd",
103
+ "Bptxc3x": "fmmjozx",
104
+ "B076xvk": "f1mfqf41",
105
+ "q9r9w5": "f10aiid4",
106
+ "cl4aha": "fpkze5g",
107
+ "Bk452zc": "f149wc3x",
108
+ "a4hkcw": "fjioou7"
109
+ },
110
+ "disabled": {
111
+ "De3pzq": "f1c21dwh",
112
+ "Bptxc3x": "fato7r6",
113
+ "cl4aha": "fao1bnu",
114
+ "Bceei9c": "fdrzuqr"
115
+ },
116
+ "selected": {
117
+ "Bptxc3x": "f1cadz5z",
118
+ "B076xvk": "f1ck17l",
119
+ "q9r9w5": "f42ak0g",
120
+ "cl4aha": "ffplhdr",
121
+ "Bk452zc": "ffth601",
122
+ "a4hkcw": "fhklyu5"
68
123
  }
69
124
  }, {
70
- "d": [".flu3bqm{background-color:none;}", ".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);}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fgfbwa2{-webkit-column-gap:6px;column-gap:6px;}", ".f1k6fduh{cursor:pointer;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}", ".f1809wu7{padding-top:10px;}", ".f81rol6{padding-right:10px;}", ".frdkuqy{padding-left:10px;}", ".f1fow5ox{padding-bottom:10px;}", ".f10pi13n{position:relative;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".fbhxue7{-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;}", ".f1xp5gbu{padding-top:6px;}", ".f1sgzk6v{padding-right:6px;}", ".f1bg5zqg{padding-left:6px;}", ".f1d7kygh{padding-bottom:6px;}", ".f16mnhsx{-webkit-column-gap:2px;column-gap:2px;}"],
71
- "h": [".f1knas48:hover{background-color:var(--colorNeutralBackground1Hover);}"]
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;}", ".f22iagw{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f1063pyq{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;}", ".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;}", ".fgfbwa2{-webkit-column-gap:6px;column-gap:6px;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1kcqot9{padding-top:12px;}", ".f81rol6{padding-right:10px;}", ".frdkuqy{padding-left:10px;}", ".fpe6lb7{padding-bottom:12px;}", ".fbhxue7{-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;}", ".fyvtabn{min-width:120px;}", ".f1xp5gbu{padding-top:6px;}", ".f1d7kygh{padding-bottom:6px;}", ".f16mnhsx{-webkit-column-gap:2px;column-gap:2px;}", ".f1sgzk6v{padding-right:6px;}", ".f1bg5zqg{padding-left:6px;}", ".fq1loh5{padding-top:2px;}", ".futqtb8{padding-bottom:2px;}", ".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
+ "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
+ "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);}"]
72
128
  });
129
+ /* eslint-enable @typescript-eslint/naming-convention */
130
+
73
131
  /**
74
132
  * Focus styles for the root slot
75
133
  */
@@ -92,63 +150,183 @@ const useFocusStyles = /*#__PURE__*/react_1.__styles({
92
150
  "i": [".f2hkw1w:focus-visible{outline-style:none;}"],
93
151
  "d": ["[data-keyboard-nav] .flfsvnh:focus{border-top-color:transparent;}", "[data-keyboard-nav] .f1781m5e:focus{border-right-color:transparent;}", "[data-keyboard-nav] .flvaaa9:focus{border-left-color:transparent;}", "[data-keyboard-nav] .f50u1b5:focus{border-bottom-color:transparent;}", "[data-keyboard-nav] .fgeg2qa:focus{outline-width:var(--strokeWidthThick);}", "[data-keyboard-nav] .f19j8a82:focus{outline-color:transparent;}", "[data-keyboard-nav] .fhcq1yo:focus{outline-style:solid;}", "[data-keyboard-nav] .f1gkya50:focus{box-shadow:var(--shadow4),0 0 0 var(--strokeWidthThick) var(--colorStrokeFocus2);}", "[data-keyboard-nav] .fpt6wn7:focus{z-index:1;}"]
94
152
  });
95
- /**
96
- * Indicator styles for the root slot when horizontal.
97
- */
153
+ /** Indicator styles for when pending selection */
98
154
 
99
155
 
100
- const useHorizontalIndicatorStyles = /*#__PURE__*/react_1.__styles({
156
+ const usePendingIndicatorStyles = /*#__PURE__*/react_1.__styles({
157
+ "base": {
158
+ "Cgij5x": "f19tg446",
159
+ "z7qlni": "f1mav41w",
160
+ "Bdipjll": ["f1suiu43", "f1kv3e19"],
161
+ "B37a91": "f1hmukci",
162
+ "Buig1va": ["f1kv3e19", "f1suiu43"],
163
+ "Bdyfc3e": "f1lqhc19",
164
+ "Bpjys6e": ["fgp1lrp", "f14he6sl"],
165
+ "pnx8oc": "f1c4qkgw",
166
+ "Btzsvkb": ["f14he6sl", "fgp1lrp"],
167
+ "d7kyl9": ["f1cj3r78", "f1xncuur"],
168
+ "Bisz106": ["f1xncuur", "f1cj3r78"],
169
+ "Bllnwrd": ["fi30ndc", "f19d7f88"],
170
+ "B3dpmnz": ["f19d7f88", "fi30ndc"],
171
+ "Fs9z49": "f56rwnc",
172
+ "Baevmrh": "f1lqcl48",
173
+ "ri70ih": "f1ego73q",
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"
190
+ },
191
+ "disabled": {
192
+ "Bdyfc3e": "ft6wof",
193
+ "Bpjys6e": ["f1ojwtdc", "fgjfpko"],
194
+ "pnx8oc": "f5s0kyi",
195
+ "Btzsvkb": ["fgjfpko", "f1ojwtdc"],
196
+ "Bcbdomo": "f1dodv9r",
197
+ "gg7wqr": ["f1shuycv", "f19t3g6y"],
198
+ "Ixc8c": "f6psttw",
199
+ "B1ltu2w": ["f19t3g6y", "f1shuycv"]
200
+ },
201
+ "mediumHorizontal": {
202
+ "Bj2wrql": "flqennz",
203
+ "dj0dih": "fyg4ez2",
204
+ "D4ky5z": ["f1cquro8", "f1ro2kyx"],
205
+ "k1i1uq": "ffvjagy",
206
+ "Bcasopp": ["f1ro2kyx", "f1cquro8"],
207
+ "Bbc2r3f": "fvqq5f6",
208
+ "Byque4d": ["frssmbg", "fxzecjq"],
209
+ "qd6xl9": ["fxzecjq", "frssmbg"]
210
+ },
211
+ "mediumVertical": {
212
+ "Bj2wrql": "fa48u8l",
213
+ "dj0dih": "fyg4ez2",
214
+ "D4ky5z": ["f1cquro8", "f1ro2kyx"],
215
+ "k1i1uq": "ffvjagy",
216
+ "Bcasopp": ["f1ro2kyx", "f1cquro8"],
217
+ "Byque4d": ["f1t0u0az", "fmlx6bj"],
218
+ "Bf8kmfk": "f1itw4t3",
219
+ "Bdn98qo": "f1382oex"
220
+ },
221
+ "smallHorizontal": {
222
+ "Bj2wrql": "flqennz",
223
+ "dj0dih": "f1kkj9j",
224
+ "D4ky5z": ["f14ip387", "f1uj4yfi"],
225
+ "k1i1uq": "f7vsd80",
226
+ "Bcasopp": ["f1uj4yfi", "f14ip387"],
227
+ "Bbc2r3f": "f1y1nr8p",
228
+ "Byque4d": ["f1i98inn", "fadekk3"],
229
+ "qd6xl9": ["fadekk3", "f1i98inn"]
230
+ },
231
+ "smallVertical": {
232
+ "Bj2wrql": "f7efb1c",
233
+ "dj0dih": "fyg4ez2",
234
+ "D4ky5z": ["f1cquro8", "f1ro2kyx"],
235
+ "k1i1uq": "ffvjagy",
236
+ "Bcasopp": ["f1ro2kyx", "f1cquro8"],
237
+ "Byque4d": ["f1t0u0az", "fmlx6bj"],
238
+ "Bf8kmfk": "f1q0qvio",
239
+ "Bdn98qo": "f1382oex"
240
+ }
241
+ }, {
242
+ "h": [".f19tg446:hover:before{background-color:none;}", ".f1mav41w:hover:before{border-top-style:solid;}", ".f1suiu43:hover:before{border-right-style:solid;}", ".f1kv3e19:hover:before{border-left-style:solid;}", ".f1hmukci:hover:before{border-bottom-style:solid;}", ".f1lqhc19:hover:before{border-top-color:var(--colorNeutralStroke1Hover);}", ".fgp1lrp:hover:before{border-right-color:var(--colorNeutralStroke1Hover);}", ".f14he6sl:hover:before{border-left-color:var(--colorNeutralStroke1Hover);}", ".f1c4qkgw:hover:before{border-bottom-color:var(--colorNeutralStroke1Hover);}", ".f1cj3r78:hover:before{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f1xncuur:hover:before{border-bottom-left-radius:var(--borderRadiusCircular);}", ".fi30ndc:hover:before{border-top-right-radius:var(--borderRadiusCircular);}", ".f19d7f88:hover:before{border-top-left-radius:var(--borderRadiusCircular);}", ".f56rwnc:hover:before{box-sizing:border-box;}", ".f1lqcl48:hover:before{content:\"\";}", ".f1ego73q:hover:before{position:absolute;}", ".ft6wof:hover:before{border-top-color:var(--colorTransparentStroke);}", ".f1ojwtdc:hover:before{border-right-color:var(--colorTransparentStroke);}", ".fgjfpko:hover:before{border-left-color:var(--colorTransparentStroke);}", ".f5s0kyi:hover:before{border-bottom-color:var(--colorTransparentStroke);}"],
243
+ "a": [".f1ppf73u:active:before{background-color:none;}", ".fkgvshs:active:before{border-top-style:solid;}", ".f9ce8dc:active:before{border-right-style:solid;}", ".f1m8imsn:active:before{border-left-style:solid;}", ".fxkorn8:active:before{border-bottom-style:solid;}", ".f1bb2bd5:active:before{border-top-color:var(--colorNeutralStroke1Pressed);}", ".fyhhhxy:active:before{border-right-color:var(--colorNeutralStroke1Pressed);}", ".flt5dqy:active:before{border-left-color:var(--colorNeutralStroke1Pressed);}", ".fw019zk:active:before{border-bottom-color:var(--colorNeutralStroke1Pressed);}", ".f7c36j8:active:before{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f1tzhx6f:active:before{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f15ne2sm:active:before{border-top-right-radius:var(--borderRadiusCircular);}", ".f18vik6r:active:before{border-top-left-radius:var(--borderRadiusCircular);}", ".f2sk4z1:active:before{box-sizing:border-box;}", ".frq4ova:active:before{content:\"\";}", ".f416fxa:active:before{position:absolute;}", ".f1dodv9r:active:before{border-top-color:var(--colorTransparentStroke);}", ".f1shuycv:active:before{border-right-color:var(--colorTransparentStroke);}", ".f19t3g6y:active:before{border-left-color:var(--colorTransparentStroke);}", ".f6psttw:active:before{border-bottom-color:var(--colorTransparentStroke);}"],
244
+ "d": [".flqennz:before{bottom:0;}", ".fyg4ez2:before{border-top-width:calc(var(--strokeWidthThicker) / 2.0);}", ".f1cquro8:before{border-right-width:calc(var(--strokeWidthThicker) / 2.0);}", ".f1ro2kyx:before{border-left-width:calc(var(--strokeWidthThicker) / 2.0);}", ".ffvjagy:before{border-bottom-width:calc(var(--strokeWidthThicker) / 2.0);}", ".fvqq5f6:before{height:var(--strokeWidthThicker);}", ".frssmbg:before{left:12px;}", ".fxzecjq:before{right:12px;}", ".fa48u8l:before{bottom:8px;}", ".f1t0u0az:before{left:0;}", ".fmlx6bj:before{right:0;}", ".f1itw4t3:before{top:8px;}", ".f1382oex:before{width:var(--strokeWidthThicker);}", ".f1kkj9j:before{border-top-width:calc(var(--strokeWidthThick) / 2.0);}", ".f14ip387:before{border-right-width:calc(var(--strokeWidthThick) / 2.0);}", ".f1uj4yfi:before{border-left-width:calc(var(--strokeWidthThick) / 2.0);}", ".f7vsd80:before{border-bottom-width:calc(var(--strokeWidthThick) / 2.0);}", ".f1y1nr8p:before{height:var(--strokeWidthThick);}", ".f1i98inn:before{left:6px;}", ".fadekk3:before{right:6px;}", ".f7efb1c:before{bottom:4px;}", ".f1q0qvio:before{top:4px;}"]
245
+ });
246
+
247
+ const useActiveIndicatorStyles = /*#__PURE__*/react_1.__styles({
101
248
  "base": {
102
- "Bkbwdz4": "f1mif8u4",
103
- "frdscb": ["fvxed1z", "f1j2a01o"],
104
- "B9nohqn": ["f1j2a01o", "fvxed1z"],
105
- "B1dhsta": ["fsamouo", "f1aazreq"],
106
- "Bjdmjzx": ["f1aazreq", "fsamouo"],
249
+ "F7kzw7": "f1vw7pcs",
250
+ "B13j16c": ["fi41b8y", "f1jbgs3z"],
251
+ "Bk8j60v": "f1p43pof",
252
+ "Bpbi4o9": ["f1jbgs3z", "fi41b8y"],
253
+ "rskduk": "f1iq3fds",
254
+ "Dctjco": ["f1r2jemi", "f11olovk"],
255
+ "J4s2b0": "fd0py6g",
256
+ "svcy3r": ["f11olovk", "f1r2jemi"],
257
+ "frdscb": ["fc4gh2t", "flndy84"],
258
+ "B9nohqn": ["flndy84", "fc4gh2t"],
259
+ "B1dhsta": ["fxgx2h0", "fh20ihy"],
260
+ "Bjdmjzx": ["fh20ihy", "fxgx2h0"],
107
261
  "oqd9ik": "ffdc0f3",
108
262
  "Bs6t6z0": "fqc6z8f",
109
263
  "Hdbjpj": "f11ef69",
110
- "mpb1vu": "f119hevp",
264
+ "Bunff0j": "fs357bs"
265
+ },
266
+ "selected": {
267
+ "F7kzw7": "f27ds8h",
268
+ "B13j16c": ["f2f2y1h", "fvkrelc"],
269
+ "Bk8j60v": "f1ta67ae",
270
+ "Bpbi4o9": ["fvkrelc", "f2f2y1h"],
271
+ "xay6vd": "f155wmea",
272
+ "F7whla": ["fz4itc5", "f10rdlzq"],
273
+ "Bkmnrzr": "f16a8na0",
274
+ "jjqiyg": ["f10rdlzq", "fz4itc5"],
275
+ "wo4o56": "fn9ghnu",
276
+ "Bm7x6ru": ["faeqx0n", "fyxlcfc"],
277
+ "id6p2d": "f1i10yqr",
278
+ "obzwb3": ["fyxlcfc", "faeqx0n"]
279
+ },
280
+ "disabled": {
281
+ "F7kzw7": "f8fvnjs",
282
+ "B13j16c": ["f1sie595", "f68ecio"],
283
+ "Bk8j60v": "f17l895u",
284
+ "Bpbi4o9": ["f68ecio", "f1sie595"]
285
+ },
286
+ "mediumHorizontal": {
111
287
  "Bj55yzk": "fw2wsqs",
112
- "jc51t6": ["f1l9humg", "f3c5rjh"],
113
- "cnmfks": ["f3c5rjh", "f1l9humg"],
114
- "Bt86n75": "fg6xmog"
288
+ "Bouo9z4": "f1dqk8ca",
289
+ "Bjz4wo8": ["f6x7jdz", "f18ezp6p"],
290
+ "B3zxwmv": "fvhr22v",
291
+ "exdlgl": ["f18ezp6p", "f6x7jdz"],
292
+ "mpb1vu": "f11eg72r",
293
+ "jc51t6": ["fohqjvh", "f3if56i"],
294
+ "cnmfks": ["f3if56i", "fohqjvh"]
115
295
  },
116
- "small": {
296
+ "mediumVertical": {
297
+ "Bj55yzk": "f1wxxv1q",
298
+ "Bouo9z4": "f1dqk8ca",
299
+ "Bjz4wo8": ["f6x7jdz", "f18ezp6p"],
300
+ "B3zxwmv": "fvhr22v",
301
+ "exdlgl": ["f18ezp6p", "f6x7jdz"],
302
+ "jc51t6": ["f1cvlmu2", "f15lyva8"],
303
+ "u6d25": "f1lbpgiz",
304
+ "Biobvvw": "fqauqbq"
305
+ },
306
+ "smallHorizontal": {
307
+ "Bj55yzk": "fw2wsqs",
308
+ "Bouo9z4": "fz0tshs",
309
+ "Bjz4wo8": ["fyhqs13", "f11og0us"],
310
+ "B3zxwmv": "f1qq4lft",
311
+ "exdlgl": ["f11og0us", "fyhqs13"],
312
+ "mpb1vu": "f4hj4m7",
117
313
  "jc51t6": ["f1i8k3s6", "fy447wy"],
118
314
  "cnmfks": ["fy447wy", "f1i8k3s6"]
119
- }
120
- }, {
121
- "d": [".f1mif8u4:after{background-color:none;}", ".fvxed1z:after{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1j2a01o:after{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fsamouo:after{border-top-right-radius:var(--borderRadiusMedium);}", ".f1aazreq:after{border-top-left-radius:var(--borderRadiusMedium);}", ".ffdc0f3:after{box-sizing:border-box;}", ".fqc6z8f:after{content:\"\";}", ".f11ef69:after{position:absolute;}", ".f119hevp:after{height:2px;}", ".fw2wsqs:after{bottom:0;}", ".f1l9humg:after{left:10px;}", ".f3c5rjh:after{right:10px;}", ".f1i8k3s6:after{left:6px;}", ".fy447wy:after{right:6px;}"],
122
- "h": [".fg6xmog:hover:after{background-color:var(--colorNeutralStroke1);}"]
123
- });
124
- /**
125
- * Indicator styles for the root slot when vertical.
126
- */
127
-
128
-
129
- const useVerticalIndicatorStyles = /*#__PURE__*/react_1.__styles({
130
- "base": {
131
- "B1dvbpk": "ffgj6zs",
132
- "px8gyy": ["f16to4m4", "f1ceoihi"],
133
- "B5c9fhp": ["f1ceoihi", "f16to4m4"],
134
- "Bhe99jt": ["fkibbow", "fnlo9u7"],
135
- "B2r1szc": ["fnlo9u7", "fkibbow"],
136
- "Bmqnesq": "f170vdtw",
137
- "rurcny": "fuzzvh5",
138
- "xx9plb": "fxf9f1y",
139
- "Bdn98qo": "f15bpuwh",
140
- "Byque4d": ["f1t0u0az", "fmlx6bj"],
141
- "Bf8kmfk": "f1bwym7p",
142
- "Bj2wrql": "fk3f4e0",
143
- "Cgij5x": "fl6lm7t"
144
315
  },
145
- "small": {
146
- "Bf8kmfk": "fp6nmmp",
147
- "Bj2wrql": "f14i0ki9"
316
+ "smallVertical": {
317
+ "Bj55yzk": "fu7gapb",
318
+ "Bouo9z4": "f1dqk8ca",
319
+ "Bjz4wo8": ["f6x7jdz", "f18ezp6p"],
320
+ "B3zxwmv": "fvhr22v",
321
+ "exdlgl": ["f18ezp6p", "f6x7jdz"],
322
+ "jc51t6": ["f1cvlmu2", "f15lyva8"],
323
+ "u6d25": "f1vmyuyf",
324
+ "Biobvvw": "fqauqbq"
148
325
  }
149
326
  }, {
150
- "d": [".ffgj6zs:before{background-color:none;}", ".f16to4m4:before{border-bottom-right-radius:var(--borderRadiusMedium);}", ".f1ceoihi:before{border-bottom-left-radius:var(--borderRadiusMedium);}", ".fkibbow:before{border-top-right-radius:var(--borderRadiusMedium);}", ".fnlo9u7:before{border-top-left-radius:var(--borderRadiusMedium);}", ".f170vdtw:before{box-sizing:border-box;}", ".fuzzvh5:before{content:\"\";}", ".fxf9f1y:before{position:absolute;}", ".f15bpuwh:before{width:2px;}", ".f1t0u0az:before{left:0;}", ".fmlx6bj:before{right:0;}", ".f1bwym7p:before{top:10px;}", ".fk3f4e0:before{bottom:10px;}", ".fp6nmmp:before{top:6px;}", ".f14i0ki9:before{bottom:6px;}"],
151
- "h": [".fl6lm7t:hover:before{background-color:var(--colorNeutralStroke1);}"]
327
+ "d": [".f1vw7pcs:after{border-top-color:var(--colorTransparentStroke);}", ".fi41b8y:after{border-right-color:var(--colorTransparentStroke);}", ".f1jbgs3z:after{border-left-color:var(--colorTransparentStroke);}", ".f1p43pof:after{border-bottom-color:var(--colorTransparentStroke);}", ".f1iq3fds:after{border-top-style:solid;}", ".f1r2jemi:after{border-right-style:solid;}", ".f11olovk:after{border-left-style:solid;}", ".fd0py6g:after{border-bottom-style:solid;}", ".fc4gh2t:after{border-bottom-right-radius:var(--borderRadiusCircular);}", ".flndy84:after{border-bottom-left-radius:var(--borderRadiusCircular);}", ".fxgx2h0:after{border-top-right-radius:var(--borderRadiusCircular);}", ".fh20ihy:after{border-top-left-radius:var(--borderRadiusCircular);}", ".ffdc0f3:after{box-sizing:border-box;}", ".fqc6z8f:after{content:\"\";}", ".f11ef69:after{position:absolute;}", ".fs357bs:after{z-index:1;}", ".f27ds8h:after{border-top-color:var(--colorCompoundBrandStroke);}", ".f2f2y1h:after{border-right-color:var(--colorCompoundBrandStroke);}", ".fvkrelc:after{border-left-color:var(--colorCompoundBrandStroke);}", ".f1ta67ae:after{border-bottom-color:var(--colorCompoundBrandStroke);}", ".f8fvnjs:after{border-top-color:var(--colorNeutralForegroundDisabled);}", ".f1sie595:after{border-right-color:var(--colorNeutralForegroundDisabled);}", ".f68ecio:after{border-left-color:var(--colorNeutralForegroundDisabled);}", ".f17l895u:after{border-bottom-color:var(--colorNeutralForegroundDisabled);}", ".fw2wsqs:after{bottom:0;}", ".f1dqk8ca:after{border-top-width:calc(var(--strokeWidthThicker) / 2.0);}", ".f6x7jdz:after{border-right-width:calc(var(--strokeWidthThicker) / 2.0);}", ".f18ezp6p:after{border-left-width:calc(var(--strokeWidthThicker) / 2.0);}", ".fvhr22v:after{border-bottom-width:calc(var(--strokeWidthThicker) / 2.0);}", ".f11eg72r:after{height:var(--strokeWidthThicker);}", ".fohqjvh:after{left:12px;}", ".f3if56i:after{right:12px;}", ".f1wxxv1q:after{bottom:8px;}", ".f1cvlmu2:after{left:0;}", ".f15lyva8:after{right:0;}", ".f1lbpgiz:after{top:8px;}", ".fqauqbq:after{width:var(--strokeWidthThicker);}", ".fz0tshs:after{border-top-width:calc(var(--strokeWidthThick) / 2.0);}", ".fyhqs13:after{border-right-width:calc(var(--strokeWidthThick) / 2.0);}", ".f11og0us:after{border-left-width:calc(var(--strokeWidthThick) / 2.0);}", ".f1qq4lft:after{border-bottom-width:calc(var(--strokeWidthThick) / 2.0);}", ".f4hj4m7:after{height:var(--strokeWidthThick);}", ".f1i8k3s6:after{left:6px;}", ".fy447wy:after{right:6px;}", ".fu7gapb:after{bottom:4px;}", ".f1vmyuyf:after{top:4px;}"],
328
+ "h": [".f155wmea:hover:after{border-top-color:var(--colorCompoundBrandStrokeHover);}", ".fz4itc5:hover:after{border-right-color:var(--colorCompoundBrandStrokeHover);}", ".f10rdlzq:hover:after{border-left-color:var(--colorCompoundBrandStrokeHover);}", ".f16a8na0:hover:after{border-bottom-color:var(--colorCompoundBrandStrokeHover);}"],
329
+ "a": [".fn9ghnu:active:after{border-top-color:var(--colorCompoundBrandStrokePressed);}", ".faeqx0n:active:after{border-right-color:var(--colorCompoundBrandStrokePressed);}", ".fyxlcfc:active:after{border-left-color:var(--colorCompoundBrandStrokePressed);}", ".f1i10yqr:active:after{border-bottom-color:var(--colorCompoundBrandStrokePressed);}"]
152
330
  });
153
331
  /**
154
332
  * Styles for the icon slot.
@@ -159,7 +337,9 @@ const useIconStyles = /*#__PURE__*/react_1.__styles({
159
337
  "base": {
160
338
  "Bt984gj": "f122n59",
161
339
  "mc9l5x": "ftuwxu6",
162
- "Brf1p80": "f4d9j23"
340
+ "Brf1p80": "f4d9j23",
341
+ "B68tc82": "f1p9o1ba",
342
+ "Bmxbyg5": "f1sil6mw"
163
343
  },
164
344
  "small": {
165
345
  "Be2twd7": "fe5j1ua",
@@ -172,7 +352,7 @@ const useIconStyles = /*#__PURE__*/react_1.__styles({
172
352
  "a9b677": "f64fuq3"
173
353
  }
174
354
  }, {
175
- "d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".fe5j1ua{font-size:20px;}", ".fjamq6b{height:20px;}", ".f64fuq3{width:20px;}"]
355
+ "d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".f1p9o1ba{overflow-x:hidden;}", ".f1sil6mw{overflow-y:hidden;}", ".fe5j1ua{font-size:20px;}", ".fjamq6b{height:20px;}", ".f64fuq3{width:20px;}"]
176
356
  });
177
357
  /**
178
358
  * Styles for the content slot (children)
@@ -181,36 +361,53 @@ const useIconStyles = /*#__PURE__*/react_1.__styles({
181
361
 
182
362
  const useContentStyles = /*#__PURE__*/react_1.__styles({
183
363
  "base": {
184
- "uwmqm3": ["f161knb0", "f12huiiw"],
185
- "z189sj": ["f12huiiw", "f161knb0"]
364
+ "Be2twd7": "fkhj508",
365
+ "Bhrd7zp": "figsok6",
366
+ "Bg96gwp": "f1i3iumi",
367
+ "B68tc82": "f1p9o1ba",
368
+ "Bmxbyg5": "f1sil6mw",
369
+ "z8tnut": "f1g0x7ka",
370
+ "z189sj": ["f12huiiw", "f161knb0"],
371
+ "Byoj8tv": "f1qch9an",
372
+ "uwmqm3": ["f161knb0", "f12huiiw"]
186
373
  },
187
- "small": {
188
- "uwmqm3": ["f161knb0", "f12huiiw"],
189
- "z189sj": ["f12huiiw", "f161knb0"]
374
+ "selected": {
375
+ "Be2twd7": "fkhj508",
376
+ "Bhrd7zp": "fl43uef",
377
+ "Bg96gwp": "f1i3iumi"
190
378
  }
191
379
  }, {
192
- "d": [".f161knb0{padding-left:2px;}", ".f12huiiw{padding-right:2px;}"]
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;}", ".f1g0x7ka{padding-top:0;}", ".f12huiiw{padding-right:2px;}", ".f161knb0{padding-left:2px;}", ".f1qch9an{padding-bottom:0;}", ".fl43uef{font-weight:var(--fontWeightSemibold);}"]
193
381
  });
194
382
  /**
195
383
  * Apply styling to the Tab slots based on the state
196
384
  */
197
- // eslint-disable-next-line @typescript-eslint/naming-convention
198
385
 
199
386
 
200
387
  const useTabStyles_unstable = state => {
201
388
  const rootStyles = useRootStyles();
202
389
  const focusStyles = useFocusStyles();
203
- const horizontalIndicatorStyles = useHorizontalIndicatorStyles();
204
- const verticalIndicatorStyles = useVerticalIndicatorStyles();
390
+ const pendingIndicatorStyles = usePendingIndicatorStyles();
391
+ const activeIndicatorStyles = useActiveIndicatorStyles();
205
392
  const iconStyles = useIconStyles();
206
393
  const contentStyles = useContentStyles();
207
- state.root.className = react_1.mergeClasses(exports.tabClassName, rootStyles.base, focusStyles.base, state.size === 'small' && rootStyles.small, state.appearance === 'subtle' && rootStyles.subtle, state.vertical ? verticalIndicatorStyles.base : horizontalIndicatorStyles.base, state.size === 'small' && (state.vertical ? verticalIndicatorStyles.small : horizontalIndicatorStyles.small), state.root.className);
394
+ const {
395
+ appearance,
396
+ disabled,
397
+ selected,
398
+ size,
399
+ vertical
400
+ } = 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)
402
+ 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
+ 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);
208
404
 
209
405
  if (state.icon) {
210
- state.icon.className = react_1.mergeClasses(iconStyles.base, iconStyles[state.size], state.icon.className);
406
+ state.icon.className = react_1.mergeClasses(exports.tabClassNames.icon, iconStyles.base, iconStyles[size], state.icon.className);
211
407
  }
212
408
 
213
- state.content.className = react_1.mergeClasses(contentStyles.base, state.size === 'small' && contentStyles.small, state.content.className);
409
+ state.content.className = react_1.mergeClasses(exports.tabClassNames.content, contentStyles.base, selected && contentStyles.selected, state.content.className);
410
+ useTabAnimatedIndicator_1.useTabAnimatedIndicatorStyles_unstable(state);
214
411
  return state;
215
412
  };
216
413
 
@@ -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;;AAEa,OAAA,CAAA,YAAA,GAAe,SAAf;AAEb;;AAEG;;AACH,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,EAAtB;AAoCA;;AAEG;;;AACH,MAAM,cAAc,gBAAG,OAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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0B,UAAU,CAAC,KAJhB,EAKrB,KAAK,CAAC,UAAN,KAAqB,QAArB,IAAiC,UAAU,CAAC,MALvB,EAMrB,KAAK,CAAC,QAAN,GAAiB,uBAAuB,CAAC,IAAzC,GAAgD,yBAAyB,CAAC,IANrD,EAOrB,KAAK,CAAC,IAAN,KAAe,OAAf,KAA2B,KAAK,CAAC,QAAN,GAAiB,uBAAuB,CAAC,KAAzC,GAAiD,yBAAyB,CAAC,KAAtG,CAPqB,EAQrB,KAAK,CAAC,IAAN,CAAW,SARU,CAAvB;;AAWA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,OAAA,CAAA,YAAA,CAAa,UAAU,CAAC,IAAxB,EAA8B,UAAU,CAAC,KAAK,CAAC,IAAP,CAAxC,EAAsD,KAAK,CAAC,IAAN,CAAW,SAAjE,CAAvB;AACD;;AAED,EAAA,KAAK,CAAC,OAAN,CAAc,SAAd,GAA0B,OAAA,CAAA,YAAA,CACxB,aAAa,CAAC,IADU,EAExB,KAAK,CAAC,IAAN,KAAe,OAAf,IAA0B,aAAa,CAAC,KAFhB,EAGxB,KAAK,CAAC,OAAN,CAAc,SAHU,CAA1B;AAMA,SAAO,KAAP;AACD,CA9BM;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourcesContent":["import type { 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 { tabPendingDesignTokens } from '../../tab.constants';\n\nexport const tabClassName = 'fui-Tab';\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n base: {\n backgroundColor: 'none',\n ...shorthands.borderColor('none'),\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n ...shorthands.borderWidth(tokens.strokeWidthThin),\n columnGap: tabPendingDesignTokens.gap.medium,\n cursor: 'pointer',\n display: 'flex',\n flexDirection: 'row',\n fontFamily: tokens.fontFamilyBase,\n fontSize: tokens.fontSizeBase300,\n lineHeight: tokens.lineHeightBase300,\n ...shorthands.padding(tabPendingDesignTokens.tabPadding.medium),\n position: 'relative',\n ...shorthands.overflow('hidden'),\n },\n horizontal: {\n alignItems: 'center',\n justifyContent: 'center',\n },\n vertical: {\n alignItems: 'center',\n justifyContent: 'flex-start',\n },\n small: {\n ...shorthands.padding(tabPendingDesignTokens.tabPadding.small),\n columnGap: tabPendingDesignTokens.gap.small,\n },\n subtle: {\n ':hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n },\n },\n});\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/**\n * Indicator styles for the root slot when horizontal.\n */\nconst useHorizontalIndicatorStyles = makeStyles({\n base: {\n ':after': {\n backgroundColor: 'none',\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n height: tabPendingDesignTokens.indicatorThickness,\n bottom: '0',\n left: tabPendingDesignTokens.tabPadding.medium,\n right: tabPendingDesignTokens.tabPadding.medium,\n },\n ':hover': {\n ':after': {\n backgroundColor: tokens.colorNeutralStroke1,\n },\n },\n },\n small: {\n ':after': {\n left: tabPendingDesignTokens.tabPadding.small,\n right: tabPendingDesignTokens.tabPadding.small,\n },\n },\n});\n\n/**\n * Indicator styles for the root slot when vertical.\n */\nconst useVerticalIndicatorStyles = makeStyles({\n base: {\n ':before': {\n backgroundColor: 'none',\n ...shorthands.borderRadius(tokens.borderRadiusMedium),\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n width: tabPendingDesignTokens.indicatorThickness,\n left: '0',\n top: tabPendingDesignTokens.tabPadding.medium,\n bottom: tabPendingDesignTokens.tabPadding.medium,\n },\n ':hover': {\n ':before': {\n backgroundColor: tokens.colorNeutralStroke1,\n },\n },\n },\n small: {\n ':before': {\n top: tabPendingDesignTokens.tabPadding.small,\n bottom: tabPendingDesignTokens.tabPadding.small,\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 },\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 paddingLeft: tabPendingDesignTokens.contentPadding.medium,\n paddingRight: tabPendingDesignTokens.contentPadding.medium,\n },\n small: {\n paddingLeft: tabPendingDesignTokens.contentPadding.small,\n paddingRight: tabPendingDesignTokens.contentPadding.small,\n },\n});\n\n/**\n * Apply styling to the Tab slots based on the state\n */\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport const useTabStyles_unstable = (state: TabState): TabState => {\n const rootStyles = useRootStyles();\n const focusStyles = useFocusStyles();\n const horizontalIndicatorStyles = useHorizontalIndicatorStyles();\n const verticalIndicatorStyles = useVerticalIndicatorStyles();\n const iconStyles = useIconStyles();\n const contentStyles = useContentStyles();\n\n state.root.className = mergeClasses(\n tabClassName,\n rootStyles.base,\n focusStyles.base,\n state.size === 'small' && rootStyles.small,\n state.appearance === 'subtle' && rootStyles.subtle,\n state.vertical ? verticalIndicatorStyles.base : horizontalIndicatorStyles.base,\n state.size === 'small' && (state.vertical ? verticalIndicatorStyles.small : horizontalIndicatorStyles.small),\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(iconStyles.base, iconStyles[state.size], state.icon.className);\n }\n\n state.content.className = mergeClasses(\n contentStyles.base,\n state.size === 'small' && contentStyles.small,\n state.content.className,\n );\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;;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;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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,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,14 +1,17 @@
1
1
  import * as React from 'react';
2
2
  import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
3
3
  import { TabValue } from '../Tab/Tab.types';
4
- export declare type RegisterTabData = {
4
+ export declare type TabRegisterData = {
5
5
  /**
6
- * The value of the selected tab.
6
+ * The value of the tab.
7
7
  */
8
8
  value: TabValue;
9
+ /**
10
+ * The reference to the tab HTML element.
11
+ */
9
12
  ref: React.RefObject<HTMLElement>;
10
13
  };
11
- export declare type RegisterTabEventHandler = (data: RegisterTabData) => void;
14
+ export declare type RegisterTabEventHandler = (data: TabRegisterData) => void;
12
15
  export declare type SelectTabData = {
13
16
  /**
14
17
  * The value of the selected tab.
@@ -32,6 +35,11 @@ declare type TabListCommons = {
32
35
  * @default 'transparent'
33
36
  */
34
37
  appearance?: 'transparent' | 'subtle';
38
+ /**
39
+ * A tab list can be set to disable interaction.
40
+ * @default false
41
+ */
42
+ disabled?: boolean;
35
43
  /**
36
44
  * Raised when a tab is selected.
37
45
  */
@@ -62,7 +70,7 @@ export declare type TabListProps = ComponentProps<TabListSlots> & TabListCommons
62
70
  */
63
71
  defaultSelectedValue?: TabValue;
64
72
  };
65
- export declare type TabListContextValue = Pick<TabListCommons, 'onTabSelect' | 'selectedValue'> & Required<Pick<TabListCommons, 'appearance' | 'size' | 'vertical'>> & {
73
+ export declare type TabListContextValue = Pick<TabListCommons, 'onTabSelect' | 'selectedValue'> & Required<Pick<TabListCommons, 'appearance' | 'disabled' | 'size' | 'vertical'>> & {
66
74
  /** A callback to allow a tab to register itself with the tab list. */
67
75
  onRegister: RegisterTabEventHandler;
68
76
  /** A callback to allow a tab to unregister itself with the tab list. */
@@ -71,6 +79,14 @@ export declare type TabListContextValue = Pick<TabListCommons, 'onTabSelect' | '
71
79
  * A callback to allow a tab to select itself when pressed.
72
80
  */
73
81
  onSelect: SelectTabEventHandler;
82
+ /**
83
+ * Gets the registered tab data along with current and previous selected values.
84
+ */
85
+ getRegisteredTabs: () => {
86
+ selectedValue?: TabValue;
87
+ previousSelectedValue?: TabValue;
88
+ registeredTabs: Record<string, TabRegisterData>;
89
+ };
74
90
  };
75
91
  /**
76
92
  * Context values used in rendering TabList.
@@ -81,19 +97,8 @@ export declare type TabListContextValues = {
81
97
  */
82
98
  tabList: TabListContextValue;
83
99
  };
84
- /**
85
- * A bounding rectangle of a tab
86
- */
87
- export declare type TabContentRect = {
88
- x: number;
89
- y: number;
90
- width: number;
91
- height: number;
92
- };
93
100
  /**
94
101
  * State used in rendering TabList.
95
102
  */
96
- export declare type TabListState = ComponentState<Required<TabListSlots>> & TabListContextValue & {
97
- selectedTabRect?: TabContentRect;
98
- };
103
+ export declare type TabListState = ComponentState<Required<TabListSlots>> & TabListContextValue;
99
104
  export {};