@xsolla/xui-input-payment 0.131.0 → 0.133.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-input-payment",
3
- "version": "0.131.0",
3
+ "version": "0.133.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.131.0",
17
- "@xsolla/xui-icons-payment": "0.131.0",
18
- "@xsolla/xui-primitives-core": "0.131.0"
16
+ "@xsolla/xui-core": "0.133.0",
17
+ "@xsolla/xui-icons-payment": "0.133.0",
18
+ "@xsolla/xui-primitives-core": "0.133.0"
19
19
  },
20
20
  "peerDependencies": {
21
21
  "react": ">=16.8.0",
package/web/index.js CHANGED
@@ -35,13 +35,120 @@ __export(index_exports, {
35
35
  module.exports = __toCommonJS(index_exports);
36
36
 
37
37
  // src/InputPayment.tsx
38
- var import_react3 = __toESM(require("react"));
38
+ var import_react4 = __toESM(require("react"));
39
39
 
40
40
  // ../primitives-web/src/Box.tsx
41
- var import_react = __toESM(require("react"));
41
+ var import_react2 = __toESM(require("react"));
42
42
  var import_styled_components = __toESM(require("styled-components"));
43
+
44
+ // ../primitives-web/src/filterDOMProps.ts
45
+ var import_react = __toESM(require("react"));
46
+ var NON_HTML_PROPS = /* @__PURE__ */ new Set([
47
+ // BoxProps — layout & styling
48
+ "backgroundColor",
49
+ "borderColor",
50
+ "borderWidth",
51
+ "borderBottomWidth",
52
+ "borderBottomColor",
53
+ "borderTopWidth",
54
+ "borderTopColor",
55
+ "borderLeftWidth",
56
+ "borderLeftColor",
57
+ "borderRightWidth",
58
+ "borderRightColor",
59
+ "borderRadius",
60
+ "borderStyle",
61
+ "flexDirection",
62
+ "flexWrap",
63
+ "alignItems",
64
+ "justifyContent",
65
+ "alignSelf",
66
+ "flex",
67
+ "flexShrink",
68
+ "gap",
69
+ "position",
70
+ "top",
71
+ "bottom",
72
+ "left",
73
+ "right",
74
+ "outline",
75
+ "overflow",
76
+ "overflowX",
77
+ "overflowY",
78
+ "zIndex",
79
+ "cursor",
80
+ "padding",
81
+ "paddingHorizontal",
82
+ "paddingVertical",
83
+ "paddingTop",
84
+ "paddingBottom",
85
+ "paddingLeft",
86
+ "paddingRight",
87
+ "margin",
88
+ "marginTop",
89
+ "marginBottom",
90
+ "marginLeft",
91
+ "marginRight",
92
+ "minWidth",
93
+ "minHeight",
94
+ "maxWidth",
95
+ "maxHeight",
96
+ "hoverStyle",
97
+ "pressStyle",
98
+ "focusStyle",
99
+ "outlineColor",
100
+ "outlineWidth",
101
+ "outlineOffset",
102
+ "outlineStyle",
103
+ // BoxProps — RN-only
104
+ "onPress",
105
+ "onLayout",
106
+ "onMoveShouldSetResponder",
107
+ "onResponderGrant",
108
+ "onResponderMove",
109
+ "onResponderRelease",
110
+ "onResponderTerminate",
111
+ "testID",
112
+ // Box — custom element type
113
+ "elementType",
114
+ // TextProps
115
+ "fontSize",
116
+ "fontWeight",
117
+ "fontFamily",
118
+ "lineHeight",
119
+ "whiteSpace",
120
+ "textAlign",
121
+ "textDecoration",
122
+ "numberOfLines",
123
+ "letterSpacing",
124
+ "textTransform",
125
+ // SpinnerProps
126
+ "strokeWidth",
127
+ // DividerProps
128
+ "vertical",
129
+ "dashStroke"
130
+ ]);
131
+ function createFilteredElement(defaultTag) {
132
+ const Component = import_react.default.forwardRef(
133
+ ({ children, elementType, ...props }, ref) => {
134
+ const Tag = elementType || defaultTag;
135
+ const htmlProps = {};
136
+ for (const key of Object.keys(props)) {
137
+ if (!NON_HTML_PROPS.has(key)) {
138
+ htmlProps[key] = props[key];
139
+ }
140
+ }
141
+ return import_react.default.createElement(Tag, { ref, ...htmlProps }, children);
142
+ }
143
+ );
144
+ Component.displayName = `Filtered(${defaultTag})`;
145
+ return Component;
146
+ }
147
+
148
+ // ../primitives-web/src/Box.tsx
43
149
  var import_jsx_runtime = require("react/jsx-runtime");
44
- var StyledBox = import_styled_components.default.div`
150
+ var FilteredDiv = createFilteredElement("div");
151
+ var StyledBox = (0, import_styled_components.default)(FilteredDiv)`
45
152
  display: flex;
46
153
  box-sizing: border-box;
47
154
  background-color: ${(props) => props.backgroundColor || "transparent"};
@@ -128,7 +235,7 @@ var StyledBox = import_styled_components.default.div`
128
235
  ${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
129
236
  }
130
237
  `;
131
- var Box = import_react.default.forwardRef(
238
+ var Box = import_react2.default.forwardRef(
132
239
  ({
133
240
  children,
134
241
  onPress,
@@ -180,7 +287,7 @@ var Box = import_react.default.forwardRef(
180
287
  StyledBox,
181
288
  {
182
289
  ref,
183
- as,
290
+ elementType: as,
184
291
  id,
185
292
  type: as === "button" ? type || "button" : void 0,
186
293
  disabled: as === "button" ? disabled : void 0,
@@ -211,7 +318,8 @@ Box.displayName = "Box";
211
318
  // ../primitives-web/src/Text.tsx
212
319
  var import_styled_components2 = __toESM(require("styled-components"));
213
320
  var import_jsx_runtime2 = require("react/jsx-runtime");
214
- var StyledText = import_styled_components2.default.span`
321
+ var FilteredSpan = createFilteredElement("span");
322
+ var StyledText = (0, import_styled_components2.default)(FilteredSpan)`
215
323
  color: ${(props) => props.color || "inherit"};
216
324
  font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
217
325
  font-weight: ${(props) => props.fontWeight || "normal"};
@@ -242,7 +350,7 @@ var Text = ({
242
350
  };
243
351
 
244
352
  // ../primitives-web/src/Input.tsx
245
- var import_react2 = require("react");
353
+ var import_react3 = require("react");
246
354
  var import_styled_components3 = __toESM(require("styled-components"));
247
355
  var import_jsx_runtime3 = require("react/jsx-runtime");
248
356
  var StyledInput = import_styled_components3.default.input`
@@ -276,7 +384,7 @@ var StyledInput = import_styled_components3.default.input`
276
384
  -webkit-text-fill-color: ${(props) => props.color || "inherit"} !important;
277
385
  }
278
386
  `;
279
- var InputPrimitive = (0, import_react2.forwardRef)(
387
+ var InputPrimitive = (0, import_react3.forwardRef)(
280
388
  ({
281
389
  value,
282
390
  placeholder,
@@ -415,15 +523,15 @@ var detectPaymentSystem = (cardNumber) => {
415
523
  };
416
524
  var CARD_GAP = 4;
417
525
  var PaymentIcons = ({ possiblePayments, maxVisible, recognizedPayment, iconHeight }) => {
418
- const [cyclingIndex, setCyclingIndex] = (0, import_react3.useState)(0);
419
- const [isTransitioning, setIsTransitioning] = (0, import_react3.useState)(false);
420
- const [isRecognized, setIsRecognized] = (0, import_react3.useState)(false);
526
+ const [cyclingIndex, setCyclingIndex] = (0, import_react4.useState)(0);
527
+ const [isTransitioning, setIsTransitioning] = (0, import_react4.useState)(false);
528
+ const [isRecognized, setIsRecognized] = (0, import_react4.useState)(false);
421
529
  const scaledCardHeight = iconHeight;
422
530
  const scaledCardWidth = Math.round(iconHeight * (4 / 3));
423
531
  const scaledGap = CARD_GAP;
424
532
  const constantCards = possiblePayments.slice(0, maxVisible - 1);
425
533
  const cyclingCards = possiblePayments.slice(maxVisible - 1);
426
- (0, import_react3.useEffect)(() => {
534
+ (0, import_react4.useEffect)(() => {
427
535
  if (recognizedPayment) {
428
536
  setIsRecognized(true);
429
537
  } else {
@@ -433,7 +541,7 @@ var PaymentIcons = ({ possiblePayments, maxVisible, recognizedPayment, iconHeigh
433
541
  return () => clearTimeout(timeout);
434
542
  }
435
543
  }, [recognizedPayment]);
436
- (0, import_react3.useEffect)(() => {
544
+ (0, import_react4.useEffect)(() => {
437
545
  if (cyclingCards.length <= 1 || recognizedPayment) return;
438
546
  const interval = setInterval(() => {
439
547
  setIsTransitioning(true);
@@ -563,7 +671,7 @@ var PaymentIcons = ({ possiblePayments, maxVisible, recognizedPayment, iconHeigh
563
671
  }
564
672
  );
565
673
  };
566
- var InputPayment = (0, import_react3.forwardRef)(
674
+ var InputPayment = (0, import_react4.forwardRef)(
567
675
  ({
568
676
  value,
569
677
  icon,
@@ -589,27 +697,27 @@ var InputPayment = (0, import_react3.forwardRef)(
589
697
  ...rest
590
698
  }, ref) => {
591
699
  const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
592
- const [internalState, setInternalState] = (0, import_react3.useState)(
700
+ const [internalState, setInternalState] = (0, import_react4.useState)(
593
701
  "default"
594
702
  );
595
- const [passValue, setPassValue] = (0, import_react3.useState)(value ?? "");
596
- const [detectedPayment, setDetectedPayment] = (0, import_react3.useState)(null);
597
- const inputRef = (0, import_react3.useRef)(null);
703
+ const [passValue, setPassValue] = (0, import_react4.useState)(value ?? "");
704
+ const [detectedPayment, setDetectedPayment] = (0, import_react4.useState)(null);
705
+ const inputRef = (0, import_react4.useRef)(null);
598
706
  const rawId = (0, import_xui_core.useId)();
599
707
  const safeId = rawId.replace(/:/g, "");
600
708
  const inputId = providedId || `input-payment-${safeId}`;
601
709
  const errorId = `${inputId}-error`;
602
- import_react3.default.useImperativeHandle(
710
+ import_react4.default.useImperativeHandle(
603
711
  ref,
604
712
  () => inputRef.current,
605
713
  []
606
714
  );
607
- (0, import_react3.useEffect)(() => {
715
+ (0, import_react4.useEffect)(() => {
608
716
  if (value !== void 0) {
609
717
  setPassValue(value);
610
718
  }
611
719
  }, [value]);
612
- (0, import_react3.useEffect)(() => {
720
+ (0, import_react4.useEffect)(() => {
613
721
  if (autoDetect && passValue) {
614
722
  const detected = detectPaymentSystem(passValue);
615
723
  const validDetected = detected && possiblePayments.includes(detected) ? detected : null;
@@ -746,7 +854,7 @@ var InputPayment = (0, import_react3.forwardRef)(
746
854
  justifyContent: "center",
747
855
  role: "img",
748
856
  "aria-hidden": true,
749
- children: import_react3.default.isValidElement(icon) ? import_react3.default.cloneElement(
857
+ children: import_react4.default.isValidElement(icon) ? import_react4.default.cloneElement(
750
858
  icon,
751
859
  {
752
860
  size: iconSize,
package/web/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.tsx","../../src/InputPayment.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/Text.tsx","../../../primitives-web/src/Input.tsx"],"sourcesContent":["export * from \"./InputPayment\";\n","import React, {\n useState,\n forwardRef,\n useRef,\n useEffect,\n type InputHTMLAttributes,\n type ReactNode,\n} from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, InputPrimitive } from \"@xsolla/xui-primitives\";\nimport {\n useResolvedTheme,\n useId,\n isWeb,\n type ThemeOverrideProps,\n} from \"@xsolla/xui-core\";\nimport {\n Visa,\n Mastercard,\n Maestro,\n AmericanExpress,\n Dinersclub,\n Discover,\n Jcb,\n Unionpay,\n Aura,\n CartesBancaires,\n Cirrus,\n Dankort,\n Elo,\n Hipercard,\n Mir,\n Naranja,\n Paypal,\n Sodexo,\n Uatp,\n type PaymentIconProps,\n} from \"@xsolla/xui-icons-payment\";\n\n/**\n * Supported payment system keys\n */\nexport type PaymentSystemKey =\n | \"visa\"\n | \"mastercard\"\n | \"amex\"\n | \"diners\"\n | \"maestro\"\n | \"unionpay\"\n | \"discover\"\n | \"jcb\"\n | \"aura\"\n | \"cartesbancaires\"\n | \"cirrus\"\n | \"dankort\"\n | \"elo\"\n | \"hipercard\"\n | \"mir\"\n | \"naranja\"\n | \"paypal\"\n | \"sodexo\"\n | \"uatp\";\n\n/**\n * Default payment systems to display\n */\nconst DEFAULT_POSSIBLE_PAYMENTS: PaymentSystemKey[] = [\n \"mastercard\",\n \"visa\",\n \"maestro\",\n \"diners\",\n \"amex\",\n \"discover\",\n \"jcb\",\n \"unionpay\",\n];\n\nexport interface InputPaymentProps\n extends\n Omit<InputHTMLAttributes<HTMLInputElement>, \"size\" | \"onChange\">,\n ThemeOverrideProps {\n /**\n * Property for specifying the value of the control.\n */\n value?: string;\n /**\n * Property to display the icon to the left of the content.\n */\n icon?: ReactNode;\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 specifying the name of the control.\n */\n name?: string;\n /**\n * Property for disabling the control and highlighting it as an inactive state.\n */\n disabled?: boolean;\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 specify the possible payment systems displayed on the right.\n */\n possiblePayments?: PaymentSystemKey[];\n /**\n * Property to set the maximum number of visible possible payment systems at the same time on the right side of the input.\n */\n maxVisiblePossiblePayments?: number;\n /**\n * Property to show the recognized payment system (all possible payment systems are hidden and only the current one passed by this prop is displayed).\n */\n recognizedPayment?: PaymentSystemKey;\n /**\n * Callback when card type is auto-detected from the input value.\n */\n onRecognizedPaymentChange?: (payment: PaymentSystemKey | null) => void;\n /**\n * Property to enable automatic payment system detection from input value.\n */\n autoDetect?: boolean;\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 * Test identifier for the component.\n */\n testID?: string;\n}\n\n// Map payment system keys to icon components\nconst paymentIconComponents: Record<\n PaymentSystemKey,\n React.FC<PaymentIconProps>\n> = {\n visa: Visa,\n mastercard: Mastercard,\n maestro: Maestro,\n amex: AmericanExpress,\n diners: Dinersclub,\n discover: Discover,\n jcb: Jcb,\n unionpay: Unionpay,\n aura: Aura,\n cartesbancaires: CartesBancaires,\n cirrus: Cirrus,\n dankort: Dankort,\n elo: Elo,\n hipercard: Hipercard,\n mir: Mir,\n naranja: Naranja,\n paypal: Paypal,\n sodexo: Sodexo,\n uatp: Uatp,\n};\n\n/**\n * Detects payment system from card number using BIN ranges.\n * Order matters - more specific patterns should come before general ones.\n */\nconst detectPaymentSystem = (cardNumber: string): PaymentSystemKey | null => {\n const cleanNumber = cardNumber.replace(/\\s/g, \"\");\n\n if (!cleanNumber) return null;\n\n // UATP: starts with 1\n if (/^1/.test(cleanNumber)) return \"uatp\";\n\n // Mir: 2200-2204\n if (/^220[0-4]/.test(cleanNumber)) return \"mir\";\n\n // Amex: 34, 37\n if (/^3[47]/.test(cleanNumber)) return \"amex\";\n\n // Diners Club: 300-305, 36, 38\n if (/^3(?:0[0-5]|[68])/.test(cleanNumber)) return \"diners\";\n\n // JCB: 3528-3589\n if (/^35(?:2[89]|[3-8])/.test(cleanNumber)) return \"jcb\";\n\n // Elo: specific BIN ranges (must check before Visa/Mastercard due to overlapping ranges)\n if (\n /^(401178|401179|431274|438935|451416|457393|457631|457632|504175|506699|5067[0-9]{2}|509[0-9]{3}|627780|636297|636368|650[0-9]{3}|651[0-9]{3}|655[0-9]{3})/.test(\n cleanNumber\n )\n )\n return \"elo\";\n\n // Visa: starts with 4\n if (/^4/.test(cleanNumber)) return \"visa\";\n\n // Hipercard: 606282, 637095, 637568, 637599, 637609, 637612\n if (/^(606282|637095|637568|637599|637609|637612)/.test(cleanNumber))\n return \"hipercard\";\n\n // Aura: 507860\n if (/^507860/.test(cleanNumber)) return \"aura\";\n\n // Dankort: 5019\n if (/^5019/.test(cleanNumber)) return \"dankort\";\n\n // Naranja: 589562\n if (/^589562/.test(cleanNumber)) return \"naranja\";\n\n // Mastercard: 51-55 or 2221-2720\n // For 51-55 range\n if (/^5[1-5]/.test(cleanNumber)) return \"mastercard\";\n // For 2221-2720 range (need 4+ digits for accurate detection)\n if (\n cleanNumber.length >= 4 &&\n /^(?:222[1-9]|22[3-9]\\d|2[3-6]\\d{2}|27[01]\\d|2720)/.test(cleanNumber)\n )\n return \"mastercard\";\n\n // Discover: 6011, 622126-622925, 644-649, 65\n if (/^(?:6011|65|64[4-9])/.test(cleanNumber)) return \"discover\";\n // For 622126-622925 range (need 6+ digits for accurate detection)\n if (\n cleanNumber.length >= 6 &&\n /^(?:6221(?:2[6-9]|[3-9]\\d)|622[2-8]\\d{2}|6229(?:[01]\\d|2[0-5]))/.test(\n cleanNumber\n )\n )\n return \"discover\";\n\n // UnionPay: 62 (but not 622126-622925 which is Discover)\n if (/^62/.test(cleanNumber)) return \"unionpay\";\n\n // Maestro: 50, 56-69 (catch-all for remaining 5x and 6x ranges)\n if (/^(?:5[06-9]|6)/.test(cleanNumber)) return \"maestro\";\n\n return null;\n};\n\n// Card icon dimensions (4:3 aspect ratio)\nconst CARD_GAP = 4;\n\n/**\n * Payment card icons component with sliding animation\n */\nconst PaymentIcons: React.FC<{\n possiblePayments: PaymentSystemKey[];\n maxVisible: number;\n recognizedPayment?: PaymentSystemKey | null;\n iconHeight: number;\n}> = ({ possiblePayments, maxVisible, recognizedPayment, iconHeight }) => {\n const [cyclingIndex, setCyclingIndex] = useState(0);\n const [isTransitioning, setIsTransitioning] = useState(false);\n const [isRecognized, setIsRecognized] = useState(false);\n\n // Scale factor based on size (icons use 4:3 aspect ratio)\n const scaledCardHeight = iconHeight;\n const scaledCardWidth = Math.round(iconHeight * (4 / 3));\n const scaledGap = CARD_GAP;\n\n // Calculate which cards to show in cycling position\n const constantCards = possiblePayments.slice(0, maxVisible - 1);\n const cyclingCards = possiblePayments.slice(maxVisible - 1);\n\n // Handle recognized payment animation\n useEffect(() => {\n if (recognizedPayment) {\n setIsRecognized(true);\n } else {\n // Small delay before showing all cards again\n const timeout = setTimeout(() => {\n setIsRecognized(false);\n }, 50);\n return () => clearTimeout(timeout);\n }\n }, [recognizedPayment]);\n\n // Cycle through remaining cards\n useEffect(() => {\n if (cyclingCards.length <= 1 || recognizedPayment) return;\n\n const interval = setInterval(() => {\n setIsTransitioning(true);\n setTimeout(() => {\n setCyclingIndex((prev) => (prev + 1) % cyclingCards.length);\n setIsTransitioning(false);\n }, 150);\n }, 2000);\n\n return () => clearInterval(interval);\n }, [cyclingCards.length, recognizedPayment]);\n\n // Human-readable labels for payment systems\n const paymentLabels: Record<PaymentSystemKey, string> = {\n mastercard: \"Mastercard\",\n visa: \"Visa\",\n maestro: \"Maestro\",\n diners: \"Diners Club\",\n amex: \"American Express\",\n discover: \"Discover\",\n jcb: \"JCB\",\n unionpay: \"UnionPay\",\n aura: \"Aura\",\n cartesbancaires: \"Cartes Bancaires\",\n cirrus: \"Cirrus\",\n dankort: \"Dankort\",\n elo: \"Elo\",\n hipercard: \"Hipercard\",\n mir: \"Mir\",\n naranja: \"Naranja\",\n paypal: \"PayPal\",\n sodexo: \"Sodexo\",\n uatp: \"UATP\",\n };\n\n // Build aria label from possible payments\n const getAriaLabel = () => {\n if (recognizedPayment) {\n return `Recognized payment: ${paymentLabels[recognizedPayment]}`;\n }\n return `Accepted payment cards: ${possiblePayments\n .map((key) => paymentLabels[key])\n .join(\", \")}`;\n };\n\n // Calculate total width for the container\n const totalVisibleCards = Math.min(possiblePayments.length, maxVisible);\n const containerWidth =\n totalVisibleCards * scaledCardWidth + (totalVisibleCards - 1) * scaledGap;\n\n return (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n role=\"img\"\n aria-label={getAriaLabel()}\n position=\"relative\"\n width={containerWidth}\n height={scaledCardHeight}\n style={{ overflow: \"hidden\" }}\n >\n {/* All constant cards */}\n {constantCards.map((key, index) => {\n const IconComponent = paymentIconComponents[key];\n const isRecognizedCard = recognizedPayment === key;\n\n // Calculate slide offset when recognized\n // Cards should slide to the right, except the recognized one\n let translateX = 0;\n let opacity = 1;\n\n if (isRecognized && recognizedPayment) {\n if (isRecognizedCard) {\n // Move recognized card to the rightmost position\n const targetPosition =\n (totalVisibleCards - 1) * (scaledCardWidth + scaledGap);\n const currentPosition = index * (scaledCardWidth + scaledGap);\n translateX = targetPosition - currentPosition;\n opacity = 1;\n } else {\n // Slide non-recognized cards to the right and fade out\n translateX = containerWidth;\n opacity = 0;\n }\n }\n\n return (\n <Box\n key={key}\n position=\"absolute\"\n left={index * (scaledCardWidth + scaledGap)}\n style={{\n transform: isWeb ? `translateX(${translateX}px)` : undefined,\n opacity,\n ...(isWeb && {\n transition: \"transform 300ms ease-out, opacity 300ms ease-out\",\n }),\n }}\n >\n <IconComponent size={scaledCardHeight} />\n </Box>\n );\n })}\n\n {/* Cycling position */}\n {cyclingCards.length > 0 && (\n <Box\n position=\"absolute\"\n left={(maxVisible - 1) * (scaledCardWidth + scaledGap)}\n width={scaledCardWidth}\n height={scaledCardHeight}\n >\n {cyclingCards.map((key, index) => {\n const IconComponent = paymentIconComponents[key];\n const isCurrentCycling = index === cyclingIndex;\n const isRecognizedCard = recognizedPayment === key;\n\n let translateX = 0;\n let opacity = isCurrentCycling && !isTransitioning ? 1 : 0;\n\n if (isRecognized && recognizedPayment) {\n if (isRecognizedCard) {\n // Keep in place, fully visible\n opacity = 1;\n } else {\n // Slide out to the right\n translateX = containerWidth;\n opacity = 0;\n }\n }\n\n return (\n <Box\n key={key}\n position=\"absolute\"\n top={0}\n left={0}\n style={{\n transform: isWeb ? `translateX(${translateX}px)` : undefined,\n opacity,\n ...(isWeb && {\n transition: isRecognized\n ? \"transform 300ms ease-out, opacity 300ms ease-out\"\n : \"opacity 150ms ease-in-out\",\n }),\n }}\n >\n <IconComponent size={scaledCardHeight} />\n </Box>\n );\n })}\n </Box>\n )}\n </Box>\n );\n};\n\nexport const InputPayment = forwardRef<HTMLInputElement, InputPaymentProps>(\n (\n {\n value,\n icon,\n placeholder = \"Card number\",\n onChange,\n onChangeText,\n onKeyDown,\n size = \"md\",\n name,\n disabled = false,\n errorMessage,\n error,\n possiblePayments = DEFAULT_POSSIBLE_PAYMENTS,\n maxVisiblePossiblePayments = 5,\n recognizedPayment: controlledRecognizedPayment,\n onRecognizedPaymentChange,\n autoDetect = true,\n id: providedId,\n \"aria-label\": ariaLabel,\n testID,\n themeMode,\n themeProductContext,\n ...rest\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const [internalState, setInternalState] = useState<\"default\" | \"focus\">(\n \"default\"\n );\n const [passValue, setPassValue] = useState(value ?? \"\");\n const [detectedPayment, setDetectedPayment] =\n useState<PaymentSystemKey | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Generate unique IDs for accessibility\n const rawId = useId();\n const safeId = rawId.replace(/:/g, \"\");\n const inputId = providedId || `input-payment-${safeId}`;\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\n useEffect(() => {\n if (value !== undefined) {\n setPassValue(value);\n }\n }, [value]);\n\n // Auto-detect payment system when value changes\n // Only detect cards that are in the possiblePayments list\n useEffect(() => {\n if (autoDetect && passValue) {\n const detected = detectPaymentSystem(passValue);\n // Only use the detected payment if it's in possiblePayments\n const validDetected =\n detected && possiblePayments.includes(detected) ? detected : null;\n setDetectedPayment(validDetected);\n onRecognizedPaymentChange?.(validDetected);\n } else if (!passValue) {\n setDetectedPayment(null);\n if (autoDetect) {\n onRecognizedPaymentChange?.(null);\n }\n }\n }, [passValue, autoDetect, onRecognizedPaymentChange, possiblePayments]);\n\n const isDisable = disabled;\n const isError = !!(errorMessage || error);\n const isFocus = internalState === \"focus\";\n\n // Determine which payment to display\n const displayRecognizedPayment =\n controlledRecognizedPayment ?? detectedPayment;\n\n // Resolve Config from Theme\n const sizeStyles = theme.sizing.input(size);\n const inputColors = theme.colors.control.input;\n\n const handleFocus = () => {\n if (!isDisable) {\n setInternalState(\"focus\");\n }\n };\n\n const handleBlur = () => {\n if (!isDisable) {\n setInternalState(\"default\");\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n\n if (onChange) {\n onChange(e);\n }\n if (onChangeText) {\n onChangeText(newValue);\n }\n\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 // Resolve background and border colors based on state\n let backgroundColor = 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 const iconColor = inputColors.placeholder;\n\n // Padding values from Figma design\n const paddingConfig: Record<\n string,\n { vertical: number; horizontal: number }\n > = {\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: Record<string, number> = {\n xl: 8,\n lg: 8,\n md: 8,\n sm: 4,\n xs: 4,\n };\n\n // Icon sizes from Figma design\n const iconSizeConfig: Record<string, number> = {\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: Record<\n string,\n { width: number; offset: number }\n > = {\n xl: { width: 1, offset: -1 },\n lg: { width: 1, offset: -1 },\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 <Box\n backgroundColor={backgroundColor}\n borderColor={borderColor}\n borderWidth={borderColor !== \"transparent\" ? 1 : 0}\n borderRadius={borderRadius}\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 ...(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 {icon && (\n <Box\n alignItems=\"center\"\n justifyContent=\"center\"\n role=\"img\"\n aria-hidden={true}\n >\n {React.isValidElement(icon)\n ? React.cloneElement(\n icon as React.ReactElement<{\n size?: number;\n color?: string;\n }>,\n {\n size: iconSize,\n color: iconColor,\n }\n )\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=\"text\"\n inputMode=\"numeric\"\n autoComplete=\"off\"\n color={textColor}\n fontSize={sizeStyles.fontSize}\n placeholderTextColor={placeholderColor}\n aria-invalid={isError || undefined}\n aria-describedby={errorMessage ? errorId : undefined}\n aria-label={ariaLabel || \"Card number\"}\n aria-disabled={isDisable || undefined}\n data-testid=\"input-payment__field\"\n {...rest}\n />\n </Box>\n\n {possiblePayments.length > 0 && (\n <Box\n alignItems=\"center\"\n justifyContent=\"center\"\n data-testid=\"input-payment__card-icons\"\n style={{ overflow: \"hidden\" }}\n >\n <PaymentIcons\n possiblePayments={possiblePayments}\n maxVisible={maxVisiblePossiblePayments}\n recognizedPayment={displayRecognizedPayment}\n iconHeight={iconSize}\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 >\n {errorMessage}\n </Text>\n )}\n </Box>\n );\n }\n);\n\nInputPayment.displayName = \"InputPayment\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledBox = styled.div<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n overflow: ${(props) => props.overflow || \"visible\"};\n overflow-x: ${(props) => props.overflowX || \"visible\"};\n overflow-y: ${(props) => props.overflowY || \"visible\"};\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n &:hover {\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-current\": ariaCurrent,\n \"aria-disabled\": ariaDisabled,\n \"aria-live\": ariaLive,\n \"aria-busy\": ariaBusy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n type,\n disabled,\n id,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n as={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledText = styled.span<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n","import React, { forwardRef } from \"react\";\nimport styled from \"styled-components\";\nimport { InputPrimitiveProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledInput = styled.input<InputPrimitiveProps>`\n background: transparent;\n border: none;\n outline: none;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-family: inherit;\n text-align: inherit;\n\n &::placeholder {\n color: ${(props) =>\n props.placeholderTextColor || \"rgba(255, 255, 255, 0.5)\"};\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n\n /* Override browser autofill background */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 1000px transparent inset !important;\n -webkit-background-clip: text !important;\n -webkit-text-fill-color: ${(props) => props.color || \"inherit\"} !important;\n }\n`;\n\nexport const InputPrimitive = forwardRef<HTMLInputElement, 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 name,\n type,\n inputMode,\n autoComplete,\n id,\n \"aria-invalid\": ariaInvalid,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel,\n \"aria-disabled\": ariaDisabled,\n \"data-testid\": dataTestId,\n ...rest\n },\n ref\n ) => {\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (onChange) {\n onChange(e);\n }\n if (onChangeText) {\n onChangeText(e.target.value);\n }\n };\n\n // Always pass value to make it a controlled input\n const inputValue = value !== undefined ? value : \"\";\n\n return (\n <StyledInput\n ref={ref}\n id={id}\n value={inputValue}\n name={name}\n placeholder={placeholder}\n onChange={handleChange}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n disabled={disabled}\n type={secureTextEntry ? \"password\" : type || \"text\"}\n inputMode={inputMode}\n autoComplete={autoComplete}\n style={style}\n color={color}\n fontSize={fontSize}\n placeholderTextColor={placeholderTextColor}\n maxLength={maxLength}\n aria-invalid={ariaInvalid}\n aria-describedby={ariaDescribedBy}\n aria-labelledby={ariaLabelledBy}\n aria-label={ariaLabel}\n aria-disabled={ariaDisabled}\n data-testid={dataTestId}\n {...rest}\n />\n );\n }\n);\n\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AA,oBAC5B,eAAY;AAAA,oBACX,GAAG;AAAA;AAAA,gBACN,GACF;AAAA,gBAEC,iBAAiB,SAAS,KACzB;AAAA,kBAAC;AAAA;AAAA,oBACC,YAAW;AAAA,oBACX,gBAAe;AAAA,oBACf,eAAY;AAAA,oBACZ,OAAO,EAAE,UAAU,SAAS;AAAA,oBAE5B;AAAA,sBAAC;AAAA;AAAA,wBACC;AAAA,wBACA,YAAY;AAAA,wBACZ,mBAAmB;AAAA,wBACnB,YAAY;AAAA;AAAA,oBACd;AAAA;AAAA,gBACF;AAAA;AAAA;AAAA,UAEJ;AAAA,UAEC,gBACC;AAAA,YAAC;AAAA;AAAA,cACC,IAAI;AAAA,cACJ,MAAK;AAAA,cACL,OAAO,MAAM,OAAO,QAAQ,MAAM;AAAA,cAClC,UAAU,WAAW,WAAW;AAAA,cAE/B;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;","names":["import_react","styled","React","import_styled_components","import_jsx_runtime","styled","import_react","import_styled_components","import_jsx_runtime","styled","import_jsx_runtime","React"]}
1
+ {"version":3,"sources":["../../src/index.tsx","../../src/InputPayment.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/filterDOMProps.ts","../../../primitives-web/src/Text.tsx","../../../primitives-web/src/Input.tsx"],"sourcesContent":["export * from \"./InputPayment\";\n","import React, {\n useState,\n forwardRef,\n useRef,\n useEffect,\n type InputHTMLAttributes,\n type ReactNode,\n} from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, InputPrimitive } from \"@xsolla/xui-primitives\";\nimport {\n useResolvedTheme,\n useId,\n isWeb,\n type ThemeOverrideProps,\n} from \"@xsolla/xui-core\";\nimport {\n Visa,\n Mastercard,\n Maestro,\n AmericanExpress,\n Dinersclub,\n Discover,\n Jcb,\n Unionpay,\n Aura,\n CartesBancaires,\n Cirrus,\n Dankort,\n Elo,\n Hipercard,\n Mir,\n Naranja,\n Paypal,\n Sodexo,\n Uatp,\n type PaymentIconProps,\n} from \"@xsolla/xui-icons-payment\";\n\n/**\n * Supported payment system keys\n */\nexport type PaymentSystemKey =\n | \"visa\"\n | \"mastercard\"\n | \"amex\"\n | \"diners\"\n | \"maestro\"\n | \"unionpay\"\n | \"discover\"\n | \"jcb\"\n | \"aura\"\n | \"cartesbancaires\"\n | \"cirrus\"\n | \"dankort\"\n | \"elo\"\n | \"hipercard\"\n | \"mir\"\n | \"naranja\"\n | \"paypal\"\n | \"sodexo\"\n | \"uatp\";\n\n/**\n * Default payment systems to display\n */\nconst DEFAULT_POSSIBLE_PAYMENTS: PaymentSystemKey[] = [\n \"mastercard\",\n \"visa\",\n \"maestro\",\n \"diners\",\n \"amex\",\n \"discover\",\n \"jcb\",\n \"unionpay\",\n];\n\nexport interface InputPaymentProps\n extends\n Omit<InputHTMLAttributes<HTMLInputElement>, \"size\" | \"onChange\">,\n ThemeOverrideProps {\n /**\n * Property for specifying the value of the control.\n */\n value?: string;\n /**\n * Property to display the icon to the left of the content.\n */\n icon?: ReactNode;\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 specifying the name of the control.\n */\n name?: string;\n /**\n * Property for disabling the control and highlighting it as an inactive state.\n */\n disabled?: boolean;\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 specify the possible payment systems displayed on the right.\n */\n possiblePayments?: PaymentSystemKey[];\n /**\n * Property to set the maximum number of visible possible payment systems at the same time on the right side of the input.\n */\n maxVisiblePossiblePayments?: number;\n /**\n * Property to show the recognized payment system (all possible payment systems are hidden and only the current one passed by this prop is displayed).\n */\n recognizedPayment?: PaymentSystemKey;\n /**\n * Callback when card type is auto-detected from the input value.\n */\n onRecognizedPaymentChange?: (payment: PaymentSystemKey | null) => void;\n /**\n * Property to enable automatic payment system detection from input value.\n */\n autoDetect?: boolean;\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 * Test identifier for the component.\n */\n testID?: string;\n}\n\n// Map payment system keys to icon components\nconst paymentIconComponents: Record<\n PaymentSystemKey,\n React.FC<PaymentIconProps>\n> = {\n visa: Visa,\n mastercard: Mastercard,\n maestro: Maestro,\n amex: AmericanExpress,\n diners: Dinersclub,\n discover: Discover,\n jcb: Jcb,\n unionpay: Unionpay,\n aura: Aura,\n cartesbancaires: CartesBancaires,\n cirrus: Cirrus,\n dankort: Dankort,\n elo: Elo,\n hipercard: Hipercard,\n mir: Mir,\n naranja: Naranja,\n paypal: Paypal,\n sodexo: Sodexo,\n uatp: Uatp,\n};\n\n/**\n * Detects payment system from card number using BIN ranges.\n * Order matters - more specific patterns should come before general ones.\n */\nconst detectPaymentSystem = (cardNumber: string): PaymentSystemKey | null => {\n const cleanNumber = cardNumber.replace(/\\s/g, \"\");\n\n if (!cleanNumber) return null;\n\n // UATP: starts with 1\n if (/^1/.test(cleanNumber)) return \"uatp\";\n\n // Mir: 2200-2204\n if (/^220[0-4]/.test(cleanNumber)) return \"mir\";\n\n // Amex: 34, 37\n if (/^3[47]/.test(cleanNumber)) return \"amex\";\n\n // Diners Club: 300-305, 36, 38\n if (/^3(?:0[0-5]|[68])/.test(cleanNumber)) return \"diners\";\n\n // JCB: 3528-3589\n if (/^35(?:2[89]|[3-8])/.test(cleanNumber)) return \"jcb\";\n\n // Elo: specific BIN ranges (must check before Visa/Mastercard due to overlapping ranges)\n if (\n /^(401178|401179|431274|438935|451416|457393|457631|457632|504175|506699|5067[0-9]{2}|509[0-9]{3}|627780|636297|636368|650[0-9]{3}|651[0-9]{3}|655[0-9]{3})/.test(\n cleanNumber\n )\n )\n return \"elo\";\n\n // Visa: starts with 4\n if (/^4/.test(cleanNumber)) return \"visa\";\n\n // Hipercard: 606282, 637095, 637568, 637599, 637609, 637612\n if (/^(606282|637095|637568|637599|637609|637612)/.test(cleanNumber))\n return \"hipercard\";\n\n // Aura: 507860\n if (/^507860/.test(cleanNumber)) return \"aura\";\n\n // Dankort: 5019\n if (/^5019/.test(cleanNumber)) return \"dankort\";\n\n // Naranja: 589562\n if (/^589562/.test(cleanNumber)) return \"naranja\";\n\n // Mastercard: 51-55 or 2221-2720\n // For 51-55 range\n if (/^5[1-5]/.test(cleanNumber)) return \"mastercard\";\n // For 2221-2720 range (need 4+ digits for accurate detection)\n if (\n cleanNumber.length >= 4 &&\n /^(?:222[1-9]|22[3-9]\\d|2[3-6]\\d{2}|27[01]\\d|2720)/.test(cleanNumber)\n )\n return \"mastercard\";\n\n // Discover: 6011, 622126-622925, 644-649, 65\n if (/^(?:6011|65|64[4-9])/.test(cleanNumber)) return \"discover\";\n // For 622126-622925 range (need 6+ digits for accurate detection)\n if (\n cleanNumber.length >= 6 &&\n /^(?:6221(?:2[6-9]|[3-9]\\d)|622[2-8]\\d{2}|6229(?:[01]\\d|2[0-5]))/.test(\n cleanNumber\n )\n )\n return \"discover\";\n\n // UnionPay: 62 (but not 622126-622925 which is Discover)\n if (/^62/.test(cleanNumber)) return \"unionpay\";\n\n // Maestro: 50, 56-69 (catch-all for remaining 5x and 6x ranges)\n if (/^(?:5[06-9]|6)/.test(cleanNumber)) return \"maestro\";\n\n return null;\n};\n\n// Card icon dimensions (4:3 aspect ratio)\nconst CARD_GAP = 4;\n\n/**\n * Payment card icons component with sliding animation\n */\nconst PaymentIcons: React.FC<{\n possiblePayments: PaymentSystemKey[];\n maxVisible: number;\n recognizedPayment?: PaymentSystemKey | null;\n iconHeight: number;\n}> = ({ possiblePayments, maxVisible, recognizedPayment, iconHeight }) => {\n const [cyclingIndex, setCyclingIndex] = useState(0);\n const [isTransitioning, setIsTransitioning] = useState(false);\n const [isRecognized, setIsRecognized] = useState(false);\n\n // Scale factor based on size (icons use 4:3 aspect ratio)\n const scaledCardHeight = iconHeight;\n const scaledCardWidth = Math.round(iconHeight * (4 / 3));\n const scaledGap = CARD_GAP;\n\n // Calculate which cards to show in cycling position\n const constantCards = possiblePayments.slice(0, maxVisible - 1);\n const cyclingCards = possiblePayments.slice(maxVisible - 1);\n\n // Handle recognized payment animation\n useEffect(() => {\n if (recognizedPayment) {\n setIsRecognized(true);\n } else {\n // Small delay before showing all cards again\n const timeout = setTimeout(() => {\n setIsRecognized(false);\n }, 50);\n return () => clearTimeout(timeout);\n }\n }, [recognizedPayment]);\n\n // Cycle through remaining cards\n useEffect(() => {\n if (cyclingCards.length <= 1 || recognizedPayment) return;\n\n const interval = setInterval(() => {\n setIsTransitioning(true);\n setTimeout(() => {\n setCyclingIndex((prev) => (prev + 1) % cyclingCards.length);\n setIsTransitioning(false);\n }, 150);\n }, 2000);\n\n return () => clearInterval(interval);\n }, [cyclingCards.length, recognizedPayment]);\n\n // Human-readable labels for payment systems\n const paymentLabels: Record<PaymentSystemKey, string> = {\n mastercard: \"Mastercard\",\n visa: \"Visa\",\n maestro: \"Maestro\",\n diners: \"Diners Club\",\n amex: \"American Express\",\n discover: \"Discover\",\n jcb: \"JCB\",\n unionpay: \"UnionPay\",\n aura: \"Aura\",\n cartesbancaires: \"Cartes Bancaires\",\n cirrus: \"Cirrus\",\n dankort: \"Dankort\",\n elo: \"Elo\",\n hipercard: \"Hipercard\",\n mir: \"Mir\",\n naranja: \"Naranja\",\n paypal: \"PayPal\",\n sodexo: \"Sodexo\",\n uatp: \"UATP\",\n };\n\n // Build aria label from possible payments\n const getAriaLabel = () => {\n if (recognizedPayment) {\n return `Recognized payment: ${paymentLabels[recognizedPayment]}`;\n }\n return `Accepted payment cards: ${possiblePayments\n .map((key) => paymentLabels[key])\n .join(\", \")}`;\n };\n\n // Calculate total width for the container\n const totalVisibleCards = Math.min(possiblePayments.length, maxVisible);\n const containerWidth =\n totalVisibleCards * scaledCardWidth + (totalVisibleCards - 1) * scaledGap;\n\n return (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n role=\"img\"\n aria-label={getAriaLabel()}\n position=\"relative\"\n width={containerWidth}\n height={scaledCardHeight}\n style={{ overflow: \"hidden\" }}\n >\n {/* All constant cards */}\n {constantCards.map((key, index) => {\n const IconComponent = paymentIconComponents[key];\n const isRecognizedCard = recognizedPayment === key;\n\n // Calculate slide offset when recognized\n // Cards should slide to the right, except the recognized one\n let translateX = 0;\n let opacity = 1;\n\n if (isRecognized && recognizedPayment) {\n if (isRecognizedCard) {\n // Move recognized card to the rightmost position\n const targetPosition =\n (totalVisibleCards - 1) * (scaledCardWidth + scaledGap);\n const currentPosition = index * (scaledCardWidth + scaledGap);\n translateX = targetPosition - currentPosition;\n opacity = 1;\n } else {\n // Slide non-recognized cards to the right and fade out\n translateX = containerWidth;\n opacity = 0;\n }\n }\n\n return (\n <Box\n key={key}\n position=\"absolute\"\n left={index * (scaledCardWidth + scaledGap)}\n style={{\n transform: isWeb ? `translateX(${translateX}px)` : undefined,\n opacity,\n ...(isWeb && {\n transition: \"transform 300ms ease-out, opacity 300ms ease-out\",\n }),\n }}\n >\n <IconComponent size={scaledCardHeight} />\n </Box>\n );\n })}\n\n {/* Cycling position */}\n {cyclingCards.length > 0 && (\n <Box\n position=\"absolute\"\n left={(maxVisible - 1) * (scaledCardWidth + scaledGap)}\n width={scaledCardWidth}\n height={scaledCardHeight}\n >\n {cyclingCards.map((key, index) => {\n const IconComponent = paymentIconComponents[key];\n const isCurrentCycling = index === cyclingIndex;\n const isRecognizedCard = recognizedPayment === key;\n\n let translateX = 0;\n let opacity = isCurrentCycling && !isTransitioning ? 1 : 0;\n\n if (isRecognized && recognizedPayment) {\n if (isRecognizedCard) {\n // Keep in place, fully visible\n opacity = 1;\n } else {\n // Slide out to the right\n translateX = containerWidth;\n opacity = 0;\n }\n }\n\n return (\n <Box\n key={key}\n position=\"absolute\"\n top={0}\n left={0}\n style={{\n transform: isWeb ? `translateX(${translateX}px)` : undefined,\n opacity,\n ...(isWeb && {\n transition: isRecognized\n ? \"transform 300ms ease-out, opacity 300ms ease-out\"\n : \"opacity 150ms ease-in-out\",\n }),\n }}\n >\n <IconComponent size={scaledCardHeight} />\n </Box>\n );\n })}\n </Box>\n )}\n </Box>\n );\n};\n\nexport const InputPayment = forwardRef<HTMLInputElement, InputPaymentProps>(\n (\n {\n value,\n icon,\n placeholder = \"Card number\",\n onChange,\n onChangeText,\n onKeyDown,\n size = \"md\",\n name,\n disabled = false,\n errorMessage,\n error,\n possiblePayments = DEFAULT_POSSIBLE_PAYMENTS,\n maxVisiblePossiblePayments = 5,\n recognizedPayment: controlledRecognizedPayment,\n onRecognizedPaymentChange,\n autoDetect = true,\n id: providedId,\n \"aria-label\": ariaLabel,\n testID,\n themeMode,\n themeProductContext,\n ...rest\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const [internalState, setInternalState] = useState<\"default\" | \"focus\">(\n \"default\"\n );\n const [passValue, setPassValue] = useState(value ?? \"\");\n const [detectedPayment, setDetectedPayment] =\n useState<PaymentSystemKey | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Generate unique IDs for accessibility\n const rawId = useId();\n const safeId = rawId.replace(/:/g, \"\");\n const inputId = providedId || `input-payment-${safeId}`;\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\n useEffect(() => {\n if (value !== undefined) {\n setPassValue(value);\n }\n }, [value]);\n\n // Auto-detect payment system when value changes\n // Only detect cards that are in the possiblePayments list\n useEffect(() => {\n if (autoDetect && passValue) {\n const detected = detectPaymentSystem(passValue);\n // Only use the detected payment if it's in possiblePayments\n const validDetected =\n detected && possiblePayments.includes(detected) ? detected : null;\n setDetectedPayment(validDetected);\n onRecognizedPaymentChange?.(validDetected);\n } else if (!passValue) {\n setDetectedPayment(null);\n if (autoDetect) {\n onRecognizedPaymentChange?.(null);\n }\n }\n }, [passValue, autoDetect, onRecognizedPaymentChange, possiblePayments]);\n\n const isDisable = disabled;\n const isError = !!(errorMessage || error);\n const isFocus = internalState === \"focus\";\n\n // Determine which payment to display\n const displayRecognizedPayment =\n controlledRecognizedPayment ?? detectedPayment;\n\n // Resolve Config from Theme\n const sizeStyles = theme.sizing.input(size);\n const inputColors = theme.colors.control.input;\n\n const handleFocus = () => {\n if (!isDisable) {\n setInternalState(\"focus\");\n }\n };\n\n const handleBlur = () => {\n if (!isDisable) {\n setInternalState(\"default\");\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n\n if (onChange) {\n onChange(e);\n }\n if (onChangeText) {\n onChangeText(newValue);\n }\n\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 // Resolve background and border colors based on state\n let backgroundColor = 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 const iconColor = inputColors.placeholder;\n\n // Padding values from Figma design\n const paddingConfig: Record<\n string,\n { vertical: number; horizontal: number }\n > = {\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: Record<string, number> = {\n xl: 8,\n lg: 8,\n md: 8,\n sm: 4,\n xs: 4,\n };\n\n // Icon sizes from Figma design\n const iconSizeConfig: Record<string, number> = {\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: Record<\n string,\n { width: number; offset: number }\n > = {\n xl: { width: 1, offset: -1 },\n lg: { width: 1, offset: -1 },\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 <Box\n backgroundColor={backgroundColor}\n borderColor={borderColor}\n borderWidth={borderColor !== \"transparent\" ? 1 : 0}\n borderRadius={borderRadius}\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 ...(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 {icon && (\n <Box\n alignItems=\"center\"\n justifyContent=\"center\"\n role=\"img\"\n aria-hidden={true}\n >\n {React.isValidElement(icon)\n ? React.cloneElement(\n icon as React.ReactElement<{\n size?: number;\n color?: string;\n }>,\n {\n size: iconSize,\n color: iconColor,\n }\n )\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=\"text\"\n inputMode=\"numeric\"\n autoComplete=\"off\"\n color={textColor}\n fontSize={sizeStyles.fontSize}\n placeholderTextColor={placeholderColor}\n aria-invalid={isError || undefined}\n aria-describedby={errorMessage ? errorId : undefined}\n aria-label={ariaLabel || \"Card number\"}\n aria-disabled={isDisable || undefined}\n data-testid=\"input-payment__field\"\n {...rest}\n />\n </Box>\n\n {possiblePayments.length > 0 && (\n <Box\n alignItems=\"center\"\n justifyContent=\"center\"\n data-testid=\"input-payment__card-icons\"\n style={{ overflow: \"hidden\" }}\n >\n <PaymentIcons\n possiblePayments={possiblePayments}\n maxVisible={maxVisiblePossiblePayments}\n recognizedPayment={displayRecognizedPayment}\n iconHeight={iconSize}\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 >\n {errorMessage}\n </Text>\n )}\n </Box>\n );\n }\n);\n\nInputPayment.displayName = \"InputPayment\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n overflow: ${(props) => props.overflow || \"visible\"};\n overflow-x: ${(props) => props.overflowX || \"visible\"};\n overflow-y: ${(props) => props.overflowY || \"visible\"};\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n &:hover {\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-current\": ariaCurrent,\n \"aria-disabled\": ariaDisabled,\n \"aria-live\": ariaLive,\n \"aria-busy\": ariaBusy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n type,\n disabled,\n id,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n elementType={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\n\n// Props from BoxProps, TextProps, SpinnerProps, IconProps, DividerProps\n// that are NOT valid HTML attributes and must not reach the DOM.\nexport const NON_HTML_PROPS = new Set([\n // BoxProps — layout & styling\n \"backgroundColor\",\n \"borderColor\",\n \"borderWidth\",\n \"borderBottomWidth\",\n \"borderBottomColor\",\n \"borderTopWidth\",\n \"borderTopColor\",\n \"borderLeftWidth\",\n \"borderLeftColor\",\n \"borderRightWidth\",\n \"borderRightColor\",\n \"borderRadius\",\n \"borderStyle\",\n \"flexDirection\",\n \"flexWrap\",\n \"alignItems\",\n \"justifyContent\",\n \"alignSelf\",\n \"flex\",\n \"flexShrink\",\n \"gap\",\n \"position\",\n \"top\",\n \"bottom\",\n \"left\",\n \"right\",\n \"outline\",\n \"overflow\",\n \"overflowX\",\n \"overflowY\",\n \"zIndex\",\n \"cursor\",\n \"padding\",\n \"paddingHorizontal\",\n \"paddingVertical\",\n \"paddingTop\",\n \"paddingBottom\",\n \"paddingLeft\",\n \"paddingRight\",\n \"margin\",\n \"marginTop\",\n \"marginBottom\",\n \"marginLeft\",\n \"marginRight\",\n \"minWidth\",\n \"minHeight\",\n \"maxWidth\",\n \"maxHeight\",\n \"hoverStyle\",\n \"pressStyle\",\n \"focusStyle\",\n \"outlineColor\",\n \"outlineWidth\",\n \"outlineOffset\",\n \"outlineStyle\",\n // BoxProps — RN-only\n \"onPress\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n \"testID\",\n // Box — custom element type\n \"elementType\",\n // TextProps\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"lineHeight\",\n \"whiteSpace\",\n \"textAlign\",\n \"textDecoration\",\n \"numberOfLines\",\n \"letterSpacing\",\n \"textTransform\",\n // SpinnerProps\n \"strokeWidth\",\n // DividerProps\n \"vertical\",\n \"dashStroke\",\n]);\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, any>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = elementType || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (!NON_HTML_PROPS.has(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(Tag, { ref, ...htmlProps }, children);\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredSpan = createFilteredElement(\"span\");\n\nconst StyledText = styled(FilteredSpan)<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n","import React, { forwardRef } from \"react\";\nimport styled from \"styled-components\";\nimport { InputPrimitiveProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledInput = styled.input<InputPrimitiveProps>`\n background: transparent;\n border: none;\n outline: none;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-family: inherit;\n text-align: inherit;\n\n &::placeholder {\n color: ${(props) =>\n props.placeholderTextColor || \"rgba(255, 255, 255, 0.5)\"};\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n\n /* Override browser autofill background */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 1000px transparent inset !important;\n -webkit-background-clip: text !important;\n -webkit-text-fill-color: ${(props) => props.color || \"inherit\"} !important;\n }\n`;\n\nexport const InputPrimitive = forwardRef<HTMLInputElement, 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 name,\n type,\n inputMode,\n autoComplete,\n id,\n \"aria-invalid\": ariaInvalid,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel,\n \"aria-disabled\": ariaDisabled,\n \"data-testid\": dataTestId,\n ...rest\n },\n ref\n ) => {\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (onChange) {\n onChange(e);\n }\n if (onChangeText) {\n onChangeText(e.target.value);\n }\n };\n\n // Always pass value to make it a controlled input\n const inputValue = value !== undefined ? value : \"\";\n\n return (\n <StyledInput\n ref={ref}\n id={id}\n value={inputValue}\n name={name}\n placeholder={placeholder}\n onChange={handleChange}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n disabled={disabled}\n type={secureTextEntry ? \"password\" : type || \"text\"}\n inputMode={inputMode}\n autoComplete={autoComplete}\n style={style}\n color={color}\n fontSize={fontSize}\n placeholderTextColor={placeholderTextColor}\n maxLength={maxLength}\n aria-invalid={ariaInvalid}\n aria-describedby={ariaDescribedBy}\n aria-labelledby={ariaLabelledBy}\n aria-label={ariaLabel}\n aria-disabled={ariaDisabled}\n data-testid={dataTestId}\n {...rest}\n />\n );\n }\n);\n\nInputPrimitive.displayName = \"InputPrimitive\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAOO;;;ACPP,IAAAC,gBAAkB;AAClB,+BAAmB;;;ACDnB,mBAAkB;AAIX,IAAM,iBAAiB,oBAAI,IAAI;AAAA;AAAA,EAEpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EACA;AACF,CAAC;AAYM,SAAS,sBAAsB,YAAoB;AACxD,QAAM,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J,OAAO;AAAA,oBACP;AAAA,oBACA;AAAA,oBACA,UAAU;AAAA,oBACV,SAAS;AAAA,oBACT,QAAQ;AAAA,oBACR,WAAW;AAAA,oBACX,UAAU;AAAA,oBACV,MAAK;AAAA,oBACL,WAAU;AAAA,oBACV,cAAa;AAAA,oBACb,OAAO;AAAA,oBACP,UAAU,WAAW;AAAA,oBACrB,sBAAsB;AAAA,oBACtB,gBAAc,WAAW;AAAA,oBACzB,oBAAkB,eAAe,UAAU;AAAA,oBAC3C,cAAY,aAAa;AAAA,oBACzB,iBAAe,aAAa;AAAA,oBAC5B,eAAY;AAAA,oBACX,GAAG;AAAA;AAAA,gBACN,GACF;AAAA,gBAEC,iBAAiB,SAAS,KACzB;AAAA,kBAAC;AAAA;AAAA,oBACC,YAAW;AAAA,oBACX,gBAAe;AAAA,oBACf,eAAY;AAAA,oBACZ,OAAO,EAAE,UAAU,SAAS;AAAA,oBAE5B;AAAA,sBAAC;AAAA;AAAA,wBACC;AAAA,wBACA,YAAY;AAAA,wBACZ,mBAAmB;AAAA,wBACnB,YAAY;AAAA;AAAA,oBACd;AAAA;AAAA,gBACF;AAAA;AAAA;AAAA,UAEJ;AAAA,UAEC,gBACC;AAAA,YAAC;AAAA;AAAA,cACC,IAAI;AAAA,cACJ,MAAK;AAAA,cACL,OAAO,MAAM,OAAO,QAAQ,MAAM;AAAA,cAClC,UAAU,WAAW,WAAW;AAAA,cAE/B;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;","names":["import_react","import_react","React","styled","React","import_styled_components","import_jsx_runtime","styled","import_react","import_styled_components","import_jsx_runtime","styled","import_jsx_runtime","React"]}
package/web/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  // src/InputPayment.tsx
2
- import React3, {
2
+ import React4, {
3
3
  useState,
4
4
  forwardRef as forwardRef2,
5
5
  useRef,
@@ -7,10 +7,117 @@ import React3, {
7
7
  } from "react";
8
8
 
9
9
  // ../primitives-web/src/Box.tsx
10
- import React from "react";
10
+ import React2 from "react";
11
11
  import styled from "styled-components";
12
+
13
+ // ../primitives-web/src/filterDOMProps.ts
14
+ import React from "react";
15
+ var NON_HTML_PROPS = /* @__PURE__ */ new Set([
16
+ // BoxProps — layout & styling
17
+ "backgroundColor",
18
+ "borderColor",
19
+ "borderWidth",
20
+ "borderBottomWidth",
21
+ "borderBottomColor",
22
+ "borderTopWidth",
23
+ "borderTopColor",
24
+ "borderLeftWidth",
25
+ "borderLeftColor",
26
+ "borderRightWidth",
27
+ "borderRightColor",
28
+ "borderRadius",
29
+ "borderStyle",
30
+ "flexDirection",
31
+ "flexWrap",
32
+ "alignItems",
33
+ "justifyContent",
34
+ "alignSelf",
35
+ "flex",
36
+ "flexShrink",
37
+ "gap",
38
+ "position",
39
+ "top",
40
+ "bottom",
41
+ "left",
42
+ "right",
43
+ "outline",
44
+ "overflow",
45
+ "overflowX",
46
+ "overflowY",
47
+ "zIndex",
48
+ "cursor",
49
+ "padding",
50
+ "paddingHorizontal",
51
+ "paddingVertical",
52
+ "paddingTop",
53
+ "paddingBottom",
54
+ "paddingLeft",
55
+ "paddingRight",
56
+ "margin",
57
+ "marginTop",
58
+ "marginBottom",
59
+ "marginLeft",
60
+ "marginRight",
61
+ "minWidth",
62
+ "minHeight",
63
+ "maxWidth",
64
+ "maxHeight",
65
+ "hoverStyle",
66
+ "pressStyle",
67
+ "focusStyle",
68
+ "outlineColor",
69
+ "outlineWidth",
70
+ "outlineOffset",
71
+ "outlineStyle",
72
+ // BoxProps — RN-only
73
+ "onPress",
74
+ "onLayout",
75
+ "onMoveShouldSetResponder",
76
+ "onResponderGrant",
77
+ "onResponderMove",
78
+ "onResponderRelease",
79
+ "onResponderTerminate",
80
+ "testID",
81
+ // Box — custom element type
82
+ "elementType",
83
+ // TextProps
84
+ "fontSize",
85
+ "fontWeight",
86
+ "fontFamily",
87
+ "lineHeight",
88
+ "whiteSpace",
89
+ "textAlign",
90
+ "textDecoration",
91
+ "numberOfLines",
92
+ "letterSpacing",
93
+ "textTransform",
94
+ // SpinnerProps
95
+ "strokeWidth",
96
+ // DividerProps
97
+ "vertical",
98
+ "dashStroke"
99
+ ]);
100
+ function createFilteredElement(defaultTag) {
101
+ const Component = React.forwardRef(
102
+ ({ children, elementType, ...props }, ref) => {
103
+ const Tag = elementType || defaultTag;
104
+ const htmlProps = {};
105
+ for (const key of Object.keys(props)) {
106
+ if (!NON_HTML_PROPS.has(key)) {
107
+ htmlProps[key] = props[key];
108
+ }
109
+ }
110
+ return React.createElement(Tag, { ref, ...htmlProps }, children);
111
+ }
112
+ );
113
+ Component.displayName = `Filtered(${defaultTag})`;
114
+ return Component;
115
+ }
116
+
117
+ // ../primitives-web/src/Box.tsx
12
118
  import { jsx } from "react/jsx-runtime";
13
- var StyledBox = styled.div`
119
+ var FilteredDiv = createFilteredElement("div");
120
+ var StyledBox = styled(FilteredDiv)`
14
121
  display: flex;
15
122
  box-sizing: border-box;
16
123
  background-color: ${(props) => props.backgroundColor || "transparent"};
@@ -97,7 +204,7 @@ var StyledBox = styled.div`
97
204
  ${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
98
205
  }
99
206
  `;
100
- var Box = React.forwardRef(
207
+ var Box = React2.forwardRef(
101
208
  ({
102
209
  children,
103
210
  onPress,
@@ -149,7 +256,7 @@ var Box = React.forwardRef(
149
256
  StyledBox,
150
257
  {
151
258
  ref,
152
- as,
259
+ elementType: as,
153
260
  id,
154
261
  type: as === "button" ? type || "button" : void 0,
155
262
  disabled: as === "button" ? disabled : void 0,
@@ -180,7 +287,8 @@ Box.displayName = "Box";
180
287
  // ../primitives-web/src/Text.tsx
181
288
  import styled2 from "styled-components";
182
289
  import { jsx as jsx2 } from "react/jsx-runtime";
183
- var StyledText = styled2.span`
290
+ var FilteredSpan = createFilteredElement("span");
291
+ var StyledText = styled2(FilteredSpan)`
184
292
  color: ${(props) => props.color || "inherit"};
185
293
  font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
186
294
  font-weight: ${(props) => props.fontWeight || "normal"};
@@ -592,7 +700,7 @@ var InputPayment = forwardRef2(
592
700
  const safeId = rawId.replace(/:/g, "");
593
701
  const inputId = providedId || `input-payment-${safeId}`;
594
702
  const errorId = `${inputId}-error`;
595
- React3.useImperativeHandle(
703
+ React4.useImperativeHandle(
596
704
  ref,
597
705
  () => inputRef.current,
598
706
  []
@@ -739,7 +847,7 @@ var InputPayment = forwardRef2(
739
847
  justifyContent: "center",
740
848
  role: "img",
741
849
  "aria-hidden": true,
742
- children: React3.isValidElement(icon) ? React3.cloneElement(
850
+ children: React4.isValidElement(icon) ? React4.cloneElement(
743
851
  icon,
744
852
  {
745
853
  size: iconSize,
package/web/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/InputPayment.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/Text.tsx","../../../primitives-web/src/Input.tsx"],"sourcesContent":["import React, {\n useState,\n forwardRef,\n useRef,\n useEffect,\n type InputHTMLAttributes,\n type ReactNode,\n} from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, InputPrimitive } from \"@xsolla/xui-primitives\";\nimport {\n useResolvedTheme,\n useId,\n isWeb,\n type ThemeOverrideProps,\n} from \"@xsolla/xui-core\";\nimport {\n Visa,\n Mastercard,\n Maestro,\n AmericanExpress,\n Dinersclub,\n Discover,\n Jcb,\n Unionpay,\n Aura,\n CartesBancaires,\n Cirrus,\n Dankort,\n Elo,\n Hipercard,\n Mir,\n Naranja,\n Paypal,\n Sodexo,\n Uatp,\n type PaymentIconProps,\n} from \"@xsolla/xui-icons-payment\";\n\n/**\n * Supported payment system keys\n */\nexport type PaymentSystemKey =\n | \"visa\"\n | \"mastercard\"\n | \"amex\"\n | \"diners\"\n | \"maestro\"\n | \"unionpay\"\n | \"discover\"\n | \"jcb\"\n | \"aura\"\n | \"cartesbancaires\"\n | \"cirrus\"\n | \"dankort\"\n | \"elo\"\n | \"hipercard\"\n | \"mir\"\n | \"naranja\"\n | \"paypal\"\n | \"sodexo\"\n | \"uatp\";\n\n/**\n * Default payment systems to display\n */\nconst DEFAULT_POSSIBLE_PAYMENTS: PaymentSystemKey[] = [\n \"mastercard\",\n \"visa\",\n \"maestro\",\n \"diners\",\n \"amex\",\n \"discover\",\n \"jcb\",\n \"unionpay\",\n];\n\nexport interface InputPaymentProps\n extends\n Omit<InputHTMLAttributes<HTMLInputElement>, \"size\" | \"onChange\">,\n ThemeOverrideProps {\n /**\n * Property for specifying the value of the control.\n */\n value?: string;\n /**\n * Property to display the icon to the left of the content.\n */\n icon?: ReactNode;\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 specifying the name of the control.\n */\n name?: string;\n /**\n * Property for disabling the control and highlighting it as an inactive state.\n */\n disabled?: boolean;\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 specify the possible payment systems displayed on the right.\n */\n possiblePayments?: PaymentSystemKey[];\n /**\n * Property to set the maximum number of visible possible payment systems at the same time on the right side of the input.\n */\n maxVisiblePossiblePayments?: number;\n /**\n * Property to show the recognized payment system (all possible payment systems are hidden and only the current one passed by this prop is displayed).\n */\n recognizedPayment?: PaymentSystemKey;\n /**\n * Callback when card type is auto-detected from the input value.\n */\n onRecognizedPaymentChange?: (payment: PaymentSystemKey | null) => void;\n /**\n * Property to enable automatic payment system detection from input value.\n */\n autoDetect?: boolean;\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 * Test identifier for the component.\n */\n testID?: string;\n}\n\n// Map payment system keys to icon components\nconst paymentIconComponents: Record<\n PaymentSystemKey,\n React.FC<PaymentIconProps>\n> = {\n visa: Visa,\n mastercard: Mastercard,\n maestro: Maestro,\n amex: AmericanExpress,\n diners: Dinersclub,\n discover: Discover,\n jcb: Jcb,\n unionpay: Unionpay,\n aura: Aura,\n cartesbancaires: CartesBancaires,\n cirrus: Cirrus,\n dankort: Dankort,\n elo: Elo,\n hipercard: Hipercard,\n mir: Mir,\n naranja: Naranja,\n paypal: Paypal,\n sodexo: Sodexo,\n uatp: Uatp,\n};\n\n/**\n * Detects payment system from card number using BIN ranges.\n * Order matters - more specific patterns should come before general ones.\n */\nconst detectPaymentSystem = (cardNumber: string): PaymentSystemKey | null => {\n const cleanNumber = cardNumber.replace(/\\s/g, \"\");\n\n if (!cleanNumber) return null;\n\n // UATP: starts with 1\n if (/^1/.test(cleanNumber)) return \"uatp\";\n\n // Mir: 2200-2204\n if (/^220[0-4]/.test(cleanNumber)) return \"mir\";\n\n // Amex: 34, 37\n if (/^3[47]/.test(cleanNumber)) return \"amex\";\n\n // Diners Club: 300-305, 36, 38\n if (/^3(?:0[0-5]|[68])/.test(cleanNumber)) return \"diners\";\n\n // JCB: 3528-3589\n if (/^35(?:2[89]|[3-8])/.test(cleanNumber)) return \"jcb\";\n\n // Elo: specific BIN ranges (must check before Visa/Mastercard due to overlapping ranges)\n if (\n /^(401178|401179|431274|438935|451416|457393|457631|457632|504175|506699|5067[0-9]{2}|509[0-9]{3}|627780|636297|636368|650[0-9]{3}|651[0-9]{3}|655[0-9]{3})/.test(\n cleanNumber\n )\n )\n return \"elo\";\n\n // Visa: starts with 4\n if (/^4/.test(cleanNumber)) return \"visa\";\n\n // Hipercard: 606282, 637095, 637568, 637599, 637609, 637612\n if (/^(606282|637095|637568|637599|637609|637612)/.test(cleanNumber))\n return \"hipercard\";\n\n // Aura: 507860\n if (/^507860/.test(cleanNumber)) return \"aura\";\n\n // Dankort: 5019\n if (/^5019/.test(cleanNumber)) return \"dankort\";\n\n // Naranja: 589562\n if (/^589562/.test(cleanNumber)) return \"naranja\";\n\n // Mastercard: 51-55 or 2221-2720\n // For 51-55 range\n if (/^5[1-5]/.test(cleanNumber)) return \"mastercard\";\n // For 2221-2720 range (need 4+ digits for accurate detection)\n if (\n cleanNumber.length >= 4 &&\n /^(?:222[1-9]|22[3-9]\\d|2[3-6]\\d{2}|27[01]\\d|2720)/.test(cleanNumber)\n )\n return \"mastercard\";\n\n // Discover: 6011, 622126-622925, 644-649, 65\n if (/^(?:6011|65|64[4-9])/.test(cleanNumber)) return \"discover\";\n // For 622126-622925 range (need 6+ digits for accurate detection)\n if (\n cleanNumber.length >= 6 &&\n /^(?:6221(?:2[6-9]|[3-9]\\d)|622[2-8]\\d{2}|6229(?:[01]\\d|2[0-5]))/.test(\n cleanNumber\n )\n )\n return \"discover\";\n\n // UnionPay: 62 (but not 622126-622925 which is Discover)\n if (/^62/.test(cleanNumber)) return \"unionpay\";\n\n // Maestro: 50, 56-69 (catch-all for remaining 5x and 6x ranges)\n if (/^(?:5[06-9]|6)/.test(cleanNumber)) return \"maestro\";\n\n return null;\n};\n\n// Card icon dimensions (4:3 aspect ratio)\nconst CARD_GAP = 4;\n\n/**\n * Payment card icons component with sliding animation\n */\nconst PaymentIcons: React.FC<{\n possiblePayments: PaymentSystemKey[];\n maxVisible: number;\n recognizedPayment?: PaymentSystemKey | null;\n iconHeight: number;\n}> = ({ possiblePayments, maxVisible, recognizedPayment, iconHeight }) => {\n const [cyclingIndex, setCyclingIndex] = useState(0);\n const [isTransitioning, setIsTransitioning] = useState(false);\n const [isRecognized, setIsRecognized] = useState(false);\n\n // Scale factor based on size (icons use 4:3 aspect ratio)\n const scaledCardHeight = iconHeight;\n const scaledCardWidth = Math.round(iconHeight * (4 / 3));\n const scaledGap = CARD_GAP;\n\n // Calculate which cards to show in cycling position\n const constantCards = possiblePayments.slice(0, maxVisible - 1);\n const cyclingCards = possiblePayments.slice(maxVisible - 1);\n\n // Handle recognized payment animation\n useEffect(() => {\n if (recognizedPayment) {\n setIsRecognized(true);\n } else {\n // Small delay before showing all cards again\n const timeout = setTimeout(() => {\n setIsRecognized(false);\n }, 50);\n return () => clearTimeout(timeout);\n }\n }, [recognizedPayment]);\n\n // Cycle through remaining cards\n useEffect(() => {\n if (cyclingCards.length <= 1 || recognizedPayment) return;\n\n const interval = setInterval(() => {\n setIsTransitioning(true);\n setTimeout(() => {\n setCyclingIndex((prev) => (prev + 1) % cyclingCards.length);\n setIsTransitioning(false);\n }, 150);\n }, 2000);\n\n return () => clearInterval(interval);\n }, [cyclingCards.length, recognizedPayment]);\n\n // Human-readable labels for payment systems\n const paymentLabels: Record<PaymentSystemKey, string> = {\n mastercard: \"Mastercard\",\n visa: \"Visa\",\n maestro: \"Maestro\",\n diners: \"Diners Club\",\n amex: \"American Express\",\n discover: \"Discover\",\n jcb: \"JCB\",\n unionpay: \"UnionPay\",\n aura: \"Aura\",\n cartesbancaires: \"Cartes Bancaires\",\n cirrus: \"Cirrus\",\n dankort: \"Dankort\",\n elo: \"Elo\",\n hipercard: \"Hipercard\",\n mir: \"Mir\",\n naranja: \"Naranja\",\n paypal: \"PayPal\",\n sodexo: \"Sodexo\",\n uatp: \"UATP\",\n };\n\n // Build aria label from possible payments\n const getAriaLabel = () => {\n if (recognizedPayment) {\n return `Recognized payment: ${paymentLabels[recognizedPayment]}`;\n }\n return `Accepted payment cards: ${possiblePayments\n .map((key) => paymentLabels[key])\n .join(\", \")}`;\n };\n\n // Calculate total width for the container\n const totalVisibleCards = Math.min(possiblePayments.length, maxVisible);\n const containerWidth =\n totalVisibleCards * scaledCardWidth + (totalVisibleCards - 1) * scaledGap;\n\n return (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n role=\"img\"\n aria-label={getAriaLabel()}\n position=\"relative\"\n width={containerWidth}\n height={scaledCardHeight}\n style={{ overflow: \"hidden\" }}\n >\n {/* All constant cards */}\n {constantCards.map((key, index) => {\n const IconComponent = paymentIconComponents[key];\n const isRecognizedCard = recognizedPayment === key;\n\n // Calculate slide offset when recognized\n // Cards should slide to the right, except the recognized one\n let translateX = 0;\n let opacity = 1;\n\n if (isRecognized && recognizedPayment) {\n if (isRecognizedCard) {\n // Move recognized card to the rightmost position\n const targetPosition =\n (totalVisibleCards - 1) * (scaledCardWidth + scaledGap);\n const currentPosition = index * (scaledCardWidth + scaledGap);\n translateX = targetPosition - currentPosition;\n opacity = 1;\n } else {\n // Slide non-recognized cards to the right and fade out\n translateX = containerWidth;\n opacity = 0;\n }\n }\n\n return (\n <Box\n key={key}\n position=\"absolute\"\n left={index * (scaledCardWidth + scaledGap)}\n style={{\n transform: isWeb ? `translateX(${translateX}px)` : undefined,\n opacity,\n ...(isWeb && {\n transition: \"transform 300ms ease-out, opacity 300ms ease-out\",\n }),\n }}\n >\n <IconComponent size={scaledCardHeight} />\n </Box>\n );\n })}\n\n {/* Cycling position */}\n {cyclingCards.length > 0 && (\n <Box\n position=\"absolute\"\n left={(maxVisible - 1) * (scaledCardWidth + scaledGap)}\n width={scaledCardWidth}\n height={scaledCardHeight}\n >\n {cyclingCards.map((key, index) => {\n const IconComponent = paymentIconComponents[key];\n const isCurrentCycling = index === cyclingIndex;\n const isRecognizedCard = recognizedPayment === key;\n\n let translateX = 0;\n let opacity = isCurrentCycling && !isTransitioning ? 1 : 0;\n\n if (isRecognized && recognizedPayment) {\n if (isRecognizedCard) {\n // Keep in place, fully visible\n opacity = 1;\n } else {\n // Slide out to the right\n translateX = containerWidth;\n opacity = 0;\n }\n }\n\n return (\n <Box\n key={key}\n position=\"absolute\"\n top={0}\n left={0}\n style={{\n transform: isWeb ? `translateX(${translateX}px)` : undefined,\n opacity,\n ...(isWeb && {\n transition: isRecognized\n ? \"transform 300ms ease-out, opacity 300ms ease-out\"\n : \"opacity 150ms ease-in-out\",\n }),\n }}\n >\n <IconComponent size={scaledCardHeight} />\n </Box>\n );\n })}\n </Box>\n )}\n </Box>\n );\n};\n\nexport const InputPayment = forwardRef<HTMLInputElement, InputPaymentProps>(\n (\n {\n value,\n icon,\n placeholder = \"Card number\",\n onChange,\n onChangeText,\n onKeyDown,\n size = \"md\",\n name,\n disabled = false,\n errorMessage,\n error,\n possiblePayments = DEFAULT_POSSIBLE_PAYMENTS,\n maxVisiblePossiblePayments = 5,\n recognizedPayment: controlledRecognizedPayment,\n onRecognizedPaymentChange,\n autoDetect = true,\n id: providedId,\n \"aria-label\": ariaLabel,\n testID,\n themeMode,\n themeProductContext,\n ...rest\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const [internalState, setInternalState] = useState<\"default\" | \"focus\">(\n \"default\"\n );\n const [passValue, setPassValue] = useState(value ?? \"\");\n const [detectedPayment, setDetectedPayment] =\n useState<PaymentSystemKey | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Generate unique IDs for accessibility\n const rawId = useId();\n const safeId = rawId.replace(/:/g, \"\");\n const inputId = providedId || `input-payment-${safeId}`;\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\n useEffect(() => {\n if (value !== undefined) {\n setPassValue(value);\n }\n }, [value]);\n\n // Auto-detect payment system when value changes\n // Only detect cards that are in the possiblePayments list\n useEffect(() => {\n if (autoDetect && passValue) {\n const detected = detectPaymentSystem(passValue);\n // Only use the detected payment if it's in possiblePayments\n const validDetected =\n detected && possiblePayments.includes(detected) ? detected : null;\n setDetectedPayment(validDetected);\n onRecognizedPaymentChange?.(validDetected);\n } else if (!passValue) {\n setDetectedPayment(null);\n if (autoDetect) {\n onRecognizedPaymentChange?.(null);\n }\n }\n }, [passValue, autoDetect, onRecognizedPaymentChange, possiblePayments]);\n\n const isDisable = disabled;\n const isError = !!(errorMessage || error);\n const isFocus = internalState === \"focus\";\n\n // Determine which payment to display\n const displayRecognizedPayment =\n controlledRecognizedPayment ?? detectedPayment;\n\n // Resolve Config from Theme\n const sizeStyles = theme.sizing.input(size);\n const inputColors = theme.colors.control.input;\n\n const handleFocus = () => {\n if (!isDisable) {\n setInternalState(\"focus\");\n }\n };\n\n const handleBlur = () => {\n if (!isDisable) {\n setInternalState(\"default\");\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n\n if (onChange) {\n onChange(e);\n }\n if (onChangeText) {\n onChangeText(newValue);\n }\n\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 // Resolve background and border colors based on state\n let backgroundColor = 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 const iconColor = inputColors.placeholder;\n\n // Padding values from Figma design\n const paddingConfig: Record<\n string,\n { vertical: number; horizontal: number }\n > = {\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: Record<string, number> = {\n xl: 8,\n lg: 8,\n md: 8,\n sm: 4,\n xs: 4,\n };\n\n // Icon sizes from Figma design\n const iconSizeConfig: Record<string, number> = {\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: Record<\n string,\n { width: number; offset: number }\n > = {\n xl: { width: 1, offset: -1 },\n lg: { width: 1, offset: -1 },\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 <Box\n backgroundColor={backgroundColor}\n borderColor={borderColor}\n borderWidth={borderColor !== \"transparent\" ? 1 : 0}\n borderRadius={borderRadius}\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 ...(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 {icon && (\n <Box\n alignItems=\"center\"\n justifyContent=\"center\"\n role=\"img\"\n aria-hidden={true}\n >\n {React.isValidElement(icon)\n ? React.cloneElement(\n icon as React.ReactElement<{\n size?: number;\n color?: string;\n }>,\n {\n size: iconSize,\n color: iconColor,\n }\n )\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=\"text\"\n inputMode=\"numeric\"\n autoComplete=\"off\"\n color={textColor}\n fontSize={sizeStyles.fontSize}\n placeholderTextColor={placeholderColor}\n aria-invalid={isError || undefined}\n aria-describedby={errorMessage ? errorId : undefined}\n aria-label={ariaLabel || \"Card number\"}\n aria-disabled={isDisable || undefined}\n data-testid=\"input-payment__field\"\n {...rest}\n />\n </Box>\n\n {possiblePayments.length > 0 && (\n <Box\n alignItems=\"center\"\n justifyContent=\"center\"\n data-testid=\"input-payment__card-icons\"\n style={{ overflow: \"hidden\" }}\n >\n <PaymentIcons\n possiblePayments={possiblePayments}\n maxVisible={maxVisiblePossiblePayments}\n recognizedPayment={displayRecognizedPayment}\n iconHeight={iconSize}\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 >\n {errorMessage}\n </Text>\n )}\n </Box>\n );\n }\n);\n\nInputPayment.displayName = \"InputPayment\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledBox = styled.div<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n overflow: ${(props) => props.overflow || \"visible\"};\n overflow-x: ${(props) => props.overflowX || \"visible\"};\n overflow-y: ${(props) => props.overflowY || \"visible\"};\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n &:hover {\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-current\": ariaCurrent,\n \"aria-disabled\": ariaDisabled,\n \"aria-live\": ariaLive,\n \"aria-busy\": ariaBusy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n type,\n disabled,\n id,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n as={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledText = styled.span<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n","import React, { forwardRef } from \"react\";\nimport styled from \"styled-components\";\nimport { InputPrimitiveProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledInput = styled.input<InputPrimitiveProps>`\n background: transparent;\n border: none;\n outline: none;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-family: inherit;\n text-align: inherit;\n\n &::placeholder {\n color: ${(props) =>\n props.placeholderTextColor || \"rgba(255, 255, 255, 0.5)\"};\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n\n /* Override browser autofill background */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 1000px transparent inset !important;\n -webkit-background-clip: text !important;\n -webkit-text-fill-color: ${(props) => props.color || \"inherit\"} !important;\n }\n`;\n\nexport const InputPrimitive = forwardRef<HTMLInputElement, 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 name,\n type,\n inputMode,\n autoComplete,\n id,\n \"aria-invalid\": ariaInvalid,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel,\n \"aria-disabled\": ariaDisabled,\n \"data-testid\": dataTestId,\n ...rest\n },\n ref\n ) => {\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (onChange) {\n onChange(e);\n }\n if (onChangeText) {\n onChangeText(e.target.value);\n }\n };\n\n // Always pass value to make it a controlled input\n const inputValue = value !== undefined ? value : \"\";\n\n return (\n <StyledInput\n ref={ref}\n id={id}\n value={inputValue}\n name={name}\n placeholder={placeholder}\n onChange={handleChange}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n disabled={disabled}\n type={secureTextEntry ? \"password\" : type || \"text\"}\n inputMode={inputMode}\n autoComplete={autoComplete}\n style={style}\n color={color}\n fontSize={fontSize}\n placeholderTextColor={placeholderTextColor}\n maxLength={maxLength}\n aria-invalid={ariaInvalid}\n aria-describedby={ariaDescribedBy}\n aria-labelledby={ariaLabelledBy}\n aria-label={ariaLabel}\n aria-disabled={ariaDisabled}\n data-testid={dataTestId}\n {...rest}\n />\n );\n }\n);\n\nInputPrimitive.displayName = \"InputPrimitive\";\n"],"mappings":";AAAA,OAAOA;AAAA,EACL;AAAA,EACA,cAAAC;AAAA,EACA;AAAA,EACA;AAAA,OAGK;;;ACPP,OAAO,WAAW;AAClB,OAAO,YAAY;AA+MX;AA5MR,IAAM,YAAY,OAAO;AAAA;AAAA;AAAA,sBAGH,CAAC,UAAU,MAAM,mBAAmB,aAAa;AAAA,kBACrD,CAAC,UAAU,MAAM,eAAe,aAAa;AAAA,kBAC7C,CAAC,UACf,OAAO,MAAM,gBAAgB,WACzB,GAAG,MAAM,WAAW,OACpB,MAAM,eAAe,CAAC;AAAA;AAAA,IAE1B,CAAC,UACD,MAAM,sBAAsB,UAC5B;AAAA,2BACuB,OAAO,MAAM,sBAAsB,WAAW,GAAG,MAAM,iBAAiB,OAAO,MAAM,iBAAiB;AAAA,2BACtG,MAAM,qBAAqB,MAAM,eAAe,aAAa;AAAA;AAAA,GAErF;AAAA,IACC,CAAC,UACD,MAAM,mBAAmB,UACzB;AAAA,wBACoB,OAAO,MAAM,mBAAmB,WAAW,GAAG,MAAM,cAAc,OAAO,MAAM,cAAc;AAAA,wBAC7F,MAAM,kBAAkB,MAAM,eAAe,aAAa;AA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,OAAO,MAAM,OAAO,QAAQ,MAAM;AAAA,cAClC,UAAU,WAAW,WAAW;AAAA,cAE/B;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;","names":["React","forwardRef","styled","jsx","styled","jsx","jsx","forwardRef","React"]}
1
+ {"version":3,"sources":["../../src/InputPayment.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/filterDOMProps.ts","../../../primitives-web/src/Text.tsx","../../../primitives-web/src/Input.tsx"],"sourcesContent":["import React, {\n useState,\n forwardRef,\n useRef,\n useEffect,\n type InputHTMLAttributes,\n type ReactNode,\n} from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, InputPrimitive } from \"@xsolla/xui-primitives\";\nimport {\n useResolvedTheme,\n useId,\n isWeb,\n type ThemeOverrideProps,\n} from \"@xsolla/xui-core\";\nimport {\n Visa,\n Mastercard,\n Maestro,\n AmericanExpress,\n Dinersclub,\n Discover,\n Jcb,\n Unionpay,\n Aura,\n CartesBancaires,\n Cirrus,\n Dankort,\n Elo,\n Hipercard,\n Mir,\n Naranja,\n Paypal,\n Sodexo,\n Uatp,\n type PaymentIconProps,\n} from \"@xsolla/xui-icons-payment\";\n\n/**\n * Supported payment system keys\n */\nexport type PaymentSystemKey =\n | \"visa\"\n | \"mastercard\"\n | \"amex\"\n | \"diners\"\n | \"maestro\"\n | \"unionpay\"\n | \"discover\"\n | \"jcb\"\n | \"aura\"\n | \"cartesbancaires\"\n | \"cirrus\"\n | \"dankort\"\n | \"elo\"\n | \"hipercard\"\n | \"mir\"\n | \"naranja\"\n | \"paypal\"\n | \"sodexo\"\n | \"uatp\";\n\n/**\n * Default payment systems to display\n */\nconst DEFAULT_POSSIBLE_PAYMENTS: PaymentSystemKey[] = [\n \"mastercard\",\n \"visa\",\n \"maestro\",\n \"diners\",\n \"amex\",\n \"discover\",\n \"jcb\",\n \"unionpay\",\n];\n\nexport interface InputPaymentProps\n extends\n Omit<InputHTMLAttributes<HTMLInputElement>, \"size\" | \"onChange\">,\n ThemeOverrideProps {\n /**\n * Property for specifying the value of the control.\n */\n value?: string;\n /**\n * Property to display the icon to the left of the content.\n */\n icon?: ReactNode;\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 specifying the name of the control.\n */\n name?: string;\n /**\n * Property for disabling the control and highlighting it as an inactive state.\n */\n disabled?: boolean;\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 specify the possible payment systems displayed on the right.\n */\n possiblePayments?: PaymentSystemKey[];\n /**\n * Property to set the maximum number of visible possible payment systems at the same time on the right side of the input.\n */\n maxVisiblePossiblePayments?: number;\n /**\n * Property to show the recognized payment system (all possible payment systems are hidden and only the current one passed by this prop is displayed).\n */\n recognizedPayment?: PaymentSystemKey;\n /**\n * Callback when card type is auto-detected from the input value.\n */\n onRecognizedPaymentChange?: (payment: PaymentSystemKey | null) => void;\n /**\n * Property to enable automatic payment system detection from input value.\n */\n autoDetect?: boolean;\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 * Test identifier for the component.\n */\n testID?: string;\n}\n\n// Map payment system keys to icon components\nconst paymentIconComponents: Record<\n PaymentSystemKey,\n React.FC<PaymentIconProps>\n> = {\n visa: Visa,\n mastercard: Mastercard,\n maestro: Maestro,\n amex: AmericanExpress,\n diners: Dinersclub,\n discover: Discover,\n jcb: Jcb,\n unionpay: Unionpay,\n aura: Aura,\n cartesbancaires: CartesBancaires,\n cirrus: Cirrus,\n dankort: Dankort,\n elo: Elo,\n hipercard: Hipercard,\n mir: Mir,\n naranja: Naranja,\n paypal: Paypal,\n sodexo: Sodexo,\n uatp: Uatp,\n};\n\n/**\n * Detects payment system from card number using BIN ranges.\n * Order matters - more specific patterns should come before general ones.\n */\nconst detectPaymentSystem = (cardNumber: string): PaymentSystemKey | null => {\n const cleanNumber = cardNumber.replace(/\\s/g, \"\");\n\n if (!cleanNumber) return null;\n\n // UATP: starts with 1\n if (/^1/.test(cleanNumber)) return \"uatp\";\n\n // Mir: 2200-2204\n if (/^220[0-4]/.test(cleanNumber)) return \"mir\";\n\n // Amex: 34, 37\n if (/^3[47]/.test(cleanNumber)) return \"amex\";\n\n // Diners Club: 300-305, 36, 38\n if (/^3(?:0[0-5]|[68])/.test(cleanNumber)) return \"diners\";\n\n // JCB: 3528-3589\n if (/^35(?:2[89]|[3-8])/.test(cleanNumber)) return \"jcb\";\n\n // Elo: specific BIN ranges (must check before Visa/Mastercard due to overlapping ranges)\n if (\n /^(401178|401179|431274|438935|451416|457393|457631|457632|504175|506699|5067[0-9]{2}|509[0-9]{3}|627780|636297|636368|650[0-9]{3}|651[0-9]{3}|655[0-9]{3})/.test(\n cleanNumber\n )\n )\n return \"elo\";\n\n // Visa: starts with 4\n if (/^4/.test(cleanNumber)) return \"visa\";\n\n // Hipercard: 606282, 637095, 637568, 637599, 637609, 637612\n if (/^(606282|637095|637568|637599|637609|637612)/.test(cleanNumber))\n return \"hipercard\";\n\n // Aura: 507860\n if (/^507860/.test(cleanNumber)) return \"aura\";\n\n // Dankort: 5019\n if (/^5019/.test(cleanNumber)) return \"dankort\";\n\n // Naranja: 589562\n if (/^589562/.test(cleanNumber)) return \"naranja\";\n\n // Mastercard: 51-55 or 2221-2720\n // For 51-55 range\n if (/^5[1-5]/.test(cleanNumber)) return \"mastercard\";\n // For 2221-2720 range (need 4+ digits for accurate detection)\n if (\n cleanNumber.length >= 4 &&\n /^(?:222[1-9]|22[3-9]\\d|2[3-6]\\d{2}|27[01]\\d|2720)/.test(cleanNumber)\n )\n return \"mastercard\";\n\n // Discover: 6011, 622126-622925, 644-649, 65\n if (/^(?:6011|65|64[4-9])/.test(cleanNumber)) return \"discover\";\n // For 622126-622925 range (need 6+ digits for accurate detection)\n if (\n cleanNumber.length >= 6 &&\n /^(?:6221(?:2[6-9]|[3-9]\\d)|622[2-8]\\d{2}|6229(?:[01]\\d|2[0-5]))/.test(\n cleanNumber\n )\n )\n return \"discover\";\n\n // UnionPay: 62 (but not 622126-622925 which is Discover)\n if (/^62/.test(cleanNumber)) return \"unionpay\";\n\n // Maestro: 50, 56-69 (catch-all for remaining 5x and 6x ranges)\n if (/^(?:5[06-9]|6)/.test(cleanNumber)) return \"maestro\";\n\n return null;\n};\n\n// Card icon dimensions (4:3 aspect ratio)\nconst CARD_GAP = 4;\n\n/**\n * Payment card icons component with sliding animation\n */\nconst PaymentIcons: React.FC<{\n possiblePayments: PaymentSystemKey[];\n maxVisible: number;\n recognizedPayment?: PaymentSystemKey | null;\n iconHeight: number;\n}> = ({ possiblePayments, maxVisible, recognizedPayment, iconHeight }) => {\n const [cyclingIndex, setCyclingIndex] = useState(0);\n const [isTransitioning, setIsTransitioning] = useState(false);\n const [isRecognized, setIsRecognized] = useState(false);\n\n // Scale factor based on size (icons use 4:3 aspect ratio)\n const scaledCardHeight = iconHeight;\n const scaledCardWidth = Math.round(iconHeight * (4 / 3));\n const scaledGap = CARD_GAP;\n\n // Calculate which cards to show in cycling position\n const constantCards = possiblePayments.slice(0, maxVisible - 1);\n const cyclingCards = possiblePayments.slice(maxVisible - 1);\n\n // Handle recognized payment animation\n useEffect(() => {\n if (recognizedPayment) {\n setIsRecognized(true);\n } else {\n // Small delay before showing all cards again\n const timeout = setTimeout(() => {\n setIsRecognized(false);\n }, 50);\n return () => clearTimeout(timeout);\n }\n }, [recognizedPayment]);\n\n // Cycle through remaining cards\n useEffect(() => {\n if (cyclingCards.length <= 1 || recognizedPayment) return;\n\n const interval = setInterval(() => {\n setIsTransitioning(true);\n setTimeout(() => {\n setCyclingIndex((prev) => (prev + 1) % cyclingCards.length);\n setIsTransitioning(false);\n }, 150);\n }, 2000);\n\n return () => clearInterval(interval);\n }, [cyclingCards.length, recognizedPayment]);\n\n // Human-readable labels for payment systems\n const paymentLabels: Record<PaymentSystemKey, string> = {\n mastercard: \"Mastercard\",\n visa: \"Visa\",\n maestro: \"Maestro\",\n diners: \"Diners Club\",\n amex: \"American Express\",\n discover: \"Discover\",\n jcb: \"JCB\",\n unionpay: \"UnionPay\",\n aura: \"Aura\",\n cartesbancaires: \"Cartes Bancaires\",\n cirrus: \"Cirrus\",\n dankort: \"Dankort\",\n elo: \"Elo\",\n hipercard: \"Hipercard\",\n mir: \"Mir\",\n naranja: \"Naranja\",\n paypal: \"PayPal\",\n sodexo: \"Sodexo\",\n uatp: \"UATP\",\n };\n\n // Build aria label from possible payments\n const getAriaLabel = () => {\n if (recognizedPayment) {\n return `Recognized payment: ${paymentLabels[recognizedPayment]}`;\n }\n return `Accepted payment cards: ${possiblePayments\n .map((key) => paymentLabels[key])\n .join(\", \")}`;\n };\n\n // Calculate total width for the container\n const totalVisibleCards = Math.min(possiblePayments.length, maxVisible);\n const containerWidth =\n totalVisibleCards * scaledCardWidth + (totalVisibleCards - 1) * scaledGap;\n\n return (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n role=\"img\"\n aria-label={getAriaLabel()}\n position=\"relative\"\n width={containerWidth}\n height={scaledCardHeight}\n style={{ overflow: \"hidden\" }}\n >\n {/* All constant cards */}\n {constantCards.map((key, index) => {\n const IconComponent = paymentIconComponents[key];\n const isRecognizedCard = recognizedPayment === key;\n\n // Calculate slide offset when recognized\n // Cards should slide to the right, except the recognized one\n let translateX = 0;\n let opacity = 1;\n\n if (isRecognized && recognizedPayment) {\n if (isRecognizedCard) {\n // Move recognized card to the rightmost position\n const targetPosition =\n (totalVisibleCards - 1) * (scaledCardWidth + scaledGap);\n const currentPosition = index * (scaledCardWidth + scaledGap);\n translateX = targetPosition - currentPosition;\n opacity = 1;\n } else {\n // Slide non-recognized cards to the right and fade out\n translateX = containerWidth;\n opacity = 0;\n }\n }\n\n return (\n <Box\n key={key}\n position=\"absolute\"\n left={index * (scaledCardWidth + scaledGap)}\n style={{\n transform: isWeb ? `translateX(${translateX}px)` : undefined,\n opacity,\n ...(isWeb && {\n transition: \"transform 300ms ease-out, opacity 300ms ease-out\",\n }),\n }}\n >\n <IconComponent size={scaledCardHeight} />\n </Box>\n );\n })}\n\n {/* Cycling position */}\n {cyclingCards.length > 0 && (\n <Box\n position=\"absolute\"\n left={(maxVisible - 1) * (scaledCardWidth + scaledGap)}\n width={scaledCardWidth}\n height={scaledCardHeight}\n >\n {cyclingCards.map((key, index) => {\n const IconComponent = paymentIconComponents[key];\n const isCurrentCycling = index === cyclingIndex;\n const isRecognizedCard = recognizedPayment === key;\n\n let translateX = 0;\n let opacity = isCurrentCycling && !isTransitioning ? 1 : 0;\n\n if (isRecognized && recognizedPayment) {\n if (isRecognizedCard) {\n // Keep in place, fully visible\n opacity = 1;\n } else {\n // Slide out to the right\n translateX = containerWidth;\n opacity = 0;\n }\n }\n\n return (\n <Box\n key={key}\n position=\"absolute\"\n top={0}\n left={0}\n style={{\n transform: isWeb ? `translateX(${translateX}px)` : undefined,\n opacity,\n ...(isWeb && {\n transition: isRecognized\n ? \"transform 300ms ease-out, opacity 300ms ease-out\"\n : \"opacity 150ms ease-in-out\",\n }),\n }}\n >\n <IconComponent size={scaledCardHeight} />\n </Box>\n );\n })}\n </Box>\n )}\n </Box>\n );\n};\n\nexport const InputPayment = forwardRef<HTMLInputElement, InputPaymentProps>(\n (\n {\n value,\n icon,\n placeholder = \"Card number\",\n onChange,\n onChangeText,\n onKeyDown,\n size = \"md\",\n name,\n disabled = false,\n errorMessage,\n error,\n possiblePayments = DEFAULT_POSSIBLE_PAYMENTS,\n maxVisiblePossiblePayments = 5,\n recognizedPayment: controlledRecognizedPayment,\n onRecognizedPaymentChange,\n autoDetect = true,\n id: providedId,\n \"aria-label\": ariaLabel,\n testID,\n themeMode,\n themeProductContext,\n ...rest\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const [internalState, setInternalState] = useState<\"default\" | \"focus\">(\n \"default\"\n );\n const [passValue, setPassValue] = useState(value ?? \"\");\n const [detectedPayment, setDetectedPayment] =\n useState<PaymentSystemKey | null>(null);\n const inputRef = useRef<HTMLInputElement>(null);\n\n // Generate unique IDs for accessibility\n const rawId = useId();\n const safeId = rawId.replace(/:/g, \"\");\n const inputId = providedId || `input-payment-${safeId}`;\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\n useEffect(() => {\n if (value !== undefined) {\n setPassValue(value);\n }\n }, [value]);\n\n // Auto-detect payment system when value changes\n // Only detect cards that are in the possiblePayments list\n useEffect(() => {\n if (autoDetect && passValue) {\n const detected = detectPaymentSystem(passValue);\n // Only use the detected payment if it's in possiblePayments\n const validDetected =\n detected && possiblePayments.includes(detected) ? detected : null;\n setDetectedPayment(validDetected);\n onRecognizedPaymentChange?.(validDetected);\n } else if (!passValue) {\n setDetectedPayment(null);\n if (autoDetect) {\n onRecognizedPaymentChange?.(null);\n }\n }\n }, [passValue, autoDetect, onRecognizedPaymentChange, possiblePayments]);\n\n const isDisable = disabled;\n const isError = !!(errorMessage || error);\n const isFocus = internalState === \"focus\";\n\n // Determine which payment to display\n const displayRecognizedPayment =\n controlledRecognizedPayment ?? detectedPayment;\n\n // Resolve Config from Theme\n const sizeStyles = theme.sizing.input(size);\n const inputColors = theme.colors.control.input;\n\n const handleFocus = () => {\n if (!isDisable) {\n setInternalState(\"focus\");\n }\n };\n\n const handleBlur = () => {\n if (!isDisable) {\n setInternalState(\"default\");\n }\n };\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n\n if (onChange) {\n onChange(e);\n }\n if (onChangeText) {\n onChangeText(newValue);\n }\n\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 // Resolve background and border colors based on state\n let backgroundColor = 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 const iconColor = inputColors.placeholder;\n\n // Padding values from Figma design\n const paddingConfig: Record<\n string,\n { vertical: number; horizontal: number }\n > = {\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: Record<string, number> = {\n xl: 8,\n lg: 8,\n md: 8,\n sm: 4,\n xs: 4,\n };\n\n // Icon sizes from Figma design\n const iconSizeConfig: Record<string, number> = {\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: Record<\n string,\n { width: number; offset: number }\n > = {\n xl: { width: 1, offset: -1 },\n lg: { width: 1, offset: -1 },\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 <Box\n backgroundColor={backgroundColor}\n borderColor={borderColor}\n borderWidth={borderColor !== \"transparent\" ? 1 : 0}\n borderRadius={borderRadius}\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 ...(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 {icon && (\n <Box\n alignItems=\"center\"\n justifyContent=\"center\"\n role=\"img\"\n aria-hidden={true}\n >\n {React.isValidElement(icon)\n ? React.cloneElement(\n icon as React.ReactElement<{\n size?: number;\n color?: string;\n }>,\n {\n size: iconSize,\n color: iconColor,\n }\n )\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=\"text\"\n inputMode=\"numeric\"\n autoComplete=\"off\"\n color={textColor}\n fontSize={sizeStyles.fontSize}\n placeholderTextColor={placeholderColor}\n aria-invalid={isError || undefined}\n aria-describedby={errorMessage ? errorId : undefined}\n aria-label={ariaLabel || \"Card number\"}\n aria-disabled={isDisable || undefined}\n data-testid=\"input-payment__field\"\n {...rest}\n />\n </Box>\n\n {possiblePayments.length > 0 && (\n <Box\n alignItems=\"center\"\n justifyContent=\"center\"\n data-testid=\"input-payment__card-icons\"\n style={{ overflow: \"hidden\" }}\n >\n <PaymentIcons\n possiblePayments={possiblePayments}\n maxVisible={maxVisiblePossiblePayments}\n recognizedPayment={displayRecognizedPayment}\n iconHeight={iconSize}\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 >\n {errorMessage}\n </Text>\n )}\n </Box>\n );\n }\n);\n\nInputPayment.displayName = \"InputPayment\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n overflow: ${(props) => props.overflow || \"visible\"};\n overflow-x: ${(props) => props.overflowX || \"visible\"};\n overflow-y: ${(props) => props.overflowY || \"visible\"};\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n &:hover {\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-current\": ariaCurrent,\n \"aria-disabled\": ariaDisabled,\n \"aria-live\": ariaLive,\n \"aria-busy\": ariaBusy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n type,\n disabled,\n id,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n elementType={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\n\n// Props from BoxProps, TextProps, SpinnerProps, IconProps, DividerProps\n// that are NOT valid HTML attributes and must not reach the DOM.\nexport const NON_HTML_PROPS = new Set([\n // BoxProps — layout & styling\n \"backgroundColor\",\n \"borderColor\",\n \"borderWidth\",\n \"borderBottomWidth\",\n \"borderBottomColor\",\n \"borderTopWidth\",\n \"borderTopColor\",\n \"borderLeftWidth\",\n \"borderLeftColor\",\n \"borderRightWidth\",\n \"borderRightColor\",\n \"borderRadius\",\n \"borderStyle\",\n \"flexDirection\",\n \"flexWrap\",\n \"alignItems\",\n \"justifyContent\",\n \"alignSelf\",\n \"flex\",\n \"flexShrink\",\n \"gap\",\n \"position\",\n \"top\",\n \"bottom\",\n \"left\",\n \"right\",\n \"outline\",\n \"overflow\",\n \"overflowX\",\n \"overflowY\",\n \"zIndex\",\n \"cursor\",\n \"padding\",\n \"paddingHorizontal\",\n \"paddingVertical\",\n \"paddingTop\",\n \"paddingBottom\",\n \"paddingLeft\",\n \"paddingRight\",\n \"margin\",\n \"marginTop\",\n \"marginBottom\",\n \"marginLeft\",\n \"marginRight\",\n \"minWidth\",\n \"minHeight\",\n \"maxWidth\",\n \"maxHeight\",\n \"hoverStyle\",\n \"pressStyle\",\n \"focusStyle\",\n \"outlineColor\",\n \"outlineWidth\",\n \"outlineOffset\",\n \"outlineStyle\",\n // BoxProps — RN-only\n \"onPress\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n \"testID\",\n // Box — custom element type\n \"elementType\",\n // TextProps\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"lineHeight\",\n \"whiteSpace\",\n \"textAlign\",\n \"textDecoration\",\n \"numberOfLines\",\n \"letterSpacing\",\n \"textTransform\",\n // SpinnerProps\n \"strokeWidth\",\n // DividerProps\n \"vertical\",\n \"dashStroke\",\n]);\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, any>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = elementType || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (!NON_HTML_PROPS.has(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(Tag, { ref, ...htmlProps }, children);\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredSpan = createFilteredElement(\"span\");\n\nconst StyledText = styled(FilteredSpan)<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n","import React, { forwardRef } from \"react\";\nimport styled from \"styled-components\";\nimport { InputPrimitiveProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledInput = styled.input<InputPrimitiveProps>`\n background: transparent;\n border: none;\n outline: none;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-family: inherit;\n text-align: inherit;\n\n &::placeholder {\n color: ${(props) =>\n props.placeholderTextColor || \"rgba(255, 255, 255, 0.5)\"};\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n\n /* Override browser autofill background */\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-box-shadow: 0 0 0 1000px transparent inset !important;\n -webkit-background-clip: text !important;\n -webkit-text-fill-color: ${(props) => props.color || \"inherit\"} !important;\n }\n`;\n\nexport const InputPrimitive = forwardRef<HTMLInputElement, 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 name,\n type,\n inputMode,\n autoComplete,\n id,\n \"aria-invalid\": ariaInvalid,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel,\n \"aria-disabled\": ariaDisabled,\n \"data-testid\": dataTestId,\n ...rest\n },\n ref\n ) => {\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (onChange) {\n onChange(e);\n }\n if (onChangeText) {\n onChangeText(e.target.value);\n }\n };\n\n // Always pass value to make it a controlled input\n const inputValue = value !== undefined ? value : \"\";\n\n return (\n <StyledInput\n ref={ref}\n id={id}\n value={inputValue}\n name={name}\n placeholder={placeholder}\n onChange={handleChange}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n disabled={disabled}\n type={secureTextEntry ? \"password\" : type || \"text\"}\n inputMode={inputMode}\n autoComplete={autoComplete}\n style={style}\n color={color}\n fontSize={fontSize}\n placeholderTextColor={placeholderTextColor}\n maxLength={maxLength}\n aria-invalid={ariaInvalid}\n aria-describedby={ariaDescribedBy}\n aria-labelledby={ariaLabelledBy}\n aria-label={ariaLabel}\n aria-disabled={ariaDisabled}\n data-testid={dataTestId}\n {...rest}\n />\n );\n }\n);\n\nInputPrimitive.displayName = \"InputPrimitive\";\n"],"mappings":";AAAA,OAAOA;AAAA,EACL;AAAA,EACA,cAAAC;AAAA,EACA;AAAA,EACA;AAAA,OAGK;;;ACPP,OAAOC,YAAW;AAClB,OAAO,YAAY;;;ACDnB,OAAO,WAAW;AAIX,IAAM,iBAAiB,oBAAI,IAAI;AAAA;AAAA,EAEpC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA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;AAAA,oBACzB,oBAAkB,eAAe,UAAU;AAAA,oBAC3C,cAAY,aAAa;AAAA,oBACzB,iBAAe,aAAa;AAAA,oBAC5B,eAAY;AAAA,oBACX,GAAG;AAAA;AAAA,gBACN,GACF;AAAA,gBAEC,iBAAiB,SAAS,KACzB,gBAAAA;AAAA,kBAAC;AAAA;AAAA,oBACC,YAAW;AAAA,oBACX,gBAAe;AAAA,oBACf,eAAY;AAAA,oBACZ,OAAO,EAAE,UAAU,SAAS;AAAA,oBAE5B,0BAAAA;AAAA,sBAAC;AAAA;AAAA,wBACC;AAAA,wBACA,YAAY;AAAA,wBACZ,mBAAmB;AAAA,wBACnB,YAAY;AAAA;AAAA,oBACd;AAAA;AAAA,gBACF;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,cAE/B;AAAA;AAAA,UACH;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,aAAa,cAAc;","names":["React","forwardRef","React","React","styled","jsx","styled","styled","jsx","jsx","forwardRef","React"]}