@eturnity/eturnity_reusable_components 6.33.1-EPDM-5205.1 → 6.33.1-EPDM-7956
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/.storybook/preview.js +1 -1
- package/package.json +15 -18
- package/src/App.vue +2 -2
- package/src/components/addNewButton/index.vue +1 -1
- package/src/components/buttons/buttonIcon/index.vue +1 -1
- package/src/components/buttons/closeButton/index.vue +1 -1
- package/src/components/buttons/mainButton/index.vue +1 -1
- package/src/components/deleteIcon/index.vue +1 -1
- package/src/components/dropdown/index.vue +129 -110
- package/src/components/errorMessage/index.vue +1 -1
- package/src/components/icon/iconCollection.vue +2 -2
- package/src/components/icon/index.vue +36 -42
- package/src/components/iconWrapper/index.vue +1 -1
- package/src/components/infoText/index.vue +2 -6
- package/src/components/inputs/checkbox/index.vue +1 -1
- package/src/components/inputs/inputNumber/index.vue +1 -2
- package/src/components/inputs/inputNumberQuestion/index.vue +1 -1
- package/src/components/inputs/inputText/index.vue +3 -3
- package/src/components/inputs/radioButton/index.vue +1 -1
- package/src/components/inputs/searchInput/index.vue +1 -1
- package/src/components/inputs/select/index.vue +22 -28
- package/src/components/inputs/select/option/index.vue +1 -1
- package/src/components/inputs/slider/index.vue +1 -1
- package/src/components/inputs/switchField/index.vue +1 -1
- package/src/components/inputs/textAreaInput/index.vue +1 -1
- package/src/components/inputs/toggle/index.vue +1 -1
- package/src/components/modals/modal/index.vue +1 -1
- package/src/components/pageSubtitle/index.vue +1 -1
- package/src/components/pageTitle/index.vue +1 -1
- package/src/components/pagination/index.vue +12 -12
- package/src/components/progressBar/index.vue +1 -1
- package/src/components/projectMarker/index.vue +1 -1
- package/src/components/spinner/index.vue +1 -1
- package/src/components/tableDropdown/index.vue +22 -13
- package/src/components/tables/mainTable/exampleNested.vue +1 -1
- package/src/components/tables/mainTable/index.vue +7 -70
- package/src/components/tables/viewTable/index.vue +3 -3
- package/src/components/threeDots/index.vue +14 -8
- package/src/components/videoThumbnail/index.vue +95 -100
- package/src/main.js +4 -9
package/.storybook/preview.js
CHANGED
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@eturnity/eturnity_reusable_components",
|
3
|
-
"version": "6.33.1-EPDM-
|
3
|
+
"version": "6.33.1-EPDM-7956",
|
4
4
|
"private": false,
|
5
5
|
"scripts": {
|
6
6
|
"dev": "vue-cli-service serve",
|
@@ -10,27 +10,24 @@
|
|
10
10
|
"build-storybook": "build-storybook"
|
11
11
|
},
|
12
12
|
"dependencies": {
|
13
|
+
"@storybook/vue3": "^7.0.18",
|
14
|
+
"@vue/compat": "^3.3.4",
|
13
15
|
"@vueform/slider": "1.0.5",
|
14
|
-
"
|
16
|
+
"external-svg-loader": "^1.6.7",
|
15
17
|
"html-loader": "0.5.5",
|
16
18
|
"v-click-outside": "2.1.4",
|
17
|
-
"vue": "
|
18
|
-
"
|
19
|
+
"vue": "3.3.4",
|
20
|
+
"vue3-styled-components": "^1.2.1"
|
19
21
|
},
|
20
22
|
"devDependencies": {
|
21
|
-
"@
|
22
|
-
"@
|
23
|
-
"@
|
24
|
-
"@
|
25
|
-
"@
|
26
|
-
"@vue/
|
27
|
-
"
|
28
|
-
"
|
29
|
-
"@vue/composition-api": "1.0.0-rc.10",
|
30
|
-
"babel-eslint": "10.1.0",
|
31
|
-
"eslint": "6.7.2",
|
32
|
-
"eslint-plugin-vue": "6.2.2",
|
33
|
-
"vue-template-compiler": "2.6.11"
|
23
|
+
"@babel/core": "^7.12.16",
|
24
|
+
"@babel/eslint-parser": "^7.12.16",
|
25
|
+
"@vue/cli-plugin-babel": "^5.0.8",
|
26
|
+
"@vue/cli-plugin-eslint": "^5.0.8",
|
27
|
+
"@vue/cli-service": "5.0.8",
|
28
|
+
"@vue/compiler-sfc": "^3.3.4",
|
29
|
+
"eslint": "^7.32.0",
|
30
|
+
"eslint-plugin-vue": "^8.0.3"
|
34
31
|
},
|
35
32
|
"eslintConfig": {
|
36
33
|
"root": true,
|
@@ -42,7 +39,7 @@
|
|
42
39
|
"eslint:recommended"
|
43
40
|
],
|
44
41
|
"parserOptions": {
|
45
|
-
"parser": "babel-
|
42
|
+
"parser": "@babel/eslint-parser"
|
46
43
|
},
|
47
44
|
"rules": {}
|
48
45
|
},
|
package/src/App.vue
CHANGED
@@ -94,9 +94,9 @@
|
|
94
94
|
</template>
|
95
95
|
|
96
96
|
<script>
|
97
|
-
import { ThemeProvider } from '
|
97
|
+
import { ThemeProvider } from 'vue3-styled-components'
|
98
98
|
import theme from './assets/theme'
|
99
|
-
import styled from '
|
99
|
+
import styled from 'vue3-styled-components'
|
100
100
|
import InputNumber from '@/components/inputs/inputNumber'
|
101
101
|
import Select from '@/components/inputs/select'
|
102
102
|
import SwitchField from '@/components/inputs/switchField'
|
@@ -8,7 +8,7 @@
|
|
8
8
|
|
9
9
|
<script>
|
10
10
|
// import AddNewButton from "@eturnity/eturnity_reusable_components/src/components/addNewButton"
|
11
|
-
import styled from "
|
11
|
+
import styled from "vue3-styled-components"
|
12
12
|
|
13
13
|
const pageAttrs = { shouldPosition: Boolean }
|
14
14
|
const PageContainer = styled("div", pageAttrs)`
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<script>
|
20
20
|
// To use:
|
21
21
|
// <delete-icon @click.native="onDeleteItem(item)" :isDisabled="true" />
|
22
|
-
import styled from "
|
22
|
+
import styled from "vue3-styled-components"
|
23
23
|
|
24
24
|
const wrapperAttrs = { isDisabled: Boolean }
|
25
25
|
const Wrapper = styled("div", wrapperAttrs)`
|
@@ -1,119 +1,138 @@
|
|
1
1
|
<template>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
2
|
+
<wrapper ref="dropdown" :openingMode="openingMode">
|
3
|
+
<WrapperButton @click="isOpenByClick = !isOpenByClick">
|
4
|
+
<slot name="trigger" />
|
5
|
+
</WrapperButton>
|
6
|
+
<WrapperDropdown
|
7
|
+
class="dropdown-content"
|
8
|
+
:class="{ openDropdown: isOpenByClick && openingMode == 'click' }"
|
9
|
+
:justify="justify"
|
10
|
+
:position="position"
|
11
|
+
:width="width"
|
12
|
+
:backgroundColor="backgroundColor"
|
13
|
+
>
|
14
|
+
<DropdownWindow
|
15
|
+
:gap="gap"
|
16
|
+
:backgroundColor="backgroundColor"
|
17
|
+
:width="width"
|
18
|
+
>
|
19
|
+
<slot name="dropdown" />
|
20
|
+
</DropdownWindow>
|
21
|
+
</WrapperDropdown>
|
22
|
+
</wrapper>
|
23
|
+
</template>
|
20
24
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
display: inline-block;
|
28
|
-
position: relative;
|
25
|
+
<script>
|
26
|
+
// import Icon from "@eturnity/eturnity_reusable_components/src/components/icon"
|
27
|
+
// How to use:
|
28
|
+
//<DropdownComponent
|
29
|
+
// width="300px"
|
30
|
+
// backgroundColor="red">
|
29
31
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
backgroundColor: {
|
89
|
-
required: false,
|
90
|
-
default: 'white'
|
91
|
-
}
|
32
|
+
// <DropdownComponent/>
|
33
|
+
|
34
|
+
import styled from 'vue3-styled-components'
|
35
|
+
|
36
|
+
const wrapperAttrs = {
|
37
|
+
width: String,
|
38
|
+
backgroundColor: String,
|
39
|
+
openingMode: String,
|
40
|
+
gap: String,
|
41
|
+
justify: String
|
42
|
+
}
|
43
|
+
const Wrapper = styled('div', wrapperAttrs)`
|
44
|
+
display: inline-block;
|
45
|
+
position: relative;
|
46
|
+
|
47
|
+
&:hover .dropdown-content {
|
48
|
+
${(props) => (props.openingMode == 'hover' ? 'display:block' : '')}
|
49
|
+
}
|
50
|
+
& .openDropdown {
|
51
|
+
${(props) =>
|
52
|
+
props.openingMode == 'click' ? 'display:block !important' : ''}
|
53
|
+
}
|
54
|
+
`
|
55
|
+
const WrapperDropdown = styled('div', wrapperAttrs)`
|
56
|
+
margin-top: 0;
|
57
|
+
display: none;
|
58
|
+
position: absolute;
|
59
|
+
z-index: 1;
|
60
|
+
${(props) => (props.justify == 'right' ? 'right:0;' : '')}
|
61
|
+
`
|
62
|
+
const DropdownWindow = styled('div', wrapperAttrs)`
|
63
|
+
width: ${(props) => props.width};
|
64
|
+
background-color: ${(props) =>
|
65
|
+
props.theme.colors[props.backgroundColor] || props.backgroundColor};
|
66
|
+
margin-top: ${(props) => props.gap};
|
67
|
+
border-radius: 4px;
|
68
|
+
position: relative;
|
69
|
+
min-width: 160px;
|
70
|
+
box-shadow: -1px 0px 5px rgba(0, 0, 0, 0.302);
|
71
|
+
z-index: 1;
|
72
|
+
`
|
73
|
+
|
74
|
+
const WrapperButton = styled('div', wrapperAttrs)`
|
75
|
+
display: inline-block;
|
76
|
+
`
|
77
|
+
|
78
|
+
export default {
|
79
|
+
name: 'DropdownComponent',
|
80
|
+
components: {
|
81
|
+
WrapperDropdown,
|
82
|
+
WrapperButton,
|
83
|
+
Wrapper,
|
84
|
+
DropdownWindow
|
85
|
+
},
|
86
|
+
props: {
|
87
|
+
width: {
|
88
|
+
required: false,
|
89
|
+
default: '300px'
|
92
90
|
},
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
}
|
91
|
+
gap: {
|
92
|
+
required: false,
|
93
|
+
default: '10px'
|
97
94
|
},
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
if (
|
102
|
-
this.$refs.dropdown.$el == event.target ||
|
103
|
-
this.$refs.dropdown.$el.contains(event.target)
|
104
|
-
) {
|
105
|
-
return
|
106
|
-
} else {
|
107
|
-
this.isOpenByClick=false
|
108
|
-
}
|
109
|
-
},
|
95
|
+
position: {
|
96
|
+
required: false,
|
97
|
+
default: 'bottom'
|
110
98
|
},
|
111
|
-
|
112
|
-
|
99
|
+
justify: {
|
100
|
+
required: false,
|
101
|
+
default: 'left'
|
113
102
|
},
|
114
|
-
|
115
|
-
|
103
|
+
openingMode: {
|
104
|
+
required: false,
|
105
|
+
default: 'hover'
|
116
106
|
},
|
107
|
+
backgroundColor: {
|
108
|
+
required: false,
|
109
|
+
default: 'white'
|
110
|
+
}
|
111
|
+
},
|
112
|
+
data() {
|
113
|
+
return {
|
114
|
+
isOpenByClick: false
|
115
|
+
}
|
116
|
+
},
|
117
|
+
methods: {
|
118
|
+
clickOutside(event) {
|
119
|
+
if (this.openingMode != 'click') return
|
120
|
+
if (
|
121
|
+
this.$refs.dropdown &&
|
122
|
+
(this.$refs.dropdown.$el == event.target ||
|
123
|
+
this.$refs.dropdown.$el.contains(event.target))
|
124
|
+
) {
|
125
|
+
return
|
126
|
+
} else {
|
127
|
+
this.isOpenByClick = false
|
128
|
+
}
|
129
|
+
}
|
130
|
+
},
|
131
|
+
mounted() {
|
132
|
+
document.addEventListener('click', this.clickOutside)
|
133
|
+
},
|
134
|
+
beforeDestroy() {
|
135
|
+
document.removeEventListener('click', this.clickOutside)
|
117
136
|
}
|
118
|
-
|
119
|
-
|
137
|
+
}
|
138
|
+
</script>
|
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
<script>
|
18
18
|
import icon from './index.vue'
|
19
|
-
import styled from '
|
19
|
+
import styled from 'vue3-styled-components'
|
20
20
|
|
21
21
|
const Wrapper = styled.div`
|
22
22
|
display: block;
|
@@ -36,7 +36,7 @@ const IconWrapper = styled.div`
|
|
36
36
|
margin: 10px;
|
37
37
|
`
|
38
38
|
export default {
|
39
|
-
name: '
|
39
|
+
name: 'collectionComponent',
|
40
40
|
components: { icon, IconWrapper, Wrapper },
|
41
41
|
props: {
|
42
42
|
size: { required: false },
|
@@ -1,18 +1,12 @@
|
|
1
1
|
<template>
|
2
2
|
<Wrapper :isDisabled="disabled" :size="size" :cursor="cursor">
|
3
|
-
<
|
4
|
-
|
5
|
-
|
6
|
-
:color="color"
|
7
|
-
:hoveredColor="hoveredColor"
|
8
|
-
v-html="
|
9
|
-
require(`!html-loader!./../../assets/svgIcons/${name.toLowerCase()}.svg`)
|
10
|
-
"
|
11
|
-
></icon-image>
|
3
|
+
<IconImage :size="size" :color="color" :hoveredColor="hoveredColor">
|
4
|
+
<i v-html="svgIconModule"></i>
|
5
|
+
</IconImage>
|
12
6
|
</Wrapper>
|
13
7
|
</template>
|
14
8
|
|
15
|
-
<script>
|
9
|
+
<script setup>
|
16
10
|
// import Icon from "@eturnity/eturnity_reusable_components/src/components/icon"
|
17
11
|
// How to use:
|
18
12
|
//<icon
|
@@ -23,8 +17,8 @@
|
|
23
17
|
// cursor="default"
|
24
18
|
// />
|
25
19
|
|
26
|
-
import
|
27
|
-
|
20
|
+
import { computed } from 'vue'
|
21
|
+
import styled from 'vue3-styled-components'
|
28
22
|
const wrapperAttrs = { isDisabled: Boolean, size: String, cursor: String }
|
29
23
|
const Wrapper = styled('div', wrapperAttrs)`
|
30
24
|
display: flex;
|
@@ -52,37 +46,37 @@ const IconImage = styled('div', IconImageProps)`
|
|
52
46
|
}
|
53
47
|
`
|
54
48
|
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
49
|
+
const props = defineProps({
|
50
|
+
disabled: {
|
51
|
+
required: false,
|
52
|
+
default: false
|
53
|
+
},
|
54
|
+
name: {
|
55
|
+
required: true
|
56
|
+
},
|
57
|
+
color: {
|
58
|
+
required: false
|
59
|
+
},
|
60
|
+
hoveredColor: {
|
61
|
+
required: false
|
60
62
|
},
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
default: false
|
65
|
-
},
|
66
|
-
name: {
|
67
|
-
required: true
|
68
|
-
},
|
69
|
-
color: {
|
70
|
-
required: false
|
71
|
-
},
|
72
|
-
hoveredColor: {
|
73
|
-
required: false
|
74
|
-
},
|
75
|
-
size: {
|
76
|
-
required: false,
|
77
|
-
default: '30px'
|
78
|
-
},
|
79
|
-
cursor: {
|
80
|
-
required: false,
|
81
|
-
default: null
|
82
|
-
}
|
63
|
+
size: {
|
64
|
+
required: false,
|
65
|
+
default: '30px'
|
83
66
|
},
|
84
|
-
|
85
|
-
|
67
|
+
cursor: {
|
68
|
+
required: false,
|
69
|
+
default: null
|
86
70
|
}
|
87
|
-
}
|
71
|
+
})
|
72
|
+
|
73
|
+
const svgIconsContext = import.meta.glob('../../assets/svgIcons/*.svg', {
|
74
|
+
as: 'raw'
|
75
|
+
})
|
76
|
+
|
77
|
+
const svgIconModule = computed(() => {
|
78
|
+
const moduleKey = `../../assets/svgIcons/${props.name}.svg`
|
79
|
+
|
80
|
+
return svgIconsContext[moduleKey]
|
81
|
+
})
|
88
82
|
</script>
|
@@ -34,7 +34,7 @@
|
|
34
34
|
// size="60px" by default, this is 30px
|
35
35
|
// />
|
36
36
|
|
37
|
-
import styled from '
|
37
|
+
import styled from 'vue3-styled-components'
|
38
38
|
import icon from '../icon'
|
39
39
|
const wrapperAttrs = { isHovered:Boolean,borderRadius:String,disabled: Boolean, size: String,backgroundColor:String,hoveredBackgroundColor:String }
|
40
40
|
const Wrapper = styled('div', wrapperAttrs)`
|
@@ -32,7 +32,7 @@
|
|
32
32
|
// alignArrow="right" // which side the arrow should be on
|
33
33
|
// />
|
34
34
|
import theme from '../../assets/theme.js'
|
35
|
-
import styled from '
|
35
|
+
import styled from 'vue3-styled-components'
|
36
36
|
import icon from '../icon'
|
37
37
|
|
38
38
|
const textAttrs = {
|
@@ -156,11 +156,7 @@ export default {
|
|
156
156
|
},
|
157
157
|
computed: {
|
158
158
|
iconColor() {
|
159
|
-
return
|
160
|
-
? this.borderColor
|
161
|
-
? this.borderColor
|
162
|
-
: theme.colors.secondary
|
163
|
-
: theme.colors.mediumGray
|
159
|
+
return theme.colors.mediumGray
|
164
160
|
},
|
165
161
|
halfComputedTextInfoWidth() {
|
166
162
|
return parseInt(this.width) / 2
|
@@ -48,7 +48,6 @@
|
|
48
48
|
:fontSize="fontSize"
|
49
49
|
:fontColor="fontColor"
|
50
50
|
:backgroundColor="backgroundColor"
|
51
|
-
v-on="$listeners"
|
52
51
|
:hasSlot="hasSlot"
|
53
52
|
:hasLabelSlot="hasLabelSlot"
|
54
53
|
:slotSize="slotSize"
|
@@ -98,7 +97,7 @@
|
|
98
97
|
// :minNumber="0"
|
99
98
|
// fontColor="blue"
|
100
99
|
// />
|
101
|
-
import styled from '
|
100
|
+
import styled from 'vue3-styled-components'
|
102
101
|
import {
|
103
102
|
stringToNumber,
|
104
103
|
numberToString
|
@@ -59,7 +59,7 @@
|
|
59
59
|
</template>
|
60
60
|
|
61
61
|
<script>
|
62
|
-
import styled from '
|
62
|
+
import styled from 'vue3-styled-components'
|
63
63
|
import InfoText from '../../infoText'
|
64
64
|
import Icon from '../../icon'
|
65
65
|
import ErrorMessage from '../../errorMessage'
|
@@ -313,8 +313,8 @@ export default {
|
|
313
313
|
}
|
314
314
|
},
|
315
315
|
methods: {
|
316
|
-
onChangeHandler(
|
317
|
-
this.$emit('input-change',
|
316
|
+
onChangeHandler(event) {
|
317
|
+
this.$emit('input-change', event.target.value)
|
318
318
|
},
|
319
319
|
onInputBlur($event) {
|
320
320
|
this.$emit('input-blur', $event.target.value)
|