@eturnity/eturnity_reusable_components 8.7.5-EPIC-8593 → 8.7.5-EPIC-8593.1
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/App.vue +6 -6
- package/src/assets/svgIcons/add_icon-1.svg +2 -2
- 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/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/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/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/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/variants.svg +2 -5
- package/src/assets/svgIcons/vdv.svg +5 -0
- package/src/assets/svgIcons/virtual_storage.svg +2 -3
- package/src/assets/theme.js +594 -29
- package/src/components/buttons/buttonIcon/index.vue +110 -32
- package/src/components/buttons/mainButton/index.vue +74 -42
- 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/infoText/index.vue +9 -5
- package/src/components/inputs/inputNumber/index.vue +5 -0
- package/src/components/inputs/inputText/index.vue +6 -0
- package/src/components/inputs/select/index.vue +19 -1
- package/src/components/modals/modal/index.vue +10 -5
- package/src/components/paginationV2/index.vue +175 -0
- package/src/components/projectMarker/index.vue +2 -1
- package/src/components/selectedOptions/index.vue +1 -0
- package/src/components/sideMenu/index.vue +92 -48
- package/src/components/spinner/index.vue +66 -33
- package/src/components/tableDropdown/index.vue +40 -33
- package/src/components/tables/mainTable/index.vue +16 -11
- package/src/assets/svgIcons/inverter-1.svg +0 -5
- package/src/assets/svgIcons/subsidies-1.svg +0 -5
@@ -2,19 +2,34 @@
|
|
2
2
|
<PageContainer>
|
3
3
|
<ButtonWrapper
|
4
4
|
:app-theme="appTheme"
|
5
|
+
:button-size="buttonSize"
|
5
6
|
:custom-color="customColor"
|
6
7
|
:is-active="isActive"
|
7
8
|
:is-disabled="isDisabled"
|
8
9
|
:min-width="minWidth"
|
10
|
+
:type="type"
|
11
|
+
:variant="variant"
|
9
12
|
>
|
10
|
-
<IconContainer
|
13
|
+
<IconContainer
|
14
|
+
:app-theme="appTheme"
|
15
|
+
:button-size="buttonSize"
|
16
|
+
:type="type"
|
17
|
+
:variant="variant"
|
18
|
+
>
|
11
19
|
<Icon
|
12
|
-
: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
|
+
"
|
13
28
|
:name="iconName"
|
14
29
|
size="14px"
|
15
30
|
/>
|
16
31
|
</IconContainer>
|
17
|
-
<ButtonContainer :
|
32
|
+
<ButtonContainer :button-size="buttonSize">
|
18
33
|
{{ text }}
|
19
34
|
</ButtonContainer>
|
20
35
|
</ButtonWrapper>
|
@@ -31,7 +46,6 @@
|
|
31
46
|
// iconName="external_icon"
|
32
47
|
// fontColor="white"
|
33
48
|
// fontSize="12px"
|
34
|
-
// height="24px"
|
35
49
|
// />
|
36
50
|
|
37
51
|
import Icon from '../../icon'
|
@@ -41,67 +55,107 @@
|
|
41
55
|
const PageContainer = styled.div``
|
42
56
|
|
43
57
|
const ButtonAttrs = {
|
58
|
+
type: String,
|
44
59
|
isDisabled: Boolean,
|
45
60
|
minWidth: String,
|
46
61
|
customColor: String,
|
62
|
+
buttonSize: String,
|
63
|
+
variant: String,
|
47
64
|
appTheme: String,
|
48
65
|
isActive: Boolean,
|
49
66
|
}
|
50
67
|
const ButtonWrapper = styled('div', ButtonAttrs)`
|
51
68
|
display: grid;
|
52
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};
|
53
80
|
background-color: ${(props) =>
|
54
81
|
props.isDisabled
|
55
|
-
? props.theme.
|
82
|
+
? props.theme.mainButton[props.appTheme][props.type][props.variant]
|
83
|
+
.disabled.backgroundColor
|
56
84
|
: props.customColor
|
57
|
-
? props.
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
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
|
+
}};
|
65
101
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
66
102
|
user-select: none;
|
67
103
|
border-radius: 4px;
|
68
104
|
overflow: hidden;
|
69
|
-
min-width: ${(props) =>
|
105
|
+
min-width: ${(props) => props.minWidth || 'initial'};
|
70
106
|
|
71
107
|
&:hover {
|
72
|
-
|
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};
|
73
116
|
}
|
74
117
|
|
75
118
|
&:active {
|
76
|
-
|
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};
|
77
125
|
}
|
78
126
|
`
|
79
127
|
|
80
128
|
const ButtonContainerAttrs = {
|
81
|
-
|
82
|
-
fontColor: String,
|
129
|
+
buttonSize: String,
|
83
130
|
}
|
84
131
|
const ButtonContainer = styled('div', ButtonContainerAttrs)`
|
85
|
-
font-size: ${(props) => props.fontSize};
|
86
|
-
color: ${(props) =>
|
87
|
-
props.fontColor ? props.fontColor : props.theme.colors.white};
|
88
132
|
display: flex;
|
89
133
|
align-items: center;
|
90
134
|
justify-content: center;
|
91
|
-
padding:
|
135
|
+
padding: ${(props) =>
|
136
|
+
props.theme?.mainButton?.size?.[props.buttonSize]?.padding};
|
92
137
|
white-space: nowrap;
|
93
138
|
`
|
94
139
|
|
95
140
|
const IconContainerAttrs = {
|
96
|
-
|
141
|
+
buttonSize: String,
|
142
|
+
appTheme: String,
|
143
|
+
type: String,
|
144
|
+
variant: String,
|
97
145
|
}
|
98
146
|
const IconContainer = styled('div', IconContainerAttrs)`
|
99
147
|
display: grid;
|
100
148
|
align-items: center;
|
101
149
|
justify-items: center;
|
102
|
-
width: ${(props) =>
|
103
|
-
|
104
|
-
|
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
|
+
}};
|
105
159
|
`
|
106
160
|
|
107
161
|
export default {
|
@@ -114,6 +168,26 @@
|
|
114
168
|
Icon,
|
115
169
|
},
|
116
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
|
+
},
|
117
191
|
isDisabled: {
|
118
192
|
required: false,
|
119
193
|
default: false,
|
@@ -137,7 +211,7 @@
|
|
137
211
|
required: true,
|
138
212
|
type: String,
|
139
213
|
},
|
140
|
-
|
214
|
+
iconColor: {
|
141
215
|
required: false,
|
142
216
|
default: null,
|
143
217
|
type: String,
|
@@ -157,16 +231,20 @@
|
|
157
231
|
default: false,
|
158
232
|
type: Boolean,
|
159
233
|
},
|
160
|
-
height: {
|
161
|
-
required: false,
|
162
|
-
type: String,
|
163
|
-
default: '',
|
164
|
-
},
|
165
234
|
},
|
166
235
|
data() {
|
167
236
|
return {
|
168
237
|
theme: Theme,
|
169
238
|
}
|
170
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
|
+
// },
|
171
249
|
}
|
172
250
|
</script>
|
@@ -2,22 +2,26 @@
|
|
2
2
|
<PageContainer>
|
3
3
|
<ButtonContainer
|
4
4
|
:id="id"
|
5
|
-
:
|
6
|
-
:
|
5
|
+
:app-theme="appTheme"
|
6
|
+
:button-size="buttonSize"
|
7
7
|
:data-id="dataId"
|
8
8
|
:data-qa-id="dataQaId"
|
9
|
-
:font-color="fontColor"
|
10
9
|
:height="height"
|
11
10
|
:is-disabled="isDisabled"
|
12
11
|
:min-width="minWidth"
|
13
12
|
:no-wrap="noWrap"
|
14
13
|
:type="type"
|
14
|
+
:variant="variant"
|
15
15
|
>
|
16
16
|
<LabelComponent :has-icon="Boolean(icon)">
|
17
|
-
<
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
<Icon
|
18
|
+
v-if="icon"
|
19
|
+
:color="getIconColor"
|
20
|
+
:hovered-color="getIconColor"
|
21
|
+
:name="icon"
|
22
|
+
size="14px"
|
23
|
+
/>
|
24
|
+
{{ text }}
|
21
25
|
</LabelComponent>
|
22
26
|
</ButtonContainer>
|
23
27
|
</PageContainer>
|
@@ -38,6 +42,7 @@
|
|
38
42
|
|
39
43
|
import styled from 'vue3-styled-components'
|
40
44
|
import Icon from '../../icon'
|
45
|
+
import theme from '../../../assets/theme'
|
41
46
|
|
42
47
|
const PageContainer = styled.div``
|
43
48
|
|
@@ -45,36 +50,39 @@
|
|
45
50
|
type: String,
|
46
51
|
isDisabled: Boolean,
|
47
52
|
minWidth: String,
|
48
|
-
customColor: String,
|
49
|
-
fontColor: String,
|
50
53
|
noWrap: Boolean,
|
51
54
|
height: String,
|
52
|
-
|
55
|
+
variant: String,
|
56
|
+
buttonSize: String,
|
57
|
+
appTheme: String,
|
53
58
|
}
|
54
59
|
const ButtonContainer = styled('div', ButtonAttrs)`
|
55
60
|
display: flex;
|
56
61
|
justify-content: center;
|
57
|
-
padding: ${(props) =>
|
58
|
-
|
59
|
-
font-size:
|
62
|
+
padding: ${(props) =>
|
63
|
+
props.theme?.mainButton?.size?.[props.buttonSize]?.padding};
|
64
|
+
font-size: ${(props) =>
|
65
|
+
props.theme?.mainButton?.size?.[props.buttonSize]?.fontSize};
|
60
66
|
color: ${(props) =>
|
61
67
|
props.isDisabled
|
62
|
-
? props.theme.
|
63
|
-
|
64
|
-
|
65
|
-
|
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};
|
66
72
|
background-color: ${(props) =>
|
67
73
|
props.isDisabled
|
68
|
-
? props.theme.
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
? props.theme.
|
75
|
-
|
76
|
-
|
77
|
-
|
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
|
+
}};
|
78
86
|
border-radius: 4px;
|
79
87
|
text-align: center;
|
80
88
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
@@ -85,11 +93,21 @@
|
|
85
93
|
line-height: 1;
|
86
94
|
|
87
95
|
&:hover {
|
88
|
-
|
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};
|
89
102
|
}
|
90
103
|
|
91
104
|
&:active {
|
92
|
-
|
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};
|
93
111
|
}
|
94
112
|
`
|
95
113
|
|
@@ -135,13 +153,16 @@
|
|
135
153
|
LabelComponent,
|
136
154
|
PageContainer,
|
137
155
|
ButtonContainer,
|
138
|
-
IconContainer,
|
139
|
-
TextContainer,
|
140
156
|
},
|
141
157
|
props: {
|
142
158
|
type: {
|
143
159
|
required: false,
|
144
|
-
default: 'primary',
|
160
|
+
default: 'primary', // primary, secondary, tertiary, ghost
|
161
|
+
type: String,
|
162
|
+
},
|
163
|
+
variant: {
|
164
|
+
required: false,
|
165
|
+
default: 'main', // main, cancel
|
145
166
|
type: String,
|
146
167
|
},
|
147
168
|
isDisabled: {
|
@@ -173,16 +194,6 @@
|
|
173
194
|
required: true,
|
174
195
|
type: String,
|
175
196
|
},
|
176
|
-
customColor: {
|
177
|
-
required: false,
|
178
|
-
default: null,
|
179
|
-
type: String,
|
180
|
-
},
|
181
|
-
fontColor: {
|
182
|
-
required: false,
|
183
|
-
default: '',
|
184
|
-
type: String,
|
185
|
-
},
|
186
197
|
noWrap: {
|
187
198
|
required: false,
|
188
199
|
default: false,
|
@@ -211,6 +222,27 @@
|
|
211
222
|
type: String,
|
212
223
|
default: '',
|
213
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
|
+
},
|
214
246
|
},
|
215
247
|
}
|
216
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
|
@@ -32,6 +32,7 @@
|
|
32
32
|
:color="iconColor || computedIconColor"
|
33
33
|
:cursor="isDisabled ? 'not-allowed' : 'pointer'"
|
34
34
|
:disabled="isDisabled"
|
35
|
+
:hovered-color="iconColor || computedIconColor"
|
35
36
|
:name="iconName"
|
36
37
|
:size="size"
|
37
38
|
/>
|
@@ -48,6 +49,7 @@
|
|
48
49
|
<TextWrapper :style="wrapperStyle">
|
49
50
|
<TextOverlay
|
50
51
|
ref="infoBox"
|
52
|
+
:app-theme="appTheme"
|
51
53
|
:image="image"
|
52
54
|
:style="boxStyle"
|
53
55
|
:width="infoBoxWidth"
|
@@ -92,10 +94,8 @@
|
|
92
94
|
width: Number,
|
93
95
|
}
|
94
96
|
const TextOverlay = styled('div', TextOverlayAttrs)`
|
95
|
-
background-color: ${(props) =>
|
96
|
-
props.image ? props.theme.colors.white : props.theme.colors.black};
|
97
97
|
color: ${(props) =>
|
98
|
-
props.image ? props.theme.colors.grey1 : props.theme.colors.
|
98
|
+
props.image ? props.theme.colors.grey1 : props.theme.colors.black};
|
99
99
|
font-size: ${(props) => (props.image ? '12px' : '13px')};
|
100
100
|
border-radius: 4px;
|
101
101
|
padding: 10px;
|
@@ -122,7 +122,11 @@
|
|
122
122
|
// height: 0;
|
123
123
|
// border: 8px solid transparent;
|
124
124
|
// border-top-color: ${(props) =>
|
125
|
-
// props.image
|
125
|
+
// props.image
|
126
|
+
// ? props.theme.colors.white
|
127
|
+
// : props.appTheme === 'dark'
|
128
|
+
// ? props.theme.colors.grey5
|
129
|
+
// : props.theme.colors.black};
|
126
130
|
// filter: ${(props) =>
|
127
131
|
// props.image ? 'drop-shadow(0 2px 2px rgba(0, 0, 0, 0.1))' : 'none'};
|
128
132
|
// `
|
@@ -261,7 +265,7 @@
|
|
261
265
|
dotColor: {
|
262
266
|
type: String,
|
263
267
|
required: false,
|
264
|
-
default: theme.
|
268
|
+
default: theme.semanticColors.blue[400],
|
265
269
|
},
|
266
270
|
type: {
|
267
271
|
type: String,
|
@@ -25,6 +25,7 @@
|
|
25
25
|
<InfoText
|
26
26
|
v-if="labelInfoText"
|
27
27
|
:align-arrow="labelInfoAlign"
|
28
|
+
:app-theme="appTheme"
|
28
29
|
:text="labelInfoText"
|
29
30
|
/>
|
30
31
|
</LabelWrapper>
|
@@ -474,6 +475,10 @@
|
|
474
475
|
},
|
475
476
|
inheritAttrs: false,
|
476
477
|
props: {
|
478
|
+
appTheme: {
|
479
|
+
type: String,
|
480
|
+
required: false,
|
481
|
+
},
|
477
482
|
placeholder: {
|
478
483
|
type: String,
|
479
484
|
required: false,
|