ropav 0.0.11 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -0
- package/dist/checkbox.css +32 -32
- package/dist/checkbox.js +33 -14
- package/dist/color-input.css +19 -19
- package/dist/color-input.js +35 -17
- package/dist/components/checkbox/types.d.ts +5 -1
- package/dist/components/checkbox/useCheckbox.d.ts +1 -1
- package/dist/components/color-input/types.d.ts +4 -1
- package/dist/components/color-input/useColorInput.d.ts +1 -1
- package/dist/components/color-input/useColorInputValue.d.ts +1 -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 -724
- 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 +5 -2
- package/dist/components/dropdown-menu/index.d.ts +28 -49
- package/dist/components/dropdown-menu/index.js +2 -2
- package/dist/components/dropdown-menu/types.d.ts +8 -3
- package/dist/components/dropdown-menu/useDropdownMenu.d.ts +8 -4
- package/dist/components/dropdown-menu/useDropdownMenuDisclosure.d.ts +7 -2
- package/dist/components/dropdown-menu/useDropdownMenuPortalPosition.d.ts +3 -3
- package/dist/components/dropdown-menu/useDropdownMenuPrimitiveContent.d.ts +27 -0
- package/dist/components/dropdown-menu/useDropdownMenuRenderItems.d.ts +2 -0
- package/dist/components/floating/index.d.ts +3 -1
- package/dist/components/floating/index.js +3 -0
- package/dist/components/floating/types.d.ts +86 -1
- package/dist/components/floating/useFloatingPosition.d.ts +3 -26
- package/dist/components/floating/useHoverDisclosure.d.ts +2 -0
- package/dist/components/input/input.d.ts +4 -1
- package/dist/components/input/types.d.ts +3 -1
- package/dist/components/modal/index.d.ts +1 -1
- package/dist/components/modal/modal.d.ts +3 -1
- package/dist/components/modal/types.d.ts +3 -0
- package/dist/components/modal/useModal.d.ts +7 -4
- package/dist/components/number-input/types.d.ts +3 -1
- package/dist/components/number-input/useNumberInput.d.ts +2 -1
- package/dist/components/popover/usePopover.d.ts +2 -2
- package/dist/components/radio/types.d.ts +17 -1
- package/dist/components/radio/useRadio.d.ts +3 -0
- package/dist/components/select/select.d.ts +4 -1
- package/dist/components/select/types.d.ts +6 -1
- package/dist/components/select/useSelect.d.ts +3 -2
- package/dist/components/slider/index.d.ts +1 -1
- package/dist/components/slider/range-slider.d.ts +3 -3
- package/dist/components/slider/types.d.ts +11 -3
- package/dist/components/slider/useRangeSlider.d.ts +1 -1
- package/dist/components/slider/useSlider.d.ts +1 -1
- package/dist/components/switch/types.d.ts +5 -1
- package/dist/components/switch/useSwitch.d.ts +1 -1
- package/dist/components/teleport-provider/index.d.ts +1 -0
- package/dist/components/teleport-provider/index.js +2 -1
- package/dist/components/teleport-provider/useTeleportTarget.d.ts +4 -3
- package/dist/components/textarea/types.d.ts +4 -1
- package/dist/components/textarea/useTextarea.d.ts +1 -1
- package/dist/components/toast/index.d.ts +2 -1
- package/dist/components/toast/index.js +2 -2
- package/dist/components/toast/toast-store.d.ts +2 -0
- package/dist/components/toast/types.d.ts +10 -4
- package/dist/components/toast/useToast.d.ts +2 -2
- package/dist/components/tooltip/useTooltip.d.ts +3 -3
- package/dist/composables/useOverlayLayer.d.ts +32 -0
- package/dist/dialog.js +510 -0
- package/dist/dropdown-menu.css +4 -5
- package/dist/dropdown-menu.js +1155 -886
- package/dist/floating.js +403 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7 -4
- package/dist/input.css +24 -24
- package/dist/input.js +21 -11
- package/dist/legacy-unlayered.css +424 -503
- package/dist/modal.css +28 -28
- package/dist/modal.js +141 -200
- package/dist/number-input.css +20 -20
- package/dist/number-input.js +44 -16
- package/dist/popover.css +4 -4
- package/dist/popover.js +29 -40
- package/dist/radio.css +18 -18
- package/dist/radio.js +96 -18
- package/dist/select.css +54 -43
- package/dist/select.js +185 -67
- package/dist/slider.css +183 -202
- package/dist/slider.js +138 -37
- package/dist/switch.css +17 -17
- package/dist/switch.js +31 -13
- package/dist/textarea.css +26 -26
- package/dist/textarea.js +19 -9
- package/dist/toast.js +110 -99
- package/dist/tooltip.css +5 -80
- package/dist/tooltip.js +11 -3
- package/dist/useControlState.js +4 -0
- package/dist/useFloatingPosition.js +86 -39
- package/dist/useFormControl.js +107 -0
- package/dist/useOverlayLayer.js +262 -0
- package/dist/useTeleportTarget.js +21 -10
- package/docs/public-floating-api.md +159 -0
- package/docs/public-styles-api.md +2 -1
- package/package.json +10 -6
- package/dist/useClickOutside.js +0 -24
|
@@ -1,29 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { FloatingReference, FloatingTarget, UseFloatingPositionOptions, UseFloatingPositionReturn } from './types.js';
|
|
3
3
|
type Source<T> = () => T;
|
|
4
|
-
export interface UseFloatingPositionOptions<TPlacement extends FloatingPlacement> {
|
|
5
|
-
reference: Readonly<Ref<FloatingReference | null>>;
|
|
6
|
-
floating: Ref<HTMLElement | null>;
|
|
7
|
-
arrow?: Ref<HTMLElement | null>;
|
|
8
|
-
open: Readonly<Ref<boolean>>;
|
|
9
|
-
placement: Source<TPlacement>;
|
|
10
|
-
strategy: Source<FloatingStrategy>;
|
|
11
|
-
offset: Source<FloatingOffset | undefined>;
|
|
12
|
-
flip: Source<boolean>;
|
|
13
|
-
shift: Source<boolean>;
|
|
14
|
-
collisionPadding: Source<FloatingCollisionPadding>;
|
|
15
|
-
arrowEnabled: Source<boolean>;
|
|
16
|
-
restartKey?: Source<unknown>;
|
|
17
|
-
}
|
|
18
|
-
export interface UseFloatingPositionReturn<TPlacement extends FloatingPlacement> {
|
|
19
|
-
actualPlacement: Ref<TPlacement>;
|
|
20
|
-
arrowStyle: Ref<CSSProperties | undefined>;
|
|
21
|
-
floatingStyle: Ref<CSSProperties>;
|
|
22
|
-
isPositioned: Ref<boolean>;
|
|
23
|
-
start: () => void;
|
|
24
|
-
stop: () => void;
|
|
25
|
-
update: () => Promise<void>;
|
|
26
|
-
}
|
|
27
4
|
export declare function readFloatingTarget(target: FloatingTarget | null | undefined): string | FloatingReference | null | undefined;
|
|
28
5
|
export declare function isVirtualReference(value: unknown): value is FloatingReference;
|
|
29
6
|
export declare function isElementReference(value: unknown): value is Element;
|
|
@@ -34,5 +11,5 @@ export declare function useFloatingTarget(getTarget: Source<FloatingTarget | nul
|
|
|
34
11
|
resolvedTarget: import('vue').ShallowRef<FloatingReference | null, FloatingReference | null>;
|
|
35
12
|
syncTarget: () => void;
|
|
36
13
|
};
|
|
37
|
-
export declare function useFloatingPosition
|
|
14
|
+
export declare function useFloatingPosition(options: UseFloatingPositionOptions): UseFloatingPositionReturn;
|
|
38
15
|
export {};
|
|
@@ -5,7 +5,10 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
5
5
|
}> & (typeof globalThis extends {
|
|
6
6
|
__VLS_PROPS_FALLBACK: infer P;
|
|
7
7
|
} ? P : {});
|
|
8
|
-
expose: (exposed: {
|
|
8
|
+
expose: (exposed: import('vue').ShallowUnwrapRef<{
|
|
9
|
+
nativeElement: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
10
|
+
focus: () => void | undefined;
|
|
11
|
+
}>) => void;
|
|
9
12
|
attrs: any;
|
|
10
13
|
slots: {
|
|
11
14
|
left?: (props: {}) => any;
|
|
@@ -7,7 +7,9 @@ export type InputSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
|
7
7
|
export interface InputProps extends StylesApiProps<InputPart> {
|
|
8
8
|
id?: string;
|
|
9
9
|
name?: string;
|
|
10
|
-
|
|
10
|
+
form?: string;
|
|
11
|
+
modelValue?: string;
|
|
12
|
+
defaultValue?: string;
|
|
11
13
|
type?: 'text' | 'password' | 'email' | 'number' | 'tel' | 'url';
|
|
12
14
|
size?: InputSize;
|
|
13
15
|
radius?: InputRadius;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as Modal } from './modal.js';
|
|
2
2
|
export { modalParts } from './types.js';
|
|
3
|
-
export type { ModalFocusTrapOptions, ModalInitialFocus, ModalPart, ModalPresetSize, ModalProps, ModalRole, ModalSize, ModalSlotProps, } from './types.js';
|
|
3
|
+
export type { ModalFocusTrapOptions, ModalInitialFocus, ModalCloseReason, ModalPart, ModalPresetSize, ModalProps, ModalRole, ModalSize, ModalSlotProps, } from './types.js';
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { DialogCloseReason } from '../dialog/index.js';
|
|
1
2
|
import { ModalProps } from './types.js';
|
|
2
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<{
|
|
3
4
|
props: import('vue').PublicProps & __VLS_PrettifyLocal<ModalProps & {
|
|
5
|
+
onClose?: ((reason: DialogCloseReason) => any) | undefined;
|
|
4
6
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
5
7
|
}> & (typeof globalThis extends {
|
|
6
8
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -29,7 +31,7 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
29
31
|
toggle: () => void;
|
|
30
32
|
}) => any;
|
|
31
33
|
};
|
|
32
|
-
emit: (evt: "update:open", value: boolean) => void;
|
|
34
|
+
emit: ((evt: "close", reason: DialogCloseReason) => void) & ((evt: "update:open", value: boolean) => void);
|
|
33
35
|
}>) => import('vue').VNode & {
|
|
34
36
|
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
35
37
|
};
|
|
@@ -3,6 +3,7 @@ import { FocusTrapOptions } from '../focus-trap/types.js';
|
|
|
3
3
|
import { TeleportProps } from '../floating/types.js';
|
|
4
4
|
import { OverlayProps } from '../overlay/types.js';
|
|
5
5
|
import { StylesApiProps } from '../../styles-api.js';
|
|
6
|
+
import { DialogCloseReason } from '../dialog/types.js';
|
|
6
7
|
export declare const modalParts: readonly ["root", "overlay", "panel", "header", "title", "description", "body", "footer", "close"];
|
|
7
8
|
export type ModalPart = (typeof modalParts)[number];
|
|
8
9
|
export type ModalPresetSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
@@ -34,5 +35,7 @@ export interface ModalProps extends TeleportProps, StylesApiProps<ModalPart> {
|
|
|
34
35
|
preventScroll?: boolean;
|
|
35
36
|
returnFocus?: boolean;
|
|
36
37
|
keepMounted?: boolean;
|
|
38
|
+
modal?: boolean;
|
|
37
39
|
focusTrapOptions?: ModalFocusTrapOptions;
|
|
38
40
|
}
|
|
41
|
+
export type { DialogCloseReason as ModalCloseReason };
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { CSSProperties } from 'vue';
|
|
2
|
+
import { DialogCloseReason } from '../dialog/types.js';
|
|
2
3
|
import { ModalProps, ModalRole, ModalSlotProps } from './types.js';
|
|
3
|
-
export declare function useModal(props: Readonly<ModalProps>,
|
|
4
|
-
|
|
4
|
+
export declare function useModal(props: Readonly<ModalProps>, emit?: {
|
|
5
|
+
openChange?: (open: boolean) => void;
|
|
6
|
+
close?: (reason: DialogCloseReason) => void;
|
|
7
|
+
}): {
|
|
5
8
|
modalId: import('vue').ComputedRef<string>;
|
|
6
9
|
titleId: import('vue').ComputedRef<string>;
|
|
7
10
|
descriptionId: import('vue').ComputedRef<string>;
|
|
@@ -23,7 +26,7 @@ export declare function useModal(props: Readonly<ModalProps>, emitOpenChange?: (
|
|
|
23
26
|
}>;
|
|
24
27
|
slotProps: import('vue').ComputedRef<ModalSlotProps>;
|
|
25
28
|
openModal: () => void;
|
|
26
|
-
closeModal: () => void;
|
|
29
|
+
closeModal: (reason?: DialogCloseReason) => void;
|
|
27
30
|
toggleModal: () => void;
|
|
28
|
-
|
|
31
|
+
setOpen: (nextOpen: boolean) => void;
|
|
29
32
|
};
|
|
@@ -11,7 +11,9 @@ export type NumberInputTextAlign = 'left' | 'center' | 'right';
|
|
|
11
11
|
export interface NumberInputProps extends StylesApiProps<NumberInputPart> {
|
|
12
12
|
id?: string;
|
|
13
13
|
name?: string;
|
|
14
|
-
|
|
14
|
+
form?: string;
|
|
15
|
+
modelValue?: NumberInputValue;
|
|
16
|
+
defaultValue?: NumberInputValue;
|
|
15
17
|
min?: number;
|
|
16
18
|
max?: number;
|
|
17
19
|
step?: number;
|
|
@@ -13,7 +13,8 @@ export declare function stepNumberInputValue(value: NumberInputValue, direction:
|
|
|
13
13
|
export declare function parseNumberInputValue(value: string): NumberInputValue;
|
|
14
14
|
export declare function normalizeNumberInputControlsPosition(position: NumberInputControlsPosition | undefined): NumberInputControlsPosition;
|
|
15
15
|
export declare function normalizeNumberInputTextAlign(textAlign: NumberInputTextAlign | undefined): NumberInputTextAlign;
|
|
16
|
-
export declare function
|
|
16
|
+
export declare function getModelInputValue(value: NumberInputValue): string;
|
|
17
|
+
export declare function useNumberInput(props: Readonly<NumberInputProps>, emitUpdate: (value: NumberInputValue) => void, getValue?: () => NumberInputValue): {
|
|
17
18
|
control: import('../../composables/useControlState.js').ControlState;
|
|
18
19
|
rootClass: import('vue').ComputedRef<string[]>;
|
|
19
20
|
bounds: import('vue').ComputedRef<NumberInputBounds>;
|
|
@@ -20,9 +20,9 @@ export declare function usePopover(props: Readonly<PopoverProps>, emitOpenChange
|
|
|
20
20
|
triggerProps: import('vue').ComputedRef<PopoverTriggerProps>;
|
|
21
21
|
slotProps: import('vue').ComputedRef<PopoverSlotProps>;
|
|
22
22
|
contentSlotProps: import('vue').ComputedRef<PopoverContentSlotProps>;
|
|
23
|
-
actualPlacement: import('vue').Ref<
|
|
23
|
+
actualPlacement: Readonly<import('vue').Ref<import('../floating/index.js').FloatingPlacement, import('../floating/index.js').FloatingPlacement>>;
|
|
24
24
|
placementSide: import('vue').ComputedRef<string>;
|
|
25
|
-
arrowStyle: import('vue').Ref<CSSProperties | undefined, CSSProperties | undefined
|
|
25
|
+
arrowStyle: Readonly<import('vue').Ref<CSSProperties | undefined, CSSProperties | undefined>>;
|
|
26
26
|
teleportTo: import('vue').ComputedRef<import('../floating/index.js').TeleportTargetValue>;
|
|
27
27
|
openPopover: () => void;
|
|
28
28
|
closePopover: () => void;
|
|
@@ -12,6 +12,7 @@ export type RadioGroupOrientation = 'horizontal' | 'vertical';
|
|
|
12
12
|
export interface RadioProps extends StylesApiProps<RadioPart> {
|
|
13
13
|
id?: string;
|
|
14
14
|
name?: string;
|
|
15
|
+
form?: string;
|
|
15
16
|
value: string | number;
|
|
16
17
|
checked?: boolean;
|
|
17
18
|
variant?: RadioVariant;
|
|
@@ -25,11 +26,14 @@ export interface RadioProps extends StylesApiProps<RadioPart> {
|
|
|
25
26
|
describedby?: string;
|
|
26
27
|
labelledby?: string;
|
|
27
28
|
inputAttrs?: InputHTMLAttributes;
|
|
29
|
+
validationMessage?: string;
|
|
28
30
|
}
|
|
29
31
|
export interface RadioGroupProps extends StylesApiProps<RadioGroupPart> {
|
|
30
32
|
id?: string;
|
|
31
33
|
name?: string;
|
|
32
|
-
|
|
34
|
+
form?: string;
|
|
35
|
+
modelValue?: string | number | null;
|
|
36
|
+
defaultValue?: string | number | null;
|
|
33
37
|
variant?: RadioVariant;
|
|
34
38
|
color?: RadioColor;
|
|
35
39
|
autoContrast?: boolean;
|
|
@@ -41,10 +45,20 @@ export interface RadioGroupProps extends StylesApiProps<RadioGroupPart> {
|
|
|
41
45
|
ariaLabel?: string;
|
|
42
46
|
describedby?: string;
|
|
43
47
|
labelledby?: string;
|
|
48
|
+
inputAttrs?: InputHTMLAttributes;
|
|
49
|
+
validationMessage?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface RadioGroupRegistration {
|
|
52
|
+
input: HTMLInputElement;
|
|
53
|
+
value: () => string | number;
|
|
54
|
+
disabled: () => boolean;
|
|
55
|
+
checked: () => boolean;
|
|
56
|
+
validationMessage: () => string | undefined;
|
|
44
57
|
}
|
|
45
58
|
export interface RadioGroupContext {
|
|
46
59
|
modelValue: string | number | null;
|
|
47
60
|
name: string;
|
|
61
|
+
form: string | undefined;
|
|
48
62
|
disabled: boolean;
|
|
49
63
|
required: boolean;
|
|
50
64
|
invalid: boolean;
|
|
@@ -52,6 +66,8 @@ export interface RadioGroupContext {
|
|
|
52
66
|
color?: RadioColor;
|
|
53
67
|
autoContrast?: boolean;
|
|
54
68
|
size?: RadioSize;
|
|
69
|
+
inputAttrs: InputHTMLAttributes | undefined;
|
|
55
70
|
select: (value: string | number) => void;
|
|
71
|
+
register: (registration: RadioGroupRegistration) => () => void;
|
|
56
72
|
}
|
|
57
73
|
export declare const radioGroupKey: InjectionKey<RadioGroupContext>;
|
|
@@ -4,6 +4,8 @@ export declare function useRadio(props: Readonly<RadioProps>, emitChange: (event
|
|
|
4
4
|
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
5
5
|
control: import('../../composables/useControlState.js').ControlState;
|
|
6
6
|
name: import('vue').ComputedRef<string | undefined>;
|
|
7
|
+
form: import('vue').ComputedRef<string | undefined>;
|
|
8
|
+
groupInputAttrs: import('vue').ComputedRef<import('vue').InputHTMLAttributes | undefined>;
|
|
7
9
|
isChecked: import('vue').ComputedRef<boolean>;
|
|
8
10
|
isDisabled: import('vue').ComputedRef<boolean>;
|
|
9
11
|
isRequired: import('vue').ComputedRef<boolean>;
|
|
@@ -16,4 +18,5 @@ export declare function useRadio(props: Readonly<RadioProps>, emitChange: (event
|
|
|
16
18
|
export declare function useRadioGroup(props: Readonly<RadioGroupProps>, emitUpdate: (value: string | number | null) => void): {
|
|
17
19
|
control: import('../../composables/useControlState.js').ControlState;
|
|
18
20
|
rootClass: import('vue').ComputedRef<string[]>;
|
|
21
|
+
value: import('vue').ComputedRef<string | number | null>;
|
|
19
22
|
};
|
|
@@ -5,7 +5,10 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
5
5
|
}> & (typeof globalThis extends {
|
|
6
6
|
__VLS_PROPS_FALLBACK: infer P;
|
|
7
7
|
} ? P : {});
|
|
8
|
-
expose: (exposed: {
|
|
8
|
+
expose: (exposed: import('vue').ShallowUnwrapRef<{
|
|
9
|
+
nativeElement: import('vue').Ref<HTMLSelectElement | null, HTMLSelectElement | null>;
|
|
10
|
+
focus: () => void | undefined;
|
|
11
|
+
}>) => void;
|
|
9
12
|
attrs: any;
|
|
10
13
|
slots: {
|
|
11
14
|
empty?: (props: {}) => any;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { SelectHTMLAttributes } from 'vue';
|
|
1
2
|
import { StylesApiProps } from '../../styles-api.js';
|
|
2
3
|
export interface SelectOption {
|
|
3
4
|
label: string;
|
|
@@ -9,7 +10,9 @@ export type SelectSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
|
9
10
|
export interface SelectProps extends StylesApiProps<SelectPart> {
|
|
10
11
|
id?: string;
|
|
11
12
|
name?: string;
|
|
12
|
-
|
|
13
|
+
form?: string;
|
|
14
|
+
modelValue?: string | number | null;
|
|
15
|
+
defaultValue?: string | number | null;
|
|
13
16
|
options?: SelectOption[];
|
|
14
17
|
size?: SelectSize;
|
|
15
18
|
radius?: SelectRadius;
|
|
@@ -22,6 +25,8 @@ export interface SelectProps extends StylesApiProps<SelectPart> {
|
|
|
22
25
|
ariaLabel?: string;
|
|
23
26
|
describedby?: string;
|
|
24
27
|
labelledby?: string;
|
|
28
|
+
inputAttrs?: SelectHTMLAttributes;
|
|
29
|
+
validationMessage?: string;
|
|
25
30
|
}
|
|
26
31
|
export declare const selectParts: readonly ["root", "trigger", "value", "indicator", "clear", "content", "option", "empty"];
|
|
27
32
|
export type SelectPart = (typeof selectParts)[number];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SelectOption, SelectProps } from './types.js';
|
|
2
2
|
type SelectValue = string | number | null;
|
|
3
|
-
type SelectBehaviorProps = Omit<SelectProps, 'classNames' | 'styles'>;
|
|
4
|
-
export declare function useSelect(props: Readonly<SelectBehaviorProps>, emitUpdate: (value: SelectValue) => void): {
|
|
3
|
+
type SelectBehaviorProps = Omit<SelectProps, 'classNames' | 'styles' | 'inputAttrs'>;
|
|
4
|
+
export declare function useSelect(props: Readonly<SelectBehaviorProps>, emitUpdate: (value: SelectValue) => void, getValue?: () => SelectValue): {
|
|
5
5
|
selectRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
6
6
|
triggerRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
7
7
|
isOpen: import('vue').Ref<boolean, boolean>;
|
|
@@ -14,6 +14,7 @@ export declare function useSelect(props: Readonly<SelectBehaviorProps>, emitUpda
|
|
|
14
14
|
rootClass: import('vue').ComputedRef<string[]>;
|
|
15
15
|
hasValue: import('vue').ComputedRef<boolean>;
|
|
16
16
|
displayLabel: import('vue').ComputedRef<string>;
|
|
17
|
+
value: import('vue').ComputedRef<SelectValue>;
|
|
17
18
|
canClear: import('vue').ComputedRef<boolean>;
|
|
18
19
|
toggle: () => void;
|
|
19
20
|
selectOption: (option: SelectOption) => void;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { default as Slider } from './slider.js';
|
|
2
2
|
export { default as RangeSlider } from './range-slider.js';
|
|
3
3
|
export { rangeSliderParts, sliderColors, sliderOrientations, sliderParts, sliderSizes, } from './types.js';
|
|
4
|
-
export type { RangeSliderAriaValueText, RangeSliderEndpointValueText, RangeSliderInputAttrs, RangeSliderPart, RangeSliderProps, RangeSliderThumb, RangeSliderValue, SliderColor, SliderInputAttrs, SliderMark, SliderMarkColor, SliderMarkInput, SliderOrientation, SliderPart, SliderProps, SliderPresetColor, SliderSize, SliderThumbStyle, SliderTooltip, SliderTooltipMode, SliderTooltipOptions, SliderValueFormatter, } from './types.js';
|
|
4
|
+
export type { RangeSliderAriaValueText, RangeSliderEndpointValueText, RangeSliderInputAttrs, RangeSliderPart, RangeSliderProps, RangeSliderThumb, RangeSliderValue, RangeSliderValidationMessage, SliderColor, SliderInputAttrs, SliderMark, SliderMarkColor, SliderMarkInput, SliderOrientation, SliderPart, SliderProps, SliderPresetColor, SliderSize, SliderThumbStyle, SliderTooltip, SliderTooltipMode, SliderTooltipOptions, SliderValueFormatter, } from './types.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RangeSliderProps } from './types.js';
|
|
1
|
+
import { RangeSliderProps, RangeSliderValue } 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<RangeSliderProps & {
|
|
4
4
|
"onUpdate:modelValue"?: ((value: [number, number]) => any) | undefined;
|
|
@@ -14,9 +14,9 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
14
14
|
default?: (props: {}) => any;
|
|
15
15
|
} & {
|
|
16
16
|
value?: (props: {
|
|
17
|
-
value:
|
|
17
|
+
value: RangeSliderValue;
|
|
18
18
|
formattedValue: [string | number, string | number];
|
|
19
|
-
percent:
|
|
19
|
+
percent: RangeSliderValue;
|
|
20
20
|
}) => any;
|
|
21
21
|
} & {
|
|
22
22
|
thumb?: (props: {
|
|
@@ -20,6 +20,7 @@ export type SliderInputAttrs = InputHTMLAttributes;
|
|
|
20
20
|
export type RangeSliderInputAttrs = SliderInputAttrs | [SliderInputAttrs | undefined, SliderInputAttrs | undefined];
|
|
21
21
|
export type RangeSliderEndpointValueText = string | SliderValueFormatter;
|
|
22
22
|
export type RangeSliderAriaValueText = RangeSliderEndpointValueText | [RangeSliderEndpointValueText, RangeSliderEndpointValueText];
|
|
23
|
+
export type RangeSliderValidationMessage = string | [string | undefined, string | undefined];
|
|
23
24
|
export type SliderTooltipMode = 'hover' | 'always';
|
|
24
25
|
export type SliderTooltipOptions = Pick<TooltipProps, 'id' | 'placement' | 'color' | 'offset' | 'openDelay' | 'arrow'> & {
|
|
25
26
|
mode?: SliderTooltipMode;
|
|
@@ -41,7 +42,9 @@ export interface SliderThumbStyle {
|
|
|
41
42
|
export interface SliderProps extends StylesApiProps<SliderPart> {
|
|
42
43
|
id?: string;
|
|
43
44
|
name?: string;
|
|
44
|
-
|
|
45
|
+
form?: string;
|
|
46
|
+
modelValue?: number;
|
|
47
|
+
defaultValue?: number;
|
|
45
48
|
min?: number;
|
|
46
49
|
max?: number;
|
|
47
50
|
step?: number | 'any';
|
|
@@ -53,17 +56,22 @@ export interface SliderProps extends StylesApiProps<SliderPart> {
|
|
|
53
56
|
size?: SliderSize;
|
|
54
57
|
orientation?: SliderOrientation;
|
|
55
58
|
disabled?: boolean;
|
|
59
|
+
required?: boolean;
|
|
60
|
+
invalid?: boolean;
|
|
56
61
|
ariaLabel?: string;
|
|
57
62
|
ariaValueText?: string | SliderValueFormatter;
|
|
58
63
|
describedby?: string;
|
|
59
64
|
labelledby?: string;
|
|
60
65
|
inputAttrs?: SliderInputAttrs;
|
|
66
|
+
validationMessage?: string;
|
|
61
67
|
}
|
|
62
|
-
export interface RangeSliderProps extends Omit<SliderProps, 'modelValue' | 'name' | 'ariaLabel' | 'ariaValueText' | 'inputAttrs' | 'classNames' | 'styles'>, StylesApiProps<RangeSliderPart> {
|
|
63
|
-
modelValue
|
|
68
|
+
export interface RangeSliderProps extends Omit<SliderProps, 'modelValue' | 'defaultValue' | 'name' | 'ariaLabel' | 'ariaValueText' | 'inputAttrs' | 'validationMessage' | 'classNames' | 'styles'>, StylesApiProps<RangeSliderPart> {
|
|
69
|
+
modelValue?: RangeSliderValue;
|
|
70
|
+
defaultValue?: RangeSliderValue;
|
|
64
71
|
minRange?: number;
|
|
65
72
|
name?: string | [string, string];
|
|
66
73
|
ariaLabel?: [string, string];
|
|
67
74
|
ariaValueText?: RangeSliderAriaValueText;
|
|
68
75
|
inputAttrs?: RangeSliderInputAttrs;
|
|
76
|
+
validationMessage?: RangeSliderValidationMessage;
|
|
69
77
|
}
|
|
@@ -12,7 +12,7 @@ type RangeSliderStateProps = Readonly<RangeSliderProps & {
|
|
|
12
12
|
export declare function normalizeRangeSliderMinRange(minRange: number, min: number, max: number): number;
|
|
13
13
|
export declare function normalizeRangeSliderValue(value: RangeSliderValue, min: number, max: number, step: number | 'any', minRange?: number): RangeSliderValue;
|
|
14
14
|
export declare function getClosestRangeSliderThumb(value: number, range: RangeSliderValue, activeThumb?: RangeSliderThumb): RangeSliderThumb;
|
|
15
|
-
export declare function useRangeSlider(props: RangeSliderStateProps, emitUpdate: (value: RangeSliderValue) => void): {
|
|
15
|
+
export declare function useRangeSlider(props: RangeSliderStateProps, emitUpdate: (value: RangeSliderValue) => void, getValue?: () => RangeSliderValue): {
|
|
16
16
|
control: import('../../composables/useControlState.js').ControlState;
|
|
17
17
|
nativeMin: import('vue').ComputedRef<RangeSliderValue>;
|
|
18
18
|
nativeMax: import('vue').ComputedRef<RangeSliderValue>;
|
|
@@ -8,7 +8,7 @@ type SliderStateProps = Readonly<SliderProps & {
|
|
|
8
8
|
tooltip: NonNullable<SliderProps['tooltip']>;
|
|
9
9
|
orientation: NonNullable<SliderProps['orientation']>;
|
|
10
10
|
}>;
|
|
11
|
-
export declare function useSlider(props: SliderStateProps, emitUpdate: (value: number) => void): {
|
|
11
|
+
export declare function useSlider(props: SliderStateProps, emitUpdate: (value: number) => void, getValue?: () => number): {
|
|
12
12
|
control: import('../../composables/useControlState.js').ControlState;
|
|
13
13
|
nativeMin: import('vue').ComputedRef<number>;
|
|
14
14
|
nativeMax: import('vue').ComputedRef<number>;
|
|
@@ -8,7 +8,10 @@ export type SwitchSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
|
8
8
|
export interface SwitchProps extends StylesApiProps<SwitchPart> {
|
|
9
9
|
id?: string;
|
|
10
10
|
name?: string;
|
|
11
|
-
|
|
11
|
+
form?: string;
|
|
12
|
+
modelValue?: boolean;
|
|
13
|
+
defaultValue?: boolean;
|
|
14
|
+
value?: string | number;
|
|
12
15
|
color?: SwitchColor;
|
|
13
16
|
size?: SwitchSize;
|
|
14
17
|
disabled?: boolean;
|
|
@@ -18,4 +21,5 @@ export interface SwitchProps extends StylesApiProps<SwitchPart> {
|
|
|
18
21
|
describedby?: string;
|
|
19
22
|
labelledby?: string;
|
|
20
23
|
inputAttrs?: InputHTMLAttributes;
|
|
24
|
+
validationMessage?: string;
|
|
21
25
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CSSProperties } from 'vue';
|
|
2
2
|
import { SwitchProps } from './types.js';
|
|
3
|
-
export declare function useSwitch(props: Readonly<SwitchProps>, emitUpdate: (value: boolean) => void): {
|
|
3
|
+
export declare function useSwitch(props: Readonly<SwitchProps>, emitUpdate: (value: boolean) => void, getValue?: () => boolean): {
|
|
4
4
|
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
5
5
|
control: import('../../composables/useControlState.js').ControlState;
|
|
6
6
|
rootClass: import('vue').ComputedRef<string[]>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
+
import { r as useTeleportTarget } from "../../useTeleportTarget.js";
|
|
1
2
|
import { t as teleport_provider_default } from "../../teleport-provider.js";
|
|
2
|
-
export { teleport_provider_default as TeleportProvider };
|
|
3
|
+
export { teleport_provider_default as TeleportProvider, useTeleportTarget };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { ComputedRef } from 'vue';
|
|
1
|
+
import { ComputedRef, MaybeRefOrGetter } from 'vue';
|
|
2
2
|
import { TeleportTarget, TeleportTargetValue } from '../floating/types.js';
|
|
3
3
|
import { TeleportProviderProps } from './types.js';
|
|
4
|
-
export declare function provideTeleportTarget(props: Readonly<TeleportProviderProps>): ComputedRef<TeleportTargetValue>;
|
|
5
|
-
export declare function useTeleportTarget(
|
|
4
|
+
export declare function provideTeleportTarget(props: Readonly<TeleportProviderProps>, positioningKey?: MaybeRefOrGetter<unknown>): ComputedRef<TeleportTargetValue>;
|
|
5
|
+
export declare function useTeleportTarget(target?: MaybeRefOrGetter<TeleportTarget | null | undefined>): ComputedRef<TeleportTargetValue>;
|
|
6
|
+
export declare function useTeleportPositioningKey(): ComputedRef<unknown>;
|
|
@@ -8,7 +8,9 @@ export type TextareaResize = 'none' | 'vertical' | 'both';
|
|
|
8
8
|
export interface TextareaProps extends StylesApiProps<TextareaPart> {
|
|
9
9
|
id?: string;
|
|
10
10
|
name?: string;
|
|
11
|
-
|
|
11
|
+
form?: string;
|
|
12
|
+
modelValue?: string;
|
|
13
|
+
defaultValue?: string;
|
|
12
14
|
size?: TextareaSize;
|
|
13
15
|
radius?: TextareaRadius;
|
|
14
16
|
resize?: TextareaResize;
|
|
@@ -26,4 +28,5 @@ export interface TextareaProps extends StylesApiProps<TextareaPart> {
|
|
|
26
28
|
describedby?: string;
|
|
27
29
|
labelledby?: string;
|
|
28
30
|
inputAttrs?: TextareaHTMLAttributes;
|
|
31
|
+
validationMessage?: string;
|
|
29
32
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextareaProps } from './types.js';
|
|
2
|
-
export declare function useTextarea(props: Readonly<TextareaProps>, emitUpdate: (value: string) => void): {
|
|
2
|
+
export declare function useTextarea(props: Readonly<TextareaProps>, emitUpdate: (value: string) => void, getValue?: () => string): {
|
|
3
3
|
textareaRef: import('vue').Ref<HTMLTextAreaElement | null, HTMLTextAreaElement | null>;
|
|
4
4
|
control: import('../../composables/useControlState.js').ControlState;
|
|
5
5
|
rootClass: import('vue').ComputedRef<string[]>;
|
|
@@ -4,4 +4,5 @@ export { default as ToastViewport } from './toast-viewport.js';
|
|
|
4
4
|
export { toastColors, toastParts, toastPositions, toastRadiuses, toastTypes, toastVariants, toastViewportParts, } from './types.js';
|
|
5
5
|
export { useToast } from './useToast.js';
|
|
6
6
|
export { useToastState } from './useToastState.js';
|
|
7
|
-
export
|
|
7
|
+
export { createToastStore } from './toast-store.js';
|
|
8
|
+
export type { ToastCloseReason, ToastColor, ToastCreate, ToastId, ToastInput, ToastItem, ToastOptions, ToastPart, ToastPosition, ToastProps, ToastProviderContext, ToastProviderProps, ToastRadius, ToastRole, ToastStateBindingProps, ToastStateOption, ToastStore, ToastStoreOptions, ToastType, ToastUpdateOptions, ToastVariant, ToastViewportProps, ToastViewportPart, ToastViewportSlotProps, UseToastReturn, UseToastStateOptions, UseToastStateReturn, } from './types.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as toastColors, c as toastRadiuses, d as toastViewportParts, f as
|
|
2
|
-
export { toast_default as Toast, toast_provider_default as ToastProvider, toast_viewport_default as ToastViewport, toastColors, toastParts, toastPositions, toastRadiuses, toastTypes, toastVariants, toastViewportParts, useToast, useToastState };
|
|
1
|
+
import { a as toastColors, c as toastRadiuses, d as toastViewportParts, f as createToastStore, i as useToast, l as toastTypes, n as toast_viewport_default, o as toastParts, p as toast_default, r as toast_provider_default, s as toastPositions, t as useToastState, u as toastVariants } from "../../toast.js";
|
|
2
|
+
export { toast_default as Toast, toast_provider_default as ToastProvider, toast_viewport_default as ToastViewport, createToastStore, toastColors, toastParts, toastPositions, toastRadiuses, toastTypes, toastVariants, toastViewportParts, useToast, useToastState };
|
|
@@ -17,7 +17,7 @@ export type ToastRadius = (typeof toastRadiuses)[number];
|
|
|
17
17
|
export type ToastPosition = (typeof toastPositions)[number];
|
|
18
18
|
export type ToastType = (typeof toastTypes)[number];
|
|
19
19
|
export type ToastRole = 'alert' | 'status' | 'none';
|
|
20
|
-
export type ToastCloseReason = 'dismiss' | 'timeout';
|
|
20
|
+
export type ToastCloseReason = 'dismiss' | 'overflow' | 'replace' | 'timeout';
|
|
21
21
|
export type ToastStateOption<T> = MaybeRefOrGetter<T>;
|
|
22
22
|
export type ToastId = string;
|
|
23
23
|
export interface ToastProps extends StylesApiProps<ToastPart> {
|
|
@@ -55,7 +55,7 @@ export interface UseToastStateReturn {
|
|
|
55
55
|
close: (reason?: ToastCloseReason) => void;
|
|
56
56
|
toggle: () => void;
|
|
57
57
|
}
|
|
58
|
-
export interface
|
|
58
|
+
export interface ToastStoreOptions {
|
|
59
59
|
max?: number;
|
|
60
60
|
duration?: number;
|
|
61
61
|
variant?: ToastVariant;
|
|
@@ -68,6 +68,10 @@ export interface ToastProviderProps {
|
|
|
68
68
|
closable?: boolean;
|
|
69
69
|
closeLabel?: string;
|
|
70
70
|
}
|
|
71
|
+
export interface ToastProviderProps extends ToastStoreOptions {
|
|
72
|
+
/** Uses an existing store and its options instead of creating a provider-scoped store. */
|
|
73
|
+
store?: ToastStore;
|
|
74
|
+
}
|
|
71
75
|
export interface ToastViewportProps extends TeleportProps, StylesApiProps<ToastViewportPart> {
|
|
72
76
|
position?: ToastPosition;
|
|
73
77
|
label?: string;
|
|
@@ -93,7 +97,7 @@ export interface ToastViewportSlotProps {
|
|
|
93
97
|
dismiss: () => void;
|
|
94
98
|
}
|
|
95
99
|
export type ToastCreate = (input: ToastInput, options?: ToastOptions) => ToastId;
|
|
96
|
-
export interface
|
|
100
|
+
export interface ToastStore {
|
|
97
101
|
toasts: ComputedRef<readonly ToastItem[]>;
|
|
98
102
|
show: ToastCreate;
|
|
99
103
|
success: ToastCreate;
|
|
@@ -104,7 +108,9 @@ export interface UseToastReturn {
|
|
|
104
108
|
dismiss: (id: ToastId, reason?: ToastCloseReason) => void;
|
|
105
109
|
dismissAll: (reason?: ToastCloseReason) => void;
|
|
106
110
|
}
|
|
107
|
-
export interface
|
|
111
|
+
export interface UseToastReturn extends ToastStore {
|
|
112
|
+
}
|
|
113
|
+
export interface ToastProviderContext extends ToastStore {
|
|
108
114
|
dismissInstance: (instanceId: string, reason?: ToastCloseReason) => void;
|
|
109
115
|
}
|
|
110
116
|
export declare const toastProviderKey: InjectionKey<ToastProviderContext>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ToastProviderContext,
|
|
2
|
-
export declare function provideToast(
|
|
1
|
+
import { ToastProviderContext, ToastStore, UseToastReturn } from './types.js';
|
|
2
|
+
export declare function provideToast(store: ToastStore): ToastProviderContext;
|
|
3
3
|
export declare function useToastContext(consumer: string): ToastProviderContext;
|
|
4
4
|
export declare function useToast(): UseToastReturn;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from 'vue';
|
|
2
|
-
import { TooltipOffset,
|
|
2
|
+
import { TooltipOffset, TooltipProps, TooltipTriggerProps } from './types.js';
|
|
3
3
|
type TooltipBehaviorProps = Omit<TooltipProps, 'classNames' | 'styles'>;
|
|
4
4
|
export declare function resolveTooltipOffsetStyle(offset: TooltipOffset | undefined): CSSProperties | undefined;
|
|
5
5
|
export declare function resolveTooltipColorStyleWithContrast(color: TooltipProps['color'], autoContrast: TooltipProps['autoContrast']): CSSProperties | undefined;
|
|
@@ -18,9 +18,9 @@ export declare function useTooltip(props: Readonly<TooltipBehaviorProps>, emitOp
|
|
|
18
18
|
contentRole: import('vue').ComputedRef<"tooltip" | undefined>;
|
|
19
19
|
contentAriaHidden: import('vue').ComputedRef<"true" | undefined>;
|
|
20
20
|
contentStyle: import('vue').ComputedRef<CSSProperties>;
|
|
21
|
-
actualPlacement: import('vue').Ref<
|
|
21
|
+
actualPlacement: Readonly<import('vue').Ref<import('../floating/index.js').FloatingPlacement, import('../floating/index.js').FloatingPlacement>>;
|
|
22
22
|
placementSide: import('vue').ComputedRef<string>;
|
|
23
|
-
arrowStyle: import('vue').Ref<CSSProperties | undefined, CSSProperties | undefined
|
|
23
|
+
arrowStyle: Readonly<import('vue').Ref<CSSProperties | undefined, CSSProperties | undefined>>;
|
|
24
24
|
teleportTo: import('vue').ComputedRef<import('../floating/index.js').TeleportTargetValue>;
|
|
25
25
|
openTooltip: () => void;
|
|
26
26
|
closeTooltip: () => void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { ComputedRef, MaybeRefOrGetter, Ref, ShallowRef } from 'vue';
|
|
2
|
+
export interface OverlayLayerContext {
|
|
3
|
+
id: symbol;
|
|
4
|
+
element: Ref<HTMLElement | null>;
|
|
5
|
+
active: ComputedRef<boolean>;
|
|
6
|
+
modal: ComputedRef<boolean>;
|
|
7
|
+
modalEffects: boolean;
|
|
8
|
+
preventScroll: ComputedRef<boolean>;
|
|
9
|
+
branches: Readonly<ShallowRef<readonly HTMLElement[]>>;
|
|
10
|
+
focusBranches: Readonly<ShallowRef<readonly HTMLElement[]>>;
|
|
11
|
+
zIndex: Readonly<Ref<number>>;
|
|
12
|
+
isTopLayer: () => boolean;
|
|
13
|
+
isInside: (event: Event, additional?: readonly (Element | null | undefined)[]) => boolean;
|
|
14
|
+
registerBranch: (element: HTMLElement, options?: {
|
|
15
|
+
focus?: boolean;
|
|
16
|
+
inside?: boolean;
|
|
17
|
+
}) => () => void;
|
|
18
|
+
}
|
|
19
|
+
export interface UseOverlayLayerOptions {
|
|
20
|
+
active: MaybeRefOrGetter<boolean>;
|
|
21
|
+
element: Ref<HTMLElement | null>;
|
|
22
|
+
modal?: MaybeRefOrGetter<boolean>;
|
|
23
|
+
modalEffects?: boolean;
|
|
24
|
+
preventScroll?: MaybeRefOrGetter<boolean>;
|
|
25
|
+
baseZIndex?: number;
|
|
26
|
+
}
|
|
27
|
+
export declare function useOverlayLayer(options: UseOverlayLayerOptions): OverlayLayerContext;
|
|
28
|
+
export declare function useOverlayLayerBranch(element: Ref<HTMLElement | null>, options?: {
|
|
29
|
+
focus?: boolean;
|
|
30
|
+
inside?: boolean;
|
|
31
|
+
}): OverlayLayerContext | null;
|
|
32
|
+
export declare function useParentOverlayLayer(): OverlayLayerContext | null;
|