@xsolla/xui-input 0.89.0 → 0.91.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.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  // src/Input.tsx
2
- import React4, {
2
+ import React3, {
3
3
  useState,
4
- forwardRef as forwardRef3,
4
+ forwardRef as forwardRef2,
5
5
  useRef,
6
6
  useEffect
7
7
  } from "react";
@@ -211,41 +211,10 @@ var Text = ({
211
211
  return /* @__PURE__ */ jsx2(RNText, { style, testID: id, accessibilityRole, children });
212
212
  };
213
213
 
214
- // ../primitives-native/src/Spinner.tsx
215
- import { ActivityIndicator, View as View2 } from "react-native";
216
- import { jsx as jsx3 } from "react/jsx-runtime";
217
- var Spinner = ({
218
- color,
219
- size,
220
- role,
221
- "aria-label": ariaLabel,
222
- "aria-live": ariaLive,
223
- testID
224
- }) => {
225
- return /* @__PURE__ */ jsx3(
226
- View2,
227
- {
228
- accessible: true,
229
- accessibilityRole: role === "status" ? "none" : void 0,
230
- accessibilityLabel: ariaLabel,
231
- accessibilityLiveRegion: ariaLive === "polite" ? "polite" : ariaLive === "assertive" ? "assertive" : "none",
232
- testID,
233
- children: /* @__PURE__ */ jsx3(
234
- ActivityIndicator,
235
- {
236
- color,
237
- size: typeof size === "number" ? size : "small"
238
- }
239
- )
240
- }
241
- );
242
- };
243
- Spinner.displayName = "Spinner";
244
-
245
214
  // ../primitives-native/src/Icon.tsx
246
215
  import React from "react";
247
- import { View as View3 } from "react-native";
248
- import { jsx as jsx4 } from "react/jsx-runtime";
216
+ import { View as View2 } from "react-native";
217
+ import { jsx as jsx3 } from "react/jsx-runtime";
249
218
  var Icon = ({ children, color, size }) => {
250
219
  const style = {
251
220
  width: typeof size === "number" ? size : void 0,
@@ -263,17 +232,13 @@ var Icon = ({ children, color, size }) => {
263
232
  }
264
233
  return child;
265
234
  });
266
- return /* @__PURE__ */ jsx4(View3, { style, children: childrenWithProps });
235
+ return /* @__PURE__ */ jsx3(View2, { style, children: childrenWithProps });
267
236
  };
268
237
 
269
- // ../primitives-native/src/Divider.tsx
270
- import { View as View4 } from "react-native";
271
- import { jsx as jsx5 } from "react/jsx-runtime";
272
-
273
238
  // ../primitives-native/src/Input.tsx
274
239
  import { forwardRef } from "react";
275
240
  import { TextInput as RNTextInput } from "react-native";
276
- import { jsx as jsx6 } from "react/jsx-runtime";
241
+ import { jsx as jsx4 } from "react/jsx-runtime";
277
242
  var keyboardTypeMap = {
278
243
  text: "default",
279
244
  number: "numeric",
@@ -346,7 +311,7 @@ var InputPrimitive = forwardRef(
346
311
  };
347
312
  const keyboardType = inputMode ? inputModeToKeyboardType[inputMode] || "default" : type ? keyboardTypeMap[type] || "default" : "default";
348
313
  const textContentType = autoComplete ? autoCompleteToTextContentType[autoComplete] : void 0;
349
- return /* @__PURE__ */ jsx6(
314
+ return /* @__PURE__ */ jsx4(
350
315
  RNTextInput,
351
316
  {
352
317
  ref,
@@ -393,101 +358,11 @@ var InputPrimitive = forwardRef(
393
358
  );
394
359
  InputPrimitive.displayName = "InputPrimitive";
395
360
 
396
- // ../primitives-native/src/TextArea.tsx
397
- import { forwardRef as forwardRef2 } from "react";
398
- import { TextInput as RNTextInput2 } from "react-native";
399
- import { jsx as jsx7 } from "react/jsx-runtime";
400
- var TextAreaPrimitive = forwardRef2(
401
- ({
402
- value,
403
- placeholder,
404
- onChange,
405
- onChangeText,
406
- onFocus,
407
- onBlur,
408
- onKeyDown,
409
- disabled,
410
- style,
411
- color,
412
- fontSize,
413
- placeholderTextColor,
414
- maxLength,
415
- rows,
416
- id,
417
- "aria-describedby": ariaDescribedBy,
418
- "aria-label": ariaLabel,
419
- "aria-disabled": ariaDisabled,
420
- "data-testid": dataTestId
421
- }, ref) => {
422
- const handleChangeText = (text) => {
423
- onChangeText?.(text);
424
- if (onChange) {
425
- const syntheticEvent = {
426
- target: { value: text },
427
- currentTarget: { value: text },
428
- type: "change",
429
- nativeEvent: { text },
430
- preventDefault: () => {
431
- },
432
- stopPropagation: () => {
433
- },
434
- isTrusted: false
435
- };
436
- onChange(syntheticEvent);
437
- }
438
- };
439
- return /* @__PURE__ */ jsx7(
440
- RNTextInput2,
441
- {
442
- ref,
443
- value,
444
- placeholder,
445
- onChangeText: handleChangeText,
446
- onFocus,
447
- onBlur,
448
- onKeyPress: (e) => {
449
- if (onKeyDown) {
450
- onKeyDown({
451
- key: e.nativeEvent.key,
452
- preventDefault: () => {
453
- }
454
- });
455
- }
456
- },
457
- editable: !disabled,
458
- multiline: true,
459
- numberOfLines: rows || 4,
460
- style: [
461
- {
462
- color,
463
- fontSize: typeof fontSize === "number" ? fontSize : void 0,
464
- flex: 1,
465
- padding: 0,
466
- textAlignVertical: "top",
467
- textAlign: style?.textAlign || "left"
468
- },
469
- style
470
- ],
471
- placeholderTextColor,
472
- maxLength,
473
- testID: dataTestId || id,
474
- accessibilityLabel: ariaLabel,
475
- accessibilityHint: ariaDescribedBy,
476
- accessibilityState: {
477
- disabled: disabled || ariaDisabled
478
- },
479
- accessible: true
480
- }
481
- );
482
- }
483
- );
484
- TextAreaPrimitive.displayName = "TextAreaPrimitive";
485
-
486
361
  // src/Input.tsx
487
362
  import { useDesignSystem, useId } from "@xsolla/xui-core";
488
363
  import { Check, X } from "@xsolla/xui-icons";
489
- import { jsx as jsx8, jsxs } from "react/jsx-runtime";
490
- var Input = forwardRef3(
364
+ import { jsx as jsx5, jsxs } from "react/jsx-runtime";
365
+ var Input = forwardRef2(
491
366
  ({
492
367
  value,
493
368
  placeholder,
@@ -506,7 +381,7 @@ var Input = forwardRef3(
506
381
  extraClear = false,
507
382
  onRemove,
508
383
  checked = false,
509
- checkedIcon = /* @__PURE__ */ jsx8(Check, {}),
384
+ checkedIcon = /* @__PURE__ */ jsx5(Check, {}),
510
385
  type,
511
386
  id: providedId,
512
387
  "aria-label": ariaLabel,
@@ -531,7 +406,7 @@ var Input = forwardRef3(
531
406
  const inputId = providedId || `input-${safeId}`;
532
407
  const labelId = `${inputId}-label`;
533
408
  const errorId = `${inputId}-error`;
534
- React4.useImperativeHandle(
409
+ React3.useImperativeHandle(
535
410
  ref,
536
411
  () => inputRef.current,
537
412
  []
@@ -661,7 +536,7 @@ var Input = forwardRef3(
661
536
  width: "100%",
662
537
  testID,
663
538
  children: [
664
- label && /* @__PURE__ */ jsx8(Box, { as: "label", id: labelId, children: /* @__PURE__ */ jsx8(
539
+ label && /* @__PURE__ */ jsx5(Box, { as: "label", id: labelId, children: /* @__PURE__ */ jsx5(
665
540
  Text,
666
541
  {
667
542
  color: theme.colors.content.secondary,
@@ -698,8 +573,8 @@ var Input = forwardRef3(
698
573
  borderColor: inputColors.borderHover
699
574
  } : void 0,
700
575
  children: [
701
- isLeftInputIconShown && /* @__PURE__ */ jsx8(Box, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx8(Icon, { size: iconSize, color: textColor, children: iconLeft }) }),
702
- /* @__PURE__ */ jsx8(Box, { flex: 1, height: "100%", justifyContent: "center", children: /* @__PURE__ */ jsx8(
576
+ isLeftInputIconShown && /* @__PURE__ */ jsx5(Box, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx5(Icon, { size: iconSize, color: textColor, children: iconLeft }) }),
577
+ /* @__PURE__ */ jsx5(Box, { flex: 1, height: "100%", justifyContent: "center", children: /* @__PURE__ */ jsx5(
703
578
  InputPrimitive,
704
579
  {
705
580
  ref: inputRef,
@@ -726,7 +601,7 @@ var Input = forwardRef3(
726
601
  }
727
602
  ) }),
728
603
  extrasCount > 0 && /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "center", gap: 4, children: [
729
- isExtraClearIconShown && /* @__PURE__ */ jsx8(
604
+ isExtraClearIconShown && /* @__PURE__ */ jsx5(
730
605
  Box,
731
606
  {
732
607
  as: "button",
@@ -741,17 +616,17 @@ var Input = forwardRef3(
741
616
  onPress: !disabled ? handleClear : void 0,
742
617
  disabled,
743
618
  "data-testid": "input__extra-clear-button",
744
- children: /* @__PURE__ */ jsx8(Icon, { size: iconSize, color: textColor, children: /* @__PURE__ */ jsx8(X, {}) })
619
+ children: /* @__PURE__ */ jsx5(Icon, { size: iconSize, color: textColor, children: /* @__PURE__ */ jsx5(X, {}) })
745
620
  }
746
621
  ),
747
- isCheckedShown && /* @__PURE__ */ jsx8(
622
+ isCheckedShown && /* @__PURE__ */ jsx5(
748
623
  Box,
749
624
  {
750
625
  alignItems: "center",
751
626
  justifyContent: "center",
752
627
  width: iconSize,
753
628
  height: "100%",
754
- children: /* @__PURE__ */ jsx8(
629
+ children: /* @__PURE__ */ jsx5(
755
630
  Icon,
756
631
  {
757
632
  size: iconSize,
@@ -761,12 +636,12 @@ var Input = forwardRef3(
761
636
  )
762
637
  }
763
638
  ),
764
- isRightInputIconShown && /* @__PURE__ */ jsx8(Box, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx8(Icon, { size: iconRightSize || iconSize, color: textColor, children: iconRight }) })
639
+ isRightInputIconShown && /* @__PURE__ */ jsx5(Box, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx5(Icon, { size: iconRightSize || iconSize, color: textColor, children: iconRight }) })
765
640
  ] })
766
641
  ]
767
642
  }
768
643
  ),
769
- errorMessage && /* @__PURE__ */ jsx8(
644
+ errorMessage && /* @__PURE__ */ jsx5(
770
645
  Text,
771
646
  {
772
647
  id: errorId,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/Input.tsx","../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx","../../../primitives-native/src/Spinner.tsx","../../../primitives-native/src/Icon.tsx","../../../primitives-native/src/Divider.tsx","../../../primitives-native/src/Input.tsx","../../../primitives-native/src/TextArea.tsx"],"sourcesContent":["import React, {\n useState,\n forwardRef,\n useRef,\n useEffect,\n type InputHTMLAttributes,\n} from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon, InputPrimitive } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem, useId } from \"@xsolla/xui-core\";\nimport { Check, X } from \"@xsolla/xui-icons\";\n\nexport interface InputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"size\" | \"onChange\"\n> {\n /**\n * Property for specifying the value of the control.\n */\n value?: string;\n /**\n * Property for specifying the placeholder of the control.\n */\n placeholder?: string;\n /**\n * Event handler when the value changes (for controlled mode).\n */\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n /**\n * Event handler when the text changes (alternative to onChange).\n */\n onChangeText?: (text: string) => void;\n /**\n * Property for changing the size of the input.\n */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n /**\n * Property for disabling the control.\n */\n disabled?: boolean;\n /**\n * Property for displaying a label above the input.\n */\n label?: string;\n /**\n * Property for displaying an error message and highlighting the control as invalid.\n */\n errorMessage?: string;\n /**\n * Property for displaying an error and highlighting the control as invalid.\n */\n error?: boolean;\n /**\n * Property to display an icon on the left side.\n */\n iconLeft?: React.ReactNode;\n /**\n * Property to display an icon on the right side.\n */\n iconRight?: React.ReactNode;\n /**\n * Add function clear for input.\n */\n extraClear?: boolean;\n /**\n * Function triggered when user clicks on extraClear button.\n */\n onRemove?: () => void;\n /**\n * Property for show checked status in input. Show only if not errorMessage.\n */\n checked?: boolean;\n /**\n * Property for passing a new icon to replace the default checked icon.\n */\n checkedIcon?: React.ReactNode;\n /**\n * Property to specify the size of the right icon.\n */\n iconRightSize?: number | string;\n /**\n * Unique identifier for the input element. 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 * Override border radius for top-left corner.\n */\n borderTopLeftRadius?: number;\n /**\n * Override border radius for top-right corner.\n */\n borderTopRightRadius?: number;\n /**\n * Override border radius for bottom-left corner.\n */\n borderBottomLeftRadius?: number;\n /**\n * Override border radius for bottom-right corner.\n */\n borderBottomRightRadius?: number;\n /**\n * Custom background color for the input.\n */\n backgroundColor?: string;\n /**\n * Test identifier for the input.\n */\n testID?: string;\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n value,\n placeholder,\n onChange,\n onChangeText,\n onKeyDown,\n size = \"md\",\n disabled = false,\n name,\n label,\n errorMessage,\n error,\n iconLeft,\n iconRight,\n iconRightSize,\n extraClear = false,\n onRemove,\n checked = false,\n checkedIcon = <Check />,\n type,\n id: providedId,\n \"aria-label\": ariaLabel,\n borderTopLeftRadius: borderTopLeftRadiusOverride,\n borderTopRightRadius: borderTopRightRadiusOverride,\n borderBottomLeftRadius: borderBottomLeftRadiusOverride,\n borderBottomRightRadius: borderBottomRightRadiusOverride,\n backgroundColor: backgroundColorProp,\n testID,\n onBlur: externalOnBlur,\n onFocus: externalOnFocus,\n ...rest\n },\n ref\n ) => {\n const { theme } = useDesignSystem();\n const [internalState, setInternalState] = useState<\"default\" | \"focus\">(\n \"default\"\n );\n // Internal value state - mimics useUpdatableState from switch-repo\n const [passValue, setPassValue] = useState(value ?? \"\");\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Generate unique IDs for accessibility\n // Sanitize useId() output to remove colons (e.g., :r0: -> r0)\n // This ensures valid HTML id attributes and ARIA references\n const rawId = useId();\n const safeId = rawId.replace(/:/g, \"\");\n const inputId = providedId || `input-${safeId}`;\n const labelId = `${inputId}-label`;\n const errorId = `${inputId}-error`;\n\n // Forward ref to input element\n React.useImperativeHandle(\n ref,\n () => inputRef.current as HTMLInputElement,\n []\n );\n\n // Sync passValue with value prop when it changes (like useUpdatableState)\n useEffect(() => {\n if (value !== undefined) {\n setPassValue(value);\n }\n }, [value]);\n\n const isDisable = disabled;\n const isError = !!(errorMessage || error);\n const isFocus = internalState === \"focus\";\n\n const isLeftInputIconShown = !!iconLeft;\n const isRightInputIconShown = !!iconRight;\n\n // Handle checked status (only show if not error)\n const isCheckedShown = checked && !errorMessage;\n // Clear button visibility depends on internal state\n const isExtraClearIconShown = !disabled && extraClear && !!passValue;\n const extrasCount =\n Number(isExtraClearIconShown) +\n Number(isCheckedShown) +\n Number(isRightInputIconShown);\n\n // Resolve Config from Theme\n const sizeStyles = theme.sizing.input(size);\n const inputColors = theme.colors.control.input;\n\n const handleFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n if (!isDisable) {\n setInternalState(\"focus\");\n }\n externalOnFocus?.(e);\n };\n\n const handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n if (!isDisable) {\n setInternalState(\"default\");\n }\n externalOnBlur?.(e);\n };\n\n // Match switch-repo handleChange pattern exactly\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n\n // If onChange is provided (controlled mode), call it\n // But ALWAYS update internal state for clear button visibility\n if (onChange) {\n onChange(e);\n }\n if (onChangeText) {\n onChangeText(newValue);\n }\n\n // Always update internal state (this is key for uncontrolled mode in Storybook)\n setPassValue(newValue);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === \"Escape\") {\n e.currentTarget.blur();\n }\n if (onKeyDown) {\n onKeyDown(e);\n }\n };\n\n // Match switch-repo onClear pattern - NO direct DOM manipulation\n const handleClear = (e: React.MouseEvent<HTMLElement>) => {\n e.stopPropagation();\n\n // Update internal state first (this makes the input show empty)\n setPassValue(\"\");\n\n // Call onRemove callback\n onRemove?.();\n\n // Create synthetic change event and call onChange if provided\n if (inputRef.current) {\n // Web-specific: Use the native setter to properly set the value\n // without shadowing the property (only on web platform)\n if (typeof window !== \"undefined\" && window.HTMLInputElement) {\n const nativeInputValueSetter = Object.getOwnPropertyDescriptor(\n window.HTMLInputElement.prototype,\n \"value\"\n )?.set;\n\n if (nativeInputValueSetter) {\n nativeInputValueSetter.call(inputRef.current, \"\");\n }\n }\n\n // Create a proper synthetic event\n const syntheticEvent = {\n target: inputRef.current,\n currentTarget: inputRef.current,\n type: \"change\",\n } as React.ChangeEvent<HTMLInputElement>;\n\n onChange?.(syntheticEvent);\n inputRef.current.focus();\n }\n };\n\n // Resolve background and border colors based on state\n let backgroundColor = backgroundColorProp || inputColors.bg;\n let borderColor = inputColors.border;\n let outlineColor: string | undefined;\n\n if (isDisable) {\n backgroundColor = inputColors.bgDisable;\n borderColor = inputColors.borderDisable;\n } else if (isError) {\n outlineColor = theme.colors.border.alert;\n if (isFocus) {\n backgroundColor = theme.colors.control.focus.bg;\n }\n } else if (isFocus) {\n backgroundColor = theme.colors.control.focus.bg;\n outlineColor = theme.colors.border.brand;\n }\n\n const textColor = isDisable ? inputColors.textDisable : inputColors.text;\n const placeholderColor = inputColors.placeholder;\n\n // Padding values from Figma design\n const paddingConfig = {\n xl: { vertical: 12, horizontal: 12 },\n lg: { vertical: 14, horizontal: 12 },\n md: { vertical: 11, horizontal: 12 },\n sm: { vertical: 7, horizontal: 10 },\n xs: { vertical: 7, horizontal: 10 },\n };\n\n // Border radius from Figma design\n const borderRadiusConfig = {\n xl: 4,\n lg: 4,\n md: 2,\n sm: 2,\n xs: 2,\n };\n\n // Icon sizes from Figma design\n const iconSizeConfig = {\n xl: 18,\n lg: 18,\n md: 18,\n sm: 16,\n xs: 16,\n };\n\n // Focus outline config from Figma design\n const focusOutlineConfig = {\n xl: { width: 2, offset: -2 },\n lg: { width: 2, offset: -2 },\n md: { width: 1, offset: -1 },\n sm: { width: 1, offset: -1 },\n xs: { width: 1, offset: -1 },\n };\n\n const padding = paddingConfig[size];\n const borderRadius = borderRadiusConfig[size];\n const iconSize = iconSizeConfig[size];\n const focusOutline = focusOutlineConfig[size];\n\n return (\n <Box\n flexDirection=\"column\"\n gap={sizeStyles.fieldGap}\n width=\"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 backgroundColor={backgroundColor}\n borderColor={borderColor}\n borderWidth={borderColor !== \"transparent\" ? 1 : 0}\n height={sizeStyles.height}\n paddingVertical={padding.vertical}\n paddingHorizontal={padding.horizontal}\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={10}\n position=\"relative\"\n style={{\n borderTopLeftRadius: borderTopLeftRadiusOverride ?? borderRadius,\n borderTopRightRadius: borderTopRightRadiusOverride ?? borderRadius,\n borderBottomLeftRadius:\n borderBottomLeftRadiusOverride ?? borderRadius,\n borderBottomRightRadius:\n borderBottomRightRadiusOverride ?? borderRadius,\n ...(outlineColor\n ? {\n outline: `${focusOutline.width}px solid ${outlineColor}`,\n outlineOffset: `${focusOutline.offset}px`,\n }\n : {}),\n }}\n hoverStyle={\n !isDisable && !isFocus && !isError\n ? {\n backgroundColor: inputColors.bgHover,\n borderColor: inputColors.borderHover,\n }\n : undefined\n }\n >\n {isLeftInputIconShown && (\n <Box alignItems=\"center\" justifyContent=\"center\">\n <Icon size={iconSize} color={textColor}>\n {iconLeft}\n </Icon>\n </Box>\n )}\n\n <Box flex={1} height=\"100%\" justifyContent=\"center\">\n <InputPrimitive\n ref={inputRef}\n id={inputId}\n value={passValue}\n name={name}\n placeholder={placeholder}\n onChange={handleChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n disabled={isDisable}\n type={type || \"text\"}\n color={textColor}\n fontSize={sizeStyles.fontSize}\n placeholderTextColor={placeholderColor}\n aria-invalid={isError || undefined}\n aria-describedby={errorMessage ? errorId : undefined}\n aria-labelledby={label ? labelId : undefined}\n aria-label={!label ? ariaLabel : undefined}\n aria-disabled={isDisable || undefined}\n data-testid=\"input__field\"\n {...rest}\n />\n </Box>\n\n {/* Right-side Extras Wrapper */}\n {extrasCount > 0 && (\n <Box flexDirection=\"row\" alignItems=\"center\" gap={4}>\n {isExtraClearIconShown && (\n <Box\n as=\"button\"\n type=\"button\"\n alignItems=\"center\"\n justifyContent=\"center\"\n width={iconSize}\n height=\"100%\"\n backgroundColor=\"transparent\"\n borderWidth={0}\n cursor={disabled ? \"not-allowed\" : \"pointer\"}\n onPress={!disabled ? handleClear : undefined}\n disabled={disabled}\n data-testid=\"input__extra-clear-button\"\n >\n <Icon size={iconSize} color={textColor}>\n <X />\n </Icon>\n </Box>\n )}\n {isCheckedShown && (\n <Box\n alignItems=\"center\"\n justifyContent=\"center\"\n width={iconSize}\n height=\"100%\"\n >\n <Icon\n size={iconSize}\n color={theme.colors.content.success.primary}\n >\n {checkedIcon}\n </Icon>\n </Box>\n )}\n {isRightInputIconShown && (\n <Box alignItems=\"center\" justifyContent=\"center\">\n <Icon size={iconRightSize || iconSize} color={textColor}>\n {iconRight}\n </Icon>\n </Box>\n )}\n </Box>\n )}\n </Box>\n\n {errorMessage && (\n <Text\n id={errorId}\n role=\"alert\"\n color={theme.colors.content.alert.primary}\n fontSize={sizeStyles.fontSize - 2}\n style={{ lineHeight: sizeStyles.lineHeight + \"px\" }}\n >\n {errorMessage}\n </Text>\n )}\n </Box>\n );\n }\n);\n\nInput.displayName = \"Input\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport { Text as RNText, TextStyle, AccessibilityRole } from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\n// Map web roles to React Native accessibility roles\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n id,\n role,\n ...props\n}) => {\n // Extract the first font name from a comma-separated list (e.g. for web-style font stacks)\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n // On native, if we don't have the custom font loaded, it's better to use the system font\n // to avoid rendering issues or missing text.\n if (resolvedFontFamily === \"Pilat Wide Bold\") {\n resolvedFontFamily = undefined;\n }\n\n const style: TextStyle = {\n color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n };\n\n // Map role to React Native accessibilityRole\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText style={style} testID={id} accessibilityRole={accessibilityRole}>\n {children}\n </RNText>\n );\n};\n","import type React from \"react\";\nimport { ActivityIndicator, View } from \"react-native\";\nimport type { SpinnerProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Spinner: React.FC<SpinnerProps> = ({\n color,\n size,\n role,\n \"aria-label\": ariaLabel,\n \"aria-live\": ariaLive,\n testID,\n}) => {\n return (\n <View\n accessible={true}\n accessibilityRole={role === \"status\" ? \"none\" : undefined}\n accessibilityLabel={ariaLabel}\n accessibilityLiveRegion={\n ariaLive === \"polite\"\n ? \"polite\"\n : ariaLive === \"assertive\"\n ? \"assertive\"\n : \"none\"\n }\n testID={testID}\n >\n <ActivityIndicator\n color={color}\n size={typeof size === \"number\" ? size : \"small\"}\n />\n </View>\n );\n};\n\nSpinner.displayName = \"Spinner\";\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Icon: React.FC<IconProps> = ({ children, color, size }) => {\n const style: ViewStyle = {\n width: typeof size === \"number\" ? size : undefined,\n height: typeof size === \"number\" ? size : undefined,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n\n // On native, we try to pass the color down to children (like Text primitives)\n // to mimic the CSS inheritance behavior of the web version.\n const childrenWithProps = React.Children.map(children, (child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, {\n color: child.props.color || color,\n // Also pass size if child seems to be an icon that needs it\n size: child.props.size || size,\n });\n }\n return child;\n });\n\n return <View style={style}>{childrenWithProps}</View>;\n};\n","import React from \"react\";\nimport { View, ViewStyle } from \"react-native\";\nimport { DividerProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Divider: React.FC<DividerProps> = ({\n color,\n height,\n width,\n vertical,\n dashStroke,\n}) => {\n const style: ViewStyle = {\n backgroundColor: dashStroke\n ? \"transparent\"\n : color || \"rgba(255, 255, 255, 0.15)\",\n width: vertical ? (typeof width === \"number\" ? width : 1) : \"100%\",\n height: vertical ? \"100%\" : typeof height === \"number\" ? height : 1,\n ...(dashStroke && {\n borderStyle: \"dashed\",\n borderColor: color || \"rgba(255, 255, 255, 0.15)\",\n borderWidth: 0,\n ...(vertical\n ? { borderLeftWidth: typeof width === \"number\" ? width : 1 }\n : { borderTopWidth: typeof height === \"number\" ? height : 1 }),\n }),\n };\n\n return <View style={style} />;\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 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 },\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 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 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 || 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","import React, { forwardRef } from \"react\";\nimport { TextInput as RNTextInput } from \"react-native\";\nimport { TextAreaPrimitiveProps } from \"@xsolla/xui-primitives-core\";\n\nexport const TextAreaPrimitive = forwardRef<\n RNTextInput,\n TextAreaPrimitiveProps\n>(\n (\n {\n value,\n placeholder,\n onChange,\n onChangeText,\n onFocus,\n onBlur,\n onKeyDown,\n disabled,\n style,\n color,\n fontSize,\n placeholderTextColor,\n maxLength,\n rows,\n id,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-label\": ariaLabel,\n \"aria-disabled\": ariaDisabled,\n \"data-testid\": dataTestId,\n },\n ref\n ) => {\n const handleChangeText = (text: string) => {\n onChangeText?.(text);\n\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<HTMLTextAreaElement>;\n onChange(syntheticEvent);\n }\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 if (onKeyDown) {\n onKeyDown({\n key: e.nativeEvent.key,\n preventDefault: () => {},\n } as any);\n }\n }}\n editable={!disabled}\n multiline={true}\n numberOfLines={rows || 4}\n style={[\n {\n color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n flex: 1,\n padding: 0,\n textAlignVertical: \"top\",\n textAlign: (style as any)?.textAlign || \"left\",\n },\n style as any,\n ]}\n placeholderTextColor={placeholderTextColor}\n maxLength={maxLength}\n testID={dataTestId || id}\n accessibilityLabel={ariaLabel}\n accessibilityHint={ariaDescribedBy}\n accessibilityState={{\n disabled: disabled || ariaDisabled,\n }}\n accessible={true}\n />\n );\n }\n);\n\nTextAreaPrimitive.displayName = \"TextAreaPrimitive\";\n"],"mappings":";AAAA,OAAOA;AAAA,EACL;AAAA,EACA,cAAAC;AAAA,EACA;AAAA,EACA;AAAA,OAEK;;;ACLP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AAmID;AAhIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;A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AAA,kBACF;AAAA,kBAED,kBACC,gBAAAA;AAAA,oBAAC;AAAA;AAAA,sBACC,YAAW;AAAA,sBACX,gBAAe;AAAA,sBACf,OAAO;AAAA,sBACP,QAAO;AAAA,sBAEP,0BAAAA;AAAA,wBAAC;AAAA;AAAA,0BACC,MAAM;AAAA,0BACN,OAAO,MAAM,OAAO,QAAQ,QAAQ;AAAA,0BAEnC;AAAA;AAAA,sBACH;AAAA;AAAA,kBACF;AAAA,kBAED,yBACC,gBAAAA,KAAC,OAAI,YAAW,UAAS,gBAAe,UACtC,0BAAAA,KAAC,QAAK,MAAM,iBAAiB,UAAU,OAAO,WAC3C,qBACH,GACF;AAAA,mBAEJ;AAAA;AAAA;AAAA,UAEJ;AAAA,UAEC,gBACC,gBAAAA;AAAA,YAAC;AAAA;AAAA,cACC,IAAI;AAAA,cACJ,MAAK;AAAA,cACL,OAAO,MAAM,OAAO,QAAQ,MAAM;AAAA,cAClC,UAAU,WAAW,WAAW;AAAA,cAChC,OAAO,EAAE,YAAY,WAAW,aAAa,KAAK;AAAA,cAEjD;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,MAAM,cAAc;","names":["React","forwardRef","jsx","View","jsx","View","jsx","View","jsx","jsx","forwardRef","RNTextInput","jsx","jsx","forwardRef","React"]}
1
+ {"version":3,"sources":["../../src/Input.tsx","../../../primitives-native/src/Box.tsx","../../../primitives-native/src/Text.tsx","../../../primitives-native/src/Icon.tsx","../../../primitives-native/src/Input.tsx"],"sourcesContent":["import React, {\n useState,\n forwardRef,\n useRef,\n useEffect,\n type InputHTMLAttributes,\n} from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon, InputPrimitive } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem, useId } from \"@xsolla/xui-core\";\nimport { Check, X } from \"@xsolla/xui-icons\";\n\nexport interface InputProps extends Omit<\n InputHTMLAttributes<HTMLInputElement>,\n \"size\" | \"onChange\"\n> {\n /**\n * Property for specifying the value of the control.\n */\n value?: string;\n /**\n * Property for specifying the placeholder of the control.\n */\n placeholder?: string;\n /**\n * Event handler when the value changes (for controlled mode).\n */\n onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;\n /**\n * Event handler when the text changes (alternative to onChange).\n */\n onChangeText?: (text: string) => void;\n /**\n * Property for changing the size of the input.\n */\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n /**\n * Property for disabling the control.\n */\n disabled?: boolean;\n /**\n * Property for displaying a label above the input.\n */\n label?: string;\n /**\n * Property for displaying an error message and highlighting the control as invalid.\n */\n errorMessage?: string;\n /**\n * Property for displaying an error and highlighting the control as invalid.\n */\n error?: boolean;\n /**\n * Property to display an icon on the left side.\n */\n iconLeft?: React.ReactNode;\n /**\n * Property to display an icon on the right side.\n */\n iconRight?: React.ReactNode;\n /**\n * Add function clear for input.\n */\n extraClear?: boolean;\n /**\n * Function triggered when user clicks on extraClear button.\n */\n onRemove?: () => void;\n /**\n * Property for show checked status in input. Show only if not errorMessage.\n */\n checked?: boolean;\n /**\n * Property for passing a new icon to replace the default checked icon.\n */\n checkedIcon?: React.ReactNode;\n /**\n * Property to specify the size of the right icon.\n */\n iconRightSize?: number | string;\n /**\n * Unique identifier for the input element. 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 * Override border radius for top-left corner.\n */\n borderTopLeftRadius?: number;\n /**\n * Override border radius for top-right corner.\n */\n borderTopRightRadius?: number;\n /**\n * Override border radius for bottom-left corner.\n */\n borderBottomLeftRadius?: number;\n /**\n * Override border radius for bottom-right corner.\n */\n borderBottomRightRadius?: number;\n /**\n * Custom background color for the input.\n */\n backgroundColor?: string;\n /**\n * Test identifier for the input.\n */\n testID?: string;\n}\n\nexport const Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n value,\n placeholder,\n onChange,\n onChangeText,\n onKeyDown,\n size = \"md\",\n disabled = false,\n name,\n label,\n errorMessage,\n error,\n iconLeft,\n iconRight,\n iconRightSize,\n extraClear = false,\n onRemove,\n checked = false,\n checkedIcon = <Check />,\n type,\n id: providedId,\n \"aria-label\": ariaLabel,\n borderTopLeftRadius: borderTopLeftRadiusOverride,\n borderTopRightRadius: borderTopRightRadiusOverride,\n borderBottomLeftRadius: borderBottomLeftRadiusOverride,\n borderBottomRightRadius: borderBottomRightRadiusOverride,\n backgroundColor: backgroundColorProp,\n testID,\n onBlur: externalOnBlur,\n onFocus: externalOnFocus,\n ...rest\n },\n ref\n ) => {\n const { theme } = useDesignSystem();\n const [internalState, setInternalState] = useState<\"default\" | \"focus\">(\n \"default\"\n );\n // Internal value state - mimics useUpdatableState from switch-repo\n const [passValue, setPassValue] = useState(value ?? \"\");\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Generate unique IDs for accessibility\n // Sanitize useId() output to remove colons (e.g., :r0: -> r0)\n // This ensures valid HTML id attributes and ARIA references\n const rawId = useId();\n const safeId = rawId.replace(/:/g, \"\");\n const inputId = providedId || `input-${safeId}`;\n const labelId = `${inputId}-label`;\n const errorId = `${inputId}-error`;\n\n // Forward ref to input element\n React.useImperativeHandle(\n ref,\n () => inputRef.current as HTMLInputElement,\n []\n );\n\n // Sync passValue with value prop when it changes (like useUpdatableState)\n useEffect(() => {\n if (value !== undefined) {\n setPassValue(value);\n }\n }, [value]);\n\n const isDisable = disabled;\n const isError = !!(errorMessage || error);\n const isFocus = internalState === \"focus\";\n\n const isLeftInputIconShown = !!iconLeft;\n const isRightInputIconShown = !!iconRight;\n\n // Handle checked status (only show if not error)\n const isCheckedShown = checked && !errorMessage;\n // Clear button visibility depends on internal state\n const isExtraClearIconShown = !disabled && extraClear && !!passValue;\n const extrasCount =\n Number(isExtraClearIconShown) +\n Number(isCheckedShown) +\n Number(isRightInputIconShown);\n\n // Resolve Config from Theme\n const sizeStyles = theme.sizing.input(size);\n const inputColors = theme.colors.control.input;\n\n const handleFocus = (e: React.FocusEvent<HTMLInputElement>) => {\n if (!isDisable) {\n setInternalState(\"focus\");\n }\n externalOnFocus?.(e);\n };\n\n const handleBlur = (e: React.FocusEvent<HTMLInputElement>) => {\n if (!isDisable) {\n setInternalState(\"default\");\n }\n externalOnBlur?.(e);\n };\n\n // Match switch-repo handleChange pattern exactly\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n\n // If onChange is provided (controlled mode), call it\n // But ALWAYS update internal state for clear button visibility\n if (onChange) {\n onChange(e);\n }\n if (onChangeText) {\n onChangeText(newValue);\n }\n\n // Always update internal state (this is key for uncontrolled mode in Storybook)\n setPassValue(newValue);\n };\n\n const handleKeyDown = (e: React.KeyboardEvent<HTMLInputElement>) => {\n if (e.key === \"Escape\") {\n e.currentTarget.blur();\n }\n if (onKeyDown) {\n onKeyDown(e);\n }\n };\n\n // Match switch-repo onClear pattern - NO direct DOM manipulation\n const handleClear = (e: React.MouseEvent<HTMLElement>) => {\n e.stopPropagation();\n\n // Update internal state first (this makes the input show empty)\n setPassValue(\"\");\n\n // Call onRemove callback\n onRemove?.();\n\n // Create synthetic change event and call onChange if provided\n if (inputRef.current) {\n // Web-specific: Use the native setter to properly set the value\n // without shadowing the property (only on web platform)\n if (typeof window !== \"undefined\" && window.HTMLInputElement) {\n const nativeInputValueSetter = Object.getOwnPropertyDescriptor(\n window.HTMLInputElement.prototype,\n \"value\"\n )?.set;\n\n if (nativeInputValueSetter) {\n nativeInputValueSetter.call(inputRef.current, \"\");\n }\n }\n\n // Create a proper synthetic event\n const syntheticEvent = {\n target: inputRef.current,\n currentTarget: inputRef.current,\n type: \"change\",\n } as React.ChangeEvent<HTMLInputElement>;\n\n onChange?.(syntheticEvent);\n inputRef.current.focus();\n }\n };\n\n // Resolve background and border colors based on state\n let backgroundColor = backgroundColorProp || inputColors.bg;\n let borderColor = inputColors.border;\n let outlineColor: string | undefined;\n\n if (isDisable) {\n backgroundColor = inputColors.bgDisable;\n borderColor = inputColors.borderDisable;\n } else if (isError) {\n outlineColor = theme.colors.border.alert;\n if (isFocus) {\n backgroundColor = theme.colors.control.focus.bg;\n }\n } else if (isFocus) {\n backgroundColor = theme.colors.control.focus.bg;\n outlineColor = theme.colors.border.brand;\n }\n\n const textColor = isDisable ? inputColors.textDisable : inputColors.text;\n const placeholderColor = inputColors.placeholder;\n\n // Padding values from Figma design\n const paddingConfig = {\n xl: { vertical: 12, horizontal: 12 },\n lg: { vertical: 14, horizontal: 12 },\n md: { vertical: 11, horizontal: 12 },\n sm: { vertical: 7, horizontal: 10 },\n xs: { vertical: 7, horizontal: 10 },\n };\n\n // Border radius from Figma design\n const borderRadiusConfig = {\n xl: 4,\n lg: 4,\n md: 2,\n sm: 2,\n xs: 2,\n };\n\n // Icon sizes from Figma design\n const iconSizeConfig = {\n xl: 18,\n lg: 18,\n md: 18,\n sm: 16,\n xs: 16,\n };\n\n // Focus outline config from Figma design\n const focusOutlineConfig = {\n xl: { width: 2, offset: -2 },\n lg: { width: 2, offset: -2 },\n md: { width: 1, offset: -1 },\n sm: { width: 1, offset: -1 },\n xs: { width: 1, offset: -1 },\n };\n\n const padding = paddingConfig[size];\n const borderRadius = borderRadiusConfig[size];\n const iconSize = iconSizeConfig[size];\n const focusOutline = focusOutlineConfig[size];\n\n return (\n <Box\n flexDirection=\"column\"\n gap={sizeStyles.fieldGap}\n width=\"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 backgroundColor={backgroundColor}\n borderColor={borderColor}\n borderWidth={borderColor !== \"transparent\" ? 1 : 0}\n height={sizeStyles.height}\n paddingVertical={padding.vertical}\n paddingHorizontal={padding.horizontal}\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={10}\n position=\"relative\"\n style={{\n borderTopLeftRadius: borderTopLeftRadiusOverride ?? borderRadius,\n borderTopRightRadius: borderTopRightRadiusOverride ?? borderRadius,\n borderBottomLeftRadius:\n borderBottomLeftRadiusOverride ?? borderRadius,\n borderBottomRightRadius:\n borderBottomRightRadiusOverride ?? borderRadius,\n ...(outlineColor\n ? {\n outline: `${focusOutline.width}px solid ${outlineColor}`,\n outlineOffset: `${focusOutline.offset}px`,\n }\n : {}),\n }}\n hoverStyle={\n !isDisable && !isFocus && !isError\n ? {\n backgroundColor: inputColors.bgHover,\n borderColor: inputColors.borderHover,\n }\n : undefined\n }\n >\n {isLeftInputIconShown && (\n <Box alignItems=\"center\" justifyContent=\"center\">\n <Icon size={iconSize} color={textColor}>\n {iconLeft}\n </Icon>\n </Box>\n )}\n\n <Box flex={1} height=\"100%\" justifyContent=\"center\">\n <InputPrimitive\n ref={inputRef}\n id={inputId}\n value={passValue}\n name={name}\n placeholder={placeholder}\n onChange={handleChange}\n onFocus={handleFocus}\n onBlur={handleBlur}\n onKeyDown={handleKeyDown}\n disabled={isDisable}\n type={type || \"text\"}\n color={textColor}\n fontSize={sizeStyles.fontSize}\n placeholderTextColor={placeholderColor}\n aria-invalid={isError || undefined}\n aria-describedby={errorMessage ? errorId : undefined}\n aria-labelledby={label ? labelId : undefined}\n aria-label={!label ? ariaLabel : undefined}\n aria-disabled={isDisable || undefined}\n data-testid=\"input__field\"\n {...rest}\n />\n </Box>\n\n {/* Right-side Extras Wrapper */}\n {extrasCount > 0 && (\n <Box flexDirection=\"row\" alignItems=\"center\" gap={4}>\n {isExtraClearIconShown && (\n <Box\n as=\"button\"\n type=\"button\"\n alignItems=\"center\"\n justifyContent=\"center\"\n width={iconSize}\n height=\"100%\"\n backgroundColor=\"transparent\"\n borderWidth={0}\n cursor={disabled ? \"not-allowed\" : \"pointer\"}\n onPress={!disabled ? handleClear : undefined}\n disabled={disabled}\n data-testid=\"input__extra-clear-button\"\n >\n <Icon size={iconSize} color={textColor}>\n <X />\n </Icon>\n </Box>\n )}\n {isCheckedShown && (\n <Box\n alignItems=\"center\"\n justifyContent=\"center\"\n width={iconSize}\n height=\"100%\"\n >\n <Icon\n size={iconSize}\n color={theme.colors.content.success.primary}\n >\n {checkedIcon}\n </Icon>\n </Box>\n )}\n {isRightInputIconShown && (\n <Box alignItems=\"center\" justifyContent=\"center\">\n <Icon size={iconRightSize || iconSize} color={textColor}>\n {iconRight}\n </Icon>\n </Box>\n )}\n </Box>\n )}\n </Box>\n\n {errorMessage && (\n <Text\n id={errorId}\n role=\"alert\"\n color={theme.colors.content.alert.primary}\n fontSize={sizeStyles.fontSize - 2}\n style={{ lineHeight: sizeStyles.lineHeight + \"px\" }}\n >\n {errorMessage}\n </Text>\n )}\n </Box>\n );\n }\n);\n\nInput.displayName = \"Input\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","import React from \"react\";\nimport { Text as RNText, TextStyle, AccessibilityRole } from \"react-native\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\n// Map web roles to React Native accessibility roles\nconst roleMap: Record<string, AccessibilityRole> = {\n alert: \"alert\",\n heading: \"header\",\n button: \"button\",\n link: \"link\",\n text: \"text\",\n};\n\nexport const Text: React.FC<TextProps> = ({\n children,\n color,\n fontSize,\n fontWeight,\n fontFamily,\n id,\n role,\n ...props\n}) => {\n // Extract the first font name from a comma-separated list (e.g. for web-style font stacks)\n let resolvedFontFamily = fontFamily\n ? fontFamily.split(\",\")[0].replace(/['\"]/g, \"\").trim()\n : undefined;\n\n // On native, if we don't have the custom font loaded, it's better to use the system font\n // to avoid rendering issues or missing text.\n if (resolvedFontFamily === \"Pilat Wide Bold\") {\n resolvedFontFamily = undefined;\n }\n\n const style: TextStyle = {\n color,\n fontSize: typeof fontSize === \"number\" ? fontSize : undefined,\n fontWeight: fontWeight as TextStyle[\"fontWeight\"],\n fontFamily: resolvedFontFamily,\n textDecorationLine: props.textDecoration as TextStyle[\"textDecorationLine\"],\n };\n\n // Map role to React Native accessibilityRole\n const accessibilityRole = role ? roleMap[role] : undefined;\n\n return (\n <RNText style={style} testID={id} accessibilityRole={accessibilityRole}>\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, { 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 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 },\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 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 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 || 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"],"mappings":";AAAA,OAAOA;AAAA,EACL;AAAA,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AAAA,cAChC,OAAO,EAAE,YAAY,WAAW,aAAa,KAAK;AAAA,cAEjD;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,MAAM,cAAc;","names":["React","forwardRef","jsx","View","jsx","jsx","jsx","forwardRef","React"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-input",
3
- "version": "0.89.0",
3
+ "version": "0.91.0",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -13,9 +13,9 @@
13
13
  "test:coverage": "vitest run --coverage"
14
14
  },
15
15
  "dependencies": {
16
- "@xsolla/xui-core": "0.89.0",
17
- "@xsolla/xui-icons": "0.89.0",
18
- "@xsolla/xui-primitives-core": "0.89.0"
16
+ "@xsolla/xui-core": "0.91.0",
17
+ "@xsolla/xui-icons": "0.91.0",
18
+ "@xsolla/xui-primitives-core": "0.91.0"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "react": ">=16.8.0",
@@ -32,6 +32,7 @@
32
32
  "vitest": "^4.0.18"
33
33
  },
34
34
  "license": "MIT",
35
+ "sideEffects": false,
35
36
  "react-native": "./native/index.js",
36
37
  "exports": {
37
38
  ".": {