@vuu-ui/vuu-filters 0.8.8-debug → 0.8.9-debug
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/cjs/index.js +2755 -1653
- package/cjs/index.js.map +4 -4
- package/esm/index.js +2752 -1645
- package/esm/index.js.map +4 -4
- package/index.css +187 -535
- package/index.css.map +3 -3
- package/package.json +10 -10
- package/types/vuu-filters/src/filter-bar/FilterBar.d.ts +17 -0
- package/types/vuu-filters/src/filter-bar/index.d.ts +2 -0
- package/types/vuu-filters/src/filter-bar/useFilterBar.d.ts +23 -0
- package/types/vuu-filters/src/filter-bar/useFilters.d.ts +13 -0
- package/types/vuu-filters/src/filter-builder-menu/FilterBuilderMenu.d.ts +8 -0
- package/types/vuu-filters/src/filter-builder-menu/index.d.ts +1 -0
- package/types/{filter-clause → vuu-filters/src/filter-clause}/CloseButton.d.ts +2 -2
- package/types/{filter-clause → vuu-filters/src/filter-clause}/ExpandoCombobox.d.ts +3 -2
- package/types/{filter-clause → vuu-filters/src/filter-clause}/FilterClauseEditor.d.ts +1 -1
- package/types/{filter-clause → vuu-filters/src/filter-clause}/NumericInput.d.ts +2 -3
- package/types/{filter-clause → vuu-filters/src/filter-clause}/TextInput.d.ts +0 -1
- package/types/{filter-clause → vuu-filters/src/filter-clause}/filterClauseTypes.d.ts +4 -1
- package/types/{filter-clause → vuu-filters/src/filter-clause}/index.d.ts +1 -0
- package/types/vuu-filters/src/filter-clause/operator-utils.d.ts +4 -0
- package/types/vuu-filters/src/filter-clause/useFilterClauseEditor.d.ts +24 -0
- package/types/vuu-filters/src/filter-pill/FilterPill.d.ts +14 -0
- package/types/vuu-filters/src/filter-pill-menu/FilterPillMenu.d.ts +19 -0
- package/types/{filter-pill-menu → vuu-filters/src/filter-pill-menu}/FilterPillMenuOptions.d.ts +2 -0
- package/types/{filter-utils.d.ts → vuu-filters/src/filter-utils.d.ts} +11 -2
- package/types/{index.d.ts → vuu-filters/src/index.d.ts} +3 -0
- package/types/vuu-popups/src/dialog/Dialog.d.ts +8 -0
- package/types/vuu-popups/src/dialog/index.d.ts +1 -0
- package/types/vuu-popups/src/index.d.ts +8 -0
- package/types/vuu-popups/src/menu/ContextMenu.d.ts +16 -0
- package/types/vuu-popups/src/menu/MenuList.d.ts +43 -0
- package/types/vuu-popups/src/menu/context-menu-provider.d.ts +10 -0
- package/types/vuu-popups/src/menu/index.d.ts +4 -0
- package/types/vuu-popups/src/menu/key-code.d.ts +12 -0
- package/types/vuu-popups/src/menu/list-dom-utils.d.ts +4 -0
- package/types/vuu-popups/src/menu/use-cascade.d.ts +25 -0
- package/types/vuu-popups/src/menu/use-items-with-ids-next.d.ts +13 -0
- package/types/vuu-popups/src/menu/use-keyboard-navigation.d.ts +27 -0
- package/types/vuu-popups/src/menu/useContextMenu.d.ts +20 -0
- package/types/vuu-popups/src/menu/utils.d.ts +2 -0
- package/types/vuu-popups/src/popup/Popup.d.ts +10 -0
- package/types/vuu-popups/src/popup/index.d.ts +3 -0
- package/types/vuu-popups/src/popup/popup-service.d.ts +59 -0
- package/types/vuu-popups/src/popup/useAnchoredPosition.d.ts +12 -0
- package/types/vuu-popups/src/popup-menu/PopupMenu.d.ts +16 -0
- package/types/vuu-popups/src/popup-menu/index.d.ts +1 -0
- package/types/vuu-popups/src/portal/Portal.d.ts +30 -0
- package/types/vuu-popups/src/portal/index.d.ts +1 -0
- package/types/vuu-popups/src/portal-deprecated/PortalDeprecated.d.ts +8 -0
- package/types/vuu-popups/src/portal-deprecated/index.d.ts +3 -0
- package/types/vuu-popups/src/portal-deprecated/portal-utils.d.ts +1 -0
- package/types/vuu-popups/src/portal-deprecated/render-portal.d.ts +10 -0
- package/types/vuu-popups/src/prompt/Prompt.d.ts +14 -0
- package/types/vuu-popups/src/prompt/index.d.ts +1 -0
- package/types/vuu-popups/src/tooltip/Tooltip.d.ts +12 -0
- package/types/vuu-popups/src/tooltip/index.d.ts +2 -0
- package/types/vuu-popups/src/tooltip/useAnchoredPosition.d.ts +12 -0
- package/types/vuu-popups/src/tooltip/useTooltip.d.ts +16 -0
- package/types/filter-bar/FilterBar.d.ts +0 -9
- package/types/filter-bar/index.d.ts +0 -1
- package/types/filter-clause/operator-utils.d.ts +0 -2
- package/types/filter-pill/FilterPill.d.ts +0 -8
- package/types/filter-pill-menu/FilterPillMenu.d.ts +0 -12
- /package/types/{column-filter → vuu-filters/src/column-filter}/utils.d.ts +0 -0
- /package/types/{filter-clause → vuu-filters/src/filter-clause}/FilterMenu.d.ts +0 -0
- /package/types/{filter-clause → vuu-filters/src/filter-clause}/FilterMenuOptions.d.ts +0 -0
- /package/types/{filter-input → vuu-filters/src/filter-input}/FilterInput.d.ts +0 -0
- /package/types/{filter-input → vuu-filters/src/filter-input}/FilterLanguage.d.ts +0 -0
- /package/types/{filter-input → vuu-filters/src/filter-input}/filterInfo.d.ts +0 -0
- /package/types/{filter-input → vuu-filters/src/filter-input}/highlighting.d.ts +0 -0
- /package/types/{filter-input → vuu-filters/src/filter-input}/index.d.ts +0 -0
- /package/types/{filter-input → vuu-filters/src/filter-input}/theme.d.ts +0 -0
- /package/types/{filter-input → vuu-filters/src/filter-input}/useCodeMirrorEditor.d.ts +0 -0
- /package/types/{filter-input → vuu-filters/src/filter-input}/useFilterAutoComplete.d.ts +0 -0
- /package/types/{filter-input → vuu-filters/src/filter-input}/useFilterSuggestionProvider.d.ts +0 -0
- /package/types/{filter-pill → vuu-filters/src/filter-pill}/index.d.ts +0 -0
- /package/types/{filter-pill-menu → vuu-filters/src/filter-pill-menu}/index.d.ts +0 -0
- /package/types/{local-config.d.ts → vuu-filters/src/local-config.d.ts} +0 -0
- /package/types/{use-filter-config.d.ts → vuu-filters/src/use-filter-config.d.ts} +0 -0
- /package/types/{use-rest-config.d.ts → vuu-filters/src/use-rest-config.d.ts} +0 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React, { FC, HTMLAttributes, ReactElement, ReactNode } from "react";
|
|
2
|
+
import "./MenuList.css";
|
|
3
|
+
export declare const Separator: () => JSX.Element;
|
|
4
|
+
export interface MenuItemGroupProps {
|
|
5
|
+
children: ReactElement<MenuItemProps>[] | [ReactElement<MenuItemLabelProps>, ...ReactElement<MenuItemProps>[]];
|
|
6
|
+
label?: string;
|
|
7
|
+
}
|
|
8
|
+
export interface MenuItemProps extends HTMLAttributes<HTMLDivElement> {
|
|
9
|
+
action?: string;
|
|
10
|
+
idx?: number;
|
|
11
|
+
options?: unknown;
|
|
12
|
+
}
|
|
13
|
+
export declare const MenuItemGroup: FC<MenuItemGroupProps>;
|
|
14
|
+
export declare const MenuItem: {
|
|
15
|
+
({ children, idx, ...props }: MenuItemProps): JSX.Element;
|
|
16
|
+
Label: {
|
|
17
|
+
({ children }: {
|
|
18
|
+
children: ReactNode;
|
|
19
|
+
}): JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export interface MenuItemLabelProps {
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export declare const isMenuItemLabel: (item: ReactNode) => item is React.ReactElement<MenuItemLabelProps, string | React.JSXElementConstructor<any>>;
|
|
27
|
+
export interface MenuListProps extends HTMLAttributes<HTMLDivElement> {
|
|
28
|
+
activatedByKeyboard?: boolean;
|
|
29
|
+
children: ReactElement[];
|
|
30
|
+
childMenuShowing?: string;
|
|
31
|
+
defaultHighlightedIdx?: number;
|
|
32
|
+
highlightedIdx?: number;
|
|
33
|
+
isRoot?: boolean;
|
|
34
|
+
listItemProps?: Partial<MenuItemProps>;
|
|
35
|
+
onActivate?: (menuId: string) => void;
|
|
36
|
+
onCloseMenu: (idx: number) => void;
|
|
37
|
+
onOpenMenu?: (menuItemEl: HTMLElement) => void;
|
|
38
|
+
onHighlightMenuItem?: (idx: number) => void;
|
|
39
|
+
}
|
|
40
|
+
export declare const MenuList: {
|
|
41
|
+
({ activatedByKeyboard, childMenuShowing, children, className, defaultHighlightedIdx, highlightedIdx: highlightedIdxProp, id: idProp, isRoot, listItemProps, onHighlightMenuItem, onActivate, onCloseMenu, onOpenMenu, ...props }: MenuListProps): JSX.Element;
|
|
42
|
+
displayName: string;
|
|
43
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ContextMenuContextType, MenuActionHandler, MenuBuilder } from "@vuu-ui/vuu-data-types";
|
|
2
|
+
import { ReactNode } from "react";
|
|
3
|
+
export declare const ContextMenuContext: import("react").Context<ContextMenuContextType | null>;
|
|
4
|
+
export interface ContextMenuProviderProps {
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
label?: string;
|
|
7
|
+
menuActionHandler?: MenuActionHandler;
|
|
8
|
+
menuBuilder: MenuBuilder;
|
|
9
|
+
}
|
|
10
|
+
export declare const ContextMenuProvider: ({ children, label, menuActionHandler, menuBuilder, }: ContextMenuProviderProps) => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const ArrowUp = "ArrowUp";
|
|
2
|
+
export declare const ArrowDown = "ArrowDown";
|
|
3
|
+
export declare const ArrowLeft = "ArrowLeft";
|
|
4
|
+
export declare const Backspace = "Backspace";
|
|
5
|
+
export declare const ArrowRight = "ArrowRight";
|
|
6
|
+
export declare const Enter = "Enter";
|
|
7
|
+
export declare const Escape = "Escape";
|
|
8
|
+
export declare const Delete = "Delete";
|
|
9
|
+
export declare const isCharacterKey: (evt: KeyboardEvent) => boolean | undefined;
|
|
10
|
+
export declare const isNavigationKey: ({ key }: {
|
|
11
|
+
key: string;
|
|
12
|
+
}, orientation?: string) => boolean;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export declare function listItemIndex(listItemEl: HTMLElement): number | undefined;
|
|
2
|
+
export declare const closestListItem: (el: HTMLElement | null | undefined) => HTMLElement;
|
|
3
|
+
export declare const closestListItemId: (el: HTMLElement) => string | undefined;
|
|
4
|
+
export declare const closestListItemIndex: (el: HTMLElement) => number | undefined;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MouseEvent } from "react";
|
|
2
|
+
import { MenuItemProps } from "./MenuList";
|
|
3
|
+
export type RuntimeMenuDescriptor = {
|
|
4
|
+
id: string;
|
|
5
|
+
left: number;
|
|
6
|
+
top: number;
|
|
7
|
+
};
|
|
8
|
+
export declare const getHostMenuId: (id: string, rootId: string) => string;
|
|
9
|
+
export interface CascadeHookProps {
|
|
10
|
+
id: string;
|
|
11
|
+
onActivate: (menuId: string) => void;
|
|
12
|
+
onMouseEnterItem: (evt: MouseEvent, itemId: string) => void;
|
|
13
|
+
position: {
|
|
14
|
+
x: number;
|
|
15
|
+
y: number;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface CascadeHooksResult {
|
|
19
|
+
closeMenu: () => void;
|
|
20
|
+
handleRender: () => void;
|
|
21
|
+
listItemProps: Partial<MenuItemProps>;
|
|
22
|
+
openMenu: (menuItemEl: HTMLElement) => void;
|
|
23
|
+
openMenus: RuntimeMenuDescriptor[];
|
|
24
|
+
}
|
|
25
|
+
export declare const useCascade: ({ id: rootId, onActivate, onMouseEnterItem, position: { x: posX, y: posY }, }: CascadeHookProps) => CascadeHooksResult;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
export declare const isMenuItemGroup: (child: ReactElement) => boolean;
|
|
3
|
+
type Menus = {
|
|
4
|
+
[key: string]: ReactElement[];
|
|
5
|
+
};
|
|
6
|
+
type Actions = {
|
|
7
|
+
[key: string]: {
|
|
8
|
+
action: string;
|
|
9
|
+
options?: unknown;
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export declare const useItemsWithIdsNext: (childrenProp: ReactElement[], rootId: string) => [Menus, Actions];
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { FocusEvent, KeyboardEvent } from "react";
|
|
2
|
+
export interface KeyboardNavigationProps {
|
|
3
|
+
autoHighlightFirstItem?: boolean;
|
|
4
|
+
count: number;
|
|
5
|
+
defaultHighlightedIdx?: number;
|
|
6
|
+
highlightedIndex?: number;
|
|
7
|
+
onActivate: (idx: number) => void;
|
|
8
|
+
onHighlight?: (idx: number) => void;
|
|
9
|
+
onCloseMenu: (idx: number) => void;
|
|
10
|
+
onOpenMenu?: (menuItemEl: HTMLElement) => void;
|
|
11
|
+
}
|
|
12
|
+
export interface KeyboardHookListProps {
|
|
13
|
+
onFocus: (evt: FocusEvent) => void;
|
|
14
|
+
onKeyDown: (evt: KeyboardEvent) => void;
|
|
15
|
+
onMouseDownCapture: () => void;
|
|
16
|
+
onMouseMove: () => void;
|
|
17
|
+
onMouseLeave: () => void;
|
|
18
|
+
}
|
|
19
|
+
export interface NavigationHookResult {
|
|
20
|
+
focusVisible: number;
|
|
21
|
+
controlledHighlighting: boolean;
|
|
22
|
+
highlightedIndex: number;
|
|
23
|
+
setHighlightedIndex: (idx: number) => void;
|
|
24
|
+
listProps: KeyboardHookListProps;
|
|
25
|
+
setIgnoreFocus: (ignoreFocus: boolean) => void;
|
|
26
|
+
}
|
|
27
|
+
export declare const useKeyboardNavigation: ({ autoHighlightFirstItem, count, defaultHighlightedIdx, highlightedIndex: highlightedIndexProp, onActivate, onHighlight, onCloseMenu, onOpenMenu, }: KeyboardNavigationProps) => NavigationHookResult;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MenuActionHandler, MenuBuilder } from "@vuu-ui/vuu-data-types";
|
|
3
|
+
import { ContextMenuProps } from "./ContextMenu";
|
|
4
|
+
export type ContextMenuOptions = {
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
contextMenu?: JSX.Element;
|
|
7
|
+
ContextMenuProps?: Partial<ContextMenuProps> & {
|
|
8
|
+
className?: string;
|
|
9
|
+
"data-mode"?: string;
|
|
10
|
+
};
|
|
11
|
+
controlledComponentId?: string;
|
|
12
|
+
};
|
|
13
|
+
export type EventLike = {
|
|
14
|
+
clientX: number;
|
|
15
|
+
clientY: number;
|
|
16
|
+
preventDefault?: () => void;
|
|
17
|
+
stopPropagation?: () => void;
|
|
18
|
+
};
|
|
19
|
+
export type ShowContextMenu = (e: EventLike, location: string, options: ContextMenuOptions) => void;
|
|
20
|
+
export declare const useContextMenu: (menuBuilder?: MenuBuilder, menuActionHandler?: MenuActionHandler) => [ShowContextMenu, () => void];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { HTMLAttributes, RefObject } from "react";
|
|
2
|
+
import "./Popup.css";
|
|
3
|
+
export type PopupPlacement = "below" | "below-center" | "below-full-width" | "center" | "right";
|
|
4
|
+
export interface PopupComponentProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
placement: PopupPlacement;
|
|
6
|
+
anchorElement: RefObject<HTMLElement>;
|
|
7
|
+
offsetLeft?: number;
|
|
8
|
+
offsetTop?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const PopupComponent: ({ children, className, anchorElement, placement, }: PopupComponentProps) => JSX.Element | null;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React, { ReactElement } from "react";
|
|
2
|
+
import { ContextMenuOptions } from "../menu";
|
|
3
|
+
import "./popup-service.css";
|
|
4
|
+
export type PopupCloseCallback = (reason?: PopupCloseReason) => void;
|
|
5
|
+
export type ClickAwayClosePopup = {
|
|
6
|
+
type: "click-away";
|
|
7
|
+
mouseEvt: MouseEvent;
|
|
8
|
+
};
|
|
9
|
+
export type EscapeClosePopup = {
|
|
10
|
+
type: "escape";
|
|
11
|
+
event: KeyboardEvent;
|
|
12
|
+
};
|
|
13
|
+
export type MenuActionClosePopup = {
|
|
14
|
+
menuId: string;
|
|
15
|
+
options: ContextMenuOptions;
|
|
16
|
+
type: "menu-action";
|
|
17
|
+
};
|
|
18
|
+
export type PopupCloseReason = ClickAwayClosePopup | EscapeClosePopup | MenuActionClosePopup;
|
|
19
|
+
export declare const reasonIsMenuAction: (reason?: PopupCloseReason) => reason is MenuActionClosePopup;
|
|
20
|
+
export declare const reasonIsClickAway: (reason?: PopupCloseReason) => reason is ClickAwayClosePopup;
|
|
21
|
+
export interface ShowPopupProps {
|
|
22
|
+
depth?: number;
|
|
23
|
+
/**
|
|
24
|
+
* if true, focus will be invoked on first focusable element
|
|
25
|
+
*/
|
|
26
|
+
focus?: boolean;
|
|
27
|
+
name?: string;
|
|
28
|
+
group?: string;
|
|
29
|
+
position?: "above" | "below" | "";
|
|
30
|
+
left?: number;
|
|
31
|
+
right?: "auto" | number;
|
|
32
|
+
top?: number;
|
|
33
|
+
component: ReactElement;
|
|
34
|
+
width?: number | "auto";
|
|
35
|
+
}
|
|
36
|
+
export declare class PopupService {
|
|
37
|
+
static onClose: PopupCloseCallback | undefined;
|
|
38
|
+
static showPopup({ group, name, left, position, right, top, width, component, }: ShowPopupProps): void;
|
|
39
|
+
static escapeKeyListener(evt: KeyboardEvent): void;
|
|
40
|
+
static hidePopup(reason?: PopupCloseReason, name?: string, group?: string): void;
|
|
41
|
+
static keepWithinThePage(el: HTMLElement, right?: number | "auto"): void;
|
|
42
|
+
}
|
|
43
|
+
export declare class DialogService {
|
|
44
|
+
static showDialog(dialog: ReactElement): void;
|
|
45
|
+
static closeDialog(): void;
|
|
46
|
+
}
|
|
47
|
+
export interface PopupProps {
|
|
48
|
+
children: ReactElement;
|
|
49
|
+
close?: boolean;
|
|
50
|
+
depth: number;
|
|
51
|
+
group?: string;
|
|
52
|
+
name: string;
|
|
53
|
+
position?: "above" | "below" | "";
|
|
54
|
+
width: number;
|
|
55
|
+
}
|
|
56
|
+
export declare const Popup: (props: PopupProps) => React.DetailedReactHTMLElement<{
|
|
57
|
+
className: string;
|
|
58
|
+
ref: React.RefObject<HTMLElement>;
|
|
59
|
+
}, HTMLElement>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
import { PopupPlacement } from "./Popup";
|
|
3
|
+
export interface AnchoredPositionHookProps {
|
|
4
|
+
anchorElement: RefObject<HTMLElement>;
|
|
5
|
+
offsetLeft?: number;
|
|
6
|
+
offsetTop?: number;
|
|
7
|
+
placement: PopupPlacement;
|
|
8
|
+
}
|
|
9
|
+
export declare const useAnchoredPosition: ({ anchorElement, offsetLeft, offsetTop, placement, }: AnchoredPositionHookProps) => {
|
|
10
|
+
left: number;
|
|
11
|
+
top: number;
|
|
12
|
+
} | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
import { PopupCloseReason } from "@vuu-ui/vuu-popups";
|
|
3
|
+
import "./PopupMenu.css";
|
|
4
|
+
import { MenuActionHandler, MenuBuilder } from "@vuu-ui/vuu-data-types";
|
|
5
|
+
export interface PopupMenuProps extends HTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
icon?: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
menuActionHandler?: MenuActionHandler;
|
|
9
|
+
menuBuilder?: MenuBuilder;
|
|
10
|
+
menuLocation?: string;
|
|
11
|
+
menuOptions?: {
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
onMenuClose?: (reason?: PopupCloseReason) => void;
|
|
15
|
+
}
|
|
16
|
+
export declare const PopupMenu: ({ className, label, icon, id: idProp, menuActionHandler, menuBuilder, menuLocation, menuOptions, onMenuClose, tabIndex, ...htmlAttributes }: PopupMenuProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./PopupMenu";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import "./Portal.css";
|
|
3
|
+
export interface PortalProps {
|
|
4
|
+
/**
|
|
5
|
+
* The children to render into the `container`.
|
|
6
|
+
*/
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* An HTML element, component instance, or function that returns either.
|
|
10
|
+
* The `container` will have the portal children appended to it.
|
|
11
|
+
*
|
|
12
|
+
* By default, it uses the body of the top-level document object,
|
|
13
|
+
* so it's simply `document.body` most of the time.
|
|
14
|
+
*/
|
|
15
|
+
container?: Element | (() => Element | null) | null;
|
|
16
|
+
/**
|
|
17
|
+
* If this node does not exist on the document, it will be created for you.
|
|
18
|
+
*/
|
|
19
|
+
id?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Allow conditional rendering of this Portal, if false, will render nothing.
|
|
22
|
+
* Defaults to true
|
|
23
|
+
*/
|
|
24
|
+
open?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Portals provide a first-class way to render children into a DOM node
|
|
28
|
+
* that exists outside the DOM hierarchy of the parent component.
|
|
29
|
+
*/
|
|
30
|
+
export declare const Portal: ({ children, container: containerProp, id, open, }: PortalProps) => import("react").ReactPortal | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Portal";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
export interface PortalDeprecatedProps {
|
|
3
|
+
children: ReactElement;
|
|
4
|
+
onRender?: () => void;
|
|
5
|
+
x?: number;
|
|
6
|
+
y?: number;
|
|
7
|
+
}
|
|
8
|
+
export declare const PortalDeprecated: ({ children, x, y, onRender, }: PortalDeprecatedProps) => null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const installTheme: (themeId: string) => void;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
export interface HTMLContainerProps {
|
|
3
|
+
className?: string;
|
|
4
|
+
dataMode?: string;
|
|
5
|
+
x?: number;
|
|
6
|
+
y?: number;
|
|
7
|
+
win?: typeof globalThis;
|
|
8
|
+
}
|
|
9
|
+
export declare const createContainer: (props: HTMLContainerProps) => HTMLDivElement;
|
|
10
|
+
export declare const renderPortal: (component: ReactElement, container: HTMLElement, x: number, y: number, onRender?: () => void) => void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HTMLAttributes } from "react";
|
|
2
|
+
import { PopupComponentProps } from "../popup";
|
|
3
|
+
import "./Prompt.css";
|
|
4
|
+
export interface PromptProps extends HTMLAttributes<HTMLDialogElement> {
|
|
5
|
+
PopupProps?: Partial<PopupComponentProps>;
|
|
6
|
+
cancelButtonLabel?: string;
|
|
7
|
+
confirmButtonLabel?: string;
|
|
8
|
+
onCancel: () => void;
|
|
9
|
+
onConfirm: () => void;
|
|
10
|
+
icon?: string;
|
|
11
|
+
text: string;
|
|
12
|
+
variant?: "warn" | "error" | "info";
|
|
13
|
+
}
|
|
14
|
+
export declare const Prompt: ({ PopupProps, cancelButtonLabel, confirmButtonLabel, icon, onCancel, onConfirm, style, text, title, variant, ...htmlAttributes }: PromptProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Prompt";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { MouseEventHandler, ReactNode, RefObject } from "react";
|
|
2
|
+
import { TooltipPlacement } from "./useAnchoredPosition";
|
|
3
|
+
import "./Tooltip.css";
|
|
4
|
+
export interface TooltipProps {
|
|
5
|
+
anchorElement: RefObject<HTMLElement>;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
id?: string;
|
|
8
|
+
onMouseEnter: MouseEventHandler;
|
|
9
|
+
onMouseLeave: MouseEventHandler;
|
|
10
|
+
placement: TooltipPlacement;
|
|
11
|
+
}
|
|
12
|
+
export declare const Tooltip: ({ anchorElement, children, id, onMouseEnter, onMouseLeave, placement, }: TooltipProps) => JSX.Element | null;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { RefObject } from "react";
|
|
2
|
+
export type TooltipPlacement = "above" | "right" | "below" | "left";
|
|
3
|
+
export interface AnchoredPositionHookProps {
|
|
4
|
+
anchorElement: RefObject<HTMLElement>;
|
|
5
|
+
offsetLeft?: number;
|
|
6
|
+
offsetTop?: number;
|
|
7
|
+
placement: TooltipPlacement;
|
|
8
|
+
}
|
|
9
|
+
export declare const useAnchoredPosition: ({ anchorElement, offsetLeft, offsetTop, placement, }: AnchoredPositionHookProps) => {
|
|
10
|
+
left: number;
|
|
11
|
+
top: number;
|
|
12
|
+
} | undefined;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { MouseEvent, ReactNode } from "react";
|
|
2
|
+
import { TooltipProps } from "./Tooltip";
|
|
3
|
+
import { TooltipPlacement } from "./useAnchoredPosition";
|
|
4
|
+
export interface TooltipHookProps {
|
|
5
|
+
id: string;
|
|
6
|
+
placement?: TooltipPlacement;
|
|
7
|
+
tooltipContent: ReactNode;
|
|
8
|
+
}
|
|
9
|
+
export declare const useTooltip: ({ id: idProp, placement, tooltipContent, }: TooltipHookProps) => {
|
|
10
|
+
anchorProps: {
|
|
11
|
+
"aria-describedby": string;
|
|
12
|
+
onMouseEnter: (evt: MouseEvent) => void;
|
|
13
|
+
onMouseLeave: () => void;
|
|
14
|
+
};
|
|
15
|
+
tooltipProps: TooltipProps | undefined;
|
|
16
|
+
};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { NamedFilter } from "@vuu-ui/vuu-filter-types";
|
|
2
|
-
import { TableSchema } from "@vuu-ui/vuu-data";
|
|
3
|
-
import { HTMLAttributes } from "react";
|
|
4
|
-
import "./FilterBar.css";
|
|
5
|
-
export interface FilterbarProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
-
filters: NamedFilter[];
|
|
7
|
-
tableSchema: TableSchema;
|
|
8
|
-
}
|
|
9
|
-
export declare const FilterBar: ({ className: classNameProp, filters, tableSchema, ...htmlAttributes }: FilterbarProps) => JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./FilterBar";
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { NamedFilter } from "@vuu-ui/vuu-filter-types";
|
|
2
|
-
import { HTMLAttributes } from "react";
|
|
3
|
-
import "./FilterPill.css";
|
|
4
|
-
export interface FilterPillProps extends HTMLAttributes<HTMLDivElement> {
|
|
5
|
-
filter: NamedFilter;
|
|
6
|
-
index?: number;
|
|
7
|
-
}
|
|
8
|
-
export declare const FilterPill: ({ filter, className: classNameProp, index, ...htmlAttributes }: FilterPillProps) => JSX.Element;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { MenuActionHandler } from "@vuu-ui/vuu-data-types";
|
|
3
|
-
import "./FilterPillMenu.css";
|
|
4
|
-
export interface FilterPillMenuProps {
|
|
5
|
-
allowClose?: boolean;
|
|
6
|
-
allowRename?: boolean;
|
|
7
|
-
location?: string;
|
|
8
|
-
onMenuAction: MenuActionHandler;
|
|
9
|
-
onMenuClose?: () => void;
|
|
10
|
-
index: number;
|
|
11
|
-
}
|
|
12
|
-
export declare const FilterPillMenu: ({ allowClose, allowRename, location, onMenuAction, onMenuClose, index, }: FilterPillMenuProps) => JSX.Element;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/types/{filter-input → vuu-filters/src/filter-input}/useFilterSuggestionProvider.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|