ropav 0.0.10 → 0.0.12
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/README.md +9 -0
- package/dist/accordion.css +115 -111
- package/dist/accordion.js +60 -16
- package/dist/alert.css +110 -108
- package/dist/alert.js +48 -26
- package/dist/aspect-ratio.css +17 -15
- package/dist/aspect-ratio.js +20 -6
- package/dist/avatar.css +98 -96
- package/dist/avatar.js +27 -16
- package/dist/badge.css +95 -93
- package/dist/badge.js +29 -16
- package/dist/base.css +672 -671
- package/dist/button-group.css +39 -37
- package/dist/button-group.js +23 -12
- package/dist/button-link.css +160 -158
- package/dist/button-link.js +43 -24
- package/dist/button.css +160 -158
- package/dist/button.js +37 -19
- package/dist/card.css +109 -107
- package/dist/card.js +42 -17
- package/dist/checkbox.css +139 -137
- package/dist/checkbox.js +103 -33
- package/dist/collapse.css +29 -27
- package/dist/collapse.js +44 -10
- package/dist/color-input.css +137 -107
- package/dist/color-input.js +117 -30
- package/dist/color-picker.css +309 -303
- package/dist/color-picker.js +147 -54
- package/dist/color-picker2.js +9 -1
- package/dist/color-swatch.css +48 -46
- package/dist/color-swatch.js +15 -11
- package/dist/color-swatch2.js +4 -0
- package/dist/components/accordion/accordion-item.d.ts +13 -1
- package/dist/components/accordion/index.d.ts +2 -1
- package/dist/components/accordion/index.js +2 -2
- package/dist/components/accordion/types.d.ts +9 -4
- package/dist/components/alert/alert.d.ts +2 -2
- package/dist/components/alert/index.d.ts +2 -2
- package/dist/components/alert/index.js +2 -2
- package/dist/components/alert/types.d.ts +4 -1
- package/dist/components/aspect-ratio/index.d.ts +2 -1
- package/dist/components/aspect-ratio/index.js +2 -2
- package/dist/components/aspect-ratio/types.d.ts +4 -1
- package/dist/components/avatar/index.d.ts +2 -2
- package/dist/components/avatar/index.js +2 -2
- package/dist/components/avatar/types.d.ts +4 -1
- package/dist/components/badge/index.d.ts +2 -2
- package/dist/components/badge/index.js +2 -2
- package/dist/components/badge/types.d.ts +4 -1
- package/dist/components/button/index.d.ts +2 -1
- package/dist/components/button/index.js +2 -2
- package/dist/components/button/types.d.ts +4 -1
- package/dist/components/button-group/index.d.ts +2 -1
- package/dist/components/button-group/index.js +2 -2
- package/dist/components/button-group/types.d.ts +4 -1
- package/dist/components/button-link/index.d.ts +2 -1
- package/dist/components/button-link/index.js +2 -2
- package/dist/components/button-link/types.d.ts +4 -1
- package/dist/components/card/index.d.ts +2 -1
- package/dist/components/card/index.js +2 -2
- package/dist/components/card/types.d.ts +5 -1
- package/dist/components/checkbox/checkbox.d.ts +4 -1
- package/dist/components/checkbox/index.d.ts +2 -1
- package/dist/components/checkbox/index.js +2 -2
- package/dist/components/checkbox/types.d.ts +11 -2
- package/dist/components/checkbox/useCheckbox.d.ts +3 -1
- package/dist/components/collapse/collapse.d.ts +2 -2
- package/dist/components/collapse/index.d.ts +2 -1
- package/dist/components/collapse/index.js +2 -2
- package/dist/components/collapse/types.d.ts +9 -2
- package/dist/components/color-input/index.d.ts +2 -1
- package/dist/components/color-input/index.js +2 -2
- package/dist/components/color-input/types.d.ts +8 -2
- package/dist/components/color-input/useColorInput.d.ts +1 -1
- package/dist/components/color-input/useColorInputValue.d.ts +1 -1
- package/dist/components/color-picker/index.d.ts +2 -2
- package/dist/components/color-picker/index.js +2 -2
- package/dist/components/color-picker/types.d.ts +13 -1
- package/dist/components/color-swatch/index.d.ts +2 -1
- package/dist/components/color-swatch/index.js +2 -1
- package/dist/components/color-swatch/types.d.ts +4 -1
- package/dist/components/dialog/dialog-close.d.ts +21 -0
- package/dist/components/dialog/dialog-content.d.ts +32 -0
- package/dist/components/dialog/dialog-core.d.ts +27 -0
- package/dist/components/dialog/dialog-description.d.ts +21 -0
- package/dist/components/dialog/dialog-overlay.d.ts +21 -0
- package/dist/components/dialog/dialog-portal.d.ts +21 -0
- package/dist/components/dialog/dialog-root.d.ts +28 -0
- package/dist/components/dialog/dialog-title.d.ts +21 -0
- package/dist/components/dialog/dialog-trigger.d.ts +23 -0
- package/dist/components/dialog/index.d.ts +9 -0
- package/dist/components/dialog/index.js +2 -0
- package/dist/components/dialog/types.d.ts +61 -0
- package/dist/components/dropdown-menu/dropdown-menu-checkbox-item.d.ts +24 -0
- package/dist/components/dropdown-menu/dropdown-menu-content.d.ts +34 -0
- package/dist/components/dropdown-menu/dropdown-menu-context-trigger.d.ts +23 -0
- package/dist/components/dropdown-menu/dropdown-menu-item-indicator.d.ts +24 -0
- package/dist/components/dropdown-menu/dropdown-menu-item-row.d.ts +28 -0
- package/dist/components/dropdown-menu/dropdown-menu-item.d.ts +23 -0
- package/dist/components/dropdown-menu/dropdown-menu-items.d.ts +24 -22
- package/dist/components/dropdown-menu/dropdown-menu-label.d.ts +21 -0
- package/dist/components/dropdown-menu/dropdown-menu-outside.d.ts +3 -0
- package/dist/components/dropdown-menu/dropdown-menu-portal.d.ts +21 -0
- package/dist/components/dropdown-menu/dropdown-menu-primitive-core.d.ts +110 -0
- package/dist/components/dropdown-menu/dropdown-menu-primitives.d.ts +15 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio-group.d.ts +25 -0
- package/dist/components/dropdown-menu/dropdown-menu-radio-item.d.ts +23 -0
- package/dist/components/dropdown-menu/dropdown-menu-root.d.ts +30 -0
- package/dist/components/dropdown-menu/dropdown-menu-separator.d.ts +19 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-content.d.ts +34 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub-trigger.d.ts +28 -0
- package/dist/components/dropdown-menu/dropdown-menu-sub.d.ts +28 -0
- package/dist/components/dropdown-menu/dropdown-menu-trigger.d.ts +23 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +6 -3
- package/dist/components/dropdown-menu/index.d.ts +32 -1
- package/dist/components/dropdown-menu/index.js +2 -2
- package/dist/components/dropdown-menu/types.d.ts +145 -6
- package/dist/components/dropdown-menu/useDropdownMenu.d.ts +15 -3
- package/dist/components/dropdown-menu/useDropdownMenuDisclosure.d.ts +10 -3
- package/dist/components/dropdown-menu/useDropdownMenuDom.d.ts +2 -1
- package/dist/components/dropdown-menu/useDropdownMenuInteractions.d.ts +4 -4
- package/dist/components/dropdown-menu/useDropdownMenuPortalPosition.d.ts +19 -0
- package/dist/components/dropdown-menu/useDropdownMenuPrimitiveContent.d.ts +27 -0
- package/dist/components/dropdown-menu/useDropdownMenuRenderItems.d.ts +14 -2
- package/dist/components/field/index.d.ts +2 -1
- package/dist/components/field/index.js +2 -2
- package/dist/components/field/types.d.ts +4 -1
- package/dist/components/floating/index.d.ts +3 -0
- package/dist/components/floating/index.js +3 -0
- package/dist/components/floating/types.d.ts +105 -0
- package/dist/components/floating/useFloatingPosition.d.ts +15 -0
- package/dist/components/floating/useHoverDisclosure.d.ts +2 -0
- package/dist/components/focus-trap/focus-trap.d.ts +31 -0
- package/dist/components/focus-trap/index.d.ts +4 -0
- package/dist/components/focus-trap/index.js +3 -0
- package/dist/components/focus-trap/types.d.ts +41 -0
- package/dist/components/focus-trap/useFocusTrap.d.ts +2 -0
- package/dist/components/icon-button/index.d.ts +2 -1
- package/dist/components/icon-button/index.js +2 -1
- package/dist/components/icon-button/types.d.ts +4 -1
- package/dist/components/input/index.d.ts +2 -1
- package/dist/components/input/index.js +2 -1
- package/dist/components/input/input.d.ts +4 -1
- package/dist/components/input/types.d.ts +7 -2
- package/dist/components/modal/index.d.ts +2 -1
- package/dist/components/modal/index.js +2 -2
- package/dist/components/modal/modal.d.ts +3 -1
- package/dist/components/modal/types.d.ts +11 -1
- package/dist/components/modal/useModal.d.ts +7 -4
- package/dist/components/number-input/index.d.ts +2 -1
- package/dist/components/number-input/index.js +2 -2
- package/dist/components/number-input/types.d.ts +7 -2
- package/dist/components/number-input/useNumberInput.d.ts +2 -1
- package/dist/components/overlay/index.d.ts +2 -1
- package/dist/components/overlay/index.js +2 -1
- package/dist/components/overlay/types.d.ts +4 -1
- package/dist/components/popover/index.d.ts +2 -2
- package/dist/components/popover/index.js +2 -2
- package/dist/components/popover/popover.d.ts +2 -2
- package/dist/components/popover/types.d.ts +20 -11
- package/dist/components/popover/usePopover.d.ts +9 -1
- package/dist/components/progress/index.d.ts +2 -2
- package/dist/components/progress/index.js +2 -2
- package/dist/components/progress/types.d.ts +4 -1
- package/dist/components/radio/index.d.ts +2 -1
- package/dist/components/radio/index.js +2 -2
- package/dist/components/radio/radio.d.ts +8 -3
- package/dist/components/radio/types.d.ts +37 -4
- package/dist/components/radio/useRadio.d.ts +12 -4
- package/dist/components/select/index.d.ts +2 -1
- package/dist/components/select/index.js +2 -2
- package/dist/components/select/select.d.ts +4 -1
- package/dist/components/select/types.d.ts +10 -2
- package/dist/components/select/useSelect.d.ts +3 -1
- package/dist/components/slider/index.d.ts +2 -2
- package/dist/components/slider/index.js +2 -2
- package/dist/components/slider/range-slider-tooltip.d.ts +3 -0
- package/dist/components/slider/range-slider.d.ts +7 -4
- package/dist/components/slider/slider.d.ts +4 -1
- package/dist/components/slider/sliderCore.d.ts +4 -4
- package/dist/components/slider/types.d.ts +22 -4
- package/dist/components/slider/useRangeSlider.d.ts +2 -2
- package/dist/components/slider/useSlider.d.ts +2 -2
- package/dist/components/switch/index.d.ts +2 -1
- package/dist/components/switch/index.js +2 -2
- package/dist/components/switch/switch.d.ts +4 -1
- package/dist/components/switch/types.d.ts +11 -2
- package/dist/components/switch/useSwitch.d.ts +3 -1
- package/dist/components/tabs/index.d.ts +2 -1
- package/dist/components/tabs/index.js +2 -2
- package/dist/components/tabs/types.d.ts +13 -4
- package/dist/components/teleport-provider/index.d.ts +3 -0
- package/dist/components/teleport-provider/index.js +3 -0
- package/dist/components/teleport-provider/teleport-provider.d.ts +21 -0
- package/dist/components/teleport-provider/types.d.ts +4 -0
- package/dist/components/teleport-provider/useTeleportTarget.d.ts +6 -0
- package/dist/components/textarea/index.d.ts +2 -1
- package/dist/components/textarea/index.js +2 -2
- package/dist/components/textarea/textarea.d.ts +4 -1
- package/dist/components/textarea/types.d.ts +10 -2
- package/dist/components/textarea/useTextarea.d.ts +2 -1
- package/dist/components/toast/index.d.ts +3 -2
- package/dist/components/toast/index.js +2 -2
- package/dist/components/toast/toast-store.d.ts +2 -0
- package/dist/components/toast/toast.d.ts +2 -2
- package/dist/components/toast/types.d.ts +20 -10
- package/dist/components/toast/useToast.d.ts +2 -2
- package/dist/components/tooltip/index.d.ts +2 -1
- package/dist/components/tooltip/index.js +2 -1
- package/dist/components/tooltip/tooltip.d.ts +2 -2
- package/dist/components/tooltip/types.d.ts +13 -12
- package/dist/components/tooltip/useTooltip.d.ts +12 -2
- package/dist/composables/useOverlayLayer.d.ts +32 -0
- package/dist/dialog.js +510 -0
- package/dist/dropdown-menu.css +191 -108
- package/dist/dropdown-menu.js +1954 -198
- package/dist/field.css +41 -39
- package/dist/field.js +40 -16
- package/dist/floating.js +403 -0
- package/dist/focus-trap.js +80 -0
- package/dist/icon-button.css +193 -189
- package/dist/icon-button.js +23 -18
- package/dist/icon-button2.js +8 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +39 -32
- package/dist/input.css +122 -120
- package/dist/input.js +63 -40
- package/dist/input2.js +9 -0
- package/dist/legacy-unlayered.css +5382 -0
- package/dist/modal.css +129 -127
- package/dist/modal.js +182 -281
- package/dist/number-input.css +87 -85
- package/dist/number-input.js +98 -26
- package/dist/overlay.css +26 -24
- package/dist/overlay.js +17 -9
- package/dist/overlay2.js +4 -0
- package/dist/popover.css +140 -107
- package/dist/popover.js +276 -196
- package/dist/popover2.js +6 -1
- package/dist/progress.css +101 -99
- package/dist/progress.js +50 -28
- package/dist/radio.css +114 -105
- package/dist/radio.js +237 -61
- package/dist/select.css +255 -242
- package/dist/select.js +257 -94
- package/dist/slider.css +1090 -1031
- package/dist/slider.js +443 -175
- package/dist/styles-api.d.ts +22 -0
- package/dist/styles-api.js +49 -0
- package/dist/switch.css +120 -108
- package/dist/switch.js +112 -38
- package/dist/tabs.css +286 -278
- package/dist/tabs.js +60 -21
- package/dist/teleport-provider.js +15 -0
- package/dist/textarea.css +132 -130
- package/dist/textarea.js +83 -31
- package/dist/toast.css +229 -225
- package/dist/toast.js +189 -118
- package/dist/tooltip.css +61 -106
- package/dist/tooltip.js +184 -228
- package/dist/tooltip2.js +8 -0
- package/dist/useControlState.js +4 -0
- package/dist/useFloatingPosition.js +1317 -0
- package/dist/useFocusTrap.js +130 -0
- package/dist/useFormControl.js +107 -0
- package/dist/useOverlayLayer.js +262 -0
- package/dist/useTeleportTarget.js +40 -0
- package/docs/public-floating-api.md +148 -0
- package/docs/public-styles-api.md +134 -0
- package/docs/public-tokens.md +545 -0
- package/package.json +37 -9
- package/src/styles/_tokens.scss +33 -28
- package/src/styles/_utilities.scss +11 -9
- package/src/styles/styles-manifest.json +4125 -0
- package/dist/rafScheduler.js +0 -34
- package/dist/useClickOutside.js +0 -24
|
@@ -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 {
|
|
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
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
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
|
+
}) & {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { ComponentPublicInstance, ComputedRef, InjectionKey, Ref, VaporComponentInstance } from 'vue';
|
|
2
|
+
import { OverlayLayerContext } from '../../composables/useOverlayLayer.js';
|
|
3
|
+
import { FloatingReference } from '../floating/types.js';
|
|
4
|
+
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuInteractOutsideEvent, DropdownMenuItemPrimitiveProps, DropdownMenuItemValue, DropdownMenuOpenOptions, DropdownMenuPlacement, DropdownMenuPoint, DropdownMenuSelectEvent, DropdownMenuVirtualAnchor } from './types.js';
|
|
5
|
+
export type ElementReference = FloatingReference;
|
|
6
|
+
export type OpenFocusTarget = DropdownMenuFocusTarget | false;
|
|
7
|
+
export type ComponentRefValue = Element | ComponentPublicInstance | VaporComponentInstance | null;
|
|
8
|
+
export interface MenuItemRegistration {
|
|
9
|
+
id: string;
|
|
10
|
+
element: () => HTMLElement | null;
|
|
11
|
+
disabled: () => boolean;
|
|
12
|
+
activate: (event: Event) => void;
|
|
13
|
+
submenu?: DropdownMenuSubContext;
|
|
14
|
+
}
|
|
15
|
+
export interface DropdownMenuContext {
|
|
16
|
+
root: DropdownMenuRootContext;
|
|
17
|
+
element: Ref<HTMLElement | null>;
|
|
18
|
+
activeId: Ref<string | null>;
|
|
19
|
+
actualPlacement: Ref<DropdownMenuPlacement>;
|
|
20
|
+
parentSub?: DropdownMenuSubContext;
|
|
21
|
+
registerItem: (item: MenuItemRegistration) => void;
|
|
22
|
+
unregisterItem: (id: string) => void;
|
|
23
|
+
registerSub: (sub: DropdownMenuSubContext) => void;
|
|
24
|
+
unregisterSub: (sub: DropdownMenuSubContext) => void;
|
|
25
|
+
closeSubmenus: (except?: DropdownMenuSubContext) => void;
|
|
26
|
+
setActive: (id: string) => void;
|
|
27
|
+
isActive: (id: string) => boolean;
|
|
28
|
+
focus: (target?: DropdownMenuFocusTarget) => boolean;
|
|
29
|
+
focusElement: () => void;
|
|
30
|
+
onKeydown: (event: KeyboardEvent) => void;
|
|
31
|
+
}
|
|
32
|
+
export interface DropdownMenuSubContext {
|
|
33
|
+
isOpen: ComputedRef<boolean>;
|
|
34
|
+
trigger: Ref<HTMLElement | null>;
|
|
35
|
+
contentId: Ref<string | undefined>;
|
|
36
|
+
actualPlacement: Ref<DropdownMenuPlacement>;
|
|
37
|
+
pendingFocus: Ref<OpenFocusTarget>;
|
|
38
|
+
menu: DropdownMenuContext | null;
|
|
39
|
+
open: (focus?: OpenFocusTarget) => void;
|
|
40
|
+
close: (focusParent?: boolean) => void;
|
|
41
|
+
}
|
|
42
|
+
export interface DropdownMenuRootContext {
|
|
43
|
+
id: ComputedRef<string>;
|
|
44
|
+
isOpen: ComputedRef<boolean>;
|
|
45
|
+
disabled: ComputedRef<boolean>;
|
|
46
|
+
modal: ComputedRef<boolean>;
|
|
47
|
+
trigger: Ref<HTMLElement | null>;
|
|
48
|
+
triggerId: Ref<string | undefined>;
|
|
49
|
+
contentId: Ref<string | undefined>;
|
|
50
|
+
reference: ComputedRef<ElementReference | null>;
|
|
51
|
+
pendingFocus: Ref<OpenFocusTarget>;
|
|
52
|
+
layer: OverlayLayerContext;
|
|
53
|
+
open: (options?: DropdownMenuOpenOptions | DropdownMenuFocusTarget) => void;
|
|
54
|
+
close: (options?: DropdownMenuCloseOptions & {
|
|
55
|
+
returnFocus?: boolean;
|
|
56
|
+
}) => void;
|
|
57
|
+
toggle: () => void;
|
|
58
|
+
openAt: (point: DropdownMenuPoint, options?: DropdownMenuOpenOptions | DropdownMenuFocusTarget) => void;
|
|
59
|
+
setTrigger: (element: HTMLElement | null, id?: string) => void;
|
|
60
|
+
setReference: (reference: ElementReference | null) => void;
|
|
61
|
+
setReturnFocus: (element: HTMLElement | null) => void;
|
|
62
|
+
registerInside: (element: HTMLElement) => void;
|
|
63
|
+
unregisterInside: (element: HTMLElement) => void;
|
|
64
|
+
isInside: (event: Event) => boolean;
|
|
65
|
+
}
|
|
66
|
+
export interface DropdownMenuRadioGroupContext {
|
|
67
|
+
value: ComputedRef<DropdownMenuItemValue | null>;
|
|
68
|
+
select: (value: DropdownMenuItemValue) => void;
|
|
69
|
+
}
|
|
70
|
+
export interface DropdownMenuCheckedContext {
|
|
71
|
+
state: ComputedRef<'checked' | 'unchecked' | 'indeterminate'>;
|
|
72
|
+
checked: ComputedRef<boolean>;
|
|
73
|
+
}
|
|
74
|
+
export declare const rootKey: InjectionKey<DropdownMenuRootContext>;
|
|
75
|
+
export declare const menuKey: InjectionKey<DropdownMenuContext>;
|
|
76
|
+
export declare const subKey: InjectionKey<DropdownMenuSubContext>;
|
|
77
|
+
export declare const radioGroupKey: InjectionKey<DropdownMenuRadioGroupContext>;
|
|
78
|
+
export declare const checkedKey: InjectionKey<DropdownMenuCheckedContext>;
|
|
79
|
+
export declare function optionalAttr<T extends boolean | string | undefined>(value: T): T | undefined;
|
|
80
|
+
export declare function getFocusTarget(options?: DropdownMenuOpenOptions | DropdownMenuFocusTarget): DropdownMenuFocusTarget;
|
|
81
|
+
export declare function toHTMLElement(value: ComponentRefValue, fallbackId?: string): HTMLElement | null;
|
|
82
|
+
export declare function resolveHTMLElementRef(value: ComponentRefValue, fallbackId: string, resolve: (element: HTMLElement | null) => void): void;
|
|
83
|
+
export declare function createVirtualAnchor(point: DropdownMenuPoint): DropdownMenuVirtualAnchor;
|
|
84
|
+
export declare function createCustomEvent<T>(type: string, detail: T, originalEvent: Event): CustomEvent<T>;
|
|
85
|
+
export declare function createSelectEvent(originalEvent: Event, value?: DropdownMenuItemValue): DropdownMenuSelectEvent;
|
|
86
|
+
export declare function createOutsideEvent(originalEvent: Event): DropdownMenuInteractOutsideEvent;
|
|
87
|
+
export declare function blockNextDocumentClick(): void;
|
|
88
|
+
export declare function createMenuContext(options: {
|
|
89
|
+
root: DropdownMenuRootContext;
|
|
90
|
+
element: Ref<HTMLElement | null>;
|
|
91
|
+
actualPlacement: Ref<DropdownMenuPlacement>;
|
|
92
|
+
parentSub?: DropdownMenuSubContext;
|
|
93
|
+
onEscape: (event: KeyboardEvent) => void;
|
|
94
|
+
}): DropdownMenuContext;
|
|
95
|
+
export declare function usePrimitiveItem(componentName: string, props: Readonly<DropdownMenuItemPrimitiveProps>, emitSelect: (event: DropdownMenuSelectEvent) => void, options: {
|
|
96
|
+
checked?: ComputedRef<boolean | 'mixed'>;
|
|
97
|
+
defaultCloseOnSelect: boolean;
|
|
98
|
+
afterSelect?: () => void;
|
|
99
|
+
}): {
|
|
100
|
+
menu: DropdownMenuContext;
|
|
101
|
+
id: ComputedRef<string>;
|
|
102
|
+
element: Ref<HTMLElement | null, HTMLElement | null>;
|
|
103
|
+
isDisabled: ComputedRef<boolean>;
|
|
104
|
+
focused: ComputedRef<boolean>;
|
|
105
|
+
checked: ComputedRef<boolean | "mixed"> | undefined;
|
|
106
|
+
activate: (originalEvent: Event) => void;
|
|
107
|
+
select: () => void;
|
|
108
|
+
setElement: (value: ComponentRefValue) => void;
|
|
109
|
+
onPointerenter: () => void;
|
|
110
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export { default as DropdownMenuCheckboxItem } from './dropdown-menu-checkbox-item.js';
|
|
2
|
+
export { default as DropdownMenuContent } from './dropdown-menu-content.js';
|
|
3
|
+
export { default as DropdownMenuContextTrigger } from './dropdown-menu-context-trigger.js';
|
|
4
|
+
export { default as DropdownMenuItem } from './dropdown-menu-item.js';
|
|
5
|
+
export { default as DropdownMenuItemIndicator } from './dropdown-menu-item-indicator.js';
|
|
6
|
+
export { default as DropdownMenuLabel } from './dropdown-menu-label.js';
|
|
7
|
+
export { default as DropdownMenuPortal } from './dropdown-menu-portal.js';
|
|
8
|
+
export { default as DropdownMenuRadioGroup } from './dropdown-menu-radio-group.js';
|
|
9
|
+
export { default as DropdownMenuRadioItem } from './dropdown-menu-radio-item.js';
|
|
10
|
+
export { default as DropdownMenuRoot } from './dropdown-menu-root.js';
|
|
11
|
+
export { default as DropdownMenuSeparator } from './dropdown-menu-separator.js';
|
|
12
|
+
export { default as DropdownMenuSub } from './dropdown-menu-sub.js';
|
|
13
|
+
export { default as DropdownMenuSubContent } from './dropdown-menu-sub-content.js';
|
|
14
|
+
export { default as DropdownMenuSubTrigger } from './dropdown-menu-sub-trigger.js';
|
|
15
|
+
export { default as DropdownMenuTrigger } from './dropdown-menu-trigger.js';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DropdownMenuItemValue, DropdownMenuRadioGroupPrimitiveProps } 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<DropdownMenuRadioGroupPrimitiveProps & {
|
|
4
|
+
"onUpdate:modelValue"?: ((value: DropdownMenuItemValue) => 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: {
|
|
12
|
+
value: DropdownMenuItemValue | null;
|
|
13
|
+
}): unknown;
|
|
14
|
+
};
|
|
15
|
+
emit: (evt: "update:modelValue", value: DropdownMenuItemValue) => void;
|
|
16
|
+
}>) => import('vue').VNode & {
|
|
17
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
18
|
+
};
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
22
|
+
[K in keyof T]: T[K];
|
|
23
|
+
} : {
|
|
24
|
+
[K in keyof T as K]: T[K];
|
|
25
|
+
}) & {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DropdownMenuItemPrimitiveSlotProps, DropdownMenuRadioItemPrimitiveProps, 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<DropdownMenuRadioItemPrimitiveProps & {
|
|
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
|
+
}) & {};
|