@eturnity/eturnity_reusable_components 1.0.44 → 1.0.48

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.0.44",
3
+ "version": "1.0.48",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -13,20 +13,6 @@
13
13
  </thead>
14
14
  <tbody>
15
15
  <tr>
16
- <td>
17
- <input-number
18
- placeholder="Enter distance"
19
- :isError="false"
20
- :numberPrecision="2"
21
- unitName="pc"
22
- :value="inputValue"
23
- @input-change="onInputChange($event)"
24
- errorMessage="Enter a number between 1 and 10"
25
- :disabled="false"
26
- :noBorder="true"
27
- textAlign="left"
28
- />
29
- </td>
30
16
  <td class="text">Body 2</td>
31
17
  <td class="text">Body 3</td>
32
18
  <td class="text">Body 4</td>
@@ -36,6 +22,9 @@
36
22
  </tr>
37
23
  </tbody>
38
24
  </main-table>
25
+ <br />
26
+ <br />
27
+ <search-input :value="inputValue" @on-change="onInputChange" :disabled="false" placeholder="Search..." />
39
28
  </page-container>
40
29
  </ThemeProvider>
41
30
  </template>
@@ -46,7 +35,7 @@ import theme from "./assets/theme"
46
35
  import styled from "vue-styled-components"
47
36
  import MainTable from "@/components/tables/mainTable"
48
37
  import ThreeDots from "@/components/threeDots"
49
- import InputNumber from "@/components/inputs/inputNumber"
38
+ import SearchInput from "@/components/inputs/searchInput"
50
39
 
51
40
  const PageContainer = styled.div`
52
41
  padding: 40px;
@@ -59,7 +48,7 @@ export default {
59
48
  PageContainer,
60
49
  MainTable,
61
50
  ThreeDots,
62
- InputNumber,
51
+ SearchInput,
63
52
  },
64
53
  data() {
65
54
  return {
@@ -0,0 +1,3 @@
1
+ <svg width="15" height="15" viewBox="0 0 15 15" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path d="M14.9751 13.6383L11.3396 9.9957C12.0755 8.94938 12.4395 7.6858 12.3731 6.40752C12.3068 5.12923 11.8141 3.91027 10.9739 2.94605C10.1337 1.98183 8.9947 1.3282 7.73954 1.08993C6.48437 0.85166 5.1857 1.04256 4.05173 1.63202C2.91776 2.22148 2.01415 3.17536 1.48577 4.34076C0.957383 5.50615 0.834825 6.81556 1.13774 8.05906C1.44065 9.30257 2.1515 10.4082 3.15631 11.1986C4.16113 11.989 5.40173 12.4185 6.67922 12.4183C7.86776 12.418 9.02614 12.0434 9.99056 11.3474L13.626 14.9901L14.9751 13.6383ZM3.98109 9.38128C3.44671 8.84727 3.08262 8.16629 2.93499 7.42469C2.78736 6.68309 2.86284 5.91427 3.15185 5.2157C3.44086 4.51713 3.93039 3.92029 4.55837 3.50084C5.18635 3.08139 5.9245 2.85823 6.67922 2.85965C7.40253 2.85844 8.11118 3.06399 8.72198 3.45218C9.33279 3.84037 9.8204 4.39508 10.1276 5.05121C10.4348 5.70735 10.5488 6.43766 10.4562 7.15645C10.3637 7.87523 10.0684 8.55264 9.60512 9.10918L9.09703 9.61827C8.37063 10.2302 7.44086 10.5457 6.49283 10.5017C5.54479 10.4578 4.64804 10.0578 3.98109 9.38128Z" fill="#263238"/>
3
+ </svg>
@@ -89,6 +89,7 @@ const InputContainer = styled("input", inputProps)`
89
89
  props.isDisabled
90
90
  ? props.theme.colors.grey5 + " !important"
91
91
  : "#fff !important"};
92
+ box-sizing: border-box;
92
93
 
