@fluentui/react-avatar 9.2.10 → 9.2.12

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 (115) hide show
  1. package/CHANGELOG.json +125 -1
  2. package/CHANGELOG.md +32 -2
  3. package/lib/components/Avatar/Avatar.js.map +1 -1
  4. package/lib/components/Avatar/renderAvatar.js +10 -5
  5. package/lib/components/Avatar/renderAvatar.js.map +1 -1
  6. package/lib/components/Avatar/useAvatar.js +17 -32
  7. package/lib/components/Avatar/useAvatar.js.map +1 -1
  8. package/lib/components/Avatar/useAvatarStyles.js +405 -424
  9. package/lib/components/Avatar/useAvatarStyles.js.map +1 -1
  10. package/lib/components/AvatarGroup/AvatarGroup.js +0 -1
  11. package/lib/components/AvatarGroup/AvatarGroup.js.map +1 -1
  12. package/lib/components/AvatarGroup/renderAvatarGroup.js +2 -2
  13. package/lib/components/AvatarGroup/renderAvatarGroup.js.map +1 -1
  14. package/lib/components/AvatarGroup/useAvatarGroup.js +0 -1
  15. package/lib/components/AvatarGroup/useAvatarGroup.js.map +1 -1
  16. package/lib/components/AvatarGroup/useAvatarGroupContextValues.js.map +1 -1
  17. package/lib/components/AvatarGroup/useAvatarGroupStyles.js +10 -13
  18. package/lib/components/AvatarGroup/useAvatarGroupStyles.js.map +1 -1
  19. package/lib/components/AvatarGroupItem/AvatarGroupItem.js +0 -1
  20. package/lib/components/AvatarGroupItem/AvatarGroupItem.js.map +1 -1
  21. package/lib/components/AvatarGroupItem/renderAvatarGroupItem.js +6 -4
  22. package/lib/components/AvatarGroupItem/renderAvatarGroupItem.js.map +1 -1
  23. package/lib/components/AvatarGroupItem/useAvatarGroupItem.js +2 -5
  24. package/lib/components/AvatarGroupItem/useAvatarGroupItem.js.map +1 -1
  25. package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.js +99 -124
  26. package/lib/components/AvatarGroupItem/useAvatarGroupItemStyles.js.map +1 -1
  27. package/lib/components/AvatarGroupPopover/AvatarGroupPopover.js +0 -1
  28. package/lib/components/AvatarGroupPopover/AvatarGroupPopover.js.map +1 -1
  29. package/lib/components/AvatarGroupPopover/renderAvatarGroupPopover.js +10 -6
  30. package/lib/components/AvatarGroupPopover/renderAvatarGroupPopover.js.map +1 -1
  31. package/lib/components/AvatarGroupPopover/useAvatarGroupPopover.js +0 -7
  32. package/lib/components/AvatarGroupPopover/useAvatarGroupPopover.js.map +1 -1
  33. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverContextValues.js.map +1 -1
  34. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.js +166 -176
  35. package/lib/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.js.map +1 -1
  36. package/lib/contexts/AvatarContext.js +0 -3
  37. package/lib/contexts/AvatarContext.js.map +1 -1
  38. package/lib/contexts/AvatarGroupContext.js +0 -1
  39. package/lib/contexts/AvatarGroupContext.js.map +1 -1
  40. package/lib/index.js.map +1 -1
  41. package/lib/utils/getInitials.js +2 -17
  42. package/lib/utils/getInitials.js.map +1 -1
  43. package/lib/utils/partitionAvatarGroupItems.js +0 -3
  44. package/lib/utils/partitionAvatarGroupItems.js.map +1 -1
  45. package/lib-commonjs/Avatar.js +0 -2
  46. package/lib-commonjs/Avatar.js.map +1 -1
  47. package/lib-commonjs/AvatarGroup.js +0 -2
  48. package/lib-commonjs/AvatarGroup.js.map +1 -1
  49. package/lib-commonjs/AvatarGroupItem.js +0 -2
  50. package/lib-commonjs/AvatarGroupItem.js.map +1 -1
  51. package/lib-commonjs/AvatarGroupPopover.js +0 -2
  52. package/lib-commonjs/AvatarGroupPopover.js.map +1 -1
  53. package/lib-commonjs/components/Avatar/Avatar.js +0 -5
  54. package/lib-commonjs/components/Avatar/Avatar.js.map +1 -1
  55. package/lib-commonjs/components/Avatar/Avatar.types.js.map +1 -1
  56. package/lib-commonjs/components/Avatar/index.js +0 -6
  57. package/lib-commonjs/components/Avatar/index.js.map +1 -1
  58. package/lib-commonjs/components/Avatar/renderAvatar.js +10 -9
  59. package/lib-commonjs/components/Avatar/renderAvatar.js.map +1 -1
  60. package/lib-commonjs/components/Avatar/useAvatar.js +17 -42
  61. package/lib-commonjs/components/Avatar/useAvatar.js.map +1 -1
  62. package/lib-commonjs/components/Avatar/useAvatarStyles.js +405 -428
  63. package/lib-commonjs/components/Avatar/useAvatarStyles.js.map +1 -1
  64. package/lib-commonjs/components/AvatarGroup/AvatarGroup.js +0 -7
  65. package/lib-commonjs/components/AvatarGroup/AvatarGroup.js.map +1 -1
  66. package/lib-commonjs/components/AvatarGroup/AvatarGroup.types.js.map +1 -1
  67. package/lib-commonjs/components/AvatarGroup/index.js +0 -7
  68. package/lib-commonjs/components/AvatarGroup/index.js.map +1 -1
  69. package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.js +2 -7
  70. package/lib-commonjs/components/AvatarGroup/renderAvatarGroup.js.map +1 -1
  71. package/lib-commonjs/components/AvatarGroup/useAvatarGroup.js +0 -4
  72. package/lib-commonjs/components/AvatarGroup/useAvatarGroup.js.map +1 -1
  73. package/lib-commonjs/components/AvatarGroup/useAvatarGroupContextValues.js +0 -2
  74. package/lib-commonjs/components/AvatarGroup/useAvatarGroupContextValues.js.map +1 -1
  75. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.js +10 -18
  76. package/lib-commonjs/components/AvatarGroup/useAvatarGroupStyles.js.map +1 -1
  77. package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.js +0 -6
  78. package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.js.map +1 -1
  79. package/lib-commonjs/components/AvatarGroupItem/AvatarGroupItem.types.js.map +1 -1
  80. package/lib-commonjs/components/AvatarGroupItem/index.js +0 -6
  81. package/lib-commonjs/components/AvatarGroupItem/index.js.map +1 -1
  82. package/lib-commonjs/components/AvatarGroupItem/renderAvatarGroupItem.js +6 -8
  83. package/lib-commonjs/components/AvatarGroupItem/renderAvatarGroupItem.js.map +1 -1
  84. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItem.js +2 -12
  85. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItem.js.map +1 -1
  86. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.js +91 -123
  87. package/lib-commonjs/components/AvatarGroupItem/useAvatarGroupItemStyles.js.map +1 -1
  88. package/lib-commonjs/components/AvatarGroupPopover/AvatarGroupPopover.js +0 -7
  89. package/lib-commonjs/components/AvatarGroupPopover/AvatarGroupPopover.js.map +1 -1
  90. package/lib-commonjs/components/AvatarGroupPopover/AvatarGroupPopover.types.js.map +1 -1
  91. package/lib-commonjs/components/AvatarGroupPopover/index.js +0 -6
  92. package/lib-commonjs/components/AvatarGroupPopover/index.js.map +1 -1
  93. package/lib-commonjs/components/AvatarGroupPopover/renderAvatarGroupPopover.js +10 -12
  94. package/lib-commonjs/components/AvatarGroupPopover/renderAvatarGroupPopover.js.map +1 -1
  95. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopover.js +0 -16
  96. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopover.js.map +1 -1
  97. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverContextValues.js +0 -2
  98. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverContextValues.js.map +1 -1
  99. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.js +166 -183
  100. package/lib-commonjs/components/AvatarGroupPopover/useAvatarGroupPopoverStyles.js.map +1 -1
  101. package/lib-commonjs/contexts/AvatarContext.js +0 -6
  102. package/lib-commonjs/contexts/AvatarContext.js.map +1 -1
  103. package/lib-commonjs/contexts/AvatarGroupContext.js +0 -5
  104. package/lib-commonjs/contexts/AvatarGroupContext.js.map +1 -1
  105. package/lib-commonjs/contexts/index.js +0 -3
  106. package/lib-commonjs/contexts/index.js.map +1 -1
  107. package/lib-commonjs/index.js +0 -12
  108. package/lib-commonjs/index.js.map +1 -1
  109. package/lib-commonjs/utils/getInitials.js +3 -19
  110. package/lib-commonjs/utils/getInitials.js.map +1 -1
  111. package/lib-commonjs/utils/index.js +0 -4
  112. package/lib-commonjs/utils/index.js.map +1 -1
  113. package/lib-commonjs/utils/partitionAvatarGroupItems.js +0 -5
  114. package/lib-commonjs/utils/partitionAvatarGroupItems.js.map +1 -1
  115. package/package.json +10 -10
