@eturnity/eturnity_reusable_components 1.2.29-3d-master.1 → 1.2.29-EPDM-5477

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.
Files changed (42) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +51 -128
  3. package/src/assets/svgIcons/dislike.svg +3 -0
  4. package/src/assets/svgIcons/external_icon.svg +5 -0
  5. package/src/assets/svgIcons/like.svg +3 -0
  6. package/src/assets/svgIcons/map_icon.svg +2 -4
  7. package/src/assets/svgIcons/obstacle_tool.svg +11 -7
  8. package/src/assets/theme.js +4 -4
  9. package/src/components/buttons/buttonIcon/index.vue +143 -0
  10. package/src/components/errorMessage/index.vue +4 -4
  11. package/src/components/icon/index.vue +10 -11
  12. package/src/components/infoText/index.vue +40 -25
  13. package/src/components/inputs/inputNumber/index.vue +34 -95
  14. package/src/components/inputs/inputText/index.vue +52 -49
  15. package/src/components/inputs/searchInput/index.vue +16 -15
  16. package/src/components/inputs/textAreaInput/index.vue +8 -14
  17. package/src/components/modals/modal/index.vue +2 -7
  18. package/src/helpers/numberConverter.js +0 -1
  19. package/src/assets/svgIcons/areas_tool.svg +0 -14
  20. package/src/assets/svgIcons/base_layer.svg +0 -3
  21. package/src/assets/svgIcons/direction_arrow.svg +0 -4
  22. package/src/assets/svgIcons/distance_tool.svg +0 -8
  23. package/src/assets/svgIcons/distort_tool.svg +0 -10
  24. package/src/assets/svgIcons/distort_tool2.svg +0 -16
  25. package/src/assets/svgIcons/draggable_corner.svg +0 -5
  26. package/src/assets/svgIcons/draw_tool.svg +0 -3
  27. package/src/assets/svgIcons/magic_tool.svg +0 -6
  28. package/src/assets/svgIcons/map_settings.svg +0 -3
  29. package/src/assets/svgIcons/margin_tool.svg +0 -4
  30. package/src/assets/svgIcons/obstacle_tool_origin.svg +0 -3
  31. package/src/assets/svgIcons/opacity.svg +0 -1
  32. package/src/assets/svgIcons/outline_tool.svg +0 -11
  33. package/src/assets/svgIcons/redo.svg +0 -6
  34. package/src/assets/svgIcons/resizer.svg +0 -5
  35. package/src/assets/svgIcons/roof_layer.svg +0 -3
  36. package/src/assets/svgIcons/rotate_tool.svg +0 -3
  37. package/src/assets/svgIcons/ruler_tool.svg +0 -3
  38. package/src/assets/svgIcons/trim_tool.svg +0 -4
  39. package/src/assets/svgIcons/undo.svg +0 -6
  40. package/src/assets/svgIcons/vertical_tool.svg +0 -3
  41. package/src/components/buttons/externalButton/index.vue +0 -101
  42. package/src/components/iconWrapper/index.vue +0 -116
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "1.2.29-3d-master.1",
3
+ "version": "1.2.29-EPDM-5477",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -2,70 +2,6 @@
2
2
  <ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
3
3
  <page-container>
4
4
  <br />
