@fluentui/react-badge 0.0.0-nightly-20230223-0420.1 → 0.0.0-nightly-20230223-2115.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/.swcrc +33 -0
  2. package/CHANGELOG.json +9 -9
  3. package/CHANGELOG.md +7 -7
  4. package/lib/Badge.js.map +1 -1
  5. package/lib/CounterBadge.js.map +1 -1
  6. package/lib/PresenceBadge.js.map +1 -1
  7. package/lib/components/Badge/Badge.js.map +1 -1
  8. package/lib/components/Badge/Badge.types.js.map +1 -1
  9. package/lib/components/Badge/index.js.map +1 -1
  10. package/lib/components/Badge/renderBadge.js +2 -7
  11. package/lib/components/Badge/renderBadge.js.map +1 -1
  12. package/lib/components/Badge/useBadge.js +1 -0
  13. package/lib/components/Badge/useBadge.js.map +1 -1
  14. package/lib/components/Badge/useBadgeStyles.js.map +1 -1
  15. package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
  16. package/lib/components/CounterBadge/CounterBadge.types.js.map +1 -1
  17. package/lib/components/CounterBadge/index.js.map +1 -1
  18. package/lib/components/CounterBadge/useCounterBadge.js +1 -0
  19. package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
  20. package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  21. package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
  22. package/lib/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
  23. package/lib/components/PresenceBadge/index.js.map +1 -1
  24. package/lib/components/PresenceBadge/presenceIcons.js +1 -0
  25. package/lib/components/PresenceBadge/presenceIcons.js.map +1 -1
  26. package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  27. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  28. package/lib/index.js.map +1 -1
  29. package/lib-commonjs/Badge.js +5 -4
  30. package/lib-commonjs/Badge.js.map +1 -1
  31. package/lib-commonjs/CounterBadge.js +5 -4
  32. package/lib-commonjs/CounterBadge.js.map +1 -1
  33. package/lib-commonjs/PresenceBadge.js +5 -4
  34. package/lib-commonjs/PresenceBadge.js.map +1 -1
  35. package/lib-commonjs/components/Badge/Badge.js +16 -15
  36. package/lib-commonjs/components/Badge/Badge.js.map +1 -1
  37. package/lib-commonjs/components/Badge/Badge.types.js +3 -2
  38. package/lib-commonjs/components/Badge/Badge.types.js.map +1 -1
  39. package/lib-commonjs/components/Badge/index.js +8 -7
  40. package/lib-commonjs/components/Badge/index.js.map +1 -1
  41. package/lib-commonjs/components/Badge/renderBadge.js +15 -19
  42. package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
  43. package/lib-commonjs/components/Badge/useBadge.js +29 -34
  44. package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
  45. package/lib-commonjs/components/Badge/useBadgeStyles.js +608 -310
  46. package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
  47. package/lib-commonjs/components/CounterBadge/CounterBadge.js +16 -15
  48. package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
  49. package/lib-commonjs/components/CounterBadge/CounterBadge.types.js +3 -2
  50. package/lib-commonjs/components/CounterBadge/CounterBadge.types.js.map +1 -1
  51. package/lib-commonjs/components/CounterBadge/index.js +8 -7
  52. package/lib-commonjs/components/CounterBadge/index.js.map +1 -1
  53. package/lib-commonjs/components/CounterBadge/useCounterBadge.js +24 -30
  54. package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
  55. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +54 -34
  56. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  57. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js +16 -15
  58. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
  59. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js +3 -2
  60. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
  61. package/lib-commonjs/components/PresenceBadge/index.js +8 -7
  62. package/lib-commonjs/components/PresenceBadge/index.js.map +1 -1
  63. package/lib-commonjs/components/PresenceBadge/presenceIcons.js +154 -135
  64. package/lib-commonjs/components/PresenceBadge/presenceIcons.js.map +1 -1
  65. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +61 -65
  66. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  67. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +96 -72
  68. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  69. package/lib-commonjs/index.js +28 -85
  70. package/lib-commonjs/index.js.map +1 -1
  71. package/package.json +6 -6
@@ -1,80 +1,104 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ presenceBadgeClassNames: ()=>presenceBadgeClassNames,
13
+ usePresenceBadgeStyles_unstable: ()=>usePresenceBadgeStyles_unstable
5
14
  });
