Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
package.lib.components.VFab.VFab.mjs.map Maven / Gradle / Ivy
{"version":3,"file":"VFab.mjs","names":["makeVBtnProps","VBtn","makeLayoutItemProps","useLayoutItem","makeLocationProps","useProxiedModel","useResizeObserver","useToggleScope","makeTransitionProps","MaybeTransition","computed","ref","shallowRef","toRef","watchEffect","genericComponent","omit","propsFactory","useRender","makeVFabProps","app","Boolean","appear","extended","layout","offset","modelValue","type","default","active","transition","VFab","name","props","emits","value","setup","_ref","slots","model","height","layoutItemStyles","resizeRef","entries","length","target","clientHeight","hasPosition","absolute","position","location","split","shift","orientation","id","order","parseInt","layoutSize","elementSize","vFabRef","btnProps","filterProps","_createVNode","class","width","undefined","style","_withDirectives","_mergeProps","_vShow"],"sources":["../../../src/components/VFab/VFab.tsx"],"sourcesContent":["// Styles\nimport './VFab.sass'\n\n// Components\nimport { makeVBtnProps, VBtn } from '@/components/VBtn/VBtn'\n\n// Composables\nimport { makeLayoutItemProps, useLayoutItem } from '@/composables/layout'\nimport { makeLocationProps } from '@/composables/location'\nimport { useProxiedModel } from '@/composables/proxiedModel'\nimport { useResizeObserver } from '@/composables/resizeObserver'\nimport { useToggleScope } from '@/composables/toggleScope'\nimport { makeTransitionProps, MaybeTransition } from '@/composables/transition'\n\n// Utilities\nimport { computed, ref, shallowRef, toRef, watchEffect } from 'vue'\nimport { genericComponent, omit, propsFactory, useRender } from '@/util'\n\n// Types\nimport type { ComputedRef } from 'vue'\nimport type { Position } from '@/composables/layout'\n\nexport const makeVFabProps = propsFactory({\n app: Boolean,\n appear: Boolean,\n extended: Boolean,\n layout: Boolean,\n offset: Boolean,\n modelValue: {\n type: Boolean,\n default: true,\n },\n\n ...omit(makeVBtnProps({ active: true }), ['location']),\n ...makeLayoutItemProps(),\n ...makeLocationProps(),\n ...makeTransitionProps({ transition: 'fab-transition' }),\n}, 'VFab')\n\nexport const VFab = genericComponent()({\n name: 'VFab',\n\n props: makeVFabProps(),\n\n emits: {\n 'update:modelValue': (value: boolean) => true,\n },\n\n setup (props, { slots }) {\n const model = useProxiedModel(props, 'modelValue')\n const height = shallowRef(56)\n const layoutItemStyles = ref()\n\n const { resizeRef } = useResizeObserver(entries => {\n if (!entries.length) return\n height.value = entries[0].target.clientHeight\n })\n\n const hasPosition = computed(() => props.app || props.absolute)\n\n const position = computed(() => {\n if (!hasPosition.value) return false\n\n return props.location?.split(' ').shift() ?? 'bottom'\n }) as ComputedRef\n\n const orientation = computed(() => {\n if (!hasPosition.value) return false\n\n return props.location?.split(' ')[1] ?? 'end'\n })\n\n useToggleScope(() => props.app, () => {\n const layout = useLayoutItem({\n id: props.name,\n order: computed(() => parseInt(props.order, 10)),\n position,\n layoutSize: computed(() => props.layout ? height.value + 24 : 0),\n elementSize: computed(() => height.value + 24),\n active: computed(() => props.app && model.value),\n absolute: toRef(props, 'absolute'),\n })\n\n watchEffect(() => {\n layoutItemStyles.value = layout.layoutItemStyles.value\n })\n })\n\n const vFabRef = ref()\n\n useRender(() => {\n const btnProps = VBtn.filterProps(props)\n\n return (\n \n )\n })\n\n return {}\n },\n})\n\nexport type VFab = InstanceType\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,aAAa,EAAEC,IAAI,4BAE5B;AAAA,SACSC,mBAAmB,EAAEC,aAAa;AAAA,SAClCC,iBAAiB;AAAA,SACjBC,eAAe;AAAA,SACfC,iBAAiB;AAAA,SACjBC,cAAc;AAAA,SACdC,mBAAmB,EAAEC,eAAe,4CAE7C;AACA,SAASC,QAAQ,EAAEC,GAAG,EAAEC,UAAU,EAAEC,KAAK,EAAEC,WAAW,QAAQ,KAAK;AAAA,SAC1DC,gBAAgB,EAAEC,IAAI,EAAEC,YAAY,EAAEC,SAAS,gCAExD;AAIA,OAAO,MAAMC,aAAa,GAAGF,YAAY,CAAC;EACxCG,GAAG,EAAEC,OAAO;EACZC,MAAM,EAAED,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