@alfalab/core-components-international-phone-input 1.2.2 → 1.2.3

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.
Files changed (158) hide show
  1. package/{Component-0816e61d.d.ts → Component-e63ec8aa.d.ts} +1 -1
  2. package/Component.mobile-ebda875c.d.ts +6 -0
  3. package/{cssm/index-8b2c2707.d.ts → Component.responsive-8566963f.d.ts} +4 -4
  4. package/Component.responsive.d.ts +10 -10
  5. package/Component.responsive.js +4 -4
  6. package/components/base-international-phone-input/Component.d.ts +3 -3
  7. package/components/base-international-phone-input/Component.js +1 -1
  8. package/components/base-international-phone-input/index.css +2 -2
  9. package/components/country-select/Component.js +1 -1
  10. package/components/country-select/index.css +8 -8
  11. package/components/flag-icon/component.js +1 -1
  12. package/components/flag-icon/index.css +3 -3
  13. package/components/select-field/component.js +1 -1
  14. package/components/select-field/index.css +9 -9
  15. package/cssm/{Component-0816e61d.d.ts → Component-e63ec8aa.d.ts} +1 -1
  16. package/cssm/Component.mobile-ebda875c.d.ts +6 -0
  17. package/{esm/index-8b2c2707.d.ts → cssm/Component.responsive-8566963f.d.ts} +4 -4
  18. package/cssm/Component.responsive.d.ts +10 -10
  19. package/cssm/Component.responsive.js +4 -4
  20. package/cssm/components/base-international-phone-input/Component.d.ts +3 -3
  21. package/cssm/{Component.desktop.d.ts → desktop/Component.desktop.d.ts} +1 -1
  22. package/cssm/{Component.desktop.js → desktop/Component.desktop.js} +15 -15
  23. package/cssm/desktop/index.d.ts +1 -1
  24. package/cssm/desktop/index.js +3 -3
  25. package/cssm/{Component.desktop-0aa4e915.d.ts → index-8566963f.d.ts} +2 -1
  26. package/cssm/index-89f0cb07.d.ts +2 -2
  27. package/cssm/index-ebda875c.d.ts +138 -13
  28. package/cssm/index.js +3 -3
  29. package/cssm/{Component.mobile.d.ts → mobile/Component.mobile.d.ts} +1 -1
  30. package/cssm/{Component.mobile.js → mobile/Component.mobile.js} +12 -12
  31. package/cssm/mobile/index.d.ts +1 -1
  32. package/cssm/mobile/index.js +2 -2
  33. package/cssm/types.d.ts +1 -1
  34. package/cssm/typings-e63ec8aa.d.ts +1819 -0
  35. package/cssm/utils-d2597f31.d.ts +1 -1
  36. package/{Component.desktop.d.ts → desktop/Component.desktop.d.ts} +1 -1
  37. package/{Component.desktop.js → desktop/Component.desktop.js} +11 -11
  38. package/desktop/index.d.ts +1 -1
  39. package/desktop/index.js +3 -3
  40. package/esm/{Component-0816e61d.d.ts → Component-e63ec8aa.d.ts} +1 -1
  41. package/esm/Component.mobile-ebda875c.d.ts +6 -0
  42. package/{index-8b2c2707.d.ts → esm/Component.responsive-8566963f.d.ts} +4 -4
  43. package/esm/Component.responsive.d.ts +10 -10
  44. package/esm/Component.responsive.js +3 -3
  45. package/esm/components/base-international-phone-input/Component.d.ts +3 -3
  46. package/esm/components/base-international-phone-input/Component.js +1 -1
  47. package/esm/components/base-international-phone-input/index.css +2 -2
  48. package/esm/components/country-select/Component.js +1 -1
  49. package/esm/components/country-select/index.css +8 -8
  50. package/esm/components/flag-icon/component.js +1 -1
  51. package/esm/components/flag-icon/index.css +3 -3
  52. package/esm/components/select-field/component.js +1 -1
  53. package/esm/components/select-field/index.css +9 -9
  54. package/esm/{Component.desktop.d.ts → desktop/Component.desktop.d.ts} +1 -1
  55. package/esm/{Component.desktop.js → desktop/Component.desktop.js} +9 -9
  56. package/esm/desktop/index.d.ts +1 -1
  57. package/esm/desktop/index.js +2 -2
  58. package/{modern/Component.desktop-0aa4e915.d.ts → esm/index-8566963f.d.ts} +2 -1
  59. package/esm/index-89f0cb07.d.ts +2 -2
  60. package/esm/index-ebda875c.d.ts +138 -13
  61. package/esm/index.js +3 -3
  62. package/esm/{Component.mobile.d.ts → mobile/Component.mobile.d.ts} +1 -1
  63. package/esm/{Component.mobile.js → mobile/Component.mobile.js} +8 -8
  64. package/esm/mobile/index.d.ts +1 -1
  65. package/esm/mobile/index.js +1 -1
  66. package/esm/types.d.ts +1 -1
  67. package/esm/typings-e63ec8aa.d.ts +1819 -0
  68. package/esm/utils-d2597f31.d.ts +1 -1
  69. package/{Component.desktop-0aa4e915.d.ts → index-8566963f.d.ts} +2 -1
  70. package/index-89f0cb07.d.ts +2 -2
  71. package/index-ebda875c.d.ts +138 -13
  72. package/index.js +3 -3
  73. package/{modern → mobile}/Component.mobile.d.ts +1 -1
  74. package/{Component.mobile.js → mobile/Component.mobile.js} +8 -8
  75. package/mobile/index.d.ts +1 -1
  76. package/mobile/index.js +2 -2
  77. package/modern/{Component-0816e61d.d.ts → Component-e63ec8aa.d.ts} +1 -1
  78. package/modern/Component.mobile-ebda875c.d.ts +6 -0
  79. package/modern/{index-8b2c2707.d.ts → Component.responsive-8566963f.d.ts} +4 -4
  80. package/modern/Component.responsive.d.ts +10 -10
  81. package/modern/Component.responsive.js +3 -3
  82. package/modern/components/base-international-phone-input/Component.d.ts +3 -3
  83. package/modern/components/base-international-phone-input/Component.js +1 -1
  84. package/modern/components/base-international-phone-input/index.css +2 -2
  85. package/modern/components/country-select/Component.js +1 -1
  86. package/modern/components/country-select/index.css +8 -8
  87. package/modern/components/flag-icon/component.js +1 -1
  88. package/modern/components/flag-icon/index.css +3 -3
  89. package/modern/components/select-field/component.js +1 -1
  90. package/modern/components/select-field/index.css +9 -9
  91. package/modern/{Component.desktop.d.ts → desktop/Component.desktop.d.ts} +1 -1
  92. package/modern/{Component.desktop.js → desktop/Component.desktop.js} +9 -9
  93. package/modern/desktop/index.d.ts +1 -1
  94. package/modern/desktop/index.js +2 -2
  95. package/{esm/Component.desktop-0aa4e915.d.ts → modern/index-8566963f.d.ts} +2 -1
  96. package/modern/index-89f0cb07.d.ts +2 -2
  97. package/modern/index-ebda875c.d.ts +138 -13
  98. package/modern/index.js +3 -3
  99. package/{Component.mobile.d.ts → modern/mobile/Component.mobile.d.ts} +1 -1
  100. package/modern/{Component.mobile.js → mobile/Component.mobile.js} +8 -8
  101. package/modern/mobile/index.d.ts +1 -1
  102. package/modern/mobile/index.js +1 -1
  103. package/modern/types.d.ts +1 -1
  104. package/modern/typings-e63ec8aa.d.ts +1819 -0
  105. package/modern/utils-d2597f31.d.ts +1 -1
  106. package/package.json +4 -4
  107. package/src/Component.responsive.tsx +2 -2
  108. package/src/{Component.desktop.tsx → desktop/Component.desktop.tsx} +3 -3
  109. package/src/desktop/index.ts +1 -1
  110. package/src/{Component.mobile.tsx → mobile/Component.mobile.tsx} +5 -2
  111. package/src/mobile/index.ts +1 -1
  112. package/types.d.ts +1 -1
  113. package/typings-e63ec8aa.d.ts +1819 -0
  114. package/utils-d2597f31.d.ts +1 -1
  115. package/Component-8b2c2707.d.ts +0 -71
  116. package/Component.responsive-785df74d.d.ts +0 -28
  117. package/cssm/Component-8b2c2707.d.ts +0 -71
  118. package/cssm/Component.responsive-785df74d.d.ts +0 -28
  119. package/cssm/index-136acbb1.d.ts +0 -28
  120. package/cssm/index-72dda473.d.ts +0 -12
  121. package/cssm/index-bdb4c6b9.d.ts +0 -183
  122. package/cssm/index-c44170fe.d.ts +0 -2
  123. package/cssm/index-c76d6398.d.ts +0 -319
  124. package/cssm/types-72dda473.d.ts +0 -276
  125. package/cssm/typings-0816e61d.d.ts +0 -894
  126. package/cssm/typings-c44170fe.d.ts +0 -91
  127. package/esm/Component-8b2c2707.d.ts +0 -71
  128. package/esm/Component.responsive-785df74d.d.ts +0 -28
  129. package/esm/index-136acbb1.d.ts +0 -28
  130. package/esm/index-72dda473.d.ts +0 -12
  131. package/esm/index-bdb4c6b9.d.ts +0 -183
  132. package/esm/index-c44170fe.d.ts +0 -2
  133. package/esm/index-c76d6398.d.ts +0 -319
  134. package/esm/types-72dda473.d.ts +0 -276
  135. package/esm/typings-0816e61d.d.ts +0 -894
  136. package/esm/typings-c44170fe.d.ts +0 -91
  137. package/index-136acbb1.d.ts +0 -28
  138. package/index-72dda473.d.ts +0 -12
  139. package/index-bdb4c6b9.d.ts +0 -183
  140. package/index-c44170fe.d.ts +0 -2
  141. package/index-c76d6398.d.ts +0 -319
  142. package/modern/Component-8b2c2707.d.ts +0 -71
  143. package/modern/Component.responsive-785df74d.d.ts +0 -28
  144. package/modern/index-136acbb1.d.ts +0 -28
  145. package/modern/index-72dda473.d.ts +0 -12
  146. package/modern/index-bdb4c6b9.d.ts +0 -183
  147. package/modern/index-c44170fe.d.ts +0 -2
  148. package/modern/index-c76d6398.d.ts +0 -319
  149. package/modern/types-72dda473.d.ts +0 -276
  150. package/modern/typings-0816e61d.d.ts +0 -894
  151. package/modern/typings-c44170fe.d.ts +0 -91
  152. package/types-72dda473.d.ts +0 -276
  153. package/typings-0816e61d.d.ts +0 -894
  154. package/typings-c44170fe.d.ts +0 -91
  155. /package/{Component.desktop-785df74d.d.ts → Component.desktop-ebda875c.d.ts} +0 -0
  156. /package/cssm/{Component.desktop-785df74d.d.ts → Component.desktop-ebda875c.d.ts} +0 -0
  157. /package/esm/{Component.desktop-785df74d.d.ts → Component.desktop-ebda875c.d.ts} +0 -0
  158. /package/modern/{Component.desktop-785df74d.d.ts → Component.desktop-ebda875c.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { ReactNode, RefObject } from 'react';
2
- import { BaseSelectProps, GroupShape, OptionShape } from "./typings-0816e61d";
2
+ import { BaseSelectProps, GroupShape, OptionShape } from "./typings-e63ec8aa";
3
3
  declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
4
4
  declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
5
5
  declare const joinOptions: ({ selected, selectedMultiple, }: {
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { InternationalPhoneInputDesktopProps } from "./types";
3
+ import { InternationalPhoneInputDesktopProps } from "../types";
4
4
  declare const InternationalPhoneInputDesktop: React.ForwardRefExoticComponent<InternationalPhoneInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
5
5
  export { InternationalPhoneInputDesktop };
@@ -4,24 +4,24 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var tslib = require('tslib');
6
6
  var React = require('react');
7
- var Component_desktop = require('@alfalab/core-components-input/Component.desktop');
8
- var desktop$1 = require('@alfalab/core-components-input-autocomplete/desktop');
7
+ var desktop$1 = require('@alfalab/core-components-input/desktop');
8
+ var desktop$2 = require('@alfalab/core-components-input-autocomplete/desktop');
9
9
  var desktop = require('@alfalab/core-components-select/desktop');
10
- var components_baseInternationalPhoneInput_Component = require('./components/base-international-phone-input/Component.js');
10
+ var components_baseInternationalPhoneInput_Component = require('../components/base-international-phone-input/Component.js');
11
11
  require('react-merge-refs');
12
12
  require('@maskito/core');
13
13
  require('@maskito/react');
14
14
  require('@alfalab/core-components-select/shared');
15
- require('./utils/index.js');
15
+ require('../utils/index.js');
16
16
  require('@alfalab/core-components-shared');
17
- require('./consts.js');
18
- require('./data/country-data.js');
19
- require('./components/country-select/Component.js');
17
+ require('../consts.js');
18
+ require('../data/country-data.js');
19
+ require('../components/country-select/Component.js');
20
20
  require('@alfalab/icons-glyph/WorldMagnifierMIcon');
21
- require('./components/flag-icon/component.js');
21
+ require('../components/flag-icon/component.js');
22
22
  require('classnames');
23
- require('./components/flag-icon/flagSprite.js');
24
- require('./components/select-field/component.js');
23
+ require('../components/flag-icon/flagSprite.js');
24
+ require('../components/select-field/component.js');
25
25
  require('@alfalab/hooks');
26
26
 
27
27
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
@@ -30,7 +30,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
30
30
 
31
31
  var InternationalPhoneInputDesktop = React.forwardRef(function (_a, ref) {
32
32
  var value = _a.value, _b = _a.clearableCountryCode, clearableCountryCode = _b === void 0 ? true : _b, restProps = tslib.__rest(_a, ["value", "clearableCountryCode"]);
33
- return (React__default.default.createElement(components_baseInternationalPhoneInput_Component.BaseInternationalPhoneInput, tslib.__assign({ selected: value }, restProps, { clearableCountryCode: clearableCountryCode, value: value, view: 'desktop', ref: ref, SelectComponent: desktop.SelectDesktop, Input: Component_desktop.InputDesktop, InputAutocomplete: desktop$1.InputAutocompleteDesktop })));
33
+ return (React__default.default.createElement(components_baseInternationalPhoneInput_Component.BaseInternationalPhoneInput, tslib.__assign({ selected: value }, restProps, { clearableCountryCode: clearableCountryCode, value: value, view: 'desktop', ref: ref, SelectComponent: desktop.SelectDesktop, Input: desktop$1.InputDesktop, InputAutocomplete: desktop$2.InputAutocompleteDesktop })));
34
34
  });
35
35
 
36
36
  exports.InternationalPhoneInputDesktop = InternationalPhoneInputDesktop;
@@ -1,2 +1,2 @@
1
- export { InternationalPhoneInputDesktop } from "../Component.desktop";
1
+ export { InternationalPhoneInputDesktop } from "./Component.desktop";
2
2
  export type { InternationalPhoneInputDesktopProps } from "../types";
package/desktop/index.js CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var Component_desktop = require('../Component.desktop.js');
5
+ var desktop_Component_desktop = require('./Component.desktop.js');
6
6
  require('tslib');
7
7
  require('react');
8
- require('@alfalab/core-components-input/Component.desktop');
8
+ require('@alfalab/core-components-input/desktop');
9
9
  require('@alfalab/core-components-input-autocomplete/desktop');
10
10
  require('@alfalab/core-components-select/desktop');
11
11
  require('../components/base-international-phone-input/Component.js');
@@ -27,4 +27,4 @@ require('@alfalab/hooks');
27
27
 
28
28
 
29
29
 
30
- exports.InternationalPhoneInputDesktop = Component_desktop.InternationalPhoneInputDesktop;
30
+ exports.InternationalPhoneInputDesktop = desktop_Component_desktop.InternationalPhoneInputDesktop;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { OptgroupProps } from "./typings-0816e61d";
3
+ import { OptgroupProps } from "./typings-e63ec8aa";
4
4
  declare const Optgroup: ({ children, className, label, size }: OptgroupProps) => React.JSX.Element;
5
5
  export { Optgroup };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import React from 'react';
3
+ import { BaseFormControlProps } from "./index-ebda875c";
4
+ type FormControlMobileProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
5
+ declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
6
+ export { FormControlMobileProps, FormControlMobile };
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
- import { ButtonProps, CommonButtonProps } from "./typings-89f0cb07";
4
- declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
3
+ import { CommonButtonProps, ButtonProps } from "./typings-89f0cb07";
5
4
  declare const ButtonMobile: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
6
- export { Button, ButtonMobile };
7
- export type { ButtonProps } from "./typings-89f0cb07";
5
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
6
+ export { ButtonMobile, Button };
7
+ export type { CommonButtonProps as ButtonMobileProps } from "./typings-89f0cb07";
@@ -7,18 +7,18 @@ declare const InternationalPhoneInput: React.ForwardRefExoticComponent<(({
7
7
  clearableCountryCode?: boolean | undefined;
8
8
  countrySelectProps?: import("./components/country-select/index").SharedCountrySelectProps | undefined;
9
9
  clear?: boolean | undefined;
10
- filterFn?: ((value: string | undefined, option: import("./typings-0816e61d").OptionShape) => boolean) | undefined;
10
+ filterFn?: ((value: string | undefined, option: import("./typings-e63ec8aa").OptionShape) => boolean) | undefined;
11
11
  onCountryChange?: ((country?: import("./types").Country | undefined) => void) | undefined;
12
12
  onChange?: ((e: React.ChangeEvent<HTMLInputElement> | null, { value }: {
13
13
  value: string;
14
14
  }) => void) | undefined;
15
- onBlur?: ((event: React.FocusEvent<HTMLInputElement | HTMLDivElement, Element>) => void) | undefined;
16
- onFocus?: ((event: React.FocusEvent<HTMLInputElement | HTMLDivElement, Element>) => void) | undefined;
15
+ onBlur?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
16
+ onFocus?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
17
17
  } & {
18
18
  options?: undefined;
19
- } & Omit<import("./Component.desktop").InputDesktopProps, "onFocus" | "onBlur" | "onChange" | "onInput" | "clear" | "onClear"> & {
19
+ } & Omit<import("@alfalab/core-components-input/desktop").InputDesktopProps, "onFocus" | "onBlur" | "onChange" | "onInput" | "clear" | "onClear"> & {
20
20
  options?: undefined;
21
- } & Omit<import("@alfalab/core-components-input/Component.mobile").InputMobileProps, "onFocus" | "onBlur" | "onChange" | "onInput" | "clear" | "onClear"> & {
21
+ } & Omit<import("@alfalab/core-components-input/mobile").InputMobileProps, "onFocus" | "onBlur" | "onChange" | "onInput" | "clear" | "onClear"> & {
22
22
  breakpoint?: number | undefined;
23
23
  defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
24
24
  }) | ({
@@ -28,17 +28,17 @@ declare const InternationalPhoneInput: React.ForwardRefExoticComponent<(({
28
28
  clearableCountryCode?: boolean | undefined;
29
29
  countrySelectProps?: import("./components/country-select/index").SharedCountrySelectProps | undefined;
30
30
  clear?: boolean | undefined;
31
- filterFn?: ((value: string | undefined, option: import("./typings-0816e61d").OptionShape) => boolean) | undefined;
31
+ filterFn?: ((value: string | undefined, option: import("./typings-e63ec8aa").OptionShape) => boolean) | undefined;
32
32
  onCountryChange?: ((country?: import("./types").Country | undefined) => void) | undefined;
33
33
  onChange?: ((e: React.ChangeEvent<HTMLInputElement> | null, { value }: {
34
34
  value: string;
35
35
  }) => void) | undefined;
36
- onBlur?: ((event: React.FocusEvent<HTMLInputElement | HTMLDivElement, Element>) => void) | undefined;
37
- onFocus?: ((event: React.FocusEvent<HTMLInputElement | HTMLDivElement, Element>) => void) | undefined;
36
+ onBlur?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
37
+ onFocus?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
38
38
  } & {
39
- options: (import("./typings-0816e61d").OptionShape | import("./typings-0816e61d").GroupShape)[];
39
+ options: (import("./typings-e63ec8aa").OptionShape | import("./typings-e63ec8aa").GroupShape)[];
40
40
  } & Omit<import("@alfalab/core-components-input-autocomplete/types").InputAutocompleteCommonProps, "onChange" | "onInput"> & {
41
- options: (import("./typings-0816e61d").OptionShape | import("./typings-0816e61d").GroupShape)[];
41
+ options: (import("./typings-e63ec8aa").OptionShape | import("./typings-e63ec8aa").GroupShape)[];
42
42
  } & Omit<import("@alfalab/core-components-input-autocomplete/types").InputAutocompleteMobileProps, "onChange" | "onInput"> & {
43
43
  breakpoint?: number | undefined;
44
44
  defaultMatchMediaValue?: boolean | (() => boolean) | undefined;
@@ -1,9 +1,9 @@
1
1
  import { __rest, __assign } from 'tslib';
2
2
  import React from 'react';
3
3
  import { useMatchMedia } from '@alfalab/core-components-mq/esm';
4
- import { InternationalPhoneInputDesktop } from './Component.desktop.js';
5
- import { InternationalPhoneInputMobile } from './Component.mobile.js';
6
- import '@alfalab/core-components-input/esm/Component.desktop';
4
+ import { InternationalPhoneInputDesktop } from './desktop/Component.desktop.js';
5
+ import { InternationalPhoneInputMobile } from './mobile/Component.mobile.js';
6
+ import '@alfalab/core-components-input/esm/desktop';
7
7
  import '@alfalab/core-components-input-autocomplete/esm/desktop';
8
8
  import '@alfalab/core-components-select/esm/desktop';
9
9
  import './components/base-international-phone-input/Component.js';
@@ -9,13 +9,13 @@ declare const BaseInternationalPhoneInput: React.ForwardRefExoticComponent<{
9
9
  clearableCountryCode?: boolean | undefined;
10
10
  countrySelectProps?: import("../country-select/index").SharedCountrySelectProps | undefined;
11
11
  clear?: boolean | undefined;
12
- filterFn?: ((value: string | undefined, option: import("../../typings-0816e61d").OptionShape) => boolean) | undefined;
12
+ filterFn?: ((value: string | undefined, option: import("../../typings-e63ec8aa").OptionShape) => boolean) | undefined;
13
13
  onCountryChange?: ((country?: Country | undefined) => void) | undefined;
14
14
  onChange?: ((e: React.ChangeEvent<HTMLInputElement> | null, { value }: {
15
15
  value: string;
16
16
  }) => void) | undefined;
17
- onBlur?: ((event: React.FocusEvent<HTMLInputElement | HTMLDivElement, Element>) => void) | undefined;
18
- onFocus?: ((event: React.FocusEvent<HTMLInputElement | HTMLDivElement, Element>) => void) | undefined;
17
+ onBlur?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
18
+ onFocus?: ((event: React.FocusEvent<HTMLDivElement | HTMLInputElement, Element>) => void) | undefined;
19
19
  } & {
20
20
  Input: React.FC<import("@alfalab/core-components-input").InputProps>;
21
21
  InputAutocomplete: React.FC<InputAutocompleteProps>;
@@ -16,7 +16,7 @@ import '../flag-icon/flagSprite.js';
16
16
  import '../select-field/component.js';
17
17
  import '@alfalab/hooks';
18
18
 
19
- var styles = {"component":"international-phone-input__component_p0607","addons":"international-phone-input__addons_p0607"};
19
+ var styles = {"component":"international-phone-input__component_oocev","addons":"international-phone-input__addons_oocev"};
20
20
  require('./index.css')
21
21
 
22
22
  var BaseInternationalPhoneInput = forwardRef(function (_a, ref) {
@@ -1,5 +1,5 @@
1
- /* hash: at8ms */
1
+ /* hash: oo1vx */
2
2
 
3
- .international-phone-input__component_p0607 .international-phone-input__addons_p0607 {
3
+ .international-phone-input__component_oocev .international-phone-input__addons_oocev {
4
4
  padding-left: 0;
5
5
  }
@@ -10,7 +10,7 @@ import '../flag-icon/flagSprite.js';
10
10
  import 'react-merge-refs';
11
11
  import '@alfalab/hooks';
12
12
 
13
- var styles = {"component":"international-phone-input__component_mi3mw","option":"international-phone-input__option_mi3mw","flag":"international-phone-input__flag_mi3mw","countryName":"international-phone-input__countryName_mi3mw","dialCode":"international-phone-input__dialCode_mi3mw","flagIconWrapper":"international-phone-input__flagIconWrapper_mi3mw","emptyCountryIcon":"international-phone-input__emptyCountryIcon_mi3mw"};
13
+ var styles = {"component":"international-phone-input__component_x5drz","option":"international-phone-input__option_x5drz","flag":"international-phone-input__flag_x5drz","countryName":"international-phone-input__countryName_x5drz","dialCode":"international-phone-input__dialCode_x5drz","flagIconWrapper":"international-phone-input__flagIconWrapper_x5drz","emptyCountryIcon":"international-phone-input__emptyCountryIcon_x5drz"};
14
14
  require('./index.css')
15
15
 
16
16
  var CountrySelect = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 1do4o */
1
+ /* hash: 10vq2 */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-neutral-translucent-700: rgba(4, 4, 21, 0.47);
@@ -18,29 +18,29 @@
18
18
  --gap-s: 12px;
19
19
  } :root {
20
20
  } :root {
21
- } .international-phone-input__component_mi3mw {
21
+ } .international-phone-input__component_x5drz {
22
22
  position: static;
23
23
  display: flex;
24
24
  min-width: initial;
25
25
  height: 100%;
26
- } .international-phone-input__option_mi3mw {
26
+ } .international-phone-input__option_x5drz {
27
27
  display: flex;
28
28
  align-items: flex-start;
29
29
  padding: var(--gap-s);
30
- } .international-phone-input__flag_mi3mw {
30
+ } .international-phone-input__flag_x5drz {
31
31
  flex-shrink: 0;
32
32
  margin-right: var(--gap-xs);
33
- } .international-phone-input__countryName_mi3mw {
33
+ } .international-phone-input__countryName_x5drz {
34
34
  margin-right: var(--gap-xs);
35
- } .international-phone-input__dialCode_mi3mw {
35
+ } .international-phone-input__dialCode_x5drz {
36
36
  color: var(--color-light-text-secondary);
37
- } .international-phone-input__flagIconWrapper_mi3mw {
37
+ } .international-phone-input__flagIconWrapper_x5drz {
38
38
  display: flex;
39
39
  justify-content: center;
40
40
  align-items: center;
41
41
  width: 24px;
42
42
  height: 24px;
43
43
  margin-left: var(--gap-s);
44
- } .international-phone-input__emptyCountryIcon_mi3mw {
44
+ } .international-phone-input__emptyCountryIcon_x5drz {
45
45
  color: var(--color-light-neutral-translucent-700);
46
46
  }
@@ -2,7 +2,7 @@ import React from 'react';
2
2
  import cn from 'classnames';
3
3
  import { flagSprite } from './flagSprite.js';
4
4
 
5
- var styles = {"flagIcon":"international-phone-input__flagIcon_1imig","flagPlaceholder":"international-phone-input__flagPlaceholder_1imig"};
5
+ var styles = {"flagIcon":"international-phone-input__flagIcon_17z8b","flagPlaceholder":"international-phone-input__flagPlaceholder_17z8b"};
6
6
  require('./index.css')
7
7
 
8
8
  /**
@@ -1,4 +1,4 @@
1
- /* hash: 1nxx9 */
1
+ /* hash: 1p7tu */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-neutral-translucent-100: rgba(38, 55, 88, 0.06); /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
@@ -17,10 +17,10 @@
17
17
  --gap-3xs: 2px;
18
18
  } :root {
19
19
  } :root {
20
- } .international-phone-input__flagIcon_1imig {
20
+ } .international-phone-input__flagIcon_17z8b {
21
21
  max-width: 24px;
22
22
  max-height: 24px;
23
- } .international-phone-input__flagPlaceholder_1imig {
23
+ } .international-phone-input__flagPlaceholder_17z8b {
24
24
  width: 24px;
25
25
  height: 16px;
26
26
  max-height: 16px;
@@ -7,7 +7,7 @@ import { WorldMagnifierMIcon } from '@alfalab/icons-glyph/WorldMagnifierMIcon';
7
7
  import { FlagIcon } from '../flag-icon/component.js';
8
8
  import '../flag-icon/flagSprite.js';
9
9
 
10
- var styles = {"component":"international-phone-input__component_janu6","flagIconContainer":"international-phone-input__flagIconContainer_janu6","emptyCountryIcon":"international-phone-input__emptyCountryIcon_janu6","disabled":"international-phone-input__disabled_janu6","inner":"international-phone-input__inner_janu6","l":"international-phone-input__l_janu6","xl":"international-phone-input__xl_janu6","focusVisible":"international-phone-input__focusVisible_janu6"};
10
+ var styles = {"component":"international-phone-input__component_16h25","flagIconContainer":"international-phone-input__flagIconContainer_16h25","emptyCountryIcon":"international-phone-input__emptyCountryIcon_16h25","disabled":"international-phone-input__disabled_16h25","inner":"international-phone-input__inner_16h25","l":"international-phone-input__l_16h25","xl":"international-phone-input__xl_16h25","focusVisible":"international-phone-input__focusVisible_16h25"};
11
11
  require('./index.css')
12
12
 
13
13
  var EMPTY_COUNTRY_SELECT_FIELD = {
@@ -1,4 +1,4 @@
1
- /* hash: 1ip3b */
1
+ /* hash: 1jxbb */
2
2
  :root {
3
3
  } /* deprecated */ :root {
4
4
  --color-light-border-link: #2288fa;
@@ -21,33 +21,33 @@
21
21
  } :root {
22
22
  --focus-color: var(--color-light-border-link);
23
23
  --disabled-cursor: not-allowed;
24
- } .international-phone-input__component_janu6 {
24
+ } .international-phone-input__component_16h25 {
25
25
  height: 100%;
26
26
  cursor: pointer;
27
27
  outline: none;
28
28
  position: relative;
29
- } .international-phone-input__flagIconContainer_janu6 {
29
+ } .international-phone-input__flagIconContainer_16h25 {
30
30
  display: flex;
31
31
  justify-content: center;
32
32
  align-items: center;
33
33
  width: 24px;
34
34
  height: 24px;
35
35
  margin-right: var(--gap-2xs);
36
- } .international-phone-input__emptyCountryIcon_janu6 {
36
+ } .international-phone-input__emptyCountryIcon_16h25 {
37
37
  color: var(--color-light-neutral-translucent-700);
38
- } .international-phone-input__disabled_janu6 {
38
+ } .international-phone-input__disabled_16h25 {
39
39
  cursor: var(--disabled-cursor);
40
- } .international-phone-input__inner_janu6 {
40
+ } .international-phone-input__inner_16h25 {
41
41
  position: relative;
42
42
  display: flex;
43
43
  align-items: center;
44
44
  height: 100%;
45
45
  padding-left: var(--gap-s);
46
46
  outline: none;
47
- } .international-phone-input__l_janu6 .international-phone-input__inner_janu6,
48
- .international-phone-input__xl_janu6 .international-phone-input__inner_janu6 {
47
+ } .international-phone-input__l_16h25 .international-phone-input__inner_16h25,
48
+ .international-phone-input__xl_16h25 .international-phone-input__inner_16h25 {
49
49
  padding-left: var(--gap-m);
50
- } .international-phone-input__focusVisible_janu6 {
50
+ } .international-phone-input__focusVisible_16h25 {
51
51
  outline: 2px solid var(--focus-color);
52
52
  outline-offset: 2px;
53
53
  }
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { InternationalPhoneInputDesktopProps } from "./types";
3
+ import { InternationalPhoneInputDesktopProps } from "../types";
4
4
  declare const InternationalPhoneInputDesktop: React.ForwardRefExoticComponent<InternationalPhoneInputDesktopProps & React.RefAttributes<HTMLInputElement>>;
5
5
  export { InternationalPhoneInputDesktop };
@@ -1,23 +1,23 @@
1
1
  import { __rest, __assign } from 'tslib';
2
2
  import React, { forwardRef } from 'react';
3
- import { InputDesktop } from '@alfalab/core-components-input/esm/Component.desktop';
3
+ import { InputDesktop } from '@alfalab/core-components-input/esm/desktop';
4
4
  import { InputAutocompleteDesktop } from '@alfalab/core-components-input-autocomplete/esm/desktop';
5
5
  import { SelectDesktop } from '@alfalab/core-components-select/esm/desktop';
6
- import { BaseInternationalPhoneInput } from './components/base-international-phone-input/Component.js';
6
+ import { BaseInternationalPhoneInput } from '../components/base-international-phone-input/Component.js';
7
7
  import 'react-merge-refs';
8
8
  import '@maskito/core';
9
9
  import '@maskito/react';
10
10
  import '@alfalab/core-components-select/esm/shared';
11
- import './utils/index.js';
11
+ import '../utils/index.js';
12
12
  import '@alfalab/core-components-shared/esm';
13
- import './consts.js';
14
- import './data/country-data.js';
15
- import './components/country-select/Component.js';
13
+ import '../consts.js';
14
+ import '../data/country-data.js';
15
+ import '../components/country-select/Component.js';
16
16
  import '@alfalab/icons-glyph/WorldMagnifierMIcon';
17
- import './components/flag-icon/component.js';
17
+ import '../components/flag-icon/component.js';
18
18
  import 'classnames';
19
- import './components/flag-icon/flagSprite.js';
20
- import './components/select-field/component.js';
19
+ import '../components/flag-icon/flagSprite.js';
20
+ import '../components/select-field/component.js';
21
21
  import '@alfalab/hooks';
22
22
 
23
23
  var InternationalPhoneInputDesktop = forwardRef(function (_a, ref) {
@@ -1,2 +1,2 @@
1
- export { InternationalPhoneInputDesktop } from "../Component.desktop";
1
+ export { InternationalPhoneInputDesktop } from "./Component.desktop";
2
2
  export type { InternationalPhoneInputDesktopProps } from "../types";
@@ -1,7 +1,7 @@
1
- export { InternationalPhoneInputDesktop } from '../Component.desktop.js';
1
+ export { InternationalPhoneInputDesktop } from './Component.desktop.js';
2
2
  import 'tslib';
3
3
  import 'react';
4
- import '@alfalab/core-components-input/esm/Component.desktop';
4
+ import '@alfalab/core-components-input/esm/desktop';
5
5
  import '@alfalab/core-components-input-autocomplete/esm/desktop';
6
6
  import '@alfalab/core-components-select/esm/desktop';
7
7
  import '../components/base-international-phone-input/Component.js';
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
- import React from 'react';
2
+ import React from "react";
3
3
  import { CommonButtonProps } from "./typings-89f0cb07";
4
4
  declare const ButtonDesktop: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
5
5
  export { ButtonDesktop };
6
+ export type { CommonButtonProps as ButtonDesktopProps } from "./typings-89f0cb07";
@@ -1,2 +1,2 @@
1
- export { ButtonDesktop } from "./Component.desktop-0aa4e915";
2
- export type { CommonButtonProps as ButtonDesktopProps } from "./typings-89f0cb07";
1
+ export { Button } from "./Component.responsive-8566963f";
2
+ export type { ButtonProps } from "./typings-89f0cb07";
@@ -1,20 +1,145 @@
1
1
  /// <reference types="react" />
2
- /// <reference types="react-transition-group" />
3
- import { ReactNode, RefObject } from "react";
4
- type PortalProps = {
5
- /** Контент */
2
+ import React from "react";
3
+ import { HTMLAttributes, ReactNode } from "react";
4
+ type StyleColors = {
5
+ default: {
6
+ [key: string]: string;
7
+ };
8
+ inverted: {
9
+ [key: string]: string;
10
+ };
11
+ };
12
+ type BaseFormControlProps = HTMLAttributes<HTMLDivElement> & {
13
+ /**
14
+ * Растягивает компонент на ширину контейнера
15
+ */
16
+ block?: boolean;
17
+ /**
18
+ * Размер компонента
19
+ */
20
+ size?: "s" | "m" | "l" | "xl";
21
+ /**
22
+ * Набор цветов для компонента
23
+ */
24
+ colors?: "default" | "inverted";
25
+ /**
26
+ * Заблокированное состояние
27
+ */
28
+ disabled?: boolean;
29
+ /**
30
+ * Cостояние только для чтения
31
+ */
32
+ readOnly?: boolean;
33
+ /**
34
+ * Заполненное состояние
35
+ */
36
+ filled?: boolean;
37
+ /**
38
+ * Выбранное (фокус) состояние
39
+ */
40
+ focused?: boolean;
41
+ /**
42
+ * Отображение ошибки
43
+ */
44
+ error?: ReactNode | boolean;
45
+ /**
46
+ * Текст подсказки
47
+ */
48
+ hint?: ReactNode;
49
+ /**
50
+ * Лейбл компонента
51
+ */
52
+ label?: ReactNode;
53
+ /**
54
+ * Вид лейбла внутри / снаружи
55
+ */
56
+ labelView?: "inner" | "outer";
57
+ /**
58
+ * Слот слева
59
+ */
60
+ leftAddons?: ReactNode;
61
+ /**
62
+ * Слот справа
63
+ */
64
+ rightAddons?: ReactNode;
65
+ /**
66
+ * Слот под полем
67
+ */
68
+ bottomAddons?: ReactNode;
69
+ /**
70
+ * Дополнительный класс
71
+ */
72
+ className?: string;
73
+ /**
74
+ * Дополнительный класс для поля
75
+ */
76
+ fieldClassName?: string;
77
+ /**
78
+ * Дополнительный класс для поля
79
+ */
80
+ inputWrapperClassName?: string;
81
+ /**
82
+ * Дополнительный класс для лейбла
83
+ */
84
+ labelClassName?: string;
85
+ /**
86
+ * Дополнительный класс для аддонов
87
+ */
88
+ addonsClassName?: string;
89
+ /**
90
+ * Свойства для обертки левых аддонов
91
+ */
92
+ leftAddonsProps?: HTMLAttributes<HTMLDivElement>;
93
+ /**
94
+ * Свойства для обертки правых аддонов
95
+ */
96
+ rightAddonsProps?: HTMLAttributes<HTMLDivElement>;
97
+ /**
98
+ * Идентификатор для систем автоматизированного тестирования
99
+ */
100
+ dataTestId?: string;
101
+ /**
102
+ * Компонент поля (инпут, textarea и пр.)
103
+ */
6
104
  children?: ReactNode;
7
105
  /**
8
- * Функция, возвращающая контейнер, в который будут рендериться дочерние элементы
106
+ * Основные стили компонента.
9
107
  */
10
- getPortalContainer?: () => Element;
108
+ styles: {
109
+ [key: string]: string;
110
+ };
11
111
  /**
12
- * Немедленно отрендерить дочерние элементы (false - контент будет отрендерен на след. рендер).
112
+ * Стили компонента для default и inverted режима.
13
113
  */
14
- immediateMount?: boolean;
114
+ colorStyles?: StyleColors;
15
115
  };
16
- declare const Portal: import("react").ForwardRefExoticComponent<PortalProps & import("react").RefAttributes<Element>>;
17
- declare const PORTAL_CONTAINER_ATTRIBUTE = "alfa-portal-container";
18
- declare const getDefaultPortalContainer: () => Element;
19
- declare function setRef<T>(ref: RefObject<T> | ((instance: T | null) => void) | null | undefined, value: T | null): void;
20
- export { PortalProps, Portal, PORTAL_CONTAINER_ATTRIBUTE, getDefaultPortalContainer, setRef };
116
+ declare const BaseFormControl: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
117
+ block?: boolean | undefined;
118
+ size?: "s" | "m" | "l" | "xl" | undefined;
119
+ colors?: "default" | "inverted" | undefined;
120
+ disabled?: boolean | undefined;
121
+ readOnly?: boolean | undefined;
122
+ filled?: boolean | undefined;
123
+ focused?: boolean | undefined;
124
+ error?: ReactNode | boolean;
125
+ hint?: ReactNode;
126
+ label?: ReactNode;
127
+ labelView?: "inner" | "outer" | undefined;
128
+ leftAddons?: ReactNode;
129
+ rightAddons?: ReactNode;
130
+ bottomAddons?: ReactNode;
131
+ className?: string | undefined;
132
+ fieldClassName?: string | undefined;
133
+ inputWrapperClassName?: string | undefined;
134
+ labelClassName?: string | undefined;
135
+ addonsClassName?: string | undefined;
136
+ leftAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
137
+ rightAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
138
+ dataTestId?: string | undefined;
139
+ children?: ReactNode;
140
+ styles: {
141
+ [key: string]: string;
142
+ };
143
+ colorStyles?: StyleColors | undefined;
144
+ } & React.RefAttributes<HTMLDivElement>>;
145
+ export { StyleColors, BaseFormControlProps, BaseFormControl };
package/esm/index.js CHANGED
@@ -2,8 +2,8 @@ export { InternationalPhoneInput } from './Component.responsive.js';
2
2
  import 'tslib';
3
3
  import 'react';
4
4
  import '@alfalab/core-components-mq/esm';
5
- import './Component.desktop.js';
6
- import '@alfalab/core-components-input/esm/Component.desktop';
5
+ import './desktop/Component.desktop.js';
6
+ import '@alfalab/core-components-input/esm/desktop';
7
7
  import '@alfalab/core-components-input-autocomplete/esm/desktop';
8
8
  import '@alfalab/core-components-select/esm/desktop';
9
9
  import './components/base-international-phone-input/Component.js';
@@ -22,7 +22,7 @@ import 'classnames';
22
22
  import './components/flag-icon/flagSprite.js';
23
23
  import './components/select-field/component.js';
24
24
  import '@alfalab/hooks';
25
- import './Component.mobile.js';
25
+ import './mobile/Component.mobile.js';
26
26
  import '@alfalab/core-components-input/esm/mobile';
27
27
  import '@alfalab/core-components-input-autocomplete/esm/mobile';
28
28
  import '@alfalab/core-components-select/esm/mobile';
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import React from 'react';
3
- import { InternationalPhoneInputMobileProps } from "./types";
3
+ import { InternationalPhoneInputMobileProps } from "../types";
4
4
  declare const InternationalPhoneInputMobile: React.ForwardRefExoticComponent<InternationalPhoneInputMobileProps & React.RefAttributes<HTMLInputElement>>;
5
5
  export { InternationalPhoneInputMobile };