@xsolla/xui-avatar 0.148.2 → 0.149.1

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.
package/README.md CHANGED
@@ -97,36 +97,26 @@ import { Avatar } from '@xsolla/xui-avatar';
97
97
  badge={false} // Show notification badge
98
98
  badgeCount={5} // Badge count
99
99
  badgeTone="brand" // Badge color tone
100
- stroke={false} // Show border
101
- backgroundColor="#color" // Custom background
100
+ tone="mono" // Visual tone ('mono' | 'brand')
102
101
  onClick={handleClick} // Click handler
103
102
  />
104
103
  ```
105
104
 
106
105
  ## Examples
107
106
 
108
- ### Avatar with Background Color
107
+ ### Avatar Tones
109
108
 
110
- Use `backgroundColor` to set a custom background. You can pass any CSS color string, or use a theme token such as `theme.colors.background.brand.primary` for the standard brand color.
109
+ Use the `tone` prop to switch between the default `mono` background and the `brand` background.
111
110
 
112
111
  ```tsx
113
112
  import * as React from 'react';
114
113
  import { Avatar } from '@xsolla/xui-avatar';
115
- import { useDesignSystem } from '@xsolla/xui-core';
116
-
117
- export default function AvatarWithBackground() {
118
- const { theme } = useDesignSystem();
119
114
 
115
+ export default function AvatarTones() {
120
116
  return (
121
117
  <div style={{ display: 'flex', gap: 16 }}>
122
- {/* Using a theme token (recommended) */}
123
- <Avatar backgroundColor={theme.colors.background.brand.primary} />
124
- <Avatar backgroundColor={theme.colors.background.brand.primary} text="JD" />
125
- <Avatar backgroundColor={theme.colors.background.brand.primary} square />
126
-
127
- {/* Using custom hex colors */}
128
- <Avatar backgroundColor="#FF8080" text="AB" />
129
- <Avatar backgroundColor="#D580FF" text="RT" />
118
+ <Avatar tone="mono" text="JD" />
119
+ <Avatar tone="brand" text="JD" />
130
120
  </div>
131
121
  );
132
122
  }
@@ -142,9 +132,9 @@ import { Building2, Briefcase, Star } from '@xsolla/xui-icons-base';
142
132
  export default function AvatarWithIcon() {
143
133
  return (
144
134
  <div style={{ display: 'flex', gap: 16 }}>
145
- <Avatar icon={<Building2 />} backgroundColor="#4A90D9" />
146
- <Avatar icon={<Briefcase />} backgroundColor="#9B59B6" />
147
- <Avatar icon={<Star />} backgroundColor="#F39C12" />
135
+ <Avatar icon={<Building2 />} />
136
+ <Avatar icon={<Briefcase />} tone="brand" />
137
+ <Avatar icon={<Star />} />
148
138
  </div>
149
139
  );
150
140
  }
@@ -247,10 +237,9 @@ An avatar component for displaying user representation.
247
237
  | square | `boolean` | `false` | Square with border radius vs circular. |
248
238
  | badge | `boolean` | `false` | Show notification badge. |
249
239
  | badgeCount | `ReactNode` | - | Badge count or content. |
250
- | badgeTone | `"primary" \| "secondary" \| "brand" \| "brandExtra" \| "success" \| "warning" \| "alert" \| "neutral"` | - | Badge color tone. |
251
- | stroke | `boolean` | `false` | Show border around avatar. |
252
- | backgroundColor | `string` | - | Custom background color. |
253
- | disableHover | `boolean` | `false` | Disable hover effect. |
240
+ | badgeTone | `"primary" \| "secondary" \| "brand" \| "brandExtra" \| "success" \| "warning" \| "alert" \| "neutral"` | `"alert"` | Badge color tone. |
241
+ | tone | `"mono" \| "brand"` | `"mono"` | Visual tone. |
242
+ | disableHover | `boolean` | `true` | Disable hover effect. |
254
243
  | aria-label | `string` | - | Accessible label. |
255
244
  | alt | `string` | - | Alt text for image. |
256
245
  | onClick | `() => void` | - | Click handler. |
@@ -12,13 +12,19 @@ interface AvatarProps extends ThemeOverrideProps {
12
12
  size?: "xl" | "lg" | "md" | "sm" | "xs" | "xxs";
13
13
  /** If true, the avatar will be square with small border radius. If false, it will be a circle. */
14
14
  square?: boolean;
15
+ /** Visual tone — 'mono' (default) or 'brand'. */
16
+ tone?: "mono" | "brand";
15
17
  /** Whether to show an alert badge */
16
18
  badge?: boolean;
17
19
  /** Number or text to display in the badge notification */
18
20
  badgeCount?: React.ReactNode;
19
- /** If true, the avatar will have a border to separate it from other avatars in a group */
20
- stroke?: boolean;
21
- /** Background color for the avatar. Defaults to theme background secondary. */
21
+ /** Icon to display in the badge */
22
+ badgeIcon?: React.ReactNode;
23
+ /**
24
+ * Background colour override. Intended for internal use by AvatarGroup to
25
+ * drive its `avatarBackgroundMode` cycling; not part of the public API.
26
+ * @internal
27
+ */
22
28
  backgroundColor?: string;
23
29
  /** Disable hover effect. Used internally by AvatarGroup. */
24
30
  disableHover?: boolean;
@@ -41,10 +47,16 @@ interface AvatarGroupItem {
41
47
  src?: string;
42
48
  /** Initials to display when no image is provided */
43
49
  initials?: string;
44
- /** Click handler for the avatar */
45
- onClick?: () => void;
46
50
  /** Tooltip text to display on hover */
47
51
  tooltip?: string;
52
+ /** Whether to show a badge on the avatar */
53
+ badge?: boolean;
54
+ /** Number or text to display in the badge notification */
55
+ badgeCount?: React.ReactNode;
56
+ /** Icon to display in the badge */
57
+ badgeIcon?: React.ReactNode;
58
+ /** Color tone for the badge */
59
+ badgeTone?: AvatarProps["badgeTone"];
48
60
  }
49
61
  /** Avatar background mode - preset colors, 'mixed' for cycling, or a theme function */
50
62
  type AvatarBackgroundMode = "mixed" | "brand" | "brandExtra" | "success" | "warning" | "alert" | "neutral" | ((theme: Theme) => string);
@@ -55,14 +67,13 @@ interface AvatarGroupProps extends ThemeOverrideProps {
55
67
  */
56
68
  list: AvatarGroupItem[];
57
69
  /** Size of the avatars in the group */
58
- size?: "sm" | "md" | "lg" | "xl";
70
+ size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
59
71
  /**
60
- * The maximum number of avatars to display before collapsing the rest into a "+N" counter.
61
- * If the number of avatars exceeds this value, the extra avatars will be hidden.
72
+ * Maximum number of slots rendered, including the "+N" overflow counter.
73
+ * When the list exceeds this, (maxVisible - 1) avatars are shown plus a "+N" indicator.
74
+ * When the list fits, all avatars are shown and no "+N" is rendered.
62
75
  */
63
76
  maxVisible?: number;
64
- /** Whether to show a stroke/border around each avatar */
65
- stroke?: boolean;
66
77
  /**
67
78
  * Controls the background color mode for avatars in the group.
68
79
  * - 'mixed' (default): Avatars cycle through different colors
package/native/index.d.ts CHANGED
@@ -12,13 +12,19 @@ interface AvatarProps extends ThemeOverrideProps {
12
12
  size?: "xl" | "lg" | "md" | "sm" | "xs" | "xxs";
13
13
  /** If true, the avatar will be square with small border radius. If false, it will be a circle. */
14
14
  square?: boolean;
15
+ /** Visual tone — 'mono' (default) or 'brand'. */
16
+ tone?: "mono" | "brand";
15
17
  /** Whether to show an alert badge */
16
18
  badge?: boolean;
17
19
  /** Number or text to display in the badge notification */
18
20
  badgeCount?: React.ReactNode;
19
- /** If true, the avatar will have a border to separate it from other avatars in a group */
20
- stroke?: boolean;
21
- /** Background color for the avatar. Defaults to theme background secondary. */
21
+ /** Icon to display in the badge */
22
+ badgeIcon?: React.ReactNode;
23
+ /**
24
+ * Background colour override. Intended for internal use by AvatarGroup to
25
+ * drive its `avatarBackgroundMode` cycling; not part of the public API.
26
+ * @internal
27
+ */
22
28
  backgroundColor?: string;
23
29
  /** Disable hover effect. Used internally by AvatarGroup. */
24
30
  disableHover?: boolean;
@@ -41,10 +47,16 @@ interface AvatarGroupItem {
41
47
  src?: string;
42
48
  /** Initials to display when no image is provided */
43
49
  initials?: string;
44
- /** Click handler for the avatar */
45
- onClick?: () => void;
46
50
  /** Tooltip text to display on hover */
47
51
  tooltip?: string;
52
+ /** Whether to show a badge on the avatar */
53
+ badge?: boolean;
54
+ /** Number or text to display in the badge notification */
55
+ badgeCount?: React.ReactNode;
56
+ /** Icon to display in the badge */
57
+ badgeIcon?: React.ReactNode;
58
+ /** Color tone for the badge */
59
+ badgeTone?: AvatarProps["badgeTone"];
48
60
  }
49
61
  /** Avatar background mode - preset colors, 'mixed' for cycling, or a theme function */
50
62
  type AvatarBackgroundMode = "mixed" | "brand" | "brandExtra" | "success" | "warning" | "alert" | "neutral" | ((theme: Theme) => string);
@@ -55,14 +67,13 @@ interface AvatarGroupProps extends ThemeOverrideProps {
55
67
  */
56
68
  list: AvatarGroupItem[];
57
69
  /** Size of the avatars in the group */
58
- size?: "sm" | "md" | "lg" | "xl";
70
+ size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl";
59
71
  /**
60
- * The maximum number of avatars to display before collapsing the rest into a "+N" counter.
61
- * If the number of avatars exceeds this value, the extra avatars will be hidden.
72
+ * Maximum number of slots rendered, including the "+N" overflow counter.
73
+ * When the list exceeds this, (maxVisible - 1) avatars are shown plus a "+N" indicator.
74
+ * When the list fits, all avatars are shown and no "+N" is rendered.
62
75
  */
63
76
  maxVisible?: number;
64
- /** Whether to show a stroke/border around each avatar */
65
- stroke?: boolean;
66
77
  /**
67
78
  * Controls the background color mode for avatars in the group.
68
79
  * - 'mixed' (default): Avatars cycle through different colors
package/native/index.js CHANGED
@@ -35,6 +35,9 @@ __export(index_exports, {
35
35
  });
36
36
  module.exports = __toCommonJS(index_exports);
37
37
 
38
+ // src/Avatar.tsx
39
+ var import_react2 = __toESM(require("react"));
40
+
38
41
  // ../../foundation/primitives-native/src/Box.tsx
39
42
  var import_react_native = require("react-native");
40
43
  var import_jsx_runtime = require("react/jsx-runtime");
@@ -307,10 +310,11 @@ var Avatar = ({
307
310
  text,
308
311
  size = "xl",
309
312
  square = false,
313
+ tone = "mono",
310
314
  badge = false,
311
315
  badgeCount,
316
+ badgeIcon,
312
317
  badgeTone = "alert",
313
- stroke = false,
314
318
  backgroundColor,
315
319
  disableHover = true,
316
320
  "aria-label": ariaLabel,
@@ -320,7 +324,15 @@ var Avatar = ({
320
324
  themeProductContext
321
325
  }) => {
322
326
  const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
327
+ const [hasImageError, setHasImageError] = import_react2.default.useState(false);
328
+ import_react2.default.useEffect(() => {
329
+ setHasImageError(false);
330
+ }, [src]);
331
+ const useImage = !!src && !hasImageError;
323
332
  const sizeStyles = theme.sizing.avatar(size);
333
+ const toneBackground = tone === "brand" ? theme.colors.background.brand.primary : theme.colors.overlay.mono;
334
+ const toneHoverBackground = tone === "brand" ? theme.colors.background.brand.secondary : theme.colors.overlay.monoHover;
335
+ const toneContent = tone === "brand" ? theme.colors.content.on.brand : theme.colors.content.primary;
324
336
  const borderRadius = square ? sizeStyles.borderRadiusSquare : sizeStyles.borderRadiusCircle;
325
337
  const countSizeMap = {
326
338
  xl: "xl",
@@ -338,7 +350,9 @@ var Avatar = ({
338
350
  xs: "sm",
339
351
  xxs: "xs"
340
352
  };
341
- const badgeSize = badgeCount ? countSizeMap[size] : dotSizeMap[size];
353
+ const hasBadgeContent = !!(badgeCount || badgeIcon);
354
+ const badgeSize = hasBadgeContent ? countSizeMap[size] : dotSizeMap[size];
355
+ const rendersAsDot = badgeSize === "sm" || badgeSize === "xs";
342
356
  const getDotOffset = () => {
343
357
  if (square) {
344
358
  return size === "xxs" ? { right: -1, top: -1 } : { right: -3, top: -3 };
@@ -353,7 +367,7 @@ var Avatar = ({
353
367
  };
354
368
  return circleOffsets[size];
355
369
  };
356
- const badgeOffset = badgeCount ? square ? sizeStyles.badgeOffsetSquare : sizeStyles.badgeOffsetCircle : getDotOffset();
370
+ const badgeOffset = hasBadgeContent && !rendersAsDot ? square ? sizeStyles.badgeOffsetSquare : sizeStyles.badgeOffsetCircle : getDotOffset();
357
371
  const displayBadgeCount = badgeCount;
358
372
  return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
359
373
  Box,
@@ -361,7 +375,7 @@ var Avatar = ({
361
375
  width: sizeStyles.size,
362
376
  height: sizeStyles.size,
363
377
  position: "relative",
364
- ...!src && { role: "img", "aria-label": ariaLabel },
378
+ ...!useImage && { role: "img", "aria-label": ariaLabel },
365
379
  ...onClick && {
366
380
  onPress: onClick,
367
381
  onKeyDown: (e) => {
@@ -381,19 +395,19 @@ var Avatar = ({
381
395
  width: sizeStyles.size,
382
396
  height: sizeStyles.size,
383
397
  borderRadius,
384
- backgroundColor: backgroundColor || theme.colors.overlay.mono,
398
+ backgroundColor: backgroundColor || toneBackground,
385
399
  alignItems: "center",
386
400
  justifyContent: "center",
387
401
  position: "relative",
388
402
  overflow: "hidden",
389
- borderWidth: stroke ? 1 : 0,
390
- borderColor: theme.colors.background.primary,
391
- ...!disableHover && !src && {
403
+ borderWidth: 2,
404
+ borderColor: theme.colors.border.secondary,
405
+ ...!disableHover && !useImage && {
392
406
  hoverStyle: {
393
- backgroundColor: theme.colors.overlay.monoHover
407
+ backgroundColor: toneHoverBackground
394
408
  }
395
409
  },
396
- children: src ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
410
+ children: useImage ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
397
411
  Box,
398
412
  {
399
413
  as: "img",
@@ -402,15 +416,16 @@ var Avatar = ({
402
416
  position: "absolute",
403
417
  top: 0,
404
418
  left: 0,
405
- width: sizeStyles.size,
406
- height: sizeStyles.size,
407
- borderRadius
419
+ width: "100%",
420
+ height: "100%",
421
+ borderRadius,
422
+ onError: () => setHasImageError(true)
408
423
  }
409
- ) : icon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { size: sizeStyles.iconSize, color: theme.colors.content.primary, children: icon }) : text ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
424
+ ) : icon ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { size: sizeStyles.iconSize, color: toneContent, children: icon }) : text ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
410
425
  Text,
411
426
  {
412
427
  fontSize: sizeStyles.fontSize,
413
- color: theme.colors.content.primary,
428
+ color: toneContent,
414
429
  fontWeight: "400",
415
430
  letterSpacing: 0.4,
416
431
  children: text
@@ -418,8 +433,9 @@ var Avatar = ({
418
433
  ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
419
434
  import_xui_icons_base.User,
420
435
  {
436
+ variant: "solid",
421
437
  size: sizeStyles.iconSize,
422
- color: theme.colors.content.primary
438
+ color: toneContent
423
439
  }
424
440
  )
425
441
  }
@@ -435,6 +451,7 @@ var Avatar = ({
435
451
  {
436
452
  size: badgeSize,
437
453
  tone: badgeTone,
454
+ icon: badgeIcon,
438
455
  showStroke: size !== "xxs",
439
456
  "aria-label": displayBadgeCount ? `${displayBadgeCount} notifications` : "Notification",
440
457
  children: displayBadgeCount
@@ -451,26 +468,26 @@ var Avatar = ({
451
468
  var import_xui_core2 = require("@xsolla/xui-core");
452
469
  var import_xui_tooltip = require("@xsolla/xui-tooltip");
453
470
  var import_jsx_runtime5 = require("react/jsx-runtime");
454
- var sizeMap = {
455
- sm: "sm",
456
- md: "md",
457
- lg: "lg",
458
- xl: "xl"
459
- };
471
+ var DEFAULT_MAX_VISIBLE = 6;
460
472
  var AvatarGroup = ({
461
473
  list,
462
- size = "md",
463
- maxVisible = 6,
464
- stroke = true,
474
+ size = "sm",
475
+ maxVisible = DEFAULT_MAX_VISIBLE,
465
476
  avatarBackgroundMode = "mixed",
466
477
  "aria-label": ariaLabel,
467
478
  themeMode,
468
479
  themeProductContext
469
480
  }) => {
470
481
  const { theme } = (0, import_xui_core2.useResolvedTheme)({ themeMode, themeProductContext });
471
- const internalSize = sizeMap[size];
482
+ if (maxVisible < 1) {
483
+ console.warn(
484
+ `[AvatarGroup] "maxVisible" must be a positive number. Received ${maxVisible}, falling back to default (${DEFAULT_MAX_VISIBLE}).`
485
+ );
486
+ }
487
+ const effectiveMaxVisible = maxVisible < 1 ? DEFAULT_MAX_VISIBLE : maxVisible;
472
488
  const totalCount = list.length;
473
- const visibleCount = Math.min(totalCount, Math.max(0, maxVisible));
489
+ const overflows = totalCount > effectiveMaxVisible;
490
+ const visibleCount = overflows ? effectiveMaxVisible - 1 : totalCount;
474
491
  const visibleListItems = list.slice(0, visibleCount);
475
492
  const remainingCount = totalCount - visibleCount;
476
493
  const overlap = -4;
@@ -518,7 +535,6 @@ var AvatarGroup = ({
518
535
  visibleListItems.map((item, index) => {
519
536
  const shouldApplyBackground = !item.src;
520
537
  const backgroundColor = shouldApplyBackground ? getBackgroundColor(index) : void 0;
521
- const shouldEnableHover = !!item.src && !!item.onClick;
522
538
  const avatar = /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
523
539
  Box,
524
540
  {
@@ -529,11 +545,13 @@ var AvatarGroup = ({
529
545
  {
530
546
  src: item.src,
531
547
  text: item.initials,
532
- size: internalSize,
533
- stroke,
548
+ size,
534
549
  backgroundColor,
535
- disableHover: !shouldEnableHover,
536
- onClick: item.onClick,
550
+ disableHover: true,
551
+ badge: item.badge,
552
+ badgeCount: item.badgeCount,
553
+ badgeIcon: item.badgeIcon,
554
+ badgeTone: item.badgeTone,
537
555
  ...item.tooltip ? { "aria-label": item.tooltip } : {}
538
556
  }
539
557
  )
@@ -545,9 +563,8 @@ var AvatarGroup = ({
545
563
  remainingCount > 0 && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box, { marginLeft: overlap, zIndex: 0, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
546
564
  Avatar,
547
565
  {
548
- size: internalSize,
549
- text: `+${remainingCount}`,
550
- stroke,
566
+ size,
567
+ text: remainingCount > 99 ? "99+" : `+${remainingCount}`,
551
568
  backgroundColor: theme.colors.background.secondary,
552
569
  disableHover: true,
553
570
  "aria-label": `${remainingCount} more ${remainingCount === 1 ? "user" : "users"}`
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.tsx","../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/Text.tsx","../../../../foundation/primitives-native/src/Icon.tsx","../../src/Avatar.tsx","../../src/AvatarGroup.tsx"],"sourcesContent":["export * from \"./Avatar\";\nexport * from \"./AvatarGroup\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport {\n Text as RNText,\n TextStyle,\n AccessibilityRole,\n StyleSheet,\n} from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nconst parseNumericValue = (\n value: string | number | undefined\n): number | undefined => {\n if (value === undefined) return undefined;\n if (typeof value === \"number\") return value;\n const parsed = parseFloat(value);\n return isNaN(parsed) ? undefined : parsed;\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n textAlign,\n lineHeight,\n numberOfLines,\n id,\n role,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Icon: React.FC<IconProps> = ({ children, color, size }) => {\n const style: ViewStyle = {\n width: typeof size === \"number\" ? size : undefined,\n height: typeof size === \"number\" ? size : undefined,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n // On native, we try to pass the color down to children (like Text primitives)\n // to mimic the CSS inheritance behavior of the web version.\n const childrenWithProps = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, {\n color: child.props.color || color,\n // Also pass size if child seems to be an icon that needs it\n size: child.props.size || size,\n });\n }\n return child;\n });\n\n return <View style={style}>{childrenWithProps}</View>;\n};\n","import React from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport { Badge } from \"@xsolla/xui-badge\";\nimport { User } from \"@xsolla/xui-icons-base\";\n\nexport interface AvatarProps extends ThemeOverrideProps {\n /** Image source URL */\n src?: string;\n /** Icon component to display when no image is provided */\n icon?: React.ReactNode;\n /** Text/Initials to display when no image or icon is provided */\n text?: string;\n /** Size of the avatar */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\" | \"xxs\";\n /** If true, the avatar will be square with small border radius. If false, it will be a circle. */\n square?: boolean;\n /** Whether to show an alert badge */\n badge?: boolean;\n /** Number or text to display in the badge notification */\n badgeCount?: React.ReactNode;\n /** If true, the avatar will have a border to separate it from other avatars in a group */\n stroke?: boolean;\n /** Background color for the avatar. Defaults to theme background secondary. */\n backgroundColor?: string;\n /** Disable hover effect. Used internally by AvatarGroup. */\n disableHover?: boolean;\n /** Accessible label for the avatar. Recommended for screen readers. */\n \"aria-label\"?: string;\n /** Alternative text for the avatar image */\n alt?: string;\n /** Click handler for the avatar */\n onClick?: () => void;\n /** Color tone for the badge */\n badgeTone?:\n | \"primary\"\n | \"secondary\"\n | \"brand\"\n | \"brandExtra\"\n | \"success\"\n | \"warning\"\n | \"alert\"\n | \"neutral\";\n}\n\nexport const Avatar: React.FC<AvatarProps> = ({\n src,\n icon,\n text,\n size = \"xl\",\n square = false,\n badge = false,\n badgeCount,\n badgeTone = \"alert\",\n stroke = false,\n backgroundColor,\n disableHover = true,\n \"aria-label\": ariaLabel,\n alt,\n onClick,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n const sizeStyles = theme.sizing.avatar(size);\n\n // Border radius based on square or circle variant\n const borderRadius = square\n ? sizeStyles.borderRadiusSquare\n : sizeStyles.borderRadiusCircle;\n\n const countSizeMap = {\n xl: \"xl\",\n lg: \"xl\",\n md: \"lg\",\n sm: \"lg\",\n xs: \"sm\",\n xxs: \"xs\",\n } as const;\n const dotSizeMap = {\n xl: \"md\",\n lg: \"md\",\n md: \"sm\",\n sm: \"sm\",\n xs: \"sm\",\n xxs: \"xs\",\n } as const;\n const badgeSize = badgeCount ? countSizeMap[size] : dotSizeMap[size];\n\n // Badge offset differs for circle vs square, and for dot vs count\n // Dot badge (8px) needs different offset per avatar size\n const getDotOffset = () => {\n if (square) {\n return size === \"xxs\" ? { right: -1, top: -1 } : { right: -3, top: -3 };\n }\n // Circle - position dot on the edge based on avatar size\n const circleOffsets = {\n xl: { right: 2, top: 2 },\n lg: { right: 2, top: 2 },\n md: { right: 2, top: 2 },\n sm: { right: 2, top: 2 },\n xs: { right: 0, top: 0 },\n xxs: { right: 1, top: 1 },\n };\n return circleOffsets[size];\n };\n\n const badgeOffset = badgeCount\n ? square\n ? sizeStyles.badgeOffsetSquare\n : sizeStyles.badgeOffsetCircle\n : getDotOffset();\n\n // Display badge count\n const displayBadgeCount = badgeCount;\n\n return (\n <Box\n width={sizeStyles.size}\n height={sizeStyles.size}\n position=\"relative\"\n {...(!src && { role: \"img\", \"aria-label\": ariaLabel })}\n {...(onClick && {\n onPress: onClick,\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onClick();\n }\n },\n cursor: \"pointer\",\n role: \"button\",\n tabIndex: 0,\n })}\n >\n <Box\n width={sizeStyles.size}\n height={sizeStyles.size}\n borderRadius={borderRadius}\n backgroundColor={backgroundColor || theme.colors.overlay.mono}\n alignItems=\"center\"\n justifyContent=\"center\"\n position=\"relative\"\n overflow=\"hidden\"\n borderWidth={stroke ? 1 : 0}\n borderColor={theme.colors.background.primary}\n {...(!disableHover &&\n !src && {\n hoverStyle: {\n backgroundColor: theme.colors.overlay.monoHover,\n },\n })}\n >\n {src ? (\n <Box\n as=\"img\"\n src={src}\n alt={alt || ariaLabel || \"\"}\n position=\"absolute\"\n top={0}\n left={0}\n width={sizeStyles.size}\n height={sizeStyles.size}\n borderRadius={borderRadius}\n />\n ) : icon ? (\n <Icon size={sizeStyles.iconSize} color={theme.colors.content.primary}>\n {icon}\n </Icon>\n ) : text ? (\n <Text\n fontSize={sizeStyles.fontSize}\n color={theme.colors.content.primary}\n fontWeight=\"400\"\n letterSpacing={0.4}\n >\n {text}\n </Text>\n ) : (\n <User\n size={sizeStyles.iconSize}\n color={theme.colors.content.primary}\n />\n )}\n </Box>\n\n {badge && (\n <Box\n position=\"absolute\"\n right={badgeOffset.right}\n top={badgeOffset.top}\n >\n <Badge\n size={badgeSize}\n tone={badgeTone}\n showStroke={size !== \"xxs\"}\n aria-label={\n displayBadgeCount\n ? `${displayBadgeCount} notifications`\n : \"Notification\"\n }\n >\n {displayBadgeCount}\n </Badge>\n </Box>\n )}\n </Box>\n );\n};\n","import React from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport { Tooltip } from \"@xsolla/xui-tooltip\";\nimport { Avatar } from \"./Avatar\";\n\n/** Theme type from the design system */\ntype Theme = ReturnType<typeof useResolvedTheme>[\"theme\"];\n\n/** Item in the avatar group list */\nexport interface AvatarGroupItem {\n /** Image source URL */\n src?: string;\n /** Initials to display when no image is provided */\n initials?: string;\n /** Click handler for the avatar */\n onClick?: () => void;\n /** Tooltip text to display on hover */\n tooltip?: string;\n}\n\n/** Avatar background mode - preset colors, 'mixed' for cycling, or a theme function */\nexport type AvatarBackgroundMode =\n | \"mixed\"\n | \"brand\"\n | \"brandExtra\"\n | \"success\"\n | \"warning\"\n | \"alert\"\n | \"neutral\"\n | ((theme: Theme) => string);\n\nexport interface AvatarGroupProps extends ThemeOverrideProps {\n /**\n * List of avatars to display in the group.\n * `tooltip` property is text to be displayed in the tooltip when hovering over the avatar.\n */\n list: AvatarGroupItem[];\n /** Size of the avatars in the group */\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n /**\n * The maximum number of avatars to display before collapsing the rest into a \"+N\" counter.\n * If the number of avatars exceeds this value, the extra avatars will be hidden.\n */\n maxVisible?: number;\n /** Whether to show a stroke/border around each avatar */\n stroke?: boolean;\n /**\n * Controls the background color mode for avatars in the group.\n * - 'mixed' (default): Avatars cycle through different colors\n * - 'brand', 'brandExtra', 'success', 'warning', 'alert', 'neutral': Single color for all avatars\n * - Theme function: A function that receives theme and returns any color from the design system.\n * Example: (theme) => theme.colors.core.link.link\n */\n avatarBackgroundMode?: AvatarBackgroundMode;\n /** Accessible label for the avatar group. Defaults to \"Group of X users\". */\n \"aria-label\"?: string;\n}\n\n// Map external size values to internal Avatar size values\nconst sizeMap: Record<\n \"sm\" | \"md\" | \"lg\" | \"xl\",\n \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\"\n> = {\n sm: \"sm\",\n md: \"md\",\n lg: \"lg\",\n xl: \"xl\",\n};\n\nexport const AvatarGroup: React.FC<AvatarGroupProps> = ({\n list,\n size = \"md\",\n maxVisible = 6,\n stroke = true,\n avatarBackgroundMode = \"mixed\",\n \"aria-label\": ariaLabel,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n // Map external size to internal Avatar size\n const internalSize = sizeMap[size];\n\n const totalCount = list.length;\n\n // Determine which avatars to show\n // Ensure maxVisible is non-negative and doesn't exceed totalCount\n const visibleCount = Math.min(totalCount, Math.max(0, maxVisible));\n const visibleListItems = list.slice(0, visibleCount);\n const remainingCount = totalCount - visibleCount;\n\n // Overlap amount: 4px in Figma\n const overlap = -4;\n\n // Background colors for text/icon avatars (cycling through theme colors)\n const mixedBackgrounds = [\n theme.colors.background.alert.secondary,\n theme.colors.background.warning.secondary,\n theme.colors.background.brandExtra.secondary,\n theme.colors.background.neutral.secondary,\n theme.colors.background.brand.secondary,\n theme.colors.background.success.secondary,\n theme.colors.background.success.primary,\n ];\n\n // Preset color mapping\n const presetColors: Record<string, string> = {\n brand: theme.colors.background.brand.secondary,\n brandExtra: theme.colors.background.brandExtra.secondary,\n success: theme.colors.background.success.secondary,\n warning: theme.colors.background.warning.secondary,\n alert: theme.colors.background.alert.secondary,\n neutral: theme.colors.background.neutral.secondary,\n };\n\n // Get background color based on avatarBackgroundMode\n const getBackgroundColor = (index: number): string => {\n if (typeof avatarBackgroundMode === \"function\") {\n return avatarBackgroundMode(theme);\n }\n if (avatarBackgroundMode === \"mixed\") {\n return mixedBackgrounds[index % mixedBackgrounds.length];\n }\n // Preset color mode\n return (\n presetColors[avatarBackgroundMode] || theme.colors.background.secondary\n );\n };\n\n // Default accessible label for the group\n const defaultAriaLabel =\n totalCount === 1\n ? \"1 user\"\n : totalCount === visibleCount\n ? `${totalCount} users`\n : `${visibleCount} of ${totalCount} users`;\n\n // Render an avatar with optional tooltip wrapper\n const renderAvatarWithTooltip = (\n avatar: React.ReactNode,\n tooltip: string | undefined,\n key: number\n ) => {\n if (tooltip) {\n return (\n <Tooltip key={key} content={tooltip} placement=\"top\">\n {avatar}\n </Tooltip>\n );\n }\n return avatar;\n };\n\n return (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n role=\"group\"\n aria-label={ariaLabel || defaultAriaLabel}\n >\n {visibleListItems.map((item, index) => {\n const shouldApplyBackground = !item.src;\n const backgroundColor = shouldApplyBackground\n ? getBackgroundColor(index)\n : undefined;\n\n // Only enable hover for image avatars with onClick\n const shouldEnableHover = !!item.src && !!item.onClick;\n\n const avatar = (\n <Box\n key={index}\n marginLeft={index === 0 ? 0 : overlap}\n zIndex={totalCount - index}\n >\n <Avatar\n src={item.src}\n text={item.initials}\n size={internalSize}\n stroke={stroke}\n backgroundColor={backgroundColor}\n disableHover={!shouldEnableHover}\n onClick={item.onClick}\n {...(item.tooltip ? { \"aria-label\": item.tooltip } : {})}\n />\n </Box>\n );\n\n return renderAvatarWithTooltip(avatar, item.tooltip, index);\n })}\n\n {remainingCount > 0 && (\n <Box marginLeft={overlap} zIndex={0}>\n <Avatar\n size={internalSize}\n text={`+${remainingCount}`}\n stroke={stroke}\n backgroundColor={theme.colors.background.secondary}\n disableHover={true}\n aria-label={`${remainingCount} more ${remainingCount === 1 ? \"user\" : \"users\"}`}\n />\n </Box>\n )}\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,0BAQO;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,CAAC,aAAkC;AAAA,IAC3D,iBACE,WAAW,YAAY,kBACnB,WAAW,kBACX;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,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,QAAQ,IAAI,CAAC;AAAA;AAAA,cACxD;AAAA;AAAA,YAbK;AAAA,UAcP;AAGF,iBAAO,wBAAwB,QAAQ,KAAK,SAAS,KAAK;AAAA,QAC5D,CAAC;AAAA,QAEA,iBAAiB,KAChB,6CAAC,OAAI,YAAY,SAAS,QAAQ,GAChC;AAAA,UAAC;AAAA;AAAA,YACC,MAAM;AAAA,YACN,MAAM,IAAI,cAAc;AAAA,YACxB;AAAA,YACA,iBAAiB,MAAM,OAAO,WAAW;AAAA,YACzC,cAAc;AAAA,YACd,cAAY,GAAG,cAAc,SAAS,mBAAmB,IAAI,SAAS,OAAO;AAAA;AAAA,QAC/E,GACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["import_react_native","import_jsx_runtime","RNText","import_react_native","import_jsx_runtime","React","import_jsx_runtime","import_xui_core","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../src/index.tsx","../../src/Avatar.tsx","../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/Text.tsx","../../../../foundation/primitives-native/src/Icon.tsx","../../src/AvatarGroup.tsx"],"sourcesContent":["export * from \"./Avatar\";\nexport * from \"./AvatarGroup\";\n","import React from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport { Badge } from \"@xsolla/xui-badge\";\nimport { User } from \"@xsolla/xui-icons-base\";\n\nexport interface AvatarProps extends ThemeOverrideProps {\n /** Image source URL */\n src?: string;\n /** Icon component to display when no image is provided */\n icon?: React.ReactNode;\n /** Text/Initials to display when no image or icon is provided */\n text?: string;\n /** Size of the avatar */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\" | \"xxs\";\n /** If true, the avatar will be square with small border radius. If false, it will be a circle. */\n square?: boolean;\n /** Visual tone — 'mono' (default) or 'brand'. */\n tone?: \"mono\" | \"brand\";\n /** Whether to show an alert badge */\n badge?: boolean;\n /** Number or text to display in the badge notification */\n badgeCount?: React.ReactNode;\n /** Icon to display in the badge */\n badgeIcon?: React.ReactNode;\n /**\n * Background colour override. Intended for internal use by AvatarGroup to\n * drive its `avatarBackgroundMode` cycling; not part of the public API.\n * @internal\n */\n backgroundColor?: string;\n /** Disable hover effect. Used internally by AvatarGroup. */\n disableHover?: boolean;\n /** Accessible label for the avatar. Recommended for screen readers. */\n \"aria-label\"?: string;\n /** Alternative text for the avatar image */\n alt?: string;\n /** Click handler for the avatar */\n onClick?: () => void;\n /** Color tone for the badge */\n badgeTone?:\n | \"primary\"\n | \"secondary\"\n | \"brand\"\n | \"brandExtra\"\n | \"success\"\n | \"warning\"\n | \"alert\"\n | \"neutral\";\n}\n\nexport const Avatar: React.FC<AvatarProps> = ({\n src,\n icon,\n text,\n size = \"xl\",\n square = false,\n tone = \"mono\",\n badge = false,\n badgeCount,\n badgeIcon,\n badgeTone = \"alert\",\n backgroundColor,\n disableHover = true,\n \"aria-label\": ariaLabel,\n alt,\n onClick,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n const [hasImageError, setHasImageError] = React.useState(false);\n\n React.useEffect(() => {\n setHasImageError(false);\n }, [src]);\n\n const useImage = !!src && !hasImageError;\n\n const sizeStyles = theme.sizing.avatar(size);\n\n const toneBackground =\n tone === \"brand\"\n ? theme.colors.background.brand.primary\n : theme.colors.overlay.mono;\n const toneHoverBackground =\n tone === \"brand\"\n ? theme.colors.background.brand.secondary\n : theme.colors.overlay.monoHover;\n const toneContent =\n tone === \"brand\"\n ? theme.colors.content.on.brand\n : theme.colors.content.primary;\n\n // Border radius based on square or circle variant\n const borderRadius = square\n ? sizeStyles.borderRadiusSquare\n : sizeStyles.borderRadiusCircle;\n\n const countSizeMap = {\n xl: \"xl\",\n lg: \"xl\",\n md: \"lg\",\n sm: \"lg\",\n xs: \"sm\",\n xxs: \"xs\",\n } as const;\n const dotSizeMap = {\n xl: \"md\",\n lg: \"md\",\n md: \"sm\",\n sm: \"sm\",\n xs: \"sm\",\n xxs: \"xs\",\n } as const;\n const hasBadgeContent = !!(badgeCount || badgeIcon);\n const badgeSize = hasBadgeContent ? countSizeMap[size] : dotSizeMap[size];\n // Badge sizes sm/xs are dot-only — content is dropped, so position as a dot.\n const rendersAsDot = badgeSize === \"sm\" || badgeSize === \"xs\";\n\n // Badge offset differs for circle vs square, and for dot vs count\n // Dot badge (8px) needs different offset per avatar size\n const getDotOffset = () => {\n if (square) {\n return size === \"xxs\" ? { right: -1, top: -1 } : { right: -3, top: -3 };\n }\n // Circle - position dot on the edge based on avatar size\n const circleOffsets = {\n xl: { right: 2, top: 2 },\n lg: { right: 2, top: 2 },\n md: { right: 2, top: 2 },\n sm: { right: 2, top: 2 },\n xs: { right: 0, top: 0 },\n xxs: { right: 1, top: 1 },\n };\n return circleOffsets[size];\n };\n\n const badgeOffset =\n hasBadgeContent && !rendersAsDot\n ? square\n ? sizeStyles.badgeOffsetSquare\n : sizeStyles.badgeOffsetCircle\n : getDotOffset();\n\n // Display badge count\n const displayBadgeCount = badgeCount;\n\n return (\n <Box\n width={sizeStyles.size}\n height={sizeStyles.size}\n position=\"relative\"\n {...(!useImage && { role: \"img\", \"aria-label\": ariaLabel })}\n {...(onClick && {\n onPress: onClick,\n onKeyDown: (e: React.KeyboardEvent) => {\n if (e.key === \"Enter\" || e.key === \" \") {\n e.preventDefault();\n onClick();\n }\n },\n cursor: \"pointer\",\n role: \"button\",\n tabIndex: 0,\n })}\n >\n <Box\n width={sizeStyles.size}\n height={sizeStyles.size}\n borderRadius={borderRadius}\n backgroundColor={backgroundColor || toneBackground}\n alignItems=\"center\"\n justifyContent=\"center\"\n position=\"relative\"\n overflow=\"hidden\"\n borderWidth={2}\n borderColor={theme.colors.border.secondary}\n {...(!disableHover &&\n !useImage && {\n hoverStyle: {\n backgroundColor: toneHoverBackground,\n },\n })}\n >\n {useImage ? (\n <Box\n as=\"img\"\n src={src}\n alt={alt || ariaLabel || \"\"}\n position=\"absolute\"\n top={0}\n left={0}\n width=\"100%\"\n height=\"100%\"\n borderRadius={borderRadius}\n onError={() => setHasImageError(true)}\n />\n ) : icon ? (\n <Icon size={sizeStyles.iconSize} color={toneContent}>\n {icon}\n </Icon>\n ) : text ? (\n <Text\n fontSize={sizeStyles.fontSize}\n color={toneContent}\n fontWeight=\"400\"\n letterSpacing={0.4}\n >\n {text}\n </Text>\n ) : (\n <User\n variant=\"solid\"\n size={sizeStyles.iconSize}\n color={toneContent}\n />\n )}\n </Box>\n\n {badge && (\n <Box\n position=\"absolute\"\n right={badgeOffset.right}\n top={badgeOffset.top}\n >\n <Badge\n size={badgeSize}\n tone={badgeTone}\n icon={badgeIcon}\n showStroke={size !== \"xxs\"}\n aria-label={\n displayBadgeCount\n ? `${displayBadgeCount} notifications`\n : \"Notification\"\n }\n >\n {displayBadgeCount}\n </Badge>\n </Box>\n )}\n </Box>\n );\n};\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport {\n Text as RNText,\n TextStyle,\n AccessibilityRole,\n StyleSheet,\n} from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nconst parseNumericValue = (\n value: string | number | undefined\n): number | undefined => {\n if (value === undefined) return undefined;\n if (typeof value === \"number\") return value;\n const parsed = parseFloat(value);\n return isNaN(parsed) ? undefined : parsed;\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n textAlign,\n lineHeight,\n numberOfLines,\n id,\n role,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Icon: React.FC<IconProps> = ({ children, color, size }) => {\n const style: ViewStyle = {\n width: typeof size === \"number\" ? size : undefined,\n height: typeof size === \"number\" ? size : undefined,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n // On native, we try to pass the color down to children (like Text primitives)\n // to mimic the CSS inheritance behavior of the web version.\n const childrenWithProps = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, {\n color: child.props.color || color,\n // Also pass size if child seems to be an icon that needs it\n size: child.props.size || size,\n });\n }\n return child;\n });\n\n return <View style={style}>{childrenWithProps}</View>;\n};\n","import React from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport { Tooltip } from \"@xsolla/xui-tooltip\";\nimport { Avatar, AvatarProps } from \"./Avatar\";\n\n/** Theme type from the design system */\ntype Theme = ReturnType<typeof useResolvedTheme>[\"theme\"];\n\n/** Item in the avatar group list */\nexport interface AvatarGroupItem {\n /** Image source URL */\n src?: string;\n /** Initials to display when no image is provided */\n initials?: string;\n /** Tooltip text to display on hover */\n tooltip?: string;\n /** Whether to show a badge on the avatar */\n badge?: boolean;\n /** Number or text to display in the badge notification */\n badgeCount?: React.ReactNode;\n /** Icon to display in the badge */\n badgeIcon?: React.ReactNode;\n /** Color tone for the badge */\n badgeTone?: AvatarProps[\"badgeTone\"];\n}\n\n/** Avatar background mode - preset colors, 'mixed' for cycling, or a theme function */\nexport type AvatarBackgroundMode =\n | \"mixed\"\n | \"brand\"\n | \"brandExtra\"\n | \"success\"\n | \"warning\"\n | \"alert\"\n | \"neutral\"\n | ((theme: Theme) => string);\n\nexport interface AvatarGroupProps extends ThemeOverrideProps {\n /**\n * List of avatars to display in the group.\n * `tooltip` property is text to be displayed in the tooltip when hovering over the avatar.\n */\n list: AvatarGroupItem[];\n /** Size of the avatars in the group */\n size?: \"xxs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n /**\n * Maximum number of slots rendered, including the \"+N\" overflow counter.\n * When the list exceeds this, (maxVisible - 1) avatars are shown plus a \"+N\" indicator.\n * When the list fits, all avatars are shown and no \"+N\" is rendered.\n */\n maxVisible?: number;\n /**\n * Controls the background color mode for avatars in the group.\n * - 'mixed' (default): Avatars cycle through different colors\n * - 'brand', 'brandExtra', 'success', 'warning', 'alert', 'neutral': Single color for all avatars\n * - Theme function: A function that receives theme and returns any color from the design system.\n * Example: (theme) => theme.colors.core.link.link\n */\n avatarBackgroundMode?: AvatarBackgroundMode;\n /** Accessible label for the avatar group. Defaults to \"Group of X users\". */\n \"aria-label\"?: string;\n}\n\nconst DEFAULT_MAX_VISIBLE = 6;\n\nexport const AvatarGroup: React.FC<AvatarGroupProps> = ({\n list,\n size = \"sm\",\n maxVisible = DEFAULT_MAX_VISIBLE,\n avatarBackgroundMode = \"mixed\",\n \"aria-label\": ariaLabel,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n if (maxVisible < 1) {\n console.warn(\n `[AvatarGroup] \"maxVisible\" must be a positive number. Received ${maxVisible}, falling back to default (${DEFAULT_MAX_VISIBLE}).`\n );\n }\n const effectiveMaxVisible = maxVisible < 1 ? DEFAULT_MAX_VISIBLE : maxVisible;\n\n const totalCount = list.length;\n const overflows = totalCount > effectiveMaxVisible;\n const visibleCount = overflows ? effectiveMaxVisible - 1 : totalCount;\n const visibleListItems = list.slice(0, visibleCount);\n const remainingCount = totalCount - visibleCount;\n\n // Overlap amount: 4px in Figma\n const overlap = -4;\n\n // Background colors for text/icon avatars (cycling through theme colors)\n const mixedBackgrounds = [\n theme.colors.background.alert.secondary,\n theme.colors.background.warning.secondary,\n theme.colors.background.brandExtra.secondary,\n theme.colors.background.neutral.secondary,\n theme.colors.background.brand.secondary,\n theme.colors.background.success.secondary,\n theme.colors.background.success.primary,\n ];\n\n // Preset color mapping\n const presetColors: Record<string, string> = {\n brand: theme.colors.background.brand.secondary,\n brandExtra: theme.colors.background.brandExtra.secondary,\n success: theme.colors.background.success.secondary,\n warning: theme.colors.background.warning.secondary,\n alert: theme.colors.background.alert.secondary,\n neutral: theme.colors.background.neutral.secondary,\n };\n\n // Get background color based on avatarBackgroundMode\n const getBackgroundColor = (index: number): string => {\n if (typeof avatarBackgroundMode === \"function\") {\n return avatarBackgroundMode(theme);\n }\n if (avatarBackgroundMode === \"mixed\") {\n return mixedBackgrounds[index % mixedBackgrounds.length];\n }\n // Preset color mode\n return (\n presetColors[avatarBackgroundMode] || theme.colors.background.secondary\n );\n };\n\n // Default accessible label for the group\n const defaultAriaLabel =\n totalCount === 1\n ? \"1 user\"\n : totalCount === visibleCount\n ? `${totalCount} users`\n : `${visibleCount} of ${totalCount} users`;\n\n // Render an avatar with optional tooltip wrapper\n const renderAvatarWithTooltip = (\n avatar: React.ReactNode,\n tooltip: string | undefined,\n key: number\n ) => {\n if (tooltip) {\n return (\n <Tooltip key={key} content={tooltip} placement=\"top\">\n {avatar}\n </Tooltip>\n );\n }\n return avatar;\n };\n\n return (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n role=\"group\"\n aria-label={ariaLabel || defaultAriaLabel}\n >\n {visibleListItems.map((item, index) => {\n const shouldApplyBackground = !item.src;\n const backgroundColor = shouldApplyBackground\n ? getBackgroundColor(index)\n : undefined;\n\n const avatar = (\n <Box\n key={index}\n marginLeft={index === 0 ? 0 : overlap}\n zIndex={totalCount - index}\n >\n <Avatar\n src={item.src}\n text={item.initials}\n size={size}\n backgroundColor={backgroundColor}\n disableHover={true}\n badge={item.badge}\n badgeCount={item.badgeCount}\n badgeIcon={item.badgeIcon}\n badgeTone={item.badgeTone}\n {...(item.tooltip ? { \"aria-label\": item.tooltip } : {})}\n />\n </Box>\n );\n\n return renderAvatarWithTooltip(avatar, item.tooltip, index);\n })}\n\n {remainingCount > 0 && (\n <Box marginLeft={overlap} zIndex={0}>\n <Avatar\n size={size}\n text={remainingCount > 99 ? \"99+\" : `+${remainingCount}`}\n backgroundColor={theme.colors.background.secondary}\n disableHover={true}\n aria-label={`${remainingCount} more ${remainingCount === 1 ? \"user\" : \"users\"}`}\n />\n </Box>\n )}\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAkB;;;ACClB,0BAQO;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAA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GAChC;AAAA,UAAC;AAAA;AAAA,YACC;AAAA,YACA,MAAM,iBAAiB,KAAK,QAAQ,IAAI,cAAc;AAAA,YACtD,iBAAiB,MAAM,OAAO,WAAW;AAAA,YACzC,cAAc;AAAA,YACd,cAAY,GAAG,cAAc,SAAS,mBAAmB,IAAI,SAAS,OAAO;AAAA;AAAA,QAC/E,GACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["import_react","import_react_native","import_jsx_runtime","RNText","import_react_native","import_jsx_runtime","React","import_jsx_runtime","React","import_xui_core","import_jsx_runtime"]}