@fluentui/react-badge 9.0.0-beta.3 → 9.0.0-beta.4
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +84 -7
- package/CHANGELOG.md +26 -8
- package/dist/react-badge.d.ts +12 -7
- package/lib/components/Badge/Badge.types.d.ts +1 -1
- package/lib/components/Badge/useBadgeStyles.js +19 -20
- package/lib/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.types.d.ts +7 -2
- package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadgeStyles.js +2 -31
- package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +6 -5
- package/lib/components/PresenceBadge/presenceIcons.d.ts +11 -0
- package/lib/components/PresenceBadge/presenceIcons.js +128 -0
- package/lib/components/PresenceBadge/presenceIcons.js.map +1 -0
- package/lib/components/PresenceBadge/usePresenceBadge.js +29 -15
- package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +34 -42
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.types.d.ts +1 -1
- package/lib-commonjs/components/Badge/useBadgeStyles.js +19 -20
- package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +7 -2
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +2 -31
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +6 -5
- package/lib-commonjs/components/PresenceBadge/presenceIcons.d.ts +11 -0
- package/lib-commonjs/components/PresenceBadge/presenceIcons.js +136 -0
- package/lib-commonjs/components/PresenceBadge/presenceIcons.js.map +1 -0
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +28 -14
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +34 -43
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
- package/package.json +11 -9
- package/lib/common/isConformant.d.ts +0 -4
- package/lib/common/isConformant.js +0 -13
- package/lib/common/isConformant.js.map +0 -1
- package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
- package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -98
- package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
- package/lib-commonjs/common/isConformant.d.ts +0 -4
- package/lib-commonjs/common/isConformant.js +0 -24
- package/lib-commonjs/common/isConformant.js.map +0 -1
- package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
- package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -113
- package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
@@ -1,6 +1,7 @@
|
|
1
|
-
import type {
|
1
|
+
import type { ComponentProps, ComponentState } from '@fluentui/react-utilities';
|
2
|
+
import type { BadgeCommons, BadgeSlots } from '../Badge/index';
|
2
3
|
export declare type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb';
|
3
|
-
export
|
4
|
+
export declare type PresenceBadgeCommons = {
|
4
5
|
/**
|
5
6
|
* Represents several status
|
6
7
|
* @default available
|
@@ -12,6 +13,6 @@ export interface PresenceBadgeCommons {
|
|
12
13
|
* @default false
|
13
14
|
*/
|
14
15
|
outOfOffice: boolean;
|
15
|
-
}
|
16
|
-
export declare type PresenceBadgeProps =
|
17
|
-
export declare type PresenceBadgeState =
|
16
|
+
} & BadgeCommons;
|
17
|
+
export declare type PresenceBadgeProps = ComponentProps<Partial<Pick<BadgeSlots, 'root'>>> & Partial<Pick<PresenceBadgeCommons, 'status' | 'outOfOffice' | 'size'>>;
|
18
|
+
export declare type PresenceBadgeState = PresenceBadgeCommons & ComponentState<BadgeSlots>;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import type { PresenceBadgeState } from './PresenceBadge.types';
|
3
|
+
export declare const presenceAwayFilled: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
4
|
+
export declare const presenceAvailableRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
5
|
+
export declare const presenceAvailableFilled: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
6
|
+
export declare const presenceBusyFilled: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
7
|
+
export declare const presenceDndFilled: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
8
|
+
export declare const presenceDndRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
9
|
+
export declare const presenceOofRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
10
|
+
export declare const presenceOfflineRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
11
|
+
export declare const presenceUnknownRegular: Record<PresenceBadgeState['size'], React.FunctionComponent | null>;
|
@@ -0,0 +1,136 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.presenceUnknownRegular = exports.presenceOfflineRegular = exports.presenceOofRegular = exports.presenceDndRegular = exports.presenceDndFilled = exports.presenceBusyFilled = exports.presenceAvailableFilled = exports.presenceAvailableRegular = exports.presenceAwayFilled = void 0;
|
7
|
+
|
8
|
+
const react_icons_1 = /*#__PURE__*/require("@fluentui/react-icons");
|
9
|
+
|
10
|
+
exports.presenceAwayFilled = {
|
11
|
+
// FIXME not all presence icon sizes are available
|
12
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
13
|
+
tiny: react_icons_1.PresenceAway10Filled,
|
14
|
+
'extra-small': react_icons_1.PresenceAway10Filled,
|
15
|
+
small: react_icons_1.PresenceAway12Filled,
|
16
|
+
medium: react_icons_1.PresenceAway16Filled,
|
17
|
+
// FIXME not all presence icon sizes are available
|
18
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
19
|
+
large: react_icons_1.PresenceAway16Filled,
|
20
|
+
// FIXME not all presence icon sizes are available
|
21
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
22
|
+
'extra-large': react_icons_1.PresenceAway16Filled
|
23
|
+
};
|
24
|
+
exports.presenceAvailableRegular = {
|
25
|
+
// FIXME not all presence icon sizes are available
|
26
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
27
|
+
tiny: react_icons_1.PresenceAvailable10Regular,
|
28
|
+
'extra-small': react_icons_1.PresenceAvailable10Regular,
|
29
|
+
small: react_icons_1.PresenceAvailable12Regular,
|
30
|
+
medium: react_icons_1.PresenceAvailable16Regular,
|
31
|
+
// FIXME not all presence icon sizes are available
|
32
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
33
|
+
large: react_icons_1.PresenceAvailable16Regular,
|
34
|
+
// FIXME not all presence icon sizes are available
|
35
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
36
|
+
'extra-large': react_icons_1.PresenceAvailable16Regular
|
37
|
+
};
|
38
|
+
exports.presenceAvailableFilled = {
|
39
|
+
// FIXME not all presence icon sizes are available
|
40
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
41
|
+
tiny: react_icons_1.PresenceAvailable10Filled,
|
42
|
+
'extra-small': react_icons_1.PresenceAvailable10Filled,
|
43
|
+
small: react_icons_1.PresenceAvailable12Filled,
|
44
|
+
medium: react_icons_1.PresenceAvailable16Filled,
|
45
|
+
// FIXME not all presence icon sizes are available
|
46
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
47
|
+
large: react_icons_1.PresenceAvailable16Filled,
|
48
|
+
// FIXME not all presence icon sizes are available
|
49
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
50
|
+
'extra-large': react_icons_1.PresenceAvailable16Filled
|
51
|
+
};
|
52
|
+
exports.presenceBusyFilled = {
|
53
|
+
// FIXME not all presence icon sizes are available
|
54
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
55
|
+
tiny: react_icons_1.PresenceBusy10Filled,
|
56
|
+
'extra-small': react_icons_1.PresenceBusy10Filled,
|
57
|
+
small: react_icons_1.PresenceBusy12Filled,
|
58
|
+
medium: react_icons_1.PresenceBusy16Filled,
|
59
|
+
// FIXME not all presence icon sizes are available
|
60
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
61
|
+
large: react_icons_1.PresenceBusy16Filled,
|
62
|
+
// FIXME not all presence icon sizes are available
|
63
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
64
|
+
'extra-large': react_icons_1.PresenceBusy16Filled
|
65
|
+
};
|
66
|
+
exports.presenceDndFilled = {
|
67
|
+
// FIXME not all presence icon sizes are available
|
68
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
69
|
+
tiny: react_icons_1.PresenceDnd10Filled,
|
70
|
+
'extra-small': react_icons_1.PresenceDnd10Filled,
|
71
|
+
small: react_icons_1.PresenceDnd12Filled,
|
72
|
+
medium: react_icons_1.PresenceDnd16Filled,
|
73
|
+
// FIXME not all presence icon sizes are available
|
74
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
75
|
+
large: react_icons_1.PresenceDnd16Filled,
|
76
|
+
// FIXME not all presence icon sizes are available
|
77
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
78
|
+
'extra-large': react_icons_1.PresenceDnd16Filled
|
79
|
+
};
|
80
|
+
exports.presenceDndRegular = {
|
81
|
+
// FIXME not all presence icon sizes are available
|
82
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
83
|
+
tiny: react_icons_1.PresenceDnd10Regular,
|
84
|
+
'extra-small': react_icons_1.PresenceDnd10Regular,
|
85
|
+
small: react_icons_1.PresenceDnd12Regular,
|
86
|
+
medium: react_icons_1.PresenceDnd16Regular,
|
87
|
+
// FIXME not all presence icon sizes are available
|
88
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
89
|
+
large: react_icons_1.PresenceDnd16Regular,
|
90
|
+
// FIXME not all presence icon sizes are available
|
91
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
92
|
+
'extra-large': react_icons_1.PresenceDnd16Regular
|
93
|
+
};
|
94
|
+
exports.presenceOofRegular = {
|
95
|
+
// FIXME not all presence icon sizes are available
|
96
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
97
|
+
tiny: react_icons_1.PresenceOof10Regular,
|
98
|
+
'extra-small': react_icons_1.PresenceOof10Regular,
|
99
|
+
small: react_icons_1.PresenceOof12Regular,
|
100
|
+
medium: react_icons_1.PresenceOof16Regular,
|
101
|
+
// FIXME not all presence icon sizes are available
|
102
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
103
|
+
large: react_icons_1.PresenceOof16Regular,
|
104
|
+
// FIXME not all presence icon sizes are available
|
105
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
106
|
+
'extra-large': react_icons_1.PresenceOof16Regular
|
107
|
+
};
|
108
|
+
exports.presenceOfflineRegular = {
|
109
|
+
// FIXME not all presence icon sizes are available
|
110
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
111
|
+
tiny: react_icons_1.PresenceOffline10Regular,
|
112
|
+
'extra-small': react_icons_1.PresenceOffline10Regular,
|
113
|
+
small: react_icons_1.PresenceOffline12Regular,
|
114
|
+
medium: react_icons_1.PresenceOffline16Regular,
|
115
|
+
// FIXME not all presence icon sizes are available
|
116
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
117
|
+
large: react_icons_1.PresenceOffline16Regular,
|
118
|
+
// FIXME not all presence icon sizes are available
|
119
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
120
|
+
'extra-large': react_icons_1.PresenceOffline16Regular
|
121
|
+
};
|
122
|
+
exports.presenceUnknownRegular = {
|
123
|
+
// FIXME not all presence icon sizes are available
|
124
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
125
|
+
tiny: react_icons_1.PresenceUnknown10Regular,
|
126
|
+
'extra-small': react_icons_1.PresenceUnknown10Regular,
|
127
|
+
small: react_icons_1.PresenceUnknown12Regular,
|
128
|
+
medium: react_icons_1.PresenceUnknown16Regular,
|
129
|
+
// FIXME not all presence icon sizes are available
|
130
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
131
|
+
large: react_icons_1.PresenceUnknown16Regular,
|
132
|
+
// FIXME not all presence icon sizes are available
|
133
|
+
// https://github.com/microsoft/fluentui/issues/20650
|
134
|
+
'extra-large': react_icons_1.PresenceUnknown16Regular
|
135
|
+
};
|
136
|
+
//# sourceMappingURL=presenceIcons.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/components/PresenceBadge/presenceIcons.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,uBAAA,CAAA;;AA+Ba,OAAA,CAAA,kBAAA,GAAyF;AACpG;AACA;AACA,EAAA,IAAI,EAAE,aAAA,CAAA,oBAH8F;AAIpG,iBAAe,aAAA,CAAA,oBAJqF;AAKpG,EAAA,KAAK,EAAE,aAAA,CAAA,oBAL6F;AAMpG,EAAA,MAAM,EAAE,aAAA,CAAA,oBAN4F;AAOpG;AACA;AACA,EAAA,KAAK,EAAE,aAAA,CAAA,oBAT6F;AAUpG;AACA;AACA,iBAAe,aAAA,CAAA;AAZqF,CAAzF;AAeA,OAAA,CAAA,wBAAA,GAA+F;AAC1G;AACA;AACA,EAAA,IAAI,EAAE,aAAA,CAAA,0BAHoG;AAI1G,iBAAe,aAAA,CAAA,0BAJ2F;AAK1G,EAAA,KAAK,EAAE,aAAA,CAAA,0BALmG;AAM1G,EAAA,MAAM,EAAE,aAAA,CAAA,0BANkG;AAO1G;AACA;AACA,EAAA,KAAK,EAAE,aAAA,CAAA,0BATmG;AAU1G;AACA;AACA,iBAAe,aAAA,CAAA;AAZ2F,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UpG;AACA;AACA,iBAAe,aAAA,CAAA;AAZqF,CAAzF;AAeA,OAAA,CAAA,kBAAA,GAAyF;AACpG;AACA;AACA,EAAA,IAAI,EAAE,aAAA,CAAA,oBAH8F;AAIpG,iBAAe,aAAA,CAAA,oBAJqF;AAKpG,EAAA,KAAK,EAAE,aAAA,CAAA,oBAL6F;AAMpG,EAAA,MAAM,EAAE,aAAA,CAAA,oBAN4F;AAOpG;AACA;AACA,EAAA,KAAK,EAAE,aAAA,CAAA,oBAT6F;AAUpG;AACA;AACA,iBAAe,aAAA,CAAA;AAZqF,CAAzF;AAeA,OAAA,CAAA,sBAAA,GAA6F;AACxG;AACA;AACA,EAAA,IAAI,EAAE,aAAA,CAAA,wBAHkG;AAIxG,iBAAe,aAAA,CAAA,wBAJyF;AAKxG,EAAA,KAAK,EAAE,aAAA,CAAA,wBALiG;AAMxG,EAAA,MAAM,EAAE,aAAA,CAAA,wBANgG;AAOxG;AACA;AACA,EAAA,KAAK,EAAE,aAAA,CAAA,wBATiG;AAUxG;AACA;AACA,iBAAe,aAAA,CAAA;AAZyF,CAA7F;AAeA,OAAA,CAAA,sBAAA,GAA6F;AACxG;AACA;AACA,EAAA,IAAI,EAAE,aAAA,CAAA,wBAHkG;AAIxG,iBAAe,aAAA,CAAA,wBAJyF;AAKxG,EAAA,KAAK,EAAE,aAAA,CAAA,wBALiG;AAMxG,EAAA,MAAM,EAAE,aAAA,CAAA,wBANgG;AAOxG;AACA;AACA,EAAA,KAAK,EAAE,aAAA,CAAA,wBATiG;AAUxG;AACA;AACA,iBAAe,aAAA,CAAA;AAZyF,CAA7F","sourceRoot":""}
|
@@ -9,39 +9,53 @@ const React = /*#__PURE__*/require("react");
|
|
9
9
|
|
10
10
|
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
11
11
|
|
12
|
+
const presenceIcons_1 = /*#__PURE__*/require("./presenceIcons");
|
13
|
+
|
12
14
|
const index_1 = /*#__PURE__*/require("../Badge/index");
|
13
15
|
|
14
|
-
const
|
16
|
+
const iconMap = (status, outOfOffice, size) => {
|
17
|
+
switch (status) {
|
18
|
+
case 'available':
|
19
|
+
return outOfOffice ? presenceIcons_1.presenceAvailableRegular[size] : presenceIcons_1.presenceAvailableFilled[size];
|
15
20
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
case 'away':
|
22
|
+
return outOfOffice ? presenceIcons_1.presenceOfflineRegular[size] : presenceIcons_1.presenceAwayFilled[size];
|
23
|
+
|
24
|
+
case 'busy':
|
25
|
+
return outOfOffice ? presenceIcons_1.presenceUnknownRegular[size] : presenceIcons_1.presenceBusyFilled[size];
|
26
|
+
|
27
|
+
case 'doNotDisturb':
|
28
|
+
return outOfOffice ? presenceIcons_1.presenceDndRegular[size] : presenceIcons_1.presenceDndFilled[size];
|
29
|
+
|
30
|
+
case 'offline':
|
31
|
+
return presenceIcons_1.presenceOfflineRegular[size];
|
32
|
+
|
33
|
+
case 'outOfOffice':
|
34
|
+
return presenceIcons_1.presenceOofRegular[size];
|
35
|
+
}
|
36
|
+
};
|
24
37
|
/**
|
25
38
|
* Returns the props and state required to render the component
|
26
39
|
*/
|
27
40
|
|
28
41
|
|
29
42
|
const usePresenceBadge = (props, ref) => {
|
30
|
-
var _a, _b
|
43
|
+
var _a, _b;
|
31
44
|
|
32
45
|
const state = { ...index_1.useBadge({
|
33
|
-
size: '
|
46
|
+
size: 'medium',
|
34
47
|
...props,
|
35
|
-
icon: react_utilities_1.resolveShorthand(
|
48
|
+
icon: react_utilities_1.resolveShorthand(undefined, {
|
36
49
|
required: true
|
37
50
|
})
|
38
51
|
}, ref),
|
39
52
|
status: (_a = props.status) !== null && _a !== void 0 ? _a : 'available',
|
40
53
|
outOfOffice: (_b = props.outOfOffice) !== null && _b !== void 0 ? _b : false
|
41
54
|
};
|
55
|
+
const IconElement = iconMap(state.status, state.outOfOffice, state.size);
|
42
56
|
|
43
|
-
if (
|
44
|
-
state.icon.children =
|
57
|
+
if (IconElement) {
|
58
|
+
state.icon.children = React.createElement(IconElement, null);
|
45
59
|
}
|
46
60
|
|
47
61
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadge.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,
|
1
|
+
{"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadge.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,MAAA,eAAA,gBAAA,OAAA,CAAA,iBAAA,CAAA;;AAWA,MAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AAGA,MAAM,OAAO,GAAG,CACd,MADc,EAEd,WAFc,EAGd,IAHc,KAIoB;AAClC,UAAQ,MAAR;AACE,SAAK,WAAL;AACE,aAAO,WAAW,GAAG,eAAA,CAAA,wBAAA,CAAyB,IAAzB,CAAH,GAAoC,eAAA,CAAA,uBAAA,CAAwB,IAAxB,CAAtD;;AACF,SAAK,MAAL;AACE,aAAO,WAAW,GAAG,eAAA,CAAA,sBAAA,CAAuB,IAAvB,CAAH,GAAkC,eAAA,CAAA,kBAAA,CAAmB,IAAnB,CAApD;;AACF,SAAK,MAAL;AACE,aAAO,WAAW,GAAG,eAAA,CAAA,sBAAA,CAAuB,IAAvB,CAAH,GAAkC,eAAA,CAAA,kBAAA,CAAmB,IAAnB,CAApD;;AACF,SAAK,cAAL;AACE,aAAO,WAAW,GAAG,eAAA,CAAA,kBAAA,CAAmB,IAAnB,CAAH,GAA8B,eAAA,CAAA,iBAAA,CAAkB,IAAlB,CAAhD;;AACF,SAAK,SAAL;AACE,aAAO,eAAA,CAAA,sBAAA,CAAuB,IAAvB,CAAP;;AACF,SAAK,aAAL;AACE,aAAO,eAAA,CAAA,kBAAA,CAAmB,IAAnB,CAAP;AAZJ;AAcD,CAnBD;AAqBA;;AAEG;;;AACI,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAA4B,GAA5B,KAA+E;;;AAC7G,QAAM,KAAK,GAAuB,EAChC,GAAG,OAAA,CAAA,QAAA,CACD;AACE,MAAA,IAAI,EAAE,QADR;AAEE,SAAG,KAFL;AAGE,MAAA,IAAI,EAAE,iBAAA,CAAA,gBAAA,CAAiB,SAAjB,EAA4B;AAChC,QAAA,QAAQ,EAAE;AADsB,OAA5B;AAHR,KADC,EAQD,GARC,CAD6B;AAWhC,IAAA,MAAM,EAAA,CAAA,EAAA,GAAE,KAAK,CAAC,MAAR,MAAc,IAAd,IAAc,EAAA,KAAA,KAAA,CAAd,GAAc,EAAd,GAAkB,WAXQ;AAYhC,IAAA,WAAW,EAAA,CAAA,EAAA,GAAE,KAAK,CAAC,WAAR,MAAmB,IAAnB,IAAmB,EAAA,KAAA,KAAA,CAAnB,GAAmB,EAAnB,GAAuB;AAZF,GAAlC;AAeA,QAAM,WAAW,GAAG,OAAO,CAAC,KAAK,CAAC,MAAP,EAAe,KAAK,CAAC,WAArB,EAAkC,KAAK,CAAC,IAAxC,CAA3B;;AACA,MAAI,WAAJ,EAAiB;AACf,IAAA,KAAK,CAAC,IAAN,CAAY,QAAZ,GAAuB,KAAA,CAAA,aAAA,CAAC,WAAD,EAAY,IAAZ,CAAvB;AACD;;AAED,SAAO,KAAP;AACD,CAtBM;;AAAM,OAAA,CAAA,gBAAA,GAAgB,gBAAhB","sourceRoot":""}
|
@@ -7,8 +7,6 @@ exports.usePresenceBadgeStyles = exports.presenceBadgeClassName = void 0;
|
|
7
7
|
|
8
8
|
const react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
|
9
9
|
|
10
|
-
const Badge_1 = /*#__PURE__*/require("../../Badge");
|
11
|
-
|
12
10
|
exports.presenceBadgeClassName = 'fui-PresenceBadge';
|
13
11
|
|
14
12
|
const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
@@ -17,56 +15,31 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
17
15
|
"z189sj": ["fhxju0i", "f1cnd47f"],
|
18
16
|
"Byoj8tv": "f1qch9an",
|
19
17
|
"uwmqm3": ["f1cnd47f", "fhxju0i"],
|
20
|
-
"
|
21
|
-
"
|
22
|
-
"
|
23
|
-
"
|
24
|
-
|
25
|
-
|
26
|
-
"
|
27
|
-
"Bekrc4i": ["f5tn483", "f1ojsxk5"],
|
28
|
-
"Bn0qgzm": "f1vxd6vx",
|
29
|
-
"ibv6hh": ["f1ojsxk5", "f5tn483"]
|
18
|
+
"mc9l5x": "ftuwxu6",
|
19
|
+
"B7ck84d": "f1ewtqcl",
|
20
|
+
"Bt984gj": "f122n59",
|
21
|
+
"Brf1p80": "f4d9j23",
|
22
|
+
"Bhmb4qv": "fb8jth9",
|
23
|
+
"Dimara": "f5q2cvs",
|
24
|
+
"De3pzq": "fxugw4r"
|
30
25
|
},
|
31
26
|
"statusBusy": {
|
32
|
-
"
|
33
|
-
"g2u3we": "f11ttmz8",
|
34
|
-
"h3c5rm": ["f1ratw88", "f459ikj"],
|
35
|
-
"B9xav0g": "fvovscg",
|
36
|
-
"zhjwy3": ["f459ikj", "f1ratw88"]
|
27
|
+
"sj55zd": "fvi85wt"
|
37
28
|
},
|
38
29
|
"statusAway": {
|
39
|
-
"
|
40
|
-
"g2u3we": "f1skk3ns",
|
41
|
-
"h3c5rm": ["f766wml", "f1rnrfqa"],
|
42
|
-
"B9xav0g": "fb8zvtn",
|
43
|
-
"zhjwy3": ["f1rnrfqa", "f766wml"]
|
30
|
+
"sj55zd": "f14k8a89"
|
44
31
|
},
|
45
32
|
"statusAvailable": {
|
46
|
-
"
|
47
|
-
"g2u3we": "f1t9i9vy",
|
48
|
-
"h3c5rm": ["f1r5awo9", "fnfhfy0"],
|
49
|
-
"B9xav0g": "fgfkvtu",
|
50
|
-
"zhjwy3": ["fnfhfy0", "f1r5awo9"]
|
33
|
+
"sj55zd": "fqa5hgp"
|
51
34
|
},
|
52
35
|
"statusOffline": {
|
53
|
-
"
|
54
|
-
"sj55zd": "f11d4kpn",
|
55
|
-
"g2u3we": "fi2z7s6",
|
56
|
-
"h3c5rm": ["f1agc6it", "f1sit5hz"],
|
57
|
-
"B9xav0g": "f9pok3v",
|
58
|
-
"zhjwy3": ["f1sit5hz", "f1agc6it"]
|
36
|
+
"sj55zd": "f11d4kpn"
|
59
37
|
},
|
60
38
|
"statusOutOfOffice": {
|
61
|
-
"
|
62
|
-
"sj55zd": "fdce8r3",
|
63
|
-
"g2u3we": "f161shwc",
|
64
|
-
"h3c5rm": ["fbde6ui", "f7rrh46"],
|
65
|
-
"B9xav0g": "f1yt3bcc",
|
66
|
-
"zhjwy3": ["f7rrh46", "fbde6ui"]
|
39
|
+
"sj55zd": "fdce8r3"
|
67
40
|
},
|
68
41
|
"outOfOffice": {
|
69
|
-
"
|
42
|
+
"sj55zd": "fr0bkrk"
|
70
43
|
},
|
71
44
|
"outOfOfficeAvailable": {
|
72
45
|
"sj55zd": "fqa5hgp"
|
@@ -76,9 +49,27 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
76
49
|
},
|
77
50
|
"outOfOfficeAway": {
|
78
51
|
"sj55zd": "f14k8a89"
|
52
|
+
},
|
53
|
+
"tiny": {
|
54
|
+
"Bubjx69": "f9ikmtg",
|
55
|
+
"a9b677": "f16dn6v3",
|
56
|
+
"B5pe6w7": "fab5kbq",
|
57
|
+
"p4uzdd": "f1ms1d91"
|
58
|
+
},
|
59
|
+
"large": {
|
60
|
+
"Bubjx69": "f9ikmtg",
|
61
|
+
"a9b677": "f64fuq3",
|
62
|
+
"B5pe6w7": "f1vfi1yj",
|
63
|
+
"p4uzdd": "f15s34gz"
|
64
|
+
},
|
65
|
+
"extraLarge": {
|
66
|
+
"Bubjx69": "f9ikmtg",
|
67
|
+
"a9b677": "f1w9dchk",
|
68
|
+
"B5pe6w7": "f14efy9b",
|
69
|
+
"p4uzdd": "fhipgdu"
|
79
70
|
}
|
80
71
|
}, {
|
81
|
-
"d": [".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".
|
72
|
+
"d": [".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".f1ewtqcl{box-sizing:border-box;}", ".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".f4d9j23{-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}", ".fb8jth9 span{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}", ".f5q2cvs{border-radius:50%;}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".fvi85wt{color:var(--colorPaletteRedBackground3);}", ".f14k8a89{color:var(--colorPaletteMarigoldBackground3);}", ".fqa5hgp{color:var(--colorPaletteLightGreenForeground3);}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fdce8r3{color:var(--colorPaletteBerryForeground3);}", ".fr0bkrk{color:var(--colorNeutralBackground1);}", ".f9ikmtg{aspect-ratio:1;}", ".f16dn6v3{width:6px;}", ".fab5kbq svg{width:6px!important;}", ".f1ms1d91 svg{height:6px!important;}", ".f64fuq3{width:20px;}", ".f1vfi1yj svg{width:20px!important;}", ".f15s34gz svg{height:20px!important;}", ".f1w9dchk{width:28px;}", ".f14efy9b svg{width:28px!important;}", ".fhipgdu svg{height:28px!important;}"]
|
82
73
|
});
|
83
74
|
/**
|
84
75
|
* Applies style classnames to slots
|
@@ -87,8 +78,8 @@ const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
87
78
|
|
88
79
|
const usePresenceBadgeStyles = state => {
|
89
80
|
const styles = useStyles();
|
90
|
-
state.root.className = react_make_styles_1.mergeClasses(exports.presenceBadgeClassName, styles.root, (state.status === 'busy' || state.status === 'doNotDisturb') && styles.statusBusy, state.status === 'away' && styles.statusAway, state.status === 'available' && styles.statusAvailable, state.status === 'offline' && styles.statusOffline, state.status === 'outOfOffice' && styles.statusOutOfOffice, state.outOfOffice && styles.outOfOffice, state.outOfOffice && state.status === 'available' && styles.outOfOfficeAvailable, state.outOfOffice && (state.status === 'busy' || state.status === 'doNotDisturb') && styles.outOfOfficeBusy, state.outOfOffice && state.status === 'away' && styles.outOfOfficeAway,
|
91
|
-
return
|
81
|
+
state.root.className = react_make_styles_1.mergeClasses(exports.presenceBadgeClassName, styles.root, (state.status === 'busy' || state.status === 'doNotDisturb') && styles.statusBusy, state.status === 'away' && styles.statusAway, state.status === 'available' && styles.statusAvailable, state.status === 'offline' && styles.statusOffline, state.status === 'outOfOffice' && styles.statusOutOfOffice, state.outOfOffice && styles.outOfOffice, state.outOfOffice && state.status === 'available' && styles.outOfOfficeAvailable, state.outOfOffice && (state.status === 'busy' || state.status === 'doNotDisturb') && styles.outOfOfficeBusy, state.outOfOffice && state.status === 'away' && styles.outOfOfficeAway, state.outOfOffice && state.status === 'offline' && styles.statusOffline, state.outOfOffice && state.status === 'outOfOffice' && styles.statusOutOfOffice, state.size === 'tiny' && styles.tiny, state.size === 'large' && styles.large, state.size === 'extra-large' && styles.extraLarge, state.root.className);
|
82
|
+
return state;
|
92
83
|
};
|
93
84
|
|
94
85
|
exports.usePresenceBadgeStyles = usePresenceBadgeStyles;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadgeStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;
|
1
|
+
{"version":3,"s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B,KAAK,CAAC,MAAN,KAAiB,WAAtC,IAAqD,MAAM,CAAC,oBATvC,EAUrB,KAAK,CAAC,WAAN,KAAsB,KAAK,CAAC,MAAN,KAAiB,MAAjB,IAA2B,KAAK,CAAC,MAAN,KAAiB,cAAlE,KAAqF,MAAM,CAAC,eAVvE,EAWrB,KAAK,CAAC,WAAN,IAAqB,KAAK,CAAC,MAAN,KAAiB,MAAtC,IAAgD,MAAM,CAAC,eAXlC,EAYrB,KAAK,CAAC,WAAN,IAAqB,KAAK,CAAC,MAAN,KAAiB,SAAtC,IAAmD,MAAM,CAAC,aAZrC,EAarB,KAAK,CAAC,WAAN,IAAqB,KAAK,CAAC,MAAN,KAAiB,aAAtC,IAAuD,MAAM,CAAC,iBAbzC,EAcrB,KAAK,CAAC,IAAN,KAAe,MAAf,IAAyB,MAAM,CAAC,IAdX,EAerB,KAAK,CAAC,IAAN,KAAe,OAAf,IAA0B,MAAM,CAAC,KAfZ,EAgBrB,KAAK,CAAC,IAAN,KAAe,aAAf,IAAgC,MAAM,CAAC,UAhBlB,EAiBrB,KAAK,CAAC,IAAN,CAAW,SAjBU,CAAvB;AAoBA,SAAO,KAAP;AACD,CAvBM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourceRoot":""}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@fluentui/react-badge",
|
3
|
-
"version": "9.0.0-beta.
|
3
|
+
"version": "9.0.0-beta.4",
|
4
4
|
"description": "React components for building web experiences",
|
5
5
|
"main": "lib-commonjs/index.js",
|
6
6
|
"module": "lib/index.js",
|
@@ -21,15 +21,16 @@
|
|
21
21
|
"start": "yarn storybook",
|
22
22
|
"test": "jest",
|
23
23
|
"docs": "api-extractor run --config=config/api-extractor.local.json --local",
|
24
|
-
"build:local": "tsc -p . --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output dist/react-badge/src && yarn docs",
|
25
|
-
"storybook": "start-storybook"
|
24
|
+
"build:local": "tsc -p ./tsconfig.lib.json --module esnext --emitDeclarationOnly && node ../../scripts/typescript/normalize-import --output ./dist/packages/react-badge/src && yarn docs",
|
25
|
+
"storybook": "start-storybook",
|
26
|
+
"type-check": "tsc -b tsconfig.json"
|
26
27
|
},
|
27
28
|
"devDependencies": {
|
28
|
-
"@fluentui/babel-make-styles": "9.0.0-beta.
|
29
|
+
"@fluentui/babel-make-styles": "9.0.0-beta.4",
|
29
30
|
"@fluentui/eslint-plugin": "*",
|
30
|
-
"@fluentui/jest-serializer-make-styles": "9.0.0-beta.
|
31
|
+
"@fluentui/jest-serializer-make-styles": "9.0.0-beta.4",
|
31
32
|
"@fluentui/react-conformance": "*",
|
32
|
-
"@fluentui/react-conformance-make-styles": "9.0.0-beta.
|
33
|
+
"@fluentui/react-conformance-make-styles": "9.0.0-beta.4",
|
33
34
|
"@fluentui/scripts": "^1.0.0",
|
34
35
|
"@types/enzyme": "3.10.3",
|
35
36
|
"@types/enzyme-adapter-react-16": "1.0.3",
|
@@ -43,9 +44,10 @@
|
|
43
44
|
"react-test-renderer": "^16.3.0"
|
44
45
|
},
|
45
46
|
"dependencies": {
|
46
|
-
"@fluentui/react-
|
47
|
-
"@fluentui/react-
|
48
|
-
"@fluentui/react-
|
47
|
+
"@fluentui/react-icons": "^2.0.152-beta.3",
|
48
|
+
"@fluentui/react-make-styles": "9.0.0-beta.4",
|
49
|
+
"@fluentui/react-theme": "9.0.0-beta.4",
|
50
|
+
"@fluentui/react-utilities": "9.0.0-beta.4",
|
49
51
|
"tslib": "^2.1.0"
|
50
52
|
},
|
51
53
|
"peerDependencies": {
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { isConformant as baseIsConformant } from '@fluentui/react-conformance';
|
2
|
-
import makeStylesTests from '@fluentui/react-conformance-make-styles';
|
3
|
-
export function isConformant(testInfo) {
|
4
|
-
const defaultOptions = {
|
5
|
-
asPropHandlesRef: true,
|
6
|
-
componentPath: module.parent.filename.replace('.test', ''),
|
7
|
-
// https://github.com/microsoft/fluentui/issues/19522
|
8
|
-
skipAsPropTests: true,
|
9
|
-
extraTests: makeStylesTests
|
10
|
-
};
|
11
|
-
baseIsConformant(defaultOptions, testInfo);
|
12
|
-
}
|
13
|
-
//# sourceMappingURL=isConformant.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":"AAAA,SAAS,YAAY,IAAI,gBAAzB,QAAiD,6BAAjD;AACA,OAAO,eAAP,MAA4B,yCAA5B;AAGA,OAAM,SAAU,YAAV,CACJ,QADI,EACqF;AAEzF,QAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D;AACA,IAAA,eAAe,EAAE,IAJ0C;AAK3D,IAAA,UAAU,EAAE;AAL+C,GAA7D;AAQA,EAAA,gBAAgB,CAAC,cAAD,EAAiB,QAAjB,CAAhB;AACD","sourceRoot":""}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
export declare const renderIcon: (SVGElement: (props: {
|
3
|
-
svgClasses: string;
|
4
|
-
}) => JSX.Element) => React.FC<React.HTMLAttributes<HTMLSpanElement>>;
|
5
|
-
declare const SkypeMinusIcon: React.FC<React.HTMLAttributes<HTMLSpanElement>>;
|
6
|
-
declare const SkypeClockIcon: React.FC<React.HTMLAttributes<HTMLSpanElement>>;
|
7
|
-
declare const SkypeCheckIcon: React.FC<React.HTMLAttributes<HTMLSpanElement>>;
|
8
|
-
declare const SkypeArrowIcon: React.FC<React.HTMLAttributes<HTMLSpanElement>>;
|
9
|
-
declare const CancelIcon: React.FC<React.HTMLAttributes<HTMLSpanElement>>;
|
10
|
-
export { SkypeMinusIcon, SkypeClockIcon, SkypeCheckIcon, SkypeArrowIcon, CancelIcon };
|
@@ -1,98 +0,0 @@
|
|
1
|
-
import { mergeClasses, __styles } from '@fluentui/react-make-styles';
|
2
|
-
import { getNativeProps, htmlElementProperties } from '@fluentui/react-utilities';
|
3
|
-
import * as React from 'react';
|
4
|
-
|
5
|
-
const useStyles = /*#__PURE__*/__styles({
|
6
|
-
"root": {
|
7
|
-
"mc9l5x": "f14t3ns0",
|
8
|
-
"ha4doy": "fmrv4ls",
|
9
|
-
"fb3t49": "fdgdznj",
|
10
|
-
"a9b677": "fhson10",
|
11
|
-
"Bqenvij": "f1un31zh"
|
12
|
-
},
|
13
|
-
"svg": {
|
14
|
-
"Bqenvij": "f1l02sjl",
|
15
|
-
"Bkfmm31": "f1w9h62z",
|
16
|
-
"ha4doy": "f12kltsn"
|
17
|
-
}
|
18
|
-
}, {
|
19
|
-
"d": [".f14t3ns0{display:inline-block;}", ".fmrv4ls{vertical-align:middle;}", ".fdgdznj{speak:none;}", ".fhson10{width:1em;}", ".f1un31zh{height:1em;}", ".f1l02sjl{height:100%;}", ".f1w9h62z{fill:currentColor;}", ".f12kltsn{vertical-align:top;}"]
|
20
|
-
}); //
|
21
|
-
// !!! A temporary workaround to avoid dependencies on any icon packages.
|
22
|
-
// !!! A usage of converged icon package should be considered.
|
23
|
-
//
|
24
|
-
|
25
|
-
|
26
|
-
const useIconProps = props => {
|
27
|
-
const containerProps = props['aria-label'] ? {} : {
|
28
|
-
role: 'presentation',
|
29
|
-
['aria-hidden']: true
|
30
|
-
};
|
31
|
-
const nativeProps = getNativeProps(props, htmlElementProperties);
|
32
|
-
const styles = useStyles();
|
33
|
-
const rootClasses = styles.root;
|
34
|
-
const svgClasses = styles.svg;
|
35
|
-
return {
|
36
|
-
containerProps,
|
37
|
-
nativeProps,
|
38
|
-
rootClasses,
|
39
|
-
svgClasses
|
40
|
-
};
|
41
|
-
};
|
42
|
-
|
43
|
-
export const renderIcon = SVGElement => props => {
|
44
|
-
const {
|
45
|
-
containerProps,
|
46
|
-
nativeProps,
|
47
|
-
rootClasses,
|
48
|
-
svgClasses
|
49
|
-
} = useIconProps(props);
|
50
|
-
return /*#__PURE__*/React.createElement('span', { ...containerProps,
|
51
|
-
...nativeProps,
|
52
|
-
className: mergeClasses(rootClasses, props.className)
|
53
|
-
}, /*#__PURE__*/React.createElement(SVGElement, {
|
54
|
-
svgClasses: svgClasses
|
55
|
-
}));
|
56
|
-
};
|
57
|
-
const SkypeMinusIcon = /*#__PURE__*/renderIcon(props => /*#__PURE__*/React.createElement("svg", {
|
58
|
-
xmlns: "http://www.w3.org/2000/svg",
|
59
|
-
viewBox: "0 0 2048 2048",
|
60
|
-
className: props.svgClasses
|
61
|
-
}, /*#__PURE__*/React.createElement("path", {
|
62
|
-
d: "M1591 823q42 0 78 16t64 43 43 63 16 79q0 42-16 78t-43 64-63 43-79 16H395q-42 0-78-16t-64-43-42-63-16-79q0-42 15-78t43-64 63-43 79-16h1196z"
|
63
|
-
})));
|
64
|
-
SkypeMinusIcon.displayName = 'SkypeMinusIcon';
|
65
|
-
const SkypeClockIcon = /*#__PURE__*/renderIcon(props => /*#__PURE__*/React.createElement("svg", {
|
66
|
-
xmlns: "http://www.w3.org/2000/svg",
|
67
|
-
viewBox: "0 0 2048 2048",
|
68
|
-
className: props.svgClasses
|
69
|
-
}, /*#__PURE__*/React.createElement("path", {
|
70
|
-
d: "M1431 1705q28 28 43 65t15 77q0 42-15 78t-43 64-63 43-79 16q-83 0-142-59l-594-593q-28-28-43-65t-15-77V201q0-42 15-78t43-64 63-43 79-16q42 0 78 16t64 43 43 63 16 79v970l535 534z"
|
71
|
-
})));
|
72
|
-
SkypeClockIcon.displayName = 'SkypeClockIcon';
|
73
|
-
const SkypeCheckIcon = /*#__PURE__*/renderIcon(props => /*#__PURE__*/React.createElement("svg", {
|
74
|
-
xmlns: "http://www.w3.org/2000/svg",
|
75
|
-
viewBox: "0 0 2048 2048",
|
76
|
-
className: props.svgClasses
|
77
|
-
}, /*#__PURE__*/React.createElement("path", {
|
78
|
-
d: "M1570 437q42 0 78 15t64 43 42 63 16 79q0 40-15 77t-43 65l-794 795q-28 28-65 43t-77 16q-40 0-77-15t-65-44l-362-362q-28-28-43-65t-16-77q0-42 16-78t43-64 63-42 79-16q40 0 77 15t65 43l220 220 652-653q28-28 65-43t77-15z"
|
79
|
-
})));
|
80
|
-
SkypeCheckIcon.displayName = 'SkypeCheckIcon';
|
81
|
-
const SkypeArrowIcon = /*#__PURE__*/renderIcon(props => /*#__PURE__*/React.createElement("svg", {
|
82
|
-
xmlns: "http://www.w3.org/2000/svg",
|
83
|
-
viewBox: "0 0 2048 2048",
|
84
|
-
className: props.svgClasses
|
85
|
-
}, /*#__PURE__*/React.createElement("path", {
|
86
|
-
d: "M1980 964q0 41-15 77t-43 63-63 42-77 16H739l281 280q28 27 43 64t15 76q0 41-15 77t-43 63-63 42-77 16q-39 0-75-15t-65-43l-615-616q-33-33-47-68t-14-82q0-39 17-73t44-61l615-616q28-28 65-43t76-15q41 0 77 16t62 43 42 63 16 77q0 39-15 75t-43 64L739 766h1043q41 0 77 15t63 43 42 63 16 77z"
|
87
|
-
})));
|
88
|
-
SkypeArrowIcon.displayName = 'SkypeArrowIcon';
|
89
|
-
const CancelIcon = /*#__PURE__*/renderIcon(props => /*#__PURE__*/React.createElement("svg", {
|
90
|
-
xmlns: "http://www.w3.org/2000/svg",
|
91
|
-
viewBox: "0 0 2048 2048",
|
92
|
-
className: props.svgClasses
|
93
|
-
}, /*#__PURE__*/React.createElement("path", {
|
94
|
-
d: "M1115 1024l690 691-90 90-691-690-691 690-90-90 690-691-690-691 90-90 691 690 691-690 90 90-690 691z"
|
95
|
-
})));
|
96
|
-
CancelIcon.displayName = 'CancelIcon';
|
97
|
-
export { SkypeMinusIcon, SkypeClockIcon, SkypeCheckIcon, SkypeArrowIcon, CancelIcon };
|
98
|
-
//# sourceMappingURL=DefaultPresenceBadgeIcons.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PresenceBadge/DefaultPresence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;AAAM,EAAA,CAAC,EAAC;AAAR,CAAA,CADF,CAD+B,CAAjC;AAMA,cAAc,CAAC,WAAf,GAA6B,gBAA7B;AAEA,MAAM,UAAU,gBAAG,UAAU,CAAC,KAAK,iBACjC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,EAAA,KAAK,EAAC,4BAAX;AAAwC,EAAA,OAAO,EAAC,eAAhD;AAAgE,EAAA,SAAS,EAAE,KAAK,CAAC;AAAjF,CAAA,eACE,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAM,EAAA,CAAC,EAAC;AAAR,CAAA,CADF,CAD2B,CAA7B;AAMA,UAAU,CAAC,WAAX,GAAyB,YAAzB;AAEA,SAAS,cAAT,EAAyB,cAAzB,EAAyC,cAAzC,EAAyD,cAAzD,EAAyE,UAAzE","sourceRoot":""}
|
@@ -1,24 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
4
|
-
value: true
|
5
|
-
});
|
6
|
-
exports.isConformant = void 0;
|
7
|
-
|
8
|
-
const react_conformance_1 = /*#__PURE__*/require("@fluentui/react-conformance");
|
9
|
-
|
10
|
-
const react_conformance_make_styles_1 = /*#__PURE__*/require("@fluentui/react-conformance-make-styles");
|
11
|
-
|
12
|
-
function isConformant(testInfo) {
|
13
|
-
const defaultOptions = {
|
14
|
-
asPropHandlesRef: true,
|
15
|
-
componentPath: module.parent.filename.replace('.test', ''),
|
16
|
-
// https://github.com/microsoft/fluentui/issues/19522
|
17
|
-
skipAsPropTests: true,
|
18
|
-
extraTests: react_conformance_make_styles_1.default
|
19
|
-
};
|
20
|
-
react_conformance_1.isConformant(defaultOptions, testInfo);
|
21
|
-
}
|
22
|
-
|
23
|
-
exports.isConformant = isConformant;
|
24
|
-
//# sourceMappingURL=isConformant.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":";;;;;;;AAAA,MAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,MAAA,+BAAA,gBAAA,OAAA,CAAA,yCAAA,CAAA;;AAGA,SAAgB,YAAhB,CACE,QADF,EAC2F;AAEzF,QAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D;AACA,IAAA,eAAe,EAAE,IAJ0C;AAK3D,IAAA,UAAU,EAAE,+BAAA,CAAA;AAL+C,GAA7D;AAQA,EAAA,mBAAA,CAAA,YAAA,CAAiB,cAAjB,EAAiC,QAAjC;AACD;;AAZD,OAAA,CAAA,YAAA,GAAA,YAAA","sourceRoot":""}
|