@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 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 = 500) {
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)) {
@@ -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> {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@targoninc/jess-components",
3
3
  "type": "module",
4
- "version": "0.0.32",
4
+ "version": "0.0.34",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "files": [