@alfalab/core-components-input-autocomplete 12.1.20 → 12.3.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.
Files changed (54) hide show
  1. package/autocomplete-field/Component.js +1 -1
  2. package/autocomplete-field/index.css +2 -2
  3. package/autocomplete-mobile-field/Component.js +1 -1
  4. package/autocomplete-mobile-field/index.css +8 -8
  5. package/esm/autocomplete-field/Component.js +1 -1
  6. package/esm/autocomplete-field/index.css +2 -2
  7. package/esm/autocomplete-mobile-field/Component.js +1 -1
  8. package/esm/autocomplete-mobile-field/index.css +8 -8
  9. package/esm/mobile/Component.mobile.js +1 -1
  10. package/esm/mobile/mobile.css +2 -2
  11. package/mobile/Component.mobile.js +1 -1
  12. package/mobile/mobile.css +2 -2
  13. package/modern/autocomplete-field/Component.js +1 -1
  14. package/modern/autocomplete-field/index.css +2 -2
  15. package/modern/autocomplete-mobile-field/Component.js +1 -1
  16. package/modern/autocomplete-mobile-field/index.css +8 -8
  17. package/modern/mobile/Component.mobile.js +1 -1
  18. package/modern/mobile/mobile.css +2 -2
  19. package/moderncssm/Component.responsive.d.ts +5 -0
  20. package/moderncssm/Component.responsive.js +13 -0
  21. package/moderncssm/autocomplete-field/Component.d.ts +7 -0
  22. package/moderncssm/autocomplete-field/Component.js +30 -0
  23. package/moderncssm/autocomplete-field/index.d.ts +1 -0
  24. package/moderncssm/autocomplete-field/index.js +1 -0
  25. package/moderncssm/autocomplete-field/index.module.css +3 -0
  26. package/moderncssm/autocomplete-mobile-field/Component.d.ts +19 -0
  27. package/moderncssm/autocomplete-mobile-field/Component.js +32 -0
  28. package/moderncssm/autocomplete-mobile-field/index.d.ts +1 -0
  29. package/moderncssm/autocomplete-mobile-field/index.js +1 -0
  30. package/moderncssm/autocomplete-mobile-field/index.module.css +40 -0
  31. package/moderncssm/desktop/Component.desktop.d.ts +5 -0
  32. package/moderncssm/desktop/Component.desktop.js +16 -0
  33. package/moderncssm/desktop/index.d.ts +2 -0
  34. package/moderncssm/desktop/index.js +1 -0
  35. package/moderncssm/enums.d.ts +5 -0
  36. package/moderncssm/enums.js +7 -0
  37. package/moderncssm/index.d.ts +2 -0
  38. package/moderncssm/index.js +1 -0
  39. package/moderncssm/mobile/Component.mobile.d.ts +11 -0
  40. package/moderncssm/mobile/Component.mobile.js +91 -0
  41. package/moderncssm/mobile/Component.modal.mobile.d.ts +11 -0
  42. package/moderncssm/mobile/Component.modal.mobile.js +6 -0
  43. package/moderncssm/mobile/index.d.ts +3 -0
  44. package/moderncssm/mobile/index.js +2 -0
  45. package/moderncssm/mobile/mobile.module.css +5 -0
  46. package/moderncssm/shared/index.d.ts +1 -0
  47. package/moderncssm/shared/index.js +1 -0
  48. package/moderncssm/types.d.ts +70 -0
  49. package/moderncssm/types.js +1 -0
  50. package/moderncssm/utils.d.ts +40 -0
  51. package/moderncssm/utils.js +49 -0
  52. package/package.json +8 -8
  53. package/src/autocomplete-mobile-field/index.module.css +1 -1
  54. 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-autocomplete__arrow_1t36b","error":"input-autocomplete__error_1t36b"};
18
+ var styles = {"arrow":"input-autocomplete__arrow_k67bg","error":"input-autocomplete__error_k67bg"};
19
19
  require('./index.css')
20
20
 
21
21
  var AutocompleteField = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 5fp30 */
