File size: 4,582 Bytes
bc20498
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
/// <reference types="svelte" />
import type { MeltActionReturn } from '../../internal/types.js';
import type { PinInputEvents } from './events.js';
import type { CreatePinInputProps } from './types.js';
export declare const pinInputIdParts: readonly ["root"];
export type PinInputIdParts = typeof pinInputIdParts;
export declare function createPinInput(props?: CreatePinInputProps): {
    ids: import("../../internal/helpers/index.js").ToWritableStores<{
        root: string;
    }>;
    elements: {
        root: import("../../internal/helpers/index.js").MeltElement<[{
            update: (updater: import("svelte/store").Updater<string[]>, sideEffect?: ((newValue: string[]) => void) | undefined) => void;
            set: (this: void, value: string[]) => void;
            subscribe(this: void, run: import("svelte/store").Subscriber<string[]>, invalidate?: import("svelte/store").Invalidator<string[]> | undefined): import("svelte/store").Unsubscriber;
            get: () => string[];
            destroy?: (() => void) | undefined;
        }, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<string>>], import("svelte/action").Action<any, any, Record<never, any>>, ([$value, $rootId]: [string[], string]) => {
            id: string;
            'data-complete': string | undefined;
        }, string>;
        input: import("../../internal/helpers/index.js").MeltElement<[{
            update: (updater: import("svelte/store").Updater<string[]>, sideEffect?: ((newValue: string[]) => void) | undefined) => void;
            set: (this: void, value: string[]) => void;
            subscribe(this: void, run: import("svelte/store").Subscriber<string[]>, invalidate?: import("svelte/store").Invalidator<string[]> | undefined): import("svelte/store").Unsubscriber;
            get: () => string[];
            destroy?: (() => void) | undefined;
        }, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<string>>, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<boolean>>, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<"text" | "password">>], (node: HTMLInputElement) => MeltActionReturn<PinInputEvents['input']>, ([$value, $placeholder, $disabled, $type]: [string[], string, boolean, "text" | "password"]) => () => {
            'data-complete': string | undefined;
            placeholder: string;
            disabled: boolean | undefined;
            type: "text" | "password";
            value: string;
        }, string>;
        hiddenInput: import("../../internal/helpers/index.js").MeltElement<[import("../../internal/helpers/index.js").WithGet<import("svelte/store").Readable<string>>, import("svelte/motion").Readable<string | undefined>, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Readable<boolean>>, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Readable<boolean>>], (node: HTMLInputElement) => {
            destroy: import("svelte/store").Unsubscriber;
        }, ([$value, $name, $disabled, $required]: [string, string | undefined, boolean, boolean]) => {
            name: string | undefined;
            value: string;
            'aria-hidden': "true";
            hidden: boolean;
            disabled: boolean;
            required: boolean;
            tabIndex: number;
            style: string;
        }, string>;
    };
    states: {
        value: {
            update: (updater: import("svelte/store").Updater<string[]>, sideEffect?: ((newValue: string[]) => void) | undefined) => void;
            set: (this: void, value: string[]) => void;
            subscribe(this: void, run: import("svelte/store").Subscriber<string[]>, invalidate?: import("svelte/store").Invalidator<string[]> | undefined): import("svelte/store").Unsubscriber;
            get: () => string[];
            destroy?: (() => void) | undefined;
        };
        valueStr: import("svelte/store").Readable<string>;
    };
    helpers: {
        clear: () => void;
    };
    options: import("../../internal/helpers/index.js").ToWritableStores<Omit<{
        placeholder: string;
        name: string | undefined;
        disabled: boolean;
        type: "text" | "password";
        defaultValue: string[];
        value?: import("svelte/store").Writable<string[]> | undefined;
        onValueChange?: import("../../internal/helpers/index.js").ChangeFn<string[]> | undefined;
        ids?: Partial<{
            root: string;
        }> | undefined;
    }, "value" | "ids">>;
};