@eturnity/eturnity_reusable_components 1.0.34 → 1.0.35

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.34",
3
+ "version": "1.0.35",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
package/src/App.vue CHANGED
@@ -18,7 +18,7 @@
18
18
  <td class="text">Body 3</td>
19
19
  <td class="text">Body 4</td>
20
20
  <div class="icons-container">
21
- <three-dots :options="listOptions" />
21
+ <three-dots :options="listOptions" :isLoading="false" />
22
22
  </div>
23
23
  </tr>
24
24
  </tbody>
@@ -6,10 +6,13 @@
6
6
  <dot-item />
7
7
  </button-container>
8
8
  <dropdown-container v-if="isOpen">
9
+ <loading-container v-if="isLoading">
10
+ <spinner />
11
+ </loading-container>
9
12
  <children-container
10
13
  class="child"
11
14
  :isOpen="hoverItem !== null"
12
- v-if="hoverItem !== null"
15
+ v-if="hoverItem !== null && !isLoading"
13
16
  >
14
17
  <option-child
15
18
  v-for="child in childOpen"
@@ -30,7 +33,7 @@
30
33
  {{ child.name }}
31
34
  </option-child>
32
35
  </children-container>
33
- <options-container>
36
+ <options-container v-if="!isLoading">
34
37
  <option-item
35
38
  v-for="(item, index) in options"
36
39
  :key="item.value"
@@ -57,6 +60,7 @@
57
60
  // <three-dots
58
61
  // :options="listOptions"
59
62
  // @on-select="onSelect($event)"
63
+ // :isLoading="true"
60
64
  // />
61
65
  // options to pass:
62
66
  // listOptions: [
@@ -107,6 +111,7 @@
107
111
  // ],
108
112
 
109
113
  import styled from "vue-styled-components"
114
+ import Spinner from "../spinner"
110
115
 
111
116
  const PageContainer = styled.div`
112
117
  display: grid;
@@ -147,6 +152,17 @@ const DropdownContainer = styled.div`
147
152
  grid-template-columns: auto auto;
148
153
  `
149
154
 
155
+ const LoadingContainer = styled.div`
156
+ border: 1px solid ${(props) => props.theme.colors.grey3};
157
+ display: grid;
158
+ grid-template-columns: 1fr;
159
+ min-width: 200px;
160
+ height: 200px;
161
+ align-items: center;
162
+ justify-items: center;
163
+ background: #fff;
164
+ `
165
+
150
166
  const OptionsContainer = styled.div`
151
167
  border: 1px solid ${(props) => props.theme.colors.grey3};
152
168
  display: grid;
@@ -215,6 +231,7 @@ const ChildrenContainer = styled("div", childAttrs)`
215
231
  background-color: #fff;
216
232
  margin-right: -1px;
217
233
  height: max-content;
234
+ max-height: 200px;
218
235
  overflow: auto;
219
236
  `
220
237
 
@@ -230,11 +247,17 @@ export default {
230
247
  OptionChild,
231
248
  ArrowLeft,
232
249
  DropdownContainer,
250
+ Spinner,
251
+ LoadingContainer,
233
252
  },
234
253
  props: {
235
254
  options: {
236
255
  required: true,
237
256
  },
257
+ isLoading: {
258
+ required: false,
259
+ default: false,
260
+ },
238
261
  },
239
262
  data() {
240
263
  return {