@alfalab/core-components-select 15.2.0 → 15.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Component-89f0cb07.d.ts +38 -0
- package/Component.mobile-ebda875c.d.ts +4 -4
- package/Component.mobile-f1f15074.d.ts +1 -1
- package/Component.mobile.js +2 -2
- package/Component.modal.mobile.js +2 -2
- package/Component.responsive.js +1 -1
- 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 +12 -5
- package/components/base-select/index.css +11 -11
- package/components/base-select-mobile/Component.js +13 -4
- package/components/base-select-mobile/footer/Component.js +1 -1
- package/components/base-select-mobile/footer/index.css +5 -5
- package/components/base-select-mobile/index.css +17 -18
- package/components/checkmark/Component.js +1 -1
- package/components/checkmark/index.css +10 -10
- package/components/checkmark-mobile/Component.js +1 -1
- package/components/checkmark-mobile/index.css +6 -6
- package/components/field/Component.js +1 -1
- package/components/field/index.css +12 -12
- 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 +5 -4
- package/components/options-list/index.css +9 -9
- package/components/search/Component.js +1 -1
- package/components/search/index.css +2 -2
- package/components/virtual-options-list/Component.js +5 -4
- package/components/virtual-options-list/index.css +15 -15
- package/cssm/Component-89f0cb07.d.ts +38 -0
- package/cssm/Component.mobile-ebda875c.d.ts +4 -4
- package/cssm/Component.mobile.js +2 -2
- package/cssm/Component.modal.mobile.js +2 -2
- package/cssm/Component.responsive.js +1 -1
- package/cssm/components/base-select/Component.js +11 -4
- package/cssm/components/base-select-mobile/Component.js +12 -3
- package/cssm/components/base-select-mobile/index.module.css +1 -2
- package/cssm/components/options-list/Component.js +4 -3
- package/cssm/components/virtual-options-list/Component.js +4 -3
- package/cssm/desktop-69921c40.d.ts +6 -0
- package/{hook-45ab0a9c.js → cssm/hook-244c8d6e.js} +4 -1
- package/cssm/index-ebda875c.d.ts +1 -37
- package/cssm/index.js +1 -1
- package/cssm/mobile.js +1 -1
- package/cssm/presets/index.js +1 -1
- package/cssm/presets/useSelectWithApply/hook.js +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/cssm/shared.js +1 -1
- package/{esm/typings-9211a437.d.ts → cssm/typings-89f0cb07.d.ts} +5 -7
- package/cssm/typings.d.ts +4 -0
- package/desktop-69921c40.d.ts +6 -0
- package/esm/Component-89f0cb07.d.ts +38 -0
- package/esm/Component.mobile-ebda875c.d.ts +4 -4
- package/esm/Component.mobile.js +2 -2
- package/esm/Component.modal.mobile.js +2 -2
- package/esm/Component.responsive.js +1 -1
- 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 +12 -5
- package/esm/components/base-select/index.css +11 -11
- package/esm/components/base-select-mobile/Component.js +13 -4
- package/esm/components/base-select-mobile/footer/Component.js +1 -1
- package/esm/components/base-select-mobile/footer/index.css +5 -5
- package/esm/components/base-select-mobile/index.css +17 -18
- package/esm/components/checkmark/Component.js +1 -1
- package/esm/components/checkmark/index.css +10 -10
- package/esm/components/checkmark-mobile/Component.js +1 -1
- package/esm/components/checkmark-mobile/index.css +6 -6
- package/esm/components/field/Component.js +1 -1
- package/esm/components/field/index.css +12 -12
- 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 +5 -4
- package/esm/components/options-list/index.css +9 -9
- package/esm/components/search/Component.js +1 -1
- package/esm/components/search/index.css +2 -2
- package/esm/components/virtual-options-list/Component.js +5 -4
- package/esm/components/virtual-options-list/index.css +15 -15
- package/esm/desktop-69921c40.d.ts +6 -0
- package/esm/{hook-3fd6d6d4.js → hook-571dca86.js} +4 -1
- package/esm/index-ebda875c.d.ts +1 -37
- package/esm/index.js +1 -1
- package/esm/mobile.js +1 -1
- package/esm/presets/index.js +1 -1
- package/esm/presets/useSelectWithApply/hook.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/esm/presets/useSelectWithLoading/hook.js +1 -1
- package/esm/presets/useSelectWithLoading/index.css +2 -2
- package/esm/shared.js +1 -1
- package/{modern/typings-9211a437.d.ts → esm/typings-89f0cb07.d.ts} +5 -7
- package/esm/typings.d.ts +4 -0
- package/{cssm/hook-d1f5dd40.js → hook-a6f060a1.js} +4 -1
- package/index-ebda875c.d.ts +1 -37
- package/index.js +1 -1
- package/mobile.js +1 -1
- package/modern/Component-89f0cb07.d.ts +38 -0
- package/modern/Component.mobile-ebda875c.d.ts +4 -4
- package/modern/Component.mobile.js +2 -2
- package/modern/Component.modal.mobile.js +2 -2
- package/modern/Component.responsive.js +1 -1
- 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 +9 -5
- package/modern/components/base-select/index.css +11 -11
- package/modern/components/base-select-mobile/Component.js +10 -4
- package/modern/components/base-select-mobile/footer/Component.js +1 -1
- package/modern/components/base-select-mobile/footer/index.css +5 -5
- package/modern/components/base-select-mobile/index.css +17 -18
- package/modern/components/checkmark/Component.js +1 -1
- package/modern/components/checkmark/index.css +10 -10
- package/modern/components/checkmark-mobile/Component.js +1 -1
- package/modern/components/checkmark-mobile/index.css +6 -6
- package/modern/components/field/Component.js +1 -1
- package/modern/components/field/index.css +12 -12
- 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 +5 -4
- package/modern/components/options-list/index.css +9 -9
- package/modern/components/search/Component.js +1 -1
- package/modern/components/search/index.css +2 -2
- package/modern/components/virtual-options-list/Component.js +5 -4
- package/modern/components/virtual-options-list/index.css +15 -15
- package/modern/desktop-69921c40.d.ts +6 -0
- package/modern/{hook-5dd83d48.js → hook-7e628eb4.js} +1 -1
- package/modern/index-ebda875c.d.ts +1 -37
- package/modern/index.js +1 -1
- package/modern/mobile.js +1 -1
- package/modern/presets/index.js +1 -1
- package/modern/presets/useSelectWithApply/hook.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/modern/presets/useSelectWithLoading/hook.js +1 -1
- package/modern/presets/useSelectWithLoading/index.css +2 -2
- package/modern/shared.js +1 -1
- package/{typings-9211a437.d.ts → modern/typings-89f0cb07.d.ts} +5 -7
- package/modern/typings.d.ts +4 -0
- package/package.json +7 -7
- package/presets/index.js +1 -1
- package/presets/useSelectWithApply/hook.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +3 -3
- package/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/presets/useSelectWithLoading/hook.js +1 -1
- package/presets/useSelectWithLoading/index.css +2 -2
- package/shared.js +1 -1
- package/src/Component.mobile.tsx +2 -0
- package/src/Component.modal.mobile.tsx +2 -0
- package/src/components/base-select/Component.tsx +12 -2
- package/src/components/base-select-mobile/Component.tsx +16 -3
- package/src/components/base-select-mobile/index.module.css +1 -1
- package/src/components/options-list/Component.tsx +9 -1
- package/src/components/virtual-options-list/Component.tsx +12 -1
- package/src/presets/useSelectWithApply/options-list-with-apply/Component.tsx +1 -1
- package/src/typings.ts +5 -0
- package/{cssm/typings-9211a437.d.ts → typings-89f0cb07.d.ts} +5 -7
- package/typings.d.ts +4 -0
- package/cssm/desktop-63dec22f.d.ts +0 -6
- package/desktop-63dec22f.d.ts +0 -6
- package/esm/desktop-63dec22f.d.ts +0 -6
- package/modern/desktop-63dec22f.d.ts +0 -6
- /package/cssm/{hook-d1f5dd40.d.ts → hook-244c8d6e.d.ts} +0 -0
- /package/esm/{hook-3fd6d6d4.d.ts → hook-571dca86.d.ts} +0 -0
- /package/{hook-45ab0a9c.d.ts → hook-a6f060a1.d.ts} +0 -0
- /package/modern/{hook-5dd83d48.d.ts → hook-7e628eb4.d.ts} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 135ud */
|
|
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 */
|
|
@@ -23,6 +23,6 @@
|
|
|
23
23
|
/* checkmark */
|
|
24
24
|
|
|
25
25
|
/* optgroup */
|
|
26
|
-
} .
|
|
26
|
+
} .select__component_lcwk3 {
|
|
27
27
|
width: auto;
|
|
28
28
|
}
|
|
@@ -9,12 +9,12 @@ import { DEFAULT_VISIBLE_OPTIONS } from '../../consts.js';
|
|
|
9
9
|
import { usePrevious, lastIndexOf, useVisibleOptions, isGroup } from '../../utils.js';
|
|
10
10
|
import { Optgroup } from '../optgroup/Component.js';
|
|
11
11
|
|
|
12
|
-
var styles = {"virtualOptionsList":"
|
|
12
|
+
var styles = {"virtualOptionsList":"select__virtualOptionsList_8wamo","virtualOptionsListHeader":"select__virtualOptionsListHeader_8wamo","virtualOptionsListFooter":"select__virtualOptionsListFooter_8wamo","withBorder":"select__withBorder_8wamo","scrollable":"select__scrollable_8wamo","inner":"select__inner_8wamo","virtualRow":"select__virtualRow_8wamo","highlighted":"select__highlighted_8wamo","emptyPlaceholder":"select__emptyPlaceholder_8wamo","l":"select__l_8wamo","xl":"select__xl_8wamo"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
var VirtualOptionsList = forwardRef(function (_a, ref) {
|
|
16
16
|
var _b;
|
|
17
|
-
var _c = _a.size, size = _c === void 0 ? 's' : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.highlightedIndex, highlightedIndex = _e === void 0 ? -1 : _e, className = _a.className, getOptionProps = _a.getOptionProps, Option = _a.Option, open = _a.open, _f = _a.options, options = _f === void 0 ? [] : _f, _g = _a.Optgroup, Optgroup$1 = _g === void 0 ? Optgroup : _g, dataTestId = _a.dataTestId, emptyPlaceholder = _a.emptyPlaceholder, _h = _a.visibleOptions, visibleOptions = _h === void 0 ? DEFAULT_VISIBLE_OPTIONS : _h, header = _a.header, footer = _a.footer, _j = _a.showFooter, showFooter = _j === void 0 ? true : _j, optionsListWidth = _a.optionsListWidth, onScroll = _a.onScroll, nativeScrollbarProp = _a.nativeScrollbar;
|
|
17
|
+
var _c = _a.size, size = _c === void 0 ? 's' : _c, _d = _a.flatOptions, flatOptions = _d === void 0 ? [] : _d, _e = _a.highlightedIndex, highlightedIndex = _e === void 0 ? -1 : _e, className = _a.className, getOptionProps = _a.getOptionProps, Option = _a.Option, open = _a.open, _f = _a.options, options = _f === void 0 ? [] : _f, _g = _a.Optgroup, Optgroup$1 = _g === void 0 ? Optgroup : _g, dataTestId = _a.dataTestId, emptyPlaceholder = _a.emptyPlaceholder, _h = _a.visibleOptions, visibleOptions = _h === void 0 ? DEFAULT_VISIBLE_OPTIONS : _h, header = _a.header, footer = _a.footer, _j = _a.showFooter, showFooter = _j === void 0 ? true : _j, optionsListWidth = _a.optionsListWidth, onScroll = _a.onScroll, nativeScrollbarProp = _a.nativeScrollbar, setHighlightedIndex = _a.setHighlightedIndex;
|
|
18
18
|
var listRef = useRef(null);
|
|
19
19
|
var parentRef = useRef(null);
|
|
20
20
|
var scrollbarRef = useRef(null);
|
|
@@ -115,14 +115,15 @@ var VirtualOptionsList = forwardRef(function (_a, ref) {
|
|
|
115
115
|
}
|
|
116
116
|
return React.createElement("div", __assign({}, contentNodeProps), renderList());
|
|
117
117
|
};
|
|
118
|
+
var resetHighlightedIndex = function () { return setHighlightedIndex === null || setHighlightedIndex === void 0 ? void 0 : setHighlightedIndex(-1); };
|
|
118
119
|
if (options.length === 0 && !emptyPlaceholder) {
|
|
119
120
|
return null;
|
|
120
121
|
}
|
|
121
122
|
return (React.createElement("div", { className: cn(styles.virtualOptionsList, styles[size], className), "data-test-id": dataTestId },
|
|
122
|
-
header && React.createElement("div", { className: styles.virtualOptionsListHeader }, header),
|
|
123
|
+
header && (React.createElement("div", { className: styles.virtualOptionsListHeader, onMouseEnter: resetHighlightedIndex }, header)),
|
|
123
124
|
nativeScrollbar ? renderWithNativeScrollbar() : renderWithCustomScrollbar(),
|
|
124
125
|
emptyPlaceholder && options.length === 0 && (React.createElement("div", { className: styles.emptyPlaceholder }, emptyPlaceholder)),
|
|
125
|
-
showFooter && footer && (React.createElement("div", { className: cn(styles.virtualOptionsListFooter, (_b = {},
|
|
126
|
+
showFooter && footer && (React.createElement("div", { onMouseEnter: resetHighlightedIndex, className: cn(styles.virtualOptionsListFooter, (_b = {},
|
|
126
127
|
_b[styles.withBorder] = visibleOptions && flatOptions.length > visibleOptions,
|
|
127
128
|
_b)) }, footer))));
|
|
128
129
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1x0f2 */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-border-primary: #dcdcdd;
|
|
@@ -35,34 +35,34 @@
|
|
|
35
35
|
/* checkmark */
|
|
36
36
|
|
|
37
37
|
/* optgroup */
|
|
38
|
-
} .
|
|
38
|
+
} .select__virtualOptionsList_8wamo {
|
|
39
39
|
width: 100%;
|
|
40
40
|
outline: none;
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
position: sticky;
|
|
43
|
-
} .
|
|
43
|
+
} .select__virtualOptionsListHeader_8wamo {
|
|
44
44
|
box-sizing: border-box;
|
|
45
45
|
border-bottom: 1px solid var(--color-light-border-secondary);
|
|
46
|
-
} .
|
|
46
|
+
} .select__virtualOptionsListFooter_8wamo {
|
|
47
47
|
position: sticky;
|
|
48
48
|
bottom: 0;
|
|
49
49
|
box-sizing: border-box;
|
|
50
50
|
border-top: 1px solid transparent
|
|
51
|
-
} .
|
|
51
|
+
} .select__virtualOptionsListFooter_8wamo.select__withBorder_8wamo {
|
|
52
52
|
border-top: 1px solid var(--color-light-border-secondary);
|
|
53
|
-
} .
|
|
53
|
+
} .select__scrollable_8wamo {
|
|
54
54
|
position: relative;
|
|
55
55
|
overflow: auto;
|
|
56
56
|
width: 100%;
|
|
57
|
-
} .
|
|
57
|
+
} .select__inner_8wamo {
|
|
58
58
|
position: relative;
|
|
59
59
|
width: 100%;
|
|
60
|
-
} .
|
|
60
|
+
} .select__virtualRow_8wamo {
|
|
61
61
|
position: absolute;
|
|
62
62
|
top: 0;
|
|
63
63
|
left: 0;
|
|
64
64
|
width: 100%
|
|
65
|
-
} .
|
|
65
|
+
} .select__virtualRow_8wamo:before {
|
|
66
66
|
content: '';
|
|
67
67
|
position: absolute;
|
|
68
68
|
z-index: 1;
|
|
@@ -72,15 +72,15 @@
|
|
|
72
72
|
height: 1px;
|
|
73
73
|
background: var(--select-option-divider-background);
|
|
74
74
|
display: var(--select-option-divider-display);
|
|
75
|
-
} .
|
|
75
|
+
} .select__virtualRow_8wamo:first-child:before {
|
|
76
76
|
display: none;
|
|
77
|
-
} .
|
|
78
|
-
.
|
|
77
|
+
} .select__highlighted_8wamo:before,
|
|
78
|
+
.select__highlighted_8wamo + .select__virtualRow_8wamo:before {
|
|
79
79
|
display: none;
|
|
80
|
-
} .
|
|
80
|
+
} .select__emptyPlaceholder_8wamo {
|
|
81
81
|
padding: var(--gap-m) var(--gap-s);
|
|
82
82
|
color: var(--select-options-list-empty-placeholder-color);
|
|
83
|
-
} .
|
|
84
|
-
.
|
|
83
|
+
} .select__l_8wamo .select__emptyPlaceholder_8wamo,
|
|
84
|
+
.select__xl_8wamo .select__emptyPlaceholder_8wamo {
|
|
85
85
|
padding: var(--gap-xl) var(--gap-m);
|
|
86
86
|
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { CommonButtonProps } from "./typings-89f0cb07";
|
|
4
|
+
declare const ButtonDesktop: React.ForwardRefExoticComponent<CommonButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
5
|
+
export { ButtonDesktop };
|
|
6
|
+
export type { CommonButtonProps as ButtonDesktopProps } from "./typings-89f0cb07";
|
|
@@ -12,7 +12,10 @@ var OptionsListWithApply = forwardRef(function (_a, ref) {
|
|
|
12
12
|
var optionProps = defaultGetOptionProps(option, index);
|
|
13
13
|
var selected = option.key === SELECT_ALL_KEY
|
|
14
14
|
? selectedDraft.length === flatOptions.length - 1
|
|
15
|
-
: selectedDraft.
|
|
15
|
+
: selectedDraft.some(function (_a) {
|
|
16
|
+
var key = _a.key;
|
|
17
|
+
return key === option.key;
|
|
18
|
+
});
|
|
16
19
|
return __assign(__assign({}, optionProps), { selected: selected });
|
|
17
20
|
}, [defaultGetOptionProps, flatOptions.length, selectedDraft]);
|
|
18
21
|
var handleApply = useCallback(function () {
|
package/esm/index-ebda875c.d.ts
CHANGED
|
@@ -1,38 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
import { FC } from "react";
|
|
4
|
-
import { BaseButtonProps } from "./typings-9211a437";
|
|
5
|
-
/**
|
|
6
|
-
* Минимальное время отображения лоадера - 500мс,
|
|
7
|
-
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
8
|
-
*/
|
|
9
|
-
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
10
|
-
declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
11
|
-
type SpinnerProps = {
|
|
12
|
-
/**
|
|
13
|
-
* Управление видимостью компонента
|
|
14
|
-
*/
|
|
15
|
-
visible?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Размер компонента
|
|
18
|
-
*/
|
|
19
|
-
size?: "xs" | "s" | "m";
|
|
20
|
-
/**
|
|
21
|
-
* Дополнительный класс
|
|
22
|
-
*/
|
|
23
|
-
className?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Идентификатор компонента в DOM
|
|
26
|
-
*/
|
|
27
|
-
id?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
30
|
-
*/
|
|
31
|
-
dataTestId?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Палитра, в контексте которой используется спиннер
|
|
34
|
-
*/
|
|
35
|
-
colors?: "default" | "inverted";
|
|
36
|
-
};
|
|
37
|
-
declare const Spinner: FC<SpinnerProps>;
|
|
38
|
-
export { LOADER_MIN_DISPLAY_INTERVAL, BaseButton, SpinnerProps, Spinner };
|
|
2
|
+
export * from "./Component-89f0cb07";
|
package/esm/index.js
CHANGED
|
@@ -40,7 +40,7 @@ import '@alfalab/core-components-base-modal/esm';
|
|
|
40
40
|
import '@alfalab/core-components-button/esm/mobile';
|
|
41
41
|
import './components/virtual-options-list/Component.js';
|
|
42
42
|
import 'react-virtual';
|
|
43
|
-
import './hook-
|
|
43
|
+
import './hook-571dca86.js';
|
|
44
44
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
45
45
|
import '@alfalab/core-components-button/esm/desktop';
|
|
46
46
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
package/esm/mobile.js
CHANGED
|
@@ -34,7 +34,7 @@ import '@alfalab/core-components-base-modal/esm';
|
|
|
34
34
|
import '@alfalab/core-components-button/esm/mobile';
|
|
35
35
|
import './components/virtual-options-list/Component.js';
|
|
36
36
|
import 'react-virtual';
|
|
37
|
-
import './hook-
|
|
37
|
+
import './hook-571dca86.js';
|
|
38
38
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
39
39
|
import '@alfalab/core-components-button/esm/desktop';
|
|
40
40
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
package/esm/presets/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { useSelectWithLoading } from './useSelectWithLoading/hook.js';
|
|
2
2
|
export { useLazyLoading } from './useLazyLoading/hook.js';
|
|
3
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-571dca86.js';
|
|
4
4
|
import 'tslib';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '@alfalab/core-components-skeleton/esm';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'tslib';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../../utils.js';
|
|
4
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-
|
|
4
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-571dca86.js';
|
|
5
5
|
import '../../components/options-list/Component.js';
|
|
6
6
|
import 'react-merge-refs';
|
|
7
7
|
import 'classnames';
|
|
@@ -2,7 +2,7 @@ import 'tslib';
|
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../../../components/options-list/Component.js';
|
|
4
4
|
import '../../../consts.js';
|
|
5
|
-
export { O as OptionsListWithApply } from '../../../hook-
|
|
5
|
+
export { O as OptionsListWithApply } from '../../../hook-571dca86.js';
|
|
6
6
|
import './footer/Component.js';
|
|
7
7
|
import './header/Component.js';
|
|
8
8
|
import 'react-merge-refs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: r40yx */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-bg-primary: #fff; /* 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 */
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
--gap-s: 12px;
|
|
18
18
|
} :root {
|
|
19
19
|
} :root {
|
|
20
|
-
} .
|
|
20
|
+
} .select__footer_zbbxs {
|
|
21
21
|
background-color: var(--color-light-bg-primary);
|
|
22
22
|
padding: var(--gap-s);
|
|
23
23
|
outline: none
|
|
24
|
-
} .
|
|
24
|
+
} .select__footer_zbbxs > * + * {
|
|
25
25
|
margin-left: var(--gap-xs);
|
|
26
26
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { Checkbox } from '@alfalab/core-components-checkbox/esm';
|
|
4
4
|
|
|
5
|
-
var styles = {"desktop":"
|
|
5
|
+
var styles = {"desktop":"select__desktop_1a8hu","mobile":"select__mobile_1a8hu"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
var Header = function (_a) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1qszj */
|
|
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,8 +16,8 @@
|
|
|
16
16
|
--gap-s: 12px;
|
|
17
17
|
} :root {
|
|
18
18
|
} :root {
|
|
19
|
-
} .
|
|
19
|
+
} .select__desktop_1a8hu {
|
|
20
20
|
padding: var(--gap-s);
|
|
21
|
-
} .
|
|
21
|
+
} .select__mobile_1a8hu {
|
|
22
22
|
padding: var(--gap-s) var(--gap-xs);
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-571dca86";
|
|
@@ -10,7 +10,7 @@ import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
|
10
10
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
11
11
|
import '../../components/checkmark-mobile/Component.js';
|
|
12
12
|
|
|
13
|
-
var styles = {"skeleton":"
|
|
13
|
+
var styles = {"skeleton":"select__skeleton_1eba2"};
|
|
14
14
|
require('./index.css')
|
|
15
15
|
|
|
16
16
|
function useSelectWithLoading(_a) {
|
package/esm/shared.js
CHANGED
|
@@ -9,7 +9,7 @@ export { BaseOption } from './components/base-option/Component.js';
|
|
|
9
9
|
export { Search } from './components/search/Component.js';
|
|
10
10
|
export { useSelectWithLoading } from './presets/useSelectWithLoading/hook.js';
|
|
11
11
|
export { useLazyLoading } from './presets/useLazyLoading/hook.js';
|
|
12
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from './hook-
|
|
12
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from './hook-571dca86.js';
|
|
13
13
|
export { defaultAccessor, defaultFilterFn, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from './utils.js';
|
|
14
14
|
import 'react';
|
|
15
15
|
import 'classnames';
|
|
@@ -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 };
|
package/esm/typings.d.ts
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
|
/**
|
|
@@ -18,7 +18,10 @@ var OptionsListWithApply = React.forwardRef(function (_a, ref) {
|
|
|
18
18
|
var optionProps = defaultGetOptionProps(option, index);
|
|
19
19
|
var selected = option.key === SELECT_ALL_KEY
|
|
20
20
|
? selectedDraft.length === flatOptions.length - 1
|
|
21
|
-
: selectedDraft.
|
|
21
|
+
: selectedDraft.some(function (_a) {
|
|
22
|
+
var key = _a.key;
|
|
23
|
+
return key === option.key;
|
|
24
|
+
});
|
|
22
25
|
return tslib.__assign(tslib.__assign({}, optionProps), { selected: selected });
|
|
23
26
|
}, [defaultGetOptionProps, flatOptions.length, selectedDraft]);
|
|
24
27
|
var handleApply = React.useCallback(function () {
|
package/index-ebda875c.d.ts
CHANGED
|
@@ -1,38 +1,2 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
|
|
3
|
-
import { FC } from "react";
|
|
4
|
-
import { BaseButtonProps } from "./typings-9211a437";
|
|
5
|
-
/**
|
|
6
|
-
* Минимальное время отображения лоадера - 500мс,
|
|
7
|
-
* чтобы при быстрых ответах от сервера кнопка не «моргала».
|
|
8
|
-
*/
|
|
9
|
-
declare const LOADER_MIN_DISPLAY_INTERVAL = 500;
|
|
10
|
-
declare const BaseButton: React.ForwardRefExoticComponent<BaseButtonProps & React.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
|
|
11
|
-
type SpinnerProps = {
|
|
12
|
-
/**
|
|
13
|
-
* Управление видимостью компонента
|
|
14
|
-
*/
|
|
15
|
-
visible?: boolean;
|
|
16
|
-
/**
|
|
17
|
-
* Размер компонента
|
|
18
|
-
*/
|
|
19
|
-
size?: "xs" | "s" | "m";
|
|
20
|
-
/**
|
|
21
|
-
* Дополнительный класс
|
|
22
|
-
*/
|
|
23
|
-
className?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Идентификатор компонента в DOM
|
|
26
|
-
*/
|
|
27
|
-
id?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Идентификатор для систем автоматизированного тестирования
|
|
30
|
-
*/
|
|
31
|
-
dataTestId?: string;
|
|
32
|
-
/**
|
|
33
|
-
* Палитра, в контексте которой используется спиннер
|
|
34
|
-
*/
|
|
35
|
-
colors?: "default" | "inverted";
|
|
36
|
-
};
|
|
37
|
-
declare const Spinner: FC<SpinnerProps>;
|
|
38
|
-
export { LOADER_MIN_DISPLAY_INTERVAL, BaseButton, SpinnerProps, Spinner };
|
|
2
|
+
export * from "./Component-89f0cb07";
|
package/index.js
CHANGED
|
@@ -44,7 +44,7 @@ require('@alfalab/core-components-base-modal');
|
|
|
44
44
|
require('@alfalab/core-components-button/mobile');
|
|
45
45
|
require('./components/virtual-options-list/Component.js');
|
|
46
46
|
require('react-virtual');
|
|
47
|
-
require('./hook-
|
|
47
|
+
require('./hook-a6f060a1.js');
|
|
48
48
|
require('./presets/useSelectWithApply/options-list-with-apply/footer/Component.js');
|
|
49
49
|
require('@alfalab/core-components-button/desktop');
|
|
50
50
|
require('./presets/useSelectWithApply/options-list-with-apply/header/Component.js');
|
package/mobile.js
CHANGED
|
@@ -38,7 +38,7 @@ require('@alfalab/core-components-base-modal');
|
|
|
38
38
|
require('@alfalab/core-components-button/mobile');
|
|
39
39
|
require('./components/virtual-options-list/Component.js');
|
|
40
40
|
require('react-virtual');
|
|
41
|
-
require('./hook-
|
|
41
|
+
require('./hook-a6f060a1.js');
|
|
42
42
|
require('./presets/useSelectWithApply/options-list-with-apply/footer/Component.js');
|
|
43
43
|
require('@alfalab/core-components-button/desktop');
|
|
44
44
|
require('./presets/useSelectWithApply/options-list-with-apply/header/Component.js');
|
|
@@ -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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
type
|
|
5
|
-
declare const
|
|
6
|
-
export {
|
|
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 };
|
|
@@ -9,7 +9,7 @@ import { Option } from './components/option/Component.js';
|
|
|
9
9
|
import { OptionsList } from './components/options-list/Component.js';
|
|
10
10
|
import { Search } from './components/search/Component.js';
|
|
11
11
|
import { VirtualOptionsList } from './components/virtual-options-list/Component.js';
|
|
12
|
-
import { u as useSelectWithApply } from './hook-
|
|
12
|
+
import { u as useSelectWithApply } from './hook-7e628eb4.js';
|
|
13
13
|
import { Header } from './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
14
14
|
import 'classnames';
|
|
15
15
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
@@ -57,7 +57,7 @@ const SelectMobile = forwardRef(({ autocomplete = false, multiple = false, allow
|
|
|
57
57
|
return (React.createElement(BaseSelectMobile, { ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: {
|
|
58
58
|
FormControlComponent: FormControlMobile,
|
|
59
59
|
...fieldProps,
|
|
60
|
-
}, optionProps: optionProps, Arrow: Arrow$1, Field: Field$1, Optgroup: Optgroup$1, Option: Option$1, Search: Search$1, isBottomSheet: true, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList$1, bottomSheetProps: {
|
|
60
|
+
}, optionProps: optionProps, Arrow: Arrow$1, Field: Field$1, Optgroup: Optgroup$1, Option: Option$1, Search: Search$1, isBottomSheet: true, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList$1, showSearch: showSearch, searchProps: searchProps, bottomSheetProps: {
|
|
61
61
|
bottomAddons: useWithApplyHook && showHeaderWithSelectAll && (React.createElement(Header, { ...applyProps.optionsListProps.headerProps, mobile: true })),
|
|
62
62
|
...bottomSheetProps,
|
|
63
63
|
}, optionsListProps: optionsListProps, ...restProps, ...(useWithApplyHook && applyProps) }));
|
|
@@ -8,7 +8,7 @@ import { Optgroup } from './components/optgroup/Component.js';
|
|
|
8
8
|
import { Option } from './components/option/Component.js';
|
|
9
9
|
import { OptionsList } from './components/options-list/Component.js';
|
|
10
10
|
import { VirtualOptionsList } from './components/virtual-options-list/Component.js';
|
|
11
|
-
import { u as useSelectWithApply } from './hook-
|
|
11
|
+
import { u as useSelectWithApply } from './hook-7e628eb4.js';
|
|
12
12
|
import { Header } from './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
13
13
|
import 'classnames';
|
|
14
14
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
@@ -57,7 +57,7 @@ const SelectModalMobile = forwardRef(({ autocomplete = false, multiple = false,
|
|
|
57
57
|
return (React.createElement(BaseSelectMobile, { ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: {
|
|
58
58
|
FormControlComponent: FormControlMobile,
|
|
59
59
|
...fieldProps,
|
|
60
|
-
}, optionProps: optionProps, Arrow: Arrow$1, Field: Field$1, Optgroup: Optgroup$1, Option: Option$1, isBottomSheet: false, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList$1, optionsListProps: optionsListProps, modalHeaderProps: {
|
|
60
|
+
}, optionProps: optionProps, Arrow: Arrow$1, Field: Field$1, Optgroup: Optgroup$1, Option: Option$1, isBottomSheet: false, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList$1, optionsListProps: optionsListProps, showSearch: showSearch, searchProps: searchProps, modalHeaderProps: {
|
|
61
61
|
bottomAddons: useWithApplyHook && showHeaderWithSelectAll && (React.createElement(Header, { ...applyProps.optionsListProps.headerProps, mobile: true })),
|
|
62
62
|
...modalHeaderProps,
|
|
63
63
|
}, ...restProps, ...(useWithApplyHook && applyProps) }));
|
|
@@ -38,7 +38,7 @@ import '@alfalab/core-components-base-modal/modern';
|
|
|
38
38
|
import '@alfalab/core-components-button/modern/mobile';
|
|
39
39
|
import './components/virtual-options-list/Component.js';
|
|
40
40
|
import 'react-virtual';
|
|
41
|
-
import './hook-
|
|
41
|
+
import './hook-7e628eb4.js';
|
|
42
42
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
43
43
|
import '@alfalab/core-components-button/modern/desktop';
|
|
44
44
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
import { ChevronDownMIcon } from '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
4
4
|
|
|
5
|
-
const styles = {"arrow":"
|
|
5
|
+
const styles = {"arrow":"select__arrow_yw1vz","open":"select__open_yw1vz"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Arrow = ({ open, className }) => (React.createElement(ChevronDownMIcon, { className: cn(styles.arrow, className, { [styles.open]: open }) }));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 5xl7a */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-graphic-primary: #0e0e0e; /* 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 */
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
/* checkmark */
|
|
27
27
|
|
|
28
28
|
/* optgroup */
|
|
29
|
-
} .
|
|
29
|
+
} .select__arrow_yw1vz {
|
|
30
30
|
display: block;
|
|
31
31
|
width: 24px;
|
|
32
32
|
height: 24px;
|
|
33
33
|
color: var(--select-arrow-color);
|
|
34
34
|
|
|
35
35
|
transition: transform 0.15s ease-in-out, opacity 0.2s ease;
|
|
36
|
-
} .
|
|
36
|
+
} .select__open_yw1vz {
|
|
37
37
|
transform: var(--arrow-transform);
|
|
38
38
|
}
|
|
@@ -3,7 +3,7 @@ import cn from 'classnames';
|
|
|
3
3
|
import { Checkbox } from '@alfalab/core-components-checkbox/modern';
|
|
4
4
|
import { CheckmarkMIcon } from '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
5
5
|
|
|
6
|
-
const styles = {"checkmark":"
|
|
6
|
+
const styles = {"checkmark":"select__checkmark_ld7ul","single":"select__single_ld7ul","selected":"select__selected_ld7ul"};
|
|
7
7
|
require('./index.css')
|
|
8
8
|
|
|
9
9
|
const BaseCheckmark = ({ selected, disabled = false, className, multiple, }) => {
|