@gamecrafters/base-ui 0.0.25 → 0.0.27
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/build/components/action-list/ActionList.types.d.ts +1 -0
- package/build/components/context-menu/ContextMenu.d.ts +7 -0
- package/build/components/context-menu/ContextMenu.types.d.ts +33 -0
- package/build/components/context-menu/ContextMenuContext.d.ts +2 -0
- package/build/components/context-menu/ContextMenuOverlay.d.ts +7 -0
- package/build/components/context-menu/ContextMenuTrigger.d.ts +7 -0
- package/build/components/context-menu/index.d.ts +12 -0
- package/build/components/index.d.ts +1 -0
- package/build/main.cjs.js +67 -67
- package/build/main.esm.js +66 -66
- package/build/styles/main.css +1 -1
- package/package.json +3 -14
|
@@ -86,6 +86,7 @@ export type ActionListGroupContextValue = {
|
|
|
86
86
|
export type ActionListContainerContextValue = {
|
|
87
87
|
container?: string;
|
|
88
88
|
listRole?: React.AriaRole;
|
|
89
|
+
listLabel?: string;
|
|
89
90
|
listLabelledBy?: string;
|
|
90
91
|
selectionVariant?: ActionListSelectionVariant;
|
|
91
92
|
selectionAttribute?: "aria-selected" | "aria-checked";
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type * as React from "react";
|
|
2
|
+
import type { AnchoredOverlayProps } from "../anchored-overlay/AnchoredOverlay.types";
|
|
3
|
+
export type ContextMenuPoint = {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
size: number;
|
|
7
|
+
};
|
|
8
|
+
export type ContextMenuProps = {
|
|
9
|
+
children: React.ReactNode;
|
|
10
|
+
open?: boolean;
|
|
11
|
+
onOpenChange?: (open: boolean) => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
portalContainerName?: string;
|
|
14
|
+
};
|
|
15
|
+
export type ContextMenuTriggerProps = React.ComponentPropsWithoutRef<"div"> & {
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
className?: string;
|
|
18
|
+
};
|
|
19
|
+
export type ContextMenuOverlayProps = Pick<AnchoredOverlayProps, "align" | "side" | "width" | "height" | "variant" | "preventOverflow" | "className"> & {
|
|
20
|
+
children: React.ReactNode;
|
|
21
|
+
"aria-label"?: string;
|
|
22
|
+
"aria-labelledby"?: string;
|
|
23
|
+
returnFocusRef?: React.RefObject<HTMLElement | null>;
|
|
24
|
+
};
|
|
25
|
+
export type ContextMenuContextValue = {
|
|
26
|
+
triggerRef: React.RefObject<HTMLDivElement | null>;
|
|
27
|
+
point: ContextMenuPoint;
|
|
28
|
+
open: boolean;
|
|
29
|
+
disabled?: boolean;
|
|
30
|
+
onOpen?: (point: ContextMenuPoint) => void;
|
|
31
|
+
onClose?: () => void;
|
|
32
|
+
portalContainerName?: string;
|
|
33
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ContextMenuOverlayProps } from "./ContextMenu.types";
|
|
3
|
+
declare function ContextMenuOverlay(props: ContextMenuOverlayProps): React.JSX.Element | null;
|
|
4
|
+
declare namespace ContextMenuOverlay {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
export default ContextMenuOverlay;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { ContextMenuTriggerProps } from "./ContextMenu.types";
|
|
3
|
+
declare function ContextMenuTrigger(props: ContextMenuTriggerProps): React.JSX.Element;
|
|
4
|
+
declare namespace ContextMenuTrigger {
|
|
5
|
+
var displayName: string;
|
|
6
|
+
}
|
|
7
|
+
export default ContextMenuTrigger;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ActionListDivider } from "../action-list";
|
|
2
|
+
import ContextMenuBase from "./ContextMenu";
|
|
3
|
+
import ContextMenuOverlay from "./ContextMenuOverlay";
|
|
4
|
+
import ContextMenuTrigger from "./ContextMenuTrigger";
|
|
5
|
+
export declare const ContextMenu: typeof ContextMenuBase & {
|
|
6
|
+
Trigger: typeof ContextMenuTrigger;
|
|
7
|
+
Overlay: typeof ContextMenuOverlay;
|
|
8
|
+
Divider: typeof ActionListDivider;
|
|
9
|
+
};
|
|
10
|
+
export { ContextMenuTrigger, ContextMenuOverlay };
|
|
11
|
+
export { ContextMenuContext } from "./ContextMenuContext";
|
|
12
|
+
export * from "./ContextMenu.types";
|
|
@@ -32,6 +32,7 @@ export * from "./collapsible";
|
|
|
32
32
|
export * from "./combobox";
|
|
33
33
|
export * from "./command-palette";
|
|
34
34
|
export * from "./confirmation-dialog";
|
|
35
|
+
export * from "./context-menu";
|
|
35
36
|
export * from "./counter-label";
|
|
36
37
|
export * from "./data-table";
|
|
37
38
|
export * from "./date-picker";
|