@fluentui/react-badge 0.0.0-nightly0e0cf06c3420211029.1 → 0.0.0-nightlyed2d7c8d6320211111.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +34 -16
- package/CHANGELOG.md +13 -11
- package/dist/react-badge.d.ts +6 -0
- package/lib/common/isConformant.js +1 -1
- package/lib/common/isConformant.js.map +1 -1
- package/lib/components/Badge/Badge.js +2 -2
- package/lib/components/Badge/Badge.js.map +1 -1
- package/lib/components/Badge/renderBadge.js +6 -7
- package/lib/components/Badge/renderBadge.js.map +1 -1
- package/lib/components/Badge/useBadge.js +19 -22
- package/lib/components/Badge/useBadge.js.map +1 -1
- package/lib/components/Badge/useBadgeStyles.d.ts +1 -0
- package/lib/components/Badge/useBadgeStyles.js +16 -15
- package/lib/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.js +2 -2
- package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadge.js +18 -24
- package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadgeStyles.d.ts +1 -0
- package/lib/components/CounterBadge/useCounterBadgeStyles.js +5 -4
- package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js +62 -75
- package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.js +2 -2
- package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
- package/lib/components/PresenceBadge/usePresenceBadge.js +17 -20
- package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.d.ts +1 -0
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +5 -4
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
- package/lib-commonjs/Badge.js +1 -1
- package/lib-commonjs/CounterBadge.js +1 -1
- package/lib-commonjs/PresenceBadge.js +1 -1
- package/lib-commonjs/common/isConformant.js +3 -3
- package/lib-commonjs/common/isConformant.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.js +6 -6
- package/lib-commonjs/components/Badge/Badge.js.map +1 -1
- package/lib-commonjs/components/Badge/index.js +1 -1
- package/lib-commonjs/components/Badge/renderBadge.js +8 -10
- package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
- package/lib-commonjs/components/Badge/useBadge.js +20 -24
- package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
- package/lib-commonjs/components/Badge/useBadgeStyles.d.ts +1 -0
- package/lib-commonjs/components/Badge/useBadgeStyles.js +19 -17
- package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.js +6 -6
- package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/index.js +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js +19 -26
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.d.ts +1 -0
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +9 -7
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js +65 -79
- package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.js +6 -6
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/index.js +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +21 -25
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.d.ts +1 -0
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +9 -7
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
- package/lib-commonjs/index.js +1 -1
- package/package.json +7 -7
@@ -1,9 +1,8 @@
|
|
1
|
-
import { __assign } from "tslib";
|
2
1
|
import { mergeClasses, __styles } from '@fluentui/react-make-styles';
|
3
2
|
import { getNativeProps, htmlElementProperties } from '@fluentui/react-utilities';
|
4
3
|
import * as React from 'react';
|
5
4
|
|
6
|
-
|
5
|
+
const useStyles = /*#__PURE__*/__styles({
|
7
6
|
"root": {
|
8
7
|
"mc9l5x": "f14t3ns0",
|
9
8
|
"ha4doy": "fmrv4ls",
|
@@ -24,88 +23,76 @@ var useStyles = /*#__PURE__*/__styles({
|
|
24
23
|
//
|
25
24
|
|
26
25
|
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
var svgClasses = styles.svg;
|
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;
|
37
35
|
return {
|
38
|
-
containerProps
|
39
|
-
nativeProps
|
40
|
-
rootClasses
|
41
|
-
svgClasses
|
36
|
+
containerProps,
|
37
|
+
nativeProps,
|
38
|
+
rootClasses,
|
39
|
+
svgClasses
|
42
40
|
};
|
43
41
|
};
|
44
42
|
|
45
|
-
export
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
}));
|
58
|
-
};
|
59
|
-
};
|
60
|
-
var SkypeMinusIcon = /*#__PURE__*/renderIcon(function (props) {
|
61
|
-
return /*#__PURE__*/React.createElement("svg", {
|
62
|
-
xmlns: "http://www.w3.org/2000/svg",
|
63
|
-
viewBox: "0 0 2048 2048",
|
64
|
-
className: props.svgClasses
|
65
|
-
}, /*#__PURE__*/React.createElement("path", {
|
66
|
-
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"
|
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
|
67
55
|
}));
|
68
|
-
}
|
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
|
+
})));
|
69
64
|
SkypeMinusIcon.displayName = 'SkypeMinusIcon';
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
}));
|
78
|
-
});
|
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
|
+
})));
|
79
72
|
SkypeClockIcon.displayName = 'SkypeClockIcon';
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
}));
|
88
|
-
});
|
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
|
+
})));
|
89
80
|
SkypeCheckIcon.displayName = 'SkypeCheckIcon';
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
}));
|
98
|
-
});
|
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
|
+
})));
|
99
88
|
SkypeArrowIcon.displayName = 'SkypeArrowIcon';
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
}));
|
108
|
-
});
|
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
|
+
})));
|
109
96
|
CancelIcon.displayName = 'CancelIcon';
|
110
97
|
export { SkypeMinusIcon, SkypeClockIcon, SkypeCheckIcon, SkypeArrowIcon, CancelIcon };
|
111
98
|
//# sourceMappingURL=DefaultPresenceBadgeIcons.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PresenceBadge/DefaultPresenceBadgeIcons.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/components/PresenceBadge/DefaultPresenceBadgeIcons.tsx"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;AACA,SAAS,cAAT,EAAyB,qBAAzB,QAAsD,2BAAtD;AACA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;;AAEA,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB,C,CAeA;AACA;AACA;AACA;;;AAEA,MAAM,YAAY,GAAI,KAAD,IAAiD;AACpE,QAAM,cAAc,GAAG,KAAK,CAAC,YAAD,CAAL,GACnB,EADmB,GAEnB;AACE,IAAA,IAAI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AyB,YAAzB;AAEA,SAAS,cAAT,EAAyB,cAAzB,EAAyC,cAAzC,EAAyD,cAAzD,EAAyE,UAAzE","sourceRoot":""}
|
@@ -6,8 +6,8 @@ import { renderBadge } from '../../Badge';
|
|
6
6
|
* Define a styled Badge, using the `useBadge` hook.
|
7
7
|
*/
|
8
8
|
|
9
|
-
export
|
10
|
-
|
9
|
+
export const PresenceBadge = /*#__PURE__*/React.forwardRef((props, ref) => {
|
10
|
+
const state = usePresenceBadge(props, ref);
|
11
11
|
usePresenceBadgeStyles(state);
|
12
12
|
return renderBadge(state);
|
13
13
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PresenceBadge/PresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,oBAAjC;AACA,SAAS,sBAAT,QAAuC,0BAAvC;AACA,SAAS,WAAT,QAA4B,aAA5B;AAIA;;AAEG;;AACH,OAAO,
|
1
|
+
{"version":3,"sources":["../../../src/components/PresenceBadge/PresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,oBAAjC;AACA,SAAS,sBAAT,QAAuC,0BAAvC;AACA,SAAS,WAAT,QAA4B,aAA5B;AAIA;;AAEG;;AACH,OAAO,MAAM,aAAa,gBAA4C,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpG,QAAM,KAAK,GAAG,gBAAgB,CAAC,KAAD,EAAQ,GAAR,CAA9B;AACA,EAAA,sBAAsB,CAAC,KAAD,CAAtB;AAEA,SAAO,WAAW,CAAC,KAAD,CAAlB;AACD,CALqE,CAA/D;AAOP,aAAa,CAAC,WAAd,GAA4B,eAA5B","sourceRoot":""}
|
@@ -1,37 +1,34 @@
|
|
1
|
-
import { __assign } from "tslib";
|
2
1
|
import * as React from 'react';
|
3
2
|
import { resolveShorthand } from '@fluentui/react-utilities';
|
4
3
|
import { useBadge } from '../Badge/index';
|
5
4
|
import { SkypeMinusIcon, SkypeClockIcon, SkypeArrowIcon, SkypeCheckIcon, CancelIcon } from './DefaultPresenceBadgeIcons';
|
6
5
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
};
|
16
|
-
};
|
6
|
+
const iconMap = outOfOffice => ({
|
7
|
+
busy: null,
|
8
|
+
available: outOfOffice ? /*#__PURE__*/React.createElement(SkypeArrowIcon, null) : /*#__PURE__*/React.createElement(SkypeCheckIcon, null),
|
9
|
+
away: outOfOffice ? /*#__PURE__*/React.createElement(SkypeArrowIcon, null) : /*#__PURE__*/React.createElement(SkypeClockIcon, null),
|
10
|
+
offline: /*#__PURE__*/React.createElement(CancelIcon, null),
|
11
|
+
outOfOffice: /*#__PURE__*/React.createElement(SkypeArrowIcon, null),
|
12
|
+
doNotDisturb: /*#__PURE__*/React.createElement(SkypeMinusIcon, null)
|
13
|
+
});
|
17
14
|
/**
|
18
15
|
* Returns the props and state required to render the component
|
19
16
|
*/
|
20
17
|
|
21
18
|
|
22
|
-
export
|
19
|
+
export const usePresenceBadge = (props, ref) => {
|
23
20
|
var _a, _b, _c;
|
24
21
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
22
|
+
const state = { ...useBadge({
|
23
|
+
size: 'small',
|
24
|
+
...props,
|
25
|
+
icon: resolveShorthand(props.icon, {
|
26
|
+
required: true
|
27
|
+
})
|
28
|
+
}, ref),
|
32
29
|
status: (_a = props.status) !== null && _a !== void 0 ? _a : 'available',
|
33
30
|
outOfOffice: (_b = props.outOfOffice) !== null && _b !== void 0 ? _b : false
|
34
|
-
}
|
31
|
+
};
|
35
32
|
|
36
33
|
if (!((_c = state.icon) === null || _c === void 0 ? void 0 : _c.children)) {
|
37
34
|
state.icon.children = iconMap(state.outOfOffice)[state.status];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadge.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,2BAAjC;AACA,SAAS,QAAT,QAAyB,gBAAzB;AACA,SACE,cADF,EAEE,cAFF,EAGE,cAHF,EAIE,cAJF,EAKE,UALF,QAMO,6BANP;;AASA,MAAM,OAAO,GAA8E,WAAW,KAAK;AACzG,EAAA,IAAI,EAAE,IADmG;AAEzG,EAAA,SAAS,EAAE,WAAW,gBAAG,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe,IAAf,CAAH,gBAAwB,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe,IAAf,CAF2D;AAGzG,EAAA,IAAI,EAAE,WAAW,gBAAG,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe,IAAf,CAAH,gBAAwB,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe,IAAf,CAHgE;AAIzG,EAAA,OAAO,eAAE,KAAA,CAAA,aAAA,CAAC,UAAD,EAAW,IAAX,CAJgG;AAKzG,EAAA,WAAW,eAAE,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe,IAAf,CAL4F;AAMzG,EAAA,YAAY,eAAE,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe,IAAf;AAN2F,CAAL,CAAtG;AASA;;AAEG;;;AACH,OAAO,MAAM,gBAAgB,GAAG,CAAC,KAAD,EAA4B,GAA5B,KAA+E;;;AAC7G,QAAM,KAAK,GAAuB,EAChC,GAAG,QAAQ,CACT;AACE,MAAA,IAAI,EAAE,OADR;AAEE,SAAG,KAFL;AAGE,MAAA,IAAI,EAAE,gBAAgB,CAAC,KAAK,CAAC,IAAP,EAAa;AACjC,QAAA,QAAQ,EAAE;AADuB,OAAb;AAHxB,KADS,EAQT,GARS,CADqB;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,MAAI,EAAA,CAAA,EAAA,GAAC,KAAK,CAAC,IAAP,MAAW,IAAX,IAAW,EAAA,KAAA,KAAA,CAAX,GAAW,KAAA,CAAX,GAAW,EAAA,CAAE,QAAb,CAAJ,EAA2B;AACzB,IAAA,KAAK,CAAC,IAAN,CAAY,QAAZ,GAAuB,OAAO,CAAC,KAAK,CAAC,WAAP,CAAP,CAA2B,KAAK,CAAC,MAAjC,CAAvB;AACD;;AAED,SAAO,KAAP;AACD,CArBM","sourceRoot":""}
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import { mergeClasses, __styles } from '@fluentui/react-make-styles';
|
2
2
|
import { useBadgeStyles } from '../../Badge';
|
3
|
+
export const presenceBadgeClassName = 'fui-PresenceBadge';
|
3
4
|
|
4
|
-
|
5
|
+
const useStyles = /*#__PURE__*/__styles({
|
5
6
|
"root": {
|
6
7
|
"z8tnut": "f1g0x7ka",
|
7
8
|
"z189sj": ["fhxju0i", "f1cnd47f"],
|
@@ -75,9 +76,9 @@ var useStyles = /*#__PURE__*/__styles({
|
|
75
76
|
*/
|
76
77
|
|
77
78
|
|
78
|
-
export
|
79
|
-
|
80
|
-
state.root.className = mergeClasses(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.size === 'tiny' || state.size === 'extra-small') && styles.thinBorder, state.root.className);
|
79
|
+
export const usePresenceBadgeStyles = state => {
|
80
|
+
const styles = useStyles();
|
81
|
+
state.root.className = mergeClasses(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.size === 'tiny' || state.size === 'extra-small') && styles.thinBorder, state.root.className);
|
81
82
|
return useBadgeStyles(state);
|
82
83
|
};
|
83
84
|
//# sourceMappingURL=usePresenceBadgeStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadgeStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;AACA,SAAS,cAAT,QAA+B,aAA/B
|
1
|
+
{"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadgeStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;AACA,SAAS,cAAT,QAA+B,aAA/B;AAGA,OAAO,MAAM,sBAAsB,GAAG,mBAA/B;;AAEP,MAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AAzC,KAA2D,MAAM,CAAC,UAZjC,EAajC,KAAK,CAAC,IAAN,CAAW,SAbsB,CAAnC;AAgBA,SAAO,cAAc,CAAC,KAAD,CAArB;AACD,CAnBM","sourceRoot":""}
|
package/lib-commonjs/Badge.js
CHANGED
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
|
7
|
-
|
7
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
8
8
|
|
9
9
|
tslib_1.__exportStar(require("./components/Badge/index"), exports);
|
10
10
|
//# sourceMappingURL=Badge.js.map
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
|
7
|
-
|
7
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
8
8
|
|
9
9
|
tslib_1.__exportStar(require("./components/CounterBadge/index"), exports);
|
10
10
|
//# sourceMappingURL=CounterBadge.js.map
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
|
7
|
-
|
7
|
+
const tslib_1 = /*#__PURE__*/require("tslib");
|
8
8
|
|
9
9
|
tslib_1.__exportStar(require("./components/PresenceBadge/index"), exports);
|
10
10
|
//# sourceMappingURL=PresenceBadge.js.map
|
@@ -5,12 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.isConformant = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const react_conformance_1 = /*#__PURE__*/require("@fluentui/react-conformance");
|
9
9
|
|
10
|
-
|
10
|
+
const react_conformance_make_styles_1 = /*#__PURE__*/require("@fluentui/react-conformance-make-styles");
|
11
11
|
|
12
12
|
function isConformant(testInfo) {
|
13
|
-
|
13
|
+
const defaultOptions = {
|
14
14
|
asPropHandlesRef: true,
|
15
15
|
componentPath: module.parent.filename.replace('.test', ''),
|
16
16
|
// https://github.com/microsoft/fluentui/issues/19522
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":";;;;;;;AAAA,
|
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":""}
|
@@ -5,20 +5,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.Badge = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const React = /*#__PURE__*/require("react");
|
9
9
|
|
10
|
-
|
10
|
+
const useBadge_1 = /*#__PURE__*/require("./useBadge");
|
11
11
|
|
12
|
-
|
12
|
+
const useBadgeStyles_1 = /*#__PURE__*/require("./useBadgeStyles");
|
13
13
|
|
14
|
-
|
14
|
+
const renderBadge_1 = /*#__PURE__*/require("./renderBadge");
|
15
15
|
/**
|
16
16
|
* Define a styled Badge, using the `useBadge` hook.
|
17
17
|
*/
|
18
18
|
|
19
19
|
|
20
|
-
exports.Badge = /*#__PURE__*/React.forwardRef(
|
21
|
-
|
20
|
+
exports.Badge = /*#__PURE__*/React.forwardRef((props, ref) => {
|
21
|
+
const state = useBadge_1.useBadge(props, ref);
|
22
22
|
useBadgeStyles_1.useBadgeStyles(state);
|
23
23
|
return renderBadge_1.renderBadge(state);
|
24
24
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":";;;;;;;AAAA,
|
1
|
+
{"version":3,"sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AACA,MAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,MAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,KAAA,gBAAyC,KAAK,CAAC,UAAN,CAAiB,CAAC,KAAD,EAAQ,GAAR,KAAe;AACpF,QAAM,KAAK,GAAG,UAAA,CAAA,QAAA,CAAS,KAAT,EAAgB,GAAhB,CAAd;AACA,EAAA,gBAAA,CAAA,cAAA,CAAe,KAAf;AAEA,SAAO,aAAA,CAAA,WAAA,CAAY,KAAZ,CAAP;AACD,CALqD,CAAzC;AAOb,OAAA,CAAA,KAAA,CAAM,WAAN,GAAoB,OAApB","sourceRoot":""}
|
@@ -5,18 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.renderBadge = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const React = /*#__PURE__*/require("react");
|
9
9
|
|
10
|
-
|
10
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root), state.iconPosition === 'before' && React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon)), state.root.children, state.iconPosition === 'after' && React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon)));
|
12
|
+
const renderBadge = state => {
|
13
|
+
const {
|
14
|
+
slots,
|
15
|
+
slotProps
|
16
|
+
} = react_utilities_1.getSlots(state, ['icon', 'root']);
|
17
|
+
return React.createElement(slots.root, Object.assign({}, slotProps.root), state.iconPosition === 'before' && React.createElement(slots.icon, Object.assign({}, slotProps.icon)), state.root.children, state.iconPosition === 'after' && React.createElement(slots.icon, Object.assign({}, slotProps.icon)));
|
20
18
|
};
|
21
19
|
|
22
20
|
exports.renderBadge = renderBadge;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Badge/renderBadge.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/components/Badge/renderBadge.tsx"],"names":[],"mappings":";;;;;;;AAAA,MAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGO,MAAM,WAAW,GAAI,KAAD,IAAsB;AAC/C,QAAM;AAAE,IAAA,KAAF;AAAS,IAAA;AAAT,MAAuB,iBAAA,CAAA,QAAA,CAAqB,KAArB,EAA4B,CAAC,MAAD,EAAS,MAAT,CAA5B,CAA7B;AAEA,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,KAAK,CAAC,YAAN,KAAuB,QAAvB,IAAmC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CADtC,EAEG,KAAK,CAAC,IAAN,CAAW,QAFd,EAGG,KAAK,CAAC,YAAN,KAAuB,OAAvB,IAAkC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAHrC,CADF;AAOD,CAVM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX","sourceRoot":""}
|
@@ -5,39 +5,35 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.useBadge = void 0;
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
8
|
+
const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
|
11
9
|
/**
|
12
10
|
* Returns the props and state required to render the component
|
13
11
|
*/
|
14
12
|
|
15
13
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
iconPosition: iconPosition,
|
31
|
-
appearance: appearance,
|
32
|
-
color: color,
|
14
|
+
const useBadge = (props, ref) => {
|
15
|
+
const {
|
16
|
+
shape = 'circular',
|
17
|
+
size = 'medium',
|
18
|
+
iconPosition = 'before',
|
19
|
+
appearance = 'filled',
|
20
|
+
color = 'brand'
|
21
|
+
} = props;
|
22
|
+
const state = {
|
23
|
+
shape,
|
24
|
+
size,
|
25
|
+
iconPosition,
|
26
|
+
appearance,
|
27
|
+
color,
|
33
28
|
components: {
|
34
29
|
root: 'div',
|
35
30
|
icon: 'span'
|
36
31
|
},
|
37
|
-
root: react_utilities_1.getNativeElementProps('div',
|
38
|
-
ref
|
39
|
-
'aria-hidden': true
|
40
|
-
|
32
|
+
root: react_utilities_1.getNativeElementProps('div', {
|
33
|
+
ref,
|
34
|
+
'aria-hidden': true,
|
35
|
+
...props
|
36
|
+
}),
|
41
37
|
icon: react_utilities_1.resolveShorthand(props.icon)
|
42
38
|
};
|
43
39
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Badge/useBadge.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/components/Badge/useBadge.ts"],"names":[],"mappings":";;;;;;;AACA,MAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,MAAM,QAAQ,GAAG,CAAC,KAAD,EAAoB,GAApB,KAA+D;AACrF,QAAM;AACJ,IAAA,KAAK,GAAG,UADJ;AAEJ,IAAA,IAAI,GAAG,QAFH;AAGJ,IAAA,YAAY,GAAG,QAHX;AAIJ,IAAA,UAAU,GAAG,QAJT;AAKJ,IAAA,KAAK,GAAG;AALJ,MAMF,KANJ;AAQA,QAAM,KAAK,GAAe;AACxB,IAAA,KADwB;AAExB,IAAA,IAFwB;AAGxB,IAAA,YAHwB;AAIxB,IAAA,UAJwB;AAKxB,IAAA,KALwB;AAMxB,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,IAAI,EAAE;AAFI,KANY;AAUxB,IAAA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B;AACjC,MAAA,GADiC;AAEjC,qBAAe,IAFkB;AAGjC,SAAG;AAH8B,KAA7B,CAVkB;AAexB,IAAA,IAAI,EAAE,iBAAA,CAAA,gBAAA,CAAiB,KAAK,CAAC,IAAvB;AAfkB,GAA1B;AAkBA,SAAO,KAAP;AACD,CA5BM;;AAAM,OAAA,CAAA,QAAA,GAAQ,QAAR","sourceRoot":""}
|
@@ -3,11 +3,13 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.useBadgeStyles = void 0;
|
6
|
+
exports.useBadgeStyles = exports.badgeClassName = void 0;
|
7
7
|
|
8
|
-
|
8
|
+
const react_make_styles_1 = /*#__PURE__*/require("@fluentui/react-make-styles");
|
9
9
|
|
10
|
-
|
10
|
+
exports.badgeClassName = 'fui-Badge';
|
11
|
+
|
12
|
+
const useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
11
13
|
"root": {
|
12
14
|
"mc9l5x": "ftuwxu6",
|
13
15
|
"B7ck84d": "f1ewtqcl",
|
@@ -307,20 +309,20 @@ var useStyles = /*#__PURE__*/react_make_styles_1.__styles({
|
|
307
309
|
*/
|
308
310
|
|
309
311
|
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
state.root.className = react_make_styles_1.mergeClasses(styles.root, state.size === 'tiny' && styles.rootTiny, state.size === 'extra-small' && styles.rootExtraSmall, state.size === 'small' && styles.rootSmall, state.size === 'medium' && styles.rootMedium, state.size === 'large' && styles.rootLarge, state.size === 'extra-large' && styles.rootExtraLarge, state.shape === 'circular' && styles.rootCircular, state.shape === 'rounded' && styles.rootRounded, state.shape === 'rounded' && (state.size === 'small' || state.size === 'extra-small' || state.size === 'tiny') && styles.rootRoundedSmallToTiny, isGhost && styles.rootGhost, isOutline && styles.rootOutline, isTint && styles.rootTint, isFilled && isDanger && styles.rootFilledDanger, isOutline && isDanger && styles.rootOutlineDanger, isTint && isDanger && styles.rootTintDanger, isGhost && isDanger && styles.rootGhostDanger, isFilled && isSevere && styles.rootFilledSevere, isOutline && isSevere && styles.rootOutlineSevere, isTint && isSevere && styles.rootTintSevere, isGhost && isSevere && styles.rootGhostSevere, isFilled && isWarning && styles.rootFilledWarning, isOutline && isWarning && styles.rootOutlineWarning, isTint && isWarning && styles.rootTintWarning, isGhost && isWarning && styles.rootGhostWarning, isFilled && isSuccess && styles.rootFilledSuccess, isOutline && isSuccess && styles.rootOutlineSuccess, isTint && isSuccess && styles.rootTintSuccess, isGhost && isSuccess && styles.rootGhostSuccess, isFilled && isImportant && styles.rootFilledImportant, isOutline && isImportant && styles.rootOutlineImportant, isTint && isImportant && styles.rootTintImportant, isGhost && isImportant && styles.rootGhostImportant, isFilled && isInformative && styles.rootFilledInformative, isOutline && isInformative && styles.rootOutlineInformative, isTint && isInformative && styles.rootTintInformative, isGhost && isInformative && styles.rootGhostInformative, isFilled && isSubtle && styles.rootFilledSubtle, isOutline && isSubtle && styles.rootOutlineSubtle, isTint && isSubtle && styles.rootTintSubtle, isGhost && isSubtle && styles.rootGhostSubtle, state.root.className);
|
312
|
+
const useBadgeStyles = state => {
|
313
|
+
const styles = useStyles();
|
314
|
+
const isGhost = state.appearance === 'ghost';
|
315
|
+
const isOutline = state.appearance === 'outline';
|
316
|
+
const isTint = state.appearance === 'tint';
|
317
|
+
const isFilled = state.appearance === 'filled';
|
318
|
+
const isDanger = state.color === 'danger';
|
319
|
+
const isSevere = state.color === 'severe';
|
320
|
+
const isWarning = state.color === 'warning';
|
321
|
+
const isSuccess = state.color === 'success';
|
322
|
+
const isImportant = state.color === 'important';
|
323
|
+
const isInformative = state.color === 'informative';
|
324
|
+
const isSubtle = state.color === 'subtle';
|
325
|
+
state.root.className = react_make_styles_1.mergeClasses(exports.badgeClassName, styles.root, state.size === 'tiny' && styles.rootTiny, state.size === 'extra-small' && styles.rootExtraSmall, state.size === 'small' && styles.rootSmall, state.size === 'medium' && styles.rootMedium, state.size === 'large' && styles.rootLarge, state.size === 'extra-large' && styles.rootExtraLarge, state.shape === 'circular' && styles.rootCircular, state.shape === 'rounded' && styles.rootRounded, state.shape === 'rounded' && (state.size === 'small' || state.size === 'extra-small' || state.size === 'tiny') && styles.rootRoundedSmallToTiny, isGhost && styles.rootGhost, isOutline && styles.rootOutline, isTint && styles.rootTint, isFilled && isDanger && styles.rootFilledDanger, isOutline && isDanger && styles.rootOutlineDanger, isTint && isDanger && styles.rootTintDanger, isGhost && isDanger && styles.rootGhostDanger, isFilled && isSevere && styles.rootFilledSevere, isOutline && isSevere && styles.rootOutlineSevere, isTint && isSevere && styles.rootTintSevere, isGhost && isSevere && styles.rootGhostSevere, isFilled && isWarning && styles.rootFilledWarning, isOutline && isWarning && styles.rootOutlineWarning, isTint && isWarning && styles.rootTintWarning, isGhost && isWarning && styles.rootGhostWarning, isFilled && isSuccess && styles.rootFilledSuccess, isOutline && isSuccess && styles.rootOutlineSuccess, isTint && isSuccess && styles.rootTintSuccess, isGhost && isSuccess && styles.rootGhostSuccess, isFilled && isImportant && styles.rootFilledImportant, isOutline && isImportant && styles.rootOutlineImportant, isTint && isImportant && styles.rootTintImportant, isGhost && isImportant && styles.rootGhostImportant, isFilled && isInformative && styles.rootFilledInformative, isOutline && isInformative && styles.rootOutlineInformative, isTint && isInformative && styles.rootTintInformative, isGhost && isInformative && styles.rootGhostInformative, isFilled && isSubtle && styles.rootFilledSubtle, isOutline && isSubtle && styles.rootOutlineSubtle, isTint && isSubtle && styles.rootTintSubtle, isGhost && isSubtle && styles.rootGhostSubtle, state.root.className);
|
324
326
|
|
325
327
|
if (state.icon) {
|
326
328
|
state.icon.className = react_make_styles_1.mergeClasses(styles.icon, state.icon.className);
|