@eturnity/eturnity_reusable_components 8.19.2 → 8.19.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/package.json +1 -1
- package/src/assets/svgIcons/download.svg +3 -3
- package/src/assets/svgIcons/filter.svg +3 -0
- package/src/assets/svgIcons/kanban_view.svg +6 -0
- package/src/assets/svgIcons/plus_button.svg +3 -3
- package/src/assets/svgIcons/table_view.svg +3 -0
- package/src/assets/theme.js +53 -5
- package/src/components/banner/banner/Banner.stories.js +99 -43
- package/src/components/banner/infoBanner/InfoBanner.stories.js +72 -30
- package/src/components/buttons/buttonIcon/ButtonIcon.stories.js +167 -0
- package/src/components/buttons/buttonIcon/index.vue +40 -6
- package/src/components/buttons/mainButton/MainButton.stories.js +115 -34
- package/src/components/draggableCard/draggableCard.stories.js +110 -54
- package/src/components/filter/filterSettings.vue +1 -1
- package/src/components/filterComponent/viewFilter.vue +605 -0
- package/src/components/filterComponent/viewSettings.vue +281 -0
- package/src/components/filterComponent/viewSort.vue +330 -0
- package/src/components/icon/Icon.stories.js +220 -0
- package/src/components/icon/index.vue +8 -1
- package/src/components/infoCard/index.vue +7 -3
- package/src/components/inputs/searchInput/index.vue +1 -1
- package/src/components/inputs/select/index.vue +6 -5
- package/src/components/inputs/select/option/index.vue +5 -0
- package/src/components/projectMarker/ProjectMarker.stories.js +130 -0
- package/src/components/selectedOptions/index.vue +13 -2
- package/src/components/selectedOptions/selectedOptions.stories.js +135 -37
- package/src/components/spinner/Spinner.stories.js +70 -18
- package/src/components/spinnerGif/SpinnerGif.stories.js +86 -0
- package/src/components/tableDropdown/TableDropdown.stories.js +192 -0
- package/src/components/tables/mainTable/MainTable.stories.js +151 -0
- package/src/components/tabsHeader/TabsHeader.stories.js +142 -0
- package/src/components/tabsHeader/index.vue +33 -9
- package/src/components/videoThumbnail/videoThumbnail.stories.js +90 -17
- package/src/helpers/translateLang.js +95 -24
- package/src/components/icon/Icons.stories.js +0 -31
@@ -1,34 +1,86 @@
|
|
1
1
|
import Spinner from './index.vue'
|
2
|
+
import theme from '@/assets/theme'
|
2
3
|
|
3
4
|
export default {
|
4
5
|
title: 'Spinner',
|
5
6
|
component: Spinner,
|
6
7
|
tags: ['autodocs'],
|
8
|
+
argTypes: {
|
9
|
+
size: {
|
10
|
+
control: 'select',
|
11
|
+
options: ['small', 'medium', 'large'],
|
12
|
+
description: 'Size of the spinner',
|
13
|
+
},
|
14
|
+
isWhite: {
|
15
|
+
control: 'boolean',
|
16
|
+
description: 'Whether to use white color for the spinner',
|
17
|
+
},
|
18
|
+
limitedToModal: {
|
19
|
+
control: 'boolean',
|
20
|
+
description: 'Whether the spinner is limited to a modal context',
|
21
|
+
},
|
22
|
+
fullWidth: {
|
23
|
+
control: 'boolean',
|
24
|
+
description: 'Whether to show the spinner with a full-width overlay',
|
25
|
+
},
|
26
|
+
},
|
7
27
|
}
|
8
28
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
29
|
+
const Template = (args) => ({
|
30
|
+
components: { Spinner },
|
31
|
+
setup() {
|
32
|
+
return { args }
|
33
|
+
},
|
34
|
+
template: '<Spinner v-bind="args" />',
|
35
|
+
provide: {
|
36
|
+
theme,
|
14
37
|
},
|
38
|
+
})
|
39
|
+
|
40
|
+
export const Default = Template.bind({})
|
41
|
+
Default.args = {
|
42
|
+
size: 'medium',
|
43
|
+
isWhite: false,
|
44
|
+
limitedToModal: false,
|
45
|
+
fullWidth: false,
|
15
46
|
}
|
16
47
|
|
17
|
-
export const
|
18
|
-
|
19
|
-
|
20
|
-
|
48
|
+
export const Small = Template.bind({})
|
49
|
+
Small.args = {
|
50
|
+
size: 'small',
|
51
|
+
isWhite: false,
|
52
|
+
limitedToModal: false,
|
53
|
+
fullWidth: false,
|
21
54
|
}
|
22
55
|
|
23
|
-
export const
|
24
|
-
|
25
|
-
|
26
|
-
|
56
|
+
export const Large = Template.bind({})
|
57
|
+
Large.args = {
|
58
|
+
size: 'large',
|
59
|
+
isWhite: false,
|
60
|
+
limitedToModal: false,
|
61
|
+
fullWidth: false,
|
27
62
|
}
|
28
63
|
|
29
|
-
export const
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
64
|
+
export const White = Template.bind({})
|
65
|
+
White.args = {
|
66
|
+
size: 'medium',
|
67
|
+
isWhite: true,
|
68
|
+
limitedToModal: false,
|
69
|
+
fullWidth: false,
|
70
|
+
}
|
71
|
+
|
72
|
+
export const InModal = Template.bind({})
|
73
|
+
InModal.args = {
|
74
|
+
size: 'medium',
|
75
|
+
isWhite: false,
|
76
|
+
limitedToModal: true,
|
77
|
+
fullWidth: false,
|
78
|
+
}
|
79
|
+
|
80
|
+
export const FullWidth = Template.bind({})
|
81
|
+
FullWidth.args = {
|
82
|
+
size: 'medium',
|
83
|
+
isWhite: false,
|
84
|
+
limitedToModal: false,
|
85
|
+
fullWidth: true,
|
34
86
|
}
|
@@ -0,0 +1,86 @@
|
|
1
|
+
import SpinnerGif from './index.vue'
|
2
|
+
import theme from '@/assets/theme'
|
3
|
+
|
4
|
+
export default {
|
5
|
+
title: 'SpinnerGif',
|
6
|
+
component: SpinnerGif,
|
7
|
+
tags: ['autodocs'],
|
8
|
+
argTypes: {
|
9
|
+
size: {
|
10
|
+
control: 'text',
|
11
|
+
description: 'Size of the spinner in pixels (e.g., "30px")',
|
12
|
+
},
|
13
|
+
isWhite: {
|
14
|
+
control: 'boolean',
|
15
|
+
description: 'Whether to show the spinner in white color',
|
16
|
+
},
|
17
|
+
limitedToModal: {
|
18
|
+
control: 'boolean',
|
19
|
+
description: 'Whether the spinner is limited to a modal context',
|
20
|
+
},
|
21
|
+
fullWidth: {
|
22
|
+
control: 'boolean',
|
23
|
+
description:
|
24
|
+
'Whether the spinner should take up the full width of its container',
|
25
|
+
},
|
26
|
+
},
|
27
|
+
}
|
28
|
+
|
29
|
+
const Template = (args) => ({
|
30
|
+
components: { SpinnerGif },
|
31
|
+
setup() {
|
32
|
+
return { args }
|
33
|
+
},
|
34
|
+
template: '<SpinnerGif v-bind="args" />',
|
35
|
+
provide: {
|
36
|
+
theme,
|
37
|
+
},
|
38
|
+
})
|
39
|
+
|
40
|
+
export const Default = Template.bind({})
|
41
|
+
Default.args = {
|
42
|
+
size: '60px',
|
43
|
+
isWhite: false,
|
44
|
+
limitedToModal: false,
|
45
|
+
fullWidth: false,
|
46
|
+
}
|
47
|
+
|
48
|
+
export const Small = Template.bind({})
|
49
|
+
Small.args = {
|
50
|
+
size: '30px',
|
51
|
+
isWhite: false,
|
52
|
+
limitedToModal: false,
|
53
|
+
fullWidth: false,
|
54
|
+
}
|
55
|
+
|
56
|
+
export const Large = Template.bind({})
|
57
|
+
Large.args = {
|
58
|
+
size: '90px',
|
59
|
+
isWhite: false,
|
60
|
+
limitedToModal: false,
|
61
|
+
fullWidth: false,
|
62
|
+
}
|
63
|
+
|
64
|
+
export const White = Template.bind({})
|
65
|
+
White.args = {
|
66
|
+
size: '60px',
|
67
|
+
isWhite: true,
|
68
|
+
limitedToModal: false,
|
69
|
+
fullWidth: false,
|
70
|
+
}
|
71
|
+
|
72
|
+
export const InModal = Template.bind({})
|
73
|
+
InModal.args = {
|
74
|
+
size: '60px',
|
75
|
+
isWhite: false,
|
76
|
+
limitedToModal: true,
|
77
|
+
fullWidth: false,
|
78
|
+
}
|
79
|
+
|
80
|
+
export const FullWidth = Template.bind({})
|
81
|
+
FullWidth.args = {
|
82
|
+
size: '60px',
|
83
|
+
isWhite: false,
|
84
|
+
limitedToModal: false,
|
85
|
+
fullWidth: true,
|
86
|
+
}
|
@@ -0,0 +1,192 @@
|
|
1
|
+
import TableDropdown from './index.vue'
|
2
|
+
import theme from '@/assets/theme'
|
3
|
+
|
4
|
+
export default {
|
5
|
+
title: 'Components/TableDropdown',
|
6
|
+
component: TableDropdown,
|
7
|
+
tags: ['autodocs'],
|
8
|
+
argTypes: {
|
9
|
+
colSpan: {
|
10
|
+
control: 'number',
|
11
|
+
description: 'Number of columns the dropdown should span',
|
12
|
+
},
|
13
|
+
customInputDisabled: {
|
14
|
+
control: 'boolean',
|
15
|
+
description: 'Whether the input field should be disabled',
|
16
|
+
},
|
17
|
+
allowFreeInputs: {
|
18
|
+
control: 'boolean',
|
19
|
+
description: 'Whether to allow custom input values',
|
20
|
+
},
|
21
|
+
tableItems: {
|
22
|
+
control: 'object',
|
23
|
+
description: 'Array of items to display in the dropdown',
|
24
|
+
},
|
25
|
+
showArchived: {
|
26
|
+
control: 'boolean',
|
27
|
+
description: 'Whether to show archived items in red',
|
28
|
+
},
|
29
|
+
isOpen: {
|
30
|
+
control: 'boolean',
|
31
|
+
description: 'Whether the dropdown is open',
|
32
|
+
},
|
33
|
+
optionsLoading: {
|
34
|
+
control: 'boolean',
|
35
|
+
description: 'Whether to show loading spinner',
|
36
|
+
},
|
37
|
+
emptyText: {
|
38
|
+
control: 'text',
|
39
|
+
description: 'Custom text to show when no options are available',
|
40
|
+
},
|
41
|
+
optionItems: {
|
42
|
+
control: 'object',
|
43
|
+
description: 'Array of options to display in the dropdown',
|
44
|
+
},
|
45
|
+
optionsDisplay: {
|
46
|
+
control: 'object',
|
47
|
+
description: 'Array of property names to display for each option',
|
48
|
+
},
|
49
|
+
disabled: {
|
50
|
+
control: 'boolean',
|
51
|
+
description: 'Whether the dropdown is disabled',
|
52
|
+
},
|
53
|
+
isNested: {
|
54
|
+
control: 'boolean',
|
55
|
+
description: 'Whether to show nested items with indentation',
|
56
|
+
},
|
57
|
+
showInfoText: {
|
58
|
+
control: 'boolean',
|
59
|
+
description: 'Whether to show info text',
|
60
|
+
},
|
61
|
+
infoTextMessage: {
|
62
|
+
control: 'text',
|
63
|
+
description: 'Info text message to display',
|
64
|
+
},
|
65
|
+
},
|
66
|
+
}
|
67
|
+
|
68
|
+
const Template = (args) => ({
|
69
|
+
components: { TableDropdown },
|
70
|
+
setup() {
|
71
|
+
return { args }
|
72
|
+
},
|
73
|
+
template: '<TableDropdown v-bind="args" />',
|
74
|
+
provide: {
|
75
|
+
theme,
|
76
|
+
},
|
77
|
+
})
|
78
|
+
|
79
|
+
export const Default = Template.bind({})
|
80
|
+
Default.args = {
|
81
|
+
colSpan: 2,
|
82
|
+
customInputDisabled: false,
|
83
|
+
allowFreeInputs: true,
|
84
|
+
tableItems: [
|
85
|
+
{
|
86
|
+
type: 'text',
|
87
|
+
value: 'Selected Item',
|
88
|
+
},
|
89
|
+
],
|
90
|
+
showArchived: false,
|
91
|
+
isOpen: false,
|
92
|
+
optionsLoading: false,
|
93
|
+
emptyText: 'No items found',
|
94
|
+
optionItems: [
|
95
|
+
{
|
96
|
+
display_name: 'Item 1',
|
97
|
+
company_item_number: '123',
|
98
|
+
description: 'First item',
|
99
|
+
},
|
100
|
+
{
|
101
|
+
display_name: 'Item 2',
|
102
|
+
company_item_number: '456',
|
103
|
+
description: 'Second item',
|
104
|
+
},
|
105
|
+
],
|
106
|
+
optionsDisplay: ['display_name', 'company_item_number', 'description'],
|
107
|
+
disabled: false,
|
108
|
+
isNested: false,
|
109
|
+
showInfoText: false,
|
110
|
+
infoTextMessage: '',
|
111
|
+
}
|
112
|
+
|
113
|
+
export const WithTemplates = Template.bind({})
|
114
|
+
WithTemplates.args = {
|
115
|
+
...Default.args,
|
116
|
+
tableItems: [
|
117
|
+
{
|
118
|
+
type: 'template',
|
119
|
+
value: 'Template 1',
|
120
|
+
},
|
121
|
+
],
|
122
|
+
optionItems: [
|
123
|
+
{
|
124
|
+
display_name: 'Template 1',
|
125
|
+
has_template: true,
|
126
|
+
},
|
127
|
+
{
|
128
|
+
display_name: 'Item 2',
|
129
|
+
has_template: false,
|
130
|
+
},
|
131
|
+
],
|
132
|
+
optionsDisplay: ['display_name', 'template'],
|
133
|
+
}
|
134
|
+
|
135
|
+
export const WithCustomInput = Template.bind({})
|
136
|
+
WithCustomInput.args = {
|
137
|
+
...Default.args,
|
138
|
+
tableItems: [
|
139
|
+
{
|
140
|
+
type: 'input',
|
141
|
+
value: 'Custom Value',
|
142
|
+
},
|
143
|
+
],
|
144
|
+
customInputDisabled: false,
|
145
|
+
}
|
146
|
+
|
147
|
+
export const WithArchivedItems = Template.bind({})
|
148
|
+
WithArchivedItems.args = {
|
149
|
+
...Default.args,
|
150
|
+
showArchived: true,
|
151
|
+
tableItems: [
|
152
|
+
{
|
153
|
+
type: 'text',
|
154
|
+
value: 'Archived Item',
|
155
|
+
},
|
156
|
+
],
|
157
|
+
}
|
158
|
+
|
159
|
+
export const WithNestedItems = Template.bind({})
|
160
|
+
WithNestedItems.args = {
|
161
|
+
...Default.args,
|
162
|
+
isNested: true,
|
163
|
+
tableItems: [
|
164
|
+
{
|
165
|
+
type: 'text',
|
166
|
+
value: 'Parent Item',
|
167
|
+
},
|
168
|
+
{
|
169
|
+
type: 'text',
|
170
|
+
value: 'Child Item',
|
171
|
+
},
|
172
|
+
],
|
173
|
+
}
|
174
|
+
|
175
|
+
export const WithInfoText = Template.bind({})
|
176
|
+
WithInfoText.args = {
|
177
|
+
...Default.args,
|
178
|
+
showInfoText: true,
|
179
|
+
infoTextMessage: 'This is an important message',
|
180
|
+
}
|
181
|
+
|
182
|
+
export const LoadingState = Template.bind({})
|
183
|
+
LoadingState.args = {
|
184
|
+
...Default.args,
|
185
|
+
optionsLoading: true,
|
186
|
+
}
|
187
|
+
|
188
|
+
export const Disabled = Template.bind({})
|
189
|
+
Disabled.args = {
|
190
|
+
...Default.args,
|
191
|
+
disabled: true,
|
192
|
+
}
|
@@ -0,0 +1,151 @@
|
|
1
|
+
import MainTable from './index.vue'
|
2
|
+
import theme from '@/assets/theme'
|
3
|
+
|
4
|
+
export default {
|
5
|
+
title: 'Components/Tables/MainTable',
|
6
|
+
component: MainTable,
|
7
|
+
tags: ['autodocs'],
|
8
|
+
argTypes: {
|
9
|
+
fullWidth: {
|
10
|
+
control: 'boolean',
|
11
|
+
description: 'Whether the table should take full width of its container',
|
12
|
+
},
|
13
|
+
cellPaddings: {
|
14
|
+
control: 'text',
|
15
|
+
description: 'Custom padding for table cells (e.g., "10px 15px")',
|
16
|
+
},
|
17
|
+
isLoading: {
|
18
|
+
control: 'boolean',
|
19
|
+
description: 'Whether to show loading spinner',
|
20
|
+
},
|
21
|
+
isOverflowHidden: {
|
22
|
+
control: 'boolean',
|
23
|
+
description: 'Whether to hide overflow content',
|
24
|
+
},
|
25
|
+
titleText: {
|
26
|
+
control: 'text',
|
27
|
+
description: 'Optional title text above the table',
|
28
|
+
},
|
29
|
+
hasAimHover: {
|
30
|
+
control: 'boolean',
|
31
|
+
description: 'Whether to enable column hover highlighting',
|
32
|
+
},
|
33
|
+
tableCursor: {
|
34
|
+
control: 'text',
|
35
|
+
description: 'Custom cursor style for the table',
|
36
|
+
},
|
37
|
+
},
|
38
|
+
}
|
39
|
+
|
40
|
+
const Template = (args) => ({
|
41
|
+
components: { MainTable },
|
42
|
+
setup() {
|
43
|
+
return { args }
|
44
|
+
},
|
45
|
+
template: `
|
46
|
+
<MainTable v-bind="args">
|
47
|
+
<thead>
|
48
|
+
<tr>
|
49
|
+
<th>Name</th>
|
50
|
+
<th>Status</th>
|
51
|
+
<th>Date</th>
|
52
|
+
</tr>
|
53
|
+
</thead>
|
54
|
+
<tbody>
|
55
|
+
<tr>
|
56
|
+
<td>Project A</td>
|
57
|
+
<td>Active</td>
|
58
|
+
<td>2024-03-15</td>
|
59
|
+
</tr>
|
60
|
+
<tr>
|
61
|
+
<td>Project B</td>
|
62
|
+
<td>Completed</td>
|
63
|
+
<td>2024-03-10</td>
|
64
|
+
</tr>
|
65
|
+
</tbody>
|
66
|
+
</MainTable>
|
67
|
+
`,
|
68
|
+
provide: {
|
69
|
+
theme,
|
70
|
+
},
|
71
|
+
})
|
72
|
+
|
73
|
+
export const Default = Template.bind({})
|
74
|
+
Default.args = {
|
75
|
+
fullWidth: true,
|
76
|
+
cellPaddings: '6px 6px 7px 4px',
|
77
|
+
isLoading: false,
|
78
|
+
isOverflowHidden: true,
|
79
|
+
titleText: 'Projects',
|
80
|
+
hasAimHover: false,
|
81
|
+
tableCursor: 'pointer',
|
82
|
+
}
|
83
|
+
|
84
|
+
export const Loading = Template.bind({})
|
85
|
+
Loading.args = {
|
86
|
+
...Default.args,
|
87
|
+
isLoading: true,
|
88
|
+
}
|
89
|
+
|
90
|
+
export const WithoutTitle = Template.bind({})
|
91
|
+
WithoutTitle.args = {
|
92
|
+
...Default.args,
|
93
|
+
titleText: null,
|
94
|
+
}
|
95
|
+
|
96
|
+
export const WithColumnHover = Template.bind({})
|
97
|
+
WithColumnHover.args = {
|
98
|
+
...Default.args,
|
99
|
+
hasAimHover: true,
|
100
|
+
}
|
101
|
+
|
102
|
+
export const CustomWidth = Template.bind({})
|
103
|
+
CustomWidth.args = {
|
104
|
+
...Default.args,
|
105
|
+
fullWidth: false,
|
106
|
+
}
|
107
|
+
|
108
|
+
export const CustomCellPadding = Template.bind({})
|
109
|
+
CustomCellPadding.args = {
|
110
|
+
...Default.args,
|
111
|
+
cellPaddings: '10px 15px',
|
112
|
+
}
|
113
|
+
|
114
|
+
export const WithDraggableRows = Template.bind({})
|
115
|
+
WithDraggableRows.args = {
|
116
|
+
...Default.args,
|
117
|
+
}
|
118
|
+
WithDraggableRows.template = `
|
119
|
+
<MainTable v-bind="args">
|
120
|
+
<thead>
|
121
|
+
<tr>
|
122
|
+
<th></th>
|
123
|
+
<th>Name</th>
|
124
|
+
<th>Status</th>
|
125
|
+
<th>Date</th>
|
126
|
+
</tr>
|
127
|
+
</thead>
|
128
|
+
<tbody>
|
129
|
+
<tr>
|
130
|
+
<td class="drag-container">
|
131
|
+
<div class="drag-wrapper">
|
132
|
+
<div class="drag-icon"></div>
|
133
|
+
</div>
|
134
|
+
</td>
|
135
|
+
<td>Project A</td>
|
136
|
+
<td>Active</td>
|
137
|
+
<td>2024-03-15</td>
|
138
|
+
</tr>
|
139
|
+
<tr>
|
140
|
+
<td class="drag-container">
|
141
|
+
<div class="drag-wrapper">
|
142
|
+
<div class="drag-icon"></div>
|
143
|
+
</div>
|
144
|
+
</td>
|
145
|
+
<td>Project B</td>
|
146
|
+
<td>Completed</td>
|
147
|
+
<td>2024-03-10</td>
|
148
|
+
</tr>
|
149
|
+
</tbody>
|
150
|
+
</MainTable>
|
151
|
+
`
|
@@ -0,0 +1,142 @@
|
|
1
|
+
import TabsHeader from './index.vue'
|
2
|
+
import theme from '@/assets/theme'
|
3
|
+
|
4
|
+
export default {
|
5
|
+
title: 'TabsHeader',
|
6
|
+
component: TabsHeader,
|
7
|
+
tags: ['autodocs'],
|
8
|
+
argTypes: {
|
9
|
+
tabsData: {
|
10
|
+
control: 'object',
|
11
|
+
description:
|
12
|
+
'Array of tab objects with text, id, and optional hasError and icon properties',
|
13
|
+
},
|
14
|
+
activeTab: {
|
15
|
+
control: 'number',
|
16
|
+
description: 'ID of the currently active tab',
|
17
|
+
},
|
18
|
+
},
|
19
|
+
}
|
20
|
+
|
21
|
+
const Template = (args) => ({
|
22
|
+
components: { TabsHeader },
|
23
|
+
setup() {
|
24
|
+
return { args }
|
25
|
+
},
|
26
|
+
template: '<TabsHeader v-bind="args" @on-tab-change="onTabChange" />',
|
27
|
+
methods: {
|
28
|
+
onTabChange(id) {
|
29
|
+
console.log('Tab changed to:', id)
|
30
|
+
},
|
31
|
+
},
|
32
|
+
provide: {
|
33
|
+
theme,
|
34
|
+
},
|
35
|
+
})
|
36
|
+
|
37
|
+
export const Default = Template.bind({})
|
38
|
+
Default.args = {
|
39
|
+
tabsData: [
|
40
|
+
{
|
41
|
+
text: 'Tab 1',
|
42
|
+
id: 0,
|
43
|
+
},
|
44
|
+
{
|
45
|
+
text: 'Tab 2',
|
46
|
+
id: 1,
|
47
|
+
},
|
48
|
+
{
|
49
|
+
text: 'Tab 3',
|
50
|
+
id: 2,
|
51
|
+
},
|
52
|
+
],
|
53
|
+
activeTab: 0,
|
54
|
+
}
|
55
|
+
|
56
|
+
export const WithErrors = Template.bind({})
|
57
|
+
WithErrors.args = {
|
58
|
+
tabsData: [
|
59
|
+
{
|
60
|
+
text: 'Tab 1',
|
61
|
+
id: 0,
|
62
|
+
hasError: true,
|
63
|
+
},
|
64
|
+
{
|
65
|
+
text: 'Tab 2',
|
66
|
+
id: 1,
|
67
|
+
hasError: false,
|
68
|
+
},
|
69
|
+
{
|
70
|
+
text: 'Tab 3',
|
71
|
+
id: 2,
|
72
|
+
hasError: true,
|
73
|
+
},
|
74
|
+
],
|
75
|
+
activeTab: 0,
|
76
|
+
}
|
77
|
+
|
78
|
+
export const WithIcons = Template.bind({})
|
79
|
+
WithIcons.args = {
|
80
|
+
tabsData: [
|
81
|
+
{
|
82
|
+
text: 'Tab 1',
|
83
|
+
id: 0,
|
84
|
+
icon: 'settings',
|
85
|
+
},
|
86
|
+
{
|
87
|
+
text: 'Tab 2',
|
88
|
+
id: 1,
|
89
|
+
icon: 'warning',
|
90
|
+
},
|
91
|
+
{
|
92
|
+
text: 'Tab 3',
|
93
|
+
id: 2,
|
94
|
+
icon: 'info',
|
95
|
+
},
|
96
|
+
],
|
97
|
+
activeTab: 0,
|
98
|
+
}
|
99
|
+
|
100
|
+
export const WithErrorsAndIcons = Template.bind({})
|
101
|
+
WithErrorsAndIcons.args = {
|
102
|
+
tabsData: [
|
103
|
+
{
|
104
|
+
text: 'Tab 1',
|
105
|
+
id: 0,
|
106
|
+
icon: 'settings',
|
107
|
+
hasError: true,
|
108
|
+
},
|
109
|
+
{
|
110
|
+
text: 'Tab 2',
|
111
|
+
id: 1,
|
112
|
+
icon: 'warning',
|
113
|
+
hasError: false,
|
114
|
+
},
|
115
|
+
{
|
116
|
+
text: 'Tab 3',
|
117
|
+
id: 2,
|
118
|
+
icon: 'info',
|
119
|
+
hasError: true,
|
120
|
+
},
|
121
|
+
],
|
122
|
+
activeTab: 0,
|
123
|
+
}
|
124
|
+
|
125
|
+
export const StringIds = Template.bind({})
|
126
|
+
StringIds.args = {
|
127
|
+
tabsData: [
|
128
|
+
{
|
129
|
+
text: 'Tab 1',
|
130
|
+
id: 'tab1',
|
131
|
+
},
|
132
|
+
{
|
133
|
+
text: 'Tab 2',
|
134
|
+
id: 'tab2',
|
135
|
+
},
|
136
|
+
{
|
137
|
+
text: 'Tab 3',
|
138
|
+
id: 'tab3',
|
139
|
+
},
|
140
|
+
],
|
141
|
+
activeTab: 'tab1',
|
142
|
+
}
|