@fluentui/react-badge 9.0.0-alpha.81 → 9.0.0-alpha.85

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. package/CHANGELOG.json +161 -1
  2. package/CHANGELOG.md +52 -2
  3. package/Spec.md +7 -22
  4. package/dist/react-badge.d.ts +57 -137
  5. package/lib/Badge.js.map +1 -1
  6. package/lib/CounterBadge.js.map +1 -1
  7. package/lib/PresenceBadge.js.map +1 -1
  8. package/lib/common/isConformant.js +2 -0
  9. package/lib/common/isConformant.js.map +1 -1
  10. package/lib/components/Badge/Badge.d.ts +1 -2
  11. package/lib/components/Badge/Badge.js +0 -1
  12. package/lib/components/Badge/Badge.js.map +1 -1
  13. package/lib/components/Badge/Badge.types.d.ts +19 -46
  14. package/lib/components/Badge/Badge.types.js.map +1 -1
  15. package/lib/components/Badge/index.js.map +1 -1
  16. package/lib/components/Badge/renderBadge.js +3 -4
  17. package/lib/components/Badge/renderBadge.js.map +1 -1
  18. package/lib/components/Badge/useBadge.d.ts +1 -5
  19. package/lib/components/Badge/useBadge.js +29 -18
  20. package/lib/components/Badge/useBadge.js.map +1 -1
  21. package/lib/components/Badge/useBadgeStyles.js +1 -1
  22. package/lib/components/Badge/useBadgeStyles.js.map +1 -1
  23. package/lib/components/CounterBadge/CounterBadge.d.ts +1 -2
  24. package/lib/components/CounterBadge/CounterBadge.js +0 -1
  25. package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
  26. package/lib/components/CounterBadge/CounterBadge.types.d.ts +24 -44
  27. package/lib/components/CounterBadge/CounterBadge.types.js.map +1 -1
  28. package/lib/components/CounterBadge/index.js.map +1 -1
  29. package/lib/components/CounterBadge/useCounterBadge.d.ts +1 -5
  30. package/lib/components/CounterBadge/useCounterBadge.js +25 -19
  31. package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
  32. package/lib/components/CounterBadge/useCounterBadgeStyles.js +1 -1
  33. package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  34. package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +1 -1
  35. package/lib/components/PresenceBadge/PresenceBadge.d.ts +1 -2
  36. package/lib/components/PresenceBadge/PresenceBadge.js +0 -1
  37. package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
  38. package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +5 -25
  39. package/lib/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
  40. package/lib/components/PresenceBadge/index.js.map +1 -1
  41. package/lib/components/PresenceBadge/usePresenceBadge.d.ts +1 -5
  42. package/lib/components/PresenceBadge/usePresenceBadge.js +15 -21
  43. package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  44. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +1 -1
  45. package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  46. package/lib/index.js.map +1 -1
  47. package/lib-commonjs/Badge.js.map +1 -1
  48. package/lib-commonjs/CounterBadge.js.map +1 -1
  49. package/lib-commonjs/PresenceBadge.js.map +1 -1
  50. package/lib-commonjs/common/isConformant.js +2 -0
  51. package/lib-commonjs/common/isConformant.js.map +1 -1
  52. package/lib-commonjs/components/Badge/Badge.d.ts +1 -2
  53. package/lib-commonjs/components/Badge/Badge.js +0 -1
  54. package/lib-commonjs/components/Badge/Badge.js.map +1 -1
  55. package/lib-commonjs/components/Badge/Badge.types.d.ts +19 -46
  56. package/lib-commonjs/components/Badge/Badge.types.js.map +1 -1
  57. package/lib-commonjs/components/Badge/index.js.map +1 -1
  58. package/lib-commonjs/components/Badge/renderBadge.js +2 -4
  59. package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
  60. package/lib-commonjs/components/Badge/useBadge.d.ts +1 -5
  61. package/lib-commonjs/components/Badge/useBadge.js +30 -19
  62. package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
  63. package/lib-commonjs/components/Badge/useBadgeStyles.js +1 -1
  64. package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
  65. package/lib-commonjs/components/CounterBadge/CounterBadge.d.ts +1 -2
  66. package/lib-commonjs/components/CounterBadge/CounterBadge.js +0 -1
  67. package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
  68. package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +24 -44
  69. package/lib-commonjs/components/CounterBadge/CounterBadge.types.js.map +1 -1
  70. package/lib-commonjs/components/CounterBadge/index.js.map +1 -1
  71. package/lib-commonjs/components/CounterBadge/useCounterBadge.d.ts +1 -5
  72. package/lib-commonjs/components/CounterBadge/useCounterBadge.js +27 -21
  73. package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
  74. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +1 -1
  75. package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
  76. package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +1 -1
  77. package/lib-commonjs/components/PresenceBadge/PresenceBadge.d.ts +1 -2
  78. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js +0 -1
  79. package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
  80. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +5 -25
  81. package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
  82. package/lib-commonjs/components/PresenceBadge/index.js.map +1 -1
  83. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.d.ts +1 -5
  84. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +16 -22
  85. package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
  86. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +1 -1
  87. package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
  88. package/lib-commonjs/index.js.map +1 -1
  89. package/package.json +9 -9
  90. package/lib-amd/Badge.d.ts +0 -1
  91. package/lib-amd/Badge.js +0 -6
  92. package/lib-amd/Badge.js.map +0 -1
  93. package/lib-amd/CounterBadge.d.ts +0 -1
  94. package/lib-amd/CounterBadge.js +0 -6
  95. package/lib-amd/CounterBadge.js.map +0 -1
  96. package/lib-amd/PresenceBadge.d.ts +0 -1
  97. package/lib-amd/PresenceBadge.js +0 -6
  98. package/lib-amd/PresenceBadge.js.map +0 -1
  99. package/lib-amd/common/isConformant.d.ts +0 -4
  100. package/lib-amd/common/isConformant.js +0 -15
  101. package/lib-amd/common/isConformant.js.map +0 -1
  102. package/lib-amd/components/Badge/Badge.d.ts +0 -7
  103. package/lib-amd/components/Badge/Badge.js +0 -16
  104. package/lib-amd/components/Badge/Badge.js.map +0 -1
  105. package/lib-amd/components/Badge/Badge.types.d.ts +0 -65
  106. package/lib-amd/components/Badge/Badge.types.js +0 -5
  107. package/lib-amd/components/Badge/Badge.types.js.map +0 -1
  108. package/lib-amd/components/Badge/index.d.ts +0 -5
  109. package/lib-amd/components/Badge/index.js +0 -10
  110. package/lib-amd/components/Badge/index.js.map +0 -1
  111. package/lib-amd/components/Badge/renderBadge.d.ts +0 -2
  112. package/lib-amd/components/Badge/renderBadge.js +0 -14
  113. package/lib-amd/components/Badge/renderBadge.js.map +0 -1
  114. package/lib-amd/components/Badge/useBadge.d.ts +0 -10
  115. package/lib-amd/components/Badge/useBadge.js +0 -25
  116. package/lib-amd/components/Badge/useBadge.js.map +0 -1
  117. package/lib-amd/components/Badge/useBadgeStyles.d.ts +0 -5
  118. package/lib-amd/components/Badge/useBadgeStyles.js +0 -234
  119. package/lib-amd/components/Badge/useBadgeStyles.js.map +0 -1
  120. package/lib-amd/components/CounterBadge/CounterBadge.d.ts +0 -7
  121. package/lib-amd/components/CounterBadge/CounterBadge.js +0 -16
  122. package/lib-amd/components/CounterBadge/CounterBadge.js.map +0 -1
  123. package/lib-amd/components/CounterBadge/CounterBadge.types.d.ts +0 -61
  124. package/lib-amd/components/CounterBadge/CounterBadge.types.js +0 -5
  125. package/lib-amd/components/CounterBadge/CounterBadge.types.js.map +0 -1
  126. package/lib-amd/components/CounterBadge/index.d.ts +0 -4
  127. package/lib-amd/components/CounterBadge/index.js +0 -9
  128. package/lib-amd/components/CounterBadge/index.js.map +0 -1
  129. package/lib-amd/components/CounterBadge/useCounterBadge.d.ts +0 -10
  130. package/lib-amd/components/CounterBadge/useCounterBadge.js +0 -28
  131. package/lib-amd/components/CounterBadge/useCounterBadge.js.map +0 -1
  132. package/lib-amd/components/CounterBadge/useCounterBadgeStyles.d.ts +0 -5
  133. package/lib-amd/components/CounterBadge/useCounterBadgeStyles.js +0 -46
  134. package/lib-amd/components/CounterBadge/useCounterBadgeStyles.js.map +0 -1
  135. package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
  136. package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -64
  137. package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
  138. package/lib-amd/components/PresenceBadge/PresenceBadge.d.ts +0 -7
  139. package/lib-amd/components/PresenceBadge/PresenceBadge.js +0 -16
  140. package/lib-amd/components/PresenceBadge/PresenceBadge.js.map +0 -1
  141. package/lib-amd/components/PresenceBadge/PresenceBadge.types.d.ts +0 -37
  142. package/lib-amd/components/PresenceBadge/PresenceBadge.types.js +0 -5
  143. package/lib-amd/components/PresenceBadge/PresenceBadge.types.js.map +0 -1
  144. package/lib-amd/components/PresenceBadge/index.d.ts +0 -4
  145. package/lib-amd/components/PresenceBadge/index.js +0 -9
  146. package/lib-amd/components/PresenceBadge/index.js.map +0 -1
  147. package/lib-amd/components/PresenceBadge/usePresenceBadge.d.ts +0 -10
  148. package/lib-amd/components/PresenceBadge/usePresenceBadge.js +0 -37
  149. package/lib-amd/components/PresenceBadge/usePresenceBadge.js.map +0 -1
  150. package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.d.ts +0 -5
  151. package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.js +0 -58
  152. package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.js.map +0 -1
  153. package/l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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;AA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N,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":""}
