numeric-input-react 1.0.22 → 1.0.24
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.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/numeric-input.d.ts +2 -16
- package/dist/numeric-input.d.ts.map +1 -1
- package/dist/numeric-input.js +13 -545
- package/dist/numeric-input.js.map +1 -1
- package/dist/numeric-input.types.d.ts +15 -0
- package/dist/numeric-input.types.d.ts.map +1 -0
- package/dist/numeric-input.types.js +2 -0
- package/dist/numeric-input.types.js.map +1 -0
- package/dist/numeric-input.utils.d.ts +27 -0
- package/dist/numeric-input.utils.d.ts.map +1 -0
- package/dist/numeric-input.utils.js +143 -0
- package/dist/numeric-input.utils.js.map +1 -0
- package/dist/use-numeric-input.d.ts +28 -0
- package/dist/use-numeric-input.d.ts.map +1 -0
- package/dist/use-numeric-input.js +420 -0
- package/dist/use-numeric-input.js.map +1 -0
- package/package.json +17 -3
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA"}
|
package/dist/numeric-input.d.ts
CHANGED
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
value: number;
|
|
4
|
-
formattedValue: string;
|
|
5
|
-
};
|
|
6
|
-
type NumericInputProps = ComponentProps<'input'> & {
|
|
7
|
-
onValueChange: (valueObject: NumericInputValue) => void;
|
|
8
|
-
separator?: string;
|
|
9
|
-
allowDecimal?: boolean;
|
|
10
|
-
allowNegative?: boolean;
|
|
11
|
-
minValue?: number;
|
|
12
|
-
maxValue?: number;
|
|
13
|
-
maxDecimalPlaces?: number;
|
|
14
|
-
};
|
|
15
|
-
declare function NumericInput({ value, className, separator, onValueChange, onCompositionStart, onCompositionEnd, onBlur, maxLength, allowDecimal, allowNegative, minValue, maxValue, maxDecimalPlaces, ...props }: NumericInputProps): import("react/jsx-runtime").JSX.Element;
|
|
1
|
+
import type { NumericInputProps } from './numeric-input.types';
|
|
2
|
+
declare const NumericInput: ({ value, maxValue, minValue, separator, maxLength, className, maxDecimalPlaces, allowDecimal, allowNegative, onBlur, onValueChange, onCompositionEnd, onCompositionStart, ...props }: NumericInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
3
|
export { NumericInput };
|
|
17
|
-
export type { NumericInputValue, NumericInputProps };
|
|
18
4
|
//# sourceMappingURL=numeric-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numeric-input.d.ts","sourceRoot":"","sources":["../src/numeric-input.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"numeric-input.d.ts","sourceRoot":"","sources":["../src/numeric-input.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAA;AAE9D,QAAA,MAAM,YAAY,GAAI,sLAenB,iBAAiB,4CA8CnB,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
package/dist/numeric-input.js
CHANGED
|
@@ -1,553 +1,21 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
*/
|
|
8
|
-
const convertFullWidthToHalfWidth = (str) => {
|
|
9
|
-
return str
|
|
10
|
-
.replace(/[0-9]/g, (char) => {
|
|
11
|
-
// Convert full-width numbers (0-9) to half-width (0-9)
|
|
12
|
-
return String.fromCharCode(char.charCodeAt(0) - 0xfee0);
|
|
13
|
-
})
|
|
14
|
-
.replace(/[.]/g, '.') // Convert full-width period (.) to half-width (.)
|
|
15
|
-
.replace(/[,]/g, ',') // Convert full-width comma (,) to half-width (,)
|
|
16
|
-
.replace(/[-]/g, '-') // Convert full-width minus (-, U+FF0D) to half-width (-)
|
|
17
|
-
.replace(/[ー]/g, '-') // Convert katakana long vowel mark (ー, U+30FC) to minus (-) when used as minus
|
|
18
|
-
.replace(/[−]/g, '-'); // Convert mathematical minus sign (−, U+2212) to half-width (-)
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Escapes special regex characters in a string
|
|
22
|
-
*/
|
|
23
|
-
const escapeRegex = (str) => {
|
|
24
|
-
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Checks if a string is a minus sign (half-width, full-width, katakana, or mathematical)
|
|
28
|
-
*/
|
|
29
|
-
const isMinusSign = (str) => {
|
|
30
|
-
return str === '-' || str === '-' || str === 'ー' || str === '−';
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Converts any minus sign variant to half-width minus
|
|
34
|
-
*/
|
|
35
|
-
const normalizeMinusSign = (str) => {
|
|
36
|
-
return isMinusSign(str) ? '-' : str;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Parses a value prop (string or number) to a number, removing separator if present
|
|
40
|
-
*/
|
|
41
|
-
const parseValueProp = (value, separator) => {
|
|
42
|
-
if (value === null || value === undefined || value === '') {
|
|
43
|
-
return NaN;
|
|
44
|
-
}
|
|
45
|
-
if (typeof value === 'number') {
|
|
46
|
-
return value;
|
|
47
|
-
}
|
|
48
|
-
// Handle array case (shouldn't happen for numeric input, but handle gracefully)
|
|
49
|
-
if (Array.isArray(value)) {
|
|
50
|
-
const firstValue = value[0];
|
|
51
|
-
if (!firstValue) {
|
|
52
|
-
return NaN;
|
|
53
|
-
}
|
|
54
|
-
const cleanedValue = separator
|
|
55
|
-
? firstValue.replace(new RegExp(`[${escapeRegex(separator)}]`, 'g'), '')
|
|
56
|
-
: firstValue;
|
|
57
|
-
return Number(cleanedValue);
|
|
58
|
-
}
|
|
59
|
-
// At this point, value must be a string
|
|
60
|
-
const cleanedValue = separator
|
|
61
|
-
? value.replace(new RegExp(`[${escapeRegex(separator)}]`, 'g'), '')
|
|
62
|
-
: value;
|
|
63
|
-
return Number(cleanedValue);
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* Normalizes the input string by removing invalid characters
|
|
67
|
-
* and ensuring proper decimal point handling
|
|
68
|
-
*/
|
|
69
|
-
const normalizeNumericInput = (input, allowDecimal, allowNegative, maxLength) => {
|
|
70
|
-
let normalized = input;
|
|
71
|
-
// Remove all characters except digits, decimal point, and optionally minus sign
|
|
72
|
-
const allowedChars = allowDecimal
|
|
73
|
-
? allowNegative
|
|
74
|
-
? /[^0-9.\-]/g
|
|
75
|
-
: /[^0-9.]/g
|
|
76
|
-
: allowNegative
|
|
77
|
-
? /[^0-9\-]/g
|
|
78
|
-
: /[^0-9]/g;
|
|
79
|
-
normalized = normalized.replace(allowedChars, '');
|
|
80
|
-
// Handle negative sign: only allow at the start
|
|
81
|
-
if (allowNegative) {
|
|
82
|
-
const minusCount = (normalized.match(/-/g) || []).length;
|
|
83
|
-
if (minusCount > 1) {
|
|
84
|
-
// Keep only the first minus sign
|
|
85
|
-
normalized = normalized.replace(/-/g, (match, offset) => {
|
|
86
|
-
return offset === 0 ? match : '';
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
// If minus is not at the start, move it to the start
|
|
90
|
-
if (normalized.includes('-') && !normalized.startsWith('-')) {
|
|
91
|
-
normalized = `-${normalized.replace(/-/g, '')}`;
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
else {
|
|
95
|
-
normalized = normalized.replace(/-/g, '');
|
|
96
|
-
}
|
|
97
|
-
// Handle decimal point: only allow one, and only if decimals are allowed
|
|
98
|
-
if (allowDecimal) {
|
|
99
|
-
const decimalCount = (normalized.match(/\./g) || []).length;
|
|
100
|
-
if (decimalCount > 1) {
|
|
101
|
-
// Keep only the first decimal point
|
|
102
|
-
const firstDecimalIndex = normalized.indexOf('.');
|
|
103
|
-
normalized =
|
|
104
|
-
normalized.slice(0, firstDecimalIndex + 1) +
|
|
105
|
-
normalized.slice(firstDecimalIndex + 1).replace(/\./g, '');
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
normalized = normalized.replace(/\./g, '');
|
|
110
|
-
}
|
|
111
|
-
// Apply maxLength if specified
|
|
112
|
-
// maxLength should only apply to digits, not to minus sign or decimal point
|
|
113
|
-
if (maxLength) {
|
|
114
|
-
// Count only digits in the normalized string
|
|
115
|
-
const digitCount = (normalized.match(/\d/g) || []).length;
|
|
116
|
-
if (digitCount > maxLength) {
|
|
117
|
-
// Remove excess digits from the end, preserving minus sign and decimal point
|
|
118
|
-
const hasMinus = normalized.startsWith('-');
|
|
119
|
-
let result = hasMinus ? '-' : '';
|
|
120
|
-
let digitsSeen = 0;
|
|
121
|
-
let decimalAdded = false;
|
|
122
|
-
// Start from after minus sign if present
|
|
123
|
-
for (let i = hasMinus ? 1 : 0; i < normalized.length; i++) {
|
|
124
|
-
const char = normalized[i];
|
|
125
|
-
if (/\d/.test(char)) {
|
|
126
|
-
// Only keep digits up to maxLength
|
|
127
|
-
if (digitsSeen < maxLength) {
|
|
128
|
-
result += char;
|
|
129
|
-
digitsSeen++;
|
|
130
|
-
}
|
|
131
|
-
// Skip excess digits
|
|
132
|
-
}
|
|
133
|
-
else if (char === '.' && !decimalAdded) {
|
|
134
|
-
// Only keep decimal point if we have at least one digit and haven't added one yet
|
|
135
|
-
if (digitsSeen > 0) {
|
|
136
|
-
result += char;
|
|
137
|
-
decimalAdded = true;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
normalized = result;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return normalized;
|
|
145
|
-
};
|
|
146
|
-
function NumericInput({ value, className, separator, onValueChange, onCompositionStart, onCompositionEnd, onBlur, maxLength, allowDecimal = false, allowNegative = false, minValue, maxValue, maxDecimalPlaces, ...props }) {
|
|
147
|
-
// Validate min/max values
|
|
148
|
-
if (minValue !== undefined && maxValue !== undefined && minValue > maxValue) {
|
|
149
|
-
console.warn('NumericInput: minValue should be less than or equal to maxValue');
|
|
150
|
-
}
|
|
151
|
-
const isComposing = useRef(false);
|
|
152
|
-
const inputRef = useRef(null);
|
|
153
|
-
// Store the raw input value during IME composition
|
|
154
|
-
const [composingValue, setComposingValue] = useState('');
|
|
155
|
-
// Track if we've already processed the value from composition end
|
|
156
|
-
const hasProcessedComposition = useRef(false);
|
|
157
|
-
// Store the raw input string to preserve leading zeros
|
|
158
|
-
const [rawInputValue, setRawInputValue] = useState('');
|
|
159
|
-
const formatValue = useCallback((numValue) => {
|
|
160
|
-
if (Number.isNaN(numValue) || !Number.isFinite(numValue)) {
|
|
161
|
-
return '';
|
|
162
|
-
}
|
|
163
|
-
const valueStr = numValue.toString();
|
|
164
|
-
// If no separator, return as is
|
|
165
|
-
if (!separator) {
|
|
166
|
-
return valueStr;
|
|
167
|
-
}
|
|
168
|
-
// Split into integer and decimal parts
|
|
169
|
-
const [integerPart, decimalPart] = valueStr.split('.');
|
|
170
|
-
// Format integer part with separator (thousands separator)
|
|
171
|
-
const formattedInteger = integerPart.replace(/\B(?=(\d{3})+(?!\d))/g, separator);
|
|
172
|
-
// Combine with decimal part if exists
|
|
173
|
-
return decimalPart !== undefined
|
|
174
|
-
? `${formattedInteger}.${decimalPart}`
|
|
175
|
-
: formattedInteger;
|
|
176
|
-
}, [separator]);
|
|
177
|
-
const handleValueChange = useCallback((inputValue, skipCompositionCheck = false) => {
|
|
178
|
-
// During IME composition, update the composing value for display
|
|
179
|
-
// Don't convert full-width to half-width yet - wait for composition end
|
|
180
|
-
if (!skipCompositionCheck && isComposing.current) {
|
|
181
|
-
setComposingValue(inputValue);
|
|
182
|
-
// Store raw input value (could be full-width) for later processing
|
|
183
|
-
setRawInputValue(inputValue);
|
|
184
|
-
// Still notify parent but don't process the value
|
|
185
|
-
onValueChange({
|
|
186
|
-
value: 0,
|
|
187
|
-
formattedValue: inputValue,
|
|
188
|
-
});
|
|
189
|
-
return;
|
|
190
|
-
}
|
|
191
|
-
// Convert full-width Japanese characters to half-width
|
|
192
|
-
let rawValue = convertFullWidthToHalfWidth(inputValue);
|
|
193
|
-
// Remove scientific notation (e.g., "1e10", "1E10")
|
|
194
|
-
// This prevents unexpected number conversions
|
|
195
|
-
rawValue = rawValue.replace(/[eE]/g, '');
|
|
196
|
-
// Normalize the input (remove invalid chars, handle decimals, negatives)
|
|
197
|
-
rawValue = normalizeNumericInput(rawValue, allowDecimal, allowNegative, maxLength);
|
|
198
|
-
// Limit decimal places if specified
|
|
199
|
-
if (maxDecimalPlaces !== undefined && allowDecimal) {
|
|
200
|
-
const decimalIndex = rawValue.indexOf('.');
|
|
201
|
-
if (decimalIndex !== -1) {
|
|
202
|
-
const integerPart = rawValue.slice(0, decimalIndex);
|
|
203
|
-
const decimalPart = rawValue.slice(decimalIndex + 1);
|
|
204
|
-
if (decimalPart.length > maxDecimalPlaces) {
|
|
205
|
-
rawValue = `${integerPart}.${decimalPart.slice(0, maxDecimalPlaces)}`;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
// Handle empty input first (before processing leading zeros)
|
|
210
|
-
if (rawValue === '') {
|
|
211
|
-
setRawInputValue('');
|
|
212
|
-
onValueChange({
|
|
213
|
-
value: 0,
|
|
214
|
-
formattedValue: '',
|
|
215
|
-
});
|
|
216
|
-
return;
|
|
217
|
-
}
|
|
218
|
-
// Handle only minus sign (half-width or full-width converted): preserve it if allowNegative is true
|
|
219
|
-
if (rawValue === '-') {
|
|
220
|
-
if (allowNegative) {
|
|
221
|
-
setRawInputValue('-');
|
|
222
|
-
onValueChange({
|
|
223
|
-
value: 0,
|
|
224
|
-
formattedValue: '-',
|
|
225
|
-
});
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
else {
|
|
229
|
-
// If negative is not allowed, treat as empty
|
|
230
|
-
setRawInputValue('');
|
|
231
|
-
onValueChange({
|
|
232
|
-
value: 0,
|
|
233
|
-
formattedValue: '',
|
|
234
|
-
});
|
|
235
|
-
return;
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
// Remove leading zeros except for single "0" or "0." patterns
|
|
239
|
-
const shouldKeepSingleZero = rawValue === '0' ||
|
|
240
|
-
rawValue === '-0' ||
|
|
241
|
-
rawValue === '0.' ||
|
|
242
|
-
rawValue === '-0.';
|
|
243
|
-
if (!shouldKeepSingleZero) {
|
|
244
|
-
const hasMinus = rawValue.startsWith('-');
|
|
245
|
-
const withoutMinus = hasMinus ? rawValue.slice(1) : rawValue;
|
|
246
|
-
const hasDecimal = withoutMinus.includes('.');
|
|
247
|
-
if (hasDecimal) {
|
|
248
|
-
const [integerPart, decimalPart] = withoutMinus.split('.');
|
|
249
|
-
const cleanedInteger = integerPart.replace(/^0+/, '');
|
|
250
|
-
const prefix = hasMinus ? '-' : '';
|
|
251
|
-
if (cleanedInteger === '' && decimalPart) {
|
|
252
|
-
rawValue = `${prefix}0.${decimalPart}`;
|
|
253
|
-
}
|
|
254
|
-
else if (cleanedInteger === '') {
|
|
255
|
-
rawValue = `${prefix}0`;
|
|
256
|
-
}
|
|
257
|
-
else {
|
|
258
|
-
rawValue = `${prefix}${cleanedInteger}.${decimalPart}`;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
else {
|
|
262
|
-
const cleaned = withoutMinus.replace(/^0+/, '');
|
|
263
|
-
const prefix = hasMinus ? '-' : '';
|
|
264
|
-
rawValue = cleaned === '' ? `${prefix}0` : `${prefix}${cleaned}`;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
// Store the raw input value to preserve single "0" only
|
|
268
|
-
setRawInputValue(rawValue);
|
|
269
|
-
// Convert to number
|
|
270
|
-
const valueAsNumber = Number(rawValue);
|
|
271
|
-
// Handle invalid numbers
|
|
272
|
-
if (Number.isNaN(valueAsNumber) || !Number.isFinite(valueAsNumber)) {
|
|
273
|
-
setRawInputValue('');
|
|
274
|
-
onValueChange({
|
|
275
|
-
value: 0,
|
|
276
|
-
formattedValue: '',
|
|
277
|
-
});
|
|
278
|
-
return;
|
|
279
|
-
}
|
|
280
|
-
// Handle value exceeding MAX_SAFE_INTEGER
|
|
281
|
-
if (Math.abs(valueAsNumber) > Number.MAX_SAFE_INTEGER) {
|
|
282
|
-
const clampedValue = valueAsNumber > 0 ? Number.MAX_SAFE_INTEGER : -Number.MAX_SAFE_INTEGER;
|
|
283
|
-
const clampedString = clampedValue.toString();
|
|
284
|
-
setRawInputValue(clampedString);
|
|
285
|
-
onValueChange({
|
|
286
|
-
value: clampedValue,
|
|
287
|
-
formattedValue: formatValue(clampedValue),
|
|
288
|
-
});
|
|
289
|
-
return;
|
|
290
|
-
}
|
|
291
|
-
// Only preserve single "0" or "0." patterns (not multiple leading zeros like "01", "0123")
|
|
292
|
-
const isSingleZero = rawValue === '0' ||
|
|
293
|
-
rawValue === '-0' ||
|
|
294
|
-
rawValue.startsWith('0.') ||
|
|
295
|
-
rawValue.startsWith('-0.');
|
|
296
|
-
// Check if the value ends with a decimal point (e.g., "2.", "-2.", "123.")
|
|
297
|
-
// This allows users to continue typing decimal digits
|
|
298
|
-
const endsWithDecimalPoint = allowDecimal && rawValue.endsWith('.') && !rawValue.endsWith('..');
|
|
299
|
-
// Apply min/max validation only for complete numbers (not intermediate typing states)
|
|
300
|
-
// Allow intermediate values while typing (e.g., allow "1000" if max is 100, user might be typing "100")
|
|
301
|
-
let finalValue = valueAsNumber;
|
|
302
|
-
let finalRawValue = rawValue;
|
|
303
|
-
let shouldClamp = false;
|
|
304
|
-
// Only clamp if the value is complete (not ending with decimal point and not a single zero pattern)
|
|
305
|
-
if (!isSingleZero && !endsWithDecimalPoint) {
|
|
306
|
-
if (minValue !== undefined && finalValue < minValue) {
|
|
307
|
-
finalValue = minValue;
|
|
308
|
-
finalRawValue = minValue.toString();
|
|
309
|
-
shouldClamp = true;
|
|
310
|
-
}
|
|
311
|
-
if (maxValue !== undefined && finalValue > maxValue) {
|
|
312
|
-
finalValue = maxValue;
|
|
313
|
-
finalRawValue = maxValue.toString();
|
|
314
|
-
shouldClamp = true;
|
|
315
|
-
}
|
|
316
|
-
}
|
|
317
|
-
// If clamped, update rawInputValue
|
|
318
|
-
if (shouldClamp) {
|
|
319
|
-
setRawInputValue(finalRawValue);
|
|
320
|
-
}
|
|
321
|
-
// If it's a single zero pattern or ends with decimal point, use the raw value for display
|
|
322
|
-
if (isSingleZero || endsWithDecimalPoint) {
|
|
323
|
-
// Use the raw value as-is to preserve single "0" or trailing decimal point
|
|
324
|
-
onValueChange({
|
|
325
|
-
value: finalValue,
|
|
326
|
-
formattedValue: shouldClamp ? formatValue(finalValue) : rawValue,
|
|
327
|
-
});
|
|
328
|
-
return;
|
|
329
|
-
}
|
|
330
|
-
// Valid number without leading zeros - format and return
|
|
331
|
-
onValueChange({
|
|
332
|
-
value: finalValue,
|
|
333
|
-
formattedValue: formatValue(finalValue),
|
|
334
|
-
});
|
|
335
|
-
}, [
|
|
336
|
-
allowDecimal,
|
|
337
|
-
allowNegative,
|
|
338
|
-
maxLength,
|
|
339
|
-
onValueChange,
|
|
340
|
-
formatValue,
|
|
341
|
-
separator,
|
|
3
|
+
import { useNumericInput } from './use-numeric-input';
|
|
4
|
+
const NumericInput = ({ value, maxValue, minValue, separator, maxLength, className, maxDecimalPlaces, allowDecimal = false, allowNegative = false, onBlur, onValueChange, onCompositionEnd, onCompositionStart, ...props }) => {
|
|
5
|
+
const { inputRef, inputMode, displayValue, hasProcessedComposition, handleBlur, handleValueChange, handleCompositionEnd, handleCompositionStart, } = useNumericInput({
|
|
6
|
+
value,
|
|
342
7
|
minValue,
|
|
343
8
|
maxValue,
|
|
9
|
+
separator,
|
|
10
|
+
maxLength,
|
|
11
|
+
allowDecimal,
|
|
12
|
+
allowNegative,
|
|
344
13
|
maxDecimalPlaces,
|
|
345
|
-
]);
|
|
346
|
-
const handleCompositionStart = useCallback((e) => {
|
|
347
|
-
isComposing.current = true;
|
|
348
|
-
hasProcessedComposition.current = false;
|
|
349
|
-
// Store the current input value when composition starts
|
|
350
|
-
setComposingValue(e.currentTarget.value);
|
|
351
|
-
// Handle custom onCompositionStart
|
|
352
|
-
if (onCompositionStart) {
|
|
353
|
-
onCompositionStart(e);
|
|
354
|
-
}
|
|
355
|
-
}, [onCompositionStart]);
|
|
356
|
-
// Helper to process value after conversion (used in composition end and blur)
|
|
357
|
-
const processConvertedValue = useCallback((convertedValue) => {
|
|
358
|
-
if (allowNegative && convertedValue === '-') {
|
|
359
|
-
setRawInputValue('-');
|
|
360
|
-
onValueChange({
|
|
361
|
-
value: 0,
|
|
362
|
-
formattedValue: '-',
|
|
363
|
-
});
|
|
364
|
-
}
|
|
365
|
-
else {
|
|
366
|
-
handleValueChange(convertedValue, true);
|
|
367
|
-
}
|
|
368
|
-
}, [allowNegative, handleValueChange, onValueChange]);
|
|
369
|
-
const handleCompositionEnd = useCallback((e) => {
|
|
370
|
-
isComposing.current = false;
|
|
371
|
-
const finalValue = e.currentTarget.value;
|
|
372
|
-
setComposingValue('');
|
|
373
|
-
hasProcessedComposition.current = true;
|
|
374
|
-
if (onCompositionEnd) {
|
|
375
|
-
onCompositionEnd(e);
|
|
376
|
-
}
|
|
377
|
-
requestAnimationFrame(() => {
|
|
378
|
-
const convertedValue = convertFullWidthToHalfWidth(finalValue);
|
|
379
|
-
processConvertedValue(convertedValue);
|
|
380
|
-
hasProcessedComposition.current = false;
|
|
381
|
-
});
|
|
382
|
-
}, [onCompositionEnd, processConvertedValue]);
|
|
383
|
-
const handleBlur = useCallback((e) => {
|
|
384
|
-
const currentValue = e.target.value;
|
|
385
|
-
const shouldPreserveMinus = allowNegative && (isMinusSign(rawInputValue) || isMinusSign(currentValue));
|
|
386
|
-
// Handle composition states
|
|
387
|
-
if (isComposing.current) {
|
|
388
|
-
isComposing.current = false;
|
|
389
|
-
const convertedValue = convertFullWidthToHalfWidth(e.target.value);
|
|
390
|
-
setComposingValue('');
|
|
391
|
-
hasProcessedComposition.current = true;
|
|
392
|
-
processConvertedValue(convertedValue);
|
|
393
|
-
}
|
|
394
|
-
else if (composingValue !== '') {
|
|
395
|
-
const convertedValue = convertFullWidthToHalfWidth(composingValue);
|
|
396
|
-
processConvertedValue(convertedValue);
|
|
397
|
-
setComposingValue('');
|
|
398
|
-
}
|
|
399
|
-
else if (!hasProcessedComposition.current && e.target.value) {
|
|
400
|
-
const convertedValue = convertFullWidthToHalfWidth(e.target.value);
|
|
401
|
-
handleValueChange(convertedValue, true);
|
|
402
|
-
}
|
|
403
|
-
// Apply min/max validation on blur
|
|
404
|
-
if (rawInputValue !== '' && !(allowNegative && isMinusSign(rawInputValue))) {
|
|
405
|
-
const convertedValue = convertFullWidthToHalfWidth(rawInputValue);
|
|
406
|
-
const numValue = Number(convertedValue);
|
|
407
|
-
if (!Number.isNaN(numValue) && Number.isFinite(numValue)) {
|
|
408
|
-
let clampedValue = numValue;
|
|
409
|
-
let shouldUpdate = false;
|
|
410
|
-
if (minValue !== undefined && clampedValue < minValue) {
|
|
411
|
-
clampedValue = minValue;
|
|
412
|
-
shouldUpdate = true;
|
|
413
|
-
}
|
|
414
|
-
if (maxValue !== undefined && clampedValue > maxValue) {
|
|
415
|
-
clampedValue = maxValue;
|
|
416
|
-
shouldUpdate = true;
|
|
417
|
-
}
|
|
418
|
-
if (shouldUpdate) {
|
|
419
|
-
const clampedString = clampedValue.toString();
|
|
420
|
-
setRawInputValue(clampedString);
|
|
421
|
-
onValueChange({
|
|
422
|
-
value: clampedValue,
|
|
423
|
-
formattedValue: formatValue(clampedValue),
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
// Normalize minus sign to half-width if needed
|
|
429
|
-
if (shouldPreserveMinus && isMinusSign(rawInputValue) && rawInputValue !== '-') {
|
|
430
|
-
setRawInputValue('-');
|
|
431
|
-
onValueChange({
|
|
432
|
-
value: 0,
|
|
433
|
-
formattedValue: '-',
|
|
434
|
-
});
|
|
435
|
-
}
|
|
436
|
-
hasProcessedComposition.current = false;
|
|
437
|
-
if (onBlur) {
|
|
438
|
-
onBlur(e);
|
|
439
|
-
}
|
|
440
|
-
}, [
|
|
441
|
-
composingValue,
|
|
442
14
|
onBlur,
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
formatValue,
|
|
448
|
-
allowNegative,
|
|
449
|
-
processConvertedValue,
|
|
450
|
-
]);
|
|
451
|
-
// Reset rawInputValue when value prop changes externally (e.g., form reset)
|
|
452
|
-
useEffect(() => {
|
|
453
|
-
const numValue = parseValueProp(value, separator);
|
|
454
|
-
if (Number.isNaN(numValue)) {
|
|
455
|
-
// Preserve minus sign if allowNegative is true and user is typing
|
|
456
|
-
if (allowNegative && isMinusSign(rawInputValue)) {
|
|
457
|
-
return;
|
|
458
|
-
}
|
|
459
|
-
setRawInputValue('');
|
|
460
|
-
return;
|
|
461
|
-
}
|
|
462
|
-
// If the value is 0, preserve rawInputValue if it's a special pattern
|
|
463
|
-
if (numValue === 0) {
|
|
464
|
-
const isSingleZero = rawInputValue === '0' ||
|
|
465
|
-
rawInputValue === '-0' ||
|
|
466
|
-
isMinusSign(rawInputValue) ||
|
|
467
|
-
rawInputValue.startsWith('0.') ||
|
|
468
|
-
rawInputValue.startsWith('-0.');
|
|
469
|
-
// Check if rawInputValue is a negative number (preserve it when allowNegative is true)
|
|
470
|
-
if (allowNegative && rawInputValue !== '') {
|
|
471
|
-
const convertedRawValue = convertFullWidthToHalfWidth(rawInputValue);
|
|
472
|
-
const rawAsNumber = Number(convertedRawValue);
|
|
473
|
-
if (!Number.isNaN(rawAsNumber) &&
|
|
474
|
-
Number.isFinite(rawAsNumber) &&
|
|
475
|
-
rawAsNumber < 0) {
|
|
476
|
-
return;
|
|
477
|
-
}
|
|
478
|
-
}
|
|
479
|
-
if (!isSingleZero) {
|
|
480
|
-
setRawInputValue('0');
|
|
481
|
-
}
|
|
482
|
-
return;
|
|
483
|
-
}
|
|
484
|
-
// For non-zero values, check if the numeric value matches what we'd get from rawInputValue
|
|
485
|
-
if (rawInputValue !== '') {
|
|
486
|
-
// Preserve minus sign only if allowNegative is true
|
|
487
|
-
if (allowNegative && isMinusSign(rawInputValue)) {
|
|
488
|
-
return;
|
|
489
|
-
}
|
|
490
|
-
const convertedRawValue = convertFullWidthToHalfWidth(rawInputValue);
|
|
491
|
-
const rawAsNumber = Number(convertedRawValue);
|
|
492
|
-
if (allowNegative && convertedRawValue.startsWith('-')) {
|
|
493
|
-
if (rawAsNumber === numValue) {
|
|
494
|
-
return;
|
|
495
|
-
}
|
|
496
|
-
else if (numValue > 0 && Math.abs(rawAsNumber) === numValue) {
|
|
497
|
-
setRawInputValue('');
|
|
498
|
-
}
|
|
499
|
-
else {
|
|
500
|
-
return;
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
else if (rawAsNumber !== numValue) {
|
|
504
|
-
setRawInputValue('');
|
|
505
|
-
}
|
|
506
|
-
}
|
|
507
|
-
}, [value, separator, rawInputValue, allowNegative]);
|
|
508
|
-
// Format the display value
|
|
509
|
-
const displayValue = useMemo(() => {
|
|
510
|
-
if (composingValue !== '') {
|
|
511
|
-
return composingValue;
|
|
512
|
-
}
|
|
513
|
-
if (rawInputValue === '') {
|
|
514
|
-
const numValue = parseValueProp(value, separator);
|
|
515
|
-
if (Number.isNaN(numValue)) {
|
|
516
|
-
return '';
|
|
517
|
-
}
|
|
518
|
-
if (numValue === 0) {
|
|
519
|
-
return '0';
|
|
520
|
-
}
|
|
521
|
-
if (Number.isFinite(numValue)) {
|
|
522
|
-
return formatValue(numValue);
|
|
523
|
-
}
|
|
524
|
-
return '';
|
|
525
|
-
}
|
|
526
|
-
if (rawInputValue !== '') {
|
|
527
|
-
const isSingleZero = rawInputValue === '0' ||
|
|
528
|
-
rawInputValue === '-0' ||
|
|
529
|
-
rawInputValue.startsWith('0.') ||
|
|
530
|
-
rawInputValue.startsWith('-0.');
|
|
531
|
-
const isMinusOnly = allowNegative && isMinusSign(rawInputValue);
|
|
532
|
-
const endsWithDecimalPoint = allowDecimal &&
|
|
533
|
-
rawInputValue.endsWith('.') &&
|
|
534
|
-
!rawInputValue.endsWith('..');
|
|
535
|
-
if (isSingleZero || isMinusOnly || endsWithDecimalPoint) {
|
|
536
|
-
return normalizeMinusSign(rawInputValue);
|
|
537
|
-
}
|
|
538
|
-
const rawAsNumber = Number(rawInputValue);
|
|
539
|
-
if (!Number.isNaN(rawAsNumber) && Number.isFinite(rawAsNumber)) {
|
|
540
|
-
return formatValue(rawAsNumber);
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
const numValue = parseValueProp(value, separator);
|
|
544
|
-
if (Number.isNaN(numValue) || !Number.isFinite(numValue)) {
|
|
545
|
-
return '';
|
|
546
|
-
}
|
|
547
|
-
return formatValue(numValue);
|
|
548
|
-
}, [value, formatValue, separator, composingValue, rawInputValue, allowNegative, allowDecimal]);
|
|
549
|
-
// Determine appropriate inputMode for mobile keyboards
|
|
550
|
-
const inputMode = allowDecimal ? 'decimal' : 'numeric';
|
|
15
|
+
onValueChange,
|
|
16
|
+
onCompositionEnd,
|
|
17
|
+
onCompositionStart,
|
|
18
|
+
});
|
|
551
19
|
return (_jsx("input", { ref: inputRef, type: "text", inputMode: inputMode, value: displayValue, className: className, onCompositionEnd: handleCompositionEnd, onCompositionStart: handleCompositionStart, onBlur: handleBlur, onChange: (e) => {
|
|
552
20
|
// Skip onChange if we just processed composition to avoid duplicate processing
|
|
553
21
|
// This prevents duplicate when composition end and onChange fire in quick succession
|
|
@@ -556,6 +24,6 @@ function NumericInput({ value, className, separator, onValueChange, onCompositio
|
|
|
556
24
|
}
|
|
557
25
|
handleValueChange(e.target.value);
|
|
558
26
|
}, ...props }));
|
|
559
|
-
}
|
|
27
|
+
};
|
|
560
28
|
export { NumericInput };
|
|
561
29
|
//# sourceMappingURL=numeric-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numeric-input.js","sourceRoot":"","sources":["../src/numeric-input.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAIL,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAA;AAiBd;;;GAGG;AACH,MAAM,2BAA2B,GAAG,CAAC,GAAW,EAAU,EAAE;IAC1D,OAAO,GAAG;SACP,OAAO,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE;QAC1B,uDAAuD;QACvD,OAAO,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,CAAA;IACzD,CAAC,CAAC;SACD,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,kDAAkD;SACvE,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,iDAAiD;SACtE,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,yDAAyD;SAC9E,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,+EAA+E;SACpG,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA,CAAC,gEAAgE;AAC1F,CAAC,CAAA;AAED;;GAEG;AACH,MAAM,WAAW,GAAG,CAAC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;AAGrD,MAAM,YAAY,GAAG,CAAC,EACpB,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,SAAS,EACT,SAAS,EACT,gBAAgB,EAChB,YAAY,GAAG,KAAK,EACpB,aAAa,GAAG,KAAK,EACrB,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,GAAG,KAAK,EACU,EAAE,EAAE;IACtB,MAAM,EACJ,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,uBAAuB,EACvB,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,sBAAsB,GACvB,GAAG,eAAe,CAAC;QAClB,KAAK;QACL,QAAQ;QACR,QAAQ;QACR,SAAS;QACT,SAAS;QACT,YAAY;QACZ,aAAa;QACb,gBAAgB;QAChB,MAAM;QACN,aAAa;QACb,gBAAgB;QAChB,kBAAkB;KACnB,CAAC,CAAA;IAEF,OAAO,CACL,gBACE,GAAG,EAAE,QAAQ,EACb,IAAI,EAAC,MAAM,EACX,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,YAAY,EACnB,SAAS,EAAE,SAAS,EACpB,gBAAgB,EAAE,oBAAoB,EACtC,kBAAkB,EAAE,sBAAsB,EAC1C,MAAM,EAAE,UAAU,EAClB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;YACd,+EAA+E;YAC/E,qFAAqF;YACrF,IAAI,uBAAuB,CAAC,OAAO,EAAE,CAAC;gBACpC,OAAM;YACR,CAAC;YACD,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;QACnC,CAAC,KACG,KAAK,GACT,CACH,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|