@eturnity/eturnity_reusable_components 1.2.0-beta.2 → 1.2.1-beta.0
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
|
@@ -1,18 +1,20 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<ThemeProvider :theme="getTheme()" :style="{ height: '100%' }">
|
|
3
3
|
<page-container>
|
|
4
|
-
<
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
<
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
4
|
+
<br />
|
|
5
|
+
<modal backdrop="dark" :isLoading="false" :isOpen="true">
|
|
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
|
|
16
18
|
:colSpan="3"
|
|
17
19
|
:tableItems="getDropdownValues()"
|
|
18
20
|
@toggle-dropdown-open="toggleDropdownOpen()"
|
|
@@ -21,14 +23,14 @@
|
|
|
21
23
|
:optionItems="itemOptions"
|
|
22
24
|
:optionsDisplay="['display_name', 'company_item_number', 'model']"
|
|
23
25
|
/> -->
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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>
|
|
32
34
|
<br />
|
|
33
35
|
<toggle
|
|
34
36
|
@on-toggle-change="onInputChange($event)"
|
|
@@ -61,17 +63,18 @@
|
|
|
61
63
|
</template>
|
|
62
64
|
|
|
63
65
|
<script>
|
|
64
|
-
import { ThemeProvider } from
|
|
65
|
-
import theme from
|
|
66
|
-
import styled from
|
|
67
|
-
import MainTable from
|
|
68
|
-
import ThreeDots from
|
|
69
|
-
import Toggle from
|
|
70
|
-
import InputNumber from
|
|
71
|
-
import Checkbox from
|
|
72
|
-
import PageSubtitle from
|
|
73
|
-
import Spinner from
|
|
74
|
-
import ExternalButton from
|
|
66
|
+
import { ThemeProvider } from 'vue-styled-components'
|
|
67
|
+
import theme from './assets/theme'
|
|
68
|
+
import styled from 'vue-styled-components'
|
|
69
|
+
import MainTable from '@/components/tables/mainTable'
|
|
70
|
+
import ThreeDots from '@/components/threeDots'
|
|
71
|
+
import Toggle from '@/components/inputs/toggle'
|
|
72
|
+
import InputNumber from '@/components/inputs/inputNumber'
|
|
73
|
+
import Checkbox from '@/components/inputs/checkbox'
|
|
74
|
+
import PageSubtitle from '@/components/pageSubtitle'
|
|
75
|
+
import Spinner from '@/components/spinner'
|
|
76
|
+
import ExternalButton from '@/components/buttons/externalButton'
|
|
77
|
+
import Modal from '@/components/modals/modal'
|
|
75
78
|
// import TableDropdown from "@/components/tableDropdown"
|
|
76
79
|
|
|
77
80
|
const PageContainer = styled.div`
|
|
@@ -79,7 +82,7 @@ const PageContainer = styled.div`
|
|
|
79
82
|
`
|
|
80
83
|
|
|
81
84
|
export default {
|
|
82
|
-
name:
|
|
85
|
+
name: 'App',
|
|
83
86
|
components: {
|
|
84
87
|
ThemeProvider,
|
|
85
88
|
PageContainer,
|
|
@@ -91,62 +94,62 @@ export default {
|
|
|
91
94
|
Spinner,
|
|
92
95
|
Checkbox,
|
|
93
96
|
ExternalButton,
|
|
94
|
-
|
|
97
|
+
Modal,
|
|
95
98
|
},
|
|
96
99
|
data() {
|
|
97
100
|
return {
|
|
98
101
|
inputValue: null,
|
|
99
|
-
checkedOption:
|
|
102
|
+
checkedOption: 'button_1',
|
|
100
103
|
question: {
|
|
101
104
|
number_format_precision: 4,
|
|
102
105
|
number_min_allowed: 0,
|
|
103
106
|
number_max_allowed: 10,
|
|
104
|
-
unit_short_name:
|
|
107
|
+
unit_short_name: 'cm',
|
|
105
108
|
},
|
|
106
109
|
dropdownOpen: false,
|
|
107
110
|
isChecked: false,
|
|
108
111
|
listOptions: [
|
|
109
112
|
{
|
|
110
|
-
name:
|
|
111
|
-
value:
|
|
113
|
+
name: 'Option 1',
|
|
114
|
+
value: 'option_1',
|
|
112
115
|
disabled: true,
|
|
113
116
|
},
|
|
114
117
|
{
|
|
115
|
-
name:
|
|
116
|
-
value:
|
|
118
|
+
name: 'Option 2',
|
|
119
|
+
value: 'option_2',
|
|
117
120
|
},
|
|
118
121
|
{
|
|
119
|
-
name:
|
|
120
|
-
value:
|
|
122
|
+
name: 'Option 3',
|
|
123
|
+
value: 'option_3',
|
|
121
124
|
},
|
|
122
125
|
{
|
|
123
|
-
name:
|
|
124
|
-
value:
|
|
126
|
+
name: 'Option 4',
|
|
127
|
+
value: 'option_4',
|
|
125
128
|
},
|
|
126
129
|
],
|
|
127
130
|
itemOptions: [
|
|
128
131
|
{
|
|
129
|
-
display_name:
|
|
130
|
-
company_item_number:
|
|
131
|
-
model:
|
|
132
|
+
display_name: 'Test 1',
|
|
133
|
+
company_item_number: '123',
|
|
134
|
+
model: 'BTB-2145 Long Text Long Text Long Text Long Text Long Text',
|
|
132
135
|
id: 1,
|
|
133
136
|
},
|
|
134
137
|
{
|
|
135
|
-
display_name:
|
|
136
|
-
company_item_number:
|
|
137
|
-
model:
|
|
138
|
+
display_name: 'Test 2',
|
|
139
|
+
company_item_number: '1234',
|
|
140
|
+
model: 'BTB-123',
|
|
138
141
|
id: 2,
|
|
139
142
|
},
|
|
140
143
|
{
|
|
141
|
-
display_name:
|
|
142
|
-
company_item_number:
|
|
143
|
-
model:
|
|
144
|
+
display_name: 'Test 3',
|
|
145
|
+
company_item_number: '12345',
|
|
146
|
+
model: 'BTB-543',
|
|
144
147
|
id: 3,
|
|
145
148
|
},
|
|
146
149
|
{
|
|
147
|
-
display_name:
|
|
148
|
-
company_item_number:
|
|
149
|
-
model:
|
|
150
|
+
display_name: 'Test 4',
|
|
151
|
+
company_item_number: '123456',
|
|
152
|
+
model: 'BTB-4930',
|
|
150
153
|
id: 4,
|
|
151
154
|
},
|
|
152
155
|
],
|
|
@@ -163,7 +166,7 @@ export default {
|
|
|
163
166
|
return this.dropdownOpen
|
|
164
167
|
},
|
|
165
168
|
onClickButton() {
|
|
166
|
-
console.log(
|
|
169
|
+
console.log('Test')
|
|
167
170
|
},
|
|
168
171
|
toggleDropdownOpen() {
|
|
169
172
|
this.dropdownOpen = !this.dropdownOpen
|
|
@@ -174,19 +177,19 @@ export default {
|
|
|
174
177
|
{
|
|
175
178
|
value: this.getComponentInfo({
|
|
176
179
|
row: this.itemOptions[0],
|
|
177
|
-
value:
|
|
180
|
+
value: 'display_name',
|
|
178
181
|
}),
|
|
179
182
|
},
|
|
180
183
|
{
|
|
181
184
|
value: this.getComponentInfo({
|
|
182
185
|
row: this.itemOptions[0],
|
|
183
|
-
value:
|
|
186
|
+
value: 'company_item_number',
|
|
184
187
|
}),
|
|
185
188
|
},
|
|
186
189
|
{
|
|
187
190
|
value: this.getComponentInfo({
|
|
188
191
|
row: this.itemOptions[0],
|
|
189
|
-
value:
|
|
192
|
+
value: 'model',
|
|
190
193
|
}),
|
|
191
194
|
},
|
|
192
195
|
]
|
|
@@ -199,7 +202,7 @@ export default {
|
|
|
199
202
|
} else if (row[value]) {
|
|
200
203
|
item = row[value]
|
|
201
204
|
} else {
|
|
202
|
-
item =
|
|
205
|
+
item = '-'
|
|
203
206
|
}
|
|
204
207
|
return item
|
|
205
208
|
},
|
|
@@ -213,4 +216,4 @@ body {
|
|
|
213
216
|
height: 100%;
|
|
214
217
|
margin: 0;
|
|
215
218
|
}
|
|
216
|
-
</style>
|
|
219
|
+
</style>
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
<input-container
|
|
17
17
|
ref="inputField1"
|
|
18
18
|
:hasUnit="unitName && !!unitName.length"
|
|
19
|
-
:placeholder="
|
|
19
|
+
:placeholder="placeholder"
|
|
20
20
|
:isError="isError"
|
|
21
21
|
:inputWidth="inputWidth"
|
|
22
22
|
:minWidth="minWidth"
|
|
@@ -68,12 +68,12 @@
|
|
|
68
68
|
// :minNumber="0"
|
|
69
69
|
// fontColor="blue"
|
|
70
70
|
// />
|
|
71
|
-
import styled from
|
|
71
|
+
import styled from "vue-styled-components"
|
|
72
72
|
import {
|
|
73
73
|
stringToNumber,
|
|
74
74
|
numberToString,
|
|
75
|
-
} from
|
|
76
|
-
import InfoText from
|
|
75
|
+
} from "../../../helpers/numberConverter"
|
|
76
|
+
import InfoText from "../../infoText"
|
|
77
77
|
|
|
78
78
|
const Container = styled.div`
|
|
79
79
|
width: 100%;
|
|
@@ -91,36 +91,29 @@ const inputProps = {
|
|
|
91
91
|
fontSize: String,
|
|
92
92
|
fontColor: String,
|
|
93
93
|
}
|
|
94
|
-
const InputContainer = styled(
|
|
94
|
+
const InputContainer = styled("input", inputProps)`
|
|
95
95
|
border: ${(props) =>
|
|
96
96
|
props.isError
|
|
97
|
-
?
|
|
97
|
+
? "1px solid " + props.theme.colors.red
|
|
98
98
|
: props.noBorder
|
|
99
|
-
<<<<<<< HEAD
|
|
100
|
-
? 'none'
|
|
101
|
-
: props.hasLength
|
|
102
|
-
? '1px solid ' + props.theme.colors.black
|
|
103
|
-
: '1px solid ' + props.theme.colors.mediumGray};
|
|
104
|
-
=======
|
|
105
99
|
? "none"
|
|
106
100
|
: "1px solid " + props.theme.colors.mediumGray};
|
|
107
|
-
>>>>>>> master
|
|
108
101
|
padding: ${(props) =>
|
|
109
|
-
props.hasUnit ?
|
|
102
|
+
props.hasUnit ? "11px 40px 11px 10px" : "11px 5px 11px 10px"};
|
|
110
103
|
border-radius: 4px;
|
|
111
104
|
text-align: ${(props) => props.textAlign};
|
|
112
|
-
cursor: ${(props) => (props.isDisabled ?
|
|
113
|
-
font-size: ${(props) => (props.fontSize ? props.fontSize :
|
|
105
|
+
cursor: ${(props) => (props.isDisabled ? "not-allowed" : "auto")};
|
|
106
|
+
font-size: ${(props) => (props.fontSize ? props.fontSize : "13px")};
|
|
114
107
|
color: ${(props) =>
|
|
115
108
|
props.isError
|
|
116
109
|
? props.theme.colors.red
|
|
117
110
|
: props.fontColor
|
|
118
|
-
? props.fontColor +
|
|
111
|
+
? props.fontColor + " !important"
|
|
119
112
|
: props.theme.colors.black};
|
|
120
|
-
width: ${(props) => (props.inputWidth ? props.inputWidth :
|
|
121
|
-
min-width: ${(props) => (props.minWidth ? props.minWidth :
|
|
113
|
+
width: ${(props) => (props.inputWidth ? props.inputWidth : "100%")};
|
|
114
|
+
min-width: ${(props) => (props.minWidth ? props.minWidth : "unset")};
|
|
122
115
|
background-color: ${(props) =>
|
|
123
|
-
props.isDisabled ? props.theme.colors.grey5 :
|
|
116
|
+
props.isDisabled ? props.theme.colors.grey5 : "#fff"};
|
|
124
117
|
box-sizing: border-box;
|
|
125
118
|
|
|
126
119
|
&::placeholder {
|
|
@@ -137,7 +130,7 @@ const InputWrapper = styled.span`
|
|
|
137
130
|
position: relative;
|
|
138
131
|
`
|
|
139
132
|
|
|
140
|
-
const UnitContainer = styled(
|
|
133
|
+
const UnitContainer = styled("span", inputProps)`
|
|
141
134
|
border-left: 1px solid
|
|
142
135
|
${(props) =>
|
|
143
136
|
props.isError
|
|
@@ -176,7 +169,7 @@ const LabelText = styled.div`
|
|
|
176
169
|
`
|
|
177
170
|
|
|
178
171
|
export default {
|
|
179
|
-
name:
|
|
172
|
+
name: "input-number",
|
|
180
173
|
components: {
|
|
181
174
|
Container,
|
|
182
175
|
InputContainer,
|
|
@@ -189,20 +182,14 @@ export default {
|
|
|
189
182
|
},
|
|
190
183
|
data() {
|
|
191
184
|
return {
|
|
192
|
-
textInput:
|
|
185
|
+
textInput: "",
|
|
193
186
|
isFocused: false,
|
|
194
187
|
}
|
|
195
188
|
},
|
|
196
|
-
computed: {
|
|
197
|
-
displayedPlaceholder() {
|
|
198
|
-
if (this.placeholder) return this.placeholder
|
|
199
|
-
return `${this.minNumber || 0} ${this.unitName ? this.unitName : ''}`
|
|
200
|
-
},
|
|
201
|
-
},
|
|
202
189
|
props: {
|
|
203
190
|
placeholder: {
|
|
204
191
|
required: false,
|
|
205
|
-
default:
|
|
192
|
+
default: "",
|
|
206
193
|
},
|
|
207
194
|
isError: {
|
|
208
195
|
required: false,
|
|
@@ -226,7 +213,7 @@ export default {
|
|
|
226
213
|
},
|
|
227
214
|
errorMessage: {
|
|
228
215
|
required: false,
|
|
229
|
-
default:
|
|
216
|
+
default: "Please insert a correct number",
|
|
230
217
|
},
|
|
231
218
|
numberPrecision: {
|
|
232
219
|
required: false,
|
|
@@ -234,7 +221,7 @@ export default {
|
|
|
234
221
|
},
|
|
235
222
|
unitName: {
|
|
236
223
|
required: false,
|
|
237
|
-
default:
|
|
224
|
+
default: "",
|
|
238
225
|
},
|
|
239
226
|
showLinearUnitName: {
|
|
240
227
|
required: false,
|
|
@@ -250,11 +237,11 @@ export default {
|
|
|
250
237
|
},
|
|
251
238
|
textAlign: {
|
|
252
239
|
required: false,
|
|
253
|
-
default:
|
|
240
|
+
default: "left",
|
|
254
241
|
},
|
|
255
242
|
fontSize: {
|
|
256
243
|
required: false,
|
|
257
|
-
default:
|
|
244
|
+
default: "13px",
|
|
258
245
|
},
|
|
259
246
|
labelText: {
|
|
260
247
|
required: false,
|
|
@@ -266,7 +253,7 @@ export default {
|
|
|
266
253
|
},
|
|
267
254
|
labelInfoAlign: {
|
|
268
255
|
required: false,
|
|
269
|
-
default:
|
|
256
|
+
default: "right",
|
|
270
257
|
},
|
|
271
258
|
minNumber: {
|
|
272
259
|
required: false,
|
|
@@ -284,28 +271,24 @@ export default {
|
|
|
284
271
|
methods: {
|
|
285
272
|
onChangeHandler(event) {
|
|
286
273
|
if (isNaN(event)) {
|
|
287
|
-
<<<<<<< HEAD
|
|
288
|
-
event = ''
|
|
289
|
-
=======
|
|
290
274
|
event = this.minNumber || this.minNumber === 0 ? this.minNumber : event
|
|
291
|
-
>>>>>>> master
|
|
292
275
|
}
|
|
293
|
-
this.$emit(
|
|
276
|
+
this.$emit("input-change", event)
|
|
294
277
|
},
|
|
295
278
|
onEvaluateCode(val) {
|
|
296
279
|
// function to perform math on the code
|
|
297
280
|
// filter the string in case of any malicious content
|
|
298
|
-
let filtered = val.replace(/[^-()\d/*+.,]/g,
|
|
281
|
+
let filtered = val.replace(/[^-()\d/*+.,]/g, "")
|
|
299
282
|
filtered = filtered.split(/([-+*/()])/)
|
|
300
283
|
let formatted = filtered.map((item) => {
|
|
301
284
|
if (
|
|
302
|
-
item ===
|
|
303
|
-
item ===
|
|
304
|
-
item ===
|
|
305
|
-
item ===
|
|
306
|
-
item ===
|
|
307
|
-
item ===
|
|
308
|
-
item ===
|
|
285
|
+
item === "+" ||
|
|
286
|
+
item === "-" ||
|
|
287
|
+
item === "*" ||
|
|
288
|
+
item === "/" ||
|
|
289
|
+
item === "(" ||
|
|
290
|
+
item === ")" ||
|
|
291
|
+
item === ""
|
|
309
292
|
) {
|
|
310
293
|
return item
|
|
311
294
|
} else {
|
|
@@ -316,15 +299,11 @@ export default {
|
|
|
316
299
|
return num
|
|
317
300
|
}
|
|
318
301
|
})
|
|
319
|
-
<<<<<<< HEAD
|
|
320
|
-
let evaluated = eval(formatted.join(''))
|
|
321
|
-
=======
|
|
322
302
|
let evaluated = eval(formatted.join(""))
|
|
323
303
|
evaluated = stringToNumber({
|
|
324
304
|
value: evaluated,
|
|
325
305
|
numberPrecision: this.numberPrecision,
|
|
326
306
|
})
|
|
327
|
-
>>>>>>> master
|
|
328
307
|
return evaluated
|
|
329
308
|
},
|
|
330
309
|
onInputBlur(e) {
|
|
@@ -344,8 +323,8 @@ export default {
|
|
|
344
323
|
? value
|
|
345
324
|
: this.minNumber || this.minNumber === 0
|
|
346
325
|
? this.minNumber
|
|
347
|
-
:
|
|
348
|
-
this.$emit(
|
|
326
|
+
: ""
|
|
327
|
+
this.$emit("input-blur", adjustedMinValue)
|
|
349
328
|
},
|
|
350
329
|
focusInput() {
|
|
351
330
|
if (this.disabled) {
|
|
@@ -362,16 +341,8 @@ export default {
|
|
|
362
341
|
? value
|
|
363
342
|
: this.minNumber || this.minNumber === 0
|
|
364
343
|
? this.minNumber
|
|
365
|
-
:
|
|
344
|
+
: ""
|
|
366
345
|
if ((adjustedMinValue || adjustedMinValue === 0) && !this.isFocused) {
|
|
367
|
-
<<<<<<< HEAD
|
|
368
|
-
let input = numberToString({
|
|
369
|
-
value: adjustedMinValue,
|
|
370
|
-
numberPrecision: this.numberPrecision,
|
|
371
|
-
})
|
|
372
|
-
let unit = this.showLinearUnitName ? '' : this.unitName
|
|
373
|
-
return input + ' ' + unit
|
|
374
|
-
=======
|
|
375
346
|
let input = this.numberToStringEnabled
|
|
376
347
|
? numberToString({
|
|
377
348
|
value: adjustedMinValue,
|
|
@@ -380,9 +351,8 @@ export default {
|
|
|
380
351
|
: adjustedMinValue
|
|
381
352
|
let unit = this.showLinearUnitName ? "" : this.unitName
|
|
382
353
|
return input + " " + unit
|
|
383
|
-
>>>>>>> master
|
|
384
354
|
} else if (!adjustedMinValue && adjustedMinValue !== 0) {
|
|
385
|
-
return
|
|
355
|
+
return ""
|
|
386
356
|
} else {
|
|
387
357
|
return this.numberToStringEnabled
|
|
388
358
|
? numberToString({
|
|
@@ -410,9 +380,9 @@ export default {
|
|
|
410
380
|
clearInput: function (value) {
|
|
411
381
|
if (value) {
|
|
412
382
|
// If the value is typed, then we should clear the textInput on Continue
|
|
413
|
-
this.textInput =
|
|
383
|
+
this.textInput = ""
|
|
414
384
|
}
|
|
415
385
|
},
|
|
416
386
|
},
|
|
417
387
|
}
|
|
418
|
-
</script>
|
|
388
|
+
</script>
|
|
@@ -3,15 +3,19 @@
|
|
|
3
3
|
:isOpen="isOpen"
|
|
4
4
|
:class="{ visible: isOpen, hidden: !isOpen }"
|
|
5
5
|
@click.native="onOutsideClose()"
|
|
6
|
+
:backdrop="backdrop"
|
|
7
|
+
:fullwidthSpinner="fullwidthSpinner"
|
|
6
8
|
>
|
|
7
9
|
<modal-container @click.stop>
|
|
8
|
-
<spinner v-if="isLoading" size="50px" :fullWidth="
|
|
10
|
+
<spinner v-if="isLoading" size="50px" :fullWidth="fullwidthSpinner" />
|
|
11
|
+
<content-container :visible="!isLoading">
|
|
12
|
+
<slot />
|
|
13
|
+
</content-container>
|
|
9
14
|
<close-button
|
|
10
15
|
v-if="!hideClose"
|
|
11
16
|
@click.native="onCloseModal()"
|
|
12
17
|
class="close"
|
|
13
18
|
/>
|
|
14
|
-
<slot />
|
|
15
19
|
</modal-container>
|
|
16
20
|
</page-wrapper>
|
|
17
21
|
</template>
|
|
@@ -28,7 +32,12 @@ import styled from 'vue-styled-components'
|
|
|
28
32
|
import CloseButton from '../../buttons/closeButton'
|
|
29
33
|
import Spinner from '../../spinner'
|
|
30
34
|
|
|
31
|
-
const
|
|
35
|
+
const contentAttrs = { visible: Boolean }
|
|
36
|
+
const ContentContainer = styled('div', contentAttrs)`
|
|
37
|
+
visibility: ${(props) => (props.visible ? 'inherit' : 'hidden')};
|
|
38
|
+
`
|
|
39
|
+
|
|
40
|
+
const pageAttrs = { isOpen: Boolean, backdrop: String }
|
|
32
41
|
const PageWrapper = styled('div', pageAttrs)`
|
|
33
42
|
position: fixed;
|
|
34
43
|
display: grid;
|
|
@@ -36,7 +45,10 @@ const PageWrapper = styled('div', pageAttrs)`
|
|
|
36
45
|
left: 0;
|
|
37
46
|
width: 100%;
|
|
38
47
|
height: 100%;
|
|
39
|
-
background-color:
|
|
48
|
+
background-color: ${(props) =>
|
|
49
|
+
props.backdrop == 'dark'
|
|
50
|
+
? 'rgba(0, 0, 0, 0.4)'
|
|
51
|
+
: 'rgba(255, 255, 255, 0.9)'};
|
|
40
52
|
z-index: 99999;
|
|
41
53
|
overflow: auto;
|
|
42
54
|
|
|
@@ -98,7 +110,8 @@ export default {
|
|
|
98
110
|
PageWrapper,
|
|
99
111
|
ModalContainer,
|
|
100
112
|
CloseButton,
|
|
101
|
-
Spinner
|
|
113
|
+
Spinner,
|
|
114
|
+
ContentContainer
|
|
102
115
|
},
|
|
103
116
|
props: {
|
|
104
117
|
isOpen: {
|
|
@@ -116,6 +129,14 @@ export default {
|
|
|
116
129
|
hideClose: {
|
|
117
130
|
required: false,
|
|
118
131
|
default: false
|
|
132
|
+
},
|
|
133
|
+
backdrop: {
|
|
134
|
+
required: false,
|
|
135
|
+
default: 'white'
|
|
136
|
+
},
|
|
137
|
+
fullwidthSpinner: {
|
|
138
|
+
required: false,
|
|
139
|
+
default: true
|
|
119
140
|
}
|
|
120
141
|
},
|
|
121
142
|
methods: {
|
|
@@ -135,4 +156,4 @@ export default {
|
|
|
135
156
|
}
|
|
136
157
|
}
|
|
137
158
|
}
|
|
138
|
-
</script>
|
|
159
|
+
</script>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<script>
|
|
19
19
|
// import Spinner from "@eturnity/eturnity_reusable_components/src/components/spinner"
|
|
20
20
|
// <spinner size="30px" />
|
|
21
|
-
import styled from
|
|
21
|
+
import styled from 'vue-styled-components'
|
|
22
22
|
|
|
23
23
|
const SpinnerContainer = styled.div`
|
|
24
24
|
position: fixed;
|
|
@@ -37,29 +37,32 @@ const Container = styled.div`
|
|
|
37
37
|
display: grid;
|
|
38
38
|
align-items: center;
|
|
39
39
|
justify-items: center;
|
|
40
|
+
position: absolute;
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
40
43
|
`
|
|
41
44
|
|
|
42
45
|
const spinnerAttrs = { size: String }
|
|
43
|
-
const SpinnerWrapper = styled(
|
|
44
|
-
width: ${(props) => (props.size ? props.size :
|
|
46
|
+
const SpinnerWrapper = styled('img', spinnerAttrs)`
|
|
47
|
+
width: ${(props) => (props.size ? props.size : '60px')};
|
|
45
48
|
`
|
|
46
49
|
|
|
47
50
|
export default {
|
|
48
|
-
name:
|
|
51
|
+
name: 'spinner',
|
|
49
52
|
components: {
|
|
50
53
|
Container,
|
|
51
54
|
SpinnerWrapper,
|
|
52
|
-
SpinnerContainer
|
|
55
|
+
SpinnerContainer
|
|
53
56
|
},
|
|
54
57
|
props: {
|
|
55
58
|
fullWidth: {
|
|
56
59
|
required: false,
|
|
57
|
-
default: false
|
|
60
|
+
default: false
|
|
58
61
|
},
|
|
59
62
|
size: {
|
|
60
63
|
required: false,
|
|
61
|
-
default: null
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
+
default: null
|
|
65
|
+
}
|
|
66
|
+
}
|
|
64
67
|
}
|
|
65
|
-
</script>
|
|
68
|
+
</script>
|