@@ -2,6 +2,5 @@ import * as React from 'react';
2
2
  import type { CounterBadgeProps } from './CounterBadge.types';
3
3
  /**
4
4
  * Define a styled CounterBadge, using the `useCounterBadge` hook.
5
- * {@docCategory CounterBadge}
6
5
  */
7
- export declare const CounterBadge: React.ForwardRefExoticComponent<CounterBadgeProps & 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>>;
@@ -14,7 +14,6 @@ var useCounterBadgeStyles_1 = /*#__PURE__*/require("./useCounterBadgeStyles");
14
14
  var index_1 = /*#__PURE__*/require("../Badge/index");
15
15
  /**
16
16
  * Define a styled CounterBadge, using the `useCounterBadge` hook.
17
- * {@docCategory CounterBadge}
18
17
  */
19
18
 
20
19
 
@@ -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;;;AAGG;;;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 * {@docCategory CounterBadge}\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,61 +1,41 @@
1
1
  import type { BadgeProps, BadgeState } from '../Badge/index';
2
- /**
3
- * {@docCategory CounterBadge}
4
- */
5
- export interface CounterBadgeProps extends Omit<BadgeProps, 'appearance' | 'shape'> {
6
- /**
7
- * A Badge can be circular or rounded
8
- * @defaultvalue circular
9
- */
10
- shape?: Extract<BadgeProps['shape'], 'rounded' | 'circular'>;
11
- /**
12
- * A Badge can be filled, ghost
13
- * @defaultvalue filled
14
- */
15
- appearance?: Extract<BadgeProps['appearance'], 'filled' | 'ghost'>;
16
- /**
17
- * Max number to be displayed
18
- * @defaultvalue 99
19
- */
20
- overflowCount?: number;
21
- /**
22
- * Value displayed by the Badge
23
- * @defaultvalue 0
24
- */
25
- count?: number;
26
- /**
27
- * If the badge should be shown when count is 0
28
- * @defaultvalue false
29
- */
30
- showZero?: boolean;
31
- /**
32
- * If a dot badge should be displayed
33
- * @defaultvalue false
34
- */
35
- dot?: boolean;
36
- }
37
- /**
38
- * {@docCategory CounterBadge}
39
- */
40
- export interface CounterBadgeState extends BadgeState {
2
+ export declare type CounterBadgeCommons = {
41
3
  /**
42
4
  * Max number to be displayed
43
- * @defaultvalue 99
5
+ * @default 99
44
6
  */
45
7
  overflowCount: number;
46
8
  /**
47
9
  * Value displayed by the Badge
48
- * @defaultvalue 0
10
+ * @default 0
49
11
  */
50
12
  count: number;
51
13
  /**
52
14
  * If the badge should be shown when count is 0
53
- * @defaultvalue false
15
+ * @default false
54
16
  */
55
17
  showZero: boolean;
56
18
  /**
57
19
  * If a dot badge should be displayed
58
- * @defaultvalue false
20
+ * @default false
59
21
  */
60
22
  dot: boolean;
61
- }
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';
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;
@@ -3,35 +3,41 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useCounterBadge = exports.counterBadgeShorthandPropsCompat = void 0;
6
+ exports.useCounterBadge = void 0;
7
7
 
8
- var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
8
+ var tslib_1 = /*#__PURE__*/require("tslib");
9
9
 
10
10
  var index_1 = /*#__PURE__*/require("../Badge/index");
11
- /**
12
- * Consts listing which props are shorthand props.
13
- */
14
-
15
-
16
- exports.counterBadgeShorthandPropsCompat = ['icon']; // eslint-disable-next-line deprecation/deprecation
17
-
18
- var mergeProps = /*#__PURE__*/react_utilities_1.makeMergePropsCompat({
19
- deepMerge: exports.counterBadgeShorthandPropsCompat
20
- });
21
11
  /**
22
12
  * Returns the props and state required to render the component
23
13
  */
24
14
 
25
- var useCounterBadge = function (props, ref, defaultProps) {
26
- var state = index_1.useBadge(props, ref, mergeProps({
27
- showZero: false,
28
- overflowCount: 99,
29
- count: 0,
30
- dot: false
31
- }, defaultProps));
32
15
 
33
- if (!state.dot && !state.children) {
34
- state.children = state.count > state.overflowCount ? state.overflowCount + "+" : "" + state.count;
16
+ var useCounterBadge = function (props, ref) {
17
+ var _a = props.shape,
18
+ shape = _a === void 0 ? 'circular' : _a,
19
+ _b = props.appearance,
20
+ appearance = _b === void 0 ? 'filled' : _b,
21
+ _c = props.showZero,
22
+ showZero = _c === void 0 ? false : _c,
23
+ _d = props.overflowCount,
24
+ overflowCount = _d === void 0 ? 99 : _d,
25
+ _e = props.count,
26
+ count = _e === void 0 ? 0 : _e,
27
+ _f = props.dot,
28
+ dot = _f === void 0 ? false : _f;
29
+
30
+ var state = tslib_1.__assign(tslib_1.__assign({}, index_1.useBadge(props, ref)), {
31
+ shape: shape,
32
+ appearance: appearance,
33
+ showZero: showZero,
34
+ overflowCount: overflowCount,
35
+ count: count,
36
+ dot: dot
37
+ });
38
+
39
+ if (!state.dot && !state.root.children) {
40
+ state.root.children = state.count > state.overflowCount ? state.overflowCount + "+" : "" + state.count;
35
41
  }
36
42
 
37
43
  return state;
@@ -1 +1 @@
1
- {"version":3,"sources":["components/CounterBadge/useCounterBadge.ts"],"names":[],"mappings":";;;;;;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAIA;;AAEG;;;AACU,OAAA,CAAA,gCAAA,GAAmC,CAAC,MAAD,CAAnC,C,CAEb;;AACA,IAAM,UAAU,gBAAG,iBAAA,CAAA,oBAAA,CAAwC;AAAE,EAAA,SAAS,EAAE,OAAA,CAAA;AAAb,CAAxC,CAAnB;AAEA;;AAEG;;AACI,IAAM,eAAe,GAAG,UAC7B,KAD6B,EAE7B,GAF6B,EAG7B,YAH6B,EAGG;AAEhC,MAAM,KAAK,GAAG,OAAA,CAAA,QAAA,CACZ,KADY,EAEZ,GAFY,EAGZ,UAAU,CACR;AACE,IAAA,QAAQ,EAAE,KADZ;AAEE,IAAA,aAAa,EAAE,EAFjB;AAGE,IAAA,KAAK,EAAE,CAHT;AAIE,IAAA,GAAG,EAAE;AAJP,GADQ,EAOR,YAPQ,CAHE,CAAd;;AAcA,MAAI,CAAC,KAAK,CAAC,GAAP,IAAc,CAAC,KAAK,CAAC,QAAzB,EAAmC;AACjC,IAAA,KAAK,CAAC,QAAN,GAAiB,KAAK,CAAC,KAAN,GAAc,KAAK,CAAC,aAApB,GAAuC,KAAK,CAAC,aAAN,GAAmB,GAA1D,GAAgE,KAAG,KAAK,CAAC,KAA1F;AACD;;AAED,SAAO,KAAP;AACD,CAxBM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf","sourcesContent":["import * as React from 'react';\nimport { makeMergePropsCompat } from '@fluentui/react-utilities';\nimport { useBadge } from '../Badge/index';\nimport type { CounterBadgeProps, CounterBadgeState } from './CounterBadge.types';\nimport type { BadgeProps } from '../Badge/index';\n\n/**\n * Consts listing which props are shorthand props.\n */\nexport const counterBadgeShorthandPropsCompat = ['icon'] as const;\n\n// eslint-disable-next-line deprecation/deprecation\nconst mergeProps = makeMergePropsCompat<CounterBadgeState>({ deepMerge: counterBadgeShorthandPropsCompat });\n\n/**\n * Returns the props and state required to render the component\n */\nexport const useCounterBadge = (\n props: CounterBadgeProps,\n ref: React.Ref<HTMLElement>,\n defaultProps?: CounterBadgeProps,\n): CounterBadgeState => {\n const state = useBadge(\n props,\n ref,\n mergeProps(\n {\n showZero: false,\n overflowCount: 99,\n count: 0,\n dot: false,\n },\n defaultProps,\n ) as BadgeProps,\n ) as CounterBadgeState;\n\n if (!state.dot && !state.children) {\n state.children = state.count > state.overflowCount ? `${state.overflowCount}+` : `${state.count}`;\n }\n\n return state;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadge.ts"],"names":[],"mappings":";;;;;;;;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;AAGA;;AAEG;;;AACI,IAAM,eAAe,GAAG,UAAC,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AApB,GAAuC,KAAK,CAAC,aAAN,GAAmB,GAA1D,GAAgE,KAAG,KAAK,CAAC,KAA/F;AACD;;AAED,SAAO,KAAP;AACD,CAzBM;;AAAM,OAAA,CAAA,eAAA,GAAe,eAAf","sourceRoot":""}
@@ -63,7 +63,7 @@ var useStyles = /*#__PURE__*/react_make_styles_1.__styles({
63
63
 
64
64
  var useCounterBadgeStyles = function (state) {
65
65
  var styles = useStyles();
66
- state.className = react_make_styles_1.mergeClasses(styles.root, state.color === 'warning' && styles.warning, state.color === 'important' && styles.important, state.color === 'severe' && styles.severe, state.color === 'informative' && styles.informative, state.dot && styles.dot, !state.showZero && state.count === 0 && !state.dot && styles.hide, state.className);
66
+ state.root.className = react_make_styles_1.mergeClasses(styles.root, state.color === 'warning' && styles.warning, state.color === 'important' && styles.important, state.color === 'severe' && styles.severe, state.color === 'informative' && styles.informative, state.dot && styles.dot, !state.showZero && state.count === 0 && !state.dot && styles.hide, state.root.className);
67
67
  return useBadgeStyles_1.useBadgeStyles(state);
68
68
  };
69
69
 
@@ -1 +1 @@
1
- {"version":3,"sources":["components/CounterBadge/useCounterBadgeStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,gBAAA,gBAAA,OAAA,CAAA,yBAAA,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,EAAlB;AAgCA;;AAEG;;;AACI,IAAM,qBAAqB,GAAG,UAAC,KAAD,EAAyB;AAC5D,MAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,SAAN,GAAkB,mBAAA,CAAA,YAAA,CAChB,MAAM,CAAC,IADS,EAEhB,KAAK,CAAC,KAAN,KAAgB,SAAhB,IAA6B,MAAM,CAAC,OAFpB,EAGhB,KAAK,CAAC,KAAN,KAAgB,WAAhB,IAA+B,MAAM,CAAC,SAHtB,EAIhB,KAAK,CAAC,KAAN,KAAgB,QAAhB,IAA4B,MAAM,CAAC,MAJnB,EAKhB,KAAK,CAAC,KAAN,KAAgB,aAAhB,IAAiC,MAAM,CAAC,WALxB,EAMhB,KAAK,CAAC,GAAN,IAAa,MAAM,CAAC,GANJ,EAOhB,CAAC,KAAK,CAAC,QAAP,IAAmB,KAAK,CAAC,KAAN,KAAgB,CAAnC,IAAwC,CAAC,KAAK,CAAC,GAA/C,IAAsD,MAAM,CAAC,IAP7C,EAQhB,KAAK,CAAC,SARU,CAAlB;AAUA,SAAO,gBAAA,CAAA,cAAA,CAAe,KAAf,CAAP;AACD,CAbM;;AAAM,OAAA,CAAA,qBAAA,GAAqB,qBAArB","sourcesContent":["import { mergeClasses, makeStyles } from '@fluentui/react-make-styles';\nimport { useBadgeStyles } from '../Badge/useBadgeStyles';\nimport type { CounterBadgeState } from './CounterBadge.types';\n\nconst useStyles = makeStyles({\n root: {\n minWidth: 'auto',\n },\n warning: theme => ({\n backgroundColor: theme.global.palette.cranberry.primary,\n borderColor: theme.global.palette.cranberry.primary,\n }),\n important: theme => ({\n backgroundColor: theme.global.palette.grey[14],\n borderColor: theme.global.palette.grey[14],\n }),\n severe: theme => ({\n // TODO: update these colors once the color used in the design spec has existing color token\n backgroundColor: theme.global.palette.red.primary,\n borderColor: theme.global.palette.red.primary,\n }),\n informative: theme => ({\n backgroundColor: theme.global.palette.grey[92],\n borderColor: theme.global.palette.grey[92],\n color: theme.alias.color.neutral.neutralForeground3,\n }),\n dot: {\n width: '6px',\n height: '6px',\n padding: '0',\n },\n hide: {\n display: 'none',\n },\n});\n\n/**\n * Applies style classnames to slots\n */\nexport const useCounterBadgeStyles = (state: CounterBadgeState): CounterBadgeState => {\n const styles = useStyles();\n state.className = mergeClasses(\n styles.root,\n state.color === 'warning' && styles.warning,\n state.color === 'important' && styles.important,\n state.color === 'severe' && styles.severe,\n state.color === 'informative' && styles.informative,\n state.dot && styles.dot,\n !state.showZero && state.count === 0 && !state.dot && styles.hide,\n state.className,\n );\n return useBadgeStyles(state) as CounterBadgeState;\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadgeStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,gBAAA,gBAAA,OAAA,CAAA,yBAAA,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,EAAlB;AAgCA;;AAEG;;;AACI,IAAM,qBAAqB,GAAG,UAAC,KAAD,EAAyB;AAC5D,MAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,mBAAA,CAAA,YAAA,CACrB,MAAM,CAAC,IADc,EAErB,KAAK,CAAC,KAAN,KAAgB,SAAhB,IAA6B,MAAM,CAAC,OAFf,EAGrB,KAAK,CAAC,KAAN,KAAgB,WAAhB,IAA+B,MAAM,CAAC,SAHjB,EAIrB,KAAK,CAAC,KAAN,KAAgB,QAAhB,IAA4B,MAAM,CAAC,MAJd,EAKrB,KAAK,CAAC,KAAN,KAAgB,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,OAAA,CAAA,cAAA,GAAA,cAAA;AAVzD,cAAc,CAAC,WAAf,GAA6B,gBAA7B;AAEA,IAAM,UAAU,gBAAG,OAAA,CAAA,UAAA,CAAW,UAAA,KAAA,EAAK;AAAI,SACrC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,IAAA,KAAK,EAAC,4BAAX;AAAwC,IAAA,OAAO,EAAC,eAAhD;AAAgE,IAAA,SAAS,EAAE,KAAK,CAAC;AAAjF,GAAA,EACE,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAM,IAAA,CAAC,EAF4B;AAEnC,GAAA,CADF,CADqC;AAItC,CAJkB,CAAnB;AAQyE,OAAA,CAAA,UAAA,GAAA,UAAA;AAFzE,UAAU,CAAC,WAAX,GAAyB,YAAzB","sourcesContent":["import { mergeClasses, makeStyles } from '@fluentui/react-make-styles';\nimport { getNativeProps, htmlElementProperties } from '@fluentui/react-utilities';\nimport * as React from 'react';\n\nconst useStyles = makeStyles({\n root: {\n display: 'inline-block',\n verticalAlign: 'middle',\n speak: 'none',\n width: '1em',\n height: '1em',\n },\n svg: {\n height: '100%',\n fill: 'currentColor',\n verticalAlign: 'top',\n },\n});\n\n//\n// !!! A temporary workaround to avoid dependencies on any icon packages.\n// !!! A usage of converged icon package should be considered.\n//\n\nconst useIconProps = (props: React.HTMLAttributes<HTMLSpanElement>) => {\n const containerProps = props['aria-label']\n ? {}\n : {\n role: 'presentation',\n ['aria-hidden']: true,\n };\n const nativeProps = getNativeProps<React.HTMLAttributes<HTMLElement>>(props, htmlElementProperties);\n const styles = useStyles();\n\n const rootClasses = styles.root;\n const svgClasses = styles.svg;\n\n return { containerProps, nativeProps, rootClasses, svgClasses };\n};\n\nexport const renderIcon = (\n SVGElement: (props: { svgClasses: string }) => JSX.Element,\n): React.FC<React.HTMLAttributes<HTMLSpanElement>> => props => {\n const { containerProps, nativeProps, rootClasses, svgClasses } = useIconProps(props);\n\n return React.createElement(\n 'span',\n {\n ...containerProps,\n ...nativeProps,\n className: mergeClasses(rootClasses, props.className),\n },\n <SVGElement svgClasses={svgClasses} />,\n );\n};\n\nconst SkypeMinusIcon = renderIcon(props => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 2048 2048\" className={props.svgClasses}>\n <path d=\"M1591 823q42 0 78 16t64 43 43 63 16 79q0 42-16 78t-43 64-63 43-79 16H395q-42 0-78-16t-64-43-42-63-16-79q0-42 15-78t43-64 63-43 79-16h1196z\" />\n </svg>\n));\n\nSkypeMinusIcon.displayName = 'SkypeMinusIcon';\n\nconst SkypeClockIcon = renderIcon(props => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 2048 2048\" className={props.svgClasses}>\n <path d=\"M1431 1705q28 28 43 65t15 77q0 42-15 78t-43 64-63 43-79 16q-83 0-142-59l-594-593q-28-28-43-65t-15-77V201q0-42 15-78t43-64 63-43 79-16q42 0 78 16t64 43 43 63 16 79v970l535 534z\" />\n </svg>\n));\n\nSkypeClockIcon.displayName = 'SkypeClockIcon';\n\nconst SkypeCheckIcon = renderIcon(props => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 2048 2048\" className={props.svgClasses}>\n <path d=\"M1570 437q42 0 78 15t64 43 42 63 16 79q0 40-15 77t-43 65l-794 795q-28 28-65 43t-77 16q-40 0-77-15t-65-44l-362-362q-28-28-43-65t-16-77q0-42 16-78t43-64 63-42 79-16q40 0 77 15t65 43l220 220 652-653q28-28 65-43t77-15z\" />\n </svg>\n));\n\nSkypeCheckIcon.displayName = 'SkypeCheckIcon';\n\nconst SkypeArrowIcon = renderIcon(props => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 2048 2048\" className={props.svgClasses}>\n <path d=\"M1980 964q0 41-15 77t-43 63-63 42-77 16H739l281 280q28 27 43 64t15 76q0 41-15 77t-43 63-63 42-77 16q-39 0-75-15t-65-43l-615-616q-33-33-47-68t-14-82q0-39 17-73t44-61l615-616q28-28 65-43t76-15q41 0 77 16t62 43 42 63 16 77q0 39-15 75t-43 64L739 766h1043q41 0 77 15t63 43 42 63 16 77z\" />\n </svg>\n));\n\nSkypeArrowIcon.displayName = 'SkypeArrowIcon';\n\nconst CancelIcon = renderIcon(props => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 2048 2048\" className={props.svgClasses}>\n <path d=\"M1115 1024l690 691-90 90-691-690-691 690-90-90 690-691-690-691 90-90 691 690 691-690 90 90-690 691z\" />\n </svg>\n));\n\nCancelIcon.displayName = 'CancelIcon';\n\nexport { SkypeMinusIcon, SkypeClockIcon, SkypeCheckIcon, SkypeArrowIcon, CancelIcon };\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/PresenceBadge/DefaultPresenceBadgeIcons.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AAEA,IAAM,SAAS,gBAAG,mBAAA,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAAlB,C,CAeA;AACA;AACA;AACA;;;AAEA,IAAM,YAAY,GAAG,UAAC,KAAD,EAA6C;;;AAChE,MAAM,cAAc,GAAG,KAAK,CAAC,YAAD,CAAL,GACnB,EADmB,IAEpB,EAAA,GAAA;AACG,IAAA,IAAI,EAAE;AADT,GAAA,EAEG,EAAA,CAAC,aAAD,CAAA,GAAiB,IAFpB,EAGE,EALkB,CAAvB;AAMA,MAAM,WAAW,GAAG,iBAAA,CAAA,cAAA,CAAkD,KAAlD,EAAyD,iBAAA,CAAA,qBAAzD,CAApB;AACA,MAAM,MAAM,GAAG,SAAS,EAAxB;AAEA,MAAM,WAAW,GAAG,MAAM,CAAC,IAA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A,CAAC,EAFgC;AAEvC,GAAA,CADF,CADyC;AAI1C,CAJsB,CAAvB;AAgByD,OAAA,CAAA,cAAA,GAAA,cAAA;AAVzD,cAAc,CAAC,WAAf,GAA6B,gBAA7B;AAEA,IAAM,UAAU,gBAAG,OAAA,CAAA,UAAA,CAAW,UAAA,KAAA,EAAK;AAAI,SACrC,KAAA,CAAA,aAAA,CAAA,KAAA,EAAA;AAAK,IAAA,KAAK,EAAC,4BAAX;AAAwC,IAAA,OAAO,EAAC,eAAhD;AAAgE,IAAA,SAAS,EAAE,KAAK,CAAC;AAAjF,GAAA,EACE,KAAA,CAAA,aAAA,CAAA,MAAA,EAAA;AAAM,IAAA,CAAC,EAF4B;AAEnC,GAAA,CADF,CADqC;AAItC,CAJkB,CAAnB;AAQyE,OAAA,CAAA,UAAA,GAAA,UAAA;AAFzE,UAAU,CAAC,WAAX,GAAyB,YAAzB","sourceRoot":""}
@@ -2,6 +2,5 @@ import * as React from 'react';
2
2
  import type { PresenceBadgeProps } from './PresenceBadge.types';
3
3
  /**
4
4
  * Define a styled Badge, using the `useBadge` hook.
5
- * {@docCategory Badge}
6
5
  */
7
- export declare const PresenceBadge: React.ForwardRefExoticComponent<PresenceBadgeProps & React.RefAttributes<HTMLElement>>;
6
+ export declare const PresenceBadge: React.ForwardRefExoticComponent<Pick<PresenceBadgeProps, "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" | "outOfOffice" | "status"> & React.RefAttributes<HTMLElement>>;
@@ -14,7 +14,6 @@ var usePresenceBadgeStyles_1 = /*#__PURE__*/require("./usePresenceBadgeStyles");
14
14
  var Badge_1 = /*#__PURE__*/require("../../Badge");
15
15
  /**
16
16
  * Define a styled Badge, using the `useBadge` hook.
17
- * {@docCategory Badge}
18
17
  */
19
18
 
20
19
 
@@ -1 +1 @@
1
- {"version":3,"sources":["components/PresenceBadge/PresenceBadge.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,IAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;AAGA;;;AAGG;;;AACU,OAAA,CAAA,aAAA,gBAAgB,KAAK,CAAC,UAAN,CAAkD,UAAC,KAAD,EAAQ,GAAR,EAAW;AACxF,MAAM,KAAK,GAAG,kBAAA,CAAA,gBAAA,CAAiB,KAAjB,EAAwB,GAAxB,CAAd;AACA,EAAA,wBAAA,CAAA,sBAAA,CAAuB,KAAvB;AAEA,SAAO,OAAA,CAAA,WAAA,CAAY,KAAZ,CAAP;AACD,CAL4B,CAAhB;AAOb,OAAA,CAAA,aAAA,CAAc,WAAd,GAA4B,eAA5B","sourcesContent":["import * as React from 'react';\nimport { usePresenceBadge } from './usePresenceBadge';\nimport { usePresenceBadgeStyles } from './usePresenceBadgeStyles';\nimport { renderBadge } from '../../Badge';\nimport type { PresenceBadgeProps } from './PresenceBadge.types';\n\n/**\n * Define a styled Badge, using the `useBadge` hook.\n * {@docCategory Badge}\n */\nexport const PresenceBadge = React.forwardRef<HTMLElement, PresenceBadgeProps>((props, ref) => {\n const state = usePresenceBadge(props, ref);\n usePresenceBadgeStyles(state);\n\n return renderBadge(state);\n});\n\nPresenceBadge.displayName = 'PresenceBadge';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/PresenceBadge/PresenceBadge.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,kBAAA,gBAAA,OAAA,CAAA,oBAAA,CAAA;;AACA,IAAA,wBAAA,gBAAA,OAAA,CAAA,0BAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;AAGA;;AAEG;;;AACU,OAAA,CAAA,aAAA,gBAAgB,KAAK,CAAC,UAAN,CAAkD,UAAC,KAAD,EAAQ,GAAR,EAAW;AACxF,MAAM,KAAK,GAAG,kBAAA,CAAA,gBAAA,CAAiB,KAAjB,EAAwB,GAAxB,CAAd;AACA,EAAA,wBAAA,CAAA,sBAAA,CAAuB,KAAvB;AAEA,SAAO,OAAA,CAAA,WAAA,CAAY,KAAZ,CAAP;AACD,CAL4B,CAAhB;AAOb,OAAA,CAAA,aAAA,CAAc,WAAd,GAA4B,eAA5B","sourceRoot":""}
@@ -1,37 +1,17 @@
1
1
  import type { BadgeProps, BadgeState } from '../Badge/index';
2
- /**
3
- * {@docCategory PresenceBadge}
4
- */
5
2
  export declare type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb';
6
- /**
7
- * {@docCategory PresenceBadge}
8
- */
9
- export interface PresenceBadgeProps extends Omit<BadgeProps, 'shape' | 'appearance'> {
3
+ export interface PresenceBadgeCommons {
10
4
  /**
11
5
  * Represents several status
12
- * @defaultvalue available
13
- */
14
- status?: PresenceBadgeStatus;
15
- /**
16
- * Modifies the display to indicate that the user is out of office.
17
- * This can be combined with any status to display an out-of-office version of that status
18
- * @defaultvalue false
19
- */
20
- outOfOffice?: boolean;
21
- }
22
- /**
23
- * {@docCategory Badge}
24
- */
25
- export interface PresenceBadgeState extends Omit<BadgeState, 'shape' | 'appearance'> {
26
- /**
27
- * Represents several status
28
- * @defaultvalue available
6
+ * @default available
29
7
  */
30
8
  status: PresenceBadgeStatus;
31
9
  /**
32
10
  * Modifies the display to indicate that the user is out of office.
33
11
  * This can be combined with any status to display an out-of-office version of that status
34
- * @defaultvalue false
12
+ * @default false
35
13
  */
36
14
  outOfOffice: boolean;
37
15
  }
16
+ export declare type PresenceBadgeProps = BadgeProps & Partial<PresenceBadgeCommons>;
17
+ export declare type PresenceBadgeState = BadgeState & PresenceBadgeCommons;
@@ -1 +1 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":"../src/"}
1
+ {"version":3,"sources":[],"names":[],"mappings":"","sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["components/PresenceBadge/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './PresenceBadge';\nexport * from './PresenceBadge.types';\nexport * from './usePresenceBadge';\nexport * from './usePresenceBadgeStyles';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../../../src/components/PresenceBadge/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,uBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,oBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA","sourceRoot":""}
@@ -1,10 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import type { PresenceBadgeProps, PresenceBadgeState } from './PresenceBadge.types';
3
- /**
4
- * Consts listing which props are shorthand props.
5
- */
6
- export declare const presenceBadgeShorthandPropsCompat: (keyof PresenceBadgeProps)[];
7
3
  /**
8
4
  * Returns the props and state required to render the component
9
5
  */
10
- export declare const usePresenceBadge: (props: PresenceBadgeProps, ref: React.Ref<HTMLElement>, defaultProps?: PresenceBadgeProps | undefined) => PresenceBadgeState;
6
+ export declare const usePresenceBadge: (props: PresenceBadgeProps, ref: React.Ref<HTMLElement>) => PresenceBadgeState;
@@ -3,7 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.usePresenceBadge = exports.presenceBadgeShorthandPropsCompat = void 0;
6
+ exports.usePresenceBadge = void 0;
7
+
8
+ var tslib_1 = /*#__PURE__*/require("tslib");
7
9
 
8
10
  var React = /*#__PURE__*/require("react");
9
11
 
@@ -12,16 +14,6 @@ var react_utilities_1 = /*#__PURE__*/require("@fluentui/react-utilities");
12
14
  var index_1 = /*#__PURE__*/require("../Badge/index");
13
15
 
14
16
  var DefaultPresenceBadgeIcons_1 = /*#__PURE__*/require("./DefaultPresenceBadgeIcons");
15
- /**
16
- * Consts listing which props are shorthand props.
17
- */
18
-
19
-
20
- exports.presenceBadgeShorthandPropsCompat = ['icon']; // eslint-disable-next-line deprecation/deprecation
21
-
22
- var mergeProps = /*#__PURE__*/react_utilities_1.makeMergePropsCompat({
23
- deepMerge: exports.presenceBadgeShorthandPropsCompat
24
- });
25
17
 
26
18
  var iconMap = function (outOfOffice) {
27
19
  return {
@@ -38,19 +30,21 @@ var iconMap = function (outOfOffice) {
38
30
  */
39
31
 
40
32
 
41
- var usePresenceBadge = function (props, ref, defaultProps) {
42
- var _a;
33
+ var usePresenceBadge = function (props, ref) {
34
+ var _a, _b, _c;
43
35
 
44
- var state = index_1.useBadge(props, ref, mergeProps({
45
- size: 'small',
46
- status: 'available',
47
- outOfOffice: false,
48
- icon: {
49
- as: 'span'
50
- }
51
- }, defaultProps));
36
+ var state = tslib_1.__assign(tslib_1.__assign({}, index_1.useBadge(tslib_1.__assign(tslib_1.__assign({
37
+ size: 'small'
38
+ }, props), {
39
+ icon: react_utilities_1.resolveShorthand(props.icon, {
40
+ required: true
41
+ })
42
+ }), ref)), {
43
+ status: (_a = props.status) !== null && _a !== void 0 ? _a : 'available',
44
+ outOfOffice: (_b = props.outOfOffice) !== null && _b !== void 0 ? _b : false
45
+ });
52
46
 
53
- if (!((_a = state.icon) === null || _a === void 0 ? void 0 : _a.children)) {
47
+ if (!((_c = state.icon) === null || _c === void 0 ? void 0 : _c.children)) {
54
48
  state.icon.children = iconMap(state.outOfOffice)[state.status];
55
49
  }
56
50
 
@@ -1 +1 @@
1
- {"version":3,"sources":["components/PresenceBadge/usePresenceBadge.tsx"],"names":[],"mappings":";;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,IAAA,2BAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;AAUA;;AAEG;;;AACU,OAAA,CAAA,iCAAA,GAAkE,CAAC,MAAD,CAAlE,C,CAEb;;AACA,IAAM,UAAU,gBAAG,iBAAA,CAAA,oBAAA,CAAyC;AAAE,EAAA,SAAS,EAAE,OAAA,CAAA;AAAb,CAAzC,CAAnB;;AAEA,IAAM,OAAO,GAA8E,UAAA,WAAA,EAAW;AAAI,SAAC;AACzG,IAAA,IAAI,EAAE,IADmG;AAEzG,IAAA,SAAS,EAAE,WAAW,GAAG,KAAA,CAAA,aAAA,CAAC,2BAAA,CAAA,cAAD,EAAe,IAAf,CAAH,GAAwB,KAAA,CAAA,aAAA,CAAC,2BAAA,CAAA,cAAD,EAAe,IAAf,CAF2D;AAGzG,IAAA,IAAI,EAAE,WAAW,GAAG,KAAA,CAAA,aAAA,CAAC,2BAAA,CAAA,cAAD,EAAe,IAAf,CAAH,GAAwB,KAAA,CAAA,aAAA,CAAC,2BAAA,CAAA,cAAD,EAAe,IAAf,CAHgE;AAIzG,IAAA,OAAO,EAAE,KAAA,CAAA,aAAA,CAAC,2BAAA,CAAA,UAAD,EAAW,IAAX,CAJgG;AAKzG,IAAA,WAAW,EAAE,KAAA,CAAA,aAAA,CAAC,2BAAA,CAAA,cAAD,EAAe,IAAf,CAL4F;AAMzG,IAAA,YAAY,EAAE,KAAA,CAAA,aAAA,CAAC,2BAAA,CAAA,cAAD,EAAe,IAAf;AAN2F,GAAD;AAOxG,CAPF;AASA;;AAEG;;;AACI,IAAM,gBAAgB,GAAG,UAC9B,KAD8B,EAE9B,GAF8B,EAG9B,YAH8B,EAGG;;;AAEjC,MAAM,KAAK,GAAG,OAAA,CAAA,QAAA,CACZ,KADY,EAEZ,GAFY,EAGZ,UAAU,CACR;AACE,IAAA,IAAI,EAAE,OADR;AAEE,IAAA,MAAM,EAAE,WAFV;AAGE,IAAA,WAAW,EAAE,KAHf;AAIE,IAAA,IAAI,EAAE;AAAE,MAAA,EAAE,EAAE;AAAN;AAJR,GADQ,EAOR,YAPQ,CAHE,CAAd;;AAcA,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,CAxBM;;AAAM,OAAA,CAAA,gBAAA,GAAgB,gBAAhB","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
+ {"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadge.tsx"],"names":[],"mappings":";;;;;;;;;AAAA,IAAA,KAAA,gBAAA,OAAA,CAAA,OAAA,CAAA;;AACA,IAAA,iBAAA,gBAAA,OAAA,CAAA,2BAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,gBAAA,CAAA;;AACA,IAAA,2BAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AASA,I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A,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;;AAAM,OAAA,CAAA,gBAAA,GAAgB,gBAAhB","sourceRoot":""}
@@ -85,7 +85,7 @@ var useStyles = /*#__PURE__*/react_make_styles_1.__styles({
85
85
 
86
86
  var usePresenceBadgeStyles = function (state) {
87
87
  var styles = useStyles();
88
- state.className = react_make_styles_1.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);
88
+ state.root.className = react_make_styles_1.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);
89
89
  return Badge_1.useBadgeStyles(state);
90
90
  };
91
91
 
@@ -1 +1 @@
1
- {"version":3,"sources":["components/PresenceBadge/usePresenceBadgeStyles.ts"],"names":[],"mappings":";;;;;;;AAAA,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,aAAA,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,EAAlB;AA4CA;;AAEG;;;AACI,IAAM,sBAAsB,GAAG,UAAC,KAAD,EAA0B;AAC9D,MAAM,MAAM,GAAG,SAAS,EAAxB;AACA,EAAA,KAAK,CAAC,SAAN,GAAkB,mBAAA,CAAA,YAAA,CAChB,MAAM,CAAC,IADS,EAEhB,CAAC,KAAK,CAAC,MAAN,KAAiB,MAAjB,IAA2B,KAAK,CAAC,MAAN,KAAiB,cAA7C,KAAgE,MAAM,CAAC,UAFvD,EAGhB,KAAK,CAAC,MAAN,KAAiB,MAAjB,IAA2B,MAAM,CAAC,UAHlB,EAIhB,KAAK,CAAC,MAAN,KAAiB,WAAjB,IAAgC,MAAM,CAAC,eAJvB,EAKhB,KAAK,CAAC,MAAN,KAAiB,SAAjB,IAA8B,MAAM,CAAC,aALrB,EAMhB,KAAK,CAAC,MAAN,KAAiB,aAAjB,IAAkC,MAAM,CAAC,iBANzB,EAOhB,KAAK,CAAC,WAAN,IAAqB,MAAM,CAAC,WAPZ,EAQhB,KAAK,CAAC,WAAN,IAAqB,KAAK,CAAC,MAAN,KAAiB,WAAtC,IAAqD,MAAM,CAAC,oBAR5C,EAShB,KAAK,CAAC,WAAN,KAAsB,KAAK,CAAC,MAAN,KAAiB,MAAjB,IAA2B,KAAK,CAAC,MAAN,KAAiB,cAAlE,KAAqF,MAAM,CAAC,eAT5E,EAUhB,KAAK,CAAC,WAAN,IAAqB,KAAK,CAAC,MAAN,KAAiB,MAAtC,IAAgD,MAAM,CAAC,eAVvC,EAWhB,CAAC,KAAK,CAAC,IAAN,KAAe,UAAf,IAA6B,KAAK,CAAC,IAAN,KAAe,SAA7C,KAA2D,MAAM,CAAC,UAXlD,EAYhB,KAAK,CAAC,SAZU,CAAlB;AAeA,SAAO,OAAA,CAAA,cAAA,CAAe,KAAf,CAAP;AACD,CAlBM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","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,IAAA,mBAAA,gBAAA,OAAA,CAAA,6BAAA,CAAA;;AACA,IAAA,OAAA,gBAAA,OAAA,CAAA,aAAA,CAAA;;AAGA,IAAM,SAAS,gBAAG,mB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lE,KAAqF,MAAM,CAAC,eATvE,EAUrB,KAAK,CAAC,WAAN,IAAqB,KAAK,CAAC,MAAN,KAAiB,MAAtC,IAAgD,MAAM,CAAC,eAVlC,EAWrB,CAAC,KAAK,CAAC,IAAN,KAAe,UAAf,IAA6B,KAAK,CAAC,IAAN,KAAe,SAA7C,KAA2D,MAAM,CAAC,UAX7C,EAYrB,KAAK,CAAC,IAAN,CAAW,SAZU,CAAvB;AAeA,SAAO,OAAA,CAAA,cAAA,CAAe,KAAf,CAAP;AACD,CAlBM;;AAAM,OAAA,CAAA,sBAAA,GAAsB,sBAAtB","sourceRoot":""}
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iCAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA","sourcesContent":["export * from './components/Badge/index';\nexport * from './Badge';\nexport * from './PresenceBadge';\nexport * from './components/CounterBadge/index';\nexport * from './CounterBadge';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;AAAA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,0BAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,SAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iBAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,iCAAA,CAAA,EAAA,OAAA;;AACA,OAAA,CAAA,YAAA,CAAA,OAAA,CAAA,gBAAA,CAAA,EAAA,OAAA","sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluentui/react-badge",
3
- "version": "9.0.0-alpha.81",
3
+ "version": "9.0.0-alpha.85",
4
4
  "description": "React components for building web experiences",
5
5
  "main": "lib-commonjs/index.js",
6
6
  "module": "lib/index.js",
@@ -25,11 +25,11 @@
25
25
  "storybook": "start-storybook"
26
26
  },
27
27
  "devDependencies": {
28
- "@fluentui/babel-make-styles": "9.0.0-alpha.49",
29
- "@fluentui/eslint-plugin": "^1.4.1",
30
- "@fluentui/jest-serializer-make-styles": "9.0.0-alpha.42",
31
- "@fluentui/react-conformance": "^0.5.0",
32
- "@fluentui/react-conformance-make-styles": "9.0.0-alpha.11",
28
+ "@fluentui/babel-make-styles": "9.0.0-alpha.53",
29
+ "@fluentui/eslint-plugin": "*",
30
+ "@fluentui/jest-serializer-make-styles": "9.0.0-alpha.46",
31
+ "@fluentui/react-conformance": "*",
32
+ "@fluentui/react-conformance-make-styles": "9.0.0-alpha.15",
33
33
  "@fluentui/scripts": "^1.0.0",
34
34
  "@types/enzyme": "3.10.3",
35
35
  "@types/enzyme-adapter-react-16": "1.0.3",
@@ -43,9 +43,9 @@
43
43
  "react-test-renderer": "^16.3.0"
44
44
  },
45
45
  "dependencies": {
46
- "@fluentui/react-make-styles": "9.0.0-alpha.67",
47
- "@fluentui/react-theme": "9.0.0-alpha.22",
48
- "@fluentui/react-utilities": "9.0.0-alpha.49",
46
+ "@fluentui/react-make-styles": "9.0.0-alpha.71",
47
+ "@fluentui/react-theme": "9.0.0-alpha.23",
48
+ "@fluentui/react-utilities": "9.0.0-alpha.51",
49
49
  "tslib": "^2.1.0"
50
50
  },
51
51
  "peerDependencies": {
@@ -1 +0,0 @@
1
- export * from './components/Badge/index';
package/lib-amd/Badge.js DELETED
@@ -1,6 +0,0 @@
1
- define(["require", "exports", "tslib", "./components/Badge/index"], function (require, exports, tslib_1, index_1) {
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(index_1, exports);
5
- });
6
- //# sourceMappingURL=Badge.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Badge.js","sourceRoot":"../src/","sources":["Badge.ts"],"names":[],"mappings":";;;IAAA,uCAAyC","sourcesContent":["export * from './components/Badge/index';\n"]}