@hanzogui/avatar 2.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.
@@ -0,0 +1,105 @@
1
+ import type { GetProps, SizeTokens, GuiElement } from '@gui/core';
2
+ import type { Scope } from '@gui/create-context';
3
+ import type { ImageProps } from '@gui/image';
4
+ import * as React from 'react';
5
+ declare const createAvatarScope: import("@gui/create-context").CreateScope;
6
+ type ImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';
7
+ type AvatarImageProps = Partial<ImageProps> & {
8
+ onLoadingStatusChange?: (status: ImageLoadingStatus) => void;
9
+ };
10
+ declare const AvatarImage: React.ForwardRefExoticComponent<Partial<ImageProps> & {
11
+ onLoadingStatusChange?: (status: ImageLoadingStatus) => void;
12
+ } & React.RefAttributes<GuiElement>>;
13
+ export declare const AvatarFallbackFrame: import("@gui/core").GuiComponent<import("@gui/core").TamaDefer, GuiElement, import("@gui/core").RNGuiViewNonStyleProps, import("@gui/core").StackStyleBase, {
14
+ elevation?: number | SizeTokens | undefined;
15
+ fullscreen?: boolean | undefined;
16
+ }, import("@gui/core").StaticConfigPublic>;
17
+ type AvatarFallbackExtraProps = {
18
+ delayMs?: number;
19
+ };
20
+ type AvatarFallbackProps = GetProps<typeof AvatarFallbackFrame> & AvatarFallbackExtraProps;
21
+ declare const AvatarFallback: import("@gui/core").GuiComponent<Omit<import("@gui/core").GetFinalProps<import("@gui/core").RNGuiViewNonStyleProps, import("@gui/core").StackStyleBase, {
22
+ elevation?: number | SizeTokens | undefined;
23
+ fullscreen?: boolean | undefined;
24
+ }>, "delayMs" | "__scopeAvatar"> & AvatarFallbackExtraProps & {
25
+ __scopeAvatar?: Scope;
26
+ }, GuiElement, import("@gui/core").RNGuiViewNonStyleProps & AvatarFallbackExtraProps & {
27
+ __scopeAvatar?: Scope;
28
+ }, import("@gui/core").StackStyleBase, {
29
+ elevation?: number | SizeTokens | undefined;
30
+ fullscreen?: boolean | undefined;
31
+ }, import("@gui/core").StaticConfigPublic>;
32
+ export declare const AvatarFrame: import("@gui/core").GuiComponent<import("@gui/core").TamaDefer, GuiElement, import("@gui/core").RNGuiViewNonStyleProps, import("@gui/core").StackStyleBase, {
33
+ elevation?: number | import("@gui/web").SizeTokens | undefined;
34
+ size?: number | import("@gui/web").SizeTokens | undefined;
35
+ transparent?: boolean | undefined;
36
+ fullscreen?: boolean | undefined;
37
+ circular?: boolean | undefined;
38
+ elevate?: boolean | undefined;
39
+ bordered?: boolean | undefined;
40
+ chromeless?: boolean | "all" | undefined;
41
+ }, import("@gui/core").StaticConfigPublic & {
42
+ memo: true;
43
+ }>;
44
+ type AvatarProps = GetProps<typeof AvatarFrame>;
45
+ /**
46
+ * @summary A component that displays an image or a fallback icon.
47
+ * @see — Docs https://gui.dev/ui/avatar
48
+ *
49
+ * @example
50
+ * ```tsx
51
+ * <Avatar circular size="$10">
52
+ * <Avatar.Image
53
+ * aria-label="Cam"
54
+ * src="https://images.unsplash.com/photo-1548142813-c348350df52b?&w=150&h=150&dpr=2&q=80"
55
+ * />
56
+ * <Avatar.Fallback backgroundColor="$blue10" />
57
+ * </Avatar>
58
+ * ```
59
+ */
60
+ declare const Avatar: React.ForwardRefExoticComponent<Omit<import("@gui/core").RNGuiViewNonStyleProps, "size" | "elevation" | keyof import("@gui/core").StackStyleBase | "fullscreen" | "transparent" | "circular" | "elevate" | "bordered" | "chromeless"> & import("@gui/core").WithThemeValues<import("@gui/core").StackStyleBase> & {
61
+ elevation?: number | import("@gui/web").SizeTokens | undefined;
62
+ size?: number | import("@gui/web").SizeTokens | undefined;
63
+ transparent?: boolean | undefined;
64
+ fullscreen?: boolean | undefined;
65
+ circular?: boolean | undefined;
66
+ elevate?: boolean | undefined;
67
+ bordered?: boolean | undefined;
68
+ chromeless?: boolean | "all" | undefined;
69
+ } & import("@gui/core").WithShorthands<import("@gui/core").WithThemeValues<import("@gui/core").StackStyleBase>> & import("@gui/core").WithPseudoProps<import("@gui/core").WithThemeValues<import("@gui/core").StackStyleBase> & {
70
+ elevation?: number | import("@gui/web").SizeTokens | undefined;
71
+ size?: number | import("@gui/web").SizeTokens | undefined;
72
+ transparent?: boolean | undefined;
73
+ fullscreen?: boolean | undefined;
74
+ circular?: boolean | undefined;
75
+ elevate?: boolean | undefined;
76
+ bordered?: boolean | undefined;
77
+ chromeless?: boolean | "all" | undefined;
78
+ } & import("@gui/core").WithShorthands<import("@gui/core").WithThemeValues<import("@gui/core").StackStyleBase>>> & import("@gui/core").WithMediaProps<import("@gui/core").WithThemeShorthandsAndPseudos<import("@gui/core").StackStyleBase, {
79
+ elevation?: number | import("@gui/web").SizeTokens | undefined;
80
+ size?: number | import("@gui/web").SizeTokens | undefined;
81
+ transparent?: boolean | undefined;
82
+ fullscreen?: boolean | undefined;
83
+ circular?: boolean | undefined;
84
+ elevate?: boolean | undefined;
85
+ bordered?: boolean | undefined;
86
+ chromeless?: boolean | "all" | undefined;
87
+ }>> & React.RefAttributes<GuiElement>> & {
88
+ Image: React.ForwardRefExoticComponent<Partial<ImageProps> & {
89
+ onLoadingStatusChange?: (status: ImageLoadingStatus) => void;
90
+ } & React.RefAttributes<GuiElement>>;
91
+ Fallback: import("@gui/core").GuiComponent<Omit<import("@gui/core").GetFinalProps<import("@gui/core").RNGuiViewNonStyleProps, import("@gui/core").StackStyleBase, {
92
+ elevation?: number | SizeTokens | undefined;
93
+ fullscreen?: boolean | undefined;
94
+ }>, "delayMs" | "__scopeAvatar"> & AvatarFallbackExtraProps & {
95
+ __scopeAvatar?: Scope;
96
+ }, GuiElement, import("@gui/core").RNGuiViewNonStyleProps & AvatarFallbackExtraProps & {
97
+ __scopeAvatar?: Scope;
98
+ }, import("@gui/core").StackStyleBase, {
99
+ elevation?: number | SizeTokens | undefined;
100
+ fullscreen?: boolean | undefined;
101
+ }, import("@gui/core").StaticConfigPublic>;
102
+ };
103
+ export { createAvatarScope, Avatar, AvatarImage, AvatarFallback };
104
+ export type { AvatarProps, AvatarImageProps, AvatarFallbackProps };
105
+ //# sourceMappingURL=Avatar.d.ts.map
@@ -0,0 +1,2 @@
1
+ export * from './Avatar';
2
+ //# sourceMappingURL=index.d.ts.map