@gusarov-studio/rubik-ui 3.5.0 → 3.7.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.
@@ -2,5 +2,5 @@ import type React from "react";
2
2
  export interface BrandIconGlyphProps extends React.SVGAttributes<SVGElement> {
3
3
  children?: never;
4
4
  variant?: "branded" | "solid";
5
- size?: number;
5
+ size?: string | number;
6
6
  }
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import "./Button.scss";
3
- export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
3
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
4
  variant?: "accent" | "primary" | "danger" | "outline-accent" | "outline-primary" | "outline-danger" | "ghost-accent" | "ghost-primary" | "ghost-danger" | "text-accent" | "text-primary" | "text-danger";
5
5
  size?: "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "56";
6
6
  shape?: "rectangle" | "rounded" | "pill";
@@ -9,4 +9,4 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
9
9
  disabled?: boolean;
10
10
  }
11
11
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
12
- export { Button };
12
+ export { Button, type ButtonProps };
@@ -0,0 +1,20 @@
1
+ import React from "react";
2
+ import "./IconButton.scss";
3
+ import type { IconGlyph } from "../Icon";
4
+ import type { BrandIconGlyph } from "../BrandIcon";
5
+ interface IconButtonPropsBase extends React.ButtonHTMLAttributes<HTMLButtonElement> {
6
+ variant?: "accent" | "primary" | "secondary" | "branded";
7
+ size?: "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "56";
8
+ disabled?: boolean;
9
+ }
10
+ interface StrokeIcons {
11
+ iconSet: "stroke-icons";
12
+ glyph: IconGlyph;
13
+ }
14
+ interface BrandIcons {
15
+ iconSet: "brand-icons";
16
+ glyph: BrandIconGlyph;
17
+ }
18
+ type IconButtonProps = IconButtonPropsBase & (StrokeIcons | BrandIcons);
19
+ declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
20
+ export { IconButton, type IconButtonProps };
@@ -0,0 +1,3 @@
1
+ declare const STROKE_ICON_SET = "stroke-icons";
2
+ declare const BRAND_ICON_SET = "brand-icons";
3
+ export { STROKE_ICON_SET, BRAND_ICON_SET };
@@ -0,0 +1 @@
1
+ export * from "./IconButton";
@@ -0,0 +1,2 @@
1
+ declare const variantsMapper: Record<string, "solid" | "branded" | undefined>;
2
+ export { variantsMapper };
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ export * from "./BrandIcon";
9
9
  export * from "./Button";
10
10
  export * from "./Clickable";
11
11
  export * from "./Icon";
12
+ export * from "./IconButton";
12
13
  export * from "./InputSlider";
13
14
  export * from "./Stack";
14
15
  export * from "./Tabs";