@gamecrafters/base-ui 0.0.23 → 0.0.24

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,7 +1,7 @@
1
1
  import * as React from "react";
2
2
  import type { AvatarShape } from "./Avatar.types";
3
3
  export declare const DEFAULT_AVATAR_SIZE = 20;
4
- declare const _default: <As extends React.ElementType = "img">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "img" : As> & {
4
+ declare const _default: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "span" : As> & {
5
5
  size?: import("./Avatar.types").AvatarSize;
6
6
  shape?: AvatarShape;
7
7
  className?: string;
@@ -4,7 +4,7 @@ import type { PolymorphicProps } from "../../utilities/polymorphic";
4
4
  export type AvatarSize = number | ResponsiveValue<number>;
5
5
  export type AvatarShape = "circle" | "square";
6
6
  export type AvatarLoadingStatus = "idle" | "loading" | "loaded" | "error";
7
- export type AvatarProps<As extends React.ElementType = "img"> = PolymorphicProps<As, "img", {
7
+ export type AvatarProps<As extends React.ElementType = "span"> = PolymorphicProps<As, "span", {
8
8
  size?: AvatarSize;
9
9
  shape?: AvatarShape;
10
10
  className?: string;
@@ -1,7 +1,7 @@
1
1
  import { DEFAULT_AVATAR_SIZE } from "./Avatar";
2
2
  import AvatarFallback from "./AvatarFallback";
3
3
  import AvatarImage from "./AvatarImage";
4
- export declare const Avatar: (<As extends React.ElementType = "img">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "img" : As> & {
4
+ export declare const Avatar: (<As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<import("react").ComponentPropsWithRef<import("react").ElementType extends As ? "span" : As> & {
5
5
  size?: import("./Avatar.types").AvatarSize;
6
6
  shape?: import("./Avatar.types").AvatarShape;
7
7
  className?: string;
@@ -1,14 +1,15 @@
1
1
  import * as React from "react";
2
2
  import type { AvatarShape, AvatarSize } from "../avatar/Avatar.types";
3
- import type { AvatarStackAlign, AvatarStackVariant } from "./AvatarStack.types";
4
- declare const _default: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<React.ComponentPropsWithRef<React.ElementType extends As ? "span" : As> & {
3
+ import type { AvatarStackAlign, AvatarStackChild, AvatarStackVariant } from "./AvatarStack.types";
4
+ declare const _default: <As extends React.ElementType = "span">(props: import("../../utilities/polymorphic").DistributiveOmit<import("../../utilities/polymorphic").PolymorphicProps<As, "span", {
5
5
  variant?: AvatarStackVariant;
6
6
  shape?: AvatarShape;
7
7
  size?: AvatarSize;
8
8
  align?: AvatarStackAlign;
9
9
  disableExpand?: boolean;
10
10
  className?: string;
11
- }, "as"> & {
11
+ }>, "as" | "children"> & {
12
12
  as?: As | undefined;
13
+ children?: AvatarStackChild | AvatarStackChild[];
13
14
  } & React.RefAttributes<any>) => React.ReactNode;
14
15
  export default _default;
@@ -1,13 +1,17 @@
1
1
  import type * as React from "react";
2
- import type { AvatarShape, AvatarSize } from "../avatar/Avatar.types";
3
- import type { PolymorphicProps } from "../../utilities/polymorphic";
2
+ import type { AvatarProps, AvatarShape, AvatarSize } from "../avatar/Avatar.types";
3
+ import type { DistributiveOmit, PolymorphicProps } from "../../utilities/polymorphic";
4
4
  export type AvatarStackVariant = "cascade" | "stack";
5
5
  export type AvatarStackAlign = "left" | "right";
6
- export type AvatarStackProps<As extends React.ElementType = "span"> = PolymorphicProps<As, "span", {
6
+ export type AvatarStackChild = React.ReactElement<AvatarProps>;
7
+ export type AvatarStackProps<As extends React.ElementType = "span"> = DistributiveOmit<PolymorphicProps<As, "span", {
7
8
  variant?: AvatarStackVariant;
8
9
  shape?: AvatarShape;
9
10
  size?: AvatarSize;
10
11
  align?: AvatarStackAlign;
11
12
  disableExpand?: boolean;
12
13
  className?: string;
13
- }>;
14
+ }>, "as" | "children"> & {
15
+ as?: As;
16
+ children?: AvatarStackChild | AvatarStackChild[];
17
+ };