@@ -11,170 +11,157 @@ const avatarGroupItemDividerWidthVar = '--fuiAvatarGroupItem__divider--width';
11
11
  /**
12
12
  * Styles for the root slot
13
13
  */
14
-
15
14
  const useRootStyles = /*#__PURE__*/__styles({
16
- "base": {
17
- "Bt984gj": "f122n59",
18
- "mc9l5x": "ftuwxu6",
19
- "Bnnss6s": "fi64zpg",
20
- "qhf8xq": "f10pi13n"
21
- },
22
- "overflowItem": {
23
- "z8tnut": "f1ywm7hm",
24
- "z189sj": ["f7x41pl", "fruq291"],
25
- "Byoj8tv": "f14wxoun",
26
- "uwmqm3": ["fruq291", "f7x41pl"]
27
- },
28
- "nonOverflowItem": {
29
- "Bbmb7ep": ["f8fbkgy", "f1nfllo7"],
30
- "Beyfa6y": ["f1nfllo7", "f8fbkgy"],
31
- "B7oj6ja": ["f1djnp8u", "f1s8kh49"],
32
- "Btl43ni": ["f1s8kh49", "f1djnp8u"]
15
+ base: {
16
+ Bt984gj: "f122n59",
17
+ mc9l5x: "ftuwxu6",
18
+ Bnnss6s: "fi64zpg",
19
+ qhf8xq: "f10pi13n"
20
+ },
21
+ overflowItem: {
22
+ z8tnut: "f1ywm7hm",
23
+ z189sj: ["f7x41pl", "fruq291"],
24
+ Byoj8tv: "f14wxoun",
25
+ uwmqm3: ["fruq291", "f7x41pl"]
26
+ },
27
+ nonOverflowItem: {
28
+ Bbmb7ep: ["f8fbkgy", "f1nfllo7"],
29
+ Beyfa6y: ["f1nfllo7", "f8fbkgy"],
30
+ B7oj6ja: ["f1djnp8u", "f1s8kh49"],
31
+ Btl43ni: ["f1s8kh49", "f1djnp8u"]
33
32
  }
34
33
  }, {
35
- "d": [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f10pi13n{position:relative;}", ".f1ywm7hm{padding-top:var(--spacingVerticalXS);}", ".f7x41pl{padding-right:var(--spacingHorizontalXS);}", ".fruq291{padding-left:var(--spacingHorizontalXS);}", ".f14wxoun{padding-bottom:var(--spacingVerticalXS);}", ".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}", ".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}"]
34
+ d: [".f122n59{-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}", ".ftuwxu6{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;}", ".fi64zpg{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}", ".f10pi13n{position:relative;}", ".f1ywm7hm{padding-top:var(--spacingVerticalXS);}", ".f7x41pl{padding-right:var(--spacingHorizontalXS);}", ".fruq291{padding-left:var(--spacingHorizontalXS);}", ".f14wxoun{padding-bottom:var(--spacingVerticalXS);}", ".f8fbkgy{border-bottom-right-radius:var(--borderRadiusCircular);}", ".f1nfllo7{border-bottom-left-radius:var(--borderRadiusCircular);}", ".f1djnp8u{border-top-right-radius:var(--borderRadiusCircular);}", ".f1s8kh49{border-top-left-radius:var(--borderRadiusCircular);}"]
36
35
  });
37
36
  /**
38
37
  * Styles for the avatar slot
39
38
  */
