File size: 4,336 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 { RadioGroupEvents } from './events.js';
import type { CreateRadioGroupProps, RadioGroupItemProps } from './types.js';
export declare function createRadioGroup(props?: CreateRadioGroupProps): {
    elements: {
        root: import("../../internal/helpers/index.js").MeltElement<[import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<boolean>>, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<import("../../internal/types.js").Orientation>>], import("svelte/action").Action<any, any, Record<never, any>>, ([$required, $orientation]: [boolean, import("../../internal/types.js").Orientation]) => {
            readonly role: "radiogroup";
            readonly 'aria-required': boolean;
            readonly 'data-orientation': import("../../internal/types.js").Orientation;
        }, string>;
        item: 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<import("../../internal/types.js").Orientation>>, import("../../internal/helpers/index.js").WithGet<import("svelte/store").Writable<boolean>>], (node: HTMLElement) => MeltActionReturn<RadioGroupEvents['item']>, ([$value, $orientation, $disabled]: [string, import("../../internal/types.js").Orientation, boolean]) => (props: RadioGroupItemProps) => {
            readonly disabled: boolean;
            readonly 'data-value': string;
            readonly 'data-orientation': import("../../internal/types.js").Orientation;
            readonly 'data-disabled': true | undefined;
            readonly 'data-state': "checked" | "unchecked";
            readonly 'aria-checked': boolean;
            readonly type: "button";
            readonly role: "radio";
            readonly tabindex: 0 | -1;
        }, 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;
        };
    };
    helpers: {
        isChecked: import("svelte/store").Readable<(itemValue: string) => boolean>;
    };
    options: import("../../internal/helpers/index.js").ToWritableStores<Omit<{
        disabled: boolean;
        required: boolean;
        loop: boolean;
        orientation: import("../../internal/types.js").Orientation;
        defaultValue: string | undefined;
        value?: import("svelte/store").Writable<string> | undefined;
        onValueChange?: import("../../internal/helpers/index.js").ChangeFn<string> | undefined;
    }, "value">>;
};