@mekari/pixel-input
Advanced tools
Comparing version 0.3.0 to 0.3.1
@@ -276,27 +276,23 @@ 'use strict'; | ||
*/ | ||
if (this.$parent.$vnode.parent && this.$parent.$vnode.parent.componentOptions.tag === 'mp-input-group') { | ||
this.$parent.$children.map(parent => { | ||
let width = 0; | ||
const withBackground = pixelUtils.isUndef(parent.$options.propsData.withBackground); | ||
parent.$children.map(child => { | ||
const children = child.$slots.default.filter(e => e.tag); | ||
children.map(subchild => { | ||
if (subchild.componentOptions) { | ||
if (subchild.componentOptions.tag === 'mp-icon' || subchild.componentOptions.tag === 'mp-text') { | ||
width = parseInt(getComputedStyle(subchild.elm).width, 10); | ||
} | ||
} | ||
}); | ||
this.$parent.$children.map(parent => { | ||
let width = 0; | ||
const withBackground = pixelUtils.isUndef(parent.$options.propsData.withBackground); | ||
parent.$children.map(child => { | ||
const children = child.$slots.default.filter(e => e.tag); | ||
children.map(subchild => { | ||
if (subchild.componentOptions) { | ||
width = parseInt(getComputedStyle(subchild.elm).width, 10); | ||
} | ||
}); | ||
}); | ||
if (parent.$refs.inputLeftAddonRef) { | ||
this.stylePaddingLeft += withBackground ? width + 1 : width + 12; | ||
} | ||
if (parent.$refs.inputLeftAddonRef) { | ||
this.stylePaddingLeft += withBackground ? width + 1 : width + 12; | ||
} | ||
if (parent.$refs.inputRightAddonRef) { | ||
this.stylePaddingRight += withBackground ? width + 1 : width + 12; | ||
this.styleRight += withBackground ? width + 1 : width + 12; | ||
} | ||
}); | ||
} | ||
if (parent.$refs.inputRightAddonRef) { | ||
this.stylePaddingRight += withBackground ? width + 1 : width + 12; | ||
this.styleRight += withBackground ? width + 1 : width + 12; | ||
} | ||
}); | ||
}, | ||
@@ -303,0 +299,0 @@ |
@@ -276,27 +276,23 @@ 'use strict'; | ||
*/ | ||
if (this.$parent.$vnode.parent && this.$parent.$vnode.parent.componentOptions.tag === 'mp-input-group') { | ||
this.$parent.$children.map(parent => { | ||
let width = 0; | ||
const withBackground = pixelUtils.isUndef(parent.$options.propsData.withBackground); | ||
parent.$children.map(child => { | ||
const children = child.$slots.default.filter(e => e.tag); | ||
children.map(subchild => { | ||
if (subchild.componentOptions) { | ||
if (subchild.componentOptions.tag === 'mp-icon' || subchild.componentOptions.tag === 'mp-text') { | ||
width = parseInt(getComputedStyle(subchild.elm).width, 10); | ||
} | ||
} | ||
}); | ||
this.$parent.$children.map(parent => { | ||
let width = 0; | ||
const withBackground = pixelUtils.isUndef(parent.$options.propsData.withBackground); | ||
parent.$children.map(child => { | ||
const children = child.$slots.default.filter(e => e.tag); | ||
children.map(subchild => { | ||
if (subchild.componentOptions) { | ||
width = parseInt(getComputedStyle(subchild.elm).width, 10); | ||
} | ||
}); | ||
}); | ||
if (parent.$refs.inputLeftAddonRef) { | ||
this.stylePaddingLeft += withBackground ? width + 1 : width + 12; | ||
} | ||
if (parent.$refs.inputLeftAddonRef) { | ||
this.stylePaddingLeft += withBackground ? width + 1 : width + 12; | ||
} | ||
if (parent.$refs.inputRightAddonRef) { | ||
this.stylePaddingRight += withBackground ? width + 1 : width + 12; | ||
this.styleRight += withBackground ? width + 1 : width + 12; | ||
} | ||
}); | ||
} | ||
if (parent.$refs.inputRightAddonRef) { | ||
this.stylePaddingRight += withBackground ? width + 1 : width + 12; | ||
this.styleRight += withBackground ? width + 1 : width + 12; | ||
} | ||
}); | ||
}, | ||
@@ -303,0 +299,0 @@ |
@@ -272,27 +272,23 @@ import { MpBox } from '@mekari/pixel-box'; | ||
*/ | ||
if (this.$parent.$vnode.parent && this.$parent.$vnode.parent.componentOptions.tag === 'mp-input-group') { | ||
this.$parent.$children.map(parent => { | ||
let width = 0; | ||
const withBackground = isUndef(parent.$options.propsData.withBackground); | ||
parent.$children.map(child => { | ||
const children = child.$slots.default.filter(e => e.tag); | ||
children.map(subchild => { | ||
if (subchild.componentOptions) { | ||
if (subchild.componentOptions.tag === 'mp-icon' || subchild.componentOptions.tag === 'mp-text') { | ||
width = parseInt(getComputedStyle(subchild.elm).width, 10); | ||
} | ||
} | ||
}); | ||
this.$parent.$children.map(parent => { | ||
let width = 0; | ||
const withBackground = isUndef(parent.$options.propsData.withBackground); | ||
parent.$children.map(child => { | ||
const children = child.$slots.default.filter(e => e.tag); | ||
children.map(subchild => { | ||
if (subchild.componentOptions) { | ||
width = parseInt(getComputedStyle(subchild.elm).width, 10); | ||
} | ||
}); | ||
}); | ||
if (parent.$refs.inputLeftAddonRef) { | ||
this.stylePaddingLeft += withBackground ? width + 1 : width + 12; | ||
} | ||
if (parent.$refs.inputLeftAddonRef) { | ||
this.stylePaddingLeft += withBackground ? width + 1 : width + 12; | ||
} | ||
if (parent.$refs.inputRightAddonRef) { | ||
this.stylePaddingRight += withBackground ? width + 1 : width + 12; | ||
this.styleRight += withBackground ? width + 1 : width + 12; | ||
} | ||
}); | ||
} | ||
if (parent.$refs.inputRightAddonRef) { | ||
this.stylePaddingRight += withBackground ? width + 1 : width + 12; | ||
this.styleRight += withBackground ? width + 1 : width + 12; | ||
} | ||
}); | ||
}, | ||
@@ -299,0 +295,0 @@ |
{ | ||
"name": "@mekari/pixel-input", | ||
"description": "Mekari Pixel | Input component", | ||
"version": "0.3.0", | ||
"version": "0.3.1", | ||
"homepage": "https://mekari.design/", | ||
@@ -6,0 +6,0 @@ "repository": { |
@@ -82,35 +82,25 @@ import { MpBox } from '@mekari/pixel-box' | ||
if ( | ||
this.$parent.$vnode.parent && | ||
this.$parent.$vnode.parent.componentOptions.tag === 'mp-input-group' | ||
) { | ||
this.$parent.$children.map((parent) => { | ||
let width = 0 | ||
const withBackground = isUndef(parent.$options.propsData.withBackground) | ||
this.$parent.$children.map((parent) => { | ||
let width = 0 | ||
const withBackground = isUndef(parent.$options.propsData.withBackground) | ||
parent.$children.map((child) => { | ||
const children = child.$slots.default.filter((e) => e.tag) | ||
parent.$children.map((child) => { | ||
const children = child.$slots.default.filter((e) => e.tag) | ||
children.map((subchild) => { | ||
if (subchild.componentOptions) { | ||
if ( | ||
subchild.componentOptions.tag === 'mp-icon' || | ||
subchild.componentOptions.tag === 'mp-text' | ||
) { | ||
width = parseInt(getComputedStyle(subchild.elm).width, 10) | ||
} | ||
} | ||
}) | ||
children.map((subchild) => { | ||
if (subchild.componentOptions) { | ||
width = parseInt(getComputedStyle(subchild.elm).width, 10) | ||
} | ||
}) | ||
}) | ||
if (parent.$refs.inputLeftAddonRef) { | ||
this.stylePaddingLeft += withBackground ? width + 1 : width + 12 | ||
} | ||
if (parent.$refs.inputLeftAddonRef) { | ||
this.stylePaddingLeft += withBackground ? width + 1 : width + 12 | ||
} | ||
if (parent.$refs.inputRightAddonRef) { | ||
this.stylePaddingRight += withBackground ? width + 1 : width + 12 | ||
this.styleRight += withBackground ? width + 1 : width + 12 | ||
} | ||
}) | ||
} | ||
if (parent.$refs.inputRightAddonRef) { | ||
this.stylePaddingRight += withBackground ? width + 1 : width + 12 | ||
this.styleRight += withBackground ? width + 1 : width + 12 | ||
} | ||
}) | ||
}, | ||
@@ -117,0 +107,0 @@ render(h) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
53716
1939