@zag-js/number-input 1.18.3 → 1.18.5

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.mts CHANGED
@@ -265,39 +265,39 @@ interface NumberInputApi<T extends PropTypes = PropTypes> {
265
265
  /**
266
266
  * Function to set the value of the input.
267
267
  */
268
- setValue(value: number): void;
268
+ setValue: (value: number) => void;
269
269
  /**
270
270
  * Function to clear the value of the input.
271
271
  */
272
- clearValue(): void;
272
+ clearValue: VoidFunction;
273
273
  /**
274
274
  * Function to increment the value of the input by the step.
275
275
  */
276
- increment(): void;
276
+ increment: VoidFunction;
277
277
  /**
278
278
  * Function to decrement the value of the input by the step.
279
279
  */
280
- decrement(): void;
280
+ decrement: VoidFunction;
281
281
  /**
282
282
  * Function to set the value of the input to the max.
283
283
  */
284
- setToMax(): void;
284
+ setToMax: VoidFunction;
285
285
  /**
286
286
  * Function to set the value of the input to the min.
287
287
  */
288
- setToMin(): void;
288
+ setToMin: VoidFunction;
289
289
  /**
290
290
  * Function to focus the input.
291
291
  */
292
- focus(): void;
293
- getRootProps(): T["element"];
294
- getLabelProps(): T["label"];
295
- getControlProps(): T["element"];
296
- getValueTextProps(): T["element"];
297
- getInputProps(): T["input"];
298
- getDecrementTriggerProps(): T["button"];
299
- getIncrementTriggerProps(): T["button"];
300
- getScrubberProps(): T["element"];
292
+ focus: VoidFunction;
293
+ getRootProps: () => T["element"];
294
+ getLabelProps: () => T["label"];
295
+ getControlProps: () => T["element"];
296
+ getValueTextProps: () => T["element"];
297
+ getInputProps: () => T["input"];
298
+ getDecrementTriggerProps: () => T["button"];
299
+ getIncrementTriggerProps: () => T["button"];
300
+ getScrubberProps: () => T["element"];
301
301
  }
302
302
 
303
303
  declare function connect<T extends PropTypes>(service: NumberInputService, normalize: NormalizeProps<T>): NumberInputApi<T>;
package/dist/index.d.ts CHANGED
@@ -265,39 +265,39 @@ interface NumberInputApi<T extends PropTypes = PropTypes> {
265
265
  /**
266
266
  * Function to set the value of the input.
267
267
  */
268
- setValue(value: number): void;
268
+ setValue: (value: number) => void;
269
269
  /**
270
270
  * Function to clear the value of the input.
271
271
  */
272
- clearValue(): void;
272
+ clearValue: VoidFunction;
273
273
  /**
274
274
  * Function to increment the value of the input by the step.
275
275
  */
276
- increment(): void;
276
+ increment: VoidFunction;
277
277
  /**
278
278
  * Function to decrement the value of the input by the step.
279
279
  */
280
- decrement(): void;
280
+ decrement: VoidFunction;
281
281
  /**
282
282
  * Function to set the value of the input to the max.
283
283
  */
284
- setToMax(): void;
284
+ setToMax: VoidFunction;
285
285
  /**
286
286
  * Function to set the value of the input to the min.
287
287
  */
288
- setToMin(): void;
288
+ setToMin: VoidFunction;
289
289
  /**
290
290
  * Function to focus the input.
291
291
  */
292
- focus(): void;
293
- getRootProps(): T["element"];
294
- getLabelProps(): T["label"];
295
- getControlProps(): T["element"];
296
- getValueTextProps(): T["element"];
297
- getInputProps(): T["input"];
298
- getDecrementTriggerProps(): T["button"];
299
- getIncrementTriggerProps(): T["button"];
300
- getScrubberProps(): T["element"];
292
+ focus: VoidFunction;
293
+ getRootProps: () => T["element"];
294
+ getLabelProps: () => T["label"];
295
+ getControlProps: () => T["element"];
296
+ getValueTextProps: () => T["element"];
297
+ getInputProps: () => T["input"];
298
+ getDecrementTriggerProps: () => T["button"];
299
+ getIncrementTriggerProps: () => T["button"];
300
+ getScrubberProps: () => T["element"];
301
301
  }
302
302
 
303
303
  declare function connect<T extends PropTypes>(service: NumberInputService, normalize: NormalizeProps<T>): NumberInputApi<T>;
package/dist/index.js CHANGED
@@ -431,7 +431,7 @@ var machine = createMachine({
431
431
  clampValueOnBlur: !props2.allowOverflow,
432
432
  allowOverflow: false,
433
433
  inputMode: "decimal",
434
- pattern: "[0-9]*(.[0-9]+)?",
434
+ pattern: "-?[0-9]*(.[0-9]+)?",
435
435
  defaultValue: "",
436
436
  step,
437
437
  min: Number.MIN_SAFE_INTEGER,
package/dist/index.mjs CHANGED
@@ -429,7 +429,7 @@ var machine = createMachine({
429
429
  clampValueOnBlur: !props2.allowOverflow,
430
430
  allowOverflow: false,
431
431
  inputMode: "decimal",
432
- pattern: "[0-9]*(.[0-9]+)?",
432
+ pattern: "-?[0-9]*(.[0-9]+)?",
433
433
  defaultValue: "",
434
434
  step,
435
435
  min: Number.MIN_SAFE_INTEGER,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/number-input",
3
- "version": "1.18.3",
3
+ "version": "1.18.5",
4
4
  "description": "Core logic for the number-input widget implemented as a state machine",
5
5
  "keywords": [
6
6
  "js",
@@ -27,11 +27,11 @@
27
27
  },
28
28
  "dependencies": {
29
29
  "@internationalized/number": "3.6.3",
30
- "@zag-js/anatomy": "1.18.3",
31
- "@zag-js/core": "1.18.3",
32
- "@zag-js/dom-query": "1.18.3",
33
- "@zag-js/types": "1.18.3",
34
- "@zag-js/utils": "1.18.3"
30
+ "@zag-js/anatomy": "1.18.5",
31
+ "@zag-js/core": "1.18.5",
32
+ "@zag-js/dom-query": "1.18.5",
33
+ "@zag-js/types": "1.18.5",
34
+ "@zag-js/utils": "1.18.5"
35
35
  },
36
36
  "devDependencies": {
37
37
  "clean-package": "2.2.0"