@eturnity/eturnity_reusable_components 7.18.0--EPDM-9013.1 → 7.18.0--EPDM-10564.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/package.json +1 -1
- package/src/components/infoText/index.vue +1 -1
- package/src/components/inputs/select/index.vue +59 -17
- package/src/components/inputs/select/option/index.vue +8 -2
- package/src/components/markerItem/index.vue +86 -0
- package/src/components/pageTitle/index.vue +13 -18
- package/src/assets/svgIcons/bexio.svg +0 -4
- package/src/assets/svgIcons/data_transfer.svg +0 -3
package/package.json
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
<template>
|
2
2
|
<Container
|
3
3
|
:selectWidth="selectWidth"
|
4
|
+
:noRelative="noRelative"
|
4
5
|
@mouseenter="mouseEnterHandler"
|
5
6
|
@mouseleave="mouseLeaveHandler"
|
6
7
|
>
|
7
8
|
<input-wrapper
|
8
9
|
:hasLabel="!!label && label.length > 0"
|
9
10
|
:alignItems="alignItems"
|
11
|
+
:noRelative="noRelative"
|
10
12
|
>
|
11
13
|
<label-wrapper v-if="label" :data-id="labelDataId">
|
12
14
|
<input-label
|
@@ -45,6 +47,9 @@
|
|
45
47
|
:showBorder="showBorder"
|
46
48
|
:data-id="dataId"
|
47
49
|
:paddingLeft="paddingLeft"
|
50
|
+
:tablePaddingLeft="tablePaddingLeft"
|
51
|
+
:noRelative="noRelative"
|
52
|
+
:showDisabledBackground="showDisabledBackground"
|
48
53
|
>
|
49
54
|
<draggableInputHandle
|
50
55
|
v-if="isDraggable && !isSearchBarVisible"
|
@@ -74,7 +79,7 @@
|
|
74
79
|
>
|
75
80
|
<slot name="selector" :selectedValue="selectedValue"></slot>
|
76
81
|
</selector>
|
77
|
-
<Caret @click.stop="toggleCaretDropdown">
|
82
|
+
<Caret @click.stop="toggleCaretDropdown" class="caret_dropdown">
|
78
83
|
<icon
|
79
84
|
v-if="isDropdownOpen"
|
80
85
|
name="arrow_up"
|
@@ -97,7 +102,7 @@
|
|
97
102
|
/>
|
98
103
|
</Caret>
|
99
104
|
</selectButton>
|
100
|
-
<DropdownWrapper>
|
105
|
+
<DropdownWrapper :noRelative="noRelative">
|
101
106
|
<selectDropdown
|
102
107
|
ref="dropdown"
|
103
108
|
v-show="isDropdownOpen"
|
@@ -110,7 +115,9 @@
|
|
110
115
|
:fontColor="
|
111
116
|
dropdownFontColor || colorMode == 'dark' ? 'white' : 'black'
|
112
117
|
"
|
118
|
+
:noRelative="noRelative"
|
113
119
|
:selectedValue="selectedValue"
|
120
|
+
:minWidth="minWidth"
|
114
121
|
@option-selected="optionSelected"
|
115
122
|
@option-hovered="optionHovered"
|
116
123
|
@mouseleave="optionLeave"
|
@@ -172,7 +179,10 @@ const selectorProps = {
|
|
172
179
|
showBorder: Boolean
|
173
180
|
}
|
174
181
|
const Selector = styled('div', selectorProps)`
|
175
|
-
${(props) =>
|
182
|
+
${(props) =>
|
183
|
+
props.selectWidth === '100%'
|
184
|
+
? 'width: 100%;'
|
185
|
+
: `width: calc(${props.selectWidth} -
|
176
186
|
(
|
177
187
|
${CARET_WIDTH} +
|
178
188
|
${props.paddingLeft}
|
@@ -181,8 +191,7 @@ const Selector = styled('div', selectorProps)`
|
|
181
191
|
);
|
182
192
|
white-space: nowrap;
|
183
193
|
text-overflow: ellipsis;
|
184
|
-
overflow: hidden;`
|
185
|
-
}
|
194
|
+
overflow: hidden;`}
|
186
195
|
`
|
187
196
|
|
188
197
|
const labelAttrs = { fontSize: String, fontColor: String }
|
@@ -197,10 +206,14 @@ const InputLabel = styled('div', labelAttrs)`
|
|
197
206
|
const optionalLabel = styled.span`
|
198
207
|
font-weight: 300;
|
199
208
|
`
|
200
|
-
const inputProps = {
|
209
|
+
const inputProps = {
|
210
|
+
selectWidth: String,
|
211
|
+
optionWidth: String,
|
212
|
+
noRelative: Boolean
|
213
|
+
}
|
201
214
|
const Container = styled('div', inputProps)`
|
202
215
|
width: ${(props) => props.selectWidth};
|
203
|
-
position: relative;
|
216
|
+
position: ${(props) => (props.noRelative ? 'static' : 'relative')};
|
204
217
|
display: inline-block;
|
205
218
|
`
|
206
219
|
const LabelWrapper = styled.div`
|
@@ -228,14 +241,21 @@ const selectButtonAttrs = {
|
|
228
241
|
selectMinHeight: String,
|
229
242
|
isSearchBarVisible: Boolean,
|
230
243
|
showBorder: Boolean,
|
231
|
-
paddingLeft: String
|
244
|
+
paddingLeft: String,
|
245
|
+
noRelative: Boolean,
|
246
|
+
tablePaddingLeft: String,
|
247
|
+
showDisabledBackground: Boolean
|
232
248
|
}
|
233
249
|
const selectButton = styled('div', selectButtonAttrs)`
|
234
|
-
position: relative;
|
250
|
+
position: ${(props) => (props.noRelative ? 'static' : 'relative')};
|
235
251
|
box-sizing: border-box;
|
236
252
|
border-radius: 4px;
|
237
253
|
${(props) =>
|
238
|
-
props.isSearchBarVisible
|
254
|
+
props.isSearchBarVisible
|
255
|
+
? ''
|
256
|
+
: `padding-left: ${
|
257
|
+
props.tablePaddingLeft ? props.tablePaddingLeft : props.paddingLeft
|
258
|
+
}`};
|
239
259
|
text-align: left;
|
240
260
|
min-height: ${(props) =>
|
241
261
|
props.selectHeight
|
@@ -256,7 +276,7 @@ const selectButton = styled('div', selectButtonAttrs)`
|
|
256
276
|
}
|
257
277
|
`}
|
258
278
|
background-color:${(props) =>
|
259
|
-
props.disabled
|
279
|
+
props.disabled && props.showDisabledBackground
|
260
280
|
? props.theme.colors.grey5
|
261
281
|
: props.theme.colors[props.bgColor]
|
262
282
|
? props.theme.colors[props.bgColor]
|
@@ -280,13 +300,15 @@ const selectDropdownAttrs = {
|
|
280
300
|
optionWidth: String,
|
281
301
|
hoveredIndex: Number,
|
282
302
|
hoveredValue: Number | String,
|
283
|
-
selectedValue: Number | String
|
303
|
+
selectedValue: Number | String,
|
304
|
+
noRelative: Boolean,
|
305
|
+
minWidth: String
|
284
306
|
}
|
285
307
|
const selectDropdown = styled('div', selectDropdownAttrs)`
|
286
308
|
box-sizing: border-box;
|
287
309
|
z-index: ${(props) => (props.isActive ? '2' : '1')};
|
288
310
|
position: absolute;
|
289
|
-
top: 5px;
|
311
|
+
top: ${(props) => (props.noRelative ? 'auto' : '5px')};
|
290
312
|
border: ${BORDER_WIDTH} solid ${(props) => props.theme.colors.grey4};
|
291
313
|
border-radius: 4px;
|
292
314
|
display: flex;
|
@@ -295,6 +317,7 @@ const selectDropdown = styled('div', selectDropdownAttrs)`
|
|
295
317
|
padding: 0px;
|
296
318
|
box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
|
297
319
|
width: ${(props) => (props.optionWidth ? props.optionWidth : '100%')};
|
320
|
+
min-width: ${(props) => (props.minWidth ? props.minWidth : '100%')};
|
298
321
|
background-color: ${(props) =>
|
299
322
|
props.theme.colors[props.bgColor]
|
300
323
|
? props.theme.colors[props.bgColor]
|
@@ -312,12 +335,17 @@ const selectDropdown = styled('div', selectDropdownAttrs)`
|
|
312
335
|
: props.hoveredBgColor};
|
313
336
|
}
|
314
337
|
`
|
315
|
-
const
|
316
|
-
|
338
|
+
const DropdownAttrs = { noRelative: Boolean }
|
339
|
+
const DropdownWrapper = styled('div', DropdownAttrs)`
|
340
|
+
position: ${(props) => (props.noRelative ? 'static' : 'relative')};
|
317
341
|
`
|
318
|
-
const inputAttrs = {
|
342
|
+
const inputAttrs = {
|
343
|
+
alignItems: String,
|
344
|
+
hasLabel: Boolean,
|
345
|
+
noRelative: Boolean
|
346
|
+
}
|
319
347
|
const InputWrapper = styled('div', inputAttrs)`
|
320
|
-
position: relative;
|
348
|
+
position: ${(props) => (props.noRelative ? 'static' : 'relative')};
|
321
349
|
display: grid;
|
322
350
|
align-items: center;
|
323
351
|
gap: 8px;
|
@@ -336,6 +364,10 @@ export default {
|
|
336
364
|
required: false,
|
337
365
|
default: '13px'
|
338
366
|
},
|
367
|
+
noRelative: {
|
368
|
+
required: false,
|
369
|
+
default: false
|
370
|
+
},
|
339
371
|
label: {
|
340
372
|
required: false
|
341
373
|
},
|
@@ -368,6 +400,9 @@ export default {
|
|
368
400
|
required: false,
|
369
401
|
default: '36px'
|
370
402
|
},
|
403
|
+
minWidth: {
|
404
|
+
required: false
|
405
|
+
},
|
371
406
|
optionWidth: {
|
372
407
|
required: false,
|
373
408
|
default: null
|
@@ -438,6 +473,13 @@ export default {
|
|
438
473
|
isDraggable: {
|
439
474
|
type: Boolean,
|
440
475
|
default: false
|
476
|
+
},
|
477
|
+
tablePaddingLeft: {
|
478
|
+
required: false
|
479
|
+
},
|
480
|
+
showDisabledBackground: {
|
481
|
+
required: false,
|
482
|
+
default: true
|
441
483
|
}
|
442
484
|
},
|
443
485
|
|
@@ -14,6 +14,7 @@
|
|
14
14
|
:isDisabled="isDisabled"
|
15
15
|
:backgroundColor="colorMode == 'dark' ? '#000000' : backgroundColor"
|
16
16
|
:title="hoverText"
|
17
|
+
:minWidth="minWidth"
|
17
18
|
>
|
18
19
|
<slot></slot>
|
19
20
|
</optionContainer>
|
@@ -27,7 +28,8 @@ const optionProps = {
|
|
27
28
|
isDisabled: Boolean,
|
28
29
|
hoveredBgColor: String,
|
29
30
|
cursorType: String,
|
30
|
-
backgroundColor: String
|
31
|
+
backgroundColor: String,
|
32
|
+
minWidth: String
|
31
33
|
}
|
32
34
|
const optionContainer = styled('div', optionProps)`
|
33
35
|
display: flex;
|
@@ -37,7 +39,8 @@ const optionContainer = styled('div', optionProps)`
|
|
37
39
|
align-items: center;
|
38
40
|
padding: 12px 10px;
|
39
41
|
gap: 14px;
|
40
|
-
width:
|
42
|
+
width: max-content;
|
43
|
+
min-width: ${(props) => (props.minWidth ? props.minWidth : '100%')};
|
41
44
|
background-color: ${(props) =>
|
42
45
|
props.theme.colors[props.backgroundColor]
|
43
46
|
? props.theme.colors[props.backgroundColor]
|
@@ -85,6 +88,9 @@ export default {
|
|
85
88
|
isDisabled: {
|
86
89
|
required: false,
|
87
90
|
default: false
|
91
|
+
},
|
92
|
+
minWidth: {
|
93
|
+
required: false
|
88
94
|
}
|
89
95
|
},
|
90
96
|
|
@@ -0,0 +1,86 @@
|
|
1
|
+
<template>
|
2
|
+
<page-container>
|
3
|
+
<marker-container
|
4
|
+
:backgroundColor="backgroundColor"
|
5
|
+
:hasIcon="!!iconName"
|
6
|
+
:cursor="cursor"
|
7
|
+
>
|
8
|
+
<icon
|
9
|
+
v-if="!!iconName"
|
10
|
+
:name="iconName"
|
11
|
+
color="white"
|
12
|
+
size="10px"
|
13
|
+
:cursor="cursor"
|
14
|
+
/>
|
15
|
+
<span>{{ label }}</span>
|
16
|
+
</marker-container>
|
17
|
+
</page-container>
|
18
|
+
</template>
|
19
|
+
|
20
|
+
<script>
|
21
|
+
// import MarkerItem from "@eturnity/eturnity_reusable_components/src/components/markerItem"
|
22
|
+
// To use:
|
23
|
+
// <marker-item
|
24
|
+
// label="Label"
|
25
|
+
// backgroundColor="#ab5348"
|
26
|
+
// iconName="icon_name"
|
27
|
+
// cursor="pointer"
|
28
|
+
// />
|
29
|
+
|
30
|
+
import styled from 'vue-styled-components'
|
31
|
+
import Icon from '../icon'
|
32
|
+
|
33
|
+
const PageContainer = styled.div`
|
34
|
+
display: flex;
|
35
|
+
align-items: center;
|
36
|
+
font-size: 12px;
|
37
|
+
line-height: 14px;
|
38
|
+
`
|
39
|
+
|
40
|
+
const MarkerAttrs = {
|
41
|
+
backgroundColor: String,
|
42
|
+
hasIcon: Boolean,
|
43
|
+
cursor: String
|
44
|
+
}
|
45
|
+
const MarkerContainer = styled('div', MarkerAttrs)`
|
46
|
+
display: grid;
|
47
|
+
grid-template-columns: ${(props) => (props.hasIcon ? 'auto 1fr' : '1fr')};
|
48
|
+
grid-gap: 5px;
|
49
|
+
position: relative;
|
50
|
+
align-items: center;
|
51
|
+
padding: 2px 7px;
|
52
|
+
color: ${(props) => props.theme.colors.white};
|
53
|
+
background-color: ${(props) =>
|
54
|
+
props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
|
55
|
+
border: 1px solid
|
56
|
+
${(props) =>
|
57
|
+
props.backgroundColor ? props.backgroundColor : props.theme.colors.grey3};
|
58
|
+
border-radius: 4px;
|
59
|
+
white-space: nowrap;
|
60
|
+
cursor: ${(props) => (props.isEditionAllowed ? 'pointer' : props.cursor)};
|
61
|
+
`
|
62
|
+
|
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
|
79
|
+
},
|
80
|
+
cursor: {
|
81
|
+
required: false,
|
82
|
+
default: 'default'
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
</script>
|
@@ -3,11 +3,7 @@
|
|
3
3
|
<title-text :color="color" :fontSize="fontSize" :uppercase="uppercase">
|
4
4
|
{{ text }}
|
5
5
|
</title-text>
|
6
|
-
<info-text
|
7
|
-
v-if="!!infoText"
|
8
|
-
:text="infoText"
|
9
|
-
:alignArrow="infoAlign"
|
10
|
-
/>
|
6
|
+
<info-text v-if="!!infoText" :text="infoText" :alignArrow="infoAlign" />
|
11
7
|
</title-wrap>
|
12
8
|
</template>
|
13
9
|
|
@@ -18,16 +14,16 @@
|
|
18
14
|
// text="My Page Title"
|
19
15
|
// color="red"
|
20
16
|
// />
|
21
|
-
import styled from
|
22
|
-
import InfoText from
|
17
|
+
import styled from 'vue-styled-components'
|
18
|
+
import InfoText from '../infoText'
|
23
19
|
|
24
20
|
const wrapAttrs = { hasInfoText: Boolean }
|
25
|
-
const TitleWrap = styled(
|
21
|
+
const TitleWrap = styled('div', wrapAttrs)`
|
26
22
|
display: grid;
|
27
23
|
align-items: center;
|
28
24
|
grid-gap: 12px;
|
29
25
|
grid-template-columns: ${(props) =>
|
30
|
-
props.hasInfoText ?
|
26
|
+
props.hasInfoText ? 'auto auto 1fr' : '1fr'};
|
31
27
|
margin-bottom: 20px;
|
32
28
|
`
|
33
29
|
|
@@ -35,12 +31,12 @@ const titleAttrs = { color: String, fontSize: String, uppercase: Boolean }
|
|
35
31
|
const TitleText = styled('span', titleAttrs)`
|
36
32
|
color: ${(props) => (props.color ? props.color : props.theme.colors.black)};
|
37
33
|
font-weight: bold;
|
38
|
-
font-size: ${(props) => (props.fontSize ? props.fontSize : '
|
34
|
+
font-size: ${(props) => (props.fontSize ? props.fontSize : '18px')};
|
39
35
|
text-transform: ${(props) => (props.uppercase ? 'uppercase' : 'none')};
|
40
36
|
`
|
41
37
|
|
42
38
|
export default {
|
43
|
-
name:
|
39
|
+
name: 'page-title',
|
44
40
|
components: {
|
45
41
|
TitleText,
|
46
42
|
TitleWrap,
|
@@ -48,14 +44,13 @@ export default {
|
|
48
44
|
},
|
49
45
|
props: {
|
50
46
|
text: {
|
51
|
-
required: true
|
47
|
+
required: true
|
52
48
|
},
|
53
49
|
color: {
|
54
|
-
required: false
|
50
|
+
required: false
|
55
51
|
},
|
56
52
|
fontSize: {
|
57
|
-
required: false
|
58
|
-
default: '16px'
|
53
|
+
required: false
|
59
54
|
},
|
60
55
|
uppercase: {
|
61
56
|
required: false,
|
@@ -63,11 +58,11 @@ export default {
|
|
63
58
|
},
|
64
59
|
infoText: {
|
65
60
|
required: false,
|
66
|
-
default: null
|
61
|
+
default: null
|
67
62
|
},
|
68
63
|
infoAlign: {
|
69
|
-
required: false
|
64
|
+
required: false
|
70
65
|
}
|
71
|
-
}
|
66
|
+
}
|
72
67
|
}
|
73
68
|
</script>
|
@@ -1,4 +0,0 @@
|
|
1
|
-
<svg width="15" height="9" viewBox="0 0 15 9" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path d="M14.462 8.46H12.894C12.7848 8.46 12.697 8.4327 12.6307 8.37809C12.5683 8.32349 12.5176 8.26108 12.4786 8.19087L10.5186 4.94378C10.4874 5.04129 10.4504 5.12514 10.4075 5.19535L8.52943 8.19087C8.48263 8.25718 8.42802 8.31958 8.36562 8.37809C8.30711 8.4327 8.2291 8.46 8.13159 8.46H6.66309L9.47138 4.10714L6.77425 0H8.34221C8.45143 0 8.52943 0.0156017 8.57624 0.0468051C8.62694 0.0741079 8.67375 0.120913 8.71665 0.18722L10.6415 3.28805C10.6805 3.19054 10.7273 3.09303 10.7819 2.99552L12.5488 0.216473C12.5917 0.142365 12.6385 0.0877595 12.6892 0.052656C12.7399 0.017552 12.8043 0 12.8823 0H14.3859L11.6654 4.04278L14.462 8.46Z" fill="#263238"/>
|
3
|
-
<path d="M3.16519 7.23137C3.45772 7.23137 3.70344 7.19627 3.90237 7.12606C4.10129 7.05585 4.25925 6.96224 4.37627 6.84523C4.49718 6.72822 4.58299 6.5917 4.63369 6.43569C4.6883 6.27967 4.7156 6.1139 4.7156 5.93838C4.7156 5.75506 4.68635 5.59124 4.62784 5.44693C4.56934 5.29871 4.47768 5.1739 4.35286 5.07249C4.22805 4.96718 4.06618 4.88722 3.86726 4.83261C3.67224 4.77801 3.43627 4.75071 3.15934 4.75071H1.57382V7.23137H3.16519ZM1.57382 1.21693V3.66249H2.82585C3.36411 3.66249 3.76975 3.56498 4.04278 3.36996C4.31971 3.17494 4.45817 2.86486 4.45817 2.43971C4.45817 1.99896 4.33336 1.68498 4.08373 1.49776C3.83411 1.31054 3.44407 1.21693 2.91361 1.21693H1.57382ZM2.91361 0C3.46747 0 3.94137 0.0526557 4.33531 0.157967C4.72925 0.263278 5.05104 0.413444 5.30066 0.608465C5.55419 0.803486 5.73946 1.03946 5.85647 1.31639C5.97349 1.59332 6.03199 1.90535 6.03199 2.25249C6.03199 2.45141 6.00274 2.64253 5.94423 2.82585C5.88573 3.00527 5.79407 3.17494 5.66925 3.33485C5.54834 3.49087 5.39232 3.63324 5.2012 3.76195C5.01398 3.89066 4.78971 3.99988 4.52838 4.08959C5.69071 4.35091 6.27187 4.97888 6.27187 5.97349C6.27187 6.33232 6.20361 6.66386 6.0671 6.96809C5.93058 7.27232 5.73166 7.5356 5.47033 7.75793C5.209 7.97635 4.88722 8.14797 4.50498 8.27278C4.12274 8.39759 3.68589 8.46 3.19444 8.46H0V0H2.91361Z" fill="#263238"/>
|
4
|
-
</svg>
|
@@ -1,3 +0,0 @@
|
|
1
|
-
<svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
2
|
-
<path d="M16 0H2C0.89 0 0 0.9 0 2V16C0 17.1 0.89 18 2 18H6V16H2V2H16V16H12V18H16C17.1 18 18 17.1 18 16V2C18 0.9 17.11 0 16 0ZM9 6L5 10H8V18H10V10H13L9 6Z" fill="#263238"/>
|
3
|
-
</svg>
|