@pzerelles/headlessui-svelte 2.1.2-next.33 → 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 +9 -11
- package/dist/button/Button.svelte.d.ts +4 -3
- package/dist/button/index.d.ts +1 -1
- package/dist/button/index.js +1 -1
- package/dist/checkbox/Checkbox.svelte +16 -14
- package/dist/checkbox/Checkbox.svelte.d.ts +4 -3
- package/dist/checkbox/index.d.ts +1 -1
- package/dist/checkbox/index.js +1 -1
- package/dist/close-button/index.d.ts +1 -0
- package/dist/close-button/index.js +1 -0
- package/dist/data-interactive/DataInteractive.svelte +1 -1
- package/dist/data-interactive/DataInteractive.svelte.d.ts +1 -1
- package/dist/data-interactive/index.d.ts +1 -1
- package/dist/data-interactive/index.js +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 +4 -7
- package/dist/dialog/DialogBackdrop.svelte.d.ts +4 -3
- package/dist/dialog/DialogPanel.svelte +8 -11
- package/dist/dialog/DialogPanel.svelte.d.ts +4 -3
- package/dist/dialog/DialogTitle.svelte +4 -7
- package/dist/dialog/DialogTitle.svelte.d.ts +4 -3
- package/dist/dialog/context.svelte.js +1 -1
- package/dist/dialog/index.d.ts +4 -4
- package/dist/dialog/index.js +4 -4
- package/dist/field/Field.svelte +6 -10
- package/dist/field/Field.svelte.d.ts +3 -3
- package/dist/field/index.d.ts +1 -1
- package/dist/fieldset/Fieldset.svelte +6 -9
- package/dist/fieldset/Fieldset.svelte.d.ts +3 -3
- package/dist/fieldset/index.d.ts +1 -1
- package/dist/focus-trap/FocusTrap.svelte +12 -15
- package/dist/focus-trap/FocusTrap.svelte.d.ts +3 -3
- package/dist/input/Input.svelte +11 -13
- package/dist/input/Input.svelte.d.ts +4 -3
- package/dist/input/index.d.ts +1 -1
- package/dist/input/index.js +1 -1
- package/dist/internal/Hidden.svelte +1 -1
- package/dist/internal/Hidden.svelte.d.ts +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 +17 -16
- package/dist/listbox/Listbox.svelte.d.ts +4 -3
- package/dist/listbox/ListboxButton.svelte +9 -12
- package/dist/listbox/ListboxButton.svelte.d.ts +4 -3
- package/dist/listbox/ListboxOption.svelte +9 -7
- package/dist/listbox/ListboxOption.svelte.d.ts +4 -3
- package/dist/listbox/ListboxOptions.svelte +11 -14
- package/dist/listbox/ListboxOptions.svelte.d.ts +4 -3
- package/dist/listbox/ListboxSelectedOption.svelte +8 -6
- package/dist/listbox/ListboxSelectedOption.svelte.d.ts +4 -3
- package/dist/listbox/index.d.ts +5 -5
- package/dist/listbox/index.js +5 -5
- package/dist/menu/Menu.svelte +6 -7
- package/dist/menu/Menu.svelte.d.ts +4 -3
- package/dist/menu/MenuButton.svelte +10 -12
- package/dist/menu/MenuButton.svelte.d.ts +4 -3
- package/dist/menu/MenuHeading.svelte +7 -10
- package/dist/menu/MenuHeading.svelte.d.ts +3 -3
- package/dist/menu/MenuItem.svelte +8 -10
- package/dist/menu/MenuItem.svelte.d.ts +4 -3
- package/dist/menu/MenuItems.svelte +11 -13
- package/dist/menu/MenuItems.svelte.d.ts +4 -3
- package/dist/menu/MenuSection.svelte +6 -8
- package/dist/menu/MenuSection.svelte.d.ts +3 -3
- package/dist/menu/MenuSeparator.svelte +6 -8
- package/dist/menu/MenuSeparator.svelte.d.ts +3 -3
- package/dist/menu/index.d.ts +7 -7
- package/dist/menu/index.js +3 -3
- package/dist/popover/Popover.svelte +7 -9
- package/dist/popover/Popover.svelte.d.ts +4 -3
- package/dist/popover/PopoverBackdrop.svelte +8 -10
- package/dist/popover/PopoverBackdrop.svelte.d.ts +4 -3
- package/dist/popover/PopoverButton.svelte +8 -10
- package/dist/popover/PopoverButton.svelte.d.ts +3 -2
- package/dist/popover/PopoverGroup.svelte +6 -11
- package/dist/popover/PopoverGroup.svelte.d.ts +3 -3
- package/dist/popover/PopoverPanel.svelte +16 -18
- package/dist/popover/PopoverPanel.svelte.d.ts +4 -3
- package/dist/popover/index.d.ts +5 -5
- package/dist/popover/index.js +3 -3
- package/dist/portal/InternalPortal.svelte +1 -2
- package/dist/portal/InternalPortal.svelte.d.ts +1 -1
- package/dist/portal/PortalGroup.svelte +1 -1
- package/dist/portal/PortalGroup.svelte.d.ts +1 -1
- package/dist/select/Select.svelte +10 -12
- package/dist/select/Select.svelte.d.ts +4 -3
- package/dist/select/index.d.ts +1 -1
- package/dist/select/index.js +1 -1
- package/dist/switch/Switch.svelte +16 -18
- package/dist/switch/Switch.svelte.d.ts +4 -3
- package/dist/switch/index.d.ts +1 -1
- package/dist/switch/index.js +1 -1
- package/dist/tabs/Tab.svelte +9 -11
- package/dist/tabs/Tab.svelte.d.ts +4 -3
- package/dist/tabs/TabGroup.svelte +11 -13
- package/dist/tabs/TabGroup.svelte.d.ts +4 -3
- package/dist/tabs/TabList.svelte +6 -8
- package/dist/tabs/TabList.svelte.d.ts +4 -3
- package/dist/tabs/TabPanel.svelte +8 -7
- package/dist/tabs/TabPanel.svelte.d.ts +4 -3
- package/dist/tabs/TabPanels.svelte +4 -2
- package/dist/tabs/TabPanels.svelte.d.ts +4 -3
- package/dist/tabs/index.d.ts +5 -5
- package/dist/tabs/index.js +4 -4
- package/dist/textarea/Textarea.svelte +11 -10
- package/dist/textarea/Textarea.svelte.d.ts +4 -3
- 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 +2 -2
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare const DEFAULT_ITEM_TAG: "button";
|
|
3
|
-
type ItemRenderPropArg = {
|
|
3
|
+
export type ItemRenderPropArg = {
|
|
4
4
|
/** @deprecated use `focus` instead */
|
|
5
5
|
active: boolean;
|
|
6
6
|
focus: boolean;
|
|
@@ -8,10 +8,11 @@ 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;
|
|
@@ -9,25 +9,23 @@
|
|
|
9
9
|
} from "../internal/floating.svelte.js"
|
|
10
10
|
|
|
11
11
|
const DEFAULT_ITEMS_TAG = "div" as const
|
|
12
|
-
type ItemsRenderPropArg = {
|
|
12
|
+
export type ItemsRenderPropArg = {
|
|
13
13
|
open: boolean
|
|
14
14
|
}
|
|
15
15
|
type ItemsPropsWeControl = "aria-activedescendant" | "aria-labelledby" | "role" | "tabIndex"
|
|
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">
|
|
@@ -2,17 +2,18 @@ import type { Props } from "../utils/types.js";
|
|
|
2
2
|
import { type PropsForFeatures } from "../utils/render.js";
|
|
3
3
|
import { type AnchorProps } from "../internal/floating.svelte.js";
|
|
4
4
|
declare const DEFAULT_ITEMS_TAG: "div";
|
|
5
|
-
type ItemsRenderPropArg = {
|
|
5
|
+
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;
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
import type { Props } from "../utils/types.js"
|
|
3
3
|
|
|
4
4
|
const DEFAULT_SECTION_TAG = "div" as const
|
|
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,8 +1,8 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare const DEFAULT_SECTION_TAG: "div";
|
|
3
|
-
type
|
|
4
|
-
export type MenuSectionProps = Props<typeof DEFAULT_SECTION_TAG, SectionRenderPropArg, {
|
|
3
|
+
export type MenuSectionOwnProps = {
|
|
5
4
|
element?: HTMLElement;
|
|
6
|
-
}
|
|
5
|
+
};
|
|
6
|
+
export type MenuSectionProps = Props<typeof DEFAULT_SECTION_TAG, {}, MenuSectionOwnProps>;
|
|
7
7
|
declare const MenuSection: import("svelte").Component<MenuSectionProps, {}, "element">;
|
|
8
8
|
export default MenuSection;
|
|
@@ -2,16 +2,14 @@
|
|
|
2
2
|
import type { Props } from "../utils/types.js"
|
|
3
3
|
|
|
4
4
|
const DEFAULT_SEPARATOR_TAG = "div" as const
|
|
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,8 +1,8 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare const DEFAULT_SEPARATOR_TAG: "div";
|
|
3
|
-
type
|
|
4
|
-
export type MenuSeparatorProps = Props<typeof DEFAULT_SEPARATOR_TAG, SeparatorRenderPropArg, {
|
|
3
|
+
export type MenuSeparatorOwnProps = {
|
|
5
4
|
element?: HTMLElement;
|
|
6
|
-
}
|
|
5
|
+
};
|
|
6
|
+
export type MenuSeparatorProps = Props<typeof DEFAULT_SEPARATOR_TAG, {}, MenuSeparatorOwnProps>;
|
|
7
7
|
declare const MenuSeparator: import("svelte").Component<MenuSeparatorProps, {}, "element">;
|
|
8
8
|
export default MenuSeparator;
|
package/dist/menu/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { default as Menu, type MenuProps } from "./Menu.svelte";
|
|
2
|
-
export { default as MenuButton, type MenuButtonProps } from "./MenuButton.svelte";
|
|
3
|
-
export { default as MenuHeading, type MenuHeadingProps } from "./MenuHeading.svelte";
|
|
4
|
-
export { default as MenuItem, type MenuItemProps } from "./MenuItem.svelte";
|
|
5
|
-
export { default as MenuItems, type MenuItemsProps } 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
|
-
export { default as MenuButton } from "./MenuButton.svelte";
|
|
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";
|
|
@@ -2,20 +2,18 @@
|
|
|
2
2
|
import type { Props } from "../utils/types.js"
|
|
3
3
|
|
|
4
4
|
export const DEFAULT_POPOVER_TAG = "div" as const
|
|
5
|
-
type PopoverRenderPropArg = {
|
|
5
|
+
export type PopoverRenderPropArg = {
|
|
6
6
|
open: boolean
|
|
7
7
|
close(focusableElement?: HTMLElement | MouseEvent<HTMLElement>): void
|
|
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">
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
export declare const DEFAULT_POPOVER_TAG: "div";
|
|
3
|
-
type PopoverRenderPropArg = {
|
|
3
|
+
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;
|
|
@@ -3,22 +3,20 @@
|
|
|
3
3
|
import { RenderFeatures, type PropsForFeatures } from "../utils/render.js"
|
|
4
4
|
|
|
5
5
|
let DEFAULT_BACKDROP_TAG = "div" as const
|
|
6
|
-
type BackdropRenderPropArg = {
|
|
6
|
+
export type BackdropRenderPropArg = {
|
|
7
7
|
open: boolean
|
|
8
8
|
}
|
|
9
9
|
type BackdropPropsWeControl = "aria-hidden"
|
|
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>
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
import { type PropsForFeatures } from "../utils/render.js";
|
|
3
3
|
declare let DEFAULT_BACKDROP_TAG: "div";
|
|
4
|
-
type BackdropRenderPropArg = {
|
|
4
|
+
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;
|
|
@@ -12,16 +12,14 @@
|
|
|
12
12
|
}
|
|
13
13
|
export type PopoverButtonPropsWeControl = "aria-controls" | "aria-expanded"
|
|
14
14
|
|
|
15
|
-
export type
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
>
|
|
15
|
+
export type PopoverButtonOwnProps = {
|
|
16
|
+
element?: HTMLElement
|
|
17
|
+
id?: string
|
|
18
|
+
disabled?: boolean
|
|
19
|
+
autofocus?: boolean
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export type PopoverButtonProps = Props<typeof DEFAULT_BUTTON_TAG, PopoverButtonSlot, PopoverButtonOwnProps>
|
|
25
23
|
</script>
|
|
26
24
|
|
|
27
25
|
<script lang="ts">
|
|
@@ -9,11 +9,12 @@ export type PopoverButtonSlot = {
|
|
|
9
9
|
autofocus: boolean;
|
|
10
10
|
};
|
|
11
11
|
export type PopoverButtonPropsWeControl = "aria-controls" | "aria-expanded";
|
|
12
|
-
export type
|
|
12
|
+
export type PopoverButtonOwnProps = {
|
|
13
13
|
element?: HTMLElement;
|
|
14
14
|
id?: string;
|
|
15
15
|
disabled?: boolean;
|
|
16
16
|
autofocus?: boolean;
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
|
+
export type PopoverButtonProps = Props<typeof DEFAULT_BUTTON_TAG, PopoverButtonSlot, PopoverButtonOwnProps>;
|
|
18
19
|
declare const PopoverButton: import("svelte").Component<PopoverButtonProps, {}, "element">;
|
|
19
20
|
export default PopoverButton;
|
|
@@ -3,15 +3,12 @@
|
|
|
3
3
|
import { setContext } from "svelte"
|
|
4
4
|
|
|
5
5
|
const DEFAULT_GROUP_TAG = "div" as const
|
|
6
|
-
type GroupRenderPropArg = {}
|
|
7
6
|
|
|
8
|
-
export type
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
>
|
|
7
|
+
export type PopoverGroupOwnProps = {
|
|
8
|
+
element?: HTMLElement
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type PopoverGroupProps = Props<typeof DEFAULT_GROUP_TAG, {}, PopoverGroupOwnProps>
|
|
15
12
|
</script>
|
|
16
13
|
|
|
17
14
|
<script lang="ts">
|
|
@@ -62,10 +59,8 @@
|
|
|
62
59
|
isFocusWithinPopoverGroup,
|
|
63
60
|
closeOthers,
|
|
64
61
|
})
|
|
65
|
-
|
|
66
|
-
const slot = {} satisfies GroupRenderPropArg
|
|
67
62
|
</script>
|
|
68
63
|
|
|
69
64
|
<MainTreeProvider>
|
|
70
|
-
<ElementOrComponent {theirProps}
|
|
65
|
+
<ElementOrComponent {theirProps} defaultTag={DEFAULT_GROUP_TAG} name="PopoverGroup" bind:element />
|
|
71
66
|
</MainTreeProvider>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare const DEFAULT_GROUP_TAG: "div";
|
|
3
|
-
type
|
|
4
|
-
export type PopoverGroupProps = Props<typeof DEFAULT_GROUP_TAG, GroupRenderPropArg, {
|
|
3
|
+
export type PopoverGroupOwnProps = {
|
|
5
4
|
element?: HTMLElement;
|
|
6
|
-
}
|
|
5
|
+
};
|
|
6
|
+
export type PopoverGroupProps = Props<typeof DEFAULT_GROUP_TAG, {}, PopoverGroupOwnProps>;
|
|
7
7
|
declare const PopoverGroup: import("svelte").Component<PopoverGroupProps, {}, "element">;
|
|
8
8
|
export default PopoverGroup;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { RenderFeatures } from "../utils/render.js"
|
|
4
4
|
|
|
5
5
|
const DEFAULT_PANEL_TAG = "div" as const
|
|
6
|
-
type PanelRenderPropArg = {
|
|
6
|
+
export type PanelRenderPropArg = {
|
|
7
7
|
open: boolean
|
|
8
8
|
close: (focusableElement?: HTMLElement) => void
|
|
9
9
|
}
|
|
@@ -12,23 +12,21 @@
|
|
|
12
12
|
|
|
13
13
|
type PanelPropsWeControl = "tabIndex"
|
|
14
14
|
|
|
15
|
-
export type
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
>
|
|
15
|
+
export type PopoverPanelOwnProps = {
|
|
16
|
+
element?: HTMLElement
|
|
17
|
+
id?: string
|
|
18
|
+
focus?: boolean
|
|
19
|
+
anchor?: AnchorProps
|
|
20
|
+
portal?: boolean
|
|
21
|
+
modal?: boolean
|
|
22
|
+
transition?: boolean
|
|
23
|
+
|
|
24
|
+
// ItemsRenderFeatures
|
|
25
|
+
static?: boolean
|
|
26
|
+
unmount?: boolean
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export type PopoverPanelProps = Props<typeof DEFAULT_PANEL_TAG, PanelRenderPropArg, PopoverPanelOwnProps>
|
|
32
30
|
</script>
|
|
33
31
|
|
|
34
32
|
<script lang="ts">
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare const DEFAULT_PANEL_TAG: "div";
|
|
3
|
-
type PanelRenderPropArg = {
|
|
3
|
+
export type PanelRenderPropArg = {
|
|
4
4
|
open: boolean;
|
|
5
5
|
close: (focusableElement?: HTMLElement) => void;
|
|
6
6
|
};
|
|
7
|
-
export type
|
|
7
|
+
export type PopoverPanelOwnProps = {
|
|
8
8
|
element?: HTMLElement;
|
|
9
9
|
id?: string;
|
|
10
10
|
focus?: boolean;
|
|
@@ -14,7 +14,8 @@ export type PopoverPanelProps = Props<typeof DEFAULT_PANEL_TAG, PanelRenderPropA
|
|
|
14
14
|
transition?: boolean;
|
|
15
15
|
static?: boolean;
|
|
16
16
|
unmount?: boolean;
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
|
+
export type PopoverPanelProps = Props<typeof DEFAULT_PANEL_TAG, PanelRenderPropArg, PopoverPanelOwnProps>;
|
|
18
19
|
import { type AnchorProps } from "../internal/floating.svelte.js";
|
|
19
20
|
declare const PopoverPanel: import("svelte").Component<PopoverPanelProps, {}, "element">;
|
|
20
21
|
export default PopoverPanel;
|
package/dist/popover/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as Popover, type PopoverProps } from "./Popover.svelte";
|
|
2
|
-
export { default as PopoverBackdrop, type PopoverBackdropProps } from "./PopoverBackdrop.svelte";
|
|
3
|
-
export { default as PopoverButton, type PopoverButtonProps, type PopoverButtonSlot, type
|
|
4
|
-
export { default as PopoverGroup, type PopoverGroupProps } from "./PopoverGroup.svelte";
|
|
5
|
-
export { default as PopoverPanel, type PopoverPanelProps } from "./PopoverPanel.svelte";
|
|
1
|
+
export { default as Popover, type PopoverProps, type PopoverRenderPropArg as PopoverSlot, type PopoverOwnProps, } from "./Popover.svelte";
|
|
2
|
+
export { default as PopoverBackdrop, type PopoverBackdropProps, type BackdropRenderPropArg as PopoverBackdropSlot, type PopoverBackdropOwnProps, } from "./PopoverBackdrop.svelte";
|
|
3
|
+
export { default as PopoverButton, type PopoverButtonProps, type PopoverButtonSlot, type PopoverButtonOwnProps, } from "./PopoverButton.svelte";
|
|
4
|
+
export { default as PopoverGroup, type PopoverGroupProps, type PopoverGroupOwnProps } from "./PopoverGroup.svelte";
|
|
5
|
+
export { default as PopoverPanel, type PopoverPanelProps, type PanelRenderPropArg as PopoverPanelSlot, type PopoverPanelOwnProps, } from "./PopoverPanel.svelte";
|
package/dist/popover/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { default as Popover } from "./Popover.svelte";
|
|
2
|
-
export { default as PopoverBackdrop } from "./PopoverBackdrop.svelte";
|
|
1
|
+
export { default as Popover, } from "./Popover.svelte";
|
|
2
|
+
export { default as PopoverBackdrop, } from "./PopoverBackdrop.svelte";
|
|
3
3
|
export { default as PopoverButton, } from "./PopoverButton.svelte";
|
|
4
4
|
export { default as PopoverGroup } from "./PopoverGroup.svelte";
|
|
5
|
-
export { default as PopoverPanel } from "./PopoverPanel.svelte";
|
|
5
|
+
export { default as PopoverPanel, } from "./PopoverPanel.svelte";
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
import { env } from "../utils/env.js"
|
|
6
6
|
import type { Props } from "../utils/types.js"
|
|
7
7
|
import type { PortalGroupContext } from "./PortalGroup.svelte"
|
|
8
|
-
import type { SvelteHTMLElements } from "svelte/elements"
|
|
9
8
|
|
|
10
9
|
function usePortalTarget(options: { element: HTMLElement | null }): { readonly target: HTMLElement | null } {
|
|
11
10
|
const { element } = $derived(options)
|
|
@@ -94,7 +93,7 @@
|
|
|
94
93
|
// ---
|
|
95
94
|
|
|
96
95
|
export const DEFAULT_PORTAL_TAG = "div"
|
|
97
|
-
type PortalRenderPropArg = {}
|
|
96
|
+
export type PortalRenderPropArg = {}
|
|
98
97
|
type PortalPropsWeControl = never
|
|
99
98
|
|
|
100
99
|
export type PortalProps = Props<
|
|
@@ -6,7 +6,7 @@ type PortalParentContext = {
|
|
|
6
6
|
};
|
|
7
7
|
export declare function useNestedPortals(): PortalParentContext;
|
|
8
8
|
export declare const DEFAULT_PORTAL_TAG = "div";
|
|
9
|
-
type PortalRenderPropArg = {};
|
|
9
|
+
export type PortalRenderPropArg = {};
|
|
10
10
|
export type PortalProps = Props<typeof DEFAULT_PORTAL_TAG, PortalRenderPropArg, {
|
|
11
11
|
element?: HTMLElement;
|
|
12
12
|
enabled?: boolean;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
let DEFAULT_SELECT_TAG = "select" as const
|
|
5
5
|
|
|
6
|
-
type SelectRenderPropArg = {
|
|
6
|
+
export type SelectRenderPropArg = {
|
|
7
7
|
disabled: boolean
|
|
8
8
|
hover: boolean
|
|
9
9
|
focus: boolean
|
|
@@ -13,17 +13,15 @@
|
|
|
13
13
|
}
|
|
14
14
|
type SelectPropsWeControl = "aria-labelledby" | "aria-describedby"
|
|
15
15
|
|
|
16
|
-
export type
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
>
|
|
16
|
+
export type SelectOwnProps = {
|
|
17
|
+
element?: HTMLElement
|
|
18
|
+
id?: string
|
|
19
|
+
disabled?: boolean
|
|
20
|
+
invalid?: boolean
|
|
21
|
+
autofocus?: boolean
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type SelectProps = Props<typeof DEFAULT_SELECT_TAG, SelectRenderPropArg, SelectOwnProps>
|
|
27
25
|
</script>
|
|
28
26
|
|
|
29
27
|
<script lang="ts">
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare let DEFAULT_SELECT_TAG: "select";
|
|
3
|
-
type SelectRenderPropArg = {
|
|
3
|
+
export type SelectRenderPropArg = {
|
|
4
4
|
disabled: boolean;
|
|
5
5
|
hover: boolean;
|
|
6
6
|
focus: boolean;
|
|
@@ -8,12 +8,13 @@ type SelectRenderPropArg = {
|
|
|
8
8
|
autofocus: boolean;
|
|
9
9
|
invalid: boolean;
|
|
10
10
|
};
|
|
11
|
-
export type
|
|
11
|
+
export type SelectOwnProps = {
|
|
12
12
|
element?: HTMLElement;
|
|
13
13
|
id?: string;
|
|
14
14
|
disabled?: boolean;
|
|
15
15
|
invalid?: boolean;
|
|
16
16
|
autofocus?: boolean;
|
|
17
|
-
}
|
|
17
|
+
};
|
|
18
|
+
export type SelectProps = Props<typeof DEFAULT_SELECT_TAG, SelectRenderPropArg, SelectOwnProps>;
|
|
18
19
|
declare const Select: import("svelte").Component<SelectProps, {}, "element">;
|
|
19
20
|
export default Select;
|
package/dist/select/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Select, type SelectProps } from "./Select.svelte";
|
|
1
|
+
export { default as Select, type SelectProps, type SelectRenderPropArg as SelectSlot, type SelectOwnProps, } from "./Select.svelte";
|
package/dist/select/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Select } from "./Select.svelte";
|
|
1
|
+
export { default as Select, } from "./Select.svelte";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { Props } from "../utils/types.js"
|
|
3
3
|
|
|
4
4
|
const DEFAULT_SWITCH_TAG = "button" as const
|
|
5
|
-
type SwitchRenderPropArg = {
|
|
5
|
+
export type SwitchRenderPropArg = {
|
|
6
6
|
checked: boolean
|
|
7
7
|
hover: boolean
|
|
8
8
|
focus: boolean
|
|
@@ -13,23 +13,21 @@
|
|
|
13
13
|
}
|
|
14
14
|
type SwitchPropsWeControl = "aria-checked" | "aria-describedby" | "aria-labelledby" | "role"
|
|
15
15
|
|
|
16
|
-
export type
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
>
|
|
16
|
+
export type SwitchOwnProps = {
|
|
17
|
+
element?: HTMLElement
|
|
18
|
+
id?: string
|
|
19
|
+
checked?: boolean
|
|
20
|
+
defaultChecked?: boolean
|
|
21
|
+
onchange?(checked: boolean): void
|
|
22
|
+
name?: string
|
|
23
|
+
value?: string
|
|
24
|
+
form?: string
|
|
25
|
+
autofocus?: boolean
|
|
26
|
+
disabled?: boolean
|
|
27
|
+
tabIndex?: number
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type SwitchProps = Props<typeof DEFAULT_SWITCH_TAG, SwitchRenderPropArg, SwitchOwnProps>
|
|
33
31
|
</script>
|
|
34
32
|
|
|
35
33
|
<script lang="ts">
|