@imaginario27/air-ui-ds 1.15.1 → 1.15.2
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.
|
@@ -41,9 +41,11 @@
|
|
|
41
41
|
{{ title }}
|
|
42
42
|
</span>
|
|
43
43
|
|
|
44
|
-
<
|
|
44
|
+
<div v-if="$slots.description" class="max-w-[800px]">
|
|
45
|
+
<slot name="description" />
|
|
46
|
+
</div>
|
|
45
47
|
|
|
46
|
-
<p v-if="!$slots.description" class="text-sm text-text-default">
|
|
48
|
+
<p v-if="!$slots.description" class="text-sm text-text-default max-w-[800px]">
|
|
47
49
|
{{ description }}
|
|
48
50
|
</p>
|
|
49
51
|
</div>
|
|
@@ -53,8 +55,9 @@
|
|
|
53
55
|
<Icon
|
|
54
56
|
:name="timeAgoIcon"
|
|
55
57
|
:size="IconSize.XS"
|
|
58
|
+
iconClass="text-icon-neutral-subtle"
|
|
56
59
|
/>
|
|
57
|
-
<span class="text-xs text-text-neutral-subtle">
|
|
60
|
+
<span class="text-xs text-text-neutral-subtle whitespace-nowrap select-none">
|
|
58
61
|
{{ timeAgo }}
|
|
59
62
|
</span>
|
|
60
63
|
</div>
|
|
@@ -62,8 +65,9 @@
|
|
|
62
65
|
<Icon
|
|
63
66
|
:name="authorIcon"
|
|
64
67
|
:size="IconSize.XS"
|
|
68
|
+
iconClass="text-icon-neutral-subtle"
|
|
65
69
|
/>
|
|
66
|
-
<span class="text-xs text-text-neutral-subtle">
|
|
70
|
+
<span class="text-xs text-text-neutral-subtle whitespace-nowrap select-none">
|
|
67
71
|
{{ author }}
|
|
68
72
|
</span>
|
|
69
73
|
</div>
|
|
@@ -152,11 +156,12 @@ const props = defineProps({
|
|
|
152
156
|
},
|
|
153
157
|
})
|
|
154
158
|
|
|
155
|
-
const emit = defineEmits(['update:modelValue', 'remove'])
|
|
159
|
+
const emit = defineEmits(['update:modelValue', 'remove', 'itemClick'])
|
|
156
160
|
|
|
157
|
-
|
|
161
|
+
const onItemClick = () => {
|
|
158
162
|
if (!props.modelValue) {
|
|
159
163
|
emit('update:modelValue', true)
|
|
160
164
|
}
|
|
165
|
+
emit('itemClick')
|
|
161
166
|
}
|
|
162
167
|
</script>
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
:trigger
|
|
6
6
|
:popoverClass="['px-0 py-3', popoverClass]"
|
|
7
7
|
>
|
|
8
|
-
<template #content>
|
|
8
|
+
<template #content="{ onClose }">
|
|
9
9
|
<div
|
|
10
|
-
v-if="isLoading && !hasError"
|
|
10
|
+
v-if="isLoading && !hasError"
|
|
11
11
|
class="w-full flex justify-center py-3"
|
|
12
12
|
>
|
|
13
13
|
<Loading
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
:text="viewAllText"
|
|
53
53
|
:to="viewAllLink"
|
|
54
54
|
textClass="text-text-default text-sm! hover:text-text-primary-brand-hover font-normal"
|
|
55
|
+
@click="onViewAllClick($event, onClose)"
|
|
55
56
|
/>
|
|
56
57
|
</div>
|
|
57
58
|
|
|
@@ -92,6 +93,7 @@
|
|
|
92
93
|
:removeAriaLabel="listRemoveItemAriaLabel"
|
|
93
94
|
@update:model-value="onReadStatusChange(notification.id, $event)"
|
|
94
95
|
@remove="onRemoveNotification(notification.id)"
|
|
96
|
+
@itemClick="onClose"
|
|
95
97
|
/>
|
|
96
98
|
</template>
|
|
97
99
|
|
|
@@ -309,6 +311,11 @@ const filteredList = computed(() => {
|
|
|
309
311
|
})
|
|
310
312
|
|
|
311
313
|
// Handlers
|
|
314
|
+
const onViewAllClick = (event: MouseEvent, onClose: () => void) => {
|
|
315
|
+
if (!props.viewAllLink) event.preventDefault()
|
|
316
|
+
onClose()
|
|
317
|
+
}
|
|
318
|
+
|
|
312
319
|
const onRemoveNotification = (id: string) => {
|
|
313
320
|
internalList.value = internalList.value.filter(notification => notification.id !== id)
|
|
314
321
|
emit('remove', { id })
|