@octanejs/base-ui 0.1.3 → 0.1.7
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 +10 -4
- package/src/field.ts +1 -1
- package/src/number-field.ts +4 -1
package/package.json
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/base-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"engines": {
|
|
7
|
+
"node": ">=22"
|
|
8
|
+
},
|
|
6
9
|
"octane": {
|
|
7
10
|
"hookSlots": {
|
|
8
11
|
"manual": [
|
|
@@ -38,8 +41,10 @@
|
|
|
38
41
|
"@floating-ui/utils": "^0.2.11",
|
|
39
42
|
"aria-hidden": "^1.2.6",
|
|
40
43
|
"tabbable": "^6.5.0",
|
|
41
|
-
"@octanejs/floating-ui": "0.1.
|
|
42
|
-
|
|
44
|
+
"@octanejs/floating-ui": "0.1.8"
|
|
45
|
+
},
|
|
46
|
+
"peerDependencies": {
|
|
47
|
+
"octane": "0.1.9"
|
|
43
48
|
},
|
|
44
49
|
"devDependencies": {
|
|
45
50
|
"@base-ui/react": "^1.6.0",
|
|
@@ -47,7 +52,8 @@
|
|
|
47
52
|
"esbuild": "^0.28.1",
|
|
48
53
|
"react": "^19.2.0",
|
|
49
54
|
"react-dom": "^19.2.0",
|
|
50
|
-
"vitest": "^4.1.9"
|
|
55
|
+
"vitest": "^4.1.9",
|
|
56
|
+
"octane": "0.1.9"
|
|
51
57
|
},
|
|
52
58
|
"scripts": {
|
|
53
59
|
"test": "vitest run"
|
package/src/field.ts
CHANGED
|
@@ -371,7 +371,7 @@ function FieldControl(props: any): any {
|
|
|
371
371
|
'aria-labelledby': labelId,
|
|
372
372
|
autoFocus: autoFocus || undefined,
|
|
373
373
|
...(isControlled ? { value } : { defaultValue }),
|
|
374
|
-
|
|
374
|
+
onInput(event: any) {
|
|
375
375
|
const inputValue = event.currentTarget.value;
|
|
376
376
|
onValueChange?.(inputValue, createChangeEventDetails(REASONS.none, event));
|
|
377
377
|
setDirty(inputValue !== validityData.initialValue);
|
package/src/number-field.ts
CHANGED
|
@@ -461,6 +461,9 @@ function NumberFieldRoot(props: any): any {
|
|
|
461
461
|
|
|
462
462
|
const hiddenInput = createElement('input', {
|
|
463
463
|
...hiddenInputProps,
|
|
464
|
+
// This form-facing control intentionally observes the native commit event;
|
|
465
|
+
// the visible text input above owns per-edit handling.
|
|
466
|
+
suppressNativeChangeWarning: true,
|
|
464
467
|
ref: hiddenInputRef,
|
|
465
468
|
type: 'number',
|
|
466
469
|
form,
|
|
@@ -648,7 +651,7 @@ function NumberFieldInput(props: any): any {
|
|
|
648
651
|
const canonicalText = formatNumber(committedValue, locale, formatOptions);
|
|
649
652
|
if (inputValue !== canonicalText) setInputValue(canonicalText);
|
|
650
653
|
},
|
|
651
|
-
|
|
654
|
+
onInput(event: any) {
|
|
652
655
|
if (event.defaultPrevented) return;
|
|
653
656
|
allowInputSyncRef.current = false;
|
|
654
657
|
const targetValue = event.currentTarget.value;
|