@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,30 +1,24 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
2
|
+
<component-wrapper>
|
3
|
+
<icon-wrapper :size="size">
|
4
|
+
<icon-img
|
5
5
|
@click.prevent="toggleShowInfo()"
|
6
6
|
@mouseenter="openTrigger == 'onHover' ? toggleShowInfo() : ''"
|
7
7
|
@mouseleave="openTrigger == 'onHover' ? toggleShowInfo() : ''"
|
8
8
|
>
|
9
|
-
<
|
10
|
-
|
11
|
-
|
12
|
-
name="info"
|
13
|
-
:size="size"
|
14
|
-
/>
|
15
|
-
</IconImg>
|
16
|
-
<TextOverlay
|
9
|
+
<icon :size="size" name="info" :color="iconColor" cursor="pointer" />
|
10
|
+
</icon-img>
|
11
|
+
<text-overlay
|
17
12
|
v-if="showInfo"
|
18
|
-
:align-arrow="alignArrow"
|
19
|
-
:half-computed-text-info-width="halfComputedTextInfoWidth"
|
20
|
-
:icon-size="size"
|
21
13
|
:width="width"
|
22
|
-
|
23
|
-
|
14
|
+
:halfComputedTextInfoWidth="halfComputedTextInfoWidth"
|
15
|
+
:alignArrow="alignArrow"
|
16
|
+
:iconSize="size"
|
17
|
+
><slot />
|
24
18
|
<span v-html="text"></span>
|
25
|
-
</
|
26
|
-
</
|
27
|
-
</
|
19
|
+
</text-overlay>
|
20
|
+
</icon-wrapper>
|
21
|
+
</component-wrapper>
|
28
22
|
</template>
|
29
23
|
|
30
24
|
<script>
|
@@ -35,17 +29,17 @@
|
|
35
29
|
// size="20px"
|
36
30
|
// alignArrow="right" // which side the arrow should be on
|
37
31
|
// />
|
38
|
-
|
39
|
-
|
40
|
-
|
32
|
+
import theme from '../../assets/theme.js'
|
33
|
+
import styled from 'vue3-styled-components'
|
34
|
+
import icon from '../icon'
|
41
35
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
36
|
+
const textAttrs = {
|
37
|
+
iconSize: String,
|
38
|
+
alignArrow: String,
|
39
|
+
width: String,
|
40
|
+
halfComputedTextInfoWidth: Number
|
41
|
+
}
|
42
|
+
const TextOverlay = styled('div', textAttrs)`
|
49
43
|
position: absolute;
|
50
44
|
top: ${(props) => 'calc(' + props.iconSize + ' + 15px)'};
|
51
45
|
${(props) =>
|
@@ -53,7 +47,7 @@
|
|
53
47
|
? 'left: calc(' + props.iconSize + ' /2 - 18px)'
|
54
48
|
: props.alignArrow === 'center'
|
55
49
|
? 'left: calc((-' + props.width + ' + ' + props.iconSize + ') /2 + 2px)'
|
56
|
-
|
50
|
+
: 'right: calc(' + props.iconSize + ' /2 - 17px)'};
|
57
51
|
text-align: left;
|
58
52
|
background: ${(props) => props.theme.colors.black};
|
59
53
|
padding: 10px;
|
@@ -76,7 +70,7 @@
|
|
76
70
|
? 'left:40px;'
|
77
71
|
: props.alignArrow == 'center'
|
78
72
|
? 'left: calc(50% + 19px);'
|
79
|
-
|
73
|
+
: 'right:-13px;'};
|
80
74
|
height: 8px;
|
81
75
|
width: 8px;
|
82
76
|
transform-origin: center center;
|
@@ -88,79 +82,79 @@
|
|
88
82
|
}
|
89
83
|
`
|
90
84
|
|
91
|
-
|
92
|
-
|
85
|
+
const iconAttrs = { size: String }
|
86
|
+
const IconWrapper = styled('div', iconAttrs)`
|
93
87
|
position: relative;
|
94
88
|
height: ${(props) => props.size};
|
95
89
|
`
|
96
90
|
|
97
|
-
|
91
|
+
const IconImg = styled.div`
|
98
92
|
line-height: 0;
|
99
93
|
`
|
100
94
|
|
101
|
-
|
95
|
+
const ComponentWrapper = styled.div`
|
102
96
|
display: inline-block;
|
103
97
|
`
|
104
98
|
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
99
|
+
export default {
|
100
|
+
name: 'info-text',
|
101
|
+
components: {
|
102
|
+
IconWrapper,
|
103
|
+
TextOverlay,
|
104
|
+
ComponentWrapper,
|
105
|
+
IconImg,
|
106
|
+
icon
|
107
|
+
},
|
108
|
+
props: {
|
109
|
+
text: {
|
110
|
+
required: false
|
113
111
|
},
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
},
|
118
|
-
size: {
|
119
|
-
required: false,
|
120
|
-
default: '14px'
|
121
|
-
},
|
122
|
-
alignArrow: {
|
123
|
-
required: false,
|
124
|
-
default: 'center'
|
125
|
-
},
|
126
|
-
openTrigger: {
|
127
|
-
required: false,
|
128
|
-
default: 'onHover' // onHover, onClick
|
129
|
-
},
|
130
|
-
width: {
|
131
|
-
required: false,
|
132
|
-
default: '165px'
|
133
|
-
}
|
112
|
+
size: {
|
113
|
+
required: false,
|
114
|
+
default: '14px'
|
134
115
|
},
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
}
|
116
|
+
alignArrow: {
|
117
|
+
required: false,
|
118
|
+
default: 'center'
|
139
119
|
},
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
},
|
144
|
-
halfComputedTextInfoWidth() {
|
145
|
-
return parseInt(this.width) / 2
|
146
|
-
}
|
120
|
+
openTrigger: {
|
121
|
+
required: false,
|
122
|
+
default: 'onHover' // onHover, onClick
|
147
123
|
},
|
148
|
-
|
149
|
-
|
150
|
-
|
124
|
+
width: {
|
125
|
+
required: false,
|
126
|
+
default: '165px'
|
127
|
+
}
|
128
|
+
},
|
129
|
+
methods: {
|
130
|
+
toggleShowInfo() {
|
131
|
+
this.showInfo = !this.showInfo
|
151
132
|
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
}
|
157
|
-
},
|
158
|
-
clickOutside(event) {
|
159
|
-
if (this.$el.contains(event.target)) {
|
160
|
-
return
|
161
|
-
}
|
162
|
-
this.toggleShowInfo()
|
133
|
+
if (this.showInfo) {
|
134
|
+
document.addEventListener('click', this.clickOutside)
|
135
|
+
} else {
|
136
|
+
document.removeEventListener('click', this.clickOutside)
|
163
137
|
}
|
138
|
+
},
|
139
|
+
clickOutside(event) {
|
140
|
+
if (this.$el.contains(event.target)) {
|
141
|
+
return
|
142
|
+
}
|
143
|
+
this.toggleShowInfo()
|
144
|
+
}
|
145
|
+
},
|
146
|
+
data() {
|
147
|
+
return {
|
148
|
+
showInfo: false
|
149
|
+
}
|
150
|
+
},
|
151
|
+
computed: {
|
152
|
+
iconColor() {
|
153
|
+
return theme.colors.mediumGray
|
154
|
+
},
|
155
|
+
halfComputedTextInfoWidth() {
|
156
|
+
return parseInt(this.width) / 2
|
164
157
|
}
|
165
158
|
}
|
159
|
+
}
|
166
160
|
</script>
|
@@ -1,28 +1,26 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
:
|
5
|
-
:check-color="checkColor"
|
6
|
-
:cursor-type="cursorType"
|
7
|
-
:has-label="label && !!label.length"
|
8
|
-
:is-checked="isChecked"
|
9
|
-
:is-disabled="isDisabled"
|
2
|
+
<component-wrapper>
|
3
|
+
<container
|
4
|
+
:checkColor="checkColor"
|
10
5
|
:size="size"
|
6
|
+
:hasLabel="label && !!label.length"
|
7
|
+
:backgroundColor="backgroundColor"
|
8
|
+
:isChecked="isChecked"
|
9
|
+
:isDisabled="isDisabled"
|
10
|
+
:cursorType="cursorType"
|
11
11
|
>
|
12
|
-
<
|
12
|
+
<input-checkbox
|
13
|
+
type="checkbox"
|
13
14
|
:checked="isChecked"
|
14
15
|
:data-id="dataId"
|
15
|
-
type="checkbox"
|
16
16
|
@change="onChangeHandler(!isChecked)"
|
17
17
|
/>
|
18
|
-
<
|
18
|
+
<check-wrapper :hasLabel="hasLabel">
|
19
19
|
<span class="checkmark"></span>
|
20
|
-
</
|
21
|
-
<
|
22
|
-
|
23
|
-
|
24
|
-
</Container>
|
25
|
-
</ComponentWrapper>
|
20
|
+
</check-wrapper>
|
21
|
+
<label-text v-if="label && !!label.length">{{ label }}</label-text>
|
22
|
+
</container>
|
23
|
+
</component-wrapper>
|
26
24
|
</template>
|
27
25
|
|
28
26
|
<script>
|
@@ -38,13 +36,13 @@
|
|
38
36
|
// :isDisabled="true"
|
39
37
|
// cursorType="default"
|
40
38
|
// />
|
41
|
-
|
39
|
+
import styled from 'vue3-styled-components'
|
42
40
|
|
43
|
-
|
41
|
+
const ComponentWrapper = styled.div`
|
44
42
|
min-height: 18px;
|
45
43
|
`
|
46
44
|
|
47
|
-
|
45
|
+
const CheckWrapper = styled('div', { hasLabel: Boolean })`
|
48
46
|
${(props) =>
|
49
47
|
props.hasLabel &&
|
50
48
|
`
|
@@ -53,16 +51,16 @@
|
|
53
51
|
`}
|
54
52
|
`
|
55
53
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
54
|
+
const containerAttrs = {
|
55
|
+
checkColor: String,
|
56
|
+
size: String,
|
57
|
+
hasLabel: Boolean,
|
58
|
+
backgroundColor: String,
|
59
|
+
isChecked: Boolean,
|
60
|
+
isDisabled: Boolean,
|
61
|
+
cursorType: String
|
62
|
+
}
|
63
|
+
const Container = styled('label', containerAttrs)`
|
66
64
|
display: grid;
|
67
65
|
grid-template-columns: ${(props) => (props.hasLabel ? '16px auto' : '16px')};
|
68
66
|
grid-gap: 16px;
|
@@ -80,13 +78,13 @@
|
|
80
78
|
? '25px'
|
81
79
|
: props.size === 'small'
|
82
80
|
? '16px'
|
83
|
-
|
81
|
+
: '25px'};
|
84
82
|
width: ${(props) =>
|
85
83
|
props.size === 'medium'
|
86
84
|
? '25px'
|
87
85
|
: props.size === 'small'
|
88
86
|
? '16px'
|
89
|
-
|
87
|
+
: '25px'};
|
90
88
|
background-color: ${(props) =>
|
91
89
|
props.isChecked
|
92
90
|
? props.backgroundColor
|
@@ -94,7 +92,7 @@
|
|
94
92
|
: props.theme.colors.green
|
95
93
|
: props.isDisabled
|
96
94
|
? props.theme.colors.lightGray
|
97
|
-
|
95
|
+
: props.theme.colors.white};
|
98
96
|
border-radius: 4px;
|
99
97
|
border: 1px solid
|
100
98
|
${(props) =>
|
@@ -102,7 +100,7 @@
|
|
102
100
|
? props.backgroundColor
|
103
101
|
? props.backgroundColor
|
104
102
|
: props.theme.colors.green
|
105
|
-
|
103
|
+
: props.theme.colors.mediumGray};
|
106
104
|
|
107
105
|
&:after {
|
108
106
|
content: '';
|
@@ -113,31 +111,31 @@
|
|
113
111
|
|
114
112
|
.checkmark:after {
|
115
113
|
left: ${(props) =>
|
116
|
-
|
114
|
+
props.size === 'medium' ? '9px' : props.size === 'small' ? '5px' : '9px'};
|
117
115
|
top: ${(props) =>
|
118
|
-
|
116
|
+
props.size === 'medium' ? '5px' : props.size === 'small' ? '2px' : '5px'};
|
119
117
|
width: ${(props) =>
|
120
|
-
|
118
|
+
props.size === 'medium' ? '5px' : props.size === 'small' ? '3px' : '5px'};
|
121
119
|
height: ${(props) =>
|
122
120
|
props.size === 'medium'
|
123
121
|
? '10px'
|
124
122
|
: props.size === 'small'
|
125
123
|
? '6px'
|
126
|
-
|
124
|
+
: '10px'};
|
127
125
|
border: solid
|
128
126
|
${(props) =>
|
129
|
-
|
127
|
+
props.checkColor ? props.checkColor : props.theme.colors.white};
|
130
128
|
border-width: ${(props) =>
|
131
129
|
props.size === 'medium'
|
132
130
|
? '0 3px 3px 0'
|
133
131
|
: props.size === 'small'
|
134
132
|
? '0 2px 2px 0'
|
135
|
-
|
133
|
+
: '0 3px 3px 0'};
|
136
134
|
transform: rotate(45deg);
|
137
135
|
}
|
138
136
|
`
|
139
137
|
|
140
|
-
|
138
|
+
const InputCheckbox = styled.input`
|
141
139
|
cursor: pointer;
|
142
140
|
position: absolute;
|
143
141
|
opacity: 0;
|
@@ -146,66 +144,71 @@
|
|
146
144
|
width: 0;
|
147
145
|
`
|
148
146
|
|
149
|
-
|
147
|
+
const LabelText = styled.div`
|
150
148
|
font-size: 13px;
|
151
149
|
display: grid;
|
152
150
|
align-items: flex-start;
|
153
151
|
min-height: 18px;
|
154
152
|
`
|
155
153
|
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
154
|
+
export default {
|
155
|
+
name: 'checkbox',
|
156
|
+
components: {
|
157
|
+
ComponentWrapper,
|
158
|
+
Container,
|
159
|
+
InputCheckbox,
|
160
|
+
LabelText,
|
161
|
+
CheckWrapper
|
162
|
+
},
|
163
|
+
props: {
|
164
|
+
label: {
|
165
|
+
required: false,
|
166
|
+
default: ''
|
164
167
|
},
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
default: ''
|
169
|
-
},
|
170
|
-
isChecked: {
|
171
|
-
required: true,
|
172
|
-
default: false
|
173
|
-
},
|
174
|
-
checkColor: {
|
175
|
-
required: false
|
176
|
-
},
|
177
|
-
size: {
|
178
|
-
required: false,
|
179
|
-
default: 'medium' // small, medium
|
180
|
-
},
|
181
|
-
backgroundColor: {
|
182
|
-
required: false
|
183
|
-
},
|
184
|
-
isDisabled: {
|
185
|
-
required: false,
|
186
|
-
default: false
|
187
|
-
},
|
188
|
-
dataId: {
|
189
|
-
type: String,
|
190
|
-
default: ''
|
191
|
-
},
|
192
|
-
cursorType: {
|
193
|
-
type: String,
|
194
|
-
default: 'pointer'
|
195
|
-
}
|
168
|
+
isChecked: {
|
169
|
+
required: true,
|
170
|
+
default: false
|
196
171
|
},
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
172
|
+
checkColor: {
|
173
|
+
required: false
|
174
|
+
},
|
175
|
+
size: {
|
176
|
+
required: false,
|
177
|
+
default: 'medium' // small, medium
|
201
178
|
},
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
179
|
+
backgroundColor: {
|
180
|
+
required: false
|
181
|
+
},
|
182
|
+
isDisabled: {
|
183
|
+
required: false,
|
184
|
+
default: false
|
185
|
+
},
|
186
|
+
dataId: {
|
187
|
+
type: String,
|
188
|
+
default: ''
|
189
|
+
},
|
190
|
+
cursorType: {
|
191
|
+
type: String,
|
192
|
+
default: 'pointer'
|
193
|
+
}
|
194
|
+
},
|
195
|
+
computed: {
|
196
|
+
hasLabel() {
|
197
|
+
return !!this.label.length
|
198
|
+
}
|
199
|
+
},
|
200
|
+
computed: {
|
201
|
+
hasLabel() {
|
202
|
+
return !!this.label.length
|
203
|
+
}
|
204
|
+
},
|
205
|
+
methods: {
|
206
|
+
onChangeHandler(value) {
|
207
|
+
if (this.isDisabled) {
|
208
|
+
return
|
208
209
|
}
|
210
|
+
this.$emit('on-event-handler', value)
|
209
211
|
}
|
210
212
|
}
|
213
|
+
}
|
211
214
|
</script>
|