@alfalab/core-components-international-phone-input 1.3.2 → 1.3.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 (117) hide show
  1. package/{Component-202ae1dc.d.ts → Component-c241b310.d.ts} +1 -1
  2. package/Component.responsive-8566963f.d.ts +2 -2
  3. package/Component.responsive.js +0 -22
  4. package/components/base-international-phone-input/Component.js +4 -20
  5. package/components/base-international-phone-input/index.css +2 -2
  6. package/components/base-international-phone-input/index.js +0 -17
  7. package/components/country-select/Component.js +1 -5
  8. package/components/country-select/index.css +8 -8
  9. package/components/country-select/index.js +0 -11
  10. package/components/flag-icon/component.js +1 -1
  11. package/components/flag-icon/index.css +3 -3
  12. package/components/flag-icon/index.js +0 -3
  13. package/components/select-field/component.js +1 -2
  14. package/components/select-field/index.css +9 -9
  15. package/components/select-field/index.js +0 -8
  16. package/cssm/{Component-202ae1dc.d.ts → Component-c241b310.d.ts} +1 -1
  17. package/cssm/Component.responsive-8566963f.d.ts +2 -2
  18. package/cssm/Component.responsive.js +0 -26
  19. package/cssm/components/base-international-phone-input/Component.js +3 -22
  20. package/cssm/components/base-international-phone-input/index.js +0 -21
  21. package/cssm/components/country-select/Component.js +0 -6
  22. package/cssm/components/country-select/index.js +0 -14
  23. package/cssm/components/flag-icon/index.js +0 -4
  24. package/cssm/components/select-field/component.js +0 -2
  25. package/cssm/components/select-field/index.js +0 -10
  26. package/cssm/desktop/Component.desktop.js +0 -19
  27. package/cssm/desktop/index.js +0 -25
  28. package/cssm/index-8566963f.d.ts +2 -2
  29. package/{esm/index-202ae1dc.d.ts → cssm/index-c241b310.d.ts} +1 -1
  30. package/cssm/index.js +0 -31
  31. package/cssm/mobile/Component.mobile.js +0 -19
  32. package/cssm/mobile/index.js +0 -25
  33. package/cssm/shared/index.d.ts +1 -0
  34. package/cssm/shared/index.js +10 -0
  35. package/{modern/typings-202ae1dc.d.ts → cssm/typings-c241b310.d.ts} +5 -0
  36. package/cssm/typings-c29389e5.d.ts +9 -4
  37. package/cssm/utils/index.d.ts +56 -1
  38. package/cssm/utils/index.js +61 -0
  39. package/{esm/utils-d2597f31.d.ts → cssm/utils-89376c31.d.ts} +27 -1
  40. package/desktop/Component.desktop.js +0 -15
  41. package/desktop/index.js +0 -21
  42. package/{modern/Component-202ae1dc.d.ts → esm/Component-c241b310.d.ts} +1 -1
  43. package/esm/Component.responsive-8566963f.d.ts +2 -2
  44. package/esm/Component.responsive.js +0 -22
  45. package/esm/components/base-international-phone-input/Component.js +4 -20
  46. package/esm/components/base-international-phone-input/index.css +2 -2
  47. package/esm/components/base-international-phone-input/index.js +0 -17
  48. package/esm/components/country-select/Component.js +1 -5
  49. package/esm/components/country-select/index.css +8 -8
  50. package/esm/components/country-select/index.js +0 -11
  51. package/esm/components/flag-icon/component.js +1 -1
  52. package/esm/components/flag-icon/index.css +3 -3
  53. package/esm/components/flag-icon/index.js +0 -3
  54. package/esm/components/select-field/component.js +1 -2
  55. package/esm/components/select-field/index.css +9 -9
  56. package/esm/components/select-field/index.js +0 -8
  57. package/esm/desktop/Component.desktop.js +0 -15
  58. package/esm/desktop/index.js +0 -21
  59. package/esm/index-8566963f.d.ts +2 -2
  60. package/{index-202ae1dc.d.ts → esm/index-c241b310.d.ts} +1 -1
  61. package/esm/index.js +0 -27
  62. package/esm/mobile/Component.mobile.js +0 -15
  63. package/esm/mobile/index.js +0 -21
  64. package/esm/shared/index.d.ts +1 -0
  65. package/esm/shared/index.js +1 -0
  66. package/esm/{typings-202ae1dc.d.ts → typings-c241b310.d.ts} +5 -0
  67. package/esm/typings-c29389e5.d.ts +9 -4
  68. package/esm/utils/index.d.ts +56 -1
  69. package/esm/utils/index.js +61 -2
  70. package/{modern/utils-d2597f31.d.ts → esm/utils-89376c31.d.ts} +27 -1
  71. package/index-8566963f.d.ts +2 -2
  72. package/{cssm/index-202ae1dc.d.ts → index-c241b310.d.ts} +1 -1
  73. package/index.js +0 -27
  74. package/mobile/Component.mobile.js +0 -15
  75. package/mobile/index.js +0 -21
  76. package/{esm/Component-202ae1dc.d.ts → modern/Component-c241b310.d.ts} +1 -1
  77. package/modern/Component.responsive-8566963f.d.ts +2 -2
  78. package/modern/Component.responsive.js +0 -22
  79. package/modern/components/base-international-phone-input/Component.js +4 -11
  80. package/modern/components/base-international-phone-input/index.css +2 -2
  81. package/modern/components/base-international-phone-input/index.js +0 -16
  82. package/modern/components/country-select/Component.js +1 -5
  83. package/modern/components/country-select/index.css +8 -8
  84. package/modern/components/country-select/index.js +0 -10
  85. package/modern/components/flag-icon/component.js +1 -1
  86. package/modern/components/flag-icon/index.css +3 -3
  87. package/modern/components/flag-icon/index.js +0 -3
  88. package/modern/components/select-field/component.js +1 -2
  89. package/modern/components/select-field/index.css +9 -9
  90. package/modern/components/select-field/index.js +0 -7
  91. package/modern/desktop/Component.desktop.js +0 -15
  92. package/modern/desktop/index.js +0 -20
  93. package/modern/index-8566963f.d.ts +2 -2
  94. package/modern/{index-202ae1dc.d.ts → index-c241b310.d.ts} +1 -1
  95. package/modern/index.js +0 -26
  96. package/modern/mobile/Component.mobile.js +0 -15
  97. package/modern/mobile/index.js +0 -20
  98. package/modern/shared/index.d.ts +1 -0
  99. package/modern/shared/index.js +1 -0
  100. package/{typings-202ae1dc.d.ts → modern/typings-c241b310.d.ts} +5 -0
  101. package/modern/typings-c29389e5.d.ts +9 -4
  102. package/modern/utils/index.d.ts +56 -1
  103. package/modern/utils/index.js +61 -2
  104. package/{cssm/utils-d2597f31.d.ts → modern/utils-89376c31.d.ts} +27 -1
  105. package/package.json +4 -4
  106. package/shared/index.d.ts +1 -0
  107. package/shared/index.js +10 -0
  108. package/shared/package.json +3 -0
  109. package/src/components/base-international-phone-input/Component.tsx +4 -1
  110. package/src/shared/index.ts +4 -0
  111. package/src/shared/package.json +3 -0
  112. package/src/utils/index.ts +62 -1
  113. package/{cssm/typings-202ae1dc.d.ts → typings-c241b310.d.ts} +5 -0
  114. package/typings-c29389e5.d.ts +9 -4
  115. package/utils/index.d.ts +56 -1
  116. package/utils/index.js +61 -0
  117. package/{utils-d2597f31.d.ts → utils-89376c31.d.ts} +27 -1
