@gusarov-studio/rubik-ui 11.0.0 → 12.0.0

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.
@@ -1,3 +1,5 @@
1
1
  import React from "react";
2
- declare const ContextMenuCheckbox: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-context-menu").ContextMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref">, "asChild"> & React.RefAttributes<HTMLDivElement>>;
3
- export { ContextMenuCheckbox };
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
- declare const ContextMenuContent: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-context-menu").ContextMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref">, "asChild"> & React.RefAttributes<HTMLDivElement>>;
3
- export { ContextMenuContent };
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
- declare const ContextMenuDivider: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-context-menu").ContextMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref">, "asChild"> & React.RefAttributes<HTMLDivElement>>;
3
- export { ContextMenuDivider };
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
- declare const ContextMenuItem: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-context-menu").ContextMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref">, "asChild"> & React.RefAttributes<HTMLDivElement>>;
3
- export { ContextMenuItem };
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
- declare const ContextMenuSubContent: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-context-menu").ContextMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref">, "asChild"> & React.RefAttributes<HTMLDivElement>>;
3
- export { ContextMenuSubContent };
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
- declare const ContextMenuSubTrigger: React.ForwardRefExoticComponent<Omit<Omit<import("@radix-ui/react-context-menu").ContextMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref">, "asChild"> & React.RefAttributes<HTMLDivElement>>;
3
- export { ContextMenuSubTrigger };
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
- export { Root as ContextMenu, Trigger as ContextMenuTrigger, Sub as ContextMenuSub, } from "@radix-ui/react-context-menu";
2
- export * from "./ContextMenuCheckbox";
3
- export * from "./ContextMenuContent";
4
- export * from "./ContextMenuDivider";
5
- export * from "./ContextMenuItem";
6
- export * from "./ContextMenuSubContent";
7
- export * from "./ContextMenuSubTrigger";
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, };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import "./Popover.scss";
3
+ type PopoverContentProps = React.HTMLProps<HTMLDivElement>;
4
+ declare const PopoverContent: React.ForwardRefExoticComponent<Omit<PopoverContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ export { PopoverContent, type PopoverContentProps };
@@ -0,0 +1,56 @@
1
+ import type { usePopover } from "./hooks/usePopover";
2
+ type PopoverContextType = ReturnType<typeof usePopover> | null;
3
+ declare const PopoverContext: import("react").Context<PopoverContextType>;
4
+ declare const usePopoverContext: () => {
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
+ withArrow: boolean;
48
+ arrowRef: import("react").MutableRefObject<SVGSVGElement | null>;
49
+ centered: boolean;
50
+ width: (number | "auto" | "0" | import("../types/CSSUnit").CSSUnit | `calc(${string})`) | undefined;
51
+ modal: boolean | undefined;
52
+ open: boolean;
53
+ setOpen: ((open: boolean) => void) | undefined;
54
+ zIndex: number | `${number}`;
55
+ };
56
+ export { PopoverContext, type PopoverContextType, usePopoverContext };
@@ -0,0 +1,19 @@
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 PopoverRootPropsBase {
6
+ position?: Placement;
7
+ modal?: boolean;
8
+ width?: WidthValue;
9
+ withArrow?: boolean;
10
+ defaultOpen?: boolean;
11
+ open?: boolean;
12
+ onOpenChange?: (open: boolean) => void;
13
+ zIndex?: number | `${number}`;
14
+ }
15
+ interface PopoverRootProps extends PopoverRootPropsBase {
16
+ children: React.ReactNode;
17
+ }
18
+ declare const PopoverRoot: React.FC<PopoverRootProps>;
19
+ export { PopoverRoot, type PopoverRootPropsBase, type PopoverRootProps };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface PopoverTriggerProps extends React.HTMLProps<HTMLElement> {
3
+ children: React.ReactNode;
4
+ asChild?: boolean;
5
+ }
6
+ declare const PopoverTrigger: React.ForwardRefExoticComponent<Omit<PopoverTriggerProps, "ref"> & React.RefAttributes<HTMLElement>>;
7
+ export { PopoverTrigger, type PopoverTriggerProps };
@@ -0,0 +1,54 @@
1
+ import type { PopoverRootPropsBase } from "../PopoverRoot";
2
+ declare const usePopover: ({ position, modal, withArrow, width, defaultOpen, open: controlledOpen, onOpenChange: setControlledOpen, zIndex, }?: PopoverRootPropsBase) => {
3
+ placement: import("@floating-ui/utils").Placement;
4
+ strategy: import("@floating-ui/utils").Strategy;
5
+ middlewareData: import("@floating-ui/core").MiddlewareData;
6
+ x: number;
7
+ y: number;
8
+ isPositioned: boolean;
9
+ update: () => void;
10
+ floatingStyles: React.CSSProperties;
11
+ refs: {
12
+ reference: import("react").MutableRefObject<import("@floating-ui/react-dom").ReferenceType | null>;
13
+ floating: React.MutableRefObject<HTMLElement | null>;
14
+ setReference: (node: import("@floating-ui/react-dom").ReferenceType | null) => void;
15
+ setFloating: (node: HTMLElement | null) => void;
16
+ } & import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
17
+ elements: {
18
+ reference: import("@floating-ui/react-dom").ReferenceType | null;
19
+ floating: HTMLElement | null;
20
+ } & import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
21
+ context: {
22
+ x: number;
23
+ y: number;
24
+ placement: import("@floating-ui/utils").Placement;
25
+ strategy: import("@floating-ui/utils").Strategy;
26
+ middlewareData: import("@floating-ui/core").MiddlewareData;
27
+ isPositioned: boolean;
28
+ update: () => void;
29
+ floatingStyles: React.CSSProperties;
30
+ open: boolean;
31
+ onOpenChange: (open: boolean, event?: Event, reason?: import("@floating-ui/react").OpenChangeReason) => void;
32
+ events: import("@floating-ui/react").FloatingEvents;
33
+ dataRef: React.MutableRefObject<import("@floating-ui/react").ContextData>;
34
+ nodeId: string | undefined;
35
+ floatingId: string | undefined;
36
+ refs: import("@floating-ui/react").ExtendedRefs<import("@floating-ui/react").ReferenceType>;
37
+ elements: import("@floating-ui/react").ExtendedElements<import("@floating-ui/react").ReferenceType>;
38
+ };
39
+ getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
40
+ getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
41
+ getItemProps: (userProps?: Omit<React.HTMLProps<HTMLElement>, "selected" | "active"> & {
42
+ active?: boolean;
43
+ selected?: boolean;
44
+ }) => Record<string, unknown>;
45
+ withArrow: boolean;
46
+ arrowRef: import("react").MutableRefObject<SVGSVGElement | null>;
47
+ centered: boolean;
48
+ width: (number | "auto" | "0" | import("../../types/CSSUnit").CSSUnit | `calc(${string})`) | undefined;
49
+ modal: boolean | undefined;
50
+ open: boolean;
51
+ setOpen: ((open: boolean) => void) | undefined;
52
+ zIndex: number | `${number}`;
53
+ };
54
+ export { usePopover };
@@ -0,0 +1,10 @@
1
+ import { type PopoverRootProps } from "./PopoverRoot";
2
+ import { type PopoverTriggerProps } from "./PopoverTrigger";
3
+ import { type PopoverContentProps } from "./PopoverContent";
4
+ import { PopoverContext, type PopoverContextType, usePopoverContext } from "./PopoverContext";
5
+ declare const Popover: {
6
+ Root: import("react").FC<PopoverRootProps>;
7
+ Trigger: import("react").ForwardRefExoticComponent<Omit<PopoverTriggerProps, "ref"> & import("react").RefAttributes<HTMLElement>>;
8
+ Content: import("react").ForwardRefExoticComponent<Omit<PopoverContentProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
9
+ };
10
+ export { Popover, PopoverContext, usePopoverContext, type PopoverRootProps, type PopoverTriggerProps, type PopoverContentProps, type PopoverContextType, };
@@ -7,7 +7,7 @@ interface TooltipRootPropsBase {
7
7
  position?: Placement;
8
8
  width?: WidthValue;
9
9
  withArrow?: boolean;
10
- initialOpen?: boolean;
10
+ defaultOpen?: boolean;
11
11
  open?: boolean;
12
12
  onOpenChange?: (open: boolean) => void;
13
13
  zIndex?: number | `${number}`;
@@ -1,5 +1,5 @@
1
1
  import type { TooltipRootPropsBase } from "../TooltipRoot";
2
- declare const useTooltip: ({ size, position, withArrow, width, initialOpen, open: controlledOpen, onOpenChange, zIndex, }?: TooltipRootPropsBase) => {
2
+ declare const useTooltip: ({ size, position, withArrow, width, defaultOpen, open: controlledOpen, onOpenChange: setControlledOpen, 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;
@@ -48,7 +48,7 @@ declare const useTooltip: ({ size, position, withArrow, width, initialOpen, open
48
48
  centered: boolean;
49
49
  width: (number | "auto" | "0" | import("../../types/CSSUnit").CSSUnit | `calc(${string})`) | undefined;
50
50
  open: boolean;
51
- setOpen: (newOpen: boolean) => void;
51
+ setOpen: ((open: boolean) => void) | undefined;
52
52
  zIndex: number | `${number}` | undefined;
53
53
  };
54
54
  export { useTooltip };
package/dist/index.d.ts CHANGED
@@ -4,7 +4,6 @@ export * from "./Alert";
4
4
  export * from "./Avatar";
5
5
  export * from "./Badge";
6
6
  export * from "./Box";
7
- export * from "./InputText";
8
7
  export * from "./BrandIcon";
9
8
  export * from "./Button";
10
9
  export * from "./Clickable";
@@ -16,15 +15,17 @@ export * from "./FileTabs";
16
15
  export * from "./Icon";
17
16
  export * from "./IconButton";
18
17
  export * from "./InputSlider";
18
+ export * from "./InputText";
19
19
  export * from "./LoadingIndicator";
20
+ export * from "./ModalsManager";
21
+ export * from "./Popover";
22
+ export * from "./Resizable";
20
23
  export * from "./Stack";
21
24
  export * from "./Tabs";
22
25
  export * from "./Text";
23
26
  export * from "./Textarea";
24
27
  export * from "./ThemesProvider";
25
28
  export * from "./Tooltip";
26
- export * from "./ModalsManager";
27
- export * from "./Resizable";
28
29
  export * from "./Dialog";
29
30
  export * from "./VisuallyHidden";
30
31
  export * from "./utils";