@eturnity/eturnity_reusable_components 1.2.26-EPDM-3412.5 → 1.2.27
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/babel.config.js +1 -1
- package/package.json +1 -1
- package/src/App.vue +96 -56
- package/src/assets/theme.js +1 -3
- package/src/components/infoText/index.vue +54 -84
- package/src/components/inputs/inputNumber/index.vue +25 -130
- package/src/components/inputs/inputText/index.vue +38 -49
- package/src/components/inputs/radioButton/index.vue +1 -1
- package/src/components/inputs/searchInput/index.vue +15 -16
- package/src/components/inputs/textAreaInput/index.vue +8 -8
- package/src/components/inputs/toggle/index.vue +2 -2
- package/src/components/pageSubtitle/index.vue +1 -1
- package/src/components/tableDropdown/index.vue +79 -77
- package/src/components/tables/mainTable/index.vue +7 -6
- package/src/helpers/numberConverter.js +0 -4
- package/src/assets/icons/error_icon copy.png +0 -0
- package/src/components/errorMessage/index.vue +0 -62
package/babel.config.js
CHANGED
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -2,61 +2,80 @@
|
|
|
2
2
|
<ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
|
|
3
3
|
<page-container>
|
|
4
4
|
<br />
|
|
5
|
-
<
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
5
|
+
<!-- <modal backdrop="dark" :isLoading="false" :isOpen="false"> -->
|
|
6
|
+
<!-- <main-table titleText="My Table">
|
|
7
|
+
<thead>
|
|
8
|
+
<tr>
|
|
9
|
+
<th>Column 1</th>
|
|
10
|
+
<th>Column 2</th>
|
|
11
|
+
<th>Column 3</th>
|
|
12
|
+
<div />
|
|
13
|
+
</tr>
|
|
14
|
+
</thead>
|
|
15
|
+
<tbody>
|
|
16
|
+
<tr> -->
|
|
17
|
+
<!-- <table-dropdown
|
|
18
|
+
:colSpan="3"
|
|
19
|
+
:tableItems="getDropdownValues()"
|
|
20
|
+
@toggle-dropdown-open="toggleDropdownOpen()"
|
|
21
|
+
@item-selected="onItemSelected({ item: $event, index })"
|
|
22
|
+
:isOpen="isDropdownOpen()"
|
|
23
|
+
:optionItems="itemOptions"
|
|
24
|
+
:optionsDisplay="['display_name', 'company_item_number', 'model']"
|
|
25
|
+
/> -->
|
|
26
|
+
<!-- <td>Test</td>
|
|
27
|
+
<div class="icons-container">
|
|
28
|
+
<three-dots :options="listOptions" :isLoading="false" />
|
|
29
|
+
</div>
|
|
30
|
+
</tr>
|
|
31
|
+
</tbody>
|
|
32
|
+
</main-table>
|
|
33
|
+
</modal>
|
|
34
|
+
<row-container>
|
|
35
|
+
<div v-for="(item, index) in markersArray" :key="item.index">
|
|
36
|
+
<project-marker
|
|
37
|
+
:activeLanguage="'en-us'"
|
|
38
|
+
:markerData="item"
|
|
39
|
+
:isLimitedPartner="false"
|
|
40
|
+
:isGroupSupport="false"
|
|
41
|
+
:isEditable="true"
|
|
42
|
+
:gettext="gettext"
|
|
43
|
+
:date="'23.07.2022'"
|
|
44
|
+
@editHandler="consoleLog('edit index ' + index)"
|
|
45
|
+
@deleteHandler="consoleLog('delete id ' + item.id)"
|
|
46
|
+
/>
|
|
47
|
+
</div>
|
|
48
|
+
</row-container>
|
|
36
49
|
<br />
|
|
37
|
-
|
|
38
|
-
<
|
|
50
|
+
<iconCollection />
|
|
51
|
+
<br />
|
|
52
|
+
<toggle
|
|
53
|
+
@on-toggle-change="onInputChange($event)"
|
|
54
|
+
:isChecked="inputValue"
|
|
55
|
+
label="My Label Text"
|
|
56
|
+
infoTextMessage="This is my test message"
|
|
57
|
+
infoTextAlign="right"
|
|
58
|
+
labelAlign="right"
|
|
59
|
+
:disabled="false"
|
|
60
|
+
/>
|
|
61
|
+
<br /> -->
|
|
62
|
+
<iconCollection />
|
|
39
63
|
<input-text
|
|
40
|
-
placeholder="
|
|
64
|
+
placeholder="Enter distance"
|
|
41
65
|
:value="inputValue"
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
infoTextAlign="right"
|
|
45
|
-
infoTextMessage="My info message"
|
|
46
|
-
label="Question 5"
|
|
47
|
-
alignItems="vertical"
|
|
48
|
-
inputWidth="250px"
|
|
49
|
-
minWidth="100px"
|
|
66
|
+
@input-change="onInputChange($event)"
|
|
67
|
+
type="password"
|
|
50
68
|
/>
|
|
51
69
|
<br />
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/>
|
|
70
|
+
<!-- <page-subtitle text="My Subtitle" infoText="My info Text" />
|
|
71
|
+
<spinner size="30px" />
|
|
72
|
+
<checkbox
|
|
73
|
+
label="Do you accept the Terms?"
|
|
74
|
+
:isChecked="true"
|
|
75
|
+
size="small"
|
|
76
|
+
:isDisabled="false"
|
|
77
|
+
/> -->
|
|
78
|
+
<!-- <external-button text="Click me!" minWidth="500px" /> -->
|
|
60
79
|
</page-container>
|
|
61
80
|
</ThemeProvider>
|
|
62
81
|
</template>
|
|
@@ -65,8 +84,17 @@
|
|
|
65
84
|
import { ThemeProvider } from 'vue-styled-components'
|
|
66
85
|
import theme from './assets/theme'
|
|
67
86
|
import styled from 'vue-styled-components'
|
|
68
|
-
import
|
|
87
|
+
// import MainTable from '@/components/tables/mainTable'
|
|
88
|
+
// import ThreeDots from '@/components/threeDots'
|
|
89
|
+
// import Toggle from '@/components/inputs/toggle'
|
|
69
90
|
import InputText from '@/components/inputs/inputText'
|
|
91
|
+
// import Checkbox from '@/components/inputs/checkbox'
|
|
92
|
+
// import PageSubtitle from '@/components/pageSubtitle'
|
|
93
|
+
// import Spinner from '@/components/spinner'
|
|
94
|
+
// import ExternalButton from '@/components/buttons/externalButton'
|
|
95
|
+
// import ProjectMarker from '@/components/projectMarker'
|
|
96
|
+
import iconCollection from '@/components/icon/iconCollection'
|
|
97
|
+
// import Modal from '@/components/modals/modal'
|
|
70
98
|
// import TableDropdown from "@/components/tableDropdown"
|
|
71
99
|
|
|
72
100
|
const PageContainer = styled.div`
|
|
@@ -84,12 +112,21 @@ export default {
|
|
|
84
112
|
components: {
|
|
85
113
|
ThemeProvider,
|
|
86
114
|
PageContainer,
|
|
87
|
-
|
|
88
|
-
|
|
115
|
+
// MainTable,
|
|
116
|
+
// ThreeDots,
|
|
117
|
+
// Toggle,
|
|
118
|
+
InputText,
|
|
119
|
+
// PageSubtitle,
|
|
120
|
+
// Spinner,
|
|
121
|
+
// Checkbox,
|
|
122
|
+
// ExternalButton,
|
|
123
|
+
// Modal,
|
|
124
|
+
// ProjectMarker,
|
|
125
|
+
iconCollection
|
|
126
|
+
// RowContainer
|
|
89
127
|
},
|
|
90
128
|
data() {
|
|
91
129
|
return {
|
|
92
|
-
num: 42,
|
|
93
130
|
inputValue: null,
|
|
94
131
|
checkedOption: 'button_1',
|
|
95
132
|
question: {
|
|
@@ -215,8 +252,11 @@ export default {
|
|
|
215
252
|
}
|
|
216
253
|
},
|
|
217
254
|
methods: {
|
|
218
|
-
|
|
219
|
-
console.log(
|
|
255
|
+
consoleLog(data) {
|
|
256
|
+
console.log(data)
|
|
257
|
+
},
|
|
258
|
+
gettext(string) {
|
|
259
|
+
return string.toUpperCase()
|
|
220
260
|
},
|
|
221
261
|
getTheme() {
|
|
222
262
|
return theme
|
package/src/assets/theme.js
CHANGED
|
@@ -1,26 +1,35 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component-wrapper>
|
|
3
|
-
<icon-wrapper
|
|
3
|
+
<icon-wrapper>
|
|
4
4
|
<icon-img
|
|
5
5
|
:isActive="showInfo"
|
|
6
6
|
:size="size"
|
|
7
7
|
:borderColor="borderColor"
|
|
8
8
|
@click.prevent="toggleShowInfo()"
|
|
9
|
-
@mouseenter="
|
|
10
|
-
@mouseleave="
|
|
9
|
+
@mouseenter="toggleShowInfo()"
|
|
10
|
+
@mouseleave="toggleShowInfo()"
|
|
11
11
|
>
|
|
12
|
-
<
|
|
12
|
+
<svg
|
|
13
|
+
class="img-icon"
|
|
14
|
+
:width="size"
|
|
15
|
+
:height="size"
|
|
16
|
+
viewBox="0 0 24 24"
|
|
17
|
+
fill="none"
|
|
18
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
19
|
+
>
|
|
20
|
+
<path
|
|
21
|
+
class="img-icon"
|
|
22
|
+
d="M20.4853 3.51469C18.2188 1.24823 15.2053 0 12 0C8.79469 0 5.78123 1.24823 3.51469 3.51469C1.24823 5.78123 0 8.79469 0 12C0 15.2053 1.24823 18.2188 3.51469 20.4853C5.78123 22.7518 8.79469 24 12 24C15.2053 24 18.2188 22.7518 20.4853 20.4853C22.7518 18.2188 24 15.2053 24 12C24 8.79469 22.7518 5.78123 20.4853 3.51469ZM12 3.28125C13.4216 3.28125 14.5781 4.4378 14.5781 5.85938C14.5781 7.28095 13.4216 8.4375 12 8.4375C10.5784 8.4375 9.42188 7.28095 9.42188 5.85938C9.42188 4.4378 10.5784 3.28125 12 3.28125ZM15.2812 19.6875H8.71875V18.2812H10.125V11.9167H8.71875V10.5104H13.875V18.2812H15.2812V19.6875Z"
|
|
23
|
+
fill="#D5D5D5"
|
|
24
|
+
/>
|
|
25
|
+
</svg>
|
|
13
26
|
</icon-img>
|
|
14
27
|
<text-overlay
|
|
15
28
|
v-if="showInfo"
|
|
16
29
|
:borderColor="borderColor"
|
|
17
30
|
:alignText="alignText"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
:alignArrow="alignArrow"
|
|
21
|
-
:iconSize="size"
|
|
22
|
-
><slot />
|
|
23
|
-
<span v-html="text"></span>
|
|
31
|
+
>
|
|
32
|
+
{{ text }}
|
|
24
33
|
</text-overlay>
|
|
25
34
|
</icon-wrapper>
|
|
26
35
|
</component-wrapper>
|
|
@@ -35,31 +44,22 @@
|
|
|
35
44
|
// size="20"
|
|
36
45
|
// alignText="right" // default is left
|
|
37
46
|
// />
|
|
38
|
-
import theme from '../../assets/theme.js'
|
|
39
|
-
import styled from 'vue-styled-components'
|
|
40
|
-
import icon from '../icon'
|
|
41
47
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
const TextOverlay = styled('div', textAttrs)`
|
|
48
|
+
import styled from "vue-styled-components"
|
|
49
|
+
|
|
50
|
+
const IconWrapper = styled.div`
|
|
51
|
+
position: relative;
|
|
52
|
+
`
|
|
53
|
+
|
|
54
|
+
const textAttrs = { borderColor: String, alignText: String }
|
|
55
|
+
const TextOverlay = styled("div", textAttrs)`
|
|
51
56
|
position: absolute;
|
|
52
|
-
top:
|
|
53
|
-
${(props) =>
|
|
54
|
-
|
|
55
|
-
? 'left: calc(' + props.iconSize + ' /2 - 18px)'
|
|
56
|
-
: props.alignArrow === 'center'
|
|
57
|
-
? 'left: calc((-' + props.width + ' + ' + props.iconSize + ') /2 + 2px)'
|
|
58
|
-
: 'right: calc(' + props.iconSize + ' /2 - 17px)'};
|
|
59
|
-
text-align: ${(props) => props.alignText};
|
|
57
|
+
top: 26px;
|
|
58
|
+
right: ${(props) => (props.alignText === "left" ? "-10px" : "inherit")};
|
|
59
|
+
left: ${(props) => (props.alignText === "left" ? "inherit" : "-10px")};
|
|
60
60
|
background: ${(props) => props.theme.colors.black};
|
|
61
61
|
padding: 10px;
|
|
62
|
-
width:
|
|
62
|
+
width: max-content;
|
|
63
63
|
max-width: 400px;
|
|
64
64
|
font-size: 13px;
|
|
65
65
|
font-weight: 400;
|
|
@@ -68,37 +68,32 @@ const TextOverlay = styled('div', textAttrs)`
|
|
|
68
68
|
color: ${(props) => props.theme.colors.white};
|
|
69
69
|
|
|
70
70
|
:before {
|
|
71
|
-
content:
|
|
71
|
+
content: "";
|
|
72
72
|
background-color: ${(props) => props.theme.colors.black};
|
|
73
73
|
position: absolute;
|
|
74
74
|
top: 2px;
|
|
75
|
-
${(props) =>
|
|
76
|
-
|
|
77
|
-
? 'left:40px;'
|
|
78
|
-
: props.alignArrow == 'center'
|
|
79
|
-
? 'left: calc(50% + 19px);'
|
|
80
|
-
: 'right:-13px;'};
|
|
75
|
+
right: ${(props) => (props.alignText === "left" ? "-12px" : "inherit")};
|
|
76
|
+
left: ${(props) => (props.alignText === "left" ? "inherit" : "40px")};
|
|
81
77
|
height: 8px;
|
|
82
78
|
width: 8px;
|
|
83
79
|
transform-origin: center center;
|
|
84
80
|
transform: translate(-2em, -0.5em) rotate(45deg);
|
|
85
81
|
}
|
|
86
|
-
|
|
87
|
-
span a {
|
|
88
|
-
color: #2cc0eb;
|
|
89
|
-
}
|
|
90
82
|
`
|
|
91
83
|
|
|
92
84
|
const iconAttrs = { isActive: Boolean, size: String, borderColor: String }
|
|
93
|
-
|
|
94
|
-
const IconWrapper = styled('div', iconAttrs)`
|
|
95
|
-
position: relative;
|
|
96
|
-
top: 1px;
|
|
97
|
-
height: ${(props) => props.size};
|
|
98
|
-
`
|
|
99
|
-
const IconImg = styled('div', iconAttrs)`
|
|
85
|
+
const IconImg = styled("div", iconAttrs)`
|
|
100
86
|
cursor: pointer;
|
|
101
|
-
height: ${(props) => props.size};
|
|
87
|
+
height: ${(props) => props.size + "px"};
|
|
88
|
+
|
|
89
|
+
.img-icon {
|
|
90
|
+
fill: ${(props) =>
|
|
91
|
+
props.isActive
|
|
92
|
+
? props.borderColor
|
|
93
|
+
? props.borderColor
|
|
94
|
+
: props.theme.colors.secondary
|
|
95
|
+
: props.theme.colors.mediumGray};
|
|
96
|
+
}
|
|
102
97
|
`
|
|
103
98
|
|
|
104
99
|
const ComponentWrapper = styled.div`
|
|
@@ -106,51 +101,38 @@ const ComponentWrapper = styled.div`
|
|
|
106
101
|
`
|
|
107
102
|
|
|
108
103
|
export default {
|
|
109
|
-
name:
|
|
104
|
+
name: "info-text",
|
|
110
105
|
components: {
|
|
111
106
|
IconWrapper,
|
|
112
107
|
TextOverlay,
|
|
113
108
|
ComponentWrapper,
|
|
114
109
|
IconImg,
|
|
115
|
-
icon
|
|
116
110
|
},
|
|
117
111
|
props: {
|
|
118
112
|
text: {
|
|
119
|
-
required:
|
|
113
|
+
required: true,
|
|
120
114
|
},
|
|
121
115
|
borderColor: {
|
|
122
116
|
required: false,
|
|
123
|
-
default: null
|
|
117
|
+
default: null,
|
|
124
118
|
},
|
|
125
119
|
size: {
|
|
126
120
|
required: false,
|
|
127
|
-
default:
|
|
121
|
+
default: "20",
|
|
128
122
|
},
|
|
129
123
|
alignText: {
|
|
130
124
|
required: false,
|
|
131
|
-
default:
|
|
132
|
-
},
|
|
133
|
-
alignArrow: {
|
|
134
|
-
required: false,
|
|
135
|
-
default: 'center'
|
|
125
|
+
default: "left", // "left" or "right"
|
|
136
126
|
},
|
|
137
|
-
openTrigger: {
|
|
138
|
-
required: false,
|
|
139
|
-
default: 'onClick'
|
|
140
|
-
},
|
|
141
|
-
width: {
|
|
142
|
-
required: false,
|
|
143
|
-
default: '165px'
|
|
144
|
-
}
|
|
145
127
|
},
|
|
146
128
|
methods: {
|
|
147
129
|
toggleShowInfo() {
|
|
148
130
|
this.showInfo = !this.showInfo
|
|
149
131
|
|
|
150
132
|
if (this.showInfo) {
|
|
151
|
-
document.addEventListener(
|
|
133
|
+
document.addEventListener("click", this.clickOutside)
|
|
152
134
|
} else {
|
|
153
|
-
document.removeEventListener(
|
|
135
|
+
document.removeEventListener("click", this.clickOutside)
|
|
154
136
|
}
|
|
155
137
|
},
|
|
156
138
|
clickOutside(event) {
|
|
@@ -158,24 +140,12 @@ export default {
|
|
|
158
140
|
return
|
|
159
141
|
}
|
|
160
142
|
this.toggleShowInfo()
|
|
161
|
-
}
|
|
143
|
+
},
|
|
162
144
|
},
|
|
163
145
|
data() {
|
|
164
146
|
return {
|
|
165
|
-
showInfo: false
|
|
147
|
+
showInfo: false,
|
|
166
148
|
}
|
|
167
149
|
},
|
|
168
|
-
computed: {
|
|
169
|
-
iconColor() {
|
|
170
|
-
return this.isActive
|
|
171
|
-
? this.borderColor
|
|
172
|
-
? this.borderColor
|
|
173
|
-
: theme.colors.secondary
|
|
174
|
-
: theme.colors.mediumGray
|
|
175
|
-
},
|
|
176
|
-
halfComputedTextInfoWidth() {
|
|
177
|
-
return parseInt(this.width) / 2
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
150
|
}
|
|
181
151
|
</script>
|