File size: 4,592 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
/// <reference types="svelte" />
import type { MeltActionReturn } from '../../internal/types.js';
import type { CheckboxEvents } from './events.js';
import type { CreateCheckboxProps } from './types.js';
export declare function createCheckbox(props?: CreateCheckboxProps): {
    elements: {
        root: import("../../internal/helpers/index.js").MeltElement<[{
            update: (updater: import("svelte/store").Updater<boolean | "indeterminate">, sideEffect?: ((newValue: boolean | "indeterminate") => void) | undefined) => void;
            set: (this: void, value: boolean | "indeterminate") => void;
            subscribe(this: void, run: import("svelte/store").Subscriber<boolean | "indeterminate">, invalidate?: import("svelte/store").Invalidator<boolean | "indeterminate"> | undefined): import("svelte/store").Unsubscriber;
            get: () => boolean | "indeterminate";
            destroy?: (() => void) | undefined;
        }, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<boolean>>, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<boolean>>], (node: HTMLElement) => MeltActionReturn<CheckboxEvents['root']>, ([$checked, $disabled, $required]: [boolean | "indeterminate", boolean, boolean]) => {
            readonly 'data-disabled': true | undefined;
            readonly disabled: true | undefined;
            readonly 'data-state': "indeterminate" | "checked" | "unchecked";
            readonly type: "button";
            readonly role: "checkbox";
            readonly 'aria-checked': boolean | "mixed";
            readonly 'aria-required': boolean;
        }, "checkbox">;
        input: import("../../internal/helpers/index.js").MeltElement<[{
            update: (updater: import("svelte/store").Updater<boolean | "indeterminate">, sideEffect?: ((newValue: boolean | "indeterminate") => void) | undefined) => void;
            set: (this: void, value: boolean | "indeterminate") => void;
            subscribe(this: void, run: import("svelte/store").Subscriber<boolean | "indeterminate">, invalidate?: import("svelte/store").Invalidator<boolean | "indeterminate"> | undefined): import("svelte/store").Unsubscriber;
            get: () => boolean | "indeterminate";
            destroy?: (() => void) | undefined;
        }, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<string | 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<boolean>>], import("svelte/action").Action<any, any, Record<never, any>>, ([$checked, $name, $value, $required, $disabled]: [boolean | "indeterminate", string | undefined, string, boolean, boolean]) => {
            readonly type: "checkbox";
            readonly 'aria-hidden': true;
            readonly hidden: true;
            readonly tabindex: -1;
            readonly name: string | undefined;
            readonly value: string;
            readonly checked: boolean;
            readonly required: boolean;
            readonly disabled: true | undefined;
            readonly style: string;
        }, "checkbox-input">;
    };
    states: {
        checked: {
            update: (updater: import("svelte/store").Updater<boolean | "indeterminate">, sideEffect?: ((newValue: boolean | "indeterminate") => void) | undefined) => void;
            set: (this: void, value: boolean | "indeterminate") => void;
            subscribe(this: void, run: import("svelte/store").Subscriber<boolean | "indeterminate">, invalidate?: import("svelte/store").Invalidator<boolean | "indeterminate"> | undefined): import("svelte/store").Unsubscriber;
            get: () => boolean | "indeterminate";
            destroy?: (() => void) | undefined;
        };
    };
    helpers: {
        isIndeterminate: import("svelte/store").Readable<boolean>;
        isChecked: import("svelte/store").Readable<boolean>;
    };
    options: import("../../internal/helpers/index.js").ToWritableStores<Omit<{
        disabled: boolean;
        required: boolean;
        name: string | undefined;
        value: string;
        defaultChecked: boolean | "indeterminate";
        checked?: import("svelte/store").Writable<boolean | "indeterminate"> | undefined;
        onCheckedChange?: import("../../internal/helpers/index.js").ChangeFn<boolean | "indeterminate"> | undefined;
    }, "defaultChecked" | "checked">>;
};