@fluentui/react-badge 9.0.0-alpha.83 → 9.0.0-alpha.84

Sign up to get free protection for your applications and to get access to all the features.
Files changed (148) hide show
  1. package/CHANGELOG.json +53 -8
  2. package/CHANGELOG.md +22 -8
  3. package/dist/react-badge.d.ts +57 -111
  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/common/isConformant.js +2 -0
  8. package/lib/common/isConformant.js.map +1 -1
  9. package/lib/components/Badge/Badge.d.ts +1 -1
  10. package/lib/components/Badge/Badge.js.map +1 -1
  11. package/lib/components/Badge/Badge.types.d.ts +18 -27
  12. package/lib/components/Badge/Badge.types.js.map +1 -1
  13. package/lib/components/Badge/index.js.map +1 -1
  14. package/lib/components/Badge/renderBadge.js +3 -4
  15. package/lib/components/Badge/renderBadge.js.map +1 -1
  16. package/lib/components/Badge/useBadge.d.ts +1 -5
  17. package/lib/components/Badge/useBadge.js +29 -18
  18. package/lib/components/Badge/useBadge.js.map +1 -1
  19. package/lib/components/Badge/useBadgeStyles.js +1 -1
  20. package/lib/components/Badge/useBadgeStyles.js.map +1 -1
  21. package/lib/components/CounterBadge/CounterBadge.d.ts +2 -8
  22. package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
  23. package/lib/components/CounterBadge/CounterBadge.types.d.ts +23 -37
  24. package/lib/components/CounterBadge/CounterBadge.types.js.map +1 -1
  25. package/lib/components/CounterBadge/index.js.map +1 -1
  26. package/lib/components/CounterBadge/useCounterBadge.d.ts +1 -5
  27. package/lib/components/CounterBadge/useCounterBadge.js +25 -19
  28. package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
  29. package/lib/components/CounterBadge/useCounterBadgeStyles.js +1 -1
  30. package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  31. package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +1 -1
  32. package/lib/components/PresenceBadge/PresenceBadge.d.ts +2 -4
  33. package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
  34. package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +6 -17
  35. package/lib/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
  36. package/lib/components/PresenceBadge/index.js.map +1 -1
  37. package/lib/components/PresenceBadge/usePresenceBadge.d.ts +1 -5
  38. package/lib/components/PresenceBadge/usePresenceBadge.js +15 -21
  39. package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  40. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +1 -1
  41. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  42. package/lib/index.js.map +1 -1
  43. package/lib-commonjs/Badge.js.map +1 -1
  44. package/lib-commonjs/CounterBadge.js.map +1 -1
  45. package/lib-commonjs/PresenceBadge.js.map +1 -1
  46. package/lib-commonjs/common/isConformant.js +2 -0
  47. package/lib-commonjs/common/isConformant.js.map +1 -1
  48. package/lib-commonjs/components/Badge/Badge.d.ts +1 -1
  49. package/lib-commonjs/components/Badge/Badge.js.map +1 -1
  50. package/lib-commonjs/components/Badge/Badge.types.d.ts +18 -27
  51. package/lib-commonjs/components/Badge/Badge.types.js.map +1 -1
  52. package/lib-commonjs/components/Badge/index.js.map +1 -1
  53. package/lib-commonjs/components/Badge/renderBadge.js +2 -4
  54. package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
  55. package/lib-commonjs/components/Badge/useBadge.d.ts +1 -5
  56. package/lib-commonjs/components/Badge/useBadge.js +30 -19
  57. package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
  58. package/lib-commonjs/components/Badge/useBadgeStyles.js +1 -1
  59. package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
  60. package/lib-commonjs/components/CounterBadge/CounterBadge.d.ts +2 -8
  61. package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
  62. package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +23 -37
  63. package/lib-commonjs/components/CounterBadge/CounterBadge.types.js.map +1 -1
  64. package/lib-commonjs/components/CounterBadge/index.js.map +1 -1
  65. package/lib-commonjs/components/CounterBadge/useCounterBadge.d.ts +1 -5
  66. package/lib-commonjs/components/CounterBadge/useCounterBadge.js +27 -21
  67. package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
  68. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +1 -1
  69. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  70. package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +1 -1
  71. package/lib-commonjs/components/PresenceBadge/PresenceBadge.d.ts +2 -4
  72. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
  73. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +6 -17
  74. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
  75. package/lib-commonjs/components/PresenceBadge/index.js.map +1 -1
  76. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.d.ts +1 -5
  77. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +16 -22
  78. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  79. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +1 -1
  80. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  81. package/lib-commonjs/index.js.map +1 -1
  82. package/package.json +6 -6
  83. package/lib-amd/Badge.d.ts +0 -1
  84. package/lib-amd/Badge.js +0 -6
  85. package/lib-amd/Badge.js.map +0 -1
  86. package/lib-amd/CounterBadge.d.ts +0 -1
  87. package/lib-amd/CounterBadge.js +0 -6
  88. package/lib-amd/CounterBadge.js.map +0 -1
  89. package/lib-amd/PresenceBadge.d.ts +0 -1
  90. package/lib-amd/PresenceBadge.js +0 -6
  91. package/lib-amd/PresenceBadge.js.map +0 -1
  92. package/lib-amd/common/isConformant.d.ts +0 -4
  93. package/lib-amd/common/isConformant.js +0 -15
  94. package/lib-amd/common/isConformant.js.map +0 -1
  95. package/lib-amd/components/Badge/Badge.d.ts +0 -6
  96. package/lib-amd/components/Badge/Badge.js +0 -15
  97. package/lib-amd/components/Badge/Badge.js.map +0 -1
  98. package/lib-amd/components/Badge/Badge.types.d.ts +0 -47
  99. package/lib-amd/components/Badge/Badge.types.js +0 -5
  100. package/lib-amd/components/Badge/Badge.types.js.map +0 -1
  101. package/lib-amd/components/Badge/index.d.ts +0 -5
  102. package/lib-amd/components/Badge/index.js +0 -10
  103. package/lib-amd/components/Badge/index.js.map +0 -1
  104. package/lib-amd/components/Badge/renderBadge.d.ts +0 -2
  105. package/lib-amd/components/Badge/renderBadge.js +0 -14
  106. package/lib-amd/components/Badge/renderBadge.js.map +0 -1
  107. package/lib-amd/components/Badge/useBadge.d.ts +0 -10
  108. package/lib-amd/components/Badge/useBadge.js +0 -25
  109. package/lib-amd/components/Badge/useBadge.js.map +0 -1
  110. package/lib-amd/components/Badge/useBadgeStyles.d.ts +0 -5
  111. package/lib-amd/components/Badge/useBadgeStyles.js +0 -234
  112. package/lib-amd/components/Badge/useBadgeStyles.js.map +0 -1
  113. package/lib-amd/components/CounterBadge/CounterBadge.d.ts +0 -12
  114. package/lib-amd/components/CounterBadge/CounterBadge.js +0 -15
  115. package/lib-amd/components/CounterBadge/CounterBadge.js.map +0 -1
  116. package/lib-amd/components/CounterBadge/CounterBadge.types.d.ts +0 -55
  117. package/lib-amd/components/CounterBadge/CounterBadge.types.js +0 -5
  118. package/lib-amd/components/CounterBadge/CounterBadge.types.js.map +0 -1
  119. package/lib-amd/components/CounterBadge/index.d.ts +0 -4
  120. package/lib-amd/components/CounterBadge/index.js +0 -9
  121. package/lib-amd/components/CounterBadge/index.js.map +0 -1
  122. package/lib-amd/components/CounterBadge/useCounterBadge.d.ts +0 -10
  123. package/lib-amd/components/CounterBadge/useCounterBadge.js +0 -28
  124. package/lib-amd/components/CounterBadge/useCounterBadge.js.map +0 -1
  125. package/lib-amd/components/CounterBadge/useCounterBadgeStyles.d.ts +0 -5
  126. package/lib-amd/components/CounterBadge/useCounterBadgeStyles.js +0 -46
  127. package/lib-amd/components/CounterBadge/useCounterBadgeStyles.js.map +0 -1
  128. package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
  129. package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -64
  130. package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
  131. package/lib-amd/components/PresenceBadge/PresenceBadge.d.ts +0 -8
  132. package/lib-amd/components/PresenceBadge/PresenceBadge.js +0 -15
  133. package/lib-amd/components/PresenceBadge/PresenceBadge.js.map +0 -1
  134. package/lib-amd/components/PresenceBadge/PresenceBadge.types.d.ts +0 -28
  135. package/lib-amd/components/PresenceBadge/PresenceBadge.types.js +0 -5
  136. package/lib-amd/components/PresenceBadge/PresenceBadge.types.js.map +0 -1
  137. package/lib-amd/components/PresenceBadge/index.d.ts +0 -4
  138. package/lib-amd/components/PresenceBadge/index.js +0 -9
  139. package/lib-amd/components/PresenceBadge/index.js.map +0 -1
  140. package/lib-amd/components/PresenceBadge/usePresenceBadge.d.ts +0 -10
  141. package/lib-amd/components/PresenceBadge/usePresenceBadge.js +0 -37
  142. package/lib-amd/components/PresenceBadge/usePresenceBadge.js.map +0 -1
  143. package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.d.ts +0 -5
  144. package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.js +0 -58
  145. package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.js.map +0 -1
  146. package/lib-amd/index.d.ts +0 -5
  147. package/lib-amd/index.js +0 -10
  148. package/lib-amd/index.js.map +0 -1
