@alfalab/core-components-input-autocomplete 10.0.3 → 10.0.4
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/Component-50136800.d.ts +70 -4
- package/Component-5e1b8383.d.ts +20 -70
- package/Component-96988a65.d.ts +9 -0
- package/Component.mobile.js +1 -1
- package/Component.modal.mobile.js +1 -1
- package/Component.responsive.js +1 -1
- package/autocomplete-field/Component.js +1 -1
- package/autocomplete-field/index.css +2 -2
- package/autocomplete-mobile-field/Component.d.ts +8 -1
- package/autocomplete-mobile-field/Component.js +2 -2
- package/autocomplete-mobile-field/index.css +8 -8
- package/cssm/autocomplete-mobile-field/Component.d.ts +8 -1
- package/cssm/autocomplete-mobile-field/Component.js +1 -1
- package/desktop-63dec22f.d.ts +2 -6
- package/esm/Component.mobile.js +1 -1
- package/esm/Component.modal.mobile.js +1 -1
- package/esm/Component.responsive.js +1 -1
- package/esm/autocomplete-field/Component.js +1 -1
- package/esm/autocomplete-field/index.css +2 -2
- package/esm/autocomplete-mobile-field/Component.d.ts +8 -1
- package/esm/autocomplete-mobile-field/Component.js +2 -2
- package/esm/autocomplete-mobile-field/index.css +8 -8
- package/esm/index.js +1 -1
- package/esm/mobile.css +4 -4
- package/esm/mobile.js +1 -1
- package/esm/{mobile.module-ebc4dd54.js → mobile.module-3647dfbb.js} +1 -1
- package/index.js +1 -1
- package/mobile-96988a65.d.ts +5 -2
- package/mobile.css +4 -4
- package/mobile.js +1 -1
- package/{mobile.module-a21f1abf.js → mobile.module-0440a603.js} +1 -1
- package/modern/Component.mobile.js +1 -1
- package/modern/Component.modal.mobile.js +1 -1
- package/modern/Component.responsive.js +1 -1
- package/modern/autocomplete-field/Component.js +1 -1
- package/modern/autocomplete-field/index.css +2 -2
- package/modern/autocomplete-mobile-field/Component.d.ts +8 -1
- package/modern/autocomplete-mobile-field/Component.js +2 -2
- package/modern/autocomplete-mobile-field/index.css +8 -8
- package/modern/index.js +1 -1
- package/modern/mobile.css +4 -4
- package/modern/mobile.js +1 -1
- package/modern/{mobile.module-2d84bf35.js → mobile.module-403e2faf.js} +1 -1
- package/package.json +2 -2
- package/shared-4cd3936b.d.ts +1 -0
- package/src/autocomplete-mobile-field/Component.tsx +10 -2
- package/Component.mobile-ebda875c.d.ts +0 -6
package/Component-50136800.d.ts
CHANGED
|
@@ -1,6 +1,72 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import { BottomSheetProps } from "./index-f12ee135";
|
|
5
|
+
import { BaseSelectProps } from "./typings-5e1b8383";
|
|
6
|
+
type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
|
|
7
|
+
/**
|
|
8
|
+
* Футер
|
|
9
|
+
* @deprecated Используйте bottomSheetProps.actionButton
|
|
10
|
+
*/
|
|
11
|
+
footer?: ReactNode;
|
|
12
|
+
/**
|
|
13
|
+
* Будет ли свайпаться шторка
|
|
14
|
+
* @deprecated Используйте bottomSheetProps.swipeable
|
|
15
|
+
*/
|
|
16
|
+
swipeable?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Отображать в BottomSheet
|
|
19
|
+
*/
|
|
20
|
+
isBottomSheet?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Дополнительные пропсы шторки
|
|
23
|
+
*/
|
|
24
|
+
bottomSheetProps?: Partial<BottomSheetProps>;
|
|
25
|
+
/**
|
|
26
|
+
* Дополнительные пропсы модалки
|
|
27
|
+
*/
|
|
28
|
+
modalProps?: Partial<React.ComponentProps<typeof ModalMobile>>;
|
|
29
|
+
/**
|
|
30
|
+
* Дополнительные пропсы шапки модалки
|
|
31
|
+
*/
|
|
32
|
+
modalHeaderProps?: Partial<React.ComponentProps<typeof ModalMobile.Header>>;
|
|
33
|
+
/**
|
|
34
|
+
* Дополнительные пропсы футера модалки
|
|
35
|
+
*/
|
|
36
|
+
modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
|
|
37
|
+
};
|
|
38
|
+
declare const BaseSelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & {
|
|
39
|
+
/**
|
|
40
|
+
* Футер
|
|
41
|
+
* @deprecated Используйте bottomSheetProps.actionButton
|
|
42
|
+
*/
|
|
43
|
+
footer?: ReactNode;
|
|
44
|
+
/**
|
|
45
|
+
* Будет ли свайпаться шторка
|
|
46
|
+
* @deprecated Используйте bottomSheetProps.swipeable
|
|
47
|
+
*/
|
|
48
|
+
swipeable?: boolean | undefined;
|
|
49
|
+
/**
|
|
50
|
+
* Отображать в BottomSheet
|
|
51
|
+
*/
|
|
52
|
+
isBottomSheet?: boolean | undefined;
|
|
53
|
+
/**
|
|
54
|
+
* Дополнительные пропсы шторки
|
|
55
|
+
*/
|
|
56
|
+
bottomSheetProps?: Partial<BottomSheetProps> | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Дополнительные пропсы модалки
|
|
59
|
+
*/
|
|
60
|
+
modalProps?: Partial<ModalMobileProps & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Дополнительные пропсы шапки модалки
|
|
63
|
+
*/
|
|
64
|
+
modalHeaderProps?: Partial<import("./Component-c76d6398").HeaderProps> | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* Дополнительные пропсы футера модалки
|
|
67
|
+
*/
|
|
68
|
+
modalFooterProps?: Partial<import("./Component.mobile-f1f15074").FooterProps> | undefined;
|
|
69
|
+
} & React.RefAttributes<unknown>>;
|
|
70
|
+
export * from "./Component.mobile-f1f15074";
|
|
71
|
+
export { ModalMobileProps } from "./typings-bdb4c6b9";
|
|
72
|
+
export { SelectMobileProps, BaseSelectMobile };
|
package/Component-5e1b8383.d.ts
CHANGED
|
@@ -1,72 +1,22 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import React from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*/
|
|
11
|
-
footer?: ReactNode;
|
|
12
|
-
/**
|
|
13
|
-
* Будет ли свайпаться шторка
|
|
14
|
-
* @deprecated Используйте bottomSheetProps.swipeable
|
|
15
|
-
*/
|
|
16
|
-
swipeable?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Отображать в BottomSheet
|
|
19
|
-
*/
|
|
20
|
-
isBottomSheet?: boolean;
|
|
21
|
-
/**
|
|
22
|
-
* Дополнительные пропсы шторки
|
|
23
|
-
*/
|
|
24
|
-
bottomSheetProps?: Partial<BottomSheetProps>;
|
|
25
|
-
/**
|
|
26
|
-
* Дополнительные пропсы модалки
|
|
27
|
-
*/
|
|
28
|
-
modalProps?: Partial<React.ComponentProps<typeof ModalMobile>>;
|
|
29
|
-
/**
|
|
30
|
-
* Дополнительные пропсы шапки модалки
|
|
31
|
-
*/
|
|
32
|
-
modalHeaderProps?: Partial<React.ComponentProps<typeof ModalMobile.Header>>;
|
|
33
|
-
/**
|
|
34
|
-
* Дополнительные пропсы футера модалки
|
|
35
|
-
*/
|
|
36
|
-
modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { OptionShape, OptionsListProps } from "./typings-5e1b8383";
|
|
4
|
+
import { HeaderProps } from "./Component-ebda875c";
|
|
5
|
+
type FooterProps = {
|
|
6
|
+
handleClear?: () => void;
|
|
7
|
+
handleApply?: () => void;
|
|
8
|
+
showClear?: boolean;
|
|
9
|
+
selectedDraft?: OptionShape[];
|
|
37
10
|
};
|
|
38
|
-
declare const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
* Отображать в BottomSheet
|
|
51
|
-
*/
|
|
52
|
-
isBottomSheet?: boolean | undefined;
|
|
53
|
-
/**
|
|
54
|
-
* Дополнительные пропсы шторки
|
|
55
|
-
*/
|
|
56
|
-
bottomSheetProps?: Partial<BottomSheetProps> | undefined;
|
|
57
|
-
/**
|
|
58
|
-
* Дополнительные пропсы модалки
|
|
59
|
-
*/
|
|
60
|
-
modalProps?: Partial<ModalMobileProps & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
61
|
-
/**
|
|
62
|
-
* Дополнительные пропсы шапки модалки
|
|
63
|
-
*/
|
|
64
|
-
modalHeaderProps?: Partial<import("./Component-c76d6398").HeaderProps> | undefined;
|
|
65
|
-
/**
|
|
66
|
-
* Дополнительные пропсы футера модалки
|
|
67
|
-
*/
|
|
68
|
-
modalFooterProps?: Partial<import("./Component.mobile-f1f15074").FooterProps> | undefined;
|
|
69
|
-
} & React.RefAttributes<unknown>>;
|
|
70
|
-
export * from "./Component.mobile-f1f15074";
|
|
71
|
-
export { ModalMobileProps } from "./typings-bdb4c6b9";
|
|
72
|
-
export { SelectMobileProps, BaseSelectMobile };
|
|
11
|
+
declare const Footer: ({ handleApply, handleClear, showClear, selectedDraft }: FooterProps) => React.JSX.Element;
|
|
12
|
+
declare const OptionsListWithApply: React.ForwardRefExoticComponent<OptionsListProps & {
|
|
13
|
+
showClear?: boolean | undefined;
|
|
14
|
+
onClose?: (() => void) | undefined;
|
|
15
|
+
selectedDraft?: OptionShape[] | undefined;
|
|
16
|
+
OptionsList?: React.FC<OptionsListProps & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
17
|
+
Footer?: React.FC<FooterProps> | undefined;
|
|
18
|
+
Header?: React.FC<HeaderProps> | undefined;
|
|
19
|
+
headerProps?: HeaderProps | undefined;
|
|
20
|
+
showHeaderWithSelectAll?: boolean | undefined;
|
|
21
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
export { FooterProps, Footer, OptionsListWithApply };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type FooterProps = {
|
|
4
|
+
handleClear?: () => void;
|
|
5
|
+
handleApply?: () => void;
|
|
6
|
+
showClear?: boolean;
|
|
7
|
+
};
|
|
8
|
+
declare const Footer: ({ handleApply, handleClear, showClear }: FooterProps) => React.JSX.Element;
|
|
9
|
+
export { FooterProps, Footer };
|
package/Component.mobile.js
CHANGED
|
@@ -11,7 +11,7 @@ var mobile$1 = require('@alfalab/core-components-button/mobile');
|
|
|
11
11
|
var coreComponentsInput = require('@alfalab/core-components-input');
|
|
12
12
|
var mobile = require('@alfalab/core-components-select/mobile');
|
|
13
13
|
var autocompleteMobileField_Component = require('./autocomplete-mobile-field/Component.js');
|
|
14
|
-
var mobile_module = require('./mobile.module-
|
|
14
|
+
var mobile_module = require('./mobile.module-0440a603.js');
|
|
15
15
|
require('@alfalab/core-components-form-control/mobile');
|
|
16
16
|
require('@alfalab/hooks');
|
|
17
17
|
|
|
@@ -11,7 +11,7 @@ var mobile$1 = require('@alfalab/core-components-button/mobile');
|
|
|
11
11
|
var coreComponentsInput = require('@alfalab/core-components-input');
|
|
12
12
|
var mobile = require('@alfalab/core-components-select/mobile');
|
|
13
13
|
var autocompleteMobileField_Component = require('./autocomplete-mobile-field/Component.js');
|
|
14
|
-
var mobile_module = require('./mobile.module-
|
|
14
|
+
var mobile_module = require('./mobile.module-0440a603.js');
|
|
15
15
|
require('@alfalab/core-components-form-control/mobile');
|
|
16
16
|
require('@alfalab/hooks');
|
|
17
17
|
|
package/Component.responsive.js
CHANGED
|
@@ -18,7 +18,7 @@ require('@alfalab/core-components-input');
|
|
|
18
18
|
require('@alfalab/core-components-select/mobile');
|
|
19
19
|
require('./autocomplete-mobile-field/Component.js');
|
|
20
20
|
require('@alfalab/core-components-form-control/mobile');
|
|
21
|
-
require('./mobile.module-
|
|
21
|
+
require('./mobile.module-0440a603.js');
|
|
22
22
|
|
|
23
23
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
24
24
|
|
|
@@ -14,7 +14,7 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
14
14
|
var mergeRefs__default = /*#__PURE__*/_interopDefaultCompat(mergeRefs);
|
|
15
15
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
16
16
|
|
|
17
|
-
var styles = {"arrow":"input-
|
|
17
|
+
var styles = {"arrow":"input-autocomplete__arrow_8klvd","error":"input-autocomplete__error_8klvd"};
|
|
18
18
|
require('./index.css')
|
|
19
19
|
|
|
20
20
|
var AutocompleteField = function (_a) {
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { ElementType } from "react";
|
|
3
4
|
import { FormControlMobileProps } from "../mobile-96988a65";
|
|
4
5
|
import { FieldProps as BaseFieldProps } from "../shared-4cd3936b";
|
|
6
|
+
type FieldProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Компонент FormControl
|
|
9
|
+
*/
|
|
10
|
+
FormControlComponent?: ElementType;
|
|
11
|
+
};
|
|
5
12
|
type AutocompleteMobileFieldProps = FormControlMobileProps & Omit<BaseFieldProps, 'selected' | 'multiple' | 'success'> & {
|
|
6
13
|
/**
|
|
7
14
|
* Значение поля ввода
|
|
8
15
|
*/
|
|
9
16
|
value?: string;
|
|
10
17
|
};
|
|
11
|
-
declare const AutocompleteMobileField: ({ size, open, disabled, value, innerProps, dataTestId, fieldClassName, labelView, placeholder, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, ...restProps }: AutocompleteMobileFieldProps) => React.JSX.Element;
|
|
18
|
+
declare const AutocompleteMobileField: ({ size, open, disabled, value, innerProps, dataTestId, fieldClassName, labelView, placeholder, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, FormControlComponent, ...restProps }: AutocompleteMobileFieldProps & FieldProps) => React.JSX.Element;
|
|
12
19
|
export { AutocompleteMobileFieldProps, AutocompleteMobileField };
|
|
@@ -13,12 +13,12 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
14
14
|
var cn__default = /*#__PURE__*/_interopDefaultCompat(cn);
|
|
15
15
|
|
|
16
|
-
var styles = {"component":"input-
|
|
16
|
+
var styles = {"component":"input-autocomplete__component_1muzq","field":"input-autocomplete__field_1muzq","disabled":"input-autocomplete__disabled_1muzq","placeholder":"input-autocomplete__placeholder_1muzq","contentWrapper":"input-autocomplete__contentWrapper_1muzq","value":"input-autocomplete__value_1muzq","focusVisible":"input-autocomplete__focusVisible_1muzq"};
|
|
17
17
|
require('./index.css')
|
|
18
18
|
|
|
19
19
|
var AutocompleteMobileField = function (_a) {
|
|
20
20
|
var _b;
|
|
21
|
-
var _c = _a.size, size = _c === void 0 ? 'm' : _c; _a.open; var disabled = _a.disabled, value = _a.value, innerProps = _a.innerProps, dataTestId = _a.dataTestId, fieldClassName = _a.fieldClassName, _d = _a.labelView, labelView = _d === void 0 ? 'inner' : _d, placeholder = _a.placeholder, Arrow = _a.Arrow; _a.valueRenderer; _a.toggleMenu; _a.setSelectedItems; _a.selectedMultiple; var restProps = tslib.__rest(_a, ["size", "open", "disabled", "value", "innerProps", "dataTestId", "fieldClassName", "labelView", "placeholder", "Arrow", "valueRenderer", "toggleMenu", "setSelectedItems", "selectedMultiple"]);
|
|
21
|
+
var _c = _a.size, size = _c === void 0 ? 'm' : _c; _a.open; var disabled = _a.disabled, value = _a.value, innerProps = _a.innerProps, dataTestId = _a.dataTestId, fieldClassName = _a.fieldClassName, _d = _a.labelView, labelView = _d === void 0 ? 'inner' : _d, placeholder = _a.placeholder, Arrow = _a.Arrow; _a.valueRenderer; _a.toggleMenu; _a.setSelectedItems; _a.selectedMultiple; _a.FormControlComponent; var restProps = tslib.__rest(_a, ["size", "open", "disabled", "value", "innerProps", "dataTestId", "fieldClassName", "labelView", "placeholder", "Arrow", "valueRenderer", "toggleMenu", "setSelectedItems", "selectedMultiple", "FormControlComponent"]);
|
|
22
22
|
var _e = React.useState(false), focused = _e[0], setFocused = _e[1];
|
|
23
23
|
var wrapperRef = React.useRef(null);
|
|
24
24
|
var focusVisible = hooks.useFocus(wrapperRef, 'keyboard')[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: jinkn */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #0072ef;
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
} :root {
|
|
19
19
|
--focus-color: var(--color-light-border-link);
|
|
20
20
|
--disabled-cursor: not-allowed;
|
|
21
|
-
} .input-
|
|
21
|
+
} .input-autocomplete__component_1muzq {
|
|
22
22
|
width: 100%;
|
|
23
23
|
outline: none;
|
|
24
|
-
} .input-
|
|
24
|
+
} .input-autocomplete__field_1muzq:not(.input-autocomplete__disabled_1muzq) {
|
|
25
25
|
cursor: pointer;
|
|
26
|
-
} .input-
|
|
26
|
+
} .input-autocomplete__disabled_1muzq {
|
|
27
27
|
cursor: var(--disabled-cursor);
|
|
28
|
-
} .input-
|
|
28
|
+
} .input-autocomplete__placeholder_1muzq {
|
|
29
29
|
color: var(--color-light-text-secondary);
|
|
30
|
-
} .input-
|
|
30
|
+
} .input-autocomplete__contentWrapper_1muzq {
|
|
31
31
|
font-size: 16px;
|
|
32
32
|
line-height: 20px;
|
|
33
33
|
font-weight: 400;
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
text-overflow: ellipsis;
|
|
37
37
|
overflow: hidden;
|
|
38
38
|
width: 100%;
|
|
39
|
-
} .input-
|
|
39
|
+
} .input-autocomplete__value_1muzq {
|
|
40
40
|
overflow: hidden;
|
|
41
41
|
text-overflow: ellipsis;
|
|
42
42
|
text-align: left;
|
|
43
|
-
} .input-
|
|
43
|
+
} .input-autocomplete__focusVisible_1muzq {
|
|
44
44
|
outline: 2px solid var(--focus-color);
|
|
45
45
|
outline-offset: 2px;
|
|
46
46
|
}
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { ElementType } from "react";
|
|
3
4
|
import { FormControlMobileProps } from "../mobile-96988a65";
|
|
4
5
|
import { FieldProps as BaseFieldProps } from "../shared-4cd3936b";
|
|
6
|
+
type FieldProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Компонент FormControl
|
|
9
|
+
*/
|
|
10
|
+
FormControlComponent?: ElementType;
|
|
11
|
+
};
|
|
5
12
|
type AutocompleteMobileFieldProps = FormControlMobileProps & Omit<BaseFieldProps, 'selected' | 'multiple' | 'success'> & {
|
|
6
13
|
/**
|
|
7
14
|
* Значение поля ввода
|
|
8
15
|
*/
|
|
9
16
|
value?: string;
|
|
10
17
|
};
|
|
11
|
-
declare const AutocompleteMobileField: ({ size, open, disabled, value, innerProps, dataTestId, fieldClassName, labelView, placeholder, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, ...restProps }: AutocompleteMobileFieldProps) => React.JSX.Element;
|
|
18
|
+
declare const AutocompleteMobileField: ({ size, open, disabled, value, innerProps, dataTestId, fieldClassName, labelView, placeholder, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, FormControlComponent, ...restProps }: AutocompleteMobileFieldProps & FieldProps) => React.JSX.Element;
|
|
12
19
|
export { AutocompleteMobileFieldProps, AutocompleteMobileField };
|
|
@@ -17,7 +17,7 @@ var styles__default = /*#__PURE__*/_interopDefaultCompat(styles);
|
|
|
17
17
|
|
|
18
18
|
var AutocompleteMobileField = function (_a) {
|
|
19
19
|
var _b;
|
|
20
|
-
var _c = _a.size, size = _c === void 0 ? 'm' : _c; _a.open; var disabled = _a.disabled, value = _a.value, innerProps = _a.innerProps, dataTestId = _a.dataTestId, fieldClassName = _a.fieldClassName, _d = _a.labelView, labelView = _d === void 0 ? 'inner' : _d, placeholder = _a.placeholder, Arrow = _a.Arrow; _a.valueRenderer; _a.toggleMenu; _a.setSelectedItems; _a.selectedMultiple; var restProps = tslib.__rest(_a, ["size", "open", "disabled", "value", "innerProps", "dataTestId", "fieldClassName", "labelView", "placeholder", "Arrow", "valueRenderer", "toggleMenu", "setSelectedItems", "selectedMultiple"]);
|
|
20
|
+
var _c = _a.size, size = _c === void 0 ? 'm' : _c; _a.open; var disabled = _a.disabled, value = _a.value, innerProps = _a.innerProps, dataTestId = _a.dataTestId, fieldClassName = _a.fieldClassName, _d = _a.labelView, labelView = _d === void 0 ? 'inner' : _d, placeholder = _a.placeholder, Arrow = _a.Arrow; _a.valueRenderer; _a.toggleMenu; _a.setSelectedItems; _a.selectedMultiple; _a.FormControlComponent; var restProps = tslib.__rest(_a, ["size", "open", "disabled", "value", "innerProps", "dataTestId", "fieldClassName", "labelView", "placeholder", "Arrow", "valueRenderer", "toggleMenu", "setSelectedItems", "selectedMultiple", "FormControlComponent"]);
|
|
21
21
|
var _e = React.useState(false), focused = _e[0], setFocused = _e[1];
|
|
22
22
|
var wrapperRef = React.useRef(null);
|
|
23
23
|
var focusVisible = hooks.useFocus(wrapperRef, 'keyboard')[0];
|
package/desktop-63dec22f.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
|
|
4
|
-
type ButtonDesktopProps = Partial<AnchorButtonProps | NativeButtonProps>;
|
|
5
|
-
declare const ButtonDesktop: React.ForwardRefExoticComponent<ButtonDesktopProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
6
|
-
export { ButtonDesktopProps, ButtonDesktop };
|
|
1
|
+
export * from "./Component.desktop-ebda875c";
|
|
2
|
+
export {};
|
package/esm/Component.mobile.js
CHANGED
|
@@ -7,7 +7,7 @@ import { ButtonMobile } from '@alfalab/core-components-button/esm/mobile';
|
|
|
7
7
|
import { Input } from '@alfalab/core-components-input/esm';
|
|
8
8
|
import { SelectMobile } from '@alfalab/core-components-select/esm/mobile';
|
|
9
9
|
import { AutocompleteMobileField } from './autocomplete-mobile-field/Component.js';
|
|
10
|
-
import { s as styles } from './mobile.module-
|
|
10
|
+
import { s as styles } from './mobile.module-3647dfbb.js';
|
|
11
11
|
import '@alfalab/core-components-form-control/esm/mobile';
|
|
12
12
|
import '@alfalab/hooks';
|
|
13
13
|
|
|
@@ -7,7 +7,7 @@ import { ButtonMobile } from '@alfalab/core-components-button/esm/mobile';
|
|
|
7
7
|
import { Input } from '@alfalab/core-components-input/esm';
|
|
8
8
|
import { SelectModalMobile } from '@alfalab/core-components-select/esm/mobile';
|
|
9
9
|
import { AutocompleteMobileField } from './autocomplete-mobile-field/Component.js';
|
|
10
|
-
import { s as styles } from './mobile.module-
|
|
10
|
+
import { s as styles } from './mobile.module-3647dfbb.js';
|
|
11
11
|
import '@alfalab/core-components-form-control/esm/mobile';
|
|
12
12
|
import '@alfalab/hooks';
|
|
13
13
|
|
|
@@ -14,7 +14,7 @@ import '@alfalab/core-components-input/esm';
|
|
|
14
14
|
import '@alfalab/core-components-select/esm/mobile';
|
|
15
15
|
import './autocomplete-mobile-field/Component.js';
|
|
16
16
|
import '@alfalab/core-components-form-control/esm/mobile';
|
|
17
|
-
import './mobile.module-
|
|
17
|
+
import './mobile.module-3647dfbb.js';
|
|
18
18
|
|
|
19
19
|
var InputAutocompleteResponsive = forwardRef(function (_a, ref) {
|
|
20
20
|
var _b = _a.breakpoint, breakpoint = _b === void 0 ? 1024 : _b, restProps = __rest(_a, ["breakpoint"]);
|
|
@@ -4,7 +4,7 @@ import mergeRefs from 'react-merge-refs';
|
|
|
4
4
|
import cn from 'classnames';
|
|
5
5
|
import { InputDesktop } from '@alfalab/core-components-input/esm/desktop';
|
|
6
6
|
|
|
7
|
-
var styles = {"arrow":"input-
|
|
7
|
+
var styles = {"arrow":"input-autocomplete__arrow_8klvd","error":"input-autocomplete__error_8klvd"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
var AutocompleteField = function (_a) {
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { ElementType } from "react";
|
|
3
4
|
import { FormControlMobileProps } from "../mobile-96988a65";
|
|
4
5
|
import { FieldProps as BaseFieldProps } from "../shared-4cd3936b";
|
|
6
|
+
type FieldProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Компонент FormControl
|
|
9
|
+
*/
|
|
10
|
+
FormControlComponent?: ElementType;
|
|
11
|
+
};
|
|
5
12
|
type AutocompleteMobileFieldProps = FormControlMobileProps & Omit<BaseFieldProps, 'selected' | 'multiple' | 'success'> & {
|
|
6
13
|
/**
|
|
7
14
|
* Значение поля ввода
|
|
8
15
|
*/
|
|
9
16
|
value?: string;
|
|
10
17
|
};
|
|
11
|
-
declare const AutocompleteMobileField: ({ size, open, disabled, value, innerProps, dataTestId, fieldClassName, labelView, placeholder, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, ...restProps }: AutocompleteMobileFieldProps) => React.JSX.Element;
|
|
18
|
+
declare const AutocompleteMobileField: ({ size, open, disabled, value, innerProps, dataTestId, fieldClassName, labelView, placeholder, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, FormControlComponent, ...restProps }: AutocompleteMobileFieldProps & FieldProps) => React.JSX.Element;
|
|
12
19
|
export { AutocompleteMobileFieldProps, AutocompleteMobileField };
|
|
@@ -4,12 +4,12 @@ import cn from 'classnames';
|
|
|
4
4
|
import { FormControlMobile } from '@alfalab/core-components-form-control/esm/mobile';
|
|
5
5
|
import { useFocus } from '@alfalab/hooks';
|
|
6
6
|
|
|
7
|
-
var styles = {"component":"input-
|
|
7
|
+
var styles = {"component":"input-autocomplete__component_1muzq","field":"input-autocomplete__field_1muzq","disabled":"input-autocomplete__disabled_1muzq","placeholder":"input-autocomplete__placeholder_1muzq","contentWrapper":"input-autocomplete__contentWrapper_1muzq","value":"input-autocomplete__value_1muzq","focusVisible":"input-autocomplete__focusVisible_1muzq"};
|
|
8
8
|
require('./index.css')
|
|
9
9
|
|
|
10
10
|
var AutocompleteMobileField = function (_a) {
|
|
11
11
|
var _b;
|
|
12
|
-
var _c = _a.size, size = _c === void 0 ? 'm' : _c; _a.open; var disabled = _a.disabled, value = _a.value, innerProps = _a.innerProps, dataTestId = _a.dataTestId, fieldClassName = _a.fieldClassName, _d = _a.labelView, labelView = _d === void 0 ? 'inner' : _d, placeholder = _a.placeholder, Arrow = _a.Arrow; _a.valueRenderer; _a.toggleMenu; _a.setSelectedItems; _a.selectedMultiple; var restProps = __rest(_a, ["size", "open", "disabled", "value", "innerProps", "dataTestId", "fieldClassName", "labelView", "placeholder", "Arrow", "valueRenderer", "toggleMenu", "setSelectedItems", "selectedMultiple"]);
|
|
12
|
+
var _c = _a.size, size = _c === void 0 ? 'm' : _c; _a.open; var disabled = _a.disabled, value = _a.value, innerProps = _a.innerProps, dataTestId = _a.dataTestId, fieldClassName = _a.fieldClassName, _d = _a.labelView, labelView = _d === void 0 ? 'inner' : _d, placeholder = _a.placeholder, Arrow = _a.Arrow; _a.valueRenderer; _a.toggleMenu; _a.setSelectedItems; _a.selectedMultiple; _a.FormControlComponent; var restProps = __rest(_a, ["size", "open", "disabled", "value", "innerProps", "dataTestId", "fieldClassName", "labelView", "placeholder", "Arrow", "valueRenderer", "toggleMenu", "setSelectedItems", "selectedMultiple", "FormControlComponent"]);
|
|
13
13
|
var _e = useState(false), focused = _e[0], setFocused = _e[1];
|
|
14
14
|
var wrapperRef = useRef(null);
|
|
15
15
|
var focusVisible = useFocus(wrapperRef, 'keyboard')[0];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: jinkn */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #0072ef;
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
} :root {
|
|
19
19
|
--focus-color: var(--color-light-border-link);
|
|
20
20
|
--disabled-cursor: not-allowed;
|
|
21
|
-
} .input-
|
|
21
|
+
} .input-autocomplete__component_1muzq {
|
|
22
22
|
width: 100%;
|
|
23
23
|
outline: none;
|
|
24
|
-
} .input-
|
|
24
|
+
} .input-autocomplete__field_1muzq:not(.input-autocomplete__disabled_1muzq) {
|
|
25
25
|
cursor: pointer;
|
|
26
|
-
} .input-
|
|
26
|
+
} .input-autocomplete__disabled_1muzq {
|
|
27
27
|
cursor: var(--disabled-cursor);
|
|
28
|
-
} .input-
|
|
28
|
+
} .input-autocomplete__placeholder_1muzq {
|
|
29
29
|
color: var(--color-light-text-secondary);
|
|
30
|
-
} .input-
|
|
30
|
+
} .input-autocomplete__contentWrapper_1muzq {
|
|
31
31
|
font-size: 16px;
|
|
32
32
|
line-height: 20px;
|
|
33
33
|
font-weight: 400;
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
text-overflow: ellipsis;
|
|
37
37
|
overflow: hidden;
|
|
38
38
|
width: 100%;
|
|
39
|
-
} .input-
|
|
39
|
+
} .input-autocomplete__value_1muzq {
|
|
40
40
|
overflow: hidden;
|
|
41
41
|
text-overflow: ellipsis;
|
|
42
42
|
text-align: left;
|
|
43
|
-
} .input-
|
|
43
|
+
} .input-autocomplete__focusVisible_1muzq {
|
|
44
44
|
outline: 2px solid var(--focus-color);
|
|
45
45
|
outline-offset: 2px;
|
|
46
46
|
}
|
package/esm/index.js
CHANGED
|
@@ -15,4 +15,4 @@ import '@alfalab/core-components-input/esm';
|
|
|
15
15
|
import '@alfalab/core-components-select/esm/mobile';
|
|
16
16
|
import './autocomplete-mobile-field/Component.js';
|
|
17
17
|
import '@alfalab/core-components-form-control/esm/mobile';
|
|
18
|
-
import './mobile.module-
|
|
18
|
+
import './mobile.module-3647dfbb.js';
|
package/esm/mobile.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 17kwg */
|
|
2
2
|
:root {
|
|
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 */
|
|
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 */
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .input-
|
|
19
|
+
} .input-autocomplete__bottomAddonInput_b1a1h {
|
|
20
20
|
padding: 0 var(--gap-xs) var(--gap-xs);
|
|
21
21
|
box-sizing: border-box;
|
|
22
|
-
} .input-
|
|
22
|
+
} .input-autocomplete__footer_b1a1h {
|
|
23
23
|
display: flex
|
|
24
|
-
} .input-
|
|
24
|
+
} .input-autocomplete__footer_b1a1h > button + button {
|
|
25
25
|
margin-left: var(--gap-m);
|
|
26
26
|
}
|
package/esm/mobile.js
CHANGED
|
@@ -11,4 +11,4 @@ import '@alfalab/core-components-select/esm/mobile';
|
|
|
11
11
|
import './autocomplete-mobile-field/Component.js';
|
|
12
12
|
import '@alfalab/core-components-form-control/esm/mobile';
|
|
13
13
|
import '@alfalab/hooks';
|
|
14
|
-
import './mobile.module-
|
|
14
|
+
import './mobile.module-3647dfbb.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var styles = {"bottomAddonInput":"input-
|
|
1
|
+
var styles = {"bottomAddonInput":"input-autocomplete__bottomAddonInput_b1a1h","footer":"input-autocomplete__footer_b1a1h"};
|
|
2
2
|
require('./mobile.css')
|
|
3
3
|
|
|
4
4
|
export { styles as s };
|
package/index.js
CHANGED
|
@@ -19,7 +19,7 @@ require('@alfalab/core-components-input');
|
|
|
19
19
|
require('@alfalab/core-components-select/mobile');
|
|
20
20
|
require('./autocomplete-mobile-field/Component.js');
|
|
21
21
|
require('@alfalab/core-components-form-control/mobile');
|
|
22
|
-
require('./mobile.module-
|
|
22
|
+
require('./mobile.module-0440a603.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
25
|
|
package/mobile-96988a65.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { BaseFormControlProps } from "./index-ebda875c";
|
|
4
|
+
type FormControlMobileProps = Omit<BaseFormControlProps, "styles" | "colorStyles">;
|
|
5
|
+
declare const FormControlMobile: React.ForwardRefExoticComponent<FormControlMobileProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export { FormControlMobileProps, FormControlMobile };
|
package/mobile.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 17kwg */
|
|
2
2
|
:root {
|
|
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 */
|
|
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 */
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .input-
|
|
19
|
+
} .input-autocomplete__bottomAddonInput_b1a1h {
|
|
20
20
|
padding: 0 var(--gap-xs) var(--gap-xs);
|
|
21
21
|
box-sizing: border-box;
|
|
22
|
-
} .input-
|
|
22
|
+
} .input-autocomplete__footer_b1a1h {
|
|
23
23
|
display: flex
|
|
24
|
-
} .input-
|
|
24
|
+
} .input-autocomplete__footer_b1a1h > button + button {
|
|
25
25
|
margin-left: var(--gap-m);
|
|
26
26
|
}
|
package/mobile.js
CHANGED
|
@@ -15,7 +15,7 @@ require('@alfalab/core-components-select/mobile');
|
|
|
15
15
|
require('./autocomplete-mobile-field/Component.js');
|
|
16
16
|
require('@alfalab/core-components-form-control/mobile');
|
|
17
17
|
require('@alfalab/hooks');
|
|
18
|
-
require('./mobile.module-
|
|
18
|
+
require('./mobile.module-0440a603.js');
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var styles = {"bottomAddonInput":"input-
|
|
3
|
+
var styles = {"bottomAddonInput":"input-autocomplete__bottomAddonInput_b1a1h","footer":"input-autocomplete__footer_b1a1h"};
|
|
4
4
|
require('./mobile.css')
|
|
5
5
|
|
|
6
6
|
exports.styles = styles;
|
|
@@ -6,7 +6,7 @@ import { ButtonMobile } from '@alfalab/core-components-button/modern/mobile';
|
|
|
6
6
|
import { Input } from '@alfalab/core-components-input/modern';
|
|
7
7
|
import { SelectMobile } from '@alfalab/core-components-select/modern/mobile';
|
|
8
8
|
import { AutocompleteMobileField } from './autocomplete-mobile-field/Component.js';
|
|
9
|
-
import { s as styles } from './mobile.module-
|
|
9
|
+
import { s as styles } from './mobile.module-403e2faf.js';
|
|
10
10
|
import '@alfalab/core-components-form-control/modern/mobile';
|
|
11
11
|
import '@alfalab/hooks';
|
|
12
12
|
|
|
@@ -6,7 +6,7 @@ import { ButtonMobile } from '@alfalab/core-components-button/modern/mobile';
|
|
|
6
6
|
import { Input } from '@alfalab/core-components-input/modern';
|
|
7
7
|
import { SelectModalMobile } from '@alfalab/core-components-select/modern/mobile';
|
|
8
8
|
import { AutocompleteMobileField } from './autocomplete-mobile-field/Component.js';
|
|
9
|
-
import { s as styles } from './mobile.module-
|
|
9
|
+
import { s as styles } from './mobile.module-403e2faf.js';
|
|
10
10
|
import '@alfalab/core-components-form-control/modern/mobile';
|
|
11
11
|
import '@alfalab/hooks';
|
|
12
12
|
|
|
@@ -13,7 +13,7 @@ import '@alfalab/core-components-input/modern';
|
|
|
13
13
|
import '@alfalab/core-components-select/modern/mobile';
|
|
14
14
|
import './autocomplete-mobile-field/Component.js';
|
|
15
15
|
import '@alfalab/core-components-form-control/modern/mobile';
|
|
16
|
-
import './mobile.module-
|
|
16
|
+
import './mobile.module-403e2faf.js';
|
|
17
17
|
|
|
18
18
|
const InputAutocompleteResponsive = forwardRef(({ breakpoint = 1024, ...restProps }, ref) => {
|
|
19
19
|
const [view] = useMedia([
|
|
@@ -3,7 +3,7 @@ import mergeRefs from 'react-merge-refs';
|
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { InputDesktop } from '@alfalab/core-components-input/modern/desktop';
|
|
5
5
|
|
|
6
|
-
const styles = {"arrow":"input-
|
|
6
|
+
const styles = {"arrow":"input-autocomplete__arrow_8klvd","error":"input-autocomplete__error_8klvd"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const AutocompleteField = ({ label, labelView = 'inner', placeholder, size, Arrow, Input = InputDesktop, value, error, success, hint, disabled, readOnly, onInput, inputProps = {}, innerProps, }) => {
|
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { ElementType } from "react";
|
|
3
4
|
import { FormControlMobileProps } from "../mobile-96988a65";
|
|
4
5
|
import { FieldProps as BaseFieldProps } from "../shared-4cd3936b";
|
|
6
|
+
type FieldProps = {
|
|
7
|
+
/**
|
|
8
|
+
* Компонент FormControl
|
|
9
|
+
*/
|
|
10
|
+
FormControlComponent?: ElementType;
|
|
11
|
+
};
|
|
5
12
|
type AutocompleteMobileFieldProps = FormControlMobileProps & Omit<BaseFieldProps, 'selected' | 'multiple' | 'success'> & {
|
|
6
13
|
/**
|
|
7
14
|
* Значение поля ввода
|
|
8
15
|
*/
|
|
9
16
|
value?: string;
|
|
10
17
|
};
|
|
11
|
-
declare const AutocompleteMobileField: ({ size, open, disabled, value, innerProps, dataTestId, fieldClassName, labelView, placeholder, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, ...restProps }: AutocompleteMobileFieldProps) => React.JSX.Element;
|
|
18
|
+
declare const AutocompleteMobileField: ({ size, open, disabled, value, innerProps, dataTestId, fieldClassName, labelView, placeholder, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, FormControlComponent, ...restProps }: AutocompleteMobileFieldProps & FieldProps) => React.JSX.Element;
|
|
12
19
|
export { AutocompleteMobileFieldProps, AutocompleteMobileField };
|
|
@@ -3,10 +3,10 @@ import cn from 'classnames';
|
|
|
3
3
|
import { FormControlMobile } from '@alfalab/core-components-form-control/modern/mobile';
|
|
4
4
|
import { useFocus } from '@alfalab/hooks';
|
|
5
5
|
|
|
6
|
-
const styles = {"component":"input-
|
|
6
|
+
const styles = {"component":"input-autocomplete__component_1muzq","field":"input-autocomplete__field_1muzq","disabled":"input-autocomplete__disabled_1muzq","placeholder":"input-autocomplete__placeholder_1muzq","contentWrapper":"input-autocomplete__contentWrapper_1muzq","value":"input-autocomplete__value_1muzq","focusVisible":"input-autocomplete__focusVisible_1muzq"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
|
-
const AutocompleteMobileField = ({ size = 'm', open, disabled, value, innerProps, dataTestId, fieldClassName, labelView = 'inner', placeholder, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, ...restProps }) => {
|
|
9
|
+
const AutocompleteMobileField = ({ size = 'm', open, disabled, value, innerProps, dataTestId, fieldClassName, labelView = 'inner', placeholder, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, FormControlComponent, ...restProps }) => {
|
|
10
10
|
const [focused, setFocused] = useState(false);
|
|
11
11
|
const wrapperRef = useRef(null);
|
|
12
12
|
const [focusVisible] = useFocus(wrapperRef, 'keyboard');
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: jinkn */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-link: #0072ef;
|
|
@@ -18,16 +18,16 @@
|
|
|
18
18
|
} :root {
|
|
19
19
|
--focus-color: var(--color-light-border-link);
|
|
20
20
|
--disabled-cursor: not-allowed;
|
|
21
|
-
} .input-
|
|
21
|
+
} .input-autocomplete__component_1muzq {
|
|
22
22
|
width: 100%;
|
|
23
23
|
outline: none;
|
|
24
|
-
} .input-
|
|
24
|
+
} .input-autocomplete__field_1muzq:not(.input-autocomplete__disabled_1muzq) {
|
|
25
25
|
cursor: pointer;
|
|
26
|
-
} .input-
|
|
26
|
+
} .input-autocomplete__disabled_1muzq {
|
|
27
27
|
cursor: var(--disabled-cursor);
|
|
28
|
-
} .input-
|
|
28
|
+
} .input-autocomplete__placeholder_1muzq {
|
|
29
29
|
color: var(--color-light-text-secondary);
|
|
30
|
-
} .input-
|
|
30
|
+
} .input-autocomplete__contentWrapper_1muzq {
|
|
31
31
|
font-size: 16px;
|
|
32
32
|
line-height: 20px;
|
|
33
33
|
font-weight: 400;
|
|
@@ -36,11 +36,11 @@
|
|
|
36
36
|
text-overflow: ellipsis;
|
|
37
37
|
overflow: hidden;
|
|
38
38
|
width: 100%;
|
|
39
|
-
} .input-
|
|
39
|
+
} .input-autocomplete__value_1muzq {
|
|
40
40
|
overflow: hidden;
|
|
41
41
|
text-overflow: ellipsis;
|
|
42
42
|
text-align: left;
|
|
43
|
-
} .input-
|
|
43
|
+
} .input-autocomplete__focusVisible_1muzq {
|
|
44
44
|
outline: 2px solid var(--focus-color);
|
|
45
45
|
outline-offset: 2px;
|
|
46
46
|
}
|
package/modern/index.js
CHANGED
|
@@ -14,4 +14,4 @@ import '@alfalab/core-components-input/modern';
|
|
|
14
14
|
import '@alfalab/core-components-select/modern/mobile';
|
|
15
15
|
import './autocomplete-mobile-field/Component.js';
|
|
16
16
|
import '@alfalab/core-components-form-control/modern/mobile';
|
|
17
|
-
import './mobile.module-
|
|
17
|
+
import './mobile.module-403e2faf.js';
|
package/modern/mobile.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 17kwg */
|
|
2
2
|
:root {
|
|
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 */
|
|
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 */
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
--gap-m: 16px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .input-
|
|
19
|
+
} .input-autocomplete__bottomAddonInput_b1a1h {
|
|
20
20
|
padding: 0 var(--gap-xs) var(--gap-xs);
|
|
21
21
|
box-sizing: border-box;
|
|
22
|
-
} .input-
|
|
22
|
+
} .input-autocomplete__footer_b1a1h {
|
|
23
23
|
display: flex
|
|
24
|
-
} .input-
|
|
24
|
+
} .input-autocomplete__footer_b1a1h > button + button {
|
|
25
25
|
margin-left: var(--gap-m);
|
|
26
26
|
}
|
package/modern/mobile.js
CHANGED
|
@@ -10,4 +10,4 @@ import '@alfalab/core-components-select/modern/mobile';
|
|
|
10
10
|
import './autocomplete-mobile-field/Component.js';
|
|
11
11
|
import '@alfalab/core-components-form-control/modern/mobile';
|
|
12
12
|
import '@alfalab/hooks';
|
|
13
|
-
import './mobile.module-
|
|
13
|
+
import './mobile.module-403e2faf.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const styles = {"bottomAddonInput":"input-
|
|
1
|
+
const styles = {"bottomAddonInput":"input-autocomplete__bottomAddonInput_b1a1h","footer":"input-autocomplete__footer_b1a1h"};
|
|
2
2
|
require('./mobile.css')
|
|
3
3
|
|
|
4
4
|
export { styles as s };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-input-autocomplete",
|
|
3
|
-
"version": "10.0.
|
|
3
|
+
"version": "10.0.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"@alfalab/core-components-button": "^9.0.2",
|
|
38
38
|
"@alfalab/core-components-form-control": "^10.0.0",
|
|
39
39
|
"@alfalab/core-components-input": "^12.0.2",
|
|
40
|
-
"@alfalab/core-components-select": "^15.0.
|
|
40
|
+
"@alfalab/core-components-select": "^15.0.4",
|
|
41
41
|
"@alfalab/hooks": "^1.13.0",
|
|
42
42
|
"classnames": "^2.3.1",
|
|
43
43
|
"lodash.throttle": "^4.1.1",
|
package/shared-4cd3936b.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton
|
|
|
57
57
|
reset: () => void;
|
|
58
58
|
};
|
|
59
59
|
export * from "./index-ebda875c";
|
|
60
|
+
export * from "./Component-50136800";
|
|
60
61
|
export * from "./Component-5e1b8383";
|
|
61
62
|
export { useSelectWithLoading, useLazyLoading };
|
|
62
63
|
export * from "./hook-9ea9e32c";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useRef, useState } from 'react';
|
|
1
|
+
import React, { ElementType, useRef, useState } from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
|
|
4
4
|
import {
|
|
@@ -10,6 +10,13 @@ import { useFocus } from '@alfalab/hooks';
|
|
|
10
10
|
|
|
11
11
|
import styles from './index.module.css';
|
|
12
12
|
|
|
13
|
+
type FieldProps = {
|
|
14
|
+
/**
|
|
15
|
+
* Компонент FormControl
|
|
16
|
+
*/
|
|
17
|
+
FormControlComponent?: ElementType;
|
|
18
|
+
};
|
|
19
|
+
|
|
13
20
|
export type AutocompleteMobileFieldProps = FormControlMobileProps &
|
|
14
21
|
Omit<BaseFieldProps, 'selected' | 'multiple' | 'success'> & {
|
|
15
22
|
/**
|
|
@@ -33,8 +40,9 @@ export const AutocompleteMobileField = ({
|
|
|
33
40
|
toggleMenu,
|
|
34
41
|
setSelectedItems,
|
|
35
42
|
selectedMultiple,
|
|
43
|
+
FormControlComponent,
|
|
36
44
|
...restProps
|
|
37
|
-
}: AutocompleteMobileFieldProps) => {
|
|
45
|
+
}: AutocompleteMobileFieldProps & FieldProps) => {
|
|
38
46
|
const [focused, setFocused] = useState(false);
|
|
39
47
|
|
|
40
48
|
const wrapperRef = useRef<HTMLDivElement>(null);
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { AnchorButtonProps, NativeButtonProps } from "./typings-9211a437";
|
|
4
|
-
type ButtonMobileProps = Partial<AnchorButtonProps | NativeButtonProps>;
|
|
5
|
-
declare const ButtonMobile: React.ForwardRefExoticComponent<ButtonMobileProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
6
|
-
export { ButtonMobileProps, ButtonMobile };
|