@fluentui/react-badge 9.0.0-nightly.f81b28ceb3.1 → 9.0.0-rc.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. package/CHANGELOG.json +413 -18
  2. package/CHANGELOG.md +97 -11
  3. package/dist/react-badge.d.ts +33 -28
  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.d.ts +1 -1
  8. package/lib/components/Badge/Badge.js +8 -8
  9. package/lib/components/Badge/Badge.js.map +1 -1
  10. package/lib/components/Badge/Badge.types.d.ts +4 -5
  11. package/lib/components/Badge/Badge.types.js.map +1 -1
  12. package/lib/components/Badge/index.d.ts +1 -1
  13. package/lib/components/Badge/index.js +0 -1
  14. package/lib/components/Badge/index.js.map +1 -1
  15. package/lib/components/Badge/renderBadge.d.ts +1 -1
  16. package/lib/components/Badge/renderBadge.js +9 -7
  17. package/lib/components/Badge/renderBadge.js.map +1 -1
  18. package/lib/components/Badge/useBadge.d.ts +1 -1
  19. package/lib/components/Badge/useBadge.js +19 -22
  20. package/lib/components/Badge/useBadge.js.map +1 -1
  21. package/lib/components/Badge/useBadgeStyles.d.ts +2 -1
  22. package/lib/components/Badge/useBadgeStyles.js +210 -203
  23. package/lib/components/Badge/useBadgeStyles.js.map +1 -1
  24. package/lib/components/CounterBadge/CounterBadge.d.ts +1 -1
  25. package/lib/components/CounterBadge/CounterBadge.js +8 -8
  26. package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
  27. package/lib/components/CounterBadge/CounterBadge.types.d.ts +9 -9
  28. package/lib/components/CounterBadge/CounterBadge.types.js.map +1 -1
  29. package/lib/components/CounterBadge/index.js.map +1 -1
  30. package/lib/components/CounterBadge/useCounterBadge.d.ts +1 -1
  31. package/lib/components/CounterBadge/useCounterBadge.js +19 -25
  32. package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
  33. package/lib/components/CounterBadge/useCounterBadgeStyles.d.ts +2 -1
  34. package/lib/components/CounterBadge/useCounterBadgeStyles.js +10 -40
  35. package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  36. package/lib/components/PresenceBadge/PresenceBadge.d.ts +1 -1
  37. package/lib/components/PresenceBadge/PresenceBadge.js +8 -8
  38. package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
  39. package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +7 -5
  40. package/lib/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
  41. package/lib/components/PresenceBadge/index.js.map +1 -1
  42. package/lib/components/PresenceBadge/presenceIcons.d.ts +11 -0
  43. package/lib/components/PresenceBadge/presenceIcons.js +128 -0
  44. package/lib/components/PresenceBadge/presenceIcons.js.map +1 -0
  45. package/lib/components/PresenceBadge/usePresenceBadge.d.ts +1 -1
  46. package/lib/components/PresenceBadge/usePresenceBadge.js +36 -25
  47. package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  48. package/lib/components/PresenceBadge/usePresenceBadgeStyles.d.ts +2 -1
  49. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +43 -46
  50. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  51. package/lib/index.js.map +1 -1
  52. package/lib-commonjs/Badge.js +1 -1
  53. package/lib-commonjs/Badge.js.map +1 -1
  54. package/lib-commonjs/CounterBadge.js +1 -1
  55. package/lib-commonjs/CounterBadge.js.map +1 -1
  56. package/lib-commonjs/PresenceBadge.js +1 -1
  57. package/lib-commonjs/PresenceBadge.js.map +1 -1
  58. package/lib-commonjs/components/Badge/Badge.d.ts +1 -1
  59. package/lib-commonjs/components/Badge/Badge.js +9 -9
  60. package/lib-commonjs/components/Badge/Badge.js.map +1 -1
  61. package/lib-commonjs/components/Badge/Badge.types.d.ts +4 -5
  62. package/lib-commonjs/components/Badge/Badge.types.js.map +1 -1
  63. package/lib-commonjs/components/Badge/index.d.ts +1 -1
  64. package/lib-commonjs/components/Badge/index.js +1 -3
  65. package/lib-commonjs/components/Badge/index.js.map +1 -1
  66. package/lib-commonjs/components/Badge/renderBadge.d.ts +1 -1
  67. package/lib-commonjs/components/Badge/renderBadge.js +13 -12
  68. package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
  69. package/lib-commonjs/components/Badge/useBadge.d.ts +1 -1
  70. package/lib-commonjs/components/Badge/useBadge.js +22 -26
  71. package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
  72. package/lib-commonjs/components/Badge/useBadgeStyles.d.ts +2 -1
  73. package/lib-commonjs/components/Badge/useBadgeStyles.js +214 -205
  74. package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
  75. package/lib-commonjs/components/CounterBadge/CounterBadge.d.ts +1 -1
  76. package/lib-commonjs/components/CounterBadge/CounterBadge.js +9 -9
  77. package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
  78. package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +9 -9
  79. package/lib-commonjs/components/CounterBadge/CounterBadge.types.js.map +1 -1
  80. package/lib-commonjs/components/CounterBadge/index.js +1 -1
  81. package/lib-commonjs/components/CounterBadge/index.js.map +1 -1
  82. package/lib-commonjs/components/CounterBadge/useCounterBadge.d.ts +1 -1
  83. package/lib-commonjs/components/CounterBadge/useCounterBadge.js +21 -28
  84. package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
  85. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.d.ts +2 -1
  86. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +13 -42
  87. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  88. package/lib-commonjs/components/PresenceBadge/PresenceBadge.d.ts +1 -1
  89. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js +9 -9
  90. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
  91. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +7 -5
  92. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
  93. package/lib-commonjs/components/PresenceBadge/index.js +1 -1
  94. package/lib-commonjs/components/PresenceBadge/index.js.map +1 -1
  95. package/lib-commonjs/components/PresenceBadge/presenceIcons.d.ts +11 -0
  96. package/lib-commonjs/components/PresenceBadge/presenceIcons.js +136 -0
  97. package/lib-commonjs/components/PresenceBadge/presenceIcons.js.map +1 -0
  98. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.d.ts +1 -1
  99. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +38 -28
  100. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  101. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.d.ts +2 -1
  102. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +46 -48
  103. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  104. package/lib-commonjs/index.js +1 -1
  105. package/lib-commonjs/index.js.map +1 -1
  106. package/package.json +14 -15
  107. package/lib/common/isConformant.d.ts +0 -4
  108. package/lib/common/isConformant.js +0 -13
  109. package/lib/common/isConformant.js.map +0 -1
  110. package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
  111. package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -111
  112. package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
  113. package/lib-commonjs/common/isConformant.d.ts +0 -4
  114. package/lib-commonjs/common/isConformant.js +0 -24
  115. package/lib-commonjs/common/isConformant.js.map +0 -1
  116. package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
  117. package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -127
  118. package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
