@eturnity/eturnity_reusable_components 7.24.3-EPDM-10576.1 → 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 -333
- 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/.prettierrc +0 -7
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
@@ -1,56 +1,66 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
:
|
2
|
+
<Container>
|
3
|
+
<FlexWrapper
|
4
|
+
:data-id="dataId"
|
5
5
|
:disabled="disabled"
|
6
|
+
:size="size"
|
6
7
|
@click="onToggleChange"
|
7
|
-
:data-id="dataId"
|
8
8
|
>
|
9
|
-
<
|
9
|
+
<LabelContainer
|
10
10
|
v-if="label && labelAlign === 'left'"
|
11
|
-
:
|
11
|
+
:has-info-message="!!infoTextMessage"
|
12
12
|
>
|
13
|
-
<
|
14
|
-
|
13
|
+
<LabelText
|
14
|
+
:font-color="fontColor"
|
15
|
+
:size="size"
|
16
|
+
>
|
17
|
+
{{ label }}
|
18
|
+
</LabelText>
|
19
|
+
<InfoText
|
15
20
|
v-if="infoTextMessage"
|
16
21
|
:text="infoTextMessage"
|
17
22
|
/>
|
18
|
-
</
|
19
|
-
<
|
20
|
-
|
23
|
+
</LabelContainer>
|
24
|
+
<ToggleWrapper
|
25
|
+
:background-color="backgroundColor"
|
21
26
|
:checked="isChecked"
|
27
|
+
:disabled="disabled"
|
28
|
+
:is-checked="isChecked"
|
29
|
+
role="checkbox"
|
22
30
|
:size="size"
|
23
31
|
tabindex="0"
|
24
32
|
@keydown.space.prevent="onToggleChange"
|
25
|
-
:disabled="disabled"
|
26
|
-
:backgroundColor="backgroundColor"
|
27
|
-
:isChecked="isChecked"
|
28
33
|
>
|
29
|
-
<
|
30
|
-
:
|
31
|
-
:isChecked="isChecked"
|
34
|
+
<ToggleBackground
|
35
|
+
:background-color="backgroundColor"
|
32
36
|
:disabled="disabled"
|
37
|
+
:is-checked="isChecked"
|
33
38
|
/>
|
34
|
-
<
|
35
|
-
:isChecked="isChecked"
|
36
|
-
:toggleColor="toggleColor"
|
37
|
-
:size="size"
|
39
|
+
<ToggleDot
|
38
40
|
:disabled="disabled"
|
41
|
+
:is-checked="isChecked"
|
42
|
+
:size="size"
|
43
|
+
:toggle-color="toggleColor"
|
39
44
|
/>
|
40
|
-
</
|
41
|
-
<
|
45
|
+
</ToggleWrapper>
|
46
|
+
<LabelContainer
|
42
47
|
v-if="label && labelAlign === 'right'"
|
43
|
-
:
|
48
|
+
:has-info-message="!!infoTextMessage"
|
44
49
|
>
|
45
|
-
<
|
46
|
-
|
47
|
-
|
50
|
+
<LabelText
|
51
|
+
:font-color="fontColor"
|
52
|
+
:size="size"
|
53
|
+
>
|
54
|
+
{{ label }}
|
55
|
+
</LabelText>
|
56
|
+
<InfoText
|
48
57
|
v-if="infoTextMessage"
|
49
58
|
:text="infoTextMessage"
|
59
|
+
@click.stop
|
50
60
|
/>
|
51
|
-
</
|
52
|
-
</
|
53
|
-
</
|
61
|
+
</LabelContainer>
|
62
|
+
</FlexWrapper>
|
63
|
+
</Container>
|
54
64
|
</template>
|
55
65
|
|
56
66
|
<script>
|
@@ -70,15 +80,15 @@
|
|
70
80
|
// data-id="test_data_id"
|
71
81
|
// />
|
72
82
|
|
73
|
-
import styled from 'vue3-styled-components'
|
74
|
-
import InfoText from '../../infoText'
|
83
|
+
import styled from 'vue3-styled-components'
|
84
|
+
import InfoText from '../../infoText'
|
75
85
|
|
76
|
-
const Container = styled.div`
|
86
|
+
const Container = styled.div`
|
77
87
|
display: inline-block;
|
78
88
|
`
|
79
89
|
|
80
|
-
const flexAttrs = { size: String, disabled: Boolean }
|
81
|
-
const FlexWrapper = styled('div', flexAttrs)`
|
90
|
+
const flexAttrs = { size: String, disabled: Boolean }
|
91
|
+
const FlexWrapper = styled('div', flexAttrs)`
|
82
92
|
display: grid;
|
83
93
|
grid-template-columns: auto 1fr;
|
84
94
|
grid-gap: ${(props) =>
|
@@ -86,30 +96,30 @@ const FlexWrapper = styled('div', flexAttrs)`
|
|
86
96
|
? '20px'
|
87
97
|
: props.size === 'small'
|
88
98
|
? '10px'
|
89
|
-
|
99
|
+
: '20px'};
|
90
100
|
align-items: center;
|
91
101
|
cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};
|
92
102
|
`
|
93
103
|
|
94
|
-
const toggleAttrs = {
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
}
|
101
|
-
const LabelText = styled('div', toggleAttrs)`
|
104
|
+
const toggleAttrs = {
|
105
|
+
size: String,
|
106
|
+
fontColor: String,
|
107
|
+
disabled: Boolean,
|
108
|
+
backgroundColor: String,
|
109
|
+
isChecked: Boolean
|
110
|
+
}
|
111
|
+
const LabelText = styled('div', toggleAttrs)`
|
102
112
|
color: ${(props) =>
|
103
|
-
|
113
|
+
props.fontColor ? props.fontColor : props.theme.colors.darkGray};
|
104
114
|
font-size: ${(props) =>
|
105
115
|
props.size === 'medium'
|
106
116
|
? '16px'
|
107
117
|
: props.size === 'small'
|
108
118
|
? '13px'
|
109
|
-
|
119
|
+
: '16px'};
|
110
120
|
`
|
111
121
|
|
112
|
-
const ToggleWrapper = styled('span', toggleAttrs)`
|
122
|
+
const ToggleWrapper = styled('span', toggleAttrs)`
|
113
123
|
display: inline-block;
|
114
124
|
border: ${(props) =>
|
115
125
|
props.disabled
|
@@ -118,7 +128,7 @@ const ToggleWrapper = styled('span', toggleAttrs)`
|
|
118
128
|
? props.backgroundColor
|
119
129
|
? '1px solid ' + props.backgroundColor
|
120
130
|
: '1px solid ' + props.theme.colors.green
|
121
|
-
|
131
|
+
: '1px solid ' + props.theme.colors.grey3}
|
122
132
|
position: relative;
|
123
133
|
cursor: ${(props) => (props.disabled ? 'not-allowed' : 'pointer')};
|
124
134
|
width: ${(props) =>
|
@@ -126,13 +136,13 @@ const ToggleWrapper = styled('span', toggleAttrs)`
|
|
126
136
|
? '50px'
|
127
137
|
: props.size === 'small'
|
128
138
|
? '29px'
|
129
|
-
|
139
|
+
: '50px'};
|
130
140
|
height: ${(props) =>
|
131
141
|
props.size === 'medium'
|
132
142
|
? '24px'
|
133
143
|
: props.size === 'small'
|
134
144
|
? '16px'
|
135
|
-
|
145
|
+
: '24px'};
|
136
146
|
border-radius: 100px;
|
137
147
|
|
138
148
|
&:focus {
|
@@ -145,12 +155,12 @@ const ToggleWrapper = styled('span', toggleAttrs)`
|
|
145
155
|
}
|
146
156
|
`
|
147
157
|
|
148
|
-
const backgroundAttrs = {
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
}
|
153
|
-
const ToggleBackground = styled('span', backgroundAttrs)`
|
158
|
+
const backgroundAttrs = {
|
159
|
+
backgroundColor: String,
|
160
|
+
isChecked: Boolean,
|
161
|
+
disabled: Boolean
|
162
|
+
}
|
163
|
+
const ToggleBackground = styled('span', backgroundAttrs)`
|
154
164
|
display: block;
|
155
165
|
border-radius: 100px;
|
156
166
|
height: 100%;
|
@@ -162,33 +172,33 @@ const ToggleBackground = styled('span', backgroundAttrs)`
|
|
162
172
|
? props.backgroundColor
|
163
173
|
? props.backgroundColor
|
164
174
|
: props.theme.colors.green
|
165
|
-
|
175
|
+
: props.theme.colors.grey3};
|
166
176
|
transition: 0.4s ease;
|
167
177
|
`
|
168
178
|
|
169
|
-
const toggleProps = {
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
}
|
175
|
-
const ToggleDot = styled('span', toggleProps)`
|
179
|
+
const toggleProps = {
|
180
|
+
isChecked: Boolean,
|
181
|
+
toggleColor: String,
|
182
|
+
size: String,
|
183
|
+
disabled: Boolean
|
184
|
+
}
|
185
|
+
const ToggleDot = styled('span', toggleProps)`
|
176
186
|
position: absolute;
|
177
187
|
height: ${(props) =>
|
178
188
|
props.size === 'medium'
|
179
189
|
? '14px'
|
180
190
|
: props.size === 'small'
|
181
191
|
? '10px'
|
182
|
-
|
192
|
+
: '14px'};
|
183
193
|
width: ${(props) =>
|
184
194
|
props.size === 'medium'
|
185
195
|
? '14px'
|
186
196
|
: props.size === 'small'
|
187
197
|
? '10px'
|
188
|
-
|
198
|
+
: '14px'};
|
189
199
|
left: 3px;
|
190
200
|
bottom: ${(props) =>
|
191
|
-
|
201
|
+
props.size === 'medium' ? '5px' : props.size === 'small' ? '2px' : '5px'};
|
192
202
|
background-color: ${(props) =>
|
193
203
|
props.disabled
|
194
204
|
? props.theme.colors.disabled
|
@@ -196,7 +206,7 @@ const ToggleDot = styled('span', toggleProps)`
|
|
196
206
|
? props.toggleColor
|
197
207
|
? props.toggleColor
|
198
208
|
: props.theme.colors.white
|
199
|
-
|
209
|
+
: props.theme.colors.white};
|
200
210
|
border-radius: 100%;
|
201
211
|
transition: transform 0.4s ease;
|
202
212
|
transform: ${(props) =>
|
@@ -206,83 +216,83 @@ const ToggleDot = styled('span', toggleProps)`
|
|
206
216
|
: props.size === 'small'
|
207
217
|
? 'translateX(12px)'
|
208
218
|
: 'translateX(25px)'
|
209
|
-
|
219
|
+
: 'translateX(0)'};
|
210
220
|
|
211
221
|
@media (max-width: ${(props) => props.theme.screen.mobile}) {
|
212
222
|
height: 24px;
|
213
223
|
width: 24px;
|
214
224
|
transform: ${(props) =>
|
215
|
-
|
225
|
+
props.isChecked ? 'translateX(25px)' : 'translateX(0)'};
|
216
226
|
bottom: 8px;
|
217
227
|
}
|
218
228
|
`
|
219
229
|
|
220
|
-
const labelAttrs = { hasInfoMessage: Boolean }
|
221
|
-
const LabelContainer = styled('div', labelAttrs)`
|
230
|
+
const labelAttrs = { hasInfoMessage: Boolean }
|
231
|
+
const LabelContainer = styled('div', labelAttrs)`
|
222
232
|
display: inline-grid;
|
223
233
|
grid-template-columns: ${(props) =>
|
224
|
-
|
234
|
+
props.hasInfoMessage ? 'auto 1fr' : 'auto'};
|
225
235
|
grid-gap: 12px;
|
226
236
|
align-items: center;
|
227
237
|
`
|
228
238
|
|
229
|
-
export default {
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
},
|
241
|
-
props: {
|
242
|
-
label: {
|
243
|
-
required: false,
|
244
|
-
default: ''
|
245
|
-
},
|
246
|
-
isChecked: {
|
247
|
-
required: true,
|
248
|
-
default: false
|
249
|
-
},
|
250
|
-
toggleColor: {
|
251
|
-
required: false
|
252
|
-
},
|
253
|
-
backgroundColor: {
|
254
|
-
required: false
|
239
|
+
export default {
|
240
|
+
name: 'Toggle',
|
241
|
+
components: {
|
242
|
+
Container,
|
243
|
+
ToggleBackground,
|
244
|
+
ToggleDot,
|
245
|
+
ToggleWrapper,
|
246
|
+
FlexWrapper,
|
247
|
+
LabelText,
|
248
|
+
InfoText,
|
249
|
+
LabelContainer
|
255
250
|
},
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
251
|
+
props: {
|
252
|
+
label: {
|
253
|
+
required: false,
|
254
|
+
default: ''
|
255
|
+
},
|
256
|
+
isChecked: {
|
257
|
+
required: true,
|
258
|
+
default: false
|
259
|
+
},
|
260
|
+
toggleColor: {
|
261
|
+
required: false
|
262
|
+
},
|
263
|
+
backgroundColor: {
|
264
|
+
required: false
|
265
|
+
},
|
266
|
+
size: {
|
267
|
+
required: false,
|
268
|
+
default: 'small'
|
269
|
+
},
|
270
|
+
labelAlign: {
|
271
|
+
required: false,
|
272
|
+
default: 'right'
|
273
|
+
},
|
274
|
+
fontColor: {
|
275
|
+
required: false
|
276
|
+
},
|
277
|
+
disabled: {
|
278
|
+
required: false,
|
279
|
+
default: false
|
280
|
+
},
|
281
|
+
infoTextMessage: {
|
282
|
+
required: false
|
283
|
+
},
|
284
|
+
dataId: {
|
285
|
+
type: String,
|
286
|
+
default: ''
|
287
|
+
}
|
273
288
|
},
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
onToggleChange() {
|
281
|
-
if (this.disabled) {
|
282
|
-
return
|
289
|
+
methods: {
|
290
|
+
onToggleChange() {
|
291
|
+
if (this.disabled) {
|
292
|
+
return
|
293
|
+
}
|
294
|
+
this.$emit('on-toggle-change', !this.isChecked)
|
283
295
|
}
|
284
|
-
this.$emit('on-toggle-change', !this.isChecked)
|
285
296
|
}
|
286
297
|
}
|
287
|
-
}
|
288
298
|
</script>
|
@@ -1,99 +1,102 @@
|
|
1
1
|
<template>
|
2
|
-
<label-
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
>({{ $gettext('Optional') }})</optionalLabel
|
7
|
-
></input-label
|
2
|
+
<LabelWrapper :label-align="labelAlign">
|
3
|
+
<InputLabel
|
4
|
+
:font-size="fontSize"
|
5
|
+
:label-font-color="labelFontColor"
|
8
6
|
>
|
9
|
-
|
7
|
+
<slot></slot>
|
8
|
+
<OptionalLabel v-if="labelOptional">
|
9
|
+
({{ $gettext('Optional') }})
|
10
|
+
</OptionalLabel>
|
11
|
+
</InputLabel>
|
12
|
+
<InfoText
|
10
13
|
v-if="infoTextMessage"
|
11
|
-
:
|
12
|
-
|
14
|
+
:align-arrow="infoTextAlign"
|
15
|
+
border-color="#ccc"
|
13
16
|
:size="fontSize ? fontSize : '16px'"
|
14
|
-
:
|
17
|
+
:text="infoTextMessage"
|
15
18
|
/>
|
16
|
-
</
|
19
|
+
</LabelWrapper>
|
17
20
|
</template>
|
18
21
|
|
19
22
|
<script>
|
20
|
-
import styled from 'vue3-styled-components'
|
21
|
-
import InfoText from '../infoText'
|
23
|
+
import styled from 'vue3-styled-components'
|
24
|
+
import InfoText from '../infoText'
|
22
25
|
|
23
|
-
const labelAttrs = { fontSize: String, labelFontColor: String }
|
24
|
-
const InputLabel = styled('div', labelAttrs)`
|
26
|
+
const labelAttrs = { fontSize: String, labelFontColor: String }
|
27
|
+
const InputLabel = styled('div', labelAttrs)`
|
25
28
|
color: ${(props) =>
|
26
29
|
props.theme.colors[props.labelFontColor]
|
27
30
|
? props.theme.colors[props.labelFontColor]
|
28
31
|
: props.labelFontColor
|
29
32
|
? props.labelFontColor
|
30
|
-
|
33
|
+
: props.theme.colors.eturnityGrey};
|
31
34
|
|
32
35
|
font-size: ${(props) => (props.fontSize ? props.fontSize : '13px')};
|
33
36
|
font-weight: 700;
|
34
37
|
`
|
35
|
-
const
|
38
|
+
const OptionalLabel = styled.span`
|
36
39
|
font-weight: 300;
|
37
40
|
`
|
38
41
|
|
39
|
-
const LabelWrapper = styled('div', { labelAlign: String })`
|
42
|
+
const LabelWrapper = styled('div', { labelAlign: String })`
|
40
43
|
${(props) =>
|
41
44
|
props.labelAlign == 'horizontal'
|
42
45
|
? 'display: inline-grid;'
|
43
|
-
|
46
|
+
: 'display: grid;'}
|
44
47
|
${(props) =>
|
45
48
|
props.labelAlign == 'horizontal'
|
46
49
|
? 'margin-right: 10px;'
|
47
|
-
|
50
|
+
: 'margin-bottom: 8px;'}
|
48
51
|
vertical-align: center;
|
49
52
|
grid-template-columns: auto auto;
|
50
53
|
grid-gap: 12px;
|
51
54
|
align-items: center;
|
52
55
|
justify-content: start;
|
53
56
|
`
|
54
|
-
export default {
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
},
|
69
|
-
data() {
|
70
|
-
return {
|
71
|
-
inputTypeData: 'text'
|
72
|
-
}
|
73
|
-
},
|
74
|
-
props: {
|
75
|
-
infoTextMessage: {
|
76
|
-
required: false
|
77
|
-
},
|
78
|
-
infoTextAlign: {
|
79
|
-
required: false
|
80
|
-
},
|
81
|
-
labelOptional: {
|
82
|
-
required: false,
|
83
|
-
default: false
|
84
|
-
},
|
85
|
-
fontSize: {
|
86
|
-
required: false,
|
87
|
-
default: null
|
57
|
+
export default {
|
58
|
+
// import labelText from "@eturnity/eturnity_reusable_components/src/components/label"
|
59
|
+
// To use:
|
60
|
+
// <label-text
|
61
|
+
// infoTextAlign="right" // left by default
|
62
|
+
// infoTextMessage="My info message"
|
63
|
+
// label="Question 5"
|
64
|
+
// />
|
65
|
+
name: 'InputText',
|
66
|
+
components: {
|
67
|
+
InfoText,
|
68
|
+
InputLabel,
|
69
|
+
LabelWrapper,
|
70
|
+
OptionalLabel
|
88
71
|
},
|
89
|
-
|
90
|
-
|
91
|
-
|
72
|
+
props: {
|
73
|
+
infoTextMessage: {
|
74
|
+
required: false
|
75
|
+
},
|
76
|
+
infoTextAlign: {
|
77
|
+
required: false
|
78
|
+
},
|
79
|
+
labelOptional: {
|
80
|
+
required: false,
|
81
|
+
default: false
|
82
|
+
},
|
83
|
+
fontSize: {
|
84
|
+
required: false,
|
85
|
+
default: null
|
86
|
+
},
|
87
|
+
labelFontColor: {
|
88
|
+
required: false,
|
89
|
+
default: 'black'
|
90
|
+
},
|
91
|
+
labelAlign: {
|
92
|
+
required: false,
|
93
|
+
default: 'vertical'
|
94
|
+
}
|
92
95
|
},
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
+
data() {
|
97
|
+
return {
|
98
|
+
inputTypeData: 'text'
|
99
|
+
}
|
96
100
|
}
|
97
101
|
}
|
98
|
-
}
|
99
102
|
</script>
|
@@ -1,20 +1,20 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
:
|
5
|
-
:hasIcon="!!iconName"
|
2
|
+
<PageContainer>
|
3
|
+
<MarkerContainer
|
4
|
+
:background-color="backgroundColor"
|
6
5
|
:cursor="cursor"
|
6
|
+
:has-icon="!!iconName"
|
7
7
|
>
|
8
|
-
<
|
8
|
+
<Icon
|
9
9
|
v-if="!!iconName"
|
10
|
-
:name="iconName"
|
11
10
|
color="white"
|
12
|
-
size="10px"
|
13
11
|
:cursor="cursor"
|
12
|
+
:name="iconName"
|
13
|
+
size="10px"
|
14
14
|
/>
|
15
15
|
<span>{{ label }}</span>
|
16
|
-
</
|
17
|
-
</
|
16
|
+
</MarkerContainer>
|
17
|
+
</PageContainer>
|
18
18
|
</template>
|
19
19
|
|
20
20
|
<script>
|
@@ -27,22 +27,22 @@
|
|
27
27
|
// cursor="pointer"
|
28
28
|
// />
|
29
29
|
|
30
|
-
import styled from 'vue3-styled-components'
|
31
|
-
import Icon from '../icon'
|
30
|
+
import styled from 'vue3-styled-components'
|
31
|
+
import Icon from '../icon'
|
32
32
|
|
33
|
-
const PageContainer = styled.div`
|
33
|
+
const PageContainer = styled.div`
|
34
34
|
display: flex;
|
35
35
|
align-items: center;
|
36
36
|
font-size: 12px;
|
37
37
|
line-height: 14px;
|
38
38
|
`
|
39
39
|
|
40
|
-
const MarkerAttrs = {
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
}
|
45
|
-
const MarkerContainer = styled('div', MarkerAttrs)`
|
40
|
+
const MarkerAttrs = {
|
41
|
+
backgroundColor: String,
|
42
|
+
hasIcon: Boolean,
|
43
|
+
cursor: String
|
44
|
+
}
|
45
|
+
const MarkerContainer = styled('div', MarkerAttrs)`
|
46
46
|
display: grid;
|
47
47
|
grid-template-columns: ${(props) => (props.hasIcon ? 'auto 1fr' : '1fr')};
|
48
48
|
grid-gap: 5px;
|
@@ -51,36 +51,36 @@ const MarkerContainer = styled('div', MarkerAttrs)`
|
|
51
51
|
padding: 2px 7px;
|
52
52
|
color: ${(props) => props.theme.colors.white};
|
53
53
|
background-color: ${(props) =>
|
54
|
-
|
54
|
+
props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
|
55
55
|
border: 1px solid
|
56
56
|
${(props) =>
|
57
|
-
|
57
|
+
props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
|
58
58
|
border-radius: 4px;
|
59
59
|
white-space: nowrap;
|
60
60
|
cursor: ${(props) => (props.isEditionAllowed ? 'pointer' : props.cursor)};
|
61
61
|
`
|
62
62
|
|
63
|
-
export default {
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
},
|
70
|
-
props: {
|
71
|
-
backgroundColor: {
|
72
|
-
required: false
|
73
|
-
},
|
74
|
-
iconName: {
|
75
|
-
required: false
|
76
|
-
},
|
77
|
-
label: {
|
78
|
-
required: true
|
63
|
+
export default {
|
64
|
+
name: 'ProjectMarker',
|
65
|
+
components: {
|
66
|
+
PageContainer,
|
67
|
+
MarkerContainer,
|
68
|
+
Icon
|
79
69
|
},
|
80
|
-
|
81
|
-
|
82
|
-
|
70
|
+
props: {
|
71
|
+
backgroundColor: {
|
72
|
+
required: false
|
73
|
+
},
|
74
|
+
iconName: {
|
75
|
+
required: false
|
76
|
+
},
|
77
|
+
label: {
|
78
|
+
required: true
|
79
|
+
},
|
80
|
+
cursor: {
|
81
|
+
required: false,
|
82
|
+
default: 'default'
|
83
|
+
}
|
83
84
|
}
|
84
85
|
}
|
85
|
-
}
|
86
86
|
</script>
|