5
-
6
- <iconWrapper name="bell"/>
7
- <modal backdrop="dark" :isLoading="false" :isOpen="true">
8
-
9
- <modal backdrop="dark" :isLoading="false" :isOpen="false">
10
-
11
- <main-table titleText="My Table">
12
- <thead>
13
- <tr>
14
- <th>Column 1</th>
15
- <th>Column 2</th>
16
- <th>Column 3</th>
17
- <div />
18
- </tr>
19
- </thead>
20
- <tbody>
21
- <tr> -->
22
- <!-- <table-dropdown
23
- :colSpan="3"
24
- :tableItems="getDropdownValues()"
25
- @toggle-dropdown-open="toggleDropdownOpen()"
26
- @item-selected="onItemSelected({ item: $event, index })"
27
- :isOpen="isDropdownOpen()"
28
- :optionItems="itemOptions"
29
- :optionsDisplay="['display_name', 'company_item_number', 'model']"
30
- /> -->
31
- <!-- <td>Test</td>
32
- <div class="icons-container">
33
- <three-dots :options="listOptions" :isLoading="false" />
34
- </div>
35
- </tr>
36
- </tbody>
37
- </main-table>
38
- </modal>
39
- <row-container>
40
- <div v-for="(item, index) in markersArray" :key="item.index">
41
- <project-marker
42
- :activeLanguage="'en-us'"
43
- :markerData="item"
44
- :isLimitedPartner="false"
45
- :isGroupSupport="false"
46
- :isEditable="true"
47
- :gettext="gettext"
48
- :date="'23.07.2022'"
49
- @editHandler="consoleLog('edit index ' + index)"
50
- @deleteHandler="consoleLog('delete id ' + item.id)"
51
- />
52
- </div>
53
- </row-container>
54
- <br />
55
- <iconCollection />
56
- <br />
57
- <toggle
58
- @on-toggle-change="onInputChange($event)"
59
- :isChecked="inputValue"
60
- label="My Label Text"
61
- infoTextMessage="This is my test message"
62
- infoTextAlign="right"
63
- labelAlign="right"
64
- :disabled="false"
65
- />
66
- <<<<<<< HEAD
67
- <br />
68
- >>>>>>> EPDM-5448
69
5
  <input-number
70
6
  :value="inputValue"
71
7
  @input-change="inputValue = $event"
@@ -73,7 +9,11 @@
73
9
  slotSize="50%"
74
10
  ><InputAnnexContainer>
75
11
  <span>123m2</span>
76
- <info-text size="10px" alignArrow="right" text="infoText ceci est le text"></info-text>
12
+ <info-text
13
+ size="10px"
14
+ alignArrow="right"
15
+ text="infoText ceci est le text"
16
+ ></info-text>
77
17
  </InputAnnexContainer>
78
18
  </input-number>
79
19
  <input-number
@@ -84,77 +24,60 @@
84
24
  :isError="true"
85
25
  ><InputAnnexContainer>
86
26
  <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>
27
+ <info-text
28
+ :style="{ 'justify-self': 'end' }"
29
+ size="12px"
30
+ alignArrow="center"
31
+ text="infoText ceci est le text"
32
+ >This is the tooltip text</info-text
33
+ >
88
34
  </InputAnnexContainer>
89
35
  </input-number>
90
36
  <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"
37
+ <toggle
38
+ @on-toggle-change="onInputChange($event)"
39
+ :isChecked="inputValue"
40
+ label="My Label Text"
41
+ infoTextMessage="This is my test message"
42
+ infoTextAlign="right"
43
+ labelAlign="right"
44
+ :disabled="false"
113
45
  />
114
- =======
115
46
  <br /> -->
116
47
  <!-- <iconCollection /> -->
117
48
  <input-text
118
- placeholder="Enter distance"
49
+ placeholder="Company name"
119
50
  :value="inputValue"
120
51
  @input-change="onInputChange($event)"
121
52
  @input-blur="onInputBlur($event)"
122
53
  type="password"
123
54
  />
124
55
  <br />
125
- <!-- <page-subtitle text="My Subtitle" infoText="My info Text" />
126
- <spinner size="30px" />
127
- <checkbox
128
- label="Do you accept the Terms?"
129
- :isChecked="true"
130
- size="small"
131
- :isDisabled="false"
132
- /> -->
133
- <!-- <external-button text="Click me!" minWidth="500px" /> -->
134
- >>>>>>> master
56
+ <input-number
57
+ :value="num"
58
+ @input-change="num = $event"
59
+ unitName="t"
60
+ id="biebie"
61
+ test="koko"
62
+ @keydown="keydownHandler"
63
+ />
135
64
  </page-container>
136
65
  </ThemeProvider>
137
66
  </template>
138
67
 
139
68
  <script>
