@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
@@ -21,6 +21,7 @@
|
|
21
21
|
<InfoText
|
22
22
|
v-if="infoTextMessage != ''"
|
23
23
|
:align-arrow="infoTextAlign"
|
24
|
+
:app-theme="appTheme"
|
24
25
|
data-test-id="info_text_message"
|
25
26
|
:size="fontSize ? fontSize : '16px'"
|
26
27
|
:text="infoTextMessage"
|
@@ -263,6 +264,11 @@
|
|
263
264
|
default: '',
|
264
265
|
type: String,
|
265
266
|
},
|
267
|
+
appTheme: {
|
268
|
+
type: String,
|
269
|
+
required: false,
|
270
|
+
default: 'light',
|
271
|
+
},
|
266
272
|
alignItems: {
|
267
273
|
required: false,
|
268
274
|
default: 'horizontal',
|
@@ -8,7 +8,9 @@
|
|
8
8
|
<InputWrapper
|
9
9
|
:align-items="alignItems"
|
10
10
|
:has-label="!!label && label.length > 0"
|
11
|
+
:min-width="minWidth"
|
11
12
|
:no-relative="noRelative"
|
13
|
+
:text-center="textCenter"
|
12
14
|
>
|
13
15
|
<LabelWrapper
|
14
16
|
v-if="label"
|
@@ -72,6 +74,7 @@
|
|
72
74
|
:show-border="showBorder"
|
73
75
|
:show-disabled-background="showDisabledBackground"
|
74
76
|
:table-padding-left="tablePaddingLeft"
|
77
|
+
:text-center="textCenter"
|
75
78
|
@click="toggleDropdown"
|
76
79
|
@keydown="onKeyDown"
|
77
80
|
>
|
@@ -110,6 +113,7 @@
|
|
110
113
|
<slot name="selector" :selected-value="selectedValue"></slot>
|
111
114
|
</Selector>
|
112
115
|
<Caret
|
116
|
+
v-if="showCaret"
|
113
117
|
class="caret_dropdown"
|
114
118
|
:color-mode="colorMode"
|
115
119
|
@click.stop="toggleCaretDropdown"
|
@@ -274,11 +278,13 @@
|
|
274
278
|
selectWidth: String,
|
275
279
|
optionWidth: String,
|
276
280
|
noRelative: Boolean,
|
281
|
+
textCenter: Boolean,
|
277
282
|
}
|
278
283
|
const Container = styled('div', inputProps)`
|
279
284
|
width: ${(props) => props.selectWidth};
|
280
285
|
position: ${(props) => (props.noRelative ? 'static' : 'relative')};
|
281
286
|
display: inline-block;
|
287
|
+
text-align: ${(props) => (props.textCenter ? 'center' : 'left')};
|
282
288
|
`
|
283
289
|
|
284
290
|
const LabelWrapperAttrs = { infoTextMessage: Boolean }
|
@@ -315,6 +321,7 @@
|
|
315
321
|
showDisabledBackground: Boolean,
|
316
322
|
colorMode: String,
|
317
323
|
isSearchBarVisible: Boolean,
|
324
|
+
textCenter: Boolean,
|
318
325
|
}
|
319
326
|
const SelectButton = styled('div', selectButtonAttrs)`
|
320
327
|
position: ${(props) => (props.noRelative ? 'static' : 'relative')};
|
@@ -335,7 +342,7 @@
|
|
335
342
|
? props.tablePaddingLeft
|
336
343
|
: props.paddingLeft
|
337
344
|
}`};
|
338
|
-
text-align: left;
|
345
|
+
text-align: ${(props) => (props.textCenter ? 'center' : 'left')};
|
339
346
|
min-height: ${(props) =>
|
340
347
|
props.selectHeight
|
341
348
|
? props.selectHeight
|
@@ -440,6 +447,7 @@
|
|
440
447
|
const inputAttrs = {
|
441
448
|
alignItems: String,
|
442
449
|
hasLabel: Boolean,
|
450
|
+
minWidth: String,
|
443
451
|
noRelative: Boolean,
|
444
452
|
}
|
445
453
|
const InputWrapper = styled('div', inputAttrs)`
|
@@ -647,6 +655,16 @@
|
|
647
655
|
type: String,
|
648
656
|
required: false,
|
649
657
|
},
|
658
|
+
showCaret: {
|
659
|
+
type: Boolean,
|
660
|
+
required: false,
|
661
|
+
default: true,
|
662
|
+
},
|
663
|
+
textCenter: {
|
664
|
+
type: Boolean,
|
665
|
+
required: false,
|
666
|
+
default: false,
|
667
|
+
},
|
650
668
|
},
|
651
669
|
|
652
670
|
data() {
|
@@ -8,14 +8,19 @@
|
|
8
8
|
>
|
9
9
|
<ModalContainer
|
10
10
|
v-if="isOpen"
|
11
|
+
:is-loading="isLoading"
|
11
12
|
:overflow="overflowRule"
|
12
13
|
@click="onClickModalContainer"
|
13
14
|
>
|
14
15
|
<Spinner v-if="isLoading" :limited-to-modal="true" size="50px" />
|
15
|
-
<ContentContainer
|
16
|
+
<ContentContainer v-if="!isLoading">
|
16
17
|
<slot></slot>
|
17
18
|
</ContentContainer>
|
18
|
-
<CloseButton
|
19
|
+
<CloseButton
|
20
|
+
v-if="!hideClose && !isLoading"
|
21
|
+
class="close"
|
22
|
+
@click="onCloseModal()"
|
23
|
+
/>
|
19
24
|
</ModalContainer>
|
20
25
|
</PageWrapper>
|
21
26
|
</template>
|
@@ -62,7 +67,7 @@
|
|
62
67
|
}
|
63
68
|
`
|
64
69
|
|
65
|
-
const modalContainerAttrs = { overflow: String }
|
70
|
+
const modalContainerAttrs = { overflow: String, isLoading: Boolean }
|
66
71
|
const ModalContainer = styled('div', modalContainerAttrs)`
|
67
72
|
align-self: center;
|
68
73
|
justify-self: center;
|
@@ -74,8 +79,8 @@
|
|
74
79
|
overflow: ${(props) => props.overflow};
|
75
80
|
max-width: 95%;
|
76
81
|
max-height: 95%;
|
77
|
-
min-width: 100px;
|
78
|
-
min-height: 100px;
|
82
|
+
min-width: ${(props) => (props.isLoading ? '400px' : '100px')};
|
83
|
+
min-height: ${(props) => (props.isLoading ? '500px' : '100px')};
|
79
84
|
|
80
85
|
::-webkit-scrollbar {
|
81
86
|
width: 0.3em;
|
@@ -0,0 +1,175 @@
|
|
1
|
+
<template>
|
2
|
+
<!-- Check, if pages more than 1 -->
|
3
|
+
<PaginationWrapper v-if="paginationParams.pages > 1">
|
4
|
+
<PaginationLink v-if="paginationParams.previous" @click="fetchPage(1)">
|
5
|
+
<ArrowIconContainer>
|
6
|
+
<RCIcon name="start_of_the_list" size="14px" />
|
7
|
+
</ArrowIconContainer>
|
8
|
+
</PaginationLink>
|
9
|
+
|
10
|
+
<PaginationLink
|
11
|
+
v-if="paginationParams.previous"
|
12
|
+
@click="fetchPage(paginationParams.previous)"
|
13
|
+
>
|
14
|
+
<ArrowIconContainer>
|
15
|
+
<RCIcon name="arrow_left" size="14px" />
|
16
|
+
</ArrowIconContainer>
|
17
|
+
</PaginationLink>
|
18
|
+
|
19
|
+
<!-- Current block -->
|
20
|
+
<SelectWrapper>
|
21
|
+
<RCSelect
|
22
|
+
:button-font-color="getTheme.colors.gray1"
|
23
|
+
:dropdown-font-color="getTheme.colors.gray1"
|
24
|
+
font-size="14px"
|
25
|
+
:has-select-button-padding="false"
|
26
|
+
:is-auto-search="false"
|
27
|
+
:is-searchable="false"
|
28
|
+
:label-font-color="getTheme.colors.gray1"
|
29
|
+
left-padding="0px"
|
30
|
+
min-width="0px"
|
31
|
+
no-border
|
32
|
+
:no-max-width="true"
|
33
|
+
option-width="75px"
|
34
|
+
select-width="100%"
|
35
|
+
:show-border="false"
|
36
|
+
:show-caret="false"
|
37
|
+
text-center
|
38
|
+
:value="currentPage"
|
39
|
+
@input-change="fetchPage($event)"
|
40
|
+
>
|
41
|
+
<template #selector>
|
42
|
+
<SelectText>
|
43
|
+
{{ currentPage }} of {{ paginationParams.pages }}
|
44
|
+
</SelectText>
|
45
|
+
</template>
|
46
|
+
<template #dropdown>
|
47
|
+
<RCOption
|
48
|
+
v-for="number in paginationNumbers()"
|
49
|
+
:key="number"
|
50
|
+
text-center
|
51
|
+
:value="number"
|
52
|
+
>
|
53
|
+
{{ number }}
|
54
|
+
</RCOption>
|
55
|
+
</template>
|
56
|
+
</RCSelect>
|
57
|
+
</SelectWrapper>
|
58
|
+
|
59
|
+
<!-- Forward button -->
|
60
|
+
<PaginationLink
|
61
|
+
v-if="paginationParams.next"
|
62
|
+
@click="fetchPage(paginationParams.next)"
|
63
|
+
>
|
64
|
+
<ArrowIconContainer>
|
65
|
+
<RCIcon name="arrow_right" size="14px" />
|
66
|
+
</ArrowIconContainer>
|
67
|
+
</PaginationLink>
|
68
|
+
<PaginationLink
|
69
|
+
v-if="paginationParams.next"
|
70
|
+
@click="fetchPage(paginationParams.pages)"
|
71
|
+
>
|
72
|
+
<ArrowIconContainer>
|
73
|
+
<RCIcon name="end_of_the_list" size="14px" />
|
74
|
+
</ArrowIconContainer>
|
75
|
+
</PaginationLink>
|
76
|
+
</PaginationWrapper>
|
77
|
+
</template>
|
78
|
+
|
79
|
+
<script>
|
80
|
+
import styled from 'vue3-styled-components'
|
81
|
+
import RCIcon from '../icon'
|
82
|
+
import RCSelect from '../inputs/select'
|
83
|
+
import RCOption from '../inputs/select/option'
|
84
|
+
import theme from '@/assets/theme.js'
|
85
|
+
|
86
|
+
const PaginationWrapper = styled.nav`
|
87
|
+
gap: 5px;
|
88
|
+
font-size: 13px;
|
89
|
+
display: flex;
|
90
|
+
flex-wrap: wrap;
|
91
|
+
justify-content: flex-end;
|
92
|
+
align-items: center;
|
93
|
+
`
|
94
|
+
const PaginationLink = styled.div`
|
95
|
+
display: flex;
|
96
|
+
padding: 0px 5px;
|
97
|
+
margin: 0 2px;
|
98
|
+
text-align: center;
|
99
|
+
border-radius: 3px;
|
100
|
+
white-space: nowrap;
|
101
|
+
cursor: pointer;
|
102
|
+
color: ${(props) => props.theme.colors.brightBlue};
|
103
|
+
|
104
|
+
&.active {
|
105
|
+
color: ${(props) => props.theme.colors.white};
|
106
|
+
background-color: ${(props) => props.theme.colors.brightBlue};
|
107
|
+
padding: 7px 12px;
|
108
|
+
border-radius: 4px;
|
109
|
+
}
|
110
|
+
`
|
111
|
+
const ArrowIconContainer = styled.div`
|
112
|
+
display: flex;
|
113
|
+
align-items: center;
|
114
|
+
`
|
115
|
+
|
116
|
+
const SelectText = styled.div`
|
117
|
+
font-size: 14px;
|
118
|
+
color: ${(props) => props.theme.colors.grey1};
|
119
|
+
`
|
120
|
+
|
121
|
+
const SelectWrapper = styled.div`
|
122
|
+
display: flex;
|
123
|
+
align-items: center;
|
124
|
+
width: 75px;
|
125
|
+
`
|
126
|
+
|
127
|
+
export default {
|
128
|
+
name: 'PaginationV2',
|
129
|
+
components: {
|
130
|
+
PaginationWrapper,
|
131
|
+
PaginationLink,
|
132
|
+
RCIcon,
|
133
|
+
RCSelect,
|
134
|
+
RCOption,
|
135
|
+
SelectWrapper,
|
136
|
+
SelectText,
|
137
|
+
ArrowIconContainer,
|
138
|
+
},
|
139
|
+
props: {
|
140
|
+
fetchPage: {
|
141
|
+
type: Function,
|
142
|
+
required: true,
|
143
|
+
},
|
144
|
+
currentPage: {
|
145
|
+
type: Number,
|
146
|
+
required: true,
|
147
|
+
},
|
148
|
+
paginationParams: {
|
149
|
+
type: Object,
|
150
|
+
required: true,
|
151
|
+
},
|
152
|
+
},
|
153
|
+
data() {
|
154
|
+
return {
|
155
|
+
selectedValue: this.currentPage,
|
156
|
+
}
|
157
|
+
},
|
158
|
+
computed: {
|
159
|
+
getTheme() {
|
160
|
+
return theme
|
161
|
+
},
|
162
|
+
},
|
163
|
+
methods: {
|
164
|
+
getNewProjects(num) {
|
165
|
+
this.$emit('on-pagination-change', num)
|
166
|
+
},
|
167
|
+
paginationNumbers() {
|
168
|
+
return Array.from(
|
169
|
+
{ length: this.paginationParams.pages },
|
170
|
+
(_, i) => i + 1
|
171
|
+
)
|
172
|
+
},
|
173
|
+
},
|
174
|
+
}
|
175
|
+
</script>
|
@@ -9,34 +9,54 @@
|
|
9
9
|
v-if="!item.children"
|
10
10
|
:key="idx"
|
11
11
|
:data-id="`sub_menu_settings_${item.key}`"
|
12
|
+
:fill-type="item.icon === 'free_technology' ? 'stroke' : 'fill'"
|
12
13
|
:is-active="activeTab === item.key || activeParentTab === item.key"
|
13
14
|
@click="$emit('tab-click', { activeKey: item.key })"
|
14
15
|
>
|
15
|
-
<IconContainer
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
<IconContainer :is-active="activeTab === item.key">
|
17
|
+
<Icon
|
18
|
+
:color="
|
19
|
+
activeTab === item.key ? theme.semanticColors.purple[500] : ''
|
20
|
+
"
|
21
|
+
cursor="pointer"
|
22
|
+
:fill-type="item.fillType"
|
23
|
+
:name="item.icon"
|
24
|
+
size="18px"
|
25
|
+
/>
|
19
26
|
</IconContainer>
|
20
|
-
<ListText
|
27
|
+
<ListText :is-active="activeTab === item.key">{{
|
28
|
+
$gettext(item.label)
|
29
|
+
}}</ListText>
|
21
30
|
</ListItem>
|
22
31
|
<CollapseWrapper v-else :key="idx + item.key">
|
23
32
|
<CollapseContainer
|
24
33
|
:data-id="`sub_menu_settings_${item.key}`"
|
34
|
+
:is-active="activeParentTab === item.key"
|
25
35
|
@click="toggleActiveDropdown(item.key)"
|
26
36
|
>
|
27
37
|
<IconContainer :is-active="activeParentTab === item.key">
|
28
38
|
<Icon
|
29
|
-
color="
|
39
|
+
:color="
|
40
|
+
activeParentTab === item.key
|
41
|
+
? theme.semanticColors.purple[500]
|
42
|
+
: ''
|
43
|
+
"
|
30
44
|
cursor="pointer"
|
31
45
|
:name="item.icon"
|
32
46
|
size="18px"
|
33
47
|
/>
|
34
48
|
</IconContainer>
|
35
|
-
<ListText
|
49
|
+
<ListText :is-active="activeTab === item.key">{{
|
50
|
+
$gettext(item.label)
|
51
|
+
}}</ListText>
|
36
52
|
<ArrowContainer>
|
37
53
|
<Icon
|
38
|
-
color="
|
39
|
-
:name="
|
54
|
+
:color="theme.semanticColors.grey[800]"
|
55
|
+
:name="
|
56
|
+
activeDropdown === item.key
|
57
|
+
? 'arrow_up_unfilled'
|
58
|
+
: 'arrow_down_unfilled'
|
59
|
+
"
|
40
60
|
size="10px"
|
41
61
|
/>
|
42
62
|
</ArrowContainer>
|
@@ -68,7 +88,7 @@
|
|
68
88
|
@click="$emit('on-logout')"
|
69
89
|
>
|
70
90
|
<RotateIcon
|
71
|
-
color="
|
91
|
+
:color="theme.semanticColors.teal[800]"
|
72
92
|
cursor="pointer"
|
73
93
|
name="initial_situation"
|
74
94
|
size="18px"
|
@@ -83,11 +103,11 @@
|
|
83
103
|
import styled from 'vue3-styled-components'
|
84
104
|
import Icon from '../icon'
|
85
105
|
import Spinner from '../spinner'
|
106
|
+
import theme from '@/assets/theme.js'
|
86
107
|
|
87
108
|
const PageAttrs = { isLoading: Boolean }
|
88
109
|
const PageContainer = styled('div', PageAttrs)`
|
89
|
-
background-color: ${(props) =>
|
90
|
-
props.isLoading ? props.theme.colors.white : props.theme.colors.grey6};
|
110
|
+
background-color: ${(props) => props.theme.semanticColors.grey[100]};
|
91
111
|
padding: 14px 12px;
|
92
112
|
min-width: 220px;
|
93
113
|
display: flex;
|
@@ -100,7 +120,7 @@
|
|
100
120
|
grid-gap: 6px;
|
101
121
|
`
|
102
122
|
|
103
|
-
const IconAttrs = { isActive: Boolean, isButton: Boolean }
|
123
|
+
const IconAttrs = { isActive: Boolean, isButton: Boolean, fillType: String }
|
104
124
|
|
105
125
|
const ListItem = styled('div', IconAttrs)`
|
106
126
|
display: grid;
|
@@ -109,19 +129,28 @@
|
|
109
129
|
grid-gap: 20px;
|
110
130
|
cursor: pointer;
|
111
131
|
padding: 4px;
|
112
|
-
border-radius:
|
132
|
+
border-radius: 4px;
|
113
133
|
background-color: ${(props) =>
|
114
|
-
props.isActive ?
|
134
|
+
props.isActive ? props.theme.semanticColors.purple[50] : ''};
|
135
|
+
color: ${(props) =>
|
136
|
+
props.isActive
|
137
|
+
? props.theme.semanticColors.purple[500]
|
138
|
+
: props.theme.semanticColors.teal[800]};
|
115
139
|
|
116
140
|
:hover {
|
117
|
-
background-color:
|
141
|
+
background-color: ${(props) => props.theme.semanticColors.purple[100]};
|
142
|
+
color: ${(props) => props.theme.semanticColors.purple[500]};
|
143
|
+
svg path:not(.fix) {
|
144
|
+
${(props) => props.fillType}: ${(props) =>
|
145
|
+
props.theme.semanticColors.purple[500]};
|
146
|
+
}
|
118
147
|
}
|
119
148
|
`
|
120
149
|
|
121
|
-
const
|
122
|
-
|
123
|
-
font-
|
124
|
-
|
150
|
+
const ListTextAttrs = { isActive: Boolean }
|
151
|
+
const ListText = styled('div', ListTextAttrs)`
|
152
|
+
font-size: 14px;
|
153
|
+
font-weight: 400;
|
125
154
|
`
|
126
155
|
|
127
156
|
const IconContainer = styled('div', IconAttrs)`
|
@@ -130,18 +159,16 @@
|
|
130
159
|
justify-items: center;
|
131
160
|
width: 32px;
|
132
161
|
height: 32px;
|
133
|
-
background-color: ${(props) =>
|
134
|
-
props.isActive ? props.theme.colors.red : 'rgba(255, 255, 255, 0.2)'};
|
135
162
|
border-radius: 6px;
|
136
163
|
|
137
164
|
${({ isButton = false }) =>
|
138
165
|
isButton &&
|
139
166
|
`
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
167
|
+
cursor: pointer;
|
168
|
+
&:hover {
|
169
|
+
background-color: ${(props) =>
|
170
|
+
props.theme.semanticColors.purple[100]};
|
171
|
+
`}
|
145
172
|
`
|
146
173
|
|
147
174
|
const SpinnerContainer = styled.div`
|
@@ -161,7 +188,7 @@
|
|
161
188
|
const AppVersion = styled.p`
|
162
189
|
font-size: 11px;
|
163
190
|
line-height: 13px;
|
164
|
-
color: ${(props) => props.theme.
|
191
|
+
color: ${(props) => props.theme.semanticColors.teal[800]};
|
165
192
|
margin-right: 6px;
|
166
193
|
`
|
167
194
|
|
@@ -174,30 +201,46 @@
|
|
174
201
|
cursor: pointer;
|
175
202
|
margin-left: 65px;
|
176
203
|
padding: 8px;
|
177
|
-
border-radius:
|
178
|
-
color: ${(props) =>
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
204
|
+
border-radius: 4px;
|
205
|
+
color: ${(props) =>
|
206
|
+
props.isActive
|
207
|
+
? props.theme.semanticColors.purple[500]
|
208
|
+
: props.theme.semanticColors.teal[800]};
|
209
|
+
font-weight: 400;
|
210
|
+
font-size: 14px;
|
211
|
+
background: ${(props) =>
|
212
|
+
props.isActive ? props.theme.semanticColors.purple[50] : ''};
|
185
213
|
|
186
214
|
&:hover {
|
187
|
-
background:
|
215
|
+
background: ${(props) => props.theme.semanticColors.purple[100]};
|
216
|
+
color: ${(props) => props.theme.semanticColors.purple[500]} !important;
|
188
217
|
}
|
189
218
|
`
|
190
219
|
|
191
|
-
const
|
220
|
+
const CollapseContainerAttrs = { isActive: Boolean }
|
221
|
+
const CollapseContainer = styled('div', CollapseContainerAttrs)`
|
192
222
|
display: grid;
|
193
223
|
grid-template-columns: auto 1fr auto;
|
194
224
|
grid-gap: 20px;
|
195
225
|
padding: 4px;
|
226
|
+
padding-right: 13px;
|
196
227
|
border-radius: 6px;
|
197
228
|
align-items: center;
|
198
229
|
cursor: pointer;
|
230
|
+
background: ${(props) =>
|
231
|
+
props.isActive ? props.theme.semanticColors.purple[50] : ''};
|
232
|
+
|
233
|
+
div {
|
234
|
+
color: ${(props) =>
|
235
|
+
props.isActive ? props.theme.semanticColors.purple[500] : ''};
|
236
|
+
}
|
237
|
+
|
199
238
|
&:hover {
|
200
|
-
background:
|
239
|
+
background: ${(props) => props.theme.semanticColors.purple[100]};
|
240
|
+
color: ${(props) => props.theme.semanticColors.purple[500]};
|
241
|
+
svg path:not(.fix) {
|
242
|
+
fill: ${(props) => props.theme.semanticColors.purple[500]};
|
243
|
+
}
|
201
244
|
}
|
202
245
|
`
|
203
246
|
|
@@ -254,17 +297,9 @@
|
|
254
297
|
data() {
|
255
298
|
return {
|
256
299
|
activeDropdown: null,
|
300
|
+
theme,
|
257
301
|
}
|
258
302
|
},
|
259
|
-
methods: {
|
260
|
-
toggleActiveDropdown(value) {
|
261
|
-
if (this.activeDropdown === value) {
|
262
|
-
this.activeDropdown = null
|
263
|
-
} else {
|
264
|
-
this.activeDropdown = value
|
265
|
-
}
|
266
|
-
},
|
267
|
-
},
|
268
303
|
watch: {
|
269
304
|
activeTab: {
|
270
305
|
// once active tab is received, check if any parent
|
@@ -277,5 +312,14 @@
|
|
277
312
|
once: true,
|
278
313
|
},
|
279
314
|
},
|
315
|
+
methods: {
|
316
|
+
toggleActiveDropdown(value) {
|
317
|
+
if (this.activeDropdown === value) {
|
318
|
+
this.activeDropdown = null
|
319
|
+
} else {
|
320
|
+
this.activeDropdown = value
|
321
|
+
}
|
322
|
+
},
|
323
|
+
},
|
280
324
|
}
|
281
325
|
</script>
|