@gusarov-studio/rubik-ui 4.1.0 → 4.3.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.
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { type DecorationPattern } from "./decorations";
3
+ import type { DecorationPatternProps } from "./decorations/types";
4
+ interface DecorationProps extends DecorationPatternProps {
5
+ type: DecorationPattern;
6
+ }
7
+ declare const Decoration: React.ForwardRefExoticComponent<DecorationProps & React.RefAttributes<SVGSVGElement>>;
8
+ export { Decoration, type DecorationPattern };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { Close } from "@radix-ui/react-dialog";
3
+ type DialogCloseProps = React.ComponentPropsWithoutRef<typeof Close>;
4
+ declare const DialogClose: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
5
+ export { DialogClose, type DialogCloseProps };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Content } from "@radix-ui/react-dialog";
3
+ interface DialogContentProps extends React.ComponentPropsWithoutRef<typeof Content> {
4
+ overlay?: boolean;
5
+ width?: React.CSSProperties["maxWidth"];
6
+ }
7
+ declare const DialogContent: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;
8
+ export { DialogContent, type DialogContentProps };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { type DecorationPattern } from "./Decoration";
3
+ interface DialogDecorationProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ type: DecorationPattern;
5
+ align?: "left" | "center";
6
+ }
7
+ declare const DialogDecoration: React.ForwardRefExoticComponent<DialogDecorationProps & React.RefAttributes<HTMLDivElement>>;
8
+ export { DialogDecoration, type DialogDecorationProps };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { Description } from "@radix-ui/react-dialog";
3
+ type DialogDescriptionProps = React.ComponentPropsWithoutRef<typeof Description>;
4
+ declare const DialogDescription: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
5
+ export { DialogDescription, type DialogDescriptionProps };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface DialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ align?: "left" | "center" | "right";
4
+ spacing?: boolean;
5
+ }
6
+ declare const DialogFooter: React.ForwardRefExoticComponent<DialogFooterProps & React.RefAttributes<HTMLDivElement>>;
7
+ export { DialogFooter, type DialogFooterProps };
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface DialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ align?: "left" | "center";
4
+ spacing?: boolean;
5
+ }
6
+ declare const DialogHeader: React.ForwardRefExoticComponent<DialogHeaderProps & React.RefAttributes<HTMLDivElement>>;
7
+ export { DialogHeader, type DialogHeaderProps };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { Overlay } from "@radix-ui/react-dialog";
3
+ type DialogOverlayProps = React.ComponentPropsWithoutRef<typeof Overlay>;
4
+ declare const DialogOverlay: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogOverlayProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
5
+ export { DialogOverlay, type DialogOverlayProps };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { Title } from "@radix-ui/react-dialog";
3
+ type DialogTitleProps = React.ComponentPropsWithoutRef<typeof Title>;
4
+ declare const DialogTitle: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
5
+ export { DialogTitle, type DialogTitleProps };
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { DecorationPatternProps } from "./types";
3
+ declare const CirclePattern: React.ForwardRefExoticComponent<DecorationPatternProps & React.RefAttributes<SVGSVGElement>>;
4
+ export { CirclePattern };
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { DecorationPatternProps } from "./types";
3
+ declare const DiagonalPattern: React.ForwardRefExoticComponent<DecorationPatternProps & React.RefAttributes<SVGSVGElement>>;
4
+ export { DiagonalPattern };
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { DecorationPatternProps } from "./types";
3
+ declare const DotPattern: React.ForwardRefExoticComponent<DecorationPatternProps & React.RefAttributes<SVGSVGElement>>;
4
+ export { DotPattern };
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import type { DecorationPatternProps } from "./types";
3
+ declare const GridPattern: React.ForwardRefExoticComponent<DecorationPatternProps & React.RefAttributes<SVGSVGElement>>;
4
+ export { GridPattern };
@@ -0,0 +1,9 @@
1
+ declare const decorations: {
2
+ circles: import("react").ForwardRefExoticComponent<import("./types").DecorationPatternProps & import("react").RefAttributes<SVGSVGElement>>;
3
+ grid: import("react").ForwardRefExoticComponent<import("./types").DecorationPatternProps & import("react").RefAttributes<SVGSVGElement>>;
4
+ dots: import("react").ForwardRefExoticComponent<import("./types").DecorationPatternProps & import("react").RefAttributes<SVGSVGElement>>;
5
+ diagonal: import("react").ForwardRefExoticComponent<import("./types").DecorationPatternProps & import("react").RefAttributes<SVGSVGElement>>;
6
+ };
7
+ type DecorationPattern = keyof typeof decorations;
8
+ declare function getDecoration(glyph: string): import("react").ForwardRefExoticComponent<import("./types").DecorationPatternProps & import("react").RefAttributes<SVGSVGElement>>;
9
+ export { getDecoration, type DecorationPattern };
@@ -0,0 +1,5 @@
1
+ import type React from "react";
2
+ export interface DecorationPatternProps extends React.SVGAttributes<SVGElement> {
3
+ children?: never;
4
+ size?: string | number;
5
+ }
@@ -0,0 +1,9 @@
1
+ import "./Dialog.scss";
2
+ export { Root as Dialog, Trigger as DialogTrigger, type DialogProps, type DialogTriggerProps, } from "@radix-ui/react-dialog";
3
+ export * from "./DialogContent";
4
+ export * from "./DialogDescription";
5
+ export * from "./DialogTitle";
6
+ export * from "./DialogDecoration";
7
+ export * from "./DialogFooter";
8
+ export * from "./DialogClose";
9
+ export * from "./DialogHeader";
@@ -3,6 +3,7 @@ import type { Placement } from "@floating-ui/react";
3
3
  import type { CSSUnit } from "../types/CSSUnit";