@@ -1,62 +1,41 @@
1
- import { mergeClasses, __styles } from '@fluentui/react-make-styles';
2
- import { useBadgeStyles } from '../../Badge';
1
+ import { mergeClasses, __styles, shorthands } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
+ export const presenceBadgeClassName = 'fui-PresenceBadge';
3
4
 
4
- var useStyles = /*#__PURE__*/__styles({
5
+ const useStyles = /*#__PURE__*/__styles({
5
6
  "root": {
6
7
  "z8tnut": "f1g0x7ka",
7
8
  "z189sj": ["fhxju0i", "f1cnd47f"],
8
9
  "Byoj8tv": "f1qch9an",
9
10
  "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"]
11
+ "mc9l5x": "ftuwxu6",
12
+ "B7ck84d": "f1ewtqcl",
13
+ "Bt984gj": "f122n59",
14
+ "Brf1p80": "f4d9j23",
15
+ "Bhmb4qv": "fb8jth9",
16
+ "Bbmb7ep": ["fqgqgel", "fchfifz"],
17
+ "Beyfa6y": ["fchfifz", "fqgqgel"],
18
+ "B7oj6ja": ["fc7b1hi", "f1dpx5h9"],
19
+ "Btl43ni": ["f1dpx5h9", "fc7b1hi"],
20
+ "De3pzq": "fxugw4r"
20
21
  },
21
22
  "statusBusy": {
22
- "De3pzq": "fdl5y0r",
23
- "g2u3we": "f11ttmz8",
24
- "h3c5rm": ["f1ratw88", "f459ikj"],
25
- "B9xav0g": "fvovscg",
26
- "zhjwy3": ["f459ikj", "f1ratw88"]
23
+ "sj55zd": "fvi85wt"
27
24
  },
28
25
  "statusAway": {
29
- "De3pzq": "fb00bxr",
30
- "g2u3we": "f1skk3ns",
31
- "h3c5rm": ["f766wml", "f1rnrfqa"],
32
- "B9xav0g": "fb8zvtn",
33
- "zhjwy3": ["f1rnrfqa", "f766wml"]
26
+ "sj55zd": "f14k8a89"
34
27
  },
35
28
  "statusAvailable": {
36
- "De3pzq": "f1og3d8b",
37
- "g2u3we": "f1t9i9vy",
38
- "h3c5rm": ["f1r5awo9", "fnfhfy0"],
39
- "B9xav0g": "fgfkvtu",
40
- "zhjwy3": ["fnfhfy0", "f1r5awo9"]
29
+ "sj55zd": "fqa5hgp"
41
30
  },
42
31
  "statusOffline": {
43
- "De3pzq": "fxugw4r",
44
- "sj55zd": "f11d4kpn",
45
- "g2u3we": "fi2z7s6",
46
- "h3c5rm": ["f1agc6it", "f1sit5hz"],
47
- "B9xav0g": "f9pok3v",
48
- "zhjwy3": ["f1sit5hz", "f1agc6it"]
32
+ "sj55zd": "f11d4kpn"
49
33
  },
50
34
  "statusOutOfOffice": {
51
- "De3pzq": "fxugw4r",
52
- "sj55zd": "fdce8r3",
53
- "g2u3we": "f161shwc",
54
- "h3c5rm": ["fbde6ui", "f7rrh46"],
55
- "B9xav0g": "f1yt3bcc",
56
- "zhjwy3": ["f7rrh46", "fbde6ui"]
35
+ "sj55zd": "fdce8r3"
57
36
  },
58
37
  "outOfOffice": {
59
- "De3pzq": "fxugw4r"
38
+ "sj55zd": "fr0bkrk"
60
39
  },
61
40
  "outOfOfficeAvailable": {
62
41
  "sj55zd": "fqa5hgp"
@@ -66,18 +45,36 @@ var useStyles = /*#__PURE__*/__styles({
66
45
  },
67
46
  "outOfOfficeAway": {
68
47
  "sj55zd": "f14k8a89"
48
+ },
49
+ "tiny": {
50
+ "Bubjx69": "f9ikmtg",
51
+ "a9b677": "f16dn6v3",
52
+ "B5pe6w7": "fab5kbq",
53
+ "p4uzdd": "f1ms1d91"
54
+ },
55
+ "large": {
56
+ "Bubjx69": "f9ikmtg",
57
+ "a9b677": "f64fuq3",
58
+ "B5pe6w7": "f1vfi1yj",
59
+ "p4uzdd": "f15s34gz"
60
+ },
61
+ "extraLarge": {
62
+ "Bubjx69": "f9ikmtg",
63
+ "a9b677": "f1w9dchk",
64
+ "B5pe6w7": "f14efy9b",
65
+ "p4uzdd": "fhipgdu"
69
66
  }
70
67
  }, {
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);}"]
68
+ "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;}", ".fqgqgel{border-bottom-right-radius:50%;}", ".fchfifz{border-bottom-left-radius:50%;}", ".fc7b1hi{border-top-right-radius:50%;}", ".f1dpx5h9{border-top-left-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
69
  });
73
70
  /**
74
71
  * Applies style classnames to slots
75
72
  */
76
73
 
77
74
 
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);
75
+ export const usePresenceBadgeStyles_unstable = state => {
76
+ const styles = useStyles();
77
+ 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);
78
+ return state;
82
79
  };
