@gusarov-studio/rubik-ui 10.0.2 → 11.0.1
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/ContextMenu/ContextMenuCheckbox.d.ts +4 -2
- package/dist/ContextMenu/ContextMenuContent.d.ts +4 -2
- package/dist/ContextMenu/ContextMenuContext.d.ts +7 -0
- package/dist/ContextMenu/ContextMenuDivider.d.ts +4 -2
- package/dist/ContextMenu/ContextMenuItem.d.ts +4 -2
- package/dist/ContextMenu/ContextMenuRoot.d.ts +8 -0
- package/dist/ContextMenu/ContextMenuSubContent.d.ts +4 -2
- package/dist/ContextMenu/ContextMenuSubTrigger.d.ts +4 -2
- package/dist/ContextMenu/index.d.ts +20 -7
- package/dist/Tooltip/Tooltip.d.ts +7 -15
- package/dist/Tooltip/TooltipContent.d.ts +3 -2
- package/dist/Tooltip/TooltipContext.d.ts +5 -53
- package/dist/Tooltip/TooltipRoot.d.ts +20 -0
- package/dist/Tooltip/TooltipTrigger.d.ts +1 -1
- package/dist/Tooltip/hooks/useTooltip.d.ts +3 -2
- package/dist/Tooltip/index.d.ts +10 -4
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/tsconfig.declarations.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { CheckboxItem } from "@radix-ui/react-context-menu";
|
|
3
|
+
type ContextMenuCheckboxProps = Omit<React.ComponentPropsWithoutRef<typeof CheckboxItem>, "asChild">;
|
|
4
|
+
declare const ContextMenuCheckbox: React.ForwardRefExoticComponent<ContextMenuCheckboxProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export { ContextMenuCheckbox, type ContextMenuCheckboxProps };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { Content } from "@radix-ui/react-context-menu";
|
|
3
|
+
type ContextMenuContentProps = Omit<React.ComponentPropsWithoutRef<typeof Content>, "asChild">;
|
|
4
|
+
declare const ContextMenuContent: React.ForwardRefExoticComponent<ContextMenuContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export { ContextMenuContent, type ContextMenuContentProps };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface ContextMenuContextValue {
|
|
2
|
+
appearance?: "default" | "compact";
|
|
3
|
+
zIndex?: number | `${number}`;
|
|
4
|
+
}
|
|
5
|
+
declare const ContextMenuContext: import("react").Context<ContextMenuContextValue | null>;
|
|
6
|
+
declare const useContextMenuContext: () => ContextMenuContextValue;
|
|
7
|
+
export { ContextMenuContext, type ContextMenuContextValue, useContextMenuContext };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { Separator } from "@radix-ui/react-context-menu";
|
|
3
|
+
type ContextMenuDividerProps = Omit<React.ComponentPropsWithoutRef<typeof Separator>, "asChild">;
|
|
4
|
+
declare const ContextMenuDivider: React.ForwardRefExoticComponent<ContextMenuDividerProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export { ContextMenuDivider, type ContextMenuDividerProps };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { Item } from "@radix-ui/react-context-menu";
|
|
3
|
+
type ContextMenuItemProps = Omit<React.ComponentPropsWithoutRef<typeof Item>, "asChild">;
|
|
4
|
+
declare const ContextMenuItem: React.ForwardRefExoticComponent<ContextMenuItemProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export { ContextMenuItem, type ContextMenuItemProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Root } from "@radix-ui/react-context-menu";
|
|
3
|
+
interface ContextMenuRootProps extends React.ComponentProps<typeof Root> {
|
|
4
|
+
appearance?: "default" | "compact";
|
|
5
|
+
zIndex?: number | `${number}`;
|
|
6
|
+
}
|
|
7
|
+
declare const ContextMenuRoot: React.FC<ContextMenuRootProps>;
|
|
8
|
+
export { ContextMenuRoot, type ContextMenuRootProps };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { SubContent } from "@radix-ui/react-context-menu";
|
|
3
|
+
type ContextMenuSubContentProps = Omit<React.ComponentPropsWithoutRef<typeof SubContent>, "asChild">;
|
|
4
|
+
declare const ContextMenuSubContent: React.ForwardRefExoticComponent<ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export { ContextMenuSubContent, type ContextMenuSubContentProps };
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { SubTrigger } from "@radix-ui/react-context-menu";
|
|
3
|
+
type ContextMenuSubTriggerProps = Omit<React.ComponentPropsWithoutRef<typeof SubTrigger>, "asChild">;
|
|
4
|
+
declare const ContextMenuSubTrigger: React.ForwardRefExoticComponent<ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export { ContextMenuSubTrigger, type ContextMenuSubTriggerProps };
|
|
@@ -1,7 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { type ContextMenuTriggerProps, type ContextMenuSubProps } from "@radix-ui/react-context-menu";
|
|
2
|
+
import { type ContextMenuRootProps } from "./ContextMenuRoot";
|
|
3
|
+
import { type ContextMenuCheckboxProps } from "./ContextMenuCheckbox";
|
|
4
|
+
import { type ContextMenuContentProps } from "./ContextMenuContent";
|
|
5
|
+
import { type ContextMenuDividerProps } from "./ContextMenuDivider";
|
|
6
|
+
import { type ContextMenuItemProps } from "./ContextMenuItem";
|
|
7
|
+
import { type ContextMenuSubContentProps } from "./ContextMenuSubContent";
|
|
8
|
+
import { type ContextMenuSubTriggerProps } from "./ContextMenuSubTrigger";
|
|
9
|
+
declare const ContextMenu: {
|
|
10
|
+
Root: import("react").FC<ContextMenuRootProps>;
|
|
11
|
+
Trigger: import("react").ForwardRefExoticComponent<ContextMenuTriggerProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
Menu: import("react").ForwardRefExoticComponent<ContextMenuContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
13
|
+
Item: import("react").ForwardRefExoticComponent<ContextMenuItemProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Divider: import("react").ForwardRefExoticComponent<ContextMenuDividerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
15
|
+
Checkbox: import("react").ForwardRefExoticComponent<ContextMenuCheckboxProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
16
|
+
Sub: import("react").FC<ContextMenuSubProps>;
|
|
17
|
+
SubTrigger: import("react").ForwardRefExoticComponent<ContextMenuSubTriggerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
SubMenu: import("react").ForwardRefExoticComponent<ContextMenuSubContentProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
19
|
+
};
|
|
20
|
+
export { ContextMenu, type ContextMenuRootProps, type ContextMenuTriggerProps, type ContextMenuContentProps, type ContextMenuItemProps, type ContextMenuDividerProps, type ContextMenuCheckboxProps, type ContextMenuSubProps, type ContextMenuSubTriggerProps, type ContextMenuSubContentProps, };
|
|
@@ -1,18 +1,10 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import type
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
width?: WidthValue;
|
|
9
|
-
withArrow?: boolean;
|
|
10
|
-
initialOpen?: boolean;
|
|
11
|
-
open?: boolean;
|
|
12
|
-
onOpenChange?: (open: boolean) => void;
|
|
13
|
-
}
|
|
14
|
-
interface TooltipProps extends TooltipPropsBase {
|
|
15
|
-
children: React.ReactNode;
|
|
2
|
+
import { type TooltipRootProps } from "./TooltipRoot";
|
|
3
|
+
interface TooltipProps extends TooltipRootProps {
|
|
4
|
+
title: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
asChild?: boolean;
|
|
7
|
+
zIndex?: number | `${number}`;
|
|
16
8
|
}
|
|
17
9
|
declare const Tooltip: React.FC<TooltipProps>;
|
|
18
|
-
export { Tooltip, type
|
|
10
|
+
export { Tooltip, type TooltipProps };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import "./Tooltip.scss";
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
type TooltipContentProps = React.HTMLProps<HTMLDivElement>;
|
|
4
|
+
declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export { TooltipContent, type TooltipContentProps };
|
|
@@ -1,55 +1,7 @@
|
|
|
1
1
|
import type { useTooltip } from "./hooks/useTooltip";
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
declare const useTooltipContext: () => {
|
|
5
|
-
placement: import("@floating-ui/utils").Placement;
|
|
6
|
-
strategy: import("@floating-ui/utils").Strategy;
|
|
7
|
-
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
8
|
-
x: number;
|
|
9
|
-
y: number;
|
|
10
|
-
isPositioned: boolean;
|
|
11
|
-
update: () => void;
|
|
12
|
-
floatingStyles: React.CSSProperties;
|
|
13
|
-
refs: {
|
|
14
|
-
reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
|
|
15
|
-
floating: React.MutableRefObject<HTMLElement | null>;
|
|
16
|
-
setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
|
|
17
|
-
setFloating: (node: HTMLElement | null) => void;
|
|
18
|
-
} & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
19
|
-
elements: {
|
|
20
|
-
reference: import("@floating-ui/react-dom").ReferenceType | null;
|
|
21
|
-
floating: HTMLElement | null;
|
|
22
|
-
} & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
23
|
-
context: {
|
|
24
|
-
x: number;
|
|
25
|
-
y: number;
|
|
26
|
-
placement: import("@floating-ui/utils").Placement;
|
|
27
|
-
strategy: import("@floating-ui/utils").Strategy;
|
|
28
|
-
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
29
|
-
isPositioned: boolean;
|
|
30
|
-
update: () => void;
|
|
31
|
-
floatingStyles: React.CSSProperties;
|
|
32
|
-
open: boolean;
|
|
33
|
-
onOpenChange: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
|
|
34
|
-
events: import("@floating-ui/react").FloatingEvents;
|
|
35
|
-
dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
|
|
36
|
-
nodeId: string | undefined;
|
|
37
|
-
floatingId: string | undefined;
|
|
38
|
-
refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
|
|
39
|
-
elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
|
|
40
|
-
};
|
|
41
|
-
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
42
|
-
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
43
|
-
getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
|
|
44
|
-
active?: boolean;
|
|
45
|
-
selected?: boolean;
|
|
46
|
-
}) => Record<string, unknown>;
|
|
47
|
-
size: "24" | "32" | "36" | "44";
|
|
48
|
-
withArrow: boolean;
|
|
49
|
-
arrowRef: import("react").MutableRefObject<SVGSVGElement | null>;
|
|
50
|
-
centered: boolean;
|
|
51
|
-
width: (number | "auto" | "0" | import("../types/CSSUnit").CSSUnit | `calc(${string})`) | undefined;
|
|
52
|
-
open: boolean;
|
|
53
|
-
setOpen: (newOpen: boolean) => void;
|
|
2
|
+
type TooltipContextType = ReturnType<typeof useTooltip> & {
|
|
3
|
+
zIndex?: number | `${number}`;
|
|
54
4
|
};
|
|
55
|
-
|
|
5
|
+
declare const TooltipContext: import("react").Context<TooltipContextType | null>;
|
|
6
|
+
declare const useTooltipContext: () => TooltipContextType;
|
|
7
|
+
export { TooltipContext, type TooltipContextType, useTooltipContext };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { Placement } from "@floating-ui/react";
|
|
3
|
+
import type { CSSUnit } from "../types/CSSUnit";
|
|
4
|
+
type WidthValue = CSSUnit | "0" | `calc(${string})` | number | "auto";
|
|
5
|
+
interface TooltipRootPropsBase {
|
|
6
|
+
size?: "24" | "32" | "36" | "44";
|
|
7
|
+
position?: Placement;
|
|
8
|
+
width?: WidthValue;
|
|
9
|
+
withArrow?: boolean;
|
|
10
|
+
initialOpen?: boolean;
|
|
11
|
+
open?: boolean;
|
|
12
|
+
onOpenChange?: (open: boolean) => void;
|
|
13
|
+
zIndex?: number | `${number}`;
|
|
14
|
+
}
|
|
15
|
+
interface TooltipRootProps extends TooltipRootPropsBase {
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
zIndex?: number | `${number}`;
|
|
18
|
+
}
|
|
19
|
+
declare const TooltipRoot: React.FC<TooltipRootProps>;
|
|
20
|
+
export { TooltipRoot, type TooltipRootPropsBase, type TooltipRootProps };
|
|
@@ -4,4 +4,4 @@ interface TooltipTriggerProps extends React.HTMLProps<HTMLElement> {
|
|
|
4
4
|
asChild?: boolean;
|
|
5
5
|
}
|
|
6
6
|
declare const TooltipTrigger: React.ForwardRefExoticComponent<Omit<TooltipTriggerProps, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
7
|
-
export { TooltipTrigger };
|
|
7
|
+
export { TooltipTrigger, type TooltipTriggerProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
declare const useTooltip: ({ size, position, withArrow, width, initialOpen, open: controlledOpen, onOpenChange, }?:
|
|
1
|
+
import type { TooltipRootPropsBase } from "../TooltipRoot";
|
|
2
|
+
declare const useTooltip: ({ size, position, withArrow, width, initialOpen, open: controlledOpen, onOpenChange, zIndex, }?: TooltipRootPropsBase) => {
|
|
3
3
|
placement: import("@floating-ui/utils").Placement;
|
|
4
4
|
strategy: import("@floating-ui/utils").Strategy;
|
|
5
5
|
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
@@ -49,5 +49,6 @@ declare const useTooltip: ({ size, position, withArrow, width, initialOpen, open
|
|
|
49
49
|
width: (number | "auto" | "0" | import("../../types/CSSUnit").CSSUnit | `calc(${string})`) | undefined;
|
|
50
50
|
open: boolean;
|
|
51
51
|
setOpen: (newOpen: boolean) => void;
|
|
52
|
+
zIndex: number | `${number}` | undefined;
|
|
52
53
|
};
|
|
53
54
|
export { useTooltip };
|
package/dist/Tooltip/index.d.ts
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { Tooltip, type TooltipProps } from "./Tooltip";
|
|
2
|
+
import { type TooltipRootProps } from "./TooltipRoot";
|
|
3
|
+
import { type TooltipTriggerProps } from "./TooltipTrigger";
|
|
4
|
+
import { type TooltipContentProps } from "./TooltipContent";
|
|
5
|
+
declare const CustomTooltip: {
|
|
6
|
+
Root: import("react").FC<TooltipRootProps>;
|
|
7
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<TooltipTriggerProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
8
|
+
Content: import("react").ForwardRefExoticComponent<Omit<TooltipContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
};
|
|
10
|
+
export { Tooltip, CustomTooltip, type TooltipProps, type TooltipRootProps, type TooltipTriggerProps, type TooltipContentProps, };
|