@eturnity/eturnity_reusable_components 8.16.2--EPDM-14330.2 → 8.16.2--EPDM-14330.3
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/theme.js +54 -6
- 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 +4 -5
- package/src/components/buttons/mainButton/MainButton.stories.js +116 -32
- package/src/components/draggableCard/draggableCard.stories.js +110 -54
- package/src/components/filterComponent/viewSettings.vue +220 -0
- package/src/components/icon/Icon.stories.js +220 -0
- package/src/components/projectMarker/ProjectMarker.stories.js +130 -0
- 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/videoThumbnail/videoThumbnail.stories.js +90 -17
- package/src/components/icon/Icons.stories.js +0 -31
package/package.json
CHANGED
package/src/assets/theme.js
CHANGED
@@ -312,12 +312,12 @@ const theme = (() => {
|
|
312
312
|
borderColor: semanticColors.grey[300],
|
313
313
|
},
|
314
314
|
hover: {
|
315
|
-
backgroundColor: semanticColors.
|
315
|
+
backgroundColor: semanticColors.purple[200],
|
316
316
|
textColor: semanticColors.purple[700],
|
317
317
|
borderColor: semanticColors.grey[300],
|
318
318
|
},
|
319
319
|
active: {
|
320
|
-
backgroundColor: semanticColors.
|
320
|
+
backgroundColor: semanticColors.purple[100],
|
321
321
|
textColor: semanticColors.purple[600],
|
322
322
|
borderColor: semanticColors.grey[600],
|
323
323
|
},
|
@@ -361,12 +361,12 @@ const theme = (() => {
|
|
361
361
|
borderColor: '',
|
362
362
|
},
|
363
363
|
hover: {
|
364
|
-
backgroundColor: semanticColors.
|
364
|
+
backgroundColor: semanticColors.purple[200],
|
365
365
|
textColor: semanticColors.purple[700],
|
366
366
|
borderColor: '',
|
367
367
|
},
|
368
368
|
active: {
|
369
|
-
backgroundColor: semanticColors.
|
369
|
+
backgroundColor: semanticColors.purple[100],
|
370
370
|
textColor: semanticColors.purple[600],
|
371
371
|
borderColor: '',
|
372
372
|
},
|
@@ -400,6 +400,30 @@ const theme = (() => {
|
|
400
400
|
},
|
401
401
|
},
|
402
402
|
},
|
403
|
+
filter: {
|
404
|
+
main: {
|
405
|
+
default: {
|
406
|
+
backgroundColor: colors.white,
|
407
|
+
textColor: semanticColors.teal[800],
|
408
|
+
borderColor: semanticColors.teal[100],
|
409
|
+
},
|
410
|
+
hover: {
|
411
|
+
backgroundColor: semanticColors.teal[50],
|
412
|
+
textColor: semanticColors.teal[800],
|
413
|
+
borderColor: semanticColors.teal[100],
|
414
|
+
},
|
415
|
+
active: {
|
416
|
+
backgroundColor: semanticColors.teal[100],
|
417
|
+
textColor: semanticColors.teal[800],
|
418
|
+
borderColor: semanticColors.teal[100],
|
419
|
+
},
|
420
|
+
disabled: {
|
421
|
+
textColor: semanticColors.grey[600],
|
422
|
+
backgroundColor: semanticColors.grey[300],
|
423
|
+
borderColor: '',
|
424
|
+
},
|
425
|
+
},
|
426
|
+
},
|
403
427
|
},
|
404
428
|
dark: {
|
405
429
|
// theme
|
@@ -413,12 +437,12 @@ const theme = (() => {
|
|
413
437
|
borderColor: '',
|
414
438
|
},
|
415
439
|
hover: {
|
416
|
-
backgroundColor: semanticColors.
|
440
|
+
backgroundColor: semanticColors.purple[100],
|
417
441
|
textColor: semanticColors.teal[800],
|
418
442
|
borderColor: '',
|
419
443
|
},
|
420
444
|
active: {
|
421
|
-
backgroundColor: semanticColors.
|
445
|
+
backgroundColor: semanticColors.purple[100],
|
422
446
|
textColor: semanticColors.teal[800],
|
423
447
|
borderColor: '',
|
424
448
|
},
|
@@ -599,6 +623,30 @@ const theme = (() => {
|
|
599
623
|
},
|
600
624
|
},
|
601
625
|
},
|
626
|
+
filter: {
|
627
|
+
main: {
|
628
|
+
default: {
|
629
|
+
backgroundColor: colors.white,
|
630
|
+
textColor: semanticColors.teal[800],
|
631
|
+
borderColor: semanticColors.teal[100],
|
632
|
+
},
|
633
|
+
hover: {
|
634
|
+
backgroundColor: semanticColors.teal[100],
|
635
|
+
textColor: semanticColors.teal[800],
|
636
|
+
borderColor: semanticColors.teal[100],
|
637
|
+
},
|
638
|
+
active: {
|
639
|
+
backgroundColor: semanticColors.teal[100],
|
640
|
+
textColor: semanticColors.teal[800],
|
641
|
+
borderColor: semanticColors.teal[100],
|
642
|
+
},
|
643
|
+
disabled: {
|
644
|
+
textColor: semanticColors.grey[600],
|
645
|
+
backgroundColor: semanticColors.grey[300],
|
646
|
+
borderColor: '',
|
647
|
+
},
|
648
|
+
},
|
649
|
+
},
|
602
650
|
},
|
603
651
|
size: {
|
604
652
|
large: {
|
@@ -5,60 +5,116 @@ export default {
|
|
5
5
|
title: 'Banner',
|
6
6
|
component: Banner,
|
7
7
|
tags: ['autodocs'],
|
8
|
+
argTypes: {
|
9
|
+
isOpen: {
|
10
|
+
control: 'boolean',
|
11
|
+
description: 'Whether the banner is visible',
|
12
|
+
},
|
13
|
+
isLoading: {
|
14
|
+
control: 'boolean',
|
15
|
+
description: 'Whether to show a loading spinner',
|
16
|
+
},
|
17
|
+
hideClose: {
|
18
|
+
control: 'boolean',
|
19
|
+
description: 'Whether to hide the close button',
|
20
|
+
},
|
21
|
+
backdrop: {
|
22
|
+
control: 'select',
|
23
|
+
options: ['white', 'dark'],
|
24
|
+
description: 'Type of backdrop overlay',
|
25
|
+
},
|
26
|
+
position: {
|
27
|
+
control: 'select',
|
28
|
+
options: ['fixed', 'absolute', 'relative'],
|
29
|
+
description: 'Position of the banner',
|
30
|
+
},
|
31
|
+
stopPropagation: {
|
32
|
+
control: 'boolean',
|
33
|
+
description:
|
34
|
+
'Whether to stop event propagation when clicking the modal container',
|
35
|
+
},
|
36
|
+
},
|
8
37
|
}
|
9
38
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
position: 'fixed',
|
28
|
-
stopPropagation: true,
|
39
|
+
const Template = (args) => ({
|
40
|
+
components: { Banner },
|
41
|
+
setup() {
|
42
|
+
return { args }
|
43
|
+
},
|
44
|
+
template: `
|
45
|
+
<Banner v-bind="args" @on-close="onClose">
|
46
|
+
<div style="padding: 20px;">
|
47
|
+
<h2>Banner Content</h2>
|
48
|
+
<p>This is some example content inside the banner.</p>
|
49
|
+
</div>
|
50
|
+
</Banner>
|
51
|
+
`,
|
52
|
+
methods: {
|
53
|
+
onClose() {
|
54
|
+
console.log('Banner closed')
|
55
|
+
},
|
29
56
|
},
|
57
|
+
provide: {
|
58
|
+
theme,
|
59
|
+
},
|
60
|
+
})
|
61
|
+
|
62
|
+
export const Default = Template.bind({})
|
63
|
+
Default.args = {
|
64
|
+
isOpen: false,
|
65
|
+
isLoading: false,
|
66
|
+
hideClose: false,
|
67
|
+
backdrop: 'white',
|
68
|
+
position: 'fixed',
|
69
|
+
stopPropagation: true,
|
30
70
|
}
|
31
71
|
|
32
|
-
export const OpenedBanner = {
|
33
|
-
|
34
|
-
|
35
|
-
|
72
|
+
export const OpenedBanner = Template.bind({})
|
73
|
+
OpenedBanner.args = {
|
74
|
+
isOpen: true,
|
75
|
+
isLoading: false,
|
76
|
+
hideClose: false,
|
77
|
+
backdrop: 'white',
|
78
|
+
position: 'fixed',
|
79
|
+
stopPropagation: true,
|
36
80
|
}
|
37
81
|
|
38
|
-
export const LoadingBanner = {
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
82
|
+
export const LoadingBanner = Template.bind({})
|
83
|
+
LoadingBanner.args = {
|
84
|
+
isOpen: true,
|
85
|
+
isLoading: true,
|
86
|
+
hideClose: false,
|
87
|
+
backdrop: 'white',
|
88
|
+
position: 'fixed',
|
89
|
+
stopPropagation: true,
|
43
90
|
}
|
44
91
|
|
45
|
-
export const HiddenCloseButton = {
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
92
|
+
export const HiddenCloseButton = Template.bind({})
|
93
|
+
HiddenCloseButton.args = {
|
94
|
+
isOpen: true,
|
95
|
+
isLoading: false,
|
96
|
+
hideClose: true,
|
97
|
+
backdrop: 'white',
|
98
|
+
position: 'fixed',
|
99
|
+
stopPropagation: true,
|
50
100
|
}
|
51
101
|
|
52
|
-
export const DarkBackdrop = {
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
102
|
+
export const DarkBackdrop = Template.bind({})
|
103
|
+
DarkBackdrop.args = {
|
104
|
+
isOpen: true,
|
105
|
+
isLoading: false,
|
106
|
+
hideClose: false,
|
107
|
+
backdrop: 'dark',
|
108
|
+
position: 'fixed',
|
109
|
+
stopPropagation: true,
|
57
110
|
}
|
58
111
|
|
59
|
-
export const AbsolutePositionBanner = {
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
112
|
+
export const AbsolutePositionBanner = Template.bind({})
|
113
|
+
AbsolutePositionBanner.args = {
|
114
|
+
isOpen: true,
|
115
|
+
isLoading: false,
|
116
|
+
hideClose: false,
|
117
|
+
backdrop: 'white',
|
118
|
+
position: 'absolute',
|
119
|
+
stopPropagation: true,
|
64
120
|
}
|
@@ -1,42 +1,84 @@
|
|
1
1
|
import InfoBanner from './index.vue'
|
2
2
|
import theme from '@/assets/theme'
|
3
|
+
|
3
4
|
export default {
|
4
5
|
title: 'InfoBanner',
|
5
6
|
component: InfoBanner,
|
6
7
|
tags: ['autodocs'],
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
// </RCInfoBanner>
|
17
|
-
|
18
|
-
export const Default = {
|
19
|
-
args: {
|
20
|
-
isOpen: false,
|
21
|
-
buttonLabel: 'Got it',
|
8
|
+
argTypes: {
|
9
|
+
isOpen: {
|
10
|
+
control: 'boolean',
|
11
|
+
description: 'Whether the banner is visible',
|
12
|
+
},
|
13
|
+
buttonLabel: {
|
14
|
+
control: 'text',
|
15
|
+
description: 'Custom label for the confirmation button',
|
16
|
+
},
|
22
17
|
},
|
23
18
|
}
|
24
19
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
20
|
+
const Template = (args) => ({
|
21
|
+
components: { InfoBanner },
|
22
|
+
setup() {
|
23
|
+
return { args }
|
29
24
|
},
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
25
|
+
template: `
|
26
|
+
<InfoBanner v-bind="args" @on-close="onClose">
|
27
|
+
<template #title>
|
28
|
+
<h2>Information Title</h2>
|
29
|
+
</template>
|
30
|
+
<template #body>
|
31
|
+
<p>This is some important information that needs to be displayed to the user. It can contain multiple paragraphs and will be properly formatted.</p>
|
32
|
+
</template>
|
33
|
+
</InfoBanner>
|
34
|
+
`,
|
35
|
+
methods: {
|
36
|
+
onClose() {
|
37
|
+
console.log('InfoBanner closed')
|
34
38
|
},
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
},
|
40
|
+
provide: {
|
41
|
+
theme,
|
42
|
+
},
|
43
|
+
})
|
44
|
+
|
45
|
+
export const Default = Template.bind({})
|
46
|
+
Default.args = {
|
47
|
+
isOpen: false,
|
48
|
+
buttonLabel: 'Got it',
|
49
|
+
}
|
50
|
+
|
51
|
+
export const OpenedInfoBanner = Template.bind({})
|
52
|
+
OpenedInfoBanner.args = {
|
53
|
+
isOpen: true,
|
54
|
+
buttonLabel: 'Got it',
|
55
|
+
}
|
56
|
+
|
57
|
+
export const CustomButtonLabel = Template.bind({})
|
58
|
+
CustomButtonLabel.args = {
|
59
|
+
isOpen: true,
|
60
|
+
buttonLabel: 'I understand',
|
61
|
+
}
|
62
|
+
|
63
|
+
export const LongContent = Template.bind({})
|
64
|
+
LongContent.args = {
|
65
|
+
isOpen: true,
|
66
|
+
buttonLabel: 'Got it',
|
42
67
|
}
|
68
|
+
LongContent.template = `
|
69
|
+
<InfoBanner v-bind="args" @on-close="onClose">
|
70
|
+
<template #title>
|
71
|
+
<h2>Detailed Information</h2>
|
72
|
+
</template>
|
73
|
+
<template #body>
|
74
|
+
<p>This is a longer piece of content that demonstrates how the InfoBanner handles multiple paragraphs and longer text.</p>
|
75
|
+
<p>It includes:</p>
|
76
|
+
<ul>
|
77
|
+
<li>Multiple paragraphs</li>
|
78
|
+
<li>Bullet points</li>
|
79
|
+
<li>Different types of content</li>
|
80
|
+
</ul>
|
81
|
+
<p>All of this content should be properly formatted and scrollable if needed.</p>
|
82
|
+
</template>
|
83
|
+
</InfoBanner>
|
84
|
+
`
|
@@ -0,0 +1,167 @@
|
|
1
|
+
import ButtonIcon from './index.vue'
|
2
|
+
import theme from '@/assets/theme'
|
3
|
+
|
4
|
+
export default {
|
5
|
+
title: 'Components/Buttons/ButtonIcon',
|
6
|
+
component: ButtonIcon,
|
7
|
+
tags: ['autodocs'],
|
8
|
+
argTypes: {
|
9
|
+
type: {
|
10
|
+
control: 'select',
|
11
|
+
options: ['primary', 'secondary', 'tertiary'],
|
12
|
+
description: 'Button type',
|
13
|
+
},
|
14
|
+
variant: {
|
15
|
+
control: 'select',
|
16
|
+
options: ['main', 'cancel', 'danger'],
|
17
|
+
description: 'Button variant',
|
18
|
+
},
|
19
|
+
appTheme: {
|
20
|
+
control: 'select',
|
21
|
+
options: ['light', 'dark'],
|
22
|
+
description: 'Application theme',
|
23
|
+
},
|
24
|
+
buttonSize: {
|
25
|
+
control: 'select',
|
26
|
+
options: ['small', 'medium', 'large'],
|
27
|
+
description: 'Button size',
|
28
|
+
},
|
29
|
+
isDisabled: {
|
30
|
+
control: 'boolean',
|
31
|
+
description: 'Whether the button is disabled',
|
32
|
+
},
|
33
|
+
text: {
|
34
|
+
control: 'text',
|
35
|
+
description: 'Button text',
|
36
|
+
},
|
37
|
+
minWidth: {
|
38
|
+
control: 'text',
|
39
|
+
description: 'Minimum width of the button',
|
40
|
+
},
|
41
|
+
customColor: {
|
42
|
+
control: 'color',
|
43
|
+
description: 'Custom background color',
|
44
|
+
},
|
45
|
+
iconName: {
|
46
|
+
control: 'text',
|
47
|
+
description: 'Name of the icon to display',
|
48
|
+
},
|
49
|
+
iconColor: {
|
50
|
+
control: 'color',
|
51
|
+
description: 'Custom color for the icon',
|
52
|
+
},
|
53
|
+
fontSize: {
|
54
|
+
control: 'text',
|
55
|
+
description: 'Font size of the button text',
|
56
|
+
},
|
57
|
+
isActive: {
|
58
|
+
control: 'boolean',
|
59
|
+
description: 'Whether the button is in active state',
|
60
|
+
},
|
61
|
+
fillType: {
|
62
|
+
control: 'select',
|
63
|
+
options: ['fill', 'stroke'],
|
64
|
+
description: 'How to fill the icon',
|
65
|
+
},
|
66
|
+
},
|
67
|
+
}
|
68
|
+
|
69
|
+
const Template = (args) => ({
|
70
|
+
components: { ButtonIcon },
|
71
|
+
setup() {
|
72
|
+
return { args }
|
73
|
+
},
|
74
|
+
template: '<ButtonIcon v-bind="args" />',
|
75
|
+
provide: {
|
76
|
+
theme,
|
77
|
+
},
|
78
|
+
})
|
79
|
+
|
80
|
+
export const Default = Template.bind({})
|
81
|
+
Default.args = {
|
82
|
+
type: 'primary',
|
83
|
+
variant: 'main',
|
84
|
+
appTheme: 'light',
|
85
|
+
buttonSize: 'medium',
|
86
|
+
isDisabled: false,
|
87
|
+
text: 'Click Me',
|
88
|
+
minWidth: '200px',
|
89
|
+
customColor: null,
|
90
|
+
iconName: 'settings',
|
91
|
+
iconColor: null,
|
92
|
+
fontSize: '14px',
|
93
|
+
isActive: false,
|
94
|
+
fillType: 'fill',
|
95
|
+
}
|
96
|
+
|
97
|
+
export const Secondary = Template.bind({})
|
98
|
+
Secondary.args = {
|
99
|
+
...Default.args,
|
100
|
+
type: 'secondary',
|
101
|
+
}
|
102
|
+
|
103
|
+
export const Tertiary = Template.bind({})
|
104
|
+
Tertiary.args = {
|
105
|
+
...Default.args,
|
106
|
+
type: 'tertiary',
|
107
|
+
}
|
108
|
+
|
109
|
+
export const Cancel = Template.bind({})
|
110
|
+
Cancel.args = {
|
111
|
+
...Default.args,
|
112
|
+
variant: 'cancel',
|
113
|
+
}
|
114
|
+
|
115
|
+
export const Danger = Template.bind({})
|
116
|
+
Danger.args = {
|
117
|
+
...Default.args,
|
118
|
+
variant: 'danger',
|
119
|
+
}
|
120
|
+
|
121
|
+
export const Disabled = Template.bind({})
|
122
|
+
Disabled.args = {
|
123
|
+
...Default.args,
|
124
|
+
isDisabled: true,
|
125
|
+
}
|
126
|
+
|
127
|
+
export const Active = Template.bind({})
|
128
|
+
Active.args = {
|
129
|
+
...Default.args,
|
130
|
+
isActive: true,
|
131
|
+
}
|
132
|
+
|
133
|
+
export const Small = Template.bind({})
|
134
|
+
Small.args = {
|
135
|
+
...Default.args,
|
136
|
+
buttonSize: 'small',
|
137
|
+
}
|
138
|
+
|
139
|
+
export const Large = Template.bind({})
|
140
|
+
Large.args = {
|
141
|
+
...Default.args,
|
142
|
+
buttonSize: 'large',
|
143
|
+
}
|
144
|
+
|
145
|
+
export const CustomColor = Template.bind({})
|
146
|
+
CustomColor.args = {
|
147
|
+
...Default.args,
|
148
|
+
customColor: '#FF5733',
|
149
|
+
}
|
150
|
+
|
151
|
+
export const CustomIconColor = Template.bind({})
|
152
|
+
CustomIconColor.args = {
|
153
|
+
...Default.args,
|
154
|
+
iconColor: '#FFFFFF',
|
155
|
+
}
|
156
|
+
|
157
|
+
export const DarkTheme = Template.bind({})
|
158
|
+
DarkTheme.args = {
|
159
|
+
...Default.args,
|
160
|
+
appTheme: 'dark',
|
161
|
+
}
|
162
|
+
|
163
|
+
export const StrokeIcon = Template.bind({})
|
164
|
+
StrokeIcon.args = {
|
165
|
+
...Default.args,
|
166
|
+
fillType: 'stroke',
|
167
|
+
}
|
@@ -70,14 +70,13 @@
|
|
70
70
|
grid-template-columns: auto 1fr;
|
71
71
|
font-size: ${(props) =>
|
72
72
|
props.theme?.mainButton?.size?.[props.buttonSize]?.fontSize};
|
73
|
-
color: ${(props) =>
|
74
|
-
props.isDisabled
|
73
|
+
color: ${(props) => {
|
74
|
+
return props.isDisabled
|
75
75
|
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
76
76
|
.disabled.textColor
|
77
|
-
: props.customColor
|
78
|
-
? props.theme.colors.white
|
79
77
|
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
80
|
-
.default.textColor
|
78
|
+
.default.textColor
|
79
|
+
}};
|
81
80
|
background-color: ${(props) =>
|
82
81
|
props.isDisabled
|
83
82
|
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|