@fluentui/react-avatar 9.8.6 → 9.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (20) hide show
  1. package/CHANGELOG.md +25 -2
  2. package/lib/components/Avatar/Avatar.types.js.map +1 -1
  3. package/lib/components/Avatar/useAvatarStyles.styles.raw.js +702 -0
  4. package/lib/components/Avatar/useAvatarStyles.styles.raw.js.map +1 -0
  5. package/lib/components/AvatarGroup/useAvatarGroupStyles.styles.raw.js +31 -0
  6. package/lib/components/AvatarGroup/useAvatarGroupStyles.styles.raw.js.map +1 -0
  7. package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.raw.js +266 -0
  8. package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.raw.js.map +1 -0
  9. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.raw.js +188 -0
  10. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.raw.js.map +1 -0
  11. package/lib-commonjs/components/Avatar/Avatar.types.js.map +1 -1
  12. package/lib-commonjs/components/Avatar/useAvatarStyles.styles.raw.js +723 -0
  13. package/lib-commonjs/components/Avatar/useAvatarStyles.styles.raw.js.map +1 -0
  14. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.styles.raw.js +47 -0
  15. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.styles.raw.js.map +1 -0
  16. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.raw.js +282 -0
  17. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.raw.js.map +1 -0
  18. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.raw.js +204 -0
  19. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.styles.raw.js.map +1 -0
  20. package/package.json +5 -5
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Avatar/useAvatarStyles.styles.ts"],"sourcesContent":["import { tokens } from '@fluentui/react-theme';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { makeResetStyles, makeStyles, mergeClasses } from '@griffel/react';\nimport type { AvatarSlots, AvatarState } from './Avatar.types';\n\nexport const avatarClassNames: SlotClassNames<AvatarSlots> = {\n root: 'fui-Avatar',\n image: 'fui-Avatar__image',\n initials: 'fui-Avatar__initials',\n icon: 'fui-Avatar__icon',\n badge: 'fui-Avatar__badge',\n};\n\n// CSS variables used internally in Avatar's styles\nconst vars = {\n badgeRadius: '--fui-Avatar-badgeRadius',\n badgeGap: '--fui-Avatar-badgeGap',\n badgeAlign: '--fui-Avatar-badgeAlign',\n ringWidth: '--fui-Avatar-ringWidth',\n};\n\nconst useRootClassName = makeResetStyles({\n display: 'inline-block',\n flexShrink: 0,\n position: 'relative',\n verticalAlign: 'middle',\n borderRadius: tokens.borderRadiusCircular,\n fontFamily: tokens.fontFamilyBase,\n fontWeight: tokens.fontWeightSemibold,\n fontSize: tokens.fontSizeBase300,\n width: '32px',\n height: '32px',\n\n // ::before is the ring, and ::after is the shadow.\n // These are not displayed by default; the ring and shadow clases set content: \"\" to display them when appropriate.\n '::before,::after': {\n position: 'absolute',\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n zIndex: -1,\n margin: `calc(-2 * var(${vars.ringWidth}, 0px))`,\n borderRadius: 'inherit',\n transitionProperty: 'margin, opacity',\n transitionTimingFunction: `${tokens.curveEasyEaseMax}, ${tokens.curveLinear}`,\n transitionDuration: `${tokens.durationUltraSlow}, ${tokens.durationSlower}`,\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n },\n },\n '::before': {\n borderStyle: 'solid',\n borderWidth: `var(${vars.ringWidth})`,\n },\n});\n\nconst useImageClassName = makeResetStyles({\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n\n borderRadius: 'inherit',\n objectFit: 'cover',\n verticalAlign: 'top',\n});\n\nconst useIconInitialsClassName = makeResetStyles({\n position: 'absolute',\n boxSizing: 'border-box',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n lineHeight: '1',\n border: `${tokens.strokeWidthThin} solid ${tokens.colorTransparentStroke}`,\n\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n verticalAlign: 'center',\n textAlign: 'center',\n userSelect: 'none',\n borderRadius: 'inherit',\n});\n\n/**\n * Helper to create a maskImage that punches out a circle larger than the badge by `badgeGap`.\n * This creates a transparent gap between the badge and Avatar.\n *\n * Used by the icon, initials, and image slots, as well as the ring ::before pseudo-element.\n */\nconst badgeMask = (margin?: string) => {\n // Center the cutout at the badge's radius away from the edge.\n // The ring (::before) also has a 2 * ringWidth margin that also needs to be offset.\n const centerOffset = margin ? `calc(var(${vars.badgeRadius}) + ${margin})` : `var(${vars.badgeRadius})`;\n // radial-gradient does not have anti-aliasing, so the transparent and opaque gradient stops are offset by +/- 0.25px\n // to \"fade\" from transparent to opaque over a half-pixel and ease the transition.\n const innerRadius = `calc(var(${vars.badgeRadius}) + var(${vars.badgeGap}) - 0.25px)`;\n const outerRadius = `calc(var(${vars.badgeRadius}) + var(${vars.badgeGap}) + 0.25px)`;\n\n return (\n `radial-gradient(circle at bottom ${centerOffset} var(${vars.badgeAlign}) ${centerOffset}, ` +\n `transparent ${innerRadius}, white ${outerRadius})`\n );\n};\n\nconst useStyles = makeStyles({\n textCaption2Strong: { fontSize: tokens.fontSizeBase100 },\n textCaption1Strong: { fontSize: tokens.fontSizeBase200 },\n textSubtitle2: { fontSize: tokens.fontSizeBase400 },\n textSubtitle1: { fontSize: tokens.fontSizeBase500 },\n textTitle3: { fontSize: tokens.fontSizeBase600 },\n\n squareSmall: { borderRadius: tokens.borderRadiusSmall },\n squareMedium: { borderRadius: tokens.borderRadiusMedium },\n squareLarge: { borderRadius: tokens.borderRadiusLarge },\n squareXLarge: { borderRadius: tokens.borderRadiusXLarge },\n\n activeOrInactive: {\n transform: 'perspective(1px)', // Work-around for text pixel snapping at the end of the animation\n transitionProperty: 'transform, opacity',\n transitionDuration: `${tokens.durationUltraSlow}, ${tokens.durationFaster}`,\n transitionTimingFunction: `${tokens.curveEasyEaseMax}, ${tokens.curveLinear}`,\n\n '@media screen and (prefers-reduced-motion: reduce)': {\n transitionDuration: '0.01ms',\n },\n },\n\n ring: {\n // Show the ::before pseudo-element, which is the ring\n '::before': { content: '\"\"' },\n },\n ringBadgeCutout: {\n '::before': { maskImage: badgeMask(/*margin =*/ `2 * var(${vars.ringWidth})`) },\n },\n ringThick: {\n [vars.ringWidth]: tokens.strokeWidthThick,\n },\n ringThicker: {\n [vars.ringWidth]: tokens.strokeWidthThicker,\n },\n ringThickest: {\n [vars.ringWidth]: tokens.strokeWidthThickest,\n },\n\n shadow: {\n // Show the ::after pseudo-element, which is the shadow\n '::after': { content: '\"\"' },\n },\n shadow4: {\n '::after': { boxShadow: tokens.shadow4 },\n },\n shadow8: {\n '::after': { boxShadow: tokens.shadow8 },\n },\n shadow16: {\n '::after': { boxShadow: tokens.shadow16 },\n },\n shadow28: {\n '::after': { boxShadow: tokens.shadow28 },\n },\n\n inactive: {\n opacity: '0.8',\n transform: 'scale(0.875)',\n transitionTimingFunction: `${tokens.curveDecelerateMin}, ${tokens.curveLinear}`,\n\n '::before,::after': {\n margin: 0,\n opacity: 0,\n transitionTimingFunction: `${tokens.curveDecelerateMin}, ${tokens.curveLinear}`,\n },\n },\n\n // Applied to the badge slot\n badge: {\n position: 'absolute',\n bottom: 0,\n right: 0,\n },\n\n // Applied to the image, initials, or icon slot when there is a badge\n badgeCutout: {\n maskImage: badgeMask(),\n },\n\n // Applied to the root when there is a badge\n badgeAlign: {\n // Griffel won't auto-flip the \"right\" alignment to \"left\" in RTL if it is inline in the maskImage,\n // so split it out into a css variable that will auto-flip.\n [vars.badgeAlign]: 'right',\n },\n\n // Badge size: applied to root when there is a badge\n tiny: {\n [vars.badgeRadius]: '3px',\n [vars.badgeGap]: tokens.strokeWidthThin,\n },\n 'extra-small': {\n [vars.badgeRadius]: '5px',\n [vars.badgeGap]: tokens.strokeWidthThin,\n },\n small: {\n [vars.badgeRadius]: '6px',\n [vars.badgeGap]: tokens.strokeWidthThin,\n },\n medium: {\n [vars.badgeRadius]: '8px',\n [vars.badgeGap]: tokens.strokeWidthThin,\n },\n large: {\n [vars.badgeRadius]: '10px',\n [vars.badgeGap]: tokens.strokeWidthThick,\n },\n 'extra-large': {\n [vars.badgeRadius]: '14px',\n [vars.badgeGap]: tokens.strokeWidthThick,\n },\n\n icon12: { fontSize: '12px' },\n icon16: { fontSize: '16px' },\n icon20: { fontSize: '20px' },\n icon24: { fontSize: '24px' },\n icon28: { fontSize: '28px' },\n icon32: { fontSize: '32px' },\n icon48: { fontSize: '48px' },\n});\n\nexport const useSizeStyles = makeStyles({\n 16: { width: '16px', height: '16px' },\n 20: { width: '20px', height: '20px' },\n 24: { width: '24px', height: '24px' },\n 28: { width: '28px', height: '28px' },\n 32: { width: '32px', height: '32px' },\n 36: { width: '36px', height: '36px' },\n 40: { width: '40px', height: '40px' },\n 48: { width: '48px', height: '48px' },\n 56: { width: '56px', height: '56px' },\n 64: { width: '64px', height: '64px' },\n 72: { width: '72px', height: '72px' },\n 96: { width: '96px', height: '96px' },\n 120: { width: '120px', height: '120px' },\n 128: { width: '128px', height: '128px' },\n});\n\nconst useColorStyles = makeStyles({\n neutral: {\n color: tokens.colorNeutralForeground3,\n backgroundColor: tokens.colorNeutralBackground6,\n },\n brand: {\n color: tokens.colorNeutralForegroundStaticInverted,\n backgroundColor: tokens.colorBrandBackgroundStatic,\n },\n 'dark-red': {\n color: tokens.colorPaletteDarkRedForeground2,\n backgroundColor: tokens.colorPaletteDarkRedBackground2,\n },\n cranberry: {\n color: tokens.colorPaletteCranberryForeground2,\n backgroundColor: tokens.colorPaletteCranberryBackground2,\n },\n red: {\n color: tokens.colorPaletteRedForeground2,\n backgroundColor: tokens.colorPaletteRedBackground2,\n },\n pumpkin: {\n color: tokens.colorPalettePumpkinForeground2,\n backgroundColor: tokens.colorPalettePumpkinBackground2,\n },\n peach: {\n color: tokens.colorPalettePeachForeground2,\n backgroundColor: tokens.colorPalettePeachBackground2,\n },\n marigold: {\n color: tokens.colorPaletteMarigoldForeground2,\n backgroundColor: tokens.colorPaletteMarigoldBackground2,\n },\n gold: {\n color: tokens.colorPaletteGoldForeground2,\n backgroundColor: tokens.colorPaletteGoldBackground2,\n },\n brass: {\n color: tokens.colorPaletteBrassForeground2,\n backgroundColor: tokens.colorPaletteBrassBackground2,\n },\n brown: {\n color: tokens.colorPaletteBrownForeground2,\n backgroundColor: tokens.colorPaletteBrownBackground2,\n },\n forest: {\n color: tokens.colorPaletteForestForeground2,\n backgroundColor: tokens.colorPaletteForestBackground2,\n },\n seafoam: {\n color: tokens.colorPaletteSeafoamForeground2,\n backgroundColor: tokens.colorPaletteSeafoamBackground2,\n },\n 'dark-green': {\n color: tokens.colorPaletteDarkGreenForeground2,\n backgroundColor: tokens.colorPaletteDarkGreenBackground2,\n },\n 'light-teal': {\n color: tokens.colorPaletteLightTealForeground2,\n backgroundColor: tokens.colorPaletteLightTealBackground2,\n },\n teal: {\n color: tokens.colorPaletteTealForeground2,\n backgroundColor: tokens.colorPaletteTealBackground2,\n },\n steel: {\n color: tokens.colorPaletteSteelForeground2,\n backgroundColor: tokens.colorPaletteSteelBackground2,\n },\n blue: {\n color: tokens.colorPaletteBlueForeground2,\n backgroundColor: tokens.colorPaletteBlueBackground2,\n },\n 'royal-blue': {\n color: tokens.colorPaletteRoyalBlueForeground2,\n backgroundColor: tokens.colorPaletteRoyalBlueBackground2,\n },\n cornflower: {\n color: tokens.colorPaletteCornflowerForeground2,\n backgroundColor: tokens.colorPaletteCornflowerBackground2,\n },\n navy: {\n color: tokens.colorPaletteNavyForeground2,\n backgroundColor: tokens.colorPaletteNavyBackground2,\n },\n lavender: {\n color: tokens.colorPaletteLavenderForeground2,\n backgroundColor: tokens.colorPaletteLavenderBackground2,\n },\n purple: {\n color: tokens.colorPalettePurpleForeground2,\n backgroundColor: tokens.colorPalettePurpleBackground2,\n },\n grape: {\n color: tokens.colorPaletteGrapeForeground2,\n backgroundColor: tokens.colorPaletteGrapeBackground2,\n },\n lilac: {\n color: tokens.colorPaletteLilacForeground2,\n backgroundColor: tokens.colorPaletteLilacBackground2,\n },\n pink: {\n color: tokens.colorPalettePinkForeground2,\n backgroundColor: tokens.colorPalettePinkBackground2,\n },\n magenta: {\n color: tokens.colorPaletteMagentaForeground2,\n backgroundColor: tokens.colorPaletteMagentaBackground2,\n },\n plum: {\n color: tokens.colorPalettePlumForeground2,\n backgroundColor: tokens.colorPalettePlumBackground2,\n },\n beige: {\n color: tokens.colorPaletteBeigeForeground2,\n backgroundColor: tokens.colorPaletteBeigeBackground2,\n },\n mink: {\n color: tokens.colorPaletteMinkForeground2,\n backgroundColor: tokens.colorPaletteMinkBackground2,\n },\n platinum: {\n color: tokens.colorPalettePlatinumForeground2,\n backgroundColor: tokens.colorPalettePlatinumBackground2,\n },\n anchor: {\n color: tokens.colorPaletteAnchorForeground2,\n backgroundColor: tokens.colorPaletteAnchorBackground2,\n },\n});\n\nconst useRingColorStyles = makeStyles({\n neutral: {\n '::before': { color: tokens.colorBrandStroke1 },\n },\n brand: {\n '::before': { color: tokens.colorBrandStroke1 },\n },\n 'dark-red': {\n '::before': { color: tokens.colorPaletteDarkRedBorderActive },\n },\n cranberry: {\n '::before': { color: tokens.colorPaletteCranberryBorderActive },\n },\n red: {\n '::before': { color: tokens.colorPaletteRedBorderActive },\n },\n pumpkin: {\n '::before': { color: tokens.colorPalettePumpkinBorderActive },\n },\n peach: {\n '::before': { color: tokens.colorPalettePeachBorderActive },\n },\n marigold: {\n '::before': { color: tokens.colorPaletteMarigoldBorderActive },\n },\n gold: {\n '::before': { color: tokens.colorPaletteGoldBorderActive },\n },\n brass: {\n '::before': { color: tokens.colorPaletteBrassBorderActive },\n },\n brown: {\n '::before': { color: tokens.colorPaletteBrownBorderActive },\n },\n forest: {\n '::before': { color: tokens.colorPaletteForestBorderActive },\n },\n seafoam: {\n '::before': { color: tokens.colorPaletteSeafoamBorderActive },\n },\n 'dark-green': {\n '::before': { color: tokens.colorPaletteDarkGreenBorderActive },\n },\n 'light-teal': {\n '::before': { color: tokens.colorPaletteLightTealBorderActive },\n },\n teal: {\n '::before': { color: tokens.colorPaletteTealBorderActive },\n },\n steel: {\n '::before': { color: tokens.colorPaletteSteelBorderActive },\n },\n blue: {\n '::before': { color: tokens.colorPaletteBlueBorderActive },\n },\n 'royal-blue': {\n '::before': { color: tokens.colorPaletteRoyalBlueBorderActive },\n },\n cornflower: {\n '::before': { color: tokens.colorPaletteCornflowerBorderActive },\n },\n navy: {\n '::before': { color: tokens.colorPaletteNavyBorderActive },\n },\n lavender: {\n '::before': { color: tokens.colorPaletteLavenderBorderActive },\n },\n purple: {\n '::before': { color: tokens.colorPalettePurpleBorderActive },\n },\n grape: {\n '::before': { color: tokens.colorPaletteGrapeBorderActive },\n },\n lilac: {\n '::before': { color: tokens.colorPaletteLilacBorderActive },\n },\n pink: {\n '::before': { color: tokens.colorPalettePinkBorderActive },\n },\n magenta: {\n '::before': { color: tokens.colorPaletteMagentaBorderActive },\n },\n plum: {\n '::before': { color: tokens.colorPalettePlumBorderActive },\n },\n beige: {\n '::before': { color: tokens.colorPaletteBeigeBorderActive },\n },\n mink: {\n '::before': { color: tokens.colorPaletteMinkBorderActive },\n },\n platinum: {\n '::before': { color: tokens.colorPalettePlatinumBorderActive },\n },\n anchor: {\n '::before': { color: tokens.colorPaletteAnchorBorderActive },\n },\n});\n\nexport const useAvatarStyles_unstable = (state: AvatarState): AvatarState => {\n 'use no memo';\n\n const { size, shape, active, activeAppearance, color } = state;\n\n const rootClassName = useRootClassName();\n const imageClassName = useImageClassName();\n const iconInitialsClassName = useIconInitialsClassName();\n const styles = useStyles();\n const sizeStyles = useSizeStyles();\n const colorStyles = useColorStyles();\n const ringColorStyles = useRingColorStyles();\n\n const rootClasses = [rootClassName, size !== 32 && sizeStyles[size]];\n\n if (state.badge) {\n rootClasses.push(styles.badgeAlign, styles[state.badge.size || 'medium']);\n }\n\n if (size <= 24) {\n rootClasses.push(styles.textCaption2Strong);\n } else if (size <= 28) {\n rootClasses.push(styles.textCaption1Strong);\n } else if (size <= 40) {\n // Default text size included in useRootClassName\n } else if (size <= 56) {\n rootClasses.push(styles.textSubtitle2);\n } else if (size <= 96) {\n rootClasses.push(styles.textSubtitle1);\n } else {\n rootClasses.push(styles.textTitle3);\n }\n\n if (shape === 'square') {\n if (size <= 24) {\n rootClasses.push(styles.squareSmall);\n } else if (size <= 48) {\n rootClasses.push(styles.squareMedium);\n } else if (size <= 72) {\n rootClasses.push(styles.squareLarge);\n } else {\n rootClasses.push(styles.squareXLarge);\n }\n }\n\n if (active === 'active' || active === 'inactive') {\n rootClasses.push(styles.activeOrInactive);\n\n if (activeAppearance === 'ring' || activeAppearance === 'ring-shadow') {\n rootClasses.push(styles.ring, ringColorStyles[color]);\n if (state.badge) {\n rootClasses.push(styles.ringBadgeCutout);\n }\n\n if (size <= 48) {\n rootClasses.push(styles.ringThick);\n } else if (size <= 64) {\n rootClasses.push(styles.ringThicker);\n } else {\n rootClasses.push(styles.ringThickest);\n }\n }\n\n if (activeAppearance === 'shadow' || activeAppearance === 'ring-shadow') {\n rootClasses.push(styles.shadow);\n if (size <= 28) {\n rootClasses.push(styles.shadow4);\n } else if (size <= 48) {\n rootClasses.push(styles.shadow8);\n } else if (size <= 64) {\n rootClasses.push(styles.shadow16);\n } else {\n rootClasses.push(styles.shadow28);\n }\n }\n\n // Note: The inactive style overrides some of the activeAppearance styles and must be applied after them\n if (active === 'inactive') {\n rootClasses.push(styles.inactive);\n }\n }\n\n state.root.className = mergeClasses(avatarClassNames.root, ...rootClasses, state.root.className);\n\n if (state.badge) {\n state.badge.className = mergeClasses(avatarClassNames.badge, styles.badge, state.badge.className);\n }\n\n if (state.image) {\n state.image.className = mergeClasses(\n avatarClassNames.image,\n imageClassName,\n colorStyles[color],\n state.badge && styles.badgeCutout,\n state.image.className,\n );\n }\n\n if (state.initials) {\n state.initials.className = mergeClasses(\n avatarClassNames.initials,\n iconInitialsClassName,\n colorStyles[color],\n state.badge && styles.badgeCutout,\n state.initials.className,\n );\n }\n\n if (state.icon) {\n let iconSizeClass;\n if (size <= 16) {\n iconSizeClass = styles.icon12;\n } else if (size <= 24) {\n iconSizeClass = styles.icon16;\n } else if (size <= 40) {\n iconSizeClass = styles.icon20;\n } else if (size <= 48) {\n iconSizeClass = styles.icon24;\n } else if (size <= 56) {\n iconSizeClass = styles.icon28;\n } else if (size <= 72) {\n iconSizeClass = styles.icon32;\n } else {\n iconSizeClass = styles.icon48;\n }\n\n state.icon.className = mergeClasses(\n avatarClassNames.icon,\n iconInitialsClassName,\n iconSizeClass,\n colorStyles[color],\n state.badge && styles.badgeCutout,\n state.icon.className,\n );\n }\n\n return state;\n};\n"],"names":["tokens","makeResetStyles","makeStyles","mergeClasses","avatarClassNames","root","image","initials","icon","badge","vars","badgeRadius","badgeGap","badgeAlign","ringWidth","useRootClassName","display","flexShrink","position","verticalAlign","borderRadius","borderRadiusCircular","fontFamily","fontFamilyBase","fontWeight","fontWeightSemibold","fontSize","fontSizeBase300","width","height","top","left","bottom","right","zIndex","margin","transitionProperty","transitionTimingFunction","curveEasyEaseMax","curveLinear","transitionDuration","durationUltraSlow","durationSlower","borderStyle","borderWidth","useImageClassName","objectFit","useIconInitialsClassName","boxSizing","lineHeight","border","strokeWidthThin","colorTransparentStroke","alignItems","justifyContent","textAlign","userSelect","badgeMask","centerOffset","innerRadius","outerRadius","useStyles","textCaption2Strong","fontSizeBase100","textCaption1Strong","fontSizeBase200","textSubtitle2","fontSizeBase400","textSubtitle1","fontSizeBase500","textTitle3","fontSizeBase600","squareSmall","borderRadiusSmall","squareMedium","borderRadiusMedium","squareLarge","borderRadiusLarge","squareXLarge","borderRadiusXLarge","activeOrInactive","transform","durationFaster","ring","content","ringBadgeCutout","maskImage","ringThick","strokeWidthThick","ringThicker","strokeWidthThicker","ringThickest","strokeWidthThickest","shadow","shadow4","boxShadow","shadow8","shadow16","shadow28","inactive","opacity","curveDecelerateMin","badgeCutout","tiny","small","medium","large","icon12","icon16","icon20","icon24","icon28","icon32","icon48","useSizeStyles","useColorStyles","neutral","color","colorNeutralForeground3","backgroundColor","colorNeutralBackground6","brand","colorNeutralForegroundStaticInverted","colorBrandBackgroundStatic","colorPaletteDarkRedForeground2","colorPaletteDarkRedBackground2","cranberry","colorPaletteCranberryForeground2","colorPaletteCranberryBackground2","red","colorPaletteRedForeground2","colorPaletteRedBackground2","pumpkin","colorPalettePumpkinForeground2","colorPalettePumpkinBackground2","peach","colorPalettePeachForeground2","colorPalettePeachBackground2","marigold","colorPaletteMarigoldForeground2","colorPaletteMarigoldBackground2","gold","colorPaletteGoldForeground2","colorPaletteGoldBackground2","brass","colorPaletteBrassForeground2","colorPaletteBrassBackground2","brown","colorPaletteBrownForeground2","colorPaletteBrownBackground2","forest","colorPaletteForestForeground2","colorPaletteForestBackground2","seafoam","colorPaletteSeafoamForeground2","colorPaletteSeafoamBackground2","colorPaletteDarkGreenForeground2","colorPaletteDarkGreenBackground2","colorPaletteLightTealForeground2","colorPaletteLightTealBackground2","teal","colorPaletteTealForeground2","colorPaletteTealBackground2","steel","colorPaletteSteelForeground2","colorPaletteSteelBackground2","blue","colorPaletteBlueForeground2","colorPaletteBlueBackground2","colorPaletteRoyalBlueForeground2","colorPaletteRoyalBlueBackground2","cornflower","colorPaletteCornflowerForeground2","colorPaletteCornflowerBackground2","navy","colorPaletteNavyForeground2","colorPaletteNavyBackground2","lavender","colorPaletteLavenderForeground2","colorPaletteLavenderBackground2","purple","colorPalettePurpleForeground2","colorPalettePurpleBackground2","grape","colorPaletteGrapeForeground2","colorPaletteGrapeBackground2","lilac","colorPaletteLilacForeground2","colorPaletteLilacBackground2","pink","colorPalettePinkForeground2","colorPalettePinkBackground2","magenta","colorPaletteMagentaForeground2","colorPaletteMagentaBackground2","plum","colorPalettePlumForeground2","colorPalettePlumBackground2","beige","colorPaletteBeigeForeground2","colorPaletteBeigeBackground2","mink","colorPaletteMinkForeground2","colorPaletteMinkBackground2","platinum","colorPalettePlatinumForeground2","colorPalettePlatinumBackground2","anchor","colorPaletteAnchorForeground2","colorPaletteAnchorBackground2","useRingColorStyles","colorBrandStroke1","colorPaletteDarkRedBorderActive","colorPaletteCranberryBorderActive","colorPaletteRedBorderActive","colorPalettePumpkinBorderActive","colorPalettePeachBorderActive","colorPaletteMarigoldBorderActive","colorPaletteGoldBorderActive","colorPaletteBrassBorderActive","colorPaletteBrownBorderActive","colorPaletteForestBorderActive","colorPaletteSeafoamBorderActive","colorPaletteDarkGreenBorderActive","colorPaletteLightTealBorderActive","colorPaletteTealBorderActive","colorPaletteSteelBorderActive","colorPaletteBlueBorderActive","colorPaletteRoyalBlueBorderActive","colorPaletteCornflowerBorderActive","colorPaletteNavyBorderActive","colorPaletteLavenderBorderActive","colorPalettePurpleBorderActive","colorPaletteGrapeBorderActive","colorPaletteLilacBorderActive","colorPalettePinkBorderActive","colorPaletteMagentaBorderActive","colorPalettePlumBorderActive","colorPaletteBeigeBorderActive","colorPaletteMinkBorderActive","colorPalettePlatinumBorderActive","colorPaletteAnchorBorderActive","useAvatarStyles_unstable","state","size","shape","active","activeAppearance","rootClassName","imageClassName","iconInitialsClassName","styles","sizeStyles","colorStyles","ringColorStyles","rootClasses","push","className","iconSizeClass"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AI;YACrBc,gBAAgBP,OAAO3I,MAAM;QAC/B,OAAO;YACLkJ,gBAAgBP,OAAO1I,MAAM;QAC/B;QAEAkI,MAAM3O,IAAI,CAACyP,SAAS,GAAG9P,aACrBC,iBAAiBI,IAAI,EACrBkP,uBACAQ,eACAL,WAAW,CAACxI,MAAM,EAClB8H,MAAM1O,KAAK,IAAIkP,OAAOrJ,WAAW,EACjC6I,MAAM3O,IAAI,CAACyP,SAAS;IAExB;IAEA,OAAOd;AACT,EAAE"}
@@ -0,0 +1,31 @@
1
+ import { makeStyles, mergeClasses } from '@griffel/react';
2
+ import { tokens } from '@fluentui/react-theme';
3
+ import { useSizeStyles } from '../Avatar/useAvatarStyles.styles';
4
+ export const avatarGroupClassNames = {
5
+ root: 'fui-AvatarGroup'
6
+ };
7
+ /**
8
+ * Styles for the root slot.
9
+ */ const useStyles = makeStyles({
10
+ base: {
11
+ display: 'inline-flex',
12
+ position: 'relative'
13
+ },
14
+ pie: {
15
+ clipPath: 'circle(50%)',
16
+ backgroundColor: tokens.colorTransparentStroke,
17
+ '@media (forced-colors: active)': {
18
+ backgroundColor: 'CanvasText'
19
+ }
20
+ }
21
+ });
22
+ /**
23
+ * Apply styling to the AvatarGroup slots based on the state
24
+ */ export const useAvatarGroupStyles_unstable = (state)=>{
25
+ 'use no memo';
26
+ const { layout, size } = state;
27
+ const styles = useStyles();
28
+ const sizeStyles = useSizeStyles();
29
+ state.root.className = mergeClasses(avatarGroupClassNames.root, styles.base, layout === 'pie' && sizeStyles[size], layout === 'pie' && styles.pie, state.root.className);
30
+ return state;
31
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/AvatarGroup/useAvatarGroupStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens } from '@fluentui/react-theme';\nimport { useSizeStyles } from '../Avatar/useAvatarStyles.styles';\nimport type { AvatarGroupSlots, AvatarGroupState } from './AvatarGroup.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const avatarGroupClassNames: SlotClassNames<AvatarGroupSlots> = {\n root: 'fui-AvatarGroup',\n};\n\n/**\n * Styles for the root slot.\n */\nconst useStyles = makeStyles({\n base: {\n display: 'inline-flex',\n position: 'relative',\n },\n pie: {\n clipPath: 'circle(50%)',\n backgroundColor: tokens.colorTransparentStroke,\n '@media (forced-colors: active)': {\n backgroundColor: 'CanvasText',\n },\n },\n});\n\n/**\n * Apply styling to the AvatarGroup slots based on the state\n */\nexport const useAvatarGroupStyles_unstable = (state: AvatarGroupState): AvatarGroupState => {\n 'use no memo';\n\n const { layout, size } = state;\n const styles = useStyles();\n const sizeStyles = useSizeStyles();\n\n state.root.className = mergeClasses(\n avatarGroupClassNames.root,\n styles.base,\n layout === 'pie' && sizeStyles[size],\n layout === 'pie' && styles.pie,\n state.root.className,\n );\n\n return state;\n};\n"],"names":["makeStyles","mergeClasses","tokens","useSizeStyles","avatarGroupClassNames","root","useStyles","base","display","position","pie","clipPath","backgroundColor","colorTransparentStroke","useAvatarGroupStyles_unstable","state","layout","size","styles","sizeStyles","className"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAC1D,SAASC,MAAM,QAAQ,wBAAwB;AAC/C,SAASC,aAAa,QAAQ,mCAAmC;AAIjE,OAAO,MAAMC,wBAA0D;IACrEC,MAAM;AACR,EAAE;AAEF;;CAEC,GACD,MAAMC,YAAYN,WAAW;IAC3BO,MAAM;QACJC,SAAS;QACTC,UAAU;IACZ;IACAC,KAAK;QACHC,UAAU;QACVC,iBAAiBV,OAAOW,sBAAsB;QAC9C,kCAAkC;YAChCD,iBAAiB;QACnB;IACF;AACF;AAEA;;CAEC,GACD,OAAO,MAAME,gCAAgC,CAACC;IAC5C;IAEA,MAAM,EAAEC,MAAM,EAAEC,IAAI,EAAE,GAAGF;IACzB,MAAMG,SAASZ;IACf,MAAMa,aAAahB;IAEnBY,MAAMV,IAAI,CAACe,SAAS,GAAGnB,aACrBG,sBAAsBC,IAAI,EAC1Ba,OAAOX,IAAI,EACXS,WAAW,SAASG,UAAU,CAACF,KAAK,EACpCD,WAAW,SAASE,OAAOR,GAAG,EAC9BK,MAAMV,IAAI,CAACe,SAAS;IAGtB,OAAOL;AACT,EAAE"}
@@ -0,0 +1,266 @@
1
+ import { makeStyles, mergeClasses } from '@griffel/react';
2
+ import { tokens, typographyStyles } from '@fluentui/react-theme';
3
+ import { useSizeStyles } from '../../Avatar';
4
+ import { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';
5
+ export const avatarGroupItemClassNames = {
6
+ root: 'fui-AvatarGroupItem',
7
+ avatar: 'fui-AvatarGroupItem__avatar',
8
+ overflowLabel: 'fui-AvatarGroupItem__overflowLabel'
9
+ };
10
+ const avatarGroupItemDividerWidthVar = '--fuiAvatarGroupItem__divider--width';
11
+ /**
12
+ * Styles for the root slot
13
+ */ const useRootStyles = makeStyles({
14
+ base: {
15
+ alignItems: 'center',
16
+ display: 'inline-flex',
17
+ flexShrink: 0,
18
+ position: 'relative'
19
+ },
20
+ overflowItem: {
21
+ padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS}`
22
+ },
23
+ nonOverflowItem: {
24
+ borderRadius: tokens.borderRadiusCircular
25
+ }
26
+ });
27
+ /**
28
+ * Styles for the avatar slot
29
+ */ const useAvatarStyles = makeStyles({
30
+ nonOverflowItem: {
31
+ position: 'absolute'
32
+ },
33
+ pie: {
34
+ borderRadius: '0'
35
+ }
36
+ });
37
+ /**
38
+ * Styles for the label slot
39
+ */ const useOverflowLabelStyles = makeStyles({
40
+ base: {
41
+ marginLeft: tokens.spacingHorizontalS,
42
+ color: tokens.colorNeutralForeground1,
43
+ ...typographyStyles.body1
44
+ }
45
+ });
46
+ /**
47
+ * Styles for the stack layout
48
+ */ const useStackStyles = makeStyles({
49
+ thick: {
50
+ boxShadow: `0 0 0 ${tokens.strokeWidthThick} ${tokens.colorNeutralBackground2}`
51
+ },
52
+ thicker: {
53
+ boxShadow: `0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorNeutralBackground2}`
54
+ },
55
+ thickest: {
56
+ boxShadow: `0 0 0 ${tokens.strokeWidthThickest} ${tokens.colorNeutralBackground2}`
57
+ },
58
+ xxs: {
59
+ '&:not(:first-child)': {
60
+ marginLeft: `calc(-1 * ${tokens.spacingHorizontalXXS})`
61
+ }
62
+ },
63
+ xs: {
64
+ '&:not(:first-child)': {
65
+ marginLeft: `calc(-1 * ${tokens.spacingHorizontalXS})`
66
+ }
67
+ },
68
+ s: {
69
+ '&:not(:first-child)': {
70
+ marginLeft: `calc(-1 * ${tokens.spacingHorizontalS})`
71
+ }
72
+ },
73
+ l: {
74
+ '&:not(:first-child)': {
75
+ marginLeft: `calc(-1 * ${tokens.spacingHorizontalL})`
76
+ }
77
+ }
78
+ });
79
+ /**
80
+ * Styles for the spread layout
81
+ */ const useSpreadStyles = makeStyles({
82
+ s: {
83
+ '&:not(:first-child)': {
84
+ marginLeft: tokens.spacingHorizontalS
85
+ }
86
+ },
87
+ mNudge: {
88
+ '&:not(:first-child)': {
89
+ marginLeft: tokens.spacingHorizontalMNudge
90
+ }
91
+ },
92
+ m: {
93
+ '&:not(:first-child)': {
94
+ marginLeft: tokens.spacingHorizontalM
95
+ }
96
+ },
97
+ l: {
98
+ '&:not(:first-child)': {
99
+ marginLeft: tokens.spacingHorizontalL
100
+ }
101
+ },
102
+ xl: {
103
+ '&:not(:first-child)': {
104
+ marginLeft: tokens.spacingHorizontalXL
105
+ }
106
+ }
107
+ });
108
+ /**
109
+ * Styles for the pie layout
110
+ */ const usePieStyles = makeStyles({
111
+ base: {
112
+ position: 'absolute'
113
+ },
114
+ slices: {
115
+ // Two slices
116
+ // 1st of 2 items
117
+ '&:nth-of-type(1):nth-last-of-type(2)': {
118
+ clipPath: `inset(0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)) 0 25%)`,
119
+ left: '-25%'
120
+ },
121
+ // 2nd of 2 items
122
+ '&:nth-of-type(2):nth-last-of-type(1)': {
123
+ clipPath: `inset(0 25% 0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)))`,
124
+ left: '25%'
125
+ },
126
+ // Three slices
127
+ // 1st of 3 items
128
+ '&:nth-of-type(1):nth-last-of-type(3)': {
129
+ clipPath: `inset(0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)) 0 25%)`,
130
+ left: '-25%'
131
+ },
132
+ // 2nd of 3 items
133
+ '&:nth-of-type(2):nth-last-of-type(2)': {
134
+ // Since the two AvatarGroupItems on the right are scaled by 0.5, the divider width should not be halved.
135
+ clipPath: `inset(0 0 var(${avatarGroupItemDividerWidthVar}) var(${avatarGroupItemDividerWidthVar}))`,
136
+ left: '50%',
137
+ transform: 'scale(0.5)',
138
+ transformOrigin: '0 0'
139
+ },
140
+ // 3rd of 3 items
141
+ '&:nth-of-type(3):nth-last-of-type(1)': {
142
+ clipPath: `inset(var(${avatarGroupItemDividerWidthVar}) 0 0 var(${avatarGroupItemDividerWidthVar}))`,
143
+ left: '50%',
144
+ top: '50%',
145
+ transform: 'scale(0.5)',
146
+ transformOrigin: '0 0'
147
+ }
148
+ },
149
+ rtlSlices: {
150
+ // Two slices
151
+ // 1st of 2 items
152
+ '&:nth-of-type(1):nth-last-of-type(2)': {
153
+ clipPath: `inset(0 25% 0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)))`
154
+ },
155
+ // 2nd of 2 items
156
+ '&:nth-of-type(2):nth-last-of-type(1)': {
157
+ clipPath: `inset(0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)) 0 25%)`
158
+ },
159
+ // Three slices
160
+ // 1st of 3 items
161
+ '&:nth-of-type(1):nth-last-of-type(3)': {
162
+ clipPath: `inset(0 25% 0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)))`
163
+ },
164
+ // 2nd of 3 items
165
+ '&:nth-of-type(2):nth-last-of-type(2)': {
166
+ clipPath: `inset(0 var(${avatarGroupItemDividerWidthVar}) var(${avatarGroupItemDividerWidthVar}) 0)`,
167
+ left: '0'
168
+ },
169
+ // 3rd of 3 items
170
+ '&:nth-of-type(3):nth-last-of-type(1)': {
171
+ clipPath: `inset(var(${avatarGroupItemDividerWidthVar}) var(${avatarGroupItemDividerWidthVar}) 0 0)`,
172
+ left: '0'
173
+ }
174
+ },
175
+ thick: {
176
+ [avatarGroupItemDividerWidthVar]: tokens.strokeWidthThick
177
+ },
178
+ thicker: {
179
+ [avatarGroupItemDividerWidthVar]: tokens.strokeWidthThicker
180
+ },
181
+ thickest: {
182
+ [avatarGroupItemDividerWidthVar]: tokens.strokeWidthThickest
183
+ }
184
+ });
185
+ /**
186
+ * Apply styling to the AvatarGroupItem slots based on the state
187
+ */ export const useAvatarGroupItemStyles_unstable = (state)=>{
188
+ 'use no memo';
189
+ const { isOverflowItem, layout, size } = state;
190
+ const { dir } = useFluent();
191
+ const avatarStyles = useAvatarStyles();
192
+ const overflowLabelStyles = useOverflowLabelStyles();
193
+ const pieStyles = usePieStyles();
194
+ const rootStyles = useRootStyles();
195
+ const sizeStyles = useSizeStyles();
196
+ const groupChildClassName = useGroupChildClassName(layout, size);
197
+ const rootClasses = [
198
+ rootStyles.base
199
+ ];
200
+ if (!isOverflowItem) {
201
+ rootClasses.push(rootStyles.nonOverflowItem);
202
+ rootClasses.push(groupChildClassName);
203
+ rootClasses.push(sizeStyles[size]);
204
+ if (layout === 'pie') {
205
+ rootClasses.push(pieStyles.base);
206
+ if (size < 56) {
207
+ rootClasses.push(pieStyles.thick);
208
+ } else if (size < 72) {
209
+ rootClasses.push(pieStyles.thicker);
210
+ } else {
211
+ rootClasses.push(pieStyles.thickest);
212
+ }
213
+ rootClasses.push(pieStyles.slices);
214
+ if (dir === 'rtl') {
215
+ rootClasses.push(pieStyles.rtlSlices);
216
+ }
217
+ }
218
+ } else {
219
+ rootClasses.push(rootStyles.overflowItem);
220
+ }
221
+ state.root.className = mergeClasses(avatarGroupItemClassNames.root, ...rootClasses, state.root.className);
222
+ state.avatar.className = mergeClasses(avatarGroupItemClassNames.avatar, !isOverflowItem && avatarStyles.nonOverflowItem, layout === 'pie' && avatarStyles.pie, state.avatar.className);
223
+ if (state.overflowLabel) {
224
+ state.overflowLabel.className = mergeClasses(avatarGroupItemClassNames.overflowLabel, overflowLabelStyles.base, state.overflowLabel.className);
225
+ }
226
+ return state;
227
+ };
228
+ /**
229
+ * Hook for getting the className for the children of AvatarGroup. This hook will provide the spacing and outlines
230
+ * needed for each layout.
231
+ */ export const useGroupChildClassName = (layout, size)=>{
232
+ const stackStyles = useStackStyles();
233
+ const spreadStyles = useSpreadStyles();
234
+ const layoutClasses = [];
235
+ if (size) {
236
+ if (layout === 'stack') {
237
+ if (size < 56) {
238
+ layoutClasses.push(stackStyles.thick);
239
+ } else if (size < 72) {
240
+ layoutClasses.push(stackStyles.thicker);
241
+ } else {
242
+ layoutClasses.push(stackStyles.thickest);
243
+ }
244
+ if (size < 24) {
245
+ layoutClasses.push(stackStyles.xxs);
246
+ } else if (size < 48) {
247
+ layoutClasses.push(stackStyles.xs);
248
+ } else if (size < 96) {
249
+ layoutClasses.push(stackStyles.s);
250
+ } else {
251
+ layoutClasses.push(stackStyles.l);
252
+ }
253
+ } else if (layout === 'spread') {
254
+ if (size < 20) {
255
+ layoutClasses.push(spreadStyles.s);
256
+ } else if (size < 32) {
257
+ layoutClasses.push(spreadStyles.mNudge);
258
+ } else if (size < 64) {
259
+ layoutClasses.push(spreadStyles.l);
260
+ } else {
261
+ layoutClasses.push(spreadStyles.xl);
262
+ }
263
+ }
264
+ }
265
+ return mergeClasses(...layoutClasses);
266
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/AvatarGroupItem/useAvatarGroupItemStyles.styles.ts"],"sourcesContent":["import { makeStyles, mergeClasses } from '@griffel/react';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { useSizeStyles } from '../../Avatar';\nimport { useFluent_unstable as useFluent } from '@fluentui/react-shared-contexts';\nimport type { AvatarGroupItemSlots, AvatarGroupItemState } from './AvatarGroupItem.types';\nimport type { AvatarGroupProps } from '../../AvatarGroup';\nimport type { AvatarSize } from '../../Avatar';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\n\nexport const avatarGroupItemClassNames: SlotClassNames<AvatarGroupItemSlots> = {\n root: 'fui-AvatarGroupItem',\n avatar: 'fui-AvatarGroupItem__avatar',\n overflowLabel: 'fui-AvatarGroupItem__overflowLabel',\n};\n\nconst avatarGroupItemDividerWidthVar = '--fuiAvatarGroupItem__divider--width';\n\n/**\n * Styles for the root slot\n */\nconst useRootStyles = makeStyles({\n base: {\n alignItems: 'center',\n display: 'inline-flex',\n flexShrink: 0,\n position: 'relative',\n },\n overflowItem: { padding: `${tokens.spacingVerticalXS} ${tokens.spacingHorizontalXS}` },\n nonOverflowItem: { borderRadius: tokens.borderRadiusCircular },\n});\n\n/**\n * Styles for the avatar slot\n */\nconst useAvatarStyles = makeStyles({\n nonOverflowItem: {\n position: 'absolute',\n },\n pie: { borderRadius: '0' },\n});\n\n/**\n * Styles for the label slot\n */\nconst useOverflowLabelStyles = makeStyles({\n base: {\n marginLeft: tokens.spacingHorizontalS,\n color: tokens.colorNeutralForeground1,\n ...typographyStyles.body1,\n },\n});\n\n/**\n * Styles for the stack layout\n */\nconst useStackStyles = makeStyles({\n thick: {\n boxShadow: `0 0 0 ${tokens.strokeWidthThick} ${tokens.colorNeutralBackground2}`,\n },\n thicker: {\n boxShadow: `0 0 0 ${tokens.strokeWidthThicker} ${tokens.colorNeutralBackground2}`,\n },\n thickest: {\n boxShadow: `0 0 0 ${tokens.strokeWidthThickest} ${tokens.colorNeutralBackground2}`,\n },\n xxs: { '&:not(:first-child)': { marginLeft: `calc(-1 * ${tokens.spacingHorizontalXXS})` } },\n xs: { '&:not(:first-child)': { marginLeft: `calc(-1 * ${tokens.spacingHorizontalXS})` } },\n s: { '&:not(:first-child)': { marginLeft: `calc(-1 * ${tokens.spacingHorizontalS})` } },\n l: { '&:not(:first-child)': { marginLeft: `calc(-1 * ${tokens.spacingHorizontalL})` } },\n});\n\n/**\n * Styles for the spread layout\n */\nconst useSpreadStyles = makeStyles({\n s: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalS } },\n mNudge: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalMNudge } },\n m: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalM } },\n l: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalL } },\n xl: { '&:not(:first-child)': { marginLeft: tokens.spacingHorizontalXL } },\n});\n\n/**\n * Styles for the pie layout\n */\nconst usePieStyles = makeStyles({\n base: {\n position: 'absolute',\n },\n slices: {\n // Two slices\n // 1st of 2 items\n '&:nth-of-type(1):nth-last-of-type(2)': {\n clipPath: `inset(0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)) 0 25%)`,\n left: '-25%',\n },\n // 2nd of 2 items\n '&:nth-of-type(2):nth-last-of-type(1)': {\n clipPath: `inset(0 25% 0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)))`,\n left: '25%',\n },\n\n // Three slices\n // 1st of 3 items\n '&:nth-of-type(1):nth-last-of-type(3)': {\n clipPath: `inset(0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)) 0 25%)`,\n left: '-25%',\n },\n // 2nd of 3 items\n '&:nth-of-type(2):nth-last-of-type(2)': {\n // Since the two AvatarGroupItems on the right are scaled by 0.5, the divider width should not be halved.\n clipPath: `inset(0 0 var(${avatarGroupItemDividerWidthVar}) var(${avatarGroupItemDividerWidthVar}))`,\n left: '50%',\n transform: 'scale(0.5)',\n transformOrigin: '0 0',\n },\n // 3rd of 3 items\n '&:nth-of-type(3):nth-last-of-type(1)': {\n clipPath: `inset(var(${avatarGroupItemDividerWidthVar}) 0 0 var(${avatarGroupItemDividerWidthVar}))`,\n left: '50%',\n top: '50%',\n transform: 'scale(0.5)',\n transformOrigin: '0 0',\n },\n },\n rtlSlices: {\n // Two slices\n // 1st of 2 items\n '&:nth-of-type(1):nth-last-of-type(2)': {\n clipPath: `inset(0 25% 0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)))`,\n },\n // 2nd of 2 items\n '&:nth-of-type(2):nth-last-of-type(1)': {\n clipPath: `inset(0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)) 0 25%)`,\n },\n\n // Three slices\n // 1st of 3 items\n '&:nth-of-type(1):nth-last-of-type(3)': {\n clipPath: `inset(0 25% 0 calc(25% + (var(${avatarGroupItemDividerWidthVar}) / 2)))`,\n },\n // 2nd of 3 items\n '&:nth-of-type(2):nth-last-of-type(2)': {\n clipPath: `inset(0 var(${avatarGroupItemDividerWidthVar}) var(${avatarGroupItemDividerWidthVar}) 0)`,\n left: '0',\n },\n // 3rd of 3 items\n '&:nth-of-type(3):nth-last-of-type(1)': {\n clipPath: `inset(var(${avatarGroupItemDividerWidthVar}) var(${avatarGroupItemDividerWidthVar}) 0 0)`,\n left: '0',\n },\n },\n thick: { [avatarGroupItemDividerWidthVar]: tokens.strokeWidthThick },\n thicker: { [avatarGroupItemDividerWidthVar]: tokens.strokeWidthThicker },\n thickest: { [avatarGroupItemDividerWidthVar]: tokens.strokeWidthThickest },\n});\n\n/**\n * Apply styling to the AvatarGroupItem slots based on the state\n */\nexport const useAvatarGroupItemStyles_unstable = (state: AvatarGroupItemState): AvatarGroupItemState => {\n 'use no memo';\n\n const { isOverflowItem, layout, size } = state;\n const { dir } = useFluent();\n\n const avatarStyles = useAvatarStyles();\n const overflowLabelStyles = useOverflowLabelStyles();\n const pieStyles = usePieStyles();\n const rootStyles = useRootStyles();\n const sizeStyles = useSizeStyles();\n\n const groupChildClassName = useGroupChildClassName(layout, size);\n\n const rootClasses = [rootStyles.base];\n\n if (!isOverflowItem) {\n rootClasses.push(rootStyles.nonOverflowItem);\n rootClasses.push(groupChildClassName);\n rootClasses.push(sizeStyles[size]);\n\n if (layout === 'pie') {\n rootClasses.push(pieStyles.base);\n\n if (size < 56) {\n rootClasses.push(pieStyles.thick);\n } else if (size < 72) {\n rootClasses.push(pieStyles.thicker);\n } else {\n rootClasses.push(pieStyles.thickest);\n }\n\n rootClasses.push(pieStyles.slices);\n\n if (dir === 'rtl') {\n rootClasses.push(pieStyles.rtlSlices);\n }\n }\n } else {\n rootClasses.push(rootStyles.overflowItem);\n }\n\n state.root.className = mergeClasses(avatarGroupItemClassNames.root, ...rootClasses, state.root.className);\n\n state.avatar.className = mergeClasses(\n avatarGroupItemClassNames.avatar,\n !isOverflowItem && avatarStyles.nonOverflowItem,\n layout === 'pie' && avatarStyles.pie,\n state.avatar.className,\n );\n\n if (state.overflowLabel) {\n state.overflowLabel.className = mergeClasses(\n avatarGroupItemClassNames.overflowLabel,\n overflowLabelStyles.base,\n state.overflowLabel.className,\n );\n }\n\n return state;\n};\n\n/**\n * Hook for getting the className for the children of AvatarGroup. This hook will provide the spacing and outlines\n * needed for each layout.\n */\nexport const useGroupChildClassName = (layout: AvatarGroupProps['layout'], size: AvatarSize): string => {\n const stackStyles = useStackStyles();\n const spreadStyles = useSpreadStyles();\n const layoutClasses = [];\n\n if (size) {\n if (layout === 'stack') {\n if (size < 56) {\n layoutClasses.push(stackStyles.thick);\n } else if (size < 72) {\n layoutClasses.push(stackStyles.thicker);\n } else {\n layoutClasses.push(stackStyles.thickest);\n }\n\n if (size < 24) {\n layoutClasses.push(stackStyles.xxs);\n } else if (size < 48) {\n layoutClasses.push(stackStyles.xs);\n } else if (size < 96) {\n layoutClasses.push(stackStyles.s);\n } else {\n layoutClasses.push(stackStyles.l);\n }\n } else if (layout === 'spread') {\n if (size < 20) {\n layoutClasses.push(spreadStyles.s);\n } else if (size < 32) {\n layoutClasses.push(spreadStyles.mNudge);\n } else if (size < 64) {\n layoutClasses.push(spreadStyles.l);\n } else {\n layoutClasses.push(spreadStyles.xl);\n }\n }\n }\n\n return mergeClasses(...layoutClasses);\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","useSizeStyles","useFluent_unstable","useFluent","avatarGroupItemClassNames","root","avatar","overflowLabel","avatarGroupItemDividerWidthVar","useRootStyles","base","alignItems","display","flexShrink","position","overflowItem","padding","spacingVerticalXS","spacingHorizontalXS","nonOverflowItem","borderRadius","borderRadiusCircular","useAvatarStyles","pie","useOverflowLabelStyles","marginLeft","spacingHorizontalS","color","colorNeutralForeground1","body1","useStackStyles","thick","boxShadow","strokeWidthThick","colorNeutralBackground2","thicker","strokeWidthThicker","thickest","strokeWidthThickest","xxs","spacingHorizontalXXS","xs","s","l","spacingHorizontalL","useSpreadStyles","mNudge","spacingHorizontalMNudge","m","spacingHorizontalM","xl","spacingHorizontalXL","usePieStyles","slices","clipPath","left","transform","transformOrigin","top","rtlSlices","useAvatarGroupItemStyles_unstable","state","isOverflowItem","layout","size","dir","avatarStyles","overflowLabelStyles","pieStyles","rootStyles","sizeStyles","groupChildClassName","useGroupChildClassName","rootClasses","push","className","stackStyles","spreadStyles","layoutClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,UAAU,EAAEC,YAAY,QAAQ,iBAAiB;AAC1D,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AACjE,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,sBAAsBC,SAAS,QAAQ,kCAAkC;AAMlF,OAAO,MAAMC,4BAAkE;IAC7EC,MAAM;IACNC,QAAQ;IACRC,eAAe;AACjB,EAAE;AAE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AId,MAAM;QACR,IAAID,WAAW,SAAS;YACtB,IAAIC,OAAO,IAAI;gBACbc,cAAcJ,IAAI,CAACE,YAAY7C,KAAK;YACtC,OAAO,IAAIiC,OAAO,IAAI;gBACpBc,cAAcJ,IAAI,CAACE,YAAYzC,OAAO;YACxC,OAAO;gBACL2C,cAAcJ,IAAI,CAACE,YAAYvC,QAAQ;YACzC;YAEA,IAAI2B,OAAO,IAAI;gBACbc,cAAcJ,IAAI,CAACE,YAAYrC,GAAG;YACpC,OAAO,IAAIyB,OAAO,IAAI;gBACpBc,cAAcJ,IAAI,CAACE,YAAYnC,EAAE;YACnC,OAAO,IAAIuB,OAAO,IAAI;gBACpBc,cAAcJ,IAAI,CAACE,YAAYlC,CAAC;YAClC,OAAO;gBACLoC,cAAcJ,IAAI,CAACE,YAAYjC,CAAC;YAClC;QACF,OAAO,IAAIoB,WAAW,UAAU;YAC9B,IAAIC,OAAO,IAAI;gBACbc,cAAcJ,IAAI,CAACG,aAAanC,CAAC;YACnC,OAAO,IAAIsB,OAAO,IAAI;gBACpBc,cAAcJ,IAAI,CAACG,aAAa/B,MAAM;YACxC,OAAO,IAAIkB,OAAO,IAAI;gBACpBc,cAAcJ,IAAI,CAACG,aAAalC,CAAC;YACnC,OAAO;gBACLmC,cAAcJ,IAAI,CAACG,aAAa3B,EAAE;YACpC;QACF;IACF;IAEA,OAAOpD,gBAAgBgF;AACzB,EAAE"}
@@ -0,0 +1,188 @@
1
+ import { createCustomFocusIndicatorStyle } from '@fluentui/react-tabster';
2
+ import { makeStyles, mergeClasses, shorthands } from '@griffel/react';
3
+ import { tokens, typographyStyles } from '@fluentui/react-theme';
4
+ import { useGroupChildClassName } from '../AvatarGroupItem/useAvatarGroupItemStyles.styles';
5
+ import { useSizeStyles } from '../Avatar/useAvatarStyles.styles';
6
+ export const avatarGroupPopoverClassNames = {
7
+ root: 'fui-AvatarGroupPopover',
8
+ content: 'fui-AvatarGroupPopover__content',
9
+ popoverSurface: 'fui-AvatarGroupPopover__popoverSurface',
10
+ tooltip: 'fui-AvatarGroupPopover__tooltip',
11
+ triggerButton: 'fui-AvatarGroupPopover__triggerButton'
12
+ };
13
+ /**
14
+ * Styles for the content slot.
15
+ */ const useContentStyles = makeStyles({
16
+ base: {
17
+ listStyleType: 'none',
18
+ margin: '0',
19
+ padding: '0',
20
+ display: 'flex',
21
+ flexDirection: 'column'
22
+ }
23
+ });
24
+ /**
25
+ * Styles for the popoverSurface slot.
26
+ */ const usePopoverSurfaceStyles = makeStyles({
27
+ base: {
28
+ maxHeight: '220px',
29
+ minHeight: '80px',
30
+ overflow: 'hidden scroll',
31
+ padding: `${tokens.spacingVerticalS} ${tokens.spacingHorizontalS}`,
32
+ width: '220px'
33
+ }
34
+ });
35
+ /**
36
+ * Styles for the triggerButton slot.
37
+ */ const useTriggerButtonStyles = makeStyles({
38
+ base: {
39
+ display: 'inline-flex',
40
+ position: 'relative',
41
+ flexShrink: 0,
42
+ justifyContent: 'center',
43
+ alignItems: 'center',
44
+ color: tokens.colorNeutralForeground1,
45
+ backgroundColor: tokens.colorNeutralBackground1,
46
+ ...shorthands.borderColor(tokens.colorNeutralStroke1),
47
+ borderRadius: tokens.borderRadiusCircular,
48
+ ...shorthands.borderStyle('solid'),
49
+ padding: '0',
50
+ // Match color to Avatar's outline color.
51
+ '@media (forced-colors: active)': {
52
+ ...shorthands.borderColor('CanvasText')
53
+ }
54
+ },
55
+ pie: {
56
+ backgroundColor: tokens.colorTransparentBackground,
57
+ ...shorthands.borderColor(tokens.colorTransparentStroke),
58
+ color: 'transparent'
59
+ },
60
+ focusIndicator: createCustomFocusIndicatorStyle({
61
+ border: `${tokens.strokeWidthThick} solid ${tokens.colorStrokeFocus2}`,
62
+ outlineStyle: 'none'
63
+ }),
64
+ states: {
65
+ '&:hover': {
66
+ color: tokens.colorNeutralForeground1Hover,
67
+ backgroundColor: tokens.colorNeutralBackground1Hover,
68
+ ...shorthands.borderColor(tokens.colorNeutralStroke1Hover)
69
+ },
70
+ '&:active': {
71
+ color: tokens.colorNeutralForeground1Pressed,
72
+ backgroundColor: tokens.colorNeutralBackground1Pressed,
73
+ ...shorthands.borderColor(tokens.colorNeutralStroke1Pressed)
74
+ }
75
+ },
76
+ selected: {
77
+ color: tokens.colorNeutralForeground1Selected,
78
+ backgroundColor: tokens.colorNeutralBackground1Selected,
79
+ ...shorthands.borderColor(tokens.colorNeutralStroke1Selected)
80
+ },
81
+ icon12: {
82
+ fontSize: '12px'
83
+ },
84
+ icon16: {
85
+ fontSize: '16px'
86
+ },
87
+ icon20: {
88
+ fontSize: '20px'
89
+ },
90
+ icon24: {
91
+ fontSize: '24px'
92
+ },
93
+ icon28: {
94
+ fontSize: '28px'
95
+ },
96
+ icon32: {
97
+ fontSize: '32px'
98
+ },
99
+ icon48: {
100
+ fontSize: '48px'
101
+ },
102
+ caption2Strong: {
103
+ ...typographyStyles.caption2Strong
104
+ },
105
+ caption1Strong: {
106
+ ...typographyStyles.caption1Strong
107
+ },
108
+ body1Strong: {
109
+ ...typographyStyles.body1Strong
110
+ },
111
+ subtitle2: {
112
+ ...typographyStyles.subtitle2
113
+ },
114
+ subtitle1: {
115
+ ...typographyStyles.subtitle1
116
+ },
117
+ title3: {
118
+ ...typographyStyles.title3
119
+ },
120
+ borderThin: {
121
+ ...shorthands.borderWidth(tokens.strokeWidthThin)
122
+ },
123
+ borderThick: {
124
+ ...shorthands.borderWidth(tokens.strokeWidthThick)
125
+ },
126
+ borderThicker: {
127
+ ...shorthands.borderWidth(tokens.strokeWidthThicker)
128
+ },
129
+ borderThickest: {
130
+ ...shorthands.borderWidth(tokens.strokeWidthThickest)
131
+ }
132
+ });
133
+ /**
134
+ * Apply styling to the AvatarGroupPopover slots based on the state
135
+ */ export const useAvatarGroupPopoverStyles_unstable = (state)=>{
136
+ 'use no memo';
137
+ const { indicator, size, layout, popoverOpen } = state;
138
+ const sizeStyles = useSizeStyles();
139
+ const triggerButtonStyles = useTriggerButtonStyles();
140
+ const contentStyles = useContentStyles();
141
+ const popoverSurfaceStyles = usePopoverSurfaceStyles();
142
+ const groupChildClassName = useGroupChildClassName(layout, size);
143
+ const triggerButtonClasses = [];
144
+ if (size < 36) {
145
+ triggerButtonClasses.push(triggerButtonStyles.borderThin);
146
+ } else if (size < 56) {
147
+ triggerButtonClasses.push(triggerButtonStyles.borderThick);
148
+ } else if (size < 72) {
149
+ triggerButtonClasses.push(triggerButtonStyles.borderThicker);
150
+ } else {
151
+ triggerButtonClasses.push(triggerButtonStyles.borderThickest);
152
+ }
153
+ if (indicator === 'count') {
154
+ if (size <= 24) {
155
+ triggerButtonClasses.push(triggerButtonStyles.caption2Strong);
156
+ } else if (size <= 28) {
157
+ triggerButtonClasses.push(triggerButtonStyles.caption1Strong);
158
+ } else if (size <= 40) {
159
+ triggerButtonClasses.push(triggerButtonStyles.body1Strong);
160
+ } else if (size <= 56) {
161
+ triggerButtonClasses.push(triggerButtonStyles.subtitle2);
162
+ } else if (size <= 96) {
163
+ triggerButtonClasses.push(triggerButtonStyles.subtitle1);
164
+ } else {
165
+ triggerButtonClasses.push(triggerButtonStyles.title3);
166
+ }
167
+ } else {
168
+ if (size <= 16) {
169
+ triggerButtonClasses.push(triggerButtonStyles.icon12);
170
+ } else if (size <= 24) {
171
+ triggerButtonClasses.push(triggerButtonStyles.icon16);
172
+ } else if (size <= 40) {
173
+ triggerButtonClasses.push(triggerButtonStyles.icon20);
174
+ } else if (size <= 48) {
175
+ triggerButtonClasses.push(triggerButtonStyles.icon24);
176
+ } else if (size <= 56) {
177
+ triggerButtonClasses.push(triggerButtonStyles.icon28);
178
+ } else if (size <= 72) {
179
+ triggerButtonClasses.push(triggerButtonStyles.icon32);
180
+ } else {
181
+ triggerButtonClasses.push(triggerButtonStyles.icon48);
182
+ }
183
+ }
184
+ state.triggerButton.className = mergeClasses(avatarGroupPopoverClassNames.triggerButton, groupChildClassName, sizeStyles[size], triggerButtonStyles.base, layout === 'pie' && triggerButtonStyles.pie, triggerButtonStyles.focusIndicator, layout !== 'pie' && triggerButtonStyles.states, layout !== 'pie' && popoverOpen && triggerButtonStyles.selected, ...triggerButtonClasses, state.triggerButton.className);
185
+ state.content.className = mergeClasses(avatarGroupPopoverClassNames.content, contentStyles.base, state.content.className);
186
+ state.popoverSurface.className = mergeClasses(avatarGroupPopoverClassNames.popoverSurface, popoverSurfaceStyles.base, state.popoverSurface.className);
187
+ return state;
188
+ };