@juspay/svelte-ui-components 2.13.1 → 2.14.0

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.
@@ -43,6 +43,14 @@
43
43
  }
44
44
  }
45
45
 
46
+ export function blur() {
47
+ try {
48
+ inputElement?.blur();
49
+ } catch (error) {
50
+ console.error('Error blurring inputElement:', error);
51
+ }
52
+ }
53
+
46
54
  let inputElement: HTMLInputElement | HTMLTextAreaElement | null = $state(null);
47
55
 
48
56
  let validationState = $derived.by(() => {
@@ -1,6 +1,7 @@
1
1
  import type { InputProperties } from './properties';
2
2
  declare const Input: import("svelte").Component<InputProperties, {
3
3
  focus: () => void;
4
+ blur: () => void;
4
5
  }, "value">;
5
6
  type Input = ReturnType<typeof Input>;
6
7
  export default Input;
@@ -53,6 +53,10 @@
53
53
  export function focus() {
54
54
  inputRef?.focus();
55
55
  }
56
+
57
+ export function blur() {
58
+ inputRef?.blur();
59
+ }
56
60
  </script>
57
61
 
58
62
  <div class="container {classes ?? ''}">
@@ -1,6 +1,7 @@
1
1
  import type { InputButtonProperties } from './properties';
2
2
  declare const InputButton: import("svelte").Component<InputButtonProperties, {
3
3
  focus: () => void;
4
+ blur: () => void;
4
5
  }, "value">;
5
6
  type InputButton = ReturnType<typeof InputButton>;
6
7
  export default InputButton;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juspay/svelte-ui-components",
3
- "version": "2.13.1",
3
+ "version": "2.14.0",
4
4
  "description": "A themeable Svelte 5 UI component library with CSS custom property driven styling",
5
5
  "keywords": [
6
6
  "svelte",