package/cssm/index.js CHANGED
@@ -3,37 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var Component_responsive = require('./Component.responsive.js');
6
- require('tslib');
7
- require('react');
8
- require('@alfalab/core-components-mq/cssm');
9
- require('./desktop/Component.desktop.js');
10
- require('@alfalab/core-components-input/cssm/desktop');
11
- require('@alfalab/core-components-input-autocomplete/cssm/desktop');
12
- require('@alfalab/core-components-select/cssm/desktop');
13
- require('./components/base-international-phone-input/Component.js');
14
- require('react-merge-refs');
15
- require('@maskito/core');
16
- require('@maskito/react');
17
- require('@alfalab/core-components-select/cssm/shared');
18
- require('./utils/index.js');
19
- require('@alfalab/core-components-shared/cssm');
20
- require('./consts.js');
21
- require('./data/country-data.js');
22
- require('./components/country-select/Component.js');
23
- require('@alfalab/icons-glyph/WorldMagnifierMIcon');
24
- require('./components/flag-icon/component.js');
25
- require('classnames');
26
- require('./components/flag-icon/flagSprite.js');
27
- require('./components/flag-icon/index.module.css');
28
- require('./components/select-field/component.js');
29
- require('@alfalab/hooks');
30
- require('./components/select-field/index.module.css');
31
- require('./components/country-select/index.module.css');
32
- require('./components/base-international-phone-input/index.module.css');
33
- require('./mobile/Component.mobile.js');
34
- require('@alfalab/core-components-input/cssm/mobile');
35
- require('@alfalab/core-components-input-autocomplete/cssm/mobile');
36
- require('@alfalab/core-components-select/cssm/mobile');
37
6
 
38
7
 
39
8
 
@@ -8,25 +8,6 @@ var mobile$1 = require('@alfalab/core-components-input/cssm/mobile');
8
8
  var mobile$2 = require('@alfalab/core-components-input-autocomplete/cssm/mobile');
9
9
  var mobile = require('@alfalab/core-components-select/cssm/mobile');
10
10
  var components_baseInternationalPhoneInput_Component = require('../components/base-international-phone-input/Component.js');
11
- require('react-merge-refs');
12
- require('@maskito/core');
13
- require('@maskito/react');
14
- require('@alfalab/core-components-select/cssm/shared');
15
- require('../utils/index.js');
16
- require('@alfalab/core-components-shared/cssm');
17
- require('../consts.js');
18
- require('../data/country-data.js');
19
- require('../components/country-select/Component.js');
20
- require('@alfalab/icons-glyph/WorldMagnifierMIcon');
21
- require('../components/flag-icon/component.js');
22
- require('classnames');
23
- require('../components/flag-icon/flagSprite.js');
24
- require('../components/flag-icon/index.module.css');
25
- require('../components/select-field/component.js');
26
- require('@alfalab/hooks');
27
- require('../components/select-field/index.module.css');
28
- require('../components/country-select/index.module.css');
29
- require('../components/base-international-phone-input/index.module.css');
30
11
 
31
12
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
32
13
 
