@alfalab/core-components-select 13.2.14 → 13.2.15
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-1481ef6b.d.ts → Component-001db41f.d.ts} +2 -1
- package/{Component-5eb2f57b.js → Component-001db41f.js} +4 -2
- package/Component-3885b0d7.d.ts +169 -0
- package/Component-71240601.d.ts +142 -0
- package/{Component-56295912.js → Component-71240601.js} +4 -4
- package/Component.js +1 -1
- package/Component.responsive.js +3 -3
- package/components/arrow/Component.js +1 -1
- package/components/arrow/index.css +3 -3
- package/components/base-checkmark/Component.js +1 -1
- package/components/base-checkmark/index.css +4 -4
- package/components/base-option/Component.js +1 -1
- package/components/base-option/index.css +13 -13
- package/components/base-select/Component.js +1 -1
- package/components/base-select/index.css +7 -7
- package/components/base-select/index.d.ts +1 -1
- package/components/base-select/index.js +1 -1
- package/components/base-select-mobile/Component.js +3 -3
- package/components/base-select-mobile/checkmark/Component.js +1 -1
- package/components/base-select-mobile/checkmark/index.css +6 -6
- package/components/base-select-mobile/index.css +11 -11
- package/components/base-select-mobile/index.d.ts +1 -1
- package/components/base-select-mobile/index.js +3 -3
- package/components/base-select-mobile/options-list/Component.js +1 -1
- package/components/base-select-mobile/options-list/index.css +9 -9
- package/components/base-select-mobile/virtual-options-list/Component.js +1 -1
- package/components/base-select-mobile/virtual-options-list/index.css +15 -15
- package/components/checkmark/Component.js +1 -1
- package/components/checkmark/index.css +10 -10
- package/components/field/Component.js +1 -1
- package/components/field/index.css +9 -9
- package/components/index.js +3 -3
- package/components/optgroup/Component.js +1 -1
- package/components/optgroup/index.css +6 -6
- package/components/option/Component.js +1 -1
- package/components/option/index.css +20 -20
- package/components/options-list/Component.js +1 -1
- package/components/options-list/index.css +6 -6
- package/components/select-mobile/Component.js +3 -3
- package/components/select-mobile/index.d.ts +1 -1
- package/components/select-mobile/index.js +3 -3
- package/components/select-modal-mobile/Component.js +3 -3
- package/components/select-modal-mobile/index.d.ts +1 -1
- package/components/select-modal-mobile/index.js +3 -3
- package/components/virtual-options-list/Component.js +1 -1
- package/components/virtual-options-list/index.css +12 -12
- package/cssm/Component-3885b0d7.d.ts +169 -0
- package/{esm/Component-105eafca.d.ts → cssm/Component-aaa9f3a7.d.ts} +2 -1
- package/cssm/{Component-1481ef6b.js → Component-aaa9f3a7.js} +3 -1
- package/cssm/Component-e9709f88.d.ts +142 -0
- package/cssm/{Component-8f0723b4.js → Component-e9709f88.js} +1 -1
- package/cssm/Component.js +1 -1
- package/cssm/Component.responsive.js +2 -2
- package/cssm/components/base-select/Component.js +1 -1
- package/cssm/components/base-select/index.d.ts +1 -1
- package/cssm/components/base-select/index.js +1 -1
- package/cssm/components/base-select-mobile/Component.js +2 -2
- package/cssm/components/base-select-mobile/index.d.ts +1 -1
- package/cssm/components/base-select-mobile/index.js +2 -2
- package/cssm/components/index.js +2 -2
- package/cssm/components/select-mobile/Component.js +2 -2
- package/cssm/components/select-mobile/index.d.ts +1 -1
- package/cssm/components/select-mobile/index.js +2 -2
- package/cssm/components/select-modal-mobile/Component.js +2 -2
- package/cssm/components/select-modal-mobile/index.d.ts +1 -1
- package/cssm/components/select-modal-mobile/index.js +2 -2
- package/cssm/{index-3fe0d3e6.d.ts → index-3885b0d7.d.ts} +1 -1
- package/cssm/index-ebda875c.d.ts +74 -0
- package/cssm/index.js +2 -2
- package/cssm/presets/index.js +2 -2
- package/cssm/presets/useLazyLoading/hook.js +2 -2
- package/cssm/presets/useSelectWithApply/hook.js +2 -2
- package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +2 -2
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +2 -2
- package/cssm/responsive.js +2 -2
- package/cssm/types-ebda875c.d.ts +113 -0
- package/cssm/typings.d.ts +5 -5
- package/esm/Component-0a180244.d.ts +142 -0
- package/esm/{Component-3d9b84ce.js → Component-0a180244.js} +4 -4
- package/esm/Component-3885b0d7.d.ts +169 -0
- package/{Component-5eb2f57b.d.ts → esm/Component-4bb3c303.d.ts} +2 -1
- package/esm/{Component-105eafca.js → Component-4bb3c303.js} +4 -2
- package/esm/Component.js +1 -1
- package/esm/Component.responsive.js +3 -3
- package/esm/components/arrow/Component.js +1 -1
- package/esm/components/arrow/index.css +3 -3
- package/esm/components/base-checkmark/Component.js +1 -1
- package/esm/components/base-checkmark/index.css +4 -4
- package/esm/components/base-option/Component.js +1 -1
- package/esm/components/base-option/index.css +13 -13
- package/esm/components/base-select/Component.js +1 -1
- package/esm/components/base-select/index.css +7 -7
- package/esm/components/base-select/index.d.ts +1 -1
- package/esm/components/base-select/index.js +1 -1
- package/esm/components/base-select-mobile/Component.js +3 -3
- package/esm/components/base-select-mobile/checkmark/Component.js +1 -1
- package/esm/components/base-select-mobile/checkmark/index.css +6 -6
- package/esm/components/base-select-mobile/index.css +11 -11
- package/esm/components/base-select-mobile/index.d.ts +1 -1
- package/esm/components/base-select-mobile/index.js +3 -3
- package/esm/components/base-select-mobile/options-list/Component.js +1 -1
- package/esm/components/base-select-mobile/options-list/index.css +9 -9
- package/esm/components/base-select-mobile/virtual-options-list/Component.js +1 -1
- package/esm/components/base-select-mobile/virtual-options-list/index.css +15 -15
- package/esm/components/checkmark/Component.js +1 -1
- package/esm/components/checkmark/index.css +10 -10
- package/esm/components/field/Component.js +1 -1
- package/esm/components/field/index.css +9 -9
- package/esm/components/index.js +3 -3
- package/esm/components/optgroup/Component.js +1 -1
- package/esm/components/optgroup/index.css +6 -6
- package/esm/components/option/Component.js +1 -1
- package/esm/components/option/index.css +20 -20
- package/esm/components/options-list/Component.js +1 -1
- package/esm/components/options-list/index.css +6 -6
- package/esm/components/select-mobile/Component.js +3 -3
- package/esm/components/select-mobile/index.d.ts +1 -1
- package/esm/components/select-mobile/index.js +3 -3
- package/esm/components/select-modal-mobile/Component.js +3 -3
- package/esm/components/select-modal-mobile/index.d.ts +1 -1
- package/esm/components/select-modal-mobile/index.js +3 -3
- package/esm/components/virtual-options-list/Component.js +1 -1
- package/esm/components/virtual-options-list/index.css +12 -12
- package/esm/{index-3fe0d3e6.d.ts → index-3885b0d7.d.ts} +1 -1
- package/esm/index-ebda875c.d.ts +74 -0
- package/esm/index.js +3 -3
- package/esm/presets/index.js +3 -3
- package/esm/presets/useLazyLoading/hook.js +4 -4
- package/esm/presets/useLazyLoading/index.css +2 -2
- package/esm/presets/useSelectWithApply/hook.js +3 -3
- package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +3 -3
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.css +4 -4
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +3 -3
- package/esm/presets/useSelectWithLoading/hook.js +1 -1
- package/esm/presets/useSelectWithLoading/index.css +2 -2
- package/esm/responsive.js +3 -3
- package/esm/types-ebda875c.d.ts +113 -0
- package/esm/typings.d.ts +5 -5
- package/{index-3fe0d3e6.d.ts → index-3885b0d7.d.ts} +1 -1
- package/index-ebda875c.d.ts +74 -0
- package/index.js +3 -3
- package/modern/Component-3885b0d7.d.ts +169 -0
- package/modern/{Component-a6757057.d.ts → Component-77e84ddc.d.ts} +2 -1
- package/modern/{Component-a6757057.js → Component-77e84ddc.js} +4 -2
- package/modern/Component-d9a7d67e.d.ts +142 -0
- package/modern/{Component-20680737.js → Component-d9a7d67e.js} +4 -4
- package/modern/Component.js +1 -1
- package/modern/Component.responsive.js +3 -3
- package/modern/components/arrow/Component.js +1 -1
- package/modern/components/arrow/index.css +3 -3
- package/modern/components/base-checkmark/Component.js +1 -1
- package/modern/components/base-checkmark/index.css +4 -4
- package/modern/components/base-option/Component.js +1 -1
- package/modern/components/base-option/index.css +13 -13
- package/modern/components/base-select/Component.js +1 -1
- package/modern/components/base-select/index.css +7 -7
- package/modern/components/base-select/index.d.ts +1 -1
- package/modern/components/base-select/index.js +1 -1
- package/modern/components/base-select-mobile/Component.js +3 -3
- package/modern/components/base-select-mobile/checkmark/Component.js +1 -1
- package/modern/components/base-select-mobile/checkmark/index.css +6 -6
- package/modern/components/base-select-mobile/index.css +11 -11
- package/modern/components/base-select-mobile/index.d.ts +1 -1
- package/modern/components/base-select-mobile/index.js +3 -3
- package/modern/components/base-select-mobile/options-list/Component.js +1 -1
- package/modern/components/base-select-mobile/options-list/index.css +9 -9
- package/modern/components/base-select-mobile/virtual-options-list/Component.js +1 -1
- package/modern/components/base-select-mobile/virtual-options-list/index.css +15 -15
- package/modern/components/checkmark/Component.js +1 -1
- package/modern/components/checkmark/index.css +10 -10
- package/modern/components/field/Component.js +1 -1
- package/modern/components/field/index.css +9 -9
- package/modern/components/index.js +3 -3
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +6 -6
- package/modern/components/option/Component.js +1 -1
- package/modern/components/option/index.css +20 -20
- package/modern/components/options-list/Component.js +1 -1
- package/modern/components/options-list/index.css +6 -6
- package/modern/components/select-mobile/Component.js +3 -3
- package/modern/components/select-mobile/index.d.ts +1 -1
- package/modern/components/select-mobile/index.js +3 -3
- package/modern/components/select-modal-mobile/Component.js +3 -3
- package/modern/components/select-modal-mobile/index.d.ts +1 -1
- package/modern/components/select-modal-mobile/index.js +3 -3
- package/modern/components/virtual-options-list/Component.js +1 -1
- package/modern/components/virtual-options-list/index.css +12 -12
- package/modern/{index-3fe0d3e6.d.ts → index-3885b0d7.d.ts} +1 -1
- package/modern/index-ebda875c.d.ts +74 -0
- package/modern/index.js +3 -3
- package/modern/presets/index.js +3 -3
- package/modern/presets/useLazyLoading/hook.js +4 -4
- package/modern/presets/useLazyLoading/index.css +2 -2
- package/modern/presets/useSelectWithApply/hook.js +3 -3
- package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +3 -3
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.css +4 -4
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +3 -3
- package/modern/presets/useSelectWithLoading/hook.js +1 -1
- package/modern/presets/useSelectWithLoading/index.css +2 -2
- package/modern/responsive.js +3 -3
- package/modern/types-ebda875c.d.ts +113 -0
- package/modern/typings.d.ts +5 -5
- package/package.json +3 -3
- package/presets/index.js +3 -3
- package/presets/useLazyLoading/hook.js +4 -4
- package/presets/useLazyLoading/index.css +2 -2
- package/presets/useSelectWithApply/hook.js +3 -3
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +3 -3
- package/presets/useSelectWithApply/options-list-with-apply/index.css +4 -4
- package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/index.js +3 -3
- package/presets/useSelectWithLoading/hook.js +1 -1
- package/presets/useSelectWithLoading/index.css +2 -2
- package/responsive.js +3 -3
- package/types-ebda875c.d.ts +113 -0
- package/typings.d.ts +5 -5
- package/Component-56295912.d.ts +0 -475
- package/cssm/Component-8f0723b4.d.ts +0 -475
- package/cssm/getDataTestId-3fe0d3e6.d.ts +0 -2
- package/esm/Component-3d9b84ce.d.ts +0 -475
- package/esm/getDataTestId-3fe0d3e6.d.ts +0 -2
- package/getDataTestId-3fe0d3e6.d.ts +0 -2
- package/modern/Component-20680737.d.ts +0 -475
- package/modern/getDataTestId-3fe0d3e6.d.ts +0 -2
- /package/esm/{intersection-observer-9c4df9c1.d.ts → intersection-observer-6d12bd0a.d.ts} +0 -0
- /package/esm/{intersection-observer-9c4df9c1.js → intersection-observer-6d12bd0a.js} +0 -0
- /package/{intersection-observer-562b226a.d.ts → intersection-observer-dd747820.d.ts} +0 -0
- /package/{intersection-observer-562b226a.js → intersection-observer-dd747820.js} +0 -0
- /package/modern/{intersection-observer-9c4df9c1.d.ts → intersection-observer-6d12bd0a.d.ts} +0 -0
- /package/modern/{intersection-observer-9c4df9c1.js → intersection-observer-6d12bd0a.js} +0 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ButtonHTMLAttributes, ElementType, FC, AnchorHTMLAttributes } from "react";
|
|
4
|
+
import { ButtonProps } from "@alfalab/core-components-button";
|
|
5
|
+
interface CloserProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
/**
|
|
7
|
+
* Вид компонента
|
|
8
|
+
*/
|
|
9
|
+
view: "desktop" | "mobile";
|
|
10
|
+
/**
|
|
11
|
+
* Дополнительный класс
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Позиция крестика
|
|
16
|
+
*/
|
|
17
|
+
align?: "left" | "right";
|
|
18
|
+
/**
|
|
19
|
+
* Фиксирует крестик
|
|
20
|
+
*/
|
|
21
|
+
sticky?: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Иконка
|
|
24
|
+
*/
|
|
25
|
+
icon?: ElementType;
|
|
26
|
+
/**
|
|
27
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
28
|
+
*/
|
|
29
|
+
dataTestId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Коллбэк закрытия.
|
|
32
|
+
*/
|
|
33
|
+
onClose?: (event: React.MouseEvent<HTMLElement> | React.KeyboardEvent<HTMLElement>, reason?: "backdropClick" | "escapeKeyDown" | "closerClick") => void;
|
|
34
|
+
}
|
|
35
|
+
declare const Closer: FC<CloserProps>;
|
|
36
|
+
type IconButtonProps = {
|
|
37
|
+
/**
|
|
38
|
+
* Компонент иконки
|
|
39
|
+
*/
|
|
40
|
+
icon: ElementType<{
|
|
41
|
+
className?: string;
|
|
42
|
+
}>;
|
|
43
|
+
/**
|
|
44
|
+
* Тип кнопки
|
|
45
|
+
*/
|
|
46
|
+
view?: "primary" | "secondary" | "transparent" | "tertiary" | "negative";
|
|
47
|
+
/**
|
|
48
|
+
* Размер компонента
|
|
49
|
+
*/
|
|
50
|
+
size?: "xxs" | "xs" | "s";
|
|
51
|
+
/**
|
|
52
|
+
* Дополнительный класс
|
|
53
|
+
*/
|
|
54
|
+
className?: string;
|
|
55
|
+
/**
|
|
56
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
57
|
+
*/
|
|
58
|
+
dataTestId?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Набор цветов для компонента
|
|
61
|
+
*/
|
|
62
|
+
colors?: "default" | "inverted";
|
|
63
|
+
} & Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "loading"> & Pick<AnchorHTMLAttributes<HTMLAnchorElement>, "target" | "download">;
|
|
64
|
+
declare const IconButton: React.ForwardRefExoticComponent<{
|
|
65
|
+
icon: ElementType<{
|
|
66
|
+
className?: string;
|
|
67
|
+
}>;
|
|
68
|
+
view?: "negative" | "tertiary" | "secondary" | "primary" | "transparent" | undefined;
|
|
69
|
+
size?: "s" | "xs" | "xxs" | undefined;
|
|
70
|
+
className?: string | undefined;
|
|
71
|
+
dataTestId?: string | undefined;
|
|
72
|
+
colors?: "default" | "inverted" | undefined;
|
|
73
|
+
} & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "size"> & Pick<ButtonProps, "href" | "loading"> & Pick<React.AnchorHTMLAttributes<HTMLAnchorElement>, "download" | "target"> & React.RefAttributes<HTMLButtonElement>>;
|
|
74
|
+
export { CloserProps, Closer, IconButtonProps, IconButton };
|
package/cssm/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var Component = require('./Component.js');
|
|
4
4
|
var components_arrow_Component = require('./components/arrow/Component.js');
|
|
5
|
-
var components_baseSelect_Component = require('./Component-
|
|
6
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('./Component-
|
|
5
|
+
var components_baseSelect_Component = require('./Component-aaa9f3a7.js');
|
|
6
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('./Component-e9709f88.js');
|
|
7
7
|
var components_field_Component = require('./components/field/Component.js');
|
|
8
8
|
var components_optgroup_Component = require('./components/optgroup/Component.js');
|
|
9
9
|
var components_option_Component = require('./components/option/Component.js');
|
package/cssm/presets/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var presets_useSelectWithLoading_hook = require('./useSelectWithLoading/hook.js');
|
|
4
4
|
var presets_useLazyLoading_hook = require('./useLazyLoading/hook.js');
|
|
5
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../Component-
|
|
5
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../Component-e9709f88.js');
|
|
6
6
|
require('tslib');
|
|
7
7
|
require('react');
|
|
8
8
|
require('@alfalab/core-components-skeleton/cssm');
|
|
@@ -28,7 +28,7 @@ require('downshift');
|
|
|
28
28
|
require('@alfalab/core-components-bottom-sheet/cssm');
|
|
29
29
|
require('@alfalab/core-components-modal/cssm/mobile');
|
|
30
30
|
require('../Component.js');
|
|
31
|
-
require('../Component-
|
|
31
|
+
require('../Component-aaa9f3a7.js');
|
|
32
32
|
require('@juggle/resize-observer');
|
|
33
33
|
require('@alfalab/core-components-popover/cssm');
|
|
34
34
|
require('@alfalab/hooks');
|
|
@@ -122,8 +122,8 @@ function useLazyLoading(_a) {
|
|
|
122
122
|
* Таким образом, загрузка следующей "страницы" начнется когда юзер доскроллит список
|
|
123
123
|
* до верхнего края последней опции, что обеспечивает плавность
|
|
124
124
|
*/
|
|
125
|
-
var
|
|
126
|
-
var lastOption =
|
|
125
|
+
var optionList = (_a = listRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll('[role="option"]');
|
|
126
|
+
var lastOption = optionList === null || optionList === void 0 ? void 0 : optionList[optionList.length - 1];
|
|
127
127
|
if (lastOption) {
|
|
128
128
|
observer.observe(lastOption);
|
|
129
129
|
}
|
|
@@ -6,8 +6,8 @@ require('../../Component.js');
|
|
|
6
6
|
require('classnames');
|
|
7
7
|
require('@alfalab/icons-glyph/ChevronDownMIcon');
|
|
8
8
|
require('../../components/arrow/index.module.css');
|
|
9
|
-
require('../../Component-
|
|
10
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../Component-
|
|
9
|
+
require('../../Component-aaa9f3a7.js');
|
|
10
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../Component-e9709f88.js');
|
|
11
11
|
require('@alfalab/core-components-form-control/cssm');
|
|
12
12
|
require('@alfalab/hooks');
|
|
13
13
|
require('../../utils.js');
|
|
@@ -6,8 +6,8 @@ require('classnames');
|
|
|
6
6
|
require('@alfalab/core-components-button/cssm');
|
|
7
7
|
require('@alfalab/icons-glyph/ChevronDownMIcon');
|
|
8
8
|
require('../../../components/arrow/index.module.css');
|
|
9
|
-
require('../../../Component-
|
|
10
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../Component-
|
|
9
|
+
require('../../../Component-aaa9f3a7.js');
|
|
10
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../Component-e9709f88.js');
|
|
11
11
|
require('@alfalab/core-components-form-control/cssm');
|
|
12
12
|
require('@alfalab/hooks');
|
|
13
13
|
require('../../../components/field/index.module.css');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../Component-
|
|
1
|
+
export * from "../../../Component-e9709f88";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../Component-
|
|
3
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../../../Component-e9709f88.js');
|
|
4
4
|
require('tslib');
|
|
5
5
|
require('react');
|
|
6
6
|
require('../../../components/arrow/Component.js');
|
|
@@ -12,7 +12,7 @@ require('downshift');
|
|
|
12
12
|
require('@alfalab/core-components-bottom-sheet/cssm');
|
|
13
13
|
require('@alfalab/core-components-modal/cssm/mobile');
|
|
14
14
|
require('../../../Component.js');
|
|
15
|
-
require('../../../Component-
|
|
15
|
+
require('../../../Component-aaa9f3a7.js');
|
|
16
16
|
require('@juggle/resize-observer');
|
|
17
17
|
require('@alfalab/core-components-popover/cssm');
|
|
18
18
|
require('@alfalab/hooks');
|
package/cssm/responsive.js
CHANGED
|
@@ -9,7 +9,7 @@ require('./components/arrow/Component.js');
|
|
|
9
9
|
require('classnames');
|
|
10
10
|
require('@alfalab/icons-glyph/ChevronDownMIcon');
|
|
11
11
|
require('./components/arrow/index.module.css');
|
|
12
|
-
require('./Component-
|
|
12
|
+
require('./Component-aaa9f3a7.js');
|
|
13
13
|
require('react-merge-refs');
|
|
14
14
|
require('@juggle/resize-observer');
|
|
15
15
|
require('downshift');
|
|
@@ -35,7 +35,7 @@ require('./components/option/index.module.css');
|
|
|
35
35
|
require('./components/options-list/Component.js');
|
|
36
36
|
require('@alfalab/core-components-scrollbar/cssm');
|
|
37
37
|
require('./components/options-list/index.module.css');
|
|
38
|
-
require('./Component-
|
|
38
|
+
require('./Component-e9709f88.js');
|
|
39
39
|
require('@alfalab/core-components-bottom-sheet/cssm');
|
|
40
40
|
require('@alfalab/core-components-modal/cssm/mobile');
|
|
41
41
|
require('react-virtual');
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import { CloserProps } from "./index-ebda875c";
|
|
5
|
+
type NavigationBarProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Контент шапки
|
|
8
|
+
*/
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Заголовок шапки
|
|
12
|
+
*/
|
|
13
|
+
title?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Подзаголовок (доступен только в мобильной версии)
|
|
16
|
+
*/
|
|
17
|
+
subtitle?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Размер заголовка (compact доступен только в мобильной версии)
|
|
20
|
+
*/
|
|
21
|
+
titleSize?: 'default' | 'compact';
|
|
22
|
+
/**
|
|
23
|
+
* Доп. класс для аддонов
|
|
24
|
+
*/
|
|
25
|
+
addonClassName?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Слот слева
|
|
28
|
+
*/
|
|
29
|
+
leftAddons?: ReactNode;
|
|
30
|
+
/**
|
|
31
|
+
* Слот справа
|
|
32
|
+
*/
|
|
33
|
+
rightAddons?: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Дополнительный класс для closer
|
|
36
|
+
*/
|
|
37
|
+
closerClassName?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Слот снизу
|
|
40
|
+
*/
|
|
41
|
+
bottomAddons?: ReactNode;
|
|
42
|
+
/**
|
|
43
|
+
* Наличие компонента крестика
|
|
44
|
+
*/
|
|
45
|
+
hasCloser?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Наличие кнопки "Назад"
|
|
48
|
+
*/
|
|
49
|
+
hasBackButton?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Дополнительный класс для правого аддона
|
|
52
|
+
*/
|
|
53
|
+
backButtonClassName?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Дополнительный класс
|
|
56
|
+
*/
|
|
57
|
+
className?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Дополнительный класс для контента
|
|
60
|
+
*/
|
|
61
|
+
contentClassName?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Дополнительный класс для нижнего аддона
|
|
64
|
+
*/
|
|
65
|
+
bottomAddonsClassName?: string;
|
|
66
|
+
/**
|
|
67
|
+
* Выравнивание заголовка
|
|
68
|
+
*/
|
|
69
|
+
align?: 'left' | 'center';
|
|
70
|
+
/**
|
|
71
|
+
* Обрезать ли заголовок
|
|
72
|
+
*/
|
|
73
|
+
trim?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Фиксирует шапку
|
|
76
|
+
*/
|
|
77
|
+
sticky?: boolean;
|
|
78
|
+
/**
|
|
79
|
+
* Идентификатор для систем автоматизированного тестирования
|
|
80
|
+
*/
|
|
81
|
+
dataTestId?: string;
|
|
82
|
+
/**
|
|
83
|
+
* Фоновое изображение
|
|
84
|
+
*/
|
|
85
|
+
imageUrl?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Иконка closer.
|
|
88
|
+
*/
|
|
89
|
+
closerIcon?: React.ElementType;
|
|
90
|
+
/**
|
|
91
|
+
* Обработчик закрытия
|
|
92
|
+
*/
|
|
93
|
+
onClose?: CloserProps['onClose'];
|
|
94
|
+
/**
|
|
95
|
+
* обработчик клика по кнопке "назад"
|
|
96
|
+
*/
|
|
97
|
+
onBack?: () => void;
|
|
98
|
+
/**
|
|
99
|
+
* Вид шапки - мобильный или десктоп
|
|
100
|
+
*/
|
|
101
|
+
view: 'desktop' | 'mobile';
|
|
102
|
+
/**
|
|
103
|
+
* Ссылка на родительскую ноду overflow: auto
|
|
104
|
+
*/
|
|
105
|
+
scrollableParentRef?: React.RefObject<HTMLDivElement>;
|
|
106
|
+
};
|
|
107
|
+
type ContentParams = {
|
|
108
|
+
extraClassName?: string;
|
|
109
|
+
ref?: React.RefObject<HTMLDivElement>;
|
|
110
|
+
style?: React.CSSProperties;
|
|
111
|
+
hidden?: boolean;
|
|
112
|
+
};
|
|
113
|
+
export { NavigationBarProps, ContentParams };
|
package/cssm/typings.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import { AriaAttributes, FC, FocusEvent, MouseEvent, ReactElement, ReactNode, RefAttributes } from 'react';
|
|
1
|
+
import { AriaAttributes, FC, FocusEvent, MouseEvent, ReactElement, ReactNode, RefAttributes, SVGProps } from 'react';
|
|
3
2
|
import { InputProps } from "@alfalab/core-components-input";
|
|
4
3
|
import { PopoverProps } from "@alfalab/core-components-popover";
|
|
4
|
+
type AnyObject = Record<string, any>;
|
|
5
5
|
type OptionShape = {
|
|
6
6
|
/**
|
|
7
7
|
* Текстовое представление пункта
|
|
@@ -325,7 +325,7 @@ type FieldProps = {
|
|
|
325
325
|
* Идентификатор для систем автоматизированного тестирования
|
|
326
326
|
*/
|
|
327
327
|
dataTestId?: string;
|
|
328
|
-
} &
|
|
328
|
+
} & AnyObject;
|
|
329
329
|
type ArrowProps = {
|
|
330
330
|
/**
|
|
331
331
|
* Дополнительный класс
|
|
@@ -545,6 +545,6 @@ type CheckmarkProps = {
|
|
|
545
545
|
/**
|
|
546
546
|
* Иконка выбранного пункта
|
|
547
547
|
*/
|
|
548
|
-
icon?:
|
|
548
|
+
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
549
549
|
};
|
|
550
|
-
export { OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps };
|
|
550
|
+
export { AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps };
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ReactNode, FC } from "react";
|
|
4
|
+
import { BottomSheetProps } from "@alfalab/core-components-bottom-sheet";
|
|
5
|
+
import { BaseSelectProps, OptionShape, OptionsListProps } from "./typings";
|
|
6
|
+
import { BaseModalProps, BaseModalContext } from "@alfalab/core-components-base-modal";
|
|
7
|
+
import { NavigationBarProps } from "./types-ebda875c";
|
|
8
|
+
type AdditionalMobileProps = {
|
|
9
|
+
/**
|
|
10
|
+
* Футер
|
|
11
|
+
* @deprecated Используйте bottomSheetProps.actionButton
|
|
12
|
+
*/
|
|
13
|
+
footer?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* Будет ли свайпаться шторка
|
|
16
|
+
* @deprecated Используйте bottomSheetProps.swipeable
|
|
17
|
+
*/
|
|
18
|
+
swipeable?: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Дополнительные пропсы шторки
|
|
21
|
+
*/
|
|
22
|
+
bottomSheetProps?: Partial<BottomSheetProps>;
|
|
23
|
+
};
|
|
24
|
+
type SelectMobileProps = Omit<BaseSelectProps, "Checkmark" | "onScroll"> & AdditionalMobileProps;
|
|
25
|
+
declare const SelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & AdditionalMobileProps & React.RefAttributes<unknown>>;
|
|
26
|
+
type SelectMobileProps$0 = Omit<BaseSelectProps, "Checkmark" | "onScroll"> & {
|
|
27
|
+
/**
|
|
28
|
+
* Футер
|
|
29
|
+
* @deprecated Используйте bottomSheetProps.actionButton
|
|
30
|
+
*/
|
|
31
|
+
footer?: ReactNode;
|
|
32
|
+
/**
|
|
33
|
+
* Будет ли свайпаться шторка
|
|
34
|
+
* @deprecated Используйте bottomSheetProps.swipeable
|
|
35
|
+
*/
|
|
36
|
+
swipeable?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Отображать в BottomSheet
|
|
39
|
+
*/
|
|
40
|
+
isBottomSheet?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Дополнительные пропсы шторки
|
|
43
|
+
*/
|
|
44
|
+
bottomSheetProps?: Partial<BottomSheetProps>;
|
|
45
|
+
};
|
|
46
|
+
declare const BaseSelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & {
|
|
47
|
+
footer?: ReactNode;
|
|
48
|
+
swipeable?: boolean | undefined;
|
|
49
|
+
isBottomSheet?: boolean | undefined;
|
|
50
|
+
bottomSheetProps?: Partial<BottomSheetProps> | undefined;
|
|
51
|
+
} & React.RefAttributes<unknown>>;
|
|
52
|
+
declare const OptionsListWithApply: React.ForwardRefExoticComponent<OptionsListProps & {
|
|
53
|
+
showClear?: boolean | undefined;
|
|
54
|
+
onClose?: (() => void) | undefined;
|
|
55
|
+
selectedDraft?: OptionShape[] | undefined;
|
|
56
|
+
OptionsList?: React.FC<OptionsListProps & React.RefAttributes<unknown>> | undefined;
|
|
57
|
+
} & React.RefAttributes<unknown>>;
|
|
58
|
+
type ModalDesktopProps = BaseModalProps & {
|
|
59
|
+
/**
|
|
60
|
+
* Ширина модального окна
|
|
61
|
+
* @default "m"
|
|
62
|
+
*/
|
|
63
|
+
size?: "s" | "m" | "l" | "xl" | "fullscreen";
|
|
64
|
+
/**
|
|
65
|
+
* Растягивает модальное окно на весь экран
|
|
66
|
+
* @deprecated Используйте размер fullscreen
|
|
67
|
+
*/
|
|
68
|
+
fullscreen?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* Фиксирует позицию модального окна после открытия,
|
|
71
|
+
* предотвращая скачки, если контент внутри будет меняться
|
|
72
|
+
*/
|
|
73
|
+
fixedPosition?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Управление наличием закрывающего крестика
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
hasCloser?: boolean;
|
|
79
|
+
};
|
|
80
|
+
type ModalMobileProps = Omit<ModalDesktopProps, "size" | "fixedPosition" | "fullscreen">;
|
|
81
|
+
type View = "desktop" | "mobile";
|
|
82
|
+
type TResponsiveModalContext = {
|
|
83
|
+
view: View;
|
|
84
|
+
size: NonNullable<ModalDesktopProps["size"]>;
|
|
85
|
+
};
|
|
86
|
+
type ContentProps = {
|
|
87
|
+
/**
|
|
88
|
+
* Контент
|
|
89
|
+
*/
|
|
90
|
+
children?: ReactNode;
|
|
91
|
+
/**
|
|
92
|
+
* Дополнительный класс
|
|
93
|
+
*/
|
|
94
|
+
className?: string;
|
|
95
|
+
/**
|
|
96
|
+
* Растягивает контент на всю высоту
|
|
97
|
+
*/
|
|
98
|
+
flex?: boolean;
|
|
99
|
+
};
|
|
100
|
+
type HeaderProps = Omit<NavigationBarProps, "size" | "view" | "parentRef">;
|
|
101
|
+
type FooterProps = {
|
|
102
|
+
/**
|
|
103
|
+
* Контент футера
|
|
104
|
+
*/
|
|
105
|
+
children?: ReactNode;
|
|
106
|
+
/**
|
|
107
|
+
* Дополнительный класс
|
|
108
|
+
*/
|
|
109
|
+
className?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Фиксирует футер
|
|
112
|
+
*/
|
|
113
|
+
sticky?: boolean;
|
|
114
|
+
/**
|
|
115
|
+
* Выравнивание элементов футера
|
|
116
|
+
*/
|
|
117
|
+
layout?: "start" | "center" | "space-between" | "column";
|
|
118
|
+
/**
|
|
119
|
+
* Отступы между элементами футера
|
|
120
|
+
*/
|
|
121
|
+
gap?: 16 | 24 | 32;
|
|
122
|
+
};
|
|
123
|
+
declare const ModalMobile: React.ForwardRefExoticComponent<ModalMobileProps & React.RefAttributes<HTMLDivElement>> & {
|
|
124
|
+
Content: React.FC<ContentProps>;
|
|
125
|
+
Header: React.FC<HeaderProps>;
|
|
126
|
+
Footer: React.FC<FooterProps>;
|
|
127
|
+
Closer: React.FC<CloserProps>;
|
|
128
|
+
};
|
|
129
|
+
declare const Content: FC<ContentProps>;
|
|
130
|
+
declare const Modal: React.ForwardRefExoticComponent<import("@alfalab/core-components-base-modal").BaseModalProps & {
|
|
131
|
+
size?: "s" | "m" | "l" | "xl" | "fullscreen" | undefined;
|
|
132
|
+
fullscreen?: boolean | undefined;
|
|
133
|
+
fixedPosition?: boolean | undefined;
|
|
134
|
+
hasCloser?: boolean | undefined;
|
|
135
|
+
} & {
|
|
136
|
+
view: View;
|
|
137
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
138
|
+
declare const ResponsiveContext: React.Context<TResponsiveModalContext>;
|
|
139
|
+
declare const ModalContext: import("react").Context<BaseModalContext>;
|
|
140
|
+
type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'>;
|
|
141
|
+
declare const SelectModalMobile: React.ForwardRefExoticComponent<SelectModalMobileProps & React.RefAttributes<unknown>>;
|
|
142
|
+
export { AdditionalMobileProps, SelectMobileProps, SelectMobile, BaseSelectMobile, OptionsListWithApply, ModalMobile, Content, Modal, ResponsiveContext, ModalContext, SelectModalMobileProps, SelectModalMobile };
|
|
@@ -7,7 +7,7 @@ import { useMultipleSelection, useCombobox } from 'downshift';
|
|
|
7
7
|
import { BottomSheet } from '@alfalab/core-components-bottom-sheet/esm';
|
|
8
8
|
import { ModalMobile } from '@alfalab/core-components-modal/esm/mobile';
|
|
9
9
|
import './Component.js';
|
|
10
|
-
import { g as getDataTestId } from './Component-
|
|
10
|
+
import { g as getDataTestId } from './Component-4bb3c303.js';
|
|
11
11
|
import { Field } from './components/field/Component.js';
|
|
12
12
|
import { Optgroup } from './components/optgroup/Component.js';
|
|
13
13
|
import { Option } from './components/option/Component.js';
|
|
@@ -18,7 +18,7 @@ import '@alfalab/hooks';
|
|
|
18
18
|
import { processOptions } from './utils.js';
|
|
19
19
|
import { BaseOption } from './components/base-option/Component.js';
|
|
20
20
|
import '@alfalab/core-components-skeleton/esm';
|
|
21
|
-
import './intersection-observer-
|
|
21
|
+
import './intersection-observer-6d12bd0a.js';
|
|
22
22
|
import { Button } from '@alfalab/core-components-button/esm';
|
|
23
23
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
24
24
|
import '@alfalab/core-components-form-control/esm';
|
|
@@ -31,7 +31,7 @@ import { Checkmark } from './components/base-select-mobile/checkmark/Component.j
|
|
|
31
31
|
import { OptionsList as OptionsList$1 } from './components/base-select-mobile/options-list/Component.js';
|
|
32
32
|
import { VirtualOptionsList } from './components/base-select-mobile/virtual-options-list/Component.js';
|
|
33
33
|
|
|
34
|
-
var styles$1 = {"footer":"
|
|
34
|
+
var styles$1 = {"footer":"select__footer_4wfri","withBorder":"select__withBorder_4wfri"};
|
|
35
35
|
require('./presets/useSelectWithApply/options-list-with-apply/index.css')
|
|
36
36
|
|
|
37
37
|
var OptionsListWithApply = forwardRef(function (_a, ref) {
|
|
@@ -142,7 +142,7 @@ function useSelectWithApply(_a) {
|
|
|
142
142
|
};
|
|
143
143
|
}
|
|
144
144
|
|
|
145
|
-
var styles = {"component":"
|
|
145
|
+
var styles = {"component":"select__component_2yeg3","popoverInner":"select__popoverInner_2yeg3","sheet":"select__sheet_2yeg3","sheetContent":"select__sheetContent_2yeg3","sheetContainer":"select__sheetContainer_2yeg3","block":"select__block_2yeg3","option":"select__option_2yeg3","optionGroup":"select__optionGroup_2yeg3"};
|
|
146
146
|
require('./components/base-select-mobile/index.css')
|
|
147
147
|
|
|
148
148
|
var VIRTUAL_OPTIONS_LIST_THRESHOLD = 30;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { FC, ForwardRefExoticComponent, RefAttributes, HTMLAttributes } from "react";
|
|
4
|
+
import { NavigationBarProps } from "./types-ebda875c";
|
|
5
|
+
interface BackArrowAddonProps extends React.HTMLAttributes<HTMLButtonElement> {
|
|
6
|
+
/**
|
|
7
|
+
* Текст после иконки
|
|
8
|
+
*/
|
|
9
|
+
text?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Дополнительный класс
|
|
12
|
+
*/
|
|
13
|
+
className?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Вид компонента
|
|
16
|
+
*/
|
|
17
|
+
view: "mobile" | "desktop";
|
|
18
|
+
/**
|
|
19
|
+
* Прозрачность текста
|
|
20
|
+
*/
|
|
21
|
+
textOpacity?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Обработчик клика
|
|
24
|
+
*/
|
|
25
|
+
onClick?: () => void;
|
|
26
|
+
}
|
|
27
|
+
declare const BackArrowAddon: React.FC<BackArrowAddonProps>;
|
|
28
|
+
declare const colors: readonly [
|
|
29
|
+
"tertiary",
|
|
30
|
+
"disabled",
|
|
31
|
+
"accent",
|
|
32
|
+
"primary",
|
|
33
|
+
"attention",
|
|
34
|
+
"positive",
|
|
35
|
+
"secondary",
|
|
36
|
+
"tertiary-inverted",
|
|
37
|
+
"primary-inverted",
|
|
38
|
+
"secondary-inverted",
|
|
39
|
+
"link",
|
|
40
|
+
"negative",
|
|
41
|
+
"static-primary-light",
|
|
42
|
+
"static-secondary-light",
|
|
43
|
+
"static-tertiary-light",
|
|
44
|
+
"static-primary-dark",
|
|
45
|
+
"static-secondary-dark",
|
|
46
|
+
"static-tertiary-dark",
|
|
47
|
+
"static-accent"
|
|
48
|
+
];
|
|
49
|
+
type Color = (typeof colors)[number];
|
|
50
|
+
type TextElementType = HTMLParagraphElement | HTMLSpanElement | HTMLDivElement;
|
|
51
|
+
type NativeProps = HTMLAttributes<HTMLSpanElement>;
|
|
52
|
+
type TextBaseProps = {
|
|
53
|
+
/**
|
|
54
|
+
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
|
|
55
|
+
*/
|
|
56
|
+
view?: "primary-large" | "primary-medium" | "primary-small" | "secondary-large" | "secondary-medium" | "secondary-small" | "component" | "caps";
|
|
57
|
+
/**
|
|
58
|
+
* Цвет текста
|
|
59
|
+
*/
|
|
60
|
+
color?: Color;
|
|
61
|
+
/**
|
|
62
|
+
* Толщина шрифта
|
|
63
|
+
*/
|
|
64
|
+
weight?: "regular" | "medium" | "bold";
|
|
65
|
+
/**
|
|
66
|
+
* Делает цифры моноширинными
|
|
67
|
+
*/
|
|
68
|
+
monospaceNumbers?: boolean;
|
|
69
|
+
/**
|
|
70
|
+
* HTML тег
|
|
71
|
+
*/
|
|
72
|
+
tag?: "span" | "div";
|
|
73
|
+
/**
|
|
74
|
+
* Css-класс для стилизации (native prop)
|
|
75
|
+
*/
|
|
76
|
+
className?: string;
|
|
77
|
+
/**
|
|
78
|
+
* Id компонента для тестов
|
|
79
|
+
*/
|
|
80
|
+
dataTestId?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Контент (native prop)
|
|
83
|
+
*/
|
|
84
|
+
children?: React.ReactNode;
|
|
85
|
+
/**
|
|
86
|
+
* Добавляет отступы к тэгу 'p'
|
|
87
|
+
*/
|
|
88
|
+
defaultMargins?: never;
|
|
89
|
+
/**
|
|
90
|
+
* Количество строк (не поддерживает IE)
|
|
91
|
+
*/
|
|
92
|
+
rowLimit?: 1 | 2 | 3;
|
|
93
|
+
};
|
|
94
|
+
type TextPTagProps = Omit<TextBaseProps, "tag" | "defaultMargins"> & {
|
|
95
|
+
tag?: "p";
|
|
96
|
+
defaultMargins?: boolean;
|
|
97
|
+
};
|
|
98
|
+
type TextProps = Omit<NativeProps, "color"> & (TextBaseProps | TextPTagProps);
|
|
99
|
+
type NativeProps$0 = HTMLAttributes<HTMLHeadingElement>;
|
|
100
|
+
type TitleProps = Omit<NativeProps$0, "color"> & {
|
|
101
|
+
/**
|
|
102
|
+
* HTML тег
|
|
103
|
+
*/
|
|
104
|
+
tag: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div";
|
|
105
|
+
/**
|
|
106
|
+
* [Вариант начертания](https://core-ds.github.io/core-components/master/?path=/docs/guidelines-typography--page)
|
|
107
|
+
*/
|
|
108
|
+
view?: "xlarge" | "large" | "medium" | "small" | "xsmall";
|
|
109
|
+
/**
|
|
110
|
+
* Цвет текста
|
|
111
|
+
*/
|
|
112
|
+
color?: Color;
|
|
113
|
+
/**
|
|
114
|
+
* Толщина шрифта
|
|
115
|
+
*/
|
|
116
|
+
weight?: "regular" | "medium" | "bold";
|
|
117
|
+
/**
|
|
118
|
+
* Шрифт текста
|
|
119
|
+
*/
|
|
120
|
+
font?: "styrene" | "system";
|
|
121
|
+
/**
|
|
122
|
+
* Добавляет отступы
|
|
123
|
+
*/
|
|
124
|
+
defaultMargins?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Css-класс для стилизации (native prop)
|
|
127
|
+
*/
|
|
128
|
+
className?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Id компонента для тестов
|
|
131
|
+
*/
|
|
132
|
+
dataTestId?: string;
|
|
133
|
+
/**
|
|
134
|
+
* Контент (native prop)
|
|
135
|
+
*/
|
|
136
|
+
children?: React.ReactNode;
|
|
137
|
+
/**
|
|
138
|
+
* Количество строк (не поддерживает IE)
|
|
139
|
+
*/
|
|
140
|
+
rowLimit?: 1 | 2 | 3;
|
|
141
|
+
};
|
|
142
|
+
type TitleMobileProps = Omit<TitleProps, "defaultMargins">;
|
|
143
|
+
declare const Typography: {
|
|
144
|
+
Title: FC<TitleProps>;
|
|
145
|
+
Text: ForwardRefExoticComponent<TextProps & RefAttributes<TextElementType>>;
|
|
146
|
+
TitleResponsive: FC<TitleProps>;
|
|
147
|
+
TitleMobile: FC<TitleMobileProps>;
|
|
148
|
+
};
|
|
149
|
+
declare const typographyPresets: {
|
|
150
|
+
mobile: {
|
|
151
|
+
list: {
|
|
152
|
+
text: {
|
|
153
|
+
primary: {
|
|
154
|
+
tag: string;
|
|
155
|
+
view: string;
|
|
156
|
+
};
|
|
157
|
+
secondary: {
|
|
158
|
+
tag: string;
|
|
159
|
+
color: string;
|
|
160
|
+
view: string;
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
};
|
|
166
|
+
declare const TitleResponsive: FC<TitleProps>;
|
|
167
|
+
declare const NavigationBar: FC<NavigationBarProps>;
|
|
168
|
+
export { BackArrowAddonProps, BackArrowAddon, Typography, typographyPresets, TitleResponsive, NavigationBar };
|
|
169
|
+
export type { TitleProps, TextProps, Color };
|