@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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: hr27r */
|
|
2
2
|
:root {
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
|
-
--color-light-border-primary: #
|
|
5
|
-
--color-light-border-secondary: #
|
|
6
|
-
--color-light-text-secondary: rgba(
|
|
4
|
+
--color-light-border-primary: #d5d6dc;
|
|
5
|
+
--color-light-border-secondary: #e7e8ec;
|
|
6
|
+
--color-light-text-secondary: rgba(4, 4, 19, 0.55); /* 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 */
|
|
7
7
|
} :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 */
|
|
8
8
|
} :root {
|
|
9
9
|
} :root {
|
|
@@ -35,34 +35,34 @@
|
|
|
35
35
|
/* checkmark */
|
|
36
36
|
|
|
37
37
|
/* optgroup */
|
|
38
|
-
} .
|
|
38
|
+
} .select__virtualOptionsList_1o6ad {
|
|
39
39
|
width: 100%;
|
|
40
40
|
outline: none;
|
|
41
41
|
box-sizing: border-box;
|
|
42
42
|
position: sticky;
|
|
43
|
-
} .
|
|
43
|
+
} .select__virtualOptionsListHeader_1o6ad {
|
|
44
44
|
box-sizing: border-box;
|
|
45
45
|
border-bottom: 1px solid var(--color-light-border-secondary);
|
|
46
|
-
} .
|
|
46
|
+
} .select__virtualOptionsListFooter_1o6ad {
|
|
47
47
|
position: sticky;
|
|
48
48
|
bottom: 0;
|
|
49
49
|
box-sizing: border-box;
|
|
50
50
|
border-top: 1px solid transparent
|
|
51
|
-
} .
|
|
51
|
+
} .select__virtualOptionsListFooter_1o6ad.select__withBorder_1o6ad {
|
|
52
52
|
border-top: 1px solid var(--color-light-border-secondary);
|
|
53
|
-
} .
|
|
53
|
+
} .select__scrollable_1o6ad {
|
|
54
54
|
position: relative;
|
|
55
55
|
overflow: auto;
|
|
56
56
|
width: 100%;
|
|
57
|
-
} .
|
|
57
|
+
} .select__inner_1o6ad {
|
|
58
58
|
position: relative;
|
|
59
59
|
width: 100%;
|
|
60
|
-
} .
|
|
60
|
+
} .select__virtualRow_1o6ad {
|
|
61
61
|
position: absolute;
|
|
62
62
|
top: 0;
|
|
63
63
|
left: 0;
|
|
64
64
|
width: 100%
|
|
65
|
-
} .
|
|
65
|
+
} .select__virtualRow_1o6ad:before {
|
|
66
66
|
content: '';
|
|
67
67
|
position: absolute;
|
|
68
68
|
z-index: 1;
|
|
@@ -72,15 +72,15 @@
|
|
|
72
72
|
height: 1px;
|
|
73
73
|
background: var(--select-option-divider-background);
|
|
74
74
|
display: var(--select-option-divider-display);
|
|
75
|
-
} .
|
|
75
|
+
} .select__virtualRow_1o6ad:first-child:before {
|
|
76
76
|
display: none;
|
|
77
|
-
} .
|
|
78
|
-
.
|
|
77
|
+
} .select__highlighted_1o6ad:before,
|
|
78
|
+
.select__highlighted_1o6ad + .select__virtualRow_1o6ad:before {
|
|
79
79
|
display: none;
|
|
80
|
-
} .
|
|
80
|
+
} .select__emptyPlaceholder_1o6ad {
|
|
81
81
|
padding: var(--gap-m) var(--gap-s);
|
|
82
82
|
color: var(--select-options-list-empty-placeholder-color);
|
|
83
|
-
} .
|
|
84
|
-
.
|
|
83
|
+
} .select__l_1o6ad .select__emptyPlaceholder_1o6ad,
|
|
84
|
+
.select__xl_1o6ad .select__emptyPlaceholder_1o6ad {
|
|
85
85
|
padding: var(--gap-xl) var(--gap-m);
|
|
86
86
|
}
|
|
@@ -3,8 +3,9 @@ import 'react';
|
|
|
3
3
|
import 'react-merge-refs';
|
|
4
4
|
import 'react-virtual';
|
|
5
5
|
import 'classnames';
|
|
6
|
+
import '@alfalab/core-components-mq/modern';
|
|
6
7
|
import '@alfalab/core-components-scrollbar/modern';
|
|
7
|
-
import '@alfalab/
|
|
8
|
+
import '@alfalab/core-components-shared/modern';
|
|
8
9
|
import '../../consts.js';
|
|
9
10
|
import '../../utils.js';
|
|
10
11
|
import '../optgroup/Component.js';
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
export { SelectDesktop } from '
|
|
1
|
+
export { SelectDesktop } from '../Component.desktop.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '@alfalab/core-components-form-control/modern/desktop';
|
|
4
|
-
import '
|
|
4
|
+
import '@alfalab/core-components-popover/modern';
|
|
5
|
+
import '../components/arrow/Component.js';
|
|
5
6
|
import 'classnames';
|
|
6
7
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
7
|
-
import '
|
|
8
|
+
import '../components/base-select/Component.js';
|
|
8
9
|
import 'react-merge-refs';
|
|
9
10
|
import '@juggle/resize-observer';
|
|
11
|
+
import 'compute-scroll-into-view';
|
|
10
12
|
import 'downshift';
|
|
11
|
-
import '@alfalab/core-components-popover/modern';
|
|
12
13
|
import '@alfalab/core-components-shared/modern';
|
|
13
14
|
import '@alfalab/hooks';
|
|
14
|
-
import '
|
|
15
|
-
import '
|
|
16
|
-
import '
|
|
17
|
-
import '
|
|
18
|
-
import '
|
|
19
|
-
import '
|
|
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';
|
|
20
21
|
import '@alfalab/core-components-badge/modern';
|
|
21
22
|
import '@alfalab/core-components-checkbox/modern';
|
|
22
23
|
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
23
24
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
24
|
-
import '
|
|
25
|
-
import '
|
|
25
|
+
import '../components/checkmark-mobile/Component.js';
|
|
26
|
+
import '../components/options-list/Component.js';
|
|
27
|
+
import '@alfalab/core-components-mq/modern';
|
|
26
28
|
import '@alfalab/core-components-scrollbar/modern';
|
|
27
|
-
import '
|
|
28
|
-
import '
|
|
29
|
+
import '../consts.js';
|
|
30
|
+
import '../components/search/Component.js';
|
|
29
31
|
import '@alfalab/core-components-input/modern';
|
|
30
32
|
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { forwardRef, useCallback, useEffect, useState, useMemo, useRef } from 'react';
|
|
2
|
-
import { defaultAccessor,
|
|
2
|
+
import { defaultAccessor, defaultFilterFn, processOptions } from './utils.js';
|
|
3
3
|
import { OptionsList } from './components/options-list/Component.js';
|
|
4
4
|
import { DEFAULT_VISIBLE_OPTIONS } from './consts.js';
|
|
5
5
|
import { Footer } from './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
@@ -47,9 +47,13 @@ const OptionsListWithApply = forwardRef(({ toggleMenu, getOptionProps: defaultGe
|
|
|
47
47
|
const SELECT_ALL_KEY = 'select_all';
|
|
48
48
|
const selectAllOption = { key: SELECT_ALL_KEY, content: 'Выбрать все' };
|
|
49
49
|
function useSelectWithApply({ options, selected, onChange = () => null, OptionsList, optionsListProps = {}, showClear = true, showSelectAll = false, showHeaderWithSelectAll = false, showSearch, searchProps = {}, }) {
|
|
50
|
-
const [
|
|
50
|
+
const [searchState, setSearchState] = useState('');
|
|
51
|
+
const [search, setSearch] = typeof searchProps?.value === 'string'
|
|
52
|
+
? [searchProps.value, searchProps.onChange]
|
|
53
|
+
: [searchState, setSearchState];
|
|
51
54
|
const accessor = searchProps.accessor || defaultAccessor;
|
|
52
|
-
const
|
|
55
|
+
const filterFn = searchProps.filterFn || defaultFilterFn;
|
|
56
|
+
const { flatOptions, selectedOptions } = useMemo(() => processOptions(options, selected, showSearch ? (option) => filterFn(accessor(option), search) : undefined), [filterFn, accessor, options, search, selected, showSearch]);
|
|
53
57
|
const [selectedDraft, setSelectedDraft] = useState(selectedOptions);
|
|
54
58
|
const selectedOptionsRef = useRef(selectedOptions);
|
|
55
59
|
const handleApply = () => {
|
|
@@ -81,9 +81,10 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
81
81
|
showSearch: boolean | undefined;
|
|
82
82
|
searchProps: {
|
|
83
83
|
value: string;
|
|
84
|
-
onChange:
|
|
85
|
-
componentProps?: import("
|
|
84
|
+
onChange: ((value: string) => void) | undefined;
|
|
85
|
+
componentProps?: import("./typings").SearchProps | undefined;
|
|
86
86
|
accessor?: ((option: OptionShape) => string) | undefined;
|
|
87
|
+
filterFn?: ((optionText: string, search: string) => boolean) | undefined;
|
|
87
88
|
} | undefined;
|
|
88
89
|
};
|
|
89
90
|
export { UseSelectWithApplyProps, SELECT_ALL_KEY, useSelectWithApply };
|
package/modern/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { SelectResponsive as Select
|
|
2
|
-
export {};
|
|
1
|
+
export { SelectResponsive as Select } from "./Component.responsive";
|
|
2
|
+
export type { SelectProps } from "./typings";
|
package/modern/index.js
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
export { SelectResponsive as Select } from './Component.responsive.js';
|
|
2
2
|
import 'react';
|
|
3
|
-
import '@alfalab/
|
|
3
|
+
import '@alfalab/core-components-mq/modern';
|
|
4
4
|
import './Component.desktop.js';
|
|
5
5
|
import '@alfalab/core-components-form-control/modern/desktop';
|
|
6
|
+
import '@alfalab/core-components-popover/modern';
|
|
6
7
|
import './components/arrow/Component.js';
|
|
7
8
|
import 'classnames';
|
|
8
9
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
9
10
|
import './components/base-select/Component.js';
|
|
10
11
|
import 'react-merge-refs';
|
|
11
12
|
import '@juggle/resize-observer';
|
|
13
|
+
import 'compute-scroll-into-view';
|
|
12
14
|
import 'downshift';
|
|
13
|
-
import '@alfalab/core-components-popover/modern';
|
|
14
15
|
import '@alfalab/core-components-shared/modern';
|
|
16
|
+
import '@alfalab/hooks';
|
|
15
17
|
import './utils.js';
|
|
16
18
|
import './components/native-select/Component.js';
|
|
17
19
|
import './components/field/Component.js';
|
|
@@ -30,16 +32,15 @@ import './components/search/Component.js';
|
|
|
30
32
|
import '@alfalab/core-components-input/modern';
|
|
31
33
|
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
32
34
|
import './Component.mobile.js';
|
|
33
|
-
import '@alfalab/core-components-form-control/modern/mobile';
|
|
34
|
-
import './components/base-select-mobile/Component.js';
|
|
35
35
|
import '@alfalab/core-components-bottom-sheet/modern';
|
|
36
|
-
import '@alfalab/core-components-
|
|
37
|
-
import '
|
|
36
|
+
import '@alfalab/core-components-form-control/modern/mobile';
|
|
37
|
+
import '@alfalab/core-components-modal/modern/Component.mobile';
|
|
38
|
+
import './components/footer/Component.js';
|
|
38
39
|
import '@alfalab/core-components-base-modal/modern';
|
|
39
40
|
import '@alfalab/core-components-button/modern/mobile';
|
|
40
41
|
import './components/virtual-options-list/Component.js';
|
|
41
42
|
import 'react-virtual';
|
|
42
|
-
import './hook-
|
|
43
|
+
import './hook-4a3d365d.js';
|
|
43
44
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
44
45
|
import '@alfalab/core-components-button/modern/desktop';
|
|
45
46
|
import './presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
export { SelectMobile } from '../Component.mobile.js';
|
|
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/Component.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-4a3d365d.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,6 +1,6 @@
|
|
|
1
1
|
export { useSelectWithLoading } from './useSelectWithLoading/hook.js';
|
|
2
2
|
export { useLazyLoading } from './useLazyLoading/hook.js';
|
|
3
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-4a3d365d.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '@alfalab/core-components-skeleton/modern';
|
|
6
6
|
import '../components/option/Component.js';
|
|
@@ -15,8 +15,9 @@ import 'intersection-observer';
|
|
|
15
15
|
import '../utils.js';
|
|
16
16
|
import '../components/options-list/Component.js';
|
|
17
17
|
import 'react-merge-refs';
|
|
18
|
+
import '@alfalab/core-components-mq/modern';
|
|
18
19
|
import '@alfalab/core-components-scrollbar/modern';
|
|
19
|
-
import '@alfalab/
|
|
20
|
+
import '@alfalab/core-components-shared/modern';
|
|
20
21
|
import '../consts.js';
|
|
21
22
|
import '../components/optgroup/Component.js';
|
|
22
23
|
import './useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '../../utils.js';
|
|
3
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-4a3d365d.js';
|
|
4
4
|
import '../../components/options-list/Component.js';
|
|
5
5
|
import 'react-merge-refs';
|
|
6
6
|
import 'classnames';
|
|
7
|
+
import '@alfalab/core-components-mq/modern';
|
|
7
8
|
import '@alfalab/core-components-scrollbar/modern';
|
|
8
|
-
import '@alfalab/
|
|
9
|
+
import '@alfalab/core-components-shared/modern';
|
|
9
10
|
import '../../consts.js';
|
|
10
11
|
import '../../components/optgroup/Component.js';
|
|
11
12
|
import './options-list-with-apply/footer/Component.js';
|
|
@@ -1,13 +1,14 @@
|
|
|
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-4a3d365d.js';
|
|
5
5
|
import './footer/Component.js';
|
|
6
6
|
import './header/Component.js';
|
|
7
7
|
import 'react-merge-refs';
|
|
8
8
|
import 'classnames';
|
|
9
|
+
import '@alfalab/core-components-mq/modern';
|
|
9
10
|
import '@alfalab/core-components-scrollbar/modern';
|
|
10
|
-
import '@alfalab/
|
|
11
|
+
import '@alfalab/core-components-shared/modern';
|
|
11
12
|
import '../../../utils.js';
|
|
12
13
|
import '../../../components/optgroup/Component.js';
|
|
13
14
|
import '@alfalab/core-components-button/modern/desktop';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonDesktop } from '@alfalab/core-components-button/modern/desktop';
|
|
3
3
|
|
|
4
|
-
const styles = {"footer":"
|
|
4
|
+
const styles = {"footer":"select__footer_o7lyx"};
|
|
5
5
|
require('./index.css')
|
|
6
6
|
|
|
7
7
|
const Footer = ({ handleApply, handleClear, showClear, selectedDraft = [], }) => (React.createElement("div", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1avs6 */
|
|
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_o7lyx {
|
|
21
21
|
background-color: var(--color-light-bg-primary);
|
|
22
22
|
padding: var(--gap-s);
|
|
23
23
|
outline: none
|
|
24
|
-
} .
|
|
24
|
+
} .select__footer_o7lyx > * + * {
|
|
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_1y3b9","mobile":"select__mobile_1y3b9"};
|
|
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: bjmos */
|
|
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_1y3b9 {
|
|
20
20
|
padding: var(--gap-s);
|
|
21
|
-
} .
|
|
21
|
+
} .select__mobile_1y3b9 {
|
|
22
22
|
padding: var(--gap-s) var(--gap-xs);
|
|
23
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-4a3d365d";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
export { O as OptionsListWithApply } from '../../../hook-
|
|
1
|
+
export { O as OptionsListWithApply } from '../../../hook-4a3d365d.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../../../utils.js';
|
|
4
4
|
import '../../../components/options-list/Component.js';
|
|
5
5
|
import 'react-merge-refs';
|
|
6
6
|
import 'classnames';
|
|
7
|
+
import '@alfalab/core-components-mq/modern';
|
|
7
8
|
import '@alfalab/core-components-scrollbar/modern';
|
|
8
|
-
import '@alfalab/
|
|
9
|
+
import '@alfalab/core-components-shared/modern';
|
|
9
10
|
import '../../../consts.js';
|
|
10
11
|
import '../../../components/optgroup/Component.js';
|
|
11
12
|
import './footer/Component.js';
|
|
@@ -9,7 +9,7 @@ import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
|
9
9
|
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
10
10
|
import '../../components/checkmark-mobile/Component.js';
|
|
11
11
|
|
|
12
|
-
const styles = {"skeleton":"
|
|
12
|
+
const styles = {"skeleton":"select__skeleton_iqksk"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
function useSelectWithLoading({ loading = false, visibleOptions = 6, Option: Option$1 = Option, }) {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "../presets/index";
|
|
2
|
+
export * from "../typings";
|
|
3
|
+
export * from "../utils";
|
|
4
|
+
export * from "../components/option/index";
|
|
5
|
+
export * from "../components/base-option/index";
|
|
6
|
+
export * from "../components/options-list/index";
|
|
7
|
+
export * from "../components/virtual-options-list/index";
|
|
8
|
+
export * from "../components/field/index";
|
|
9
|
+
export * from "../components/arrow/index";
|
|
10
|
+
export * from "../components/base-select/index";
|
|
11
|
+
export * from "../components/optgroup/index";
|
|
12
|
+
export * from "../components/footer/index";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export { useSelectWithLoading } from '../presets/useSelectWithLoading/hook.js';
|
|
2
|
+
export { useLazyLoading } from '../presets/useLazyLoading/hook.js';
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-4a3d365d.js';
|
|
4
|
+
export { defaultAccessor, defaultFilterFn, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from '../utils.js';
|
|
5
|
+
export { Option } from '../components/option/Component.js';
|
|
6
|
+
export { BaseOption } from '../components/base-option/Component.js';
|
|
7
|
+
export { OptionsList } from '../components/options-list/Component.js';
|
|
8
|
+
export { VirtualOptionsList } from '../components/virtual-options-list/Component.js';
|
|
9
|
+
export { Field } from '../components/field/Component.js';
|
|
10
|
+
export { Arrow } from '../components/arrow/Component.js';
|
|
11
|
+
export { BaseSelect } from '../components/base-select/Component.js';
|
|
12
|
+
export { Optgroup } from '../components/optgroup/Component.js';
|
|
13
|
+
export { Footer } from '../components/footer/Component.js';
|
|
14
|
+
import 'react';
|
|
15
|
+
import '@alfalab/core-components-skeleton/modern';
|
|
16
|
+
import 'intersection-observer';
|
|
17
|
+
import '../consts.js';
|
|
18
|
+
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
19
|
+
import '@alfalab/core-components-button/modern/desktop';
|
|
20
|
+
import '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
21
|
+
import 'classnames';
|
|
22
|
+
import '@alfalab/core-components-checkbox/modern';
|
|
23
|
+
import '../components/checkmark/Component.js';
|
|
24
|
+
import '@alfalab/core-components-badge/modern';
|
|
25
|
+
import '@alfalab/icons-glyph/CheckmarkCircleMIcon';
|
|
26
|
+
import '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
27
|
+
import '../components/checkmark-mobile/Component.js';
|
|
28
|
+
import '../components/base-checkmark/Component.js';
|
|
29
|
+
import 'react-merge-refs';
|
|
30
|
+
import '@alfalab/core-components-mq/modern';
|
|
31
|
+
import '@alfalab/core-components-scrollbar/modern';
|
|
32
|
+
import '@alfalab/core-components-shared/modern';
|
|
33
|
+
import 'react-virtual';
|
|
34
|
+
import '@alfalab/hooks';
|
|
35
|
+
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
36
|
+
import '@juggle/resize-observer';
|
|
37
|
+
import 'compute-scroll-into-view';
|
|
38
|
+
import 'downshift';
|
|
39
|
+
import '../components/native-select/Component.js';
|
|
40
|
+
import '@alfalab/core-components-base-modal/modern';
|
|
41
|
+
import '@alfalab/core-components-button/modern/mobile';
|
package/modern/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 };
|