@gusarov-studio/rubik-ui 3.4.0 → 3.6.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,9 @@
1
+ import React from "react";
2
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
+ import "./Avatar.scss";
4
+ interface AvatarProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root> {
5
+ size?: "32" | "40" | "48" | "56";
6
+ indicator?: React.ReactNode;
7
+ }
8
+ declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
9
+ export { Avatar, type AvatarProps };
@@ -0,0 +1,7 @@
1
+ import type React from "react";
2
+ interface AvatarContextValue {
3
+ indicator?: React.ReactNode;
4
+ }
5
+ declare const AvatarContext: React.Context<AvatarContextValue | undefined>;
6
+ declare const useAvatarContext: () => AvatarContextValue;
7
+ export { AvatarContext, type AvatarContextValue, useAvatarContext };
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
+ declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ export { AvatarFallback };
@@ -0,0 +1,4 @@
1
+ import React from "react";
2
+ import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
+ declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
4
+ export { AvatarImage };
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const AvatarIndicator: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
+ export { AvatarIndicator };
@@ -0,0 +1,3 @@
1
+ import React from "react";
2
+ declare const AvatarInfo: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
+ export { AvatarInfo };
@@ -0,0 +1,7 @@
1
+ declare const ImageLoadingStatus: {
2
+ readonly IDLE: "idle";
3
+ readonly LOADING: "loading";
4
+ readonly LOADED: "loaded";
5
+ readonly ERROR: "error";
6
+ };
7
+ export { ImageLoadingStatus };
@@ -0,0 +1,5 @@
1
+ export * from "./Avatar";
2
+ export * from "./AvatarImage";
3
+ export * from "./AvatarFallback";
4
+ export * from "./AvatarIndicator";
5
+ export * from "./AvatarInfo";
@@ -0,0 +1,3 @@
1
+ import type { ImageLoadingStatus } from "./constants";
2
+ import type { ValueOf } from "../types/ValueOf";
3
+ export type ImageLoadingStatusType = ValueOf<typeof ImageLoadingStatus>;
@@ -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
  }
@@ -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 };
@@ -1,2 +1,3 @@
1
1
  import type { ScrollDirections } from "./constants/scrollDirections";
2
- export type ScrollDirectionsType = (typeof ScrollDirections)[keyof typeof ScrollDirections];
2
+ import type { ValueOf } from "../types/ValueOf";
3
+ export type ScrollDirectionsType = ValueOf<typeof ScrollDirections>;
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import "./styles.scss";
2
2
  export * as Accordion from "./Accordion";
3
3
  export * from "./Alert";
4
+ export * from "./Avatar";
4
5
  export * from "./Badge";
5
6
  export * from "./Box";
6
7
  export * from "./InputText";
@@ -8,6 +9,7 @@ export * from "./BrandIcon";
8
9
  export * from "./Button";
9
10
  export * from "./Clickable";
10
11
  export * from "./Icon";
12
+ export * from "./IconButton";
11
13
  export * from "./InputSlider";
12
14
  export * from "./Stack";
13
15
  export * from "./Tabs";