@eturnity/eturnity_reusable_components 8.7.5-EPDM-12618.3 → 8.7.5-EPIC-8593.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/package.json +3 -2
- package/src/App.vue +6 -6
- package/src/Test.vue +12 -76
- package/src/assets/svgIcons/add_icon-1.svg +2 -2
- package/src/assets/svgIcons/add_plus.svg +4 -0
- package/src/assets/svgIcons/arrow_down_unfilled.svg +4 -0
- package/src/assets/svgIcons/arrow_up_unfilled.svg +4 -0
- package/src/assets/svgIcons/battery.svg +2 -2
- package/src/assets/svgIcons/bell_alt.svg +1 -3
- package/src/assets/svgIcons/bexio.svg +3 -3
- package/src/assets/svgIcons/bom.svg +2 -2
- package/src/assets/svgIcons/checkmark_white.svg +4 -0
- package/src/assets/svgIcons/clenergy.svg +4 -0
- package/src/assets/svgIcons/clickable_info.svg +2 -2
- package/src/assets/svgIcons/clickable_info_white.svg +5 -0
- package/src/assets/svgIcons/collections.svg +1 -1
- package/src/assets/svgIcons/customer.svg +3 -0
- package/src/assets/svgIcons/dashboard.svg +1 -1
- package/src/assets/svgIcons/deal_flow.svg +2 -4
- package/src/assets/svgIcons/documents.svg +2 -3
- package/src/assets/svgIcons/efs.svg +5 -0
- package/src/assets/svgIcons/ems-1.svg +2 -2
- package/src/assets/svgIcons/ems.svg +2 -2
- package/src/assets/svgIcons/energy_meter.svg +3 -12
- package/src/assets/svgIcons/erase_white.svg +4 -0
- package/src/assets/svgIcons/financing_for_pv.svg +2 -5
- package/src/assets/svgIcons/free_technology.svg +2 -4
- package/src/assets/svgIcons/heat_pump.svg +5 -0
- package/src/assets/svgIcons/heating_system.svg +3 -0
- package/src/assets/svgIcons/initial_situation.svg +2 -2
- package/src/assets/svgIcons/integrations.svg +2 -2
- package/src/assets/svgIcons/inverter.svg +2 -2
- package/src/assets/svgIcons/k2.svg +4 -0
- package/src/assets/svgIcons/module.svg +2 -2
- package/src/assets/svgIcons/optimizer.svg +2 -5
- package/src/assets/svgIcons/order.svg +3 -0
- package/src/assets/svgIcons/profile.svg +2 -3
- package/src/assets/svgIcons/profitability.svg +2 -2
- package/src/assets/svgIcons/project_analysis.svg +2 -3
- package/src/assets/svgIcons/project_settings.svg +2 -3
- package/src/assets/svgIcons/pv.svg +2 -2
- package/src/assets/svgIcons/question_mark.svg +3 -0
- package/src/assets/svgIcons/question_mark_white.svg +4 -0
- package/src/assets/svgIcons/reorder_string.svg +3 -0
- package/src/assets/svgIcons/run_simulation.svg +2 -2
- package/src/assets/svgIcons/settings.svg +2 -2
- package/src/assets/svgIcons/subscriptions.svg +2 -2
- package/src/assets/svgIcons/subsidies.svg +2 -2
- package/src/assets/svgIcons/switch_polarity.svg +5 -0
- package/src/assets/svgIcons/transparent_warning.svg +4 -0
- package/src/assets/svgIcons/variants.svg +2 -5
- package/src/assets/svgIcons/vdv.svg +5 -0
- package/src/assets/svgIcons/virtual_storage.svg +2 -3
- package/src/assets/svgIcons/warning_triangle.svg +3 -0
- package/src/assets/svgIcons/warning_triangle_white.svg +5 -0
- package/src/assets/theme.js +602 -25
- package/src/components/buttons/buttonIcon/index.vue +131 -28
- package/src/components/buttons/mainButton/MainButton.stories.js +13 -0
- package/src/components/buttons/mainButton/index.vue +105 -31
- package/src/components/filter/filterSettings.vue +4 -3
- package/src/components/icon/index.vue +26 -6
- package/src/components/infoCard/index.vue +12 -8
- package/src/components/infoLabel/index.vue +63 -0
- package/src/components/infoText/index.vue +176 -42
- package/src/components/infoText/infoText.spec.js +1 -1
- package/src/components/inputs/checkbox/index.vue +11 -2
- package/src/components/inputs/inputNumber/index.vue +5 -0
- package/src/components/inputs/inputText/index.vue +9 -1
- package/src/components/modals/modal/index.vue +21 -6
- package/src/components/panelRangeInfo/index.vue +196 -0
- package/src/components/projectMarker/index.vue +2 -1
- package/src/components/selectedOptions/index.vue +3 -12
- package/src/components/selectedOptions/selectedOptions.spec.js +1 -1
- package/src/components/sideMenu/index.vue +92 -48
- package/src/components/spinner/index.vue +66 -33
- package/src/components/tableDropdown/index.vue +44 -39
- package/src/components/tables/mainTable/index.vue +16 -11
- package/src/components/tabsHeader/index.vue +75 -61
- package/src/assets/svgIcons/inverter-1.svg +0 -5
- package/src/assets/svgIcons/subsidies-1.svg +0 -5
- package/src/components/stringDesign/DropdownMenu/index.vue +0 -1009
- /package/src/assets/svgIcons/{close_for_modals,_tool_tips.svg → close.svg} +0 -0
@@ -1,19 +1,35 @@
|
|
1
1
|
<template>
|
2
2
|
<PageContainer>
|
3
3
|
<ButtonWrapper
|
4
|
+
:app-theme="appTheme"
|
5
|
+
:button-size="buttonSize"
|
4
6
|
:custom-color="customColor"
|
5
|
-
:
|
7
|
+
:is-active="isActive"
|
6
8
|
:is-disabled="isDisabled"
|
7
9
|
:min-width="minWidth"
|
10
|
+
:type="type"
|
11
|
+
:variant="variant"
|
8
12
|
>
|
9
|
-
<IconContainer
|
13
|
+
<IconContainer
|
14
|
+
:app-theme="appTheme"
|
15
|
+
:button-size="buttonSize"
|
16
|
+
:type="type"
|
17
|
+
:variant="variant"
|
18
|
+
>
|
10
19
|
<Icon
|
11
|
-
:color="
|
20
|
+
:color="
|
21
|
+
iconColor ||
|
22
|
+
theme.mainButton[appTheme][type][variant].default.textColor
|
23
|
+
"
|
24
|
+
:hovered-color="
|
25
|
+
iconColor ||
|
26
|
+
theme.mainButton[appTheme][type][variant].default.textColor
|
27
|
+
"
|
12
28
|
:name="iconName"
|
13
29
|
size="14px"
|
14
30
|
/>
|
15
31
|
</IconContainer>
|
16
|
-
<ButtonContainer :
|
32
|
+
<ButtonContainer :button-size="buttonSize">
|
17
33
|
{{ text }}
|
18
34
|
</ButtonContainer>
|
19
35
|
</ButtonWrapper>
|
@@ -30,7 +46,6 @@
|
|
30
46
|
// iconName="external_icon"
|
31
47
|
// fontColor="white"
|
32
48
|
// fontSize="12px"
|
33
|
-
// height="24px"
|
34
49
|
// />
|
35
50
|
|
36
51
|
import Icon from '../../icon'
|
@@ -40,61 +55,107 @@
|
|
40
55
|
const PageContainer = styled.div``
|
41
56
|
|
42
57
|
const ButtonAttrs = {
|
58
|
+
type: String,
|
43
59
|
isDisabled: Boolean,
|
44
60
|
minWidth: String,
|
45
61
|
customColor: String,
|
46
|
-
|
62
|
+
buttonSize: String,
|
63
|
+
variant: String,
|
64
|
+
appTheme: String,
|
65
|
+
isActive: Boolean,
|
47
66
|
}
|
48
67
|
const ButtonWrapper = styled('div', ButtonAttrs)`
|
49
68
|
display: grid;
|
50
69
|
grid-template-columns: auto 1fr;
|
70
|
+
font-size: ${(props) =>
|
71
|
+
props.theme?.mainButton?.size?.[props.buttonSize]?.fontSize};
|
72
|
+
color: ${(props) =>
|
73
|
+
props.isDisabled
|
74
|
+
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
75
|
+
.disabled.textColor
|
76
|
+
: props.customColor
|
77
|
+
? props.theme.colors.white
|
78
|
+
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
79
|
+
.default.textColor};
|
51
80
|
background-color: ${(props) =>
|
52
81
|
props.isDisabled
|
53
|
-
? props.theme.
|
82
|
+
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
83
|
+
.disabled.backgroundColor
|
54
84
|
: props.customColor
|
55
|
-
? props.
|
56
|
-
|
57
|
-
|
58
|
-
|
85
|
+
? props.customColor
|
86
|
+
: props.isActive
|
87
|
+
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
88
|
+
.active.backgroundColor
|
89
|
+
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
90
|
+
.default.backgroundColor};
|
91
|
+
border: ${(props) => {
|
92
|
+
const borderValue = props.isDisabled
|
93
|
+
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
94
|
+
.disabled.borderColor
|
95
|
+
: props.customColor
|
96
|
+
? props.customColor
|
97
|
+
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
98
|
+
.default.borderColor
|
99
|
+
return borderValue ? '1px solid ' + borderValue : 'none'
|
100
|
+
}};
|
59
101
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
60
102
|
user-select: none;
|
61
103
|
border-radius: 4px;
|
62
104
|
overflow: hidden;
|
63
|
-
min-width: ${(props) =>
|
64
|
-
height: ${(props) => props.height};
|
105
|
+
min-width: ${(props) => props.minWidth || 'initial'};
|
65
106
|
|
66
107
|
&:hover {
|
67
|
-
|
108
|
+
background-color: ${(props) =>
|
109
|
+
props.isDisabled
|
110
|
+
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
111
|
+
.disabled.backgroundColor
|
112
|
+
: props.customColor
|
113
|
+
? props.customColor
|
114
|
+
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
115
|
+
.hover.backgroundColor};
|
68
116
|
}
|
69
117
|
|
70
118
|
&:active {
|
71
|
-
|
119
|
+
background-color: ${(props) =>
|
120
|
+
props.isDisabled
|
121
|
+
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
122
|
+
.disabled.backgroundColor
|
123
|
+
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
124
|
+
.active.backgroundColor};
|
72
125
|
}
|
73
126
|
`
|
74
127
|
|
75
128
|
const ButtonContainerAttrs = {
|
76
|
-
|
77
|
-
fontColor: String,
|
129
|
+
buttonSize: String,
|
78
130
|
}
|
79
131
|
const ButtonContainer = styled('div', ButtonContainerAttrs)`
|
80
|
-
font-size: ${(props) => props.fontSize};
|
81
|
-
color: ${(props) =>
|
82
|
-
props.fontColor ? props.fontColor : props.theme.colors.white};
|
83
132
|
display: flex;
|
84
133
|
align-items: center;
|
85
134
|
justify-content: center;
|
86
|
-
padding:
|
135
|
+
padding: ${(props) =>
|
136
|
+
props.theme?.mainButton?.size?.[props.buttonSize]?.padding};
|
137
|
+
white-space: nowrap;
|
87
138
|
`
|
88
139
|
|
89
140
|
const IconContainerAttrs = {
|
90
|
-
|
141
|
+
buttonSize: String,
|
142
|
+
appTheme: String,
|
143
|
+
type: String,
|
144
|
+
variant: String,
|
91
145
|
}
|
92
146
|
const IconContainer = styled('div', IconContainerAttrs)`
|
93
147
|
display: grid;
|
94
148
|
align-items: center;
|
95
149
|
justify-items: center;
|
96
|
-
width: ${(props) =>
|
97
|
-
|
150
|
+
width: ${(props) =>
|
151
|
+
props.theme?.mainButton?.size?.[props.buttonSize]?.iconWidth};
|
152
|
+
background: rgba(255, 255, 255, 0.1);
|
153
|
+
border-right: ${(props) => {
|
154
|
+
const borderColor =
|
155
|
+
props.theme.mainButton[props.appTheme][props.type][props.variant]
|
156
|
+
.default.borderColor
|
157
|
+
return borderColor ? `1px solid ${borderColor}` : 'none'
|
158
|
+
}};
|
98
159
|
`
|
99
160
|
|
100
161
|
export default {
|
@@ -107,35 +168,68 @@
|
|
107
168
|
Icon,
|
108
169
|
},
|
109
170
|
props: {
|
171
|
+
type: {
|
172
|
+
required: false,
|
173
|
+
default: 'primary',
|
174
|
+
type: String,
|
175
|
+
},
|
176
|
+
variant: {
|
177
|
+
required: false,
|
178
|
+
default: 'main',
|
179
|
+
type: String,
|
180
|
+
},
|
181
|
+
themeType: {
|
182
|
+
type: String,
|
183
|
+
default: 'light',
|
184
|
+
required: false,
|
185
|
+
},
|
186
|
+
buttonSize: {
|
187
|
+
type: String,
|
188
|
+
default: 'medium',
|
189
|
+
required: false,
|
190
|
+
},
|
110
191
|
isDisabled: {
|
111
192
|
required: false,
|
112
193
|
default: false,
|
194
|
+
type: Boolean,
|
113
195
|
},
|
114
196
|
text: {
|
115
197
|
required: true,
|
198
|
+
type: String,
|
116
199
|
},
|
117
200
|
minWidth: {
|
118
201
|
required: false,
|
119
202
|
default: null,
|
203
|
+
type: String,
|
120
204
|
},
|
121
205
|
customColor: {
|
122
206
|
required: false,
|
123
207
|
default: null,
|
208
|
+
type: String,
|
124
209
|
},
|
125
210
|
iconName: {
|
126
211
|
required: true,
|
212
|
+
type: String,
|
127
213
|
},
|
128
|
-
|
214
|
+
iconColor: {
|
129
215
|
required: false,
|
130
216
|
default: null,
|
217
|
+
type: String,
|
131
218
|
},
|
132
219
|
fontSize: {
|
133
220
|
required: false,
|
134
|
-
default: '
|
221
|
+
default: '14px',
|
222
|
+
type: String,
|
223
|
+
},
|
224
|
+
appTheme: {
|
225
|
+
required: false,
|
226
|
+
default: 'light',
|
227
|
+
type: String,
|
135
228
|
},
|
136
|
-
|
229
|
+
isActive: {
|
137
230
|
required: false,
|
138
|
-
default:
|
231
|
+
default: false,
|
232
|
+
type: Boolean,
|
139
233
|
},
|
140
234
|
},
|
141
235
|
data() {
|
@@ -143,5 +237,14 @@
|
|
143
237
|
theme: Theme,
|
144
238
|
}
|
145
239
|
},
|
240
|
+
// computed: {
|
241
|
+
// getIconColor() {
|
242
|
+
// console.log(this.theme[this.themeType][this.type][this.variant])
|
243
|
+
// return (
|
244
|
+
// this.iconColor ||
|
245
|
+
// this.theme[this.themeType][this.type][this.variant].textColor
|
246
|
+
// )
|
247
|
+
// },
|
248
|
+
// },
|
146
249
|
}
|
147
250
|
</script>
|
@@ -4,6 +4,9 @@ export default {
|
|
4
4
|
title: 'MainButton',
|
5
5
|
component: MainButton,
|
6
6
|
tags: ['autodocs'],
|
7
|
+
parameters: {
|
8
|
+
layout: 'centered',
|
9
|
+
},
|
7
10
|
}
|
8
11
|
|
9
12
|
export const DefaultButton = {
|
@@ -49,3 +52,13 @@ export const IconButton = {
|
|
49
52
|
customColor: '#fdb813',
|
50
53
|
},
|
51
54
|
}
|
55
|
+
|
56
|
+
export const IconAltDesignButton = {
|
57
|
+
args: {
|
58
|
+
text: 'Click me',
|
59
|
+
icon: 'bell',
|
60
|
+
type: 'primary',
|
61
|
+
iconAltStyle: true,
|
62
|
+
iconAltStyleColor: '#f2f2f2',
|
63
|
+
},
|
64
|
+
}
|
@@ -2,18 +2,25 @@
|
|
2
2
|
<PageContainer>
|
3
3
|
<ButtonContainer
|
4
4
|
:id="id"
|
5
|
-
:
|
5
|
+
:app-theme="appTheme"
|
6
|
+
:button-size="buttonSize"
|
6
7
|
:data-id="dataId"
|
7
8
|
:data-qa-id="dataQaId"
|
8
|
-
:font-color="fontColor"
|
9
9
|
:height="height"
|
10
10
|
:is-disabled="isDisabled"
|
11
11
|
:min-width="minWidth"
|
12
12
|
:no-wrap="noWrap"
|
13
13
|
:type="type"
|
14
|
+
:variant="variant"
|
14
15
|
>
|
15
16
|
<LabelComponent :has-icon="Boolean(icon)">
|
16
|
-
<Icon
|
17
|
+
<Icon
|
18
|
+
v-if="icon"
|
19
|
+
:color="getIconColor"
|
20
|
+
:hovered-color="getIconColor"
|
21
|
+
:name="icon"
|
22
|
+
size="14px"
|
23
|
+
/>
|
17
24
|
{{ text }}
|
18
25
|
</LabelComponent>
|
19
26
|
</ButtonContainer>
|
@@ -35,6 +42,7 @@
|
|
35
42
|
|
36
43
|
import styled from 'vue3-styled-components'
|
37
44
|
import Icon from '../../icon'
|
45
|
+
import theme from '../../../assets/theme'
|
38
46
|
|
39
47
|
const PageContainer = styled.div``
|
40
48
|
|
@@ -42,34 +50,39 @@
|
|
42
50
|
type: String,
|
43
51
|
isDisabled: Boolean,
|
44
52
|
minWidth: String,
|
45
|
-
customColor: String,
|
46
|
-
fontColor: String,
|
47
53
|
noWrap: Boolean,
|
48
54
|
height: String,
|
55
|
+
variant: String,
|
56
|
+
buttonSize: String,
|
57
|
+
appTheme: String,
|
49
58
|
}
|
50
59
|
const ButtonContainer = styled('div', ButtonAttrs)`
|
51
60
|
display: flex;
|
52
61
|
justify-content: center;
|
53
|
-
padding:
|
54
|
-
|
62
|
+
padding: ${(props) =>
|
63
|
+
props.theme?.mainButton?.size?.[props.buttonSize]?.padding};
|
64
|
+
font-size: ${(props) =>
|
65
|
+
props.theme?.mainButton?.size?.[props.buttonSize]?.fontSize};
|
55
66
|
color: ${(props) =>
|
56
67
|
props.isDisabled
|
57
|
-
? props.theme.
|
58
|
-
|
59
|
-
|
60
|
-
|
68
|
+
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
69
|
+
.disabled.textColor
|
70
|
+
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
71
|
+
.default.textColor};
|
61
72
|
background-color: ${(props) =>
|
62
73
|
props.isDisabled
|
63
|
-
? props.theme.
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
? props.theme.
|
70
|
-
|
71
|
-
|
72
|
-
|
74
|
+
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
75
|
+
.disabled.backgroundColor
|
76
|
+
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
77
|
+
.default.backgroundColor};
|
78
|
+
border: ${(props) => {
|
79
|
+
const borderValue = props.isDisabled
|
80
|
+
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
81
|
+
.disabled.borderColor
|
82
|
+
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
83
|
+
.default.borderColor
|
84
|
+
return borderValue ? '1px solid ' + borderValue : 'none'
|
85
|
+
}};
|
73
86
|
border-radius: 4px;
|
74
87
|
text-align: center;
|
75
88
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
@@ -77,16 +90,51 @@
|
|
77
90
|
${(props) => (props.minWidth ? `min-width: ${props.minWidth};` : '')};
|
78
91
|
${(props) => (props.noWrap ? `white-space: nowrap;` : '')};
|
79
92
|
height: ${(props) => props.height};
|
93
|
+
line-height: 1;
|
80
94
|
|
81
95
|
&:hover {
|
82
|
-
|
96
|
+
background-color: ${(props) =>
|
97
|
+
props.isDisabled
|
98
|
+
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
99
|
+
.disabled.backgroundColor
|
100
|
+
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
101
|
+
.hover.backgroundColor};
|
83
102
|
}
|
84
103
|
|
85
104
|
&:active {
|
86
|
-
|
105
|
+
background-color: ${(props) =>
|
106
|
+
props.isDisabled
|
107
|
+
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
108
|
+
.disabled.backgroundColor
|
109
|
+
: props.theme.mainButton[props.appTheme][props.type][props.variant]
|
110
|
+
.active.backgroundColor};
|
87
111
|
}
|
88
112
|
`
|
89
113
|
|
114
|
+
const AltAttrs = {
|
115
|
+
altStyle: Boolean,
|
116
|
+
color: String,
|
117
|
+
}
|
118
|
+
|
119
|
+
const IconContainer = styled('div', AltAttrs)`
|
120
|
+
background-color: ${(props) =>
|
121
|
+
props.color ? props.color : props.theme.colors.transparentWhite1};
|
122
|
+
padding: 7px;
|
123
|
+
height: 100%;
|
124
|
+
width: 30%;
|
125
|
+
justify-content: center;
|
126
|
+
display: flex;
|
127
|
+
align-items: center;
|
128
|
+
border-radius: 4px 0 0 4px;
|
129
|
+
color: ${(props) => props.theme.colors.white};
|
130
|
+
all: ${(props) => (props.altStyle ? '' : 'unset')};
|
131
|
+
`
|
132
|
+
|
133
|
+
const TextContainer = styled('span', AltAttrs)`
|
134
|
+
padding: ${(props) => (props.altStyle ? '7px' : '0')};
|
135
|
+
all: ${(props) => (props.altStyle ? '' : 'unset')};
|
136
|
+
`
|
137
|
+
|
90
138
|
const LabelAttrs = {
|
91
139
|
hasIcon: Boolean,
|
92
140
|
}
|
@@ -109,7 +157,12 @@
|
|
109
157
|
props: {
|
110
158
|
type: {
|
111
159
|
required: false,
|
112
|
-
default: 'primary',
|
160
|
+
default: 'primary', // primary, secondary, tertiary, ghost
|
161
|
+
type: String,
|
162
|
+
},
|
163
|
+
variant: {
|
164
|
+
required: false,
|
165
|
+
default: 'main', // main, cancel
|
113
166
|
type: String,
|
114
167
|
},
|
115
168
|
isDisabled: {
|
@@ -127,18 +180,18 @@
|
|
127
180
|
default: '',
|
128
181
|
type: String,
|
129
182
|
},
|
130
|
-
|
131
|
-
required:
|
132
|
-
|
183
|
+
iconAltStyle: {
|
184
|
+
required: false,
|
185
|
+
default: false,
|
186
|
+
type: Boolean,
|
133
187
|
},
|
134
|
-
|
188
|
+
iconAltStyleColor: {
|
135
189
|
required: false,
|
136
190
|
default: null,
|
137
191
|
type: String,
|
138
192
|
},
|
139
|
-
|
140
|
-
required:
|
141
|
-
default: '',
|
193
|
+
text: {
|
194
|
+
required: true,
|
142
195
|
type: String,
|
143
196
|
},
|
144
197
|
noWrap: {
|
@@ -169,6 +222,27 @@
|
|
169
222
|
type: String,
|
170
223
|
default: '',
|
171
224
|
},
|
225
|
+
appTheme: {
|
226
|
+
type: String,
|
227
|
+
default: 'light',
|
228
|
+
},
|
229
|
+
buttonSize: {
|
230
|
+
type: String,
|
231
|
+
default: 'medium',
|
232
|
+
required: false,
|
233
|
+
},
|
234
|
+
},
|
235
|
+
computed: {
|
236
|
+
theme() {
|
237
|
+
return theme
|
238
|
+
},
|
239
|
+
getIconColor() {
|
240
|
+
return this.isDisabled
|
241
|
+
? this.theme.mainButton[this.appTheme][this.type][this.variant]
|
242
|
+
.disabled.textColor
|
243
|
+
: this.theme.mainButton[this.appTheme][this.type][this.variant]
|
244
|
+
.default.textColor
|
245
|
+
},
|
172
246
|
},
|
173
247
|
}
|
174
248
|
</script>
|
@@ -297,12 +297,13 @@
|
|
297
297
|
<MainButton
|
298
298
|
v-if="buttonText.cancel"
|
299
299
|
:text="buttonText.cancel"
|
300
|
-
type="
|
300
|
+
type="primary"
|
301
|
+
variant="cancel"
|
301
302
|
@click="$emit('on-cancel-view')"
|
302
303
|
/>
|
303
304
|
<ResetContainer v-if="!filterViews || !filterViews.length">
|
304
305
|
<ResetButton @click="$emit('on-reset-filters')">
|
305
|
-
<Icon :color="theme.colors.
|
306
|
+
<Icon :color="theme.colors.primary" :name="'update'" size="14px" />
|
306
307
|
<div>{{ $gettext('reset_filters') }}</div>
|
307
308
|
</ResetButton>
|
308
309
|
</ResetContainer>
|
@@ -475,7 +476,7 @@
|
|
475
476
|
margin-top: 20px;
|
476
477
|
align-self: center;
|
477
478
|
font-size: 13px;
|
478
|
-
color: ${(props) => props.theme.colors.
|
479
|
+
color: ${(props) => props.theme.colors.primary};
|
479
480
|
cursor: pointer;
|
480
481
|
`
|
481
482
|
|
@@ -10,6 +10,7 @@
|
|
10
10
|
:background-color="backgroundColor"
|
11
11
|
:color="color"
|
12
12
|
data-test-id="icon_image"
|
13
|
+
:fill-type="fillType"
|
13
14
|
:hovered-color="hoveredColor"
|
14
15
|
>
|
15
16
|
<i data-test-id="icon_svg" v-html="icon.html"></i>
|
@@ -45,6 +46,7 @@
|
|
45
46
|
disabled: {
|
46
47
|
required: false,
|
47
48
|
default: false,
|
49
|
+
type: Boolean,
|
48
50
|
},
|
49
51
|
name: {
|
50
52
|
required: true,
|
@@ -52,33 +54,48 @@
|
|
52
54
|
},
|
53
55
|
color: {
|
54
56
|
required: false,
|
57
|
+
default: null,
|
58
|
+
type: String,
|
55
59
|
},
|
56
60
|
hoveredColor: {
|
57
61
|
required: false,
|
62
|
+
default: null,
|
63
|
+
type: String,
|
58
64
|
},
|
59
65
|
size: {
|
60
66
|
required: false,
|
61
67
|
default: '30px',
|
68
|
+
type: String,
|
62
69
|
},
|
63
70
|
cursor: {
|
64
71
|
required: false,
|
65
72
|
default: null,
|
73
|
+
type: String,
|
66
74
|
},
|
67
75
|
isStriked: {
|
68
76
|
required: false,
|
69
77
|
default: false,
|
78
|
+
type: Boolean,
|
70
79
|
},
|
71
80
|
backgroundColor: {
|
72
81
|
required: false,
|
73
82
|
default: null,
|
83
|
+
type: String,
|
74
84
|
},
|
75
85
|
count: {
|
76
86
|
required: false,
|
77
87
|
default: 0,
|
88
|
+
type: Number,
|
78
89
|
},
|
79
90
|
animation: {
|
80
91
|
required: false,
|
81
92
|
default: 'none',
|
93
|
+
type: String,
|
94
|
+
},
|
95
|
+
fillType: {
|
96
|
+
required: false,
|
97
|
+
default: 'fill',
|
98
|
+
type: String,
|
82
99
|
},
|
83
100
|
})
|
84
101
|
|
@@ -105,7 +122,7 @@
|
|
105
122
|
right: -7px;
|
106
123
|
background-color: ${({ theme }) => theme.colors.red};
|
107
124
|
color: ${({ theme }) => theme.colors.white};
|
108
|
-
border-radius:
|
125
|
+
border-radius: 100%;
|
109
126
|
width: 15px;
|
110
127
|
height: 15px;
|
111
128
|
display: flex;
|
@@ -129,12 +146,14 @@
|
|
129
146
|
transform-origin: 0% 100%;
|
130
147
|
transform: rotate(-45deg);
|
131
148
|
`
|
132
|
-
const
|
149
|
+
const IconImageAttrs = {
|
133
150
|
color: String,
|
134
151
|
backgroundColor: String,
|
135
152
|
hoveredColor: String,
|
136
153
|
animation: String,
|
137
|
-
|
154
|
+
fillType: String,
|
155
|
+
}
|
156
|
+
const IconImage = styled('div', IconImageAttrs)`
|
138
157
|
animation: ${(props) => props.animation};
|
139
158
|
width: 100%;
|
140
159
|
svg {
|
@@ -143,13 +162,14 @@
|
|
143
162
|
background-color: ${(props) =>
|
144
163
|
props.backgroundColor ? props.backgroundColor : 'transparent'};
|
145
164
|
padding: ${(props) => (props.backgroundColor ? '3px' : '0')};
|
165
|
+
border-radius: ${(props) => (props.backgroundColor ? '8px' : '0')};
|
146
166
|
}
|
147
167
|
svg path:not(.fix) {
|
148
|
-
${({ theme, color }) =>
|
168
|
+
${({ theme, color, fillType }) =>
|
169
|
+
color && `${fillType}: ${theme.colors[color] || color};`}
|
149
170
|
}
|
150
171
|
&:hover svg path:not(.fix) {
|
151
|
-
${({
|
152
|
-
hoveredColor && `fill: ${theme.colors[hoveredColor] || hoveredColor};`}
|
172
|
+
${(props) => `${props.fillType}: ${props.hoveredColor || props.color};`}
|
153
173
|
}
|
154
174
|
&:hover + div {
|
155
175
|
background-color: ${(props) => props.hoveredColor};
|
@@ -12,8 +12,9 @@
|
|
12
12
|
<RCIcon
|
13
13
|
:color="iconColor ? iconColor : presetStyles.iconColor"
|
14
14
|
data-test-id="info_card_icon"
|
15
|
-
|
16
|
-
|
15
|
+
:hovered-color="iconColor ? iconColor : presetStyles.iconColor"
|
16
|
+
:name="iconName"
|
17
|
+
size="18px"
|
17
18
|
/>
|
18
19
|
<TextContainer data-test-id="info_card_text_container">
|
19
20
|
<slot></slot>
|
@@ -39,7 +40,7 @@
|
|
39
40
|
display: flex;
|
40
41
|
align-items: ${(props) =>
|
41
42
|
props.alignItems ? props.alignItems : props.presetStyles.alignItems};
|
42
|
-
gap:
|
43
|
+
gap: 16px;
|
43
44
|
min-width: ${(props) => props.minWidth};
|
44
45
|
padding: ${(props) =>
|
45
46
|
props.padding ? props.padding : props.presetStyles.padding};
|
@@ -57,7 +58,7 @@
|
|
57
58
|
`
|
58
59
|
|
59
60
|
const TextContainer = styled.div`
|
60
|
-
font-size:
|
61
|
+
font-size: 14px;
|
61
62
|
width: 100%;
|
62
63
|
`
|
63
64
|
|
@@ -121,21 +122,24 @@
|
|
121
122
|
isErrorMinor() {
|
122
123
|
return this.type === 'error_minor'
|
123
124
|
},
|
125
|
+
iconName() {
|
126
|
+
return this.type === 'warning' ? 'warning_triangle' : 'info'
|
127
|
+
},
|
124
128
|
presetStyles() {
|
125
129
|
// the types that doesn't have explicit border anyway have it transparent
|
126
130
|
// to avoid flickering in case the same info card would switch the types
|
127
131
|
let stylesCollection = {
|
128
132
|
alignItems: 'flex-start',
|
129
|
-
padding: '
|
133
|
+
padding: '8px 6px 8px 16px',
|
130
134
|
borderWidth: '1px',
|
131
135
|
borderStyle: 'solid',
|
132
136
|
borderColor: 'transparent',
|
133
137
|
}
|
134
138
|
|
135
139
|
if (this.isWarning) {
|
136
|
-
stylesCollection.color = theme.
|
137
|
-
stylesCollection.backgroundColor = theme.
|
138
|
-
stylesCollection.iconColor = theme.
|
140
|
+
stylesCollection.color = theme.semanticColors.teal[800]
|
141
|
+
stylesCollection.backgroundColor = theme.semanticColors.yellow[300]
|
142
|
+
stylesCollection.iconColor = theme.semanticColors.teal[800]
|
139
143
|
} else if (this.isErrorMinor) {
|
140
144
|
stylesCollection.borderStyle = 'dashed'
|
141
145
|
stylesCollection.borderColor = theme.colors.pureRed
|