@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
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
const DEFAULT_BUTTON_TAG = "button" as const
|
|
5
5
|
|
|
6
|
-
type ButtonRenderPropArg = {
|
|
6
|
+
export type ButtonRenderPropArg = {
|
|
7
7
|
disabled: boolean
|
|
8
8
|
hover: boolean
|
|
9
9
|
focus: boolean
|
|
@@ -11,16 +11,14 @@
|
|
|
11
11
|
autofocus: boolean
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export type
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
>
|
|
14
|
+
export type ButtonOwnProps = {
|
|
15
|
+
element?: HTMLElement
|
|
16
|
+
disabled?: boolean
|
|
17
|
+
autofocus?: boolean
|
|
18
|
+
type?: "button" | "submit" | "reset"
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type ButtonProps = Props<typeof DEFAULT_BUTTON_TAG, ButtonRenderPropArg, ButtonOwnProps>
|
|
24
22
|
</script>
|
|
25
23
|
|
|
26
24
|
<script lang="ts">
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare const DEFAULT_BUTTON_TAG: "button";
|
|
3
|
-
type ButtonRenderPropArg = {
|
|
3
|
+
export type ButtonRenderPropArg = {
|
|
4
4
|
disabled: boolean;
|
|
5
5
|
hover: boolean;
|
|
6
6
|
focus: boolean;
|
|
7
7
|
active: boolean;
|
|
8
8
|
autofocus: boolean;
|
|
9
9
|
};
|
|
10
|
-
export type
|
|
10
|
+
export type ButtonOwnProps = {
|
|
11
11
|
element?: HTMLElement;
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
autofocus?: boolean;
|
|
14
14
|
type?: "button" | "submit" | "reset";
|
|
15
|
-
}
|
|
15
|
+
};
|
|
16
|
+
export type ButtonProps = Props<typeof DEFAULT_BUTTON_TAG, ButtonRenderPropArg, ButtonOwnProps>;
|
|
16
17
|
declare const Button: import("svelte").Component<ButtonProps, {}, "element">;
|
|
17
18
|
export default Button;
|
package/dist/button/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Button, type ButtonProps } from "./Button.svelte";
|
|
1
|
+
export { default as Button, type ButtonProps, type ButtonRenderPropArg as ButtonSlot, type ButtonOwnProps, } from "./Button.svelte";
|
package/dist/button/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Button } from "./Button.svelte";
|
|
1
|
+
export { default as Button, } from "./Button.svelte";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
const DEFAULT_CHECKBOX_TAG = "span" as const
|
|
5
5
|
|
|
6
|
-
type CheckboxRenderPropArg = {
|
|
6
|
+
export type CheckboxRenderPropArg = {
|
|
7
7
|
checked: boolean
|
|
8
8
|
changing: boolean
|
|
9
9
|
focus: boolean
|
|
@@ -22,22 +22,24 @@
|
|
|
22
22
|
| "role"
|
|
23
23
|
| "tabIndex"
|
|
24
24
|
|
|
25
|
+
export type CheckboxOwnProps<TType = string> = {
|
|
26
|
+
element?: HTMLElement
|
|
27
|
+
id?: string
|
|
28
|
+
value?: TType
|
|
29
|
+
disabled?: boolean
|
|
30
|
+
indeterminate?: boolean
|
|
31
|
+
checked?: boolean
|
|
32
|
+
defaultChecked?: boolean
|
|
33
|
+
autofocus?: boolean
|
|
34
|
+
form?: string
|
|
35
|
+
name?: string
|
|
36
|
+
onchange?: (checked: boolean) => void
|
|
37
|
+
}
|
|
38
|
+
|
|
25
39
|
export type CheckboxProps<TType = string> = Props<
|
|
26
40
|
typeof DEFAULT_CHECKBOX_TAG,
|
|
27
41
|
CheckboxRenderPropArg,
|
|
28
|
-
|
|
29
|
-
element?: HTMLElement
|
|
30
|
-
id?: string
|
|
31
|
-
value?: TType
|
|
32
|
-
disabled?: boolean
|
|
33
|
-
indeterminate?: boolean
|
|
34
|
-
checked?: boolean
|
|
35
|
-
defaultChecked?: boolean
|
|
36
|
-
autofocus?: boolean
|
|
37
|
-
form?: string
|
|
38
|
-
name?: string
|
|
39
|
-
onchange?: (checked: boolean) => void
|
|
40
|
-
}
|
|
42
|
+
CheckboxOwnProps<TType>
|
|
41
43
|
>
|
|
42
44
|
</script>
|
|
43
45
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare const DEFAULT_CHECKBOX_TAG: "span";
|
|
3
|
-
type CheckboxRenderPropArg = {
|
|
3
|
+
export type CheckboxRenderPropArg = {
|
|
4
4
|
checked: boolean;
|
|
5
5
|
changing: boolean;
|
|
6
6
|
focus: boolean;
|
|
@@ -10,7 +10,7 @@ type CheckboxRenderPropArg = {
|
|
|
10
10
|
disabled: boolean;
|
|
11
11
|
indeterminate: boolean;
|
|
12
12
|
};
|
|
13
|
-
export type
|
|
13
|
+
export type CheckboxOwnProps<TType = string> = {
|
|
14
14
|
element?: HTMLElement;
|
|
15
15
|
id?: string;
|
|
16
16
|
value?: TType;
|
|
@@ -22,7 +22,8 @@ export type CheckboxProps<TType = string> = Props<typeof DEFAULT_CHECKBOX_TAG, C
|
|
|
22
22
|
form?: string;
|
|
23
23
|
name?: string;
|
|
24
24
|
onchange?: (checked: boolean) => void;
|
|
25
|
-
}
|
|
25
|
+
};
|
|
26
|
+
export type CheckboxProps<TType = string> = Props<typeof DEFAULT_CHECKBOX_TAG, CheckboxRenderPropArg, CheckboxOwnProps<TType>>;
|
|
26
27
|
declare class __sveltets_Render<TType> {
|
|
27
28
|
props(): CheckboxProps<TType>;
|
|
28
29
|
events(): {};
|
package/dist/checkbox/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Checkbox, type CheckboxProps } from "./Checkbox.svelte";
|
|
1
|
+
export { default as Checkbox, type CheckboxProps, type CheckboxRenderPropArg as CheckboxSlot, type CheckboxOwnProps, } from "./Checkbox.svelte";
|
package/dist/checkbox/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Checkbox } from "./Checkbox.svelte";
|
|
1
|
+
export { default as Checkbox, } from "./Checkbox.svelte";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as DataInteractive, type DataInteractiveProps } from "./DataInteractive.svelte";
|
|
1
|
+
export { default as DataInteractive, type DataInteractiveProps, type DataInteractiveRenderPropArg as DataInteractiveSlot, } from "./DataInteractive.svelte";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as DataInteractive } from "./DataInteractive.svelte";
|
|
1
|
+
export { default as DataInteractive, } from "./DataInteractive.svelte";
|
|
@@ -3,14 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
const DEFAULT_DESCRIPTION_TAG = "p" as const
|
|
5
5
|
|
|
6
|
-
export type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
>
|
|
6
|
+
export type DescriptionOwnProps = {
|
|
7
|
+
id?: string
|
|
8
|
+
element?: HTMLElement
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type DescriptionProps = Props<typeof DEFAULT_DESCRIPTION_TAG, {}, DescriptionOwnProps>
|
|
14
12
|
</script>
|
|
15
13
|
|
|
16
14
|
<script lang="ts">
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare const DEFAULT_DESCRIPTION_TAG: "p";
|
|
3
|
-
export type
|
|
3
|
+
export type DescriptionOwnProps = {
|
|
4
4
|
id?: string;
|
|
5
5
|
element?: HTMLElement;
|
|
6
|
-
}
|
|
6
|
+
};
|
|
7
|
+
export type DescriptionProps = Props<typeof DEFAULT_DESCRIPTION_TAG, {}, DescriptionOwnProps>;
|
|
7
8
|
declare const Description: import("svelte").Component<DescriptionProps, {}, "element">;
|
|
8
9
|
export default Description;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Description, type DescriptionProps } from "./Description.svelte";
|
|
1
|
+
export { default as Description, type DescriptionProps, type DescriptionOwnProps } from "./Description.svelte";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import type { Props } from "../utils/types.js"
|
|
3
3
|
import { RenderFeatures, type PropsForFeatures } from "../utils/render.js"
|
|
4
|
-
import type { SvelteHTMLElements } from "svelte/elements"
|
|
5
4
|
|
|
6
5
|
export const DEFAULT_DIALOG_TAG = "div" as const
|
|
7
6
|
|
|
@@ -12,21 +11,19 @@
|
|
|
12
11
|
|
|
13
12
|
export const DialogRenderFeatures = RenderFeatures.RenderStrategy | RenderFeatures.Static
|
|
14
13
|
|
|
15
|
-
export type
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
29
|
-
>
|
|
14
|
+
export type DialogOwnProps = PropsForFeatures<typeof DialogRenderFeatures> & {
|
|
15
|
+
element?: HTMLElement
|
|
16
|
+
id?: string
|
|
17
|
+
open?: boolean
|
|
18
|
+
onclose(value: boolean): void
|
|
19
|
+
initialFocus?: HTMLElement
|
|
20
|
+
role?: "dialog" | "alertdialog"
|
|
21
|
+
autofocus?: boolean
|
|
22
|
+
transition?: boolean
|
|
23
|
+
__demoMode?: boolean
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export type DialogProps = Props<typeof DEFAULT_DIALOG_TAG, DialogRenderPropArg, DialogOwnProps>
|
|
30
27
|
</script>
|
|
31
28
|
|
|
32
29
|
<script lang="ts">
|
|
@@ -5,7 +5,7 @@ export type DialogRenderPropArg = {
|
|
|
5
5
|
open: boolean;
|
|
6
6
|
};
|
|
7
7
|
export declare const DialogRenderFeatures: number;
|
|
8
|
-
export type
|
|
8
|
+
export type DialogOwnProps = PropsForFeatures<typeof DialogRenderFeatures> & {
|
|
9
9
|
element?: HTMLElement;
|
|
10
10
|
id?: string;
|
|
11
11
|
open?: boolean;
|
|
@@ -15,6 +15,7 @@ export type DialogProps = Props<typeof DEFAULT_DIALOG_TAG, DialogRenderPropArg,
|
|
|
15
15
|
autofocus?: boolean;
|
|
16
16
|
transition?: boolean;
|
|
17
17
|
__demoMode?: boolean;
|
|
18
|
-
}
|
|
18
|
+
};
|
|
19
|
+
export type DialogProps = Props<typeof DEFAULT_DIALOG_TAG, DialogRenderPropArg, DialogOwnProps>;
|
|
19
20
|
declare const Dialog: import("svelte").Component<DialogProps, {}, "element">;
|
|
20
21
|
export default Dialog;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import type { Props } from "../utils/types.js"
|
|
3
|
-
import type { SvelteHTMLElements } from "svelte/elements"
|
|
4
3
|
|
|
5
4
|
let DEFAULT_BACKDROP_TAG = "div" as const
|
|
6
|
-
type BackdropRenderPropArg = {
|
|
5
|
+
export type BackdropRenderPropArg = {
|
|
7
6
|
open: boolean
|
|
8
7
|
}
|
|
9
8
|
|
|
10
|
-
export type
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{ transition?: boolean; element?: HTMLElement }
|
|
14
|
-
>
|
|
9
|
+
export type DialogBackdropOwnProps = { transition?: boolean; element?: HTMLElement }
|
|
10
|
+
|
|
11
|
+
export type DialogBackdropProps = Props<typeof DEFAULT_BACKDROP_TAG, BackdropRenderPropArg, DialogBackdropOwnProps>
|
|
15
12
|
</script>
|
|
16
13
|
|
|
17
14
|
<script lang="ts">
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare let DEFAULT_BACKDROP_TAG: "div";
|
|
3
|
-
type BackdropRenderPropArg = {
|
|
3
|
+
export type BackdropRenderPropArg = {
|
|
4
4
|
open: boolean;
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
6
|
+
export type DialogBackdropOwnProps = {
|
|
7
7
|
transition?: boolean;
|
|
8
8
|
element?: HTMLElement;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
|
+
export type DialogBackdropProps = Props<typeof DEFAULT_BACKDROP_TAG, BackdropRenderPropArg, DialogBackdropOwnProps>;
|
|
10
11
|
declare const DialogBackdrop: import("svelte").Component<DialogBackdropProps, {}, "element">;
|
|
11
12
|
export default DialogBackdrop;
|
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import type { Props } from "../utils/types.js"
|
|
3
|
-
import type { SvelteHTMLElements } from "svelte/elements"
|
|
4
3
|
|
|
5
4
|
let DEFAULT_PANEL_TAG = "div" as const
|
|
6
|
-
type PanelRenderPropArg = {
|
|
5
|
+
export type PanelRenderPropArg = {
|
|
7
6
|
open: boolean
|
|
8
7
|
}
|
|
9
8
|
|
|
10
|
-
export type
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
>
|
|
9
|
+
export type DialogPanelOwnProps = {
|
|
10
|
+
element?: HTMLElement
|
|
11
|
+
id?: string
|
|
12
|
+
transition?: boolean
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type DialogPanelProps = Props<typeof DEFAULT_PANEL_TAG, PanelRenderPropArg, DialogPanelOwnProps>
|
|
19
16
|
</script>
|
|
20
17
|
|
|
21
18
|
<script lang="ts">
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare let DEFAULT_PANEL_TAG: "div";
|
|
3
|
-
type PanelRenderPropArg = {
|
|
3
|
+
export type PanelRenderPropArg = {
|
|
4
4
|
open: boolean;
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
6
|
+
export type DialogPanelOwnProps = {
|
|
7
7
|
element?: HTMLElement;
|
|
8
8
|
id?: string;
|
|
9
9
|
transition?: boolean;
|
|
10
|
-
}
|
|
10
|
+
};
|
|
11
|
+
export type DialogPanelProps = Props<typeof DEFAULT_PANEL_TAG, PanelRenderPropArg, DialogPanelOwnProps>;
|
|
11
12
|
declare const DialogPanel: import("svelte").Component<DialogPanelProps, {}, "element">;
|
|
12
13
|
export default DialogPanel;
|
|
@@ -1,17 +1,14 @@
|
|
|
1
1
|
<script lang="ts" module>
|
|
2
2
|
import type { Props } from "../utils/types.js"
|
|
3
|
-
import type { SvelteHTMLElements } from "svelte/elements"
|
|
4
3
|
|
|
5
4
|
let DEFAULT_TITLE_TAG = "h2" as const
|
|
6
|
-
type TitleRenderPropArg = {
|
|
5
|
+
export type TitleRenderPropArg = {
|
|
7
6
|
open: boolean
|
|
8
7
|
}
|
|
9
8
|
|
|
10
|
-
export type
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
{ id?: string; element?: HTMLElement }
|
|
14
|
-
>
|
|
9
|
+
export type DialogTitleOwnProps = { id?: string; element?: HTMLElement }
|
|
10
|
+
|
|
11
|
+
export type DialogTitleProps = Props<typeof DEFAULT_TITLE_TAG, TitleRenderPropArg, DialogTitleOwnProps>
|
|
15
12
|
|
|
16
13
|
//
|
|
17
14
|
</script>
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare let DEFAULT_TITLE_TAG: "h2";
|
|
3
|
-
type TitleRenderPropArg = {
|
|
3
|
+
export type TitleRenderPropArg = {
|
|
4
4
|
open: boolean;
|
|
5
5
|
};
|
|
6
|
-
export type
|
|
6
|
+
export type DialogTitleOwnProps = {
|
|
7
7
|
id?: string;
|
|
8
8
|
element?: HTMLElement;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
|
+
export type DialogTitleProps = Props<typeof DEFAULT_TITLE_TAG, TitleRenderPropArg, DialogTitleOwnProps>;
|
|
10
11
|
declare const DialogTitle: import("svelte").Component<DialogTitleProps, {}, "element">;
|
|
11
12
|
export default DialogTitle;
|
|
@@ -7,7 +7,7 @@ export var DialogStates;
|
|
|
7
7
|
export function useDialogContext(component) {
|
|
8
8
|
const context = getContext("DialogContext");
|
|
9
9
|
if (!context) {
|
|
10
|
-
|
|
10
|
+
const err = new Error(`<${component} /> is missing a parent <Dialog /> component.`);
|
|
11
11
|
if (Error.captureStackTrace)
|
|
12
12
|
Error.captureStackTrace(err, useDialogContext);
|
|
13
13
|
throw err;
|
package/dist/dialog/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as Dialog, type DialogProps } from "./Dialog.svelte";
|
|
2
|
-
export { default as DialogBackdrop, type DialogBackdropProps } from "./DialogBackdrop.svelte";
|
|
3
|
-
export { default as DialogPanel, type DialogPanelProps } from "./DialogPanel.svelte";
|
|
4
|
-
export { default as DialogTitle, type DialogTitleProps } from "./DialogTitle.svelte";
|
|
1
|
+
export { default as Dialog, type DialogProps, type DialogRenderPropArg as DialogSlot, type DialogOwnProps, } from "./Dialog.svelte";
|
|
2
|
+
export { default as DialogBackdrop, type DialogBackdropProps, type BackdropRenderPropArg as DialogBackdropSlot, type DialogBackdropOwnProps, } from "./DialogBackdrop.svelte";
|
|
3
|
+
export { default as DialogPanel, type DialogPanelProps, type PanelRenderPropArg as DialogPanelSlot, type DialogPanelOwnProps, } from "./DialogPanel.svelte";
|
|
4
|
+
export { default as DialogTitle, type DialogTitleProps, type TitleRenderPropArg as DialogTitleSlot, type DialogTitleOwnProps, } from "./DialogTitle.svelte";
|
package/dist/dialog/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { default as Dialog } from "./Dialog.svelte";
|
|
2
|
-
export { default as DialogBackdrop } from "./DialogBackdrop.svelte";
|
|
3
|
-
export { default as DialogPanel } from "./DialogPanel.svelte";
|
|
4
|
-
export { default as DialogTitle } from "./DialogTitle.svelte";
|
|
1
|
+
export { default as Dialog, } from "./Dialog.svelte";
|
|
2
|
+
export { default as DialogBackdrop, } from "./DialogBackdrop.svelte";
|
|
3
|
+
export { default as DialogPanel, } from "./DialogPanel.svelte";
|
|
4
|
+
export { default as DialogTitle, } from "./DialogTitle.svelte";
|
package/dist/field/Field.svelte
CHANGED
|
@@ -3,16 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
let DEFAULT_FIELD_TAG = "div" as const
|
|
5
5
|
|
|
6
|
-
type
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
element?: HTMLElement
|
|
13
|
-
disabled?: boolean
|
|
14
|
-
}
|
|
15
|
-
>
|
|
6
|
+
export type FieldOwnProps = {
|
|
7
|
+
element?: HTMLElement
|
|
8
|
+
disabled?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export type FieldProps = Props<typeof DEFAULT_FIELD_TAG, {}, FieldOwnProps>
|
|
16
12
|
</script>
|
|
17
13
|
|
|
18
14
|
<script lang="ts">
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare let DEFAULT_FIELD_TAG: "div";
|
|
3
|
-
type
|
|
4
|
-
export type FieldProps = Props<typeof DEFAULT_FIELD_TAG, FieldRenderPropArg, {
|
|
3
|
+
export type FieldOwnProps = {
|
|
5
4
|
element?: HTMLElement;
|
|
6
5
|
disabled?: boolean;
|
|
7
|
-
}
|
|
6
|
+
};
|
|
7
|
+
export type FieldProps = Props<typeof DEFAULT_FIELD_TAG, {}, FieldOwnProps>;
|
|
8
8
|
declare const Field: import("svelte").Component<FieldProps, {}, "element">;
|
|
9
9
|
export default Field;
|
package/dist/field/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Field, type FieldProps } from "./Field.svelte";
|
|
1
|
+
export { default as Field, type FieldProps, type FieldOwnProps } from "./Field.svelte";
|
|
@@ -3,17 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
const DEFAULT_FIELDSET_TAG = "fieldset" as const
|
|
5
5
|
|
|
6
|
-
type FieldsetRenderPropArg = {}
|
|
7
6
|
type FieldsetPropsWeControl = "aria-labelledby" | "aria-disabled" | "role"
|
|
8
7
|
|
|
9
|
-
export type
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
>
|
|
8
|
+
export type FieldsetOwnProps = {
|
|
9
|
+
element?: HTMLElement
|
|
10
|
+
disabled?: boolean
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type FieldsetProps = Props<typeof DEFAULT_FIELDSET_TAG, {}, FieldsetOwnProps>
|
|
17
14
|
</script>
|
|
18
15
|
|
|
19
16
|
<script lang="ts">
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { Props } from "../utils/types.js";
|
|
2
2
|
declare const DEFAULT_FIELDSET_TAG: "fieldset";
|
|
3
|
-
type
|
|
4
|
-
export type FieldsetProps = Props<typeof DEFAULT_FIELDSET_TAG, FieldsetRenderPropArg, {
|
|
3
|
+
export type FieldsetOwnProps = {
|
|
5
4
|
element?: HTMLElement;
|
|
6
5
|
disabled?: boolean;
|
|
7
|
-
}
|
|
6
|
+
};
|
|
7
|
+
export type FieldsetProps = Props<typeof DEFAULT_FIELDSET_TAG, {}, FieldsetOwnProps>;
|
|
8
8
|
declare const Fieldset: import("svelte").Component<FieldsetProps, {}, "element">;
|
|
9
9
|
export default Fieldset;
|
package/dist/fieldset/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as Fieldset, type FieldsetProps } from "./Fieldset.svelte";
|
|
1
|
+
export { default as Fieldset, type FieldsetProps, type FieldsetOwnProps } from "./Fieldset.svelte";
|
|
@@ -39,23 +39,20 @@
|
|
|
39
39
|
|
|
40
40
|
export * from "./FocusTrapFeatures.js"
|
|
41
41
|
|
|
42
|
-
type FocusTrapRenderPropArg = {}
|
|
43
42
|
type FocusTrapPropsWeControl = never
|
|
44
43
|
|
|
45
|
-
export type
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
>
|
|
44
|
+
export type FocusTrapOwnProps = {
|
|
45
|
+
element?: HTMLElement
|
|
46
|
+
initialFocus?: HTMLElement
|
|
47
|
+
// A fallback element to focus, but this element will be skipped when tabbing around. This is
|
|
48
|
+
// only done for focusing a fallback parent container (e.g.: A `Dialog`, but you want to tab
|
|
49
|
+
// *inside* the dialog excluding the dialog itself).
|
|
50
|
+
initialFocusFallback?: HTMLElement
|
|
51
|
+
features?: FocusTrapFeatures
|
|
52
|
+
containers?: Containers
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export type FocusTrapProps = Props<typeof DEFAULT_FOCUS_TRAP_TAG, {}, FocusTrapOwnProps>
|
|
59
56
|
|
|
60
57
|
function useRestoreElement(options?: { enabled: boolean }) {
|
|
61
58
|
const { enabled } = $derived(options ?? { enabled: true })
|
|
@@ -3,13 +3,13 @@ import { FocusTrapFeatures } from "./FocusTrapFeatures.js";
|
|
|
3
3
|
type Containers = (() => Iterable<HTMLElement>) | Iterable<HTMLElement>;
|
|
4
4
|
declare const DEFAULT_FOCUS_TRAP_TAG: "div";
|
|
5
5
|
export * from "./FocusTrapFeatures.js";
|
|
6
|
-
type
|
|
7
|
-
export type FocusTrapProps = Props<typeof DEFAULT_FOCUS_TRAP_TAG, FocusTrapRenderPropArg, {
|
|
6
|
+
export type FocusTrapOwnProps = {
|
|
8
7
|
element?: HTMLElement;
|
|
9
8
|
initialFocus?: HTMLElement;
|
|
10
9
|
initialFocusFallback?: HTMLElement;
|
|
11
10
|
features?: FocusTrapFeatures;
|
|
12
11
|
containers?: Containers;
|
|
13
|
-
}
|
|
12
|
+
};
|
|
13
|
+
export type FocusTrapProps = Props<typeof DEFAULT_FOCUS_TRAP_TAG, {}, FocusTrapOwnProps>;
|
|
14
14
|
declare const FocusTrap: import("svelte").Component<FocusTrapProps, {}, "element">;
|
|
15
15
|
export default FocusTrap;
|
package/dist/input/Input.svelte
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
const DEFAULT_INPUT_TAG = "input" as const
|
|
6
6
|
|
|
7
|
-
type InputRenderPropArg = {
|
|
7
|
+
export type InputRenderPropArg = {
|
|
8
8
|
disabled: boolean
|
|
9
9
|
hover: boolean
|
|
10
10
|
focus: boolean
|
|
@@ -13,18 +13,16 @@
|
|
|
13
13
|
}
|
|
14
14
|
type InputPropsWeControl = "aria-labelledby" | "aria-describedby"
|
|
15
15
|
|
|
16
|
-
export type
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
>
|
|
16
|
+
export type InputOwnProps<TValue = string> = {
|
|
17
|
+
element?: HTMLElement
|
|
18
|
+
id?: string
|
|
19
|
+
value?: TValue
|
|
20
|
+
disabled?: boolean
|
|
21
|
+
invalid?: boolean
|
|
22
|
+
autofocus?: boolean
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export type InputProps<TValue = string> = Props<typeof DEFAULT_INPUT_TAG, InputRenderPropArg, InputOwnProps<TValue>>
|
|
28
26
|
</script>
|
|
29
27
|
|
|
30
28
|
<script lang="ts" generics="TValue = string">
|