@gusarov-studio/rubik-ui 28.3.0 → 29.1.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,8 +1,8 @@
1
1
  import React from "react";
2
2
  import "./Alert.scss";
3
3
  interface AlertProps extends React.HTMLAttributes<HTMLDivElement> {
4
- appearance?: "app-level" | "standard" | "inline";
5
- variant?: "success" | "danger" | "warning" | "info";
4
+ appearance?: "solid" | "subtle" | "soft";
5
+ variant?: "primary" | "secondary" | "accent" | "success" | "danger" | "warning" | "white" | "black";
6
6
  onClose?: (event: React.MouseEvent) => void;
7
7
  icon?: React.ReactNode;
8
8
  }
@@ -3,4 +3,4 @@ interface AlertDescriptionProps extends React.HTMLAttributes<HTMLParagraphElemen
3
3
  asChild?: boolean;
4
4
  }
5
5
  declare const AlertDescription: React.ForwardRefExoticComponent<AlertDescriptionProps & React.RefAttributes<HTMLParagraphElement>>;
6
- export { AlertDescription };
6
+ export { AlertDescription, type AlertDescriptionProps };
@@ -3,4 +3,4 @@ interface AlertTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {
3
3
  asChild?: boolean;
4
4
  }
5
5
  declare const AlertTitle: React.ForwardRefExoticComponent<AlertTitleProps & React.RefAttributes<HTMLHeadingElement>>;
6
- export { AlertTitle };
6
+ export { AlertTitle, type AlertTitleProps };
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ type CommandDividerProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Separator>;
4
+ declare const CommandDivider: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
5
+ ref?: React.Ref<HTMLDivElement>;
6
+ } & {
7
+ asChild?: boolean;
8
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
9
+ alwaysRender?: boolean;
10
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ export { CommandDivider, type CommandDividerProps };
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ type CommandEmptyProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Empty>;
4
+ declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
5
+ children?: React.ReactNode;
6
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
7
+ ref?: React.Ref<HTMLDivElement>;
8
+ } & {
9
+ asChild?: boolean;
10
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ export { CommandEmpty, type CommandEmptyProps };
@@ -0,0 +1,15 @@
1
+ import React from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ type CommandGroupProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.Group>;
4
+ declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
5
+ children?: React.ReactNode;
6
+ } & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
7
+ ref?: React.Ref<HTMLDivElement>;
8
+ } & {
9
+ asChild?: boolean;
10
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
11
+ heading?: React.ReactNode;
12
+ value?: string;
13
+ forceMount?: boolean;
14
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ export { CommandGroup, type CommandGroupProps };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ interface CommandInputProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>, "prefix"> {
4
+ prefix?: React.ReactNode;
5
+ suffix?: React.ReactNode;
6
+ }
7
+ declare const CommandInput: React.ForwardRefExoticComponent<CommandInputProps & React.RefAttributes<HTMLInputElement>>;
8
+ export { CommandInput, type CommandInputProps };
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ interface CommandItemProps extends Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Item>, "asChild" | "prefix"> {
4
+ prefix?: React.ReactNode;
5
+ suffix?: React.ReactNode;
6
+ }
7
+ declare const CommandItem: React.ForwardRefExoticComponent<CommandItemProps & React.RefAttributes<HTMLDivElement>>;
8
+ export { CommandItem, type CommandItemProps };
@@ -0,0 +1,13 @@
1
+ import React from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ type CommandListProps = React.ComponentPropsWithoutRef<typeof CommandPrimitive.List>;
4
+ declare const CommandList: React.ForwardRefExoticComponent<Omit<{
5
+ children?: React.ReactNode;
6
+ } & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
7
+ ref?: React.Ref<HTMLDivElement>;
8
+ } & {
9
+ asChild?: boolean;
10
+ }, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
11
+ label?: string;
12
+ } & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ export { CommandList, type CommandListProps };
@@ -0,0 +1,12 @@
1
+ import React from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ import "./Command.scss";
4
+ type CommandSize = 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 56;
5
+ interface CommandRootProps extends React.ComponentPropsWithoutRef<typeof CommandPrimitive> {
6
+ appearance?: "default" | "compact";
7
+ size?: CommandSize | `${CommandSize}`;
8
+ shape?: "rectangle" | "rounded";
9
+ width?: React.CSSProperties["maxWidth"];
10
+ }
11
+ declare const CommandRoot: React.ForwardRefExoticComponent<CommandRootProps & React.RefAttributes<HTMLDivElement>>;
12
+ export { CommandRoot, type CommandRootProps };
@@ -0,0 +1,47 @@
1
+ import { type CommandRootProps } from "./CommandRoot";
2
+ import { type CommandInputProps } from "./CommandInput";
3
+ import { type CommandListProps } from "./CommandList";
4
+ import { type CommandEmptyProps } from "./CommandEmpty";
5
+ import { type CommandGroupProps } from "./CommandGroup";
6
+ import { type CommandItemProps } from "./CommandItem";
7
+ import { type CommandDividerProps } from "./CommandDivider";
8
+ declare const Command: {
9
+ Root: import("react").ForwardRefExoticComponent<CommandRootProps & import("react").RefAttributes<HTMLDivElement>>;
10
+ Input: import("react").ForwardRefExoticComponent<CommandInputProps & import("react").RefAttributes<HTMLInputElement>>;
11
+ List: import("react").ForwardRefExoticComponent<Omit<{
12
+ children?: React.ReactNode;
13
+ } & Pick<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
14
+ ref?: React.Ref<HTMLDivElement>;
15
+ } & {
16
+ asChild?: boolean;
17
+ }, "key" | keyof import("react").HTMLAttributes<HTMLDivElement> | "asChild"> & {
18
+ label?: string;
19
+ } & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
20
+ Empty: import("react").ForwardRefExoticComponent<Omit<{
21
+ children?: React.ReactNode;
22
+ } & Pick<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
23
+ ref?: React.Ref<HTMLDivElement>;
24
+ } & {
25
+ asChild?: boolean;
26
+ }, "key" | keyof import("react").HTMLAttributes<HTMLDivElement> | "asChild"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
27
+ Group: import("react").ForwardRefExoticComponent<Omit<{
28
+ children?: React.ReactNode;
29
+ } & Omit<Pick<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
30
+ ref?: React.Ref<HTMLDivElement>;
31
+ } & {
32
+ asChild?: boolean;
33
+ }, "key" | keyof import("react").HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
34
+ heading?: React.ReactNode;
35
+ value?: string;
36
+ forceMount?: boolean;
37
+ } & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
38
+ Item: import("react").ForwardRefExoticComponent<CommandItemProps & import("react").RefAttributes<HTMLDivElement>>;
39
+ Divider: import("react").ForwardRefExoticComponent<Omit<Pick<Pick<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof import("react").HTMLAttributes<HTMLDivElement>> & {
40
+ ref?: React.Ref<HTMLDivElement>;
41
+ } & {
42
+ asChild?: boolean;
43
+ }, "key" | keyof import("react").HTMLAttributes<HTMLDivElement> | "asChild"> & {
44
+ alwaysRender?: boolean;
45
+ } & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
46
+ };
47
+ export { Command, type CommandRootProps, type CommandInputProps, type CommandListProps, type CommandEmptyProps, type CommandGroupProps, type CommandItemProps, type CommandDividerProps, };
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import { Arrow } from "@radix-ui/react-popover";
3
+ type PopoverArrowProps = React.ComponentPropsWithoutRef<typeof Arrow>;
4
+ declare const PopoverArrow: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-popover").PopoverArrowProps & React.RefAttributes<SVGSVGElement>, "ref"> & React.RefAttributes<SVGSVGElement>>;
5
+ export { PopoverArrow, type PopoverArrowProps };
@@ -1,11 +1,8 @@
1
1
  import React from "react";
