@alfalab/core-components-select 17.1.2 → 17.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Component.responsive.js +0 -41
- package/components/arrow/Component.js +1 -1
- package/components/arrow/index.css +3 -3
- package/components/arrow/index.js +0 -3
- package/components/base-checkmark/Component.js +1 -1
- package/components/base-checkmark/index.css +4 -4
- package/components/base-checkmark/index.js +0 -4
- package/components/base-option/Component.js +1 -3
- package/components/base-option/index.css +13 -13
- package/components/base-option/index.js +0 -6
- package/components/base-select/Component.js +3 -3
- package/components/base-select/index.css +11 -11
- package/components/base-select/index.js +0 -11
- package/components/base-select/mobile.css +12 -12
- package/components/checkmark/Component.js +1 -1
- package/components/checkmark/index.css +10 -10
- package/components/checkmark/index.js +0 -6
- package/components/checkmark-mobile/Component.js +1 -1
- package/components/checkmark-mobile/index.css +6 -6
- package/components/checkmark-mobile/index.js +0 -3
- package/components/field/Component.js +1 -1
- package/components/field/index.css +12 -12
- package/components/field/index.js +0 -6
- package/components/footer/Component.js +1 -1
- package/components/footer/index.css +5 -5
- package/components/footer/index.js +0 -5
- package/components/index.js +0 -25
- package/components/native-select/index.js +0 -3
- package/components/optgroup/Component.js +1 -1
- package/components/optgroup/index.css +6 -6
- package/components/optgroup/index.js +0 -2
- package/components/option/Component.js +1 -5
- package/components/option/index.css +19 -19
- package/components/option/index.js +0 -9
- package/components/options-list/Component.js +1 -1
- package/components/options-list/index.css +9 -9
- package/components/options-list/index.js +0 -10
- package/components/search/Component.js +1 -1
- package/components/search/index.css +2 -2
- package/components/search/index.js +0 -5
- package/components/virtual-options-list/Component.js +1 -1
- package/components/virtual-options-list/index.css +15 -15
- package/components/virtual-options-list/index.js +0 -11
- package/cssm/Component.responsive.js +0 -55
- package/cssm/components/arrow/index.js +0 -4
- package/cssm/components/base-checkmark/index.js +0 -5
- package/cssm/components/base-option/Component.js +0 -3
- package/cssm/components/base-option/index.js +0 -8
- package/cssm/components/base-select/Component.js +1 -1
- package/cssm/components/base-select/index.js +0 -13
- package/cssm/components/checkmark/index.js +0 -7
- package/cssm/components/checkmark-mobile/index.js +0 -4
- package/cssm/components/field/index.js +0 -7
- package/cssm/components/footer/index.js +0 -6
- package/cssm/components/index.js +0 -38
- package/cssm/components/native-select/index.js +0 -3
- package/cssm/components/optgroup/index.js +0 -3
- package/cssm/components/option/Component.js +0 -6
- package/cssm/components/option/index.js +0 -12
- package/cssm/components/options-list/Component.js +0 -1
- package/cssm/components/options-list/index.js +0 -12
- package/cssm/components/search/index.js +0 -6
- package/cssm/components/virtual-options-list/Component.js +0 -1
- package/cssm/components/virtual-options-list/index.js +0 -13
- package/cssm/desktop/Component.desktop.js +0 -31
- package/cssm/desktop/index.js +0 -42
- package/{hook-a12d8a76.js → cssm/hook-4aad7127.js} +1 -1
- package/cssm/index.js +0 -61
- package/cssm/mobile/Component.mobile.js +1 -41
- package/cssm/mobile/Component.modal.mobile.js +0 -54
- package/cssm/mobile/index.js +0 -56
- package/cssm/presets/index.js +1 -32
- package/cssm/presets/useLazyLoading/hook.js +0 -10
- package/cssm/presets/useSelectWithApply/hook.js +1 -17
- package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -14
- package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +2 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +4 -3
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -20
- package/cssm/presets/useSelectWithLoading/hook.js +0 -10
- package/cssm/shared/index.js +2 -49
- package/cssm/utils.d.ts +27 -1
- package/cssm/utils.js +30 -0
- package/desktop/Component.desktop.js +0 -21
- package/desktop/index.js +0 -32
- package/esm/Component.responsive.js +0 -41
- package/esm/components/arrow/Component.js +1 -1
- package/esm/components/arrow/index.css +3 -3
- package/esm/components/arrow/index.js +0 -3
- package/esm/components/base-checkmark/Component.js +1 -1
- package/esm/components/base-checkmark/index.css +4 -4
- package/esm/components/base-checkmark/index.js +0 -4
- package/esm/components/base-option/Component.js +1 -3
- package/esm/components/base-option/index.css +13 -13
- package/esm/components/base-option/index.js +0 -6
- package/esm/components/base-select/Component.js +3 -3
- package/esm/components/base-select/index.css +11 -11
- package/esm/components/base-select/index.js +0 -11
- package/esm/components/base-select/mobile.css +12 -12
- package/esm/components/checkmark/Component.js +1 -1
- package/esm/components/checkmark/index.css +10 -10
- package/esm/components/checkmark/index.js +0 -6
- package/esm/components/checkmark-mobile/Component.js +1 -1
- package/esm/components/checkmark-mobile/index.css +6 -6
- package/esm/components/checkmark-mobile/index.js +0 -3
- package/esm/components/field/Component.js +1 -1
- package/esm/components/field/index.css +12 -12
- package/esm/components/field/index.js +0 -6
- package/esm/components/footer/Component.js +1 -1
- package/esm/components/footer/index.css +5 -5
- package/esm/components/footer/index.js +0 -5
- package/esm/components/index.js +0 -25
- package/esm/components/native-select/index.js +0 -3
- package/esm/components/optgroup/Component.js +1 -1
- package/esm/components/optgroup/index.css +6 -6
- package/esm/components/optgroup/index.js +0 -2
- package/esm/components/option/Component.js +1 -5
- package/esm/components/option/index.css +19 -19
- package/esm/components/option/index.js +0 -9
- package/esm/components/options-list/Component.js +1 -1
- package/esm/components/options-list/index.css +9 -9
- package/esm/components/options-list/index.js +0 -10
- package/esm/components/search/Component.js +1 -1
- package/esm/components/search/index.css +2 -2
- package/esm/components/search/index.js +0 -5
- package/esm/components/virtual-options-list/Component.js +1 -1
- package/esm/components/virtual-options-list/index.css +15 -15
- package/esm/components/virtual-options-list/index.js +0 -11
- package/esm/desktop/Component.desktop.js +0 -21
- package/esm/desktop/index.js +0 -32
- package/esm/{hook-0d643e3f.js → hook-b4192713.js} +1 -1
- package/esm/index.js +0 -47
- package/esm/mobile/Component.mobile.js +1 -27
- package/esm/mobile/Component.modal.mobile.js +0 -40
- package/esm/mobile/index.js +0 -42
- package/esm/presets/index.js +1 -24
- package/esm/presets/useLazyLoading/hook.js +0 -7
- package/esm/presets/useSelectWithApply/hook.js +1 -13
- package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -10
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +2 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +5 -4
- 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 -16
- package/esm/presets/useSelectWithLoading/hook.js +1 -8
- package/esm/presets/useSelectWithLoading/index.css +2 -2
- package/esm/shared/index.js +2 -33
- package/esm/utils.d.ts +27 -1
- package/esm/utils.js +30 -1
- package/{cssm/hook-2f9ec939.js → hook-5269e0eb.js} +1 -1
- package/index.js +0 -47
- package/mobile/Component.mobile.js +1 -27
- package/mobile/Component.modal.mobile.js +0 -40
- package/mobile/index.js +0 -42
- package/modern/Component.responsive.js +0 -41
- package/modern/components/arrow/Component.js +1 -1
- package/modern/components/arrow/index.css +3 -3
- package/modern/components/arrow/index.js +0 -3
- package/modern/components/base-checkmark/Component.js +1 -1
- package/modern/components/base-checkmark/index.css +4 -4
- package/modern/components/base-checkmark/index.js +0 -4
- package/modern/components/base-option/Component.js +1 -3
- package/modern/components/base-option/index.css +13 -13
- package/modern/components/base-option/index.js +0 -5
- package/modern/components/base-select/Component.js +3 -3
- package/modern/components/base-select/index.css +11 -11
- package/modern/components/base-select/index.js +0 -10
- package/modern/components/base-select/mobile.css +12 -12
- package/modern/components/checkmark/Component.js +1 -1
- package/modern/components/checkmark/index.css +10 -10
- package/modern/components/checkmark/index.js +0 -6
- package/modern/components/checkmark-mobile/Component.js +1 -1
- package/modern/components/checkmark-mobile/index.css +6 -6
- package/modern/components/checkmark-mobile/index.js +0 -3
- package/modern/components/field/Component.js +1 -1
- package/modern/components/field/index.css +12 -12
- package/modern/components/field/index.js +0 -5
- package/modern/components/footer/Component.js +1 -1
- package/modern/components/footer/index.css +5 -5
- package/modern/components/footer/index.js +0 -5
- package/modern/components/index.js +0 -24
- package/modern/components/native-select/index.js +0 -2
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +6 -6
- package/modern/components/optgroup/index.js +0 -2
- package/modern/components/option/Component.js +1 -5
- package/modern/components/option/index.css +19 -19
- package/modern/components/option/index.js +0 -8
- package/modern/components/options-list/Component.js +1 -1
- package/modern/components/options-list/index.css +9 -9
- package/modern/components/options-list/index.js +0 -9
- package/modern/components/search/Component.js +1 -1
- package/modern/components/search/index.css +2 -2
- package/modern/components/search/index.js +0 -4
- package/modern/components/virtual-options-list/Component.js +1 -1
- package/modern/components/virtual-options-list/index.css +15 -15
- package/modern/components/virtual-options-list/index.js +0 -10
- package/modern/desktop/Component.desktop.js +0 -21
- package/modern/desktop/index.js +0 -31
- package/modern/{hook-e0ac0fb2.js → hook-328d58fb.js} +1 -1
- package/modern/index.js +0 -46
- package/modern/mobile/Component.mobile.js +1 -27
- package/modern/mobile/Component.modal.mobile.js +0 -40
- package/modern/mobile/index.js +0 -41
- package/modern/presets/index.js +1 -23
- package/modern/presets/useLazyLoading/hook.js +0 -7
- package/modern/presets/useSelectWithApply/hook.js +1 -13
- package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -10
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +2 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +5 -4
- 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 -15
- package/modern/presets/useSelectWithLoading/hook.js +1 -8
- package/modern/presets/useSelectWithLoading/index.css +2 -2
- package/modern/shared/index.js +2 -32
- package/modern/utils.d.ts +27 -1
- package/modern/utils.js +30 -1
- package/package.json +6 -6
- package/presets/index.js +1 -24
- package/presets/useLazyLoading/hook.js +0 -7
- package/presets/useSelectWithApply/hook.js +1 -13
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -10
- package/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +2 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +5 -4
- 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 -16
- package/presets/useSelectWithLoading/hook.js +1 -8
- package/presets/useSelectWithLoading/index.css +2 -2
- package/shared/index.js +2 -32
- package/src/components/base-select/Component.tsx +1 -0
- package/src/presets/useSelectWithApply/options-list-with-apply/Component.tsx +1 -0
- package/src/presets/useSelectWithApply/options-list-with-apply/footer/Component.tsx +15 -2
- package/src/utils.ts +33 -0
- package/utils.d.ts +27 -1
- package/utils.js +30 -0
- /package/cssm/{hook-2f9ec939.d.ts → hook-4aad7127.d.ts} +0 -0
- /package/esm/{hook-0d643e3f.d.ts → hook-b4192713.d.ts} +0 -0
- /package/{hook-a12d8a76.d.ts → hook-5269e0eb.d.ts} +0 -0
- /package/modern/{hook-e0ac0fb2.d.ts → hook-328d58fb.d.ts} +0 -0
|
@@ -8,27 +8,6 @@ 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 { Search } from '../components/search/Component.js';
|
|
11
|
-
import 'classnames';
|
|
12
|
-
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
13
|
-
import 'react-merge-refs';
|
|
14
|
-
import '@juggle/resize-observer';
|
|
15
|
-
import 'compute-scroll-into-view';
|
|
16
|
-
import 'downshift';
|
|
17
|
-
import '@alfalab/core-components-shared/modern';
|
|
18
|
-
import '@alfalab/hooks';
|
|
19
|
-
import '../utils.js';
|
|
20
|
-
import '../components/native-select/Component.js';
|
|
21
|
-
import '../components/checkmark/Component.js';
|
|
22
|
-
import '@alfalab/core-components-badge/modern';
|
|
23
|
-
import '@alfalab/core-components-checkbox/modern';
|
|
24
|
-
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
25
|
-
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
26
|
-
import '../components/checkmark-mobile/Component.js';
|
|
27
|
-
import '@alfalab/core-components-mq/modern';
|
|
28
|
-
import '@alfalab/core-components-scrollbar/modern';
|
|
29
|
-
import '../consts.js';
|
|
30
|
-
import '@alfalab/core-components-input/modern';
|
|
31
|
-
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
32
11
|
|
|
33
12
|
const SelectDesktop = forwardRef(({ Arrow: Arrow$1 = Arrow, Field: Field$1 = Field, OptionsList: OptionsList$1 = OptionsList, Optgroup: Optgroup$1 = Optgroup, Option: Option$1 = Option, Search: Search$1 = Search, fieldProps = {}, ...restProps }, ref) => (React.createElement(BaseSelect, { ref: ref, view: 'desktop', Option: Option$1, Field: Field$1, fieldProps: {
|
|
34
13
|
FormControlComponent: FormControlDesktop,
|
package/modern/desktop/index.js
CHANGED
|
@@ -1,32 +1 @@
|
|
|
1
1
|
export { SelectDesktop } from './Component.desktop.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import '@alfalab/core-components-form-control/modern/desktop';
|
|
4
|
-
import '@alfalab/core-components-popover/modern';
|
|
5
|
-
import '../components/arrow/Component.js';
|
|
6
|
-
import 'classnames';
|
|
7
|
-
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
8
|
-
import '../components/base-select/Component.js';
|
|
9
|
-
import 'react-merge-refs';
|
|
10
|
-
import '@juggle/resize-observer';
|
|
11
|
-
import 'compute-scroll-into-view';
|
|
12
|
-
import 'downshift';
|
|
13
|
-
import '@alfalab/core-components-shared/modern';
|
|
14
|
-
import '@alfalab/hooks';
|
|
15
|
-
import '../utils.js';
|
|
16
|
-
import '../components/native-select/Component.js';
|
|
17
|
-
import '../components/field/Component.js';
|
|
18
|
-
import '../components/optgroup/Component.js';
|
|
19
|
-
import '../components/option/Component.js';
|
|
20
|
-
import '../components/checkmark/Component.js';
|
|
21
|
-
import '@alfalab/core-components-badge/modern';
|
|
22
|
-
import '@alfalab/core-components-checkbox/modern';
|
|
23
|
-
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
24
|
-
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
25
|
-
import '../components/checkmark-mobile/Component.js';
|
|
26
|
-
import '../components/options-list/Component.js';
|
|
27
|
-
import '@alfalab/core-components-mq/modern';
|
|
28
|
-
import '@alfalab/core-components-scrollbar/modern';
|
|
29
|
-
import '../consts.js';
|
|
30
|
-
import '../components/search/Component.js';
|
|
31
|
-
import '@alfalab/core-components-input/modern';
|
|
32
|
-
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
@@ -41,7 +41,7 @@ const OptionsListWithApply = forwardRef(({ toggleMenu, getOptionProps: defaultGe
|
|
|
41
41
|
header,
|
|
42
42
|
showHeaderWithSelectAll && React.createElement(Header$1, { ...headerProps })));
|
|
43
43
|
};
|
|
44
|
-
return (React.createElement(OptionsList$1, { ...restProps, ref: ref, visibleOptions: visibleOptions, toggleMenu: toggleMenu, flatOptions: flatOptions, getOptionProps: getOptionProps, onApply: handleApply, onClear: handleClear, header: renderHeader(), footer: React.createElement(Footer$1, { handleApply: handleApply, handleClear: handleClear, showClear: showClear, selectedDraft: selectedDraft }) }));
|
|
44
|
+
return (React.createElement(OptionsList$1, { ...restProps, ref: ref, visibleOptions: visibleOptions, toggleMenu: toggleMenu, flatOptions: flatOptions, getOptionProps: getOptionProps, onApply: handleApply, onClear: handleClear, header: renderHeader(), footer: React.createElement(Footer$1, { handleApply: handleApply, handleClear: handleClear, showClear: showClear, selectedDraft: selectedDraft, dataTestId: restProps?.dataTestId }) }));
|
|
45
45
|
});
|
|
46
46
|
|
|
47
47
|
const SELECT_ALL_KEY = 'select_all';
|
package/modern/index.js
CHANGED
|
@@ -1,47 +1 @@
|
|
|
1
1
|
export { SelectResponsive as Select } from './Component.responsive.js';
|
|
2
|
-
import 'react';
|
|
3
|
-
import '@alfalab/core-components-mq/modern';
|
|
4
|
-
import './desktop/Component.desktop.js';
|
|
5
|
-
import '@alfalab/core-components-form-control/modern/desktop';
|
|
6
|
-
import '@alfalab/core-components-popover/modern';
|
|
7
|
-
import './components/arrow/Component.js';
|
|
8
|
-
import 'classnames';
|
|
9
|
-
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
10
|
-
import './components/base-select/Component.js';
|
|
11
|
-
import 'react-merge-refs';
|
|
12
|
-
import '@juggle/resize-observer';
|
|
13
|
-
import 'compute-scroll-into-view';
|
|
14
|
-
import 'downshift';
|
|
15
|
-
import '@alfalab/core-components-shared/modern';
|
|
16
|
-
import '@alfalab/hooks';
|
|
17
|
-
import './utils.js';
|
|
18
|
-
import './components/native-select/Component.js';
|
|
19
|
-
import './components/field/Component.js';
|
|
20
|
-
import './components/optgroup/Component.js';
|
|
21
|
-
import './components/option/Component.js';
|
|
22
|
-
import './components/checkmark/Component.js';
|
|
23
|
-
import '@alfalab/core-components-badge/modern';
|
|
24
|
-
import '@alfalab/core-components-checkbox/modern';
|
|
25
|
-
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
26
|
-
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
27
|
-
import './components/checkmark-mobile/Component.js';
|
|
28
|
-
import './components/options-list/Component.js';
|
|
29
|
-
import '@alfalab/core-components-scrollbar/modern';
|
|
30
|
-
import './consts.js';
|
|
31
|
-
import './components/search/Component.js';
|
|
32
|
-
import '@alfalab/core-components-input/modern';
|
|
33
|
-
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
34
|
-
import './mobile/Component.mobile.js';
|
|
35
|
-
import '@alfalab/core-components-bottom-sheet/modern';
|
|
36
|
-
import '@alfalab/core-components-form-control/modern/mobile';
|
|
37
|
-
import '@alfalab/core-components-modal/modern/mobile';
|
|
38
|
-
import './components/footer/Component.js';
|
|
39
|
-
import '@alfalab/core-components-base-modal/modern';
|
|
40
|
-
import '@alfalab/core-components-button/modern/mobile';
|
|
41
|
-
import './components/virtual-options-list/Component.js';
|
|
42
|
-
import 'react-virtual';
|
|
43
|
-
import './hook-e0ac0fb2.js';
|
|
44
|
-
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
45
|
-
import '@alfalab/core-components-button/modern/desktop';
|
|
46
|
-
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
47
|
-
import './mobile/Component.modal.mobile.js';
|
|
@@ -11,34 +11,8 @@ import { Option } from '../components/option/Component.js';
|
|
|
11
11
|
import { OptionsList } from '../components/options-list/Component.js';
|
|
12
12
|
import { Search } from '../components/search/Component.js';
|
|
13
13
|
import { VirtualOptionsList } from '../components/virtual-options-list/Component.js';
|
|
14
|
-
import { u as useSelectWithApply } from '../hook-
|
|
14
|
+
import { u as useSelectWithApply } from '../hook-328d58fb.js';
|
|
15
15
|
import { Header } from '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
16
|
-
import 'classnames';
|
|
17
|
-
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
18
|
-
import 'react-merge-refs';
|
|
19
|
-
import '@juggle/resize-observer';
|
|
20
|
-
import 'compute-scroll-into-view';
|
|
21
|
-
import 'downshift';
|
|
22
|
-
import '@alfalab/core-components-shared/modern';
|
|
23
|
-
import '@alfalab/hooks';
|
|
24
|
-
import '../utils.js';
|
|
25
|
-
import '../components/native-select/Component.js';
|
|
26
|
-
import '@alfalab/core-components-base-modal/modern';
|
|
27
|
-
import '@alfalab/core-components-button/modern/mobile';
|
|
28
|
-
import '../components/checkmark/Component.js';
|
|
29
|
-
import '@alfalab/core-components-badge/modern';
|
|
30
|
-
import '@alfalab/core-components-checkbox/modern';
|
|
31
|
-
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
32
|
-
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
33
|
-
import '../components/checkmark-mobile/Component.js';
|
|
34
|
-
import '@alfalab/core-components-mq/modern';
|
|
35
|
-
import '@alfalab/core-components-scrollbar/modern';
|
|
36
|
-
import '../consts.js';
|
|
37
|
-
import '@alfalab/core-components-input/modern';
|
|
38
|
-
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
39
|
-
import 'react-virtual';
|
|
40
|
-
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
41
|
-
import '@alfalab/core-components-button/modern/desktop';
|
|
42
16
|
|
|
43
17
|
const VIRTUAL_OPTIONS_LIST_THRESHOLD = 30;
|
|
44
18
|
const SelectMobile = forwardRef(({ autocomplete = false, multiple = false, allowUnselect = false, disabled = false, closeOnSelect = !multiple, circularNavigation = false, defaultOpen = false, open: openProp, size = 'm', optionsSize = 'm', fieldProps = {}, optionProps = {}, optionsListProps = {}, Arrow: Arrow$1 = Arrow, Field: Field$1 = Field, Optgroup: Optgroup$1 = Optgroup, Option: Option$1 = Option, Search: Search$1 = Search, selected, isBottomSheet = true, options, OptionsList: OptionsList$1 = options.length > VIRTUAL_OPTIONS_LIST_THRESHOLD
|
|
@@ -1,45 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import { SelectMobile } from './Component.mobile.js';
|
|
3
|
-
import '@alfalab/core-components-bottom-sheet/modern';
|
|
4
|
-
import '@alfalab/core-components-form-control/modern/mobile';
|
|
5
|
-
import '@alfalab/core-components-modal/modern/mobile';
|
|
6
|
-
import '../components/arrow/Component.js';
|
|
7
|
-
import 'classnames';
|
|
8
|
-
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
9
|
-
import '../components/base-select/Component.js';
|
|
10
|
-
import 'react-merge-refs';
|
|
11
|
-
import '@juggle/resize-observer';
|
|
12
|
-
import 'compute-scroll-into-view';
|
|
13
|
-
import 'downshift';
|
|
14
|
-
import '@alfalab/core-components-shared/modern';
|
|
15
|
-
import '@alfalab/hooks';
|
|
16
|
-
import '../utils.js';
|
|
17
|
-
import '../components/native-select/Component.js';
|
|
18
|
-
import '../components/field/Component.js';
|
|
19
|
-
import '../components/footer/Component.js';
|
|
20
|
-
import '@alfalab/core-components-base-modal/modern';
|
|
21
|
-
import '@alfalab/core-components-button/modern/mobile';
|
|
22
|
-
import '../components/optgroup/Component.js';
|
|
23
|
-
import '../components/option/Component.js';
|
|
24
|
-
import '../components/checkmark/Component.js';
|
|
25
|
-
import '@alfalab/core-components-badge/modern';
|
|
26
|
-
import '@alfalab/core-components-checkbox/modern';
|
|
27
|
-
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
28
|
-
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
29
|
-
import '../components/checkmark-mobile/Component.js';
|
|
30
|
-
import '../components/options-list/Component.js';
|
|
31
|
-
import '@alfalab/core-components-mq/modern';
|
|
32
|
-
import '@alfalab/core-components-scrollbar/modern';
|
|
33
|
-
import '../consts.js';
|
|
34
|
-
import '../components/search/Component.js';
|
|
35
|
-
import '@alfalab/core-components-input/modern';
|
|
36
|
-
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
37
|
-
import '../components/virtual-options-list/Component.js';
|
|
38
|
-
import 'react-virtual';
|
|
39
|
-
import '../hook-e0ac0fb2.js';
|
|
40
|
-
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
41
|
-
import '@alfalab/core-components-button/modern/desktop';
|
|
42
|
-
import '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
43
3
|
|
|
44
4
|
const SelectModalMobile = forwardRef((props, ref) => (React.createElement(SelectMobile, { ...props, isBottomSheet: false, ref: ref })));
|
|
45
5
|
|
package/modern/mobile/index.js
CHANGED
|
@@ -1,43 +1,2 @@
|
|
|
1
1
|
export { SelectMobile } from './Component.mobile.js';
|
|
2
2
|
export { SelectModalMobile } from './Component.modal.mobile.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import '@alfalab/core-components-bottom-sheet/modern';
|
|
5
|
-
import '@alfalab/core-components-form-control/modern/mobile';
|
|
6
|
-
import '@alfalab/core-components-modal/modern/mobile';
|
|
7
|
-
import '../components/arrow/Component.js';
|
|
8
|
-
import 'classnames';
|
|
9
|
-
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
10
|
-
import '../components/base-select/Component.js';
|
|
11
|
-
import 'react-merge-refs';
|
|
12
|
-
import '@juggle/resize-observer';
|
|
13
|
-
import 'compute-scroll-into-view';
|
|
14
|
-
import 'downshift';
|
|
15
|
-
import '@alfalab/core-components-shared/modern';
|
|
16
|
-
import '@alfalab/hooks';
|
|
17
|
-
import '../utils.js';
|
|
18
|
-
import '../components/native-select/Component.js';
|
|
19
|
-
import '../components/field/Component.js';
|
|
20
|
-
import '../components/footer/Component.js';
|
|
21
|
-
import '@alfalab/core-components-base-modal/modern';
|
|
22
|
-
import '@alfalab/core-components-button/modern/mobile';
|
|
23
|
-
import '../components/optgroup/Component.js';
|
|
24
|
-
import '../components/option/Component.js';
|
|
25
|
-
import '../components/checkmark/Component.js';
|
|
26
|
-
import '@alfalab/core-components-badge/modern';
|
|
27
|
-
import '@alfalab/core-components-checkbox/modern';
|
|
28
|
-
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
29
|
-
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
30
|
-
import '../components/checkmark-mobile/Component.js';
|
|
31
|
-
import '../components/options-list/Component.js';
|
|
32
|
-
import '@alfalab/core-components-mq/modern';
|
|
33
|
-
import '@alfalab/core-components-scrollbar/modern';
|
|
34
|
-
import '../consts.js';
|
|
35
|
-
import '../components/search/Component.js';
|
|
36
|
-
import '@alfalab/core-components-input/modern';
|
|
37
|
-
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
38
|
-
import '../components/virtual-options-list/Component.js';
|
|
39
|
-
import 'react-virtual';
|
|
40
|
-
import '../hook-e0ac0fb2.js';
|
|
41
|
-
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
42
|
-
import '@alfalab/core-components-button/modern/desktop';
|
|
43
|
-
import '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
package/modern/presets/index.js
CHANGED
|
@@ -1,25 +1,3 @@
|
|
|
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-
|
|
4
|
-
import 'react';
|
|
5
|
-
import '@alfalab/core-components-skeleton/modern';
|
|
6
|
-
import '../components/option/Component.js';
|
|
7
|
-
import 'classnames';
|
|
8
|
-
import '../components/checkmark/Component.js';
|
|
9
|
-
import '@alfalab/core-components-badge/modern';
|
|
10
|
-
import '@alfalab/core-components-checkbox/modern';
|
|
11
|
-
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
12
|
-
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
13
|
-
import '../components/checkmark-mobile/Component.js';
|
|
14
|
-
import 'intersection-observer';
|
|
15
|
-
import '../utils.js';
|
|
16
|
-
import '../components/options-list/Component.js';
|
|
17
|
-
import 'react-merge-refs';
|
|
18
|
-
import '@alfalab/core-components-mq/modern';
|
|
19
|
-
import '@alfalab/core-components-scrollbar/modern';
|
|
20
|
-
import '@alfalab/core-components-shared/modern';
|
|
21
|
-
import '../consts.js';
|
|
22
|
-
import '../components/optgroup/Component.js';
|
|
23
|
-
import './useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
24
|
-
import '@alfalab/core-components-button/modern/desktop';
|
|
25
|
-
import './useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-328d58fb.js';
|
|
@@ -2,13 +2,6 @@ import React, { useReducer, useRef, useCallback, useEffect, useMemo } from 'reac
|
|
|
2
2
|
import { Skeleton } from '@alfalab/core-components-skeleton/modern';
|
|
3
3
|
import { Option } from '../../components/option/Component.js';
|
|
4
4
|
import 'intersection-observer';
|
|
5
|
-
import 'classnames';
|
|
6
|
-
import '../../components/checkmark/Component.js';
|
|
7
|
-
import '@alfalab/core-components-badge/modern';
|
|
8
|
-
import '@alfalab/core-components-checkbox/modern';
|
|
9
|
-
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
10
|
-
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
11
|
-
import '../../components/checkmark-mobile/Component.js';
|
|
12
5
|
|
|
13
6
|
const DEBOUNCE_TIMEOUT = 300;
|
|
14
7
|
const actions = {
|
|
@@ -1,15 +1,3 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '../../utils.js';
|
|
3
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-
|
|
4
|
-
import '../../components/options-list/Component.js';
|
|
5
|
-
import 'react-merge-refs';
|
|
6
|
-
import 'classnames';
|
|
7
|
-
import '@alfalab/core-components-mq/modern';
|
|
8
|
-
import '@alfalab/core-components-scrollbar/modern';
|
|
9
|
-
import '@alfalab/core-components-shared/modern';
|
|
10
|
-
import '../../consts.js';
|
|
11
|
-
import '../../components/optgroup/Component.js';
|
|
12
|
-
import './options-list-with-apply/footer/Component.js';
|
|
13
|
-
import '@alfalab/core-components-button/modern/desktop';
|
|
14
|
-
import './options-list-with-apply/header/Component.js';
|
|
15
|
-
import '@alfalab/core-components-checkbox/modern';
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-328d58fb.js';
|
|
@@ -1,15 +1,6 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '../../../components/options-list/Component.js';
|
|
3
3
|
import '../../../consts.js';
|
|
4
|
-
export { O as OptionsListWithApply } from '../../../hook-
|
|
4
|
+
export { O as OptionsListWithApply } from '../../../hook-328d58fb.js';
|
|
5
5
|
import './footer/Component.js';
|
|
6
6
|
import './header/Component.js';
|
|
7
|
-
import 'react-merge-refs';
|
|
8
|
-
import 'classnames';
|
|
9
|
-
import '@alfalab/core-components-mq/modern';
|
|
10
|
-
import '@alfalab/core-components-scrollbar/modern';
|
|
11
|
-
import '@alfalab/core-components-shared/modern';
|
|
12
|
-
import '../../../utils.js';
|
|
13
|
-
import '../../../components/optgroup/Component.js';
|
|
14
|
-
import '@alfalab/core-components-button/modern/desktop';
|
|
15
|
-
import '@alfalab/core-components-checkbox/modern';
|
|
@@ -6,6 +6,7 @@ type FooterProps = {
|
|
|
6
6
|
handleApply?: () => void;
|
|
7
7
|
showClear?: boolean;
|
|
8
8
|
selectedDraft?: OptionShape[];
|
|
9
|
+
dataTestId?: string;
|
|
9
10
|
};
|
|
10
|
-
declare const Footer: ({ handleApply, handleClear, showClear, selectedDraft, }: FooterProps) => React.JSX.Element;
|
|
11
|
+
declare const Footer: ({ handleApply, handleClear, showClear, selectedDraft, dataTestId, }: FooterProps) => React.JSX.Element;
|
|
11
12
|
export { FooterProps, Footer };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonDesktop } from '@alfalab/core-components-button/modern/desktop';
|
|
3
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
3
4
|
|
|
4
|
-
const styles = {"footer":"
|
|
5
|
+
const styles = {"footer":"select__footer_1lhq3"};
|
|
5
6
|
require('./index.css')
|
|
6
7
|
|
|
7
|
-
const Footer = ({ handleApply, handleClear, showClear, selectedDraft = [], }) => (React.createElement("div", {
|
|
8
|
+
const Footer = ({ handleApply, handleClear, showClear, selectedDraft = [], dataTestId, }) => (React.createElement("div", {
|
|
8
9
|
// eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
|
|
9
10
|
tabIndex: 0, className: styles.footer },
|
|
10
|
-
React.createElement(ButtonDesktop, { size: 'xxs', view: 'primary', onClick: handleApply }, "\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C"),
|
|
11
|
-
showClear && selectedDraft.length > 0 && (React.createElement(ButtonDesktop, { size: 'xxs', view: 'secondary', onClick: handleClear }, "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C"))));
|
|
11
|
+
React.createElement(ButtonDesktop, { size: 'xxs', view: 'primary', onClick: handleApply, dataTestId: getDataTestId(dataTestId, 'apply') }, "\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C"),
|
|
12
|
+
showClear && selectedDraft.length > 0 && (React.createElement(ButtonDesktop, { size: 'xxs', view: 'secondary', onClick: handleClear, dataTestId: getDataTestId(dataTestId, 'clear') }, "\u0421\u0431\u0440\u043E\u0441\u0438\u0442\u044C"))));
|
|
12
13
|
|
|
13
14
|
export { Footer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: k1tdv */
|
|
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_1lhq3 {
|
|
21
21
|
background-color: var(--color-light-bg-primary);
|
|
22
22
|
padding: var(--gap-s);
|
|
23
23
|
outline: none
|
|
24
|
-
} .
|
|
24
|
+
} .select__footer_1lhq3 > * + * {
|
|
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/modern';
|
|
4
4
|
|
|
5
|
-
const styles = {"desktop":"
|
|
5
|
+
const styles = {"desktop":"select__desktop_boj2v","mobile":"select__mobile_boj2v"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Header = ({ onChange, checked, indeterminate, mobile }) => (React.createElement("div", { className: cn({ [styles.desktop]: !mobile, [styles.mobile]: mobile }) },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 12dlh */
|
|
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_boj2v {
|
|
20
20
|
padding: var(--gap-s);
|
|
21
|
-
} .
|
|
21
|
+
} .select__mobile_boj2v {
|
|
22
22
|
padding: var(--gap-s) var(--gap-xs);
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-328d58fb";
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
export { O as OptionsListWithApply } from '../../../hook-
|
|
2
|
-
import 'react';
|
|
3
|
-
import '../../../utils.js';
|
|
4
|
-
import '../../../components/options-list/Component.js';
|
|
5
|
-
import 'react-merge-refs';
|
|
6
|
-
import 'classnames';
|
|
7
|
-
import '@alfalab/core-components-mq/modern';
|
|
8
|
-
import '@alfalab/core-components-scrollbar/modern';
|
|
9
|
-
import '@alfalab/core-components-shared/modern';
|
|
10
|
-
import '../../../consts.js';
|
|
11
|
-
import '../../../components/optgroup/Component.js';
|
|
12
|
-
import './footer/Component.js';
|
|
13
|
-
import '@alfalab/core-components-button/modern/desktop';
|
|
14
|
-
import './header/Component.js';
|
|
15
|
-
import '@alfalab/core-components-checkbox/modern';
|
|
1
|
+
export { O as OptionsListWithApply } from '../../../hook-328d58fb.js';
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Skeleton } from '@alfalab/core-components-skeleton/modern';
|
|
3
3
|
import { Option } from '../../components/option/Component.js';
|
|
4
|
-
import 'classnames';
|
|
5
|
-
import '../../components/checkmark/Component.js';
|
|
6
|
-
import '@alfalab/core-components-badge/modern';
|
|
7
|
-
import '@alfalab/core-components-checkbox/modern';
|
|
8
|
-
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
9
|
-
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
10
|
-
import '../../components/checkmark-mobile/Component.js';
|
|
11
4
|
|
|
12
|
-
const styles = {"skeleton":"
|
|
5
|
+
const styles = {"skeleton":"select__skeleton_afn0z"};
|
|
13
6
|
require('./index.css')
|
|
14
7
|
|
|
15
8
|
function useSelectWithLoading({ loading = false, visibleOptions = 6, Option: Option$1 = Option, }) {
|
package/modern/shared/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { useSelectWithLoading } from '../presets/useSelectWithLoading/hook.js';
|
|
2
2
|
export { useLazyLoading } from '../presets/useLazyLoading/hook.js';
|
|
3
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-
|
|
4
|
-
export { defaultAccessor, defaultFilterFn, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from '../utils.js';
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-328d58fb.js';
|
|
4
|
+
export { defaultAccessor, defaultFilterFn, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from '../utils.js';
|
|
5
5
|
export { Option } from '../components/option/Component.js';
|
|
6
6
|
export { BaseOption } from '../components/base-option/Component.js';
|
|
7
7
|
export { OptionsList } from '../components/options-list/Component.js';
|
|
@@ -12,33 +12,3 @@ export { BaseSelect } from '../components/base-select/Component.js';
|
|
|
12
12
|
export { Optgroup } from '../components/optgroup/Component.js';
|
|
13
13
|
export { Footer } from '../components/footer/Component.js';
|
|
14
14
|
export { Search } from '../components/search/Component.js';
|
|
15
|
-
import 'react';
|
|
16
|
-
import '@alfalab/core-components-skeleton/modern';
|
|
17
|
-
import 'intersection-observer';
|
|
18
|
-
import '../consts.js';
|
|
19
|
-
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
20
|
-
import '@alfalab/core-components-button/modern/desktop';
|
|
21
|
-
import '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
22
|
-
import 'classnames';
|
|
23
|
-
import '@alfalab/core-components-checkbox/modern';
|
|
24
|
-
import '../components/checkmark/Component.js';
|
|
25
|
-
import '@alfalab/core-components-badge/modern';
|
|
26
|
-
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
27
|
-
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
28
|
-
import '../components/checkmark-mobile/Component.js';
|
|
29
|
-
import '../components/base-checkmark/Component.js';
|
|
30
|
-
import 'react-merge-refs';
|
|
31
|
-
import '@alfalab/core-components-mq/modern';
|
|
32
|
-
import '@alfalab/core-components-scrollbar/modern';
|
|
33
|
-
import '@alfalab/core-components-shared/modern';
|
|
34
|
-
import 'react-virtual';
|
|
35
|
-
import '@alfalab/hooks';
|
|
36
|
-
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
37
|
-
import '@juggle/resize-observer';
|
|
38
|
-
import 'compute-scroll-into-view';
|
|
39
|
-
import 'downshift';
|
|
40
|
-
import '../components/native-select/Component.js';
|
|
41
|
-
import '@alfalab/core-components-base-modal/modern';
|
|
42
|
-
import '@alfalab/core-components-button/modern/mobile';
|
|
43
|
-
import '@alfalab/core-components-input/modern';
|
|
44
|
-
import '@alfalab/icons-glyph/MagnifierMIcon';
|
package/modern/utils.d.ts
CHANGED
|
@@ -38,4 +38,30 @@ declare function defaultFilterFn(optionText: string, search: string): boolean;
|
|
|
38
38
|
declare function defaultAccessor(option: OptionShape): string;
|
|
39
39
|
declare function usePrevious<T>(value: T): T | undefined;
|
|
40
40
|
declare const lastIndexOf: <T>(array: T[], predicate: (item: T) => boolean) => number;
|
|
41
|
-
|
|
41
|
+
declare function getSelectTestIds(dataTestId: string): {
|
|
42
|
+
select: string;
|
|
43
|
+
option: string;
|
|
44
|
+
optionsList: string;
|
|
45
|
+
clearButton: string;
|
|
46
|
+
applyButton: string;
|
|
47
|
+
field: string;
|
|
48
|
+
fieldFormControl: string;
|
|
49
|
+
fieldLeftAddons: string;
|
|
50
|
+
fieldRightAddons: string;
|
|
51
|
+
fieldError: string;
|
|
52
|
+
fieldHint: string;
|
|
53
|
+
searchInput: string;
|
|
54
|
+
searchFormControl: string;
|
|
55
|
+
searchInner: string;
|
|
56
|
+
searchLeftAddons: string;
|
|
57
|
+
searchRightAddons: string;
|
|
58
|
+
searchError: string;
|
|
59
|
+
searchHint: string;
|
|
60
|
+
bottomSheet: string;
|
|
61
|
+
bottomSheetHeader: string;
|
|
62
|
+
bottomSheetContent: string;
|
|
63
|
+
modal: string;
|
|
64
|
+
modalHeader: string;
|
|
65
|
+
modalContent: string;
|
|
66
|
+
};
|
|
67
|
+
export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, defaultFilterFn, defaultAccessor, usePrevious, lastIndexOf, getSelectTestIds };
|
package/modern/utils.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { isValidElement, cloneElement, useEffect, useRef } from 'react';
|
|
2
|
+
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
2
3
|
|
|
3
4
|
const isGroup = (item) => Object.prototype.hasOwnProperty.call(item, 'options');
|
|
4
5
|
const isOptionShape = (item) => !!item && Object.prototype.hasOwnProperty.call(item, 'key');
|
|
@@ -106,5 +107,33 @@ const lastIndexOf = (array, predicate) => {
|
|
|
106
107
|
}
|
|
107
108
|
return -1;
|
|
108
109
|
};
|
|
110
|
+
function getSelectTestIds(dataTestId) {
|
|
111
|
+
return {
|
|
112
|
+
select: dataTestId,
|
|
113
|
+
option: getDataTestId(dataTestId, 'option'),
|
|
114
|
+
optionsList: getDataTestId(dataTestId, 'options-list'),
|
|
115
|
+
clearButton: getDataTestId(dataTestId, 'options-list-clear'),
|
|
116
|
+
applyButton: getDataTestId(dataTestId, 'options-list-apply'),
|
|
117
|
+
field: getDataTestId(dataTestId, 'field'),
|
|
118
|
+
fieldFormControl: getDataTestId(dataTestId, 'field-form-control'),
|
|
119
|
+
fieldLeftAddons: getDataTestId(dataTestId, 'field-form-control-left-addons'),
|
|
120
|
+
fieldRightAddons: getDataTestId(dataTestId, 'field-form-control-right-addons'),
|
|
121
|
+
fieldError: getDataTestId(dataTestId, 'field-form-control-error-message'),
|
|
122
|
+
fieldHint: getDataTestId(dataTestId, 'field-form-control-hint'),
|
|
123
|
+
searchInput: getDataTestId(dataTestId, 'search'),
|
|
124
|
+
searchFormControl: getDataTestId(dataTestId, 'search-form-control'),
|
|
125
|
+
searchInner: getDataTestId(dataTestId, 'search-form-control-inner'),
|
|
126
|
+
searchLeftAddons: getDataTestId(dataTestId, 'search-form-control-left-addons'),
|
|
127
|
+
searchRightAddons: getDataTestId(dataTestId, 'search-form-control-right-addons'),
|
|
128
|
+
searchError: getDataTestId(dataTestId, 'search-form-control-error-message'),
|
|
129
|
+
searchHint: getDataTestId(dataTestId, 'search-form-control-hint'),
|
|
130
|
+
bottomSheet: getDataTestId(dataTestId, 'bottom-sheet'),
|
|
131
|
+
bottomSheetHeader: getDataTestId(dataTestId, 'bottom-sheet-header'),
|
|
132
|
+
bottomSheetContent: getDataTestId(dataTestId, 'bottom-sheet-content'),
|
|
133
|
+
modal: getDataTestId(dataTestId, 'modal'),
|
|
134
|
+
modalHeader: getDataTestId(dataTestId, 'modal-header'),
|
|
135
|
+
modalContent: getDataTestId(dataTestId, 'modal-content'),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
109
138
|
|
|
110
|
-
export { defaultAccessor, defaultFilterFn, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions };
|
|
139
|
+
export { defaultAccessor, defaultFilterFn, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alfalab/core-components-select",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.2.0",
|
|
4
4
|
"description": "Select component",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"license": "MIT",
|
|
@@ -17,12 +17,12 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@alfalab/core-components-badge": "^5.5.1",
|
|
19
19
|
"@alfalab/core-components-base-modal": "^5.7.2",
|
|
20
|
-
"@alfalab/core-components-bottom-sheet": "^6.
|
|
21
|
-
"@alfalab/core-components-button": "^11.
|
|
20
|
+
"@alfalab/core-components-bottom-sheet": "^6.14.0",
|
|
21
|
+
"@alfalab/core-components-button": "^11.2.0",
|
|
22
22
|
"@alfalab/core-components-checkbox": "^4.1.1",
|
|
23
|
-
"@alfalab/core-components-form-control": "^12.0
|
|
24
|
-
"@alfalab/core-components-input": "^14.
|
|
25
|
-
"@alfalab/core-components-modal": "^9.1.
|
|
23
|
+
"@alfalab/core-components-form-control": "^12.1.0",
|
|
24
|
+
"@alfalab/core-components-input": "^14.2.0",
|
|
25
|
+
"@alfalab/core-components-modal": "^9.1.1",
|
|
26
26
|
"@alfalab/core-components-mq": "^4.2.0",
|
|
27
27
|
"@alfalab/core-components-popover": "^6.2.1",
|
|
28
28
|
"@alfalab/core-components-scrollbar": "^3.0.0",
|