@alfalab/core-components-input-autocomplete 12.1.19 → 12.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/autocomplete-field/Component.js +1 -1
- package/autocomplete-field/index.css +2 -2
- package/autocomplete-mobile-field/Component.js +1 -1
- package/autocomplete-mobile-field/index.css +8 -8
- package/esm/autocomplete-field/Component.js +1 -1
- package/esm/autocomplete-field/index.css +2 -2
- package/esm/autocomplete-mobile-field/Component.js +1 -1
- package/esm/autocomplete-mobile-field/index.css +8 -8
- package/esm/mobile/Component.mobile.js +1 -1
- package/esm/mobile/mobile.css +2 -2
- package/mobile/Component.mobile.js +1 -1
- package/mobile/mobile.css +2 -2
- package/modern/autocomplete-field/Component.js +1 -1
- package/modern/autocomplete-field/index.css +2 -2
- package/modern/autocomplete-mobile-field/Component.js +1 -1
- package/modern/autocomplete-mobile-field/index.css +8 -8
- package/modern/mobile/Component.mobile.js +1 -1
- package/modern/mobile/mobile.css +2 -2
- package/moderncssm/Component.responsive.d.ts +5 -0
- package/moderncssm/Component.responsive.js +13 -0
- package/moderncssm/autocomplete-field/Component.d.ts +7 -0
- package/moderncssm/autocomplete-field/Component.js +30 -0
- package/moderncssm/autocomplete-field/index.d.ts +1 -0
- package/moderncssm/autocomplete-field/index.js +1 -0
- package/moderncssm/autocomplete-field/index.module.css +3 -0
- package/moderncssm/autocomplete-mobile-field/Component.d.ts +19 -0
- package/moderncssm/autocomplete-mobile-field/Component.js +32 -0
- package/moderncssm/autocomplete-mobile-field/index.d.ts +1 -0
- package/moderncssm/autocomplete-mobile-field/index.js +1 -0
- package/moderncssm/autocomplete-mobile-field/index.module.css +40 -0
- package/moderncssm/desktop/Component.desktop.d.ts +5 -0
- package/moderncssm/desktop/Component.desktop.js +16 -0
- package/moderncssm/desktop/index.d.ts +2 -0
- package/moderncssm/desktop/index.js +1 -0
- package/moderncssm/enums.d.ts +5 -0
- package/moderncssm/enums.js +7 -0
- package/moderncssm/index.d.ts +2 -0
- package/moderncssm/index.js +1 -0
- package/moderncssm/mobile/Component.mobile.d.ts +11 -0
- package/moderncssm/mobile/Component.mobile.js +91 -0
- package/moderncssm/mobile/Component.modal.mobile.d.ts +11 -0
- package/moderncssm/mobile/Component.modal.mobile.js +6 -0
- package/moderncssm/mobile/index.d.ts +3 -0
- package/moderncssm/mobile/index.js +2 -0
- package/moderncssm/mobile/mobile.module.css +5 -0
- package/moderncssm/shared/index.d.ts +1 -0
- package/moderncssm/shared/index.js +1 -0
- package/moderncssm/types.d.ts +70 -0
- package/moderncssm/types.js +1 -0
- package/moderncssm/utils.d.ts +40 -0
- package/moderncssm/utils.js +49 -0
- package/package.json +7 -7
- package/src/autocomplete-mobile-field/index.module.css +1 -1
- package/src/mobile/mobile.module.css +1 -1
|
@@ -15,7 +15,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
15
15
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
16
16
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
17
17
|
|
|
18
|
-
var styles = {"arrow":"input-
|
|
18
|
+
var styles = {"arrow":"input-autocomplete__arrow_1d65l","error":"input-autocomplete__error_1d65l"};
|
|
19
19
|
require('./index.css')
|
|
20
20
|
|
|
21
21
|
var AutocompleteField = function (_a) {
|
|
@@ -15,7 +15,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
15
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
16
16
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
17
17
|
|
|
18
|
-
var styles = {"component":"input-
|
|
18
|
+
var styles = {"component":"input-autocomplete__component_8wvlq","field":"input-autocomplete__field_8wvlq","disabled":"input-autocomplete__disabled_8wvlq","placeholder":"input-autocomplete__placeholder_8wvlq","contentWrapper":"input-autocomplete__contentWrapper_8wvlq","value":"input-autocomplete__value_8wvlq","focusVisible":"input-autocomplete__focusVisible_8wvlq"};
|
|
19
19
|
require('./index.css')
|
|
20
20
|
|
|
21
21
|
var AutocompleteMobileField = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: dmwpi */
|
|
2
2
|
:root { /* 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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-status-info: #2288fa;
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
} :root {
|
|
23
23
|
--focus-color: var(--color-light-status-info);
|
|
24
24
|
--disabled-cursor: not-allowed;
|
|
25
|
-
} .input-
|
|
25
|
+
} .input-autocomplete__component_8wvlq {
|
|
26
26
|
width: 100%;
|
|
27
27
|
outline: none;
|
|
28
|
-
} .input-
|
|
28
|
+
} .input-autocomplete__field_8wvlq:not(.input-autocomplete__disabled_8wvlq) {
|
|
29
29
|
cursor: pointer;
|
|
30
|
-
} .input-
|
|
30
|
+
} .input-autocomplete__disabled_8wvlq {
|
|
31
31
|
cursor: var(--disabled-cursor);
|
|
32
|
-
} .input-
|
|
32
|
+
} .input-autocomplete__placeholder_8wvlq {
|
|
33
33
|
color: var(--color-light-text-secondary);
|
|
34
|
-
} .input-
|
|
34
|
+
} .input-autocomplete__contentWrapper_8wvlq {
|
|
35
35
|
font-size: 16px;
|
|
36
36
|
line-height: 20px;
|
|
37
37
|
font-weight: 400;
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
text-overflow: ellipsis;
|
|
41
41
|
overflow: hidden;
|
|
42
42
|
width: 100%;
|
|
43
|
-
} .input-
|
|
43
|
+
} .input-autocomplete__value_8wvlq {
|
|
44
44
|
overflow: hidden;
|
|
45
45
|
text-overflow: ellipsis;
|
|
46
46
|
text-align: left;
|
|
47
|
-
} .input-
|
|
47
|
+
} .input-autocomplete__focusVisible_8wvlq {
|
|
48
48
|
outline: 2px solid var(--focus-color);
|
|
49
49
|
outline-offset: 2px;
|
|
50
50
|
}
|
|
@@ -5,7 +5,7 @@ import cn from 'classnames';
|
|
|
5
5
|
import { InputDesktop } from '@alfalab/core-components-input/esm/desktop';
|
|
6
6
|
import { OnInputReason } from '../enums.js';
|
|
7
7
|
|
|
8
|
-
var styles = {"arrow":"input-
|
|
8
|
+
var styles = {"arrow":"input-autocomplete__arrow_1d65l","error":"input-autocomplete__error_1d65l"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
var AutocompleteField = function (_a) {
|
|
@@ -6,7 +6,7 @@ import { ClearButton } from '@alfalab/core-components-input/esm/shared';
|
|
|
6
6
|
import { getDataTestId } from '@alfalab/core-components-shared/esm';
|
|
7
7
|
import { useFocus } from '@alfalab/hooks';
|
|
8
8
|
|
|
9
|
-
var styles = {"component":"input-
|
|
9
|
+
var styles = {"component":"input-autocomplete__component_8wvlq","field":"input-autocomplete__field_8wvlq","disabled":"input-autocomplete__disabled_8wvlq","placeholder":"input-autocomplete__placeholder_8wvlq","contentWrapper":"input-autocomplete__contentWrapper_8wvlq","value":"input-autocomplete__value_8wvlq","focusVisible":"input-autocomplete__focusVisible_8wvlq"};
|
|
10
10
|
require('./index.css')
|
|
11
11
|
|
|
12
12
|
var AutocompleteMobileField = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: dmwpi */
|
|
2
2
|
:root { /* 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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-status-info: #2288fa;
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
} :root {
|
|
23
23
|
--focus-color: var(--color-light-status-info);
|
|
24
24
|
--disabled-cursor: not-allowed;
|
|
25
|
-
} .input-
|
|
25
|
+
} .input-autocomplete__component_8wvlq {
|
|
26
26
|
width: 100%;
|
|
27
27
|
outline: none;
|
|
28
|
-
} .input-
|
|
28
|
+
} .input-autocomplete__field_8wvlq:not(.input-autocomplete__disabled_8wvlq) {
|
|
29
29
|
cursor: pointer;
|
|
30
|
-
} .input-
|
|
30
|
+
} .input-autocomplete__disabled_8wvlq {
|
|
31
31
|
cursor: var(--disabled-cursor);
|
|
32
|
-
} .input-
|
|
32
|
+
} .input-autocomplete__placeholder_8wvlq {
|
|
33
33
|
color: var(--color-light-text-secondary);
|
|
34
|
-
} .input-
|
|
34
|
+
} .input-autocomplete__contentWrapper_8wvlq {
|
|
35
35
|
font-size: 16px;
|
|
36
36
|
line-height: 20px;
|
|
37
37
|
font-weight: 400;
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
text-overflow: ellipsis;
|
|
41
41
|
overflow: hidden;
|
|
42
42
|
width: 100%;
|
|
43
|
-
} .input-
|
|
43
|
+
} .input-autocomplete__value_8wvlq {
|
|
44
44
|
overflow: hidden;
|
|
45
45
|
text-overflow: ellipsis;
|
|
46
46
|
text-align: left;
|
|
47
|
-
} .input-
|
|
47
|
+
} .input-autocomplete__focusVisible_8wvlq {
|
|
48
48
|
outline: 2px solid var(--focus-color);
|
|
49
49
|
outline-offset: 2px;
|
|
50
50
|
}
|
|
@@ -9,7 +9,7 @@ import { AutocompleteMobileField } from '../autocomplete-mobile-field/Component.
|
|
|
9
9
|
import { OnInputReason } from '../enums.js';
|
|
10
10
|
import { searchFilterStub } from '../utils.js';
|
|
11
11
|
|
|
12
|
-
var styles = {"input":"input-
|
|
12
|
+
var styles = {"input":"input-autocomplete__input_98c7m"};
|
|
13
13
|
require('./mobile.css')
|
|
14
14
|
|
|
15
15
|
var InputAutocompleteMobile = React.forwardRef(function (_a, ref) {
|
package/esm/mobile/mobile.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: i7n2t */
|
|
2
2
|
:root { /* 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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root { /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */
|
|
4
4
|
} :root { /* 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 */ /* 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 */ /* 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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
/* новые значения, используйте их */
|
|
19
19
|
} :root {
|
|
20
20
|
} :root {
|
|
21
|
-
} .input-
|
|
21
|
+
} .input-autocomplete__input_98c7m {
|
|
22
22
|
width: auto;
|
|
23
23
|
}
|
|
@@ -20,7 +20,7 @@ var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
|
20
20
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
21
21
|
var throttle__default = /*#__PURE__*/_interopDefaultCompat(throttle);
|
|
22
22
|
|
|
23
|
-
var styles = {"input":"input-
|
|
23
|
+
var styles = {"input":"input-autocomplete__input_98c7m"};
|
|
24
24
|
require('./mobile.css')
|
|
25
25
|
|
|
26
26
|
var InputAutocompleteMobile = React__default.default.forwardRef(function (_a, ref) {
|
package/mobile/mobile.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: i7n2t */
|
|
2
2
|
:root { /* 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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root { /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */
|
|
4
4
|
} :root { /* 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 */ /* 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 */ /* 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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
/* новые значения, используйте их */
|
|
19
19
|
} :root {
|
|
20
20
|
} :root {
|
|
21
|
-
} .input-
|
|
21
|
+
} .input-autocomplete__input_98c7m {
|
|
22
22
|
width: auto;
|
|
23
23
|
}
|
|
@@ -4,7 +4,7 @@ import cn from 'classnames';
|
|
|
4
4
|
import { InputDesktop } from '@alfalab/core-components-input/modern/desktop';
|
|
5
5
|
import { OnInputReason } from '../enums.js';
|
|
6
6
|
|
|
7
|
-
const styles = {"arrow":"input-
|
|
7
|
+
const styles = {"arrow":"input-autocomplete__arrow_1d65l","error":"input-autocomplete__error_1d65l"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
const AutocompleteField = ({ label, labelView = 'inner', placeholder, size, Arrow, Input = InputDesktop, value, error, success, hint, disabled, readOnly, onInput, inputProps = {}, innerProps, dataTestId, }) => {
|
|
@@ -5,7 +5,7 @@ import { ClearButton } from '@alfalab/core-components-input/modern/shared';
|
|
|
5
5
|
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
6
6
|
import { useFocus } from '@alfalab/hooks';
|
|
7
7
|
|
|
8
|
-
const styles = {"component":"input-
|
|
8
|
+
const styles = {"component":"input-autocomplete__component_8wvlq","field":"input-autocomplete__field_8wvlq","disabled":"input-autocomplete__disabled_8wvlq","placeholder":"input-autocomplete__placeholder_8wvlq","contentWrapper":"input-autocomplete__contentWrapper_8wvlq","value":"input-autocomplete__value_8wvlq","focusVisible":"input-autocomplete__focusVisible_8wvlq"};
|
|
9
9
|
require('./index.css')
|
|
10
10
|
|
|
11
11
|
const AutocompleteMobileField = ({ size = 56, open, disabled, value, innerProps, dataTestId, fieldClassName, labelView = 'inner', placeholder, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, FormControlComponent, rightAddons, error, readOnly, clear, onClear, onInput, colors = 'default', ...restProps }) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: dmwpi */
|
|
2
2
|
:root { /* 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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-status-info: #2288fa;
|
|
@@ -22,16 +22,16 @@
|
|
|
22
22
|
} :root {
|
|
23
23
|
--focus-color: var(--color-light-status-info);
|
|
24
24
|
--disabled-cursor: not-allowed;
|
|
25
|
-
} .input-
|
|
25
|
+
} .input-autocomplete__component_8wvlq {
|
|
26
26
|
width: 100%;
|
|
27
27
|
outline: none;
|
|
28
|
-
} .input-
|
|
28
|
+
} .input-autocomplete__field_8wvlq:not(.input-autocomplete__disabled_8wvlq) {
|
|
29
29
|
cursor: pointer;
|
|
30
|
-
} .input-
|
|
30
|
+
} .input-autocomplete__disabled_8wvlq {
|
|
31
31
|
cursor: var(--disabled-cursor);
|
|
32
|
-
} .input-
|
|
32
|
+
} .input-autocomplete__placeholder_8wvlq {
|
|
33
33
|
color: var(--color-light-text-secondary);
|
|
34
|
-
} .input-
|
|
34
|
+
} .input-autocomplete__contentWrapper_8wvlq {
|
|
35
35
|
font-size: 16px;
|
|
36
36
|
line-height: 20px;
|
|
37
37
|
font-weight: 400;
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
text-overflow: ellipsis;
|
|
41
41
|
overflow: hidden;
|
|
42
42
|
width: 100%;
|
|
43
|
-
} .input-
|
|
43
|
+
} .input-autocomplete__value_8wvlq {
|
|
44
44
|
overflow: hidden;
|
|
45
45
|
text-overflow: ellipsis;
|
|
46
46
|
text-align: left;
|
|
47
|
-
} .input-
|
|
47
|
+
} .input-autocomplete__focusVisible_8wvlq {
|
|
48
48
|
outline: 2px solid var(--focus-color);
|
|
49
49
|
outline-offset: 2px;
|
|
50
50
|
}
|
|
@@ -8,7 +8,7 @@ import { AutocompleteMobileField } from '../autocomplete-mobile-field/Component.
|
|
|
8
8
|
import { OnInputReason } from '../enums.js';
|
|
9
9
|
import { searchFilterStub } from '../utils.js';
|
|
10
10
|
|
|
11
|
-
const styles = {"input":"input-
|
|
11
|
+
const styles = {"input":"input-autocomplete__input_98c7m"};
|
|
12
12
|
require('./mobile.css')
|
|
13
13
|
|
|
14
14
|
const InputAutocompleteMobile = React.forwardRef(({ Input, value, name, Arrow = null, label, placeholder = '', size = 48, open: openProp, onInput, onOpen, multiple, inputProps, isBottomSheet = true, dataTestId, transitionProps, onCancel, onApply, title, ...restProps }, ref) => {
|
package/modern/mobile/mobile.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: i7n2t */
|
|
2
2
|
:root { /* 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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root { /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */
|
|
4
4
|
} :root { /* 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 */ /* 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 */ /* 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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -18,6 +18,6 @@
|
|
|
18
18
|
/* новые значения, используйте их */
|
|
19
19
|
} :root {
|
|
20
20
|
} :root {
|
|
21
|
-
} .input-
|
|
21
|
+
} .input-autocomplete__input_98c7m {
|
|
22
22
|
width: auto;
|
|
23
23
|
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { InputAutocompleteProps } from "./types";
|
|
4
|
+
declare const InputAutocomplete: React.ForwardRefExoticComponent<InputAutocompleteProps & React.RefAttributes<HTMLDivElement | HTMLInputElement>>;
|
|
5
|
+
export { InputAutocomplete };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import { useMatchMedia } from '@alfalab/core-components-mq/moderncssm';
|
|
3
|
+
import { InputAutocompleteDesktop } from './desktop/Component.desktop.js';
|
|
4
|
+
import { InputAutocompleteMobile } from './mobile/Component.mobile.js';
|
|
5
|
+
import './mobile/Component.modal.mobile.js';
|
|
6
|
+
|
|
7
|
+
const InputAutocomplete = forwardRef(({ breakpoint = 1024, defaultMatchMediaValue = true, mobileProps, ...restProps }, ref) => {
|
|
8
|
+
const [isDesktop] = useMatchMedia(`(min-width: ${breakpoint}px)`, defaultMatchMediaValue);
|
|
9
|
+
return isDesktop ? (React.createElement(InputAutocompleteDesktop, { ...restProps, ref: ref })) : (React.createElement(InputAutocompleteMobile, { ...restProps, ...mobileProps, ref: ref }));
|
|
10
|
+
});
|
|
11
|
+
InputAutocomplete.displayName = 'InputAutocomplete';
|
|
12
|
+
|
|
13
|
+
export { InputAutocomplete };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { FieldProps } from "@alfalab/core-components-select/shared";
|
|
4
|
+
import { InputAutocompleteCommonProps } from "../types";
|
|
5
|
+
type AutocompleteFieldProps = FieldProps & Pick<InputAutocompleteCommonProps, 'Input' | 'inputProps' | 'value' | 'onInput' | 'readOnly'>;
|
|
6
|
+
declare const AutocompleteField: ({ label, labelView, placeholder, size, Arrow, Input, value, error, success, hint, disabled, readOnly, onInput, inputProps, innerProps, dataTestId, }: AutocompleteFieldProps) => React.JSX.Element;
|
|
7
|
+
export { AutocompleteFieldProps, AutocompleteField };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { useRef, useCallback } from 'react';
|
|
2
|
+
import mergeRefs from 'react-merge-refs';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import { InputDesktop } from '@alfalab/core-components-input/moderncssm/desktop';
|
|
5
|
+
import { OnInputReason } from '../enums.js';
|
|
6
|
+
import styles from './index.module.css';
|
|
7
|
+
|
|
8
|
+
const AutocompleteField = ({ label, labelView = 'inner', placeholder, size, Arrow, Input = InputDesktop, value, error, success, hint, disabled, readOnly, onInput, inputProps = {}, innerProps, dataTestId, }) => {
|
|
9
|
+
const inputRef = useRef(null);
|
|
10
|
+
const { onClick, onFocus } = innerProps;
|
|
11
|
+
const inputDisabled = disabled || readOnly;
|
|
12
|
+
const handleClick = useCallback((event) => {
|
|
13
|
+
if (onClick)
|
|
14
|
+
onClick(event);
|
|
15
|
+
if (inputRef.current) {
|
|
16
|
+
inputRef.current.focus();
|
|
17
|
+
}
|
|
18
|
+
}, [onClick]);
|
|
19
|
+
const handleInput = (_, payload) => onInput?.(payload.value, OnInputReason.Change);
|
|
20
|
+
return (React.createElement(Input, { dataTestId: dataTestId, ...inputProps, ...innerProps, wrapperRef: mergeRefs([
|
|
21
|
+
innerProps.ref,
|
|
22
|
+
inputProps.wrapperRef,
|
|
23
|
+
]), ref: mergeRefs([inputRef, inputProps.ref]), disabled: disabled, readOnly: readOnly, block: true, label: label, labelView: labelView, placeholder: placeholder, size: size, error: error, success: success, hint: hint, onChange: handleInput, onClick: inputDisabled ? undefined : handleClick, onFocus: inputDisabled ? undefined : onFocus, autoComplete: 'off', value: value, rightAddons: (Arrow || inputProps.rightAddons) && (React.createElement(React.Fragment, null,
|
|
24
|
+
inputProps.rightAddons,
|
|
25
|
+
Arrow && (React.createElement("span", { className: cn(styles.arrow, {
|
|
26
|
+
[styles.error]: error,
|
|
27
|
+
}) }, Arrow)))) }));
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { AutocompleteField };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AutocompleteField } from './Component.js';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ElementType } from "react";
|
|
4
|
+
import { FormControlMobileProps } from "@alfalab/core-components-form-control/mobile";
|
|
5
|
+
import { FieldProps as BaseFieldProps } from "@alfalab/core-components-select/shared";
|
|
6
|
+
type FieldProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Компонент FormControl
|
|
9
|
+
*/
|
|
10
|
+
FormControlComponent?: ElementType;
|
|
11
|
+
};
|
|
12
|
+
type AutocompleteMobileFieldProps = FormControlMobileProps & Omit<BaseFieldProps, 'selected' | 'multiple' | 'success'> & {
|
|
13
|
+
/**
|
|
14
|
+
* Значение поля ввода
|
|
15
|
+
*/
|
|
16
|
+
value?: string;
|
|
17
|
+
};
|
|
18
|
+
declare const AutocompleteMobileField: ({ size, open, disabled, value, innerProps, dataTestId, fieldClassName, labelView, placeholder, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, FormControlComponent, rightAddons, error, readOnly, clear, onClear, onInput, colors, ...restProps }: AutocompleteMobileFieldProps & FieldProps) => React.JSX.Element;
|
|
19
|
+
export { AutocompleteMobileFieldProps, AutocompleteMobileField };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import React, { useState, useRef } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { FormControlMobile } from '@alfalab/core-components-form-control/moderncssm/mobile';
|
|
4
|
+
import { ClearButton } from '@alfalab/core-components-input/moderncssm/shared';
|
|
5
|
+
import { getDataTestId } from '@alfalab/core-components-shared/moderncssm';
|
|
6
|
+
import { useFocus } from '@alfalab/hooks';
|
|
7
|
+
import styles from './index.module.css';
|
|
8
|
+
|
|
9
|
+
const AutocompleteMobileField = ({ size = 56, open, disabled, value, innerProps, dataTestId, fieldClassName, labelView = 'inner', placeholder, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, FormControlComponent, rightAddons, error, readOnly, clear, onClear, onInput, colors = 'default', ...restProps }) => {
|
|
10
|
+
const [focused, setFocused] = useState(false);
|
|
11
|
+
const wrapperRef = useRef(null);
|
|
12
|
+
const [focusVisible] = useFocus(wrapperRef, 'keyboard');
|
|
13
|
+
const filled = Boolean(value);
|
|
14
|
+
const showPlaceholder = placeholder && !filled && labelView === 'outer';
|
|
15
|
+
const clearButtonVisible = clear && filled && !disabled && !readOnly;
|
|
16
|
+
const { tabIndex, ...restInnerProps } = innerProps;
|
|
17
|
+
return (React.createElement("div", { className: styles.component, ref: wrapperRef, onFocus: () => setFocused(true), onBlur: () => setFocused(false) },
|
|
18
|
+
React.createElement(FormControlMobile, { fieldClassName: cn(styles.field, fieldClassName, {
|
|
19
|
+
[styles.disabled]: disabled,
|
|
20
|
+
[styles.focusVisible]: focusVisible,
|
|
21
|
+
}), block: true, size: size, focused: focused, disabled: disabled, filled: filled, labelView: labelView, dataTestId: getDataTestId(dataTestId, 'form-control'),
|
|
22
|
+
// downshift устанавливает фокус на таргет поле после выбора опции, не даем ему это сделать пока открыт список, иначе поле поиска будет терять фокус
|
|
23
|
+
tabIndex: open ? undefined : tabIndex, ...restProps, ...restInnerProps, readOnly: readOnly, colors: colors, error: error, rightAddons: (Arrow || rightAddons || clearButtonVisible) && (React.createElement(React.Fragment, null,
|
|
24
|
+
clearButtonVisible && (React.createElement(ClearButton, { onClick: onClear, disabled: disabled, colors: colors })),
|
|
25
|
+
rightAddons,
|
|
26
|
+
Arrow)) },
|
|
27
|
+
React.createElement("div", { className: styles.contentWrapper },
|
|
28
|
+
showPlaceholder && React.createElement("span", { className: styles.placeholder }, placeholder),
|
|
29
|
+
filled && React.createElement("div", { className: styles.value }, value)))));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export { AutocompleteMobileField };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { AutocompleteMobileField } from './Component.js';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/* */
|
|
2
|
+
|
|
3
|
+
.component {
|
|
4
|
+
width: 100%;
|
|
5
|
+
outline: none;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.field:not(.disabled) {
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.disabled {
|
|
13
|
+
cursor: var(--disabled-cursor);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.placeholder {
|
|
17
|
+
color: var(--color-light-text-secondary);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.contentWrapper {
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
line-height: 20px;
|
|
23
|
+
font-weight: 400;
|
|
24
|
+
|
|
25
|
+
white-space: nowrap;
|
|
26
|
+
text-overflow: ellipsis;
|
|
27
|
+
overflow: hidden;
|
|
28
|
+
width: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.value {
|
|
32
|
+
overflow: hidden;
|
|
33
|
+
text-overflow: ellipsis;
|
|
34
|
+
text-align: left;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.focusVisible {
|
|
38
|
+
outline: 2px solid var(--focus-color);
|
|
39
|
+
outline-offset: 2px;
|
|
40
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { InputAutocompleteCommonProps } from "../types";
|
|
4
|
+
declare const InputAutocompleteDesktop: React.ForwardRefExoticComponent<InputAutocompleteCommonProps & React.RefAttributes<HTMLInputElement>>;
|
|
5
|
+
export { InputAutocompleteDesktop };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import { Popover } from '@alfalab/core-components-popover/moderncssm';
|
|
3
|
+
import { BaseSelect, OptionsList, Optgroup, Option } from '@alfalab/core-components-select/moderncssm/shared';
|
|
4
|
+
import { AutocompleteField } from '../autocomplete-field/Component.js';
|
|
5
|
+
|
|
6
|
+
const InputAutocompleteDesktop = forwardRef(({ OptionsList: OptionsList$1 = OptionsList, Optgroup: Optgroup$1 = Optgroup, Option: Option$1 = Option, Input, inputProps = {}, onInput, value, success, readOnly, closeOnSelect = false, options, ...restProps }, ref) => (React.createElement(BaseSelect, { view: 'desktop', Popover: Popover, ref: ref, autocomplete: true, options: options, closeOnSelect: closeOnSelect, Option: Option$1, Field: AutocompleteField, Optgroup: Optgroup$1, OptionsList: OptionsList$1, ...restProps, fieldProps: {
|
|
7
|
+
...restProps.fieldProps,
|
|
8
|
+
Input,
|
|
9
|
+
onInput,
|
|
10
|
+
value,
|
|
11
|
+
inputProps,
|
|
12
|
+
readOnly,
|
|
13
|
+
success,
|
|
14
|
+
} })));
|
|
15
|
+
|
|
16
|
+
export { InputAutocompleteDesktop };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InputAutocompleteDesktop } from './Component.desktop.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InputAutocomplete } from './Component.responsive.js';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react-transition-group" />
|
|
3
|
+
import React from 'react';
|
|
4
|
+
declare const InputAutocompleteMobile: React.ForwardRefExoticComponent<import("../types").InputAutocompleteCommonProps & {
|
|
5
|
+
isBottomSheet?: boolean | undefined;
|
|
6
|
+
transitionProps?: Partial<import("react-transition-group/Transition").TransitionProps<undefined>> | undefined;
|
|
7
|
+
onApply?: (() => void) | undefined;
|
|
8
|
+
onCancel?: (() => void) | undefined;
|
|
9
|
+
title?: string | undefined;
|
|
10
|
+
} & React.RefAttributes<unknown>>;
|
|
11
|
+
export { InputAutocompleteMobile };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import React, { useState, useRef, useMemo } from 'react';
|
|
2
|
+
import mergeRefs from 'react-merge-refs';
|
|
3
|
+
import cn from 'classnames';
|
|
4
|
+
import throttle from 'lodash.throttle';
|
|
5
|
+
import { SelectMobile, SelectModalMobile } from '@alfalab/core-components-select/moderncssm/mobile';
|
|
6
|
+
import { Footer } from '@alfalab/core-components-select/moderncssm/shared';
|
|
7
|
+
import { AutocompleteMobileField } from '../autocomplete-mobile-field/Component.js';
|
|
8
|
+
import { OnInputReason } from '../enums.js';
|
|
9
|
+
import { searchFilterStub } from '../utils.js';
|
|
10
|
+
import styles from './mobile.module.css';
|
|
11
|
+
|
|
12
|
+
const InputAutocompleteMobile = React.forwardRef(({ Input, value, name, Arrow = null, label, placeholder = '', size = 48, open: openProp, onInput, onOpen, multiple, inputProps, isBottomSheet = true, dataTestId, transitionProps, onCancel, onApply, title, ...restProps }, ref) => {
|
|
13
|
+
const [open, setOpen] = useState(false);
|
|
14
|
+
const frozenValue = useRef('');
|
|
15
|
+
const searchInputRef = useRef(null);
|
|
16
|
+
const targetRef = useRef(null);
|
|
17
|
+
const restorePrevValue = () => onInput?.(frozenValue.current, OnInputReason.Close);
|
|
18
|
+
const setModalVisibility = (isOpen) => {
|
|
19
|
+
if (isOpen) {
|
|
20
|
+
frozenValue.current = value || '';
|
|
21
|
+
}
|
|
22
|
+
if (openProp === undefined) {
|
|
23
|
+
setOpen(isOpen);
|
|
24
|
+
}
|
|
25
|
+
onOpen?.({ open: isOpen, name });
|
|
26
|
+
};
|
|
27
|
+
const handleOpen = (payload) => {
|
|
28
|
+
setModalVisibility(Boolean(payload.open));
|
|
29
|
+
};
|
|
30
|
+
const handleOptionsListTouchMove = useMemo(() => throttle(() => {
|
|
31
|
+
const input = searchInputRef.current;
|
|
32
|
+
if (input && document.activeElement === input) {
|
|
33
|
+
input.blur();
|
|
34
|
+
}
|
|
35
|
+
}, 300), []);
|
|
36
|
+
const handleApply = () => {
|
|
37
|
+
setModalVisibility(false);
|
|
38
|
+
onApply?.();
|
|
39
|
+
};
|
|
40
|
+
const handleCancel = () => {
|
|
41
|
+
setModalVisibility(false);
|
|
42
|
+
restorePrevValue();
|
|
43
|
+
onCancel?.();
|
|
44
|
+
};
|
|
45
|
+
const handleExiting = (node) => {
|
|
46
|
+
targetRef.current?.focus();
|
|
47
|
+
transitionProps?.onExiting?.(node);
|
|
48
|
+
};
|
|
49
|
+
const isOpen = Boolean(open || openProp);
|
|
50
|
+
const Component = isBottomSheet ? SelectMobile : SelectModalMobile;
|
|
51
|
+
const componentProps = {
|
|
52
|
+
title: title || label || placeholder,
|
|
53
|
+
onClose: restorePrevValue,
|
|
54
|
+
transitionProps: {
|
|
55
|
+
...transitionProps,
|
|
56
|
+
onExiting: handleExiting,
|
|
57
|
+
},
|
|
58
|
+
[isBottomSheet ? 'containerProps' : 'componentDivProps']: {
|
|
59
|
+
onTouchMove: handleOptionsListTouchMove,
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
const clear = inputProps?.clear ?? false;
|
|
63
|
+
return (React.createElement(Component, { Field: AutocompleteMobileField, ...restProps, ...(isBottomSheet
|
|
64
|
+
? { bottomSheetProps: componentProps }
|
|
65
|
+
: {
|
|
66
|
+
modalProps: componentProps,
|
|
67
|
+
modalHeaderProps: { title },
|
|
68
|
+
}), dataTestId: dataTestId, useWithApplyHook: false, showSearch: true, searchProps: {
|
|
69
|
+
value,
|
|
70
|
+
filterFn: searchFilterStub,
|
|
71
|
+
componentProps: {
|
|
72
|
+
leftAddons: null,
|
|
73
|
+
placeholder,
|
|
74
|
+
...inputProps,
|
|
75
|
+
className: cn(styles.input, inputProps?.className),
|
|
76
|
+
clear,
|
|
77
|
+
ref: mergeRefs([searchInputRef, inputProps?.ref]),
|
|
78
|
+
onChange: (_, payload) => onInput?.(payload.value, OnInputReason.Change),
|
|
79
|
+
},
|
|
80
|
+
}, Search: Input, ref: mergeRefs([targetRef, ref]), open: isOpen, onOpen: handleOpen, Arrow: Arrow, placeholder: placeholder, label: label, size: size, name: name, multiple: multiple, optionsListProps: {
|
|
81
|
+
footer: (React.createElement(Footer, { showClear: true, handleClear: handleCancel, handleApply: handleApply, clearText: '\u041E\u0442\u043C\u0435\u043D\u0430', applyText: '\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C', dataTestId: dataTestId })),
|
|
82
|
+
...restProps.optionsListProps,
|
|
83
|
+
}, fieldProps: {
|
|
84
|
+
value: isOpen ? frozenValue.current : value,
|
|
85
|
+
clear,
|
|
86
|
+
onClear: clear ? inputProps?.onClear : undefined,
|
|
87
|
+
...restProps.fieldProps,
|
|
88
|
+
} }));
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
export { InputAutocompleteMobile };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/// <reference types="react-transition-group" />
|
|
3
|
+
import React from 'react';
|
|
4
|
+
declare const InputAutocompleteModalMobile: React.ForwardRefExoticComponent<import("../types").InputAutocompleteCommonProps & {
|
|
5
|
+
isBottomSheet?: boolean | undefined;
|
|
6
|
+
transitionProps?: Partial<import("react-transition-group/Transition").TransitionProps<undefined>> | undefined;
|
|
7
|
+
onApply?: (() => void) | undefined;
|
|
8
|
+
onCancel?: (() => void) | undefined;
|
|
9
|
+
title?: string | undefined;
|
|
10
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
+
export { InputAutocompleteModalMobile };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { InputAutocompleteMobile } from './Component.mobile.js';
|
|
3
|
+
|
|
4
|
+
const InputAutocompleteModalMobile = React.forwardRef((props, ref) => React.createElement(InputAutocompleteMobile, { ...props, ref: ref, isBottomSheet: false }));
|
|
5
|
+
|
|
6
|
+
export { InputAutocompleteModalMobile };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getInputAutocompleteDesktopTestIds, getInputAutocompleteMobileTestIds } from "../utils";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getInputAutocompleteDesktopTestIds, getInputAutocompleteMobileTestIds } from '../utils.js';
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { ComponentType, RefAttributes } from 'react';
|
|
2
|
+
import { InputProps } from "@alfalab/core-components-input";
|
|
3
|
+
import { BaseSelectProps, BottomSheetSelectMobileProps } from "@alfalab/core-components-select/shared";
|
|
4
|
+
type OnInputTypeReason = 'close' | 'change';
|
|
5
|
+
interface InputAutocompleteCommonProps extends Omit<BaseSelectProps, 'autocomplete' | 'Field' | 'nativeSelect' | 'searchProps' | 'showSearch' | 'Search' | 'valueRenderer'> {
|
|
6
|
+
/**
|
|
7
|
+
* Компонент ввода значения
|
|
8
|
+
*/
|
|
9
|
+
Input?: ComponentType<InputProps & RefAttributes<HTMLInputElement>>;
|
|
10
|
+
/**
|
|
11
|
+
* Пропсы, которые будут прокинуты в инпут
|
|
12
|
+
*/
|
|
13
|
+
inputProps?: InputProps & Record<string, unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* Значение поля ввода
|
|
16
|
+
*/
|
|
17
|
+
value?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Поле доступно только для чтения
|
|
20
|
+
*/
|
|
21
|
+
readOnly?: InputProps['readOnly'];
|
|
22
|
+
/**
|
|
23
|
+
* Отображение иконки успеха
|
|
24
|
+
*/
|
|
25
|
+
success?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Обработчик ввода
|
|
28
|
+
*/
|
|
29
|
+
onInput?: (value: string, reason?: OnInputTypeReason) => void;
|
|
30
|
+
}
|
|
31
|
+
type MobileProps = {
|
|
32
|
+
/**
|
|
33
|
+
* Открывать в bottom-sheet
|
|
34
|
+
*/
|
|
35
|
+
isBottomSheet?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Пропсы анимации контента (CSSTransition)
|
|
38
|
+
*/
|
|
39
|
+
transitionProps?: NonNullable<BottomSheetSelectMobileProps['bottomSheetProps']>['transitionProps'];
|
|
40
|
+
/**
|
|
41
|
+
* Обработчик нажатия на кнопку «Продолжить» в BottomSheet или модальном окне
|
|
42
|
+
*/
|
|
43
|
+
onApply?: () => void;
|
|
44
|
+
/**
|
|
45
|
+
* Обработчик нажатия на кнопку «Отмена» в BottomSheet или модальном окне
|
|
46
|
+
*/
|
|
47
|
+
onCancel?: () => void;
|
|
48
|
+
/**
|
|
49
|
+
* Заголовок в модальном окне или шторке.
|
|
50
|
+
* Если не передан, то заголовок будет совпадать с label. Если не передан и label, то заголовок будет равен placeholder
|
|
51
|
+
*/
|
|
52
|
+
title?: string;
|
|
53
|
+
};
|
|
54
|
+
type InputAutocompleteMobileProps = InputAutocompleteCommonProps & MobileProps;
|
|
55
|
+
interface InputAutocompleteProps extends InputAutocompleteCommonProps {
|
|
56
|
+
/**
|
|
57
|
+
* Пропсы для мобильного компонента
|
|
58
|
+
*/
|
|
59
|
+
mobileProps?: MobileProps;
|
|
60
|
+
/**
|
|
61
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
62
|
+
* @default 1024
|
|
63
|
+
*/
|
|
64
|
+
breakpoint?: number;
|
|
65
|
+
/**
|
|
66
|
+
* Значение по-умолчанию для хука useMatchMedia
|
|
67
|
+
*/
|
|
68
|
+
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
69
|
+
}
|
|
70
|
+
export { InputAutocompleteCommonProps, InputAutocompleteMobileProps, InputAutocompleteProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
declare function searchFilterStub(): boolean;
|
|
2
|
+
declare function getInputAutocompleteDesktopTestIds(dataTestId: string): {
|
|
3
|
+
inputAutocomplete: string;
|
|
4
|
+
option: string;
|
|
5
|
+
optionsList: string;
|
|
6
|
+
field: string;
|
|
7
|
+
fieldInner: string;
|
|
8
|
+
fieldFormControl: string;
|
|
9
|
+
fieldLeftAddons: string;
|
|
10
|
+
fieldRightAddons: string;
|
|
11
|
+
fieldError: string;
|
|
12
|
+
fieldHint: string;
|
|
13
|
+
};
|
|
14
|
+
declare function getInputAutocompleteMobileTestIds(dataTestId: string): {
|
|
15
|
+
inputAutocomplete: string;
|
|
16
|
+
option: string;
|
|
17
|
+
optionsList: string;
|
|
18
|
+
bottomSheet: string;
|
|
19
|
+
bottomSheetHeader: string;
|
|
20
|
+
bottomSheetContent: string;
|
|
21
|
+
modal: string;
|
|
22
|
+
modalHeader: string;
|
|
23
|
+
modalContent: string;
|
|
24
|
+
clearButton: string;
|
|
25
|
+
applyButton: string;
|
|
26
|
+
fieldInner: string;
|
|
27
|
+
fieldFormControl: string;
|
|
28
|
+
fieldLeftAddons: string;
|
|
29
|
+
fieldRightAddons: string;
|
|
30
|
+
fieldError: string;
|
|
31
|
+
fieldHint: string;
|
|
32
|
+
searchInput: string;
|
|
33
|
+
searchFormControl: string;
|
|
34
|
+
searchInner: string;
|
|
35
|
+
searchLeftAddons: string;
|
|
36
|
+
searchRightAddons: string;
|
|
37
|
+
searchError: string;
|
|
38
|
+
searchHint: string;
|
|
39
|
+
};
|
|
40
|
+
export { searchFilterStub, getInputAutocompleteDesktopTestIds, getInputAutocompleteMobileTestIds };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { getDataTestId } from '@alfalab/core-components-shared/moderncssm';
|
|
2
|
+
|
|
3
|
+
function searchFilterStub() {
|
|
4
|
+
return true;
|
|
5
|
+
}
|
|
6
|
+
function getInputAutocompleteDesktopTestIds(dataTestId) {
|
|
7
|
+
return {
|
|
8
|
+
inputAutocomplete: dataTestId,
|
|
9
|
+
option: getDataTestId(dataTestId, 'option'),
|
|
10
|
+
optionsList: getDataTestId(dataTestId, 'options-list'),
|
|
11
|
+
field: getDataTestId(dataTestId, 'field'),
|
|
12
|
+
fieldInner: getDataTestId(dataTestId, 'field-form-control-inner'),
|
|
13
|
+
fieldFormControl: getDataTestId(dataTestId, 'field-form-control'),
|
|
14
|
+
fieldLeftAddons: getDataTestId(dataTestId, 'field-form-control-left-addons'),
|
|
15
|
+
fieldRightAddons: getDataTestId(dataTestId, 'field-form-control-right-addons'),
|
|
16
|
+
fieldError: getDataTestId(dataTestId, 'field-form-control-error-message'),
|
|
17
|
+
fieldHint: getDataTestId(dataTestId, 'field-form-control-hint'),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function getInputAutocompleteMobileTestIds(dataTestId) {
|
|
21
|
+
return {
|
|
22
|
+
inputAutocomplete: dataTestId,
|
|
23
|
+
option: getDataTestId(dataTestId, 'option'),
|
|
24
|
+
optionsList: getDataTestId(dataTestId, 'options-list'),
|
|
25
|
+
bottomSheet: getDataTestId(dataTestId, 'bottom-sheet'),
|
|
26
|
+
bottomSheetHeader: getDataTestId(dataTestId, 'bottom-sheet-header'),
|
|
27
|
+
bottomSheetContent: getDataTestId(dataTestId, 'bottom-sheet-content'),
|
|
28
|
+
modal: getDataTestId(dataTestId, 'modal'),
|
|
29
|
+
modalHeader: getDataTestId(dataTestId, 'modal-header'),
|
|
30
|
+
modalContent: getDataTestId(dataTestId, 'modal-content'),
|
|
31
|
+
clearButton: getDataTestId(dataTestId, 'clear'),
|
|
32
|
+
applyButton: getDataTestId(dataTestId, 'apply'),
|
|
33
|
+
fieldInner: getDataTestId(dataTestId, 'field-form-control-inner'),
|
|
34
|
+
fieldFormControl: getDataTestId(dataTestId, 'field-form-control'),
|
|
35
|
+
fieldLeftAddons: getDataTestId(dataTestId, 'field-form-control-left-addons'),
|
|
36
|
+
fieldRightAddons: getDataTestId(dataTestId, 'field-form-control-right-addons'),
|
|
37
|
+
fieldError: getDataTestId(dataTestId, 'field-form-control-error-message'),
|
|
38
|
+
fieldHint: getDataTestId(dataTestId, 'field-form-control-hint'),
|
|
39
|
+
searchInput: getDataTestId(dataTestId, 'search'),
|
|
40
|
+
searchFormControl: getDataTestId(dataTestId, 'search-form-control'),
|
|
41
|
+
searchInner: getDataTestId(dataTestId, 'search-form-control-inner'),
|
|
42
|
+
searchLeftAddons: getDataTestId(dataTestId, 'search-form-control-left-addons'),
|
|
43
|
+
searchRightAddons: getDataTestId(dataTestId, 'search-form-control-right-addons'),
|
|
44
|
+
searchError: getDataTestId(dataTestId, 'search-form-control-error-message'),
|
|
45
|
+
searchHint: getDataTestId(dataTestId, 'search-form-control-hint'),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export { getInputAutocompleteDesktopTestIds, getInputAutocompleteMobileTestIds, searchFilterStub };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-input-autocomplete",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.2.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@alfalab/core-components-form-control": "^12.
|
|
18
|
-
"@alfalab/core-components-input": "^15.0
|
|
19
|
-
"@alfalab/core-components-popover": "^6.
|
|
20
|
-
"@alfalab/core-components-select": "^17.
|
|
17
|
+
"@alfalab/core-components-form-control": "^12.3.0",
|
|
18
|
+
"@alfalab/core-components-input": "^15.1.0",
|
|
19
|
+
"@alfalab/core-components-popover": "^6.3.0",
|
|
20
|
+
"@alfalab/core-components-select": "^17.11.0",
|
|
21
21
|
"@alfalab/core-components-shared": "^0.12.0",
|
|
22
22
|
"@alfalab/core-components-mq": "^4.3.0",
|
|
23
23
|
"@alfalab/hooks": "^1.13.0",
|
|
@@ -29,6 +29,6 @@
|
|
|
29
29
|
"devDependencies": {
|
|
30
30
|
"@types/lodash.throttle": "^4.1.7"
|
|
31
31
|
},
|
|
32
|
-
"themesVersion": "13.0
|
|
33
|
-
"varsVersion": "9.
|
|
32
|
+
"themesVersion": "13.1.0",
|
|
33
|
+
"varsVersion": "9.12.0"
|
|
34
34
|
}
|