@bedrock/vue-vc 3.0.0 → 5.0.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/components/CredentialBase.vue +34 -63
- package/components/CredentialField.vue +12 -10
- package/package.json +1 -1
|
@@ -1,74 +1,42 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
<div
|
|
3
|
+
class="full-height"
|
|
4
|
+
:class="clickable && 'cb-clickable cursor-pointer'"
|
|
5
|
+
@click="clickable && toggleDetails()">
|
|
6
|
+
<div class="column full-height">
|
|
7
|
+
<slot name="image">
|
|
8
|
+
<dynamic-image
|
|
9
|
+
class="q-mr-auto"
|
|
10
|
+
:src="imageOverride.length > 0 ? imageOverride : credentialImage"
|
|
11
|
+
:size="dense ? 'sm' : 'md'" />
|
|
12
|
+
</slot>
|
|
6
13
|
<slot name="description">
|
|
7
14
|
<credential-field
|
|
8
|
-
class="col"
|
|
15
|
+
class="col flex items-end q-ml-auto"
|
|
16
|
+
:style="[textColor && `color: ${textColor}`]"
|
|
9
17
|
:title="nameOverride.length > 0 ? nameOverride : credentialName"
|
|
10
|
-
title-class="text-
|
|
18
|
+
:title-class="`text-right ${dense ? 'text-body2':'text-body1'}`"
|
|
11
19
|
:value="descriptionOverride.length > 0 ?
|
|
12
20
|
descriptionOverride : description"
|
|
13
|
-
value-class="text-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<dynamic-image
|
|
17
|
-
class="q-ma-xs"
|
|
18
|
-
:src="imageOverride.length > 0 ? imageOverride : credentialImage"
|
|
19
|
-
:size="dense ? 'sm' : 'md'" />
|
|
21
|
+
:value-class="`text-right
|
|
22
|
+
${textColor ? '':' text-grey-7'}
|
|
23
|
+
${dense ? ' text-caption':' text-caption'}`" />
|
|
20
24
|
</slot>
|
|
21
25
|
</div>
|
|
22
|
-
<q-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
row items-center justify-center text-grey-7"
|
|
32
|
-
@click="toggleDetails">
|
|
33
|
-
<span class="cb-details-text q-mr-sm">{{detailsText}}</span>
|
|
34
|
-
<q-icon :name="detailsIcon" />
|
|
35
|
-
<q-dialog v-model="state.details">
|
|
36
|
-
<slot name="modal">
|
|
37
|
-
<q-card>
|
|
38
|
-
<slot name="modalHeader" />
|
|
39
|
-
<slot name="modalContent">
|
|
40
|
-
<credential-switch
|
|
41
|
-
v-bind="$attrs"
|
|
42
|
-
mode="details"
|
|
43
|
-
:credential="credential" />
|
|
44
|
-
</slot>
|
|
45
|
-
<slot name="modalFooter" />
|
|
46
|
-
</q-card>
|
|
26
|
+
<q-dialog v-model="state.details">
|
|
27
|
+
<slot name="modal">
|
|
28
|
+
<q-card>
|
|
29
|
+
<slot name="modalHeader" />
|
|
30
|
+
<slot name="modalContent">
|
|
31
|
+
<credential-switch
|
|
32
|
+
v-bind="$attrs"
|
|
33
|
+
mode="details"
|
|
34
|
+
:credential="credential" />
|
|
47
35
|
</slot>
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class="cb-expandable row justify-start text-grey-7 full-width">
|
|
53
|
-
<q-expansion-item
|
|
54
|
-
:label="detailsText"
|
|
55
|
-
class="full-width"
|
|
56
|
-
dense
|
|
57
|
-
dense-toggle
|
|
58
|
-
switch-toggle-side>
|
|
59
|
-
<slot name="expansion">
|
|
60
|
-
<slot name="expansionHeader" />
|
|
61
|
-
<slot name="expansionContent">
|
|
62
|
-
<credential-switch
|
|
63
|
-
v-bind="$attrs"
|
|
64
|
-
mode="details"
|
|
65
|
-
:credential="credential" />
|
|
66
|
-
</slot>
|
|
67
|
-
<slot name="expansionFooter" />
|
|
68
|
-
</slot>
|
|
69
|
-
</q-expansion-item>
|
|
70
|
-
</div>
|
|
71
|
-
</div>
|
|
36
|
+
<slot name="modalFooter" />
|
|
37
|
+
</q-card>
|
|
38
|
+
</slot>
|
|
39
|
+
</q-dialog>
|
|
72
40
|
</div>
|
|
73
41
|
</template>
|
|
74
42
|
|
|
@@ -91,6 +59,10 @@ const props = defineProps({
|
|
|
91
59
|
type: Boolean,
|
|
92
60
|
default: false
|
|
93
61
|
},
|
|
62
|
+
textColor: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: ''
|
|
65
|
+
},
|
|
94
66
|
separator: {
|
|
95
67
|
type: Boolean,
|
|
96
68
|
default: true
|
|
@@ -145,7 +117,6 @@ const description = computed(() => {
|
|
|
145
117
|
});
|
|
146
118
|
|
|
147
119
|
function toggleDetails() {
|
|
148
|
-
console.log(state.details);
|
|
149
120
|
state.details = !state.details;
|
|
150
121
|
}
|
|
151
122
|
</script>
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div v-if="show">
|
|
3
|
-
<q-item class="
|
|
3
|
+
<q-item class="q-pa-none">
|
|
4
4
|
<q-item-section>
|
|
5
|
+
<q-item-label
|
|
6
|
+
class="cf-value"
|
|
7
|
+
style="max-width: 225px;"
|
|
8
|
+
:class="valueClass"
|
|
9
|
+
:lines="lines">
|
|
10
|
+
{{value}}
|
|
11
|
+
</q-item-label>
|
|
5
12
|
<q-item-label
|
|
6
13
|
v-if="title"
|
|
7
14
|
class="cf-title"
|
|
15
|
+
style="max-width: 225px;"
|
|
8
16
|
:class="titleClass"
|
|
9
17
|
:lines="lines">
|
|
10
18
|
{{title}}
|
|
11
19
|
</q-item-label>
|
|
12
|
-
<q-item-label
|
|
13
|
-
class="cf-value"
|
|
14
|
-
:class="valueClass"
|
|
15
|
-
:lines="lines">
|
|
16
|
-
{{value}}
|
|
17
|
-
</q-item-label>
|
|
18
20
|
</q-item-section>
|
|
19
21
|
</q-item>
|
|
20
22
|
</div>
|
|
@@ -37,15 +39,15 @@ const props = defineProps({
|
|
|
37
39
|
},
|
|
38
40
|
titleClass: {
|
|
39
41
|
type: String,
|
|
40
|
-
default: 'text-caption text-
|
|
42
|
+
default: 'text-caption text-grey-7'
|
|
41
43
|
},
|
|
42
44
|
valueClass: {
|
|
43
45
|
type: String,
|
|
44
|
-
default: 'text-body2
|
|
46
|
+
default: 'text-body2'
|
|
45
47
|
},
|
|
46
48
|
lines: {
|
|
47
49
|
type: String,
|
|
48
|
-
default: '
|
|
50
|
+
default: '1'
|
|
49
51
|
}
|
|
50
52
|
});
|
|
51
53
|
|