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EAAW,MAAM,CAAC,KAAP,GAAe,KAAf;AAEX,aAAO,MAAP;AACD;AAnBO;AAZc,CAAX,C","sourcesContent":["// Helpers\nimport { convertToUnit } from '../../util/helpers'\n\n// Types\nimport Vue from 'vue'\nimport { PropValidator } from 'vue/types/options'\n\nexport type NumberOrNumberString = PropValidator<string | number | undefined>\n\nexport default Vue.extend({\n name: 'measurable',\n\n props: {\n height: [Number, String] as NumberOrNumberString,\n maxHeight: [Number, String] as NumberOrNumberString,\n maxWidth: [Number, String] as NumberOrNumberString,\n minHeight: [Number, String] as NumberOrNumberString,\n minWidth: [Number, String] as NumberOrNumberString,\n width: [Number, String] as NumberOrNumberString,\n },\n\n computed: {\n measurableStyles (): object {\n const styles: Record<string, string> = {}\n\n const height = convertToUnit(this.height)\n const minHeight = convertToUnit(this.minHeight)\n const minWidth = convertToUnit(this.minWidth)\n const maxHeight = convertToUnit(this.maxHeight)\n const maxWidth = convertToUnit(this.maxWidth)\n const width = convertToUnit(this.width)\n\n if (height) styles.height = height\n if (minHeight) styles.minHeight = minHeight\n if (minWidth) styles.minWidth = minWidth\n if (maxHeight) styles.maxHeight = maxHeight\n if (maxWidth) styles.maxWidth = maxWidth\n if (width) styles.width = width\n\n return styles\n },\n },\n})\n"],"sourceRoot":"","file":"index.js"} |