ropav 0.0.6 → 0.0.8
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/dist/_plugin-vue_export-helper.js +1 -11
- package/dist/accordion.css +112 -0
- package/dist/accordion.js +358 -0
- package/dist/badge.css +169 -0
- package/dist/badge.js +101 -0
- package/dist/bem.js +9 -0
- package/dist/button-group.css +8 -8
- package/dist/button-group.js +2 -3
- package/dist/button.js +3 -4
- package/dist/card.css +40 -20
- package/dist/card.js +71 -39
- package/dist/checkbox.js +2 -3
- package/dist/collapse.css +32 -0
- package/dist/collapse.js +62 -0
- package/dist/componentColors.js +0 -2
- package/dist/components/accordion/accordion-item.d.ts +40 -0
- package/dist/components/accordion/accordion.d.ts +23 -0
- package/dist/components/accordion/index.d.ts +4 -0
- package/dist/components/accordion/index.js +2 -0
- package/dist/components/accordion/types.d.ts +100 -0
- package/dist/components/accordion/useAccordion.d.ts +3 -0
- package/dist/components/badge/badge.d.ts +25 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.js +2 -0
- package/dist/components/badge/types.d.ts +16 -0
- package/dist/components/badge/useBadgeColor.d.ts +8 -0
- package/dist/components/card/card.d.ts +4 -0
- package/dist/components/card/types.d.ts +4 -0
- package/dist/components/collapse/collapse.d.ts +36 -0
- package/dist/components/collapse/index.d.ts +3 -0
- package/dist/components/collapse/index.js +3 -0
- package/dist/components/collapse/types.d.ts +74 -0
- package/dist/components/collapse/useCollapse.d.ts +2 -0
- package/dist/components/dropdown-menu/dropdown-menu-items.d.ts +16 -0
- package/dist/components/dropdown-menu/dropdown-menu-utils.d.ts +23 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +26 -0
- package/dist/components/dropdown-menu/index.d.ts +3 -0
- package/dist/components/dropdown-menu/index.js +2 -0
- package/dist/components/dropdown-menu/types.d.ts +104 -0
- package/dist/components/dropdown-menu/useDropdownMenu.d.ts +32 -0
- package/dist/components/dropdown-menu/useDropdownMenuDisclosure.d.ts +30 -0
- package/dist/components/dropdown-menu/useDropdownMenuDom.d.ts +28 -0
- package/dist/components/dropdown-menu/useDropdownMenuHoverIntent.d.ts +24 -0
- package/dist/components/dropdown-menu/useDropdownMenuInteractions.d.ts +51 -0
- package/dist/components/dropdown-menu/useDropdownMenuNavigation.d.ts +16 -0
- package/dist/components/dropdown-menu/useDropdownMenuRenderItems.d.ts +25 -0
- package/dist/components/dropdown-menu/useDropdownSubmenus.d.ts +18 -0
- package/dist/components/field/field.d.ts +2 -2
- package/dist/components/field/useField.d.ts +17 -0
- package/dist/components/input/useInput.d.ts +8 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/index.js +2 -0
- package/dist/components/modal/modal.d.ts +42 -0
- package/dist/components/modal/types.d.ts +31 -0
- package/dist/components/modal/useModal.d.ts +29 -0
- package/dist/components/overlay/index.d.ts +2 -0
- package/dist/components/overlay/index.js +2 -0
- package/dist/components/overlay/overlay.d.ts +19 -0
- package/dist/components/overlay/types.d.ts +12 -0
- package/dist/components/overlay/useOverlay.d.ts +7 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.js +2 -0
- package/dist/components/popover/popover.d.ts +43 -0
- package/dist/components/popover/types.d.ts +43 -0
- package/dist/components/popover/usePopover.d.ts +23 -0
- package/dist/components/tabs/index.d.ts +6 -0
- package/dist/components/tabs/index.js +2 -0
- package/dist/components/tabs/tabs-content.d.ts +24 -0
- package/dist/components/tabs/tabs-list.d.ts +26 -0
- package/dist/components/tabs/tabs-trigger.d.ts +29 -0
- package/dist/components/tabs/tabs.d.ts +31 -0
- package/dist/components/tabs/types.d.ts +160 -0
- package/dist/components/tabs/useTabs.d.ts +5 -0
- package/dist/dropdown-menu.css +159 -0
- package/dist/dropdown-menu.js +901 -0
- package/dist/field.css +11 -8
- package/dist/field.js +93 -52
- package/dist/icon-button.css +1 -1
- package/dist/icon-button.js +3 -4
- package/dist/index.d.ts +8 -0
- package/dist/index.js +12 -1
- package/dist/input.css +25 -25
- package/dist/input.js +57 -40
- package/dist/modal.css +134 -0
- package/dist/modal.js +427 -0
- package/dist/overlay.css +28 -0
- package/dist/overlay.js +82 -0
- package/dist/popover.css +75 -0
- package/dist/popover.js +377 -0
- package/dist/progress.js +2 -3
- package/dist/radio.js +4 -11
- package/dist/select.js +8 -39
- package/dist/slider.js +2 -3
- package/dist/switch.js +2 -3
- package/dist/tabs.css +279 -0
- package/dist/tabs.js +513 -0
- package/dist/textarea.js +2 -3
- package/dist/tooltip.js +2 -3
- package/dist/useButtonColor.js +0 -2
- package/dist/useClickOutside.js +24 -0
- package/dist/useCollapse.js +92 -0
- package/dist/useControlState.js +0 -2
- package/dist/useRequiredInject.js +9 -0
- package/dist/x.js +12 -0
- package/package.json +40 -4
- package/dist/_plugin-vue_export-helper.js.map +0 -1
- package/dist/button-group.js.map +0 -1
- package/dist/button.js.map +0 -1
- package/dist/card.js.map +0 -1
- package/dist/checkbox.js.map +0 -1
- package/dist/componentColors.js.map +0 -1
- package/dist/field.js.map +0 -1
- package/dist/icon-button.js.map +0 -1
- package/dist/input.js.map +0 -1
- package/dist/progress.js.map +0 -1
- package/dist/radio.js.map +0 -1
- package/dist/select.js.map +0 -1
- package/dist/slider.js.map +0 -1
- package/dist/switch.js.map +0 -1
- package/dist/textarea.js.map +0 -1
- package/dist/tooltip.js.map +0 -1
- package/dist/useButtonColor.js.map +0 -1
- package/dist/useControlState.js.map +0 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuOpenOptions, DropdownMenuProps } from './types';
|
|
3
|
+
import { ItemPath, PointerPoint, SubmenuFocusTarget } from './dropdown-menu-utils';
|
|
4
|
+
type BooleanSource = Readonly<Ref<boolean>>;
|
|
5
|
+
type DisclosureControls = {
|
|
6
|
+
open: (options?: DropdownMenuOpenOptions | DropdownMenuFocusTarget) => void;
|
|
7
|
+
close: (options?: DropdownMenuCloseOptions) => void;
|
|
8
|
+
toggle: () => void;
|
|
9
|
+
};
|
|
10
|
+
type SubmenuControls = {
|
|
11
|
+
closeSubmenusAfter: (menuPath: ItemPath) => void;
|
|
12
|
+
openSubmenu: (path: ItemPath, focus?: SubmenuFocusTarget) => boolean;
|
|
13
|
+
closeSubmenu: (path: ItemPath) => boolean;
|
|
14
|
+
closeCurrentSubmenu: () => boolean;
|
|
15
|
+
};
|
|
16
|
+
type HoverIntentControls = {
|
|
17
|
+
clearPendingHover: () => void;
|
|
18
|
+
resetHoverIntent: () => void;
|
|
19
|
+
trackSubmenuOpen: (path: ItemPath, point?: PointerPoint) => void;
|
|
20
|
+
handleItemHover: (item: DropdownMenuItem, path: ItemPath, event: MouseEvent | undefined, commit: (item: DropdownMenuItem, path: ItemPath, point?: PointerPoint) => void) => void;
|
|
21
|
+
handleMenuMousemove: (event: MouseEvent, commit: (item: DropdownMenuItem, path: ItemPath, point?: PointerPoint) => void) => void;
|
|
22
|
+
};
|
|
23
|
+
type UseDropdownMenuInteractionsOptions = {
|
|
24
|
+
props: Readonly<DropdownMenuProps>;
|
|
25
|
+
emit: {
|
|
26
|
+
select?: (item: DropdownMenuItem) => void;
|
|
27
|
+
};
|
|
28
|
+
isDisabled: BooleanSource;
|
|
29
|
+
focusedPath: Ref<ItemPath>;
|
|
30
|
+
openSubmenuPath: Ref<ItemPath>;
|
|
31
|
+
getItemAtPath: (path: ItemPath) => DropdownMenuItem | undefined;
|
|
32
|
+
focusItem: (target: DropdownMenuFocusTarget, menuPath?: ItemPath) => boolean;
|
|
33
|
+
moveFocus: (direction: 1 | -1) => ItemPath | undefined;
|
|
34
|
+
submenus: SubmenuControls;
|
|
35
|
+
hoverIntent: HoverIntentControls;
|
|
36
|
+
disclosure: DisclosureControls;
|
|
37
|
+
isSubmenuOpeningLeft: (path: ItemPath) => boolean;
|
|
38
|
+
};
|
|
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;
|
|
42
|
+
openSubmenu: (path: ItemPath, focus?: SubmenuFocusTarget, point?: PointerPoint) => boolean;
|
|
43
|
+
closeSubmenu: (path: ItemPath) => boolean;
|
|
44
|
+
focusHoveredItem: (item: DropdownMenuItem, indexOrPath: number | ItemPath, event?: MouseEvent) => void;
|
|
45
|
+
onTriggerClick: () => void;
|
|
46
|
+
onTriggerKeydown: (event: KeyboardEvent) => void;
|
|
47
|
+
onMenuKeydown: (event: KeyboardEvent) => void;
|
|
48
|
+
onMenuMousemove: (event: MouseEvent) => void;
|
|
49
|
+
onMenuMouseleave: () => void;
|
|
50
|
+
};
|
|
51
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DropdownMenuFocusTarget, DropdownMenuItem } from './types';
|
|
2
|
+
import { ItemPath } from './dropdown-menu-utils';
|
|
3
|
+
type DropdownMenuItemsSource = {
|
|
4
|
+
readonly value: DropdownMenuItem[];
|
|
5
|
+
};
|
|
6
|
+
export declare function useDropdownMenuNavigation(items: DropdownMenuItemsSource): {
|
|
7
|
+
focusedPath: import('vue').Ref<number[], import('./types').DropdownMenuItemPath | number[]>;
|
|
8
|
+
focusedIndex: import('vue').ComputedRef<number>;
|
|
9
|
+
getItemsAtPath: (path: ItemPath) => DropdownMenuItem[];
|
|
10
|
+
getItemAtPath: (path: ItemPath) => DropdownMenuItem | undefined;
|
|
11
|
+
focusItem: (target: DropdownMenuFocusTarget, menuPath?: ItemPath) => boolean;
|
|
12
|
+
resetFocus: () => void;
|
|
13
|
+
isItemFocused: (indexOrPath: number | ItemPath) => boolean;
|
|
14
|
+
moveFocus: (direction: 1 | -1) => number[] | undefined;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { DropdownMenuCloseOptions, DropdownMenuFocusTarget, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuItemSlotProps, DropdownMenuRenderedItem } from './types';
|
|
2
|
+
import { ItemPath } from './dropdown-menu-utils';
|
|
3
|
+
type DropdownMenuItemsSource = {
|
|
4
|
+
readonly value: DropdownMenuItem[];
|
|
5
|
+
};
|
|
6
|
+
type UseDropdownMenuRenderItemsOptions = {
|
|
7
|
+
items: DropdownMenuItemsSource;
|
|
8
|
+
getItemId: (path: ItemPath) => string;
|
|
9
|
+
getSubmenuId: (path: ItemPath) => string;
|
|
10
|
+
getMenuActiveDescendant: (path: ItemPath) => string | undefined;
|
|
11
|
+
isItemFocused: (indexOrPath: number | ItemPath) => boolean;
|
|
12
|
+
isSubmenuOpen: (path: ItemPath) => boolean;
|
|
13
|
+
activateItem: (item: DropdownMenuItem, path: ItemPath, event?: MouseEvent) => void;
|
|
14
|
+
focusHoveredItem: (item: DropdownMenuItem, indexOrPath: number | ItemPath, event?: MouseEvent) => void;
|
|
15
|
+
selectItem: (item: DropdownMenuItem) => void;
|
|
16
|
+
openSubmenu: (path: ItemPath, focus?: DropdownMenuFocusTarget) => void;
|
|
17
|
+
closeSubmenu: (path: ItemPath) => void;
|
|
18
|
+
close: (options?: DropdownMenuCloseOptions) => void;
|
|
19
|
+
};
|
|
20
|
+
export declare function useDropdownMenuRenderItems({ items, getItemId, getSubmenuId, getMenuActiveDescendant, isItemFocused, isSubmenuOpen, activateItem, focusHoveredItem, selectItem, openSubmenu, closeSubmenu, close, }: UseDropdownMenuRenderItemsOptions): {
|
|
21
|
+
renderedItems: import('vue').ComputedRef<DropdownMenuRenderedItem[]>;
|
|
22
|
+
getItemProps: (item: DropdownMenuItem, indexOrPath: number | ItemPath, focused?: boolean, disabled?: boolean) => DropdownMenuItemProps;
|
|
23
|
+
getItemSlotProps: (item: DropdownMenuItem, indexOrPath: number | ItemPath, focused?: boolean, disabled?: boolean) => DropdownMenuItemSlotProps;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { DropdownMenuItem } from './types';
|
|
3
|
+
import { ItemPath, SubmenuFocusTarget } from './dropdown-menu-utils';
|
|
4
|
+
type UseDropdownSubmenusOptions = {
|
|
5
|
+
focusedPath: Ref<ItemPath>;
|
|
6
|
+
getItemAtPath: (path: ItemPath) => DropdownMenuItem | undefined;
|
|
7
|
+
focusItem: (target: Exclude<SubmenuFocusTarget, false>, menuPath?: ItemPath) => boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function useDropdownSubmenus({ focusedPath, getItemAtPath, focusItem, }: UseDropdownSubmenusOptions): {
|
|
10
|
+
openSubmenuPath: Ref<number[], import('./types').DropdownMenuItemPath | number[]>;
|
|
11
|
+
resetSubmenus: () => void;
|
|
12
|
+
isSubmenuOpen: (path: ItemPath) => boolean;
|
|
13
|
+
closeSubmenusAfter: (menuPath: ItemPath) => void;
|
|
14
|
+
openSubmenu: (path: ItemPath, focus?: SubmenuFocusTarget) => boolean;
|
|
15
|
+
closeSubmenu: (path: ItemPath) => boolean;
|
|
16
|
+
closeCurrentSubmenu: () => boolean;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FieldProps } from './types';
|
|
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<FieldProps> & (typeof globalThis extends {
|
|
4
4
|
__VLS_PROPS_FALLBACK: infer P;
|
|
@@ -15,7 +15,7 @@ declare const __VLS_export: (__VLS_props: NonNullable<Awaited<typeof __VLS_setup
|
|
|
15
15
|
invalid: true | undefined;
|
|
16
16
|
labelledby: string | undefined;
|
|
17
17
|
describedby: string | undefined;
|
|
18
|
-
controlProps: FieldControlProps;
|
|
18
|
+
controlProps: import('./types').FieldControlProps;
|
|
19
19
|
}) => any;
|
|
20
20
|
} & {
|
|
21
21
|
description?: (props: {}) => any;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { FieldControlProps, FieldProps } from './types';
|
|
2
|
+
export declare function useField(props: Readonly<FieldProps>): {
|
|
3
|
+
controlId: import('vue').ComputedRef<string>;
|
|
4
|
+
labelId: import('vue').ComputedRef<string>;
|
|
5
|
+
descriptionId: import('vue').ComputedRef<string>;
|
|
6
|
+
messageId: import('vue').ComputedRef<string>;
|
|
7
|
+
isInvalid: import('vue').ComputedRef<boolean>;
|
|
8
|
+
messageText: import('vue').ComputedRef<string | undefined>;
|
|
9
|
+
hasLabel: import('vue').ComputedRef<boolean>;
|
|
10
|
+
hasDescription: import('vue').ComputedRef<boolean>;
|
|
11
|
+
hasMessage: import('vue').ComputedRef<boolean>;
|
|
12
|
+
controlLabelledby: import('vue').ComputedRef<string | undefined>;
|
|
13
|
+
controlDescribedby: import('vue').ComputedRef<string | undefined>;
|
|
14
|
+
rootClass: import('vue').ComputedRef<string[]>;
|
|
15
|
+
controlProps: import('vue').ComputedRef<FieldControlProps>;
|
|
16
|
+
focusControl: (e: MouseEvent) => void;
|
|
17
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InputProps } from './types';
|
|
2
|
+
export declare function useInput(props: Readonly<InputProps>, emitUpdate: (value: string) => void): {
|
|
3
|
+
inputRef: import('vue').Ref<HTMLInputElement | null, HTMLInputElement | null>;
|
|
4
|
+
control: import('../../composables/useControlState').ControlState;
|
|
5
|
+
rootClass: import('vue').ComputedRef<string[]>;
|
|
6
|
+
onInput: (e: Event) => void;
|
|
7
|
+
focusInput: (e: MouseEvent) => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ModalProps } from './types';
|
|
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<ModalProps & {
|
|
4
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
5
|
+
}> & (typeof globalThis extends {
|
|
6
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
7
|
+
} ? P : {});
|
|
8
|
+
expose: (exposed: {}) => void;
|
|
9
|
+
attrs: any;
|
|
10
|
+
slots: {
|
|
11
|
+
header?: (props: {
|
|
12
|
+
isOpen: boolean;
|
|
13
|
+
open: () => void;
|
|
14
|
+
close: () => void;
|
|
15
|
+
toggle: () => void;
|
|
16
|
+
}) => any;
|
|
17
|
+
} & {
|
|
18
|
+
default?: (props: {
|
|
19
|
+
isOpen: boolean;
|
|
20
|
+
open: () => void;
|
|
21
|
+
close: () => void;
|
|
22
|
+
toggle: () => void;
|
|
23
|
+
}) => any;
|
|
24
|
+
} & {
|
|
25
|
+
footer?: (props: {
|
|
26
|
+
isOpen: boolean;
|
|
27
|
+
open: () => void;
|
|
28
|
+
close: () => void;
|
|
29
|
+
toggle: () => void;
|
|
30
|
+
}) => any;
|
|
31
|
+
};
|
|
32
|
+
emit: (evt: "update:open", value: boolean) => void;
|
|
33
|
+
}>) => import('vue').VNode & {
|
|
34
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
35
|
+
};
|
|
36
|
+
declare const _default: typeof __VLS_export;
|
|
37
|
+
export default _default;
|
|
38
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
39
|
+
[K in keyof T]: T[K];
|
|
40
|
+
} : {
|
|
41
|
+
[K in keyof T as K]: T[K];
|
|
42
|
+
}) & {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { OverlayProps } from '../overlay/types';
|
|
3
|
+
export type ModalPresetSize = 'sm' | 'md' | 'lg' | 'xl' | 'full';
|
|
4
|
+
export type ModalSize = ModalPresetSize | (string & {});
|
|
5
|
+
export type ModalRole = 'dialog' | 'alertdialog';
|
|
6
|
+
export type ModalInitialFocus = string | HTMLElement | Ref<HTMLElement | null | undefined>;
|
|
7
|
+
export type ModalOverlayProps = Pick<OverlayProps, 'color' | 'opacity' | 'gradient' | 'blur'>;
|
|
8
|
+
export interface ModalSlotProps {
|
|
9
|
+
isOpen: boolean;
|
|
10
|
+
open: () => void;
|
|
11
|
+
close: () => void;
|
|
12
|
+
toggle: () => void;
|
|
13
|
+
}
|
|
14
|
+
export interface ModalProps {
|
|
15
|
+
id?: string;
|
|
16
|
+
open?: boolean;
|
|
17
|
+
title?: string;
|
|
18
|
+
description?: string;
|
|
19
|
+
ariaLabel?: string;
|
|
20
|
+
closeLabel?: string;
|
|
21
|
+
role?: ModalRole;
|
|
22
|
+
size?: ModalSize;
|
|
23
|
+
initialFocus?: ModalInitialFocus | null;
|
|
24
|
+
closeOnOverlayClick?: boolean;
|
|
25
|
+
closeOnEscape?: boolean;
|
|
26
|
+
showCloseButton?: boolean;
|
|
27
|
+
overlayProps?: ModalOverlayProps;
|
|
28
|
+
preventScroll?: boolean;
|
|
29
|
+
returnFocus?: boolean;
|
|
30
|
+
keepMounted?: boolean;
|
|
31
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { ModalProps, ModalRole, ModalSlotProps } from './types';
|
|
3
|
+
export declare function useModal(props: Readonly<ModalProps>, emitOpenChange?: (open: boolean) => void): {
|
|
4
|
+
panelRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
5
|
+
modalId: import('vue').ComputedRef<string>;
|
|
6
|
+
titleId: import('vue').ComputedRef<string>;
|
|
7
|
+
descriptionId: import('vue').ComputedRef<string>;
|
|
8
|
+
role: import('vue').ComputedRef<ModalRole>;
|
|
9
|
+
isOpen: import('vue').ComputedRef<boolean>;
|
|
10
|
+
shouldRender: import('vue').ComputedRef<boolean>;
|
|
11
|
+
hasHeader: import('vue').ComputedRef<boolean>;
|
|
12
|
+
hasFooter: import('vue').ComputedRef<boolean>;
|
|
13
|
+
showCloseButton: import('vue').ComputedRef<boolean | undefined>;
|
|
14
|
+
headerId: import('vue').ComputedRef<string | undefined>;
|
|
15
|
+
ariaLabelledby: import('vue').ComputedRef<string | undefined>;
|
|
16
|
+
ariaDescribedby: import('vue').ComputedRef<string | undefined>;
|
|
17
|
+
ariaLabel: import('vue').ComputedRef<string | undefined>;
|
|
18
|
+
rootClass: import('vue').ComputedRef<string[]>;
|
|
19
|
+
rootStyle: import('vue').ComputedRef<CSSProperties | undefined>;
|
|
20
|
+
stateClass: import('vue').ComputedRef<{
|
|
21
|
+
'rp-modal--closable': boolean | undefined;
|
|
22
|
+
'rp-modal--headerless': boolean;
|
|
23
|
+
}>;
|
|
24
|
+
slotProps: import('vue').ComputedRef<ModalSlotProps>;
|
|
25
|
+
openModal: () => void;
|
|
26
|
+
closeModal: () => void;
|
|
27
|
+
toggleModal: () => void;
|
|
28
|
+
onOverlayClick: (event: MouseEvent) => void;
|
|
29
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { OverlayProps } from './types';
|
|
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<OverlayProps> & (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,12 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
export type OverlayZIndex = CSSProperties['zIndex'];
|
|
3
|
+
export type OverlayBlur = number | string;
|
|
4
|
+
export interface OverlayProps {
|
|
5
|
+
color?: string;
|
|
6
|
+
opacity?: number;
|
|
7
|
+
gradient?: string;
|
|
8
|
+
blur?: OverlayBlur;
|
|
9
|
+
zIndex?: OverlayZIndex;
|
|
10
|
+
interactive?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { OverlayProps } from './types';
|
|
3
|
+
export declare function useOverlay(props: Readonly<OverlayProps>): {
|
|
4
|
+
isRendered: import('vue').ComputedRef<boolean>;
|
|
5
|
+
rootClass: import('vue').ComputedRef<string[]>;
|
|
6
|
+
rootStyle: import('vue').ComputedRef<CSSProperties>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { PopoverProps } from './types';
|
|
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<PopoverProps & {
|
|
4
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
5
|
+
}> & (typeof globalThis extends {
|
|
6
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
7
|
+
} ? P : {});
|
|
8
|
+
expose: (exposed: {}) => void;
|
|
9
|
+
attrs: any;
|
|
10
|
+
slots: {
|
|
11
|
+
default?: (props: {
|
|
12
|
+
triggerProps: import('./types').PopoverTriggerProps;
|
|
13
|
+
isOpen: boolean;
|
|
14
|
+
open: () => void;
|
|
15
|
+
close: () => void;
|
|
16
|
+
toggle: () => void;
|
|
17
|
+
}) => any;
|
|
18
|
+
} & {
|
|
19
|
+
content?: (props: {
|
|
20
|
+
isOpen: boolean;
|
|
21
|
+
open: () => void;
|
|
22
|
+
close: () => void;
|
|
23
|
+
toggle: () => void;
|
|
24
|
+
}) => any;
|
|
25
|
+
} & {
|
|
26
|
+
default?: (props: {
|
|
27
|
+
isOpen: boolean;
|
|
28
|
+
open: () => void;
|
|
29
|
+
close: () => void;
|
|
30
|
+
toggle: () => void;
|
|
31
|
+
}) => any;
|
|
32
|
+
};
|
|
33
|
+
emit: (evt: "update:open", value: boolean) => void;
|
|
34
|
+
}>) => import('vue').VNode & {
|
|
35
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
36
|
+
};
|
|
37
|
+
declare const _default: typeof __VLS_export;
|
|
38
|
+
export default _default;
|
|
39
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
40
|
+
[K in keyof T]: T[K];
|
|
41
|
+
} : {
|
|
42
|
+
[K in keyof T as K]: T[K];
|
|
43
|
+
}) & {};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
export type PopoverPlacement = 'top' | 'right' | 'bottom' | 'left';
|
|
3
|
+
export type PopoverTarget = string | HTMLElement | Ref<HTMLElement | null | undefined>;
|
|
4
|
+
export interface PopoverOffsetOptions {
|
|
5
|
+
mainAxis?: number;
|
|
6
|
+
crossAxis?: number;
|
|
7
|
+
}
|
|
8
|
+
export type PopoverOffset = number | PopoverOffsetOptions;
|
|
9
|
+
export type PopoverRole = 'dialog';
|
|
10
|
+
export interface PopoverTriggerProps {
|
|
11
|
+
'aria-controls'?: string;
|
|
12
|
+
'aria-expanded'?: boolean;
|
|
13
|
+
'aria-haspopup'?: PopoverRole;
|
|
14
|
+
onClick: (event: MouseEvent) => void;
|
|
15
|
+
onKeydown: (event: KeyboardEvent) => void;
|
|
16
|
+
}
|
|
17
|
+
export interface PopoverSlotProps {
|
|
18
|
+
triggerProps: PopoverTriggerProps;
|
|
19
|
+
isOpen: boolean;
|
|
20
|
+
open: () => void;
|
|
21
|
+
close: () => void;
|
|
22
|
+
toggle: () => void;
|
|
23
|
+
}
|
|
24
|
+
export interface PopoverContentSlotProps {
|
|
25
|
+
isOpen: boolean;
|
|
26
|
+
open: () => void;
|
|
27
|
+
close: () => void;
|
|
28
|
+
toggle: () => void;
|
|
29
|
+
}
|
|
30
|
+
export interface PopoverProps {
|
|
31
|
+
id?: string;
|
|
32
|
+
target?: PopoverTarget | null;
|
|
33
|
+
placement?: PopoverPlacement;
|
|
34
|
+
offset?: PopoverOffset;
|
|
35
|
+
open?: boolean;
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
role?: PopoverRole;
|
|
38
|
+
ariaLabel?: string;
|
|
39
|
+
ariaLabelledby?: string;
|
|
40
|
+
ariaDescribedby?: string;
|
|
41
|
+
closeOnOutsideClick?: boolean;
|
|
42
|
+
closeOnEscape?: boolean;
|
|
43
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CSSProperties } from 'vue';
|
|
2
|
+
import { PopoverContentSlotProps, PopoverProps, PopoverSlotProps, PopoverTriggerProps } from './types';
|
|
3
|
+
export declare function usePopover(props: Readonly<PopoverProps>, emitOpenChange?: (open: boolean) => void): {
|
|
4
|
+
rootRef: import('vue').Ref<HTMLElement | null, HTMLElement | null>;
|
|
5
|
+
popoverId: import('vue').ComputedRef<string>;
|
|
6
|
+
isOpen: import('vue').ComputedRef<boolean>;
|
|
7
|
+
isVisible: import('vue').ComputedRef<boolean>;
|
|
8
|
+
isTargetMode: import('vue').ComputedRef<boolean>;
|
|
9
|
+
popoverRole: import('vue').ComputedRef<"dialog">;
|
|
10
|
+
ariaLabel: import('vue').ComputedRef<string | undefined>;
|
|
11
|
+
ariaLabelledby: import('vue').ComputedRef<string | undefined>;
|
|
12
|
+
ariaDescribedby: import('vue').ComputedRef<string | undefined>;
|
|
13
|
+
shouldRenderContent: import('vue').ComputedRef<boolean>;
|
|
14
|
+
rootClass: import('vue').ComputedRef<string[]>;
|
|
15
|
+
contentStyle: import('vue').ComputedRef<CSSProperties | undefined>;
|
|
16
|
+
triggerProps: import('vue').ComputedRef<PopoverTriggerProps>;
|
|
17
|
+
slotProps: import('vue').ComputedRef<PopoverSlotProps>;
|
|
18
|
+
contentSlotProps: import('vue').ComputedRef<PopoverContentSlotProps>;
|
|
19
|
+
openPopover: () => void;
|
|
20
|
+
closePopover: () => void;
|
|
21
|
+
togglePopover: () => void;
|
|
22
|
+
onTriggerKeydown: (event: KeyboardEvent) => void;
|
|
23
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Tabs } from './tabs';
|
|
2
|
+
export { default as TabsContent } from './tabs-content';
|
|
3
|
+
export { default as TabsList } from './tabs-list';
|
|
4
|
+
export { default as TabsTrigger } from './tabs-trigger';
|
|
5
|
+
export { useTabs, useTabsContent, useTabsList, useTabsTrigger } from './useTabs';
|
|
6
|
+
export type { TabsActivationMode, TabsContentProps, TabsContentRootProps, TabsContentSlotProps, TabsListProps, TabsListRootProps, TabsListSlotProps, TabsOrientation, TabsPlacement, TabsProps, TabsRootProps, TabsSlotProps, TabsState, TabsSize, TabsTriggerAlign, TabsTriggerProps, TabsTriggerRootProps, TabsTriggerSlotProps, TabsValue, TabsVariant, UseTabsContentReturn, UseTabsListReturn, UseTabsReturn, UseTabsTriggerReturn, } from './types';
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as useTabs, c as useTabsTrigger, i as tabs_default, n as tabs_list_default, o as useTabsContent, r as tabs_content_default, s as useTabsList, t as tabs_trigger_default } from "../../tabs.js";
|
|
2
|
+
export { tabs_default as Tabs, tabs_content_default as TabsContent, tabs_list_default as TabsList, tabs_trigger_default as TabsTrigger, useTabs, useTabsContent, useTabsList, useTabsTrigger };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TabsContentProps } from './types';
|
|
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<TabsContentProps> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: {}) => void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: {
|
|
9
|
+
default?: (props: {
|
|
10
|
+
value: import('./types').TabsValue;
|
|
11
|
+
selected: boolean;
|
|
12
|
+
}) => any;
|
|
13
|
+
};
|
|
14
|
+
emit: {};
|
|
15
|
+
}>) => import('vue').VNode & {
|
|
16
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
17
|
+
};
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
21
|
+
[K in keyof T]: T[K];
|
|
22
|
+
} : {
|
|
23
|
+
[K in keyof T as K]: T[K];
|
|
24
|
+
}) & {};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { TabsListProps } from './types';
|
|
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<TabsListProps> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: {}) => void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: {
|
|
9
|
+
default?: (props: {
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
variant: import('./types').TabsVariant;
|
|
12
|
+
orientation: import('./types').TabsOrientation;
|
|
13
|
+
placement: import('./types').TabsPlacement;
|
|
14
|
+
}) => any;
|
|
15
|
+
};
|
|
16
|
+
emit: {};
|
|
17
|
+
}>) => import('vue').VNode & {
|
|
18
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
19
|
+
};
|
|
20
|
+
declare const _default: typeof __VLS_export;
|
|
21
|
+
export default _default;
|
|
22
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
23
|
+
[K in keyof T]: T[K];
|
|
24
|
+
} : {
|
|
25
|
+
[K in keyof T as K]: T[K];
|
|
26
|
+
}) & {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { TabsTriggerProps } from './types';
|
|
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<TabsTriggerProps> & (typeof globalThis extends {
|
|
4
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
5
|
+
} ? P : {});
|
|
6
|
+
expose: (exposed: {}) => void;
|
|
7
|
+
attrs: any;
|
|
8
|
+
slots: {
|
|
9
|
+
default?: (props: {
|
|
10
|
+
value: import('./types').TabsValue;
|
|
11
|
+
selected: boolean;
|
|
12
|
+
size: import('./types').TabsSize;
|
|
13
|
+
variant: import('./types').TabsVariant;
|
|
14
|
+
disabled: boolean;
|
|
15
|
+
align: import('./types').TabsTriggerAlign;
|
|
16
|
+
select: () => void;
|
|
17
|
+
}) => any;
|
|
18
|
+
};
|
|
19
|
+
emit: {};
|
|
20
|
+
}>) => import('vue').VNode & {
|
|
21
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
22
|
+
};
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
export default _default;
|
|
25
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
26
|
+
[K in keyof T]: T[K];
|
|
27
|
+
} : {
|
|
28
|
+
[K in keyof T as K]: T[K];
|
|
29
|
+
}) & {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TabsProps, TabsValue } from './types';
|
|
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<TabsProps & {
|
|
4
|
+
"onUpdate:modelValue"?: ((value: TabsValue) => any) | undefined;
|
|
5
|
+
}> & (typeof globalThis extends {
|
|
6
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
7
|
+
} ? P : {});
|
|
8
|
+
expose: (exposed: {}) => void;
|
|
9
|
+
attrs: any;
|
|
10
|
+
slots: {
|
|
11
|
+
default?: (props: {
|
|
12
|
+
value: TabsValue | null;
|
|
13
|
+
size: import('./types').TabsSize;
|
|
14
|
+
variant: import('./types').TabsVariant;
|
|
15
|
+
disabled: boolean;
|
|
16
|
+
placement: import('./types').TabsPlacement;
|
|
17
|
+
align: import('./types').TabsTriggerAlign;
|
|
18
|
+
select: (value: TabsValue) => void;
|
|
19
|
+
}) => any;
|
|
20
|
+
};
|
|
21
|
+
emit: (evt: "update:modelValue", value: TabsValue) => void;
|
|
22
|
+
}>) => import('vue').VNode & {
|
|
23
|
+
__ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
|
|
24
|
+
};
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
27
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? {
|
|
28
|
+
[K in keyof T]: T[K];
|
|
29
|
+
} : {
|
|
30
|
+
[K in keyof T as K]: T[K];
|
|
31
|
+
}) & {};
|