@gusarov-studio/rubik-ui 0.1.0-rc.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/README.md +24 -0
- package/dist/Accordion/AccordionChevron.d.ts +7 -0
- package/dist/Accordion/AccordionContent.d.ts +4 -0
- package/dist/Accordion/AccordionItem.d.ts +4 -0
- package/dist/Accordion/AccordionTrigger.d.ts +5 -0
- package/dist/Accordion/Root.d.ts +3 -0
- package/dist/Accordion/index.d.ts +5 -0
- package/dist/Alert/Alert.d.ts +6 -0
- package/dist/Alert/index.d.ts +1 -0
- package/dist/Box/Box.d.ts +28 -0
- package/dist/Box/generateBreakpointClass.d.ts +2 -0
- package/dist/Box/index.d.ts +1 -0
- package/dist/BrandIcon/BrandIcon.d.ts +8 -0
- package/dist/BrandIcon/brands/Gemini.d.ts +4 -0
- package/dist/BrandIcon/brands/Google.d.ts +4 -0
- package/dist/BrandIcon/brands/OpenAI.d.ts +4 -0
- package/dist/BrandIcon/brands/index.d.ts +2 -0
- package/dist/BrandIcon/index.d.ts +1 -0
- package/dist/BrandIcon/types.d.ts +4 -0
- package/dist/Button/Button.d.ts +11 -0
- package/dist/Button/index.d.ts +1 -0
- package/dist/Icon/Icon.d.ts +8 -0
- package/dist/Icon/glyphs/Close.d.ts +4 -0
- package/dist/Icon/glyphs/CopyCheck.d.ts +4 -0
- package/dist/Icon/glyphs/Database.d.ts +4 -0
- package/dist/Icon/glyphs/Folder.d.ts +4 -0
- package/dist/Icon/glyphs/FolderTs.d.ts +4 -0
- package/dist/Icon/glyphs/Magnify.d.ts +4 -0
- package/dist/Icon/glyphs/PleChart.d.ts +4 -0
- package/dist/Icon/glyphs/Plus.d.ts +4 -0
- package/dist/Icon/glyphs/Prompt.d.ts +4 -0
- package/dist/Icon/glyphs/SidebarCollapse.d.ts +4 -0
- package/dist/Icon/glyphs/SidebarExpand.d.ts +4 -0
- package/dist/Icon/glyphs/index.d.ts +15 -0
- package/dist/Icon/index.d.ts +1 -0
- package/dist/Icon/types.d.ts +7 -0
- package/dist/Input/Input.d.ts +16 -0
- package/dist/Input/index.d.ts +1 -0
- package/dist/Stack/Stack.d.ts +11 -0
- package/dist/Stack/index.d.ts +1 -0
- package/dist/Text/Text.d.ts +15 -0
- package/dist/Text/index.d.ts +1 -0
- package/dist/ThemesProvider/ThemesProvider.d.ts +18 -0
- package/dist/ThemesProvider/index.d.ts +1 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +3 -0
- package/dist/index.js.LICENSE.txt +9 -0
- package/dist/index.js.map +1 -0
- package/dist/tsconfig.declarations.tsbuildinfo +1 -0
- package/dist/utils/cn.d.ts +3 -0
- package/dist/utils/index.d.ts +2 -0
- package/package.json +69 -0
package/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# rubik-ui
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Getting started
|
|
5
|
+
|
|
6
|
+
Project requires at least `18.20.3` Node.js version.
|
|
7
|
+
|
|
8
|
+
Install project dependencies
|
|
9
|
+
|
|
10
|
+
```shell
|
|
11
|
+
npm install
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Run local development
|
|
15
|
+
|
|
16
|
+
```shell
|
|
17
|
+
npm run storybook
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
To build library for publishing on npm
|
|
21
|
+
|
|
22
|
+
```shell
|
|
23
|
+
npm run build
|
|
24
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./AccordionChevron.scss";
|
|
3
|
+
interface ChevronProps extends React.HTMLAttributes<HTMLSpanElement> {
|
|
4
|
+
position?: "left" | "right";
|
|
5
|
+
}
|
|
6
|
+
declare const AccordionChevron: React.ForwardRefExoticComponent<ChevronProps & React.RefAttributes<HTMLSpanElement>>;
|
|
7
|
+
export { AccordionChevron };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
|
+
declare const AccordionContent: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export { AccordionContent };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
|
+
declare const AccordionItem: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export { AccordionItem };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
3
|
+
import "./AccordionTrigger.scss";
|
|
4
|
+
declare const AccordionTrigger: React.ForwardRefExoticComponent<Omit<AccordionPrimitive.AccordionTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
export { AccordionTrigger };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
2
|
+
declare const Root: import("react").ForwardRefExoticComponent<(AccordionPrimitive.AccordionSingleProps | AccordionPrimitive.AccordionMultipleProps) & import("react").RefAttributes<HTMLDivElement>>;
|
|
3
|
+
export { Root };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Alert";
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Box.scss";
|
|
3
|
+
type SpacingValue = "spacing-none" | "spacing-xxs" | "spacing-xs" | "spacing-sm" | "spacing-md" | "spacing-lg" | "spacing-xl" | "spacing-2xl" | "spacing-3xl" | "spacing-4xl" | "spacing-5xl" | "spacing-6xl" | "spacing-7xl" | "spacing-8xl" | "spacing-9xl" | "spacing-10xl" | "spacing-11xl";
|
|
4
|
+
interface SpacingProps {
|
|
5
|
+
margin?: SpacingValue;
|
|
6
|
+
marginTop?: SpacingValue;
|
|
7
|
+
marginRight?: SpacingValue;
|
|
8
|
+
marginBottom?: SpacingValue;
|
|
9
|
+
marginLeft?: SpacingValue;
|
|
10
|
+
padding?: SpacingValue;
|
|
11
|
+
paddingTop?: SpacingValue;
|
|
12
|
+
paddingRight?: SpacingValue;
|
|
13
|
+
paddingBottom?: SpacingValue;
|
|
14
|
+
paddingLeft?: SpacingValue;
|
|
15
|
+
}
|
|
16
|
+
interface BoxProps extends React.PropsWithChildren, SpacingProps {
|
|
17
|
+
className?: string;
|
|
18
|
+
breakpoints?: {
|
|
19
|
+
xs?: SpacingProps;
|
|
20
|
+
sm?: SpacingProps;
|
|
21
|
+
md?: SpacingProps;
|
|
22
|
+
lg?: SpacingProps;
|
|
23
|
+
xl?: SpacingProps;
|
|
24
|
+
xxl?: SpacingProps;
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
declare const Box: React.ForwardRefExoticComponent<BoxProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
export { Box };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Box";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { BrandGlyph } from "./types";
|
|
3
|
+
interface BrandIconProps extends Omit<BrandGlyph, "size"> {
|
|
4
|
+
glyph: string;
|
|
5
|
+
size?: number | string;
|
|
6
|
+
}
|
|
7
|
+
declare const BrandIcon: React.ForwardRefExoticComponent<BrandIconProps & React.RefAttributes<SVGSVGElement>>;
|
|
8
|
+
export { BrandIcon };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./BrandIcon";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Button.scss";
|
|
3
|
+
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
variant?: "accent" | "primary" | "danger" | "outline-accent" | "outline-primary" | "outline-danger" | "ghost-accent" | "ghost-primary" | "ghost-danger" | "text-accent" | "text-primary" | "text-danger";
|
|
5
|
+
size?: "32" | "36" | "40" | "44" | "48" | "56";
|
|
6
|
+
fullWidth?: boolean;
|
|
7
|
+
asChild?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { Button };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Button";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { GlyphProps } from "./types";
|
|
3
|
+
interface IconProps extends Omit<GlyphProps, "size"> {
|
|
4
|
+
glyph: string;
|
|
5
|
+
size?: string | number;
|
|
6
|
+
}
|
|
7
|
+
declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
|
|
8
|
+
export { Icon };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const glyphs: {
|
|
2
|
+
prompt: import("react").ForwardRefExoticComponent<import("../types").GlyphProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
3
|
+
folder: import("react").ForwardRefExoticComponent<import("../types").GlyphProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
4
|
+
"sidebar-collapse": import("react").ForwardRefExoticComponent<import("../types").GlyphProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
5
|
+
"sidebar-expand": import("react").ForwardRefExoticComponent<import("../types").GlyphProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
6
|
+
"ple-chart": import("react").ForwardRefExoticComponent<import("../types").GlyphProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
7
|
+
close: import("react").ForwardRefExoticComponent<import("../types").GlyphProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
8
|
+
magnify: import("react").ForwardRefExoticComponent<import("../types").GlyphProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
9
|
+
plus: import("react").ForwardRefExoticComponent<import("../types").GlyphProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
10
|
+
database: import("react").ForwardRefExoticComponent<import("../types").GlyphProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
11
|
+
"folder-ts": import("react").ForwardRefExoticComponent<import("../types").GlyphProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
12
|
+
"copy-check": import("react").ForwardRefExoticComponent<import("../types").GlyphProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
13
|
+
};
|
|
14
|
+
declare function getGlyph(glyph: string): import("react").ForwardRefExoticComponent<import("../types").GlyphProps & import("react").RefAttributes<SVGSVGElement>>;
|
|
15
|
+
export { getGlyph };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Icon";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Input.scss";
|
|
3
|
+
declare const Input: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLInputElement> & {
|
|
4
|
+
size?: "xd" | "sm" | "lg" | "xl";
|
|
5
|
+
className?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
invalid?: boolean;
|
|
9
|
+
prefix?: React.ReactNode;
|
|
10
|
+
suffix?: React.ReactNode;
|
|
11
|
+
internalPrefix?: React.ReactNode;
|
|
12
|
+
internalSuffix?: React.ReactNode;
|
|
13
|
+
id?: string;
|
|
14
|
+
type?: React.HTMLInputTypeAttribute;
|
|
15
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
16
|
+
export { Input };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Input";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./index.scss";
|
|
3
|
+
type Gap = "none" | "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl" | "7xl" | "8xl" | "9xl" | "10xl" | "11xl";
|
|
4
|
+
interface StackProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
5
|
+
gap: Gap;
|
|
6
|
+
direction?: "horizontal" | "vertical";
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Stack: React.ForwardRefExoticComponent<StackProps & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { Stack };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Stack";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./Text.scss";
|
|
3
|
+
type TextElement = HTMLSpanElement | HTMLHeadingElement | HTMLLabelElement;
|
|
4
|
+
interface TextProps extends React.HTMLAttributes<TextElement> {
|
|
5
|
+
as?: React.ElementType;
|
|
6
|
+
className?: string;
|
|
7
|
+
htmlFor?: string;
|
|
8
|
+
block?: boolean;
|
|
9
|
+
truncate?: boolean;
|
|
10
|
+
size?: "regular-xxs" | "regular-xs" | "regular-sm" | "regular-md" | "regular-lg" | "regular-xl";
|
|
11
|
+
weight?: "regular" | "medium" | "semibold" | "bold";
|
|
12
|
+
appearance?: "default" | "error" | "inherit" | "white";
|
|
13
|
+
}
|
|
14
|
+
declare const Text: React.ForwardRefExoticComponent<TextProps & React.RefAttributes<TextElement>>;
|
|
15
|
+
export { Text };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Text";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const defaultThemes: {
|
|
3
|
+
light: string;
|
|
4
|
+
dark: string;
|
|
5
|
+
};
|
|
6
|
+
interface ThemesContext {
|
|
7
|
+
currentTheme: string;
|
|
8
|
+
invertedTheme: string;
|
|
9
|
+
toggleTheme: () => void;
|
|
10
|
+
setTheme: (newTheme: string) => void;
|
|
11
|
+
themes: typeof defaultThemes;
|
|
12
|
+
}
|
|
13
|
+
type ThemesProviderProps = React.PropsWithChildren<{
|
|
14
|
+
defaultTheme?: string;
|
|
15
|
+
}>;
|
|
16
|
+
declare const ThemesContext: React.Context<ThemesContext>;
|
|
17
|
+
declare function ThemesProvider(props: ThemesProviderProps): React.JSX.Element;
|
|
18
|
+
export { ThemesContext, ThemesProvider };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./ThemesProvider";
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import "./styles.scss";
|
|
2
|
+
export * as Accordion from "./Accordion";
|
|
3
|
+
export * from "./Alert";
|
|
4
|
+
export * from "./Box";
|
|
5
|
+
export * from "./BrandIcon";
|
|
6
|
+
export * from "./Button";
|
|
7
|
+
export * from "./Icon";
|
|
8
|
+
export * from "./Input";
|
|
9
|
+
export * from "./Stack";
|
|
10
|
+
export * from "./Text";
|
|
11
|
+
export * from "./ThemesProvider";
|
|
12
|
+
export * from "./utils";
|