intelliwaketssveltekitv25 0.1.120 → 0.1.121

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.
@@ -202,7 +202,7 @@ export declare function IsMobileOrTablet(): boolean;
202
202
  */
203
203
  export declare function DownloadString(filename: string, text: string): void;
204
204
  export declare function HandleKeyDownNumerics(event: KeyboardEvent, allowDecimals?: boolean, allowNegative?: boolean): void;
205
- export type TInputNumberAttributes = Omit<HTMLInputAttributes, 'value' | 'this' | 'onchange' | 'min' | 'max' | 'use'> & {
205
+ export type TInputNumberAttributes = Omit<HTMLInputAttributes, 'value' | 'this' | 'onchange' | 'use'> & {
206
206
  value: number | null;
207
207
  onchange?: (value: number | null) => void;
208
208
  inputClass?: string;
@@ -25,6 +25,8 @@
25
25
  nullDash,
26
26
  prefix,
27
27
  suffix,
28
+ min,
29
+ max,
28
30
  allowNegative,
29
31
  use = [],
30
32
  thisRef = $bindable<HTMLInputElement>(),
@@ -84,13 +86,10 @@
84
86
  if (onchange) onchange(numericValue)
85
87
  } else if (!isNaN(numericValue)) {
86
88
  numericValue /= displayMultiplier
87
-
88
- let maxAt = CleanNumberNull(fixedDecimals ?? minDecimals)
89
- if (maxAt !== null) numericValue = Math.max(numericValue, maxAt)
90
-
91
- let minAt = CleanNumberNull(fixedDecimals ?? maxAt)
92
- if (minAt !== null) numericValue = Math.min(numericValue, minAt)
93
-
89
+ const useMin = CleanNumberNull(min)
90
+ if (useMin !== null) numericValue = Math.max(numericValue, useMin)
91
+ const useMax = CleanNumberNull(max)
92
+ if (useMax !== null) numericValue = Math.min(numericValue, useMax)
94
93
  value = CleanNumber(numericValue, useDecimals)
95
94
 
96
95
  if (onchange) onchange(numericValue)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelliwaketssveltekitv25",
3
- "version": "0.1.120",
3
+ "version": "0.1.121",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",