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