140
- import { ThemeProvider } from "vue-styled-components"
141
- import theme from "./assets/theme"
142
- import styled from "vue-styled-components"
143
- import MainTable from "@/components/tables/mainTable"
144
- import ThreeDots from "@/components/threeDots"
145
- import Toggle from "@/components/inputs/toggle"
146
- import InputNumber from "@/components/inputs/inputNumber"
147
- import Checkbox from "@/components/inputs/checkbox"
148
- import PageSubtitle from "@/components/pageSubtitle"
149
- import Spinner from "@/components/spinner"
150
- import ExternalButton from "@/components/buttons/externalButton"
151
- import InputText from "@/components/inputs/inputText"
69
+ import { ThemeProvider } from 'vue-styled-components'
70
+ import theme from './assets/theme'
71
+ import styled from 'vue-styled-components'
72
+ // import InputNumber from '@/components/inputs/inputNumber'
73
+ import InputText from '@/components/inputs/inputText'
74
+ // import Checkbox from '@/components/inputs/checkbox'
75
+ // import PageSubtitle from '@/components/pageSubtitle'
76
+ // import Spinner from '@/components/spinner'
77
+ // import ProjectMarker from '@/components/projectMarker'
78
+ // import iconCollection from '@/components/icon/iconCollection'
79
+ // import Modal from '@/components/modals/modal'
152
80
  // import TableDropdown from "@/components/tableDropdown"
153
- const InputAnnexContainer = styled.div`
154
- display: grid;
155
- grid-template-columns: auto auto;
156
- grid-gap: 10px;
157
- `
158
81
 
