@alfalab/core-components-select 17.10.1 → 17.12.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/components/arrow/Component.js +1 -1
- package/components/arrow/index.css +3 -3
- package/components/base-checkmark/Component.js +1 -1
- package/components/base-checkmark/index.css +6 -6
- package/components/base-option/Component.js +1 -1
- package/components/base-option/index.css +18 -17
- package/components/base-select/Component.js +2 -2
- package/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
- package/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
- package/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
- package/components/base-select/index.css +24 -22
- package/components/base-select/mobile.css +16 -15
- package/components/checkmark/Component.js +1 -1
- package/components/checkmark/index.css +12 -11
- package/components/checkmark-mobile/Component.js +1 -1
- package/components/checkmark-mobile/index.css +6 -6
- package/components/clear-button/Component.js +1 -1
- package/components/clear-button/index.css +6 -6
- package/components/field/Component.js +1 -1
- package/components/field/index.css +12 -12
- package/components/footer/Component.js +1 -1
- package/components/footer/index.css +5 -5
- package/components/optgroup/Component.js +1 -1
- package/components/optgroup/index.css +6 -6
- package/components/option/Component.js +1 -1
- package/components/option/index.css +21 -21
- package/components/options-list/Component.js +3 -3
- package/components/options-list/index.css +14 -11
- package/components/search/Component.js +1 -1
- package/components/search/index.css +2 -2
- package/components/virtual-options-list/Component.js +1 -1
- package/components/virtual-options-list/index.css +20 -19
- package/cssm/components/base-option/index.module.css +3 -2
- package/cssm/components/base-select/index.module.css +13 -11
- package/cssm/components/base-select/mobile.module.css +4 -3
- package/cssm/components/checkmark/index.module.css +2 -1
- package/cssm/components/option/index.module.css +2 -2
- package/cssm/components/options-list/Component.js +2 -2
- package/cssm/components/options-list/index.module.css +4 -1
- package/cssm/components/virtual-options-list/index.module.css +5 -4
- package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +3 -1
- package/cssm/presets/useSelectWithApply/options-list-with-apply/footer/vars.css +0 -0
- package/cssm/utils.d.ts +1 -1
- package/cssm/utils.js +11 -0
- package/esm/components/arrow/Component.js +1 -1
- package/esm/components/arrow/index.css +3 -3
- package/esm/components/base-checkmark/Component.js +1 -1
- package/esm/components/base-checkmark/index.css +6 -6
- package/esm/components/base-option/Component.js +1 -1
- package/esm/components/base-option/index.css +18 -17
- package/esm/components/base-select/Component.js +2 -2
- package/esm/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
- package/esm/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
- package/esm/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
- package/esm/components/base-select/index.css +24 -22
- package/esm/components/base-select/mobile.css +16 -15
- package/esm/components/checkmark/Component.js +1 -1
- package/esm/components/checkmark/index.css +12 -11
- package/esm/components/checkmark-mobile/Component.js +1 -1
- package/esm/components/checkmark-mobile/index.css +6 -6
- package/esm/components/clear-button/Component.js +1 -1
- package/esm/components/clear-button/index.css +6 -6
- package/esm/components/field/Component.js +1 -1
- package/esm/components/field/index.css +12 -12
- package/esm/components/footer/Component.js +1 -1
- package/esm/components/footer/index.css +5 -5
- package/esm/components/optgroup/Component.js +1 -1
- package/esm/components/optgroup/index.css +6 -6
- package/esm/components/option/Component.js +1 -1
- package/esm/components/option/index.css +21 -21
- package/esm/components/options-list/Component.js +3 -3
- package/esm/components/options-list/index.css +14 -11
- package/esm/components/search/Component.js +1 -1
- package/esm/components/search/index.css +2 -2
- package/esm/components/virtual-options-list/Component.js +1 -1
- package/esm/components/virtual-options-list/index.css +20 -19
- package/esm/{list-popover-desktop-446b6d5f.js → list-popover-desktop-e4b69ce0.js} +1 -1
- package/esm/mobile/Component.mobile.js +1 -1
- package/esm/mobile.module-a3e68caf.js +4 -0
- package/esm/presets/index.js +1 -1
- package/esm/presets/useSelectWithApply/hook.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/footer/index.css +6 -4
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/esm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/esm/presets/useSelectWithLoading/hook.js +1 -1
- package/esm/presets/useSelectWithLoading/index.css +2 -2
- package/esm/shared/index.js +1 -1
- package/esm/utils.d.ts +1 -1
- package/esm/utils.js +13 -2
- package/{list-popover-desktop-6bae9b47.js → list-popover-desktop-8ffefe6e.js} +1 -1
- package/mobile/Component.mobile.js +1 -1
- package/mobile.module-97d68ba9.js +6 -0
- package/modern/components/arrow/Component.js +1 -1
- package/modern/components/arrow/index.css +3 -3
- package/modern/components/base-checkmark/Component.js +1 -1
- package/modern/components/base-checkmark/index.css +6 -6
- package/modern/components/base-option/Component.js +1 -1
- package/modern/components/base-option/index.css +18 -17
- package/modern/components/base-select/Component.js +2 -2
- package/modern/components/base-select/components/list-desktop/list-popover-desktop.js +1 -1
- package/modern/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +1 -1
- package/modern/components/base-select/components/list-mobile/list-modal-mobile.js +1 -1
- package/modern/components/base-select/index.css +24 -22
- package/modern/components/base-select/mobile.css +16 -15
- package/modern/components/checkmark/Component.js +1 -1
- package/modern/components/checkmark/index.css +12 -11
- package/modern/components/checkmark-mobile/Component.js +1 -1
- package/modern/components/checkmark-mobile/index.css +6 -6
- package/modern/components/clear-button/Component.js +1 -1
- package/modern/components/clear-button/index.css +6 -6
- package/modern/components/field/Component.js +1 -1
- package/modern/components/field/index.css +12 -12
- package/modern/components/footer/Component.js +1 -1
- package/modern/components/footer/index.css +5 -5
- package/modern/components/optgroup/Component.js +1 -1
- package/modern/components/optgroup/index.css +6 -6
- package/modern/components/option/Component.js +1 -1
- package/modern/components/option/index.css +21 -21
- package/modern/components/options-list/Component.js +3 -3
- package/modern/components/options-list/index.css +14 -11
- package/modern/components/search/Component.js +1 -1
- package/modern/components/search/index.css +2 -2
- package/modern/components/virtual-options-list/Component.js +1 -1
- package/modern/components/virtual-options-list/index.css +20 -19
- package/modern/{list-popover-desktop-46e08681.js → list-popover-desktop-85370c2c.js} +1 -1
- package/modern/mobile/Component.mobile.js +1 -1
- package/modern/mobile.module-eb08a4de.js +4 -0
- package/modern/presets/index.js +1 -1
- package/modern/presets/useSelectWithApply/hook.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/footer/index.css +6 -4
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/modern/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/modern/presets/useSelectWithLoading/hook.js +1 -1
- package/modern/presets/useSelectWithLoading/index.css +2 -2
- package/modern/shared/index.js +1 -1
- package/modern/utils.d.ts +1 -1
- package/modern/utils.js +13 -2
- package/moderncssm/Component.responsive.d.ts +7 -0
- package/moderncssm/Component.responsive.js +21 -0
- package/moderncssm/components/arrow/Component.d.ts +5 -0
- package/moderncssm/components/arrow/Component.js +8 -0
- package/moderncssm/components/arrow/index.d.ts +1 -0
- package/moderncssm/components/arrow/index.js +1 -0
- package/moderncssm/components/arrow/index.module.css +23 -0
- package/moderncssm/components/base-checkmark/Component.d.ts +5 -0
- package/moderncssm/components/base-checkmark/Component.js +15 -0
- package/moderncssm/components/base-checkmark/index.d.ts +1 -0
- package/moderncssm/components/base-checkmark/index.js +1 -0
- package/moderncssm/components/base-checkmark/index.module.css +30 -0
- package/moderncssm/components/base-option/Component.d.ts +4 -0
- package/moderncssm/components/base-option/Component.js +33 -0
- package/moderncssm/components/base-option/index.d.ts +1 -0
- package/moderncssm/components/base-option/index.js +1 -0
- package/moderncssm/components/base-option/index.module.css +81 -0
- package/moderncssm/components/base-select/Component.d.ts +14 -0
- package/moderncssm/components/base-select/Component.js +408 -0
- package/moderncssm/components/base-select/components/list-desktop/helpers/get-list-popover-desktop-props.d.ts +12 -0
- package/moderncssm/components/base-select/components/list-desktop/helpers/get-list-popover-desktop-props.js +15 -0
- package/moderncssm/components/base-select/components/list-desktop/list-popover-desktop.d.ts +9 -0
- package/moderncssm/components/base-select/components/list-desktop/list-popover-desktop.js +13 -0
- package/moderncssm/components/base-select/components/list-desktop/types/types.d.ts +3 -0
- package/moderncssm/components/base-select/components/list-desktop/types/types.js +1 -0
- package/moderncssm/components/base-select/components/list-mobile/helpers/get-list-bottom-sheet-mobile-props.d.ts +16 -0
- package/moderncssm/components/base-select/components/list-mobile/helpers/get-list-bottom-sheet-mobile-props.js +19 -0
- package/moderncssm/components/base-select/components/list-mobile/helpers/get-list-modal-mobile-props.d.ts +28 -0
- package/moderncssm/components/base-select/components/list-mobile/helpers/get-list-modal-mobile-props.js +18 -0
- package/moderncssm/components/base-select/components/list-mobile/helpers/index.d.ts +2 -0
- package/moderncssm/components/base-select/components/list-mobile/helpers/index.js +2 -0
- package/moderncssm/components/base-select/components/list-mobile/list-bottom-sheet-mobile.d.ts +15 -0
- package/moderncssm/components/base-select/components/list-mobile/list-bottom-sheet-mobile.js +24 -0
- package/moderncssm/components/base-select/components/list-mobile/list-mobile.d.ts +16 -0
- package/moderncssm/components/base-select/components/list-mobile/list-mobile.js +17 -0
- package/moderncssm/components/base-select/components/list-mobile/list-modal-mobile.d.ts +15 -0
- package/moderncssm/components/base-select/components/list-mobile/list-modal-mobile.js +32 -0
- package/moderncssm/components/base-select/components/list-mobile/types/types.d.ts +4 -0
- package/moderncssm/components/base-select/components/list-mobile/types/types.js +1 -0
- package/moderncssm/components/base-select/index.d.ts +1 -0
- package/moderncssm/components/base-select/index.js +1 -0
- package/moderncssm/components/base-select/index.module.css +81 -0
- package/moderncssm/components/base-select/mobile.module.css +48 -0
- package/moderncssm/components/base-select/types/component-types.d.ts +50 -0
- package/moderncssm/components/base-select/types/component-types.js +1 -0
- package/moderncssm/components/checkmark/Component.d.ts +5 -0
- package/moderncssm/components/checkmark/Component.js +20 -0
- package/moderncssm/components/checkmark/index.d.ts +1 -0
- package/moderncssm/components/checkmark/index.js +1 -0
- package/moderncssm/components/checkmark/index.module.css +59 -0
- package/moderncssm/components/checkmark-mobile/Component.d.ts +5 -0
- package/moderncssm/components/checkmark-mobile/Component.js +11 -0
- package/moderncssm/components/checkmark-mobile/index.d.ts +1 -0
- package/moderncssm/components/checkmark-mobile/index.js +1 -0
- package/moderncssm/components/checkmark-mobile/index.module.css +34 -0
- package/moderncssm/components/clear-button/Component.d.ts +5 -0
- package/moderncssm/components/clear-button/Component.js +9 -0
- package/moderncssm/components/clear-button/index.d.ts +1 -0
- package/moderncssm/components/clear-button/index.js +1 -0
- package/moderncssm/components/clear-button/index.module.css +47 -0
- package/moderncssm/components/field/Component.d.ts +13 -0
- package/moderncssm/components/field/Component.js +35 -0
- package/moderncssm/components/field/index.d.ts +1 -0
- package/moderncssm/components/field/index.js +1 -0
- package/moderncssm/components/field/index.module.css +74 -0
- package/moderncssm/components/footer/Component.d.ts +12 -0
- package/moderncssm/components/footer/Component.js +22 -0
- package/moderncssm/components/footer/index.d.ts +1 -0
- package/moderncssm/components/footer/index.js +1 -0
- package/moderncssm/components/footer/index.module.css +28 -0
- package/moderncssm/components/index.d.ts +9 -0
- package/moderncssm/components/index.js +9 -0
- package/moderncssm/components/native-select/Component.d.ts +25 -0
- package/moderncssm/components/native-select/Component.js +13 -0
- package/moderncssm/components/native-select/index.d.ts +1 -0
- package/moderncssm/components/native-select/index.js +1 -0
- package/moderncssm/components/optgroup/Component.d.ts +5 -0
- package/moderncssm/components/optgroup/Component.js +11 -0
- package/moderncssm/components/optgroup/index.d.ts +1 -0
- package/moderncssm/components/optgroup/index.js +1 -0
- package/moderncssm/components/optgroup/index.module.css +46 -0
- package/moderncssm/components/option/Component.d.ts +4 -0
- package/moderncssm/components/option/Component.js +23 -0
- package/moderncssm/components/option/index.d.ts +1 -0
- package/moderncssm/components/option/index.js +1 -0
- package/moderncssm/components/option/index.module.css +110 -0
- package/moderncssm/components/options-list/Component.d.ts +5 -0
- package/moderncssm/components/options-list/Component.js +88 -0
- package/moderncssm/components/options-list/index.d.ts +1 -0
- package/moderncssm/components/options-list/index.js +1 -0
- package/moderncssm/components/options-list/index.module.css +51 -0
- package/moderncssm/components/search/Component.d.ts +5 -0
- package/moderncssm/components/search/Component.js +9 -0
- package/moderncssm/components/search/index.d.ts +1 -0
- package/moderncssm/components/search/index.js +1 -0
- package/moderncssm/components/search/index.module.css +14 -0
- package/moderncssm/components/virtual-options-list/Component.d.ts +5 -0
- package/moderncssm/components/virtual-options-list/Component.js +138 -0
- package/moderncssm/components/virtual-options-list/index.d.ts +1 -0
- package/moderncssm/components/virtual-options-list/index.js +1 -0
- package/moderncssm/components/virtual-options-list/index.module.css +79 -0
- package/moderncssm/consts.d.ts +12 -0
- package/moderncssm/consts.js +13 -0
- package/moderncssm/desktop/Component.desktop.d.ts +6 -0
- package/moderncssm/desktop/Component.desktop.js +17 -0
- package/moderncssm/desktop/index.d.ts +2 -0
- package/moderncssm/desktop/index.js +1 -0
- package/moderncssm/hook-8c561f14.d.ts +115 -0
- package/moderncssm/hook-a8bc7fe8.d.ts +17 -0
- package/moderncssm/hook-a8bc7fe8.js +169 -0
- package/moderncssm/index.d.ts +2 -0
- package/moderncssm/index.js +1 -0
- package/moderncssm/mobile/Component.mobile.d.ts +5 -0
- package/moderncssm/mobile/Component.mobile.js +54 -0
- package/moderncssm/mobile/Component.modal.mobile.d.ts +4 -0
- package/moderncssm/mobile/Component.modal.mobile.js +6 -0
- package/moderncssm/mobile/index.d.ts +3 -0
- package/moderncssm/mobile/index.js +2 -0
- package/moderncssm/presets/index.d.ts +3 -0
- package/moderncssm/presets/index.js +3 -0
- package/moderncssm/presets/useLazyLoading/hook.d.ts +48 -0
- package/moderncssm/presets/useLazyLoading/hook.js +215 -0
- package/moderncssm/presets/useSelectWithApply/hook.d.ts +0 -0
- package/moderncssm/presets/useSelectWithApply/hook.js +4 -0
- package/moderncssm/presets/useSelectWithApply/options-list-with-apply/Component.d.ts +0 -0
- package/moderncssm/presets/useSelectWithApply/options-list-with-apply/Component.js +6 -0
- package/moderncssm/presets/useSelectWithApply/options-list-with-apply/footer/Component.d.ts +12 -0
- package/moderncssm/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +12 -0
- package/moderncssm/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +12 -0
- package/moderncssm/presets/useSelectWithApply/options-list-with-apply/footer/vars.css +0 -0
- package/moderncssm/presets/useSelectWithApply/options-list-with-apply/header/Component.d.ts +11 -0
- package/moderncssm/presets/useSelectWithApply/options-list-with-apply/header/Component.js +9 -0
- package/moderncssm/presets/useSelectWithApply/options-list-with-apply/header/index.module.css +9 -0
- package/moderncssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -0
- package/moderncssm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -0
- package/moderncssm/presets/useSelectWithLoading/hook.d.ts +13 -0
- package/moderncssm/presets/useSelectWithLoading/hook.js +23 -0
- package/moderncssm/presets/useSelectWithLoading/index.module.css +7 -0
- package/moderncssm/shared/index.d.ts +13 -0
- package/moderncssm/shared/index.js +14 -0
- package/moderncssm/typings.d.ts +744 -0
- package/moderncssm/typings.js +1 -0
- package/moderncssm/utils.d.ts +81 -0
- package/moderncssm/utils.js +184 -0
- package/moderncssm/vars.css +10 -0
- package/package.json +15 -15
- package/presets/index.js +1 -1
- package/presets/useSelectWithApply/hook.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/footer/index.css +6 -4
- package/presets/useSelectWithApply/options-list-with-apply/header/Component.js +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/header/index.css +3 -3
- package/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/presets/useSelectWithLoading/hook.js +1 -1
- package/presets/useSelectWithLoading/index.css +2 -2
- package/shared/index.js +1 -1
- package/src/components/arrow/index.module.css +1 -1
- package/src/components/base-checkmark/index.module.css +1 -1
- package/src/components/base-option/index.module.css +3 -3
- package/src/components/base-select/index.module.css +9 -9
- package/src/components/base-select/mobile.module.css +4 -4
- package/src/components/checkmark/index.module.css +1 -1
- package/src/components/checkmark-mobile/index.module.css +1 -1
- package/src/components/field/index.module.css +1 -1
- package/src/components/footer/index.module.css +1 -1
- package/src/components/optgroup/index.module.css +1 -1
- package/src/components/option/index.module.css +2 -3
- package/src/components/options-list/Component.tsx +2 -1
- package/src/components/options-list/index.module.css +6 -2
- package/src/components/search/index.module.css +1 -1
- package/src/components/virtual-options-list/index.module.css +5 -5
- package/src/presets/useSelectWithApply/options-list-with-apply/footer/index.module.css +3 -2
- package/src/presets/useSelectWithApply/options-list-with-apply/footer/vars.css +3 -0
- package/src/presets/useSelectWithApply/options-list-with-apply/header/index.module.css +1 -1
- package/src/utils.ts +28 -3
- package/src/vars.css +4 -4
- package/utils.d.ts +1 -1
- package/utils.js +11 -0
- package/esm/mobile.module-eaf56278.js +0 -4
- package/mobile.module-8d14caac.js +0 -6
- package/modern/mobile.module-2f7796c1.js +0 -4
- /package/esm/{hook-570b8ac7.d.ts → hook-276c96dc.d.ts} +0 -0
- /package/esm/{hook-570b8ac7.js → hook-276c96dc.js} +0 -0
- /package/esm/{list-popover-desktop-446b6d5f.d.ts → list-popover-desktop-e4b69ce0.d.ts} +0 -0
- /package/{hook-a71861cb.d.ts → hook-c8ba558c.d.ts} +0 -0
- /package/{hook-a71861cb.js → hook-c8ba558c.js} +0 -0
- /package/{list-popover-desktop-6bae9b47.d.ts → list-popover-desktop-8ffefe6e.d.ts} +0 -0
- /package/modern/{hook-0b565ee2.d.ts → hook-a054f3bb.d.ts} +0 -0
- /package/modern/{hook-0b565ee2.js → hook-a054f3bb.js} +0 -0
- /package/modern/{list-popover-desktop-46e08681.d.ts → list-popover-desktop-85370c2c.d.ts} +0 -0
|
@@ -9,7 +9,7 @@ import { SIZE_TO_CLASSNAME_MAP, DEFAULT_VISIBLE_OPTIONS } from '../../consts.js'
|
|
|
9
9
|
import { usePrevious, lastIndexOf, useVisibleOptions, isGroup } from '../../utils.js';
|
|
10
10
|
import { Optgroup } from '../optgroup/Component.js';
|
|
11
11
|
|
|
12
|
-
const styles = {"virtualOptionsList":"
|
|
12
|
+
const styles = {"virtualOptionsList":"select__virtualOptionsList_nejys","virtualOptionsListHeader":"select__virtualOptionsListHeader_nejys","virtualOptionsListFooter":"select__virtualOptionsListFooter_nejys","withBorder":"select__withBorder_nejys","scrollable":"select__scrollable_nejys","inner":"select__inner_nejys","virtualRow":"select__virtualRow_nejys","highlighted":"select__highlighted_nejys","emptyPlaceholder":"select__emptyPlaceholder_nejys","size-64":"select__size-64_nejys","size-72":"select__size-72_nejys"};
|
|
13
13
|
require('./index.css')
|
|
14
14
|
|
|
15
15
|
const VirtualOptionsList = forwardRef(({ size = 48, flatOptions = [], highlightedIndex = -1, optionGroupClassName, className, getOptionProps, groupOptionProps = {}, Option, open, options = [], Optgroup: Optgroup$1 = Optgroup, dataTestId, emptyPlaceholder, visibleOptions = DEFAULT_VISIBLE_OPTIONS, header, footer, showFooter = true, optionsListWidth, onScroll, nativeScrollbar: nativeScrollbarProp, setHighlightedIndex, selectedItems, setSelectedItems, search, multiple, }, ref) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: 1s63h */
|
|
2
2
|
: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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-neutral-300: #e7e8eb;
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
--gap-xl: 24px; /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
23
23
|
|
|
24
24
|
/* новые значения, используйте их */
|
|
25
|
+
--gap-0: 0;
|
|
25
26
|
--gap-12: var(--gap-s);
|
|
26
27
|
--gap-16: var(--gap-m);
|
|
27
28
|
--gap-24: var(--gap-xl);
|
|
@@ -42,54 +43,54 @@
|
|
|
42
43
|
/* checkmark */
|
|
43
44
|
|
|
44
45
|
/* optgroup */
|
|
45
|
-
} .
|
|
46
|
+
} .select__virtualOptionsList_nejys {
|
|
46
47
|
width: 100%;
|
|
47
48
|
outline: none;
|
|
48
49
|
box-sizing: border-box;
|
|
49
50
|
position: sticky;
|
|
50
51
|
justify-content: space-between;
|
|
51
|
-
} .
|
|
52
|
+
} .select__virtualOptionsListHeader_nejys {
|
|
52
53
|
box-sizing: border-box;
|
|
53
54
|
border-bottom: 1px solid var(--color-light-neutral-300);
|
|
54
|
-
} .
|
|
55
|
+
} .select__virtualOptionsListFooter_nejys {
|
|
55
56
|
position: sticky;
|
|
56
|
-
bottom: 0;
|
|
57
|
+
bottom: var(--gap-0);
|
|
57
58
|
box-sizing: border-box;
|
|
58
59
|
border-top: 1px solid transparent
|
|
59
|
-
} .
|
|
60
|
+
} .select__virtualOptionsListFooter_nejys.select__withBorder_nejys {
|
|
60
61
|
border-top: 1px solid var(--color-light-neutral-300);
|
|
61
|
-
} .
|
|
62
|
+
} .select__scrollable_nejys {
|
|
62
63
|
position: relative;
|
|
63
64
|
overflow: auto;
|
|
64
65
|
width: 100%;
|
|
65
|
-
} .
|
|
66
|
+
} .select__inner_nejys {
|
|
66
67
|
position: relative;
|
|
67
68
|
width: 100%;
|
|
68
|
-
} .
|
|
69
|
+
} .select__virtualRow_nejys {
|
|
69
70
|
position: absolute;
|
|
70
|
-
top: 0;
|
|
71
|
-
left: 0;
|
|
71
|
+
top: var(--gap-0);
|
|
72
|
+
left: var(--gap-0);
|
|
72
73
|
width: 100%
|
|
73
|
-
} .
|
|
74
|
+
} .select__virtualRow_nejys:before {
|
|
74
75
|
content: '';
|
|
75
76
|
position: absolute;
|
|
76
77
|
z-index: 1;
|
|
77
78
|
left: var(--select-option-left-padding);
|
|
78
79
|
right: var(--select-option-right-padding);
|
|
79
|
-
top: 0;
|
|
80
|
+
top: var(--gap-0);
|
|
80
81
|
height: 1px;
|
|
81
82
|
background: var(--select-option-divider-background);
|
|
82
83
|
display: var(--select-option-divider-display);
|
|
83
|
-
} .
|
|
84
|
+
} .select__virtualRow_nejys:first-child:before {
|
|
84
85
|
display: none;
|
|
85
|
-
} .
|
|
86
|
-
.
|
|
86
|
+
} .select__highlighted_nejys:before,
|
|
87
|
+
.select__highlighted_nejys + .select__virtualRow_nejys:before {
|
|
87
88
|
display: none;
|
|
88
|
-
} .
|
|
89
|
+
} .select__emptyPlaceholder_nejys {
|
|
89
90
|
padding: var(--gap-16) var(--gap-12);
|
|
90
91
|
color: var(--select-options-list-empty-placeholder-color);
|
|
91
92
|
flex: 1;
|
|
92
|
-
} .select__size-
|
|
93
|
-
.select__size-
|
|
93
|
+
} .select__size-64_nejys .select__emptyPlaceholder_nejys,
|
|
94
|
+
.select__size-72_nejys .select__emptyPlaceholder_nejys {
|
|
94
95
|
padding: var(--gap-24) var(--gap-16);
|
|
95
96
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import cn from 'classnames';
|
|
3
3
|
|
|
4
|
-
const styles = {"component":"
|
|
4
|
+
const styles = {"component":"select__component_11ha3","popoverInner":"select__popoverInner_11ha3","optionsListWrapper":"select__optionsListWrapper_11ha3","optionsListBorder":"select__optionsListBorder_11ha3","nativeSelect":"select__nativeSelect_11ha3","block":"select__block_11ha3","emptySearchPlaceholder":"select__emptySearchPlaceholder_11ha3","search":"select__search_11ha3"};
|
|
5
5
|
require('./components/base-select/index.css')
|
|
6
6
|
|
|
7
7
|
const ListPopoverDesktop = (props) => {
|
|
@@ -11,7 +11,7 @@ import { Option } from '../components/option/Component.js';
|
|
|
11
11
|
import { OptionsList } from '../components/options-list/Component.js';
|
|
12
12
|
import { Search } from '../components/search/Component.js';
|
|
13
13
|
import { VirtualOptionsList } from '../components/virtual-options-list/Component.js';
|
|
14
|
-
import { u as useSelectWithApply } from '../hook-
|
|
14
|
+
import { u as useSelectWithApply } from '../hook-a054f3bb.js';
|
|
15
15
|
import { Header } from '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
16
16
|
|
|
17
17
|
const VIRTUAL_OPTIONS_LIST_THRESHOLD = 30;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const mobileStyles = {"sheet":"select__sheet_1j8de","sheetContent":"select__sheetContent_1j8de","modalContent":"select__modalContent_1j8de","sheetContainer":"select__sheetContainer_1j8de","optionsListWrapper":"select__optionsListWrapper_1j8de","optionsList":"select__optionsList_1j8de","scrollbar":"select__scrollbar_1j8de","search":"select__search_1j8de","option":"select__option_1j8de","optionGroup":"select__optionGroup_1j8de"};
|
|
2
|
+
require('./components/base-select/mobile.css')
|
|
3
|
+
|
|
4
|
+
export { mobileStyles as m };
|
package/modern/presets/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { useSelectWithLoading } from './useSelectWithLoading/hook.js';
|
|
2
2
|
export { useLazyLoading } from './useLazyLoading/hook.js';
|
|
3
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-a054f3bb.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import 'react';
|
|
2
2
|
import '../../../components/options-list/Component.js';
|
|
3
3
|
import '../../../consts.js';
|
|
4
|
-
export { O as OptionsListWithApply } from '../../../hook-
|
|
4
|
+
export { O as OptionsListWithApply } from '../../../hook-a054f3bb.js';
|
|
5
5
|
import './footer/Component.js';
|
|
6
6
|
import './header/Component.js';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { ButtonDesktop } from '@alfalab/core-components-button/modern/desktop';
|
|
3
3
|
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
4
4
|
|
|
5
|
-
const styles = {"footer":"
|
|
5
|
+
const styles = {"footer":"select__footer_1mgzl","button":"select__button_1mgzl"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
const Footer = ({ handleApply, handleClear, showClear, selectedDraft = [], dataTestId, }) => (React.createElement("div", {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hash:
|
|
1
|
+
/* hash: s7f2p */
|
|
2
2
|
: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 */ /* 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 */
|
|
3
3
|
} /* deprecated */ :root {
|
|
4
4
|
--color-light-base-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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */
|
|
@@ -23,10 +23,12 @@
|
|
|
23
23
|
--gap-12: var(--gap-s);
|
|
24
24
|
} :root {
|
|
25
25
|
} :root {
|
|
26
|
-
}
|
|
26
|
+
} :root {
|
|
27
|
+
--select-option-list-footer-button-gap: var(--gap-8);
|
|
28
|
+
} .select__footer_1mgzl {
|
|
27
29
|
background-color: var(--color-light-base-bg-primary);
|
|
28
30
|
padding: var(--gap-12);
|
|
29
31
|
outline: none
|
|
30
|
-
} .
|
|
31
|
-
margin-left: var(--gap
|
|
32
|
+
} .select__footer_1mgzl > .select__button_1mgzl + .select__button_1mgzl {
|
|
33
|
+
margin-left: var(--select-option-list-footer-button-gap);
|
|
32
34
|
}
|
|
@@ -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_1g7v5","mobile":"select__mobile_1g7v5"};
|
|
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: lyame */
|
|
2
2
|
: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 */ /* 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 */
|
|
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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* 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 */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */ /* deprecated */
|
|
@@ -22,8 +22,8 @@
|
|
|
22
22
|
--gap-12: var(--gap-s);
|
|
23
23
|
} :root {
|
|
24
24
|
} :root {
|
|
25
|
-
} .
|
|
25
|
+
} .select__desktop_1g7v5 {
|
|
26
26
|
padding: var(--gap-12);
|
|
27
|
-
} .
|
|
27
|
+
} .select__mobile_1g7v5 {
|
|
28
28
|
padding: var(--gap-12) var(--gap-8);
|
|
29
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-a054f3bb";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { O as OptionsListWithApply } from '../../../hook-
|
|
1
|
+
export { O as OptionsListWithApply } from '../../../hook-a054f3bb.js';
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Skeleton } from '@alfalab/core-components-skeleton/modern';
|
|
3
3
|
import { Option } from '../../components/option/Component.js';
|
|
4
4
|
|
|
5
|
-
const styles = {"skeleton":"
|
|
5
|
+
const styles = {"skeleton":"select__skeleton_15yyc"};
|
|
6
6
|
require('./index.css')
|
|
7
7
|
|
|
8
8
|
function useSelectWithLoading({ loading = false, visibleOptions = 6, Option: Option$1 = Option, }) {
|
package/modern/shared/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { useSelectWithLoading } from '../presets/useSelectWithLoading/hook.js';
|
|
2
2
|
export { useLazyLoading } from '../presets/useLazyLoading/hook.js';
|
|
3
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-a054f3bb.js';
|
|
4
4
|
export { defaultAccessor, defaultFilterFn, defaultGroupAccessor, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from '../utils.js';
|
|
5
5
|
export { Option } from '../components/option/Component.js';
|
|
6
6
|
export { BaseOption } from '../components/base-option/Component.js';
|
package/modern/utils.d.ts
CHANGED
|
@@ -45,7 +45,7 @@ type useVisibleOptionsArgs = {
|
|
|
45
45
|
*/
|
|
46
46
|
actualOptionsCount?: boolean;
|
|
47
47
|
};
|
|
48
|
-
declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs):
|
|
48
|
+
declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, options, size, actualOptionsCount, }: useVisibleOptionsArgs): boolean;
|
|
49
49
|
declare function defaultFilterFn(optionText: string, search: string): boolean;
|
|
50
50
|
declare function defaultGroupAccessor(option: GroupShape): string | undefined;
|
|
51
51
|
declare function defaultAccessor(option: OptionShape): string;
|
package/modern/utils.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { isValidElement, cloneElement, useEffect, useRef } from 'react';
|
|
2
|
-
import { getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
1
|
+
import { isValidElement, cloneElement, useState, useEffect, useRef } from 'react';
|
|
2
|
+
import { useIsMounted, fnUtils, getDataTestId } from '@alfalab/core-components-shared/modern';
|
|
3
3
|
|
|
4
4
|
const isGroup = (item) => Object.prototype.hasOwnProperty.call(item, 'options');
|
|
5
5
|
const isOptionShape = (item) => !!item && Object.prototype.hasOwnProperty.call(item, 'key');
|
|
@@ -69,6 +69,8 @@ function processOptions(options, selected = [], filterFn = () => true, filterGro
|
|
|
69
69
|
return { filteredOptions, flatOptions, selectedOptions };
|
|
70
70
|
}
|
|
71
71
|
function useVisibleOptions({ visibleOptions, listRef, styleTargetRef = listRef, open, invalidate, options, size, actualOptionsCount, }) {
|
|
72
|
+
const [, runIfMounted] = useIsMounted();
|
|
73
|
+
const [measured, setMeasured] = useState(false);
|
|
72
74
|
useEffect(() => {
|
|
73
75
|
const measureOptionHeight = (element) => typeof size === 'number' ? Math.min(element.clientHeight, size) : element.clientHeight;
|
|
74
76
|
const list = listRef.current;
|
|
@@ -96,8 +98,15 @@ function useVisibleOptions({ visibleOptions, listRef, styleTargetRef = listRef,
|
|
|
96
98
|
height += size / 2;
|
|
97
99
|
}
|
|
98
100
|
}
|
|
101
|
+
const prevHeight = styleTarget.style.height;
|
|
99
102
|
styleTarget.style.height = `${height}px`;
|
|
103
|
+
setMeasured(true);
|
|
104
|
+
return () => {
|
|
105
|
+
styleTarget.style.height = prevHeight;
|
|
106
|
+
runIfMounted(() => setMeasured(false));
|
|
107
|
+
};
|
|
100
108
|
}
|
|
109
|
+
return fnUtils.noop;
|
|
101
110
|
}, [
|
|
102
111
|
actualOptionsCount,
|
|
103
112
|
listRef,
|
|
@@ -107,7 +116,9 @@ function useVisibleOptions({ visibleOptions, listRef, styleTargetRef = listRef,
|
|
|
107
116
|
styleTargetRef,
|
|
108
117
|
visibleOptions,
|
|
109
118
|
invalidate,
|
|
119
|
+
runIfMounted,
|
|
110
120
|
]);
|
|
121
|
+
return measured;
|
|
111
122
|
}
|
|
112
123
|
function defaultFilterFn(optionText, search) {
|
|
113
124
|
if (!search)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { SelectProps } from "./typings";
|
|
4
|
+
declare const SelectResponsive: React.ForwardRefExoticComponent<(SelectProps & {
|
|
5
|
+
originalProps?: SelectProps | undefined;
|
|
6
|
+
}) & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { SelectResponsive };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import { useMatchMedia } from '@alfalab/core-components-mq/moderncssm';
|
|
3
|
+
import { SelectDesktop } from './desktop/Component.desktop.js';
|
|
4
|
+
import { SelectMobile } from './mobile/Component.mobile.js';
|
|
5
|
+
import './mobile/Component.modal.mobile.js';
|
|
6
|
+
|
|
7
|
+
const SelectResponsive = forwardRef(({ onScroll, fieldProps, breakpoint = 1024, defaultMatchMediaValue, ...restProps }, ref) => {
|
|
8
|
+
const [isDesktop] = useMatchMedia(`(min-width: ${breakpoint}px)`, defaultMatchMediaValue);
|
|
9
|
+
if (isDesktop) {
|
|
10
|
+
return (React.createElement(SelectDesktop, { onScroll: onScroll, ...restProps, ref: ref, fieldProps: fieldProps }));
|
|
11
|
+
}
|
|
12
|
+
const mobileProps = {
|
|
13
|
+
...restProps,
|
|
14
|
+
/* В мобильную версию хук уже зашит, и это единственный передать в мобилку оригинальные пропсы */
|
|
15
|
+
...restProps.originalProps,
|
|
16
|
+
};
|
|
17
|
+
return React.createElement(SelectMobile, { fieldProps: fieldProps, ...mobileProps, ref: ref });
|
|
18
|
+
});
|
|
19
|
+
SelectResponsive.displayName = 'SelectResponsive';
|
|
20
|
+
|
|
21
|
+
export { SelectResponsive };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { ChevronDownMIcon } from '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
4
|
+
import styles from './index.module.css';
|
|
5
|
+
|
|
6
|
+
const Arrow = ({ open, className }) => (React.createElement(ChevronDownMIcon, { className: cn(styles.arrow, className, { [styles.open]: open }) }));
|
|
7
|
+
|
|
8
|
+
export { Arrow };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Arrow } from './Component.js';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/* */
|
|
2
|
+
:root {
|
|
3
|
+
--select-arrow-color: var(--color-light-neutral-translucent-700);
|
|
4
|
+
|
|
5
|
+
/* options list */
|
|
6
|
+
|
|
7
|
+
/* option */
|
|
8
|
+
|
|
9
|
+
/* checkmark */
|
|
10
|
+
|
|
11
|
+
/* optgroup */
|
|
12
|
+
}
|
|
13
|
+
.arrow {
|
|
14
|
+
display: block;
|
|
15
|
+
width: 24px;
|
|
16
|
+
height: 24px;
|
|
17
|
+
color: var(--select-arrow-color);
|
|
18
|
+
|
|
19
|
+
transition: transform 0.15s ease-in-out, opacity 0.2s ease;
|
|
20
|
+
}
|
|
21
|
+
.open {
|
|
22
|
+
transform: var(--arrow-transform);
|
|
23
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { Checkbox } from '@alfalab/core-components-checkbox/moderncssm';
|
|
4
|
+
import { CheckmarkMIcon } from '@alfalab/icons-glyph/CheckmarkMIcon';
|
|
5
|
+
import styles from './index.module.css';
|
|
6
|
+
|
|
7
|
+
const BaseCheckmark = ({ selected, disabled = false, className, multiple, align = 'center', }) => {
|
|
8
|
+
const checkmarkClassNames = cn(styles.checkmark, styles[align], className, {
|
|
9
|
+
[styles.single]: !multiple,
|
|
10
|
+
[styles.selected]: selected,
|
|
11
|
+
});
|
|
12
|
+
return multiple ? (React.createElement(Checkbox, { checked: selected, disabled: disabled, className: checkmarkClassNames, size: 'm', hiddenInput: true })) : (React.createElement(CheckmarkMIcon, { className: checkmarkClassNames }));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export { BaseCheckmark };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BaseCheckmark } from './Component.js';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/* */
|
|
2
|
+
:root {
|
|
3
|
+
|
|
4
|
+
/* options list */
|
|
5
|
+
|
|
6
|
+
/* option */
|
|
7
|
+
|
|
8
|
+
/* checkmark */
|
|
9
|
+
|
|
10
|
+
/* optgroup */
|
|
11
|
+
}
|
|
12
|
+
.checkmark {
|
|
13
|
+
flex-shrink: 0;
|
|
14
|
+
box-sizing: border-box
|
|
15
|
+
}
|
|
16
|
+
.checkmark.start {
|
|
17
|
+
align-self: start;
|
|
18
|
+
}
|
|
19
|
+
.checkmark.center {
|
|
20
|
+
align-self: center;
|
|
21
|
+
}
|
|
22
|
+
.single {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
opacity: 0
|
|
27
|
+
}
|
|
28
|
+
.single.selected {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { isValidElement } from 'react';
|
|
2
|
+
import cn from 'classnames';
|
|
3
|
+
import { BaseCheckmark } from '../base-checkmark/Component.js';
|
|
4
|
+
import styles from './index.module.css';
|
|
5
|
+
|
|
6
|
+
const BaseOption = ({ className, option, children, selected, highlighted, disabled, multiple, Checkmark = BaseCheckmark, checkmarkPosition = multiple ? 'before' : 'after', align = 'center', innerProps, dataTestId, mobile = false, }) => {
|
|
7
|
+
const content = children || option.content || option.key;
|
|
8
|
+
const { showCheckMark = true } = option;
|
|
9
|
+
const isTextContent = !isValidElement(content);
|
|
10
|
+
const renderCheckmark = () => {
|
|
11
|
+
if (Checkmark && showCheckMark) {
|
|
12
|
+
return (React.createElement(Checkmark, { className: cn({
|
|
13
|
+
[styles.checkmarkBeforeContent]: checkmarkPosition === 'before',
|
|
14
|
+
[styles.checkmarkAfterContent]: checkmarkPosition === 'after',
|
|
15
|
+
}), disabled: disabled, selected: selected, multiple: multiple, align: align }));
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
};
|
|
19
|
+
return (React.createElement("div", { ...innerProps, className: cn(styles.option, className, {
|
|
20
|
+
[styles.highlighted]: !mobile && highlighted,
|
|
21
|
+
[styles.selected]: selected,
|
|
22
|
+
[styles.disabled]: disabled,
|
|
23
|
+
[styles.textContent]: isTextContent,
|
|
24
|
+
[styles.mobile]: mobile,
|
|
25
|
+
[styles.checkmarkAfter]: !isTextContent && checkmarkPosition === 'after',
|
|
26
|
+
[styles.checkmarkBefore]: !isTextContent && checkmarkPosition === 'before',
|
|
27
|
+
}), "data-test-id": dataTestId },
|
|
28
|
+
checkmarkPosition === 'before' && renderCheckmark(),
|
|
29
|
+
React.createElement("div", { className: cn(styles.content) }, content),
|
|
30
|
+
checkmarkPosition === 'after' && renderCheckmark()));
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { BaseOption };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Component";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { BaseOption } from './Component.js';
|