nuxt-unified-ui 0.5.9 → 0.5.10
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.
|
@@ -18,6 +18,7 @@ const props = defineProps<{
|
|
|
18
18
|
headerLevel?: number;
|
|
19
19
|
|
|
20
20
|
fluidBody?: boolean;
|
|
21
|
+
closable?: boolean;
|
|
21
22
|
|
|
22
23
|
subtitleActions?: ( ButtonProps & { tooltip?: string; actionType?: 'button' | 'spacer' } )[];
|
|
23
24
|
appendActions?: ( ButtonProps & { tooltip?: string; } )[];
|
|
@@ -28,6 +29,11 @@ const props = defineProps<{
|
|
|
28
29
|
}>();
|
|
29
30
|
|
|
30
31
|
|
|
32
|
+
const emit = defineEmits<{
|
|
33
|
+
close: [];
|
|
34
|
+
}>();
|
|
35
|
+
|
|
36
|
+
|
|
31
37
|
const slots = useSlots();
|
|
32
38
|
|
|
33
39
|
</script>
|
|
@@ -73,8 +79,10 @@ const slots = useSlots();
|
|
|
73
79
|
</slot>
|
|
74
80
|
</template>
|
|
75
81
|
|
|
76
|
-
<template v-if="props.appendActions || isSlotFilled(slots['append-prepend']) || isSlotFilled(slots.append)" #append>
|
|
82
|
+
<template v-if="props.closable || props.appendActions || isSlotFilled(slots['append-prepend']) || isSlotFilled(slots.append)" #append>
|
|
83
|
+
|
|
77
84
|
<slot name="append-prepend" />
|
|
85
|
+
|
|
78
86
|
<template v-for="action of props.appendActions">
|
|
79
87
|
<u-tooltip :text="action.tooltip">
|
|
80
88
|
<u-button
|
|
@@ -83,7 +91,18 @@ const slots = useSlots();
|
|
|
83
91
|
/>
|
|
84
92
|
</u-tooltip>
|
|
85
93
|
</template>
|
|
94
|
+
|
|
86
95
|
<slot name="append" />
|
|
96
|
+
|
|
97
|
+
<template v-if="props.closable">
|
|
98
|
+
<u-button
|
|
99
|
+
variant="ghost"
|
|
100
|
+
icon="lucide:x"
|
|
101
|
+
:aria-label="$t('common.close')"
|
|
102
|
+
@click="emit('close')"
|
|
103
|
+
/>
|
|
104
|
+
</template>
|
|
105
|
+
|
|
87
106
|
</template>
|
|
88
107
|
|
|
89
108
|
</un-typography>
|
package/i18n/locales/de.json
CHANGED
package/i18n/locales/en.json
CHANGED