@fluentui/react-badge 9.0.0-alpha.83 → 9.0.0-alpha.87
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.json +182 -8
- package/CHANGELOG.md +63 -8
- package/Spec.md +3 -47
- package/dist/react-badge.d.ts +73 -123
- package/lib/Badge.js.map +1 -1
- package/lib/CounterBadge.js.map +1 -1
- package/lib/PresenceBadge.js.map +1 -1
- package/lib/common/isConformant.js +2 -0
- package/lib/common/isConformant.js.map +1 -1
- package/lib/components/Badge/Badge.d.ts +6 -2
- package/lib/components/Badge/Badge.js.map +1 -1
- package/lib/components/Badge/Badge.types.d.ts +20 -32
- package/lib/components/Badge/Badge.types.js.map +1 -1
- package/lib/components/Badge/index.js.map +1 -1
- package/lib/components/Badge/renderBadge.js +3 -4
- package/lib/components/Badge/renderBadge.js.map +1 -1
- package/lib/components/Badge/useBadge.d.ts +1 -5
- package/lib/components/Badge/useBadge.js +29 -18
- package/lib/components/Badge/useBadge.js.map +1 -1
- package/lib/components/Badge/useBadgeStyles.js +5 -5
- package/lib/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.d.ts +1 -8
- package/lib/components/CounterBadge/CounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/CounterBadge.types.d.ts +24 -38
- package/lib/components/CounterBadge/CounterBadge.types.js.map +1 -1
- package/lib/components/CounterBadge/index.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadge.d.ts +1 -5
- package/lib/components/CounterBadge/useCounterBadge.js +25 -19
- package/lib/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib/components/CounterBadge/useCounterBadgeStyles.js +1 -1
- package/lib/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/lib/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.d.ts +6 -4
- package/lib/components/PresenceBadge/PresenceBadge.js.map +1 -1
- package/lib/components/PresenceBadge/PresenceBadge.types.d.ts +6 -17
- package/lib/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
- package/lib/components/PresenceBadge/index.js.map +1 -1
- package/lib/components/PresenceBadge/usePresenceBadge.d.ts +1 -5
- package/lib/components/PresenceBadge/usePresenceBadge.js +15 -21
- package/lib/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js +1 -1
- package/lib/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib-commonjs/Badge.js.map +1 -1
- package/lib-commonjs/CounterBadge.js.map +1 -1
- package/lib-commonjs/PresenceBadge.js.map +1 -1
- package/lib-commonjs/common/isConformant.js +2 -0
- package/lib-commonjs/common/isConformant.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.d.ts +6 -2
- package/lib-commonjs/components/Badge/Badge.js.map +1 -1
- package/lib-commonjs/components/Badge/Badge.types.d.ts +20 -32
- package/lib-commonjs/components/Badge/Badge.types.js.map +1 -1
- package/lib-commonjs/components/Badge/index.js.map +1 -1
- package/lib-commonjs/components/Badge/renderBadge.js +2 -4
- package/lib-commonjs/components/Badge/renderBadge.js.map +1 -1
- package/lib-commonjs/components/Badge/useBadge.d.ts +1 -5
- package/lib-commonjs/components/Badge/useBadge.js +30 -19
- package/lib-commonjs/components/Badge/useBadge.js.map +1 -1
- package/lib-commonjs/components/Badge/useBadgeStyles.js +5 -5
- package/lib-commonjs/components/Badge/useBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.d.ts +1 -8
- package/lib-commonjs/components/CounterBadge/CounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.d.ts +24 -38
- package/lib-commonjs/components/CounterBadge/CounterBadge.types.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/index.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadge.d.ts +1 -5
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js +27 -21
- package/lib-commonjs/components/CounterBadge/useCounterBadge.js.map +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js +1 -1
- package/lib-commonjs/components/CounterBadge/useCounterBadgeStyles.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.d.ts +6 -4
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.d.ts +6 -17
- package/lib-commonjs/components/PresenceBadge/PresenceBadge.types.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/index.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.d.ts +1 -5
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js +16 -22
- package/lib-commonjs/components/PresenceBadge/usePresenceBadge.js.map +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js +1 -1
- package/lib-commonjs/components/PresenceBadge/usePresenceBadgeStyles.js.map +1 -1
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +6 -6
- package/lib-amd/Badge.d.ts +0 -1
- package/lib-amd/Badge.js +0 -6
- package/lib-amd/Badge.js.map +0 -1
- package/lib-amd/CounterBadge.d.ts +0 -1
- package/lib-amd/CounterBadge.js +0 -6
- package/lib-amd/CounterBadge.js.map +0 -1
- package/lib-amd/PresenceBadge.d.ts +0 -1
- package/lib-amd/PresenceBadge.js +0 -6
- package/lib-amd/PresenceBadge.js.map +0 -1
- package/lib-amd/common/isConformant.d.ts +0 -4
- package/lib-amd/common/isConformant.js +0 -15
- package/lib-amd/common/isConformant.js.map +0 -1
- package/lib-amd/components/Badge/Badge.d.ts +0 -6
- package/lib-amd/components/Badge/Badge.js +0 -15
- package/lib-amd/components/Badge/Badge.js.map +0 -1
- package/lib-amd/components/Badge/Badge.types.d.ts +0 -47
- package/lib-amd/components/Badge/Badge.types.js +0 -5
- package/lib-amd/components/Badge/Badge.types.js.map +0 -1
- package/lib-amd/components/Badge/index.d.ts +0 -5
- package/lib-amd/components/Badge/index.js +0 -10
- package/lib-amd/components/Badge/index.js.map +0 -1
- package/lib-amd/components/Badge/renderBadge.d.ts +0 -2
- package/lib-amd/components/Badge/renderBadge.js +0 -14
- package/lib-amd/components/Badge/renderBadge.js.map +0 -1
- package/lib-amd/components/Badge/useBadge.d.ts +0 -10
- package/lib-amd/components/Badge/useBadge.js +0 -25
- package/lib-amd/components/Badge/useBadge.js.map +0 -1
- package/lib-amd/components/Badge/useBadgeStyles.d.ts +0 -5
- package/lib-amd/components/Badge/useBadgeStyles.js +0 -234
- package/lib-amd/components/Badge/useBadgeStyles.js.map +0 -1
- package/lib-amd/components/CounterBadge/CounterBadge.d.ts +0 -12
- package/lib-amd/components/CounterBadge/CounterBadge.js +0 -15
- package/lib-amd/components/CounterBadge/CounterBadge.js.map +0 -1
- package/lib-amd/components/CounterBadge/CounterBadge.types.d.ts +0 -55
- package/lib-amd/components/CounterBadge/CounterBadge.types.js +0 -5
- package/lib-amd/components/CounterBadge/CounterBadge.types.js.map +0 -1
- package/lib-amd/components/CounterBadge/index.d.ts +0 -4
- package/lib-amd/components/CounterBadge/index.js +0 -9
- package/lib-amd/components/CounterBadge/index.js.map +0 -1
- package/lib-amd/components/CounterBadge/useCounterBadge.d.ts +0 -10
- package/lib-amd/components/CounterBadge/useCounterBadge.js +0 -28
- package/lib-amd/components/CounterBadge/useCounterBadge.js.map +0 -1
- package/lib-amd/components/CounterBadge/useCounterBadgeStyles.d.ts +0 -5
- package/lib-amd/components/CounterBadge/useCounterBadgeStyles.js +0 -46
- package/lib-amd/components/CounterBadge/useCounterBadgeStyles.js.map +0 -1
- package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.d.ts +0 -10
- package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.js +0 -64
- package/lib-amd/components/PresenceBadge/DefaultPresenceBadgeIcons.js.map +0 -1
- package/lib-amd/components/PresenceBadge/PresenceBadge.d.ts +0 -8
- package/lib-amd/components/PresenceBadge/PresenceBadge.js +0 -15
- package/lib-amd/components/PresenceBadge/PresenceBadge.js.map +0 -1
- package/lib-amd/components/PresenceBadge/PresenceBadge.types.d.ts +0 -28
- package/lib-amd/components/PresenceBadge/PresenceBadge.types.js +0 -5
- package/lib-amd/components/PresenceBadge/PresenceBadge.types.js.map +0 -1
- package/lib-amd/components/PresenceBadge/index.d.ts +0 -4
- package/lib-amd/components/PresenceBadge/index.js +0 -9
- package/lib-amd/components/PresenceBadge/index.js.map +0 -1
- package/lib-amd/components/PresenceBadge/usePresenceBadge.d.ts +0 -10
- package/lib-amd/components/PresenceBadge/usePresenceBadge.js +0 -37
- package/lib-amd/components/PresenceBadge/usePresenceBadge.js.map +0 -1
- package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.d.ts +0 -5
- package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.js +0 -58
- package/lib-amd/components/PresenceBadge/usePresenceBadgeStyles.js.map +0 -1
- package/lib-amd/index.d.ts +0 -5
- package/lib-amd/index.js +0 -10
- package/lib-amd/index.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/Badge/useBadgeStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;;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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AC,iBA5BJ,EA6B5B,SAAS,IAAI,SAAb,IAA0B,MAAM,CAAC,kBA7BL,EA8B5B,MAAM,IAAI,SAAV,IAAuB,MAAM,CAAC,eA9BF,EA+B5B,OAAO,IAAI,SAAX,IAAwB,MAAM,CAAC,gBA/BH,EAgC5B,QAAQ,IAAI,WAAZ,IAA2B,MAAM,CAAC,mBAhCN,EAiC5B,SAAS,IAAI,WAAb,IAA4B,MAAM,CAAC,oBAjCP,EAkC5B,MAAM,IAAI,WAAV,IAAyB,MAAM,CAAC,iBAlCJ,EAmC5B,OAAO,IAAI,WAAX,IAA0B,MAAM,CAAC,kBAnCL,EAoC5B,QAAQ,IAAI,aAAZ,IAA6B,MAAM,CAAC,qBApCR,EAqC5B,SAAS,IAAI,aAAb,IAA8B,MAAM,CAAC,sBArCT,EAsC5B,MAAM,IAAI,aAAV,IAA2B,MAAM,CAAC,mBAtCN,EAuC5B,OAAO,IAAI,aAAX,IAA4B,MAAM,CAAC,oBAvCP,EAwC5B,QAAQ,IAAI,QAAZ,IAAwB,MAAM,CAAC,gBAxCH,EAyC5B,SAAS,IAAI,QAAb,IAAyB,MAAM,CAAC,iBAzCJ,EA0C5B,MAAM,IAAI,QAAV,IAAsB,MAAM,CAAC,cA1CD,EA2C5B,OAAO,IAAI,QAAX,IAAuB,MAAM,CAAC,eA3CF,EA4C5B,KAAK,CAAC,SA5CsB,CAA9B;;AA+CA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,MAAM,CAAC,IAAR,EAAc,KAAK,CAAC,IAAN,CAAW,SAAzB,CAAnC;AACD;;AAED,SAAO,KAAP;AACD,CAlEM","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,SAAS,YAAT,kBAAyC,6BAAzC;;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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA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oCjC,QAAQ,IAAI,aAAZ,IAA6B,MAAM,CAAC,qBApCH,EAqCjC,SAAS,IAAI,aAAb,IAA8B,MAAM,CAAC,sBArCJ,EAsCjC,MAAM,IAAI,aAAV,IAA2B,MAAM,CAAC,mBAtCD,EAuCjC,OAAO,IAAI,aAAX,IAA4B,MAAM,CAAC,oBAvCF,EAwCjC,QAAQ,IAAI,QAAZ,IAAwB,MAAM,CAAC,gBAxCE,EAyCjC,SAAS,IAAI,QAAb,IAAyB,MAAM,CAAC,iBAzCC,EA0CjC,MAAM,IAAI,QAAV,IAAsB,MAAM,CAAC,cA1CI,EA2CjC,OAAO,IAAI,QAAX,IAAuB,MAAM,CAAC,eA3CG,EA4CjC,KAAK,CAAC,IAAN,CAAW,SA5CsB,CAAnC;;AA+CA,MAAI,KAAK,CAAC,IAAV,EAAgB;AACd,IAAA,KAAK,CAAC,IAAN,CAAW,SAAX,GAAuB,YAAY,CAAC,MAAM,CAAC,IAAR,EAAc,KAAK,CAAC,IAAN,CAAW,SAAzB,CAAnC;AACD;;AAED,SAAO,KAAP;AACD,CAlEM","sourceRoot":""}
|
@@ -2,11 +2,4 @@ import * as React from 'react';
|
|
2
2
|
/**
|
3
3
|
* Define a styled CounterBadge, using the `useCounterBadge` hook.
|
4
4
|
*/
|
5
|
-
export declare const CounterBadge: React.ForwardRefExoticComponent<Pick<import("../Badge").BadgeProps, "
|
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>>;
|
5
|
+
export declare const CounterBadge: React.ForwardRefExoticComponent<Pick<import("../Badge").BadgeProps, "icon" | "children" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "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" | "iconPosition" | "size"> & Partial<import("./CounterBadge.types").CounterBadgeCommons> & React.RefAttributes<HTMLElement>>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/CounterBadge/CounterBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,eAAT,QAAgC,mBAAhC;AACA,SAAS,qBAAT,QAAsC,yBAAtC;AACA,SAAS,WAAT,QAA4B,gBAA5B;AAGA;;AAEG;;AACH,OAAO,IAAM,YAAY,gBAAG,KAAK,CAAC,UAAN,CAAiD,UAAC,KAAD,EAAQ,GAAR,EAAW;AACtF,MAAM,KAAK,GAAG,eAAe,CAAC,KAAD,EAAQ,GAAR,CAA7B;AACA,EAAA,qBAAqB,CAAC,KAAD,CAArB;AAEA,SAAO,WAAW,CAAC,KAAD,CAAlB;AACD,CAL2B,CAArB;AAOP,YAAY,CAAC,WAAb,GAA2B,cAA3B","
|
1
|
+
{"version":3,"sources":["../../../src/components/CounterBadge/CounterBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,eAAT,QAAgC,mBAAhC;AACA,SAAS,qBAAT,QAAsC,yBAAtC;AACA,SAAS,WAAT,QAA4B,gBAA5B;AAGA;;AAEG;;AACH,OAAO,IAAM,YAAY,gBAAG,KAAK,CAAC,UAAN,CAAiD,UAAC,KAAD,EAAQ,GAAR,EAAW;AACtF,MAAM,KAAK,GAAG,eAAe,CAAC,KAAD,EAAQ,GAAR,CAA7B;AACA,EAAA,qBAAqB,CAAC,KAAD,CAArB;AAEA,SAAO,WAAW,CAAC,KAAD,CAAlB;AACD,CAL2B,CAArB;AAOP,YAAY,CAAC,WAAb,GAA2B,cAA3B","sourceRoot":""}
|
@@ -1,55 +1,41 @@
|
|
1
1
|
import type { BadgeProps, BadgeState } from '../Badge/index';
|
2
|
-
export declare type
|
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'>;
|
13
|
-
/**
|
14
|
-
* 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 & {
|
2
|
+
export declare type CounterBadgeCommons = {
|
35
3
|
/**
|
36
4
|
* Max number to be displayed
|
37
|
-
* @
|
5
|
+
* @default 99
|
38
6
|
*/
|
39
7
|
overflowCount: number;
|
40
8
|
/**
|
41
9
|
* Value displayed by the Badge
|
42
|
-
* @
|
10
|
+
* @default 0
|
43
11
|
*/
|
44
12
|
count: number;
|
45
13
|
/**
|
46
14
|
* If the badge should be shown when count is 0
|
47
|
-
* @
|
15
|
+
* @default false
|
48
16
|
*/
|
49
17
|
showZero: boolean;
|
50
18
|
/**
|
51
|
-
* If a dot
|
52
|
-
* @
|
19
|
+
* If a dot should be displayed without the count
|
20
|
+
* @default false
|
53
21
|
*/
|
54
22
|
dot: boolean;
|
23
|
+
/**
|
24
|
+
* A Badge can be circular or rounded
|
25
|
+
* @default circular
|
26
|
+
*/
|
27
|
+
shape: 'circular' | 'rounded';
|
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,"file":"CounterBadge.types.js","sourceRoot":"
|
1
|
+
{"version":3,"file":"CounterBadge.types.js","sourceRoot":"","sources":["../../../src/components/CounterBadge/CounterBadge.types.ts"],"names":[],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/CounterBadge/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,yBAAyB,CAAC"}
|
@@ -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
|
6
|
+
export declare const useCounterBadge: (props: CounterBadgeProps, ref: React.Ref<HTMLElement>) => CounterBadgeState;
|
@@ -1,28 +1,34 @@
|
|
1
|
-
import {
|
1
|
+
import { __assign } from "tslib";
|
2
2
|
import { useBadge } from '../Badge/index';
|
3
|
-
/**
|
4
|
-
* Consts listing which props are shorthand props.
|
5
|
-
*/
|
6
|
-
|
7
|
-
export var counterBadgeShorthandPropsCompat = ['icon']; // eslint-disable-next-line deprecation/deprecation
|
8
|
-
|
9
|
-
var mergeProps = /*#__PURE__*/makeMergePropsCompat({
|
10
|
-
deepMerge: counterBadgeShorthandPropsCompat
|
11
|
-
});
|
12
3
|
/**
|
13
4
|
* Returns the props and state required to render the component
|
14
5
|
*/
|
15
6
|
|
16
|
-
export var useCounterBadge = function (props, ref
|
17
|
-
var
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
7
|
+
export var useCounterBadge = function (props, ref) {
|
8
|
+
var _a = props.shape,
|
9
|
+
shape = _a === void 0 ? 'circular' : _a,
|
10
|
+
_b = props.appearance,
|
11
|
+
appearance = _b === void 0 ? 'filled' : _b,
|
12
|
+
_c = props.showZero,
|
13
|
+
showZero = _c === void 0 ? false : _c,
|
14
|
+
_d = props.overflowCount,
|
15
|
+
overflowCount = _d === void 0 ? 99 : _d,
|
16
|
+
_e = props.count,
|
17
|
+
count = _e === void 0 ? 0 : _e,
|
18
|
+
_f = props.dot,
|
19
|
+
dot = _f === void 0 ? false : _f;
|
20
|
+
|
21
|
+
var state = __assign(__assign({}, useBadge(props, ref)), {
|
22
|
+
shape: shape,
|
23
|
+
appearance: appearance,
|
24
|
+
showZero: showZero,
|
25
|
+
overflowCount: overflowCount,
|
26
|
+
count: count,
|
27
|
+
dot: dot
|
28
|
+
});
|
23
29
|
|
24
|
-
if (!state.dot && !state.children) {
|
25
|
-
state.children = state.count > state.overflowCount ? state.overflowCount + "+" : "" + state.count;
|
30
|
+
if (!state.dot && !state.root.children) {
|
31
|
+
state.root.children = state.count > state.overflowCount ? state.overflowCount + "+" : "" + state.count;
|
26
32
|
}
|
27
33
|
|
28
34
|
return state;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/CounterBadge/useCounterBadge.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"sources":["../../../src/components/CounterBadge/useCounterBadge.ts"],"names":[],"mappings":";AACA,SAAS,QAAT,QAAyB,gBAAzB;AAGA;;AAEG;;AACH,OAAO,IAAM,eAAe,GAAG,UAAC,KAAD,EAA2B,GAA3B,EAAsD;AAEjF,MAAA,EAAA,GAME,KAAK,CANW,KAAlB;AAAA,MAAA,KAAK,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,UAAH,GAAa,EAAlB;AAAA,MACA,EAAA,GAKE,KAAK,CALc,UADrB;AAAA,MACA,UAAU,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,QAAH,GAAW,EADrB;AAAA,MAEA,EAAA,GAIE,KAAK,CAJS,QAFhB;AAAA,MAEA,QAAQ,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,KAAH,GAAQ,EAFhB;AAAA,MAGA,EAAA,GAGE,KAAK,CAHW,aAHlB;AAAA,MAGA,aAAa,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,EAAH,GAAK,EAHlB;AAAA,MAIA,EAAA,GAEE,KAAK,CAFE,KAJT;AAAA,MAIA,KAAK,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,CAAH,GAAI,EAJT;AAAA,MAKA,EAAA,GACE,KAAK,CADI,GALX;AAAA,MAKA,GAAG,GAAA,EAAA,KAAA,KAAA,CAAA,GAAG,KAAH,GAAQ,EALX;;AAQF,MAAM,KAAK,GAAA,QAAA,CAAA,QAAA,CAAA,EAAA,EACN,QAAQ,CAAC,KAAD,EAAQ,GAAR,CADF,CAAA,EACc;AACvB,IAAA,KAAK,EAAA,KADkB;AAEvB,IAAA,UAAU,EAAA,UAFa;AAGvB,IAAA,QAAQ,EAAA,QAHe;AAIvB,IAAA,aAAa,EAAA,aAJU;AAKvB,IAAA,KAAK,EAAA,KALkB;AAMvB,IAAA,GAAG,EAAA;AANoB,GADd,CAAX;;AAUA,MAAI,CAAC,KAAK,CAAC,GAAP,IAAc,CAAC,KAAK,CAAC,IAAN,CAAW,QAA9B,EAAwC;AACtC,IAAA,KAAK,CAAC,IAAN,CAAW,QAAX,GAAsB,KAAK,CAAC,KAAN,GAAc,KAAK,CAAC,aAApB,GAAuC,KAAK,CAAC,aAAN,GAAmB,GAA1D,GAAgE,KAAG,KAAK,CAAC,KAA/F;AACD;;AAED,SAAO,KAAP;AACD,CAzBM","sourceRoot":""}
|
@@ -55,7 +55,7 @@ var useStyles = /*#__PURE__*/__styles({
|
|
55
55
|
|
56
56
|
export var useCounterBadgeStyles = function (state) {
|
57
57
|
var styles = useStyles();
|
58
|
-
state.className = 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);
|
58
|
+
state.root.className = 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);
|
59
59
|
return useBadgeStyles(state);
|
60
60
|
};
|
61
61
|
//# sourceMappingURL=useCounterBadgeStyles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/CounterBadge/useCounterBadgeStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;AACA,SAAS,cAAT,QAA+B,yBAA/B;;AAGA,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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
export declare const PresenceBadge: React.ForwardRefExoticComponent<Pick<
|
6
|
-
|
7
|
-
|
8
|
-
} & React.
|
5
|
+
export declare const PresenceBadge: React.ForwardRefExoticComponent<Pick<{
|
6
|
+
root?: import("@fluentui/react-utilities").ShorthandProps<import("@fluentui/react-utilities").ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>>;
|
7
|
+
icon?: import("@fluentui/react-utilities").ShorthandProps<import("@fluentui/react-utilities").ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>>;
|
8
|
+
}, "icon"> & React.HTMLAttributes<HTMLElement> & {
|
9
|
+
children?: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | import("@fluentui/react-utilities").ShorthandRenderFunction<React.HTMLAttributes<HTMLElement>> | null | undefined;
|
10
|
+
} & Partial<import("../Badge/Badge.types").BadgeCommons> & Partial<import("./PresenceBadge.types").PresenceBadgeCommons> & React.RefAttributes<HTMLElement>>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["components/PresenceBadge/PresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,oBAAjC;AACA,SAAS,sBAAT,QAAuC,0BAAvC;AACA,SAAS,WAAT,QAA4B,aAA5B;AAGA;;AAEG;;AACH,OAAO,IAAM,aAAa,gBAAG,KAAK,CAAC,UAAN,CAAkD,UAAC,KAAD,EAAQ,GAAR,EAAW;AACxF,MAAM,KAAK,GAAG,gBAAgB,CAAC,KAAD,EAAQ,GAAR,CAA9B;AACA,EAAA,sBAAsB,CAAC,KAAD,CAAtB;AAEA,SAAO,WAAW,CAAC,KAAD,CAAlB;AACD,CAL4B,CAAtB;AAOP,aAAa,CAAC,WAAd,GAA4B,eAA5B","
|
1
|
+
{"version":3,"sources":["../../../src/components/PresenceBadge/PresenceBadge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,oBAAjC;AACA,SAAS,sBAAT,QAAuC,0BAAvC;AACA,SAAS,WAAT,QAA4B,aAA5B;AAGA;;AAEG;;AACH,OAAO,IAAM,aAAa,gBAAG,KAAK,CAAC,UAAN,CAAkD,UAAC,KAAD,EAAQ,GAAR,EAAW;AACxF,MAAM,KAAK,GAAG,gBAAgB,CAAC,KAAD,EAAQ,GAAR,CAA9B;AACA,EAAA,sBAAsB,CAAC,KAAD,CAAtB;AAEA,SAAO,WAAW,CAAC,KAAD,CAAlB;AACD,CAL4B,CAAtB;AAOP,aAAa,CAAC,WAAd,GAA4B,eAA5B","sourceRoot":""}
|
@@ -1,28 +1,17 @@
|
|
1
1
|
import type { BadgeProps, BadgeState } from '../Badge/index';
|
2
2
|
export declare type PresenceBadgeStatus = 'busy' | 'outOfOffice' | 'away' | 'available' | 'offline' | 'doNotDisturb';
|
3
|
-
export
|
3
|
+
export interface PresenceBadgeCommons {
|
4
4
|
/**
|
5
5
|
* Represents several status
|
6
|
-
* @
|
7
|
-
*/
|
8
|
-
status?: PresenceBadgeStatus;
|
9
|
-
/**
|
10
|
-
* Modifies the display to indicate that the user is out of office.
|
11
|
-
* This can be combined with any status to display an out-of-office version of that status
|
12
|
-
* @defaultvalue false
|
13
|
-
*/
|
14
|
-
outOfOffice?: boolean;
|
15
|
-
};
|
16
|
-
export declare type PresenceBadgeState = Omit<BadgeState, 'shape' | 'appearance'> & {
|
17
|
-
/**
|
18
|
-
* Represents several status
|
19
|
-
* @defaultvalue available
|
6
|
+
* @default available
|
20
7
|
*/
|
21
8
|
status: PresenceBadgeStatus;
|
22
9
|
/**
|
23
10
|
* Modifies the display to indicate that the user is out of office.
|
24
11
|
* This can be combined with any status to display an out-of-office version of that status
|
25
|
-
* @
|
12
|
+
* @default false
|
26
13
|
*/
|
27
14
|
outOfOffice: boolean;
|
28
|
-
}
|
15
|
+
}
|
16
|
+
export declare type PresenceBadgeProps = BadgeProps & Partial<PresenceBadgeCommons>;
|
17
|
+
export declare type PresenceBadgeState = BadgeState & PresenceBadgeCommons;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PresenceBadge.types.js","sourceRoot":"
|
1
|
+
{"version":3,"file":"PresenceBadge.types.js","sourceRoot":"","sources":["../../../src/components/PresenceBadge/PresenceBadge.types.ts"],"names":[],"mappings":""}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/PresenceBadge/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,0BAA0B,CAAC"}
|
@@ -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
|
6
|
+
export declare const usePresenceBadge: (props: PresenceBadgeProps, ref: React.Ref<HTMLElement>) => PresenceBadgeState;
|
@@ -1,16 +1,8 @@
|
|
1
|
+
import { __assign } from "tslib";
|
1
2
|
import * as React from 'react';
|
2
|
-
import {
|
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
|
31
|
-
var _a;
|
22
|
+
export var usePresenceBadge = function (props, ref) {
|
23
|
+
var _a, _b, _c;
|
32
24
|
|
33
|
-
var state =
|
34
|
-
size: 'small'
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
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 (!((
|
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,
|
1
|
+
{"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadge.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,gBAAT,QAAiC,2BAAjC;AACA,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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 === '
|
80
|
+
state.root.className = mergeClasses(styles.root, (state.status === 'busy' || state.status === 'doNotDisturb') && styles.statusBusy, state.status === 'away' && styles.statusAway, state.status === 'available' && styles.statusAvailable, state.status === 'offline' && styles.statusOffline, state.status === 'outOfOffice' && styles.statusOutOfOffice, state.outOfOffice && styles.outOfOffice, state.outOfOffice && state.status === 'available' && styles.outOfOfficeAvailable, state.outOfOffice && (state.status === 'busy' || state.status === 'doNotDisturb') && styles.outOfOfficeBusy, state.outOfOffice && state.status === 'away' && styles.outOfOfficeAway, (state.size === 'tiny' || state.size === 'extra-small') && styles.thinBorder, state.root.className);
|
81
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,
|
1
|
+
{"version":3,"sources":["../../../src/components/PresenceBadge/usePresenceBadgeStyles.ts"],"names":[],"mappings":"AAAA,SAAS,YAAT,kBAAyC,6BAAzC;AACA,SAAS,cAAT,QAA+B,aAA/B;;AAGA,IAAM,SAAS,gBAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA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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":"
|
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","
|
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","
|
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","
|
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;
|
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":""}
|
@@ -1,6 +1,10 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import type { BadgeProps } from './Badge.types';
|
3
2
|
/**
|
4
3
|
* Define a styled Badge, using the `useBadge` hook.
|
5
4
|
*/
|
6
|
-
export declare const Badge: React.
|
5
|
+
export declare const Badge: React.ForwardRefExoticComponent<Pick<{
|
6
|
+
root?: import("@fluentui/react-utilities").ShorthandProps<import("@fluentui/react-utilities").ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>>;
|
7
|
+
icon?: import("@fluentui/react-utilities").ShorthandProps<import("@fluentui/react-utilities").ObjectShorthandProps<React.HTMLAttributes<HTMLElement>>>;
|
8
|
+
}, "icon"> & React.HTMLAttributes<HTMLElement> & {
|
9
|
+
children?: string | number | boolean | {} | React.ReactElement<any, string | ((props: any) => React.ReactElement<any, string | any | (new (props: any) => React.Component<any, any, any>)> | null) | (new (props: any) => React.Component<any, any, any>)> | React.ReactNodeArray | React.ReactPortal | import("@fluentui/react-utilities").ShorthandRenderFunction<React.HTMLAttributes<HTMLElement>> | null | undefined;
|
10
|
+
} & Partial<import("./Badge.types").BadgeCommons> & React.RefAttributes<HTMLElement>>;
|
@@ -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,
|
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,CAA0C,UAAC,KAAD,EAAQ,GAAR,EAAW;AACxE,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":""}
|