px-react-ui-components 1.0.18 → 1.0.20

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.
@@ -204,6 +204,13 @@ function MyInput({
204
204
 
205
205
  // Eğer değer değişmediyse güncelleme yapma
206
206
  if (newValue === myValue) return;
207
+ if (type === MyInputType.NUMBER) {
208
+ // Sadece 0-9 arası rakamlara izin ver
209
+ newValue = newValue.replace(/[^0-9]/g, '');
210
+
211
+ // min ve max kontrolü
212
+ if (min && newValue < min) newValue = min.toString();else if (max && newValue > max) newValue = max.toString();
213
+ }
207
214
  if (type === MyInputType.TEXT || type === MyInputType.TEXTAREA) {
208
215
  newValue = newValue.trim();
209
216
  if (uppercase) newValue = newValue.toLocaleUpperCase("TR");else if (lowercase) newValue = newValue.toLocaleLowerCase("TR");else if (firstUppercase) newValue = newValue.split(' ').map(word => word.charAt(0).toLocaleUpperCase("TR") + word.slice(1).toLocaleLowerCase("TR")).join(' ');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "px-react-ui-components",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.js",
6
6
  "type": "commonjs",