nuxt-unified-ui 0.5.9 → 0.5.11

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>
@@ -69,6 +69,8 @@ async function handleButtonClick(button) {
69
69
  :title="props.title"
70
70
  :subtitle="props.subtitle"
71
71
  :text="props.text"
72
+ closable
73
+ @close="emit('close')"
72
74
  :actions="[
73
75
  ...startButtons.map(button => ({
74
76
  ...button,
@@ -64,6 +64,8 @@ async function handleSubmit() {
64
64
  :title="props.title"
65
65
  :subtitle="props.subtitle"
66
66
  :text="props.text"
67
+ closable
68
+ @close="emit('close')"
67
69
  :actions="[
68
70
  {
69
71
  label: $t('common.submit'),
@@ -4,7 +4,8 @@
4
4
  "newItem": "Neues Element",
5
5
  "none": "Keine",
6
6
  "submit": "Absenden",
7
- "cancel": "Abbrechen"
7
+ "cancel": "Abbrechen",
8
+ "close": "Schließen"
8
9
  },
9
10
  "un": {
10
11
  "series": {
@@ -4,7 +4,8 @@
4
4
  "newItem": "New Item",
5
5
  "none": "None",
6
6
  "submit": "Submit",
7
- "cancel": "Cancel"
7
+ "cancel": "Cancel",
8
+ "close": "Close"
8
9
  },
9
10
  "un": {
10
11
  "series": {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "nuxt-unified-ui",
3
3
  "type": "module",
4
- "version": "0.5.9",
4
+ "version": "0.5.11",
5
5
  "main": "./nuxt.config.ts",
6
6
  "types": "./index.d.ts",
7
7
  "exports": {
@@ -20,15 +20,15 @@
20
20
  ],
21
21
  "dependencies": {
22
22
  "@formkit/tempo": "1.1.0",
23
- "@iconify-json/lucide": "1.2.129",
23
+ "@iconify-json/lucide": "1.2.131",
24
24
  "@nuxt/kit": "4.5.2",
25
- "@nuxt/ui": "4.11.0",
25
+ "@nuxt/ui": "4.11.1",
26
26
  "@nuxtjs/i18n": "10.6.0",
27
27
  "@types/canvas-confetti": "1.9.0",
28
28
  "@vueuse/core": "14.4.0",
29
29
  "@vueuse/nuxt": "14.4.0",
30
30
  "canvas-confetti": "1.9.4",
31
- "radashi": "12.9.1",
31
+ "radashi": "12.9.2",
32
32
  "unified-mongo-filter": "0.4.0"
33
33
  },
34
34
  "peerDependencies": {