@gusarov-studio/rubik-ui 9.4.6 → 10.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,9 +1,10 @@
1
1
  import React from "react";
2
2
  import "./Button.scss";
3
+ type ButtonSize = 16 | 20 | 24 | 28 | 32 | 36 | 40 | 44 | 48 | 56;
3
4
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
5
  appearance?: "fill" | "outline" | "ghost" | "text";
5
6
  variant?: "accent" | "primary" | "secondary" | "success" | "danger" | "warning";
6
- size?: "16" | "20" | "24" | "28" | "32" | "36" | "40" | "44" | "48" | "56";
7
+ size?: ButtonSize | `${ButtonSize}`;
7
8
  shape?: "rectangle" | "rounded" | "pill";
8
9
  fullWidth?: boolean;
9
10
  asChild?: boolean;
@@ -1,10 +1,11 @@
1
1
  import React from "react";
2
- import type { GlyphProps } from "./types";
2
+ import type { Color } from "../types/Color";
3
+ import type { GlyphProps, NamedColor } from "./types";
3
4
  import { type IconGlyph } from "./glyphs";
4
5
  import "./Icon.scss";
5
6
  interface IconProps extends GlyphProps {
6
7
  glyph: IconGlyph;
7
- variant?: "inherit" | "primary" | "secondary" | "accent" | "success" | "danger" | "info" | "warning" | "disabled" | "white" | "black" | "placeholder";
8
+ color?: NamedColor | Color;
8
9
  }
9
10
  declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
10
11
  export { Icon, type IconGlyph, type IconProps };
@@ -0,0 +1,2 @@
1
+ import { namedColors } from "./namedColors";
2
+ export { namedColors };
@@ -0,0 +1,2 @@
1
+ declare const namedColors: readonly ["inherit", "primary", "secondary", "accent", "success", "danger", "info", "warning", "disabled", "white", "black", "muted"];
2
+ export { namedColors };
@@ -1,6 +1,9 @@
1
1
  import type React from "react";
2
- export interface GlyphProps extends React.SVGAttributes<SVGElement> {
2
+ import type { namedColors } from "./constants";
3
+ interface GlyphProps extends React.SVGAttributes<SVGElement> {
3
4
  children?: never;
4
5
  strokeWidth?: string | number;
5
6
  size?: string | number;
6
7
  }
8
+ type NamedColor = (typeof namedColors)[number];
9
+ export type { GlyphProps, NamedColor };