@alfalab/core-components 46.2.1 → 46.3.0-beta.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/confirmation/components/screens/initial/component.js +1 -1
- package/confirmation/components/screens/initial/countdown-section.js +1 -1
- package/confirmation/esm/component.responsive.js +1 -1
- package/confirmation/esm/components/base-confirmation/component.js +1 -1
- package/confirmation/esm/components/base-confirmation/index.js +1 -1
- package/confirmation/esm/components/index.js +1 -1
- package/confirmation/esm/components/screens/index.js +1 -1
- package/confirmation/esm/components/screens/initial/component.js +1 -1
- package/confirmation/esm/components/screens/initial/countdown-section.js +1 -1
- package/confirmation/esm/components/screens/initial/index.js +1 -1
- package/confirmation/esm/desktop/component.desktop.js +1 -1
- package/confirmation/esm/desktop/index.js +1 -1
- package/confirmation/esm/index.js +1 -1
- package/confirmation/esm/mobile/component.mobile.js +1 -1
- package/confirmation/esm/mobile/index.js +1 -1
- package/confirmation/esm/shared/index.js +1 -1
- package/confirmation/modern/component.responsive.js +1 -1
- package/confirmation/modern/components/base-confirmation/component.js +1 -1
- package/confirmation/modern/components/base-confirmation/index.js +1 -1
- package/confirmation/modern/components/index.js +1 -1
- package/confirmation/modern/components/screens/index.js +1 -1
- package/confirmation/modern/components/screens/initial/component.js +1 -1
- package/confirmation/modern/components/screens/initial/countdown-section.js +1 -1
- package/confirmation/modern/components/screens/initial/index.js +1 -1
- package/confirmation/modern/desktop/component.desktop.js +1 -1
- package/confirmation/modern/desktop/index.js +1 -1
- package/confirmation/modern/index.js +1 -1
- package/confirmation/modern/mobile/component.mobile.js +1 -1
- package/confirmation/modern/mobile/index.js +1 -1
- package/confirmation/modern/shared/index.js +1 -1
- package/gallery/components/header/Component.js +1 -1
- package/gallery/components/header/buttons.js +1 -1
- package/gallery/components/image-viewer/component.js +1 -1
- package/gallery/components/image-viewer/slide.js +1 -1
- package/gallery/esm/Component.js +2 -2
- package/gallery/esm/components/header/Component.js +1 -1
- package/gallery/esm/components/header/buttons.js +1 -1
- package/gallery/esm/components/header/index.js +1 -1
- package/gallery/esm/components/image-preview/Component.js +1 -1
- package/gallery/esm/components/image-preview/index.js +1 -1
- package/gallery/esm/components/image-viewer/component.js +1 -1
- package/gallery/esm/components/image-viewer/index.js +1 -1
- package/gallery/esm/components/image-viewer/slide.js +1 -1
- package/gallery/esm/components/index.js +2 -2
- package/gallery/esm/components/navigation-bar/Component.js +1 -1
- package/gallery/esm/components/navigation-bar/index.js +1 -1
- package/gallery/esm/index.js +2 -2
- package/gallery/modern/Component.js +2 -2
- package/gallery/modern/components/header/Component.js +1 -1
- package/gallery/modern/components/header/buttons.js +1 -1
- package/gallery/modern/components/header/index.js +1 -1
- package/gallery/modern/components/image-preview/Component.js +1 -1
- package/gallery/modern/components/image-preview/index.js +1 -1
- package/gallery/modern/components/image-viewer/component.js +1 -1
- package/gallery/modern/components/image-viewer/index.js +1 -1
- package/gallery/modern/components/image-viewer/slide.js +1 -1
- package/gallery/modern/components/index.js +2 -2
- package/gallery/modern/components/navigation-bar/Component.js +1 -1
- package/gallery/modern/components/navigation-bar/index.js +1 -1
- package/gallery/modern/index.js +2 -2
- package/international-phone-input/{Component-cc406ff0.d.ts → Component-cab56f5d.d.ts} +1 -1
- package/international-phone-input/Component.responsive.d.ts +4 -4
- package/international-phone-input/components/base-international-phone-input/Component.d.ts +1 -1
- package/international-phone-input/cssm/{Component-cc406ff0.d.ts → Component-cab56f5d.d.ts} +1 -1
- package/international-phone-input/cssm/Component.responsive.d.ts +4 -4
- package/international-phone-input/cssm/components/base-international-phone-input/Component.d.ts +1 -1
- package/international-phone-input/cssm/types.d.ts +1 -1
- package/international-phone-input/cssm/{typings-cc406ff0.d.ts → typings-cab56f5d.d.ts} +2 -0
- package/international-phone-input/{modern/utils-89376c31.d.ts → cssm/utils-edb3f7e8.d.ts} +4 -3
- package/international-phone-input/esm/{Component-cc406ff0.d.ts → Component-cab56f5d.d.ts} +1 -1
- package/international-phone-input/esm/Component.responsive.d.ts +4 -4
- package/international-phone-input/esm/components/base-international-phone-input/Component.d.ts +1 -1
- package/international-phone-input/esm/types.d.ts +1 -1
- package/international-phone-input/esm/{typings-cc406ff0.d.ts → typings-cab56f5d.d.ts} +2 -0
- package/international-phone-input/{utils-89376c31.d.ts → esm/utils-edb3f7e8.d.ts} +4 -3
- package/international-phone-input/modern/{Component-cc406ff0.d.ts → Component-cab56f5d.d.ts} +1 -1
- package/international-phone-input/modern/Component.responsive.d.ts +4 -4
- package/international-phone-input/modern/components/base-international-phone-input/Component.d.ts +1 -1
- package/international-phone-input/modern/types.d.ts +1 -1
- package/international-phone-input/modern/{typings-cc406ff0.d.ts → typings-cab56f5d.d.ts} +2 -0
- package/international-phone-input/{esm/utils-89376c31.d.ts → modern/utils-edb3f7e8.d.ts} +4 -3
- package/international-phone-input/types.d.ts +1 -1
- package/international-phone-input/{typings-cc406ff0.d.ts → typings-cab56f5d.d.ts} +2 -0
- package/international-phone-input/{cssm/utils-89376c31.d.ts → utils-edb3f7e8.d.ts} +4 -3
- package/modal/components/controls/Component.js +1 -1
- package/modal/components/footer/Component.js +1 -1
- package/modal/esm/Component.responsive.js +1 -1
- package/modal/esm/components/controls/Component.js +1 -1
- package/modal/esm/components/controls/index.js +1 -1
- package/modal/esm/components/footer/Component.js +1 -1
- package/modal/esm/desktop/Component.desktop.js +1 -1
- package/modal/esm/desktop/index.js +1 -1
- package/modal/esm/index.js +1 -1
- package/modal/esm/mobile/Component.mobile.js +1 -1
- package/modal/esm/mobile/index.js +1 -1
- package/modal/modern/Component.responsive.js +1 -1
- package/modal/modern/components/controls/Component.js +1 -1
- package/modal/modern/components/controls/index.js +1 -1
- package/modal/modern/components/footer/Component.js +1 -1
- package/modal/modern/desktop/Component.desktop.js +1 -1
- package/modal/modern/desktop/index.js +1 -1
- package/modal/modern/index.js +1 -1
- package/modal/modern/mobile/Component.mobile.js +1 -1
- package/modal/modern/mobile/index.js +1 -1
- package/package.json +1 -1
- package/picker-button/Component-cab56f5d.d.ts +5 -0
- package/picker-button/cssm/Component-cab56f5d.d.ts +5 -0
- package/picker-button/cssm/field/Component.d.ts +1 -1
- package/picker-button/cssm/{typings-cc406ff0.d.ts → typings-cab56f5d.d.ts} +2 -0
- package/picker-button/cssm/utils-edb3f7e8.d.ts +68 -0
- package/picker-button/esm/Component-cab56f5d.d.ts +5 -0
- package/picker-button/esm/field/Component.d.ts +1 -1
- package/picker-button/esm/{typings-cc406ff0.d.ts → typings-cab56f5d.d.ts} +2 -0
- package/picker-button/esm/utils-edb3f7e8.d.ts +68 -0
- package/picker-button/field/Component.d.ts +1 -1
- package/picker-button/modern/Component-cab56f5d.d.ts +5 -0
- package/picker-button/modern/field/Component.d.ts +1 -1
- package/picker-button/modern/{typings-cc406ff0.d.ts → typings-cab56f5d.d.ts} +2 -0
- package/picker-button/modern/utils-edb3f7e8.d.ts +68 -0
- package/picker-button/{typings-cc406ff0.d.ts → typings-cab56f5d.d.ts} +2 -0
- package/picker-button/utils-edb3f7e8.d.ts +68 -0
- package/pure-cell/component.js +1 -1
- package/pure-cell/components/addon/component.js +1 -1
- package/pure-cell/components/addon/index.d.ts +1 -1
- package/pure-cell/components/addon/index.js +1 -1
- package/pure-cell/components/amount/component.js +1 -1
- package/pure-cell/components/amount/index.d.ts +1 -1
- package/pure-cell/components/amount/index.js +1 -1
- package/pure-cell/components/amount-title/component.js +1 -1
- package/pure-cell/components/amount-title/index.d.ts +1 -1
- package/pure-cell/components/amount-title/index.js +1 -1
- package/pure-cell/components/category/component.js +1 -1
- package/pure-cell/components/category/index.d.ts +1 -1
- package/pure-cell/components/category/index.js +1 -1
- package/pure-cell/components/content/component.js +1 -1
- package/pure-cell/components/content/index.d.ts +1 -1
- package/pure-cell/components/content/index.js +1 -1
- package/pure-cell/components/footer/component.js +1 -1
- package/pure-cell/components/footer/index.d.ts +1 -1
- package/pure-cell/components/footer/index.js +1 -1
- package/pure-cell/components/footer-button/component.js +1 -1
- package/pure-cell/components/footer-button/index.d.ts +1 -1
- package/pure-cell/components/footer-button/index.js +1 -1
- package/pure-cell/components/footer-text/component.js +1 -1
- package/pure-cell/components/footer-text/index.d.ts +1 -1
- package/pure-cell/components/footer-text/index.js +1 -1
- package/pure-cell/components/graphics/component.js +1 -1
- package/pure-cell/components/graphics/index.d.ts +1 -1
- package/pure-cell/components/graphics/index.js +1 -1
- package/pure-cell/components/main/component.js +1 -1
- package/pure-cell/components/main/index.d.ts +1 -1
- package/pure-cell/components/main/index.js +1 -1
- package/pure-cell/components/text/component.js +1 -1
- package/pure-cell/components/text/index.d.ts +1 -1
- package/pure-cell/components/text/index.js +1 -1
- package/pure-cell/esm/component.js +1 -1
- package/pure-cell/esm/components/addon/component.js +1 -1
- package/pure-cell/esm/components/addon/index.d.ts +1 -1
- package/pure-cell/esm/components/addon/index.js +1 -1
- package/pure-cell/esm/components/amount/component.js +1 -1
- package/pure-cell/esm/components/amount/index.d.ts +1 -1
- package/pure-cell/esm/components/amount/index.js +1 -1
- package/pure-cell/esm/components/amount-title/component.js +1 -1
- package/pure-cell/esm/components/amount-title/index.d.ts +1 -1
- package/pure-cell/esm/components/amount-title/index.js +1 -1
- package/pure-cell/esm/components/category/component.js +1 -1
- package/pure-cell/esm/components/category/index.d.ts +1 -1
- package/pure-cell/esm/components/category/index.js +1 -1
- package/pure-cell/esm/components/content/component.js +1 -1
- package/pure-cell/esm/components/content/index.d.ts +1 -1
- package/pure-cell/esm/components/content/index.js +1 -1
- package/pure-cell/esm/components/footer/component.js +1 -1
- package/pure-cell/esm/components/footer/index.d.ts +1 -1
- package/pure-cell/esm/components/footer/index.js +1 -1
- package/pure-cell/esm/components/footer-button/component.js +1 -1
- package/pure-cell/esm/components/footer-button/index.d.ts +1 -1
- package/pure-cell/esm/components/footer-button/index.js +1 -1
- package/pure-cell/esm/components/footer-text/component.js +1 -1
- package/pure-cell/esm/components/footer-text/index.d.ts +1 -1
- package/pure-cell/esm/components/footer-text/index.js +1 -1
- package/pure-cell/esm/components/graphics/component.js +1 -1
- package/pure-cell/esm/components/graphics/index.d.ts +1 -1
- package/pure-cell/esm/components/graphics/index.js +1 -1
- package/pure-cell/esm/components/main/component.js +1 -1
- package/pure-cell/esm/components/main/index.d.ts +1 -1
- package/pure-cell/esm/components/main/index.js +1 -1
- package/pure-cell/esm/components/text/component.js +1 -1
- package/pure-cell/esm/components/text/index.d.ts +1 -1
- package/pure-cell/esm/components/text/index.js +1 -1
- package/pure-cell/esm/index.js +1 -1
- package/pure-cell/index.js +1 -1
- package/pure-cell/modern/component.js +1 -1
- package/pure-cell/modern/components/addon/component.js +1 -1
- package/pure-cell/modern/components/addon/index.d.ts +1 -1
- package/pure-cell/modern/components/addon/index.js +1 -1
- package/pure-cell/modern/components/amount/component.js +1 -1
- package/pure-cell/modern/components/amount/index.d.ts +1 -1
- package/pure-cell/modern/components/amount/index.js +1 -1
- package/pure-cell/modern/components/amount-title/component.js +1 -1
- package/pure-cell/modern/components/amount-title/index.d.ts +1 -1
- package/pure-cell/modern/components/amount-title/index.js +1 -1
- package/pure-cell/modern/components/category/component.js +1 -1
- package/pure-cell/modern/components/category/index.d.ts +1 -1
- package/pure-cell/modern/components/category/index.js +1 -1
- package/pure-cell/modern/components/content/component.js +1 -1
- package/pure-cell/modern/components/content/index.d.ts +1 -1
- package/pure-cell/modern/components/content/index.js +1 -1
- package/pure-cell/modern/components/footer/component.js +1 -1
- package/pure-cell/modern/components/footer/index.d.ts +1 -1
- package/pure-cell/modern/components/footer/index.js +1 -1
- package/pure-cell/modern/components/footer-button/component.js +1 -1
- package/pure-cell/modern/components/footer-button/index.d.ts +1 -1
- package/pure-cell/modern/components/footer-button/index.js +1 -1
- package/pure-cell/modern/components/footer-text/component.js +1 -1
- package/pure-cell/modern/components/footer-text/index.d.ts +1 -1
- package/pure-cell/modern/components/footer-text/index.js +1 -1
- package/pure-cell/modern/components/graphics/component.js +1 -1
- package/pure-cell/modern/components/graphics/index.d.ts +1 -1
- package/pure-cell/modern/components/graphics/index.js +1 -1
- package/pure-cell/modern/components/main/component.js +1 -1
- package/pure-cell/modern/components/main/index.d.ts +1 -1
- package/pure-cell/modern/components/main/index.js +1 -1
- package/pure-cell/modern/components/text/component.js +1 -1
- package/pure-cell/modern/components/text/index.d.ts +1 -1
- package/pure-cell/modern/components/text/index.js +1 -1
- package/pure-cell/modern/index.js +1 -1
- package/select/components/base-select/Component.js +22 -10
- package/select/components/base-select/mobile.css +2 -2
- package/select/cssm/components/base-select/Component.js +22 -10
- package/select/cssm/components/base-select/mobile.module.css +2 -2
- package/select/{hook-23a1acb8.js → cssm/hook-052c1a2e.js} +20 -8
- package/select/{esm/hook-64a8061f.d.ts → cssm/hook-2f4e96b2.d.ts} +9 -7
- package/select/cssm/mobile/Component.mobile.js +1 -1
- package/select/cssm/presets/index.d.ts +1 -1
- package/select/cssm/presets/index.js +1 -1
- package/select/cssm/presets/useSelectWithApply/hook.js +1 -1
- package/select/cssm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/select/cssm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/select/cssm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/select/cssm/shared/index.js +2 -1
- package/select/cssm/typings.d.ts +3 -1
- package/select/cssm/utils.d.ts +3 -2
- package/select/cssm/utils.js +24 -9
- package/select/esm/Component.responsive.js +1 -1
- package/select/esm/components/base-select/Component.js +23 -11
- package/select/esm/components/base-select/mobile.css +2 -2
- package/select/esm/{hook-699ea205.js → hook-261ab63e.js} +21 -9
- package/select/{modern/hook-64a8061f.d.ts → esm/hook-2f4e96b2.d.ts} +9 -7
- package/select/esm/index.js +1 -1
- package/select/esm/mobile/Component.mobile.js +1 -1
- package/select/esm/mobile/Component.modal.mobile.js +1 -1
- package/select/esm/mobile/index.js +1 -1
- package/select/esm/presets/index.d.ts +1 -1
- package/select/esm/presets/index.js +1 -1
- package/select/esm/presets/useSelectWithApply/hook.js +1 -1
- package/select/esm/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/select/esm/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/select/esm/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/select/esm/shared/index.js +2 -2
- package/select/esm/typings.d.ts +3 -1
- package/select/esm/utils.d.ts +3 -2
- package/select/esm/utils.js +24 -10
- package/select/{cssm/hook-546b2479.js → hook-06cf2830.js} +20 -8
- package/select/{cssm/hook-64a8061f.d.ts → hook-2f4e96b2.d.ts} +9 -7
- package/select/mobile/Component.mobile.js +1 -1
- package/select/modern/Component.responsive.js +1 -1
- package/select/modern/components/base-select/Component.js +11 -2
- package/select/modern/components/base-select/mobile.css +2 -2
- package/select/modern/{hook-b0f48fdd.js → hook-18077e63.js} +14 -3
- package/select/{hook-64a8061f.d.ts → modern/hook-2f4e96b2.d.ts} +9 -7
- package/select/modern/index.js +1 -1
- package/select/modern/mobile/Component.mobile.js +1 -1
- package/select/modern/mobile/Component.modal.mobile.js +1 -1
- package/select/modern/mobile/index.js +1 -1
- package/select/modern/presets/index.d.ts +1 -1
- package/select/modern/presets/index.js +1 -1
- package/select/modern/presets/useSelectWithApply/hook.js +1 -1
- package/select/modern/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/select/modern/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/select/modern/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/select/modern/shared/index.js +2 -2
- package/select/modern/typings.d.ts +3 -1
- package/select/modern/utils.d.ts +3 -2
- package/select/modern/utils.js +23 -10
- package/select/presets/index.d.ts +1 -1
- package/select/presets/index.js +1 -1
- package/select/presets/useSelectWithApply/hook.js +1 -1
- package/select/presets/useSelectWithApply/options-list-with-apply/Component.js +1 -1
- package/select/presets/useSelectWithApply/options-list-with-apply/index.d.ts +1 -1
- package/select/presets/useSelectWithApply/options-list-with-apply/index.js +1 -1
- package/select/shared/index.js +2 -1
- package/select/typings.d.ts +3 -1
- package/select/utils.d.ts +3 -2
- package/select/utils.js +24 -9
- package/side-panel/components/controls/Component.js +1 -1
- package/side-panel/components/footer/Component.js +1 -1
- package/side-panel/esm/Component.responsive.js +1 -1
- package/side-panel/esm/components/controls/Component.js +1 -1
- package/side-panel/esm/components/controls/index.js +1 -1
- package/side-panel/esm/components/footer/Component.desktop.js +1 -1
- package/side-panel/esm/components/footer/Component.js +1 -1
- package/side-panel/esm/components/footer/Component.mobile.js +1 -1
- package/side-panel/esm/desktop/Component.desktop.js +1 -1
- package/side-panel/esm/desktop/index.js +1 -1
- package/side-panel/esm/index.js +1 -1
- package/side-panel/esm/mobile/Component.mobile.js +1 -1
- package/side-panel/esm/mobile/index.js +1 -1
- package/side-panel/modern/Component.responsive.js +1 -1
- package/side-panel/modern/components/controls/Component.js +1 -1
- package/side-panel/modern/components/controls/index.js +1 -1
- package/side-panel/modern/components/footer/Component.desktop.js +1 -1
- package/side-panel/modern/components/footer/Component.js +1 -1
- package/side-panel/modern/components/footer/Component.mobile.js +1 -1
- package/side-panel/modern/desktop/Component.desktop.js +1 -1
- package/side-panel/modern/desktop/index.js +1 -1
- package/side-panel/modern/index.js +1 -1
- package/side-panel/modern/mobile/Component.mobile.js +1 -1
- package/side-panel/modern/mobile/index.js +1 -1
- package/tabs/components/primary-tablist/Component.collapsible.js +1 -1
- package/tabs/components/primary-tablist/Component.desktop.js +1 -1
- package/tabs/components/primary-tablist/Component.mobile.js +1 -1
- package/tabs/components/secondary-tablist/Component.desktop.js +1 -1
- package/tabs/components/secondary-tablist/Component.mobile.js +1 -1
- package/tabs/esm/collapsible/index.js +1 -1
- package/tabs/esm/components/primary-tablist/Component.collapsible.js +1 -1
- package/tabs/esm/components/primary-tablist/Component.desktop.js +1 -1
- package/tabs/esm/components/primary-tablist/Component.mobile.js +1 -1
- package/tabs/esm/components/primary-tablist/Component.responsive.js +1 -1
- package/tabs/esm/components/secondary-tablist/Component.desktop.js +1 -1
- package/tabs/esm/components/secondary-tablist/Component.mobile.js +1 -1
- package/tabs/esm/components/secondary-tablist/Component.responsive.js +1 -1
- package/tabs/esm/components/tabs/Component.collapsible.js +1 -1
- package/tabs/esm/components/tabs/Component.desktop.js +2 -2
- package/tabs/esm/components/tabs/Component.mobile.js +2 -2
- package/tabs/esm/components/tabs/Component.responsive.js +2 -2
- package/tabs/esm/desktop/index.js +2 -2
- package/tabs/esm/index.js +2 -2
- package/tabs/esm/mobile/index.js +2 -2
- package/tabs/modern/collapsible/index.js +1 -1
- package/tabs/modern/components/primary-tablist/Component.collapsible.js +1 -1
- package/tabs/modern/components/primary-tablist/Component.desktop.js +1 -1
- package/tabs/modern/components/primary-tablist/Component.mobile.js +1 -1
- package/tabs/modern/components/primary-tablist/Component.responsive.js +1 -1
- package/tabs/modern/components/secondary-tablist/Component.desktop.js +1 -1
- package/tabs/modern/components/secondary-tablist/Component.mobile.js +1 -1
- package/tabs/modern/components/secondary-tablist/Component.responsive.js +1 -1
- package/tabs/modern/components/tabs/Component.collapsible.js +1 -1
- package/tabs/modern/components/tabs/Component.desktop.js +2 -2
- package/tabs/modern/components/tabs/Component.mobile.js +2 -2
- package/tabs/modern/components/tabs/Component.responsive.js +2 -2
- package/tabs/modern/desktop/index.js +2 -2
- package/tabs/modern/index.js +2 -2
- package/tabs/modern/mobile/index.js +2 -2
- package/themes/compiled/mobile-dark-bluetint.css +74 -74
- package/toast-plate/components/base-toast-plate/component.js +1 -1
- package/toast-plate/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +1 -1
- package/toast-plate/esm/Component.responsive.js +1 -1
- package/toast-plate/esm/components/base-toast-plate/component.js +1 -1
- package/toast-plate/esm/components/base-toast-plate/index.js +1 -1
- package/toast-plate/esm/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +1 -1
- package/toast-plate/esm/desktop/Component.desktop.js +1 -1
- package/toast-plate/esm/desktop/index.js +1 -1
- package/toast-plate/esm/index-307da6d7.d.ts +1 -1
- package/toast-plate/esm/index.js +1 -1
- package/toast-plate/esm/mobile/Component.mobile.js +1 -1
- package/toast-plate/esm/mobile/index.js +1 -1
- package/toast-plate/index-307da6d7.d.ts +1 -1
- package/toast-plate/modern/Component.responsive.js +1 -1
- package/toast-plate/modern/components/base-toast-plate/component.js +1 -1
- package/toast-plate/modern/components/base-toast-plate/index.js +1 -1
- package/toast-plate/modern/components/base-toast-plate/utils/getBaseToastPlateTestIds.js +1 -1
- package/toast-plate/modern/desktop/Component.desktop.js +1 -1
- package/toast-plate/modern/desktop/index.js +1 -1
- package/toast-plate/modern/index-307da6d7.d.ts +1 -1
- package/toast-plate/modern/index.js +1 -1
- package/toast-plate/modern/mobile/Component.mobile.js +1 -1
- package/toast-plate/modern/mobile/index.js +1 -1
- package/picker-button/Component-cc406ff0.d.ts +0 -5
- package/picker-button/cssm/Component-cc406ff0.d.ts +0 -5
- package/picker-button/cssm/utils-89376c31.d.ts +0 -67
- package/picker-button/esm/Component-cc406ff0.d.ts +0 -5
- package/picker-button/esm/utils-89376c31.d.ts +0 -67
- package/picker-button/modern/Component-cc406ff0.d.ts +0 -5
- package/picker-button/modern/utils-89376c31.d.ts +0 -67
- package/picker-button/utils-89376c31.d.ts +0 -67
- /package/confirmation/{countdown-section-382b7f1f.d.ts → countdown-section-81f3a586.d.ts} +0 -0
- /package/confirmation/{countdown-section-382b7f1f.js → countdown-section-81f3a586.js} +0 -0
- /package/confirmation/esm/{countdown-section-63e032d2.d.ts → countdown-section-ca33a1ef.d.ts} +0 -0
- /package/confirmation/esm/{countdown-section-63e032d2.js → countdown-section-ca33a1ef.js} +0 -0
- /package/confirmation/modern/{countdown-section-e9dca658.d.ts → countdown-section-288ae049.d.ts} +0 -0
- /package/confirmation/modern/{countdown-section-e9dca658.js → countdown-section-288ae049.js} +0 -0
- /package/gallery/{buttons-5ff2da5c.d.ts → buttons-09408c2b.d.ts} +0 -0
- /package/gallery/{buttons-5ff2da5c.js → buttons-09408c2b.js} +0 -0
- /package/gallery/esm/{buttons-bd41e568.d.ts → buttons-6ba5309f.d.ts} +0 -0
- /package/gallery/esm/{buttons-bd41e568.js → buttons-6ba5309f.js} +0 -0
- /package/gallery/esm/{slide-f51ba66f.d.ts → slide-0f9e38d8.d.ts} +0 -0
- /package/gallery/esm/{slide-f51ba66f.js → slide-0f9e38d8.js} +0 -0
- /package/gallery/modern/{buttons-cb3e3a20.d.ts → buttons-781f0415.d.ts} +0 -0
- /package/gallery/modern/{buttons-cb3e3a20.js → buttons-781f0415.js} +0 -0
- /package/gallery/modern/{slide-06a25c48.d.ts → slide-a4299878.d.ts} +0 -0
- /package/gallery/modern/{slide-06a25c48.js → slide-a4299878.js} +0 -0
- /package/gallery/{slide-357d6df0.d.ts → slide-dc8face5.d.ts} +0 -0
- /package/gallery/{slide-357d6df0.js → slide-dc8face5.js} +0 -0
- /package/modal/esm/{layout.module-ad0a095a.js → layout.module-efce6397.js} +0 -0
- /package/modal/{layout.module-ebc9b566.js → layout.module-adc14ed5.js} +0 -0
- /package/modal/modern/{layout.module-70908b3c.js → layout.module-883fd921.js} +0 -0
- /package/pure-cell/{component-8c2a1b0d.d.ts → component-c2fb11e8.d.ts} +0 -0
- /package/pure-cell/{component-8c2a1b0d.js → component-c2fb11e8.js} +0 -0
- /package/pure-cell/esm/{component-e6d0a502.d.ts → component-4457494c.d.ts} +0 -0
- /package/pure-cell/esm/{component-e6d0a502.js → component-4457494c.js} +0 -0
- /package/pure-cell/modern/{component-f35a3fea.d.ts → component-252ae14e.d.ts} +0 -0
- /package/pure-cell/modern/{component-f35a3fea.js → component-252ae14e.js} +0 -0
- /package/select/cssm/{hook-546b2479.d.ts → hook-052c1a2e.d.ts} +0 -0
- /package/select/esm/{hook-699ea205.d.ts → hook-261ab63e.d.ts} +0 -0
- /package/select/{hook-23a1acb8.d.ts → hook-06cf2830.d.ts} +0 -0
- /package/select/modern/{hook-b0f48fdd.d.ts → hook-18077e63.d.ts} +0 -0
- /package/side-panel/esm/{layout.module-85d901ef.js → layout.module-395452b5.js} +0 -0
- /package/side-panel/{layout.module-5552ce9a.js → layout.module-0e1747a9.js} +0 -0
- /package/side-panel/modern/{layout.module-0237c703.js → layout.module-e8468972.js} +0 -0
- /package/tabs/esm/{index.module-9a47e43a.js → index.module-a231a61b.js} +0 -0
- /package/tabs/esm/{index.module-a317c204.js → index.module-f9d4e5fd.js} +0 -0
- /package/tabs/{index.module-7b6d2d6f.js → index.module-57ded00d.js} +0 -0
- /package/tabs/{index.module-ef72aae7.js → index.module-d5711d51.js} +0 -0
- /package/tabs/modern/{index.module-266cdbfe.js → index.module-05463b83.js} +0 -0
- /package/tabs/modern/{index.module-46792af7.js → index.module-8baee2bc.js} +0 -0
- /package/toast-plate/esm/{getDataTestId-cb7cd71c.d.ts → getDataTestId-b5326fa6.d.ts} +0 -0
- /package/toast-plate/esm/{getDataTestId-cb7cd71c.js → getDataTestId-b5326fa6.js} +0 -0
- /package/toast-plate/{getDataTestId-0f11591a.d.ts → getDataTestId-09caf05d.d.ts} +0 -0
- /package/toast-plate/{getDataTestId-0f11591a.js → getDataTestId-09caf05d.js} +0 -0
- /package/toast-plate/modern/{getDataTestId-88511d88.d.ts → getDataTestId-bd9993b4.d.ts} +0 -0
- /package/toast-plate/modern/{getDataTestId-88511d88.js → getDataTestId-bd9993b4.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __rest, __assign, __spreadArray } from 'tslib';
|
|
2
2
|
import React, { forwardRef, useCallback, useEffect, useState, useMemo, useRef } from 'react';
|
|
3
3
|
import deepEqual from 'deep-equal';
|
|
4
|
-
import { defaultAccessor, defaultFilterFn, processOptions } from './utils.js';
|
|
4
|
+
import { defaultAccessor, defaultFilterFn, defaultGroupAccessor, processOptions, isGroup } from './utils.js';
|
|
5
5
|
import { OptionsList } from './components/options-list/Component.js';
|
|
6
6
|
import { DEFAULT_VISIBLE_OPTIONS } from './consts.js';
|
|
7
7
|
import { Footer } from './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
@@ -61,17 +61,29 @@ var OptionsListWithApply = forwardRef(function (_a, ref) {
|
|
|
61
61
|
var SELECT_ALL_KEY = 'select_all';
|
|
62
62
|
var selectAllOption = { key: SELECT_ALL_KEY, content: 'Выбрать все' };
|
|
63
63
|
function useSelectWithApply(_a) {
|
|
64
|
-
var
|
|
65
|
-
var
|
|
66
|
-
var
|
|
64
|
+
var _b, _c;
|
|
65
|
+
var options = _a.options, selected = _a.selected, _d = _a.onChange, onChange = _d === void 0 ? function () { return null; } : _d, OptionsList = _a.OptionsList, _e = _a.optionsListProps, optionsListProps = _e === void 0 ? {} : _e, _f = _a.showClear, showClear = _f === void 0 ? true : _f, _g = _a.showSelectAll, showSelectAll = _g === void 0 ? false : _g, _h = _a.showHeaderWithSelectAll, showHeaderWithSelectAll = _h === void 0 ? false : _h, _j = _a.showSearch, showSearch = _j === void 0 ? false : _j, _k = _a.searchProps, searchProps = _k === void 0 ? {} : _k;
|
|
66
|
+
var _l = useState(''), searchState = _l[0], setSearchState = _l[1];
|
|
67
|
+
var _m = typeof (searchProps === null || searchProps === void 0 ? void 0 : searchProps.value) === 'string'
|
|
67
68
|
? [searchProps.value, searchProps.onChange]
|
|
68
|
-
: [searchState, setSearchState], search =
|
|
69
|
+
: [searchState, setSearchState], search = _m[0], setSearch = _m[1];
|
|
69
70
|
var accessor = searchProps.accessor || defaultAccessor;
|
|
70
71
|
var filterFn = searchProps.filterFn || defaultFilterFn;
|
|
71
|
-
var
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
var groupAccessor = (_b = searchProps.groupAccessor) !== null && _b !== void 0 ? _b : defaultGroupAccessor;
|
|
73
|
+
var filterGroup = (_c = searchProps.filterGroup) !== null && _c !== void 0 ? _c : false;
|
|
74
|
+
var _o = useMemo(function () {
|
|
75
|
+
return processOptions(options, selected, showSearch
|
|
76
|
+
? function (option) {
|
|
77
|
+
if (isGroup(option)) {
|
|
78
|
+
var groupAccessorValue = groupAccessor(option);
|
|
79
|
+
return (typeof groupAccessorValue === 'string' &&
|
|
80
|
+
filterFn(groupAccessorValue, search));
|
|
81
|
+
}
|
|
82
|
+
return filterFn(accessor(option), search);
|
|
83
|
+
}
|
|
84
|
+
: undefined, filterGroup);
|
|
85
|
+
}, [options, selected, showSearch, filterGroup, filterFn, accessor, search, groupAccessor]), flatOptions = _o.flatOptions, selectedOptions = _o.selectedOptions;
|
|
86
|
+
var _p = useState(selectedOptions), selectedDraft = _p[0], setSelectedDraft = _p[1];
|
|
75
87
|
var selectedOptionsRef = useRef(selectedOptions);
|
|
76
88
|
var handleApply = function () {
|
|
77
89
|
onChange({
|
|
@@ -45,14 +45,12 @@ type UseSelectWithApplyProps = {
|
|
|
45
45
|
declare const SELECT_ALL_KEY = "select_all";
|
|
46
46
|
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, showSearch, searchProps, }: UseSelectWithApplyProps): {
|
|
47
47
|
OptionsList: import("react").ForwardRefExoticComponent<import("./typings").OptionsListProps & {
|
|
48
|
-
/**
|
|
49
|
-
* Обработчик выбора
|
|
50
|
-
*/
|
|
51
48
|
showClear?: boolean | undefined;
|
|
52
49
|
onClose?: (() => void) | undefined;
|
|
53
|
-
|
|
54
|
-
*
|
|
50
|
+
/**
|
|
51
|
+
* Обработчик выбора
|
|
55
52
|
*/
|
|
53
|
+
selectedDraft?: OptionShape[] | undefined;
|
|
56
54
|
OptionsList?: import("react").FC<import("./typings").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
57
55
|
Footer?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/footer/Component").FooterProps> | undefined;
|
|
58
56
|
Header?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/header/Component").HeaderProps> | undefined;
|
|
@@ -83,13 +81,15 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
83
81
|
})[];
|
|
84
82
|
onChange: (payload: import("./typings").BaseSelectChangePayload) => void;
|
|
85
83
|
selected: string | OptionShape | (string | OptionShape)[] | null | undefined;
|
|
86
|
-
showSearch: boolean
|
|
84
|
+
showSearch: boolean;
|
|
87
85
|
searchProps: {
|
|
88
86
|
value: string;
|
|
89
87
|
onChange: ((value: string) => void) | undefined;
|
|
90
88
|
componentProps?: import("./typings").SearchProps | undefined;
|
|
91
89
|
accessor?: ((option: OptionShape) => string) | undefined;
|
|
92
90
|
filterFn?: ((optionText: string, search: string) => boolean) | undefined;
|
|
91
|
+
filterGroup?: boolean | undefined;
|
|
92
|
+
groupAccessor?: ((group: import("./typings").GroupShape) => string | undefined) | undefined;
|
|
93
93
|
} | undefined;
|
|
94
94
|
originalProps: {
|
|
95
95
|
options: (OptionShape | import("./typings").GroupShape)[];
|
|
@@ -100,13 +100,15 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
100
100
|
showClear: boolean;
|
|
101
101
|
showSelectAll: boolean;
|
|
102
102
|
showHeaderWithSelectAll: boolean;
|
|
103
|
-
showSearch: boolean
|
|
103
|
+
showSearch: boolean;
|
|
104
104
|
searchProps: {
|
|
105
105
|
componentProps?: import("./typings").SearchProps | undefined;
|
|
106
106
|
accessor?: ((option: OptionShape) => string) | undefined;
|
|
107
107
|
filterFn?: ((optionText: string, search: string) => boolean) | undefined;
|
|
108
108
|
value?: string | undefined;
|
|
109
109
|
onChange?: ((value: string) => void) | undefined;
|
|
110
|
+
filterGroup?: boolean | undefined;
|
|
111
|
+
groupAccessor?: ((group: import("./typings").GroupShape) => string | undefined) | undefined;
|
|
110
112
|
};
|
|
111
113
|
};
|
|
112
114
|
};
|
package/select/esm/index.js
CHANGED
|
@@ -41,7 +41,7 @@ import '../../base-modal/esm';
|
|
|
41
41
|
import '../../button/esm/mobile';
|
|
42
42
|
import './components/virtual-options-list/Component.js';
|
|
43
43
|
import 'react-virtual';
|
|
44
|
-
import './hook-
|
|
44
|
+
import './hook-261ab63e.js';
|
|
45
45
|
import 'deep-equal';
|
|
46
46
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
47
47
|
import '../../button/esm/desktop';
|
|
@@ -12,7 +12,7 @@ import { Option } from '../components/option/Component.js';
|
|
|
12
12
|
import { OptionsList } from '../components/options-list/Component.js';
|
|
13
13
|
import { Search } from '../components/search/Component.js';
|
|
14
14
|
import { VirtualOptionsList } from '../components/virtual-options-list/Component.js';
|
|
15
|
-
import { u as useSelectWithApply } from '../hook-
|
|
15
|
+
import { u as useSelectWithApply } from '../hook-261ab63e.js';
|
|
16
16
|
import { Header } from '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
17
17
|
import 'classnames';
|
|
18
18
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
@@ -37,7 +37,7 @@ import '../../../input/esm';
|
|
|
37
37
|
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
38
38
|
import '../components/virtual-options-list/Component.js';
|
|
39
39
|
import 'react-virtual';
|
|
40
|
-
import '../hook-
|
|
40
|
+
import '../hook-261ab63e.js';
|
|
41
41
|
import 'deep-equal';
|
|
42
42
|
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
43
43
|
import '../../../button/esm/desktop';
|
|
@@ -38,7 +38,7 @@ import '../../../input/esm';
|
|
|
38
38
|
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
39
39
|
import '../components/virtual-options-list/Component.js';
|
|
40
40
|
import 'react-virtual';
|
|
41
|
-
import '../hook-
|
|
41
|
+
import '../hook-261ab63e.js';
|
|
42
42
|
import 'deep-equal';
|
|
43
43
|
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
44
44
|
import '../../../button/esm/desktop';
|
|
@@ -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-261ab63e.js';
|
|
4
4
|
import 'tslib';
|
|
5
5
|
import 'react';
|
|
6
6
|
import '../../../skeleton/esm';
|
|
@@ -2,7 +2,7 @@ import 'tslib';
|
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'deep-equal';
|
|
4
4
|
import '../../../../shared/esm';
|
|
5
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-
|
|
5
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../../hook-261ab63e.js';
|
|
6
6
|
import '../../utils.js';
|
|
7
7
|
import '../../components/options-list/Component.js';
|
|
8
8
|
import 'react-merge-refs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'tslib';
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../../../components/options-list/Component.js';
|
|
4
|
-
export { O as OptionsListWithApply } from '../../../hook-
|
|
4
|
+
export { O as OptionsListWithApply } from '../../../hook-261ab63e.js';
|
|
5
5
|
import './footer/Component.js';
|
|
6
6
|
import './header/Component.js';
|
|
7
7
|
import 'react-merge-refs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "../../../hook-
|
|
1
|
+
export * from "../../../hook-261ab63e";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { useSelectWithLoading } from '../presets/useSelectWithLoading/hook.js';
|
|
2
2
|
export { useLazyLoading } from '../presets/useLazyLoading/hook.js';
|
|
3
|
-
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-
|
|
4
|
-
export { defaultAccessor, defaultFilterFn, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions } from '../utils.js';
|
|
3
|
+
export { S as SELECT_ALL_KEY, u as useSelectWithApply } from '../hook-261ab63e.js';
|
|
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';
|
|
7
7
|
export { OptionsList } from '../components/options-list/Component.js';
|
package/select/esm/typings.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { InputProps } from "../../input";
|
|
|
5
5
|
import { ModalProps } from "../../modal";
|
|
6
6
|
import { ModalFooterProps, ModalHeaderProps } from "../../modal/shared";
|
|
7
7
|
import { PopoverProps } from "../../popover";
|
|
8
|
-
import { UseSelectWithApplyProps } from "./hook-
|
|
8
|
+
import { UseSelectWithApplyProps } from "./hook-2f4e96b2";
|
|
9
9
|
type AnyObject = Record<string, any>;
|
|
10
10
|
type OptionShape = {
|
|
11
11
|
/**
|
|
@@ -237,6 +237,8 @@ type BaseSelectProps = {
|
|
|
237
237
|
filterFn?: (optionText: string, search: string) => boolean;
|
|
238
238
|
value?: string;
|
|
239
239
|
onChange?: (value: string) => void;
|
|
240
|
+
filterGroup?: boolean;
|
|
241
|
+
groupAccessor?: (group: GroupShape) => string | undefined;
|
|
240
242
|
};
|
|
241
243
|
/**
|
|
242
244
|
* Обработчик выбора
|
package/select/esm/utils.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ declare const joinOptions: ({ selected, selectedMultiple, }: {
|
|
|
6
6
|
selected?: OptionShape | undefined;
|
|
7
7
|
selectedMultiple?: OptionShape[] | undefined;
|
|
8
8
|
}) => ReactNode[] | null;
|
|
9
|
-
declare function processOptions(options: BaseSelectProps['options'], selected?: BaseSelectProps['selected'], filterFn?: (option: OptionShape) => boolean): {
|
|
9
|
+
declare function processOptions(options: BaseSelectProps['options'], selected?: BaseSelectProps['selected'], filterFn?: (option: OptionShape | GroupShape) => boolean, filterGroup?: boolean): {
|
|
10
10
|
filteredOptions: (OptionShape | GroupShape)[];
|
|
11
11
|
flatOptions: OptionShape[];
|
|
12
12
|
selectedOptions: OptionShape[];
|
|
@@ -35,6 +35,7 @@ type useVisibleOptionsArgs = {
|
|
|
35
35
|
};
|
|
36
36
|
declare function useVisibleOptions({ visibleOptions, listRef, styleTargetRef, open, invalidate, }: useVisibleOptionsArgs): void;
|
|
37
37
|
declare function defaultFilterFn(optionText: string, search: string): boolean;
|
|
38
|
+
declare function defaultGroupAccessor(option: GroupShape): string | undefined;
|
|
38
39
|
declare function defaultAccessor(option: OptionShape): string;
|
|
39
40
|
declare function usePrevious<T>(value: T): T | undefined;
|
|
40
41
|
declare const lastIndexOf: <T>(array: T[], predicate: (item: T) => boolean) => number;
|
|
@@ -64,4 +65,4 @@ declare function getSelectTestIds(dataTestId: string): {
|
|
|
64
65
|
modalHeader: string;
|
|
65
66
|
modalContent: string;
|
|
66
67
|
};
|
|
67
|
-
export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, defaultFilterFn, defaultAccessor, usePrevious, lastIndexOf, getSelectTestIds };
|
|
68
|
+
export { isGroup, isOptionShape, joinOptions, processOptions, useVisibleOptions, defaultFilterFn, defaultGroupAccessor, defaultAccessor, usePrevious, lastIndexOf, getSelectTestIds };
|
package/select/esm/utils.js
CHANGED
|
@@ -26,9 +26,10 @@ var joinOptions = function (_a) {
|
|
|
26
26
|
}, []);
|
|
27
27
|
};
|
|
28
28
|
// За один проход делает список пунктов меню плоским и находит выбранные пункты по ключу
|
|
29
|
-
function processOptions(options, selected, filterFn) {
|
|
29
|
+
function processOptions(options, selected, filterFn, filterGroup) {
|
|
30
30
|
if (selected === void 0) { selected = []; }
|
|
31
31
|
if (filterFn === void 0) { filterFn = function () { return true; }; }
|
|
32
|
+
if (filterGroup === void 0) { filterGroup = false; }
|
|
32
33
|
var flatOptions = [];
|
|
33
34
|
var filteredOptions = [];
|
|
34
35
|
var selectedArray = Array.isArray(selected) ? selected : [selected];
|
|
@@ -36,12 +37,20 @@ function processOptions(options, selected, filterFn) {
|
|
|
36
37
|
var selectedKeys = selectedArray.filter(function (option) { return typeof option === 'string'; });
|
|
37
38
|
var isSelected = function (option) { return selectedKeys.includes(option.key); };
|
|
38
39
|
var process = function (option) {
|
|
39
|
-
|
|
40
|
+
var isGroupOption = isGroup(option);
|
|
41
|
+
if (!isGroupOption && isSelected(option)) {
|
|
40
42
|
selectedOptions.push(option);
|
|
41
43
|
}
|
|
42
44
|
if (!filterFn(option))
|
|
43
45
|
return false;
|
|
44
|
-
|
|
46
|
+
if (isGroupOption) {
|
|
47
|
+
if (filterGroup) {
|
|
48
|
+
Array.prototype.push.apply(flatOptions, option.options);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
flatOptions.push(option);
|
|
53
|
+
}
|
|
45
54
|
return true;
|
|
46
55
|
};
|
|
47
56
|
options.forEach(function (option) {
|
|
@@ -52,14 +61,16 @@ function processOptions(options, selected, filterFn) {
|
|
|
52
61
|
if (matched)
|
|
53
62
|
group_1.options.push(groupOption);
|
|
54
63
|
});
|
|
55
|
-
if (group_1.options.length)
|
|
64
|
+
if (group_1.options.length) {
|
|
56
65
|
filteredOptions.push(group_1);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (!filterGroup)
|
|
69
|
+
return;
|
|
57
70
|
}
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
filteredOptions.push(option);
|
|
62
|
-
}
|
|
71
|
+
var matched = process(option);
|
|
72
|
+
if (matched)
|
|
73
|
+
filteredOptions.push(option);
|
|
63
74
|
});
|
|
64
75
|
return { filteredOptions: filteredOptions, flatOptions: flatOptions, selectedOptions: selectedOptions };
|
|
65
76
|
}
|
|
@@ -90,6 +101,9 @@ function defaultFilterFn(optionText, search) {
|
|
|
90
101
|
return true;
|
|
91
102
|
return optionText.toLowerCase().includes(search.toLowerCase());
|
|
92
103
|
}
|
|
104
|
+
function defaultGroupAccessor(option) {
|
|
105
|
+
return option.label;
|
|
106
|
+
}
|
|
93
107
|
function defaultAccessor(option) {
|
|
94
108
|
if (typeof option.content === 'string')
|
|
95
109
|
return option.content;
|
|
@@ -142,4 +156,4 @@ function getSelectTestIds(dataTestId) {
|
|
|
142
156
|
};
|
|
143
157
|
}
|
|
144
158
|
|
|
145
|
-
export { defaultAccessor, defaultFilterFn, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions };
|
|
159
|
+
export { defaultAccessor, defaultFilterFn, defaultGroupAccessor, getSelectTestIds, isGroup, isOptionShape, joinOptions, lastIndexOf, processOptions, usePrevious, useVisibleOptions };
|
|
@@ -58,17 +58,29 @@ var OptionsListWithApply = React.forwardRef(function (_a, ref) {
|
|
|
58
58
|
var SELECT_ALL_KEY = 'select_all';
|
|
59
59
|
var selectAllOption = { key: SELECT_ALL_KEY, content: 'Выбрать все' };
|
|
60
60
|
function useSelectWithApply(_a) {
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
var
|
|
61
|
+
var _b, _c;
|
|
62
|
+
var options = _a.options, selected = _a.selected, _d = _a.onChange, onChange = _d === void 0 ? function () { return null; } : _d, OptionsList = _a.OptionsList, _e = _a.optionsListProps, optionsListProps = _e === void 0 ? {} : _e, _f = _a.showClear, showClear = _f === void 0 ? true : _f, _g = _a.showSelectAll, showSelectAll = _g === void 0 ? false : _g, _h = _a.showHeaderWithSelectAll, showHeaderWithSelectAll = _h === void 0 ? false : _h, _j = _a.showSearch, showSearch = _j === void 0 ? false : _j, _k = _a.searchProps, searchProps = _k === void 0 ? {} : _k;
|
|
63
|
+
var _l = React.useState(''), searchState = _l[0], setSearchState = _l[1];
|
|
64
|
+
var _m = typeof (searchProps === null || searchProps === void 0 ? void 0 : searchProps.value) === 'string'
|
|
64
65
|
? [searchProps.value, searchProps.onChange]
|
|
65
|
-
: [searchState, setSearchState], search =
|
|
66
|
+
: [searchState, setSearchState], search = _m[0], setSearch = _m[1];
|
|
66
67
|
var accessor = searchProps.accessor || utils.defaultAccessor;
|
|
67
68
|
var filterFn = searchProps.filterFn || utils.defaultFilterFn;
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
69
|
+
var groupAccessor = (_b = searchProps.groupAccessor) !== null && _b !== void 0 ? _b : utils.defaultGroupAccessor;
|
|
70
|
+
var filterGroup = (_c = searchProps.filterGroup) !== null && _c !== void 0 ? _c : false;
|
|
71
|
+
var _o = React.useMemo(function () {
|
|
72
|
+
return utils.processOptions(options, selected, showSearch
|
|
73
|
+
? function (option) {
|
|
74
|
+
if (utils.isGroup(option)) {
|
|
75
|
+
var groupAccessorValue = groupAccessor(option);
|
|
76
|
+
return (typeof groupAccessorValue === 'string' &&
|
|
77
|
+
filterFn(groupAccessorValue, search));
|
|
78
|
+
}
|
|
79
|
+
return filterFn(accessor(option), search);
|
|
80
|
+
}
|
|
81
|
+
: undefined, filterGroup);
|
|
82
|
+
}, [options, selected, showSearch, filterGroup, filterFn, accessor, search, groupAccessor]), flatOptions = _o.flatOptions, selectedOptions = _o.selectedOptions;
|
|
83
|
+
var _p = React.useState(selectedOptions), selectedDraft = _p[0], setSelectedDraft = _p[1];
|
|
72
84
|
var selectedOptionsRef = React.useRef(selectedOptions);
|
|
73
85
|
var handleApply = function () {
|
|
74
86
|
onChange({
|
|
@@ -45,14 +45,12 @@ type UseSelectWithApplyProps = {
|
|
|
45
45
|
declare const SELECT_ALL_KEY = "select_all";
|
|
46
46
|
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, showSearch, searchProps, }: UseSelectWithApplyProps): {
|
|
47
47
|
OptionsList: import("react").ForwardRefExoticComponent<import("./typings").OptionsListProps & {
|
|
48
|
-
/**
|
|
49
|
-
* Обработчик выбора
|
|
50
|
-
*/
|
|
51
48
|
showClear?: boolean | undefined;
|
|
52
49
|
onClose?: (() => void) | undefined;
|
|
53
|
-
|
|
54
|
-
*
|
|
50
|
+
/**
|
|
51
|
+
* Обработчик выбора
|
|
55
52
|
*/
|
|
53
|
+
selectedDraft?: OptionShape[] | undefined;
|
|
56
54
|
OptionsList?: import("react").FC<import("./typings").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
57
55
|
Footer?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/footer/Component").FooterProps> | undefined;
|
|
58
56
|
Header?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/header/Component").HeaderProps> | undefined;
|
|
@@ -83,13 +81,15 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
83
81
|
})[];
|
|
84
82
|
onChange: (payload: import("./typings").BaseSelectChangePayload) => void;
|
|
85
83
|
selected: string | OptionShape | (string | OptionShape)[] | null | undefined;
|
|
86
|
-
showSearch: boolean
|
|
84
|
+
showSearch: boolean;
|
|
87
85
|
searchProps: {
|
|
88
86
|
value: string;
|
|
89
87
|
onChange: ((value: string) => void) | undefined;
|
|
90
88
|
componentProps?: import("./typings").SearchProps | undefined;
|
|
91
89
|
accessor?: ((option: OptionShape) => string) | undefined;
|
|
92
90
|
filterFn?: ((optionText: string, search: string) => boolean) | undefined;
|
|
91
|
+
filterGroup?: boolean | undefined;
|
|
92
|
+
groupAccessor?: ((group: import("./typings").GroupShape) => string | undefined) | undefined;
|
|
93
93
|
} | undefined;
|
|
94
94
|
originalProps: {
|
|
95
95
|
options: (OptionShape | import("./typings").GroupShape)[];
|
|
@@ -100,13 +100,15 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
100
100
|
showClear: boolean;
|
|
101
101
|
showSelectAll: boolean;
|
|
102
102
|
showHeaderWithSelectAll: boolean;
|
|
103
|
-
showSearch: boolean
|
|
103
|
+
showSearch: boolean;
|
|
104
104
|
searchProps: {
|
|
105
105
|
componentProps?: import("./typings").SearchProps | undefined;
|
|
106
106
|
accessor?: ((option: OptionShape) => string) | undefined;
|
|
107
107
|
filterFn?: ((optionText: string, search: string) => boolean) | undefined;
|
|
108
108
|
value?: string | undefined;
|
|
109
109
|
onChange?: ((value: string) => void) | undefined;
|
|
110
|
+
filterGroup?: boolean | undefined;
|
|
111
|
+
groupAccessor?: ((group: import("./typings").GroupShape) => string | undefined) | undefined;
|
|
110
112
|
};
|
|
111
113
|
};
|
|
112
114
|
};
|
|
@@ -14,7 +14,7 @@ var components_option_Component = require('../components/option/Component.js');
|
|
|
14
14
|
var components_optionsList_Component = require('../components/options-list/Component.js');
|
|
15
15
|
var components_search_Component = require('../components/search/Component.js');
|
|
16
16
|
var components_virtualOptionsList_Component = require('../components/virtual-options-list/Component.js');
|
|
17
|
-
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-
|
|
17
|
+
var presets_useSelectWithApply_optionsListWithApply_Component = require('../hook-06cf2830.js');
|
|
18
18
|
var presets_useSelectWithApply_optionsListWithApply_header_Component = require('../presets/useSelectWithApply/options-list-with-apply/header/Component.js');
|
|
19
19
|
|
|
20
20
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
@@ -40,7 +40,7 @@ import '../../base-modal/modern';
|
|
|
40
40
|
import '../../button/modern/mobile';
|
|
41
41
|
import './components/virtual-options-list/Component.js';
|
|
42
42
|
import 'react-virtual';
|
|
43
|
-
import './hook-
|
|
43
|
+
import './hook-18077e63.js';
|
|
44
44
|
import 'deep-equal';
|
|
45
45
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
46
46
|
import '../../button/modern/desktop';
|
|
@@ -6,7 +6,7 @@ import { compute } from 'compute-scroll-into-view';
|
|
|
6
6
|
import { useMultipleSelection, useCombobox } from 'downshift';
|
|
7
7
|
import { fnUtils, getDataTestId } from '../../../../shared/modern';
|
|
8
8
|
import { useLayoutEffect_SAFE_FOR_SSR } from '@alfalab/hooks';
|
|
9
|
-
import { defaultAccessor, defaultFilterFn, processOptions } from '../../utils.js';
|
|
9
|
+
import { defaultAccessor, defaultFilterFn, defaultGroupAccessor, processOptions, isGroup } from '../../utils.js';
|
|
10
10
|
import { NativeSelect } from '../native-select/Component.js';
|
|
11
11
|
|
|
12
12
|
const styles = {"component":"select__component_13j3x","popoverInner":"select__popoverInner_13j3x","optionsListWrapper":"select__optionsListWrapper_13j3x","optionsListBorder":"select__optionsListBorder_13j3x","nativeSelect":"select__nativeSelect_13j3x","block":"select__block_13j3x","emptySearchPlaceholder":"select__emptySearchPlaceholder_13j3x","search":"select__search_13j3x"};
|
|
@@ -35,7 +35,16 @@ const BaseSelect = forwardRef(
|
|
|
35
35
|
: [searchState, setSearchState];
|
|
36
36
|
const accessor = searchProps.accessor || defaultAccessor;
|
|
37
37
|
const filterFn = searchProps.filterFn || defaultFilterFn;
|
|
38
|
-
const
|
|
38
|
+
const filterGroup = searchProps.filterGroup ?? false;
|
|
39
|
+
const groupAccessor = searchProps.groupAccessor ?? defaultGroupAccessor;
|
|
40
|
+
const { filteredOptions, flatOptions, selectedOptions } = useMemo(() => processOptions(options, selected, (option) => {
|
|
41
|
+
if (isGroup(option)) {
|
|
42
|
+
const groupAccessorValue = groupAccessor(option);
|
|
43
|
+
return (typeof groupAccessorValue === 'string' &&
|
|
44
|
+
filterFn(groupAccessorValue, search));
|
|
45
|
+
}
|
|
46
|
+
return filterFn(accessor(option), search);
|
|
47
|
+
}, filterGroup), [options, selected, filterFn, accessor, search, filterGroup, groupAccessor]);
|
|
39
48
|
const scrollIntoView = (node) => {
|
|
40
49
|
if (!node || view === 'mobile')
|
|
41
50
|
return;
|
|
@@ -29,9 +29,9 @@
|
|
|
29
29
|
/* optgroup */
|
|
30
30
|
} .select__sheet_mps48 {
|
|
31
31
|
overflow: hidden;
|
|
32
|
-
} .select__sheetContent_mps48
|
|
32
|
+
} .select__sheetContent_mps48 {
|
|
33
33
|
padding: 0
|
|
34
|
-
} .select__sheetContent_mps48
|
|
34
|
+
} .select__sheetContent_mps48 .select__modalContent_mps48 {
|
|
35
35
|
padding: 0;
|
|
36
36
|
display: flex;
|
|
37
37
|
flex-direction: column;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef, useCallback, useEffect, useState, useMemo, useRef } from 'react';
|
|
2
2
|
import deepEqual from 'deep-equal';
|
|
3
|
-
import { defaultAccessor, defaultFilterFn, processOptions } from './utils.js';
|
|
3
|
+
import { defaultAccessor, defaultFilterFn, defaultGroupAccessor, processOptions, isGroup } from './utils.js';
|
|
4
4
|
import { OptionsList } from './components/options-list/Component.js';
|
|
5
5
|
import { DEFAULT_VISIBLE_OPTIONS } from './consts.js';
|
|
6
6
|
import { Footer } from './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
@@ -58,14 +58,25 @@ const OptionsListWithApply = forwardRef(({ toggleMenu, getOptionProps: defaultGe
|
|
|
58
58
|
|
|
59
59
|
const SELECT_ALL_KEY = 'select_all';
|
|
60
60
|
const selectAllOption = { key: SELECT_ALL_KEY, content: 'Выбрать все' };
|
|
61
|
-
function useSelectWithApply({ options, selected, onChange = () => null, OptionsList, optionsListProps = {}, showClear = true, showSelectAll = false, showHeaderWithSelectAll = false, showSearch, searchProps = {}, }) {
|
|
61
|
+
function useSelectWithApply({ options, selected, onChange = () => null, OptionsList, optionsListProps = {}, showClear = true, showSelectAll = false, showHeaderWithSelectAll = false, showSearch = false, searchProps = {}, }) {
|
|
62
62
|
const [searchState, setSearchState] = useState('');
|
|
63
63
|
const [search, setSearch] = typeof searchProps?.value === 'string'
|
|
64
64
|
? [searchProps.value, searchProps.onChange]
|
|
65
65
|
: [searchState, setSearchState];
|
|
66
66
|
const accessor = searchProps.accessor || defaultAccessor;
|
|
67
67
|
const filterFn = searchProps.filterFn || defaultFilterFn;
|
|
68
|
-
const
|
|
68
|
+
const groupAccessor = searchProps.groupAccessor ?? defaultGroupAccessor;
|
|
69
|
+
const filterGroup = searchProps.filterGroup ?? false;
|
|
70
|
+
const { flatOptions, selectedOptions } = useMemo(() => processOptions(options, selected, showSearch
|
|
71
|
+
? (option) => {
|
|
72
|
+
if (isGroup(option)) {
|
|
73
|
+
const groupAccessorValue = groupAccessor(option);
|
|
74
|
+
return (typeof groupAccessorValue === 'string' &&
|
|
75
|
+
filterFn(groupAccessorValue, search));
|
|
76
|
+
}
|
|
77
|
+
return filterFn(accessor(option), search);
|
|
78
|
+
}
|
|
79
|
+
: undefined, filterGroup), [options, selected, showSearch, filterGroup, filterFn, accessor, search, groupAccessor]);
|
|
69
80
|
const [selectedDraft, setSelectedDraft] = useState(selectedOptions);
|
|
70
81
|
const selectedOptionsRef = useRef(selectedOptions);
|
|
71
82
|
const handleApply = () => {
|
|
@@ -45,14 +45,12 @@ type UseSelectWithApplyProps = {
|
|
|
45
45
|
declare const SELECT_ALL_KEY = "select_all";
|
|
46
46
|
declare function useSelectWithApply({ options, selected, onChange, OptionsList, optionsListProps, showClear, showSelectAll, showHeaderWithSelectAll, showSearch, searchProps, }: UseSelectWithApplyProps): {
|
|
47
47
|
OptionsList: import("react").ForwardRefExoticComponent<import("./typings").OptionsListProps & {
|
|
48
|
-
/**
|
|
49
|
-
* Обработчик выбора
|
|
50
|
-
*/
|
|
51
48
|
showClear?: boolean | undefined;
|
|
52
49
|
onClose?: (() => void) | undefined;
|
|
53
|
-
|
|
54
|
-
*
|
|
50
|
+
/**
|
|
51
|
+
* Обработчик выбора
|
|
55
52
|
*/
|
|
53
|
+
selectedDraft?: OptionShape[] | undefined;
|
|
56
54
|
OptionsList?: import("react").FC<import("./typings").OptionsListProps & import("react").RefAttributes<HTMLDivElement>> | undefined;
|
|
57
55
|
Footer?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/footer/Component").FooterProps> | undefined;
|
|
58
56
|
Header?: import("react").FC<import("./presets/useSelectWithApply/options-list-with-apply/header/Component").HeaderProps> | undefined;
|
|
@@ -83,13 +81,15 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
83
81
|
})[];
|
|
84
82
|
onChange: (payload: import("./typings").BaseSelectChangePayload) => void;
|
|
85
83
|
selected: string | OptionShape | (string | OptionShape)[] | null | undefined;
|
|
86
|
-
showSearch: boolean
|
|
84
|
+
showSearch: boolean;
|
|
87
85
|
searchProps: {
|
|
88
86
|
value: string;
|
|
89
87
|
onChange: ((value: string) => void) | undefined;
|
|
90
88
|
componentProps?: import("./typings").SearchProps | undefined;
|
|
91
89
|
accessor?: ((option: OptionShape) => string) | undefined;
|
|
92
90
|
filterFn?: ((optionText: string, search: string) => boolean) | undefined;
|
|
91
|
+
filterGroup?: boolean | undefined;
|
|
92
|
+
groupAccessor?: ((group: import("./typings").GroupShape) => string | undefined) | undefined;
|
|
93
93
|
} | undefined;
|
|
94
94
|
originalProps: {
|
|
95
95
|
options: (OptionShape | import("./typings").GroupShape)[];
|
|
@@ -100,13 +100,15 @@ declare function useSelectWithApply({ options, selected, onChange, OptionsList,
|
|
|
100
100
|
showClear: boolean;
|
|
101
101
|
showSelectAll: boolean;
|
|
102
102
|
showHeaderWithSelectAll: boolean;
|
|
103
|
-
showSearch: boolean
|
|
103
|
+
showSearch: boolean;
|
|
104
104
|
searchProps: {
|
|
105
105
|
componentProps?: import("./typings").SearchProps | undefined;
|
|
106
106
|
accessor?: ((option: OptionShape) => string) | undefined;
|
|
107
107
|
filterFn?: ((optionText: string, search: string) => boolean) | undefined;
|
|
108
108
|
value?: string | undefined;
|
|
109
109
|
onChange?: ((value: string) => void) | undefined;
|
|
110
|
+
filterGroup?: boolean | undefined;
|
|
111
|
+
groupAccessor?: ((group: import("./typings").GroupShape) => string | undefined) | undefined;
|
|
110
112
|
};
|
|
111
113
|
};
|
|
112
114
|
};
|
package/select/modern/index.js
CHANGED
|
@@ -40,7 +40,7 @@ import '../../base-modal/modern';
|
|
|
40
40
|
import '../../button/modern/mobile';
|
|
41
41
|
import './components/virtual-options-list/Component.js';
|
|
42
42
|
import 'react-virtual';
|
|
43
|
-
import './hook-
|
|
43
|
+
import './hook-18077e63.js';
|
|
44
44
|
import 'deep-equal';
|
|
45
45
|
import './presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
46
46
|
import '../../button/modern/desktop';
|
|
@@ -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-18077e63.js';
|
|
15
15
|
import { Header } from '../presets/useSelectWithApply/options-list-with-apply/header/Component.js';
|
|
16
16
|
import 'classnames';
|
|
17
17
|
import '@alfalab/icons-glyph/ChevronDownMIcon';
|
|
@@ -36,7 +36,7 @@ import '../../../input/modern';
|
|
|
36
36
|
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
37
37
|
import '../components/virtual-options-list/Component.js';
|
|
38
38
|
import 'react-virtual';
|
|
39
|
-
import '../hook-
|
|
39
|
+
import '../hook-18077e63.js';
|
|
40
40
|
import 'deep-equal';
|
|
41
41
|
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
42
42
|
import '../../../button/modern/desktop';
|
|
@@ -37,7 +37,7 @@ import '../../../input/modern';
|
|
|
37
37
|
import '@alfalab/icons-glyph/MagnifierMIcon';
|
|
38
38
|
import '../components/virtual-options-list/Component.js';
|
|
39
39
|
import 'react-virtual';
|
|
40
|
-
import '../hook-
|
|
40
|
+
import '../hook-18077e63.js';
|
|
41
41
|
import 'deep-equal';
|
|
42
42
|
import '../presets/useSelectWithApply/options-list-with-apply/footer/Component.js';
|
|
43
43
|
import '../../../button/modern/desktop';
|
|
@@ -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-18077e63.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import '../../../skeleton/modern';
|
|
6
6
|
import '../components/option/Component.js';
|