@alfalab/core-components-intl-phone-input 6.1.3 → 6.2.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/CHANGELOG.md +30 -0
- package/dist/{component-76a5478b.d.ts → component-f8b7bb12.d.ts} +0 -0
- package/dist/{component-76a5478b.js → component-f8b7bb12.js} +2 -2
- package/dist/component.js +4 -4
- package/dist/components/flag-icon/component.d.ts +0 -4
- package/dist/components/flag-icon/component.js +3 -3
- package/dist/components/flag-icon/index.css +1292 -4423
- package/dist/components/index.js +1 -1
- package/dist/components/select/component.js +3 -3
- package/dist/components/select/index.css +6 -6
- package/dist/components/select/index.js +1 -1
- package/dist/components/select-field/component.js +1 -1
- package/dist/components/select-field/index.css +12 -12
- package/dist/components/select-field/index.d.ts +1 -1
- package/dist/components/select-field/index.js +1 -1
- package/dist/cssm/{component-88f82cfc.d.ts → component-343123ac.d.ts} +0 -0
- package/dist/cssm/{component-88f82cfc.js → component-343123ac.js} +1 -1
- package/dist/cssm/component.js +2 -2
- package/dist/cssm/components/flag-icon/component.d.ts +0 -4
- package/dist/cssm/components/flag-icon/component.js +2 -2
- package/dist/cssm/components/flag-icon/index.module.css +1290 -4427
- package/dist/cssm/components/index.js +1 -1
- package/dist/cssm/components/select/component.js +2 -2
- package/dist/cssm/components/select/index.js +1 -1
- package/dist/cssm/components/select-field/component.js +1 -1
- package/dist/cssm/components/select-field/index.d.ts +1 -1
- package/dist/cssm/components/select-field/index.js +1 -1
- package/dist/cssm/components/select-field/index.module.css +4 -4
- package/dist/cssm/index.js +1 -1
- package/dist/esm/{component-9b9b82d6.d.ts → component-82951d54.d.ts} +0 -0
- package/dist/esm/{component-9b9b82d6.js → component-82951d54.js} +2 -2
- package/dist/esm/component.js +4 -4
- package/dist/esm/components/flag-icon/component.d.ts +0 -4
- package/dist/esm/components/flag-icon/component.js +3 -3
- package/dist/esm/components/flag-icon/index.css +1292 -4423
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/select/component.js +4 -4
- package/dist/esm/components/select/index.css +6 -6
- package/dist/esm/components/select/index.js +1 -1
- package/dist/esm/components/select-field/component.js +1 -1
- package/dist/esm/components/select-field/index.css +12 -12
- package/dist/esm/components/select-field/index.d.ts +1 -1
- package/dist/esm/components/select-field/index.js +1 -1
- package/dist/esm/index.css +3 -3
- package/dist/esm/index.js +1 -1
- package/dist/esm/{libphonenumber-js.min-25ec5f48.d.ts → libphonenumber-js.min-224b0232.d.ts} +0 -0
- package/dist/esm/{libphonenumber-js.min-25ec5f48.js → libphonenumber-js.min-224b0232.js} +0 -0
- package/dist/index.css +3 -3
- package/dist/index.js +1 -1
- package/dist/{libphonenumber-js.min-e01537a8.d.ts → libphonenumber-js.min-24d9823c.d.ts} +0 -0
- package/dist/{libphonenumber-js.min-e01537a8.js → libphonenumber-js.min-24d9823c.js} +0 -0
- package/dist/modern/component.js +3 -3
- package/dist/modern/components/flag-icon/component.d.ts +0 -4
- package/dist/modern/components/flag-icon/component.js +3 -3
- package/dist/modern/components/flag-icon/index.css +1292 -4423
- package/dist/modern/components/select/component.js +3 -3
- package/dist/modern/components/select/index.css +6 -6
- package/dist/modern/components/select-field/component.js +2 -2
- package/dist/modern/components/select-field/index.css +12 -12
- package/dist/modern/index.css +3 -3
- package/dist/modern/{libphonenumber-js.min-25ec5f48.d.ts → libphonenumber-js.min-224b0232.d.ts} +0 -0
- package/dist/modern/{libphonenumber-js.min-25ec5f48.js → libphonenumber-js.min-224b0232.js} +0 -0
- package/package.json +3 -3
|
@@ -4,9 +4,9 @@ import 'react-merge-refs';
|
|
|
4
4
|
import '@alfalab/hooks';
|
|
5
5
|
import { FlagIcon } from '../flag-icon/component.js';
|
|
6
6
|
import { SelectField } from '../select-field/component.js';
|
|
7
|
-
import {
|
|
7
|
+
import { VirtualOptionsList, Select } from '@alfalab/core-components-select/dist/modern';
|
|
8
8
|
|
|
9
|
-
var styles = {"component":"intl-phone-
|
|
9
|
+
var styles = {"component":"intl-phone-input__component_134uw","option":"intl-phone-input__option_134uw","flag":"intl-phone-input__flag_134uw","countryName":"intl-phone-input__countryName_134uw","dialCode":"intl-phone-input__dialCode_134uw"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
12
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
@@ -23,7 +23,7 @@ const CountriesSelect = ({ disabled, size, selected, countries, fieldWidth, prev
|
|
|
23
23
|
dialCode)))),
|
|
24
24
|
})), [countries]);
|
|
25
25
|
const renderOptionsList = useCallback(props => (React.createElement("div", { style: { width: fieldWidth || 0 } },
|
|
26
|
-
React.createElement(
|
|
26
|
+
React.createElement(VirtualOptionsList, Object.assign({}, props)))), [fieldWidth]);
|
|
27
27
|
return (React.createElement("div", { className: styles.component, onClick: event => event.stopPropagation() },
|
|
28
28
|
React.createElement(Select, { dataTestId: dataTestId, disabled: disabled, size: size, options: options, selected: selected, onChange: onChange, Field: SelectField, OptionsList: renderOptionsList, preventFlip: preventFlip })));
|
|
29
29
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: ks76a */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-text-secondary: #546272;
|
|
4
4
|
}
|
|
@@ -17,24 +17,24 @@
|
|
|
17
17
|
:root {
|
|
18
18
|
--text-secondary-color: var(--color-light-text-secondary);
|
|
19
19
|
}
|
|
20
|
-
.intl-phone-
|
|
20
|
+
.intl-phone-input__component_134uw {
|
|
21
21
|
position: static;
|
|
22
22
|
display: flex;
|
|
23
23
|
min-width: initial;
|
|
24
24
|
height: 100%;
|
|
25
25
|
}
|
|
26
|
-
.intl-phone-
|
|
26
|
+
.intl-phone-input__option_134uw {
|
|
27
27
|
display: flex;
|
|
28
28
|
align-items: flex-start;
|
|
29
29
|
}
|
|
30
|
-
.intl-phone-
|
|
30
|
+
.intl-phone-input__flag_134uw {
|
|
31
31
|
flex-shrink: 0;
|
|
32
32
|
margin-top: var(--gap-2xs);
|
|
33
33
|
margin-right: var(--gap-xs);
|
|
34
34
|
}
|
|
35
|
-
.intl-phone-
|
|
35
|
+
.intl-phone-input__countryName_134uw {
|
|
36
36
|
margin-right: var(--gap-xs);
|
|
37
37
|
}
|
|
38
|
-
.intl-phone-
|
|
38
|
+
.intl-phone-input__dialCode_134uw {
|
|
39
39
|
color: var(--text-secondary-color);
|
|
40
40
|
}
|
|
@@ -4,7 +4,7 @@ import mergeRefs from 'react-merge-refs';
|
|
|
4
4
|
import { useFocus } from '@alfalab/hooks';
|
|
5
5
|
import { FlagIcon } from '../flag-icon/component.js';
|
|
6
6
|
|
|
7
|
-
var styles = {"component":"intl-phone-
|
|
7
|
+
var styles = {"component":"intl-phone-input__component_1cu57","flagIconContainer":"intl-phone-input__flagIconContainer_1cu57","disabled":"intl-phone-input__disabled_1cu57","inner":"intl-phone-input__inner_1cu57","l":"intl-phone-input__l_1cu57","xl":"intl-phone-input__xl_1cu57","focusVisible":"intl-phone-input__focusVisible_1cu57"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
const SelectField = ({ selected, Arrow, size, disabled, innerProps = {}, }) => {
|
|
@@ -17,7 +17,7 @@ const SelectField = ({ selected, Arrow, size, disabled, innerProps = {}, }) => {
|
|
|
17
17
|
}) },
|
|
18
18
|
React.createElement("div", Object.assign({}, innerProps, { className: styles.inner }),
|
|
19
19
|
selected && (React.createElement("span", { className: styles.flagIconContainer },
|
|
20
|
-
React.createElement(FlagIcon, { country: selected.value
|
|
20
|
+
React.createElement(FlagIcon, { country: selected.value }))),
|
|
21
21
|
Arrow)));
|
|
22
22
|
};
|
|
23
23
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1slfq */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-link: #007aff;
|
|
4
4
|
}
|
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
/* Hard up */
|
|
12
12
|
}
|
|
13
13
|
:root {
|
|
14
|
+
--gap-2xs: 4px;
|
|
14
15
|
--gap-s: 12px;
|
|
15
16
|
--gap-m: 16px;
|
|
16
17
|
}
|
|
@@ -18,25 +19,24 @@
|
|
|
18
19
|
--focus-color: var(--color-light-border-link);
|
|
19
20
|
--disabled-cursor: not-allowed;
|
|
20
21
|
}
|
|
21
|
-
.intl-phone-
|
|
22
|
+
.intl-phone-input__component_1cu57 {
|
|
22
23
|
height: 100%;
|
|
23
24
|
cursor: pointer;
|
|
24
25
|
outline: none;
|
|
25
|
-
width: 92px;
|
|
26
26
|
position: relative;
|
|
27
27
|
}
|
|
28
|
-
.intl-phone-
|
|
28
|
+
.intl-phone-input__flagIconContainer_1cu57 {
|
|
29
29
|
display: flex;
|
|
30
30
|
justify-content: center;
|
|
31
31
|
align-items: center;
|
|
32
|
-
width:
|
|
33
|
-
height:
|
|
34
|
-
margin-right: var(--gap-
|
|
32
|
+
width: 24px;
|
|
33
|
+
height: 24px;
|
|
34
|
+
margin-right: var(--gap-2xs);
|
|
35
35
|
}
|
|
36
|
-
.intl-phone-
|
|
36
|
+
.intl-phone-input__disabled_1cu57 {
|
|
37
37
|
cursor: var(--disabled-cursor);
|
|
38
38
|
}
|
|
39
|
-
.intl-phone-
|
|
39
|
+
.intl-phone-input__inner_1cu57 {
|
|
40
40
|
position: relative;
|
|
41
41
|
display: flex;
|
|
42
42
|
align-items: center;
|
|
@@ -44,11 +44,11 @@
|
|
|
44
44
|
padding-left: var(--gap-s);
|
|
45
45
|
outline: none;
|
|
46
46
|
}
|
|
47
|
-
.intl-phone-
|
|
48
|
-
.intl-phone-
|
|
47
|
+
.intl-phone-input__l_1cu57 .intl-phone-input__inner_1cu57,
|
|
48
|
+
.intl-phone-input__xl_1cu57 .intl-phone-input__inner_1cu57 {
|
|
49
49
|
padding-left: var(--gap-m);
|
|
50
50
|
}
|
|
51
|
-
.intl-phone-
|
|
51
|
+
.intl-phone-input__focusVisible_1cu57 {
|
|
52
52
|
outline: 2px solid var(--focus-color);
|
|
53
53
|
outline-offset: 2px;
|
|
54
54
|
}
|
package/dist/modern/index.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/* hash:
|
|
2
|
-
.intl-phone-
|
|
1
|
+
/* hash: 14hsc */
|
|
2
|
+
.intl-phone-input__addons_hi7gy {
|
|
3
3
|
padding-left: 0;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
.intl-phone-
|
|
6
|
+
.intl-phone-input__l_hi7gy .intl-phone-input__addons_hi7gy, .intl-phone-input__xl_hi7gy .intl-phone-input__addons_hi7gy {
|
|
7
7
|
padding-left: 0;
|
|
8
8
|
}
|
package/dist/modern/{libphonenumber-js.min-25ec5f48.d.ts → libphonenumber-js.min-224b0232.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-intl-phone-input",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "Phone input for international phones",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -21,12 +21,12 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@alfalab/core-components-input": "^8.1.0",
|
|
23
23
|
"@alfalab/core-components-input-autocomplete": "7.0.4",
|
|
24
|
-
"@alfalab/core-components-select": "^10.6.
|
|
24
|
+
"@alfalab/core-components-select": "^10.6.3",
|
|
25
25
|
"@alfalab/hooks": "^1.4.1",
|
|
26
26
|
"@alfalab/utils": "^1.5.1",
|
|
27
27
|
"classnames": "^2.2.6",
|
|
28
28
|
"libphonenumber-js": "^1.8.4",
|
|
29
29
|
"react-merge-refs": "^1.1.0"
|
|
30
30
|
},
|
|
31
|
-
"gitHead": "
|
|
31
|
+
"gitHead": "5d7a9d540896b970928f3ea508e6046d303cb035"
|
|
32
32
|
}
|