@fluentui/react-badge 9.0.0-alpha.92 → 9.0.0-beta.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. package/CHANGELOG.json +277 -1
  2. package/CHANGELOG.md +67 -2
  3. package/dist/react-badge.d.ts +18 -7
  4. package/lib/components/Badge/Badge.js +2 -2
  5. package/lib/components/Badge/Badge.js.map +1 -1
  6. package/lib/components/Badge/Badge.types.d.ts +1 -1
  7. package/lib/components/Badge/renderBadge.js +6 -7
  8. package/lib/components/Badge/renderBadge.js.map +1 -1
  9. package/lib/components/Badge/useBadge.js +19 -22
  10. package/lib/components/Badge/useBadge.js.map +1 -1
  11. package/lib/components/Badge/useBadgeStyles.d.ts +1 -0
  12. package/lib/components/Badge/useBadgeStyles.js +35 -35
  13. package/lib/components/Badge/useBadgeStyles.js.map +1 -1
  14. package/lib/components/CounterBadge/CounterBadge.js +2 -2
  15. package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
  16. package/lib/components/CounterBadge/CounterBadge.types.d.ts +7 -2
  17. package/lib/components/CounterBadge/useCounterBadge.js +18 -24
  18. package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
  19. package/lib/components/CounterBadge/useCounterBadgeStyles.d.ts +1 -0
  20. package/lib/components/CounterBadge/useCounterBadgeStyles.js +6 -34
  21. package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  22. package/lib/components/PresenceBadge/PresenceBadge.js +2 -2
  23. package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
  24. package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +6 -5
  25. package/lib/components/PresenceBadge/presenceIcons.d.ts +11 -0
  26. package/lib/components/PresenceBadge/presenceIcons.js +128 -0
  27. package/lib/components/PresenceBadge/presenceIcons.js.map +1 -0
  28. package/lib/components/PresenceBadge/usePresenceBadge.js +35 -24
  29. package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  30. package/lib/components/PresenceBadge/usePresenceBadgeStyles.d.ts +1 -0
  31. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +38 -45
  32. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  33. package/lib-commonjs/Badge.js +1 -1
  34. package/lib-commonjs/CounterBadge.js +1 -1
  35. package/lib-commonjs/PresenceBadge.js +1 -1
  36. package/lib-commonjs/components/Badge/Badge.js +6 -6
  37. package/lib-commonjs/components/Badge/Badge.js.map +1 -1
  38. package/lib-commonjs/components/Badge/Badge.types.d.ts +1 -1
  39. package/lib-commonjs/components/Badge/index.js +1 -1
  40. package/lib-commonjs/components/Badge/renderBadge.js +8 -10
  41. package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
  42. package/lib-commonjs/components/Badge/useBadge.js +20 -24
  43. package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
  44. package/lib-commonjs/components/Badge/useBadgeStyles.d.ts +1 -0
  45. package/lib-commonjs/components/Badge/useBadgeStyles.js +38 -37
  46. package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
  47. package/lib-commonjs/components/CounterBadge/CounterBadge.js +6 -6
  48. package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
  49. package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +7 -2
  50. package/lib-commonjs/components/CounterBadge/index.js +1 -1
  51. package/lib-commonjs/components/CounterBadge/useCounterBadge.js +19 -26
  52. package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
  53. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.d.ts +1 -0
  54. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +10 -37
  55. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  56. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js +6 -6
  57. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
  58. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +6 -5
  59. package/lib-commonjs/components/PresenceBadge/index.js +1 -1
  60. package/lib-commonjs/components/PresenceBadge/presenceIcons.d.ts +11 -0
  61. package/lib-commonjs/components/PresenceBadge/presenceIcons.js +136 -0
  62. package/lib-commonjs/components/PresenceBadge/presenceIcons.js.map +1 -0
  63. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +36 -26
  64. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  65. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.d.ts +1 -0
  66. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +40 -47
  67. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  68. package/lib-commonjs/index.js +1 -1
  69. package/package.json +11 -10
  70. package/lib/common/isConformant.d.ts +0 -4
  71. package/lib/common/isConformant.js +0 -13
  72. package/lib/common/isConformant.js.map +0 -1
  73. package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
  74. package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -111
  75. package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
  76. package/lib-commonjs/common/isConformant.d.ts +0 -4
  77. package/lib-commonjs/common/isConformant.js +0 -24
  78. package/lib-commonjs/common/isConformant.js.map +0 -1
  79. package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
  80. package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -127
  81. package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
