@targoninc/jess-components 0.0.32 → 0.0.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -2
- package/dist/src/Types.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -748,7 +748,11 @@ var InputType;
|
|
|
748
748
|
|
|
749
749
|
// src/src/Debounce.ts
|
|
750
750
|
var debounceMap = {};
|
|
751
|
-
function debounce(identifier, func, delay =
|
|
751
|
+
function debounce(identifier, func, delay = 0) {
|
|
752
|
+
if (!delay) {
|
|
753
|
+
func();
|
|
754
|
+
return;
|
|
755
|
+
}
|
|
752
756
|
if (debounceMap[identifier]) {
|
|
753
757
|
clearTimeout(debounceMap[identifier]);
|
|
754
758
|
}
|
|
@@ -812,7 +816,7 @@ function input(config) {
|
|
|
812
816
|
validate(config.value);
|
|
813
817
|
value = signal(config.value ?? "");
|
|
814
818
|
}
|
|
815
|
-
return create("div").classes("flex-v", "jess").children(create("label").classes("flex-v", "jess", getDisabledClass(config)).text(config.label ?? "").for(config.title).children(create("input").classes(invalidClass, passwordClass).applyGenericConfig(config).type(actualType).value(value).accept(config.accept ?? "").required(config.required ?? false).placeholder(config.placeholder ?? "").attributes("autofocus", config.autofocus ?? "").oninput((e) => {
|
|
819
|
+
return create("div").classes("flex-v", "jess").children(create("label").classes("flex-v", "jess", getDisabledClass(config)).text(config.label ?? "").for(config.title).children(when(config.infoLink, create("a").text(config.infoText ?? config.infoLink).href(config.infoLink).build()), create("input").classes(invalidClass, passwordClass).applyGenericConfig(config).type(actualType).value(value).accept(config.accept ?? "").required(config.required ?? false).placeholder(config.placeholder ?? "").attributes("autofocus", config.autofocus ?? "").oninput((e) => {
|
|
816
820
|
touched.value = true;
|
|
817
821
|
lastChange = Date.now();
|
|
818
822
|
if (!isSignal(config.value)) {
|
package/dist/src/Types.d.ts
CHANGED
|
@@ -34,6 +34,8 @@ export interface InputConfig<T> extends ChangeableConfig<T> {
|
|
|
34
34
|
placeholder?: StringOrSignal;
|
|
35
35
|
accept?: StringOrSignal;
|
|
36
36
|
onkeydown?: EventHandler<KeyboardEvent>;
|
|
37
|
+
infoLink?: StringOrSignal;
|
|
38
|
+
infoText?: StringOrSignal;
|
|
37
39
|
debounce?: number;
|
|
38
40
|
}
|
|
39
41
|
export interface TextareaConfig extends ChangeableConfig<string> {
|