@community-release/nx-ui 0.0.22 → 0.0.24
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/dist/module.json
CHANGED
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<component class="component-ui-card" :is="cardIs" :to="to">
|
|
3
|
+
<div class="ui-card-header" v-if="$slots?.header">
|
|
4
|
+
<slot name="header"></slot>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="ui-card-image" v-if="image">
|
|
7
|
+
<img :src="image" :alt="imageAlt">
|
|
8
|
+
</div>
|
|
3
9
|
<div class="ui-card-icon" v-if="icon">
|
|
4
10
|
<img :src="icon">
|
|
5
11
|
<component v-if="iconTitle" :is="iconTitleIs" :to="iconLink" target="_blank" class="ui-card-icon-title">
|
|
6
12
|
{{ iconTitle }}
|
|
7
13
|
</component>
|
|
8
14
|
</div>
|
|
9
|
-
<div class="ui-card-title"
|
|
10
|
-
|
|
15
|
+
<component v-if="title" :is="titleUrl ? 'a' : 'div'" class="ui-card-title" :href="titleUrl">
|
|
16
|
+
<strong>{{ title }}</strong>
|
|
17
|
+
<div v-if="subtitle" class="ui-card-subtitle">{{ subtitle }}</div>
|
|
18
|
+
</component>
|
|
19
|
+
<div class="ui-card-content" v-if="$slots?.default">
|
|
11
20
|
<slot></slot>
|
|
12
21
|
</div>
|
|
13
|
-
<div class="ui-card-footer" v-if="slots?.footer">
|
|
22
|
+
<div class="ui-card-footer" v-if="$slots?.footer">
|
|
14
23
|
<slot name="footer"></slot>
|
|
15
24
|
</div>
|
|
16
25
|
</component>
|
|
@@ -18,16 +27,22 @@
|
|
|
18
27
|
|
|
19
28
|
<script setup>
|
|
20
29
|
// Imports
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
//
|
|
24
|
-
const slots = useSlots()
|
|
30
|
+
import { resolveComponent } from 'vue';
|
|
25
31
|
|
|
32
|
+
// Data
|
|
26
33
|
const props = defineProps({
|
|
27
34
|
to: {
|
|
28
35
|
type: String,
|
|
29
36
|
default: ''
|
|
30
37
|
},
|
|
38
|
+
image: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: ''
|
|
41
|
+
},
|
|
42
|
+
imageAlt: {
|
|
43
|
+
type: String,
|
|
44
|
+
default: ''
|
|
45
|
+
},
|
|
31
46
|
icon: {
|
|
32
47
|
type: String,
|
|
33
48
|
default: ''
|
|
@@ -44,6 +59,18 @@ const props = defineProps({
|
|
|
44
59
|
type: String,
|
|
45
60
|
default: ''
|
|
46
61
|
},
|
|
62
|
+
subtitle: {
|
|
63
|
+
type: String,
|
|
64
|
+
default: ''
|
|
65
|
+
},
|
|
66
|
+
titleUrl: {
|
|
67
|
+
type: String,
|
|
68
|
+
default: ''
|
|
69
|
+
},
|
|
70
|
+
href: {
|
|
71
|
+
type: String,
|
|
72
|
+
default: ''
|
|
73
|
+
},
|
|
47
74
|
});
|
|
48
75
|
|
|
49
76
|
const cardIs = (props.to || props.href) ? resolveComponent('NuxtLink') : 'div';
|
|
@@ -61,14 +88,22 @@ const iconTitleIs = props.iconLink ? resolveComponent('NuxtLink') : 'b';
|
|
|
61
88
|
// Font family
|
|
62
89
|
@com-font-header: var(--ui-font-header);
|
|
63
90
|
|
|
91
|
+
// Font size
|
|
92
|
+
@com-text-default: var(--ui-text-default);
|
|
93
|
+
@com-text-small: var(--ui-text-small);
|
|
94
|
+
|
|
64
95
|
// Color
|
|
65
96
|
@com-color-header-text: var(--ui-color-header-text);
|
|
97
|
+
@com-color-gray-text: var(--ui-color-gray-text);
|
|
66
98
|
@com-color-surface: var(--ui-color-surface);
|
|
67
99
|
@com-color-text: var(--ui-color-text);
|
|
68
100
|
@com-color-primary: var(--ui-color-primary);
|
|
69
101
|
|
|
70
102
|
// Padding
|
|
103
|
+
@com-space-big: var(--ui-space-big);
|
|
104
|
+
@com-space-medium: var(--ui-space-medium);
|
|
71
105
|
@com-space-default: var(--ui-space-default);
|
|
106
|
+
@com-space-small: var(--ui-space-small);
|
|
72
107
|
@com-space-micro: var(--ui-space-micro);
|
|
73
108
|
@com-space-mini: var(--ui-space-mini);
|
|
74
109
|
|
|
@@ -81,6 +116,13 @@ const iconTitleIs = props.iconLink ? resolveComponent('NuxtLink') : 'b';
|
|
|
81
116
|
background: @com-color-surface;
|
|
82
117
|
border-radius: @com-border-radius-default;
|
|
83
118
|
|
|
119
|
+
.ui-card-image {
|
|
120
|
+
padding: @com-space-big @com-space-big @com-space-mini @com-space-big;
|
|
121
|
+
overflow: hidden;
|
|
122
|
+
border-top-left-radius: @com-border-radius-default;
|
|
123
|
+
border-top-right-radius: @com-border-radius-default;
|
|
124
|
+
}
|
|
125
|
+
|
|
84
126
|
.ui-card-icon {
|
|
85
127
|
display: grid;
|
|
86
128
|
grid-template-columns: 50px auto;
|
|
@@ -108,6 +150,8 @@ const iconTitleIs = props.iconLink ? resolveComponent('NuxtLink') : 'b';
|
|
|
108
150
|
display: block;
|
|
109
151
|
padding: var(--ui-card-padding) var(--ui-card-padding) @com-space-micro var(--ui-card-padding);
|
|
110
152
|
font-family: @com-font-header;
|
|
153
|
+
font-size: @com-text-default;
|
|
154
|
+
color: @com-color-header-text;
|
|
111
155
|
|
|
112
156
|
strong {
|
|
113
157
|
position: relative;
|
|
@@ -126,6 +170,11 @@ const iconTitleIs = props.iconLink ? resolveComponent('NuxtLink') : 'b';
|
|
|
126
170
|
background: @com-color-primary;
|
|
127
171
|
}
|
|
128
172
|
}
|
|
173
|
+
|
|
174
|
+
.ui-card-subtitle {
|
|
175
|
+
font-size: @com-text-small;
|
|
176
|
+
color: @com-color-gray-text;
|
|
177
|
+
}
|
|
129
178
|
}
|
|
130
179
|
|
|
131
180
|
.ui-card-content {
|