@webiny/admin-ui 6.2.0 → 6.3.0-beta.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/Accordion/Accordion.d.ts +1 -1
- package/Accordion/Accordion.mdx +437 -463
- package/Accordion/components/AccordionContent.js.map +1 -1
- package/Alert/Alert.d.ts +1 -1
- package/Alert/Alert.js.map +1 -1
- package/Alert/Alert.mdx +80 -83
- package/AutoComplete/AutoComplete.mdx +63 -55
- package/Avatar/Avatar.d.ts +1 -1
- package/Avatar/Avatar.js.map +1 -1
- package/Avatar/Avatar.mdx +52 -43
- package/Button/Button.d.ts +1 -1
- package/Button/Button.js.map +1 -1
- package/Button/Button.mdx +50 -42
- package/Button/IconButton.d.ts +1 -1
- package/Button/IconButton.js.map +1 -1
- package/Card/components/CardContent.d.ts +1 -1
- package/Card/components/CardTitle.d.ts +1 -1
- package/Checkbox/Checkbox.mdx +51 -49
- package/Checkbox/primitives/CheckboxPrimitive.d.ts +1 -1
- package/CheckboxGroup/CheckboxGroup.mdx +51 -53
- package/CodeEditor/CodeEditor.mdx +44 -43
- package/ColorPicker/ColorPicker.mdx +41 -40
- package/Command/components/Item.d.ts +1 -1
- package/Command/components/Item.js.map +1 -1
- package/DataTable/DataTable.mdx +537 -542
- package/DataTable/components/ColumnSorter.d.ts +1 -1
- package/DataTable/components/ColumnSorter.js.map +1 -1
- package/Dialog/Dialog.js.map +1 -1
- package/Dialog/components/DialogContent.d.ts +1 -1
- package/Dialog/components/DialogContent.js +1 -1
- package/Dialog/components/DialogContent.js.map +1 -1
- package/Dialog/components/DialogFooter.d.ts +1 -1
- package/Dialog/components/DialogFooter.js.map +1 -1
- package/Dialog/components/DialogTitle.d.ts +1 -1
- package/Drawer/Drawer.js.map +1 -1
- package/Drawer/Drawer.mdx +73 -64
- package/Drawer/components/DrawerContent.d.ts +1 -1
- package/Drawer/components/DrawerContent.js.map +1 -1
- package/DropdownMenu/DropdownMenu.js.map +1 -1
- package/DropdownMenu/DropdownMenu.mdx +155 -256
- package/DropdownMenu/components/DropdownMenuCheckboxItem.js.map +1 -1
- package/DropdownMenu/components/DropdownMenuLabel.js.map +1 -1
- package/FilePicker/FilePicker.mdx +69 -69
- package/FilePicker/primitives/FilePickerPrimitive.d.ts +19 -19
- package/FilePicker/primitives/FilePickerPrimitive.js.map +1 -1
- package/FilePicker/primitives/components/Trigger.d.ts +1 -1
- package/FilePicker/primitives/components/previews/TextOnlyPreview/TextOnlyPreview.d.ts +1 -1
- package/FilePicker/primitives/components/previews/variants.d.ts +1 -1
- package/FilePicker/primitives/components/types.js.map +1 -1
- package/FormComponent/Description.d.ts +1 -1
- package/FormComponent/ErrorMessage.d.ts +1 -1
- package/FormComponent/Note.d.ts +1 -1
- package/Grid/Grid.d.ts +2 -2
- package/Grid/Grid.js.map +1 -1
- package/Grid/Grid.mdx +111 -121
- package/HeaderBar/HeaderBar.mdx +98 -99
- package/Heading/Heading.d.ts +1 -1
- package/Heading/Heading.js.map +1 -1
- package/Heading/Heading.mdx +63 -58
- package/Icon/Icon.d.ts +1 -1
- package/Icon/Icon.js.map +1 -1
- package/Icon/Icon.mdx +79 -147
- package/IconPicker/IconPicker.mdx +66 -64
- package/IconPicker/primitives/IconPickerPrimitive.d.ts +1 -1
- package/IconPicker/primitives/components/IconPickerTrigger.d.ts +1 -1
- package/Image/Image.js.map +1 -1
- package/Input/Input.mdx +67 -56
- package/Input/InputPrimitive.d.ts +1 -1
- package/Label/Label.d.ts +1 -1
- package/Label/Label.js.map +1 -1
- package/Label/Label.mdx +42 -42
- package/Label/components/LabelDescription.d.ts +1 -1
- package/Label/components/LabelRequired.d.ts +1 -1
- package/Label/components/LabelValue.d.ts +1 -1
- package/Link/Link.d.ts +1 -1
- package/Link/Link.mdx +129 -116
- package/List/List.d.ts +1 -1
- package/List/List.js.map +1 -1
- package/List/List.mdx +317 -329
- package/List/components/ListItem.d.ts +1 -1
- package/List/components/ListItem.js.map +1 -1
- package/Loader/Loader.d.ts +2 -2
- package/Loader/Loader.js.map +1 -1
- package/Loader/Loader.mdx +96 -91
- package/MultiAutoComplete/MultiAutoComplete.mdx +52 -51
- package/MultiAutoComplete/primitives/components/MultiAutoCompleteInput.d.ts +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteListOptionsPresenter.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteListOptionsPresenterWithUniqueValues.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteSelectedOptionsPresenter.js.map +1 -1
- package/MultiAutoComplete/primitives/presenters/MultiAutoCompleteTemporaryOptionPresenter.js.map +1 -1
- package/MultiFilePicker/MultiFilePicker.mdx +84 -80
- package/MultiFilePicker/primitives/MultiFilePickerPrimitive.js.map +1 -1
- package/Popover/Popover.mdx +112 -118
- package/Popover/primitives/components/PopoverArrow.d.ts +1 -1
- package/Popover/primitives/components/PopoverContent.d.ts +1 -1
- package/RadioGroup/RadioGroup.mdx +62 -59
- package/RadioGroup/primitives/RadioGroupPrimitive.js.map +1 -1
- package/RangeSlider/RangeSlider.mdx +48 -47
- package/RangeSlider/primitives/RangeSliderPrimitive.js.map +1 -1
- package/RangeSlider/primitives/components/RangeSliderValue.d.ts +1 -1
- package/RangeSlider/primitives/components/RangeSliderValue.js.map +1 -1
- package/ScrollArea/ScrollArea.js.map +1 -1
- package/SegmentedControl/SegmentedControl.mdx +59 -59
- package/SegmentedControl/primitives/SegmentedControlPrimitive.d.ts +1 -1
- package/SegmentedControl/primitives/SegmentedControlPrimitive.js.map +1 -1
- package/Select/Select.mdx +52 -43
- package/Select/primitives/components/SelectTrigger.d.ts +1 -1
- package/Select/primitives/components/SelectTrigger.js.map +1 -1
- package/Select/primitives/presenters/SelectPresenter.d.ts +1 -1
- package/Separator/Separator.d.ts +1 -1
- package/Separator/Separator.mdx +139 -150
- package/Sidebar/Sidebar.js.map +1 -1
- package/Sidebar/Sidebar.mdx +66 -88
- package/Sidebar/components/items/SidebarMenuSubItemIndentation.d.ts +1 -1
- package/Sidebar/components/items/SidebarMenuSubItemIndentation.js.map +1 -1
- package/Skeleton/Skeleton.d.ts +1 -1
- package/Skeleton/Skeleton.js.map +1 -1
- package/Skeleton/Skeleton.mdx +37 -37
- package/Slider/Slider.mdx +48 -47
- package/Slider/primitives/SliderPrimitive.js.map +1 -1
- package/Slider/primitives/components/SliderSideValue.d.ts +1 -1
- package/Slider/primitives/components/SliderSideValue.js.map +1 -1
- package/Slider/primitives/components/SliderTooltip.d.ts +1 -1
- package/SteppedProgress/components/SteppedProgressIcon.d.ts +1 -1
- package/SteppedProgress/components/SteppedProgressIcon.js.map +1 -1
- package/SteppedProgress/components/SteppedProgressIndicator.d.ts +1 -1
- package/SteppedProgress/components/SteppedProgressIndicator.js.map +1 -1
- package/Switch/Switch.mdx +44 -42
- package/Switch/primitives/SwitchPrimitive.d.ts +1 -1
- package/Table/Table.d.ts +1 -1
- package/Table/Table.js.map +1 -1
- package/Table/components/Direction.d.ts +1 -1
- package/Table/components/Direction.js.map +1 -1
- package/Table/components/Header.d.ts +1 -1
- package/Table/components/Header.js.map +1 -1
- package/Table/components/Resizer.d.ts +1 -1
- package/Table/components/Resizer.js.map +1 -1
- package/Table/components/Row.d.ts +1 -1
- package/Table/components/Row.js.map +1 -1
- package/Tabs/Tabs.mdx +297 -292
- package/Tabs/components/Content.d.ts +1 -1
- package/Tabs/components/List.d.ts +1 -1
- package/Tabs/components/Trigger.d.ts +1 -1
- package/Tag/Tag.d.ts +1 -1
- package/Tag/Tag.js.map +1 -1
- package/Tag/Tag.mdx +68 -64
- package/Tags/primitives/TagsPrimitive.js.map +1 -1
- package/Text/Text.d.ts +1 -1
- package/Text/Text.mdx +54 -48
- package/Textarea/Textarea.mdx +49 -39
- package/Textarea/TextareaPrimitive.d.ts +1 -1
- package/Textarea/TextareaPrimitive.js.map +1 -1
- package/Toast/Toast.mdx +63 -53
- package/Toast/components/ToastRoot.d.ts +1 -1
- package/Tooltip/Tooltip.mdx +197 -198
- package/Tooltip/components/TooltipArrow.d.ts +1 -1
- package/Tooltip/components/TooltipContent.d.ts +1 -1
- package/Tree/components/Item.d.ts +1 -1
- package/Tree/useTree.d.ts +1 -1
- package/Widget/components/WidgetContent.d.ts +1 -1
- package/package.json +15 -15
package/Tabs/Tabs.mdx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Canvas, Meta, Controls } from
|
|
1
|
+
import { Canvas, Meta, Controls } from "@storybook/addon-docs/blocks";
|
|
2
2
|
|
|
3
|
-
import * as Tabs from
|
|
3
|
+
import * as Tabs from "./Tabs.stories";
|
|
4
4
|
|
|
5
5
|
<Meta of={Tabs} />
|
|
6
6
|
|
|
@@ -15,49 +15,49 @@ import React from "react";
|
|
|
15
15
|
import { Tabs } from "@webiny/admin-ui";
|
|
16
16
|
|
|
17
17
|
const TabsExample = () => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
};
|
|
18
|
+
return (
|
|
19
|
+
|
|
20
|
+
<Tabs
|
|
21
|
+
size="md"
|
|
22
|
+
spacing="lg"
|
|
23
|
+
separator={true}
|
|
24
|
+
tabs={[
|
|
25
|
+
<Tabs.Tab
|
|
26
|
+
key="account"
|
|
27
|
+
value="account"
|
|
28
|
+
trigger="Account"
|
|
29
|
+
content="Account settings and personal information"
|
|
30
|
+
/>,
|
|
31
|
+
<Tabs.Tab
|
|
32
|
+
key="security"
|
|
33
|
+
value="security"
|
|
34
|
+
trigger="Security"
|
|
35
|
+
content="Security settings and password management"
|
|
36
|
+
/>,
|
|
37
|
+
<Tabs.Tab
|
|
38
|
+
key="preferences"
|
|
39
|
+
value="preferences"
|
|
40
|
+
trigger="Preferences"
|
|
41
|
+
content="User interface preferences and customization"
|
|
42
|
+
/>
|
|
43
|
+
]}
|
|
44
|
+
/>
|
|
45
|
+
); };
|
|
46
46
|
|
|
47
47
|
export default TabsExample;
|
|
48
48
|
|
|
49
49
|
` } }
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
50
|
+
additionalActions={[
|
|
51
|
+
{
|
|
52
|
+
title: 'Open in GitHub',
|
|
53
|
+
onClick: () => {
|
|
54
|
+
window.open(
|
|
55
|
+
'https://github.com/webiny/webiny-js/blob/feat/new-admin-ui/packages/admin-ui/src/Tabs/Tabs.tsx',
|
|
56
|
+
'_blank'
|
|
57
|
+
);
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
]}
|
|
61
61
|
/>
|
|
62
62
|
|
|
63
63
|
<Controls of={Tabs.Documentation} />
|
|
@@ -67,33 +67,33 @@ import React from "react";
|
|
|
67
67
|
import { Tabs } from "@webiny/admin-ui";
|
|
68
68
|
|
|
69
69
|
const TabsExample = () => {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
/>
|
|
94
|
-
]}
|
|
70
|
+
return (
|
|
71
|
+
<Tabs
|
|
72
|
+
size="md"
|
|
73
|
+
spacing="lg"
|
|
74
|
+
separator={true}
|
|
75
|
+
tabs={[
|
|
76
|
+
<Tabs.Tab
|
|
77
|
+
key="account"
|
|
78
|
+
value="account"
|
|
79
|
+
trigger="Account"
|
|
80
|
+
content="Account settings and personal information"
|
|
81
|
+
/>,
|
|
82
|
+
<Tabs.Tab
|
|
83
|
+
key="security"
|
|
84
|
+
value="security"
|
|
85
|
+
trigger="Security"
|
|
86
|
+
content="Security settings and password management"
|
|
87
|
+
/>,
|
|
88
|
+
<Tabs.Tab
|
|
89
|
+
key="preferences"
|
|
90
|
+
value="preferences"
|
|
91
|
+
trigger="Preferences"
|
|
92
|
+
content="User interface preferences and customization"
|
|
95
93
|
/>
|
|
96
|
-
|
|
94
|
+
]}
|
|
95
|
+
/>
|
|
96
|
+
);
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
export default TabsExample;
|
|
@@ -108,25 +108,25 @@ import React from "react";
|
|
|
108
108
|
import { Tabs } from "@webiny/admin-ui";
|
|
109
109
|
|
|
110
110
|
const DefaultTabsExample = () => {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
};
|
|
111
|
+
return (
|
|
112
|
+
|
|
113
|
+
<Tabs
|
|
114
|
+
tabs={[
|
|
115
|
+
<Tabs.Tab
|
|
116
|
+
key="account"
|
|
117
|
+
value="account"
|
|
118
|
+
trigger="Account"
|
|
119
|
+
content="Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
120
|
+
/>,
|
|
121
|
+
<Tabs.Tab
|
|
122
|
+
key="password"
|
|
123
|
+
value="password"
|
|
124
|
+
trigger="Password"
|
|
125
|
+
content="Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
126
|
+
/>
|
|
127
|
+
]}
|
|
128
|
+
/>
|
|
129
|
+
); };
|
|
130
130
|
|
|
131
131
|
export default DefaultTabsExample;
|
|
132
132
|
` } } />
|
|
@@ -140,26 +140,26 @@ import React from "react";
|
|
|
140
140
|
import { Tabs } from "@webiny/admin-ui";
|
|
141
141
|
|
|
142
142
|
const SmallTabsExample = () => {
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
};
|
|
143
|
+
return (
|
|
144
|
+
|
|
145
|
+
<Tabs
|
|
146
|
+
size="sm"
|
|
147
|
+
tabs={[
|
|
148
|
+
<Tabs.Tab
|
|
149
|
+
key="account"
|
|
150
|
+
value="account"
|
|
151
|
+
trigger="Account"
|
|
152
|
+
content="Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
153
|
+
/>,
|
|
154
|
+
<Tabs.Tab
|
|
155
|
+
key="password"
|
|
156
|
+
value="password"
|
|
157
|
+
trigger="Password"
|
|
158
|
+
content="Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
159
|
+
/>
|
|
160
|
+
]}
|
|
161
|
+
/>
|
|
162
|
+
); };
|
|
163
163
|
|
|
164
164
|
export default SmallTabsExample;
|
|
165
165
|
` } } />
|
|
@@ -171,26 +171,26 @@ import React from "react";
|
|
|
171
171
|
import { Tabs } from "@webiny/admin-ui";
|
|
172
172
|
|
|
173
173
|
const MediumTabsExample = () => {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
};
|
|
174
|
+
return (
|
|
175
|
+
|
|
176
|
+
<Tabs
|
|
177
|
+
size="md"
|
|
178
|
+
tabs={[
|
|
179
|
+
<Tabs.Tab
|
|
180
|
+
key="account"
|
|
181
|
+
value="account"
|
|
182
|
+
trigger="Account"
|
|
183
|
+
content="Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
184
|
+
/>,
|
|
185
|
+
<Tabs.Tab
|
|
186
|
+
key="password"
|
|
187
|
+
value="password"
|
|
188
|
+
trigger="Password"
|
|
189
|
+
content="Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
190
|
+
/>
|
|
191
|
+
]}
|
|
192
|
+
/>
|
|
193
|
+
); };
|
|
194
194
|
|
|
195
195
|
export default MediumTabsExample;
|
|
196
196
|
` } } />
|
|
@@ -202,26 +202,26 @@ import React from "react";
|
|
|
202
202
|
import { Tabs } from "@webiny/admin-ui";
|
|
203
203
|
|
|
204
204
|
const LargeTabsExample = () => {
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
};
|
|
205
|
+
return (
|
|
206
|
+
|
|
207
|
+
<Tabs
|
|
208
|
+
size="lg"
|
|
209
|
+
tabs={[
|
|
210
|
+
<Tabs.Tab
|
|
211
|
+
key="account"
|
|
212
|
+
value="account"
|
|
213
|
+
trigger="Account"
|
|
214
|
+
content="Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
215
|
+
/>,
|
|
216
|
+
<Tabs.Tab
|
|
217
|
+
key="password"
|
|
218
|
+
value="password"
|
|
219
|
+
trigger="Password"
|
|
220
|
+
content="Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
221
|
+
/>
|
|
222
|
+
]}
|
|
223
|
+
/>
|
|
224
|
+
); };
|
|
225
225
|
|
|
226
226
|
export default LargeTabsExample;
|
|
227
227
|
` } } />
|
|
@@ -233,26 +233,26 @@ import React from "react";
|
|
|
233
233
|
import { Tabs } from "@webiny/admin-ui";
|
|
234
234
|
|
|
235
235
|
const ExtraLargeTabsExample = () => {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
};
|
|
236
|
+
return (
|
|
237
|
+
|
|
238
|
+
<Tabs
|
|
239
|
+
size="xl"
|
|
240
|
+
tabs={[
|
|
241
|
+
<Tabs.Tab
|
|
242
|
+
key="account"
|
|
243
|
+
value="account"
|
|
244
|
+
trigger="Account"
|
|
245
|
+
content="Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
246
|
+
/>,
|
|
247
|
+
<Tabs.Tab
|
|
248
|
+
key="password"
|
|
249
|
+
value="password"
|
|
250
|
+
trigger="Password"
|
|
251
|
+
content="Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
252
|
+
/>
|
|
253
|
+
]}
|
|
254
|
+
/>
|
|
255
|
+
); };
|
|
256
256
|
|
|
257
257
|
export default ExtraLargeTabsExample;
|
|
258
258
|
` } } />
|
|
@@ -264,26 +264,26 @@ import React from "react";
|
|
|
264
264
|
import { Tabs } from "@webiny/admin-ui";
|
|
265
265
|
|
|
266
266
|
const SpacingMediumExample = () => {
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
};
|
|
267
|
+
return (
|
|
268
|
+
|
|
269
|
+
<Tabs
|
|
270
|
+
spacing="md"
|
|
271
|
+
tabs={[
|
|
272
|
+
<Tabs.Tab
|
|
273
|
+
key="account"
|
|
274
|
+
value="account"
|
|
275
|
+
trigger="Account"
|
|
276
|
+
content="Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
277
|
+
/>,
|
|
278
|
+
<Tabs.Tab
|
|
279
|
+
key="password"
|
|
280
|
+
value="password"
|
|
281
|
+
trigger="Password"
|
|
282
|
+
content="Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
283
|
+
/>
|
|
284
|
+
]}
|
|
285
|
+
/>
|
|
286
|
+
); };
|
|
287
287
|
|
|
288
288
|
export default SpacingMediumExample;
|
|
289
289
|
` } } />
|
|
@@ -295,26 +295,26 @@ import React from "react";
|
|
|
295
295
|
import { Tabs } from "@webiny/admin-ui";
|
|
296
296
|
|
|
297
297
|
const WithSeparatorExample = () => {
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
};
|
|
298
|
+
return (
|
|
299
|
+
|
|
300
|
+
<Tabs
|
|
301
|
+
separator={true}
|
|
302
|
+
tabs={[
|
|
303
|
+
<Tabs.Tab
|
|
304
|
+
key="account"
|
|
305
|
+
value="account"
|
|
306
|
+
trigger="Account"
|
|
307
|
+
content="Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
308
|
+
/>,
|
|
309
|
+
<Tabs.Tab
|
|
310
|
+
key="password"
|
|
311
|
+
value="password"
|
|
312
|
+
trigger="Password"
|
|
313
|
+
content="Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
314
|
+
/>
|
|
315
|
+
]}
|
|
316
|
+
/>
|
|
317
|
+
); };
|
|
318
318
|
|
|
319
319
|
export default WithSeparatorExample;
|
|
320
320
|
` } } />
|
|
@@ -326,26 +326,26 @@ import React from "react";
|
|
|
326
326
|
import { Tabs } from "@webiny/admin-ui";
|
|
327
327
|
|
|
328
328
|
const WithDefaultValueExample = () => {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
};
|
|
329
|
+
return (
|
|
330
|
+
|
|
331
|
+
<Tabs
|
|
332
|
+
defaultValue="password"
|
|
333
|
+
tabs={[
|
|
334
|
+
<Tabs.Tab
|
|
335
|
+
key="account"
|
|
336
|
+
value="account"
|
|
337
|
+
trigger="Account"
|
|
338
|
+
content="Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
339
|
+
/>,
|
|
340
|
+
<Tabs.Tab
|
|
341
|
+
key="password"
|
|
342
|
+
value="password"
|
|
343
|
+
trigger="Password"
|
|
344
|
+
content="Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
345
|
+
/>
|
|
346
|
+
]}
|
|
347
|
+
/>
|
|
348
|
+
); };
|
|
349
349
|
|
|
350
350
|
export default WithDefaultValueExample;
|
|
351
351
|
` } } />
|
|
@@ -357,7 +357,7 @@ import React, { useState } from "react";
|
|
|
357
357
|
import { Tabs } from "@webiny/admin-ui";
|
|
358
358
|
|
|
359
359
|
const WithControlledValueExample = () => {
|
|
360
|
-
|
|
360
|
+
const [value, setValue] = useState("password");
|
|
361
361
|
|
|
362
362
|
return (
|
|
363
363
|
<Tabs
|
|
@@ -379,6 +379,7 @@ const WithControlledValueExample = () => {
|
|
|
379
379
|
]}
|
|
380
380
|
/>
|
|
381
381
|
);
|
|
382
|
+
|
|
382
383
|
};
|
|
383
384
|
|
|
384
385
|
export default WithControlledValueExample;
|
|
@@ -393,27 +394,27 @@ import { ReactComponent as PersonIcon } from "@webiny/icons/person.svg";
|
|
|
393
394
|
import { ReactComponent as LockIcon } from "@webiny/icons/lock.svg";
|
|
394
395
|
|
|
395
396
|
const WithIconsExample = () => {
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
};
|
|
397
|
+
return (
|
|
398
|
+
|
|
399
|
+
<Tabs
|
|
400
|
+
tabs={[
|
|
401
|
+
<Tabs.Tab
|
|
402
|
+
key="account"
|
|
403
|
+
value="account"
|
|
404
|
+
trigger="Account"
|
|
405
|
+
icon={<PersonIcon />}
|
|
406
|
+
content="Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
407
|
+
/>,
|
|
408
|
+
<Tabs.Tab
|
|
409
|
+
key="password"
|
|
410
|
+
value="password"
|
|
411
|
+
trigger="Password"
|
|
412
|
+
icon={<LockIcon />}
|
|
413
|
+
content="Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
414
|
+
/>
|
|
415
|
+
]}
|
|
416
|
+
/>
|
|
417
|
+
); };
|
|
417
418
|
|
|
418
419
|
export default WithIconsExample;
|
|
419
420
|
` } } />
|
|
@@ -425,26 +426,26 @@ import React from "react";
|
|
|
425
426
|
import { Tabs } from "@webiny/admin-ui";
|
|
426
427
|
|
|
427
428
|
const WithDisabledTabExample = () => {
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
};
|
|
429
|
+
return (
|
|
430
|
+
|
|
431
|
+
<Tabs
|
|
432
|
+
tabs={[
|
|
433
|
+
<Tabs.Tab
|
|
434
|
+
key="account"
|
|
435
|
+
value="account"
|
|
436
|
+
trigger="Account"
|
|
437
|
+
content="Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
438
|
+
disabled={true}
|
|
439
|
+
/>,
|
|
440
|
+
<Tabs.Tab
|
|
441
|
+
key="password"
|
|
442
|
+
value="password"
|
|
443
|
+
trigger="Password"
|
|
444
|
+
content="Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
445
|
+
/>
|
|
446
|
+
]}
|
|
447
|
+
/>
|
|
448
|
+
); };
|
|
448
449
|
|
|
449
450
|
export default WithDisabledTabExample;
|
|
450
451
|
` } } />
|
|
@@ -456,26 +457,26 @@ import React from "react";
|
|
|
456
457
|
import { Tabs } from "@webiny/admin-ui";
|
|
457
458
|
|
|
458
459
|
const WithHiddenTabExample = () => {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
};
|
|
460
|
+
return (
|
|
461
|
+
|
|
462
|
+
<Tabs
|
|
463
|
+
tabs={[
|
|
464
|
+
<Tabs.Tab
|
|
465
|
+
key="account"
|
|
466
|
+
value="account"
|
|
467
|
+
trigger="Account"
|
|
468
|
+
content="Account content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
469
|
+
visible={false}
|
|
470
|
+
/>,
|
|
471
|
+
<Tabs.Tab
|
|
472
|
+
key="password"
|
|
473
|
+
value="password"
|
|
474
|
+
trigger="Password"
|
|
475
|
+
content="Password content - Lorem ipsum dolor sit amet, consectetur adipiscing elit."
|
|
476
|
+
/>
|
|
477
|
+
]}
|
|
478
|
+
/>
|
|
479
|
+
); };
|
|
479
480
|
|
|
480
481
|
export default WithHiddenTabExample;
|
|
481
482
|
` } } />
|
|
@@ -483,13 +484,17 @@ export default WithHiddenTabExample;
|
|
|
483
484
|
## Anatomy
|
|
484
485
|
|
|
485
486
|
### Construction
|
|
486
|
-
|
|
487
|
+
|
|
488
|
+
<img src="/images/storybook/tabs/construction.png" alt="Construction" />
|
|
487
489
|
|
|
488
490
|
### Size & States
|
|
489
|
-
|
|
491
|
+
|
|
492
|
+
<img src="/images/storybook/tabs/size-and-states.png" alt="Size & States" />
|
|
490
493
|
|
|
491
494
|
### Tab Group
|
|
492
|
-
|
|
495
|
+
|
|
496
|
+
<img src="/images/storybook/tabs/tab-group.png" alt="Tab Group" />
|
|
493
497
|
|
|
494
498
|
## Usage
|
|
495
|
-
|
|
499
|
+
|
|
500
|
+
<img src="/images/storybook/tabs/usage.png" alt="Usage" />
|