srcdev-nuxt-components 4.0.5 → 4.0.6
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,85 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ui-content-grid" :class="[applyClasses]" :data-testid="dataTestid">
|
|
3
|
+
<div v-if="hasSlot1" class="col-1">
|
|
4
|
+
<slot name="slot1"></slot>
|
|
5
|
+
</div>
|
|
6
|
+
<div v-if="hasSlot2" class="col-2">
|
|
7
|
+
<slot name="slot2"></slot>
|
|
8
|
+
</div>
|
|
9
|
+
</div>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
const props = defineProps({
|
|
14
|
+
dataTestid: {
|
|
15
|
+
type: String,
|
|
16
|
+
default: 'ui-content-grid',
|
|
17
|
+
},
|
|
18
|
+
applyClasses: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: '',
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const slots = useSlots();
|
|
25
|
+
const hasSlot1 = ref(slots.slot1 !== undefined);
|
|
26
|
+
const hasSlot2 = ref(slots.slot2 !== undefined);
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<style lang="css">
|
|
30
|
+
.ui-content-grid {
|
|
31
|
+
--_margin-inline: 0;
|
|
32
|
+
--_grid-template-columns: repeat(4, 1fr);
|
|
33
|
+
--_grid-template-rows: repeat(2, auto);
|
|
34
|
+
--_grid-gap: 1.6rem;
|
|
35
|
+
|
|
36
|
+
display: grid;
|
|
37
|
+
gap: var(--_grid-gap);
|
|
38
|
+
grid-template-columns: var(--_grid-template-columns);
|
|
39
|
+
grid-template-rows: var(--_grid-template-rows);
|
|
40
|
+
margin-inline: var(--_margin-inline);
|
|
41
|
+
|
|
42
|
+
@container content (min-width: 768px) {
|
|
43
|
+
--_margin-inline: 0;
|
|
44
|
+
--_grid-template-columns: repeat(6, 1fr);
|
|
45
|
+
--_grid-gap: 3.2rem;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
@container content (min-width: 1024px) {
|
|
49
|
+
--_margin-inline: 0;
|
|
50
|
+
--_grid-template-columns: repeat(12, 1fr);
|
|
51
|
+
--_grid-template-rows: initial;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.col-1 {
|
|
55
|
+
--_grid-column: 1 / span 4;
|
|
56
|
+
--_grid-row: 1;
|
|
57
|
+
grid-column: var(--_grid-column);
|
|
58
|
+
grid-row: var(--_grid-row);
|
|
59
|
+
|
|
60
|
+
@container content (min-width: 768px) {
|
|
61
|
+
--_grid-column: 1 / span 6;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@container content (min-width: 1024px) {
|
|
65
|
+
--_grid-column: 1 / span 6;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.col-2 {
|
|
70
|
+
--_grid-column: 1 / span 4;
|
|
71
|
+
--_grid-row: 2;
|
|
72
|
+
grid-column: var(--_grid-column);
|
|
73
|
+
grid-row: var(--_grid-row);
|
|
74
|
+
|
|
75
|
+
@container content (min-width: 768px) {
|
|
76
|
+
--_grid-column: 1 / span 6;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
@container content (min-width: 1024px) {
|
|
80
|
+
--_grid-column: 7 / span 6;
|
|
81
|
+
--_grid-row: 1;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
</style>
|
package/package.json
CHANGED