@@ -1,40 +1,51 @@
1
- import { __assign } from "tslib";
2
1
  import * as React from 'react';
3
2
  import { resolveShorthand } from '@fluentui/react-utilities';
3
+ import { presenceAvailableFilled, presenceAvailableRegular, presenceAwayFilled, presenceBusyFilled, presenceDndFilled, presenceDndRegular, presenceOfflineRegular, presenceOofRegular, presenceUnknownRegular } from './presenceIcons';
4
4
  import { useBadge } from '../Badge/index';
5
- import { SkypeMinusIcon, SkypeClockIcon, SkypeArrowIcon, SkypeCheckIcon, CancelIcon } from './DefaultPresenceBadgeIcons';
6
-
7
- var iconMap = function (outOfOffice) {
8
- return {
9
- busy: null,
10
- available: outOfOffice ? /*#__PURE__*/React.createElement(SkypeArrowIcon, null) : /*#__PURE__*/React.createElement(SkypeCheckIcon, null),
11
- away: outOfOffice ? /*#__PURE__*/React.createElement(SkypeArrowIcon, null) : /*#__PURE__*/React.createElement(SkypeClockIcon, null),
12
- offline: /*#__PURE__*/React.createElement(CancelIcon, null),
13
- outOfOffice: /*#__PURE__*/React.createElement(SkypeArrowIcon, null),
14
- doNotDisturb: /*#__PURE__*/React.createElement(SkypeMinusIcon, null)
15
- };
5
+
6
+ const iconMap = (status, outOfOffice, size) => {
7
+ switch (status) {
8
+ case 'available':
9
+ return outOfOffice ? presenceAvailableRegular[size] : presenceAvailableFilled[size];
10
+
11
+ case 'away':
12
+ return outOfOffice ? presenceOfflineRegular[size] : presenceAwayFilled[size];
13
+
14
+ case 'busy':
15
+ return outOfOffice ? presenceUnknownRegular[size] : presenceBusyFilled[size];
16
+
17
+ case 'doNotDisturb':
18
+ return outOfOffice ? presenceDndRegular[size] : presenceDndFilled[size];
19
+
20
+ case 'offline':
21
+ return presenceOfflineRegular[size];
22
+
23
+ case 'outOfOffice':
24
+ return presenceOofRegular[size];
25
+ }
16
26
  };
17
27
  /**
18
28
  * Returns the props and state required to render the component
19
29
  */
20
30
 
21
31
 
22
- export var usePresenceBadge = function (props, ref) {
23
- var _a, _b, _c;
32
+ export const usePresenceBadge = (props, ref) => {
33
+ var _a, _b;
24
34
 
25
- var state = __assign(__assign({}, useBadge(__assign(__assign({
26
- size: 'small'
27
- }, props), {
28
- icon: resolveShorthand(props.icon, {
29
- required: true
30
- })
31
- }), ref)), {
35
+ const state = { ...useBadge({
36
+ size: 'medium',
37
+ ...props,
38
+ icon: resolveShorthand(undefined, {
39
+ required: true
40
+ })
41
+ }, ref),
32
42
  status: (_a = props.status) !== null && _a !== void 0 ? _a : 'available',
33
43
  outOfOffice: (_b = props.outOfOffice) !== null && _b !== void 0 ? _b : false
34
- });
44
+ };
45
+ const IconElement = iconMap(state.status, state.outOfOffice, state.size);
35
46
 
36
- if (!((_c = state.icon) === null || _c === void 0 ? void 0 : _c.children)) {
37
- state.icon.children = iconMap(state.outOfOffice)[state.status];
47
+ if (IconElement) {
48
+ state.icon.children = /*#__PURE__*/React.createElement(IconElement, null);
38
49
  }
39
50
 
40
51
  return state;
@@ -1 +1 @@
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,IAAM,OAAO,GAA8E,UAAA,WAAA,EAAW;AAAI,SAAC;AACzG,IAAA,IAAI,EAAE,IADmG;AAEzG,IAAA,SAAS,EAAE,WAAW,gBAAG,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe,IAAf,CAAH,gBAAwB,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe,IAAf,CAF2D;AAGzG,IAAA,IAAI,EAAE,WAAW,gBAAG,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe,IAAf,CAAH,gBAAwB,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe,IAAf,CAHgE;AAIzG,IAAA,OAAO,eAAE,KAAA,CAAA,aAAA,CAAC,UAAD,EAAW,IAAX,CAJgG;AAKzG,IAAA,WAAW,eAAE,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe,IAAf,CAL4F;AAMzG,IAAA,YAAY,eAAE,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe,IAAf;AAN2F,GAAD;AAOxG,CAPF;AASA;;AAEG;;;AACH,OAAO,IAAM,gBAAgB,GAAG,UAAC,KAAD,EAA4B,GAA5B,EAA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KAAK,CAAC,WAArB,EAAkC,KAAK,CAAC,IAAxC,CAA3B;;AACA,MAAI,WAAJ,EAAiB;AACf,IAAA,KAAK,CAAC,IAAN,CAAY,QAAZ,gBAAuB,KAAA,CAAA,aAAA,CAAC,WAAD,EAAY,IAAZ,CAAvB;AACD;;AAED,SAAO,KAAP;AACD,CAtBM","sourceRoot":""}
@@ -1,4 +1,5 @@
1
1
  import type { PresenceBadgeState } from './PresenceBadge.types';
2
+ export declare const presenceBadgeClassName = "fui-PresenceBadge";
2
3
  /**
3
4
  * Applies style classnames to slots
4
5
  */
@@ -1,62 +1,37 @@
1
1
  import { mergeClasses, __styles } from '@fluentui/react-make-styles';
2
- import { useBadgeStyles } from '../../Badge';
2
+ export const presenceBadgeClassName = 'fui-PresenceBadge';
3
3
 
4
- var useStyles = /*#__PURE__*/__styles({
4
+ const useStyles = /*#__PURE__*/__styles({
5
5
  "root": {
6
6
  "z8tnut": "f1g0x7ka",
7
7
  "z189sj": ["fhxju0i", "f1cnd47f"],
8
8
  "Byoj8tv": "f1qch9an",
9
9
  "uwmqm3": ["f1cnd47f", "fhxju0i"],
10
- "B4j52fo": "f18zi460",
11
- "Bekrc4i": ["f1wpluaz", "fsfsuhs"],
12
- "Bn0qgzm": "fmklw6v",
13
- "ibv6hh": ["fsfsuhs", "f1wpluaz"]
14
- },
15
- "thinBorder": {
16
- "B4j52fo": "f192inf7",
17
- "Bekrc4i": ["f5tn483", "f1ojsxk5"],
18
- "Bn0qgzm": "f1vxd6vx",
19
- "ibv6hh": ["f1ojsxk5", "f5tn483"]
10
+ "mc9l5x": "ftuwxu6",
11
+ "B7ck84d": "f1ewtqcl",
12
+ "Bt984gj": "f122n59",
13
+ "Brf1p80": "f4d9j23",
14
+ "Bhmb4qv": "fb8jth9",
15
+ "Dimara": "f5q2cvs",
16
+ "De3pzq": "fxugw4r"
20
17
  },
21
18
  "statusBusy": {
22
- "De3pzq": "fdl5y0r",
23
- "g2u3we": "f11ttmz8",
24
- "h3c5rm": ["f1ratw88", "f459ikj"],
25
- "B9xav0g": "fvovscg",
26
- "zhjwy3": ["f459ikj", "f1ratw88"]
19
+ "sj55zd": "fvi85wt"
27
20
  },
28
21
  "statusAway": {
29
- "De3pzq": "fb00bxr",
30
- "g2u3we": "f1skk3ns",
31
- "h3c5rm": ["f766wml", "f1rnrfqa"],
32
- "B9xav0g": "fb8zvtn",
33
- "zhjwy3": ["f1rnrfqa", "f766wml"]
22
+ "sj55zd": "f14k8a89"
34
23
  },
35
24
  "statusAvailable": {
36
- "De3pzq": "f1og3d8b",
37
- "g2u3we": "f1t9i9vy",
38
- "h3c5rm": ["f1r5awo9", "fnfhfy0"],
39
- "B9xav0g": "fgfkvtu",
40
- "zhjwy3": ["fnfhfy0", "f1r5awo9"]
25
+ "sj55zd": "fqa5hgp"
41
26
  },
42
27
  "statusOffline": {
43
- "De3pzq": "fxugw4r",
44
- "sj55zd": "f11d4kpn",
45
- "g2u3we": "fi2z7s6",
46
- "h3c5rm": ["f1agc6it", "f1sit5hz"],
47
- "B9xav0g": "f9pok3v",
48
- "zhjwy3": ["f1sit5hz", "f1agc6it"]
28
+ "sj55zd": "f11d4kpn"
49
29
  },
50
30
  "statusOutOfOffice": {
51
- "De3pzq": "fxugw4r",
52
- "sj55zd": "fdce8r3",
53
- "g2u3we": "f161shwc",
54
- "h3c5rm": ["fbde6ui", "f7rrh46"],
55
- "B9xav0g": "f1yt3bcc",
56
- "zhjwy3": ["f7rrh46", "fbde6ui"]
31
+ "sj55zd": "fdce8r3"
57
32
  },
58
33
  "outOfOffice": {
59
- "De3pzq": "fxugw4r"
34
+ "sj55zd": "fr0bkrk"
60
35
  },
61
36
  "outOfOfficeAvailable": {
62
37
  "sj55zd": "fqa5hgp"
@@ -66,18 +41,36 @@ var useStyles = /*#__PURE__*/__styles({
66
41
  },
67
42
  "outOfOfficeAway": {
68
43
  "sj55zd": "f14k8a89"
44
+ },
45
+ "tiny": {
46
+ "Bubjx69": "f9ikmtg",
47
+ "a9b677": "f16dn6v3",
48
+ "B5pe6w7": "fab5kbq",
49
+ "p4uzdd": "f1ms1d91"
50
+ },
51
+ "large": {
52
+ "Bubjx69": "f9ikmtg",
53
+ "a9b677": "f64fuq3",
54
+ "B5pe6w7": "f1vfi1yj",
55
+ "p4uzdd": "f15s34gz"
56
+ },
57
+ "extraLarge": {
58
+ "Bubjx69": "f9ikmtg",
59
+ "a9b677": "f1w9dchk",
60
+ "B5pe6w7": "f14efy9b",
61
+ "p4uzdd": "fhipgdu"
69
62
  }
70
63
  }, {
71
- "d": [".f1g0x7ka{padding-top:0;}", ".fhxju0i{padding-right:0;}", ".f1cnd47f{padding-left:0;}", ".f1qch9an{padding-bottom:0;}", ".f18zi460{border-top-width:var(--strokeWidthThick);}", ".f1wpluaz{border-right-width:var(--strokeWidthThick);}", ".fsfsuhs{border-left-width:var(--strokeWidthThick);}", ".fmklw6v{border-bottom-width:var(--strokeWidthThick);}", ".f192inf7{border-top-width:var(--strokeWidthThin);}", ".f5tn483{border-right-width:var(--strokeWidthThin);}", ".f1ojsxk5{border-left-width:var(--strokeWidthThin);}", ".f1vxd6vx{border-bottom-width:var(--strokeWidthThin);}", ".fdl5y0r{background-color:var(--colorPaletteRedBackground3);}", ".f11ttmz8{border-top-color:var(--colorPaletteRedBackground3);}", ".f1ratw88{border-right-color:var(--colorPaletteRedBackground3);}", ".f459ikj{border-left-color:var(--colorPaletteRedBackground3);}", ".fvovscg{border-bottom-color:var(--colorPaletteRedBackground3);}", ".fb00bxr{background-color:var(--colorPaletteMarigoldBackground3);}", ".f1skk3ns{border-top-color:var(--colorPaletteMarigoldBackground3);}", ".f766wml{border-right-color:var(--colorPaletteMarigoldBackground3);}", ".f1rnrfqa{border-left-color:var(--colorPaletteMarigoldBackground3);}", ".fb8zvtn{border-bottom-color:var(--colorPaletteMarigoldBackground3);}", ".f1og3d8b{background-color:var(--colorPaletteLightGreenForeground3);}", ".f1t9i9vy{border-top-color:var(--colorPaletteLightGreenForeground3);}", ".f1r5awo9{border-right-color:var(--colorPaletteLightGreenForeground3);}", ".fnfhfy0{border-left-color:var(--colorPaletteLightGreenForeground3);}", ".fgfkvtu{border-bottom-color:var(--colorPaletteLightGreenForeground3);}", ".fxugw4r{background-color:var(--colorNeutralBackground1);}", ".f11d4kpn{color:var(--colorNeutralForeground3);}", ".fi2z7s6{border-top-color:var(--colorNeutralForeground3);}", ".f1agc6it{border-right-color:var(--colorNeutralForeground3);}", ".f1sit5hz{border-left-color:var(--colorNeutralForeground3);}", ".f9pok3v{border-bottom-color:var(--colorNeutralForeground3);}", ".fdce8r3{color:var(--colorPaletteBerryForeground3);}", ".f161shwc{border-top-color:var(--colorPaletteBerryForeground3);}", ".fbde6ui{border-right-color:var(--colorPaletteBerryForeground3);}", ".f7rrh46{border-left-color:var(--colorPaletteBerryForeground3);}", ".f1yt3bcc{border-bottom-color:var(--colorPaletteBerryForeground3);}", ".fqa5hgp{color:var(--colorPaletteLightGreenForeground3);}", ".fvi85wt{color:var(--colorPaletteRedBackground3);}", ".f14k8a89{color:var(--colorPaletteMarigoldBackground3);}"]
64
+ "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;}"]
72
65
  });
73
66
  /**
74
67
  * Applies style classnames to slots
75
68
  */
76
69
 
77
70
 
78
- export var usePresenceBadgeStyles = function (state) {
79
- var styles = useStyles();
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);
81
- return useBadgeStyles(state);
71
+ export const usePresenceBadgeStyles = state => {
72
+ const styles = useStyles();
73
+ 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.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);
74
+ return state;
82
75
  };
83
76
  //# 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;;AAGA,IAAM,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;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB;AA4CA;;AAEG;;;AACH,OAAO,IAAM,sBAAsB,GAAG,UAAC,KAAD,EAA0B;AAC9D,MAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CACjC,MAAM,CAAC,IAD0B,EAEjC,CAAC,KAAK,CAAC,MAAN,KAAiB,MAAjB,IAA2B,KAAK,CAAC,MAAN,KAAiB,cAA7C,KAAgE,MAAM,CAAC,UAFtC,EAGjC,KAAK,CAAC,MAAN,KAAiB,MAAjB,IAA2B,MAAM,CAAC,UAHD,EAIjC,KAAK,CAAC,MAAN,KAAiB,WAAjB,IAAgC,MAAM,CAAC,eAJN,EAKjC,KAAK,CAAC,MA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fA,EAgBjC,KAAK,CAAC,IAAN,KAAe,aAAf,IAAgC,MAAM,CAAC,UAhBN,EAiBjC,KAAK,CAAC,IAAN,CAAW,SAjBsB,CAAnC;AAoBA,SAAO,KAAP;AACD,CAvBM","sourceRoot":""}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
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
- var tslib_1 = /*#__PURE__*/require("tslib");
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
- var tslib_1 = /*#__PURE__*/require("tslib");
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,20 +5,20 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Badge = void 0;
7
7
 
8
- var React = /*#__PURE__*/require("react");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var useBadge_1 = /*#__PURE__*/require("./useBadge");
10
+ const useBadge_1 = /*#__PURE__*/require("./useBadge");
11
11
 
12
- var useBadgeStyles_1 = /*#__PURE__*/require("./useBadgeStyles");
12
+ const useBadgeStyles_1 = /*#__PURE__*/require("./useBadgeStyles");
13
13
 
14
- var renderBadge_1 = /*#__PURE__*/require("./renderBadge");
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(function (props, ref) {
21
- var state = useBadge_1.useBadge(props, ref);
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,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AACA,IAAA,gBAAA,gBAAA,OAAA,CAAA,kBAAA,CAAA;;AACA,IAAA,aAAA,gBAAA,OAAA,CAAA,eAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,KAAA,gBAAyC,KAAK,CAAC,UAAN,CAAiB,UAAC,KAAD,EAAQ,GAAR,EAAW;AAChF,MAAM,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":""}
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":""}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import type { ComponentProps, ComponentState, ObjectShorthandProps } from '@fluentui/react-utilities';
3
3
  export declare type BadgeSlots = {
4
- root: ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>;
4
+ root: ObjectShorthandProps<Omit<React.HTMLAttributes<HTMLElement>, 'color'>>;
5
5
  icon?: ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>;
6
6
  };
7
7
  export declare type BadgeCommons = {
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
 
7
- var tslib_1 = /*#__PURE__*/require("tslib");
7
+ const tslib_1 = /*#__PURE__*/require("tslib");
8
8
 
9
9
  tslib_1.__exportStar(require("./Badge"), exports);
10
10
 
@@ -5,18 +5,16 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.renderBadge = void 0;
7
7
 
8
- var tslib_1 = /*#__PURE__*/require("tslib");
8
+ const React = /*#__PURE__*/require("react");
9
9
 
10
- var React = /*#__PURE__*/require("react");
10
+ const react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
11
 
12
- var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
13
-
14
- var renderBadge = function (state) {
15
- var _a = react_utilities_1.getSlots(state, ['icon', 'root']),
16
- slots = _a.slots,
17
- slotProps = _a.slotProps;
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":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AAGO,IAAM,WAAW,GAAG,UAAC,KAAD,EAAkB;AACrC,MAAA,EAAA,GAAuB,iBAAA,CAAA,QAAA,CAAqB,KAArB,EAA4B,CAAC,MAAD,EAAS,MAAT,CAA5B,CAAvB;AAAA,MAAE,KAAK,GAAA,EAAA,CAAA,KAAP;AAAA,MAAS,SAAS,GAAA,EAAA,CAAA,SAAlB;;AAEN,SACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,EACG,KAAK,CAAC,YAAN,KAAuB,QAAvB,IAAmC,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,OAAA,CAAA,QAAA,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,OAAA,CAAA,QAAA,CAAA,EAAA,EAAK,SAAS,CAAC,IAAf,CAAX,CAHrC,CADF;AAOD,CAVM;;AAAM,OAAA,CAAA,WAAA,GAAW,WAAX","sourceRoot":""}
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
- var tslib_1 = /*#__PURE__*/require("tslib");
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
- var useBadge = function (props, ref) {
17
- var _a = props.shape,
18
- shape = _a === void 0 ? 'circular' : _a,
19
- _b = props.size,
20
- size = _b === void 0 ? 'medium' : _b,
21
- _c = props.iconPosition,
22
- iconPosition = _c === void 0 ? 'before' : _c,
23
- _d = props.appearance,
24
- appearance = _d === void 0 ? 'filled' : _d,
25
- _e = props.color,
26
- color = _e === void 0 ? 'brand' : _e;
27
- var state = {
28
- shape: shape,
29
- size: size,
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', tslib_1.__assign({
38
- ref: ref,
39
- 'aria-hidden': true
40
- }, props)),
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":";;;;;;;;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,QAAQ,GAAG,UAAC,KAAD,EAAoB,GAApB,EAA+C;AAEnE,MAAA,EAAA,GAKE,KAAK,CALW,KAAlB;AAAA,MAAA,KAAK,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,UAAH,GAAa,EAAlB;AAAA,MACA,EAAA,GAIE,KAAK,CAJQ,IADf;AAAA,MACA,IAAI,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,QAAH,GAAW,EADf;AAAA,MAEA,EAAA,GAGE,KAAK,CAHgB,YAFvB;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,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":""}
@@ -1,4 +1,5 @@
1
1
  import type { BadgeState } from './Badge.types';
2
+ export declare const badgeClassName = "fui-Badge";
2
3
  /**
3
4
  * Applies style classnames to slots
4
5
  */