@tamagui/avatar 2.7.7 → 3.0.0-beta.1091.1
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.
- package/dist/cjs/Avatar.cjs +102 -122
- package/dist/cjs/Avatar.native.cjs +146 -0
- package/dist/cjs/Avatar.native.js +106 -142
- package/dist/cjs/Avatar.native.js.map +1 -1
- package/dist/cjs/index.cjs +9 -11
- package/dist/cjs/index.native.cjs +20 -0
- package/dist/cjs/index.native.js +9 -10
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/esm/Avatar.mjs +83 -94
- package/dist/esm/Avatar.mjs.map +1 -1
- package/dist/esm/Avatar.native.js +87 -115
- package/dist/esm/Avatar.native.js.map +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/index.native.js +1 -2
- package/dist/jsx/Avatar.mjs +83 -94
- package/dist/jsx/Avatar.mjs.map +1 -1
- package/dist/jsx/Avatar.native.cjs +146 -0
- package/dist/jsx/Avatar.native.js +106 -142
- package/dist/jsx/Avatar.native.js.map +1 -1
- package/dist/jsx/index.js +1 -2
- package/dist/jsx/index.mjs +1 -2
- package/dist/jsx/index.native.cjs +20 -0
- package/dist/jsx/index.native.js +9 -10
- package/dist/jsx/index.native.js.map +1 -1
- package/package.json +12 -11
- package/src/Avatar.tsx +32 -29
- package/types/Avatar.d.ts +53 -58
- package/types/Avatar.d.ts.map +1 -1
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/index.mjs.map +0 -1
- package/dist/esm/index.native.js.map +0 -1
- package/dist/jsx/index.js.map +0 -1
- package/dist/jsx/index.mjs.map +0 -1
package/types/Avatar.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GetProps,
|
|
1
|
+
import type { GetProps, TamaguiElement } from '@tamagui/core';
|
|
2
2
|
import type { Scope } from '@tamagui/create-context';
|
|
3
3
|
import type { ImageProps } from '@tamagui/image';
|
|
4
4
|
import * as React from 'react';
|
|
@@ -7,40 +7,58 @@ type ImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';
|
|
|
7
7
|
type AvatarImageProps = Partial<ImageProps> & {
|
|
8
8
|
onLoadingStatusChange?: (status: ImageLoadingStatus) => void;
|
|
9
9
|
};
|
|
10
|
-
declare const AvatarImage:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
declare const AvatarImage: import("@tamagui/core").RefComponent<TamaguiElement, AvatarImageProps>;
|
|
11
|
+
export declare const AvatarFallbackFrame: React.FunctionComponent<Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "elevation" | keyof import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithFlatVariantValues<{
|
|
12
|
+
elevation?: number | false | import("@tamagui/core").Size | undefined;
|
|
13
|
+
}> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>> & {
|
|
14
|
+
ref?: React.Ref<TamaguiElement> | undefined;
|
|
15
|
+
}> & import("@tamagui/core").StaticComponentObject<import("@tamagui/core").TamaDefer, TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
|
|
16
|
+
elevation?: number | false | import("@tamagui/core").Size | undefined;
|
|
17
|
+
}, import("@tamagui/core").StaticConfigPublic> & Omit<import("@tamagui/core").StaticConfigPublic, "staticConfig"> & {
|
|
18
|
+
__tama: [import("@tamagui/core").TamaDefer, TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
|
|
19
|
+
elevation?: number | false | import("@tamagui/core").Size | undefined;
|
|
20
|
+
}, import("@tamagui/core").StaticConfigPublic];
|
|
21
|
+
};
|
|
17
22
|
type AvatarFallbackExtraProps = {
|
|
18
|
-
|
|
23
|
+
/** The delay in milliseconds before the fallback renders. */
|
|
24
|
+
delay?: number;
|
|
19
25
|
};
|
|
20
26
|
type AvatarFallbackProps = GetProps<typeof AvatarFallbackFrame> & AvatarFallbackExtraProps;
|
|
21
27
|
declare const AvatarFallback: import("@tamagui/core").TamaguiComponent<Omit<import("@tamagui/core").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
|
|
22
|
-
elevation?: number |
|
|
23
|
-
|
|
24
|
-
}>, "delayMs" | "__scopeAvatar"> & AvatarFallbackExtraProps & {
|
|
28
|
+
elevation?: number | false | import("@tamagui/core").Size | undefined;
|
|
29
|
+
}>, "__scopeAvatar" | "delay"> & AvatarFallbackExtraProps & {
|
|
25
30
|
__scopeAvatar?: Scope;
|
|
26
31
|
}, TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & AvatarFallbackExtraProps & {
|
|
27
32
|
__scopeAvatar?: Scope;
|
|
28
33
|
}, import("@tamagui/core").StackStyleBase, {
|
|
29
|
-
elevation?: number |
|
|
30
|
-
fullscreen?: boolean | undefined;
|
|
34
|
+
elevation?: number | false | import("@tamagui/core").Size | undefined;
|
|
31
35
|
}, import("@tamagui/core").StaticConfigPublic>;
|
|
32
|
-
export declare const AvatarFrame: import("@tamagui/core").
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
export declare const AvatarFrame: React.FunctionComponent<Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "circular" | "elevation" | "size" | "transparent" | keyof import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithFlatVariantValues<{
|
|
37
|
+
circular?: boolean | undefined;
|
|
38
|
+
elevation?: number | false | import("@tamagui/core").Size | undefined;
|
|
39
|
+
size?: number | import("@tamagui/core").Size | undefined;
|
|
35
40
|
transparent?: boolean | undefined;
|
|
36
|
-
|
|
41
|
+
}> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>> & {
|
|
42
|
+
ref?: React.Ref<TamaguiElement> | undefined;
|
|
43
|
+
}> & import("@tamagui/core").StaticComponentObject<import("@tamagui/core").TamaDefer, TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
|
|
37
44
|
circular?: boolean | undefined;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
45
|
+
elevation?: number | false | import("@tamagui/core").Size | undefined;
|
|
46
|
+
size?: number | import("@tamagui/core").Size | undefined;
|
|
47
|
+
transparent?: boolean | undefined;
|
|
41
48
|
}, import("@tamagui/core").StaticConfigPublic & {
|
|
42
49
|
memo: true;
|
|
43
|
-
}
|
|
50
|
+
}> & Omit<import("@tamagui/core").StaticConfigPublic & {
|
|
51
|
+
memo: true;
|
|
52
|
+
}, "staticConfig"> & {
|
|
53
|
+
__tama: [import("@tamagui/core").TamaDefer, TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
|
|
54
|
+
circular?: boolean | undefined;
|
|
55
|
+
elevation?: number | false | import("@tamagui/core").Size | undefined;
|
|
56
|
+
size?: number | import("@tamagui/core").Size | undefined;
|
|
57
|
+
transparent?: boolean | undefined;
|
|
58
|
+
}, import("@tamagui/core").StaticConfigPublic & {
|
|
59
|
+
memo: true;
|
|
60
|
+
}];
|
|
61
|
+
};
|
|
44
62
|
type AvatarProps = GetProps<typeof AvatarFrame>;
|
|
45
63
|
/**
|
|
46
64
|
* @summary A component that displays an image or a fallback icon.
|
|
@@ -48,56 +66,33 @@ type AvatarProps = GetProps<typeof AvatarFrame>;
|
|
|
48
66
|
*
|
|
49
67
|
* @example
|
|
50
68
|
* ```tsx
|
|
51
|
-
* <Avatar circular size="
|
|
69
|
+
* <Avatar circular size="10">
|
|
52
70
|
* <Avatar.Image
|
|
53
71
|
* aria-label="Cam"
|
|
54
72
|
* src="https://images.unsplash.com/photo-1548142813-c348350df52b?&w=150&h=150&dpr=2&q=80"
|
|
55
73
|
* />
|
|
56
|
-
* <Avatar.Fallback backgroundColor="
|
|
74
|
+
* <Avatar.Fallback backgroundColor="blue10" />
|
|
57
75
|
* </Avatar>
|
|
58
76
|
* ```
|
|
59
77
|
*/
|
|
60
|
-
declare const Avatar:
|
|
61
|
-
elevation?: number | import("@tamagui/web").SizeTokens | undefined;
|
|
62
|
-
size?: number | import("@tamagui/web").SizeTokens | undefined;
|
|
63
|
-
transparent?: boolean | undefined;
|
|
64
|
-
fullscreen?: boolean | undefined;
|
|
78
|
+
declare const Avatar: ((props: Omit<import("@tamagui/core").RNTamaguiViewNonStyleProps, "circular" | "elevation" | "size" | "transparent" | keyof import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & import("@tamagui/core").WithFlatVariantValues<{
|
|
65
79
|
circular?: boolean | undefined;
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
chromeless?: boolean | "all" | undefined;
|
|
69
|
-
} & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>> & import("@tamagui/core").WithPseudoProps<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase> & {
|
|
70
|
-
elevation?: number | import("@tamagui/web").SizeTokens | undefined;
|
|
71
|
-
size?: number | import("@tamagui/web").SizeTokens | undefined;
|
|
80
|
+
elevation?: number | false | import("@tamagui/core").Size | undefined;
|
|
81
|
+
size?: number | import("@tamagui/core").Size | undefined;
|
|
72
82
|
transparent?: boolean | undefined;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
} & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>>> & import("@tamagui/core").WithMediaProps<import("@tamagui/core").WithThemeShorthandsAndPseudos<import("@tamagui/core").StackStyleBase, {
|
|
79
|
-
elevation?: number | import("@tamagui/web").SizeTokens | undefined;
|
|
80
|
-
size?: number | import("@tamagui/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<TamaguiElement>> & {
|
|
88
|
-
Image: React.ForwardRefExoticComponent<Partial<ImageProps> & {
|
|
89
|
-
onLoadingStatusChange?: (status: ImageLoadingStatus) => void;
|
|
90
|
-
} & React.RefAttributes<TamaguiElement>>;
|
|
83
|
+
}> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").StackStyleBase>> & import("@tamagui/core").RefProp<TamaguiElement>) => React.ReactNode) & {
|
|
84
|
+
displayName?: string;
|
|
85
|
+
propTypes?: any;
|
|
86
|
+
} & {
|
|
87
|
+
Image: import("@tamagui/core").RefComponent<TamaguiElement, AvatarImageProps>;
|
|
91
88
|
Fallback: import("@tamagui/core").TamaguiComponent<Omit<import("@tamagui/core").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
|
|
92
|
-
elevation?: number |
|
|
93
|
-
|
|
94
|
-
}>, "delayMs" | "__scopeAvatar"> & AvatarFallbackExtraProps & {
|
|
89
|
+
elevation?: number | false | import("@tamagui/core").Size | undefined;
|
|
90
|
+
}>, "__scopeAvatar" | "delay"> & AvatarFallbackExtraProps & {
|
|
95
91
|
__scopeAvatar?: Scope;
|
|
96
92
|
}, TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & AvatarFallbackExtraProps & {
|
|
97
93
|
__scopeAvatar?: Scope;
|
|
98
94
|
}, import("@tamagui/core").StackStyleBase, {
|
|
99
|
-
elevation?: number |
|
|
100
|
-
fullscreen?: boolean | undefined;
|
|
95
|
+
elevation?: number | false | import("@tamagui/core").Size | undefined;
|
|
101
96
|
}, import("@tamagui/core").StaticConfigPublic>;
|
|
102
97
|
};
|
|
103
98
|
export { createAvatarScope, Avatar, AvatarImage, AvatarFallback };
|
package/types/Avatar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../src/Avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../src/Avatar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAc,cAAc,EAAE,MAAM,eAAe,CAAA;AAEzE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAA;AAGpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAIhD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,QAAA,MAA4B,iBAAiB,+CAAmC,CAAA;AAEhF,KAAK,kBAAkB,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,CAAA;AAkBjE,KAAK,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG;IAC5C,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAA;CAC7D,CAAA;AAED,QAAA,MAAM,WAAW,wEAwEhB,CAAA;AAUD,eAAO,MAAM,mBAAmB;;;;;;;;;;CAK9B,CAAA;AAEF,KAAK,wBAAwB,GAAG;IAC9B,6DAA6D;IAC7D,KAAK,CAAC,EAAE,MAAM,CAAA;CACf,CAAA;AACD,KAAK,mBAAmB,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,GAAG,wBAAwB,CAAA;AAE1F,QAAA,MAAM,cAAc;;;oBAxHwB,KAAK;;;;;8CA0IhD,CAAA;AAQD,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;CAItB,CAAA;AAEF,KAAK,WAAW,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAA;AAE/C;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,MAAM;;;;;;;;;;;;;wBAzKgC,KAAK;;;;;;CA+LhD,CAAA;AAID,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,WAAW,EAAE,cAAc,EAAE,CAAA;AACjE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,CAAA"}
|
package/dist/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
|
package/dist/esm/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
|
package/dist/jsx/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
|
package/dist/jsx/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
|