@xsolla/xui-input-payment 0.136.0 → 0.137.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 +4 -4
- package/web/index.js +105 -28
- package/web/index.js.map +1 -1
- package/web/index.mjs +91 -14
- package/web/index.mjs.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-input-payment",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.137.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.
|
|
17
|
-
"@xsolla/xui-icons-payment": "0.
|
|
18
|
-
"@xsolla/xui-primitives-core": "0.
|
|
16
|
+
"@xsolla/xui-core": "0.137.0",
|
|
17
|
+
"@xsolla/xui-icons-payment": "0.137.0",
|
|
18
|
+
"@xsolla/xui-primitives-core": "0.137.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"react": ">=16.8.0",
|
package/web/index.js
CHANGED
|
@@ -35,13 +35,85 @@ __export(index_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(index_exports);
|
|
36
36
|
|
|
37
37
|
// src/InputPayment.tsx
|
|
38
|
-
var
|
|
38
|
+
var import_react4 = __toESM(require("react"));
|
|
39
39
|
|
|
40
40
|
// ../primitives-web/src/Box.tsx
|
|
41
|
-
var
|
|
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
|
+
|
|
47
|
+
// ../../node_modules/@emotion/memoize/dist/memoize.esm.js
|
|
48
|
+
function memoize(fn) {
|
|
49
|
+
var cache = {};
|
|
50
|
+
return function(arg) {
|
|
51
|
+
if (cache[arg] === void 0) cache[arg] = fn(arg);
|
|
52
|
+
return cache[arg];
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
var memoize_esm_default = memoize;
|
|
56
|
+
|
|
57
|
+
// ../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js
|
|
58
|
+
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
|
|
59
|
+
var index = memoize_esm_default(
|
|
60
|
+
function(prop) {
|
|
61
|
+
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
|
|
62
|
+
}
|
|
63
|
+
/* Z+1 */
|
|
64
|
+
);
|
|
65
|
+
var is_prop_valid_esm_default = index;
|
|
66
|
+
|
|
67
|
+
// ../primitives-web/src/filterDOMProps.ts
|
|
68
|
+
var ADDITIONAL_BLOCKED_PROPS = /* @__PURE__ */ new Set([
|
|
69
|
+
// RN-only event handlers (pass isPropValid's on* pattern)
|
|
70
|
+
"onPress",
|
|
71
|
+
"onChangeText",
|
|
72
|
+
"onLayout",
|
|
73
|
+
"onMoveShouldSetResponder",
|
|
74
|
+
"onResponderGrant",
|
|
75
|
+
"onResponderMove",
|
|
76
|
+
"onResponderRelease",
|
|
77
|
+
"onResponderTerminate",
|
|
78
|
+
// SVG attributes that pass isPropValid
|
|
79
|
+
"strokeWidth",
|
|
80
|
+
// CSS properties that pass isPropValid but are used as component props
|
|
81
|
+
"overflow",
|
|
82
|
+
"cursor",
|
|
83
|
+
"fontSize",
|
|
84
|
+
"fontWeight",
|
|
85
|
+
"fontFamily",
|
|
86
|
+
"textDecoration"
|
|
87
|
+
]);
|
|
88
|
+
function shouldForwardProp(key) {
|
|
89
|
+
if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;
|
|
90
|
+
return is_prop_valid_esm_default(key);
|
|
91
|
+
}
|
|
92
|
+
function createFilteredElement(defaultTag) {
|
|
93
|
+
const Component = import_react.default.forwardRef(
|
|
94
|
+
({ children, elementType, ...props }, ref) => {
|
|
95
|
+
const Tag = elementType || defaultTag;
|
|
96
|
+
const htmlProps = {};
|
|
97
|
+
for (const key of Object.keys(props)) {
|
|
98
|
+
if (shouldForwardProp(key)) {
|
|
99
|
+
htmlProps[key] = props[key];
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return import_react.default.createElement(
|
|
103
|
+
Tag,
|
|
104
|
+
{ ref, ...htmlProps },
|
|
105
|
+
children
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
Component.displayName = `Filtered(${defaultTag})`;
|
|
110
|
+
return Component;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// ../primitives-web/src/Box.tsx
|
|
43
114
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
44
|
-
var
|
|
115
|
+
var FilteredDiv = createFilteredElement("div");
|
|
116
|
+
var StyledBox = (0, import_styled_components.default)(FilteredDiv)`
|
|
45
117
|
display: flex;
|
|
46
118
|
box-sizing: border-box;
|
|
47
119
|
background-color: ${(props) => props.backgroundColor || "transparent"};
|
|
@@ -128,7 +200,7 @@ var StyledBox = import_styled_components.default.div`
|
|
|
128
200
|
${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
|
|
129
201
|
}
|
|
130
202
|
`;
|
|
131
|
-
var Box =
|
|
203
|
+
var Box = import_react2.default.forwardRef(
|
|
132
204
|
({
|
|
133
205
|
children,
|
|
134
206
|
onPress,
|
|
@@ -153,6 +225,8 @@ var Box = import_react.default.forwardRef(
|
|
|
153
225
|
type,
|
|
154
226
|
disabled,
|
|
155
227
|
id,
|
|
228
|
+
testID,
|
|
229
|
+
"data-testid": dataTestId,
|
|
156
230
|
...props
|
|
157
231
|
}, ref) => {
|
|
158
232
|
if (as === "img" && src) {
|
|
@@ -180,7 +254,7 @@ var Box = import_react.default.forwardRef(
|
|
|
180
254
|
StyledBox,
|
|
181
255
|
{
|
|
182
256
|
ref,
|
|
183
|
-
as,
|
|
257
|
+
elementType: as,
|
|
184
258
|
id,
|
|
185
259
|
type: as === "button" ? type || "button" : void 0,
|
|
186
260
|
disabled: as === "button" ? disabled : void 0,
|
|
@@ -200,6 +274,7 @@ var Box = import_react.default.forwardRef(
|
|
|
200
274
|
"aria-controls": ariaControls,
|
|
201
275
|
"aria-live": ariaLive,
|
|
202
276
|
tabIndex: tabIndex !== void 0 ? tabIndex : void 0,
|
|
277
|
+
"data-testid": dataTestId || testID,
|
|
203
278
|
...props,
|
|
204
279
|
children
|
|
205
280
|
}
|
|
@@ -211,7 +286,8 @@ Box.displayName = "Box";
|
|
|
211
286
|
// ../primitives-web/src/Text.tsx
|
|
212
287
|
var import_styled_components2 = __toESM(require("styled-components"));
|
|
213
288
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
214
|
-
var
|
|
289
|
+
var FilteredSpan = createFilteredElement("span");
|
|
290
|
+
var StyledText = (0, import_styled_components2.default)(FilteredSpan)`
|
|
215
291
|
color: ${(props) => props.color || "inherit"};
|
|
216
292
|
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
217
293
|
font-weight: ${(props) => props.fontWeight || "normal"};
|
|
@@ -242,10 +318,11 @@ var Text = ({
|
|
|
242
318
|
};
|
|
243
319
|
|
|
244
320
|
// ../primitives-web/src/Input.tsx
|
|
245
|
-
var
|
|
321
|
+
var import_react3 = require("react");
|
|
246
322
|
var import_styled_components3 = __toESM(require("styled-components"));
|
|
247
323
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
248
|
-
var
|
|
324
|
+
var FilteredInput = createFilteredElement("input");
|
|
325
|
+
var StyledInput = (0, import_styled_components3.default)(FilteredInput)`
|
|
249
326
|
background: transparent;
|
|
250
327
|
border: none;
|
|
251
328
|
outline: none;
|
|
@@ -276,7 +353,7 @@ var StyledInput = import_styled_components3.default.input`
|
|
|
276
353
|
-webkit-text-fill-color: ${(props) => props.color || "inherit"} !important;
|
|
277
354
|
}
|
|
278
355
|
`;
|
|
279
|
-
var InputPrimitive = (0,
|
|
356
|
+
var InputPrimitive = (0, import_react3.forwardRef)(
|
|
280
357
|
({
|
|
281
358
|
value,
|
|
282
359
|
placeholder,
|
|
@@ -415,15 +492,15 @@ var detectPaymentSystem = (cardNumber) => {
|
|
|
415
492
|
};
|
|
416
493
|
var CARD_GAP = 4;
|
|
417
494
|
var PaymentIcons = ({ possiblePayments, maxVisible, recognizedPayment, iconHeight }) => {
|
|
418
|
-
const [cyclingIndex, setCyclingIndex] = (0,
|
|
419
|
-
const [isTransitioning, setIsTransitioning] = (0,
|
|
420
|
-
const [isRecognized, setIsRecognized] = (0,
|
|
495
|
+
const [cyclingIndex, setCyclingIndex] = (0, import_react4.useState)(0);
|
|
496
|
+
const [isTransitioning, setIsTransitioning] = (0, import_react4.useState)(false);
|
|
497
|
+
const [isRecognized, setIsRecognized] = (0, import_react4.useState)(false);
|
|
421
498
|
const scaledCardHeight = iconHeight;
|
|
422
499
|
const scaledCardWidth = Math.round(iconHeight * (4 / 3));
|
|
423
500
|
const scaledGap = CARD_GAP;
|
|
424
501
|
const constantCards = possiblePayments.slice(0, maxVisible - 1);
|
|
425
502
|
const cyclingCards = possiblePayments.slice(maxVisible - 1);
|
|
426
|
-
(0,
|
|
503
|
+
(0, import_react4.useEffect)(() => {
|
|
427
504
|
if (recognizedPayment) {
|
|
428
505
|
setIsRecognized(true);
|
|
429
506
|
} else {
|
|
@@ -433,7 +510,7 @@ var PaymentIcons = ({ possiblePayments, maxVisible, recognizedPayment, iconHeigh
|
|
|
433
510
|
return () => clearTimeout(timeout);
|
|
434
511
|
}
|
|
435
512
|
}, [recognizedPayment]);
|
|
436
|
-
(0,
|
|
513
|
+
(0, import_react4.useEffect)(() => {
|
|
437
514
|
if (cyclingCards.length <= 1 || recognizedPayment) return;
|
|
438
515
|
const interval = setInterval(() => {
|
|
439
516
|
setIsTransitioning(true);
|
|
@@ -485,7 +562,7 @@ var PaymentIcons = ({ possiblePayments, maxVisible, recognizedPayment, iconHeigh
|
|
|
485
562
|
height: scaledCardHeight,
|
|
486
563
|
style: { overflow: "hidden" },
|
|
487
564
|
children: [
|
|
488
|
-
constantCards.map((key,
|
|
565
|
+
constantCards.map((key, index2) => {
|
|
489
566
|
const IconComponent = paymentIconComponents[key];
|
|
490
567
|
const isRecognizedCard = recognizedPayment === key;
|
|
491
568
|
let translateX = 0;
|
|
@@ -493,7 +570,7 @@ var PaymentIcons = ({ possiblePayments, maxVisible, recognizedPayment, iconHeigh
|
|
|
493
570
|
if (isRecognized && recognizedPayment) {
|
|
494
571
|
if (isRecognizedCard) {
|
|
495
572
|
const targetPosition = (totalVisibleCards - 1) * (scaledCardWidth + scaledGap);
|
|
496
|
-
const currentPosition =
|
|
573
|
+
const currentPosition = index2 * (scaledCardWidth + scaledGap);
|
|
497
574
|
translateX = targetPosition - currentPosition;
|
|
498
575
|
opacity = 1;
|
|
499
576
|
} else {
|
|
@@ -505,7 +582,7 @@ var PaymentIcons = ({ possiblePayments, maxVisible, recognizedPayment, iconHeigh
|
|
|
505
582
|
Box,
|
|
506
583
|
{
|
|
507
584
|
position: "absolute",
|
|
508
|
-
left:
|
|
585
|
+
left: index2 * (scaledCardWidth + scaledGap),
|
|
509
586
|
style: {
|
|
510
587
|
transform: import_xui_core.isWeb ? `translateX(${translateX}px)` : void 0,
|
|
511
588
|
opacity,
|
|
@@ -525,9 +602,9 @@ var PaymentIcons = ({ possiblePayments, maxVisible, recognizedPayment, iconHeigh
|
|
|
525
602
|
left: (maxVisible - 1) * (scaledCardWidth + scaledGap),
|
|
526
603
|
width: scaledCardWidth,
|
|
527
604
|
height: scaledCardHeight,
|
|
528
|
-
children: cyclingCards.map((key,
|
|
605
|
+
children: cyclingCards.map((key, index2) => {
|
|
529
606
|
const IconComponent = paymentIconComponents[key];
|
|
530
|
-
const isCurrentCycling =
|
|
607
|
+
const isCurrentCycling = index2 === cyclingIndex;
|
|
531
608
|
const isRecognizedCard = recognizedPayment === key;
|
|
532
609
|
let translateX = 0;
|
|
533
610
|
let opacity = isCurrentCycling && !isTransitioning ? 1 : 0;
|
|
@@ -563,7 +640,7 @@ var PaymentIcons = ({ possiblePayments, maxVisible, recognizedPayment, iconHeigh
|
|
|
563
640
|
}
|
|
564
641
|
);
|
|
565
642
|
};
|
|
566
|
-
var InputPayment = (0,
|
|
643
|
+
var InputPayment = (0, import_react4.forwardRef)(
|
|
567
644
|
({
|
|
568
645
|
value,
|
|
569
646
|
icon,
|
|
@@ -589,27 +666,27 @@ var InputPayment = (0, import_react3.forwardRef)(
|
|
|
589
666
|
...rest
|
|
590
667
|
}, ref) => {
|
|
591
668
|
const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
|
|
592
|
-
const [internalState, setInternalState] = (0,
|
|
669
|
+
const [internalState, setInternalState] = (0, import_react4.useState)(
|
|
593
670
|
"default"
|
|
594
671
|
);
|
|
595
|
-
const [passValue, setPassValue] = (0,
|
|
596
|
-
const [detectedPayment, setDetectedPayment] = (0,
|
|
597
|
-
const inputRef = (0,
|
|
672
|
+
const [passValue, setPassValue] = (0, import_react4.useState)(value ?? "");
|
|
673
|
+
const [detectedPayment, setDetectedPayment] = (0, import_react4.useState)(null);
|
|
674
|
+
const inputRef = (0, import_react4.useRef)(null);
|
|
598
675
|
const rawId = (0, import_xui_core.useId)();
|
|
599
676
|
const safeId = rawId.replace(/:/g, "");
|
|
600
677
|
const inputId = providedId || `input-payment-${safeId}`;
|
|
601
678
|
const errorId = `${inputId}-error`;
|
|
602
|
-
|
|
679
|
+
import_react4.default.useImperativeHandle(
|
|
603
680
|
ref,
|
|
604
681
|
() => inputRef.current,
|
|
605
682
|
[]
|
|
606
683
|
);
|
|
607
|
-
(0,
|
|
684
|
+
(0, import_react4.useEffect)(() => {
|
|
608
685
|
if (value !== void 0) {
|
|
609
686
|
setPassValue(value);
|
|
610
687
|
}
|
|
611
688
|
}, [value]);
|
|
612
|
-
(0,
|
|
689
|
+
(0, import_react4.useEffect)(() => {
|
|
613
690
|
if (autoDetect && passValue) {
|
|
614
691
|
const detected = detectPaymentSystem(passValue);
|
|
615
692
|
const validDetected = detected && possiblePayments.includes(detected) ? detected : null;
|
|
@@ -746,7 +823,7 @@ var InputPayment = (0, import_react3.forwardRef)(
|
|
|
746
823
|
justifyContent: "center",
|
|
747
824
|
role: "img",
|
|
748
825
|
"aria-hidden": true,
|
|
749
|
-
children:
|
|
826
|
+
children: import_react4.default.isValidElement(icon) ? import_react4.default.cloneElement(
|
|
750
827
|
icon,
|
|
751
828
|
{
|
|
752
829
|
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\nInputPrimitive.displayName = \"InputPrimitive\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAOO;;;ACPP,mBAAkB;AAClB,+BAAmB;AA+MX;AA5MR,IAAM,YAAY,yBAAAC,QAAO;AAAA;AAAA;AAAA,sBAGH,CAAC,UAAU,MAAM,mBAAmB,aAAa;AAAA,kBACrD,CAAC,UAAU,MAAM,eAAe,aAAa;AAAA,kBAC7C,CAAC,UACf,OAAO,MAAM,gBAAgB,WACzB,GAAG,MAAM,WAAW,OACpB,MAAM,eAAe,CAAC;AAAA;AAAA,IAE1B,CAAC,UACD,MAAM,sBAAsB,UAC5B;AAAA,2BACuB,OAAO,MAAM,sBAAsB,WAAW,GAAG,MAAM,iBAAiB,OAAO,MAAM,iBAAiB;AAAA,2BACtG,MAAM,qBAAqB,MAAM,eAAe,aAAa;AAAA;AAAA,GAErF;AAAA,IACC,CAAC,UACD,MAAM,mBAAmB,UACzB;AAAA,wBACoB,OAAO,MAAM,mBAAmB,WAAW,GAAG,MAAM,cAAc,OAAO,MAAM,cAAc;AAAA,wBAC7F,MAAM,kBAAkB,MAAM,eAAe,aAAa;AAAA;AA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OAAI,MAAM,GAAG,QAAO,QAAO,gBAAe,UACzC;AAAA,kBAAC;AAAA;AAAA,oBACC,KAAK;AAAA,oBACL,IAAI;AAAA,oBACJ,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","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","../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js","../../../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 testID,\n \"data-testid\": dataTestId,\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 data-testid={dataTestId || testID}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n // RN-only event handlers (pass isPropValid's on* pattern)\n \"onPress\",\n \"onChangeText\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n // SVG attributes that pass isPropValid\n \"strokeWidth\",\n // CSS properties that pass isPropValid but are used as component props\n \"overflow\",\n \"cursor\",\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"textDecoration\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n return isPropValid(key);\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 * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\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, Record<string, unknown>>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = (elementType as string) || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (shouldForwardProp(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(\n Tag,\n { ref, ...htmlProps },\n children as React.ReactNode\n );\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\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\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredInput = createFilteredElement(\"input\");\n\nconst StyledInput = styled(FilteredInput)<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;;;ACAlB,SAAS,QAAQ,IAAI;AACnB,MAAI,QAAQ,CAAC;AACb,SAAO,SAAU,KAAK;AACpB,QAAI,MAAM,GAAG,MAAM,OAAW,OAAM,GAAG,IAAI,GAAG,GAAG;AACjD,WAAO,MAAM,GAAG;AAAA,EAClB;AACF;AAEA,IAAO,sBAAQ;;;ACNf,IAAI,kBAAkB;AAEtB,IAAI,QAAQ;AAAA,EAAQ,SAAU,MAAM;AAClC,WAAO,gBAAgB,KAAK,IAAI,KAAK,KAAK,WAAW,CAAC,MAAM,OAEzD,KAAK,WAAW,CAAC,MAAM,OAEvB,KAAK,WAAW,CAAC,IAAI;AAAA,EAC1B;AAAA;AAEA;AAEA,IAAO,4BAAQ;;;AFRR,IAAM,2BAA2B,oBAAI,IAAI;AAAA;AAAA,EAE9C;AAAA,EACA;AAAA,EACA;AA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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","index","React"]}
|
package/web/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/InputPayment.tsx
|
|
2
|
-
import
|
|
2
|
+
import React4, {
|
|
3
3
|
useState,
|
|
4
4
|
forwardRef as forwardRef2,
|
|
5
5
|
useRef,
|
|
@@ -7,10 +7,82 @@ import React3, {
|
|
|
7
7
|
} from "react";
|
|
8
8
|
|
|
9
9
|
// ../primitives-web/src/Box.tsx
|
|
10
|
-
import
|
|
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
|
+
|
|
16
|
+
// ../../node_modules/@emotion/memoize/dist/memoize.esm.js
|
|
17
|
+
function memoize(fn) {
|
|
18
|
+
var cache = {};
|
|
19
|
+
return function(arg) {
|
|
20
|
+
if (cache[arg] === void 0) cache[arg] = fn(arg);
|
|
21
|
+
return cache[arg];
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
var memoize_esm_default = memoize;
|
|
25
|
+
|
|
26
|
+
// ../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js
|
|
27
|
+
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
|
|
28
|
+
var index = memoize_esm_default(
|
|
29
|
+
function(prop) {
|
|
30
|
+
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
|
|
31
|
+
}
|
|
32
|
+
/* Z+1 */
|
|
33
|
+
);
|
|
34
|
+
var is_prop_valid_esm_default = index;
|
|
35
|
+
|
|
36
|
+
// ../primitives-web/src/filterDOMProps.ts
|
|
37
|
+
var ADDITIONAL_BLOCKED_PROPS = /* @__PURE__ */ new Set([
|
|
38
|
+
// RN-only event handlers (pass isPropValid's on* pattern)
|
|
39
|
+
"onPress",
|
|
40
|
+
"onChangeText",
|
|
41
|
+
"onLayout",
|
|
42
|
+
"onMoveShouldSetResponder",
|
|
43
|
+
"onResponderGrant",
|
|
44
|
+
"onResponderMove",
|
|
45
|
+
"onResponderRelease",
|
|
46
|
+
"onResponderTerminate",
|
|
47
|
+
// SVG attributes that pass isPropValid
|
|
48
|
+
"strokeWidth",
|
|
49
|
+
// CSS properties that pass isPropValid but are used as component props
|
|
50
|
+
"overflow",
|
|
51
|
+
"cursor",
|
|
52
|
+
"fontSize",
|
|
53
|
+
"fontWeight",
|
|
54
|
+
"fontFamily",
|
|
55
|
+
"textDecoration"
|
|
56
|
+
]);
|
|
57
|
+
function shouldForwardProp(key) {
|
|
58
|
+
if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;
|
|
59
|
+
return is_prop_valid_esm_default(key);
|
|
60
|
+
}
|
|
61
|
+
function createFilteredElement(defaultTag) {
|
|
62
|
+
const Component = React.forwardRef(
|
|
63
|
+
({ children, elementType, ...props }, ref) => {
|
|
64
|
+
const Tag = elementType || defaultTag;
|
|
65
|
+
const htmlProps = {};
|
|
66
|
+
for (const key of Object.keys(props)) {
|
|
67
|
+
if (shouldForwardProp(key)) {
|
|
68
|
+
htmlProps[key] = props[key];
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return React.createElement(
|
|
72
|
+
Tag,
|
|
73
|
+
{ ref, ...htmlProps },
|
|
74
|
+
children
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
Component.displayName = `Filtered(${defaultTag})`;
|
|
79
|
+
return Component;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// ../primitives-web/src/Box.tsx
|
|
12
83
|
import { jsx } from "react/jsx-runtime";
|
|
13
|
-
var
|
|
84
|
+
var FilteredDiv = createFilteredElement("div");
|
|
85
|
+
var StyledBox = styled(FilteredDiv)`
|
|
14
86
|
display: flex;
|
|
15
87
|
box-sizing: border-box;
|
|
16
88
|
background-color: ${(props) => props.backgroundColor || "transparent"};
|
|
@@ -97,7 +169,7 @@ var StyledBox = styled.div`
|
|
|
97
169
|
${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
|
|
98
170
|
}
|
|
99
171
|
`;
|
|
100
|
-
var Box =
|
|
172
|
+
var Box = React2.forwardRef(
|
|
101
173
|
({
|
|
102
174
|
children,
|
|
103
175
|
onPress,
|
|
@@ -122,6 +194,8 @@ var Box = React.forwardRef(
|
|
|
122
194
|
type,
|
|
123
195
|
disabled,
|
|
124
196
|
id,
|
|
197
|
+
testID,
|
|
198
|
+
"data-testid": dataTestId,
|
|
125
199
|
...props
|
|
126
200
|
}, ref) => {
|
|
127
201
|
if (as === "img" && src) {
|
|
@@ -149,7 +223,7 @@ var Box = React.forwardRef(
|
|
|
149
223
|
StyledBox,
|
|
150
224
|
{
|
|
151
225
|
ref,
|
|
152
|
-
as,
|
|
226
|
+
elementType: as,
|
|
153
227
|
id,
|
|
154
228
|
type: as === "button" ? type || "button" : void 0,
|
|
155
229
|
disabled: as === "button" ? disabled : void 0,
|
|
@@ -169,6 +243,7 @@ var Box = React.forwardRef(
|
|
|
169
243
|
"aria-controls": ariaControls,
|
|
170
244
|
"aria-live": ariaLive,
|
|
171
245
|
tabIndex: tabIndex !== void 0 ? tabIndex : void 0,
|
|
246
|
+
"data-testid": dataTestId || testID,
|
|
172
247
|
...props,
|
|
173
248
|
children
|
|
174
249
|
}
|
|
@@ -180,7 +255,8 @@ Box.displayName = "Box";
|
|
|
180
255
|
// ../primitives-web/src/Text.tsx
|
|
181
256
|
import styled2 from "styled-components";
|
|
182
257
|
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
183
|
-
var
|
|
258
|
+
var FilteredSpan = createFilteredElement("span");
|
|
259
|
+
var StyledText = styled2(FilteredSpan)`
|
|
184
260
|
color: ${(props) => props.color || "inherit"};
|
|
185
261
|
font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
|
|
186
262
|
font-weight: ${(props) => props.fontWeight || "normal"};
|
|
@@ -214,7 +290,8 @@ var Text = ({
|
|
|
214
290
|
import { forwardRef } from "react";
|
|
215
291
|
import styled3 from "styled-components";
|
|
216
292
|
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
217
|
-
var
|
|
293
|
+
var FilteredInput = createFilteredElement("input");
|
|
294
|
+
var StyledInput = styled3(FilteredInput)`
|
|
218
295
|
background: transparent;
|
|
219
296
|
border: none;
|
|
220
297
|
outline: none;
|
|
@@ -478,7 +555,7 @@ var PaymentIcons = ({ possiblePayments, maxVisible, recognizedPayment, iconHeigh
|
|
|
478
555
|
height: scaledCardHeight,
|
|
479
556
|
style: { overflow: "hidden" },
|
|
480
557
|
children: [
|
|
481
|
-
constantCards.map((key,
|
|
558
|
+
constantCards.map((key, index2) => {
|
|
482
559
|
const IconComponent = paymentIconComponents[key];
|
|
483
560
|
const isRecognizedCard = recognizedPayment === key;
|
|
484
561
|
let translateX = 0;
|
|
@@ -486,7 +563,7 @@ var PaymentIcons = ({ possiblePayments, maxVisible, recognizedPayment, iconHeigh
|
|
|
486
563
|
if (isRecognized && recognizedPayment) {
|
|
487
564
|
if (isRecognizedCard) {
|
|
488
565
|
const targetPosition = (totalVisibleCards - 1) * (scaledCardWidth + scaledGap);
|
|
489
|
-
const currentPosition =
|
|
566
|
+
const currentPosition = index2 * (scaledCardWidth + scaledGap);
|
|
490
567
|
translateX = targetPosition - currentPosition;
|
|
491
568
|
opacity = 1;
|
|
492
569
|
} else {
|
|
@@ -498,7 +575,7 @@ var PaymentIcons = ({ possiblePayments, maxVisible, recognizedPayment, iconHeigh
|
|
|
498
575
|
Box,
|
|
499
576
|
{
|
|
500
577
|
position: "absolute",
|
|
501
|
-
left:
|
|
578
|
+
left: index2 * (scaledCardWidth + scaledGap),
|
|
502
579
|
style: {
|
|
503
580
|
transform: isWeb ? `translateX(${translateX}px)` : void 0,
|
|
504
581
|
opacity,
|
|
@@ -518,9 +595,9 @@ var PaymentIcons = ({ possiblePayments, maxVisible, recognizedPayment, iconHeigh
|
|
|
518
595
|
left: (maxVisible - 1) * (scaledCardWidth + scaledGap),
|
|
519
596
|
width: scaledCardWidth,
|
|
520
597
|
height: scaledCardHeight,
|
|
521
|
-
children: cyclingCards.map((key,
|
|
598
|
+
children: cyclingCards.map((key, index2) => {
|
|
522
599
|
const IconComponent = paymentIconComponents[key];
|
|
523
|
-
const isCurrentCycling =
|
|
600
|
+
const isCurrentCycling = index2 === cyclingIndex;
|
|
524
601
|
const isRecognizedCard = recognizedPayment === key;
|
|
525
602
|
let translateX = 0;
|
|
526
603
|
let opacity = isCurrentCycling && !isTransitioning ? 1 : 0;
|
|
@@ -592,7 +669,7 @@ var InputPayment = forwardRef2(
|
|
|
592
669
|
const safeId = rawId.replace(/:/g, "");
|
|
593
670
|
const inputId = providedId || `input-payment-${safeId}`;
|
|
594
671
|
const errorId = `${inputId}-error`;
|
|
595
|
-
|
|
672
|
+
React4.useImperativeHandle(
|
|
596
673
|
ref,
|
|
597
674
|
() => inputRef.current,
|
|
598
675
|
[]
|
|
@@ -739,7 +816,7 @@ var InputPayment = forwardRef2(
|
|
|
739
816
|
justifyContent: "center",
|
|
740
817
|
role: "img",
|
|
741
818
|
"aria-hidden": true,
|
|
742
|
-
children:
|
|
819
|
+
children: React4.isValidElement(icon) ? React4.cloneElement(
|
|
743
820
|
icon,
|
|
744
821
|
{
|
|
745
822
|
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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Ae,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","styled","jsx","styled","jsx","jsx","forwardRef","React"]}
|
|
1
|
+
{"version":3,"sources":["../../src/InputPayment.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/filterDOMProps.ts","../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js","../../../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 testID,\n \"data-testid\": dataTestId,\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 data-testid={dataTestId || testID}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n // RN-only event handlers (pass isPropValid's on* pattern)\n \"onPress\",\n \"onChangeText\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n // SVG attributes that pass isPropValid\n \"strokeWidth\",\n // CSS properties that pass isPropValid but are used as component props\n \"overflow\",\n \"cursor\",\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"textDecoration\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n return isPropValid(key);\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 * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\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, Record<string, unknown>>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = (elementType as string) || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (shouldForwardProp(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(\n Tag,\n { ref, ...htmlProps },\n children as React.ReactNode\n );\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\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\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredInput = createFilteredElement(\"input\");\n\nconst StyledInput = styled(FilteredInput)<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;;;ACAlB,SAAS,QAAQ,IAAI;AACnB,MAAI,QAAQ,CAAC;AACb,SAAO,SAAU,KAAK;AACpB,QAAI,MAAM,GAAG,MAAM,OAAW,OAAM,GAAG,IAAI,GAAG,GAAG;AACjD,WAAO,MAAM,GAAG;AAAA,EAClB;AACF;AAEA,IAAO,sBAAQ;;;ACNf,IAAI,kBAAkB;AAEtB,IAAI,QAAQ;AAAA,EAAQ,SAAU,MAAM;AAClC,WAAO,gBAAgB,KAAK,IAAI,KAAK,KAAK,WAAW,CAAC,MAAM,OAEzD,KAAK,WAAW,CAAC,MAAM,OAEvB,KAAK,WAAW,CAAC,IAAI;AAAA,EAC1B;AAAA;AAEA;AAEA,IAAO,4BAAQ;;;AFRR,IAAM,2BAA2B,oBAAI,IAAI;AAAA;AAAA,EAE9C;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;AACF,CAAC;AAED,SAAS,kBAAkB,KAAsB;AAC/C,MAAI,yBAAyB,IAAI,GAAG,EAAG,QAAO;AAC9C,SAAO,0BAAY,GAAG;AACxB;AAgBO,SAAS,sBAAsB,YAAoB;AACxD,QAAM,YAAY,MAAM;AAAA,IACtB,CAAC,EAAE,UAAU,aAAa,GAAG,MAAM,GAAG,QAAQ;AAC5C,YAAM,MAAO,eAA0B;AACvC,YAAM,YAAqC,CAAC;AAC5C,iBAAW,OAAO,OAAO,KA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led","styled","jsx","styled","jsx","index","forwardRef","React"]}
|