@eturnity/eturnity_reusable_components 1.2.19-EPDM-5262.1 → 1.2.19-EPDM-5262.3
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/package.json +1 -1
- package/src/App.vue +1 -1
- package/src/components/infoText/index.vue +13 -6
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
:isError="true"
|
|
21
21
|
><InputAnnexContainer>
|
|
22
22
|
<span>123m2</span>
|
|
23
|
-
<info-text size="15" text="infoText ceci est le text"></info-text>
|
|
23
|
+
<info-text size="15" text="infoText ceci est le text" openTrigger="onClick"></info-text>
|
|
24
24
|
</InputAnnexContainer>
|
|
25
25
|
</input-number>
|
|
26
26
|
<br />
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
:size="size"
|
|
7
7
|
:borderColor="borderColor"
|
|
8
8
|
@click.prevent="toggleShowInfo()"
|
|
9
|
-
@mouseenter="toggleShowInfo()"
|
|
10
|
-
@mouseleave="toggleShowInfo()"
|
|
9
|
+
@mouseenter="openTrigger == 'onHover' ? toggleShowInfo() : ''"
|
|
10
|
+
@mouseleave="openTrigger == 'onHover' ? toggleShowInfo() : ''"
|
|
11
11
|
>
|
|
12
12
|
<icon :size="size + 'px'" name="info" :color="iconColor" />
|
|
13
13
|
</icon-img>
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
v-if="showInfo"
|
|
16
16
|
:borderColor="borderColor"
|
|
17
17
|
:alignText="alignText"
|
|
18
|
+
:width="width"
|
|
18
19
|
>
|
|
19
20
|
{{ text }}
|
|
20
21
|
</text-overlay>
|
|
@@ -35,15 +36,16 @@ import theme from '@/assets/theme.js'
|
|
|
35
36
|
import styled from 'vue-styled-components'
|
|
36
37
|
import icon from '../icon'
|
|
37
38
|
|
|
38
|
-
const textAttrs = { borderColor: String, alignText: String }
|
|
39
|
+
const textAttrs = { borderColor: String, alignText: String, width:String }
|
|
39
40
|
const TextOverlay = styled('div', textAttrs)`
|
|
40
41
|
position: absolute;
|
|
41
42
|
top: 26px;
|
|
42
43
|
right: ${(props) => (props.alignText === 'left' ? '-10px' : 'inherit')};
|
|
43
44
|
left: ${(props) => (props.alignText === 'left' ? 'inherit' : '-10px')};
|
|
45
|
+
text-align: ${(props) => props.alignText};
|
|
44
46
|
background: ${(props) => props.theme.colors.black};
|
|
45
47
|
padding: 10px;
|
|
46
|
-
width: max-content;
|
|
48
|
+
width: ${(props) => props.width ? props.width : "max-content"};
|
|
47
49
|
max-width: 400px;
|
|
48
50
|
font-size: 13px;
|
|
49
51
|
font-weight: 400;
|
|
@@ -56,7 +58,7 @@ const TextOverlay = styled('div', textAttrs)`
|
|
|
56
58
|
background-color: ${(props) => props.theme.colors.black};
|
|
57
59
|
position: absolute;
|
|
58
60
|
top: 2px;
|
|
59
|
-
right: ${(props) => (props.alignText === 'left' ? '-
|
|
61
|
+
right: ${(props) => (props.alignText === 'left' ? '-14px' : 'inherit')};
|
|
60
62
|
left: ${(props) => (props.alignText === 'left' ? 'inherit' : '40px')};
|
|
61
63
|
height: 8px;
|
|
62
64
|
width: 8px;
|
|
@@ -105,7 +107,12 @@ export default {
|
|
|
105
107
|
alignText: {
|
|
106
108
|
required: false,
|
|
107
109
|
default: 'left' // "left" or "right"
|
|
108
|
-
}
|
|
110
|
+
},
|
|
111
|
+
openTrigger:{
|
|
112
|
+
required:false,
|
|
113
|
+
default: "onHover"
|
|
114
|
+
},
|
|
115
|
+
width:{required:false}
|
|
109
116
|
},
|
|
110
117
|
methods: {
|
|
111
118
|
toggleShowInfo() {
|