numeric-input-react 1.0.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.
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/numeric-input.d.ts +14 -0
- package/dist/numeric-input.d.ts.map +1 -0
- package/dist/numeric-input.js +371 -0
- package/dist/numeric-input.js.map +1 -0
- package/package.json +29 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ComponentProps } from 'react';
|
|
2
|
+
type ValueObject = {
|
|
3
|
+
value: number;
|
|
4
|
+
formattedValue: string;
|
|
5
|
+
};
|
|
6
|
+
type Props = ComponentProps<'input'> & {
|
|
7
|
+
onValueChange: (valueObject: ValueObject) => void;
|
|
8
|
+
separator?: string;
|
|
9
|
+
allowDecimal?: boolean;
|
|
10
|
+
allowNegative?: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare function NumericInput({ value, className, separator, onValueChange, onCompositionStart, onCompositionEnd, onBlur, maxLength, allowDecimal, allowNegative, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export { NumericInput };
|
|
14
|
+
//# sourceMappingURL=numeric-input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"numeric-input.d.ts","sourceRoot":"","sources":["../src/numeric-input.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EAQpB,MAAM,OAAO,CAAA;AAEd,KAAK,WAAW,GAAG;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,KAAK,KAAK,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG;IACrC,aAAa,EAAE,CAAC,WAAW,EAAE,WAAW,KAAK,IAAI,CAAA;IACjD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AA+ED,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,SAAS,EACT,SAAS,EACT,aAAa,EACb,kBAAkB,EAClB,gBAAgB,EAChB,MAAM,EACN,SAAS,EACT,YAAoB,EACpB,aAAqB,EACrB,GAAG,KAAK,EACT,EAAE,KAAK,2CAqXP;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Converts full-width Japanese characters to half-width equivalents
|
|
6
|
+
* Supports: numbers (0-9), period (.), comma (,), minus (-)
|
|
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 (-) to half-width (-)
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Normalizes the input string by removing invalid characters
|
|
20
|
+
* and ensuring proper decimal point handling
|
|
21
|
+
*/
|
|
22
|
+
const normalizeNumericInput = (input, allowDecimal, allowNegative, maxLength) => {
|
|
23
|
+
let normalized = input;
|
|
24
|
+
// Remove all characters except digits, decimal point, and optionally minus sign
|
|
25
|
+
const allowedChars = allowDecimal
|
|
26
|
+
? allowNegative
|
|
27
|
+
? /[^0-9.\-]/g
|
|
28
|
+
: /[^0-9.]/g
|
|
29
|
+
: allowNegative
|
|
30
|
+
? /[^0-9\-]/g
|
|
31
|
+
: /[^0-9]/g;
|
|
32
|
+
normalized = normalized.replace(allowedChars, '');
|
|
33
|
+
// Handle negative sign: only allow at the start
|
|
34
|
+
if (allowNegative) {
|
|
35
|
+
const minusCount = (normalized.match(/-/g) || []).length;
|
|
36
|
+
if (minusCount > 1) {
|
|
37
|
+
// Keep only the first minus sign
|
|
38
|
+
normalized = normalized.replace(/-/g, (match, offset) => {
|
|
39
|
+
return offset === 0 ? match : '';
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
// If minus is not at the start, move it to the start
|
|
43
|
+
if (normalized.includes('-') && !normalized.startsWith('-')) {
|
|
44
|
+
normalized = `-${normalized.replace(/-/g, '')}`;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
normalized = normalized.replace(/-/g, '');
|
|
49
|
+
}
|
|
50
|
+
// Handle decimal point: only allow one, and only if decimals are allowed
|
|
51
|
+
if (allowDecimal) {
|
|
52
|
+
const decimalCount = (normalized.match(/\./g) || []).length;
|
|
53
|
+
if (decimalCount > 1) {
|
|
54
|
+
// Keep only the first decimal point
|
|
55
|
+
const firstDecimalIndex = normalized.indexOf('.');
|
|
56
|
+
normalized =
|
|
57
|
+
normalized.slice(0, firstDecimalIndex + 1) +
|
|
58
|
+
normalized.slice(firstDecimalIndex + 1).replace(/\./g, '');
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
normalized = normalized.replace(/\./g, '');
|
|
63
|
+
}
|
|
64
|
+
// Apply maxLength if specified
|
|
65
|
+
if (maxLength && normalized.length > maxLength) {
|
|
66
|
+
normalized = normalized.slice(0, maxLength);
|
|
67
|
+
}
|
|
68
|
+
return normalized;
|
|
69
|
+
};
|
|
70
|
+
function NumericInput({ value, className, separator, onValueChange, onCompositionStart, onCompositionEnd, onBlur, maxLength, allowDecimal = false, allowNegative = false, ...props }) {
|
|
71
|
+
const isComposing = useRef(false);
|
|
72
|
+
const inputRef = useRef(null);
|
|
73
|
+
// Store the raw input value during IME composition
|
|
74
|
+
const [composingValue, setComposingValue] = useState('');
|
|
75
|
+
// Track if we've already processed the value from composition end
|
|
76
|
+
const hasProcessedComposition = useRef(false);
|
|
77
|
+
// Store the raw input string to preserve leading zeros
|
|
78
|
+
const [rawInputValue, setRawInputValue] = useState('');
|
|
79
|
+
const formatValue = useCallback((numValue) => {
|
|
80
|
+
if (Number.isNaN(numValue) || !Number.isFinite(numValue)) {
|
|
81
|
+
return '';
|
|
82
|
+
}
|
|
83
|
+
const valueStr = numValue.toString();
|
|
84
|
+
// If no separator, return as is
|
|
85
|
+
if (!separator) {
|
|
86
|
+
return valueStr;
|
|
87
|
+
}
|
|
88
|
+
// Split into integer and decimal parts
|
|
89
|
+
const [integerPart, decimalPart] = valueStr.split('.');
|
|
90
|
+
// Format integer part with separator (thousands separator)
|
|
91
|
+
const formattedInteger = integerPart?.replace(/\B(?=(\d{3})+(?!\d))/g, separator);
|
|
92
|
+
// Combine with decimal part if exists
|
|
93
|
+
return decimalPart !== undefined
|
|
94
|
+
? `${formattedInteger}.${decimalPart}`
|
|
95
|
+
: formattedInteger ?? '';
|
|
96
|
+
}, [separator]);
|
|
97
|
+
const handleValueChange = useCallback((inputValue, skipCompositionCheck = false) => {
|
|
98
|
+
// During IME composition, update the composing value for display
|
|
99
|
+
if (!skipCompositionCheck && isComposing.current) {
|
|
100
|
+
setComposingValue(inputValue);
|
|
101
|
+
setRawInputValue(inputValue);
|
|
102
|
+
// Still notify parent but don't process the value
|
|
103
|
+
onValueChange({
|
|
104
|
+
value: 0,
|
|
105
|
+
formattedValue: inputValue,
|
|
106
|
+
});
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
// Convert full-width Japanese characters to half-width
|
|
110
|
+
let rawValue = convertFullWidthToHalfWidth(inputValue);
|
|
111
|
+
// Normalize the input (remove invalid chars, handle decimals, negatives)
|
|
112
|
+
rawValue = normalizeNumericInput(rawValue, allowDecimal, allowNegative, maxLength);
|
|
113
|
+
// Handle empty input first (before processing leading zeros)
|
|
114
|
+
if (rawValue === '' || rawValue === '-') {
|
|
115
|
+
setRawInputValue('');
|
|
116
|
+
onValueChange({
|
|
117
|
+
value: 0,
|
|
118
|
+
formattedValue: '',
|
|
119
|
+
});
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
// Remove leading zeros except for single "0" or "0." patterns
|
|
123
|
+
// Only allow "0", "-0", "0.", "-0." to keep leading zero
|
|
124
|
+
// For cases like "01", "0123", "09999", "00.1" → remove leading zeros
|
|
125
|
+
const shouldKeepSingleZero = rawValue === '0' ||
|
|
126
|
+
rawValue === '-0' ||
|
|
127
|
+
rawValue === '0.' ||
|
|
128
|
+
rawValue === '-0.';
|
|
129
|
+
if (!shouldKeepSingleZero) {
|
|
130
|
+
// Remove leading zeros (but keep the minus sign if present)
|
|
131
|
+
if (rawValue.startsWith('-')) {
|
|
132
|
+
const withoutMinus = rawValue.slice(1);
|
|
133
|
+
// Split by decimal point to handle cases like "00.1"
|
|
134
|
+
if (withoutMinus.includes('.')) {
|
|
135
|
+
const [integerPart, decimalPart] = withoutMinus.split('.');
|
|
136
|
+
const cleanedInteger = integerPart?.replace(/^0+/, '');
|
|
137
|
+
// If cleanedInteger is empty and there's a decimal part, keep "0"
|
|
138
|
+
if (cleanedInteger === '' && decimalPart) {
|
|
139
|
+
rawValue = `-0.${decimalPart}`;
|
|
140
|
+
}
|
|
141
|
+
else if (cleanedInteger === '') {
|
|
142
|
+
rawValue = '-0';
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
rawValue = `-${cleanedInteger}.${decimalPart}`;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
const withoutLeadingZeros = withoutMinus.replace(/^0+/, '');
|
|
150
|
+
rawValue =
|
|
151
|
+
withoutLeadingZeros === '' ? '-0' : `-${withoutLeadingZeros}`;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
// Split by decimal point to handle cases like "00.1"
|
|
156
|
+
if (rawValue.includes('.')) {
|
|
157
|
+
const [integerPart, decimalPart] = rawValue.split('.');
|
|
158
|
+
const cleanedInteger = integerPart?.replace(/^0+/, '');
|
|
159
|
+
// If cleanedInteger is empty and there's a decimal part, keep "0"
|
|
160
|
+
if (cleanedInteger === '' && decimalPart) {
|
|
161
|
+
rawValue = `0.${decimalPart}`;
|
|
162
|
+
}
|
|
163
|
+
else if (cleanedInteger === '') {
|
|
164
|
+
rawValue = '0';
|
|
165
|
+
}
|
|
166
|
+
else {
|
|
167
|
+
rawValue = `${cleanedInteger}.${decimalPart}`;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
else {
|
|
171
|
+
const cleaned = rawValue.replace(/^0+/, '');
|
|
172
|
+
rawValue = cleaned === '' ? '0' : cleaned;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
// Store the raw input value to preserve single "0" only
|
|
177
|
+
setRawInputValue(rawValue);
|
|
178
|
+
// Convert to number
|
|
179
|
+
const valueAsNumber = Number(rawValue);
|
|
180
|
+
// Handle invalid numbers
|
|
181
|
+
if (Number.isNaN(valueAsNumber) || !Number.isFinite(valueAsNumber)) {
|
|
182
|
+
setRawInputValue('');
|
|
183
|
+
onValueChange({
|
|
184
|
+
value: 0,
|
|
185
|
+
formattedValue: '',
|
|
186
|
+
});
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
// Handle value exceeding MAX_SAFE_INTEGER
|
|
190
|
+
if (Math.abs(valueAsNumber) > Number.MAX_SAFE_INTEGER) {
|
|
191
|
+
const clampedValue = valueAsNumber > 0 ? Number.MAX_SAFE_INTEGER : -Number.MAX_SAFE_INTEGER;
|
|
192
|
+
const clampedString = clampedValue.toString();
|
|
193
|
+
setRawInputValue(clampedString);
|
|
194
|
+
onValueChange({
|
|
195
|
+
value: clampedValue,
|
|
196
|
+
formattedValue: formatValue(clampedValue),
|
|
197
|
+
});
|
|
198
|
+
return;
|
|
199
|
+
}
|
|
200
|
+
// Only preserve single "0" or "0." patterns (not multiple leading zeros like "01", "0123")
|
|
201
|
+
const isSingleZero = rawValue === '0' ||
|
|
202
|
+
rawValue === '-0' ||
|
|
203
|
+
rawValue.startsWith('0.') ||
|
|
204
|
+
rawValue.startsWith('-0.');
|
|
205
|
+
// If it's a single zero pattern, use the raw value for display
|
|
206
|
+
if (isSingleZero) {
|
|
207
|
+
// Use the raw value as-is to preserve single "0"
|
|
208
|
+
onValueChange({
|
|
209
|
+
value: valueAsNumber,
|
|
210
|
+
formattedValue: rawValue,
|
|
211
|
+
});
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
// Valid number without leading zeros - format and return
|
|
215
|
+
onValueChange({
|
|
216
|
+
value: valueAsNumber,
|
|
217
|
+
formattedValue: formatValue(valueAsNumber),
|
|
218
|
+
});
|
|
219
|
+
}, [
|
|
220
|
+
allowDecimal,
|
|
221
|
+
allowNegative,
|
|
222
|
+
maxLength,
|
|
223
|
+
onValueChange,
|
|
224
|
+
formatValue,
|
|
225
|
+
separator,
|
|
226
|
+
]);
|
|
227
|
+
const handleCompositionStart = useCallback((e) => {
|
|
228
|
+
isComposing.current = true;
|
|
229
|
+
hasProcessedComposition.current = false;
|
|
230
|
+
// Store the current input value when composition starts
|
|
231
|
+
setComposingValue(e.currentTarget.value);
|
|
232
|
+
// Handle custom onCompositionStart
|
|
233
|
+
if (onCompositionStart) {
|
|
234
|
+
onCompositionStart(e);
|
|
235
|
+
}
|
|
236
|
+
}, [onCompositionStart]);
|
|
237
|
+
const handleCompositionEnd = useCallback((e) => {
|
|
238
|
+
isComposing.current = false;
|
|
239
|
+
const finalValue = e.currentTarget.value;
|
|
240
|
+
// Clear the composing value
|
|
241
|
+
setComposingValue('');
|
|
242
|
+
// Mark that we've processed composition to prevent duplicate processing in onChange
|
|
243
|
+
hasProcessedComposition.current = true;
|
|
244
|
+
// Handle custom onCompositionEnd
|
|
245
|
+
if (onCompositionEnd) {
|
|
246
|
+
onCompositionEnd(e);
|
|
247
|
+
}
|
|
248
|
+
// Process the value after composition ends
|
|
249
|
+
// Use requestAnimationFrame to ensure it happens after any pending onChange events
|
|
250
|
+
requestAnimationFrame(() => {
|
|
251
|
+
handleValueChange(finalValue, true);
|
|
252
|
+
// Reset flag after processing
|
|
253
|
+
hasProcessedComposition.current = false;
|
|
254
|
+
});
|
|
255
|
+
}, [onCompositionEnd, handleValueChange]);
|
|
256
|
+
const handleBlur = useCallback((e) => {
|
|
257
|
+
// If still composing when blur happens, force end composition
|
|
258
|
+
if (isComposing.current) {
|
|
259
|
+
isComposing.current = false;
|
|
260
|
+
const finalValue = e.target.value;
|
|
261
|
+
setComposingValue('');
|
|
262
|
+
hasProcessedComposition.current = true;
|
|
263
|
+
// Process the value immediately
|
|
264
|
+
handleValueChange(finalValue, true);
|
|
265
|
+
}
|
|
266
|
+
else if (composingValue !== '') {
|
|
267
|
+
// If there's a composing value but not composing, process it
|
|
268
|
+
handleValueChange(composingValue, true);
|
|
269
|
+
setComposingValue('');
|
|
270
|
+
}
|
|
271
|
+
else if (!hasProcessedComposition.current && e.target.value) {
|
|
272
|
+
// If we haven't processed composition and there's a value, process it
|
|
273
|
+
handleValueChange(e.target.value, true);
|
|
274
|
+
}
|
|
275
|
+
// Reset the flag
|
|
276
|
+
hasProcessedComposition.current = false;
|
|
277
|
+
// Call custom onBlur if provided
|
|
278
|
+
if (onBlur) {
|
|
279
|
+
onBlur(e);
|
|
280
|
+
}
|
|
281
|
+
}, [composingValue, onBlur, handleValueChange]);
|
|
282
|
+
// Reset rawInputValue when value prop changes externally (e.g., form reset)
|
|
283
|
+
useEffect(() => {
|
|
284
|
+
if (value === null || value === undefined || value === '') {
|
|
285
|
+
setRawInputValue('');
|
|
286
|
+
return;
|
|
287
|
+
}
|
|
288
|
+
// Convert value to number if it's a string
|
|
289
|
+
const numValue = typeof value === 'string'
|
|
290
|
+
? Number(value.replace(new RegExp(`[${separator || ''}]`, 'g'), ''))
|
|
291
|
+
: Number(value);
|
|
292
|
+
// If the value is 0, only preserve rawInputValue if it's "0", "-0", "0.", or "-0."
|
|
293
|
+
if (numValue === 0) {
|
|
294
|
+
const isSingleZero = rawInputValue === '0' ||
|
|
295
|
+
rawInputValue === '-0' ||
|
|
296
|
+
rawInputValue.startsWith('0.') ||
|
|
297
|
+
rawInputValue.startsWith('-0.');
|
|
298
|
+
if (!isSingleZero) {
|
|
299
|
+
setRawInputValue('');
|
|
300
|
+
}
|
|
301
|
+
return;
|
|
302
|
+
}
|
|
303
|
+
// For non-zero values, check if the numeric value matches what we'd get from rawInputValue
|
|
304
|
+
if (rawInputValue !== '') {
|
|
305
|
+
const rawAsNumber = Number(rawInputValue);
|
|
306
|
+
if (rawAsNumber !== numValue) {
|
|
307
|
+
// Value changed externally, clear rawInputValue
|
|
308
|
+
setRawInputValue('');
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
}, [value, separator, rawInputValue]);
|
|
312
|
+
// Format the display value
|
|
313
|
+
const displayValue = useMemo(() => {
|
|
314
|
+
// If currently composing, use the composing value (this allows IME input to display)
|
|
315
|
+
if (composingValue !== '') {
|
|
316
|
+
return composingValue;
|
|
317
|
+
}
|
|
318
|
+
// If rawInputValue is empty, don't show "0" even if value is 0
|
|
319
|
+
// This handles the case when user deletes "0" by backspace
|
|
320
|
+
if (rawInputValue === '') {
|
|
321
|
+
if (value === null || value === undefined || value === '') {
|
|
322
|
+
return '';
|
|
323
|
+
}
|
|
324
|
+
// Convert value to number if it's a string
|
|
325
|
+
const numValue = typeof value === 'string'
|
|
326
|
+
? Number(value.replace(new RegExp(`[${separator || ''}]`, 'g'), ''))
|
|
327
|
+
: Number(value);
|
|
328
|
+
// If value is 0 and rawInputValue is empty, don't show anything
|
|
329
|
+
if (numValue === 0) {
|
|
330
|
+
return '';
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
// If we have a raw input value with single zero, use it for display
|
|
334
|
+
if (rawInputValue !== '') {
|
|
335
|
+
const isSingleZero = rawInputValue === '0' ||
|
|
336
|
+
rawInputValue === '-0' ||
|
|
337
|
+
rawInputValue.startsWith('0.') ||
|
|
338
|
+
rawInputValue.startsWith('-0.');
|
|
339
|
+
if (isSingleZero) {
|
|
340
|
+
return rawInputValue;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
if (value === null || value === undefined || value === '') {
|
|
344
|
+
return '';
|
|
345
|
+
}
|
|
346
|
+
// Convert value to number if it's a string
|
|
347
|
+
const numValue = typeof value === 'string'
|
|
348
|
+
? Number(value.replace(new RegExp(`[${separator || ''}]`, 'g'), ''))
|
|
349
|
+
: Number(value);
|
|
350
|
+
// Allow displaying "0" if rawInputValue is "0"
|
|
351
|
+
if (Number.isNaN(numValue)) {
|
|
352
|
+
return '';
|
|
353
|
+
}
|
|
354
|
+
// If the value is 0 and we don't have a raw input value, return empty
|
|
355
|
+
// But if rawInputValue is "0", we want to show "0"
|
|
356
|
+
if (numValue === 0 && rawInputValue !== '0') {
|
|
357
|
+
return '';
|
|
358
|
+
}
|
|
359
|
+
return formatValue(numValue);
|
|
360
|
+
}, [value, formatValue, separator, composingValue, rawInputValue]);
|
|
361
|
+
return (_jsx("input", { ref: inputRef, type: "text", value: displayValue, className: className, onCompositionEnd: handleCompositionEnd, onCompositionStart: handleCompositionStart, onBlur: handleBlur, onChange: (e) => {
|
|
362
|
+
// Skip onChange if we just processed composition to avoid duplicate processing
|
|
363
|
+
// This prevents duplicate when composition end and onChange fire in quick succession
|
|
364
|
+
if (hasProcessedComposition.current) {
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
handleValueChange(e.target.value);
|
|
368
|
+
}, ...props }));
|
|
369
|
+
}
|
|
370
|
+
export { NumericInput };
|
|
371
|
+
//# sourceMappingURL=numeric-input.js.map
|
|
@@ -0,0 +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;AAcd;;;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,CAAA,CAAC,iDAAiD;AAC3E,CAAC,CAAA;AAED;;;GAGG;AACH,MAAM,qBAAqB,GAAG,CAC5B,KAAa,EACb,YAAqB,EACrB,aAAsB,EACtB,SAAkB,EACV,EAAE;IACV,IAAI,UAAU,GAAG,KAAK,CAAA;IAEtB,gFAAgF;IAChF,MAAM,YAAY,GAAG,YAAY;QAC/B,CAAC,CAAC,aAAa;YACb,CAAC,CAAC,YAAY;YACd,CAAC,CAAC,UAAU;QACd,CAAC,CAAC,aAAa;YACb,CAAC,CAAC,WAAW;YACb,CAAC,CAAC,SAAS,CAAA;IAEf,UAAU,GAAG,UAAU,CAAC,OAAO,CAAC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AAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "numeric-input-react",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"import": "./dist/index.js"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "tsc -p tsconfig.build.json"
|
|
15
|
+
},
|
|
16
|
+
"files": ["dist"],
|
|
17
|
+
"keywords": [],
|
|
18
|
+
"author": "",
|
|
19
|
+
"license": "ISC",
|
|
20
|
+
"type": "module",
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"react": "^19.2.3"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/react": "^19.2.7",
|
|
26
|
+
"@types/react-dom": "^19.2.3",
|
|
27
|
+
"typescript": "^5.9.3"
|
|
28
|
+
}
|
|
29
|
+
}
|