@eturnity/eturnity_reusable_components 7.30.3 → 7.32.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 +184 -0
- package/.prettierrc +8 -6
- package/package.json +9 -21
- package/src/App.vue +79 -78
- package/src/assets/theme.js +3 -3
- package/src/components/addNewButton/AddNewButton.stories.js +2 -2
- package/src/components/addNewButton/index.vue +48 -51
- package/src/components/banner/actionBanner/index.vue +54 -55
- package/src/components/banner/banner/banner.stories.js +5 -5
- package/src/components/banner/banner/index.vue +159 -159
- package/src/components/banner/infoBanner/index.vue +41 -53
- package/src/components/buttons/buttonIcon/index.vue +125 -122
- package/src/components/buttons/closeButton/CloseButton.stories.js +3 -3
- package/src/components/buttons/closeButton/index.vue +49 -49
- package/src/components/buttons/mainButton/index.vue +108 -108
- package/src/components/card/index.vue +70 -70
- package/src/components/collapsableInfoText/index.vue +96 -94
- package/src/components/deleteIcon/DeleteIcon.stories.js +4 -4
- package/src/components/deleteIcon/index.vue +54 -54
- package/src/components/draggableInputHandle/index.vue +37 -37
- package/src/components/dropdown/Dropdown.stories.js +9 -10
- package/src/components/dropdown/index.vue +106 -106
- package/src/components/errorMessage/index.vue +52 -52
- package/src/components/filter/filterSettings.vue +428 -422
- package/src/components/filter/index.vue +135 -135
- package/src/components/filter/parentDropdown.vue +73 -73
- package/src/components/icon/Icons.stories.js +7 -7
- package/src/components/icon/iconCollection.vue +53 -53
- package/src/components/icon/index.vue +122 -122
- package/src/components/iconWrapper/index.vue +156 -156
- package/src/components/infoCard/index.vue +30 -32
- package/src/components/infoText/index.vue +142 -137
- package/src/components/inputs/checkbox/Checkbox.stories.js +8 -8
- package/src/components/inputs/checkbox/index.vue +190 -180
- package/src/components/inputs/inputNumber/InputNumber.stories.js +41 -41
- package/src/components/inputs/inputNumber/index.vue +696 -696
- package/src/components/inputs/inputNumberQuestion/index.vue +185 -182
- package/src/components/inputs/inputText/InputText.stories.js +22 -22
- package/src/components/inputs/inputText/index.vue +337 -336
- package/src/components/inputs/radioButton/RadioButton.stories.js +16 -16
- package/src/components/inputs/radioButton/index.vue +222 -219
- package/src/components/inputs/searchInput/SearchInput.stories.js +8 -8
- package/src/components/inputs/searchInput/index.vue +127 -126
- package/src/components/inputs/select/index.vue +792 -791
- package/src/components/inputs/select/option/index.vue +124 -124
- package/src/components/inputs/select/select.stories.js +31 -32
- package/src/components/inputs/slider/index.vue +99 -99
- package/src/components/inputs/switchField/index.vue +220 -222
- package/src/components/inputs/textAreaInput/TextAreaInput.stories.js +57 -57
- package/src/components/inputs/textAreaInput/index.vue +171 -173
- package/src/components/inputs/toggle/Toggle.stories.js +14 -14
- package/src/components/inputs/toggle/index.vue +214 -217
- package/src/components/label/index.vue +82 -82
- package/src/components/markerItem/index.vue +68 -66
- package/src/components/modals/actionModal/index.vue +54 -54
- package/src/components/modals/infoModal/index.vue +39 -36
- package/src/components/modals/modal/index.vue +134 -134
- package/src/components/modals/modal/modal.stories.js +5 -5
- package/src/components/navigationTabs/index.vue +96 -94
- package/src/components/pageSubtitle/index.vue +55 -49
- package/src/components/pageTitle/index.vue +56 -56
- package/src/components/pagination/index.vue +92 -89
- package/src/components/progressBar/index.vue +107 -107
- package/src/components/projectMarker/index.vue +246 -244
- package/src/components/rangeSlider/Slider.vue +491 -465
- package/src/components/rangeSlider/index.vue +410 -410
- package/src/components/rangeSlider/utils/dom.js +5 -5
- package/src/components/selectedOptions/index.vue +119 -119
- package/src/components/sideMenu/index.vue +199 -199
- package/src/components/spinner/index.vue +57 -57
- package/src/components/tableDropdown/index.vue +520 -520
- package/src/components/tables/mainTable/index.vue +417 -400
- package/src/components/tables/viewTable/index.vue +171 -171
- package/src/components/threeDots/index.vue +340 -334
- package/src/components/videoThumbnail/index.vue +86 -86
- package/src/components/videoThumbnail/videoThumbnail.stories.js +14 -16
- package/src/helpers/numberConverter.js +2 -2
- package/src/helpers/translateLang.js +9 -9
- package/src/mixins/inputValidations.js +5 -5
- package/public/favicon.ico +0 -0
- package/public/index.html +0 -17
@@ -1,165 +1,170 @@
|
|
1
1
|
<template>
|
2
|
-
<
|
3
|
-
<
|
4
|
-
<
|
2
|
+
<ComponentWrapper>
|
3
|
+
<IconWrapper :size="size">
|
4
|
+
<IconImg
|
5
5
|
@click.prevent="toggleShowInfo()"
|
6
6
|
@mouseenter="openTrigger == 'onHover' ? toggleShowInfo() : ''"
|
7
7
|
@mouseleave="openTrigger == 'onHover' ? toggleShowInfo() : ''"
|
8
8
|
>
|
9
|
-
<
|
10
|
-
|
11
|
-
|
9
|
+
<IconComponent
|
10
|
+
:color="iconColor"
|
11
|
+
cursor="pointer"
|
12
|
+
name="info"
|
13
|
+
:size="size"
|
14
|
+
/>
|
15
|
+
</IconImg>
|
16
|
+
<TextOverlay
|
12
17
|
v-if="showInfo"
|
18
|
+
:align-arrow="alignArrow"
|
19
|
+
:half-computed-text-info-width="halfComputedTextInfoWidth"
|
20
|
+
:icon-size="size"
|
21
|
+
:max-width="maxWidth"
|
13
22
|
:width="width"
|
14
|
-
|
15
|
-
:alignArrow="alignArrow"
|
16
|
-
:iconSize="size"
|
17
|
-
:maxWidth="maxWidth"
|
18
|
-
><slot />
|
23
|
+
><slot></slot>
|
19
24
|
<span v-html="text"></span>
|
20
|
-
</
|
21
|
-
</
|
22
|
-
</
|
25
|
+
</TextOverlay>
|
26
|
+
</IconWrapper>
|
27
|
+
</ComponentWrapper>
|
23
28
|
</template>
|
24
29
|
|
25
30
|
<script>
|
26
|
-
// import InfoText from "@eturnity/eturnity_reusable_components/src/components/infoText"
|
27
|
-
//To use:
|
28
|
-
// <info-text
|
29
|
-
// text="Veritatis et quasi architecto beatae vitae"
|
30
|
-
// size="20px"
|
31
|
-
// alignArrow="right" // which side the arrow should be on
|
32
|
-
// />
|
33
|
-
import theme from '../../assets/theme.js'
|
34
|
-
import styled from 'vue3-styled-components'
|
35
|
-
import
|
31
|
+
// import InfoText from "@eturnity/eturnity_reusable_components/src/components/infoText"
|
32
|
+
//To use:
|
33
|
+
// <info-text
|
34
|
+
// text="Veritatis et quasi architecto beatae vitae"
|
35
|
+
// size="20px"
|
36
|
+
// alignArrow="right" // which side the arrow should be on
|
37
|
+
// />
|
38
|
+
import theme from '../../assets/theme.js'
|
39
|
+
import styled from 'vue3-styled-components'
|
40
|
+
import IconComponent from '../icon'
|
36
41
|
|
37
|
-
const textAttrs = {
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
}
|
43
|
-
const TextOverlay = styled('div', textAttrs)`
|
44
|
-
position: absolute;
|
45
|
-
top: ${(props) => 'calc(' + props.iconSize + ' + 15px)'};
|
46
|
-
${(props) =>
|
47
|
-
props.alignArrow === 'left'
|
48
|
-
? 'left: calc(' + props.iconSize + ' /2 - 18px)'
|
49
|
-
: props.alignArrow === 'center'
|
50
|
-
? 'left: calc((-' + props.width + ' + ' + props.iconSize + ') /2 + 2px)'
|
51
|
-
: 'right: calc(' + props.iconSize + ' /2 - 17px)'};
|
52
|
-
text-align: left;
|
53
|
-
background: ${(props) => props.theme.colors.black};
|
54
|
-
padding: 10px;
|
55
|
-
width: ${(props) => props.width};
|
56
|
-
max-width: ${(props) => props.maxWidth};
|
57
|
-
font-size: 13px;
|
58
|
-
font-weight: 400;
|
59
|
-
line-height: normal;
|
60
|
-
border-radius: 4px;
|
61
|
-
z-index: 99;
|
62
|
-
color: ${(props) => props.theme.colors.white};
|
63
|
-
|
64
|
-
:before {
|
65
|
-
content: '';
|
66
|
-
background-color: ${(props) => props.theme.colors.black};
|
42
|
+
const textAttrs = {
|
43
|
+
iconSize: String,
|
44
|
+
alignArrow: String,
|
45
|
+
width: String,
|
46
|
+
halfComputedTextInfoWidth: Number,
|
47
|
+
}
|
48
|
+
const TextOverlay = styled('div', textAttrs)`
|
67
49
|
position: absolute;
|
68
|
-
top:
|
50
|
+
top: ${(props) => 'calc(' + props.iconSize + ' + 15px)'};
|
69
51
|
${(props) =>
|
70
52
|
props.alignArrow === 'left'
|
71
|
-
? 'left:
|
72
|
-
: props.alignArrow
|
73
|
-
? 'left: calc(
|
74
|
-
: 'right
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
53
|
+
? 'left: calc(' + props.iconSize + ' /2 - 18px)'
|
54
|
+
: props.alignArrow === 'center'
|
55
|
+
? 'left: calc((-' + props.width + ' + ' + props.iconSize + ') /2 + 2px)'
|
56
|
+
: 'right: calc(' + props.iconSize + ' /2 - 17px)'};
|
57
|
+
text-align: left;
|
58
|
+
background: ${(props) => props.theme.colors.black};
|
59
|
+
padding: 10px;
|
60
|
+
width: ${(props) => props.width};
|
61
|
+
max-width: ${(props) => props.maxWidth};
|
62
|
+
font-size: 13px;
|
63
|
+
font-weight: 400;
|
64
|
+
line-height: normal;
|
65
|
+
border-radius: 4px;
|
66
|
+
z-index: 99;
|
67
|
+
color: ${(props) => props.theme.colors.white};
|
80
68
|
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
69
|
+
:before {
|
70
|
+
content: '';
|
71
|
+
background-color: ${(props) => props.theme.colors.black};
|
72
|
+
position: absolute;
|
73
|
+
top: 2px;
|
74
|
+
${(props) =>
|
75
|
+
props.alignArrow === 'left'
|
76
|
+
? 'left:40px;'
|
77
|
+
: props.alignArrow == 'center'
|
78
|
+
? 'left: calc(50% + 19px);'
|
79
|
+
: 'right:-13px;'};
|
80
|
+
height: 8px;
|
81
|
+
width: 8px;
|
82
|
+
transform-origin: center center;
|
83
|
+
transform: translate(-2em, -0.5em) rotate(45deg);
|
84
|
+
}
|
85
|
+
|
86
|
+
span a {
|
87
|
+
color: #2cc0eb;
|
88
|
+
}
|
89
|
+
`
|
85
90
|
|
86
|
-
const iconAttrs = { size: String }
|
87
|
-
const IconWrapper = styled('div', iconAttrs)`
|
88
|
-
|
89
|
-
|
90
|
-
`
|
91
|
+
const iconAttrs = { size: String }
|
92
|
+
const IconWrapper = styled('div', iconAttrs)`
|
93
|
+
position: relative;
|
94
|
+
height: ${(props) => props.size};
|
95
|
+
`
|
91
96
|
|
92
|
-
const IconImg = styled.div`
|
93
|
-
|
94
|
-
`
|
97
|
+
const IconImg = styled.div`
|
98
|
+
line-height: 0;
|
99
|
+
`
|
95
100
|
|
96
|
-
const ComponentWrapper = styled.div`
|
97
|
-
|
98
|
-
`
|
101
|
+
const ComponentWrapper = styled.div`
|
102
|
+
display: inline-block;
|
103
|
+
`
|
99
104
|
|
100
|
-
export default {
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
},
|
109
|
-
props: {
|
110
|
-
text: {
|
111
|
-
required: false
|
112
|
-
},
|
113
|
-
size: {
|
114
|
-
required: false,
|
115
|
-
default: '14px'
|
105
|
+
export default {
|
106
|
+
name: 'InfoText',
|
107
|
+
components: {
|
108
|
+
IconWrapper,
|
109
|
+
TextOverlay,
|
110
|
+
ComponentWrapper,
|
111
|
+
IconImg,
|
112
|
+
IconComponent,
|
116
113
|
},
|
117
|
-
|
118
|
-
|
119
|
-
|
114
|
+
props: {
|
115
|
+
text: {
|
116
|
+
required: false,
|
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
|
+
},
|
134
|
+
maxWidth: {
|
135
|
+
type: String,
|
136
|
+
default: '400px',
|
137
|
+
},
|
120
138
|
},
|
121
|
-
|
122
|
-
|
123
|
-
|
139
|
+
data() {
|
140
|
+
return {
|
141
|
+
showInfo: false,
|
142
|
+
}
|
124
143
|
},
|
125
|
-
|
126
|
-
|
127
|
-
|
144
|
+
computed: {
|
145
|
+
iconColor() {
|
146
|
+
return theme.colors.mediumGray
|
147
|
+
},
|
148
|
+
halfComputedTextInfoWidth() {
|
149
|
+
return parseInt(this.width) / 2
|
150
|
+
},
|
128
151
|
},
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
}
|
133
|
-
},
|
134
|
-
methods: {
|
135
|
-
toggleShowInfo() {
|
136
|
-
this.showInfo = !this.showInfo
|
152
|
+
methods: {
|
153
|
+
toggleShowInfo() {
|
154
|
+
this.showInfo = !this.showInfo
|
137
155
|
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
},
|
151
|
-
data() {
|
152
|
-
return {
|
153
|
-
showInfo: false
|
154
|
-
}
|
155
|
-
},
|
156
|
-
computed: {
|
157
|
-
iconColor() {
|
158
|
-
return theme.colors.mediumGray
|
156
|
+
if (this.showInfo) {
|
157
|
+
document.addEventListener('click', this.clickOutside)
|
158
|
+
} else {
|
159
|
+
document.removeEventListener('click', this.clickOutside)
|
160
|
+
}
|
161
|
+
},
|
162
|
+
clickOutside(event) {
|
163
|
+
if (this.$el.contains(event.target)) {
|
164
|
+
return
|
165
|
+
}
|
166
|
+
this.toggleShowInfo()
|
167
|
+
},
|
159
168
|
},
|
160
|
-
halfComputedTextInfoWidth() {
|
161
|
-
return parseInt(this.width) / 2
|
162
|
-
}
|
163
169
|
}
|
164
|
-
}
|
165
170
|
</script>
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import Checkbox from
|
1
|
+
import Checkbox from './index.vue'
|
2
2
|
|
3
3
|
export default {
|
4
|
-
title:
|
4
|
+
title: 'Checkbox',
|
5
5
|
component: Checkbox,
|
6
6
|
// argTypes: {},
|
7
7
|
}
|
@@ -29,29 +29,29 @@ const Template = (args, { argTypes }) => ({
|
|
29
29
|
export const Default = Template.bind({})
|
30
30
|
Default.args = {
|
31
31
|
isChecked: true,
|
32
|
-
size:
|
32
|
+
size: 'medium', // "small" or "medium"
|
33
33
|
isDisabled: false,
|
34
34
|
}
|
35
35
|
|
36
36
|
export const Small = Template.bind({})
|
37
37
|
Small.args = {
|
38
38
|
isChecked: true,
|
39
|
-
size:
|
39
|
+
size: 'small', // "small" or "medium"
|
40
40
|
isDisabled: false,
|
41
41
|
}
|
42
42
|
|
43
43
|
export const CustomColor = Template.bind({})
|
44
44
|
CustomColor.args = {
|
45
45
|
isChecked: true,
|
46
|
-
size:
|
47
|
-
checkColor:
|
48
|
-
backgroundColor:
|
46
|
+
size: 'medium', // "small" or "medium"
|
47
|
+
checkColor: 'blue',
|
48
|
+
backgroundColor: 'red',
|
49
49
|
isDisabled: false,
|
50
50
|
}
|
51
51
|
|
52
52
|
export const Disabled = Template.bind({})
|
53
53
|
Disabled.args = {
|
54
54
|
isChecked: false,
|
55
|
-
size:
|
55
|
+
size: 'medium', // "small" or "medium"
|
56
56
|
isDisabled: true,
|
57
57
|
}
|