2
2
  import { Content } from "@radix-ui/react-popover";
3
- import type { CSSUnit } from "../types/CSSUnit";
4
3
  import "./Popover.scss";
5
- type WidthValue = CSSUnit | "0" | `calc(${string})` | number | "auto";
6
4
  interface PopoverContentProps extends React.ComponentPropsWithoutRef<typeof Content> {
7
- arrow?: boolean;
8
- width?: WidthValue;
5
+ width?: React.CSSProperties["width"];
9
6
  }
10
7
  declare const PopoverContent: React.ForwardRefExoticComponent<PopoverContentProps & React.RefAttributes<HTMLDivElement>>;
11
8
  export { PopoverContent, type PopoverContentProps };
@@ -2,10 +2,12 @@ import { type PopoverTriggerProps } from "@radix-ui/react-popover";
2
2
  import { type PopoverRootProps } from "./PopoverRoot";
3
3
  import { type PopoverContentProps } from "./PopoverContent";
4
4
  import { type PopoverCloseProps } from "./PopoverClose";
5
+ import { type PopoverArrowProps } from "./PopoverArrow";
5
6
  declare const Popover: {
6
7
  Root: import("react").FC<PopoverRootProps>;
7
8
  Trigger: import("react").ForwardRefExoticComponent<PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
8
9
  Content: import("react").ForwardRefExoticComponent<PopoverContentProps & import("react").RefAttributes<HTMLDivElement>>;
9
10
  Close: import("react").ForwardRefExoticComponent<PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
11
+ Arrow: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-popover").PopoverArrowProps & import("react").RefAttributes<SVGSVGElement>, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
10
12
  };
11
- export { Popover, type PopoverRootProps, type PopoverTriggerProps, type PopoverContentProps, type PopoverCloseProps, };
13
+ export { Popover, type PopoverRootProps, type PopoverTriggerProps, type PopoverContentProps, type PopoverCloseProps, type PopoverArrowProps, };
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export * from "./BrandIcon";
9
9
  export * from "./Button";
10
10
  export * from "./ButtonGroup";
11
11
  export * from "./Clickable";
12
+ export * from "./Command";
12
13
  export * from "./ContextMenu";
13
14
  export * from "./Dropdown";
14
15
  export * from "./FeatureIcon";