@ceed/ads 1.35.0 → 1.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -95
- package/dist/components/Accordions/Accordions.d.ts +1 -0
- package/dist/components/Alert/Alert.d.ts +5 -5
- package/dist/components/Autocomplete/Autocomplete.d.ts +2 -2
- package/dist/components/Avatar/Avatar.d.ts +7 -17
- package/dist/components/Box/Box.d.ts +1 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +6 -5
- package/dist/components/Button/Button.d.ts +3 -2
- package/dist/components/Calendar/Calendar.d.ts +1 -0
- package/dist/components/Card/Card.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +1 -0
- package/dist/components/Chip/Chip.d.ts +1 -0
- package/dist/components/Container/Container.d.ts +6 -1
- package/dist/components/DialogActions/DialogActions.d.ts +1 -0
- package/dist/components/DialogContent/DialogContent.d.ts +1 -0
- package/dist/components/DialogFrame/DialogFrame.d.ts +1 -1
- package/dist/components/DialogTitle/DialogTitle.d.ts +1 -0
- package/dist/components/Divider/Divider.d.ts +1 -0
- package/dist/components/Dropdown/Dropdown.d.ts +28 -1
- package/dist/components/FilterMenu/components/MonthRange.d.ts +11 -0
- package/dist/components/FilterMenu/types.d.ts +5 -1
- package/dist/components/FormControl/FormControl.d.ts +1 -0
- package/dist/components/FormHelperText/FormHelperText.d.ts +1 -0
- package/dist/components/FormLabel/FormLabel.d.ts +1 -0
- package/dist/components/Grid/Grid.d.ts +1 -0
- package/dist/components/IconButton/IconButton.d.ts +3 -2
- package/dist/components/IconMenuButton/IconMenuButton.d.ts +7 -6
- package/dist/components/InfoSign/InfoSign.d.ts +3 -2
- package/dist/components/Input/Input.d.ts +8 -22
- package/dist/components/InsetDrawer/InsetDrawer.d.ts +1 -0
- package/dist/components/Markdown/Markdown.d.ts +9 -24
- package/dist/components/Menu/Menu.d.ts +2 -1
- package/dist/components/MenuButton/MenuButton.d.ts +10 -8
- package/dist/components/Modal/Modal.d.ts +4 -2
- package/dist/components/NavigationGroup/NavigationGroup.d.ts +3 -2
- package/dist/components/NavigationItem/NavigationItem.d.ts +3 -2
- package/dist/components/Navigator/Navigator.d.ts +5 -4
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/ProfileMenu/ProfileMenu.d.ts +2 -2
- package/dist/components/Radio/Radio.d.ts +1 -0
- package/dist/components/RadioList/RadioList.d.ts +3 -2
- package/dist/components/SearchBar/SearchBar.d.ts +6 -5
- package/dist/components/SearchBar/index.d.ts +3 -2
- package/dist/components/Select/Select.d.ts +12 -10
- package/dist/components/Sheet/Sheet.d.ts +1 -0
- package/dist/components/Stack/Stack.d.ts +1 -0
- package/dist/components/Stepper/Stepper.d.ts +2 -1
- package/dist/components/Switch/Switch.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +7 -5
- package/dist/components/Tabs/Tabs.d.ts +1 -0
- package/dist/components/Textarea/Textarea.d.ts +8 -20
- package/dist/components/ThemeProvider/ThemeProvider.d.ts +4 -2
- package/dist/components/Tooltip/Tooltip.d.ts +1 -0
- package/dist/components/Typography/Typography.d.ts +1 -0
- package/dist/components/Uploader/Uploader.d.ts +18 -17
- package/dist/components/data-display/Avatar.md +60 -72
- package/dist/components/data-display/Badge.md +197 -181
- package/dist/components/data-display/Chip.md +164 -142
- package/dist/components/data-display/DataTable.md +843 -338
- package/dist/components/data-display/InfoSign.md +1 -3
- package/dist/components/data-display/Markdown.md +93 -125
- package/dist/components/data-display/Table.md +1453 -1007
- package/dist/components/data-display/Typography.md +101 -104
- package/dist/components/feedback/Alert.md +80 -86
- package/dist/components/feedback/CircularProgress.md +32 -36
- package/dist/components/feedback/Dialog.md +25 -17
- package/dist/components/feedback/Modal.md +296 -265
- package/dist/components/feedback/Skeleton.md +125 -89
- package/dist/components/index.d.ts +61 -3
- package/dist/components/inputs/Autocomplete.md +191 -95
- package/dist/components/inputs/Button.md +83 -83
- package/dist/components/inputs/ButtonGroup.md +195 -185
- package/dist/components/inputs/Calendar.md +25 -28
- package/dist/components/inputs/Checkbox.md +11 -29
- package/dist/components/inputs/CurrencyInput.md +4 -4
- package/dist/components/inputs/DatePicker.md +229 -110
- package/dist/components/inputs/DateRangePicker.md +248 -137
- package/dist/components/inputs/FilterMenu.md +138 -8
- package/dist/components/inputs/FilterableCheckboxGroup.md +115 -55
- package/dist/components/inputs/FormControl.md +75 -69
- package/dist/components/inputs/IconButton.md +229 -205
- package/dist/components/inputs/Input.md +131 -98
- package/dist/components/inputs/MonthPicker.md +186 -84
- package/dist/components/inputs/MonthRangePicker.md +73 -49
- package/dist/components/inputs/PercentageInput.md +15 -31
- package/dist/components/inputs/RadioButton.md +320 -256
- package/dist/components/inputs/RadioList.md +66 -50
- package/dist/components/inputs/RadioTileGroup.md +287 -170
- package/dist/components/inputs/SearchBar.md +154 -55
- package/dist/components/inputs/Select.md +106 -95
- package/dist/components/inputs/Slider.md +153 -102
- package/dist/components/inputs/Switch.md +193 -138
- package/dist/components/inputs/Textarea.md +15 -20
- package/dist/components/inputs/Uploader/Uploader.md +68 -39
- package/dist/components/layout/Box.md +841 -662
- package/dist/components/layout/Container.md +3 -11
- package/dist/components/layout/Grid.md +480 -394
- package/dist/components/layout/Stack.md +739 -566
- package/dist/components/navigation/Breadcrumbs.md +182 -116
- package/dist/components/navigation/Dropdown.md +732 -391
- package/dist/components/navigation/IconMenuButton.md +14 -6
- package/dist/components/navigation/InsetDrawer.md +550 -378
- package/dist/components/navigation/Link.md +104 -94
- package/dist/components/navigation/Menu.md +623 -502
- package/dist/components/navigation/MenuButton.md +18 -10
- package/dist/components/navigation/NavigationGroup.md +19 -50
- package/dist/components/navigation/NavigationItem.md +6 -6
- package/dist/components/navigation/Navigator.md +26 -28
- package/dist/components/navigation/Pagination.md +86 -75
- package/dist/components/navigation/ProfileMenu.md +65 -43
- package/dist/components/navigation/Stepper.md +2 -12
- package/dist/components/navigation/Tabs.md +209 -183
- package/dist/components/surfaces/Accordions.md +89 -172
- package/dist/components/surfaces/Card.md +1094 -709
- package/dist/components/surfaces/Divider.md +562 -412
- package/dist/components/surfaces/Sheet.md +700 -518
- package/dist/guides/ThemeProvider.md +65 -40
- package/dist/index.browser.js +4 -4
- package/dist/index.browser.js.map +4 -4
- package/dist/index.cjs +1653 -1560
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1316 -1215
- package/framer/index.js +1 -1
- package/package.json +32 -35
|
@@ -144,10 +144,7 @@ function FormWizard() {
|
|
|
144
144
|
<Box sx={{ mt: 3 }}>
|
|
145
145
|
{/* Step content rendered here based on activeStep */}
|
|
146
146
|
<Stack direction="row" gap={1} sx={{ mt: 2 }}>
|
|
147
|
-
<Button
|
|
148
|
-
disabled={activeStep <= 1}
|
|
149
|
-
onClick={() => setActiveStep((prev) => prev - 1)}
|
|
150
|
-
>
|
|
147
|
+
<Button disabled={activeStep <= 1} onClick={() => setActiveStep((prev) => prev - 1)}>
|
|
151
148
|
Back
|
|
152
149
|
</Button>
|
|
153
150
|
<Button onClick={() => setActiveStep((prev) => prev + 1)}>
|
|
@@ -191,14 +188,7 @@ function CompactProgress({ currentStep, totalSteps }) {
|
|
|
191
188
|
indicatorContent: i + 1,
|
|
192
189
|
}));
|
|
193
190
|
|
|
194
|
-
return
|
|
195
|
-
<Stepper
|
|
196
|
-
steps={steps}
|
|
197
|
-
activeStep={currentStep}
|
|
198
|
-
orientation="horizontal"
|
|
199
|
-
stepOrientation="vertical"
|
|
200
|
-
/>
|
|
201
|
-
);
|
|
191
|
+
return <Stepper steps={steps} activeStep={currentStep} orientation="horizontal" stepOrientation="vertical" />;
|
|
202
192
|
}
|
|
203
193
|
```
|
|
204
194
|
|
|
@@ -6,21 +6,21 @@ Tabs follow a composition pattern: the `Tabs` container manages state, `TabList`
|
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
8
|
<Tabs {...args} defaultValue={0}>
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
</Tabs>
|
|
9
|
+
<TabList>
|
|
10
|
+
<Tab color={color} variant={variant}>
|
|
11
|
+
First Tab
|
|
12
|
+
</Tab>
|
|
13
|
+
<Tab color={color} variant={variant}>
|
|
14
|
+
Second Tab
|
|
15
|
+
</Tab>
|
|
16
|
+
<Tab color={color} variant={variant}>
|
|
17
|
+
Third Tab
|
|
18
|
+
</Tab>
|
|
19
|
+
</TabList>
|
|
20
|
+
<TabPanel value={0}>Content for the first tab panel.</TabPanel>
|
|
21
|
+
<TabPanel value={1}>Content for the second tab panel.</TabPanel>
|
|
22
|
+
<TabPanel value={2}>Content for the third tab panel.</TabPanel>
|
|
23
|
+
</Tabs>
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
| Field | Description | Default |
|
|
@@ -56,21 +56,21 @@ Default horizontal tab navigation with tab panels.
|
|
|
56
56
|
|
|
57
57
|
```tsx
|
|
58
58
|
<Tabs {...args}>
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
</Tabs>
|
|
59
|
+
<TabList>
|
|
60
|
+
<Tab color={color} variant={variant}>
|
|
61
|
+
Tab1
|
|
62
|
+
</Tab>
|
|
63
|
+
<Tab color={color} variant={variant}>
|
|
64
|
+
Tab2
|
|
65
|
+
</Tab>
|
|
66
|
+
<Tab color={color} variant={variant}>
|
|
67
|
+
Tab3
|
|
68
|
+
</Tab>
|
|
69
|
+
</TabList>
|
|
70
|
+
<TabPanel value={0}>Tab list1</TabPanel>
|
|
71
|
+
<TabPanel value={1}>Tab list2</TabPanel>
|
|
72
|
+
<TabPanel value={2}>Tab list3</TabPanel>
|
|
73
|
+
</Tabs>
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
## Tab Variants
|
|
@@ -78,40 +78,42 @@ Default horizontal tab navigation with tab panels.
|
|
|
78
78
|
Tabs support `plain`, `outlined`, `soft`, and `solid` visual styles. Apply the variant to both TabList and individual Tab components for a consistent appearance.
|
|
79
79
|
|
|
80
80
|
```tsx
|
|
81
|
-
<div
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
<
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
</
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
<
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
</
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
<
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
</
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
<
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
</
|
|
114
|
-
</
|
|
81
|
+
<div
|
|
82
|
+
style={{
|
|
83
|
+
display: "flex",
|
|
84
|
+
flexDirection: "column",
|
|
85
|
+
gap: 24
|
|
86
|
+
}}
|
|
87
|
+
>
|
|
88
|
+
<Tabs defaultValue={0}>
|
|
89
|
+
<TabList variant="plain">
|
|
90
|
+
<Tab variant="plain">Plain</Tab>
|
|
91
|
+
<Tab variant="plain">Tabs</Tab>
|
|
92
|
+
<Tab variant="plain">Example</Tab>
|
|
93
|
+
</TabList>
|
|
94
|
+
</Tabs>
|
|
95
|
+
<Tabs defaultValue={0}>
|
|
96
|
+
<TabList variant="outlined">
|
|
97
|
+
<Tab variant="outlined">Outlined</Tab>
|
|
98
|
+
<Tab variant="outlined">Tabs</Tab>
|
|
99
|
+
<Tab variant="outlined">Example</Tab>
|
|
100
|
+
</TabList>
|
|
101
|
+
</Tabs>
|
|
102
|
+
<Tabs defaultValue={0}>
|
|
103
|
+
<TabList variant="soft">
|
|
104
|
+
<Tab variant="soft">Soft</Tab>
|
|
105
|
+
<Tab variant="soft">Tabs</Tab>
|
|
106
|
+
<Tab variant="soft">Example</Tab>
|
|
107
|
+
</TabList>
|
|
108
|
+
</Tabs>
|
|
109
|
+
<Tabs defaultValue={0}>
|
|
110
|
+
<TabList variant="solid">
|
|
111
|
+
<Tab variant="solid">Solid</Tab>
|
|
112
|
+
<Tab variant="solid">Tabs</Tab>
|
|
113
|
+
<Tab variant="solid">Example</Tab>
|
|
114
|
+
</TabList>
|
|
115
|
+
</Tabs>
|
|
116
|
+
</div>
|
|
115
117
|
```
|
|
116
118
|
|
|
117
119
|
## Tab Sizes
|
|
@@ -119,33 +121,35 @@ Tabs support `plain`, `outlined`, `soft`, and `solid` visual styles. Apply the v
|
|
|
119
121
|
Tabs come in `sm`, `md`, and `lg` sizes. Set the `size` prop on the Tabs container to affect all child components uniformly.
|
|
120
122
|
|
|
121
123
|
```tsx
|
|
122
|
-
<div
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
<
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
</
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
</
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
<
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
</
|
|
148
|
-
</
|
|
124
|
+
<div
|
|
125
|
+
style={{
|
|
126
|
+
display: "flex",
|
|
127
|
+
flexDirection: "column",
|
|
128
|
+
gap: 24
|
|
129
|
+
}}
|
|
130
|
+
>
|
|
131
|
+
<Tabs defaultValue={0} size="sm">
|
|
132
|
+
<TabList>
|
|
133
|
+
<Tab>Small</Tab>
|
|
134
|
+
<Tab>Size</Tab>
|
|
135
|
+
<Tab>Tabs</Tab>
|
|
136
|
+
</TabList>
|
|
137
|
+
</Tabs>
|
|
138
|
+
<Tabs defaultValue={0} size="md">
|
|
139
|
+
<TabList>
|
|
140
|
+
<Tab>Medium</Tab>
|
|
141
|
+
<Tab>Size</Tab>
|
|
142
|
+
<Tab>Tabs</Tab>
|
|
143
|
+
</TabList>
|
|
144
|
+
</Tabs>
|
|
145
|
+
<Tabs defaultValue={0} size="lg">
|
|
146
|
+
<TabList>
|
|
147
|
+
<Tab>Large</Tab>
|
|
148
|
+
<Tab>Size</Tab>
|
|
149
|
+
<Tab>Tabs</Tab>
|
|
150
|
+
</TabList>
|
|
151
|
+
</Tabs>
|
|
152
|
+
</div>
|
|
149
153
|
```
|
|
150
154
|
|
|
151
155
|
## Tab Colors
|
|
@@ -153,42 +157,44 @@ Tabs come in `sm`, `md`, and `lg` sizes. Set the `size` prop on the Tabs contain
|
|
|
153
157
|
Apply semantic colors (`primary`, `neutral`, `success`, `warning`, `danger`) to individual tabs for color-coded navigation.
|
|
154
158
|
|
|
155
159
|
```tsx
|
|
156
|
-
<div
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
<
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
</
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
<
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
</
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
<
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
</
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
<
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
</
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
<
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
</
|
|
191
|
-
</
|
|
160
|
+
<div
|
|
161
|
+
style={{
|
|
162
|
+
display: "flex",
|
|
163
|
+
flexDirection: "column",
|
|
164
|
+
gap: 24
|
|
165
|
+
}}
|
|
166
|
+
>
|
|
167
|
+
<Tabs defaultValue={0}>
|
|
168
|
+
<TabList>
|
|
169
|
+
<Tab color="primary">Primary</Tab>
|
|
170
|
+
<Tab color="primary">Tabs</Tab>
|
|
171
|
+
</TabList>
|
|
172
|
+
</Tabs>
|
|
173
|
+
<Tabs defaultValue={0}>
|
|
174
|
+
<TabList>
|
|
175
|
+
<Tab color="neutral">Neutral</Tab>
|
|
176
|
+
<Tab color="neutral">Tabs</Tab>
|
|
177
|
+
</TabList>
|
|
178
|
+
</Tabs>
|
|
179
|
+
<Tabs defaultValue={0}>
|
|
180
|
+
<TabList>
|
|
181
|
+
<Tab color="success">Success</Tab>
|
|
182
|
+
<Tab color="success">Tabs</Tab>
|
|
183
|
+
</TabList>
|
|
184
|
+
</Tabs>
|
|
185
|
+
<Tabs defaultValue={0}>
|
|
186
|
+
<TabList>
|
|
187
|
+
<Tab color="warning">Warning</Tab>
|
|
188
|
+
<Tab color="warning">Tabs</Tab>
|
|
189
|
+
</TabList>
|
|
190
|
+
</Tabs>
|
|
191
|
+
<Tabs defaultValue={0}>
|
|
192
|
+
<TabList>
|
|
193
|
+
<Tab color="danger">Danger</Tab>
|
|
194
|
+
<Tab color="danger">Tabs</Tab>
|
|
195
|
+
</TabList>
|
|
196
|
+
</Tabs>
|
|
197
|
+
</div>
|
|
192
198
|
```
|
|
193
199
|
|
|
194
200
|
## Tabs with Icon Decorators
|
|
@@ -197,21 +203,21 @@ Add icons or other elements before or after the tab label using `startDecorator`
|
|
|
197
203
|
|
|
198
204
|
```tsx
|
|
199
205
|
<Tabs {...args}>
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
</Tabs>
|
|
206
|
+
<TabList>
|
|
207
|
+
<Tab startDecorator={<Call />} color={color} variant={variant}>
|
|
208
|
+
Tab1
|
|
209
|
+
</Tab>
|
|
210
|
+
<Tab endDecorator={<Sms />} color={color} variant={variant}>
|
|
211
|
+
Tab2
|
|
212
|
+
</Tab>
|
|
213
|
+
<Tab startDecorator={<Email />} endDecorator={<MoreVert />} color={color} variant={variant}>
|
|
214
|
+
Tab3
|
|
215
|
+
</Tab>
|
|
216
|
+
</TabList>
|
|
217
|
+
<TabPanel value={0}>Tab list1</TabPanel>
|
|
218
|
+
<TabPanel value={1}>Tab list2</TabPanel>
|
|
219
|
+
<TabPanel value={2}>Tab list3</TabPanel>
|
|
220
|
+
</Tabs>
|
|
215
221
|
```
|
|
216
222
|
|
|
217
223
|
## Vertical Tabs
|
|
@@ -219,18 +225,22 @@ Add icons or other elements before or after the tab label using `startDecorator`
|
|
|
219
225
|
Set `orientation="vertical"` on the Tabs container for sidebar-style navigation layouts.
|
|
220
226
|
|
|
221
227
|
```tsx
|
|
222
|
-
<Tabs
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
<
|
|
231
|
-
<
|
|
232
|
-
<
|
|
233
|
-
</
|
|
228
|
+
<Tabs
|
|
229
|
+
defaultValue={0}
|
|
230
|
+
orientation="vertical"
|
|
231
|
+
sx={{
|
|
232
|
+
minWidth: 300
|
|
233
|
+
}}
|
|
234
|
+
>
|
|
235
|
+
<TabList>
|
|
236
|
+
<Tab>Profile</Tab>
|
|
237
|
+
<Tab>Settings</Tab>
|
|
238
|
+
<Tab>Notifications</Tab>
|
|
239
|
+
</TabList>
|
|
240
|
+
<TabPanel value={0}>Profile content</TabPanel>
|
|
241
|
+
<TabPanel value={1}>Settings content</TabPanel>
|
|
242
|
+
<TabPanel value={2}>Notifications content</TabPanel>
|
|
243
|
+
</Tabs>
|
|
234
244
|
```
|
|
235
245
|
|
|
236
246
|
## Disabled Tabs
|
|
@@ -239,15 +249,15 @@ Individual tabs can be disabled with the `disabled` prop while keeping other tab
|
|
|
239
249
|
|
|
240
250
|
```tsx
|
|
241
251
|
<Tabs defaultValue={0}>
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
</Tabs>
|
|
252
|
+
<TabList>
|
|
253
|
+
<Tab>Active Tab</Tab>
|
|
254
|
+
<Tab disabled>Disabled Tab</Tab>
|
|
255
|
+
<Tab>Another Tab</Tab>
|
|
256
|
+
</TabList>
|
|
257
|
+
<TabPanel value={0}>First panel content</TabPanel>
|
|
258
|
+
<TabPanel value={1}>Second panel content (disabled)</TabPanel>
|
|
259
|
+
<TabPanel value={2}>Third panel content</TabPanel>
|
|
260
|
+
</Tabs>
|
|
251
261
|
```
|
|
252
262
|
|
|
253
263
|
## Controlled Tabs
|
|
@@ -256,20 +266,24 @@ Use the `value` and `onChange` props for programmatic control of the active tab.
|
|
|
256
266
|
|
|
257
267
|
```tsx
|
|
258
268
|
<div>
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
269
|
+
<Tabs value={value} onChange={(event, newValue) => setValue(newValue as number)}>
|
|
270
|
+
<TabList>
|
|
271
|
+
<Tab>First</Tab>
|
|
272
|
+
<Tab>Second</Tab>
|
|
273
|
+
<Tab>Third</Tab>
|
|
274
|
+
</TabList>
|
|
275
|
+
<TabPanel value={0}>First panel</TabPanel>
|
|
276
|
+
<TabPanel value={1}>Second panel</TabPanel>
|
|
277
|
+
<TabPanel value={2}>Third panel</TabPanel>
|
|
278
|
+
</Tabs>
|
|
279
|
+
<div
|
|
280
|
+
style={{
|
|
281
|
+
marginTop: 16
|
|
282
|
+
}}
|
|
283
|
+
>
|
|
284
|
+
Current tab index: {value}
|
|
285
|
+
</div>
|
|
286
|
+
</div>
|
|
273
287
|
```
|
|
274
288
|
|
|
275
289
|
## Tabs for Settings Page
|
|
@@ -283,9 +297,15 @@ function SettingsPage() {
|
|
|
283
297
|
<Tab startDecorator={<SecurityIcon />}>Security</Tab>
|
|
284
298
|
<Tab startDecorator={<NotificationsIcon />}>Notifications</Tab>
|
|
285
299
|
</TabList>
|
|
286
|
-
<TabPanel value={0}
|
|
287
|
-
|
|
288
|
-
|
|
300
|
+
<TabPanel value={0}>
|
|
301
|
+
<ProfileSettings />
|
|
302
|
+
</TabPanel>
|
|
303
|
+
<TabPanel value={1}>
|
|
304
|
+
<SecuritySettings />
|
|
305
|
+
</TabPanel>
|
|
306
|
+
<TabPanel value={2}>
|
|
307
|
+
<NotificationSettings />
|
|
308
|
+
</TabPanel>
|
|
289
309
|
</Tabs>
|
|
290
310
|
);
|
|
291
311
|
}
|
|
@@ -304,9 +324,15 @@ function DashboardTabs() {
|
|
|
304
324
|
<Tab value="week">This Week</Tab>
|
|
305
325
|
<Tab value="month">This Month</Tab>
|
|
306
326
|
</TabList>
|
|
307
|
-
<TabPanel value="day"
|
|
308
|
-
|
|
309
|
-
|
|
327
|
+
<TabPanel value="day">
|
|
328
|
+
<DailyStats />
|
|
329
|
+
</TabPanel>
|
|
330
|
+
<TabPanel value="week">
|
|
331
|
+
<WeeklyStats />
|
|
332
|
+
</TabPanel>
|
|
333
|
+
<TabPanel value="month">
|
|
334
|
+
<MonthlyStats />
|
|
335
|
+
</TabPanel>
|
|
310
336
|
</Tabs>
|
|
311
337
|
);
|
|
312
338
|
}
|