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,CAAC,MAAZ,EAAoB,IAAI,CAAC,WAAL,eAAwB,OAAO,CAAC,IAAR,CAAa,GAAb,CAAxB;AACrB;;AAED,UAAI,KAAK,CAAC,EAAV,EAAc;AACZ,QAAA,IAAI,CAAC,QAAL,GAAgB,IAAI,CAAC,QAAL,IAAiB,EAAjC;AACA,QAAA,IAAI,CAAC,QAAL,CAAc,EAAd,GAAmB,KAAK,CAAC,EAAzB;AACD;;AAED,aAAO,CAAC,CAAC,KAAK,CAAC,GAAP,EAAY,IAAZ,EAAkB,QAAlB,CAAR;AACD;AA9Ce,GAAX,CAAP;AAgDD","sourcesContent":["// Types\nimport Vue, { VNode } from 'vue'\n\nexport default function VGrid (name: string) {\n /* @vue/component */\n return Vue.extend({\n name: `v-${name}`,\n\n functional: true,\n\n props: {\n id: String,\n tag: {\n type: String,\n default: 'div',\n },\n },\n\n render (h, { props, data, children }): VNode {\n data.staticClass = (`${name} ${data.staticClass || ''}`).trim()\n\n const { attrs } = data\n if (attrs) {\n // reset attrs to extract utility clases like pa-3\n data.attrs = {}\n const classes = Object.keys(attrs).filter(key => {\n // TODO: Remove once resolved\n // https://github.com/vuejs/vue/issues/7841\n if (key === 'slot') return false\n\n const value = attrs[key]\n\n // add back data attributes like data-test=\"foo\" but do not\n // add them as classes\n if (key.startsWith('data-')) {\n data.attrs![key] = value\n return false\n }\n\n return value || typeof value === 'string'\n })\n\n if (classes.length) data.staticClass += ` ${classes.join(' ')}`\n }\n\n if (props.id) {\n data.domProps = data.domProps || {}\n data.domProps.id = props.id\n }\n\n return h(props.tag, data, children)\n },\n })\n}\n"],"sourceRoot":"","file":"grid.js"} |