@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 CHANGED
@@ -2,4 +2,4 @@ module.exports = {
2
2
  presets: [
3
3
  '@vue/cli-plugin-babel/preset'
4
4
  ]
5
- }
5
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "1.2.26-EPDM-3412.5",
3
+ "version": "1.2.27",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
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
- <input-number
6
- :value="inputValue"
7
- @input-change="inputValue = $event"
8
- inputWidth="250px"
9
- slotSize="50%"
10
- ><InputAnnexContainer>
11
- <span>123m2</span>
12
- <info-text
13
- size="10px"
14
- alignArrow="right"
15
- text="infoText ceci est le text"
16
- ></info-text>
17
- </InputAnnexContainer>
18
- </input-number>
19
- <input-number
20
- :value="inputValue"
21
- @input-change="inputValue = $event"
22
- inputWidth="250px"
23
- slotSize="50%"
24
- :isError="true"
25
- ><InputAnnexContainer>
26
- <span>123m2</span>
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
- >
34
- </InputAnnexContainer>
35
- </input-number>
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
- <p>InputText</p>
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="Company name"
64
+ placeholder="Enter distance"
41
65
  :value="inputValue"
42
- :isError="true"
43
- errorMessage="This is my error message"
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
- <input-number
53
- :value="num"
54
- @input-change="num = $event"
55
- unitName="t"
56
- id="biebie"
57
- test="koko"
58
- @keydown="keydownHandler"
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 InputNumber from '@/components/inputs/inputNumber'
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
- InputNumber,
88
- InputText
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
- keydownHandler(e) {
219
- console.log('test', e)
255
+ consoleLog(data) {
256
+ console.log(data)
257
+ },
258
+ gettext(string) {
259
+ return string.toUpperCase()
220
260
  },
221
261
  getTheme() {
222
262
  return theme
@@ -18,10 +18,8 @@ const theme = {
18
18
  grey3: '#b2b9c5',
19
19
  grey4: '#dee2eb',
20
20
  grey5: '#fafafa',
21
- grey6: '#555d61',
22
21
  green: '#99db0c',
23
- disabled: '#dfe1e1',
24
- eturnityGrey: '#263238'
22
+ disabled: '#dfe1e1'
25
23
  },
26
24
  screen: {
27
25
  mobileSmall: '345px',
@@ -1,26 +1,35 @@
1
1
  <template>
2
2
  <component-wrapper>
3
- <icon-wrapper :size="size">
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="openTrigger == 'onHover' ? toggleShowInfo() : ''"
10
- @mouseleave="openTrigger == 'onHover' ? toggleShowInfo() : ''"
9
+ @mouseenter="toggleShowInfo()"
10
+ @mouseleave="toggleShowInfo()"
11
11
  >
12
- <icon :size="size" name="info" :color="iconColor" />
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
- :width="width"
19
- :halfComputedTextInfoWidth="halfComputedTextInfoWidth"
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
- const textAttrs = {
43
- iconSize: String,
44
- borderColor: String,
45
- alignArrow: String,
46
- alignText: String,
47
- width: String,
48
- halfComputedTextInfoWidth: Number
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: ${(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)'};
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: ${(props) => props.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
- props.alignArrow === 'left'
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: 'info-text',
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: false
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: '14px'
121
+ default: "20",
128
122
  },
129
123
  alignText: {
130
124
  required: false,
131
- default: 'left' // "left" or "right"
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('click', this.clickOutside)
133
+ document.addEventListener("click", this.clickOutside)
152
134
  } else {
153
- document.removeEventListener('click', this.clickOutside)
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>