@xsolla/xui-tag 0.133.0 → 0.135.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 +0 -6
- package/native/index.d.ts +0 -6
- package/native/index.js +1 -25
- package/native/index.js.map +1 -1
- package/native/index.mjs +1 -25
- package/native/index.mjs.map +1 -1
- package/package.json +4 -4
- package/web/index.d.mts +0 -6
- package/web/index.d.ts +0 -6
- package/web/index.js +7 -140
- package/web/index.js.map +1 -1
- package/web/index.mjs +7 -140
- package/web/index.mjs.map +1 -1
package/native/index.d.mts
CHANGED
|
@@ -8,12 +8,6 @@ interface TagProps extends ThemeOverrideProps {
|
|
|
8
8
|
tone?: "primary" | "brand" | "brandExtra" | "success" | "warning" | "alert" | "neutral";
|
|
9
9
|
/** Visual style: solid (filled background) or outlined (border only) */
|
|
10
10
|
type?: "solid" | "outlined";
|
|
11
|
-
/** Interaction variant: default (display only) or selectable (interactive toggle) */
|
|
12
|
-
variant?: "default" | "selectable";
|
|
13
|
-
/** Whether the tag is selected. Only applies to the selectable variant. */
|
|
14
|
-
selected?: boolean;
|
|
15
|
-
/** Click handler for selectable tags */
|
|
16
|
-
onPress?: () => void;
|
|
17
11
|
/** Label text. When omitted with an icon, the tag collapses to a square. */
|
|
18
12
|
children?: ReactNode;
|
|
19
13
|
/** Icon displayed on the left side of the label */
|
package/native/index.d.ts
CHANGED
|
@@ -8,12 +8,6 @@ interface TagProps extends ThemeOverrideProps {
|
|
|
8
8
|
tone?: "primary" | "brand" | "brandExtra" | "success" | "warning" | "alert" | "neutral";
|
|
9
9
|
/** Visual style: solid (filled background) or outlined (border only) */
|
|
10
10
|
type?: "solid" | "outlined";
|
|
11
|
-
/** Interaction variant: default (display only) or selectable (interactive toggle) */
|
|
12
|
-
variant?: "default" | "selectable";
|
|
13
|
-
/** Whether the tag is selected. Only applies to the selectable variant. */
|
|
14
|
-
selected?: boolean;
|
|
15
|
-
/** Click handler for selectable tags */
|
|
16
|
-
onPress?: () => void;
|
|
17
11
|
/** Label text. When omitted with an icon, the tag collapses to a square. */
|
|
18
12
|
children?: ReactNode;
|
|
19
13
|
/** Icon displayed on the left side of the label */
|
package/native/index.js
CHANGED
|
@@ -299,14 +299,10 @@ var Icon = ({ children, color, size }) => {
|
|
|
299
299
|
var import_xui_core = require("@xsolla/xui-core");
|
|
300
300
|
var import_xui_icons = require("@xsolla/xui-icons");
|
|
301
301
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
302
|
-
var SELECTABLE_BORDER_RADIUS = 8;
|
|
303
302
|
var Tag = ({
|
|
304
303
|
size = "md",
|
|
305
304
|
tone = "primary",
|
|
306
305
|
type = "solid",
|
|
307
|
-
variant = "default",
|
|
308
|
-
selected = false,
|
|
309
|
-
onPress,
|
|
310
306
|
children,
|
|
311
307
|
iconLeft,
|
|
312
308
|
iconRight,
|
|
@@ -317,20 +313,6 @@ var Tag = ({
|
|
|
317
313
|
const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
|
|
318
314
|
const sizeStyles = theme.sizing.tag(size);
|
|
319
315
|
const resolveColors = () => {
|
|
320
|
-
if (variant === "selectable") {
|
|
321
|
-
if (selected) {
|
|
322
|
-
return {
|
|
323
|
-
bg: theme.colors.control.brand.secondary.bg,
|
|
324
|
-
text: theme.colors.content.brand.primary,
|
|
325
|
-
border: theme.colors.border.secondary
|
|
326
|
-
};
|
|
327
|
-
}
|
|
328
|
-
return {
|
|
329
|
-
bg: theme.colors.overlay.mono,
|
|
330
|
-
text: theme.colors.content.primary,
|
|
331
|
-
border: theme.colors.border.secondary
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
316
|
const isOutlined = type === "outlined";
|
|
335
317
|
switch (tone) {
|
|
336
318
|
case "primary":
|
|
@@ -384,16 +366,12 @@ var Tag = ({
|
|
|
384
366
|
}
|
|
385
367
|
};
|
|
386
368
|
const { bg, text, border } = resolveColors();
|
|
387
|
-
const isSelectable = variant === "selectable";
|
|
388
|
-
const borderRadius = isSelectable ? SELECTABLE_BORDER_RADIUS : sizeStyles.radius;
|
|
389
369
|
const isIconOnly = !children && (!!iconLeft || !!iconRight);
|
|
390
370
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
391
371
|
Box,
|
|
392
372
|
{
|
|
393
|
-
as: isSelectable ? "button" : void 0,
|
|
394
|
-
onPress: isSelectable ? onPress : void 0,
|
|
395
373
|
backgroundColor: bg,
|
|
396
|
-
borderRadius,
|
|
374
|
+
borderRadius: sizeStyles.radius,
|
|
397
375
|
height: sizeStyles.height,
|
|
398
376
|
width: isIconOnly ? sizeStyles.height : void 0,
|
|
399
377
|
paddingHorizontal: isIconOnly ? 0 : sizeStyles.padding,
|
|
@@ -404,8 +382,6 @@ var Tag = ({
|
|
|
404
382
|
borderWidth: sizeStyles.borderWidth,
|
|
405
383
|
borderColor: border,
|
|
406
384
|
borderStyle: "solid",
|
|
407
|
-
cursor: isSelectable ? "pointer" : "default",
|
|
408
|
-
hoverStyle: isSelectable && !selected ? { backgroundColor: theme.colors.control.brand.tertiary.bgHover } : void 0,
|
|
409
385
|
style: {
|
|
410
386
|
overflow: "hidden",
|
|
411
387
|
textOverflow: "ellipsis",
|
package/native/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.tsx","../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx","../../../primitives-native/src/Icon.tsx","../../src/Tag.tsx"],"sourcesContent":["export * from \"./Tag\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport {\n Text as RNText,\n TextStyle,\n AccessibilityRole,\n StyleSheet,\n} from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nconst parseNumericValue = (\n value: string | number | undefined\n): number | undefined => {\n if (value === undefined) return undefined;\n if (typeof value === \"number\") return value;\n const parsed = parseFloat(value);\n return isNaN(parsed) ? undefined : parsed;\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n textAlign,\n lineHeight,\n numberOfLines,\n id,\n role,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Icon: React.FC<IconProps> = ({ children, color, size }) => {\n const style: ViewStyle = {\n width: typeof size === \"number\" ? size : undefined,\n height: typeof size === \"number\" ? size : undefined,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n // On native, we try to pass the color down to children (like Text primitives)\n // to mimic the CSS inheritance behavior of the web version.\n const childrenWithProps = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, {\n color: child.props.color || color,\n // Also pass size if child seems to be an icon that needs it\n size: child.props.size || size,\n });\n }\n return child;\n });\n\n return <View style={style}>{childrenWithProps}</View>;\n};\n","import React, { type ReactNode } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport { X } from \"@xsolla/xui-icons\";\n\nexport interface TagProps extends ThemeOverrideProps {\n /** Size of the tag */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n /** Colour tone of the tag */\n tone?:\n | \"primary\"\n | \"brand\"\n | \"brandExtra\"\n | \"success\"\n | \"warning\"\n | \"alert\"\n | \"neutral\";\n /** Visual style: solid (filled background) or outlined (border only) */\n type?: \"solid\" | \"outlined\";\n /** Interaction variant: default (display only) or selectable (interactive toggle) */\n variant?: \"default\" | \"selectable\";\n /** Whether the tag is selected. Only applies to the selectable variant. */\n selected?: boolean;\n /** Click handler for selectable tags */\n onPress?: () => void;\n /** Label text. When omitted with an icon, the tag collapses to a square. */\n children?: ReactNode;\n /** Icon displayed on the left side of the label */\n iconLeft?: ReactNode;\n /** Icon displayed on the right side of the label */\n iconRight?: ReactNode;\n /** Callback when the remove (X) icon is clicked */\n onRemove?: () => void;\n}\n\nconst SELECTABLE_BORDER_RADIUS = 8;\n\nexport const Tag: React.FC<TagProps> = ({\n size = \"md\",\n tone = \"primary\",\n type = \"solid\",\n variant = \"default\",\n selected = false,\n onPress,\n children,\n iconLeft,\n iconRight,\n onRemove,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizeStyles = theme.sizing.tag(size);\n\n const resolveColors = () => {\n if (variant === \"selectable\") {\n if (selected) {\n return {\n bg: theme.colors.control.brand.secondary.bg,\n text: theme.colors.content.brand.primary,\n border: theme.colors.border.secondary,\n };\n }\n return {\n bg: theme.colors.overlay.mono,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n }\n\n const isOutlined = type === \"outlined\";\n\n switch (tone) {\n case \"primary\":\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n case \"brand\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brand.primary,\n text: isOutlined\n ? theme.colors.content.brand.primary\n : theme.colors.content.on.brand,\n border: theme.colors.border.brand,\n };\n case \"brandExtra\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brandExtra.primary,\n text: isOutlined\n ? theme.colors.content.brandExtra.primary\n : theme.colors.content.on.brandExtra,\n border: theme.colors.border.brandExtra,\n };\n case \"success\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.success.primary,\n text: isOutlined\n ? theme.colors.content.success.primary\n : theme.colors.content.on.success,\n border: theme.colors.border.success,\n };\n case \"warning\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.warning.primary,\n text: isOutlined\n ? theme.colors.content.warning.primary\n : theme.colors.content.on.warning,\n border: theme.colors.border.warning,\n };\n case \"alert\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.alert.primary,\n text: isOutlined\n ? theme.colors.content.alert.primary\n : theme.colors.content.on.alert,\n border: theme.colors.border.alert,\n };\n case \"neutral\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.neutral.primary,\n text: isOutlined\n ? theme.colors.content.neutral.primary\n : theme.colors.content.on.neutral,\n border: theme.colors.border.neutral,\n };\n default:\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n }\n };\n\n const { bg, text, border } = resolveColors();\n const isSelectable = variant === \"selectable\";\n const borderRadius = isSelectable\n ? SELECTABLE_BORDER_RADIUS\n : sizeStyles.radius;\n const isIconOnly = !children && (!!iconLeft || !!iconRight);\n\n return (\n <Box\n as={isSelectable ? \"button\" : undefined}\n onPress={isSelectable ? onPress : undefined}\n backgroundColor={bg}\n borderRadius={borderRadius}\n height={sizeStyles.height}\n width={isIconOnly ? sizeStyles.height : undefined}\n paddingHorizontal={isIconOnly ? 0 : sizeStyles.padding}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={sizeStyles.gap}\n borderWidth={sizeStyles.borderWidth}\n borderColor={border}\n borderStyle=\"solid\"\n cursor={isSelectable ? \"pointer\" : \"default\"}\n hoverStyle={\n isSelectable && !selected\n ? { backgroundColor: theme.colors.control.brand.tertiary.bgHover }\n : undefined\n }\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {iconLeft && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconLeft}\n </Icon>\n )}\n\n {children && (\n <Text\n color={text}\n fontSize={sizeStyles.fontSize}\n fontWeight=\"500\"\n whiteSpace=\"nowrap\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }}\n >\n {children}\n </Text>\n )}\n\n {iconRight && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconRight}\n </Icon>\n )}\n\n {onRemove && (\n <Box onPress={onRemove}>\n <X size={sizeStyles.iconSize} color={text} />\n </Box>\n )}\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,0BAQO;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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M,WAAW,UAAU,OAAO,MAAM,GAC7C;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["import_react_native","import_jsx_runtime","RNText","import_react_native","import_jsx_runtime","React","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.tsx","../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx","../../../primitives-native/src/Icon.tsx","../../src/Tag.tsx"],"sourcesContent":["export * from \"./Tag\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport {\n Text as RNText,\n TextStyle,\n AccessibilityRole,\n StyleSheet,\n} from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nconst parseNumericValue = (\n value: string | number | undefined\n): number | undefined => {\n if (value === undefined) return undefined;\n if (typeof value === \"number\") return value;\n const parsed = parseFloat(value);\n return isNaN(parsed) ? undefined : parsed;\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n textAlign,\n lineHeight,\n numberOfLines,\n id,\n role,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Icon: React.FC<IconProps> = ({ children, color, size }) => {\n const style: ViewStyle = {\n width: typeof size === \"number\" ? size : undefined,\n height: typeof size === \"number\" ? size : undefined,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n // On native, we try to pass the color down to children (like Text primitives)\n // to mimic the CSS inheritance behavior of the web version.\n const childrenWithProps = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, {\n color: child.props.color || color,\n // Also pass size if child seems to be an icon that needs it\n size: child.props.size || size,\n });\n }\n return child;\n });\n\n return <View style={style}>{childrenWithProps}</View>;\n};\n","import React, { type ReactNode } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport { X } from \"@xsolla/xui-icons\";\n\nexport interface TagProps extends ThemeOverrideProps {\n /** Size of the tag */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n /** Colour tone of the tag */\n tone?:\n | \"primary\"\n | \"brand\"\n | \"brandExtra\"\n | \"success\"\n | \"warning\"\n | \"alert\"\n | \"neutral\";\n /** Visual style: solid (filled background) or outlined (border only) */\n type?: \"solid\" | \"outlined\";\n /** Label text. When omitted with an icon, the tag collapses to a square. */\n children?: ReactNode;\n /** Icon displayed on the left side of the label */\n iconLeft?: ReactNode;\n /** Icon displayed on the right side of the label */\n iconRight?: ReactNode;\n /** Callback when the remove (X) icon is clicked */\n onRemove?: () => void;\n}\n\nexport const Tag: React.FC<TagProps> = ({\n size = \"md\",\n tone = \"primary\",\n type = \"solid\",\n children,\n iconLeft,\n iconRight,\n onRemove,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizeStyles = theme.sizing.tag(size);\n\n const resolveColors = () => {\n const isOutlined = type === \"outlined\";\n\n switch (tone) {\n case \"primary\":\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n case \"brand\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brand.primary,\n text: isOutlined\n ? theme.colors.content.brand.primary\n : theme.colors.content.on.brand,\n border: theme.colors.border.brand,\n };\n case \"brandExtra\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brandExtra.primary,\n text: isOutlined\n ? theme.colors.content.brandExtra.primary\n : theme.colors.content.on.brandExtra,\n border: theme.colors.border.brandExtra,\n };\n case \"success\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.success.primary,\n text: isOutlined\n ? theme.colors.content.success.primary\n : theme.colors.content.on.success,\n border: theme.colors.border.success,\n };\n case \"warning\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.warning.primary,\n text: isOutlined\n ? theme.colors.content.warning.primary\n : theme.colors.content.on.warning,\n border: theme.colors.border.warning,\n };\n case \"alert\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.alert.primary,\n text: isOutlined\n ? theme.colors.content.alert.primary\n : theme.colors.content.on.alert,\n border: theme.colors.border.alert,\n };\n case \"neutral\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.neutral.primary,\n text: isOutlined\n ? theme.colors.content.neutral.primary\n : theme.colors.content.on.neutral,\n border: theme.colors.border.neutral,\n };\n default:\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n }\n };\n\n const { bg, text, border } = resolveColors();\n const isIconOnly = !children && (!!iconLeft || !!iconRight);\n\n return (\n <Box\n backgroundColor={bg}\n borderRadius={sizeStyles.radius}\n height={sizeStyles.height}\n width={isIconOnly ? sizeStyles.height : undefined}\n paddingHorizontal={isIconOnly ? 0 : sizeStyles.padding}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={sizeStyles.gap}\n borderWidth={sizeStyles.borderWidth}\n borderColor={border}\n borderStyle=\"solid\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {iconLeft && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconLeft}\n </Icon>\n )}\n\n {children && (\n <Text\n color={text}\n fontSize={sizeStyles.fontSize}\n fontWeight=\"500\"\n whiteSpace=\"nowrap\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }}\n >\n {children}\n </Text>\n )}\n\n {iconRight && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconRight}\n </Icon>\n )}\n\n {onRemove && (\n <Box onPress={onRemove}>\n <X size={sizeStyles.iconSize} color={text} />\n </Box>\n )}\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,0BAQO;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA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a,WAAW;AAAA,MACxB,aAAa;AAAA,MACb,aAAY;AAAA,MACZ,OAAO;AAAA,QACL,UAAU;AAAA,QACV,cAAc;AAAA,QACd,YAAY;AAAA,MACd;AAAA,MAEC;AAAA,oBACC,6CAAC,QAAK,MAAM,WAAW,UAAU,OAAO,MACrC,oBACH;AAAA,QAGD,YACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,UAAU,WAAW;AAAA,YACrB,YAAW;AAAA,YACX,YAAW;AAAA,YACX,OAAO;AAAA,cACL,UAAU;AAAA,cACV,cAAc;AAAA,YAChB;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QAGD,aACC,6CAAC,QAAK,MAAM,WAAW,UAAU,OAAO,MACrC,qBACH;AAAA,QAGD,YACC,6CAAC,OAAI,SAAS,UACZ,uDAAC,sBAAE,MAAM,WAAW,UAAU,OAAO,MAAM,GAC7C;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["import_react_native","import_jsx_runtime","RNText","import_react_native","import_jsx_runtime","React","import_jsx_runtime"]}
|
package/native/index.mjs
CHANGED
|
@@ -270,14 +270,10 @@ var Icon = ({ children, color, size }) => {
|
|
|
270
270
|
import { useResolvedTheme } from "@xsolla/xui-core";
|
|
271
271
|
import { X } from "@xsolla/xui-icons";
|
|
272
272
|
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
273
|
-
var SELECTABLE_BORDER_RADIUS = 8;
|
|
274
273
|
var Tag = ({
|
|
275
274
|
size = "md",
|
|
276
275
|
tone = "primary",
|
|
277
276
|
type = "solid",
|
|
278
|
-
variant = "default",
|
|
279
|
-
selected = false,
|
|
280
|
-
onPress,
|
|
281
277
|
children,
|
|
282
278
|
iconLeft,
|
|
283
279
|
iconRight,
|
|
@@ -288,20 +284,6 @@ var Tag = ({
|
|
|
288
284
|
const { theme } = useResolvedTheme({ themeMode, themeProductContext });
|
|
289
285
|
const sizeStyles = theme.sizing.tag(size);
|
|
290
286
|
const resolveColors = () => {
|
|
291
|
-
if (variant === "selectable") {
|
|
292
|
-
if (selected) {
|
|
293
|
-
return {
|
|
294
|
-
bg: theme.colors.control.brand.secondary.bg,
|
|
295
|
-
text: theme.colors.content.brand.primary,
|
|
296
|
-
border: theme.colors.border.secondary
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
return {
|
|
300
|
-
bg: theme.colors.overlay.mono,
|
|
301
|
-
text: theme.colors.content.primary,
|
|
302
|
-
border: theme.colors.border.secondary
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
287
|
const isOutlined = type === "outlined";
|
|
306
288
|
switch (tone) {
|
|
307
289
|
case "primary":
|
|
@@ -355,16 +337,12 @@ var Tag = ({
|
|
|
355
337
|
}
|
|
356
338
|
};
|
|
357
339
|
const { bg, text, border } = resolveColors();
|
|
358
|
-
const isSelectable = variant === "selectable";
|
|
359
|
-
const borderRadius = isSelectable ? SELECTABLE_BORDER_RADIUS : sizeStyles.radius;
|
|
360
340
|
const isIconOnly = !children && (!!iconLeft || !!iconRight);
|
|
361
341
|
return /* @__PURE__ */ jsxs(
|
|
362
342
|
Box,
|
|
363
343
|
{
|
|
364
|
-
as: isSelectable ? "button" : void 0,
|
|
365
|
-
onPress: isSelectable ? onPress : void 0,
|
|
366
344
|
backgroundColor: bg,
|
|
367
|
-
borderRadius,
|
|
345
|
+
borderRadius: sizeStyles.radius,
|
|
368
346
|
height: sizeStyles.height,
|
|
369
347
|
width: isIconOnly ? sizeStyles.height : void 0,
|
|
370
348
|
paddingHorizontal: isIconOnly ? 0 : sizeStyles.padding,
|
|
@@ -375,8 +353,6 @@ var Tag = ({
|
|
|
375
353
|
borderWidth: sizeStyles.borderWidth,
|
|
376
354
|
borderColor: border,
|
|
377
355
|
borderStyle: "solid",
|
|
378
|
-
cursor: isSelectable ? "pointer" : "default",
|
|
379
|
-
hoverStyle: isSelectable && !selected ? { backgroundColor: theme.colors.control.brand.tertiary.bgHover } : void 0,
|
|
380
356
|
style: {
|
|
381
357
|
overflow: "hidden",
|
|
382
358
|
textOverflow: "ellipsis",
|
package/native/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx","../../../primitives-native/src/Icon.tsx","../../src/Tag.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport {\n Text as RNText,\n TextStyle,\n AccessibilityRole,\n StyleSheet,\n} from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nconst parseNumericValue = (\n value: string | number | undefined\n): number | undefined => {\n if (value === undefined) return undefined;\n if (typeof value === \"number\") return value;\n const parsed = parseFloat(value);\n return isNaN(parsed) ? undefined : parsed;\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n textAlign,\n lineHeight,\n numberOfLines,\n id,\n role,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Icon: React.FC<IconProps> = ({ children, color, size }) => {\n const style: ViewStyle = {\n width: typeof size === \"number\" ? size : undefined,\n height: typeof size === \"number\" ? size : undefined,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n // On native, we try to pass the color down to children (like Text primitives)\n // to mimic the CSS inheritance behavior of the web version.\n const childrenWithProps = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, {\n color: child.props.color || color,\n // Also pass size if child seems to be an icon that needs it\n size: child.props.size || size,\n });\n }\n return child;\n });\n\n return <View style={style}>{childrenWithProps}</View>;\n};\n","import React, { type ReactNode } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport { X } from \"@xsolla/xui-icons\";\n\nexport interface TagProps extends ThemeOverrideProps {\n /** Size of the tag */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n /** Colour tone of the tag */\n tone?:\n | \"primary\"\n | \"brand\"\n | \"brandExtra\"\n | \"success\"\n | \"warning\"\n | \"alert\"\n | \"neutral\";\n /** Visual style: solid (filled background) or outlined (border only) */\n type?: \"solid\" | \"outlined\";\n /** Interaction variant: default (display only) or selectable (interactive toggle) */\n variant?: \"default\" | \"selectable\";\n /** Whether the tag is selected. Only applies to the selectable variant. */\n selected?: boolean;\n /** Click handler for selectable tags */\n onPress?: () => void;\n /** Label text. When omitted with an icon, the tag collapses to a square. */\n children?: ReactNode;\n /** Icon displayed on the left side of the label */\n iconLeft?: ReactNode;\n /** Icon displayed on the right side of the label */\n iconRight?: ReactNode;\n /** Callback when the remove (X) icon is clicked */\n onRemove?: () => void;\n}\n\nconst SELECTABLE_BORDER_RADIUS = 8;\n\nexport const Tag: React.FC<TagProps> = ({\n size = \"md\",\n tone = \"primary\",\n type = \"solid\",\n variant = \"default\",\n selected = false,\n onPress,\n children,\n iconLeft,\n iconRight,\n onRemove,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizeStyles = theme.sizing.tag(size);\n\n const resolveColors = () => {\n if (variant === \"selectable\") {\n if (selected) {\n return {\n bg: theme.colors.control.brand.secondary.bg,\n text: theme.colors.content.brand.primary,\n border: theme.colors.border.secondary,\n };\n }\n return {\n bg: theme.colors.overlay.mono,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n }\n\n const isOutlined = type === \"outlined\";\n\n switch (tone) {\n case \"primary\":\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n case \"brand\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brand.primary,\n text: isOutlined\n ? theme.colors.content.brand.primary\n : theme.colors.content.on.brand,\n border: theme.colors.border.brand,\n };\n case \"brandExtra\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brandExtra.primary,\n text: isOutlined\n ? theme.colors.content.brandExtra.primary\n : theme.colors.content.on.brandExtra,\n border: theme.colors.border.brandExtra,\n };\n case \"success\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.success.primary,\n text: isOutlined\n ? theme.colors.content.success.primary\n : theme.colors.content.on.success,\n border: theme.colors.border.success,\n };\n case \"warning\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.warning.primary,\n text: isOutlined\n ? theme.colors.content.warning.primary\n : theme.colors.content.on.warning,\n border: theme.colors.border.warning,\n };\n case \"alert\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.alert.primary,\n text: isOutlined\n ? theme.colors.content.alert.primary\n : theme.colors.content.on.alert,\n border: theme.colors.border.alert,\n };\n case \"neutral\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.neutral.primary,\n text: isOutlined\n ? theme.colors.content.neutral.primary\n : theme.colors.content.on.neutral,\n border: theme.colors.border.neutral,\n };\n default:\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n }\n };\n\n const { bg, text, border } = resolveColors();\n const isSelectable = variant === \"selectable\";\n const borderRadius = isSelectable\n ? SELECTABLE_BORDER_RADIUS\n : sizeStyles.radius;\n const isIconOnly = !children && (!!iconLeft || !!iconRight);\n\n return (\n <Box\n as={isSelectable ? \"button\" : undefined}\n onPress={isSelectable ? onPress : undefined}\n backgroundColor={bg}\n borderRadius={borderRadius}\n height={sizeStyles.height}\n width={isIconOnly ? sizeStyles.height : undefined}\n paddingHorizontal={isIconOnly ? 0 : sizeStyles.padding}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={sizeStyles.gap}\n borderWidth={sizeStyles.borderWidth}\n borderColor={border}\n borderStyle=\"solid\"\n cursor={isSelectable ? \"pointer\" : \"default\"}\n hoverStyle={\n isSelectable && !selected\n ? { backgroundColor: theme.colors.control.brand.tertiary.bgHover }\n : undefined\n }\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {iconLeft && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconLeft}\n </Icon>\n )}\n\n {children && (\n <Text\n color={text}\n fontSize={sizeStyles.fontSize}\n fontWeight=\"500\"\n whiteSpace=\"nowrap\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }}\n >\n {children}\n </Text>\n )}\n\n {iconRight && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconRight}\n </Icon>\n )}\n\n {onRemove && (\n <Box onPress={onRemove}>\n <X size={sizeStyles.iconSize} color={text} />\n </Box>\n )}\n </Box>\n );\n};\n"],"mappings":";AACA;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;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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AAAA,MAEN,OAAO;AAAA,QACL,UAAU;AAAA,QACV,cAAc;AAAA,QACd,YAAY;AAAA,MACd;AAAA,MAEC;AAAA,oBACC,gBAAAA,KAAC,QAAK,MAAM,WAAW,UAAU,OAAO,MACrC,oBACH;AAAA,QAGD,YACC,gBAAAA;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,UAAU,WAAW;AAAA,YACrB,YAAW;AAAA,YACX,YAAW;AAAA,YACX,OAAO;AAAA,cACL,UAAU;AAAA,cACV,cAAc;AAAA,YAChB;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QAGD,aACC,gBAAAA,KAAC,QAAK,MAAM,WAAW,UAAU,OAAO,MACrC,qBACH;AAAA,QAGD,YACC,gBAAAA,KAAC,OAAI,SAAS,UACZ,0BAAAA,KAAC,KAAE,MAAM,WAAW,UAAU,OAAO,MAAM,GAC7C;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["jsx","View","jsx","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx","../../../primitives-native/src/Icon.tsx","../../src/Tag.tsx"],"sourcesContent":["import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport {\n Text as RNText,\n TextStyle,\n AccessibilityRole,\n StyleSheet,\n} from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nconst parseNumericValue = (\n value: string | number | undefined\n): number | undefined => {\n if (value === undefined) return undefined;\n if (typeof value === \"number\") return value;\n const parsed = parseFloat(value);\n return isNaN(parsed) ? undefined : parsed;\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n textAlign,\n lineHeight,\n numberOfLines,\n id,\n role,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Icon: React.FC<IconProps> = ({ children, color, size }) => {\n const style: ViewStyle = {\n width: typeof size === \"number\" ? size : undefined,\n height: typeof size === \"number\" ? size : undefined,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n // On native, we try to pass the color down to children (like Text primitives)\n // to mimic the CSS inheritance behavior of the web version.\n const childrenWithProps = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, {\n color: child.props.color || color,\n // Also pass size if child seems to be an icon that needs it\n size: child.props.size || size,\n });\n }\n return child;\n });\n\n return <View style={style}>{childrenWithProps}</View>;\n};\n","import React, { type ReactNode } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport { X } from \"@xsolla/xui-icons\";\n\nexport interface TagProps extends ThemeOverrideProps {\n /** Size of the tag */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n /** Colour tone of the tag */\n tone?:\n | \"primary\"\n | \"brand\"\n | \"brandExtra\"\n | \"success\"\n | \"warning\"\n | \"alert\"\n | \"neutral\";\n /** Visual style: solid (filled background) or outlined (border only) */\n type?: \"solid\" | \"outlined\";\n /** Label text. When omitted with an icon, the tag collapses to a square. */\n children?: ReactNode;\n /** Icon displayed on the left side of the label */\n iconLeft?: ReactNode;\n /** Icon displayed on the right side of the label */\n iconRight?: ReactNode;\n /** Callback when the remove (X) icon is clicked */\n onRemove?: () => void;\n}\n\nexport const Tag: React.FC<TagProps> = ({\n size = \"md\",\n tone = \"primary\",\n type = \"solid\",\n children,\n iconLeft,\n iconRight,\n onRemove,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizeStyles = theme.sizing.tag(size);\n\n const resolveColors = () => {\n const isOutlined = type === \"outlined\";\n\n switch (tone) {\n case \"primary\":\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n case \"brand\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brand.primary,\n text: isOutlined\n ? theme.colors.content.brand.primary\n : theme.colors.content.on.brand,\n border: theme.colors.border.brand,\n };\n case \"brandExtra\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brandExtra.primary,\n text: isOutlined\n ? theme.colors.content.brandExtra.primary\n : theme.colors.content.on.brandExtra,\n border: theme.colors.border.brandExtra,\n };\n case \"success\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.success.primary,\n text: isOutlined\n ? theme.colors.content.success.primary\n : theme.colors.content.on.success,\n border: theme.colors.border.success,\n };\n case \"warning\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.warning.primary,\n text: isOutlined\n ? theme.colors.content.warning.primary\n : theme.colors.content.on.warning,\n border: theme.colors.border.warning,\n };\n case \"alert\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.alert.primary,\n text: isOutlined\n ? theme.colors.content.alert.primary\n : theme.colors.content.on.alert,\n border: theme.colors.border.alert,\n };\n case \"neutral\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.neutral.primary,\n text: isOutlined\n ? theme.colors.content.neutral.primary\n : theme.colors.content.on.neutral,\n border: theme.colors.border.neutral,\n };\n default:\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n }\n };\n\n const { bg, text, border } = resolveColors();\n const isIconOnly = !children && (!!iconLeft || !!iconRight);\n\n return (\n <Box\n backgroundColor={bg}\n borderRadius={sizeStyles.radius}\n height={sizeStyles.height}\n width={isIconOnly ? sizeStyles.height : undefined}\n paddingHorizontal={isIconOnly ? 0 : sizeStyles.padding}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={sizeStyles.gap}\n borderWidth={sizeStyles.borderWidth}\n borderColor={border}\n borderStyle=\"solid\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {iconLeft && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconLeft}\n </Icon>\n )}\n\n {children && (\n <Text\n color={text}\n fontSize={sizeStyles.fontSize}\n fontWeight=\"500\"\n whiteSpace=\"nowrap\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }}\n >\n {children}\n </Text>\n )}\n\n {iconRight && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconRight}\n </Icon>\n )}\n\n {onRemove && (\n <Box onPress={onRemove}>\n <X size={sizeStyles.iconSize} color={text} />\n </Box>\n )}\n </Box>\n );\n};\n"],"mappings":";AACA;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;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;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",
|
|
4
4
|
"main": "./web/index.js",
|
|
5
5
|
"module": "./web/index.mjs",
|
|
6
6
|
"types": "./web/index.d.ts",
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
"build:native": "PLATFORM=native tsup"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@xsolla/xui-core": "0.
|
|
14
|
-
"@xsolla/xui-icons": "0.
|
|
15
|
-
"@xsolla/xui-primitives-core": "0.
|
|
13
|
+
"@xsolla/xui-core": "0.135.0",
|
|
14
|
+
"@xsolla/xui-icons": "0.135.0",
|
|
15
|
+
"@xsolla/xui-primitives-core": "0.135.0"
|
|
16
16
|
},
|
|
17
17
|
"peerDependencies": {
|
|
18
18
|
"react": ">=16.8.0",
|
package/web/index.d.mts
CHANGED
|
@@ -8,12 +8,6 @@ interface TagProps extends ThemeOverrideProps {
|
|
|
8
8
|
tone?: "primary" | "brand" | "brandExtra" | "success" | "warning" | "alert" | "neutral";
|
|
9
9
|
/** Visual style: solid (filled background) or outlined (border only) */
|
|
10
10
|
type?: "solid" | "outlined";
|
|
11
|
-
/** Interaction variant: default (display only) or selectable (interactive toggle) */
|
|
12
|
-
variant?: "default" | "selectable";
|
|
13
|
-
/** Whether the tag is selected. Only applies to the selectable variant. */
|
|
14
|
-
selected?: boolean;
|
|
15
|
-
/** Click handler for selectable tags */
|
|
16
|
-
onPress?: () => void;
|
|
17
11
|
/** Label text. When omitted with an icon, the tag collapses to a square. */
|
|
18
12
|
children?: ReactNode;
|
|
19
13
|
/** Icon displayed on the left side of the label */
|
package/web/index.d.ts
CHANGED
|
@@ -8,12 +8,6 @@ interface TagProps extends ThemeOverrideProps {
|
|
|
8
8
|
tone?: "primary" | "brand" | "brandExtra" | "success" | "warning" | "alert" | "neutral";
|
|
9
9
|
/** Visual style: solid (filled background) or outlined (border only) */
|
|
10
10
|
type?: "solid" | "outlined";
|
|
11
|
-
/** Interaction variant: default (display only) or selectable (interactive toggle) */
|
|
12
|
-
variant?: "default" | "selectable";
|
|
13
|
-
/** Whether the tag is selected. Only applies to the selectable variant. */
|
|
14
|
-
selected?: boolean;
|
|
15
|
-
/** Click handler for selectable tags */
|
|
16
|
-
onPress?: () => void;
|
|
17
11
|
/** Label text. When omitted with an icon, the tag collapses to a square. */
|
|
18
12
|
children?: ReactNode;
|
|
19
13
|
/** Icon displayed on the left side of the label */
|
package/web/index.js
CHANGED
|
@@ -35,117 +35,10 @@ __export(index_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
36
|
|
|
37
37
|
// ../primitives-web/src/Box.tsx
|
|
38
|
-
var import_react2 = __toESM(require("react"));
|
|
39
|
-
var import_styled_components = __toESM(require("styled-components"));
|
|
40
|
-
|
|
41
|
-
// ../primitives-web/src/filterDOMProps.ts
|
|
42
38
|
var import_react = __toESM(require("react"));
|
|
43
|
-
var
|
|
44
|
-
// BoxProps — layout & styling
|
|
45
|
-
"backgroundColor",
|
|
46
|
-
"borderColor",
|
|
47
|
-
"borderWidth",
|
|
48
|
-
"borderBottomWidth",
|
|
49
|
-
"borderBottomColor",
|
|
50
|
-
"borderTopWidth",
|
|
51
|
-
"borderTopColor",
|
|
52
|
-
"borderLeftWidth",
|
|
53
|
-
"borderLeftColor",
|
|
54
|
-
"borderRightWidth",
|
|
55
|
-
"borderRightColor",
|
|
56
|
-
"borderRadius",
|
|
57
|
-
"borderStyle",
|
|
58
|
-
"flexDirection",
|
|
59
|
-
"flexWrap",
|
|
60
|
-
"alignItems",
|
|
61
|
-
"justifyContent",
|
|
62
|
-
"alignSelf",
|
|
63
|
-
"flex",
|
|
64
|
-
"flexShrink",
|
|
65
|
-
"gap",
|
|
66
|
-
"position",
|
|
67
|
-
"top",
|
|
68
|
-
"bottom",
|
|
69
|
-
"left",
|
|
70
|
-
"right",
|
|
71
|
-
"outline",
|
|
72
|
-
"overflow",
|
|
73
|
-
"overflowX",
|
|
74
|
-
"overflowY",
|
|
75
|
-
"zIndex",
|
|
76
|
-
"cursor",
|
|
77
|
-
"padding",
|
|
78
|
-
"paddingHorizontal",
|
|
79
|
-
"paddingVertical",
|
|
80
|
-
"paddingTop",
|
|
81
|
-
"paddingBottom",
|
|
82
|
-
"paddingLeft",
|
|
83
|
-
"paddingRight",
|
|
84
|
-
"margin",
|
|
85
|
-
"marginTop",
|
|
86
|
-
"marginBottom",
|
|
87
|
-
"marginLeft",
|
|
88
|
-
"marginRight",
|
|
89
|
-
"minWidth",
|
|
90
|
-
"minHeight",
|
|
91
|
-
"maxWidth",
|
|
92
|
-
"maxHeight",
|
|
93
|
-
"hoverStyle",
|
|
94
|
-
"pressStyle",
|
|
95
|
-
"focusStyle",
|
|
96
|
-
"outlineColor",
|
|
97
|
-
"outlineWidth",
|
|
98
|
-
"outlineOffset",
|
|
99
|
-
"outlineStyle",
|
|
100
|
-
// BoxProps — RN-only
|
|
101
|
-
"onPress",
|
|
102
|
-
"onLayout",
|
|
103
|
-
"onMoveShouldSetResponder",
|
|
104
|
-
"onResponderGrant",
|
|
105
|
-
"onResponderMove",
|
|
106
|
-
"onResponderRelease",
|
|
107
|
-
"onResponderTerminate",
|
|
108
|
-
"testID",
|
|
109
|
-
// Box — custom element type
|
|
110
|
-
"elementType",
|
|
111
|
-
// TextProps
|
|
112
|
-
"fontSize",
|
|
113
|
-
"fontWeight",
|
|
114
|
-
"fontFamily",
|
|
115
|
-
"lineHeight",
|
|
116
|
-
"whiteSpace",
|
|
117
|
-
"textAlign",
|
|
118
|
-
"textDecoration",
|
|
119
|
-
"numberOfLines",
|
|
120
|
-
"letterSpacing",
|
|
121
|
-
"textTransform",
|
|
122
|
-
// SpinnerProps
|
|
123
|
-
"strokeWidth",
|
|
124
|
-
// DividerProps
|
|
125
|
-
"vertical",
|
|
126
|
-
"dashStroke"
|
|
127
|
-
]);
|
|
128
|
-
function createFilteredElement(defaultTag) {
|
|
129
|
-
const Component = import_react.default.forwardRef(
|
|
130
|
-
({ children, elementType, ...props }, ref) => {
|
|
131
|
-
const Tag2 = elementType || defaultTag;
|
|
132
|
-
const htmlProps = {};
|
|
133
|
-
for (const key of Object.keys(props)) {
|
|
134
|
-
if (!NON_HTML_PROPS.has(key)) {
|
|
135
|
-
htmlProps[key] = props[key];
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
return import_react.default.createElement(Tag2, { ref, ...htmlProps }, children);
|
|
139
|
-
}
|
|
140
|
-
);
|
|
141
|
-
Component.displayName = `Filtered(${defaultTag})`;
|
|
142
|
-
return Component;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
// ../primitives-web/src/Box.tsx
|
|
39
|
+
var import_styled_components = __toESM(require("styled-components"));
|
|
146
40
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
147
|
-
var
|
|
148
|
-
var StyledBox = (0, import_styled_components.default)(FilteredDiv)`
|
|
41
|
+
var StyledBox = import_styled_components.default.div`
|
|
149
42
|
display: flex;
|
|
150
43
|
box-sizing: border-box;
|
|
151
44
|
background-color: ${(props) => props.backgroundColor || "transparent"};
|
|
@@ -232,7 +125,7 @@ var StyledBox = (0, import_styled_components.default)(FilteredDiv)`
|
|
|
232
125
|
${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
|
|
233
126
|
}
|
|
234
127
|
`;
|
|
235
|
-
var Box =
|
|
128
|
+
var Box = import_react.default.forwardRef(
|
|
236
129
|
({
|
|
237
130
|
children,
|
|
238
131
|
onPress,
|
|
@@ -284,7 +177,7 @@ var Box = import_react2.default.forwardRef(
|
|
|
284
177
|
StyledBox,
|
|
285
178
|
{
|
|
286
179
|
ref,
|
|
287
|
-
|
|
180
|
+
as,
|
|
288
181
|
id,
|
|
289
182
|
type: as === "button" ? type || "button" : void 0,
|
|
290
183
|
disabled: as === "button" ? disabled : void 0,
|
|
@@ -315,8 +208,7 @@ Box.displayName = "Box";
|
|
|
315
208
|
// ../primitives-web/src/Text.tsx
|
|
316
209
|
var import_styled_components2 = __toESM(require("styled-components"));
|
|
317
210
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
318
|
-
var
|
|
319
|
-
var StyledText = (0, import_styled_components2.default)(FilteredSpan)`
|
|
211
|
+
var StyledText = import_styled_components2.default.span`
|
|
320
212
|
color: ${(props) => props.color || "inherit"};
|
|
321
213
|
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
322
214
|
font-weight: ${(props) => props.fontWeight || "normal"};
|
|
@@ -349,8 +241,7 @@ var Text = ({
|
|
|
349
241
|
// ../primitives-web/src/Icon.tsx
|
|
350
242
|
var import_styled_components3 = __toESM(require("styled-components"));
|
|
351
243
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
352
|
-
var
|
|
353
|
-
var StyledIcon = (0, import_styled_components3.default)(FilteredDiv2)`
|
|
244
|
+
var StyledIcon = import_styled_components3.default.div`
|
|
354
245
|
display: flex;
|
|
355
246
|
align-items: center;
|
|
356
247
|
justify-content: center;
|
|
@@ -373,14 +264,10 @@ var Icon = ({ children, ...props }) => {
|
|
|
373
264
|
var import_xui_core = require("@xsolla/xui-core");
|
|
374
265
|
var import_xui_icons = require("@xsolla/xui-icons");
|
|
375
266
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
376
|
-
var SELECTABLE_BORDER_RADIUS = 8;
|
|
377
267
|
var Tag = ({
|
|
378
268
|
size = "md",
|
|
379
269
|
tone = "primary",
|
|
380
270
|
type = "solid",
|
|
381
|
-
variant = "default",
|
|
382
|
-
selected = false,
|
|
383
|
-
onPress,
|
|
384
271
|
children,
|
|
385
272
|
iconLeft,
|
|
386
273
|
iconRight,
|
|
@@ -391,20 +278,6 @@ var Tag = ({
|
|
|
391
278
|
const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
|
|
392
279
|
const sizeStyles = theme.sizing.tag(size);
|
|
393
280
|
const resolveColors = () => {
|
|
394
|
-
if (variant === "selectable") {
|
|
395
|
-
if (selected) {
|
|
396
|
-
return {
|
|
397
|
-
bg: theme.colors.control.brand.secondary.bg,
|
|
398
|
-
text: theme.colors.content.brand.primary,
|
|
399
|
-
border: theme.colors.border.secondary
|
|
400
|
-
};
|
|
401
|
-
}
|
|
402
|
-
return {
|
|
403
|
-
bg: theme.colors.overlay.mono,
|
|
404
|
-
text: theme.colors.content.primary,
|
|
405
|
-
border: theme.colors.border.secondary
|
|
406
|
-
};
|
|
407
|
-
}
|
|
408
281
|
const isOutlined = type === "outlined";
|
|
409
282
|
switch (tone) {
|
|
410
283
|
case "primary":
|
|
@@ -458,16 +331,12 @@ var Tag = ({
|
|
|
458
331
|
}
|
|
459
332
|
};
|
|
460
333
|
const { bg, text, border } = resolveColors();
|
|
461
|
-
const isSelectable = variant === "selectable";
|
|
462
|
-
const borderRadius = isSelectable ? SELECTABLE_BORDER_RADIUS : sizeStyles.radius;
|
|
463
334
|
const isIconOnly = !children && (!!iconLeft || !!iconRight);
|
|
464
335
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
465
336
|
Box,
|
|
466
337
|
{
|
|
467
|
-
as: isSelectable ? "button" : void 0,
|
|
468
|
-
onPress: isSelectable ? onPress : void 0,
|
|
469
338
|
backgroundColor: bg,
|
|
470
|
-
borderRadius,
|
|
339
|
+
borderRadius: sizeStyles.radius,
|
|
471
340
|
height: sizeStyles.height,
|
|
472
341
|
width: isIconOnly ? sizeStyles.height : void 0,
|
|
473
342
|
paddingHorizontal: isIconOnly ? 0 : sizeStyles.padding,
|
|
@@ -478,8 +347,6 @@ var Tag = ({
|
|
|
478
347
|
borderWidth: sizeStyles.borderWidth,
|
|
479
348
|
borderColor: border,
|
|
480
349
|
borderStyle: "solid",
|
|
481
|
-
cursor: isSelectable ? "pointer" : "default",
|
|
482
|
-
hoverStyle: isSelectable && !selected ? { backgroundColor: theme.colors.control.brand.tertiary.bgHover } : void 0,
|
|
483
350
|
style: {
|
|
484
351
|
overflow: "hidden",
|
|
485
352
|
textOverflow: "ellipsis",
|
package/web/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/filterDOMProps.ts","../../../primitives-web/src/Text.tsx","../../../primitives-web/src/Icon.tsx","../../src/Tag.tsx"],"sourcesContent":["export * from \"./Tag\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<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 elementType={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\";\n\n// Props from BoxProps, TextProps, SpinnerProps, IconProps, DividerProps\n// that are NOT valid HTML attributes and must not reach the DOM.\nexport const NON_HTML_PROPS = new Set([\n // BoxProps — layout & styling\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 \"flexDirection\",\n \"flexWrap\",\n \"alignItems\",\n \"justifyContent\",\n \"alignSelf\",\n \"flex\",\n \"flexShrink\",\n \"gap\",\n \"position\",\n \"top\",\n \"bottom\",\n \"left\",\n \"right\",\n \"outline\",\n \"overflow\",\n \"overflowX\",\n \"overflowY\",\n \"zIndex\",\n \"cursor\",\n \"padding\",\n \"paddingHorizontal\",\n \"paddingVertical\",\n \"paddingTop\",\n \"paddingBottom\",\n \"paddingLeft\",\n \"paddingRight\",\n \"margin\",\n \"marginTop\",\n \"marginBottom\",\n \"marginLeft\",\n \"marginRight\",\n \"minWidth\",\n \"minHeight\",\n \"maxWidth\",\n \"maxHeight\",\n \"hoverStyle\",\n \"pressStyle\",\n \"focusStyle\",\n \"outlineColor\",\n \"outlineWidth\",\n \"outlineOffset\",\n \"outlineStyle\",\n // BoxProps — RN-only\n \"onPress\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n \"testID\",\n // Box — custom element type\n \"elementType\",\n // TextProps\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"lineHeight\",\n \"whiteSpace\",\n \"textAlign\",\n \"textDecoration\",\n \"numberOfLines\",\n \"letterSpacing\",\n \"textTransform\",\n // SpinnerProps\n \"strokeWidth\",\n // DividerProps\n \"vertical\",\n \"dashStroke\",\n]);\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, any>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = elementType || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (!NON_HTML_PROPS.has(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(Tag, { ref, ...htmlProps }, children);\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredSpan = createFilteredElement(\"span\");\n\nconst StyledText = styled(FilteredSpan)<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","import React from \"react\";\nimport styled from \"styled-components\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledIcon = styled(FilteredDiv)<IconProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n height: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n color: ${(props) => props.color || \"currentColor\"};\n\n svg {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: currentColor;\n }\n`;\n\nexport const Icon: React.FC<IconProps> = ({ children, ...props }) => {\n return <StyledIcon {...props}>{children}</StyledIcon>;\n};\n","import React, { type ReactNode } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport { X } from \"@xsolla/xui-icons\";\n\nexport interface TagProps extends ThemeOverrideProps {\n /** Size of the tag */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n /** Colour tone of the tag */\n tone?:\n | \"primary\"\n | \"brand\"\n | \"brandExtra\"\n | \"success\"\n | \"warning\"\n | \"alert\"\n | \"neutral\";\n /** Visual style: solid (filled background) or outlined (border only) */\n type?: \"solid\" | \"outlined\";\n /** Interaction variant: default (display only) or selectable (interactive toggle) */\n variant?: \"default\" | \"selectable\";\n /** Whether the tag is selected. Only applies to the selectable variant. */\n selected?: boolean;\n /** Click handler for selectable tags */\n onPress?: () => void;\n /** Label text. When omitted with an icon, the tag collapses to a square. */\n children?: ReactNode;\n /** Icon displayed on the left side of the label */\n iconLeft?: ReactNode;\n /** Icon displayed on the right side of the label */\n iconRight?: ReactNode;\n /** Callback when the remove (X) icon is clicked */\n onRemove?: () => void;\n}\n\nconst SELECTABLE_BORDER_RADIUS = 8;\n\nexport const Tag: React.FC<TagProps> = ({\n size = \"md\",\n tone = \"primary\",\n type = \"solid\",\n variant = \"default\",\n selected = false,\n onPress,\n children,\n iconLeft,\n iconRight,\n onRemove,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizeStyles = theme.sizing.tag(size);\n\n const resolveColors = () => {\n if (variant === \"selectable\") {\n if (selected) {\n return {\n bg: theme.colors.control.brand.secondary.bg,\n text: theme.colors.content.brand.primary,\n border: theme.colors.border.secondary,\n };\n }\n return {\n bg: theme.colors.overlay.mono,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n }\n\n const isOutlined = type === \"outlined\";\n\n switch (tone) {\n case \"primary\":\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n case \"brand\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brand.primary,\n text: isOutlined\n ? theme.colors.content.brand.primary\n : theme.colors.content.on.brand,\n border: theme.colors.border.brand,\n };\n case \"brandExtra\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brandExtra.primary,\n text: isOutlined\n ? theme.colors.content.brandExtra.primary\n : theme.colors.content.on.brandExtra,\n border: theme.colors.border.brandExtra,\n };\n case \"success\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.success.primary,\n text: isOutlined\n ? theme.colors.content.success.primary\n : theme.colors.content.on.success,\n border: theme.colors.border.success,\n };\n case \"warning\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.warning.primary,\n text: isOutlined\n ? theme.colors.content.warning.primary\n : theme.colors.content.on.warning,\n border: theme.colors.border.warning,\n };\n case \"alert\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.alert.primary,\n text: isOutlined\n ? theme.colors.content.alert.primary\n : theme.colors.content.on.alert,\n border: theme.colors.border.alert,\n };\n case \"neutral\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.neutral.primary,\n text: isOutlined\n ? theme.colors.content.neutral.primary\n : theme.colors.content.on.neutral,\n border: theme.colors.border.neutral,\n };\n default:\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n }\n };\n\n const { bg, text, border } = resolveColors();\n const isSelectable = variant === \"selectable\";\n const borderRadius = isSelectable\n ? SELECTABLE_BORDER_RADIUS\n : sizeStyles.radius;\n const isIconOnly = !children && (!!iconLeft || !!iconRight);\n\n return (\n <Box\n as={isSelectable ? \"button\" : undefined}\n onPress={isSelectable ? onPress : undefined}\n backgroundColor={bg}\n borderRadius={borderRadius}\n height={sizeStyles.height}\n width={isIconOnly ? sizeStyles.height : undefined}\n paddingHorizontal={isIconOnly ? 0 : sizeStyles.padding}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={sizeStyles.gap}\n borderWidth={sizeStyles.borderWidth}\n borderColor={border}\n borderStyle=\"solid\"\n cursor={isSelectable ? \"pointer\" : \"default\"}\n hoverStyle={\n isSelectable && !selected\n ? { backgroundColor: theme.colors.control.brand.tertiary.bgHover }\n : undefined\n }\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {iconLeft && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconLeft}\n </Icon>\n )}\n\n {children && (\n <Text\n color={text}\n fontSize={sizeStyles.fontSize}\n fontWeight=\"500\"\n whiteSpace=\"nowrap\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }}\n >\n {children}\n </Text>\n )}\n\n {iconRight && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconRight}\n </Icon>\n )}\n\n {onRemove && (\n <Box onPress={onRemove}>\n <X size={sizeStyles.iconSize} color={text} />\n </Box>\n )}\n </Box>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAkB;AAClB,+BAAmB;;;ACDnB,mBAAkB;AAIX,IAAM,iBAAiB,oBAAI,IAAI;AAAA;AAAA,EAEpC;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;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA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B;AAAA,MACjB;AAAA,MACA,QAAQ,WAAW;AAAA,MACnB,OAAO,aAAa,WAAW,SAAS;AAAA,MACxC,mBAAmB,aAAa,IAAI,WAAW;AAAA,MAC/C,eAAc;AAAA,MACd,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,KAAK,WAAW;AAAA,MAChB,aAAa,WAAW;AAAA,MACxB,aAAa;AAAA,MACb,aAAY;AAAA,MACZ,QAAQ,eAAe,YAAY;AAAA,MACnC,YACE,gBAAgB,CAAC,WACb,EAAE,iBAAiB,MAAM,OAAO,QAAQ,MAAM,SAAS,QAAQ,IAC/D;AAAA,MAEN,OAAO;AAAA,QACL,UAAU;AAAA,QACV,cAAc;AAAA,QACd,YAAY;AAAA,MACd;AAAA,MAEC;AAAA,oBACC,6CAAC,QAAK,MAAM,WAAW,UAAU,OAAO,MACrC,oBACH;AAAA,QAGD,YACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,UAAU,WAAW;AAAA,YACrB,YAAW;AAAA,YACX,YAAW;AAAA,YACX,OAAO;AAAA,cACL,UAAU;AAAA,cACV,cAAc;AAAA,YAChB;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QAGD,aACC,6CAAC,QAAK,MAAM,WAAW,UAAU,OAAO,MACrC,qBACH;AAAA,QAGD,YACC,6CAAC,OAAI,SAAS,UACZ,uDAAC,sBAAE,MAAM,WAAW,UAAU,OAAO,MAAM,GAC7C;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["import_react","React","Tag","styled","React","import_styled_components","import_jsx_runtime","styled","import_styled_components","import_jsx_runtime","FilteredDiv","styled","import_jsx_runtime"]}
|
|
1
|
+
{"version":3,"sources":["../../src/index.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/Text.tsx","../../../primitives-web/src/Icon.tsx","../../src/Tag.tsx"],"sourcesContent":["export * from \"./Tag\";\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","import React from \"react\";\nimport styled from \"styled-components\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledIcon = styled.div<IconProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n height: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n color: ${(props) => props.color || \"currentColor\"};\n\n svg {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: currentColor;\n }\n`;\n\nexport const Icon: React.FC<IconProps> = ({ children, ...props }) => {\n return <StyledIcon {...props}>{children}</StyledIcon>;\n};\n","import React, { type ReactNode } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport { X } from \"@xsolla/xui-icons\";\n\nexport interface TagProps extends ThemeOverrideProps {\n /** Size of the tag */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n /** Colour tone of the tag */\n tone?:\n | \"primary\"\n | \"brand\"\n | \"brandExtra\"\n | \"success\"\n | \"warning\"\n | \"alert\"\n | \"neutral\";\n /** Visual style: solid (filled background) or outlined (border only) */\n type?: \"solid\" | \"outlined\";\n /** Label text. When omitted with an icon, the tag collapses to a square. */\n children?: ReactNode;\n /** Icon displayed on the left side of the label */\n iconLeft?: ReactNode;\n /** Icon displayed on the right side of the label */\n iconRight?: ReactNode;\n /** Callback when the remove (X) icon is clicked */\n onRemove?: () => void;\n}\n\nexport const Tag: React.FC<TagProps> = ({\n size = \"md\",\n tone = \"primary\",\n type = \"solid\",\n children,\n iconLeft,\n iconRight,\n onRemove,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizeStyles = theme.sizing.tag(size);\n\n const resolveColors = () => {\n const isOutlined = type === \"outlined\";\n\n switch (tone) {\n case \"primary\":\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n case \"brand\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brand.primary,\n text: isOutlined\n ? theme.colors.content.brand.primary\n : theme.colors.content.on.brand,\n border: theme.colors.border.brand,\n };\n case \"brandExtra\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brandExtra.primary,\n text: isOutlined\n ? theme.colors.content.brandExtra.primary\n : theme.colors.content.on.brandExtra,\n border: theme.colors.border.brandExtra,\n };\n case \"success\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.success.primary,\n text: isOutlined\n ? theme.colors.content.success.primary\n : theme.colors.content.on.success,\n border: theme.colors.border.success,\n };\n case \"warning\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.warning.primary,\n text: isOutlined\n ? theme.colors.content.warning.primary\n : theme.colors.content.on.warning,\n border: theme.colors.border.warning,\n };\n case \"alert\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.alert.primary,\n text: isOutlined\n ? theme.colors.content.alert.primary\n : theme.colors.content.on.alert,\n border: theme.colors.border.alert,\n };\n case \"neutral\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.neutral.primary,\n text: isOutlined\n ? theme.colors.content.neutral.primary\n : theme.colors.content.on.neutral,\n border: theme.colors.border.neutral,\n };\n default:\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n }\n };\n\n const { bg, text, border } = resolveColors();\n const isIconOnly = !children && (!!iconLeft || !!iconRight);\n\n return (\n <Box\n backgroundColor={bg}\n borderRadius={sizeStyles.radius}\n height={sizeStyles.height}\n width={isIconOnly ? sizeStyles.height : undefined}\n paddingHorizontal={isIconOnly ? 0 : sizeStyles.padding}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={sizeStyles.gap}\n borderWidth={sizeStyles.borderWidth}\n borderColor={border}\n borderStyle=\"solid\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {iconLeft && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconLeft}\n </Icon>\n )}\n\n {children && (\n <Text\n color={text}\n fontSize={sizeStyles.fontSize}\n fontWeight=\"500\"\n whiteSpace=\"nowrap\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }}\n >\n {children}\n </Text>\n )}\n\n {iconRight && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconRight}\n </Icon>\n )}\n\n {onRemove && (\n <Box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,CAAC;AAEjD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,iBAAiB;AAAA,MACjB,cAAc,WAAW;AAAA,MACzB,QAAQ,WAAW;AAAA,MACnB,OAAO,aAAa,WAAW,SAAS;AAAA,MACxC,mBAAmB,aAAa,IAAI,WAAW;AAAA,MAC/C,eAAc;AAAA,MACd,YAAW;AAAA,MACX,gBAAe;AAAA,MACf,KAAK,WAAW;AAAA,MAChB,aAAa,WAAW;AAAA,MACxB,aAAa;AAAA,MACb,aAAY;AAAA,MACZ,OAAO;AAAA,QACL,UAAU;AAAA,QACV,cAAc;AAAA,QACd,YAAY;AAAA,MACd;AAAA,MAEC;AAAA,oBACC,6CAAC,QAAK,MAAM,WAAW,UAAU,OAAO,MACrC,oBACH;AAAA,QAGD,YACC;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,YACP,UAAU,WAAW;AAAA,YACrB,YAAW;AAAA,YACX,YAAW;AAAA,YACX,OAAO;AAAA,cACL,UAAU;AAAA,cACV,cAAc;AAAA,YAChB;AAAA,YAEC;AAAA;AAAA,QACH;AAAA,QAGD,aACC,6CAAC,QAAK,MAAM,WAAW,UAAU,OAAO,MACrC,qBACH;AAAA,QAGD,YACC,6CAAC,OAAI,SAAS,UACZ,uDAAC,sBAAE,MAAM,WAAW,UAAU,OAAO,MAAM,GAC7C;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["styled","React","import_styled_components","import_jsx_runtime","styled","import_styled_components","import_jsx_runtime","styled","import_jsx_runtime"]}
|
package/web/index.mjs
CHANGED
|
@@ -1,115 +1,8 @@
|
|
|
1
1
|
// ../primitives-web/src/Box.tsx
|
|
2
|
-
import React2 from "react";
|
|
3
|
-
import styled from "styled-components";
|
|
4
|
-
|
|
5
|
-
// ../primitives-web/src/filterDOMProps.ts
|
|
6
2
|
import React from "react";
|
|
7
|
-
|
|
8
|
-
// BoxProps — layout & styling
|
|
9
|
-
"backgroundColor",
|
|
10
|
-
"borderColor",
|
|
11
|
-
"borderWidth",
|
|
12
|
-
"borderBottomWidth",
|
|
13
|
-
"borderBottomColor",
|
|
14
|
-
"borderTopWidth",
|
|
15
|
-
"borderTopColor",
|
|
16
|
-
"borderLeftWidth",
|
|
17
|
-
"borderLeftColor",
|
|
18
|
-
"borderRightWidth",
|
|
19
|
-
"borderRightColor",
|
|
20
|
-
"borderRadius",
|
|
21
|
-
"borderStyle",
|
|
22
|
-
"flexDirection",
|
|
23
|
-
"flexWrap",
|
|
24
|
-
"alignItems",
|
|
25
|
-
"justifyContent",
|
|
26
|
-
"alignSelf",
|
|
27
|
-
"flex",
|
|
28
|
-
"flexShrink",
|
|
29
|
-
"gap",
|
|
30
|
-
"position",
|
|
31
|
-
"top",
|
|
32
|
-
"bottom",
|
|
33
|
-
"left",
|
|
34
|
-
"right",
|
|
35
|
-
"outline",
|
|
36
|
-
"overflow",
|
|
37
|
-
"overflowX",
|
|
38
|
-
"overflowY",
|
|
39
|
-
"zIndex",
|
|
40
|
-
"cursor",
|
|
41
|
-
"padding",
|
|
42
|
-
"paddingHorizontal",
|
|
43
|
-
"paddingVertical",
|
|
44
|
-
"paddingTop",
|
|
45
|
-
"paddingBottom",
|
|
46
|
-
"paddingLeft",
|
|
47
|
-
"paddingRight",
|
|
48
|
-
"margin",
|
|
49
|
-
"marginTop",
|
|
50
|
-
"marginBottom",
|
|
51
|
-
"marginLeft",
|
|
52
|
-
"marginRight",
|
|
53
|
-
"minWidth",
|
|
54
|
-
"minHeight",
|
|
55
|
-
"maxWidth",
|
|
56
|
-
"maxHeight",
|
|
57
|
-
"hoverStyle",
|
|
58
|
-
"pressStyle",
|
|
59
|
-
"focusStyle",
|
|
60
|
-
"outlineColor",
|
|
61
|
-
"outlineWidth",
|
|
62
|
-
"outlineOffset",
|
|
63
|
-
"outlineStyle",
|
|
64
|
-
// BoxProps — RN-only
|
|
65
|
-
"onPress",
|
|
66
|
-
"onLayout",
|
|
67
|
-
"onMoveShouldSetResponder",
|
|
68
|
-
"onResponderGrant",
|
|
69
|
-
"onResponderMove",
|
|
70
|
-
"onResponderRelease",
|
|
71
|
-
"onResponderTerminate",
|
|
72
|
-
"testID",
|
|
73
|
-
// Box — custom element type
|
|
74
|
-
"elementType",
|
|
75
|
-
// TextProps
|
|
76
|
-
"fontSize",
|
|
77
|
-
"fontWeight",
|
|
78
|
-
"fontFamily",
|
|
79
|
-
"lineHeight",
|
|
80
|
-
"whiteSpace",
|
|
81
|
-
"textAlign",
|
|
82
|
-
"textDecoration",
|
|
83
|
-
"numberOfLines",
|
|
84
|
-
"letterSpacing",
|
|
85
|
-
"textTransform",
|
|
86
|
-
// SpinnerProps
|
|
87
|
-
"strokeWidth",
|
|
88
|
-
// DividerProps
|
|
89
|
-
"vertical",
|
|
90
|
-
"dashStroke"
|
|
91
|
-
]);
|
|
92
|
-
function createFilteredElement(defaultTag) {
|
|
93
|
-
const Component = React.forwardRef(
|
|
94
|
-
({ children, elementType, ...props }, ref) => {
|
|
95
|
-
const Tag2 = elementType || defaultTag;
|
|
96
|
-
const htmlProps = {};
|
|
97
|
-
for (const key of Object.keys(props)) {
|
|
98
|
-
if (!NON_HTML_PROPS.has(key)) {
|
|
99
|
-
htmlProps[key] = props[key];
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
return React.createElement(Tag2, { ref, ...htmlProps }, children);
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
Component.displayName = `Filtered(${defaultTag})`;
|
|
106
|
-
return Component;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// ../primitives-web/src/Box.tsx
|
|
3
|
+
import styled from "styled-components";
|
|
110
4
|
import { jsx } from "react/jsx-runtime";
|
|
111
|
-
var
|
|
112
|
-
var StyledBox = styled(FilteredDiv)`
|
|
5
|
+
var StyledBox = styled.div`
|
|
113
6
|
display: flex;
|
|
114
7
|
box-sizing: border-box;
|
|
115
8
|
background-color: ${(props) => props.backgroundColor || "transparent"};
|
|
@@ -196,7 +89,7 @@ var StyledBox = styled(FilteredDiv)`
|
|
|
196
89
|
${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
|
|
197
90
|
}
|
|
198
91
|
`;
|
|
199
|
-
var Box =
|
|
92
|
+
var Box = React.forwardRef(
|
|
200
93
|
({
|
|
201
94
|
children,
|
|
202
95
|
onPress,
|
|
@@ -248,7 +141,7 @@ var Box = React2.forwardRef(
|
|
|
248
141
|
StyledBox,
|
|
249
142
|
{
|
|
250
143
|
ref,
|
|
251
|
-
|
|
144
|
+
as,
|
|
252
145
|
id,
|
|
253
146
|
type: as === "button" ? type || "button" : void 0,
|
|
254
147
|
disabled: as === "button" ? disabled : void 0,
|
|
@@ -279,8 +172,7 @@ Box.displayName = "Box";
|
|
|
279
172
|
// ../primitives-web/src/Text.tsx
|
|
280
173
|
import styled2 from "styled-components";
|
|
281
174
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
282
|
-
var
|
|
283
|
-
var StyledText = styled2(FilteredSpan)`
|
|
175
|
+
var StyledText = styled2.span`
|
|
284
176
|
color: ${(props) => props.color || "inherit"};
|
|
285
177
|
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
286
178
|
font-weight: ${(props) => props.fontWeight || "normal"};
|
|
@@ -313,8 +205,7 @@ var Text = ({
|
|
|
313
205
|
// ../primitives-web/src/Icon.tsx
|
|
314
206
|
import styled3 from "styled-components";
|
|
315
207
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
316
|
-
var
|
|
317
|
-
var StyledIcon = styled3(FilteredDiv2)`
|
|
208
|
+
var StyledIcon = styled3.div`
|
|
318
209
|
display: flex;
|
|
319
210
|
align-items: center;
|
|
320
211
|
justify-content: center;
|
|
@@ -337,14 +228,10 @@ var Icon = ({ children, ...props }) => {
|
|
|
337
228
|
import { useResolvedTheme } from "@xsolla/xui-core";
|
|
338
229
|
import { X } from "@xsolla/xui-icons";
|
|
339
230
|
import { jsx as jsx4, jsxs } from "react/jsx-runtime";
|
|
340
|
-
var SELECTABLE_BORDER_RADIUS = 8;
|
|
341
231
|
var Tag = ({
|
|
342
232
|
size = "md",
|
|
343
233
|
tone = "primary",
|
|
344
234
|
type = "solid",
|
|
345
|
-
variant = "default",
|
|
346
|
-
selected = false,
|
|
347
|
-
onPress,
|
|
348
235
|
children,
|
|
349
236
|
iconLeft,
|
|
350
237
|
iconRight,
|
|
@@ -355,20 +242,6 @@ var Tag = ({
|
|
|
355
242
|
const { theme } = useResolvedTheme({ themeMode, themeProductContext });
|
|
356
243
|
const sizeStyles = theme.sizing.tag(size);
|
|
357
244
|
const resolveColors = () => {
|
|
358
|
-
if (variant === "selectable") {
|
|
359
|
-
if (selected) {
|
|
360
|
-
return {
|
|
361
|
-
bg: theme.colors.control.brand.secondary.bg,
|
|
362
|
-
text: theme.colors.content.brand.primary,
|
|
363
|
-
border: theme.colors.border.secondary
|
|
364
|
-
};
|
|
365
|
-
}
|
|
366
|
-
return {
|
|
367
|
-
bg: theme.colors.overlay.mono,
|
|
368
|
-
text: theme.colors.content.primary,
|
|
369
|
-
border: theme.colors.border.secondary
|
|
370
|
-
};
|
|
371
|
-
}
|
|
372
245
|
const isOutlined = type === "outlined";
|
|
373
246
|
switch (tone) {
|
|
374
247
|
case "primary":
|
|
@@ -422,16 +295,12 @@ var Tag = ({
|
|
|
422
295
|
}
|
|
423
296
|
};
|
|
424
297
|
const { bg, text, border } = resolveColors();
|
|
425
|
-
const isSelectable = variant === "selectable";
|
|
426
|
-
const borderRadius = isSelectable ? SELECTABLE_BORDER_RADIUS : sizeStyles.radius;
|
|
427
298
|
const isIconOnly = !children && (!!iconLeft || !!iconRight);
|
|
428
299
|
return /* @__PURE__ */ jsxs(
|
|
429
300
|
Box,
|
|
430
301
|
{
|
|
431
|
-
as: isSelectable ? "button" : void 0,
|
|
432
|
-
onPress: isSelectable ? onPress : void 0,
|
|
433
302
|
backgroundColor: bg,
|
|
434
|
-
borderRadius,
|
|
303
|
+
borderRadius: sizeStyles.radius,
|
|
435
304
|
height: sizeStyles.height,
|
|
436
305
|
width: isIconOnly ? sizeStyles.height : void 0,
|
|
437
306
|
paddingHorizontal: isIconOnly ? 0 : sizeStyles.padding,
|
|
@@ -442,8 +311,6 @@ var Tag = ({
|
|
|
442
311
|
borderWidth: sizeStyles.borderWidth,
|
|
443
312
|
borderColor: border,
|
|
444
313
|
borderStyle: "solid",
|
|
445
|
-
cursor: isSelectable ? "pointer" : "default",
|
|
446
|
-
hoverStyle: isSelectable && !selected ? { backgroundColor: theme.colors.control.brand.tertiary.bgHover } : void 0,
|
|
447
314
|
style: {
|
|
448
315
|
overflow: "hidden",
|
|
449
316
|
textOverflow: "ellipsis",
|
package/web/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../primitives-web/src/Box.tsx","../../../primitives-web/src/filterDOMProps.ts","../../../primitives-web/src/Text.tsx","../../../primitives-web/src/Icon.tsx","../../src/Tag.tsx"],"sourcesContent":["import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<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 elementType={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\";\n\n// Props from BoxProps, TextProps, SpinnerProps, IconProps, DividerProps\n// that are NOT valid HTML attributes and must not reach the DOM.\nexport const NON_HTML_PROPS = new Set([\n // BoxProps — layout & styling\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 \"flexDirection\",\n \"flexWrap\",\n \"alignItems\",\n \"justifyContent\",\n \"alignSelf\",\n \"flex\",\n \"flexShrink\",\n \"gap\",\n \"position\",\n \"top\",\n \"bottom\",\n \"left\",\n \"right\",\n \"outline\",\n \"overflow\",\n \"overflowX\",\n \"overflowY\",\n \"zIndex\",\n \"cursor\",\n \"padding\",\n \"paddingHorizontal\",\n \"paddingVertical\",\n \"paddingTop\",\n \"paddingBottom\",\n \"paddingLeft\",\n \"paddingRight\",\n \"margin\",\n \"marginTop\",\n \"marginBottom\",\n \"marginLeft\",\n \"marginRight\",\n \"minWidth\",\n \"minHeight\",\n \"maxWidth\",\n \"maxHeight\",\n \"hoverStyle\",\n \"pressStyle\",\n \"focusStyle\",\n \"outlineColor\",\n \"outlineWidth\",\n \"outlineOffset\",\n \"outlineStyle\",\n // BoxProps — RN-only\n \"onPress\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n \"testID\",\n // Box — custom element type\n \"elementType\",\n // TextProps\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"lineHeight\",\n \"whiteSpace\",\n \"textAlign\",\n \"textDecoration\",\n \"numberOfLines\",\n \"letterSpacing\",\n \"textTransform\",\n // SpinnerProps\n \"strokeWidth\",\n // DividerProps\n \"vertical\",\n \"dashStroke\",\n]);\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, any>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = elementType || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (!NON_HTML_PROPS.has(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(Tag, { ref, ...htmlProps }, children);\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredSpan = createFilteredElement(\"span\");\n\nconst StyledText = styled(FilteredSpan)<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","import React from \"react\";\nimport styled from \"styled-components\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledIcon = styled(FilteredDiv)<IconProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n height: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n color: ${(props) => props.color || \"currentColor\"};\n\n svg {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: currentColor;\n }\n`;\n\nexport const Icon: React.FC<IconProps> = ({ children, ...props }) => {\n return <StyledIcon {...props}>{children}</StyledIcon>;\n};\n","import React, { type ReactNode } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport { X } from \"@xsolla/xui-icons\";\n\nexport interface TagProps extends ThemeOverrideProps {\n /** Size of the tag */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n /** Colour tone of the tag */\n tone?:\n | \"primary\"\n | \"brand\"\n | \"brandExtra\"\n | \"success\"\n | \"warning\"\n | \"alert\"\n | \"neutral\";\n /** Visual style: solid (filled background) or outlined (border only) */\n type?: \"solid\" | \"outlined\";\n /** Interaction variant: default (display only) or selectable (interactive toggle) */\n variant?: \"default\" | \"selectable\";\n /** Whether the tag is selected. Only applies to the selectable variant. */\n selected?: boolean;\n /** Click handler for selectable tags */\n onPress?: () => void;\n /** Label text. When omitted with an icon, the tag collapses to a square. */\n children?: ReactNode;\n /** Icon displayed on the left side of the label */\n iconLeft?: ReactNode;\n /** Icon displayed on the right side of the label */\n iconRight?: ReactNode;\n /** Callback when the remove (X) icon is clicked */\n onRemove?: () => void;\n}\n\nconst SELECTABLE_BORDER_RADIUS = 8;\n\nexport const Tag: React.FC<TagProps> = ({\n size = \"md\",\n tone = \"primary\",\n type = \"solid\",\n variant = \"default\",\n selected = false,\n onPress,\n children,\n iconLeft,\n iconRight,\n onRemove,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizeStyles = theme.sizing.tag(size);\n\n const resolveColors = () => {\n if (variant === \"selectable\") {\n if (selected) {\n return {\n bg: theme.colors.control.brand.secondary.bg,\n text: theme.colors.content.brand.primary,\n border: theme.colors.border.secondary,\n };\n }\n return {\n bg: theme.colors.overlay.mono,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n }\n\n const isOutlined = type === \"outlined\";\n\n switch (tone) {\n case \"primary\":\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n case \"brand\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brand.primary,\n text: isOutlined\n ? theme.colors.content.brand.primary\n : theme.colors.content.on.brand,\n border: theme.colors.border.brand,\n };\n case \"brandExtra\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brandExtra.primary,\n text: isOutlined\n ? theme.colors.content.brandExtra.primary\n : theme.colors.content.on.brandExtra,\n border: theme.colors.border.brandExtra,\n };\n case \"success\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.success.primary,\n text: isOutlined\n ? theme.colors.content.success.primary\n : theme.colors.content.on.success,\n border: theme.colors.border.success,\n };\n case \"warning\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.warning.primary,\n text: isOutlined\n ? theme.colors.content.warning.primary\n : theme.colors.content.on.warning,\n border: theme.colors.border.warning,\n };\n case \"alert\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.alert.primary,\n text: isOutlined\n ? theme.colors.content.alert.primary\n : theme.colors.content.on.alert,\n border: theme.colors.border.alert,\n };\n case \"neutral\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.neutral.primary,\n text: isOutlined\n ? theme.colors.content.neutral.primary\n : theme.colors.content.on.neutral,\n border: theme.colors.border.neutral,\n };\n default:\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n }\n };\n\n const { bg, text, border } = resolveColors();\n const isSelectable = variant === \"selectable\";\n const borderRadius = isSelectable\n ? SELECTABLE_BORDER_RADIUS\n : sizeStyles.radius;\n const isIconOnly = !children && (!!iconLeft || !!iconRight);\n\n return (\n <Box\n as={isSelectable ? \"button\" : undefined}\n onPress={isSelectable ? onPress : undefined}\n backgroundColor={bg}\n borderRadius={borderRadius}\n height={sizeStyles.height}\n width={isIconOnly ? sizeStyles.height : undefined}\n paddingHorizontal={isIconOnly ? 0 : sizeStyles.padding}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={sizeStyles.gap}\n borderWidth={sizeStyles.borderWidth}\n borderColor={border}\n borderStyle=\"solid\"\n cursor={isSelectable ? \"pointer\" : \"default\"}\n hoverStyle={\n isSelectable && !selected\n ? { backgroundColor: theme.colors.control.brand.tertiary.bgHover }\n : undefined\n }\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {iconLeft && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconLeft}\n </Icon>\n )}\n\n {children && (\n <Text\n color={text}\n fontSize={sizeStyles.fontSize}\n fontWeight=\"500\"\n whiteSpace=\"nowrap\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }}\n >\n {children}\n </Text>\n )}\n\n {iconRight && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconRight}\n </Icon>\n )}\n\n {onRemove && (\n <Box onPress={onRemove}>\n <X size={sizeStyles.iconSize} color={text} />\n </Box>\n )}\n </Box>\n );\n};\n"],"mappings":";AAAA,OAAOA,YAAW;AAClB,OAAO,YAAY;;;ACDnB,OAAO,WAAW;AAIX,IAAM,iBAAiB,oBAAI,IAAI;AAAA;AAAA,EAEpC;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;A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M,WAAW,UAAU,OAAO,MAAM,GAC7C;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["React","Tag","React","styled","jsx","styled","styled","jsx","FilteredDiv","styled","jsx"]}
|
|
1
|
+
{"version":3,"sources":["../../../primitives-web/src/Box.tsx","../../../primitives-web/src/Text.tsx","../../../primitives-web/src/Icon.tsx","../../src/Tag.tsx"],"sourcesContent":["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","import React from \"react\";\nimport styled from \"styled-components\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledIcon = styled.div<IconProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n height: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n color: ${(props) => props.color || \"currentColor\"};\n\n svg {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: currentColor;\n }\n`;\n\nexport const Icon: React.FC<IconProps> = ({ children, ...props }) => {\n return <StyledIcon {...props}>{children}</StyledIcon>;\n};\n","import React, { type ReactNode } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport { X } from \"@xsolla/xui-icons\";\n\nexport interface TagProps extends ThemeOverrideProps {\n /** Size of the tag */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n /** Colour tone of the tag */\n tone?:\n | \"primary\"\n | \"brand\"\n | \"brandExtra\"\n | \"success\"\n | \"warning\"\n | \"alert\"\n | \"neutral\";\n /** Visual style: solid (filled background) or outlined (border only) */\n type?: \"solid\" | \"outlined\";\n /** Label text. When omitted with an icon, the tag collapses to a square. */\n children?: ReactNode;\n /** Icon displayed on the left side of the label */\n iconLeft?: ReactNode;\n /** Icon displayed on the right side of the label */\n iconRight?: ReactNode;\n /** Callback when the remove (X) icon is clicked */\n onRemove?: () => void;\n}\n\nexport const Tag: React.FC<TagProps> = ({\n size = \"md\",\n tone = \"primary\",\n type = \"solid\",\n children,\n iconLeft,\n iconRight,\n onRemove,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const sizeStyles = theme.sizing.tag(size);\n\n const resolveColors = () => {\n const isOutlined = type === \"outlined\";\n\n switch (tone) {\n case \"primary\":\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n case \"brand\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brand.primary,\n text: isOutlined\n ? theme.colors.content.brand.primary\n : theme.colors.content.on.brand,\n border: theme.colors.border.brand,\n };\n case \"brandExtra\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.brandExtra.primary,\n text: isOutlined\n ? theme.colors.content.brandExtra.primary\n : theme.colors.content.on.brandExtra,\n border: theme.colors.border.brandExtra,\n };\n case \"success\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.success.primary,\n text: isOutlined\n ? theme.colors.content.success.primary\n : theme.colors.content.on.success,\n border: theme.colors.border.success,\n };\n case \"warning\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.warning.primary,\n text: isOutlined\n ? theme.colors.content.warning.primary\n : theme.colors.content.on.warning,\n border: theme.colors.border.warning,\n };\n case \"alert\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.alert.primary,\n text: isOutlined\n ? theme.colors.content.alert.primary\n : theme.colors.content.on.alert,\n border: theme.colors.border.alert,\n };\n case \"neutral\":\n return {\n bg: isOutlined\n ? \"transparent\"\n : theme.colors.background.neutral.primary,\n text: isOutlined\n ? theme.colors.content.neutral.primary\n : theme.colors.content.on.neutral,\n border: theme.colors.border.neutral,\n };\n default:\n return {\n bg: isOutlined ? \"transparent\" : theme.colors.background.primary,\n text: theme.colors.content.primary,\n border: theme.colors.border.secondary,\n };\n }\n };\n\n const { bg, text, border } = resolveColors();\n const isIconOnly = !children && (!!iconLeft || !!iconRight);\n\n return (\n <Box\n backgroundColor={bg}\n borderRadius={sizeStyles.radius}\n height={sizeStyles.height}\n width={isIconOnly ? sizeStyles.height : undefined}\n paddingHorizontal={isIconOnly ? 0 : sizeStyles.padding}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"center\"\n gap={sizeStyles.gap}\n borderWidth={sizeStyles.borderWidth}\n borderColor={border}\n borderStyle=\"solid\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n whiteSpace: \"nowrap\",\n }}\n >\n {iconLeft && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconLeft}\n </Icon>\n )}\n\n {children && (\n <Text\n color={text}\n fontSize={sizeStyles.fontSize}\n fontWeight=\"500\"\n whiteSpace=\"nowrap\"\n style={{\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n }}\n >\n {children}\n </Text>\n )}\n\n {iconRight && (\n <Icon size={sizeStyles.iconSize} color={text}>\n {iconRight}\n </Icon>\n )}\n\n {onRemove && (\n <Box onPress={onRemove}>\n <X size={sizeStyles.iconSize} color={text} />\n </Box>\n )}\n </Box>\n );\n};\n"],"mappings":";AAAA,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,qBAAqB,MAAM,eAAe,aAAa;AAAA;AAAA,GAErF;AAAA,IACC,CAAC,UACD,MAAM,mBAAmB,UACzB;AAAA,wBACoB,OAAO,MAAM,mBAAmB,WAAW,GAAG,MAAM,cAAc,OAAO,MAAM,cAAc;AAAA,wBAC7F,MAAM,kBAAkB,MAAM,eAAe,aAAa;AAAA;AAAA,GAE/E;AAAA,IACC,CAAC,UACD,MAAM,oBAAoB,UAC1B;AAAA,yBACqB,OAAO,MAAM,oBAAoB,WAAW,GAAG,MAAM,eAAe,OAAO,MAAM,eAAe;AAAA,yBAChG,MAAM,mBAAmB,MAAM,eAAe,aAAa;AAAA;AAAA,GAEjF;AAAA,IACC,CAAC,UAC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