@xsolla/xui-cell 0.128.0 → 0.129.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/native/index.d.mts +3 -2
- package/native/index.d.ts +3 -2
- package/native/index.js +22 -4
- package/native/index.js.map +1 -1
- package/native/index.mjs +23 -5
- package/native/index.mjs.map +1 -1
- package/package.json +5 -5
- package/web/index.d.mts +3 -2
- package/web/index.d.ts +3 -2
- package/web/index.js +15 -3
- package/web/index.js.map +1 -1
- package/web/index.mjs +16 -4
- package/web/index.mjs.map +1 -1
package/native/index.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { BoxProps } from '@xsolla/xui-primitives-core';
|
|
4
|
+
import { ThemeOverrideProps } from '@xsolla/xui-core';
|
|
4
5
|
|
|
5
6
|
type CellView = "default" | "stroke" | "surface";
|
|
6
|
-
interface CellProps extends BoxProps {
|
|
7
|
+
interface CellProps extends BoxProps, ThemeOverrideProps {
|
|
7
8
|
children?: ReactNode;
|
|
8
9
|
/** Visual variant of the cell container. */
|
|
9
10
|
view?: CellView;
|
|
@@ -19,7 +20,7 @@ interface CellSlotProps extends BoxProps {
|
|
|
19
20
|
interface CellContentProps extends BoxProps {
|
|
20
21
|
children?: ReactNode;
|
|
21
22
|
}
|
|
22
|
-
interface CellTextProps extends BoxProps {
|
|
23
|
+
interface CellTextProps extends BoxProps, ThemeOverrideProps {
|
|
23
24
|
/** Primary title on the left. */
|
|
24
25
|
title?: ReactNode;
|
|
25
26
|
/** Secondary text on the right of the title row. */
|
package/native/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { BoxProps } from '@xsolla/xui-primitives-core';
|
|
4
|
+
import { ThemeOverrideProps } from '@xsolla/xui-core';
|
|
4
5
|
|
|
5
6
|
type CellView = "default" | "stroke" | "surface";
|
|
6
|
-
interface CellProps extends BoxProps {
|
|
7
|
+
interface CellProps extends BoxProps, ThemeOverrideProps {
|
|
7
8
|
children?: ReactNode;
|
|
8
9
|
/** Visual variant of the cell container. */
|
|
9
10
|
view?: CellView;
|
|
@@ -19,7 +20,7 @@ interface CellSlotProps extends BoxProps {
|
|
|
19
20
|
interface CellContentProps extends BoxProps {
|
|
20
21
|
children?: ReactNode;
|
|
21
22
|
}
|
|
22
|
-
interface CellTextProps extends BoxProps {
|
|
23
|
+
interface CellTextProps extends BoxProps, ThemeOverrideProps {
|
|
23
24
|
/** Primary title on the left. */
|
|
24
25
|
title?: ReactNode;
|
|
25
26
|
/** Secondary text on the right of the title row. */
|
package/native/index.js
CHANGED
|
@@ -70,6 +70,10 @@ var Box = ({
|
|
|
70
70
|
left,
|
|
71
71
|
right,
|
|
72
72
|
width,
|
|
73
|
+
minWidth,
|
|
74
|
+
minHeight,
|
|
75
|
+
maxWidth,
|
|
76
|
+
maxHeight,
|
|
73
77
|
flex,
|
|
74
78
|
overflow,
|
|
75
79
|
zIndex,
|
|
@@ -101,6 +105,10 @@ var Box = ({
|
|
|
101
105
|
zIndex,
|
|
102
106
|
height,
|
|
103
107
|
width,
|
|
108
|
+
minWidth,
|
|
109
|
+
minHeight,
|
|
110
|
+
maxWidth,
|
|
111
|
+
maxHeight,
|
|
104
112
|
padding,
|
|
105
113
|
paddingHorizontal,
|
|
106
114
|
paddingVertical,
|
|
@@ -229,7 +237,7 @@ var Text = ({
|
|
|
229
237
|
}
|
|
230
238
|
const incomingStyle = import_react_native2.StyleSheet.flatten(styleProp);
|
|
231
239
|
const baseStyle = {
|
|
232
|
-
color,
|
|
240
|
+
color: color ?? incomingStyle?.color,
|
|
233
241
|
fontSize: typeof fontSize === "number" ? fontSize : void 0,
|
|
234
242
|
fontWeight,
|
|
235
243
|
fontFamily: resolvedFontFamily,
|
|
@@ -260,8 +268,16 @@ var Text = ({
|
|
|
260
268
|
var import_xui_core = require("@xsolla/xui-core");
|
|
261
269
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
262
270
|
var CellRoot = (0, import_react.forwardRef)(
|
|
263
|
-
({
|
|
264
|
-
|
|
271
|
+
({
|
|
272
|
+
children,
|
|
273
|
+
view: viewProp,
|
|
274
|
+
withBoard,
|
|
275
|
+
style,
|
|
276
|
+
themeMode,
|
|
277
|
+
themeProductContext,
|
|
278
|
+
...props
|
|
279
|
+
}, ref) => {
|
|
280
|
+
const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
|
|
265
281
|
const view = viewProp ?? (withBoard ? "stroke" : "default");
|
|
266
282
|
const viewStyles = (0, import_react.useMemo)(() => {
|
|
267
283
|
const hoverBg = theme.colors.background.secondary;
|
|
@@ -379,9 +395,11 @@ var CellText = (0, import_react.forwardRef)(
|
|
|
379
395
|
descriptionRight,
|
|
380
396
|
caption,
|
|
381
397
|
captionRight,
|
|
398
|
+
themeMode,
|
|
399
|
+
themeProductContext,
|
|
382
400
|
...props
|
|
383
401
|
}, ref) => {
|
|
384
|
-
const { theme } = (0, import_xui_core.
|
|
402
|
+
const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
|
|
385
403
|
const hasDescriptions = description != null || descriptionRight != null;
|
|
386
404
|
const hasCaptions = caption != null || captionRight != null;
|
|
387
405
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
package/native/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.tsx","../../src/Cell.tsx","../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx"],"sourcesContent":["export * from \"./Cell\";\nexport * from \"./types\";\n","import { forwardRef, useMemo } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport {\n CellContentProps,\n CellProps,\n CellSlotProps,\n CellTextProps,\n CellView,\n} from \"./types\";\n\nconst CellRoot = forwardRef<any, CellProps>(\n ({ children, view: viewProp, withBoard, style, ...props }, ref) => {\n const { theme } = useDesignSystem();\n\n const view: CellView = viewProp ?? (withBoard ? \"stroke\" : \"default\");\n\n const viewStyles = useMemo(() => {\n const hoverBg = theme.colors.background.secondary;\n\n switch (view) {\n case \"stroke\":\n return {\n borderRadius: 8,\n borderWidth: 1,\n borderColor: theme.colors.border.secondary,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n case \"surface\":\n return {\n backgroundColor: theme.colors.background.secondary,\n borderRadius: 8,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n default:\n return {\n minHeight: 56,\n hoverStyle: { backgroundColor: hoverBg },\n };\n }\n }, [view, theme]);\n\n const hasPress = props.onPress != null;\n\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n width=\"100%\"\n flexDirection=\"row\"\n gap={12}\n cursor={hasPress ? \"pointer\" : undefined}\n {...viewStyles}\n {...props}\n style={{ color: theme.colors.content.primary, ...style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellRoot.displayName = \"Cell\";\n\nconst CellSlot = forwardRef<any, CellSlotProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n justifyContent=\"center\"\n flexDirection=\"row\"\n {...props}\n style={{ flexShrink: 0, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellSlot.displayName = \"Cell.Slot\";\n\nconst CellContent = forwardRef<any, CellContentProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n {...props}\n style={{ flex: 1, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellContent.displayName = \"Cell.Content\";\n\nconst CellTextRow = ({\n left,\n right,\n leftProps,\n rightProps,\n}: {\n left?: React.ReactNode;\n right?: React.ReactNode;\n leftProps?: Record<string, unknown>;\n rightProps?: Record<string, unknown>;\n}) => {\n if (!left && !right) return null;\n return (\n <Box flexDirection=\"row\" gap={12} alignItems=\"center\" width=\"100%\">\n {left != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof left === \"string\" ? <Text {...leftProps}>{left}</Text> : left}\n </Box>\n )}\n {right != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"flex-end\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof right === \"string\" ? (\n <Text {...rightProps}>{right}</Text>\n ) : (\n right\n )}\n </Box>\n )}\n </Box>\n );\n};\n\nconst CellText = forwardRef<any, CellTextProps>(\n (\n {\n title,\n titleRight,\n description,\n descriptionRight,\n caption,\n captionRight,\n ...props\n },\n ref\n ) => {\n const { theme } = useDesignSystem();\n\n const hasDescriptions = description != null || descriptionRight != null;\n const hasCaptions = caption != null || captionRight != null;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n gap={2}\n {...props}\n style={{ flex: 1, minWidth: 0, minHeight: 1, ...props.style }}\n >\n <CellTextRow\n left={title}\n right={titleRight}\n leftProps={{\n fontWeight: \"500\",\n fontSize: 16,\n lineHeight: 20,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n {hasDescriptions && (\n <CellTextRow\n left={description}\n right={descriptionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n )}\n {hasCaptions && (\n <CellTextRow\n left={caption}\n right={captionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n />\n )}\n </Box>\n );\n }\n);\n\nCellText.displayName = \"Cell.Text\";\n\nexport const Cell = Object.assign(CellRoot, {\n Slot: CellSlot,\n Content: CellContent,\n Text: CellText,\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 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 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,\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAoC;;;ACCpC,0BAQO;AAmID;AAhIC,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,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,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAI;AAAA,EACN;AAEA,QAAM,cAAc,cAAc;AAIlC,QAAM;AAAA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,QACd,gBAAe;AAAA,QACf,KAAK;AAAA,QACJ,GAAG;AAAA,QACJ,OAAO,EAAE,MAAM,GAAG,UAAU,GAAG,WAAW,GAAG,GAAG,MAAM,MAAM;AAAA,QAE5D;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,cACP,WAAW;AAAA,gBACT,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,cACd;AAAA,cACA,YAAY;AAAA,gBACV,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,cACd;AAAA;AAAA,UACF;AAAA,UACC,mBACC;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,cACP,WAAW;AAAA,gBACT,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,cACd;AAAA,cACA,YAAY;AAAA,gBACV,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,cACd;AAAA;AAAA,UACF;AAAA,UAED,eACC;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,cACP,WAAW;AAAA,gBACT,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,gBACZ,OAAO,MAAM,OAAO,QAAQ;AAAA,cAC9B;AAAA,cACA,YAAY;AAAA,gBACV,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,gBACZ,OAAO,MAAM,OAAO,QAAQ;AAAA,cAC9B;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,SAAS,cAAc;AAEhB,IAAM,OAAO,OAAO,OAAO,UAAU;AAAA,EAC1C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AACR,CAAC;","names":["import_react_native","import_jsx_runtime","RNText","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.tsx","../../src/Cell.tsx","../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx"],"sourcesContent":["export * from \"./Cell\";\nexport * from \"./types\";\n","import { forwardRef, useMemo } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport {\n CellContentProps,\n CellProps,\n CellSlotProps,\n CellTextProps,\n CellView,\n} from \"./types\";\n\nconst CellRoot = forwardRef<any, CellProps>(\n (\n {\n children,\n view: viewProp,\n withBoard,\n style,\n themeMode,\n themeProductContext,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n const view: CellView = viewProp ?? (withBoard ? \"stroke\" : \"default\");\n\n const viewStyles = useMemo(() => {\n const hoverBg = theme.colors.background.secondary;\n\n switch (view) {\n case \"stroke\":\n return {\n borderRadius: 8,\n borderWidth: 1,\n borderColor: theme.colors.border.secondary,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n case \"surface\":\n return {\n backgroundColor: theme.colors.background.secondary,\n borderRadius: 8,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n default:\n return {\n minHeight: 56,\n hoverStyle: { backgroundColor: hoverBg },\n };\n }\n }, [view, theme]);\n\n const hasPress = props.onPress != null;\n\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n width=\"100%\"\n flexDirection=\"row\"\n gap={12}\n cursor={hasPress ? \"pointer\" : undefined}\n {...viewStyles}\n {...props}\n style={{ color: theme.colors.content.primary, ...style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellRoot.displayName = \"Cell\";\n\nconst CellSlot = forwardRef<any, CellSlotProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n justifyContent=\"center\"\n flexDirection=\"row\"\n {...props}\n style={{ flexShrink: 0, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellSlot.displayName = \"Cell.Slot\";\n\nconst CellContent = forwardRef<any, CellContentProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n {...props}\n style={{ flex: 1, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellContent.displayName = \"Cell.Content\";\n\nconst CellTextRow = ({\n left,\n right,\n leftProps,\n rightProps,\n}: {\n left?: React.ReactNode;\n right?: React.ReactNode;\n leftProps?: Record<string, unknown>;\n rightProps?: Record<string, unknown>;\n}) => {\n if (!left && !right) return null;\n return (\n <Box flexDirection=\"row\" gap={12} alignItems=\"center\" width=\"100%\">\n {left != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof left === \"string\" ? <Text {...leftProps}>{left}</Text> : left}\n </Box>\n )}\n {right != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"flex-end\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof right === \"string\" ? (\n <Text {...rightProps}>{right}</Text>\n ) : (\n right\n )}\n </Box>\n )}\n </Box>\n );\n};\n\nconst CellText = forwardRef<any, CellTextProps>(\n (\n {\n title,\n titleRight,\n description,\n descriptionRight,\n caption,\n captionRight,\n themeMode,\n themeProductContext,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n const hasDescriptions = description != null || descriptionRight != null;\n const hasCaptions = caption != null || captionRight != null;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n gap={2}\n {...props}\n style={{ flex: 1, minWidth: 0, minHeight: 1, ...props.style }}\n >\n <CellTextRow\n left={title}\n right={titleRight}\n leftProps={{\n fontWeight: \"500\",\n fontSize: 16,\n lineHeight: 20,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n {hasDescriptions && (\n <CellTextRow\n left={description}\n right={descriptionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n )}\n {hasCaptions && (\n <CellTextRow\n left={caption}\n right={captionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n />\n )}\n </Box>\n );\n }\n);\n\nCellText.displayName = \"Cell.Text\";\n\nexport const Cell = Object.assign(CellRoot, {\n Slot: CellSlot,\n Content: CellContent,\n Text: CellText,\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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAoC;;;ACCpC,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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A,cACd;AAAA,cACA,YAAY;AAAA,gBACV,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,cACd;AAAA;AAAA,UACF;AAAA,UAED,eACC;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,cACP,WAAW;AAAA,gBACT,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,gBACZ,OAAO,MAAM,OAAO,QAAQ;AAAA,cAC9B;AAAA,cACA,YAAY;AAAA,gBACV,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,gBACZ,OAAO,MAAM,OAAO,QAAQ;AAAA,cAC9B;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,SAAS,cAAc;AAEhB,IAAM,OAAO,OAAO,OAAO,UAAU;AAAA,EAC1C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AACR,CAAC;","names":["import_react_native","import_jsx_runtime","RNText","import_jsx_runtime"]}
|
package/native/index.mjs
CHANGED
|
@@ -48,6 +48,10 @@ var Box = ({
|
|
|
48
48
|
left,
|
|
49
49
|
right,
|
|
50
50
|
width,
|
|
51
|
+
minWidth,
|
|
52
|
+
minHeight,
|
|
53
|
+
maxWidth,
|
|
54
|
+
maxHeight,
|
|
51
55
|
flex,
|
|
52
56
|
overflow,
|
|
53
57
|
zIndex,
|
|
@@ -79,6 +83,10 @@ var Box = ({
|
|
|
79
83
|
zIndex,
|
|
80
84
|
height,
|
|
81
85
|
width,
|
|
86
|
+
minWidth,
|
|
87
|
+
minHeight,
|
|
88
|
+
maxWidth,
|
|
89
|
+
maxHeight,
|
|
82
90
|
padding,
|
|
83
91
|
paddingHorizontal,
|
|
84
92
|
paddingVertical,
|
|
@@ -210,7 +218,7 @@ var Text = ({
|
|
|
210
218
|
}
|
|
211
219
|
const incomingStyle = StyleSheet.flatten(styleProp);
|
|
212
220
|
const baseStyle = {
|
|
213
|
-
color,
|
|
221
|
+
color: color ?? incomingStyle?.color,
|
|
214
222
|
fontSize: typeof fontSize === "number" ? fontSize : void 0,
|
|
215
223
|
fontWeight,
|
|
216
224
|
fontFamily: resolvedFontFamily,
|
|
@@ -238,11 +246,19 @@ var Text = ({
|
|
|
238
246
|
};
|
|
239
247
|
|
|
240
248
|
// src/Cell.tsx
|
|
241
|
-
import {
|
|
249
|
+
import { useResolvedTheme } from "@xsolla/xui-core";
|
|
242
250
|
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
243
251
|
var CellRoot = forwardRef(
|
|
244
|
-
({
|
|
245
|
-
|
|
252
|
+
({
|
|
253
|
+
children,
|
|
254
|
+
view: viewProp,
|
|
255
|
+
withBoard,
|
|
256
|
+
style,
|
|
257
|
+
themeMode,
|
|
258
|
+
themeProductContext,
|
|
259
|
+
...props
|
|
260
|
+
}, ref) => {
|
|
261
|
+
const { theme } = useResolvedTheme({ themeMode, themeProductContext });
|
|
246
262
|
const view = viewProp ?? (withBoard ? "stroke" : "default");
|
|
247
263
|
const viewStyles = useMemo(() => {
|
|
248
264
|
const hoverBg = theme.colors.background.secondary;
|
|
@@ -360,9 +376,11 @@ var CellText = forwardRef(
|
|
|
360
376
|
descriptionRight,
|
|
361
377
|
caption,
|
|
362
378
|
captionRight,
|
|
379
|
+
themeMode,
|
|
380
|
+
themeProductContext,
|
|
363
381
|
...props
|
|
364
382
|
}, ref) => {
|
|
365
|
-
const { theme } =
|
|
383
|
+
const { theme } = useResolvedTheme({ themeMode, themeProductContext });
|
|
366
384
|
const hasDescriptions = description != null || descriptionRight != null;
|
|
367
385
|
const hasCaptions = caption != null || captionRight != null;
|
|
368
386
|
return /* @__PURE__ */ jsxs(
|
package/native/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Cell.tsx","../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx"],"sourcesContent":["import { forwardRef, useMemo } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport {\n CellContentProps,\n CellProps,\n CellSlotProps,\n CellTextProps,\n CellView,\n} from \"./types\";\n\nconst CellRoot = forwardRef<any, CellProps>(\n ({ children, view: viewProp, withBoard, style, ...props }, ref) => {\n const { theme } = useDesignSystem();\n\n const view: CellView = viewProp ?? (withBoard ? \"stroke\" : \"default\");\n\n const viewStyles = useMemo(() => {\n const hoverBg = theme.colors.background.secondary;\n\n switch (view) {\n case \"stroke\":\n return {\n borderRadius: 8,\n borderWidth: 1,\n borderColor: theme.colors.border.secondary,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n case \"surface\":\n return {\n backgroundColor: theme.colors.background.secondary,\n borderRadius: 8,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n default:\n return {\n minHeight: 56,\n hoverStyle: { backgroundColor: hoverBg },\n };\n }\n }, [view, theme]);\n\n const hasPress = props.onPress != null;\n\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n width=\"100%\"\n flexDirection=\"row\"\n gap={12}\n cursor={hasPress ? \"pointer\" : undefined}\n {...viewStyles}\n {...props}\n style={{ color: theme.colors.content.primary, ...style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellRoot.displayName = \"Cell\";\n\nconst CellSlot = forwardRef<any, CellSlotProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n justifyContent=\"center\"\n flexDirection=\"row\"\n {...props}\n style={{ flexShrink: 0, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellSlot.displayName = \"Cell.Slot\";\n\nconst CellContent = forwardRef<any, CellContentProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n {...props}\n style={{ flex: 1, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellContent.displayName = \"Cell.Content\";\n\nconst CellTextRow = ({\n left,\n right,\n leftProps,\n rightProps,\n}: {\n left?: React.ReactNode;\n right?: React.ReactNode;\n leftProps?: Record<string, unknown>;\n rightProps?: Record<string, unknown>;\n}) => {\n if (!left && !right) return null;\n return (\n <Box flexDirection=\"row\" gap={12} alignItems=\"center\" width=\"100%\">\n {left != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof left === \"string\" ? <Text {...leftProps}>{left}</Text> : left}\n </Box>\n )}\n {right != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"flex-end\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof right === \"string\" ? (\n <Text {...rightProps}>{right}</Text>\n ) : (\n right\n )}\n </Box>\n )}\n </Box>\n );\n};\n\nconst CellText = forwardRef<any, CellTextProps>(\n (\n {\n title,\n titleRight,\n description,\n descriptionRight,\n caption,\n captionRight,\n ...props\n },\n ref\n ) => {\n const { theme } = useDesignSystem();\n\n const hasDescriptions = description != null || descriptionRight != null;\n const hasCaptions = caption != null || captionRight != null;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n gap={2}\n {...props}\n style={{ flex: 1, minWidth: 0, minHeight: 1, ...props.style }}\n >\n <CellTextRow\n left={title}\n right={titleRight}\n leftProps={{\n fontWeight: \"500\",\n fontSize: 16,\n lineHeight: 20,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n {hasDescriptions && (\n <CellTextRow\n left={description}\n right={descriptionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n )}\n {hasCaptions && (\n <CellTextRow\n left={caption}\n right={captionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n />\n )}\n </Box>\n );\n }\n);\n\nCellText.displayName = \"Cell.Text\";\n\nexport const Cell = Object.assign(CellRoot, {\n Slot: CellSlot,\n Content: CellContent,\n Text: CellText,\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 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 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,\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"],"mappings":";AAAA,SAAS,YAAY,eAAe;;;ACCpC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AAmID;AAhIC,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,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,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA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AACF;AAEA,SAAS,cAAc;AAEhB,IAAM,OAAO,OAAO,OAAO,UAAU;AAAA,EAC1C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AACR,CAAC;","names":["jsx","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/Cell.tsx","../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx"],"sourcesContent":["import { forwardRef, useMemo } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport {\n CellContentProps,\n CellProps,\n CellSlotProps,\n CellTextProps,\n CellView,\n} from \"./types\";\n\nconst CellRoot = forwardRef<any, CellProps>(\n (\n {\n children,\n view: viewProp,\n withBoard,\n style,\n themeMode,\n themeProductContext,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n const view: CellView = viewProp ?? (withBoard ? \"stroke\" : \"default\");\n\n const viewStyles = useMemo(() => {\n const hoverBg = theme.colors.background.secondary;\n\n switch (view) {\n case \"stroke\":\n return {\n borderRadius: 8,\n borderWidth: 1,\n borderColor: theme.colors.border.secondary,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n case \"surface\":\n return {\n backgroundColor: theme.colors.background.secondary,\n borderRadius: 8,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n default:\n return {\n minHeight: 56,\n hoverStyle: { backgroundColor: hoverBg },\n };\n }\n }, [view, theme]);\n\n const hasPress = props.onPress != null;\n\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n width=\"100%\"\n flexDirection=\"row\"\n gap={12}\n cursor={hasPress ? \"pointer\" : undefined}\n {...viewStyles}\n {...props}\n style={{ color: theme.colors.content.primary, ...style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellRoot.displayName = \"Cell\";\n\nconst CellSlot = forwardRef<any, CellSlotProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n justifyContent=\"center\"\n flexDirection=\"row\"\n {...props}\n style={{ flexShrink: 0, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellSlot.displayName = \"Cell.Slot\";\n\nconst CellContent = forwardRef<any, CellContentProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n {...props}\n style={{ flex: 1, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellContent.displayName = \"Cell.Content\";\n\nconst CellTextRow = ({\n left,\n right,\n leftProps,\n rightProps,\n}: {\n left?: React.ReactNode;\n right?: React.ReactNode;\n leftProps?: Record<string, unknown>;\n rightProps?: Record<string, unknown>;\n}) => {\n if (!left && !right) return null;\n return (\n <Box flexDirection=\"row\" gap={12} alignItems=\"center\" width=\"100%\">\n {left != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof left === \"string\" ? <Text {...leftProps}>{left}</Text> : left}\n </Box>\n )}\n {right != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"flex-end\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof right === \"string\" ? (\n <Text {...rightProps}>{right}</Text>\n ) : (\n right\n )}\n </Box>\n )}\n </Box>\n );\n};\n\nconst CellText = forwardRef<any, CellTextProps>(\n (\n {\n title,\n titleRight,\n description,\n descriptionRight,\n caption,\n captionRight,\n themeMode,\n themeProductContext,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n const hasDescriptions = description != null || descriptionRight != null;\n const hasCaptions = caption != null || captionRight != null;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n gap={2}\n {...props}\n style={{ flex: 1, minWidth: 0, minHeight: 1, ...props.style }}\n >\n <CellTextRow\n left={title}\n right={titleRight}\n leftProps={{\n fontWeight: \"500\",\n fontSize: 16,\n lineHeight: 20,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n {hasDescriptions && (\n <CellTextRow\n left={description}\n right={descriptionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n )}\n {hasCaptions && (\n <CellTextRow\n left={caption}\n right={captionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n />\n )}\n </Box>\n );\n }\n);\n\nCellText.displayName = \"Cell.Text\";\n\nexport const Cell = Object.assign(CellRoot, {\n Slot: CellSlot,\n Content: CellContent,\n Text: CellText,\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"],"mappings":";AAAA,SAAS,YAAY,eAAe;;;ACCpC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;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;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;AAAA,cACA,YAAY;AAAA,gBACV,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,cACd;AAAA;AAAA,UACF;AAAA,UACC,mBACC,gBAAAA;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,cACP,WAAW;AAAA,gBACT,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,cACd;AAAA,cACA,YAAY;AAAA,gBACV,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,cACd;AAAA;AAAA,UACF;AAAA,UAED,eACC,gBAAAA;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,cACP,WAAW;AAAA,gBACT,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,gBACZ,OAAO,MAAM,OAAO,QAAQ;AAAA,cAC9B;AAAA,cACA,YAAY;AAAA,gBACV,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,gBACZ,OAAO,MAAM,OAAO,QAAQ;AAAA,cAC9B;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,SAAS,cAAc;AAEhB,IAAM,OAAO,OAAO,OAAO,UAAU;AAAA,EAC1C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AACR,CAAC;","names":["jsx","jsx"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-cell",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.129.0",
|
|
4
4
|
"main": "./web/index.js",
|
|
5
5
|
"module": "./web/index.mjs",
|
|
6
6
|
"types": "./web/index.d.ts",
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
"build:native": "PLATFORM=native tsup"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xsolla/xui-avatar": "0.
|
|
14
|
-
"@xsolla/xui-button": "0.
|
|
15
|
-
"@xsolla/xui-core": "0.
|
|
16
|
-
"@xsolla/xui-primitives-core": "0.
|
|
13
|
+
"@xsolla/xui-avatar": "0.129.0",
|
|
14
|
+
"@xsolla/xui-button": "0.129.0",
|
|
15
|
+
"@xsolla/xui-core": "0.129.0",
|
|
16
|
+
"@xsolla/xui-primitives-core": "0.129.0"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": ">=16.8.0",
|
package/web/index.d.mts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { BoxProps } from '@xsolla/xui-primitives-core';
|
|
4
|
+
import { ThemeOverrideProps } from '@xsolla/xui-core';
|
|
4
5
|
|
|
5
6
|
type CellView = "default" | "stroke" | "surface";
|
|
6
|
-
interface CellProps extends BoxProps {
|
|
7
|
+
interface CellProps extends BoxProps, ThemeOverrideProps {
|
|
7
8
|
children?: ReactNode;
|
|
8
9
|
/** Visual variant of the cell container. */
|
|
9
10
|
view?: CellView;
|
|
@@ -19,7 +20,7 @@ interface CellSlotProps extends BoxProps {
|
|
|
19
20
|
interface CellContentProps extends BoxProps {
|
|
20
21
|
children?: ReactNode;
|
|
21
22
|
}
|
|
22
|
-
interface CellTextProps extends BoxProps {
|
|
23
|
+
interface CellTextProps extends BoxProps, ThemeOverrideProps {
|
|
23
24
|
/** Primary title on the left. */
|
|
24
25
|
title?: ReactNode;
|
|
25
26
|
/** Secondary text on the right of the title row. */
|
package/web/index.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { BoxProps } from '@xsolla/xui-primitives-core';
|
|
4
|
+
import { ThemeOverrideProps } from '@xsolla/xui-core';
|
|
4
5
|
|
|
5
6
|
type CellView = "default" | "stroke" | "surface";
|
|
6
|
-
interface CellProps extends BoxProps {
|
|
7
|
+
interface CellProps extends BoxProps, ThemeOverrideProps {
|
|
7
8
|
children?: ReactNode;
|
|
8
9
|
/** Visual variant of the cell container. */
|
|
9
10
|
view?: CellView;
|
|
@@ -19,7 +20,7 @@ interface CellSlotProps extends BoxProps {
|
|
|
19
20
|
interface CellContentProps extends BoxProps {
|
|
20
21
|
children?: ReactNode;
|
|
21
22
|
}
|
|
22
|
-
interface CellTextProps extends BoxProps {
|
|
23
|
+
interface CellTextProps extends BoxProps, ThemeOverrideProps {
|
|
23
24
|
/** Primary title on the left. */
|
|
24
25
|
title?: ReactNode;
|
|
25
26
|
/** Secondary text on the right of the title row. */
|
package/web/index.js
CHANGED
|
@@ -75,6 +75,8 @@ var StyledBox = import_styled_components.default.div`
|
|
|
75
75
|
width: ${(props) => typeof props.width === "number" ? `${props.width}px` : props.width || "auto"};
|
|
76
76
|
min-width: ${(props) => typeof props.minWidth === "number" ? `${props.minWidth}px` : props.minWidth || "auto"};
|
|
77
77
|
min-height: ${(props) => typeof props.minHeight === "number" ? `${props.minHeight}px` : props.minHeight || "auto"};
|
|
78
|
+
max-width: ${(props) => typeof props.maxWidth === "number" ? `${props.maxWidth}px` : props.maxWidth || "none"};
|
|
79
|
+
max-height: ${(props) => typeof props.maxHeight === "number" ? `${props.maxHeight}px` : props.maxHeight || "none"};
|
|
78
80
|
|
|
79
81
|
padding: ${(props) => typeof props.padding === "number" ? `${props.padding}px` : props.padding || 0};
|
|
80
82
|
${(props) => props.paddingHorizontal && `
|
|
@@ -243,8 +245,16 @@ var Text = ({
|
|
|
243
245
|
var import_xui_core = require("@xsolla/xui-core");
|
|
244
246
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
245
247
|
var CellRoot = (0, import_react2.forwardRef)(
|
|
246
|
-
({
|
|
247
|
-
|
|
248
|
+
({
|
|
249
|
+
children,
|
|
250
|
+
view: viewProp,
|
|
251
|
+
withBoard,
|
|
252
|
+
style,
|
|
253
|
+
themeMode,
|
|
254
|
+
themeProductContext,
|
|
255
|
+
...props
|
|
256
|
+
}, ref) => {
|
|
257
|
+
const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
|
|
248
258
|
const view = viewProp ?? (withBoard ? "stroke" : "default");
|
|
249
259
|
const viewStyles = (0, import_react2.useMemo)(() => {
|
|
250
260
|
const hoverBg = theme.colors.background.secondary;
|
|
@@ -362,9 +372,11 @@ var CellText = (0, import_react2.forwardRef)(
|
|
|
362
372
|
descriptionRight,
|
|
363
373
|
caption,
|
|
364
374
|
captionRight,
|
|
375
|
+
themeMode,
|
|
376
|
+
themeProductContext,
|
|
365
377
|
...props
|
|
366
378
|
}, ref) => {
|
|
367
|
-
const { theme } = (0, import_xui_core.
|
|
379
|
+
const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
|
|
368
380
|
const hasDescriptions = description != null || descriptionRight != null;
|
|
369
381
|
const hasCaptions = caption != null || captionRight != null;
|
|
370
382
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
package/web/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.tsx","../../src/Cell.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/Text.tsx"],"sourcesContent":["export * from \"./Cell\";\nexport * from \"./types\";\n","import { forwardRef, useMemo } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport {\n CellContentProps,\n CellProps,\n CellSlotProps,\n CellTextProps,\n CellView,\n} from \"./types\";\n\nconst CellRoot = forwardRef<any, CellProps>(\n ({ children, view: viewProp, withBoard, style, ...props }, ref) => {\n const { theme } = useDesignSystem();\n\n const view: CellView = viewProp ?? (withBoard ? \"stroke\" : \"default\");\n\n const viewStyles = useMemo(() => {\n const hoverBg = theme.colors.background.secondary;\n\n switch (view) {\n case \"stroke\":\n return {\n borderRadius: 8,\n borderWidth: 1,\n borderColor: theme.colors.border.secondary,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n case \"surface\":\n return {\n backgroundColor: theme.colors.background.secondary,\n borderRadius: 8,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n default:\n return {\n minHeight: 56,\n hoverStyle: { backgroundColor: hoverBg },\n };\n }\n }, [view, theme]);\n\n const hasPress = props.onPress != null;\n\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n width=\"100%\"\n flexDirection=\"row\"\n gap={12}\n cursor={hasPress ? \"pointer\" : undefined}\n {...viewStyles}\n {...props}\n style={{ color: theme.colors.content.primary, ...style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellRoot.displayName = \"Cell\";\n\nconst CellSlot = forwardRef<any, CellSlotProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n justifyContent=\"center\"\n flexDirection=\"row\"\n {...props}\n style={{ flexShrink: 0, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellSlot.displayName = \"Cell.Slot\";\n\nconst CellContent = forwardRef<any, CellContentProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n {...props}\n style={{ flex: 1, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellContent.displayName = \"Cell.Content\";\n\nconst CellTextRow = ({\n left,\n right,\n leftProps,\n rightProps,\n}: {\n left?: React.ReactNode;\n right?: React.ReactNode;\n leftProps?: Record<string, unknown>;\n rightProps?: Record<string, unknown>;\n}) => {\n if (!left && !right) return null;\n return (\n <Box flexDirection=\"row\" gap={12} alignItems=\"center\" width=\"100%\">\n {left != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof left === \"string\" ? <Text {...leftProps}>{left}</Text> : left}\n </Box>\n )}\n {right != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"flex-end\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof right === \"string\" ? (\n <Text {...rightProps}>{right}</Text>\n ) : (\n right\n )}\n </Box>\n )}\n </Box>\n );\n};\n\nconst CellText = forwardRef<any, CellTextProps>(\n (\n {\n title,\n titleRight,\n description,\n descriptionRight,\n caption,\n captionRight,\n ...props\n },\n ref\n ) => {\n const { theme } = useDesignSystem();\n\n const hasDescriptions = description != null || descriptionRight != null;\n const hasCaptions = caption != null || captionRight != null;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n gap={2}\n {...props}\n style={{ flex: 1, minWidth: 0, minHeight: 1, ...props.style }}\n >\n <CellTextRow\n left={title}\n right={titleRight}\n leftProps={{\n fontWeight: \"500\",\n fontSize: 16,\n lineHeight: 20,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n {hasDescriptions && (\n <CellTextRow\n left={description}\n right={descriptionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n )}\n {hasCaptions && (\n <CellTextRow\n left={caption}\n right={captionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n />\n )}\n </Box>\n );\n }\n);\n\nCellText.displayName = \"Cell.Text\";\n\nexport const Cell = Object.assign(CellRoot, {\n Slot: CellSlot,\n Content: CellContent,\n Text: CellText,\n});\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledBox = styled.div<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n overflow: ${(props) => props.overflow || \"visible\"};\n overflow-x: ${(props) => props.overflowX || \"visible\"};\n overflow-y: ${(props) => props.overflowY || \"visible\"};\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n &:hover {\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\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 \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n type,\n disabled,\n id,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n as={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledText = styled.span<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAoC;;;ACApC,mBAAkB;AAClB,+BAAmB;AAuMX;AApMR,IAAM,YAAY,yBAAAC,QAAO;AAAA;AAAA;AAAA,sBAGH,CAAC,UAAU,MAAM,mBAAmB,aAAa;AAAA,kBACrD,CAAC,UAAU,MAAM,eAAe,aAAa;AAAA,kBAC7C,CAAC,UACf,OAAO,MAAM,gBAAgB,WACzB,GAAG,MAAM,WAAW,OACpB,MAAM,eAAe,CAAC;AAAA;AAAA,IAE1B,CAAC,UACD,MAAM,sBAAsB,UAC5B;AAAA,2BACuB,OAAO,MAAM,sBAAsB,WAAW,GAAG,MAAM,iBAAiB,OAAO,MAAM,iBAAiB;AAAA,2BACtG,MAAM,qBAAqB,MAAM,eAAe,aAAa;AAAA;AAAA,GAErF;AAAA,IACC,CAAC,UACD,MAAM,mBAAmB,UACzB;AAAA,wBACoB,OAAO,MAAM,mBAAmB,WAAW,GAAG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,UAAU;AAAA,gBACV,YAAY;AAAA,gBACZ,OAAO,MAAM,OAAO,QAAQ;AAAA,cAC9B;AAAA,cACA,YAAY;AAAA,gBACV,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,gBACZ,OAAO,MAAM,OAAO,QAAQ;AAAA,cAC9B;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,SAAS,cAAc;AAEhB,IAAM,OAAO,OAAO,OAAO,UAAU;AAAA,EAC1C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AACR,CAAC;","names":["import_react","styled","React","import_styled_components","import_jsx_runtime","styled","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.tsx","../../src/Cell.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/Text.tsx"],"sourcesContent":["export * from \"./Cell\";\nexport * from \"./types\";\n","import { forwardRef, useMemo } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport {\n CellContentProps,\n CellProps,\n CellSlotProps,\n CellTextProps,\n CellView,\n} from \"./types\";\n\nconst CellRoot = forwardRef<any, CellProps>(\n (\n {\n children,\n view: viewProp,\n withBoard,\n style,\n themeMode,\n themeProductContext,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n const view: CellView = viewProp ?? (withBoard ? \"stroke\" : \"default\");\n\n const viewStyles = useMemo(() => {\n const hoverBg = theme.colors.background.secondary;\n\n switch (view) {\n case \"stroke\":\n return {\n borderRadius: 8,\n borderWidth: 1,\n borderColor: theme.colors.border.secondary,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n case \"surface\":\n return {\n backgroundColor: theme.colors.background.secondary,\n borderRadius: 8,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n default:\n return {\n minHeight: 56,\n hoverStyle: { backgroundColor: hoverBg },\n };\n }\n }, [view, theme]);\n\n const hasPress = props.onPress != null;\n\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n width=\"100%\"\n flexDirection=\"row\"\n gap={12}\n cursor={hasPress ? \"pointer\" : undefined}\n {...viewStyles}\n {...props}\n style={{ color: theme.colors.content.primary, ...style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellRoot.displayName = \"Cell\";\n\nconst CellSlot = forwardRef<any, CellSlotProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n justifyContent=\"center\"\n flexDirection=\"row\"\n {...props}\n style={{ flexShrink: 0, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellSlot.displayName = \"Cell.Slot\";\n\nconst CellContent = forwardRef<any, CellContentProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n {...props}\n style={{ flex: 1, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellContent.displayName = \"Cell.Content\";\n\nconst CellTextRow = ({\n left,\n right,\n leftProps,\n rightProps,\n}: {\n left?: React.ReactNode;\n right?: React.ReactNode;\n leftProps?: Record<string, unknown>;\n rightProps?: Record<string, unknown>;\n}) => {\n if (!left && !right) return null;\n return (\n <Box flexDirection=\"row\" gap={12} alignItems=\"center\" width=\"100%\">\n {left != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof left === \"string\" ? <Text {...leftProps}>{left}</Text> : left}\n </Box>\n )}\n {right != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"flex-end\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof right === \"string\" ? (\n <Text {...rightProps}>{right}</Text>\n ) : (\n right\n )}\n </Box>\n )}\n </Box>\n );\n};\n\nconst CellText = forwardRef<any, CellTextProps>(\n (\n {\n title,\n titleRight,\n description,\n descriptionRight,\n caption,\n captionRight,\n themeMode,\n themeProductContext,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n const hasDescriptions = description != null || descriptionRight != null;\n const hasCaptions = caption != null || captionRight != null;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n gap={2}\n {...props}\n style={{ flex: 1, minWidth: 0, minHeight: 1, ...props.style }}\n >\n <CellTextRow\n left={title}\n right={titleRight}\n leftProps={{\n fontWeight: \"500\",\n fontSize: 16,\n lineHeight: 20,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n {hasDescriptions && (\n <CellTextRow\n left={description}\n right={descriptionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n )}\n {hasCaptions && (\n <CellTextRow\n left={caption}\n right={captionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n />\n )}\n </Box>\n );\n }\n);\n\nCellText.displayName = \"Cell.Text\";\n\nexport const Cell = Object.assign(CellRoot, {\n Slot: CellSlot,\n Content: CellContent,\n Text: CellText,\n});\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledBox = styled.div<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n overflow: ${(props) => props.overflow || \"visible\"};\n overflow-x: ${(props) => props.overflowX || \"visible\"};\n overflow-y: ${(props) => props.overflowY || \"visible\"};\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n &:hover {\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\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 \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n type,\n disabled,\n id,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n as={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledText = styled.span<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAoC;;;ACApC,mBAAkB;AAClB,+BAAmB;AA+MX;AA5MR,IAAM,YAAY,yBAAAC,QAAO;AAAA;AAAA;AAAA,sBAGH,CAAC,UAAU,MAAM,mBAAmB,aAAa;AAAA,kBACrD,CAAC,UAAU,MAAM,eAAe,aAAa;AAAA,kBAC7C,CAAC,UACf,OAAO,MAAM,gBAAgB,WACzB,GAAG,MAAM,WAAW,OACpB,MAAM,eAAe,CAAC;AAAA;AAAA,IAE1B,CAAC,UACD,MAAM,sBAAsB,UAC5B;AAAA,2BACuB,OAAO,MAAM,sBAAsB,WAAW,GAAG,MAAM,iBAAiB,OAAO,MAAM,iBAAiB;AAAA,2BACtG,MAAM,qBAAqB,MAAM,eAAe,aAAa;AAAA;AAAA,GAErF;AAAA,IACC,CAAC,UACD,MAAM,mBAAmB,UACzB;AAAA,wBACoB,OAAO,MAAM,mBAAmB,WAAW,GAAG,MAA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AAAA,cACP,WAAW;AAAA,gBACT,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,cACd;AAAA,cACA,YAAY;AAAA,gBACV,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,cACd;AAAA;AAAA,UACF;AAAA,UAED,eACC;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,cACP,WAAW;AAAA,gBACT,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,gBACZ,OAAO,MAAM,OAAO,QAAQ;AAAA,cAC9B;AAAA,cACA,YAAY;AAAA,gBACV,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,gBACZ,OAAO,MAAM,OAAO,QAAQ;AAAA,cAC9B;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,SAAS,cAAc;AAEhB,IAAM,OAAO,OAAO,OAAO,UAAU;AAAA,EAC1C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AACR,CAAC;","names":["import_react","styled","React","import_styled_components","import_jsx_runtime","styled","import_jsx_runtime"]}
|
package/web/index.mjs
CHANGED
|
@@ -39,6 +39,8 @@ var StyledBox = styled.div`
|
|
|
39
39
|
width: ${(props) => typeof props.width === "number" ? `${props.width}px` : props.width || "auto"};
|
|
40
40
|
min-width: ${(props) => typeof props.minWidth === "number" ? `${props.minWidth}px` : props.minWidth || "auto"};
|
|
41
41
|
min-height: ${(props) => typeof props.minHeight === "number" ? `${props.minHeight}px` : props.minHeight || "auto"};
|
|
42
|
+
max-width: ${(props) => typeof props.maxWidth === "number" ? `${props.maxWidth}px` : props.maxWidth || "none"};
|
|
43
|
+
max-height: ${(props) => typeof props.maxHeight === "number" ? `${props.maxHeight}px` : props.maxHeight || "none"};
|
|
42
44
|
|
|
43
45
|
padding: ${(props) => typeof props.padding === "number" ? `${props.padding}px` : props.padding || 0};
|
|
44
46
|
${(props) => props.paddingHorizontal && `
|
|
@@ -204,11 +206,19 @@ var Text = ({
|
|
|
204
206
|
};
|
|
205
207
|
|
|
206
208
|
// src/Cell.tsx
|
|
207
|
-
import {
|
|
209
|
+
import { useResolvedTheme } from "@xsolla/xui-core";
|
|
208
210
|
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
209
211
|
var CellRoot = forwardRef(
|
|
210
|
-
({
|
|
211
|
-
|
|
212
|
+
({
|
|
213
|
+
children,
|
|
214
|
+
view: viewProp,
|
|
215
|
+
withBoard,
|
|
216
|
+
style,
|
|
217
|
+
themeMode,
|
|
218
|
+
themeProductContext,
|
|
219
|
+
...props
|
|
220
|
+
}, ref) => {
|
|
221
|
+
const { theme } = useResolvedTheme({ themeMode, themeProductContext });
|
|
212
222
|
const view = viewProp ?? (withBoard ? "stroke" : "default");
|
|
213
223
|
const viewStyles = useMemo(() => {
|
|
214
224
|
const hoverBg = theme.colors.background.secondary;
|
|
@@ -326,9 +336,11 @@ var CellText = forwardRef(
|
|
|
326
336
|
descriptionRight,
|
|
327
337
|
caption,
|
|
328
338
|
captionRight,
|
|
339
|
+
themeMode,
|
|
340
|
+
themeProductContext,
|
|
329
341
|
...props
|
|
330
342
|
}, ref) => {
|
|
331
|
-
const { theme } =
|
|
343
|
+
const { theme } = useResolvedTheme({ themeMode, themeProductContext });
|
|
332
344
|
const hasDescriptions = description != null || descriptionRight != null;
|
|
333
345
|
const hasCaptions = caption != null || captionRight != null;
|
|
334
346
|
return /* @__PURE__ */ jsxs(
|
package/web/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/Cell.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/Text.tsx"],"sourcesContent":["import { forwardRef, useMemo } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport {\n CellContentProps,\n CellProps,\n CellSlotProps,\n CellTextProps,\n CellView,\n} from \"./types\";\n\nconst CellRoot = forwardRef<any, CellProps>(\n ({ children, view: viewProp, withBoard, style, ...props }, ref) => {\n const { theme } = useDesignSystem();\n\n const view: CellView = viewProp ?? (withBoard ? \"stroke\" : \"default\");\n\n const viewStyles = useMemo(() => {\n const hoverBg = theme.colors.background.secondary;\n\n switch (view) {\n case \"stroke\":\n return {\n borderRadius: 8,\n borderWidth: 1,\n borderColor: theme.colors.border.secondary,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n case \"surface\":\n return {\n backgroundColor: theme.colors.background.secondary,\n borderRadius: 8,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n default:\n return {\n minHeight: 56,\n hoverStyle: { backgroundColor: hoverBg },\n };\n }\n }, [view, theme]);\n\n const hasPress = props.onPress != null;\n\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n width=\"100%\"\n flexDirection=\"row\"\n gap={12}\n cursor={hasPress ? \"pointer\" : undefined}\n {...viewStyles}\n {...props}\n style={{ color: theme.colors.content.primary, ...style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellRoot.displayName = \"Cell\";\n\nconst CellSlot = forwardRef<any, CellSlotProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n justifyContent=\"center\"\n flexDirection=\"row\"\n {...props}\n style={{ flexShrink: 0, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellSlot.displayName = \"Cell.Slot\";\n\nconst CellContent = forwardRef<any, CellContentProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n {...props}\n style={{ flex: 1, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellContent.displayName = \"Cell.Content\";\n\nconst CellTextRow = ({\n left,\n right,\n leftProps,\n rightProps,\n}: {\n left?: React.ReactNode;\n right?: React.ReactNode;\n leftProps?: Record<string, unknown>;\n rightProps?: Record<string, unknown>;\n}) => {\n if (!left && !right) return null;\n return (\n <Box flexDirection=\"row\" gap={12} alignItems=\"center\" width=\"100%\">\n {left != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof left === \"string\" ? <Text {...leftProps}>{left}</Text> : left}\n </Box>\n )}\n {right != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"flex-end\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof right === \"string\" ? (\n <Text {...rightProps}>{right}</Text>\n ) : (\n right\n )}\n </Box>\n )}\n </Box>\n );\n};\n\nconst CellText = forwardRef<any, CellTextProps>(\n (\n {\n title,\n titleRight,\n description,\n descriptionRight,\n caption,\n captionRight,\n ...props\n },\n ref\n ) => {\n const { theme } = useDesignSystem();\n\n const hasDescriptions = description != null || descriptionRight != null;\n const hasCaptions = caption != null || captionRight != null;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n gap={2}\n {...props}\n style={{ flex: 1, minWidth: 0, minHeight: 1, ...props.style }}\n >\n <CellTextRow\n left={title}\n right={titleRight}\n leftProps={{\n fontWeight: \"500\",\n fontSize: 16,\n lineHeight: 20,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n {hasDescriptions && (\n <CellTextRow\n left={description}\n right={descriptionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n )}\n {hasCaptions && (\n <CellTextRow\n left={caption}\n right={captionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n />\n )}\n </Box>\n );\n }\n);\n\nCellText.displayName = \"Cell.Text\";\n\nexport const Cell = Object.assign(CellRoot, {\n Slot: CellSlot,\n Content: CellContent,\n Text: CellText,\n});\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledBox = styled.div<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n overflow: ${(props) => props.overflow || \"visible\"};\n overflow-x: ${(props) => props.overflowX || \"visible\"};\n overflow-y: ${(props) => props.overflowY || \"visible\"};\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n &:hover {\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\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 \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n type,\n disabled,\n id,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n as={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledText = styled.span<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n"],"mappings":";AAAA,SAAS,YAAY,eAAe;;;ACApC,OAAO,WAAW;AAClB,OAAO,YAAY;AAuMX;AApMR,IAAM,YAAY,OAAO;AAAA;AAAA;AAAA,sBAGH,CAAC,UAAU,MAAM,mBAAmB,aAAa;AAAA,kBACrD,CAAC,UAAU,MAAM,eAAe,aAAa;AAAA,kBAC7C,CAAC,UACf,OAAO,MAAM,gBAAgB,WACzB,GAAG,MAAM,WAAW,OACpB,MAAM,eAAe,CAAC;AAAA;AAAA,IAE1B,CAAC,UACD,MAAM,sBAAsB,UAC5B;AAAA,2BACuB,OAAO,MAAM,sBAAsB,WAAW,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AY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,cACd;AAAA,cACA,YAAY;AAAA,gBACV,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,cACd;AAAA;AAAA,UACF;AAAA,UAED,eACC,gBAAAA;AAAA,YAAC;AAAA;AAAA,cACC,MAAM;AAAA,cACN,OAAO;AAAA,cACP,WAAW;AAAA,gBACT,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,gBACZ,OAAO,MAAM,OAAO,QAAQ;AAAA,cAC9B;AAAA,cACA,YAAY;AAAA,gBACV,YAAY;AAAA,gBACZ,UAAU;AAAA,gBACV,YAAY;AAAA,gBACZ,OAAO,MAAM,OAAO,QAAQ;AAAA,cAC9B;AAAA;AAAA,UACF;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,SAAS,cAAc;AAEhB,IAAM,OAAO,OAAO,OAAO,UAAU;AAAA,EAC1C,MAAM;AAAA,EACN,SAAS;AAAA,EACT,MAAM;AACR,CAAC;","names":["styled","jsx","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../src/Cell.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/Text.tsx"],"sourcesContent":["import { forwardRef, useMemo } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport {\n CellContentProps,\n CellProps,\n CellSlotProps,\n CellTextProps,\n CellView,\n} from \"./types\";\n\nconst CellRoot = forwardRef<any, CellProps>(\n (\n {\n children,\n view: viewProp,\n withBoard,\n style,\n themeMode,\n themeProductContext,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n const view: CellView = viewProp ?? (withBoard ? \"stroke\" : \"default\");\n\n const viewStyles = useMemo(() => {\n const hoverBg = theme.colors.background.secondary;\n\n switch (view) {\n case \"stroke\":\n return {\n borderRadius: 8,\n borderWidth: 1,\n borderColor: theme.colors.border.secondary,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n case \"surface\":\n return {\n backgroundColor: theme.colors.background.secondary,\n borderRadius: 8,\n padding: 12,\n hoverStyle: { backgroundColor: hoverBg },\n };\n default:\n return {\n minHeight: 56,\n hoverStyle: { backgroundColor: hoverBg },\n };\n }\n }, [view, theme]);\n\n const hasPress = props.onPress != null;\n\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n width=\"100%\"\n flexDirection=\"row\"\n gap={12}\n cursor={hasPress ? \"pointer\" : undefined}\n {...viewStyles}\n {...props}\n style={{ color: theme.colors.content.primary, ...style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellRoot.displayName = \"Cell\";\n\nconst CellSlot = forwardRef<any, CellSlotProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n alignItems=\"center\"\n justifyContent=\"center\"\n flexDirection=\"row\"\n {...props}\n style={{ flexShrink: 0, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellSlot.displayName = \"Cell.Slot\";\n\nconst CellContent = forwardRef<any, CellContentProps>(\n ({ children, ...props }, ref) => {\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n {...props}\n style={{ flex: 1, ...props.style }}\n >\n {children}\n </Box>\n );\n }\n);\n\nCellContent.displayName = \"Cell.Content\";\n\nconst CellTextRow = ({\n left,\n right,\n leftProps,\n rightProps,\n}: {\n left?: React.ReactNode;\n right?: React.ReactNode;\n leftProps?: Record<string, unknown>;\n rightProps?: Record<string, unknown>;\n}) => {\n if (!left && !right) return null;\n return (\n <Box flexDirection=\"row\" gap={12} alignItems=\"center\" width=\"100%\">\n {left != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof left === \"string\" ? <Text {...leftProps}>{left}</Text> : left}\n </Box>\n )}\n {right != null && (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"flex-end\"\n gap={2}\n style={{ flex: 1, minWidth: 0, minHeight: 1 }}\n >\n {typeof right === \"string\" ? (\n <Text {...rightProps}>{right}</Text>\n ) : (\n right\n )}\n </Box>\n )}\n </Box>\n );\n};\n\nconst CellText = forwardRef<any, CellTextProps>(\n (\n {\n title,\n titleRight,\n description,\n descriptionRight,\n caption,\n captionRight,\n themeMode,\n themeProductContext,\n ...props\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n const hasDescriptions = description != null || descriptionRight != null;\n const hasCaptions = caption != null || captionRight != null;\n\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n justifyContent=\"center\"\n gap={2}\n {...props}\n style={{ flex: 1, minWidth: 0, minHeight: 1, ...props.style }}\n >\n <CellTextRow\n left={title}\n right={titleRight}\n leftProps={{\n fontWeight: \"500\",\n fontSize: 16,\n lineHeight: 20,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n {hasDescriptions && (\n <CellTextRow\n left={description}\n right={descriptionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n }}\n />\n )}\n {hasCaptions && (\n <CellTextRow\n left={caption}\n right={captionRight}\n leftProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n rightProps={{\n fontWeight: \"400\",\n fontSize: 12,\n lineHeight: 18,\n color: theme.colors.content.tertiary,\n }}\n />\n )}\n </Box>\n );\n }\n);\n\nCellText.displayName = \"Cell.Text\";\n\nexport const Cell = Object.assign(CellRoot, {\n Slot: CellSlot,\n Content: CellContent,\n Text: CellText,\n});\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledBox = styled.div<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n overflow: ${(props) => props.overflow || \"visible\"};\n overflow-x: ${(props) => props.overflowX || \"visible\"};\n overflow-y: ${(props) => props.overflowY || \"visible\"};\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n &:hover {\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\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 \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n type,\n disabled,\n id,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n as={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledText = styled.span<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n"],"mappings":";AAAA,SAAS,YAAY,eAAe;;;ACApC,OAAO,WAAW;AAClB,OAAO,YAAY;AA+MX;AA5MR,IAAM,YAAY,OAAO;AAAA;AAAA;AAAA,sBAGH,CAAC,UAAU,MAAM,mBAAmB,aAAa;AAAA,kBACrD,CAAC,UAAU,MAAM,eAAe,aAAa;AAAA,kBAC7C,CAAC,UACf,OAAO,MAAM,gBAAgB,WACzB,GAAG,MAAM,WAAW,OACpB,MAAM,eAAe,CAAC;AAAA;AAAA,IAE1B,CAAC,UACD,MAAM,sBAAsB,UAC5B;AAAA,2BACuB,OAAO,MAAM,sBAAsB,WAAW,GAAG,MAAM,iBAAiB,OAAO,MAAM,iBAAiB;AAAA,2BACtG,MAAM,qBAA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