159
82
  const PageContainer = styled.div`
160
83
  padding: 40px;
@@ -171,17 +94,17 @@ export default {
171
94
  components: {
172
95
  ThemeProvider,
173
96
  PageContainer,
174
- InputNumber,
175
- PageSubtitle,
176
- Spinner,
177
- Checkbox,
178
- InputText,
179
- ExternalButton,
180
- iconWrapper,
181
- Modal,
182
- ProjectMarker,
183
- iconCollection,
184
- RowContainer
97
+ // MainTable,
98
+ // ThreeDots,
99
+ // Toggle,
100
+ InputText
101
+ // PageSubtitle,
102
+ // Spinner,
103
+ // Checkbox,
104
+ // Modal,
105
+ // ProjectMarker,
106
+ // iconCollection
107
+ // RowContainer
185
108
  },
186
109
  data() {
187
110
  return {
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M6.40533 12.7951L9.87682 9.32359C10.1087 9.09174 10.2403 8.77216 10.2403 8.44005V2.18009C10.2403 1.4908 9.6763 0.92684 8.98702 0.92684H3.34741C2.84611 0.92684 2.39494 1.22762 2.19442 1.68505L0.151629 6.45366C-0.374734 7.69437 0.53387 9.07294 1.88111 9.07294H5.42153L4.82624 11.9429C4.76358 12.2562 4.85757 12.5758 5.08315 12.8013C5.45286 13.1648 6.04189 13.1648 6.40533 12.7951ZM12.7468 0.92684C12.0575 0.92684 11.4935 1.4908 11.4935 2.18009V7.19307C11.4935 7.88236 12.0575 8.44632 12.7468 8.44632C13.436 8.44632 14 7.88236 14 7.19307V2.18009C14 1.4908 13.436 0.92684 12.7468 0.92684Z"/>
3
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 14 14">
2
+ <path d="m12.6 14h-11.4c-0.7 0-1.3-0.6-1.3-1.3v-11.4c0-0.7 0.6-1.3 1.3-1.3h4.8v2h-3.1c-0.5 0-1 0.4-1 0.9v8.3c0 0.4 0.5 0.8 1 0.8h8.3c0.4 0 0.9-0.4 0.9-0.9v-3.1h2v4.7c-0.2 0.7-0.7 1.3-1.5 1.3z"/>
3
+ <path d="m7.9 0h6v6z"/>
4
+ <path d="m5.7 9.8l-1.4-1.5 7.1-7.1 1.4 1.4z"/>
5
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M7.59467 1.20492L4.12318 4.67641C3.89133 4.90826 3.75974 5.22784 3.75974 5.55995V11.8199C3.75974 12.5092 4.3237 13.0732 5.01298 13.0732H10.6526C11.1539 13.0732 11.6051 12.7724 11.8056 12.3149L13.8484 7.54634C14.3747 6.30563 13.4661 4.92706 12.1189 4.92706H8.57847L9.17376 2.05713C9.23642 1.74381 9.14243 1.42424 8.91685 1.19865C8.54714 0.835211 7.95811 0.835211 7.59467 1.20492V1.20492ZM1.25325 13.0732C1.94253 13.0732 2.50649 12.5092 2.50649 11.8199V6.80693C2.50649 6.11764 1.94253 5.55368 1.25325 5.55368C0.563961 5.55368 0 6.11764 0 6.80693V11.8199C0 12.5092 0.563961 13.0732 1.25325 13.0732Z"/>
3
+ </svg>
@@ -1,5 +1,3 @@
1
- <svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M9 12L14 14V2L9 0L5 2L0 0V12L5 14L9 12ZM4.93167 12.3571L8.93167 10.3571L12.5 11.7845V3.01555L9.06834 1.64288L5.06834 3.64288L1.5 2.21555V10.9845L4.93167 12.3571Z" fill="white"/>
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="16" viewbox="0 0 16 16" width="16" xmlns="http://www.w3.org/2000/svg">
2
- <defs>
3
- <pattern id="pattern_Z6wSY" patternUnits="userSpaceOnUse" width="4" height="4" patternTransform="rotate(-45)">
4
- <path d="M0 0 L 16 0 L 16 2 L 0 2 Z" fill="red" stroke-width="0"></path>
5
- </pattern>
6
- </defs>
7
- <rect width="16" height="16" fill="url(#pattern_Z6wSY)" :opacity="1" />
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>
@@ -9,7 +9,7 @@ const theme = {
9
9
  gray1: '#666',
10
10
  mediumGray: '#d5d5d5',
11
11
  lightGray: '#f2f2f2',
12
- white: '#fff',
12
+ white: '#ffffff',
13
13
  blue: '#48a2d0',
14
14
  red: '#ff5656',
15
15
  blue1: '#e4efff',
@@ -18,10 +18,10 @@ const theme = {
18
18
  grey3: '#b2b9c5',
19
19
  grey4: '#dee2eb',
20
20
  grey5: '#fafafa',
21
+ grey6: '#555d61',
21
22
  green: '#99db0c',
22
- transparentWhite1:'#ffffff32',
23
- transparentBlack1:'#263238e6',
24
- disabled: '#dfe1e1'
23
+ disabled: '#dfe1e1',
24
+ eturnityGrey: '#263238'
25
25
  },
26
26
  screen: {
27
27
  mobileSmall: '345px',
@@ -0,0 +1,143 @@
1
+ <template>
2
+ <page-container>
3
+ <button-wrapper
4
+ :isDisabled="isDisabled"
5
+ :minWidth="minWidth"
6
+ :customColor="customColor"
7
+ :height="height"
8
+ >
9
+ <icon-container :width="height">
10
+ <icon
11
+ v-if="!!iconName"
12
+ :name="iconName"
13
+ :color="fontColor ? fontColor : theme.colors.white"
14
+ size="14px"
15
+ />
16
+ </icon-container>
17
+ <button-container :fontSize="fontSize" :fontColor="fontColor">{{ text }}</button-container>
18
+ </button-wrapper>
19
+ </page-container>
20
+ </template>
21
+
22
+ <script>
23
+ // import buttonIcon from "@eturnity/eturnity_reusable_components/src/components/buttons/buttonIcon"
24
+ // <button-icon
25
+ // :isDisabled="true"
26
+ // text="Click Me"
27
+ // minWidth="300px"
28
+ // customColor="#000"
29
+ // iconName="external_icon"
30
+ // fontColor="white"
31
+ // fontSize="12px"
32
+ // height="24px"
33
+ // />
34
+
35
+ import Icon from "../../icon"
36
+ import styled from "vue-styled-components"
37
+ import Theme from "@/assets/theme";
38
+
39
+ const PageContainer = styled.div``
40
+
41
+ const ButtonAttrs = {
42
+ isDisabled: Boolean,
43
+ minWidth: String,
44
+ customColor: String,
45
+ height: String
46
+ }
47
+ const ButtonWrapper = styled("div", ButtonAttrs)`
48
+ display: grid;
49
+ grid-template-columns: auto 1fr;
50
+ background-color: ${(props) =>
51
+ props.isDisabled
52
+ ? props.theme.colors.disabled
53
+ : props.customColor
54
+ ? props.customColor
55
+ : props.theme.colors.yellow};
56
+ cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
57
+ user-select: none;
58
+ border-radius: 4px;
59
+ overflow: hidden;
60
+ min-width: ${(props) => (props.minWidth ? props.minWidth : "initial")};
61
+ height: ${(props) => props.height};
62
+
63
+ &:hover {
64
+ opacity: ${(props) => (props.isDisabled ? "1" : "0.8")};
65
+ }
66
+
67
+ &:active {
68
+ opacity: 1;
69
+ }
70
+ `
71
+
72
+ const ButtonContainerAttrs = {
73
+ fontSize: String,
74
+ fontColor: String
75
+ }
76
+ const ButtonContainer = styled('div', ButtonContainerAttrs)`
77
+ font-size: ${(props) => props.fontSize};
78
+ color: ${(props) => props.fontColor ? props.fontColor : props.theme.colors.white};
79
+ display: flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+ padding: 0 15px;
83
+ `
84
+
85
+ const IconContainerAttrs = {
86
+ width: String
87
+ }
88
+ const IconContainer = styled('div', IconContainerAttrs)`
89
+ display: grid;
90
+ align-items: center;
91
+ justify-items: center;
92
+ width: ${(props) => props.width};
93
+ background: ${(props) => props.theme.colors.white + '1a'};
94
+ `
95
+
96
+ export default {
97
+ name: "button-icon",
98
+ components: {
99
+ PageContainer,
100
+ ButtonContainer,
101
+ ButtonWrapper,
102
+ IconContainer,
103
+ Icon
104
+ },
105
+ props: {
106
+ isDisabled: {
107
+ required: false,
108
+ default: false
109
+ },
110
+ text: {
111
+ required: true
112
+ },
113
+ minWidth: {
114
+ required: false,
115
+ default: null
116
+ },
117
+ customColor: {
118
+ required: false,
119
+ default: null
120
+ },
121
+ iconName: {
122
+ required: true
123
+ },
124
+ fontColor: {
125
+ required: false,
126
+ default: null
127
+ },
128
+ fontSize: {
129
+ required: false,
130
+ default: '13px'
131
+ },
132
+ height: {
133
+ required: false,
134
+ default: '30px'
135
+ }
136
+ },
137
+ data () {
138
+ return {
139
+ theme: Theme
140
+ }
141
+ }
142
+ }
143
+ </script>
@@ -7,7 +7,7 @@
7
7
  </template>
8
8
 
9
9
  <script>
10
- // import InfoText from "@eturnity/eturnity_reusable_components/src/components/infoText"
10
+ // import ErrorMessage from "@eturnity/eturnity_reusable_components/src/components/errorMessage"
11
11
  //To use:
12
12
  // <error-message
13
13
  // alignText="right" // default is left
@@ -22,12 +22,12 @@ const TextOverlay = styled.div`
22
22
  padding: 10px;
