@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.
Files changed (122) hide show
  1. package/dist/button/Button.svelte +9 -11
  2. package/dist/button/Button.svelte.d.ts +4 -3
  3. package/dist/button/index.d.ts +1 -1
  4. package/dist/button/index.js +1 -1
  5. package/dist/checkbox/Checkbox.svelte +16 -14
  6. package/dist/checkbox/Checkbox.svelte.d.ts +4 -3
  7. package/dist/checkbox/index.d.ts +1 -1
  8. package/dist/checkbox/index.js +1 -1
  9. package/dist/close-button/index.d.ts +1 -0
  10. package/dist/close-button/index.js +1 -0
  11. package/dist/data-interactive/DataInteractive.svelte +1 -1
  12. package/dist/data-interactive/DataInteractive.svelte.d.ts +1 -1
  13. package/dist/data-interactive/index.d.ts +1 -1
  14. package/dist/data-interactive/index.js +1 -1
  15. package/dist/description/Description.svelte +6 -8
  16. package/dist/description/Description.svelte.d.ts +3 -2
  17. package/dist/description/index.d.ts +1 -1
  18. package/dist/dialog/Dialog.svelte +13 -16
  19. package/dist/dialog/Dialog.svelte.d.ts +3 -2
  20. package/dist/dialog/DialogBackdrop.svelte +4 -7
  21. package/dist/dialog/DialogBackdrop.svelte.d.ts +4 -3
  22. package/dist/dialog/DialogPanel.svelte +8 -11
  23. package/dist/dialog/DialogPanel.svelte.d.ts +4 -3
  24. package/dist/dialog/DialogTitle.svelte +4 -7
  25. package/dist/dialog/DialogTitle.svelte.d.ts +4 -3
  26. package/dist/dialog/context.svelte.js +1 -1
  27. package/dist/dialog/index.d.ts +4 -4
  28. package/dist/dialog/index.js +4 -4
  29. package/dist/field/Field.svelte +6 -10
  30. package/dist/field/Field.svelte.d.ts +3 -3
  31. package/dist/field/index.d.ts +1 -1
  32. package/dist/fieldset/Fieldset.svelte +6 -9
  33. package/dist/fieldset/Fieldset.svelte.d.ts +3 -3
  34. package/dist/fieldset/index.d.ts +1 -1
  35. package/dist/focus-trap/FocusTrap.svelte +12 -15
  36. package/dist/focus-trap/FocusTrap.svelte.d.ts +3 -3
  37. package/dist/input/Input.svelte +11 -13
  38. package/dist/input/Input.svelte.d.ts +4 -3
  39. package/dist/input/index.d.ts +1 -1
  40. package/dist/input/index.js +1 -1
  41. package/dist/internal/Hidden.svelte +1 -1
  42. package/dist/internal/Hidden.svelte.d.ts +1 -1
  43. package/dist/label/Label.svelte +8 -10
  44. package/dist/label/Label.svelte.d.ts +3 -2
  45. package/dist/label/index.d.ts +1 -1
  46. package/dist/legend/Legend.svelte +6 -8
  47. package/dist/legend/Legend.svelte.d.ts +3 -2
  48. package/dist/listbox/Listbox.svelte +17 -16
  49. package/dist/listbox/Listbox.svelte.d.ts +4 -3
  50. package/dist/listbox/ListboxButton.svelte +9 -12
  51. package/dist/listbox/ListboxButton.svelte.d.ts +4 -3
  52. package/dist/listbox/ListboxOption.svelte +9 -7
  53. package/dist/listbox/ListboxOption.svelte.d.ts +4 -3
  54. package/dist/listbox/ListboxOptions.svelte +11 -14
  55. package/dist/listbox/ListboxOptions.svelte.d.ts +4 -3
  56. package/dist/listbox/ListboxSelectedOption.svelte +8 -6
  57. package/dist/listbox/ListboxSelectedOption.svelte.d.ts +4 -3
  58. package/dist/listbox/index.d.ts +5 -5
  59. package/dist/listbox/index.js +5 -5
  60. package/dist/menu/Menu.svelte +6 -7
  61. package/dist/menu/Menu.svelte.d.ts +4 -3
  62. package/dist/menu/MenuButton.svelte +10 -12
  63. package/dist/menu/MenuButton.svelte.d.ts +4 -3
  64. package/dist/menu/MenuHeading.svelte +7 -10
  65. package/dist/menu/MenuHeading.svelte.d.ts +3 -3
  66. package/dist/menu/MenuItem.svelte +8 -10
  67. package/dist/menu/MenuItem.svelte.d.ts +4 -3
  68. package/dist/menu/MenuItems.svelte +11 -13
  69. package/dist/menu/MenuItems.svelte.d.ts +4 -3
  70. package/dist/menu/MenuSection.svelte +6 -8
  71. package/dist/menu/MenuSection.svelte.d.ts +3 -3
  72. package/dist/menu/MenuSeparator.svelte +6 -8
  73. package/dist/menu/MenuSeparator.svelte.d.ts +3 -3
  74. package/dist/menu/index.d.ts +7 -7
  75. package/dist/menu/index.js +3 -3
  76. package/dist/popover/Popover.svelte +7 -9
  77. package/dist/popover/Popover.svelte.d.ts +4 -3
  78. package/dist/popover/PopoverBackdrop.svelte +8 -10
  79. package/dist/popover/PopoverBackdrop.svelte.d.ts +4 -3
  80. package/dist/popover/PopoverButton.svelte +8 -10
  81. package/dist/popover/PopoverButton.svelte.d.ts +3 -2
  82. package/dist/popover/PopoverGroup.svelte +6 -11
  83. package/dist/popover/PopoverGroup.svelte.d.ts +3 -3
  84. package/dist/popover/PopoverPanel.svelte +16 -18
  85. package/dist/popover/PopoverPanel.svelte.d.ts +4 -3
  86. package/dist/popover/index.d.ts +5 -5
  87. package/dist/popover/index.js +3 -3
  88. package/dist/portal/InternalPortal.svelte +1 -2
  89. package/dist/portal/InternalPortal.svelte.d.ts +1 -1
  90. package/dist/portal/PortalGroup.svelte +1 -1
  91. package/dist/portal/PortalGroup.svelte.d.ts +1 -1
  92. package/dist/select/Select.svelte +10 -12
  93. package/dist/select/Select.svelte.d.ts +4 -3
  94. package/dist/select/index.d.ts +1 -1
  95. package/dist/select/index.js +1 -1
  96. package/dist/switch/Switch.svelte +16 -18
  97. package/dist/switch/Switch.svelte.d.ts +4 -3
  98. package/dist/switch/index.d.ts +1 -1
  99. package/dist/switch/index.js +1 -1
  100. package/dist/tabs/Tab.svelte +9 -11
  101. package/dist/tabs/Tab.svelte.d.ts +4 -3
  102. package/dist/tabs/TabGroup.svelte +11 -13
  103. package/dist/tabs/TabGroup.svelte.d.ts +4 -3
  104. package/dist/tabs/TabList.svelte +6 -8
  105. package/dist/tabs/TabList.svelte.d.ts +4 -3
  106. package/dist/tabs/TabPanel.svelte +8 -7
  107. package/dist/tabs/TabPanel.svelte.d.ts +4 -3
  108. package/dist/tabs/TabPanels.svelte +4 -2
  109. package/dist/tabs/TabPanels.svelte.d.ts +4 -3
  110. package/dist/tabs/index.d.ts +5 -5
  111. package/dist/tabs/index.js +4 -4
  112. package/dist/textarea/Textarea.svelte +11 -10
  113. package/dist/textarea/Textarea.svelte.d.ts +4 -3
  114. package/dist/textarea/index.d.ts +1 -1
  115. package/dist/textarea/index.js +1 -1
  116. package/dist/transition/Transition.svelte +10 -1
  117. package/dist/transition/Transition.svelte.d.ts +5 -1
  118. package/dist/transition/TransitionChild.svelte +5 -3
  119. package/dist/transition/TransitionChild.svelte.d.ts +3 -2
  120. package/dist/transition/index.d.ts +2 -2
  121. package/dist/transition/index.js +2 -2
  122. 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 ButtonProps = Props<
