@xsolla/xui-input-phone 0.138.0 → 0.138.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/native/index.js +5 -2
- package/native/index.js.map +1 -1
- package/native/index.mjs +4 -2
- package/native/index.mjs.map +1 -1
- package/package.json +3 -3
- package/web/index.js +5 -2
- package/web/index.js.map +1 -1
- package/web/index.mjs +4 -2
- package/web/index.mjs.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xsolla/xui-input-phone",
|
|
3
|
-
"version": "0.138.
|
|
3
|
+
"version": "0.138.1",
|
|
4
4
|
"main": "./web/index.js",
|
|
5
5
|
"module": "./web/index.mjs",
|
|
6
6
|
"types": "./web/index.d.ts",
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"test:coverage": "vitest run --coverage"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@xsolla/xui-core": "0.138.
|
|
17
|
-
"@xsolla/xui-primitives-core": "0.138.
|
|
16
|
+
"@xsolla/xui-core": "0.138.1",
|
|
17
|
+
"@xsolla/xui-primitives-core": "0.138.1",
|
|
18
18
|
"libphonenumber-js": "^1.10.56"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
package/web/index.js
CHANGED
|
@@ -454,6 +454,9 @@ var InputPrimitive = (0, import_react3.forwardRef)(
|
|
|
454
454
|
);
|
|
455
455
|
InputPrimitive.displayName = "InputPrimitive";
|
|
456
456
|
|
|
457
|
+
// ../primitives-web/src/index.tsx
|
|
458
|
+
var isWeb = true;
|
|
459
|
+
|
|
457
460
|
// src/InputPhone.tsx
|
|
458
461
|
var import_xui_core = require("@xsolla/xui-core");
|
|
459
462
|
|
|
@@ -2437,7 +2440,7 @@ var InputPhone = (0, import_react4.forwardRef)(
|
|
|
2437
2440
|
}
|
|
2438
2441
|
}, [isDropdownOpen]);
|
|
2439
2442
|
(0, import_react4.useEffect)(() => {
|
|
2440
|
-
if (!isDropdownOpen || !
|
|
2443
|
+
if (!isDropdownOpen || !isWeb) return;
|
|
2441
2444
|
const handleClickOutside = (event) => {
|
|
2442
2445
|
const target = event.target;
|
|
2443
2446
|
if (dropdownRef.current && !dropdownRef.current.contains(target) && countryButtonRef.current && !countryButtonRef.current.contains(target)) {
|
|
@@ -2660,7 +2663,7 @@ var InputPhone = (0, import_react4.forwardRef)(
|
|
|
2660
2663
|
const flagSize = flagSizeConfig[size];
|
|
2661
2664
|
const selectorWidth = selectorWidthConfig[size];
|
|
2662
2665
|
const focusOutline = focusOutlineConfig[size];
|
|
2663
|
-
const dropdownStyles =
|
|
2666
|
+
const dropdownStyles = isWeb ? {
|
|
2664
2667
|
boxShadow: "0 4px 12px rgba(0,0,0,0.15)",
|
|
2665
2668
|
maxHeight: 240,
|
|
2666
2669
|
overflowY: "auto"
|