@@ -1,16 +1,8 @@
1
+ import { __assign } from "tslib";
1
2
  import * as React from 'react';
2
- import { makeMergePropsCompat } from '@fluentui/react-utilities';
3
+ import { resolveShorthand } from '@fluentui/react-utilities';
3
4
  import { useBadge } from '../Badge/index';
4
5
  import { SkypeMinusIcon, SkypeClockIcon, SkypeArrowIcon, SkypeCheckIcon, CancelIcon } from './DefaultPresenceBadgeIcons';
5
- /**
6
- * Consts listing which props are shorthand props.
7
- */
8
-
9
- export var presenceBadgeShorthandPropsCompat = ['icon']; // eslint-disable-next-line deprecation/deprecation
10
-
11
- var mergeProps = /*#__PURE__*/makeMergePropsCompat({
12
- deepMerge: presenceBadgeShorthandPropsCompat
13
- });
14
6
 
15
7
  var iconMap = function (outOfOffice) {
16
8
  return {
@@ -27,19 +19,21 @@ var iconMap = function (outOfOffice) {
27
19
  */
28
20
 
29
21
 
30
- export var usePresenceBadge = function (props, ref, defaultProps) {
31
- var _a;
22
+ export var usePresenceBadge = function (props, ref) {
23
+ var _a, _b, _c;
32
24
 
33
- var state = useBadge(props, ref, mergeProps({
34
- size: 'small',
35
- status: 'available',
36
- outOfOffice: false,
37
- icon: {
38
- as: 'span'
39
- }
40
- }, defaultProps));
25
+ var state = __assign(__assign({}, useBadge(__assign(__assign({
26
+ size: 'small'
27
+ }, props), {
28
+ icon: resolveShorthand(props.icon, {
29
+ required: true
30
+ })
31
+ }), ref)), {
32
+ status: (_a = props.status) !== null && _a !== void 0 ? _a : 'available',
33
+ outOfOffice: (_b = props.outOfOffice) !== null && _b !== void 0 ? _b : false
34
+ });
41
35
 
42
- if (!((_a = state.icon) === null || _a === void 0 ? void 0 : _a.children)) {
36
+ if (!((_c = state.icon) === null || _c === void 0 ? void 0 : _c.children)) {
43
37
  state.icon.children = iconMap(state.outOfOffice)[state.status];
44
38
  }
45
39
 
@@ -1 +1 @@
1
- {"version":3,"sources":["components/PresenceBadge/usePresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,oBAAT,QAAqC,2BAArC;AACA,SAAS,QAAT,QAAyB,gBAAzB;AACA,SACE,cADF,EAEE,cAFF,EAGE,cAHF,EAIE,cAJF,EAKE,UALF,QAMO,6BANP;AAUA;;AAEG;;AACH,OAAO,IAAM,iCA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AAb,CAAJ,EAA2B;AACzB,IAAA,KAAK,CAAC,IAAN,CAAY,QAAZ,GAAuB,OAAO,CAAC,KAAK,CAAC,WAAP,CAAP,CAA2B,KAAK,CAAC,MAAjC,CAAvB;AACD;;AAED,SAAO,KAAP;AACD,CAxBM","sourcesContent":["import * as React from 'react';\nimport { makeMergePropsCompat } from '@fluentui/react-utilities';\nimport { useBadge } from '../Badge/index';\nimport {\n SkypeMinusIcon,\n SkypeClockIcon,\n SkypeArrowIcon,\n SkypeCheckIcon,\n CancelIcon,\n} from './DefaultPresenceBadgeIcons';\nimport type { PresenceBadgeProps, PresenceBadgeState, PresenceBadgeStatus } from './PresenceBadge.types';\nimport type { BadgeProps } from '../Badge/index';\n\n/**\n * Consts listing which props are shorthand props.\n */\nexport const presenceBadgeShorthandPropsCompat: (keyof PresenceBadgeProps)[] = ['icon'];\n\n// eslint-disable-next-line deprecation/deprecation\nconst mergeProps = makeMergePropsCompat<PresenceBadgeState>({ deepMerge: presenceBadgeShorthandPropsCompat });\n\nconst iconMap: (outOfOffice: boolean) => Record<PresenceBadgeStatus, JSX.Element | null> = outOfOffice => ({\n busy: null,\n available: outOfOffice ? <SkypeArrowIcon /> : <SkypeCheckIcon />,\n away: outOfOffice ? <SkypeArrowIcon /> : <SkypeClockIcon />,\n offline: <CancelIcon />,\n outOfOffice: <SkypeArrowIcon />,\n doNotDisturb: <SkypeMinusIcon />,\n});\n\n/**\n * Returns the props and state required to render the component\n */\nexport const usePresenceBadge = (\n props: PresenceBadgeProps,\n ref: React.Ref<HTMLElement>,\n defaultProps?: PresenceBadgeProps,\n): PresenceBadgeState => {\n const state = useBadge(\n props,\n ref,\n mergeProps(\n {\n size: 'small',\n status: 'available',\n outOfOffice: false,\n icon: { as: 'span' },\n },\n defaultProps,\n ) as BadgeProps,\n ) as PresenceBadgeState;\n\n if (!state.icon?.children) {\n state.icon!.children = iconMap(state.outOfOffice)[state.status];\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+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A,EAUR;AACD,IAAA,MAAM,EAAA,CAAA,EAAA,GAAE,KAAK,CAAC,MAAR,MAAc,IAAd,IAAc,EAAA,KAAA,KAAA,CAAd,GAAc,EAAd,GAAkB,WADvB;AAED,IAAA,WAAW,EAAA,CAAA,EAAA,GAAE,KAAK,CAAC,WAAR,MAAmB,IAAnB,IAAmB,EAAA,KAAA,KAAA,CAAnB,GAAmB,EAAnB,GAAuB;AAFjC,GAVQ,CAAX;;AAeA,MAAI,EAAA,CAAA,EAAA,GAAC,KAAK,CAAC,IAAP,MAAW,IAAX,IAAW,EAAA,KAAA,KAAA,CAAX,GAAW,KAAA,CAAX,GAAW,EAAA,CAAE,QAAb,CAAJ,EAA2B;AACzB,IAAA,KAAK,CAAC,IAAN,CAAY,QAAZ,GAAuB,OAAO,CAAC,KAAK,CAAC,WAAP,CAAP,CAA2B,KAAK,CAAC,MAAjC,CAAvB;AACD;;AAED,SAAO,KAAP;AACD,CArBM","sourceRoot":""}
@@ -77,7 +77,7 @@ var useStyles = /*#__PURE__*/__styles({
77
77
 
78
78
  export var usePresenceBadgeStyles = function (state) {
79
79
  var styles = useStyles();
80
- state.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 === 'smallest' || state.size === 'smaller') && styles.thinBorder, state.className);
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 === 'smallest' || state.size === 'smaller') && styles.thinBorder, state.root.className);
81
81
  return useBadgeStyles(state);
82
82
  };
83
83
  //# sourceMappingURL=usePresenceBadgeStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["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,SAAN,GAAkB,YAAY,CAC5B,MAAM,CAAC,IADqB,EAE5B,CAAC,KAAK,CAAC,MAAN,KAAiB,MAAjB,IAA2B,KAAK,CAAC,MAAN,KAAiB,cAA7C,KAAgE,MAAM,CAAC,UAF3C,EAG5B,KAAK,CAAC,MAAN,KAAiB,MAAjB,IAA2B,MAAM,CAAC,UAHN,EAI5B,KAAK,CAAC,MAAN,KAAiB,WAAjB,IAAgC,MAAM,CAAC,eAJX,EAK5B,KAAK,CAAC,MAAN,KAAiB,SAAjB,IAA8B,MAAM,CAAC,aALT,EAM5B,KAAK,CAAC,MAAN,KAAiB,aAAjB,IAAkC,MAAM,CAAC,iBANb,EAO5B,KAAK,CAAC,WAAN,IAAqB,MAAM,CAAC,WAPA,EAQ5B,KAAK,CAAC,WAAN,IAAqB,KAAK,CAAC,MAAN,KAAiB,WAAtC,IAAqD,MAAM,CAAC,oBARhC,EAS5B,KAAK,CAAC,WAAN,KAAsB,KAAK,CAAC,MAAN,KAAiB,MAAjB,IAA2B,KAAK,CAAC,MAAN,KAAiB,cAAlE,KAAqF,MAAM,CAAC,eAThE,EAU5B,KAAK,CAAC,WAAN,IAAqB,KAAK,CAAC,MAAN,KAAiB,MAAtC,IAAgD,MAAM,CAAC,eAV3B,EAW5B,CAAC,KAAK,CAAC,IAAN,KAAe,UAAf,IAA6B,KAAK,CAAC,IAAN,KAAe,SAA7C,KAA2D,MAAM,CAAC,UAXtC,EAY5B,KAAK,CAAC,SAZsB,CAA9B;AAeA,SAAO,cAAc,CAAC,KAAD,CAArB;AACD,CAlBM","sourcesContent":["import { mergeClasses, makeStyles } from '@fluentui/react-make-styles';\nimport { useBadgeStyles } from '../../Badge';\nimport type { PresenceBadgeState } from './PresenceBadge.types';\n\nconst useStyles = makeStyles({\n root: theme => ({\n padding: 0,\n borderWidth: theme.global.strokeWidth.thick,\n }),\n thinBorder: theme => ({\n borderWidth: theme.global.strokeWidth.thin,\n }),\n statusBusy: theme => ({\n backgroundColor: theme.alias.color.red.background3,\n borderColor: theme.alias.color.red.background3,\n }),\n statusAway: theme => ({\n backgroundColor: theme.alias.color.marigold.background3,\n borderColor: theme.alias.color.marigold.background3,\n }),\n statusAvailable: theme => ({\n backgroundColor: theme.alias.color.lightGreen.foreground3,\n borderColor: theme.alias.color.lightGreen.foreground3,\n }),\n statusOffline: theme => ({\n backgroundColor: theme.alias.color.neutral.neutralBackground1,\n color: theme.alias.color.neutral.neutralForeground3,\n borderColor: theme.alias.color.neutral.neutralForeground3,\n }),\n statusOutOfOffice: theme => ({\n backgroundColor: theme.alias.color.neutral.neutralBackground1,\n color: theme.alias.color.berry.foreground3,\n borderColor: theme.alias.color.berry.foreground3,\n }),\n outOfOffice: theme => ({\n backgroundColor: theme.alias.color.neutral.neutralBackground1,\n }),\n outOfOfficeAvailable: theme => ({\n color: theme.alias.color.lightGreen.foreground3,\n }),\n outOfOfficeBusy: theme => ({\n color: theme.alias.color.red.background3,\n }),\n outOfOfficeAway: theme => ({\n color: theme.alias.color.marigold.background3,\n }),\n});\n\n/**\n * Applies style classnames to slots\n */\nexport const usePresenceBadgeStyles = (state: PresenceBadgeState): PresenceBadgeState => {\n const styles = useStyles();\n state.className = mergeClasses(\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.size === 'smallest' || state.size === 'smaller') && styles.thinBorder,\n state.className,\n );\n\n return useBadgeStyles(state) as PresenceBadgeState;\n};\n"],"sourceRoot":"../src/"}
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;AA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K,CAAC,IAAN,KAAe,UAAf,IAA6B,KAAK,CAAC,IAAN,KAAe,SAA7C,KAA2D,MAAM,CAAC,UAXjC,EAYjC,KAAK,CAAC,IAAN,CAAW,SAZsB,CAAnC;AAeA,SAAO,cAAc,CAAC,KAAD,CAArB;AACD,CAlBM","sourceRoot":""}
package/lib/index.js.map CHANGED
@@ -1 +1 @@
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"]}
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 +1 @@
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/"}
1
+ {"version":3,"sources":["../src/Badge.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -1 +1 @@
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/"}
1
+ {"version":3,"sources":["../src/CounterBadge.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iCAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -1 +1 @@
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
+ {"version":3,"sources":["../src/PresenceBadge.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,kCAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -13,6 +13,8 @@ function isConformant(testInfo) {
13
13
  var defaultOptions = {
14
14
  asPropHandlesRef: true,
15
15
  componentPath: module.parent.filename.replace('.test', ''),
16
+ // https://github.com/microsoft/fluentui/issues/19522
17
+ skipAsPropTests: true,
16
18
  extraTests: react_conformance_make_styles_1.default
17
19
  };
18
20
  react_conformance_1.isConformant(defaultOptions, testInfo);
@@ -1 +1 @@
1
- {"version":3,"sources":["common/isConformant.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,+BAAA,gBAAA,OAAA,CAAA,yCAAA,CAAA;;AAGA,SAAgB,YAAhB,CACE,QADF,EAC2F;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D,IAAA,UAAU,EAAE,+BAAA,CAAA;AAH+C,GAA7D;AAMA,EAAA,mBAAA,CAAA,YAAA,CAAiB,cAAjB,EAAiC,QAAjC;AACD;;AAVD,OAAA,CAAA,YAAA,GAAA,YAAA","sourcesContent":["import { isConformant as baseIsConformant } from '@fluentui/react-conformance';\nimport makeStylesTests from '@fluentui/react-conformance-make-styles';\nimport type { IsConformantOptions, TestObject } from '@fluentui/react-conformance';\n\nexport function isConformant<TProps = {}>(\n testInfo: Omit<IsConformantOptions<TProps>, 'componentPath'> & { componentPath?: string },\n) {\n const defaultOptions: Partial<IsConformantOptions<TProps>> = {\n asPropHandlesRef: true,\n componentPath: module!.parent!.filename.replace('.test', ''),\n extraTests: makeStylesTests as TestObject<TProps>,\n };\n\n baseIsConformant(defaultOptions, testInfo);\n}\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../src/common/isConformant.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,+BAAA,gBAAA,OAAA,CAAA,yCAAA,CAAA;;AAGA,SAAgB,YAAhB,CACE,QADF,EAC2F;AAEzF,MAAM,cAAc,GAAyC;AAC3D,IAAA,gBAAgB,EAAE,IADyC;AAE3D,IAAA,aAAa,EAAE,MAAO,CAAC,MAAR,CAAgB,QAAhB,CAAyB,OAAzB,CAAiC,OAAjC,EAA0C,EAA1C,CAF4C;AAG3D;AACA,IAAA,eAAe,EAAE,IAJ0C;AAK3D,IAAA,UAAU,EAAE,+BAAA,CAAA;AAL+C,GAA7D;AAQA,EAAA,mBAAA,CAAA,YAAA,CAAiB,cAAjB,EAAiC,QAAjC;AACD;;AAZD,OAAA,CAAA,YAAA,GAAA,YAAA","sourceRoot":""}
@@ -3,4 +3,4 @@ import type { BadgeProps } from './Badge.types';
3
3
  /**
4
4
  * Define a styled Badge, using the `useBadge` hook.
5
5
  */
6
- export declare const Badge: React.FunctionComponent<BadgeProps & React.RefAttributes<HTMLElement>>;
6
+ export declare const Badge: React.ForwardRefExoticComponent<Pick<BadgeProps, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "as" | "icon" | "shape" | "size" | "appearance" | "iconPosition"> & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["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;AAGA;;AAEG;;;AACU,OAAA,CAAA,KAAA,gBAAgF,KAAK,CAAC,UAAN,CAG3F,UAAC,KAAD,EAAQ,GAAR,EAAW;AACX,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,CAR4F,CAAhF;AAUb,OAAA,CAAA,KAAA,CAAM,WAAN,GAAoB,OAApB","sourcesContent":["import * as React from 'react';\nimport { useBadge } from './useBadge';\nimport { useBadgeStyles } from './useBadgeStyles';\nimport { renderBadge } from './renderBadge';\nimport type { BadgeProps } from './Badge.types';\n\n/**\n * Define a styled Badge, using the `useBadge` hook.\n */\nexport const Badge: React.FunctionComponent<BadgeProps & React.RefAttributes<HTMLElement>> = React.forwardRef<\n HTMLElement,\n BadgeProps\n>((props, ref) => {\n const state = useBadge(props, ref);\n useBadgeStyles(state);\n\n return renderBadge(state);\n});\n\nBadge.displayName = 'Badge';\n"],"sourceRoot":"../src/"}
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;AAGA;;AAEG;;;AACU,OAAA,CAAA,KAAA,gBAAQ,KAAK,CAAC,UAAN,CAA6C,UAAC,KAAD,EAAQ,GAAR,EAAW;AAC3E,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,CALoB,CAAR;AAOb,OAAA,CAAA,KAAA,CAAM,WAAN,GAAoB,OAApB","sourceRoot":""}
@@ -1,47 +1,38 @@
1
- import * as React from 'react';
2
- import type { ComponentPropsCompat, ShorthandPropsCompat, ObjectShorthandPropsCompat } from '@fluentui/react-utilities';
1
+ import type { IntrinsicShorthandProps, ComponentProps, ComponentState } from '@fluentui/react-utilities';
3
2
  export declare type BadgeSize = 'smallest' | 'smaller' | 'small' | 'medium' | 'large' | 'larger' | 'largest';
4
3
  export declare type BadgeAppearance = 'filled' | 'outline' | 'ghost' | 'tint';
5
4
  export declare type BadgeShape = 'rounded' | 'square' | 'circular';
6
5
  export declare type BadgeColors = 'brand' | 'danger' | 'severe' | 'warning' | 'success' | 'important' | 'informative' | 'subtle';
7
- export declare type BadgeProps = ComponentPropsCompat & React.HTMLAttributes<HTMLElement> & {
6
+ export declare type BadgeSlots = {
7
+ root: Omit<IntrinsicShorthandProps<'div'>, 'color'>;
8
+ icon?: IntrinsicShorthandProps<'span'>;
9
+ };
10
+ export declare type BadgeCommons = {
8
11
  /**
9
12
  * A Badge can be sized.
10
- * @defaultvalue medium
13
+ * @default medium
11
14
  */
12
- size?: BadgeSize;
15
+ size: BadgeSize;
13
16
  /**
14
17
  * A Badge can be square, circular or rounded
15
- * @defaultvalue circular
18
+ * @default circular
16
19
  */
17
- shape?: BadgeShape;
20
+ shape: BadgeShape;
18
21
  /**
19
22
  * A Badge can be filled, outline, ghost, inverted
20
- * @defaultvalue filled
23
+ * @default filled
21
24
  */
22
- appearance?: BadgeAppearance;
25
+ appearance: BadgeAppearance;
23
26
  /**
24
27
  * A Badge has a preset of colors
25
- * @defaultvalue filled
26
- */
27
- color?: BadgeColors;
28
- /**
29
- * Icon slot
28
+ * @default brand
30
29
  */
31
- icon?: ShorthandPropsCompat<React.HTMLAttributes<HTMLElement>>;
30
+ color: BadgeColors;
32
31
  /**
33
32
  * Position for Icon to be rendered
34
- * @defaultvalue before
35
- */
36
- iconPosition?: 'before' | 'after';
37
- };
38
- export declare type BadgeState = BadgeProps & {
39
- /**
40
- * Ref to the root slot
41
- */
42
- ref: React.RefObject<HTMLElement>;
43
- /**
44
- * Icon slot when processed by internal state
33
+ * @default before
45
34
  */
46
- icon?: ObjectShorthandPropsCompat<React.HTMLAttributes<HTMLSpanElement>>;
35
+ iconPosition: 'before' | 'after';
47
36
  };
37
+ export declare type BadgeProps = ComponentProps<Partial<BadgeSlots>> & Partial<BadgeCommons>;
38
+ export declare type BadgeState = ComponentState<BadgeSlots> & BadgeCommons;
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["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","sourcesContent":["export * from './Badge';\nexport * from './Badge.types';\nexport * from './renderBadge';\nexport * from './useBadge';\nexport * from './useBadgeStyles';\n"],"sourceRoot":"../src/"}
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":""}
@@ -11,14 +11,12 @@ var React = /*#__PURE__*/require("react");
11
11
 
12
12
  var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
13
13
 
14
- var useBadge_1 = /*#__PURE__*/require("./useBadge");
15
-
16
14
  var renderBadge = function (state) {
17
- var _a = react_utilities_1.getSlotsCompat(state, useBadge_1.badgeShorthandPropsCompat),
15
+ var _a = react_utilities_1.getSlots(state, ['icon', 'root']),
18
16
  slots = _a.slots,
19
17
  slotProps = _a.slotProps;
20
18
 
21
- return React.createElement(slots.root, tslib_1.__assign({}, slotProps.root), state.iconPosition === 'before' && React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon)), state.children, state.iconPosition === 'after' && React.createElement(slots.icon, tslib_1.__assign({}, slotProps.icon)));
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)));
22
20
  };
23
21
 
24
22
  exports.renderBadge = renderBadge;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Badge/renderBadge.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,UAAA,gBAAA,OAAA,CAAA,YAAA,CAAA;;AAGO,IAAM,WAAW,GAAG,UAAC,KAAD,EAAkB;AACrC,MAAA,EAAA,GAAuB,iBAAA,CAAA,cAAA,CAAe,KAAf,EAAsB,UAAA,CAAA,yBAAtB,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,QAFT,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","sourcesContent":["import * as React from 'react';\nimport { getSlotsCompat } from '@fluentui/react-utilities';\nimport { badgeShorthandPropsCompat } from './useBadge';\nimport type { BadgeState } from './Badge.types';\n\nexport const renderBadge = (state: BadgeState) => {\n const { slots, slotProps } = getSlotsCompat(state, badgeShorthandPropsCompat);\n\n return (\n <slots.root {...slotProps.root}>\n {state.iconPosition === 'before' && <slots.icon {...slotProps.icon} />}\n {state.children}\n {state.iconPosition === 'after' && <slots.icon {...slotProps.icon} />}\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
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,10 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { BadgeProps, BadgeState } from './Badge.types';
3
- /**
4
- * Consts listing which props are shorthand props.
5
- */
6
- export declare const badgeShorthandPropsCompat: readonly ["icon"];
7
3
  /**
8
4
  * Returns the props and state required to render the component
9
5
  */
10
- export declare const useBadge: (props: BadgeProps, ref: React.Ref<HTMLElement>, defaultProps?: BadgeProps | undefined) => BadgeState;
6
+ export declare const useBadge: (props: BadgeProps, ref: React.Ref<HTMLElement>) => BadgeState;
@@ -3,32 +3,43 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useBadge = exports.badgeShorthandPropsCompat = void 0;
6
+ exports.useBadge = void 0;
7
7
 
8
- var React = /*#__PURE__*/require("react");
8
+ var tslib_1 = /*#__PURE__*/require("tslib");
9
9
 
10
10
  var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
11
- /**
12
- * Consts listing which props are shorthand props.
13
- */
14
-
15
-
16
- exports.badgeShorthandPropsCompat = ['icon'];
17
- var mergeProps = /*#__PURE__*/react_utilities_1.makeMergeProps({
18
- deepMerge: exports.badgeShorthandPropsCompat
19
- });
20
11
  /**
21
12
  * Returns the props and state required to render the component
22
13
  */
23
14
 
24
- var useBadge = function (props, ref, defaultProps) {
25
- var state = mergeProps({
26
- ref: react_utilities_1.useMergedRefs(ref, React.useRef(null)),
27
- shape: 'circular',
28
- size: 'medium',
29
- iconPosition: 'before',
30
- 'aria-hidden': true
31
- }, defaultProps && react_utilities_1.resolveShorthandProps(defaultProps, exports.badgeShorthandPropsCompat), react_utilities_1.resolveShorthandProps(props, exports.badgeShorthandPropsCompat));
15
+
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,
33
+ components: {
34
+ root: 'div',
35
+ icon: 'span'
36
+ },
37
+ root: react_utilities_1.getNativeElementProps('div', tslib_1.__assign({
38
+ ref: ref,
39
+ 'aria-hidden': true
40
+ }, props)),
41
+ icon: react_utilities_1.resolveShorthand(props.icon)
42
+ };
32
43
  return state;
33
44
  };
34
45
 
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Badge/useBadge.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,yBAAA,GAA4B,CAAC,MAAD,CAA5B;AAEb,IAAM,UAAU,gBAAG,iBAAA,CAAA,cAAA,CAA2B;AAAE,EAAA,SAAS,EAAE,OAAA,CAAA;AAAb,CAA3B,CAAnB;AAEA;;AAEG;;AACI,IAAM,QAAQ,GAAG,UAAC,KAAD,EAAoB,GAApB,EAAiD,YAAjD,EAA0E;AAChG,MAAM,KAAK,GAAG,UAAU,CACtB;AACE,IAAA,GAAG,EAAE,iBAAA,CAAA,aAAA,CAAc,GAAd,EAAmB,KAAK,CAAC,MAAN,CAAa,IAAb,CAAnB,CADP;AAEE,IAAA,KAAK,EAAE,UAFT;AAGE,IAAA,IAAI,EAAE,QAHR;AAIE,IAAA,YAAY,EAAE,QAJhB;AAKE,mBAAe;AALjB,GADsB,EAQtB,YAAY,IAAI,iBAAA,CAAA,qBAAA,CAAsB,YAAtB,EAAoC,OAAA,CAAA,yBAApC,CARM,EAStB,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA6B,OAAA,CAAA,yBAA7B,CATsB,CAAxB;AAYA,SAAO,KAAP;AACD,CAdM;;AAAM,OAAA,CAAA,QAAA,GAAQ,QAAR","sourcesContent":["import * as React from 'react';\nimport { makeMergeProps, resolveShorthandProps, useMergedRefs } from '@fluentui/react-utilities';\nimport type { BadgeProps, BadgeState } from './Badge.types';\n\n/**\n * Consts listing which props are shorthand props.\n */\nexport const badgeShorthandPropsCompat = ['icon'] as const;\n\nconst mergeProps = makeMergeProps<BadgeState>({ deepMerge: badgeShorthandPropsCompat });\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useBadge = (props: BadgeProps, ref: React.Ref<HTMLElement>, defaultProps?: BadgeProps): BadgeState => {\n const state = mergeProps(\n {\n ref: useMergedRefs(ref, React.useRef(null)),\n shape: 'circular',\n size: 'medium',\n iconPosition: 'before',\n 'aria-hidden': true,\n },\n defaultProps && resolveShorthandProps(defaultProps, badgeShorthandPropsCompat),\n resolveShorthandProps(props, badgeShorthandPropsCompat),\n );\n\n return state;\n};\n"],"sourceRoot":"../src/"}
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;AAAA,MAEA,YAAY,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,QAAH,GAAW,EAFvB;AAAA,MAGA,EAAA,GAEE,KAAK,CAFc,UAHrB;AAAA,MAGA,UAAU,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,QAAH,GAAW,EAHrB;AAAA,MAIA,EAAA,GACE,KAAK,CADQ,KAJf;AAAA,MAIA,KAAK,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,OAAH,GAAU,EAJf;AAOF,MAAM,KAAK,GAAe;AACxB,IAAA,KAAK,EAAA,KADmB;AAExB,IAAA,IAAI,EAAA,IAFoB;AAGxB,IAAA,YAAY,EAAA,YAHY;AAIxB,IAAA,UAAU,EAAA,UAJc;AAKxB,IAAA,KAAK,EAAA,KALmB;AAMxB,IAAA,UAAU,EAAE;AACV,MAAA,IAAI,EAAE,KADI;AAEV,MAAA,IAAI,EAAE;AAFI,KANY;AAUxB,IAAA,IAAI,EAAE,iBAAA,CAAA,qBAAA,CAAsB,KAAtB,EAA2B,OAAA,CAAA,QAAA,CAAA;AAC/B,MAAA,GAAG,EAAA,GAD4B;AAE/B,qBAAe;AAFgB,KAAA,EAG5B,KAH4B,CAA3B,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":""}
@@ -320,7 +320,7 @@ var useBadgeStyles = function (state) {
320
320
  var isImportant = state.color === 'important';
321
321
  var isInformative = state.color === 'informative';
322
322
  var isSubtle = state.color === 'subtle';
323
- state.className = react_make_styles_1.mergeClasses(styles.root, state.size === 'smallest' && styles.rootSmallest, state.size === 'smaller' && styles.rootSmaller, state.size === 'small' && styles.rootSmall, state.size === 'medium' && styles.rootMedium, state.size === 'large' && styles.rootLarge, (state.size === 'larger' || state.size === 'largest') && styles.rootLargerLargest, state.shape === 'circular' && styles.rootCircular, state.shape === 'rounded' && styles.rootRounded, state.shape === 'rounded' && (state.size === 'small' || state.size === 'smaller' || state.size === 'smallest') && styles.rootRoundedSmallSmallerSmallest, isGhost && styles.rootGhost, isOutline && styles.rootOutline, isTint && styles.rootTint, isFilled && isDanger && styles.rootFilledDanger, isOutline && isDanger && styles.rootOutlineDanger, isTint && isDanger && styles.rootTintDanger, isGhost && isDanger && styles.rootGhostDanger, isFilled && isSevere && styles.rootFilledSevere, isOutline && isSevere && styles.rootOutlineSevere, isTint && isSevere && styles.rootTintSevere, isGhost && isSevere && styles.rootGhostSevere, isFilled && isWarning && styles.rootFilledWarning, isOutline && isWarning && styles.rootOutlineWarning, isTint && isWarning && styles.rootTintWarning, isGhost && isWarning && styles.rootGhostWarning, isFilled && isSuccess && styles.rootFilledSuccess, isOutline && isSuccess && styles.rootOutlineSuccess, isTint && isSuccess && styles.rootTintSuccess, isGhost && isSuccess && styles.rootGhostSuccess, isFilled && isImportant && styles.rootFilledImportant, isOutline && isImportant && styles.rootOutlineImportant, isTint && isImportant && styles.rootTintImportant, isGhost && isImportant && styles.rootGhostImportant, isFilled && isInformative && styles.rootFilledInformative, isOutline && isInformative && styles.rootOutlineInformative, isTint && isInformative && styles.rootTintInformative, isGhost && isInformative && styles.rootGhostInformative, isFilled && isSubtle && styles.rootFilledSubtle, isOutline && isSubtle && styles.rootOutlineSubtle, isTint && isSubtle && styles.rootTintSubtle, isGhost && isSubtle && styles.rootGhostSubtle, state.className);
323
+ state.root.className = react_make_styles_1.mergeClasses(styles.root, state.size === 'smallest' && styles.rootSmallest, state.size === 'smaller' && styles.rootSmaller, state.size === 'small' && styles.rootSmall, state.size === 'medium' && styles.rootMedium, state.size === 'large' && styles.rootLarge, (state.size === 'larger' || state.size === 'largest') && styles.rootLargerLargest, state.shape === 'circular' && styles.rootCircular, state.shape === 'rounded' && styles.rootRounded, state.shape === 'rounded' && (state.size === 'small' || state.size === 'smaller' || state.size === 'smallest') && styles.rootRoundedSmallSmallerSmallest, isGhost && styles.rootGhost, isOutline && styles.rootOutline, isTint && styles.rootTint, isFilled && isDanger && styles.rootFilledDanger, isOutline && isDanger && styles.rootOutlineDanger, isTint && isDanger && styles.rootTintDanger, isGhost && isDanger && styles.rootGhostDanger, isFilled && isSevere && styles.rootFilledSevere, isOutline && isSevere && styles.rootOutlineSevere, isTint && isSevere && styles.rootTintSevere, isGhost && isSevere && styles.rootGhostSevere, isFilled && isWarning && styles.rootFilledWarning, isOutline && isWarning && styles.rootOutlineWarning, isTint && isWarning && styles.rootTintWarning, isGhost && isWarning && styles.rootGhostWarning, isFilled && isSuccess && styles.rootFilledSuccess, isOutline && isSuccess && styles.rootOutlineSuccess, isTint && isSuccess && styles.rootTintSuccess, isGhost && isSuccess && styles.rootGhostSuccess, isFilled && isImportant && styles.rootFilledImportant, isOutline && isImportant && styles.rootOutlineImportant, isTint && isImportant && styles.rootTintImportant, isGhost && isImportant && styles.rootGhostImportant, isFilled && isInformative && styles.rootFilledInformative, isOutline && isInformative && styles.rootOutlineInformative, isTint && isInformative && styles.rootTintInformative, isGhost && isInformative && styles.rootGhostInformative, isFilled && isSubtle && styles.rootFilledSubtle, isOutline && isSubtle && styles.rootOutlineSubtle, isTint && isSubtle && styles.rootTintSubtle, isGhost && isSubtle && styles.rootGhostSubtle, state.root.className);
324
324
 
325
325
  if (state.icon) {
326
326
  state.icon.className = react_make_styles_1.mergeClasses(styles.icon, state.icon.className);
@@ -1 +1 @@
1
- {"version":3,"sources":["components/Badge/useBadgeStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAGA,IAAM,SAAS,gBAAG,mBAAA,SAAA;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;A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AZ,IAAyB,MAAM,CAAC,iBA5BhB,EA6BhB,SAAS,IAAI,SAAb,IAA0B,MAAM,CAAC,kBA7BjB,EA8BhB,MAAM,IAAI,SAAV,IAAuB,MAAM,CAAC,eA9Bd,EA+BhB,OAAO,IAAI,SAAX,IAAwB,MAAM,CAAC,gBA/Bf,EAgChB,QAAQ,IAAI,WAAZ,IAA2B,MAAM,CAAC,mBAhClB,EAiChB,SAAS,IAAI,WAAb,IAA4B,MAAM,CAAC,oBAjCnB,EAkChB,MAAM,IAAI,WAAV,IAAyB,MAAM,CAAC,iBAlChB,EAmChB,OAAO,IAAI,WAAX,IAA0B,MAAM,CAAC,kBAnCjB,EAoChB,QAAQ,IAAI,aAAZ,IAA6B,MAAM,CAAC,qBApCpB,EAqChB,SAAS,IAAI,aAAb,IAA8B,MAAM,CAAC,sBArCrB,EAsChB,MAAM,IAAI,aAAV,IAA2B,MAAM,CAAC,mBAtClB,EAuChB,OAAO,IAAI,aAAX,IAA4B,MAAM,CAAC,oBAvCnB,EAwChB,QAAQ,IAAI,QAAZ,IAAwB,MAAM,CAAC,gBAxCf,EAyChB,SAAS,IAAI,QAAb,IAAyB,MAAM,CAAC,iBAzChB,EA0ChB,MAAM,IAAI,QAAV,IAAsB,MAAM,CAAC,cA1Cb,EA2ChB,OAAO,IAAI,QAAX,IAAuB,MAAM,CAAC,eA3Cd,EA4ChB,KAAK,CAAC,SA5CU,CAAlB;;AA+CA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,CAAa,MAAM,CAAC,IAApB,EAA0B,KAAK,CAAC,IAAN,CAAW,SAArC,CAAvB;AACD;;AAED,SAAO,KAAP;AACD,CAlEM;;AAAM,OAAA,CAAA,cAAA,GAAc,cAAd","sourcesContent":["import { mergeClasses, makeStyles } from '@fluentui/react-make-styles';\nimport type { BadgeState } from './Badge.types';\n\nconst useStyles = makeStyles({\n root: theme => ({\n display: 'inline-flex',\n boxSizing: 'border-box',\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: theme.alias.color.neutral.brandBackground,\n borderColor: theme.alias.color.neutral.brandBackground,\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n fontWeight: theme.global.type.fontWeights.semibold,\n borderWidth: theme.global.strokeWidth.thin,\n borderStyle: 'solid',\n fontFamily: theme.global.type.fontFamilies.base,\n position: 'relative',\n }),\n rootSmallest: {\n width: '6px',\n height: '6px',\n fontSize: '4px',\n },\n rootSmaller: {\n width: '10px',\n height: '10px',\n fontSize: '6px',\n },\n rootSmall: {\n minWidth: '16px',\n height: '16px',\n paddingRight: '6px',\n paddingLeft: '6px',\n gap: '4px',\n fontSize: '8px',\n },\n rootMedium: {\n height: '20px',\n minWidth: '20px',\n gap: '4px',\n paddingRight: '8px',\n paddingLeft: '8px',\n fontSize: '10px',\n },\n rootLarge: {\n minWidth: '24px',\n height: '24px',\n paddingRight: '8px',\n paddingLeft: '8px',\n fontSize: '12px',\n gap: '6px',\n },\n rootLargerLargest: theme => ({\n minWidth: '32px',\n height: '32px',\n paddingRight: '12px',\n paddingLeft: '12px',\n gap: '6px',\n fontSize: '12px',\n borderWidth: theme.global.strokeWidth.thick,\n }),\n rootRounded: theme => ({ borderRadius: theme.global.borderRadius.medium }),\n rootRoundedSmallSmallerSmallest: theme => ({ borderRadius: theme.global.borderRadius.small }),\n rootCircular: { borderRadius: '99px' },\n rootGhost: theme => ({\n background: 'transparent',\n border: 'none',\n color: theme.alias.color.neutral.brandBackground,\n }),\n rootOutline: theme => ({\n background: 'transparent',\n borderColor: theme.alias.color.neutral.brandBackground,\n color: theme.alias.color.neutral.brandBackground,\n }),\n rootTint: theme => ({\n backgroundColor: theme.global.palette.brand.tint60,\n color: theme.global.palette.brand.shade40,\n borderColor: 'none',\n }),\n rootFilledDanger: theme => ({\n backgroundColor: theme.alias.color.red.background3,\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n borderColor: theme.alias.color.red.background3,\n }),\n rootOutlineDanger: theme => ({\n color: theme.alias.color.red.foreground3,\n borderColor: theme.alias.color.red.foreground3,\n }),\n rootTintDanger: theme => ({\n backgroundColor: theme.alias.color.red.background1,\n color: theme.alias.color.red.foreground1,\n borderColor: theme.alias.color.red.foreground2,\n }),\n rootGhostDanger: theme => ({\n color: theme.alias.color.red.foreground3,\n }),\n rootFilledSevere: theme => ({\n backgroundColor: theme.alias.color.darkOrange.background3,\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n borderColor: 'none',\n }),\n rootOutlineSevere: theme => ({\n color: theme.alias.color.darkOrange.foreground3,\n borderColor: theme.alias.color.darkOrange.foreground3,\n }),\n rootTintSevere: theme => ({\n backgroundColor: theme.alias.color.darkOrange.background1,\n color: theme.alias.color.darkOrange.foreground1,\n borderColor: theme.alias.color.darkOrange.foreground2,\n }),\n rootGhostSevere: theme => ({\n color: theme.alias.color.darkOrange.foreground3,\n }),\n rootFilledWarning: theme => ({\n backgroundColor: theme.alias.color.yellow.background3,\n color: theme.alias.color.neutral.neutralForeground1,\n borderColor: theme.alias.color.yellow.background3,\n }),\n rootOutlineWarning: theme => ({\n color: theme.alias.color.yellow.foreground2,\n borderColor: theme.alias.color.yellow.foreground2,\n }),\n rootTintWarning: theme => ({\n backgroundColor: theme.alias.color.yellow.background1,\n color: theme.alias.color.yellow.foreground2,\n borderColor: theme.alias.color.yellow.background2,\n }),\n rootGhostWarning: theme => ({\n color: theme.alias.color.yellow.foreground2,\n }),\n rootFilledSuccess: theme => ({\n backgroundColor: theme.alias.color.green.background3,\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n borderColor: 'none',\n }),\n rootOutlineSuccess: theme => ({\n color: theme.alias.color.green.foreground2,\n borderColor: theme.alias.color.green.foreground2,\n }),\n rootTintSuccess: theme => ({\n backgroundColor: theme.alias.color.green.background1,\n color: theme.alias.color.green.foreground1,\n borderColor: theme.alias.color.green.background2,\n }),\n rootGhostSuccess: theme => ({\n color: theme.alias.color.green.foreground3,\n }),\n rootFilledImportant: theme => ({\n backgroundColor: theme.alias.color.neutral.neutralForeground1,\n color: theme.alias.color.neutral.neutralBackground1,\n borderColor: theme.alias.color.neutral.transparentStroke,\n }),\n rootOutlineImportant: theme => ({\n color: theme.alias.color.neutral.neutralForeground1,\n borderColor: theme.alias.color.neutral.neutralForeground1,\n }),\n rootTintImportant: theme => ({\n backgroundColor: theme.alias.color.neutral.neutralForeground3,\n color: theme.alias.color.neutral.neutralBackground1,\n borderColor: theme.alias.color.neutral.transparentStroke,\n }),\n rootGhostImportant: theme => ({\n color: theme.alias.color.neutral.neutralForeground1,\n }),\n rootFilledInformative: theme => ({\n backgroundColor: theme.alias.color.neutral.neutralBackground5,\n color: theme.alias.color.neutral.neutralForeground3,\n borderColor: theme.alias.color.neutral.transparentStroke,\n }),\n rootOutlineInformative: theme => ({\n backgroundColor: theme.alias.color.darkOrange.background3,\n color: theme.alias.color.neutral.neutralBackground5,\n borderColor: theme.alias.color.neutral.neutralBackground5,\n }),\n rootTintInformative: theme => ({\n backgroundColor: theme.alias.color.neutral.neutralBackground4,\n color: theme.alias.color.neutral.neutralForeground3,\n borderColor: theme.alias.color.neutral.neutralStroke2,\n }),\n rootGhostInformative: theme => ({\n color: theme.alias.color.neutral.neutralBackground5,\n }),\n rootFilledSubtle: theme => ({\n backgroundColor: theme.alias.color.neutral.neutralBackground1,\n color: theme.alias.color.neutral.neutralForeground1,\n borderColor: theme.alias.color.neutral.transparentStroke,\n }),\n rootOutlineSubtle: theme => ({\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n borderColor: theme.alias.color.neutral.neutralForegroundOnBrand,\n }),\n rootTintSubtle: theme => ({\n backgroundColor: theme.alias.color.neutral.neutralBackground1,\n color: theme.alias.color.neutral.neutralForeground3,\n borderColor: theme.alias.color.neutral.neutralStroke2,\n }),\n rootGhostSubtle: theme => ({\n color: theme.alias.color.neutral.neutralForegroundOnBrand,\n }),\n icon: {\n display: 'flex',\n alignContent: 'center',\n alignItems: 'center',\n height: '100%',\n },\n});\n\n/**\n * Applies style classnames to slots\n */\nexport const useBadgeStyles = (state: BadgeState): BadgeState => {\n const styles = useStyles();\n const isGhost = state.appearance === 'ghost';\n const isOutline = state.appearance === 'outline';\n const isTint = state.appearance === 'tint';\n const isFilled = state.appearance === 'filled';\n const isDanger = state.color === 'danger';\n const isSevere = state.color === 'severe';\n const isWarning = state.color === 'warning';\n const isSuccess = state.color === 'success';\n const isImportant = state.color === 'important';\n const isInformative = state.color === 'informative';\n const isSubtle = state.color === 'subtle';\n\n state.className = mergeClasses(\n styles.root,\n state.size === 'smallest' && styles.rootSmallest,\n state.size === 'smaller' && styles.rootSmaller,\n state.size === 'small' && styles.rootSmall,\n state.size === 'medium' && styles.rootMedium,\n state.size === 'large' && styles.rootLarge,\n (state.size === 'larger' || state.size === 'largest') && styles.rootLargerLargest,\n state.shape === 'circular' && styles.rootCircular,\n state.shape === 'rounded' && styles.rootRounded,\n state.shape === 'rounded' &&\n (state.size === 'small' || state.size === 'smaller' || state.size === 'smallest') &&\n styles.rootRoundedSmallSmallerSmallest,\n isGhost && styles.rootGhost,\n isOutline && styles.rootOutline,\n isTint && styles.rootTint,\n isFilled && isDanger && styles.rootFilledDanger,\n isOutline && isDanger && styles.rootOutlineDanger,\n isTint && isDanger && styles.rootTintDanger,\n isGhost && isDanger && styles.rootGhostDanger,\n isFilled && isSevere && styles.rootFilledSevere,\n isOutline && isSevere && styles.rootOutlineSevere,\n isTint && isSevere && styles.rootTintSevere,\n isGhost && isSevere && styles.rootGhostSevere,\n isFilled && isWarning && styles.rootFilledWarning,\n isOutline && isWarning && styles.rootOutlineWarning,\n isTint && isWarning && styles.rootTintWarning,\n isGhost && isWarning && styles.rootGhostWarning,\n isFilled && isSuccess && styles.rootFilledSuccess,\n isOutline && isSuccess && styles.rootOutlineSuccess,\n isTint && isSuccess && styles.rootTintSuccess,\n isGhost && isSuccess && styles.rootGhostSuccess,\n isFilled && isImportant && styles.rootFilledImportant,\n isOutline && isImportant && styles.rootOutlineImportant,\n isTint && isImportant && styles.rootTintImportant,\n isGhost && isImportant && styles.rootGhostImportant,\n isFilled && isInformative && styles.rootFilledInformative,\n isOutline && isInformative && styles.rootOutlineInformative,\n isTint && isInformative && styles.rootTintInformative,\n isGhost && isInformative && styles.rootGhostInformative,\n isFilled && isSubtle && styles.rootFilledSubtle,\n isOutline && isSubtle && styles.rootOutlineSubtle,\n isTint && isSubtle && styles.rootTintSubtle,\n isGhost && isSubtle && styles.rootGhostSubtle,\n state.className,\n );\n\n if (state.icon) {\n state.icon.className = mergeClasses(styles.icon, state.icon.className);\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/Badge/useBadgeStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AAGA,IAAM,SAAS,gBAAG,mBAAA,SAAA;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;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;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S,IAAI,WAAb,IAA4B,MAAM,CAAC,oBAjCd,EAkCrB,MAAM,IAAI,WAAV,IAAyB,MAAM,CAAC,iBAlCX,EAmCrB,OAAO,IAAI,WAAX,IAA0B,MAAM,CAAC,kBAnCZ,EAoCrB,QAAQ,IAAI,aAAZ,IAA6B,MAAM,CAAC,qBApCf,EAqCrB,SAAS,IAAI,aAAb,IAA8B,MAAM,CAAC,sBArChB,EAsCrB,MAAM,IAAI,aAAV,IAA2B,MAAM,CAAC,mBAtCb,EAuCrB,OAAO,IAAI,aAAX,IAA4B,MAAM,CAAC,oBAvCd,EAwCrB,QAAQ,IAAI,QAAZ,IAAwB,MAAM,CAAC,gBAxCV,EAyCrB,SAAS,IAAI,QAAb,IAAyB,MAAM,CAAC,iBAzCX,EA0CrB,MAAM,IAAI,QAAV,IAAsB,MAAM,CAAC,cA1CR,EA2CrB,OAAO,IAAI,QAAX,IAAuB,MAAM,CAAC,eA3CT,EA4CrB,KAAK,CAAC,IAAN,CAAW,SA5CU,CAAvB;;AA+CA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,CAAa,MAAM,CAAC,IAApB,EAA0B,KAAK,CAAC,IAAN,CAAW,SAArC,CAAvB;AACD;;AAED,SAAO,KAAP;AACD,CAlEM;;AAAM,OAAA,CAAA,cAAA,GAAc,cAAd","sourceRoot":""}
@@ -1,12 +1,6 @@
1
1
  import * as React from 'react';
2
+ import type { CounterBadgeProps } from './CounterBadge.types';
2
3
  /**
3
4
  * Define a styled CounterBadge, using the `useCounterBadge` hook.
4
5
  */
5
- export declare const CounterBadge: React.ForwardRefExoticComponent<Pick<import("../Badge").BadgeProps, "children" | "as" | "className" | "icon" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "size" | "iconPosition"> & {
6
- shape?: "rounded" | "circular" | undefined;
7
- appearance?: "filled" | "ghost" | undefined;
8
- overflowCount?: number | undefined;
9
- count?: number | undefined;
10
- showZero?: boolean | undefined;
11
- dot?: boolean | undefined;
12
- } & React.RefAttributes<HTMLElement>>;
6
+ export declare const CounterBadge: React.ForwardRefExoticComponent<Pick<CounterBadgeProps, "slot" | "style" | "title" | "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "css" | "as" | "icon" | "shape" | "size" | "appearance" | "iconPosition" | "overflowCount" | "count" | "showZero" | "dot"> & React.RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/CounterBadge/CounterBadge.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AACA,IAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,YAAA,gBAAe,KAAK,CAAC,UAAN,CAAiD,UAAC,KAAD,EAAQ,GAAR,EAAW;AACtF,MAAM,KAAK,GAAG,iBAAA,CAAA,eAAA,CAAgB,KAAhB,EAAuB,GAAvB,CAAd;AACA,EAAA,uBAAA,CAAA,qBAAA,CAAsB,KAAtB;AAEA,SAAO,OAAA,CAAA,WAAA,CAAY,KAAZ,CAAP;AACD,CAL2B,CAAf;AAOb,OAAA,CAAA,YAAA,CAAa,WAAb,GAA2B,cAA3B","sourcesContent":["import * as React from 'react';\nimport { useCounterBadge } from './useCounterBadge';\nimport { useCounterBadgeStyles } from './useCounterBadgeStyles';\nimport { renderBadge } from '../Badge/index';\nimport type { CounterBadgeProps } from './CounterBadge.types';\n\n/**\n * Define a styled CounterBadge, using the `useCounterBadge` hook.\n */\nexport const CounterBadge = React.forwardRef<HTMLElement, CounterBadgeProps>((props, ref) => {\n const state = useCounterBadge(props, ref);\n useCounterBadgeStyles(state);\n\n return renderBadge(state);\n});\n\nCounterBadge.displayName = 'CounterBadge';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/CounterBadge/CounterBadge.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,mBAAA,CAAA;;AACA,IAAA,uBAAA,gBAAA,OAAA,CAAA,yBAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,YAAA,gBAAe,KAAK,CAAC,UAAN,CAAiD,UAAC,KAAD,EAAQ,GAAR,EAAW;AACtF,MAAM,KAAK,GAAG,iBAAA,CAAA,eAAA,CAAgB,KAAhB,EAAuB,GAAvB,CAAd;AACA,EAAA,uBAAA,CAAA,qBAAA,CAAsB,KAAtB;AAEA,SAAO,OAAA,CAAA,WAAA,CAAY,KAAZ,CAAP;AACD,CAL2B,CAAf;AAOb,OAAA,CAAA,YAAA,CAAa,WAAb,GAA2B,cAA3B","sourceRoot":""}
@@ -1,55 +1,41 @@
1
1
  import type { BadgeProps, BadgeState } from '../Badge/index';
2
- export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape'> & {
3
- /**
4
- * A Badge can be circular or rounded
5
- * @defaultvalue circular
6
- */
7
- shape?: Extract<BadgeProps['shape'], 'rounded' | 'circular'>;
8
- /**
9
- * A Badge can be filled, ghost
10
- * @defaultvalue filled
11
- */
12
- appearance?: Extract<BadgeProps['appearance'], 'filled' | 'ghost'>;
2
+ export declare type CounterBadgeCommons = {
13
3
  /**
14
4
  * Max number to be displayed
15
- * @defaultvalue 99
16
- */
17
- overflowCount?: number;
18
- /**
19
- * Value displayed by the Badge
20
- * @defaultvalue 0
21
- */
22
- count?: number;
23
- /**
24
- * If the badge should be shown when count is 0
25
- * @defaultvalue false
26
- */
27
- showZero?: boolean;
28
- /**
29
- * If a dot badge should be displayed
30
- * @defaultvalue false
31
- */
32
- dot?: boolean;
33
- };
34
- export declare type CounterBadgeState = BadgeState & {
35
- /**
36
- * Max number to be displayed
37
- * @defaultvalue 99
5
+ * @default 99
38
6
  */
39
7
  overflowCount: number;
40
8
  /**
41
9
  * Value displayed by the Badge
42
- * @defaultvalue 0
10
+ * @default 0
43
11
  */
44
12
  count: number;
45
13
  /**
46
14
  * If the badge should be shown when count is 0
47
- * @defaultvalue false
15
+ * @default false
48
16
  */
49
17
  showZero: boolean;
50
18
  /**
51
19
  * If a dot badge should be displayed
52
- * @defaultvalue false
20
+ * @default false
53
21
  */
54
22
  dot: boolean;
23
+ /**
24
+ * A Badge can be circular or rounded
25
+ * @default circular
26
+ */
27
+ shape: 'rounded' | 'circular';
28
+ /**
29
+ * A Badge can be filled, ghost
30
+ * @default filled
31
+ */
32
+ appearance: 'filled' | 'ghost';
55
33
  };
34
+ /**
35
+ * {@docCategory CounterBadge}
36
+ */
37
+ export declare type CounterBadgeProps = Omit<BadgeProps, 'appearance' | 'shape'> & Partial<CounterBadgeCommons>;
38
+ /**
39
+ * {@docCategory CounterBadge}
40
+ */
41
+ export declare type CounterBadgeState = Omit<BadgeState, 'appearance' | 'shape'> & CounterBadgeCommons;
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/CounterBadge/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './CounterBadge';\nexport * from './CounterBadge.types';\nexport * from './useCounterBadge';\nexport * from './useCounterBadgeStyles';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/CounterBadge/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,sBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,mBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,yBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -1,10 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { CounterBadgeProps, CounterBadgeState } from './CounterBadge.types';
3
- /**
4
- * Consts listing which props are shorthand props.
5
- */
6
- export declare const counterBadgeShorthandPropsCompat: readonly ["icon"];
7
3
  /**
8
4
  * Returns the props and state required to render the component
9
5
  */
10
- export declare const useCounterBadge: (props: CounterBadgeProps, ref: React.Ref<HTMLElement>, defaultProps?: CounterBadgeProps | undefined) => CounterBadgeState;
6
+ export declare const useCounterBadge: (props: CounterBadgeProps, ref: React.Ref<HTMLElement>) => CounterBadgeState;