ropav 0.0.11 → 0.0.13

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 (126) hide show
  1. package/README.md +3 -0
  2. package/dist/checkbox.css +32 -32
  3. package/dist/checkbox.js +33 -14
  4. package/dist/color-input.css +19 -19
  5. package/dist/color-input.js +35 -17
  6. package/dist/components/checkbox/types.d.ts +5 -1
  7. package/dist/components/checkbox/useCheckbox.d.ts +1 -1
  8. package/dist/components/color-input/types.d.ts +4 -1
  9. package/dist/components/color-input/useColorInput.d.ts +1 -1
  10. package/dist/components/color-input/useColorInputValue.d.ts +1 -1
  11. package/dist/components/dialog/dialog-close.d.ts +21 -0
  12. package/dist/components/dialog/dialog-content.d.ts +32 -0
  13. package/dist/components/dialog/dialog-core.d.ts +27 -0
  14. package/dist/components/dialog/dialog-description.d.ts +21 -0
  15. package/dist/components/dialog/dialog-overlay.d.ts +21 -0
  16. package/dist/components/dialog/dialog-portal.d.ts +21 -0
  17. package/dist/components/dialog/dialog-root.d.ts +28 -0
  18. package/dist/components/dialog/dialog-title.d.ts +21 -0
  19. package/dist/components/dialog/dialog-trigger.d.ts +23 -0
  20. package/dist/components/dialog/index.d.ts +9 -0
  21. package/dist/components/dialog/index.js +2 -0
  22. package/dist/components/dialog/types.d.ts +61 -0
  23. package/dist/components/dropdown-menu/dropdown-menu-checkbox-item.d.ts +24 -0
  24. package/dist/components/dropdown-menu/dropdown-menu-content.d.ts +34 -0
  25. package/dist/components/dropdown-menu/dropdown-menu-context-trigger.d.ts +23 -0
  26. package/dist/components/dropdown-menu/dropdown-menu-item-indicator.d.ts +24 -0
  27. package/dist/components/dropdown-menu/dropdown-menu-item-row.d.ts +28 -0
  28. package/dist/components/dropdown-menu/dropdown-menu-item.d.ts +23 -0
  29. package/dist/components/dropdown-menu/dropdown-menu-items.d.ts +24 -22
  30. package/dist/components/dropdown-menu/dropdown-menu-label.d.ts +21 -0
  31. package/dist/components/dropdown-menu/dropdown-menu-outside.d.ts +3 -0
  32. package/dist/components/dropdown-menu/dropdown-menu-portal.d.ts +21 -0
  33. package/dist/components/dropdown-menu/dropdown-menu-primitive-core.d.ts +110 -0
  34. package/dist/components/dropdown-menu/dropdown-menu-primitives.d.ts +15 -724
  35. package/dist/components/dropdown-menu/dropdown-menu-radio-group.d.ts +25 -0
  36. package/dist/components/dropdown-menu/dropdown-menu-radio-item.d.ts +23 -0
  37. package/dist/components/dropdown-menu/dropdown-menu-root.d.ts +30 -0
  38. package/dist/components/dropdown-menu/dropdown-menu-separator.d.ts +19 -0
  39. package/dist/components/dropdown-menu/dropdown-menu-sub-content.d.ts +34 -0
  40. package/dist/components/dropdown-menu/dropdown-menu-sub-trigger.d.ts +28 -0
  41. package/dist/components/dropdown-menu/dropdown-menu-sub.d.ts +28 -0
  42. package/dist/components/dropdown-menu/dropdown-menu-trigger.d.ts +23 -0
  43. package/dist/components/dropdown-menu/dropdown-menu.d.ts +5 -2
  44. package/dist/components/dropdown-menu/index.d.ts +28 -49
  45. package/dist/components/dropdown-menu/index.js +2 -2
  46. package/dist/components/dropdown-menu/types.d.ts +8 -3
  47. package/dist/components/dropdown-menu/useDropdownMenu.d.ts +8 -4
  48. package/dist/components/dropdown-menu/useDropdownMenuDisclosure.d.ts +7 -2
  49. package/dist/components/dropdown-menu/useDropdownMenuPortalPosition.d.ts +3 -3
  50. package/dist/components/dropdown-menu/useDropdownMenuPrimitiveContent.d.ts +27 -0
  51. package/dist/components/dropdown-menu/useDropdownMenuRenderItems.d.ts +2 -0
  52. package/dist/components/floating/index.d.ts +3 -1
  53. package/dist/components/floating/index.js +3 -0
  54. package/dist/components/floating/types.d.ts +86 -1
  55. package/dist/components/floating/useFloatingPosition.d.ts +3 -26
  56. package/dist/components/floating/useHoverDisclosure.d.ts +2 -0
  57. package/dist/components/input/input.d.ts +4 -1
  58. package/dist/components/input/types.d.ts +3 -1
  59. package/dist/components/modal/index.d.ts +1 -1
  60. package/dist/components/modal/modal.d.ts +3 -1
  61. package/dist/components/modal/types.d.ts +3 -0
  62. package/dist/components/modal/useModal.d.ts +7 -4
  63. package/dist/components/number-input/types.d.ts +3 -1
  64. package/dist/components/number-input/useNumberInput.d.ts +2 -1
  65. package/dist/components/popover/usePopover.d.ts +2 -2
  66. package/dist/components/radio/types.d.ts +17 -1
  67. package/dist/components/radio/useRadio.d.ts +3 -0
  68. package/dist/components/select/select.d.ts +4 -1
  69. package/dist/components/select/types.d.ts +6 -1
  70. package/dist/components/select/useSelect.d.ts +3 -2
  71. package/dist/components/slider/index.d.ts +1 -1
  72. package/dist/components/slider/range-slider.d.ts +3 -3
  73. package/dist/components/slider/types.d.ts +11 -3
  74. package/dist/components/slider/useRangeSlider.d.ts +1 -1
  75. package/dist/components/slider/useSlider.d.ts +1 -1
  76. package/dist/components/switch/types.d.ts +5 -1
  77. package/dist/components/switch/useSwitch.d.ts +1 -1
  78. package/dist/components/teleport-provider/index.d.ts +1 -0
  79. package/dist/components/teleport-provider/index.js +2 -1
  80. package/dist/components/teleport-provider/useTeleportTarget.d.ts +4 -3
  81. package/dist/components/textarea/types.d.ts +4 -1
  82. package/dist/components/textarea/useTextarea.d.ts +1 -1
  83. package/dist/components/toast/index.d.ts +2 -1
  84. package/dist/components/toast/index.js +2 -2
  85. package/dist/components/toast/toast-store.d.ts +2 -0
  86. package/dist/components/toast/types.d.ts +10 -4
  87. package/dist/components/toast/useToast.d.ts +2 -2
  88. package/dist/components/tooltip/useTooltip.d.ts +3 -3
  89. package/dist/composables/useOverlayLayer.d.ts +32 -0
  90. package/dist/dialog.js +510 -0
  91. package/dist/dropdown-menu.css +4 -5
  92. package/dist/dropdown-menu.js +1155 -886
  93. package/dist/floating.js +403 -0
  94. package/dist/index.d.ts +1 -0
  95. package/dist/index.js +7 -4
  96. package/dist/input.css +24 -24
  97. package/dist/input.js +21 -11
  98. package/dist/legacy-unlayered.css +424 -503
  99. package/dist/modal.css +28 -28
  100. package/dist/modal.js +141 -200
  101. package/dist/number-input.css +20 -20
  102. package/dist/number-input.js +44 -16
  103. package/dist/popover.css +4 -4
  104. package/dist/popover.js +29 -40
  105. package/dist/radio.css +18 -18
  106. package/dist/radio.js +96 -18
  107. package/dist/select.css +54 -43
  108. package/dist/select.js +185 -67
  109. package/dist/slider.css +183 -202
  110. package/dist/slider.js +138 -37
  111. package/dist/switch.css +17 -17
  112. package/dist/switch.js +31 -13
  113. package/dist/textarea.css +26 -26
  114. package/dist/textarea.js +19 -9
  115. package/dist/toast.js +110 -99
  116. package/dist/tooltip.css +5 -80
  117. package/dist/tooltip.js +11 -3
  118. package/dist/useControlState.js +4 -0
  119. package/dist/useFloatingPosition.js +86 -39
  120. package/dist/useFormControl.js +107 -0
  121. package/dist/useOverlayLayer.js +262 -0
  122. package/dist/useTeleportTarget.js +21 -10
  123. package/docs/public-floating-api.md +159 -0
  124. package/docs/public-styles-api.md +2 -1
  125. package/package.json +10 -6
  126. package/dist/useClickOutside.js +0 -24
