@alfalab/core-components-select 15.2.3 → 16.0.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.desktop.d.ts +3 -16
- package/Component.desktop.js +4 -2
- package/Component.mobile.d.ts +3 -39
- package/Component.mobile.js +23 -10
- package/Component.modal.mobile.d.ts +2 -58
- package/Component.modal.mobile.js +23 -35
- package/Component.responsive.d.ts +3 -17
- package/Component.responsive.js +11 -13
- package/components/arrow/Component.js +1 -1
- package/components/arrow/index.css +5 -5
- 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 +16 -16
- package/components/base-select/Component.d.ts +17 -2
- package/components/base-select/Component.js +188 -81
- package/components/base-select/index.css +12 -12
- package/components/base-select/index.js +1 -1
- package/{esm/components/base-select-mobile/index.css → components/base-select/mobile.css} +13 -22
- package/components/checkmark/Component.js +1 -1
- package/components/checkmark/index.css +11 -11
- 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 +15 -17
- package/components/footer/Component.d.ts +12 -0
- package/components/{base-select-mobile/footer → footer}/Component.js +6 -5
- package/{modern/components/base-select-mobile → components}/footer/index.css +6 -6
- package/components/footer/index.d.ts +1 -0
- package/components/{base-select-mobile/footer → footer}/index.js +3 -2
- package/components/index.js +2 -1
- package/components/optgroup/Component.js +1 -1
- package/components/optgroup/index.css +7 -7
- package/components/option/Component.js +1 -1
- package/components/option/index.css +24 -24
- package/components/options-list/Component.js +7 -3
- package/components/options-list/index.css +11 -11
- package/components/options-list/index.js +2 -1
- package/components/search/Component.d.ts +2 -4
- package/components/search/Component.js +1 -1
- package/components/search/index.css +2 -2
- package/components/virtual-options-list/Component.js +7 -3
- package/components/virtual-options-list/index.css +18 -18
- package/components/virtual-options-list/index.js +2 -1
- package/cssm/Component.desktop.d.ts +3 -16
- package/cssm/Component.desktop.js +5 -2
- package/cssm/Component.mobile.d.ts +3 -39
- package/cssm/Component.mobile.js +27 -13
- package/cssm/Component.modal.mobile.d.ts +2 -58
- package/cssm/Component.modal.mobile.js +28 -39
- package/cssm/Component.responsive.d.ts +3 -17
- package/cssm/Component.responsive.js +13 -15
- package/cssm/components/arrow/index.module.css +2 -2
- package/cssm/components/base-option/index.module.css +3 -3
- package/cssm/components/base-select/Component.d.ts +17 -2
- package/cssm/components/base-select/Component.js +186 -80
- package/cssm/components/base-select/index.js +2 -1
- package/cssm/components/base-select/index.module.css +2 -2
- package/cssm/components/{base-select-mobile/index.module.css → base-select/mobile.module.css} +0 -9
- package/cssm/components/checkmark/index.module.css +1 -1
- package/cssm/components/field/index.module.css +3 -5
- package/cssm/components/footer/Component.d.ts +12 -0
- package/cssm/components/{base-select-mobile/footer → footer}/Component.js +5 -4
- package/cssm/components/footer/index.d.ts +1 -0
- package/cssm/components/{base-select-mobile/footer → footer}/index.js +3 -2
- package/cssm/components/{base-select-mobile/footer → footer}/index.module.css +1 -1
- package/cssm/components/index.js +3 -1
- package/cssm/components/optgroup/index.module.css +1 -1
- package/cssm/components/option/index.module.css +4 -4
- package/cssm/components/options-list/Component.js +6 -2
- package/cssm/components/options-list/index.js +2 -1
- package/cssm/components/options-list/index.module.css +2 -2
- package/cssm/components/search/Component.d.ts +2 -4
- package/cssm/components/virtual-options-list/Component.js +6 -2
- package/cssm/components/virtual-options-list/index.js +2 -1
- package/cssm/components/virtual-options-list/index.module.css +3 -3
- package/cssm/desktop/index.d.ts +2 -0
- package/cssm/desktop/index.js +51 -0
- package/cssm/{hook-244c8d6e.js → hook-2f9ec939.js} +9 -5
- package/{esm/hook-8abfea97.d.ts → cssm/hook-ad89c253.d.ts} +3 -2
- package/cssm/index.d.ts +2 -2
- package/cssm/index.js +10 -9
- package/cssm/mobile/index.d.ts +3 -0
- package/cssm/mobile/index.js +67 -0
- package/cssm/presets/index.d.ts +1 -1
- package/cssm/presets/index.js +3 -2
- package/cssm/presets/useSelectWithApply/hook.js +3 -2
- package/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +3 -2
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +3 -2
- package/cssm/shared/index.d.ts +12 -0
- package/cssm/shared/index.js +87 -0
- package/cssm/typings.d.ts +86 -7
- package/desktop/index.d.ts +2 -0
- package/{desktop.js → desktop/index.js} +16 -14
- package/desktop/package.json +3 -0
- package/esm/Component.desktop.d.ts +3 -16
- package/esm/Component.desktop.js +4 -2
- package/esm/Component.mobile.d.ts +3 -39
- package/esm/Component.mobile.js +22 -9
- package/esm/Component.modal.mobile.d.ts +2 -58
- package/esm/Component.modal.mobile.js +24 -36
- package/esm/Component.responsive.d.ts +3 -17
- package/esm/Component.responsive.js +11 -13
- package/esm/components/arrow/Component.js +1 -1
- package/esm/components/arrow/index.css +5 -5
- 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 +16 -16
- package/esm/components/base-select/Component.d.ts +17 -2
- package/esm/components/base-select/Component.js +190 -83
- package/esm/components/base-select/index.css +12 -12
- package/esm/components/base-select/index.js +1 -1
- package/{components/base-select-mobile/index.css → esm/components/base-select/mobile.css} +13 -22
- package/esm/components/checkmark/Component.js +1 -1
- package/esm/components/checkmark/index.css +11 -11
- 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 +15 -17
- package/esm/components/footer/Component.d.ts +12 -0
- package/esm/components/{base-select-mobile/footer → footer}/Component.js +6 -5
- package/{components/base-select-mobile → esm/components}/footer/index.css +6 -6
- package/esm/components/footer/index.d.ts +1 -0
- package/esm/components/{base-select-mobile/footer → footer}/index.js +1 -0
- package/esm/components/index.js +2 -1
- package/esm/components/optgroup/Component.js +1 -1
- package/esm/components/optgroup/index.css +7 -7
- package/esm/components/option/Component.js +1 -1
- package/esm/components/option/index.css +24 -24
- package/esm/components/options-list/Component.js +7 -3
- package/esm/components/options-list/index.css +11 -11
- package/esm/components/options-list/index.js +2 -1
- package/esm/components/search/Component.d.ts +2 -4
- package/esm/components/search/Component.js +1 -1
- package/esm/components/search/index.css +2 -2
- package/esm/components/virtual-options-list/Component.js +7 -3
- package/esm/components/virtual-options-list/index.css +18 -18
- package/esm/components/virtual-options-list/index.js +2 -1
- package/esm/desktop/index.d.ts +2 -0
- package/esm/{desktop.js → desktop/index.js} +16 -14
- package/esm/{hook-e63a15d0.js → hook-8209d0d1.js} +10 -6
- package/{cssm/hook-8abfea97.d.ts → esm/hook-ad89c253.d.ts} +3 -2
- package/esm/index.d.ts +2 -2
- package/esm/index.js +8 -7
- package/esm/mobile/index.d.ts +3 -0
- package/esm/mobile/index.js +44 -0
- package/esm/presets/index.d.ts +1 -1
- package/esm/presets/index.js +3 -2
- package/esm/presets/useSelectWithApply/hook.js +3 -2
- package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +3 -2
- 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 +3 -2
- package/esm/presets/useSelectWithLoading/hook.js +1 -1
- package/esm/presets/useSelectWithLoading/index.css +2 -2
- package/esm/shared/index.d.ts +12 -0
- package/esm/shared/index.js +42 -0
- package/esm/typings.d.ts +86 -7
- package/{hook-8abfea97.d.ts → hook-ad89c253.d.ts} +3 -2
- package/{hook-74d61833.js → hook-cb17586d.js} +9 -5
- package/index.d.ts +2 -2
- package/index.js +8 -7
- package/mobile/index.d.ts +3 -0
- package/mobile/index.js +53 -0
- package/mobile/package.json +3 -0
- package/modern/Component.desktop.d.ts +3 -16
- package/modern/Component.desktop.js +5 -3
- package/modern/Component.mobile.d.ts +3 -39
- package/modern/Component.mobile.js +29 -13
- package/modern/Component.modal.mobile.d.ts +2 -58
- package/modern/Component.modal.mobile.js +23 -43
- package/modern/Component.responsive.d.ts +3 -17
- package/modern/Component.responsive.js +11 -13
- package/modern/components/arrow/Component.js +1 -1
- package/modern/components/arrow/index.css +5 -5
- 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 +16 -16
- package/modern/components/base-select/Component.d.ts +17 -2
- package/modern/components/base-select/Component.js +179 -72
- package/modern/components/base-select/index.css +12 -12
- package/modern/components/base-select/index.js +1 -1
- package/modern/components/{base-select-mobile/index.css → base-select/mobile.css} +13 -22
- package/modern/components/checkmark/Component.js +1 -1
- package/modern/components/checkmark/index.css +11 -11
- 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 +15 -17
- package/modern/components/footer/Component.d.ts +12 -0
- package/modern/components/{base-select-mobile/footer → footer}/Component.js +5 -4
- package/{esm/components/base-select-mobile → modern/components}/footer/index.css +6 -6
- package/modern/components/footer/index.d.ts +1 -0
- package/modern/components/{base-select-mobile/footer → footer}/index.js +1 -0
- package/modern/components/index.js +2 -1
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +7 -7
- package/modern/components/option/Component.js +1 -1
- package/modern/components/option/index.css +24 -24
- package/modern/components/options-list/Component.js +5 -3
- package/modern/components/options-list/index.css +11 -11
- package/modern/components/options-list/index.js +2 -1
- package/modern/components/search/Component.d.ts +2 -4
- 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 -3
- package/modern/components/virtual-options-list/index.css +18 -18
- package/modern/components/virtual-options-list/index.js +2 -1
- package/modern/desktop/index.d.ts +2 -0
- package/modern/{desktop.js → desktop/index.js} +16 -14
- package/modern/{hook-5e1db0b0.js → hook-4a3d365d.js} +7 -3
- package/modern/{hook-8abfea97.d.ts → hook-ad89c253.d.ts} +3 -2
- package/modern/index.d.ts +2 -2
- package/modern/index.js +8 -7
- package/modern/mobile/index.d.ts +3 -0
- package/modern/mobile/index.js +43 -0
- package/modern/presets/index.d.ts +1 -1
- package/modern/presets/index.js +3 -2
- package/modern/presets/useSelectWithApply/hook.js +3 -2
- package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +3 -2
- 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 +3 -2
- package/modern/presets/useSelectWithLoading/hook.js +1 -1
- package/modern/presets/useSelectWithLoading/index.css +2 -2
- package/modern/shared/index.d.ts +12 -0
- package/modern/shared/index.js +41 -0
- package/modern/typings.d.ts +86 -7
- package/package.json +12 -10
- package/presets/index.d.ts +1 -1
- package/presets/index.js +3 -2
- package/presets/useSelectWithApply/hook.js +3 -2
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +3 -2
- 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 +3 -2
- package/presets/useSelectWithLoading/hook.js +1 -1
- package/presets/useSelectWithLoading/index.css +2 -2
- package/shared/index.d.ts +12 -0
- package/{shared.js → shared/index.js} +44 -43
- package/shared/package.json +3 -0
- package/src/Component.desktop.tsx +5 -14
- package/src/Component.mobile.tsx +38 -57
- package/src/Component.modal.mobile.tsx +5 -147
- package/src/Component.responsive.tsx +9 -44
- package/src/components/base-select/Component.tsx +380 -156
- package/src/components/base-select/index.module.css +1 -1
- package/src/components/{base-select-mobile/index.module.css → base-select/mobile.module.css} +0 -15
- package/src/components/{base-select-mobile/footer → footer}/Component.tsx +22 -4
- package/src/components/{base-select-mobile/footer → footer}/index.module.css +1 -1
- package/src/components/footer/index.ts +1 -0
- package/src/components/options-list/Component.tsx +6 -2
- package/src/components/virtual-options-list/Component.tsx +6 -2
- package/src/desktop/index.ts +2 -0
- package/src/desktop/package.json +3 -0
- package/src/index.ts +2 -4
- package/src/mobile/index.ts +4 -0
- package/src/mobile/package.json +3 -0
- package/src/presets/useSelectWithApply/hook.tsx +9 -3
- package/src/shared/index.ts +13 -0
- package/src/shared/package.json +3 -0
- package/src/typings.ts +110 -9
- package/src/vars.css +1 -1
- package/typings.d.ts +86 -7
- package/Component-89f0cb07.d.ts +0 -38
- package/Component.mobile-ebda875c.d.ts +0 -6
- package/Component.mobile-f1f15074.d.ts +0 -404
- package/components/base-select-mobile/Component.d.ts +0 -70
- package/components/base-select-mobile/Component.js +0 -296
- package/components/base-select-mobile/footer/Component.d.ts +0 -9
- package/components/base-select-mobile/footer/index.d.ts +0 -1
- package/components/base-select-mobile/index.d.ts +0 -1
- package/components/base-select-mobile/index.js +0 -36
- package/cssm/Component-89f0cb07.d.ts +0 -38
- package/cssm/Component.mobile-ebda875c.d.ts +0 -6
- package/cssm/Component.mobile-f1f15074.d.ts +0 -404
- package/cssm/components/base-select-mobile/Component.d.ts +0 -70
- package/cssm/components/base-select-mobile/Component.js +0 -303
- package/cssm/components/base-select-mobile/footer/Component.d.ts +0 -9
- package/cssm/components/base-select-mobile/footer/index.d.ts +0 -1
- package/cssm/components/base-select-mobile/index.d.ts +0 -1
- package/cssm/components/base-select-mobile/index.js +0 -45
- package/cssm/desktop-69921c40.d.ts +0 -6
- package/cssm/desktop.d.ts +0 -2
- package/cssm/desktop.js +0 -48
- package/cssm/index-ebda875c.d.ts +0 -2
- package/cssm/mobile-96988a65.d.ts +0 -2
- package/cssm/mobile.d.ts +0 -5
- package/cssm/mobile.js +0 -62
- package/cssm/shared.d.ts +0 -5
- package/cssm/shared.js +0 -85
- package/cssm/typings-89f0cb07.d.ts +0 -93
- package/cssm/typings-baf4875b.d.ts +0 -52
- package/desktop-69921c40.d.ts +0 -6
- package/desktop.d.ts +0 -2
- package/esm/Component-89f0cb07.d.ts +0 -38
- package/esm/Component.mobile-ebda875c.d.ts +0 -6
- package/esm/Component.mobile-f1f15074.d.ts +0 -404
- package/esm/components/base-select-mobile/Component.d.ts +0 -70
- package/esm/components/base-select-mobile/Component.js +0 -286
- package/esm/components/base-select-mobile/footer/Component.d.ts +0 -9
- package/esm/components/base-select-mobile/footer/index.d.ts +0 -1
- package/esm/components/base-select-mobile/index.d.ts +0 -1
- package/esm/components/base-select-mobile/index.js +0 -28
- package/esm/desktop-69921c40.d.ts +0 -6
- package/esm/desktop.d.ts +0 -2
- package/esm/index-ebda875c.d.ts +0 -2
- package/esm/mobile-96988a65.d.ts +0 -2
- package/esm/mobile.d.ts +0 -5
- package/esm/mobile.js +0 -40
- package/esm/shared.d.ts +0 -5
- package/esm/shared.js +0 -41
- package/esm/typings-89f0cb07.d.ts +0 -93
- package/esm/typings-baf4875b.d.ts +0 -52
- package/index-ebda875c.d.ts +0 -2
- package/mobile-96988a65.d.ts +0 -2
- package/mobile.d.ts +0 -5
- package/mobile.js +0 -49
- package/modern/Component-89f0cb07.d.ts +0 -38
- package/modern/Component.mobile-ebda875c.d.ts +0 -6
- package/modern/Component.mobile-f1f15074.d.ts +0 -404
- package/modern/components/base-select-mobile/Component.d.ts +0 -70
- package/modern/components/base-select-mobile/Component.js +0 -285
- package/modern/components/base-select-mobile/footer/Component.d.ts +0 -9
- package/modern/components/base-select-mobile/footer/index.d.ts +0 -1
- package/modern/components/base-select-mobile/index.d.ts +0 -1
- package/modern/components/base-select-mobile/index.js +0 -27
- package/modern/desktop-69921c40.d.ts +0 -6
- package/modern/desktop.d.ts +0 -2
- package/modern/index-ebda875c.d.ts +0 -2
- package/modern/mobile-96988a65.d.ts +0 -2
- package/modern/mobile.d.ts +0 -5
- package/modern/mobile.js +0 -39
- package/modern/shared.d.ts +0 -5
- package/modern/shared.js +0 -40
- package/modern/typings-89f0cb07.d.ts +0 -93
- package/modern/typings-baf4875b.d.ts +0 -52
- package/shared.d.ts +0 -5
- package/src/components/base-select-mobile/Component.tsx +0 -572
- package/src/components/base-select-mobile/footer/index.ts +0 -1
- package/src/components/base-select-mobile/index.ts +0 -1
- package/src/desktop.ts +0 -1
- package/src/mobile.ts +0 -5
- package/src/shared.ts +0 -5
- package/typings-89f0cb07.d.ts +0 -93
- package/typings-baf4875b.d.ts +0 -52
- /package/cssm/{hook-244c8d6e.d.ts → hook-2f9ec939.d.ts} +0 -0
- /package/esm/{hook-e63a15d0.d.ts → hook-8209d0d1.d.ts} +0 -0
- /package/{hook-74d61833.d.ts → hook-cb17586d.d.ts} +0 -0
- /package/modern/{hook-5e1db0b0.d.ts → hook-4a3d365d.d.ts} +0 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var presets_useSelectWithLoading_hook = require('../presets/useSelectWithLoading/hook.js');
|
|
6
|
+
var presets_useLazyLoading_hook = require('../presets/useLazyLoading/hook.js');
|
|
7
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-2f9ec939.js');
|
|
8
|
+
var utils = require('../utils.js');
|
|
9
|
+
var components_option_Component = require('../components/option/Component.js');
|
|
10
|
+
var components_baseOption_Component = require('../components/base-option/Component.js');
|
|
11
|
+
var components_optionsList_Component = require('../components/options-list/Component.js');
|
|
12
|
+
var components_virtualOptionsList_Component = require('../components/virtual-options-list/Component.js');
|
|
13
|
+
var components_field_Component = require('../components/field/Component.js');
|
|
14
|
+
var components_arrow_Component = require('../components/arrow/Component.js');
|
|
15
|
+
var components_baseSelect_Component = require('../components/base-select/Component.js');
|
|
16
|
+
var components_optgroup_Component = require('../components/optgroup/Component.js');
|
|
17
|
+
var components_footer_Component = require('../components/footer/Component.js');
|
|
18
|
+
require('tslib');
|
|
19
|
+
require('react');
|
|
20
|
+
require('@alfalab/core-components-skeleton/cssm');
|
|
21
|
+
require('../presets/useSelectWithLoading/index.module.css');
|
|
22
|
+
require('intersection-observer');
|
|
23
|
+
require('../consts.js');
|
|
24
|
+
require('../presets/useSelectWithApply/options-list-with-apply/footer/Component.js');
|
|
25
|
+
require('@alfalab/core-components-button/cssm/desktop');
|
|
26
|
+
require('../presets/useSelectWithApply/options-list-with-apply/footer/index.module.css');
|
|
27
|
+
require('../presets/useSelectWithApply/options-list-with-apply/header/Component.js');
|
|
28
|
+
require('classnames');
|
|
29
|
+
require('@alfalab/core-components-checkbox/cssm');
|
|
30
|
+
require('../presets/useSelectWithApply/options-list-with-apply/header/index.module.css');
|
|
31
|
+
require('../components/checkmark/Component.js');
|
|
32
|
+
require('@alfalab/core-components-badge/cssm');
|
|
33
|
+
require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
34
|
+
require('@alfalab/icons-glyph/CheckmarkMIcon');
|
|
35
|
+
require('../components/checkmark/index.module.css');
|
|
36
|
+
require('../components/checkmark-mobile/Component.js');
|
|
37
|
+
require('../components/checkmark-mobile/index.module.css');
|
|
38
|
+
require('../components/option/index.module.css');
|
|
39
|
+
require('../components/base-checkmark/Component.js');
|
|
40
|
+
require('../components/base-checkmark/index.module.css');
|
|
41
|
+
require('../components/base-option/index.module.css');
|
|
42
|
+
require('react-merge-refs');
|
|
43
|
+
require('@alfalab/core-components-mq/cssm');
|
|
44
|
+
require('@alfalab/core-components-scrollbar/cssm');
|
|
45
|
+
require('@alfalab/core-components-shared/cssm');
|
|
46
|
+
require('../components/options-list/index.module.css');
|
|
47
|
+
require('react-virtual');
|
|
48
|
+
require('../components/virtual-options-list/index.module.css');
|
|
49
|
+
require('@alfalab/hooks');
|
|
50
|
+
require('../components/field/index.module.css');
|
|
51
|
+
require('@alfalab/icons-glyph/ChevronDownMIcon');
|
|
52
|
+
require('../components/arrow/index.module.css');
|
|
53
|
+
require('@juggle/resize-observer');
|
|
54
|
+
require('compute-scroll-into-view');
|
|
55
|
+
require('downshift');
|
|
56
|
+
require('../components/native-select/Component.js');
|
|
57
|
+
require('../components/base-select/index.module.css');
|
|
58
|
+
require('../components/base-select/mobile.module.css');
|
|
59
|
+
require('../components/optgroup/index.module.css');
|
|
60
|
+
require('@alfalab/core-components-base-modal/cssm');
|
|
61
|
+
require('@alfalab/core-components-button/cssm/mobile');
|
|
62
|
+
require('../components/footer/index.module.css');
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
exports.useSelectWithLoading = presets_useSelectWithLoading_hook.useSelectWithLoading;
|
|
67
|
+
exports.useLazyLoading = presets_useLazyLoading_hook.useLazyLoading;
|
|
68
|
+
exports.SELECT_ALL_KEY = presets_useSelectWithApply_optionsListWithApply_Component.SELECT_ALL_KEY;
|
|
69
|
+
exports.useSelectWithApply = presets_useSelectWithApply_optionsListWithApply_Component.useSelectWithApply;
|
|
70
|
+
exports.defaultAccessor = utils.defaultAccessor;
|
|
71
|
+
exports.defaultFilterFn = utils.defaultFilterFn;
|
|
72
|
+
exports.isGroup = utils.isGroup;
|
|
73
|
+
exports.isOptionShape = utils.isOptionShape;
|
|
74
|
+
exports.joinOptions = utils.joinOptions;
|
|
75
|
+
exports.lastIndexOf = utils.lastIndexOf;
|
|
76
|
+
exports.processOptions = utils.processOptions;
|
|
77
|
+
exports.usePrevious = utils.usePrevious;
|
|
78
|
+
exports.useVisibleOptions = utils.useVisibleOptions;
|
|
79
|
+
exports.Option = components_option_Component.Option;
|
|
80
|
+
exports.BaseOption = components_baseOption_Component.BaseOption;
|
|
81
|
+
exports.OptionsList = components_optionsList_Component.OptionsList;
|
|
82
|
+
exports.VirtualOptionsList = components_virtualOptionsList_Component.VirtualOptionsList;
|
|
83
|
+
exports.Field = components_field_Component.Field;
|
|
84
|
+
exports.Arrow = components_arrow_Component.Arrow;
|
|
85
|
+
exports.BaseSelect = components_baseSelect_Component.BaseSelect;
|
|
86
|
+
exports.Optgroup = components_optgroup_Component.Optgroup;
|
|
87
|
+
exports.Footer = components_footer_Component.Footer;
|
package/cssm/typings.d.ts
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { AriaAttributes, FC, FocusEvent, MouseEvent, ReactElement, ReactNode, RefAttributes, SVGProps } from 'react';
|
|
2
|
+
import { BottomSheetProps } from "@alfalab/core-components-bottom-sheet";
|
|
3
|
+
import { FormControlProps } from "@alfalab/core-components-form-control";
|
|
2
4
|
import { InputProps } from "@alfalab/core-components-input";
|
|
5
|
+
import { ModalProps } from "@alfalab/core-components-modal";
|
|
6
|
+
import { ModalFooterProps, ModalHeaderProps } from "@alfalab/core-components-modal/shared";
|
|
3
7
|
import { PopoverProps } from "@alfalab/core-components-popover";
|
|
8
|
+
import { UseSelectWithApplyProps } from "./hook-ad89c253";
|
|
4
9
|
type AnyObject = Record<string, any>;
|
|
5
10
|
type OptionShape = {
|
|
6
11
|
/**
|
|
@@ -217,13 +222,14 @@ type BaseSelectProps = {
|
|
|
217
222
|
/**
|
|
218
223
|
* Компонент поиска
|
|
219
224
|
*/
|
|
220
|
-
Search?: FC<SearchProps
|
|
225
|
+
Search?: FC<SearchProps>;
|
|
221
226
|
/**
|
|
222
227
|
* Настройки поиска
|
|
223
228
|
*/
|
|
224
229
|
searchProps?: {
|
|
225
230
|
componentProps?: SearchProps;
|
|
226
231
|
accessor?: (option: OptionShape) => string;
|
|
232
|
+
filterFn?: (optionText: string, search: string) => boolean;
|
|
227
233
|
value?: string;
|
|
228
234
|
onChange?: (value: string) => void;
|
|
229
235
|
};
|
|
@@ -528,10 +534,10 @@ type OptionProps = {
|
|
|
528
534
|
*/
|
|
529
535
|
innerProps: {
|
|
530
536
|
id: string;
|
|
531
|
-
onClick
|
|
532
|
-
onMouseDown
|
|
533
|
-
onMouseMove
|
|
534
|
-
role
|
|
537
|
+
onClick?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
538
|
+
onMouseDown?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
539
|
+
onMouseMove?: (event: MouseEvent<HTMLDivElement>) => void;
|
|
540
|
+
role?: string;
|
|
535
541
|
} & RefAttributes<HTMLDivElement> & AriaAttributes;
|
|
536
542
|
/**
|
|
537
543
|
* Идентификатор для систем автоматизированного тестирования
|
|
@@ -572,5 +578,78 @@ type CheckmarkProps = {
|
|
|
572
578
|
*/
|
|
573
579
|
icon?: FC<SVGProps<SVGSVGElement>>;
|
|
574
580
|
};
|
|
575
|
-
type SearchProps = InputProps
|
|
576
|
-
|
|
581
|
+
type SearchProps = InputProps & RefAttributes<HTMLInputElement>;
|
|
582
|
+
type SelectFieldProps = Omit<FormControlProps, 'size'> & Record<string, unknown>;
|
|
583
|
+
type AdditionalMobileProps = {
|
|
584
|
+
/**
|
|
585
|
+
* Показывать кнопку 'Сбросить' в футере мобильного компонента
|
|
586
|
+
*/
|
|
587
|
+
showClear?: UseSelectWithApplyProps['showClear'];
|
|
588
|
+
/**
|
|
589
|
+
* Показывать пункт "Выбрать все"
|
|
590
|
+
*/
|
|
591
|
+
showSelectAll?: UseSelectWithApplyProps['showSelectAll'];
|
|
592
|
+
/**
|
|
593
|
+
* Показывать пункт "Выбрать все" в заголовке списка у мобильного компонента
|
|
594
|
+
*/
|
|
595
|
+
showHeaderWithSelectAll?: UseSelectWithApplyProps['showHeaderWithSelectAll'];
|
|
596
|
+
/**
|
|
597
|
+
* Использовать ли хук useSelectWithApply в мобильном компоненте
|
|
598
|
+
*/
|
|
599
|
+
useWithApplyHook?: boolean;
|
|
600
|
+
};
|
|
601
|
+
type BottomSheetSelectMobileProps = {
|
|
602
|
+
/**
|
|
603
|
+
* Футер
|
|
604
|
+
* @deprecated Используйте bottomSheetProps.actionButton
|
|
605
|
+
*/
|
|
606
|
+
footer?: ReactNode;
|
|
607
|
+
/**
|
|
608
|
+
* Будет ли свайпаться шторка
|
|
609
|
+
* @deprecated Используйте bottomSheetProps.swipeable
|
|
610
|
+
*/
|
|
611
|
+
swipeable?: boolean;
|
|
612
|
+
/**
|
|
613
|
+
* Дополнительные пропсы шторки
|
|
614
|
+
*/
|
|
615
|
+
bottomSheetProps?: Partial<BottomSheetProps>;
|
|
616
|
+
};
|
|
617
|
+
type ModalSelectMobileProps = {
|
|
618
|
+
/**
|
|
619
|
+
* Дополнительные пропсы шапки модалки
|
|
620
|
+
*/
|
|
621
|
+
modalHeaderProps?: Partial<ModalHeaderProps>;
|
|
622
|
+
/**
|
|
623
|
+
* Дополнительные пропсы модалки
|
|
624
|
+
*/
|
|
625
|
+
modalProps?: Partial<ModalProps & RefAttributes<HTMLDivElement>>;
|
|
626
|
+
/**
|
|
627
|
+
* Дополнительные пропсы футера модалки
|
|
628
|
+
*/
|
|
629
|
+
modalFooterProps?: Partial<ModalFooterProps>;
|
|
630
|
+
};
|
|
631
|
+
type ConditionalMobileProps = ({
|
|
632
|
+
isBottomSheet?: true;
|
|
633
|
+
} & BottomSheetSelectMobileProps) | ({
|
|
634
|
+
isBottomSheet: false;
|
|
635
|
+
} & ModalSelectMobileProps);
|
|
636
|
+
type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark'> & AdditionalMobileProps & ModalSelectMobileProps;
|
|
637
|
+
type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark'> & AdditionalMobileProps & ConditionalMobileProps;
|
|
638
|
+
type SelectDesktopProps = Omit<BaseSelectProps, 'fieldProps'> & {
|
|
639
|
+
/**
|
|
640
|
+
* Пропсы, которые будут прокинуты в компонент поля
|
|
641
|
+
*/
|
|
642
|
+
fieldProps?: SelectFieldProps;
|
|
643
|
+
};
|
|
644
|
+
type SelectProps = BaseSelectProps & AdditionalMobileProps & ConditionalMobileProps & {
|
|
645
|
+
/**
|
|
646
|
+
* Контрольная точка, с нее начинается desktop версия
|
|
647
|
+
* @default 1024
|
|
648
|
+
*/
|
|
649
|
+
breakpoint?: number;
|
|
650
|
+
/**
|
|
651
|
+
* Значение по-умолчанию для хука useMatchMedia
|
|
652
|
+
*/
|
|
653
|
+
defaultMatchMediaValue?: boolean | (() => boolean);
|
|
654
|
+
};
|
|
655
|
+
export { AnyObject, OptionShape, GroupShape, BaseSelectChangePayload, BaseSelectProps, FieldProps, ArrowProps, OptionsListProps, OptgroupProps, OptionProps, CheckmarkProps, SearchProps, SelectFieldProps, AdditionalMobileProps, BottomSheetSelectMobileProps, ModalSelectMobileProps, SelectModalMobileProps, SelectMobileProps, SelectDesktopProps, SelectProps };
|
|
@@ -2,35 +2,37 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var Component_desktop = require('
|
|
5
|
+
var Component_desktop = require('../Component.desktop.js');
|
|
6
6
|
require('tslib');
|
|
7
7
|
require('react');
|
|
8
8
|
require('@alfalab/core-components-form-control/desktop');
|
|
9
|
-
require('
|
|
9
|
+
require('@alfalab/core-components-popover');
|
|
10
|
+
require('../components/arrow/Component.js');
|
|
10
11
|
require('classnames');
|
|
11
12
|
require('@alfalab/icons-glyph/ChevronDownMIcon');
|
|
12
|
-
require('
|
|
13
|
+
require('../components/base-select/Component.js');
|
|
13
14
|
require('react-merge-refs');
|
|
14
15
|
require('@juggle/resize-observer');
|
|
16
|
+
require('compute-scroll-into-view');
|
|
15
17
|
require('downshift');
|
|
16
|
-
require('@alfalab/core-components-popover');
|
|
17
18
|
require('@alfalab/core-components-shared');
|
|
18
19
|
require('@alfalab/hooks');
|
|
19
|
-
require('
|
|
20
|
-
require('
|
|
21
|
-
require('
|
|
22
|
-
require('
|
|
23
|
-
require('
|
|
24
|
-
require('
|
|
20
|
+
require('../utils.js');
|
|
21
|
+
require('../components/native-select/Component.js');
|
|
22
|
+
require('../components/field/Component.js');
|
|
23
|
+
require('../components/optgroup/Component.js');
|
|
24
|
+
require('../components/option/Component.js');
|
|
25
|
+
require('../components/checkmark/Component.js');
|
|
25
26
|
require('@alfalab/core-components-badge');
|
|
26
27
|
require('@alfalab/core-components-checkbox');
|
|
27
28
|
require('@alfalab/icons-glyph/CheckmarkCircleMIcon');
|
|
28
29
|
require('@alfalab/icons-glyph/CheckmarkMIcon');
|
|
29
|
-
require('
|
|
30
|
-
require('
|
|
30
|
+
require('../components/checkmark-mobile/Component.js');
|
|
31
|
+
require('../components/options-list/Component.js');
|
|
32
|
+
require('@alfalab/core-components-mq');
|
|
31
33
|
require('@alfalab/core-components-scrollbar');
|
|
32
|
-
require('
|
|
33
|
-
require('
|
|
34
|
+
require('../consts.js');
|
|
35
|
+
require('../components/search/Component.js');
|
|
34
36
|
require('@alfalab/core-components-input');
|
|
35
37
|
require('@alfalab/icons-glyph/MagnifierMIcon');
|
|
36
38
|
|
|
@@ -1,19 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
type FormControlDesktopProps = Omit<BaseFormControlProps, "styles" | "colorStyles">;
|
|
6
|
-
type SelectFieldProps = Omit<FormControlDesktopProps, 'size'> & Record<string, unknown>;
|
|
7
|
-
type SelectDesktopProps = Omit<BaseSelectProps, 'fieldProps'> & {
|
|
8
|
-
/**
|
|
9
|
-
* Пропсы, которые будут прокинуты в компонент поля
|
|
10
|
-
*/
|
|
11
|
-
fieldProps?: SelectFieldProps;
|
|
12
|
-
};
|
|
13
|
-
declare const SelectDesktop: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "fieldProps"> & {
|
|
14
|
-
/**
|
|
15
|
-
* Пропсы, которые будут прокинуты в компонент поля
|
|
16
|
-
*/
|
|
17
|
-
fieldProps?: SelectFieldProps | undefined;
|
|
3
|
+
declare const SelectDesktop: React.ForwardRefExoticComponent<Omit<import("./typings").BaseSelectProps, "fieldProps"> & {
|
|
4
|
+
fieldProps?: import("./typings").SelectFieldProps | undefined;
|
|
18
5
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
export {
|
|
6
|
+
export { SelectDesktop };
|
package/esm/Component.desktop.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import { FormControlDesktop } from '@alfalab/core-components-form-control/esm/desktop';
|
|
4
|
+
import { Popover } from '@alfalab/core-components-popover/esm';
|
|
4
5
|
import { Arrow } from './components/arrow/Component.js';
|
|
5
6
|
import { BaseSelect } from './components/base-select/Component.js';
|
|
6
7
|
import { Field } from './components/field/Component.js';
|
|
@@ -12,8 +13,8 @@ import 'classnames';
|
|
|
12
13
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
13
14
|
import 'react-merge-refs';
|
|
14
15
|
import '@juggle/resize-observer';
|
|
16
|
+
import 'compute-scroll-into-view';
|
|
15
17
|
import 'downshift';
|
|
16
|
-
import '@alfalab/core-components-popover/esm';
|
|
17
18
|
import '@alfalab/core-components-shared/esm';
|
|
18
19
|
import '@alfalab/hooks';
|
|
19
20
|
import './utils.js';
|
|
@@ -24,6 +25,7 @@ import '@alfalab/core-components-checkbox/esm';
|
|
|
24
25
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
25
26
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
26
27
|
import './components/checkmark-mobile/Component.js';
|
|
28
|
+
import '@alfalab/core-components-mq/esm';
|
|
27
29
|
import '@alfalab/core-components-scrollbar/esm';
|
|
28
30
|
import './consts.js';
|
|
29
31
|
import '@alfalab/core-components-input/esm';
|
|
@@ -31,7 +33,7 @@ import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
|
31
33
|
|
|
32
34
|
var SelectDesktop = forwardRef(function (_a, ref) {
|
|
33
35
|
var _b = _a.Arrow, Arrow$1 = _b === void 0 ? Arrow : _b, _c = _a.Field, Field$1 = _c === void 0 ? Field : _c, _d = _a.OptionsList, OptionsList$1 = _d === void 0 ? OptionsList : _d, _e = _a.Optgroup, Optgroup$1 = _e === void 0 ? Optgroup : _e, _f = _a.Option, Option$1 = _f === void 0 ? Option : _f, _g = _a.Search, Search$1 = _g === void 0 ? Search : _g, _h = _a.fieldProps, fieldProps = _h === void 0 ? {} : _h, restProps = __rest(_a, ["Arrow", "Field", "OptionsList", "Optgroup", "Option", "Search", "fieldProps"]);
|
|
34
|
-
return (React.createElement(BaseSelect, __assign({ ref: ref, Option: Option$1, Field: Field$1, fieldProps: __assign({ FormControlComponent: FormControlDesktop }, fieldProps), Search: Search$1, Optgroup: Optgroup$1, OptionsList: OptionsList$1, Arrow: Arrow$1 }, restProps)));
|
|
36
|
+
return (React.createElement(BaseSelect, __assign({ ref: ref, view: 'desktop', Option: Option$1, Field: Field$1, fieldProps: __assign({ FormControlComponent: FormControlDesktop }, fieldProps), Search: Search$1, Optgroup: Optgroup$1, OptionsList: OptionsList$1, Arrow: Arrow$1, Popover: Popover }, restProps)));
|
|
35
37
|
});
|
|
36
38
|
|
|
37
39
|
export { SelectDesktop };
|
|
@@ -1,41 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
import { BaseSelectProps } from "./typings";
|
|
7
|
-
type AdditionalMobileProps = {
|
|
8
|
-
/**
|
|
9
|
-
* Футер
|
|
10
|
-
* @deprecated Используйте bottomSheetProps.actionButton
|
|
11
|
-
*/
|
|
12
|
-
footer?: ReactNode;
|
|
13
|
-
/**
|
|
14
|
-
* Будет ли свайпаться шторка
|
|
15
|
-
* @deprecated Используйте bottomSheetProps.swipeable
|
|
16
|
-
*/
|
|
17
|
-
swipeable?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Дополнительные пропсы шторки
|
|
20
|
-
*/
|
|
21
|
-
bottomSheetProps?: Partial<BottomSheetProps>;
|
|
22
|
-
/**
|
|
23
|
-
* Показывать кнопку очистки
|
|
24
|
-
*/
|
|
25
|
-
showClear?: UseSelectWithApplyProps['showClear'];
|
|
26
|
-
/**
|
|
27
|
-
* Показывать пункт "Выбрать все"
|
|
28
|
-
*/
|
|
29
|
-
showSelectAll?: UseSelectWithApplyProps['showSelectAll'];
|
|
30
|
-
/**
|
|
31
|
-
* Показывать пункт "Выбрать все" в заголовке списка
|
|
32
|
-
*/
|
|
33
|
-
showHeaderWithSelectAll?: UseSelectWithApplyProps['showHeaderWithSelectAll'];
|
|
34
|
-
/**
|
|
35
|
-
* Использовать ли хук useSelectWithApply
|
|
36
|
-
*/
|
|
37
|
-
useWithApplyHook?: boolean;
|
|
38
|
-
};
|
|
39
|
-
type SelectMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & AdditionalMobileProps;
|
|
40
|
-
declare const SelectMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & AdditionalMobileProps & React.RefAttributes<unknown>>;
|
|
41
|
-
export { AdditionalMobileProps, SelectMobileProps, SelectMobile };
|
|
3
|
+
import { SelectMobileProps } from "./typings";
|
|
4
|
+
declare const SelectMobile: React.ForwardRefExoticComponent<SelectMobileProps & React.RefAttributes<unknown>>;
|
|
5
|
+
export { SelectMobile };
|
package/esm/Component.mobile.js
CHANGED
|
@@ -1,34 +1,38 @@
|
|
|
1
1
|
import { __rest, __assign } from 'tslib';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
|
+
import { BottomSheet } from '@alfalab/core-components-bottom-sheet/esm';
|
|
3
4
|
import { FormControlMobile } from '@alfalab/core-components-form-control/esm/mobile';
|
|
5
|
+
import { ModalMobile } from '@alfalab/core-components-modal/esm/Component.mobile';
|
|
4
6
|
import { Arrow } from './components/arrow/Component.js';
|
|
5
|
-
import {
|
|
6
|
-
import { Footer } from './components/base-select-mobile/footer/Component.js';
|
|
7
|
+
import { BaseSelect } from './components/base-select/Component.js';
|
|
7
8
|
import { Field } from './components/field/Component.js';
|
|
9
|
+
import { Footer } from './components/footer/Component.js';
|
|
8
10
|
import { Optgroup } from './components/optgroup/Component.js';
|
|
9
11
|
import { Option } from './components/option/Component.js';
|
|
10
12
|
import { OptionsList } from './components/options-list/Component.js';
|
|
11
13
|
import { Search } from './components/search/Component.js';
|
|
12
14
|
import { VirtualOptionsList } from './components/virtual-options-list/Component.js';
|
|
13
|
-
import { u as useSelectWithApply } from './hook-
|
|
15
|
+
import { u as useSelectWithApply } from './hook-8209d0d1.js';
|
|
14
16
|
import { Header } from './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
15
17
|
import 'classnames';
|
|
16
18
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
17
19
|
import 'react-merge-refs';
|
|
20
|
+
import '@juggle/resize-observer';
|
|
21
|
+
import 'compute-scroll-into-view';
|
|
18
22
|
import 'downshift';
|
|
19
|
-
import '@alfalab/core-components-bottom-sheet/esm';
|
|
20
|
-
import '@alfalab/core-components-modal/esm/mobile';
|
|
21
23
|
import '@alfalab/core-components-shared/esm';
|
|
24
|
+
import '@alfalab/hooks';
|
|
22
25
|
import './utils.js';
|
|
26
|
+
import './components/native-select/Component.js';
|
|
23
27
|
import '@alfalab/core-components-base-modal/esm';
|
|
24
28
|
import '@alfalab/core-components-button/esm/mobile';
|
|
25
|
-
import '@alfalab/hooks';
|
|
26
29
|
import './components/checkmark/Component.js';
|
|
27
30
|
import '@alfalab/core-components-badge/esm';
|
|
28
31
|
import '@alfalab/core-components-checkbox/esm';
|
|
29
32
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
30
33
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
31
34
|
import './components/checkmark-mobile/Component.js';
|
|
35
|
+
import '@alfalab/core-components-mq/esm';
|
|
32
36
|
import '@alfalab/core-components-scrollbar/esm';
|
|
33
37
|
import './consts.js';
|
|
34
38
|
import '@alfalab/core-components-input/esm';
|
|
@@ -39,9 +43,11 @@ import '@alfalab/core-components-button/esm/desktop';
|
|
|
39
43
|
|
|
40
44
|
var VIRTUAL_OPTIONS_LIST_THRESHOLD = 30;
|
|
41
45
|
var SelectMobile = forwardRef(function (_a, ref) {
|
|
42
|
-
var _b = _a.autocomplete, autocomplete = _b === void 0 ? false : _b, _c = _a.multiple, multiple = _c === void 0 ? false : _c, _d = _a.allowUnselect, allowUnselect = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.closeOnSelect, closeOnSelect = _f === void 0 ? !multiple : _f, _g = _a.circularNavigation, circularNavigation = _g === void 0 ? false : _g, _h = _a.defaultOpen, defaultOpen = _h === void 0 ? false : _h, openProp = _a.open, _j = _a.size, size = _j === void 0 ? 'm' : _j, _k = _a.optionsSize, optionsSize = _k === void 0 ? 'm' : _k, _l = _a.fieldProps, fieldProps = _l === void 0 ? {} : _l, _m = _a.optionProps, optionProps = _m === void 0 ? {} : _m, _o = _a.optionsListProps, optionsListProps = _o === void 0 ? {} : _o, _p = _a.Arrow, Arrow$1 = _p === void 0 ? Arrow : _p, _q = _a.Field, Field$1 = _q === void 0 ? Field : _q, _r = _a.Optgroup, Optgroup$1 = _r === void 0 ? Optgroup : _r, _s = _a.Option, Option$1 = _s === void 0 ? Option : _s, _t = _a.Search, Search$1 = _t === void 0 ? Search : _t, selected = _a.selected, options = _a.options,
|
|
46
|
+
var _b = _a.autocomplete, autocomplete = _b === void 0 ? false : _b, _c = _a.multiple, multiple = _c === void 0 ? false : _c, _d = _a.allowUnselect, allowUnselect = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.closeOnSelect, closeOnSelect = _f === void 0 ? !multiple : _f, _g = _a.circularNavigation, circularNavigation = _g === void 0 ? false : _g, _h = _a.defaultOpen, defaultOpen = _h === void 0 ? false : _h, openProp = _a.open, _j = _a.size, size = _j === void 0 ? 'm' : _j, _k = _a.optionsSize, optionsSize = _k === void 0 ? 'm' : _k, _l = _a.fieldProps, fieldProps = _l === void 0 ? {} : _l, _m = _a.optionProps, optionProps = _m === void 0 ? {} : _m, _o = _a.optionsListProps, optionsListProps = _o === void 0 ? {} : _o, _p = _a.Arrow, Arrow$1 = _p === void 0 ? Arrow : _p, _q = _a.Field, Field$1 = _q === void 0 ? Field : _q, _r = _a.Optgroup, Optgroup$1 = _r === void 0 ? Optgroup : _r, _s = _a.Option, Option$1 = _s === void 0 ? Option : _s, _t = _a.Search, Search$1 = _t === void 0 ? Search : _t, selected = _a.selected, _u = _a.isBottomSheet, isBottomSheet = _u === void 0 ? true : _u, options = _a.options, _v = _a.OptionsList, OptionsList$1 = _v === void 0 ? options.length > VIRTUAL_OPTIONS_LIST_THRESHOLD
|
|
43
47
|
? VirtualOptionsList
|
|
44
|
-
: OptionsList :
|
|
48
|
+
: OptionsList : _v, onChange = _a.onChange, _w = _a.showClear, showClear = _w === void 0 ? true : _w, showSelectAll = _a.showSelectAll, showHeaderWithSelectAll = _a.showHeaderWithSelectAll, _x = _a.useWithApplyHook, useWithApplyHook = _x === void 0 ? multiple : _x, showSearch = _a.showSearch, searchProps = _a.searchProps, restProps = __rest(_a, ["autocomplete", "multiple", "allowUnselect", "disabled", "closeOnSelect", "circularNavigation", "defaultOpen", "open", "size", "optionsSize", "fieldProps", "optionProps", "optionsListProps", "Arrow", "Field", "Optgroup", "Option", "Search", "selected", "isBottomSheet", "options", "OptionsList", "onChange", "showClear", "showSelectAll", "showHeaderWithSelectAll", "useWithApplyHook", "showSearch", "searchProps"]);
|
|
49
|
+
var typedRestBottomSheetProps = restProps;
|
|
50
|
+
var typedRestModalProps = restProps;
|
|
45
51
|
var applyProps = useSelectWithApply({
|
|
46
52
|
optionsListProps: __assign(__assign({}, optionsListProps), { Footer: Footer }),
|
|
47
53
|
OptionsList: OptionsList$1,
|
|
@@ -53,7 +59,14 @@ var SelectMobile = forwardRef(function (_a, ref) {
|
|
|
53
59
|
showClear: showClear,
|
|
54
60
|
showSelectAll: showSelectAll,
|
|
55
61
|
});
|
|
56
|
-
|
|
62
|
+
var bottomAddons = useWithApplyHook && showHeaderWithSelectAll && (React.createElement(Header, __assign({}, applyProps.optionsListProps.headerProps, { mobile: true })));
|
|
63
|
+
return (React.createElement(BaseSelect, __assign({ ref: ref, view: 'mobile', autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: __assign({ FormControlComponent: FormControlMobile }, fieldProps), optionProps: optionProps, Arrow: Arrow$1, Field: Field$1, Optgroup: Optgroup$1, Option: Option$1, Search: Search$1, isBottomSheet: isBottomSheet, options: options, selected: selected, onChange: onChange, OptionsList: OptionsList$1, showSearch: showSearch, searchProps: searchProps, BottomSheet: BottomSheet, ModalMobile: ModalMobile }, (isBottomSheet
|
|
64
|
+
? {
|
|
65
|
+
bottomSheetProps: __assign({ bottomAddons: bottomAddons }, typedRestBottomSheetProps.bottomSheetProps),
|
|
66
|
+
}
|
|
67
|
+
: {
|
|
68
|
+
modalHeaderProps: __assign({ bottomAddons: bottomAddons }, typedRestModalProps.modalHeaderProps),
|
|
69
|
+
}), { optionsListProps: optionsListProps }, restProps, (useWithApplyHook && applyProps))));
|
|
57
70
|
});
|
|
58
71
|
|
|
59
72
|
export { SelectMobile };
|
|
@@ -1,60 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import { BaseSelectProps } from "./typings";
|
|
6
|
-
type SelectModalMobileProps = Omit<BaseSelectProps, 'Checkmark' | 'onScroll'> & {
|
|
7
|
-
/**
|
|
8
|
-
* Показывать кнопку очистки
|
|
9
|
-
*/
|
|
10
|
-
showClear?: UseSelectWithApplyProps['showClear'];
|
|
11
|
-
/**
|
|
12
|
-
* Показывать пункт "Выбрать все"
|
|
13
|
-
*/
|
|
14
|
-
showSelectAll?: UseSelectWithApplyProps['showSelectAll'];
|
|
15
|
-
/**
|
|
16
|
-
* Дополнительные пропсы шапки модалки
|
|
17
|
-
*/
|
|
18
|
-
modalHeaderProps?: Partial<React.ComponentProps<typeof ModalMobile.Header>>;
|
|
19
|
-
/**
|
|
20
|
-
* Дополнительные пропсы модалки
|
|
21
|
-
*/
|
|
22
|
-
modalProps?: Partial<React.ComponentProps<typeof ModalMobile>>;
|
|
23
|
-
/**
|
|
24
|
-
* Дополнительные пропсы футера модалки
|
|
25
|
-
*/
|
|
26
|
-
modalFooterProps?: Partial<React.ComponentProps<typeof ModalMobile.Footer>>;
|
|
27
|
-
showHeaderWithSelectAll?: UseSelectWithApplyProps['showHeaderWithSelectAll'];
|
|
28
|
-
/**
|
|
29
|
-
* Использовать ли хук useSelectWithApply
|
|
30
|
-
*/
|
|
31
|
-
useWithApplyHook?: boolean;
|
|
32
|
-
};
|
|
33
|
-
declare const SelectModalMobile: React.ForwardRefExoticComponent<Omit<BaseSelectProps, "onScroll" | "Checkmark"> & {
|
|
34
|
-
/**
|
|
35
|
-
* Показывать кнопку очистки
|
|
36
|
-
*/
|
|
37
|
-
showClear?: UseSelectWithApplyProps['showClear'];
|
|
38
|
-
/**
|
|
39
|
-
* Показывать пункт "Выбрать все"
|
|
40
|
-
*/
|
|
41
|
-
showSelectAll?: UseSelectWithApplyProps['showSelectAll'];
|
|
42
|
-
/**
|
|
43
|
-
* Дополнительные пропсы шапки модалки
|
|
44
|
-
*/
|
|
45
|
-
modalHeaderProps?: Partial<import("./Component.mobile-f1f15074").HeaderProps> | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* Дополнительные пропсы модалки
|
|
48
|
-
*/
|
|
49
|
-
modalProps?: Partial<import("./typings-baf4875b").ModalMobileProps & React.RefAttributes<HTMLDivElement>> | undefined;
|
|
50
|
-
/**
|
|
51
|
-
* Дополнительные пропсы футера модалки
|
|
52
|
-
*/
|
|
53
|
-
modalFooterProps?: Partial<import("./Component.mobile-f1f15074").FooterProps> | undefined;
|
|
54
|
-
showHeaderWithSelectAll?: UseSelectWithApplyProps['showHeaderWithSelectAll'];
|
|
55
|
-
/**
|
|
56
|
-
* Использовать ли хук useSelectWithApply
|
|
57
|
-
*/
|
|
58
|
-
useWithApplyHook?: boolean | undefined;
|
|
59
|
-
} & React.RefAttributes<unknown>>;
|
|
60
|
-
export { SelectModalMobileProps, SelectModalMobile };
|
|
3
|
+
declare const SelectModalMobile: React.ForwardRefExoticComponent<Omit<import("./typings").BaseSelectProps, "Checkmark"> & import("./typings").AdditionalMobileProps & import("./typings").ModalSelectMobileProps & React.RefAttributes<unknown>>;
|
|
4
|
+
export { SelectModalMobile };
|
|
@@ -1,59 +1,47 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { __assign } from 'tslib';
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { Optgroup } from './components/optgroup/Component.js';
|
|
9
|
-
import { Option } from './components/option/Component.js';
|
|
10
|
-
import { OptionsList } from './components/options-list/Component.js';
|
|
11
|
-
import { VirtualOptionsList } from './components/virtual-options-list/Component.js';
|
|
12
|
-
import { u as useSelectWithApply } from './hook-e63a15d0.js';
|
|
13
|
-
import { Header } from './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
3
|
+
import { SelectMobile } from './Component.mobile.js';
|
|
4
|
+
import '@alfalab/core-components-bottom-sheet/esm';
|
|
5
|
+
import '@alfalab/core-components-form-control/esm/mobile';
|
|
6
|
+
import '@alfalab/core-components-modal/esm/Component.mobile';
|
|
7
|
+
import './components/arrow/Component.js';
|
|
14
8
|
import 'classnames';
|
|
15
9
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
10
|
+
import './components/base-select/Component.js';
|
|
16
11
|
import 'react-merge-refs';
|
|
12
|
+
import '@juggle/resize-observer';
|
|
13
|
+
import 'compute-scroll-into-view';
|
|
17
14
|
import 'downshift';
|
|
18
|
-
import '@alfalab/core-components-bottom-sheet/esm';
|
|
19
|
-
import '@alfalab/core-components-modal/esm/mobile';
|
|
20
15
|
import '@alfalab/core-components-shared/esm';
|
|
16
|
+
import '@alfalab/hooks';
|
|
21
17
|
import './utils.js';
|
|
22
|
-
import './components/
|
|
23
|
-
import '
|
|
24
|
-
import '
|
|
18
|
+
import './components/native-select/Component.js';
|
|
19
|
+
import './components/field/Component.js';
|
|
20
|
+
import './components/footer/Component.js';
|
|
25
21
|
import '@alfalab/core-components-base-modal/esm';
|
|
26
22
|
import '@alfalab/core-components-button/esm/mobile';
|
|
27
|
-
import '
|
|
23
|
+
import './components/optgroup/Component.js';
|
|
24
|
+
import './components/option/Component.js';
|
|
28
25
|
import './components/checkmark/Component.js';
|
|
29
26
|
import '@alfalab/core-components-badge/esm';
|
|
30
27
|
import '@alfalab/core-components-checkbox/esm';
|
|
31
28
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
32
29
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
33
30
|
import './components/checkmark-mobile/Component.js';
|
|
31
|
+
import './components/options-list/Component.js';
|
|
32
|
+
import '@alfalab/core-components-mq/esm';
|
|
34
33
|
import '@alfalab/core-components-scrollbar/esm';
|
|
35
34
|
import './consts.js';
|
|
35
|
+
import './components/search/Component.js';
|
|
36
|
+
import '@alfalab/core-components-input/esm';
|
|
37
|
+
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
38
|
+
import './components/virtual-options-list/Component.js';
|
|
36
39
|
import 'react-virtual';
|
|
40
|
+
import './hook-8209d0d1.js';
|
|
37
41
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
38
42
|
import '@alfalab/core-components-button/esm/desktop';
|
|
43
|
+
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
39
44
|
|
|
40
|
-
var
|
|
41
|
-
var SelectModalMobile = forwardRef(function (_a, ref) {
|
|
42
|
-
var _b = _a.autocomplete, autocomplete = _b === void 0 ? false : _b, _c = _a.multiple, multiple = _c === void 0 ? false : _c, _d = _a.allowUnselect, allowUnselect = _d === void 0 ? false : _d, _e = _a.disabled, disabled = _e === void 0 ? false : _e, _f = _a.closeOnSelect, closeOnSelect = _f === void 0 ? !multiple : _f, _g = _a.circularNavigation, circularNavigation = _g === void 0 ? false : _g, _h = _a.defaultOpen, defaultOpen = _h === void 0 ? false : _h, openProp = _a.open, _j = _a.size, size = _j === void 0 ? 'm' : _j, _k = _a.optionsSize, optionsSize = _k === void 0 ? 'm' : _k, _l = _a.fieldProps, fieldProps = _l === void 0 ? {} : _l, _m = _a.optionProps, optionProps = _m === void 0 ? {} : _m, _o = _a.optionsListProps, optionsListProps = _o === void 0 ? {} : _o, _p = _a.Arrow, Arrow$1 = _p === void 0 ? Arrow : _p, _q = _a.Field, Field$1 = _q === void 0 ? Field : _q, _r = _a.Optgroup, Optgroup$1 = _r === void 0 ? Optgroup : _r, _s = _a.Option, Option$1 = _s === void 0 ? Option : _s, selected = _a.selected, options = _a.options, _t = _a.OptionsList, OptionsList$1 = _t === void 0 ? options.length > VIRTUAL_OPTIONS_LIST_THRESHOLD
|
|
43
|
-
? VirtualOptionsList
|
|
44
|
-
: OptionsList : _t, onChange = _a.onChange, _u = _a.showClear, showClear = _u === void 0 ? true : _u, showSelectAll = _a.showSelectAll, _v = _a.useWithApplyHook, useWithApplyHook = _v === void 0 ? multiple : _v, modalHeaderProps = _a.modalHeaderProps, showHeaderWithSelectAll = _a.showHeaderWithSelectAll, showSearch = _a.showSearch, searchProps = _a.searchProps, restProps = __rest(_a, ["autocomplete", "multiple", "allowUnselect", "disabled", "closeOnSelect", "circularNavigation", "defaultOpen", "open", "size", "optionsSize", "fieldProps", "optionProps", "optionsListProps", "Arrow", "Field", "Optgroup", "Option", "selected", "options", "OptionsList", "onChange", "showClear", "showSelectAll", "useWithApplyHook", "modalHeaderProps", "showHeaderWithSelectAll", "showSearch", "searchProps"]);
|
|
45
|
-
var applyProps = useSelectWithApply({
|
|
46
|
-
optionsListProps: __assign(__assign({}, optionsListProps), { Footer: Footer }),
|
|
47
|
-
OptionsList: OptionsList$1,
|
|
48
|
-
selected: selected,
|
|
49
|
-
options: options,
|
|
50
|
-
onChange: onChange,
|
|
51
|
-
showSearch: showSearch,
|
|
52
|
-
searchProps: searchProps,
|
|
53
|
-
showClear: showClear,
|
|
54
|
-
showSelectAll: showSelectAll,
|
|
55
|
-
});
|
|
56
|
-
return (React.createElement(BaseSelectMobile, __assign({ ref: ref, autocomplete: autocomplete, multiple: multiple, allowUnselect: allowUnselect, disabled: disabled, closeOnSelect: closeOnSelect, circularNavigation: circularNavigation, defaultOpen: defaultOpen, open: openProp, size: size, optionsSize: optionsSize, fieldProps: __assign({ FormControlComponent: FormControlMobile }, fieldProps), 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: __assign({ bottomAddons: useWithApplyHook && showHeaderWithSelectAll && (React.createElement(Header, __assign({}, applyProps.optionsListProps.headerProps, { mobile: true }))) }, modalHeaderProps) }, restProps, (useWithApplyHook && applyProps))));
|
|
57
|
-
});
|
|
45
|
+
var SelectModalMobile = forwardRef(function (props, ref) { return (React.createElement(SelectMobile, __assign({}, props, { isBottomSheet: false, ref: ref }))); });
|
|
58
46
|
|
|
59
47
|
export { SelectModalMobile };
|
|
@@ -1,19 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Контрольная точка, с нее начинается desktop версия
|
|
8
|
-
* @default 1024
|
|
9
|
-
*/
|
|
10
|
-
breakpoint?: number;
|
|
11
|
-
};
|
|
12
|
-
declare const SelectResponsive: React.ForwardRefExoticComponent<BaseSelectProps & AdditionalMobileProps & {
|
|
13
|
-
/**
|
|
14
|
-
* Контрольная точка, с нее начинается desktop версия
|
|
15
|
-
* @default 1024
|
|
16
|
-
*/
|
|
17
|
-
breakpoint?: number | undefined;
|
|
18
|
-
} & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
-
export { SelectResponsiveProps, SelectResponsive };
|
|
3
|
+
import { SelectProps } from "./typings";
|
|
4
|
+
declare const SelectResponsive: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export { SelectResponsive };
|