@bildvitta/quasar-ui-asteroid 3.12.0-beta.8 → 3.12.0-beta.9
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,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
2
|
+
<div :class="classes">
|
|
3
3
|
<slot :label-with-suffix="formattedLabel">{{ formattedLabel }}</slot>
|
|
4
4
|
</div>
|
|
5
5
|
</template>
|
|
@@ -39,6 +39,16 @@ export default {
|
|
|
39
39
|
|
|
40
40
|
required: {
|
|
41
41
|
type: Boolean
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
typography: {
|
|
45
|
+
default: 'h4',
|
|
46
|
+
type: String,
|
|
47
|
+
validator: value => {
|
|
48
|
+
const availableTypography = ['h4', 'h5']
|
|
49
|
+
|
|
50
|
+
return availableTypography.includes(value)
|
|
51
|
+
}
|
|
42
52
|
}
|
|
43
53
|
},
|
|
44
54
|
|
|
@@ -54,7 +64,8 @@ export default {
|
|
|
54
64
|
classes () {
|
|
55
65
|
return [
|
|
56
66
|
`q-mb-${this.margin}`,
|
|
57
|
-
`text-${this.color}
|
|
67
|
+
`text-${this.color}`,
|
|
68
|
+
`text-${this.typography}`
|
|
58
69
|
]
|
|
59
70
|
}
|
|
60
71
|
}
|
|
@@ -4,6 +4,11 @@ meta:
|
|
|
4
4
|
desc: Componente para controlar textos que separam conteúdos, formatando com um sufixo quando existe um contador.
|
|
5
5
|
|
|
6
6
|
props:
|
|
7
|
+
color:
|
|
8
|
+
desc: Cor do texto.
|
|
9
|
+
default: grey-9
|
|
10
|
+
type: String
|
|
11
|
+
|
|
7
12
|
count:
|
|
8
13
|
desc: Contador que vai ficar ao lado do texto.
|
|
9
14
|
default: 0
|
|
@@ -20,14 +25,15 @@ props:
|
|
|
20
25
|
examples: [xs, sm, md, lg, xl]
|
|
21
26
|
|
|
22
27
|
required:
|
|
23
|
-
desc: Controla
|
|
28
|
+
desc: Controla se exibirá o sufixo "*" ao lado do texto.
|
|
24
29
|
default: false
|
|
25
30
|
type: Boolean
|
|
26
31
|
|
|
27
|
-
|
|
28
|
-
desc:
|
|
29
|
-
default:
|
|
32
|
+
typography:
|
|
33
|
+
desc: Controla qual a tipografia do texto.
|
|
34
|
+
default: h4
|
|
30
35
|
type: String
|
|
36
|
+
examples: [h4, h5]
|
|
31
37
|
|
|
32
38
|
slots:
|
|
33
39
|
default:
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :id="fieldName" class="qas-nested-fields">
|
|
3
3
|
<div v-if="useSingleLabel" class="text-left">
|
|
4
|
-
<qas-label :label="fieldLabel"
|
|
4
|
+
<qas-label :label="fieldLabel" typography="h5" />
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
7
|
<div ref="inputContent">
|
|
8
8
|
<component :is="componentTag" v-bind="componentProps">
|
|
9
9
|
<template v-for="(row, index) in nested" :key="`row-${index}`">
|
|
10
|
-
<div v-if="!row[destroyKey]" :id="`row-${index}`" class="full-width
|
|
10
|
+
<div v-if="!row[destroyKey]" :id="`row-${index}`" class="full-width qas-nested-fields__field-item">
|
|
11
11
|
<header v-if="hasHeader" class="flex items-center q-pb-md" :class="headerClasses">
|
|
12
|
-
<qas-label v-if="!useSingleLabel" :label="getRowLabel(index)" margin="none" />
|
|
13
|
-
<qas-actions-menu v-if="hasBlockActions(row)" v-bind="
|
|
12
|
+
<qas-label v-if="!useSingleLabel" :label="getRowLabel(index)" margin="none" typography="h5" />
|
|
13
|
+
<qas-actions-menu v-if="hasBlockActions(row)" v-bind="getActionsMenuProps(index, row)" />
|
|
14
14
|
</header>
|
|
15
15
|
|
|
16
16
|
<div ref="formGenerator" class="col-12 justify-between q-col-gutter-x-md row">
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
</slot>
|
|
24
24
|
|
|
25
25
|
<div v-if="hasInlineActions(row)" class="flex items-center qas-nested-fields__actions">
|
|
26
|
-
<qas-actions-menu v-bind="
|
|
26
|
+
<qas-actions-menu v-bind="getActionsMenuProps(index, row)" />
|
|
27
27
|
</div>
|
|
28
28
|
</div>
|
|
29
29
|
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
</template>
|
|
35
35
|
</component>
|
|
36
36
|
|
|
37
|
-
<div v-if="useAdd"
|
|
37
|
+
<div v-if="useAdd">
|
|
38
38
|
<slot :add="add" name="add-input">
|
|
39
39
|
<div v-if="showAddFirstInputButton" class="text-left">
|
|
40
40
|
<qas-btn class="q-px-sm" color="primary" variant="tertiary" @click="add()">{{ addFirstInputLabel }}</qas-btn>
|
|
@@ -86,7 +86,7 @@ export default {
|
|
|
86
86
|
|
|
87
87
|
props: {
|
|
88
88
|
actionsMenuProps: {
|
|
89
|
-
type: Object,
|
|
89
|
+
type: [Object, Function],
|
|
90
90
|
default: () => ({})
|
|
91
91
|
},
|
|
92
92
|
|
|
@@ -327,7 +327,22 @@ export default {
|
|
|
327
327
|
},
|
|
328
328
|
|
|
329
329
|
methods: {
|
|
330
|
-
|
|
330
|
+
getActionsMenuProps (index, row) {
|
|
331
|
+
if (typeof this.actionsMenuProps === 'function') {
|
|
332
|
+
return this.actionsMenuProps({
|
|
333
|
+
index,
|
|
334
|
+
row,
|
|
335
|
+
list: this.getDefaultActionsMenuList(index, row)
|
|
336
|
+
})
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
return {
|
|
340
|
+
...this.actionsMenuProps,
|
|
341
|
+
list: this.getActionsMenuList(index, row)
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
|
|
345
|
+
getDefaultActionsMenuList (index, row) {
|
|
331
346
|
const list = {}
|
|
332
347
|
|
|
333
348
|
if (this.useDuplicate) {
|
|
@@ -344,6 +359,12 @@ export default {
|
|
|
344
359
|
}
|
|
345
360
|
}
|
|
346
361
|
|
|
362
|
+
return list
|
|
363
|
+
},
|
|
364
|
+
|
|
365
|
+
getActionsMenuList (index, row) {
|
|
366
|
+
const list = this.getDefaultActionsMenuList(index, row)
|
|
367
|
+
|
|
347
368
|
for (const key in this.actionsMenuProps.list) {
|
|
348
369
|
const { handler, ...content } = this.actionsMenuProps.list[key] || {}
|
|
349
370
|
|
|
@@ -473,6 +494,10 @@ export default {
|
|
|
473
494
|
height: 56px;
|
|
474
495
|
}
|
|
475
496
|
|
|
497
|
+
&__field-item {
|
|
498
|
+
margin-bottom: var(--qas-spacing-md);
|
|
499
|
+
}
|
|
500
|
+
|
|
476
501
|
&__field-item + &__field-item {
|
|
477
502
|
margin-top: var(--qas-spacing-xl);
|
|
478
503
|
}
|
|
@@ -5,9 +5,9 @@ meta:
|
|
|
5
5
|
|
|
6
6
|
props:
|
|
7
7
|
actions-menu-props:
|
|
8
|
-
desc: Repassa as propriedades para o componente QasActionsMenu.
|
|
8
|
+
desc: Repassa as propriedades para o componente QasActionsMenu. É possível passar um objeto com as propriedades ou uma função que recebe o 'index', 'row' e 'list' como parâmetro e retorna um objeto com as propriedades.
|
|
9
9
|
default: {}
|
|
10
|
-
type: Object
|
|
10
|
+
type: [Object, Function]
|
|
11
11
|
|
|
12
12
|
add-first-input-label:
|
|
13
13
|
desc: Rótulo do input para adicionar o primeiro campo.
|