@@ -3,31 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var mobile_Component_mobile = require('./Component.mobile.js');
6
- require('tslib');
7
- require('react');
8
- require('@alfalab/core-components-input/cssm/mobile');
9
- require('@alfalab/core-components-input-autocomplete/cssm/mobile');
10
- require('@alfalab/core-components-select/cssm/mobile');
11
- require('../components/base-international-phone-input/Component.js');
12
- require('react-merge-refs');
13
- require('@maskito/core');
14
- require('@maskito/react');
15
- require('@alfalab/core-components-select/cssm/shared');
16
- require('../utils/index.js');
17
- require('@alfalab/core-components-shared/cssm');
18
- require('../consts.js');
19
- require('../data/country-data.js');
20
- require('../components/country-select/Component.js');
21
- require('@alfalab/icons-glyph/WorldMagnifierMIcon');
22
- require('../components/flag-icon/component.js');
23
- require('classnames');
24
- require('../components/flag-icon/flagSprite.js');
25
- require('../components/flag-icon/index.module.css');
26
- require('../components/select-field/component.js');
27
- require('@alfalab/hooks');
28
- require('../components/select-field/index.module.css');
29
- require('../components/country-select/index.module.css');
30
- require('../components/base-international-phone-input/index.module.css');
31
6
 
32
7
 
33
8
 