83
80
  //# sour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BsB,CAAnC;AAoBA,SAAO,KAAP;AACD,CAvBM","sourcesContent":["import { mergeClasses, makeStyles, shorthands } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport type { PresenceBadgeState } from './PresenceBadge.types';\n\nexport const presenceBadgeClassName = 'fui-PresenceBadge';\n\nconst useStyles = makeStyles({\n root: {\n ...shorthands.padding(0),\n display: 'inline-flex',\n boxSizing: 'border-box',\n alignItems: 'center',\n justifyContent: 'center',\n\n '& span': {\n display: 'flex',\n },\n ...shorthands.borderRadius('50%'),\n backgroundColor: tokens.colorNeutralBackground1,\n },\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 outOfOfficeAway: {\n color: tokens.colorPaletteMarigoldBackground3,\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 styles = useStyles();\n state.root.className = mergeClasses(\n presenceBadgeClassName,\n styles.root,\n (state.status === 'busy' || state.status === 'doNotDisturb') && styles.statusBusy,\n state.status === 'away' && styles.statusAway,\n state.status === 'available' && styles.statusAvailable,\n state.status === 'offline' && styles.statusOffline,\n state.status === 'outOfOffice' && styles.statusOutOfOffice,\n state.outOfOffice && styles.outOfOffice,\n state.outOfOffice && state.status === 'available' && styles.outOfOfficeAvailable,\n state.outOfOffice && (state.status === 'busy' || state.status === 'doNotDisturb') && styles.outOfOfficeBusy,\n state.outOfOffice && state.status === 'away' && styles.outOfOfficeAway,\n state.outOfOffice && state.status === 'offline' && styles.statusOffline,\n state.outOfOffice && state.status === 'outOfOffice' && 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 return state;\n};\n"],"sourceRoot":"../src/"}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iCAAiC,CAAC;AAChD,cAAc,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,0BAA0B,CAAC;AACzC,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,iCAAiC,CAAC;AAChD,cAAc,gBAAgB,CAAC","sourcesContent":["export * from './components/Badge/index';\nexport * from './Badge';\nexport * from './PresenceBadge';\nexport * from './components/CounterBadge/index';\nexport * from './CounterBadge';\n"]}
