hamzus-ui 0.0.84 → 0.0.85

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hamzus-ui",
3
- "version": "0.0.84",
3
+ "version": "0.0.85",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "svelte": "index.js",
@@ -35,6 +35,8 @@
35
35
  // local var
36
36
  let isMounted = false;
37
37
 
38
+ $: handleChange(value)
39
+
38
40
  // fnctions
39
41
  function formatInput(inputValue) {
40
42
  // verifier que c est un nombre
@@ -75,17 +77,18 @@
75
77
 
76
78
  return formattedValue;
77
79
  }
78
-
79
- function handleChange() {
80
+ function handleChange(val) {
80
81
  if (!isMounted) {
81
82
  return
82
83
  }
84
+
83
85
  let newValue = formatInput(value);
84
86
 
85
87
  // si la valeur formater est pas egal alors on update
86
88
  if (newValue !== value) {
87
89
  value = newValue;
88
90
  }
91
+
89
92
 
90
93
  onChange(value)
91
94
  }
@@ -140,7 +143,6 @@
140
143
  <input
141
144
  on:focus={onFocus}
142
145
  on:blur={onBlur}
143
- on:input={handleChange}
144
146
  class="h4"
145
147
  {placeholder}
146
148
  type={(isVisible && type == 'password') || type === 'number' ? 'text' : type}