@hashrytech/quick-components-kit 0.19.16 → 0.19.17

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @hashrytech/quick-components-kit
2
2
 
3
+ ## 0.19.17
4
+
5
+ ### Patch Changes
6
+
7
+ - feat: Added min and max enforcement
8
+
3
9
  ## 0.19.16
4
10
 
5
11
  ### Patch Changes
@@ -137,6 +137,20 @@
137
137
  (e.target as HTMLInputElement).value = localValue; // reflect sanitized value in the UI
138
138
  }
139
139
 
140
+ if(max && max > 0){
141
+ if(Number(value) > max){
142
+ localValue = String(max);
143
+ (e.target as HTMLInputElement).value = localValue; // reflect max value in the UI
144
+ }
145
+ }
146
+
147
+ if(min && min > 0){
148
+ if(Number(value) < min){
149
+ localValue = String(min);
150
+ (e.target as HTMLInputElement).value = localValue; // reflect min value in the UI
151
+ }
152
+ }
153
+
140
154
  clearTimeout(debounceTimer);
141
155
  debounceTimer = setTimeout(() => {
142
156
  value = localValue; // sync to bound value after delay
@@ -165,7 +179,6 @@
165
179
  return String(num);
166
180
  }
167
181
 
168
-
169
182
  </script>
170
183
 
171
184
  <div class={twMerge("", firstDivClass)}>
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/hashrytech/quick-components-kit.git"
7
7
  },
8
- "version": "0.19.16",
8
+ "version": "0.19.17",
9
9
  "license": "MIT",
10
10
  "author": "Hashry Tech",
11
11
  "files": [