|
1 |
- {"version":3,"sources":["../../src/mixins/measurable.ts"],"names":[],"mappings":";AACA,SAAS,aAAT,QAA8B,iBAA9B;AAEA;AACA,OAAO,GAAP,MAAgB,KAAhB;AAKA,eAAe,IAAI,MAAJ,CAAW;AACxB,UAAM,YADkB;AAGxB,WAAO;AACL,gBAAQ,CAAC,MAAD,EAAS,MAAT,CADH;AAEL,mBAAW,CAAC,MAAD,EAAS,MAAT,CAFN;AAGL,kBAAU,CAAC,MAAD,EAAS,MAAT,CAHL;AAIL,mBAAW,CAAC,MAAD,EAAS,MAAT,CAJN;AAKL,kBAAU,CAAC,MAAD,EAAS,MAAT,CALL;AAML,eAAO,CAAC,MAAD,EAAS,MAAT;AANF,KAHiB;AAYxB,cAAU;AACR,wBADQ,8BACQ;AACd,gBAAM,SAAiC,EAAvC;AAEA,gBAAM,SAAS,cAAc,KAAK,MAAnB,CAAf;AACA,gBAAM,YAAY,cAAc,KAAK,SAAnB,CAAlB;AACA,gBAAM,WAAW,cAAc,KAAK,QAAnB,CAAjB;AACA,gBAAM,YAAY,cAAc,KAAK,SAAnB,CAAlB;AACA,gBAAM,WAAW,cAAc,KAAK,QAAnB,CAAjB;AACA,gBAAM,QAAQ,cAAc,KAAK,KAAnB,CAAd;AAEA,gBAAI,MAAJ,EAAY,OAAO,MAAP,GAAgB,MAAhB;AACZ,gBAAI,SAAJ,EAAe,OAAO,SAAP,GAAmB,SAAnB;AACf,gBAAI,QAAJ,EAAc,OAAO,QAAP,GAAkB,QAAlB;AACd,gBAAI,SAAJ,EAAe,OAAO,SAAP,GAAmB,SAAnB;AACf,gBAAI,QAAJ,EAAc,OAAO,QAAP,GAAkB,QAAlB;AACd,gBAAI,KAAJ,EAAW,OAAO,KAAP,GAAe,KAAf;AAEX,mBAAO,MAAP;AACD;AAnBO;AAZc,CAAX,CAAf","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":""}
|