@vuesax-alpha/nightly
Version:
A Component Library for Vue 3
1 lines • 1.28 kB
Source Map (JSON)
{"version":3,"file":"use-notification.mjs","sources":["../../../../../../packages/components/notification/src/use-notification.ts"],"sourcesContent":["import { computed } from 'vue'\nimport {\n defaultNamespace,\n useGlobalConfig,\n useIdInjection,\n} from '@vuesax-alpha/hooks'\nimport type { ComputedRef } from 'vue'\n\nexport let cachedContainer: HTMLElement\n\nexport const useNotificationContainerId = (): {\n id: ComputedRef<string>\n selector: ComputedRef<string>\n} => {\n const namespace = useGlobalConfig('namespace', defaultNamespace)\n const idInjection = useIdInjection()\n\n const id = computed(() => {\n return `${namespace.value}-notification-container-${idInjection.prefix}`\n })\n const selector = computed(() => `#${id.value}`)\n\n return {\n id,\n selector,\n }\n}\n"],"names":[],"mappings":";;;;;;AAQW,IAAA,gBAAA;AAEJ,MAAM,6BAA6B,MAGrC;AACH,EAAM,MAAA,SAAA,GAAY,eAAgB,CAAA,WAAA,EAAa,gBAAgB,CAAA,CAAA;AAC/D,EAAA,MAAM,cAAc,cAAe,EAAA,CAAA;AAEnC,EAAM,MAAA,EAAA,GAAK,SAAS,MAAM;AACxB,IAAO,OAAA,CAAA,EAAG,SAAU,CAAA,KAAA,CAAA,wBAAA,EAAgC,WAAY,CAAA,MAAA,CAAA,CAAA,CAAA;AAAA,GACjE,CAAA,CAAA;AACD,EAAA,MAAM,QAAW,GAAA,QAAA,CAAS,MAAM,CAAA,CAAA,EAAI,GAAG,KAAO,CAAA,CAAA,CAAA,CAAA;AAE9C,EAAO,OAAA;AAAA,IACL,EAAA;AAAA,IACA,QAAA;AAAA,GACF,CAAA;AACF;;;;"}