@pzerelles/headlessui-svelte 2.1.2-next.34 → 2.1.2-next.35
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/button/Button.svelte +8 -10
- package/dist/button/Button.svelte.d.ts +3 -2
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.js +1 -1
- package/dist/checkbox/Checkbox.svelte +15 -13
- package/dist/checkbox/Checkbox.svelte.d.ts +3 -2
- package/dist/checkbox/index.d.ts +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/close-button/index.d.ts +1 -1
- package/dist/description/Description.svelte +6 -8
- package/dist/description/Description.svelte.d.ts +3 -2
- package/dist/description/index.d.ts +1 -1
- package/dist/dialog/Dialog.svelte +13 -16
- package/dist/dialog/Dialog.svelte.d.ts +3 -2
- package/dist/dialog/DialogBackdrop.svelte +3 -5
- package/dist/dialog/DialogBackdrop.svelte.d.ts +3 -2
- package/dist/dialog/DialogPanel.svelte +7 -9
- package/dist/dialog/DialogPanel.svelte.d.ts +3 -2
- package/dist/dialog/DialogTitle.svelte +3 -5
- package/dist/dialog/DialogTitle.svelte.d.ts +3 -2
- package/dist/dialog/index.d.ts +4 -4
- package/dist/dialog/index.js +1 -1
- package/dist/field/Field.svelte +6 -8
- package/dist/field/Field.svelte.d.ts +3 -2
- package/dist/field/index.d.ts +1 -1
- package/dist/fieldset/Fieldset.svelte +6 -8
- package/dist/fieldset/Fieldset.svelte.d.ts +3 -2
- package/dist/fieldset/index.d.ts +1 -1
- package/dist/focus-trap/FocusTrap.svelte +12 -14
- package/dist/focus-trap/FocusTrap.svelte.d.ts +3 -2
- package/dist/input/Input.svelte +10 -12
- package/dist/input/Input.svelte.d.ts +3 -2
- package/dist/input/index.d.ts +1 -1
- package/dist/input/index.js +1 -1
- package/dist/label/Label.svelte +8 -10
- package/dist/label/Label.svelte.d.ts +3 -2
- package/dist/label/index.d.ts +1 -1
- package/dist/legend/Legend.svelte +6 -8
- package/dist/legend/Legend.svelte.d.ts +3 -2
- package/dist/listbox/Listbox.svelte +16 -14
- package/dist/listbox/Listbox.svelte.d.ts +3 -2
- package/dist/listbox/ListboxButton.svelte +8 -10
- package/dist/listbox/ListboxButton.svelte.d.ts +3 -2
- package/dist/listbox/ListboxOption.svelte +8 -6
- package/dist/listbox/ListboxOption.svelte.d.ts +3 -2
- package/dist/listbox/ListboxOptions.svelte +10 -12
- package/dist/listbox/ListboxOptions.svelte.d.ts +3 -2
- package/dist/listbox/ListboxSelectedOption.svelte +7 -5
- package/dist/listbox/ListboxSelectedOption.svelte.d.ts +3 -2
- package/dist/listbox/index.d.ts +5 -5
- package/dist/listbox/index.js +1 -1
- package/dist/menu/Menu.svelte +5 -6
- package/dist/menu/Menu.svelte.d.ts +3 -2
- package/dist/menu/MenuButton.svelte +9 -11
- package/dist/menu/MenuButton.svelte.d.ts +3 -2
- package/dist/menu/MenuHeading.svelte +6 -9
- package/dist/menu/MenuHeading.svelte.d.ts +3 -2
- package/dist/menu/MenuItem.svelte +7 -9
- package/dist/menu/MenuItem.svelte.d.ts +3 -2
- package/dist/menu/MenuItems.svelte +10 -12
- package/dist/menu/MenuItems.svelte.d.ts +3 -2
- package/dist/menu/MenuSection.svelte +5 -7
- package/dist/menu/MenuSection.svelte.d.ts +3 -2
- package/dist/menu/MenuSeparator.svelte +5 -7
- package/dist/menu/MenuSeparator.svelte.d.ts +3 -2
- package/dist/menu/index.d.ts +7 -7
- package/dist/menu/index.js +2 -2
- package/dist/popover/Popover.svelte +6 -8
- package/dist/popover/Popover.svelte.d.ts +3 -2
- package/dist/popover/PopoverBackdrop.svelte +7 -9
- package/dist/popover/PopoverBackdrop.svelte.d.ts +3 -2
- package/dist/popover/PopoverButton.svelte +8 -10
- package/dist/popover/PopoverButton.svelte.d.ts +3 -2
- package/dist/popover/PopoverGroup.svelte +5 -7
- package/dist/popover/PopoverGroup.svelte.d.ts +3 -2
- package/dist/popover/PopoverPanel.svelte +15 -17
- package/dist/popover/PopoverPanel.svelte.d.ts +3 -2
- package/dist/popover/index.d.ts +5 -5
- package/dist/popover/index.js +2 -2
- package/dist/select/Select.svelte +9 -11
- package/dist/select/Select.svelte.d.ts +3 -2
- package/dist/select/index.d.ts +1 -1
- package/dist/select/index.js +1 -1
- package/dist/switch/Switch.svelte +15 -17
- package/dist/switch/Switch.svelte.d.ts +3 -2
- package/dist/switch/index.d.ts +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/tabs/Tab.svelte +8 -10
- package/dist/tabs/Tab.svelte.d.ts +3 -2
- package/dist/tabs/TabGroup.svelte +10 -12
- package/dist/tabs/TabGroup.svelte.d.ts +3 -2
- package/dist/tabs/TabList.svelte +5 -7
- package/dist/tabs/TabList.svelte.d.ts +3 -2
- package/dist/tabs/TabPanel.svelte +7 -6
- package/dist/tabs/TabPanel.svelte.d.ts +3 -2
- package/dist/tabs/TabPanels.svelte +3 -1
- package/dist/tabs/TabPanels.svelte.d.ts +3 -2
- package/dist/tabs/index.d.ts +4 -4
- package/dist/tabs/index.js +3 -3
- package/dist/textarea/Textarea.svelte +10 -9
- package/dist/textarea/Textarea.svelte.d.ts +3 -2
- package/dist/textarea/index.d.ts +1 -1
- package/dist/textarea/index.js +1 -1
- package/dist/transition/Transition.svelte +10 -1
- package/dist/transition/Transition.svelte.d.ts +5 -1
- package/dist/transition/TransitionChild.svelte +5 -3
- package/dist/transition/TransitionChild.svelte.d.ts +3 -2
- package/dist/transition/index.d.ts +2 -2
- package/dist/transition/index.js +1 -1
- package/package.json +1 -1
|
@@ -16,22 +16,24 @@
|
|
|
16
16
|
value: T
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
+
export type ListboxOwnProps<TType = string, TActualType = TType extends (infer U)[] ? U : TType> = {
|
|
20
|
+
value?: TType
|
|
21
|
+
defaultValue?: TType
|
|
22
|
+
onchange?: (value: TType) => void
|
|
23
|
+
by?: ByComparator<TActualType>
|
|
24
|
+
disabled?: boolean
|
|
25
|
+
invalid?: boolean
|
|
26
|
+
horizontal?: boolean
|
|
27
|
+
form?: string
|
|
28
|
+
name?: string
|
|
29
|
+
multiple?: boolean
|
|
30
|
+
closeOnSelect?: boolean
|
|
31
|
+
__demoMode?: boolean
|
|
32
|
+
}
|
|
33
|
+
|
|
19
34
|
export type ListboxProps<TType = string, TActualType = TType extends (infer U)[] ? U : TType> = PropsAsChild<
|
|
20
35
|
ListboxRenderPropArg<TType>,
|
|
21
|
-
|
|
22
|
-
value?: TType
|
|
23
|
-
defaultValue?: TType
|
|
24
|
-
onchange?: (value: TType) => void
|
|
25
|
-
by?: ByComparator<TActualType>
|
|
26
|
-
disabled?: boolean
|
|
27
|
-
invalid?: boolean
|
|
28
|
-
horizontal?: boolean
|
|
29
|
-
form?: string
|
|
30
|
-
name?: string
|
|
31
|
-
multiple?: boolean
|
|
32
|
-
closeOnSelect?: boolean
|
|
33
|
-
__demoMode?: boolean
|
|
34
|
-
}
|
|
36
|
+
ListboxOwnProps<TType, TActualType>
|
|
35
37
|
>
|
|
36
38
|
|
|
37
39
|
export * from "./context.svelte.js"
|
|
@@ -6,7 +6,7 @@ export type ListboxRenderPropArg<T> = {
|
|
|
6
6
|
invalid: boolean;
|
|
7
7
|
value: T;
|
|
8
8
|
};
|
|
9
|
-
export type
|
|
9
|
+
export type ListboxOwnProps<TType = string, TActualType = TType extends (infer U)[] ? U : TType> = {
|
|
10
10
|
value?: TType;
|
|
11
11
|
defaultValue?: TType;
|
|
12
12
|
onchange?: (value: TType) => void;
|
|
@@ -19,7 +19,8 @@ export type ListboxProps<TType = string, TActualType = TType extends (infer U)[]
|
|
|
19
19
|
multiple?: boolean;
|
|
20
20
|
closeOnSelect?: boolean;
|
|
21
21
|
__demoMode?: boolean;
|
|
22
|
-
}
|
|
22
|
+
};
|
|
23
|
+
export type ListboxProps<TType = string, TActualType = TType extends (infer U)[] ? U : TType> = PropsAsChild<ListboxRenderPropArg<TType>, ListboxOwnProps<TType, TActualType>>;
|
|
23
24
|
export * from "./context.svelte.js";
|
|
24
25
|
declare class __sveltets_Render<TType = string, TActualType = TType extends (infer U)[] ? U : TType> {
|
|
25
26
|
props(): ListboxProps<TType, TActualType>;
|
|
@@ -29,16 +29,14 @@
|
|
|
29
29
|
}
|
|
30
30
|
type ButtonPropsWeControl = "aria-controls" | "aria-expanded" | "aria-haspopup" | "aria-labelledby" | "disabled"
|
|
31
31
|
|
|
32
|
-
export type
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
>
|
|
32
|
+
export type ListboxButtonOwnProps = {
|
|
33
|
+
element?: HTMLElement
|
|
34
|
+
id?: string
|
|
35
|
+
autofocus?: boolean
|
|
36
|
+
disabled?: boolean
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export type ListboxButtonProps = Props<typeof DEFAULT_BUTTON_TAG, ButtonRenderPropArg, ListboxButtonOwnProps>
|
|
42
40
|
</script>
|
|
43
41
|
|
|
44
42
|
<script lang="ts">
|
|
@@ -10,11 +10,12 @@ export type ButtonRenderPropArg = {
|
|
|
10
10
|
active: boolean;
|
|
11
11
|
value: any;
|
|
12
12
|
};
|
|
13
|
-
export type
|
|
13
|
+
export type ListboxButtonOwnProps = {
|
|
14
14
|
element?: HTMLElement;
|
|
15
15
|
id?: string;
|
|
16
16
|
autofocus?: boolean;
|
|
17
17
|
disabled?: boolean;
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
|
+
export type ListboxButtonProps = Props<typeof DEFAULT_BUTTON_TAG, ButtonRenderPropArg, ListboxButtonOwnProps>;
|
|
19
20
|
declare const ListboxButton: import("svelte").Component<ListboxButtonProps, {}, "element">;
|
|
20
21
|
export default ListboxButton;
|
|
@@ -13,15 +13,17 @@
|
|
|
13
13
|
}
|
|
14
14
|
type OptionPropsWeControl = "aria-disabled" | "aria-selected" | "role" | "tabIndex"
|
|
15
15
|
|
|
16
|
+
export type ListboxOptionOwnProps<TType = string> = {
|
|
17
|
+
element?: HTMLElement
|
|
18
|
+
id?: string
|
|
19
|
+
disabled?: boolean
|
|
20
|
+
value: TType
|
|
21
|
+
}
|
|
22
|
+
|
|
16
23
|
export type ListboxOptionProps<TType = string> = Props<
|
|
17
24
|
typeof DEFAULT_OPTION_TAG,
|
|
18
25
|
OptionRenderPropArg,
|
|
19
|
-
|
|
20
|
-
element?: HTMLElement
|
|
21
|
-
id?: string
|
|
22
|
-
disabled?: boolean
|
|
23
|
-
value: TType
|
|
24
|
-
}
|
|
26
|
+
ListboxOptionOwnProps<TType>
|
|
25
27
|
>
|
|
26
28
|
</script>
|
|
27
29
|
|
|
@@ -8,12 +8,13 @@ export type OptionRenderPropArg = {
|
|
|
8
8
|
disabled: boolean;
|
|
9
9
|
selectedOption: boolean;
|
|
10
10
|
};
|
|
11
|
-
export type
|
|
11
|
+
export type ListboxOptionOwnProps<TType = string> = {
|
|
12
12
|
element?: HTMLElement;
|
|
13
13
|
id?: string;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
value: TType;
|
|
16
|
-
}
|
|
16
|
+
};
|
|
17
|
+
export type ListboxOptionProps<TType = string> = Props<typeof DEFAULT_OPTION_TAG, OptionRenderPropArg, ListboxOptionOwnProps<TType>>;
|
|
17
18
|
declare class __sveltets_Render<TType> {
|
|
18
19
|
props(): ListboxOptionProps<TType>;
|
|
19
20
|
events(): {};
|
|
@@ -23,18 +23,16 @@
|
|
|
23
23
|
|
|
24
24
|
let OptionsRenderFeatures = RenderFeatures.RenderStrategy | RenderFeatures.Static
|
|
25
25
|
|
|
26
|
-
export type
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} & PropsForFeatures<typeof OptionsRenderFeatures>
|
|
37
|
-
>
|
|
26
|
+
export type ListboxOptionsOwnProps = {
|
|
27
|
+
element?: HTMLElement
|
|
28
|
+
id?: string
|
|
29
|
+
anchor?: AnchorPropsWithSelection
|
|
30
|
+
portal?: boolean
|
|
31
|
+
modal?: boolean
|
|
32
|
+
transition?: boolean
|
|
33
|
+
} & PropsForFeatures<typeof OptionsRenderFeatures>
|
|
34
|
+
|
|
35
|
+
export type ListboxOptionsProps = Props<typeof DEFAULT_OPTIONS_TAG, OptionsRenderPropArg, ListboxOptionsOwnProps>
|
|
38
36
|
</script>
|
|
39
37
|
|
|
40
38
|
<script lang="ts">
|
|
@@ -6,13 +6,14 @@ export type OptionsRenderPropArg = {
|
|
|
6
6
|
open: boolean;
|
|
7
7
|
};
|
|
8
8
|
declare let OptionsRenderFeatures: number;
|
|
9
|
-
export type
|
|
9
|
+
export type ListboxOptionsOwnProps = {
|
|
10
10
|
element?: HTMLElement;
|
|
11
11
|
id?: string;
|
|
12
12
|
anchor?: AnchorPropsWithSelection;
|
|
13
13
|
portal?: boolean;
|
|
14
14
|
modal?: boolean;
|
|
15
15
|
transition?: boolean;
|
|
16
|
-
} & PropsForFeatures<typeof OptionsRenderFeatures
|
|
16
|
+
} & PropsForFeatures<typeof OptionsRenderFeatures>;
|
|
17
|
+
export type ListboxOptionsProps = Props<typeof DEFAULT_OPTIONS_TAG, OptionsRenderPropArg, ListboxOptionsOwnProps>;
|
|
17
18
|
declare const ListboxOptions: import("svelte").Component<ListboxOptionsProps, {}, "element">;
|
|
18
19
|
export default ListboxOptions;
|
|
@@ -8,14 +8,16 @@
|
|
|
8
8
|
}
|
|
9
9
|
type SelectedOptionPropsWeControl = never
|
|
10
10
|
|
|
11
|
+
export type ListboxSelectedOptionOwnProps = {
|
|
12
|
+
element?: HTMLElement
|
|
13
|
+
options: Snippet
|
|
14
|
+
placeholder?: Snippet
|
|
15
|
+
}
|
|
16
|
+
|
|
11
17
|
export type ListboxSelectedOptionProps = Props<
|
|
12
18
|
typeof DEFAULT_SELECTED_OPTION_TAG,
|
|
13
19
|
SelectedOptionRenderPropArg,
|
|
14
|
-
|
|
15
|
-
element?: HTMLElement
|
|
16
|
-
options: Snippet
|
|
17
|
-
placeholder?: Snippet
|
|
18
|
-
}
|
|
20
|
+
ListboxSelectedOptionOwnProps
|
|
19
21
|
>
|
|
20
22
|
</script>
|
|
21
23
|
|
|
@@ -4,10 +4,11 @@ declare const DEFAULT_SELECTED_OPTION_TAG = "span";
|
|
|
4
4
|
export type SelectedOptionRenderPropArg = {
|
|
5
5
|
option: Snippet;
|
|
6
6
|
};
|
|
7
|
-
export type
|
|
7
|
+
export type ListboxSelectedOptionOwnProps = {
|
|
8
8
|
element?: HTMLElement;
|
|
9
9
|
options: Snippet;
|
|
10
10
|
placeholder?: Snippet;
|
|
11
|
-
}
|
|
11
|
+
};
|
|
12
|
+
export type ListboxSelectedOptionProps = Props<typeof DEFAULT_SELECTED_OPTION_TAG, SelectedOptionRenderPropArg, ListboxSelectedOptionOwnProps>;
|
|
12
13
|
declare const ListboxSelectedOption: import("svelte").Component<ListboxSelectedOptionProps, {}, "element">;
|
|
13
14
|
export default ListboxSelectedOption;
|
package/dist/listbox/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as Listbox, type ListboxProps, type ListboxRenderPropArg as ListboxSlot } from "./Listbox.svelte";
|
|
2
|
-
export { default as ListboxButton, type ListboxButtonProps, type ButtonRenderPropArg as ListboxButtonSlot, } from "./ListboxButton.svelte";
|
|
3
|
-
export { default as ListboxOption, type ListboxOptionProps, type OptionRenderPropArg as ListboxOptionSlot, } from "./ListboxOption.svelte";
|
|
4
|
-
export { default as ListboxOptions, type ListboxOptionsProps, type OptionsRenderPropArg as ListboxOptionsSlot, } from "./ListboxOptions.svelte";
|
|
5
|
-
export { default as ListboxSelectedOption, type ListboxSelectedOptionProps, type SelectedOptionRenderPropArg as ListboxSelectedOptionSlot, } from "./ListboxSelectedOption.svelte";
|
|
1
|
+
export { default as Listbox, type ListboxProps, type ListboxRenderPropArg as ListboxSlot, type ListboxOwnProps, } from "./Listbox.svelte";
|
|
2
|
+
export { default as ListboxButton, type ListboxButtonProps, type ButtonRenderPropArg as ListboxButtonSlot, type ListboxButtonOwnProps, } from "./ListboxButton.svelte";
|
|
3
|
+
export { default as ListboxOption, type ListboxOptionProps, type OptionRenderPropArg as ListboxOptionSlot, type ListboxOptionOwnProps, } from "./ListboxOption.svelte";
|
|
4
|
+
export { default as ListboxOptions, type ListboxOptionsProps, type OptionsRenderPropArg as ListboxOptionsSlot, type ListboxOptionsOwnProps, } from "./ListboxOptions.svelte";
|
|
5
|
+
export { default as ListboxSelectedOption, type ListboxSelectedOptionProps, type SelectedOptionRenderPropArg as ListboxSelectedOptionSlot, type ListboxSelectedOptionOwnProps, } from "./ListboxSelectedOption.svelte";
|
package/dist/listbox/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as Listbox } from "./Listbox.svelte";
|
|
1
|
+
export { default as Listbox, } from "./Listbox.svelte";
|
|
2
2
|
export { default as ListboxButton, } from "./ListboxButton.svelte";
|
|
3
3
|
export { default as ListboxOption, } from "./ListboxOption.svelte";
|
|
4
4
|
export { default as ListboxOptions, } from "./ListboxOptions.svelte";
|
package/dist/menu/Menu.svelte
CHANGED
|
@@ -8,12 +8,11 @@
|
|
|
8
8
|
}
|
|
9
9
|
type MenuPropsWeControl = never
|
|
10
10
|
|
|
11
|
-
export type
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
>
|
|
11
|
+
export type MenuOwnProps = {
|
|
12
|
+
__demoMode?: boolean
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type MenuProps = PropsAsChild<MenuRenderPropArg, MenuOwnProps>
|
|
17
16
|
</script>
|
|
18
17
|
|
|
19
18
|
<script lang="ts">
|
|
@@ -3,8 +3,9 @@ export type MenuRenderPropArg = {
|
|
|
3
3
|
open: boolean;
|
|
4
4
|
close: () => void;
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
6
|
+
export type MenuOwnProps = {
|
|
7
7
|
__demoMode?: boolean;
|
|
8
|
-
}
|
|
8
|
+
};
|
|
9
|
+
export type MenuProps = PropsAsChild<MenuRenderPropArg, MenuOwnProps>;
|
|
9
10
|
declare const Menu: import("svelte").Component<MenuProps, {}, "">;
|
|
10
11
|
export default Menu;
|
|
@@ -13,17 +13,15 @@
|
|
|
13
13
|
}
|
|
14
14
|
type ButtonPropsWeControl = "aria-controls" | "aria-expanded" | "aria-haspopup"
|
|
15
15
|
|
|
16
|
-
export type
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
>
|
|
16
|
+
export type MenuButtonOwnProps = {
|
|
17
|
+
element?: HTMLElement
|
|
18
|
+
id?: string
|
|
19
|
+
disabled?: boolean
|
|
20
|
+
autofocus?: boolean
|
|
21
|
+
type?: string
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type MenuButtonProps = Props<typeof DEFAULT_BUTTON_TAG, ButtonRenderPropArg, MenuButtonOwnProps>
|
|
27
25
|
</script>
|
|
28
26
|
|
|
29
27
|
<script lang="ts">
|
|
@@ -8,12 +8,13 @@ export type ButtonRenderPropArg = {
|
|
|
8
8
|
disabled: boolean;
|
|
9
9
|
autofocus: boolean;
|
|
10
10
|
};
|
|
11
|
-
export type
|
|
11
|
+
export type MenuButtonOwnProps = {
|
|
12
12
|
element?: HTMLElement;
|
|
13
13
|
id?: string;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
autofocus?: boolean;
|
|
16
16
|
type?: string;
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
|
+
export type MenuButtonProps = Props<typeof DEFAULT_BUTTON_TAG, ButtonRenderPropArg, MenuButtonOwnProps>;
|
|
18
19
|
declare const MenuButton: import("svelte").Component<MenuButtonProps, {}, "element">;
|
|
19
20
|
export default MenuButton;
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import { onMount } from "svelte"
|
|
3
|
-
import type { SvelteHTMLElements } from "svelte/elements"
|
|
4
3
|
import type { Props } from "../utils/types.js"
|
|
5
4
|
|
|
6
5
|
const DEFAULT_HEADING_TAG = "header" as const
|
|
7
6
|
|
|
8
7
|
type HeadingPropsWeControl = "role"
|
|
9
8
|
|
|
10
|
-
export type
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
>
|
|
9
|
+
export type MenuHeadingOwnProps = {
|
|
10
|
+
element?: HTMLElement
|
|
11
|
+
id?: string
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export type MenuHeadingProps = Props<typeof DEFAULT_HEADING_TAG, {}, MenuHeadingOwnProps>
|
|
18
15
|
</script>
|
|
19
16
|
|
|
20
17
|
<script lang="ts">
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare const DEFAULT_HEADING_TAG: "header";
|
|
3
|
-
export type
|
|
3
|
+
export type MenuHeadingOwnProps = {
|
|
4
4
|
element?: HTMLElement;
|
|
5
5
|
id?: string;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
|
+
export type MenuHeadingProps = Props<typeof DEFAULT_HEADING_TAG, {}, MenuHeadingOwnProps>;
|
|
7
8
|
declare const MenuHeading: import("svelte").Component<MenuHeadingProps, {}, "element">;
|
|
8
9
|
export default MenuHeading;
|
|
@@ -13,15 +13,13 @@
|
|
|
13
13
|
}
|
|
14
14
|
type ItemPropsWeControl = "aria-describedby" | "aria-disabled" | "aria-labelledby" | "role" | "tabIndex"
|
|
15
15
|
|
|
16
|
-
export type
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
>
|
|
16
|
+
export type MenuItemOwnProps = {
|
|
17
|
+
element?: HTMLElement
|
|
18
|
+
id?: string
|
|
19
|
+
disabled?: boolean
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type MenuItemProps = Props<typeof DEFAULT_ITEM_TAG, ItemRenderPropArg, MenuItemOwnProps>
|
|
25
23
|
</script>
|
|
26
24
|
|
|
27
25
|
<script lang="ts">
|
|
@@ -8,10 +8,11 @@ export type ItemRenderPropArg = {
|
|
|
8
8
|
close: () => void;
|
|
9
9
|
props?: Record<string, any>;
|
|
10
10
|
};
|
|
11
|
-
export type
|
|
11
|
+
export type MenuItemOwnProps = {
|
|
12
12
|
element?: HTMLElement;
|
|
13
13
|
id?: string;
|
|
14
14
|
disabled?: boolean;
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
|
+
export type MenuItemProps = Props<typeof DEFAULT_ITEM_TAG, ItemRenderPropArg, MenuItemOwnProps>;
|
|
16
17
|
declare const MenuItem: import("svelte").Component<MenuItemProps, {}, "element">;
|
|
17
18
|
export default MenuItem;
|
|
@@ -16,18 +16,16 @@
|
|
|
16
16
|
|
|
17
17
|
let ItemsRenderFeatures = RenderFeatures.RenderStrategy | RenderFeatures.Static
|
|
18
18
|
|
|
19
|
-
export type
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} & PropsForFeatures<typeof ItemsRenderFeatures>
|
|
30
|
-
>
|
|
19
|
+
export type MenuItemsOwnProps = {
|
|
20
|
+
element?: HTMLElement
|
|
21
|
+
id?: string
|
|
22
|
+
anchor?: AnchorProps
|
|
23
|
+
portal?: boolean
|
|
24
|
+
modal?: boolean
|
|
25
|
+
transition?: boolean
|
|
26
|
+
} & PropsForFeatures<typeof ItemsRenderFeatures>
|
|
27
|
+
|
|
28
|
+
export type MenuItemsProps = Props<typeof DEFAULT_ITEMS_TAG, ItemsRenderPropArg, MenuItemsOwnProps>
|
|
31
29
|
</script>
|
|
32
30
|
|
|
33
31
|
<script lang="ts">
|
|
@@ -6,13 +6,14 @@ export type ItemsRenderPropArg = {
|
|
|
6
6
|
open: boolean;
|
|
7
7
|
};
|
|
8
8
|
declare let ItemsRenderFeatures: number;
|
|
9
|
-
export type
|
|
9
|
+
export type MenuItemsOwnProps = {
|
|
10
10
|
element?: HTMLElement;
|
|
11
11
|
id?: string;
|
|
12
12
|
anchor?: AnchorProps;
|
|
13
13
|
portal?: boolean;
|
|
14
14
|
modal?: boolean;
|
|
15
15
|
transition?: boolean;
|
|
16
|
-
} & PropsForFeatures<typeof ItemsRenderFeatures
|
|
16
|
+
} & PropsForFeatures<typeof ItemsRenderFeatures>;
|
|
17
|
+
export type MenuItemsProps = Props<typeof DEFAULT_ITEMS_TAG, ItemsRenderPropArg, MenuItemsOwnProps>;
|
|
17
18
|
declare const MenuItems: import("svelte").Component<MenuItemsProps, {}, "element">;
|
|
18
19
|
export default MenuItems;
|
|
@@ -5,13 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
type SectionPropsWeControl = "role" | "aria-labelledby"
|
|
7
7
|
|
|
8
|
-
export type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
>
|
|
8
|
+
export type MenuSectionOwnProps = {
|
|
9
|
+
element?: HTMLElement
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type MenuSectionProps = Props<typeof DEFAULT_SECTION_TAG, {}, MenuSectionOwnProps>
|
|
15
13
|
</script>
|
|
16
14
|
|
|
17
15
|
<script lang="ts">
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare const DEFAULT_SECTION_TAG: "div";
|
|
3
|
-
export type
|
|
3
|
+
export type MenuSectionOwnProps = {
|
|
4
4
|
element?: HTMLElement;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
|
+
export type MenuSectionProps = Props<typeof DEFAULT_SECTION_TAG, {}, MenuSectionOwnProps>;
|
|
6
7
|
declare const MenuSection: import("svelte").Component<MenuSectionProps, {}, "element">;
|
|
7
8
|
export default MenuSection;
|
|
@@ -5,13 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
type SeparatorPropsWeControl = "role"
|
|
7
7
|
|
|
8
|
-
export type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
>
|
|
8
|
+
export type MenuSeparatorOwnProps = {
|
|
9
|
+
element?: HTMLElement
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type MenuSeparatorProps = Props<typeof DEFAULT_SEPARATOR_TAG, {}, MenuSeparatorOwnProps>
|
|
15
13
|
</script>
|
|
16
14
|
|
|
17
15
|
<script lang="ts">
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare const DEFAULT_SEPARATOR_TAG: "div";
|
|
3
|
-
export type
|
|
3
|
+
export type MenuSeparatorOwnProps = {
|
|
4
4
|
element?: HTMLElement;
|
|
5
|
-
}
|
|
5
|
+
};
|
|
6
|
+
export type MenuSeparatorProps = Props<typeof DEFAULT_SEPARATOR_TAG, {}, MenuSeparatorOwnProps>;
|
|
6
7
|
declare const MenuSeparator: import("svelte").Component<MenuSeparatorProps, {}, "element">;
|
|
7
8
|
export default MenuSeparator;
|
package/dist/menu/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { default as Menu, type MenuProps, type MenuRenderPropArg as MenuSlot } from "./Menu.svelte";
|
|
2
|
-
export { default as MenuButton, type MenuButtonProps, type ButtonRenderPropArg as MenuButtonSlot, } from "./MenuButton.svelte";
|
|
3
|
-
export { default as MenuHeading, type MenuHeadingProps } from "./MenuHeading.svelte";
|
|
4
|
-
export { default as MenuItem, type MenuItemProps, type ItemRenderPropArg as MenuItemSlot } from "./MenuItem.svelte";
|
|
5
|
-
export { default as MenuItems, type MenuItemsProps, type ItemsRenderPropArg as MenuItemsSlot } from "./MenuItems.svelte";
|
|
6
|
-
export { default as MenuSection, type MenuSectionProps } from "./MenuSection.svelte";
|
|
7
|
-
export { default as MenuSeparator, type MenuSeparatorProps } from "./MenuSeparator.svelte";
|
|
1
|
+
export { default as Menu, type MenuProps, type MenuRenderPropArg as MenuSlot, type MenuOwnProps } from "./Menu.svelte";
|
|
2
|
+
export { default as MenuButton, type MenuButtonProps, type ButtonRenderPropArg as MenuButtonSlot, type MenuButtonOwnProps, } from "./MenuButton.svelte";
|
|
3
|
+
export { default as MenuHeading, type MenuHeadingProps, type MenuHeadingOwnProps } from "./MenuHeading.svelte";
|
|
4
|
+
export { default as MenuItem, type MenuItemProps, type ItemRenderPropArg as MenuItemSlot, type MenuItemOwnProps, } from "./MenuItem.svelte";
|
|
5
|
+
export { default as MenuItems, type MenuItemsProps, type ItemsRenderPropArg as MenuItemsSlot, type MenuItemsOwnProps, } from "./MenuItems.svelte";
|
|
6
|
+
export { default as MenuSection, type MenuSectionProps, type MenuSectionOwnProps } from "./MenuSection.svelte";
|
|
7
|
+
export { default as MenuSeparator, type MenuSeparatorProps, type MenuSeparatorOwnProps } from "./MenuSeparator.svelte";
|
package/dist/menu/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { default as Menu } from "./Menu.svelte";
|
|
2
2
|
export { default as MenuButton, } from "./MenuButton.svelte";
|
|
3
3
|
export { default as MenuHeading } from "./MenuHeading.svelte";
|
|
4
|
-
export { default as MenuItem } from "./MenuItem.svelte";
|
|
5
|
-
export { default as MenuItems } from "./MenuItems.svelte";
|
|
4
|
+
export { default as MenuItem, } from "./MenuItem.svelte";
|
|
5
|
+
export { default as MenuItems, } from "./MenuItems.svelte";
|
|
6
6
|
export { default as MenuSection } from "./MenuSection.svelte";
|
|
7
7
|
export { default as MenuSeparator } from "./MenuSeparator.svelte";
|
|
@@ -8,14 +8,12 @@
|
|
|
8
8
|
}
|
|
9
9
|
type PopoverPropsWeControl = never
|
|
10
10
|
|
|
11
|
-
export type
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
>
|
|
11
|
+
export type PopoverOwnProps = {
|
|
12
|
+
element?: HTMLElement
|
|
13
|
+
__demoMode?: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type PopoverProps = Props<typeof DEFAULT_POPOVER_TAG, PopoverRenderPropArg, PopoverOwnProps>
|
|
19
17
|
</script>
|
|
20
18
|
|
|
21
19
|
<script lang="ts">
|
|
@@ -4,10 +4,11 @@ export type PopoverRenderPropArg = {
|
|
|
4
4
|
open: boolean;
|
|
5
5
|
close(focusableElement?: HTMLElement | MouseEvent<HTMLElement>): void;
|
|
6
6
|
};
|
|
7
|
-
export type
|
|
7
|
+
export type PopoverOwnProps = {
|
|
8
8
|
element?: HTMLElement;
|
|
9
9
|
__demoMode?: boolean;
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
|
+
export type PopoverProps = Props<typeof DEFAULT_POPOVER_TAG, PopoverRenderPropArg, PopoverOwnProps>;
|
|
11
12
|
import { type MouseEvent } from "./context.svelte.js";
|
|
12
13
|
declare const Popover: import("svelte").Component<PopoverProps, {}, "element">;
|
|
13
14
|
export default Popover;
|
|
@@ -10,15 +10,13 @@
|
|
|
10
10
|
|
|
11
11
|
const BackdropRenderFeatures = RenderFeatures.RenderStrategy | RenderFeatures.Static
|
|
12
12
|
|
|
13
|
-
export type
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
} & PropsForFeatures<typeof BackdropRenderFeatures>
|
|
21
|
-
>
|
|
13
|
+
export type PopoverBackdropOwnProps = {
|
|
14
|
+
element?: HTMLElement
|
|
15
|
+
id?: string
|
|
16
|
+
transition?: boolean
|
|
17
|
+
} & PropsForFeatures<typeof BackdropRenderFeatures>
|
|
18
|
+
|
|
19
|
+
export type PopoverBackdropProps = Props<typeof DEFAULT_BACKDROP_TAG, BackdropRenderPropArg, PopoverBackdropOwnProps>
|
|
22
20
|
|
|
23
21
|
export type PopoverOverlayProps = PopoverBackdropProps
|
|
24
22
|
</script>
|
|
@@ -5,11 +5,12 @@ export type BackdropRenderPropArg = {
|
|
|
5
5
|
open: boolean;
|
|
6
6
|
};
|
|
7
7
|
declare const BackdropRenderFeatures: number;
|
|
8
|
-
export type
|
|
8
|
+
export type PopoverBackdropOwnProps = {
|
|
9
9
|
element?: HTMLElement;
|
|
10
10
|
id?: string;
|
|
11
11
|
transition?: boolean;
|
|
12
|
-
} & PropsForFeatures<typeof BackdropRenderFeatures
|
|
12
|
+
} & PropsForFeatures<typeof BackdropRenderFeatures>;
|
|
13
|
+
export type PopoverBackdropProps = Props<typeof DEFAULT_BACKDROP_TAG, BackdropRenderPropArg, PopoverBackdropOwnProps>;
|
|
13
14
|
export type PopoverOverlayProps = PopoverBackdropProps;
|
|
14
15
|
declare const PopoverBackdrop: import("svelte").Component<PopoverBackdropProps, {}, "element">;
|
|
15
16
|
export default PopoverBackdrop;
|