@@ -0,0 +1 @@
1
+ export { getInternationalPhoneInputDesktopTestIds, getInternationalPhoneInputMobileTestIds } from "../utils/index";
@@ -0,0 +1,10 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var utils_index = require('../utils/index.js');
6
+
7
+
8
+
9
+ exports.getInternationalPhoneInputDesktopTestIds = utils_index.getInternationalPhoneInputDesktopTestIds;
10
+ exports.getInternationalPhoneInputMobileTestIds = utils_index.getInternationalPhoneInputMobileTestIds;
@@ -80,6 +80,11 @@ type ComponentProps = {
80
80
  * Набор цветов для компонента
81
81
  */
82
82
  colors?: 'default' | 'inverted';
83
+ /**
84
+ * Включает размытие фона для некоторых вариантов кнопки
85
+ * @description Может привести к просадке fps и другим багам. Старайтесь не размещать слишком много заблюреных элементов на одной странице.
86
+ */
87
+ allowBackdropBlur?: boolean;
83
88
  /**
84
89
  * Дочерние элементы.
85
90
  */
@@ -10,7 +10,7 @@ import { CSSTransitionProps } from "react-transition-group/CSSTransition";
10
10
  import { BasePlacement, VariationPlacement } from "@popperjs/core";
11
11
  import { SwipeableHandlers } from "react-swipeable";
12
12
  import { TextElementType, TextSkeletonProps } from "./types-1328ead9";
13
- import { ButtonProps } from "./index-202ae1dc";
13
+ import { ButtonProps } from "./index-c241b310";
14
14
  import { ContentProps } from "./typings-8a2a8ad1";
15
15
  import { ModalResponsiveProps as ModalProps } from "./typings-8a2a8ad1";
16
16
  import { InputProps } from "@alfalab/core-components-input";
@@ -646,6 +646,10 @@ type FooterProps$0 = {
646
646
  * Дополнительный класс
647
647
  */
648
648
  className?: string;
649
+ /**
650
+ * Идентификатор для систем автоматизированного тестирования
651
+ */
652
+ dataTestId?: string;
649
653
  };
650
654
  declare const Footer$0: FC<FooterProps$0>;
651
655
  type HeaderProps$0 = Omit<NavigationBarProps, "view" | "size"> & {
@@ -763,7 +767,7 @@ type TitleProps = Omit<NativeProps$0, "color"> & {
763
767
  /**
764
768
  * Толщина шрифта
765
769
  */
766
- weight?: "regular" | "medium" | "bold";
770
+ weight?: "regular" | "medium" | "bold" | "semibold";
767
771
  /**
768
772
  * Шрифт текста
769
773
  */
@@ -825,7 +829,7 @@ declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAt
825
829
  tag: "div" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
826
830
  view?: "small" | "medium" | "large" | "xlarge" | "xsmall" | undefined;
827
831
  color?: "link" | "accent" | "primary" | "primary-inverted" | "secondary" | "secondary-inverted" | "tertiary" | "tertiary-inverted" | "attention" | "positive" | "negative" | "static-accent" | "disabled" | "static-primary-light" | "static-secondary-light" | "static-tertiary-light" | "static-primary-dark" | "static-secondary-dark" | "static-tertiary-dark" | undefined;
828
- weight?: "bold" | "medium" | "regular" | undefined;
832
+ weight?: "bold" | "medium" | "regular" | "semibold" | undefined;
829
833
  font?: "styrene" | "system" | undefined;
830
834
  defaultMargins?: boolean | undefined;
831
835
  className?: string | undefined;
@@ -835,6 +839,7 @@ declare const TitleResponsive: React.ForwardRefExoticComponent<Omit<React.HTMLAt
835
839
  showSkeleton?: boolean | undefined;
836
840
  skeletonProps?: import("./types-1328ead9").TextSkeletonProps | undefined;
837
841
  } & React.RefAttributes<HTMLDivElement | HTMLHeadingElement>>;
842
+ declare function getDefaultWeight(font: "styrene" | "system", platform: "mobile" | "desktop"): "medium" | "bold" | "semibold";
838
843
  type IconButtonProps = {
839
844
  /**
840
845
  * Компонент иконки
@@ -1572,7 +1577,7 @@ type SelectProps = BaseSelectProps & AdditionalMobileProps & ConditionalMobilePr
1572
1577
  */
1573
1578
  defaultMatchMediaValue?: boolean | (() => boolean);
1574
1579
  };
1575
- export { BottomSheet, CLOSE_OFFSET, HEADER_OFFSET, FormControlProps, FormControl, ModalResponsive as Modal, ModalContext, getModalTestIds, Position, PopoverProps, Popover, FooterProps$0 as FooterProps, Footer$0 as Footer, HeaderProps$0 as HeaderProps, Header$0 as Header, SwipeableBackdropProps, SwipeableBackdrop, Typography, typographyPresets, TitleResponsive, IconButtonProps, IconButton, Content, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps, SelectFieldProps, AdditionalMobileProps, BottomSheetSelectMobileProps, ModalSelectMobileProps, SelectModalMobileProps, SelectMobileProps, SelectDesktopProps, SelectProps };
1580
+ export { BottomSheet, CLOSE_OFFSET, HEADER_OFFSET, FormControlProps, FormControl, ModalResponsive as Modal, ModalContext, getModalTestIds, Position, PopoverProps, Popover, FooterProps$0 as FooterProps, Footer$0 as Footer, HeaderProps$0 as HeaderProps, Header$0 as Header, SwipeableBackdropProps, SwipeableBackdrop, Typography, typographyPresets, TitleResponsive, getDefaultWeight, IconButtonProps, IconButton, Content, AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps, SelectFieldProps, AdditionalMobileProps, BottomSheetSelectMobileProps, ModalSelectMobileProps, SelectModalMobileProps, SelectMobileProps, SelectDesktopProps, SelectProps };
1576
1581
  export type { BottomSheetProps, BottomSheetTitleAlign, HeaderProps as ModalHeaderProps, FooterProps as ModalFooterProps, TitleProps, TextProps, Color };
1577
1582
  export { ModalResponsiveProps as ModalProps } from "./typings-8a2a8ad1";
1578
1583
  export type { ContentProps as ModalContentProps } from "./typings-8a2a8ad1";
@@ -15,4 +15,59 @@ declare function getPhoneData(phone: string, countries: Country[][], defaultIso2
15
15
  nextCountry: Country | undefined;
16
16
  };
17
17
  declare function getClear(clear?: boolean, clearableCountryCode?: boolean, value?: string, countryCode?: string): boolean;
18
- export { initCountries, findCountry, guessCountry, clearMask, createPhoneMaskExpression, createMaskOptions, filterPhones, getPhoneData, getClear };
18
+ declare function getInternationalPhoneInputDesktopTestIds(dataTestId: string): {
19
+ fieldAutocompleteWrapper: string;
20
+ fieldAutocompleteInner: string;
21
+ fieldAutocompleteFormControl: string;
22
+ fieldAutocompleteLeftAddons: string;
23
+ fieldAutocompleteRightAddons: string;
24
+ fieldAutocompleteError: string;
25
+ fieldAutocompleteHint: string;
26
+ option: string;
27
+ optionsList: string;
28
+ countryOption: string;
29
+ countryOptionsList: string;
30
+ field: string;
31
+ fieldInner: string;
32
+ fieldFormControl: string;
33
+ fieldLeftAddons: string;
34
+ fieldRightAddons: string;
35
+ fieldError: string;
36
+ fieldHint: string;
37
+ };
38
+ declare function getInternationalPhoneInputMobileTestIds(dataTestId: string): {
39
+ fieldAutocompleteWrapper: string;
40
+ fieldAutocompleteInner: string;
41
+ fieldAutocompleteFormControl: string;
42
+ fieldAutocompleteLeftAddons: string;
43
+ fieldAutocompleteRightAddons: string;
44
+ fieldAutocompleteError: string;
45
+ fieldAutocompleteHint: string;
46
+ option: string;
47
+ optionsList: string;
48
+ bottomSheet: string;
49
+ bottomSheetHeader: string;
50
+ bottomSheetContent: string;
51
+ countryOption: string;
52
+ countryOptionsList: string;
53
+ countryBottomSheet: string;
54
+ countryBottomSheetHeader: string;
55
+ countryBottomSheetContent: string;
56
+ clearButton: string;
57
+ applyButton: string;
58
+ field: string;
59
+ fieldInner: string;
60
+ fieldFormControl: string;
61
+ fieldLeftAddons: string;
62
+ fieldRightAddons: string;
63
+ fieldError: string;
64
+ fieldHint: string;
65
+ searchInput: string;
66
+ searchFormControl: string;
67
+ searchInner: string;
68
+ searchLeftAddons: string;
69
+ searchRightAddons: string;
70
+ searchError: string;
71
+ searchHint: string;
72
+ };
73
+ export { initCountries, findCountry, guessCountry, clearMask, createPhoneMaskExpression, createMaskOptions, filterPhones, getPhoneData, getClear, getInternationalPhoneInputDesktopTestIds, getInternationalPhoneInputMobileTestIds };
@@ -190,6 +190,65 @@ function getClear(clear, clearableCountryCode, value, countryCode) {
190
190
  ? trimmedValue !== '' && trimmedValue !== '+'
191
191
  : trimmedValue.length > countryCode.length + 1;
192
192
  }
193
+ function getInternationalPhoneInputDesktopTestIds(dataTestId) {
194
+ return {
195
+ fieldAutocompleteWrapper: dataTestId,
196
+ fieldAutocompleteInner: "".concat(dataTestId, "-field-form-control-inner"),
197
+ fieldAutocompleteFormControl: "".concat(dataTestId, "-field-form-control"),
198
+ fieldAutocompleteLeftAddons: "".concat(dataTestId, "-field-form-control-left-addons"),
199
+ fieldAutocompleteRightAddons: "".concat(dataTestId, "-field-form-control-right-addons"),
200
+ fieldAutocompleteError: "".concat(dataTestId, "-field-form-control-error-message"),
201
+ fieldAutocompleteHint: "".concat(dataTestId, "-field-form-control-hint"),
202
+ option: coreComponentsShared.getDataTestId(dataTestId, 'option'),
203
+ optionsList: coreComponentsShared.getDataTestId(dataTestId, 'options-list'),
204
+ countryOption: coreComponentsShared.getDataTestId(dataTestId, 'country-select-option'),
205
+ countryOptionsList: coreComponentsShared.getDataTestId(dataTestId, 'country-select-options-list'),
206
+ field: dataTestId,
207
+ fieldInner: coreComponentsShared.getDataTestId(dataTestId, 'form-control-inner'),
208
+ fieldFormControl: coreComponentsShared.getDataTestId(dataTestId, 'form-control'),
209
+ fieldLeftAddons: coreComponentsShared.getDataTestId(dataTestId, 'form-control-left-addons'),
210
+ fieldRightAddons: coreComponentsShared.getDataTestId(dataTestId, 'form-control-right-addons'),
211
+ fieldError: coreComponentsShared.getDataTestId(dataTestId, 'form-control-error-message'),
212
+ fieldHint: coreComponentsShared.getDataTestId(dataTestId, 'form-control-hint'),
213
+ };
214
+ }
215
+ function getInternationalPhoneInputMobileTestIds(dataTestId) {
216
+ return {
217
+ fieldAutocompleteWrapper: dataTestId,
218
+ fieldAutocompleteInner: coreComponentsShared.getDataTestId(dataTestId, 'field-form-control-inner'),
219
+ fieldAutocompleteFormControl: coreComponentsShared.getDataTestId(dataTestId, 'field-form-control'),
220
+ fieldAutocompleteLeftAddons: coreComponentsShared.getDataTestId(dataTestId, 'field-form-control-left-addons'),
221
+ fieldAutocompleteRightAddons: coreComponentsShared.getDataTestId(dataTestId, 'field-form-control-right-addons'),
222
+ fieldAutocompleteError: coreComponentsShared.getDataTestId(dataTestId, 'field-form-control-error-message'),
223
+ fieldAutocompleteHint: coreComponentsShared.getDataTestId(dataTestId, 'field-form-control-hint'),
224
+ option: coreComponentsShared.getDataTestId(dataTestId, 'option'),
225
+ optionsList: coreComponentsShared.getDataTestId(dataTestId, 'options-list'),
226
+ bottomSheet: coreComponentsShared.getDataTestId(dataTestId, 'bottom-sheet'),
227
+ bottomSheetHeader: coreComponentsShared.getDataTestId(dataTestId, 'bottom-sheet-header'),
228
+ bottomSheetContent: coreComponentsShared.getDataTestId(dataTestId, 'bottom-sheet-content'),
229
+ countryOption: coreComponentsShared.getDataTestId(dataTestId, 'country-select-option'),
230
+ countryOptionsList: coreComponentsShared.getDataTestId(dataTestId, 'country-select-options-list'),
231
+ countryBottomSheet: coreComponentsShared.getDataTestId(dataTestId, 'country-select-bottom-sheet'),
232
+ countryBottomSheetHeader: coreComponentsShared.getDataTestId(dataTestId, 'country-select-bottom-sheet-header'),
233
+ countryBottomSheetContent: coreComponentsShared.getDataTestId(dataTestId, 'country-select-bottom-sheet-content'),
234
+ clearButton: coreComponentsShared.getDataTestId(dataTestId, 'clear'),
235
+ applyButton: coreComponentsShared.getDataTestId(dataTestId, 'apply'),
236
+ field: dataTestId,
237
+ fieldInner: coreComponentsShared.getDataTestId(dataTestId, 'form-control-inner'),
238
+ fieldFormControl: coreComponentsShared.getDataTestId(dataTestId, 'form-control'),
239
+ fieldLeftAddons: coreComponentsShared.getDataTestId(dataTestId, 'form-control-left-addons'),
240
+ fieldRightAddons: coreComponentsShared.getDataTestId(dataTestId, 'form-control-right-addons'),
241
+ fieldError: coreComponentsShared.getDataTestId(dataTestId, 'form-control-error-message'),
242
+ fieldHint: coreComponentsShared.getDataTestId(dataTestId, 'form-control-hint'),
243
+ searchInput: coreComponentsShared.getDataTestId(dataTestId, 'search'),
244
+ searchFormControl: coreComponentsShared.getDataTestId(dataTestId, 'search-form-control'),
245
+ searchInner: coreComponentsShared.getDataTestId(dataTestId, 'search-form-control-inner'),
246
+ searchLeftAddons: coreComponentsShared.getDataTestId(dataTestId, 'search-form-control-left-addons'),
247
+ searchRightAddons: coreComponentsShared.getDataTestId(dataTestId, 'search-form-control-right-addons'),
248
+ searchError: coreComponentsShared.getDataTestId(dataTestId, 'search-form-control-error-message'),
249
+ searchHint: coreComponentsShared.getDataTestId(dataTestId, 'search-form-control-hint'),
250
+ };
251
+ }
193
252
 
194
253
  exports.clearMask = clearMask;
195
254
  exports.createMaskOptions = createMaskOptions;
@@ -197,6 +256,8 @@ exports.createPhoneMaskExpression = createPhoneMaskExpression;
197
256
  exports.filterPhones = filterPhones;
198
257
  exports.findCountry = findCountry;
199
258
  exports.getClear = getClear;
259
+ exports.getInternationalPhoneInputDesktopTestIds = getInternationalPhoneInputDesktopTestIds;
260
+ exports.getInternationalPhoneInputMobileTestIds = getInternationalPhoneInputMobileTestIds;
200
261
  exports.getPhoneData = getPhoneData;
201
262
  exports.guessCountry = guessCountry;
202
263
  exports.initCountries = initCountries;
@@ -38,4 +38,30 @@ declare function defaultFilterFn(optionText: string, search: string): boolean;
38
38
  declare function defaultAccessor(option: OptionShape): string;
39
39
  declare function usePrevious<T>(value: T): T | undefined;
40
40
  declare const lastIndexOf: <T>(array: T[], predicate: (item: T) => boolean) => number;
41
- export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, defaultFilterFn, defaultAccessor, usePrevious, lastIndexOf };
41
+ declare function getSelectTestIds(dataTestId: string): {
42
+ select: string;
43
+ option: string;
44
+ optionsList: string;
45
+ clearButton: string;
46
+ applyButton: string;
47
+ field: string;
48
+ fieldFormControl: string;
49
+ fieldLeftAddons: string;
50
+ fieldRightAddons: string;
51
+ fieldError: string;
52
+ fieldHint: string;
53
+ searchInput: string;
54
+ searchFormControl: string;
55
+ searchInner: string;
56
+ searchLeftAddons: string;
57
+ searchRightAddons: string;
58
+ searchError: string;
59
+ searchHint: string;
60
+ bottomSheet: string;
61
+ bottomSheetHeader: string;
62
+ bottomSheetContent: string;
63
+ modal: string;
64
+ modalHeader: string;
65
+ modalContent: string;
66
+ };
67
+ export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, defaultFilterFn, defaultAccessor, usePrevious, lastIndexOf, getSelectTestIds };
@@ -8,21 +8,6 @@ var desktop$1 = require('@alfalab/core-components-input/desktop');
8
8
  var desktop$2 = require('@alfalab/core-components-input-autocomplete/desktop');
