@wow-two-beta/fe 0.0.49 → 0.0.51
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.
- package/dist/feedback/FeedbackBus.d.ts +154 -29
- package/dist/feedback/FeedbackBus.js +264 -27
- package/dist/feedback/FeedbackBus.js.map +1 -1
- package/dist/feedback/index.d.ts +1 -1
- package/dist/feedback/index.js +3 -1
- package/dist/foundation/dom/enums/ElementTag.d.ts +2 -0
- package/dist/foundation/dom/enums/ElementTag.js +3 -1
- package/dist/foundation/dom/enums/ElementTag.js.map +1 -1
- package/dist/index.js +404 -382
- package/dist/index.js.map +1 -1
- package/dist/presentation/actions/button/Button.variants.d.ts +12 -0
- package/dist/presentation/actions/button/Button.variants.js +18 -2
- package/dist/presentation/actions/button/Button.variants.js.map +1 -1
- package/dist/presentation/actions/button/Button.vue.d.ts +8 -1
- package/dist/presentation/actions/button/Button.vue.js +106 -58
- package/dist/presentation/actions/button/Button.vue.js.map +1 -1
- package/dist/presentation/actions/refreshButton/RefreshButton.vue.js.map +1 -1
- package/dist/presentation/display/badge/Badge.variants.d.ts +23 -1
- package/dist/presentation/display/badge/Badge.variants.js +18 -3
- package/dist/presentation/display/badge/Badge.variants.js.map +1 -1
- package/dist/presentation/display/badge/Badge.vue.d.ts +3 -0
- package/dist/presentation/display/badge/Badge.vue.js +10 -4
- package/dist/presentation/display/badge/Badge.vue.js.map +1 -1
- package/dist/presentation/display/carousel/Carousel.variants.d.ts +65 -0
- package/dist/presentation/display/carousel/Carousel.variants.js +56 -0
- package/dist/presentation/display/carousel/Carousel.variants.js.map +1 -0
- package/dist/presentation/display/carousel/Carousel.vue.d.ts +7 -0
- package/dist/presentation/display/carousel/Carousel.vue.js +7 -2
- package/dist/presentation/display/carousel/Carousel.vue.js.map +1 -1
- package/dist/presentation/display/carousel/CarouselContext.d.ts +10 -0
- package/dist/presentation/display/carousel/CarouselContext.js.map +1 -1
- package/dist/presentation/display/carousel/CarouselNext.vue.d.ts +6 -2
- package/dist/presentation/display/carousel/CarouselNext.vue.js +12 -4
- package/dist/presentation/display/carousel/CarouselNext.vue.js.map +1 -1
- package/dist/presentation/display/carousel/CarouselPrev.vue.d.ts +6 -2
- package/dist/presentation/display/carousel/CarouselPrev.vue.js +12 -4
- package/dist/presentation/display/carousel/CarouselPrev.vue.js.map +1 -1
- package/dist/presentation/display/carousel/CarouselViewport.vue.d.ts +13 -2
- package/dist/presentation/display/carousel/CarouselViewport.vue.js +54 -2
- package/dist/presentation/display/carousel/CarouselViewport.vue.js.map +1 -1
- package/dist/presentation/display/carousel/index.d.ts +1 -0
- package/dist/presentation/display/index.d.ts +1 -0
- package/dist/presentation/display/index.js +120 -108
- package/dist/presentation/display/index.js.map +1 -1
- package/dist/presentation/display/mediaCard/MediaCard.vue.d.ts +41 -0
- package/dist/presentation/display/mediaCard/MediaCard.vue.js +108 -0
- package/dist/presentation/display/mediaCard/MediaCard.vue.js.map +1 -0
- package/dist/presentation/display/mediaCard/MediaCard2.vue.js +5 -0
- package/dist/presentation/display/mediaCard/MediaCard2.vue.js.map +1 -0
- package/dist/presentation/display/mediaCard/index.d.ts +1 -0
- package/dist/presentation/display/metaInlineText/MetaInlineItem.vue.d.ts +37 -0
- package/dist/presentation/display/metaInlineText/MetaInlineItem.vue.js +72 -0
- package/dist/presentation/display/metaInlineText/MetaInlineItem.vue.js.map +1 -0
- package/dist/presentation/display/metaInlineText/MetaInlineItem2.vue.js +7 -0
- package/dist/presentation/display/metaInlineText/MetaInlineItem2.vue.js.map +1 -0
- package/dist/presentation/display/metaInlineText/index.d.ts +1 -0
- package/dist/presentation/display/notificationCenterGroup/NotificationCenterButton.vue.d.ts +18 -0
- package/dist/presentation/display/notificationCenterGroup/NotificationCenterButton.vue.js +120 -0
- package/dist/presentation/display/notificationCenterGroup/NotificationCenterButton.vue.js.map +1 -0
- package/dist/presentation/display/notificationCenterGroup/NotificationCenterButton2.vue.js +5 -0
- package/dist/presentation/display/notificationCenterGroup/NotificationCenterButton2.vue.js.map +1 -0
- package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroup.vue.d.ts +11 -6
- package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroup.vue.js +255 -61
- package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroup.vue.js.map +1 -1
- package/dist/presentation/display/notificationCenterGroup/{NotificationItem.vue.d.ts → NotificationCenterGroupItem.vue.d.ts} +13 -12
- package/dist/presentation/display/notificationCenterGroup/{NotificationItem.vue.js → NotificationCenterGroupItem.vue.js} +81 -58
- package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroupItem.vue.js.map +1 -0
- package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroupItem2.vue.js +5 -0
- package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroupItem2.vue.js.map +1 -0
- package/dist/presentation/display/notificationCenterGroup/index.d.ts +6 -1
- package/dist/presentation/feedback/feedbackToastHost/FeedbackToastHost.vue.d.ts +1 -9
- package/dist/presentation/feedback/feedbackToastHost/FeedbackToastHost.vue.js +165 -20
- package/dist/presentation/feedback/feedbackToastHost/FeedbackToastHost.vue.js.map +1 -1
- package/dist/presentation/feedback/feedbackToastHost/RemindLaterButton.vue.d.ts +7 -0
- package/dist/presentation/feedback/feedbackToastHost/RemindLaterButton.vue.js +56 -0
- package/dist/presentation/feedback/feedbackToastHost/RemindLaterButton.vue.js.map +1 -0
- package/dist/presentation/feedback/feedbackToastHost/RemindLaterButton2.vue.js +5 -0
- package/dist/presentation/feedback/feedbackToastHost/RemindLaterButton2.vue.js.map +1 -0
- package/dist/presentation/feedback/index.js +9 -1
- package/dist/presentation/feedback/index.js.map +1 -1
- package/dist/presentation/feedback/toast/Toast.vue.d.ts +34 -8
- package/dist/presentation/feedback/toast/Toast.vue.js +290 -85
- package/dist/presentation/feedback/toast/Toast.vue.js.map +1 -1
- package/dist/presentation/feedback/toast/ToastContent.vue.d.ts +25 -0
- package/dist/presentation/feedback/toast/ToastContent.vue.js +78 -0
- package/dist/presentation/feedback/toast/ToastContent.vue.js.map +1 -0
- package/dist/presentation/feedback/toast/ToastContent2.vue.js +5 -0
- package/dist/presentation/feedback/toast/ToastContent2.vue.js.map +1 -0
- package/dist/presentation/feedback/toast/ToastRunningProgress.vue.d.ts +15 -0
- package/dist/presentation/feedback/toast/ToastRunningProgress.vue.js +88 -0
- package/dist/presentation/feedback/toast/ToastRunningProgress.vue.js.map +1 -0
- package/dist/presentation/feedback/toast/ToastRunningProgress2.vue.js +5 -0
- package/dist/presentation/feedback/toast/ToastRunningProgress2.vue.js.map +1 -0
- package/dist/presentation/feedback/toast/ToastSurface.d.ts +8 -0
- package/dist/presentation/feedback/toast/ToastSurface.js +10 -0
- package/dist/presentation/feedback/toast/ToastSurface.js.map +1 -0
- package/dist/presentation/feedback/toast/index.d.ts +1 -0
- package/dist/presentation/feedback/toastHost/ToastContent.d.ts +3 -0
- package/dist/presentation/feedback/toastHost/ToastEntry.d.ts +12 -0
- package/dist/presentation/feedback/toastHost/ToastFocusExtensions.d.ts +2 -0
- package/dist/presentation/feedback/toastHost/ToastFocusExtensions.js +11 -0
- package/dist/presentation/feedback/toastHost/ToastFocusExtensions.js.map +1 -0
- package/dist/presentation/feedback/toastHost/ToastGroup.d.ts +8 -0
- package/dist/presentation/feedback/toastHost/ToastGroupLatest.d.ts +10 -0
- package/dist/presentation/feedback/toastHost/ToastHost.vue.d.ts +55 -110
- package/dist/presentation/feedback/toastHost/ToastHost.vue.js +394 -399
- package/dist/presentation/feedback/toastHost/ToastHost.vue.js.map +1 -1
- package/dist/presentation/feedback/toastHost/ToastHost2.vue.js +4 -5
- package/dist/presentation/feedback/toastHost/ToastHostStore.d.ts +37 -0
- package/dist/presentation/feedback/toastHost/ToastHostStore.js +98 -0
- package/dist/presentation/feedback/toastHost/ToastHostStore.js.map +1 -0
- package/dist/presentation/feedback/toastHost/ToastHostStyles.d.ts +34 -0
- package/dist/presentation/feedback/toastHost/ToastHostStyles.js +44 -0
- package/dist/presentation/feedback/toastHost/ToastHostStyles.js.map +1 -0
- package/dist/presentation/feedback/toastHost/ToastNode.d.ts +3 -0
- package/dist/presentation/feedback/toastHost/ToastOptions.d.ts +72 -0
- package/dist/presentation/feedback/toastHost/ToastProgress.vue.d.ts +11 -0
- package/dist/presentation/feedback/toastHost/ToastProgress.vue.js +44 -0
- package/dist/presentation/feedback/toastHost/ToastProgress.vue.js.map +1 -0
- package/dist/presentation/feedback/toastHost/ToastProgress2.vue.js +5 -0
- package/dist/presentation/feedback/toastHost/ToastProgress2.vue.js.map +1 -0
- package/dist/presentation/feedback/toastHost/ToastPromiseOptions.d.ts +12 -0
- package/dist/presentation/feedback/toastHost/ToastRing.vue.d.ts +14 -0
- package/dist/presentation/feedback/toastHost/ToastRing.vue.js +65 -0
- package/dist/presentation/feedback/toastHost/ToastRing.vue.js.map +1 -0
- package/dist/presentation/feedback/toastHost/ToastRing2.vue.js +5 -0
- package/dist/presentation/feedback/toastHost/ToastRing2.vue.js.map +1 -0
- package/dist/presentation/feedback/toastHost/ToastSeconds.vue.d.ts +9 -0
- package/dist/presentation/feedback/toastHost/ToastSeconds.vue.js +56 -0
- package/dist/presentation/feedback/toastHost/ToastSeconds.vue.js.map +1 -0
- package/dist/presentation/feedback/toastHost/ToastSeconds2.vue.js +5 -0
- package/dist/presentation/feedback/toastHost/ToastSeconds2.vue.js.map +1 -0
- package/dist/presentation/feedback/toastHost/ToastSeverity.d.ts +3 -0
- package/dist/presentation/feedback/toastHost/UseResolvedToasts.d.ts +27 -0
- package/dist/presentation/feedback/toastHost/UseResolvedToasts.js +34 -0
- package/dist/presentation/feedback/toastHost/UseResolvedToasts.js.map +1 -0
- package/dist/presentation/feedback/toastHost/UseToastAnnouncer.d.ts +14 -0
- package/dist/presentation/feedback/toastHost/UseToastAnnouncer.js +106 -0
- package/dist/presentation/feedback/toastHost/UseToastAnnouncer.js.map +1 -0
- package/dist/presentation/feedback/toastHost/UseToastCapacity.d.ts +34 -0
- package/dist/presentation/feedback/toastHost/UseToastCapacity.js +128 -0
- package/dist/presentation/feedback/toastHost/UseToastCapacity.js.map +1 -0
- package/dist/presentation/feedback/toastHost/UseToastClock.d.ts +44 -0
- package/dist/presentation/feedback/toastHost/UseToastClock.js +134 -0
- package/dist/presentation/feedback/toastHost/UseToastClock.js.map +1 -0
- package/dist/presentation/feedback/toastHost/UseToastCountdown.d.ts +26 -0
- package/dist/presentation/feedback/toastHost/UseToastCountdown.js +23 -0
- package/dist/presentation/feedback/toastHost/UseToastCountdown.js.map +1 -0
- package/dist/presentation/feedback/toastHost/UseToastEntries.d.ts +4 -0
- package/dist/presentation/feedback/toastHost/UseToastEntries.js +17 -0
- package/dist/presentation/feedback/toastHost/UseToastEntries.js.map +1 -0
- package/dist/presentation/feedback/toastHost/UseToastExits.d.ts +11 -0
- package/dist/presentation/feedback/toastHost/UseToastExits.js +52 -0
- package/dist/presentation/feedback/toastHost/UseToastExits.js.map +1 -0
- package/dist/presentation/feedback/toastHost/UseToastGroupMotion.d.ts +43 -0
- package/dist/presentation/feedback/toastHost/UseToastGroupMotion.js +173 -0
- package/dist/presentation/feedback/toastHost/UseToastGroupMotion.js.map +1 -0
- package/dist/presentation/feedback/toastHost/UseToastHost.d.ts +10 -0
- package/dist/presentation/feedback/toastHost/UseToastHost.js +14 -0
- package/dist/presentation/feedback/toastHost/UseToastHost.js.map +1 -0
- package/dist/presentation/feedback/toastHost/UseToastHotkey.d.ts +20 -0
- package/dist/presentation/feedback/toastHost/UseToastHotkey.js +66 -0
- package/dist/presentation/feedback/toastHost/UseToastHotkey.js.map +1 -0
- package/dist/presentation/feedback/toastHost/UseToastPins.d.ts +26 -0
- package/dist/presentation/feedback/toastHost/UseToastPins.js +35 -0
- package/dist/presentation/feedback/toastHost/UseToastPins.js.map +1 -0
- package/dist/presentation/feedback/toastHost/UseToastStackMotion.d.ts +27 -0
- package/dist/presentation/feedback/toastHost/UseToastStackMotion.js +96 -0
- package/dist/presentation/feedback/toastHost/UseToastStackMotion.js.map +1 -0
- package/dist/presentation/feedback/toastHost/UseToastSwipe.d.ts +19 -0
- package/dist/presentation/feedback/toastHost/UseToastSwipe.js +173 -0
- package/dist/presentation/feedback/toastHost/UseToastSwipe.js.map +1 -0
- package/dist/presentation/feedback/toastHost/index.d.ts +8 -1
- package/dist/presentation/feedback/toastHost/index.js +7 -1
- package/dist/presentation/feedback/toastHost/index.js.map +1 -1
- package/dist/presentation/feedback/toastHost/styles.css +14 -2
- package/dist/presentation/layout/grid/Grid.variants.d.ts +7 -0
- package/dist/presentation/layout/grid/Grid.variants.js +4 -0
- package/dist/presentation/layout/grid/Grid.variants.js.map +1 -1
- package/dist/presentation/layout/grid/Grid.vue.d.ts +5 -0
- package/dist/presentation/layout/grid/Grid.vue.js +16 -4
- package/dist/presentation/layout/grid/Grid.vue.js.map +1 -1
- package/dist/presentation/layout/grid/index.d.ts +1 -1
- package/dist/presentation/layout/index.js +3 -1
- package/dist/presentation/nav/accountMenu/AccountMenu.vue.d.ts +1 -1
- package/dist/presentation/overlays/hoverCard/HoverCard.vue.d.ts +1 -1
- package/dist/presentation/overlays/popover/PopoverContent.vue.js +4 -4
- package/dist/presentation/overlays/popover/PopoverContent.vue.js.map +1 -1
- package/dist/presentation/overlays/tooltip/Tooltip.vue.d.ts +1 -1
- package/dist/presentation/overlays/tooltip/Tooltip.vue.js +8 -9
- package/dist/presentation/overlays/tooltip/Tooltip.vue.js.map +1 -1
- package/package.json +1 -1
- package/dist/presentation/display/notificationCenterGroup/NotificationItem.vue.js.map +0 -1
- package/dist/presentation/display/notificationCenterGroup/NotificationItem2.vue.js +0 -5
- package/dist/presentation/display/notificationCenterGroup/NotificationItem2.vue.js.map +0 -1
package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroup.vue.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NotificationCenterGroup.vue.js","sources":["../../../../src/presentation/display/notificationCenterGroup/NotificationCenterGroup.vue"],"sourcesContent":["<script lang=\"ts\">\nimport type { FeedbackBus } from '../../../feedback';\nexport interface NotificationCenterGroupProps {\n /** Explicit bus to browse; omitted keeps the slot-only presentation contract. */\n readonly bus?: FeedbackBus;\n /** The header title. Default `\"Notifications\"`. Rich content → the `title` slot. */\n readonly title?: string;\n\n /** The badge / count rendered next to the title. Rich content → the `count` slot. */\n readonly count?: string | number;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { useLocale } from '../../../foundation/i18n';\nimport { useLocaleDefaults } from '../../../foundation/i18n';\nimport {\n computed,\n defineComponent,\n getCurrentInstance,\n shallowRef,\n useAttrs,\n useSlots,\n useTemplateRef,\n watch,\n type PropType,\n} from 'vue';\nimport type { NoticeNode, PublishedNotice } from '../../../feedback';\nimport NotificationItem from './NotificationItem.vue';\nimport ReportAction from '../../feedback/reportAction/ReportAction.vue';\nimport { Bell, X } from 'lucide-vue-next';\nimport { Icon } from '../../../foundation/icons';\nimport { cn, surfaceVariants } from '../../../foundation/styles';\nimport { renderableChildren } from '../../../foundation/primitives';\n\nconst locale = useLocale();\n\n/**\n * Renders a notification panel — title and count header, a scrolling item list, optional footer.\n * The default slot holds `NotificationItem` children.\n *\n * React's `headerActions` / `emptyState` / `footer` were `ReactNode` props with\n * no string form worth keeping; they are slots only. `title` / `count` keep\n * their prop form and gain same-named slots.\n */\ndefineOptions({ name: 'NotificationCenterGroup', inheritAttrs: false });\n\nconst componentProps = withDefaults(defineProps<NotificationCenterGroupProps>(), {});\nconst props = useLocaleDefaults(componentProps, 'NotificationCenterGroup', { title: 'Notifications' });\nconst emit = defineEmits<{\n /** Requests closing the containing panel; never deletes or clears retained notifications. */\n close: [];\n}>();\nconst instance = getCurrentInstance();\nconst hasClose = () => Boolean(instance?.vnode.props?.onClose);\n\ndefineSlots<{\n /** The `NotificationItem` children filling the scrolling list. */\n default?(): unknown;\n /** The header title. Falls back to the `title` prop. */\n title?(): unknown;\n /** The header badge. Falls back to the `count` prop. */\n count?(): unknown;\n /** The controls at the right of the header. */\n headerActions?(): unknown;\n /** Replaces the built-in \"all caught up\" placeholder shown with no items. */\n emptyState?(): unknown;\n /** The footer band under the list. Omitting it drops the band. */\n footer?(): unknown;\n}>();\n\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/**\n * Replaces React's `Children.toArray(children).filter(isValidElement)`. Called\n * per render rather than cached — a slot's content is only knowable at render\n * time, and `renderableChildren` drops the comment/whitespace vnodes that would\n * otherwise read as content.\n */\nconst notices = shallowRef<ReadonlyArray<PublishedNotice>>([]);\nwatch(\n () => props.bus,\n (bus, _previous, onCleanup) => {\n notices.value = bus?.retained() ?? [];\n if (bus && typeof document !== 'undefined')\n onCleanup(\n bus.subscribeRetained((snapshot) => {\n notices.value = snapshot;\n }),\n );\n },\n { immediate: true },\n);\nconst isEmpty = () => (slots.default ? renderableChildren(slots.default()).length === 0 : notices.value.length === 0);\nconst resolvedCount = computed(() => props.count ?? (props.bus ? notices.value.length : undefined));\n\nconst NoticeNodeView = defineComponent({\n name: 'NoticeNodeView',\n props: { node: { type: [String, Object] as PropType<NoticeNode>, required: true } },\n setup: (nodeProps) => () => nodeProps.node,\n});\n\nconst classes = computed(() =>\n cn('flex w-80 flex-col', surfaceVariants({ variant: 'surface', radius: 'md' }), attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n</script>\n\n<template>\n <div\n ref=\"el\"\n role=\"region\"\n :aria-label=\"locale.t('NotificationCenterGroup.notifications', undefined, 'Notifications')\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <header class=\"flex items-center justify-between gap-2 border-b border-border px-3 py-2.5\">\n <div class=\"flex items-center gap-2\">\n <span class=\"text-sm font-semibold\">\n <slot name=\"title\">{{ props.title }}</slot>\n </span>\n <span\n v-if=\"resolvedCount != null || $slots.count\"\n class=\"inline-flex items-center justify-center rounded-full bg-primary px-1.5 text-[10px] font-semibold leading-5 text-primary-foreground\"\n >\n <slot name=\"count\">{{ resolvedCount }}</slot>\n </span>\n </div>\n <div v-if=\"$slots.headerActions || hasClose()\" class=\"flex items-center gap-2\">\n <slot name=\"headerActions\" />\n <button\n v-if=\"hasClose()\"\n type=\"button\"\n :aria-label=\"locale.t('NotificationCenterGroup.closeNotifications', undefined, 'Close notifications')\"\n class=\"inline-flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring\"\n @click=\"emit('close')\"\n >\n <Icon :icon=\"X\" :size=\"14\" />\n </button>\n </div>\n </header>\n <div class=\"max-h-96 overflow-y-auto py-1\">\n <template v-if=\"isEmpty()\">\n <slot name=\"emptyState\">\n <div class=\"flex flex-col items-center gap-2 px-4 py-10 text-center text-muted-foreground\">\n <Bell class=\"h-6 w-6\" />\n <p class=\"text-sm\">\n {{ locale.t('NotificationCenterGroup.youreAllCaughtUp', undefined, \"You're all caught up.\") }}\n </p>\n </div>\n </slot>\n </template>\n <div v-else class=\"flex flex-col\">\n <slot>\n <NotificationItem\n v-for=\"notice in notices\"\n :key=\"notice.id\"\n :severity=\"notice.tone\"\n @delete=\"props.bus?.remove(notice.id)\"\n >\n <template #title><NoticeNodeView :node=\"notice.title\" /></template>\n <template v-if=\"notice.description\" #description><NoticeNodeView :node=\"notice.description\" /></template>\n <template v-if=\"notice.action || notice.report\" #actions>\n <NoticeNodeView v-if=\"notice.action\" :node=\"notice.action\" />\n <ReportAction v-if=\"notice.report\" :send=\"notice.report\" />\n </template>\n </NotificationItem>\n </slot>\n </div>\n </div>\n <div v-if=\"$slots.footer\" class=\"border-t border-border px-3 py-2 text-center text-xs\">\n <slot name=\"footer\" />\n </div>\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_unref","_createElementVNode","_renderSlot","_createTextVNode","_toDisplayString","$slots","_createVNode","Icon","_Fragment","_renderList","_createBlock","NotificationIt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rBC,mBAEI,KAFJ,aAEIG,gBADCJ,cAAO,8CAA8C,QAAS,uBAAA,CAAA,GAAA,CAAA;AAAA,YAAA;2BAKzEH,aAAAC,mBAgBM,OAhBN,aAgBM;AAAA,YAfJI,WAcO,4BAdP,MAcO;AAAA,gCAbLJ,mBAYmBU,UAAA,MAAAC,WAXA,QAAA,OAAO,CAAjB,WAAM;oCADfC,YAYmBC,aAAA;AAAA,kBAVhB,KAAK,OAAO;AAAA,kBACZ,UAAU,OAAO;AAAA,kBACjB,UAAM,CAAA,WAAEX,aAAM,KAAK,OAAO,OAAO,EAAE;AAAA,gBAAA;kBAEzB,eAAM,MAAuC;AAAA,oBAAvCM,YAAuCN,MAAA,cAAA,GAAA;AAAA,sBAAtB,MAAM,OAAO;AAAA,oBAAA;;;;kBAC/B,OAAO;0BAAc;AAAA,gCAAY,MAA6C;AAAA,sBAA7CM,YAA6CN,MAAA,cAAA,GAAA;AAAA,wBAA5B,MAAM,OAAO;AAAA,sBAAA;;;;kBAC/D,OAAO,UAAU,OAAO;0BAAS;AAAA,gCAC/C,MAA6D;AAAA,sBAAvC,OAAO,uBAA7BU,YAA6DV,MAAA,cAAA,GAAA;AAAA;wBAAvB,MAAM,OAAO;AAAA,sBAAA;sBAC/B,OAAO,uBAA3BU,YAA2DE,aAAA;AAAA;wBAAvB,MAAM,OAAO;AAAA,sBAAA;;;;;;;;;QAMhDP,KAAAA,OAAO,UAAlBR,aAAAC,mBAEM,OAFN,aAEM;AAAA,UADJI,WAAsB,KAAA,QAAA,QAAA;AAAA,QAAA;;;;;"}
|
|
1
|
+
{"version":3,"file":"NotificationCenterGroup.vue.js","sources":["../../../../src/presentation/display/notificationCenterGroup/NotificationCenterGroup.vue"],"sourcesContent":["<script lang=\"ts\">\nimport {\n computed,\n defineComponent,\n nextTick,\n onBeforeUpdate,\n onUpdated,\n shallowRef,\n useAttrs,\n useId,\n useSlots,\n useTemplateRef,\n watch,\n type PropType,\n} from 'vue';\n\nimport type { FeedbackBus, NoticeNode, NoticeProgress, PublishedNotice, ToastPauseUntil } from '../../../feedback';\n\n/** Defines props for the notification center panel. */\nexport interface NotificationCenterGroupProps {\n /** Explicit bus to browse; omitted keeps the slot-only presentation contract. */\n readonly bus?: FeedbackBus;\n\n /** The header title. Default `\"Notifications\"`. Rich content → the `title` slot. */\n readonly title?: string;\n\n /** The badge / count rendered next to the title. Rich content → the `count` slot. */\n readonly count?: string | number;\n\n /** Shows pause and resume controls for the supplied bus. */\n readonly canPause?: boolean;\n\n /** Shows the \"Clear all\" header action for the supplied bus. Default `true`. */\n readonly canClear?: boolean;\n\n /** Fires when the close button is activated; the button renders only when this is supplied. Never clears. */\n readonly onClose?: () => void;\n}\n\n/** @internal The progress a history row's bar renders — `max` repaired, `value` clamped. */\ninterface NoticeBarProgress {\n value?: number;\n max: number;\n label?: string;\n}\n\n/** @internal The classes shared by the header's icon buttons. */\nconst HeaderActionClasses = [\n 'inline-flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-muted',\n 'hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\n 'pointer-coarse:size-11',\n];\n\n/** @internal The classes of the title's count badge. */\nconst CountBadgeClasses = [\n 'inline-flex items-center justify-center rounded-full bg-primary px-1.5 text-[10px] font-semibold leading-5',\n 'text-primary-foreground',\n];\n\n/** @internal The classes of the pop-up pause select. */\nconst PauseSelectClasses = [\n 'min-w-0 max-w-full rounded-md border border-border bg-background px-2 py-1',\n 'focus-visible:outline-2 focus-visible:outline-ring pointer-coarse:min-h-11',\n];\n\n/** @internal Renders a `NoticeNode` — either a plain string or a caller-built VNode. */\nconst NoticeNodeView = defineComponent({\n name: 'NoticeNodeView',\n props: { node: { type: [String, Object] as PropType<NoticeNode>, required: true } },\n setup: (nodeProps) => () => nodeProps.node,\n});\n</script>\n\n<script setup lang=\"ts\">\nimport { Bell, CheckCheck, ListX, X } from 'lucide-vue-next';\n\nimport { useLocale, useLocaleDefaults } from '../../../foundation/i18n';\nimport { Icon } from '../../../foundation/icons';\nimport { renderableChildren } from '../../../foundation/primitives';\nimport { cn, surfaceVariants } from '../../../foundation/styles';\nimport ProgressBar from '../../feedback/progressBar/ProgressBar.vue';\nimport ReportAction from '../../feedback/reportAction/ReportAction.vue';\nimport RelativeTime from '../relativeTime/RelativeTime.vue';\nimport NotificationCenterGroupItem from './NotificationCenterGroupItem.vue';\n\n/** Renders a notification panel — title and count header, a scrolling item list, optional footer. */\ndefineOptions({ name: 'NotificationCenterGroup', inheritAttrs: false });\n\nconst componentProps = withDefaults(defineProps<NotificationCenterGroupProps>(), { canClear: true });\nconst props = useLocaleDefaults(componentProps, 'NotificationCenterGroup', { title: 'Notifications' });\n\ndefineSlots<{\n /** The `NotificationCenterGroupItem` children filling the scrolling list. */\n default?(): unknown;\n /** The header title. Falls back to the `title` prop. */\n title?(): unknown;\n /** The header badge. Falls back to the `count` prop. */\n count?(): unknown;\n /** The controls at the right of the header. */\n headerActions?(): unknown;\n /** Replaces the built-in \"all caught up\" placeholder shown with no items. */\n emptyState?(): unknown;\n /** The footer band under the list. Omitting it drops the band. */\n footer?(): unknown;\n}>();\n\nconst locale = useLocale();\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLDivElement>('el');\nconst pauseLabelId = useId();\nconst rowId = useId();\n\nconst pausedUntil = shallowRef<ToastPauseUntil>(null);\nconst unreadIds = shallowRef<ReadonlySet<string>>(new Set());\n/** The retained notices of the bus, newest first. */\nconst notices = shallowRef<ReadonlyArray<PublishedNotice>>([]);\nconst now = shallowRef(Date.now());\nlet focusedRow: HTMLElement | undefined;\n\nconst resolvedCount = computed(() => props.count ?? (props.bus ? notices.value.length : undefined));\nconst canMarkRead = computed(() => Boolean(props.bus) && unreadIds.value.size > 0);\nconst canClearAll = computed(() => Boolean(props.bus) && props.canClear && notices.value.length > 0);\n\nconst pauseChoice = computed(() => (typeof pausedUntil.value === 'number' ? 'timed' : (pausedUntil.value ?? 'on')));\nconst resumeTime = computed(() => {\n if (typeof pausedUntil.value !== 'number') return '';\n return new Intl.DateTimeFormat(locale.locale.value, { hour: 'numeric', minute: '2-digit' }).format(pausedUntil.value);\n});\n\nconst rows = computed(() =>\n notices.value.map((notice) => ({\n notice,\n isUnread: unreadIds.value.has(notice.id),\n progress: notice.progress ? barProgress(notice.progress) : undefined,\n action:\n notice.expiresAtMs === undefined || !Number.isFinite(notice.expiresAtMs) || notice.expiresAtMs > now.value\n ? (notice.historyAction ?? notice.action)\n : undefined,\n })),\n);\n\nconst markAllReadLabel = computed(() => locale.t('NotificationCenterGroup.markAllRead', undefined, 'Mark all read'));\nconst clearAllLabel = computed(() => locale.t('NotificationCenterGroup.clearAll', undefined, 'Clear all'));\n\nconst classes = computed(() =>\n cn('flex w-80 flex-col', surfaceVariants({ variant: 'surface', radius: 'md' }), attrs.class as string | undefined),\n);\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n\n/** Syncs the bus's retained notices, pause and unread ids into the panel. */\nwatch(\n () => props.bus,\n (bus, _previous, onCleanup) => {\n notices.value = bus?.retained() ?? [];\n const initial = bus?.notificationState();\n pausedUntil.value = initial?.pausedUntil ?? null;\n unreadIds.value = new Set(initial?.unreadIds);\n if (!bus || typeof document === 'undefined') return;\n const stopHistory = bus.subscribeRetained((snapshot) => {\n notices.value = snapshot;\n });\n const stopState = bus.subscribeNotificationState((state) => {\n pausedUntil.value = state.pausedUntil;\n unreadIds.value = new Set(state.unreadIds);\n });\n onCleanup(() => {\n stopHistory();\n stopState();\n });\n },\n { immediate: true },\n);\n\n/** Syncs the clock to the next retained deadline, so an expired action leaves its row on time. */\nwatch(\n notices,\n (entries, _previous, onCleanup) => {\n let timer: ReturnType<typeof setTimeout> | undefined;\n function updateDeadlines(): void {\n now.value = Date.now();\n if (typeof window === 'undefined') return;\n let next = Infinity;\n for (const entry of entries) {\n const deadline = entry.expiresAtMs;\n if (deadline !== undefined && deadline > now.value) next = Math.min(next, deadline);\n }\n if (Number.isFinite(next)) timer = setTimeout(updateDeadlines, Math.min(next - now.value, 2_147_483_647));\n }\n updateDeadlines();\n onCleanup(() => clearTimeout(timer));\n },\n { immediate: true },\n);\n\nonBeforeUpdate(() => {\n const active = document.activeElement;\n if (active && el.value?.contains(active))\n focusedRow = active.closest<HTMLElement>('[data-notification-history-row]') ?? undefined;\n});\n\nonUpdated(() => {\n if (focusedRow && document.activeElement === document.body) {\n (focusedRow.isConnected ? focusedRow : el.value)?.focus({ preventScroll: true });\n }\n focusedRow = undefined;\n});\n\n/** Names a running row's progress bar after its title. */\nfunction titleId(index: number): string {\n return `${rowId}-title-${index}`;\n}\n\n/** Reports whether the panel has nothing to show — no renderable default slot, else no retained notices. */\nfunction isEmpty(): boolean {\n return slots.default ? renderableChildren(slots.default()).length === 0 : notices.value.length === 0;\n}\n\n/** Applies the pop-up pause the select chose, then restores the select to the state in effect. */\nfunction changePause(event: Event): void {\n const select = event.currentTarget as HTMLSelectElement;\n const choice = select.value;\n if (choice === '15m') props.bus?.setToastPause(Date.now() + 15 * 60_000);\n else if (choice === '1h') props.bus?.setToastPause(Date.now() + 60 * 60_000);\n else if (choice === 'manual') props.bus?.setToastPause('manual');\n else if (choice === 'on') props.bus?.setToastPause(null);\n // A timed selection inserts a new option that shows the actual resume time.\n void nextTick(() => {\n select.value = pauseChoice.value;\n });\n}\n\n/** Normalizes a running notice's progress for the bar: `max` defaults to 1, a bad `max` or `value` is repaired. */\nfunction barProgress(progress: NoticeProgress): NoticeBarProgress {\n const max = progress.max !== undefined && Number.isFinite(progress.max) && progress.max > 0 ? progress.max : 1;\n const value =\n typeof progress.value === 'number' && Number.isFinite(progress.value)\n ? Math.min(Math.max(progress.value, 0), max)\n : undefined;\n return { value, max, label: progress.label };\n}\n\n/** Runs a header action whose button leaves the header afterwards, keeping keyboard focus inside the panel. */\nfunction runHeaderAction(event: Event, action: () => void): void {\n const hadFocus = document.activeElement === event.currentTarget;\n action();\n if (!hadFocus) return;\n void nextTick(() => {\n if (!el.value?.contains(document.activeElement)) el.value?.focus({ preventScroll: true });\n });\n}\n</script>\n\n<template>\n <div\n ref=\"el\"\n role=\"region\"\n tabindex=\"-1\"\n :aria-label=\"locale.t('NotificationCenterGroup.notifications', undefined, 'Notifications')\"\n v-bind=\"rest\"\n :class=\"classes\"\n >\n <header class=\"flex items-center justify-between gap-2 border-b border-border px-3 py-2.5\">\n <div class=\"flex min-w-0 items-center gap-2\">\n <span class=\"truncate text-sm font-semibold\">\n <slot name=\"title\">{{ props.title }}</slot>\n </span>\n <span v-if=\"resolvedCount != null || $slots.count\" :class=\"CountBadgeClasses\">\n <slot name=\"count\">{{ resolvedCount }}</slot>\n </span>\n </div>\n <div\n v-if=\"$slots.headerActions || canMarkRead || canClearAll || props.onClose\"\n class=\"flex shrink-0 items-center gap-1\"\n >\n <slot name=\"headerActions\" />\n <button\n v-if=\"canMarkRead\"\n type=\"button\"\n :aria-label=\"markAllReadLabel\"\n :title=\"markAllReadLabel\"\n :class=\"HeaderActionClasses\"\n @click=\"runHeaderAction($event, () => props.bus?.markNotificationsRead())\"\n >\n <Icon :icon=\"CheckCheck\" :size=\"14\" />\n </button>\n <button\n v-if=\"canClearAll\"\n type=\"button\"\n :aria-label=\"clearAllLabel\"\n :title=\"clearAllLabel\"\n :class=\"HeaderActionClasses\"\n @click=\"runHeaderAction($event, () => props.bus?.clearRetained())\"\n >\n <Icon :icon=\"ListX\" :size=\"14\" />\n </button>\n <button\n v-if=\"props.onClose\"\n type=\"button\"\n :aria-label=\"locale.t('NotificationCenterGroup.closeNotifications', undefined, 'Close notifications')\"\n :class=\"HeaderActionClasses\"\n @click=\"props.onClose()\"\n >\n <Icon :icon=\"X\" :size=\"14\" />\n </button>\n </div>\n </header>\n <div\n v-if=\"props.canPause && props.bus\"\n class=\"flex flex-wrap items-center justify-between gap-2 border-b border-border px-3 py-2 text-sm\"\n >\n <label :for=\"pauseLabelId\">{{ locale.t('NotificationCenterGroup.popups', undefined, 'Toast pop-ups') }}</label>\n <select :id=\"pauseLabelId\" :value=\"pauseChoice\" :class=\"PauseSelectClasses\" @change=\"changePause\">\n <option value=\"on\">{{ locale.t('NotificationCenterGroup.popupsOn', undefined, 'On') }}</option>\n <option v-if=\"pauseChoice === 'timed'\" value=\"timed\" disabled>\n {{ locale.t('NotificationCenterGroup.pausedUntil', { time: resumeTime }, 'Paused until {time}') }}\n </option>\n <option value=\"15m\">\n {{ locale.t('NotificationCenterGroup.pause15', undefined, 'Pause for 15 minutes') }}\n </option>\n <option value=\"1h\">{{ locale.t('NotificationCenterGroup.pause60', undefined, 'Pause for 1 hour') }}</option>\n <option value=\"manual\">\n {{ locale.t('NotificationCenterGroup.pauseManual', undefined, 'Off until resumed') }}\n </option>\n </select>\n </div>\n <div class=\"max-h-96 overflow-y-auto py-1\">\n <template v-if=\"isEmpty()\">\n <slot name=\"emptyState\">\n <div class=\"flex flex-col items-center gap-2 px-4 py-10 text-center text-muted-foreground\">\n <Bell class=\"h-6 w-6\" />\n <p class=\"text-sm\">\n {{ locale.t('NotificationCenterGroup.youreAllCaughtUp', undefined, \"You're all caught up.\") }}\n </p>\n </div>\n </slot>\n </template>\n <div v-else class=\"flex flex-col\">\n <slot>\n <NotificationCenterGroupItem\n v-for=\"({ notice, action, isUnread, progress }, index) in rows\"\n :key=\"notice.id\"\n :severity=\"notice.tone\"\n :is-unread=\"isUnread\"\n data-notification-history-row\n tabindex=\"-1\"\n @delete=\"props.bus?.remove(notice.id)\"\n >\n <template #title>\n <span :id=\"progress ? titleId(index) : undefined\"><NoticeNodeView :node=\"notice.title\" /></span>\n </template>\n <template #timestamp><RelativeTime is-live :value=\"notice.publishedAtMs\" /></template>\n <template v-if=\"notice.description\" #description><NoticeNodeView :node=\"notice.description\" /></template>\n <template v-if=\"progress\" #progress>\n <ProgressBar size=\"sm\" :value=\"progress.value\" :max=\"progress.max\" :aria-labelledby=\"titleId(index)\" />\n <p v-if=\"progress.label\" class=\"mt-1 text-xs text-muted-foreground\">{{ progress.label }}</p>\n </template>\n <template v-if=\"action || notice.report\" #actions>\n <NoticeNodeView v-if=\"action\" :node=\"action\" />\n <ReportAction v-if=\"notice.report\" :send=\"notice.report\" />\n </template>\n </NotificationCenterGroupItem>\n </slot>\n </div>\n </div>\n <div v-if=\"$slots.footer\" class=\"border-t border-border px-3 py-2 text-center text-xs\">\n <slot name=\"footer\" />\n </div>\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_unref","_createElementVNode","_renderSlot","_createTextVNode","_toDisplayString","$slots","_createVNode","Icon","_Fragment","_renderList","_createBlock","NotificationCenterGroupItem","RelativeTime","ProgressBar","ReportAction"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,MAAM,sBAAsB;AAAA,EAC1B;AAAA,EACA;AAAA,EACA;AACF;AAGA,MAAM,oBAAoB;AAAA,EACxB;AAAA,EACA;AACF;AAGA,MAAM,qBAAqB;AAAA,EACzB;AAAA,EACA;AACF;AAGA,MAAM,iBAAiB,gBAAgB;AAAA,EACrC,MAAM;AAAA,EACN,OAAO,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,MAAM,GAA2B,UAAU,OAAK;AAAA,EAChF,OAAO,CAAC,cAAc,MAAM,UAAU;AACxC,CAAC;;;;;;;;;;;;;AAkBD,UAAM,iBAAiB;AACvB,UAAM,QAAQ,kBAAkB,gBAAgB,2BAA2B,EAAE,OAAO,iBAAiB;AAiBrG,UAAM,SAAS,UAAA;AACf,UAAM,QAAQ,SAAA;AACd,UAAM,QAAQ,SAAA;AACd,UAAM,KAAK,eAA+B,IAAI;AAC9C,UAAM,eAAe,MAAA;AACrB,UAAM,QAAQ,MAAA;AAEd,UAAM,cAAc,WAA4B,IAAI;AACpD,UAAM,YAAY,WAAgC,oBAAI,KAAK;AAE3D,UAAM,UAAU,WAA2C,EAAE;AAC7D,UAAM,MAAM,W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;sBAAWK,YAAuCN,MAAA,cAAA,GAAA;AAAA,wBAAtB,MAAM,OAAO;AAAA,sBAAA;;;kBAEvE,mBAAU,MAAsD;AAAA,oBAAtDM,YAAsDM,aAAA;AAAA,sBAAxC,WAAA;AAAA,sBAAS,OAAO,OAAO;AAAA,oBAAA;;;;kBAC1C,OAAO;0BAAc;AAAA,gCAAY,MAA6C;AAAA,sBAA7CN,YAA6CN,MAAA,cAAA,GAAA;AAAA,wBAA5B,MAAM,OAAO;AAAA,sBAAA;;;;kBAC/D;0BAAW;AAAA,gCACzB,MAAuG;AAAA,sBAAvGM,YAAuGO,aAAA;AAAA,wBAA1F,MAAK;AAAA,wBAAM,OAAO,SAAS;AAAA,wBAAQ,KAAK,SAAS;AAAA,wBAAM,mBAAiB,QAAQ,KAAK;AAAA,sBAAA;sBACzF,SAAS,SAAlBhB,UAAA,GAAAC,mBAA4F,KAA5F,aAA4FM,gBAArB,SAAS,KAAK,GAAA,CAAA;;;;kBAEvE,UAAU,OAAO;0BAAS;AAAA,gCACxC,MAA+C;AAAA,sBAAzB,uBAAtBM,YAA+CV,MAAA,cAAA,GAAA;AAAA;wBAAhB,MAAM;AAAA,sBAAA;sBACjB,OAAO,uBAA3BU,YAA2DI,aAAA;AAAA;wBAAvB,MAAM,OAAO;AAAA,sBAAA;;;;;;;;;QAMhDT,KAAAA,OAAO,UAAlBR,aAAAC,mBAEM,OAFN,aAEM;AAAA,UADJI,WAAsB,KAAA,QAAA,QAAA;AAAA,QAAA;;;;;"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Severity } from '../../../foundation/styles';
|
|
2
|
-
|
|
2
|
+
/** Defines props for one notification row of the notification center. */
|
|
3
|
+
export interface NotificationCenterGroupItemProps {
|
|
3
4
|
/** The semantic severity; supplies a leading glyph when no icon is provided. */
|
|
4
5
|
readonly severity?: Severity;
|
|
5
6
|
/** The leading icon / avatar. Rich content → the `icon` slot. */
|
|
@@ -10,22 +11,20 @@ export interface NotificationItemProps {
|
|
|
10
11
|
readonly description?: string;
|
|
11
12
|
/** The timestamp / relative time label. Rich content → the `timestamp` slot. */
|
|
12
13
|
readonly timestamp?: string;
|
|
13
|
-
/** The unread flag
|
|
14
|
+
/** The unread flag: bold title, a leading dot and visually hidden "Unread" text. */
|
|
14
15
|
readonly isUnread?: boolean;
|
|
15
16
|
/** The trailing actions. Rich content → the `actions` slot. */
|
|
16
17
|
readonly actions?: string;
|
|
18
|
+
/** Fires when the row is activated by click, Enter or Space; supplying it makes the row interactive. */
|
|
19
|
+
readonly onSelect?: () => void;
|
|
20
|
+
/** Fires when the dismiss button is pressed; the button renders on hover only when this is supplied. */
|
|
21
|
+
readonly onDismiss?: () => void;
|
|
22
|
+
/** Fires when the delete button is pressed; the button renders only when this is supplied. */
|
|
23
|
+
readonly onDelete?: () => void;
|
|
17
24
|
}
|
|
18
|
-
declare const _default: __VLS_WithSlots<import('vue').DefineComponent<
|
|
25
|
+
declare const _default: __VLS_WithSlots<import('vue').DefineComponent<NotificationCenterGroupItemProps, {
|
|
19
26
|
el: Readonly<import('vue').ShallowRef<HTMLDivElement | null>>;
|
|
20
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
21
|
-
select: () => any;
|
|
22
|
-
delete: () => any;
|
|
23
|
-
dismiss: () => any;
|
|
24
|
-
}, string, import('vue').PublicProps, Readonly<NotificationItemProps> & Readonly<{
|
|
25
|
-
onSelect?: (() => any) | undefined;
|
|
26
|
-
onDelete?: (() => any) | undefined;
|
|
27
|
-
onDismiss?: (() => any) | undefined;
|
|
28
|
-
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
27
|
+
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<NotificationCenterGroupItemProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
|
|
29
28
|
/** The leading icon. Falls back to the `icon` prop. */
|
|
30
29
|
icon?(): unknown;
|
|
31
30
|
/** The title line. Falls back to the `title` prop. */
|
|
@@ -34,6 +33,8 @@ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<Notificati
|
|
|
34
33
|
timestamp?(): unknown;
|
|
35
34
|
/** The body text under the title. Falls back to the `description` prop. */
|
|
36
35
|
description?(): unknown;
|
|
36
|
+
/** The running-progress indicator under the description. Omitting it drops the band. */
|
|
37
|
+
progress?(): unknown;
|
|
37
38
|
/** The action row under the description. Falls back to the `actions` prop. */
|
|
38
39
|
actions?(): unknown;
|
|
39
40
|
}>;
|
|
@@ -1,38 +1,50 @@
|
|
|
1
|
-
import { defineComponent, useAttrs, useSlots,
|
|
2
|
-
import { useLocale } from "../../../foundation/i18n/providers/LocaleContext.js";
|
|
1
|
+
import { defineComponent, useAttrs, useSlots, useTemplateRef, computed, openBlock, createElementBlock, mergeProps, unref, createCommentVNode, toDisplayString, renderSlot, Fragment, createTextVNode, createBlock, normalizeClass, createElementVNode, withModifiers, createVNode } from "vue";
|
|
3
2
|
import { Trash2, X } from "lucide-vue-next";
|
|
3
|
+
import { dataAttr } from "../../../foundation/dom/DataAttr.js";
|
|
4
|
+
import { Key } from "../../../foundation/dom/enums/Key.js";
|
|
5
|
+
import { useLocale } from "../../../foundation/i18n/providers/LocaleContext.js";
|
|
4
6
|
import { SeverityIcons, SeverityIconClasses } from "../../../foundation/icons/SeverityIcons.js";
|
|
5
7
|
import { cn } from "../../../foundation/styles/Cn.js";
|
|
6
|
-
import { Key } from "../../../foundation/dom/enums/Key.js";
|
|
7
8
|
import _sfc_main$1 from "../../../foundation/icons/icon/Icon.vue.js";
|
|
8
9
|
const _hoisted_1 = ["role", "tabindex", "data-unread"];
|
|
9
10
|
const _hoisted_2 = {
|
|
10
11
|
key: 0,
|
|
11
12
|
"aria-hidden": "true",
|
|
12
|
-
class: "absolute left-1 top-3 inline-block h-2 w-2 rounded-full bg-primary"
|
|
13
|
+
class: "absolute left-1 top-3 inline-block h-2 w-2 rounded-full bg-primary forced-colors:bg-[Highlight]"
|
|
13
14
|
};
|
|
14
15
|
const _hoisted_3 = {
|
|
15
16
|
key: 1,
|
|
17
|
+
class: "sr-only"
|
|
18
|
+
};
|
|
19
|
+
const _hoisted_4 = {
|
|
20
|
+
key: 2,
|
|
16
21
|
class: "shrink-0 self-start pl-3"
|
|
17
22
|
};
|
|
18
|
-
const
|
|
19
|
-
const
|
|
23
|
+
const _hoisted_5 = { class: "flex items-baseline gap-2" };
|
|
24
|
+
const _hoisted_6 = {
|
|
20
25
|
key: 0,
|
|
21
26
|
class: "ml-auto whitespace-nowrap text-xs text-muted-foreground"
|
|
22
27
|
};
|
|
23
|
-
const
|
|
28
|
+
const _hoisted_7 = {
|
|
24
29
|
key: 0,
|
|
25
30
|
class: "mt-0.5 line-clamp-2 text-xs text-muted-foreground"
|
|
26
31
|
};
|
|
27
|
-
const
|
|
32
|
+
const _hoisted_8 = {
|
|
28
33
|
key: 1,
|
|
34
|
+
class: "mt-1.5"
|
|
35
|
+
};
|
|
36
|
+
const _hoisted_9 = {
|
|
37
|
+
key: 2,
|
|
29
38
|
class: "mt-1.5 flex items-center gap-2"
|
|
30
39
|
};
|
|
31
|
-
const
|
|
32
|
-
const
|
|
40
|
+
const _hoisted_10 = ["aria-label"];
|
|
41
|
+
const _hoisted_11 = ["aria-label"];
|
|
42
|
+
const DismissRestingClasses = "absolute right-2 top-2 inline-flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground opacity-0";
|
|
43
|
+
const DismissInteractionClasses = "hover:bg-background hover:text-foreground focus-visible:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring";
|
|
44
|
+
const DeleteButtonClasses = "inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring";
|
|
33
45
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
34
|
-
...{ name: "
|
|
35
|
-
__name: "
|
|
46
|
+
...{ name: "NotificationCenterGroupItem", inheritAttrs: false },
|
|
47
|
+
__name: "NotificationCenterGroupItem",
|
|
36
48
|
props: {
|
|
37
49
|
severity: {},
|
|
38
50
|
icon: {},
|
|
@@ -40,68 +52,76 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
40
52
|
description: {},
|
|
41
53
|
timestamp: {},
|
|
42
54
|
isUnread: { type: Boolean },
|
|
43
|
-
actions: {}
|
|
55
|
+
actions: {},
|
|
56
|
+
onSelect: { type: Function },
|
|
57
|
+
onDismiss: { type: Function },
|
|
58
|
+
onDelete: { type: Function }
|
|
44
59
|
},
|
|
45
|
-
|
|
46
|
-
setup(__props, { expose: __expose, emit: __emit }) {
|
|
47
|
-
const locale = useLocale();
|
|
60
|
+
setup(__props, { expose: __expose }) {
|
|
48
61
|
const props = __props;
|
|
49
|
-
const
|
|
62
|
+
const locale = useLocale();
|
|
50
63
|
const attrs = useAttrs();
|
|
51
64
|
const slots = useSlots();
|
|
52
|
-
const instance = getCurrentInstance();
|
|
53
65
|
const el = useTemplateRef("el");
|
|
54
|
-
const
|
|
55
|
-
const hasDismiss = () => Boolean(instance?.vnode.props?.onDismiss);
|
|
56
|
-
const hasDelete = () => Boolean(instance?.vnode.props?.onDelete);
|
|
66
|
+
const isInteractive = computed(() => Boolean(props.onSelect));
|
|
57
67
|
const severityIcon = computed(() => props.severity ? SeverityIcons[props.severity] : null);
|
|
58
|
-
const hasIcon = () => Boolean(props.icon) || Boolean(slots.icon) || Boolean(severityIcon.value);
|
|
59
|
-
const hasTimestamp = () => Boolean(props.timestamp) || Boolean(slots.timestamp);
|
|
60
|
-
const hasDescription = () => Boolean(props.description) || Boolean(slots.description);
|
|
61
|
-
const hasActions = () => Boolean(props.actions) || Boolean(slots.actions);
|
|
62
68
|
const classes = computed(
|
|
63
69
|
() => cn(
|
|
64
70
|
"group/notif relative flex gap-3 rounded-md px-3 py-2.5 text-sm",
|
|
65
|
-
|
|
71
|
+
isInteractive.value && "cursor-pointer hover:bg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring",
|
|
66
72
|
props.isUnread && "bg-primary-soft/30",
|
|
67
73
|
attrs.class
|
|
68
74
|
)
|
|
69
75
|
);
|
|
70
76
|
const titleClasses = computed(() => cn("truncate text-foreground", props.isUnread ? "font-semibold" : "font-medium"));
|
|
71
77
|
const bodyClasses = computed(() => cn("min-w-0 flex-1", !hasIcon() && "pl-3"));
|
|
72
|
-
const DismissRestingClasses = "absolute right-2 top-2 inline-flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground opacity-0";
|
|
73
|
-
const DismissInteractionClasses = "hover:bg-background hover:text-foreground focus-visible:opacity-100 focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring";
|
|
74
|
-
const onKeyDown = (event) => {
|
|
75
|
-
if (!interactive()) return;
|
|
76
|
-
if (event.target !== event.currentTarget) return;
|
|
77
|
-
if (event.key === Key.Enter || event.key === Key.Space) {
|
|
78
|
-
event.preventDefault();
|
|
79
|
-
emit("select");
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
const onDismissClick = (event) => {
|
|
83
|
-
event.stopPropagation();
|
|
84
|
-
emit("dismiss");
|
|
85
|
-
};
|
|
86
78
|
const rest = computed(() => {
|
|
87
79
|
const { class: _class, ...others } = attrs;
|
|
88
80
|
return others;
|
|
89
81
|
});
|
|
90
82
|
__expose({ el });
|
|
83
|
+
function hasIcon() {
|
|
84
|
+
return Boolean(props.icon) || Boolean(slots.icon) || Boolean(severityIcon.value);
|
|
85
|
+
}
|
|
86
|
+
function hasTimestamp() {
|
|
87
|
+
return Boolean(props.timestamp) || Boolean(slots.timestamp);
|
|
88
|
+
}
|
|
89
|
+
function hasDescription() {
|
|
90
|
+
return Boolean(props.description) || Boolean(slots.description);
|
|
91
|
+
}
|
|
92
|
+
function hasProgress() {
|
|
93
|
+
return Boolean(slots.progress);
|
|
94
|
+
}
|
|
95
|
+
function hasActions() {
|
|
96
|
+
return Boolean(props.actions) || Boolean(slots.actions);
|
|
97
|
+
}
|
|
98
|
+
function onKeyDown(event) {
|
|
99
|
+
if (!props.onSelect) return;
|
|
100
|
+
if (event.target !== event.currentTarget) return;
|
|
101
|
+
if (event.key === Key.Enter || event.key === Key.Space) {
|
|
102
|
+
event.preventDefault();
|
|
103
|
+
props.onSelect();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
function onDismissClick(event) {
|
|
107
|
+
event.stopPropagation();
|
|
108
|
+
props.onDismiss?.();
|
|
109
|
+
}
|
|
91
110
|
return (_ctx, _cache) => {
|
|
92
111
|
return openBlock(), createElementBlock("div", mergeProps({
|
|
93
112
|
ref_key: "el",
|
|
94
113
|
ref: el,
|
|
95
|
-
role:
|
|
96
|
-
tabindex:
|
|
97
|
-
"data-unread": props.isUnread
|
|
114
|
+
role: isInteractive.value ? "button" : void 0,
|
|
115
|
+
tabindex: isInteractive.value ? 0 : void 0,
|
|
116
|
+
"data-unread": unref(dataAttr)(props.isUnread)
|
|
98
117
|
}, rest.value, {
|
|
99
118
|
class: classes.value,
|
|
100
|
-
onClick: _cache[1] || (_cache[1] = ($event) =>
|
|
119
|
+
onClick: _cache[1] || (_cache[1] = ($event) => props.onSelect?.()),
|
|
101
120
|
onKeydown: onKeyDown
|
|
102
121
|
}), [
|
|
103
122
|
props.isUnread ? (openBlock(), createElementBlock("span", _hoisted_2)) : createCommentVNode("", true),
|
|
104
|
-
|
|
123
|
+
props.isUnread ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(unref(locale).t("NotificationItem.unread", void 0, "Unread")), 1)) : createCommentVNode("", true),
|
|
124
|
+
hasIcon() ? (openBlock(), createElementBlock("div", _hoisted_4, [
|
|
105
125
|
renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
106
126
|
props.icon ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
107
127
|
createTextVNode(toDisplayString(props.icon), 1)
|
|
@@ -116,7 +136,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
116
136
|
createElementVNode("div", {
|
|
117
137
|
class: normalizeClass(bodyClasses.value)
|
|
118
138
|
}, [
|
|
119
|
-
createElementVNode("div",
|
|
139
|
+
createElementVNode("div", _hoisted_5, [
|
|
120
140
|
createElementVNode("span", {
|
|
121
141
|
class: normalizeClass(titleClasses.value)
|
|
122
142
|
}, [
|
|
@@ -124,37 +144,40 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
124
144
|
createTextVNode(toDisplayString(props.title), 1)
|
|
125
145
|
])
|
|
126
146
|
], 2),
|
|
127
|
-
hasTimestamp() ? (openBlock(), createElementBlock("span",
|
|
147
|
+
hasTimestamp() ? (openBlock(), createElementBlock("span", _hoisted_6, [
|
|
128
148
|
renderSlot(_ctx.$slots, "timestamp", {}, () => [
|
|
129
149
|
createTextVNode(toDisplayString(props.timestamp), 1)
|
|
130
150
|
])
|
|
131
151
|
])) : createCommentVNode("", true)
|
|
132
152
|
]),
|
|
133
|
-
hasDescription() ? (openBlock(), createElementBlock("div",
|
|
153
|
+
hasDescription() ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
134
154
|
renderSlot(_ctx.$slots, "description", {}, () => [
|
|
135
155
|
createTextVNode(toDisplayString(props.description), 1)
|
|
136
156
|
])
|
|
137
157
|
])) : createCommentVNode("", true),
|
|
138
|
-
|
|
158
|
+
hasProgress() ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
159
|
+
renderSlot(_ctx.$slots, "progress")
|
|
160
|
+
])) : createCommentVNode("", true),
|
|
161
|
+
hasActions() ? (openBlock(), createElementBlock("div", _hoisted_9, [
|
|
139
162
|
renderSlot(_ctx.$slots, "actions", {}, () => [
|
|
140
163
|
createTextVNode(toDisplayString(props.actions), 1)
|
|
141
164
|
])
|
|
142
165
|
])) : createCommentVNode("", true)
|
|
143
166
|
], 2),
|
|
144
|
-
|
|
145
|
-
key:
|
|
167
|
+
props.onDelete ? (openBlock(), createElementBlock("button", {
|
|
168
|
+
key: 3,
|
|
146
169
|
type: "button",
|
|
147
170
|
"aria-label": unref(locale).t("NotificationItem.deleteNotification", void 0, "Delete notification"),
|
|
148
|
-
class:
|
|
149
|
-
onClick: _cache[0] || (_cache[0] = withModifiers(($event) =>
|
|
171
|
+
class: normalizeClass(DeleteButtonClasses),
|
|
172
|
+
onClick: _cache[0] || (_cache[0] = withModifiers(($event) => props.onDelete(), ["stop"]))
|
|
150
173
|
}, [
|
|
151
174
|
createVNode(unref(_sfc_main$1), {
|
|
152
175
|
icon: unref(Trash2),
|
|
153
176
|
size: 14
|
|
154
177
|
}, null, 8, ["icon"])
|
|
155
|
-
], 8,
|
|
156
|
-
|
|
157
|
-
key:
|
|
178
|
+
], 8, _hoisted_10)) : createCommentVNode("", true),
|
|
179
|
+
props.onDismiss ? (openBlock(), createElementBlock("button", {
|
|
180
|
+
key: 4,
|
|
158
181
|
type: "button",
|
|
159
182
|
"aria-label": unref(locale).t("NotificationItem.dismissNotification", void 0, "Dismiss notification"),
|
|
160
183
|
class: normalizeClass(
|
|
@@ -167,7 +190,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
167
190
|
onClick: onDismissClick
|
|
168
191
|
}, [
|
|
169
192
|
createVNode(unref(X), { class: "h-3.5 w-3.5" })
|
|
170
|
-
], 10,
|
|
193
|
+
], 10, _hoisted_11)) : createCommentVNode("", true)
|
|
171
194
|
], 16, _hoisted_1);
|
|
172
195
|
};
|
|
173
196
|
}
|
|
@@ -175,4 +198,4 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
175
198
|
export {
|
|
176
199
|
_sfc_main as default
|
|
177
200
|
};
|
|
178
|
-
//# sourceMappingURL=
|
|
201
|
+
//# sourceMappingURL=NotificationCenterGroupItem.vue.js.map
|
package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroupItem.vue.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationCenterGroupItem.vue.js","sources":["../../../../src/presentation/display/notificationCenterGroup/NotificationCenterGroupItem.vue"],"sourcesContent":["<script lang=\"ts\">\nimport { cn, type Severity } from '../../../foundation/styles';\n\n/** Defines props for one notification row of the notification center. */\nexport interface NotificationCenterGroupItemProps {\n /** The semantic severity; supplies a leading glyph when no icon is provided. */\n readonly severity?: Severity;\n\n /** The leading icon / avatar. Rich content → the `icon` slot. */\n readonly icon?: string;\n\n /** The primary title. Rich content → the `title` slot. Supply this or the slot. */\n readonly title?: string;\n\n /** The body / description. Rich content → the `description` slot. */\n readonly description?: string;\n\n /** The timestamp / relative time label. Rich content → the `timestamp` slot. */\n readonly timestamp?: string;\n\n /** The unread flag: bold title, a leading dot and visually hidden \"Unread\" text. */\n readonly isUnread?: boolean;\n\n /** The trailing actions. Rich content → the `actions` slot. */\n readonly actions?: string;\n\n /** Fires when the row is activated by click, Enter or Space; supplying it makes the row interactive. */\n readonly onSelect?: () => void;\n\n /** Fires when the dismiss button is pressed; the button renders on hover only when this is supplied. */\n readonly onDismiss?: () => void;\n\n /** Fires when the delete button is pressed; the button renders only when this is supplied. */\n readonly onDelete?: () => void;\n}\n\n/** @internal The dismiss button's resting classes — corner placement, box, and the hidden-until-hover opacity. */\nconst DismissRestingClasses =\n 'absolute right-2 top-2 inline-flex h-6 w-6 items-center justify-center rounded-md text-muted-foreground opacity-0';\n\n/** @internal The dismiss button's hover / focus classes — the raised surface and the focus ring. */\nconst DismissInteractionClasses =\n 'hover:bg-background hover:text-foreground focus-visible:opacity-100 ' +\n 'focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n\n/** @internal The delete button's classes. */\nconst DeleteButtonClasses =\n 'inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-muted-foreground ' +\n 'hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring';\n</script>\n\n<script setup lang=\"ts\">\nimport { computed, useAttrs, useSlots, useTemplateRef } from 'vue';\nimport { Trash2, X } from 'lucide-vue-next';\n\nimport { dataAttr, Key } from '../../../foundation/dom';\nimport { useLocale } from '../../../foundation/i18n';\nimport { Icon, SeverityIcons, SeverityIconClasses } from '../../../foundation/icons';\n\n/** Renders one notification row — icon, title, description, timestamp, and an unread dot. */\ndefineOptions({ name: 'NotificationCenterGroupItem', inheritAttrs: false });\n\nconst props = defineProps<NotificationCenterGroupItemProps>();\n\ndefineSlots<{\n /** The leading icon. Falls back to the `icon` prop. */\n icon?(): unknown;\n /** The title line. Falls back to the `title` prop. */\n title?(): unknown;\n /** The right-aligned timestamp. Falls back to the `timestamp` prop. */\n timestamp?(): unknown;\n /** The body text under the title. Falls back to the `description` prop. */\n description?(): unknown;\n /** The running-progress indicator under the description. Omitting it drops the band. */\n progress?(): unknown;\n /** The action row under the description. Falls back to the `actions` prop. */\n actions?(): unknown;\n}>();\n\nconst locale = useLocale();\nconst attrs = useAttrs();\nconst slots = useSlots();\nconst el = useTemplateRef<HTMLDivElement>('el');\n\n/** Whether the row is interactive — it has a select handler. */\nconst isInteractive = computed(() => Boolean(props.onSelect));\nconst severityIcon = computed(() => (props.severity ? SeverityIcons[props.severity] : null));\n\nconst classes = computed(() =>\n cn(\n 'group/notif relative flex gap-3 rounded-md px-3 py-2.5 text-sm',\n isInteractive.value &&\n 'cursor-pointer hover:bg-muted focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring',\n props.isUnread && 'bg-primary-soft/30',\n attrs.class as string | undefined,\n ),\n);\n\nconst titleClasses = computed(() => cn('truncate text-foreground', props.isUnread ? 'font-semibold' : 'font-medium'));\n\nconst bodyClasses = computed(() => cn('min-w-0 flex-1', !hasIcon() && 'pl-3'));\n\n/** Everything but `class`, which is re-applied through `cn` above. */\nconst rest = computed(() => {\n const { class: _class, ...others } = attrs;\n return others;\n});\n\ndefineExpose({ el });\n\nfunction hasIcon(): boolean {\n return Boolean(props.icon) || Boolean(slots.icon) || Boolean(severityIcon.value);\n}\n\nfunction hasTimestamp(): boolean {\n return Boolean(props.timestamp) || Boolean(slots.timestamp);\n}\n\nfunction hasDescription(): boolean {\n return Boolean(props.description) || Boolean(slots.description);\n}\n\nfunction hasProgress(): boolean {\n return Boolean(slots.progress);\n}\n\nfunction hasActions(): boolean {\n return Boolean(props.actions) || Boolean(slots.actions);\n}\n\n/** Selects an interactive row on Enter or Space pressed on the row itself. */\nfunction onKeyDown(event: KeyboardEvent): void {\n if (!props.onSelect) return;\n if (event.target !== event.currentTarget) return;\n if (event.key === Key.Enter || event.key === Key.Space) {\n event.preventDefault();\n props.onSelect();\n }\n}\n\n/** Dismisses the row without also selecting it. */\nfunction onDismissClick(event: MouseEvent): void {\n event.stopPropagation();\n props.onDismiss?.();\n}\n</script>\n\n<template>\n <div\n ref=\"el\"\n :role=\"isInteractive ? 'button' : undefined\"\n :tabindex=\"isInteractive ? 0 : undefined\"\n :data-unread=\"dataAttr(props.isUnread)\"\n v-bind=\"rest\"\n :class=\"classes\"\n @click=\"props.onSelect?.()\"\n @keydown=\"onKeyDown\"\n >\n <span\n v-if=\"props.isUnread\"\n aria-hidden=\"true\"\n class=\"absolute left-1 top-3 inline-block h-2 w-2 rounded-full bg-primary forced-colors:bg-[Highlight]\"\n />\n <span v-if=\"props.isUnread\" class=\"sr-only\">{{ locale.t('NotificationItem.unread', undefined, 'Unread') }}</span>\n <div v-if=\"hasIcon()\" class=\"shrink-0 self-start pl-3\">\n <slot name=\"icon\">\n <template v-if=\"props.icon\">{{ props.icon }}</template>\n <Icon v-else-if=\"severityIcon\" :icon=\"severityIcon\" :size=\"16\" :class=\"SeverityIconClasses[props.severity!]\" />\n </slot>\n </div>\n <div :class=\"bodyClasses\">\n <div class=\"flex items-baseline gap-2\">\n <span :class=\"titleClasses\">\n <slot name=\"title\">{{ props.title }}</slot>\n </span>\n <span v-if=\"hasTimestamp()\" class=\"ml-auto whitespace-nowrap text-xs text-muted-foreground\">\n <slot name=\"timestamp\">{{ props.timestamp }}</slot>\n </span>\n </div>\n <div v-if=\"hasDescription()\" class=\"mt-0.5 line-clamp-2 text-xs text-muted-foreground\">\n <slot name=\"description\">{{ props.description }}</slot>\n </div>\n <div v-if=\"hasProgress()\" class=\"mt-1.5\">\n <slot name=\"progress\" />\n </div>\n <div v-if=\"hasActions()\" class=\"mt-1.5 flex items-center gap-2\">\n <slot name=\"actions\">{{ props.actions }}</slot>\n </div>\n </div>\n <button\n v-if=\"props.onDelete\"\n type=\"button\"\n :aria-label=\"locale.t('NotificationItem.deleteNotification', undefined, 'Delete notification')\"\n :class=\"DeleteButtonClasses\"\n @click.stop=\"props.onDelete()\"\n >\n <Icon :icon=\"Trash2\" :size=\"14\" />\n </button>\n <button\n v-if=\"props.onDismiss\"\n type=\"button\"\n :aria-label=\"locale.t('NotificationItem.dismissNotification', undefined, 'Dismiss notification')\"\n :class=\"\n cn(\n DismissRestingClasses,\n 'group-hover/notif:opacity-100 group-focus-within/notif:opacity-100',\n DismissInteractionClasses,\n )\n \"\n @click=\"onDismissClick\"\n >\n <X class=\"h-3.5 w-3.5\" />\n </button>\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_mergeProps","_unref","_toDisplayString","_renderSlot","_Fragment","_createTextVNode","_createBlock","Icon","_normalizeClass","_createElementVNode","_withModifiers","_createVNode"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqCA,MAAM,wBACJ;AAGF,MAAM,4BACJ;AAIF,MAAM,sBACJ;;;;;;;;;;;;;;;;;AAeF,UAAM,QAAQ;AAiBd,UAAM,SAAS,UAAA;AACf,UAAM,QAAQ,SAAA;AACd,UAAM,QAAQ,SAAA;AACd,UAAM,KAAK,eAA+B,IAAI;AAG9C,UAAM,gBAAgB,SAAS,MAAM,QAAQ,MAAM,QAAQ,CAAC;AAC5D,UAAM,eAAe,SAAS,MAAO,MAAM,WAAW,cAAc,MAAM,QAAQ,IAAI,IAAK;AAE3F,UAAM,UAAU;AAAA,MAAS,MACvB;AA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AAAA,YADJI,WAAuD,gCAAvD,MAAuD;AAAA,cAA3BE,gBAAAH,gBAAA,MAAM,WAAW,GAAA,CAAA;AAAA,YAAA;;UAEpC,iBAAXJ,UAAA,GAAAC,mBAEM,OAFN,YAEM;AAAA,YADJI,WAAwB,KAAA,QAAA,UAAA;AAAA,UAAA;UAEf,gBAAXL,UAAA,GAAAC,mBAEM,OAFN,YAEM;AAAA,YADJI,WAA+C,4BAA/C,MAA+C;AAAA,cAAvBE,gBAAAH,gBAAA,MAAM,OAAO,GAAA,CAAA;AAAA,YAAA;;;QAIjC,MAAM,yBADdH,mBAQS,UAAA;AAAA;UANP,MAAK;AAAA,UACJ,cAAYE,MAAA,MAAA,EAAO,yCAAyC,QAAS,qBAAA;AAAA,UACrE,sBAAO,mBAAmB;AAAA,UAC1B,SAAK,OAAA,CAAA,MAAA,OAAA,CAAA,IAAAS,cAAA,CAAA,WAAO,MAAM,SAAA,GAAQ,CAAA,MAAA,CAAA;AAAA,QAAA;UAE3BC,YAAkCV,MAAAM,WAAA,GAAA;AAAA,YAA3B,MAAMN,MAAA,MAAA;AAAA,YAAS,MAAM;AAAA,UAAA;;QAGtB,MAAM,0BADdF,mBAcS,UAAA;AAAA;UAZP,MAAK;AAAA,UACJ,cAAYE,MAAA,MAAA,EAAO,0CAA0C,QAAS,sBAAA;AAAA,UACtE,OAAKO;AAAAA,YAAWP,MAAA,EAAA;AAAA,cAAc;AAAA;cAAiH;AAAA,YAAA;AAAA;UAO/I,SAAO;AAAA,QAAA;UAERU,YAAyBV,MAAA,CAAA,GAAA,EAAtB,OAAM,eAAa;AAAA,QAAA;;;;;"}
|
package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroupItem2.vue.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationCenterGroupItem2.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
+
export { default as NotificationCenterButton, type NotificationCenterButtonProps, } from './NotificationCenterButton.vue';
|
|
1
2
|
export { default as NotificationCenterGroup, type NotificationCenterGroupProps } from './NotificationCenterGroup.vue';
|
|
2
|
-
export { default as
|
|
3
|
+
export { default as NotificationCenterGroupItem, type NotificationCenterGroupItemProps, } from './NotificationCenterGroupItem.vue';
|
|
4
|
+
/** @deprecated Use `NotificationCenterGroupItem`; this alias is removed next release. */
|
|
5
|
+
export { default as NotificationItem } from './NotificationCenterGroupItem.vue';
|
|
6
|
+
/** @deprecated Use `NotificationCenterGroupItemProps`; this alias is removed next release. */
|
|
7
|
+
export type { NotificationCenterGroupItemProps as NotificationItemProps } from './NotificationCenterGroupItem.vue';
|
|
@@ -1,14 +1,6 @@
|
|
|
1
1
|
import { FeedbackBus } from '../../../feedback';
|
|
2
2
|
import { ToastHostProps } from '../toastHost';
|
|
3
|
-
/**
|
|
4
|
-
* The prop surface of `FeedbackToastHost` — `bus`, plus every `ToastHost` prop.
|
|
5
|
-
*
|
|
6
|
-
* The `ToastHostProps` heritage is marked `@vue-ignore` so only `bus` becomes a
|
|
7
|
-
* runtime prop and the rest arrive as attrs; the template hands those to
|
|
8
|
-
* `<ToastHost>`, which declares them and resolves them back into props. Consumers
|
|
9
|
-
* still get the full checked surface, because the heritage is real to
|
|
10
|
-
* TypeScript — it is only the SFC compiler's runtime-props pass that skips it.
|
|
11
|
-
*/
|
|
3
|
+
/** Defines props for the bus-fed toast viewport — `bus` plus every `ToastHost` prop. */
|
|
12
4
|
export interface FeedbackToastHostProps extends /* @vue-ignore */ ToastHostProps {
|
|
13
5
|
/** The bus to render. Default: the app-wide `feedbackBus` singleton (what `notify()` publishes on). */
|
|
14
6
|
readonly bus?: FeedbackBus;
|