@@ -0,0 +1,32 @@
1
+ import { DialogCloseReason, DialogContentProps, DialogInteractOutsideEvent } from './types.js';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<DialogContentProps & {
4
+ onEscapeKeyDown?: ((event: CustomEvent<{
5
+ originalEvent: KeyboardEvent;
6
+ }>) => any) | undefined;
7
+ onPointerDownOutside?: ((event: DialogInteractOutsideEvent) => any) | undefined;
8
+ onInteractOutside?: ((event: DialogInteractOutsideEvent) => any) | undefined;
9
+ }> & (typeof globalThis extends {
10
+ __VLS_PROPS_FALLBACK: infer P;
11
+ } ? P : {});
12
+ expose: (exposed: {}) => void;
13
+ attrs: any;
14
+ slots: {
15
+ default?(props: {
16
+ isOpen: boolean;
17
+ close: (reason?: DialogCloseReason) => void;
18
+ }): unknown;
19
+ };
20
+ emit: ((evt: "escapeKeyDown", event: CustomEvent<{
21
+ originalEvent: KeyboardEvent;
22
+ }>) => void) & ((evt: "pointerDownOutside", event: DialogInteractOutsideEvent) => void) & ((evt: "interactOutside", event: DialogInteractOutsideEvent) => void);
23
+ }>) => import('vue').VNode & {
24
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
25
+ };
26
+ declare const _default: typeof __VLS_export;
27
+ export default _default;
28
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
29
+ [K in keyof T]: T[K];
30
+ } : {
31
+ [K in keyof T as K]: T[K];
32
+ }) & {};
@@ -0,0 +1,27 @@
1
+ import { ComponentPublicInstance, ComputedRef, InjectionKey, Ref } from 'vue';
2
+ import { OverlayLayerContext } from '../../composables/useOverlayLayer.js';
3
+ import { DialogCloseReason } from './types.js';
4
+ export interface DialogRootContext {
5
+ isOpen: ComputedRef<boolean>;
6
+ modal: ComputedRef<boolean>;
7
+ closeOnEscape: ComputedRef<boolean>;
8
+ closeOnOutsideClick: ComputedRef<boolean>;
9
+ returnFocus: ComputedRef<boolean>;
10
+ triggerRef: Ref<HTMLElement | null>;
11
+ contentRef: Ref<HTMLElement | null>;
12
+ contentId: Ref<string>;
13
+ titleIds: Ref<readonly string[]>;
14
+ descriptionIds: Ref<readonly string[]>;
15
+ layer: OverlayLayerContext;
16
+ open: () => void;
17
+ close: (reason?: DialogCloseReason) => void;
18
+ toggle: () => void;
19
+ setTrigger: (element: HTMLElement | null) => void;
20
+ setContent: (element: HTMLElement | null, id: string) => void;
21
+ registerTitle: (id: string) => () => void;
22
+ registerDescription: (id: string) => () => void;
23
+ }
24
+ export declare const dialogRootKey: InjectionKey<DialogRootContext>;
25
+ export declare function resolveDialogCloseReason(reason: unknown): DialogCloseReason;
26
+ export declare function toDialogHTMLElement(value: Element | ComponentPublicInstance | null): HTMLElement | null;
27
+ export declare function createDialogEvent<T>(type: string, detail: T, originalEvent: Event): CustomEvent<T>;
@@ -0,0 +1,21 @@
1
+ import { DialogDescriptionProps } from './types.js';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<DialogDescriptionProps> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {
9
+ default?: (props: {}) => any;
10
+ };
11
+ emit: {};
12
+ }>) => import('vue').VNode & {
13
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
14
+ };
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
18
+ [K in keyof T]: T[K];
19
+ } : {
20
+ [K in keyof T as K]: T[K];
21
+ }) & {};
@@ -0,0 +1,21 @@
1
+ import { DialogOverlayProps } from './types.js';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<DialogOverlayProps> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {
9
+ default?: (props: {}) => any;
10
+ };
11
+ emit: {};
12
+ }>) => import('vue').VNode & {
13
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
14
+ };
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
18
+ [K in keyof T]: T[K];
19
+ } : {
20
+ [K in keyof T as K]: T[K];
21
+ }) & {};
@@ -0,0 +1,21 @@
1
+ import { DialogPortalProps } from './types.js';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<DialogPortalProps> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {
9
+ default?: (props: {}) => any;
10
+ };
11
+ emit: {};
12
+ }>) => import('vue').VNode & {
13
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
14
+ };
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
18
+ [K in keyof T]: T[K];
19
+ } : {
20
+ [K in keyof T as K]: T[K];
21
+ }) & {};
@@ -0,0 +1,28 @@
1
+ import { DialogCloseReason, DialogRootProps, DialogRootSlotProps } from './types.js';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<DialogRootProps & {
4
+ onClose?: ((reason: DialogCloseReason) => any) | undefined;
5
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
6
+ }> & (typeof globalThis extends {
7
+ __VLS_PROPS_FALLBACK: infer P;
8
+ } ? P : {});
9
+ expose: (exposed: import('vue').ShallowUnwrapRef<{
10
+ open: () => void;
11
+ close: (reason?: DialogCloseReason) => void;
12
+ toggle: () => void;
13
+ }>) => void;
14
+ attrs: any;
15
+ slots: {
16
+ default?(props: DialogRootSlotProps): unknown;
17
+ };
18
+ emit: ((evt: "close", reason: DialogCloseReason) => void) & ((evt: "update:open", value: boolean) => void);
19
+ }>) => import('vue').VNode & {
20
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
21
+ };
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
25
+ [K in keyof T]: T[K];
26
+ } : {
27
+ [K in keyof T as K]: T[K];
28
+ }) & {};
@@ -0,0 +1,21 @@
1
+ import { DialogTitleProps } from './types.js';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<DialogTitleProps> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {
9
+ default?: (props: {}) => any;
10
+ };
11
+ emit: {};
12
+ }>) => import('vue').VNode & {
13
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
14
+ };
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
18
+ [K in keyof T]: T[K];
19
+ } : {
20
+ [K in keyof T as K]: T[K];
21
+ }) & {};
@@ -0,0 +1,23 @@
1
+ import { DialogTriggerProps } from './types.js';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<DialogTriggerProps> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {
9
+ default?(props: {
10
+ isOpen: boolean;
11
+ }): unknown;
12
+ };
13
+ emit: {};
14
+ }>) => import('vue').VNode & {
15
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
16
+ };
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
20
+ [K in keyof T]: T[K];
21
+ } : {
22
+ [K in keyof T as K]: T[K];
23
+ }) & {};
@@ -0,0 +1,9 @@
1
+ export { default as DialogClose } from './dialog-close.js';
2
+ export { default as DialogContent } from './dialog-content.js';
3
+ export { default as DialogDescription } from './dialog-description.js';
4
+ export { default as DialogOverlay } from './dialog-overlay.js';
5
+ export { default as DialogPortal } from './dialog-portal.js';
6
+ export { default as DialogRoot } from './dialog-root.js';
7
+ export { default as DialogTitle } from './dialog-title.js';
8
+ export { default as DialogTrigger } from './dialog-trigger.js';
9
+ export type { DialogAs, DialogCloseProps, DialogCloseReason, DialogContentProps, DialogDescriptionProps, DialogFocusTrapOptions, DialogInteractOutsideDetail, DialogInteractOutsideEvent, DialogOverlayProps, DialogPortalProps, DialogRole, DialogRootProps, DialogRootSlotProps, DialogTitleProps, DialogTriggerProps, } from './types.js';
@@ -0,0 +1,2 @@
1
+ import { a as dialog_overlay_default, c as dialog_close_default, i as dialog_portal_default, n as dialog_title_default, o as dialog_description_default, r as dialog_root_default, s as dialog_content_default, t as dialog_trigger_default } from "../../dialog.js";
2
+ export { dialog_close_default as DialogClose, dialog_content_default as DialogContent, dialog_description_default as DialogDescription, dialog_overlay_default as DialogOverlay, dialog_portal_default as DialogPortal, dialog_root_default as DialogRoot, dialog_title_default as DialogTitle, dialog_trigger_default as DialogTrigger };
@@ -0,0 +1,61 @@
1
+ import { Component } from 'vue';
2
+ import { FocusTrapInitialFocus, FocusTrapOptions } from '../focus-trap/types.js';
3
+ import { TeleportProps } from '../floating/types.js';
4
+ export type DialogAs = string | Component;
5
+ export type DialogRole = 'dialog' | 'alertdialog';
6
+ export type DialogCloseReason = 'escape' | 'outside' | 'programmatic';
7
+ export interface DialogInteractOutsideDetail {
8
+ originalEvent: Event;
9
+ }
10
+ export type DialogInteractOutsideEvent = CustomEvent<DialogInteractOutsideDetail>;
11
+ export type DialogFocusTrapOptions = Omit<FocusTrapOptions, 'allowOutsideClick' | 'clickOutsideDeactivates' | 'escapeDeactivates' | 'fallbackFocus' | 'initialFocus' | 'preventScroll' | 'returnFocusOnDeactivate'>;
12
+ export interface DialogRootProps {
13
+ open?: boolean;
14
+ defaultOpen?: boolean;
15
+ modal?: boolean;
16
+ closeOnEscape?: boolean;
17
+ closeOnOutsideClick?: boolean;
18
+ preventScroll?: boolean;
19
+ returnFocus?: boolean;
20
+ }
21
+ export interface DialogRootSlotProps {
22
+ isOpen: boolean;
23
+ zIndex: number;
24
+ open: () => void;
25
+ close: (reason?: DialogCloseReason) => void;
26
+ toggle: () => void;
27
+ }
28
+ export interface DialogTriggerProps {
29
+ id?: string;
30
+ as?: DialogAs;
31
+ disabled?: boolean;
32
+ }
33
+ export interface DialogPortalProps extends TeleportProps {
34
+ }
35
+ export interface DialogOverlayProps {
36
+ as?: DialogAs;
37
+ forceMount?: boolean;
38
+ }
39
+ export interface DialogContentProps {
40
+ id?: string;
41
+ as?: DialogAs;
42
+ role?: DialogRole;
43
+ forceMount?: boolean;
44
+ initialFocus?: FocusTrapInitialFocus | null;
45
+ ariaLabel?: string;
46
+ ariaLabelledby?: string;
47
+ ariaDescribedby?: string;
48
+ focusTrapOptions?: DialogFocusTrapOptions;
49
+ }
50
+ export interface DialogTitleProps {
51
+ id?: string;
52
+ as?: DialogAs;
53
+ }
54
+ export interface DialogDescriptionProps {
55
+ id?: string;
56
+ as?: DialogAs;
57
+ }
58
+ export interface DialogCloseProps {
59
+ as?: DialogAs;
60
+ disabled?: boolean;
61
+ }
@@ -0,0 +1,24 @@
1
+ import { DropdownMenuCheckedState, DropdownMenuCheckboxItemPrimitiveProps, DropdownMenuItemPrimitiveSlotProps, DropdownMenuSelectEvent } from './types.js';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<DropdownMenuCheckboxItemPrimitiveProps & {
4
+ onSelect?: ((event: DropdownMenuSelectEvent) => any) | undefined;
5
+ "onUpdate:modelValue"?: ((value: DropdownMenuCheckedState) => any) | undefined;
6
+ }> & (typeof globalThis extends {
7
+ __VLS_PROPS_FALLBACK: infer P;
8
+ } ? P : {});
9
+ expose: (exposed: {}) => void;
10
+ attrs: any;
11
+ slots: {
12
+ default?(props: DropdownMenuItemPrimitiveSlotProps): unknown;
13
+ };
14
+ emit: ((evt: "select", event: DropdownMenuSelectEvent) => void) & ((evt: "update:modelValue", value: DropdownMenuCheckedState) => void);
15
+ }>) => import('vue').VNode & {
16
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
17
+ };
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
21
+ [K in keyof T]: T[K];
22
+ } : {
23
+ [K in keyof T as K]: T[K];
24
+ }) & {};
@@ -0,0 +1,34 @@
1
+ import { DropdownMenuContentPrimitiveProps, DropdownMenuInteractOutsideEvent, DropdownMenuPlacement } from './types.js';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<DropdownMenuContentPrimitiveProps & {
4
+ onEscapeKeyDown?: ((event: CustomEvent<{
5
+ originalEvent: KeyboardEvent;
6
+ }>) => any) | undefined;
7
+ onPointerDownOutside?: ((event: DropdownMenuInteractOutsideEvent) => any) | undefined;
8
+ onFocusOutside?: ((event: DropdownMenuInteractOutsideEvent) => any) | undefined;
9
+ onInteractOutside?: ((event: DropdownMenuInteractOutsideEvent) => any) | undefined;
10
+ }> & (typeof globalThis extends {
11
+ __VLS_PROPS_FALLBACK: infer P;
12
+ } ? P : {});
13
+ expose: (exposed: {}) => void;
14
+ attrs: any;
15
+ slots: {
16
+ default?(props: {
17
+ isOpen: boolean;
18
+ placement: DropdownMenuPlacement;
19
+ close: () => void;
20
+ }): unknown;
21
+ };
22
+ emit: ((evt: "escapeKeyDown", event: CustomEvent<{
23
+ originalEvent: KeyboardEvent;
24
+ }>) => void) & ((evt: "pointerDownOutside", event: DropdownMenuInteractOutsideEvent) => void) & ((evt: "focusOutside", event: DropdownMenuInteractOutsideEvent) => void) & ((evt: "interactOutside", event: DropdownMenuInteractOutsideEvent) => void);
25
+ }>) => import('vue').VNode & {
26
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
27
+ };
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
31
+ [K in keyof T]: T[K];
32
+ } : {
33
+ [K in keyof T as K]: T[K];
34
+ }) & {};
@@ -0,0 +1,23 @@
1
+ import { DropdownMenuContextTriggerPrimitiveProps } from './types.js';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<DropdownMenuContextTriggerPrimitiveProps> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {
9
+ default?(props: {
10
+ isOpen: boolean;
11
+ }): unknown;
12
+ };
13
+ emit: {};
14
+ }>) => import('vue').VNode & {
15
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
16
+ };
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
20
+ [K in keyof T]: T[K];
21
+ } : {
22
+ [K in keyof T as K]: T[K];
23
+ }) & {};
@@ -0,0 +1,24 @@
1
+ import { DropdownMenuItemIndicatorPrimitiveProps } from './types.js';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<DropdownMenuItemIndicatorPrimitiveProps> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {
9
+ default?(props: {
10
+ state: "checked" | "unchecked" | "indeterminate";
11
+ checked: boolean;
12
+ }): unknown;
13
+ };
14
+ emit: {};
15
+ }>) => import('vue').VNode & {
16
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
17
+ };
18
+ declare const _default: typeof __VLS_export;
19
+ export default _default;
20
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
21
+ [K in keyof T]: T[K];
22
+ } : {
23
+ [K in keyof T as K]: T[K];
24
+ }) & {};
@@ -0,0 +1,28 @@
1
+ import { ItemPath } from './dropdown-menu-utils.js';
2
+ import { DropdownMenuItem, DropdownMenuItemSlotProps } from './types.js';
3
+ import { DropdownMenuRenderContext } from './useDropdownMenuRenderItems.js';
4
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<{
6
+ context: DropdownMenuRenderContext;
7
+ index: number;
8
+ item: DropdownMenuItem;
9
+ parentPath: ItemPath;
10
+ }> & (typeof globalThis extends {
11
+ __VLS_PROPS_FALLBACK: infer P;
12
+ } ? P : {});
13
+ expose: (exposed: {}) => void;
14
+ attrs: any;
15
+ slots: {
16
+ item?(props: DropdownMenuItemSlotProps): unknown;
17
+ };
18
+ emit: {};
19
+ }>) => import('vue').VNode & {
20
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
21
+ };
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
25
+ [K in keyof T]: T[K];
26
+ } : {
27
+ [K in keyof T as K]: T[K];
28
+ }) & {};
@@ -0,0 +1,23 @@
1
+ import { DropdownMenuItemPrimitiveProps, DropdownMenuItemPrimitiveSlotProps, DropdownMenuSelectEvent } from './types.js';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<DropdownMenuItemPrimitiveProps & {
4
+ onSelect?: ((event: DropdownMenuSelectEvent) => any) | undefined;
5
+ }> & (typeof globalThis extends {
6
+ __VLS_PROPS_FALLBACK: infer P;
7
+ } ? P : {});
8
+ expose: (exposed: {}) => void;
9
+ attrs: any;
10
+ slots: {
11
+ default?(props: DropdownMenuItemPrimitiveSlotProps): unknown;
12
+ };
13
+ emit: (evt: "select", event: DropdownMenuSelectEvent) => void;
14
+ }>) => import('vue').VNode & {
15
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
16
+ };
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
20
+ [K in keyof T]: T[K];
21
+ } : {
22
+ [K in keyof T as K]: T[K];
23
+ }) & {};
@@ -1,25 +1,27 @@
1
- import { PropType, VNode } from 'vue';
2
- import { DropdownMenuItem } from './types.js';
1
+ import { ItemPath } from './dropdown-menu-utils.js';
2
+ import { DropdownMenuItem, DropdownMenuItemSlotProps } from './types.js';
3
3
  import { DropdownMenuRenderContext } from './useDropdownMenuRenderItems.js';
