srcdev-nuxt-components 6.1.14 → 6.1.16
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.
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component :is="tag" class="display-card" :class="[variant, elementClasses]">
|
|
3
|
+
<div v-if="slots.header" class="display-card-header">
|
|
4
|
+
<slot name="header"></slot>
|
|
5
|
+
</div>
|
|
6
|
+
<div v-if="slots.default" class="display-card-content">
|
|
7
|
+
<slot name="default"></slot>
|
|
8
|
+
</div>
|
|
9
|
+
<div v-if="slots.footer" class="display-card-footer">
|
|
10
|
+
<slot name="footer"></slot>
|
|
11
|
+
</div>
|
|
12
|
+
</component>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script setup lang="ts">
|
|
16
|
+
const props = defineProps({
|
|
17
|
+
tag: {
|
|
18
|
+
type: String,
|
|
19
|
+
default: "div",
|
|
20
|
+
validator(value: string) {
|
|
21
|
+
return ["div", "section", "article", "aside", "main", "nav"].includes(value)
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
variant: {
|
|
25
|
+
type: String,
|
|
26
|
+
default: "subtle",
|
|
27
|
+
validator(value: string) {
|
|
28
|
+
return ["solid", "subtle", "soft", "outline"].includes(value)
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
styleClassPassthrough: {
|
|
32
|
+
type: Array as PropType<string[]>,
|
|
33
|
+
default: () => [],
|
|
34
|
+
},
|
|
35
|
+
})
|
|
36
|
+
const slots = useSlots()
|
|
37
|
+
|
|
38
|
+
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough)
|
|
39
|
+
|
|
40
|
+
watch(
|
|
41
|
+
() => props.styleClassPassthrough,
|
|
42
|
+
() => {
|
|
43
|
+
resetElementClasses(props.styleClassPassthrough)
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<style lang="css">
|
|
49
|
+
.display-card {
|
|
50
|
+
--_inner-padding: 1rem;
|
|
51
|
+
|
|
52
|
+
display: grid;
|
|
53
|
+
grid-auto-flow: row;
|
|
54
|
+
/* gap: 1rem; */
|
|
55
|
+
border-radius: 0.5rem;
|
|
56
|
+
overflow: hidden;
|
|
57
|
+
|
|
58
|
+
&.solid {
|
|
59
|
+
background-color: light-dark(var(--gray-0), var(--gray-12));
|
|
60
|
+
border: 0.2rem solid light-dark(var(--gray-4), var(--gray-8));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&.subtle {
|
|
64
|
+
background-color: color-mix(in oklab, light-dark(var(--gray-1), var(--gray-8)) 50%, transparent);
|
|
65
|
+
border: 0.2rem solid light-dark(var(--gray-3), var(--gray-9));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.soft {
|
|
69
|
+
background-color: color-mix(in oklab, light-dark(var(--gray-1), var(--gray-8)) 20%, transparent);
|
|
70
|
+
box-shadow: 0px 0px 4px 2px color-mix(in oklab, light-dark(var(--gray-2), var(--gray-8)) 80%, transparent);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&.outline {
|
|
74
|
+
background-color: transparent;
|
|
75
|
+
border: 0.2rem solid light-dark(var(--gray-4), var(--gray-8));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.display-card-header {
|
|
79
|
+
/* background-color: darkblue; */
|
|
80
|
+
padding: var(--_inner-padding);
|
|
81
|
+
border-bottom: 0.2rem solid light-dark(var(--gray-1), var(--gray-8));
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.display-card-content {
|
|
85
|
+
/* background-color: darkgreen; */
|
|
86
|
+
padding: var(--_inner-padding);
|
|
87
|
+
border-bottom: 0.2rem solid light-dark(var(--gray-1), var(--gray-8));
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.display-card-footer {
|
|
91
|
+
/* background-color: darkslateblue; */
|
|
92
|
+
padding: var(--_inner-padding);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
</style>
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "srcdev-nuxt-components",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.1.
|
|
4
|
+
"version": "6.1.16",
|
|
5
5
|
"main": "nuxt.config.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"clean": "rm -rf .nuxt && rm -rf .output && rm -rf .playground/.nuxt && rm -rf .playground/.output",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@iconify-json/akar-icons": "1.2.7",
|
|
26
26
|
"@iconify-json/bitcoin-icons": "1.2.4",
|
|
27
|
-
"@iconify-json/material-symbols": "1.2.
|
|
27
|
+
"@iconify-json/material-symbols": "1.2.35",
|
|
28
28
|
"@nuxt/eslint": "1.9.0",
|
|
29
29
|
"@nuxt/icon": "2.0.0",
|
|
30
30
|
"@nuxt/image": "1.11.0",
|