@alfalab/core-components-input-autocomplete 10.1.6 → 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/{esm/Component-dd8ca091.d.ts → Component-0f4b9bed.d.ts} +1 -1
- package/Component-89f0cb07.d.ts +38 -0
- package/Component.desktop.d.ts +4 -4
- 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 +2 -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 +2 -1
- package/Component.responsive.d.ts +6 -6
- package/Component.responsive.js +2 -1
- package/autocomplete-field/Component.js +1 -1
- package/autocomplete-field/index.css +2 -2
- package/autocomplete-mobile-field/Component.js +3 -2
- package/autocomplete-mobile-field/index.css +8 -8
- package/autocomplete-mobile-field/index.js +1 -0
- package/cssm/{Component-dd8ca091.d.ts → Component-0f4b9bed.d.ts} +1 -1
- package/cssm/Component-89f0cb07.d.ts +38 -0
- package/cssm/Component.desktop.d.ts +4 -4
- package/{Component.mobile-ade26e99.d.ts → cssm/Component.mobile-f28cbba0.d.ts} +1 -1
- package/cssm/Component.mobile.d.ts +3 -3
- package/cssm/Component.mobile.js +1 -0
- package/cssm/{Component.modal.mobile-dd8ca091.d.ts → Component.modal.mobile-0f4b9bed.d.ts} +1 -1
- package/cssm/Component.modal.mobile.d.ts +3 -3
- package/cssm/Component.modal.mobile.js +1 -0
- package/cssm/Component.responsive.d.ts +6 -6
- package/cssm/Component.responsive.js +1 -0
- package/cssm/autocomplete-mobile-field/Component.js +2 -1
- package/cssm/autocomplete-mobile-field/index.js +1 -0
- package/cssm/desktop-89f0cb07.d.ts +6 -0
- package/cssm/hook-8abfea97.d.ts +9 -9
- package/cssm/index-c76d6398.d.ts +185 -2
- package/cssm/index-ebda875c.d.ts +10 -0
- package/cssm/index-f12ee135.d.ts +52 -3
- package/cssm/index.js +1 -0
- 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.js +1 -0
- package/cssm/mobile.module.css +1 -1
- package/cssm/shared-4cd3936b.d.ts +5 -5
- package/cssm/{types-e40becc7.d.ts → types-72dda473.d.ts} +1 -1
- package/{modern/typings-dd8ca091.d.ts → cssm/typings-0f4b9bed.d.ts} +4 -0
- package/{modern/typings-9211a437.d.ts → cssm/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/{Component-dd8ca091.d.ts → esm/Component-0f4b9bed.d.ts} +1 -1
- package/esm/Component-89f0cb07.d.ts +38 -0
- package/esm/Component.desktop.d.ts +4 -4
- package/{cssm/Component.mobile-ade26e99.d.ts → esm/Component.mobile-f28cbba0.d.ts} +1 -1
- package/esm/Component.mobile.d.ts +3 -3
- package/esm/Component.mobile.js +2 -1
- package/{Component.modal.mobile-dd8ca091.d.ts → esm/Component.modal.mobile-0f4b9bed.d.ts} +1 -1
- package/esm/Component.modal.mobile.d.ts +2 -2
- package/esm/Component.modal.mobile.js +2 -1
- package/esm/Component.responsive.d.ts +5 -5
- package/esm/Component.responsive.js +2 -1
- package/esm/autocomplete-field/Component.js +1 -1
- package/esm/autocomplete-field/index.css +2 -2
- package/esm/autocomplete-mobile-field/Component.js +3 -2
- package/esm/autocomplete-mobile-field/index.css +8 -8
- package/esm/autocomplete-mobile-field/index.js +1 -0
- package/esm/desktop-69921c40.d.ts +6 -0
- package/esm/hook-8abfea97.d.ts +9 -9
- package/esm/index-c76d6398.d.ts +185 -2
- package/esm/index-ebda875c.d.ts +10 -0
- package/esm/index-f12ee135.d.ts +52 -3
- package/esm/index.js +2 -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 +2 -1
- package/esm/{mobile.module-a93c9068.js → mobile.module-b845ad92.js} +1 -1
- package/esm/shared-4cd3936b.d.ts +5 -5
- package/esm/{types-e40becc7.d.ts → types-72dda473.d.ts} +1 -1
- package/{cssm/typings-dd8ca091.d.ts → esm/typings-0f4b9bed.d.ts} +4 -0
- package/{typings-9211a437.d.ts → esm/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} +9 -9
- package/index-c76d6398.d.ts +185 -2
- package/index-ebda875c.d.ts +18 -114
- package/index-f12ee135.d.ts +52 -3
- package/index.js +2 -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 +2 -1
- package/{mobile.module-ca86f5ea.js → mobile.module-15cb0efe.js} +1 -1
- package/modern/Component-0f4b9bed.d.ts +72 -0
- package/modern/Component-89f0cb07.d.ts +38 -0
- package/modern/Component.desktop.d.ts +4 -4
- package/modern/Component.mobile-ebda875c.d.ts +6 -0
- package/{esm/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 +2 -1
- package/{esm/Component.modal.mobile-dd8ca091.d.ts → modern/Component.modal.mobile-0f4b9bed.d.ts} +1 -1
- package/modern/Component.modal.mobile.d.ts +2 -2
- package/modern/Component.modal.mobile.js +2 -1
- package/modern/Component.responsive.d.ts +5 -5
- package/modern/Component.responsive.js +2 -1
- package/modern/autocomplete-field/Component.js +1 -1
- package/modern/autocomplete-field/index.css +2 -2
- package/modern/autocomplete-mobile-field/Component.js +3 -2
- package/modern/autocomplete-mobile-field/index.css +8 -8
- package/modern/autocomplete-mobile-field/index.js +1 -0
- package/modern/desktop-69921c40.d.ts +6 -0
- package/modern/hook-8abfea97.d.ts +9 -9
- package/modern/index-c76d6398.d.ts +185 -2
- package/modern/index-ebda875c.d.ts +18 -114
- package/modern/index-f12ee135.d.ts +52 -3
- package/modern/index.js +2 -1
- package/modern/mobile-89f0cb07.d.ts +6 -0
- package/modern/mobile-96988a65.d.ts +2 -6
- package/modern/mobile-f28cbba0.d.ts +5 -0
- package/modern/mobile.css +5 -5
- package/modern/mobile.js +2 -1
- package/modern/{mobile.module-e72a1e20.js → mobile.module-40321fa2.js} +1 -1
- package/modern/shared-4cd3936b.d.ts +5 -6
- package/modern/{types-e40becc7.d.ts → types-72dda473.d.ts} +1 -1
- package/{typings-dd8ca091.d.ts → modern/typings-0f4b9bed.d.ts} +4 -0
- package/{esm/typings-9211a437.d.ts → modern/typings-89f0cb07.d.ts} +5 -7
- package/modern/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
- package/package.json +6 -5
- package/shared-4cd3936b.d.ts +6 -6
- package/src/Component.desktop.tsx +4 -1
- package/src/Component.mobile.tsx +9 -1
- package/src/autocomplete-mobile-field/Component.tsx +2 -1
- package/src/mobile.module.css +1 -1
- package/{types-e40becc7.d.ts → types-72dda473.d.ts} +1 -1
- package/{esm/typings-dd8ca091.d.ts → typings-0f4b9bed.d.ts} +4 -0
- package/{cssm/typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
- package/{utils-dd8ca091.d.ts → utils-0f4b9bed.d.ts} +1 -1
- package/Component-72308007.d.ts +0 -276
- package/Component-72dda473.d.ts +0 -53
- package/Component.mobile-ebda875c.d.ts +0 -6
- package/component-72308007.d.ts +0 -44
- package/cssm/Component-72308007.d.ts +0 -276
- package/cssm/Component-72dda473.d.ts +0 -53
- package/cssm/Component.mobile-ebda875c.d.ts +0 -6
- package/cssm/component-72308007.d.ts +0 -44
- package/cssm/desktop-63dec22f.d.ts +0 -6
- package/cssm/index-72308007.d.ts +0 -54
- package/cssm/mobile-ade26e99.d.ts +0 -5
- package/cssm/types-83e2bd9e.d.ts +0 -113
- package/cssm/utils-49cc3c24.d.ts +0 -8
- package/desktop-63dec22f.d.ts +0 -6
- package/esm/Component-72308007.d.ts +0 -276
- package/esm/Component-72dda473.d.ts +0 -53
- package/esm/Component.mobile-ebda875c.d.ts +0 -6
- package/esm/component-72308007.d.ts +0 -44
- package/esm/desktop-63dec22f.d.ts +0 -6
- package/esm/index-72308007.d.ts +0 -54
- package/esm/mobile-ade26e99.d.ts +0 -5
- package/esm/types-83e2bd9e.d.ts +0 -113
- package/esm/utils-49cc3c24.d.ts +0 -8
- package/index-72308007.d.ts +0 -54
- package/mobile-ade26e99.d.ts +0 -5
- package/modern/Component-72308007.d.ts +0 -276
- package/modern/Component-72dda473.d.ts +0 -53
- package/modern/Component-dd8ca091.d.ts +0 -22
- package/modern/Component.desktop-ebda875c.d.ts +0 -6
- package/modern/component-72308007.d.ts +0 -44
- package/modern/desktop-63dec22f.d.ts +0 -2
- package/modern/index-72308007.d.ts +0 -54
- package/modern/mobile-ade26e99.d.ts +0 -5
- package/modern/types-83e2bd9e.d.ts +0 -113
- package/modern/utils-49cc3c24.d.ts +0 -8
- package/types-83e2bd9e.d.ts +0 -113
- package/utils-49cc3c24.d.ts +0 -8
- /package/{Component-63dec22f.d.ts → Component-69921c40.d.ts} +0 -0
- /package/{modern/Component-96988a65.d.ts → cssm/Component-511e54fa.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,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { BaseSelectProps, OptionShape } from "./typings-
|
|
2
|
+
import { BaseSelectProps, OptionShape } from "./typings-0f4b9bed";
|
|
3
3
|
type UseSelectWithApplyProps = {
|
|
4
4
|
/**
|
|
5
5
|
* Список выбранных пунктов
|
|
@@ -44,20 +44,20 @@ type UseSelectWithApplyProps = {
|
|
|
44
44
|
};
|
|
45
45
|
declare const SELECT_ALL_KEY = "select_all";
|
|
46
46
|
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, showSearch, searchProps, }: UseSelectWithApplyProps): {
|
|
47
|
-
OptionsList: import("react").ForwardRefExoticComponent<import("./typings-
|
|
47
|
+
OptionsList: import("react").ForwardRefExoticComponent<import("./typings-0f4b9bed").OptionsListProps & {
|
|
48
48
|
showClear?: boolean | undefined;
|
|
49
49
|
onClose?: (() => void) | undefined; /**
|
|
50
50
|
* Компонент выпадающего меню
|
|
51
51
|
*/
|
|
52
52
|
selectedDraft?: OptionShape[] | undefined;
|
|
53
|
-
OptionsList?: import("react").FC<import("./typings-
|
|
54
|
-
Footer?: import("react").FC<import("./Component-
|
|
53
|
+
OptionsList?: import("react").FC<import("./typings-0f4b9bed").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
54
|
+
Footer?: import("react").FC<import("./Component-0f4b9bed").FooterProps> | undefined;
|
|
55
55
|
Header?: import("react").FC<import("./Component-ebda875c").HeaderProps> | undefined;
|
|
56
56
|
headerProps?: import("./Component-ebda875c").HeaderProps | undefined;
|
|
57
57
|
showHeaderWithSelectAll?: boolean | undefined;
|
|
58
58
|
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
59
59
|
optionsListProps: {
|
|
60
|
-
OptionsList: import("react").FC<import("./typings-
|
|
60
|
+
OptionsList: import("react").FC<import("./typings-0f4b9bed").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
61
61
|
showClear: boolean;
|
|
62
62
|
onClear: () => void;
|
|
63
63
|
onApply: () => void;
|
|
@@ -72,19 +72,19 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
72
72
|
};
|
|
73
73
|
allowUnselect: boolean;
|
|
74
74
|
multiple: boolean;
|
|
75
|
-
options: (OptionShape | import("./typings-
|
|
75
|
+
options: (OptionShape | import("./typings-0f4b9bed").GroupShape | {
|
|
76
76
|
key: string;
|
|
77
77
|
content: string;
|
|
78
78
|
})[];
|
|
79
|
-
onChange: (payload: import("./typings-
|
|
79
|
+
onChange: (payload: import("./typings-0f4b9bed").BaseSelectChangePayload) => void;
|
|
80
80
|
selected: string | OptionShape | (string | OptionShape)[] | null | undefined;
|
|
81
81
|
showSearch: boolean | undefined;
|
|
82
82
|
searchProps: {
|
|
83
83
|
value: string;
|
|
84
84
|
onChange: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
85
|
-
componentProps?: import("
|
|
85
|
+
componentProps?: import("@alfalab/core-components-input").InputProps | undefined;
|
|
86
86
|
accessor?: ((option: OptionShape) => string) | undefined;
|
|
87
87
|
} | undefined;
|
|
88
88
|
};
|
|
89
|
-
export * from "./Component-
|
|
89
|
+
export * from "./Component-0f4b9bed";
|
|
90
90
|
export { UseSelectWithApplyProps, SELECT_ALL_KEY, useSelectWithApply };
|
package/index-c76d6398.d.ts
CHANGED
|
@@ -1,2 +1,185 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/* eslint-disable complexity */
|
|
3
|
+
import React from "react";
|
|
4
|
+
import { ReactNode, ButtonHTMLAttributes, ElementType, AnchorHTMLAttributes, ReactElement } from "react";
|
|
5
|
+
import { ButtonProps } from "@alfalab/core-components-button";
|
|
6
|
+
interface CloserProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
|
+
/**
|
|
8
|
+
* Вид компонента
|
|
9
|
+
*/
|
|
10
|
+
view: "desktop" | "mobile";
|
|
11
|
+
/**
|
|
12
|
+
* Дополнительный класс
|
|
13
|
+
*/
|
|
14
|
+
className?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Позиция крестика
|
|
17
|
+
*/
|
|
18
|
+
align?: "left" | "right";
|
|
19
|
+
/**
|
|
20
|
+
* Фиксирует крестик
|
|
21
|
+
*/
|
|
22
|
+
sticky?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Иконка
|
|
25
|
+
*/
|
|
26
|
+
icon?: ElementType;
|
|
27
|
+
/**
|
|
28
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
29
|
+
*/
|
|
30
|
+
dataTestId?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Коллбэк закрытия.
|
|
33
|
+
*/
|
|
34
|
+
onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
|
|
35
|
+
}
|
|
36
|
+
type NavigationBarProps = {
|
|
37
|
+
/**
|
|
38
|
+
* Контент шапки
|
|
39
|
+
*/
|
|
40
|
+
children?: ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* Заголовок шапки
|
|
43
|
+
*/
|
|
44
|
+
title?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Подзаголовок (доступен только в мобильной версии)
|
|
47
|
+
*/
|
|
48
|
+
subtitle?: ReactNode;
|
|
49
|
+
/**
|
|
50
|
+
* Размер заголовка (compact доступен только в мобильной версии)
|
|
51
|
+
*/
|
|
52
|
+
titleSize?: "default" | "compact";
|
|
53
|
+
/**
|
|
54
|
+
* Доп. класс для аддонов
|
|
55
|
+
*/
|
|
56
|
+
addonClassName?: string;
|
|
57
|
+
/**
|
|
58
|
+
* Слот слева
|
|
59
|
+
*/
|
|
60
|
+
leftAddons?: ReactNode;
|
|
61
|
+
/**
|
|
62
|
+
* Слот справа
|
|
63
|
+
*/
|
|
64
|
+
rightAddons?: ReactNode;
|
|
65
|
+
/**
|
|
66
|
+
* Дополнительный класс для closer
|
|
67
|
+
*/
|
|
68
|
+
closerClassName?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Слот снизу
|
|
71
|
+
*/
|
|
72
|
+
bottomAddons?: ReactNode;
|
|
73
|
+
/**
|
|
74
|
+
* Наличие компонента крестика
|
|
75
|
+
*/
|
|
76
|
+
hasCloser?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Наличие кнопки "Назад"
|
|
79
|
+
*/
|
|
80
|
+
hasBackButton?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Дополнительный класс для правого аддона
|
|
83
|
+
*/
|
|
84
|
+
backButtonClassName?: string;
|
|
85
|
+
/**
|
|
86
|
+
* Дополнительный класс
|
|
87
|
+
*/
|
|
88
|
+
className?: string;
|
|
89
|
+
/**
|
|
90
|
+
* Дополнительный класс для контента
|
|
91
|
+
*/
|
|
92
|
+
contentClassName?: string;
|
|
93
|
+
/**
|
|
94
|
+
* Дополнительный класс для нижнего аддона
|
|
95
|
+
*/
|
|
96
|
+
bottomAddonsClassName?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Выравнивание заголовка
|
|
99
|
+
*/
|
|
100
|
+
align?: "left" | "center";
|
|
101
|
+
/**
|
|
102
|
+
* Обрезать ли заголовок
|
|
103
|
+
*/
|
|
104
|
+
trim?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* Фиксирует шапку
|
|
107
|
+
*/
|
|
108
|
+
sticky?: boolean;
|
|
109
|
+
/**
|
|
110
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
111
|
+
*/
|
|
112
|
+
dataTestId?: string;
|
|
113
|
+
/**
|
|
114
|
+
* Фоновое изображение
|
|
115
|
+
*/
|
|
116
|
+
imageUrl?: string;
|
|
117
|
+
/**
|
|
118
|
+
* Иконка closer.
|
|
119
|
+
*/
|
|
120
|
+
closerIcon?: React.ElementType;
|
|
121
|
+
/**
|
|
122
|
+
* Обработчик закрытия
|
|
123
|
+
*/
|
|
124
|
+
onClose?: CloserProps["onClose"];
|
|
125
|
+
/**
|
|
126
|
+
* обработчик клика по кнопке "назад"
|
|
127
|
+
*/
|
|
128
|
+
onBack?: () => void;
|
|
129
|
+
/**
|
|
130
|
+
* Вид шапки - мобильный или десктоп
|
|
131
|
+
*/
|
|
132
|
+
view: "desktop" | "mobile";
|
|
133
|
+
/**
|
|
134
|
+
* Ссылка на родительскую ноду overflow: auto
|
|
135
|
+
*/
|
|
136
|
+
scrollableParentRef?: React.RefObject<HTMLDivElement>;
|
|
137
|
+
};
|
|
138
|
+
declare const NavigationBar: React.ForwardRefExoticComponent<NavigationBarProps & React.RefAttributes<HTMLDivElement>>;
|
|
139
|
+
type IconButtonProps = {
|
|
140
|
+
/**
|
|
141
|
+
* Компонент иконки
|
|
142
|
+
*/
|
|
143
|
+
icon: ElementType<{
|
|
144
|
+
className?: string;
|
|
145
|
+
}> | ReactElement;
|
|
146
|
+
/**
|
|
147
|
+
* Тип кнопки
|
|
148
|
+
*/
|
|
149
|
+
view?: "primary" | "secondary" | "transparent" | "tertiary" | "negative";
|
|
150
|
+
/**
|
|
151
|
+
* Размер компонента
|
|
152
|
+
*/
|
|
153
|
+
size?: "xxs" | "xs" | "s";
|
|
154
|
+
/**
|
|
155
|
+
* Дополнительный класс
|
|
156
|
+
*/
|
|
157
|
+
className?: string;
|
|
158
|
+
/**
|
|
159
|
+
* Выравнивание иконки
|
|
160
|
+
* @default 'center'
|
|
161
|
+
*/
|
|
162
|
+
alignIcon?: "left" | "center" | "right";
|
|
163
|
+
/**
|
|
164
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
165
|
+
*/
|
|
166
|
+
dataTestId?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Набор цветов для компонента
|
|
169
|
+
*/
|
|
170
|
+
colors?: "default" | "inverted";
|
|
171
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "Component" | "href" | "loading" | "breakpoint"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
|
|
172
|
+
declare const IconButton: React.ForwardRefExoticComponent<{
|
|
173
|
+
icon: ElementType<{
|
|
174
|
+
className?: string;
|
|
175
|
+
}> | ReactElement;
|
|
176
|
+
view?: "primary" | "secondary" | "tertiary" | "negative" | "transparent" | undefined;
|
|
177
|
+
size?: "xs" | "s" | "xxs" | undefined;
|
|
178
|
+
className?: string | undefined;
|
|
179
|
+
alignIcon?: "center" | "right" | "left" | undefined;
|
|
180
|
+
dataTestId?: string | undefined;
|
|
181
|
+
colors?: "default" | "inverted" | undefined;
|
|
182
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "Component" | "loading" | "breakpoint"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "download" | "target"> & React.RefAttributes<HTMLButtonElement>>;
|
|
183
|
+
export { NavigationBar, IconButtonProps, IconButton };
|
|
184
|
+
export * from "./Component-69921c40";
|
|
185
|
+
export type { NavigationBarProps };
|
package/index-ebda875c.d.ts
CHANGED
|
@@ -1,136 +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;
|
|
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> & {
|
|
54
8
|
/**
|
|
55
|
-
*
|
|
9
|
+
* Прозрачный бэкдроп
|
|
56
10
|
*/
|
|
57
|
-
|
|
11
|
+
invisible?: boolean;
|
|
58
12
|
/**
|
|
59
|
-
*
|
|
13
|
+
* Управляет видимостью компонента
|
|
60
14
|
*/
|
|
61
|
-
|
|
15
|
+
open: boolean;
|
|
62
16
|
/**
|
|
63
|
-
*
|
|
17
|
+
* Обработчик клика по бэкдропу
|
|
64
18
|
*/
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Слот под полем
|
|
68
|
-
*/
|
|
69
|
-
bottomAddons?: ReactNode;
|
|
19
|
+
onClose?: (event: MouseEvent<HTMLElement>) => void;
|
|
70
20
|
/**
|
|
71
21
|
* Дополнительный класс
|
|
72
22
|
*/
|
|
73
23
|
className?: string;
|
|
74
24
|
/**
|
|
75
|
-
*
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Дополнительный класс для поля
|
|
25
|
+
* Классы анимации
|
|
26
|
+
*
|
|
27
|
+
* http://reactcommunity.org/react-transition-group/css-transition#CSSTransition-prop-classNames
|
|
80
28
|
*/
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Дополнительный класс для лейбла
|
|
84
|
-
*/
|
|
85
|
-
labelClassName?: string;
|
|
86
|
-
/**
|
|
87
|
-
* Дополнительный класс для аддонов
|
|
88
|
-
*/
|
|
89
|
-
addonsClassName?: string;
|
|
29
|
+
transitionClassNames?: string | CSSTransitionClassNames;
|
|
90
30
|
/**
|
|
91
31
|
* Идентификатор для систем автоматизированного тестирования
|
|
92
32
|
*/
|
|
93
33
|
dataTestId?: string;
|
|
94
34
|
/**
|
|
95
|
-
*
|
|
35
|
+
* Дочерние элементы.
|
|
96
36
|
*/
|
|
97
37
|
children?: ReactNode;
|
|
98
|
-
/**
|
|
99
|
-
* Основные стили компонента.
|
|
100
|
-
*/
|
|
101
|
-
styles: {
|
|
102
|
-
[key: string]: string;
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Стили компонента для default и inverted режима.
|
|
106
|
-
*/
|
|
107
|
-
colorStyles?: StyleColors;
|
|
108
38
|
};
|
|
109
|
-
declare const
|
|
110
|
-
|
|
111
|
-
size?: "s" | "m" | "l" | "xl" | undefined;
|
|
112
|
-
colors?: "default" | "inverted" | undefined;
|
|
113
|
-
disabled?: boolean | undefined;
|
|
114
|
-
readOnly?: boolean | undefined;
|
|
115
|
-
filled?: boolean | undefined;
|
|
116
|
-
focused?: boolean | undefined;
|
|
117
|
-
error?: ReactNode | boolean;
|
|
118
|
-
hint?: ReactNode;
|
|
119
|
-
label?: ReactNode;
|
|
120
|
-
labelView?: "inner" | "outer" | undefined;
|
|
121
|
-
leftAddons?: ReactNode;
|
|
122
|
-
rightAddons?: ReactNode;
|
|
123
|
-
bottomAddons?: ReactNode;
|
|
124
|
-
className?: string | undefined;
|
|
125
|
-
fieldClassName?: string | undefined;
|
|
126
|
-
inputWrapperClassName?: string | undefined;
|
|
127
|
-
labelClassName?: string | undefined;
|
|
128
|
-
addonsClassName?: string | undefined;
|
|
129
|
-
dataTestId?: string | undefined;
|
|
130
|
-
children?: ReactNode;
|
|
131
|
-
styles: {
|
|
132
|
-
[key: string]: string;
|
|
133
|
-
};
|
|
134
|
-
colorStyles?: StyleColors | undefined;
|
|
135
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
136
|
-
export { StyleColors, BaseFormControlProps, BaseFormControl };
|
|
39
|
+
declare const Backdrop: React.FC<BackdropProps>;
|
|
40
|
+
export { BackdropProps, Backdrop };
|
package/index-f12ee135.d.ts
CHANGED
|
@@ -1,3 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { FC, ReactNode, RefObject } from "react";
|
|
4
|
+
import { BottomSheetProps } from "./types-72dda473";
|
|
5
|
+
import { NavigationBarProps } from "./index-c76d6398";
|
|
6
|
+
import { SwipeableHandlers } from "react-swipeable";
|
|
7
|
+
import { BackdropProps } from "./index-ebda875c";
|
|
8
|
+
declare const BottomSheet: React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const TIMEOUT = 500;
|
|
10
|
+
declare const SWIPE_VELOCITY = 0.4;
|
|
11
|
+
declare const MARKER_HEIGHT = 24;
|
|
12
|
+
declare const CLOSE_OFFSET = 0.2;
|
|
13
|
+
declare const SCROLL_OFFSET = 1;
|
|
14
|
+
declare const HEADER_OFFSET = 24;
|
|
15
|
+
declare const convertPercentToNumber: (value: string | number, fullHeight: number, headerOffset?: number) => number;
|
|
16
|
+
type FooterProps = {
|
|
17
|
+
/**
|
|
18
|
+
* Контент футера
|
|
19
|
+
*/
|
|
20
|
+
children?: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Фиксирует футер
|
|
23
|
+
*/
|
|
24
|
+
sticky?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Дополнительный класс
|
|
27
|
+
*/
|
|
28
|
+
className?: string;
|
|
29
|
+
};
|
|
30
|
+
declare const Footer: FC<FooterProps>;
|
|
31
|
+
type HeaderProps = Omit<NavigationBarProps, "view" | "size"> & {
|
|
32
|
+
headerRef: RefObject<HTMLDivElement>;
|
|
33
|
+
headerOffset: number;
|
|
34
|
+
};
|
|
35
|
+
declare const Header: FC<HeaderProps>;
|
|
36
|
+
type SwipeableBackdropProps = BackdropProps & {
|
|
37
|
+
/**
|
|
38
|
+
* Прозрачность бэкдропа
|
|
39
|
+
*/
|
|
40
|
+
opacity?: number;
|
|
41
|
+
/**
|
|
42
|
+
* Обработчики свайпа
|
|
43
|
+
*/
|
|
44
|
+
handlers?: SwipeableHandlers;
|
|
45
|
+
/**
|
|
46
|
+
* Время анимации opacity
|
|
47
|
+
*/
|
|
48
|
+
opacityTimeout?: number;
|
|
49
|
+
};
|
|
50
|
+
declare const SwipeableBackdrop: FC<SwipeableBackdropProps>;
|
|
51
|
+
export { BottomSheet, TIMEOUT, SWIPE_VELOCITY, MARKER_HEIGHT, CLOSE_OFFSET, SCROLL_OFFSET, HEADER_OFFSET, convertPercentToNumber, FooterProps, Footer, HeaderProps, Header, SwipeableBackdropProps, SwipeableBackdrop };
|
|
52
|
+
export type { BottomSheetProps, BottomSheetTitleAlign } from "./types-72dda473";
|
package/index.js
CHANGED
|
@@ -19,7 +19,8 @@ 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('
|
|
22
|
+
require('@alfalab/core-components-shared');
|
|
23
|
+
require('./mobile.module-15cb0efe.js');
|
|
23
24
|
|
|
24
25
|
|
|
25
26
|
|
|
@@ -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";
|
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 };
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { SelectMobile } from "./Component.mobile-96988a65";
|
|
2
|
+
export { SelectModalMobile } from "./Component.modal.mobile-96988a65";
|
|
3
|
+
export type { SelectMobileProps } from "./Component.mobile-96988a65";
|
|
4
|
+
export type { SelectModalMobileProps } from "./Component.modal.mobile-96988a65";
|
|
5
|
+
export {};
|
package/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/mobile.js
CHANGED
|
@@ -14,8 +14,9 @@ require('@alfalab/core-components-input');
|
|
|
14
14
|
require('@alfalab/core-components-select/mobile');
|
|
15
15
|
require('./autocomplete-mobile-field/Component.js');
|
|
16
16
|
require('@alfalab/core-components-form-control/mobile');
|
|
17
|
+
require('@alfalab/core-components-shared');
|
|
17
18
|
require('@alfalab/hooks');
|
|
18
|
-
require('./mobile.module-
|
|
19
|
+
require('./mobile.module-15cb0efe.js');
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var styles = {"bottomAddonInput":"input-
|
|
3
|
+
var styles = {"bottomAddonInput":"input-autocomplete__bottomAddonInput_1q6c4","footer":"input-autocomplete__footer_1q6c4"};
|
|
4
4
|
require('./mobile.css')
|
|
5
5
|
|
|
6
6
|
exports.styles = styles;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import { BottomSheetProps } from "./index-f12ee135";
|
|
5
|
+
import { BaseSelectProps } from "./typings-0f4b9bed";
|
|
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 };
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { FC } from "react";
|
|
4
|
+
import { CommonButtonProps, PrivateButtonProps } from "./typings-89f0cb07";
|
|
5
|
+
type SpinnerProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Управление видимостью компонента
|
|
8
|
+
*/
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* Размер компонента
|
|
12
|
+
*/
|
|
13
|
+
size?: "xs" | "s" | "m";
|
|
14
|
+
/**
|
|
15
|
+
* Дополнительный класс
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Идентификатор компонента в DOM
|
|
20
|
+
*/
|
|
21
|
+
id?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
24
|
+
*/
|
|
25
|
+
dataTestId?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Палитра, в контексте которой используется спиннер
|
|
28
|
+
*/
|
|
29
|
+
colors?: "default" | "inverted";
|
|
30
|
+
};
|
|
31
|
+
declare const Spinner: FC<SpinnerProps>;
|
|
32
|
+
/**
|
|
33
|
+
* Минимальное время отображения лоадера - 500мс,
|
|
34
|
+
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
35
|
+
*/
|
|
36
|
+
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
37
|
+
declare const BaseButton: React.ForwardRefExoticComponent<(CommonButtonProps & PrivateButtonProps) & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
38
|
+
export { SpinnerProps, Spinner, LOADER_MIN_DISPLAY_INTERVAL, BaseButton };
|