@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.
Files changed (69) hide show
  1. package/CHANGELOG.json +236 -6
  2. package/CHANGELOG.md +73 -10
  3. package/dist/{react-tabs.d.ts → index.d.ts} +46 -51
  4. package/{lib → dist}/tsdoc-metadata.json +0 -0
  5. package/lib/components/Tab/Tab.types.js.map +1 -1
  6. package/lib/components/Tab/useTab.js +3 -0
  7. package/lib/components/Tab/useTab.js.map +1 -1
  8. package/lib/components/Tab/useTabAnimatedIndicator.js +6 -6
  9. package/lib/components/Tab/useTabAnimatedIndicator.js.map +1 -1
  10. package/lib/components/Tab/useTabStyles.js +114 -176
  11. package/lib/components/Tab/useTabStyles.js.map +1 -1
  12. package/lib/components/TabList/TabList.types.js.map +1 -1
  13. package/lib/components/TabList/useTabList.js +2 -1
  14. package/lib/components/TabList/useTabList.js.map +1 -1
  15. package/lib/components/TabList/useTabListStyles.js +9 -2
  16. package/lib/components/TabList/useTabListStyles.js.map +1 -1
  17. package/lib-commonjs/components/Tab/useTab.js +3 -0
  18. package/lib-commonjs/components/Tab/useTab.js.map +1 -1
  19. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js +7 -7
  20. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.js.map +1 -1
  21. package/lib-commonjs/components/Tab/useTabStyles.js +113 -176
  22. package/lib-commonjs/components/Tab/useTabStyles.js.map +1 -1
  23. package/lib-commonjs/components/TabList/useTabList.js +2 -1
  24. package/lib-commonjs/components/TabList/useTabList.js.map +1 -1
  25. package/lib-commonjs/components/TabList/useTabListStyles.js +9 -2
  26. package/lib-commonjs/components/TabList/useTabListStyles.js.map +1 -1
  27. package/package.json +11 -11
  28. package/lib/Tab.d.ts +0 -1
  29. package/lib/TabList.d.ts +0 -1
  30. package/lib/components/Tab/Tab.d.ts +0 -6
  31. package/lib/components/Tab/Tab.types.d.ts +0 -61
  32. package/lib/components/Tab/index.d.ts +0 -6
  33. package/lib/components/Tab/renderTab.d.ts +0 -5
  34. package/lib/components/Tab/useTab.d.ts +0 -12
  35. package/lib/components/Tab/useTabAnimatedIndicator.d.ts +0 -5
  36. package/lib/components/Tab/useTabStyles.d.ts +0 -8
  37. package/lib/components/TabList/TabList.d.ts +0 -6
  38. package/lib/components/TabList/TabList.types.d.ts +0 -104
  39. package/lib/components/TabList/TabListContext.d.ts +0 -3
  40. package/lib/components/TabList/index.d.ts +0 -5
  41. package/lib/components/TabList/renderTabList.d.ts +0 -5
  42. package/lib/components/TabList/useTabList.d.ts +0 -12
  43. package/lib/components/TabList/useTabListContextValues.d.ts +0 -2
  44. package/lib/components/TabList/useTabListStyles.d.ts +0 -8
  45. package/lib/index.d.ts +0 -4
  46. package/lib/tab.constants.d.ts +0 -62
  47. package/lib/tab.constants.js +0 -68
  48. package/lib/tab.constants.js.map +0 -1
  49. package/lib-commonjs/Tab.d.ts +0 -1
  50. package/lib-commonjs/TabList.d.ts +0 -1
  51. package/lib-commonjs/components/Tab/Tab.d.ts +0 -6
  52. package/lib-commonjs/components/Tab/Tab.types.d.ts +0 -61
  53. package/lib-commonjs/components/Tab/index.d.ts +0 -6
  54. package/lib-commonjs/components/Tab/renderTab.d.ts +0 -5
  55. package/lib-commonjs/components/Tab/useTab.d.ts +0 -12
  56. package/lib-commonjs/components/Tab/useTabAnimatedIndicator.d.ts +0 -5
  57. package/lib-commonjs/components/Tab/useTabStyles.d.ts +0 -8
  58. package/lib-commonjs/components/TabList/TabList.d.ts +0 -6
  59. package/lib-commonjs/components/TabList/TabList.types.d.ts +0 -104
  60. package/lib-commonjs/components/TabList/TabListContext.d.ts +0 -3
  61. package/lib-commonjs/components/TabList/index.d.ts +0 -5
  62. package/lib-commonjs/components/TabList/renderTabList.d.ts +0 -5
  63. package/lib-commonjs/components/TabList/useTabList.d.ts +0 -12
  64. package/lib-commonjs/components/TabList/useTabListContextValues.d.ts +0 -2
  65. package/lib-commonjs/components/TabList/useTabListStyles.d.ts +0 -8
  66. package/lib-commonjs/index.d.ts +0 -4
  67. package/lib-commonjs/tab.constants.d.ts +0 -62
  68. package/lib-commonjs/tab.constants.js +0 -75
  69. package/lib-commonjs/tab.constants.js.map +0 -1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,237 @@
2
2
  "name": "@fluentui/react-tabs",