23
23
  width: max-content;
24
24
  max-width: 100%;
25
- min-width: 200px;
25
+ min-width: min-content;
26
26
  font-size: 11px;
27
27
  font-weight: 400;
28
28
  border-radius: 4px;
29
29
  font-family: 'Lato-Bold', Arial;
30
- z-index: 10;
30
+ z-index: 999;
31
31
  color: ${(props) => props.theme.colors.white};
32
32
 
33
33
  :before {
@@ -59,4 +59,4 @@ export default {
59
59
  return {}
60
60
  }
61
61
  }
62
- </script>
62
+ </script>
@@ -1,7 +1,6 @@
1
1
  <template>
2
- <Wrapper :isDisabled="disabled" :size="size" :cursor="cursor">
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
- </Wrapper>
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: 100%;
40
- height: 100%;
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
- IconImage,
55
- Wrapper
53
+ Wrapper,
54
+ IconImage
56
55
  },
57
56
  props: {
58
- disabled: {
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: null
76
+ default: 'pointer'
78
77
  }
79
78
  },
80
79
  data() {
@@ -19,8 +19,8 @@
19
19
  :halfComputedTextInfoWidth="halfComputedTextInfoWidth"
20
20
  :alignArrow="alignArrow"
21
21
  :iconSize="size"
22
- ><slot />
23
- {{ text }}
22
+ ><slot />
23
+ <span v-html="text"></span>
24
24
  </text-overlay>
25
25
  </icon-wrapper>
26
26
  </component-wrapper>
@@ -39,19 +39,27 @@ import theme from '../../assets/theme.js'
39
39
  import styled from 'vue-styled-components'
40
40
  import icon from '../icon'
41
41
 
42
- const textAttrs = { iconSize:String, borderColor: String, alignArrow:String, alignText: String, width:String,halfComputedTextInfoWidth:Number }
42
+ const textAttrs = {
43
+ iconSize: String,
44
+ borderColor: String,
45
+ alignArrow: String,
46
+ alignText: String,
47
+ width: String,
48
+ halfComputedTextInfoWidth: Number
49
+ }
43
50
  const TextOverlay = styled('div', textAttrs)`
44
51
  position: absolute;
45
- top: ${(props) => 'calc('+props.iconSize+' + 15px)'};
46
- ${(props) => (props.alignArrow === 'left'
47
- ? 'left: calc('+props.iconSize+' /2 - 18px)'
48
- : props.alignArrow === 'center'
49
- ? 'left: calc((-'+props.width+' + '+props.iconSize+') /2 + 2px)'
50
- : 'right: calc('+props.iconSize+' /2 - 17px)')};
52
+ top: ${(props) => 'calc(' + props.iconSize + ' + 15px)'};
53
+ ${(props) =>
54
+ props.alignArrow === 'left'
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)'};
51
59
  text-align: ${(props) => props.alignText};
52
60
  background: ${(props) => props.theme.colors.black};
53
61
  padding: 10px;
54
- width: ${(props) => props.width };
62
+ width: ${(props) => props.width};
55
63
  max-width: 400px;
56
64
  font-size: 13px;
57
65
  font-weight: 400;
@@ -64,14 +72,21 @@ const TextOverlay = styled('div', textAttrs)`
64
72
  background-color: ${(props) => props.theme.colors.black};
65
73
  position: absolute;
66
74
  top: 2px;
67
- ${(props) => (props.alignArrow === 'left' ? 'left:40px;' :
68
- props.alignArrow=='center' ? 'left: calc(50% + 19px);' :
69
- 'right:-13px;')};
75
+ ${(props) =>
76
+ props.alignArrow === 'left'
77
+ ? 'left:40px;'
78
+ : props.alignArrow == 'center'
79
+ ? 'left: calc(50% + 19px);'
80
+ : 'right:-13px;'};
70
81
  height: 8px;
71
82
  width: 8px;
72
83
  transform-origin: center center;
73
84
  transform: translate(-2em, -0.5em) rotate(45deg);
74
85
  }
