@cloudparker/moldex.js 0.0.47 → 0.0.48
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/views/core/input/components/date-field/date-field.svelte +13 -5
- package/dist/views/core/input/components/date-field/date-field.svelte.d.ts +3 -1
- package/dist/views/core/input/components/text-field/text-field.svelte +9 -7
- package/dist/views/core/input/components/text-field/text-field.svelte.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import InputField, { type InputFieldPropsType } from '../input-field/input-field.svelte';
|
|
3
3
|
|
|
4
|
-
let {
|
|
4
|
+
let {
|
|
5
|
+
value = $bindable(null),
|
|
6
|
+
...props
|
|
7
|
+
}: InputFieldPropsType & { value?: Date | string | number | null | undefined } = $props();
|
|
5
8
|
|
|
6
9
|
let inputFieldRef: InputField | null = $state(null);
|
|
7
10
|
|
|
@@ -9,13 +12,18 @@
|
|
|
9
12
|
inputFieldRef?.focus();
|
|
10
13
|
}
|
|
11
14
|
|
|
12
|
-
export function getElement(){
|
|
15
|
+
export function getElement() {
|
|
13
16
|
return inputFieldRef;
|
|
14
17
|
}
|
|
15
18
|
|
|
16
|
-
export function select(){
|
|
17
|
-
|
|
19
|
+
export function select() {
|
|
20
|
+
inputFieldRef && inputFieldRef.select();
|
|
18
21
|
}
|
|
19
22
|
</script>
|
|
20
23
|
|
|
21
|
-
<InputField
|
|
24
|
+
<InputField
|
|
25
|
+
bind:this={inputFieldRef}
|
|
26
|
+
{...props}
|
|
27
|
+
type="date"
|
|
28
|
+
bind:value={value as Date | string | number | null | undefined}
|
|
29
|
+
/>
|
|
@@ -13,7 +13,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
13
13
|
};
|
|
14
14
|
z_$$bindings?: Bindings;
|
|
15
15
|
}
|
|
16
|
-
declare const DateField: $$__sveltets_2_IsomorphicComponent<InputFieldPropsType
|
|
16
|
+
declare const DateField: $$__sveltets_2_IsomorphicComponent<InputFieldPropsType & {
|
|
17
|
+
value?: Date | string | number | null | undefined;
|
|
18
|
+
}, {
|
|
17
19
|
[evt: string]: CustomEvent<any>;
|
|
18
20
|
}, {}, {
|
|
19
21
|
focus: () => void;
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import InputField, {
|
|
3
|
-
type InputFieldPropsType,
|
|
4
|
-
} from '../input-field/input-field.svelte';
|
|
2
|
+
import InputField, { type InputFieldPropsType } from '../input-field/input-field.svelte';
|
|
5
3
|
|
|
6
|
-
let {
|
|
4
|
+
let {
|
|
5
|
+
maxlength,
|
|
6
|
+
value = $bindable(''),
|
|
7
|
+
...props
|
|
8
|
+
}: InputFieldPropsType & { value?: string | null | undefined } = $props();
|
|
7
9
|
let inputFieldRef: InputField | null = $state(null);
|
|
8
10
|
|
|
9
11
|
export function focus() {
|
|
10
12
|
inputFieldRef?.focus();
|
|
11
13
|
}
|
|
12
14
|
|
|
13
|
-
export function getElement(){
|
|
15
|
+
export function getElement() {
|
|
14
16
|
return inputFieldRef;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
|
-
export function select(){
|
|
19
|
+
export function select() {
|
|
18
20
|
return inputFieldRef && inputFieldRef.select();
|
|
19
21
|
}
|
|
20
22
|
</script>
|
|
21
23
|
|
|
22
24
|
<InputField
|
|
23
25
|
{...props}
|
|
24
|
-
bind:value
|
|
26
|
+
bind:value={value as string | null | undefined}
|
|
25
27
|
bind:this={inputFieldRef}
|
|
26
28
|
type="text"
|
|
27
29
|
maxlength={maxlength || 200}
|
|
@@ -13,7 +13,9 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
13
13
|
};
|
|
14
14
|
z_$$bindings?: Bindings;
|
|
15
15
|
}
|
|
16
|
-
declare const TextField: $$__sveltets_2_IsomorphicComponent<InputFieldPropsType
|
|
16
|
+
declare const TextField: $$__sveltets_2_IsomorphicComponent<InputFieldPropsType & {
|
|
17
|
+
value?: string | null | undefined;
|
|
18
|
+
}, {
|
|
17
19
|
[evt: string]: CustomEvent<any>;
|
|
18
20
|
}, {}, {
|
|
19
21
|
focus: () => void;
|