@xsolla/xui-input-phone 0.128.0 → 0.130.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-input-phone",
3
- "version": "0.128.0",
3
+ "version": "0.130.0",
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.128.0",
17
- "@xsolla/xui-primitives-core": "0.128.0",
16
+ "@xsolla/xui-core": "0.130.0",
17
+ "@xsolla/xui-primitives-core": "0.130.0",
18
18
  "libphonenumber-js": "^1.10.56"
19
19
  },
20
20
  "peerDependencies": {
package/web/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
1
  import React, { ReactNode, InputHTMLAttributes } from 'react';
2
+ import { ThemeOverrideProps } from '@xsolla/xui-core';
2
3
 
3
4
  /**
4
5
  * Country data for phone input
@@ -13,7 +14,7 @@ interface Country {
13
14
  /** Flag icon component */
14
15
  flag?: ReactNode;
15
16
  }
16
- interface InputPhoneProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
17
+ interface InputPhoneProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange">, ThemeOverrideProps {
17
18
  /**
18
19
  * Property for specifying the value of the control.
19
20
  */
package/web/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import React, { ReactNode, InputHTMLAttributes } from 'react';
2
+ import { ThemeOverrideProps } from '@xsolla/xui-core';
2
3
 
3
4
  /**
4
5
  * Country data for phone input
@@ -13,7 +14,7 @@ interface Country {
13
14
  /** Flag icon component */
14
15
  flag?: ReactNode;
15
16
  }
16
- interface InputPhoneProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange"> {
17
+ interface InputPhoneProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "size" | "onChange">, ThemeOverrideProps {
17
18
  /**
18
19
  * Property for specifying the value of the control.
19
20
  */
package/web/index.js CHANGED
@@ -81,6 +81,8 @@ var StyledBox = import_styled_components.default.div`
81
81
  width: ${(props) => typeof props.width === "number" ? `${props.width}px` : props.width || "auto"};
82
82
  min-width: ${(props) => typeof props.minWidth === "number" ? `${props.minWidth}px` : props.minWidth || "auto"};
83
83
  min-height: ${(props) => typeof props.minHeight === "number" ? `${props.minHeight}px` : props.minHeight || "auto"};
84
+ max-width: ${(props) => typeof props.maxWidth === "number" ? `${props.maxWidth}px` : props.maxWidth || "none"};
85
+ max-height: ${(props) => typeof props.maxHeight === "number" ? `${props.maxHeight}px` : props.maxHeight || "none"};
84
86
 
85
87
  padding: ${(props) => typeof props.padding === "number" ? `${props.padding}px` : props.padding || 0};
86
88
  ${(props) => props.paddingHorizontal && `
@@ -2312,9 +2314,11 @@ var InputPhone = (0, import_react3.forwardRef)(
2312
2314
  checkedIcon = /* @__PURE__ */ (0, import_jsx_runtime258.jsx)(CheckCr, {}),
2313
2315
  id: providedId,
2314
2316
  "aria-label": ariaLabel,
2315
- testID
2317
+ testID,
2318
+ themeMode,
2319
+ themeProductContext
2316
2320
  }, ref) => {
2317
- const { theme } = (0, import_xui_core.useDesignSystem)();
2321
+ const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
2318
2322
  const [internalState, setInternalState] = (0, import_react3.useState)(
2319
2323
  "default"
2320
2324
  );