@eturnity/eturnity_reusable_components 1.2.24-EPDM-5477 → 1.2.25
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 +3 -0
- package/src/assets/theme.js +1 -1
- package/src/components/buttons/externalButton/index.vue +101 -0
- package/src/components/tables/mainTable/index.vue +31 -22
- package/src/assets/svgIcons/dislike.svg +0 -3
- package/src/assets/svgIcons/external_icon.svg +0 -5
- package/src/assets/svgIcons/like.svg +0 -3
- package/src/components/buttons/buttonIcon/index.vue +0 -143
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -75,6 +75,7 @@
|
|
|
75
75
|
size="small"
|
|
76
76
|
:isDisabled="false"
|
|
77
77
|
/> -->
|
|
78
|
+
<!-- <external-button text="Click me!" minWidth="500px" /> -->
|
|
78
79
|
</page-container>
|
|
79
80
|
</ThemeProvider>
|
|
80
81
|
</template>
|
|
@@ -90,6 +91,7 @@ import InputText from '@/components/inputs/inputText'
|
|
|
90
91
|
// import Checkbox from '@/components/inputs/checkbox'
|
|
91
92
|
// import PageSubtitle from '@/components/pageSubtitle'
|
|
92
93
|
// import Spinner from '@/components/spinner'
|
|
94
|
+
// import ExternalButton from '@/components/buttons/externalButton'
|
|
93
95
|
// import ProjectMarker from '@/components/projectMarker'
|
|
94
96
|
import iconCollection from '@/components/icon/iconCollection'
|
|
95
97
|
// import Modal from '@/components/modals/modal'
|
|
@@ -117,6 +119,7 @@ export default {
|
|
|
117
119
|
// PageSubtitle,
|
|
118
120
|
// Spinner,
|
|
119
121
|
// Checkbox,
|
|
122
|
+
// ExternalButton,
|
|
120
123
|
// Modal,
|
|
121
124
|
// ProjectMarker,
|
|
122
125
|
iconCollection
|
package/src/assets/theme.js
CHANGED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<page-container>
|
|
3
|
+
<button-wrapper
|
|
4
|
+
:isDisabled="isDisabled"
|
|
5
|
+
:minWidth="minWidth"
|
|
6
|
+
:customColor="customColor"
|
|
7
|
+
>
|
|
8
|
+
<icon-container>
|
|
9
|
+
<icon-element
|
|
10
|
+
:src="require('../../../assets/icons/external_icon.svg')"
|
|
11
|
+
/>
|
|
12
|
+
</icon-container>
|
|
13
|
+
<button-container>{{ text }}</button-container>
|
|
14
|
+
</button-wrapper>
|
|
15
|
+
</page-container>
|
|
16
|
+
</template>
|
|
17
|
+
|
|
18
|
+
<script>
|
|
19
|
+
// import ExternalButton from "@eturnity/eturnity_reusable_components/src/components/buttons/externalButton"
|
|
20
|
+
// <main-button
|
|
21
|
+
// :isDisabled="true"
|
|
22
|
+
// text="Click Me"
|
|
23
|
+
// minWidth="300px"
|
|
24
|
+
// customColor="#000"
|
|
25
|
+
// />
|
|
26
|
+
|
|
27
|
+
import styled from "vue-styled-components"
|
|
28
|
+
|
|
29
|
+
const PageContainer = styled.div``
|
|
30
|
+
|
|
31
|
+
const ButtonAttrs = {
|
|
32
|
+
isDisabled: Boolean,
|
|
33
|
+
minWidth: String,
|
|
34
|
+
customColor: String,
|
|
35
|
+
}
|
|
36
|
+
const ButtonWrapper = styled("div", ButtonAttrs)`
|
|
37
|
+
display: grid;
|
|
38
|
+
grid-template-columns: auto 1fr;
|
|
39
|
+
background-color: ${(props) =>
|
|
40
|
+
props.isDisabled
|
|
41
|
+
? props.theme.colors.disabled
|
|
42
|
+
: props.customColor
|
|
43
|
+
? props.customColor
|
|
44
|
+
: props.theme.colors.yellow};
|
|
45
|
+
cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
|
|
46
|
+
user-select: none;
|
|
47
|
+
border-radius: 4px;
|
|
48
|
+
min-width: ${(props) => (props.minWidth ? props.minWidth : "initial")};
|
|
49
|
+
|
|
50
|
+
&:hover {
|
|
51
|
+
opacity: ${(props) => (props.isDisabled ? "1" : "0.8")};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:active {
|
|
55
|
+
opacity: 1;
|
|
56
|
+
}
|
|
57
|
+
`
|
|
58
|
+
|
|
59
|
+
const ButtonContainer = styled.div`
|
|
60
|
+
padding: 7px 15px;
|
|
61
|
+
font-size: 13px;
|
|
62
|
+
color: ${(props) => props.theme.colors.white};
|
|
63
|
+
text-align: center;
|
|
64
|
+
`
|
|
65
|
+
|
|
66
|
+
const IconContainer = styled.div`
|
|
67
|
+
display: grid;
|
|
68
|
+
align-items: center;
|
|
69
|
+
justify-items: center;
|
|
70
|
+
`
|
|
71
|
+
|
|
72
|
+
const IconElement = styled.img``
|
|
73
|
+
|
|
74
|
+
export default {
|
|
75
|
+
name: "external-button",
|
|
76
|
+
components: {
|
|
77
|
+
PageContainer,
|
|
78
|
+
ButtonContainer,
|
|
79
|
+
ButtonWrapper,
|
|
80
|
+
IconContainer,
|
|
81
|
+
IconElement,
|
|
82
|
+
},
|
|
83
|
+
props: {
|
|
84
|
+
isDisabled: {
|
|
85
|
+
required: false,
|
|
86
|
+
default: false,
|
|
87
|
+
},
|
|
88
|
+
text: {
|
|
89
|
+
required: true,
|
|
90
|
+
},
|
|
91
|
+
minWidth: {
|
|
92
|
+
required: false,
|
|
93
|
+
default: null,
|
|
94
|
+
},
|
|
95
|
+
customColor: {
|
|
96
|
+
required: false,
|
|
97
|
+
default: null,
|
|
98
|
+
},
|
|
99
|
+
},
|
|
100
|
+
}
|
|
101
|
+
</script>
|
|
@@ -8,7 +8,11 @@
|
|
|
8
8
|
<spinner-wrapper v-if="isLoading">
|
|
9
9
|
<spinner />
|
|
10
10
|
</spinner-wrapper>
|
|
11
|
-
<table-container
|
|
11
|
+
<table-container
|
|
12
|
+
v-else
|
|
13
|
+
:cellPaddings="cellPaddings"
|
|
14
|
+
:tableCursor="tableCursor"
|
|
15
|
+
>
|
|
12
16
|
<slot />
|
|
13
17
|
</table-container>
|
|
14
18
|
</table-wrapper>
|
|
@@ -19,8 +23,8 @@
|
|
|
19
23
|
<script>
|
|
20
24
|
// ToDo: add this to storybook
|
|
21
25
|
// import MainTable from "@eturnity/eturnity_reusable_components/src/components/tables/mainTable"
|
|
22
|
-
import styled from
|
|
23
|
-
import Spinner from
|
|
26
|
+
import styled from 'vue-styled-components'
|
|
27
|
+
import Spinner from '../../spinner'
|
|
24
28
|
|
|
25
29
|
const PageContainer = styled.div``
|
|
26
30
|
|
|
@@ -36,8 +40,8 @@ const TableScroll = styled.div`
|
|
|
36
40
|
`
|
|
37
41
|
|
|
38
42
|
const wrapperAttrs = { fullWidth: Boolean }
|
|
39
|
-
const TableWrapper = styled(
|
|
40
|
-
width: ${(props) => (props.fullWidth ?
|
|
43
|
+
const TableWrapper = styled('div', wrapperAttrs)`
|
|
44
|
+
width: ${(props) => (props.fullWidth ? '100%' : 'fit-content')};
|
|
41
45
|
max-width: 100%;
|
|
42
46
|
overflow: auto;
|
|
43
47
|
|
|
@@ -63,8 +67,8 @@ const SpinnerWrapper = styled.div`
|
|
|
63
67
|
justify-items: center;
|
|
64
68
|
`
|
|
65
69
|
|
|
66
|
-
const containerAttrs = { cellPaddings: String }
|
|
67
|
-
const TableContainer = styled(
|
|
70
|
+
const containerAttrs = { cellPaddings: String, tableCursor: String }
|
|
71
|
+
const TableContainer = styled('table', containerAttrs)`
|
|
68
72
|
width: 100%;
|
|
69
73
|
border-collapse: collapse;
|
|
70
74
|
border: none;
|
|
@@ -82,7 +86,7 @@ const TableContainer = styled("table", containerAttrs)`
|
|
|
82
86
|
tr {
|
|
83
87
|
&:hover {
|
|
84
88
|
background-color: ${(props) => props.theme.colors.white};
|
|
85
|
-
cursor:
|
|
89
|
+
cursor: ${(props) => (props.tableCursor ? props.tableCursor : 'auto')};
|
|
86
90
|
|
|
87
91
|
.arrow-container,
|
|
88
92
|
.input-placeholder,
|
|
@@ -115,7 +119,8 @@ const TableContainer = styled("table", containerAttrs)`
|
|
|
115
119
|
}
|
|
116
120
|
|
|
117
121
|
td {
|
|
118
|
-
padding: ${(props) =>
|
|
122
|
+
padding: ${(props) =>
|
|
123
|
+
props.cellPaddings ? props.cellPaddings : '6px 6px 7px 4px'};
|
|
119
124
|
border-bottom: 1px solid ${(props) => props.theme.colors.grey4};
|
|
120
125
|
|
|
121
126
|
&.empty {
|
|
@@ -207,7 +212,7 @@ const TableContainer = styled("table", containerAttrs)`
|
|
|
207
212
|
.text {
|
|
208
213
|
padding: 10px 15px 10px 15px;
|
|
209
214
|
color: ${(props) => props.theme.colors.black};
|
|
210
|
-
cursor:
|
|
215
|
+
cursor: ${(props) => (props.tableCursor ? props.tableCursor : 'auto')};
|
|
211
216
|
}
|
|
212
217
|
|
|
213
218
|
.bold {
|
|
@@ -245,7 +250,7 @@ const TableContainer = styled("table", containerAttrs)`
|
|
|
245
250
|
|
|
246
251
|
&:hover {
|
|
247
252
|
input:disabled {
|
|
248
|
-
background-color: ${(props) => props.theme.colors.grey5 +
|
|
253
|
+
background-color: ${(props) => props.theme.colors.grey5 + '!important'};
|
|
249
254
|
}
|
|
250
255
|
|
|
251
256
|
.drag-icon {
|
|
@@ -284,7 +289,7 @@ const TableContainer = styled("table", containerAttrs)`
|
|
|
284
289
|
cursor: grab;
|
|
285
290
|
background-position: center;
|
|
286
291
|
background-image: ${() =>
|
|
287
|
-
`url(${require(
|
|
292
|
+
`url(${require('../../../assets/icons/drag_icon.svg')})`};
|
|
288
293
|
|
|
289
294
|
&:active {
|
|
290
295
|
cursor: grabbing;
|
|
@@ -297,7 +302,7 @@ const TableContainer = styled("table", containerAttrs)`
|
|
|
297
302
|
background: no-repeat;
|
|
298
303
|
margin-left: 10px;
|
|
299
304
|
background-image: ${() =>
|
|
300
|
-
`url(${require(
|
|
305
|
+
`url(${require('../../../assets/icons/subposition_icon.svg')})`};
|
|
301
306
|
}
|
|
302
307
|
|
|
303
308
|
.arrow-down {
|
|
@@ -306,7 +311,7 @@ const TableContainer = styled("table", containerAttrs)`
|
|
|
306
311
|
background: no-repeat;
|
|
307
312
|
background-position: center;
|
|
308
313
|
background-image: ${() =>
|
|
309
|
-
`url(${require(
|
|
314
|
+
`url(${require('../../../assets/icons/arrow_down.svg')})`};
|
|
310
315
|
}
|
|
311
316
|
|
|
312
317
|
.arrow-up {
|
|
@@ -315,7 +320,7 @@ const TableContainer = styled("table", containerAttrs)`
|
|
|
315
320
|
background: no-repeat;
|
|
316
321
|
background-position: center;
|
|
317
322
|
background-image: ${() =>
|
|
318
|
-
`url(${require(
|
|
323
|
+
`url(${require('../../../assets/icons/arrow_up_red.svg')})`};
|
|
319
324
|
}
|
|
320
325
|
}
|
|
321
326
|
|
|
@@ -338,7 +343,7 @@ const TableContainer = styled("table", containerAttrs)`
|
|
|
338
343
|
`
|
|
339
344
|
|
|
340
345
|
export default {
|
|
341
|
-
name:
|
|
346
|
+
name: 'main-table',
|
|
342
347
|
components: {
|
|
343
348
|
TableScroll,
|
|
344
349
|
TableWrapper,
|
|
@@ -346,25 +351,29 @@ export default {
|
|
|
346
351
|
Spinner,
|
|
347
352
|
TableContainer,
|
|
348
353
|
PageContainer,
|
|
349
|
-
TableTitle
|
|
354
|
+
TableTitle
|
|
350
355
|
},
|
|
351
356
|
props: {
|
|
352
357
|
fullWidth: {
|
|
353
358
|
required: false,
|
|
354
|
-
default: true
|
|
359
|
+
default: true
|
|
355
360
|
},
|
|
356
361
|
cellPaddings: {
|
|
357
362
|
required: false,
|
|
358
|
-
default: ''
|
|
363
|
+
default: ''
|
|
359
364
|
},
|
|
360
365
|
isLoading: {
|
|
361
366
|
required: false,
|
|
362
|
-
default: false
|
|
367
|
+
default: false
|
|
363
368
|
},
|
|
364
369
|
titleText: {
|
|
365
370
|
required: false,
|
|
366
|
-
default: null
|
|
371
|
+
default: null
|
|
367
372
|
},
|
|
368
|
-
|
|
373
|
+
tableCursor: {
|
|
374
|
+
required: false,
|
|
375
|
+
default: 'auto'
|
|
376
|
+
}
|
|
377
|
+
}
|
|
369
378
|
}
|
|
370
379
|
</script>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M6.40533 12.7951L9.87682 9.32359C10.1087 9.09174 10.2403 8.77216 10.2403 8.44005V2.18009C10.2403 1.4908 9.6763 0.92684 8.98702 0.92684H3.34741C2.84611 0.92684 2.39494 1.22762 2.19442 1.68505L0.151629 6.45366C-0.374734 7.69437 0.53387 9.07294 1.88111 9.07294H5.42153L4.82624 11.9429C4.76358 12.2562 4.85757 12.5758 5.08315 12.8013C5.45286 13.1648 6.04189 13.1648 6.40533 12.7951ZM12.7468 0.92684C12.0575 0.92684 11.4935 1.4908 11.4935 2.18009V7.19307C11.4935 7.88236 12.0575 8.44632 12.7468 8.44632C13.436 8.44632 14 7.88236 14 7.19307V2.18009C14 1.4908 13.436 0.92684 12.7468 0.92684Z"/>
|
|
3
|
-
</svg>
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
|
|
2
|
-
<path d="m12.6 14h-11.4c-0.7 0-1.3-0.6-1.3-1.3v-11.4c0-0.7 0.6-1.3 1.3-1.3h4.8v2h-3.1c-0.5 0-1 0.4-1 0.9v8.3c0 0.4 0.5 0.8 1 0.8h8.3c0.4 0 0.9-0.4 0.9-0.9v-3.1h2v4.7c-0.2 0.7-0.7 1.3-1.5 1.3z"/>
|
|
3
|
-
<path d="m7.9 0h6v6z"/>
|
|
4
|
-
<path d="m5.7 9.8l-1.4-1.5 7.1-7.1 1.4 1.4z"/>
|
|
5
|
-
</svg>
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
<svg viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
-
<path d="M7.59467 1.20492L4.12318 4.67641C3.89133 4.90826 3.75974 5.22784 3.75974 5.55995V11.8199C3.75974 12.5092 4.3237 13.0732 5.01298 13.0732H10.6526C11.1539 13.0732 11.6051 12.7724 11.8056 12.3149L13.8484 7.54634C14.3747 6.30563 13.4661 4.92706 12.1189 4.92706H8.57847L9.17376 2.05713C9.23642 1.74381 9.14243 1.42424 8.91685 1.19865C8.54714 0.835211 7.95811 0.835211 7.59467 1.20492V1.20492ZM1.25325 13.0732C1.94253 13.0732 2.50649 12.5092 2.50649 11.8199V6.80693C2.50649 6.11764 1.94253 5.55368 1.25325 5.55368C0.563961 5.55368 0 6.11764 0 6.80693V11.8199C0 12.5092 0.563961 13.0732 1.25325 13.0732Z"/>
|
|
3
|
-
</svg>
|
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<page-container>
|
|
3
|
-
<button-wrapper
|
|
4
|
-
:isDisabled="isDisabled"
|
|
5
|
-
:minWidth="minWidth"
|
|
6
|
-
:customColor="customColor"
|
|
7
|
-
:height="height"
|
|
8
|
-
>
|
|
9
|
-
<icon-container :width="height">
|
|
10
|
-
<icon
|
|
11
|
-
v-if="!!iconName"
|
|
12
|
-
:name="iconName"
|
|
13
|
-
:color="fontColor ? fontColor : theme.colors.white"
|
|
14
|
-
size="14px"
|
|
15
|
-
/>
|
|
16
|
-
</icon-container>
|
|
17
|
-
<button-container :fontSize="fontSize" :fontColor="fontColor">{{ text }}</button-container>
|
|
18
|
-
</button-wrapper>
|
|
19
|
-
</page-container>
|
|
20
|
-
</template>
|
|
21
|
-
|
|
22
|
-
<script>
|
|
23
|
-
// import buttonIcon from "@eturnity/eturnity_reusable_components/src/components/buttons/buttonIcon"
|
|
24
|
-
// <button-icon
|
|
25
|
-
// :isDisabled="true"
|
|
26
|
-
// text="Click Me"
|
|
27
|
-
// minWidth="300px"
|
|
28
|
-
// customColor="#000"
|
|
29
|
-
// iconName="external_icon"
|
|
30
|
-
// fontColor="white"
|
|
31
|
-
// fontSize="12px"
|
|
32
|
-
// height="24px"
|
|
33
|
-
// />
|
|
34
|
-
|
|
35
|
-
import Icon from "../../icon"
|
|
36
|
-
import styled from "vue-styled-components"
|
|
37
|
-
import Theme from "@/assets/theme";
|
|
38
|
-
|
|
39
|
-
const PageContainer = styled.div``
|
|
40
|
-
|
|
41
|
-
const ButtonAttrs = {
|
|
42
|
-
isDisabled: Boolean,
|
|
43
|
-
minWidth: String,
|
|
44
|
-
customColor: String,
|
|
45
|
-
height: String
|
|
46
|
-
}
|
|
47
|
-
const ButtonWrapper = styled("div", ButtonAttrs)`
|
|
48
|
-
display: grid;
|
|
49
|
-
grid-template-columns: auto 1fr;
|
|
50
|
-
background-color: ${(props) =>
|
|
51
|
-
props.isDisabled
|
|
52
|
-
? props.theme.colors.disabled
|
|
53
|
-
: props.customColor
|
|
54
|
-
? props.customColor
|
|
55
|
-
: props.theme.colors.yellow};
|
|
56
|
-
cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
|
|
57
|
-
user-select: none;
|
|
58
|
-
border-radius: 4px;
|
|
59
|
-
overflow: hidden;
|
|
60
|
-
min-width: ${(props) => (props.minWidth ? props.minWidth : "initial")};
|
|
61
|
-
height: ${(props) => props.height};
|
|
62
|
-
|
|
63
|
-
&:hover {
|
|
64
|
-
opacity: ${(props) => (props.isDisabled ? "1" : "0.8")};
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
&:active {
|
|
68
|
-
opacity: 1;
|
|
69
|
-
}
|
|
70
|
-
`
|
|
71
|
-
|
|
72
|
-
const ButtonContainerAttrs = {
|
|
73
|
-
fontSize: String,
|
|
74
|
-
fontColor: String
|
|
75
|
-
}
|
|
76
|
-
const ButtonContainer = styled('div', ButtonContainerAttrs)`
|
|
77
|
-
font-size: ${(props) => props.fontSize};
|
|
78
|
-
color: ${(props) => props.fontColor ? props.fontColor : props.theme.colors.white};
|
|
79
|
-
display: flex;
|
|
80
|
-
align-items: center;
|
|
81
|
-
justify-content: center;
|
|
82
|
-
padding: 0 15px;
|
|
83
|
-
`
|
|
84
|
-
|
|
85
|
-
const IconContainerAttrs = {
|
|
86
|
-
width: String
|
|
87
|
-
}
|
|
88
|
-
const IconContainer = styled('div', IconContainerAttrs)`
|
|
89
|
-
display: grid;
|
|
90
|
-
align-items: center;
|
|
91
|
-
justify-items: center;
|
|
92
|
-
width: ${(props) => props.width};
|
|
93
|
-
background: ${(props) => props.theme.colors.white + '1a'};
|
|
94
|
-
`
|
|
95
|
-
|
|
96
|
-
export default {
|
|
97
|
-
name: "button-icon",
|
|
98
|
-
components: {
|
|
99
|
-
PageContainer,
|
|
100
|
-
ButtonContainer,
|
|
101
|
-
ButtonWrapper,
|
|
102
|
-
IconContainer,
|
|
103
|
-
Icon
|
|
104
|
-
},
|
|
105
|
-
props: {
|
|
106
|
-
isDisabled: {
|
|
107
|
-
required: false,
|
|
108
|
-
default: false
|
|
109
|
-
},
|
|
110
|
-
text: {
|
|
111
|
-
required: true
|
|
112
|
-
},
|
|
113
|
-
minWidth: {
|
|
114
|
-
required: false,
|
|
115
|
-
default: null
|
|
116
|
-
},
|
|
117
|
-
customColor: {
|
|
118
|
-
required: false,
|
|
119
|
-
default: null
|
|
120
|
-
},
|
|
121
|
-
iconName: {
|
|
122
|
-
required: true
|
|
123
|
-
},
|
|
124
|
-
fontColor: {
|
|
125
|
-
required: false,
|
|
126
|
-
default: null
|
|
127
|
-
},
|
|
128
|
-
fontSize: {
|
|
129
|
-
required: false,
|
|
130
|
-
default: '13px'
|
|
131
|
-
},
|
|
132
|
-
height: {
|
|
133
|
-
required: false,
|
|
134
|
-
default: '30px'
|
|
135
|
-
}
|
|
136
|
-
},
|
|
137
|
-
data () {
|
|
138
|
-
return {
|
|
139
|
-
theme: Theme
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
</script>
|