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,30 @@
|
|
|
1
|
+
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuOpenOptions, DropdownMenuPoint, DropdownMenuRootPrimitiveProps, DropdownMenuRootSlotProps } 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<DropdownMenuRootPrimitiveProps & {
|
|
4
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
5
|
+
}> & (typeof globalThis extends {
|
|
6
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
7
|
+
} ? P : {});
|
|
8
|
+
expose: (exposed: import('vue').ShallowUnwrapRef<{
|
|
9
|
+
open: (options?: DropdownMenuOpenOptions | DropdownMenuFocusTarget) => void;
|
|
10
|
+
close: (options?: DropdownMenuCloseOptions & {
|
|
11
|
+
returnFocus?: boolean;
|
|
12
|
+
}) => void;
|
|
13
|
+
toggle: () => void;
|
|
14
|
+
openAt: (point: DropdownMenuPoint, options?: DropdownMenuOpenOptions | DropdownMenuFocusTarget) => void;
|
|
15
|
+
}>) => void;
|
|
16
|
+
attrs: any;
|
|
17
|
+
slots: {
|
|
18
|
+
default?(props: DropdownMenuRootSlotProps): unknown;
|
|
19
|
+
};
|
|
20
|
+
emit: (evt: "update:open", value: boolean) => void;
|
|
21
|
+
}>) => import('vue').VNode & {
|
|
22
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
23
|
+
};
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
27
|
+
[K in keyof T]: T[K];
|
|
28
|
+
} : {
|
|
29
|
+
[K in keyof T as K]: T[K];
|
|
30
|
+
}) & {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DropdownMenuSeparatorPrimitiveProps } 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<DropdownMenuSeparatorPrimitiveProps> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: {}) => void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: {};
|
|
9
|
+
emit: {};
|
|
10
|
+
}>) => import('vue').VNode & {
|
|
11
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
12
|
+
};
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
16
|
+
[K in keyof T]: T[K];
|
|
17
|
+
} : {
|
|
18
|
+
[K in keyof T as K]: T[K];
|
|
19
|
+
}) & {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { DropdownMenuInteractOutsideEvent, DropdownMenuPlacement, DropdownMenuSubContentPrimitiveProps } 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<DropdownMenuSubContentPrimitiveProps & {
|
|
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,28 @@
|
|
|
1
|
+
import { OpenFocusTarget } from './dropdown-menu-primitive-core.js';
|
|
2
|
+
import { DropdownMenuSubTriggerPrimitiveProps } from './types.js';
|
|
3
|
+
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<{
|
|
4
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<DropdownMenuSubTriggerPrimitiveProps> & (typeof globalThis extends {
|
|
5
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
6
|
+
} ? P : {});
|
|
7
|
+
expose: (exposed: {}) => void;
|
|
8
|
+
attrs: any;
|
|
9
|
+
slots: {
|
|
10
|
+
default?(props: {
|
|
11
|
+
focused: boolean;
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
open: (focus?: OpenFocusTarget) => void;
|
|
15
|
+
close: (focusParent?: boolean) => void;
|
|
16
|
+
}): 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,28 @@
|
|
|
1
|
+
import { OpenFocusTarget } from './dropdown-menu-primitive-core.js';
|
|
2
|
+
import { DropdownMenuSubPrimitiveProps } from './types.js';
|
|
3
|
+
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<{
|
|
4
|
+
props: import('vue').PublicProps & __VLS_PrettifyLocal<DropdownMenuSubPrimitiveProps & {
|
|
5
|
+
"onUpdate:open"?: ((value: boolean) => 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: {
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
open: (focus?: OpenFocusTarget) => void;
|
|
15
|
+
close: (focusParent?: boolean) => void;
|
|
16
|
+
}): unknown;
|
|
17
|
+
};
|
|
18
|
+
emit: (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,23 @@
|
|
|
1
|
+
import { DropdownMenuTriggerPrimitiveProps } 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<DropdownMenuTriggerPrimitiveProps> & (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
|
+
}) & {};
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { DropdownMenuItem, DropdownMenuItemSlotProps, DropdownMenuProps, DropdownMenuSlotProps } from './types.js';
|
|
1
|
+
import { DropdownMenuItem, DropdownMenuItemSlotProps, DropdownMenuInteractOutsideEvent, DropdownMenuProps, DropdownMenuSelectEvent, DropdownMenuSlotProps } from './types.js';
|
|
2
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
3
|
props: import('vue').PublicProps & __VLS_PrettifyLocal<DropdownMenuProps & {
|
|
4
4
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
5
|
-
onSelect?: ((item: DropdownMenuItem) => any) | undefined;
|
|
5
|
+
onSelect?: ((item: DropdownMenuItem, event: DropdownMenuSelectEvent) => any) | undefined;
|
|
6
|
+
onPointerDownOutside?: ((event: DropdownMenuInteractOutsideEvent) => any) | undefined;
|
|
7
|
+
onFocusOutside?: ((event: DropdownMenuInteractOutsideEvent) => any) | undefined;
|
|
8
|
+
onInteractOutside?: ((event: DropdownMenuInteractOutsideEvent) => any) | undefined;
|
|
6
9
|
}> & (typeof globalThis extends {
|
|
7
10
|
__VLS_PROPS_FALLBACK: infer P;
|
|
8
11
|
} ? P : {});
|
|
@@ -13,7 +16,7 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
13
16
|
item?(props: DropdownMenuItemSlotProps): unknown;
|
|
14
17
|
empty?(): unknown;
|
|
15
18
|
};
|
|
16
|
-
emit: ((evt: "update:open", value: boolean) => void) & ((evt: "select", item: DropdownMenuItem) => void);
|
|
19
|
+
emit: ((evt: "update:open", value: boolean) => void) & ((evt: "select", item: DropdownMenuItem, event: DropdownMenuSelectEvent) => void) & ((evt: "pointerDownOutside", event: DropdownMenuInteractOutsideEvent) => void) & ((evt: "focusOutside", event: DropdownMenuInteractOutsideEvent) => void) & ((evt: "interactOutside", event: DropdownMenuInteractOutsideEvent) => void);
|
|
17
20
|
}>) => import('vue').VNode & {
|
|
18
21
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
19
22
|
};
|
|
@@ -1,3 +1,34 @@
|
|
|
1
|
+
import { DropdownMenuItem as DropdownMenuDataItem } from './types.js';
|
|
1
2
|
export { default as DropdownMenu } from './dropdown-menu.js';
|
|
3
|
+
export { dropdownMenuParts } from './types.js';
|
|
4
|
+
export { DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuContextTrigger, DropdownMenuItemIndicator, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from './dropdown-menu-primitives.js';
|
|
5
|
+
export declare const DropdownMenuItem: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: {
|
|
6
|
+
attrs: any;
|
|
7
|
+
emit: (evt: "select", event: import('./types.js').DropdownMenuSelectEvent) => void;
|
|
8
|
+
slots: {
|
|
9
|
+
default?(props: import('./types.js').DropdownMenuItemPrimitiveSlotProps): unknown;
|
|
10
|
+
};
|
|
11
|
+
}, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
12
|
+
props: import('vue').PublicProps & {
|
|
13
|
+
id?: string | undefined;
|
|
14
|
+
as?: import('./types.js').DropdownMenuAs | undefined;
|
|
15
|
+
value?: import('./types.js').DropdownMenuItemValue | undefined;
|
|
16
|
+
disabled?: boolean | undefined;
|
|
17
|
+
destructive?: boolean | undefined;
|
|
18
|
+
closeOnSelect?: boolean | undefined;
|
|
19
|
+
onSelect?: ((event: import('./types.js').DropdownMenuSelectEvent) => any) | undefined;
|
|
20
|
+
} & (typeof globalThis extends {
|
|
21
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
22
|
+
} ? P : {});
|
|
23
|
+
expose: (exposed: {}) => void;
|
|
24
|
+
attrs: any;
|
|
25
|
+
slots: {
|
|
26
|
+
default?(props: import('./types.js').DropdownMenuItemPrimitiveSlotProps): unknown;
|
|
27
|
+
};
|
|
28
|
+
emit: (evt: "select", event: import('./types.js').DropdownMenuSelectEvent) => void;
|
|
29
|
+
}>) => import('vue').VNode & {
|
|
30
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
31
|
+
};
|
|
32
|
+
export type DropdownMenuItem = DropdownMenuDataItem;
|
|
2
33
|
export { useDropdownMenu } from './useDropdownMenu.js';
|
|
3
|
-
export type { DropdownMenuCloseOptions, DropdownMenuContentProps, DropdownMenuFocusTarget,
|
|
34
|
+
export type { DropdownMenuAs, DropdownMenuCheckedState, DropdownMenuCollisionPadding, DropdownMenuCheckboxItemPrimitiveProps, DropdownMenuCloseOptions, DropdownMenuContentPrimitiveProps, DropdownMenuContentProps, DropdownMenuContextTriggerPrimitiveProps, DropdownMenuFocusTarget, DropdownMenuInteractOutsideDetail, DropdownMenuInteractOutsideEvent, DropdownMenuInteractOutsideTarget, DropdownMenuItemIndicatorPrimitiveProps, DropdownMenuItemPath, DropdownMenuItemPrimitiveProps, DropdownMenuItemPrimitiveSlotProps, DropdownMenuItemProps, DropdownMenuItemSlotProps, DropdownMenuItemValue, DropdownMenuLabelPrimitiveProps, DropdownMenuOffset, DropdownMenuOffsetOptions, DropdownMenuOpenOptions, DropdownMenuPart, DropdownMenuPlacement, DropdownMenuPoint, DropdownMenuPortalPrimitiveProps, DropdownMenuProps, DropdownMenuRadioGroupPrimitiveProps, DropdownMenuRadioItemPrimitiveProps, DropdownMenuRenderedItem, DropdownMenuRootPrimitiveProps, DropdownMenuRootSlotProps, DropdownMenuSelectDetail, DropdownMenuSelectEvent, DropdownMenuSeparatorPrimitiveProps, DropdownMenuSlotProps, DropdownMenuSubContentPrimitiveProps, DropdownMenuSubPrimitiveProps, DropdownMenuSubmenuProps, DropdownMenuSubTriggerPrimitiveProps, DropdownMenuStrategy, DropdownMenuTarget, DropdownMenuTriggerPrimitiveProps, DropdownMenuTriggerProps, DropdownMenuVirtualAnchor, } from './types.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { dropdown_menu_default as DropdownMenu, useDropdownMenu };
|
|
1
|
+
import { _ as dropdown_menu_content_default, a as dropdown_menu_trigger_default, c as dropdown_menu_sub_default, d as dropdown_menu_radio_item_default, f as dropdown_menu_radio_group_default, g as dropdown_menu_context_trigger_default, h as dropdown_menu_item_indicator_default, i as useDropdownMenu, l as dropdown_menu_separator_default, m as dropdown_menu_label_default, n as dropdownMenuParts, o as dropdown_menu_sub_trigger_default, p as dropdown_menu_portal_default, r as dropdown_menu_default, s as dropdown_menu_sub_content_default, t as DropdownMenuItem, u as dropdown_menu_root_default, v as dropdown_menu_checkbox_item_default } from "../../dropdown-menu.js";
|
|
2
|
+
export { dropdown_menu_default as DropdownMenu, dropdown_menu_checkbox_item_default as DropdownMenuCheckboxItem, dropdown_menu_content_default as DropdownMenuContent, dropdown_menu_context_trigger_default as DropdownMenuContextTrigger, DropdownMenuItem, dropdown_menu_item_indicator_default as DropdownMenuItemIndicator, dropdown_menu_label_default as DropdownMenuLabel, dropdown_menu_portal_default as DropdownMenuPortal, dropdown_menu_radio_group_default as DropdownMenuRadioGroup, dropdown_menu_radio_item_default as DropdownMenuRadioItem, dropdown_menu_root_default as DropdownMenuRoot, dropdown_menu_separator_default as DropdownMenuSeparator, dropdown_menu_sub_default as DropdownMenuSub, dropdown_menu_sub_content_default as DropdownMenuSubContent, dropdown_menu_sub_trigger_default as DropdownMenuSubTrigger, dropdown_menu_trigger_default as DropdownMenuTrigger, dropdownMenuParts, useDropdownMenu };
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { Component, HTMLAttributes, Ref } from 'vue';
|
|
2
|
+
import { StylesApiProps } from '../../styles-api.js';
|
|
3
|
+
import { FloatingCollisionPadding, FloatingOffset, FloatingOffsetOptions, FloatingPositionProps, FloatingStrategy, FloatingTarget, FloatingVirtualElement, TeleportProps } from '../floating/types.js';
|
|
4
|
+
export declare const dropdownMenuParts: readonly ["root", "trigger", "content", "item", "label", "shortcut", "submenu", "submenuIndicator", "empty"];
|
|
5
|
+
export type DropdownMenuPart = (typeof dropdownMenuParts)[number];
|
|
6
|
+
export type DropdownMenuPlacement = 'top-start' | 'top' | 'top-end' | 'right-start' | 'right' | 'right-end' | 'bottom-start' | 'bottom' | 'bottom-end' | 'left-start' | 'left' | 'left-end';
|
|
7
|
+
export type DropdownMenuTarget = FloatingTarget;
|
|
8
|
+
export type DropdownMenuStrategy = FloatingStrategy;
|
|
9
|
+
export type DropdownMenuCollisionPadding = FloatingCollisionPadding;
|
|
2
10
|
export type DropdownMenuItemValue = string | number;
|
|
3
11
|
export type DropdownMenuFocusTarget = 'first' | 'last';
|
|
4
12
|
export type DropdownMenuItemPath = number[];
|
|
@@ -21,6 +29,10 @@ export interface DropdownMenuTriggerProps {
|
|
|
21
29
|
'aria-expanded'?: boolean;
|
|
22
30
|
'aria-haspopup': 'menu';
|
|
23
31
|
disabled?: boolean;
|
|
32
|
+
class?: HTMLAttributes['class'];
|
|
33
|
+
style?: HTMLAttributes['style'];
|
|
34
|
+
'data-state'?: 'open' | 'closed';
|
|
35
|
+
'data-disabled'?: '';
|
|
24
36
|
onClick: (event: MouseEvent) => void;
|
|
25
37
|
onKeydown: (event: KeyboardEvent) => void;
|
|
26
38
|
}
|
|
@@ -65,9 +77,9 @@ export interface DropdownMenuItemProps {
|
|
|
65
77
|
'aria-expanded'?: boolean;
|
|
66
78
|
'aria-haspopup'?: 'menu';
|
|
67
79
|
'aria-disabled'?: true;
|
|
68
|
-
'data-disabled'?:
|
|
69
|
-
'data-
|
|
70
|
-
'data-submenu'?:
|
|
80
|
+
'data-disabled'?: '';
|
|
81
|
+
'data-highlighted'?: '';
|
|
82
|
+
'data-submenu'?: '';
|
|
71
83
|
onClick: (event: MouseEvent) => void;
|
|
72
84
|
onMouseenter: (event: MouseEvent) => void;
|
|
73
85
|
}
|
|
@@ -93,12 +105,139 @@ export interface DropdownMenuRenderedItem {
|
|
|
93
105
|
slotProps: DropdownMenuItemSlotProps;
|
|
94
106
|
children: DropdownMenuRenderedItem[];
|
|
95
107
|
}
|
|
96
|
-
export interface DropdownMenuProps {
|
|
108
|
+
export interface DropdownMenuProps extends FloatingPositionProps<DropdownMenuPlacement>, StylesApiProps<DropdownMenuPart> {
|
|
97
109
|
id?: string;
|
|
98
110
|
items?: DropdownMenuItem[];
|
|
99
|
-
placement?: DropdownMenuPlacement;
|
|
100
111
|
open?: boolean;
|
|
101
112
|
disabled?: boolean;
|
|
102
113
|
closeOnSelect?: boolean;
|
|
103
114
|
ariaLabel?: string;
|
|
115
|
+
modal?: boolean;
|
|
116
|
+
ignore?: readonly DropdownMenuInteractOutsideTarget[];
|
|
117
|
+
/** @deprecated Use `teleport` instead. */
|
|
118
|
+
portal?: boolean;
|
|
119
|
+
/** @deprecated Use `teleportTo` instead. */
|
|
120
|
+
portalTo?: string | HTMLElement;
|
|
121
|
+
}
|
|
122
|
+
export type DropdownMenuAs = string | Component;
|
|
123
|
+
export type DropdownMenuCheckedState = boolean | 'indeterminate';
|
|
124
|
+
export interface DropdownMenuPoint {
|
|
125
|
+
x: number;
|
|
126
|
+
y: number;
|
|
127
|
+
}
|
|
128
|
+
export type DropdownMenuVirtualAnchor = FloatingVirtualElement;
|
|
129
|
+
export interface DropdownMenuSelectDetail {
|
|
130
|
+
originalEvent: Event;
|
|
131
|
+
value?: DropdownMenuItemValue;
|
|
132
|
+
}
|
|
133
|
+
export type DropdownMenuSelectEvent = CustomEvent<DropdownMenuSelectDetail>;
|
|
134
|
+
export interface DropdownMenuInteractOutsideDetail {
|
|
135
|
+
originalEvent: Event;
|
|
136
|
+
}
|
|
137
|
+
export type DropdownMenuInteractOutsideEvent = CustomEvent<DropdownMenuInteractOutsideDetail>;
|
|
138
|
+
export type DropdownMenuInteractOutsideTarget = string | Element | null | undefined | Readonly<Ref<Element | null | undefined>>;
|
|
139
|
+
export type DropdownMenuOffsetOptions = FloatingOffsetOptions;
|
|
140
|
+
export type DropdownMenuOffset = FloatingOffset;
|
|
141
|
+
export interface DropdownMenuRootPrimitiveProps {
|
|
142
|
+
id?: string;
|
|
143
|
+
open?: boolean;
|
|
144
|
+
defaultOpen?: boolean;
|
|
145
|
+
disabled?: boolean;
|
|
146
|
+
modal?: boolean;
|
|
147
|
+
target?: FloatingTarget | null;
|
|
148
|
+
virtualAnchor?: DropdownMenuVirtualAnchor | null;
|
|
149
|
+
}
|
|
150
|
+
export interface DropdownMenuRootSlotProps {
|
|
151
|
+
isOpen: boolean;
|
|
152
|
+
open: (options?: DropdownMenuOpenOptions | DropdownMenuFocusTarget) => void;
|
|
153
|
+
close: (options?: DropdownMenuCloseOptions) => void;
|
|
154
|
+
toggle: () => void;
|
|
155
|
+
openAt: (point: DropdownMenuPoint, options?: DropdownMenuOpenOptions | DropdownMenuFocusTarget) => void;
|
|
156
|
+
}
|
|
157
|
+
export interface DropdownMenuTriggerPrimitiveProps {
|
|
158
|
+
id?: string;
|
|
159
|
+
as?: DropdownMenuAs;
|
|
160
|
+
disabled?: boolean;
|
|
161
|
+
}
|
|
162
|
+
export interface DropdownMenuContextTriggerPrimitiveProps {
|
|
163
|
+
id?: string;
|
|
164
|
+
as?: DropdownMenuAs;
|
|
165
|
+
disabled?: boolean;
|
|
166
|
+
longPressDelay?: number;
|
|
167
|
+
longPressTolerance?: number;
|
|
168
|
+
}
|
|
169
|
+
export interface DropdownMenuPortalPrimitiveProps extends TeleportProps {
|
|
170
|
+
to?: string | HTMLElement;
|
|
171
|
+
disabled?: boolean;
|
|
172
|
+
}
|
|
173
|
+
export interface DropdownMenuContentPrimitiveProps {
|
|
174
|
+
id?: string;
|
|
175
|
+
as?: DropdownMenuAs;
|
|
176
|
+
placement?: DropdownMenuPlacement;
|
|
177
|
+
offset?: DropdownMenuOffset;
|
|
178
|
+
strategy?: FloatingStrategy;
|
|
179
|
+
flip?: boolean;
|
|
180
|
+
shift?: boolean;
|
|
181
|
+
collisionPadding?: FloatingCollisionPadding;
|
|
182
|
+
arrow?: boolean;
|
|
183
|
+
/** @deprecated Use `flip` and `shift` instead. */
|
|
184
|
+
avoidCollisions?: boolean;
|
|
185
|
+
forceMount?: boolean;
|
|
186
|
+
ignore?: readonly DropdownMenuInteractOutsideTarget[];
|
|
187
|
+
ariaLabel?: string;
|
|
188
|
+
ariaLabelledby?: string;
|
|
189
|
+
ariaDescribedby?: string;
|
|
190
|
+
}
|
|
191
|
+
export interface DropdownMenuItemPrimitiveProps {
|
|
192
|
+
id?: string;
|
|
193
|
+
as?: DropdownMenuAs;
|
|
194
|
+
value?: DropdownMenuItemValue;
|
|
195
|
+
disabled?: boolean;
|
|
196
|
+
destructive?: boolean;
|
|
197
|
+
closeOnSelect?: boolean;
|
|
198
|
+
}
|
|
199
|
+
export interface DropdownMenuItemPrimitiveSlotProps {
|
|
200
|
+
focused: boolean;
|
|
201
|
+
disabled: boolean;
|
|
202
|
+
select: () => void;
|
|
203
|
+
}
|
|
204
|
+
export interface DropdownMenuSeparatorPrimitiveProps {
|
|
205
|
+
id?: string;
|
|
206
|
+
as?: DropdownMenuAs;
|
|
207
|
+
orientation?: 'horizontal' | 'vertical';
|
|
208
|
+
}
|
|
209
|
+
export interface DropdownMenuLabelPrimitiveProps {
|
|
210
|
+
id?: string;
|
|
211
|
+
as?: DropdownMenuAs;
|
|
212
|
+
}
|
|
213
|
+
export interface DropdownMenuCheckboxItemPrimitiveProps extends Omit<DropdownMenuItemPrimitiveProps, 'value'> {
|
|
214
|
+
modelValue?: DropdownMenuCheckedState;
|
|
215
|
+
defaultValue?: DropdownMenuCheckedState;
|
|
216
|
+
}
|
|
217
|
+
export interface DropdownMenuRadioGroupPrimitiveProps {
|
|
218
|
+
id?: string;
|
|
219
|
+
as?: DropdownMenuAs;
|
|
220
|
+
modelValue?: DropdownMenuItemValue | null;
|
|
221
|
+
defaultValue?: DropdownMenuItemValue | null;
|
|
222
|
+
ariaLabel?: string;
|
|
223
|
+
ariaLabelledby?: string;
|
|
224
|
+
}
|
|
225
|
+
export interface DropdownMenuRadioItemPrimitiveProps extends Omit<DropdownMenuItemPrimitiveProps, 'value'> {
|
|
226
|
+
value: DropdownMenuItemValue;
|
|
227
|
+
}
|
|
228
|
+
export interface DropdownMenuItemIndicatorPrimitiveProps {
|
|
229
|
+
as?: DropdownMenuAs;
|
|
230
|
+
forceMount?: boolean;
|
|
231
|
+
}
|
|
232
|
+
export interface DropdownMenuSubPrimitiveProps {
|
|
233
|
+
open?: boolean;
|
|
234
|
+
defaultOpen?: boolean;
|
|
235
|
+
}
|
|
236
|
+
export interface DropdownMenuSubTriggerPrimitiveProps {
|
|
237
|
+
id?: string;
|
|
238
|
+
as?: DropdownMenuAs;
|
|
239
|
+
disabled?: boolean;
|
|
240
|
+
}
|
|
241
|
+
export interface DropdownMenuSubContentPrimitiveProps extends Omit<DropdownMenuContentPrimitiveProps, 'arrow' | 'ignore' | 'placement'> {
|
|
242
|
+
placement?: DropdownMenuPlacement;
|
|
104
243
|
}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { DropdownMenuContentProps, DropdownMenuInteractOutsideEvent, DropdownMenuItem, DropdownMenuProps, DropdownMenuSelectEvent, DropdownMenuSlotProps, DropdownMenuTriggerProps } from './types.js';
|
|
2
3
|
export declare function useDropdownMenu(props: Readonly<DropdownMenuProps>, emit?: {
|
|
3
4
|
openChange?: (open: boolean) => void;
|
|
4
|
-
select?: (item: DropdownMenuItem) => void;
|
|
5
|
+
select?: (item: DropdownMenuItem, event: DropdownMenuSelectEvent) => void;
|
|
6
|
+
pointerDownOutside?: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
7
|
+
focusOutside?: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
8
|
+
interactOutside?: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
5
9
|
}): {
|
|
6
10
|
rootRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
7
11
|
menuRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
12
|
+
arrowRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
8
13
|
menuId: import('vue').ComputedRef<string>;
|
|
9
14
|
isVisible: import('vue').ComputedRef<boolean>;
|
|
10
15
|
isEmpty: import('vue').ComputedRef<boolean>;
|
|
@@ -16,13 +21,20 @@ export declare function useDropdownMenu(props: Readonly<DropdownMenuProps>, emit
|
|
|
16
21
|
activeDescendantId: import('vue').ComputedRef<string | undefined>;
|
|
17
22
|
rootClass: import('vue').ComputedRef<string[]>;
|
|
18
23
|
contentClass: import('vue').ComputedRef<string[]>;
|
|
24
|
+
contentStyle: import('vue').ComputedRef<CSSProperties>;
|
|
25
|
+
arrowStyle: Readonly<import('vue').Ref<CSSProperties | undefined, CSSProperties | undefined>>;
|
|
26
|
+
actualPlacement: Readonly<import('vue').Ref<import('../floating/index.js').FloatingPlacement, import('../floating/index.js').FloatingPlacement>>;
|
|
27
|
+
placementSide: import('vue').ComputedRef<string>;
|
|
28
|
+
isTargetMode: import('vue').ComputedRef<boolean>;
|
|
29
|
+
teleportTo: import('vue').ComputedRef<import('../floating/index.js').TeleportTargetValue>;
|
|
30
|
+
shouldTeleport: import('vue').ComputedRef<boolean>;
|
|
19
31
|
triggerProps: import('vue').ComputedRef<DropdownMenuTriggerProps>;
|
|
20
32
|
contentProps: import('vue').ComputedRef<DropdownMenuContentProps>;
|
|
21
33
|
slotProps: import('vue').ComputedRef<DropdownMenuSlotProps>;
|
|
22
34
|
open: (options?: import('./types.js').DropdownMenuOpenOptions | import('./types.js').DropdownMenuFocusTarget) => void;
|
|
23
35
|
close: (options?: import('./types.js').DropdownMenuCloseOptions) => void;
|
|
24
36
|
toggle: () => void;
|
|
25
|
-
selectItem: (item: DropdownMenuItem) => void;
|
|
37
|
+
selectItem: (item: DropdownMenuItem, originalEvent?: Event) => void;
|
|
26
38
|
openSubmenu: (path: import('./dropdown-menu-utils.js').ItemPath, focus?: import('./dropdown-menu-utils.js').SubmenuFocusTarget, point?: import('./dropdown-menu-utils.js').PointerPoint) => boolean;
|
|
27
39
|
closeSubmenu: (path: import('./dropdown-menu-utils.js').ItemPath) => boolean;
|
|
28
40
|
onItemMouseenter: (item: DropdownMenuItem, indexOrPath: number | import('./dropdown-menu-utils.js').ItemPath, event?: MouseEvent) => void;
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import {
|
|
2
|
+
import { OverlayLayerContext } from '../../composables/useOverlayLayer.js';
|
|
3
|
+
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuInteractOutsideEvent, DropdownMenuItem, DropdownMenuOpenOptions, DropdownMenuProps, DropdownMenuSelectEvent } from './types.js';
|
|
3
4
|
import { ItemPath } from './dropdown-menu-utils.js';
|
|
4
5
|
type BooleanSource = Readonly<Ref<boolean>>;
|
|
5
6
|
type UseDropdownMenuDisclosureOptions = {
|
|
6
7
|
props: Readonly<DropdownMenuProps>;
|
|
7
8
|
emit: {
|
|
8
9
|
openChange?: (open: boolean) => void;
|
|
9
|
-
select?: (item: DropdownMenuItem) => void;
|
|
10
|
+
select?: (item: DropdownMenuItem, event: DropdownMenuSelectEvent) => void;
|
|
11
|
+
pointerDownOutside?: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
12
|
+
focusOutside?: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
13
|
+
interactOutside?: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
10
14
|
};
|
|
11
15
|
rootRef: Ref<HTMLElement | null>;
|
|
16
|
+
menuRef: Ref<HTMLElement | null>;
|
|
17
|
+
targetRef: Readonly<Ref<Element | null>>;
|
|
12
18
|
uncontrolledOpen: Ref<boolean>;
|
|
13
19
|
isDisabled: BooleanSource;
|
|
14
20
|
isOpen: BooleanSource;
|
|
@@ -20,8 +26,9 @@ type UseDropdownMenuDisclosureOptions = {
|
|
|
20
26
|
focusItem: (target: DropdownMenuFocusTarget, menuPath?: ItemPath) => boolean;
|
|
21
27
|
focusMenu: () => void;
|
|
22
28
|
focusTrigger: () => void;
|
|
29
|
+
layer: OverlayLayerContext;
|
|
23
30
|
};
|
|
24
|
-
export declare function useDropdownMenuDisclosure({ props, emit, rootRef, uncontrolledOpen, isDisabled, isOpen, isVisible, focusedPath, resetFocus, resetSubmenus, resetHoverIntent, focusItem, focusMenu, focusTrigger, }: UseDropdownMenuDisclosureOptions): {
|
|
31
|
+
export declare function useDropdownMenuDisclosure({ props, emit, rootRef, menuRef, targetRef, uncontrolledOpen, isDisabled, isOpen, isVisible, focusedPath, resetFocus, resetSubmenus, resetHoverIntent, focusItem, focusMenu, focusTrigger, layer, }: UseDropdownMenuDisclosureOptions): {
|
|
25
32
|
open: (options?: DropdownMenuOpenOptions | DropdownMenuFocusTarget) => void;
|
|
26
33
|
close: (options?: DropdownMenuCloseOptions) => void;
|
|
27
34
|
toggle: () => void;
|
|
@@ -11,10 +11,11 @@ type UseDropdownMenuDomOptions = {
|
|
|
11
11
|
menuId: StringSource;
|
|
12
12
|
rootRef: Ref<HTMLElement | null>;
|
|
13
13
|
menuRef: Ref<HTMLElement | null>;
|
|
14
|
+
targetRef: Readonly<Ref<Element | null>>;
|
|
14
15
|
placement: PlacementSource;
|
|
15
16
|
focusedPath: Ref<ItemPath>;
|
|
16
17
|
};
|
|
17
|
-
export declare function useDropdownMenuDom({ menuId, rootRef, menuRef, placement, focusedPath, }: UseDropdownMenuDomOptions): {
|
|
18
|
+
export declare function useDropdownMenuDom({ menuId, rootRef, menuRef, targetRef, placement, focusedPath, }: UseDropdownMenuDomOptions): {
|
|
18
19
|
activeDescendantId: import('vue').ComputedRef<string | undefined>;
|
|
19
20
|
focusMenu: () => void;
|
|
20
21
|
focusTrigger: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuOpenOptions, DropdownMenuProps } from './types.js';
|
|
2
|
+
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuOpenOptions, DropdownMenuProps, DropdownMenuSelectEvent } from './types.js';
|
|
3
3
|
import { ItemPath, PointerPoint, SubmenuFocusTarget } from './dropdown-menu-utils.js';
|
|
4
4
|
type BooleanSource = Readonly<Ref<boolean>>;
|
|
5
5
|
type DisclosureControls = {
|
|
@@ -23,7 +23,7 @@ type HoverIntentControls = {
|
|
|
23
23
|
type UseDropdownMenuInteractionsOptions = {
|
|
24
24
|
props: Readonly<DropdownMenuProps>;
|
|
25
25
|
emit: {
|
|
26
|
-
select?: (item: DropdownMenuItem) => void;
|
|
26
|
+
select?: (item: DropdownMenuItem, event: DropdownMenuSelectEvent) => void;
|
|
27
27
|
};
|
|
28
28
|
isDisabled: BooleanSource;
|
|
29
29
|
focusedPath: Ref<ItemPath>;
|
|
@@ -37,8 +37,8 @@ type UseDropdownMenuInteractionsOptions = {
|
|
|
37
37
|
isSubmenuOpeningLeft: (path: ItemPath) => boolean;
|
|
38
38
|
};
|
|
39
39
|
export declare function useDropdownMenuInteractions({ props, emit, isDisabled, focusedPath, openSubmenuPath, getItemAtPath, focusItem, moveFocus, submenus, hoverIntent, disclosure, isSubmenuOpeningLeft, }: UseDropdownMenuInteractionsOptions): {
|
|
40
|
-
activateItem: (item: DropdownMenuItem, path: ItemPath, event?: MouseEvent) => void;
|
|
41
|
-
selectItem: (item: DropdownMenuItem) => void;
|
|
40
|
+
activateItem: (item: DropdownMenuItem, path: ItemPath, event?: MouseEvent | KeyboardEvent) => void;
|
|
41
|
+
selectItem: (item: DropdownMenuItem, originalEvent?: Event) => void;
|
|
42
42
|
openSubmenu: (path: ItemPath, focus?: SubmenuFocusTarget, point?: PointerPoint) => boolean;
|
|
43
43
|
closeSubmenu: (path: ItemPath) => boolean;
|
|
44
44
|
focusHoveredItem: (item: DropdownMenuItem, indexOrPath: number | ItemPath, event?: MouseEvent) => void;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { FloatingReference } from '../floating/types.js';
|
|
3
|
+
import { DropdownMenuPlacement, DropdownMenuProps } from './types.js';
|
|
4
|
+
type BooleanSource = Readonly<Ref<boolean>>;
|
|
5
|
+
type PlacementSource = Readonly<Ref<DropdownMenuPlacement>>;
|
|
6
|
+
export declare function useDropdownMenuPortalPosition(options: {
|
|
7
|
+
props: Readonly<DropdownMenuProps>;
|
|
8
|
+
reference: Readonly<Ref<FloatingReference | null>>;
|
|
9
|
+
menuRef: Ref<HTMLElement | null>;
|
|
10
|
+
arrowRef: Ref<HTMLElement | null>;
|
|
11
|
+
isVisible: BooleanSource;
|
|
12
|
+
placement: PlacementSource;
|
|
13
|
+
restartKey: () => unknown;
|
|
14
|
+
}): {
|
|
15
|
+
actualPlacement: Readonly<Ref<import('../floating/index.js').FloatingPlacement, import('../floating/index.js').FloatingPlacement>>;
|
|
16
|
+
arrowStyle: Readonly<Ref<import('vue').CSSProperties | undefined, import('vue').CSSProperties | undefined>>;
|
|
17
|
+
contentStyle: Readonly<Ref<import('vue').CSSProperties, import('vue').CSSProperties>>;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ComponentRefValue } from './dropdown-menu-primitive-core.js';
|
|
2
|
+
import { DropdownMenuContentPrimitiveProps, DropdownMenuInteractOutsideEvent, DropdownMenuPlacement } from './types.js';
|
|
3
|
+
type ContentProps = Readonly<DropdownMenuContentPrimitiveProps>;
|
|
4
|
+
type ContentEvents = {
|
|
5
|
+
escapeKeyDown: (event: CustomEvent<{
|
|
6
|
+
originalEvent: KeyboardEvent;
|
|
7
|
+
}>) => void;
|
|
8
|
+
pointerDownOutside: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
9
|
+
focusOutside: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
10
|
+
interactOutside: (event: DropdownMenuInteractOutsideEvent) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare function useDropdownMenuPrimitiveContent(props: ContentProps, attrs: Record<string, unknown>, events: ContentEvents, submenu: boolean): {
|
|
13
|
+
id: import('vue').ComputedRef<string>;
|
|
14
|
+
element: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
15
|
+
arrowElement: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
16
|
+
actualPlacement: import('vue').Ref<DropdownMenuPlacement, DropdownMenuPlacement>;
|
|
17
|
+
isOpen: import('vue').ComputedRef<boolean>;
|
|
18
|
+
shouldRender: import('vue').ComputedRef<boolean>;
|
|
19
|
+
placementSide: import('vue').ComputedRef<string>;
|
|
20
|
+
rootAttrs: import('vue').ComputedRef<{
|
|
21
|
+
[x: string]: unknown;
|
|
22
|
+
}>;
|
|
23
|
+
floating: import('../floating/index.js').UseFloatingPositionReturn;
|
|
24
|
+
setElement: (value: ComponentRefValue) => void;
|
|
25
|
+
close: () => void;
|
|
26
|
+
};
|
|
27
|
+
export {};
|
|
@@ -1,13 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { StylesApiPartOptions } from '../../styles-api.js';
|
|
3
|
+
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuItemSlotProps, DropdownMenuRenderedItem, DropdownMenuPlacement, DropdownMenuPart, DropdownMenuProps, DropdownMenuSubmenuProps } from './types.js';
|
|
2
4
|
import { ItemPath } from './dropdown-menu-utils.js';
|
|
3
5
|
type DropdownMenuItemsSource = {
|
|
4
6
|
readonly value: DropdownMenuItem[];
|
|
5
7
|
};
|
|
6
8
|
type UseDropdownMenuRenderItemsOptions = {
|
|
9
|
+
props: Readonly<DropdownMenuProps>;
|
|
10
|
+
actualPlacement: Readonly<Ref<DropdownMenuPlacement>>;
|
|
7
11
|
items: DropdownMenuItemsSource;
|
|
8
12
|
getItemId: (path: ItemPath) => string;
|
|
9
13
|
getSubmenuId: (path: ItemPath) => string;
|
|
10
14
|
getMenuActiveDescendant: (path: ItemPath) => string | undefined;
|
|
15
|
+
getItemElement: (path: ItemPath) => HTMLElement | null;
|
|
11
16
|
isItemFocused: (indexOrPath: number | ItemPath) => boolean;
|
|
12
17
|
isSubmenuOpen: (path: ItemPath) => boolean;
|
|
13
18
|
activateItem: (item: DropdownMenuItem, path: ItemPath, event?: MouseEvent) => void;
|
|
@@ -18,13 +23,20 @@ type UseDropdownMenuRenderItemsOptions = {
|
|
|
18
23
|
close: (options?: DropdownMenuCloseOptions) => void;
|
|
19
24
|
};
|
|
20
25
|
export interface DropdownMenuRenderContext {
|
|
26
|
+
getPublicPartAttrs?: (part: DropdownMenuPart, options?: StylesApiPartOptions) => object;
|
|
21
27
|
isItemFocused: (indexOrPath: number | ItemPath) => boolean;
|
|
22
28
|
isSubmenuOpen: (path: ItemPath) => boolean;
|
|
23
29
|
getItemProps: (item: DropdownMenuItem, indexOrPath: number | ItemPath, focused?: boolean, disabled?: boolean, submenuOpen?: boolean) => DropdownMenuItemProps;
|
|
24
30
|
getSubmenuProps: (item: DropdownMenuItem, path: ItemPath, submenuOpen?: boolean) => DropdownMenuSubmenuProps;
|
|
25
31
|
getItemSlotProps: (item: DropdownMenuItem, indexOrPath: number | ItemPath, focused?: boolean, disabled?: boolean, submenuOpen?: boolean) => DropdownMenuItemSlotProps;
|
|
32
|
+
getItemElement: (path: ItemPath) => HTMLElement | null;
|
|
33
|
+
getSubmenuPlacement: () => DropdownMenuPlacement;
|
|
34
|
+
getStrategy: () => NonNullable<DropdownMenuProps['strategy']>;
|
|
35
|
+
getFlip: () => boolean;
|
|
36
|
+
getShift: () => boolean;
|
|
37
|
+
getCollisionPadding: () => NonNullable<DropdownMenuProps['collisionPadding']>;
|
|
26
38
|
}
|
|
27
|
-
export declare function useDropdownMenuRenderItems({ items, getItemId, getSubmenuId, getMenuActiveDescendant, isItemFocused, isSubmenuOpen, activateItem, focusHoveredItem, selectItem, openSubmenu, closeSubmenu, close, }: UseDropdownMenuRenderItemsOptions): {
|
|
39
|
+
export declare function useDropdownMenuRenderItems({ props, actualPlacement, items, getItemId, getSubmenuId, getMenuActiveDescendant, getItemElement, isItemFocused, isSubmenuOpen, activateItem, focusHoveredItem, selectItem, openSubmenu, closeSubmenu, close, }: UseDropdownMenuRenderItemsOptions): {
|
|
28
40
|
renderedItems: import('vue').ComputedRef<DropdownMenuRenderedItem[]>;
|
|
29
41
|
renderContext: DropdownMenuRenderContext;
|
|
30
42
|
getItemProps: (item: DropdownMenuItem, indexOrPath: number | ItemPath, focused?: boolean, disabled?: boolean, submenuOpen?: boolean) => DropdownMenuItemProps;
|