9
9
  var desktop = require('@alfalab/core-components-select/desktop');
10
10
  var components_baseInternationalPhoneInput_Component = require('../components/base-international-phone-input/Component.js');
11
- require('react-merge-refs');
12
- require('@maskito/core');
13
- require('@maskito/react');
14
- require('@alfalab/core-components-select/shared');
15
- require('../utils/index.js');
16
- require('@alfalab/core-components-shared');
17
- require('../consts.js');
18
- require('../data/country-data.js');
19
- require('../components/country-select/Component.js');
20
- require('@alfalab/icons-glyph/WorldMagnifierMIcon');
21
- require('../components/flag-icon/component.js');
22
- require('classnames');
23
- require('../components/flag-icon/flagSprite.js');
24
- require('../components/select-field/component.js');
25
- require('@alfalab/hooks');
26
11
 
27
12
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
28
13
 
package/desktop/index.js CHANGED
@@ -3,27 +3,6 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var desktop_Component_desktop = require('./Component.desktop.js');
6
- require('tslib');
7
- require('react');
8
- require('@alfalab/core-components-input/desktop');
9
- require('@alfalab/core-components-input-autocomplete/desktop');
10
- require('@alfalab/core-components-select/desktop');
11
- require('../components/base-international-phone-input/Component.js');
12
- require('react-merge-refs');
13
- require('@maskito/core');
14
- require('@maskito/react');
15
- require('@alfalab/core-components-select/shared');
16
- require('../utils/index.js');
17
- require('@alfalab/core-components-shared');
18
- require('../consts.js');
19
- require('../data/country-data.js');
20
- require('../components/country-select/Component.js');
21
- require('@alfalab/icons-glyph/WorldMagnifierMIcon');
22
- require('../components/flag-icon/component.js');
23
- require('classnames');
24
- require('../components/flag-icon/flagSprite.js');
25
- require('../components/select-field/component.js');
26
- require('@alfalab/hooks');
27
6
 