15
- typeof DEFAULT_BUTTON_TAG,
16
- ButtonRenderPropArg,
17
- {
18
- element?: HTMLElement
19
- disabled?: boolean
20
- autofocus?: boolean
21
- type?: "button" | "submit" | "reset"
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 ButtonProps = Props<typeof DEFAULT_BUTTON_TAG, ButtonRenderPropArg, {
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;
@@ -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";
@@ -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 CheckboxProps<TType = string> = Props<typeof DEFAULT_CHECKBOX_TAG, CheckboxRenderPropArg, {
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(): {};
@@ -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";
@@ -1 +1 @@
1
- export { default as Checkbox } from "./Checkbox.svelte";
1
+ export { default as Checkbox, } from "./Checkbox.svelte";
@@ -1 +1,2 @@
1
1
  export { default as CloseButton, type CloseButtonProps } from "./CloseButton.svelte";
2
+ export { type ButtonSlot as CloseButtonSlot, type ButtonOwnProps as CloseButtonOwnProps } from "../button/index.js";
@@ -1 +1,2 @@
1
1
  export { default as CloseButton } from "./CloseButton.svelte";
2
+ export {} from "../button/index.js";
@@ -8,7 +8,7 @@
8
8
 
9
9
  const DEFAULT_DATA_INTERACTIVE_TAG = "svelte:fragment" as const
10
10
 
11
- type DataInteractiveRenderPropArg = {
11
+ export type DataInteractiveRenderPropArg = {
12
12
  hover: boolean
13
13
  focus: boolean
14
14
  active: boolean
@@ -1,5 +1,5 @@
1
1
  import type { PropsAsChild } from "../utils/types.js";
2
- type DataInteractiveRenderPropArg = {
2
+ export type DataInteractiveRenderPropArg = {
3
3
  hover: boolean;
4
4
  focus: boolean;
5
5
  active: boolean;
@@ -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 DescriptionProps = Props<
7
- typeof DEFAULT_DESCRIPTION_TAG,
8
- {},
9
- {
10
- id?: string
11
- element?: HTMLElement
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 DescriptionProps = Props<typeof DEFAULT_DESCRIPTION_TAG, {}, {
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 DialogProps = Props<
16
- typeof DEFAULT_DIALOG_TAG,
17
- DialogRenderPropArg,
18
- PropsForFeatures<typeof DialogRenderFeatures> & {
19
- element?: HTMLElement
20
- id?: string
21
- open?: boolean
22
- onclose(value: boolean): void
23
- initialFocus?: HTMLElement
24
- role?: "dialog" | "alertdialog"
25
- autofocus?: boolean
26
- transition?: boolean
27
- __demoMode?: boolean
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 DialogProps = Props<typeof DEFAULT_DIALOG_TAG, DialogRenderPropArg, PropsForFeatures<typeof DialogRenderFeatures> & {
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 DialogBackdropProps = Props<
11
- typeof DEFAULT_BACKDROP_TAG,
12
- BackdropRenderPropArg,
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 DialogBackdropProps = Props<typeof DEFAULT_BACKDROP_TAG, BackdropRenderPropArg, {
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 DialogPanelProps = Props<
11
- typeof DEFAULT_PANEL_TAG,
12
- PanelRenderPropArg,
13
- {
14
- element?: HTMLElement
15
- id?: string
16
- transition?: boolean
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 DialogPanelProps = Props<typeof DEFAULT_PANEL_TAG, PanelRenderPropArg, {
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 DialogTitleProps = Props<
11
- typeof DEFAULT_TITLE_TAG,
12
- TitleRenderPropArg,
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 DialogTitleProps = Props<typeof DEFAULT_TITLE_TAG, TitleRenderPropArg, {
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
- let err = new Error(`<${component} /> is missing a parent <Dialog /> component.`);
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;
@@ -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";
@@ -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";
@@ -3,16 +3,12 @@
3
3
 
4
4
  let DEFAULT_FIELD_TAG = "div" as const
5
5
 
6
- type FieldRenderPropArg = {}
7
-
8
- export type FieldProps = Props<
9
- typeof DEFAULT_FIELD_TAG,
10
- FieldRenderPropArg,
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 FieldRenderPropArg = {};
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;
@@ -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 FieldsetProps = Props<
10
- typeof DEFAULT_FIELDSET_TAG,
11
- FieldsetRenderPropArg,
12
- {
13
- element?: HTMLElement
14
- disabled?: boolean
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 FieldsetRenderPropArg = {};
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;
@@ -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 FocusTrapProps = Props<
46
- typeof DEFAULT_FOCUS_TRAP_TAG,
47
- FocusTrapRenderPropArg,
48
- {
49
- element?: HTMLElement
50
- initialFocus?: HTMLElement
51
- // A fallback element to focus, but this element will be skipped when tabbing around. This is
52
- // only done for focusing a fallback parent container (e.g.: A `Dialog`, but you want to tab
53
- // *inside* the dialog excluding the dialog itself).
54
- initialFocusFallback?: HTMLElement
55
- features?: FocusTrapFeatures
56
- containers?: Containers
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 FocusTrapRenderPropArg = {};
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;
@@ -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 InputProps<TValue = string> = Props<
17
- typeof DEFAULT_INPUT_TAG,
18
- InputRenderPropArg,
19
- {
20
- element?: HTMLElement
21
- id?: string
22
- value?: TValue
23
- disabled?: boolean
24
- invalid?: boolean
25
- autofocus?: boolean
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">