2
- .input-autocomplete__arrow_1t36b.input-autocomplete__error_1t36b ~ * {
1
+ /* hash: 14e11 */
2
+ .input-autocomplete__arrow_k67bg.input-autocomplete__error_k67bg ~ * {
3
3
  display: none;
4
4
  }
@@ -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-autocomplete__component_1exql","field":"input-autocomplete__field_1exql","disabled":"input-autocomplete__disabled_1exql","placeholder":"input-autocomplete__placeholder_1exql","contentWrapper":"input-autocomplete__contentWrapper_1exql","value":"input-autocomplete__value_1exql","focusVisible":"input-autocomplete__focusVisible_1exql"};
18
+ var styles = {"component":"input-autocomplete__component_11wtv","field":"input-autocomplete__field_11wtv","disabled":"input-autocomplete__disabled_11wtv","placeholder":"input-autocomplete__placeholder_11wtv","contentWrapper":"input-autocomplete__contentWrapper_11wtv","value":"input-autocomplete__value_11wtv","focusVisible":"input-autocomplete__focusVisible_11wtv"};
19
19
  require('./index.css')
20
20
 
21
21
  var AutocompleteMobileField = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: p28eb */
1
+ /* hash: 1esoi */
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-autocomplete__component_1exql {
25
+ } .input-autocomplete__component_11wtv {
26
26
  width: 100%;
27
27
  outline: none;
28
- } .input-autocomplete__field_1exql:not(.input-autocomplete__disabled_1exql) {
28
+ } .input-autocomplete__field_11wtv:not(.input-autocomplete__disabled_11wtv) {
29
29
  cursor: pointer;
30
- } .input-autocomplete__disabled_1exql {
30
+ } .input-autocomplete__disabled_11wtv {
31
31
  cursor: var(--disabled-cursor);
32
- } .input-autocomplete__placeholder_1exql {
32
+ } .input-autocomplete__placeholder_11wtv {
33
33
  color: var(--color-light-text-secondary);
34
- } .input-autocomplete__contentWrapper_1exql {
34
+ } .input-autocomplete__contentWrapper_11wtv {
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-autocomplete__value_1exql {
43
+ } .input-autocomplete__value_11wtv {
44
44
  overflow: hidden;
45
45
  text-overflow: ellipsis;
46
46
  text-align: left;
47
- } .input-autocomplete__focusVisible_1exql {
47
+ } .input-autocomplete__focusVisible_11wtv {
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-autocomplete__arrow_1t36b","error":"input-autocomplete__error_1t36b"};
8
+ var styles = {"arrow":"input-autocomplete__arrow_k67bg","error":"input-autocomplete__error_k67bg"};
9
9
  require('./index.css')
10
10
 
11
11
  var AutocompleteField = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: 5fp30 */
2
- .input-autocomplete__arrow_1t36b.input-autocomplete__error_1t36b ~ * {
1
+ /* hash: 14e11 */
2
+ .input-autocomplete__arrow_k67bg.input-autocomplete__error_k67bg ~ * {
3
3
  display: none;
4
4
  }
@@ -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-autocomplete__component_1exql","field":"input-autocomplete__field_1exql","disabled":"input-autocomplete__disabled_1exql","placeholder":"input-autocomplete__placeholder_1exql","contentWrapper":"input-autocomplete__contentWrapper_1exql","value":"input-autocomplete__value_1exql","focusVisible":"input-autocomplete__focusVisible_1exql"};
9
+ var styles = {"component":"input-autocomplete__component_11wtv","field":"input-autocomplete__field_11wtv","disabled":"input-autocomplete__disabled_11wtv","placeholder":"input-autocomplete__placeholder_11wtv","contentWrapper":"input-autocomplete__contentWrapper_11wtv","value":"input-autocomplete__value_11wtv","focusVisible":"input-autocomplete__focusVisible_11wtv"};
10
10
  require('./index.css')
11
11
 
12
12
  var AutocompleteMobileField = function (_a) {
@@ -1,4 +1,4 @@
1
- /* hash: p28eb */
1
+ /* hash: 1esoi */
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-autocomplete__component_1exql {
25
+ } .input-autocomplete__component_11wtv {
26
26
  width: 100%;
27
27
  outline: none;
28
- } .input-autocomplete__field_1exql:not(.input-autocomplete__disabled_1exql) {
28
+ } .input-autocomplete__field_11wtv:not(.input-autocomplete__disabled_11wtv) {
29
29
  cursor: pointer;
30
- } .input-autocomplete__disabled_1exql {
30
+ } .input-autocomplete__disabled_11wtv {
31
31
  cursor: var(--disabled-cursor);
32
- } .input-autocomplete__placeholder_1exql {
32
+ } .input-autocomplete__placeholder_11wtv {
33
33
  color: var(--color-light-text-secondary);
34
- } .input-autocomplete__contentWrapper_1exql {
34
+ } .input-autocomplete__contentWrapper_11wtv {
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-autocomplete__value_1exql {
43
+ } .input-autocomplete__value_11wtv {
44
44
  overflow: hidden;
45
45
  text-overflow: ellipsis;
46
46
  text-align: left;
47
- } .input-autocomplete__focusVisible_1exql {
47
+ } .input-autocomplete__focusVisible_11wtv {
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-autocomplete__input_twn0g"};
12
+ var styles = {"input":"input-autocomplete__input_3shyu"};
13
13
  require('./mobile.css')
14
14
 
15
15
  var InputAutocompleteMobile = React.forwardRef(function (_a, ref) {
@@ -1,4 +1,4 @@
1
- /* hash: mqdps */
1
+ /* hash: 1w65r */
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-autocomplete__input_twn0g {
21
+ } .input-autocomplete__input_3shyu {
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-autocomplete__input_twn0g"};
23
+ var styles = {"input":"input-autocomplete__input_3shyu"};
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: mqdps */
1
+ /* hash: 1w65r */
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-autocomplete__input_twn0g {
21
+ } .input-autocomplete__input_3shyu {
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-autocomplete__arrow_1t36b","error":"input-autocomplete__error_1t36b"};
7
+ const styles = {"arrow":"input-autocomplete__arrow_k67bg","error":"input-autocomplete__error_k67bg"};
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, }) => {
@@ -1,4 +1,4 @@
1
- /* hash: 5fp30 */
2
- .input-autocomplete__arrow_1t36b.input-autocomplete__error_1t36b ~ * {
1
+ /* hash: 14e11 */
2
+ .input-autocomplete__arrow_k67bg.input-autocomplete__error_k67bg ~ * {
3
3
  display: none;
4
4
  }
@@ -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-autocomplete__component_1exql","field":"input-autocomplete__field_1exql","disabled":"input-autocomplete__disabled_1exql","placeholder":"input-autocomplete__placeholder_1exql","contentWrapper":"input-autocomplete__contentWrapper_1exql","value":"input-autocomplete__value_1exql","focusVisible":"input-autocomplete__focusVisible_1exql"};
8
+ const styles = {"component":"input-autocomplete__component_11wtv","field":"input-autocomplete__field_11wtv","disabled":"input-autocomplete__disabled_11wtv","placeholder":"input-autocomplete__placeholder_11wtv","contentWrapper":"input-autocomplete__contentWrapper_11wtv","value":"input-autocomplete__value_11wtv","focusVisible":"input-autocomplete__focusVisible_11wtv"};
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: p28eb */
1
+ /* hash: 1esoi */
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-autocomplete__component_1exql {
25
+ } .input-autocomplete__component_11wtv {
26
26
  width: 100%;
27
27
  outline: none;
28
- } .input-autocomplete__field_1exql:not(.input-autocomplete__disabled_1exql) {
28
+ } .input-autocomplete__field_11wtv:not(.input-autocomplete__disabled_11wtv) {
29
29
  cursor: pointer;
30
- } .input-autocomplete__disabled_1exql {
30
+ } .input-autocomplete__disabled_11wtv {
31
31
  cursor: var(--disabled-cursor);
32
- } .input-autocomplete__placeholder_1exql {
32
+ } .input-autocomplete__placeholder_11wtv {
33
33
  color: var(--color-light-text-secondary);
34
- } .input-autocomplete__contentWrapper_1exql {
34
+ } .input-autocomplete__contentWrapper_11wtv {
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-autocomplete__value_1exql {
43
+ } .input-autocomplete__value_11wtv {
44
44
  overflow: hidden;
45
45
  text-overflow: ellipsis;
46
46
  text-align: left;
47
- } .input-autocomplete__focusVisible_1exql {
47
+ } .input-autocomplete__focusVisible_11wtv {
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-autocomplete__input_twn0g"};
11
+ const styles = {"input":"input-autocomplete__input_3shyu"};
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) => {
@@ -1,4 +1,4 @@
1
- /* hash: mqdps */
1
+ /* hash: 1w65r */
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-autocomplete__input_twn0g {
21
+ } .input-autocomplete__input_3shyu {
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,3 @@
1
+ .arrow.error ~ * {
2
+ display: none;
3
+ }
@@ -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,2 @@
1
+ export { InputAutocompleteDesktop } from "./Component.desktop";
2
+ export type { InputAutocompleteCommonProps as InputAutocompleteDesktopProps } from "../types";
@@ -0,0 +1 @@
1
+ export { InputAutocompleteDesktop } from './Component.desktop.js';
@@ -0,0 +1,5 @@
1
+ declare enum OnInputReason {
2
+ Close = "close",
3
+ Change = "change"
4
+ }
5
+ export { OnInputReason };
@@ -0,0 +1,7 @@
1
+ var OnInputReason;
2
+ (function (OnInputReason) {
3
+ OnInputReason["Close"] = "close";
4
+ OnInputReason["Change"] = "change";
5
+ })(OnInputReason || (OnInputReason = {}));
6
+
7
+ export { OnInputReason };
@@ -0,0 +1,2 @@
1
+ export { InputAutocomplete } from "./Component.responsive";
2
+ export type { InputAutocompleteProps } from "./types";
@@ -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,3 @@
1
+ export { InputAutocompleteMobile } from "./Component.mobile";
2
+ export { InputAutocompleteModalMobile } from "./Component.modal.mobile";
3
+ export { InputAutocompleteMobileProps } from "../types";
@@ -0,0 +1,2 @@
1
+ export { InputAutocompleteMobile } from './Component.mobile.js';
2
+ export { InputAutocompleteModalMobile } from './Component.modal.mobile.js';
@@ -0,0 +1,5 @@
1
+ /* */
2
+
3
+ .input {
4
+ width: auto;
5
+ }
@@ -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.1.20",
3
+ "version": "12.3.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "license": "MIT",
@@ -14,11 +14,11 @@
14
14
  "react": "^16.9.0 || ^17.0.1 || ^18.0.0"
15
15
  },
16
16
  "dependencies": {
17
- "@alfalab/core-components-form-control": "^12.2.8",
18
- "@alfalab/core-components-input": "^15.0.5",
19
- "@alfalab/core-components-popover": "^6.2.5",
20
- "@alfalab/core-components-select": "^17.10.1",
21
- "@alfalab/core-components-shared": "^0.12.0",
17
+ "@alfalab/core-components-form-control": "^12.4.0",
18
+ "@alfalab/core-components-input": "^15.1.1",
19
+ "@alfalab/core-components-popover": "^6.3.1",
20
+ "@alfalab/core-components-select": "^17.12.0",
21
+ "@alfalab/core-components-shared": "^0.12.1",
22
22
  "@alfalab/core-components-mq": "^4.3.0",
23
23
  "@alfalab/hooks": "^1.13.0",
24
24
  "classnames": "^2.3.1",
@@ -29,6 +29,6 @@
29
29
  "devDependencies": {
30
30
  "@types/lodash.throttle": "^4.1.7"
31
31
  },
32
- "themesVersion": "13.0.2",
33
- "varsVersion": "9.11.1"
32
+ "themesVersion": "13.2.0",
33
+ "varsVersion": "9.13.0"
34
34
  }
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-themes/src/default.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .component {
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- @import '@alfalab/core-components-themes/src/default.css';
1
+ @import '@alfalab/core-components-vars/src/index.css';
2
2
 
3
3
  .input {
4
4
  width: auto;