40
-
41
-
42
39
  const useAvatarStyles = /*#__PURE__*/__styles({
43
- "nonOverflowItem": {
44
- "qhf8xq": "f1euv43f"
45
- },
46
- "pie": {
47
- "Bbmb7ep": ["f1krrbdw", "f1deotkl"],
48
- "Beyfa6y": ["f1deotkl", "f1krrbdw"],
49
- "B7oj6ja": ["f10ostut", "f1ozlkrg"],
50
- "Btl43ni": ["f1ozlkrg", "f10ostut"]
40
+ nonOverflowItem: {
41
+ qhf8xq: "f1euv43f"
42
+ },
43
+ pie: {
44
+ Bbmb7ep: ["f1krrbdw", "f1deotkl"],
45
+ Beyfa6y: ["f1deotkl", "f1krrbdw"],
46
+ B7oj6ja: ["f10ostut", "f1ozlkrg"],
47
+ Btl43ni: ["f1ozlkrg", "f10ostut"]
51
48
  }
52
49
  }, {
53
- "d": [".f1euv43f{position:absolute;}", ".f1krrbdw{border-bottom-right-radius:0;}", ".f1deotkl{border-bottom-left-radius:0;}", ".f10ostut{border-top-right-radius:0;}", ".f1ozlkrg{border-top-left-radius:0;}"]
50
+ d: [".f1euv43f{position:absolute;}", ".f1krrbdw{border-bottom-right-radius:0;}", ".f1deotkl{border-bottom-left-radius:0;}", ".f10ostut{border-top-right-radius:0;}", ".f1ozlkrg{border-top-left-radius:0;}"]
54
51
  });
55
52
  /**
56
53
  * Styles for the label slot
57
54
  */
58
-
59
-
60
55
  const useOverflowLabelStyles = /*#__PURE__*/__styles({
61
- "base": {
62
- "Frg6f3": ["foyynoy", "f1vcna3q"],
63
- "sj55zd": "f19n0e5",
64
- "Bahqtrf": "fk6fouc",
65
- "Be2twd7": "fkhj508",
66
- "Bhrd7zp": "figsok6",
67
- "Bg96gwp": "f1i3iumi"
56
+ base: {
57
+ Frg6f3: ["foyynoy", "f1vcna3q"],
58
+ sj55zd: "f19n0e5",
59
+ Bahqtrf: "fk6fouc",
60
+ Be2twd7: "fkhj508",
61
+ Bhrd7zp: "figsok6",
62
+ Bg96gwp: "f1i3iumi"
68
63
  }
69
64
  }, {
70
- "d": [".foyynoy{margin-left:var(--spacingHorizontalS);}", ".f1vcna3q{margin-right:var(--spacingHorizontalS);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}"]
65
+ d: [".foyynoy{margin-left:var(--spacingHorizontalS);}", ".f1vcna3q{margin-right:var(--spacingHorizontalS);}", ".f19n0e5{color:var(--colorNeutralForeground1);}", ".fk6fouc{font-family:var(--fontFamilyBase);}", ".fkhj508{font-size:var(--fontSizeBase300);}", ".figsok6{font-weight:var(--fontWeightRegular);}", ".f1i3iumi{line-height:var(--lineHeightBase300);}"]
71
66
  });
72
67
  /**
73
68
  * Styles for the stack layout
74
69
  */
75
-
76
-
77
70
  const useStackStyles = /*#__PURE__*/__styles({
78
- "thick": {
79
- "E5pizo": "foiuzp5"
71
+ thick: {
72
+ E5pizo: "foiuzp5"
80
73
  },
81
- "thicker": {
82
- "E5pizo": "f1x6o7w7"
74
+ thicker: {
75
+ E5pizo: "f1x6o7w7"
83
76
  },
84
- "thickest": {
85
- "E5pizo": "f2aml1u"
77
+ thickest: {
78
+ E5pizo: "f2aml1u"
86
79
  },
87
- "xxs": {
88
- "jhia2w": ["f1cjco14", "f13dxjc9"]
80
+ xxs: {
81
+ jhia2w: ["f1cjco14", "f13dxjc9"]
89
82
  },
90
- "xs": {
91
- "jhia2w": ["f15p6bln", "f1bab3ru"]
83
+ xs: {
84
+ jhia2w: ["f15p6bln", "f1bab3ru"]
92
85
  },
93
- "s": {
94
- "jhia2w": ["f1v53ncc", "f17pu8r8"]
86
+ s: {
87
+ jhia2w: ["f1v53ncc", "f17pu8r8"]
95
88
  },
96
- "l": {
97
- "jhia2w": ["flv48ch", "fnh1ydj"]
89
+ l: {
90
+ jhia2w: ["flv48ch", "fnh1ydj"]
98
91
  }
99
92
  }, {
100
- "d": [".foiuzp5{box-shadow:0 0 0 var(--strokeWidthThick) var(--colorNeutralBackground2);}", ".f1x6o7w7{box-shadow:0 0 0 var(--strokeWidthThicker) var(--colorNeutralBackground2);}", ".f2aml1u{box-shadow:0 0 0 var(--strokeWidthThickest) var(--colorNeutralBackground2);}", ".f1cjco14:not(:first-child){margin-left:calc(-1 * var(--spacingHorizontalXXS));}", ".f13dxjc9:not(:first-child){margin-right:calc(-1 * var(--spacingHorizontalXXS));}", ".f15p6bln:not(:first-child){margin-left:calc(-1 * var(--spacingHorizontalXS));}", ".f1bab3ru:not(:first-child){margin-right:calc(-1 * var(--spacingHorizontalXS));}", ".f1v53ncc:not(:first-child){margin-left:calc(-1 * var(--spacingHorizontalS));}", ".f17pu8r8:not(:first-child){margin-right:calc(-1 * var(--spacingHorizontalS));}", ".flv48ch:not(:first-child){margin-left:calc(-1 * var(--spacingHorizontalL));}", ".fnh1ydj:not(:first-child){margin-right:calc(-1 * var(--spacingHorizontalL));}"]
93
+ d: [".foiuzp5{box-shadow:0 0 0 var(--strokeWidthThick) var(--colorNeutralBackground2);}", ".f1x6o7w7{box-shadow:0 0 0 var(--strokeWidthThicker) var(--colorNeutralBackground2);}", ".f2aml1u{box-shadow:0 0 0 var(--strokeWidthThickest) var(--colorNeutralBackground2);}", ".f1cjco14:not(:first-child){margin-left:calc(-1 * var(--spacingHorizontalXXS));}", ".f13dxjc9:not(:first-child){margin-right:calc(-1 * var(--spacingHorizontalXXS));}", ".f15p6bln:not(:first-child){margin-left:calc(-1 * var(--spacingHorizontalXS));}", ".f1bab3ru:not(:first-child){margin-right:calc(-1 * var(--spacingHorizontalXS));}", ".f1v53ncc:not(:first-child){margin-left:calc(-1 * var(--spacingHorizontalS));}", ".f17pu8r8:not(:first-child){margin-right:calc(-1 * var(--spacingHorizontalS));}", ".flv48ch:not(:first-child){margin-left:calc(-1 * var(--spacingHorizontalL));}", ".fnh1ydj:not(:first-child){margin-right:calc(-1 * var(--spacingHorizontalL));}"]
101
94
  });
102
95
  /**
103
96
  * Styles for the spread layout
104
97
  */
105
-
106
-
107
98
  const useSpreadStyles = /*#__PURE__*/__styles({
108
- "s": {
109
- "jhia2w": ["f7lhxv7", "f6ou2b0"]
99
+ s: {
100
+ jhia2w: ["f7lhxv7", "f6ou2b0"]
110
101
  },
111
- "mNudge": {
112
- "jhia2w": ["f1h0okno", "fnnqava"]
102
+ mNudge: {
103
+ jhia2w: ["f1h0okno", "fnnqava"]
113
104
  },
114
- "m": {
115
- "jhia2w": ["f1wkt588", "f1maio5g"]
105
+ m: {
106
+ jhia2w: ["f1wkt588", "f1maio5g"]
116
107
  },
117
- "l": {
118
- "jhia2w": ["f1l333zn", "f1r41m4c"]
108
+ l: {
109
+ jhia2w: ["f1l333zn", "f1r41m4c"]
119
110
  },
120
- "xl": {
121
- "jhia2w": ["fahr13a", "f2n7rbo"]
111
+ xl: {
112
+ jhia2w: ["fahr13a", "f2n7rbo"]
122
113
  }
123
114
  }, {
124
- "d": [".f7lhxv7:not(:first-child){margin-left:var(--spacingHorizontalS);}", ".f6ou2b0:not(:first-child){margin-right:var(--spacingHorizontalS);}", ".f1h0okno:not(:first-child){margin-left:var(--spacingHorizontalMNudge);}", ".fnnqava:not(:first-child){margin-right:var(--spacingHorizontalMNudge);}", ".f1wkt588:not(:first-child){margin-left:var(--spacingHorizontalM);}", ".f1maio5g:not(:first-child){margin-right:var(--spacingHorizontalM);}", ".f1l333zn:not(:first-child){margin-left:var(--spacingHorizontalL);}", ".f1r41m4c:not(:first-child){margin-right:var(--spacingHorizontalL);}", ".fahr13a:not(:first-child){margin-left:var(--spacingHorizontalXL);}", ".f2n7rbo:not(:first-child){margin-right:var(--spacingHorizontalXL);}"]
115
+ d: [".f7lhxv7:not(:first-child){margin-left:var(--spacingHorizontalS);}", ".f6ou2b0:not(:first-child){margin-right:var(--spacingHorizontalS);}", ".f1h0okno:not(:first-child){margin-left:var(--spacingHorizontalMNudge);}", ".fnnqava:not(:first-child){margin-right:var(--spacingHorizontalMNudge);}", ".f1wkt588:not(:first-child){margin-left:var(--spacingHorizontalM);}", ".f1maio5g:not(:first-child){margin-right:var(--spacingHorizontalM);}", ".f1l333zn:not(:first-child){margin-left:var(--spacingHorizontalL);}", ".f1r41m4c:not(:first-child){margin-right:var(--spacingHorizontalL);}", ".fahr13a:not(:first-child){margin-left:var(--spacingHorizontalXL);}", ".f2n7rbo:not(:first-child){margin-right:var(--spacingHorizontalXL);}"]
125
116
  });
126
117
  /**
127
118
  * Styles for the pie layout
128
119
  */
129
-
130
-
131
120
  const usePieStyles = /*#__PURE__*/__styles({
132
- "base": {
133
- "qhf8xq": "f1euv43f"
134
- },
135
- "slices": {
136
- "B3gf25r": "f16m7w7k",
137
- "Be2twx7": ["f1o4hhgz", "fb4gjrz"],
138
- "Bvaow4n": "f1pgb5nx",
139
- "Gpecfs": ["fugirid", "f4sk99m"],
140
- "bhabj1": "fjreaf3",
141
- "B7rc6i7": ["f1k4vw81", "f1w1xcy7"],
142
- "Bwrfys5": "f1ef8vxk",
143
- "Bwuzm9m": ["f1x2qbfv", "f1xwf4nz"],
144
- "fflka": "ff6xuso",
145
- "do7bja": "fzpvk6c",
146
- "Be8zqhl": "f4onu7f",
147
- "Bij0kh0": ["f1ydfez1", "fjensob"],
148
- "Bwexnyt": "f1yv732j",
149
- "Bhe5x6o": "fchq2fj",
150
- "B3kv7bh": "ff5binh"
151
- },
152
- "rtlSlices": {
153
- "B3gf25r": "f5vdl61",
154
- "Bvaow4n": "f1bnra92",
155
- "bhabj1": "f4ibo7t",
156
- "Bwrfys5": "f17heuis",
157
- "Bwuzm9m": ["f64f2ud", "f1yjglu3"],
158
- "Be8zqhl": "fa6l61x",
159
- "Bij0kh0": ["f1w2396a", "f14ab3yo"]
160
- },
161
- "thick": {
162
- "uiicq7": "fnyfzln"
163
- },
164
- "thicker": {
165
- "uiicq7": "f1xdzzot"
166
- },
167
- "thickest": {
168
- "uiicq7": "f1auhru5"
121
+ base: {
122
+ qhf8xq: "f1euv43f"
123
+ },
124
+ slices: {
125
+ B3gf25r: "f16m7w7k",
126
+ Be2twx7: ["f1o4hhgz", "fb4gjrz"],
127
+ Bvaow4n: "f1pgb5nx",
128
+ Gpecfs: ["fugirid", "f4sk99m"],
129
+ bhabj1: "fjreaf3",
130
+ B7rc6i7: ["f1k4vw81", "f1w1xcy7"],
131
+ Bwrfys5: "f1ef8vxk",
132
+ Bwuzm9m: ["f1x2qbfv", "f1xwf4nz"],
133
+ fflka: "ff6xuso",
134
+ do7bja: "fzpvk6c",
135
+ Be8zqhl: "f4onu7f",
136
+ Bij0kh0: ["f1ydfez1", "fjensob"],
137
+ Bwexnyt: "f1yv732j",
138
+ Bhe5x6o: "fchq2fj",
139
+ B3kv7bh: "ff5binh"
140
+ },
141
+ rtlSlices: {
142
+ B3gf25r: "f5vdl61",
143
+ Bvaow4n: "f1bnra92",
144
+ bhabj1: "f4ibo7t",
145
+ Bwrfys5: "f17heuis",
146
+ Bwuzm9m: ["f64f2ud", "f1yjglu3"],
147
+ Be8zqhl: "fa6l61x",
148
+ Bij0kh0: ["f1w2396a", "f14ab3yo"]
149
+ },
150
+ thick: {
151
+ uiicq7: "fnyfzln"
152
+ },
153
+ thicker: {
154
+ uiicq7: "f1xdzzot"
155
+ },
156
+ thickest: {
157
+ uiicq7: "f1auhru5"
169
158
  }
170
159
  }, {
171
- "d": [".f1euv43f{position:absolute;}", ".f16m7w7k:nth-of-type(1):nth-last-of-type(2){-webkit-clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);}", ".f1o4hhgz:nth-of-type(1):nth-last-of-type(2){left:-25%;}", ".fb4gjrz:nth-of-type(1):nth-last-of-type(2){right:-25%;}", ".f1pgb5nx:nth-of-type(2):nth-last-of-type(1){-webkit-clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));}", ".fugirid:nth-of-type(2):nth-last-of-type(1){left:25%;}", ".f4sk99m:nth-of-type(2):nth-last-of-type(1){right:25%;}", ".fjreaf3:nth-of-type(1):nth-last-of-type(3){-webkit-clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);}", ".f1k4vw81:nth-of-type(1):nth-last-of-type(3){left:-25%;}", ".f1w1xcy7:nth-of-type(1):nth-last-of-type(3){right:-25%;}", ".f1ef8vxk:nth-of-type(2):nth-last-of-type(2){-webkit-clip-path:inset(0 0 var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width));clip-path:inset(0 0 var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width));}", ".f1x2qbfv:nth-of-type(2):nth-last-of-type(2){left:50%;}", ".f1xwf4nz:nth-of-type(2):nth-last-of-type(2){right:50%;}", ".ff6xuso:nth-of-type(2):nth-last-of-type(2){-webkit-transform:scale(0.5);-moz-transform:scale(0.5);-ms-transform:scale(0.5);transform:scale(0.5);}", ".fzpvk6c:nth-of-type(2):nth-last-of-type(2){transform-origin:0 0;}", ".f4onu7f:nth-of-type(3):nth-last-of-type(1){-webkit-clip-path:inset(var(--fuiAvatarGroupItem__divider--width) 0 0 var(--fuiAvatarGroupItem__divider--width));clip-path:inset(var(--fuiAvatarGroupItem__divider--width) 0 0 var(--fuiAvatarGroupItem__divider--width));}", ".f1ydfez1:nth-of-type(3):nth-last-of-type(1){left:50%;}", ".fjensob:nth-of-type(3):nth-last-of-type(1){right:50%;}", ".f1yv732j:nth-of-type(3):nth-last-of-type(1){top:50%;}", ".fchq2fj:nth-of-type(3):nth-last-of-type(1){-webkit-transform:scale(0.5);-moz-transform:scale(0.5);-ms-transform:scale(0.5);transform:scale(0.5);}", ".ff5binh:nth-of-type(3):nth-last-of-type(1){transform-origin:0 0;}", ".f5vdl61:nth-of-type(1):nth-last-of-type(2){-webkit-clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));}", ".f1bnra92:nth-of-type(2):nth-last-of-type(1){-webkit-clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);}", ".f4ibo7t:nth-of-type(1):nth-last-of-type(3){-webkit-clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));}", ".f17heuis:nth-of-type(2):nth-last-of-type(2){-webkit-clip-path:inset(0 var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width) 0);clip-path:inset(0 var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width) 0);}", ".f64f2ud:nth-of-type(2):nth-last-of-type(2){left:0;}", ".f1yjglu3:nth-of-type(2):nth-last-of-type(2){right:0;}", ".fa6l61x:nth-of-type(3):nth-last-of-type(1){-webkit-clip-path:inset(var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width) 0 0);clip-path:inset(var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width) 0 0);}", ".f1w2396a:nth-of-type(3):nth-last-of-type(1){left:0;}", ".f14ab3yo:nth-of-type(3):nth-last-of-type(1){right:0;}", ".fnyfzln{--fuiAvatarGroupItem__divider--width:var(--strokeWidthThick);}", ".f1xdzzot{--fuiAvatarGroupItem__divider--width:var(--strokeWidthThicker);}", ".f1auhru5{--fuiAvatarGroupItem__divider--width:var(--strokeWidthThickest);}"]
160
+ d: [".f1euv43f{position:absolute;}", ".f16m7w7k:nth-of-type(1):nth-last-of-type(2){-webkit-clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);}", ".f1o4hhgz:nth-of-type(1):nth-last-of-type(2){left:-25%;}", ".fb4gjrz:nth-of-type(1):nth-last-of-type(2){right:-25%;}", ".f1pgb5nx:nth-of-type(2):nth-last-of-type(1){-webkit-clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));}", ".fugirid:nth-of-type(2):nth-last-of-type(1){left:25%;}", ".f4sk99m:nth-of-type(2):nth-last-of-type(1){right:25%;}", ".fjreaf3:nth-of-type(1):nth-last-of-type(3){-webkit-clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);}", ".f1k4vw81:nth-of-type(1):nth-last-of-type(3){left:-25%;}", ".f1w1xcy7:nth-of-type(1):nth-last-of-type(3){right:-25%;}", ".f1ef8vxk:nth-of-type(2):nth-last-of-type(2){-webkit-clip-path:inset(0 0 var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width));clip-path:inset(0 0 var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width));}", ".f1x2qbfv:nth-of-type(2):nth-last-of-type(2){left:50%;}", ".f1xwf4nz:nth-of-type(2):nth-last-of-type(2){right:50%;}", ".ff6xuso:nth-of-type(2):nth-last-of-type(2){-webkit-transform:scale(0.5);-moz-transform:scale(0.5);-ms-transform:scale(0.5);transform:scale(0.5);}", ".fzpvk6c:nth-of-type(2):nth-last-of-type(2){transform-origin:0 0;}", ".f4onu7f:nth-of-type(3):nth-last-of-type(1){-webkit-clip-path:inset(var(--fuiAvatarGroupItem__divider--width) 0 0 var(--fuiAvatarGroupItem__divider--width));clip-path:inset(var(--fuiAvatarGroupItem__divider--width) 0 0 var(--fuiAvatarGroupItem__divider--width));}", ".f1ydfez1:nth-of-type(3):nth-last-of-type(1){left:50%;}", ".fjensob:nth-of-type(3):nth-last-of-type(1){right:50%;}", ".f1yv732j:nth-of-type(3):nth-last-of-type(1){top:50%;}", ".fchq2fj:nth-of-type(3):nth-last-of-type(1){-webkit-transform:scale(0.5);-moz-transform:scale(0.5);-ms-transform:scale(0.5);transform:scale(0.5);}", ".ff5binh:nth-of-type(3):nth-last-of-type(1){transform-origin:0 0;}", ".f5vdl61:nth-of-type(1):nth-last-of-type(2){-webkit-clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));}", ".f1bnra92:nth-of-type(2):nth-last-of-type(1){-webkit-clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);clip-path:inset(0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)) 0 25%);}", ".f4ibo7t:nth-of-type(1):nth-last-of-type(3){-webkit-clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));clip-path:inset(0 25% 0 calc(25% + (var(--fuiAvatarGroupItem__divider--width) / 2)));}", ".f17heuis:nth-of-type(2):nth-last-of-type(2){-webkit-clip-path:inset(0 var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width) 0);clip-path:inset(0 var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width) 0);}", ".f64f2ud:nth-of-type(2):nth-last-of-type(2){left:0;}", ".f1yjglu3:nth-of-type(2):nth-last-of-type(2){right:0;}", ".fa6l61x:nth-of-type(3):nth-last-of-type(1){-webkit-clip-path:inset(var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width) 0 0);clip-path:inset(var(--fuiAvatarGroupItem__divider--width) var(--fuiAvatarGroupItem__divider--width) 0 0);}", ".f1w2396a:nth-of-type(3):nth-last-of-type(1){left:0;}", ".f14ab3yo:nth-of-type(3):nth-last-of-type(1){right:0;}", ".fnyfzln{--fuiAvatarGroupItem__divider--width:var(--strokeWidthThick);}", ".f1xdzzot{--fuiAvatarGroupItem__divider--width:var(--strokeWidthThicker);}", ".f1auhru5{--fuiAvatarGroupItem__divider--width:var(--strokeWidthThickest);}"]
172
161
  });
173
162
  /**
174
163
  * Apply styling to the AvatarGroupItem slots based on the state
175
164
  */
176
-
177
-
178
165
  export const useAvatarGroupItemStyles_unstable = state => {
179
166
  const {
180
167
  isOverflowItem,
@@ -191,15 +178,12 @@ export const useAvatarGroupItemStyles_unstable = state => {
191
178
  const sizeStyles = useSizeStyles();
192
179
  const groupChildClassName = useGroupChildClassName(layout, size);
193
180
  const rootClasses = [rootStyles.base];
194
-
195
181
  if (!isOverflowItem) {
196
182
  rootClasses.push(rootStyles.nonOverflowItem);
197
183
  rootClasses.push(groupChildClassName);
198
184
  rootClasses.push(sizeStyles[size]);
199
-
200
185
  if (layout === 'pie') {
201
186
  rootClasses.push(pieStyles.base);
202
-
203
187
  if (size < 56) {
204
188
  rootClasses.push(pieStyles.thick);
205
189
  } else if (size < 72) {
@@ -207,9 +191,7 @@ export const useAvatarGroupItemStyles_unstable = state => {
207
191
  } else {
208
192
  rootClasses.push(pieStyles.thickest);
209
193
  }
210
-
211
194
  rootClasses.push(pieStyles.slices);
212
-
213
195
  if (dir === 'rtl') {
214
196
  rootClasses.push(pieStyles.rtlSlices);
215
197
  }
@@ -217,26 +199,21 @@ export const useAvatarGroupItemStyles_unstable = state => {
217
199
  } else {
218
200
  rootClasses.push(rootStyles.overflowItem);
219
201
  }
220
-
221
202
  state.root.className = mergeClasses(avatarGroupItemClassNames.root, ...rootClasses, state.root.className);
222
203
  state.avatar.className = mergeClasses(avatarGroupItemClassNames.avatar, !isOverflowItem && avatarStyles.nonOverflowItem, layout === 'pie' && avatarStyles.pie, state.avatar.className);
223
-
224
204
  if (state.overflowLabel) {
225
205
  state.overflowLabel.className = mergeClasses(avatarGroupItemClassNames.overflowLabel, overflowLabelStyles.base, state.overflowLabel.className);
226
206
  }
227
-
228
207
  return state;
229
208
  };
230
209
  /**
231
210
  * Hook for getting the className for the children of AvatarGroup. This hook will provide the spacing and outlines
232
211
  * needed for each layout.
233
212
  */
234
-
235
213
  export const useGroupChildClassName = (layout, size) => {
236
214
  const stackStyles = useStackStyles();
237
215
  const spreadStyles = useSpreadStyles();
238
216
  const layoutClasses = [];
239
-
240
217
  if (size) {
241
218
  if (layout === 'stack') {
242
219
  if (size < 56) {
@@ -246,7 +223,6 @@ export const useGroupChildClassName = (layout, size) => {
246
223
  } else {
247
224
  layoutClasses.push(stackStyles.thickest);
248
225
  }
249
-
250
226
  if (size < 24) {
251
227
  layoutClasses.push(stackStyles.xxs);
252
228
  } else if (size < 48) {
@@ -268,7 +244,6 @@ export const useGroupChildClassName = (layout, size) => {
268
244
  }
269
245
  }
270
246
  }
271
-
272
247
  return mergeClasses(...layoutClasses);
273
248
  };
274
249
  //# sourceMappingURL=useAvatarGroupItemStyles.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-avatar/src/components/AvatarGroupItem/useAvatarGroupItemStyles.ts"],"names":[],"mappings":"AAAA,mBAAqB,YAArB,EAAmC,UAAnC,QAAqD,gBAArD;AACA,SAAS,MAAT,EAAiB,gBAAjB,QAAyC,uBAAzC;AACA,SAAS,aAAT,QAA8B,cAA9B;AACA,SAAS,kBAAkB,IAAI,SAA/B,QAAgD,iCAAhD;AAMA,OAAO,MAAM,yBAAyB,GAAyC;EAC7E,IAAI,EAAE,qBADuE;EAE7E,MAAM,EAAE,6BAFqE;EAG7E,aAAa,EAAE;AAH8D,CAAxE;AAMP,MAAM,8BAA8B,GAAG,sCAAvC;AAEA;;AAEG;;AACH,MAAM,aAAa,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAAtB;AAeA;;AAEG;;;AACH,MAAM,eAAe,gBAAG;EAA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AAC,IAAd,CAAmB,YAAY,CAAC,MAAhC;MACD,CAFM,MAEA,IAAI,IAAI,GAAG,EAAX,EAAe;QACpB,aAAa,CAAC,IAAd,CAAmB,YAAY,CAAC,CAAhC;MACD,CAFM,MAEA;QACL,aAAa,CAAC,IAAd,CAAmB,YAAY,CAAC,EAAhC;MACD;IACF;EACF;;EAED,OAAO,YAAY,CAAC,GAAG,aAAJ,CAAnB;AACD,CAtCM","sourcesContent":["import { makeStyles, mergeClasses, shorthands } 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 { AvatarSizes } 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: {\n ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingHorizontalXS),\n },\n nonOverflowItem: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n});\n\n/**\n * Styles for the avatar slot\n */\nconst useAvatarStyles = makeStyles({\n nonOverflowItem: {\n position: 'absolute',\n },\n pie: {\n ...shorthands.borderRadius(0),\n },\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 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: AvatarSizes): 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"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,mBAAqBA,YAAY,EAAEC,UAAU,QAAQ,gBAAgB;AACrE,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,SAASC,aAAa,QAAQ,cAAc;AAC5C,SAASC,kBAAkB,IAAIC,SAAS,QAAQ,iCAAiC;AAMjF,OAAO,MAAMC,yBAAyB,GAAyC;EAC7EC,IAAI,EAAE,qBAAqB;EAC3BC,MAAM,EAAE,6BAA6B;EACrCC,aAAa,EAAE;CAChB;AAED,MAAMC,8BAA8B,GAAG,sCAAsC;AAE7E;;;AAGA,MAAMC,aAAa,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAapB;AAEF;;;AAGA,MAAMC,eAAe,gBAAG;EAAA;IAAA;EAAA;EAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAOtB;AAEF;;;AAGA,MAAMC,sBAAsB,gBAAG;EAAA;IAAA;IAAA;IAAA;IAAA;IAAA;IAAA;EAAA;AAAA;EAAA;AAAA,EAM7B;AAEF;;;AAGA,MAAMC,cAAc,gBAAG;EAAA;IAAA;EAAA;EAAA;IAAA;EA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AACZ,IAAI,CAACW,YAAY,CAACO,EAAE,CAAC;;;;EAKzC,OAAOnD,YAAY,CAAC,GAAG6C,aAAa,CAAC;AACvC,CAAC","names":["mergeClasses","shorthands","tokens","typographyStyles","useSizeStyles","useFluent_unstable","useFluent","avatarGroupItemClassNames","root","avatar","overflowLabel","avatarGroupItemDividerWidthVar","useRootStyles","useAvatarStyles","useOverflowLabelStyles","useStackStyles","useSpreadStyles","usePieStyles","useAvatarGroupItemStyles_unstable","state","isOverflowItem","layout","size","dir","avatarStyles","overflowLabelStyles","pieStyles","rootStyles","sizeStyles","groupChildClassName","useGroupChildClassName","rootClasses","base","push","nonOverflowItem","thick","thicker","thickest","slices","rtlSlices","overflowItem","className","pie","stackStyles","spreadStyles","layoutClasses","xxs","xs","s","l","mNudge","xl"],"sourceRoot":"../src/","sources":["packages/react-components/react-avatar/src/components/AvatarGroupItem/useAvatarGroupItemStyles.ts"],"sourcesContent":["import { makeStyles, mergeClasses, shorthands } 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 { AvatarSizes } 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: {\n ...shorthands.padding(tokens.spacingVerticalXS, tokens.spacingHorizontalXS),\n },\n nonOverflowItem: {\n ...shorthands.borderRadius(tokens.borderRadiusCircular),\n },\n});\n\n/**\n * Styles for the avatar slot\n */\nconst useAvatarStyles = makeStyles({\n nonOverflowItem: {\n position: 'absolute',\n },\n pie: {\n ...shorthands.borderRadius(0),\n },\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 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: AvatarSizes): 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"]}
@@ -5,7 +5,6 @@ import { useAvatarGroupPopoverStyles_unstable } from './useAvatarGroupPopoverSty
5
5
  /**
6
6
  * The AvatarGroupPopover component provides a button with a Popover containing the children provided.
7
7
  */
8
-
9
8
  export const AvatarGroupPopover = props => {
10
9
  const state = useAvatarGroupPopover_unstable(props);
11
10
  const contextValues = useAvatarGroupPopoverContextValues(state);
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/AvatarGroupPopover.tsx"],"names":[],"mappings":"AACA,SAAS,iCAAT,QAAkD,4BAAlD;AACA,SAAS,kCAAT,QAAmD,sCAAnD;AACA,SAAS,8BAAT,QAA+C,yBAA/C;AACA,SAAS,oCAAT,QAAqD,+BAArD;AAGA;;AAEG;;AACH,OAAO,MAAM,kBAAkB,GAAsC,KAAK,IAAG;EAC3E,MAAM,KAAK,GAAG,8BAA8B,CAAC,KAAD,CAA5C;EACA,MAAM,aAAa,GAAG,kCAAkC,CAAC,KAAD,CAAxD;EAEA,oCAAoC,CAAC,KAAD,CAApC;EACA,OAAO,iCAAiC,CAAC,KAAD,EAAQ,aAAR,CAAxC;AACD,CANM;AAQP,kBAAkB,CAAC,WAAnB,GAAiC,oBAAjC","sourcesContent":["import * as React from 'react';\nimport { renderAvatarGroupPopover_unstable } from './renderAvatarGroupPopover';\nimport { useAvatarGroupPopoverContextValues } from './useAvatarGroupPopoverContextValues';\nimport { useAvatarGroupPopover_unstable } from './useAvatarGroupPopover';\nimport { useAvatarGroupPopoverStyles_unstable } from './useAvatarGroupPopoverStyles';\nimport type { AvatarGroupPopoverProps } from './AvatarGroupPopover.types';\n\n/**\n * The AvatarGroupPopover component provides a button with a Popover containing the children provided.\n */\nexport const AvatarGroupPopover: React.FC<AvatarGroupPopoverProps> = props => {\n const state = useAvatarGroupPopover_unstable(props);\n const contextValues = useAvatarGroupPopoverContextValues(state);\n\n useAvatarGroupPopoverStyles_unstable(state);\n return renderAvatarGroupPopover_unstable(state, contextValues);\n};\n\nAvatarGroupPopover.displayName = 'AvatarGroupPopover';\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AACA,SAASA,iCAAiC,QAAQ,4BAA4B;AAC9E,SAASC,kCAAkC,QAAQ,sCAAsC;AACzF,SAASC,8BAA8B,QAAQ,yBAAyB;AACxE,SAASC,oCAAoC,QAAQ,+BAA+B;AAGpF;;;AAGA,OAAO,MAAMC,kBAAkB,GAAsCC,KAAK,IAAG;EAC3E,MAAMC,KAAK,GAAGJ,8BAA8B,CAACG,KAAK,CAAC;EACnD,MAAME,aAAa,GAAGN,kCAAkC,CAACK,KAAK,CAAC;EAE/DH,oCAAoC,CAACG,KAAK,CAAC;EAC3C,OAAON,iCAAiC,CAACM,KAAK,EAAEC,aAAa,CAAC;AAChE,CAAC;AAEDH,kBAAkB,CAACI,WAAW,GAAG,oBAAoB","names":["renderAvatarGroupPopover_unstable","useAvatarGroupPopoverContextValues","useAvatarGroupPopover_unstable","useAvatarGroupPopoverStyles_unstable","AvatarGroupPopover","props","state","contextValues","displayName"],"sourceRoot":"../src/","sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/AvatarGroupPopover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { renderAvatarGroupPopover_unstable } from './renderAvatarGroupPopover';\nimport { useAvatarGroupPopoverContextValues } from './useAvatarGroupPopoverContextValues';\nimport { useAvatarGroupPopover_unstable } from './useAvatarGroupPopover';\nimport { useAvatarGroupPopoverStyles_unstable } from './useAvatarGroupPopoverStyles';\nimport type { AvatarGroupPopoverProps } from './AvatarGroupPopover.types';\n\n/**\n * The AvatarGroupPopover component provides a button with a Popover containing the children provided.\n */\nexport const AvatarGroupPopover: React.FC<AvatarGroupPopoverProps> = props => {\n const state = useAvatarGroupPopover_unstable(props);\n const contextValues = useAvatarGroupPopoverContextValues(state);\n\n useAvatarGroupPopoverStyles_unstable(state);\n return renderAvatarGroupPopover_unstable(state, contextValues);\n};\n\nAvatarGroupPopover.displayName = 'AvatarGroupPopover';\n"]}
@@ -5,21 +5,25 @@ import { PopoverTrigger } from '@fluentui/react-popover';
5
5
  /**
6
6
  * Render the final JSX of AvatarGroupPopover
7
7
  */
8
-
9
8
  export const renderAvatarGroupPopover_unstable = (state, contextValues) => {
10
9
  const {
11
10
  slots,
12
11
  slotProps
13
12
  } = getSlots(state);
14
- return /*#__PURE__*/React.createElement(slots.root, { ...slotProps.root
13
+ return /*#__PURE__*/React.createElement(slots.root, {
14
+ ...slotProps.root
15
15
  }, /*#__PURE__*/React.createElement(PopoverTrigger, {
16
16
  disableButtonEnhancement: true
17
- }, /*#__PURE__*/React.createElement(slots.tooltip, { ...slotProps.tooltip
18
- }, /*#__PURE__*/React.createElement(slots.triggerButton, { ...slotProps.triggerButton
19
- }))), /*#__PURE__*/React.createElement(slots.popoverSurface, { ...slotProps.popoverSurface
17
+ }, /*#__PURE__*/React.createElement(slots.tooltip, {
18
+ ...slotProps.tooltip
19
+ }, /*#__PURE__*/React.createElement(slots.triggerButton, {
20
+ ...slotProps.triggerButton
21
+ }))), /*#__PURE__*/React.createElement(slots.popoverSurface, {
22
+ ...slotProps.popoverSurface
20
23
  }, /*#__PURE__*/React.createElement(AvatarGroupProvider, {
21
24
  value: contextValues.avatarGroup
22
- }, /*#__PURE__*/React.createElement(slots.content, { ...slotProps.content
25
+ }, /*#__PURE__*/React.createElement(slots.content, {
26
+ ...slotProps.content
23
27
  }))));
24
28
  };
25
29
  //# sourceMappingURL=renderAvatarGroupPopover.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/renderAvatarGroupPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,mBAAT,QAAoC,mCAApC;AAEA,SAAS,QAAT,QAAyB,2BAAzB;AACA,SAAuB,cAAvB,QAA6C,yBAA7C;AAIA;;AAEG;;AACH,OAAO,MAAM,iCAAiC,GAAG,CAC/C,KAD+C,EAE/C,aAF+C,KAG7C;EACF,MAAM;IAAE,KAAF;IAAS;EAAT,IAAuB,QAAQ,CAA0B,KAA1B,CAArC;EAEA,oBACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,IAAP,EAAW,EAAA,GAAM,SAAS,CAAC;EAAhB,CAAX,eACE,KAAA,CAAA,aAAA,CAAC,cAAD,EAAe;IAAC,wBAAwB,EAAA;EAAzB,CAAf,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAM,SAAS,CAAC;EAAhB,CAAd,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,aAAP,EAAoB,EAAA,GAAK,SAAS,CAAC;EAAf,CAApB,CADF,CADF,CADF,eAME,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,cAAP,EAAqB,EAAA,GAAK,SAAS,CAAC;EAAf,CAArB,eACE,KAAA,CAAA,aAAA,CAAC,mBAAD,EAAoB;IAAC,KAAK,EAAE,aAAa,CAAC;EAAtB,CAApB,eACE,KAAA,CAAA,aAAA,CAAC,KAAK,CAAC,OAAP,EAAc,EAAA,GAAK,SAAS,CAAC;EAAf,CAAd,CADF,CADF,CANF,CADF;AAcD,CApBM","sourcesContent":["import * as React from 'react';\nimport { AvatarGroupProvider } from '../../contexts/AvatarGroupContext';\nimport { AvatarGroupContextValues } from '../AvatarGroup/AvatarGroup.types';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { PopoverProps, PopoverTrigger } from '@fluentui/react-popover';\nimport { TooltipProps } from '@fluentui/react-tooltip';\nimport type { AvatarGroupPopoverState, AvatarGroupPopoverSlots } from './AvatarGroupPopover.types';\n\n/**\n * Render the final JSX of AvatarGroupPopover\n */\nexport const renderAvatarGroupPopover_unstable = (\n state: AvatarGroupPopoverState,\n contextValues: AvatarGroupContextValues,\n) => {\n const { slots, slotProps } = getSlots<AvatarGroupPopoverSlots>(state);\n\n return (\n <slots.root {...(slotProps.root as PopoverProps)}>\n <PopoverTrigger disableButtonEnhancement>\n <slots.tooltip {...(slotProps.tooltip as TooltipProps)}>\n <slots.triggerButton {...slotProps.triggerButton} />\n </slots.tooltip>\n </PopoverTrigger>\n <slots.popoverSurface {...slotProps.popoverSurface}>\n <AvatarGroupProvider value={contextValues.avatarGroup}>\n <slots.content {...slotProps.content} />\n </AvatarGroupProvider>\n </slots.popoverSurface>\n </slots.root>\n );\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,mBAAmB,QAAQ,mCAAmC;AAEvE,SAASC,QAAQ,QAAQ,2BAA2B;AACpD,SAAuBC,cAAc,QAAQ,yBAAyB;AAItE;;;AAGA,OAAO,MAAMC,iCAAiC,GAAG,CAC/CC,KAA8B,EAC9BC,aAAuC,KACrC;EACF,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAE,GAAGN,QAAQ,CAA0BG,KAAK,CAAC;EAErE,oBACEL,oBAACO,KAAK,CAACE,IAAI;IAAA,GAAMD,SAAS,CAACC;EAAqB,gBAC9CT,oBAACG,cAAc;IAACO,wBAAwB;EAAA,gBACtCV,oBAACO,KAAK,CAACI,OAAO;IAAA,GAAMH,SAAS,CAACG;EAAwB,gBACpDX,oBAACO,KAAK,CAACK,aAAa;IAAA,GAAKJ,SAAS,CAACI;EAAa,EAAI,CACtC,CACD,eACjBZ,oBAACO,KAAK,CAACM,cAAc;IAAA,GAAKL,SAAS,CAACK;EAAc,gBAChDb,oBAACC,mBAAmB;IAACa,KAAK,EAAER,aAAa,CAACS;EAAW,gBACnDf,oBAACO,KAAK,CAACS,OAAO;IAAA,GAAKR,SAAS,CAACQ;EAAO,EAAI,CACpB,CACD,CACZ;AAEjB,CAAC","names":["React","AvatarGroupProvider","getSlots","PopoverTrigger","renderAvatarGroupPopover_unstable","state","contextValues","slots","slotProps","root","disableButtonEnhancement","tooltip","triggerButton","popoverSurface","value","avatarGroup","content"],"sourceRoot":"../src/","sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/renderAvatarGroupPopover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { AvatarGroupProvider } from '../../contexts/AvatarGroupContext';\nimport { AvatarGroupContextValues } from '../AvatarGroup/AvatarGroup.types';\nimport { getSlots } from '@fluentui/react-utilities';\nimport { PopoverProps, PopoverTrigger } from '@fluentui/react-popover';\nimport { TooltipProps } from '@fluentui/react-tooltip';\nimport type { AvatarGroupPopoverState, AvatarGroupPopoverSlots } from './AvatarGroupPopover.types';\n\n/**\n * Render the final JSX of AvatarGroupPopover\n */\nexport const renderAvatarGroupPopover_unstable = (\n state: AvatarGroupPopoverState,\n contextValues: AvatarGroupContextValues,\n) => {\n const { slots, slotProps } = getSlots<AvatarGroupPopoverSlots>(state);\n\n return (\n <slots.root {...(slotProps.root as PopoverProps)}>\n <PopoverTrigger disableButtonEnhancement>\n <slots.tooltip {...(slotProps.tooltip as TooltipProps)}>\n <slots.triggerButton {...slotProps.triggerButton} />\n </slots.tooltip>\n </PopoverTrigger>\n <slots.popoverSurface {...slotProps.popoverSurface}>\n <AvatarGroupProvider value={contextValues.avatarGroup}>\n <slots.content {...slotProps.content} />\n </AvatarGroupProvider>\n </slots.popoverSurface>\n </slots.root>\n );\n};\n"]}
@@ -13,10 +13,8 @@ import { Tooltip } from '@fluentui/react-tooltip';
13
13
  *
14
14
  * @param props - props from this instance of AvatarGroupPopover
15
15
  */
16
-
17
16
  export const useAvatarGroupPopover_unstable = props => {
18
17
  var _a;
19
-
20
18
  const size = (_a = useAvatarGroupContext_unstable(ctx => ctx.size)) !== null && _a !== void 0 ? _a : defaultAvatarGroupSize;
21
19
  const layout = useAvatarGroupContext_unstable(ctx => ctx.layout);
22
20
  const {
@@ -30,16 +28,12 @@ export const useAvatarGroupPopover_unstable = props => {
30
28
  defaultState: props.defaultOpen,
31
29
  initialState: false
32
30
  });
33
-
34
31
  const handleOnPopoverChange = (e, data) => {
35
32
  var _a;
36
-
37
33
  (_a = restOfProps.onOpenChange) === null || _a === void 0 ? void 0 : _a.call(restOfProps, e, data);
38
34
  setPopoverOpen(data.open);
39
35
  };
40
-
41
36
  let triggerButtonChildren;
42
-
43
37
  if (layout === 'pie') {
44
38
  triggerButtonChildren = null;
45
39
  } else if (indicator === 'icon') {
@@ -47,7 +41,6 @@ export const useAvatarGroupPopover_unstable = props => {
47
41
  } else {
48
42
  triggerButtonChildren = count > 99 ? '99+' : `+${count}`;
49
43
  }
50
-
51
44
  return {
52
45
  count,
53
46
  indicator,
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/useAvatarGroupPopover.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAZ,MAAuB,OAAvB;AACA,SAAS,8BAAT,QAA+C,mCAA/C;AACA,SAAS,sBAAT,QAAuC,+BAAvC;AACA,SAAS,gBAAT,EA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E,IAD6B;MAEvC,YAAY,EAAE;QACZ,OAAO,EAAE,mBADG;QAEZ,YAAY,EAAE;MAFF;IAFyB,CAAhB;EA5CpB,CAAP;AAoDD,CAlFM","sourcesContent":["import * as React from 'react';\nimport { useAvatarGroupContext_unstable } from '../../contexts/AvatarGroupContext';\nimport { defaultAvatarGroupSize } from '../AvatarGroup/useAvatarGroup';\nimport { resolveShorthand, useControllableState } from '@fluentui/react-utilities';\nimport { MoreHorizontalRegular } from '@fluentui/react-icons';\nimport { OnOpenChangeData, OpenPopoverEvents, Popover, PopoverSurface } from '@fluentui/react-popover';\nimport type { AvatarGroupPopoverProps, AvatarGroupPopoverState } from './AvatarGroupPopover.types';\nimport { Tooltip } from '@fluentui/react-tooltip';\n\n/**\n * Create the state required to render AvatarGroupPopover.\n *\n * The returned state can be modified with hooks such as useAvatarGroupPopoverStyles_unstable,\n * before being passed to renderAvatarGroupPopover_unstable.\n *\n * @param props - props from this instance of AvatarGroupPopover\n */\nexport const useAvatarGroupPopover_unstable = (props: AvatarGroupPopoverProps): AvatarGroupPopoverState => {\n const size = useAvatarGroupContext_unstable(ctx => ctx.size) ?? defaultAvatarGroupSize;\n const layout = useAvatarGroupContext_unstable(ctx => ctx.layout);\n const {\n indicator = size < 24 ? 'icon' : 'count',\n count = React.Children.count(props.children),\n children,\n ...restOfProps\n } = props;\n\n const [popoverOpen, setPopoverOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const handleOnPopoverChange = (e: OpenPopoverEvents, data: OnOpenChangeData) => {\n restOfProps.onOpenChange?.(e, data);\n setPopoverOpen(data.open);\n };\n\n let triggerButtonChildren;\n if (layout === 'pie') {\n triggerButtonChildren = null;\n } else if (indicator === 'icon') {\n triggerButtonChildren = <MoreHorizontalRegular />;\n } else {\n triggerButtonChildren = count > 99 ? '99+' : `+${count}`;\n }\n\n return {\n count,\n indicator,\n layout,\n popoverOpen,\n size,\n\n components: {\n root: Popover,\n triggerButton: 'button',\n content: 'ul',\n popoverSurface: PopoverSurface,\n tooltip: Tooltip,\n },\n root: {\n // Popover expects a child for its children. The children are added in the renderAvatarGroupPopover.\n children: <></>,\n size: 'small',\n trapFocus: true,\n ...restOfProps,\n open: popoverOpen,\n onOpenChange: handleOnPopoverChange,\n },\n triggerButton: resolveShorthand(props.triggerButton, {\n required: true,\n defaultProps: {\n children: triggerButtonChildren,\n type: 'button',\n },\n }),\n content: resolveShorthand(props.content, {\n required: true,\n defaultProps: {\n children,\n role: 'list',\n },\n }),\n popoverSurface: resolveShorthand(props.popoverSurface, {\n required: true,\n defaultProps: {\n 'aria-label': 'Overflow',\n tabIndex: 0,\n },\n }),\n tooltip: resolveShorthand(props.tooltip, {\n required: true,\n defaultProps: {\n content: 'View more people.',\n relationship: 'label',\n },\n }),\n };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,8BAA8B,QAAQ,mCAAmC;AAClF,SAASC,sBAAsB,QAAQ,+BAA+B;AACtE,SAASC,gBAAgB,EAAEC,oBAAoB,QAAQ,2BAA2B;AAClF,SAASC,qBAAqB,QAAQ,uBAAuB;AAC7D,SAA8CC,OAAO,EAAEC,cAAc,QAAQ,yBAAyB;AAEtG,SAASC,OAAO,QAAQ,yBAAyB;AAEjD;;;;;;;;AAQA,OAAO,MAAMC,8BAA8B,GAAIC,KAA8B,IAA6B;;EACxG,MAAMC,IAAI,GAAG,oCAA8B,CAACC,GAAG,IAAIA,GAAG,CAACD,IAAI,CAAC,mCAAIT,sBAAsB;EACtF,MAAMW,MAAM,GAAGZ,8BAA8B,CAACW,GAAG,IAAIA,GAAG,CAACC,MAAM,CAAC;EAChE,MAAM;IACJC,SAAS,GAAGH,IAAI,GAAG,EAAE,GAAG,MAAM,GAAG,OAAO;IACxCI,KAAK,GAAGf,KAAK,CAACgB,QAAQ,CAACD,KAAK,CAACL,KAAK,CAACO,QAAQ,CAAC;IAC5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/BU,IAAI,EAAE;;KAET,CAAC;IACFN,OAAO,EAAE/B,gBAAgB,CAACO,KAAK,CAACwB,OAAO,EAAE;MACvCI,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZtB,QAAQ;QACRwB,IAAI,EAAE;;KAET,CAAC;IACFN,cAAc,EAAEhC,gBAAgB,CAACO,KAAK,CAACyB,cAAc,EAAE;MACrDG,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZ,YAAY,EAAE,UAAU;QACxBG,QAAQ,EAAE;;KAEb,CAAC;IACFN,OAAO,EAAEjC,gBAAgB,CAACO,KAAK,CAAC0B,OAAO,EAAE;MACvCE,QAAQ,EAAE,IAAI;MACdC,YAAY,EAAE;QACZL,OAAO,EAAE,mBAAmB;QAC5BS,YAAY,EAAE;;KAEjB;GACF;AACH,CAAC","names":["React","useAvatarGroupContext_unstable","defaultAvatarGroupSize","resolveShorthand","useControllableState","MoreHorizontalRegular","Popover","PopoverSurface","Tooltip","useAvatarGroupPopover_unstable","props","size","ctx","layout","indicator","count","Children","children","restOfProps","popoverOpen","setPopoverOpen","state","open","defaultState","defaultOpen","initialState","handleOnPopoverChange","e","data","onOpenChange","triggerButtonChildren","components","root","triggerButton","content","popoverSurface","tooltip","trapFocus","required","defaultProps","type","role","tabIndex","relationship"],"sourceRoot":"../src/","sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/useAvatarGroupPopover.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useAvatarGroupContext_unstable } from '../../contexts/AvatarGroupContext';\nimport { defaultAvatarGroupSize } from '../AvatarGroup/useAvatarGroup';\nimport { resolveShorthand, useControllableState } from '@fluentui/react-utilities';\nimport { MoreHorizontalRegular } from '@fluentui/react-icons';\nimport { OnOpenChangeData, OpenPopoverEvents, Popover, PopoverSurface } from '@fluentui/react-popover';\nimport type { AvatarGroupPopoverProps, AvatarGroupPopoverState } from './AvatarGroupPopover.types';\nimport { Tooltip } from '@fluentui/react-tooltip';\n\n/**\n * Create the state required to render AvatarGroupPopover.\n *\n * The returned state can be modified with hooks such as useAvatarGroupPopoverStyles_unstable,\n * before being passed to renderAvatarGroupPopover_unstable.\n *\n * @param props - props from this instance of AvatarGroupPopover\n */\nexport const useAvatarGroupPopover_unstable = (props: AvatarGroupPopoverProps): AvatarGroupPopoverState => {\n const size = useAvatarGroupContext_unstable(ctx => ctx.size) ?? defaultAvatarGroupSize;\n const layout = useAvatarGroupContext_unstable(ctx => ctx.layout);\n const {\n indicator = size < 24 ? 'icon' : 'count',\n count = React.Children.count(props.children),\n children,\n ...restOfProps\n } = props;\n\n const [popoverOpen, setPopoverOpen] = useControllableState({\n state: props.open,\n defaultState: props.defaultOpen,\n initialState: false,\n });\n\n const handleOnPopoverChange = (e: OpenPopoverEvents, data: OnOpenChangeData) => {\n restOfProps.onOpenChange?.(e, data);\n setPopoverOpen(data.open);\n };\n\n let triggerButtonChildren;\n if (layout === 'pie') {\n triggerButtonChildren = null;\n } else if (indicator === 'icon') {\n triggerButtonChildren = <MoreHorizontalRegular />;\n } else {\n triggerButtonChildren = count > 99 ? '99+' : `+${count}`;\n }\n\n return {\n count,\n indicator,\n layout,\n popoverOpen,\n size,\n\n components: {\n root: Popover,\n triggerButton: 'button',\n content: 'ul',\n popoverSurface: PopoverSurface,\n tooltip: Tooltip,\n },\n root: {\n // Popover expects a child for its children. The children are added in the renderAvatarGroupPopover.\n children: <></>,\n size: 'small',\n trapFocus: true,\n ...restOfProps,\n open: popoverOpen,\n onOpenChange: handleOnPopoverChange,\n },\n triggerButton: resolveShorthand(props.triggerButton, {\n required: true,\n defaultProps: {\n children: triggerButtonChildren,\n type: 'button',\n },\n }),\n content: resolveShorthand(props.content, {\n required: true,\n defaultProps: {\n children,\n role: 'list',\n },\n }),\n popoverSurface: resolveShorthand(props.popoverSurface, {\n required: true,\n defaultProps: {\n 'aria-label': 'Overflow',\n tabIndex: 0,\n },\n }),\n tooltip: resolveShorthand(props.tooltip, {\n required: true,\n defaultProps: {\n content: 'View more people.',\n relationship: 'label',\n },\n }),\n };\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/useAvatarGroupPopoverContextValues.ts"],"names":[],"mappings":"AAGA,OAAO,MAAM,kCAAkC,GAAI,KAAD,IAA6D;EAC7G,MAAM,WAAW,GAA4B;IAC3C,UAAU,EAAE,IAD+B;IAE3C,IAAI,EAAE;EAFqC,CAA7C;EAKA,OAAO;IAAE;EAAF,CAAP;AACD,CAPM","sourcesContent":["import { AvatarGroupContextValue, AvatarGroupContextValues } from '../AvatarGroup/AvatarGroup.types';\nimport { AvatarGroupPopoverState } from './AvatarGroupPopover.types';\n\nexport const useAvatarGroupPopoverContextValues = (state: AvatarGroupPopoverState): AvatarGroupContextValues => {\n const avatarGroup: AvatarGroupContextValue = {\n isOverflow: true,\n size: 24,\n };\n\n return { avatarGroup };\n};\n"],"sourceRoot":"../src/"}
1
+ {"version":3,"mappings":"AAGA,OAAO,MAAMA,kCAAkC,GAAIC,KAA8B,IAA8B;EAC7G,MAAMC,WAAW,GAA4B;IAC3CC,UAAU,EAAE,IAAI;IAChBC,IAAI,EAAE;GACP;EAED,OAAO;IAAEF;EAAW,CAAE;AACxB,CAAC","names":["useAvatarGroupPopoverContextValues","state","avatarGroup","isOverflow","size"],"sourceRoot":"../src/","sources":["packages/react-components/react-avatar/src/components/AvatarGroupPopover/useAvatarGroupPopoverContextValues.ts"],"sourcesContent":["import { AvatarGroupContextValue, AvatarGroupContextValues } from '../AvatarGroup/AvatarGroup.types';\nimport { AvatarGroupPopoverState } from './AvatarGroupPopover.types';\n\nexport const useAvatarGroupPopoverContextValues = (state: AvatarGroupPopoverState): AvatarGroupContextValues => {\n const avatarGroup: AvatarGroupContextValue = {\n isOverflow: true,\n size: 24,\n };\n\n return { avatarGroup };\n};\n"]}