@fluentui-react-native/experimental-avatar 0.17.22 → 0.17.23
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/CHANGELOG.json +22 -1
- package/CHANGELOG.md +11 -2
- package/lib/NativeAvatar.d.ts +72 -0
- package/lib/NativeAvatar.d.ts.map +1 -0
- package/lib/NativeAvatar.js +45 -0
- package/lib/NativeAvatar.js.map +1 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/package.json +2 -2
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,28 @@
|
|
|
2
2
|
"name": "@fluentui-react-native/experimental-avatar",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "
|
|
5
|
+
"date": "Tue, 21 Mar 2023 21:51:13 GMT",
|
|
6
|
+
"tag": "@fluentui-react-native/experimental-avatar_v0.17.23",
|
|
7
|
+
"version": "0.17.23",
|
|
8
|
+
"comments": {
|
|
9
|
+
"patch": [
|
|
10
|
+
{
|
|
11
|
+
"author": "krsiler@microsoft.com",
|
|
12
|
+
"package": "@fluentui-react-native/experimental-avatar",
|
|
13
|
+
"commit": "e706a7afbd63d528878eadd179d5a91210ed62f6",
|
|
14
|
+
"comment": "Trigger manual bump (no changes)"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@fluentui-react-native/experimental-avatar",
|
|
19
|
+
"comment": "Bump @fluentui-react-native/framework to v0.9.8",
|
|
20
|
+
"commit": "e706a7afbd63d528878eadd179d5a91210ed62f6"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"date": "Sat, 18 Mar 2023 17:22:31 GMT",
|
|
6
27
|
"tag": "@fluentui-react-native/experimental-avatar_v0.17.22",
|
|
7
28
|
"version": "0.17.22",
|
|
8
29
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,21 @@
|
|
|
1
1
|
# Change Log - @fluentui-react-native/experimental-avatar
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Tue, 21 Mar 2023 21:51:13 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 0.17.23
|
|
8
|
+
|
|
9
|
+
Tue, 21 Mar 2023 21:51:13 GMT
|
|
10
|
+
|
|
11
|
+
### Patches
|
|
12
|
+
|
|
13
|
+
- Trigger manual bump (no changes) (krsiler@microsoft.com)
|
|
14
|
+
- Bump @fluentui-react-native/framework to v0.9.8
|
|
15
|
+
|
|
7
16
|
## 0.17.22
|
|
8
17
|
|
|
9
|
-
Sat, 18 Mar 2023 17:
|
|
18
|
+
Sat, 18 Mar 2023 17:22:31 GMT
|
|
10
19
|
|
|
11
20
|
### Patches
|
|
12
21
|
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/** @jsx withSlots */
|
|
2
|
+
import type { ImageURISource, ViewProps, ColorValue } from 'react-native';
|
|
3
|
+
export declare const Sizes: readonly ["size16", "size20", "size24", "size32", "size40", "size56", "size72"];
|
|
4
|
+
export type Size = (typeof Sizes)[number];
|
|
5
|
+
export type AvatarStyle = 'default' | 'accent' | 'group' | 'outlined' | 'outlinedPrimary' | 'overflow';
|
|
6
|
+
export type Presence = 'none' | 'available' | 'away' | 'blocked' | 'doNotDisturb' | 'offline' | 'unknown';
|
|
7
|
+
export type NativeAvatarTokens = {
|
|
8
|
+
/**
|
|
9
|
+
* Supported Avatar sizes
|
|
10
|
+
*/
|
|
11
|
+
size?: Size;
|
|
12
|
+
/**
|
|
13
|
+
* Supported Avatar styles
|
|
14
|
+
*/
|
|
15
|
+
avatarStyle?: AvatarStyle;
|
|
16
|
+
};
|
|
17
|
+
export type NativeAvatarProps = NativeAvatarTokens & {
|
|
18
|
+
/**
|
|
19
|
+
* The image to be displayed
|
|
20
|
+
*/
|
|
21
|
+
imageSource?: ImageURISource;
|
|
22
|
+
/**
|
|
23
|
+
* The primary text to create initials with (e.g. a name)
|
|
24
|
+
*/
|
|
25
|
+
primaryText?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The secondary text to create initials with if primary text is not provided (e.g. an email address)
|
|
28
|
+
*/
|
|
29
|
+
secondaryText?: string;
|
|
30
|
+
/**
|
|
31
|
+
* A custom color for the ring around the Avatar
|
|
32
|
+
*/
|
|
33
|
+
ringColor?: ColorValue;
|
|
34
|
+
/**
|
|
35
|
+
* A custom color for the avatar initials when no image is shown
|
|
36
|
+
*/
|
|
37
|
+
foregroundColor?: ColorValue;
|
|
38
|
+
/**
|
|
39
|
+
* A custom color for the avatar background when no image is shown
|
|
40
|
+
*/
|
|
41
|
+
backgroundColor?: ColorValue;
|
|
42
|
+
/**
|
|
43
|
+
* The avatar view's presence state.
|
|
44
|
+
*/
|
|
45
|
+
presence?: Presence;
|
|
46
|
+
/**
|
|
47
|
+
* A boolean inidicating whether the ring is visible
|
|
48
|
+
*/
|
|
49
|
+
isRingVisible?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* A boolean indicating whether the Inner Ring Gap is transparent
|
|
52
|
+
*/
|
|
53
|
+
isTransparent?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* A boolean indicating out of office status
|
|
56
|
+
*/
|
|
57
|
+
isOutOfOffice?: boolean;
|
|
58
|
+
/**
|
|
59
|
+
* A boolean indicating whether the gap between the avatar and ring is visible.
|
|
60
|
+
*/
|
|
61
|
+
hasRingInnerGap?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* An image to be shown as the backdrop of the ring, rather then a solid color.
|
|
64
|
+
* Takes precendence over `ringColor`
|
|
65
|
+
*/
|
|
66
|
+
customBorderImageSource?: ImageURISource;
|
|
67
|
+
};
|
|
68
|
+
export type NativeAvatarViewProps = ViewProps & NativeAvatarProps;
|
|
69
|
+
export declare const NativeAvatar: import("@fluentui-react-native/framework").ComposableComponent<NativeAvatarProps, {
|
|
70
|
+
root: NativeAvatarViewProps;
|
|
71
|
+
}, NativeAvatarTokens, object>;
|
|
72
|
+
//# sourceMappingURL=NativeAvatar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeAvatar.d.ts","sourceRoot":"","sources":["../src/NativeAvatar.tsx"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAW1E,eAAO,MAAM,KAAK,iFAAkF,CAAC;AACrG,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1C,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,iBAAiB,GAAG,UAAU,CAAC;AAEvG,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,CAAC;AAQ1G,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC;IAEZ;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,kBAAkB,GAAG;IACnD;;OAEG;IACH,WAAW,CAAC,EAAE,cAAc,CAAC;IAE7B;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,CAAC,EAAE,UAAU,CAAC;IAEvB;;OAEG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;IAE7B;;OAEG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;IAE7B;;OAEG;IACH,QAAQ,CAAC,EAAE,QAAQ,CAAC;IAEpB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;OAEG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B;;;OAGG;IACH,uBAAuB,CAAC,EAAE,cAAc,CAAC;CAC1C,CAAC;AAIF,MAAM,MAAM,qBAAqB,GAAG,SAAS,GAAG,iBAAiB,CAAC;AAOlE,eAAO,MAAM,YAAY;UAJJ,qBAAqB;8BAgCxC,CAAC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { NativeModules } from 'react-native';
|
|
13
|
+
import { ensureNativeComponent } from '@fluentui-react-native/component-cache';
|
|
14
|
+
import { compose, buildProps, mergeProps, withSlots } from '@fluentui-react-native/framework';
|
|
15
|
+
var avatarName = 'NativeAvatar';
|
|
16
|
+
var NativeAvatarView = ensureNativeComponent('FRNAvatarView');
|
|
17
|
+
export var Sizes = ['size16', 'size20', 'size24', 'size32', 'size40', 'size56', 'size72'];
|
|
18
|
+
var ExportedNativeConstants = NativeModules.FRNAvatarViewManager;
|
|
19
|
+
var tokensThatAreAlsoProps = ['size', 'avatarStyle'];
|
|
20
|
+
export var NativeAvatar = compose({
|
|
21
|
+
displayName: avatarName,
|
|
22
|
+
tokens: [
|
|
23
|
+
{
|
|
24
|
+
size: 'size24',
|
|
25
|
+
avatarStyle: 'default',
|
|
26
|
+
},
|
|
27
|
+
avatarName,
|
|
28
|
+
],
|
|
29
|
+
tokensThatAreAlsoProps: tokensThatAreAlsoProps,
|
|
30
|
+
slots: { root: NativeAvatarView },
|
|
31
|
+
slotProps: {
|
|
32
|
+
root: buildProps(function (tokens) { return ({
|
|
33
|
+
size: tokens.size,
|
|
34
|
+
style: {
|
|
35
|
+
height: ExportedNativeConstants.sizes[tokens.size],
|
|
36
|
+
width: ExportedNativeConstants.sizes[tokens.size],
|
|
37
|
+
},
|
|
38
|
+
}); }, ['size']),
|
|
39
|
+
},
|
|
40
|
+
useRender: function (props, useSlots) {
|
|
41
|
+
var Root = useSlots(props).root;
|
|
42
|
+
return function (rest) { return withSlots(Root, __assign({}, mergeProps(props, rest))); };
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=NativeAvatar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeAvatar.js","sourceRoot":"","sources":["../src/NativeAvatar.tsx"],"names":[],"mappings":";;;;;;;;;;;AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAE/E,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAE9F,IAAM,UAAU,GAAG,cAAc,CAAC;AAElC,IAAM,gBAAgB,GAAG,qBAAqB,CAAC,eAAe,CAAC,CAAC;AAEhE,MAAM,CAAC,IAAM,KAAK,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAU,CAAC;AAWrG,IAAM,uBAAuB,GAAsB,aAAa,CAAC,oBAAoB,CAAC;AA6EtF,IAAM,sBAAsB,GAAiC,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC;AASrF,MAAM,CAAC,IAAM,YAAY,GAAG,OAAO,CAAa;IAC9C,WAAW,EAAE,UAAU;IACvB,MAAM,EAAE;QACN;YACE,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,SAAS;SACvB;QACD,UAAU;KACX;IACD,sBAAsB,wBAAA;IACtB,KAAK,EAAE,EAAE,IAAI,EAAE,gBAAgB,EAAE;IACjC,SAAS,EAAE;QACT,IAAI,EAAE,UAAU,CACd,UAAC,MAAM,IAAK,OAAA,CAAC;YACX,IAAI,EAAE,MAAM,CAAC,IAAI;YACjB,KAAK,EAAE;gBACL,MAAM,EAAE,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;gBAClD,KAAK,EAAE,uBAAuB,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;aAClD;SACF,CAAC,EANU,CAMV,EACF,CAAC,MAAM,CAAC,CACT;KACF;IACD,SAAS,EAAE,UAAC,KAAwB,EAAE,QAA8B;QAClE,IAAM,IAAI,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC;QAElC,OAAO,UAAC,IAAuB,IAAK,OAAA,UAAC,IAAI,eAAK,UAAU,CAAC,KAAK,EAAE,IAAI,CAAC,EAAI,EAArC,CAAqC,CAAC;IAC5E,CAAC;CACF,CAAC,CAAC"}
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACrD,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC"}
|
package/lib/index.js
ADDED
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui-react-native/experimental-avatar",
|
|
3
|
-
"version": "0.17.
|
|
3
|
+
"version": "0.17.23",
|
|
4
4
|
"description": "A cross-platform Avatar component using the Fluent Design System. Currently only implemented on iOS",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Microsoft <fluentuinativeowners@microsoft.com>",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"@fluentui-react-native/component-cache": "^1.4.4",
|
|
29
|
-
"@fluentui-react-native/framework": "0.9.
|
|
29
|
+
"@fluentui-react-native/framework": "0.9.8"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@fluentui-react-native/eslint-config-rules": "^0.1.1",
|