3
3
  "entries": [
4
4
  {
5
- "date": "Tue, 19 Apr 2022 19:14:06 GMT",
5
+ "date": "Mon, 23 May 2022 12:10:14 GMT",
6
+ "tag": "@fluentui/react-tabs_v9.0.0-rc.2",
7
+ "version": "9.0.0-rc.2",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "gcox@microsoft.com",
12
+ "package": "@fluentui/react-tabs",
13
+ "commit": "5a4a2c6b1ed8d4c2abb12a08d1abec71e9055ce6",
14
+ "comment": "Removed TabListCommons and TabCommons types"
15
+ },
16
+ {
17
+ "author": "gcox@microsoft.com",
18
+ "package": "@fluentui/react-tabs",
19
+ "commit": "58c5aafd8deb82eaf1ff117d9e2c9029f5658168",
20
+ "comment": "Removed flexgap from useTabStyles"
21
+ },
22
+ {
23
+ "author": "gcox@microsoft.com",
24
+ "package": "@fluentui/react-tabs",
25
+ "commit": "3460b40b4faf6c8939680f69878446da23ea20f9",
26
+ "comment": "Updated to focus on current selected tab"
27
+ },
28
+ {
29
+ "author": "gcox@microsoft.com",
30
+ "package": "@fluentui/react-tabs",
31
+ "commit": "447a9aa0c3527d42bd071e63777b7afa1a14b273",
32
+ "comment": "Used background rather than border"
33
+ },
34
+ {
35
+ "author": "gcox@microsoft.com",
36
+ "package": "@fluentui/react-tabs",
37
+ "commit": "083e54e4374c25be4200c27922c16621431bb2bc",
38
+ "comment": "Moved react-tabs to stable and rc.1"
39
+ },
40
+ {
41
+ "author": "martinhochel@microsoft.com",
42
+ "package": "@fluentui/react-tabs",
43
+ "commit": "e7b70cb06f4422e5574993fd2ad44d9073647417",
44
+ "comment": "feat: ship rolluped only dts"
45
+ },
46
+ {
47
+ "author": "olfedias@microsoft.com",
48
+ "package": "@fluentui/react-tabs",
49
+ "commit": "f120fe9160ad7311a87af0cfacd8d2fb26275e34",
50
+ "comment": "chore: Update Griffel to latest version"
51
+ },
52
+ {
53
+ "author": "gcox@microsoft.com",
54
+ "package": "@fluentui/react-tabs",
55
+ "commit": "42e0900f7a008d83fdca5a6e5620f49951ecedf1",
56
+ "comment": "Remove overflow to allow focus outline to display"
57
+ },
58
+ {
59
+ "author": "olfedias@microsoft.com",
60
+ "package": "@fluentui/react-tabs",
61
+ "commit": "60804cec07a495b8a5d1fc66338bf0443b212144",
62
+ "comment": "chore: Update Griffel to latest version"
63
+ },
64
+ {
65
+ "author": "gcox@microsoft.com",
66
+ "package": "@fluentui/react-tabs",
67
+ "commit": "48bc32c6df6279b46ba94aab16f8bf650b17bd1e",
68
+ "comment": "Add aria-label for icon only story"
69
+ },
70
+ {
71
+ "author": "beachball",
72
+ "package": "@fluentui/react-tabs",
73
+ "comment": "Bump @fluentui/react-context-selector to v9.0.0-rc.9",
74
+ "commit": "8d58f08997acf595e3eb7f628123e7fa7830c394"
75
+ },
76
+ {
77
+ "author": "beachball",
78
+ "package": "@fluentui/react-tabs",
79
+ "comment": "Bump @fluentui/react-tabster to v9.0.0-rc.10",
80
+ "commit": "8d58f08997acf595e3eb7f628123e7fa7830c394"
81
+ },
82
+ {
83
+ "author": "beachball",
84
+ "package": "@fluentui/react-tabs",
85
+ "comment": "Bump @fluentui/react-theme to v9.0.0-rc.8",
86
+ "commit": "8d58f08997acf595e3eb7f628123e7fa7830c394"
87
+ },
88
+ {
89
+ "author": "beachball",
90
+ "package": "@fluentui/react-tabs",
91
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.9",
92
+ "commit": "8d58f08997acf595e3eb7f628123e7fa7830c394"
93
+ },
94
+ {
95
+ "author": "beachball",
96
+ "package": "@fluentui/react-tabs",
97
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.6",
98
+ "commit": "8d58f08997acf595e3eb7f628123e7fa7830c394"
99
+ }
100
+ ]
101
+ }
102
+ },
103
+ {
104
+ "date": "Thu, 05 May 2022 18:26:30 GMT",
105
+ "tag": "@fluentui/react-tabs_v9.0.0-beta.12",
106
+ "version": "9.0.0-beta.12",
107
+ "comments": {
108
+ "prerelease": [
109
+ {
110
+ "author": "beachball",
111
+ "package": "@fluentui/react-tabs",
112
+ "comment": "Bump @fluentui/react-context-selector to v9.0.0-rc.8",
113
+ "commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
114
+ },
115
+ {
116
+ "author": "beachball",
117
+ "package": "@fluentui/react-tabs",
118
+ "comment": "Bump @fluentui/react-tabster to v9.0.0-rc.9",
119
+ "commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
120
+ },
121
+ {
122
+ "author": "beachball",
123
+ "package": "@fluentui/react-tabs",
124
+ "comment": "Bump @fluentui/react-theme to v9.0.0-rc.7",
125
+ "commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
126
+ },
127
+ {
128
+ "author": "beachball",
129
+ "package": "@fluentui/react-tabs",
130
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.8",
131
+ "commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
132
+ },
133
+ {
134
+ "author": "beachball",
135
+ "package": "@fluentui/react-tabs",
136
+ "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.5",
137
+ "commit": "c5abb9c480ac94d12aa644d68d30773d77f2a159"
138
+ }
139
+ ]
140
+ }
141
+ },
142
+ {
143
+ "date": "Wed, 04 May 2022 13:26:52 GMT",
144
+ "tag": "@fluentui/react-tabs_v9.0.0-beta.11",
145
+ "version": "9.0.0-beta.11",
146
+ "comments": {
147
+ "prerelease": [
148
+ {
149
+ "author": "gcox@microsoft.com",
150
+ "package": "@fluentui/react-tabs",
151
+ "commit": "97939a4e5f523b3ef05c815f909819701eee92ea",
152
+ "comment": "Added aria-selected"
153
+ },
154
+ {
155
+ "author": "gcox@microsoft.com",
156
+ "package": "@fluentui/react-tabs",
157
+ "commit": "c2562b5382305152a09402a367ec853d603438e7",
158
+ "comment": "Updated to use correct pseudo-elements"
159
+ },
160
+ {
161
+ "author": "gcox@microsoft.com",
162
+ "package": "@fluentui/react-tabs",
163
+ "commit": "6c764b820241483c1a9a6e225f758a4c8d4b060e",
164
+ "comment": "Updated to use tokens"
165
+ },
166
+ {
167
+ "author": "gcox@microsoft.com",
168
+ "package": "@fluentui/react-tabs",
169
+ "commit": "55e2b1b53e81efa510a5bc15c6ab0398b52ace7f",
170
+ "comment": "Removed unnecessary width and height from indicators"
171
+ },
172
+ {
173
+ "author": "gcox@microsoft.com",
174
+ "package": "@fluentui/react-tabs",
175
+ "commit": "17ed5008371df7344540af658209840985dc4754",
176
+ "comment": "Allow tab to animate when value is numeric zero"
177
+ },
178
+ {
179
+ "author": "beachball",
180
+ "package": "@fluentui/react-tabs",
181
+ "comment": "Bump @fluentui/react-context-selector to v9.0.0-rc.7",
182
+ "commit": "65f94192ed3b2cde7e52b9c7e12d6f38b81965dd"
183
+ },
184
+ {
185
+ "author": "beachball",
186
+ "package": "@fluentui/react-tabs",
187
+ "comment": "Bump @fluentui/react-tabster to v9.0.0-rc.8",
188
+ "commit": "65f94192ed3b2cde7e52b9c7e12d6f38b81965dd"
189
+ },
190
+ {
191
+ "author": "beachball",
192
+ "package": "@fluentui/react-tabs",
193
+ "comment": "Bump @fluentui/react-theme to v9.0.0-rc.6",
194
+ "commit": "65f94192ed3b2cde7e52b9c7e12d6f38b81965dd"
195
+ },
196
+ {
197
+ "author": "beachball",
198
+ "package": "@fluentui/react-tabs",
199
+ "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.7",
200
+ "commit": "65f94192ed3b2cde7e52b9c7e12d6f38b81965dd"
201
+ }
202
+ ],
203
+ "none": [
204
+ {
205
+ "author": "tristan.watanabe@gmail.com",
206
+ "package": "@fluentui/react-tabs",
207
+ "commit": "f1c470c25de01baef3180067fa99dcc10ec9ebd5",
208
+ "comment": "react-tabs: Move to new common folder."
209
+ }
210
+ ]
211
+ }
212
+ },
213
+ {
214
+ "date": "Mon, 25 Apr 2022 09:32:15 GMT",
215
+ "tag": "@fluentui/react-tabs_v9.0.0-beta.10",
216
+ "version": "9.0.0-beta.10",
217
+ "comments": {
218
+ "prerelease": [
219
+ {
220
+ "author": "gcox@microsoft.com",
221
+ "package": "@fluentui/react-tabs",
222
+ "commit": "9b558cf266817f6499fece14e71bd90e98385a6b",
223
+ "comment": "Added styles to support future overflow calcs"
224
+ },
225
+ {
226
+ "author": "beachball",
227
+ "package": "@fluentui/react-tabs",
228
+ "comment": "Bump @fluentui/react-tabster to v9.0.0-rc.7",
229
+ "commit": "02ca1d3c198452c1693067f5f18bd01b2ed5d6e6"
230
+ }
231
+ ]
232
+ }
233
+ },
234
+ {
235
+ "date": "Tue, 19 Apr 2022 19:16:56 GMT",
6
236
  "tag": "@fluentui/react-tabs_v9.0.0-beta.9",
7
237
  "version": "9.0.0-beta.9",
8
238
  "comments": {
@@ -65,31 +295,31 @@
65
295
  "author": "beachball",
66
296
  "package": "@fluentui/react-tabs",
67
297
  "comment": "Bump @fluentui/react-context-selector to v9.0.0-rc.6",
68
- "commit": "9c8592decacb9f7b1dc608a03c9f991918806008"
298
+ "commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
69
299
  },
70
300
  {
71
301
  "author": "beachball",
72
302
  "package": "@fluentui/react-tabs",
73
303
  "comment": "Bump @fluentui/react-tabster to v9.0.0-rc.6",
74
- "commit": "9c8592decacb9f7b1dc608a03c9f991918806008"
304
+ "commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
75
305
  },
76
306
  {
77
307
  "author": "beachball",
78
308
  "package": "@fluentui/react-tabs",
79
309
  "comment": "Bump @fluentui/react-theme to v9.0.0-rc.5",
80
- "commit": "9c8592decacb9f7b1dc608a03c9f991918806008"
310
+ "commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
81
311
  },
82
312
  {
83
313
  "author": "beachball",
84
314
  "package": "@fluentui/react-tabs",
85
315
  "comment": "Bump @fluentui/react-utilities to v9.0.0-rc.6",
86
- "commit": "9c8592decacb9f7b1dc608a03c9f991918806008"
316
+ "commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
87
317
  },
88
318
  {
89
319
  "author": "beachball",
90
320
  "package": "@fluentui/react-tabs",
91
321
  "comment": "Bump @fluentui/react-conformance-griffel to v9.0.0-beta.4",
92
- "commit": "9c8592decacb9f7b1dc608a03c9f991918806008"
322
+ "commit": "f94b48c825ca8c8b2e3b6755bdd29fe15c7d435d"
93
323
  }
94
324
  ],
