UNPKG

vuetify

Version:

Vue Material Component Framework

1 lines 2.12 kB
{"version":3,"file":"VMain.mjs","names":["makeTagProps","useLayout","useSsrBoot","genericComponent","useRender","VMain","name","props","scrollable","Boolean","tag","setup","slots","mainStyles","ssrBootStyles","value","default"],"sources":["../../../src/components/VMain/VMain.tsx"],"sourcesContent":["// Styles\nimport './VMain.sass'\n\n// Composables\nimport { makeTagProps } from '@/composables/tag'\nimport { useLayout } from '@/composables/layout'\nimport { useSsrBoot } from '@/composables/ssrBoot'\n\n// Utilities\nimport { genericComponent, useRender } from '@/util'\n\nexport const VMain = genericComponent()({\n name: 'VMain',\n\n props: {\n scrollable: Boolean,\n\n ...makeTagProps({ tag: 'main' }),\n },\n\n setup (props, { slots }) {\n const { mainStyles } = useLayout()\n const { ssrBootStyles } = useSsrBoot()\n\n useRender(() => (\n <props.tag\n class={[\n 'v-main',\n { 'v-main--scrollable': props.scrollable },\n ]}\n style={[\n mainStyles.value,\n ssrBootStyles.value,\n ]}\n >\n { props.scrollable\n ? (\n <div class=\"v-main__scroller\">\n { slots.default?.() }\n </div>\n )\n : slots.default?.()\n }\n </props.tag>\n ))\n\n return {}\n },\n})\n\nexport type VMain = InstanceType<typeof VMain>\n"],"mappings":";AAAA;AACA;;AAEA;AAAA,SACSA,YAAY;AAAA,SACZC,SAAS;AAAA,SACTC,UAAU,yCAEnB;AAAA,SACSC,gBAAgB,EAAEC,SAAS;AAEpC,OAAO,MAAMC,KAAK,GAAGF,gBAAgB,EAAE,CAAC;EACtCG,IAAI,EAAE,OAAO;EAEbC,KAAK,EAAE;IACLC,UAAU,EAAEC,OAAO;IAEnB,GAAGT,YAAY,CAAC;MAAEU,GAAG,EAAE;IAAO,CAAC;EACjC,CAAC;EAEDC,KAAK,CAAEJ,KAAK,QAAa;IAAA,IAAX;MAAEK;IAAM,CAAC;IACrB,MAAM;MAAEC;IAAW,CAAC,GAAGZ,SAAS,EAAE;IAClC,MAAM;MAAEa;IAAc,CAAC,GAAGZ,UAAU,EAAE;IAEtCE,SAAS,CAAC;MAAA,SAEC,CACL,QAAQ,EACR;QAAE,oBAAoB,EAAEG,KAAK,CAACC;MAAW,CAAC,CAC3C;MAAA,SACM,CACLK,UAAU,CAACE,KAAK,EAChBD,aAAa,CAACC,KAAK;IACpB;MAAA,gBAECR,KAAK,CAACC,UAAU;QAAA,SAEH;MAAkB,IACzBI,KAAK,CAACI,OAAO,IAAI,KAGrBJ,KAAK,CAACI,OAAO,IAAI;IAAA,EAGxB,CAAC;IAEF,OAAO,CAAC,CAAC;EACX;AACF,CAAC,CAAC"}