93
94
  &::placeholder {
94
95
  color: ${(props) =>
@@ -0,0 +1,84 @@
1
+ <template>
2
+ <container>
3
+ <input-wrapper>
4
+ <input-container
5
+ :placeholder="placeholder"
6
+ :value="value"
7
+ @input="onChangeHandler($event)"
8
+ :disabled="disabled"
9
+ :isDisabled="disabled"
10
+ />
11
+ <img
12
+ class="search-icn"
13
+ :src="require('../../../assets/icons/search_icon_black.svg')"
14
+ />
15
+ </input-wrapper>
16
+ </container>
17
+ </template>
18
+
19
+ <script>
20
+ // import SearchInput from "@eturnity/eturnity_reusable_components/src/components/inputs/searchInput"
21
+ import styled from 'vue-styled-components'
22
+
23
+ const Container = styled.div`
24
+ width: 100%;
25
+ position: relative;
26
+ `
27
+
28
+ const inputAttrs = { isDisabled: Boolean }
29
+ const InputContainer = styled('input', inputAttrs)`
30
+ border: 1px solid ${(props) => props.theme.colors.mediumGray};
31
+ padding: 11px 30px 11px 10px;
32
+ border-radius: 4px;
33
+ font-size: 16px;
34
+ color: ${(props) => props.theme.colors.black};
35
+ width: 100%;
36
+ box-sizing: border-box;
37
+ cursor: ${props => props.isDisabled ? 'not-allowed' : 'auto'};
38
+
39
+ &::placeholder {
40
+ color: ${(props) => props.theme.colors.darkGray};
41
+ }
42
+
43
+ &:focus {
44
+ outline: none;
45
+ }
46
+ `
47
+
48
+ const InputWrapper = styled.span`
49
+ position: relative;
50
+
51
+ img {
52
+ position: absolute;
53
+ right: 10px;
54
+ top: 0;
55
+ }
56
+ `
57
+
58
+ export default {
59
+ name: "search-input",
60
+ components: {
61
+ InputContainer,
62
+ InputWrapper,
63
+ Container
64
+ },
65
+ props: {
66
+ value: {
67
+ required: true
68
+ },
69
+ disabled: {
70
+ required: false,
71
+ default: false
72
+ },
73
+ placeholder: {
74
+ required: false,
75
+ default: ''
76
+ }
77
+ },
78
+ methods: {
79
+ onChangeHandler(event) {
80
+ this.$emit('on-change', event)
81
+ }
82
+ }
83
+ }
84
+ </script>
@@ -10,6 +10,7 @@
10
10
  </template>
11
11
 
12
12
  <script>
13
+ // import Spinner from "@eturnity/eturnity_reusable_components/src/components/spinner"
13
14
  import styled from "vue-styled-components"
14
15
 
15
16
  const SpinnerContainer = styled.div`
@@ -31,7 +31,7 @@ const TableTitle = styled.div`
31
31
  `
32
32
 
33
33
  const TableScroll = styled.div`
34
- position: relative;
34
+ /* position: relative; */
35
35
  max-width: 100%;
36
36
  `
37
37
 
@@ -155,12 +155,14 @@ const TableContainer = styled.table`
155
155
  }
156
156
 
157
157
  tr {
158
- position: relative;
159
-
160
158
  &.disabled {
161
159
  cursor: not-allowed;
162
160
  }
163
161
 
162
+ .arrow-dropdown {
163
+ visibility: hidden;
164
+ }
165
+
164
166
  &.footer {
165
167
  td {
166
168
  background-color: ${(props) => props.theme.colors.grey5};
@@ -213,6 +215,10 @@ const TableContainer = styled.table`
213
215
  .drag-icon {
214
216
  visibility: visible;
215
217
  }
218
+
219
+ .arrow-dropdown {
220
+ visibility: visible;
221
+ }
216
222
  }
217
223
 
218
224
  .drag-container {