@alfalab/core-components-input-autocomplete 10.2.0 → 10.2.1
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/{cssm/Component-dd8ca091.d.ts → Component-0f4b9bed.d.ts} +1 -1
- package/Component-89f0cb07.d.ts +38 -0
- package/Component.desktop.d.ts +2 -2
- package/{modern/Component.mobile-ade26e99.d.ts → Component.mobile-96988a65.d.ts} +2 -2
- package/Component.mobile.d.ts +3 -3
- package/Component.mobile.js +1 -1
- package/{modern/Component.modal.mobile-dd8ca091.d.ts → Component.modal.mobile-96988a65.d.ts} +2 -2
- package/Component.modal.mobile.d.ts +3 -3
- package/Component.modal.mobile.js +1 -1
- package/Component.responsive.d.ts +4 -4
- 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.js +1 -1
- package/autocomplete-mobile-field/index.css +8 -8
- package/{Component-dd8ca091.d.ts → cssm/Component-0f4b9bed.d.ts} +1 -1
- package/cssm/Component-511e54fa.d.ts +9 -0
- package/cssm/Component-89f0cb07.d.ts +38 -0
- package/cssm/Component.desktop.d.ts +2 -2
- package/cssm/{Component.mobile-ade26e99.d.ts → Component.mobile-f28cbba0.d.ts} +1 -1
- package/cssm/Component.mobile.d.ts +3 -3
- package/{Component.modal.mobile-dd8ca091.d.ts → cssm/Component.modal.mobile-0f4b9bed.d.ts} +1 -1
- package/cssm/Component.modal.mobile.d.ts +3 -3
- package/cssm/Component.responsive.d.ts +4 -4
- package/cssm/desktop-89f0cb07.d.ts +6 -0
- package/cssm/hook-8abfea97.d.ts +8 -8
- package/cssm/index-c76d6398.d.ts +2 -2
- package/cssm/mobile-511e54fa.d.ts +6 -0
- package/cssm/mobile-96988a65.d.ts +5 -2
- package/cssm/mobile-f28cbba0.d.ts +5 -0
- package/cssm/mobile.module.css +1 -1
- package/cssm/shared-4cd3936b.d.ts +5 -5
- package/cssm/{typings-dd8ca091.d.ts → typings-0f4b9bed.d.ts} +4 -0
- package/cssm/{typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
- package/cssm/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
- package/desktop-69921c40.d.ts +6 -0
- package/esm/{Component-dd8ca091.d.ts → Component-0f4b9bed.d.ts} +1 -1
- package/esm/Component-89f0cb07.d.ts +38 -0
- package/esm/Component.desktop.d.ts +2 -2
- package/esm/{Component.mobile-ade26e99.d.ts → Component.mobile-f28cbba0.d.ts} +1 -1
- package/esm/Component.mobile.d.ts +3 -3
- package/esm/Component.mobile.js +1 -1
- package/esm/{Component.modal.mobile-dd8ca091.d.ts → Component.modal.mobile-0f4b9bed.d.ts} +1 -1
- package/esm/Component.modal.mobile.d.ts +2 -2
- package/esm/Component.modal.mobile.js +1 -1
- package/esm/Component.responsive.d.ts +3 -3
- 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.js +1 -1
- package/esm/autocomplete-mobile-field/index.css +8 -8
- package/esm/desktop-69921c40.d.ts +6 -0
- package/esm/hook-8abfea97.d.ts +8 -8
- package/esm/index-c76d6398.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/mobile-89f0cb07.d.ts +6 -0
- package/esm/mobile-96988a65.d.ts +5 -2
- package/esm/mobile-f28cbba0.d.ts +5 -0
- package/esm/mobile.css +5 -5
- package/esm/mobile.js +1 -1
- package/esm/{mobile.module-db1787d4.js → mobile.module-b845ad92.js} +1 -1
- package/esm/shared-4cd3936b.d.ts +5 -5
- package/esm/{typings-dd8ca091.d.ts → typings-0f4b9bed.d.ts} +4 -0
- package/esm/{typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
- package/esm/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
- package/{hook-8abfea97.d.ts → hook-0f4b9bed.d.ts} +8 -8
- package/index-c76d6398.d.ts +2 -2
- package/index-ebda875c.d.ts +18 -124
- package/index.js +1 -1
- package/mobile-89f0cb07.d.ts +6 -0
- package/mobile-96988a65.d.ts +5 -2
- package/mobile-f28cbba0.d.ts +5 -0
- package/mobile.css +5 -5
- package/mobile.js +1 -1
- package/{mobile.module-a683dbb2.js → mobile.module-15cb0efe.js} +1 -1
- package/modern/{Component-dd8ca091.d.ts → Component-0f4b9bed.d.ts} +1 -1
- package/modern/Component-89f0cb07.d.ts +38 -0
- package/modern/Component.desktop.d.ts +2 -2
- package/modern/Component.mobile-ebda875c.d.ts +4 -4
- package/{Component.mobile-ade26e99.d.ts → modern/Component.mobile-f28cbba0.d.ts} +1 -1
- package/modern/Component.mobile.d.ts +3 -3
- package/modern/Component.mobile.js +1 -1
- package/{cssm/Component.modal.mobile-dd8ca091.d.ts → modern/Component.modal.mobile-0f4b9bed.d.ts} +1 -1
- package/modern/Component.modal.mobile.d.ts +3 -3
- package/modern/Component.modal.mobile.js +1 -1
- package/modern/Component.responsive.d.ts +4 -4
- 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.js +1 -1
- package/modern/autocomplete-mobile-field/index.css +8 -8
- package/modern/desktop-69921c40.d.ts +6 -0
- package/modern/hook-8abfea97.d.ts +8 -8
- package/modern/index-c76d6398.d.ts +2 -2
- package/modern/index-ebda875c.d.ts +18 -124
- package/modern/index.js +1 -1
- package/modern/mobile-89f0cb07.d.ts +6 -0
- package/modern/mobile-96988a65.d.ts +0 -1
- package/modern/mobile-f28cbba0.d.ts +5 -0
- package/modern/mobile.css +5 -5
- package/modern/mobile.js +1 -1
- package/modern/{mobile.module-5660f91c.js → mobile.module-40321fa2.js} +1 -1
- package/modern/shared-4cd3936b.d.ts +5 -5
- package/modern/{typings-dd8ca091.d.ts → typings-0f4b9bed.d.ts} +4 -0
- package/modern/{typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
- package/modern/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
- package/package.json +6 -6
- package/shared-4cd3936b.d.ts +6 -6
- package/src/Component.desktop.tsx +4 -1
- package/src/Component.mobile.tsx +9 -1
- package/src/mobile.module.css +1 -1
- package/{typings-dd8ca091.d.ts → typings-0f4b9bed.d.ts} +4 -0
- package/{typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
- package/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
- package/Component.mobile-ebda875c.d.ts +0 -6
- package/cssm/Component.mobile-ebda875c.d.ts +0 -6
- package/cssm/desktop-63dec22f.d.ts +0 -6
- package/cssm/mobile-ade26e99.d.ts +0 -5
- package/desktop-63dec22f.d.ts +0 -6
- package/esm/Component.mobile-ebda875c.d.ts +0 -6
- package/esm/desktop-63dec22f.d.ts +0 -6
- package/esm/mobile-ade26e99.d.ts +0 -5
- package/mobile-ade26e99.d.ts +0 -5
- package/modern/Component.desktop-ebda875c.d.ts +0 -6
- package/modern/desktop-63dec22f.d.ts +0 -6
- package/modern/mobile-ade26e99.d.ts +0 -5
- /package/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
- /package/cssm/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
- /package/esm/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
- /package/modern/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
|
@@ -1,146 +1,40 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
/// <reference types="react-transition-group" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
3
|
import React from "react";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
};
|
|
9
|
-
inverted: {
|
|
10
|
-
[key: string]: string;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
type BaseFormControlProps = HTMLAttributes<HTMLDivElement> & {
|
|
14
|
-
/**
|
|
15
|
-
* Растягивает компонент на ширину контейнера
|
|
16
|
-
*/
|
|
17
|
-
block?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Размер компонента
|
|
20
|
-
*/
|
|
21
|
-
size?: "s" | "m" | "l" | "xl";
|
|
22
|
-
/**
|
|
23
|
-
* Набор цветов для компонента
|
|
24
|
-
*/
|
|
25
|
-
colors?: "default" | "inverted";
|
|
26
|
-
/**
|
|
27
|
-
* Заблокированное состояние
|
|
28
|
-
*/
|
|
29
|
-
disabled?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* Cостояние только для чтения
|
|
32
|
-
*/
|
|
33
|
-
readOnly?: boolean;
|
|
34
|
-
/**
|
|
35
|
-
* Заполненное состояние
|
|
36
|
-
*/
|
|
37
|
-
filled?: boolean;
|
|
38
|
-
/**
|
|
39
|
-
* Выбранное (фокус) состояние
|
|
40
|
-
*/
|
|
41
|
-
focused?: boolean;
|
|
42
|
-
/**
|
|
43
|
-
* Отображение ошибки
|
|
44
|
-
*/
|
|
45
|
-
error?: ReactNode | boolean;
|
|
46
|
-
/**
|
|
47
|
-
* Текст подсказки
|
|
48
|
-
*/
|
|
49
|
-
hint?: ReactNode;
|
|
50
|
-
/**
|
|
51
|
-
* Лейбл компонента
|
|
52
|
-
*/
|
|
53
|
-
label?: ReactNode;
|
|
54
|
-
/**
|
|
55
|
-
* Вид лейбла внутри / снаружи
|
|
56
|
-
*/
|
|
57
|
-
labelView?: "inner" | "outer";
|
|
4
|
+
import { MouseEvent, ReactNode } from "react";
|
|
5
|
+
import { CSSTransitionClassNames } from "react-transition-group/CSSTransition";
|
|
6
|
+
import { TransitionProps } from "react-transition-group/Transition";
|
|
7
|
+
type BackdropProps = Partial<TransitionProps> & {
|
|
58
8
|
/**
|
|
59
|
-
*
|
|
9
|
+
* Прозрачный бэкдроп
|
|
60
10
|
*/
|
|
61
|
-
|
|
11
|
+
invisible?: boolean;
|
|
62
12
|
/**
|
|
63
|
-
*
|
|
13
|
+
* Управляет видимостью компонента
|
|
64
14
|
*/
|
|
65
|
-
|
|
15
|
+
open: boolean;
|
|
66
16
|
/**
|
|
67
|
-
*
|
|
17
|
+
* Обработчик клика по бэкдропу
|
|
68
18
|
*/
|
|
69
|
-
|
|
19
|
+
onClose?: (event: MouseEvent<HTMLElement>) => void;
|
|
70
20
|
/**
|
|
71
21
|
* Дополнительный класс
|
|
72
22
|
*/
|
|
73
23
|
className?: string;
|
|
74
24
|
/**
|
|
75
|
-
*
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Дополнительный класс для поля
|
|
80
|
-
*/
|
|
81
|
-
inputWrapperClassName?: string;
|
|
82
|
-
/**
|
|
83
|
-
* Дополнительный класс для лейбла
|
|
84
|
-
*/
|
|
85
|
-
labelClassName?: string;
|
|
86
|
-
/**
|
|
87
|
-
* Дополнительный класс для аддонов
|
|
88
|
-
*/
|
|
89
|
-
addonsClassName?: string;
|
|
90
|
-
/**
|
|
91
|
-
* Свойства для обертки левых аддонов
|
|
92
|
-
*/
|
|
93
|
-
leftAddonsProps?: HTMLAttributes<HTMLDivElement>;
|
|
94
|
-
/**
|
|
95
|
-
* Свойства для обертки правых аддонов
|
|
25
|
+
* Классы анимации
|
|
26
|
+
*
|
|
27
|
+
* http://reactcommunity.org/react-transition-group/css-transition#CSSTransition-prop-classNames
|
|
96
28
|
*/
|
|
97
|
-
|
|
29
|
+
transitionClassNames?: string | CSSTransitionClassNames;
|
|
98
30
|
/**
|
|
99
31
|
* Идентификатор для систем автоматизированного тестирования
|
|
100
32
|
*/
|
|
101
33
|
dataTestId?: string;
|
|
102
34
|
/**
|
|
103
|
-
*
|
|
35
|
+
* Дочерние элементы.
|
|
104
36
|
*/
|
|
105
37
|
children?: ReactNode;
|
|
106
|
-
/**
|
|
107
|
-
* Основные стили компонента.
|
|
108
|
-
*/
|
|
109
|
-
styles: {
|
|
110
|
-
[key: string]: string;
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* Стили компонента для default и inverted режима.
|
|
114
|
-
*/
|
|
115
|
-
colorStyles?: StyleColors;
|
|
116
38
|
};
|
|
117
|
-
declare const
|
|
118
|
-
|
|
119
|
-
size?: "s" | "m" | "l" | "xl" | undefined;
|
|
120
|
-
colors?: "default" | "inverted" | undefined;
|
|
121
|
-
disabled?: boolean | undefined;
|
|
122
|
-
readOnly?: boolean | undefined;
|
|
123
|
-
filled?: boolean | undefined;
|
|
124
|
-
focused?: boolean | undefined;
|
|
125
|
-
error?: ReactNode | boolean;
|
|
126
|
-
hint?: ReactNode;
|
|
127
|
-
label?: ReactNode;
|
|
128
|
-
labelView?: "inner" | "outer" | undefined;
|
|
129
|
-
leftAddons?: ReactNode;
|
|
130
|
-
rightAddons?: ReactNode;
|
|
131
|
-
bottomAddons?: ReactNode;
|
|
132
|
-
className?: string | undefined;
|
|
133
|
-
fieldClassName?: string | undefined;
|
|
134
|
-
inputWrapperClassName?: string | undefined;
|
|
135
|
-
labelClassName?: string | undefined;
|
|
136
|
-
addonsClassName?: string | undefined;
|
|
137
|
-
leftAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
|
|
138
|
-
rightAddonsProps?: React.HTMLAttributes<HTMLDivElement> | undefined;
|
|
139
|
-
dataTestId?: string | undefined;
|
|
140
|
-
children?: ReactNode;
|
|
141
|
-
styles: {
|
|
142
|
-
[key: string]: string;
|
|
143
|
-
};
|
|
144
|
-
colorStyles?: StyleColors | undefined;
|
|
145
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
146
|
-
export { StyleColors, BaseFormControlProps, BaseFormControl };
|
|
39
|
+
declare const Backdrop: React.FC<BackdropProps>;
|
|
40
|
+
export { BackdropProps, Backdrop };
|
package/modern/index.js
CHANGED
|
@@ -15,4 +15,4 @@ 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
17
|
import '@alfalab/core-components-shared/modern';
|
|
18
|
-
import './mobile.module-
|
|
18
|
+
import './mobile.module-40321fa2.js';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { CommonButtonProps } from "./typings-89f0cb07";
|
|
4
|
+
declare const ButtonMobile: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
|
+
export { ButtonMobile };
|
|
6
|
+
export type { CommonButtonProps as ButtonMobileProps } from "./typings-89f0cb07";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { SelectMobile } from "./Component.mobile-f28cbba0";
|
|
2
|
+
export { SelectModalMobile } from "./Component.modal.mobile-0f4b9bed";
|
|
3
|
+
export type { SelectMobileProps } from "./Component.mobile-f28cbba0";
|
|
4
|
+
export type { SelectModalMobileProps } from "./Component.modal.mobile-0f4b9bed";
|
|
5
|
+
export {};
|
package/modern/mobile.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: tjya */
|
|
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-
|
|
20
|
-
padding:
|
|
19
|
+
} .input-autocomplete__bottomAddonInput_1q6c4 {
|
|
20
|
+
padding: var(--gap-xs);
|
|
21
21
|
box-sizing: border-box;
|
|
22
|
-
} .input-
|
|
22
|
+
} .input-autocomplete__footer_1q6c4 {
|
|
23
23
|
display: flex
|
|
24
|
-
} .input-
|
|
24
|
+
} .input-autocomplete__footer_1q6c4 > button + button {
|
|
25
25
|
margin-left: var(--gap-m);
|
|
26
26
|
}
|
package/modern/mobile.js
CHANGED
|
@@ -11,4 +11,4 @@ import './autocomplete-mobile-field/Component.js';
|
|
|
11
11
|
import '@alfalab/core-components-form-control/modern/mobile';
|
|
12
12
|
import '@alfalab/core-components-shared/modern';
|
|
13
13
|
import '@alfalab/hooks';
|
|
14
|
-
import './mobile.module-
|
|
14
|
+
import './mobile.module-40321fa2.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const styles = {"bottomAddonInput":"input-
|
|
1
|
+
const styles = {"bottomAddonInput":"input-autocomplete__bottomAddonInput_1q6c4","footer":"input-autocomplete__footer_1q6c4"};
|
|
2
2
|
require('./mobile.css')
|
|
3
3
|
|
|
4
4
|
export { styles as s };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { BaseSelectProps, OptionProps, OptionShape } from "./typings-
|
|
3
|
+
import { BaseSelectProps, OptionProps, OptionShape } from "./typings-0f4b9bed";
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
5
5
|
type useSelectWithLoadingProps = {
|
|
6
6
|
loading?: boolean;
|
|
@@ -57,9 +57,9 @@ declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton
|
|
|
57
57
|
reset: () => void;
|
|
58
58
|
};
|
|
59
59
|
export * from "./index-ebda875c";
|
|
60
|
-
export * from "./Component-
|
|
60
|
+
export * from "./Component-0f4b9bed";
|
|
61
61
|
export { useSelectWithLoading, useLazyLoading };
|
|
62
62
|
export * from "./hook-8abfea97";
|
|
63
|
-
export * from "./typings-
|
|
64
|
-
export * from "./utils-
|
|
65
|
-
export type { AdditionalMobileProps } from "./Component.mobile-
|
|
63
|
+
export * from "./typings-0f4b9bed";
|
|
64
|
+
export * from "./utils-0f4b9bed";
|
|
65
|
+
export type { AdditionalMobileProps } from "./Component.mobile-f28cbba0";
|
|
@@ -459,6 +459,10 @@ type OptionsListProps = {
|
|
|
459
459
|
* Обработчик отмены изменений
|
|
460
460
|
*/
|
|
461
461
|
onClear?: () => void;
|
|
462
|
+
/**
|
|
463
|
+
* Указать индекс пункта для hover состояния
|
|
464
|
+
*/
|
|
465
|
+
setHighlightedIndex?: (index: number) => void;
|
|
462
466
|
};
|
|
463
467
|
type OptgroupProps = {
|
|
464
468
|
/**
|
|
@@ -69,6 +69,8 @@ type ComponentProps = {
|
|
|
69
69
|
* Дочерние элементы.
|
|
70
70
|
*/
|
|
71
71
|
children?: ReactNode;
|
|
72
|
+
};
|
|
73
|
+
type PrivateButtonProps = {
|
|
72
74
|
/**
|
|
73
75
|
* Основные стили компонента.
|
|
74
76
|
*/
|
|
@@ -80,16 +82,12 @@ type ComponentProps = {
|
|
|
80
82
|
*/
|
|
81
83
|
colorStylesMap: StyleColors;
|
|
82
84
|
};
|
|
83
|
-
type
|
|
84
|
-
type
|
|
85
|
-
type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
|
|
86
|
-
type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
87
|
-
type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
88
|
-
type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
|
|
85
|
+
type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
86
|
+
type ButtonProps = CommonButtonProps & {
|
|
89
87
|
/**
|
|
90
88
|
* Контрольная точка, с нее начинается desktop версия
|
|
91
89
|
* @default 1024
|
|
92
90
|
*/
|
|
93
91
|
breakpoint?: number;
|
|
94
92
|
};
|
|
95
|
-
export { StyleColors, ComponentProps,
|
|
93
|
+
export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
|
-
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-
|
|
2
|
+
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-0f4b9bed";
|
|
3
3
|
declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
|
|
4
4
|
declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
|
|
5
5
|
declare const joinOptions: ({ selected, selectedMultiple, }: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-input-autocomplete",
|
|
3
|
-
"version": "10.2.
|
|
3
|
+
"version": "10.2.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"react": "^16.9.0 || ^17.0.1 || ^18.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@alfalab/core-components-button": "^9.0.
|
|
38
|
-
"@alfalab/core-components-form-control": "^10.1.
|
|
39
|
-
"@alfalab/core-components-input": "^12.2.
|
|
40
|
-
"@alfalab/core-components-select": "^15.2.
|
|
41
|
-
"@alfalab/core-components-shared": "^0.
|
|
37
|
+
"@alfalab/core-components-button": "^9.0.6",
|
|
38
|
+
"@alfalab/core-components-form-control": "^10.1.1",
|
|
39
|
+
"@alfalab/core-components-input": "^12.2.1",
|
|
40
|
+
"@alfalab/core-components-select": "^15.2.1",
|
|
41
|
+
"@alfalab/core-components-shared": "^0.6.0",
|
|
42
42
|
"@alfalab/hooks": "^1.13.0",
|
|
43
43
|
"classnames": "^2.3.1",
|
|
44
44
|
"lodash.throttle": "^4.1.1",
|
package/shared-4cd3936b.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { BaseSelectProps, OptionProps, OptionShape } from "./typings-
|
|
3
|
+
import { BaseSelectProps, OptionProps, OptionShape } from "./typings-0f4b9bed";
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
5
5
|
type useSelectWithLoadingProps = {
|
|
6
6
|
loading?: boolean;
|
|
@@ -57,9 +57,9 @@ declare function useLazyLoading({ limit, initialOffset, optionsFetcher, skeleton
|
|
|
57
57
|
reset: () => void;
|
|
58
58
|
};
|
|
59
59
|
export * from "./index-ebda875c";
|
|
60
|
-
export * from "./Component-
|
|
60
|
+
export * from "./Component-0f4b9bed";
|
|
61
61
|
export { useSelectWithLoading, useLazyLoading };
|
|
62
|
-
export * from "./hook-
|
|
63
|
-
export * from "./typings-
|
|
64
|
-
export * from "./utils-
|
|
65
|
-
export type { AdditionalMobileProps } from "./Component.mobile-
|
|
62
|
+
export * from "./hook-0f4b9bed";
|
|
63
|
+
export * from "./typings-0f4b9bed";
|
|
64
|
+
export * from "./utils-0f4b9bed";
|
|
65
|
+
export type { AdditionalMobileProps } from "./Component.mobile-96988a65";
|
|
@@ -12,7 +12,10 @@ import {
|
|
|
12
12
|
|
|
13
13
|
import { AutocompleteField } from './autocomplete-field';
|
|
14
14
|
|
|
15
|
-
export type InputAutocompleteDesktopProps = Omit<
|
|
15
|
+
export type InputAutocompleteDesktopProps = Omit<
|
|
16
|
+
BaseSelectProps,
|
|
17
|
+
'Field' | 'nativeSelect' | 'searchProps' | 'showSearch' | 'Search'
|
|
18
|
+
> & {
|
|
16
19
|
/**
|
|
17
20
|
* Компонент ввода значения
|
|
18
21
|
*/
|
package/src/Component.mobile.tsx
CHANGED
|
@@ -18,7 +18,15 @@ import styles from './mobile.module.css';
|
|
|
18
18
|
|
|
19
19
|
export type InputAutocompleteMobileProps = Omit<
|
|
20
20
|
BaseSelectProps,
|
|
21
|
-
|
|
21
|
+
| 'OptionsList'
|
|
22
|
+
| 'Checkmark'
|
|
23
|
+
| 'onScroll'
|
|
24
|
+
| 'nativeSelect'
|
|
25
|
+
| 'autocomplete'
|
|
26
|
+
| 'valueRenderer'
|
|
27
|
+
| 'searchProps'
|
|
28
|
+
| 'showSearch'
|
|
29
|
+
| 'Search'
|
|
22
30
|
> & {
|
|
23
31
|
/**
|
|
24
32
|
* Обработчик выбора
|
package/src/mobile.module.css
CHANGED
|
@@ -459,6 +459,10 @@ type OptionsListProps = {
|
|
|
459
459
|
* Обработчик отмены изменений
|
|
460
460
|
*/
|
|
461
461
|
onClear?: () => void;
|
|
462
|
+
/**
|
|
463
|
+
* Указать индекс пункта для hover состояния
|
|
464
|
+
*/
|
|
465
|
+
setHighlightedIndex?: (index: number) => void;
|
|
462
466
|
};
|
|
463
467
|
type OptgroupProps = {
|
|
464
468
|
/**
|
|
@@ -69,6 +69,8 @@ type ComponentProps = {
|
|
|
69
69
|
* Дочерние элементы.
|
|
70
70
|
*/
|
|
71
71
|
children?: ReactNode;
|
|
72
|
+
};
|
|
73
|
+
type PrivateButtonProps = {
|
|
72
74
|
/**
|
|
73
75
|
* Основные стили компонента.
|
|
74
76
|
*/
|
|
@@ -80,16 +82,12 @@ type ComponentProps = {
|
|
|
80
82
|
*/
|
|
81
83
|
colorStylesMap: StyleColors;
|
|
82
84
|
};
|
|
83
|
-
type
|
|
84
|
-
type
|
|
85
|
-
type BaseButtonProps = Partial<AnchorBaseButtonProps | NativeBaseButtonProps>;
|
|
86
|
-
type AnchorButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
87
|
-
type NativeButtonProps = Omit<BaseButtonProps, 'styles' | 'colorStylesMap'> & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
88
|
-
type ButtonProps = Partial<AnchorButtonProps | NativeButtonProps> & {
|
|
85
|
+
type CommonButtonProps = ComponentProps & Partial<AnchorHTMLAttributes<HTMLAnchorElement> | ButtonHTMLAttributes<HTMLButtonElement>>;
|
|
86
|
+
type ButtonProps = CommonButtonProps & {
|
|
89
87
|
/**
|
|
90
88
|
* Контрольная точка, с нее начинается desktop версия
|
|
91
89
|
* @default 1024
|
|
92
90
|
*/
|
|
93
91
|
breakpoint?: number;
|
|
94
92
|
};
|
|
95
|
-
export { StyleColors, ComponentProps,
|
|
93
|
+
export { StyleColors, ComponentProps, PrivateButtonProps, CommonButtonProps, ButtonProps };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
|
-
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-
|
|
2
|
+
import { BaseSelectProps, GroupShape, OptionShape } from "./typings-0f4b9bed";
|
|
3
3
|
declare const isGroup: (item: OptionShape | GroupShape) => item is GroupShape;
|
|
4
4
|
declare const isOptionShape: (item: OptionShape | string | null) => item is OptionShape;
|
|
5
5
|
declare const joinOptions: ({ selected, selectedMultiple, }: {
|
|
@@ -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 };
|
|
@@ -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 };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from "react";
|
|
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,5 +0,0 @@
|
|
|
1
|
-
export { SelectMobile } from "./Component.mobile-ade26e99";
|
|
2
|
-
export { SelectModalMobile } from "./Component.modal.mobile-dd8ca091";
|
|
3
|
-
export type { SelectMobileProps } from "./Component.mobile-ade26e99";
|
|
4
|
-
export type { SelectModalMobileProps } from "./Component.modal.mobile-dd8ca091";
|
|
5
|
-
export {};
|
package/desktop-63dec22f.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from "react";
|
|
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,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 };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from "react";
|
|
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 };
|
package/esm/mobile-ade26e99.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { SelectMobile } from "./Component.mobile-ade26e99";
|
|
2
|
-
export { SelectModalMobile } from "./Component.modal.mobile-dd8ca091";
|
|
3
|
-
export type { SelectMobileProps } from "./Component.mobile-ade26e99";
|
|
4
|
-
export type { SelectModalMobileProps } from "./Component.modal.mobile-dd8ca091";
|
|
5
|
-
export {};
|
package/mobile-ade26e99.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { SelectMobile } from "./Component.mobile-ade26e99";
|
|
2
|
-
export { SelectModalMobile } from "./Component.modal.mobile-dd8ca091";
|
|
3
|
-
export type { SelectMobileProps } from "./Component.mobile-ade26e99";
|
|
4
|
-
export type { SelectModalMobileProps } from "./Component.modal.mobile-dd8ca091";
|
|
5
|
-
export {};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { BaseFormControlProps } from "./index-ebda875c";
|
|
4
|
-
type FormControlDesktopProps = Omit<BaseFormControlProps, 'styles' | 'colorStyles'>;
|
|
5
|
-
declare const FormControlDesktop: React.ForwardRefExoticComponent<FormControlDesktopProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
export { FormControlDesktopProps, FormControlDesktop };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import React from "react";
|
|
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,5 +0,0 @@
|
|
|
1
|
-
export { SelectMobile } from "./Component.mobile-ade26e99";
|
|
2
|
-
export { SelectModalMobile } from "./Component.modal.mobile-dd8ca091";
|
|
3
|
-
export type { SelectMobileProps } from "./Component.mobile-ade26e99";
|
|
4
|
-
export type { SelectModalMobileProps } from "./Component.modal.mobile-dd8ca091";
|
|
5
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|