Socket
Socket
Sign inDemoInstall

@mekari/pixel-input

Package Overview
Dependencies
Maintainers
4
Versions
54
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mekari/pixel-input - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

41

dist/mekari-pixel-input.cjs.dev.js

@@ -273,21 +273,30 @@ 'use strict';

* Calculated horizontal padding if have any input addons prefix,
* suffix or both and clear button icon position.
* suffix or both and clear button icon position.
* Only MpText and MpIcon allowed to be assign into MpInputAddon.
*/
this.$parent.$children.map(node => {
let width = 0;
const withBackground = pixelUtils.isUndef(node.$options.propsData.withBackground);
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);
}
}
});
});
if (node.$children[0].$children[0]) {
width = parseInt(getComputedStyle(node.$children[0].$children[0].$el).width, 10);
}
if (parent.$refs.inputLeftAddonRef) {
this.stylePaddingLeft += withBackground ? width + 1 : width + 12;
}
if (node.$refs.inputLeftAddonRef) {
this.stylePaddingLeft += withBackground ? width + 1 : width + 12;
}
if (node.$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;
}
});
}
},

@@ -294,0 +303,0 @@

@@ -273,21 +273,30 @@ 'use strict';

* Calculated horizontal padding if have any input addons prefix,
* suffix or both and clear button icon position.
* suffix or both and clear button icon position.
* Only MpText and MpIcon allowed to be assign into MpInputAddon.
*/
this.$parent.$children.map(node => {
let width = 0;
const withBackground = pixelUtils.isUndef(node.$options.propsData.withBackground);
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);
}
}
});
});
if (node.$children[0].$children[0]) {
width = parseInt(getComputedStyle(node.$children[0].$children[0].$el).width, 10);
}
if (parent.$refs.inputLeftAddonRef) {
this.stylePaddingLeft += withBackground ? width + 1 : width + 12;
}
if (node.$refs.inputLeftAddonRef) {
this.stylePaddingLeft += withBackground ? width + 1 : width + 12;
}
if (node.$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;
}
});
}
},

@@ -294,0 +303,0 @@

@@ -269,21 +269,30 @@ import { MpBox } from '@mekari/pixel-box';

* Calculated horizontal padding if have any input addons prefix,
* suffix or both and clear button icon position.
* suffix or both and clear button icon position.
* Only MpText and MpIcon allowed to be assign into MpInputAddon.
*/
this.$parent.$children.map(node => {
let width = 0;
const withBackground = isUndef(node.$options.propsData.withBackground);
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);
}
}
});
});
if (node.$children[0].$children[0]) {
width = parseInt(getComputedStyle(node.$children[0].$children[0].$el).width, 10);
}
if (parent.$refs.inputLeftAddonRef) {
this.stylePaddingLeft += withBackground ? width + 1 : width + 12;
}
if (node.$refs.inputLeftAddonRef) {
this.stylePaddingLeft += withBackground ? width + 1 : width + 12;
}
if (node.$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;
}
});
}
},

@@ -290,0 +299,0 @@

{
"name": "@mekari/pixel-input",
"description": "Mekari Pixel | Input component",
"version": "0.2.1",
"version": "0.2.2",
"homepage": "https://mekari.design/",

@@ -6,0 +6,0 @@ "repository": {

@@ -78,22 +78,33 @@ import { MpBox } from '@mekari/pixel-box'

* Calculated horizontal padding if have any input addons prefix,
* suffix or both and clear button icon position.
* suffix or both and clear button icon position.
* Only MpText and MpIcon allowed to be assign into MpInputAddon.
*/
this.$parent.$children.map((node) => {
let width = 0
const withBackground = isUndef(node.$options.propsData.withBackground)
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)
if (node.$children[0].$children[0]) {
width = parseInt(getComputedStyle(node.$children[0].$children[0].$el).width, 10)
}
parent.$children.map((child) => {
const children = child.$slots.default.filter((e) => e.tag)
if (node.$refs.inputLeftAddonRef) {
this.stylePaddingLeft += withBackground ? width + 1 : width + 12
}
children.map((subchild) => {
if (subchild.componentOptions) {
if (subchild.componentOptions.tag === 'mp-icon' || subchild.componentOptions.tag === 'mp-text') {
width = parseInt(getComputedStyle(subchild.elm).width, 10)
}
}
})
})
if (node.$refs.inputRightAddonRef) {
this.stylePaddingRight += withBackground ? width + 1 : width + 12
this.styleRight += 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
}
})
}
},

@@ -100,0 +111,0 @@ render(h) {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc