UNPKG

bootstrap-vue-next

Version:

Seamless integration of Vue 3, Bootstrap 5, and TypeScript for modern, type-safe UI development

1 lines 2.09 kB
{"version":3,"file":"ConditionalTeleport-BNsziElf.mjs","names":[],"sources":["../src/components/ConditionalTeleport.vue","../src/components/ConditionalTeleport.vue"],"sourcesContent":["<script lang=\"ts\">\nimport {defineComponent, h, type PropType, type SlotsType, Teleport, type TeleportProps} from 'vue'\n\nexport default defineComponent({\n name: 'ConditionalTeleport',\n inheritAttrs: false,\n props: {\n to: {\n type: [String, Object] as PropType<TeleportProps['to']>,\n default: null,\n },\n disabled: {\n type: Boolean,\n required: true,\n },\n },\n slots: Object as SlotsType<{\n default?: Record<string, never>\n }>,\n setup(props, {slots}) {\n // use this untill https://github.com/vuejs/core/issues/9782 is resolved\n return () =>\n !props.to\n ? slots.default?.({})\n : h(Teleport, {to: props.to, disabled: props.disabled || !props.to}, [slots.default?.({})])\n },\n})\n</script>\n","<script lang=\"ts\">\nimport {defineComponent, h, type PropType, type SlotsType, Teleport, type TeleportProps} from 'vue'\n\nexport default defineComponent({\n name: 'ConditionalTeleport',\n inheritAttrs: false,\n props: {\n to: {\n type: [String, Object] as PropType<TeleportProps['to']>,\n default: null,\n },\n disabled: {\n type: Boolean,\n required: true,\n },\n },\n slots: Object as SlotsType<{\n default?: Record<string, never>\n }>,\n setup(props, {slots}) {\n // use this untill https://github.com/vuejs/core/issues/9782 is resolved\n return () =>\n !props.to\n ? slots.default?.({})\n : h(Teleport, {to: props.to, disabled: props.disabled || !props.to}, [slots.default?.({})])\n },\n})\n</script>\n"],"mappings":";;;kCAGe,gBAAgB;CAC7B,MAAM;CACN,cAAc;CACd,OAAO;EACL,IAAI;GACF,MAAM,CAAC,QAAQ,OAAM;GACrB,SAAS;GACV;EACD,UAAU;GACR,MAAM;GACN,UAAU;;EAEb;CACD,OAAO;CAGP,MAAM,OAAO,EAAC,SAAQ;AAEpB,eACE,CAAC,MAAM,KACH,MAAM,UAAU,EAAE,CAAA,GAClB,EAAE,UAAU;GAAC,IAAI,MAAM;GAAI,UAAU,MAAM,YAAY,CAAC,MAAM;GAAG,EAAE,CAAC,MAAM,UAAU,EAAE,CAAC,CAAC,CAAA;;CAEjG,CAAA"}