86
+
87
+ span a {
88
+ color: #2cc0eb;
89
+ }
75
90
  `
76
91
 
77
92
  const iconAttrs = { isActive: Boolean, size: String, borderColor: String }
@@ -101,7 +116,7 @@ export default {
101
116
  },
102
117
  props: {
103
118
  text: {
104
- required: false,
119
+ required: false
105
120
  },
106
121
  borderColor: {
107
122
  required: false,
@@ -115,17 +130,17 @@ export default {
115
130
  required: false,
116
131
  default: 'left' // "left" or "right"
117
132
  },
118
- alignArrow:{
119
- required:false,
120
- default:'center'
133
+ alignArrow: {
134
+ required: false,
135
+ default: 'center'
121
136
  },
122
- openTrigger:{
123
- required:false,
137
+ openTrigger: {
138
+ required: false,
124
139
  default: 'onClick'
125
140
  },
126
- width:{
127
- required:false,
128
- default:'165px'
141
+ width: {
142
+ required: false,
143
+ default: '165px'
129
144
  }
130
145
  },
131
146
  methods: {
@@ -147,7 +162,7 @@ export default {
147
162
  },
148
163
  data() {
149
164
  return {
150
- showInfo: false,
165
+ showInfo: false
151
166
  }
152
167
  },
153
168
  computed: {
@@ -159,8 +174,8 @@ export default {
159
174
  : theme.colors.mediumGray
160
175
  },
161
176
  halfComputedTextInfoWidth() {
162
- return parseInt(this.width)/2;
177
+ return parseInt(this.width) / 2
163
178
  }
164
179
  }
165
180
  }
166
- </script>
181
+ </script>