4
- declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
5
- context: {
6
- readonly type: PropType<DropdownMenuRenderContext>;
7
- readonly required: true;
4
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
5
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<{
6
+ context: DropdownMenuRenderContext;
7
+ items: DropdownMenuItem[];
8
+ parentPath?: ItemPath;
9
+ }> & (typeof globalThis extends {
10
+ __VLS_PROPS_FALLBACK: infer P;
11
+ } ? P : {});
12
+ expose: (exposed: {}) => void;
13
+ attrs: any;
14
+ slots: {
15
+ item?(props: DropdownMenuItemSlotProps): unknown;
8
16
  };
9
- items: {
10
- type: PropType<DropdownMenuItem[]>;
11
- required: true;
12
- };
13
- }>, () => VNode<import('vue').RendererNode, import('vue').RendererElement, {
14
- [key: string]: any;
15
- }>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
16
- context: {
17
- readonly type: PropType<DropdownMenuRenderContext>;
18
- readonly required: true;
19
- };
20
- items: {
21
- type: PropType<DropdownMenuItem[]>;
22
- required: true;
23
- };
24
- }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
17
+ emit: {};
18
+ }>) => import('vue').VNode & {
19
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
20
+ };
21
+ declare const _default: typeof __VLS_export;
25
22
  export default _default;
