@eturnity/eturnity_reusable_components 7.24.3-EPDM-11250.0 → 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 -329
- 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/src/helpers/numberConverter.js +1 -3
- package/src/helpers/translateLang.js +10 -13
- package/.prettierrc +0 -7
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
@@ -1,43 +1,43 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
2
|
+
<OptionContainer
|
3
|
+
:background-color="colorMode == 'dark' ? '#000000' : backgroundColor"
|
4
|
+
:cursor-type="cursorType"
|
3
5
|
:data-value="value"
|
4
|
-
:
|
6
|
+
:disabled-bg-color="disabledBgColor"
|
7
|
+
:disabled-text-color="disabledTextColor"
|
8
|
+
:hovered-bg-color="
|
5
9
|
colorMode == 'dark'
|
6
10
|
? '#000000'
|
7
11
|
: hoveredBgColor
|
8
|
-
|
9
|
-
|
12
|
+
? hoveredBgColor
|
13
|
+
: 'grey5'
|
10
14
|
"
|
15
|
+
:is-disabled="isDisabled"
|
16
|
+
:min-width="minWidth"
|
17
|
+
:padding="padding"
|
18
|
+
:title="hoverText"
|
11
19
|
@click="clickHandler"
|
12
20
|
@mouseover="hoverHandler"
|
13
|
-
:cursorType="cursorType"
|
14
|
-
:isDisabled="isDisabled"
|
15
|
-
:disabledBgColor="disabledBgColor"
|
16
|
-
:disabledTextColor="disabledTextColor"
|
17
|
-
:backgroundColor="colorMode == 'dark' ? '#000000' : backgroundColor"
|
18
|
-
:title="hoverText"
|
19
|
-
:minWidth="minWidth"
|
20
|
-
:padding="padding"
|
21
21
|
>
|
22
22
|
<slot></slot>
|
23
|
-
</
|
23
|
+
</OptionContainer>
|
24
24
|
</template>
|
25
25
|
|
26
26
|
<script>
|
27
27
|
// import selectButton from './selectButton'
|
28
28
|
// import selectDropdown from './selectDropDown'
|
29
|
-
import styled from 'vue3-styled-components'
|
30
|
-
const optionProps = {
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
}
|
40
|
-
const
|
29
|
+
import styled from 'vue3-styled-components'
|
30
|
+
const optionProps = {
|
31
|
+
isDisabled: Boolean,
|
32
|
+
hoveredBgColor: String,
|
33
|
+
cursorType: String,
|
34
|
+
backgroundColor: String,
|
35
|
+
minWidth: String,
|
36
|
+
disabledBgColor: String,
|
37
|
+
disabledTextColor: String,
|
38
|
+
padding: String
|
39
|
+
}
|
40
|
+
const OptionContainer = styled('div', optionProps)`
|
41
41
|
display: flex;
|
42
42
|
cursor: ${(props) => (props.isDisabled ? 'not-allowed' : props.cursorType)};
|
43
43
|
flex-direction: row;
|
@@ -54,20 +54,20 @@ const optionContainer = styled('div', optionProps)`
|
|
54
54
|
: props.disabledBgColor
|
55
55
|
: props.theme.colors[props.backgroundColor]
|
56
56
|
? props.theme.colors[props.backgroundColor]
|
57
|
-
|
57
|
+
: props.backgroundColor} !important;
|
58
58
|
box-sizing: inherit;
|
59
59
|
background-color: ${(props) =>
|
60
60
|
props.theme.colors[props.backgroundColor]
|
61
61
|
? props.theme.colors[props.backgroundColor]
|
62
|
-
|
62
|
+
: props.backgroundColor};
|
63
63
|
color: ${(props) =>
|
64
64
|
props.isDisabled
|
65
|
-
?
|
65
|
+
? props.disabledTextColor
|
66
66
|
? props.theme.colors[props.disabledTextColor]
|
67
67
|
? props.theme.colors[props.disabledTextColor]
|
68
68
|
: props.disabledTextColor
|
69
69
|
: props.theme.colors.grey3
|
70
|
-
|
70
|
+
: 'inherit'};
|
71
71
|
&:hover {
|
72
72
|
background-color: ${(props) =>
|
73
73
|
!!props.disabledTextColor && props.isDisabled
|
@@ -76,73 +76,73 @@ const optionContainer = styled('div', optionProps)`
|
|
76
76
|
: props.disabledBgColor
|
77
77
|
: props.theme.colors[props.hoveredBgColor]
|
78
78
|
? props.theme.colors[props.hoveredBgColor]
|
79
|
-
|
79
|
+
: props.hoveredBgColor} !important;
|
80
80
|
}
|
81
81
|
`
|
82
82
|
|
83
|
-
export default {
|
84
|
-
|
85
|
-
emits: ['option-hovered', 'option-selected'],
|
86
|
-
props: {
|
87
|
-
value: {
|
88
|
-
required: true
|
89
|
-
},
|
90
|
-
hoveredBgColor: {
|
91
|
-
required: false
|
92
|
-
},
|
93
|
-
colorMode: {
|
94
|
-
required: false,
|
95
|
-
default: 'light'
|
96
|
-
},
|
97
|
-
cursorType: {
|
98
|
-
required: false,
|
99
|
-
default: 'pointer'
|
100
|
-
},
|
101
|
-
backgroundColor: {
|
102
|
-
required: false,
|
103
|
-
default: 'white'
|
104
|
-
},
|
105
|
-
hoverText: {
|
106
|
-
required: false
|
107
|
-
},
|
108
|
-
isDisabled: {
|
109
|
-
required: false,
|
110
|
-
default: false
|
111
|
-
},
|
112
|
-
minWidth: {
|
113
|
-
required: false
|
114
|
-
},
|
115
|
-
disabledBgColor: {
|
116
|
-
required: false,
|
117
|
-
default: 'white'
|
118
|
-
},
|
119
|
-
disabledTextColor: {
|
120
|
-
required: false,
|
121
|
-
default: null
|
122
|
-
},
|
123
|
-
padding: {
|
124
|
-
required: false,
|
125
|
-
default: '12px 10px'
|
126
|
-
}
|
127
|
-
},
|
83
|
+
export default {
|
84
|
+
name: 'RCoption',
|
128
85
|
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
86
|
+
components: { OptionContainer },
|
87
|
+
props: {
|
88
|
+
value: {
|
89
|
+
required: true
|
90
|
+
},
|
91
|
+
hoveredBgColor: {
|
92
|
+
required: false
|
93
|
+
},
|
94
|
+
colorMode: {
|
95
|
+
required: false,
|
96
|
+
default: 'light'
|
97
|
+
},
|
98
|
+
cursorType: {
|
99
|
+
required: false,
|
100
|
+
default: 'pointer'
|
101
|
+
},
|
102
|
+
backgroundColor: {
|
103
|
+
required: false,
|
104
|
+
default: 'white'
|
105
|
+
},
|
106
|
+
hoverText: {
|
107
|
+
required: false
|
108
|
+
},
|
109
|
+
isDisabled: {
|
110
|
+
required: false,
|
111
|
+
default: false
|
112
|
+
},
|
113
|
+
minWidth: {
|
114
|
+
required: false
|
115
|
+
},
|
116
|
+
disabledBgColor: {
|
117
|
+
required: false,
|
118
|
+
default: 'white'
|
119
|
+
},
|
120
|
+
disabledTextColor: {
|
121
|
+
required: false,
|
122
|
+
default: null
|
123
|
+
},
|
124
|
+
padding: {
|
125
|
+
required: false,
|
126
|
+
default: '12px 10px'
|
140
127
|
}
|
141
128
|
},
|
142
|
-
|
143
|
-
|
129
|
+
emits: ['option-hovered', 'option-selected'],
|
130
|
+
data() {
|
131
|
+
return {}
|
132
|
+
},
|
133
|
+
computed: {},
|
134
|
+
methods: {
|
135
|
+
clickHandler(e) {
|
136
|
+
if (this.isDisabled) {
|
137
|
+
// prevent emitter if the option is disabled
|
138
|
+
return
|
139
|
+
} else {
|
140
|
+
this.$parent.$emit('option-selected', this.value, e)
|
141
|
+
}
|
142
|
+
},
|
143
|
+
hoverHandler() {
|
144
|
+
this.$parent.$emit('option-hovered', this.value)
|
145
|
+
}
|
144
146
|
}
|
145
|
-
}
|
146
|
-
computed: {}
|
147
|
-
}
|
147
|
+
}
|
148
148
|
</script>
|
@@ -9,7 +9,7 @@ export default {
|
|
9
9
|
|
10
10
|
const Template = (args, { argTypes }) => ({
|
11
11
|
// Components used in your story `template` are defined in the `components` object
|
12
|
-
components: { Select,Option },
|
12
|
+
components: { Select, Option },
|
13
13
|
// The story's `args` need to be mapped into the template through the `setup()` method
|
14
14
|
props: Object.keys(argTypes),
|
15
15
|
template: `<Select v-bind="$props">
|
@@ -49,11 +49,11 @@ const Template = (args, { argTypes }) => ({
|
|
49
49
|
|
50
50
|
export const Default = Template.bind({})
|
51
51
|
Default.args = {
|
52
|
-
hoverDropdown
|
53
|
-
selectWidth
|
54
|
-
optionWidth
|
55
|
-
label
|
56
|
-
alignItems
|
57
|
-
value
|
52
|
+
hoverDropdown: "true",
|
53
|
+
selectWidth: "100%",
|
54
|
+
optionWidth: "50%",
|
55
|
+
label: "that is a label",
|
56
|
+
alignItems: "vertical",
|
57
|
+
value: "2",
|
58
58
|
}
|
59
59
|
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
2
|
+
<Container>
|
3
3
|
<Slider
|
4
|
+
:max="maxValue"
|
5
|
+
:min="minValue"
|
6
|
+
:tooltips="false"
|
4
7
|
:value="value"
|
5
8
|
@update="onChange($event)"
|
6
|
-
:tooltips="false"
|
7
|
-
:min="minValue"
|
8
|
-
:max="maxValue"
|
9
9
|
/>
|
10
|
-
<
|
11
|
-
</
|
10
|
+
<NumberText> {{ value }} {{ unit }} </NumberText>
|
11
|
+
</Container>
|
12
12
|
</template>
|
13
13
|
|
14
14
|
<script>
|
@@ -21,10 +21,10 @@
|
|
21
21
|
// :minValue="10" //default is 0 if not specified
|
22
22
|
// :maxValue="500" //default is 100 if not specified
|
23
23
|
// />
|
24
|
-
import Slider from '@vueform/slider'
|
25
|
-
import styled from 'vue3-styled-components'
|
24
|
+
import Slider from '@vueform/slider'
|
25
|
+
import styled from 'vue3-styled-components'
|
26
26
|
|
27
|
-
const Container = styled.div`
|
27
|
+
const Container = styled.div`
|
28
28
|
margin: 16px 0 16px 21px;
|
29
29
|
display: grid;
|
30
30
|
grid-template-columns: 1fr auto;
|
@@ -74,53 +74,53 @@ const Container = styled.div`
|
|
74
74
|
}
|
75
75
|
`
|
76
76
|
|
77
|
-
const NumberText = styled.div`
|
77
|
+
const NumberText = styled.div`
|
78
78
|
font-weight: 500;
|
79
79
|
font-size: 24px;
|
80
80
|
color: ${(props) => props.theme.colors.black};
|
81
81
|
`
|
82
82
|
|
83
|
-
export default {
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
},
|
90
|
-
props: {
|
91
|
-
value: {
|
92
|
-
required: false,
|
93
|
-
default: 0
|
83
|
+
export default {
|
84
|
+
name: 'Slider',
|
85
|
+
components: {
|
86
|
+
Slider,
|
87
|
+
Container,
|
88
|
+
NumberText
|
94
89
|
},
|
95
|
-
|
96
|
-
|
97
|
-
|
90
|
+
props: {
|
91
|
+
value: {
|
92
|
+
required: false,
|
93
|
+
default: 0
|
94
|
+
},
|
95
|
+
unit: {
|
96
|
+
required: false,
|
97
|
+
default: ''
|
98
|
+
},
|
99
|
+
minValue: {
|
100
|
+
required: false,
|
101
|
+
default: 0
|
102
|
+
},
|
103
|
+
maxValue: {
|
104
|
+
required: false,
|
105
|
+
default: 100
|
106
|
+
}
|
98
107
|
},
|
99
|
-
|
100
|
-
|
101
|
-
|
108
|
+
mounted() {
|
109
|
+
// This is to add the 3 white lines to the slider button
|
110
|
+
let slider = document.querySelector('.slider-touch-area')
|
111
|
+
let span1 = document.createElement('span')
|
112
|
+
let span2 = document.createElement('span')
|
113
|
+
let span3 = document.createElement('span')
|
114
|
+
slider.appendChild(span1)
|
115
|
+
slider.appendChild(span2)
|
116
|
+
slider.appendChild(span3)
|
102
117
|
},
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
},
|
108
|
-
methods: {
|
109
|
-
onChange(value) {
|
110
|
-
this.$emit('change', value)
|
118
|
+
methods: {
|
119
|
+
onChange(value) {
|
120
|
+
this.$emit('change', value)
|
121
|
+
}
|
111
122
|
}
|
112
|
-
},
|
113
|
-
mounted() {
|
114
|
-
// This is to add the 3 white lines to the slider button
|
115
|
-
let slider = document.querySelector('.slider-touch-area')
|
116
|
-
let span1 = document.createElement('span')
|
117
|
-
let span2 = document.createElement('span')
|
118
|
-
let span3 = document.createElement('span')
|
119
|
-
slider.appendChild(span1)
|
120
|
-
slider.appendChild(span2)
|
121
|
-
slider.appendChild(span3)
|
122
123
|
}
|
123
|
-
}
|
124
124
|
</script>
|
125
125
|
|
126
126
|
<style src="@vueform/slider/themes/default.css"></style>
|