28
7
 
29
8
 
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
3
  import { FC } from "react";
4
- import { CommonButtonProps, PrivateButtonProps } from "./typings-202ae1dc";
4
+ import { CommonButtonProps, PrivateButtonProps } from "./typings-c241b310";
5
5
  type SpinnerProps = {
6
6
  /**
7
7
  * Управление видимостью компонента
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import React from "react";
3
- import { CommonButtonProps, ButtonProps } from "./typings-202ae1dc";
3
+ import { CommonButtonProps, ButtonProps } from "./typings-c241b310";
4
4
  declare const ButtonMobile: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
5
5
  declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
6
6
  export { ButtonMobile, Button };
7
- export type { CommonButtonProps as ButtonMobileProps } from "./typings-202ae1dc";
7
+ export type { CommonButtonProps as ButtonMobileProps } from "./typings-c241b310";
@@ -3,28 +3,6 @@ import React from 'react';
3
3
  import { useMatchMedia } from '@alfalab/core-components-mq/esm';
4
4
  import { InternationalPhoneInputDesktop } from './desktop/Component.desktop.js';
5
5
  import { InternationalPhoneInputMobile } from './mobile/Component.mobile.js';
6
- import '@alfalab/core-components-input/esm/desktop';
7
- import '@alfalab/core-components-input-autocomplete/esm/desktop';
8
- import '@alfalab/core-components-select/esm/desktop';
9
- import './components/base-international-phone-input/Component.js';
10
- import 'react-merge-refs';
11
- import '@maskito/core';
12
- import '@maskito/react';
13
- import '@alfalab/core-components-select/esm/shared';
14
- import './utils/index.js';
15
- import '@alfalab/core-components-shared/esm';
16
- import './consts.js';
17
- import './data/country-data.js';
18
- import './components/country-select/Component.js';
19
- import '@alfalab/icons-glyph/WorldMagnifierMIcon';
20
- import './components/flag-icon/component.js';
21
- import 'classnames';
22
- import './components/flag-icon/flagSprite.js';
23
- import './components/select-field/component.js';
24
- import '@alfalab/hooks';
25
- import '@alfalab/core-components-input/esm/mobile';
26
- import '@alfalab/core-components-input-autocomplete/esm/mobile';
27
- import '@alfalab/core-components-select/esm/mobile';
28
6
 
29
7
  var InternationalPhoneInput = React.forwardRef(function (_a, ref) {
30
8
  var _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, defaultMatchMediaValue = _a.defaultMatchMediaValue, restProps = __rest(_a, ["breakpoint", "defaultMatchMediaValue"]);
@@ -6,17 +6,8 @@ import { useMaskito } from '@maskito/react';
6
6
  import { BaseOption } from '@alfalab/core-components-select/esm/shared';
7
7
  import { initCountries, findCountry, filterPhones, createMaskOptions, getClear, getPhoneData } from '../../utils/index.js';
8
8
  import { CountrySelect } from '../country-select/Component.js';
9
- import '@alfalab/core-components-shared/esm';
10
- import '../../consts.js';
11
- import '../../data/country-data.js';
12
- import '@alfalab/icons-glyph/WorldMagnifierMIcon';
13
- import '../flag-icon/component.js';
14
- import 'classnames';
15
- import '../flag-icon/flagSprite.js';
16
- import '../select-field/component.js';
17
- import '@alfalab/hooks';
18
9
 
19
- var styles = {"component":"international-phone-input__component_qs477","addons":"international-phone-input__addons_qs477"};
10
+ var styles = {"component":"international-phone-input__component_1ql2c","addons":"international-phone-input__addons_1ql2c"};
20
11
  require('./index.css')
21
12
 
22
13
  var BaseInternationalPhoneInput = forwardRef(function (_a, ref) {
@@ -82,20 +73,13 @@ var BaseInternationalPhoneInput = forwardRef(function (_a, ref) {
82
73
  var renderCountrySelect = function (compact) {
83
74
  var _a;
84
75
  if (compact === void 0) { compact = false; }
85
- return (React.createElement(CountrySelect, __assign({}, countrySelectProps, { view: view, SelectComponent: SelectComponent, disabled: disabled || (countrySelectProps === null || countrySelectProps === void 0 ? void 0 : countrySelectProps.disabled), onChange: handleSelectCountry, country: country, countries: compact ? [] : countriesData, fieldWidth: (_a = inputWrapperRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width })));
86
- };
87
- var inputProps = {
88
- className: styles.component,
89
- ref: mergeRefs([maskRef, ref, inputRef]),
90
- wrapperRef: inputWrapperRef,
91
- addonsClassName: styles.addons,
92
- type: 'tel',
93
- clear: getClear(clearProp, clearableCountryCode, value, country === null || country === void 0 ? void 0 : country.countryCode),
76
+ return (React.createElement(CountrySelect, __assign({ dataTestId: restProps === null || restProps === void 0 ? void 0 : restProps.dataTestId }, countrySelectProps, { view: view, SelectComponent: SelectComponent, disabled: disabled || (countrySelectProps === null || countrySelectProps === void 0 ? void 0 : countrySelectProps.disabled), onChange: handleSelectCountry, country: country, countries: compact ? [] : countriesData, fieldWidth: (_a = inputWrapperRef.current) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect().width })));
94
77
  };
78
+ var inputProps = __assign({ className: styles.component, ref: mergeRefs([maskRef, ref, inputRef]), wrapperRef: inputWrapperRef, addonsClassName: styles.addons, type: 'tel', clear: getClear(clearProp, clearableCountryCode, value, country === null || country === void 0 ? void 0 : country.countryCode) }, restProps.inputProps);
95
79
  return Array.isArray(options) ? (React.createElement(InputAutocomplete, __assign({ closeOnSelect: true, Option: BaseOption, size: size }, restProps, { disabled: disabled, options: filteredOptions, value: value, onChange: handleOptionSelect, onInput: function (event, _a) {
96
80
  var phone = _a.value;
97
81
  return updatePhoneData(phone, event);
98
- }, inputProps: __assign(__assign({}, inputProps), { onClear: handleClear, onInput: handleInput, leftAddons: renderCountrySelect(view === 'mobile') }), fieldProps: __assign({ className: inputProps.className, addonsClassName: inputProps.addonsClassName }, (view === 'mobile' ? { leftAddons: renderCountrySelect() } : null)) }))) : (React.createElement(Input, __assign({}, restProps, inputProps, { onClear: inputProps.clear ? handleClear : undefined, leftAddons: renderCountrySelect(), size: size, onInput: handleInput, value: value, disabled: disabled })));
82
+ }, inputProps: __assign(__assign({}, inputProps), { onClear: handleClear, onInput: handleInput, leftAddons: renderCountrySelect(view === 'mobile') }), fieldProps: __assign(__assign(__assign({}, restProps.fieldProps), { className: inputProps.className, addonsClassName: inputProps.addonsClassName }), (view === 'mobile' ? { leftAddons: renderCountrySelect() } : null)) }))) : (React.createElement(Input, __assign({}, restProps, inputProps, { onClear: inputProps.clear ? handleClear : undefined, leftAddons: renderCountrySelect(), size: size, onInput: handleInput, value: value, disabled: disabled })));
99
83
  });
100
84
 
101
85
  export { BaseInternationalPhoneInput };
@@ -1,5 +1,5 @@
1
- /* hash: 11st0 */
1
+ /* hash: qky8l */
2
2
 
3
- .international-phone-input__component_qs477 .international-phone-input__addons_qs477 {
3
+ .international-phone-input__component_1ql2c .international-phone-input__addons_1ql2c {
4
4
  padding-left: 0;
5
5
  }
@@ -1,18 +1 @@
1
1
  export { BaseInternationalPhoneInput } from './Component.js';
2
- import 'tslib';
3
- import 'react';
4
- import 'react-merge-refs';
5
- import '@maskito/core';
6
- import '@maskito/react';
7
- import '@alfalab/core-components-select/esm/shared';
8
- import '../../utils/index.js';
9
- import '@alfalab/core-components-shared/esm';
10
- import '../../consts.js';
11
- import '../../data/country-data.js';
12
- import '../country-select/Component.js';
13
- import '@alfalab/icons-glyph/WorldMagnifierMIcon';
14
- import '../flag-icon/component.js';
15
- import 'classnames';
16
- import '../flag-icon/flagSprite.js';
17
- import '../select-field/component.js';
18
- import '@alfalab/hooks';
@@ -5,12 +5,8 @@ import { getDataTestId } from '@alfalab/core-components-shared/esm';
5
5
  import { WorldMagnifierMIcon } from '@alfalab/icons-glyph/WorldMagnifierMIcon';
6
6
  import { FlagIcon } from '../flag-icon/component.js';
7
7
  import { EMPTY_COUNTRY_SELECT_FIELD, SelectField } from '../select-field/component.js';
8
- import 'classnames';
9
- import '../flag-icon/flagSprite.js';
10
- import 'react-merge-refs';
11
- import '@alfalab/hooks';
12
8
 
13
- var styles = {"component":"international-phone-input__component_o5szj","option":"international-phone-input__option_o5szj","flag":"international-phone-input__flag_o5szj","countryName":"international-phone-input__countryName_o5szj","dialCode":"international-phone-input__dialCode_o5szj","flagIconWrapper":"international-phone-input__flagIconWrapper_o5szj","emptyCountryIcon":"international-phone-input__emptyCountryIcon_o5szj"};
9
+ var styles = {"component":"international-phone-input__component_1oi9d","option":"international-phone-input__option_1oi9d","flag":"international-phone-input__flag_1oi9d","countryName":"international-phone-input__countryName_1oi9d","dialCode":"international-phone-input__dialCode_1oi9d","flagIconWrapper":"international-phone-input__flagIconWrapper_1oi9d","emptyCountryIcon":"international-phone-input__emptyCountryIcon_1oi9d"};
14
10
  require('./index.css')
15
11
 
16
12
  var CountrySelect = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 1buos */
1
+ /* hash: 12p5y */
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_o5szj {
21
+ } .international-phone-input__component_1oi9d {
22
22
  position: static;
23
23
  display: flex;
24
24
  min-width: initial;
25
25
  height: 100%;
26
- } .international-phone-input__option_o5szj {
26
+ } .international-phone-input__option_1oi9d {
27
27
  display: flex;
28
28
  align-items: flex-start;
29
29
  padding: var(--gap-s);
30
- } .international-phone-input__flag_o5szj {
30
+ } .international-phone-input__flag_1oi9d {
31
31
  flex-shrink: 0;
32
32
  margin-right: var(--gap-xs);
33
- } .international-phone-input__countryName_o5szj {
33
+ } .international-phone-input__countryName_1oi9d {
34
34
  margin-right: var(--gap-xs);
35
- } .international-phone-input__dialCode_o5szj {
35
+ } .international-phone-input__dialCode_1oi9d {
36
36
  color: var(--color-light-text-secondary);
37
- } .international-phone-input__flagIconWrapper_o5szj {
37
+ } .international-phone-input__flagIconWrapper_1oi9d {
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_o5szj {
44
+ } .international-phone-input__emptyCountryIcon_1oi9d {
45
45
  color: var(--color-light-neutral-translucent-700);
46
46
  }
@@ -1,12 +1 @@
1
1
  export { CountrySelect } from './Component.js';
2
- import 'tslib';
3
- import 'react';
4
- import '@alfalab/core-components-select/esm/shared';
5
- import '@alfalab/core-components-shared/esm';
6
- import '@alfalab/icons-glyph/WorldMagnifierMIcon';
7
- import '../flag-icon/component.js';
8
- import 'classnames';
9
- import '../flag-icon/flagSprite.js';
10
- import '../select-field/component.js';
11
- import 'react-merge-refs';
12
- import '@alfalab/hooks';
@@ -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_1gyt4","flagPlaceholder":"international-phone-input__flagPlaceholder_1gyt4"};
5
+ var styles = {"flagIcon":"international-phone-input__flagIcon_137ee","flagPlaceholder":"international-phone-input__flagPlaceholder_137ee"};
6
6
  require('./index.css')
7
7
 
8
8
  /**
@@ -1,4 +1,4 @@
1
- /* hash: 1prd5 */
1
+ /* hash: 1ywvz */
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_1gyt4 {
20
+ } .international-phone-input__flagIcon_137ee {
21
21
  max-width: 24px;
22
22
  max-height: 24px;
23
- } .international-phone-input__flagPlaceholder_1gyt4 {
23
+ } .international-phone-input__flagPlaceholder_137ee {
24
24
  width: 24px;
25
25
  height: 16px;
26
26
  max-height: 16px;