95
325
  "none": [
package/CHANGELOG.md CHANGED
@@ -1,12 +1,75 @@
1
1
  # Change Log - @fluentui/react-tabs
2
2
 
3
- This log was last generated on Tue, 19 Apr 2022 19:14:06 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 23 May 2022 12:10:14 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [9.0.0-rc.2](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabs_v9.0.0-rc.2)
8
+
9
+ Mon, 23 May 2022 12:10:14 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabs_v9.0.0-beta.12..@fluentui/react-tabs_v9.0.0-rc.2)
11
+
12
+ ### Changes
13
+
14
+ - Removed TabListCommons and TabCommons types ([PR #22922](https://github.com/microsoft/fluentui/pull/22922) by gcox@microsoft.com)
15
+ - Removed flexgap from useTabStyles ([PR #22920](https://github.com/microsoft/fluentui/pull/22920) by gcox@microsoft.com)
16
+ - Updated to focus on current selected tab ([PR #22900](https://github.com/microsoft/fluentui/pull/22900) by gcox@microsoft.com)
17
+ - Used background rather than border ([PR #22869](https://github.com/microsoft/fluentui/pull/22869) by gcox@microsoft.com)
18
+ - Moved react-tabs to stable and rc.1 ([PR #22923](https://github.com/microsoft/fluentui/pull/22923) by gcox@microsoft.com)
19
+ - feat: ship rolluped only dts ([PR #22828](https://github.com/microsoft/fluentui/pull/22828) by martinhochel@microsoft.com)
20
+ - chore: Update Griffel to latest version ([PR #22894](https://github.com/microsoft/fluentui/pull/22894) by olfedias@microsoft.com)
21
+ - Remove overflow to allow focus outline to display ([PR #22897](https://github.com/microsoft/fluentui/pull/22897) by gcox@microsoft.com)
22
+ - chore: Update Griffel to latest version ([PR #23029](https://github.com/microsoft/fluentui/pull/23029) by olfedias@microsoft.com)
23
+ - Add aria-label for icon only story ([PR #22898](https://github.com/microsoft/fluentui/pull/22898) by gcox@microsoft.com)
24
+ - Bump @fluentui/react-context-selector to v9.0.0-rc.9 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
25
+ - Bump @fluentui/react-tabster to v9.0.0-rc.10 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
26
+ - Bump @fluentui/react-theme to v9.0.0-rc.8 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
27
+ - Bump @fluentui/react-utilities to v9.0.0-rc.9 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
28
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.6 ([PR #23030](https://github.com/microsoft/fluentui/pull/23030) by beachball)
29
+
30
+ ## [9.0.0-beta.12](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabs_v9.0.0-beta.12)
31
+
32
+ Thu, 05 May 2022 18:26:30 GMT
33
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabs_v9.0.0-beta.11..@fluentui/react-tabs_v9.0.0-beta.12)
34
+
35
+ ### Changes
36
+
37
+ - Bump @fluentui/react-context-selector to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
38
+ - Bump @fluentui/react-tabster to v9.0.0-rc.9 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
39
+ - Bump @fluentui/react-theme to v9.0.0-rc.7 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
40
+ - Bump @fluentui/react-utilities to v9.0.0-rc.8 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
41
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.5 ([PR #22857](https://github.com/microsoft/fluentui/pull/22857) by beachball)
42
+
43
+ ## [9.0.0-beta.11](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabs_v9.0.0-beta.11)
44
+
45
+ Wed, 04 May 2022 13:26:52 GMT
46
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabs_v9.0.0-beta.10..@fluentui/react-tabs_v9.0.0-beta.11)
47
+
48
+ ### Changes
49
+
50
+ - Added aria-selected ([PR #22742](https://github.com/microsoft/fluentui/pull/22742) by gcox@microsoft.com)
51
+ - Updated to use correct pseudo-elements ([PR #22768](https://github.com/microsoft/fluentui/pull/22768) by gcox@microsoft.com)
52
+ - Updated to use tokens ([PR #22717](https://github.com/microsoft/fluentui/pull/22717) by gcox@microsoft.com)
53
+ - Removed unnecessary width and height from indicators ([PR #22744](https://github.com/microsoft/fluentui/pull/22744) by gcox@microsoft.com)
54
+ - Allow tab to animate when value is numeric zero ([PR #22754](https://github.com/microsoft/fluentui/pull/22754) by gcox@microsoft.com)
55
+ - Bump @fluentui/react-context-selector to v9.0.0-rc.7 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
56
+ - Bump @fluentui/react-tabster to v9.0.0-rc.8 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
57
+ - Bump @fluentui/react-theme to v9.0.0-rc.6 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
58
+ - Bump @fluentui/react-utilities to v9.0.0-rc.7 ([PR #22786](https://github.com/microsoft/fluentui/pull/22786) by beachball)
59
+
60
+ ## [9.0.0-beta.10](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabs_v9.0.0-beta.10)
61
+
62
+ Mon, 25 Apr 2022 09:32:15 GMT
63
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabs_v9.0.0-beta.9..@fluentui/react-tabs_v9.0.0-beta.10)
64
+
65
+ ### Changes
66
+
67
+ - Added styles to support future overflow calcs ([PR #22548](https://github.com/microsoft/fluentui/pull/22548) by gcox@microsoft.com)
68
+ - Bump @fluentui/react-tabster to v9.0.0-rc.7 ([PR #22601](https://github.com/microsoft/fluentui/pull/22601) by beachball)
69
+
7
70
  ## [9.0.0-beta.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabs_v9.0.0-beta.9)
8
71
 
9
- Tue, 19 Apr 2022 19:14:06 GMT
72
+ Tue, 19 Apr 2022 19:16:56 GMT
10
73
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabs_v9.0.0-beta.8..@fluentui/react-tabs_v9.0.0-beta.9)
11
74
 
12
75
  ### Changes
@@ -20,15 +83,15 @@ Tue, 19 Apr 2022 19:14:06 GMT
20
83
  - react-tabs fit and finish ([PR #22225](https://github.com/microsoft/fluentui/pull/22225) by gcox@microsoft.com)
21
84
  - Set subtle tab background to subtle background tokens ([PR #22346](https://github.com/microsoft/fluentui/pull/22346) by gcox@microsoft.com)
22
85
  - Updated to decrease gap of small vertical tab per figma change ([PR #22335](https://github.com/microsoft/fluentui/pull/22335) by gcox@microsoft.com)
23
- - Bump @fluentui/react-context-selector to v9.0.0-rc.6 ([PR #22367](https://github.com/microsoft/fluentui/pull/22367) by beachball)
24
- - Bump @fluentui/react-tabster to v9.0.0-rc.6 ([PR #22367](https://github.com/microsoft/fluentui/pull/22367) by beachball)
25
- - Bump @fluentui/react-theme to v9.0.0-rc.5 ([PR #22367](https://github.com/microsoft/fluentui/pull/22367) by beachball)
26
- - Bump @fluentui/react-utilities to v9.0.0-rc.6 ([PR #22367](https://github.com/microsoft/fluentui/pull/22367) by beachball)
27
- - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.4 ([PR #22367](https://github.com/microsoft/fluentui/pull/22367) by beachball)
86
+ - Bump @fluentui/react-context-selector to v9.0.0-rc.6 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
87
+ - Bump @fluentui/react-tabster to v9.0.0-rc.6 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
88
+ - Bump @fluentui/react-theme to v9.0.0-rc.5 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
89
+ - Bump @fluentui/react-utilities to v9.0.0-rc.6 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
90
+ - Bump @fluentui/react-conformance-griffel to v9.0.0-beta.4 ([PR #21995](https://github.com/microsoft/fluentui/pull/21995) by beachball)
28
91
 
29
92
  ## [9.0.0-beta.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabs_v9.0.0-beta.8)
30
93
 
31
- Fri, 04 Mar 2022 05:17:30 GMT
94
+ Fri, 04 Mar 2022 05:17:30 GMT
32
95
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabs_v9.0.0-beta.7..@fluentui/react-tabs_v9.0.0-beta.8)
33
96
 
34
97
  ### Changes
@@ -41,7 +104,7 @@ Fri, 04 Mar 2022 05:17:30 GMT
41
104
 
42
105
  ## [9.0.0-beta.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabs_v9.0.0-beta.7)
43
106
 
44
- Tue, 01 Mar 2022 02:17:39 GMT
107
+ Tue, 01 Mar 2022 02:17:39 GMT
45
108
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabs_v9.0.0-beta.6..@fluentui/react-tabs_v9.0.0-beta.7)
46
109
 
47
110
  ### Changes
@@ -53,7 +116,7 @@ Tue, 01 Mar 2022 02:17:39 GMT
53
116
 
54
117
  ## [9.0.0-beta.6](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabs_v9.0.0-beta.6)
55
118
 
56
- Fri, 18 Feb 2022 13:35:35 GMT
119
+ Fri, 18 Feb 2022 13:35:35 GMT
57
120
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabs_v9.0.0-beta.4..@fluentui/react-tabs_v9.0.0-beta.6)
58
121
 
59
122
  ### Changes
@@ -37,18 +37,6 @@ export declare const tabClassName: string;
37
37
 
38
38
  export declare const tabClassNames: SlotClassNames<TabSlots>;
39
39
 
40
- declare type TabCommons = {
41
- /**
42
- * A tab can be set to disable interaction.
43
- * @default false
44
- */
45
- disabled?: boolean;
46
- /**
47
- * The value that identifies this tab when selected.
48
- */
49
- value: TabValue;
50
- };
51
-
52
40
  /**
53
41
  * A tab list provides single selection from a set of tabs.
54
42
  */
@@ -58,42 +46,7 @@ export declare const tabListClassName: string;
58
46
 
59
47
  export declare const tabListClassNames: SlotClassNames<TabListSlots>;
60
48
 
61
- declare type TabListCommons = {
62
- /**
63
- * A tab list can supports 'transparent' and 'subtle' appearance.
64
- *- 'subtle': Minimizes emphasis to blend into the background until hovered or focused.
65
- *- 'transparent': No background and border styling
66
- * The appearance affects each of the contained tabs.
67
- * @default 'transparent'
68
- */
69
- appearance?: 'transparent' | 'subtle';
70
- /**
71
- * A tab list can be set to disable interaction.
72
- * @default false
73
- */
74
- disabled?: boolean;
75
- /**
76
- * Raised when a tab is selected.
77
- */
78
- onTabSelect?: SelectTabEventHandler;
79
- /**
80
- * The value of the currently selected tab.
81
- */
82
- selectedValue?: TabValue;
83
- /**
84
- * A tab list can be either 'small' or 'medium' size.
85
- * The size affects each of the contained tabs.
86
- * @default 'medium'
87
- */
88
- size?: 'small' | 'medium';
89
- /**
90
- * A tab list can arrange its tabs vertically.
91
- * @default false
92
- */
93
- vertical?: boolean;
94
- };
95
-
96
- export declare type TabListContextValue = Pick<TabListCommons, 'onTabSelect' | 'selectedValue'> & Required<Pick<TabListCommons, 'appearance' | 'disabled' | 'size' | 'vertical'>> & {
49
+ export declare type TabListContextValue = Pick<TabListProps, 'onTabSelect' | 'selectedValue'> & Required<Pick<TabListProps, 'appearance' | 'disabled' | 'size' | 'vertical'>> & {
97
50
  /** A callback to allow a tab to register itself with the tab list. */
98
51
  onRegister: RegisterTabEventHandler;
99
52
  /** A callback to allow a tab to unregister itself with the tab list. */
@@ -125,12 +78,44 @@ export declare type TabListContextValues = {
125
78
  /**
126
79
  * TabList Props
127
80
  */
128
- export declare type TabListProps = ComponentProps<TabListSlots> & TabListCommons & {
81
+ export declare type TabListProps = ComponentProps<TabListSlots> & {
82
+ /**
83
+ * A tab list can supports 'transparent' and 'subtle' appearance.
84
+ *- 'subtle': Minimizes emphasis to blend into the background until hovered or focused.
85
+ *- 'transparent': No background and border styling
86
+ * The appearance affects each of the contained tabs.
87
+ * @default 'transparent'
88
+ */
89
+ appearance?: 'transparent' | 'subtle';
129
90
  /**
130
91
  * The value of the tab to be selected by default.
131
92
  * Typically useful when the selectedValue is uncontrolled.
132
93
  */
133
94
  defaultSelectedValue?: TabValue;
95
+ /**
96
+ * A tab list can be set to disable interaction.
97
+ * @default false
98
+ */
99
+ disabled?: boolean;
100
+ /**
101
+ * Raised when a tab is selected.
102
+ */
103
+ onTabSelect?: SelectTabEventHandler;
104
+ /**
105
+ * The value of the currently selected tab.
106
+ */
107
+ selectedValue?: TabValue;
108
+ /**
109
+ * A tab list can be either 'small' or 'medium' size.
110
+ * The size affects each of the contained tabs.
111
+ * @default 'medium'
112
+ */
113
+ size?: 'small' | 'medium';
114
+ /**
115
+ * A tab list can arrange its tabs vertically.
116
+ * @default false
117
+ */
118
+ vertical?: boolean;
134
119
  };
135
120
 
136
121
  export declare type TabListSlots = {
@@ -148,7 +133,17 @@ export declare type TabListState = ComponentState<Required<TabListSlots>> & TabL
148
133
  /**
149
134
  * Tab Props
150
135
  */
151
- export declare type TabProps = ComponentProps<Partial<TabSlots>> & TabCommons;
136
+ export declare type TabProps = ComponentProps<Partial<TabSlots>> & {
137
+ /**
138
+ * A tab can be set to disable interaction.
139
+ * @default false
140
+ */
141
+ disabled?: boolean;
142
+ /**
143
+ * The value that identifies this tab when selected.
144
+ */
145
+ value: TabValue;
146
+ };
152
147
 
153
148
  export declare type TabRegisterData = {
154
149
  /**
@@ -180,7 +175,7 @@ export declare type TabSlots = {
180
175
  /**
181
176
  * State used in rendering Tab
182
177
  */
183
- export declare type TabState = ComponentState<TabSlots> & Omit<TabCommons, 'disabled'> & Required<Pick<TabCommons, 'disabled'>> & {
178
+ export declare type TabState = ComponentState<TabSlots> & Pick<TabProps, 'value'> & Required<Pick<TabProps, 'disabled'>> & {
184
179
  /**
185
180
  * A tab supports 'transparent' and 'subtle' appearance.
186
181
  */
File without changes
@@ -1 +1 @@
1
- {"version":3,"file":"Tab.types.js","sourceRoot":"../src/","sources":["components/Tab/Tab.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Any value that identifies a specific tab.\n */\nexport type TabValue = unknown;\n\nexport type TabSlots = {\n /**\n * Root of the component.\n */\n root: Slot<'button'>;\n\n /**\n * Icon that renders before the content.\n */\n icon?: Slot<'span'>;\n\n /**\n * Component children are placed in this slot\n * Avoid using the `children` property in this slot in favour of Component children whenever possible.\n */\n content: NonNullable<Slot<'span'>>;\n};\n\ntype TabCommons = {\n /**\n * A tab can be set to disable interaction.\n * @default false\n */\n disabled?: boolean;\n /**\n * The value that identifies this tab when selected.\n */\n value: TabValue;\n};\n\n/**\n * Tab Props\n */\nexport type TabProps = ComponentProps<Partial<TabSlots>> & TabCommons;\n\n/**\n * State used in rendering Tab\n */\nexport type TabState = ComponentState<TabSlots> &\n Omit<TabCommons, 'disabled'> &\n Required<Pick<TabCommons, 'disabled'>> & {\n /**\n * A tab supports 'transparent' and 'subtle' appearance.\n */\n appearance?: 'transparent' | 'subtle';\n /**\n * A tab can have only an icon slot filled and no content.\n */\n iconOnly: boolean;\n /**\n * If this tab is selected\n */\n selected: boolean;\n /**\n * A tab can be either 'small' or 'medium' size.\n */\n size: 'small' | 'medium';\n /**\n * A tab can arrange its content based on if the tabs in the list are arranged vertically.\n */\n vertical: boolean;\n };\n"]}
1
+ {"version":3,"file":"Tab.types.js","sourceRoot":"../src/","sources":["components/Tab/Tab.types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';\n\n/**\n * Any value that identifies a specific tab.\n */\nexport type TabValue = unknown;\n\nexport type TabSlots = {\n /**\n * Root of the component.\n */\n root: Slot<'button'>;\n\n /**\n * Icon that renders before the content.\n */\n icon?: Slot<'span'>;\n\n /**\n * Component children are placed in this slot\n * Avoid using the `children` property in this slot in favour of Component children whenever possible.\n */\n content: NonNullable<Slot<'span'>>;\n};\n\n/**\n * Tab Props\n */\nexport type TabProps = ComponentProps<Partial<TabSlots>> & {\n /**\n * A tab can be set to disable interaction.\n * @default false\n */\n disabled?: boolean;\n /**\n * The value that identifies this tab when selected.\n */\n value: TabValue;\n};\n\n/**\n * State used in rendering Tab\n */\nexport type TabState = ComponentState<TabSlots> &\n Pick<TabProps, 'value'> &\n Required<Pick<TabProps, 'disabled'>> & {\n /**\n * A tab supports 'transparent' and 'subtle' appearance.\n */\n appearance?: 'transparent' | 'subtle';\n /**\n * A tab can have only an icon slot filled and no content.\n */\n iconOnly: boolean;\n /**\n * If this tab is selected\n */\n selected: boolean;\n /**\n * A tab can be either 'small' or 'medium' size.\n */\n size: 'small' | 'medium';\n /**\n * A tab can arrange its content based on if the tabs in the list are arranged vertically.\n */\n vertical: boolean;\n };\n"]}
@@ -60,6 +60,9 @@ export const useTab_unstable = (props, ref) => {
60
60
  root: getNativeElementProps('button', {
61
61
  ref: useMergedRefs(ref, innerRef),
62
62
  role: 'tab',
63
+ // aria-selected undefined indicates it is not selectable
64
+ // according to https://www.w3.org/TR/wai-aria-1.1/#aria-selected
65
+ 'aria-selected': disabled ? undefined : `${selected}`,
63
66
  ...props,
64
67
  disabled,
65
68
  onClick
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Tab/useTab.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAA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hBK;AAiBL,IAAA,QAjBK;AAkBL,IAAA,QAlBK;AAmBL,IAAA,IAnBK;AAoBL,IAAA,KApBK;AAqBL,IAAA;AArBK,GAAP;AAuBD,CApDM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport type { TabProps, TabState } from './Tab.types';\nimport { TabListContext } from '../TabList/TabListContext';\nimport { useContextSelector } from '@fluentui/react-context-selector';\nimport { SelectTabEvent } from '../TabList/TabList.types';\n\n/**\n * Create the state required to render Tab.\n *\n * The returned state can be modified with hooks such as useTabStyles_unstable,\n * before being passed to renderTab_unstable.\n *\n * @param props - props from this instance of Tab\n * @param ref - reference to root HTMLElement of Tab\n */\nexport const useTab_unstable = (props: TabProps, ref: React.Ref<HTMLElement>): TabState => {\n const { content, disabled: tabDisabled = false, icon, value } = props;\n\n const appearance = useContextSelector(TabListContext, ctx => ctx.appearance);\n const listDisabled = useContextSelector(TabListContext, ctx => ctx.disabled);\n const selected = useContextSelector(TabListContext, ctx => ctx.selectedValue === value);\n const onRegister = useContextSelector(TabListContext, ctx => ctx.onRegister);\n const onUnregister = useContextSelector(TabListContext, ctx => ctx.onUnregister);\n const onSelect = useContextSelector(TabListContext, ctx => ctx.onSelect);\n const size = useContextSelector(TabListContext, ctx => ctx.size);\n const vertical = useContextSelector(TabListContext, ctx => !!ctx.vertical);\n const disabled = listDisabled || tabDisabled;\n\n const innerRef = React.useRef<HTMLElement>(null);\n const onClick = useEventCallback((event: SelectTabEvent) => onSelect(event, { value }));\n\n React.useEffect(() => {\n onRegister({\n value,\n ref: innerRef,\n });\n\n return () => {\n onUnregister({ value, ref: innerRef });\n };\n }, [onRegister, onUnregister, innerRef, value]);\n\n const iconShorthand = resolveShorthand(icon);\n const contentShorthand = resolveShorthand(content, { required: true, defaultProps: { children: props.children } });\n return {\n components: {\n root: 'button',\n icon: 'span',\n content: 'span',\n },\n root: getNativeElementProps('button', {\n ref: useMergedRefs(ref, innerRef),\n role: 'tab',\n ...props,\n disabled,\n onClick,\n }),\n icon: iconShorthand,\n iconOnly: Boolean(iconShorthand?.children && !contentShorthand.children),\n content: contentShorthand,\n appearance,\n disabled,\n selected,\n size,\n value,\n vertical,\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["components/Tab/useTab.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,qBAAT,EAAgC,gBAAhC,EAAkD,gBAAlD,EAAoE,aAApE,QAAyF,2BAAzF;AAEA,SAAS,cAAT,QAA+B,2BAA/B;AACA,SAAS,kBAAT,QAAmC,kCAAnC;AAGA;;;;;;;;AAQG;;AACH,OAAO,MAAM,eAAe,GAAG,CAAC,KAAD,EAAkB,GAAlB,KAA2D;AACxF,QAAM;AAAE,IAAA,OAAF;AAAW,IAAA,QAAQ,EAAE,WAAW,GAAG,KAAnC;AAA0C,IAAA,IAA1C;AAAgD,IAAA;AAAhD,MAA0D,KAAhE;AAEA,QAAM,UAAU,GAAG,kBAAkB,CAAC,cAAD,EAAiB,GAAG,IAAI,GAAG,CAAC,UAA5B,CAArC;AACA,QAAM,YAAY,GAAG,kBAAkB,CAAC,cAAD,EAAiB,GAAG,IAAI,GAAG,CAAC,QAA5B,CAAvC;AACA,QAAM,QAAQ,GAAG,kBAAkB,CAAC,cAAD,EAAiB,GAAG,IAAI,GAAG,CAAC,aAAJ,KAAsB,KAA9C,CAAnC;AACA,QAAM,UAAU,GAAG,kBAAkB,CAAC,cAAD,EAAiB,GAAG,IAAI,GAAG,CAAC,UAA5B,CAArC;AACA,QAAM,YAAY,GAAG,kBAAkB,CAAC,cAAD,EAAiB,GAAG,IAAI,GAAG,CAAC,YAA5B,CAAvC;AACA,QAAM,QAAQ,GAAG,kBAAkB,CAAC,cAAD,EAAiB,GAAG,IAAI,GAAG,CAAC,QAA5B,CAAnC;AACA,QAAM,IAAI,GAAG,kBAAkB,CAAC,cAAD,EAAiB,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ALf;AAMpC,SAAG,KANiC;AAOpC,MAAA,QAPoC;AAQpC,MAAA;AARoC,KAAX,CANtB;AAgBL,IAAA,IAAI,EAAE,aAhBD;AAiBL,IAAA,QAAQ,EAAE,OAAO,CAAC,CAAA,aAAa,KAAA,IAAb,IAAA,aAAa,KAAA,KAAA,CAAb,GAAa,KAAA,CAAb,GAAA,aAAa,CAAE,QAAf,KAA2B,CAAC,gBAAgB,CAAC,QAA9C,CAjBZ;AAkBL,IAAA,OAAO,EAAE,gBAlBJ;AAmBL,IAAA,UAnBK;AAoBL,IAAA,QApBK;AAqBL,IAAA,QArBK;AAsBL,IAAA,IAtBK;AAuBL,IAAA,KAvBK;AAwBL,IAAA;AAxBK,GAAP;AA0BD,CAvDM","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand, useEventCallback, useMergedRefs } from '@fluentui/react-utilities';\nimport type { TabProps, TabState } from './Tab.types';\nimport { TabListContext } from '../TabList/TabListContext';\nimport { useContextSelector } from '@fluentui/react-context-selector';\nimport { SelectTabEvent } from '../TabList/TabList.types';\n\n/**\n * Create the state required to render Tab.\n *\n * The returned state can be modified with hooks such as useTabStyles_unstable,\n * before being passed to renderTab_unstable.\n *\n * @param props - props from this instance of Tab\n * @param ref - reference to root HTMLElement of Tab\n */\nexport const useTab_unstable = (props: TabProps, ref: React.Ref<HTMLElement>): TabState => {\n const { content, disabled: tabDisabled = false, icon, value } = props;\n\n const appearance = useContextSelector(TabListContext, ctx => ctx.appearance);\n const listDisabled = useContextSelector(TabListContext, ctx => ctx.disabled);\n const selected = useContextSelector(TabListContext, ctx => ctx.selectedValue === value);\n const onRegister = useContextSelector(TabListContext, ctx => ctx.onRegister);\n const onUnregister = useContextSelector(TabListContext, ctx => ctx.onUnregister);\n const onSelect = useContextSelector(TabListContext, ctx => ctx.onSelect);\n const size = useContextSelector(TabListContext, ctx => ctx.size);\n const vertical = useContextSelector(TabListContext, ctx => !!ctx.vertical);\n const disabled = listDisabled || tabDisabled;\n\n const innerRef = React.useRef<HTMLElement>(null);\n const onClick = useEventCallback((event: SelectTabEvent) => onSelect(event, { value }));\n\n React.useEffect(() => {\n onRegister({\n value,\n ref: innerRef,\n });\n\n return () => {\n onUnregister({ value, ref: innerRef });\n };\n }, [onRegister, onUnregister, innerRef, value]);\n\n const iconShorthand = resolveShorthand(icon);\n const contentShorthand = resolveShorthand(content, { required: true, defaultProps: { children: props.children } });\n return {\n components: {\n root: 'button',\n icon: 'span',\n content: 'span',\n },\n root: getNativeElementProps('button', {\n ref: useMergedRefs(ref, innerRef),\n role: 'tab',\n // aria-selected undefined indicates it is not selectable\n // according to https://www.w3.org/TR/wai-aria-1.1/#aria-selected\n 'aria-selected': disabled ? undefined : `${selected}`,\n ...props,\n disabled,\n onClick,\n }),\n icon: iconShorthand,\n iconOnly: Boolean(iconShorthand?.children && !contentShorthand.children),\n content: contentShorthand,\n appearance,\n disabled,\n selected,\n size,\n value,\n vertical,\n };\n};\n"],"sourceRoot":"../src/"}
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
2
  import { __styles, mergeClasses, shorthands } from '@griffel/react';
3
- import { pendingAnimationDurationTokens, pendingAnimationEasingTokens } from '../../tab.constants';
4
3
  import { useContextSelector } from '@fluentui/react-context-selector';
5
- import { TabListContext } from '../TabList/TabListContext'; // eslint-disable-next-line @typescript-eslint/naming-convention
4
+ import { TabListContext } from '../TabList/TabListContext';
5
+ import { tokens } from '@fluentui/react-theme'; // eslint-disable-next-line @typescript-eslint/naming-convention
6
6
 
7
7
  const tabIndicatorCssVars_unstable = {
8
8
  offsetVar: '--fui-Tab__indicator--offset',
@@ -16,8 +16,8 @@ const useActiveIndicatorStyles = /*#__PURE__*/__styles({
16
16
  },
17
17
  "animated": {
18
18
  "wbfbqe": "fopw4to",
19
- "mafdb0": "f8wx3i3",
20
- "Jgwf15": "fgw312z",
19
+ "mafdb0": "f1gswng4",
20
+ "Jgwf15": "fjw9r1k",
21
21
  "Bh4j9q1": "f1cif4e6",
22
22
  "Gk6w4d": "fa42t5a"
23
23
  },
@@ -30,7 +30,7 @@ const useActiveIndicatorStyles = /*#__PURE__*/__styles({
30
30
  "xn0juu": "fwvsziq"
31
31
  }
32
32
  }, {
33
- "d": [".f1mtd64y{overflow-x:visible;}", ".f1y7q3j9{overflow-y:visible;}", ".fopw4to:after{transition-property:transform;}", ".f8wx3i3:after{transition-duration:300ms;}", ".fgw312z:after{transition-timing-function:cubic-bezier(0,0,0,1);}", ".f1g89gis:after{transform-origin:left;}", ".fcjnwxz:after{transform-origin:right;}", ".f7m34ad:after{-webkit-transform:translateX(var(--fui-Tab__indicator--offset)) scaleX(var(--fui-Tab__indicator--scale));-moz-transform:translateX(var(--fui-Tab__indicator--offset)) scaleX(var(--fui-Tab__indicator--scale));-ms-transform:translateX(var(--fui-Tab__indicator--offset)) scaleX(var(--fui-Tab__indicator--scale));transform:translateX(var(--fui-Tab__indicator--offset)) scaleX(var(--fui-Tab__indicator--scale));}", ".fqfgdei:after{transform-origin:top;}", ".fwvsziq:after{-webkit-transform:translateY(var(--fui-Tab__indicator--offset)) scaleY(var(--fui-Tab__indicator--scale));-moz-transform:translateY(var(--fui-Tab__indicator--offset)) scaleY(var(--fui-Tab__indicator--scale));-ms-transform:translateY(var(--fui-Tab__indicator--offset)) scaleY(var(--fui-Tab__indicator--scale));transform:translateY(var(--fui-Tab__indicator--offset)) scaleY(var(--fui-Tab__indicator--scale));}"],
33
+ "d": [".f1mtd64y{overflow-x:visible;}", ".f1y7q3j9{overflow-y:visible;}", ".fopw4to:after{transition-property:transform;}", ".f1gswng4:after{transition-duration:var(--durationSlow);}", ".fjw9r1k:after{transition-timing-function:var(--curveDecelerateMax);}", ".f1g89gis:after{transform-origin:left;}", ".fcjnwxz:after{transform-origin:right;}", ".f7m34ad:after{-webkit-transform:translateX(var(--fui-Tab__indicator--offset)) scaleX(var(--fui-Tab__indicator--scale));-moz-transform:translateX(var(--fui-Tab__indicator--offset)) scaleX(var(--fui-Tab__indicator--scale));-ms-transform:translateX(var(--fui-Tab__indicator--offset)) scaleX(var(--fui-Tab__indicator--scale));transform:translateX(var(--fui-Tab__indicator--offset)) scaleX(var(--fui-Tab__indicator--scale));}", ".fqfgdei:after{transform-origin:top;}", ".fwvsziq:after{-webkit-transform:translateY(var(--fui-Tab__indicator--offset)) scaleY(var(--fui-Tab__indicator--scale));-moz-transform:translateY(var(--fui-Tab__indicator--offset)) scaleY(var(--fui-Tab__indicator--scale));-ms-transform:translateY(var(--fui-Tab__indicator--offset)) scaleY(var(--fui-Tab__indicator--scale));transform:translateY(var(--fui-Tab__indicator--offset)) scaleY(var(--fui-Tab__indicator--scale));}"],
34
34
  "t": ["@media (prefers-reduced-motion: reduce){.f1cif4e6:after{transition-property:none;}}", "@media (prefers-reduced-motion: reduce){.fa42t5a:after{transition-duration:0.01ms;}}"]
35
35
  });
36
36
 
@@ -59,7 +59,7 @@ const calculateTabRect = element => {
59
59
  const getRegisteredTabRect = (registeredTabs, value) => {
60
60
  var _a;
61
61
 
62
- const element = value ? (_a = registeredTabs[JSON.stringify(value)]) === null || _a === void 0 ? void 0 : _a.ref.current : undefined;
62
+ const element = value !== undefined && value !== null ? (_a = registeredTabs[JSON.stringify(value)]) === null || _a === void 0 ? void 0 : _a.ref.current : undefined;
63
63
  return element ? calculateTabRect(element) : undefined;
64
64
  };
65
65
  /**