@eturnity/eturnity_reusable_components 1.2.26-3d-master.1 → 1.2.26-EPDM-5784
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 +32 -87
- package/src/assets/svgIcons/map_icon.svg +2 -4
- package/src/assets/svgIcons/obstacle_tool.svg +11 -7
- package/src/assets/theme.js +0 -2
- package/src/components/icon/index.vue +10 -11
- package/src/components/infoText/index.vue +53 -68
- package/src/components/inputs/inputNumber/index.vue +34 -199
- package/src/components/inputs/inputText/index.vue +3 -8
- package/src/components/inputs/radioButton/index.vue +1 -1
- package/src/components/inputs/textAreaInput/index.vue +2 -7
- package/src/components/inputs/toggle/index.vue +2 -2
- package/src/components/modals/modal/index.vue +2 -7
- package/src/components/pageSubtitle/index.vue +1 -1
- package/src/helpers/numberConverter.js +0 -5
- package/src/assets/icons/error_icon copy.png +0 -0
- package/src/assets/svgIcons/areas_tool.svg +0 -14
- package/src/assets/svgIcons/base_layer.svg +0 -3
- package/src/assets/svgIcons/direction_arrow.svg +0 -4
- package/src/assets/svgIcons/distance_tool.svg +0 -8
- package/src/assets/svgIcons/distort_tool.svg +0 -10
- package/src/assets/svgIcons/distort_tool2.svg +0 -16
- package/src/assets/svgIcons/draggable_corner.svg +0 -5
- package/src/assets/svgIcons/draw_tool.svg +0 -3
- package/src/assets/svgIcons/magic_tool.svg +0 -6
- package/src/assets/svgIcons/map_settings.svg +0 -3
- package/src/assets/svgIcons/margin_tool.svg +0 -4
- package/src/assets/svgIcons/obstacle_tool_origin.svg +0 -3
- package/src/assets/svgIcons/opacity.svg +0 -1
- package/src/assets/svgIcons/outline_tool.svg +0 -11
- package/src/assets/svgIcons/redo.svg +0 -6
- package/src/assets/svgIcons/resizer.svg +0 -5
- package/src/assets/svgIcons/roof_layer.svg +0 -3
- package/src/assets/svgIcons/rotate_tool.svg +0 -3
- package/src/assets/svgIcons/ruler_tool.svg +0 -3
- package/src/assets/svgIcons/trim_tool.svg +0 -4
- package/src/assets/svgIcons/undo.svg +0 -6
- package/src/assets/svgIcons/vertical_tool.svg +0 -3
- package/src/components/errorMessage/index.vue +0 -62
- package/src/components/iconWrapper/index.vue +0 -116
package/babel.config.js
CHANGED
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -2,13 +2,8 @@
|
|
|
2
2
|
<ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
|
|
3
3
|
<page-container>
|
|
4
4
|
<br />
|
|
5
|
-
|
|
6
|
-
<
|
|
7
|
-
<modal backdrop="dark" :isLoading="false" :isOpen="true">
|
|
8
|
-
|
|
9
|
-
<modal backdrop="dark" :isLoading="false" :isOpen="false">
|
|
10
|
-
|
|
11
|
-
<main-table titleText="My Table">
|
|
5
|
+
<!-- <modal backdrop="dark" :isLoading="false" :isOpen="false"> -->
|
|
6
|
+
<!-- <main-table titleText="My Table">
|
|
12
7
|
<thead>
|
|
13
8
|
<tr>
|
|
14
9
|
<th>Column 1</th>
|
|
@@ -63,55 +58,6 @@
|
|
|
63
58
|
labelAlign="right"
|
|
64
59
|
:disabled="false"
|
|
65
60
|
/>
|
|
66
|
-
<<<<<<< HEAD
|
|
67
|
-
<br />
|
|
68
|
-
>>>>>>> EPDM-5448
|
|
69
|
-
<input-number
|
|
70
|
-
:value="inputValue"
|
|
71
|
-
@input-change="inputValue = $event"
|
|
72
|
-
inputWidth="250px"
|
|
73
|
-
slotSize="50%"
|
|
74
|
-
><InputAnnexContainer>
|
|
75
|
-
<span>123m2</span>
|
|
76
|
-
<info-text size="10px" alignArrow="right" text="infoText ceci est le text"></info-text>
|
|
77
|
-
</InputAnnexContainer>
|
|
78
|
-
</input-number>
|
|
79
|
-
<input-number
|
|
80
|
-
:value="inputValue"
|
|
81
|
-
@input-change="inputValue = $event"
|
|
82
|
-
inputWidth="250px"
|
|
83
|
-
slotSize="50%"
|
|
84
|
-
:isError="true"
|
|
85
|
-
><InputAnnexContainer>
|
|
86
|
-
<span>123m2</span>
|
|
87
|
-
<info-text :style="{'justify-self': 'end'}" size="12px" alignArrow="center" text="infoText ceci est le text">This is the tooltip text</info-text>
|
|
88
|
-
</InputAnnexContainer>
|
|
89
|
-
</input-number>
|
|
90
|
-
<br />
|
|
91
|
-
|
|
92
|
-
<p>InputText</p>
|
|
93
|
-
<input-text
|
|
94
|
-
placeholder="Company name"
|
|
95
|
-
:value="inputValue"
|
|
96
|
-
:isError="true"
|
|
97
|
-
errorMessage="This is my error message"
|
|
98
|
-
infoTextAlign="right"
|
|
99
|
-
infoTextMessage="My info message"
|
|
100
|
-
label="Question 5"
|
|
101
|
-
alignItems="vertical"
|
|
102
|
-
inputWidth="250px"
|
|
103
|
-
minWidth="100px"
|
|
104
|
-
/>
|
|
105
|
-
<br/>
|
|
106
|
-
<input-number
|
|
107
|
-
:value="num"
|
|
108
|
-
@input-change="num = $event"
|
|
109
|
-
unitName="t"
|
|
110
|
-
id="biebie"
|
|
111
|
-
test="koko"
|
|
112
|
-
@keydown="keydownHandler"
|
|
113
|
-
/>
|
|
114
|
-
=======
|
|
115
61
|
<br /> -->
|
|
116
62
|
<iconCollection />
|
|
117
63
|
<input-text
|
|
@@ -130,30 +76,26 @@
|
|
|
130
76
|
:isDisabled="false"
|
|
131
77
|
/> -->
|
|
132
78
|
<!-- <external-button text="Click me!" minWidth="500px" /> -->
|
|
133
|
-
>>>>>>> master
|
|
134
79
|
</page-container>
|
|
135
80
|
</ThemeProvider>
|
|
136
81
|
</template>
|
|
137
82
|
|
|
138
83
|
<script>
|
|
139
|
-
import { ThemeProvider } from
|
|
140
|
-
import theme from
|
|
141
|
-
import styled from
|
|
142
|
-
import MainTable from
|
|
143
|
-
import ThreeDots from
|
|
144
|
-
import Toggle from
|
|
145
|
-
import
|
|
146
|
-
import Checkbox from
|
|
147
|
-
import PageSubtitle from
|
|
148
|
-
import Spinner from
|
|
149
|
-
import ExternalButton from
|
|
150
|
-
import
|
|
84
|
+
import { ThemeProvider } from 'vue-styled-components'
|
|
85
|
+
import theme from './assets/theme'
|
|
86
|
+
import styled from 'vue-styled-components'
|
|
87
|
+
// import MainTable from '@/components/tables/mainTable'
|
|
88
|
+
// import ThreeDots from '@/components/threeDots'
|
|
89
|
+
// import Toggle from '@/components/inputs/toggle'
|
|
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'
|
|
151
98
|
// import TableDropdown from "@/components/tableDropdown"
|
|
152
|
-
const InputAnnexContainer = styled.div`
|
|
153
|
-
display: grid;
|
|
154
|
-
grid-template-columns: auto auto;
|
|
155
|
-
grid-gap: 10px;
|
|
156
|
-
`
|
|
157
99
|
|
|
158
100
|
const PageContainer = styled.div`
|
|
159
101
|
padding: 40px;
|
|
@@ -170,21 +112,21 @@ export default {
|
|
|
170
112
|
components: {
|
|
171
113
|
ThemeProvider,
|
|
172
114
|
PageContainer,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
Checkbox,
|
|
115
|
+
// MainTable,
|
|
116
|
+
// ThreeDots,
|
|
117
|
+
// Toggle,
|
|
177
118
|
InputText,
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
119
|
+
// PageSubtitle,
|
|
120
|
+
// Spinner,
|
|
121
|
+
// Checkbox,
|
|
122
|
+
// ExternalButton,
|
|
123
|
+
// Modal,
|
|
124
|
+
// ProjectMarker,
|
|
125
|
+
iconCollection
|
|
126
|
+
// RowContainer
|
|
184
127
|
},
|
|
185
128
|
data() {
|
|
186
129
|
return {
|
|
187
|
-
num: 42,
|
|
188
130
|
inputValue: null,
|
|
189
131
|
checkedOption: 'button_1',
|
|
190
132
|
question: {
|
|
@@ -310,8 +252,11 @@ export default {
|
|
|
310
252
|
}
|
|
311
253
|
},
|
|
312
254
|
methods: {
|
|
313
|
-
|
|
314
|
-
console.log(
|
|
255
|
+
consoleLog(data) {
|
|
256
|
+
console.log(data)
|
|
257
|
+
},
|
|
258
|
+
gettext(string) {
|
|
259
|
+
return string.toUpperCase()
|
|
315
260
|
},
|
|
316
261
|
getTheme() {
|
|
317
262
|
return theme
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
<svg
|
|
2
|
-
<path
|
|
3
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M4.25 13V3H5.75V13H4.25Z" fill="white"/>
|
|
4
|
-
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.25 11V1H9.75V11H8.25Z" fill="white"/>
|
|
1
|
+
<svg fill="none" height="14" viewbox="13 13 14 14" width="14" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M21.3333 15V24H22.1281L21.9394 24.0809L17.6667 25.912L14 24.3406V14.5165L17.2727 15.9191L17.4614 16H16.6667V25H18.6667V16H17.8719L18.0606 15.9191L22.3333 14.088L26 15.6594V25.4835L22.7273 24.0809L22.5386 24H23.3333V15H21.3333Z" stroke="#B2B9C5" stroke-width="2"></path>
|
|
5
3
|
</svg>
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
<svg fill="none" height="
|
|
2
|
-
<
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
<rect
|
|
1
|
+
<svg fill="none" height="23" viewbox="6 12 34 23" width="34" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<mask height="14" id="mask0_6458_86453" maskunits="userSpaceOnUse" style="mask-type:alpha" width="14" x="13" y="13">
|
|
3
|
+
<rect fill="#FF5656" height="14" width="14" x="13" y="13"></rect>
|
|
4
|
+
</mask>
|
|
5
|
+
<g mask="url(#mask0_6458_86453)">
|
|
6
|
+
<rect fill="#FF5656" height="1.55556" transform="rotate(-45 6.77783 21.6267)" width="21" x="6.77783" y="21.6267"></rect>
|
|
7
|
+
<rect fill="#FF5656" height="1.55556" transform="rotate(-45 8.97803 23.8269)" width="21" x="8.97803" y="23.8269"></rect>
|
|
8
|
+
<rect fill="#FF5656" height="1.55556" transform="rotate(-45 11.1777 26.0269)" width="21" x="11.1777" y="26.0269"></rect>
|
|
9
|
+
<rect fill="#FF5656" height="1.55556" transform="rotate(-45 13.3774 28.2266)" width="21" x="13.3774" y="28.2266"></rect>
|
|
10
|
+
<rect fill="#FF5656" height="1.55556" transform="rotate(-45 15.5771 30.4265)" width="21" x="15.5771" y="30.4265"></rect>
|
|
11
|
+
<rect fill="#FF5656" height="1.55556" transform="rotate(-45 17.7773 32.6262)" width="21" x="17.7773" y="32.6262"></rect>
|
|
8
12
|
</g>
|
|
9
13
|
</svg>
|
package/src/assets/theme.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<wrapper :isDisabled="isDisabled" :size="size" :cursor="cursor">
|
|
3
3
|
<icon-image
|
|
4
|
-
:disabled="disabled"
|
|
5
4
|
:size="size"
|
|
6
5
|
:color="color"
|
|
7
6
|
:hoveredColor="hoveredColor"
|
|
@@ -9,7 +8,7 @@
|
|
|
9
8
|
require(`!html-loader!./../../assets/svgIcons/${name.toLowerCase()}.svg`)
|
|
10
9
|
"
|
|
11
10
|
></icon-image>
|
|
12
|
-
</
|
|
11
|
+
</wrapper>
|
|
13
12
|
</template>
|
|
14
13
|
|
|
15
14
|
<script>
|
|
@@ -36,14 +35,14 @@ const Wrapper = styled('div', wrapperAttrs)`
|
|
|
36
35
|
const IconImageProps = { color: String, hoveredColor: String, size: String }
|
|
37
36
|
const IconImage = styled('div', IconImageProps)`
|
|
38
37
|
svg {
|
|
39
|
-
width:
|
|
40
|
-
height:
|
|
38
|
+
width: ${(props) => props.size};
|
|
39
|
+
height: ${(props) => props.size};
|
|
41
40
|
}
|
|
42
|
-
svg path {
|
|
41
|
+
svg > path {
|
|
43
42
|
${(props) =>
|
|
44
43
|
props.color && `fill: ${props.theme.colors[props.color] || props.color};`}
|
|
45
44
|
}
|
|
46
|
-
&:hover > svg path {
|
|
45
|
+
&:hover > svg > path {
|
|
47
46
|
${(props) => props.hoveredColor && `fill: ${props.hoveredColor};`}
|
|
48
47
|
}
|
|
49
48
|
`
|
|
@@ -51,11 +50,11 @@ const IconImage = styled('div', IconImageProps)`
|
|
|
51
50
|
export default {
|
|
52
51
|
name: 'icon',
|
|
53
52
|
components: {
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
Wrapper,
|
|
54
|
+
IconImage
|
|
56
55
|
},
|
|
57
56
|
props: {
|
|
58
|
-
|
|
57
|
+
isDisabled: {
|
|
59
58
|
required: false,
|
|
60
59
|
default: false
|
|
61
60
|
},
|
|
@@ -74,7 +73,7 @@ export default {
|
|
|
74
73
|
},
|
|
75
74
|
cursor: {
|
|
76
75
|
required: false,
|
|
77
|
-
default:
|
|
76
|
+
default: 'pointer'
|
|
78
77
|
}
|
|
79
78
|
},
|
|
80
79
|
data() {
|
|
@@ -1,25 +1,34 @@
|
|
|
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
|
-
:halfComputedTextInfoWidth="halfComputedTextInfoWidth"
|
|
20
|
-
:alignArrow="alignArrow"
|
|
21
|
-
:iconSize="size"
|
|
22
|
-
><slot />
|
|
31
|
+
>
|
|
23
32
|
{{ text }}
|
|
24
33
|
</text-overlay>
|
|
25
34
|
</icon-wrapper>
|
|
@@ -35,23 +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
|
-
|
|
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)`
|
|
44
56
|
position: absolute;
|
|
45
|
-
top:
|
|
46
|
-
${(props) => (props.
|
|
47
|
-
|
|
48
|
-
: props.alignArrow === 'center'
|
|
49
|
-
? 'left: calc((-'+props.width+' + '+props.iconSize+') /2 + 2px)'
|
|
50
|
-
: 'right: calc('+props.iconSize+' /2 - 17px)')};
|
|
51
|
-
text-align: ${(props) => props.alignText};
|
|
57
|
+
top: 26px;
|
|
58
|
+
right: ${(props) => (props.alignText === "left" ? "-10px" : "inherit")};
|
|
59
|
+
left: ${(props) => (props.alignText === "left" ? "inherit" : "-10px")};
|
|
52
60
|
background: ${(props) => props.theme.colors.black};
|
|
53
61
|
padding: 10px;
|
|
54
|
-
width:
|
|
62
|
+
width: max-content;
|
|
55
63
|
max-width: 400px;
|
|
56
64
|
font-size: 13px;
|
|
57
65
|
font-weight: 400;
|
|
@@ -60,13 +68,12 @@ const TextOverlay = styled('div', textAttrs)`
|
|
|
60
68
|
color: ${(props) => props.theme.colors.white};
|
|
61
69
|
|
|
62
70
|
:before {
|
|
63
|
-
content:
|
|
71
|
+
content: "";
|
|
64
72
|
background-color: ${(props) => props.theme.colors.black};
|
|
65
73
|
position: absolute;
|
|
66
74
|
top: 2px;
|
|
67
|
-
${(props) => (props.
|
|
68
|
-
props.
|
|
69
|
-
'right:-13px;')};
|
|
75
|
+
right: ${(props) => (props.alignText === "left" ? "-12px" : "inherit")};
|
|
76
|
+
left: ${(props) => (props.alignText === "left" ? "inherit" : "40px")};
|
|
70
77
|
height: 8px;
|
|
71
78
|
width: 8px;
|
|
72
79
|
transform-origin: center center;
|
|
@@ -75,15 +82,18 @@ const TextOverlay = styled('div', textAttrs)`
|
|
|
75
82
|
`
|
|
76
83
|
|
|
77
84
|
const iconAttrs = { isActive: Boolean, size: String, borderColor: String }
|
|
78
|
-
|
|
79
|
-
const IconWrapper = styled('div', iconAttrs)`
|
|
80
|
-
position: relative;
|
|
81
|
-
top: 1px;
|
|
82
|
-
height: ${(props) => props.size};
|
|
83
|
-
`
|
|
84
|
-
const IconImg = styled('div', iconAttrs)`
|
|
85
|
+
const IconImg = styled("div", iconAttrs)`
|
|
85
86
|
cursor: pointer;
|
|
86
|
-
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
|
+
}
|
|
87
97
|
`
|
|
88
98
|
|
|
89
99
|
const ComponentWrapper = styled.div`
|
|
@@ -91,51 +101,38 @@ const ComponentWrapper = styled.div`
|
|
|
91
101
|
`
|
|
92
102
|
|
|
93
103
|
export default {
|
|
94
|
-
name:
|
|
104
|
+
name: "info-text",
|
|
95
105
|
components: {
|
|
96
106
|
IconWrapper,
|
|
97
107
|
TextOverlay,
|
|
98
108
|
ComponentWrapper,
|
|
99
109
|
IconImg,
|
|
100
|
-
icon
|
|
101
110
|
},
|
|
102
111
|
props: {
|
|
103
112
|
text: {
|
|
104
|
-
required:
|
|
113
|
+
required: true,
|
|
105
114
|
},
|
|
106
115
|
borderColor: {
|
|
107
116
|
required: false,
|
|
108
|
-
default: null
|
|
117
|
+
default: null,
|
|
109
118
|
},
|
|
110
119
|
size: {
|
|
111
120
|
required: false,
|
|
112
|
-
default:
|
|
121
|
+
default: "20",
|
|
113
122
|
},
|
|
114
123
|
alignText: {
|
|
115
124
|
required: false,
|
|
116
|
-
default:
|
|
117
|
-
},
|
|
118
|
-
alignArrow:{
|
|
119
|
-
required:false,
|
|
120
|
-
default:'center'
|
|
121
|
-
},
|
|
122
|
-
openTrigger:{
|
|
123
|
-
required:false,
|
|
124
|
-
default: 'onClick'
|
|
125
|
+
default: "left", // "left" or "right"
|
|
125
126
|
},
|
|
126
|
-
width:{
|
|
127
|
-
required:false,
|
|
128
|
-
default:'165px'
|
|
129
|
-
}
|
|
130
127
|
},
|
|
131
128
|
methods: {
|
|
132
129
|
toggleShowInfo() {
|
|
133
130
|
this.showInfo = !this.showInfo
|
|
134
131
|
|
|
135
132
|
if (this.showInfo) {
|
|
136
|
-
document.addEventListener(
|
|
133
|
+
document.addEventListener("click", this.clickOutside)
|
|
137
134
|
} else {
|
|
138
|
-
document.removeEventListener(
|
|
135
|
+
document.removeEventListener("click", this.clickOutside)
|
|
139
136
|
}
|
|
140
137
|
},
|
|
141
138
|
clickOutside(event) {
|
|
@@ -143,24 +140,12 @@ export default {
|
|
|
143
140
|
return
|
|
144
141
|
}
|
|
145
142
|
this.toggleShowInfo()
|
|
146
|
-
}
|
|
143
|
+
},
|
|
147
144
|
},
|
|
148
145
|
data() {
|
|
149
146
|
return {
|
|
150
147
|
showInfo: false,
|
|
151
148
|
}
|
|
152
149
|
},
|
|
153
|
-
computed: {
|
|
154
|
-
iconColor() {
|
|
155
|
-
return this.isActive
|
|
156
|
-
? this.borderColor
|
|
157
|
-
? this.borderColor
|
|
158
|
-
: theme.colors.secondary
|
|
159
|
-
: theme.colors.mediumGray
|
|
160
|
-
},
|
|
161
|
-
halfComputedTextInfoWidth() {
|
|
162
|
-
return parseInt(this.width)/2;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
150
|
}
|
|
166
|
-
</script>
|
|
151
|
+
</script>
|