text-fields
Advanced tools
Comparing version 2.4.3 to 2.4.4
{ | ||
"name": "text-fields", | ||
"version": "2.4.3", | ||
"version": "2.4.4", | ||
"description": "Input, textarea, material", | ||
@@ -14,5 +14,2 @@ "author": "ux-ui.pro", | ||
}, | ||
"css": "dist/index.css", | ||
"main": "dist/index.js", | ||
"module": "dist/index.module.js", | ||
"targets": { | ||
@@ -30,9 +27,21 @@ "css": { | ||
"scripts": { | ||
"serve": "parcel watch", | ||
"serve": "parcel src/index.html --dist-dir dist --cache-dir .parcel --no-source-maps --open", | ||
"build": "parcel build", | ||
"clean": "rm -rf dist .parcel-cache" | ||
"clean": "rm -rf dist .parcel-cache", | ||
"lint:js": "eslint --ext .js,.vue .", | ||
"lint:scss": "stylelint **/*.{scss,vue}", | ||
"lintfix": "yarn lint:js --fix && yarn lint:scss --fix" | ||
}, | ||
"devDependencies": { | ||
"@parcel/transformer-sass": "~2.10.0", | ||
"parcel": "~2.10.0" | ||
"@parcel/transformer-sass": "~2.10.1", | ||
"eslint": "^7.32.0 || ^8.51.0", | ||
"eslint-config-airbnb-base": "^15.0.0", | ||
"eslint-plugin-import": "^2.28.1", | ||
"eslint-plugin-vue": "^9.17.0", | ||
"parcel": "~2.10.1", | ||
"sass": "^1.69.4", | ||
"postcss-html": "^1.5.0", | ||
"stylelint": "^15.11.0", | ||
"stylelint-config-standard-scss": "^11.0.0", | ||
"stylelint-selector-bem-pattern": "^3.0.1" | ||
}, | ||
@@ -39,0 +48,0 @@ "keywords": [ |
@@ -1,52 +0,20 @@ | ||
import notched from './module/notched'; | ||
import observers from './module/observers'; | ||
import listeners from './module/listeners'; | ||
import handlers from './events/handlers'; | ||
import notched from './utils/notched'; | ||
import reset from './utils/reset'; | ||
const TextFields = { | ||
notches: [], | ||
notches: [], | ||
notched, | ||
notched, | ||
handlers() { | ||
const fields = [...document.querySelectorAll('.text-field-container input, .text-field-container textarea')]; | ||
handlers, | ||
fields.forEach((field) => { | ||
const notchData = this.notches.find((data) => data.container.contains(field)); | ||
reset, | ||
if (!notchData) return; | ||
const { container, notch } = notchData; | ||
const fieldType = field instanceof HTMLTextAreaElement; | ||
observers(field, container, notch); | ||
listeners(field, container, notch, fieldType); | ||
}); | ||
}, | ||
reset() { | ||
const fields = [...document.querySelectorAll('.text-field-container input, .text-field-container textarea')]; | ||
const resetFields = () => { | ||
fields.forEach((field) => { | ||
const e = field; | ||
e.parentNode.classList.remove('textarea--filled', 'textarea--error'); | ||
e.parentNode.classList.remove('input--filled', 'input--error'); | ||
e.value = ''; | ||
if (e.parentNode.classList.contains('textarea--auto-resizeable')) { | ||
e.style.height = 'auto'; | ||
} | ||
}); | ||
}; | ||
requestAnimationFrame(resetFields); | ||
}, | ||
init() { | ||
this.notched(); | ||
this.handlers(); | ||
}, | ||
async init() { | ||
await this.notched(); | ||
await this.handlers(); | ||
}, | ||
}; | ||
export default TextFields; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
131005
36
1621
11
3