6
- exports.usePresenceBadgeStyles_unstable = exports.presenceBadgeClassNames = void 0;
7
- const react_1 = /*#__PURE__*/require("@griffel/react");
8
- const react_theme_1 = /*#__PURE__*/require("@fluentui/react-theme");
9
- exports.presenceBadgeClassNames = {
10
- root: 'fui-PresenceBadge',
11
- icon: 'fui-PresenceBadge__icon'
15
+ const _react = require("@griffel/react");
16
+ const presenceBadgeClassNames = {
17
+ root: 'fui-PresenceBadge',
18
+ icon: 'fui-PresenceBadge__icon'
12
19
  };
13
- const getIsBusy = status => {
14
- if (status === 'busy' || status === 'do-not-disturb' || status === 'unknown' || status === 'blocked') {
15
- return true;
16
- }
17
- return false;
20
+ const getIsBusy = (status)=>{
21
+ if (status === 'busy' || status === 'do-not-disturb' || status === 'unknown' || status === 'blocked') {
22
+ return true;
23
+ }
24
+ return false;
18
25
  };
19
- const useRootClassName = /*#__PURE__*/react_1.__resetStyles("r11sysef", null, [".r11sysef{padding:0;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;box-sizing:border-box;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;border-radius:var(--borderRadiusCircular);background-color:var(--colorNeutralBackground1);}", ".r11sysef span{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}"]);
20
- const useStyles = /*#__PURE__*/react_1.__styles({
21
- statusBusy: {
22
- sj55zd: "fvi85wt"
23
- },
24
- statusAway: {
25
- sj55zd: "f14k8a89"
26
- },
27
- statusAvailable: {
28
- sj55zd: "fqa5hgp"
29
- },
30
- statusOffline: {
31
- sj55zd: "f11d4kpn"
32
- },
33
- statusOutOfOffice: {
34
- sj55zd: "fdce8r3"
35
- },
36
- outOfOffice: {
37
- sj55zd: "fr0bkrk"
38
- },
39
- outOfOfficeAvailable: {
40
- sj55zd: "fqa5hgp"
41
- },
42
- outOfOfficeBusy: {
43
- sj55zd: "fvi85wt"
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"
62
- }
26
+ const useRootClassName = /*#__PURE__*/ (0, _react["__resetStyles"])("r11sysef", null, [
27
+ ".r11sysef{padding:0;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;box-sizing:border-box;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;border-radius:var(--borderRadiusCircular);background-color:var(--colorNeutralBackground1);}",
28
+ ".r11sysef span{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}"
29
+ ]);
30
+ const useStyles = /*#__PURE__*/ (0, _react["__styles"])({
31
+ statusBusy: {
32
+ sj55zd: "fvi85wt"
33
+ },
34
+ statusAway: {
35
+ sj55zd: "f14k8a89"
36
+ },
37
+ statusAvailable: {
38
+ sj55zd: "fqa5hgp"
39
+ },
40
+ statusOffline: {
41
+ sj55zd: "f11d4kpn"
42
+ },
43
+ statusOutOfOffice: {
44
+ sj55zd: "fdce8r3"
45
+ },
46
+ outOfOffice: {
47
+ sj55zd: "fr0bkrk"
48
+ },
49
+ outOfOfficeAvailable: {
50
+ sj55zd: "fqa5hgp"
51
+ },
52
+ outOfOfficeBusy: {
53
+ sj55zd: "fvi85wt"
54
+ },
55
+ tiny: {
56
+ Bubjx69: "f9ikmtg",
57
+ a9b677: "f16dn6v3",
58
+ B5pe6w7: "fab5kbq",
59
+ p4uzdd: "f1ms1d91"
60
+ },
61
+ large: {
62
+ Bubjx69: "f9ikmtg",
63
+ a9b677: "f64fuq3",
64
+ B5pe6w7: "f1vfi1yj",
65
+ p4uzdd: "f15s34gz"
66
+ },
67
+ extraLarge: {
68
+ Bubjx69: "f9ikmtg",
69
+ a9b677: "f1w9dchk",
70
+ B5pe6w7: "f14efy9b",
71
+ p4uzdd: "fhipgdu"
72
+ }
63
73
  }, {
64
- d: [".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;}"]
74
+ d: [
75
+ ".fvi85wt{color:var(--colorPaletteRedBackground3);}",
76
+ ".f14k8a89{color:var(--colorPaletteMarigoldBackground3);}",
77
+ ".fqa5hgp{color:var(--colorPaletteLightGreenForeground3);}",
78
+ ".f11d4kpn{color:var(--colorNeutralForeground3);}",
79
+ ".fdce8r3{color:var(--colorPaletteBerryForeground3);}",
80
+ ".fr0bkrk{color:var(--colorNeutralBackground1);}",
81
+ ".f9ikmtg{aspect-ratio:1;}",
82
+ ".f16dn6v3{width:6px;}",
83
+ ".fab5kbq svg{width:6px!important;}",
84
+ ".f1ms1d91 svg{height:6px!important;}",
85
+ ".f64fuq3{width:20px;}",
86
+ ".f1vfi1yj svg{width:20px!important;}",
87
+ ".f15s34gz svg{height:20px!important;}",
88
+ ".f1w9dchk{width:28px;}",
89
+ ".f14efy9b svg{width:28px!important;}",
90
+ ".fhipgdu svg{height:28px!important;}"
91
+ ]
65
92
  });
66
- /**
67
- * Applies style classnames to slots
68
- */
69
- const usePresenceBadgeStyles_unstable = state => {
70
- const rootClassName = useRootClassName();
71
- const styles = useStyles();
72
- const isBusy = getIsBusy(state.status);
73
- state.root.className = react_1.mergeClasses(exports.presenceBadgeClassNames.root, rootClassName, isBusy && styles.statusBusy, state.status === 'away' && styles.statusAway, state.status === 'available' && styles.statusAvailable, state.status === 'offline' && styles.statusOffline, state.status === 'out-of-office' && styles.statusOutOfOffice, state.outOfOffice && styles.outOfOffice, state.outOfOffice && state.status === 'available' && styles.outOfOfficeAvailable, state.outOfOffice && isBusy && styles.outOfOfficeBusy, state.outOfOffice && state.status === 'away' && styles.statusOutOfOffice, state.outOfOffice && state.status === 'offline' && styles.statusOffline, state.outOfOffice && state.status === 'out-of-office' && styles.statusOutOfOffice, state.size === 'tiny' && styles.tiny, state.size === 'large' && styles.large, state.size === 'extra-large' && styles.extraLarge, state.root.className);
74
- if (state.icon) {
75
- state.icon.className = react_1.mergeClasses(exports.presenceBadgeClassNames.icon, state.icon.className);
76
- }
77
- return state;
78
- };
79
- exports.usePresenceBadgeStyles_unstable = usePresenceBadgeStyles_unstable;
93
+ const usePresenceBadgeStyles_unstable = (state)=>{
94
+ const rootClassName = useRootClassName();
95
+ const styles = useStyles();
96
+ const isBusy = getIsBusy(state.status);
97
+ state.root.className = (0, _react.mergeClasses)(presenceBadgeClassNames.root, rootClassName, isBusy && styles.statusBusy, state.status === 'away' && styles.statusAway, state.status === 'available' && styles.statusAvailable, state.status === 'offline' && styles.statusOffline, state.status === 'out-of-office' && styles.statusOutOfOffice, state.outOfOffice && styles.outOfOffice, state.outOfOffice && state.status === 'available' && styles.outOfOfficeAvailable, state.outOfOffice && isBusy && styles.outOfOfficeBusy, state.outOfOffice && state.status === 'away' && styles.statusOutOfOffice, state.outOfOffice && state.status === 'offline' && styles.statusOffline, state.outOfOffice && state.status === 'out-of-office' && styles.statusOutOfOffice, state.size === 'tiny' && styles.tiny, state.size === 'large' && styles.large, state.size === 'extra-large' && styles.extraLarge, state.root.className);
98
+ if (state.icon) {
99
+ state.icon.className = (0, _react.mergeClasses)(presenceBadgeClassNames.icon, state.icon.className);
100
+ }
101
+ return state;
102
+ }; //# sourceMappingURL=usePresenceBadgeStyles.js.map
103
+
80
104
  //# sourceMappingURL=usePresenceBadgeStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AACA;AAKaA,+BAAuB,GAA+B;EACjEC,IAAI,EAAE,mBAAmB;EACzBC,IAAI,EAAE;CACP;AAED,MAAMC,SAAS,GAAIC,MAA2B,IAAa;EACzD,IAAIA,MAAM,KAAK,MAAM,IAAIA,MAAM,KAAK,gBAAgB,IAAIA,MAAM,KAAK,SAAS,IA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KAAK,CAACU,WAAW,IAAIV,KAAK,CAACL,MAAM,KAAK,MAAM,IAAIO,MAAM,CAACO,iBAAiB,EACxET,KAAK,CAACU,WAAW,IAAIV,KAAK,CAACL,MAAM,KAAK,SAAS,IAAIO,MAAM,CAACM,aAAa,EACvER,KAAK,CAACU,WAAW,IAAIV,KAAK,CAACL,MAAM,KAAK,eAAe,IAAIO,MAAM,CAACO,iBAAiB,EACjFT,KAAK,CAACa,IAAI,KAAK,MAAM,IAAIX,MAAM,CAACY,IAAI,EACpCd,KAAK,CAACa,IAAI,KAAK,OAAO,IAAIX,MAAM,CAACa,KAAK,EACtCf,KAAK,CAACa,IAAI,KAAK,aAAa,IAAIX,MAAM,CAACc,UAAU,EACjDhB,KAAK,CAACR,IAAI,CAACY,SAAS,CACrB;EAED,IAAIJ,KAAK,CAACP,IAAI,EAAE;IACdO,KAAK,CAACP,IAAI,CAACW,SAAS,GAAGP,oBAAY,CAACN,+BAAuB,CAACE,IAAI,EAAEO,KAAK,CAACP,IAAI,CAACW,SAAS,CAAC;;EAGzF,OAAOJ,KAAK;AACd,CAAC;AA7BYT,uCAA+B","names":["exports","root","icon","getIsBusy","status","useRootClassName","react_1","useStyles","usePresenceBadgeStyles_unstable","state","rootClassName","styles","isBusy","className","statusBusy","statusAway","statusAvailable","statusOffline","statusOutOfOffice","outOfOffice","outOfOfficeAvailable","outOfOfficeBusy","size","tiny","large","extraLarge"],"sourceRoot":"","sources":["../../../../../../../../../packages/react-components/react-badge/src/components/PresenceBadge/usePresenceBadgeStyles.ts"],"sourcesContent":["import { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport type { BadgeSlots } from '../Badge/Badge.types';\nimport type { PresenceBadgeState, PresenceBadgeStatus } from './PresenceBadge.types';\n\nexport const presenceBadgeClassNames: SlotClassNames<BadgeSlots> = {\n root: 'fui-PresenceBadge',\n icon: 'fui-PresenceBadge__icon',\n};\n\nconst getIsBusy = (status: PresenceBadgeStatus): boolean => {\n if (status === 'busy' || status === 'do-not-disturb' || status === 'unknown' || status === 'blocked') {\n return true;\n }\n\n return false;\n};\n\nconst useRootClassName = makeResetStyles({\n padding: 0,\n display: 'inline-flex',\n boxSizing: 'border-box',\n alignItems: 'center',\n justifyContent: 'center',\n\n '& span': {\n display: 'flex',\n },\n borderRadius: tokens.borderRadiusCircular,\n backgroundColor: tokens.colorNeutralBackground1,\n});\n\nconst useStyles = makeStyles({\n statusBusy: {\n color: tokens.colorPaletteRedBackground3,\n },\n statusAway: {\n color: tokens.colorPaletteMarigoldBackground3,\n },\n statusAvailable: {\n color: tokens.colorPaletteLightGreenForeground3,\n },\n statusOffline: {\n color: tokens.colorNeutralForeground3,\n },\n statusOutOfOffice: {\n color: tokens.colorPaletteBerryForeground3,\n },\n outOfOffice: {\n color: tokens.colorNeutralBackground1,\n },\n outOfOfficeAvailable: {\n color: tokens.colorPaletteLightGreenForeground3,\n },\n outOfOfficeBusy: {\n color: tokens.colorPaletteRedBackground3,\n },\n\n // Icons are not resizeable, and these sizes are currently missing\n // use `!important` to size the currently available icons to the missing ones\n //\n tiny: {\n aspectRatio: '1',\n width: '6px',\n '& svg': {\n width: '6px !important',\n height: '6px !important',\n },\n },\n large: {\n aspectRatio: '1',\n width: '20px',\n '& svg': {\n width: '20px !important',\n height: '20px !important',\n },\n },\n extraLarge: {\n aspectRatio: '1',\n width: '28px',\n '& svg': {\n width: '28px !important',\n height: '28px !important',\n },\n },\n});\n\n/**\n * Applies style classnames to slots\n */\nexport const usePresenceBadgeStyles_unstable = (state: PresenceBadgeState): PresenceBadgeState => {\n const rootClassName = useRootClassName();\n const styles = useStyles();\n const isBusy = getIsBusy(state.status);\n state.root.className = mergeClasses(\n presenceBadgeClassNames.root,\n rootClassName,\n isBusy && styles.statusBusy,\n state.status === 'away' && styles.statusAway,\n state.status === 'available' && styles.statusAvailable,\n state.status === 'offline' && styles.statusOffline,\n state.status === 'out-of-office' && styles.statusOutOfOffice,\n state.outOfOffice && styles.outOfOffice,\n state.outOfOffice && state.status === 'available' && styles.outOfOfficeAvailable,\n state.outOfOffice && isBusy && styles.outOfOfficeBusy,\n state.outOfOffice && state.status === 'away' && styles.statusOutOfOffice,\n state.outOfOffice && state.status === 'offline' && styles.statusOffline,\n state.outOfOffice && state.status === 'out-of-office' && styles.statusOutOfOffice,\n state.size === 'tiny' && styles.tiny,\n state.size === 'large' && styles.large,\n state.size === 'extra-large' && styles.extraLarge,\n state.root.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(presenceBadgeClassNames.icon, state.icon.className);\n }\n\n return state;\n};\n"]}
1
+ {"version":3,"sources":["../../../lib/components/PresenceBadge/usePresenceBadgeStyles.js"],"sourcesContent":["import { __resetStyles, __styles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nexport const presenceBadgeClassNames = {\n root: 'fui-PresenceBadge',\n icon: 'fui-PresenceBadge__icon'\n};\nconst getIsBusy = status => {\n if (status === 'busy' || status === 'do-not-disturb' || status === 'unknown' || status === 'blocked') {\n return true;\n }\n return false;\n};\nconst useRootClassName = /*#__PURE__*/__resetStyles(\"r11sysef\", null, [\".r11sysef{padding:0;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;box-sizing:border-box;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;border-radius:var(--borderRadiusCircular);background-color:var(--colorNeutralBackground1);}\", \".r11sysef span{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}\"]);\nconst useStyles = /*#__PURE__*/__styles({\n statusBusy: {\n sj55zd: \"fvi85wt\"\n },\n statusAway: {\n sj55zd: \"f14k8a89\"\n },\n statusAvailable: {\n sj55zd: \"fqa5hgp\"\n },\n statusOffline: {\n sj55zd: \"f11d4kpn\"\n },\n statusOutOfOffice: {\n sj55zd: \"fdce8r3\"\n },\n outOfOffice: {\n sj55zd: \"fr0bkrk\"\n },\n outOfOfficeAvailable: {\n sj55zd: \"fqa5hgp\"\n },\n outOfOfficeBusy: {\n sj55zd: \"fvi85wt\"\n },\n tiny: {\n Bubjx69: \"f9ikmtg\",\n a9b677: \"f16dn6v3\",\n B5pe6w7: \"fab5kbq\",\n p4uzdd: \"f1ms1d91\"\n },\n large: {\n Bubjx69: \"f9ikmtg\",\n a9b677: \"f64fuq3\",\n B5pe6w7: \"f1vfi1yj\",\n p4uzdd: \"f15s34gz\"\n },\n extraLarge: {\n Bubjx69: \"f9ikmtg\",\n a9b677: \"f1w9dchk\",\n B5pe6w7: \"f14efy9b\",\n p4uzdd: \"fhipgdu\"\n }\n}, {\n d: [\".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;}\"]\n});\n/**\n * Applies style classnames to slots\n */\nexport const usePresenceBadgeStyles_unstable = state => {\n const rootClassName = useRootClassName();\n const styles = useStyles();\n const isBusy = getIsBusy(state.status);\n state.root.className = mergeClasses(presenceBadgeClassNames.root, rootClassName, isBusy && styles.statusBusy, state.status === 'away' && styles.statusAway, state.status === 'available' && styles.statusAvailable, state.status === 'offline' && styles.statusOffline, state.status === 'out-of-office' && styles.statusOutOfOffice, state.outOfOffice && styles.outOfOffice, state.outOfOffice && state.status === 'available' && styles.outOfOfficeAvailable, state.outOfOffice && isBusy && styles.outOfOfficeBusy, state.outOfOffice && state.status === 'away' && styles.statusOutOfOffice, state.outOfOffice && state.status === 'offline' && styles.statusOffline, state.outOfOffice && state.status === 'out-of-office' && styles.statusOutOfOffice, state.size === 'tiny' && styles.tiny, state.size === 'large' && styles.large, state.size === 'extra-large' && styles.extraLarge, state.root.className);\n if (state.icon) {\n state.icon.className = mergeClasses(presenceBadgeClassNames.icon, state.icon.className);\n }\n return state;\n};\n//# sourceMappingURL=usePresenceBadgeStyles.js.map"],"names":["presenceBadgeClassNames","usePresenceBadgeStyles_unstable","root","icon","getIsBusy","status","useRootClassName","__resetStyles","useStyles","__styles","statusBusy","sj55zd","statusAway","statusAvailable","statusOffline","statusOutOfOffice","outOfOffice","outOfOfficeAvailable","outOfOfficeBusy","tiny","Bubjx69","a9b677","B5pe6w7","p4uzdd","large","extraLarge","d","state","rootClassName","styles","isBusy","className","mergeClasses","size"],"mappings":";;;;;;;;;;;IAEaA,uBAAuB,MAAvBA;IA4DAC,+BAA+B,MAA/BA;;uBA9DyC;AAE/C,MAAMD,0BAA0B;IACrCE,MAAM;IACNC,MAAM;AACR;AACA,MAAMC,YAAYC,CAAAA,SAAU;IAC1B,IAAIA,WAAW,UAAUA,WAAW,oBAAoBA,WAAW,aAAaA,WAAW,WAAW;QACpG,OAAO,IAAI;IACb,CAAC;IACD,OAAO,KAAK;AACd;AACA,MAAMC,mBAAmB,WAAW,GAAEC,IAAAA,uBAAa,EAAC,YAAY,IAAI,EAAE;IAAC;IAA+a;CAA6F;AACnlB,MAAMC,YAAY,WAAW,GAAEC,IAAAA,kBAAQ,EAAC;IACtCC,YAAY;QACVC,QAAQ;IACV;IACAC,YAAY;QACVD,QAAQ;IACV;IACAE,iBAAiB;QACfF,QAAQ;IACV;IACAG,eAAe;QACbH,QAAQ;IACV;IACAI,mBAAmB;QACjBJ,QAAQ;IACV;IACAK,aAAa;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AM,KAAK,mBAAmBwB,OAAOd,iBAAiB,EAAEY,MAAMM,IAAI,KAAK,UAAUJ,OAAOV,IAAI,EAAEQ,MAAMM,IAAI,KAAK,WAAWJ,OAAOL,KAAK,EAAEG,MAAMM,IAAI,KAAK,iBAAiBJ,OAAOJ,UAAU,EAAEE,MAAMzB,IAAI,CAAC6B,SAAS;IACn3B,IAAIJ,MAAMxB,IAAI,EAAE;QACdwB,MAAMxB,IAAI,CAAC4B,SAAS,GAAGC,IAAAA,mBAAY,EAAChC,wBAAwBG,IAAI,EAAEwB,MAAMxB,IAAI,CAAC4B,SAAS;IACxF,CAAC;IACD,OAAOJ;AACT,GACA,kDAAkD"}
@@ -1,88 +1,31 @@
1
1
  "use strict";
2
-
3
2
  Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useCounterBadge_unstable = exports.useCounterBadgeStyles_unstable = exports.counterBadgeClassNames = exports.CounterBadge = exports.usePresenceBadge_unstable = exports.usePresenceBadgeStyles_unstable = exports.presenceBadgeClassNames = exports.PresenceBadge = exports.useBadge_unstable = exports.useBadgeStyles_unstable = exports.renderBadge_unstable = exports.badgeClassNames = exports.Badge = void 0;
7
- var Badge_1 = /*#__PURE__*/require("./Badge");
8
- Object.defineProperty(exports, "Badge", {
9
- enumerable: true,
10
- get: function () {
11
- return Badge_1.Badge;
12
- }
13
- });
14
- Object.defineProperty(exports, "badgeClassNames", {
15
- enumerable: true,
16
- get: function () {
17
- return Badge_1.badgeClassNames;
18
- }
19
- });
20
- Object.defineProperty(exports, "renderBadge_unstable", {
21
- enumerable: true,
22
- get: function () {
23
- return Badge_1.renderBadge_unstable;
24
- }
25
- });
26
- Object.defineProperty(exports, "useBadgeStyles_unstable", {
27
- enumerable: true,
28
- get: function () {
29
- return Badge_1.useBadgeStyles_unstable;
30
- }
31
- });
32
- Object.defineProperty(exports, "useBadge_unstable", {
33
- enumerable: true,
34
- get: function () {
35
- return Badge_1.useBadge_unstable;
36
- }
37
- });
38
- var PresenceBadge_1 = /*#__PURE__*/require("./PresenceBadge");
39
- Object.defineProperty(exports, "PresenceBadge", {
40
- enumerable: true,
41
- get: function () {
42
- return PresenceBadge_1.PresenceBadge;
43
- }
44
- });
45
- Object.defineProperty(exports, "presenceBadgeClassNames", {
46
- enumerable: true,
47
- get: function () {
48
- return PresenceBadge_1.presenceBadgeClassNames;
49
- }
50
- });
51
- Object.defineProperty(exports, "usePresenceBadgeStyles_unstable", {
52
- enumerable: true,
53
- get: function () {
54
- return PresenceBadge_1.usePresenceBadgeStyles_unstable;
55
- }
56
- });
57
- Object.defineProperty(exports, "usePresenceBadge_unstable", {
58
- enumerable: true,
59
- get: function () {
60
- return PresenceBadge_1.usePresenceBadge_unstable;
61
- }
62
- });
63
- var CounterBadge_1 = /*#__PURE__*/require("./CounterBadge");
64
- Object.defineProperty(exports, "CounterBadge", {
65
- enumerable: true,
66
- get: function () {
67
- return CounterBadge_1.CounterBadge;
68
- }
69
- });
70
- Object.defineProperty(exports, "counterBadgeClassNames", {
71
- enumerable: true,
72
- get: function () {
73
- return CounterBadge_1.counterBadgeClassNames;
74
- }
75
- });
76
- Object.defineProperty(exports, "useCounterBadgeStyles_unstable", {
77
- enumerable: true,
78
- get: function () {
79
- return CounterBadge_1.useCounterBadgeStyles_unstable;
80
- }
81
- });
82
- Object.defineProperty(exports, "useCounterBadge_unstable", {
83
- enumerable: true,
84
- get: function () {
85
- return CounterBadge_1.useCounterBadge_unstable;
86
- }
87
- });
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ Badge: ()=>_badge.Badge,
13
+ badgeClassNames: ()=>_badge.badgeClassNames,
14
+ renderBadge_unstable: ()=>_badge.renderBadge_unstable,
15
+ useBadgeStyles_unstable: ()=>_badge.useBadgeStyles_unstable,
16
+ useBadge_unstable: ()=>_badge.useBadge_unstable,
17
+ PresenceBadge: ()=>_presenceBadge.PresenceBadge,
18
+ presenceBadgeClassNames: ()=>_presenceBadge.presenceBadgeClassNames,
19
+ usePresenceBadgeStyles_unstable: ()=>_presenceBadge.usePresenceBadgeStyles_unstable,
20
+ usePresenceBadge_unstable: ()=>_presenceBadge.usePresenceBadge_unstable,
21
+ CounterBadge: ()=>_counterBadge.CounterBadge,
22
+ counterBadgeClassNames: ()=>_counterBadge.counterBadgeClassNames,
23
+ useCounterBadgeStyles_unstable: ()=>_counterBadge.useCounterBadgeStyles_unstable,
24
+ useCounterBadge_unstable: ()=>_counterBadge.useCounterBadge_unstable
25
+ });
26
+ const _badge = require("./Badge");
27
+ const _presenceBadge = require("./PresenceBadge");
28
+ const _counterBadge = require("./CounterBadge");
29
+ //# sourceMappingURL=index.js.map
30
+
88
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";;;;;;AAAA;AAASA;EAAAC;EAAAC;IAAA,oBAAK;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,8BAAe;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,mCAAoB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,sCAAuB;EAAA;AAAA;AAAEF;EAAAC;EAAAC;IAAA,gCAAiB;EAAA;AAAA;AAEjG;AACEF;EAAAC;EAAAC;IAAA,oCAAa;EAAA;AAAA;AACbF;EAAAC;EAAAC;IAAA,8CAAuB;EAAA;AAAA;AACvBF;EAAAC;EAAAC;IAAA,sDAA+B;EAAA;AAAA;AAC/BF;EAAAC;EAAAC;IAAA,gDAAyB;EAAA;AAAA;AAG3B;AACEF;EAAAC;EAAAC;IAAA,kCAAY;EAAA;AAAA;AACZF;EAAAC;EAAAC;IAAA,4CAAsB;EAAA;AAAA;AACtBF;EAAAC;EAAAC;IAAA,oDAA8B;EAAA;AAAA;AAC9BF;EAAAC;EAAAC;IAAA,8CAAwB;EAAA;AAAA","names":["Object","enumerable","get"],"sourceRoot":"","sources":["../../../../../../../packages/react-components/react-badge/src/index.ts"],"sourcesContent":["export { Badge, badgeClassNames, renderBadge_unstable, useBadgeStyles_unstable, useBadge_unstable } from './Badge';\nexport type { BadgeProps, BadgeSlots, BadgeState } from './Badge';\nexport {\n PresenceBadge,\n presenceBadgeClassNames,\n usePresenceBadgeStyles_unstable,\n usePresenceBadge_unstable,\n} from './PresenceBadge';\nexport type { PresenceBadgeProps, PresenceBadgeState, PresenceBadgeStatus } from './PresenceBadge';\nexport {\n CounterBadge,\n counterBadgeClassNames,\n useCounterBadgeStyles_unstable,\n useCounterBadge_unstable,\n} from './CounterBadge';\nexport type { CounterBadgeProps, CounterBadgeState } from './CounterBadge';\n"]}
1
+ {"version":3,"sources":["../lib/index.js"],"sourcesContent":["export { Badge, badgeClassNames, renderBadge_unstable, useBadgeStyles_unstable, useBadge_unstable } from './Badge';\nexport { PresenceBadge, presenceBadgeClassNames, usePresenceBadgeStyles_unstable, usePresenceBadge_unstable } from './PresenceBadge';\nexport { CounterBadge, counterBadgeClassNames, useCounterBadgeStyles_unstable, useCounterBadge_unstable } from './CounterBadge';\n//# sourceMappingURL=index.js.map"],"names":["Badge","badgeClassNames","renderBadge_unstable","useBadgeStyles_unstable","useBadge_unstable","PresenceBadge","presenceBadgeClassNames","usePresenceBadgeStyles_unstable","usePresenceBadge_unstable","CounterBadge","counterBadgeClassNames","useCounterBadgeStyles_unstable","useCounterBadge_unstable"],"mappings":";;;;;;;;;;;IAASA,KAAK,MAALA,YAAK;IAAEC,eAAe,MAAfA,sBAAe;IAAEC,oBAAoB,MAApBA,2BAAoB;IAAEC,uBAAuB,MAAvBA,8BAAuB;IAAEC,iBAAiB,MAAjBA,wBAAiB;IACxFC,aAAa,MAAbA,4BAAa;IAAEC,uBAAuB,MAAvBA,sCAAuB;IAAEC,+BAA+B,MAA/BA,8CAA+B;IAAEC,yBAAyB,MAAzBA,wCAAyB;IAClGC,YAAY,MAAZA,0BAAY;IAAEC,sBAAsB,MAAtBA,oCAAsB;IAAEC,8BAA8B,MAA9BA,4CAA8B;IAAEC,wBAAwB,MAAxBA,sCAAwB;;uBAFE;+BACU;8BACJ;CAC/G,iCAAiC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-badge",
3
- "version": "0.0.0-nightly-20230223-0420.1",
3
+ "version": "0.0.0-nightly-20230223-2115.1",
4
4
  "description": "React components for building web experiences",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -22,21 +22,21 @@
22
22
  "test": "jest --passWithNoTests",
23
23
  "storybook": "start-storybook",
24
24
  "type-check": "tsc -b tsconfig.json",
25
- "generate-api": "tsc -p ./tsconfig.lib.json --emitDeclarationOnly && just-scripts api-extractor"
25
+ "generate-api": "just-scripts generate-api"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@fluentui/eslint-plugin": "*",
29
29
  "@fluentui/react-conformance": "*",
30
- "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230223-0420.1",
30
+ "@fluentui/react-conformance-griffel": "0.0.0-nightly-20230223-2115.1",
31
31
  "@fluentui/scripts-api-extractor": "*",
32
32
  "@fluentui/scripts-tasks": "*"
33
33
  },
34
34
  "dependencies": {
35
35
  "@fluentui/react-icons": "^2.0.175",
36
36
  "@griffel/react": "^1.5.2",
37
- "@fluentui/react-theme": "0.0.0-nightly-20230223-0420.1",
38
- "@fluentui/react-utilities": "0.0.0-nightly-20230223-0420.1",
39
- "tslib": "^2.1.0"
37
+ "@fluentui/react-theme": "0.0.0-nightly-20230223-2115.1",
38
+ "@fluentui/react-utilities": "0.0.0-nightly-20230223-2115.1",
39
+ "@swc/helpers": "^0.4.14"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@types/react": ">=16.8.0 <19.0.0",