intelliwaketssveltekitv25 0.1.143 → 0.1.144

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.
@@ -205,6 +205,7 @@ export declare function HandleKeyDownNumerics(event: KeyboardEvent, allowDecimal
205
205
  export type TInputNumberAttributes = Omit<HTMLInputAttributes, 'value' | 'this' | 'onchange' | 'use'> & {
206
206
  value: number | null;
207
207
  onchange?: (value: number | null) => void;
208
+ widthNumbers?: number;
208
209
  inputClass?: string;
209
210
  allowNegative?: boolean;
210
211
  use?: ActionArray;
@@ -30,6 +30,7 @@
30
30
  allowNegative,
31
31
  use = [],
32
32
  thisRef = $bindable<HTMLInputElement>(),
33
+ widthNumbers,
33
34
  ...otherProps
34
35
  }: TInputNumberAttributes = $props()
35
36
 
@@ -101,10 +102,15 @@
101
102
  !!useSuffix ? `padding-right: ${0.75 + (useSuffix.length * 0.5)}em;` : ''
102
103
  ].join(' ').trim())
103
104
 
105
+ let style = $derived(`${otherProps.style ?? ''} ${!widthNumbers ? '' :
106
+ `width: ${CleanNumbers(0, widthNumbers,
107
+ !usePrefix.length ? 0 : (0.75 + (usePrefix.length * 0.5)),
108
+ !useSuffix.length ? 0 : (0.75 + (useSuffix.length * 0.5)))}em;`}`.trim())
109
+
104
110
  // pattern={!!constrainDecimals ? "[0-9,]*[.,]?[0-9]+" : "[0-9,]*"}
105
111
  </script>
106
112
 
107
- <div class="inputAddOn relative h-fit {clazz}">
113
+ <div class="inputAddOn relative h-fit {clazz}" {style}>
108
114
  <input
109
115
  type="text"
110
116
  inputmode={!!constrainDecimals ? "decimal" : "numeric"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelliwaketssveltekitv25",
3
- "version": "0.1.143",
3
+ "version": "0.1.144",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",