intelliwaketssveltekitv25 0.1.82 → 0.1.84

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.
@@ -192,7 +192,7 @@ export declare function IsMobileOrTablet(): boolean;
192
192
  */
193
193
  export declare function DownloadString(filename: string, text: string): void;
194
194
  export declare function HandleKeyDownNumerics(event: KeyboardEvent, allowDecimals?: boolean): void;
195
- export type TInputNumberAttributes = HTMLInputAttributes & {
195
+ export type TInputNumberAttributes = Omit<HTMLInputAttributes, 'this'> & {
196
196
  value: number | null;
197
197
  onchange?: (value: number | null) => void;
198
198
  inputClass?: string;
@@ -204,4 +204,5 @@ export type TInputNumberAttributes = HTMLInputAttributes & {
204
204
  suffix?: string;
205
205
  shiftDigits?: number;
206
206
  use?: ActionArray;
207
+ thisRef?: HTMLInputElement;
207
208
  };
@@ -5,12 +5,14 @@
5
5
  let {
6
6
  value = $bindable(),
7
7
  decimals = 2,
8
+ thisRef = $bindable<HTMLInputElement>(),
8
9
  ...otherProps
9
10
  }: TInputNumberAttributes = $props()
10
11
 
11
12
  </script>
12
13
 
13
14
  <InputNumber bind:value
15
+ bind:thisRef
14
16
  {decimals}
15
17
  {...otherProps}
16
18
  prefix="$"
@@ -1,4 +1,4 @@
1
1
  import type { TInputNumberAttributes } from './Functions';
2
- declare const InputCurrency: import("svelte").Component<TInputNumberAttributes, {}, "value">;
2
+ declare const InputCurrency: import("svelte").Component<TInputNumberAttributes, {}, "value" | "thisRef">;
3
3
  type InputCurrency = ReturnType<typeof InputCurrency>;
4
4
  export default InputCurrency;
@@ -2,6 +2,7 @@
2
2
  import { CleanNumber, CleanNumberNull, CleanNumbers } from '@solidbasisventures/intelliwaketsfoundation'
3
3
  import { tick } from 'svelte'
4
4
  import { HandleKeyDownNumerics, type TInputNumberAttributes } from './Functions'
5
+ import { useActions } from './useActions'
5
6
 
6
7
  let {
7
8
  value = $bindable(),
@@ -15,6 +16,8 @@
15
16
  prefix,
16
17
  suffix,
17
18
  shiftDigits = 0,
19
+ use = [],
20
+ thisRef = $bindable<HTMLInputElement>(),
18
21
  ...otherProps
19
22
  }: TInputNumberAttributes = $props()
20
23
 
@@ -90,6 +93,8 @@
90
93
  if (otherProps.onblur) otherProps.onblur(e)
91
94
  }}
92
95
  bind:focused={isFocused}
96
+ use:useActions={use}
97
+ bind:this={thisRef}
93
98
  />
94
99
  {#if prefix}
95
100
  <div class="absolute pointer-events-none left-1 top-1/2 -translate-y-1/2">{prefix}</div>
@@ -1,4 +1,4 @@
1
1
  import { type TInputNumberAttributes } from './Functions';
2
- declare const InputNumber: import("svelte").Component<TInputNumberAttributes, {}, "value">;
2
+ declare const InputNumber: import("svelte").Component<TInputNumberAttributes, {}, "value" | "thisRef">;
3
3
  type InputNumber = ReturnType<typeof InputNumber>;
4
4
  export default InputNumber;
@@ -5,6 +5,7 @@
5
5
  let {
6
6
  value = $bindable(),
7
7
  decimals = 0,
8
+ thisRef = $bindable<HTMLInputElement>(),
8
9
  ...otherProps
9
10
  }: TInputNumberAttributes = $props()
10
11
 
@@ -12,6 +13,7 @@
12
13
 
13
14
  <InputNumber bind:value
14
15
  {decimals}
16
+ bind:thisRef
15
17
  {...otherProps}
16
18
  shiftDigits={2}
17
19
  suffix="%"
@@ -1,4 +1,4 @@
1
1
  import type { TInputNumberAttributes } from './Functions';
2
- declare const InputPercent: import("svelte").Component<TInputNumberAttributes, {}, "value">;
2
+ declare const InputPercent: import("svelte").Component<TInputNumberAttributes, {}, "value" | "thisRef">;
3
3
  type InputPercent = ReturnType<typeof InputPercent>;
4
4
  export default InputPercent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelliwaketssveltekitv25",
3
- "version": "0.1.82",
3
+ "version": "0.1.84",
4
4
  "exports": {
5
5
  ".": {
6
6
  "types": "./dist/index.d.ts",