@xsolla/xui-b2c-media-card 0.217.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/native/index.d.mts +64 -0
- package/native/index.d.ts +64 -0
- package/native/index.js +542 -0
- package/native/index.js.map +1 -0
- package/native/index.mjs +522 -0
- package/native/index.mjs.map +1 -0
- package/package.json +56 -0
- package/web/index.d.mts +64 -0
- package/web/index.d.ts +64 -0
- package/web/index.js +4114 -0
- package/web/index.js.map +1 -0
- package/web/index.mjs +4100 -0
- package/web/index.mjs.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/index.tsx","../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/Text.tsx","../../../../foundation/primitives-native/src/index.tsx","../../src/MediaCard.tsx"],"sourcesContent":["export { MediaCard } from \"./MediaCard\";\n\nexport type { MediaCardProps, MediaCardOrientation } from \"./types\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n AccessibilityRole,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleToAccessibilityRole: Record<string, AccessibilityRole> = {\n button: \"button\",\n link: \"link\",\n img: \"image\",\n image: \"image\",\n summary: \"summary\",\n switch: \"switch\",\n checkbox: \"checkbox\",\n radio: \"radio\",\n heading: \"header\",\n text: \"text\",\n search: \"search\",\n alert: \"alert\",\n none: \"none\",\n presentation: \"none\",\n progressbar: \"progressbar\",\n scrollbar: \"scrollbar\",\n adjustable: \"adjustable\",\n tab: \"tab\",\n menu: \"menu\",\n menuitem: \"menuitem\",\n list: \"list\",\n timer: \"timer\",\n};\n\n/** RN ViewStyle.gap is typed as number (Yoga gap), not DimensionValue. */\nconst toGapValue = (gap: number | string | undefined): number | undefined => {\n if (gap === undefined) return undefined;\n if (typeof gap === \"number\") return gap;\n const pxMatch = /^(\\d+(?:\\.\\d+)?)px$/.exec(gap);\n if (pxMatch) return Number(pxMatch[1]);\n const asNumber = Number(gap);\n return Number.isFinite(asNumber) ? asNumber : undefined;\n};\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 flexWrap,\n alignItems,\n justifyContent,\n alignSelf,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n flexShrink,\n gap,\n overflow,\n opacity,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n disabled,\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 opacity: opacity ?? (disabled ? 0.5 : undefined),\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 flexWrap,\n alignItems,\n justifyContent,\n alignSelf,\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 flexShrink,\n gap: toGapValue(gap),\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Map web a11y props; drop the rest of the web-only attributes before\n // spreading onto RN hosts (unknown props warn at runtime).\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 \"aria-busy\": ariaBusy,\n className,\n \"data-testid\": _dataTestId,\n cursor: _cursor,\n type: _type,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n const accessibilityRole =\n (typeof role === \"string\" && roleToAccessibilityRole[role]) ||\n (as === \"button\" ? \"button\" : undefined);\n const isDisabled = Boolean(disabled || ariaDisabled);\n const accessibilityState = {\n disabled: isDisabled || undefined,\n busy: Boolean(ariaBusy) || undefined,\n };\n const accessibilityLiveRegion =\n ariaLive === \"polite\" || ariaLive === \"assertive\" ? ariaLive : undefined;\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 accessibilityLabel={typeof ariaLabel === \"string\" ? ariaLabel : alt}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n // Prefer Pressable whenever the node is interactive or explicitly a button,\n // so disabled / aria-disabled controls stay in the a11y tree as buttons.\n if (onPress || as === \"button\") {\n return (\n <Pressable\n onPress={!isDisabled && onPress ? onPress : undefined}\n disabled={isDisabled}\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 accessibilityRole={accessibilityRole}\n accessibilityLabel={\n typeof ariaLabel === \"string\" ? ariaLabel : undefined\n }\n accessibilityState={accessibilityState}\n accessibilityLiveRegion={accessibilityLiveRegion}\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 accessibilityRole={accessibilityRole}\n accessibilityLabel={typeof ariaLabel === \"string\" ? ariaLabel : undefined}\n accessibilityState={accessibilityState}\n accessibilityLiveRegion={accessibilityLiveRegion}\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 testID,\n \"data-testid\": dataTestId,\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={dataTestId || testID || id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n","export * from \"./Box\";\nexport * from \"./Text\";\nexport * from \"./Spinner\";\nexport * from \"./Icon\";\nexport * from \"./Divider\";\nexport * from \"./Input\";\nexport * from \"./TextArea\";\nexport * from \"./LinearGradient\";\n\nexport const isWeb = false;\nexport const isNative = true;\n","import React from \"react\";\n// @ts-expect-error resolved at build time to web/native primitives\nimport { Box, Text, isWeb } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport type { MediaCardOrientation, MediaCardProps } from \"./types\";\n\n/**\n * Figma `MediaCard` (743:3142) on the B2C Components page. The component set\n * declares three properties — `Orientation`, `Rewarded` and `Watch Button` —\n * which map onto `orientation`, `rewarded` and `showWatchButton`.\n *\n * Both orientations share the 8 px radius, the 1 px inside stroke and the\n * clipped full-bleed thumbnail; only the frame's aspect changes.\n */\nconst FRAME: Record<MediaCardOrientation, { width: number; height: number }> = {\n horizontal: { width: 319, height: 179 },\n vertical: { width: 95, height: 169 },\n};\n\nconst CARD_RADIUS = 8;\n\n/** The Watch control: a filled brand-extra pill centred over the thumbnail. */\nconst WATCH_RADIUS = 4;\nconst WATCH_PADDING_X = 16;\nconst WATCH_PADDING_Y = 8;\nconst WATCH_GAP = 8;\nconst WATCH_FONT_SIZE = 14;\nconst WATCH_LINE_HEIGHT = 20;\nconst WATCH_FONT_WEIGHT = \"500\";\nconst REWARD_GLYPH_SIZE = 16;\n\ntype WatchControlProps = {\n label: string;\n accessibleName: string;\n disabled: boolean;\n onPress?: () => void;\n background: string;\n foreground: string;\n fontFamily: string;\n children?: React.ReactNode;\n};\n\n/**\n * On web this is a real `<button>`: it stops the press from also reaching the\n * plate's own `onPress`, and it gets keyboard activation and focus for free.\n * Native has no bubbling `onPress` to stop, so a `Box` with the accessibility\n * role is enough. Same split as the B2B MediaCard's `ActionButton`.\n */\nconst WatchControl = ({\n label,\n accessibleName,\n disabled,\n onPress,\n background,\n foreground,\n fontFamily,\n children,\n}: WatchControlProps) => {\n if (isWeb) {\n return (\n <button\n type=\"button\"\n aria-label={accessibleName}\n disabled={disabled}\n data-testid=\"media-card-watch\"\n onClick={(event) => {\n event.stopPropagation();\n onPress?.();\n }}\n style={{\n alignItems: \"center\",\n background,\n border: 0,\n borderRadius: WATCH_RADIUS,\n color: foreground,\n cursor: onPress && !disabled ? \"pointer\" : \"default\",\n display: \"inline-flex\",\n fontFamily,\n fontSize: WATCH_FONT_SIZE,\n fontWeight: WATCH_FONT_WEIGHT,\n gap: WATCH_GAP,\n lineHeight: `${WATCH_LINE_HEIGHT}px`,\n margin: 0,\n padding: `${WATCH_PADDING_Y}px ${WATCH_PADDING_X}px`,\n whiteSpace: \"nowrap\",\n zIndex: 10,\n }}\n >\n <span data-testid=\"media-card-watch-label\">{label}</span>\n {children}\n </button>\n );\n }\n\n return (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={WATCH_GAP}\n paddingHorizontal={WATCH_PADDING_X}\n paddingVertical={WATCH_PADDING_Y}\n borderRadius={WATCH_RADIUS}\n backgroundColor={background}\n zIndex={10}\n onPress={disabled ? undefined : onPress}\n accessibilityRole=\"button\"\n accessibilityLabel={accessibleName}\n testID=\"media-card-watch\"\n >\n <Text\n color={foreground}\n fontFamily={fontFamily}\n fontSize={WATCH_FONT_SIZE}\n lineHeight={WATCH_LINE_HEIGHT}\n fontWeight={WATCH_FONT_WEIGHT}\n numberOfLines={1}\n testID=\"media-card-watch-label\"\n >\n {label}\n </Text>\n {children}\n </Box>\n );\n};\n\nexport const MediaCard: React.FC<MediaCardProps> = ({\n src,\n mediaName,\n alt = \"\",\n orientation = \"horizontal\",\n rewarded = false,\n rewardIcon,\n showWatchButton = true,\n watchLabel = \"Watch\",\n onWatchPress,\n onPress,\n disabled = false,\n width,\n height,\n testID,\n themeMode,\n themeProductContext = \"b2c\",\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n const frame = FRAME[orientation];\n const isPlateInteractive = Boolean(onPress) && !disabled;\n\n // Figma pins each orientation to a fixed frame, but a card in a real rail has\n // to flex with its column — so the frame width is only a default and it is\n // the aspect ratio, not the height, that is preserved. `height` opts out.\n const aspectRatio = frame.width / frame.height;\n\n /**\n * The accessibility criterion on the ticket: a rail of cards must not\n * announce ten identical \"Watch\" buttons. The visible label stays short while\n * the accessible name carries the media's own name — and the reward, which is\n * otherwise communicated by a glyph alone.\n */\n const watchAccessibleName = rewarded\n ? `${watchLabel} ${mediaName}, rewarded`\n : `${watchLabel} ${mediaName}`;\n\n const plateInteractiveProps =\n isWeb && isPlateInteractive\n ? {\n role: \"button\",\n tabIndex: 0,\n onKeyDown: (event: React.KeyboardEvent) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n onPress?.();\n }\n },\n }\n : {};\n\n return (\n <Box\n width={width ?? frame.width}\n height={height}\n position=\"relative\"\n overflow=\"hidden\"\n borderRadius={CARD_RADIUS}\n borderWidth={1}\n borderStyle=\"solid\"\n borderColor={theme.colors.border.secondary}\n backgroundColor={theme.colors.background.secondary}\n alignItems=\"center\"\n justifyContent=\"center\"\n opacity={disabled ? 0.48 : 1}\n onPress={isPlateInteractive ? onPress : undefined}\n aria-label={mediaName}\n aria-disabled={disabled || undefined}\n {...(!isWeb\n ? { accessibilityLabel: mediaName }\n : {})}\n style={{\n aspectRatio: height ? undefined : aspectRatio,\n ...(isWeb && isPlateInteractive ? { cursor: \"pointer\" as const } : {}),\n }}\n data-testid={testID || \"media-card\"}\n testID={testID || \"media-card\"}\n {...plateInteractiveProps}\n >\n <Box\n as=\"img\"\n src={src}\n alt={alt}\n position=\"absolute\"\n top={0}\n left={0}\n width=\"100%\"\n height=\"100%\"\n style={isWeb ? { objectFit: \"cover\" } : undefined}\n data-testid=\"media-card-thumbnail\"\n testID=\"media-card-thumbnail\"\n />\n\n {showWatchButton && (\n <WatchControl\n label={watchLabel}\n accessibleName={watchAccessibleName}\n disabled={disabled}\n onPress={onWatchPress}\n background={theme.colors.control.brandExtra.primary.bg}\n foreground={theme.colors.content.on.brandExtra}\n fontFamily={theme.fonts.body}\n >\n {rewarded && (\n <Box\n width={REWARD_GLYPH_SIZE}\n height={REWARD_GLYPH_SIZE}\n flexShrink={0}\n alignItems=\"center\"\n justifyContent=\"center\"\n borderRadius={REWARD_GLYPH_SIZE / 2}\n // Figma draws a reward coin here. The glyph is product-specific,\n // so it stays a slot — the fallback is a neutral mark rather than\n // a guess at someone's currency icon. It is decorative either\n // way: the reward is already in the button's accessible name.\n backgroundColor={\n rewardIcon ? undefined : theme.colors.content.on.brandExtra\n }\n aria-hidden\n data-testid=\"media-card-reward\"\n testID=\"media-card-reward\"\n >\n {rewardIcon}\n </Box>\n )}\n </WatchControl>\n )}\n </Box>\n );\n};\n\nMediaCard.displayName = \"MediaCard\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,0BASO;AAwMD;AArMN,IAAM,0BAA6D;AAAA,EACjE,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,cAAc;AAAA,EACd,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,OAAO;AACT;AAGA,IAAM,aAAa,CAAC,QAAyD;AAC3E,MAAI,QAAQ,OAAW,QAAO;AAC9B,MAAI,OAAO,QAAQ,SAAU,QAAO;AACpC,QAAM,UAAU,sBAAsB,KAAK,GAAG;AAC9C,MAAI,QAAS,QAAO,OAAO,QAAQ,CAAC,CAAC;AACrC,QAAM,WAAW,OAAO,GAAG;AAC3B,SAAO,OAAO,SAAS,QAAQ,IAAI,WAAW;AAChD;AAEO,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;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AAO;AAAA,gBACP,QAAQ;AAAA,gBACR,YAAY;AAAA,gBACZ,YAAW;AAAA,gBACX,gBAAe;AAAA,gBACf,cAAc,oBAAoB;AAAA,gBAKlC,iBACE,aAAa,SAAY,MAAM,OAAO,QAAQ,GAAG;AAAA,gBAEnD,eAAW;AAAA,gBACX,eAAY;AAAA,gBACZ,QAAO;AAAA,gBAEN;AAAA;AAAA,YACH;AAAA;AAAA,QAEJ;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,UAAU,cAAc;","names":["import_react_native","import_jsx_runtime","RNText","import_jsx_runtime"]}
|
package/native/index.mjs
ADDED
|
@@ -0,0 +1,522 @@
|
|
|
1
|
+
// ../../foundation/primitives-native/src/Box.tsx
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Pressable,
|
|
5
|
+
Image
|
|
6
|
+
} from "react-native";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
var roleToAccessibilityRole = {
|
|
9
|
+
button: "button",
|
|
10
|
+
link: "link",
|
|
11
|
+
img: "image",
|
|
12
|
+
image: "image",
|
|
13
|
+
summary: "summary",
|
|
14
|
+
switch: "switch",
|
|
15
|
+
checkbox: "checkbox",
|
|
16
|
+
radio: "radio",
|
|
17
|
+
heading: "header",
|
|
18
|
+
text: "text",
|
|
19
|
+
search: "search",
|
|
20
|
+
alert: "alert",
|
|
21
|
+
none: "none",
|
|
22
|
+
presentation: "none",
|
|
23
|
+
progressbar: "progressbar",
|
|
24
|
+
scrollbar: "scrollbar",
|
|
25
|
+
adjustable: "adjustable",
|
|
26
|
+
tab: "tab",
|
|
27
|
+
menu: "menu",
|
|
28
|
+
menuitem: "menuitem",
|
|
29
|
+
list: "list",
|
|
30
|
+
timer: "timer"
|
|
31
|
+
};
|
|
32
|
+
var toGapValue = (gap) => {
|
|
33
|
+
if (gap === void 0) return void 0;
|
|
34
|
+
if (typeof gap === "number") return gap;
|
|
35
|
+
const pxMatch = /^(\d+(?:\.\d+)?)px$/.exec(gap);
|
|
36
|
+
if (pxMatch) return Number(pxMatch[1]);
|
|
37
|
+
const asNumber = Number(gap);
|
|
38
|
+
return Number.isFinite(asNumber) ? asNumber : void 0;
|
|
39
|
+
};
|
|
40
|
+
var Box = ({
|
|
41
|
+
children,
|
|
42
|
+
onPress,
|
|
43
|
+
onLayout,
|
|
44
|
+
onMoveShouldSetResponder,
|
|
45
|
+
onResponderGrant,
|
|
46
|
+
onResponderMove,
|
|
47
|
+
onResponderRelease,
|
|
48
|
+
onResponderTerminate,
|
|
49
|
+
backgroundColor,
|
|
50
|
+
borderColor,
|
|
51
|
+
borderWidth,
|
|
52
|
+
borderBottomWidth,
|
|
53
|
+
borderBottomColor,
|
|
54
|
+
borderTopWidth,
|
|
55
|
+
borderTopColor,
|
|
56
|
+
borderLeftWidth,
|
|
57
|
+
borderLeftColor,
|
|
58
|
+
borderRightWidth,
|
|
59
|
+
borderRightColor,
|
|
60
|
+
borderRadius,
|
|
61
|
+
borderStyle,
|
|
62
|
+
height,
|
|
63
|
+
padding,
|
|
64
|
+
paddingHorizontal,
|
|
65
|
+
paddingVertical,
|
|
66
|
+
margin,
|
|
67
|
+
marginTop,
|
|
68
|
+
marginBottom,
|
|
69
|
+
marginLeft,
|
|
70
|
+
marginRight,
|
|
71
|
+
flexDirection,
|
|
72
|
+
flexWrap,
|
|
73
|
+
alignItems,
|
|
74
|
+
justifyContent,
|
|
75
|
+
alignSelf,
|
|
76
|
+
position,
|
|
77
|
+
top,
|
|
78
|
+
bottom,
|
|
79
|
+
left,
|
|
80
|
+
right,
|
|
81
|
+
width,
|
|
82
|
+
minWidth,
|
|
83
|
+
minHeight,
|
|
84
|
+
maxWidth,
|
|
85
|
+
maxHeight,
|
|
86
|
+
flex,
|
|
87
|
+
flexShrink,
|
|
88
|
+
gap,
|
|
89
|
+
overflow,
|
|
90
|
+
opacity,
|
|
91
|
+
zIndex,
|
|
92
|
+
hoverStyle,
|
|
93
|
+
pressStyle,
|
|
94
|
+
style,
|
|
95
|
+
disabled,
|
|
96
|
+
"data-testid": dataTestId,
|
|
97
|
+
testID,
|
|
98
|
+
as,
|
|
99
|
+
src,
|
|
100
|
+
alt,
|
|
101
|
+
...rest
|
|
102
|
+
}) => {
|
|
103
|
+
const getContainerStyle = (pressed) => ({
|
|
104
|
+
backgroundColor: pressed && pressStyle?.backgroundColor ? pressStyle.backgroundColor : backgroundColor,
|
|
105
|
+
borderColor,
|
|
106
|
+
borderWidth,
|
|
107
|
+
borderBottomWidth,
|
|
108
|
+
borderBottomColor,
|
|
109
|
+
borderTopWidth,
|
|
110
|
+
borderTopColor,
|
|
111
|
+
borderLeftWidth,
|
|
112
|
+
borderLeftColor,
|
|
113
|
+
borderRightWidth,
|
|
114
|
+
borderRightColor,
|
|
115
|
+
borderRadius,
|
|
116
|
+
borderStyle,
|
|
117
|
+
overflow,
|
|
118
|
+
opacity: opacity ?? (disabled ? 0.5 : void 0),
|
|
119
|
+
zIndex,
|
|
120
|
+
height,
|
|
121
|
+
width,
|
|
122
|
+
minWidth,
|
|
123
|
+
minHeight,
|
|
124
|
+
maxWidth,
|
|
125
|
+
maxHeight,
|
|
126
|
+
padding,
|
|
127
|
+
paddingHorizontal,
|
|
128
|
+
paddingVertical,
|
|
129
|
+
margin,
|
|
130
|
+
marginTop,
|
|
131
|
+
marginBottom,
|
|
132
|
+
marginLeft,
|
|
133
|
+
marginRight,
|
|
134
|
+
flexDirection,
|
|
135
|
+
flexWrap,
|
|
136
|
+
alignItems,
|
|
137
|
+
justifyContent,
|
|
138
|
+
alignSelf,
|
|
139
|
+
position,
|
|
140
|
+
top,
|
|
141
|
+
bottom,
|
|
142
|
+
left,
|
|
143
|
+
right,
|
|
144
|
+
flex,
|
|
145
|
+
flexShrink,
|
|
146
|
+
gap: toGapValue(gap),
|
|
147
|
+
...style
|
|
148
|
+
});
|
|
149
|
+
const finalTestID = dataTestId || testID;
|
|
150
|
+
const {
|
|
151
|
+
role,
|
|
152
|
+
tabIndex,
|
|
153
|
+
onKeyDown,
|
|
154
|
+
onKeyUp,
|
|
155
|
+
"aria-label": ariaLabel,
|
|
156
|
+
"aria-labelledby": _ariaLabelledBy,
|
|
157
|
+
"aria-current": _ariaCurrent,
|
|
158
|
+
"aria-disabled": ariaDisabled,
|
|
159
|
+
"aria-live": ariaLive,
|
|
160
|
+
"aria-busy": ariaBusy,
|
|
161
|
+
className,
|
|
162
|
+
"data-testid": _dataTestId,
|
|
163
|
+
cursor: _cursor,
|
|
164
|
+
type: _type,
|
|
165
|
+
...nativeRest
|
|
166
|
+
} = rest;
|
|
167
|
+
const accessibilityRole = typeof role === "string" && roleToAccessibilityRole[role] || (as === "button" ? "button" : void 0);
|
|
168
|
+
const isDisabled = Boolean(disabled || ariaDisabled);
|
|
169
|
+
const accessibilityState = {
|
|
170
|
+
disabled: isDisabled || void 0,
|
|
171
|
+
busy: Boolean(ariaBusy) || void 0
|
|
172
|
+
};
|
|
173
|
+
const accessibilityLiveRegion = ariaLive === "polite" || ariaLive === "assertive" ? ariaLive : void 0;
|
|
174
|
+
if (as === "img" && src) {
|
|
175
|
+
const imageStyle = {
|
|
176
|
+
width,
|
|
177
|
+
height,
|
|
178
|
+
borderRadius,
|
|
179
|
+
position,
|
|
180
|
+
top,
|
|
181
|
+
bottom,
|
|
182
|
+
left,
|
|
183
|
+
right,
|
|
184
|
+
...style
|
|
185
|
+
};
|
|
186
|
+
return /* @__PURE__ */ jsx(
|
|
187
|
+
Image,
|
|
188
|
+
{
|
|
189
|
+
source: { uri: src },
|
|
190
|
+
style: imageStyle,
|
|
191
|
+
testID: finalTestID,
|
|
192
|
+
accessibilityLabel: typeof ariaLabel === "string" ? ariaLabel : alt,
|
|
193
|
+
resizeMode: "cover",
|
|
194
|
+
...nativeRest
|
|
195
|
+
}
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
if (onPress || as === "button") {
|
|
199
|
+
return /* @__PURE__ */ jsx(
|
|
200
|
+
Pressable,
|
|
201
|
+
{
|
|
202
|
+
onPress: !isDisabled && onPress ? onPress : void 0,
|
|
203
|
+
disabled: isDisabled,
|
|
204
|
+
onLayout,
|
|
205
|
+
onMoveShouldSetResponder,
|
|
206
|
+
onResponderGrant,
|
|
207
|
+
onResponderMove,
|
|
208
|
+
onResponderRelease,
|
|
209
|
+
onResponderTerminate,
|
|
210
|
+
style: ({ pressed }) => getContainerStyle(pressed),
|
|
211
|
+
testID: finalTestID,
|
|
212
|
+
accessibilityRole,
|
|
213
|
+
accessibilityLabel: typeof ariaLabel === "string" ? ariaLabel : void 0,
|
|
214
|
+
accessibilityState,
|
|
215
|
+
accessibilityLiveRegion,
|
|
216
|
+
...nativeRest,
|
|
217
|
+
children
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
return /* @__PURE__ */ jsx(
|
|
222
|
+
View,
|
|
223
|
+
{
|
|
224
|
+
style: getContainerStyle(),
|
|
225
|
+
testID: finalTestID,
|
|
226
|
+
onLayout,
|
|
227
|
+
onMoveShouldSetResponder,
|
|
228
|
+
onResponderGrant,
|
|
229
|
+
onResponderMove,
|
|
230
|
+
onResponderRelease,
|
|
231
|
+
onResponderTerminate,
|
|
232
|
+
accessibilityRole,
|
|
233
|
+
accessibilityLabel: typeof ariaLabel === "string" ? ariaLabel : void 0,
|
|
234
|
+
accessibilityState,
|
|
235
|
+
accessibilityLiveRegion,
|
|
236
|
+
...nativeRest,
|
|
237
|
+
children
|
|
238
|
+
}
|
|
239
|
+
);
|
|
240
|
+
};
|
|
241
|
+
|
|
242
|
+
// ../../foundation/primitives-native/src/Text.tsx
|
|
243
|
+
import {
|
|
244
|
+
Text as RNText,
|
|
245
|
+
StyleSheet
|
|
246
|
+
} from "react-native";
|
|
247
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
248
|
+
var roleMap = {
|
|
249
|
+
alert: "alert",
|
|
250
|
+
heading: "header",
|
|
251
|
+
button: "button",
|
|
252
|
+
link: "link",
|
|
253
|
+
text: "text"
|
|
254
|
+
};
|
|
255
|
+
var parseNumericValue = (value) => {
|
|
256
|
+
if (value === void 0) return void 0;
|
|
257
|
+
if (typeof value === "number") return value;
|
|
258
|
+
const parsed = parseFloat(value);
|
|
259
|
+
return isNaN(parsed) ? void 0 : parsed;
|
|
260
|
+
};
|
|
261
|
+
var Text = ({
|
|
262
|
+
children,
|
|
263
|
+
color,
|
|
264
|
+
fontSize,
|
|
265
|
+
fontWeight,
|
|
266
|
+
fontFamily,
|
|
267
|
+
textAlign,
|
|
268
|
+
lineHeight,
|
|
269
|
+
numberOfLines,
|
|
270
|
+
id,
|
|
271
|
+
role,
|
|
272
|
+
testID,
|
|
273
|
+
"data-testid": dataTestId,
|
|
274
|
+
style: styleProp,
|
|
275
|
+
...props
|
|
276
|
+
}) => {
|
|
277
|
+
let resolvedFontFamily = fontFamily ? fontFamily.split(",")[0].replace(/['"]/g, "").trim() : void 0;
|
|
278
|
+
if (resolvedFontFamily === "Pilat Wide" || resolvedFontFamily === "Pilat Wide Bold" || resolvedFontFamily === "Aktiv Grotesk") {
|
|
279
|
+
resolvedFontFamily = void 0;
|
|
280
|
+
}
|
|
281
|
+
const incomingStyle = StyleSheet.flatten(styleProp);
|
|
282
|
+
const baseStyle = {
|
|
283
|
+
color: color ?? incomingStyle?.color,
|
|
284
|
+
fontSize: typeof fontSize === "number" ? fontSize : void 0,
|
|
285
|
+
fontWeight,
|
|
286
|
+
fontFamily: resolvedFontFamily,
|
|
287
|
+
textDecorationLine: props.textDecoration,
|
|
288
|
+
textAlign: textAlign ?? incomingStyle?.textAlign,
|
|
289
|
+
lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),
|
|
290
|
+
marginTop: parseNumericValue(
|
|
291
|
+
incomingStyle?.marginTop
|
|
292
|
+
),
|
|
293
|
+
marginBottom: parseNumericValue(
|
|
294
|
+
incomingStyle?.marginBottom
|
|
295
|
+
)
|
|
296
|
+
};
|
|
297
|
+
const accessibilityRole = role ? roleMap[role] : void 0;
|
|
298
|
+
return /* @__PURE__ */ jsx2(
|
|
299
|
+
RNText,
|
|
300
|
+
{
|
|
301
|
+
style: baseStyle,
|
|
302
|
+
numberOfLines,
|
|
303
|
+
testID: dataTestId || testID || id,
|
|
304
|
+
accessibilityRole,
|
|
305
|
+
children
|
|
306
|
+
}
|
|
307
|
+
);
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
// ../../foundation/primitives-native/src/index.tsx
|
|
311
|
+
var isWeb = false;
|
|
312
|
+
|
|
313
|
+
// src/MediaCard.tsx
|
|
314
|
+
import { useResolvedTheme } from "@xsolla/xui-core";
|
|
315
|
+
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
316
|
+
var FRAME = {
|
|
317
|
+
horizontal: { width: 319, height: 179 },
|
|
318
|
+
vertical: { width: 95, height: 169 }
|
|
319
|
+
};
|
|
320
|
+
var CARD_RADIUS = 8;
|
|
321
|
+
var WATCH_RADIUS = 4;
|
|
322
|
+
var WATCH_PADDING_X = 16;
|
|
323
|
+
var WATCH_PADDING_Y = 8;
|
|
324
|
+
var WATCH_GAP = 8;
|
|
325
|
+
var WATCH_FONT_SIZE = 14;
|
|
326
|
+
var WATCH_LINE_HEIGHT = 20;
|
|
327
|
+
var WATCH_FONT_WEIGHT = "500";
|
|
328
|
+
var REWARD_GLYPH_SIZE = 16;
|
|
329
|
+
var WatchControl = ({
|
|
330
|
+
label,
|
|
331
|
+
accessibleName,
|
|
332
|
+
disabled,
|
|
333
|
+
onPress,
|
|
334
|
+
background,
|
|
335
|
+
foreground,
|
|
336
|
+
fontFamily,
|
|
337
|
+
children
|
|
338
|
+
}) => {
|
|
339
|
+
if (isWeb) {
|
|
340
|
+
return /* @__PURE__ */ jsxs(
|
|
341
|
+
"button",
|
|
342
|
+
{
|
|
343
|
+
type: "button",
|
|
344
|
+
"aria-label": accessibleName,
|
|
345
|
+
disabled,
|
|
346
|
+
"data-testid": "media-card-watch",
|
|
347
|
+
onClick: (event) => {
|
|
348
|
+
event.stopPropagation();
|
|
349
|
+
onPress?.();
|
|
350
|
+
},
|
|
351
|
+
style: {
|
|
352
|
+
alignItems: "center",
|
|
353
|
+
background,
|
|
354
|
+
border: 0,
|
|
355
|
+
borderRadius: WATCH_RADIUS,
|
|
356
|
+
color: foreground,
|
|
357
|
+
cursor: onPress && !disabled ? "pointer" : "default",
|
|
358
|
+
display: "inline-flex",
|
|
359
|
+
fontFamily,
|
|
360
|
+
fontSize: WATCH_FONT_SIZE,
|
|
361
|
+
fontWeight: WATCH_FONT_WEIGHT,
|
|
362
|
+
gap: WATCH_GAP,
|
|
363
|
+
lineHeight: `${WATCH_LINE_HEIGHT}px`,
|
|
364
|
+
margin: 0,
|
|
365
|
+
padding: `${WATCH_PADDING_Y}px ${WATCH_PADDING_X}px`,
|
|
366
|
+
whiteSpace: "nowrap",
|
|
367
|
+
zIndex: 10
|
|
368
|
+
},
|
|
369
|
+
children: [
|
|
370
|
+
/* @__PURE__ */ jsx3("span", { "data-testid": "media-card-watch-label", children: label }),
|
|
371
|
+
children
|
|
372
|
+
]
|
|
373
|
+
}
|
|
374
|
+
);
|
|
375
|
+
}
|
|
376
|
+
return /* @__PURE__ */ jsxs(
|
|
377
|
+
Box,
|
|
378
|
+
{
|
|
379
|
+
flexDirection: "row",
|
|
380
|
+
alignItems: "center",
|
|
381
|
+
gap: WATCH_GAP,
|
|
382
|
+
paddingHorizontal: WATCH_PADDING_X,
|
|
383
|
+
paddingVertical: WATCH_PADDING_Y,
|
|
384
|
+
borderRadius: WATCH_RADIUS,
|
|
385
|
+
backgroundColor: background,
|
|
386
|
+
zIndex: 10,
|
|
387
|
+
onPress: disabled ? void 0 : onPress,
|
|
388
|
+
accessibilityRole: "button",
|
|
389
|
+
accessibilityLabel: accessibleName,
|
|
390
|
+
testID: "media-card-watch",
|
|
391
|
+
children: [
|
|
392
|
+
/* @__PURE__ */ jsx3(
|
|
393
|
+
Text,
|
|
394
|
+
{
|
|
395
|
+
color: foreground,
|
|
396
|
+
fontFamily,
|
|
397
|
+
fontSize: WATCH_FONT_SIZE,
|
|
398
|
+
lineHeight: WATCH_LINE_HEIGHT,
|
|
399
|
+
fontWeight: WATCH_FONT_WEIGHT,
|
|
400
|
+
numberOfLines: 1,
|
|
401
|
+
testID: "media-card-watch-label",
|
|
402
|
+
children: label
|
|
403
|
+
}
|
|
404
|
+
),
|
|
405
|
+
children
|
|
406
|
+
]
|
|
407
|
+
}
|
|
408
|
+
);
|
|
409
|
+
};
|
|
410
|
+
var MediaCard = ({
|
|
411
|
+
src,
|
|
412
|
+
mediaName,
|
|
413
|
+
alt = "",
|
|
414
|
+
orientation = "horizontal",
|
|
415
|
+
rewarded = false,
|
|
416
|
+
rewardIcon,
|
|
417
|
+
showWatchButton = true,
|
|
418
|
+
watchLabel = "Watch",
|
|
419
|
+
onWatchPress,
|
|
420
|
+
onPress,
|
|
421
|
+
disabled = false,
|
|
422
|
+
width,
|
|
423
|
+
height,
|
|
424
|
+
testID,
|
|
425
|
+
themeMode,
|
|
426
|
+
themeProductContext = "b2c"
|
|
427
|
+
}) => {
|
|
428
|
+
const { theme } = useResolvedTheme({ themeMode, themeProductContext });
|
|
429
|
+
const frame = FRAME[orientation];
|
|
430
|
+
const isPlateInteractive = Boolean(onPress) && !disabled;
|
|
431
|
+
const aspectRatio = frame.width / frame.height;
|
|
432
|
+
const watchAccessibleName = rewarded ? `${watchLabel} ${mediaName}, rewarded` : `${watchLabel} ${mediaName}`;
|
|
433
|
+
const plateInteractiveProps = isWeb && isPlateInteractive ? {
|
|
434
|
+
role: "button",
|
|
435
|
+
tabIndex: 0,
|
|
436
|
+
onKeyDown: (event) => {
|
|
437
|
+
if (event.key === "Enter" || event.key === " ") {
|
|
438
|
+
event.preventDefault();
|
|
439
|
+
onPress?.();
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
} : {};
|
|
443
|
+
return /* @__PURE__ */ jsxs(
|
|
444
|
+
Box,
|
|
445
|
+
{
|
|
446
|
+
width: width ?? frame.width,
|
|
447
|
+
height,
|
|
448
|
+
position: "relative",
|
|
449
|
+
overflow: "hidden",
|
|
450
|
+
borderRadius: CARD_RADIUS,
|
|
451
|
+
borderWidth: 1,
|
|
452
|
+
borderStyle: "solid",
|
|
453
|
+
borderColor: theme.colors.border.secondary,
|
|
454
|
+
backgroundColor: theme.colors.background.secondary,
|
|
455
|
+
alignItems: "center",
|
|
456
|
+
justifyContent: "center",
|
|
457
|
+
opacity: disabled ? 0.48 : 1,
|
|
458
|
+
onPress: isPlateInteractive ? onPress : void 0,
|
|
459
|
+
"aria-label": mediaName,
|
|
460
|
+
"aria-disabled": disabled || void 0,
|
|
461
|
+
...!isWeb ? { accessibilityLabel: mediaName } : {},
|
|
462
|
+
style: {
|
|
463
|
+
aspectRatio: height ? void 0 : aspectRatio,
|
|
464
|
+
...isWeb && isPlateInteractive ? { cursor: "pointer" } : {}
|
|
465
|
+
},
|
|
466
|
+
"data-testid": testID || "media-card",
|
|
467
|
+
testID: testID || "media-card",
|
|
468
|
+
...plateInteractiveProps,
|
|
469
|
+
children: [
|
|
470
|
+
/* @__PURE__ */ jsx3(
|
|
471
|
+
Box,
|
|
472
|
+
{
|
|
473
|
+
as: "img",
|
|
474
|
+
src,
|
|
475
|
+
alt,
|
|
476
|
+
position: "absolute",
|
|
477
|
+
top: 0,
|
|
478
|
+
left: 0,
|
|
479
|
+
width: "100%",
|
|
480
|
+
height: "100%",
|
|
481
|
+
style: isWeb ? { objectFit: "cover" } : void 0,
|
|
482
|
+
"data-testid": "media-card-thumbnail",
|
|
483
|
+
testID: "media-card-thumbnail"
|
|
484
|
+
}
|
|
485
|
+
),
|
|
486
|
+
showWatchButton && /* @__PURE__ */ jsx3(
|
|
487
|
+
WatchControl,
|
|
488
|
+
{
|
|
489
|
+
label: watchLabel,
|
|
490
|
+
accessibleName: watchAccessibleName,
|
|
491
|
+
disabled,
|
|
492
|
+
onPress: onWatchPress,
|
|
493
|
+
background: theme.colors.control.brandExtra.primary.bg,
|
|
494
|
+
foreground: theme.colors.content.on.brandExtra,
|
|
495
|
+
fontFamily: theme.fonts.body,
|
|
496
|
+
children: rewarded && /* @__PURE__ */ jsx3(
|
|
497
|
+
Box,
|
|
498
|
+
{
|
|
499
|
+
width: REWARD_GLYPH_SIZE,
|
|
500
|
+
height: REWARD_GLYPH_SIZE,
|
|
501
|
+
flexShrink: 0,
|
|
502
|
+
alignItems: "center",
|
|
503
|
+
justifyContent: "center",
|
|
504
|
+
borderRadius: REWARD_GLYPH_SIZE / 2,
|
|
505
|
+
backgroundColor: rewardIcon ? void 0 : theme.colors.content.on.brandExtra,
|
|
506
|
+
"aria-hidden": true,
|
|
507
|
+
"data-testid": "media-card-reward",
|
|
508
|
+
testID: "media-card-reward",
|
|
509
|
+
children: rewardIcon
|
|
510
|
+
}
|
|
511
|
+
)
|
|
512
|
+
}
|
|
513
|
+
)
|
|
514
|
+
]
|
|
515
|
+
}
|
|
516
|
+
);
|
|
517
|
+
};
|
|
518
|
+
MediaCard.displayName = "MediaCard";
|
|
519
|
+
export {
|
|
520
|
+
MediaCard
|
|
521
|
+
};
|
|
522
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/Text.tsx","../../../../foundation/primitives-native/src/index.tsx","../../src/MediaCard.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n AccessibilityRole,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleToAccessibilityRole: Record<string, AccessibilityRole> = {\n button: \"button\",\n link: \"link\",\n img: \"image\",\n image: \"image\",\n summary: \"summary\",\n switch: \"switch\",\n checkbox: \"checkbox\",\n radio: \"radio\",\n heading: \"header\",\n text: \"text\",\n search: \"search\",\n alert: \"alert\",\n none: \"none\",\n presentation: \"none\",\n progressbar: \"progressbar\",\n scrollbar: \"scrollbar\",\n adjustable: \"adjustable\",\n tab: \"tab\",\n menu: \"menu\",\n menuitem: \"menuitem\",\n list: \"list\",\n timer: \"timer\",\n};\n\n/** RN ViewStyle.gap is typed as number (Yoga gap), not DimensionValue. */\nconst toGapValue = (gap: number | string | undefined): number | undefined => {\n if (gap === undefined) return undefined;\n if (typeof gap === \"number\") return gap;\n const pxMatch = /^(\\d+(?:\\.\\d+)?)px$/.exec(gap);\n if (pxMatch) return Number(pxMatch[1]);\n const asNumber = Number(gap);\n return Number.isFinite(asNumber) ? asNumber : undefined;\n};\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 flexWrap,\n alignItems,\n justifyContent,\n alignSelf,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n flexShrink,\n gap,\n overflow,\n opacity,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n disabled,\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 opacity: opacity ?? (disabled ? 0.5 : undefined),\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 flexWrap,\n alignItems,\n justifyContent,\n alignSelf,\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 flexShrink,\n gap: toGapValue(gap),\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Map web a11y props; drop the rest of the web-only attributes before\n // spreading onto RN hosts (unknown props warn at runtime).\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 \"aria-busy\": ariaBusy,\n className,\n \"data-testid\": _dataTestId,\n cursor: _cursor,\n type: _type,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n const accessibilityRole =\n (typeof role === \"string\" && roleToAccessibilityRole[role]) ||\n (as === \"button\" ? \"button\" : undefined);\n const isDisabled = Boolean(disabled || ariaDisabled);\n const accessibilityState = {\n disabled: isDisabled || undefined,\n busy: Boolean(ariaBusy) || undefined,\n };\n const accessibilityLiveRegion =\n ariaLive === \"polite\" || ariaLive === \"assertive\" ? ariaLive : undefined;\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 accessibilityLabel={typeof ariaLabel === \"string\" ? ariaLabel : alt}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n // Prefer Pressable whenever the node is interactive or explicitly a button,\n // so disabled / aria-disabled controls stay in the a11y tree as buttons.\n if (onPress || as === \"button\") {\n return (\n <Pressable\n onPress={!isDisabled && onPress ? onPress : undefined}\n disabled={isDisabled}\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 accessibilityRole={accessibilityRole}\n accessibilityLabel={\n typeof ariaLabel === \"string\" ? ariaLabel : undefined\n }\n accessibilityState={accessibilityState}\n accessibilityLiveRegion={accessibilityLiveRegion}\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 accessibilityRole={accessibilityRole}\n accessibilityLabel={typeof ariaLabel === \"string\" ? ariaLabel : undefined}\n accessibilityState={accessibilityState}\n accessibilityLiveRegion={accessibilityLiveRegion}\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 testID,\n \"data-testid\": dataTestId,\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={dataTestId || testID || id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n","export * from \"./Box\";\nexport * from \"./Text\";\nexport * from \"./Spinner\";\nexport * from \"./Icon\";\nexport * from \"./Divider\";\nexport * from \"./Input\";\nexport * from \"./TextArea\";\nexport * from \"./LinearGradient\";\n\nexport const isWeb = false;\nexport const isNative = true;\n","import React from \"react\";\n// @ts-expect-error resolved at build time to web/native primitives\nimport { Box, Text, isWeb } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport type { MediaCardOrientation, MediaCardProps } from \"./types\";\n\n/**\n * Figma `MediaCard` (743:3142) on the B2C Components page. The component set\n * declares three properties — `Orientation`, `Rewarded` and `Watch Button` —\n * which map onto `orientation`, `rewarded` and `showWatchButton`.\n *\n * Both orientations share the 8 px radius, the 1 px inside stroke and the\n * clipped full-bleed thumbnail; only the frame's aspect changes.\n */\nconst FRAME: Record<MediaCardOrientation, { width: number; height: number }> = {\n horizontal: { width: 319, height: 179 },\n vertical: { width: 95, height: 169 },\n};\n\nconst CARD_RADIUS = 8;\n\n/** The Watch control: a filled brand-extra pill centred over the thumbnail. */\nconst WATCH_RADIUS = 4;\nconst WATCH_PADDING_X = 16;\nconst WATCH_PADDING_Y = 8;\nconst WATCH_GAP = 8;\nconst WATCH_FONT_SIZE = 14;\nconst WATCH_LINE_HEIGHT = 20;\nconst WATCH_FONT_WEIGHT = \"500\";\nconst REWARD_GLYPH_SIZE = 16;\n\ntype WatchControlProps = {\n label: string;\n accessibleName: string;\n disabled: boolean;\n onPress?: () => void;\n background: string;\n foreground: string;\n fontFamily: string;\n children?: React.ReactNode;\n};\n\n/**\n * On web this is a real `<button>`: it stops the press from also reaching the\n * plate's own `onPress`, and it gets keyboard activation and focus for free.\n * Native has no bubbling `onPress` to stop, so a `Box` with the accessibility\n * role is enough. Same split as the B2B MediaCard's `ActionButton`.\n */\nconst WatchControl = ({\n label,\n accessibleName,\n disabled,\n onPress,\n background,\n foreground,\n fontFamily,\n children,\n}: WatchControlProps) => {\n if (isWeb) {\n return (\n <button\n type=\"button\"\n aria-label={accessibleName}\n disabled={disabled}\n data-testid=\"media-card-watch\"\n onClick={(event) => {\n event.stopPropagation();\n onPress?.();\n }}\n style={{\n alignItems: \"center\",\n background,\n border: 0,\n borderRadius: WATCH_RADIUS,\n color: foreground,\n cursor: onPress && !disabled ? \"pointer\" : \"default\",\n display: \"inline-flex\",\n fontFamily,\n fontSize: WATCH_FONT_SIZE,\n fontWeight: WATCH_FONT_WEIGHT,\n gap: WATCH_GAP,\n lineHeight: `${WATCH_LINE_HEIGHT}px`,\n margin: 0,\n padding: `${WATCH_PADDING_Y}px ${WATCH_PADDING_X}px`,\n whiteSpace: \"nowrap\",\n zIndex: 10,\n }}\n >\n <span data-testid=\"media-card-watch-label\">{label}</span>\n {children}\n </button>\n );\n }\n\n return (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={WATCH_GAP}\n paddingHorizontal={WATCH_PADDING_X}\n paddingVertical={WATCH_PADDING_Y}\n borderRadius={WATCH_RADIUS}\n backgroundColor={background}\n zIndex={10}\n onPress={disabled ? undefined : onPress}\n accessibilityRole=\"button\"\n accessibilityLabel={accessibleName}\n testID=\"media-card-watch\"\n >\n <Text\n color={foreground}\n fontFamily={fontFamily}\n fontSize={WATCH_FONT_SIZE}\n lineHeight={WATCH_LINE_HEIGHT}\n fontWeight={WATCH_FONT_WEIGHT}\n numberOfLines={1}\n testID=\"media-card-watch-label\"\n >\n {label}\n </Text>\n {children}\n </Box>\n );\n};\n\nexport const MediaCard: React.FC<MediaCardProps> = ({\n src,\n mediaName,\n alt = \"\",\n orientation = \"horizontal\",\n rewarded = false,\n rewardIcon,\n showWatchButton = true,\n watchLabel = \"Watch\",\n onWatchPress,\n onPress,\n disabled = false,\n width,\n height,\n testID,\n themeMode,\n themeProductContext = \"b2c\",\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n const frame = FRAME[orientation];\n const isPlateInteractive = Boolean(onPress) && !disabled;\n\n // Figma pins each orientation to a fixed frame, but a card in a real rail has\n // to flex with its column — so the frame width is only a default and it is\n // the aspect ratio, not the height, that is preserved. `height` opts out.\n const aspectRatio = frame.width / frame.height;\n\n /**\n * The accessibility criterion on the ticket: a rail of cards must not\n * announce ten identical \"Watch\" buttons. The visible label stays short while\n * the accessible name carries the media's own name — and the reward, which is\n * otherwise communicated by a glyph alone.\n */\n const watchAccessibleName = rewarded\n ? `${watchLabel} ${mediaName}, rewarded`\n : `${watchLabel} ${mediaName}`;\n\n const plateInteractiveProps =\n isWeb && isPlateInteractive\n ? {\n role: \"button\",\n tabIndex: 0,\n onKeyDown: (event: React.KeyboardEvent) => {\n if (event.key === \"Enter\" || event.key === \" \") {\n event.preventDefault();\n onPress?.();\n }\n },\n }\n : {};\n\n return (\n <Box\n width={width ?? frame.width}\n height={height}\n position=\"relative\"\n overflow=\"hidden\"\n borderRadius={CARD_RADIUS}\n borderWidth={1}\n borderStyle=\"solid\"\n borderColor={theme.colors.border.secondary}\n backgroundColor={theme.colors.background.secondary}\n alignItems=\"center\"\n justifyContent=\"center\"\n opacity={disabled ? 0.48 : 1}\n onPress={isPlateInteractive ? onPress : undefined}\n aria-label={mediaName}\n aria-disabled={disabled || undefined}\n {...(!isWeb\n ? { accessibilityLabel: mediaName }\n : {})}\n style={{\n aspectRatio: height ? undefined : aspectRatio,\n ...(isWeb && isPlateInteractive ? { cursor: \"pointer\" as const } : {}),\n }}\n data-testid={testID || \"media-card\"}\n testID={testID || \"media-card\"}\n {...plateInteractiveProps}\n >\n <Box\n as=\"img\"\n src={src}\n alt={alt}\n position=\"absolute\"\n top={0}\n left={0}\n width=\"100%\"\n height=\"100%\"\n style={isWeb ? { objectFit: \"cover\" } : undefined}\n data-testid=\"media-card-thumbnail\"\n testID=\"media-card-thumbnail\"\n />\n\n {showWatchButton && (\n <WatchControl\n label={watchLabel}\n accessibleName={watchAccessibleName}\n disabled={disabled}\n onPress={onWatchPress}\n background={theme.colors.control.brandExtra.primary.bg}\n foreground={theme.colors.content.on.brandExtra}\n fontFamily={theme.fonts.body}\n >\n {rewarded && (\n <Box\n width={REWARD_GLYPH_SIZE}\n height={REWARD_GLYPH_SIZE}\n flexShrink={0}\n alignItems=\"center\"\n justifyContent=\"center\"\n borderRadius={REWARD_GLYPH_SIZE / 2}\n // Figma draws a reward coin here. The glyph is product-specific,\n // so it stays a slot — the fallback is a neutral mark rather than\n // a guess at someone's currency icon. It is decorative either\n // way: the reward is already in the button's accessible name.\n backgroundColor={\n rewardIcon ? undefined : theme.colors.content.on.brandExtra\n }\n aria-hidden\n data-testid=\"media-card-reward\"\n testID=\"media-card-reward\"\n >\n {rewardIcon}\n </Box>\n )}\n </WatchControl>\n )}\n </Box>\n );\n};\n\nMediaCard.displayName = \"MediaCard\";\n"],"mappings":";AACA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AAwMD;AArMN,IAAM,0BAA6D;AAAA,EACjE,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,KAAK;AAAA,EACL,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAAS;AAAA,EACT,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,MAAM;AAAA,EACN,cAAc;AAAA,EACd,aAAa;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,KAAK;AAAA,EACL,MAAM;AAAA,EACN,UAAU;AAAA,EACV,MAAM;AAAA,EACN,OAAO;AACT;AAGA,IAAM,aAAa,CAAC,QAAyD;AAC3E,MAAI,QAAQ,OAAW,QAAO;AAC9B,MAAI,OAAO,QAAQ,SAAU,QAAO;AACpC,QAAM,UAAU,sBAAsB,KAAK,GAAG;AAC9C,MAAI,QAAS,QAAO,OAAO,QAAQ,CAAC,CAAC;AACrC,QAAM,WAAW,OAAO,GAAG;AAC3B,SAAO,OAAO,SAAS,QAAQ,IAAI,WAAW;AAChD;AAEO,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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