@alfalab/core-components-input-autocomplete 9.1.4 → 9.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.
- package/Component-7ca84eff.d.ts +3 -2
- package/{Component.d.ts → Component.desktop.d.ts} +3 -3
- package/{Component.js → Component.desktop.js} +8 -10
- package/Component.mobile.d.ts +2 -2
- package/Component.mobile.js +23 -18
- package/Component.responsive.d.ts +13 -0
- package/Component.responsive.js +31 -0
- package/autocomplete-field/Component.d.ts +2 -2
- package/autocomplete-field/Component.js +9 -11
- package/autocomplete-field/index.css +2 -2
- package/autocomplete-field/index.js +2 -4
- package/autocomplete-mobile-field/Component.js +12 -14
- package/autocomplete-mobile-field/index.css +8 -8
- package/autocomplete-mobile-field/index.js +2 -4
- package/cssm/Component-7ca84eff.d.ts +3 -2
- package/{esm/Component.d.ts → cssm/Component.desktop.d.ts} +7 -7
- package/cssm/{Component.js → Component.desktop.js} +8 -10
- package/cssm/Component.mobile.d.ts +2 -2
- package/cssm/Component.mobile.js +24 -19
- package/cssm/Component.responsive.d.ts +13 -0
- package/cssm/Component.responsive.js +34 -0
- package/cssm/autocomplete-field/Component.d.ts +2 -2
- package/cssm/autocomplete-field/Component.js +10 -12
- package/cssm/autocomplete-field/index.js +2 -4
- package/cssm/autocomplete-mobile-field/Component.js +14 -16
- package/cssm/autocomplete-mobile-field/index.js +2 -4
- package/cssm/desktop.d.ts +2 -0
- package/cssm/desktop.js +15 -0
- package/cssm/getDataTestId-3fe0d3e6.d.ts +1 -1
- package/cssm/index-bdb4c6b9.d.ts +3 -2
- package/cssm/index.d.ts +2 -1
- package/cssm/index.js +15 -7
- package/cssm/mobile.d.ts +1 -0
- package/cssm/mobile.js +3 -5
- package/cssm/responsive.d.ts +2 -0
- package/cssm/responsive.js +24 -0
- package/cssm/{tslib.es6-9682e485.d.ts → tslib.es6-bbd6cd2a.d.ts} +0 -0
- package/cssm/{tslib.es6-9682e485.js → tslib.es6-bbd6cd2a.js} +0 -0
- package/desktop.d.ts +2 -0
- package/desktop.js +14 -0
- package/esm/Component-7ca84eff.d.ts +3 -2
- package/{cssm/Component.d.ts → esm/Component.desktop.d.ts} +7 -7
- package/esm/{Component.js → Component.desktop.js} +5 -5
- package/esm/Component.mobile.d.ts +2 -2
- package/esm/Component.mobile.js +14 -7
- package/esm/Component.responsive.d.ts +13 -0
- package/esm/Component.responsive.js +25 -0
- package/esm/autocomplete-field/Component.d.ts +2 -2
- package/esm/autocomplete-field/Component.js +2 -2
- package/esm/autocomplete-field/index.css +2 -2
- package/esm/autocomplete-field/index.js +2 -2
- package/esm/autocomplete-mobile-field/Component.js +4 -4
- package/esm/autocomplete-mobile-field/index.css +8 -8
- package/esm/autocomplete-mobile-field/index.js +2 -2
- package/esm/desktop.d.ts +2 -0
- package/esm/desktop.js +8 -0
- package/esm/getDataTestId-3fe0d3e6.d.ts +1 -1
- package/esm/index-bdb4c6b9.d.ts +3 -2
- package/esm/index.d.ts +2 -1
- package/esm/index.js +11 -4
- package/esm/mobile.css +4 -4
- package/esm/mobile.d.ts +1 -0
- package/esm/mobile.js +3 -3
- package/esm/responsive.d.ts +2 -0
- package/esm/responsive.js +15 -0
- package/esm/{tslib.es6-2208c38d.d.ts → tslib.es6-4587d140.d.ts} +0 -0
- package/esm/{tslib.es6-2208c38d.js → tslib.es6-4587d140.js} +0 -0
- package/getDataTestId-3fe0d3e6.d.ts +1 -1
- package/index-bdb4c6b9.d.ts +3 -2
- package/index.d.ts +2 -1
- package/index.js +13 -7
- package/mobile.css +4 -4
- package/mobile.d.ts +1 -0
- package/mobile.js +3 -5
- package/modern/Component-7ca84eff.d.ts +3 -2
- package/modern/{Component.d.ts → Component.desktop.d.ts} +7 -7
- package/modern/Component.desktop.js +17 -0
- package/modern/Component.mobile.d.ts +2 -2
- package/modern/Component.mobile.js +13 -6
- package/modern/Component.responsive.d.ts +13 -0
- package/modern/Component.responsive.js +23 -0
- package/modern/autocomplete-field/Component.d.ts +2 -2
- package/modern/autocomplete-field/Component.js +1 -1
- package/modern/autocomplete-field/index.css +2 -2
- package/modern/autocomplete-field/index.js +1 -1
- package/modern/autocomplete-mobile-field/Component.js +2 -2
- package/modern/autocomplete-mobile-field/index.css +8 -8
- package/modern/autocomplete-mobile-field/index.js +1 -1
- package/modern/desktop.d.ts +2 -0
- package/modern/desktop.js +7 -0
- package/modern/getDataTestId-3fe0d3e6.d.ts +1 -1
- package/modern/index-bdb4c6b9.d.ts +3 -2
- package/modern/index.d.ts +2 -1
- package/modern/index.js +10 -3
- package/modern/mobile.css +4 -4
- package/modern/mobile.d.ts +1 -0
- package/modern/mobile.js +2 -2
- package/modern/responsive.d.ts +2 -0
- package/modern/responsive.js +14 -0
- package/package.json +5 -5
- package/responsive.d.ts +2 -0
- package/responsive.js +21 -0
- package/{tslib.es6-8ec3b181.d.ts → tslib.es6-89e6fcc2.d.ts} +0 -0
- package/{tslib.es6-8ec3b181.js → tslib.es6-89e6fcc2.js} +0 -0
- package/modern/Component.js +0 -17
|
@@ -5,15 +5,15 @@ import throttle from 'lodash.throttle';
|
|
|
5
5
|
import { Button } from '@alfalab/core-components-button/modern';
|
|
6
6
|
import { Input } from '@alfalab/core-components-input/modern';
|
|
7
7
|
import { SelectMobile } from '@alfalab/core-components-select/modern';
|
|
8
|
+
import { AutocompleteMobileField } from './autocomplete-mobile-field/Component.js';
|
|
8
9
|
import '@alfalab/core-components-form-control/modern';
|
|
9
10
|
import '@alfalab/hooks';
|
|
10
|
-
import { AutocompleteMobileField } from './autocomplete-mobile-field/Component.js';
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
const styles = {"bottomSheetInput":"input-autocomplete__bottomSheetInput_1hvu9","footer":"input-autocomplete__footer_1hvu9"};
|
|
13
13
|
require('./mobile.css')
|
|
14
14
|
|
|
15
15
|
const SELECTED = [];
|
|
16
|
-
const InputAutocompleteMobile = React.forwardRef(({ Input: Input$1, bottomSheetProps = {}, bottomSheetHeaderAddonsProps = {}, value = '', filter = '', name, Arrow = null, label, placeholder, size = 's', open: openProp, onFilter, onChange, onOpen, onCancel, onClearFilter, continueButtonProps, cancelButtonProps, ...restProps }, ref) => {
|
|
16
|
+
const InputAutocompleteMobile = React.forwardRef(({ Input: Input$1, bottomSheetProps = {}, bottomSheetHeaderAddonsProps = {}, value = '', filter = '', name, Arrow = null, label, placeholder, size = 's', open: openProp, onFilter, onChange, onOpen, onCancel, onClearFilter, continueButtonProps, cancelButtonProps, selected, multiple, ...restProps }, ref) => {
|
|
17
17
|
const [open, setOpen] = useState(false);
|
|
18
18
|
const bottomSheetInputRef = useRef(null);
|
|
19
19
|
const targetRef = useRef(null);
|
|
@@ -34,10 +34,17 @@ const InputAutocompleteMobile = React.forwardRef(({ Input: Input$1, bottomSheetP
|
|
|
34
34
|
input.blur();
|
|
35
35
|
}
|
|
36
36
|
}, 300), []);
|
|
37
|
-
const
|
|
37
|
+
const handleApply = () => {
|
|
38
38
|
setBottomSheetVisibility(false);
|
|
39
39
|
onChange(filter);
|
|
40
40
|
};
|
|
41
|
+
const handleChange = (payload) => {
|
|
42
|
+
onChange(payload);
|
|
43
|
+
if (multiple) {
|
|
44
|
+
// После выбора опции возвращаем фокус в поле ввода.
|
|
45
|
+
requestAnimationFrame(() => bottomSheetInputRef.current?.focus());
|
|
46
|
+
}
|
|
47
|
+
};
|
|
41
48
|
const handleCancel = () => {
|
|
42
49
|
setBottomSheetVisibility(false);
|
|
43
50
|
if (onCancel) {
|
|
@@ -57,7 +64,7 @@ const InputAutocompleteMobile = React.forwardRef(({ Input: Input$1, bottomSheetP
|
|
|
57
64
|
const Component = Input$1 || Input;
|
|
58
65
|
return {
|
|
59
66
|
actionButton: (React.createElement("div", { className: styles.footer },
|
|
60
|
-
React.createElement(Button, { block: true, view: 'primary', size: 's', onClick:
|
|
67
|
+
React.createElement(Button, { block: true, view: 'primary', size: 's', onClick: handleApply, ...continueButtonProps }, "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C"),
|
|
61
68
|
React.createElement(Button, { block: true, view: 'secondary', size: 's', onClick: handleCancel, ...cancelButtonProps }, "\u041E\u0442\u043C\u0435\u043D\u0430"))),
|
|
62
69
|
title: label || placeholder,
|
|
63
70
|
bottomAddons: (React.createElement(Component, { block: true, clear: !!onClearFilter, onClear: onClearFilter, value: filter, onInput: onFilter, placeholder: placeholder, onFocus: handleInputFocus, ...bottomSheetHeaderAddonsProps, className: cn(styles.bottomSheetInput, bottomSheetHeaderAddonsProps.className), ref: mergeRefs([
|
|
@@ -72,7 +79,7 @@ const InputAutocompleteMobile = React.forwardRef(({ Input: Input$1, bottomSheetP
|
|
|
72
79
|
},
|
|
73
80
|
};
|
|
74
81
|
};
|
|
75
|
-
return (React.createElement(SelectMobile, { ref: mergeRefs([targetRef, ref]), selected: SELECTED, open: Boolean(open || openProp), onOpen: handleOpen, onChange:
|
|
82
|
+
return (React.createElement(SelectMobile, { ref: mergeRefs([targetRef, ref]), selected: selected || SELECTED, open: Boolean(open || openProp), onOpen: handleOpen, onChange: handleChange, Arrow: Arrow, Field: AutocompleteMobileField, fieldProps: { value }, placeholder: placeholder, label: label, size: size, name: name, multiple: multiple, bottomSheetProps: getBottomSheetProps(), optionsListProps: { showFooter: false }, ...restProps }));
|
|
76
83
|
});
|
|
77
84
|
|
|
78
85
|
export { InputAutocompleteMobile };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { InputAutocompleteDesktopProps } from "./Component.desktop";
|
|
3
|
+
import { InputAutocompleteMobileProps } from "./Component.mobile";
|
|
4
|
+
type InputAutocompleteResponsiveProps = InputAutocompleteDesktopProps & InputAutocompleteMobileProps & {
|
|
5
|
+
/**
|
|
6
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
7
|
+
* @default 1024
|
|
8
|
+
*/
|
|
9
|
+
breakpoint?: number;
|
|
10
|
+
};
|
|
11
|
+
type InputAutocompleteMedia = 'desktop' | 'mobile';
|
|
12
|
+
declare const InputAutocompleteResponsive: FC<InputAutocompleteResponsiveProps>;
|
|
13
|
+
export { InputAutocompleteResponsiveProps, InputAutocompleteMedia, InputAutocompleteResponsive };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { useMedia } from '@alfalab/hooks';
|
|
3
|
+
import { InputAutocompleteDesktop } from './Component.desktop.js';
|
|
4
|
+
import { InputAutocompleteMobile } from './Component.mobile.js';
|
|
5
|
+
import '@alfalab/core-components-select/modern';
|
|
6
|
+
import './autocomplete-field/Component.js';
|
|
7
|
+
import 'react-merge-refs';
|
|
8
|
+
import 'classnames';
|
|
9
|
+
import '@alfalab/core-components-input/modern';
|
|
10
|
+
import 'lodash.throttle';
|
|
11
|
+
import '@alfalab/core-components-button/modern';
|
|
12
|
+
import './autocomplete-mobile-field/Component.js';
|
|
13
|
+
import '@alfalab/core-components-form-control/modern';
|
|
14
|
+
|
|
15
|
+
const InputAutocompleteResponsive = ({ breakpoint = 1024, ...restProps }) => {
|
|
16
|
+
const [view] = useMedia([
|
|
17
|
+
['mobile', `(max-width: ${breakpoint - 1}px)`],
|
|
18
|
+
['desktop', `(min-width: ${breakpoint}px)`],
|
|
19
|
+
], 'desktop');
|
|
20
|
+
return view === 'desktop' ? (React.createElement(InputAutocompleteDesktop, { ...restProps })) : (React.createElement(InputAutocompleteMobile, { ...restProps }));
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export { InputAutocompleteResponsive };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { FieldProps } from "@alfalab/core-components-select";
|
|
3
|
-
import {
|
|
4
|
-
type AutocompleteFieldProps = FieldProps & Pick<
|
|
3
|
+
import { InputAutocompleteDesktopProps } from "../Component.desktop";
|
|
4
|
+
type AutocompleteFieldProps = FieldProps & Pick<InputAutocompleteDesktopProps, 'Input' | 'inputProps' | 'value' | 'onInput' | 'readOnly'>;
|
|
5
5
|
declare const AutocompleteField: ({ label, labelView, placeholder, size, Arrow, Input, value, error, success, hint, disabled, readOnly, onInput, inputProps, innerProps, }: AutocompleteFieldProps) => JSX.Element;
|
|
6
6
|
export { AutocompleteFieldProps, AutocompleteField };
|
|
@@ -3,7 +3,7 @@ import mergeRefs from 'react-merge-refs';
|
|
|
3
3
|
import cn from 'classnames';
|
|
4
4
|
import { Input } from '@alfalab/core-components-input/modern';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const styles = {"arrow":"input-autocomplete__arrow_1ff63","error":"input-autocomplete__error_1ff63"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const AutocompleteField = ({ label, labelView = 'inner', placeholder, size, Arrow, Input: Input$1 = Input, value, error, success, hint, disabled, readOnly, onInput, inputProps = {}, innerProps, }) => {
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import { FormControl } from '@alfalab/core-components-form-control/modern';
|
|
4
4
|
import { useFocus } from '@alfalab/hooks';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
const styles = {"component":"input-autocomplete__component_vxtnq","field":"input-autocomplete__field_vxtnq","disabled":"input-autocomplete__disabled_vxtnq","placeholder":"input-autocomplete__placeholder_vxtnq","contentWrapper":"input-autocomplete__contentWrapper_vxtnq","value":"input-autocomplete__value_vxtnq","focusVisible":"input-autocomplete__focusVisible_vxtnq"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const AutocompleteMobileField = ({ size = 'm', open, error, hint, disabled, label, labelView = 'inner', placeholder, value, innerProps, dataTestId, fieldClassName, Arrow, valueRenderer, toggleMenu, setSelectedItems, selectedMultiple, ...restProps }) => {
|
|
@@ -16,7 +16,7 @@ const AutocompleteMobileField = ({ size = 'm', open, error, hint, disabled, labe
|
|
|
16
16
|
React.createElement(FormControl, { fieldClassName: cn(styles.field, fieldClassName, {
|
|
17
17
|
[styles.disabled]: disabled,
|
|
18
18
|
[styles.focusVisible]: focusVisible,
|
|
19
|
-
}), block: true, size: size, focused: focused, disabled: disabled, filled: filled, label: showLabel && label, labelView: labelView, error: error, hint: hint, "data-test-id": dataTestId, ...restProps, ...innerProps },
|
|
19
|
+
}), block: true, size: size, focused: focused, disabled: disabled, filled: filled, label: showLabel && label, labelView: labelView, error: error, hint: hint, rightAddons: Arrow, "data-test-id": dataTestId, ...restProps, ...innerProps },
|
|
20
20
|
React.createElement("div", { className: styles.contentWrapper },
|
|
21
21
|
placeholder && !filled && (React.createElement("span", { className: styles.placeholder }, placeholder)),
|
|
22
22
|
filled && React.createElement("div", { className: styles.value }, value)))));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: ezeif */
|
|
2
2
|
:root {
|
|
3
3
|
--color-light-border-link: #007aff;
|
|
4
4
|
--color-light-text-secondary: rgba(11, 31, 53, 0.7);
|
|
@@ -15,20 +15,20 @@
|
|
|
15
15
|
--focus-color: var(--color-light-border-link);
|
|
16
16
|
--disabled-cursor: not-allowed;
|
|
17
17
|
}
|
|
18
|
-
.input-
|
|
18
|
+
.input-autocomplete__component_vxtnq {
|
|
19
19
|
width: 100%;
|
|
20
20
|
outline: none;
|
|
21
21
|
}
|
|
22
|
-
.input-
|
|
22
|
+
.input-autocomplete__field_vxtnq:not(.input-autocomplete__disabled_vxtnq) {
|
|
23
23
|
cursor: pointer;
|
|
24
24
|
}
|
|
25
|
-
.input-
|
|
25
|
+
.input-autocomplete__disabled_vxtnq {
|
|
26
26
|
cursor: var(--disabled-cursor);
|
|
27
27
|
}
|
|
28
|
-
.input-
|
|
28
|
+
.input-autocomplete__placeholder_vxtnq {
|
|
29
29
|
color: var(--color-light-text-secondary);
|
|
30
30
|
}
|
|
31
|
-
.input-
|
|
31
|
+
.input-autocomplete__contentWrapper_vxtnq {
|
|
32
32
|
font-size: 16px;
|
|
33
33
|
line-height: 20px;
|
|
34
34
|
font-weight: 400;
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
overflow: hidden;
|
|
39
39
|
width: 100%;
|
|
40
40
|
}
|
|
41
|
-
.input-
|
|
41
|
+
.input-autocomplete__value_vxtnq {
|
|
42
42
|
overflow: hidden;
|
|
43
43
|
text-overflow: ellipsis;
|
|
44
44
|
text-align: left;
|
|
45
45
|
}
|
|
46
|
-
.input-
|
|
46
|
+
.input-autocomplete__focusVisible_vxtnq {
|
|
47
47
|
outline: 2px solid var(--focus-color);
|
|
48
48
|
outline-offset: 2px;
|
|
49
49
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { InputAutocompleteDesktop } from './Component.desktop.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '@alfalab/core-components-select/modern';
|
|
4
|
+
import './autocomplete-field/Component.js';
|
|
5
|
+
import 'react-merge-refs';
|
|
6
|
+
import 'classnames';
|
|
7
|
+
import '@alfalab/core-components-input/modern';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const getDataTestId: (dataTestId?: string
|
|
1
|
+
declare const getDataTestId: (dataTestId?: string, element?: string) => string | undefined;
|
|
2
2
|
export { getDataTestId };
|
|
@@ -151,7 +151,7 @@ declare function isScrolledToBottom(target: HTMLElement): boolean;
|
|
|
151
151
|
declare function hasScrollbar(target: HTMLElement): boolean;
|
|
152
152
|
declare const getScrollbarSize: () => number;
|
|
153
153
|
declare const restoreContainerStyles: (container: HTMLElement) => void;
|
|
154
|
-
declare const handleContainer: (container?: HTMLElement
|
|
154
|
+
declare const handleContainer: (container?: HTMLElement) => void;
|
|
155
155
|
/**
|
|
156
156
|
* Набор констант для z-index соответствующих классов компонентов.
|
|
157
157
|
* Значения выбраны по приоритету.
|
|
@@ -201,4 +201,5 @@ declare class GlobalStore {
|
|
|
201
201
|
constructor();
|
|
202
202
|
getModalStore: () => ModalStore;
|
|
203
203
|
}
|
|
204
|
-
export { BaseModalProps, BaseModalContext, BaseModal, isScrolledToTop, isScrolledToBottom, hasScrollbar, getScrollbarSize, restoreContainerStyles, handleContainer, stackingOrder, StackingContext, StackProps, Stack, PORTAL_CONTAINER_ATTRIBUTE, getDefaultPortalContainer, setRef,
|
|
204
|
+
export { BaseModalProps, BaseModalContext, BaseModal, isScrolledToTop, isScrolledToBottom, hasScrollbar, getScrollbarSize, restoreContainerStyles, handleContainer, stackingOrder, StackingContext, StackProps, Stack, PORTAL_CONTAINER_ATTRIBUTE, getDefaultPortalContainer, setRef, getModalStore, GlobalStore };
|
|
205
|
+
export type { SavedStyle };
|
package/modern/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { InputAutocompleteDesktop as InputAutocomplete, InputAutocompleteDesktopProps as InputAutocompleteProps } from "./Component.desktop";
|
|
2
|
+
export * from "./responsive";
|
package/modern/index.js
CHANGED
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
export { InputAutocompleteDesktop as InputAutocomplete } from './Component.desktop.js';
|
|
2
|
+
export { InputAutocompleteResponsive } from './Component.responsive.js';
|
|
1
3
|
import 'react';
|
|
4
|
+
import '@alfalab/core-components-select/modern';
|
|
5
|
+
import './autocomplete-field/Component.js';
|
|
2
6
|
import 'react-merge-refs';
|
|
3
7
|
import 'classnames';
|
|
4
8
|
import '@alfalab/core-components-input/modern';
|
|
5
|
-
import '@alfalab/
|
|
6
|
-
import './
|
|
7
|
-
|
|
9
|
+
import '@alfalab/hooks';
|
|
10
|
+
import './Component.mobile.js';
|
|
11
|
+
import 'lodash.throttle';
|
|
12
|
+
import '@alfalab/core-components-button/modern';
|
|
13
|
+
import './autocomplete-mobile-field/Component.js';
|
|
14
|
+
import '@alfalab/core-components-form-control/modern';
|
package/modern/mobile.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 9d86v */
|
|
2
2
|
:root {
|
|
3
3
|
|
|
4
4
|
/* Hard */
|
|
@@ -11,13 +11,13 @@
|
|
|
11
11
|
--gap-xs: 8px;
|
|
12
12
|
--gap-m: 16px;
|
|
13
13
|
}
|
|
14
|
-
.input-
|
|
14
|
+
.input-autocomplete__bottomSheetInput_1hvu9 {
|
|
15
15
|
padding: 0 var(--gap-xs) var(--gap-xs);
|
|
16
16
|
box-sizing: border-box;
|
|
17
17
|
}
|
|
18
|
-
.input-
|
|
18
|
+
.input-autocomplete__footer_1hvu9 {
|
|
19
19
|
display: flex
|
|
20
20
|
}
|
|
21
|
-
.input-
|
|
21
|
+
.input-autocomplete__footer_1hvu9 > button + button {
|
|
22
22
|
margin-left: var(--gap-m);
|
|
23
23
|
}
|
package/modern/mobile.d.ts
CHANGED
package/modern/mobile.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { InputAutocompleteMobile } from './Component.mobile.js';
|
|
1
2
|
import 'react';
|
|
2
3
|
import 'react-merge-refs';
|
|
3
4
|
import 'classnames';
|
|
@@ -5,7 +6,6 @@ import 'lodash.throttle';
|
|
|
5
6
|
import '@alfalab/core-components-button/modern';
|
|
6
7
|
import '@alfalab/core-components-input/modern';
|
|
7
8
|
import '@alfalab/core-components-select/modern';
|
|
9
|
+
import './autocomplete-mobile-field/Component.js';
|
|
8
10
|
import '@alfalab/core-components-form-control/modern';
|
|
9
11
|
import '@alfalab/hooks';
|
|
10
|
-
import './autocomplete-mobile-field/Component.js';
|
|
11
|
-
export { InputAutocompleteMobile } from './Component.mobile.js';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { InputAutocompleteResponsive } from './Component.responsive.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '@alfalab/hooks';
|
|
4
|
+
import './Component.desktop.js';
|
|
5
|
+
import '@alfalab/core-components-select/modern';
|
|
6
|
+
import './autocomplete-field/Component.js';
|
|
7
|
+
import 'react-merge-refs';
|
|
8
|
+
import 'classnames';
|
|
9
|
+
import '@alfalab/core-components-input/modern';
|
|
10
|
+
import './Component.mobile.js';
|
|
11
|
+
import 'lodash.throttle';
|
|
12
|
+
import '@alfalab/core-components-button/modern';
|
|
13
|
+
import './autocomplete-mobile-field/Component.js';
|
|
14
|
+
import '@alfalab/core-components-form-control/modern';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-input-autocomplete",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.3.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@alfalab/core-components-button": "^7.0.
|
|
21
|
-
"@alfalab/core-components-form-control": "^9.0.
|
|
22
|
-
"@alfalab/core-components-input": "^11.1.
|
|
23
|
-
"@alfalab/core-components-select": "^13.2.
|
|
20
|
+
"@alfalab/core-components-button": "^7.0.2",
|
|
21
|
+
"@alfalab/core-components-form-control": "^9.0.2",
|
|
22
|
+
"@alfalab/core-components-input": "^11.1.1",
|
|
23
|
+
"@alfalab/core-components-select": "^13.2.3",
|
|
24
24
|
"@alfalab/hooks": "^1.4.1",
|
|
25
25
|
"classnames": "^2.3.1",
|
|
26
26
|
"lodash.throttle": "^4.1.1",
|
package/responsive.d.ts
ADDED
package/responsive.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var Component_responsive = require('./Component.responsive.js');
|
|
4
|
+
require('./tslib.es6-89e6fcc2.js');
|
|
5
|
+
require('react');
|
|
6
|
+
require('@alfalab/hooks');
|
|
7
|
+
require('./Component.desktop.js');
|
|
8
|
+
require('@alfalab/core-components-select');
|
|
9
|
+
require('./autocomplete-field/Component.js');
|
|
10
|
+
require('react-merge-refs');
|
|
11
|
+
require('classnames');
|
|
12
|
+
require('@alfalab/core-components-input');
|
|
13
|
+
require('./Component.mobile.js');
|
|
14
|
+
require('lodash.throttle');
|
|
15
|
+
require('@alfalab/core-components-button');
|
|
16
|
+
require('./autocomplete-mobile-field/Component.js');
|
|
17
|
+
require('@alfalab/core-components-form-control');
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
exports.InputAutocompleteResponsive = Component_responsive.InputAutocompleteResponsive;
|
|
File without changes
|
|
File without changes
|
package/modern/Component.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { forwardRef } from 'react';
|
|
2
|
-
import 'react-merge-refs';
|
|
3
|
-
import 'classnames';
|
|
4
|
-
import '@alfalab/core-components-input/modern';
|
|
5
|
-
import { OptionsList, Optgroup, Option, BaseSelect } from '@alfalab/core-components-select/modern';
|
|
6
|
-
import { AutocompleteField } from './autocomplete-field/Component.js';
|
|
7
|
-
|
|
8
|
-
const InputAutocomplete = 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, { ref: ref, autocomplete: true, options: options, closeOnSelect: closeOnSelect, Option: Option$1, Field: AutocompleteField, fieldProps: {
|
|
9
|
-
Input,
|
|
10
|
-
onInput,
|
|
11
|
-
value,
|
|
12
|
-
inputProps,
|
|
13
|
-
readOnly,
|
|
14
|
-
success,
|
|
15
|
-
}, Optgroup: Optgroup$1, OptionsList: OptionsList$1, ...restProps })));
|
|
16
|
-
|
|
17
|
-
export { InputAutocomplete };
|