text-fields
Advanced tools
Comparing version 3.4.3 to 3.5.0
export default class TextFields { | ||
constructor(); | ||
updateField(field: HTMLInputElement | HTMLTextAreaElement): void; | ||
init(): Promise<void>; | ||
@@ -4,0 +5,0 @@ } |
@@ -121,2 +121,10 @@ | ||
} | ||
updateField(field) { | ||
const container = field.closest(".text-field-container"); | ||
const notchData = this.notches.find((data)=>data.container.contains(field)); | ||
if (container) { | ||
$a196c1ed25598f0e$var$TextFields.updateStyles(field, container, field instanceof HTMLTextAreaElement); | ||
if (notchData) $a196c1ed25598f0e$var$TextFields.setNotchWidth(notchData.notch, $a196c1ed25598f0e$var$TextFields.getNotchWidth(notchData.notch)); | ||
} | ||
} | ||
async init() { | ||
@@ -123,0 +131,0 @@ await new Promise((resolve)=>{ |
@@ -109,2 +109,10 @@ class $643fcf18b2d2e76f$var$TextFields { | ||
} | ||
updateField(field) { | ||
const container = field.closest(".text-field-container"); | ||
const notchData = this.notches.find((data)=>data.container.contains(field)); | ||
if (container) { | ||
$643fcf18b2d2e76f$var$TextFields.updateStyles(field, container, field instanceof HTMLTextAreaElement); | ||
if (notchData) $643fcf18b2d2e76f$var$TextFields.setNotchWidth(notchData.notch, $643fcf18b2d2e76f$var$TextFields.getNotchWidth(notchData.notch)); | ||
} | ||
} | ||
async init() { | ||
@@ -111,0 +119,0 @@ await new Promise((resolve)=>{ |
{ | ||
"name": "text-fields", | ||
"version": "3.4.3", | ||
"version": "3.5.0", | ||
"description": "TextFields is designed to create and manage text fields with advanced visuals and functionality, including dynamic notched outlines, floating labels, and adaptive text areas.", | ||
@@ -5,0 +5,0 @@ "author": "ux-ui.pro", |
@@ -144,2 +144,15 @@ class TextFields { | ||
public updateField(field: HTMLInputElement | HTMLTextAreaElement) { | ||
const container = field.closest('.text-field-container') as HTMLElement; | ||
const notchData = this.notches.find((data) => data.container.contains(field)); | ||
if (container) { | ||
TextFields.updateStyles(field, container, field instanceof HTMLTextAreaElement); | ||
if (notchData) { | ||
TextFields.setNotchWidth(notchData.notch, TextFields.getNotchWidth(notchData.notch)); | ||
} | ||
} | ||
} | ||
public async init() { | ||
@@ -146,0 +159,0 @@ await new Promise<void>((resolve) => { |
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
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
91056
472