@eturnity/eturnity_reusable_components 1.2.19-EPDM-5262.3 → 1.2.19-EPDM-5262.5

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "1.2.19-EPDM-5262.3",
3
+ "version": "1.2.19-EPDM-5262.5",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -9,7 +9,7 @@
9
9
  slotSize="50%"
10
10
  ><InputAnnexContainer>
11
11
  <span>123m2</span>
12
- <info-text size="10" text="infoText ceci est le text"></info-text>
12
+ <info-text size="10" alignArrow="right" text="infoText ceci est le text"></info-text>
13
13
  </InputAnnexContainer>
14
14
  </input-number>
15
15
  <input-number
@@ -20,11 +20,39 @@
20
20
  :isError="true"
21
21
  ><InputAnnexContainer>
22
22
  <span>123m2</span>
23
- <info-text size="15" text="infoText ceci est le text" openTrigger="onClick"></info-text>
23
+ <info-text :style="{'justify-self': 'end'}" size="12" alignArrow="center" text="infoText ceci est le text">This is the tooltip text</info-text>
24
24
  </InputAnnexContainer>
25
25
  </input-number>
26
26
  <br />
27
- <br />
27
+ <div :style="{ 'margin': '50px'}">
28
+ <input-number
29
+ labelText="Panel inclination"
30
+ labelInfoText="
31
+ Defines the slope of the installed panels to the horizon.
32
+ "
33
+ :value="inputValue"
34
+
35
+ />
36
+ <info-text size="100" alignArrow="center" width="360px">This is the tooltip text center</info-text>
37
+ <br /><br />
38
+ <info-text size="50" alignArrow="center" width="120px">This is the tooltip text center</info-text>
39
+ <br /><br />
40
+ <info-text size="10" alignArrow="center" width="100%">This is the tooltip text center</info-text>
41
+ <br /><br /><br /><br /><br />
42
+ <info-text size="100" alignArrow="left" width="360px">This is the tooltip text center</info-text>
43
+ <br /><br />
44
+ <info-text size="50" alignArrow="left" width="360px">This is the tooltip text center</info-text>
45
+ <br /><br />
46
+ <info-text size="10" alignArrow="left" width="360px">This is the tooltip text center</info-text>
47
+ <br /><br />
48
+ <br /><br /><br />
49
+ <info-text size="100" alignArrow="right" width="360px">This is the tooltip text center</info-text>
50
+ <br /><br />
51
+ <info-text size="50" alignArrow="right" width="360px">This is the tooltip text center</info-text>
52
+ <br /><br />
53
+ <info-text size="10" alignArrow="right" width="360px">This is the tooltip text center</info-text>
54
+ <br /><br />
55
+ </div>
28
56
  <input-number
29
57
  placeholder="Enter distance"
30
58
  :numberPrecision="2"
@@ -16,7 +16,10 @@
16
16
  :borderColor="borderColor"
17
17
  :alignText="alignText"
18
18
  :width="width"
19
- >
19
+ :halfComputedTextInfoWidth="halfComputedTextInfoWidth"
20
+ :alignArrow="alignArrow"
21
+ :iconSize="size"
22
+ ><slot />
20
23
  {{ text }}
21
24
  </text-overlay>
22
25
  </icon-wrapper>
@@ -36,16 +39,17 @@ import theme from '@/assets/theme.js'
36
39
  import styled from 'vue-styled-components'
37
40
  import icon from '../icon'
38
41
 
39
- const textAttrs = { borderColor: String, alignText: String, width:String }
42
+ const textAttrs = { iconSize:Number, borderColor: String, alignArrow:String, alignText: String, width:String,halfComputedTextInfoWidth:Number }
40
43
  const TextOverlay = styled('div', textAttrs)`
41
44
  position: absolute;
42
- top: 26px;
43
- right: ${(props) => (props.alignText === 'left' ? '-10px' : 'inherit')};
44
- left: ${(props) => (props.alignText === 'left' ? 'inherit' : '-10px')};
45
+ top: ${(props) => (parseInt(props.iconSize) + 15)}px;
46
+ ${(props) => (props.alignArrow === 'left' ? 'left: '+((props.iconSize/2)-18)+'px;' :
47
+ props.alignArrow === 'center' ? 'left: calc((-'+props.width+' + '+props.iconSize+'px)/2 - 7px);':
48
+ 'right: '+((props.iconSize/2)-17)+'px;')};
45
49
  text-align: ${(props) => props.alignText};
46
50
  background: ${(props) => props.theme.colors.black};
47
51
  padding: 10px;
48
- width: ${(props) => props.width ? props.width : "max-content"};
52
+ width: ${(props) => props.width };
49
53
  max-width: 400px;
50
54
  font-size: 13px;
51
55
  font-weight: 400;
@@ -58,8 +62,9 @@ const TextOverlay = styled('div', textAttrs)`
58
62
  background-color: ${(props) => props.theme.colors.black};
59
63
  position: absolute;
60
64
  top: 2px;
61
- right: ${(props) => (props.alignText === 'left' ? '-14px' : 'inherit')};
62
- left: ${(props) => (props.alignText === 'left' ? 'inherit' : '40px')};
65
+ ${(props) => (props.alignArrow === 'left' ? 'left:40px;' :
66
+ props.alignArrow=='center' ? 'left: calc(50% + 19px);' :
67
+ 'right:-13px;')};
63
68
  height: 8px;
64
69
  width: 8px;
65
70
  transform-origin: center center;
@@ -94,7 +99,7 @@ export default {
94
99
  },
95
100
  props: {
96
101
  text: {
97
- required: true
102
+ required: false,
98
103
  },
99
104
  borderColor: {
100
105
  required: false,
@@ -108,11 +113,18 @@ export default {
108
113
  required: false,
109
114
  default: 'left' // "left" or "right"
110
115
  },
116
+ alignArrow:{
117
+ required:false,
118
+ default:'center'
119
+ },
111
120
  openTrigger:{
112
121
  required:false,
113
- default: "onHover"
122
+ default: 'onClick'
114
123
  },
115
- width:{required:false}
124
+ width:{
125
+ required:false,
126
+ default:'165px'
127
+ }
116
128
  },
117
129
  methods: {
118
130
  toggleShowInfo() {
@@ -133,7 +145,7 @@ export default {
133
145
  },
134
146
  data() {
135
147
  return {
136
- showInfo: false
148
+ showInfo: false,
137
149
  }
138
150
  },
139
151
  computed: {
@@ -143,6 +155,9 @@ export default {
143
155
  ? this.borderColor
144
156
  : theme.colors.secondary
145
157
  : theme.colors.mediumGray
158
+ },
159
+ halfComputedTextInfoWidth() {
160
+ return parseInt(this.width)/2;
146
161
  }
147
162
  }
148
163
  }
@@ -293,7 +293,7 @@ export default {
293
293
  },
294
294
  labelInfoAlign: {
295
295
  required: false,
296
- default: 'right'
296
+ default: 'left'
297
297
  },
298
298
  minNumber: {
299
299
  required: false,
@@ -313,7 +313,6 @@ export default {
313
313
  },
314
314
  computed: {
315
315
  hasSlot() {
316
- console.log(this.$slots.default)
317
316
  return !!this.$slots.default
318
317
  },
319
318
  computedSlotSize() {