@eturnity/eturnity_reusable_components 7.24.3-EPDM-11250.0 → 7.24.3-EPDM-11320.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/.eslintrc.js +125 -0
- package/package.json +6 -20
- package/src/App.vue +75 -70
- package/src/components/addNewButton/index.vue +24 -27
- package/src/components/banner/actionBanner/index.vue +32 -30
- package/src/components/banner/banner/index.vue +88 -80
- package/src/components/banner/infoBanner/index.vue +36 -44
- package/src/components/buttons/buttonIcon/index.vue +83 -78
- package/src/components/buttons/closeButton/index.vue +26 -26
- package/src/components/buttons/mainButton/index.vue +80 -76
- package/src/components/card/index.vue +56 -52
- package/src/components/collapsableInfoText/index.vue +81 -76
- package/src/components/deleteIcon/index.vue +31 -28
- package/src/components/draggableInputHandle/index.vue +20 -17
- package/src/components/dropdown/Dropdown.stories.js +8 -8
- package/src/components/dropdown/index.vue +75 -72
- package/src/components/errorMessage/index.vue +23 -23
- package/src/components/filter/filterSettings.vue +349 -329
- package/src/components/filter/index.vue +130 -130
- package/src/components/filter/parentDropdown.vue +43 -40
- package/src/components/icon/Icons.stories.js +4 -4
- package/src/components/icon/iconCache.js +1 -1
- package/src/components/icon/iconCollection.vue +40 -37
- package/src/components/icon/index.vue +72 -65
- package/src/components/iconWrapper/index.vue +122 -118
- package/src/components/infoCard/index.vue +20 -17
- package/src/components/infoText/index.vue +88 -82
- package/src/components/inputs/checkbox/index.vue +91 -94
- package/src/components/inputs/inputNumber/index.vue +508 -488
- package/src/components/inputs/inputNumberQuestion/index.vue +127 -124
- package/src/components/inputs/inputText/index.vue +265 -252
- package/src/components/inputs/radioButton/index.vue +135 -120
- package/src/components/inputs/searchInput/index.vue +84 -81
- package/src/components/inputs/select/index.vue +644 -631
- package/src/components/inputs/select/option/index.vue +91 -91
- package/src/components/inputs/select/select.stories.js +7 -7
- package/src/components/inputs/slider/index.vue +46 -46
- package/src/components/inputs/switchField/index.vue +159 -152
- package/src/components/inputs/textAreaInput/index.vue +120 -113
- package/src/components/inputs/toggle/index.vue +137 -127
- package/src/components/label/index.vue +64 -61
- package/src/components/markerItem/index.vue +40 -40
- package/src/components/modals/actionModal/index.vue +32 -29
- package/src/components/modals/infoModal/index.vue +34 -27
- package/src/components/modals/modal/index.vue +88 -80
- package/src/components/navigationTabs/index.vue +50 -47
- package/src/components/pageSubtitle/index.vue +33 -29
- package/src/components/pageTitle/index.vue +47 -39
- package/src/components/pagination/index.vue +64 -62
- package/src/components/progressBar/index.vue +70 -67
- package/src/components/projectMarker/index.vue +172 -163
- package/src/components/rangeSlider/Slider.vue +449 -449
- package/src/components/rangeSlider/index.vue +282 -270
- package/src/components/rangeSlider/utils/dom.js +3 -3
- package/src/components/selectedOptions/index.vue +51 -51
- package/src/components/sideMenu/index.vue +117 -109
- package/src/components/spinner/index.vue +37 -34
- package/src/components/tableDropdown/index.vue +343 -326
- package/src/components/tables/mainTable/index.vue +109 -106
- package/src/components/tables/viewTable/index.vue +105 -92
- package/src/components/threeDots/index.vue +174 -171
- package/src/components/videoThumbnail/index.vue +67 -59
- package/src/components/videoThumbnail/videoThumbnail.stories.js +6 -6
- package/src/helpers/numberConverter.js +1 -3
- package/src/helpers/translateLang.js +10 -13
- package/.prettierrc +0 -7
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
@@ -1,27 +1,30 @@
|
|
1
1
|
<template>
|
2
|
-
<Modal
|
3
|
-
|
4
|
-
|
2
|
+
<Modal
|
3
|
+
:is-open="isOpen"
|
4
|
+
@on-close="closeModal"
|
5
|
+
>
|
6
|
+
<ModalContainer>
|
7
|
+
<ModalTitle v-if="$slots.title">
|
5
8
|
<slot name="title"></slot>
|
6
|
-
</
|
7
|
-
<
|
9
|
+
</ModalTitle>
|
10
|
+
<TextContainer v-if="$slots.body">
|
8
11
|
<slot name="body"></slot>
|
9
|
-
</
|
10
|
-
<
|
12
|
+
</TextContainer>
|
13
|
+
<ButtonContainer v-if="$slots.buttons">
|
11
14
|
<slot name="buttons"></slot>
|
12
|
-
</
|
13
|
-
</
|
15
|
+
</ButtonContainer>
|
16
|
+
</ModalContainer>
|
14
17
|
</Modal>
|
15
18
|
</template>
|
16
19
|
<script>
|
17
|
-
import styled from 'vue3-styled-components'
|
18
|
-
import Modal from '../modal'
|
19
|
-
const
|
20
|
+
import styled from 'vue3-styled-components'
|
21
|
+
import Modal from '../modal'
|
22
|
+
const ModalContainer = styled.div`
|
20
23
|
width: 450px;
|
21
24
|
min-height: 205px;
|
22
25
|
padding: 40px 40px 30px 40px;
|
23
26
|
`
|
24
|
-
const
|
27
|
+
const ModalTitle = styled.div`
|
25
28
|
color: ${(props) => props.theme.colors.black};
|
26
29
|
font-family: ${(props) => props.theme.fonts.mainFont};
|
27
30
|
font-size: 18px;
|
@@ -30,12 +33,12 @@ const modalTitle = styled.div`
|
|
30
33
|
line-height: 120%;
|
31
34
|
text-transform: uppercase;
|
32
35
|
`
|
33
|
-
const
|
36
|
+
const ButtonContainer = styled.div`
|
34
37
|
display: inline-flex;
|
35
38
|
align-items: flex-start;
|
36
39
|
gap: 20px;
|
37
40
|
`
|
38
|
-
const
|
41
|
+
const TextContainer = styled.div`
|
39
42
|
color: ${(props) => props.theme.colors.black};
|
40
43
|
font-family: ${(props) => props.theme.fonts.mainFont};
|
41
44
|
font-size: 13px;
|
@@ -45,20 +48,20 @@ const textContainer = styled.div`
|
|
45
48
|
padding: 30px 0px;
|
46
49
|
white-space: pre-wrap;
|
47
50
|
`
|
48
|
-
export default {
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
51
|
+
export default {
|
52
|
+
name: 'ActionModal',
|
53
|
+
components: {
|
54
|
+
Modal,
|
55
|
+
ModalContainer,
|
56
|
+
ModalTitle,
|
57
|
+
ButtonContainer,
|
58
|
+
TextContainer
|
59
|
+
},
|
60
|
+
props: ['isOpen'],
|
61
|
+
methods: {
|
62
|
+
closeModal() {
|
63
|
+
this.$emit('on-close')
|
64
|
+
}
|
61
65
|
}
|
62
66
|
}
|
63
|
-
}
|
64
67
|
</script>
|
@@ -1,49 +1,56 @@
|
|
1
1
|
<template>
|
2
|
-
<ActionModal
|
3
|
-
|
2
|
+
<ActionModal
|
3
|
+
:is-open="isOpen"
|
4
|
+
@on-close="closeModal"
|
5
|
+
>
|
6
|
+
<ModalContainer>
|
4
7
|
<template #title>
|
5
|
-
<slot name="title"
|
8
|
+
<slot name="title"></slot>
|
6
9
|
</template>
|
7
10
|
<template #body>
|
8
|
-
<slot name="body"
|
11
|
+
<slot name="body"></slot>
|
9
12
|
</template>
|
10
13
|
<template #buttons>
|
11
|
-
<
|
12
|
-
<
|
13
|
-
|
14
|
+
<ButtonContainer>
|
15
|
+
<RCMainButton
|
16
|
+
min-width="150px"
|
17
|
+
:text="$gettext('Got it')"
|
18
|
+
type="primary"
|
19
|
+
@click="closeModal"
|
20
|
+
/>
|
21
|
+
</ButtonContainer>
|
14
22
|
</template>
|
15
|
-
|
16
|
-
</modalContainer>
|
23
|
+
</ModalContainer>
|
17
24
|
</ActionModal>
|
18
25
|
</template>
|
19
26
|
<script>
|
20
27
|
|
21
|
-
import styled from 'vue3-styled-components'
|
22
|
-
import ActionModal from '../actionModal'
|
23
|
-
import
|
24
|
-
const
|
28
|
+
import styled from 'vue3-styled-components'
|
29
|
+
import ActionModal from '../actionModal'
|
30
|
+
import RCMainButton from '../../buttons/mainButton'
|
31
|
+
const ModalContainer = styled.div`
|
25
32
|
width: 450px;
|
26
33
|
min-height: 205px;
|
27
34
|
padding: 40px 40px 30px 40px;
|
28
35
|
`
|
29
|
-
const
|
36
|
+
const ButtonContainer = styled.div`
|
30
37
|
display: inline-flex;
|
31
38
|
align-items: flex-start;
|
32
39
|
gap: 20px;
|
33
40
|
`
|
34
|
-
export default {
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
41
|
+
export default {
|
42
|
+
name: 'InfoModal',
|
43
|
+
components: {
|
44
|
+
ModalContainer,
|
45
|
+
ButtonContainer,
|
46
|
+
ActionModal,
|
47
|
+
RCMainButton
|
48
|
+
},
|
49
|
+
props: ['isOpen'],
|
50
|
+
methods: {
|
51
|
+
closeModal() {
|
52
|
+
this.$emit('on-close')
|
53
|
+
}
|
46
54
|
}
|
47
55
|
}
|
48
|
-
}
|
49
56
|
</script>
|
@@ -1,18 +1,26 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
:position="position"
|
4
|
-
:isOpen="isOpen"
|
5
|
-
:class="{ visible: isOpen, hidden: !isOpen }"
|
2
|
+
<PageWrapper
|
6
3
|
:backdrop="backdrop"
|
4
|
+
:class="{ visible: isOpen, hidden: !isOpen }"
|
5
|
+
:is-open="isOpen"
|
6
|
+
:position="position"
|
7
7
|
>
|
8
|
-
<
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
8
|
+
<ModalContainer @click="onClickModalContainer">
|
9
|
+
<Spinner
|
10
|
+
v-if="isLoading"
|
11
|
+
:limited-to-modal="true"
|
12
|
+
size="50px"
|
13
|
+
/>
|
14
|
+
<ContentContainer :visible="!isLoading">
|
15
|
+
<slot></slot>
|
16
|
+
</ContentContainer>
|
17
|
+
<CloseButton
|
18
|
+
v-if="!hideClose"
|
19
|
+
class="close"
|
20
|
+
@click="onCloseModal()"
|
21
|
+
/>
|
22
|
+
</ModalContainer>
|
23
|
+
</PageWrapper>
|
16
24
|
</template>
|
17
25
|
|
18
26
|
<script>
|
@@ -26,17 +34,17 @@
|
|
26
34
|
// <div>Data....</div>
|
27
35
|
// </modal>
|
28
36
|
|
29
|
-
import styled from 'vue3-styled-components'
|
30
|
-
import CloseButton from '../../buttons/closeButton'
|
31
|
-
import Spinner from '../../spinner'
|
37
|
+
import styled from 'vue3-styled-components'
|
38
|
+
import CloseButton from '../../buttons/closeButton'
|
39
|
+
import Spinner from '../../spinner'
|
32
40
|
|
33
|
-
const contentAttrs = { visible: Boolean }
|
34
|
-
const ContentContainer = styled('div', contentAttrs)`
|
41
|
+
const contentAttrs = { visible: Boolean }
|
42
|
+
const ContentContainer = styled('div', contentAttrs)`
|
35
43
|
visibility: ${(props) => (props.visible ? 'inherit' : 'hidden')};
|
36
44
|
`
|
37
45
|
|
38
|
-
const pageAttrs = { isOpen: Boolean, backdrop: String, position: String }
|
39
|
-
const PageWrapper = styled('div', pageAttrs)`
|
46
|
+
const pageAttrs = { isOpen: Boolean, backdrop: String, position: String }
|
47
|
+
const PageWrapper = styled('div', pageAttrs)`
|
40
48
|
position: ${(props) => props.position}
|
41
49
|
display: grid;
|
42
50
|
top: 0;
|
@@ -46,7 +54,7 @@ const PageWrapper = styled('div', pageAttrs)`
|
|
46
54
|
background-color: ${(props) =>
|
47
55
|
props.backdrop == 'dark'
|
48
56
|
? 'rgba(0, 0, 0, 0.4)'
|
49
|
-
|
57
|
+
: 'rgba(255, 255, 255, 0.9)'};
|
50
58
|
z-index: 99999;
|
51
59
|
overflow: auto;
|
52
60
|
|
@@ -67,7 +75,7 @@ const PageWrapper = styled('div', pageAttrs)`
|
|
67
75
|
}
|
68
76
|
`
|
69
77
|
|
70
|
-
const ModalContainer = styled.div`
|
78
|
+
const ModalContainer = styled.div`
|
71
79
|
align-self: center;
|
72
80
|
justify-self: center;
|
73
81
|
position: relative;
|
@@ -118,71 +126,71 @@ const ModalContainer = styled.div`
|
|
118
126
|
}
|
119
127
|
`
|
120
128
|
|
121
|
-
export default {
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
},
|
130
|
-
props: {
|
131
|
-
isOpen: {
|
132
|
-
required: true,
|
133
|
-
default: false
|
134
|
-
},
|
135
|
-
isLoading: {
|
136
|
-
required: false,
|
137
|
-
default: false
|
138
|
-
},
|
139
|
-
hideClose: {
|
140
|
-
required: false,
|
141
|
-
default: false
|
142
|
-
},
|
143
|
-
backdrop: {
|
144
|
-
required: false,
|
145
|
-
default: 'white'
|
146
|
-
},
|
147
|
-
position: {
|
148
|
-
required: false,
|
149
|
-
default: 'fixed'
|
129
|
+
export default {
|
130
|
+
name: 'Modal',
|
131
|
+
components: {
|
132
|
+
PageWrapper,
|
133
|
+
ModalContainer,
|
134
|
+
CloseButton,
|
135
|
+
Spinner,
|
136
|
+
ContentContainer
|
150
137
|
},
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
138
|
+
props: {
|
139
|
+
isOpen: {
|
140
|
+
required: true,
|
141
|
+
default: false
|
142
|
+
},
|
143
|
+
isLoading: {
|
144
|
+
required: false,
|
145
|
+
default: false
|
146
|
+
},
|
147
|
+
hideClose: {
|
148
|
+
required: false,
|
149
|
+
default: false
|
150
|
+
},
|
151
|
+
backdrop: {
|
152
|
+
required: false,
|
153
|
+
default: 'white'
|
154
|
+
},
|
155
|
+
position: {
|
156
|
+
required: false,
|
157
|
+
default: 'fixed'
|
158
|
+
},
|
159
|
+
stopPropagation: {
|
160
|
+
type: Boolean,
|
161
|
+
default: true
|
166
162
|
}
|
167
163
|
},
|
168
|
-
|
169
|
-
|
170
|
-
|
164
|
+
watch: {
|
165
|
+
isOpen: {
|
166
|
+
immediate: true,
|
167
|
+
handler(isOpen) {
|
168
|
+
document.body.style.overflow = isOpen ? 'hidden' : ''
|
169
|
+
if (isOpen) {
|
170
|
+
window.addEventListener('keydown', this.handleKeyDown)
|
171
|
+
} else {
|
172
|
+
window.removeEventListener('keydown', this.handleKeyDown)
|
173
|
+
}
|
174
|
+
}
|
171
175
|
}
|
172
|
-
}
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
176
|
+
},
|
177
|
+
beforeDestroy() {
|
178
|
+
window.removeEventListener('keydown', this.handleKeyDown)
|
179
|
+
},
|
180
|
+
methods: {
|
181
|
+
onCloseModal() {
|
182
|
+
this.$emit('on-close')
|
183
|
+
},
|
184
|
+
handleKeyDown({ key }) {
|
185
|
+
if (key === 'Escape') {
|
186
|
+
this.onCloseModal()
|
187
|
+
}
|
188
|
+
},
|
189
|
+
onClickModalContainer(event) {
|
190
|
+
if (this.stopPropagation) {
|
191
|
+
event.stopPropagation()
|
183
192
|
}
|
184
193
|
}
|
185
194
|
}
|
186
195
|
}
|
187
|
-
}
|
188
196
|
</script>
|
@@ -1,36 +1,39 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
2
|
+
<RoofTabWrap>
|
3
|
+
<Tab
|
4
4
|
v-for="(tab, index) in tabsData"
|
5
5
|
:key="tab.id"
|
6
|
-
:isDisabled="!!tab['isDisabled']"
|
7
|
-
:textColor="tab['textColor']"
|
8
6
|
:active="isIndexKey ? index === activeTab : tab[tabKey] === activeTab"
|
7
|
+
:is-disabled="!!tab['isDisabled']"
|
8
|
+
:text-color="tab['textColor']"
|
9
9
|
@click="$emit('tab-click', isIndexKey ? index : tab[tabKey])"
|
10
10
|
>
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
11
|
+
<Option
|
12
|
+
:is-disabled="!!tab['isDisabled']"
|
13
|
+
:text-color="tab['textColor']"
|
14
|
+
>
|
15
|
+
<Uppercase>{{ tab[tabLabel] }}</Uppercase>
|
16
|
+
<InfoText
|
17
|
+
v-if="tab['labelInfoText']"
|
18
|
+
:align-arrow="tab['labelInfoAlign']"
|
19
|
+
:text="tab['labelInfoText']"
|
20
|
+
/>
|
21
|
+
</Option>
|
22
|
+
</Tab>
|
23
|
+
<BottomLine />
|
24
|
+
</RoofTabWrap>
|
22
25
|
</template>
|
23
26
|
|
24
27
|
<script>
|
25
|
-
import styled from 'vue3-styled-components'
|
26
|
-
import InfoText from '../infoText'
|
27
|
-
const TabAttr = {
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
}
|
28
|
+
import styled from 'vue3-styled-components'
|
29
|
+
import InfoText from '../infoText'
|
30
|
+
const TabAttr = {
|
31
|
+
active: Boolean,
|
32
|
+
isDisabled: Boolean,
|
33
|
+
textColor: String
|
34
|
+
}
|
32
35
|
|
33
|
-
const
|
36
|
+
const BottomLine = styled('div')`
|
34
37
|
position: absolute;
|
35
38
|
bottom: 0;
|
36
39
|
left: 0;
|
@@ -38,17 +41,17 @@ const bottomLine = styled('div')`
|
|
38
41
|
width: 100%;
|
39
42
|
background-color: ${(props) => props.theme.colors.grey3};
|
40
43
|
`
|
41
|
-
const
|
44
|
+
const RoofTabWrap = styled('div')`
|
42
45
|
display: flex;
|
43
46
|
align-items: center;
|
44
47
|
position: relative;
|
45
48
|
font-size: 13px;
|
46
49
|
font-weight: 700;
|
47
50
|
`
|
48
|
-
const Uppercase = styled('span')`
|
51
|
+
const Uppercase = styled('span')`
|
49
52
|
text-transform: uppercase;
|
50
53
|
`
|
51
|
-
const Option = styled('div', TabAttr)`
|
54
|
+
const Option = styled('div', TabAttr)`
|
52
55
|
font-size: 13px;
|
53
56
|
font-weight: 700;
|
54
57
|
display: flex;
|
@@ -62,9 +65,9 @@ const Option = styled('div', TabAttr)`
|
|
62
65
|
: props.textColor
|
63
66
|
: props.isDisabled
|
64
67
|
? props.theme.colors.grey2
|
65
|
-
|
68
|
+
: props.theme.colors.black};
|
66
69
|
`
|
67
|
-
const Tab = styled('div', TabAttr)`
|
70
|
+
const Tab = styled('div', TabAttr)`
|
68
71
|
padding: 16px 10px;
|
69
72
|
margin-right: 5px;
|
70
73
|
position: relative;
|
@@ -73,7 +76,7 @@ const Tab = styled('div', TabAttr)`
|
|
73
76
|
border-bottom: 2px solid
|
74
77
|
${(props) => (props.active ? props.theme.colors.primary : 'transparent')};
|
75
78
|
background-color: ${(props) =>
|
76
|
-
|
79
|
+
props.isDisabled ? props.theme.colors.grey5 : 'transparent'};
|
77
80
|
transition: 0.2s ease;
|
78
81
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};
|
79
82
|
min-width: 140px;
|
@@ -83,30 +86,30 @@ const Tab = styled('div', TabAttr)`
|
|
83
86
|
min-height: 55px;
|
84
87
|
&:hover {
|
85
88
|
border-color: ${(props) =>
|
86
|
-
|
89
|
+
props.isDisabled ? props.theme.colors.grey2 : props.theme.colors.primary};
|
87
90
|
}
|
88
91
|
`
|
89
92
|
|
90
|
-
export default {
|
91
|
-
|
93
|
+
export default {
|
94
|
+
name: 'Tabs',
|
92
95
|
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
96
|
+
components: {
|
97
|
+
Tab,
|
98
|
+
BottomLine,
|
99
|
+
RoofTabWrap,
|
100
|
+
Option,
|
101
|
+
InfoText,
|
102
|
+
Uppercase
|
103
|
+
},
|
101
104
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
105
|
+
props: {
|
106
|
+
tabsData: { required: true },
|
107
|
+
activeTab: { required: true },
|
108
|
+
isIndexKey: { type: Boolean, default: false },
|
109
|
+
tabKey: { type: String, default: '' },
|
110
|
+
tabLabel: { type: String, default: '' }
|
111
|
+
}
|
108
112
|
}
|
109
|
-
}
|
110
113
|
</script>
|
111
114
|
|
112
115
|
<style lang="scss" scoped></style>
|
@@ -1,13 +1,17 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
2
|
+
<SubtitleText
|
3
|
+
:color="color"
|
4
|
+
:has-info-text="!!infoText"
|
5
|
+
:margin-bottom="marginBottom"
|
6
|
+
>
|
3
7
|
<span>
|
4
8
|
{{ text }}
|
5
9
|
</span>
|
6
|
-
<
|
10
|
+
<InfoText
|
7
11
|
v-if="!!infoText"
|
8
12
|
:text="infoText"
|
9
13
|
/>
|
10
|
-
</
|
14
|
+
</SubtitleText>
|
11
15
|
</template>
|
12
16
|
|
13
17
|
<script>
|
@@ -18,16 +22,16 @@
|
|
18
22
|
// color="red"
|
19
23
|
// infoText="My info text"
|
20
24
|
// />
|
21
|
-
import styled from "vue3-styled-components"
|
22
|
-
import InfoText from "../infoText"
|
25
|
+
import styled from "vue3-styled-components"
|
26
|
+
import InfoText from "../infoText"
|
23
27
|
|
24
|
-
const textAttrs = { color: String, hasInfoText: Boolean, marginBottom: String }
|
25
|
-
const SubtitleText = styled("div", textAttrs)`
|
28
|
+
const textAttrs = { color: String, hasInfoText: Boolean, marginBottom: String }
|
29
|
+
const SubtitleText = styled("div", textAttrs)`
|
26
30
|
display: grid;
|
27
31
|
align-items: center;
|
28
32
|
grid-gap: 12px;
|
29
33
|
grid-template-columns: ${(props) =>
|
30
|
-
|
34
|
+
props.hasInfoText ? "auto auto 1fr" : "1fr"};
|
31
35
|
color: ${(props) => (props.color ? props.color : props.theme.colors.gray1)};
|
32
36
|
font-size: 13px;
|
33
37
|
margin-bottom: ${(props) => (props.marginBottom ? props.marginBottom : '30px')};
|
@@ -35,27 +39,27 @@ const SubtitleText = styled("div", textAttrs)`
|
|
35
39
|
position: relative;
|
36
40
|
`
|
37
41
|
|
38
|
-
export default {
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
},
|
44
|
-
props: {
|
45
|
-
text: {
|
46
|
-
required: true,
|
42
|
+
export default {
|
43
|
+
name: "PageSubtitle",
|
44
|
+
components: {
|
45
|
+
SubtitleText,
|
46
|
+
InfoText,
|
47
47
|
},
|
48
|
-
|
49
|
-
|
48
|
+
props: {
|
49
|
+
text: {
|
50
|
+
required: true,
|
51
|
+
},
|
52
|
+
color: {
|
53
|
+
required: false,
|
54
|
+
},
|
55
|
+
infoText: {
|
56
|
+
required: false,
|
57
|
+
default: null,
|
58
|
+
},
|
59
|
+
marginBottom: {
|
60
|
+
required: false,
|
61
|
+
default: "30px",
|
62
|
+
}
|
50
63
|
},
|
51
|
-
|
52
|
-
required: false,
|
53
|
-
default: null,
|
54
|
-
},
|
55
|
-
marginBottom: {
|
56
|
-
required: false,
|
57
|
-
default: "30px",
|
58
|
-
}
|
59
|
-
},
|
60
|
-
}
|
64
|
+
}
|
61
65
|
</script>
|