4
4
  type WidthValue = CSSUnit | "0" | `calc(${string})` | number | "auto";
5
5
  interface TooltipPropsBase {
6
+ size?: "24" | "32" | "36" | "44";
6
7
  position?: Placement;
7
8
  width?: WidthValue;
8
9
  withArrow?: boolean;
@@ -44,6 +44,7 @@ declare const useTooltipContext: () => {
44
44
  active?: boolean;
45
45
  selected?: boolean;
46
46
  }) => Record<string, unknown>;
47
+ size: "24" | "32" | "36" | "44";
47
48
  withArrow: boolean;
48
49
  arrowRef: import("react").MutableRefObject<SVGSVGElement | null>;
49
50
  centered: boolean;
@@ -1,5 +1,5 @@
1
1
  import type { TooltipPropsBase } from "../Tooltip";
2
- declare function useTooltip(props?: TooltipPropsBase): {
2
+ declare const useTooltip: ({ size, position, withArrow, width, initialOpen, open: controlledOpen, onOpenChange, }?: TooltipPropsBase) => {
3
3
  placement: import("@floating-ui/utils").Placement;
4
4
  strategy: import("@floating-ui/utils").Strategy;
5
5
  middlewareData: import("@floating-ui/core").MiddlewareData;
@@ -42,6 +42,7 @@ declare function useTooltip(props?: TooltipPropsBase): {
42
42
  active?: boolean;
43
43
  selected?: boolean;
44
44
  }) => Record<string, unknown>;
45
+ size: "24" | "32" | "36" | "44";
45
46
  withArrow: boolean;
46
47
  arrowRef: import("react").MutableRefObject<SVGSVGElement | null>;
47
48
  centered: boolean;
@@ -0,0 +1,7 @@
1
+ declare const heightMapper: {
2
+ "24": number;
3
+ "32": number;
4
+ "36": number;
5
+ "44": number;
6
+ };
7
+ export { heightMapper };
@@ -0,0 +1,3 @@
1
+ import { heightMapper } from "./heightMapper";
2
+ import { widthMapper } from "./widthMapper";
3
+ export { heightMapper, widthMapper };
@@ -0,0 +1,7 @@
1
+ declare const widthMapper: {
2
+ "24": number;
3
+ "32": number;
4
+ "36": number;
5
+ "44": number;
6
+ };
7
+ export { widthMapper };
@@ -0,0 +1 @@
1
+ export { VisuallyHidden, type VisuallyHiddenProps } from "@radix-ui/react-visually-hidden";
package/dist/index.d.ts CHANGED
@@ -24,4 +24,6 @@ export * from "./ThemesProvider";
24
24
  export * from "./Tooltip";
25
25
  export * from "./ModalsManager";
26
26
  export * from "./Resizable";
27
+ export * from "./Dialog";
28
+ export * from "./VisuallyHidden";
27
29
  export * from "./utils";