23
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
24
+ [K in keyof T]: T[K];
25
+ } : {
26
+ [K in keyof T as K]: T[K];
27
+ }) & {};
@@ -0,0 +1,21 @@
1
+ import { DropdownMenuLabelPrimitiveProps } from './types.js';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<DropdownMenuLabelPrimitiveProps> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {
9
+ default?: (props: {}) => any;
10
+ };
11
+ emit: {};
12
+ }>) => import('vue').VNode & {
13
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
14
+ };
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
18
+ [K in keyof T]: T[K];
19
+ } : {
20
+ [K in keyof T as K]: T[K];
21
+ }) & {};
@@ -0,0 +1,3 @@
1
+ import { DropdownMenuInteractOutsideTarget } from './types.js';
2
+ export declare function isEventWithinElement(event: Event, element: Element): boolean;
3
+ export declare function isEventWithinTargets(event: Event, targets: readonly DropdownMenuInteractOutsideTarget[]): boolean;
@@ -0,0 +1,21 @@
1
+ import { DropdownMenuPortalPrimitiveProps } from './types.js';
2
+ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
3
+ props: import('vue').PublicProps & __VLS_PrettifyLocal<DropdownMenuPortalPrimitiveProps> & (typeof globalThis extends {
4
+ __VLS_PROPS_FALLBACK: infer P;
5
+ } ? P : {});
6
+ expose: (exposed: {}) => void;
7
+ attrs: any;
8
+ slots: {
9
+ default?: (props: {}) => any;
10
+ };
11
+ emit: {};
12
+ }>) => import('vue').VNode & {
13
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
14
+ };
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
17
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
18
+ [K in keyof T]: T[K];
19
+ } : {
20
+ [K in keyof T as K]: T[K];
21
+ }) & {};