{"version":3,"sources":["webpack:///../../../src/components/VGrid/VRow.ts","webpack:///../../../src/components/VGrid/VCol.ts"],"names":["breakpoints","ALIGNMENT","makeProps","props","val","prefix","def","alignValidator","str","alignProps","type","default","validator","justifyValidator","justifyProps","alignContentValidator","alignContentProps","propMap","align","Object","justify","alignContent","classMap","breakpointClass","className","breakpoint","prop","cache","name","functional","tag","dense","noGutters","children","cacheKey","String","classList","value","h","data","staticClass","class","breakpointProps","Boolean","offsetProps","orderProps","col","offset","order","cols","alignSelf","includes","parent","hasColClasses"],"mappings":"8KAOA,MAAMA,EAAc,CAAC,KAAM,KAAM,KAAjC,MAEMC,EAAY,CAAC,QAAS,MAA5B,UAEA,SAASC,EAAT,KACE,OAAOF,EAAA,OAAmB,CAACG,EAAOC,KAChCD,EAAME,EAAS,eAAf,IAAkCC,IAClC,GAFF,IAMF,MAAMC,EAAkBC,GAAa,qCAArC,GACMC,EAAaP,EAAU,QAAS,KAAM,CAC1CQ,KAD2C,OAE3CC,QAF2C,KAG3CC,UAAWL,KAGPM,EAAoBL,GAAa,+CAAvC,GACMM,EAAeZ,EAAU,UAAW,KAAM,CAC9CQ,KAD+C,OAE/CC,QAF+C,KAG/CC,UAAWC,KAGPE,EAAyBP,GAAa,yDAA5C,GACMQ,EAAoBd,EAAU,eAAgB,KAAM,CACxDQ,KADyD,OAEzDC,QAFyD,KAGzDC,UAAWG,KAGPE,EAAU,CACdC,MAAOC,OAAA,KADO,GAEdC,QAASD,OAAA,KAFK,GAGdE,aAAcF,OAAA,SAGVG,EAAW,CACfJ,MADe,QAEfE,QAFe,UAGfC,aAAc,iBAGhB,SAASE,EAAT,OACE,IAAIC,EAAYF,EAAhB,GACA,SAAIlB,EAAJ,CAGA,KAAU,CAER,MAAMqB,EAAaC,EAAA,UAAnB,IACAF,GAAa,IAAIC,EAInB,OADAD,GAAa,IAAIpB,EACVoB,EAAP,eAGF,MAAMG,EAAQ,IAAd,IAEe,qBAAW,CACxBC,KADwB,QAExBC,YAFwB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V,KAIb,CAAC,UAAUA,EAAM4C,QAAW5C,EAJf,OAKb,CAAC,SAASA,EAAM6C,OAAU7C,EALb,MAMb,CAAC,cAAcA,EAAM+C,WAAc/C,EAAM+C,YAG3CvB,EAAA,SAGF,OAAOW,EAAEnC,EAAD,IAAY,eAAUoC,EAAM,CAAEE,MAAOL,IAA7C","file":"js/chunk-4e28310a.7196337f.js","sourcesContent":["import './VGrid.sass'\n\nimport Vue, { PropOptions } from 'vue'\nimport mergeData from '../../util/mergeData'\nimport { upperFirst } from '../../util/helpers'\n\n// no xs\nconst breakpoints = ['sm', 'md', 'lg', 'xl']\n\nconst ALIGNMENT = ['start', 'end', 'center']\n\nfunction makeProps (prefix: string, def: () => PropOptions) {\n return breakpoints.reduce((props, val) => {\n props[prefix + upperFirst(val)] = def()\n return props\n }, {} as Dictionary)\n}\n\nconst alignValidator = (str: any) => [...ALIGNMENT, 'baseline', 'stretch'].includes(str)\nconst alignProps = makeProps('align', () => ({\n type: String,\n default: null,\n validator: alignValidator,\n}))\n\nconst justifyValidator = (str: any) => [...ALIGNMENT, 'space-between', 'space-around'].includes(str)\nconst justifyProps = makeProps('justify', () => ({\n type: String,\n default: null,\n validator: justifyValidator,\n}))\n\nconst alignContentValidator = (str: any) => [...ALIGNMENT, 'space-between', 'space-around', 'stretch'].includes(str)\nconst alignContentProps = makeProps('alignContent', () => ({\n type: String,\n default: null,\n validator: alignContentValidator,\n}))\n\nconst propMap = {\n align: Object.keys(alignProps),\n justify: Object.keys(justifyProps),\n alignContent: Object.keys(alignContentProps),\n}\n\nconst classMap = {\n align: 'align',\n justify: 'justify',\n alignContent: 'align-content',\n}\n\nfunction breakpointClass (type: keyof typeof propMap, prop: string, val: string) {\n let className = classMap[type]\n if (val == null) {\n return undefined\n }\n if (prop) {\n // alignSm -> Sm\n const breakpoint = prop.replace(type, '')\n className += `-${breakpoint}`\n }\n // .align-items-sm-center\n className += `-${val}`\n return className.toLowerCase()\n}\n\nconst cache = new Map()\n\nexport default Vue.extend({\n name: 'v-row',\n functional: true,\n props: {\n tag: {\n type: String,\n default: 'div',\n },\n dense: Boolean,\n noGutters: Boolean,\n align: {\n type: String,\n default: null,\n validator: alignValidator,\n },\n ...alignProps,\n justify: {\n type: String,\n default: null,\n validator: justifyValidator,\n },\n ...justifyProps,\n alignContent: {\n type: String,\n default: null,\n validator: alignContentValidator,\n },\n ...alignContentProps,\n },\n render (h, { props, data, children }) {\n // Super-fast memoization based on props, 5x faster than JSON.stringify\n let cacheKey = ''\n for (const prop in props) {\n cacheKey += String((props as any)[prop])\n }\n let classList = cache.get(cacheKey)\n\n if (!classList) {\n classList = []\n // Loop through `align`, `justify`, `alignContent` breakpoint props\n let type: keyof typeof propMap\n for (type in propMap) {\n propMap[type].forEach(prop => {\n const value: string = (props as any)[prop]\n const className = breakpointClass(type, prop, value)\n if (className) classList!.push(className)\n })\n }\n\n classList.push({\n 'no-gutters': props.noGutters,\n 'row--dense': props.dense,\n [`align-${props.align}`]: props.align,\n [`justify-${props.justify}`]: props.justify,\n [`align-content-${props.alignContent}`]: props.alignContent,\n })\n\n cache.set(cacheKey, classList)\n }\n\n return h(\n props.tag,\n mergeData(data, {\n staticClass: 'row',\n class: classList,\n }),\n children\n )\n },\n})\n","import './VGrid.sass'\n\nimport Vue, { VNode, PropOptions } from 'vue'\nimport mergeData from '../../util/mergeData'\nimport { upperFirst } from '../../util/helpers'\n\n// no xs\nconst breakpoints = ['sm', 'md', 'lg', 'xl']\n\nconst breakpointProps = (() => {\n return breakpoints.reduce((props, val) => {\n props[val] = {\n type: [Boolean, String, Number],\n default: false,\n }\n return props\n }, {} as Dictionary)\n})()\n\nconst offsetProps = (() => {\n return breakpoints.reduce((props, val) => {\n props['offset' + upperFirst(val)] = {\n type: [String, Number],\n default: null,\n }\n return props\n }, {} as Dictionary)\n})()\n\nconst orderProps = (() => {\n return breakpoints.reduce((props, val) => {\n props['order' + upperFirst(val)] = {\n type: [String, Number],\n default: null,\n }\n return props\n }, {} as Dictionary)\n})()\n\nconst propMap = {\n col: Object.keys(breakpointProps),\n offset: Object.keys(offsetProps),\n order: Object.keys(orderProps),\n}\n\nfunction breakpointClass (type: keyof typeof propMap, prop: string, val: boolean | string | number) {\n let className = type\n if (val == null || val === false) {\n return undefined\n }\n if (prop) {\n const breakpoint = prop.replace(type, '')\n className += `-${breakpoint}`\n }\n // Handling the boolean style prop when accepting [Boolean, String, Number]\n // means Vue will not convert to sm: true for us.\n // Since the default is false, an empty string indicates the prop's presence.\n if (type === 'col' && (val === '' || val === true)) {\n // .col-md\n return className.toLowerCase()\n }\n // .order-md-6\n className += `-${val}`\n return className.toLowerCase()\n}\n\nconst cache = new Map()\n\nexport default Vue.extend({\n name: 'v-col',\n functional: true,\n props: {\n cols: {\n type: [Boolean, String, Number],\n default: false,\n },\n ...breakpointProps,\n offset: {\n type: [String, Number],\n default: null,\n },\n ...offsetProps,\n order: {\n type: [String, Number],\n default: null,\n },\n ...orderProps,\n alignSelf: {\n type: String,\n default: null,\n validator: (str: any) => ['auto', 'start', 'end', 'center', 'baseline', 'stretch'].includes(str),\n },\n tag: {\n type: String,\n default: 'div',\n },\n },\n render (h, { props, data, children, parent }): VNode {\n // Super-fast memoization based on props, 5x faster than JSON.stringify\n let cacheKey = ''\n for (const prop in props) {\n cacheKey += String((props as any)[prop])\n }\n let classList = cache.get(cacheKey)\n\n if (!classList) {\n classList = []\n // Loop through `col`, `offset`, `order` breakpoint props\n let type: keyof typeof propMap\n for (type in propMap) {\n propMap[type].forEach(prop => {\n const value: string | number | boolean = (props as any)[prop]\n const className = breakpointClass(type, prop, value)\n if (className) classList!.push(className)\n })\n }\n\n const hasColClasses = classList.some(className => className.startsWith('col-'))\n\n classList.push({\n // Default to .col if no other col-{bp}-* classes generated nor `cols` specified.\n col: !hasColClasses || !props.cols,\n [`col-${props.cols}`]: props.cols,\n [`offset-${props.offset}`]: props.offset,\n [`order-${props.order}`]: props.order,\n [`align-self-${props.alignSelf}`]: props.alignSelf,\n })\n\n cache.set(cacheKey, classList)\n }\n\n return h(props.tag, mergeData(data, { class: classList }), children)\n },\n})\n"],"sourceRoot":""}