@eturnity/eturnity_reusable_components 1.1.57 → 1.1.60
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
package/src/App.vue
CHANGED
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
/>
|
|
47
47
|
<br />
|
|
48
48
|
<page-subtitle text="My Subtitle" infoText="My info Text" />
|
|
49
|
+
<spinner size="30px" />
|
|
49
50
|
</page-container>
|
|
50
51
|
</ThemeProvider>
|
|
51
52
|
</template>
|
|
@@ -59,6 +60,7 @@ import ThreeDots from "@/components/threeDots"
|
|
|
59
60
|
import Toggle from "@/components/inputs/toggle"
|
|
60
61
|
import InputNumber from "@/components/inputs/inputNumber"
|
|
61
62
|
import PageSubtitle from "@/components/pageSubtitle"
|
|
63
|
+
import Spinner from "@/components/spinner"
|
|
62
64
|
// import TableDropdown from "@/components/tableDropdown"
|
|
63
65
|
|
|
64
66
|
const PageContainer = styled.div`
|
|
@@ -75,6 +77,7 @@ export default {
|
|
|
75
77
|
Toggle,
|
|
76
78
|
InputNumber,
|
|
77
79
|
PageSubtitle,
|
|
80
|
+
Spinner,
|
|
78
81
|
// TableDropdown,
|
|
79
82
|
},
|
|
80
83
|
data() {
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
@click.native="onOutsideClose()"
|
|
6
6
|
>
|
|
7
7
|
<modal-container @click.stop>
|
|
8
|
+
<spinner v-if="isLoading" size="50px" :fullWidth="true" />
|
|
8
9
|
<close-button @click.native="onCloseModal()" class="close" />
|
|
9
10
|
<slot />
|
|
10
11
|
</modal-container>
|
|
@@ -15,12 +16,13 @@
|
|
|
15
16
|
// import Modal from "@eturnity/eturnity_reusable_components/src/components/modals/modal"
|
|
16
17
|
// This is a more flexible modal box, where the parent can decide how the body of the modal looks
|
|
17
18
|
// To use:
|
|
18
|
-
// <modal :isOpen="isOpen" @on-close="$emit('on-close-summary')" :preventOutsideClose="true">
|
|
19
|
+
// <modal :isOpen="isOpen" @on-close="$emit('on-close-summary')" :preventOutsideClose="true" :isLoading="true">
|
|
19
20
|
// <div>Data....</div>
|
|
20
21
|
// </modal>
|
|
21
22
|
|
|
22
23
|
import styled from "vue-styled-components"
|
|
23
24
|
import CloseButton from "../../buttons/closeButton"
|
|
25
|
+
import Spinner from "../../spinner"
|
|
24
26
|
|
|
25
27
|
const pageAttrs = { isOpen: Boolean }
|
|
26
28
|
const PageWrapper = styled("div", pageAttrs)`
|
|
@@ -92,6 +94,7 @@ export default {
|
|
|
92
94
|
PageWrapper,
|
|
93
95
|
ModalContainer,
|
|
94
96
|
CloseButton,
|
|
97
|
+
Spinner,
|
|
95
98
|
},
|
|
96
99
|
props: {
|
|
97
100
|
isOpen: {
|
|
@@ -102,6 +105,10 @@ export default {
|
|
|
102
105
|
required: false,
|
|
103
106
|
default: false,
|
|
104
107
|
},
|
|
108
|
+
isLoading: {
|
|
109
|
+
required: false,
|
|
110
|
+
default: false,
|
|
111
|
+
},
|
|
105
112
|
},
|
|
106
113
|
methods: {
|
|
107
114
|
onCloseModal() {
|
|
@@ -1,16 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<spinner-container v-if="fullWidth">
|
|
3
3
|
<container>
|
|
4
|
-
<spinner-wrapper
|
|
4
|
+
<spinner-wrapper
|
|
5
|
+
:size="size"
|
|
6
|
+
:src="require('../../assets/icons/black_spinner.svg')"
|
|
7
|
+
/>
|
|
5
8
|
</container>
|
|
6
9
|
</spinner-container>
|
|
7
10
|
<container v-else>
|
|
8
|
-
<spinner-wrapper
|
|
11
|
+
<spinner-wrapper
|
|
12
|
+
:size="size"
|
|
13
|
+
:src="require('../../assets/icons/black_spinner.svg')"
|
|
14
|
+
/>
|
|
9
15
|
</container>
|
|
10
16
|
</template>
|
|
11
17
|
|
|
12
18
|
<script>
|
|
13
19
|
// import Spinner from "@eturnity/eturnity_reusable_components/src/components/spinner"
|
|
20
|
+
// <spinner size="30px" />
|
|
14
21
|
import styled from "vue-styled-components"
|
|
15
22
|
|
|
16
23
|
const SpinnerContainer = styled.div`
|
|
@@ -32,8 +39,9 @@ const Container = styled.div`
|
|
|
32
39
|
justify-items: center;
|
|
33
40
|
`
|
|
34
41
|
|
|
35
|
-
const
|
|
36
|
-
|
|
42
|
+
const spinnerAttrs = { size: String }
|
|
43
|
+
const SpinnerWrapper = styled("img", spinnerAttrs)`
|
|
44
|
+
width: ${(props) => (props.size ? props.size : "60px")};
|
|
37
45
|
`
|
|
38
46
|
|
|
39
47
|
export default {
|
|
@@ -48,6 +56,10 @@ export default {
|
|
|
48
56
|
required: false,
|
|
49
57
|
default: false,
|
|
50
58
|
},
|
|
59
|
+
size: {
|
|
60
|
+
required: false,
|
|
61
|
+
default: null,
|
|
62
|
+
},
|
|
51
63
|
},
|
|
52
64
|
}
|
|
53
65
|
</script>
|
|
@@ -43,10 +43,7 @@
|
|
|
43
43
|
v-if="item.type === 'input'"
|
|
44
44
|
@click.native.stop="onInputClick()"
|
|
45
45
|
>
|
|
46
|
-
<text-container
|
|
47
|
-
v-if="customInputDisabled && item.value === '-'"
|
|
48
|
-
class="input-placeholder"
|
|
49
|
-
>
|
|
46
|
+
<text-container v-if="customInputDisabled" class="input-placeholder">
|
|
50
47
|
<span> {{ item.value }}</span>
|
|
51
48
|
</text-container>
|
|
52
49
|
<input-text
|