renusify 2.0.2 → 2.0.4
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.
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component :class="`${$r.prefix}btn ${classes} size-${size}`"
|
|
3
3
|
v-bind="att"
|
|
4
|
-
|
|
4
|
+
:is="route.tag"
|
|
5
|
+
:type="type"
|
|
6
|
+
:aria-label="icon?'icon':undefined"
|
|
5
7
|
v-ripple>
|
|
6
8
|
<span class="btn-content">
|
|
7
9
|
<slot></slot>
|
|
@@ -9,7 +11,7 @@
|
|
|
9
11
|
<span class="label d-flex v-center h-center px-1 overflow-hidden" :class="labelClass" v-if="label">
|
|
10
12
|
<transition name="counter-up" mode="out-in">
|
|
11
13
|
<span :key="label">
|
|
12
|
-
{{label}}
|
|
14
|
+
{{ label }}
|
|
13
15
|
</span>
|
|
14
16
|
</transition>
|
|
15
17
|
</span>
|
|
@@ -32,6 +34,10 @@ export default {
|
|
|
32
34
|
type: String,
|
|
33
35
|
default: 'button'
|
|
34
36
|
},
|
|
37
|
+
type: {
|
|
38
|
+
type: String,
|
|
39
|
+
default: 'button'
|
|
40
|
+
},
|
|
35
41
|
size: {
|
|
36
42
|
type: String,
|
|
37
43
|
default: 'default',
|
|
@@ -39,8 +45,8 @@ export default {
|
|
|
39
45
|
return ['x-small', 'small', 'default', 'large', 'x-large'].indexOf(value) !== -1
|
|
40
46
|
}
|
|
41
47
|
},
|
|
42
|
-
label: [String,Number],
|
|
43
|
-
labelClass: [String,Array,Object],
|
|
48
|
+
label: [String, Number],
|
|
49
|
+
labelClass: [String, Array, Object],
|
|
44
50
|
block: Boolean,
|
|
45
51
|
depressed: Boolean,
|
|
46
52
|
outlined: Boolean,
|
|
@@ -54,22 +60,22 @@ export default {
|
|
|
54
60
|
loading: Boolean
|
|
55
61
|
},
|
|
56
62
|
computed: {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
att() {
|
|
64
|
+
let res = {}
|
|
65
|
+
if (this.href) {
|
|
66
|
+
res['href'] = this.route.data.attrs.href
|
|
67
|
+
}
|
|
62
68
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
classes
|
|
69
|
+
if (this.target) {
|
|
70
|
+
res['rel'] = 'noreferrer'
|
|
71
|
+
res['target'] = this.route.data.attrs.target
|
|
72
|
+
}
|
|
73
|
+
if (this.to) {
|
|
74
|
+
res['to'] = this.route.data.props.to
|
|
75
|
+
}
|
|
76
|
+
return res
|
|
77
|
+
},
|
|
78
|
+
classes() {
|
|
73
79
|
let c = ''
|
|
74
80
|
if (!this.depressed && !this.text && !this.outlined && !this.disabled) {
|
|
75
81
|
c += 'btn-contained'
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="`${$r.prefix}json-input
|
|
2
|
+
<div :class="[`${$r.prefix}json-input`,{'input-tile':c_tile}]">
|
|
3
3
|
<div class="d-flex v-center">
|
|
4
4
|
<r-btn v-if="!disableEditKey" class="me-1 mb-1" icon @click.prevent="modeForm=!modeForm">{}</r-btn>
|
|
5
5
|
<div v-if="label">{{ label }}</div>
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
:tile="tile"
|
|
30
30
|
class="w-30 pe-1"></r-text-input>
|
|
31
31
|
<div class="w-20" v-if="!valueType">
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
32
|
+
<r-select-input v-model="info.type"
|
|
33
|
+
:items="['text','number','boolean','json','array']"
|
|
34
|
+
:tile="tile"
|
|
35
|
+
:translate="translate"
|
|
36
|
+
class="me-1"
|
|
37
|
+
disableSearch
|
|
38
|
+
firstSelect
|
|
39
|
+
just-value
|
|
40
|
+
@update:model-value="info.value=null"></r-select-input>
|
|
41
41
|
</div>
|
|
42
42
|
<r-text-input v-if="info.type==='text'"
|
|
43
43
|
:tile="tile"
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
<r-switch-input v-else-if="info.type==='boolean'"
|
|
50
50
|
:tile="tile"
|
|
51
51
|
v-model="info.value" :label="valueLabel||$t('value','renusify')"></r-switch-input>
|
|
52
|
-
<r-btn
|
|
52
|
+
<r-btn :rounded="!c_tile" class="ms-1 color-success" @click.prevent="add">{{ $t('add', 'renusify') }}</r-btn>
|
|
53
53
|
</div>
|
|
54
54
|
</div>
|
|
55
55
|
<div v-else :class="{'state-error':error}" class="json-highlight ltr">
|
|
@@ -91,7 +91,7 @@ export default {
|
|
|
91
91
|
template: Object,
|
|
92
92
|
baseArray: Boolean,
|
|
93
93
|
disableAdd: Boolean,
|
|
94
|
-
tile: Boolean,
|
|
94
|
+
tile: {type: Boolean, default: undefined},
|
|
95
95
|
disableEditKey: Boolean,
|
|
96
96
|
disableDel: Boolean,
|
|
97
97
|
translate: Boolean
|
|
@@ -131,6 +131,12 @@ export default {
|
|
|
131
131
|
},
|
|
132
132
|
},
|
|
133
133
|
computed: {
|
|
134
|
+
c_tile() {
|
|
135
|
+
if (this.tile === undefined && this.$r.inputs.tile) {
|
|
136
|
+
return this.$r.inputs.tile
|
|
137
|
+
}
|
|
138
|
+
return this.tile
|
|
139
|
+
},
|
|
134
140
|
build() {
|
|
135
141
|
if (!this.lazyValue) {
|
|
136
142
|
return "";
|
|
@@ -208,6 +214,21 @@ export default {
|
|
|
208
214
|
@import "~renusify/style/include";
|
|
209
215
|
|
|
210
216
|
.#{$prefix}json-input {
|
|
217
|
+
background: var(--color-sheet-container);
|
|
218
|
+
padding: 5px;
|
|
219
|
+
|
|
220
|
+
&.input-tile {
|
|
221
|
+
border-radius: map-get($borders, 'sm');
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
&:not(.input-tile) {
|
|
225
|
+
border-radius: map-get($borders, 'xl');
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.input-control {
|
|
229
|
+
background: var(--color-sheet-container-low);
|
|
230
|
+
}
|
|
231
|
+
|
|
211
232
|
textarea {
|
|
212
233
|
outline: none;
|
|
213
234
|
border: 1px solid var(--color-sheet-low);
|
|
@@ -264,16 +285,16 @@ export default {
|
|
|
264
285
|
}
|
|
265
286
|
|
|
266
287
|
.color-orange {
|
|
267
|
-
color:
|
|
288
|
+
color: var(--color-error);
|
|
268
289
|
}
|
|
269
290
|
|
|
270
291
|
.color-green {
|
|
271
|
-
color:
|
|
292
|
+
color: var(--color-success);
|
|
272
293
|
}
|
|
273
294
|
|
|
274
295
|
|
|
275
296
|
.color-blue {
|
|
276
|
-
color:
|
|
297
|
+
color: var(--color-info);
|
|
277
298
|
}
|
|
278
299
|
}
|
|
279
300
|
}
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</template>
|
|
62
62
|
</r-input>
|
|
63
63
|
</r-col>
|
|
64
|
-
<r-col v-if="files.length>0" class="col-12">
|
|
64
|
+
<r-col v-if="files&&files.length>0" class="col-12">
|
|
65
65
|
<div v-for="(img,i) in files" :key="i"
|
|
66
66
|
class="ma-1 img-holder">
|
|
67
67
|
<r-btn class="color-error-text" icon @click.prevent="deleteImage(img,i)">
|
|
@@ -197,7 +197,7 @@ export default {
|
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
199
|
},
|
|
200
|
-
tile: Boolean,
|
|
200
|
+
tile: {type: Boolean, default: undefined},
|
|
201
201
|
headers: Object
|
|
202
202
|
},
|
|
203
203
|
emits: ['update:modelValue'],
|