@eturnity/eturnity_reusable_components 1.1.5 → 1.1.8

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.1.5",
3
+ "version": "1.1.8",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -21,9 +21,7 @@
21
21
  :optionItems="itemOptions"
22
22
  :optionsDisplay="['display_name', 'company_item_number', 'model']"
23
23
  /> -->
24
- <td>
25
- <search-input />
26
- </td>
24
+ <td>Test</td>
27
25
  <div class="icons-container">
28
26
  <three-dots :options="listOptions" :isLoading="false" />
29
27
  </div>
@@ -50,7 +48,6 @@ import styled from "vue-styled-components"
50
48
  import MainTable from "@/components/tables/mainTable"
51
49
  import ThreeDots from "@/components/threeDots"
52
50
  import Toggle from "@/components/inputs/toggle"
53
- import SearchInput from "@/components/inputs/searchInput"
54
51
  // import TableDropdown from "@/components/tableDropdown"
55
52
 
56
53
  const PageContainer = styled.div`
@@ -65,7 +62,6 @@ export default {
65
62
  MainTable,
66
63
  ThreeDots,
67
64
  Toggle,
68
- SearchInput,
69
65
  // TableDropdown,
70
66
  },
71
67
  data() {
@@ -84,20 +80,7 @@ export default {
84
80
  {
85
81
  name: "Option 1",
86
82
  value: "option_1",
87
- children: [
88
- {
89
- name: "Option 1 Child",
90
- value: "option_1_child",
91
- },
92
- {
93
- name: "Option 2 Child",
94
- value: "option_2_child",
95
- },
96
- {
97
- name: "Option 3 Child",
98
- value: "option_3_child",
99
- },
100
- ],
83
+ disabled: true,
101
84
  },
102
85
  {
103
86
  name: "Option 2",
@@ -106,20 +89,6 @@ export default {
106
89
  {
107
90
  name: "Option 3",
108
91
  value: "option_3",
109
- children: [
110
- {
111
- name: "Option 3 Child",
112
- value: "option_3_child",
113
- },
114
- {
115
- name: "Option 4 Child",
116
- value: "option_4_child",
117
- },
118
- {
119
- name: "Option 5 Child",
120
- value: "option_5_child",
121
- },
122
- ],
123
92
  },
124
93
  {
125
94
  name: "Option 4",
@@ -17,6 +17,7 @@
17
17
  :rows="rowHeight"
18
18
  :value="value"
19
19
  :disabled="isDisabled"
20
+ :fontSize="fontSize"
20
21
  @input="onChangeHandler"
21
22
  />
22
23
  </input-wrapper>
@@ -56,7 +57,7 @@ const LabelWrapper = styled.div`
56
57
  margin-bottom: 12px;
57
58
  `
58
59
 
59
- const inputProps = { isError: Boolean, disabled: Boolean }
60
+ const inputProps = { isError: Boolean, disabled: Boolean, fontSize: String }
60
61
  const InputContainer = styled("textarea", inputProps)`
61
62
  border: ${(props) =>
62
63
  props.isError
@@ -65,7 +66,7 @@ const InputContainer = styled("textarea", inputProps)`
65
66
  padding: ${(props) =>
66
67
  props.hasUnit ? "11px 40px 11px 10px" : "11px 5px 11px 10px"};
67
68
  border-radius: 4px;
68
- font-size: 16px;
69
+ font-size: ${(props) => (props.fontSize ? props.fontSize : "16px")};
69
70
  color: ${(props) => props.theme.colors.black};
70
71
  width: 100%;
71
72
  max-width: 100%;
@@ -99,6 +100,10 @@ const ErrorMessage = styled.div`
99
100
  bottom: -18px;
100
101
  `
101
102
 
103
+ const InputLabel = styled.div`
104
+ font-weight: bold;
105
+ `
106
+
102
107
  export default {
103
108
  name: "text-area-input",
104
109
  components: {
@@ -108,6 +113,7 @@ export default {
108
113
  ErrorMessage,
109
114
  InfoText,
110
115
  LabelWrapper,
116
+ InputLabel,
111
117
  },
112
118
  props: {
113
119
  placeholder: {
@@ -146,6 +152,10 @@ export default {
146
152
  label: {
147
153
  required: false,
148
154
  },
155
+ fontSize: {
156
+ required: false,
157
+ default: "16px",
158
+ },
149
159
  },
150
160
  methods: {
151
161
  onChangeHandler($event) {
@@ -262,14 +262,14 @@ const TemplateLink = styled.div`
262
262
 
263
263
  const InputContainer = styled.div`
264
264
  .inputField input {
265
- padding: 0 10px;
265
+ padding: 0;
266
266
 
267
267
  &:focus {
268
- padding: 5px 10px;
268
+ padding: 5px 0px;
269
269
  }
270
270
 
271
271
  &:hover {
272
- padding: 0 10px !important;
272
+ padding: 5px 0 !important;
273
273
  }
274
274
  }
275
275
  `
@@ -43,6 +43,7 @@
43
43
  onSelect({ item: item, hasChildren: hasChildren(item) })
44
44
  "
45
45
  @mouseover="onItemHover({ index, item })"
46
+ :isDisabled="item.disabled"
46
47
  >
47
48
  <arrow-left :hasChildren="hasChildren(item)" />
48
49
  <span>
@@ -117,25 +118,27 @@ const PageContainer = styled.div`
117
118
  display: grid;
118
119
  align-items: center;
119
120
  justify-items: center;
120
- width: 30px;
121
- height: 30px;
122
-
123
- &:hover {
124
- background-color: ${(props) => props.theme.colors.grey5};
125
- border-radius: 4px;
126
- }
127
121
  `
128
122
 
129
123
  const ButtonContainer = styled.div`
130
124
  display: flex;
131
125
  flex-direction: column;
126
+ align-items: center;
127
+ justify-content: center;
132
128
  padding: 5px;
133
129
  cursor: pointer;
130
+ width: 20px;
131
+ height: 20px;
134
132
 
135
133
  div {
136
134
  // This is the dot color
137
135
  background-color: #263238;
138
136
  }
137
+
138
+ &:hover {
139
+ background-color: ${(props) => props.theme.colors.grey5};
140
+ border-radius: 4px;
141
+ }
139
142
  `
140
143
 
141
144
  const DotItem = styled.div`
@@ -179,9 +182,10 @@ const OptionsContainer = styled.div`
179
182
  height: max-content;
180
183
  `
181
184
 
182
- const OptionItem = styled.div`
185
+ const optionAttrs = { isDisabled: Boolean }
186
+ const OptionItem = styled("div", optionAttrs)`
183
187
  padding: 12px;
184
- cursor: pointer;
188
+ cursor: ${(props) => (props.isDisabled ? "not-allowed" : "pointer")};
185
189
  font-size: 13px;
186
190
  position: relative;
187
191
 
@@ -288,7 +292,7 @@ export default {
288
292
  item.children && item.children.length ? item.children : null
289
293
  },
290
294
  onSelect({ item, hasChildren }) {
291
- if (hasChildren) {
295
+ if (hasChildren || item.disabled) {
292
296
  return
293
297
  }
294
298
  this.$emit("on-select", item)