@fluentui/react-tabs 9.0.0-rc.3 → 9.0.0-rc.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.json +30 -1
- package/CHANGELOG.md +12 -2
- package/README.md +47 -1
- package/lib/components/Tab/useTabStyles.js +2 -2
- package/lib-commonjs/components/Tab/useTabStyles.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,36 @@
|
|
|
2
2
|
"name": "@fluentui/react-tabs",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Thu, 26 May 2022 21:00:06 GMT",
|
|
6
|
+
"tag": "@fluentui/react-tabs_v9.0.0-rc.4",
|
|
7
|
+
"version": "9.0.0-rc.4",
|
|
8
|
+
"comments": {
|
|
9
|
+
"none": [
|
|
10
|
+
{
|
|
11
|
+
"author": "olfedias@microsoft.com",
|
|
12
|
+
"package": "@fluentui/react-tabs",
|
|
13
|
+
"commit": "7bd33dbd7ddfc579e288c8081b8921be8cf421c5",
|
|
14
|
+
"comment": "improve formatting in stories"
|
|
15
|
+
}
|
|
16
|
+
],
|
|
17
|
+
"prerelease": [
|
|
18
|
+
{
|
|
19
|
+
"author": "gcox@microsoft.com",
|
|
20
|
+
"package": "@fluentui/react-tabs",
|
|
21
|
+
"commit": "2062c540d7ec78d424593cb18b0834e511dbc196",
|
|
22
|
+
"comment": "Update README.md"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"author": "beachball",
|
|
26
|
+
"package": "@fluentui/react-tabs",
|
|
27
|
+
"comment": "Bump @fluentui/react-tabster to v9.0.0-rc.12",
|
|
28
|
+
"commit": "3cf55ce998048554bf6a550de44403843ea8ede0"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"date": "Mon, 23 May 2022 18:56:49 GMT",
|
|
6
35
|
"tag": "@fluentui/react-tabs_v9.0.0-rc.3",
|
|
7
36
|
"version": "9.0.0-rc.3",
|
|
8
37
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,22 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-tabs
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 26 May 2022 21:00:06 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.0.0-rc.4](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabs_v9.0.0-rc.4)
|
|
8
|
+
|
|
9
|
+
Thu, 26 May 2022 21:00:06 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabs_v9.0.0-rc.3..@fluentui/react-tabs_v9.0.0-rc.4)
|
|
11
|
+
|
|
12
|
+
### Changes
|
|
13
|
+
|
|
14
|
+
- Update README.md ([PR #23200](https://github.com/microsoft/fluentui/pull/23200) by gcox@microsoft.com)
|
|
15
|
+
- Bump @fluentui/react-tabster to v9.0.0-rc.12 ([PR #23267](https://github.com/microsoft/fluentui/pull/23267) by beachball)
|
|
16
|
+
|
|
7
17
|
## [9.0.0-rc.3](https://github.com/microsoft/fluentui/tree/@fluentui/react-tabs_v9.0.0-rc.3)
|
|
8
18
|
|
|
9
|
-
Mon, 23 May 2022 18:
|
|
19
|
+
Mon, 23 May 2022 18:56:49 GMT
|
|
10
20
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-tabs_v9.0.0-rc.2..@fluentui/react-tabs_v9.0.0-rc.3)
|
|
11
21
|
|
|
12
22
|
### Changes
|
package/README.md
CHANGED
|
@@ -2,4 +2,50 @@
|
|
|
2
2
|
|
|
3
3
|
**React Tabs components for [Fluent UI React](https://developer.microsoft.com/en-us/fluentui)**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- A `TabList` provides single selection from a list of tabs.
|
|
6
|
+
- When a `Tab` is selected, the content associated with the selected tab is displayed and other content is hidden.
|
|
7
|
+
- A `TabList` has options to control how tabs are displayed:
|
|
8
|
+
- horizontal or vertical
|
|
9
|
+
- transparent or subtle appearance
|
|
10
|
+
- small or medium size tabs
|
|
11
|
+
- Each `Tab` typically contains a text header and often includes an icon.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
To display tabs, declare a `TabList` with a list of `Tab` components as children.
|
|
16
|
+
|
|
17
|
+
Text is typically used within each tab, but you can place any content you like.
|
|
18
|
+
You can add an icon to a tab through the `icon` property.
|
|
19
|
+
|
|
20
|
+
Each `Tab` requires a unique `value`.
|
|
21
|
+
The value is passed as part of the data parameter when a tab is clicked and the `onTabSelect` event is raised.
|
|
22
|
+
The `selectedValue` property allows you to control the selected tab.
|
|
23
|
+
|
|
24
|
+
```tsx
|
|
25
|
+
import { SelectTabData, SelectTabEvent, TabList, Tab } from '@fluentui/react-components';
|
|
26
|
+
import { CalendarMonthRegular } from '@fluentui/react-icons';
|
|
27
|
+
|
|
28
|
+
export const TabExample = () => {
|
|
29
|
+
const [selectedValue, setSelectedValue] = React.useState<TabValue>('conditions');
|
|
30
|
+
|
|
31
|
+
const onTabSelect = (event: SelectTabEvent, data: SelectTabData) => {
|
|
32
|
+
console.log(`The ${data.value} tab was selected`);
|
|
33
|
+
setSelectedValue(data.value);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<TabList selectedValue={selectedValue} onTabSelect={onTabSelect}>
|
|
38
|
+
<Tab value="tab1">First Tab</Tab>
|
|
39
|
+
<Tab value="tab2" icon={<CalendarMonthRegular />}>
|
|
40
|
+
Second Tab
|
|
41
|
+
</Tab>
|
|
42
|
+
<Tab value="tab3">Third Tab</Tab>
|
|
43
|
+
<Tab value="tab4">Fourth Tab</Tab>
|
|
44
|
+
</TabList>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### More information
|
|
50
|
+
|
|
51
|
+
See [SPEC.md](./Spec.md) to learn more specifics how the `TabList` and `Tab` were built.
|
|
@@ -126,7 +126,7 @@ const useRootStyles = /*#__PURE__*/__styles({
|
|
|
126
126
|
|
|
127
127
|
const useFocusStyles = /*#__PURE__*/__styles({
|
|
128
128
|
"base": {
|
|
129
|
-
"
|
|
129
|
+
"Brovlpu": "ftqa4ok",
|
|
130
130
|
"Bnmjwt4": "flfsvnh",
|
|
131
131
|
"Jopkrh": ["f1781m5e", "flvaaa9"],
|
|
132
132
|
"hhrs2v": "f50u1b5",
|
|
@@ -138,7 +138,7 @@ const useFocusStyles = /*#__PURE__*/__styles({
|
|
|
138
138
|
"Bgwpjed": "fpt6wn7"
|
|
139
139
|
}
|
|
140
140
|
}, {
|
|
141
|
-
"
|
|
141
|
+
"f": [".ftqa4ok:focus{outline-style:none;}"],
|
|
142
142
|
"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;}"]
|
|
143
143
|
});
|
|
144
144
|
/** Indicator styles for when pending selection */
|
|
@@ -137,7 +137,7 @@ const useRootStyles = /*#__PURE__*/react_1.__styles({
|
|
|
137
137
|
|
|
138
138
|
const useFocusStyles = /*#__PURE__*/react_1.__styles({
|
|
139
139
|
"base": {
|
|
140
|
-
"
|
|
140
|
+
"Brovlpu": "ftqa4ok",
|
|
141
141
|
"Bnmjwt4": "flfsvnh",
|
|
142
142
|
"Jopkrh": ["f1781m5e", "flvaaa9"],
|
|
143
143
|
"hhrs2v": "f50u1b5",
|
|
@@ -149,7 +149,7 @@ const useFocusStyles = /*#__PURE__*/react_1.__styles({
|
|
|
149
149
|
"Bgwpjed": "fpt6wn7"
|
|
150
150
|
}
|
|
151
151
|
}, {
|
|
152
|
-
"
|
|
152
|
+
"f": [".ftqa4ok:focus{outline-style:none;}"],
|
|
153
153
|
"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;}"]
|
|
154
154
|
});
|
|
155
155
|
/** Indicator styles for when pending selection */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-tabs",
|
|
3
|
-
"version": "9.0.0-rc.
|
|
3
|
+
"version": "9.0.0-rc.4",
|
|
4
4
|
"description": "Fluent UI React tabs components",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@griffel/react": "1.0.5",
|
|
36
36
|
"@fluentui/react-context-selector": "9.0.0-rc.9",
|
|
37
|
-
"@fluentui/react-tabster": "9.0.0-rc.
|
|
37
|
+
"@fluentui/react-tabster": "9.0.0-rc.12",
|
|
38
38
|
"@fluentui/react-theme": "9.0.0-rc.9",
|
|
39
39
|
"@fluentui/react-utilities": "9.0.0-rc.9",
|
|
40
40
|
"tslib": "^2.1.0"
|