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