@xsolla/xui-input-color 0.184.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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.tsx","../../src/InputColor.tsx","../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/Text.tsx","../../../../foundation/primitives-native/src/Input.tsx","../../../../foundation/primitives-native/src/index.tsx"],"sourcesContent":["export * from \"./InputColor\";\n","import React, { forwardRef, useEffect, useMemo, useRef, useState } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, InputPrimitive, isWeb } from \"@xsolla/xui-primitives\";\nimport {\n useResolvedTheme,\n useId,\n type ThemeOverrideProps,\n} from \"@xsolla/xui-core\";\n\n/**\n * Display variant of the InputColor control. Maps 1:1 to the Figma `Type` prop:\n * - `color` → \"Color only\" (swatch preview only, no editable field)\n * - `color-hex` → \"Color + HEX\" (swatch + editable hex field)\n * - `color-rgb` → \"Color + HSL/HSB/RGB\" (swatch + editable R/G/B channels)\n * - `hex` → \"HEX\" (editable hex field only)\n * - `rgb` → \"HSL/HSB/RGB\" (editable R/G/B channels only)\n */\nexport type InputColorType =\n | \"color\"\n | \"color-hex\"\n | \"color-rgb\"\n | \"hex\"\n | \"rgb\";\n\nexport type InputColorSize = \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n\nexport interface InputColorProps extends ThemeOverrideProps {\n /**\n * The current color value as a hex string (controlled mode), e.g. `#22A8C3`.\n * When `transparency` is enabled an 8-digit hex (`#RRGGBBAA`) is accepted.\n */\n value?: string;\n /**\n * The initial color value for uncontrolled usage. Defaults to `#000000`.\n */\n defaultValue?: string;\n /**\n * Event handler fired when the color changes. Always receives a hex string.\n */\n onChange?: (value: string) => void;\n /**\n * Fired when the swatch is activated. The swatch is only interactive when\n * `type=\"color\"` — its role is to open the parent ColorPicker panel. For all\n * other types the swatch is a decorative preview and this is never called.\n */\n onSwatchClick?: () => void;\n /**\n * Display variant of the control. Defaults to `color-hex`.\n */\n type?: InputColorType;\n /**\n * Enables the alpha channel. Adds an alpha field and splits the swatch to\n * preview the transparency against a checkerboard.\n */\n transparency?: boolean;\n /**\n * Property for changing the size of the control.\n */\n size?: InputColorSize;\n /**\n * Property for displaying a label above the control.\n */\n label?: string;\n /**\n * Unique identifier for the control. Used for accessibility linking.\n */\n id?: string;\n /**\n * Accessible label for screen readers when no visible label is present.\n */\n \"aria-label\"?: string;\n /**\n * Test identifier for the component.\n */\n testID?: string;\n}\n\ntype Rgba = { r: number; g: number; b: number; a: number };\n\nconst clamp = (n: number, min: number, max: number) =>\n Math.min(Math.max(n, min), max);\n\nconst HEX_CHARS = /[^0-9a-fA-F]/g;\n\n/** Parse a `#RGB`/`#RGBA`/`#RRGGBB`/`#RRGGBBAA` hex string into RGBA. */\nfunction hexToRgba(hex: string): Rgba {\n let h = (hex || \"\").replace(/^#/, \"\");\n if (h.length === 3 || h.length === 4) {\n h = h\n .split(\"\")\n .map((c) => c + c)\n .join(\"\");\n }\n const r = parseInt(h.slice(0, 2), 16);\n const g = parseInt(h.slice(2, 4), 16);\n const b = parseInt(h.slice(4, 6), 16);\n const a = h.length >= 8 ? parseInt(h.slice(6, 8), 16) / 255 : 1;\n return {\n r: Number.isNaN(r) ? 0 : r,\n g: Number.isNaN(g) ? 0 : g,\n b: Number.isNaN(b) ? 0 : b,\n a: Number.isNaN(a) ? 1 : parseFloat(a.toFixed(2)),\n };\n}\n\n/** Serialize RGBA back to an uppercase hex string. */\nfunction rgbaToHex({ r, g, b, a }: Rgba, includeAlpha: boolean): string {\n const toHex = (n: number) =>\n Math.round(clamp(n, 0, 255))\n .toString(16)\n .padStart(2, \"0\");\n const alpha = includeAlpha ? toHex(clamp(a, 0, 1) * 255) : \"\";\n return `#${toHex(r)}${toHex(g)}${toHex(b)}${alpha}`.toUpperCase();\n}\n\nconst SWATCH_SIZE: Record<InputColorSize, number> = {\n xl: 36,\n lg: 32,\n md: 26,\n sm: 20,\n xs: 14,\n};\n\n// Width of the trailing alpha (\"%\") segment per size, derived from the Figma\n// \"Color only / Transparency=True\" widths (total − swatch square − 2px gap).\nconst ALPHA_WIDTH: Record<InputColorSize, number> = {\n xl: 96,\n lg: 86,\n md: 77,\n sm: 67,\n xs: 58,\n};\n\n// Gap between the swatch and the value content inside a field, from the Figma\n// `input/<size>/frame/gap` tokens.\nconst FRAME_GAP: Record<InputColorSize, number> = {\n xl: 10,\n lg: 10,\n md: 8,\n sm: 6,\n xs: 4,\n};\n\n// CSS checkerboard, only visible behind partially-transparent colors.\nconst CHECKERBOARD =\n \"conic-gradient(rgba(0,0,0,0.45) 25%, transparent 0 50%, rgba(0,0,0,0.45) 0 75%, transparent 0)\";\n\ntype Corner = \"left\" | \"right\" | \"middle\" | \"all\";\n\nfunction cornerRadii(corner: Corner, radius: number) {\n const map = {\n all: [radius, radius, radius, radius],\n left: [radius, 0, 0, radius],\n right: [0, radius, radius, 0],\n middle: [0, 0, 0, 0],\n } as const;\n const [tl, tr, br, bl] = map[corner];\n return {\n borderTopLeftRadius: tl,\n borderTopRightRadius: tr,\n borderBottomRightRadius: br,\n borderBottomLeftRadius: bl,\n };\n}\n\n/* -------------------------------------------------------------------------- */\n/* Color swatch */\n/* -------------------------------------------------------------------------- */\n\nfunction ColorSwatch({\n size,\n rgba,\n transparency,\n borderColor,\n}: {\n size: number;\n rgba: Rgba;\n transparency: boolean;\n borderColor: string;\n}) {\n const solid = `rgb(${rgba.r}, ${rgba.g}, ${rgba.b})`;\n const withAlpha = `rgba(${rgba.r}, ${rgba.g}, ${rgba.b}, ${rgba.a})`;\n return (\n <Box\n width={size}\n height={size}\n position=\"relative\"\n borderColor={borderColor}\n borderWidth={1}\n style={{ borderRadius: 4, overflow: \"hidden\" }}\n data-testid=\"input-color__swatch-preview\"\n >\n {transparency && (\n <Box\n aria-hidden\n style={{\n position: \"absolute\",\n inset: 0,\n backgroundImage: CHECKERBOARD,\n backgroundSize: \"8px 8px\",\n opacity: 0.2,\n }}\n />\n )}\n {transparency ? (\n <>\n <Box\n style={{\n position: \"absolute\",\n top: 0,\n bottom: 0,\n left: 0,\n right: \"50%\",\n backgroundColor: solid,\n }}\n />\n <Box\n style={{\n position: \"absolute\",\n top: 0,\n bottom: 0,\n left: \"50%\",\n right: 0,\n backgroundColor: withAlpha,\n }}\n />\n </>\n ) : (\n <Box\n style={{ position: \"absolute\", inset: 0, backgroundColor: solid }}\n />\n )}\n </Box>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* Editable text field */\n/* -------------------------------------------------------------------------- */\n\ntype TextFieldProps = {\n value: string;\n onCommit: (text: string) => void;\n sanitize: (text: string) => string;\n maxLength?: number;\n textAlign?: \"left\" | \"center\";\n color: string;\n fontSize: number;\n fontFamily: string;\n ariaLabel: string;\n inputMode?: \"numeric\" | \"text\";\n /** When set, Arrow Up/Down step the numeric value within [min, max]. */\n step?: { min: number; max: number };\n testID?: string;\n onFocus: () => void;\n onBlur: () => void;\n};\n\n/**\n * A controlled-but-buffered text field. Keeps the raw keystrokes locally so the\n * user can type freely, but resyncs to the canonical `value` on prop change and\n * on blur.\n */\nfunction TextField({\n value,\n onCommit,\n sanitize,\n maxLength,\n textAlign = \"left\",\n color,\n fontSize,\n fontFamily,\n ariaLabel,\n inputMode = \"text\",\n step,\n testID,\n onFocus,\n onBlur,\n}: TextFieldProps) {\n const [text, setText] = useState(value);\n // While the field is focused we keep the user's raw keystrokes and never\n // overwrite them with the canonical (normalized/expanded/clamped) value —\n // that resync is what caused the field to \"auto-fill\" mid-typing. We only\n // resync from `value` for external changes (unfocused) and on blur.\n const isFocusedRef = useRef(false);\n\n useEffect(() => {\n if (!isFocusedRef.current) setText(value);\n }, [value]);\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const next = sanitize(e.target.value);\n setText(next);\n onCommit(next);\n };\n\n const handleFocus = () => {\n isFocusedRef.current = true;\n onFocus();\n };\n\n const handleBlur = () => {\n isFocusedRef.current = false;\n setText(value);\n onBlur();\n };\n\n // Enter commits/normalizes by blurring (the value already propagates live).\n // Arrow Up/Down step numeric fields by ±1 within their range.\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === \"Enter\") {\n e.currentTarget.blur();\n return;\n }\n if (step && (e.key === \"ArrowUp\" || e.key === \"ArrowDown\")) {\n e.preventDefault();\n const current = Number.parseInt(text, 10);\n const base = Number.isNaN(current) ? 0 : current;\n const next = String(\n clamp(base + (e.key === \"ArrowUp\" ? 1 : -1), step.min, step.max)\n );\n setText(next);\n onCommit(next);\n }\n };\n\n return (\n <Box flex={1} height=\"100%\" justifyContent=\"center\">\n <InputPrimitive\n value={text}\n onChange={handleChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n type=\"text\"\n inputMode={inputMode}\n maxLength={maxLength}\n color={color}\n fontSize={fontSize}\n fontFamily={fontFamily}\n aria-label={ariaLabel}\n data-testid={testID}\n style={textAlign === \"center\" ? { textAlign: \"center\" } : undefined}\n />\n </Box>\n );\n}\n\n/* -------------------------------------------------------------------------- */\n/* InputColor */\n/* -------------------------------------------------------------------------- */\n\nconst CHANNEL_LABEL: Record<\"red\" | \"green\" | \"blue\" | \"alpha\", string> = {\n red: \"Red channel\",\n green: \"Green channel\",\n blue: \"Blue channel\",\n alpha: \"Opacity percentage\",\n};\n\nexport const InputColor = forwardRef<HTMLDivElement, InputColorProps>(\n (\n {\n value,\n defaultValue,\n onChange,\n onSwatchClick,\n type = \"color-hex\",\n transparency = false,\n size = \"md\",\n label,\n id: providedId,\n \"aria-label\": ariaLabel,\n testID,\n themeMode,\n themeProductContext,\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n\n // Mirrors the Input \"useUpdatableState\" pattern: always keep an internal\n // value so the swatch and fields reflect edits immediately — even if a\n // controlled parent doesn't echo onChange back — and sync from `value`\n // whenever it changes externally.\n const [internalValue, setInternalValue] = useState(\n value ?? defaultValue ?? \"#000000\"\n );\n useEffect(() => {\n if (value !== undefined) setInternalValue(value);\n }, [value]);\n const currentValue = internalValue;\n\n // Which segment currently owns focus (for outline styling).\n const [focusedKey, setFocusedKey] = useState<string | null>(null);\n\n // Polite live-region message announced to screen readers on each edit.\n const [liveMessage, setLiveMessage] = useState(\"\");\n\n const rawId = useId();\n const safeId = rawId.replace(/:/g, \"\");\n const inputId = providedId || `input-color-${safeId}`;\n const labelId = `${inputId}-label`;\n\n const rgba = useMemo(() => hexToRgba(currentValue), [currentValue]);\n\n const sizeStyles = theme.sizing.input(size);\n const inputColors = theme.colors.control.input;\n const borderRadius = theme.shape.input[size].borderRadius;\n const swatchSize = SWATCH_SIZE[size];\n\n const showSwatch =\n type === \"color\" || type === \"color-hex\" || type === \"color-rgb\";\n const isHex = type === \"hex\" || type === \"color-hex\";\n const isRgb = type === \"rgb\" || type === \"color-rgb\";\n const isSwatchOnly = type === \"color\";\n\n const textColor = inputColors.text;\n const placeholderColor = inputColors.placeholder;\n const fontFamily = theme.fonts.body;\n\n const emit = (next: string) => {\n setInternalValue(next);\n setLiveMessage(`Color updated to ${next}`);\n onChange?.(next);\n };\n\n const emitFromRgba = (next: Rgba) => emit(rgbaToHex(next, transparency));\n\n /* ---- per-segment visual state ---- */\n const segmentVisuals = (focused: boolean) => {\n let backgroundColor = inputColors.bg;\n let borderColor = inputColors.border;\n let outlineColor: string | undefined;\n if (focused) {\n backgroundColor = theme.colors.control.focus.bg;\n outlineColor = theme.colors.border.brand;\n }\n return { backgroundColor, borderColor, outlineColor };\n };\n\n const renderSegment = (\n key: string,\n corner: Corner,\n content: React.ReactNode,\n opts: { flex?: number; width?: number; square?: boolean } = {}\n ) => {\n const focused = focusedKey === key;\n const { backgroundColor, borderColor, outlineColor } =\n segmentVisuals(focused);\n const width = opts.square ? sizeStyles.height : opts.width;\n return (\n <Box\n key={key}\n backgroundColor={backgroundColor}\n borderColor={borderColor}\n borderWidth={1}\n height={sizeStyles.height}\n width={width}\n flex={opts.flex}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent={opts.square ? \"center\" : \"flex-start\"}\n gap={FRAME_GAP[size]}\n paddingHorizontal={opts.square ? 0 : sizeStyles.paddingHorizontal}\n position=\"relative\"\n style={{\n ...cornerRadii(corner, borderRadius),\n minWidth: opts.square ? undefined : 40,\n ...(outlineColor && isWeb\n ? { outline: `1px solid ${outlineColor}`, outlineOffset: \"-1px\" }\n : outlineColor && !isWeb\n ? { borderColor: outlineColor }\n : {}),\n }}\n hoverStyle={\n !focused\n ? {\n backgroundColor: inputColors.bgHover,\n borderColor: inputColors.borderHover,\n }\n : undefined\n }\n >\n {content}\n </Box>\n );\n };\n\n /* ---- swatch node ----\n * Per the Figma spec the swatch is only interactive when type=\"color\": it\n * acts as the trigger that opens the parent ColorPicker panel (via\n * onSwatchClick). For every other type it is a decorative preview. */\n const swatchVisual = (\n <ColorSwatch\n size={swatchSize}\n rgba={rgba}\n transparency={transparency}\n borderColor={theme.colors.border.secondary}\n />\n );\n const swatchNode = isSwatchOnly ? (\n <Box\n as=\"button\"\n type=\"button\"\n onPress={() => onSwatchClick?.()}\n cursor=\"pointer\"\n backgroundColor=\"transparent\"\n borderWidth={0}\n padding={0}\n alignItems=\"center\"\n justifyContent=\"center\"\n aria-label=\"Open color picker\"\n data-testid=\"input-color__swatch\"\n onFocus={() => setFocusedKey(\"swatch\")}\n onBlur={() => setFocusedKey(null)}\n >\n {swatchVisual}\n </Box>\n ) : (\n <Box\n aria-hidden\n alignItems=\"center\"\n justifyContent=\"center\"\n data-testid=\"input-color__swatch-decorative\"\n >\n {swatchVisual}\n </Box>\n );\n\n /* ---- hex field content ---- */\n const hexContent = (\n <>\n <Text\n color={placeholderColor}\n fontSize={sizeStyles.fontSize}\n style={{ lineHeight: `${sizeStyles.lineHeight}px` }}\n >\n #\n </Text>\n <TextField\n // Hex field is always the RGB triplet; alpha is edited via its own\n // \"%\" segment, so the value never carries an alpha pair here.\n value={rgbaToHex(rgba, false).replace(/^#/, \"\")}\n sanitize={(t) => t.replace(HEX_CHARS, \"\").toUpperCase()}\n maxLength={6}\n onCommit={(digits) => {\n if (digits.length === 3 || digits.length === 6) {\n const next = hexToRgba(`#${digits}`);\n emitFromRgba({ ...next, a: rgba.a });\n }\n }}\n color={textColor}\n fontSize={sizeStyles.fontSize}\n fontFamily={fontFamily}\n ariaLabel=\"Hex color value\"\n testID=\"input-color__hex\"\n onFocus={() => setFocusedKey(\"hex\")}\n onBlur={() => setFocusedKey(null)}\n />\n </>\n );\n\n /* ---- channel field ---- */\n const channelContent = (channel: \"red\" | \"green\" | \"blue\" | \"alpha\") => {\n const isAlpha = channel === \"alpha\";\n const display = isAlpha\n ? Math.round(rgba.a * 100)\n : rgba[channel[0] as \"r\" | \"g\" | \"b\"];\n const field = (\n <TextField\n value={String(display)}\n inputMode=\"numeric\"\n sanitize={(t) => t.replace(/[^0-9]/g, \"\")}\n maxLength={3}\n step={isAlpha ? { min: 0, max: 100 } : { min: 0, max: 255 }}\n onCommit={(t) => {\n if (t === \"\") return;\n const num = parseInt(t, 10);\n if (Number.isNaN(num)) return;\n if (isAlpha) {\n emitFromRgba({ ...rgba, a: clamp(num, 0, 100) / 100 });\n } else {\n const k = channel[0] as \"r\" | \"g\" | \"b\";\n emitFromRgba({ ...rgba, [k]: clamp(num, 0, 255) });\n }\n }}\n color={textColor}\n fontSize={sizeStyles.fontSize}\n fontFamily={fontFamily}\n ariaLabel={CHANNEL_LABEL[channel]}\n testID={`input-color__channel-${channel}`}\n onFocus={() => setFocusedKey(`channel-${channel}`)}\n onBlur={() => setFocusedKey(null)}\n />\n );\n if (!isAlpha) return field;\n return (\n <>\n {field}\n <Text\n color={placeholderColor}\n fontSize={sizeStyles.fontSize}\n style={{ lineHeight: `${sizeStyles.lineHeight}px` }}\n >\n %\n </Text>\n </>\n );\n };\n\n /* ---- assemble control by type ----\n * Build an ordered list of cells, then enabling `transparency` simply\n * appends a trailing alpha (\"%\") cell. Corners are rounded across the whole\n * list: a single cell is fully rounded; otherwise first → left, last →\n * right, the rest square. */\n type Cell = {\n key: string;\n content: React.ReactNode;\n flex?: number;\n width?: number;\n square?: boolean;\n };\n const cells: Cell[] = [];\n\n if (isSwatchOnly) {\n cells.push({ key: \"swatch\", content: swatchNode, square: true });\n } else if (isHex) {\n cells.push({\n key: \"field\",\n flex: 1,\n content: (\n <>\n {showSwatch && swatchNode}\n <Box flex={1} flexDirection=\"row\" alignItems=\"center\" gap={4}>\n {hexContent}\n </Box>\n </>\n ),\n });\n } else if (isRgb) {\n if (showSwatch) {\n cells.push({ key: \"swatch\", content: swatchNode, square: true });\n }\n ([\"red\", \"green\", \"blue\"] as const).forEach((channel) =>\n cells.push({\n key: `channel-${channel}`,\n content: channelContent(channel),\n flex: 1,\n })\n );\n }\n\n if (transparency) {\n cells.push({\n key: \"channel-alpha\",\n content: channelContent(\"alpha\"),\n width: ALPHA_WIDTH[size],\n });\n }\n\n const control = cells.map((cell, i) => {\n const corner: Corner =\n cells.length === 1\n ? \"all\"\n : i === 0\n ? \"left\"\n : i === cells.length - 1\n ? \"right\"\n : \"middle\";\n return renderSegment(cell.key, corner, cell.content, {\n flex: cell.flex,\n width: cell.width,\n square: cell.square,\n });\n });\n\n return (\n <Box\n ref={ref}\n flexDirection=\"column\"\n gap={sizeStyles.fieldGap}\n width={isSwatchOnly ? undefined : \"100%\"}\n testID={testID}\n >\n {label && (\n <Box as=\"label\" id={labelId}>\n <Text\n color={theme.colors.content.secondary}\n fontSize={sizeStyles.fontSize - 2}\n fontWeight=\"500\"\n >\n {label}\n </Text>\n </Box>\n )}\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={2}\n width={isSwatchOnly ? undefined : \"100%\"}\n role=\"group\"\n aria-labelledby={label ? labelId : undefined}\n aria-label={!label ? ariaLabel : undefined}\n >\n {control}\n </Box>\n {isWeb && (\n <Box\n role=\"status\"\n aria-live=\"polite\"\n data-testid=\"input-color__live\"\n style={{\n position: \"absolute\",\n width: 1,\n height: 1,\n padding: 0,\n margin: -1,\n overflow: \"hidden\",\n clip: \"rect(0 0 0 0)\",\n whiteSpace: \"nowrap\",\n border: 0,\n }}\n >\n {liveMessage}\n </Box>\n )}\n </Box>\n );\n }\n);\n\nInputColor.displayName = \"InputColor\";\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 testID,\n \"data-testid\": dataTestId,\n style: styleProp,\n ...props\n}) => {\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n if (\n resolvedFontFamily === \"Pilat Wide\" ||\n resolvedFontFamily === \"Pilat Wide Bold\" ||\n resolvedFontFamily === \"Aktiv Grotesk\"\n ) {\n resolvedFontFamily = undefined;\n }\n\n const incomingStyle = StyleSheet.flatten(styleProp) as TextStyle | undefined;\n\n const baseStyle: TextStyle = {\n color: color ?? incomingStyle?.color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n textAlign: textAlign ?? incomingStyle?.textAlign,\n lineHeight: parseNumericValue(lineHeight ?? incomingStyle?.lineHeight),\n marginTop: parseNumericValue(\n incomingStyle?.marginTop as number | string | undefined\n ),\n marginBottom: parseNumericValue(\n incomingStyle?.marginBottom as number | string | undefined\n ),\n };\n\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText\n style={baseStyle}\n numberOfLines={numberOfLines}\n testID={dataTestId || testID || id}\n accessibilityRole={accessibilityRole}\n >\n {children}\n </RNText>\n );\n};\n","import React, { forwardRef } from \"react\";\nimport { TextInput as RNTextInput } from \"react-native\";\nimport { InputPrimitiveProps } from \"@xsolla/xui-primitives-core\";\n\n// Map web input types to React Native keyboard types\nconst keyboardTypeMap: Record<string, any> = {\n text: \"default\",\n number: \"numeric\",\n email: \"email-address\",\n tel: \"phone-pad\",\n url: \"url\",\n decimal: \"decimal-pad\",\n};\n\n// Map web inputMode to React Native keyboard types\nconst inputModeToKeyboardType: Record<string, any> = {\n none: \"default\",\n text: \"default\",\n decimal: \"decimal-pad\",\n numeric: \"number-pad\",\n tel: \"phone-pad\",\n search: \"default\",\n email: \"email-address\",\n url: \"url\",\n};\n\n// Map web autoComplete to React Native textContentType (iOS)\nconst autoCompleteToTextContentType: Record<string, any> = {\n \"one-time-code\": \"oneTimeCode\",\n email: \"emailAddress\",\n username: \"username\",\n password: \"password\",\n \"new-password\": \"newPassword\",\n tel: \"telephoneNumber\",\n \"postal-code\": \"postalCode\",\n name: \"name\",\n};\n\nexport const InputPrimitive = forwardRef<RNTextInput, InputPrimitiveProps>(\n (\n {\n value,\n placeholder,\n onChange,\n onChangeText,\n onFocus,\n onBlur,\n onKeyDown,\n disabled,\n secureTextEntry,\n style,\n color,\n fontSize,\n fontFamily,\n placeholderTextColor,\n maxLength,\n type,\n inputMode,\n autoComplete,\n id,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-label\": ariaLabel,\n \"aria-disabled\": ariaDisabled,\n \"data-testid\": dataTestId,\n testID,\n },\n ref\n ) => {\n const handleChangeText = (text: string) => {\n onChangeText?.(text);\n\n // Create a synthetic event for onChange compatibility\n // Include nativeEvent and no-op methods to prevent runtime errors\n // when consumers expect DOM-like event behavior\n if (onChange) {\n const syntheticEvent = {\n target: { value: text },\n currentTarget: { value: text },\n type: \"change\",\n nativeEvent: { text },\n preventDefault: () => {},\n stopPropagation: () => {},\n isTrusted: false,\n } as unknown as React.ChangeEvent<HTMLInputElement>;\n onChange(syntheticEvent);\n }\n };\n\n // Determine keyboard type - inputMode takes precedence over type\n const keyboardType = inputMode\n ? inputModeToKeyboardType[inputMode] || \"default\"\n : type\n ? keyboardTypeMap[type] || \"default\"\n : \"default\";\n\n // Determine textContentType for iOS autofill\n const textContentType = autoComplete\n ? autoCompleteToTextContentType[autoComplete]\n : undefined;\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 return (\n <RNTextInput\n ref={ref}\n value={value}\n placeholder={placeholder}\n onChangeText={handleChangeText}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyPress={(e) => {\n // Map onKeyPress to onKeyDown for cross-platform compatibility\n // Include preventDefault to avoid runtime errors when consumers call it\n if (onKeyDown) {\n onKeyDown({\n key: e.nativeEvent.key,\n preventDefault: () => {},\n } as any);\n }\n }}\n editable={!disabled}\n secureTextEntry={secureTextEntry || type === \"password\"}\n keyboardType={keyboardType}\n textContentType={textContentType}\n style={[\n {\n color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontFamily: resolvedFontFamily,\n flex: 1,\n padding: 0,\n textAlign: (style as any)?.textAlign || \"left\",\n },\n style as any,\n ]}\n placeholderTextColor={placeholderTextColor}\n maxLength={maxLength}\n // React Native accessibility props\n testID={dataTestId || testID || id}\n accessibilityLabel={ariaLabel}\n accessibilityHint={ariaDescribedBy}\n accessibilityState={{\n disabled: disabled || ariaDisabled,\n }}\n accessible={true}\n />\n );\n }\n);\n\nInputPrimitive.displayName = \"InputPrimitive\";\n","export * from \"./Box\";\nexport * from \"./Text\";\nexport * from \"./Spinner\";\nexport * from \"./Icon\";\nexport * from \"./Divider\";\nexport * from \"./Input\";\nexport * from \"./TextArea\";\nexport * from \"./LinearGradient\";\n\nexport const isWeb = false;\nexport const isNative = true;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAwE;;;ACCxE,0BAQO;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,CAAC,aAAkC;AAAA,IAC3D,iBACE,WAAW,YAAY,kBACnB,WAAW,kBACX;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;A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OAAO,QAAQ;AAAA,cAC5B,UAAU,WAAW,WAAW;AAAA,cAChC,YAAW;AAAA,cAEV;AAAA;AAAA,UACH,GACF;AAAA,UAEF;AAAA,YAAC;AAAA;AAAA,cACC,eAAc;AAAA,cACd,YAAW;AAAA,cACX,KAAK;AAAA,cACL,OAAO,eAAe,SAAY;AAAA,cAClC,MAAK;AAAA,cACL,mBAAiB,QAAQ,UAAU;AAAA,cACnC,cAAY,CAAC,QAAQ,YAAY;AAAA,cAEhC;AAAA;AAAA,UACH;AAAA,UACC,SACC;AAAA,YAAC;AAAA;AAAA,cACC,MAAK;AAAA,cACL,aAAU;AAAA,cACV,eAAY;AAAA,cACZ,OAAO;AAAA,gBACL,UAAU;AAAA,gBACV,OAAO;AAAA,gBACP,QAAQ;AAAA,gBACR,SAAS;AAAA,gBACT,QAAQ;AAAA,gBACR,UAAU;AAAA,gBACV,MAAM;AAAA,gBACN,YAAY;AAAA,gBACZ,QAAQ;AAAA,cACV;AAAA,cAEC;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;","names":["import_react","import_react_native","import_jsx_runtime","RNText","import_react_native","import_jsx_runtime","RNTextInput","import_jsx_runtime"]}