@@ -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
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/Badge.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["Badge.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Badge/index';\n"],"sourceRoot":"../src/"}
@@ -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
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/CounterBadge.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iCAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["CounterBadge.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/CounterBadge/index';\n"],"sourceRoot":"../src/"}
@@ -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
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/PresenceBadge.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kCAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["PresenceBadge.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kCAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/PresenceBadge/index';\n"],"sourceRoot":"../src/"}
@@ -1,6 +1,6 @@
1
1
  import type { BadgeProps } from './Badge.types';
2
2
  import type { ForwardRefComponent } from '@fluentui/react-utilities';
3
3
  /**
4
- * Define a styled Badge, using the `useBadge` hook.
4
+ * Define a styled Badge, using the `useBadge_unstable` hook.
5
5
  */
6
6
  export declare const Badge: ForwardRefComponent<BadgeProps>;
@@ -5,22 +5,22 @@ 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
- * Define a styled Badge, using the `useBadge` hook.
16
+ * Define a styled Badge, using the `useBadge_unstable` hook.
17
17
  */
18
18
 
19
19
 
20
- exports.Badge = /*#__PURE__*/React.forwardRef(function (props, ref) {
21
- var state = useBadge_1.useBadge(props, ref);
22
- useBadgeStyles_1.useBadgeStyles(state);
23
- return renderBadge_1.renderBadge(state);
20
+ exports.Badge = /*#__PURE__*/React.forwardRef((props, ref) => {
21
+ const state = useBadge_1.useBadge_unstable(props, ref);
22
+ useBadgeStyles_1.useBadgeStyles_unstable(state);
23
+ return renderBadge_1.renderBadge_unstable(state);
24
24
  });
25
25
  exports.Badge.displayName = 'Badge';
26
26
  //# sourceMappingURL=Badge.js.map
@@ -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":["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,iBAAA,CAAkB,KAAlB,EAAyB,GAAzB,CAAd;AACA,EAAA,gBAAA,CAAA,uBAAA,CAAwB,KAAxB;AAEA,SAAO,aAAA,CAAA,oBAAA,CAAqB,KAArB,CAAP;AACD,CALqD,CAAzC;AAOb,OAAA,CAAA,KAAA,CAAM,WAAN,GAAoB,OAApB","sourcesContent":["import * as React from 'react';\nimport { useBadge_unstable } from './useBadge';\nimport { useBadgeStyles_unstable } from './useBadgeStyles';\nimport { renderBadge_unstable } from './renderBadge';\nimport type { BadgeProps } from './Badge.types';\nimport type { ForwardRefComponent } from '@fluentui/react-utilities';\n\n/**\n * Define a styled Badge, using the `useBadge_unstable` hook.\n */\nexport const Badge: ForwardRefComponent<BadgeProps> = React.forwardRef((props, ref) => {\n const state = useBadge_unstable(props, ref);\n useBadgeStyles_unstable(state);\n\n return renderBadge_unstable(state);\n});\n\nBadge.displayName = 'Badge';\n"],"sourceRoot":"../src/"}
@@ -1,8 +1,7 @@
1
- import * as React from 'react';
2
- import type { ComponentProps, ComponentState, ObjectShorthandProps } from '@fluentui/react-utilities';
1
+ import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-utilities';
3
2
  export declare type BadgeSlots = {
4
- root: ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>;
5
- icon?: ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>;
3
+ root: Slot<'div'>;
4
+ icon?: Slot<'span'>;
6
5
  };
7
6
  export declare type BadgeCommons = {
8
7
  /**
@@ -31,5 +30,5 @@ export declare type BadgeCommons = {
31
30
  */
32
31
  size: 'tiny' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
33
32
  };
34
- export declare type BadgeProps = ComponentProps<Partial<BadgeSlots>> & Partial<BadgeCommons>;
33
+ export declare type BadgeProps = Omit<ComponentProps<BadgeSlots>, 'color'> & Partial<BadgeCommons>;
35
34
  export declare type BadgeState = ComponentState<BadgeSlots> & BadgeCommons;
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
@@ -1,5 +1,5 @@
1
1
  export * from './Badge';
2
- export * from './Badge.types';
2
+ export type { BadgeProps, BadgeSlots, BadgeState } from './Badge.types';
3
3
  export * from './renderBadge';
4
4
  export * from './useBadge';
5
5
  export * from './useBadgeStyles';
@@ -4,12 +4,10 @@ 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
 
11
- tslib_1.__exportStar(require("./Badge.types"), exports);
12
-
13
11
  tslib_1.__exportStar(require("./renderBadge"), exports);
14
12
 
15
13
  tslib_1.__exportStar(require("./useBadge"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Badge/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
1
+ {"version":3,"sources":["components/Badge/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA;;AAGA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,eAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,YAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './Badge';\n// Explicit exports to omit BadgeCommons\nexport type { BadgeProps, BadgeSlots, BadgeState } from './Badge.types';\nexport * from './renderBadge';\nexport * from './useBadge';\nexport * from './useBadgeStyles';\n"],"sourceRoot":"../src/"}
@@ -1,2 +1,2 @@
1
1
  import type { BadgeState } from './Badge.types';
2
- export declare const renderBadge: (state: BadgeState) => JSX.Element;
2
+ export declare const renderBadge_unstable: (state: BadgeState) => JSX.Element;
@@ -3,21 +3,22 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.renderBadge = void 0;
6
+ exports.renderBadge_unstable = 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_unstable = state => {
13
+ const {
14
+ slots,
15
+ slotProps
16
+ } = react_utilities_1.getSlots(state);
17
+ return React.createElement(slots.root, { ...slotProps.root
18
+ }, state.iconPosition === 'before' && slots.icon && React.createElement(slots.icon, { ...slotProps.icon
19
+ }), state.root.children, state.iconPosition === 'after' && slots.icon && React.createElement(slots.icon, { ...slotProps.icon
20
+ }));
20
21
  };
21
22
 
22
- exports.renderBadge = renderBadge;
23
+ exports.renderBadge_unstable = renderBadge_unstable;
23
24
  //# sourceMappingURL=renderBadge.js.map
@@ -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;AACr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EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CADpD,EAEG,KAAK,CAAC,IAAN,CAAW,QAFd,EAGG,KAAK,CAAC,YAAN,KAAuB,OAAvB,IAAkC,KAAK,CAAC,IAAxC,IAAgD,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAK,SAAS,CAAC;AAAf,GAAX,CAHnD,CADF;AAOD,CAVM;;AAAM,OAAA,CAAA,oBAAA,GAAoB,oBAApB","sourcesContent":["import * as React from 'react';\nimport { getSlots } from '@fluentui/react-utilities';\nimport type { BadgeState, BadgeSlots } from './Badge.types';\n\nexport const renderBadge_unstable = (state: BadgeState) => {\n const { slots, slotProps } = getSlots<BadgeSlots>(state);\n\n return (\n <slots.root {...slotProps.root}>\n {state.iconPosition === 'before' && slots.icon && <slots.icon {...slotProps.icon} />}\n {state.root.children}\n {state.iconPosition === 'after' && slots.icon && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
@@ -3,4 +3,4 @@ import type { BadgeProps, BadgeState } from './Badge.types';
3
3
  /**
4
4
  * Returns the props and state required to render the component
5
5
  */
6
- export declare const useBadge: (props: BadgeProps, ref: React.Ref<HTMLElement>) => BadgeState;
6
+ export declare const useBadge_unstable: (props: BadgeProps, ref: React.Ref<HTMLElement>) => BadgeState;
@@ -3,45 +3,41 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useBadge = void 0;
6
+ exports.useBadge_unstable = 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_unstable = (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;
44
40
  };
45
41
 
46
- exports.useBadge = useBadge;
42
+ exports.useBadge_unstable = useBadge_unstable;
47
43
  //# sourceMappingURL=useBadge.js.map
@@ -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,E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HX;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,iBAAA,GAAiB,iBAAjB","sourcesContent":["import * as React from 'react';\nimport { getNativeElementProps, resolveShorthand } from '@fluentui/react-utilities';\nimport type { BadgeProps, BadgeState } from './Badge.types';\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useBadge_unstable = (props: BadgeProps, ref: React.Ref<HTMLElement>): BadgeState => {\n const {\n shape = 'circular',\n size = 'medium',\n iconPosition = 'before',\n appearance = 'filled',\n color = 'brand',\n } = props;\n\n const state: BadgeState = {\n shape,\n size,\n iconPosition,\n appearance,\n color,\n components: {\n root: 'div',\n icon: 'span',\n },\n root: getNativeElementProps('div', {\n ref,\n 'aria-hidden': true,\n ...props,\n }),\n icon: resolveShorthand(props.icon),\n };\n\n return state;\n};\n"],"sourceRoot":"../src/"}
@@ -1,5 +1,6 @@
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
  */
5
- export declare const useBadgeStyles: (state: BadgeState) => BadgeState;
6
+ export declare const useBadgeStyles_unstable: (state: BadgeState) => BadgeState;